@aiquants/markdown 6.4.1 → 8.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. package/README.md +108 -15
  2. package/dist/{abnfDiagram-VRR7QNED-2HHLEFYn.js → abnfDiagram-VRR7QNED-CBM41EC-.js} +3 -3
  3. package/dist/{abnfDiagram-VRR7QNED-B9qvbKps.cjs → abnfDiagram-VRR7QNED-RXKSzAok.cjs} +1 -1
  4. package/dist/{arc-DGI79XZe.cjs → arc-BgmWispZ.cjs} +1 -1
  5. package/dist/{arc-DD1A3GS6.js → arc-Bih4TvC8.js} +1 -1
  6. package/dist/{architectureDiagram-ZJ3FMSHR-C2Isv_kl.js → architectureDiagram-ZJ3FMSHR-D5xVqWe2.js} +2 -2
  7. package/dist/{architectureDiagram-ZJ3FMSHR-B7adKw79.cjs → architectureDiagram-ZJ3FMSHR-G8H1xynt.cjs} +1 -1
  8. package/dist/{blockDiagram-677ZJIJ3-tX1_79x-.cjs → blockDiagram-677ZJIJ3-ChRokBD8.cjs} +1 -1
  9. package/dist/{blockDiagram-677ZJIJ3-BzDG3iuJ.js → blockDiagram-677ZJIJ3-D2McEwPe.js} +3 -3
  10. package/dist/{c4Diagram-LMCZKHZV-Cw3Nz-fO.cjs → c4Diagram-LMCZKHZV-BbuZbR8I.cjs} +1 -1
  11. package/dist/{c4Diagram-LMCZKHZV-C1E7x4pL.js → c4Diagram-LMCZKHZV-pbn9ZNfc.js} +2 -2
  12. package/dist/{channel-rE7Nidar.js → channel-BSzyMwb9.js} +1 -1
  13. package/dist/{channel-BDmOr8WI.cjs → channel-Bsz6w6My.cjs} +1 -1
  14. package/dist/{chunk-2Q5K7J3B-CTJGCzMl.js → chunk-2Q5K7J3B-BTLV8fQR.js} +1 -1
  15. package/dist/{chunk-2Q5K7J3B-B_uu3ryF.cjs → chunk-2Q5K7J3B-JZcIC-fN.cjs} +1 -1
  16. package/dist/{chunk-32BRIVSS-BU3k8fI2.cjs → chunk-32BRIVSS-CE9TqZq-.cjs} +1 -1
  17. package/dist/{chunk-32BRIVSS-80KutoA3.js → chunk-32BRIVSS-DVNzMr7e.js} +1 -1
  18. package/dist/{chunk-5VM5RSS4-B832yI0V.js → chunk-5VM5RSS4-Cs47jzo-.js} +1 -1
  19. package/dist/{chunk-5VM5RSS4-uqdZf5S-.cjs → chunk-5VM5RSS4-r0VjpGpm.cjs} +1 -1
  20. package/dist/{chunk-EX3LRPZG-5HbToUCP.cjs → chunk-EX3LRPZG-BY25xTq7.cjs} +1 -1
  21. package/dist/{chunk-EX3LRPZG-DApvzt_L.js → chunk-EX3LRPZG-B_5Ggj5W.js} +4 -4
  22. package/dist/{chunk-JWPE2WC7-CBmUqzlg.cjs → chunk-JWPE2WC7-C27eOtyn.cjs} +1 -1
  23. package/dist/{chunk-JWPE2WC7-Dum8Mfkz.js → chunk-JWPE2WC7-CNmttOZb.js} +1 -1
  24. package/dist/{chunk-MOJQB5TN-EODWFr7m.js → chunk-MOJQB5TN-CEUtU-PA.js} +1 -1
  25. package/dist/{chunk-MOJQB5TN-hBYZmLmM.cjs → chunk-MOJQB5TN-sLs8lWY5.cjs} +1 -1
  26. package/dist/{chunk-PUDLZKDR-Cy-CXwf7.cjs → chunk-PUDLZKDR-CKqKzHIr.cjs} +1 -1
  27. package/dist/{chunk-PUDLZKDR-C2TE3L5R.js → chunk-PUDLZKDR-kE8IVbnR.js} +6 -6
  28. package/dist/{chunk-RYQCIY6F-DYWz_eP5.cjs → chunk-RYQCIY6F-DFx9Fm0p.cjs} +1 -1
  29. package/dist/{chunk-RYQCIY6F-BEpprYHU.js → chunk-RYQCIY6F-DvGyCn1K.js} +1 -1
  30. package/dist/{chunk-V7JOEXUC-GAaV0B4H.cjs → chunk-V7JOEXUC-CDO6Uw3c.cjs} +1 -1
  31. package/dist/{chunk-V7JOEXUC-BM-hXi97.js → chunk-V7JOEXUC-Ct7hq70I.js} +5 -5
  32. package/dist/{chunk-VR4S4FIN-BXcUlQwZ.cjs → chunk-VR4S4FIN-BHCUd_x_.cjs} +1 -1
  33. package/dist/{chunk-VR4S4FIN-BC678u_2.js → chunk-VR4S4FIN-BfeSjNNr.js} +1 -1
  34. package/dist/{chunk-XXDRQBXY-DUBr_c4F.cjs → chunk-XXDRQBXY-DcTILS1N.cjs} +1 -1
  35. package/dist/{chunk-XXDRQBXY-CQpPgj7q.js → chunk-XXDRQBXY-HnJRRkBi.js} +1 -1
  36. package/dist/{classDiagram-OUVF2IWQ-COvGPN2S.cjs → classDiagram-OUVF2IWQ-D2U1rWVc.cjs} +1 -1
  37. package/dist/{classDiagram-v2-EOCWNBFH-yWKe5-Fq.js → classDiagram-OUVF2IWQ-aidSJ9xs.js} +2 -2
  38. package/dist/{classDiagram-v2-EOCWNBFH-COvGPN2S.cjs → classDiagram-v2-EOCWNBFH-D2U1rWVc.cjs} +1 -1
  39. package/dist/{classDiagram-OUVF2IWQ-yWKe5-Fq.js → classDiagram-v2-EOCWNBFH-aidSJ9xs.js} +2 -2
  40. package/dist/components/mdastNodes/codeTokenPalette.d.ts +5 -0
  41. package/dist/components/mermaidInteraction.d.ts +53 -4
  42. package/dist/components/mermaidLabels.d.ts +12 -1
  43. package/dist/components/pointerCoarse.d.ts +2 -0
  44. package/dist/converter.wasm +0 -0
  45. package/dist/{cose-bilkent-JH36ORCC-BZn7k9jD.js → cose-bilkent-JH36ORCC-BRo-F7tL.js} +1 -1
  46. package/dist/{cose-bilkent-JH36ORCC-CcFTw3np.cjs → cose-bilkent-JH36ORCC-Dwf9bYva.cjs} +1 -1
  47. package/dist/css/github-markdown.css +34 -0
  48. package/dist/css/zenn-content.css +34 -0
  49. package/dist/{cynefinDiagram-TSTJHNR4-hurHHCIy.js → cynefinDiagram-TSTJHNR4-C-GL5fqa.js} +2 -2
  50. package/dist/{cynefinDiagram-TSTJHNR4-XM1i8MSX.cjs → cynefinDiagram-TSTJHNR4-zinokqe_.cjs} +1 -1
  51. package/dist/{dagre-VKFMJZFB-CAdYW8rl.js → dagre-VKFMJZFB-BffjLC2e.js} +2 -2
  52. package/dist/{dagre-VKFMJZFB-3LTByKBx.cjs → dagre-VKFMJZFB-DuneW1hp.cjs} +1 -1
  53. package/dist/{diagram-FQU43EPY-CksXO5SO.js → diagram-FQU43EPY-Dzgvcg1I.js} +2 -2
  54. package/dist/{diagram-FQU43EPY-Cbzx46mZ.cjs → diagram-FQU43EPY-zo5gKmtP.cjs} +1 -1
  55. package/dist/{diagram-G47NLZAW-CyQT8r6l.js → diagram-G47NLZAW-CzcPjsD-.js} +3 -3
  56. package/dist/{diagram-G47NLZAW-C86xos3U.cjs → diagram-G47NLZAW-IhAHXHlI.cjs} +1 -1
  57. package/dist/{diagram-NH7WQ7WH-DqE3-hMS.cjs → diagram-NH7WQ7WH-CJ5N1ivv.cjs} +1 -1
  58. package/dist/{diagram-NH7WQ7WH-ClLVgFsl.js → diagram-NH7WQ7WH-DHiaRk6y.js} +2 -2
  59. package/dist/{diagram-OA4YK3LP-CkDm25Bj.js → diagram-OA4YK3LP-ByjYRYdV.js} +3 -3
  60. package/dist/{diagram-OA4YK3LP-TeFqqPyo.cjs → diagram-OA4YK3LP-DgT93Vwf.cjs} +1 -1
  61. package/dist/{diagram-WEI45ONY-DCJ7RPdW.js → diagram-WEI45ONY-BAxzHZgz.js} +2 -2
  62. package/dist/{diagram-WEI45ONY-sNQ6RgM4.cjs → diagram-WEI45ONY-QLDnHl3R.cjs} +1 -1
  63. package/dist/{ebnfDiagram-CCIWWBDH-CwojFWHZ.cjs → ebnfDiagram-CCIWWBDH-CMtypcXn.cjs} +1 -1
  64. package/dist/{ebnfDiagram-CCIWWBDH-ORZrs8P1.js → ebnfDiagram-CCIWWBDH-DgSrRJ63.js} +3 -3
  65. package/dist/{erDiagram-Q63AITRT-B5r4qjGb.cjs → erDiagram-Q63AITRT-CQ9Q6fWy.cjs} +1 -1
  66. package/dist/{erDiagram-Q63AITRT-DLihpfSY.js → erDiagram-Q63AITRT-CyJyuZ4T.js} +4 -4
  67. package/dist/extractHeadings-Bu1mM2zB.cjs +311 -0
  68. package/dist/{extractHeadings-jpTidOYO.js → extractHeadings-z3AodVn3.js} +6636 -6329
  69. package/dist/flowDiagram-23GEKE2U-CF3VxB6X.js +7 -0
  70. package/dist/flowDiagram-23GEKE2U-D3VUCGjn.cjs +1 -0
  71. package/dist/{ganttDiagram-NO4QXBWP-qrmnl_LY.cjs → ganttDiagram-NO4QXBWP-CxK0RSqW.cjs} +1 -1
  72. package/dist/{ganttDiagram-NO4QXBWP-Cc8dpB_u.js → ganttDiagram-NO4QXBWP-DhRS80ms.js} +2 -2
  73. package/dist/{gitGraphDiagram-IHSO6WYX-DEf3gB0s.js → gitGraphDiagram-IHSO6WYX-2Va5zqby.js} +3 -3
  74. package/dist/{gitGraphDiagram-IHSO6WYX-Bi0LKdq4.cjs → gitGraphDiagram-IHSO6WYX-CN12KReP.cjs} +1 -1
  75. package/dist/index.cjs +1 -1
  76. package/dist/index.client.cjs +1 -1
  77. package/dist/index.client.js +1 -1
  78. package/dist/index.js +1 -1
  79. package/dist/index.server.cjs +1 -1
  80. package/dist/index.server.js +246 -241
  81. package/dist/{infoDiagram-FWYZ7A6U-CC1jQUez.js → infoDiagram-FWYZ7A6U--V_yHphS.js} +1 -1
  82. package/dist/{infoDiagram-FWYZ7A6U-ByUzaoGp.cjs → infoDiagram-FWYZ7A6U-k83LxwrO.cjs} +1 -1
  83. package/dist/{ishikawaDiagram-FXEZZL3T-q0Tua53X.cjs → ishikawaDiagram-FXEZZL3T-694D7LFH.cjs} +1 -1
  84. package/dist/{ishikawaDiagram-FXEZZL3T-BD2ZWvM9.js → ishikawaDiagram-FXEZZL3T-Bd4kOAap.js} +1 -1
  85. package/dist/{journeyDiagram-5HDEW3XC-Cc_OHYxa.cjs → journeyDiagram-5HDEW3XC-CbcL76rx.cjs} +1 -1
  86. package/dist/{journeyDiagram-5HDEW3XC-B2d4YZ1X.js → journeyDiagram-5HDEW3XC-Czr00oZx.js} +4 -4
  87. package/dist/{kanban-definition-HUTT4EX6-CGhp8hq-.cjs → kanban-definition-HUTT4EX6-BNO2VHFH.cjs} +1 -1
  88. package/dist/{kanban-definition-HUTT4EX6-CVTjOFjf.js → kanban-definition-HUTT4EX6-DYscvXvj.js} +2 -2
  89. package/dist/{linear-Gki9XU32.js → linear-DHAx74C6.js} +1 -1
  90. package/dist/{linear-NPD77kko.cjs → linear-DZLxJhtt.cjs} +1 -1
  91. package/dist/{mindmap-definition-LN4V7U3C-BVMzWil4.cjs → mindmap-definition-LN4V7U3C-CEitacUY.cjs} +1 -1
  92. package/dist/{mindmap-definition-LN4V7U3C-CcFlbH0m.js → mindmap-definition-LN4V7U3C-DoqEgdhu.js} +3 -3
  93. package/dist/{pegDiagram-2B236MQR-BjkrlFo4.cjs → pegDiagram-2B236MQR-B8G9cHi4.cjs} +1 -1
  94. package/dist/{pegDiagram-2B236MQR-BIEbmEyL.js → pegDiagram-2B236MQR-C7BDICCf.js} +3 -3
  95. package/dist/{pieDiagram-ENE6RG2P-C_zKMY-f.cjs → pieDiagram-ENE6RG2P-Bg4RGsL0.cjs} +1 -1
  96. package/dist/{pieDiagram-ENE6RG2P-B8b2HOMr.js → pieDiagram-ENE6RG2P-J6aMzjsp.js} +3 -3
  97. package/dist/{quadrantDiagram-ABIIQ3AL-DM2brpjs.cjs → quadrantDiagram-ABIIQ3AL-B3io0Zj4.cjs} +1 -1
  98. package/dist/{quadrantDiagram-ABIIQ3AL-CAzEuvrn.js → quadrantDiagram-ABIIQ3AL-DZMEnLkj.js} +2 -2
  99. package/dist/{railroadDiagram-RFXS5EU6-D4qyeIm0.cjs → railroadDiagram-RFXS5EU6-CHPuNJfr.cjs} +1 -1
  100. package/dist/{railroadDiagram-RFXS5EU6-Dj5Hhb2C.js → railroadDiagram-RFXS5EU6-b6ccE5L3.js} +3 -3
  101. package/dist/{requirementDiagram-TGXJPOKE-DxMueY11.cjs → requirementDiagram-TGXJPOKE-4iI6cUK1.cjs} +1 -1
  102. package/dist/{requirementDiagram-TGXJPOKE-DCsyd9cl.js → requirementDiagram-TGXJPOKE-DyI3IxhA.js} +3 -3
  103. package/dist/{sankeyDiagram-HTMAVEWB-Djmdo0Ih.js → sankeyDiagram-HTMAVEWB-C4kn0m5M.js} +1 -1
  104. package/dist/{sankeyDiagram-HTMAVEWB-HPKhkyBx.cjs → sankeyDiagram-HTMAVEWB-Cu9APNc7.cjs} +1 -1
  105. package/dist/{sequenceDiagram-DBY2YBRQ-3XPFEpyb.cjs → sequenceDiagram-DBY2YBRQ-4nhGxKJK.cjs} +1 -1
  106. package/dist/{sequenceDiagram-DBY2YBRQ-BsELINW9.js → sequenceDiagram-DBY2YBRQ-Cw7yhFCq.js} +3 -3
  107. package/dist/{sizeCapture-X5ZJPWSS-CYMPBUJR.js → sizeCapture-X5ZJPWSS-B-QK7YKx.js} +1 -1
  108. package/dist/{sizeCapture-X5ZJPWSS-31abQGwa.cjs → sizeCapture-X5ZJPWSS-xbVXdoFv.cjs} +1 -1
  109. package/dist/{stateDiagram-2N3HPSRC-a3NuIfYf.js → stateDiagram-2N3HPSRC-Bzh1K0Rc.js} +2 -2
  110. package/dist/{stateDiagram-2N3HPSRC-B0XEIOiL.cjs → stateDiagram-2N3HPSRC-Ds2EuiOJ.cjs} +1 -1
  111. package/dist/{stateDiagram-v2-6OUMAXLB-DGoXPnAk.js → stateDiagram-v2-6OUMAXLB-BlfKLpe-.js} +2 -2
  112. package/dist/{stateDiagram-v2-6OUMAXLB-BwCXOhvG.cjs → stateDiagram-v2-6OUMAXLB-DRUVmXUz.cjs} +1 -1
  113. package/dist/styles/markdown.css +1 -1
  114. package/dist/styles/markdown.standalone.css +3 -0
  115. package/dist/{swimlanes-5IMT3BWC-BogVCjJZ.cjs → swimlanes-5IMT3BWC-BIWoRJar.cjs} +1 -1
  116. package/dist/{swimlanes-5IMT3BWC-261b0Snh.js → swimlanes-5IMT3BWC-DUDhAFXh.js} +3 -3
  117. package/dist/{swimlanesDiagram-G3AALYLV-B-HBl7xR.cjs → swimlanesDiagram-G3AALYLV-BKJ-xuX7.cjs} +1 -1
  118. package/dist/{swimlanesDiagram-G3AALYLV-0hHND0xf.js → swimlanesDiagram-G3AALYLV-Cw5EI2_0.js} +2 -2
  119. package/dist/{timeline-definition-FHXFAJF6-B_euDX4t.js → timeline-definition-FHXFAJF6-BFvyhmFu.js} +2 -2
  120. package/dist/{timeline-definition-FHXFAJF6-Cm4g61OO.cjs → timeline-definition-FHXFAJF6-BZUlhY1Z.cjs} +1 -1
  121. package/dist/{vennDiagram-L72KCM5P-BL65fZ2Z.js → vennDiagram-L72KCM5P-0cC3-YkU.js} +1 -1
  122. package/dist/{vennDiagram-L72KCM5P-DCLNzpM1.cjs → vennDiagram-L72KCM5P-CySpaALH.cjs} +1 -1
  123. package/dist/{wardleyDiagram-EHGQE667-yrrICYTB.cjs → wardleyDiagram-EHGQE667-CTzDdsPw.cjs} +1 -1
  124. package/dist/{wardleyDiagram-EHGQE667-BbdgmKNq.js → wardleyDiagram-EHGQE667-CttMnmMH.js} +2 -2
  125. package/dist/{xychartDiagram-FW5EYKEG-1YlGN0q3.cjs → xychartDiagram-FW5EYKEG-CDQbUs0H.cjs} +1 -1
  126. package/dist/{xychartDiagram-FW5EYKEG-D0ITIjet.js → xychartDiagram-FW5EYKEG-Dy4JEmdB.js} +2 -2
  127. package/package.json +14 -12
  128. package/dist/extractHeadings-AC80DPCv.cjs +0 -311
  129. package/dist/flowDiagram-23GEKE2U-gaIzKUxz.js +0 -7
  130. package/dist/flowDiagram-23GEKE2U-pAPxQFWB.cjs +0 -1
  131. package/dist/markdown.css +0 -1
@@ -0,0 +1,311 @@
1
+ "use strict";var cx=Object.create;var uh=Object.defineProperty;var dx=Object.getOwnPropertyDescriptor;var ux=Object.getOwnPropertyNames;var fx=Object.getPrototypeOf,gx=Object.prototype.hasOwnProperty;var px=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of ux(t))!gx.call(e,s)&&s!==r&&uh(e,s,{get:()=>t[s],enumerable:!(i=dx(t,s))||i.enumerable});return e};var mx=(e,t,r)=>(r=e!=null?cx(fx(e)):{},px(t||!e||!e.__esModule?uh(r,"default",{value:e,enumerable:!0}):r,e));const H=require("react"),Ae=require("./linkCards-Bjd_vW39.cjs"),_r=require("./providers-DO2t7ks4.cjs"),Fi=require("./viewer-settings.cjs"),St=require("html-react-parser"),ir=require("./embeds.cjs"),ro=require("./source-lines.cjs"),qa=require("./simple-logger-9yf7ypyB.cjs"),yx=require("shiki"),ci=require("dompurify"),xx=require("github-slugger"),Cx=require("katex"),ce=require("unist-util-visit"),Xn=(e,t)=>{const r={};for(const i of Object.keys(e)){const s=t?.[i];if(s===void 0){r[i]=e[i];continue}if(typeof s!="string")throw new TypeError(`[@aiquants/markdown] label "${i}" must be a string; got ${s===null?"null":typeof s}`);r[i]={text:s,lang:void 0}}return Object.freeze(r)},Gn=e=>{const t={};for(const r of Object.keys(e))t[r]=e[r].text;return Object.freeze(t)},Ro=Object.freeze({embeddedVideo:{text:"embedded video",lang:"en"},embeddedPost:{text:"embedded post",lang:"en"},embeddedFrame:{text:"Embedded content",lang:"en"}}),bx=Gn(Ro),hd=e=>Xn(Ro,e),kx=hd(void 0);function cd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _s={exports:{}},Ei={};var fh;function wx(){if(fh)return Ei;fh=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(i,s,o){var a=null;if(o!==void 0&&(a=""+o),s.key!==void 0&&(a=""+s.key),"key"in s){o={};for(var n in s)n!=="key"&&(o[n]=s[n])}else o=s;return s=o.ref,{$$typeof:e,type:i,key:a,ref:s!==void 0?s:null,props:o}}return Ei.Fragment=t,Ei.jsx=r,Ei.jsxs=r,Ei}var Mi={};var gh;function Sx(){return gh||(gh=1,process.env.NODE_ENV!=="production"&&(function(){function e(B){if(B==null)return null;if(typeof B=="function")return B.$$typeof===R?null:B.displayName||B.name||null;if(typeof B=="string")return B;switch(B){case y:return"Fragment";case C:return"Profiler";case x:return"StrictMode";case _:return"Suspense";case L:return"SuspenseList";case $:return"Activity"}if(typeof B=="object")switch(typeof B.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),B.$$typeof){case m:return"Portal";case v:return B.displayName||"Context";case k:return(B._context.displayName||"Context")+".Consumer";case S:var j=B.render;return B=B.displayName,B||(B=j.displayName||j.name||"",B=B!==""?"ForwardRef("+B+")":"ForwardRef"),B;case T:return j=B.displayName||null,j!==null?j:e(B.type)||"Memo";case z:j=B._payload,B=B._init;try{return e(B(j))}catch{}}return null}function t(B){return""+B}function r(B){try{t(B);var j=!1}catch{j=!0}if(j){j=console;var W=j.error,K=typeof Symbol=="function"&&Symbol.toStringTag&&B[Symbol.toStringTag]||B.constructor.name||"Object";return W.call(j,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",K),t(B)}}function i(B){if(B===y)return"<>";if(typeof B=="object"&&B!==null&&B.$$typeof===z)return"<...>";try{var j=e(B);return j?"<"+j+">":"<...>"}catch{return"<...>"}}function s(){var B=U.A;return B===null?null:B.getOwner()}function o(){return Error("react-stack-top-frame")}function a(B){if(X.call(B,"key")){var j=Object.getOwnPropertyDescriptor(B,"key").get;if(j&&j.isReactWarning)return!1}return B.key!==void 0}function n(B,j){function W(){M||(M=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",j))}W.isReactWarning=!0,Object.defineProperty(B,"key",{get:W,configurable:!0})}function l(){var B=e(this.type);return D[B]||(D[B]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),B=this.props.ref,B!==void 0?B:null}function c(B,j,W,K,Y,Z){var V=W.ref;return B={$$typeof:p,type:B,key:j,props:W,_owner:K},(V!==void 0?V:null)!==null?Object.defineProperty(B,"ref",{enumerable:!1,get:l}):Object.defineProperty(B,"ref",{enumerable:!1,value:null}),B._store={},Object.defineProperty(B._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(B,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(B,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Y}),Object.defineProperty(B,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Z}),Object.freeze&&(Object.freeze(B.props),Object.freeze(B)),B}function h(B,j,W,K,Y,Z){var V=j.children;if(V!==void 0)if(K)if(I(V)){for(K=0;K<V.length;K++)d(V[K]);Object.freeze&&Object.freeze(V)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else d(V);if(X.call(j,"key")){V=e(B);var rt=Object.keys(j).filter(function(ht){return ht!=="key"});K=0<rt.length?"{key: someKey, "+rt.join(": ..., ")+": ...}":"{key: someKey}",P[V+K]||(rt=0<rt.length?"{"+rt.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
2
+ let props = %s;
3
+ <%s {...props} />
4
+ React keys must be passed directly to JSX without using spread:
5
+ let props = %s;
6
+ <%s key={someKey} {...props} />`,K,V,rt,V),P[V+K]=!0)}if(V=null,W!==void 0&&(r(W),V=""+W),a(j)&&(r(j.key),V=""+j.key),"key"in j){W={};for(var ft in j)ft!=="key"&&(W[ft]=j[ft])}else W=j;return V&&n(W,typeof B=="function"?B.displayName||B.name||"Unknown":B),c(B,V,W,s(),Y,Z)}function d(B){f(B)?B._store&&(B._store.validated=1):typeof B=="object"&&B!==null&&B.$$typeof===z&&(B._payload.status==="fulfilled"?f(B._payload.value)&&B._payload.value._store&&(B._payload.value._store.validated=1):B._store&&(B._store.validated=1))}function f(B){return typeof B=="object"&&B!==null&&B.$$typeof===p}var u=H,p=Symbol.for("react.transitional.element"),m=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),k=Symbol.for("react.consumer"),v=Symbol.for("react.context"),S=Symbol.for("react.forward_ref"),_=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),z=Symbol.for("react.lazy"),$=Symbol.for("react.activity"),R=Symbol.for("react.client.reference"),U=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=Object.prototype.hasOwnProperty,I=Array.isArray,A=console.createTask?console.createTask:function(){return null};u={react_stack_bottom_frame:function(B){return B()}};var M,D={},O=u.react_stack_bottom_frame.bind(u,o)(),E=A(i(o)),P={};Mi.Fragment=y,Mi.jsx=function(B,j,W){var K=1e4>U.recentlyCreatedOwnerStacks++;return h(B,j,W,!1,K?Error("react-stack-top-frame"):O,K?A(i(B)):E)},Mi.jsxs=function(B,j,W){var K=1e4>U.recentlyCreatedOwnerStacks++;return h(B,j,W,!0,K?Error("react-stack-top-frame"):O,K?A(i(B)):E)}})()),Mi}var ph;function vx(){return ph||(ph=1,process.env.NODE_ENV==="production"?_s.exports=wx():_s.exports=Sx()),_s.exports}var w=vx();const mh=Object.freeze({display:"flex",flexDirection:"row",inlineSize:"100%",blockSize:"100%",minInlineSize:0,minBlockSize:0}),Tx=Object.freeze({flex:"1 1 0%",minInlineSize:0,minBlockSize:0,overflow:"clip"}),_x=Object.freeze({display:"flex",flex:"none",minBlockSize:0}),Bx=Object.freeze({position:"absolute",insetBlock:0,insetInline:0,overflowY:"scroll",visibility:"hidden",pointerEvents:"none"}),Lx=Object.freeze({scrollbarWidth:"none"}),Fx=.01,yh=Object.freeze({scroller:null,barInlineSize:0,nativeBarInlineSize:0,overlaysScrollbars:!1}),ca=e=>{const t=Number.parseFloat(e);return Number.isFinite(t)?t:0},Ex=(e,t,r)=>{const i=getComputedStyle(e),s=ca(i.width),o=e.getBoundingClientRect();if(s<=0||o.width<=0)return{barInlineSize:0,nativeBarInlineSize:0,overlaysScrollbars:!1};const a=o.width/s,n=(o.width-t.getBoundingClientRect().width)/a-ca(i.borderLeftWidth)-ca(i.borderRightWidth),l=Math.max(0,Math.ceil(n-Fx));return{barInlineSize:r.getBoundingClientRect().width/a,nativeBarInlineSize:l,overlaysScrollbars:l===0&&t.offsetWidth>0&&t.offsetWidth===t.clientWidth}},Mx=(e,t,r,i,s)=>{const[o,a]=H.useState(yh),n=H.useRef(s),l=H.useRef(0);return H.useLayoutEffect(()=>{n.current=s}),H.useLayoutEffect(()=>{const c=m=>{l.current!==m&&(l.current=m,n.current?.(m))},h=t.current,d=r.current,f=i.current;if(!e||h===null||d===null||f===null){a(yh),c(0);return}const u=()=>{const{barInlineSize:m,nativeBarInlineSize:y,overlaysScrollbars:x}=Ex(h,d,f);a(C=>C.scroller===h&&C.barInlineSize===m&&C.nativeBarInlineSize===y&&C.overlaysScrollbars===x?C:Object.freeze({scroller:h,barInlineSize:m,nativeBarInlineSize:y,overlaysScrollbars:x})),c(m)};u();const p=new ResizeObserver(u);return p.observe(h),p.observe(d),p.observe(f),window.addEventListener("resize",u),()=>{p.disconnect(),window.removeEventListener("resize",u)}},[e,t,r,i]),o},Ax=(e,t)=>{if(typeof e=="function"){const r=e(t);return typeof r=="function"?r:()=>e(null)}return e!=null?(e.current=t,()=>{e.current=null}):()=>{}};function dd({scrollerProps:e,scrollerRef:t,children:r,renderScrollBar:i,rowClassName:s,rowStyle:o,onBarInlineSizeChange:a}){const n=H.useRef(null),l=H.useRef(null),c=H.useRef(null),h=i!==void 0,d=Mx(h,n,l,c,a),f=H.useCallback(m=>{n.current=m;const y=Ax(t,m);return()=>{n.current=null,y()}},[t]),u=h?{...e.style,position:"relative",boxSizing:"border-box",overflowY:"scroll",width:`calc(100% + ${d.nativeBarInlineSize}px)`,...d.overlaysScrollbars?Lx:void 0}:e.style,p=w.jsxs("div",{...e,ref:f,style:u,children:[r,h&&w.jsx("span",{ref:l,"data-aqmd-scroll-bar-probe":!0,"aria-hidden":"true",style:Bx})]});return h?w.jsxs("div",{"data-aqmd-scroll-row":!0,className:s,style:o===void 0?mh:{...mh,...o},children:[w.jsx("div",{"data-aqmd-scroll-clip":!0,style:Tx,children:p}),w.jsx("div",{ref:c,"data-aqmd-scroll-bar":!0,style:_x,children:d.scroller!==null&&i(d.scroller)})]}):p}const $x=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ox=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,i)=>i?i.toUpperCase():r.toLowerCase()),xh=e=>{const t=Ox(e);return t.charAt(0).toUpperCase()+t.slice(1)},ud=(...e)=>e.filter((t,r,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===r).join(" ").trim(),Ix=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var Rx={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Px=H.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:i,className:s="",children:o,iconNode:a,...n},l)=>H.createElement("svg",{ref:l,...Rx,width:t,height:t,stroke:e,strokeWidth:i?Number(r)*24/Number(t):r,className:ud("lucide",s),...!o&&!Ix(n)&&{"aria-hidden":"true"},...n},[...a.map(([c,h])=>H.createElement(c,h)),...Array.isArray(o)?o:[o]]));const zt=(e,t)=>{const r=H.forwardRef(({className:i,...s},o)=>H.createElement(Px,{ref:o,iconNode:t,className:ud(`lucide-${$x(xh(e))}`,`lucide-${e}`,i),...s}));return r.displayName=xh(e),r};const Dx=[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M10.41 10.41a2 2 0 1 1-2.83-2.83",key:"1bzlo9"}],["line",{x1:"13.5",x2:"6",y1:"13.5",y2:"21",key:"1q0aeu"}],["line",{x1:"18",x2:"21",y1:"12",y2:"15",key:"5mozeu"}],["path",{d:"M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59",key:"mmje98"}],["path",{d:"M21 15V5a2 2 0 0 0-2-2H9",key:"43el77"}]],Nx=zt("image-off",Dx);const qx=[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]],zx=zt("building-2",qx);const Wx=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],Ch=zt("globe",Wx),jx=/^[a-z]{2,3}$/u,Hx=e=>{const t=e.trim().split("-",1)[0]?.toLowerCase()??"";return jx.test(t)?t:null},Yx=()=>()=>{},Ux=e=>{const t=new MutationObserver(e);return t.observe(document.documentElement,{attributes:!0,attributeFilter:["lang"]}),()=>t.disconnect()},Vn=()=>H.useSyncExternalStore(Yx,()=>window.location.origin,()=>null),Xx=()=>H.useSyncExternalStore(Ux,()=>Hx(document.documentElement.lang),()=>null),Gx=/^[1-9]\d{0,4}$/u,bh=e=>e!==void 0&&Gx.test(e.trim())?Number(e.trim()):null,Vx=({embed:e,label:t,insideAnchor:r,children:i})=>{const s=Vn(),o=new URL(e.src);if(s!==null&&o.origin!==s&&!r)return i;const a=bh(e.attributes.width),n=bh(e.attributes.height),l=a!==null&&n!==null?{width:"100%",maxWidth:`${a}px`,aspectRatio:`${a} / ${n}`}:void 0,c=e.attributes.title,h=c===void 0?t.lang:void 0;return w.jsx("span",{"data-embed-frame":s===null?"pending":"refused","data-aqmd-embed-surface":l===void 0?void 0:"",style:l,className:l===void 0?void 0:"flex items-center justify-center rounded-lg p-2 text-center",children:r?w.jsx("span",{lang:h,children:`${c??t.text}: ${o.hostname}`}):w.jsx("a",{href:o.href,target:"_blank",rel:"noreferrer",lang:h,children:c??`${t.text}: ${o.hostname}`})})},fd=({concurrency:e,capacity:t,timeoutMs:r})=>{for(const[h,d]of Object.entries({concurrency:e,capacity:t,timeoutMs:r}))if(!Number.isInteger(d)||d<=0)throw new RangeError(`[@aiquants/markdown] request queue ${h} must be a positive integer; got ${String(d)}`);const i=new Map,s=new Map,o=[];let a=0;const n=(h,d,f)=>{if(s.get(h)===d&&(s.delete(h),f!==null)){i.set(h,f);for(const u of i.keys()){if(i.size<=t)break;i.delete(u)}for(const u of d.subscriptions)u.listener(f)}},l=()=>{for(;a<e;){const h=o.shift();if(h===void 0)return;const d=s.get(h);if(d===void 0)continue;const f=new AbortController;d.controller=f,a+=1,new Promise(u=>u(d.start(AbortSignal.any([f.signal,AbortSignal.timeout(r)])))).then(u=>n(h,d,{ok:!0,value:u}),()=>n(h,d,f.signal.aborted?null:{ok:!1})).finally(()=>{a-=1,l()})}};return Object.freeze({subscribe:(h,d,f)=>{const u=i.get(h);if(u!==void 0)return i.delete(h),i.set(h,u),f(u),()=>{};let p=s.get(h);p===void 0&&(p={start:d,subscriptions:new Set,controller:null},s.set(h,p),o.push(h));const m=p,y={listener:f};return m.subscriptions.add(y),l(),()=>{m.subscriptions.delete(y),!(m.subscriptions.size>0||s.get(h)!==m)&&(s.delete(h),m.controller===null?o.splice(o.indexOf(h),1):m.controller.abort())}}})},Zx=fd({concurrency:2,capacity:256,timeoutMs:15e3}),Kx="[data-aqmd-scroll-container]",Qx=async(e,t)=>{let r;try{r=await fetch(e,{credentials:"same-origin",redirect:"error",headers:{accept:"application/json"},signal:t})}catch(o){if(t.aborted)throw o;return{kind:"error",cause:"network error"}}if(r.status===204){const o=Ae.linkCardSkipReasonOf(r.headers.get(Ae.LINK_CARD_SKIP_HEADER));return o===null?{kind:"error",cause:"HTTP 204 without a known skip reason"}:{kind:"skip",reason:o}}if(!r.ok)return{kind:"error",cause:`HTTP ${r.status}`};let i;try{i=await r.json()}catch(o){if(t.aborted)throw o;return{kind:"error",cause:`HTTP ${r.status}, not JSON`}}const s=Ae.linkCardMetadataOf(i);return s===null?{kind:"error",cause:`HTTP ${r.status}, not a JSON object`}:{kind:"card",metadata:s}},Jx=e=>e.ok?e.value.kind==="card"?null:e.value.kind==="skip"?e.value.reason:e.value.cause:"network error",kh=(e,t)=>e!==null&&new URL(e).hostname!==t?e:null,da=({tile:e,tileKind:t,primary:r,secondary:i})=>w.jsxs("span",{className:"flex min-w-0 flex-auto items-center gap-3 px-3",children:[w.jsx("span",{"aria-hidden":"true","data-link-card-icon":t,className:`flex size-8 shrink-0 items-center justify-center rounded-md bg-(--aqmd-link-card-bg-hover) text-(--aqmd-link-card-muted) ${t==="pending"?"motion-safe:animate-pulse":""}`,children:e}),w.jsxs("span",{className:"flex min-w-0 flex-col gap-0.5",children:[w.jsx("span",{className:"truncate font-semibold text-[0.875rem] leading-5",children:r}),w.jsx("span",{className:"truncate text-(--aqmd-link-card-muted) text-xs leading-4",children:i})]})]}),tC=({href:e,endpoint:t,size:r,fallback:i})=>{const s=Vn(),o=H.useRef(null),a=new URL(e),n=`${t}
7
+ ${a.href}`,[l,c]=H.useState(null);H.useEffect(()=>{const x=o.current;if(x===null||s===null)return;let C=null;const k=new IntersectionObserver(v=>{C!==null||!v.some(S=>S.isIntersecting)||(k.disconnect(),C=Zx.subscribe(n,S=>Qx(Ae.linkCardRequestOf(t,new URL(e),s),S),S=>{c({key:n,outcome:S});const _=Jx(S);_!==null&&qa.linkCardLogger.info(`No link card for ${e} (${_})`)}))},{root:x.closest(Kx),rootMargin:"100% 0px"});return k.observe(x),()=>{k.disconnect(),C?.()}},[n,t,e,s]);const h=l!==null&&l.key===n?l.outcome:null;if(h!==null&&!h.ok)return i;const d=h===null?null:h.value;if(d!==null&&d.kind==="error")return i;if(d===null||s===null)return w.jsx("a",{ref:o,href:e,target:"_blank",rel:"noreferrer","aria-busy":"true","data-link-card":"pending","data-link-card-size":r,children:r==="compact"?w.jsx(da,{tile:null,tileKind:"pending",primary:a.hostname,secondary:e}):w.jsxs("span",{className:"flex min-w-0 flex-1 flex-col justify-center gap-2 px-4 py-3.5",children:[w.jsx("span",{"aria-hidden":"true",className:"block h-3.5 w-2/3 rounded bg-(--aqmd-link-card-border) motion-safe:animate-pulse"}),w.jsx("span",{className:"truncate text-(--aqmd-link-card-muted) text-[0.8125rem] leading-[1.125rem]",children:a.hostname}),w.jsx("span",{className:"truncate text-(--aqmd-link-card-muted) text-xs leading-4",children:e})]})});if(d.kind==="skip"){const{reason:x}=d,C=x==="private-network",k=C?zx:Ch;return w.jsx("a",{ref:o,href:e,target:"_blank",rel:"noreferrer","data-link-card":"compact","data-link-card-reason":x,"data-link-card-size":"compact",children:w.jsx(da,{tile:w.jsx(k,{"aria-hidden":"true",className:"size-4"}),tileKind:C?"internal":"link",primary:a.hostname,secondary:e})})}const{metadata:f}=d,u=new URL(s).hostname,p=kh(f.image,u),m=kh(f.icon,u),y=f.siteName===null?a.hostname:`${f.siteName} · ${a.hostname}`;return r==="compact"?w.jsx("a",{ref:o,href:e,target:"_blank",rel:"noreferrer","data-link-card":"ready","data-link-card-size":"compact",children:w.jsx(da,{tile:m===null?w.jsx(Ch,{"aria-hidden":"true",className:"size-4"}):w.jsx("img",{src:m,alt:"",width:16,height:16,loading:"lazy",referrerPolicy:"no-referrer",className:"size-4 rounded-[3px]"}),tileKind:m===null?"link":"favicon",primary:f.title??e,secondary:y})}):w.jsxs("a",{ref:o,href:e,target:"_blank",rel:"noreferrer","data-link-card":"ready","data-link-card-size":r,children:[w.jsxs("span",{className:"flex min-w-0 flex-1 flex-col justify-center gap-1 px-4 py-3.5",children:[w.jsx("span",{className:"wrap-anywhere line-clamp-2 font-semibold text-[0.9375rem] leading-5",children:f.title??e}),f.description===null?null:w.jsx("span",{className:`wrap-anywhere text-(--aqmd-link-card-muted) text-[0.8125rem] leading-[1.125rem] ${r==="banner"?"line-clamp-1":"line-clamp-2"}`,children:f.description}),w.jsxs("span",{className:"mt-1 flex items-center gap-1.5 text-(--aqmd-link-card-muted) text-xs leading-4",children:[m===null?null:w.jsx("img",{src:m,alt:"",width:16,height:16,loading:"lazy",referrerPolicy:"no-referrer",className:"size-4 shrink-0 rounded-[3px]"}),w.jsx("span",{className:"truncate",children:y})]})]}),p===null?null:w.jsx("img",{src:p,alt:"",loading:"lazy",referrerPolicy:"no-referrer"})]})},gd=e=>{if(!Array.isArray(e.providers))throw new RangeError(`[@aiquants/markdown] embeds.providers must be an array of provider ids; got ${typeof e.providers}`);for(const t of e.providers)if(!_r.isEmbedProviderId(t))throw new RangeError(`[@aiquants/markdown] embeds.providers holds an unknown provider id ${JSON.stringify(t)}; known ids are ${_r.EMBED_PROVIDER_IDS.join(", ")}`);if(e.linkCardEndpoint!==null&&!Ae.isLinkCardEndpoint(e.linkCardEndpoint))throw new RangeError(`[@aiquants/markdown] embeds.linkCardEndpoint must be null or an absolute path without a trailing "/" (segments of A-Z a-z 0-9 . _ ~ -, no "." or ".."); got ${JSON.stringify(e.linkCardEndpoint)}`);if(e.linkCardSize!==void 0&&!Ae.isLinkCardSize(e.linkCardSize))throw new RangeError(`[@aiquants/markdown] embeds.linkCardSize must be omitted or one of ${Ae.LINK_CARD_SIZES.join(", ")}; got ${JSON.stringify(e.linkCardSize)}`);return e},qi=new WeakMap;let Bs=0;const wh=e=>{if(e.source===null)return;const t=qi.get(e.source);if(t===void 0||e.origin!==t.watch.origin)return;const r=t.watch.heightOf(e.data,t.watch.src);if(r===null||!Number.isFinite(r))return;const i=Math.min(_r.EMBED_FRAME_HEIGHT_LIMITS.max,Math.max(_r.EMBED_FRAME_HEIGHT_LIMITS.min,Math.ceil(r)));i!==t.last&&(t.last=i,t.watch.set(i))},eC=(e,t)=>{const r={watch:t,last:null};return qi.has(e)||(Bs+=1,Bs===1&&window.addEventListener("message",wh)),qi.set(e,r),()=>{qi.get(e)===r&&(qi.delete(e),Bs-=1,Bs===0&&window.removeEventListener("message",wh))}},rC=fd({concurrency:2,capacity:256,timeoutMs:5e3}),iC=async(e,t)=>{const r=await fetch(e,{credentials:"omit",redirect:"error",referrerPolicy:"no-referrer",headers:{accept:"application/json"},signal:t});if(!r.ok)throw new Error(`[@aiquants/markdown] embed lookup answered ${r.status}`);return await r.json()},sC=(e,t)=>{const r=e.maxWidth===null?void 0:`${e.maxWidth}px`;switch(e.kind){case"aspect":return{width:"100%",maxWidth:r,aspectRatio:`${e.ratio[0]} / ${e.ratio[1]}`};case"fixed":return{width:"100%",maxWidth:r,height:`${e.height}px`};case"message":return{width:"100%",maxWidth:r,height:`${t??e.initialHeight}px`}}},oC=Object.freeze({marginInline:0}),ua=Object.freeze({kind:"pending"}),aC=Object.freeze({kind:"narrow"}),nC=Object.freeze({kind:"fallback"}),lC=(e,t,r,i,s)=>{if(t===null)return ua;let o;if(e.kind==="frame")o=e.srcOf(r);else{if(i===null)return ua;o=i.ok?e.srcOf(i.value,r):null}if(o===null||new URL(o).origin===t)return nC;const{minWidth:a,maxWidth:n}=e.layout;if(a!==null){if(s===null)return ua;if(Math.min(s,n??Number.POSITIVE_INFINITY)<a)return aC}return{kind:"frame",src:o}},hC=({resolution:e,caption:t,fallback:r,theme:i,labels:s})=>{const o=Vn(),a=Xx(),[n,l]=H.useState(null),[c,h]=H.useState(null),d=e.kind==="lookup"?e.request.href:null,[f,u]=H.useState(null);H.useEffect(()=>{if(d!==null)return rC.subscribe(d,T=>iC(new URL(d),T),T=>u({key:d,outcome:T}))},[d]);const{provider:p,layout:m}=e,y=lC(e,o,{theme:i,lang:a},f!==null&&f.key===d?f.outcome:null,n),x=H.useCallback(T=>{if(T===null)return;l(T.getBoundingClientRect().width);const z=new ResizeObserver(()=>l(T.getBoundingClientRect().width));return z.observe(T),()=>z.disconnect()},[]),C=y.kind==="frame"?y.src:null,k=c!==null&&c.src===C?c.height:null,v=H.useCallback(T=>{if(!(T===null||T.contentWindow===null||m.kind!=="message"||C===null))return eC(T.contentWindow,{origin:p.frameOrigin,src:C,heightOf:m.heightOf,set:z=>h({src:C,height:z})})},[m,p.frameOrigin,C]);if(y.kind==="fallback")return r;const S=m.minWidth===null?null:w.jsx("span",{ref:x,"aria-hidden":"true","data-embed-measure":p.id,className:"block h-0"});if(y.kind==="narrow")return w.jsxs(w.Fragment,{children:[S,r]});const _=p.content==="video"?s.embeddedVideo:s.embeddedPost,{frame:L}=p;return w.jsxs(w.Fragment,{children:[S,w.jsxs("figure",{"data-embed-provider":p.id,"data-embed-state":y.kind,style:oC,children:[w.jsx("div",{"data-embed-box":"","data-aqmd-embed-surface":"",style:sC(m,k),className:"noscript:hidden overflow-hidden rounded-lg",children:y.kind==="frame"?w.jsx("iframe",{ref:v,src:y.src,title:`${p.name}: ${_.text}`,lang:_.lang,loading:"lazy",allow:L.allow??void 0,allowFullScreen:L.allowFullScreen,sandbox:L.sandbox,referrerPolicy:L.referrerPolicy,scrolling:L.scrolling??void 0,className:"block h-full w-full border-0"},y.src):null}),w.jsx("figcaption",{className:"mt-2",children:t})]})]})},cC=["title","width","height","allow","allowfullscreen","sandbox","referrerpolicy","loading","frameborder","scrolling"],dC=(e,t)=>ir.allowedFrameUrlOf(e,t)!==null,uC=(e,t)=>{const r=new Map(Object.entries(e).map(([o,a])=>[o.toLowerCase(),a])),i=ir.allowedFrameUrlOf(r.get("src"),t);if(i===null)return null;const s={};for(const o of cC){const a=r.get(o);if(a!==void 0)if(o==="allow"){const n=ir.reduceFrameFeatures(a);n!==null&&(s.allow=n)}else if(o==="referrerpolicy"){const n=a.trim().toLowerCase();ir.EMBED_FRAME_REFERRER_POLICIES.has(n)&&(s.referrerpolicy=n)}else s[o]=a}return Object.freeze({src:i.href,attributes:Object.freeze(s)})},fC=new Set(["script","style","template","noscript","noembed","noframes","plaintext","xmp","title","head","meta","link","base","object","embed","applet","param","frame","frameset","select","datalist","track","math","foreignobject"]),gC=new Set(["id","class","title","lang","dir","role","hidden","translate","style"]),pC=new Set(["markdown-alert","markdown-alert-title","markdown-alert-note","markdown-alert-tip","markdown-alert-important","markdown-alert-warning","markdown-alert-caution","octicon","octicon-info","octicon-light-bulb","octicon-report","octicon-alert","octicon-stop","mr-2","message","message-symbol","message-content","alert","info","warning","markdown-details","markdown-details-content","footnotes","footnote-ref","footnote-backref","math","inline","display"]),Sh="language-",mC=/[\t\n\f\r ]+/u,yC=new Set(["h1","h2","h3","h4","h5","h6"]),vh=Object.freeze({sup:/^fnref\d*:\d+$/u,li:/^fn:\d+$/u}),Th="user-content-",Yt=["align"],Nr=["width","height"],_h=["colspan","rowspan","headers","scope","abbr","align","valign","width","height"],fa=Object.freeze({a:["href","name","hreflang","data-link-kind","data-doc-path","data-doc-exists","data-footnote-ref","data-footnote-backref"],abbr:[],address:[],article:[],aside:[],audio:["src","controls","loop","muted","preload"],b:[],bdi:[],bdo:[],blockquote:["cite"],br:[],caption:Yt,cite:[],code:[],col:["span",...Yt,...Nr],colgroup:["span",...Yt,...Nr],dd:[],del:["cite","datetime"],details:["open"],dfn:[],div:Yt,dl:[],dt:[],em:[],figcaption:[],figure:[],footer:[],h1:Yt,h2:Yt,h3:Yt,h4:Yt,h5:Yt,h6:Yt,header:[],hgroup:[],hr:[],i:[],img:["src","alt","loading","decoding",...Yt,...Nr,"data-asset-src","data-asset-exists"],ins:["cite","datetime"],kbd:[],li:["value"],main:[],mark:[],nav:[],ol:["start","reversed","type"],p:Yt,pre:[],q:["cite"],rp:[],rt:[],ruby:[],s:[],samp:[],section:["data-footnotes"],small:[],source:["src","type"],span:[],strong:[],sub:[],summary:[],sup:[],table:[...Yt,"border",...Nr],tbody:[...Yt,"valign"],td:_h,tfoot:[...Yt,"valign"],th:_h,thead:[...Yt,"valign"],time:["datetime"],tr:[...Yt,"valign"],u:[],ul:[],var:[],video:["src","poster","controls","loop","muted","playsinline","preload",...Nr],wbr:[]}),ga=Object.freeze({svg:["viewbox","version","xmlns","focusable","fill",...Nr],g:["fill","fill-rule","clip-rule"],path:["d","fill","fill-rule","clip-rule"]}),xC=new Set(["svg","g"]),CC=new Set(["href","src","cite","poster",ir.EMBED_LINK_ATTRIBUTE]),bC=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/gu,kC=/^(?:(?:https?|mailto|tel):|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))/iu,wC=new Set(["left","right","center","justify","start","end"]),gs=e=>kC.test(e.replace(bC,"")),SC=e=>{let t=null;for(const r of e.split(";")){const i=r.indexOf(":");if(i<0||r.slice(0,i).trim().toLowerCase()!=="text-align")continue;const s=r.slice(i+1).trim().toLowerCase();wC.has(s)&&(t=s)}return t===null?null:`text-align: ${t}`},vC=e=>{const t=e.split(mC).filter(r=>pC.has(r)||r.startsWith(Sh)&&r.length>Sh.length);return t.length===0?null:t.join(" ")},TC=(e,t)=>yC.has(e)||t.startsWith(Th)&&t.length>Th.length||Object.hasOwn(vh,e)&&vh[e].test(t),_C=e=>{const t=new Map;for(const[r,i]of Object.entries(e)){const s=r.toLowerCase();t.has(s)||t.set(s,i)}return t},Ai=(e,t,r)=>{const i={};for(const[s,o]of t){if(s===ro.SOURCE_LINES_ATTRIBUTE){ro.parseSourceLines(o)!==null&&(i[s]=o);continue}if((gC.has(s)||r.includes(s)||s.startsWith("aria-")&&s.length>5)&&!(CC.has(s)&&!gs(o))&&!(s==="fill"&&/url\s*\(/iu.test(o))&&!(s==="id"&&!TC(e,o))){if(s==="class"||s==="style"){const a=s==="class"?vC(o):SC(o);a!==null&&(i[s]=a);continue}i[s]=o}}return i},BC=e=>e.get("type")?.trim().toLowerCase()==="checkbox"&&e.has("disabled"),Zn=(e,t,r)=>{const i=e.toLowerCase(),s=r.parentName===null?null:r.parentName.toLowerCase(),o=_C(t);if(s!==null&&xC.has(s)){const n=i!=="svg"&&Object.hasOwn(ga,i)?ga[i]:void 0;return n===void 0?{action:"remove"}:{action:"keep",attributes:Ai(i,o,n)}}if(i==="svg")return{action:"keep",attributes:Ai(i,o,ga.svg)};if(i==="iframe"){const n=uC(Object.fromEntries(o),r.iFrameAllowedDomains);return n===null?{action:"remove"}:{action:"embed",embed:n,pluginType:o.get("data-plugin-type")??null}}if(i==="p"){const n=Ai(i,o,fa.p),l=o.get(ir.EMBED_LINK_ATTRIBUTE);return l!==void 0&&gs(l)?{action:"placeholder",attributes:n,link:l}:{action:"keep",attributes:n}}if(i==="input")return BC(o)?{action:"keep",attributes:Ai(i,o,["type","checked","disabled"])}:{action:"remove"};if(fC.has(i))return{action:"remove"};const a=Object.hasOwn(fa,i)?fa[i]:void 0;return a===void 0?{action:"unwrap"}:{action:"keep",attributes:Ai(i,o,a)}};typeof window<"u"&&(window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),typeof window.CustomEvent!="function"&&(window.CustomEvent=function(t,r){r=r||{bubbles:!1,cancelable:!1,detail:null};var i=document.createEvent("CustomEvent");return i.initCustomEvent(t,r.bubbles,r.cancelable,r.detail),i}));const LC=typeof document<"u"&&!!document.documentMode;let pa;function FC(){return pa||(pa=document.createElement("div").style)}const Bh=["webkit","moz","ms"],Ls={};function Kn(e){if(Ls[e])return Ls[e];const t=FC();if(e in t)return Ls[e]=e;const r=e[0].toUpperCase()+e.slice(1);let i=Bh.length;for(;i--;){const s=`${Bh[i]}${r}`;if(s in t)return Ls[e]=s}}function Fs(e,t){return parseFloat(t[Kn(e)])||0}function Es(e,t,r=window.getComputedStyle(e)){const i=t==="border"?"Width":"";return{left:Fs(`${t}Left${i}`,r),right:Fs(`${t}Right${i}`,r),top:Fs(`${t}Top${i}`,r),bottom:Fs(`${t}Bottom${i}`,r)}}function Hr(e,t,r){e.style[Kn(t)]=r}function EC(e,t){const r=Kn("transform");Hr(e,"transition",`${r} ${t.duration}ms ${t.easing}`)}function MC(e,{x:t,y:r,scale:i,isSVG:s},o){if(Hr(e,"transform",`scale(${i}) translate(${t}px, ${r}px)`),s&&LC){const a=window.getComputedStyle(e).getPropertyValue("transform");e.setAttribute("transform",a)}}function ma(e){let t=e.parentNode;(!t||t.nodeType!==1)&&(t=document.documentElement);const r=window.getComputedStyle(e),i=window.getComputedStyle(t),s=e.getBoundingClientRect(),o=t.getBoundingClientRect();return{elem:{style:r,width:s.width,height:s.height,top:s.top,bottom:s.bottom,left:s.left,right:s.right,margin:Es(e,"margin",r),border:Es(e,"border",r)},parent:{style:i,width:o.width,height:o.height,top:o.top,bottom:o.bottom,left:o.left,right:o.right,padding:Es(t,"padding",i),border:Es(t,"border",i)}}}let rs={down:"mousedown",move:"mousemove",up:"mouseup mouseleave"};typeof window<"u"&&(typeof window.PointerEvent=="function"?rs={down:"pointerdown",move:"pointermove",up:"pointerup pointerleave pointercancel"}:typeof window.TouchEvent=="function"&&(rs={down:"touchstart",move:"touchmove",up:"touchend touchcancel"}));function ya(e,t,r,i){rs[e].split(" ").forEach(s=>{t.addEventListener(s,r,i)})}function xa(e,t,r){rs[e].split(" ").forEach(i=>{t.removeEventListener(i,r)})}function pd(e,t){let r=e.length;for(;r--;)if(e[r].pointerId===t.pointerId)return r;return-1}function za(e,t){let r;if(t.touches){r=0;for(const i of t.touches)i.pointerId=r++,za(e,i);return}r=pd(e,t),r>-1&&e.splice(r,1),e.push(t)}function AC(e,t){if(t.touches){for(;e.length;)e.pop();return}const r=pd(e,t);r>-1&&e.splice(r,1)}function Lh(e){e=e.slice(0);let t=e.pop(),r;for(;r=e.pop();)t={clientX:(r.clientX-t.clientX)/2+t.clientX,clientY:(r.clientY-t.clientY)/2+t.clientY};return t}function Ca(e){if(e.length<2)return 0;const t=e[0],r=e[1];return Math.sqrt(Math.pow(Math.abs(r.clientX-t.clientX),2)+Math.pow(Math.abs(r.clientY-t.clientY),2))}function $C(e){let t=e;for(;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1}function OC(e){return(e.getAttribute("class")||"").trim()}function IC(e,t){return e.nodeType===1&&` ${OC(e)} `.indexOf(` ${t} `)>-1}function RC(e,t){for(let r=e;r!=null;r=r.parentNode)if(IC(r,t.excludeClass)||t.exclude.indexOf(r)>-1)return!0;return!1}const PC=/^http:[\w\.\/]+svg$/;function DC(e){return PC.test(e.namespaceURI)&&e.nodeName.toLowerCase()!=="svg"}function NC(e){const t={};for(const r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t}const md={animate:!1,canvas:!1,cursor:"move",disablePan:!1,disableZoom:!1,disableXAxis:!1,disableYAxis:!1,duration:200,easing:"ease-in-out",exclude:[],excludeClass:"panzoom-exclude",handleStartEvent:e=>{e.preventDefault(),e.stopPropagation()},maxScale:4,minScale:.125,overflow:"hidden",panOnlyWhenZoomed:!1,pinchAndPan:!1,relative:!1,setTransform:MC,startX:0,startY:0,startScale:1,step:.3,touchAction:"none"};function yd(e,t){if(!e)throw new Error("Panzoom requires an element as an argument");if(e.nodeType!==1)throw new Error("Panzoom requires an element with a nodeType of 1");if(!$C(e))throw new Error("Panzoom should be called on elements that have been attached to the DOM");t={...md,...t};const r=DC(e),i=e.parentNode;i.style.overflow=t.overflow,i.style.userSelect="none",i.style.touchAction=t.touchAction,(t.canvas?i:e).style.cursor=t.cursor,e.style.userSelect="none",e.style.touchAction=t.touchAction,Hr(e,"transformOrigin",typeof t.origin=="string"?t.origin:r?"0 0":"50% 50%");function s(){i.style.overflow="",i.style.userSelect="",i.style.touchAction="",i.style.cursor="",e.style.cursor="",e.style.userSelect="",e.style.touchAction="",Hr(e,"transformOrigin","")}function o(E={}){for(const P in E)E.hasOwnProperty(P)&&(t[P]=E[P]);(E.hasOwnProperty("cursor")||E.hasOwnProperty("canvas"))&&(i.style.cursor=e.style.cursor="",(t.canvas?i:e).style.cursor=t.cursor),E.hasOwnProperty("overflow")&&(i.style.overflow=E.overflow),E.hasOwnProperty("touchAction")&&(i.style.touchAction=E.touchAction,e.style.touchAction=E.touchAction)}let a=0,n=0,l=1,c=!1;m(t.startScale,{animate:!1,force:!0}),setTimeout(()=>{p(t.startX,t.startY,{animate:!1,force:!0})});function h(E,P,B){if(B.silent)return;const j=new CustomEvent(E,{detail:P});e.dispatchEvent(j)}function d(E,P,B){const j={x:a,y:n,scale:l,isSVG:r,originalEvent:B};return requestAnimationFrame(()=>{typeof P.animate=="boolean"&&(P.animate?EC(e,P):Hr(e,"transition","none")),P.setTransform(e,j,P),h(E,j,P),h("panzoomchange",j,P)}),j}function f(E,P,B,j){const W={...t,...j},K={x:a,y:n,opts:W};if(!j?.force&&(W.disablePan||W.panOnlyWhenZoomed&&l===W.startScale))return K;if(E=parseFloat(E),P=parseFloat(P),W.disableXAxis||(K.x=(W.relative?a:0)+E),W.disableYAxis||(K.y=(W.relative?n:0)+P),W.contain){const Y=ma(e),Z=Y.elem.width/l,V=Y.elem.height/l,rt=Z*B,ft=V*B,ht=(rt-Z)/2,mt=(ft-V)/2;if(W.contain==="inside"){const $t=(-Y.elem.margin.left-Y.parent.padding.left+ht)/B,Wt=(Y.parent.width-rt-Y.parent.padding.left-Y.elem.margin.left-Y.parent.border.left-Y.parent.border.right+ht)/B;K.x=Math.max(Math.min(K.x,Wt),$t);const Lt=(-Y.elem.margin.top-Y.parent.padding.top+mt)/B,Ot=(Y.parent.height-ft-Y.parent.padding.top-Y.elem.margin.top-Y.parent.border.top-Y.parent.border.bottom+mt)/B;K.y=Math.max(Math.min(K.y,Ot),Lt)}else if(W.contain==="outside"){const $t=(-(rt-Y.parent.width)-Y.parent.padding.left-Y.parent.border.left-Y.parent.border.right+ht)/B,Wt=(ht-Y.parent.padding.left)/B;K.x=Math.max(Math.min(K.x,Wt),$t);const Lt=(-(ft-Y.parent.height)-Y.parent.padding.top-Y.parent.border.top-Y.parent.border.bottom+mt)/B,Ot=(mt-Y.parent.padding.top)/B;K.y=Math.max(Math.min(K.y,Ot),Lt)}}return W.roundPixels&&(K.x=Math.round(K.x),K.y=Math.round(K.y)),K}function u(E,P){const B={...t,...P},j={scale:l,opts:B};if(!P?.force&&B.disableZoom)return j;let W=t.minScale,K=t.maxScale;if(B.contain){const Y=ma(e),Z=Y.elem.width/l,V=Y.elem.height/l;if(Z>1&&V>1){const rt=Y.parent.width-Y.parent.border.left-Y.parent.border.right,ft=Y.parent.height-Y.parent.border.top-Y.parent.border.bottom,ht=rt/Z,mt=ft/V;t.contain==="inside"?K=Math.min(K,ht,mt):t.contain==="outside"&&(W=Math.max(W,ht,mt))}}return j.scale=Math.min(Math.max(E,W),K),j}function p(E,P,B,j){const W=f(E,P,l,B);return a!==W.x||n!==W.y?(a=W.x,n=W.y,d("panzoompan",W.opts,j)):{x:a,y:n,scale:l,isSVG:r,originalEvent:j}}function m(E,P,B){const j=u(E,P),W=j.opts;if(!P?.force&&W.disableZoom)return;E=j.scale;let K=a,Y=n;if(W.focal){const V=W.focal;K=(V.x/E-V.x/l+a*E)/E,Y=(V.y/E-V.y/l+n*E)/E}const Z=f(K,Y,E,{relative:!1,force:!0});return a=Z.x,n=Z.y,l=E,d("panzoomzoom",W,B)}function y(E,P){const B={...t,animate:!0,...P};return m(l*Math.exp((E?1:-1)*B.step),B)}function x(E){return y(!0,E)}function C(E){return y(!1,E)}function k(E,P,B,j){const W=ma(e),K={width:W.parent.width-W.parent.padding.left-W.parent.padding.right-W.parent.border.left-W.parent.border.right,height:W.parent.height-W.parent.padding.top-W.parent.padding.bottom-W.parent.border.top-W.parent.border.bottom};let Y=P.clientX-W.parent.left-W.parent.padding.left-W.parent.border.left-W.elem.margin.left,Z=P.clientY-W.parent.top-W.parent.padding.top-W.parent.border.top-W.elem.margin.top;r||(Y-=W.elem.width/l/2,Z-=W.elem.height/l/2);const V={x:Y/K.width*(K.width*E),y:Z/K.height*(K.height*E)};return m(E,{...B,animate:!1,focal:V},j)}function v(E,P){E.preventDefault();const B={...t,...P,animate:!1},W=(E.deltaY===0&&E.deltaX?E.deltaX:E.deltaY)<0?1:-1,K=u(l*Math.exp(W*B.step/3),B).scale;return k(K,E,B,E)}function S(E){const P={...t,animate:!0,force:!0,...E};l=u(P.startScale,P).scale;const B=f(P.startX,P.startY,l,P);return a=B.x,n=B.y,d("panzoomreset",P)}let _,L,T,z,$,R;const U=[];function X(E){if(RC(E.target,t))return;za(U,E),c=!0,t.handleStartEvent(E),_=a,L=n,h("panzoomstart",{x:a,y:n,scale:l,isSVG:r,originalEvent:E},t);const P=Lh(U);T=P.clientX,z=P.clientY,$=l,R=Ca(U)}function I(E){if(!c||_===void 0||L===void 0||T===void 0||z===void 0)return;za(U,E);const P=Lh(U),B=U.length>1;let j=l;if(B){R===0&&(R=Ca(U));const W=Ca(U)-R;j=u(W*t.step/80+$).scale,k(j,P,{animate:!1},E)}(!B||t.pinchAndPan)&&p(_+(P.clientX-T)/j,L+(P.clientY-z)/j,{animate:!1},E)}function A(E){U.length===1&&h("panzoomend",{x:a,y:n,scale:l,isSVG:r,originalEvent:E},t),AC(U,E),c&&(c=!1,_=L=T=z=void 0)}let M=!1;function D(){M||(M=!0,ya("down",t.canvas?i:e,X),ya("move",document,I,{passive:!0}),ya("up",document,A,{passive:!0}))}function O(){M=!1,xa("down",t.canvas?i:e,X),xa("move",document,I),xa("up",document,A)}return t.noBind||D(),{bind:D,destroy:O,eventNames:rs,getPan:()=>({x:a,y:n}),getScale:()=>l,getOptions:()=>NC(t),handleDown:X,handleMove:I,handleUp:A,pan:p,reset:S,resetStyle:s,setOptions:o,setStyle:(E,P)=>Hr(e,E,P),zoom:m,zoomIn:x,zoomOut:C,zoomToPoint:k,zoomWithWheel:v}}yd.defaultOptions=md;const qC=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],zC=zt("arrow-down",qC);const WC=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],jC=zt("arrow-left",WC);const HC=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],YC=zt("arrow-right",HC);const UC=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],XC=zt("arrow-up",UC);const GC=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Fh=zt("refresh-cw",GC);const VC=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],ZC=zt("settings-2",VC);const KC=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]],QC=zt("zoom-in",KC);const JC=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]],tb=zt("zoom-out",JC);var xd=Object.defineProperty,g=(e,t)=>xd(e,"name",{value:t,configurable:!0}),Cd=(e,t)=>{for(var r in t)xd(e,r,{get:t[r],enumerable:!0})},Ws={exports:{}},eb=Ws.exports,Eh;function rb(){return Eh||(Eh=1,(function(e,t){(function(r,i){e.exports=i()})(eb,(function(){var r=1e3,i=6e4,s=36e5,o="millisecond",a="second",n="minute",l="hour",c="day",h="week",d="month",f="quarter",u="year",p="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,C={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(I){var A=["th","st","nd","rd"],M=I%100;return"["+I+(A[(M-20)%10]||A[M]||A[0])+"]"}},k=function(I,A,M){var D=String(I);return!D||D.length>=A?I:""+Array(A+1-D.length).join(M)+I},v={s:k,z:function(I){var A=-I.utcOffset(),M=Math.abs(A),D=Math.floor(M/60),O=M%60;return(A<=0?"+":"-")+k(D,2,"0")+":"+k(O,2,"0")},m:function I(A,M){if(A.date()<M.date())return-I(M,A);var D=12*(M.year()-A.year())+(M.month()-A.month()),O=A.clone().add(D,d),E=M-O<0,P=A.clone().add(D+(E?-1:1),d);return+(-(D+(M-O)/(E?O-P:P-O))||0)},a:function(I){return I<0?Math.ceil(I)||0:Math.floor(I)},p:function(I){return{M:d,y:u,w:h,d:c,D:p,h:l,m:n,s:a,ms:o,Q:f}[I]||String(I||"").toLowerCase().replace(/s$/,"")},u:function(I){return I===void 0}},S="en",_={};_[S]=C;var L="$isDayjsObject",T=function(I){return I instanceof U||!(!I||!I[L])},z=function I(A,M,D){var O;if(!A)return S;if(typeof A=="string"){var E=A.toLowerCase();_[E]&&(O=E),M&&(_[E]=M,O=E);var P=A.split("-");if(!O&&P.length>1)return I(P[0])}else{var B=A.name;_[B]=A,O=B}return!D&&O&&(S=O),O||!D&&S},$=function(I,A){if(T(I))return I.clone();var M=typeof A=="object"?A:{};return M.date=I,M.args=arguments,new U(M)},R=v;R.l=z,R.i=T,R.w=function(I,A){return $(I,{locale:A.$L,utc:A.$u,x:A.$x,$offset:A.$offset})};var U=(function(){function I(M){this.$L=z(M.locale,null,!0),this.parse(M),this.$x=this.$x||M.x||{},this[L]=!0}var A=I.prototype;return A.parse=function(M){this.$d=(function(D){var O=D.date,E=D.utc;if(O===null)return new Date(NaN);if(R.u(O))return new Date;if(O instanceof Date)return new Date(O);if(typeof O=="string"&&!/Z$/i.test(O)){var P=O.match(y);if(P){var B=P[2]-1||0,j=(P[7]||"0").substring(0,3);return E?new Date(Date.UTC(P[1],B,P[3]||1,P[4]||0,P[5]||0,P[6]||0,j)):new Date(P[1],B,P[3]||1,P[4]||0,P[5]||0,P[6]||0,j)}}return new Date(O)})(M),this.init()},A.init=function(){var M=this.$d;this.$y=M.getFullYear(),this.$M=M.getMonth(),this.$D=M.getDate(),this.$W=M.getDay(),this.$H=M.getHours(),this.$m=M.getMinutes(),this.$s=M.getSeconds(),this.$ms=M.getMilliseconds()},A.$utils=function(){return R},A.isValid=function(){return this.$d.toString()!==m},A.isSame=function(M,D){var O=$(M);return this.startOf(D)<=O&&O<=this.endOf(D)},A.isAfter=function(M,D){return $(M)<this.startOf(D)},A.isBefore=function(M,D){return this.endOf(D)<$(M)},A.$g=function(M,D,O){return R.u(M)?this[D]:this.set(O,M)},A.unix=function(){return Math.floor(this.valueOf()/1e3)},A.valueOf=function(){return this.$d.getTime()},A.startOf=function(M,D){var O=this,E=!!R.u(D)||D,P=R.p(M),B=function(ft,ht){var mt=R.w(O.$u?Date.UTC(O.$y,ht,ft):new Date(O.$y,ht,ft),O);return E?mt:mt.endOf(c)},j=function(ft,ht){return R.w(O.toDate()[ft].apply(O.toDate("s"),(E?[0,0,0,0]:[23,59,59,999]).slice(ht)),O)},W=this.$W,K=this.$M,Y=this.$D,Z="set"+(this.$u?"UTC":"");switch(P){case u:return E?B(1,0):B(31,11);case d:return E?B(1,K):B(0,K+1);case h:var V=this.$locale().weekStart||0,rt=(W<V?W+7:W)-V;return B(E?Y-rt:Y+(6-rt),K);case c:case p:return j(Z+"Hours",0);case l:return j(Z+"Minutes",1);case n:return j(Z+"Seconds",2);case a:return j(Z+"Milliseconds",3);default:return this.clone()}},A.endOf=function(M){return this.startOf(M,!1)},A.$set=function(M,D){var O,E=R.p(M),P="set"+(this.$u?"UTC":""),B=(O={},O[c]=P+"Date",O[p]=P+"Date",O[d]=P+"Month",O[u]=P+"FullYear",O[l]=P+"Hours",O[n]=P+"Minutes",O[a]=P+"Seconds",O[o]=P+"Milliseconds",O)[E],j=E===c?this.$D+(D-this.$W):D;if(E===d||E===u){var W=this.clone().set(p,1);W.$d[B](j),W.init(),this.$d=W.set(p,Math.min(this.$D,W.daysInMonth())).$d}else B&&this.$d[B](j);return this.init(),this},A.set=function(M,D){return this.clone().$set(M,D)},A.get=function(M){return this[R.p(M)]()},A.add=function(M,D){var O,E=this;M=Number(M);var P=R.p(D),B=function(K){var Y=$(E);return R.w(Y.date(Y.date()+Math.round(K*M)),E)};if(P===d)return this.set(d,this.$M+M);if(P===u)return this.set(u,this.$y+M);if(P===c)return B(1);if(P===h)return B(7);var j=(O={},O[n]=i,O[l]=s,O[a]=r,O)[P]||1,W=this.$d.getTime()+M*j;return R.w(W,this)},A.subtract=function(M,D){return this.add(-1*M,D)},A.format=function(M){var D=this,O=this.$locale();if(!this.isValid())return O.invalidDate||m;var E=M||"YYYY-MM-DDTHH:mm:ssZ",P=R.z(this),B=this.$H,j=this.$m,W=this.$M,K=O.weekdays,Y=O.months,Z=O.meridiem,V=function(ht,mt,$t,Wt){return ht&&(ht[mt]||ht(D,E))||$t[mt].slice(0,Wt)},rt=function(ht){return R.s(B%12||12,ht,"0")},ft=Z||function(ht,mt,$t){var Wt=ht<12?"AM":"PM";return $t?Wt.toLowerCase():Wt};return E.replace(x,(function(ht,mt){return mt||(function($t){switch($t){case"YY":return String(D.$y).slice(-2);case"YYYY":return R.s(D.$y,4,"0");case"M":return W+1;case"MM":return R.s(W+1,2,"0");case"MMM":return V(O.monthsShort,W,Y,3);case"MMMM":return V(Y,W);case"D":return D.$D;case"DD":return R.s(D.$D,2,"0");case"d":return String(D.$W);case"dd":return V(O.weekdaysMin,D.$W,K,2);case"ddd":return V(O.weekdaysShort,D.$W,K,3);case"dddd":return K[D.$W];case"H":return String(B);case"HH":return R.s(B,2,"0");case"h":return rt(1);case"hh":return rt(2);case"a":return ft(B,j,!0);case"A":return ft(B,j,!1);case"m":return String(j);case"mm":return R.s(j,2,"0");case"s":return String(D.$s);case"ss":return R.s(D.$s,2,"0");case"SSS":return R.s(D.$ms,3,"0");case"Z":return P}return null})(ht)||P.replace(":","")}))},A.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},A.diff=function(M,D,O){var E,P=this,B=R.p(D),j=$(M),W=(j.utcOffset()-this.utcOffset())*i,K=this-j,Y=function(){return R.m(P,j)};switch(B){case u:E=Y()/12;break;case d:E=Y();break;case f:E=Y()/3;break;case h:E=(K-W)/6048e5;break;case c:E=(K-W)/864e5;break;case l:E=K/s;break;case n:E=K/i;break;case a:E=K/r;break;default:E=K}return O?E:R.a(E)},A.daysInMonth=function(){return this.endOf(d).$D},A.$locale=function(){return _[this.$L]},A.locale=function(M,D){if(!M)return this.$L;var O=this.clone(),E=z(M,D,!0);return E&&(O.$L=E),O},A.clone=function(){return R.w(this.$d,this)},A.toDate=function(){return new Date(this.valueOf())},A.toJSON=function(){return this.isValid()?this.toISOString():null},A.toISOString=function(){return this.$d.toISOString()},A.toString=function(){return this.$d.toUTCString()},I})(),X=U.prototype;return $.prototype=X,[["$ms",o],["$s",a],["$m",n],["$H",l],["$W",c],["$M",d],["$y",u],["$D",p]].forEach((function(I){X[I[1]]=function(A){return this.$g(A,I[0],I[1])}})),$.extend=function(I,A){return I.$i||(I(A,U,$),I.$i=!0),$},$.locale=z,$.isDayjs=T,$.unix=function(I){return $(1e3*I)},$.en=_[S],$.Ls=_,$.p={},$}))})(Ws)),Ws.exports}var ib=rb();const bd=cd(ib);var We={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},G={trace:g((...e)=>{},"trace"),debug:g((...e)=>{},"debug"),info:g((...e)=>{},"info"),warn:g((...e)=>{},"warn"),error:g((...e)=>{},"error"),fatal:g((...e)=>{},"fatal")},Qn=g(function(e="fatal"){let t=We.fatal;typeof e=="string"?e.toLowerCase()in We&&(t=We[e]):typeof e=="number"&&(t=e),G.trace=()=>{},G.debug=()=>{},G.info=()=>{},G.warn=()=>{},G.error=()=>{},G.fatal=()=>{},t<=We.fatal&&(G.fatal=console.error?console.error.bind(console,ue("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",ue("FATAL"))),t<=We.error&&(G.error=console.error?console.error.bind(console,ue("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",ue("ERROR"))),t<=We.warn&&(G.warn=console.warn?console.warn.bind(console,ue("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",ue("WARN"))),t<=We.info&&(G.info=console.info?console.info.bind(console,ue("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",ue("INFO"))),t<=We.debug&&(G.debug=console.debug?console.debug.bind(console,ue("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ue("DEBUG"))),t<=We.trace&&(G.trace=console.debug?console.debug.bind(console,ue("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",ue("TRACE")))},"setLogLevel"),ue=g(e=>`%c${bd().format("ss.SSS")} : ${e} : `,"format");const js={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const s=r<.5?r*(1+t):r+t-r*t,o=2*r-s;switch(i){case"r":return js.hue2rgb(o,s,e+1/3)*255;case"g":return js.hue2rgb(o,s,e)*255;case"b":return js.hue2rgb(o,s,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const s=Math.max(e,t,r),o=Math.min(e,t,r),a=(s+o)/2;if(i==="l")return a*100;if(s===o)return 0;const n=s-o,l=a>.5?n/(2-s-o):n/(s+o);if(i==="s")return l*100;switch(s){case e:return((t-r)/n+(t<r?6:0))*60;case t:return((r-e)/n+2)*60;case r:return((e-t)/n+4)*60;default:return-1}}},sb={clamp:(e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},ob={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},ut={channel:js,lang:sb,unit:ob},tr={};for(let e=0;e<=255;e++)tr[e]=ut.unit.dec2hex(e);const Zt={ALL:0,RGB:1,HSL:2};class ab{constructor(){this.type=Zt.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=Zt.ALL}is(t){return this.type===t}}class nb{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new ab}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Zt.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:s}=t;r===void 0&&(t.h=ut.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=ut.channel.rgb2hsl(t,"s")),s===void 0&&(t.l=ut.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:s}=t;r===void 0&&(t.r=ut.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=ut.channel.hsl2rgb(t,"g")),s===void 0&&(t.b=ut.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Zt.HSL)&&r!==void 0?r:(this._ensureHSL(),ut.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Zt.HSL)&&r!==void 0?r:(this._ensureHSL(),ut.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Zt.HSL)&&r!==void 0?r:(this._ensureHSL(),ut.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Zt.RGB)&&r!==void 0?r:(this._ensureRGB(),ut.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Zt.RGB)&&r!==void 0?r:(this._ensureRGB(),ut.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Zt.RGB)&&r!==void 0?r:(this._ensureRGB(),ut.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Zt.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Zt.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Zt.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Zt.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Zt.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Zt.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const Po=new nb({r:0,g:0,b:0,a:0},"transparent"),Xr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Xr.re);if(!t)return;const r=t[1],i=parseInt(r,16),s=r.length,o=s%4===0,a=s>4,n=a?1:17,l=a?8:4,c=o?0:-1,h=a?255:15;return Po.set({r:(i>>l*(c+3)&h)*n,g:(i>>l*(c+2)&h)*n,b:(i>>l*(c+1)&h)*n,a:o?(i&h)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`#${tr[Math.round(t)]}${tr[Math.round(r)]}${tr[Math.round(i)]}${tr[Math.round(s*255)]}`:`#${tr[Math.round(t)]}${tr[Math.round(r)]}${tr[Math.round(i)]}`}},br={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{const t=e.match(br.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return ut.channel.clamp.h(parseFloat(r)*.9);case"rad":return ut.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return ut.channel.clamp.h(parseFloat(r)*360)}}return ut.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(br.re);if(!r)return;const[,i,s,o,a,n]=r;return Po.set({h:br._hue2deg(i),s:ut.channel.clamp.s(parseFloat(s)),l:ut.channel.clamp.l(parseFloat(o)),a:a?ut.channel.clamp.a(n?parseFloat(a)/100:parseFloat(a)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:s}=e;return s<1?`hsla(${ut.lang.round(t)}, ${ut.lang.round(r)}%, ${ut.lang.round(i)}%, ${s})`:`hsl(${ut.lang.round(t)}, ${ut.lang.round(r)}%, ${ut.lang.round(i)}%)`}},Vi={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();const t=Vi.colors[e];if(t)return Xr.parse(t)},stringify:e=>{const t=Xr.stringify(e);for(const r in Vi.colors)if(Vi.colors[r]===t)return r}},zi={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(zi.re);if(!r)return;const[,i,s,o,a,n,l,c,h]=r;return Po.set({r:ut.channel.clamp.r(s?parseFloat(i)*2.55:parseFloat(i)),g:ut.channel.clamp.g(a?parseFloat(o)*2.55:parseFloat(o)),b:ut.channel.clamp.b(l?parseFloat(n)*2.55:parseFloat(n)),a:c?ut.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`rgba(${ut.lang.round(t)}, ${ut.lang.round(r)}, ${ut.lang.round(i)}, ${ut.lang.round(s)})`:`rgb(${ut.lang.round(t)}, ${ut.lang.round(r)}, ${ut.lang.round(i)})`}},_e={format:{keyword:Vi,hex:Xr,rgb:zi,rgba:zi,hsl:br,hsla:br},parse:e=>{if(typeof e!="string")return e;const t=Xr.parse(e)||zi.parse(e)||br.parse(e)||Vi.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Zt.HSL)||e.data.r===void 0?br.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?zi.stringify(e):Xr.stringify(e)},kd=(e,t)=>{const r=_e.parse(e);for(const i in t)r[i]=ut.channel.clamp[i](t[i]);return _e.stringify(r)},Xe=(e,t,r=0,i=1)=>{if(typeof e!="number")return kd(e,{a:t});const s=Po.set({r:ut.channel.clamp.r(e),g:ut.channel.clamp.g(t),b:ut.channel.clamp.b(r),a:ut.channel.clamp.a(i)});return _e.stringify(s)},lb=e=>{const{r:t,g:r,b:i}=_e.parse(e),s=.2126*ut.channel.toLinear(t)+.7152*ut.channel.toLinear(r)+.0722*ut.channel.toLinear(i);return ut.lang.round(s)},hb=e=>lb(e)>=.5,ye=e=>!hb(e),Jn=(e,t,r)=>{const i=_e.parse(e),s=i[t],o=ut.channel.clamp[t](s+r);return s!==o&&(i[t]=o),_e.stringify(i)},N=(e,t)=>Jn(e,"l",t),q=(e,t)=>Jn(e,"l",-t),b=(e,t)=>{const r=_e.parse(e),i={};for(const s in t)t[s]&&(i[s]=r[s]+t[s]);return kd(e,i)},cb=(e,t,r=50)=>{const{r:i,g:s,b:o,a}=_e.parse(e),{r:n,g:l,b:c,a:h}=_e.parse(t),d=r/100,f=d*2-1,u=a-h,m=((f*u===-1?f:(f+u)/(1+f*u))+1)/2,y=1-m,x=i*m+n*y,C=s*m+l*y,k=o*m+c*y,v=a*d+h*(1-d);return Xe(x,C,k,v)},F=(e,t=100)=>{const r=_e.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,cb(r,e,t)};var Wa=g((e,t,{depth:r=2,clobber:i=!1}={})=>{const s={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(o=>Wa(e,o,s)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(o=>{e.includes(o)||e.push(o)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(o=>{typeof t[o]=="object"&&t[o]!==null&&(e[o]===void 0||typeof e[o]=="object")?(e[o]===void 0&&(e[o]=Array.isArray(t[o])?[]:{}),e[o]=Wa(e[o],t[o],{depth:r-1,clobber:i})):(i||typeof e[o]!="object"&&typeof t[o]!="object")&&(e[o]=t[o])}),e)},"assignWithDepth"),Pt=Wa,Re="#ffffff",Pe="#f2f2f2",dt=g((e,t)=>t?b(e,{s:-40,l:10}):b(e,{s:-40,l:-10}),"mkBorder"),Zr,db=(Zr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||dt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||dt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||dt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||dt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?q(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||q(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||N(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||q(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||q(this.mainBkg,10)):(this.rowOdd=this.rowOdd||N(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||N(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=q(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=q(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||F(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||N(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||q(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||b(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||b(this.mainBkg,{h:180,s:-15,l:t*(8+r*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||b(this.primaryColor,{h:64}),this.fillType3=this.fillType3||b(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||b(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||b(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||b(this.primaryColor,{h:128}),this.fillType7=this.fillType7||b(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-10}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??b(this.primaryColor,{l:-30}),this.venn2=this.venn2??b(this.secondaryColor,{l:-30}),this.venn3=this.venn3??b(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??b(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??b(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??b(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??b(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??b(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ye(this.quadrant1Fill)?N(this.quadrant1Fill):q(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?q(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=N(this.git0,25),this.git1=N(this.git1,25),this.git2=N(this.git2,25),this.git3=N(this.git3,25),this.git4=N(this.git4,25),this.git5=N(this.git5,25),this.git6=N(this.git6,25),this.git7=N(this.git7,25)):(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Re,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Pe,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Zr,"Theme"),Zr),ub=g(e=>{const t=new db;return t.calculate(e),t},"getThemeVariables"),Kr,fb=(Kr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=N(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=F(this.background),this.secondaryBorderColor=dt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=dt(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.lineColor=F(this.background),this.textColor=F(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=N(F("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Xe(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.clusterBkg="#302F3D",this.sectionBkgColor=q("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=q(this.sectionBkgColor,10),this.taskBorderColor=Xe(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Xe(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||N(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||q(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){this.secondBkg=N(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=N(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.background,this.taskBkgColor=N(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=F(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=b(this.primaryColor,{h:64}),this.fillType3=b(this.secondaryColor,{h:64}),this.fillType4=b(this.primaryColor,{h:-64}),this.fillType5=b(this.secondaryColor,{h:-64}),this.fillType6=b(this.primaryColor,{h:128}),this.fillType7=b(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||F(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScalePeer"+t]=this["cScalePeer"+t]||N(this["cScale"+t],10);for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||b(this.mainBkg,{h:30,s:-30,l:-(-10+t*4)}),this["surfacePeer"+t]=this["surfacePeer"+t]||b(this.mainBkg,{h:30,s:-30,l:-(-7+t*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.mainContrastColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.mainContrastColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let t=0;t<8;t++)this["venn"+(t+1)]=this["venn"+(t+1)]??N(this["cScale"+t],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#FF6B6B",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#1B5E20",complicatedBg:this.cynefin?.complicatedBg||"#0D47A1",chaoticBg:this.cynefin?.chaoticBg||"#BF360C",clearBg:this.cynefin?.clearBg||"#F57F17",confusionBg:this.cynefin?.confusionBg||"#4A148C",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ye(this.quadrant1Fill)?N(this.quadrant1Fill):q(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.mainBkg,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.mainBkg},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?q(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=N(this.secondaryColor,20),this.git1=N(this.pie2||this.secondaryColor,20),this.git2=N(this.pie3||this.tertiaryColor,20),this.git3=N(this.pie4||b(this.primaryColor,{h:-30}),20),this.git4=N(this.pie5||b(this.primaryColor,{h:-60}),20),this.git5=N(this.pie6||b(this.primaryColor,{h:-90}),10),this.git6=N(this.pie7||b(this.primaryColor,{h:60}),10),this.git7=N(this.pie8||b(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||F(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||F(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"#2d2d2d",this.emUiStroke=this.emUiStroke||"#555",this.emProcessorFill=this.emProcessorFill||N("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||N("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||N("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||N("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||N(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||N(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||N(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||N(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Kr,"Theme"),Kr),gb=g(e=>{const t=new fb;return t.calculate(e),t},"getThemeVariables"),Qr,pb=(Qr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=b(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=dt(this.primaryColor,this.darkMode),this.secondaryBorderColor=dt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=dt(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.lineColor=F(this.background),this.textColor=F(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=dt(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=Xe(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||q(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||q(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=q(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||q(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||b(this["cScale"+t],{h:180});for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||b(this.mainBkg,{h:30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||b(this.mainBkg,{h:30,l:-(7+t*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||F(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||F(this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||N(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||N(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=b(this.primaryColor,{h:64}),this.fillType3=b(this.secondaryColor,{h:64}),this.fillType4=b(this.primaryColor,{h:-64}),this.fillType5=b(this.secondaryColor,{h:-64}),this.fillType6=b(this.primaryColor,{h:128}),this.fillType7=b(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||b(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-30}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||b(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??b(this.primaryColor,{l:-30}),this.venn2=this.venn2??b(this.secondaryColor,{l:-30}),this.venn3=this.venn3??b(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??b(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??b(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??b(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??b(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??b(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ye(this.quadrant1Fill)?N(this.quadrant1Fill):q(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=N(this.git0,25),this.git1=N(this.git1,25),this.git2=N(this.git2,25),this.git3=N(this.git3,25),this.git4=N(this.git4,25),this.git5=N(this.git5,25),this.git6=N(this.git6,25),this.git7=N(this.git7,25)):(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)),this.gitInv0=this.gitInv0||q(F(this.git0),25),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||F(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||F(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Re,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Pe}calculate(t){if(Object.keys(this).forEach(i=>{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Qr,"Theme"),Qr),wd=g(e=>{const t=new pb;return t.calculate(e),t},"getThemeVariables"),Jr,mb=(Jr=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=N("#cde498",10),this.primaryBorderColor=dt(this.primaryColor,this.darkMode),this.secondaryBorderColor=dt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=dt(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.primaryColor),this.lineColor=F(this.background),this.textColor=F(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){this.actorBorder=q(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||q(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||q(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=q(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||q(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||b(this["cScale"+t],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||b(this.mainBkg,{h:30,s:-30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||b(this.mainBkg,{h:30,s:-30,l:-(8+t*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||N(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||N(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=b(this.primaryColor,{h:64}),this.fillType3=b(this.secondaryColor,{h:64}),this.fillType4=b(this.primaryColor,{h:-64}),this.fillType5=b(this.secondaryColor,{h:-64}),this.fillType6=b(this.primaryColor,{h:128}),this.fillType7=b(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||b(this.primaryColor,{l:-30}),this.pie5=this.pie5||b(this.secondaryColor,{l:-30}),this.pie6=this.pie6||b(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??b(this.primaryColor,{l:-30}),this.venn2=this.venn2??b(this.secondaryColor,{l:-30}),this.venn3=this.venn3??b(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??b(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??b(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??b(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??b(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??b(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B4513",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#C8E6C9",complicatedBg:this.cynefin?.complicatedBg||"#DCEDC8",chaoticBg:this.cynefin?.chaoticBg||"#FFE0B2",clearBg:this.cynefin?.clearBg||"#FFF9C4",confusionBg:this.cynefin?.confusionBg||"#D7CCC8",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ye(this.quadrant1Fill)?N(this.quadrant1Fill):q(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=N(this.git0,25),this.git1=N(this.git1,25),this.git2=N(this.git2,25),this.git3=N(this.git3,25),this.git4=N(this.git4,25),this.git5=N(this.git5,25),this.git6=N(this.git6,25),this.git7=N(this.git7,25)):(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||F(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||F(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Re,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Pe}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(Jr,"Theme"),Jr),yb=g(e=>{const t=new mb;return t.calculate(e),t},"getThemeVariables"),ti,xb=(ti=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=N(this.contrast,55),this.background="#ffffff",this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=dt(this.primaryColor,this.darkMode),this.secondaryBorderColor=dt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=dt(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.lineColor=F(this.background),this.textColor=F(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||N(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){this.secondBkg=N(this.contrast,55),this.border2=this.contrast,this.actorBorder=N(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||F(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||N(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||q(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||b(this.mainBkg,{l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||b(this.mainBkg,{l:-(8+t*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=N(this.contrast,30),this.sectionBkgColor2=N(this.contrast,30),this.taskBorderColor=q(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=N(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=q(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=b(this.primaryColor,{h:64}),this.fillType3=b(this.secondaryColor,{h:64}),this.fillType4=b(this.primaryColor,{h:-64}),this.fillType5=b(this.secondaryColor,{h:-64}),this.fillType6=b(this.primaryColor,{h:128}),this.fillType7=b(this.secondaryColor,{h:128});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let t=0;t<8;t++)this["venn"+(t+1)]=this["venn"+(t+1)]??this["cScale"+t];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ye(this.quadrant1Fill)?N(this.quadrant1Fill):q(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=q(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||b(this.primaryColor,{h:-30}),this.git4=this.pie5||b(this.primaryColor,{h:-60}),this.git5=this.pie6||b(this.primaryColor,{h:-90}),this.git6=this.pie7||b(this.primaryColor,{h:60}),this.git7=this.pie8||b(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Re,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Pe}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(ti,"Theme"),ti),Cb=g(e=>{const t=new xb;return t.calculate(e),t},"getThemeVariables"),ei,bb=(ei=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=dt(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||dt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||dt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||dt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||dt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?q(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||q(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=b(t,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||N(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||t,this.cScale1=this.cScale1||r,this.cScale2=this.cScale2||i,this.cScale3=this.cScale3||b(t,{h:30}),this.cScale4=this.cScale4||b(t,{h:60}),this.cScale5=this.cScale5||b(t,{h:90}),this.cScale6=this.cScale6||b(t,{h:120}),this.cScale7=this.cScale7||b(t,{h:150}),this.cScale8=this.cScale8||b(t,{h:210,l:150}),this.cScale9=this.cScale9||b(t,{h:270}),this.cScale10=this.cScale10||b(t,{h:300}),this.cScale11=this.cScale11||b(t,{h:330}),this.darkMode)for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=q(this["cScale"+o],75);else for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=q(this["cScale"+o],25);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||F(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this.darkMode?this["cScalePeer"+o]=this["cScalePeer"+o]||N(this["cScale"+o],10):this["cScalePeer"+o]=this["cScalePeer"+o]||q(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||b(this.mainBkg,{h:180,s:-15,l:s*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||b(this.mainBkg,{h:180,s:-15,l:s*(8+o*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||b(t,{h:64}),this.fillType3=this.fillType3||b(r,{h:64}),this.fillType4=this.fillType4||b(t,{h:-64}),this.fillType5=this.fillType5||b(r,{h:-64}),this.fillType6=this.fillType6||b(t,{h:128}),this.fillType7=this.fillType7||b(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||b(t,{l:-10}),this.pie5=this.pie5||b(r,{l:-10}),this.pie6=this.pie6||b(i,{l:-10}),this.pie7=this.pie7||b(t,{h:60,l:-10}),this.pie8=this.pie8||b(t,{h:-60,l:-10}),this.pie9=this.pie9||b(t,{h:120,l:0}),this.pie10=this.pie10||b(t,{h:60,l:-20}),this.pie11=this.pie11||b(t,{h:-60,l:-20}),this.pie12=this.pie12||b(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||b(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ye(this.quadrant1Fill)?N(this.quadrant1Fill):q(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?q(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||b(t,{h:-30}),this.git4=this.git4||b(t,{h:-60}),this.git5=this.git5||b(t,{h:-90}),this.git6=this.git6||b(t,{h:60}),this.git7=this.git7||b(t,{h:120}),this.darkMode?(this.git0=N(this.git0,25),this.git1=N(this.git1,25),this.git2=N(this.git2,25),this.git3=N(this.git3,25),this.git4=N(this.git4,25),this.git5=N(this.git5,25),this.git6=N(this.git6,25),this.git7=N(this.git7,25)):(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Re,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Pe}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(ei,"Theme"),ei),kb=g(e=>{const t=new bb;return t.calculate(e),t},"getThemeVariables"),ri,wb=(ri=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=N(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=F(this.background),this.secondaryBorderColor=dt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=dt(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=N(F("#323D47"),10),this.border1="#ccc",this.border2=Xe(255,255,255,.25),this.arrowheadColor=F(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||dt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||dt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||dt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||dt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?q(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||q(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||N(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=q(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=q(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||F(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||N(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||q(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||b(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||b(this.mainBkg,{h:180,s:-15,l:t*(8+r*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||b(this.primaryColor,{h:64}),this.fillType3=this.fillType3||b(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||b(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||b(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||b(this.primaryColor,{h:128}),this.fillType7=this.fillType7||b(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-10}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ye(this.quadrant1Fill)?N(this.quadrant1Fill):q(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?q(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||"#0b0000",this.git1=this.git1||"#4d1037",this.git2=this.git2||"#3f5258",this.git3=this.git3||"#4f2f1b",this.git4=this.git4||"#6e0a0a",this.git5=this.git5||"#3b0048",this.git6=this.git6||"#995a01",this.git7=this.git7||"#154706",this.gitDarkMode=!0,this.gitDarkMode?(this.git0=N(this.git0,25),this.git1=N(this.git1,25),this.git2=N(this.git2,25),this.git3=N(this.git3,25),this.git4=N(this.git4,25),this.git5=N(this.git5,25),this.git6=N(this.git6,25),this.git7=N(this.git7,25)):(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Re,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Pe}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(ri,"Theme"),ri),Sb=g(e=>{const t=new wb;return t.calculate(e),t},"getThemeVariables"),ii,vb=(ii=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=dt("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||dt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||dt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||dt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||dt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?q(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||q(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=b(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||N(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=this.mainBkg;if(this.darkMode)for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=q(this["cScale"+o],75);else for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScale"+o]=q(this["cScale"+o],25);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||F(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this.darkMode?this["cScalePeer"+o]=this["cScalePeer"+o]||N(this["cScale"+o],10):this["cScalePeer"+o]=this["cScalePeer"+o]||q(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||b(this.mainBkg,{h:180,s:-15,l:s*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||b(this.mainBkg,{h:180,s:-15,l:s*(8+o*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||b(t,{h:64}),this.fillType3=this.fillType3||b(r,{h:64}),this.fillType4=this.fillType4||b(t,{h:-64}),this.fillType5=this.fillType5||b(r,{h:-64}),this.fillType6=this.fillType6||b(t,{h:128}),this.fillType7=this.fillType7||b(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||b(t,{l:-10}),this.pie5=this.pie5||b(r,{l:-10}),this.pie6=this.pie6||b(i,{l:-10}),this.pie7=this.pie7||b(t,{h:60,l:-10}),this.pie8=this.pie8||b(t,{h:-60,l:-10}),this.pie9=this.pie9||b(t,{h:120,l:0}),this.pie10=this.pie10||b(t,{h:60,l:-20}),this.pie11=this.pie11||b(t,{h:-60,l:-20}),this.pie12=this.pie12||b(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||b(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ye(this.quadrant1Fill)?N(this.quadrant1Fill):q(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?q(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||b(t,{h:-30}),this.git4=this.git4||b(t,{h:-60}),this.git5=this.git5||b(t,{h:-90}),this.git6=this.git6||b(t,{h:60}),this.git7=this.git7||b(t,{h:120}),this.darkMode?(this.git0=N(this.git0,25),this.git1=N(this.git1,25),this.git2=N(this.git2,25),this.git3=N(this.git3,25),this.git4=N(this.git4,25),this.git5=N(this.git5,25),this.git6=N(this.git6,25),this.git7=N(this.git7,25)):(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Re,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Pe}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(ii,"Theme"),ii),Tb=g(e=>{const t=new vb;return t.calculate(e),t},"getThemeVariables"),si,_b=(si=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=N(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=F(this.background),this.secondaryBorderColor=dt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=dt(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=N(F("#323D47"),10),this.border1="#ccc",this.border2=Xe(255,255,255,.25),this.arrowheadColor=F(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||dt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||dt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||dt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||dt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?q(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||q(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||N(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=q(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=q(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||F(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||N(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||q(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||b(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||b(this.mainBkg,{h:180,s:-15,l:t*(8+r*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||b(this.primaryColor,{h:64}),this.fillType3=this.fillType3||b(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||b(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||b(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||b(this.primaryColor,{h:128}),this.fillType7=this.fillType7||b(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-10}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ye(this.quadrant1Fill)?N(this.quadrant1Fill):q(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?q(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=N(this.git0,25),this.git1=N(this.git1,25),this.git2=N(this.git2,25),this.git3=N(this.git3,25),this.git4=N(this.git4,25),this.git5=N(this.git5,25),this.git6=N(this.git6,25),this.git7=N(this.git7,25)):(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Re,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Pe}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(si,"Theme"),si),Bb=g(e=>{const t=new _b;return t.calculate(e),t},"getThemeVariables"),oi,Lb=(oi=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=dt(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||dt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||dt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||dt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||dt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?q(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||q(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=b(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||N(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleInv"+o]=this["cScaleInv"+o]||F(this["cScale"+o]);for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this.darkMode?this["cScalePeer"+o]=this["cScalePeer"+o]||N(this["cScale"+o],10):this["cScalePeer"+o]=this["cScalePeer"+o]||q(this["cScale"+o],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let o=0;o<this.THEME_COLOR_LIMIT;o++)this["cScaleLabel"+o]=this["cScaleLabel"+o]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let o=0;o<5;o++)this["surface"+o]=this["surface"+o]||b(this.mainBkg,{h:180,s:-15,l:s*(5+o*3)}),this["surfacePeer"+o]=this["surfacePeer"+o]||b(this.mainBkg,{h:180,s:-15,l:s*(8+o*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||b(t,{h:64}),this.fillType3=this.fillType3||b(r,{h:64}),this.fillType4=this.fillType4||b(t,{h:-64}),this.fillType5=this.fillType5||b(r,{h:-64}),this.fillType6=this.fillType6||b(t,{h:128}),this.fillType7=this.fillType7||b(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||b(t,{l:-10}),this.pie5=this.pie5||b(r,{l:-10}),this.pie6=this.pie6||b(i,{l:-10}),this.pie7=this.pie7||b(t,{h:60,l:-10}),this.pie8=this.pie8||b(t,{h:-60,l:-10}),this.pie9=this.pie9||b(t,{h:120,l:0}),this.pie10=this.pie10||b(t,{h:60,l:-20}),this.pie11=this.pie11||b(t,{h:-60,l:-20}),this.pie12=this.pie12||b(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||b(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ye(this.quadrant1Fill)?N(this.quadrant1Fill):q(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?q(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||b(t,{h:-30}),this.git4=this.git4||b(t,{h:-60}),this.git5=this.git5||b(t,{h:-90}),this.git6=this.git6||b(t,{h:60}),this.git7=this.git7||b(t,{h:120}),this.darkMode?(this.git0=N(this.git0,25),this.git1=N(this.git1,25),this.git2=N(this.git2,25),this.git3=N(this.git3,25),this.git4=N(this.git4,25),this.git5=N(this.git5,25),this.git6=N(this.git6,25),this.git7=N(this.git7,25)):(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLineColor=this.commitLineColor??"#BDBCCC",this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.fontWeight=600,this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Re,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Pe}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(oi,"Theme"),oi),Fb=g(e=>{const t=new Lb;return t.calculate(e),t},"getThemeVariables"),ai,Eb=(ai=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=N(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=F(this.background),this.secondaryBorderColor=dt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=dt(this.tertiaryColor,this.darkMode),this.primaryTextColor=F(this.primaryColor),this.secondaryTextColor=F(this.secondaryColor),this.tertiaryTextColor=F(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=N(F("#323D47"),10),this.border1="#ccc",this.border2=Xe(255,255,255,.25),this.arrowheadColor=F(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||dt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||dt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||dt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||dt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||F(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||F(this.tertiaryColor),this.lineColor=this.lineColor||F(this.background),this.arrowheadColor=this.arrowheadColor||F(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?q(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||q(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||F(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.rootLabelColor="#FFFFFF",this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||N(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||F(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||N(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||q(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=q(this["cScale"+r],75);const t=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||b(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||b(this.mainBkg,{h:180,s:-15,l:t*(8+r*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||b(this.primaryColor,{h:64}),this.fillType3=this.fillType3||b(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||b(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||b(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||b(this.primaryColor,{h:128}),this.fillType7=this.fillType7||b(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-10}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ye(this.quadrant1Fill)?N(this.quadrant1Fill):q(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?q(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=N(this.git0,25),this.git1=N(this.git1,25),this.git2=N(this.git2,25),this.git3=N(this.git3,25),this.git4=N(this.git4,25),this.git5=N(this.git5,25),this.git6=N(this.git6,25),this.git7=N(this.git7,25)):(this.git0=q(this.git0,25),this.git1=q(this.git1,25),this.git2=q(this.git2,25),this.git3=q(this.git3,25),this.git4=q(this.git4,25),this.git5=q(this.git5,25),this.git6=q(this.git6,25),this.git7=q(this.git7,25)),this.gitInv0=this.gitInv0||F(this.git0),this.gitInv1=this.gitInv1||F(this.git1),this.gitInv2=this.gitInv2||F(this.git2),this.gitInv3=this.gitInv3||F(this.git3),this.gitInv4=this.gitInv4||F(this.git4),this.gitInv5=this.gitInv5||F(this.git5),this.gitInv6=this.gitInv6||F(this.git6),this.gitInv7=this.gitInv7||F(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.fontWeight=600,this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Re,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Pe}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},g(ai,"Theme"),ai),Mb=g(e=>{const t=new Eb;return t.calculate(e),t},"getThemeVariables"),Ge={base:{getThemeVariables:ub},dark:{getThemeVariables:gb},default:{getThemeVariables:wd},forest:{getThemeVariables:yb},neutral:{getThemeVariables:Cb},neo:{getThemeVariables:kb},"neo-dark":{getThemeVariables:Sb},redux:{getThemeVariables:Tb},"redux-dark":{getThemeVariables:Bb},"redux-color":{getThemeVariables:Fb},"redux-dark-color":{getThemeVariables:Mb}},Ut={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},swimlane:{useMaxWidth:!0,lineHops:"arc",ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75,donutHole:0,legendPosition:"right",highlightSlice:""},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1,showIcons:!1,defaultIconPack:"",filenameIcons:{},extensionIcons:{}},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500,seed:1},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},cynefin:{useMaxWidth:!0,width:800,height:600,padding:40,showDomainDescriptions:!0,boundaryAmplitude:8,seed:0},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},Sd={...Ut,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:Ge.default.getThemeVariables(),sequence:{...Ut.sequence,messageFont:g(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:g(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:g(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...Ut.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Ut.c4,useWidth:void 0,personFont:g(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Ut.flowchart,inheritDir:!1},external_personFont:g(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:g(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:g(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:g(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:g(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:g(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:g(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:g(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:g(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:g(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:g(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:g(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:g(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:g(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:g(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:g(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:g(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:g(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:g(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:g(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:g(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Ut.pie,useWidth:984},xyChart:{...Ut.xyChart,useWidth:void 0},requirement:{...Ut.requirement,useWidth:void 0},packet:{...Ut.packet},eventmodeling:{...Ut.eventmodeling},treeView:{...Ut.treeView,useWidth:void 0},radar:{...Ut.radar},railroad:{...Ut.railroad,fontSize:void 0,fontFamily:void 0,terminalFill:void 0,terminalStroke:void 0,terminalTextColor:void 0,nonTerminalFill:void 0,nonTerminalStroke:void 0,nonTerminalTextColor:void 0,lineColor:void 0,markerFill:void 0,commentFill:void 0,commentStroke:void 0,commentTextColor:void 0,specialFill:void 0,specialStroke:void 0,ruleNameColor:void 0},ishikawa:{...Ut.ishikawa},sankey:{...Ut.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...Ut.venn},cynefin:{...Ut.cynefin}},vd=g((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...vd(e[i],"")]:[...r,t+i],[]),"keyify"),Ab=new Set(vd(Sd,"")),tl=Sd,$b={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},Ob=g((e,t)=>{for(const r of Object.keys(e)){const i=e[r];(r.startsWith("__")||r.includes("proto")||r.includes("constr")||typeof i!="string"||!t.test(i))&&(G.debug("sanitize deleting dictionary entry:",r,i),delete e[r])}},"sanitizeDictionaryConfig"),io=g(e=>{if(G.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>io(t));return}for(const t of Object.keys(e)){if(G.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!Ab.has(t)||e[t]==null){G.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){const i=$b[t];i?Ob(e[t],i):(G.debug("sanitizing object",t),io(e[t]));continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(G.debug("sanitizing css option",t),e[t]=Td(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}G.debug("After sanitization",e)}},"sanitizeDirective"),Td=g(e=>{let t=0,r=0;for(const i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?t++:i==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),di=Object.freeze(tl),De=g(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),ne=Pt({},di),so,Br=[],Zi=Pt({},di),Do=g((e,t)=>{let r=Pt({},e),i={};for(const s of t)Ld(s),i=Pt(i,s);if(r=Pt(r,i),i.theme&&i.theme in Ge){const s=Pt({},so),o=Pt(s.themeVariables||{},i.themeVariables);r.theme&&r.theme in Ge&&(r.themeVariables=Ge[r.theme].getThemeVariables(o))}return Zi=r,Ed(Zi),Zi},"updateCurrentConfig"),Ib=g(e=>(ne=Pt({},di),ne=Pt(ne,e),e.theme&&Ge[e.theme]&&(ne.themeVariables=Ge[e.theme].getThemeVariables(e.themeVariables)),Do(ne,Br),ne),"setSiteConfig"),Rb=g(e=>{so=Pt({},e)},"saveConfigFromInitialize"),Pb=g(e=>(ne=Pt(ne,e),Do(ne,Br),ne),"updateSiteConfig"),_d=g(()=>Pt({},ne),"getSiteConfig"),Bd=g(e=>(Ed(e),Pt(Zi,e),Bt()),"setConfig"),Bt=g(()=>Pt({},Zi),"getConfig"),Ld=g(e=>{e&&(["secure",...ne.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(G.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&Ld(e[t])}))},"sanitize"),Db=g(e=>{io(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Br.push(e),Do(ne,Br)},"addDirective"),oo=g((e=ne)=>{Br=[],Do(e,Br)},"reset"),Nb={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},Mh={},Fd=g(e=>{Mh[e]||(G.warn(Nb[e]),Mh[e]=!0)},"issueWarning"),Ed=g(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Fd("LAZY_LOAD_DEPRECATED")},"checkConfig"),qb=g(()=>{let e={};so&&(e=Pt(e,so));for(const t of Br)e=Pt(e,t);return e},"getUserDefinedConfig"),Qt=g(e=>(e.flowchart?.htmlLabels!=null&&Fd("FLOWCHART_HTML_LABELS_DEPRECATED"),De(e.htmlLabels??e.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels"),Md=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,Ki=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,zb=/\s*%%.*\n/gm,ni,Ad=(ni=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},g(ni,"UnknownDiagramError"),ni),Lr={},el=g(function(e,t){e=e.replace(Md,"").replace(Ki,"").replace(zb,`
8
+ `);for(const[r,{detector:i}]of Object.entries(Lr))if(i(e,t))return r;throw new Ad(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),ja=g((...e)=>{for(const{id:t,detector:r,loader:i}of e)$d(t,r,i)},"registerLazyLoadedDiagrams"),$d=g((e,t,r)=>{Lr[e]&&G.warn(`Detector with key ${e} already exists. Overwriting.`),Lr[e]={detector:t,loader:r},G.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),Wb=g(e=>Lr[e].loader,"getDiagramLoader"),bi=/<br\s*\/?>/gi,jb=g(e=>e?Rd(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),Hb=(()=>{let e=!1;return()=>{e||(Od(),e=!0)}})();function Od(){const e="data-temp-href-target";ci.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),ci.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}g(Od,"setupDompurifyHooks");var Id=g(e=>(Hb(),ci.sanitize(e)),"removeScript"),Ah=g((e,t)=>{if(Qt(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=Id(e):r!=="loose"&&(e=Rd(e),e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"),e=e.replace(/=/g,"&equals;"),e=Gb(e))}return e},"sanitizeMore"),pe=g((e,t)=>e&&(t.dompurifyConfig?e=ci.sanitize(Ah(e,t),t.dompurifyConfig).toString():e=ci.sanitize(Ah(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),Yb=g((e,t)=>typeof e=="string"?pe(e,t):e.flat().map(r=>pe(r,t)),"sanitizeTextOrArray"),Ub=g(e=>bi.test(e),"hasBreaks"),Xb=g(e=>e.split(bi),"splitBreaks"),Gb=g(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Rd=g(e=>e.replace(bi,"#br#"),"breakToPlaceholder"),Pd=g(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),Vb=g(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),Zb=g(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),Ha=g(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let s=t[i];if(s===","&&i>0&&i+1<t.length){const o=t[i-1],a=t[i+1];Kb(o,a)&&(s=o+","+a,i++,r.pop())}r.push(Qb(s))}return r.join("")},"parseGenericTypes"),Ya=g((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),Kb=g((e,t)=>{const r=Ya(e,"~"),i=Ya(t,"~");return r===1&&i===1},"shouldCombineSets"),Qb=g(e=>{const t=Ya(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let s=i.indexOf("~"),o=i.lastIndexOf("~");for(;s!==-1&&o!==-1&&s!==o;)i[s]="<",i[o]=">",s=i.indexOf("~"),o=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),$h=g(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Ua=/\$\$(.*?)\$\$/g,ui=g(e=>(e.match(Ua)?.length??0)>0,"hasKatex"),Jb=g(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await rl(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r);const s={width:r.clientWidth,height:r.clientHeight};return r.remove(),s},"calculateMathMLDimensions"),tk=g(async(e,t)=>{if(!ui(e))return e;if(!($h()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Ua,"MathML is unsupported in this environment.");{const{default:r}=await import("katex"),i=t.forceLegacyMathML||!$h()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(bi).map(s=>ui(s)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${s}</div>`:`<div>${s}</div>`).join("").replace(Ua,(s,o)=>r.renderToString(o,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),rl=g(async(e,t)=>pe(await tk(e,t),t),"renderKatexSanitized"),ki={getRows:jb,sanitizeText:pe,sanitizeTextOrArray:Yb,hasBreaks:Ub,splitBreaks:Xb,lineBreakRegex:bi,removeScript:Id,getUrl:Pd,evaluate:De,getMax:Vb,getMin:Zb},ek=g(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),rk=g(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),il=g(function(e,t,r,i){const s=rk(t,r,i);ek(e,s)},"configureSvgSize"),Dd=g(function(e,t,r,i){const s=t.node().getBBox(),o=s.width,a=s.height;G.info(`SVG bounds: ${o}x${a}`,s);let n=0,l=0;G.info(`Graph bounds: ${n}x${l}`,e),n=o+r*2,l=a+r*2,G.info(`Calculated bounds: ${n}x${l}`),il(t,l,n,i);const c=`${s.x-r} ${s.y-r} ${s.width+2*r} ${s.height+2*r}`;t.attr("viewBox",c)},"setupGraphViewbox"),Hs={};function Xa(e){return[...e.cssRules].map(t=>t.cssText).join(`
9
+ `)}g(Xa,"cssStyleSheetToString");var ik=g((e,t,r,i)=>{let s="";return e in Hs&&Hs[e]?s=Hs[e]({...r,svgId:i}):G.warn(`No theme found for ${e}`),` & {
10
+ font-family: ${r.fontFamily};
11
+ font-size: ${r.fontSize};
12
+ fill: ${r.textColor}
13
+ }
14
+ @keyframes edge-animation-frame {
15
+ from {
16
+ stroke-dashoffset: 0;
17
+ }
18
+ }
19
+ @keyframes dash {
20
+ to {
21
+ stroke-dashoffset: 0;
22
+ }
23
+ }
24
+ & .edge-animation-slow {
25
+ stroke-dasharray: 9,5 !important;
26
+ stroke-dashoffset: 900;
27
+ animation: dash 50s linear infinite;
28
+ stroke-linecap: round;
29
+ }
30
+ & .edge-animation-fast {
31
+ stroke-dasharray: 9,5 !important;
32
+ stroke-dashoffset: 900;
33
+ animation: dash 20s linear infinite;
34
+ stroke-linecap: round;
35
+ }
36
+ /* Classes common for multiple diagrams */
37
+
38
+ & .error-icon {
39
+ fill: ${r.errorBkgColor};
40
+ }
41
+ & .error-text {
42
+ fill: ${r.errorTextColor};
43
+ stroke: ${r.errorTextColor};
44
+ }
45
+
46
+ & .edge-thickness-normal {
47
+ stroke-width: ${r.strokeWidth??1}px;
48
+ }
49
+ & .edge-thickness-thick {
50
+ stroke-width: 3.5px
51
+ }
52
+ & .edge-pattern-solid {
53
+ stroke-dasharray: 0;
54
+ }
55
+ & .edge-thickness-invisible {
56
+ stroke-width: 0;
57
+ fill: none;
58
+ }
59
+ & .edge-pattern-dashed{
60
+ stroke-dasharray: 3;
61
+ }
62
+ .edge-pattern-dotted {
63
+ stroke-dasharray: 2;
64
+ }
65
+
66
+ & .marker {
67
+ fill: ${r.lineColor};
68
+ stroke: ${r.lineColor};
69
+ }
70
+ & .marker.cross {
71
+ stroke: ${r.lineColor};
72
+ }
73
+
74
+ & svg {
75
+ font-family: ${r.fontFamily};
76
+ font-size: ${r.fontSize};
77
+ }
78
+ & p {
79
+ margin: 0
80
+ }
81
+
82
+ ${s}
83
+ .node .neo-node {
84
+ stroke: ${r.nodeBorder};
85
+ }
86
+
87
+ [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
88
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
89
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
90
+ }
91
+ [data-look="neo"].swimlane.cluster rect {
92
+ filter: none;
93
+ }
94
+
95
+
96
+ [data-look="neo"].node path {
97
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
98
+ stroke-width: ${r.strokeWidth??1}px;
99
+ }
100
+
101
+ [data-look="neo"].node .outer-path {
102
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
103
+ }
104
+
105
+ [data-look="neo"].node .neo-line path {
106
+ stroke: ${r.nodeBorder};
107
+ filter: none;
108
+ }
109
+
110
+ [data-look="neo"].node circle{
111
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
112
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
113
+ }
114
+
115
+ [data-look="neo"].node circle .state-start{
116
+ fill: #000000;
117
+ }
118
+
119
+ [data-look="neo"].icon-shape .icon {
120
+ fill: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
121
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
122
+ }
123
+
124
+ [data-look="neo"].icon-shape .icon-neo path {
125
+ stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
126
+ filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
127
+ }
128
+
129
+ ${t}
130
+ `},"getStyles"),sk=g((e,t)=>{t!==void 0&&(Hs[e]=t)},"addStylesForDiagram"),ok=ik,sl={};Cd(sl,{clear:()=>Nd,getAccDescription:()=>jd,getAccTitle:()=>zd,getDiagramTitle:()=>Yd,setAccDescription:()=>Wd,setAccTitle:()=>qd,setDiagramTitle:()=>Hd});var ol="",al="",nl="",ll=g(e=>pe(e,Bt()),"sanitizeText"),Nd=g(()=>{ol="",nl="",al=""},"clear"),qd=g(e=>{ol=ll(e).replace(/^\s+/g,"")},"setAccTitle"),zd=g(()=>ol,"getAccTitle"),Wd=g(e=>{nl=ll(e).replace(/\n\s+/g,`
131
+ `)},"setAccDescription"),jd=g(()=>nl,"getAccDescription"),Hd=g(e=>{al=ll(e)},"setDiagramTitle"),Yd=g(()=>al,"getDiagramTitle"),Oh=G,ak=Qn,xt=Bt,nk=Bd,lk=di,hl=g(e=>pe(e,xt()),"sanitizeText"),Ud=Dd,hk=g(()=>sl,"getCommonDb"),ao={},no=g((e,t,r)=>{ao[e]&&Oh.warn(`Diagram with id ${e} already registered. Overwriting.`),ao[e]=t,r&&$d(e,r),sk(e,t.styles),t.injectUtils?.(Oh,ak,xt,hl,Ud,hk(),()=>{})},"registerDiagram"),Ga=g(e=>{if(e in ao)return ao[e];throw new ck(e)},"getDiagram"),li,ck=(li=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},g(li,"DiagramNotFoundError"),li),dk={value:()=>{}};function Xd(){for(var e=0,t=arguments.length,r={},i;e<t;++e){if(!(i=arguments[e]+"")||i in r||/[\s.]/.test(i))throw new Error("illegal type: "+i);r[i]=[]}return new Ys(r)}function Ys(e){this._=e}function uk(e,t){return e.trim().split(/^|\s+/).map(function(r){var i="",s=r.indexOf(".");if(s>=0&&(i=r.slice(s+1),r=r.slice(0,s)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}Ys.prototype=Xd.prototype={constructor:Ys,on:function(e,t){var r=this._,i=uk(e+"",r),s,o=-1,a=i.length;if(arguments.length<2){for(;++o<a;)if((s=(e=i[o]).type)&&(s=fk(r[s],e.name)))return s;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<a;)if(s=(e=i[o]).type)r[s]=Ih(r[s],e.name,t);else if(t==null)for(s in r)r[s]=Ih(r[s],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new Ys(e)},call:function(e,t){if((s=arguments.length-2)>0)for(var r=new Array(s),i=0,s,o;i<s;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],i=0,s=o.length;i<s;++i)o[i].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],s=0,o=i.length;s<o;++s)i[s].value.apply(t,r)}};function fk(e,t){for(var r=0,i=e.length,s;r<i;++r)if((s=e[r]).name===t)return s.value}function Ih(e,t,r){for(var i=0,s=e.length;i<s;++i)if(e[i].name===t){e[i]=dk,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var Va="http://www.w3.org/1999/xhtml";const Rh={svg:"http://www.w3.org/2000/svg",xhtml:Va,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function No(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Rh.hasOwnProperty(t)?{space:Rh[t],local:e}:e}function gk(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Va&&t.documentElement.namespaceURI===Va?t.createElement(e):t.createElementNS(r,e)}}function pk(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Gd(e){var t=No(e);return(t.local?pk:gk)(t)}function mk(){}function cl(e){return e==null?mk:function(){return this.querySelector(e)}}function yk(e){typeof e!="function"&&(e=cl(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var o=t[s],a=o.length,n=i[s]=new Array(a),l,c,h=0;h<a;++h)(l=o[h])&&(c=e.call(l,l.__data__,h,o))&&("__data__"in l&&(c.__data__=l.__data__),n[h]=c);return new de(i,this._parents)}function xk(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Ck(){return[]}function Vd(e){return e==null?Ck:function(){return this.querySelectorAll(e)}}function bk(e){return function(){return xk(e.apply(this,arguments))}}function kk(e){typeof e=="function"?e=bk(e):e=Vd(e);for(var t=this._groups,r=t.length,i=[],s=[],o=0;o<r;++o)for(var a=t[o],n=a.length,l,c=0;c<n;++c)(l=a[c])&&(i.push(e.call(l,l.__data__,c,a)),s.push(l));return new de(i,s)}function Zd(e){return function(){return this.matches(e)}}function Kd(e){return function(t){return t.matches(e)}}var wk=Array.prototype.find;function Sk(e){return function(){return wk.call(this.children,e)}}function vk(){return this.firstElementChild}function Tk(e){return this.select(e==null?vk:Sk(typeof e=="function"?e:Kd(e)))}var _k=Array.prototype.filter;function Bk(){return Array.from(this.children)}function Lk(e){return function(){return _k.call(this.children,e)}}function Fk(e){return this.selectAll(e==null?Bk:Lk(typeof e=="function"?e:Kd(e)))}function Ek(e){typeof e!="function"&&(e=Zd(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var o=t[s],a=o.length,n=i[s]=[],l,c=0;c<a;++c)(l=o[c])&&e.call(l,l.__data__,c,o)&&n.push(l);return new de(i,this._parents)}function Qd(e){return new Array(e.length)}function Mk(){return new de(this._enter||this._groups.map(Qd),this._parents)}function lo(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}lo.prototype={constructor:lo,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function Ak(e){return function(){return e}}function $k(e,t,r,i,s,o){for(var a=0,n,l=t.length,c=o.length;a<c;++a)(n=t[a])?(n.__data__=o[a],i[a]=n):r[a]=new lo(e,o[a]);for(;a<l;++a)(n=t[a])&&(s[a]=n)}function Ok(e,t,r,i,s,o,a){var n,l,c=new Map,h=t.length,d=o.length,f=new Array(h),u;for(n=0;n<h;++n)(l=t[n])&&(f[n]=u=a.call(l,l.__data__,n,t)+"",c.has(u)?s[n]=l:c.set(u,l));for(n=0;n<d;++n)u=a.call(e,o[n],n,o)+"",(l=c.get(u))?(i[n]=l,l.__data__=o[n],c.delete(u)):r[n]=new lo(e,o[n]);for(n=0;n<h;++n)(l=t[n])&&c.get(f[n])===l&&(s[n]=l)}function Ik(e){return e.__data__}function Rk(e,t){if(!arguments.length)return Array.from(this,Ik);var r=t?Ok:$k,i=this._parents,s=this._groups;typeof e!="function"&&(e=Ak(e));for(var o=s.length,a=new Array(o),n=new Array(o),l=new Array(o),c=0;c<o;++c){var h=i[c],d=s[c],f=d.length,u=Pk(e.call(h,h&&h.__data__,c,i)),p=u.length,m=n[c]=new Array(p),y=a[c]=new Array(p),x=l[c]=new Array(f);r(h,d,m,y,x,u,t);for(var C=0,k=0,v,S;C<p;++C)if(v=m[C]){for(C>=k&&(k=C+1);!(S=y[k])&&++k<p;);v._next=S||null}}return a=new de(a,i),a._enter=n,a._exit=l,a}function Pk(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Dk(){return new de(this._exit||this._groups.map(Qd),this._parents)}function Nk(e,t,r){var i=this.enter(),s=this,o=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(s=t(s),s&&(s=s.selection())),r==null?o.remove():r(o),i&&s?i.merge(s).order():s}function qk(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,s=r.length,o=i.length,a=Math.min(s,o),n=new Array(s),l=0;l<a;++l)for(var c=r[l],h=i[l],d=c.length,f=n[l]=new Array(d),u,p=0;p<d;++p)(u=c[p]||h[p])&&(f[p]=u);for(;l<s;++l)n[l]=r[l];return new de(n,this._parents)}function zk(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],s=i.length-1,o=i[s],a;--s>=0;)(a=i[s])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function Wk(e){e||(e=jk);function t(d,f){return d&&f?e(d.__data__,f.__data__):!d-!f}for(var r=this._groups,i=r.length,s=new Array(i),o=0;o<i;++o){for(var a=r[o],n=a.length,l=s[o]=new Array(n),c,h=0;h<n;++h)(c=a[h])&&(l[h]=c);l.sort(t)}return new de(s,this._parents).order()}function jk(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Hk(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Yk(){return Array.from(this)}function Uk(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,o=i.length;s<o;++s){var a=i[s];if(a)return a}return null}function Xk(){let e=0;for(const t of this)++e;return e}function Gk(){return!this.node()}function Vk(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var s=t[r],o=0,a=s.length,n;o<a;++o)(n=s[o])&&e.call(n,n.__data__,o,s);return this}function Zk(e){return function(){this.removeAttribute(e)}}function Kk(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Qk(e,t){return function(){this.setAttribute(e,t)}}function Jk(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function t1(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function e1(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function r1(e,t){var r=No(e);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((t==null?r.local?Kk:Zk:typeof t=="function"?r.local?e1:t1:r.local?Jk:Qk)(r,t))}function Jd(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function i1(e){return function(){this.style.removeProperty(e)}}function s1(e,t,r){return function(){this.style.setProperty(e,t,r)}}function o1(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function a1(e,t,r){return arguments.length>1?this.each((t==null?i1:typeof t=="function"?o1:s1)(e,t,r??"")):fi(this.node(),e)}function fi(e,t){return e.style.getPropertyValue(t)||Jd(e).getComputedStyle(e,null).getPropertyValue(t)}function n1(e){return function(){delete this[e]}}function l1(e,t){return function(){this[e]=t}}function h1(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function c1(e,t){return arguments.length>1?this.each((t==null?n1:typeof t=="function"?h1:l1)(e,t)):this.node()[e]}function tu(e){return e.trim().split(/^|\s+/)}function dl(e){return e.classList||new eu(e)}function eu(e){this._node=e,this._names=tu(e.getAttribute("class")||"")}eu.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function ru(e,t){for(var r=dl(e),i=-1,s=t.length;++i<s;)r.add(t[i])}function iu(e,t){for(var r=dl(e),i=-1,s=t.length;++i<s;)r.remove(t[i])}function d1(e){return function(){ru(this,e)}}function u1(e){return function(){iu(this,e)}}function f1(e,t){return function(){(t.apply(this,arguments)?ru:iu)(this,e)}}function g1(e,t){var r=tu(e+"");if(arguments.length<2){for(var i=dl(this.node()),s=-1,o=r.length;++s<o;)if(!i.contains(r[s]))return!1;return!0}return this.each((typeof t=="function"?f1:t?d1:u1)(r,t))}function p1(){this.textContent=""}function m1(e){return function(){this.textContent=e}}function y1(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function x1(e){return arguments.length?this.each(e==null?p1:(typeof e=="function"?y1:m1)(e)):this.node().textContent}function C1(){this.innerHTML=""}function b1(e){return function(){this.innerHTML=e}}function k1(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function w1(e){return arguments.length?this.each(e==null?C1:(typeof e=="function"?k1:b1)(e)):this.node().innerHTML}function S1(){this.nextSibling&&this.parentNode.appendChild(this)}function v1(){return this.each(S1)}function T1(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function _1(){return this.each(T1)}function B1(e){var t=typeof e=="function"?e:Gd(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function L1(){return null}function F1(e,t){var r=typeof e=="function"?e:Gd(e),i=t==null?L1:typeof t=="function"?t:cl(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function E1(){var e=this.parentNode;e&&e.removeChild(this)}function M1(){return this.each(E1)}function A1(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function $1(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function O1(e){return this.select(e?$1:A1)}function I1(e){return arguments.length?this.property("__data__",e):this.node().__data__}function R1(e){return function(t){e.call(this,t,this.__data__)}}function P1(e){return e.trim().split(/^|\s+/).map(function(t){var r="",i=t.indexOf(".");return i>=0&&(r=t.slice(i+1),t=t.slice(0,i)),{type:t,name:r}})}function D1(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,s=t.length,o;r<s;++r)o=t[r],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.options):t[++i]=o;++i?t.length=i:delete this.__on}}}function N1(e,t,r){return function(){var i=this.__on,s,o=R1(t);if(i){for(var a=0,n=i.length;a<n;++a)if((s=i[a]).type===e.type&&s.name===e.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=o,s.options=r),s.value=t;return}}this.addEventListener(e.type,o,r),s={type:e.type,name:e.name,value:t,listener:o,options:r},i?i.push(s):this.__on=[s]}}function q1(e,t,r){var i=P1(e+""),s,o=i.length,a;if(arguments.length<2){var n=this.node().__on;if(n){for(var l=0,c=n.length,h;l<c;++l)for(s=0,h=n[l];s<o;++s)if((a=i[s]).type===h.type&&a.name===h.name)return h.value}return}for(n=t?N1:D1,s=0;s<o;++s)this.each(n(i[s],t,r));return this}function su(e,t,r){var i=Jd(e),s=i.CustomEvent;typeof s=="function"?s=new s(t,r):(s=i.document.createEvent("Event"),r?(s.initEvent(t,r.bubbles,r.cancelable),s.detail=r.detail):s.initEvent(t,!1,!1)),e.dispatchEvent(s)}function z1(e,t){return function(){return su(this,e,t)}}function W1(e,t){return function(){return su(this,e,t.apply(this,arguments))}}function j1(e,t){return this.each((typeof t=="function"?W1:z1)(e,t))}function*H1(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,o=i.length,a;s<o;++s)(a=i[s])&&(yield a)}var ou=[null];function de(e,t){this._groups=e,this._parents=t}function ps(){return new de([[document.documentElement]],ou)}function Y1(){return this}de.prototype=ps.prototype={constructor:de,select:yk,selectAll:kk,selectChild:Tk,selectChildren:Fk,filter:Ek,data:Rk,enter:Mk,exit:Dk,join:Nk,merge:qk,selection:Y1,order:zk,sort:Wk,call:Hk,nodes:Yk,node:Uk,size:Xk,empty:Gk,each:Vk,attr:r1,style:a1,property:c1,classed:g1,text:x1,html:w1,raise:v1,lower:_1,append:B1,insert:F1,remove:M1,clone:O1,datum:I1,on:q1,dispatch:j1,[Symbol.iterator]:H1};function pt(e){return typeof e=="string"?new de([[document.querySelector(e)]],[document.documentElement]):new de([[e]],ou)}function qo(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function ul(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}function wi(){}var is=.7,ho=1/is,Gr="\\s*([+-]?\\d+)\\s*",ss="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",$e="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",U1=/^#([0-9a-f]{3,8})$/,X1=new RegExp(`^rgb\\(${Gr},${Gr},${Gr}\\)$`),G1=new RegExp(`^rgb\\(${$e},${$e},${$e}\\)$`),V1=new RegExp(`^rgba\\(${Gr},${Gr},${Gr},${ss}\\)$`),Z1=new RegExp(`^rgba\\(${$e},${$e},${$e},${ss}\\)$`),K1=new RegExp(`^hsl\\(${ss},${$e},${$e}\\)$`),Q1=new RegExp(`^hsla\\(${ss},${$e},${$e},${ss}\\)$`),Ph={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};qo(wi,gi,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Dh,formatHex:Dh,formatHex8:J1,formatHsl:t2,formatRgb:Nh,toString:Nh});function Dh(){return this.rgb().formatHex()}function J1(){return this.rgb().formatHex8()}function t2(){return nu(this).formatHsl()}function Nh(){return this.rgb().formatRgb()}function gi(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=U1.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?qh(t):r===3?new te(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Ms(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Ms(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=X1.exec(e))?new te(t[1],t[2],t[3],1):(t=G1.exec(e))?new te(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=V1.exec(e))?Ms(t[1],t[2],t[3],t[4]):(t=Z1.exec(e))?Ms(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=K1.exec(e))?jh(t[1],t[2]/100,t[3]/100,1):(t=Q1.exec(e))?jh(t[1],t[2]/100,t[3]/100,t[4]):Ph.hasOwnProperty(e)?qh(Ph[e]):e==="transparent"?new te(NaN,NaN,NaN,0):null}function qh(e){return new te(e>>16&255,e>>8&255,e&255,1)}function Ms(e,t,r,i){return i<=0&&(e=t=r=NaN),new te(e,t,r,i)}function au(e){return e instanceof wi||(e=gi(e)),e?(e=e.rgb(),new te(e.r,e.g,e.b,e.opacity)):new te}function Za(e,t,r,i){return arguments.length===1?au(e):new te(e,t,r,i??1)}function te(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}qo(te,Za,ul(wi,{brighter(e){return e=e==null?ho:Math.pow(ho,e),new te(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?is:Math.pow(is,e),new te(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new te(vr(this.r),vr(this.g),vr(this.b),co(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:zh,formatHex:zh,formatHex8:e2,formatRgb:Wh,toString:Wh}));function zh(){return`#${kr(this.r)}${kr(this.g)}${kr(this.b)}`}function e2(){return`#${kr(this.r)}${kr(this.g)}${kr(this.b)}${kr((isNaN(this.opacity)?1:this.opacity)*255)}`}function Wh(){const e=co(this.opacity);return`${e===1?"rgb(":"rgba("}${vr(this.r)}, ${vr(this.g)}, ${vr(this.b)}${e===1?")":`, ${e})`}`}function co(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function vr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function kr(e){return e=vr(e),(e<16?"0":"")+e.toString(16)}function jh(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Se(e,t,r,i)}function nu(e){if(e instanceof Se)return new Se(e.h,e.s,e.l,e.opacity);if(e instanceof wi||(e=gi(e)),!e)return new Se;if(e instanceof Se)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,s=Math.min(t,r,i),o=Math.max(t,r,i),a=NaN,n=o-s,l=(o+s)/2;return n?(t===o?a=(r-i)/n+(r<i)*6:r===o?a=(i-t)/n+2:a=(t-r)/n+4,n/=l<.5?o+s:2-o-s,a*=60):n=l>0&&l<1?0:a,new Se(a,n,l,e.opacity)}function r2(e,t,r,i){return arguments.length===1?nu(e):new Se(e,t,r,i??1)}function Se(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}qo(Se,r2,ul(wi,{brighter(e){return e=e==null?ho:Math.pow(ho,e),new Se(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?is:Math.pow(is,e),new Se(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*t,s=2*r-i;return new te(ba(e>=240?e-240:e+120,s,i),ba(e,s,i),ba(e<120?e+240:e-120,s,i),this.opacity)},clamp(){return new Se(Hh(this.h),As(this.s),As(this.l),co(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=co(this.opacity);return`${e===1?"hsl(":"hsla("}${Hh(this.h)}, ${As(this.s)*100}%, ${As(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Hh(e){return e=(e||0)%360,e<0?e+360:e}function As(e){return Math.max(0,Math.min(1,e||0))}function ba(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const zo=e=>()=>e;function lu(e,t){return function(r){return e+r*t}}function i2(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(i){return Math.pow(e+i*t,r)}}function s2(e,t){var r=t-e;return r?lu(e,r>180||r<-180?r-360*Math.round(r/360):r):zo(isNaN(e)?t:e)}function o2(e){return(e=+e)==1?fl:function(t,r){return r-t?i2(t,r,e):zo(isNaN(t)?r:t)}}function fl(e,t){var r=t-e;return r?lu(e,r):zo(isNaN(e)?t:e)}const Ka=(function e(t){var r=o2(t);function i(s,o){var a=r((s=Za(s)).r,(o=Za(o)).r),n=r(s.g,o.g),l=r(s.b,o.b),c=fl(s.opacity,o.opacity);return function(h){return s.r=a(h),s.g=n(h),s.b=l(h),s.opacity=c(h),s+""}}return i.gamma=e,i})(1);function Ue(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var Qa=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ka=new RegExp(Qa.source,"g");function a2(e){return function(){return e}}function n2(e){return function(t){return e(t)+""}}function hu(e,t){var r=Qa.lastIndex=ka.lastIndex=0,i,s,o,a=-1,n=[],l=[];for(e=e+"",t=t+"";(i=Qa.exec(e))&&(s=ka.exec(t));)(o=s.index)>r&&(o=t.slice(r,o),n[a]?n[a]+=o:n[++a]=o),(i=i[0])===(s=s[0])?n[a]?n[a]+=s:n[++a]=s:(n[++a]=null,l.push({i:a,x:Ue(i,s)})),r=ka.lastIndex;return r<t.length&&(o=t.slice(r),n[a]?n[a]+=o:n[++a]=o),n.length<2?l[0]?n2(l[0].x):a2(t):(t=l.length,function(c){for(var h=0,d;h<t;++h)n[(d=l[h]).i]=d.x(c);return n.join("")})}var Yh=180/Math.PI,Ja={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function cu(e,t,r,i,s,o){var a,n,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*r+t*i)&&(r-=e*l,i-=t*l),(n=Math.sqrt(r*r+i*i))&&(r/=n,i/=n,l/=n),e*i<t*r&&(e=-e,t=-t,l=-l,a=-a),{translateX:s,translateY:o,rotate:Math.atan2(t,e)*Yh,skewX:Math.atan(l)*Yh,scaleX:a,scaleY:n}}var $s;function l2(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Ja:cu(t.a,t.b,t.c,t.d,t.e,t.f)}function h2(e){return e==null||($s||($s=document.createElementNS("http://www.w3.org/2000/svg","g")),$s.setAttribute("transform",e),!(e=$s.transform.baseVal.consolidate()))?Ja:(e=e.matrix,cu(e.a,e.b,e.c,e.d,e.e,e.f))}function du(e,t,r,i){function s(c){return c.length?c.pop()+" ":""}function o(c,h,d,f,u,p){if(c!==d||h!==f){var m=u.push("translate(",null,t,null,r);p.push({i:m-4,x:Ue(c,d)},{i:m-2,x:Ue(h,f)})}else(d||f)&&u.push("translate("+d+t+f+r)}function a(c,h,d,f){c!==h?(c-h>180?h+=360:h-c>180&&(c+=360),f.push({i:d.push(s(d)+"rotate(",null,i)-2,x:Ue(c,h)})):h&&d.push(s(d)+"rotate("+h+i)}function n(c,h,d,f){c!==h?f.push({i:d.push(s(d)+"skewX(",null,i)-2,x:Ue(c,h)}):h&&d.push(s(d)+"skewX("+h+i)}function l(c,h,d,f,u,p){if(c!==d||h!==f){var m=u.push(s(u)+"scale(",null,",",null,")");p.push({i:m-4,x:Ue(c,d)},{i:m-2,x:Ue(h,f)})}else(d!==1||f!==1)&&u.push(s(u)+"scale("+d+","+f+")")}return function(c,h){var d=[],f=[];return c=e(c),h=e(h),o(c.translateX,c.translateY,h.translateX,h.translateY,d,f),a(c.rotate,h.rotate,d,f),n(c.skewX,h.skewX,d,f),l(c.scaleX,c.scaleY,h.scaleX,h.scaleY,d,f),c=h=null,function(u){for(var p=-1,m=f.length,y;++p<m;)d[(y=f[p]).i]=y.x(u);return d.join("")}}}var c2=du(l2,"px, ","px)","deg)"),d2=du(h2,", ",")",")"),pi=0,Wi=0,$i=0,uu=1e3,uo,ji,fo=0,Fr=0,Wo=0,os=typeof performance=="object"&&performance.now?performance:Date,fu=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function gl(){return Fr||(fu(u2),Fr=os.now()+Wo)}function u2(){Fr=0}function go(){this._call=this._time=this._next=null}go.prototype=gu.prototype={constructor:go,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?gl():+r)+(t==null?0:+t),!this._next&&ji!==this&&(ji?ji._next=this:uo=this,ji=this),this._call=e,this._time=r,tn()},stop:function(){this._call&&(this._call=null,this._time=1/0,tn())}};function gu(e,t,r){var i=new go;return i.restart(e,t,r),i}function f2(){gl(),++pi;for(var e=uo,t;e;)(t=Fr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--pi}function Uh(){Fr=(fo=os.now())+Wo,pi=Wi=0;try{f2()}finally{pi=0,p2(),Fr=0}}function g2(){var e=os.now(),t=e-fo;t>uu&&(Wo-=t,fo=e)}function p2(){for(var e,t=uo,r,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:uo=r);ji=e,tn(i)}function tn(e){if(!pi){Wi&&(Wi=clearTimeout(Wi));var t=e-Fr;t>24?(e<1/0&&(Wi=setTimeout(Uh,e-os.now()-Wo)),$i&&($i=clearInterval($i))):($i||(fo=os.now(),$i=setInterval(g2,uu)),pi=1,fu(Uh))}}function Xh(e,t,r){var i=new go;return t=t==null?0:+t,i.restart(s=>{i.stop(),e(s+t)},t,r),i}var m2=Xd("start","end","cancel","interrupt"),y2=[],pu=0,Gh=1,en=2,Us=3,Vh=4,rn=5,Xs=6;function jo(e,t,r,i,s,o){var a=e.__transition;if(!a)e.__transition={};else if(r in a)return;x2(e,r,{name:t,index:i,group:s,on:m2,tween:y2,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:pu})}function pl(e,t){var r=Be(e,t);if(r.state>pu)throw new Error("too late; already scheduled");return r}function Ne(e,t){var r=Be(e,t);if(r.state>Us)throw new Error("too late; already running");return r}function Be(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function x2(e,t,r){var i=e.__transition,s;i[t]=r,r.timer=gu(o,0,r.time);function o(c){r.state=Gh,r.timer.restart(a,r.delay,r.time),r.delay<=c&&a(c-r.delay)}function a(c){var h,d,f,u;if(r.state!==Gh)return l();for(h in i)if(u=i[h],u.name===r.name){if(u.state===Us)return Xh(a);u.state===Vh?(u.state=Xs,u.timer.stop(),u.on.call("interrupt",e,e.__data__,u.index,u.group),delete i[h]):+h<t&&(u.state=Xs,u.timer.stop(),u.on.call("cancel",e,e.__data__,u.index,u.group),delete i[h])}if(Xh(function(){r.state===Us&&(r.state=Vh,r.timer.restart(n,r.delay,r.time),n(c))}),r.state=en,r.on.call("start",e,e.__data__,r.index,r.group),r.state===en){for(r.state=Us,s=new Array(f=r.tween.length),h=0,d=-1;h<f;++h)(u=r.tween[h].value.call(e,e.__data__,r.index,r.group))&&(s[++d]=u);s.length=d+1}}function n(c){for(var h=c<r.duration?r.ease.call(null,c/r.duration):(r.timer.restart(l),r.state=rn,1),d=-1,f=s.length;++d<f;)s[d].call(e,h);r.state===rn&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=Xs,r.timer.stop(),delete i[t];for(var c in i)return;delete e.__transition}}function C2(e,t){var r=e.__transition,i,s,o=!0,a;if(r){t=t==null?null:t+"";for(a in r){if((i=r[a]).name!==t){o=!1;continue}s=i.state>en&&i.state<rn,i.state=Xs,i.timer.stop(),i.on.call(s?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[a]}o&&delete e.__transition}}function b2(e){return this.each(function(){C2(this,e)})}function k2(e,t){var r,i;return function(){var s=Ne(this,e),o=s.tween;if(o!==r){i=r=o;for(var a=0,n=i.length;a<n;++a)if(i[a].name===t){i=i.slice(),i.splice(a,1);break}}s.tween=i}}function w2(e,t,r){var i,s;if(typeof r!="function")throw new Error;return function(){var o=Ne(this,e),a=o.tween;if(a!==i){s=(i=a).slice();for(var n={name:t,value:r},l=0,c=s.length;l<c;++l)if(s[l].name===t){s[l]=n;break}l===c&&s.push(n)}o.tween=s}}function S2(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=Be(this.node(),r).tween,s=0,o=i.length,a;s<o;++s)if((a=i[s]).name===e)return a.value;return null}return this.each((t==null?k2:w2)(r,e,t))}function ml(e,t,r){var i=e._id;return e.each(function(){var s=Ne(this,i);(s.value||(s.value={}))[t]=r.apply(this,arguments)}),function(s){return Be(s,i).value[t]}}function mu(e,t){var r;return(typeof t=="number"?Ue:t instanceof gi?Ka:(r=gi(t))?(t=r,Ka):hu)(e,t)}function v2(e){return function(){this.removeAttribute(e)}}function T2(e){return function(){this.removeAttributeNS(e.space,e.local)}}function _2(e,t,r){var i,s=r+"",o;return function(){var a=this.getAttribute(e);return a===s?null:a===i?o:o=t(i=a,r)}}function B2(e,t,r){var i,s=r+"",o;return function(){var a=this.getAttributeNS(e.space,e.local);return a===s?null:a===i?o:o=t(i=a,r)}}function L2(e,t,r){var i,s,o;return function(){var a,n=r(this),l;return n==null?void this.removeAttribute(e):(a=this.getAttribute(e),l=n+"",a===l?null:a===i&&l===s?o:(s=l,o=t(i=a,n)))}}function F2(e,t,r){var i,s,o;return function(){var a,n=r(this),l;return n==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),l=n+"",a===l?null:a===i&&l===s?o:(s=l,o=t(i=a,n)))}}function E2(e,t){var r=No(e),i=r==="transform"?d2:mu;return this.attrTween(e,typeof t=="function"?(r.local?F2:L2)(r,i,ml(this,"attr."+e,t)):t==null?(r.local?T2:v2)(r):(r.local?B2:_2)(r,i,t))}function M2(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function A2(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function $2(e,t){var r,i;function s(){var o=t.apply(this,arguments);return o!==i&&(r=(i=o)&&A2(e,o)),r}return s._value=t,s}function O2(e,t){var r,i;function s(){var o=t.apply(this,arguments);return o!==i&&(r=(i=o)&&M2(e,o)),r}return s._value=t,s}function I2(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var i=No(e);return this.tween(r,(i.local?$2:O2)(i,t))}function R2(e,t){return function(){pl(this,e).delay=+t.apply(this,arguments)}}function P2(e,t){return t=+t,function(){pl(this,e).delay=t}}function D2(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?R2:P2)(t,e)):Be(this.node(),t).delay}function N2(e,t){return function(){Ne(this,e).duration=+t.apply(this,arguments)}}function q2(e,t){return t=+t,function(){Ne(this,e).duration=t}}function z2(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?N2:q2)(t,e)):Be(this.node(),t).duration}function W2(e,t){if(typeof t!="function")throw new Error;return function(){Ne(this,e).ease=t}}function j2(e){var t=this._id;return arguments.length?this.each(W2(t,e)):Be(this.node(),t).ease}function H2(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;Ne(this,e).ease=r}}function Y2(e){if(typeof e!="function")throw new Error;return this.each(H2(this._id,e))}function U2(e){typeof e!="function"&&(e=Zd(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var o=t[s],a=o.length,n=i[s]=[],l,c=0;c<a;++c)(l=o[c])&&e.call(l,l.__data__,c,o)&&n.push(l);return new Ze(i,this._parents,this._name,this._id)}function X2(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,s=r.length,o=Math.min(i,s),a=new Array(i),n=0;n<o;++n)for(var l=t[n],c=r[n],h=l.length,d=a[n]=new Array(h),f,u=0;u<h;++u)(f=l[u]||c[u])&&(d[u]=f);for(;n<i;++n)a[n]=t[n];return new Ze(a,this._parents,this._name,this._id)}function G2(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function V2(e,t,r){var i,s,o=G2(t)?pl:Ne;return function(){var a=o(this,e),n=a.on;n!==i&&(s=(i=n).copy()).on(t,r),a.on=s}}function Z2(e,t){var r=this._id;return arguments.length<2?Be(this.node(),r).on.on(e):this.each(V2(r,e,t))}function K2(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function Q2(){return this.on("end.remove",K2(this._id))}function J2(e){var t=this._name,r=this._id;typeof e!="function"&&(e=cl(e));for(var i=this._groups,s=i.length,o=new Array(s),a=0;a<s;++a)for(var n=i[a],l=n.length,c=o[a]=new Array(l),h,d,f=0;f<l;++f)(h=n[f])&&(d=e.call(h,h.__data__,f,n))&&("__data__"in h&&(d.__data__=h.__data__),c[f]=d,jo(c[f],t,r,f,c,Be(h,r)));return new Ze(o,this._parents,t,r)}function tw(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Vd(e));for(var i=this._groups,s=i.length,o=[],a=[],n=0;n<s;++n)for(var l=i[n],c=l.length,h,d=0;d<c;++d)if(h=l[d]){for(var f=e.call(h,h.__data__,d,l),u,p=Be(h,r),m=0,y=f.length;m<y;++m)(u=f[m])&&jo(u,t,r,m,f,p);o.push(f),a.push(h)}return new Ze(o,a,t,r)}var ew=ps.prototype.constructor;function rw(){return new ew(this._groups,this._parents)}function iw(e,t){var r,i,s;return function(){var o=fi(this,e),a=(this.style.removeProperty(e),fi(this,e));return o===a?null:o===r&&a===i?s:s=t(r=o,i=a)}}function yu(e){return function(){this.style.removeProperty(e)}}function sw(e,t,r){var i,s=r+"",o;return function(){var a=fi(this,e);return a===s?null:a===i?o:o=t(i=a,r)}}function ow(e,t,r){var i,s,o;return function(){var a=fi(this,e),n=r(this),l=n+"";return n==null&&(l=n=(this.style.removeProperty(e),fi(this,e))),a===l?null:a===i&&l===s?o:(s=l,o=t(i=a,n))}}function aw(e,t){var r,i,s,o="style."+t,a="end."+o,n;return function(){var l=Ne(this,e),c=l.on,h=l.value[o]==null?n||(n=yu(t)):void 0;(c!==r||s!==h)&&(i=(r=c).copy()).on(a,s=h),l.on=i}}function nw(e,t,r){var i=(e+="")=="transform"?c2:mu;return t==null?this.styleTween(e,iw(e,i)).on("end.style."+e,yu(e)):typeof t=="function"?this.styleTween(e,ow(e,i,ml(this,"style."+e,t))).each(aw(this._id,e)):this.styleTween(e,sw(e,i,t),r).on("end.style."+e,null)}function lw(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function hw(e,t,r){var i,s;function o(){var a=t.apply(this,arguments);return a!==s&&(i=(s=a)&&lw(e,a,r)),i}return o._value=t,o}function cw(e,t,r){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,hw(e,t,r??""))}function dw(e){return function(){this.textContent=e}}function uw(e){return function(){var t=e(this);this.textContent=t??""}}function fw(e){return this.tween("text",typeof e=="function"?uw(ml(this,"text",e)):dw(e==null?"":e+""))}function gw(e){return function(t){this.textContent=e.call(this,t)}}function pw(e){var t,r;function i(){var s=e.apply(this,arguments);return s!==r&&(t=(r=s)&&gw(s)),t}return i._value=e,i}function mw(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,pw(e))}function yw(){for(var e=this._name,t=this._id,r=xu(),i=this._groups,s=i.length,o=0;o<s;++o)for(var a=i[o],n=a.length,l,c=0;c<n;++c)if(l=a[c]){var h=Be(l,t);jo(l,e,r,c,a,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new Ze(i,this._parents,e,r)}function xw(){var e,t,r=this,i=r._id,s=r.size();return new Promise(function(o,a){var n={value:a},l={value:function(){--s===0&&o()}};r.each(function(){var c=Ne(this,i),h=c.on;h!==e&&(t=(e=h).copy(),t._.cancel.push(n),t._.interrupt.push(n),t._.end.push(l)),c.on=t}),s===0&&o()})}var Cw=0;function Ze(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function xu(){return++Cw}var je=ps.prototype;Ze.prototype={constructor:Ze,select:J2,selectAll:tw,selectChild:je.selectChild,selectChildren:je.selectChildren,filter:U2,merge:X2,selection:rw,transition:yw,call:je.call,nodes:je.nodes,node:je.node,size:je.size,empty:je.empty,each:je.each,on:Z2,attr:E2,attrTween:I2,style:nw,styleTween:cw,text:fw,textTween:mw,remove:Q2,tween:S2,delay:D2,duration:z2,ease:j2,easeVarying:Y2,end:xw,[Symbol.iterator]:je[Symbol.iterator]};function bw(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var kw={time:null,delay:0,duration:250,ease:bw};function ww(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function Sw(e){var t,r;e instanceof Ze?(t=e._id,e=e._name):(t=xu(),(r=kw).time=gl(),e=e==null?null:e+"");for(var i=this._groups,s=i.length,o=0;o<s;++o)for(var a=i[o],n=a.length,l,c=0;c<n;++c)(l=a[c])&&jo(l,e,t,c,a,r||ww(l,t));return new Ze(i,this._parents,e,t)}ps.prototype.interrupt=b2;ps.prototype.transition=Sw;const sn=Math.PI,on=2*sn,mr=1e-6,vw=on-mr;function Cu(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function Tw(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Cu;const r=10**t;return function(i){this._+=i[0];for(let s=1,o=i.length;s<o;++s)this._+=Math.round(arguments[s]*r)/r+i[s]}}class _w{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Cu:Tw(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,i,s){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+s}`}bezierCurveTo(t,r,i,s,o,a){this._append`C${+t},${+r},${+i},${+s},${this._x1=+o},${this._y1=+a}`}arcTo(t,r,i,s,o){if(t=+t,r=+r,i=+i,s=+s,o=+o,o<0)throw new Error(`negative radius: ${o}`);let a=this._x1,n=this._y1,l=i-t,c=s-r,h=a-t,d=n-r,f=h*h+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(f>mr)if(!(Math.abs(d*l-c*h)>mr)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let u=i-a,p=s-n,m=l*l+c*c,y=u*u+p*p,x=Math.sqrt(m),C=Math.sqrt(f),k=o*Math.tan((sn-Math.acos((m+f-y)/(2*x*C)))/2),v=k/C,S=k/x;Math.abs(v-1)>mr&&this._append`L${t+v*h},${r+v*d}`,this._append`A${o},${o},0,0,${+(d*u>h*p)},${this._x1=t+S*l},${this._y1=r+S*c}`}}arc(t,r,i,s,o,a){if(t=+t,r=+r,i=+i,a=!!a,i<0)throw new Error(`negative radius: ${i}`);let n=i*Math.cos(s),l=i*Math.sin(s),c=t+n,h=r+l,d=1^a,f=a?s-o:o-s;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>mr||Math.abs(this._y1-h)>mr)&&this._append`L${c},${h}`,i&&(f<0&&(f=f%on+on),f>vw?this._append`A${i},${i},0,1,${d},${t-n},${r-l}A${i},${i},0,1,${d},${this._x1=c},${this._y1=h}`:f>mr&&this._append`A${i},${i},0,${+(f>=sn)},${d},${this._x1=t+i*Math.cos(o)},${this._y1=r+i*Math.sin(o)}`)}rect(t,r,i,s){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+s}h${-i}Z`}toString(){return this._}}function yr(e){return function(){return e}}const Bw=Math.abs,Lw=Math.atan2,Fw=Math.cos,Ew=Math.max,Mw=Math.min,Aw=Math.sin,$w=Math.sqrt,an=1e-12,Ho=Math.PI,nn=Ho/2,Ow=2*Ho;function Iw(e){return e>1?0:e<-1?Ho:Math.acos(e)}function Rw(e){return e>=1?nn:e<=-1?-nn:Math.asin(e)}function bu(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);t=i}return e},()=>new _w(t)}function ku(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function wu(e){this._context=e}wu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Qi(e){return new wu(e)}function Pw(e){return e[0]}function Dw(e){return e[1]}function Su(e,t){var r=yr(!0),i=null,s=Qi,o=null,a=bu(n);e=typeof e=="function"?e:e===void 0?Pw:yr(e),t=typeof t=="function"?t:t===void 0?Dw:yr(t);function n(l){var c,h=(l=ku(l)).length,d,f=!1,u;for(i==null&&(o=s(u=a())),c=0;c<=h;++c)!(c<h&&r(d=l[c],c,l))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+e(d,c,l),+t(d,c,l));if(u)return o=null,u+""||null}return n.x=function(l){return arguments.length?(e=typeof l=="function"?l:yr(+l),n):e},n.y=function(l){return arguments.length?(t=typeof l=="function"?l:yr(+l),n):t},n.defined=function(l){return arguments.length?(r=typeof l=="function"?l:yr(!!l),n):r},n.curve=function(l){return arguments.length?(s=l,i!=null&&(o=s(i)),n):s},n.context=function(l){return arguments.length?(l==null?i=o=null:o=s(i=l),n):i},n}class vu{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function Tu(e){return new vu(e,!0)}function _u(e){return new vu(e,!1)}function or(){}function po(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function Yo(e){this._context=e}Yo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:po(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:po(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function mo(e){return new Yo(e)}function Bu(e){this._context=e}Bu.prototype={areaStart:or,areaEnd:or,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:po(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Nw(e){return new Bu(e)}function Lu(e){this._context=e}Lu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:po(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function qw(e){return new Lu(e)}function Fu(e,t){this._basis=new Yo(e),this._beta=t}Fu.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i=e[0],s=t[0],o=e[r]-i,a=t[r]-s,n=-1,l;++n<=r;)l=n/r,this._basis.point(this._beta*e[n]+(1-this._beta)*(i+l*o),this._beta*t[n]+(1-this._beta)*(s+l*a));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const zw=(function e(t){function r(i){return t===1?new Yo(i):new Fu(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function yo(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function yl(e,t){this._context=e,this._k=(1-t)/6}yl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:yo(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:yo(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Eu=(function e(t){function r(i){return new yl(i,t)}return r.tension=function(i){return e(+i)},r})(0);function xl(e,t){this._context=e,this._k=(1-t)/6}xl.prototype={areaStart:or,areaEnd:or,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:yo(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Ww=(function e(t){function r(i){return new xl(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Cl(e,t){this._context=e,this._k=(1-t)/6}Cl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:yo(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const jw=(function e(t){function r(i){return new Cl(i,t)}return r.tension=function(i){return e(+i)},r})(0);function bl(e,t,r){var i=e._x1,s=e._y1,o=e._x2,a=e._y2;if(e._l01_a>an){var n=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*n-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,s=(s*n-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>an){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,h=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*c+e._x1*e._l23_2a-t*e._l12_2a)/h,a=(a*c+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(i,s,o,a,e._x2,e._y2)}function Mu(e,t){this._context=e,this._alpha=t}Mu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:bl(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Au=(function e(t){function r(i){return t?new Mu(i,t):new yl(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function $u(e,t){this._context=e,this._alpha=t}$u.prototype={areaStart:or,areaEnd:or,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:bl(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Hw=(function e(t){function r(i){return t?new $u(i,t):new xl(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Ou(e,t){this._context=e,this._alpha=t}Ou.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:bl(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Yw=(function e(t){function r(i){return t?new Ou(i,t):new Cl(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Iu(e){this._context=e}Iu.prototype={areaStart:or,areaEnd:or,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Uw(e){return new Iu(e)}function Zh(e){return e<0?-1:1}function Kh(e,t,r){var i=e._x1-e._x0,s=t-e._x1,o=(e._y1-e._y0)/(i||s<0&&-0),a=(r-e._y1)/(s||i<0&&-0),n=(o*s+a*i)/(i+s);return(Zh(o)+Zh(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(n))||0}function Qh(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function wa(e,t,r){var i=e._x0,s=e._y0,o=e._x1,a=e._y1,n=(o-i)/3;e._context.bezierCurveTo(i+n,s+n*t,o-n,a-n*r,o,a)}function xo(e){this._context=e}xo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:wa(this,this._t0,Qh(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,wa(this,Qh(this,r=Kh(this,e,t)),r);break;default:wa(this,this._t0,r=Kh(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Ru(e){this._context=new Pu(e)}(Ru.prototype=Object.create(xo.prototype)).point=function(e,t){xo.prototype.point.call(this,t,e)};function Pu(e){this._context=e}Pu.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,i,s,o){this._context.bezierCurveTo(t,e,i,r,o,s)}};function Du(e){return new xo(e)}function Nu(e){return new Ru(e)}function qu(e){this._context=e}qu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var i=Jh(e),s=Jh(t),o=0,a=1;a<r;++o,++a)this._context.bezierCurveTo(i[0][o],s[0][o],i[1][o],s[1][o],e[a],t[a]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Jh(e){var t,r=e.length-1,i,s=new Array(r),o=new Array(r),a=new Array(r);for(s[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)s[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(s[r-1]=2,o[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=s[t]/o[t-1],o[t]-=i,a[t]-=i*a[t-1];for(s[r-1]=a[r-1]/o[r-1],t=r-2;t>=0;--t)s[t]=(a[t]-s[t+1])/o[t];for(o[r-1]=(e[r]+s[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-s[t+1];return[s,o]}function zu(e){return new qu(e)}function Uo(e,t){this._context=e,this._t=t}Uo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function Wu(e){return new Uo(e,.5)}function ju(e){return new Uo(e,0)}function Hu(e){return new Uo(e,1)}function Hi(e,t,r){this.k=e,this.x=t,this.y=r}Hi.prototype={constructor:Hi,scale:function(e){return e===1?this:new Hi(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Hi(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};Hi.prototype;var Yu=g(e=>{const{securityLevel:t}=xt();let r=pt("body");if(t==="sandbox"){const o=pt(`#i${e}`).node()?.contentDocument??document;r=pt(o.body)}return r.select(`#${e}`)},"selectSvgElement");function kl(e){return typeof e>"u"||e===null}g(kl,"isNothing");function Uu(e){return typeof e=="object"&&e!==null}g(Uu,"isObject");function Xu(e){return Array.isArray(e)?e:kl(e)?[]:[e]}g(Xu,"toArray");function Gu(e,t){var r,i,s,o;if(t)for(o=Object.keys(t),r=0,i=o.length;r<i;r+=1)s=o[r],e[s]=t[s];return e}g(Gu,"extend");function Vu(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}g(Vu,"repeat");function Zu(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}g(Zu,"isNegativeZero");var Xw=kl,Gw=Uu,Vw=Xu,Zw=Vu,Kw=Zu,Qw=Gu,qt={isNothing:Xw,isObject:Gw,toArray:Vw,repeat:Zw,isNegativeZero:Kw,extend:Qw};function wl(e,t){var r="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
132
+
133
+ `+e.mark.snippet),i+" "+r):i}g(wl,"formatError");function mi(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=wl(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}g(mi,"YAMLException$1");mi.prototype=Object.create(Error.prototype);mi.prototype.constructor=mi;mi.prototype.toString=g(function(t){return this.name+": "+wl(this,t)},"toString");var le=mi;function Gs(e,t,r,i,s){var o="",a="",n=Math.floor(s/2)-1;return i-t>n&&(o=" ... ",t=i-n+o.length),r-i>n&&(a=" ...",r=i+n-a.length),{str:o+e.slice(t,r).replace(/\t/g,"→")+a,pos:i-t+o.length}}g(Gs,"getLine");function Vs(e,t){return qt.repeat(" ",t-e.length)+e}g(Vs,"padStart");function Ku(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],s=[],o,a=-1;o=r.exec(e.buffer);)s.push(o.index),i.push(o.index+o[0].length),e.position<=o.index&&a<0&&(a=i.length-2);a<0&&(a=i.length-1);var n="",l,c,h=Math.min(e.line+t.linesAfter,s.length).toString().length,d=t.maxLength-(t.indent+h+3);for(l=1;l<=t.linesBefore&&!(a-l<0);l++)c=Gs(e.buffer,i[a-l],s[a-l],e.position-(i[a]-i[a-l]),d),n=qt.repeat(" ",t.indent)+Vs((e.line-l+1).toString(),h)+" | "+c.str+`
134
+ `+n;for(c=Gs(e.buffer,i[a],s[a],e.position,d),n+=qt.repeat(" ",t.indent)+Vs((e.line+1).toString(),h)+" | "+c.str+`
135
+ `,n+=qt.repeat("-",t.indent+h+3+c.pos)+`^
136
+ `,l=1;l<=t.linesAfter&&!(a+l>=s.length);l++)c=Gs(e.buffer,i[a+l],s[a+l],e.position-(i[a]-i[a+l]),d),n+=qt.repeat(" ",t.indent)+Vs((e.line+l+1).toString(),h)+" | "+c.str+`
137
+ `;return n.replace(/\n$/,"")}g(Ku,"makeSnippet");var Jw=Ku,tS=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],eS=["scalar","sequence","mapping"];function Qu(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}g(Qu,"compileStyleAliases");function Ju(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(tS.indexOf(r)===-1)throw new le('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=Qu(t.styleAliases||null),eS.indexOf(this.kind)===-1)throw new le('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}g(Ju,"Type$1");var Kt=Ju;function ln(e,t){var r=[];return e[t].forEach(function(i){var s=r.length;r.forEach(function(o,a){o.tag===i.tag&&o.kind===i.kind&&o.multi===i.multi&&(s=a)}),r[s]=i}),r}g(ln,"compileList");function tf(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(s){s.multi?(e.multi[s.kind].push(s),e.multi.fallback.push(s)):e[s.kind][s.tag]=e.fallback[s.tag]=s}for(g(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}g(tf,"compileMap");function Co(e){return this.extend(e)}g(Co,"Schema$1");Co.prototype.extend=g(function(t){var r=[],i=[];if(t instanceof Kt)i.push(t);else if(Array.isArray(t))i=i.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(i=i.concat(t.explicit));else throw new le("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(o){if(!(o instanceof Kt))throw new le("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(o.loadKind&&o.loadKind!=="scalar")throw new le("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(o.multi)throw new le("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(o){if(!(o instanceof Kt))throw new le("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var s=Object.create(Co.prototype);return s.implicit=(this.implicit||[]).concat(r),s.explicit=(this.explicit||[]).concat(i),s.compiledImplicit=ln(s,"implicit"),s.compiledExplicit=ln(s,"explicit"),s.compiledTypeMap=tf(s.compiledImplicit,s.compiledExplicit),s},"extend");var rS=Co,iS=new Kt("tag:yaml.org,2002:str",{kind:"scalar",construct:g(function(e){return e!==null?e:""},"construct")}),sS=new Kt("tag:yaml.org,2002:seq",{kind:"sequence",construct:g(function(e){return e!==null?e:[]},"construct")}),oS=new Kt("tag:yaml.org,2002:map",{kind:"mapping",construct:g(function(e){return e!==null?e:{}},"construct")}),aS=new rS({explicit:[iS,sS,oS]});function ef(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}g(ef,"resolveYamlNull");function rf(){return null}g(rf,"constructYamlNull");function sf(e){return e===null}g(sf,"isNull");var nS=new Kt("tag:yaml.org,2002:null",{kind:"scalar",resolve:ef,construct:rf,predicate:sf,represent:{canonical:g(function(){return"~"},"canonical"),lowercase:g(function(){return"null"},"lowercase"),uppercase:g(function(){return"NULL"},"uppercase"),camelcase:g(function(){return"Null"},"camelcase"),empty:g(function(){return""},"empty")},defaultStyle:"lowercase"});function of(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}g(of,"resolveYamlBoolean");function af(e){return e==="true"||e==="True"||e==="TRUE"}g(af,"constructYamlBoolean");function nf(e){return Object.prototype.toString.call(e)==="[object Boolean]"}g(nf,"isBoolean");var lS=new Kt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:of,construct:af,predicate:nf,represent:{lowercase:g(function(e){return e?"true":"false"},"lowercase"),uppercase:g(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:g(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function lf(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}g(lf,"isHexCode");function hf(e){return 48<=e&&e<=55}g(hf,"isOctCode");function cf(e){return 48<=e&&e<=57}g(cf,"isDecCode");function df(e){if(e===null)return!1;var t=e.length,r=0,i=!1,s;if(!t)return!1;if(s=e[r],(s==="-"||s==="+")&&(s=e[++r]),s==="0"){if(r+1===t)return!0;if(s=e[++r],s==="b"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(s!=="0"&&s!=="1")return!1;i=!0}return i&&s!=="_"}if(s==="x"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(!lf(e.charCodeAt(r)))return!1;i=!0}return i&&s!=="_"}if(s==="o"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(!hf(e.charCodeAt(r)))return!1;i=!0}return i&&s!=="_"}}if(s==="_")return!1;for(;r<t;r++)if(s=e[r],s!=="_"){if(!cf(e.charCodeAt(r)))return!1;i=!0}return!(!i||s==="_")}g(df,"resolveYamlInteger");function uf(e){var t=e,r=1,i;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),i=t[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),t=t.slice(1),i=t[0]),t==="0")return 0;if(i==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}g(uf,"constructYamlInteger");function ff(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!qt.isNegativeZero(e)}g(ff,"isInteger");var hS=new Kt("tag:yaml.org,2002:int",{kind:"scalar",resolve:df,construct:uf,predicate:ff,represent:{binary:g(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:g(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:g(function(e){return e.toString(10)},"decimal"),hexadecimal:g(function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),cS=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function gf(e){return!(e===null||!cS.test(e)||e[e.length-1]==="_")}g(gf,"resolveYamlFloat");function pf(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}g(pf,"constructYamlFloat");var dS=/^[-+]?[0-9]+e/;function mf(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(qt.isNegativeZero(e))return"-0.0";return r=e.toString(10),dS.test(r)?r.replace("e",".e"):r}g(mf,"representYamlFloat");function yf(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||qt.isNegativeZero(e))}g(yf,"isFloat");var uS=new Kt("tag:yaml.org,2002:float",{kind:"scalar",resolve:gf,construct:pf,predicate:yf,represent:mf,defaultStyle:"lowercase"}),xf=aS.extend({implicit:[nS,lS,hS,uS]}),fS=xf,Cf=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),bf=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 kf(e){return e===null?!1:Cf.exec(e)!==null||bf.exec(e)!==null}g(kf,"resolveYamlTimestamp");function wf(e){var t,r,i,s,o,a,n,l=0,c=null,h,d,f;if(t=Cf.exec(e),t===null&&(t=bf.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,s=+t[3],!t[4])return new Date(Date.UTC(r,i,s));if(o=+t[4],a=+t[5],n=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(h=+t[10],d=+(t[11]||0),c=(h*60+d)*6e4,t[9]==="-"&&(c=-c)),f=new Date(Date.UTC(r,i,s,o,a,n,l)),c&&f.setTime(f.getTime()-c),f}g(wf,"constructYamlTimestamp");function Sf(e){return e.toISOString()}g(Sf,"representYamlTimestamp");var gS=new Kt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:kf,construct:wf,instanceOf:Date,represent:Sf});function vf(e){return e==="<<"||e===null}g(vf,"resolveYamlMerge");var pS=new Kt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:vf}),Sl=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
138
+ \r`;function Tf(e){if(e===null)return!1;var t,r,i=0,s=e.length,o=Sl;for(r=0;r<s;r++)if(t=o.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}g(Tf,"resolveYamlBinary");function _f(e){var t,r,i=e.replace(/[\r\n=]/g,""),s=i.length,o=Sl,a=0,n=[];for(t=0;t<s;t++)t%4===0&&t&&(n.push(a>>16&255),n.push(a>>8&255),n.push(a&255)),a=a<<6|o.indexOf(i.charAt(t));return r=s%4*6,r===0?(n.push(a>>16&255),n.push(a>>8&255),n.push(a&255)):r===18?(n.push(a>>10&255),n.push(a>>2&255)):r===12&&n.push(a>>4&255),new Uint8Array(n)}g(_f,"constructYamlBinary");function Bf(e){var t="",r=0,i,s,o=e.length,a=Sl;for(i=0;i<o;i++)i%3===0&&i&&(t+=a[r>>18&63],t+=a[r>>12&63],t+=a[r>>6&63],t+=a[r&63]),r=(r<<8)+e[i];return s=o%3,s===0?(t+=a[r>>18&63],t+=a[r>>12&63],t+=a[r>>6&63],t+=a[r&63]):s===2?(t+=a[r>>10&63],t+=a[r>>4&63],t+=a[r<<2&63],t+=a[64]):s===1&&(t+=a[r>>2&63],t+=a[r<<4&63],t+=a[64],t+=a[64]),t}g(Bf,"representYamlBinary");function Lf(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}g(Lf,"isBinary");var mS=new Kt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Tf,construct:_f,predicate:Lf,represent:Bf}),yS=Object.prototype.hasOwnProperty,xS=Object.prototype.toString;function Ff(e){if(e===null)return!0;var t=[],r,i,s,o,a,n=e;for(r=0,i=n.length;r<i;r+=1){if(s=n[r],a=!1,xS.call(s)!=="[object Object]")return!1;for(o in s)if(yS.call(s,o))if(!a)a=!0;else return!1;if(!a)return!1;if(t.indexOf(o)===-1)t.push(o);else return!1}return!0}g(Ff,"resolveYamlOmap");function Ef(e){return e!==null?e:[]}g(Ef,"constructYamlOmap");var CS=new Kt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Ff,construct:Ef}),bS=Object.prototype.toString;function Mf(e){if(e===null)return!0;var t,r,i,s,o,a=e;for(o=new Array(a.length),t=0,r=a.length;t<r;t+=1){if(i=a[t],bS.call(i)!=="[object Object]"||(s=Object.keys(i),s.length!==1))return!1;o[t]=[s[0],i[s[0]]]}return!0}g(Mf,"resolveYamlPairs");function Af(e){if(e===null)return[];var t,r,i,s,o,a=e;for(o=new Array(a.length),t=0,r=a.length;t<r;t+=1)i=a[t],s=Object.keys(i),o[t]=[s[0],i[s[0]]];return o}g(Af,"constructYamlPairs");var kS=new Kt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Mf,construct:Af}),wS=Object.prototype.hasOwnProperty;function $f(e){if(e===null)return!0;var t,r=e;for(t in r)if(wS.call(r,t)&&r[t]!==null)return!1;return!0}g($f,"resolveYamlSet");function Of(e){return e!==null?e:{}}g(Of,"constructYamlSet");var SS=new Kt("tag:yaml.org,2002:set",{kind:"mapping",resolve:$f,construct:Of}),If=fS.extend({implicit:[gS,pS],explicit:[mS,CS,kS,SS]}),ar=Object.prototype.hasOwnProperty,bo=1,Rf=2,Pf=3,ko=4,Sa=1,vS=2,tc=3,TS=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,_S=/[\x85\u2028\u2029]/,BS=/[,\[\]\{\}]/,Df=/^(?:!|!!|![a-z\-]+!)$/i,Nf=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function hn(e){return Object.prototype.toString.call(e)}g(hn,"_class");function ve(e){return e===10||e===13}g(ve,"is_EOL");function sr(e){return e===9||e===32}g(sr,"is_WHITE_SPACE");function ee(e){return e===9||e===32||e===10||e===13}g(ee,"is_WS_OR_EOL");function wr(e){return e===44||e===91||e===93||e===123||e===125}g(wr,"is_FLOW_INDICATOR");function qf(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}g(qf,"fromHexCode");function zf(e){return e===120?2:e===117?4:e===85?8:0}g(zf,"escapedHexLen");function Wf(e){return 48<=e&&e<=57?e-48:-1}g(Wf,"fromDecimalCode");function cn(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
139
+ `:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"…":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}g(cn,"simpleEscapeSequence");function jf(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}g(jf,"charFromCodepoint");function vl(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}g(vl,"setProperty");var Hf=new Array(256),Yf=new Array(256);for(fr=0;fr<256;fr++)Hf[fr]=cn(fr)?1:0,Yf[fr]=cn(fr);var fr;function Uf(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||If,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}g(Uf,"State$1");function Tl(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=Jw(r),new le(t,r)}g(Tl,"generateError");function at(e,t){throw Tl(e,t)}g(at,"throwError");function as(e,t){e.onWarning&&e.onWarning.call(null,Tl(e,t))}g(as,"throwWarning");var ec={YAML:g(function(t,r,i){var s,o,a;t.version!==null&&at(t,"duplication of %YAML directive"),i.length!==1&&at(t,"YAML directive accepts exactly one argument"),s=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),s===null&&at(t,"ill-formed argument of the YAML directive"),o=parseInt(s[1],10),a=parseInt(s[2],10),o!==1&&at(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=a<2,a!==1&&a!==2&&as(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:g(function(t,r,i){var s,o;i.length!==2&&at(t,"TAG directive accepts exactly two arguments"),s=i[0],o=i[1],Df.test(s)||at(t,"ill-formed tag handle (first argument) of the TAG directive"),ar.call(t.tagMap,s)&&at(t,'there is a previously declared suffix for "'+s+'" tag handle'),Nf.test(o)||at(t,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch{at(t,"tag prefix is malformed: "+o)}t.tagMap[s]=o},"handleTagDirective")};function Ve(e,t,r,i){var s,o,a,n;if(t<r){if(n=e.input.slice(t,r),i)for(s=0,o=n.length;s<o;s+=1)a=n.charCodeAt(s),a===9||32<=a&&a<=1114111||at(e,"expected valid JSON character");else TS.test(n)&&at(e,"the stream contains non-printable characters");e.result+=n}}g(Ve,"captureSegment");function dn(e,t,r,i){var s,o,a,n;for(qt.isObject(r)||at(e,"cannot merge mappings; the provided source object is unacceptable"),s=Object.keys(r),a=0,n=s.length;a<n;a+=1)o=s[a],ar.call(t,o)||(vl(t,o,r[o]),i[o]=!0)}g(dn,"mergeMappings");function Sr(e,t,r,i,s,o,a,n,l){var c,h;if(Array.isArray(s))for(s=Array.prototype.slice.call(s),c=0,h=s.length;c<h;c+=1)Array.isArray(s[c])&&at(e,"nested arrays are not supported inside keys"),typeof s=="object"&&hn(s[c])==="[object Object]"&&(s[c]="[object Object]");if(typeof s=="object"&&hn(s)==="[object Object]"&&(s="[object Object]"),s=String(s),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(o))for(c=0,h=o.length;c<h;c+=1)dn(e,t,o[c],r);else dn(e,t,o,r);else!e.json&&!ar.call(r,s)&&ar.call(t,s)&&(e.line=a||e.line,e.lineStart=n||e.lineStart,e.position=l||e.position,at(e,"duplicated mapping key")),vl(t,s,o),delete r[s];return t}g(Sr,"storeMappingPair");function Xo(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):at(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}g(Xo,"readLineBreak");function At(e,t,r){for(var i=0,s=e.input.charCodeAt(e.position);s!==0;){for(;sr(s);)s===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),s=e.input.charCodeAt(++e.position);if(t&&s===35)do s=e.input.charCodeAt(++e.position);while(s!==10&&s!==13&&s!==0);if(ve(s))for(Xo(e),s=e.input.charCodeAt(e.position),i++,e.lineIndent=0;s===32;)e.lineIndent++,s=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&as(e,"deficient indentation"),i}g(At,"skipSeparationSpace");function ms(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||ee(r)))}g(ms,"testDocumentSeparator");function Go(e,t){t===1?e.result+=" ":t>1&&(e.result+=qt.repeat(`
140
+ `,t-1))}g(Go,"writeFoldedLines");function Xf(e,t,r){var i,s,o,a,n,l,c,h,d=e.kind,f=e.result,u;if(u=e.input.charCodeAt(e.position),ee(u)||wr(u)||u===35||u===38||u===42||u===33||u===124||u===62||u===39||u===34||u===37||u===64||u===96||(u===63||u===45)&&(s=e.input.charCodeAt(e.position+1),ee(s)||r&&wr(s)))return!1;for(e.kind="scalar",e.result="",o=a=e.position,n=!1;u!==0;){if(u===58){if(s=e.input.charCodeAt(e.position+1),ee(s)||r&&wr(s))break}else if(u===35){if(i=e.input.charCodeAt(e.position-1),ee(i))break}else{if(e.position===e.lineStart&&ms(e)||r&&wr(u))break;if(ve(u))if(l=e.line,c=e.lineStart,h=e.lineIndent,At(e,!1,-1),e.lineIndent>=t){n=!0,u=e.input.charCodeAt(e.position);continue}else{e.position=a,e.line=l,e.lineStart=c,e.lineIndent=h;break}}n&&(Ve(e,o,a,!1),Go(e,e.line-l),o=a=e.position,n=!1),sr(u)||(a=e.position+1),u=e.input.charCodeAt(++e.position)}return Ve(e,o,a,!1),e.result?!0:(e.kind=d,e.result=f,!1)}g(Xf,"readPlainScalar");function Gf(e,t){var r,i,s;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=s=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(Ve(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,s=e.position;else return!0;else ve(r)?(Ve(e,i,s,!0),Go(e,At(e,!1,t)),i=s=e.position):e.position===e.lineStart&&ms(e)?at(e,"unexpected end of the document within a single quoted scalar"):(e.position++,s=e.position);at(e,"unexpected end of the stream within a single quoted scalar")}g(Gf,"readSingleQuotedScalar");function Vf(e,t){var r,i,s,o,a,n;if(n=e.input.charCodeAt(e.position),n!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(n=e.input.charCodeAt(e.position))!==0;){if(n===34)return Ve(e,r,e.position,!0),e.position++,!0;if(n===92){if(Ve(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),ve(n))At(e,!1,t);else if(n<256&&Hf[n])e.result+=Yf[n],e.position++;else if((a=zf(n))>0){for(s=a,o=0;s>0;s--)n=e.input.charCodeAt(++e.position),(a=qf(n))>=0?o=(o<<4)+a:at(e,"expected hexadecimal character");e.result+=jf(o),e.position++}else at(e,"unknown escape sequence");r=i=e.position}else ve(n)?(Ve(e,r,i,!0),Go(e,At(e,!1,t)),r=i=e.position):e.position===e.lineStart&&ms(e)?at(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}at(e,"unexpected end of the stream within a double quoted scalar")}g(Vf,"readDoubleQuotedScalar");function Zf(e,t){var r=!0,i,s,o,a=e.tag,n,l=e.anchor,c,h,d,f,u,p=Object.create(null),m,y,x,C;if(C=e.input.charCodeAt(e.position),C===91)h=93,u=!1,n=[];else if(C===123)h=125,u=!0,n={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=n),C=e.input.charCodeAt(++e.position);C!==0;){if(At(e,!0,t),C=e.input.charCodeAt(e.position),C===h)return e.position++,e.tag=a,e.anchor=l,e.kind=u?"mapping":"sequence",e.result=n,!0;r?C===44&&at(e,"expected the node content, but found ','"):at(e,"missed comma between flow collection entries"),y=m=x=null,d=f=!1,C===63&&(c=e.input.charCodeAt(e.position+1),ee(c)&&(d=f=!0,e.position++,At(e,!0,t))),i=e.line,s=e.lineStart,o=e.position,Er(e,t,bo,!1,!0),y=e.tag,m=e.result,At(e,!0,t),C=e.input.charCodeAt(e.position),(f||e.line===i)&&C===58&&(d=!0,C=e.input.charCodeAt(++e.position),At(e,!0,t),Er(e,t,bo,!1,!0),x=e.result),u?Sr(e,n,p,y,m,x,i,s,o):d?n.push(Sr(e,null,p,y,m,x,i,s,o)):n.push(m),At(e,!0,t),C=e.input.charCodeAt(e.position),C===44?(r=!0,C=e.input.charCodeAt(++e.position)):r=!1}at(e,"unexpected end of the stream within a flow collection")}g(Zf,"readFlowCollection");function Kf(e,t){var r,i,s=Sa,o=!1,a=!1,n=t,l=0,c=!1,h,d;if(d=e.input.charCodeAt(e.position),d===124)i=!1;else if(d===62)i=!0;else return!1;for(e.kind="scalar",e.result="";d!==0;)if(d=e.input.charCodeAt(++e.position),d===43||d===45)Sa===s?s=d===43?tc:vS:at(e,"repeat of a chomping mode identifier");else if((h=Wf(d))>=0)h===0?at(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?at(e,"repeat of an indentation width identifier"):(n=t+h-1,a=!0);else break;if(sr(d)){do d=e.input.charCodeAt(++e.position);while(sr(d));if(d===35)do d=e.input.charCodeAt(++e.position);while(!ve(d)&&d!==0)}for(;d!==0;){for(Xo(e),e.lineIndent=0,d=e.input.charCodeAt(e.position);(!a||e.lineIndent<n)&&d===32;)e.lineIndent++,d=e.input.charCodeAt(++e.position);if(!a&&e.lineIndent>n&&(n=e.lineIndent),ve(d)){l++;continue}if(e.lineIndent<n){s===tc?e.result+=qt.repeat(`
141
+ `,o?1+l:l):s===Sa&&o&&(e.result+=`
142
+ `);break}for(i?sr(d)?(c=!0,e.result+=qt.repeat(`
143
+ `,o?1+l:l)):c?(c=!1,e.result+=qt.repeat(`
144
+ `,l+1)):l===0?o&&(e.result+=" "):e.result+=qt.repeat(`
145
+ `,l):e.result+=qt.repeat(`
146
+ `,o?1+l:l),o=!0,a=!0,l=0,r=e.position;!ve(d)&&d!==0;)d=e.input.charCodeAt(++e.position);Ve(e,r,e.position,!1)}return!0}g(Kf,"readBlockScalar");function un(e,t){var r,i=e.tag,s=e.anchor,o=[],a,n=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,at(e,"tab characters must not be used in indentation")),!(l!==45||(a=e.input.charCodeAt(e.position+1),!ee(a))));){if(n=!0,e.position++,At(e,!0,-1)&&e.lineIndent<=t){o.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,Er(e,t,Pf,!1,!0),o.push(e.result),At(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&l!==0)at(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return n?(e.tag=i,e.anchor=s,e.kind="sequence",e.result=o,!0):!1}g(un,"readBlockSequence");function Qf(e,t,r){var i,s,o,a,n,l,c=e.tag,h=e.anchor,d={},f=Object.create(null),u=null,p=null,m=null,y=!1,x=!1,C;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=d),C=e.input.charCodeAt(e.position);C!==0;){if(!y&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,at(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),o=e.line,(C===63||C===58)&&ee(i))C===63?(y&&(Sr(e,d,f,u,p,null,a,n,l),u=p=m=null),x=!0,y=!0,s=!0):y?(y=!1,s=!0):at(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,C=i;else{if(a=e.line,n=e.lineStart,l=e.position,!Er(e,r,Rf,!1,!0))break;if(e.line===o){for(C=e.input.charCodeAt(e.position);sr(C);)C=e.input.charCodeAt(++e.position);if(C===58)C=e.input.charCodeAt(++e.position),ee(C)||at(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(Sr(e,d,f,u,p,null,a,n,l),u=p=m=null),x=!0,y=!1,s=!1,u=e.tag,p=e.result;else if(x)at(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=c,e.anchor=h,!0}else if(x)at(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=c,e.anchor=h,!0}if((e.line===o||e.lineIndent>t)&&(y&&(a=e.line,n=e.lineStart,l=e.position),Er(e,t,ko,!0,s)&&(y?p=e.result:m=e.result),y||(Sr(e,d,f,u,p,m,a,n,l),u=p=m=null),At(e,!0,-1),C=e.input.charCodeAt(e.position)),(e.line===o||e.lineIndent>t)&&C!==0)at(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&Sr(e,d,f,u,p,null,a,n,l),x&&(e.tag=c,e.anchor=h,e.kind="mapping",e.result=d),x}g(Qf,"readBlockMapping");function Jf(e){var t,r=!1,i=!1,s,o,a;if(a=e.input.charCodeAt(e.position),a!==33)return!1;if(e.tag!==null&&at(e,"duplication of a tag property"),a=e.input.charCodeAt(++e.position),a===60?(r=!0,a=e.input.charCodeAt(++e.position)):a===33?(i=!0,s="!!",a=e.input.charCodeAt(++e.position)):s="!",t=e.position,r){do a=e.input.charCodeAt(++e.position);while(a!==0&&a!==62);e.position<e.length?(o=e.input.slice(t,e.position),a=e.input.charCodeAt(++e.position)):at(e,"unexpected end of the stream within a verbatim tag")}else{for(;a!==0&&!ee(a);)a===33&&(i?at(e,"tag suffix cannot contain exclamation marks"):(s=e.input.slice(t-1,e.position+1),Df.test(s)||at(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),a=e.input.charCodeAt(++e.position);o=e.input.slice(t,e.position),BS.test(o)&&at(e,"tag suffix cannot contain flow indicator characters")}o&&!Nf.test(o)&&at(e,"tag name cannot contain such characters: "+o);try{o=decodeURIComponent(o)}catch{at(e,"tag name is malformed: "+o)}return r?e.tag=o:ar.call(e.tagMap,s)?e.tag=e.tagMap[s]+o:s==="!"?e.tag="!"+o:s==="!!"?e.tag="tag:yaml.org,2002:"+o:at(e,'undeclared tag handle "'+s+'"'),!0}g(Jf,"readTagProperty");function tg(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&at(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!ee(r)&&!wr(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&at(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}g(tg,"readAnchorProperty");function eg(e){var t,r,i;if(i=e.input.charCodeAt(e.position),i!==42)return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!ee(i)&&!wr(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&at(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),ar.call(e.anchorMap,r)||at(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],At(e,!0,-1),!0}g(eg,"readAlias");function Er(e,t,r,i,s){var o,a,n,l=1,c=!1,h=!1,d,f,u,p,m,y;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,o=a=n=ko===r||Pf===r,i&&At(e,!0,-1)&&(c=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;Jf(e)||tg(e);)At(e,!0,-1)?(c=!0,n=o,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):n=!1;if(n&&(n=c||s),(l===1||ko===r)&&(bo===r||Rf===r?m=t:m=t+1,y=e.position-e.lineStart,l===1?n&&(un(e,y)||Qf(e,y,m))||Zf(e,m)?h=!0:(a&&Kf(e,m)||Gf(e,m)||Vf(e,m)?h=!0:eg(e)?(h=!0,(e.tag!==null||e.anchor!==null)&&at(e,"alias node should not have any properties")):Xf(e,m,bo===r)&&(h=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(h=n&&un(e,y))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&at(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),d=0,f=e.implicitTypes.length;d<f;d+=1)if(p=e.implicitTypes[d],p.resolve(e.result)){e.result=p.construct(e.result),e.tag=p.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(ar.call(e.typeMap[e.kind||"fallback"],e.tag))p=e.typeMap[e.kind||"fallback"][e.tag];else for(p=null,u=e.typeMap.multi[e.kind||"fallback"],d=0,f=u.length;d<f;d+=1)if(e.tag.slice(0,u[d].tag.length)===u[d].tag){p=u[d];break}p||at(e,"unknown tag !<"+e.tag+">"),e.result!==null&&p.kind!==e.kind&&at(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+p.kind+'", not "'+e.kind+'"'),p.resolve(e.result,e.tag)?(e.result=p.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):at(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||h}g(Er,"composeNode");function rg(e){var t=e.position,r,i,s,o=!1,a;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(a=e.input.charCodeAt(e.position))!==0&&(At(e,!0,-1),a=e.input.charCodeAt(e.position),!(e.lineIndent>0||a!==37));){for(o=!0,a=e.input.charCodeAt(++e.position),r=e.position;a!==0&&!ee(a);)a=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),s=[],i.length<1&&at(e,"directive name must not be less than one character in length");a!==0;){for(;sr(a);)a=e.input.charCodeAt(++e.position);if(a===35){do a=e.input.charCodeAt(++e.position);while(a!==0&&!ve(a));break}if(ve(a))break;for(r=e.position;a!==0&&!ee(a);)a=e.input.charCodeAt(++e.position);s.push(e.input.slice(r,e.position))}a!==0&&Xo(e),ar.call(ec,i)?ec[i](e,i,s):as(e,'unknown document directive "'+i+'"')}if(At(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,At(e,!0,-1)):o&&at(e,"directives end mark is expected"),Er(e,e.lineIndent-1,ko,!1,!0),At(e,!0,-1),e.checkLineBreaks&&_S.test(e.input.slice(t,e.position))&&as(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&ms(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,At(e,!0,-1));return}if(e.position<e.length-1)at(e,"end of the stream or a document separator is expected");else return}g(rg,"readDocument");function _l(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
147
+ `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new Uf(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,at(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)rg(r);return r.documents}g(_l,"loadDocuments");function LS(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=_l(e,r);if(typeof t!="function")return i;for(var s=0,o=i.length;s<o;s+=1)t(i[s])}g(LS,"loadAll$1");function ig(e,t){var r=_l(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new le("expected a single document in the stream, but found more")}}g(ig,"load$1");var FS=ig,ES={load:FS},sg=Object.prototype.toString,og=Object.prototype.hasOwnProperty,Bl=65279,MS=9,ns=10,AS=13,$S=32,OS=33,IS=34,fn=35,RS=37,PS=38,DS=39,NS=42,ag=44,qS=45,wo=58,zS=61,WS=62,jS=63,HS=64,ng=91,lg=93,YS=96,hg=123,US=124,cg=125,Jt={};Jt[0]="\\0";Jt[7]="\\a";Jt[8]="\\b";Jt[9]="\\t";Jt[10]="\\n";Jt[11]="\\v";Jt[12]="\\f";Jt[13]="\\r";Jt[27]="\\e";Jt[34]='\\"';Jt[92]="\\\\";Jt[133]="\\N";Jt[160]="\\_";Jt[8232]="\\L";Jt[8233]="\\P";var XS=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],GS=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function dg(e,t){var r,i,s,o,a,n,l;if(t===null)return{};for(r={},i=Object.keys(t),s=0,o=i.length;s<o;s+=1)a=i[s],n=String(t[a]),a.slice(0,2)==="!!"&&(a="tag:yaml.org,2002:"+a.slice(2)),l=e.compiledTypeMap.fallback[a],l&&og.call(l.styleAliases,n)&&(n=l.styleAliases[n]),r[a]=n;return r}g(dg,"compileStyleMap");function ug(e){var t,r,i;if(t=e.toString(16).toUpperCase(),e<=255)r="x",i=2;else if(e<=65535)r="u",i=4;else if(e<=4294967295)r="U",i=8;else throw new le("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+qt.repeat("0",i-t.length)+t}g(ug,"encodeHex");var VS=1,ls=2;function fg(e){this.schema=e.schema||If,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=qt.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=dg(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?ls:VS,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}g(fg,"State");function gn(e,t){for(var r=qt.repeat(" ",t),i=0,s=-1,o="",a,n=e.length;i<n;)s=e.indexOf(`
148
+ `,i),s===-1?(a=e.slice(i),i=n):(a=e.slice(i,s+1),i=s+1),a.length&&a!==`
149
+ `&&(o+=r),o+=a;return o}g(gn,"indentString");function So(e,t){return`
150
+ `+qt.repeat(" ",e.indent*t)}g(So,"generateNextLine");function gg(e,t){var r,i,s;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(s=e.implicitTypes[r],s.resolve(t))return!0;return!1}g(gg,"testImplicitResolving");function hs(e){return e===$S||e===MS}g(hs,"isWhitespace");function yi(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Bl||65536<=e&&e<=1114111}g(yi,"isPrintable");function pn(e){return yi(e)&&e!==Bl&&e!==AS&&e!==ns}g(pn,"isNsCharOrWhitespace");function mn(e,t,r){var i=pn(e),s=i&&!hs(e);return(r?i:i&&e!==ag&&e!==ng&&e!==lg&&e!==hg&&e!==cg)&&e!==fn&&!(t===wo&&!s)||pn(t)&&!hs(t)&&e===fn||t===wo&&s}g(mn,"isPlainSafe");function pg(e){return yi(e)&&e!==Bl&&!hs(e)&&e!==qS&&e!==jS&&e!==wo&&e!==ag&&e!==ng&&e!==lg&&e!==hg&&e!==cg&&e!==fn&&e!==PS&&e!==NS&&e!==OS&&e!==US&&e!==zS&&e!==WS&&e!==DS&&e!==IS&&e!==RS&&e!==HS&&e!==YS}g(pg,"isPlainSafeFirst");function mg(e){return!hs(e)&&e!==wo}g(mg,"isPlainSafeLast");function Yr(e,t){var r=e.charCodeAt(t),i;return r>=55296&&r<=56319&&t+1<e.length&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}g(Yr,"codePointAt");function Ll(e){var t=/^\n* /;return t.test(e)}g(Ll,"needIndentIndicator");var yg=1,yn=2,xg=3,Cg=4,qr=5;function bg(e,t,r,i,s,o,a,n){var l,c=0,h=null,d=!1,f=!1,u=i!==-1,p=-1,m=pg(Yr(e,0))&&mg(Yr(e,e.length-1));if(t||a)for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=Yr(e,l),!yi(c))return qr;m=m&&mn(c,h,n),h=c}else{for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=Yr(e,l),c===ns)d=!0,u&&(f=f||l-p-1>i&&e[p+1]!==" ",p=l);else if(!yi(c))return qr;m=m&&mn(c,h,n),h=c}f=f||u&&l-p-1>i&&e[p+1]!==" "}return!d&&!f?m&&!a&&!s(e)?yg:o===ls?qr:yn:r>9&&Ll(e)?qr:a?o===ls?qr:yn:f?Cg:xg}g(bg,"chooseScalarStyle");function kg(e,t,r,i,s){e.dump=(function(){if(t.length===0)return e.quotingType===ls?'""':"''";if(!e.noCompatMode&&(XS.indexOf(t)!==-1||GS.test(t)))return e.quotingType===ls?'"'+t+'"':"'"+t+"'";var o=e.indent*Math.max(1,r),a=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-o),n=i||e.flowLevel>-1&&r>=e.flowLevel;function l(c){return gg(e,c)}switch(g(l,"testAmbiguity"),bg(t,n,e.indent,a,l,e.quotingType,e.forceQuotes&&!i,s)){case yg:return t;case yn:return"'"+t.replace(/'/g,"''")+"'";case xg:return"|"+xn(t,e.indent)+Cn(gn(t,o));case Cg:return">"+xn(t,e.indent)+Cn(gn(wg(t,a),o));case qr:return'"'+Sg(t)+'"';default:throw new le("impossible error: invalid scalar style")}})()}g(kg,"writeScalar");function xn(e,t){var r=Ll(e)?String(t):"",i=e[e.length-1]===`
151
+ `,s=i&&(e[e.length-2]===`
152
+ `||e===`
153
+ `),o=s?"+":i?"":"-";return r+o+`
154
+ `}g(xn,"blockHeader");function Cn(e){return e[e.length-1]===`
155
+ `?e.slice(0,-1):e}g(Cn,"dropEndingNewline");function wg(e,t){for(var r=/(\n+)([^\n]*)/g,i=(function(){var c=e.indexOf(`
156
+ `);return c=c!==-1?c:e.length,r.lastIndex=c,bn(e.slice(0,c),t)})(),s=e[0]===`
157
+ `||e[0]===" ",o,a;a=r.exec(e);){var n=a[1],l=a[2];o=l[0]===" ",i+=n+(!s&&!o&&l!==""?`
158
+ `:"")+bn(l,t),s=o}return i}g(wg,"foldString");function bn(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,s=0,o,a=0,n=0,l="";i=r.exec(e);)n=i.index,n-s>t&&(o=a>s?a:n,l+=`
159
+ `+e.slice(s,o),s=o+1),a=n;return l+=`
160
+ `,e.length-s>t&&a>s?l+=e.slice(s,a)+`
161
+ `+e.slice(a+1):l+=e.slice(s),l.slice(1)}g(bn,"foldLine");function Sg(e){for(var t="",r=0,i,s=0;s<e.length;r>=65536?s+=2:s++)r=Yr(e,s),i=Jt[r],!i&&yi(r)?(t+=e[s],r>=65536&&(t+=e[s+1])):t+=i||ug(r);return t}g(Sg,"escapeString");function vg(e,t,r){var i="",s=e.tag,o,a,n;for(o=0,a=r.length;o<a;o+=1)n=r[o],e.replacer&&(n=e.replacer.call(r,String(o),n)),(Oe(e,t,n,!1,!1)||typeof n>"u"&&Oe(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=s,e.dump="["+i+"]"}g(vg,"writeFlowSequence");function kn(e,t,r,i){var s="",o=e.tag,a,n,l;for(a=0,n=r.length;a<n;a+=1)l=r[a],e.replacer&&(l=e.replacer.call(r,String(a),l)),(Oe(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&Oe(e,t+1,null,!0,!0,!1,!0))&&((!i||s!=="")&&(s+=So(e,t)),e.dump&&ns===e.dump.charCodeAt(0)?s+="-":s+="- ",s+=e.dump);e.tag=o,e.dump=s||"[]"}g(kn,"writeBlockSequence");function Tg(e,t,r){var i="",s=e.tag,o=Object.keys(r),a,n,l,c,h;for(a=0,n=o.length;a<n;a+=1)h="",i!==""&&(h+=", "),e.condenseFlow&&(h+='"'),l=o[a],c=r[l],e.replacer&&(c=e.replacer.call(r,l,c)),Oe(e,t,l,!1,!1)&&(e.dump.length>1024&&(h+="? "),h+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Oe(e,t,c,!1,!1)&&(h+=e.dump,i+=h));e.tag=s,e.dump="{"+i+"}"}g(Tg,"writeFlowMapping");function _g(e,t,r,i){var s="",o=e.tag,a=Object.keys(r),n,l,c,h,d,f;if(e.sortKeys===!0)a.sort();else if(typeof e.sortKeys=="function")a.sort(e.sortKeys);else if(e.sortKeys)throw new le("sortKeys must be a boolean or a function");for(n=0,l=a.length;n<l;n+=1)f="",(!i||s!=="")&&(f+=So(e,t)),c=a[n],h=r[c],e.replacer&&(h=e.replacer.call(r,c,h)),Oe(e,t+1,c,!0,!0,!0)&&(d=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,d&&(e.dump&&ns===e.dump.charCodeAt(0)?f+="?":f+="? "),f+=e.dump,d&&(f+=So(e,t)),Oe(e,t+1,h,!0,d)&&(e.dump&&ns===e.dump.charCodeAt(0)?f+=":":f+=": ",f+=e.dump,s+=f));e.tag=o,e.dump=s||"{}"}g(_g,"writeBlockMapping");function wn(e,t,r){var i,s,o,a,n,l;for(s=r?e.explicitTypes:e.implicitTypes,o=0,a=s.length;o<a;o+=1)if(n=s[o],(n.instanceOf||n.predicate)&&(!n.instanceOf||typeof t=="object"&&t instanceof n.instanceOf)&&(!n.predicate||n.predicate(t))){if(r?n.multi&&n.representName?e.tag=n.representName(t):e.tag=n.tag:e.tag="?",n.represent){if(l=e.styleMap[n.tag]||n.defaultStyle,sg.call(n.represent)==="[object Function]")i=n.represent(t,l);else if(og.call(n.represent,l))i=n.represent[l](t,l);else throw new le("!<"+n.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}g(wn,"detectType");function Oe(e,t,r,i,s,o,a){e.tag=null,e.dump=r,wn(e,r,!1)||wn(e,r,!0);var n=sg.call(e.dump),l=i,c;i&&(i=e.flowLevel<0||e.flowLevel>t);var h=n==="[object Object]"||n==="[object Array]",d,f;if(h&&(d=e.duplicates.indexOf(r),f=d!==-1),(e.tag!==null&&e.tag!=="?"||f||e.indent!==2&&t>0)&&(s=!1),f&&e.usedDuplicates[d])e.dump="*ref_"+d;else{if(h&&f&&!e.usedDuplicates[d]&&(e.usedDuplicates[d]=!0),n==="[object Object]")i&&Object.keys(e.dump).length!==0?(_g(e,t,e.dump,s),f&&(e.dump="&ref_"+d+e.dump)):(Tg(e,t,e.dump),f&&(e.dump="&ref_"+d+" "+e.dump));else if(n==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!a&&t>0?kn(e,t-1,e.dump,s):kn(e,t,e.dump,s),f&&(e.dump="&ref_"+d+e.dump)):(vg(e,t,e.dump),f&&(e.dump="&ref_"+d+" "+e.dump));else if(n==="[object String]")e.tag!=="?"&&kg(e,e.dump,t,o,l);else{if(n==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new le("unacceptable kind of an object to dump "+n)}e.tag!==null&&e.tag!=="?"&&(c=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?c="!"+c:c.slice(0,18)==="tag:yaml.org,2002:"?c="!!"+c.slice(18):c="!<"+c+">",e.dump=c+" "+e.dump)}return!0}g(Oe,"writeNode");function Bg(e,t){var r=[],i=[],s,o;for(vo(e,r,i),s=0,o=i.length;s<o;s+=1)t.duplicates.push(r[i[s]]);t.usedDuplicates=new Array(o)}g(Bg,"getDuplicateReferences");function vo(e,t,r){var i,s,o;if(e!==null&&typeof e=="object")if(s=t.indexOf(e),s!==-1)r.indexOf(s)===-1&&r.push(s);else if(t.push(e),Array.isArray(e))for(s=0,o=e.length;s<o;s+=1)vo(e[s],t,r);else for(i=Object.keys(e),s=0,o=i.length;s<o;s+=1)vo(e[i[s]],t,r)}g(vo,"inspectNode");function ZS(e,t){t=t||{};var r=new fg(t);r.noRefs||Bg(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),Oe(r,0,i,!0,!0)?r.dump+`
162
+ `:""}g(ZS,"dump$1");function KS(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}g(KS,"renamed");var Lg=xf,Fg=ES.load;var QS=g(e=>{const{handDrawnSeed:t}=xt();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),Si=g(e=>{const t=JS([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),JS=g(e=>{const t=new Map;return e.forEach(r=>{const[i,s]=r.split(":");t.set(i.trim(),s?.trim())}),t},"styles2Map"),Fl=g(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),it=g(e=>{const{stylesArray:t}=Si(e),r=[],i=[],s=[],o=[];return t.forEach(a=>{const n=a[0];Fl(n)?r.push(a.join(":")+" !important"):(i.push(a.join(":")+" !important"),n.includes("stroke")&&s.push(a.join(":")+" !important"),n==="fill"&&o.push(a.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:s,backgroundStyles:o}},"styles2String"),tt=g((e,t)=>{const{themeVariables:r,handDrawnSeed:i}=xt(),{nodeBorder:s,mainBkg:o}=r,{stylesMap:a}=Si(e);return Object.assign({roughness:.7,fill:a.get("fill")||o,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:a.get("stroke")||s,seed:i,strokeWidth:a.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:tv(a.get("stroke-dasharray"))},t)},"userNodeOverrides"),tv=g(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const s=isNaN(t[0])?0:t[0];return[s,s]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray"),Os={},Nt={},rc;function ev(){return rc||(rc=1,Object.defineProperty(Nt,"__esModule",{value:!0}),Nt.BLANK_URL=Nt.relativeFirstCharacters=Nt.whitespaceEscapeCharsRegex=Nt.urlSchemeRegex=Nt.ctrlCharactersRegex=Nt.htmlCtrlEntityRegex=Nt.htmlEntitiesRegex=Nt.invalidProtocolRegex=void 0,Nt.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,Nt.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,Nt.htmlCtrlEntityRegex=/&(newline|tab);/gi,Nt.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,Nt.urlSchemeRegex=/^.+(:|&colon;)/gim,Nt.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,Nt.relativeFirstCharacters=[".","/"],Nt.BLANK_URL="about:blank"),Nt}var ic;function rv(){if(ic)return Os;ic=1,Object.defineProperty(Os,"__esModule",{value:!0}),Os.sanitizeUrl=o;var e=ev();function t(a){return e.relativeFirstCharacters.indexOf(a[0])>-1}function r(a){var n=a.replace(e.ctrlCharactersRegex,"");return n.replace(e.htmlEntitiesRegex,function(l,c){return String.fromCharCode(c)})}function i(a){return URL.canParse(a)}function s(a){try{return decodeURIComponent(a)}catch{return a}}function o(a){if(!a)return e.BLANK_URL;var n,l=s(a.trim());do l=r(l).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),l=s(l),n=l.match(e.ctrlCharactersRegex)||l.match(e.htmlEntitiesRegex)||l.match(e.htmlCtrlEntityRegex)||l.match(e.whitespaceEscapeCharsRegex);while(n&&n.length>0);var c=l;if(!c)return e.BLANK_URL;if(t(c))return c;var h=c.trimStart(),d=h.match(e.urlSchemeRegex);if(!d)return c;var f=d[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(f))return e.BLANK_URL;var u=h.replace(/\\/g,"/");if(f==="mailto:"||f.includes("://"))return u;if(f==="http:"||f==="https:"){if(!i(u))return e.BLANK_URL;var p=new URL(u);return p.protocol=p.protocol.toLowerCase(),p.hostname=p.hostname.toLowerCase(),p.toString()}return u}return Os}var Eg=rv();function va(e){if(typeof e!="object"||e==null)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!=="[object Object]"){const r=e[Symbol.toStringTag];return r==null||!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable?!1:e.toString()===`[object ${r}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function iv(){}function Mg(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function Vo(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const Ag="[object RegExp]",El="[object String]",Ml="[object Number]",Al="[object Boolean]",$l="[object Arguments]",$g="[object Symbol]",Og="[object Date]",Ig="[object Map]",Rg="[object Set]",Pg="[object Array]",Dg="[object ArrayBuffer]",Ng="[object Object]",qg="[object DataView]",zg="[object Uint8Array]",Wg="[object Uint8ClampedArray]",jg="[object Uint16Array]",Hg="[object Uint32Array]",Yg="[object Int8Array]",Ug="[object Int16Array]",Xg="[object Int32Array]",Gg="[object Float32Array]",Vg="[object Float64Array]",sc=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})()||Function("return this")();function Ol(e){return typeof sc.Buffer<"u"&&sc.Buffer.isBuffer(e)}function sv(e){return Number.isSafeInteger(e)&&e>=0}function Zg(e){return e!=null&&typeof e!="function"&&sv(e.length)}function ov(e){return e==="__proto__"}function Zo(e){return e==null||typeof e!="object"&&typeof e!="function"}function Il(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function av(e,t){return Ur(e,void 0,e,new Map,t)}function Ur(e,t,r,i=new Map,s=void 0){const o=s?.(e,t,r,i);if(o!==void 0)return o;if(Zo(e))return e;if(i.has(e))return i.get(e);if(Array.isArray(e)){const a=new Array(e.length);i.set(e,a);for(let n=0;n<e.length;n++)a[n]=Ur(e[n],n,r,i,s);return Object.hasOwn(e,"index")&&(a.index=e.index),Object.hasOwn(e,"input")&&(a.input=e.input),a}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const a=new RegExp(e.source,e.flags);return a.lastIndex=e.lastIndex,a}if(e instanceof Map){const a=new Map;i.set(e,a);for(const[n,l]of e)a.set(n,Ur(l,n,r,i,s));return a}if(e instanceof Set){const a=new Set;i.set(e,a);for(const n of e)a.add(Ur(n,void 0,r,i,s));return a}if(Ol(e))return e.subarray();if(Il(e)){const a=new(Object.getPrototypeOf(e)).constructor(e.length);i.set(e,a);for(let n=0;n<e.length;n++)a[n]=Ur(e[n],n,r,i,s);return a}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const a=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return i.set(e,a),be(a,e,r,i,s),a}if(typeof File<"u"&&e instanceof File){const a=new File([e],e.name,{type:e.type});return i.set(e,a),be(a,e,r,i,s),a}if(typeof Blob<"u"&&e instanceof Blob){const a=new Blob([e],{type:e.type});return i.set(e,a),be(a,e,r,i,s),a}if(e instanceof Error){const a=structuredClone(e);return i.set(e,a),a.message=e.message,a.name=e.name,a.stack=e.stack,a.cause=e.cause,a.constructor=e.constructor,be(a,e,r,i,s),a}if(e instanceof Boolean){const a=new Boolean(e.valueOf());return i.set(e,a),be(a,e,r,i,s),a}if(e instanceof Number){const a=new Number(e.valueOf());return i.set(e,a),be(a,e,r,i,s),a}if(e instanceof String){const a=new String(e.valueOf());return i.set(e,a),be(a,e,r,i,s),a}if(typeof e=="object"&&nv(e)){const a=Object.create(Object.getPrototypeOf(e));return i.set(e,a),be(a,e,r,i,s),a}return e}function be(e,t,r=e,i,s){const o=[...Object.keys(t),...Mg(t)];for(let a=0;a<o.length;a++){const n=o[a],l=Object.getOwnPropertyDescriptor(e,n);(l==null||l.writable)&&(e[n]=Ur(t[n],n,r,i,s))}}function nv(e){switch(Vo(e)){case $l:case Pg:case Dg:case qg:case Al:case Og:case Gg:case Vg:case Yg:case Ug:case Xg:case Ig:case Ml:case Ng:case Ag:case Rg:case El:case $g:case zg:case Wg:case jg:case Hg:return!0;default:return!1}}function lv(e,t){return av(e,(r,i,s,o)=>{if(typeof e=="object"){if(Vo(e)==="[object Object]"&&typeof e.constructor!="function"){const a={};return o.set(e,a),be(a,e,s,o),a}switch(Object.prototype.toString.call(e)){case Ml:case El:case Al:{const a=new e.constructor(e?.valueOf());return be(a,e),a}case $l:{const a={};return be(a,e),a.length=e.length,a[Symbol.iterator]=e[Symbol.iterator],a}default:return}}})}function oc(e){return lv(e)}function Sn(e){return e!==null&&typeof e=="object"&&Vo(e)==="[object Arguments]"}function vn(e){return typeof e=="object"&&e!==null}function hv(e){return vn(e)&&Zg(e)}function ys(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");const r=function(...i){const s=t?t.apply(this,i):i[0],o=r.cache;if(o.has(s))return o.get(s);const a=e.apply(this,i);return r.cache=o.set(s,a)||o,a};return r.cache=new(ys.Cache||Map),r}ys.Cache=Map;function Ji(e){return Il(e)}function cv(e){const t=e?.constructor;return e===(typeof t=="function"?t.prototype:Object.prototype)}function dv(e){if(Zo(e))return e;if(Array.isArray(e)||Il(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);const t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);const r=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new r(e);if(e instanceof RegExp){const i=new r(e);return i.lastIndex=e.lastIndex,i}if(e instanceof DataView)return new r(e.buffer.slice(0));if(e instanceof Error){let i;return e instanceof AggregateError?i=new r(e.errors,e.message,{cause:e.cause}):i=new r(e.message,{cause:e.cause}),i.stack=e.stack,Object.assign(i,e),i}return typeof File<"u"&&e instanceof File?new r([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e=="object"?Object.assign(Object.create(t),e):e}function uv(e,...t){const r=t.slice(0,-1),i=t[t.length-1];let s=e;for(let o=0;o<r.length;o++){const a=r[o];s=Zs(s,a,i,new Map)}return s}function Zs(e,t,r,i){if(Zo(e)&&(e=Object(e)),t==null||typeof t!="object")return e;if(i.has(t))return dv(i.get(t));if(i.set(t,e),Array.isArray(t)){t=t.slice();for(let o=0;o<t.length;o++)t[o]=t[o]??void 0}const s=[...Object.keys(t),...Mg(t)];for(let o=0;o<s.length;o++){const a=s[o];if(ov(a))continue;let n=t[a],l=e[a];if(Sn(n)&&(n={...n}),Sn(l)&&(l={...l}),Ol(n)&&(n=oc(n)),Array.isArray(n))if(Array.isArray(l)){const h=[],d=Reflect.ownKeys(l);for(let f=0;f<d.length;f++){const u=d[f];h[u]=l[u]}l=h}else if(hv(l)){const h=[];for(let d=0;d<l.length;d++)h[d]=l[d];l=h}else l=[];const c=r(l,n,a,e,t,i);c!==void 0?e[a]=c:Array.isArray(n)||vn(l)&&vn(n)&&(va(l)||va(n)||Ji(l)||Ji(n))?e[a]=Zs(l,n,r,i):l==null&&va(n)?e[a]=Zs({},n,r,i):l==null&&Ji(n)?e[a]=oc(n):(l===void 0||n!==void 0)&&(e[a]=n)}return e}function fv(e,...t){return uv(e,...t,iv)}function ac(e){if(e==null)return!0;if(Zg(e))return typeof e.splice!="function"&&typeof e!="string"&&!Ol(e)&&!Ji(e)&&!Sn(e)?!1:e.length===0;if(typeof e=="object"){if(e instanceof Map||e instanceof Set)return e.size===0;const t=Object.keys(e);return cv(e)?t.filter(r=>r!=="constructor").length===0:t.length===0}return!0}var Kg="​",gv={curveBasis:mo,curveBasisClosed:Nw,curveBasisOpen:qw,curveBumpX:Tu,curveBumpY:_u,curveBundle:zw,curveCardinalClosed:Ww,curveCardinalOpen:jw,curveCardinal:Eu,curveCatmullRomClosed:Hw,curveCatmullRomOpen:Yw,curveCatmullRom:Au,curveLinear:Qi,curveLinearClosed:Uw,curveMonotoneX:Du,curveMonotoneY:Nu,curveNatural:zu,curveStep:Wu,curveStepAfter:Hu,curveStepBefore:ju},pv=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,mv=g(function(e,t){const r=Qg(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const a=r.map(n=>n.args);io(a),i=Pt(i,[...a])}else i=r.args;if(!i)return;let s=el(e,t);const o="config";return i[o]!==void 0&&(s==="flowchart-v2"&&(s="flowchart"),i[s]=i[o],delete i[o]),i},"detectInit"),Qg=g(function(e,t=null){try{const r=new RegExp(`[%]{2}(?![{]${pv.source})(?=[}][%]{2}).*
163
+ `,"ig");e=e.trim().replace(r,"").replace(/'/gm,'"'),G.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let i;const s=[];for(;(i=Ki.exec(e))!==null;)if(i.index===Ki.lastIndex&&Ki.lastIndex++,i&&!t||t&&i[1]?.match(t)||t&&i[2]?.match(t)){const o=i[1]?i[1]:i[2],a=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;s.push({type:o,args:a})}return s.length===0?{type:e,args:null}:s.length===1?s[0]:s}catch(r){return G.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),yv=g(function(e){return e.replace(Ki,"")},"removeDirectives"),xv=g(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function Rl(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return gv[r]??t}g(Rl,"interpolateToCurve");function Jg(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?Eg.sanitizeUrl(r):r}g(Jg,"formatUrl");var Cv=g((e,...t)=>{const r=e.split("."),i=r.length-1,s=r[i];let o=window;for(let a=0;a<i;a++)if(o=o[r[a]],!o){G.error(`Function name: ${e} not found in window`);return}o[s](...t)},"runFunc");function Pl(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}g(Pl,"distance");function tp(e){let t,r=0;e.forEach(s=>{r+=Pl(s,t),t=s});const i=r/2;return Dl(e,i)}g(tp,"traverseEdge");function ep(e){return e.length===1?e[0]:tp(e)}g(ep,"calcLabelPosition");var nc=g((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),Dl=g((e,t)=>{let r,i=t;for(const s of e){if(r){const o=Pl(s,r);if(o===0)return r;if(o<i)i-=o;else{const a=i/o;if(a<=0)return r;if(a>=1)return{x:s.x,y:s.y};if(a>0&&a<1)return{x:nc((1-a)*r.x+a*s.x,5),y:nc((1-a)*r.y+a*s.y,5)}}}r=s}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),bv=g((e,t,r)=>{G.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const s=Dl(t,25),o=e?10:5,a=Math.atan2(t[0].y-s.y,t[0].x-s.x),n={x:0,y:0};return n.x=Math.sin(a)*o+(t[0].x+s.x)/2,n.y=-Math.cos(a)*o+(t[0].y+s.y)/2,n},"calcCardinalityPosition");function rp(e,t,r){const i=structuredClone(r);G.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const s=25+e,o=Dl(i,s),a=10+e*.5,n=Math.atan2(i[0].y-o.y,i[0].x-o.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(n+Math.PI)*a+(i[0].x+o.x)/2,l.y=-Math.cos(n+Math.PI)*a+(i[0].y+o.y)/2):t==="end_right"?(l.x=Math.sin(n-Math.PI)*a+(i[0].x+o.x)/2-5,l.y=-Math.cos(n-Math.PI)*a+(i[0].y+o.y)/2-5):t==="end_left"?(l.x=Math.sin(n)*a+(i[0].x+o.x)/2-5,l.y=-Math.cos(n)*a+(i[0].y+o.y)/2-5):(l.x=Math.sin(n)*a+(i[0].x+o.x)/2,l.y=-Math.cos(n)*a+(i[0].y+o.y)/2),l}g(rp,"calcTerminalLabelPosition");function Nl(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}g(Nl,"getStylesFromArray");var lc=0,ip=g(()=>(lc++,"id-"+Math.random().toString(36).substr(2,12)+"-"+lc),"generateId");function sp(e){let t="";const r="0123456789abcdef",i=r.length;for(let s=0;s<e;s++)t+=r.charAt(Math.floor(Math.random()*i));return t}g(sp,"makeRandomHex");var op=g(e=>sp(e.length),"random"),kv=g(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),wv=g(function(e,t){const r=t.text.replace(ki.lineBreakRegex," "),[,i]=xs(t.fontSize),s=e.append("text");s.attr("x",t.x),s.attr("y",t.y),s.style("text-anchor",t.anchor),s.style("font-family",t.fontFamily),s.style("font-size",i),s.style("font-weight",t.fontWeight),s.attr("fill",t.fill),t.class!==void 0&&s.attr("class",t.class);const o=s.append("tspan");return o.attr("x",t.x+t.textMargin*2),o.attr("fill",t.fill),o.text(r),s},"drawSimpleText"),ap=ys((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),ki.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),s=[];let o="";return i.forEach((a,n)=>{const l=Ie(`${a} `,r),c=Ie(o,r);if(l>t){const{hyphenatedStrings:f,remainingWord:u}=Sv(a,t,"-",r);s.push(o,...f),o=u}else c+l>=t?(s.push(o),o=a):o=[o,a].filter(Boolean).join(" ");n+1===i.length&&s.push(o)}),s.filter(a=>a!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),Sv=ys((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const s=[...e],o=[];let a="";return s.forEach((n,l)=>{const c=`${a}${n}`;if(Ie(c,i)>=t){const d=l+1,f=s.length===d,u=`${c}${r}`;o.push(f?c:u),a=""}else a=c}),{hyphenatedStrings:o,remainingWord:a}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function ql(e,t){return Ko(e,t).height}g(ql,"calculateTextHeight");function Ie(e,t){return Ko(e,t).width}g(Ie,"calculateTextWidth");var Ko=ys((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:s=400}=t;if(!e)return{width:0,height:0};const[,o]=xs(r),a=["sans-serif",i],n=e.split(ki.lineBreakRegex),l=[],c=pt("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const h=c.append("svg");for(const f of a){let u=0;const p={width:0,height:0,lineHeight:0};for(const m of n){const y=kv();y.text=m||Kg;const x=wv(h,y).style("font-size",o).style("font-weight",s).style("font-family",f),C=(x._groups||x)[0][0].getBBox();if(C.width===0&&C.height===0)throw new Error("svg element not in render tree");p.width=Math.round(Math.max(p.width,C.width)),u=Math.round(C.height),p.height+=u,p.lineHeight=Math.round(Math.max(p.lineHeight,u))}l.push(p)}h.remove();const d=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[d]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),hi,vv=(hi=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},g(hi,"InitIDGenerator"),hi),Is,Tv=g(function(e){return Is=Is||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Is.innerHTML=e,unescape(Is.textContent)},"entityDecode");function zl(e){return"str"in e}g(zl,"isDetailedError");var _v=g((e,t,r,i)=>{if(!i)return;const s=e.node()?.getBBox();s&&e.append("text").text(i).attr("text-anchor","middle").attr("x",s.x+s.width/2).attr("y",-r).attr("class",t)},"insertTitle"),xs=g(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function Qo(e,t){return fv({},e,t)}g(Qo,"cleanAndMerge");var ge={assignWithDepth:Pt,wrapLabel:ap,calculateTextHeight:ql,calculateTextWidth:Ie,calculateTextDimensions:Ko,cleanAndMerge:Qo,detectInit:mv,detectDirective:Qg,isSubstringInArray:xv,interpolateToCurve:Rl,calcLabelPosition:ep,calcCardinalityPosition:bv,calcTerminalLabelPosition:rp,formatUrl:Jg,getStylesFromArray:Nl,generateId:ip,random:op,runFunc:Cv,entityDecode:Tv,insertTitle:_v,isLabelCoordinateInPath:np,parseFontSize:xs,InitIDGenerator:vv},Bv=g(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),t},"encodeEntities"),nr=g(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),Lv=g((e,t,{counter:r=0,prefix:i,suffix:s},o)=>o||`${i?`${i}_`:""}${e}_${t}_${r}${s?`_${s}`:""}`,"getEdgeId");function Ht(e){return e??null}g(Ht,"handleUndefinedAttr");function np(e,t){const r=Math.round(e.x),i=Math.round(e.y),s=t.replace(/(\d+\.\d+)/g,o=>Math.round(parseFloat(o)).toString());return s.includes(r.toString())||s.includes(i.toString())}g(np,"isLabelCoordinateInPath");var Jo=g(({flowchart:e})=>{const t=e?.subGraphTitleMargin?.top??0,r=e?.subGraphTitleMargin?.bottom??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins");async function Wl(e,t){const r=e.getElementsByTagName("img");if(!r||r.length===0)return;const i=t.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...r].map(s=>new Promise(o=>{function a(){if(s.style.display="flex",s.style.flexDirection="column",i){const n=xt().fontSize?xt().fontSize:window.getComputedStyle(document.body).fontSize,l=5,[c=tl.fontSize]=xs(n),h=c*l+"px";s.style.minWidth=h,s.style.maxWidth=h}else s.style.width="100%";o(s)}g(a,"setupImage"),setTimeout(()=>{s.complete&&a()}),s.addEventListener("error",a),s.addEventListener("load",a)})))}g(Wl,"configureLabelImages");const Fv=Object.freeze({left:0,top:0,width:16,height:16}),To=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),lp=Object.freeze({...Fv,...To}),Ev=Object.freeze({...lp,body:"",hidden:!1}),Mv=Object.freeze({width:null,height:null}),Av=Object.freeze({...Mv,...To}),$v=(e,t,r,i="")=>{const s=e.split(":");if(e.slice(0,1)==="@"){if(s.length<2||s.length>3)return null;i=s.shift().slice(1)}if(s.length>3||!s.length)return null;if(s.length>1){const n=s.pop(),l=s.pop(),c={provider:s.length>0?s[0]:i,prefix:l,name:n};return Ta(c)?c:null}const o=s[0],a=o.split("-");if(a.length>1){const n={provider:i,prefix:a.shift(),name:a.join("-")};return Ta(n)?n:null}if(r&&i===""){const n={provider:i,prefix:"",name:o};return Ta(n,r)?n:null}return null},Ta=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function Ov(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const i=((e.rotate||0)+(t.rotate||0))%4;return i&&(r.rotate=i),r}function hc(e,t){const r=Ov(e,t);for(const i in Ev)i in To?i in e&&!(i in r)&&(r[i]=To[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function Iv(e,t){const r=e.icons,i=e.aliases||Object.create(null),s=Object.create(null);function o(a){if(r[a])return s[a]=[];if(!(a in s)){s[a]=null;const n=i[a]&&i[a].parent,l=n&&o(n);l&&(s[a]=[n].concat(l))}return s[a]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(o),s}function cc(e,t,r){const i=e.icons,s=e.aliases||Object.create(null);let o={};function a(n){o=hc(i[n]||s[n],o)}return a(t),r.forEach(a),hc(e,o)}function Rv(e,t){if(e.icons[t])return cc(e,t,[]);const r=Iv(e,[t])[t];return r?cc(e,t,r):null}const Pv=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Dv=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function dc(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const i=e.split(Pv);if(i===null||!i.length)return e;const s=[];let o=i.shift(),a=Dv.test(o);for(;;){if(a){const n=parseFloat(o);isNaN(n)?s.push(o):s.push(Math.ceil(n*t*r)/r)}else s.push(o);if(o=i.shift(),o===void 0)return s.join("");a=!a}}function Nv(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const s=e.indexOf(">",i),o=e.indexOf("</"+t);if(s===-1||o===-1)break;const a=e.indexOf(">",o);if(a===-1)break;r+=e.slice(s+1,o).trim(),e=e.slice(0,i).trim()+e.slice(a+1)}return{defs:r,content:e}}function qv(e,t){return e?"<defs>"+e+"</defs>"+t:t}function zv(e,t,r){const i=Nv(e);return qv(i.defs,t+i.content+r)}const Wv=e=>e==="unset"||e==="undefined"||e==="none";function jv(e,t){const r={...lp,...e},i={...Av,...t},s={left:r.left,top:r.top,width:r.width,height:r.height};let o=r.body;[r,i].forEach(m=>{const y=[],x=m.hFlip,C=m.vFlip;let k=m.rotate;x?C?k+=2:(y.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),y.push("scale(-1 1)"),s.top=s.left=0):C&&(y.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),y.push("scale(1 -1)"),s.top=s.left=0);let v;switch(k<0&&(k-=Math.floor(k/4)*4),k=k%4,k){case 1:v=s.height/2+s.top,y.unshift("rotate(90 "+v.toString()+" "+v.toString()+")");break;case 2:y.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:v=s.width/2+s.left,y.unshift("rotate(-90 "+v.toString()+" "+v.toString()+")");break}k%2===1&&(s.left!==s.top&&(v=s.left,s.left=s.top,s.top=v),s.width!==s.height&&(v=s.width,s.width=s.height,s.height=v)),y.length&&(o=zv(o,'<g transform="'+y.join(" ")+'">',"</g>"))});const a=i.width,n=i.height,l=s.width,c=s.height;let h,d;a===null?(d=n===null?"1em":n==="auto"?c:n,h=dc(d,l/c)):(h=a==="auto"?l:a,d=n===null?dc(h,c/l):n==="auto"?c:n);const f={},u=(m,y)=>{Wv(y)||(f[m]=y.toString())};u("width",h),u("height",d);const p=[s.left,s.top,l,c];return f.viewBox=p.join(" "),{attributes:f,viewBox:p,body:o}}const Hv=/\sid="(\S+)"/g,uc=new Map;function Yv(e){e=e.replace(/[0-9]+$/,"")||"a";const t=uc.get(e)||0;return uc.set(e,t+1),t?`${e}${t}`:e}function Uv(e){const t=[];let r;for(;r=Hv.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(s=>{const o=Yv(s),a=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+o+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function Xv(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in t)r+=" "+i+'="'+t[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}var hp={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},Tn=new Map,cp=new Map,dp=g(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(G.debug("Registering icon pack:",t.name),"loader"in t)cp.set(t.name,t.loader);else if("icons"in t)Tn.set(t.name,t.icons);else throw G.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),up=g(async(e,t)=>{const r=$v(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);const i=r.prefix||t;if(!i)throw new Error(`Icon name must contain a prefix: ${e}`);let s=Tn.get(i);if(!s){const a=cp.get(i);if(!a)throw new Error(`Icon set not found: ${r.prefix}`);try{s={...await a(),prefix:i},Tn.set(i,s)}catch(n){throw G.error(n),new Error(`Failed to load icon set: ${r.prefix}`)}}const o=Rv(s,r.name);if(!o)throw new Error(`Icon not found: ${e}`);return o},"getRegisteredIconData"),Gv=g(async e=>{try{return await up(e),!0}catch{return!1}},"isIconAvailable"),vi=g(async(e,t,r)=>{let i;try{i=await up(e,t?.fallbackPrefix)}catch(a){G.error(a),i=hp}const s=jv(i,t),o=Xv(Uv(s.body),{...s.attributes,...r});return pe(o,Bt())},"getIconSVG");function jl(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var $r=jl();function fp(e){$r=e}var ts={exec:()=>null};function bt(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(s,o)=>{let a=typeof o=="string"?o:o.source;return a=a.replace(re.caret,"$1"),r=r.replace(s,a),i},getRegex:()=>new RegExp(r,t)};return i}var Vv=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),re={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},Zv=/^(?:[ \t]*(?:\n|$))+/,Kv=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Qv=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Cs=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Jv=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Hl=/(?:[*+-]|\d{1,9}[.)])/,gp=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,pp=bt(gp).replace(/bull/g,Hl).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),tT=bt(gp).replace(/bull/g,Hl).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Yl=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,eT=/^[^\n]+/,Ul=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,rT=bt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ul).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),iT=bt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Hl).getRegex(),ta="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",Xl=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,sT=bt("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Xl).replace("tag",ta).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),mp=bt(Yl).replace("hr",Cs).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",ta).getRegex(),oT=bt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",mp).getRegex(),Gl={blockquote:oT,code:Kv,def:rT,fences:Qv,heading:Jv,hr:Cs,html:sT,lheading:pp,list:iT,newline:Zv,paragraph:mp,table:ts,text:eT},fc=bt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Cs).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ta).getRegex(),aT={...Gl,lheading:tT,table:fc,paragraph:bt(Yl).replace("hr",Cs).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",fc).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",ta).getRegex()},nT={...Gl,html:bt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Xl).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:ts,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:bt(Yl).replace("hr",Cs).replace("heading",` *#{1,6} *[^
164
+ ]`).replace("lheading",pp).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},lT=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,hT=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,yp=/^( {2,}|\\)\n(?!\s*$)/,cT=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ea=/[\p{P}\p{S}]/u,Vl=/[\s\p{P}\p{S}]/u,xp=/[^\s\p{P}\p{S}]/u,dT=bt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Vl).getRegex(),Cp=/(?!~)[\p{P}\p{S}]/u,uT=/(?!~)[\s\p{P}\p{S}]/u,fT=/(?:[^\s\p{P}\p{S}]|~)/u,gT=bt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Vv?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),bp=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,pT=bt(bp,"u").replace(/punct/g,ea).getRegex(),mT=bt(bp,"u").replace(/punct/g,Cp).getRegex(),kp="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",yT=bt(kp,"gu").replace(/notPunctSpace/g,xp).replace(/punctSpace/g,Vl).replace(/punct/g,ea).getRegex(),xT=bt(kp,"gu").replace(/notPunctSpace/g,fT).replace(/punctSpace/g,uT).replace(/punct/g,Cp).getRegex(),CT=bt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,xp).replace(/punctSpace/g,Vl).replace(/punct/g,ea).getRegex(),bT=bt(/\\(punct)/,"gu").replace(/punct/g,ea).getRegex(),kT=bt(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),wT=bt(Xl).replace("(?:-->|$)","-->").getRegex(),ST=bt("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",wT).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),_o=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,vT=bt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",_o).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),wp=bt(/^!?\[(label)\]\[(ref)\]/).replace("label",_o).replace("ref",Ul).getRegex(),Sp=bt(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ul).getRegex(),TT=bt("reflink|nolink(?!\\()","g").replace("reflink",wp).replace("nolink",Sp).getRegex(),gc=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Zl={_backpedal:ts,anyPunctuation:bT,autolink:kT,blockSkip:gT,br:yp,code:hT,del:ts,emStrongLDelim:pT,emStrongRDelimAst:yT,emStrongRDelimUnd:CT,escape:lT,link:vT,nolink:Sp,punctuation:dT,reflink:wp,reflinkSearch:TT,tag:ST,text:cT,url:ts},_T={...Zl,link:bt(/^!?\[(label)\]\((.*?)\)/).replace("label",_o).getRegex(),reflink:bt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",_o).getRegex()},_n={...Zl,emStrongRDelimAst:xT,emStrongLDelim:mT,url:bt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",gc).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:bt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",gc).getRegex()},BT={..._n,br:bt(yp).replace("{2,}","*").getRegex(),text:bt(_n.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Rs={normal:Gl,gfm:aT,pedantic:nT},Oi={normal:Zl,gfm:_n,breaks:BT,pedantic:_T},LT={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},pc=e=>LT[e];function Fe(e,t){if(t){if(re.escapeTest.test(e))return e.replace(re.escapeReplace,pc)}else if(re.escapeTestNoEncode.test(e))return e.replace(re.escapeReplaceNoEncode,pc);return e}function mc(e){try{e=encodeURI(e).replace(re.percentDecode,"%")}catch{return null}return e}function yc(e,t){let r=e.replace(re.findPipe,(o,a,n)=>{let l=!1,c=a;for(;--c>=0&&n[c]==="\\";)l=!l;return l?"|":" |"}),i=r.split(re.splitPipe),s=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;s<i.length;s++)i[s]=i[s].trim().replace(re.slashPipe,"|");return i}function Ii(e,t,r){let i=e.length;if(i===0)return"";let s=0;for(;s<i&&e.charAt(i-s-1)===t;)s++;return e.slice(0,i-s)}function FT(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let i=0;i<e.length;i++)if(e[i]==="\\")i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return r>0?-2:-1}function xc(e,t,r,i,s){let o=t.href,a=t.title||null,n=e[1].replace(s.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:o,title:a,text:n,tokens:i.inlineTokens(n)};return i.state.inLink=!1,l}function ET(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let s=i[1];return t.split(`
165
+ `).map(o=>{let a=o.match(r.other.beginningSpace);if(a===null)return o;let[n]=a;return n.length>=s.length?o.slice(s.length):o}).join(`
166
+ `)}var Bo=class{options;rules;lexer;constructor(t){this.options=t||$r}space(t){let r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){let r=this.rules.block.code.exec(t);if(r){let i=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?i:Ii(i,`
167
+ `)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],s=ET(i,r[3]||"",this.rules);return{type:"code",raw:i,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:s}}}heading(t){let r=this.rules.block.heading.exec(t);if(r){let i=r[2].trim();if(this.rules.other.endingHash.test(i)){let s=Ii(i,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(i=s.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(t){let r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:Ii(r[0],`
168
+ `)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=Ii(r[0],`
169
+ `).split(`
170
+ `),s="",o="",a=[];for(;i.length>0;){let n=!1,l=[],c;for(c=0;c<i.length;c++)if(this.rules.other.blockquoteStart.test(i[c]))l.push(i[c]),n=!0;else if(!n)l.push(i[c]);else break;i=i.slice(c);let h=l.join(`
171
+ `),d=h.replace(this.rules.other.blockquoteSetextReplace,`
172
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
173
+ ${h}`:h,o=o?`${o}
174
+ ${d}`:d;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,a,!0),this.lexer.state.top=f,i.length===0)break;let u=a.at(-1);if(u?.type==="code")break;if(u?.type==="blockquote"){let p=u,m=p.raw+`
175
+ `+i.join(`
176
+ `),y=this.blockquote(m);a[a.length-1]=y,s=s.substring(0,s.length-p.raw.length)+y.raw,o=o.substring(0,o.length-p.text.length)+y.text;break}else if(u?.type==="list"){let p=u,m=p.raw+`
177
+ `+i.join(`
178
+ `),y=this.list(m);a[a.length-1]=y,s=s.substring(0,s.length-u.raw.length)+y.raw,o=o.substring(0,o.length-p.raw.length)+y.raw,i=m.substring(a.at(-1).raw.length).split(`
179
+ `);continue}}return{type:"blockquote",raw:s,tokens:a,text:o}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),s=i.length>1,o={type:"list",raw:"",ordered:s,start:s?+i.slice(0,-1):"",loose:!1,items:[]};i=s?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=s?i:"[*+-]");let a=this.rules.other.listItemRegex(i),n=!1;for(;t;){let c=!1,h="",d="";if(!(r=a.exec(t))||this.rules.block.hr.test(t))break;h=r[0],t=t.substring(h.length);let f=r[2].split(`
180
+ `,1)[0].replace(this.rules.other.listReplaceTabs,C=>" ".repeat(3*C.length)),u=t.split(`
181
+ `,1)[0],p=!f.trim(),m=0;if(this.options.pedantic?(m=2,d=f.trimStart()):p?m=r[1].length+1:(m=r[2].search(this.rules.other.nonSpaceChar),m=m>4?1:m,d=f.slice(m),m+=r[1].length),p&&this.rules.other.blankLine.test(u)&&(h+=u+`
182
+ `,t=t.substring(u.length+1),c=!0),!c){let C=this.rules.other.nextBulletRegex(m),k=this.rules.other.hrRegex(m),v=this.rules.other.fencesBeginRegex(m),S=this.rules.other.headingBeginRegex(m),_=this.rules.other.htmlBeginRegex(m);for(;t;){let L=t.split(`
183
+ `,1)[0],T;if(u=L,this.options.pedantic?(u=u.replace(this.rules.other.listReplaceNesting," "),T=u):T=u.replace(this.rules.other.tabCharGlobal," "),v.test(u)||S.test(u)||_.test(u)||C.test(u)||k.test(u))break;if(T.search(this.rules.other.nonSpaceChar)>=m||!u.trim())d+=`
184
+ `+T.slice(m);else{if(p||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||v.test(f)||S.test(f)||k.test(f))break;d+=`
185
+ `+u}!p&&!u.trim()&&(p=!0),h+=L+`
186
+ `,t=t.substring(L.length+1),f=T.slice(m)}}o.loose||(n?o.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(n=!0));let y=null,x;this.options.gfm&&(y=this.rules.other.listIsTask.exec(d),y&&(x=y[0]!=="[ ] ",d=d.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:h,task:!!y,checked:x,loose:!1,text:d,tokens:[]}),o.raw+=h}let l=o.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let c=0;c<o.items.length;c++)if(this.lexer.state.top=!1,o.items[c].tokens=this.lexer.blockTokens(o.items[c].text,[]),!o.loose){let h=o.items[c].tokens.filter(f=>f.type==="space"),d=h.length>0&&h.some(f=>this.rules.other.anyLine.test(f.raw));o.loose=d}if(o.loose)for(let c=0;c<o.items.length;c++)o.items[c].loose=!0;return o}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let i=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:i,raw:r[0],href:s,title:o}}}table(t){let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=yc(r[1]),s=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=r[3]?.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
187
+ `):[],a={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===s.length){for(let n of s)this.rules.other.tableAlignRight.test(n)?a.align.push("right"):this.rules.other.tableAlignCenter.test(n)?a.align.push("center"):this.rules.other.tableAlignLeft.test(n)?a.align.push("left"):a.align.push(null);for(let n=0;n<i.length;n++)a.header.push({text:i[n],tokens:this.lexer.inline(i[n]),header:!0,align:a.align[n]});for(let n of o)a.rows.push(yc(n,a.header.length).map((l,c)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:a.align[c]})));return a}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let i=r[1].charAt(r[1].length-1)===`
188
+ `?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let a=Ii(i.slice(0,-1),"\\");if((i.length-a.length)%2===0)return}else{let a=FT(r[2],"()");if(a===-2)return;if(a>-1){let n=(r[0].indexOf("!")===0?5:4)+r[1].length+a;r[2]=r[2].substring(0,a),r[0]=r[0].substring(0,n).trim(),r[3]=""}}let s=r[2],o="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(s);a&&(s=a[1],o=a[3])}else o=r[3]?r[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?s=s.slice(1):s=s.slice(1,-1)),xc(r,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let s=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=r[s.toLowerCase()];if(!o){let a=i[0].charAt(0);return{type:"text",raw:a,text:a}}return xc(i,o,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!(!s||s[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[2])||!i||this.rules.inline.punctuation.exec(i))){let o=[...s[0]].length-1,a,n,l=o,c=0,h=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,r=r.slice(-1*t.length+o);(s=h.exec(r))!=null;){if(a=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!a)continue;if(n=[...a].length,s[3]||s[4]){l+=n;continue}else if((s[5]||s[6])&&o%3&&!((o+n)%3)){c+=n;continue}if(l-=n,l>0)continue;n=Math.min(n,n+l+c);let d=[...s[0]][0].length,f=t.slice(0,o+s.index+d+n);if(Math.min(o,n)%2){let p=f.slice(1,-1);return{type:"em",raw:f,text:p,tokens:this.lexer.inlineTokens(p)}}let u=f.slice(2,-2);return{type:"strong",raw:f,text:u,tokens:this.lexer.inlineTokens(u)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(i),o=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return s&&o&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let i,s;return r[2]==="@"?(i=r[1],s="mailto:"+i):(i=r[1],s=i),{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(t){let r;if(r=this.rules.inline.url.exec(t)){let i,s;if(r[2]==="@")i=r[0],s="mailto:"+i;else{let o;do o=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"";while(o!==r[0]);i=r[0],r[1]==="www."?s="http://"+r[0]:s=r[0]}return{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let i=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:i}}}},ke=class Bn{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||$r,this.options.tokenizer=this.options.tokenizer||new Bo,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:re,block:Rs.normal,inline:Oi.normal};this.options.pedantic?(r.block=Rs.pedantic,r.inline=Oi.pedantic):this.options.gfm&&(r.block=Rs.gfm,this.options.breaks?r.inline=Oi.breaks:r.inline=Oi.gfm),this.tokenizer.rules=r}static get rules(){return{block:Rs,inline:Oi}}static lex(t,r){return new Bn(r).lex(t)}static lexInline(t,r){return new Bn(r).inlineTokens(t)}lex(t){t=t.replace(re.carriageReturn,`
189
+ `),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],i=!1){for(this.options.pedantic&&(t=t.replace(re.tabCharGlobal," ").replace(re.spaceLine,""));t;){let s;if(this.options.extensions?.block?.some(a=>(s=a.call({lexer:this},t,r))?(t=t.substring(s.raw.length),r.push(s),!0):!1))continue;if(s=this.tokenizer.space(t)){t=t.substring(s.raw.length);let a=r.at(-1);s.raw.length===1&&a!==void 0?a.raw+=`
190
+ `:r.push(s);continue}if(s=this.tokenizer.code(t)){t=t.substring(s.raw.length);let a=r.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
191
+ `)?"":`
192
+ `)+s.raw,a.text+=`
193
+ `+s.text,this.inlineQueue.at(-1).src=a.text):r.push(s);continue}if(s=this.tokenizer.fences(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.heading(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.hr(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.blockquote(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.list(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.html(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.def(t)){t=t.substring(s.raw.length);let a=r.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
194
+ `)?"":`
195
+ `)+s.raw,a.text+=`
196
+ `+s.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[s.tag]||(this.tokens.links[s.tag]={href:s.href,title:s.title},r.push(s));continue}if(s=this.tokenizer.table(t)){t=t.substring(s.raw.length),r.push(s);continue}if(s=this.tokenizer.lheading(t)){t=t.substring(s.raw.length),r.push(s);continue}let o=t;if(this.options.extensions?.startBlock){let a=1/0,n=t.slice(1),l;this.options.extensions.startBlock.forEach(c=>{l=c.call({lexer:this},n),typeof l=="number"&&l>=0&&(a=Math.min(a,l))}),a<1/0&&a>=0&&(o=t.substring(0,a+1))}if(this.state.top&&(s=this.tokenizer.paragraph(o))){let a=r.at(-1);i&&a?.type==="paragraph"?(a.raw+=(a.raw.endsWith(`
197
+ `)?"":`
198
+ `)+s.raw,a.text+=`
199
+ `+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):r.push(s),i=o.length!==t.length,t=t.substring(s.raw.length);continue}if(s=this.tokenizer.text(t)){t=t.substring(s.raw.length);let a=r.at(-1);a?.type==="text"?(a.raw+=(a.raw.endsWith(`
200
+ `)?"":`
201
+ `)+s.raw,a.text+=`
202
+ `+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):r.push(s);continue}if(t){let a="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let i=t,s=null;if(this.tokens.links){let l=Object.keys(this.tokens.links);if(l.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)l.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,s.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let o;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)o=s[2]?s[2].length:0,i=i.slice(0,s.index+o)+"["+"a".repeat(s[0].length-o-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let a=!1,n="";for(;t;){a||(n=""),a=!1;let l;if(this.options.extensions?.inline?.some(h=>(l=h.call({lexer:this},t,r))?(t=t.substring(l.raw.length),r.push(l),!0):!1))continue;if(l=this.tokenizer.escape(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.tag(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.link(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(l.raw.length);let h=r.at(-1);l.type==="text"&&h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);continue}if(l=this.tokenizer.emStrong(t,i,n)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.codespan(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.br(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.del(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.autolink(t)){t=t.substring(l.raw.length),r.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(t))){t=t.substring(l.raw.length),r.push(l);continue}let c=t;if(this.options.extensions?.startInline){let h=1/0,d=t.slice(1),f;this.options.extensions.startInline.forEach(u=>{f=u.call({lexer:this},d),typeof f=="number"&&f>=0&&(h=Math.min(h,f))}),h<1/0&&h>=0&&(c=t.substring(0,h+1))}if(l=this.tokenizer.inlineText(c)){t=t.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(n=l.raw.slice(-1)),a=!0;let h=r.at(-1);h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);continue}if(t){let h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return r}},Lo=class{options;parser;constructor(t){this.options=t||$r}space(t){return""}code({text:t,lang:r,escaped:i}){let s=(r||"").match(re.notSpaceStart)?.[0],o=t.replace(re.endingNewline,"")+`
203
+ `;return s?'<pre><code class="language-'+Fe(s)+'">'+(i?o:Fe(o,!0))+`</code></pre>
204
+ `:"<pre><code>"+(i?o:Fe(o,!0))+`</code></pre>
205
+ `}blockquote({tokens:t}){return`<blockquote>
206
+ ${this.parser.parse(t)}</blockquote>
207
+ `}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
208
+ `}hr(t){return`<hr>
209
+ `}list(t){let r=t.ordered,i=t.start,s="";for(let n=0;n<t.items.length;n++){let l=t.items[n];s+=this.listitem(l)}let o=r?"ol":"ul",a=r&&i!==1?' start="'+i+'"':"";return"<"+o+a+`>
210
+ `+s+"</"+o+`>
211
+ `}listitem(t){let r="";if(t.task){let i=this.checkbox({checked:!!t.checked});t.loose?t.tokens[0]?.type==="paragraph"?(t.tokens[0].text=i+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=i+" "+Fe(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:i+" ",text:i+" ",escaped:!0}):r+=i+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
212
+ `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
213
+ `}table(t){let r="",i="";for(let o=0;o<t.header.length;o++)i+=this.tablecell(t.header[o]);r+=this.tablerow({text:i});let s="";for(let o=0;o<t.rows.length;o++){let a=t.rows[o];i="";for(let n=0;n<a.length;n++)i+=this.tablecell(a[n]);s+=this.tablerow({text:i})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
214
+ <thead>
215
+ `+r+`</thead>
216
+ `+s+`</table>
217
+ `}tablerow({text:t}){return`<tr>
218
+ ${t}</tr>
219
+ `}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
220
+ `}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Fe(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:i}){let s=this.parser.parseInline(i),o=mc(t);if(o===null)return s;t=o;let a='<a href="'+t+'"';return r&&(a+=' title="'+Fe(r)+'"'),a+=">"+s+"</a>",a}image({href:t,title:r,text:i,tokens:s}){s&&(i=this.parser.parseInline(s,this.parser.textRenderer));let o=mc(t);if(o===null)return Fe(i);t=o;let a=`<img src="${t}" alt="${i}"`;return r&&(a+=` title="${Fe(r)}"`),a+=">",a}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Fe(t.text)}},Kl=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},we=class Ln{options;renderer;textRenderer;constructor(t){this.options=t||$r,this.options.renderer=this.options.renderer||new Lo,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Kl}static parse(t,r){return new Ln(r).parse(t)}static parseInline(t,r){return new Ln(r).parseInline(t)}parse(t,r=!0){let i="";for(let s=0;s<t.length;s++){let o=t[s];if(this.options.extensions?.renderers?.[o.type]){let n=o,l=this.options.extensions.renderers[n.type].call({parser:this},n);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(n.type)){i+=l||"";continue}}let a=o;switch(a.type){case"space":{i+=this.renderer.space(a);continue}case"hr":{i+=this.renderer.hr(a);continue}case"heading":{i+=this.renderer.heading(a);continue}case"code":{i+=this.renderer.code(a);continue}case"table":{i+=this.renderer.table(a);continue}case"blockquote":{i+=this.renderer.blockquote(a);continue}case"list":{i+=this.renderer.list(a);continue}case"html":{i+=this.renderer.html(a);continue}case"def":{i+=this.renderer.def(a);continue}case"paragraph":{i+=this.renderer.paragraph(a);continue}case"text":{let n=a,l=this.renderer.text(n);for(;s+1<t.length&&t[s+1].type==="text";)n=t[++s],l+=`
221
+ `+this.renderer.text(n);r?i+=this.renderer.paragraph({type:"paragraph",raw:l,text:l,tokens:[{type:"text",raw:l,text:l,escaped:!0}]}):i+=l;continue}default:{let n='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw new Error(n)}}}return i}parseInline(t,r=this.renderer){let i="";for(let s=0;s<t.length;s++){let o=t[s];if(this.options.extensions?.renderers?.[o.type]){let n=this.options.extensions.renderers[o.type].call({parser:this},o);if(n!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){i+=n||"";continue}}let a=o;switch(a.type){case"escape":{i+=r.text(a);break}case"html":{i+=r.html(a);break}case"link":{i+=r.link(a);break}case"image":{i+=r.image(a);break}case"strong":{i+=r.strong(a);break}case"em":{i+=r.em(a);break}case"codespan":{i+=r.codespan(a);break}case"br":{i+=r.br(a);break}case"del":{i+=r.del(a);break}case"text":{i+=r.text(a);break}default:{let n='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw new Error(n)}}}return i}},Yi=class{options;block;constructor(t){this.options=t||$r}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?ke.lex:ke.lexInline}provideParser(){return this.block?we.parse:we.parseInline}},MT=class{defaults=jl();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=we;Renderer=Lo;TextRenderer=Kl;Lexer=ke;Tokenizer=Bo;Hooks=Yi;constructor(...t){this.use(...t)}walkTokens(t,r){let i=[];for(let s of t)switch(i=i.concat(r.call(this,s)),s.type){case"table":{let o=s;for(let a of o.header)i=i.concat(this.walkTokens(a.tokens,r));for(let a of o.rows)for(let n of a)i=i.concat(this.walkTokens(n.tokens,r));break}case"list":{let o=s;i=i.concat(this.walkTokens(o.items,r));break}default:{let o=s;this.defaults.extensions?.childTokens?.[o.type]?this.defaults.extensions.childTokens[o.type].forEach(a=>{let n=o[a].flat(1/0);i=i.concat(this.walkTokens(n,r))}):o.tokens&&(i=i.concat(this.walkTokens(o.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let s={...i};if(s.async=this.defaults.async||s.async||!1,i.extensions&&(i.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let a=r.renderers[o.name];a?r.renderers[o.name]=function(...n){let l=o.renderer.apply(this,n);return l===!1&&(l=a.apply(this,n)),l}:r.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=r[o.level];a?a.unshift(o.tokenizer):r[o.level]=[o.tokenizer],o.start&&(o.level==="block"?r.startBlock?r.startBlock.push(o.start):r.startBlock=[o.start]:o.level==="inline"&&(r.startInline?r.startInline.push(o.start):r.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(r.childTokens[o.name]=o.childTokens)}),s.extensions=r),i.renderer){let o=this.defaults.renderer||new Lo(this.defaults);for(let a in i.renderer){if(!(a in o))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let n=a,l=i.renderer[n],c=o[n];o[n]=(...h)=>{let d=l.apply(o,h);return d===!1&&(d=c.apply(o,h)),d||""}}s.renderer=o}if(i.tokenizer){let o=this.defaults.tokenizer||new Bo(this.defaults);for(let a in i.tokenizer){if(!(a in o))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let n=a,l=i.tokenizer[n],c=o[n];o[n]=(...h)=>{let d=l.apply(o,h);return d===!1&&(d=c.apply(o,h)),d}}s.tokenizer=o}if(i.hooks){let o=this.defaults.hooks||new Yi;for(let a in i.hooks){if(!(a in o))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let n=a,l=i.hooks[n],c=o[n];Yi.passThroughHooks.has(a)?o[n]=h=>{if(this.defaults.async&&Yi.passThroughHooksRespectAsync.has(a))return(async()=>{let f=await l.call(o,h);return c.call(o,f)})();let d=l.call(o,h);return c.call(o,d)}:o[n]=(...h)=>{if(this.defaults.async)return(async()=>{let f=await l.apply(o,h);return f===!1&&(f=await c.apply(o,h)),f})();let d=l.apply(o,h);return d===!1&&(d=c.apply(o,h)),d}}s.hooks=o}if(i.walkTokens){let o=this.defaults.walkTokens,a=i.walkTokens;s.walkTokens=function(n){let l=[];return l.push(a.call(this,n)),o&&(l=l.concat(o.call(this,n))),l}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return ke.lex(t,r??this.defaults)}parser(t,r){return we.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let s={...i},o={...this.defaults,...s},a=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&s.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=t),o.async)return(async()=>{let n=o.hooks?await o.hooks.preprocess(r):r,l=await(o.hooks?await o.hooks.provideLexer():t?ke.lex:ke.lexInline)(n,o),c=o.hooks?await o.hooks.processAllTokens(l):l;o.walkTokens&&await Promise.all(this.walkTokens(c,o.walkTokens));let h=await(o.hooks?await o.hooks.provideParser():t?we.parse:we.parseInline)(c,o);return o.hooks?await o.hooks.postprocess(h):h})().catch(a);try{o.hooks&&(r=o.hooks.preprocess(r));let n=(o.hooks?o.hooks.provideLexer():t?ke.lex:ke.lexInline)(r,o);o.hooks&&(n=o.hooks.processAllTokens(n)),o.walkTokens&&this.walkTokens(n,o.walkTokens);let l=(o.hooks?o.hooks.provideParser():t?we.parse:we.parseInline)(n,o);return o.hooks&&(l=o.hooks.postprocess(l)),l}catch(n){return a(n)}}}onError(t,r){return i=>{if(i.message+=`
222
+ Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+Fe(i.message+"",!0)+"</pre>";return r?Promise.resolve(s):s}if(r)return Promise.reject(i);throw i}}},Mr=new MT;function kt(e,t){return Mr.parse(e,t)}kt.options=kt.setOptions=function(e){return Mr.setOptions(e),kt.defaults=Mr.defaults,fp(kt.defaults),kt};kt.getDefaults=jl;kt.defaults=$r;kt.use=function(...e){return Mr.use(...e),kt.defaults=Mr.defaults,fp(kt.defaults),kt};kt.walkTokens=function(e,t){return Mr.walkTokens(e,t)};kt.parseInline=Mr.parseInline;kt.Parser=we;kt.parser=we.parse;kt.Renderer=Lo;kt.TextRenderer=Kl;kt.Lexer=ke;kt.lexer=ke.lex;kt.Tokenizer=Bo;kt.Hooks=Yi;kt.parse=kt;kt.options;kt.setOptions;kt.use;kt.walkTokens;kt.parseInline;we.parse;ke.lex;function vp(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=Array.from(typeof e=="string"?[e]:e);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var s=i.reduce(function(n,l){var c=l.match(/\n([\t ]+|(?!\s).)/g);return c?n.concat(c.map(function(h){var d,f;return(f=(d=h.match(/[\t ]/g))===null||d===void 0?void 0:d.length)!==null&&f!==void 0?f:0})):n},[]);if(s.length){var o=new RegExp(`
223
+ [ ]{`+Math.min.apply(Math,s)+"}","g");i=i.map(function(n){return n.replace(o,`
224
+ `)})}i[0]=i[0].replace(/^\r?\n/,"");var a=i[0];return t.forEach(function(n,l){var c=a.match(/(?:^|\n)( *)$/),h=c?c[1]:"",d=n;typeof n=="string"&&n.includes(`
225
+ `)&&(d=String(n).split(`
226
+ `).map(function(f,u){return u===0?f:""+h+f}).join(`
227
+ `)),a+=d+i[l+1]}),a}function Tp(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
228
+ `).replace(/\n{2,}/g,`
229
+ `);return vp(i)}g(Tp,"preprocessMarkdown");function _p(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(t=>t.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(r=>({content:r,type:"normal"}))??[])}g(_p,"nonMarkdownToLines");function Bp(e,t={}){const r=Tp(e,t),i=kt.lexer(r),s=[[]];let o=0;function a(n,l="normal"){n.type==="text"?n.text.split(`
230
+ `).forEach((h,d)=>{d!==0&&(o++,s.push([])),h.split(" ").forEach(f=>{f=f.replace(/&#39;/g,"'"),f&&s[o].push({content:f,type:l})})}):n.type==="strong"||n.type==="em"?n.tokens.forEach(c=>{a(c,n.type)}):n.type==="html"&&s[o].push({content:n.text,type:"normal"})}return g(a,"processNode"),i.forEach(n=>{n.type==="paragraph"?n.tokens?.forEach(l=>{a(l)}):n.type==="html"?s[o].push({content:n.text,type:"normal"}):s[o].push({content:n.raw,type:"normal"})}),s}g(Bp,"markdownToLines");function Lp(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}g(Lp,"nonMarkdownToHTML");function Fp(e,{markdownAutoWrap:t}={}){const r=kt.lexer(e);function i(s){return s.type==="text"?t===!1?s.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):s.text.replace(/\n */g,"<br/>"):s.type==="strong"?`<strong>${s.tokens?.map(i).join("")}</strong>`:s.type==="em"?`<em>${s.tokens?.map(i).join("")}</em>`:s.type==="paragraph"?`<p>${s.tokens?.map(i).join("")}</p>`:s.type==="space"?"":s.type==="html"?`${s.text}`:s.type==="escape"?s.text:(G.warn(`Unsupported markdown: ${s.type}`),s.raw)}return g(i,"output"),r.map(i).join("")}g(Fp,"markdownToHTML");function Ep(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}g(Ep,"splitTextToChars");function Mp(e,t){const r=Ep(t.content);return Ql(e,[],r,t.type)}g(Mp,"splitWordToFitWidth");function Ql(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[s,...o]=r,a=[...t,s];return e([{content:a.join(""),type:i}])?Ql(e,a,o,i):(t.length===0&&s&&(t.push(s),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}g(Ql,"splitWordToFitWidthRecursion");function Ap(e,t){if(e.some(({content:r})=>r.includes(`
231
+ `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return Fo(e,t)}g(Ap,"splitLineToFitWidth");function Fo(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let s="";e[0].content===" "&&(s=" ",e.shift());const o=e.shift()??{content:" ",type:"normal"},a=[...i];if(s!==""&&a.push({content:s,type:"normal"}),a.push(o),t(a))return Fo(e,t,r,a);if(i.length>0)r.push(i),e.unshift(o);else if(o.content){const[n,l]=Mp(t,o);r.push([n]),l.content&&e.unshift(l)}return Fo(e,t,r)}g(Fo,"splitLineToFitWidthRecursion");function Fn(e,t){t&&e.attr("style",t)}g(Fn,"applyStyle");var Cc=16384;async function $p(e,t,r,i,s=!1,o=Bt()){const a=e.append("foreignObject");a.attr("width",`${Math.min(10*r,Cc)}px`),a.attr("height",`${Math.min(10*r,Cc)}px`);const n=a.append("xhtml:div"),l=ui(t.label)?await rl(t.label.replace(ki.lineBreakRegex,`
232
+ `),o):pe(t.label,o),c=t.isNode?"nodeLabel":"edgeLabel",h=n.append("span");h.html(l),Fn(h,t.labelStyle),h.attr("class",`${c} ${i}`),Fn(n,t.labelStyle),n.style("display","table-cell"),n.style("white-space","nowrap"),n.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(n.style("max-width",r+"px"),n.style("text-align","center")),n.attr("xmlns","http://www.w3.org/1999/xhtml"),s&&n.attr("class","labelBkg");let d=n.node().getBoundingClientRect();return d.width===r&&(n.style("display","table"),n.style("white-space","break-spaces"),n.style("width",r+"px"),d=n.node().getBoundingClientRect()),a.node()}g($p,"addHtmlSpan");function ra(e,t,r,i=!1){const s=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&s.attr("text-anchor","middle"),s}g(ra,"createTspan");function Op(e,t,r){const i=e.append("text"),s=ra(i,1,t);ia(s,r);const o=s.node().getComputedTextLength();return i.remove(),o}g(Op,"computeWidthOfText");function Ip(e,t,r){const i=e.append("text"),s=ra(i,1,t);ia(s,[{content:r,type:"normal"}]);const o=s.node()?.getBoundingClientRect();return o&&i.remove(),o}g(Ip,"computeDimensionOfText");function Rp(e,t,r,i=!1,s=!1){const a=t.append("g"),n=a.insert("rect").attr("class","background").attr("style","stroke: none"),l=a.append("text").attr("y","-10.1");s&&l.attr("text-anchor","middle");let c=0;for(const h of r){const d=g(u=>Op(a,1.1,u)<=e,"checkWidth"),f=d(h)?[h]:Ap(h,d);for(const u of f){const p=ra(l,c,1.1,s);ia(p,u),c++}}if(i){const h=l.node().getBBox(),d=2;return n.attr("x",h.x-d).attr("y",h.y-d).attr("width",h.width+2*d).attr("height",h.height+2*d),a.node()}else return l.node()}g(Rp,"createFormattedText");function En(e){const t=/&(amp|lt|gt);/g;return e.replace(t,(r,i)=>{switch(i){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}g(En,"decodeHTMLEntities");function ia(e,t){e.text(""),t.forEach((r,i)=>{const s=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?s.text(En(r.content)):s.text(" "+En(r.content))})}g(ia,"updateTextContentAndStyles");async function Pp(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(s,o,a)=>(r.push((async()=>{const n=`${o}:${a}`;return await Gv(n)?await vi(n,void 0,{class:"label-icon"}):`<i class='${pe(s,t).replace(":"," ")}'></i>`})()),s));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}g(Pp,"replaceIconSubstring");var Le=g(async(e,t="",{style:r="",isTitle:i=!1,classes:s="",useHtmlLabels:o=!0,markdown:a=!0,isNode:n=!0,width:l=200,addSvgBackground:c=!1}={},h)=>{if(G.debug("XYZ createText",t,r,i,s,o,n,"addSvgBackground: ",c),o){const d=a?Fp(t,h):Lp(t),f=await Pp(nr(d),h),u=t.replace(/\\\\/g,"\\"),p={isNode:n,label:ui(t)?u:f,labelStyle:r.replace("fill:","color:")};return await $p(e,p,l,s,c,h)}else{const d=nr(t.replace(/<br\s*\/?>/g,"<br/>")),f=a?Bp(d.replace("<br>","<br/>"),h):_p(d),u=Rp(l,e,f,t?c:!1,!n);if(n){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const p=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");pt(u).attr("style",p)}else{const p=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");pt(u).select("rect").attr("style",p.replace(/background:/g,"fill:"));const m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");pt(u).select("text").attr("style",m)}return i?pt(u).selectAll("tspan.text-outer-tspan").classed("title-row",!0):pt(u).selectAll("tspan.text-outer-tspan").classed("row",!0),u}},"createText");function _a(e,t,r){if(e&&e.length){const[i,s]=t,o=Math.PI/180*r,a=Math.cos(o),n=Math.sin(o);for(const l of e){const[c,h]=l;l[0]=(c-i)*a-(h-s)*n+i,l[1]=(c-i)*n+(h-s)*a+s}}}function AT(e,t){return e[0]===t[0]&&e[1]===t[1]}function $T(e,t,r,i=1){const s=r,o=Math.max(t,.1),a=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,n=[0,0];if(s)for(const c of a)_a(c,n,s);const l=(function(c,h,d){const f=[];for(const C of c){const k=[...C];AT(k[0],k[k.length-1])||k.push([k[0][0],k[0][1]]),k.length>2&&f.push(k)}const u=[];h=Math.max(h,.1);const p=[];for(const C of f)for(let k=0;k<C.length-1;k++){const v=C[k],S=C[k+1];if(v[1]!==S[1]){const _=Math.min(v[1],S[1]);p.push({ymin:_,ymax:Math.max(v[1],S[1]),x:_===v[1]?v[0]:S[0],islope:(S[0]-v[0])/(S[1]-v[1])})}}if(p.sort(((C,k)=>C.ymin<k.ymin?-1:C.ymin>k.ymin?1:C.x<k.x?-1:C.x>k.x?1:C.ymax===k.ymax?0:(C.ymax-k.ymax)/Math.abs(C.ymax-k.ymax))),!p.length)return u;let m=[],y=p[0].ymin,x=0;for(;m.length||p.length;){if(p.length){let C=-1;for(let k=0;k<p.length&&!(p[k].ymin>y);k++)C=k;p.splice(0,C+1).forEach((k=>{m.push({s:y,edge:k})}))}if(m=m.filter((C=>!(C.edge.ymax<=y))),m.sort(((C,k)=>C.edge.x===k.edge.x?0:(C.edge.x-k.edge.x)/Math.abs(C.edge.x-k.edge.x))),(d!==1||x%h==0)&&m.length>1)for(let C=0;C<m.length;C+=2){const k=C+1;if(k>=m.length)break;const v=m[C].edge,S=m[k].edge;u.push([[Math.round(v.x),y],[Math.round(S.x),y]])}y+=d,m.forEach((C=>{C.edge.x=C.edge.x+d*C.edge.islope})),x++}return u})(a,o,i);if(s){for(const c of a)_a(c,n,-s);(function(c,h,d){const f=[];c.forEach((u=>f.push(...u))),_a(f,h,d)})(l,n,-s)}return l}function bs(e,t){var r;const i=t.hachureAngle+90;let s=t.hachureGap;s<0&&(s=4*t.strokeWidth),s=Math.round(Math.max(s,.1));let o=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(o=s),$T(e,s,i,o||1)}class Jl{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=bs(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const s of t)i.push(...this.helper.doubleLineOps(s[0][0],s[0][1],s[1][0],s[1][1],r));return i}}function sa(e){const t=e[0],r=e[1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}class OT extends Jl{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const s=bs(t,Object.assign({},r,{hachureGap:i})),o=Math.PI/180*r.hachureAngle,a=[],n=.5*i*Math.cos(o),l=.5*i*Math.sin(o);for(const[c,h]of s)sa([c,h])&&a.push([[c[0]-n,c[1]+l],[...h]],[[c[0]+n,c[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(a,r)}}}class IT extends Jl{fillPolygons(t,r){const i=this._fillPolygons(t,r),s=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),o=this._fillPolygons(t,s);return i.ops=i.ops.concat(o.ops),i}}class RT{constructor(t){this.helper=t}fillPolygons(t,r){const i=bs(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let s=r.hachureGap;s<0&&(s=4*r.strokeWidth),s=Math.max(s,.1);let o=r.fillWeight;o<0&&(o=r.strokeWidth/2);const a=s/4;for(const n of t){const l=sa(n),c=l/s,h=Math.ceil(c)-1,d=l-h*s,f=(n[0][0]+n[1][0])/2-s/4,u=Math.min(n[0][1],n[1][1]);for(let p=0;p<h;p++){const m=u+d+p*s,y=f-a+2*Math.random()*a,x=m-a+2*Math.random()*a,C=this.helper.ellipse(y,x,o,o,r);i.push(...C.ops)}}return{type:"fillSketch",ops:i}}}class PT{constructor(t){this.helper=t}fillPolygons(t,r){const i=bs(t,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(t,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,s=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,o=[];return t.forEach((a=>{const n=sa(a),l=Math.floor(n/(i+s)),c=(n+s-l*(i+s))/2;let h=a[0],d=a[1];h[0]>d[0]&&(h=a[1],d=a[0]);const f=Math.atan((d[1]-h[1])/(d[0]-h[0]));for(let u=0;u<l;u++){const p=u*(i+s),m=p+i,y=[h[0]+p*Math.cos(f)+c*Math.cos(f),h[1]+p*Math.sin(f)+c*Math.sin(f)],x=[h[0]+m*Math.cos(f)+c*Math.cos(f),h[1]+m*Math.sin(f)+c*Math.sin(f)];o.push(...this.helper.doubleLineOps(y[0],y[1],x[0],x[1],r))}})),o}}class DT{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,s=r.zigzagOffset<0?i:r.zigzagOffset,o=bs(t,r=Object.assign({},r,{hachureGap:i+s}));return{type:"fillSketch",ops:this.zigzagLines(o,s,r)}}zigzagLines(t,r,i){const s=[];return t.forEach((o=>{const a=sa(o),n=Math.round(a/(2*r));let l=o[0],c=o[1];l[0]>c[0]&&(l=o[1],c=o[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let d=0;d<n;d++){const f=2*d*r,u=2*(d+1)*r,p=Math.sqrt(2*Math.pow(r,2)),m=[l[0]+f*Math.cos(h),l[1]+f*Math.sin(h)],y=[l[0]+u*Math.cos(h),l[1]+u*Math.sin(h)],x=[m[0]+p*Math.cos(h+Math.PI/4),m[1]+p*Math.sin(h+Math.PI/4)];s.push(...this.helper.doubleLineOps(m[0],m[1],x[0],x[1],i),...this.helper.doubleLineOps(x[0],x[1],y[0],y[1],i))}})),s}}const ae={};class NT{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const qT=0,Ba=1,bc=2,Ps={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 La(e,t){return e.type===t}function th(e){const t=[],r=(function(a){const n=new Array;for(;a!=="";)if(a.match(/^([ \t\r\n,]+)/))a=a.substr(RegExp.$1.length);else if(a.match(/^([aAcChHlLmMqQsStTvVzZ])/))n[n.length]={type:qT,text:RegExp.$1},a=a.substr(RegExp.$1.length);else{if(!a.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];n[n.length]={type:Ba,text:`${parseFloat(RegExp.$1)}`},a=a.substr(RegExp.$1.length)}return n[n.length]={type:bc,text:""},n})(e);let i="BOD",s=0,o=r[s];for(;!La(o,bc);){let a=0;const n=[];if(i==="BOD"){if(o.text!=="M"&&o.text!=="m")return th("M0,0"+e);s++,a=Ps[o.text],i=o.text}else La(o,Ba)?a=Ps[i]:(s++,a=Ps[o.text],i=o.text);if(!(s+a<r.length))throw new Error("Path data ended short");for(let l=s;l<s+a;l++){const c=r[l];if(!La(c,Ba))throw new Error("Param not a number: "+i+","+c.text);n[n.length]=+c.text}if(typeof Ps[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:n};t.push(l),s+=a,o=r[s],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function Dp(e){let t=0,r=0,i=0,s=0;const o=[];for(const{key:a,data:n}of e)switch(a){case"M":o.push({key:"M",data:[...n]}),[t,r]=n,[i,s]=n;break;case"m":t+=n[0],r+=n[1],o.push({key:"M",data:[t,r]}),i=t,s=r;break;case"L":o.push({key:"L",data:[...n]}),[t,r]=n;break;case"l":t+=n[0],r+=n[1],o.push({key:"L",data:[t,r]});break;case"C":o.push({key:"C",data:[...n]}),t=n[4],r=n[5];break;case"c":{const l=n.map(((c,h)=>h%2?c+r:c+t));o.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":o.push({key:"Q",data:[...n]}),t=n[2],r=n[3];break;case"q":{const l=n.map(((c,h)=>h%2?c+r:c+t));o.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":o.push({key:"A",data:[...n]}),t=n[5],r=n[6];break;case"a":t+=n[5],r+=n[6],o.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],t,r]});break;case"H":o.push({key:"H",data:[...n]}),t=n[0];break;case"h":t+=n[0],o.push({key:"H",data:[t]});break;case"V":o.push({key:"V",data:[...n]}),r=n[0];break;case"v":r+=n[0],o.push({key:"V",data:[r]});break;case"S":o.push({key:"S",data:[...n]}),t=n[2],r=n[3];break;case"s":{const l=n.map(((c,h)=>h%2?c+r:c+t));o.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":o.push({key:"T",data:[...n]}),t=n[0],r=n[1];break;case"t":t+=n[0],r+=n[1],o.push({key:"T",data:[t,r]});break;case"Z":case"z":o.push({key:"Z",data:[]}),t=i,r=s}return o}function Np(e){const t=[];let r="",i=0,s=0,o=0,a=0,n=0,l=0;for(const{key:c,data:h}of e){switch(c){case"M":t.push({key:"M",data:[...h]}),[i,s]=h,[o,a]=h;break;case"C":t.push({key:"C",data:[...h]}),i=h[4],s=h[5],n=h[2],l=h[3];break;case"L":t.push({key:"L",data:[...h]}),[i,s]=h;break;case"H":i=h[0],t.push({key:"L",data:[i,s]});break;case"V":s=h[0],t.push({key:"L",data:[i,s]});break;case"S":{let d=0,f=0;r==="C"||r==="S"?(d=i+(i-n),f=s+(s-l)):(d=i,f=s),t.push({key:"C",data:[d,f,...h]}),n=h[0],l=h[1],i=h[2],s=h[3];break}case"T":{const[d,f]=h;let u=0,p=0;r==="Q"||r==="T"?(u=i+(i-n),p=s+(s-l)):(u=i,p=s);const m=i+2*(u-i)/3,y=s+2*(p-s)/3,x=d+2*(u-d)/3,C=f+2*(p-f)/3;t.push({key:"C",data:[m,y,x,C,d,f]}),n=u,l=p,i=d,s=f;break}case"Q":{const[d,f,u,p]=h,m=i+2*(d-i)/3,y=s+2*(f-s)/3,x=u+2*(d-u)/3,C=p+2*(f-p)/3;t.push({key:"C",data:[m,y,x,C,u,p]}),n=d,l=f,i=u,s=p;break}case"A":{const d=Math.abs(h[0]),f=Math.abs(h[1]),u=h[2],p=h[3],m=h[4],y=h[5],x=h[6];d===0||f===0?(t.push({key:"C",data:[i,s,y,x,y,x]}),i=y,s=x):(i!==y||s!==x)&&(qp(i,s,y,x,d,f,u,p,m).forEach((function(C){t.push({key:"C",data:C})})),i=y,s=x);break}case"Z":t.push({key:"Z",data:[]}),i=o,s=a}r=c}return t}function Ri(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function qp(e,t,r,i,s,o,a,n,l,c){const h=(d=a,Math.PI*d/180);var d;let f=[],u=0,p=0,m=0,y=0;if(c)[u,p,m,y]=c;else{[e,t]=Ri(e,t,-h),[r,i]=Ri(r,i,-h);const X=(e-r)/2,I=(t-i)/2;let A=X*X/(s*s)+I*I/(o*o);A>1&&(A=Math.sqrt(A),s*=A,o*=A);const M=s*s,D=o*o,O=M*D-M*I*I-D*X*X,E=M*I*I+D*X*X,P=(n===l?-1:1)*Math.sqrt(Math.abs(O/E));m=P*s*I/o+(e+r)/2,y=P*-o*X/s+(t+i)/2,u=Math.asin(parseFloat(((t-y)/o).toFixed(9))),p=Math.asin(parseFloat(((i-y)/o).toFixed(9))),e<m&&(u=Math.PI-u),r<m&&(p=Math.PI-p),u<0&&(u=2*Math.PI+u),p<0&&(p=2*Math.PI+p),l&&u>p&&(u-=2*Math.PI),!l&&p>u&&(p-=2*Math.PI)}let x=p-u;if(Math.abs(x)>120*Math.PI/180){const X=p,I=r,A=i;p=l&&p>u?u+120*Math.PI/180*1:u+120*Math.PI/180*-1,f=qp(r=m+s*Math.cos(p),i=y+o*Math.sin(p),I,A,s,o,a,0,l,[p,X,m,y])}x=p-u;const C=Math.cos(u),k=Math.sin(u),v=Math.cos(p),S=Math.sin(p),_=Math.tan(x/4),L=4/3*s*_,T=4/3*o*_,z=[e,t],$=[e+L*k,t-T*C],R=[r+L*S,i-T*v],U=[r,i];if($[0]=2*z[0]-$[0],$[1]=2*z[1]-$[1],c)return[$,R,U].concat(f);{f=[$,R,U].concat(f);const X=[];for(let I=0;I<f.length;I+=3){const A=Ri(f[I][0],f[I][1],h),M=Ri(f[I+1][0],f[I+1][1],h),D=Ri(f[I+2][0],f[I+2][1],h);X.push([A[0],A[1],M[0],M[1],D[0],D[1]])}return X}}const zT={randOffset:function(e,t){return ct(e,t)},randOffsetWithRange:function(e,t,r){return Eo(e,t,r)},ellipse:function(e,t,r,i,s){const o=Wp(r,i,s);return Mn(e,t,s,o).opset},doubleLineOps:function(e,t,r,i,s){return lr(e,t,r,i,s,!0)}};function zp(e,t,r,i,s){return{type:"path",ops:lr(e,t,r,i,s)}}function Ks(e,t,r){const i=(e||[]).length;if(i>2){const s=[];for(let o=0;o<i-1;o++)s.push(...lr(e[o][0],e[o][1],e[o+1][0],e[o+1][1],r));return t&&s.push(...lr(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:s}}return i===2?zp(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function WT(e,t,r,i,s){return(function(o,a){return Ks(o,!0,a)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],s)}function kc(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=Ds(r[0],1*(1+.2*t.roughness),t),s=t.disableMultiStroke?[]:Ds(r[0],1.5*(1+.22*t.roughness),vc(t));for(let o=1;o<r.length;o++){const a=r[o];if(a.length){const n=Ds(a,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:Ds(a,1.5*(1+.22*t.roughness),vc(t));for(const c of n)c.op!=="move"&&i.push(c);for(const c of l)c.op!=="move"&&s.push(c)}}return{type:"path",ops:i.concat(s)}}return{type:"path",ops:[]}}function Wp(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),s=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),o=2*Math.PI/s;let a=Math.abs(e/2),n=Math.abs(t/2);const l=1-r.curveFitting;return a+=ct(a*l,r),n+=ct(n*l,r),{increment:o,rx:a,ry:n}}function Mn(e,t,r,i){const[s,o]=Tc(i.increment,e,t,i.rx,i.ry,1,i.increment*Eo(.1,Eo(.4,1,r),r),r);let a=Mo(s,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[n]=Tc(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=Mo(n,null,r);a=a.concat(l)}return{estimatedPoints:o,opset:{type:"path",ops:a}}}function wc(e,t,r,i,s,o,a,n,l){const c=e,h=t;let d=Math.abs(r/2),f=Math.abs(i/2);d+=ct(.01*d,l),f+=ct(.01*f,l);let u=s,p=o;for(;u<0;)u+=2*Math.PI,p+=2*Math.PI;p-u>2*Math.PI&&(u=0,p=2*Math.PI);const m=2*Math.PI/l.curveStepCount,y=Math.min(m/2,(p-u)/2),x=_c(y,c,h,d,f,u,p,1,l);if(!l.disableMultiStroke){const C=_c(y,c,h,d,f,u,p,1.5,l);x.push(...C)}return a&&(n?x.push(...lr(c,h,c+d*Math.cos(u),h+f*Math.sin(u),l),...lr(c,h,c+d*Math.cos(p),h+f*Math.sin(p),l)):x.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+d*Math.cos(u),h+f*Math.sin(u)]})),{type:"path",ops:x}}function Sc(e,t){const r=Np(Dp(th(e))),i=[];let s=[0,0],o=[0,0];for(const{key:a,data:n}of r)switch(a){case"M":o=[n[0],n[1]],s=[n[0],n[1]];break;case"L":i.push(...lr(o[0],o[1],n[0],n[1],t)),o=[n[0],n[1]];break;case"C":{const[l,c,h,d,f,u]=n;i.push(...jT(l,c,h,d,f,u,o,t)),o=[f,u];break}case"Z":i.push(...lr(o[0],o[1],s[0],s[1],t)),o=[s[0],s[1]]}return{type:"path",ops:i}}function Fa(e,t){const r=[];for(const i of e)if(i.length){const s=t.maxRandomnessOffset||0,o=i.length;if(o>2){r.push({op:"move",data:[i[0][0]+ct(s,t),i[0][1]+ct(s,t)]});for(let a=1;a<o;a++)r.push({op:"lineTo",data:[i[a][0]+ct(s,t),i[a][1]+ct(s,t)]})}}return{type:"fillPath",ops:r}}function Pr(e,t){return(function(r,i){let s=r.fillStyle||"hachure";if(!ae[s])switch(s){case"zigzag":ae[s]||(ae[s]=new OT(i));break;case"cross-hatch":ae[s]||(ae[s]=new IT(i));break;case"dots":ae[s]||(ae[s]=new RT(i));break;case"dashed":ae[s]||(ae[s]=new PT(i));break;case"zigzag-line":ae[s]||(ae[s]=new DT(i));break;default:s="hachure",ae[s]||(ae[s]=new Jl(i))}return ae[s]})(t,zT).fillPolygons(e,t)}function vc(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function jp(e){return e.randomizer||(e.randomizer=new NT(e.seed||0)),e.randomizer.next()}function Eo(e,t,r,i=1){return r.roughness*i*(jp(r)*(t-e)+e)}function ct(e,t,r=1){return Eo(-e,e,t,r)}function lr(e,t,r,i,s,o=!1){const a=o?s.disableMultiStrokeFill:s.disableMultiStroke,n=An(e,t,r,i,s,!0,!1);if(a)return n;const l=An(e,t,r,i,s,!0,!0);return n.concat(l)}function An(e,t,r,i,s,o,a){const n=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(n);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let h=s.maxRandomnessOffset||0;h*h*100>n&&(h=l/10);const d=h/2,f=.2+.2*jp(s);let u=s.bowing*s.maxRandomnessOffset*(i-t)/200,p=s.bowing*s.maxRandomnessOffset*(e-r)/200;u=ct(u,s,c),p=ct(p,s,c);const m=[],y=()=>ct(d,s,c),x=()=>ct(h,s,c),C=s.preserveVertices;return a?m.push({op:"move",data:[e+(C?0:y()),t+(C?0:y())]}):m.push({op:"move",data:[e+(C?0:ct(h,s,c)),t+(C?0:ct(h,s,c))]}),a?m.push({op:"bcurveTo",data:[u+e+(r-e)*f+y(),p+t+(i-t)*f+y(),u+e+2*(r-e)*f+y(),p+t+2*(i-t)*f+y(),r+(C?0:y()),i+(C?0:y())]}):m.push({op:"bcurveTo",data:[u+e+(r-e)*f+x(),p+t+(i-t)*f+x(),u+e+2*(r-e)*f+x(),p+t+2*(i-t)*f+x(),r+(C?0:x()),i+(C?0:x())]}),m}function Ds(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+ct(t,r),e[0][1]+ct(t,r)]),i.push([e[0][0]+ct(t,r),e[0][1]+ct(t,r)]);for(let s=1;s<e.length;s++)i.push([e[s][0]+ct(t,r),e[s][1]+ct(t,r)]),s===e.length-1&&i.push([e[s][0]+ct(t,r),e[s][1]+ct(t,r)]);return Mo(i,null,r)}function Mo(e,t,r){const i=e.length,s=[];if(i>3){const o=[],a=1-r.curveTightness;s.push({op:"move",data:[e[1][0],e[1][1]]});for(let n=1;n+2<i;n++){const l=e[n];o[0]=[l[0],l[1]],o[1]=[l[0]+(a*e[n+1][0]-a*e[n-1][0])/6,l[1]+(a*e[n+1][1]-a*e[n-1][1])/6],o[2]=[e[n+1][0]+(a*e[n][0]-a*e[n+2][0])/6,e[n+1][1]+(a*e[n][1]-a*e[n+2][1])/6],o[3]=[e[n+1][0],e[n+1][1]],s.push({op:"bcurveTo",data:[o[1][0],o[1][1],o[2][0],o[2][1],o[3][0],o[3][1]]})}}else i===3?(s.push({op:"move",data:[e[1][0],e[1][1]]}),s.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&s.push(...An(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return s}function Tc(e,t,r,i,s,o,a,n){const l=[],c=[];if(n.roughness===0){e/=4,c.push([t+i*Math.cos(-e),r+s*Math.sin(-e)]);for(let h=0;h<=2*Math.PI;h+=e){const d=[t+i*Math.cos(h),r+s*Math.sin(h)];l.push(d),c.push(d)}c.push([t+i*Math.cos(0),r+s*Math.sin(0)]),c.push([t+i*Math.cos(e),r+s*Math.sin(e)])}else{const h=ct(.5,n)-Math.PI/2;c.push([ct(o,n)+t+.9*i*Math.cos(h-e),ct(o,n)+r+.9*s*Math.sin(h-e)]);const d=2*Math.PI+h-.01;for(let f=h;f<d;f+=e){const u=[ct(o,n)+t+i*Math.cos(f),ct(o,n)+r+s*Math.sin(f)];l.push(u),c.push(u)}c.push([ct(o,n)+t+i*Math.cos(h+2*Math.PI+.5*a),ct(o,n)+r+s*Math.sin(h+2*Math.PI+.5*a)]),c.push([ct(o,n)+t+.98*i*Math.cos(h+a),ct(o,n)+r+.98*s*Math.sin(h+a)]),c.push([ct(o,n)+t+.9*i*Math.cos(h+.5*a),ct(o,n)+r+.9*s*Math.sin(h+.5*a)])}return[c,l]}function _c(e,t,r,i,s,o,a,n,l){const c=o+ct(.1,l),h=[];h.push([ct(n,l)+t+.9*i*Math.cos(c-e),ct(n,l)+r+.9*s*Math.sin(c-e)]);for(let d=c;d<=a;d+=e)h.push([ct(n,l)+t+i*Math.cos(d),ct(n,l)+r+s*Math.sin(d)]);return h.push([t+i*Math.cos(a),r+s*Math.sin(a)]),h.push([t+i*Math.cos(a),r+s*Math.sin(a)]),Mo(h,null,l)}function jT(e,t,r,i,s,o,a,n){const l=[],c=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+.3];let h=[0,0];const d=n.disableMultiStroke?1:2,f=n.preserveVertices;for(let u=0;u<d;u++)u===0?l.push({op:"move",data:[a[0],a[1]]}):l.push({op:"move",data:[a[0]+(f?0:ct(c[0],n)),a[1]+(f?0:ct(c[0],n))]}),h=f?[s,o]:[s+ct(c[u],n),o+ct(c[u],n)],l.push({op:"bcurveTo",data:[e+ct(c[u],n),t+ct(c[u],n),r+ct(c[u],n),i+ct(c[u],n),h[0],h[1]]});return l}function Pi(e){return[...e]}function Bc(e,t=0){const r=e.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(r===3)i.push(Pi(e[0]),Pi(e[1]),Pi(e[2]),Pi(e[2]));else{const s=[];s.push(e[0],e[0]);for(let n=1;n<e.length;n++)s.push(e[n]),n===e.length-1&&s.push(e[n]);const o=[],a=1-t;i.push(Pi(s[0]));for(let n=1;n+2<s.length;n++){const l=s[n];o[0]=[l[0],l[1]],o[1]=[l[0]+(a*s[n+1][0]-a*s[n-1][0])/6,l[1]+(a*s[n+1][1]-a*s[n-1][1])/6],o[2]=[s[n+1][0]+(a*s[n][0]-a*s[n+2][0])/6,s[n+1][1]+(a*s[n][1]-a*s[n+2][1])/6],o[3]=[s[n+1][0],s[n+1][1]],i.push(o[1],o[2],o[3])}}return i}function Qs(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function HT(e,t,r){const i=Qs(t,r);if(i===0)return Qs(e,t);let s=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return s=Math.max(0,Math.min(1,s)),Qs(e,xr(t,r,s))}function xr(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function $n(e,t,r,i){const s=i||[];if((function(n,l){const c=n[l+0],h=n[l+1],d=n[l+2],f=n[l+3];let u=3*h[0]-2*c[0]-f[0];u*=u;let p=3*h[1]-2*c[1]-f[1];p*=p;let m=3*d[0]-2*f[0]-c[0];m*=m;let y=3*d[1]-2*f[1]-c[1];return y*=y,u<m&&(u=m),p<y&&(p=y),u+p})(e,t)<r){const n=e[t+0];s.length?(o=s[s.length-1],a=n,Math.sqrt(Qs(o,a))>1&&s.push(n)):s.push(n),s.push(e[t+3])}else{const l=e[t+0],c=e[t+1],h=e[t+2],d=e[t+3],f=xr(l,c,.5),u=xr(c,h,.5),p=xr(h,d,.5),m=xr(f,u,.5),y=xr(u,p,.5),x=xr(m,y,.5);$n([l,f,m,x],0,r,s),$n([x,y,p,d],0,r,s)}var o,a;return s}function YT(e,t){return Ao(e,0,e.length,t)}function Ao(e,t,r,i,s){const o=s||[],a=e[t],n=e[r-1];let l=0,c=1;for(let h=t+1;h<r-1;++h){const d=HT(e[h],a,n);d>l&&(l=d,c=h)}return Math.sqrt(l)>i?(Ao(e,t,c+1,i,o),Ao(e,c,r,i,o)):(o.length||o.push(a),o.push(n)),o}function Ea(e,t=.15,r){const i=[],s=(e.length-1)/3;for(let o=0;o<s;o++)$n(e,3*o,t,i);return r&&r>0?Ao(i,0,i.length,r):i}const he="none";class $o{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,s,o){const a=this._o(o);return this._d("line",[zp(t,r,i,s,a)],a)}rectangle(t,r,i,s,o){const a=this._o(o),n=[],l=WT(t,r,i,s,a);if(a.fill){const c=[[t,r],[t+i,r],[t+i,r+s],[t,r+s]];a.fillStyle==="solid"?n.push(Fa([c],a)):n.push(Pr([c],a))}return a.stroke!==he&&n.push(l),this._d("rectangle",n,a)}ellipse(t,r,i,s,o){const a=this._o(o),n=[],l=Wp(i,s,a),c=Mn(t,r,a,l);if(a.fill)if(a.fillStyle==="solid"){const h=Mn(t,r,a,l).opset;h.type="fillPath",n.push(h)}else n.push(Pr([c.estimatedPoints],a));return a.stroke!==he&&n.push(c.opset),this._d("ellipse",n,a)}circle(t,r,i,s){const o=this.ellipse(t,r,i,i,s);return o.shape="circle",o}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[Ks(t,!1,i)],i)}arc(t,r,i,s,o,a,n=!1,l){const c=this._o(l),h=[],d=wc(t,r,i,s,o,a,n,!0,c);if(n&&c.fill)if(c.fillStyle==="solid"){const f=Object.assign({},c);f.disableMultiStroke=!0;const u=wc(t,r,i,s,o,a,!0,!1,f);u.type="fillPath",h.push(u)}else h.push((function(f,u,p,m,y,x,C){const k=f,v=u;let S=Math.abs(p/2),_=Math.abs(m/2);S+=ct(.01*S,C),_+=ct(.01*_,C);let L=y,T=x;for(;L<0;)L+=2*Math.PI,T+=2*Math.PI;T-L>2*Math.PI&&(L=0,T=2*Math.PI);const z=(T-L)/C.curveStepCount,$=[];for(let R=L;R<=T;R+=z)$.push([k+S*Math.cos(R),v+_*Math.sin(R)]);return $.push([k+S*Math.cos(T),v+_*Math.sin(T)]),$.push([k,v]),Pr([$],C)})(t,r,i,s,o,a,c));return c.stroke!==he&&h.push(d),this._d("arc",h,c)}curve(t,r){const i=this._o(r),s=[],o=kc(t,i);if(i.fill&&i.fill!==he)if(i.fillStyle==="solid"){const a=kc(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(a.ops)})}else{const a=[],n=t;if(n.length){const l=typeof n[0][0]=="number"?[n]:n;for(const c of l)c.length<3?a.push(...c):c.length===3?a.push(...Ea(Bc([c[0],c[0],c[1],c[2]]),10,(1+i.roughness)/2)):a.push(...Ea(Bc(c),10,(1+i.roughness)/2))}a.length&&s.push(Pr([a],i))}return i.stroke!==he&&s.push(o),this._d("curve",s,i)}polygon(t,r){const i=this._o(r),s=[],o=Ks(t,!0,i);return i.fill&&(i.fillStyle==="solid"?s.push(Fa([t],i)):s.push(Pr([t],i))),i.stroke!==he&&s.push(o),this._d("polygon",s,i)}path(t,r){const i=this._o(r),s=[];if(!t)return this._d("path",s,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const o=i.fill&&i.fill!=="transparent"&&i.fill!==he,a=i.stroke!==he,n=!!(i.simplification&&i.simplification<1),l=(function(h,d,f){const u=Np(Dp(th(h))),p=[];let m=[],y=[0,0],x=[];const C=()=>{x.length>=4&&m.push(...Ea(x,d)),x=[]},k=()=>{C(),m.length&&(p.push(m),m=[])};for(const{key:S,data:_}of u)switch(S){case"M":k(),y=[_[0],_[1]],m.push(y);break;case"L":C(),m.push([_[0],_[1]]);break;case"C":if(!x.length){const L=m.length?m[m.length-1]:y;x.push([L[0],L[1]])}x.push([_[0],_[1]]),x.push([_[2],_[3]]),x.push([_[4],_[5]]);break;case"Z":C(),m.push([y[0],y[1]])}if(k(),!f)return p;const v=[];for(const S of p){const _=YT(S,f);_.length&&v.push(_)}return v})(t,1,n?4-4*(i.simplification||1):(1+i.roughness)/2),c=Sc(t,i);if(o)if(i.fillStyle==="solid")if(l.length===1){const h=Sc(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else s.push(Fa(l,i));else s.push(Pr(l,i));return a&&(n?l.forEach((h=>{s.push(Ks(h,!1,i))})):s.push(c)),this._d("path",s,i)}opsToPath(t,r){let i="";for(const s of t.ops){const o=typeof r=="number"&&r>=0?s.data.map((a=>+a.toFixed(r))):s.data;switch(s.op){case"move":i+=`M${o[0]} ${o[1]} `;break;case"bcurveTo":i+=`C${o[0]} ${o[1]}, ${o[2]} ${o[3]}, ${o[4]} ${o[5]} `;break;case"lineTo":i+=`L${o[0]} ${o[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,s=[];for(const o of r){let a=null;switch(o.type){case"path":a={d:this.opsToPath(o),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:he};break;case"fillPath":a={d:this.opsToPath(o),stroke:he,strokeWidth:0,fill:i.fill||he};break;case"fillSketch":a=this.fillSketch(o,i)}a&&s.push(a)}return s}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||he,strokeWidth:i,fill:he}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class UT{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new $o(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.ctx,o=t.options.fixedDecimalPlaceDigits;for(const a of r)switch(a.type){case"path":s.save(),s.strokeStyle=i.stroke==="none"?"transparent":i.stroke,s.lineWidth=i.strokeWidth,i.strokeLineDash&&s.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(s.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(s,a,o),s.restore();break;case"fillPath":{s.save(),s.fillStyle=i.fill||"";const n=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,a,o,n),s.restore();break}case"fillSketch":this.fillSketch(s,a,i)}}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=s,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,s="nonzero"){t.beginPath();for(const o of r.ops){const a=typeof i=="number"&&i>=0?o.data.map((n=>+n.toFixed(i))):o.data;switch(o.op){case"move":t.moveTo(a[0],a[1]);break;case"bcurveTo":t.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"lineTo":t.lineTo(a[0],a[1])}}r.type==="fillPath"?t.fill(s):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,s,o){const a=this.gen.line(t,r,i,s,o);return this.draw(a),a}rectangle(t,r,i,s,o){const a=this.gen.rectangle(t,r,i,s,o);return this.draw(a),a}ellipse(t,r,i,s,o){const a=this.gen.ellipse(t,r,i,s,o);return this.draw(a),a}circle(t,r,i,s){const o=this.gen.circle(t,r,i,s);return this.draw(o),o}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,s,o,a,n=!1,l){const c=this.gen.arc(t,r,i,s,o,a,n,l);return this.draw(c),c}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i),i}path(t,r){const i=this.gen.path(t,r);return this.draw(i),i}}const Ns="http://www.w3.org/2000/svg";class XT{constructor(t,r){this.svg=t,this.gen=new $o(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,o=s.createElementNS(Ns,"g"),a=t.options.fixedDecimalPlaceDigits;for(const n of r){let l=null;switch(n.type){case"path":l=s.createElementNS(Ns,"path"),l.setAttribute("d",this.opsToPath(n,a)),l.setAttribute("stroke",i.stroke),l.setAttribute("stroke-width",i.strokeWidth+""),l.setAttribute("fill","none"),i.strokeLineDash&&l.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":l=s.createElementNS(Ns,"path"),l.setAttribute("d",this.opsToPath(n,a)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(s,n,i)}l&&o.appendChild(l)}return o}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2);const o=t.createElementNS(Ns,"path");return o.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),o.setAttribute("stroke",i.fill||""),o.setAttribute("stroke-width",s+""),o.setAttribute("fill","none"),i.fillLineDash&&o.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,s,o){const a=this.gen.line(t,r,i,s,o);return this.draw(a)}rectangle(t,r,i,s,o){const a=this.gen.rectangle(t,r,i,s,o);return this.draw(a)}ellipse(t,r,i,s,o){const a=this.gen.ellipse(t,r,i,s,o);return this.draw(a)}circle(t,r,i,s){const o=this.gen.circle(t,r,i,s);return this.draw(o)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,s,o,a,n=!1,l){const c=this.gen.arc(t,r,i,s,o,a,n,l);return this.draw(c)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}}var et={canvas:(e,t)=>new UT(e,t),svg:(e,t)=>new XT(e,t),generator:e=>new $o(e),newSeed:()=>$o.newSeed()},lt=g(async(e,t,r)=>{let i;const s=t.useHtmlLabels||De(xt()?.htmlLabels);r?i=r:i="node default";const o=e.insert("g").attr("class",i).attr("id",t.domId||t.id),a=o.insert("g").attr("class","label").attr("style",Ht(t.labelStyle));let n;t.label===void 0?n="":n=typeof t.label=="string"?t.label:t.label[0];const l=!!t.icon||!!t.img,c=t.labelType==="markdown",h=await Le(a,pe(nr(n),xt()),{useHtmlLabels:s,width:t.width||xt().flowchart?.wrappingWidth,classes:c?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:l,markdown:c},xt());let d=h.getBBox();const f=(t?.padding??0)/2;if(s){const u=h.children[0],p=pt(h);await Wl(u,n),d=u.getBoundingClientRect(),p.attr("width",d.width),p.attr("height",d.height)}return s?a.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):a.attr("transform","translate(0, "+-d.height/2+")"),t.centerLabel&&a.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:o,bbox:d,halfPadding:f,label:a}},"labelHelper"),Ma=g(async(e,t,r)=>{const i=r.useHtmlLabels??Qt(xt()),s=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),o=await Le(s,pe(nr(t),xt()),{useHtmlLabels:i,width:r.width||xt()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let a=o.getBBox();const n=r.padding/2;if(Qt(xt())){const l=o.children[0],c=pt(o);a=l.getBoundingClientRect(),c.attr("width",a.width),c.attr("height",a.height)}return i?s.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"):s.attr("transform","translate(0, "+-a.height/2+")"),r.centerLabel&&s.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:e,bbox:a,halfPadding:n,label:s}},"insertLabel"),st=g((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),nt=g((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function yt(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}g(yt,"createPathFromPoints");function hr(e,t,r,i,s,o){const a=[],l=r-e,c=i-t,h=l/o,d=2*Math.PI/h,f=t+c/2;for(let u=0;u<=50;u++){const p=u/50,m=e+p*l,y=f+s*Math.sin(d*(m-e));a.push({x:m,y})}return a}g(hr,"generateFullSineWavePoints");function cs(e,t,r,i,s,o){const a=[],n=s*Math.PI/180,h=(o*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const f=n+d*h,u=e+r*Math.cos(f),p=t+r*Math.sin(f);a.push({x:-u,y:-p})}return a}g(cs,"generateCirclePoints");function On(e){const t=Array.from(e.childNodes).filter(l=>l.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=t.map(l=>l.getAttribute("d")).filter(l=>l!==null).join(" ");r.setAttribute("d",i);const s=t.find(l=>l.getAttribute("fill")!=="none"),o=t.find(l=>l.getAttribute("stroke")!=="none"),a=g((l,c)=>l?.getAttribute(c)??void 0,"getAttr");if(s){const l={fill:a(s,"fill"),"fill-opacity":a(s,"fill-opacity")??"1"};Object.entries(l).forEach(([c,h])=>{h&&r.setAttribute(c,h)})}if(o){const l={stroke:a(o,"stroke"),"stroke-width":a(o,"stroke-width")??"1","stroke-opacity":a(o,"stroke-opacity")??"1"};Object.entries(l).forEach(([c,h])=>{h&&r.setAttribute(c,h)})}const n=document.createElementNS("http://www.w3.org/2000/svg","g");return n.appendChild(r),n}g(On,"mergePaths");var GT=g((e,t)=>{var r=e.x,i=e.y,s=t.x-r,o=t.y-i,a=e.width/2,n=e.height/2,l,c;return Math.abs(o)*a>Math.abs(s)*n?(o<0&&(n=-n),l=o===0?0:n*s/o,c=n):(s<0&&(a=-a),l=a,c=s===0?0:a*o/s),{x:r+l,y:i+c}},"intersectRect"),Or=GT,VT=g(async(e,t,r,i=!1,s=!1)=>{let o=t||"";typeof o=="object"&&(o=o[0]);const a=xt(),n=Qt(a);return await Le(e,o,{style:r,isTitle:i,useHtmlLabels:n,markdown:!1,isNode:s,width:Number.POSITIVE_INFINITY},a)},"createLabel"),er=VT,cr=g((e,t,r,i,s)=>["M",e+s,t,"H",e+r-s,"A",s,s,0,0,1,e+r,t+s,"V",t+i-s,"A",s,s,0,0,1,e+r-s,t+i,"H",e+s,"A",s,s,0,0,1,e,t+i-s,"V",t+s,"A",s,s,0,0,1,e+s,t,"Z"].join(" "),"createRoundedRectPathD"),ZT=g(async(e,t)=>{const r=xt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:o,clusterBorder:a}=i,n=a,{labelStyles:l,nodeStyles:c,borderStyles:h,backgroundStyles:d}=it(t),f=e.insert("g").attr("class","cluster swimlane "+(t.cssClasses||"")).attr("id",t.id).attr("data-id",t.id).attr("data-et","cluster").attr("data-look",t.look),u=De(r.flowchart.htmlLabels),p=t.direction==="LR",m=f.insert("g").attr("class","cluster-label swimlane-label"),y=await Le(m,t.label,{style:t.labelStyle,useHtmlLabels:u,isNode:!0,width:t.width});let x=y.getBBox();if(u){const X=y.children[0],I=pt(y);x=X.getBoundingClientRect(),I.attr("width",x.width),I.attr("height",x.height)}const C=t.padding??0,k=t.width<=x.width+C?x.width+C:t.width;t.width<=x.width+C?t.diff=(k-t.width)/2-C:t.diff=-C;const v=t.height,S=t.y-v/2,_=t.y+v/2,L=t.x-k/2,T=t.swimlaneContentTop!==void 0?t.swimlaneContentTop:S+v/3,z=p?4:0,$=x.height+2*z;let R,U;if(p){const X=Math.max($,x.height+2*z),I=L+X,A=Math.max(0,k-X);if(t.look==="handDrawn"){const O=et.svg(f),E=tt(t,{roughness:.7,fill:o,stroke:n,fillWeight:3,seed:s}),P=tt(t,{roughness:.7,fill:"none",stroke:n,seed:s}),B=O.rectangle(L,S,X,v,E);R=f.insert(()=>B,":first-child");const j=O.rectangle(I,S,A,v,P);U=f.insert(()=>j,":first-child"),R.select("path:nth-child(2)").attr("style",h.join(";")),R.select("path").attr("style",d.join(";").replace("fill","stroke"))}else R=f.insert("rect",":first-child"),U=f.insert("rect",":first-child"),R.attr("class","swimlane-title").attr("style",c).attr("x",L).attr("y",S).attr("width",X).attr("height",v).attr("fill",o).attr("stroke",n),U.attr("class","swimlane-body").attr("style",c).attr("x",I).attr("y",S).attr("width",A).attr("height",v).attr("fill","none").attr("stroke",n);const M=L+X/2,D=t.y;m.attr("transform",`translate(${M}, ${D}) rotate(-90) translate(${-x.width/2}, ${-x.height/2})`)}else{const X=Math.max(0,T-S),I=Math.min($,X),A=S+I,M=Math.max(0,_-A),D=t.x-k/2;if(t.look==="handDrawn"){const P=et.svg(f),B=tt(t,{roughness:.7,fill:o,stroke:n,fillWeight:3,seed:s}),j=tt(t,{roughness:.7,fill:"none",stroke:n,seed:s}),W=P.rectangle(D,S,k,I,B);R=f.insert(()=>W,":first-child");const K=P.rectangle(D,A,k,M,j);U=f.insert(()=>K,":first-child"),R.select("path:nth-child(2)").attr("style",h.join(";")),R.select("path").attr("style",d.join(";").replace("fill","stroke"))}else R=f.insert("rect",":first-child"),U=f.insert("rect",":first-child"),R.attr("class","swimlane-title").attr("style",c).attr("x",D).attr("y",S).attr("width",k).attr("height",I).attr("fill",o).attr("stroke",n),U.attr("class","swimlane-body").attr("style",c).attr("x",D).attr("y",A).attr("width",k).attr("height",M).attr("fill","none").attr("stroke",n);const O=t.x-x.width/2,E=S+(I-x.height)/2;m.attr("transform",`translate(${O}, ${E})`)}if(G.trace("Swimlane data ",t,JSON.stringify(t)),l){const X=m.select("span");X&&X.attr("style",l)}return t.offsetX=0,t.width=k,t.height=v,t.offsetY=x.height-C/2,t.intersect=function(X){return Or(t,X)},{cluster:f,labelBBox:x}},"swimlane"),Hp=g(async(e,t)=>{G.info("Creating subgraph rect for ",t.id,t);const r=xt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:o,clusterBorder:a}=i,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=it(t),d=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),f=Qt(r),u=d.insert("g").attr("class","cluster-label ");let p;t.labelType==="markdown"?p=await Le(u,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width}):p=await er(u,t.label,t.labelStyle||"",!1,!0);let m=p.getBBox();if(Qt(r)){const L=p.children[0],T=pt(p);m=L.getBoundingClientRect(),T.attr("width",m.width),T.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,C=t.x-y/2,k=t.y-x/2;G.trace("Data ",t,JSON.stringify(t));let v;if(t.look==="handDrawn"){const L=et.svg(d),T=tt(t,{roughness:.7,fill:o,stroke:a,fillWeight:3,seed:s}),z=L.path(cr(C,k,y,x,0),T);v=d.insert(()=>(G.debug("Rough node insert CXC",z),z),":first-child"),v.select("path:nth-child(2)").attr("style",c.join(";")),v.select("path").attr("style",h.join(";").replace("fill","stroke"))}else v=d.insert("rect",":first-child"),v.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",C).attr("y",k).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:S}=Jo(r);if(u.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+S})`),n){const L=u.select("span");L&&L.attr("style",n)}const _=v.node().getBBox();return t.offsetX=0,t.width=_.width,t.height=_.height,t.offsetY=m.height-t.padding/2,t.intersect=function(L){return Or(t,L)},{cluster:d,labelBBox:m}},"rect"),KT=g((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),i=r.insert("rect",":first-child"),s=0*t.padding,o=s/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-o).attr("y",t.y-t.height/2-o).attr("width",t.width+s).attr("height",t.height+s).attr("fill","none");const a=i.node().getBBox();return t.width=a.width,t.height=a.height,t.intersect=function(n){return Or(t,n)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),QT=g(async(e,t)=>{const r=xt(),{themeVariables:i,handDrawnSeed:s}=r,{altBackground:o,compositeBackground:a,compositeTitleBackground:n,nodeBorder:l}=i,c=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),h=c.insert("g",":first-child"),d=c.insert("g").attr("class","cluster-label");let f=c.append("rect");const u=await er(d,t.label,t.labelStyle,void 0,!0);let p=u.getBBox();if(Qt(r)){const z=u.children[0],$=pt(u);p=z.getBoundingClientRect(),$.attr("width",p.width),$.attr("height",p.height)}const m=0*t.padding,y=m/2,x=(t.width<=p.width+t.padding?p.width+t.padding:t.width)+m;t.width<=p.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height+m,k=t.height+m-p.height-6,v=t.x-x/2,S=t.y-C/2;t.width=x;const _=t.y-t.height/2-y+p.height+2;let L;if(t.look==="handDrawn"){const z=t.cssClasses.includes("statediagram-cluster-alt"),$=et.svg(c),R=t.rx||t.ry?$.path(cr(v,S,x,C,10),{roughness:.7,fill:n,fillStyle:"solid",stroke:l,seed:s}):$.rectangle(v,S,x,C,{seed:s});L=c.insert(()=>R,":first-child");const U=$.rectangle(v,_,x,k,{fill:z?o:a,fillStyle:z?"hachure":"solid",stroke:l,seed:s});L=c.insert(()=>R,":first-child"),f=c.insert(()=>U)}else L=h.insert("rect",":first-child"),L.attr("class","outer").attr("x",v).attr("y",S).attr("width",x).attr("height",C).attr("data-look",t.look),f.attr("class","inner").attr("x",v).attr("y",_).attr("width",x).attr("height",k);d.attr("transform",`translate(${t.x-p.width/2}, ${S+1-(Qt(r)?0:3)})`);const T=L.node().getBBox();return t.height=T.height,t.offsetX=0,t.offsetY=p.height-t.padding/2,t.labelBBox=p,t.intersect=function(z){return Or(t,z)},{cluster:c,labelBBox:p}},"roundedWithTitle"),JT=g(async(e,t)=>{G.info("Creating subgraph rect for ",t.id,t);const r=xt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:o,clusterBorder:a}=i,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=it(t),d=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),f=Qt(r),u=d.insert("g").attr("class","cluster-label "),p=await Le(u,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width});let m=p.getBBox();if(Qt(r)){const L=p.children[0],T=pt(p);m=L.getBoundingClientRect(),T.attr("width",m.width),T.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,C=t.x-y/2,k=t.y-x/2;G.trace("Data ",t,JSON.stringify(t));let v;if(t.look==="handDrawn"){const L=et.svg(d),T=tt(t,{roughness:.7,fill:o,stroke:a,fillWeight:4,seed:s}),z=L.path(cr(C,k,y,x,t.rx),T);v=d.insert(()=>(G.debug("Rough node insert CXC",z),z),":first-child"),v.select("path:nth-child(2)").attr("style",c.join(";")),v.select("path").attr("style",h.join(";").replace("fill","stroke"))}else v=d.insert("rect",":first-child"),v.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",C).attr("y",k).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:S}=Jo(r);if(u.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+S})`),n){const L=u.select("span");L&&L.attr("style",n)}const _=v.node().getBBox();return t.offsetX=0,t.width=_.width,t.height=_.height,t.offsetY=m.height-t.padding/2,t.intersect=function(L){return Or(t,L)},{cluster:d,labelBBox:m}},"kanbanSection"),t_=g((e,t)=>{const r=xt(),{themeVariables:i,handDrawnSeed:s}=r,{nodeBorder:o}=i,a=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),n=a.insert("g",":first-child"),l=0*t.padding,c=t.width+l;t.diff=-t.padding;const h=t.height+l,d=t.x-c/2,f=t.y-h/2;t.width=c;let u;if(t.look==="handDrawn"){const y=et.svg(a).rectangle(d,f,c,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:o,seed:s});u=a.insert(()=>y,":first-child")}else{u=n.insert("rect",":first-child");let m="outer";t.look,m="divider",u.attr("class",m).attr("x",d).attr("y",f).attr("width",c).attr("height",h).attr("data-look",t.look)}const p=u.node().getBBox();return t.height=p.height,t.offsetX=0,t.offsetY=0,t.intersect=function(m){return Or(t,m)},{cluster:a,labelBBox:{}}},"divider"),e_=Hp,r_={rect:Hp,squareRect:e_,roundedWithTitle:QT,noteGroup:KT,divider:t_,kanbanSection:JT,swimlane:ZT},Yp=new Map,Up=g(async(e,t)=>{const r=t.shape||"rect",i=await r_[r](e,t);return Yp.set(t.id,i),i},"insertCluster"),i_=g(()=>{Yp=new Map},"clear");function Xp(e,t){return e.intersect(t)}g(Xp,"intersectNode");var s_=Xp;function Gp(e,t,r,i){var s=e.x,o=e.y,a=s-i.x,n=o-i.y,l=Math.sqrt(t*t*n*n+r*r*a*a),c=Math.abs(t*r*a/l);i.x<s&&(c=-c);var h=Math.abs(t*r*n/l);return i.y<o&&(h=-h),{x:s+c,y:o+h}}g(Gp,"intersectEllipse");var Vp=Gp;function Zp(e,t,r){return Vp(e,t,t,r)}g(Zp,"intersectCircle");var o_=Zp;function Kp(e,t,r,i){{const s=t.y-e.y,o=e.x-t.x,a=t.x*e.y-e.x*t.y,n=s*r.x+o*r.y+a,l=s*i.x+o*i.y+a,c=1e-6;if(n!==0&&l!==0&&In(n,l))return;const h=i.y-r.y,d=r.x-i.x,f=i.x*r.y-r.x*i.y,u=h*e.x+d*e.y+f,p=h*t.x+d*t.y+f;if(Math.abs(u)<c&&Math.abs(p)<c&&In(u,p))return;const m=s*d-h*o;if(m===0)return;const y=Math.abs(m/2);let x=o*f-d*a;const C=x<0?(x-y)/m:(x+y)/m;x=h*a-s*f;const k=x<0?(x-y)/m:(x+y)/m;return{x:C,y:k}}}g(Kp,"intersectLine");function In(e,t){return e*t>0}g(In,"sameSign");var a_=Kp;function Qp(e,t,r){let i=e.x,s=e.y,o=[],a=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){a=Math.min(a,h.x),n=Math.min(n,h.y)}):(a=Math.min(a,t.x),n=Math.min(n,t.y));let l=i-e.width/2-a,c=s-e.height/2-n;for(let h=0;h<t.length;h++){let d=t[h],f=t[h<t.length-1?h+1:0],u=a_(e,r,{x:l+d.x,y:c+d.y},{x:l+f.x,y:c+f.y});u&&o.push(u)}return o.length?(o.length>1&&o.sort(function(h,d){let f=h.x-r.x,u=h.y-r.y,p=Math.sqrt(f*f+u*u),m=d.x-r.x,y=d.y-r.y,x=Math.sqrt(m*m+y*y);return p<x?-1:p===x?0:1}),o[0]):e}g(Qp,"intersectPolygon");var n_=Qp,J={node:s_,circle:o_,ellipse:Vp,polygon:n_,rect:Or};function Jp(e,t){const{labelStyles:r}=it(t);t.labelStyle=r;const i=nt(t);let s=i;i||(s="anchor");const o=e.insert("g").attr("class",s).attr("id",t.domId||t.id),a=1,{cssStyles:n}=t,l=et.svg(o),c=tt(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const h=l.circle(0,0,a*2,c),d=o.insert(()=>h,":first-child");return d.attr("class","anchor").attr("style",Ht(n)),st(t,d),t.intersect=function(f){return G.info("Circle intersect",t,a,f),J.circle(t,a,f)},o}g(Jp,"anchor");function Rn(e,t,r,i,s,o,a){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),d=(r-e)/2,f=(i-t)/2,u=d/s,p=f/o,m=Math.sqrt(u**2+p**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-m**2),x=l+y*o*Math.sin(h)*(a?-1:1),C=c-y*s*Math.cos(h)*(a?-1:1),k=Math.atan2((t-C)/o,(e-x)/s);let S=Math.atan2((i-C)/o,(r-x)/s)-k;a&&S<0&&(S+=2*Math.PI),!a&&S>0&&(S-=2*Math.PI);const _=[];for(let L=0;L<20;L++){const T=L/19,z=k+T*S,$=x+s*Math.cos(z),R=C+o*Math.sin(z);_.push({x:$,y:R})}return _}g(Rn,"generateArcPoints");function tm(e,t,r){const[i,s]=[t,r].sort((o,a)=>a-o);return s*(1-Math.sqrt(1-(e/i/2)**2))}g(tm,"calculateArcSagitta");async function em(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s,n=g(z=>z+a,"calcTotalHeight"),l=g(z=>{const $=z/2;return[$/(2.5+z/50),$]},"calcEllipseRadius"),{shapeSvg:c,bbox:h}=await lt(e,t,nt(t)),d=n(t?.height?t?.height:h.height),[f,u]=l(d),p=tm(d,f,u),y=(t?.width?t?.width:h.width)+o*2+p-p,x=d,{cssStyles:C}=t,k=[{x:y/2,y:-x/2},{x:-y/2,y:-x/2},...Rn(-y/2,-x/2,-y/2,x/2,f,u,!1),{x:y/2,y:x/2},...Rn(y/2,x/2,y/2,-x/2,f,u,!0)],v=et.svg(c),S=tt(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const _=yt(k),L=v.path(_,S),T=c.insert(()=>L,":first-child");return T.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),T.attr("transform",`translate(${f/2}, 0)`),st(t,T),t.intersect=function(z){return J.polygon(t,k,z)},c}g(em,"bowTieRect");function Qe(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}g(Qe,"insertPolygonShape");var qs=12;async function rm(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?28:s,a=t.look==="neo"?24:s,{shapeSvg:n,bbox:l}=await lt(e,t,nt(t)),c=(t?.width??l.width)+(t.look==="neo"?o*2:o+qs),h=(t?.height??l.height)+(t.look==="neo"?a*2:a),d=0,f=c,u=-h,p=0,m=[{x:d+qs,y:u},{x:f,y:u},{x:f,y:p},{x:d,y:p},{x:d,y:u+qs},{x:d+qs,y:u}];let y;const{cssStyles:x}=t;if(t.look==="handDrawn"){const C=et.svg(n),k=tt(t,{}),v=yt(m),S=C.path(v,k);y=n.insert(()=>S,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),x&&y.attr("style",x)}else y=Qe(n,c,h,m);return i&&y.attr("style",i),st(t,y),t.intersect=function(C){return J.polygon(t,m,C)},n}g(rm,"card");function im(e,t){const{nodeStyles:r}=it(t);t.label="";const i=e.insert("g").attr("class",nt(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,o=Math.max(28,t.width??0),a=[{x:0,y:o/2},{x:o/2,y:0},{x:0,y:-o/2},{x:-o/2,y:0}],n=et.svg(i),l=tt(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=yt(a),h=n.path(c,l),d=i.insert(()=>h,":first-child");return s&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",s),r&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(f){return J.polygon(t,a,f)},i}g(im,"choice");async function eh(e,t,r){const{labelStyles:i,nodeStyles:s}=it(t);t.labelStyle=i;const{shapeSvg:o,bbox:a,halfPadding:n}=await lt(e,t,nt(t)),l=16,c=r?.padding??n,h=t.look==="neo"?a.width/2+l*2:a.width/2+c;let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const u=et.svg(o),p=tt(t,{}),m=u.circle(0,0,h*2,p);d=o.insert(()=>m,":first-child"),d.attr("class","basic label-container").attr("style",Ht(f))}else d=o.insert("circle",":first-child").attr("class","basic label-container").attr("style",s).attr("r",h).attr("cx",0).attr("cy",0);return st(t,d),t.calcIntersect=function(u,p){const m=u.width/2;return J.circle(u,m,p)},t.intersect=function(u){return G.info("Circle intersect",t,h,u),J.circle(t,h,u)},o}g(eh,"circle");function sm(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,s={x:i/2*t,y:i/2*r},o={x:-(i/2)*t,y:i/2*r},a={x:-(i/2)*t,y:-(i/2)*r},n={x:i/2*t,y:-(i/2)*r};return`M ${o.x},${o.y} L ${n.x},${n.y}
233
+ M ${s.x},${s.y} L ${a.x},${a.y}`}g(sm,"createLine");function om(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r,t.label="";const s=e.insert("g").attr("class",nt(t)).attr("id",t.domId??t.id),o=Math.max(30,t?.width??0),{cssStyles:a}=t,n=et.svg(s),l=tt(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=n.circle(0,0,o*2,l),h=sm(o),d=n.path(h,l),f=s.insert(()=>c,":first-child");return f.insert(()=>d),f.attr("class","outer-path"),a&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",i),st(t,f),t.intersect=function(u){return G.info("crossedCircle intersect",t,{radius:o,point:u}),J.circle(t,o,u)},s}g(om,"crossedCircle");function He(e,t,r,i=100,s=0,o=180){const a=[],n=s*Math.PI/180,h=(o*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const f=n+d*h,u=e+r*Math.cos(f),p=t+r*Math.sin(f);a.push({x:-u,y:-p})}return a}g(He,"generateCirclePoints");async function am(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await lt(e,t,nt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=o.width+n,h=o.height+l,d=Math.max(5,h*.1),{cssStyles:f}=t,u=[...He(c/2,-h/2,d,30,-90,0),{x:-c/2-d,y:d},...He(c/2+d*2,-d,d,20,-180,-270),...He(c/2+d*2,d,d,20,-90,-180),{x:-c/2-d,y:-h/2},...He(c/2,h/2,d,20,0,90)],p=[{x:c/2,y:-h/2-d},{x:-c/2,y:-h/2-d},...He(c/2,-h/2,d,20,-90,0),{x:-c/2-d,y:-d},...He(c/2+c*.1,-d,d,20,-180,-270),...He(c/2+c*.1,d,d,20,-90,-180),{x:-c/2-d,y:h/2},...He(c/2,h/2,d,20,0,90),{x:-c/2,y:h/2+d},{x:c/2,y:h/2+d}],m=et.svg(s),y=tt(t,{fill:"none"});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=yt(u).replace("Z",""),k=m.path(C,y),v=yt(p),S=m.path(v,{...y}),_=s.insert("g",":first-child");return _.insert(()=>S,":first-child").attr("stroke-opacity",0),_.insert(()=>k,":first-child"),_.attr("class","text"),f&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),_.attr("transform",`translate(${d}, 0)`),a.attr("transform",`translate(${-c/2+d-(o.x-(o.left??0))},${-h/2+(t.padding??0)/2-(o.y-(o.top??0))})`),st(t,_),t.intersect=function(L){return J.polygon(t,p,L)},s}g(am,"curlyBraceLeft");function Ye(e,t,r,i=100,s=0,o=180){const a=[],n=s*Math.PI/180,h=(o*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const f=n+d*h,u=e+r*Math.cos(f),p=t+r*Math.sin(f);a.push({x:u,y:p})}return a}g(Ye,"generateCirclePoints");async function nm(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await lt(e,t,nt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=o.width+(t.look==="neo"?n*2:n),h=o.height+(t.look==="neo"?l*2:l),d=Math.max(5,h*.1),{cssStyles:f}=t,u=[...Ye(c/2,-h/2,d,20,-90,0),{x:c/2+d,y:-d},...Ye(c/2+d*2,-d,d,20,-180,-270),...Ye(c/2+d*2,d,d,20,-90,-180),{x:c/2+d,y:h/2},...Ye(c/2,h/2,d,20,0,90)],p=[{x:-c/2,y:-h/2-d},{x:c/2,y:-h/2-d},...Ye(c/2,-h/2,d,20,-90,0),{x:c/2+d,y:-d},...Ye(c/2+d*2,-d,d,20,-180,-270),...Ye(c/2+d*2,d,d,20,-90,-180),{x:c/2+d,y:h/2},...Ye(c/2,h/2,d,20,0,90),{x:c/2,y:h/2+d},{x:-c/2,y:h/2+d}],m=et.svg(s),y=tt(t,{fill:"none"});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const C=yt(u).replace("Z",""),k=m.path(C,y),v=yt(p),S=m.path(v,{...y}),_=s.insert("g",":first-child");return _.insert(()=>S,":first-child").attr("stroke-opacity",0),_.insert(()=>k,":first-child"),_.attr("class","text"),f&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),_.attr("transform",`translate(${-d}, 0)`),a.attr("transform",`translate(${-c/2+(t.padding??0)/2-(o.x-(o.left??0))},${-h/2+(t.padding??0)/2-(o.y-(o.top??0))})`),st(t,_),t.intersect=function(L){return J.polygon(t,p,L)},s}g(nm,"curlyBraceRight");function Xt(e,t,r,i=100,s=0,o=180){const a=[],n=s*Math.PI/180,h=(o*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const f=n+d*h,u=e+r*Math.cos(f),p=t+r*Math.sin(f);a.push({x:-u,y:-p})}return a}g(Xt,"generateCirclePoints");async function lm(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await lt(e,t,nt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=o.width+(t.look==="neo"?n*2:n),h=o.height+(t.look==="neo"?l*2:l),d=Math.max(5,h*.1),{cssStyles:f}=t,u=[...Xt(c/2,-h/2,d,30,-90,0),{x:-c/2-d,y:d},...Xt(c/2+d*2,-d,d,20,-180,-270),...Xt(c/2+d*2,d,d,20,-90,-180),{x:-c/2-d,y:-h/2},...Xt(c/2,h/2,d,20,0,90)],p=[...Xt(-c/2+d+d/2,-h/2,d,20,-90,-180),{x:c/2-d/2,y:d},...Xt(-c/2-d/2,-d,d,20,0,90),...Xt(-c/2-d/2,d,d,20,-90,0),{x:c/2-d/2,y:-d},...Xt(-c/2+d+d/2,h/2,d,30,-180,-270)],m=[{x:c/2,y:-h/2-d},{x:-c/2,y:-h/2-d},...Xt(c/2,-h/2,d,20,-90,0),{x:-c/2-d,y:-d},...Xt(c/2+d*2,-d,d,20,-180,-270),...Xt(c/2+d*2,d,d,20,-90,-180),{x:-c/2-d,y:h/2},...Xt(c/2,h/2,d,20,0,90),{x:-c/2,y:h/2+d},{x:c/2-d-d/2,y:h/2+d},...Xt(-c/2+d+d/2,-h/2,d,20,-90,-180),{x:c/2-d/2,y:d},...Xt(-c/2-d/2,-d,d,20,0,90),...Xt(-c/2-d/2,d,d,20,-90,0),{x:c/2-d/2,y:-d},...Xt(-c/2+d+d/2,h/2,d,30,-180,-270)],y=et.svg(s),x=tt(t,{fill:"none"});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const k=yt(u).replace("Z",""),v=y.path(k,x),_=yt(p).replace("Z",""),L=y.path(_,x),T=yt(m),z=y.path(T,{...x}),$=s.insert("g",":first-child");return $.insert(()=>z,":first-child").attr("stroke-opacity",0),$.insert(()=>v,":first-child"),$.insert(()=>L,":first-child"),$.attr("class","text"),f&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",i),$.attr("transform",`translate(${d-d/4}, 0)`),a.attr("transform",`translate(${-c/2+(t.padding??0)/2-(o.x-(o.left??0))},${-h/2+(t.padding??0)/2-(o.y-(o.top??0))})`),st(t,$),t.intersect=function(R){return J.polygon(t,m,R)},s}g(lm,"curlyBraces");async function hm(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s,n=20,l=5,{shapeSvg:c,bbox:h}=await lt(e,t,nt(t)),d=Math.max(n,(h.width+o*2)*1.25,t?.width??0),f=Math.max(l,h.height+a*2,t?.height??0),u=f/2,{cssStyles:p}=t,m=et.svg(c),y=tt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=d,C=f,k=x-u,v=C/4,S=[{x:k,y:0},{x:v,y:0},{x:0,y:C/2},{x:v,y:C},{x:k,y:C},...cs(-k,-C/2,u,50,270,90)],_=yt(S),L=m.path(_,y),T=c.insert(()=>L,":first-child");return T.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",p),i&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",i),T.attr("transform",`translate(${-d/2}, ${-f/2})`),st(t,T),t.intersect=function(z){return J.polygon(t,S,z)},c}g(hm,"curvedTrapezoid");var l_=g((e,t,r,i,s,o)=>[`M${e},${t+o}`,`a${s},${o} 0,0,0 ${r},0`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),h_=g((e,t,r,i,s,o)=>[`M${e},${t+o}`,`M${e+r},${t+o}`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),c_=g((e,t,r,i,s,o)=>[`M${e-r/2},${-i/2}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Lc=8,Fc=8;async function cm(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?24:s,a=t.look==="neo"?24:s;if(t.width||t.height){const y=t.width??0;t.width=(t.width??0)-a,t.width<Fc&&(t.width=Fc);const C=y/2/(2.5+y/50);t.height=(t.height??0)-o-C*3,t.height<Lc&&(t.height=Lc)}const{shapeSvg:n,bbox:l,label:c}=await lt(e,t,nt(t)),h=(t.width?t.width:l.width)+a,d=h/2,f=d/(2.5+h/50),u=(t.height?t.height:l.height)+o+f;let p;const{cssStyles:m}=t;if(t.look==="handDrawn"){const y=et.svg(n),x=h_(0,0,h,u,d,f),C=c_(0,f,h,u,d,f),k=tt(t,{}),v=y.path(x,k),S=y.path(C,tt(t,{fill:"none"}));p=n.insert(()=>S,":first-child"),p=n.insert(()=>v,":first-child"),p.attr("class","basic label-container"),m&&p.attr("style",m)}else{const y=l_(0,0,h,u,d,f);p=n.insert("path",":first-child").attr("d",y).attr("class","basic label-container outer-path").attr("style",Ht(m)).attr("style",i)}return p.attr("label-offset-y",f),p.attr("transform",`translate(${-h/2}, ${-(u/2+f)})`),st(t,p),c.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+(t.padding??0)/1.5-(l.y-(l.top??0))})`),t.intersect=function(y){const x=J.rect(t,y),C=x.x-(t.x??0);if(d!=0&&(Math.abs(C)<(t.width??0)/2||Math.abs(C)==(t.width??0)/2&&Math.abs(x.y-(t.y??0))>(t.height??0)/2-f)){let k=f*f*(1-C*C/(d*d));k>0&&(k=Math.sqrt(k)),k=f-k,y.y-(t.y??0)>0&&(k=-k),x.y+=k}return x},n}g(cm,"cylinder");async function Ti(e,t,r){const{labelStyles:i,nodeStyles:s}=it(t);t.labelStyle=i;const{shapeSvg:o,bbox:a}=await lt(e,t,nt(t)),n=Math.max(a.width+r.labelPaddingX*2,t?.width||0),l=Math.max(a.height+r.labelPaddingY*2,t?.height||0),c=-n/2,h=-l/2;let d,{rx:f,ry:u}=t;const{cssStyles:p}=t;if(r?.rx&&r.ry&&(f=r.rx,u=r.ry),t.look==="handDrawn"){const m=et.svg(o),y=tt(t,{}),x=f||u?m.path(cr(c,h,n,l,f||0),y):m.rectangle(c,h,n,l,y);d=o.insert(()=>x,":first-child"),d.attr("class","basic label-container").attr("style",Ht(p))}else d=o.insert("rect",":first-child"),d.attr("class","basic label-container").attr("style",s).attr("rx",Ht(f)).attr("ry",Ht(u)).attr("x",c).attr("y",h).attr("width",n).attr("height",l);return st(t,d),t.calcIntersect=function(m,y){return J.rect(m,y)},t.intersect=function(m){return J.rect(t,m)},o}g(Ti,"drawRect");async function dm(e,t){const{cssClasses:r,labelPaddingX:i,labelPaddingY:s,padding:o,width:a,height:n}=t,l={rx:0,ry:0,labelPaddingX:i??(o??0)*2,labelPaddingY:s??o??0},c=await Ti(e,t,l);if(t.look==="handDrawn"){const u=et.svg(c),p=tt(t,{}),m=c.select(".basic.label-container > path:nth-child(2)"),y=m.node();if(!y)return c;let x=null;if(y instanceof SVGGraphicsElement)x=y.getBBox();else return c;return c.insert(()=>u.line(x.x,x.y,x.x+x.width,x.y,p),".basic.label-container g.label"),c.insert(()=>u.line(x.x,x.y+x.height,x.x+x.width,x.y+x.height,p),".basic.label-container g.label"),m.remove(),c}const h=c.select(".basic.label-container"),d=(Number(h.attr("width"))||a)??0,f=(Number(h.attr("height"))||n)??0;return d>0&&f>0&&h.attr("stroke-dasharray",`${d} ${f}`),c}g(dm,"datastore");async function um(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?16:t.padding??0,{shapeSvg:a,bbox:n,label:l}=await lt(e,t,nt(t)),c=n.width+s,h=n.height+o,d=h*.2,f=-c/2,u=-h/2-d/2,{cssStyles:p}=t,m=et.svg(a),y=tt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:f,y:u+d},{x:-f,y:u+d},{x:-f,y:-u},{x:f,y:-u},{x:f,y:u},{x:-f,y:u},{x:-f,y:u+d}],C=m.polygon(x.map(v=>[v.x,v.y]),y),k=a.insert(()=>C,":first-child");return k.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),l.attr("transform",`translate(${f+(t.padding??0)/2-(n.x-(n.left??0))}, ${u+d+(t.padding??0)/2-(n.y-(n.top??0))})`),st(t,k),t.intersect=function(v){return J.rect(t,v)},a}g(um,"dividedRectangle");async function fm(e,t){const{labelStyles:r,nodeStyles:i}=it(t),s=t.look==="neo"?12:5;t.labelStyle=r;const o=t.padding??0,a=t.look==="neo"?16:o,{shapeSvg:n,bbox:l}=await lt(e,t,nt(t)),c=(t?.width?t?.width/2:l.width/2)+(a??0),h=c-s;let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const u=et.svg(n),p=tt(t,{roughness:.2,strokeWidth:2.5}),m=tt(t,{roughness:.2,strokeWidth:1.5}),y=u.circle(0,0,c*2,p),x=u.circle(0,0,h*2,m);d=n.insert("g",":first-child"),d.attr("class",Ht(t.cssClasses)).attr("style",Ht(f)),d.node()?.appendChild(y),d.node()?.appendChild(x)}else{d=n.insert("g",":first-child");const u=d.insert("circle",":first-child"),p=d.insert("circle");d.attr("class","basic label-container").attr("style",i),u.attr("class","outer-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0),p.attr("class","inner-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0)}return st(t,d),t.intersect=function(u){return G.info("DoubleCircle intersect",t,c,u),J.circle(t,c,u)},n}g(fm,"doublecircle");function gm(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=it(t);t.label="",t.labelStyle=i;const o=e.insert("g").attr("class",nt(t)).attr("id",t.domId??t.id),a=7,{cssStyles:n}=t,l=et.svg(o),{nodeBorder:c}=r,h=tt(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const d=l.circle(0,0,a*2,h),f=o.insert(()=>d,":first-child");return f.selectAll("path").attr("style",`fill: ${c} !important;`),n&&n.length>0&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",n),s&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",s),st(t,f),t.intersect=function(u){return G.info("filledCircle intersect",t,{radius:a,point:u}),J.circle(t,a,u)},o}g(gm,"filledCircle");var Ec=10,Mc=10;async function pm(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.height=t?.height??0,t.height<Ec&&(t.height=Ec),t.width=(t?.width??0)-o-o/2,t.width<Mc&&(t.width=Mc));const{shapeSvg:a,bbox:n,label:l}=await lt(e,t,nt(t)),c=(t?.width?t?.width:n.width)+(o??0),h=t?.height?t?.height:c+n.height,d=h,f=[{x:0,y:-h},{x:d,y:-h},{x:d/2,y:0}],{cssStyles:u}=t,p=et.svg(a),m=tt(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=yt(f),x=p.path(y,m),C=a.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${h/2})`).attr("class","outer-path");return u&&t.look!=="handDrawn"&&C.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&C.selectChildren("path").attr("style",i),t.width=c,t.height=h,st(t,C),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-h/2+(t.padding??0)/2+(n.y-(n.top??0))})`),t.intersect=function(k){return G.info("Triangle intersect",t,f,k),J.polygon(t,f,k)},a}g(pm,"flippedTriangle");function mm(e,t,{dir:r,config:{state:i,themeVariables:s}}){const{nodeStyles:o}=it(t);t.label="";const a=e.insert("g").attr("class",nt(t)).attr("id",t.domId??t.id),{cssStyles:n}=t;let l=Math.max(70,t?.width??0),c=Math.max(10,t?.height??0);r==="LR"&&(l=Math.max(10,t?.width??0),c=Math.max(70,t?.height??0));const h=-1*l/2,d=-1*c/2,f=et.svg(a),u=tt(t,{stroke:s.lineColor,fill:s.lineColor});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const p=f.rectangle(h,d,l,c,u),m=a.insert(()=>p,":first-child");n&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",n),o&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",o),st(t,m);const y=i?.padding??0;return t.width&&t.height&&(t.width+=y/2||0,t.height+=y/2||0),t.intersect=function(x){return J.rect(t,x)},a}g(mm,"forkJoin");async function ym(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const s=15,o=10,a=t.look==="neo"?16:t.padding??0,n=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=(t?.height??0)-n*2,t.height<o&&(t.height=o),t.width=(t?.width??0)-a*2,t.width<s&&(t.width=s));const{shapeSvg:l,bbox:c}=await lt(e,t,nt(t)),h=(t?.width?t?.width:Math.max(s,c.width))+a*2,d=(t?.height?t?.height:Math.max(o,c.height))+n*2,f=d/2,{cssStyles:u}=t,p=et.svg(l),m=tt(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-h/2,y:-d/2},{x:h/2-f,y:-d/2},...cs(-h/2+f,0,f,50,90,270),{x:h/2-f,y:d/2},{x:-h/2,y:d/2}],x=yt(y),C=p.path(x,m),k=l.insert(()=>C,":first-child");return k.attr("class","basic label-container outer-path"),u&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),st(t,k),t.intersect=function(v){return G.info("Pill intersect",t,{radius:f,point:v}),J.polygon(t,y,v)},l}g(ym,"halfRoundedRectangle");var d_=g((e,t,r,i,s)=>[`M${e+s},${t}`,`L${e+r-s},${t}`,`L${e+r},${t-i/2}`,`L${e+r-s},${t-i}`,`L${e+s},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");async function xm(e,t){const{labelStyles:r,nodeStyles:i}=it(t),s=t.look==="neo"?3.5:4;t.labelStyle=r;const o=t.padding??0,a=70,n=32,l=t.look==="neo"?a:o,c=t.look==="neo"?n:o;if(t.width||t.height){const k=(t.height??0)/s;t.width=(t?.width??0)-2*k-c,t.height=(t.height??0)-l}const{shapeSvg:h,bbox:d}=await lt(e,t,nt(t)),f=(t?.height?t?.height:d.height)+l,u=f/s,p=(t?.width?t?.width:d.width)+2*u+c,m=[{x:u,y:0},{x:p-u,y:0},{x:p,y:-f/2},{x:p-u,y:-f},{x:u,y:-f},{x:0,y:-f/2}];let y;const{cssStyles:x}=t;if(t.look==="handDrawn"){const C=et.svg(h),k=tt(t,{}),v=d_(0,0,p,f,u),S=C.path(v,k);y=h.insert(()=>S,":first-child").attr("transform",`translate(${-p/2}, ${f/2})`),x&&y.attr("style",x)}else y=Qe(h,p,f,m);return i&&y.attr("style",i),t.width=p,t.height=f,st(t,y),t.intersect=function(C){return J.polygon(t,m,C)},h}g(xm,"hexagon");async function Cm(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.label="",t.labelStyle=r;const{shapeSvg:s}=await lt(e,t,nt(t)),o=Math.max(30,t?.width??0),a=Math.max(30,t?.height??0),{cssStyles:n}=t,l=et.svg(s),c=tt(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=[{x:0,y:0},{x:o,y:0},{x:0,y:a},{x:o,y:a}],d=yt(h),f=l.path(d,c),u=s.insert(()=>f,":first-child");return u.attr("class","basic label-container outer-path"),n&&t.look!=="handDrawn"&&u.selectChildren("path").attr("style",n),i&&t.look!=="handDrawn"&&u.selectChildren("path").attr("style",i),u.attr("transform",`translate(${-o/2}, ${-a/2})`),st(t,u),t.intersect=function(p){return G.info("Pill intersect",t,{points:h}),J.polygon(t,h,p)},s}g(Cm,"hourglass");async function bm(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=it(t);t.labelStyle=s;const o=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(o,a),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,label:d}=await lt(e,t,"icon-shape default"),f=t.pos==="t",u=n,p=n,{nodeBorder:m}=r,{stylesMap:y}=Si(t),x=-p/2,C=-u/2,k=t.label?8:0,v=et.svg(c),S=tt(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const _=v.rectangle(x,C,p,u,S),L=Math.max(p,h.width),T=u+h.height+k,z=v.rectangle(-L/2,-T/2,L,T,{...S,fill:"transparent",stroke:"none"}),$=c.insert(()=>_,":first-child"),R=c.insert(()=>z);if(t.icon){const U=c.append("g");U.html(`<g>${await vi(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const X=U.node().getBBox(),I=X.width,A=X.height,M=X.x,D=X.y;U.attr("transform",`translate(${-I/2-M},${f?h.height/2+k/2-A/2-D:-h.height/2-k/2-A/2-D})`),U.attr("style",`color: ${y.get("stroke")??m};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-T/2:T/2-h.height})`),$.attr("transform",`translate(0,${f?h.height/2+k/2:-h.height/2-k/2})`),st(t,R),t.intersect=function(U){if(G.info("iconSquare intersect",t,U),!t.label)return J.rect(t,U);const X=t.x??0,I=t.y??0,A=t.height??0;let M=[];return f?M=[{x:X-h.width/2,y:I-A/2},{x:X+h.width/2,y:I-A/2},{x:X+h.width/2,y:I-A/2+h.height+k},{x:X+p/2,y:I-A/2+h.height+k},{x:X+p/2,y:I+A/2},{x:X-p/2,y:I+A/2},{x:X-p/2,y:I-A/2+h.height+k},{x:X-h.width/2,y:I-A/2+h.height+k}]:M=[{x:X-p/2,y:I-A/2},{x:X+p/2,y:I-A/2},{x:X+p/2,y:I-A/2+u},{x:X+h.width/2,y:I-A/2+u},{x:X+h.width/2/2,y:I+A/2},{x:X-h.width/2,y:I+A/2},{x:X-h.width/2,y:I-A/2+u},{x:X-p/2,y:I-A/2+u}],J.polygon(t,M,U)},c}g(bm,"icon");async function km(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=it(t);t.labelStyle=s;const o=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(o,a),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,label:d}=await lt(e,t,"icon-shape default"),f=20,u=t.label?8:0,p=t.pos==="t",{nodeBorder:m,mainBkg:y}=r,{stylesMap:x}=Si(t),C=et.svg(c),k=tt(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const v=x.get("fill");k.stroke=v??y;const S=c.append("g");t.icon&&S.html(`<g>${await vi(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const _=S.node().getBBox(),L=_.width,T=_.height,z=_.x,$=_.y,R=Math.max(L,T)*Math.SQRT2+f*2,U=C.circle(0,0,R,k),X=Math.max(R,h.width),I=R+h.height+u,A=C.rectangle(-X/2,-I/2,X,I,{...k,fill:"transparent",stroke:"none"}),M=c.insert(()=>U,":first-child"),D=c.insert(()=>A);return S.attr("transform",`translate(${-L/2-z},${p?h.height/2+u/2-T/2-$:-h.height/2-u/2-T/2-$})`),S.attr("style",`color: ${x.get("stroke")??m};`),d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-I/2:I/2-h.height})`),M.attr("transform",`translate(0,${p?h.height/2+u/2:-h.height/2-u/2})`),st(t,D),t.intersect=function(O){return G.info("iconSquare intersect",t,O),J.rect(t,O)},c}g(km,"iconCircle");async function wm(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=it(t);t.labelStyle=s;const o=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(o,a),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,halfPadding:d,label:f}=await lt(e,t,"icon-shape default"),u=t.pos==="t",p=n+d*2,m=n+d*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:C}=Si(t),k=-m/2,v=-p/2,S=t.label?8:0,_=et.svg(c),L=tt(t,{});t.look!=="handDrawn"&&(L.roughness=0,L.fillStyle="solid");const T=C.get("fill");L.stroke=T??x;const z=_.path(cr(k,v,m,p,5),L),$=Math.max(m,h.width),R=p+h.height+S,U=_.rectangle(-$/2,-R/2,$,R,{...L,fill:"transparent",stroke:"none"}),X=c.insert(()=>z,":first-child").attr("class","icon-shape2"),I=c.insert(()=>U);if(t.icon){const A=c.append("g");A.html(`<g>${await vi(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const M=A.node().getBBox(),D=M.width,O=M.height,E=M.x,P=M.y;A.attr("transform",`translate(${-D/2-E},${u?h.height/2+S/2-O/2-P:-h.height/2-S/2-O/2-P})`),A.attr("style",`color: ${C.get("stroke")??y};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${u?-R/2:R/2-h.height})`),X.attr("transform",`translate(0,${u?h.height/2+S/2:-h.height/2-S/2})`),st(t,I),t.intersect=function(A){if(G.info("iconSquare intersect",t,A),!t.label)return J.rect(t,A);const M=t.x??0,D=t.y??0,O=t.height??0;let E=[];return u?E=[{x:M-h.width/2,y:D-O/2},{x:M+h.width/2,y:D-O/2},{x:M+h.width/2,y:D-O/2+h.height+S},{x:M+m/2,y:D-O/2+h.height+S},{x:M+m/2,y:D+O/2},{x:M-m/2,y:D+O/2},{x:M-m/2,y:D-O/2+h.height+S},{x:M-h.width/2,y:D-O/2+h.height+S}]:E=[{x:M-m/2,y:D-O/2},{x:M+m/2,y:D-O/2},{x:M+m/2,y:D-O/2+p},{x:M+h.width/2,y:D-O/2+p},{x:M+h.width/2/2,y:D+O/2},{x:M-h.width/2,y:D+O/2},{x:M-h.width/2,y:D-O/2+p},{x:M-m/2,y:D-O/2+p}],J.polygon(t,E,A)},c}g(wm,"iconRounded");async function Sm(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=it(t);t.labelStyle=s;const o=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(o,a),l=i?.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,halfPadding:d,label:f}=await lt(e,t,"icon-shape default"),u=t.pos==="t",p=n+d*2,m=n+d*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:C}=Si(t),k=-m/2,v=-p/2,S=t.label?8:0,_=et.svg(c),L=tt(t,{});t.look!=="handDrawn"&&(L.roughness=0,L.fillStyle="solid");const T=C.get("fill");L.stroke=T??x;const z=_.path(cr(k,v,m,p,.1),L),$=Math.max(m,h.width),R=p+h.height+S,U=_.rectangle(-$/2,-R/2,$,R,{...L,fill:"transparent",stroke:"none"}),X=c.insert(()=>z,":first-child"),I=c.insert(()=>U);if(t.icon){const A=c.append("g");A.html(`<g>${await vi(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const M=A.node().getBBox(),D=M.width,O=M.height,E=M.x,P=M.y;A.attr("transform",`translate(${-D/2-E},${u?h.height/2+S/2-O/2-P:-h.height/2-S/2-O/2-P})`),A.attr("style",`color: ${C.get("stroke")??y};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${u?-R/2:R/2-h.height})`),X.attr("transform",`translate(0,${u?h.height/2+S/2:-h.height/2-S/2})`),st(t,I),t.intersect=function(A){if(G.info("iconSquare intersect",t,A),!t.label)return J.rect(t,A);const M=t.x??0,D=t.y??0,O=t.height??0;let E=[];return u?E=[{x:M-h.width/2,y:D-O/2},{x:M+h.width/2,y:D-O/2},{x:M+h.width/2,y:D-O/2+h.height+S},{x:M+m/2,y:D-O/2+h.height+S},{x:M+m/2,y:D+O/2},{x:M-m/2,y:D+O/2},{x:M-m/2,y:D-O/2+h.height+S},{x:M-h.width/2,y:D-O/2+h.height+S}]:E=[{x:M-m/2,y:D-O/2},{x:M+m/2,y:D-O/2},{x:M+m/2,y:D-O/2+p},{x:M+h.width/2,y:D-O/2+p},{x:M+h.width/2/2,y:D+O/2},{x:M-h.width/2,y:D+O/2},{x:M-h.width/2,y:D-O/2+p},{x:M-m/2,y:D-O/2+p}],J.polygon(t,E,A)},c}g(Sm,"iconSquare");async function vm(e,t,{config:{flowchart:r}}){const i=new Image;i.src=t?.img??"",await i.decode();const s=Number(i.naturalWidth.toString().replace("px","")),o=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=s/o;const{labelStyles:a}=it(t);t.labelStyle=a;const n=r?.wrappingWidth;t.defaultWidth=r?.wrappingWidth;const l=Math.max(t.label?n??0:0,t?.assetWidth??s),c=t.constraint==="on"&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:l,h=t.constraint==="on"?c/t.imageAspectRatio:t?.assetHeight??o;t.width=Math.max(c,n??0);const{shapeSvg:d,bbox:f,label:u}=await lt(e,t,"image-shape default"),p=t.pos==="t",m=-c/2,y=-h/2,x=t.label?8:0,C=et.svg(d),k=tt(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const v=C.rectangle(m,y,c,h,k),S=Math.max(c,f.width),_=h+f.height+x,L=C.rectangle(-S/2,-_/2,S,_,{...k,fill:"none",stroke:"none"}),T=d.insert(()=>v,":first-child"),z=d.insert(()=>L);if(t.img){const $=d.append("image");$.attr("href",t.img),$.attr("width",c),$.attr("height",h),$.attr("preserveAspectRatio","none"),$.attr("transform",`translate(${-c/2},${p?_/2-h:-_/2})`)}return u.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${p?-h/2-f.height/2-x/2:h/2-f.height/2+x/2})`),T.attr("transform",`translate(0,${p?f.height/2+x/2:-f.height/2-x/2})`),st(t,z),t.intersect=function($){if(G.info("iconSquare intersect",t,$),!t.label)return J.rect(t,$);const R=t.x??0,U=t.y??0,X=t.height??0;let I=[];return p?I=[{x:R-f.width/2,y:U-X/2},{x:R+f.width/2,y:U-X/2},{x:R+f.width/2,y:U-X/2+f.height+x},{x:R+c/2,y:U-X/2+f.height+x},{x:R+c/2,y:U+X/2},{x:R-c/2,y:U+X/2},{x:R-c/2,y:U-X/2+f.height+x},{x:R-f.width/2,y:U-X/2+f.height+x}]:I=[{x:R-c/2,y:U-X/2},{x:R+c/2,y:U-X/2},{x:R+c/2,y:U-X/2+h},{x:R+f.width/2,y:U-X/2+h},{x:R+f.width/2/2,y:U+X/2},{x:R-f.width/2,y:U+X/2},{x:R-f.width/2,y:U-X/2+h},{x:R-c/2,y:U-X/2+h}],J.polygon(t,I,$)},d}g(vm,"imageSquare");async function Tm(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const s=t.padding??0,o=s,a=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await lt(e,t,nt(t)),c=Math.max(l.width+(a??0)*2,t?.width??0),h=Math.max(l.height+(o??0)*2,t?.height??0),d=[{x:0,y:0},{x:c,y:0},{x:c+3*h/6,y:-h},{x:-3*h/6,y:-h}];let f;const{cssStyles:u}=t;if(t.look==="handDrawn"){const p=et.svg(n),m=tt(t,{}),y=yt(d),x=p.path(y,m);f=n.insert(()=>x,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),u&&f.attr("style",u)}else f=Qe(n,c,h,d);return i&&f.attr("style",i),t.width=c,t.height=h,st(t,f),t.intersect=function(p){return J.polygon(t,d,p)},n}g(Tm,"inv_trapezoid");async function _m(e,t){const{shapeSvg:r,bbox:i,label:s}=await lt(e,t,"label"),o=r.insert("rect",":first-child");return o.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),s.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),st(t,o),t.intersect=function(l){return J.rect(t,l)},r}g(_m,"labelRect");async function Bm(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const s=t.padding??0,o=s,a=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await lt(e,t,nt(t)),c=(t?.height??l.height)+o,h=(t?.width??l.width)+a,d=[{x:0,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:-(3*c)/6,y:-c}];let f;const{cssStyles:u}=t;if(t.look==="handDrawn"){const p=et.svg(n),m=tt(t,{}),y=yt(d),x=p.path(y,m);f=n.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),u&&f.attr("style",u)}else f=Qe(n,h,c,d);return i&&f.attr("style",i),t.width=h,t.height=c,st(t,f),t.intersect=function(p){return J.polygon(t,d,p)},n}g(Bm,"lean_left");async function Lm(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const s=t.padding??0,o=s,a=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await lt(e,t,nt(t)),c=(t?.height??l.height)+o,h=(t?.width??l.width)+a,d=[{x:-3*c/6,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:0,y:-c}];let f;const{cssStyles:u}=t;if(t.look==="handDrawn"){const p=et.svg(n),m=tt(t,{}),y=yt(d),x=p.path(y,m);f=n.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),u&&f.attr("style",u)}else f=Qe(n,h,c,d);return i&&f.attr("style",i),t.width=h,t.height=c,st(t,f),t.intersect=function(p){return J.polygon(t,d,p)},n}g(Lm,"lean_right");function Fm(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.label="",t.labelStyle=r;const s=e.insert("g").attr("class",nt(t)).attr("id",t.domId??t.id),{cssStyles:o}=t,a=Math.max(35,t?.width??0),n=Math.max(35,t?.height??0),l=7,c=[{x:a,y:0},{x:0,y:n+l/2},{x:a-2*l,y:n+l/2},{x:0,y:2*n},{x:a,y:n-l/2},{x:2*l,y:n-l/2}],h=et.svg(s),d=tt(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const f=yt(c),u=h.path(f,d),p=s.insert(()=>u,":first-child");return p.attr("class","outer-path"),o&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",i),p.attr("transform",`translate(-${a/2},${-n})`),st(t,p),t.intersect=function(m){return G.info("lightningBolt intersect",t,m),J.polygon(t,c,m)},s}g(Fm,"lightningBolt");var u_=g((e,t,r,i,s,o,a)=>[`M${e},${t+o}`,`a${s},${o} 0,0,0 ${r},0`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+o+a}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),f_=g((e,t,r,i,s,o,a)=>[`M${e},${t+o}`,`M${e+r},${t+o}`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+o+a}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),g_=g((e,t,r,i,s,o)=>[`M${e-r/2},${-i/2}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Ac=10,$c=10;async function Em(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?24:s;if(t.width||t.height){const x=t.width??0;t.width=(t.width??0)-o,t.width<$c&&(t.width=$c);const k=x/2/(2.5+x/50);t.height=(t.height??0)-a-k*3,t.height<Ac&&(t.height=Ac)}const{shapeSvg:n,bbox:l,label:c}=await lt(e,t,nt(t)),h=(t?.width?t?.width:l.width)+o*2,d=h/2,f=d/(2.5+h/50),u=(t?.height?t?.height:l.height)+f+a*2,p=u*.1;let m;const{cssStyles:y}=t;if(t.look==="handDrawn"){const x=et.svg(n),C=f_(0,0,h,u,d,f,p),k=g_(0,f,h,u,d,f),v=tt(t,{}),S=x.path(C,v),_=x.path(k,v);n.insert(()=>_,":first-child").attr("class","line"),m=n.insert(()=>S,":first-child"),m.attr("class","basic label-container"),y&&m.attr("style",y)}else{const x=u_(0,0,h,u,d,f,p);m=n.insert("path",":first-child").attr("d",x).attr("class","basic label-container outer-path").attr("style",Ht(y)).attr("style",i)}return m.attr("label-offset-y",f),m.attr("transform",`translate(${-h/2}, ${-(u/2+f)})`),st(t,m),c.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+f-(l.y-(l.top??0))})`),t.intersect=function(x){const C=J.rect(t,x),k=C.x-(t.x??0);if(d!=0&&(Math.abs(k)<(t.width??0)/2||Math.abs(k)==(t.width??0)/2&&Math.abs(C.y-(t.y??0))>(t.height??0)/2-f)){let v=f*f*(1-k*k/(d*d));v>0&&(v=Math.sqrt(v)),v=f-v,x.y-(t.y??0)>0&&(v=-v),C.y+=v}return C},n}g(Em,"linedCylinder");async function Mm(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s;if(t.width||t.height){const v=t.width;t.width=(v??0)*10/11-o*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-a*2,t.height<10&&(t.height=10)}const{shapeSvg:n,bbox:l,label:c}=await lt(e,t,nt(t)),h=(t?.width?t?.width:l.width)+(o??0)*2,d=(t?.height?t?.height:l.height)+(a??0)*2,f=t.look==="neo"?d/4:d/8,u=d+f,{cssStyles:p}=t,m=et.svg(n),y=tt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-h/2-h/2*.1,y:-u/2},{x:-h/2-h/2*.1,y:u/2},...hr(-h/2-h/2*.1,u/2,h/2+h/2*.1,u/2,f,.8),{x:h/2+h/2*.1,y:-u/2},{x:-h/2-h/2*.1,y:-u/2},{x:-h/2,y:-u/2},{x:-h/2,y:u/2*1.1},{x:-h/2,y:-u/2}],C=m.polygon(x.map(v=>[v.x,v.y]),y),k=n.insert(()=>C,":first-child");return k.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(0,${-f/2})`),c.attr("transform",`translate(${-h/2+(t.padding??0)+h/2*.1/2-(l.x-(l.left??0))},${-d/2+(t.padding??0)-f/2-(l.y-(l.top??0))})`),st(t,k),t.intersect=function(v){return J.polygon(t,x,v)},n}g(Mm,"linedWaveEdgedRect");async function Am(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s,n=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-o*2-2*n,10),t.height=Math.max((t?.height??0)-a*2-2*n,10));const{shapeSvg:l,bbox:c,label:h}=await lt(e,t,nt(t)),d=(t?.width?t?.width:c.width)+o*2+2*n,f=(t?.height?t?.height:c.height)+a*2+2*n,u=d-2*n,p=f-2*n,m=-u/2,y=-p/2,{cssStyles:x}=t,C=et.svg(l),k=tt(t,{}),v=[{x:m-n,y:y+n},{x:m-n,y:y+p+n},{x:m+u-n,y:y+p+n},{x:m+u-n,y:y+p},{x:m+u,y:y+p},{x:m+u,y:y+p-n},{x:m+u+n,y:y+p-n},{x:m+u+n,y:y-n},{x:m+n,y:y-n},{x:m+n,y},{x:m,y},{x:m,y:y+n}],S=[{x:m,y:y+n},{x:m+u-n,y:y+n},{x:m+u-n,y:y+p},{x:m+u,y:y+p},{x:m+u,y},{x:m,y}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const _=yt(v);let L=C.path(_,k);const T=yt(S);let z=C.path(T,k);t.look!=="handDrawn"&&(L=On(L),z=On(z));const $=l.insert("g",":first-child");return $.insert(()=>L),$.insert(()=>z),$.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",x),i&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",i),h.attr("transform",`translate(${-(c.width/2)-n-(c.x-(c.left??0))}, ${-(c.height/2)+n-(c.y-(c.top??0))})`),st(t,$),t.intersect=function(R){return J.polygon(t,v,R)},l}g(Am,"multiRect");async function $m(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await lt(e,t,nt(t)),n=t.padding??0,l=t.look==="neo"?16:n,c=t.look==="neo"?12:n;let h=!0;(t.width||t.height)&&(h=!1,t.width=(t?.width??0)-l*2,t.height=(t?.height??0)-c*3);const d=Math.max(o.width,t?.width??0)+l*2,f=Math.max(o.height,t?.height??0)+c*3,u=t.look==="neo"?f/4:f/8,p=f+(h?u/2:-u/2),m=-d/2,y=-p/2,x=10,{cssStyles:C}=t,k=hr(m-x,y+p+x,m+d-x,y+p+x,u,.8),v=k?.[k.length-1],S=[{x:m-x,y:y+x},{x:m-x,y:y+p+x},...k,{x:m+d-x,y:v.y-x},{x:m+d,y:v.y-x},{x:m+d,y:v.y-2*x},{x:m+d+x,y:v.y-2*x},{x:m+d+x,y:y-x},{x:m+x,y:y-x},{x:m+x,y},{x:m,y},{x:m,y:y+x}],_=[{x:m,y:y+x},{x:m+d-x,y:y+x},{x:m+d-x,y:v.y-x},{x:m+d,y:v.y-x},{x:m+d,y},{x:m,y}],L=et.svg(s),T=tt(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const z=yt(S),$=L.path(z,T),R=yt(_),U=L.path(R,T),X=s.insert(()=>$,":first-child");return X.insert(()=>U),X.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&X.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&X.selectAll("path").attr("style",i),X.attr("transform",`translate(0,${-u/2})`),a.attr("transform",`translate(${-(o.width/2)-x-(o.x-(o.left??0))}, ${-(o.height/2)+x-u/2-(o.y-(o.top??0))})`),st(t,X),t.intersect=function(I){return J.polygon(t,S,I)},s}g($m,"multiWaveEdgedRectangle");async function Om(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=it(t);t.labelStyle=i,t.useHtmlLabels||Qt(Bt())||(t.centerLabel=!0);const{shapeSvg:a,bbox:n,label:l}=await lt(e,t,nt(t)),c=Math.max(n.width+(t.padding??0)*2,t?.width??0),h=Math.max(n.height+(t.padding??0)*2,t?.height??0),d=-c/2,f=-h/2,{cssStyles:u}=t,p=et.svg(a),m=tt(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=p.rectangle(d,f,c,h,m),x=a.insert(()=>y,":first-child");return x.attr("class","basic label-container outer-path"),l.attr("class","label noteLabel"),u&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",u),s&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",s),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),st(t,x),t.intersect=function(C){return J.rect(t,C)},a}g(Om,"note");var p_=g((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function Im(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const{shapeSvg:s,bbox:o}=await lt(e,t,nt(t)),a=o.width+(t.padding??0),n=o.height+(t.padding??0),l=a+n,c=.5,h=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const u=et.svg(s),p=tt(t,{}),m=p_(0,0,l),y=u.path(m,p);d=s.insert(()=>y,":first-child").attr("transform",`translate(${-l/2+c}, ${l/2})`),f&&d.attr("style",f)}else d=Qe(s,l,l,h),d.attr("transform",`translate(${-l/2+c}, ${l/2})`);return i&&d.attr("style",i),st(t,d),t.calcIntersect=function(u,p){const m=u.width,y=[{x:m/2,y:0},{x:m,y:-m/2},{x:m/2,y:-m},{x:0,y:-m/2}],x=J.polygon(u,y,p);return{x:x.x-.5,y:x.y-.5}},t.intersect=function(u){return this.calcIntersect(t,u)},s}g(Im,"question");async function Rm(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?21:s??0,a=t.look==="neo"?12:s??0,{shapeSvg:n,bbox:l,label:c}=await lt(e,t,nt(t)),h=(t?.width??l.width)+(t.look==="neo"?o*2:o),d=(t?.height??l.height)+(t.look==="neo"?a*2:a),f=-h/2,u=-d/2,p=u/2,m=[{x:f+p,y:u},{x:f,y:0},{x:f+p,y:-u},{x:-f,y:-u},{x:-f,y:u}],{cssStyles:y}=t,x=et.svg(n),C=tt(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=yt(m),v=x.path(k,C),S=n.insert(()=>v,":first-child");return S.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),S.attr("transform",`translate(${-p/2},0)`),c.attr("transform",`translate(${-p/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),st(t,S),t.intersect=function(_){return J.polygon(t,m,_)},n}g(Rm,"rect_left_inv_arrow");async function Pm(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;let s;t.cssClasses?s="node "+t.cssClasses:s="node default";const o=e.insert("g").attr("class",s).attr("id",t.domId||t.id),a=o.insert("g"),n=o.insert("g").attr("class","label").attr("style",i),l=t.description,c=t.label,h=await er(n,c,t.labelStyle,!0,!0);let d={width:0,height:0};if(Qt(xt())){const T=h.children[0],z=pt(h);d=T.getBoundingClientRect(),z.attr("width",d.width),z.attr("height",d.height)}G.info("Text 2",l);const f=l||[],u=h.getBBox(),p=await er(n,Array.isArray(f)?f.join("<br/>"):f,t.labelStyle,!0,!0),m=p.children[0],y=pt(p);d=m.getBoundingClientRect(),y.attr("width",d.width),y.attr("height",d.height);const x=(t.padding||0)/2;pt(p).attr("transform","translate( "+(d.width>u.width?0:(u.width-d.width)/2)+", "+(u.height+x+5)+")"),pt(h).attr("transform","translate( "+(d.width<u.width?0:-(u.width-d.width)/2)+", 0)"),d=n.node().getBBox(),n.attr("transform","translate("+-d.width/2+", "+(-d.height/2-x+3)+")");const C=d.width+(t.padding||0),k=d.height+(t.padding||0),v=-d.width/2-x,S=-d.height/2-x;let _,L;if(t.look==="handDrawn"){const T=et.svg(o),z=tt(t,{}),$=T.path(cr(v,S,C,k,t.rx||0),z),R=T.line(-d.width/2-x,-d.height/2-x+u.height+x,d.width/2+x,-d.height/2-x+u.height+x,z);L=o.insert(()=>(G.debug("Rough node insert CXC",$),R),":first-child"),_=o.insert(()=>(G.debug("Rough node insert CXC",$),$),":first-child")}else _=a.insert("rect",":first-child"),L=a.insert("line"),_.attr("class","outer title-state").attr("style",i).attr("x",-d.width/2-x).attr("y",-d.height/2-x).attr("width",d.width+(t.padding||0)).attr("height",d.height+(t.padding||0)),L.attr("class","divider").attr("x1",-d.width/2-x).attr("x2",d.width/2+x).attr("y1",-d.height/2-x+u.height+x).attr("y2",-d.height/2-x+u.height+x);return st(t,_),t.intersect=function(T){return J.rect(t,T)},o}g(Pm,"rectWithTitle");async function Dm(e,t,{config:{themeVariables:r}}){const i=r?.radius??5,s={rx:i,ry:i,labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1};return Ti(e,t,s)}g(Dm,"roundedRect");var gr=8;async function Nm(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?12:t.padding??0,{shapeSvg:a,bbox:n,label:l}=await lt(e,t,nt(t)),c=(t?.width??n.width)+s*2+(t.look==="neo"?gr:gr*2),h=(t?.height??n.height)+o*2,d=c-gr,f=h,u=gr-c/2,p=-h/2,{cssStyles:m}=t,y=et.svg(a),x=tt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const C=[{x:u,y:p},{x:u+d,y:p},{x:u+d,y:p+f},{x:u-gr,y:p+f},{x:u-gr,y:p},{x:u,y:p},{x:u,y:p+f}],k=y.polygon(C.map(S=>[S.x,S.y]),x),v=a.insert(()=>k,":first-child");return v.attr("class","basic label-container outer-path").attr("style",Ht(m)),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),m&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),l.attr("transform",`translate(${gr/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),st(t,v),t.intersect=function(S){return J.rect(t,S)},a}g(Nm,"shadedProcess");async function qm(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-o*2,10),t.height=Math.max((t?.height??0)/1.5-a*2,10));const{shapeSvg:n,bbox:l,label:c}=await lt(e,t,nt(t)),h=(t?.width?t?.width:l.width)+o*2,d=((t?.height?t?.height:l.height)+a*2)*1.5,f=h,u=d/1.5,p=-f/2,m=-u/2,{cssStyles:y}=t,x=et.svg(n),C=tt(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=[{x:p,y:m},{x:p,y:m+u},{x:p+f,y:m+u},{x:p+f,y:m-u/2}],v=yt(k),S=x.path(v,C),_=n.insert(()=>S,":first-child");return _.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",y),i&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",i),_.attr("transform",`translate(0, ${u/4})`),c.attr("transform",`translate(${-f/2+(t.padding??0)-(l.x-(l.left??0))}, ${-u/4+(t.padding??0)-(l.y-(l.top??0))})`),st(t,_),t.intersect=function(L){return J.polygon(t,k,L)},n}g(qm,"slopedRect");async function zm(e,t){const r=t.padding??0,i=t.look==="neo"?16:r*2,s=t.look==="neo"?12:r,o={rx:0,ry:0,labelPaddingX:t.labelPaddingX??i,labelPaddingY:s};return Ti(e,t,o)}g(zm,"squareRect");async function Wm(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?20:s,a=t.look==="neo"?12:s,{shapeSvg:n,bbox:l}=await lt(e,t,nt(t)),c=l.height+(t.look==="neo"?a*2:a),h=l.width+c/4+(t.look==="neo"?o*2:o),d=c/2,{cssStyles:f}=t,u=et.svg(n),p=tt(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const m=[{x:-h/2+d,y:-c/2},{x:h/2-d,y:-c/2},...cs(-h/2+d,0,d,50,90,270),{x:h/2-d,y:c/2},...cs(h/2-d,0,d,50,270,450)],y=yt(m),x=u.path(y,p),C=n.insert(()=>x,":first-child");return C.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&C.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&C.selectChildren("path").attr("style",i),st(t,C),t.intersect=function(k){return J.polygon(t,m,k)},n}g(Wm,"stadium");async function jm(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return Ti(e,t,r)}g(jm,"state");function Hm(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=it(t);t.labelStyle=i;const{cssStyles:o}=t,{lineColor:a,stateBorder:n,nodeBorder:l,nodeShadow:c}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const h=e.insert("g").attr("class","node default").attr("id",t.domId??t.id),d=et.svg(h),f=tt(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const u=d.circle(0,0,t.width,{...f,stroke:a,strokeWidth:2}),p=n??l,m=(t.width??0)*5/14,y=d.circle(0,0,m,{...f,fill:p,stroke:p,strokeWidth:2,fillStyle:"solid"}),x=h.insert(()=>u,":first-child");if(x.insert(()=>y),t.look!=="handDrawn"&&x.attr("class","outer-path"),o&&x.selectAll("path").attr("style",o),s&&x.selectAll("path").attr("style",s),t.width<25&&c&&t.look!=="handDrawn"){const C=e.node()?.ownerSVGElement?.id??"",k=C?`${C}-drop-shadow-small`:"drop-shadow-small";x.attr("style",`filter:url(#${k})`)}return st(t,x),t.intersect=function(C){return J.circle(t,(t.width??0)/2,C)},h}g(Hm,"stateEnd");function Ym(e,t,{config:{themeVariables:r}}){const{lineColor:i,nodeShadow:s}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const o=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let a;if(t.look==="handDrawn"){const l=et.svg(o).circle(0,0,t.width,QS(i));a=o.insert(()=>l),a.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else a=o.insert("circle",":first-child"),a.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&s&&t.look!=="handDrawn"){const n=e.node()?.ownerSVGElement?.id??"",l=n?`${n}-drop-shadow-small`:"drop-shadow-small";a.attr("style",`filter:url(#${l})`)}return st(t,a),t.intersect=function(n){return J.circle(t,(t.width??7)/2,n)},o}g(Ym,"stateStart");var Dr=8;async function Um(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const s=t?.padding??8,o=t.look==="neo"?28:s,a=t.look==="neo"?12:s,{shapeSvg:n,bbox:l}=await lt(e,t,nt(t)),c=(t?.width??l.width)+2*Dr+o,h=(t?.height??l.height)+a,d=c-2*Dr,f=h,u=-c/2,p=-h/2,m=[{x:0,y:0},{x:d,y:0},{x:d,y:-f},{x:0,y:-f},{x:0,y:0},{x:-8,y:0},{x:d+8,y:0},{x:d+8,y:-f},{x:-8,y:-f},{x:-8,y:0}];if(t.look==="handDrawn"){const y=et.svg(n),x=tt(t,{}),C=y.rectangle(u,p,d+16,f,x),k=y.line(u+Dr,p,u+Dr,p+f,x),v=y.line(u+Dr+d,p,u+Dr+d,p+f,x);n.insert(()=>k,":first-child"),n.insert(()=>v,":first-child");const S=n.insert(()=>C,":first-child"),{cssStyles:_}=t;S.attr("class","basic label-container").attr("style",Ht(_)),st(t,S)}else{const y=Qe(n,d,f,m);i&&y.attr("style",i),st(t,y)}return t.intersect=function(y){return J.polygon(t,m,y)},n}g(Um,"subroutine");var Aa=.2;async function Xm(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s;(t.width||t.height)&&(t.height=Math.max((t?.height??0)-a*2,10),t.width=Math.max((t?.width??0)-o*2-Aa*(t.height+a*2),10));const{shapeSvg:n,bbox:l}=await lt(e,t,nt(t)),c=(t?.height?t?.height:l.height)+a*2,h=Aa*c,d=Aa*c,u=(t?.width?t?.width:l.width)+o*2+h-h,p=c,m=-u/2,y=-p/2,{cssStyles:x}=t,C=et.svg(n),k=tt(t,{}),v=[{x:m-h/2,y},{x:m+u+h/2,y},{x:m+u+h/2,y:y+p},{x:m-h/2,y:y+p}],S=[{x:m+u-h/2,y:y+p},{x:m+u+h/2,y:y+p},{x:m+u+h/2,y:y+p-d}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const _=yt(v),L=C.path(_,k),T=yt(S),z=C.path(T,{...k,fillStyle:"solid"}),$=n.insert(()=>z,":first-child");return $.insert(()=>L,":first-child"),$.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",x),i&&t.look!=="handDrawn"&&$.selectAll("path").attr("style",i),st(t,$),t.intersect=function(R){return J.polygon(t,v,R)},n}g(Xm,"taggedRect");async function Gm(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await lt(e,t,nt(t)),n=Math.max(o.width+(t.padding??0)*2,t?.width??0),l=Math.max(o.height+(t.padding??0)*2,t?.height??0),c=l/8,h=.2*n,d=.2*l,f=l+c,{cssStyles:u}=t,p=et.svg(s),m=tt(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-n/2-n/2*.1,y:f/2},...hr(-n/2-n/2*.1,f/2,n/2+n/2*.1,f/2,c,.8),{x:n/2+n/2*.1,y:-f/2},{x:-n/2-n/2*.1,y:-f/2}],x=-n/2+n/2*.1,C=-f/2-d*.4,k=[{x:x+n-h,y:(C+l)*1.3},{x:x+n,y:C+l-d},{x:x+n,y:(C+l)*.9},...hr(x+n,(C+l)*1.25,x+n-h,(C+l)*1.3,-l*.02,.5)],v=yt(y),S=p.path(v,m),_=yt(k),L=p.path(_,{...m,fillStyle:"solid"}),T=s.insert(()=>L,":first-child");return T.insert(()=>S,":first-child"),T.attr("class","basic label-container outer-path"),u&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),T.attr("transform",`translate(0,${-c/2})`),a.attr("transform",`translate(${-n/2+(t.padding??0)-(o.x-(o.left??0))},${-l/2+(t.padding??0)-c/2-(o.y-(o.top??0))})`),st(t,T),t.intersect=function(z){return J.polygon(t,y,z)},s}g(Gm,"taggedWaveEdgedRectangle");async function Vm(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const{shapeSvg:s,bbox:o}=await lt(e,t,nt(t)),a=Math.max(o.width+(t.padding??0),t?.width||0),n=Math.max(o.height+(t.padding??0),t?.height||0),l=-a/2,c=-n/2,h=s.insert("rect",":first-child");return h.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",c).attr("width",a).attr("height",n),st(t,h),t.intersect=function(d){return J.rect(t,d)},s}g(Vm,"text");var m_=g((e,t,r,i,s,o)=>`M${e},${t}
234
+ a${s},${o} 0,0,1 0,${-i}
235
+ l${r},0
236
+ a${s},${o} 0,0,1 0,${i}
237
+ M${r},${-i}
238
+ a${s},${o} 0,0,0 0,${i}
239
+ l${-r},0`,"createCylinderPathD"),y_=g((e,t,r,i,s,o)=>[`M${e},${t}`,`M${e+r},${t}`,`a${s},${o} 0,0,0 0,${-i}`,`l${-r},0`,`a${s},${o} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),x_=g((e,t,r,i,s,o)=>[`M${e+r/2},${-i/2}`,`a${s},${o} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),Oc=5,Ic=10;async function Zm(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?12:s/2;if(t.width||t.height){const m=t.height??0;t.height=(t.height??0)-o,t.height<Oc&&(t.height=Oc);const x=m/2/(2.5+m/50);t.width=(t.width??0)-o-x*3,t.width<Ic&&(t.width=Ic)}const{shapeSvg:a,bbox:n,label:l}=await lt(e,t,nt(t)),c=(t.height?t.height:n.height)+o,h=c/2,d=h/(2.5+c/50),f=(t.width?t.width:n.width)+d+o,{cssStyles:u}=t;let p;if(t.look==="handDrawn"){const m=et.svg(a),y=y_(0,0,f,c,d,h),x=x_(0,0,f,c,d,h),C=m.path(y,tt(t,{})),k=m.path(x,tt(t,{fill:"none"}));p=a.insert(()=>k,":first-child"),p=a.insert(()=>C,":first-child"),p.attr("class","basic label-container"),u&&p.attr("style",u)}else{const m=m_(0,0,f,c,d,h);p=a.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",Ht(u)).attr("style",i),p.attr("class","basic label-container outer-path"),u&&p.selectAll("path").attr("style",u),i&&p.selectAll("path").attr("style",i)}return p.attr("label-offset-x",d),p.attr("transform",`translate(${-f/2}, ${c/2} )`),l.attr("transform",`translate(${-(n.width/2)-d-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),st(t,p),t.intersect=function(m){const y=J.rect(t,m),x=y.y-(t.y??0);if(h!=0&&(Math.abs(x)<(t.height??0)/2||Math.abs(x)==(t.height??0)/2&&Math.abs(y.x-(t.x??0))>(t.width??0)/2-d)){let C=d*d*(1-x*x/(h*h));C!=0&&(C=Math.sqrt(Math.abs(C))),C=d-C,m.x-(t.x??0)>0&&(C=-C),y.x+=C}return y},a}g(Zm,"tiltedCylinder");async function Km(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const s=t.padding??0,o=(t.look==="neo",s),a=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await lt(e,t,nt(t)),c=(t?.height??l.height)+o,h=(t?.width??l.width)+a,d=[{x:-3*c/6,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:0,y:-c}];let f;const{cssStyles:u}=t;if(t.look==="handDrawn"){const p=et.svg(n),m=tt(t,{}),y=yt(d),x=p.path(y,m);f=n.insert(()=>x,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),u&&f.attr("style",u)}else f=Qe(n,h,c,d);return i&&f.attr("style",i),t.width=h,t.height=c,st(t,f),t.intersect=function(p){return J.polygon(t,d,p)},n}g(Km,"trapezoid");async function Qm(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s,n=15,l=5;(t.width||t.height)&&(t.height=(t.height??0)-a*2,t.height<l&&(t.height=l),t.width=(t.width??0)-o*2,t.width<n&&(t.width=n));const{shapeSvg:c,bbox:h}=await lt(e,t,nt(t)),d=(t?.width?t?.width:h.width)+o*2,f=(t?.height?t?.height:h.height)+a*2,{cssStyles:u}=t,p=et.svg(c),m=tt(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-d/2*.8,y:-f/2},{x:d/2*.8,y:-f/2},{x:d/2,y:-f/2*.6},{x:d/2,y:f/2},{x:-d/2,y:f/2},{x:-d/2,y:-f/2*.6}],x=yt(y),C=p.path(x,m),k=c.insert(()=>C,":first-child");return k.attr("class","basic label-container outer-path"),u&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),st(t,k),t.intersect=function(v){return J.polygon(t,y,v)},c}g(Qm,"trapezoidalPentagon");var Rc=10,Pc=10;async function Jm(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.width=((t?.width??0)-o)/2,t.width<Pc&&(t.width=Pc),t.height=t?.height??0,t.height<Rc&&(t.height=Rc));const{shapeSvg:a,bbox:n,label:l}=await lt(e,t,nt(t)),c=De(xt().flowchart?.htmlLabels),h=(t?.width?t?.width:n.width)+o,d=t?.height?t?.height:h+n.height,f=d,u=[{x:0,y:0},{x:f,y:0},{x:f/2,y:-d}],{cssStyles:p}=t,m=et.svg(a),y=tt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=yt(u),C=m.path(x,y),k=a.insert(()=>C,":first-child").attr("transform",`translate(${-d/2}, ${d/2})`).attr("class","outer-path");return p&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",p),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),t.width=h,t.height=d,st(t,k),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${d/2-(n.height+(t.padding??0)/(c?2:1)-(n.y-(n.top??0)))})`),t.intersect=function(v){return G.info("Triangle intersect",t,u,v),J.polygon(t,u,v)},a}g(Jm,"triangle");async function ty(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s;let n=!0;(t.width||t.height)&&(n=!1,t.width=(t?.width??0)-o*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-a*2,t.height<10&&(t.height=10));const{shapeSvg:l,bbox:c,label:h}=await lt(e,t,nt(t)),d=(t?.width?t?.width:c.width)+(o??0)*2,f=(t?.height?t?.height:c.height)+(a??0)*2,u=t.look==="neo"?f/4:f/8,p=f+(n?u:-u),{cssStyles:m}=t,x=14-d,C=x>0?x/2:0,k=et.svg(l),v=tt(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const S=[{x:-d/2-C,y:p/2},...hr(-d/2-C,p/2,d/2+C,p/2,u,.8),{x:d/2+C,y:-p/2},{x:-d/2-C,y:-p/2}],_=yt(S),L=k.path(_,v),T=l.insert(()=>L,":first-child");return T.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",i),T.attr("transform",`translate(0,${-u/2})`),h.attr("transform",`translate(${-d/2+(t.padding??0)-(c.x-(c.left??0))},${-f/2+(t.padding??0)-u-(c.y-(c.top??0))})`),st(t,T),t.intersect=function(z){return J.polygon(t,S,z)},l}g(ty,"waveEdgedRectangle");async function ey(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?20:s;if(t.width||t.height){t.width=t?.width??0,t.width<20&&(t.width=20),t.height=t?.height??0,t.height<10&&(t.height=10);const v=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-a-v*(20/9)),t.width=t.width-o*2}const{shapeSvg:n,bbox:l}=await lt(e,t,nt(t)),c=(t?.width?t?.width:l.width)+o*2,h=(t?.height?t?.height:l.height)+a,d=h/8,f=h+d*2,{cssStyles:u}=t,p=et.svg(n),m=tt(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-c/2,y:f/2},...hr(-c/2,f/2,c/2,f/2,d,1),{x:c/2,y:-f/2},...hr(c/2,-f/2,-c/2,-f/2,d,-1)],x=yt(y),C=p.path(x,m),k=n.insert(()=>C,":first-child");return k.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),st(t,k),t.intersect=function(v){return J.polygon(t,y,v)},n}g(ey,"waveRectangle");var Et=10;async function ry(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-s*2-Et,10),t.height=Math.max((t?.height??0)-o*2-Et,10));const{shapeSvg:a,bbox:n,label:l}=await lt(e,t,nt(t)),c=(t?.width?t?.width:n.width)+s*2+Et,h=(t?.height?t?.height:n.height)+o*2+Et,d=c-Et,f=h-Et,u=-d/2,p=-f/2,{cssStyles:m}=t,y=et.svg(a),x=tt(t,{}),C=[{x:u-Et,y:p-Et},{x:u-Et,y:p+f},{x:u+d,y:p+f},{x:u+d,y:p-Et}],k=`M${u-Et},${p-Et} L${u+d},${p-Et} L${u+d},${p+f} L${u-Et},${p+f} L${u-Et},${p-Et}
240
+ M${u-Et},${p} L${u+d},${p}
241
+ M${u},${p-Et} L${u},${p+f}`;t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const v=y.path(k,x),S=a.insert(()=>v,":first-child");return S.attr("transform",`translate(${Et/2}, ${Et/2})`),S.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),l.attr("transform",`translate(${-(n.width/2)+Et/2-(n.x-(n.left??0))}, ${-(n.height/2)+Et/2-(n.y-(n.top??0))})`),st(t,S),t.intersect=function(_){return J.polygon(t,C,_)},a}g(ry,"windowPane");var Dc=new Set(["redux-color","redux-dark-color"]),C_=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function rh(e,t){const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:s}=Bt(),{rowEven:o,rowOdd:a,nodeBorder:n,borderColorArray:l}=s;if(t.look==="handDrawn"){const{themeVariables:Z}=Bt(),{background:V}=Z,rt={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${V}`]};await rh(e,rt)}const c=Bt();t.useHtmlLabels=c.htmlLabels;let h=c.er?.diagramPadding??10,d=c.er?.entityPadding??6;const{cssStyles:f}=t,{labelStyles:u,nodeStyles:p}=it(t);if(r.attributes.length===0&&t.label){const Z={rx:0,ry:0,labelPaddingX:h,labelPaddingY:h*1.5};Ie(t.label,c)+Z.labelPaddingX*2<c.er.minEntityWidth&&(t.width=c.er.minEntityWidth);const V=await Ti(e,t,Z);if(i!=null&&Dc.has(i)){const rt=r.colorIndex??0;V.attr("data-color-id",`color-${rt%l.length}`)}if(!De(c.htmlLabels)){const rt=V.select("text"),ft=rt.node()?.getBBox();rt.attr("transform",`translate(${-ft.width/2}, 0)`)}return V}c.htmlLabels||(h*=1.25,d*=1.25);let m=nt(t);m||(m="node default");const y=e.insert("g").attr("class",m).attr("id",t.domId||t.id),x=await zr(y,t.label??"",c,0,0,["name"],u);x.height+=d;let C=0;const k=[],v=[];let S=0,_=0,L=0,T=0,z=!0,$=!0;for(const Z of r.attributes){const V=await zr(y,Z.type,c,0,C,["attribute-type"],u);S=Math.max(S,V.width+h);const rt=await zr(y,Z.name,c,0,C,["attribute-name"],u);_=Math.max(_,rt.width+h);const ft=await zr(y,Z.keys.join(),c,0,C,["attribute-keys"],u);L=Math.max(L,ft.width+h);const ht=await zr(y,Z.comment,c,0,C,["attribute-comment"],u);T=Math.max(T,ht.width+h);const mt=Math.max(V.height,rt.height,ft.height,ht.height)+d;v.push({yOffset:C,rowHeight:mt}),C+=mt}let R=4;L<=h&&(z=!1,L=0,R--),T<=h&&($=!1,T=0,R--);const U=y.node().getBBox();if(x.width+h*2-(S+_+L+T)>0){const Z=x.width+h*2-(S+_+L+T);S+=Z/R,_+=Z/R,L>0&&(L+=Z/R),T>0&&(T+=Z/R)}const X=S+_+L+T,I=et.svg(y),A=tt(t,{});t.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");let M=0;v.length>0&&(M=v.reduce((Z,V)=>Z+(V?.rowHeight??0),0));const D=Math.max(U.width+h*2,t?.width||0,X),O=Math.max((M??0)+x.height,t?.height||0),E=-D/2,P=-O/2;if(y.selectAll("g:not(:first-child)").each((Z,V,rt)=>{const ft=pt(rt[V]),ht=ft.attr("transform");let mt=0,$t=0;if(ht){const Lt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(ht);Lt&&(mt=parseFloat(Lt[1]),$t=parseFloat(Lt[2]),ft.attr("class").includes("attribute-name")?mt+=S:ft.attr("class").includes("attribute-keys")?mt+=S+_:ft.attr("class").includes("attribute-comment")&&(mt+=S+_+L))}ft.attr("transform",`translate(${E+h/2+mt}, ${$t+P+x.height+d/2})`)}),y.select(".name").attr("transform","translate("+-x.width/2+", "+(P+d/2)+")"),i!=null&&Dc.has(i)){const Z=r.colorIndex??0;y.attr("data-color-id",`color-${Z%l.length}`)}const B=I.rectangle(E,P,D,O,A),j=y.insert(()=>B,":first-child").attr("class","outer-path").attr("style",f.join(""));k.push(0);for(const[Z,V]of v.entries()){const ft=(Z+1)%2===0&&V.yOffset!==0,ht=I.rectangle(E,x.height+P+V?.yOffset,D,V?.rowHeight,{...A,fill:ft?o:a,stroke:n});y.insert(()=>ht,"g.label").attr("style",f.join("")).attr("class",`row-rect-${ft?"even":"odd"}`)}const W=1e-4;let K=Wr(E,x.height+P,D+E,x.height+P,W),Y=I.polygon(K.map(Z=>[Z.x,Z.y]),A);if(y.insert(()=>Y).attr("class","divider"),K=Wr(S+E,x.height+P,S+E,O+P,W),Y=I.polygon(K.map(Z=>[Z.x,Z.y]),A),y.insert(()=>Y).attr("class","divider"),z){const Z=S+_+E;K=Wr(Z,x.height+P,Z,O+P,W),Y=I.polygon(K.map(V=>[V.x,V.y]),A),y.insert(()=>Y).attr("class","divider")}if($){const Z=S+_+L+E;K=Wr(Z,x.height+P,Z,O+P,W),Y=I.polygon(K.map(V=>[V.x,V.y]),A),y.insert(()=>Y).attr("class","divider")}for(const Z of k){const V=x.height+P+Z;K=Wr(E,V,D+E,V,W),Y=I.polygon(K.map(rt=>[rt.x,rt.y]),A),y.insert(()=>Y).attr("class","divider")}if(st(t,j),p&&t.look!=="handDrawn")if(i!=null&&C_.has(i))y.selectAll("path").attr("style",p);else{const V=p.split(";")?.filter(rt=>rt.includes("stroke"))?.map(rt=>`${rt}`).join("; ");y.selectAll("path").attr("style",V??""),y.selectAll(".row-rect-even path").attr("style",p)}return t.intersect=function(Z){return J.rect(t,Z)},y}g(rh,"erBox");async function zr(e,t,r,i=0,s=0,o=[],a=""){const n=e.insert("g").attr("class",`label ${o.join(" ")}`).attr("transform",`translate(${i}, ${s})`).attr("style",a);t!==Ha(t)&&(t=Ha(t),t=t.replaceAll("<","&lt;").replaceAll(">","&gt;"));const l=n.node().appendChild(await Le(n,t,{width:Ie(t,r)+100,style:a,useHtmlLabels:r.htmlLabels},r));if(t.includes("&lt;")||t.includes("&gt;")){let h=l.children[0];for(h.textContent=h.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");h.childNodes[0];)h=h.childNodes[0],h.textContent=h.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let c=l.getBBox();if(De(r.htmlLabels)){const h=l.children[0];h.style.textAlign="start";const d=pt(l);c=h.getBoundingClientRect(),d.attr("width",c.width),d.attr("height",c.height)}return c}g(zr,"addText");function Wr(e,t,r,i,s){return e===r?[{x:e-s/2,y:t},{x:e+s/2,y:t},{x:r+s/2,y:i},{x:r-s/2,y:i}]:[{x:e,y:t-s/2},{x:e,y:t+s/2},{x:r,y:i+s/2},{x:r,y:i-s/2}]}g(Wr,"lineToPolygon");async function iy(e,t,r,i,s=r.class.padding??12){const o=i?0:3,a=e.insert("g").attr("class",nt(t)).attr("id",t.domId||t.id);let n=null,l=null,c=null,h=null,d=0,f=0,u=0;if(n=a.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const C=t.annotations[0];await Ui(n,{text:`«${C}»`},0),d=n.node().getBBox().height}l=a.insert("g").attr("class","label-group text"),await Ui(l,t,0,["font-weight: bolder"]);const p=l.node().getBBox();f=p.height,c=a.insert("g").attr("class","members-group text");let m=0;for(const C of t.members){const k=await Ui(c,C,m,[C.parseClassifier()]);m+=k+o}u=c.node().getBBox().height,u<=0&&(u=s/2),h=a.insert("g").attr("class","methods-group text");let y=0;for(const C of t.methods){const k=await Ui(h,C,y,[C.parseClassifier()]);y+=k+o}let x=a.node().getBBox();if(n!==null){const C=n.node().getBBox();n.attr("transform",`translate(${-C.width/2})`)}return l.attr("transform",`translate(${-p.width/2}, ${d})`),x=a.node().getBBox(),c.attr("transform",`translate(0, ${d+f+s*2})`),x=a.node().getBBox(),h.attr("transform",`translate(0, ${d+f+(u?u+s*4:s*2)})`),x=a.node().getBBox(),{shapeSvg:a,bbox:x}}g(iy,"textHelper");async function Ui(e,t,r,i=[]){const s=e.insert("g").attr("class","label").attr("style",i.join("; ")),o=Bt();let a="useHtmlLabels"in t?t.useHtmlLabels:De(o.htmlLabels)??!0,n="";"text"in t?n=t.text:n=t.label,!a&&n.startsWith("\\")&&(n=n.substring(1)),ui(n)&&(a=!0);const l=await Le(s,hl(nr(n)),{width:Ie(n,o)+50,classes:"markdown-node-label",useHtmlLabels:a},o);let c,h=1;if(a){const d=l.children[0],f=pt(l);h=d.innerHTML.split("<br>").length,d.innerHTML.includes("</math>")&&(h+=d.innerHTML.split("<mrow>").length-1);const u=d.getElementsByTagName("img");if(u){const p=n.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...u].map(m=>new Promise(y=>{function x(){if(m.style.display="flex",m.style.flexDirection="column",p){const C=o.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,v=parseInt(C,10)*5+"px";m.style.minWidth=v,m.style.maxWidth=v}else m.style.width="100%";y(m)}g(x,"setupImage"),setTimeout(()=>{m.complete&&x()}),m.addEventListener("error",x),m.addEventListener("load",x)})))}c=d.getBoundingClientRect(),f.attr("width",c.width),f.attr("height",c.height)}else{i.includes("font-weight: bolder")&&pt(l).selectAll("tspan").attr("font-weight",""),h=l.children.length;const d=l.children[0];(l.textContent===""||l.textContent.includes("&gt"))&&(d.textContent=n[0]+n.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),n[1]===" "&&(d.textContent=d.textContent[0]+" "+d.textContent.substring(1))),d.textContent==="undefined"&&(d.textContent=""),c=l.getBBox()}return s.attr("transform","translate(0,"+(-c.height/(2*h)+r)+")"),c.height}g(Ui,"addText");async function sy(e,t){const r=xt(),{themeVariables:i}=r,{useGradient:s}=i,o=r.class.padding??12,a=o,n=t.useHtmlLabels??De(r.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:c,bbox:h}=await iy(e,t,r,n,a),{labelStyles:d,nodeStyles:f}=it(t);t.labelStyle=d,t.cssStyles=l.styles||"";const u=l.styles?.join(";")||f||"";t.cssStyles||(t.cssStyles=u.replaceAll("!important","").split(";"));const p=l.members.length===0&&l.methods.length===0&&!r.class?.hideEmptyMembersBox,m=et.svg(c),y=tt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=Math.max(t.width??0,h.width);let C=Math.max(t.height??0,h.height);const k=(t.height??0)>h.height;l.members.length===0&&l.methods.length===0?C+=a:l.members.length>0&&l.methods.length===0&&(C+=a*2);const v=-x/2,S=-C/2;let _=p?o*2:l.members.length===0&&l.methods.length===0?-o:0;k&&(_=o*2);const L=m.rectangle(v-o,S-o-(p?o:l.members.length===0&&l.methods.length===0?-o/2:0),x+2*o,C+2*o+_,y),T=c.insert(()=>L,":first-child");T.attr("class","basic label-container outer-path");const z=T.node().getBBox(),$=c.select(".annotation-group").node().getBBox().height-(p?o/2:0)||0,R=c.select(".label-group").node().getBBox().height-(p?o/2:0)||0,U=c.select(".members-group").node().getBBox().height-(p?o/2:0)||0,X=($+R+S+o-(S-o-(p?o:l.members.length===0&&l.methods.length===0?-o/2:0)))/2;if(c.selectAll(".text").each((I,A,M)=>{const D=pt(M[A]),O=D.attr("transform");let E=0;if(O){const W=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(O);W&&(E=parseFloat(W[2]))}let P=E+S+o-(p?o:l.members.length===0&&l.methods.length===0?-o/2:0);if(D.attr("class").includes("methods-group")){const j=Math.max(U,a/2);k?P=Math.max(X,$+R+j+S+a*2+o)+a*2:P=$+R+j+S+a*4+o}l.members.length===0&&l.methods.length===0&&r.class?.hideEmptyMembersBox&&(l.annotations.length>0?P=E-a:P=E),n||(P-=4);let B=v;(D.attr("class").includes("label-group")||D.attr("class").includes("annotation-group"))&&(B=-D.node()?.getBBox().width/2||0,c.selectAll("text").each(function(j,W,K){window.getComputedStyle(K[W]).textAnchor==="middle"&&(B=0)})),D.attr("transform",`translate(${B}, ${P})`)}),l.members.length>0||l.methods.length>0||p){const I=$+R+S+o,A=m.line(z.x,I,z.x+z.width,I+.001,y);c.insert(()=>A).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",u)}if(p||l.members.length>0||l.methods.length>0){const I=$+R+U+S+a*2+o,A=m.line(z.x,k?Math.max(X,I):I,z.x+z.width,(k?Math.max(X,I):I)+.001,y);c.insert(()=>A).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",u)}if(l.look!=="handDrawn"&&c.selectAll("path").attr("style",u),T.select(":nth-child(2)").attr("style",u),c.selectAll(".divider").select("path").attr("style",u),t.labelStyle?c.selectAll("span").attr("style",t.labelStyle):c.selectAll("span").attr("style",u),!n){const I=RegExp(/color\s*:\s*([^;]*)/),A=I.exec(u);if(A){const M=A[0].replace("color","fill");c.selectAll("tspan").attr("style",M)}else if(d){const M=I.exec(d);if(M){const D=M[0].replace("color","fill");c.selectAll("tspan").attr("style",D)}}}return st(t,T),t.intersect=function(I){return J.rect(t,I)},c}g(sy,"classBox");async function oy(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const s=t,o=t,a=20,n=20,l="verifyMethod"in t,c=nt(t),{themeVariables:h}=xt(),{borderColorArray:d,requirementEdgeLabelBackground:f}=h,u=e.insert("g").attr("class",c).attr("id",t.domId??t.id);let p;l?p=await Ee(u,`&lt;&lt;${s.type}&gt;&gt;`,0,t.labelStyle):p=await Ee(u,"&lt;&lt;Element&gt;&gt;",0,t.labelStyle);let m=p;const y=await Ee(u,s.name,m,t.labelStyle+"; font-weight: bold;");if(m+=y+n,l){const z=await Ee(u,`${s.requirementId?`ID: ${s.requirementId}`:""}`,m,t.labelStyle);m+=z;const $=await Ee(u,`${s.text?`Text: ${s.text}`:""}`,m,t.labelStyle);m+=$;const R=await Ee(u,`${s.risk?`Risk: ${s.risk}`:""}`,m,t.labelStyle);m+=R,await Ee(u,`${s.verifyMethod?`Verification: ${s.verifyMethod}`:""}`,m,t.labelStyle)}else{const z=await Ee(u,`${o.type?`Type: ${o.type}`:""}`,m,t.labelStyle);m+=z,await Ee(u,`${o.docRef?`Doc Ref: ${o.docRef}`:""}`,m,t.labelStyle)}const x=(u.node()?.getBBox().width??200)+a,C=(u.node()?.getBBox().height??200)+a,k=-x/2,v=-C/2,S=et.svg(u),_=tt(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const L=S.rectangle(k,v,x,C,_),T=u.insert(()=>L,":first-child");if(T.attr("class","basic label-container outer-path").attr("style",i),d?.length){const z=t.colorIndex??0;u.attr("data-color-id",`color-${z%d.length}`)}if(u.selectAll(".label").each((z,$,R)=>{const U=pt(R[$]),X=U.attr("transform");let I=0,A=0;if(X){const E=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(X);E&&(I=parseFloat(E[1]),A=parseFloat(E[2]))}const M=A-C/2;let D=k+a/2;($===0||$===1)&&(D=I),U.attr("transform",`translate(${D}, ${M+a})`)}),m>p+y+n){const z=v+p+y+n;let $;if(t.look==="neo"){const X=[[k,z],[k+x,z],[k+x,z+.001],[k,z+.001]];$=S.polygon(X,_)}else $=S.line(k,z,k+x,z,_);u.insert(()=>$).attr("class","divider")}return st(t,T),t.intersect=function(z){return J.rect(t,z)},i&&t.look!=="handDrawn"&&(f||d?.length)&&u.selectAll("path").attr("style",i),u}g(oy,"requirementBox");async function Ee(e,t,r,i=""){if(t==="")return 0;const s=e.insert("g").attr("class","label").attr("style",i),o=xt(),a=o.htmlLabels??!0,n=await Le(s,hl(nr(t)),{width:Ie(t,o)+50,classes:"markdown-node-label",useHtmlLabels:a,style:i},o);let l;if(a){const c=n.children[0],h=pt(n);l=c.getBoundingClientRect(),h.attr("width",l.width),h.attr("height",l.height)}else{const c=n.children[0];for(const h of c.children)i&&h.setAttribute("style",i);l=n.getBBox(),l.height+=6}return s.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}g(Ee,"addText");var b_=g(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function ay(e,t,{config:r}){const{labelStyles:i,nodeStyles:s}=it(t);t.labelStyle=i||"";const o=10,a=t.width;t.width=(t.width??200)-10;const{shapeSvg:n,bbox:l,label:c}=await lt(e,t,nt(t)),h=t.padding||10;let d="",f;"ticket"in t&&t.ticket&&r?.kanban?.ticketBaseUrl&&(d=r?.kanban?.ticketBaseUrl.replace("#TICKET#",t.ticket),f=n.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",d).attr("target","_blank"));const u={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let p,m;f?{label:p,bbox:m}=await Ma(f,"ticket"in t&&t.ticket||"",u):{label:p,bbox:m}=await Ma(n,"ticket"in t&&t.ticket||"",u);const{label:y,bbox:x}=await Ma(n,"assigned"in t&&t.assigned||"",u);t.width=a;const C=10,k=t?.width||0,v=Math.max(m.height,x.height)/2,S=Math.max(l.height+C*2,t?.height||0)+v,_=-k/2,L=-S/2;c.attr("transform","translate("+(h-k/2)+", "+(-v-l.height/2)+")"),p.attr("transform","translate("+(h-k/2)+", "+(-v+l.height/2)+")"),y.attr("transform","translate("+(h+k/2-x.width-2*o)+", "+(-v+l.height/2)+")");let T;const{rx:z,ry:$}=t,{cssStyles:R}=t;if(t.look==="handDrawn"){const U=et.svg(n),X=tt(t,{}),I=z||$?U.path(cr(_,L,k,S,z||0),X):U.rectangle(_,L,k,S,X);T=n.insert(()=>I,":first-child"),T.attr("class","basic label-container").attr("style",R||null)}else{T=n.insert("rect",":first-child"),T.attr("class","basic label-container __APA__").attr("style",s).attr("rx",z??5).attr("ry",$??5).attr("x",_).attr("y",L).attr("width",k).attr("height",S);const U="priority"in t&&t.priority;if(U){const X=n.append("line"),I=_+2,A=L+Math.floor((z??0)/2),M=L+S-Math.floor((z??0)/2);X.attr("x1",I).attr("y1",A).attr("x2",I).attr("y2",M).attr("stroke-width","4").attr("stroke",b_(U))}}return st(t,T),t.height=S,t.intersect=function(U){return J.rect(t,U)},n}g(ay,"kanbanItem");async function ny(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,halfPadding:a,label:n}=await lt(e,t,nt(t)),l=o.width+10*a,c=o.height+8*a,h=.15*l,{cssStyles:d}=t,f=o.width+20,u=o.height+20,p=Math.max(l,f),m=Math.max(c,u);n.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`);let y;const x=`M0 0
242
+ a${h},${h} 1 0,0 ${p*.25},${-1*m*.1}
243
+ a${h},${h} 1 0,0 ${p*.25},0
244
+ a${h},${h} 1 0,0 ${p*.25},0
245
+ a${h},${h} 1 0,0 ${p*.25},${m*.1}
246
+
247
+ a${h},${h} 1 0,0 ${p*.15},${m*.33}
248
+ a${h*.8},${h*.8} 1 0,0 0,${m*.34}
249
+ a${h},${h} 1 0,0 ${-1*p*.15},${m*.33}
250
+
251
+ a${h},${h} 1 0,0 ${-1*p*.25},${m*.15}
252
+ a${h},${h} 1 0,0 ${-1*p*.25},0
253
+ a${h},${h} 1 0,0 ${-1*p*.25},0
254
+ a${h},${h} 1 0,0 ${-1*p*.25},${-1*m*.15}
255
+
256
+ a${h},${h} 1 0,0 ${-1*p*.1},${-1*m*.33}
257
+ a${h*.8},${h*.8} 1 0,0 0,${-1*m*.34}
258
+ a${h},${h} 1 0,0 ${p*.1},${-1*m*.33}
259
+ H0 V0 Z`;if(t.look==="handDrawn"){const C=et.svg(s),k=tt(t,{}),v=C.path(x,k);y=s.insert(()=>v,":first-child"),y.attr("class","basic label-container").attr("style",Ht(d))}else y=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",x);return y.attr("transform",`translate(${-p/2}, ${-m/2})`),st(t,y),t.calcIntersect=function(C,k){return J.rect(C,k)},t.intersect=function(C){return G.info("Bang intersect",t,C),J.rect(t,C)},s}g(ny,"bang");async function ly(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,halfPadding:a,label:n}=await lt(e,t,nt(t)),l=o.width+2*a,c=o.height+2*a,h=.15*l,d=.25*l,f=.35*l,u=.2*l,{cssStyles:p}=t;let m;const y=`M0 0
260
+ a${h},${h} 0 0,1 ${l*.25},${-1*l*.1}
261
+ a${f},${f} 1 0,1 ${l*.4},${-1*l*.1}
262
+ a${d},${d} 1 0,1 ${l*.35},${l*.2}
263
+
264
+ a${h},${h} 1 0,1 ${l*.15},${c*.35}
265
+ a${u},${u} 1 0,1 ${-1*l*.15},${c*.65}
266
+
267
+ a${d},${h} 1 0,1 ${-1*l*.25},${l*.15}
268
+ a${f},${f} 1 0,1 ${-1*l*.5},0
269
+ a${h},${h} 1 0,1 ${-1*l*.25},${-1*l*.15}
270
+
271
+ a${h},${h} 1 0,1 ${-1*l*.1},${-1*c*.35}
272
+ a${u},${u} 1 0,1 ${l*.1},${-1*c*.65}
273
+ H0 V0 Z`;if(t.look==="handDrawn"){const x=et.svg(s),C=tt(t,{}),k=x.path(y,C);m=s.insert(()=>k,":first-child"),m.attr("class","basic label-container").attr("style",Ht(p))}else m=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",y);return n.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),m.attr("transform",`translate(${-l/2}, ${-c/2})`),st(t,m),t.calcIntersect=function(x,C){return J.rect(x,C)},t.intersect=function(x){return G.info("Cloud intersect",t,x),J.rect(t,x)},s}g(ly,"cloud");async function hy(e,t){const{labelStyles:r,nodeStyles:i}=it(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,halfPadding:a,label:n}=await lt(e,t,nt(t)),l=o.width+8*a,c=o.height+2*a,h=5,d=t.look==="neo"?`
274
+ M${-l/2} ${c/2-h}
275
+ v${-c+2*h}
276
+ q0,-${h} ${h},-${h}
277
+ h${l-2*h}
278
+ q${h},0 ${h},${h}
279
+ v${c-h}
280
+ H${-l/2}
281
+ Z
282
+ `:`
283
+ M${-l/2} ${c/2-h}
284
+ v${-c+2*h}
285
+ q0,-${h} ${h},-${h}
286
+ h${l-2*h}
287
+ q${h},0 ${h},${h}
288
+ v${c-2*h}
289
+ q0,${h} ${-h},${h}
290
+ h${-(l-2*h)}
291
+ q${-h},0 ${-h},${-h}
292
+ Z
293
+ `;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const f=s.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",d);return s.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",c/2).attr("x2",l/2).attr("y2",c/2),n.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),s.append(()=>n.node()),st(t,f),t.calcIntersect=function(u,p){return J.rect(u,p)},t.intersect=function(u){return J.rect(t,u)},s}g(hy,"defaultMindmapNode");async function cy(e,t){const r={padding:t.padding??0};return eh(e,t,r)}g(cy,"mindmapCircle");var k_=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:zm},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Dm},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Wm},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Um},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:cm},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:dm},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:eh},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:ny},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:ly},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Im},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:xm},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Lm},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Bm},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Km},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:Tm},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:fm},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Vm},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:rm},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Nm},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Ym},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Hm},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:mm},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Cm},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:am},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:nm},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:lm},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Fm},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:ty},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:ym},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Zm},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Em},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:hm},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:um},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Jm},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:ry},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:gm},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Qm},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:pm},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:qm},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:$m},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Am},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:em},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:om},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Gm},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Xm},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:ey},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Rm},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Mm}],w_=g(()=>{const t=[...Object.entries({state:jm,choice:im,note:Om,rectWithTitle:Pm,labelRect:_m,iconSquare:Sm,iconCircle:km,icon:bm,iconRounded:wm,imageSquare:vm,anchor:Jp,kanbanItem:ay,mindmapCircle:cy,defaultMindmapNode:hy,classBox:sy,erBox:rh,requirementBox:oy}),...k_.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(s=>[s,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),dy=w_();function uy(e){return e in dy}g(uy,"isValidShape");var oa=new Map;async function ih(e,t,r){let i,s;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const o=t.shape?dy[t.shape]:void 0;if(!o)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let a;r.config.securityLevel==="sandbox"?a="_top":t.linkTarget&&(a=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",a??null),s=await o(i,t,r)}else s=await o(e,t,r),i=s;return i.attr("data-look",Ht(t.look)),t.tooltip&&s.attr("title",t.tooltip),oa.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}g(ih,"insertNode");var S_=g((e,t)=>{oa.set(t.id,e)},"setNodeElem"),v_=g(()=>{oa.clear()},"clear"),T_=g(e=>{const t=oa.get(e.id);G.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},"positionNode"),jr=g((e,t)=>{if(t)return"translate("+-e.width/2+", "+-e.height/2+")";const r=e.x??0,i=e.y??0;return"translate("+-(r+e.width/2)+", "+-(i+e.height/2)+")"},"computeLabelTransform"),Gt={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},Nc={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function Xi(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=_t(e),t=_t(t);const[r,i]=[e.x,e.y],[s,o]=[t.x,t.y],a=s-r,n=o-i;return{angle:Math.atan(n/a),deltaX:a,deltaY:n}}g(Xi,"calculateDeltaAndAngle");var _t=g(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),fy=g(e=>({x:g(function(t,r,i){let s=0;const o=_t(i[0]).x<_t(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Gt,e.arrowTypeStart)){const{angle:u,deltaX:p}=Xi(i[0],i[1]);s=Gt[e.arrowTypeStart]*Math.cos(u)*(p>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Gt,e.arrowTypeEnd)){const{angle:u,deltaX:p}=Xi(i[i.length-1],i[i.length-2]);s=Gt[e.arrowTypeEnd]*Math.cos(u)*(p>=0?1:-1)}const a=Math.abs(_t(t).x-_t(i[i.length-1]).x),n=Math.abs(_t(t).y-_t(i[i.length-1]).y),l=Math.abs(_t(t).x-_t(i[0]).x),c=Math.abs(_t(t).y-_t(i[0]).y),h=Gt[e.arrowTypeStart],d=Gt[e.arrowTypeEnd],f=1;if(a<d&&a>0&&n<d){let u=d+f-a;u*=o==="right"?-1:1,s-=u}if(l<h&&l>0&&c<h){let u=h+f-l;u*=o==="right"?-1:1,s+=u}return _t(t).x+s},"x"),y:g(function(t,r,i){let s=0;const o=_t(i[0]).y<_t(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Gt,e.arrowTypeStart)){const{angle:u,deltaY:p}=Xi(i[0],i[1]);s=Gt[e.arrowTypeStart]*Math.abs(Math.sin(u))*(p>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Gt,e.arrowTypeEnd)){const{angle:u,deltaY:p}=Xi(i[i.length-1],i[i.length-2]);s=Gt[e.arrowTypeEnd]*Math.abs(Math.sin(u))*(p>=0?1:-1)}const a=Math.abs(_t(t).y-_t(i[i.length-1]).y),n=Math.abs(_t(t).x-_t(i[i.length-1]).x),l=Math.abs(_t(t).y-_t(i[0]).y),c=Math.abs(_t(t).x-_t(i[0]).x),h=Gt[e.arrowTypeStart],d=Gt[e.arrowTypeEnd],f=1;if(a<d&&a>0&&n<d){let u=d+f-a;u*=o==="up"?-1:1,s-=u}if(l<h&&l>0&&c<h){let u=h+f-l;u*=o==="up"?-1:1,s+=u}return _t(t).y+s},"y")}),"getLineFunctionsWithOffset"),__=g((e,t,r,i,s,o=!1,a)=>{t.arrowTypeStart&&qc(e,"start",t.arrowTypeStart,r,i,s,o,a),t.arrowTypeEnd&&qc(e,"end",t.arrowTypeEnd,r,i,s,o,a)},"addEdgeMarkers"),B_={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},L_=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],qc=g((e,t,r,i,s,o,a=!1,n)=>{const l=B_[r],c=l&&L_.includes(l.type);if(!l){G.warn(`Unknown arrow type: ${r}`);return}const h=l.type,u=`${s}_${o}-${h}${t==="start"?"Start":"End"}${a&&c?"-margin":""}`;if(n&&n.trim()!==""){const p=n.replace(/[^\dA-Za-z]/g,"_"),m=`${u}_${p}`;if(!document.getElementById(m)){const y=document.getElementById(u);if(y){const x=y.cloneNode(!0);x.id=m,x.querySelectorAll("path, circle, line").forEach(k=>{k.setAttribute("stroke",n),l.fill&&k.setAttribute("fill",n)}),y.parentNode?.appendChild(x)}}e.attr(`marker-${t}`,`url(${i}#${m})`)}else e.attr(`marker-${t}`,`url(${i}#${u})`)},"addEdgeMarker"),F_=g(e=>typeof e=="string"?e:xt()?.flowchart?.curve,"resolveEdgeCurveType"),ds=new Map,jt=new Map,E_=g(()=>{ds.clear(),jt.clear()},"clear"),Di=g(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),gy=g(async(e,t)=>{const r=xt();let i=Qt(r);const{labelStyles:s}=it(t);t.labelStyle=s;const o=e.insert("g").attr("class","edgeLabel"),a=o.insert("g").attr("class","label").attr("data-id",t.id),n=t.labelType==="markdown",c=await Le(e,t.label,{style:Di(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:n,width:n?void 0:void 0},r);a.node().appendChild(c),G.info("abc82",t,t.labelType);let h=c.getBBox(),d=h;if(i){const u=c.children[0],p=pt(c);h=u.getBoundingClientRect(),d=h,p.attr("width",h.width),p.attr("height",h.height)}else{const u=pt(c).select("text").node();u&&typeof u.getBBox=="function"&&(d=u.getBBox())}a.attr("transform",jr(d,i)),ds.set(t.id,o),t.width=h.width,t.height=h.height;let f;if(t.startLabelLeft){const u=e.insert("g").attr("class","edgeTerminals"),p=u.insert("g").attr("class","inner"),m=await er(p,t.startLabelLeft,Di(t.labelStyle)||"",!1,!1);f=m;let y=m.getBBox();if(i){const x=m.children[0],C=pt(m);y=x.getBoundingClientRect(),C.attr("width",y.width),C.attr("height",y.height)}p.attr("transform",jr(y,i)),jt.get(t.id)||jt.set(t.id,{}),jt.get(t.id).startLeft=u,Gi(f,t.startLabelLeft)}if(t.startLabelRight){const u=e.insert("g").attr("class","edgeTerminals"),p=u.insert("g").attr("class","inner"),m=await er(p,t.startLabelRight,Di(t.labelStyle)||"",!1,!1);f=m;let y=m.getBBox();if(i){const x=m.children[0],C=pt(m);y=x.getBoundingClientRect(),C.attr("width",y.width),C.attr("height",y.height)}p.attr("transform",jr(y,i)),jt.get(t.id)||jt.set(t.id,{}),jt.get(t.id).startRight=u,Gi(f,t.startLabelRight)}if(t.endLabelLeft){const u=e.insert("g").attr("class","edgeTerminals"),p=u.insert("g").attr("class","inner"),m=await er(u,t.endLabelLeft,Di(t.labelStyle)||"",!1,!1);f=m;let y=m.getBBox();if(i){const x=m.children[0],C=pt(m);y=x.getBoundingClientRect(),C.attr("width",y.width),C.attr("height",y.height)}p.attr("transform",jr(y,i)),jt.get(t.id)||jt.set(t.id,{}),jt.get(t.id).endLeft=u,Gi(f,t.endLabelLeft)}if(t.endLabelRight){const u=e.insert("g").attr("class","edgeTerminals"),p=u.insert("g").attr("class","inner"),m=await er(u,t.endLabelRight,Di(t.labelStyle)||"",!1,!1);f=m;let y=m.getBBox();if(i){const x=m.children[0],C=pt(m);y=x.getBoundingClientRect(),C.attr("width",y.width),C.attr("height",y.height)}p.attr("transform",jr(y,i)),jt.get(t.id)||jt.set(t.id,{}),jt.get(t.id).endRight=u,Gi(f,t.endLabelRight)}return c},"insertEdgeLabel");function Gi(e,t){Qt(xt())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}g(Gi,"setTerminalWidth");var py=g((e,t)=>{G.debug("Moving label abc88 ",e.id,e.label,ds.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=xt(),{subGraphTitleTotalMargin:s}=Jo(i);if(e.label){const o=ds.get(e.id);let a=e.x,n=e.y;if(r){const l=ge.calcLabelPosition(r);G.debug("Moving label "+e.label+" from (",a,",",n,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(a=l.x,n=l.y)}o.attr("transform",`translate(${a}, ${n+s/2})`)}if(e.startLabelLeft){const o=jt.get(e.id).startLeft;let a=e.x,n=e.y;if(r){const l=ge.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.startLabelRight){const o=jt.get(e.id).startRight;let a=e.x,n=e.y;if(r){const l=ge.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelLeft){const o=jt.get(e.id).endLeft;let a=e.x,n=e.y;if(r){const l=ge.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelRight){const o=jt.get(e.id).endRight;let a=e.x,n=e.y;if(r){const l=ge.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}},"positionEdgeLabel"),M_=g((e,t)=>{if(!e?.isLabelEdge||!e?.id?.endsWith("-to-label")||!Array.isArray(t)||t.length!==2)return t;const[r,i]=t,s=Math.abs(i.x-r.x),o=Math.abs(i.y-r.y);return s<.001||o<.001?t:o>=s?[r,{x:r.x,y:i.y},i]:[r,{x:i.x,y:r.y},i]},"orthogonalizeToLabelClippedPoints"),A_=g((e,t)=>{const r=e.x,i=e.y,s=Math.abs(t.x-r),o=Math.abs(t.y-i),a=e.width/2,n=e.height/2;return s>=a||o>=n},"outsideNode"),$_=g((e,t,r)=>{G.debug(`intersection calc abc89:
294
+ outsidePoint: ${JSON.stringify(t)}
295
+ insidePoint : ${JSON.stringify(r)}
296
+ node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,s=e.y,o=Math.abs(i-r.x),a=e.width/2;let n=r.x<t.x?a-o:a+o;const l=e.height/2,c=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(s-t.y)*a>Math.abs(i-t.x)*l){let d=r.y<t.y?t.y-l-s:s-l-t.y;n=h*d/c;const f={x:r.x<t.x?r.x+n:r.x-h+n,y:r.y<t.y?r.y+c-d:r.y-c+d};return n===0&&(f.x=t.x,f.y=t.y),h===0&&(f.x=t.x),c===0&&(f.y=t.y),G.debug(`abc89 top/bottom calc, Q ${c}, q ${d}, R ${h}, r ${n}`,f),f}else{r.x<t.x?n=t.x-a-i:n=i-a-t.x;let d=c*n/h,f=r.x<t.x?r.x+h-n:r.x-h+n,u=r.y<t.y?r.y+d:r.y-d;return G.debug(`sides calc abc89, Q ${c}, q ${d}, R ${h}, r ${n}`,{_x:f,_y:u}),n===0&&(f=t.x,u=t.y),h===0&&(f=t.x),c===0&&(u=t.y),{x:f,y:u}}},"intersection"),zc=g((e,t)=>{G.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],s=!1;return e.forEach(o=>{if(G.info("abc88 checking point",o,t),!A_(t,o)&&!s){const a=$_(t,i,o);G.debug("abc88 inside",o,i,a),G.debug("abc88 intersection",a,t);let n=!1;r.forEach(l=>{n=n||l.x===a.x&&l.y===a.y}),r.some(l=>l.x===a.x&&l.y===a.y)?G.warn("abc88 no intersect",a,r):r.push(a),s=!0}else G.warn("abc88 outside",o,i),i=o,s||r.push(o)}),G.debug("returning points",r),r},"cutPathAtIntersect");function my(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const s=e[i-1],o=e[i],a=e[i+1];(s.x===o.x&&o.y===a.y&&Math.abs(o.x-a.x)>5&&Math.abs(o.y-s.y)>5||s.y===o.y&&o.x===a.x&&Math.abs(o.x-s.x)>5&&Math.abs(o.y-a.y)>5)&&(t.push(o),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}g(my,"extractCornerPoints");var Wc=g(function(e,t,r){const i=t.x-e.x,s=t.y-e.y,o=Math.sqrt(i*i+s*s),a=r/o;return{x:t.x-a*i,y:t.y-a*s}},"findAdjacentPoint"),O_=g(function(e){const{cornerPointPositions:t}=my(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const s=e[i-1],o=e[i+1],a=e[i],n=Wc(s,a,5),l=Wc(o,a,5),c=l.x-n.x,h=l.y-n.y;r.push(n);const d=Math.sqrt(2)*2;let f={x:a.x,y:a.y};if(Math.abs(o.x-s.x)>10&&Math.abs(o.y-s.y)>=10){G.debug("Corner point fixing",Math.abs(o.x-s.x),Math.abs(o.y-s.y));const u=5;a.x===n.x?f={x:c<0?n.x-u+d:n.x+u-d,y:h<0?n.y-d:n.y+d}:f={x:c<0?n.x-d:n.x+d,y:h<0?n.y-u+d:n.y+u-d}}else G.debug("Corner point skipping fixing",Math.abs(o.x-s.x),Math.abs(o.y-s.y));r.push(f,l)}else r.push(e[i]);return r},"fixCorners"),I_=g((e,t,r)=>{const i=e-t-r,s=2,o=2,a=s+o,n=Math.floor(i/a),l=Array(n).fill(`${s} ${o}`).join(" ");return`0 ${t} ${l} ${r}`},"generateDashArray"),yy=g(function(e,t,r,i,s,o,a,n=!1){if(!a)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:l,layout:c}=xt();let h=t.points,d=!1;const f=s;var u=o;const p=[];for(const O in t.cssCompiledStyles)Fl(O)||p.push(t.cssCompiledStyles[O]);if(c==="swimlane"){if(u.intersect&&f.intersect&&Array.isArray(h)&&h.length>=2)if(h.length===2)h=[f.intersect(h[0]),u.intersect(h[1])];else{const O=h.slice(1,-1),E=O[0],P=O[O.length-1],B=.5,j=Math.abs(h[h.length-1].x-P.x)<B&&Math.abs(h[h.length-1].y-P.y)<B,W=f.intersect(E),K=j?P:u.intersect(P),Y=Math.abs(K.x-P.x)<B&&Math.abs(K.y-P.y)<B,V=Math.abs(W.x-E.x)<B&&Math.abs(W.y-E.y)<B?[]:[W],rt=Y?[]:[K];h=[...V,...O,...rt]}h=M_(t,h)}else u.intersect&&f.intersect&&!n&&(h=h.slice(1,t.points.length-1),h.unshift(f.intersect(h[0])),h.push(u.intersect(h[h.length-1])));const m=btoa(JSON.stringify(h));t.toCluster&&(G.info("to cluster abc88",r.get(t.toCluster)),h=zc(t.points,r.get(t.toCluster).node),d=!0),t.fromCluster&&(G.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(h,null,2)),h=zc(h.reverse(),r.get(t.fromCluster).node).reverse(),d=!0);let y=h.filter(O=>!Number.isNaN(O.y));const x=F_(t.curve);x!=="rounded"&&(y=O_(y));let C=Qi;switch(x){case"linear":C=Qi;break;case"basis":C=mo;break;case"cardinal":C=Eu;break;case"bumpX":C=Tu;break;case"bumpY":C=_u;break;case"catmullRom":C=Au;break;case"monotoneX":C=Du;break;case"monotoneY":C=Nu;break;case"natural":C=zu;break;case"step":C=Wu;break;case"stepAfter":C=Hu;break;case"stepBefore":C=ju;break;case"rounded":C=Qi;break;default:C=mo}const{x:k,y:v}=fy(t),S=Su().x(k).y(v).curve(C);let _;switch(t.thickness){case"normal":_="edge-thickness-normal";break;case"thick":_="edge-thickness-thick";break;case"invisible":_="edge-thickness-invisible";break;default:_="edge-thickness-normal"}switch(t.pattern){case"solid":_+=" edge-pattern-solid";break;case"dotted":_+=" edge-pattern-dotted";break;case"dashed":_+=" edge-pattern-dashed";break;default:_+=" edge-pattern-solid"}let L,T=x==="rounded"?xy(Cy(y,t),5):S(y);const z=Array.isArray(t.style)?t.style:[t.style];let $=z.find(O=>O?.startsWith("stroke:")),R="";t.animate&&(R="edge-animation-fast"),t.animation&&(R="edge-animation-"+t.animation);let U=!1;if(t.look==="handDrawn"){const O=et.svg(e);Object.assign([],y);const E=O.path(T,{roughness:.3,seed:l});_+=" transition",L=pt(E).select("path").attr("id",`${a}-${t.id}`).attr("class"," "+_+(t.classes?" "+t.classes:"")+(R?" "+R:"")).attr("style",z?z.reduce((B,j)=>B+";"+j,""):"");let P=L.attr("d");L.attr("d",P),e.node().appendChild(L.node())}else{const O=p.join(";"),E=z?z.reduce((Y,Z)=>Y+Z+";",""):"",P=(O?O+";"+E+";":E)+";"+(z?z.reduce((Y,Z)=>Y+";"+Z,""):"");L=e.append("path").attr("d",T).attr("id",`${a}-${t.id}`).attr("class"," "+_+(t.classes?" "+t.classes:"")+(R?" "+R:"")).attr("style",P),$=P.match(/stroke:([^;]+)/)?.[1],U=t.animate===!0||!!t.animation||O.includes("animation");const B=L.node(),j=typeof B.getTotalLength=="function"?B.getTotalLength():0,W=Nc[t.arrowTypeStart]||0,K=Nc[t.arrowTypeEnd]||0;if(t.look==="neo"&&!U){const Z=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?I_(j,W,K):`0 ${W} ${j-W-K} ${K}`}; stroke-dashoffset: 0;`;L.attr("style",Z+L.attr("style"))}}L.attr("data-edge",!0),L.attr("data-et","edge"),L.attr("data-id",t.id),L.attr("data-points",m),L.attr("data-look",Ht(t.look)),t.showPoints&&y.forEach(O=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",O.x).attr("cy",O.y)});let X="";(xt().flowchart.arrowMarkerAbsolute||xt().state.arrowMarkerAbsolute)&&(X=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,X=X.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),G.info("arrowTypeStart",t.arrowTypeStart),G.info("arrowTypeEnd",t.arrowTypeEnd);const I=!U&&t?.look==="neo";__(L,t,X,a,i,I,$);const A=Math.floor(h.length/2),M=h[A];ge.isLabelCoordinateInPath(M,L.attr("d"))||(d=!0);let D={};return d&&(D.updatedPath=h),D.originalPath=t.points,D},"insertEdge");function xy(e,t){if(e.length<2)return"";let r="";const i=e.length,s=1e-5;for(let o=0;o<i;o++){const a=e[o],n=e[o-1],l=e[o+1];if(o===0)r+=`M${a.x},${a.y}`;else if(o===i-1)r+=`L${a.x},${a.y}`;else{const c=a.x-n.x,h=a.y-n.y,d=l.x-a.x,f=l.y-a.y,u=Math.hypot(c,h),p=Math.hypot(d,f);if(u<s||p<s){r+=`L${a.x},${a.y}`;continue}const m=c/u,y=h/u,x=d/p,C=f/p,k=m*x+y*C,v=Math.max(-1,Math.min(1,k)),S=Math.acos(v);if(S<s||Math.abs(Math.PI-S)<s){r+=`L${a.x},${a.y}`;continue}const _=Math.min(t/Math.sin(S/2),u/2,p/2),L=a.x-m*_,T=a.y-y*_,z=a.x+x*_,$=a.y+C*_;r+=`L${L},${T}`,r+=`Q${a.x},${a.y} ${z},${$}`}}return r}g(xy,"generateRoundedPath");function Pn(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};const r=t.x-e.x,i=t.y-e.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}g(Pn,"calculateDeltaAndAngle");function Cy(e,t){const r=e.map(s=>({...s}));if(e.length>=2&&Gt[t.arrowTypeStart]){const s=Gt[t.arrowTypeStart],o=e[0],a=e[1],{angle:n}=Pn(o,a),l=s*Math.cos(n),c=s*Math.sin(n);r[0].x=o.x+l,r[0].y=o.y+c}const i=e.length;if(i>=2&&Gt[t.arrowTypeEnd]){const s=Gt[t.arrowTypeEnd],o=e[i-1],a=e[i-2],{angle:n}=Pn(a,o),l=s*Math.cos(n),c=s*Math.sin(n);r[i-1].x=o.x-l,r[i-1].y=o.y-c}return r}g(Cy,"applyMarkerOffsetsToPoints");var R_=g((e,t,r,i)=>{t.forEach(s=>{oB[s](e,r,i)})},"insertMarkers"),P_=g((e,t,r)=>{G.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),e.append("marker").attr("id",r+"_"+t+"-extensionStart-margin").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd-margin").attr("class","marker extension "+t).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),D_=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart-margin").attr("class","marker composition "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd-margin").attr("class","marker composition "+t).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),N_=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart-margin").attr("class","marker aggregation "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd-margin").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),q_=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart-margin").attr("class","marker dependency "+t).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd-margin").attr("class","marker dependency "+t).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),z_=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart-margin").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd-margin").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),W_=g((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),j_=g((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),H_=g((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossEnd-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),e.append("marker").attr("id",r+"_"+t+"-crossStart-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),Y_=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),U_=g((e,t,r)=>{const i=Bt(),{themeVariables:s}=i,{transitionColor:o}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${o}`)},"barbNeo"),X_=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),G_=g((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const s=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),s.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),V_=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),Z_=g((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const s=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),s.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),K_=g((e,t,r)=>{const i=Bt(),{themeVariables:s}=i,{strokeWidth:o}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${o}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${o}`)},"only_one_neo"),Q_=g((e,t,r)=>{const i=Bt(),{themeVariables:s}=i,{strokeWidth:o,mainBkg:a}=s,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");n.append("circle").attr("fill",a??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${o}`).attr("r",6),n.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${o}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");l.append("circle").attr("fill",a??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${o}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${o}`)},"zero_or_one_neo"),J_=g((e,t,r)=>{const i=Bt(),{themeVariables:s}=i,{strokeWidth:o}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${o}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${o}`)},"one_or_more_neo"),tB=g((e,t,r)=>{const i=Bt(),{themeVariables:s}=i,{strokeWidth:o,mainBkg:a}=s,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");n.append("circle").attr("fill",a??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${o}`),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${o}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");l.append("circle").attr("fill",a??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${o}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${o}`)},"zero_or_more_neo"),eB=g((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
297
+ L20,10
298
+ M20,10
299
+ L0,20`)},"requirement_arrow"),rB=g((e,t,r)=>{const i=Bt(),{themeVariables:s}=i,{strokeWidth:o}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${o}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
300
+ L20,10
301
+ M20,10
302
+ L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),iB=g((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),sB=g((e,t,r)=>{const i=Bt(),{themeVariables:s}=i,{strokeWidth:o}=s,a=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");a.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),a.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),a.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),a.selectAll("*").attr("stroke-width",`${o}`)},"requirement_contains_neo"),oB={extension:P_,composition:D_,aggregation:N_,dependency:q_,lollipop:z_,point:W_,circle:j_,cross:H_,barb:Y_,barbNeo:U_,only_one:X_,zero_or_one:G_,one_or_more:V_,zero_or_more:Z_,only_one_neo:K_,zero_or_one_neo:Q_,one_or_more_neo:J_,zero_or_more_neo:tB,requirement_arrow:eB,requirement_contains:iB,requirement_arrow_neo:rB,requirement_contains_neo:sB},by=R_,aB={common:ki,getConfig:Bt,insertCluster:Up,insertEdge:yy,insertEdgeLabel:gy,insertMarkers:by,insertNode:ih,interpolateToCurve:Rl,labelHelper:lt,log:G,positionEdgeLabel:py},us={},ky=g(e=>{for(const t of e)us[t.name]=t},"registerLayoutLoaders"),nB=g(()=>{ky([{name:"dagre",loader:g(async()=>await Promise.resolve().then(()=>require("./dagre-VKFMJZFB-DuneW1hp.cjs")),"loader")},{name:"swimlane",loader:g(async()=>await Promise.resolve().then(()=>require("./swimlanes-5IMT3BWC-BIWoRJar.cjs")),"loader")},{name:"cose-bilkent",loader:g(async()=>await Promise.resolve().then(()=>require("./cose-bilkent-JH36ORCC-Dwf9bYva.cjs")),"loader")}])},"registerDefaultLayoutLoaders");nB();var lB=g(async(e,t,r)=>{if(!(e.layoutAlgorithm in us))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const d of e.nodes){const f=d.domId||d.id;d.domId=`${e.diagramId}-${f}`}const i=us[e.layoutAlgorithm],s=await i.loader(),{theme:o,themeVariables:a}=e.config,{useGradient:n,gradientStart:l,gradientStop:c}=a,h=t.attr("id");if(t.append("defs").append("filter").attr("id",`${h}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${o?.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${h}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${o?.includes("dark")?"#FFFFFF":"#000000"}`),n){const d=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");d.append("svg:stop").attr("offset","0%").attr("stop-color",l).attr("stop-opacity",1),d.append("svg:stop").attr("offset","100%").attr("stop-color",c).attr("stop-opacity",1)}return s.render(e,t,aB,{algorithm:i.algorithm},r)},"render"),hB=g((e="",{fallback:t="dagre"}={})=>{if(e in us)return e;if(t in us)return G.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),sh="comm",wy="rule",Sy="decl",cB="@media",dB="@import",uB="@supports",fB="@namespace",Dn="@keyframes",vy="@layer",gB="@scope",pB=Math.abs,es=String.fromCharCode;function Ty(e){return e.trim()}function Nn(e,t,r){return e.replace(t,r)}function Vr(e,t){return e.charCodeAt(t)|0}function xi(e,t,r){return e.slice(t,r)}function Me(e){return e.length}function _y(e){return e.length}function zs(e,t){return t.push(e),e}var aa=1,Ci=1,By=0,me=0,Rt=0,_i="";function oh(e,t,r,i,s,o,a,n){return{value:e,root:t,parent:r,type:i,props:s,children:o,line:aa,column:Ci,length:a,return:"",siblings:n}}function mB(){return Rt}function yB(){return Rt=me>0?Vr(_i,--me):0,Ci--,Rt===10&&(Ci=1,aa--),Rt}function Te(){return Rt=me<By?Vr(_i,me++):0,Ci++,Rt===10&&(Ci=1,aa++),Rt}function rr(){return Vr(_i,me)}function Js(){return me}function na(e,t){return xi(_i,e,t)}function fs(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function xB(e){return aa=Ci=1,By=Me(_i=e),me=0,[]}function CB(e){return _i="",e}function $a(e){return Ty(na(me-1,qn(e===91?e+2:e===40?e+1:e)))}function bB(e){for(;(Rt=rr())&&Rt<33;)Te();return fs(e)>2||fs(Rt)>3?"":" "}function kB(e,t){for(;--t&&Te()&&!(Rt<48||Rt>102||Rt>57&&Rt<65||Rt>70&&Rt<97););return na(e,Js()+(t<6&&rr()==32&&Te()==32))}function qn(e){for(;Te();)switch(Rt){case e:return me;case 34:case 39:e!==34&&e!==39&&qn(Rt);break;case 40:e===41&&qn(e);break;case 92:Te();break}return me}function wB(e,t){for(;Te()&&e+Rt!==57;)if(e+Rt===84&&rr()===47)break;return"/*"+na(t,me-1)+"*"+es(e===47?e:Te())}function SB(e){for(;!fs(rr());)Te();return na(e,me)}function vB(e){return CB(to("",null,null,null,[""],e=xB(e),0,[0],e))}function to(e,t,r,i,s,o,a,n,l){for(var c=0,h=0,d=a,f=0,u=0,p=0,m=1,y=1,x=1,C=0,k=0,v="",S=s,_=o,L=i,T=v;y;)switch(p=k,k=Te()){case 40:p!=108&&Vr(T,d-1)==58?(C++,T+="("):T+=$a(k);break;case 41:C--,T+=")";break;case 34:case 39:case 91:T+=$a(k);break;case 9:case 10:case 13:case 32:if(C>0){T+=es(k);break}T+=bB(p);break;case 92:T+=kB(Js()-1,7);continue;case 47:switch(rr()){case 42:case 47:zs(TB(wB(Te(),Js()),t,r,l),l),(fs(p||1)==5||fs(rr()||1)==5)&&Me(T)&&xi(T,-1,void 0)!==" "&&(T+=" ");break;default:T+="/"}break;case 123*m:n[c++]=Me(T)*x;case 125*m:case 59:case 0:if(C>0&&k){T+=es(k);break}switch(k){case 0:case 125:y=0;case 59+h:x==-1&&(T=Nn(T,/\f/g,"")),u>0&&(Me(T)-d||m===0)&&zs(u>32?Hc(T+";",i,r,d-1,l):Hc(Nn(T," ","")+";",i,r,d-2,l),l);break;case 59:T+=";";default:if(zs(L=jc(T,t,r,c,h,s,n,v,S=[],_=[],d,o),o),k===123)if(h===0)to(T,t,L,L,S,o,d,n,_);else{switch(f){case 99:if(Vr(T,3)===110)break;case 108:if(Vr(T,2)===97)break;default:h=0;case 100:case 109:case 115:}h?to(e,L,L,i&&zs(jc(e,L,L,0,0,s,n,v,s,S=[],d,_),_),s,_,d,n,i?S:_):to(T,L,L,L,[""],_,0,n,_)}}c=h=u=0,m=x=1,v=T="",d=a;break;case 58:d=1+Me(T),u=p;default:if(m<1){if(k==123)--m;else if(k==125&&m++==0&&yB()==125)continue}switch(T+=es(k),k*m){case 38:x=h>0?1:(T+="\f",-1);break;case 44:if(C>0)break;n[c++]=(Me(T)-1)*x,x=1;break;case 64:rr()===45&&(T+=$a(Te())),f=rr(),h=d=Me(v=T+=SB(Js())),k++;break;case 45:p===45&&Me(T)==2&&(m=0)}}return o}function jc(e,t,r,i,s,o,a,n,l,c,h,d){for(var f=s-1,u=s===0?o:[""],p=_y(u),m=0,y=0,x=0;m<i;++m)for(var C=0,k=xi(e,f+1,f=pB(y=a[m])),v=e;C<p;++C)(v=Ty(y>0?u[C]+" "+k:Nn(k,/&\f/g,u[C])))&&(l[x++]=v);return oh(e,t,r,s===0?wy:n,l,c,h,d)}function TB(e,t,r,i){return oh(e,t,r,sh,es(mB()),xi(e,2,-2),0,i)}function Hc(e,t,r,i,s){return oh(e,t,r,Sy,xi(e,0,i),xi(e,i+1,-1),i,s)}function zn(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function _B(e,t,r,i){switch(e.type){case vy:if(e.children.length)break;case dB:case fB:case Sy:return e.return=e.return||e.value;case sh:return"";case Dn:return e.return=e.value+"{"+zn(e.children,i)+"}";case wy:if(!Me(e.value=e.props.join(",")))return""}return Me(r=zn(e.children,i))?e.return=e.value+"{"+r+"}":""}function BB(e){var t=_y(e);return function(r,i,s,o){for(var a="",n=0;n<t;n++)a+=e[n](r,i,s,o)||"";return a}}var Ly="c4",LB=g(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),FB=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./c4Diagram-LMCZKHZV-BbuZbR8I.cjs"));return{id:Ly,diagram:e}},"loader"),EB={id:Ly,detector:LB,loader:FB},MB=EB,Fy="flowchart",AB=g((e,t)=>t?.flowchart?.defaultRenderer==="dagre-wrapper"||t?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),$B=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-23GEKE2U-D3VUCGjn.cjs"));return{id:Fy,diagram:e}},"loader"),OB={id:Fy,detector:AB,loader:$B},IB=OB,Ey="flowchart-v2",RB=g((e,t)=>t?.flowchart?.defaultRenderer==="dagre-d3"?!1:(t?.flowchart?.defaultRenderer==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(e)),"detector"),PB=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-23GEKE2U-D3VUCGjn.cjs"));return{id:Ey,diagram:e}},"loader"),DB={id:Ey,detector:RB,loader:PB},NB=DB,My="swimlane",qB=g(e=>/^\s*swimlane-beta\b/.test(e),"detector"),zB=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./swimlanesDiagram-G3AALYLV-BKJ-xuX7.cjs"));return{id:My,diagram:e}},"loader"),WB={id:My,detector:qB,loader:zB},jB=WB,Ay="er",HB=g(e=>/^\s*erDiagram/.test(e),"detector"),YB=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./erDiagram-Q63AITRT-CQ9Q6fWy.cjs"));return{id:Ay,diagram:e}},"loader"),UB={id:Ay,detector:HB,loader:YB},XB=UB,$y="gitGraph",GB=g(e=>/^\s*gitGraph/.test(e),"detector"),VB=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./gitGraphDiagram-IHSO6WYX-CN12KReP.cjs"));return{id:$y,diagram:e}},"loader"),ZB={id:$y,detector:GB,loader:VB},KB=ZB,Oy="gantt",QB=g(e=>/^\s*gantt/.test(e),"detector"),JB=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./ganttDiagram-NO4QXBWP-CxK0RSqW.cjs"));return{id:Oy,diagram:e}},"loader"),tL={id:Oy,detector:QB,loader:JB},eL=tL,Iy="info",rL=g(e=>/^\s*info/.test(e),"detector"),iL=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./infoDiagram-FWYZ7A6U-k83LxwrO.cjs"));return{id:Iy,diagram:e}},"loader"),sL={id:Iy,detector:rL,loader:iL},Ry="pie",oL=g(e=>/^\s*pie/.test(e),"detector"),aL=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./pieDiagram-ENE6RG2P-Bg4RGsL0.cjs"));return{id:Ry,diagram:e}},"loader"),nL={id:Ry,detector:oL,loader:aL},Py="quadrantChart",lL=g(e=>/^\s*quadrantChart/.test(e),"detector"),hL=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./quadrantDiagram-ABIIQ3AL-B3io0Zj4.cjs"));return{id:Py,diagram:e}},"loader"),cL={id:Py,detector:lL,loader:hL},dL=cL,Dy="xychart",uL=g(e=>/^\s*xychart(-beta)?/.test(e),"detector"),fL=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./xychartDiagram-FW5EYKEG-CDQbUs0H.cjs"));return{id:Dy,diagram:e}},"loader"),gL={id:Dy,detector:uL,loader:fL},pL=gL,Ny="requirement",mL=g(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),yL=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./requirementDiagram-TGXJPOKE-4iI6cUK1.cjs"));return{id:Ny,diagram:e}},"loader"),xL={id:Ny,detector:mL,loader:yL},CL=xL,qy="sequence",bL=g(e=>/^\s*sequenceDiagram/.test(e),"detector"),kL=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./sequenceDiagram-DBY2YBRQ-4nhGxKJK.cjs"));return{id:qy,diagram:e}},"loader"),wL={id:qy,detector:bL,loader:kL},SL=wL,zy="class",vL=g((e,t)=>t?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),TL=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./classDiagram-OUVF2IWQ-D2U1rWVc.cjs"));return{id:zy,diagram:e}},"loader"),_L={id:zy,detector:vL,loader:TL},BL=_L,Wy="classDiagram",LL=g((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),FL=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./classDiagram-v2-EOCWNBFH-D2U1rWVc.cjs"));return{id:Wy,diagram:e}},"loader"),EL={id:Wy,detector:LL,loader:FL},ML=EL,jy="state",AL=g((e,t)=>t?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),$L=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./stateDiagram-2N3HPSRC-Ds2EuiOJ.cjs"));return{id:jy,diagram:e}},"loader"),OL={id:jy,detector:AL,loader:$L},IL=OL,Hy="stateDiagram",RL=g((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer==="dagre-wrapper"),"detector"),PL=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./stateDiagram-v2-6OUMAXLB-DRUVmXUz.cjs"));return{id:Hy,diagram:e}},"loader"),DL={id:Hy,detector:RL,loader:PL},NL=DL,Yy="journey",qL=g(e=>/^\s*journey/.test(e),"detector"),zL=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./journeyDiagram-5HDEW3XC-CbcL76rx.cjs"));return{id:Yy,diagram:e}},"loader"),WL={id:Yy,detector:qL,loader:zL},jL=WL,HL=g((e,t,r)=>{G.debug(`rendering svg for syntax error
303
+ `);const i=Yu(t),s=i.append("g");i.attr("viewBox","0 0 2412 512"),il(i,100,512,!0),s.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),s.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),s.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),s.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),s.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),s.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),s.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),s.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),Uy={draw:HL},YL=Uy,UL={db:{},renderer:Uy,parser:{parse:g(()=>{},"parse")}},XL=UL,Xy="flowchart-elk",GL=g((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer==="elk"?(t.layout="elk",!0):!1,"detector"),VL=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-23GEKE2U-D3VUCGjn.cjs"));return{id:Xy,diagram:e}},"loader"),ZL={id:Xy,detector:GL,loader:VL},KL=ZL,Gy="timeline",QL=g(e=>/^\s*timeline/.test(e),"detector"),JL=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./timeline-definition-FHXFAJF6-BZUlhY1Z.cjs"));return{id:Gy,diagram:e}},"loader"),tF={id:Gy,detector:QL,loader:JL},eF=tF,Vy="mindmap",rF=g(e=>/^\s*mindmap/.test(e),"detector"),iF=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./mindmap-definition-LN4V7U3C-CEitacUY.cjs"));return{id:Vy,diagram:e}},"loader"),sF={id:Vy,detector:rF,loader:iF},oF=sF,Zy="kanban",aF=g(e=>/^\s*kanban/.test(e),"detector"),nF=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./kanban-definition-HUTT4EX6-BNO2VHFH.cjs"));return{id:Zy,diagram:e}},"loader"),lF={id:Zy,detector:aF,loader:nF},hF=lF,Ky="sankey",cF=g(e=>/^\s*sankey(-beta)?/.test(e),"detector"),dF=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./sankeyDiagram-HTMAVEWB-Cu9APNc7.cjs"));return{id:Ky,diagram:e}},"loader"),uF={id:Ky,detector:cF,loader:dF},fF=uF,Qy="packet",gF=g(e=>/^\s*packet(-beta)?/.test(e),"detector"),pF=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-NH7WQ7WH-CJ5N1ivv.cjs"));return{id:Qy,diagram:e}},"loader"),mF={id:Qy,detector:gF,loader:pF},Jy="radar",yF=g(e=>/^\s*radar-beta/.test(e),"detector"),xF=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-WEI45ONY-QLDnHl3R.cjs"));return{id:Jy,diagram:e}},"loader"),CF={id:Jy,detector:yF,loader:xF},t0="block",bF=g(e=>/^\s*block(-beta)?/.test(e),"detector"),kF=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./blockDiagram-677ZJIJ3-ChRokBD8.cjs"));return{id:t0,diagram:e}},"loader"),wF={id:t0,detector:bF,loader:kF},SF=wF,e0="treeView",vF=g(e=>/^\s*treeView-beta/.test(e),"detector"),TF=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-OA4YK3LP-DgT93Vwf.cjs"));return{id:e0,diagram:e}},"loader"),_F={id:e0,detector:vF,loader:TF},BF=_F,r0="architecture",LF=g(e=>/^\s*architecture/.test(e),"detector"),FF=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./architectureDiagram-ZJ3FMSHR-G8H1xynt.cjs"));return{id:r0,diagram:e}},"loader"),EF={id:r0,detector:LF,loader:FF},MF=EF,i0="eventmodeling",AF=g(e=>/^\s*eventmodeling/.test(e),"detector"),$F=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-FQU43EPY-zo5gKmtP.cjs"));return{id:i0,diagram:e}},"loader"),OF={id:i0,detector:AF,loader:$F},IF=OF,s0="ishikawa",RF=g(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),PF=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./ishikawaDiagram-FXEZZL3T-694D7LFH.cjs"));return{id:s0,diagram:e}},"loader"),DF={id:s0,detector:RF,loader:PF},o0="venn",NF=g(e=>/^\s*venn-beta/.test(e),"detector"),qF=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./vennDiagram-L72KCM5P-CySpaALH.cjs"));return{id:o0,diagram:e}},"loader"),zF={id:o0,detector:NF,loader:qF},WF=zF,a0="treemap",jF=g(e=>/^\s*treemap/.test(e),"detector"),HF=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-G47NLZAW-IhAHXHlI.cjs"));return{id:a0,diagram:e}},"loader"),YF={id:a0,detector:jF,loader:HF},n0="wardley",UF=g(e=>/^\s*wardley-beta/i.test(e),"detector"),XF=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./wardleyDiagram-EHGQE667-CTzDdsPw.cjs"));return{id:n0,diagram:e}},"loader"),GF={id:n0,detector:UF,loader:XF},VF=GF,l0="cynefin",ZF=g(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),"detector"),KF=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./cynefinDiagram-TSTJHNR4-zinokqe_.cjs"));return{id:l0,diagram:e}},"loader"),QF={id:l0,detector:ZF,loader:KF},h0="railroad",JF=g(e=>/^\s*railroad-beta/i.test(e),"detector"),tE=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./railroadDiagram-RFXS5EU6-CHPuNJfr.cjs"));return{id:h0,diagram:e}},"loader"),eE={id:h0,detector:JF,loader:tE},c0="railroadEbnf",rE=g(e=>/^\s*railroad-ebnf-beta/i.test(e),"detector"),iE=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./ebnfDiagram-CCIWWBDH-CMtypcXn.cjs"));return{id:c0,diagram:e}},"loader"),sE={id:c0,detector:rE,loader:iE},d0="railroadAbnf",oE=g(e=>/^\s*railroad-abnf-beta/i.test(e),"detector"),aE=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./abnfDiagram-VRR7QNED-RXKSzAok.cjs"));return{id:d0,diagram:e}},"loader"),nE={id:d0,detector:oE,loader:aE},u0="railroadPeg",lE=g(e=>/^\s*railroad-peg-beta/i.test(e),"detector"),hE=g(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./pegDiagram-2B236MQR-B8G9cHi4.cjs"));return{id:u0,diagram:e}},"loader"),cE={id:u0,detector:lE,loader:hE},Yc=!1,la=g(()=>{Yc||(Yc=!0,no("error",XL,e=>e.toLowerCase().trim()==="error"),no("---",{db:{clear:g(()=>{},"clear")},styles:{},renderer:{draw:g(()=>{},"draw")},parser:{parse:g(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:g(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),ja(KL,oF,MF),ja(MB,hF,ML,BL,XB,eL,sL,nL,CL,SL,jB,NB,IB,eF,KB,NL,IL,jL,dL,fF,mF,pL,SF,IF,BF,CF,DF,YF,eE,sE,nE,cE,WF,VF,QF))},"addDiagrams"),dE=g(async()=>{G.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Lr).map(async([r,{detector:i,loader:s}])=>{if(s)try{Ga(r)}catch{try{const{diagram:o,id:a}=await s();no(a,o,i)}catch(o){throw G.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Lr[r],o}}}))).filter(r=>r.status==="rejected");if(t.length>0){G.error(`Failed to load ${t.length} external diagrams`);for(const r of t)G.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),uE="graphics-document document";function f0(e,t){e.attr("role",uE),t!==""&&e.attr("aria-roledescription",t)}g(f0,"setA11yDiagramInfo");function g0(e,t,r,i){if(e.insert!==void 0){if(r){const s=`chart-desc-${i}`;e.attr("aria-describedby",s),e.insert("desc",":first-child").attr("id",s).text(r)}if(t){const s=`chart-title-${i}`;e.attr("aria-labelledby",s),e.insert("title",":first-child").attr("id",s).text(t)}}}g(g0,"addSVGa11yTitleDescription");var Tr,Wn=(Tr=class{constructor(t,r,i,s,o){this.type=t,this.text=r,this.db=i,this.parser=s,this.renderer=o}static async fromText(t,r={}){const i=Bt(),s=el(t,i);t=Bv(t)+`
304
+ `;try{Ga(s)}catch{const c=Wb(s);if(!c)throw new Ad(`Diagram ${s} not found.`);const{id:h,diagram:d}=await c();no(h,d)}const{db:o,parser:a,renderer:n,init:l}=Ga(s);return a.parser&&(a.parser.yy=o),o.clear?.(),l?.(i),r.title&&o.setDiagramTitle?.(r.title),await a.parse(t),new Tr(s,t,o,a,n)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},g(Tr,"Diagram"),Tr),Uc=[],fE=g(()=>{Uc.forEach(e=>{e()}),Uc=[]},"attachFunctions"),gE=g(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function p0(e){const t=e.match(Md);if(!t)return{text:e,metadata:{}};const r=t[1],i=r?t[2].split(`
305
+ `).map(a=>a.startsWith(r)?a.slice(r.length):a).join(`
306
+ `):t[2];let s=Fg(i,{schema:Lg})??{};s=typeof s=="object"&&!Array.isArray(s)?s:{};const o={};return s.displayMode&&(o.displayMode=s.displayMode.toString()),s.title&&(o.title=s.title.toString()),s.config&&(o.config=s.config),{text:e.slice(t[0].length),metadata:o}}g(p0,"extractFrontMatter");var pE=g(e=>e.replace(/\r\n?/g,`
307
+ `).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),mE=g(e=>{const{text:t,metadata:r}=p0(e),{displayMode:i,title:s,config:o={}}=r;return i&&(o.gantt||(o.gantt={}),o.gantt.displayMode=i),{title:s,config:o,text:t}},"processFrontmatter"),yE=g(e=>{const t=ge.detectInit(e)??{},r=ge.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):r?.type==="wrap"&&(t.wrap=!0),{text:yv(e),directive:t}},"processDirectives");function ah(e){const t=pE(e),r=mE(t),i=yE(r.text),s=Qo(r.config,i.directive);return e=gE(i.text),{code:e,title:r.title,config:s}}g(ah,"preprocessDiagram");function m0(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}g(m0,"toBase64");var xE=5e4,CE="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",bE="sandbox",kE="loose",wE="http://www.w3.org/2000/svg",SE="http://www.w3.org/1999/xlink",vE="http://www.w3.org/1999/xhtml",TE="100%",_E="100%",BE="border:0;margin:0;",LE="margin:0",FE="allow-top-navigation-by-user-activation allow-popups",EE='The "iframe" tag is not supported by your browser.',ME=["foreignobject"],AE=["dominant-baseline"];function nh(e){const t=ah(e);return oo(),Db(t.config??{}),t}g(nh,"processAndSetConfigs");async function y0(e,t){la();try{const{code:r,config:i}=nh(e);return{diagramType:(await C0(r)).type,config:i}}catch(r){if(t?.suppressErrors)return!1;throw r}}g(y0,"parse");var Xc=g((e,t,r=[])=>{const i=Td(`{ ${r.join(" !important; ")} !important; }`);return`.${e} ${t} ${i}`},"cssImportantStyles"),$E=g((e,t=new Map)=>{const r=new CSSStyleSheet;if(e.fontFamily!==void 0&&r.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,r.cssRules.length),e.altFontFamily!==void 0&&r.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,r.cssRules.length),t instanceof Map){const n=Qt(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(l=>{ac(l.styles)||n.forEach(c=>{r.insertRule(Xc(l.id,c,l.styles),r.cssRules.length)}),ac(l.textStyles)||r.insertRule(Xc(l.id,"tspan",(l?.textStyles||[]).map(c=>c.replace("color","fill"))),r.cssRules.length)})}let i="";if(e.themeCSS!==void 0)if(typeof r.replaceSync=="function"){const s=new CSSStyleSheet;s.replaceSync(e.themeCSS),i=Xa(s)+`
308
+ `}else i+=`${e.themeCSS}
309
+ `;return i+Xa(r)},"createCssStyles"),OE=g((e,t)=>zn(vB(`${e}{${t}}`),BB([g(function(i,s,o,a){if(i.type==="rule"&&Array.isArray(i.props)){if(i.parent&&i.parent.type===Dn)return;i.props=i.props.map(n=>n.startsWith(e)?n:`${e} ${n}`)}else i.type.startsWith("@")&&([...[cB,uB,vy,gB,"@container","@starting-style"],Dn].includes(i.type)||(G.warn(`Removing unsupported at-rule ${i.type} from CSS`),i.type=sh))},"addNamespace"),_B])),"compileCSS"),IE=g((e,t,r,i)=>{const s=$E(e,r),o=ok(t,s,{...e.themeVariables,theme:e.theme,look:e.look},i);return OE(i,o)},"createUserStyles"),RE=g((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=nr(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),PE=g((e="",t)=>{const r=t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+"px":_E,i=m0(`<body style="${LE}">${e}</body>`);return`<iframe style="width:${TE};height:${r};${BE}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${FE}">
310
+ ${EE}
311
+ </iframe>`},"putIntoIFrame"),Gc=g((e,t,r,i,s)=>{const o=e.append("div");o.attr("id",r),i&&o.attr("style",i);const a=o.append("svg").attr("id",t).attr("width","100%").attr("xmlns",wE);return s&&a.attr("xmlns:xlink",s),a.append("g"),e},"appendDivSvgG");function jn(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}g(jn,"sandboxedIframe");var DE=g((e,t,r,i)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(i)?.remove()},"removeExistingElements"),NE=g(async function(e,t,r){la();const i=nh(t);t=i.code;const s=Bt();G.debug(s),t.length>(s?.maxTextSize??xE)&&(t=CE);const o=`#${e}`,a="i"+e,n="#"+a,l="d"+e,c="#"+l,h=g(()=>{const X=pt(f?n:c).node();X&&"remove"in X&&X.remove()},"removeTempElements");let d=pt(document.body);const f=s.securityLevel===bE,u=s.securityLevel===kE,p=s.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),f){const U=jn(pt(r),a);d=pt(U.nodes()[0].contentDocument.body),d.node().style.margin="0"}else d=pt(r);Gc(d,e,l,`font-family: ${p}`,SE)}else{if(DE(document,e,l,a),f){const U=jn(pt(document.body),a);d=pt(U.nodes()[0].contentDocument.body),d.node().style.margin="0"}else d=pt("body");Gc(d,e,l)}let m,y;try{m=await Wn.fromText(t,{title:i.title})}catch(U){if(s.suppressErrorRendering)throw h(),U;m=await Wn.fromText("error"),y=U}const x=d.select(c).node(),C=m.type,k=x.firstChild,v=k.firstChild,S=m.renderer.getClasses?.(t,m),_=IE(s,C,S,o),L=document.createElement("style");L.innerHTML=_,k.insertBefore(L,v);try{await m.renderer.draw(t,e,"11.16.0",m)}catch(U){throw s.suppressErrorRendering?h():YL.draw(t,e,"11.16.0"),U}const T=d.select(`${c} svg`),z=m.db.getAccTitle?.(),$=m.db.getAccDescription?.();b0(C,T,z,$),d.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",vE);let R=d.select(c).node().innerHTML;if(G.debug("config.arrowMarkerAbsolute",s.arrowMarkerAbsolute),R=RE(R,f,De(s.arrowMarkerAbsolute)),f){const U=d.select(c+" svg").node();R=PE(R,U)}else u||(R=ci.sanitize(R,{ADD_TAGS:ME,ADD_ATTR:AE,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(fE(),y)throw y;return h(),{diagramType:C,svg:R,bindFunctions:m.db.bindFunctions}},"render");function x0(e={}){const t=Pt({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),Rb(t),t?.theme&&t.theme in Ge?t.themeVariables=Ge[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Ge.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?Ib(t):_d();Qn(r.logLevel),la()}g(x0,"initialize");var C0=g((e,t={})=>{const{code:r}=ah(e);return Wn.fromText(r,t)},"getDiagramFromText");function b0(e,t,r,i){f0(t,e),g0(t,r,i,t.attr("id"))}g(b0,"addA11yInfo");var Ar=Object.freeze({render:NE,parse:y0,getDiagramFromText:C0,initialize:x0,getConfig:Bt,setConfig:Bd,getSiteConfig:_d,updateSiteConfig:Pb,reset:g(()=>{oo()},"reset"),globalReset:g(()=>{oo(di)},"globalReset"),defaultConfig:di});Qn(Bt().logLevel);oo(Bt());var qE=g((e,t,r)=>{G.warn(e),zl(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),k0=g(async function(e={querySelector:".mermaid"}){try{await zE(e)}catch(t){if(zl(t)&&G.error(t.str),Ke.parseError&&Ke.parseError(t),!e.suppressErrors)throw G.error("Use the suppressErrors option to suppress these errors"),t}},"run"),zE=g(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=Ar.getConfig();G.debug(`${e?"":"No "}Callback function found`);let s;if(r)s=r;else if(t)s=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");G.debug(`Found ${s.length} diagrams`),i?.startOnLoad!==void 0&&(G.debug("Start On Load: "+i?.startOnLoad),Ar.updateSiteConfig({startOnLoad:i?.startOnLoad}));const o=new ge.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let a;const n=[];for(const l of Array.from(s)){if(G.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${o.next()}`;a=l.innerHTML,a=vp(ge.entityDecode(a)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=ge.detectInit(a);h&&G.debug("Detected early reinit: ",h);try{const{svg:d,bindFunctions:f}=await T0(c,a,l);l.innerHTML=d,e&&await e(c),f&&f(l)}catch(d){qE(d,n,Ke.parseError)}}if(n.length>0)throw n[0]},"runThrowsErrors"),w0=g(function(e){Ar.initialize(e)},"initialize"),WE=g(async function(e,t,r){G.warn("mermaid.init is deprecated. Please use run instead."),e&&w0(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await k0(i)},"init"),jE=g(async(e,{lazyLoad:t=!0}={})=>{la(),ja(...e),t===!1&&await dE()},"registerExternalDiagrams"),S0=g(function(){if(Ke.startOnLoad){const{startOnLoad:e}=Ar.getConfig();e&&Ke.run().catch(t=>G.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",S0,!1);var HE=g(function(e){Ke.parseError=e},"setParseErrorHandler"),Oo=[],Oa=!1,v0=g(async()=>{if(!Oa){for(Oa=!0;Oo.length>0;){const e=Oo.shift();if(e)try{await e()}catch(t){G.error("Error executing queue",t)}}Oa=!1}},"executeQueue"),YE=g(async(e,t)=>new Promise((r,i)=>{const s=g(()=>new Promise((o,a)=>{Ar.parse(e,t).then(n=>{o(n),r(n)},n=>{G.error("Error parsing",n),Ke.parseError?.(n),a(n),i(n)})}),"performCall");Oo.push(s),v0().catch(i)}),"parse"),T0=g((e,t,r)=>new Promise((i,s)=>{const o=g(()=>new Promise((a,n)=>{Ar.render(e,t,r).then(l=>{a(l),i(l)},l=>{G.error("Error parsing",l),Ke.parseError?.(l),n(l),s(l)})}),"performCall");Oo.push(o),v0().catch(s)}),"render"),UE=g(()=>Object.keys(Lr).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),Ke={startOnLoad:!0,mermaidAPI:Ar,parse:YE,render:T0,init:WE,run:k0,registerExternalDiagrams:jE,registerLayoutLoaders:ky,initialize:w0,parseError:void 0,contentLoaded:S0,setParseErrorHandler:HE,detectType:el,registerIconPacks:dp,getRegisteredDiagramsMetadata:UE},Hn=Ke;const _0="both-shift",Vc=Object.freeze({none:Object.freeze({panTrigger:null,zoom:!1}),zoom:Object.freeze({panTrigger:null,zoom:!0}),pan:Object.freeze({panTrigger:"drag",zoom:!1}),"pan-shift":Object.freeze({panTrigger:"shift-drag",zoom:!1}),both:Object.freeze({panTrigger:"drag",zoom:!0}),"both-shift":Object.freeze({panTrigger:"shift-drag",zoom:!0})}),XE=Object.freeze(["none","zoom","pan","pan-shift","both","both-shift"]),GE=Object.freeze(["none","zoom","pan","both"]),VE=Object.freeze({none:"none",zoom:"zoom",pan:"pan","pan-shift":"pan",both:"both","both-shift":"both"}),eo=.3,ZE=3,KE=2,Cr=.5,QE=1;function Zc(e,t){return e.panTrigger!==null&&t?e.zoom?"none":"pinch-zoom":e.zoom?"pan-x pan-y":"auto"}const JE=0;function Ia(e,t,r){return e.panTrigger===null||t.button!==JE?!1:t.pointerType==="touch"||t.pointerType==="pen"?r:e.panTrigger==="drag"||t.shiftKey}function tM(e,t){return e.zoom&&t.shiftKey}function eM(e){if(e===null)return null;const t=e.trim().split(/[\s,]+/u),r=t.length===4?Number(t[2]):Number.NaN;if(!(Number.isFinite(r)&&r>0))throw new Error(`[@aiquants/markdown] MermaidDiagram: the drawing has no usable viewBox (${JSON.stringify(e)})`);return r}function rM(e,t){if(!(Number.isFinite(e)&&e>0&&(t===null||Number.isFinite(t)&&t>0)))throw new Error(`[@aiquants/markdown] MermaidDiagram: cannot fit a drawing ${t} px wide into a frame ${e} px wide`);return t===null?1:Math.min(1,e/t)}function iM(e){if(!(Number.isFinite(e)&&e>0&&e<=1))throw new Error(`[@aiquants/markdown] MermaidDiagram: the fit scale must be in (0, 1], got ${e}`);return{minScale:1,maxScale:KE/e}}function Ra(e,t){return Math.min(t.maxScale,Math.max(t.minScale,e))}function Ni(e,t,r,i,s){return{scale:t,x:e.x+(i.x-s.origin.x)/t-(r.x-s.origin.x)/e.scale,y:e.y+(i.y-s.origin.y)/t-(r.y-s.origin.y)/e.scale}}function sM(e,t,r){const i=(s,o,a,n)=>{const l=(0-o)/e.scale,c=(n-o-e.scale*a)/e.scale;return Math.min(Math.max(l,c),Math.max(Math.min(l,c),s))};return{scale:e.scale,x:i(e.x,t.origin.x,t.inline,r.inline),y:i(e.y,t.origin.y,t.block,r.block)}}function oM(e,t,r){return e*t.inline-r.inline>Cr||e*t.block-r.block>Cr}function aM(e,t){const r=o=>Math.hypot(o[1].x-o[0].x,o[1].y-o[0].y),i=o=>({x:(o[0].x+o[1].x)/2,y:(o[0].y+o[1].y)/2}),s=r(e);return s<QE?null:{ratio:r(t)/s,from:i(e),to:i(t)}}function Kc(e){return e*(1-Math.exp(-eo))}function Qc(e,t,r){const i=e<-Cr||e>Cr;return t-e>r+Cr?i?0-e:0:e<-Cr?0-e:t>r+Cr?r-t:0}const ha=Object.freeze({interactionMode:{text:"マウス操作モード",lang:"ja"},interactionModeTouch:{text:"タッチ操作モード",lang:"ja"},modeNone:{text:"操作なし",lang:"ja"},modeZoom:{text:"拡大縮小のみ",lang:"ja"},modePan:{text:"移動のみ (左ドラッグ)",lang:"ja"},modePanShift:{text:"移動のみ (Shift+ドラッグ)",lang:"ja"},modeBoth:{text:"拡大縮小+移動 (左ドラッグ)",lang:"ja"},modeBothShift:{text:"拡大縮小+移動 (Shift+ドラッグ)",lang:"ja"},modeNoneTouch:{text:"操作なし (指はページをスクロール)",lang:"ja"},modeZoomTouch:{text:"拡大縮小のみ (2 本指)",lang:"ja"},modePanTouch:{text:"移動のみ (はみ出す図を 1 本指でドラッグ)",lang:"ja"},modeBothTouch:{text:"拡大縮小+移動 (2 本指・はみ出す図は 1 本指)",lang:"ja"},zoomIn:{text:"Zoom In",lang:"en"},zoomOut:{text:"Zoom Out",lang:"en"},resetView:{text:"Reset View",lang:"en"},panUp:{text:"Pan Up",lang:"en"},panDown:{text:"Pan Down",lang:"en"},panLeft:{text:"Pan Left",lang:"en"},panRight:{text:"Pan Right",lang:"en"},diagram:{text:"Diagram (arrow keys pan, + and - zoom, 0 resets)",lang:"en"},retry:{text:"再試行",lang:"ja"}}),nM=Gn(ha),lM=Object.freeze({none:"modeNone",zoom:"modeZoom",pan:"modePan","pan-shift":"modePanShift",both:"modeBoth","both-shift":"modeBothShift"}),hM=Object.freeze({none:"modeNoneTouch",zoom:"modeZoomTouch",pan:"modePanTouch",both:"modeBothTouch"}),B0="(pointer: coarse)",cM=e=>{const t=window.matchMedia(B0);return t.addEventListener("change",e),()=>t.removeEventListener("change",e)},dM=()=>window.matchMedia(B0).matches,uM=()=>!1,fM=()=>H.useSyncExternalStore(cM,dM,uM),Jc=new Set(["gantt"]),gM=200,pM=300,mM=Object.freeze({height:0,overflow:"hidden",visibility:"hidden",contain:"strict"}),yM="data-aqmd-mermaid-host",xM=e=>{const t=document.createElement("div");return t.setAttribute(yM,""),t.setAttribute("aria-hidden","true"),t.style.position="absolute",t.style.insetBlockStart="0",t.style.insetInlineStart=`${-e}px`,t.style.width=`${e}px`,t.style.visibility="hidden",t.style.contain="strict",document.body.append(t),t},CM=e=>{const t=e instanceof Error?e.message:String(e);return t.includes("dynamically imported module")||t.includes("Importing a module script failed")},td=e=>{e.resetStyle(),e.destroy()},Pa=(e,t)=>t?"grabbing":e.panTrigger==="drag"?"move":"",bM=Object.freeze({visibility:"hidden"});let L0=!1,Yn=null;if(Hn?.initialize)try{Hn.initialize({startOnLoad:!1}),L0=!0}catch(e){Yn=e instanceof Error?e:new Error(String(e))}else Yn=new Error("Mermaid library or mermaid.initialize is not available.");const F0=({chartContent:e,interaction:t,hideInteractionMenu:r=!1,labels:i,sourceLines:s})=>{const o=H.useMemo(()=>Xn(ha,i),[i]),a=H.useId(),n=H.useId(),l=H.useRef(`mermaid-chart-${Math.random().toString(36).substring(2,15)}`),c=H.useRef(0),h=H.useRef(null),d=H.useRef(null),f=H.useRef(null),u=H.useRef(null),[p,m]=H.useState(!0),[y,x]=H.useState(null),[C,k]=H.useState(null),[v,S]=H.useState(0),_=H.useRef(!1),L=fM(),[T,z]=H.useState(t??_0),$=H.useRef(Vc[T]),R=H.useRef(!1),[U,X]=H.useState(!1),[I,A]=H.useState(!1),M=H.useRef(null),D=H.useRef(null);H.useEffect(()=>{t&&z(t)},[t]),H.useEffect(()=>{$.current=Vc[T],u.current?.refresh()},[T]),H.useEffect(()=>{if(!I)return;const Y=Z=>{M.current&&!M.current.contains(Z.target)&&A(!1)};return document.addEventListener("pointerdown",Y),()=>document.removeEventListener("pointerdown",Y)},[I]),H.useEffect(()=>{if(m(!0),x(null),k(null),!L0){x(Yn?.message||"Mermaid failed to initialize globally."),m(!1);return}const Y=e.trim();if(Y===""){m(!1);return}const Z=h.current;if(!Z)throw new Error("[@aiquants/markdown] MermaidDiagram: the measuring element is not mounted");let V=!1,rt=0,ft=null,ht=Z.offsetWidth,mt=null,$t,Wt;const Lt=new Set,Ot=()=>{qe.disconnect(),clearTimeout($t)},xe=Ft=>{mt=null,Ot(),x(Ft),k(null),m(!1)},Vt=Ft=>{c.current+=1;const Je=c.current;rt=Je,ft=Ft;const se=xM(Ft);Lt.add(se);const oe=()=>!V&&Je===rt,Ct=()=>{Lt.delete(se),se.remove()};Hn.render(`${l.current}-${Je}`,Y,se).finally(Ct).then(Mt=>{if(oe()){if(typeof Mt.svg!="string"||Mt.svg.length===0){xe("Failed to render Mermaid diagram: SVG content is empty or invalid.");return}mt=Mt.diagramType,k({svg:Mt.svg,bindFunctions:typeof Mt.bindFunctions=="function"?Mt.bindFunctions:null}),m(!1),Jc.has(Mt.diagramType)?ht!==Ft&&ie():qe.disconnect()}}).catch(Mt=>{if(oe()){if(console.error(`[MermaidDiagram ${l.current}] Error rendering Mermaid diagram:`,Mt),CM(Mt)&&!_.current){_.current=!0,Wt=setTimeout(()=>S(dr=>dr+1),pM);return}xe(Mt instanceof Error?Mt.message:"An unknown error occurred while rendering the diagram.")}})},ie=()=>{clearTimeout($t),$t=setTimeout(()=>{ht>0&&ht!==ft&&Vt(ht)},gM)},Ce=()=>{const Ft=Z.offsetWidth;if(Ft!==ht){if(ht=Ft,ft===null){Ft>0&&Vt(Ft);return}mt!==null&&Jc.has(mt)&&ie()}},qe=new ResizeObserver(Ce);return qe.observe(Z),ht>0&&Vt(ht),()=>{V=!0,Ot(),clearTimeout(Wt);for(const Ft of Lt)Ft.remove();Lt.clear()}},[e,v]),H.useEffect(()=>{const Y=d.current;if(!Y)return;const Z=()=>{u.current=null,f.current&&(td(f.current),f.current=null),R.current=!1,X(!1)};if(!C){Y.innerHTML="",Z();return}Y.innerHTML=C.svg;const V=Y.querySelector("svg");let rt=!1,ft;const ht=[];if(V){let mt;try{mt=eM(V.getAttribute("viewBox"))}catch(Lt){console.error(`[MermaidDiagram ${l.current}] Cannot size the drawing:`,Lt),x(Lt instanceof Error?Lt.message:String(Lt)),k(null);return}const $t=mt,Wt=()=>{if(rt)return;const Lt=V.getBBox();if(!Lt||Lt.width===0||Lt.height===0){ft=setTimeout(Wt,100);return}f.current&&td(f.current);const Ot=yd(V,{startScale:1,startX:0,startY:0,minScale:1,maxScale:1,origin:"0 0",step:eo,animate:!1,noBind:!0,cursor:"",overflow:"",touchAction:Zc($.current,!1)});f.current=Ot;let xe={minScale:1,maxScale:1};const Vt=()=>{const Q=Ot.getPan();return{scale:Ot.getScale(),x:Q.x,y:Q.y}},ie=()=>{const Q=Y.getBoundingClientRect(),ot=V.getBoundingClientRect(),{scale:gt,x:Tt,y:It}=Vt();return{frameRect:Q,frame:{inline:Q.width,block:Q.height},drawing:{origin:{x:ot.left-Q.left-gt*Tt,y:ot.top-Q.top-gt*It},inline:ot.width/gt,block:ot.height/gt}}},Ce=()=>{if(rt)return;const{frame:Q,drawing:ot}=ie(),gt=oM(Ot.getScale(),ot,Q);R.current=gt,X(gt),vs(gt),Ot.setOptions({touchAction:Zc($.current,gt)}),Y.style.cursor=Pa($.current,Ct?.kind==="pan"&&Ct.mouse)},qe=()=>{const Q=Y.getBoundingClientRect().width;Q<=0||(xe=iM(rM(Q,$t)),Ot.setOptions({minScale:xe.minScale,maxScale:xe.maxScale}))},Ft=Q=>{const ot=Vt(),{frame:gt,drawing:Tt}=ie(),It=sM({...Q,scale:Ra(Q.scale,xe)},Tt,gt);return It.scale===ot.scale&&It.x===ot.x&&It.y===ot.y?!1:(Ot.zoom(It.scale,{animate:!1,force:!0,silent:!0}),Ot.pan(It.x,It.y,{animate:!1,force:!0}),Ce(),!0)},Je=(Q,ot)=>{const{drawing:gt}=ie();return Ft(Ni(Vt(),Ra(Q,xe),ot,ot,gt))},se=Q=>{const ot=Y.getBoundingClientRect();return{x:Q.x-ot.left,y:Q.y-ot.top}};u.current={zoomBy:Q=>{const{frame:ot}=ie();Je(Ot.getScale()*Math.exp(Q*eo),{x:ot.inline/2,y:ot.block/2})},panBy:(Q,ot)=>{const{drawing:gt}=ie(),Tt=Vt();return Ft(Ni(Tt,Tt.scale,{x:0,y:0},{x:Q,y:ot},gt))},reset:()=>{Ft({scale:1,x:0,y:0})},panSteps:()=>{const{frame:Q}=ie();return{x:Kc(Q.inline),y:Kc(Q.block)}},refresh:Ce};const oe=new Map;let Ct=null;const Mt=Q=>({x:Q.clientX,y:Q.clientY}),dr=()=>{const Q=[...oe.values()];return Q.length===2?[Q[0],Q[1]]:null},Bi=Q=>{if(oe.has(Q.pointerId)&&oe.set(Q.pointerId,Mt(Q)),Ct?.kind==="pinch"){const ot=dr();if(ot===null)return;const gt=aM(Ct.last,ot);if(Ct={kind:"pinch",last:ot},gt===null)return;const{drawing:Tt}=ie(),It=Vt();Ft(Ni(It,Ra(It.scale*gt.ratio,xe),se(gt.from),se(gt.to),Tt));return}if(Ct?.kind==="pan"&&Ct.pointerId===Q.pointerId){const ot=Mt(Q),{drawing:gt}=ie(),Tt=Vt();Ft(Ni(Tt,Tt.scale,se(Ct.last),se(ot),gt)),Ct={...Ct,last:ot}}},ks=()=>{window.removeEventListener("pointermove",Bi),window.removeEventListener("pointerup",Ir),window.removeEventListener("pointercancel",Ir)},Li=()=>{ks(),window.addEventListener("pointermove",Bi),window.addEventListener("pointerup",Ir),window.addEventListener("pointercancel",Ir)},Ir=Q=>{if(oe.delete(Q.pointerId),Ct?.kind==="pinch"){const[ot]=[...oe.entries()];Ct=ot!==void 0&&Ia($.current,{button:0,shiftKey:!1,pointerType:Q.pointerType},R.current)?{kind:"pan",pointerId:ot[0],last:ot[1],mouse:!1}:null}else Ct?.kind==="pan"&&Ct.pointerId===Q.pointerId&&(Ct=null);Ct===null&&oe.size===0&&ks(),Y.style.cursor=Pa($.current,Ct?.kind==="pan"&&Ct.mouse)},ze=Q=>{const ot=$.current;if(Q.pointerType==="touch"||Q.pointerType==="pen"){oe.set(Q.pointerId,Mt(Q)),Li();const gt=dr();gt!==null&&ot.zoom?Ct={kind:"pinch",last:gt}:oe.size>1?Ct?.kind==="pan"&&!Ct.mouse&&(Ct=null):Ia(ot,Q,R.current)&&(Ct={kind:"pan",pointerId:Q.pointerId,last:Mt(Q),mouse:!1});return}Ia(ot,Q,R.current)&&(Ct={kind:"pan",pointerId:Q.pointerId,last:Mt(Q),mouse:!0},Y.style.cursor=Pa(ot,!0),Li(),Q.preventDefault())},ws=Q=>{Ct!==null&&!(Ct.kind==="pan"&&Ct.mouse)&&Q.cancelable&&Q.preventDefault()};let Ss=!1;const vs=Q=>{Q!==Ss&&(Ss=Q,Q?Y.addEventListener("touchmove",ws,{passive:!1}):Y.removeEventListener("touchmove",ws))},Ts=Q=>{const ot=Q.target;if(!(ot instanceof Element)||ot===V||!V.contains(ot))return;const gt=Y.getBoundingClientRect(),Tt=ot.getBoundingClientRect(),It={x:Qc(Tt.left-gt.left,Tt.right-gt.left,gt.width),y:Qc(Tt.top-gt.top,Tt.bottom-gt.top,gt.height)};if(It.x===0&&It.y===0)return;const{drawing:ur}=ie(),Rr=Vt();Ft(Ni(Rr,Rr.scale,{x:0,y:0},It,ur))},vt=Q=>{if(!tM($.current,Q))return;const ot=Q.deltaY===0?Q.deltaX:Q.deltaY;ot!==0&&(Q.preventDefault(),Je(Ot.getScale()*Math.exp(Math.sign(-ot)*eo/ZE),se(Mt(Q))))},wt=new ResizeObserver(()=>{qe(),Ft(Vt()),Ce()});Y.addEventListener("pointerdown",ze),Y.addEventListener("focusin",Ts),Y.addEventListener("wheel",vt,{passive:!1}),V.addEventListener("panzoomchange",Ce),wt.observe(Y),ht.push(()=>{Y.removeEventListener("pointerdown",ze),Y.removeEventListener("focusin",Ts),vs(!1),Y.removeEventListener("wheel",vt),V.removeEventListener("panzoomchange",Ce),wt.disconnect(),ks()}),qe(),Ce()};Wt()}return C.bindFunctions&&C.bindFunctions(Y),()=>{rt=!0,clearTimeout(ft);for(const mt of ht)mt();Z()}},[C]);const O=H.useCallback(()=>A(Y=>!Y),[]),E=H.useCallback(Y=>{z(Y),A(!1)},[]),P=H.useCallback(Y=>{Y.key!=="Escape"||!I||(Y.preventDefault(),A(!1),D.current?.focus())},[I]),B=H.useCallback(Y=>{const Z=u.current;if(Z===null||Y.target!==Y.currentTarget||Y.altKey||Y.ctrlKey||Y.metaKey)return;const V=Z.panSteps();let rt;switch(Y.key){case"ArrowLeft":rt=Z.panBy(V.x,0);break;case"ArrowRight":rt=Z.panBy(-V.x,0);break;case"ArrowUp":rt=Z.panBy(0,V.y);break;case"ArrowDown":rt=Z.panBy(0,-V.y);break;case"+":case"=":Z.zoomBy(1),rt=!0;break;case"-":Z.zoomBy(-1),rt=!0;break;case"0":Z.reset(),rt=!0;break;default:rt=!1}rt&&Y.preventDefault()},[]),j=(Y,Z,V,rt,ft="w-8 p-1",ht=!1)=>w.jsx("button",{type:"button","data-aqmd-mermaid-control":Y,onClick:V,style:ht?bM:void 0,className:`flex pointer-coarse:size-11 h-8 items-center justify-center rounded border shadow ${ft}`,"aria-label":o[Z].text,lang:o[Z].lang,children:rt},Y),W=Y=>{const Z=u.current;if(Z===null)return;const V=Z.panSteps();Z.panBy(Y.x*V.x,Y.y*V.y)};let K;if(p)K=w.jsx("div",{className:"flex h-32 items-center justify-center bg-white dark:bg-gray-800 dark:text-white",children:"🌀 Loading diagram..."});else if(y)K=w.jsxs("div",{"data-aqmd-mermaid-error":"",className:"flex flex-col items-start gap-2 rounded border p-4",children:[w.jsxs("div",{children:["Error: ",y]}),w.jsxs("button",{type:"button","data-aqmd-mermaid-retry":"",onClick:()=>{_.current=!1,x(null),S(Y=>Y+1)},lang:o.retry.lang,className:"inline-flex pointer-coarse:min-h-11 cursor-pointer items-center gap-1.5 rounded px-3 py-1 font-medium text-sm",children:[w.jsx(Fh,{className:"h-4 w-4"}),o.retry.text]})]});else{const Y=o[L?"interactionModeTouch":"interactionMode"],Z=L?GE.map(V=>({value:V,label:o[hM[V]],checked:VE[T]===V})):XE.map(V=>({value:V,label:o[lM[V]],checked:T===V}));K=w.jsxs(w.Fragment,{children:[w.jsxs("div",{"data-aqmd-mermaid-toolbar":"",className:"pointer-coarse:static absolute top-2 right-2 z-10 pointer-coarse:mb-1 flex pointer-coarse:flex-wrap items-start gap-1",children:[!r&&w.jsxs("div",{ref:M,className:"relative",children:[w.jsx("button",{ref:D,id:a,type:"button","data-aqmd-mermaid-control":"mode",onClick:O,className:"flex pointer-coarse:size-11 h-8 w-8 items-center justify-center rounded border p-1 shadow","aria-label":Y.text,lang:Y.lang,"aria-haspopup":"menu","aria-expanded":I,onKeyDown:P,children:w.jsx(ZC,{size:18})}),I&&w.jsx("div",{role:"menu","aria-labelledby":a,"data-aqmd-mermaid-menu":"",onKeyDown:P,className:"absolute pointer-coarse:right-auto right-0 pointer-coarse:left-0 z-20 mt-1 w-60 overflow-hidden rounded border py-1 text-sm shadow-lg",children:Z.map(({value:V,label:rt,checked:ft})=>w.jsxs("button",{type:"button",role:"menuitemradio","aria-checked":ft,lang:rt.lang,onClick:()=>E(V),className:"flex pointer-coarse:min-h-11 w-full items-center gap-2 px-3 py-1.5 text-left",children:[w.jsx("span",{className:"w-3 shrink-0","aria-hidden":"true",children:ft?"✓":""}),w.jsx("span",{children:rt.text})]},V))})]}),j("zoom-in","zoomIn",()=>u.current?.zoomBy(1),w.jsx(QC,{size:20})),j("zoom-out","zoomOut",()=>u.current?.zoomBy(-1),w.jsx(tb,{size:20})),j("reset","resetView",()=>u.current?.reset(),w.jsx(Fh,{size:18}),"px-2 py-1 text-sm"),j("pan-left","panLeft",()=>W({x:1,y:0}),w.jsx(jC,{size:18}),void 0,!U),j("pan-up","panUp",()=>W({x:0,y:1}),w.jsx(XC,{size:18}),void 0,!U),j("pan-down","panDown",()=>W({x:0,y:-1}),w.jsx(zC,{size:18}),void 0,!U),j("pan-right","panRight",()=>W({x:-1,y:0}),w.jsx(YC,{size:18}),void 0,!U)]}),w.jsx("span",{id:n,hidden:!0,lang:o.diagram.lang,children:o.diagram.text}),w.jsx("div",{ref:d,"data-testid":"mermaid-diagram","data-aqmd-mermaid-frame":"","data-aqmd-mermaid-overflowing":U?"true":"false",role:"group",tabIndex:0,"aria-labelledby":n,onKeyDown:B,className:"mermaid mermaid-diagram-container bg-white dark:bg-gray-400"})]})}return w.jsxs("div",{className:"relative","data-aqmd-mermaid":"","data-source-lines":s,children:[w.jsx("div",{ref:h,"data-aqmd-mermaid-measure":!0,"aria-hidden":"true",style:mM}),K]})};F0.displayName="MermaidDiagramInternal";const lh=H.memo(F0),kM="unicodeTextInMathMode",wM="noCharacterMetrics",SM=/^No character metrics for '.+' in style '.+' and mode '.+'$/su,vM="consoleCommand",TM=e=>{const t=(r,i)=>s=>(i(s),e(vM,`${r} is ignored: a formula does not write to the console`),"");return{"\\message":t("\\message",r=>r.consumeArgs(1)),"\\errmessage":t("\\errmessage",r=>r.consumeArgs(1)),"\\show":t("\\show",r=>r.popToken())}},E0=(e,t)=>{const r=`${t?"display":"inline"}:${e}`,i=pr.get(r);if(i!==void 0)return pr.delete(r),pr.set(r,i),i;const s=BM(e,t);return pr.set(r,s),pr.size>_M&&pr.delete(pr.keys().next().value),s},_M=610,pr=new Map,BM=(e,t)=>{const r=[],i=(o,a)=>{r.push({code:o,message:a,formula:e,displayMode:t})},s=console.warn;console.warn=(...o)=>{const[a]=o;if(o.length===1&&typeof a=="string"&&SM.test(a)){i(wM,a);return}s.apply(console,o)};try{const o=Cx.renderToString(e,{displayMode:t,throwOnError:!1,macros:TM(i),strict:(a,n)=>(a!==kM&&i(a,n),"ignore")});return Object.freeze({html:o,diagnostics:Object.freeze(r.map(a=>Object.freeze(a)))})}finally{console.warn=s}},LM=Object.freeze({light:"solarized-light",dark:"github-dark-high-contrast"}),FM=Object.freeze({"solarized-light":Object.freeze({"#657b83":"#435860","#93a1a1":"#4b5757","#2aa198":"#005f59","#dc322f":"#ae0010","#d33682":"#a70060","#268bd2":"#00588e","#859900":"#4e5a00","#586e75":"#43585f","#cb4b16":"#9a3100","#b58900":"#6c5100","#6c71c4":"#4a4c9c"}),"github-dark-high-contrast":Object.freeze({"#272b33":"#abb1bb"})});function EM(e){const t={};for(const r in e){const i=e[r];switch(r){case"class":t.className=i;break;case"style":{const s={};for(const o of i.split(";")){const a=o.indexOf(":");if(a<=0)continue;const n=o.slice(0,a).trim(),l=o.slice(a+1).trim();n===""||l===""||(s[n.startsWith("--")?n:n.replace(/-(\w)/g,(c,h)=>h.toUpperCase())]=l)}t.style=s;break}case"tabindex":t.tabIndex=Number(i);break;default:t[r]=i}}return t}const MM=({code:e})=>{const[t,r]=H.useState(!1),i=()=>{navigator.clipboard.writeText(e).then(()=>{r(!0),setTimeout(()=>r(!1),2e3)},s=>{console.error("Failed to copy: ",s)})};return w.jsx("button",{type:"button","data-aqmd-code-copy":"",className:"absolute top-2 right-2 z-10 inline-flex pointer-coarse:min-h-11 pointer-coarse:min-w-11 items-center justify-center rounded-md px-2 py-1 text-sm transition-colors",onClick:i,children:t?"COPIED!":"Copy"})},AM=({htmlPromise:e,filename:t,code:r,sourceLines:i})=>{const s=H.use(e),o={replace:a=>{if(a instanceof St.Element&&a.name==="pre"){const n=EM(a.attribs),l=t?"2.2rem 0 1rem 0":"1rem 0";return n.style={...typeof n.style=="object"?n.style:{},margin:"0",padding:"0.8rem 0"},w.jsxs("div",{className:"relative",style:{margin:l},"data-aqmd-code-block":"","data-source-lines":i,children:[t&&w.jsx("div",{"data-aqmd-code-filename":"",className:"absolute -top-4 left-0 z-0 rounded-md px-2 py-0.5 text-sm",children:t}),w.jsx(MM,{code:r}),w.jsx("pre",{...n,children:St.domToReact(a.children,o)})]})}},htmlparser2:{lowerCaseTags:!0}};return w.jsx(w.Fragment,{children:St(s,o)})},$M=/^(diff)?:?(\w+):?([\w.-]*)?/,OM=()=>({code(e){for(const t of e.children){if(t.type!=="element")continue;const r=t.children[0];if(r?.type!=="element")continue;const i=r.children[0];if(i?.type!=="text")continue;const s=i.value;let o,a,n="";if(s.startsWith("+")?(o="+",a="add",n="bg-green-200 dark:bg-green-400/90 text-green-700"):s.startsWith("-")&&(o="-",a="remove",n="bg-red-200 dark:bg-red-400/90 text-red-700"),o&&a){t.properties.dataAqmdDiff=a,i.value=s.substring(1).trimStart();const l={type:"element",tagName:"span",properties:{className:`inline-flex items-center justify-center w-4 h-4 rounded-full select-none font-bold text-[0.5rem] mr-2 ${n}`},children:[{type:"text",value:o==="+"?"➕":"➖"}]};t.children.unshift(l)}}}}),IM=e=>{const t=$M.exec(e??"");return{isDiff:t?.[1]==="diff",lang:t?.[2]||"text",filename:t?.[3]||void 0}},hh=({lang:e,code:t,node:r,sourceLines:i})=>{const s=e??r?.lang??void 0,o=t??r?.value??"",{isDiff:a,lang:n,filename:l}=IM(s),c=H.useMemo(async()=>{const h=[];return a&&h.push(OM()),await yx.codeToHtml(o,{lang:n,themes:LM,defaultColor:!1,colorReplacements:FM,transformers:h})},[o,n,a]);return n==="mermaid"?w.jsx(lh,{chartContent:o,sourceLines:i}):w.jsx(H.Suspense,{fallback:w.jsx("div",{className:"dark:text-white","data-source-lines":i,children:"🌀 Loading code..."}),children:w.jsx(AM,{htmlPromise:c,filename:l,code:o,sourceLines:i})})},M0=({code:e})=>{const[t,r]=H.useState(!1),i=()=>{navigator.clipboard.writeText(e).then(()=>{r(!0),setTimeout(()=>r(!1),2e3)},s=>{console.error("Failed to copy: ",s)})};return w.jsx("button",{type:"button","data-aqmd-code-copy":"",className:"absolute right-2 z-10 inline-flex pointer-coarse:min-h-11 pointer-coarse:min-w-11 items-center justify-center rounded-md px-2 py-1 text-xs transition-colors",onClick:i,children:t?"COPIED!":"Copy"})},A0=(e,t)=>{const r=H.useMemo(()=>{try{return{kind:"rendered",html:E0(e,t).html}}catch(i){return{kind:"failed",error:i,message:`Math rendering error: ${i instanceof Error?i.message:String(i)}`}}},[e,t]);return H.useEffect(()=>{r.kind==="failed"&&console.error("An error occurred while rendering KaTeX:",r.error)},[r]),r},RM=({node:e})=>{const t=A0(e.value,!0),r="rounded-md px-1.5 py-1 font-mono text-gray-800 text-sm dark:text-gray-200";return w.jsxs("div",{className:"relative",children:[w.jsx(M0,{code:e.value}),t.kind==="rendered"?w.jsx("article",{className:r,dangerouslySetInnerHTML:{__html:t.html}}):w.jsx("article",{className:r,children:t.message})]})},PM=/^[a-z][a-z0-9+.-]*:/i,DM=/^[/\\]{2}/,NM=/[\t\n\r]/g,ed=32,qM=e=>{let t=0,r=e.length;for(;t<r&&e.charCodeAt(t)<=ed;)t+=1;for(;r>t&&e.charCodeAt(r-1)<=ed;)r-=1;return e.slice(t,r)},$0=e=>{const t=qM(e).replace(NM,"");return PM.test(t)||DM.test(t)},zM="text-link underline visited:text-link-visited",WM="inline-block w-fit",ch=new Set(["img","picture","video","audio","svg","canvas","iframe","object","embed","address","article","aside","blockquote","details","dialog","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","li","main","menu","nav","ol","p","pre","section","table","ul"]);[...ch].join(",");const O0=(e,t)=>[e,t?WM:void 0,zM].filter(r=>r!==void 0&&r.trim()!=="").join(" "),jM=new Set(["id","title","lang","dir","role"]),HM=["aria-","data-footnote-"],YM=e=>{const t={};for(const[r,i]of Object.entries(e)){const s=r.toLowerCase();(jM.has(s)||HM.some(o=>s.startsWith(o)&&s.length>o.length))&&(t[s]=i)}return Object.freeze(t)},fe=new qa.Logger(qa.LogLevel.INFO,"[DifyIFramePlugin]"),UM="100%",XM="600px",GM="0",VM=e=>typeof e!="object"||e===null||!("type"in e)?null:typeof e.type=="string"?e.type:null,ZM=({embed:e,iFrameAllowedDomains:t})=>{const[r,i]=H.useState(!0),[s,o]=H.useState(!1),a=H.useRef(null),n=H.useRef(null),l=H.useRef(null),{src:c}=e,h=H.useCallback(x=>{x.source===null||x.source!==a.current?.contentWindow||!dC(x.origin,t)||VM(x.data)==="dify-chatbot-iframe-ready"&&(fe.info("Dify chatbot iframe is ready"),i(C=>C&&(o(!1),n.current&&(clearTimeout(n.current),n.current=null),l.current&&(clearTimeout(l.current),l.current=null),!1)))},[t]),d=H.useCallback(()=>{const x=a.current;if(x)try{if(!x.contentDocument)throw new Error("Cannot access iframe content");i(k=>k&&(o(!1),!1))}catch{fe.info("Crossorigin error detected, showing auth prompt"),o(k=>k||(i(!1),!0))}},[]),f=H.useCallback(()=>{const x=window.open(c,"dify-oauth","width=500,height=600,scrollbars=yes,resizable=yes");if(!x){fe.error("ポップアップがブロックされました");return}const C=setInterval(()=>{if(x.closed){clearInterval(C),fe.info("ポップアップが閉じられました");try{fe.info("ポップアップURL:",x.location.href)}catch(v){fe.info("クロスオリジンのためURLにアクセスできません:",v)}const k=a.current;if(k?.src){const v=k.src;i(S=>S||!0),o(S=>S&&!1),k.src="",setTimeout(()=>{k.src=v,n.current=setTimeout(()=>{fe.warn("認証後タイムアウト: dify-chatbot-iframe-ready not received after auth"),d()},5e3)},100)}}},1e3);fe.info("ポップアップを開きました:"),fe.info("- 初期URL:",c),fe.info("- ウィンドウ名:","dify-oauth"),fe.info("- ウィンドウサイズ: 500x600")},[d,c]);H.useEffect(()=>(window.addEventListener("message",h),()=>{window.removeEventListener("message",h)}),[h]),H.useEffect(()=>{const x=setTimeout(()=>{fe.warn("Timeout: dify-chatbot-iframe-ready not received, checking iframe access"),d()},5e3);return l.current=x,()=>{l.current&&(clearTimeout(l.current),l.current=null)}},[d]),H.useEffect(()=>()=>{n.current&&(clearTimeout(n.current),n.current=null)},[]);const{width:u=UM,height:p=XM,frameborder:m=GM,...y}=e.attributes;return w.jsxs("div",{className:"dify-iframe-container",children:[r&&!s&&w.jsxs("div",{className:"flex items-center justify-center rounded-lg bg-gray-50 p-8",children:[w.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-blue-600 border-b-2"}),w.jsx("span",{className:"ml-3 text-gray-600",children:"Dify チャットボットを読み込み中..."})]}),s&&w.jsxs("div",{className:"mb-4 rounded-lg border border-blue-200 bg-blue-50 p-6",children:[w.jsx("div",{className:"flex items-center",children:w.jsxs("div",{className:"text-blue-800",children:[w.jsx("h3",{className:"font-medium",children:"認証が必要です"}),w.jsx("p",{className:"mt-1 text-sm",children:"Dify チャットボットにアクセスするには OAuth 認証が必要です。 ポップアップウィンドウで認証を完了してください。"})]})}),w.jsx("div",{className:"mt-4",children:w.jsx("button",{type:"button",onClick:f,className:"rounded-md border border-gray-700 bg-gray-900 px-4 py-2 font-medium text-sm text-white shadow-lg transition-colors hover:bg-gray-800",children:"OAuth 認証を開始"})})]}),w.jsx("div",{className:`${r||s?"hidden":"block"}`,children:w.jsx("iframe",{ref:a,...St.attributesToProps({...y,width:u,height:p,frameborder:m},"iframe"),src:c,"data-plugin-type":"dify"})})]})},rd=Object.freeze({dify:ZM}),KM=e=>Object.hasOwn(rd,e)?rd[e]:null,QM=w.jsx(H.Fragment,{}),JM=(e,t,r,i,s)=>{const o=t===null?null:KM(t),a=e.attributes.title===void 0?{title:`${i.text}: ${new URL(e.src).hostname}`,lang:i.lang}:{};return w.jsx(Vx,{embed:e,label:i,insideAnchor:s,children:o!==null?w.jsx(o,{embed:e,iFrameAllowedDomains:r}):w.jsx("iframe",{...St.attributesToProps(e.attributes,"iframe"),...a,src:e.src})})},t5=e=>{for(let t=e.parent;t!==null;t=t.parent)if(t instanceof St.Element&&t.name.toLowerCase()==="a")return!0;return!1},I0=e=>e.some(t=>t instanceof St.Element&&(ch.has(t.name)||I0(t.children))),e5=(e,t,r)=>{const{class:i,"data-link-kind":s,"data-doc-path":o,"data-doc-exists":a,...n}=e.attribs,l=O0(i,I0(e.children)),c=n.href??"",h=s,d=h==="external"||$0(c),f=St.domToReact(e.children,t);if(r&&c&&!d)return w.jsx(r,{href:c,kind:h,docPath:o,docExists:a===void 0?void 0:a==="true",className:l,attributes:YM(n),children:f});d&&(n.target="_blank",n.rel="noreferrer");const u={};return s!==void 0&&(u["data-link-kind"]=s),o!==void 0&&(u["data-doc-path"]=o),a!==void 0&&(u["data-doc-exists"]=a),w.jsx("a",{...St.attributesToProps(n,"a"),className:l,...u,children:f})},R0=({iFrameAllowedDomains:e,embedLabels:t,linkComponent:r,renderPlaceholder:i,renderKept:s})=>{const o={replace:a=>{if(!(a instanceof St.Element))return;const n=a.parent instanceof St.Element?a.parent.name:null,l=Zn(a.name,a.attribs,{parentName:n,iFrameAllowedDomains:e});switch(l.action){case"remove":return QM;case"unwrap":return w.jsx(H.Fragment,{children:St.domToReact(a.children,o)});case"embed":return JM(l.embed,l.pluginType,e,t.embeddedFrame,t5(a))}if(a.attribs={...l.attributes},l.action==="placeholder"){const h=i?.(a,l.link,o);if(h!==void 0)return h}const c=s?.(a,o);if(c!==void 0)return c;if(a.name==="a")return e5(a,o,r)}};return o},r5=({alt:e,target:t,label:r})=>w.jsxs("span",{"data-testid":"markdown-missing-image","data-asset-src":t||void 0,role:"img","aria-label":`${e?`${r} (${e})`:r}${t?`: ${t}`:""}`,className:"my-1 inline-flex max-w-full items-center gap-2 rounded-lg border border-gray-300 border-dashed bg-gray-50 px-3 py-2 text-gray-600 text-sm dark:border-gray-600 dark:bg-gray-800/50 dark:text-gray-400",children:[w.jsx(Nx,{className:"h-4 w-4 shrink-0","aria-hidden":"true"}),w.jsxs("span",{className:"min-w-0",children:[w.jsx("span",{className:"font-medium",children:e?`${r} (${e})`:r}),t&&w.jsx("span",{className:"ml-2 break-all font-mono text-xs dark:text-gray-300",children:t})]})]}),i5=(e,t,r)=>{const{src:i,alt:s,"data-asset-exists":o,"data-asset-src":a}=e.attribs;if(!i||i.trim()===""||o==="false")return w.jsx(r5,{alt:s,target:a,label:t});const n=r.rendered===0;return r.rendered+=1,w.jsx("img",{alt:"",...St.attributesToProps({loading:n?"eager":"lazy",decoding:"async",...e.attribs})})},Io=e=>e.map(t=>t instanceof St.Text?t.data:t instanceof St.Element?Io(t.children):"").join(""),s5=(e,t)=>e.map(r=>{if(r instanceof St.Text)return{kind:"text",text:r.data};if(!(r instanceof St.Element))return{kind:"ignored"};if(r.name.toLowerCase()!=="a")return{kind:"element"};const i=Zn(r.name,r.attribs,{parentName:"p",iFrameAllowedDomains:t});return{kind:"link",href:i.action==="keep"?i.attributes.href??null:null}}),o5=(e,t,r,i)=>{const s=e.children,o=ir.placeholderLinkOf(t,s5(s,i.iFrameAllowedDomains));if(o===null)return;const a=St.domToReact(s,r),n=w.jsx("p",{...St.attributesToProps(e.attribs,"p"),children:a}),l=s.find(f=>f instanceof St.Element),c=i.embeds.linkCardEndpoint,h=c!==null&&l!==void 0&&ir.isBareLink(Io(l.children),o)?w.jsx(tC,{href:t,endpoint:c,size:Ae.linkCardSizeOf(i.embeds),fallback:n}):n,d=_r.resolveEmbed(o,i.embeds.providers);return d===null?h:w.jsx(hC,{resolution:d,caption:a,fallback:h,theme:i.theme,labels:i.embedLabels})},a5={lowerCaseAttributeNames:!1},n5=2166136261,l5=16777619,h5=/^[\t\n\f\r ]*$/u,c5=e=>{let t=n5;const r=s=>{for(let o=0;o<s.length;o+=1)t=Math.imul(t^s.charCodeAt(o),l5)},i=s=>{if(s instanceof St.Text)r(""),r(s.data);else if(s instanceof St.Element){r(""),r(s.name);for(const[o,a]of Object.entries(s.attribs))o!==ro.SOURCE_LINES_ATTRIBUTE&&(r(""),r(o),r(""),r(a));r("");for(const o of s.children)i(o);r("")}else r("\x07"),r(s.data)};return i(e),(t>>>0).toString(36)},d5=(e,t)=>{if(e==="")return[];const r=new Map;return St.htmlToDOM(e,a5).map(i=>{if(i instanceof St.Text&&h5.test(i.data))return i.data;const s=c5(i),o=r.get(s)??0;return r.set(s,o+1),w.jsx(H.Fragment,{children:St.domToReact([i],t)},`${s}.${o}`)})},P0=({htmlContent:e,theme:t="light",iFrameAllowedDomains:r=[],embeds:i=Ae.NO_EMBEDS,embedLabels:s,mermaidInteraction:o,mermaidLabels:a,linkComponent:n,missingImageLabel:l="Image not found",onMathDiagnostics:c})=>{gd(i);const h=hd(s),d={rendered:0},f=[],u=H.useRef(null),p=H.useEffectEvent(x=>{c?.(x)}),m=R0({iFrameAllowedDomains:r,embedLabels:h,linkComponent:n,renderPlaceholder:(x,C,k)=>o5(x,C,k,{embeds:i,theme:t,embedLabels:h,iFrameAllowedDomains:r}),renderKept:x=>{if(x.name==="pre"&&x.children.length===1){const C=x.children[0];if(C instanceof St.Element&&C.name==="code"){const k=C.attribs.class??"",v=Io(C.children),S=x.attribs[ro.SOURCE_LINES_ATTRIBUTE];return k.includes("language-mermaid")?w.jsx(lh,{chartContent:v,interaction:o,labels:a,sourceLines:S}):w.jsx(hh,{lang:k.replace("language-",""),code:v,theme:t,sourceLines:S})}}if(x.name==="img")return i5(x,l,d);if(x.name==="span"&&x.attribs.class?.includes("math")){const C=x.attribs.class.includes("display");let k=Io(x.children).trim();C?k=k.replace(/^\\\[/,"").replace(/\\\]$/,""):k=k.replace(/^\\\(/,"").replace(/\\\)$/,"");try{const{html:v,diagnostics:S}=E0(k,C);return f.push(...S),C?w.jsxs("span",{className:"group relative block",children:[w.jsx(M0,{code:k}),w.jsx("span",{dangerouslySetInnerHTML:{__html:v}})]}):w.jsx("span",{dangerouslySetInnerHTML:{__html:v}})}catch(v){console.error("Failed to render math:",v);return}}}}),y=d5(e,m);return H.useEffect(()=>{u.current!==e&&(u.current=e,f.length>0&&p(f))},[e,f]),w.jsx("div",{className:"markdown-body","data-theme":t,children:y})};const u5=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],f5=zt("triangle-alert",u5);const g5=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 19H5",key:"vjpgq2"}]],p5=zt("text-align-center",g5);const m5=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 19H3",key:"z6ezky"}]],y5=zt("text-align-start",m5);const x5=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 19H7",key:"4cu937"}]],C5=zt("text-align-end",x5);const b5=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],k5=zt("list",b5);const w5=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],S5=zt("palette",w5);const v5=[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]],T5=zt("pin",v5);const _5=[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89",key:"znwnzq"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11",key:"c9qhm2"}]],B5=zt("pin-off",_5),L5=e=>`#${e.id}`,F5=e=>{let t=Number.POSITIVE_INFINITY;for(const r of e)r.depth<t&&(t=r.depth);return t},E5="py-1 pointer-coarse:py-0",id="block truncate pointer-coarse:py-[max(0px,calc((2.75rem_-_1lh)_/_2))]",D0=({headings:e,className:t="",onHeadingSelect:r,headingHref:i=L5,label:s,labelledBy:o})=>{if(e.length===0)return null;const a=F5(e);return w.jsx("nav",{className:`toc ${t}`,"aria-label":s,"aria-labelledby":o,children:w.jsx("ul",{className:"m-0 list-none p-0",children:e.map((n,l)=>{const c=n.id===""?null:i(n);return w.jsx("li",{className:E5,style:{paddingLeft:`${(n.depth-a)*1}rem`},children:c===null?w.jsx("span",{className:`${id} text-gray-600 dark:text-gray-300`,title:n.text,children:n.text}):w.jsx("a",{href:gs(c)?c:void 0,className:`${id} text-gray-600 no-underline hover:text-blue-800 dark:text-gray-300 dark:hover:text-blue-300`,onClick:r===void 0?void 0:h=>r(n,h),title:n.text,children:n.text})},l)})})})},Da="--aqmd-toolbar-block-overlap",M5=({toolbar:e,content:t,scrollportTop:r,scrollportBottom:i})=>{if(e.width<=0||e.height<=0)return 0;const s=e.left<t.right&&e.right>t.left,o=e.top<r+e.height&&e.top<i,a=e.bottom-r;return s&&o&&a>0?Math.ceil(a):0},N0=e=>`mermaid${e.charAt(0).toUpperCase()}${e.slice(1)}`,q0=Object.keys(ha),z0=Object.freeze({loading:{text:"Loading data...",lang:"en"},errorPrefix:{text:"Error: ",lang:"en"},defaultErrorTitle:{text:"An error occurred",lang:"en"},missingImage:{text:"Image not found",lang:"en"},styleTitle:{text:"Display Style",lang:"en"},selectStyleAria:{text:"Select display style",lang:"en"},pinStyleAria:{text:"Pin style selector",lang:"en"},unpinStyleAria:{text:"Unpin style selector",lang:"en"},openTocAria:{text:"目次を開く",lang:"ja"},tocTitle:{text:"目次",lang:"ja"},pinTocAria:{text:"目次をピン留め",lang:"ja"},unpinTocAria:{text:"目次のピン留めを解除",lang:"ja"},selectAlignAria:{text:"揃えを選択",lang:"ja"},alignTitle:{text:"揃え",lang:"ja"},pinAlignAria:{text:"揃え選択をピン留め",lang:"ja"},unpinAlignAria:{text:"揃え選択のピン留めを解除",lang:"ja"},alignLeft:{text:"左揃え",lang:"ja"},alignCenter:{text:"中央揃え",lang:"ja"},alignRight:{text:"右揃え",lang:"ja"},...Object.fromEntries(q0.map(e=>[N0(e),ha[e]])),...Ro}),A5=Gn(z0),$5=e=>Xn(z0,e),O5=e=>{const t={};if(e===void 0)return Object.freeze(t);for(const r of q0){const i=e[N0(r)];i!==void 0&&(t[r]=i)}return Object.freeze(t)},I5=Object.keys(Ro),R5=e=>{const t={};if(e===void 0)return Object.freeze(t);for(const r of I5){const i=e[r];i!==void 0&&(t[r]=i)}return Object.freeze(t)},sd=Object.freeze({left:{labelKey:"alignLeft",Icon:y5},center:{labelKey:"alignCenter",Icon:p5},right:{labelKey:"alignRight",Icon:C5}}),P5=Object.freeze({text:"ファイルを選択してください。",lang:"ja"}),D5="100%",N5=e=>e==="center"?"auto":e==="right"?"auto 0":"0 auto",Un="24px",W0=e=>Object.freeze({position:"fixed",insetBlockStart:"var(--aqmd-toolbar-inset-block-start, 0px)",insetInlineEnd:`calc(var(--aqmd-toolbar-inset-inline-end, 0px) + ${e})`,zIndex:60,display:"flex",flexDirection:"row",alignItems:"flex-start",gap:"0.5rem",pointerEvents:"none"}),q5=W0(Un),z5=Object.freeze({position:"absolute",insetBlockStart:0,insetInlineStart:0,blockSize:"var(--aqmd-toolbar-inset-block-start, 0px)",inlineSize:"var(--aqmd-toolbar-inset-inline-end, 0px)",visibility:"hidden",pointerEvents:"none"}),W5=e=>`calc(100cqi - var(--aqmd-toolbar-inset-inline-end, 0px) - ${e})`,j5=8,od=800,H5=16,Y5=(e,t)=>{const r=e.defaultView;let i;const s=()=>{e.removeEventListener("click",o,!0),e.removeEventListener("pointercancel",a,!0),i!==void 0&&r?.clearTimeout(i)};function o(n){s(),!(n.timeStamp-t.timeStamp>od||Math.hypot(n.clientX-t.clientX,n.clientY-t.clientY)>H5)&&(n.preventDefault(),n.stopPropagation())}function a(n){n.pointerId===t.pointerId&&s()}e.addEventListener("click",o,!0),e.addEventListener("pointercancel",a,!0),i=r?.setTimeout(s,od)},U5=(e,t,r)=>{const[i,s]=H.useState(null);return H.useLayoutEffect(()=>{const o=t.current;if(!e||o===null||r===null){s(null);return}const a=o.ownerDocument.defaultView;let n=0;const l=()=>{n=0;const d=o.getBoundingClientRect(),f=o.offsetHeight>0?d.height/o.offsetHeight:1,u=a?.visualViewport??null,p=u===null?Number.POSITIVE_INFINITY:u.offsetTop+u.height,m=Math.min(r.getBoundingClientRect().bottom,p);s(Math.max(0,Math.floor((m-d.top)/f-j5)))},c=()=>{a!==null&&n===0&&(n=a.requestAnimationFrame(l))};l();const h=new ResizeObserver(c);return h.observe(r),a?.addEventListener("resize",c),a?.visualViewport?.addEventListener("resize",c),a?.visualViewport?.addEventListener("scroll",c),o.ownerDocument.addEventListener("scroll",c,!0),()=>{a!==null&&n!==0&&a.cancelAnimationFrame(n),h.disconnect(),a?.removeEventListener("resize",c),a?.visualViewport?.removeEventListener("resize",c),a?.visualViewport?.removeEventListener("scroll",c),o.ownerDocument.removeEventListener("scroll",c,!0)}},[e,t,r]),i};function Na({menu:e,Icon:t,buttonLabel:r,titleLabel:i,titleId:s,pinLabel:o,unpinLabel:a,isOpen:n,isPinned:l,isFront:c,onActivate:h,onToggle:d,onClose:f,onPinToggle:u,popoverClassName:p,scrollBarClearance:m,boundary:y,renderBody:x}){const C=H.useRef(null),k=H.useRef(null),v=H.useRef(null),S=U5(n,v,y),_=H.useCallback(()=>{d(),h()},[h,d]),L=H.useCallback(()=>{if(l)return;const z=C.current?.contains(document.activeElement)===!0;f(),z&&k.current?.focus()},[l,f]);H.useEffect(()=>{if(!n||l)return;const z=C.current;if(z===null)return;const $=U=>{z.contains(U.target)||(f(),U.pointerType==="touch"&&!(U.target instanceof Element&&U.target.closest("[data-aqmd-toolbar]")!==null)&&Y5(z.ownerDocument,U))},R=U=>{U.key!=="Escape"||U.defaultPrevented||U.isComposing||(U.preventDefault(),f(),k.current?.focus())};return document.addEventListener("pointerdown",$),z.addEventListener("keydown",R),()=>{document.removeEventListener("pointerdown",$),z.removeEventListener("keydown",R)}},[n,l,f]);const T=l?a:o;return w.jsxs("div",{ref:C,"data-aqmd-toolbar-menu":e,children:[w.jsx("button",{ref:k,type:"button",className:"pointer-events-auto rounded-full border border-gray-200 bg-white p-2 pointer-coarse:p-3 shadow-lg transition-colors hover:bg-gray-100 dark:border-gray-700 dark:bg-gray-800 dark:hover:bg-gray-700",onClick:_,"aria-label":r.text,lang:r.lang,"aria-expanded":n,children:w.jsx(t,{className:"h-5 w-5 text-gray-600 dark:text-gray-300"})}),n&&w.jsxs("div",{ref:v,"data-aqmd-toolbar-popover":e,className:`pointer-events-auto absolute end-0 top-full mt-2 box-border overflow-y-auto overscroll-contain rounded-lg border border-gray-200 bg-white shadow-xl dark:border-gray-700 dark:bg-gray-800 ${p}`,style:{zIndex:c?2:1,maxInlineSize:W5(m),maxBlockSize:S??void 0},children:[w.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[w.jsx("h3",{id:s,lang:i.lang,className:"px-2 font-bold text-gray-600 text-sm uppercase tracking-wider dark:text-gray-300",children:i.text}),w.jsx("button",{type:"button",className:"rounded p-1 pointer-coarse:p-3.5 text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-gray-200",onClick:u,"aria-label":T.text,lang:T.lang,children:l?w.jsx(T5,{className:"h-4 w-4"}):w.jsx(B5,{className:"h-4 w-4"})})]}),x(L)]})]})}const X5=(e,t,r,i)=>{const[s,o]=H.useState(0),a=H.useRef(null);return H.useLayoutEffect(()=>{const n=e.current,l=t.current;if(r===null||n===null||l===null){a.current=null,o(0);return}const c=()=>{const p=n.getBoundingClientRect();o(M5({toolbar:r.getBoundingClientRect(),content:l.getBoundingClientRect(),scrollportTop:p.top+n.clientTop,scrollportBottom:p.bottom}))};a.current=c;let h=null;const d=()=>{h===null&&(h=requestAnimationFrame(()=>{h=null,c()}))};c();const f=new ResizeObserver(c);f.observe(n),f.observe(l),f.observe(r);const u=r.querySelector("[data-aqmd-toolbar-inset-probe]");return u!==null&&f.observe(u),window.addEventListener("resize",c),window.addEventListener("scroll",d,{capture:!0,passive:!0}),()=>{a.current=null,f.disconnect(),window.removeEventListener("resize",c),window.removeEventListener("scroll",d,{capture:!0}),h!==null&&cancelAnimationFrame(h)}},[e,t,r]),H.useLayoutEffect(()=>{a.current?.()},[i]),s},G5=()=>window.matchMedia("(prefers-reduced-motion: reduce)").matches,V5=e=>{let t=null,r=e;for(;r!==null;)r.getAttribute("hidden")?.toLowerCase()==="until-found"&&(r.dispatchEvent(new Event("beforematch",{bubbles:!0})),r.removeAttribute("hidden")),r instanceof HTMLDetailsElement&&!r.open&&t!==null&&t!==Array.from(r.children).find(i=>i.localName==="summary")&&(r.open=!0),t=r,r=r.parentElement},Z5=H.memo(function({parseResult:t,theme:r,styleClassName:i,iFrameAllowedDomains:s,embeds:o,embedLabels:a,linkComponent:n,missingImageLabel:l,mermaidLabels:c,onMathDiagnostics:h}){return w.jsx("div",{className:"w-full min-w-0",children:w.jsx("div",{className:i,"data-theme":r,children:w.jsx(P0,{htmlContent:t.htmlContent,theme:r,iFrameAllowedDomains:s,embeds:o,embedLabels:a,linkComponent:n,missingImageLabel:l,mermaidLabels:c,onMathDiagnostics:h})})})});function j0(){const[e,t]=H.useState("toc"),[r,i]=H.useState(!1),[s,o]=H.useState(!1),[a,n]=H.useState(!1),[l,c]=H.useState(!1),[h,d]=H.useState(!1),[f,u]=H.useState(!1),p=H.useCallback(()=>t("toc"),[]),m=H.useCallback(()=>i($=>!$),[]),y=H.useCallback(()=>i(!1),[]),x=H.useCallback(()=>c($=>!$),[]),C=H.useCallback(()=>t("style"),[]),k=H.useCallback(()=>o($=>!$),[]),v=H.useCallback(()=>o(!1),[]),S=H.useCallback(()=>d($=>!$),[]),_=H.useCallback(()=>t("align"),[]),L=H.useCallback(()=>n($=>!$),[]),T=H.useCallback(()=>n(!1),[]),z=H.useCallback(()=>u($=>!$),[]);return{lastActiveMenu:e,isTocOpen:r,isStyleOpen:s,isAlignOpen:a,isTocPinned:l,isStylePinned:h,isAlignPinned:f,activateToc:p,toggleToc:m,closeToc:y,togglePinToc:x,activateStyle:C,toggleStyle:k,closeStyle:v,togglePinStyle:S,activateAlign:_,toggleAlign:L,closeAlign:T,togglePinAlign:z}}const K5=({error:e,labels:t})=>{if(H.isValidElement(e))return w.jsx("div",{className:"p-4",children:e});if(typeof e=="object"&&e!==null&&"message"in e){const i=e,s=i.title!==void 0&&i.title!=="";return w.jsx("div",{className:"mx-auto my-8 max-w-lg rounded-xl border border-red-200 bg-red-50/50 p-6 shadow-sm backdrop-blur-sm dark:border-red-900/50 dark:bg-red-950/30",children:w.jsxs("div",{className:"flex items-start gap-3",children:[w.jsx("div",{className:"rounded-lg bg-red-100 p-2 text-red-600 dark:bg-red-900/50 dark:text-red-400",children:w.jsx(f5,{className:"h-5 w-5"})}),w.jsxs("div",{className:"min-w-0 flex-1",children:[w.jsxs("div",{className:"flex items-center justify-between gap-2",children:[w.jsx("h3",{lang:s?void 0:t.defaultErrorTitle.lang,className:"font-semibold text-base text-red-900 dark:text-red-200",children:s?i.title:t.defaultErrorTitle.text}),i.status&&w.jsx("span",{className:"rounded bg-red-100 px-2 py-0.5 font-medium font-mono text-red-700 text-xs dark:bg-red-900/60 dark:text-red-300",children:i.status})]}),w.jsx("p",{className:"mt-2 text-red-700 text-sm leading-relaxed dark:text-red-300/90",children:i.message})]})]})})}const r=typeof e=="string"?e:String(e);return w.jsx("div",{className:"mx-auto my-8 max-w-lg rounded-xl border border-red-200 bg-red-50/50 p-4 text-center dark:border-red-900/50 dark:bg-red-950/30",children:w.jsxs("p",{className:"font-medium text-red-700 text-sm dark:text-red-300",children:[w.jsx("span",{lang:t.errorPrefix.lang,children:t.errorPrefix.text}),r]})})};function Q5({parseResult:e,content:t,error:r=null,isLoading:i=!1,labels:s,theme:o,style:a,onStyleChange:n,availableStyles:l=Fi.DEFAULT_MARKDOWN_STYLES,align:c=Fi.DEFAULT_CONTENT_ALIGN,onAlignChange:h,showToc:d=!0,showStyle:f=!0,showAlign:u=!0,width:p,maxWidth:m,padding:y=16,iFrameAllowedDomains:x,embeds:C=Ae.NO_EMBEDS,emptyMessage:k,toolbar:v,linkComponent:S,onHeadingSelect:_,headingHref:L,onMathDiagnostics:T,renderScrollBar:z}){const $=H.useRef(null),[R,U]=H.useState(null),X=H.useCallback(vt=>{$.current=vt,U(vt)},[]),[I,A]=H.useState(0),M=H.useRef(null),[D,O]=H.useState(null),E=H.useRef(null),P=H.useId(),B=j0(),j=v??B,W=H.useMemo(()=>$5(s),[s]),K=H.useMemo(()=>O5(s),[s]);gd(C);const Y=_r.EMBED_PROVIDER_IDS.filter(vt=>C.providers.includes(vt)).join(" "),Z=C.linkCardEndpoint,V=C.linkCardSize,rt=H.useMemo(()=>{const vt=Y.split(" "),wt=Object.freeze(_r.EMBED_PROVIDER_IDS.filter(Q=>vt.includes(Q)));return Object.freeze(V===void 0?{providers:wt,linkCardEndpoint:Z}:{providers:wt,linkCardEndpoint:Z,linkCardSize:V})},[Y,Z,V]),ft=s?.embeddedVideo,ht=s?.embeddedPost,mt=s?.embeddedFrame,$t=H.useMemo(()=>R5({embeddedVideo:ft,embeddedPost:ht,embeddedFrame:mt}),[ft,ht,mt]),Wt=H.useRef(T);H.useLayoutEffect(()=>{Wt.current=T},[T]);const Lt=H.useCallback(vt=>{Wt.current?.(vt)},[]),Ot=k===void 0?P5:{text:k,lang:void 0},xe=X5($,M,D,c);if(!Fi.CONTENT_ALIGNS.includes(c))throw new TypeError(`[@aiquants/markdown] align must be one of ${Fi.CONTENT_ALIGNS.join(", ")}; got ${String(c)} (normalize it with toContentAlign)`);const Vt=Number.isFinite(y)&&y>=0?y:16,ie=H.useCallback(vt=>{const wt=$.current;if(wt){const Q=wt.querySelector("[data-theme]"),ot=wt.getBoundingClientRect(),gt=Q?.children;let Tt=-1,It=Number.POSITIVE_INFINITY;if(gt)for(let ur=0;ur<gt.length;ur+=1){const Rr=gt[ur],dh=Math.abs(Rr.getBoundingClientRect().top-ot.top);dh<It&&(It=dh,Tt=ur)}if(gt&&Tt>=0){const Rr=gt[Tt].getBoundingClientRect();E.current={childIndex:Tt,offset:Rr.top-ot.top}}else E.current=null}n(vt)},[n]);H.useLayoutEffect(()=>{const vt=E.current;if(!vt)return;E.current=null;const wt=$.current;if(!wt)return;const ot=wt.querySelector("[data-theme]")?.children[vt.childIndex];if(!ot)return;const gt=wt.getBoundingClientRect(),It=ot.getBoundingClientRect().top-gt.top;wt.scrollTop+=It-vt.offset});const{isTocPinned:Ce,closeToc:qe}=j,Ft=H.useCallback((vt,wt)=>{if(Ce||qe(),_?.(vt,wt)===!0)return;wt.preventDefault();const ot=$.current?.querySelector(`#${CSS.escape(vt.id)}`)??document.getElementById(vt.id);ot&&(V5(ot),ot.tabIndex<0&&!ot.hasAttribute("tabindex")&&ot.setAttribute("tabindex","-1"),ot.scrollIntoView({behavior:G5()?"instant":"smooth",block:"start"}),ot.focus({preventScroll:!0}))},[qe,Ce,_]),Je=H.useMemo(()=>l.find(wt=>wt.name===a)?.className??"markdown-body",[l,a]),se=e?.headings??[],oe=!(i||r),Ct=oe&&e!==null,Mt=oe&&e===null&&t!==null,dr=Ct&&d&&se.length>0,Bi=Ct&&f,Li=(Ct||Mt)&&u&&typeof h=="function"&&(p!==void 0||m!==void 0),Ir=H.useMemo(()=>w.jsx(D0,{headings:se,className:"text-sm",labelledBy:P,onHeadingSelect:Ft,headingHref:L}),[se,P,Ft,L]),ze=z===void 0?Un:`${I}px`,ws=H.useMemo(()=>ze===Un?q5:W0(ze),[ze]),Ss=dr||Bi||Li?w.jsxs("div",{ref:O,"data-aqmd-toolbar":!0,style:ws,children:[w.jsx("span",{"data-aqmd-toolbar-inset-probe":!0,"aria-hidden":"true",style:z5}),Li&&h&&w.jsx(Na,{menu:"align",Icon:sd[c].Icon,buttonLabel:W.selectAlignAria,titleLabel:W.alignTitle,pinLabel:W.pinAlignAria,unpinLabel:W.unpinAlignAria,isOpen:j.isAlignOpen,isPinned:j.isAlignPinned,isFront:j.lastActiveMenu==="align",onActivate:j.activateAlign,onToggle:j.toggleAlign,onClose:j.closeAlign,onPinToggle:j.togglePinAlign,popoverClassName:"w-48 p-2",scrollBarClearance:ze,boundary:R,renderBody:vt=>w.jsx("div",{className:"space-y-1",children:Fi.CONTENT_ALIGNS.map(wt=>{const{labelKey:Q,Icon:ot}=sd[wt],gt=W[Q],Tt=c===wt;return w.jsxs("button",{type:"button","aria-pressed":Tt,lang:gt.lang,className:`flex pointer-coarse:min-h-11 w-full items-center gap-2 rounded px-2 py-1 text-left text-sm transition-colors ${Tt?"bg-blue-100 font-medium text-blue-800 dark:bg-blue-900 dark:text-blue-200":"text-gray-700 hover:bg-gray-100 dark:text-gray-300 dark:hover:bg-gray-700"}`,onClick:()=>{h(wt),vt()},children:[w.jsx(ot,{className:"h-4 w-4"}),gt.text]},wt)})})}),Bi&&w.jsx(Na,{menu:"style",Icon:S5,buttonLabel:W.selectStyleAria,titleLabel:W.styleTitle,pinLabel:W.pinStyleAria,unpinLabel:W.unpinStyleAria,isOpen:j.isStyleOpen,isPinned:j.isStylePinned,isFront:j.lastActiveMenu==="style",onActivate:j.activateStyle,onToggle:j.toggleStyle,onClose:j.closeStyle,onPinToggle:j.togglePinStyle,popoverClassName:"w-48 p-2",scrollBarClearance:ze,boundary:R,renderBody:vt=>w.jsx("div",{className:"space-y-1",children:l.map(wt=>{const Q=a===wt.name;return w.jsx("button",{type:"button","aria-pressed":Q,className:`pointer-coarse:min-h-11 w-full rounded px-2 py-1 text-left text-sm transition-colors ${Q?"bg-blue-100 font-medium text-blue-800 dark:bg-blue-900 dark:text-blue-200":"text-gray-700 hover:bg-gray-100 dark:text-gray-300 dark:hover:bg-gray-700"}`,onClick:()=>{ie(wt.name),vt()},children:wt.name},wt.name)})})}),dr&&w.jsx(Na,{menu:"toc",Icon:k5,buttonLabel:W.openTocAria,titleLabel:W.tocTitle,titleId:P,pinLabel:W.pinTocAria,unpinLabel:W.unpinTocAria,isOpen:j.isTocOpen,isPinned:j.isTocPinned,isFront:j.lastActiveMenu==="toc",onActivate:j.activateToc,onToggle:j.toggleToc,onClose:j.closeToc,onPinToggle:j.togglePinToc,popoverClassName:"markdown-viewer-scrollbar-thin w-64 p-4",scrollBarClearance:ze,boundary:R,renderBody:()=>Ir})]}):null,vs=()=>i?w.jsxs("p",{children:[w.jsx("span",{"aria-hidden":"true",children:"🌀"})," ",w.jsx("span",{lang:W.loading.lang,children:W.loading.text})]}):r?w.jsx(K5,{error:r,labels:W}):e?w.jsx("div",{className:"relative w-full min-w-0",children:w.jsx(Z5,{parseResult:e,theme:o,styleClassName:Je,iFrameAllowedDomains:x,embeds:rt,embedLabels:$t,linkComponent:S,missingImageLabel:W.missingImage.text,mermaidLabels:K,onMathDiagnostics:Lt})}):t!==null?w.jsx("pre",{className:"whitespace-pre-wrap break-all",children:t}):w.jsx("p",{lang:Ot.lang,children:Ot.text}),Ts={containerType:"inline-size",paddingInline:`${Vt}px`,paddingBlockEnd:`${Vt}px`,paddingBlockStart:`calc(${Vt}px + var(${Da}))`,scrollPaddingBlockStart:`var(${Da})`,[Da]:`${xe}px`};return w.jsxs(dd,{scrollerRef:X,scrollerProps:{"data-testid":"viewer","data-aqmd-scroll-container":!0,className:"grid h-full w-full overflow-x-auto overflow-y-auto *:min-w-0",style:Ts},renderScrollBar:z,onBarInlineSizeChange:A,children:[Ss,w.jsx("div",{ref:M,"data-aqmd-content":!0,style:{width:p??D5,maxWidth:m,marginInline:N5(c)},children:vs()})]})}const H0=({node:e})=>w.jsx("del",{children:w.jsx(Dt,{nodes:e.children})}),Y0=({node:e})=>w.jsx("em",{children:w.jsx(Dt,{nodes:e.children})}),U0=({node:e})=>w.jsx("sup",{children:w.jsxs("a",{id:`fnref-${e.identifier}`,className:"text-[#316dce] underline visited:text-[#6b46c1] dark:text-[#3182ce] dark:visited:text-[#805ad5]",href:`#fn-${e.identifier}`,children:["[",e.identifier,"]"]})}),J5=({nodes:e,theme:t="light"})=>e.length===0?null:w.jsx("section",{className:"border-[#171717] border-t pt-4 dark:border-[#464646]",children:w.jsx("ol",{className:"pl-6 text-[#686868] text-sm dark:text-[#a4a5a9]",children:e.map((r,i)=>w.jsx("li",{id:`fn-${r.identifier}`,className:i===0?"":"mt-4",children:w.jsx(Dt,{nodes:r.children,theme:t})},`mdast-node-fn-${r.identifier}-${i}`))})}),X0=({node:e})=>w.jsx("a",{href:e.url,className:"text-[#316dce] underline visited:text-[#6b46c1] dark:text-[#3182ce] dark:visited:text-[#805ad5]",children:"↩"}),tA=e=>e.replace(/<rt\b[^>]*>[\s\S]*?<\/rt>/gi,"").replace(/<rp\b[^>]*>[\s\S]*?<\/rp>/gi,"").replace(/<[^>]+>/g,"").replace(/&nbsp;/gi," ").replace(/&amp;/gi,"&").replace(/&lt;/gi,"<").replace(/&gt;/gi,">").replace(/&quot;/gi,'"').replace(/&#39;/gi,"'").replace(/&#(\d+);/g,(s,o)=>{const a=Number(o);return Number.isFinite(a)?String.fromCodePoint(a):""}).replace(/&#x([0-9a-f]+);/gi,(s,o)=>{const a=Number.parseInt(o,16);return Number.isFinite(a)?String.fromCodePoint(a):""}).replace(/\s+/g," ").trim(),G0=e=>{const t=r=>{if(!r||typeof r!="object")return"";if("type"in r&&r.type==="html"){const i=r.value;return typeof i=="string"?tA(i):""}if("value"in r){const i=r.value;if(typeof i=="string")return i}return"children"in r&&Array.isArray(r.children)?r.children.map(i=>t(i)).join(""):""};return e.map(r=>t(r)).join("").replace(/\s+/g," ").trim()},eA=e=>{switch(e){case 1:return"border-b-2 border-gray-300 pb-2 text-3xl font-bold dark:border-gray-600 dark:text-gray-100";case 2:return"border-b border-gray-300 pb-2 text-2xl font-semibold dark:border-gray-600 dark:text-gray-200";case 3:return"text-xl font-semibold dark:text-gray-300";default:return"text-lg font-medium dark:text-gray-400"}},V0=({node:e})=>{const t=new xx,r=`h${e.depth}`,i=e.data?.hProperties?.id,s=t.slug(G0(e.children));return w.jsx(r,{id:i||s,className:eA(e.depth),children:w.jsx(Dt,{nodes:e.children})})},rA=e=>Object.fromEntries(Object.entries(e).filter(([,t])=>t!==!1).map(([t,r])=>[t,r===!0?"":String(r)])),iA=({node:e,theme:t,iFrameAllowedDomains:r=[]})=>{const i=w.jsx(Dt,{nodes:e.children,theme:t,iFrameAllowedDomains:r}),s=Zn(e.data.tagName,rA(e.data.properties),{parentName:null,iFrameAllowedDomains:r});if(s.action==="unwrap")return i;if(s.action!=="keep"&&s.action!=="placeholder")return null;const o=e.data.tagName.toLowerCase();return w.jsx(o,{...St.attributesToProps(s.attributes,e.data.tagName.toLowerCase()),children:i})},sA=/^\s*<(address|article|aside|blockquote|details|dialog|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h[1-6]|header|hgroup|hr|li|main|nav|ol|p|pre|section|table|ul)/i,oA=({node:e,iFrameAllowedDomains:t=[]})=>{const r=St(e.value,R0({iFrameAllowedDomains:t,embedLabels:kx}));return Array.isArray(r)&&r.length===0?null:sA.test(e.value)?w.jsx("div",{children:r}):w.jsx("span",{children:r})},Z0=({node:e})=>{if(!e.url||e.url.trim()===""||!gs(e.url))return null;const t=e.title??"",r=e.data?.hProperties?.width,i=e.data?.hProperties?.height;return w.jsxs("span",{style:{width:r,height:i},className:"mt-4 mb-4 inline-block w-fit max-w-full",children:[w.jsx("img",{src:e.url,alt:e.alt??"",className:"mx-auto h-full w-full",width:r,height:i}),t&&w.jsx("em",{className:"block text-center text-gray-400 text-xs",children:t})]})},K0=({node:e})=>w.jsx("code",{className:"rounded-md bg-gray-200 px-1.5 py-1 font-mono text-gray-800 text-sm dark:bg-gray-700 dark:text-gray-200",children:e.value}),aA=({node:e})=>{const t=A0(e.value,!1),r="rounded-md px-1.5 py-1 font-mono text-gray-800 text-sm dark:text-gray-200";return t.kind==="rendered"?w.jsx("span",{className:r,dangerouslySetInnerHTML:{__html:t.html}}):w.jsx("span",{className:r,children:t.message})},nA=new RegExp(`<(?:${[...ch].join("|")})(?=[\\s/>])`,"i"),Q0=e=>e.some(t=>t.type==="image"||t.type==="imageReference"||t.type==="html"&&typeof t.value=="string"&&nA.test(t.value)||t.children!==void 0&&Q0(t.children)),J0=({node:e})=>{const t=gs(e.url)?e.url:void 0,r=t!==void 0&&$0(t);return w.jsx("a",{className:O0(void 0,Q0(e.children)),href:t,target:r?"_blank":void 0,rel:r?"noreferrer":void 0,children:w.jsx(Dt,{nodes:e.children})})},tx=({node:e})=>e.children.length===1&&e.children[0].type==="paragraph"?w.jsx("li",{children:w.jsx(Dt,{nodes:e.children[0].children})}):w.jsx("li",{children:w.jsx(Dt,{nodes:e.children})}),ex=({node:e})=>{const t=e.ordered?"ol":"ul";return w.jsx(t,{children:w.jsx(Dt,{nodes:e.children})})},lA=({node:e})=>w.jsx("mark",{children:w.jsx(Dt,{nodes:e.children})}),rx=({node:e})=>w.jsx("p",{children:w.jsx(Dt,{nodes:e.children})}),ix=({node:e})=>w.jsx("strong",{children:w.jsx(Dt,{nodes:e.children})}),hA=({node:e})=>w.jsx("sub",{children:w.jsx(Dt,{nodes:e.children})}),cA=({node:e})=>w.jsx("sup",{children:w.jsx(Dt,{nodes:e.children})}),ad=e=>{const t=e.data?.hProperties;return{merged:t?.merged??!1,colSpan:t?.colSpan,rowSpan:t?.rowSpan,textAlign:t?.textAlign}},sx=({node:e})=>{const[t,...r]=e.children;return w.jsx("div",{className:"overflow-x-auto",children:w.jsxs("table",{className:"w-full border-collapse border-none",children:[w.jsx("thead",{className:"bg-gray-100 dark:bg-gray-800",children:w.jsx("tr",{children:t.children.map((i,s)=>{const{merged:o,colSpan:a,rowSpan:n,textAlign:l}=ad(i);return o?null:w.jsx("th",{colSpan:a,rowSpan:n,style:{textAlign:l??e.align?.[s]??void 0},className:"border border-gray-300 px-4 py-2 text-left font-semibold dark:border-gray-600 dark:text-gray-200",children:w.jsx(Dt,{nodes:i.children})},`mdast-table-node-${e.type}-${s}`)})})}),w.jsx("tbody",{children:r.map((i,s)=>w.jsx("tr",{className:"border-gray-200 border-t bg-white dark:border-gray-700 dark:bg-gray-900",children:i.children.map((o,a)=>{const{merged:n,colSpan:l,rowSpan:c,textAlign:h}=ad(o);return n?null:w.jsx("td",{colSpan:l,rowSpan:c,style:{textAlign:h??e.align?.[a]??void 0},className:"border border-gray-300 px-4 py-2 dark:border-gray-600 dark:text-gray-300",children:w.jsx(Dt,{nodes:o.children})},`mdast-table-node-${e.type}-${a}`)})},`mdast-table-node-${e.type}-${s}`))})]})})},ox=({node:e})=>w.jsx(w.Fragment,{children:e.value}),ax=()=>w.jsx("hr",{className:"border-gray-300 dark:border-gray-600"}),nx=({node:e})=>{const t=e.data?.title||"";return w.jsxs("details",{className:"markdown-details",children:[w.jsx("summary",{children:t}),w.jsx("div",{className:"markdown-details-content",children:w.jsx(Dt,{nodes:e.children})})]})},lx=({node:e})=>{const r=["message",e.data?.messageType||"message"].filter(Boolean).join(" ");return w.jsxs("aside",{className:r,children:[w.jsx("span",{className:"message-symbol",style:{userSelect:"none"},children:"!"}),w.jsx("div",{className:"message-content",children:w.jsx(Dt,{nodes:e.children})})]})},Dt=({nodes:e,theme:t="light",iFrameAllowedDomains:r=[]})=>e.map((i,s)=>{switch(i.type){case"blockquote":return w.jsx(hx,{node:i},`mdast-node-${i.type}-${s}`);case"break":return w.jsx("br",{},`mdast-node-${i.type}-${s}`);case"code":return w.jsx(hh,{node:i,theme:t},`mdast-node-${i.type}-${s}`);case"delete":return w.jsx(H0,{node:i},`mdast-node-${i.type}-${s}`);case"details":return w.jsx(nx,{node:i},`mdast-node-${i.type}-${s}`);case"emphasis":return w.jsx(Y0,{node:i},`mdast-node-${i.type}-${s}`);case"footnoteReference":return w.jsx(U0,{node:i},`mdast-node-${i.type}-${s}`);case"footnoteDefinition":return null;case"footnote-back-link":return w.jsx(X0,{node:i},`mdast-node-${i.type}-${s}`);case"heading":return w.jsx(V0,{node:i},`mdast-node-${i.type}-${s}`);case"html":return w.jsx(oA,{node:i,iFrameAllowedDomains:r},`mdast-node-${i.type}-${s}`);case"html-block-container":{const o=i,a=`mdast-node-${o.type}-${o.position?.start?.offset??"na"}-${o.position?.end?.offset??"na"}`;return w.jsx(iA,{node:o,theme:t,iFrameAllowedDomains:r},a)}case"image":return w.jsx(Z0,{node:i},`mdast-node-${i.type}-${s}`);case"inlineCode":return w.jsx(K0,{node:i},`mdast-node-${i.type}-${s}`);case"inlineMath":return w.jsx(aA,{node:i},`mdast-node-${i.type}-${s}`);case"link":return w.jsx(J0,{node:i},`mdast-node-${i.type}-${s}`);case"listItem":return w.jsx(tx,{node:i},`mdast-node-${i.type}-${s}`);case"list":return w.jsx(ex,{node:i},`mdast-node-${i.type}-${s}`);case"mark":return w.jsx(lA,{node:i},`mdast-node-${i.type}-${s}`);case"math":return w.jsx(RM,{node:i},`mdast-node-${i.type}-${s}`);case"message":return w.jsx(lx,{node:i},`mdast-node-${i.type}-${s}`);case"paragraph":return w.jsx(rx,{node:i},`mdast-node-${i.type}-${s}`);case"strong":return w.jsx(ix,{node:i},`mdast-node-${i.type}-${s}`);case"subscript":return w.jsx(hA,{node:i},`mdast-node-${i.type}-${s}`);case"superscript":return w.jsx(cA,{node:i},`mdast-node-${i.type}-${s}`);case"table":return w.jsx(sx,{node:i},`mdast-node-${i.type}-${s}`);case"text":return w.jsx(ox,{node:i},`mdast-node-${i.type}-${s}`);case"thematicBreak":return w.jsx(ax,{},`mdast-node-${i.type}-${s}`);case"yaml":return null;default:{if(process.env.NODE_ENV==="development")return w.jsxs("div",{children:[w.jsxs("p",{style:{color:"red"},children:["Unknown node type: ",i.type]}),w.jsx("pre",{children:JSON.stringify(i,null,2)})]},`mdast-node-${i.type}-${s}`);throw new Error(`Unknown node type: ${i.type}`)}}}),hx=({node:e})=>w.jsx("blockquote",{className:"my-4 border-gray-300 border-l-4 bg-gray-50 p-4 italic dark:border-gray-500 dark:bg-gray-800 dark:text-gray-300",children:w.jsx(Dt,{nodes:e.children})}),dA=/\s*\{#(.+?)\}\s*$/,uA=()=>e=>{ce.visit(e,"heading",t=>{if(t.children.length===0)return;const r=t.children[t.children.length-1];if(r?.type!=="text")return;const i=r,s=i.value.match(dA);if(s){const o=s[1];t.data||(t.data={});const a=t.data,n=a.hProperties||{};n.id=o,a.hProperties=n,i.value=i.value.substring(0,s.index).trimEnd(),i.value===""&&t.children.pop()}})},fA=()=>e=>{ce.visit(e,"footnoteDefinition",t=>{ce.visit(t,"paragraph",r=>{r.children.push({type:"footnote-back-link",url:`#fnref-${t.identifier}`})})})},gA=()=>e=>{ce.visit(e,"html",(t,r,i)=>{if(typeof r!="number"||!i)return;const o=t.value.trim().match(/^<a\s+href="([^"]+)"[^>]*>(.*?)<\/a>$/i);if(o){const[,a,n]=o,l={type:"link",url:a,children:[{type:"text",value:n}]};i.children.splice(r,1,l)}})},pA=()=>e=>{const t=r=>{const i=r.children;if(!i)return;let s=0;for(;s<i.length;){const o=i[s];if(o.type==="html"&&o.value.startsWith("<")&&!o.value.startsWith("</")&&o.value.match(/<([a-zA-Z0-9]+)/)){let n="",l=0;const c=[];let h=!1;for(let d=s;d<i.length;d++){const f=i[d];if(f.type==="html"){n+=f.value;const u=f.value.match(/<\/?([a-zA-Z0-9]+)/g)||[];for(const p of u){const m=p.match(/<\/?([a-zA-Z0-9]+)/);if(!m)continue;const y=m[1];p.startsWith("</")?c.length>0&&c[c.length-1]===y&&c.pop():p.startsWith("<")&&c.push(y)}}else if(f.type==="text")n+=f.value;else{c.length===0&&(h=!0);break}if(l++,c.length===0){h=!0;break}}h&&i.splice(s,l,{type:"html",value:n})}s++}};ce.visit(e,"paragraph",t),ce.visit(e,"tableCell",t),ce.visit(e,"heading",t),ce.visit(e,"emphasis",t),ce.visit(e,"strong",t),ce.visit(e,"delete",t)},nd=/\s*=\s*(\d+)(w|h|x|y)\s*/g,mA=()=>e=>{ce.visit(e,"image",t=>{const r=l=>{if(!l)return{updatedText:l,matches:[]};const c=[...l.matchAll(nd)];return{updatedText:l.replaceAll(nd,"").trim(),matches:c}},{updatedText:i,matches:s}=r(t.alt);t.alt=i;const{updatedText:o,matches:a}=r(t.title);t.title=o||null;const n=[...s,...a];if(n.length>0){t.data||(t.data={}),t.data.hProperties||(t.data.hProperties={});for(const l of n){const c=Number.parseInt(l[1],10),h=l[2];h==="w"||h==="x"?t.data.hProperties.width=c:(h==="h"||h==="y")&&(t.data.hProperties.height=c)}}})},yA=()=>e=>{ce.visit(e,(t,r,i)=>{i&&Object.defineProperty(t,"parent",{value:i,writable:!0,configurable:!0,enumerable:!1})})},ld=/^:::(message|details)\s*(.*)/,xA=()=>e=>{function t(r){const i=[];let s=0;for(;s<r.length;){const o=r[s];if(o.type==="paragraph"&&o.children[0]?.type==="text"&&o.children[0].value.trim().startsWith(":::")){const l=o.children[0].value.trim().match(ld);if(l){const c=s;let h=-1,d=1;const f=o.children.at(-1);if(o.children.length>1&&f?.type==="text"&&f.value.trim()===":::")h=c;else for(let u=c+1;u<r.length;u++){const p=r[u];if(p.type==="paragraph"&&p.children[0]?.type==="text"){const m=p.children[0].value.trim();ld.test(m)?d++:m===":::"&&d--}if(d===0){h=u;break}}if(h!==-1){const u=l[1],p=l[2];let m;if(h===c){const C=o.children.slice(1,-1);C[0]?.type==="break"&&C.shift(),C.at(-1)?.type==="break"&&C.pop(),m=C.length>0?[{type:"paragraph",children:C}]:[]}else{const C=o.children.slice(1);C[0]?.type==="break"&&C.shift();const k={type:"paragraph",children:C},S=r[h].children.slice(0,-1);S.at(-1)?.type==="break"&&S.pop();const _={type:"paragraph",children:S},L=r.slice(c+1,h);m=[k,...L,_].filter(T=>!(T.type==="paragraph"&&T.children.length===0))}const y=t(m);let x;if(u==="message"?x={type:"message",data:{messageType:p.trim()},children:y}:u==="details"&&(x={type:"details",data:{title:p.trim()},children:y}),x){i.push(x),s=h+1;continue}}}}const a={...o};"children"in a&&Array.isArray(a.children)&&(a.type==="blockquote"||a.type==="footnoteDefinition"||a.type==="message"||a.type==="details"?a.children=t(a.children):a.type==="list"&&(a.children=a.children.map(n=>({...n,children:t(n.children)})))),i.push(a),s++}return i}e.children=t(e.children)},CA=e=>{const t=[];return ce.visit(e,"heading",r=>{const i=G0(r.children),s=r.data?.hProperties?.id;s&&i&&t.push({depth:r.depth,text:i,id:s})}),t};exports.BlockquoteNode=hx;exports.CodeNode=hh;exports.Color=_e;exports.Color$1=wi;exports.DEFAULT_MARKDOWN_EMBED_LABELS=bx;exports.DEFAULT_MARKDOWN_VIEWER_LABELS=A5;exports.DEFAULT_MERMAID_DIAGRAM_LABELS=nM;exports.DEFAULT_MERMAID_INTERACTION=_0;exports.DeleteNode=H0;exports.EmphasisNode=Y0;exports.FootnoteBackLinkNode=X0;exports.FootnoteReferenceNode=U0;exports.FootnotesSection=J5;exports.HeadingNode=V0;exports.HostedScrollArea=dd;exports.ImageNode=Z0;exports.InlineCodeNode=K0;exports.JSON_SCHEMA=Lg;exports.LinkNode=J0;exports.ListItemNode=tx;exports.ListNode=ex;exports.MarkdownRenderer=P0;exports.MarkdownViewer=Q5;exports.MermaidDiagram=lh;exports.NodesRenderer=Dt;exports.ParagraphNode=rx;exports.Rgb=te;exports.StrongNode=ix;exports.TableNode=sx;exports.TableOfContents=D0;exports.TextNode=ox;exports.ThematicBreakNode=ax;exports.Utils=ut;exports.ZERO_WIDTH_SPACE=Kg;exports.ZennDetailsNode=nx;exports.ZennMessageNode=lx;exports.__export=Cd;exports.__name=g;exports.abs=Bw;exports.acos=Iw;exports.adjustChannel=Jn;exports.argumentsTag=$l;exports.array=ku;exports.arrayBufferTag=Dg;exports.arrayTag=Pg;exports.asin=Rw;exports.assignWithDepth_default=Pt;exports.at=et;exports.atan2=Lw;exports.booleanTag=Al;exports.calculateMathMLDimensions=Jb;exports.calculateTextDimensions=Ko;exports.calculateTextHeight=ql;exports.calculateTextWidth=Ie;exports.cleanAndMerge=Qo;exports.clear=Nd;exports.clear$1=E_;exports.clear$2=i_;exports.clear2=v_;exports.color=gi;exports.commonDb_exports=sl;exports.common_default=ki;exports.computeDimensionOfText=Ip;exports.computeLabelTransform=jr;exports.configureLabelImages=Wl;exports.configureSvgSize=il;exports.constant=yr;exports.constant$1=zo;exports.cos=Fw;exports.createText=Le;exports.curveBasis=mo;exports.darken=q;exports.dataViewTag=qg;exports.dateTag=Og;exports.dayjs2=bd;exports.decodeEntities=nr;exports.defaultConfig2=lk;exports.defaultConfig_default=tl;exports.define=qo;exports.distExports=Eg;exports.edgeLabels=ds;exports.epsilon=an;exports.extend=ul;exports.extractHeadings=CA;exports.float32ArrayTag=Gg;exports.float64ArrayTag=Vg;exports.generateId=ip;exports.getAccDescription=jd;exports.getAccTitle=zd;exports.getConfig=Bt;exports.getConfig2=xt;exports.getDefaultExportFromCjs=cd;exports.getDiagramTitle=Yd;exports.getEdgeId=Lv;exports.getEffectiveHtmlLabels=Qt;exports.getIconSVG=vi;exports.getLineFunctionsWithOffset=fy;exports.getRegisteredLayoutAlgorithm=hB;exports.getStylesFromArray=Nl;exports.getSubGraphTitleMargins=Jo;exports.getTag=Vo;exports.getThemeVariables3=wd;exports.getUrl=Pd;exports.getUserDefinedConfig=qb;exports.halfPi=nn;exports.hasKatex=ui;exports.hue=s2;exports.insertCluster=Up;exports.insertEdge=yy;exports.insertEdgeLabel=gy;exports.insertNode=ih;exports.int16ArrayTag=Ug;exports.int32ArrayTag=Xg;exports.int8ArrayTag=Yg;exports.interpolateNumber=Ue;exports.interpolateRgb=Ka;exports.interpolateString=hu;exports.isDark=ye;exports.isLabelStyle=Fl;exports.isPrimitive=Zo;exports.isTypedArray=Ji;exports.isValidShape=uy;exports.lighten=N;exports.line=Su;exports.lineBreakRegex=bi;exports.load=Fg;exports.log=G;exports.mapTag=Ig;exports.markerOffsets=Gt;exports.markers_default=by;exports.max=Ew;exports.min=Mw;exports.nogamma=fl;exports.numberTag=Ml;exports.objectTag=Ng;exports.parseFontSize=xs;exports.parseGenericTypes=Ha;exports.pi=Ho;exports.positionEdgeLabel=py;exports.positionNode=T_;exports.random=op;exports.regexpTag=Ag;exports.registerIconPacks=dp;exports.remarkCustomHeadingId=uA;exports.remarkFootnoteBackLink=fA;exports.remarkHtmlAnchorToLink=gA;exports.remarkHtmlInHtml=pA;exports.remarkImageSize=mA;exports.remarkParentNode=yA;exports.remarkZennMessage=xA;exports.render=lB;exports.renderKatexSanitized=rl;exports.rgbConvert=au;exports.rgba=Xe;exports.sanitizeText=pe;exports.select=pt;exports.selectSvgElement=Yu;exports.setAccDescription=Wd;exports.setAccTitle=qd;exports.setConfig2=nk;exports.setDiagramTitle=Hd;exports.setNodeElem=S_;exports.setTag=Rg;exports.setupGraphViewbox=Dd;exports.setupGraphViewbox2=Ud;exports.sin=Aw;exports.sqrt=$w;exports.stringTag=El;exports.styles2String=it;exports.symbolTag=$g;exports.tau=Ow;exports.terminalLabels=jt;exports.uint16ArrayTag=jg;exports.uint32ArrayTag=Hg;exports.uint8ArrayTag=zg;exports.uint8ClampedArrayTag=Wg;exports.unknownIcon=hp;exports.updateNodeBounds=st;exports.useMarkdownToolbarState=j0;exports.utils_default=ge;exports.withPath=bu;exports.wrapLabel=ap;