filecat 7.7.4 → 7.8.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 (205) hide show
  1. package/build/dist/1045.0e4bdc838c37771a7f50.js +1 -0
  2. package/build/dist/1075.493acb74297c1e753de2.js +1 -0
  3. package/build/dist/1128.b80776fbdbdda36034c3.js +1 -0
  4. package/build/dist/1388.1dcf844b452e3aae3dc0.js +1 -0
  5. package/build/dist/1671.fb137d27b5763953487e.js +1 -0
  6. package/build/dist/{6887.93191dae462af3692775.js → 1738.b8ab2bd79df131e60051.js} +1 -1
  7. package/build/dist/1802.e43e833638f6ba8e22d7.js +1 -0
  8. package/build/dist/1964.bd3d684b50aa5191b413.js +1 -0
  9. package/build/dist/200.bb7f6ce5543bd7ff6d97.js +1 -0
  10. package/build/dist/2105.e4ba1c1d506b3fe14e8e.js +1 -0
  11. package/build/dist/2122.bc10dcdbbfc38e0ef883.js +1 -0
  12. package/build/dist/{3457.18b45379d8bcf7f5f3b5.js → 2180.df641ebaead77c4ada71.js} +1 -1
  13. package/build/dist/2300.9e1baa1c0368abe53d96.js +2 -0
  14. package/build/dist/2479.15722ac55b05c521f4f7.js +1 -0
  15. package/build/dist/2572.8fdddfebb4da2f29dbd8.js +1 -0
  16. package/build/dist/2674.0c822a9c458f923a4eff.js +1 -0
  17. package/build/dist/{1001.44a1a25c7d6d3f294bf3.js → 2822.9417e764a14f8f5f57dc.js} +1 -1
  18. package/build/dist/2994.c492be0d907fa468a9be.js +1 -0
  19. package/build/dist/{3140.b078ec311f99170b7f4c.js → 3140.794a212da633caf38b3a.js} +2 -2
  20. package/build/dist/3230.7798ab546facfa058b34.js +1 -0
  21. package/build/dist/3283.9386fc7f67aef46604fb.js +1 -0
  22. package/build/dist/{3299.9bd4cf5d1679479639a8.js → 3299.d01f5a742d80f4e6e25b.js} +1 -1
  23. package/build/dist/3300.b8a3bc571293a6280ed8.js +1 -0
  24. package/build/dist/{3402.d412940350051a52d7ac.js → 3402.b6dc28d2f9bace7cde85.js} +1 -1
  25. package/build/dist/3509.cbcb309fbf49db53229f.js +1 -0
  26. package/build/dist/{3727.b8d9cbae9de47bf8d49b.js → 3510.b975b8bfdee5e8518215.js} +1 -1
  27. package/build/dist/{587.c75ed69a8373139346f9.js → 3566.ba323afadcf41fad2fa7.js} +1 -1
  28. package/build/dist/3608.aff9429024b740ac5cd0.js +1 -0
  29. package/build/dist/3990.5e16453f57b90b01d539.js +1 -0
  30. package/build/dist/4004.de90f1192487a24a0a9a.js +1 -0
  31. package/build/dist/4061.c0eb5824eeb6a59fa827.js +1 -0
  32. package/build/dist/4220.b65b40382726a69ba0bc.js +1 -0
  33. package/build/dist/{3883.70d42c3a335d6833f07e.js → 4376.b022a792fb34fbe50398.js} +1 -1
  34. package/build/dist/4437.4d5a0965043471411a00.js +1 -0
  35. package/build/dist/4469.536491f90535e831ce3e.js +1 -0
  36. package/build/dist/453.8877eb10f13258c290bc.js +1 -0
  37. package/build/dist/4560.8ef2e4b60cc86d019dd6.js +1 -0
  38. package/build/dist/4735.838cd0f656bbf7d99ff6.js +1 -0
  39. package/build/dist/4772.9b95c402a4def0f576e3.js +1 -0
  40. package/build/dist/4985.44cb7d829ca477e368b8.js +1 -0
  41. package/build/dist/5516.645e4a900df9bdc1806c.js +1 -0
  42. package/build/dist/5526.6b4867751becda056ed8.js +1 -0
  43. package/build/dist/5617.8efc3b1d218f80df9b39.js +1 -0
  44. package/build/dist/5744.e9f1efb88a617b05b709.js +1 -0
  45. package/build/dist/583.cef46d6b21c6fa6454cf.js +1 -0
  46. package/build/dist/6089.6d5d19a327284ff3b11c.js +1 -0
  47. package/build/dist/6164.7dae9989dd129479f952.js +1 -0
  48. package/build/dist/6284.10deb80685728f50aa45.js +1 -0
  49. package/build/dist/629.b75b024aacc43e0d69cf.js +1 -0
  50. package/build/dist/6344.291e5dadc74e62739774.js +1 -0
  51. package/build/dist/6492.3ee4060598de873d8e8f.js +1 -0
  52. package/build/dist/6571.b381c44055704e3ba649.js +1 -0
  53. package/build/dist/6731.6763296ce5ae210bc0fe.js +1 -0
  54. package/build/dist/6759.f88b50c41207cb8345d1.js +1 -0
  55. package/build/dist/{4951.88718d978aea2dd40006.js → 6789.34921a30c8a81f0a6407.js} +1 -1
  56. package/build/dist/6800.ee99fd0a88b6acbaaf2c.js +1 -0
  57. package/build/dist/6803.fe4297b1e51c3bfc7f50.js +1 -0
  58. package/build/dist/{313.d51fc773856f078487ad.js → 6806.9ebf089eba60f3b8e946.js} +1 -1
  59. package/build/dist/7038.4e4fc8e405c56d3080e2.js +1 -0
  60. package/build/dist/7310.bf944d03f24fcf109680.js +1 -0
  61. package/build/dist/{359.1b95bd6368196ccaa731.js → 7430.25bf8437ad8f7c1fd36f.js} +1 -1
  62. package/build/dist/7483.5e26ada69b33418c31a8.js +1 -0
  63. package/build/dist/{4087.4796ff56340985c35542.js → 7486.fe0b5f867c08b40a3360.js} +1 -1
  64. package/build/dist/7567.09e1b34ad9bd3e463eb4.js +1 -0
  65. package/build/dist/7834.7a593dcb80ca09f58586.js +1 -0
  66. package/build/dist/784.48a3b71205680f427109.js +1 -0
  67. package/build/dist/7943.54c702542d55f576a576.js +1 -0
  68. package/build/dist/7954.6ce241a8ed27cb26efc6.js +1 -0
  69. package/build/dist/8079.f6f2be43e5d933ae1f6f.js +1 -0
  70. package/build/dist/8677.860320b7f36947e57d11.js +1 -0
  71. package/build/dist/8727.3628c746061aed7a4077.js +1 -0
  72. package/build/dist/9299.ed4de6cd4f4bfa0a966a.js +1 -0
  73. package/build/dist/9324.ef229da9b943484298ba.js +1 -0
  74. package/build/dist/9364.d2570d78afc50fe1b23e.js +1 -0
  75. package/build/dist/9463.2629a7daf4c2865b9b96.js +1 -0
  76. package/build/dist/index.html +1 -1
  77. package/build/dist/main.98bb29605335d9b2219f.js +2 -0
  78. package/build/main.js +1 -1
  79. package/package.json +4 -5
  80. package/build/dist/1075.3ef2e1902e9f7e9e37b1.js +0 -1
  81. package/build/dist/1312.199a506fb836a2412255.js +0 -1
  82. package/build/dist/136.e3bb3c50051edb17454d.js +0 -1
  83. package/build/dist/1478.c58a43bb24820a13eaed.js +0 -1
  84. package/build/dist/1491.901cce0168c42ad319fa.js +0 -1
  85. package/build/dist/1566.4f405afd26063b55129c.js +0 -1
  86. package/build/dist/161.98f6c2a50bf3824a6efb.js +0 -1
  87. package/build/dist/1654.a21a099e2749ef167ea9.js +0 -1
  88. package/build/dist/1875.46dd3a6cc071d45a32f1.js +0 -1
  89. package/build/dist/1883.14c90bbe93fe206906f0.js +0 -1
  90. package/build/dist/1924.c7bd2a2aa0e9bc78c9ba.js +0 -1
  91. package/build/dist/2000.f55ddba9e6313243f028.js +0 -1
  92. package/build/dist/2101.d4efa6a2c1e9169d9225.js +0 -1
  93. package/build/dist/2180.60fe32ab12c2fa1570a4.js +0 -1
  94. package/build/dist/2191.4c4f2fd5127168a81877.js +0 -1
  95. package/build/dist/2213.ceffb8fd7be66b35d079.js +0 -1
  96. package/build/dist/2463.6e530d1e9b5c58dba166.js +0 -1
  97. package/build/dist/2623.8b1e5e391dd4e05fc119.js +0 -1
  98. package/build/dist/2674.3713c09449bdd57b1066.js +0 -1
  99. package/build/dist/2894.8395ec5e280cc6b6c4dc.js +0 -1
  100. package/build/dist/3042.f490cfa4208208262398.js +0 -1
  101. package/build/dist/3096.d0b2c77a23418c545c01.js +0 -1
  102. package/build/dist/311.da79ace98b69a635c41c.js +0 -1
  103. package/build/dist/3166.088cf4a0356c3a6e30a0.js +0 -1
  104. package/build/dist/3357.4f1bf81ecc3c11a3f813.js +0 -1
  105. package/build/dist/3475.d10d21b637761d7d886d.js +0 -1
  106. package/build/dist/3708.04401b24d95214d641e5.js +0 -1
  107. package/build/dist/3752.01fc1f14b29f340e41fd.js +0 -1
  108. package/build/dist/3871.7a387a9dc21883d08423.js +0 -1
  109. package/build/dist/3994.19fb81947d65fc81b0a2.js +0 -1
  110. package/build/dist/4012.b516fdc981e55be2ebb2.js +0 -1
  111. package/build/dist/4122.9ea6b5dd8dc9d2265825.js +0 -1
  112. package/build/dist/4141.06960673a6a484e7b88d.js +0 -1
  113. package/build/dist/4190.ff72264b4f07f6542d33.js +0 -1
  114. package/build/dist/4239.1b49d7c26192fb637d57.js +0 -1
  115. package/build/dist/4288.8dc8f5d962720e084952.js +0 -1
  116. package/build/dist/434.04cdc2a05316f92d1d38.js +0 -1
  117. package/build/dist/4376.f3c60897f70dd4e33d2f.js +0 -1
  118. package/build/dist/4472.9e708dd3e1c9db7d7396.js +0 -1
  119. package/build/dist/4473.b42b37616f13be64199b.js +0 -1
  120. package/build/dist/449.3fd75e05da22fe1c5ecc.js +0 -1
  121. package/build/dist/452.4974390f4f4d991216e5.js +0 -1
  122. package/build/dist/4547.36b5848220c04c47bc80.js +0 -1
  123. package/build/dist/4605.ef0f4204b3bf3a18efa6.js +0 -1
  124. package/build/dist/4804.fbd0ffcf57d9dffc15b7.js +0 -1
  125. package/build/dist/482.0c7512372a1fbf61d704.js +0 -1
  126. package/build/dist/4963.22d7db9b376a42d3f00b.js +0 -1
  127. package/build/dist/5097.a0de16bf7b90a8b1157d.js +0 -1
  128. package/build/dist/5123.d9ed79af478b5cc4f1b2.js +0 -1
  129. package/build/dist/5332.8b6e85d8764e907a01d5.js +0 -1
  130. package/build/dist/536.660d866952b46ba53180.js +0 -1
  131. package/build/dist/548.d3d912d0c0c7e835e1dc.js +0 -1
  132. package/build/dist/5516.cc92dfbf06ddcd133dbc.js +0 -1
  133. package/build/dist/5590.585778da623ec71f7722.js +0 -1
  134. package/build/dist/5616.14df0fe505c4dadf4042.js +0 -1
  135. package/build/dist/5695.95dc69f3b02812eb9e93.js +0 -1
  136. package/build/dist/5697.6ac62f99ca19a979f1eb.js +0 -1
  137. package/build/dist/5741.237d817efc942de875e5.js +0 -1
  138. package/build/dist/5849.d26365d4b19533db6fd6.js +0 -1
  139. package/build/dist/5902.3969a79465383ff4bbb4.js +0 -1
  140. package/build/dist/5942.981e03467a3b2c653ab8.js +0 -1
  141. package/build/dist/6029.63e4beb66df7afc65a90.js +0 -1
  142. package/build/dist/6054.f91307b52046172fc5f8.js +0 -1
  143. package/build/dist/6089.0863a6a09be2b97e84e1.js +0 -1
  144. package/build/dist/6095.d845e356a4db8a241cdb.js +0 -1
  145. package/build/dist/6114.ca67e88c701691b3bb1e.js +0 -1
  146. package/build/dist/612.74d77e32957a5c6eb197.js +0 -1
  147. package/build/dist/625.d9e531476b3306e0b837.js +0 -1
  148. package/build/dist/6318.66541f9cef18d14ea3ea.js +0 -1
  149. package/build/dist/6455.5c950f6eb61015409eb6.js +0 -1
  150. package/build/dist/6527.436d2d5d81376e6a54ae.js +0 -1
  151. package/build/dist/6530.2f1b283a902603262048.js +0 -1
  152. package/build/dist/6610.b92f337fcc1b347350fb.js +0 -1
  153. package/build/dist/6926.2786af754adcdabfbede.js +0 -1
  154. package/build/dist/697.62f8b1ec6d2cd40ed316.js +0 -1
  155. package/build/dist/70.be2f9130c93c4175d12f.js +0 -1
  156. package/build/dist/7081.9e1e196fecfcccb4bfb9.js +0 -1
  157. package/build/dist/7128.3573ab2a5f28b79ba89e.js +0 -1
  158. package/build/dist/7163.ad09accaa87e565b8dc0.js +0 -1
  159. package/build/dist/72.a1d87dabb7f0615b3a21.js +0 -1
  160. package/build/dist/7229.50a1700104d1e4732735.js +0 -1
  161. package/build/dist/7332.d024ae75a3da2f7674a1.js +0 -1
  162. package/build/dist/7509.370c49d7ff43e289190c.js +0 -1
  163. package/build/dist/7514.dbf525bade6ffbd70af6.js +0 -2
  164. package/build/dist/7557.7d62939c56391a647067.js +0 -1
  165. package/build/dist/7588.2d840229f62de92b22e5.js +0 -1
  166. package/build/dist/7632.5660653552f755580adc.js +0 -1
  167. package/build/dist/7639.b3c6382de2fde652a40b.js +0 -1
  168. package/build/dist/779.91614fabf5c9eb3aafa0.js +0 -1
  169. package/build/dist/7810.979796e8a3aad6d4d72f.js +0 -1
  170. package/build/dist/7897.8b8070d6abe5c2327168.js +0 -1
  171. package/build/dist/7941.dbef0b0f412899800b13.js +0 -1
  172. package/build/dist/7953.5cd280effe2e967ea490.js +0 -1
  173. package/build/dist/7954.efecc100b407af204add.js +0 -1
  174. package/build/dist/7959.e31a21f28ff463d9d5e9.js +0 -1
  175. package/build/dist/8034.301f1099c4a7ce6c2829.js +0 -1
  176. package/build/dist/8080.e1c9af30bdd818b08c6e.js +0 -1
  177. package/build/dist/8087.6452b67614a0855535a4.js +0 -1
  178. package/build/dist/8140.bbccc589b007f9d410d1.js +0 -1
  179. package/build/dist/8162.e47cccbe327b26a2ea6f.js +0 -1
  180. package/build/dist/8322.56c8f4b4ad93b1a866c8.js +0 -1
  181. package/build/dist/8376.01a9f23ba06a78922364.js +0 -1
  182. package/build/dist/8433.e54d57e2cc9408e5e411.js +0 -1
  183. package/build/dist/8460.25f0859cb2266f764113.js +0 -1
  184. package/build/dist/8524.7945bff0063dc5c5903d.js +0 -1
  185. package/build/dist/8782.a5498372f1eb6bab41b7.js +0 -1
  186. package/build/dist/8953.23fe6fe13b28168428d3.js +0 -1
  187. package/build/dist/8964.bdf168262ab40956654a.js +0 -1
  188. package/build/dist/9003.69a0d15e722e1ed455b0.js +0 -1
  189. package/build/dist/9299.c2699815e5339e4045f8.js +0 -1
  190. package/build/dist/9385.2b1afe7b55d4c16f97ad.js +0 -1
  191. package/build/dist/9428.3176bab8f5780f060d51.js +0 -1
  192. package/build/dist/9456.506d55e351dec4f45566.js +0 -1
  193. package/build/dist/9465.8ff5871fb708cf7c1021.js +0 -1
  194. package/build/dist/9500.95d19d78b580734ec35e.js +0 -1
  195. package/build/dist/9512.03215278f26dc63c056d.js +0 -1
  196. package/build/dist/9614.cfdbe03d8e2960b0a53a.js +0 -1
  197. package/build/dist/9651.6bf3e34362f10c1aa35d.js +0 -1
  198. package/build/dist/9788.4a1c2f3626e532d3b44c.js +0 -1
  199. package/build/dist/9943.b62436bd9d0730c715a9.js +0 -1
  200. package/build/dist/9967.216bc8d26440bcbaf785.js +0 -1
  201. package/build/dist/9970.aa60aa700a790ba226f0.js +0 -1
  202. package/build/dist/main.7a6fed9f5f814a194409.js +0 -2
  203. /package/build/dist/{7514.dbf525bade6ffbd70af6.js.LICENSE.txt → 2300.9e1baa1c0368abe53d96.js.LICENSE.txt} +0 -0
  204. /package/build/dist/{3140.b078ec311f99170b7f4c.js.LICENSE.txt → 3140.794a212da633caf38b3a.js.LICENSE.txt} +0 -0
  205. /package/build/dist/{main.7a6fed9f5f814a194409.js.LICENSE.txt → main.98bb29605335d9b2219f.js.LICENSE.txt} +0 -0
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[9465],{3234(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.BLANK_URL=e.relativeFirstCharacters=e.whitespaceEscapeCharsRegex=e.urlSchemeRegex=e.ctrlCharactersRegex=e.htmlCtrlEntityRegex=e.htmlEntitiesRegex=e.invalidProtocolRegex=void 0,e.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,e.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,e.htmlCtrlEntityRegex=/&(newline|tab);/gi,e.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,e.urlSchemeRegex=/^.+(:|&colon;)/gim,e.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,e.relativeFirstCharacters=[".","/"],e.BLANK_URL="about:blank"},62559(t,e,r){e.J=function(t){if(!t)return i.BLANK_URL;var e,r=a(t.trim());do{e=(r=a(r=o(r).replace(i.htmlCtrlEntityRegex,"").replace(i.ctrlCharactersRegex,"").replace(i.whitespaceEscapeCharsRegex,"").trim())).match(i.ctrlCharactersRegex)||r.match(i.htmlEntitiesRegex)||r.match(i.htmlCtrlEntityRegex)||r.match(i.whitespaceEscapeCharsRegex)}while(e&&e.length>0);var s=r;if(!s)return i.BLANK_URL;if(function(t){return i.relativeFirstCharacters.indexOf(t[0])>-1}(s))return s;var l=s.trimStart(),n=l.match(i.urlSchemeRegex);if(!n)return s;var h=n[0].toLowerCase().trim();if(i.invalidProtocolRegex.test(h))return i.BLANK_URL;var c=l.replace(/\\/g,"/");if("mailto:"===h||h.includes("://"))return c;if("http:"===h||"https:"===h){if(!function(t){return URL.canParse(t)}(c))return i.BLANK_URL;var d=new URL(c);return d.protocol=d.protocol.toLowerCase(),d.hostname=d.hostname.toLowerCase(),d.toString()}return c};var i=r(3234);function o(t){return t.replace(i.ctrlCharactersRegex,"").replace(i.htmlEntitiesRegex,function(t,e){return String.fromCharCode(e)})}function a(t){try{return decodeURIComponent(t)}catch(e){return t}}},61057(t,e,r){function i(t,e,r){if(t&&t.length){const[i,o]=e,a=Math.PI/180*r,s=Math.cos(a),l=Math.sin(a);for(const e of t){const[t,r]=e;e[0]=(t-i)*s-(r-o)*l+i,e[1]=(t-i)*l+(r-o)*s+o}}}function o(t,e){return t[0]===e[0]&&t[1]===e[1]}function a(t,e,r,a=1){const s=r,l=Math.max(e,.1),n=t[0]&&t[0][0]&&"number"==typeof t[0][0]?[t]:t,h=[0,0];if(s)for(const t of n)i(t,h,s);const c=function(t,e,r){const i=[];for(const e of t){const t=[...e];o(t[0],t[t.length-1])||t.push([t[0][0],t[0][1]]),t.length>2&&i.push(t)}const a=[];e=Math.max(e,.1);const s=[];for(const t of i)for(let e=0;e<t.length-1;e++){const r=t[e],i=t[e+1];if(r[1]!==i[1]){const t=Math.min(r[1],i[1]);s.push({ymin:t,ymax:Math.max(r[1],i[1]),x:t===r[1]?r[0]:i[0],islope:(i[0]-r[0])/(i[1]-r[1])})}}if(s.sort((t,e)=>t.ymin<e.ymin?-1:t.ymin>e.ymin?1:t.x<e.x?-1:t.x>e.x?1:t.ymax===e.ymax?0:(t.ymax-e.ymax)/Math.abs(t.ymax-e.ymax)),!s.length)return a;let l=[],n=s[0].ymin,h=0;for(;l.length||s.length;){if(s.length){let t=-1;for(let e=0;e<s.length&&!(s[e].ymin>n);e++)t=e;s.splice(0,t+1).forEach(t=>{l.push({s:n,edge:t})})}if(l=l.filter(t=>!(t.edge.ymax<=n)),l.sort((t,e)=>t.edge.x===e.edge.x?0:(t.edge.x-e.edge.x)/Math.abs(t.edge.x-e.edge.x)),(1!==r||h%e==0)&&l.length>1)for(let t=0;t<l.length;t+=2){const e=t+1;if(e>=l.length)break;const r=l[t].edge,i=l[e].edge;a.push([[Math.round(r.x),n],[Math.round(i.x),n]])}n+=r,l.forEach(t=>{t.edge.x=t.edge.x+r*t.edge.islope}),h++}return a}(n,l,a);if(s){for(const t of n)i(t,h,-s);!function(t,e,r){const o=[];t.forEach(t=>o.push(...t)),i(o,e,r)}(c,h,-s)}return c}function s(t,e){var r;const i=e.hachureAngle+90;let o=e.hachureGap;o<0&&(o=4*e.strokeWidth),o=Math.round(Math.max(o,.1));let s=1;return e.roughness>=1&&((null===(r=e.randomizer)||void 0===r?void 0:r.next())||Math.random())>.7&&(s=o),a(t,o,i,s||1)}r.d(e,{A:()=>ot});class l{constructor(t){this.helper=t}fillPolygons(t,e){return this._fillPolygons(t,e)}_fillPolygons(t,e){const r=s(t,e);return{type:"fillSketch",ops:this.renderLines(r,e)}}renderLines(t,e){const r=[];for(const i of t)r.push(...this.helper.doubleLineOps(i[0][0],i[0][1],i[1][0],i[1][1],e));return r}}function n(t){const e=t[0],r=t[1];return Math.sqrt(Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2))}class h extends l{fillPolygons(t,e){let r=e.hachureGap;r<0&&(r=4*e.strokeWidth),r=Math.max(r,.1);const i=s(t,Object.assign({},e,{hachureGap:r})),o=Math.PI/180*e.hachureAngle,a=[],l=.5*r*Math.cos(o),h=.5*r*Math.sin(o);for(const[t,e]of i)n([t,e])&&a.push([[t[0]-l,t[1]+h],[...e]],[[t[0]+l,t[1]-h],[...e]]);return{type:"fillSketch",ops:this.renderLines(a,e)}}}class c extends l{fillPolygons(t,e){const r=this._fillPolygons(t,e),i=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),o=this._fillPolygons(t,i);return r.ops=r.ops.concat(o.ops),r}}class d{constructor(t){this.helper=t}fillPolygons(t,e){const r=s(t,e=Object.assign({},e,{hachureAngle:0}));return this.dotsOnLines(r,e)}dotsOnLines(t,e){const r=[];let i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.max(i,.1);let o=e.fillWeight;o<0&&(o=e.strokeWidth/2);const a=i/4;for(const s of t){const t=n(s),l=t/i,h=Math.ceil(l)-1,c=t-h*i,d=(s[0][0]+s[1][0])/2-i/4,g=Math.min(s[0][1],s[1][1]);for(let t=0;t<h;t++){const s=g+c+t*i,l=d-a+2*Math.random()*a,n=s-a+2*Math.random()*a,h=this.helper.ellipse(l,n,o,o,e);r.push(...h.ops)}}return{type:"fillSketch",ops:r}}}class g{constructor(t){this.helper=t}fillPolygons(t,e){const r=s(t,e);return{type:"fillSketch",ops:this.dashedLine(r,e)}}dashedLine(t,e){const r=e.dashOffset<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashOffset,i=e.dashGap<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashGap,o=[];return t.forEach(t=>{const a=n(t),s=Math.floor(a/(r+i)),l=(a+i-s*(r+i))/2;let h=t[0],c=t[1];h[0]>c[0]&&(h=t[1],c=t[0]);const d=Math.atan((c[1]-h[1])/(c[0]-h[0]));for(let t=0;t<s;t++){const a=t*(r+i),s=a+r,n=[h[0]+a*Math.cos(d)+l*Math.cos(d),h[1]+a*Math.sin(d)+l*Math.sin(d)],c=[h[0]+s*Math.cos(d)+l*Math.cos(d),h[1]+s*Math.sin(d)+l*Math.sin(d)];o.push(...this.helper.doubleLineOps(n[0],n[1],c[0],c[1],e))}}),o}}class p{constructor(t){this.helper=t}fillPolygons(t,e){const r=e.hachureGap<0?4*e.strokeWidth:e.hachureGap,i=e.zigzagOffset<0?r:e.zigzagOffset,o=s(t,e=Object.assign({},e,{hachureGap:r+i}));return{type:"fillSketch",ops:this.zigzagLines(o,i,e)}}zigzagLines(t,e,r){const i=[];return t.forEach(t=>{const o=n(t),a=Math.round(o/(2*e));let s=t[0],l=t[1];s[0]>l[0]&&(s=t[1],l=t[0]);const h=Math.atan((l[1]-s[1])/(l[0]-s[0]));for(let t=0;t<a;t++){const o=2*t*e,a=2*(t+1)*e,l=Math.sqrt(2*Math.pow(e,2)),n=[s[0]+o*Math.cos(h),s[1]+o*Math.sin(h)],c=[s[0]+a*Math.cos(h),s[1]+a*Math.sin(h)],d=[n[0]+l*Math.cos(h+Math.PI/4),n[1]+l*Math.sin(h+Math.PI/4)];i.push(...this.helper.doubleLineOps(n[0],n[1],d[0],d[1],r),...this.helper.doubleLineOps(d[0],d[1],c[0],c[1],r))}}),i}}const u={};class y{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const C={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function m(t,e){return t.type===e}function f(t){const e=[],r=function(t){const e=new Array;for(;""!==t;)if(t.match(/^([ \t\r\n,]+)/))t=t.substr(RegExp.$1.length);else if(t.match(/^([aAcChHlLmMqQsStTvVzZ])/))e[e.length]={type:0,text:RegExp.$1},t=t.substr(RegExp.$1.length);else{if(!t.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];e[e.length]={type:1,text:`${parseFloat(RegExp.$1)}`},t=t.substr(RegExp.$1.length)}return e[e.length]={type:2,text:""},e}(t);let i="BOD",o=0,a=r[o];for(;!m(a,2);){let s=0;const l=[];if("BOD"===i){if("M"!==a.text&&"m"!==a.text)return f("M0,0"+t);o++,s=C[a.text],i=a.text}else m(a,1)?s=C[i]:(o++,s=C[a.text],i=a.text);if(!(o+s<r.length))throw new Error("Path data ended short");for(let t=o;t<o+s;t++){const e=r[t];if(!m(e,1))throw new Error("Param not a number: "+i+","+e.text);l[l.length]=+e.text}if("number"!=typeof C[i])throw new Error("Bad segment: "+i);{const t={key:i,data:l};e.push(t),o+=s,a=r[o],"M"===i&&(i="L"),"m"===i&&(i="l")}}return e}function x(t){let e=0,r=0,i=0,o=0;const a=[];for(const{key:s,data:l}of t)switch(s){case"M":a.push({key:"M",data:[...l]}),[e,r]=l,[i,o]=l;break;case"m":e+=l[0],r+=l[1],a.push({key:"M",data:[e,r]}),i=e,o=r;break;case"L":a.push({key:"L",data:[...l]}),[e,r]=l;break;case"l":e+=l[0],r+=l[1],a.push({key:"L",data:[e,r]});break;case"C":a.push({key:"C",data:[...l]}),e=l[4],r=l[5];break;case"c":{const t=l.map((t,i)=>i%2?t+r:t+e);a.push({key:"C",data:t}),e=t[4],r=t[5];break}case"Q":a.push({key:"Q",data:[...l]}),e=l[2],r=l[3];break;case"q":{const t=l.map((t,i)=>i%2?t+r:t+e);a.push({key:"Q",data:t}),e=t[2],r=t[3];break}case"A":a.push({key:"A",data:[...l]}),e=l[5],r=l[6];break;case"a":e+=l[5],r+=l[6],a.push({key:"A",data:[l[0],l[1],l[2],l[3],l[4],e,r]});break;case"H":a.push({key:"H",data:[...l]}),e=l[0];break;case"h":e+=l[0],a.push({key:"H",data:[e]});break;case"V":a.push({key:"V",data:[...l]}),r=l[0];break;case"v":r+=l[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...l]}),e=l[2],r=l[3];break;case"s":{const t=l.map((t,i)=>i%2?t+r:t+e);a.push({key:"S",data:t}),e=t[2],r=t[3];break}case"T":a.push({key:"T",data:[...l]}),e=l[0],r=l[1];break;case"t":e+=l[0],r+=l[1],a.push({key:"T",data:[e,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),e=i,r=o}return a}function b(t){const e=[];let r="",i=0,o=0,a=0,s=0,l=0,n=0;for(const{key:h,data:c}of t){switch(h){case"M":e.push({key:"M",data:[...c]}),[i,o]=c,[a,s]=c;break;case"C":e.push({key:"C",data:[...c]}),i=c[4],o=c[5],l=c[2],n=c[3];break;case"L":e.push({key:"L",data:[...c]}),[i,o]=c;break;case"H":i=c[0],e.push({key:"L",data:[i,o]});break;case"V":o=c[0],e.push({key:"L",data:[i,o]});break;case"S":{let t=0,a=0;"C"===r||"S"===r?(t=i+(i-l),a=o+(o-n)):(t=i,a=o),e.push({key:"C",data:[t,a,...c]}),l=c[0],n=c[1],i=c[2],o=c[3];break}case"T":{const[t,a]=c;let s=0,h=0;"Q"===r||"T"===r?(s=i+(i-l),h=o+(o-n)):(s=i,h=o);const d=i+2*(s-i)/3,g=o+2*(h-o)/3,p=t+2*(s-t)/3,u=a+2*(h-a)/3;e.push({key:"C",data:[d,g,p,u,t,a]}),l=s,n=h,i=t,o=a;break}case"Q":{const[t,r,a,s]=c,h=i+2*(t-i)/3,d=o+2*(r-o)/3,g=a+2*(t-a)/3,p=s+2*(r-s)/3;e.push({key:"C",data:[h,d,g,p,a,s]}),l=t,n=r,i=a,o=s;break}case"A":{const t=Math.abs(c[0]),r=Math.abs(c[1]),a=c[2],s=c[3],l=c[4],n=c[5],h=c[6];0===t||0===r?(e.push({key:"C",data:[i,o,n,h,n,h]}),i=n,o=h):i===n&&o===h||(B(i,o,n,h,t,r,a,s,l).forEach(function(t){e.push({key:"C",data:t})}),i=n,o=h);break}case"Z":e.push({key:"Z",data:[]}),i=a,o=s}r=h}return e}function k(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}function B(t,e,r,i,o,a,s,l,n,h){const c=(d=s,Math.PI*d/180);var d;let g=[],p=0,u=0,y=0,C=0;if(h)[p,u,y,C]=h;else{[t,e]=k(t,e,-c),[r,i]=k(r,i,-c);const s=(t-r)/2,h=(e-i)/2;let d=s*s/(o*o)+h*h/(a*a);d>1&&(d=Math.sqrt(d),o*=d,a*=d);const g=o*o,m=a*a,f=g*m-g*h*h-m*s*s,x=g*h*h+m*s*s,b=(l===n?-1:1)*Math.sqrt(Math.abs(f/x));y=b*o*h/a+(t+r)/2,C=b*-a*s/o+(e+i)/2,p=Math.asin(parseFloat(((e-C)/a).toFixed(9))),u=Math.asin(parseFloat(((i-C)/a).toFixed(9))),t<y&&(p=Math.PI-p),r<y&&(u=Math.PI-u),p<0&&(p=2*Math.PI+p),u<0&&(u=2*Math.PI+u),n&&p>u&&(p-=2*Math.PI),!n&&u>p&&(u-=2*Math.PI)}let m=u-p;if(Math.abs(m)>120*Math.PI/180){const t=u,e=r,l=i;u=n&&u>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,g=B(r=y+o*Math.cos(u),i=C+a*Math.sin(u),e,l,o,a,s,0,n,[u,t,y,C])}m=u-p;const f=Math.cos(p),x=Math.sin(p),b=Math.cos(u),S=Math.sin(u),w=Math.tan(m/4),T=4/3*o*w,A=4/3*a*w,F=[t,e],L=[t+T*x,e-A*f],v=[r+T*S,i-A*b],M=[r,i];if(L[0]=2*F[0]-L[0],L[1]=2*F[1]-L[1],h)return[L,v,M].concat(g);{g=[L,v,M].concat(g);const t=[];for(let e=0;e<g.length;e+=3){const r=k(g[e][0],g[e][1],c),i=k(g[e+1][0],g[e+1][1],c),o=k(g[e+2][0],g[e+2][1],c);t.push([r[0],r[1],i[0],i[1],o[0],o[1]])}return t}}const S={randOffset:function(t,e){return I(t,e)},randOffsetWithRange:function(t,e,r){return O(t,e,r)},ellipse:function(t,e,r,i,o){return L(t,e,o,F(r,i,o)).opset},doubleLineOps:function(t,e,r,i,o){return q(t,e,r,i,o,!0)}};function w(t,e,r,i,o){return{type:"path",ops:q(t,e,r,i,o)}}function T(t,e,r){const i=(t||[]).length;if(i>2){const o=[];for(let e=0;e<i-1;e++)o.push(...q(t[e][0],t[e][1],t[e+1][0],t[e+1][1],r));return e&&o.push(...q(t[i-1][0],t[i-1][1],t[0][0],t[0][1],r)),{type:"path",ops:o}}return 2===i?w(t[0][0],t[0][1],t[1][0],t[1][1],r):{type:"path",ops:[]}}function A(t,e){if(t.length){const r="number"==typeof t[0][0]?[t]:t,i=W(r[0],1*(1+.2*e.roughness),e),o=e.disableMultiStroke?[]:W(r[0],1.5*(1+.22*e.roughness),$(e));for(let t=1;t<r.length;t++){const a=r[t];if(a.length){const t=W(a,1*(1+.2*e.roughness),e),r=e.disableMultiStroke?[]:W(a,1.5*(1+.22*e.roughness),$(e));for(const e of t)"move"!==e.op&&i.push(e);for(const t of r)"move"!==t.op&&o.push(t)}}return{type:"path",ops:i.concat(o)}}return{type:"path",ops:[]}}function F(t,e,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(t/2,2)+Math.pow(e/2,2))/2)),o=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),a=2*Math.PI/o;let s=Math.abs(t/2),l=Math.abs(e/2);const n=1-r.curveFitting;return s+=I(s*n,r),l+=I(l*n,r),{increment:a,rx:s,ry:l}}function L(t,e,r,i){const[o,a]=z(i.increment,t,e,i.rx,i.ry,1,i.increment*O(.1,O(.4,1,r),r),r);let s=P(o,null,r);if(!r.disableMultiStroke&&0!==r.roughness){const[o]=z(i.increment,t,e,i.rx,i.ry,1.5,0,r),a=P(o,null,r);s=s.concat(a)}return{estimatedPoints:a,opset:{type:"path",ops:s}}}function v(t,e,r,i,o,a,s,l,n){const h=t,c=e;let d=Math.abs(r/2),g=Math.abs(i/2);d+=I(.01*d,n),g+=I(.01*g,n);let p=o,u=a;for(;p<0;)p+=2*Math.PI,u+=2*Math.PI;u-p>2*Math.PI&&(p=0,u=2*Math.PI);const y=2*Math.PI/n.curveStepCount,C=Math.min(y/2,(u-p)/2),m=R(C,h,c,d,g,p,u,1,n);if(!n.disableMultiStroke){const t=R(C,h,c,d,g,p,u,1.5,n);m.push(...t)}return s&&(l?m.push(...q(h,c,h+d*Math.cos(p),c+g*Math.sin(p),n),...q(h,c,h+d*Math.cos(u),c+g*Math.sin(u),n)):m.push({op:"lineTo",data:[h,c]},{op:"lineTo",data:[h+d*Math.cos(p),c+g*Math.sin(p)]})),{type:"path",ops:m}}function M(t,e){const r=b(x(f(t))),i=[];let o=[0,0],a=[0,0];for(const{key:t,data:s}of r)switch(t){case"M":a=[s[0],s[1]],o=[s[0],s[1]];break;case"L":i.push(...q(a[0],a[1],s[0],s[1],e)),a=[s[0],s[1]];break;case"C":{const[t,r,o,l,n,h]=s;i.push(...N(t,r,o,l,n,h,a,e)),a=[n,h];break}case"Z":i.push(...q(a[0],a[1],o[0],o[1],e)),a=[o[0],o[1]]}return{type:"path",ops:i}}function E(t,e){const r=[];for(const i of t)if(i.length){const t=e.maxRandomnessOffset||0,o=i.length;if(o>2){r.push({op:"move",data:[i[0][0]+I(t,e),i[0][1]+I(t,e)]});for(let a=1;a<o;a++)r.push({op:"lineTo",data:[i[a][0]+I(t,e),i[a][1]+I(t,e)]})}}return{type:"fillPath",ops:r}}function K(t,e){return function(t,e){let r=t.fillStyle||"hachure";if(!u[r])switch(r){case"zigzag":u[r]||(u[r]=new h(e));break;case"cross-hatch":u[r]||(u[r]=new c(e));break;case"dots":u[r]||(u[r]=new d(e));break;case"dashed":u[r]||(u[r]=new g(e));break;case"zigzag-line":u[r]||(u[r]=new p(e));break;default:r="hachure",u[r]||(u[r]=new l(e))}return u[r]}(e,S).fillPolygons(t,e)}function $(t){const e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e}function _(t){return t.randomizer||(t.randomizer=new y(t.seed||0)),t.randomizer.next()}function O(t,e,r,i=1){return r.roughness*i*(_(r)*(e-t)+t)}function I(t,e,r=1){return O(-t,t,e,r)}function q(t,e,r,i,o,a=!1){const s=a?o.disableMultiStrokeFill:o.disableMultiStroke,l=D(t,e,r,i,o,!0,!1);if(s)return l;const n=D(t,e,r,i,o,!0,!0);return l.concat(n)}function D(t,e,r,i,o,a,s){const l=Math.pow(t-r,2)+Math.pow(e-i,2),n=Math.sqrt(l);let h=1;h=n<200?1:n>500?.4:-.0016668*n+1.233334;let c=o.maxRandomnessOffset||0;c*c*100>l&&(c=n/10);const d=c/2,g=.2+.2*_(o);let p=o.bowing*o.maxRandomnessOffset*(i-e)/200,u=o.bowing*o.maxRandomnessOffset*(t-r)/200;p=I(p,o,h),u=I(u,o,h);const y=[],C=()=>I(d,o,h),m=()=>I(c,o,h),f=o.preserveVertices;return a&&(s?y.push({op:"move",data:[t+(f?0:C()),e+(f?0:C())]}):y.push({op:"move",data:[t+(f?0:I(c,o,h)),e+(f?0:I(c,o,h))]})),s?y.push({op:"bcurveTo",data:[p+t+(r-t)*g+C(),u+e+(i-e)*g+C(),p+t+2*(r-t)*g+C(),u+e+2*(i-e)*g+C(),r+(f?0:C()),i+(f?0:C())]}):y.push({op:"bcurveTo",data:[p+t+(r-t)*g+m(),u+e+(i-e)*g+m(),p+t+2*(r-t)*g+m(),u+e+2*(i-e)*g+m(),r+(f?0:m()),i+(f?0:m())]}),y}function W(t,e,r){if(!t.length)return[];const i=[];i.push([t[0][0]+I(e,r),t[0][1]+I(e,r)]),i.push([t[0][0]+I(e,r),t[0][1]+I(e,r)]);for(let o=1;o<t.length;o++)i.push([t[o][0]+I(e,r),t[o][1]+I(e,r)]),o===t.length-1&&i.push([t[o][0]+I(e,r),t[o][1]+I(e,r)]);return P(i,null,r)}function P(t,e,r){const i=t.length,o=[];if(i>3){const a=[],s=1-r.curveTightness;o.push({op:"move",data:[t[1][0],t[1][1]]});for(let e=1;e+2<i;e++){const r=t[e];a[0]=[r[0],r[1]],a[1]=[r[0]+(s*t[e+1][0]-s*t[e-1][0])/6,r[1]+(s*t[e+1][1]-s*t[e-1][1])/6],a[2]=[t[e+1][0]+(s*t[e][0]-s*t[e+2][0])/6,t[e+1][1]+(s*t[e][1]-s*t[e+2][1])/6],a[3]=[t[e+1][0],t[e+1][1]],o.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}if(e&&2===e.length){const t=r.maxRandomnessOffset;o.push({op:"lineTo",data:[e[0]+I(t,r),e[1]+I(t,r)]})}}else 3===i?(o.push({op:"move",data:[t[1][0],t[1][1]]}),o.push({op:"bcurveTo",data:[t[1][0],t[1][1],t[2][0],t[2][1],t[2][0],t[2][1]]})):2===i&&o.push(...D(t[0][0],t[0][1],t[1][0],t[1][1],r,!0,!0));return o}function z(t,e,r,i,o,a,s,l){const n=[],h=[];if(0===l.roughness){t/=4,h.push([e+i*Math.cos(-t),r+o*Math.sin(-t)]);for(let a=0;a<=2*Math.PI;a+=t){const t=[e+i*Math.cos(a),r+o*Math.sin(a)];n.push(t),h.push(t)}h.push([e+i*Math.cos(0),r+o*Math.sin(0)]),h.push([e+i*Math.cos(t),r+o*Math.sin(t)])}else{const c=I(.5,l)-Math.PI/2;h.push([I(a,l)+e+.9*i*Math.cos(c-t),I(a,l)+r+.9*o*Math.sin(c-t)]);const d=2*Math.PI+c-.01;for(let s=c;s<d;s+=t){const t=[I(a,l)+e+i*Math.cos(s),I(a,l)+r+o*Math.sin(s)];n.push(t),h.push(t)}h.push([I(a,l)+e+i*Math.cos(c+2*Math.PI+.5*s),I(a,l)+r+o*Math.sin(c+2*Math.PI+.5*s)]),h.push([I(a,l)+e+.98*i*Math.cos(c+s),I(a,l)+r+.98*o*Math.sin(c+s)]),h.push([I(a,l)+e+.9*i*Math.cos(c+.5*s),I(a,l)+r+.9*o*Math.sin(c+.5*s)])}return[h,n]}function R(t,e,r,i,o,a,s,l,n){const h=a+I(.1,n),c=[];c.push([I(l,n)+e+.9*i*Math.cos(h-t),I(l,n)+r+.9*o*Math.sin(h-t)]);for(let a=h;a<=s;a+=t)c.push([I(l,n)+e+i*Math.cos(a),I(l,n)+r+o*Math.sin(a)]);return c.push([e+i*Math.cos(s),r+o*Math.sin(s)]),c.push([e+i*Math.cos(s),r+o*Math.sin(s)]),P(c,null,n)}function N(t,e,r,i,o,a,s,l){const n=[],h=[l.maxRandomnessOffset||1,(l.maxRandomnessOffset||1)+.3];let c=[0,0];const d=l.disableMultiStroke?1:2,g=l.preserveVertices;for(let p=0;p<d;p++)0===p?n.push({op:"move",data:[s[0],s[1]]}):n.push({op:"move",data:[s[0]+(g?0:I(h[0],l)),s[1]+(g?0:I(h[0],l))]}),c=g?[o,a]:[o+I(h[p],l),a+I(h[p],l)],n.push({op:"bcurveTo",data:[t+I(h[p],l),e+I(h[p],l),r+I(h[p],l),i+I(h[p],l),c[0],c[1]]});return n}function j(t){return[...t]}function H(t,e=0){const r=t.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(3===r)i.push(j(t[0]),j(t[1]),j(t[2]),j(t[2]));else{const r=[];r.push(t[0],t[0]);for(let e=1;e<t.length;e++)r.push(t[e]),e===t.length-1&&r.push(t[e]);const o=[],a=1-e;i.push(j(r[0]));for(let t=1;t+2<r.length;t++){const e=r[t];o[0]=[e[0],e[1]],o[1]=[e[0]+(a*r[t+1][0]-a*r[t-1][0])/6,e[1]+(a*r[t+1][1]-a*r[t-1][1])/6],o[2]=[r[t+1][0]+(a*r[t][0]-a*r[t+2][0])/6,r[t+1][1]+(a*r[t][1]-a*r[t+2][1])/6],o[3]=[r[t+1][0],r[t+1][1]],i.push(o[1],o[2],o[3])}}return i}function G(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)}function X(t,e,r){const i=G(e,r);if(0===i)return G(t,e);let o=((t[0]-e[0])*(r[0]-e[0])+(t[1]-e[1])*(r[1]-e[1]))/i;return o=Math.max(0,Math.min(1,o)),G(t,U(e,r,o))}function U(t,e,r){return[t[0]+(e[0]-t[0])*r,t[1]+(e[1]-t[1])*r]}function Y(t,e,r,i){const o=i||[];if(function(t,e){const r=t[e+0],i=t[e+1],o=t[e+2],a=t[e+3];let s=3*i[0]-2*r[0]-a[0];s*=s;let l=3*i[1]-2*r[1]-a[1];l*=l;let n=3*o[0]-2*a[0]-r[0];n*=n;let h=3*o[1]-2*a[1]-r[1];return h*=h,s<n&&(s=n),l<h&&(l=h),s+l}(t,e)<r){const r=t[e+0];o.length?(a=o[o.length-1],s=r,Math.sqrt(G(a,s))>1&&o.push(r)):o.push(r),o.push(t[e+3])}else{const i=.5,a=t[e+0],s=t[e+1],l=t[e+2],n=t[e+3],h=U(a,s,i),c=U(s,l,i),d=U(l,n,i),g=U(h,c,i),p=U(c,d,i),u=U(g,p,i);Y([a,h,g,u],0,r,o),Y([u,p,d,n],0,r,o)}var a,s;return o}function V(t,e){return Z(t,0,t.length,e)}function Z(t,e,r,i,o){const a=o||[],s=t[e],l=t[r-1];let n=0,h=1;for(let i=e+1;i<r-1;++i){const e=X(t[i],s,l);e>n&&(n=e,h=i)}return Math.sqrt(n)>i?(Z(t,e,h+1,i,a),Z(t,h,r,i,a)):(a.length||a.push(s),a.push(l)),a}function Q(t,e=.15,r){const i=[],o=(t.length-1)/3;for(let r=0;r<o;r++)Y(t,3*r,e,i);return r&&r>0?Z(i,0,i.length,r):i}const J="none";class tt{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,e,r){return{shape:t,sets:e||[],options:r||this.defaultOptions}}line(t,e,r,i,o){const a=this._o(o);return this._d("line",[w(t,e,r,i,a)],a)}rectangle(t,e,r,i,o){const a=this._o(o),s=[],l=function(t,e,r,i,o){return function(t,e){return T(t,!0,e)}([[t,e],[t+r,e],[t+r,e+i],[t,e+i]],o)}(t,e,r,i,a);if(a.fill){const o=[[t,e],[t+r,e],[t+r,e+i],[t,e+i]];"solid"===a.fillStyle?s.push(E([o],a)):s.push(K([o],a))}return a.stroke!==J&&s.push(l),this._d("rectangle",s,a)}ellipse(t,e,r,i,o){const a=this._o(o),s=[],l=F(r,i,a),n=L(t,e,a,l);if(a.fill)if("solid"===a.fillStyle){const r=L(t,e,a,l).opset;r.type="fillPath",s.push(r)}else s.push(K([n.estimatedPoints],a));return a.stroke!==J&&s.push(n.opset),this._d("ellipse",s,a)}circle(t,e,r,i){const o=this.ellipse(t,e,r,r,i);return o.shape="circle",o}linearPath(t,e){const r=this._o(e);return this._d("linearPath",[T(t,!1,r)],r)}arc(t,e,r,i,o,a,s=!1,l){const n=this._o(l),h=[],c=v(t,e,r,i,o,a,s,!0,n);if(s&&n.fill)if("solid"===n.fillStyle){const s=Object.assign({},n);s.disableMultiStroke=!0;const l=v(t,e,r,i,o,a,!0,!1,s);l.type="fillPath",h.push(l)}else h.push(function(t,e,r,i,o,a,s){const l=t,n=e;let h=Math.abs(r/2),c=Math.abs(i/2);h+=I(.01*h,s),c+=I(.01*c,s);let d=o,g=a;for(;d<0;)d+=2*Math.PI,g+=2*Math.PI;g-d>2*Math.PI&&(d=0,g=2*Math.PI);const p=(g-d)/s.curveStepCount,u=[];for(let t=d;t<=g;t+=p)u.push([l+h*Math.cos(t),n+c*Math.sin(t)]);return u.push([l+h*Math.cos(g),n+c*Math.sin(g)]),u.push([l,n]),K([u],s)}(t,e,r,i,o,a,n));return n.stroke!==J&&h.push(c),this._d("arc",h,n)}curve(t,e){const r=this._o(e),i=[],o=A(t,r);if(r.fill&&r.fill!==J)if("solid"===r.fillStyle){const e=A(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else{const e=[],o=t;if(o.length){const t="number"==typeof o[0][0]?[o]:o;for(const i of t)i.length<3?e.push(...i):3===i.length?e.push(...Q(H([i[0],i[0],i[1],i[2]]),10,(1+r.roughness)/2)):e.push(...Q(H(i),10,(1+r.roughness)/2))}e.length&&i.push(K([e],r))}return r.stroke!==J&&i.push(o),this._d("curve",i,r)}polygon(t,e){const r=this._o(e),i=[],o=T(t,!0,r);return r.fill&&("solid"===r.fillStyle?i.push(E([t],r)):i.push(K([t],r))),r.stroke!==J&&i.push(o),this._d("polygon",i,r)}path(t,e){const r=this._o(e),i=[];if(!t)return this._d("path",i,r);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const o=r.fill&&"transparent"!==r.fill&&r.fill!==J,a=r.stroke!==J,s=!!(r.simplification&&r.simplification<1),l=function(t,e,r){const i=b(x(f(t))),o=[];let a=[],s=[0,0],l=[];const n=()=>{l.length>=4&&a.push(...Q(l,1)),l=[]},h=()=>{n(),a.length&&(o.push(a),a=[])};for(const{key:t,data:e}of i)switch(t){case"M":h(),s=[e[0],e[1]],a.push(s);break;case"L":n(),a.push([e[0],e[1]]);break;case"C":if(!l.length){const t=a.length?a[a.length-1]:s;l.push([t[0],t[1]])}l.push([e[0],e[1]]),l.push([e[2],e[3]]),l.push([e[4],e[5]]);break;case"Z":n(),a.push([s[0],s[1]])}if(h(),!r)return o;const c=[];for(const t of o){const e=V(t,r);e.length&&c.push(e)}return c}(t,0,s?4-4*(r.simplification||1):(1+r.roughness)/2),n=M(t,r);if(o)if("solid"===r.fillStyle)if(1===l.length){const e=M(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else i.push(E(l,r));else i.push(K(l,r));return a&&(s?l.forEach(t=>{i.push(T(t,!1,r))}):i.push(n)),this._d("path",i,r)}opsToPath(t,e){let r="";for(const i of t.ops){const t="number"==typeof e&&e>=0?i.data.map(t=>+t.toFixed(e)):i.data;switch(i.op){case"move":r+=`M${t[0]} ${t[1]} `;break;case"bcurveTo":r+=`C${t[0]} ${t[1]}, ${t[2]} ${t[3]}, ${t[4]} ${t[5]} `;break;case"lineTo":r+=`L${t[0]} ${t[1]} `}}return r.trim()}toPaths(t){const e=t.sets||[],r=t.options||this.defaultOptions,i=[];for(const t of e){let e=null;switch(t.type){case"path":e={d:this.opsToPath(t),stroke:r.stroke,strokeWidth:r.strokeWidth,fill:J};break;case"fillPath":e={d:this.opsToPath(t),stroke:J,strokeWidth:0,fill:r.fill||J};break;case"fillSketch":e=this.fillSketch(t,r)}e&&i.push(e)}return i}fillSketch(t,e){let r=e.fillWeight;return r<0&&(r=e.strokeWidth/2),{d:this.opsToPath(t),stroke:e.fill||J,strokeWidth:r,fill:J}}_mergedShape(t){return t.filter((t,e)=>0===e||"move"!==t.op)}}class et{constructor(t,e){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new tt(e)}draw(t){const e=t.sets||[],r=t.options||this.getDefaultOptions(),i=this.ctx,o=t.options.fixedDecimalPlaceDigits;for(const a of e)switch(a.type){case"path":i.save(),i.strokeStyle="none"===r.stroke?"transparent":r.stroke,i.lineWidth=r.strokeWidth,r.strokeLineDash&&i.setLineDash(r.strokeLineDash),r.strokeLineDashOffset&&(i.lineDashOffset=r.strokeLineDashOffset),this._drawToContext(i,a,o),i.restore();break;case"fillPath":{i.save(),i.fillStyle=r.fill||"";const e="curve"===t.shape||"polygon"===t.shape||"path"===t.shape?"evenodd":"nonzero";this._drawToContext(i,a,o,e),i.restore();break}case"fillSketch":this.fillSketch(i,a,r)}}fillSketch(t,e,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2),t.save(),r.fillLineDash&&t.setLineDash(r.fillLineDash),r.fillLineDashOffset&&(t.lineDashOffset=r.fillLineDashOffset),t.strokeStyle=r.fill||"",t.lineWidth=i,this._drawToContext(t,e,r.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,e,r,i="nonzero"){t.beginPath();for(const i of e.ops){const e="number"==typeof r&&r>=0?i.data.map(t=>+t.toFixed(r)):i.data;switch(i.op){case"move":t.moveTo(e[0],e[1]);break;case"bcurveTo":t.bezierCurveTo(e[0],e[1],e[2],e[3],e[4],e[5]);break;case"lineTo":t.lineTo(e[0],e[1])}}"fillPath"===e.type?t.fill(i):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,e,r,i,o){const a=this.gen.line(t,e,r,i,o);return this.draw(a),a}rectangle(t,e,r,i,o){const a=this.gen.rectangle(t,e,r,i,o);return this.draw(a),a}ellipse(t,e,r,i,o){const a=this.gen.ellipse(t,e,r,i,o);return this.draw(a),a}circle(t,e,r,i){const o=this.gen.circle(t,e,r,i);return this.draw(o),o}linearPath(t,e){const r=this.gen.linearPath(t,e);return this.draw(r),r}polygon(t,e){const r=this.gen.polygon(t,e);return this.draw(r),r}arc(t,e,r,i,o,a,s=!1,l){const n=this.gen.arc(t,e,r,i,o,a,s,l);return this.draw(n),n}curve(t,e){const r=this.gen.curve(t,e);return this.draw(r),r}path(t,e){const r=this.gen.path(t,e);return this.draw(r),r}}const rt="http://www.w3.org/2000/svg";class it{constructor(t,e){this.svg=t,this.gen=new tt(e)}draw(t){const e=t.sets||[],r=t.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,o=i.createElementNS(rt,"g"),a=t.options.fixedDecimalPlaceDigits;for(const s of e){let e=null;switch(s.type){case"path":e=i.createElementNS(rt,"path"),e.setAttribute("d",this.opsToPath(s,a)),e.setAttribute("stroke",r.stroke),e.setAttribute("stroke-width",r.strokeWidth+""),e.setAttribute("fill","none"),r.strokeLineDash&&e.setAttribute("stroke-dasharray",r.strokeLineDash.join(" ").trim()),r.strokeLineDashOffset&&e.setAttribute("stroke-dashoffset",`${r.strokeLineDashOffset}`);break;case"fillPath":e=i.createElementNS(rt,"path"),e.setAttribute("d",this.opsToPath(s,a)),e.setAttribute("stroke","none"),e.setAttribute("stroke-width","0"),e.setAttribute("fill",r.fill||""),"curve"!==t.shape&&"polygon"!==t.shape||e.setAttribute("fill-rule","evenodd");break;case"fillSketch":e=this.fillSketch(i,s,r)}e&&o.appendChild(e)}return o}fillSketch(t,e,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2);const o=t.createElementNS(rt,"path");return o.setAttribute("d",this.opsToPath(e,r.fixedDecimalPlaceDigits)),o.setAttribute("stroke",r.fill||""),o.setAttribute("stroke-width",i+""),o.setAttribute("fill","none"),r.fillLineDash&&o.setAttribute("stroke-dasharray",r.fillLineDash.join(" ").trim()),r.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${r.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,e){return this.gen.opsToPath(t,e)}line(t,e,r,i,o){const a=this.gen.line(t,e,r,i,o);return this.draw(a)}rectangle(t,e,r,i,o){const a=this.gen.rectangle(t,e,r,i,o);return this.draw(a)}ellipse(t,e,r,i,o){const a=this.gen.ellipse(t,e,r,i,o);return this.draw(a)}circle(t,e,r,i){const o=this.gen.circle(t,e,r,i);return this.draw(o)}linearPath(t,e){const r=this.gen.linearPath(t,e);return this.draw(r)}polygon(t,e){const r=this.gen.polygon(t,e);return this.draw(r)}arc(t,e,r,i,o,a,s=!1,l){const n=this.gen.arc(t,e,r,i,o,a,s,l);return this.draw(n)}curve(t,e){const r=this.gen.curve(t,e);return this.draw(r)}path(t,e){const r=this.gen.path(t,e);return this.draw(r)}}var ot={canvas:(t,e)=>new et(t,e),svg:(t,e)=>new it(t,e),generator:t=>new tt(t),newSeed:()=>tt.newSeed()}},24832(t,e,r){r.d(e,{IU:()=>A,Jo:()=>R,Nq:()=>y,Pk:()=>K,T_:()=>$,UQ:()=>T,a6:()=>F,g0:()=>Ct,hq:()=>u,jP:()=>v,lP:()=>w});var i=r(36870),o=r(84076),a=r(36155),s=r(57588),l=r(51255),n=r(89983),h=r(31293),c=r(86827),d=r(51444),g=r(61057),p=(0,c.K)((t,e)=>{if(e)return"translate("+-t.width/2+", "+-t.height/2+")";const r=t.x??0,i=t.y??0;return"translate("+-(r+t.width/2)+", "+-(i+t.height/2)+")"},"computeLabelTransform"),u={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},y={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function C(t,e){if(void 0===t||void 0===e)return{angle:0,deltaX:0,deltaY:0};t=m(t),e=m(e);const[r,i]=[t.x,t.y],[o,a]=[e.x,e.y],s=o-r,l=a-i;return{angle:Math.atan(l/s),deltaX:s,deltaY:l}}(0,c.K)(C,"calculateDeltaAndAngle");var m=(0,c.K)(t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,"pointTransformer"),f=(0,c.K)(t=>({x:(0,c.K)(function(e,r,i){let o=0;const a=m(i[0]).x<m(i[i.length-1]).x?"left":"right";if(0===r&&Object.hasOwn(u,t.arrowTypeStart)){const{angle:e,deltaX:r}=C(i[0],i[1]);o=u[t.arrowTypeStart]*Math.cos(e)*(r>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(u,t.arrowTypeEnd)){const{angle:e,deltaX:r}=C(i[i.length-1],i[i.length-2]);o=u[t.arrowTypeEnd]*Math.cos(e)*(r>=0?1:-1)}const s=Math.abs(m(e).x-m(i[i.length-1]).x),l=Math.abs(m(e).y-m(i[i.length-1]).y),n=Math.abs(m(e).x-m(i[0]).x),h=Math.abs(m(e).y-m(i[0]).y),c=u[t.arrowTypeStart],d=u[t.arrowTypeEnd];if(s<d&&s>0&&l<d){let t=d+1-s;t*="right"===a?-1:1,o-=t}if(n<c&&n>0&&h<c){let t=c+1-n;t*="right"===a?-1:1,o+=t}return m(e).x+o},"x"),y:(0,c.K)(function(e,r,i){let o=0;const a=m(i[0]).y<m(i[i.length-1]).y?"down":"up";if(0===r&&Object.hasOwn(u,t.arrowTypeStart)){const{angle:e,deltaY:r}=C(i[0],i[1]);o=u[t.arrowTypeStart]*Math.abs(Math.sin(e))*(r>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(u,t.arrowTypeEnd)){const{angle:e,deltaY:r}=C(i[i.length-1],i[i.length-2]);o=u[t.arrowTypeEnd]*Math.abs(Math.sin(e))*(r>=0?1:-1)}const s=Math.abs(m(e).y-m(i[i.length-1]).y),l=Math.abs(m(e).x-m(i[i.length-1]).x),n=Math.abs(m(e).y-m(i[0]).y),h=Math.abs(m(e).x-m(i[0]).x),c=u[t.arrowTypeStart],d=u[t.arrowTypeEnd];if(s<d&&s>0&&l<d){let t=d+1-s;t*="up"===a?-1:1,o-=t}if(n<c&&n>0&&h<c){let t=c+1-n;t*="up"===a?-1:1,o+=t}return m(e).y+o},"y")}),"getLineFunctionsWithOffset");var x=(0,c.K)((t,e,r,i,o,a=!1,s)=>{e.arrowTypeStart&&B(t,"start",e.arrowTypeStart,r,i,o,a,s),e.arrowTypeEnd&&B(t,"end",e.arrowTypeEnd,r,i,o,a,s)},"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},arrow_hierarchy:{type:"hierarchy",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}},k=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],B=(0,c.K)((t,e,r,i,o,a,s=!1,l)=>{if(!r||"none"===r)return;const n=b[r],c=n&&k.includes(n.type);if(!n)return void h.R.warn(`Unknown arrow type: ${r}`);const d=`${o}_${a}-${n.type}${"start"===e?"Start":"End"}${s&&c?"-margin":""}`;if(l&&""!==l.trim()){const r=`${d}_${l.replace(/[^\dA-Za-z]/g,"_")}`;if(!document.getElementById(r)){const t=document.getElementById(d);if(t){const e=t.cloneNode(!0);e.id=r;e.querySelectorAll("path, circle, line").forEach(t=>{t.setAttribute("stroke",l),n.fill&&t.setAttribute("fill",l)}),t.parentNode?.appendChild(e)}}t.attr(`marker-${e}`,`url(${i}#${r})`)}else t.attr(`marker-${e}`,`url(${i}#${d})`)},"addEdgeMarker"),S=(0,c.K)(t=>"string"==typeof t?t:(0,n.D7)()?.flowchart?.curve,"resolveEdgeCurveType"),w=new Map,T=new Map,A=(0,c.K)(()=>{w.clear(),T.clear()},"clear"),F=(0,c.K)(t=>Boolean(t.label||t.startLabelLeft||t.startLabelRight||t.endLabelLeft||t.endLabelRight),"hasEdgeLabel"),L=(0,c.K)(t=>t?"string"==typeof t?t:t.reduce((t,e)=>t+";"+e,""):"","getLabelStyles"),v=(0,c.K)(async(t,e)=>{const r=(0,n.D7)();let i=(0,n.E)(r);const{labelStyles:l}=(0,a.GX)(e);e.labelStyle=l;const c=t.insert("g").attr("class","edgeLabel"),g=c.insert("g").attr("class","label").attr("data-id",e.id),u="markdown"===e.labelType,y=await(0,s.GZ)(t,e.label,{style:L(e.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:u,width:void 0},r);let C,m,f;if(g.node().appendChild(y),h.R.info("abc82",e,e.labelType),i){const t=y.children[0],e=(0,d.Ltv)(y);C=await s.lT.measure(()=>t.getBoundingClientRect()),m=C,e.attr("width",C.width),e.attr("height",C.height)}else{const t=(0,d.Ltv)(y).select("text").node();await s.lT.measure(()=>{C=y.getBBox(),m=t&&"function"==typeof t.getBBox?t.getBBox():C})}if(g.attr("transform",p(m,i)),w.set(e.id,c),e.width=C.width,e.height=C.height,e.startLabelLeft){const r=t.insert("g").attr("class","edgeTerminals"),a=r.insert("g").attr("class","inner"),s=await(0,o.DA)(a,e.startLabelLeft,L(e.labelStyle)||"",!1,!1);f=s;let l=s.getBBox();if(i){const t=s.children[0],e=(0,d.Ltv)(s);l=t.getBoundingClientRect(),e.attr("width",l.width),e.attr("height",l.height)}a.attr("transform",p(l,i)),T.get(e.id)||T.set(e.id,{}),T.get(e.id).startLeft=r,E(f,e.startLabelLeft,l),M(e,"startLeft",l)}if(e.startLabelRight){const r=t.insert("g").attr("class","edgeTerminals"),a=r.insert("g").attr("class","inner"),s=await(0,o.DA)(a,e.startLabelRight,L(e.labelStyle)||"",!1,!1);f=s;let l=s.getBBox();if(i){const t=s.children[0],e=(0,d.Ltv)(s);l=t.getBoundingClientRect(),e.attr("width",l.width),e.attr("height",l.height)}a.attr("transform",p(l,i)),T.get(e.id)||T.set(e.id,{}),T.get(e.id).startRight=r,E(f,e.startLabelRight,l),M(e,"startRight",l)}if(e.endLabelLeft){const r=t.insert("g").attr("class","edgeTerminals"),a=r.insert("g").attr("class","inner"),s=await(0,o.DA)(a,e.endLabelLeft,L(e.labelStyle)||"",!1,!1);f=s;let l=s.getBBox();if(i){const t=s.children[0],e=(0,d.Ltv)(s);l=t.getBoundingClientRect(),e.attr("width",l.width),e.attr("height",l.height)}a.attr("transform",p(l,i)),T.get(e.id)||T.set(e.id,{}),T.get(e.id).endLeft=r,E(f,e.endLabelLeft,l),M(e,"endLeft",l)}if(e.endLabelRight){const r=t.insert("g").attr("class","edgeTerminals"),a=r.insert("g").attr("class","inner"),s=await(0,o.DA)(a,e.endLabelRight,L(e.labelStyle)||"",!1,!1);f=s;let l=s.getBBox();if(i){const t=s.children[0],e=(0,d.Ltv)(s);l=t.getBoundingClientRect(),e.attr("width",l.width),e.attr("height",l.height)}a.attr("transform",p(l,i)),T.get(e.id)||T.set(e.id,{}),T.get(e.id).endRight=r,E(f,e.endLabelRight,l),M(e,"endRight",l)}return y},"insertEdgeLabel");function M(t,e,r){t.terminalLabelSizes??={},t.terminalLabelSizes[e]={width:r.width,height:r.height}}function E(t,e,r){(0,n.E)((0,n.D7)())&&t&&(t.style.width=Math.max(9*e.length,r.width)+"px",t.style.height=r.height+"px")}(0,c.K)(M,"recordTerminalLabelSize"),(0,c.K)(E,"setTerminalWidth");var K=(0,c.K)((t,e)=>{let r=t.x,i=t.y;if(e?.updatedPath){const o=l._K.calcLabelPosition(e.updatedPath);if(e.originalPath){const a=l._K.calcLabelPosition(e.originalPath);r=t.x+(o.x-a.x),i=t.y+(o.y-a.y)}else r=o.x,i=o.y}return{x:r,y:i}},"resolveEdgeLabelPosition"),$=(0,c.K)((t,e)=>{h.R.debug("Moving label abc88 ",t.id,t.label,w.get(t.id),e);const r=(0,n.D7)(),{subGraphTitleTotalMargin:o}=(0,i.Oi)(r);if(t.label){const r=w.get(t.id),{x:i,y:a}=K(t,e);h.R.debug("Moving label "+t.label+" from (",t.x,",",t.y,") to (",i,",",a,") abc88"),r.attr("transform",`translate(${i}, ${a+o/2})`)}const a=e.updatedPath?e.updatedPath:e.originalPath;if(t.startLabelLeft){const e=T.get(t.id).startLeft;let r=t.x,i=t.y;if(a){const e=l._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",a);r=e.x,i=e.y}e.attr("transform",`translate(${r}, ${i})`)}if(t.startLabelRight){const e=T.get(t.id).startRight;let r=t.x,i=t.y;if(a){const e=l._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",a);r=e.x,i=e.y}e.attr("transform",`translate(${r}, ${i})`)}if(t.endLabelLeft){const e=T.get(t.id).endLeft;let r=t.x,i=t.y;if(a){const e=l._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",a);r=e.x,i=e.y}e.attr("transform",`translate(${r}, ${i})`)}if(t.endLabelRight){const e=T.get(t.id).endRight;let r=t.x,i=t.y;if(a){const e=l._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",a);r=e.x,i=e.y}e.attr("transform",`translate(${r}, ${i})`)}},"positionEdgeLabel"),_=(0,c.K)((t,e)=>{if(!t?.isLabelEdge||!t?.id?.endsWith("-to-label")||!Array.isArray(e))return e;if(2!==e.length)return e;const[r,i]=e,o=Math.abs(i.x-r.x),a=Math.abs(i.y-r.y);return o<.001||a<.001?e:a>=o?[r,{x:r.x,y:i.y},i]:[r,{x:i.x,y:r.y},i]},"orthogonalizeToLabelClippedPoints"),O=(0,c.K)((t,e)=>{const r=t.x,i=t.y,o=Math.abs(e.x-r),a=Math.abs(e.y-i),s=t.width/2,l=t.height/2;return o>=s||a>=l},"outsideNode"),I=(0,c.K)((t,e,r)=>{h.R.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(e)}\n insidePoint : ${JSON.stringify(r)}\n node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const i=t.x,o=t.y,a=Math.abs(i-r.x),s=t.width/2;let l=r.x<e.x?s-a:s+a;const n=t.height/2,c=Math.abs(e.y-r.y),d=Math.abs(e.x-r.x);if(Math.abs(o-e.y)*s>Math.abs(i-e.x)*n){let t=r.y<e.y?e.y-n-o:o-n-e.y;l=d*t/c;const i={x:r.x<e.x?r.x+l:r.x-d+l,y:r.y<e.y?r.y+c-t:r.y-c+t};return 0===l&&(i.x=e.x,i.y=e.y),0===d&&(i.x=e.x),0===c&&(i.y=e.y),h.R.debug(`abc89 top/bottom calc, Q ${c}, q ${t}, R ${d}, r ${l}`,i),i}{l=r.x<e.x?e.x-s-i:i-s-e.x;let t=c*l/d,o=r.x<e.x?r.x+d-l:r.x-d+l,a=r.y<e.y?r.y+t:r.y-t;return h.R.debug(`sides calc abc89, Q ${c}, q ${t}, R ${d}, r ${l}`,{_x:o,_y:a}),0===l&&(o=e.x,a=e.y),0===d&&(o=e.x),0===c&&(a=e.y),{x:o,y:a}}},"intersection"),q=(0,c.K)((t,e)=>{h.R.warn("abc88 cutPathAtIntersect",t,e);let r=[],i=t[0],o=!1;return t.forEach(t=>{if(h.R.info("abc88 checking point",t,e),O(e,t)||o)h.R.warn("abc88 outside",t,i),i=t,o||r.push(t);else{const a=I(e,i,t);h.R.debug("abc88 inside",t,i,a),h.R.debug("abc88 intersection",a,e);let s=!1;r.forEach(t=>{s=s||t.x===a.x&&t.y===a.y}),r.some(t=>t.x===a.x&&t.y===a.y)?h.R.warn("abc88 no intersect",a,r):r.push(a),o=!0}}),h.R.debug("returning points",r),r},"cutPathAtIntersect");function D(t){const e=[],r=[];for(let i=1;i<t.length-1;i++){const o=t[i-1],a=t[i],s=t[i+1];(o.x===a.x&&a.y===s.y&&Math.abs(a.x-s.x)>5&&Math.abs(a.y-o.y)>5||o.y===a.y&&a.x===s.x&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-s.y)>5)&&(e.push(a),r.push(i))}return{cornerPoints:e,cornerPointPositions:r}}(0,c.K)(D,"extractCornerPoints");var W=(0,c.K)(function(t,e,r){const i=e.x-t.x,o=e.y-t.y,a=r/Math.sqrt(i*i+o*o);return{x:e.x-a*i,y:e.y-a*o}},"findAdjacentPoint"),P=(0,c.K)(function(t){const{cornerPointPositions:e}=D(t),r=[];for(let i=0;i<t.length;i++)if(e.includes(i)){const e=t[i-1],o=t[i+1],a=t[i],s=W(e,a,5),l=W(o,a,5),n=l.x-s.x,c=l.y-s.y;r.push(s);const d=2*Math.sqrt(2);let g={x:a.x,y:a.y};if(Math.abs(o.x-e.x)>10&&Math.abs(o.y-e.y)>=10){h.R.debug("Corner point fixing",Math.abs(o.x-e.x),Math.abs(o.y-e.y));const t=5;g=a.x===s.x?{x:n<0?s.x-t+d:s.x+t-d,y:c<0?s.y-d:s.y+d}:{x:n<0?s.x-d:s.x+d,y:c<0?s.y-t+d:s.y+t-d}}else h.R.debug("Corner point skipping fixing",Math.abs(o.x-e.x),Math.abs(o.y-e.y));r.push(g,l)}else r.push(t[i]);return r},"fixCorners"),z=(0,c.K)((t,e,r)=>{const i=t-e-r,o=Math.floor(i/4),a=Number.isFinite(o)?Math.max(0,o):0;return`0 ${e} ${Array(a).fill("2 2").join(" ")} ${r}`},"generateDashArray"),R=(0,c.K)(function(t,e,r,i,o,s,c,p=!1){if(!c)throw new Error(`insertEdge: missing diagramId for edge "${e.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:u,layout:C}=(0,n.D7)();let m=e.points,b=!1;const k=o;var B=s;const w=[];for(const t in e.cssCompiledStyles)(0,a.KX)(t)||w.push(e.cssCompiledStyles[t]);if("swimlane"===C){if(B.intersect&&k.intersect&&Array.isArray(m)&&m.length>=2)if(2===m.length)m=[k.intersect(m[0]),B.intersect(m[1])];else{const t=m.slice(1,-1),e=t[0],r=t[t.length-1],i=.5,o=Math.abs(m[m.length-1].x-r.x)<i&&Math.abs(m[m.length-1].y-r.y)<i,a=k.intersect(e),s=o?r:B.intersect(r),l=Math.abs(s.x-r.x)<i&&Math.abs(s.y-r.y)<i?[]:[s];m=[...Math.abs(a.x-e.x)<i&&Math.abs(a.y-e.y)<i?[]:[a],...t,...l]}m=_(e,m)}else B.intersect&&k.intersect&&!p&&(m=m.slice(1,e.points.length-1),m.unshift(k.intersect(m[0])),m.push(B.intersect(m[m.length-1])));const T=btoa(JSON.stringify(m));e.toCluster&&(h.R.info("to cluster abc88",r.get(e.toCluster)),m=q(e.points,r.get(e.toCluster).node),b=!0),e.fromCluster&&(h.R.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(m,null,2)),m=q(m.reverse(),r.get(e.fromCluster).node).reverse(),b=!0);let A=m.filter(t=>!Number.isNaN(t.y));const F=S(e.curve);"rounded"!==F&&(A=P(A));let L=d.lUB;switch(F){case"linear":case"rounded":L=d.lUB;break;case"basis":default:L=d.qrM;break;case"cardinal":L=d.y8u;break;case"bumpX":L=d.Wi0;break;case"bumpY":L=d.PGM;break;case"catmullRom":L=d.oDi;break;case"monotoneX":L=d.nVG;break;case"monotoneY":L=d.uxU;break;case"natural":L=d.Xf2;break;case"step":L=d.GZz;break;case"stepAfter":L=d.UPb;break;case"stepBefore":L=d.dyv}const{x:v,y:M}=f(e),E=(0,d.n8j)().x(v).y(M).curve(L);let K,$;switch(e.thickness){case"normal":default:K="edge-thickness-normal";break;case"thick":K="edge-thickness-thick";break;case"invisible":K="edge-thickness-invisible"}switch(e.pattern){case"solid":default:K+=" edge-pattern-solid";break;case"dotted":K+=" edge-pattern-dotted";break;case"dashed":K+=" edge-pattern-dashed"}let O="rounded"===F?N(H(A,e),5):E(A);const I=Array.isArray(e.style)?e.style:[e.style];let D=I.find(t=>t?.startsWith("stroke:")),W="";e.animate&&(W="edge-animation-fast"),e.animation&&(W="edge-animation-"+e.animation);let R=!1;if("handDrawn"===e.look){const r=g.A.svg(t);Object.assign([],A);const i=r.path(O,{roughness:.3,seed:u});K+=" transition",$=(0,d.Ltv)(i).select("path").attr("id",`${c}-${e.id}`).attr("class"," "+K+(e.classes?" "+e.classes:"")+(W?" "+W:"")).attr("style",I?I.reduce((t,e)=>t+";"+e,""):"");let o=$.attr("d");$.attr("d",o),t.node().appendChild($.node())}else{const r=w.join(";"),i=I?I.reduce((t,e)=>t+e+";",""):"",o=(r?r+";"+i+";":i)+";"+(I?I.reduce((t,e)=>t+";"+e,""):"");$=t.append("path").attr("d",O).attr("id",`${c}-${e.id}`).attr("class"," "+K+(e.classes?" "+e.classes:"")+(W?" "+W:"")).attr("style",o),D=o.match(/stroke:([^;]+)/)?.[1],R=!0===e.animate||!!e.animation||r.includes("animation");const a=$.node(),s="function"==typeof a.getTotalLength?a.getTotalLength():0,l=y[e.arrowTypeStart]||0,n=y[e.arrowTypeEnd]||0;if("neo"===e.look&&!R){const t=`stroke-dasharray: ${"dotted"===e.pattern||"dashed"===e.pattern?z(s,l,n):`0 ${l} ${s-l-n} ${n}`}; stroke-dashoffset: 0;`;$.attr("style",t+$.attr("style"))}}$.attr("data-edge",!0),$.attr("data-et","edge"),$.attr("data-id",e.id),$.attr("data-points",T),$.attr("data-look",(0,l.KL)(e.look)),e.showPoints&&A.forEach(e=>{t.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",e.x).attr("cy",e.y)});let j="";((0,n.D7)().flowchart.arrowMarkerAbsolute||(0,n.D7)().state.arrowMarkerAbsolute)&&(j=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,j=j.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),h.R.info("arrowTypeStart",e.arrowTypeStart),h.R.info("arrowTypeEnd",e.arrowTypeEnd);x($,e,j,c,i,!R&&"neo"===e?.look,D);const G=m[Math.floor(m.length/2)];l._K.isLabelCoordinateInPath(G,$.attr("d"))||(b=!0);let X={};return b&&(X.updatedPath=m),X.originalPath=e.points,X},"insertEdge");function N(t,e){if(t.length<2)return"";let r="";const i=t.length,o=1e-5;for(let a=0;a<i;a++){const s=t[a],l=t[a-1],n=t[a+1];if(0===a)r+=`M${s.x},${s.y}`;else if(a===i-1)r+=`L${s.x},${s.y}`;else{const t=s.x-l.x,i=s.y-l.y,a=n.x-s.x,h=n.y-s.y,c=Math.hypot(t,i),d=Math.hypot(a,h);if(c<o||d<o){r+=`L${s.x},${s.y}`;continue}const g=t/c,p=i/c,u=a/d,y=h/d,C=g*u+p*y,m=Math.max(-1,Math.min(1,C)),f=Math.acos(m);if(f<o||Math.abs(Math.PI-f)<o){r+=`L${s.x},${s.y}`;continue}const x=Math.min(e/Math.sin(f/2),c/2,d/2),b=s.x-g*x,k=s.y-p*x,B=s.x+u*x,S=s.y+y*x;r+=`L${b},${k}`,r+=`Q${s.x},${s.y} ${B},${S}`}}return r}function j(t,e){if(!t||!e)return{angle:0,deltaX:0,deltaY:0};const r=e.x-t.x,i=e.y-t.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}function H(t,e){const r=t.map(t=>({...t}));if(t.length>=2&&u[e.arrowTypeStart]){const i=u[e.arrowTypeStart],o=t[0],a=t[1],{angle:s}=j(o,a),l=i*Math.cos(s),n=i*Math.sin(s);r[0].x=o.x+l,r[0].y=o.y+n}const i=t.length;if(i>=2&&u[e.arrowTypeEnd]){const o=u[e.arrowTypeEnd],a=t[i-1],s=t[i-2],{angle:l}=j(s,a),n=o*Math.cos(l),h=o*Math.sin(l);r[i-1].x=a.x-n,r[i-1].y=a.y-h}return r}(0,c.K)(N,"generateRoundedPath"),(0,c.K)(j,"calculateDeltaAndAngle"),(0,c.K)(H,"applyMarkerOffsetsToPoints");var G=(0,c.K)((t,e,r,i)=>{e.forEach(e=>{yt[e](t,r,i)})},"insertMarkers"),X=(0,c.K)((t,e,r)=>{h.R.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,1 V 13 L18,7 Z"),t.append("marker").attr("id",r+"_"+e+"-extensionStart-margin").attr("class","marker extension "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd-margin").attr("class","marker extension "+e).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"),U=(0,c.K)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart-margin").attr("class","marker composition "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd-margin").attr("class","marker composition "+e).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"),Y=(0,c.K)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart-margin").attr("class","marker aggregation "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd-margin").attr("class","marker aggregation "+e).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"),V=(0,c.K)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart-margin").attr("class","marker dependency "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd-margin").attr("class","marker dependency "+e).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=(0,c.K)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart-margin").attr("class","marker lollipop "+e).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),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd-margin").attr("class","marker lollipop "+e).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"),Q=(0,c.K)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointEnd-margin").attr("class","marker "+e).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"),t.append("marker").attr("id",r+"_"+e+"-pointStart-margin").attr("class","marker "+e).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=(0,c.K)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleEnd-margin").attr("class","marker "+e).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"),t.append("marker").attr("id",r+"_"+e+"-circleStart-margin").attr("class","marker "+e).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"),tt=(0,c.K)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossEnd-margin").attr("class","marker cross "+e).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),t.append("marker").attr("id",r+"_"+e+"-crossStart-margin").attr("class","marker cross "+e).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"),et=(0,c.K)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),rt=(0,c.K)((t,e,r)=>{const i=(0,n.zj)(),{themeVariables:o}=i,{transitionColor:a}=o;t.append("defs").append("marker").attr("id",r+"_"+e+"-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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${a}`)},"barbNeo"),it=(0,c.K)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).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"),ot=(0,c.K)((t,e,r)=>{const i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).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 o=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),o.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),at=(0,c.K)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).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"),st=(0,c.K)((t,e,r)=>{const i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).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 o=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),o.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),lt=(0,c.K)((t,e,r)=>{const i=(0,n.zj)(),{themeVariables:o}=i,{strokeWidth:a}=o;t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${a}`),t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${a}`)},"only_one_neo"),nt=(0,c.K)((t,e,r)=>{const i=(0,n.zj)(),{themeVariables:o}=i,{strokeWidth:a,mainBkg:s}=o,l=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");l.append("circle").attr("fill",s??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),l.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${a}`);const h=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");h.append("circle").attr("fill",s??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),h.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${a}`)},"zero_or_one_neo"),ht=(0,c.K)((t,e,r)=>{const i=(0,n.zj)(),{themeVariables:o}=i,{strokeWidth:a}=o;t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${a}`),t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${a}`)},"one_or_more_neo"),ct=(0,c.K)((t,e,r)=>{const i=(0,n.zj)(),{themeVariables:o}=i,{strokeWidth:a,mainBkg:s}=o,l=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");l.append("circle").attr("fill",s??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),l.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${a}`);const h=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");h.append("circle").attr("fill",s??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),h.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${a}`)},"zero_or_more_neo"),dt=(0,c.K)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d","M0,0\n L20,10\n M20,10\n L0,20")},"requirement_arrow"),gt=(0,c.K)((t,e,r)=>{const i=(0,n.zj)(),{themeVariables:o}=i,{strokeWidth:a}=o;t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${a}`).attr("viewBox","0 0 25 20").append("path").attr("d","M0,0\n L20,10\n M20,10\n L0,20").attr("stroke-linejoin","miter")},"requirement_arrow_neo"),pt=(0,c.K)((t,e,r)=>{const i=t.append("defs").append("marker").attr("id",r+"_"+e+"-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"),ut=(0,c.K)((t,e,r)=>{const i=(0,n.zj)(),{themeVariables:o}=i,{strokeWidth:a}=o,s=t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");s.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),s.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),s.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),s.selectAll("*").attr("stroke-width",`${a}`)},"requirement_contains_neo"),yt={extension:X,composition:U,aggregation:Y,dependency:V,lollipop:Z,point:Q,circle:J,cross:tt,barb:et,barbNeo:rt,hierarchy:(0,c.K)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-hierarchyEnd").attr("class","marker hierarchy "+e).attr("viewBox","0 0 12 10").attr("refX",10).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",10).attr("orient","auto").append("path").attr("d","M 0 0 L 6 5 L 0 10 M 4 0 L 10 5 L 4 10").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0").style("fill","none"),t.append("marker").attr("id",r+"_"+e+"-hierarchyStart").attr("class","marker hierarchy "+e).attr("viewBox","0 0 12 10").attr("refX",2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",10).attr("orient","auto").append("path").attr("d","M 12 0 L 6 5 L 12 10 M 8 0 L 2 5 L 8 10").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0").style("fill","none")},"hierarchy"),only_one:it,zero_or_one:ot,one_or_more:at,zero_or_more:st,only_one_neo:lt,zero_or_one_neo:nt,one_or_more_neo:ht,zero_or_more_neo:ct,requirement_arrow:dt,requirement_contains:pt,requirement_arrow_neo:gt,requirement_contains_neo:ut},Ct=G},51255(t,e,r){r.d(e,{$C:()=>v,$t:()=>G,C4:()=>U,I5:()=>H,Ib:()=>m,KL:()=>Z,PX:()=>W,Sm:()=>Y,Un:()=>q,_K:()=>X,bH:()=>_,dq:()=>R,pe:()=>c,rY:()=>V,ru:()=>I,sM:()=>F,u1:()=>N,vU:()=>y,yT:()=>E});var i=r(89983),o=r(31293),a=r(86827),s=r(62559),l=r(51444),n=r(20539),h=r(25268),c="​",d={curveBasis:l.qrM,curveBasisClosed:l.Yu4,curveBasisOpen:l.IA3,curveBumpX:l.Wi0,curveBumpY:l.PGM,curveBundle:l.OEq,curveCardinalClosed:l.olC,curveCardinalOpen:l.IrU,curveCardinal:l.y8u,curveCatmullRomClosed:l.Q7f,curveCatmullRomOpen:l.cVp,curveCatmullRom:l.oDi,curveLinear:l.lUB,curveLinearClosed:l.Lx9,curveMonotoneX:l.nVG,curveMonotoneY:l.uxU,curveNatural:l.Xf2,curveStep:l.GZz,curveStepAfter:l.UPb,curveStepBefore:l.dyv},g=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,p=(0,a.K)(function(t,e){const r=u(t,/(?:init\b)|(?:initialize\b)/);let o={};if(Array.isArray(r)){const t=r.map(t=>t.args);(0,i.$i)(t),o=(0,i.hH)(o,[...t])}else o=r.args;if(!o)return;let a=(0,i.Ch)(t,e);const s="config";return void 0!==o[s]&&("flowchart-v2"===a&&(a="flowchart"),o[a]=o[s],delete o[s]),o},"detectInit"),u=(0,a.K)(function(t,e=null){try{const r=new RegExp(`[%]{2}(?![{]${g.source})(?=[}][%]{2}).*\n`,"ig");let a;t=t.trim().replace(r,"").replace(/'/gm,'"'),o.R.debug(`Detecting diagram directive${null!==e?" type:"+e:""} based on the text:${t}`);const s=[];for(;null!==(a=i.DB.exec(t));)if(a.index===i.DB.lastIndex&&i.DB.lastIndex++,a&&!e||e&&a[1]?.match(e)||e&&a[2]?.match(e)){const t=a[1]?a[1]:a[2],e=a[3]?a[3].trim():a[4]?JSON.parse(a[4].trim()):null;s.push({type:t,args:e})}return 0===s.length?{type:t,args:null}:1===s.length?s[0]:s}catch(r){return o.R.error(`ERROR: ${r.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},"detectDirective"),y=(0,a.K)(function(t){return t.replace(i.DB,"")},"removeDirectives"),C=(0,a.K)(function(t,e){for(const[r,i]of e.entries())if(i.match(t))return r;return-1},"isSubstringInArray");function m(t,e){if(!t)return e;const r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return d[r]??e}function f(t,e){const r=t.trim();if(r)return"loose"!==e.securityLevel?(0,s.J)(r):r}(0,a.K)(m,"interpolateToCurve"),(0,a.K)(f,"formatUrl");var x=(0,a.K)((t,...e)=>{const r=t.split("."),i=r.length-1,a=r[i];let s=window;for(let e=0;e<i;e++)if(s=s[r[e]],!s)return void o.R.error(`Function name: ${t} not found in window`);s[a](...e)},"runFunc");function b(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0}function k(t){let e,r=0;t.forEach(t=>{r+=b(t,e),e=t});return w(t,r/2)}function B(t){return 1===t.length?t[0]:k(t)}(0,a.K)(b,"distance"),(0,a.K)(k,"traverseEdge"),(0,a.K)(B,"calcLabelPosition");var S=(0,a.K)((t,e=2)=>{const r=Math.pow(10,e);return Math.round(t*r)/r},"roundNumber"),w=(0,a.K)((t,e)=>{let r,i=e;for(const e of t){if(r){const t=b(e,r);if(0===t)return r;if(t<i)i-=t;else{const o=i/t;if(o<=0)return r;if(o>=1)return{x:e.x,y:e.y};if(o>0&&o<1)return{x:S((1-o)*r.x+o*e.x,5),y:S((1-o)*r.y+o*e.y,5)}}}r=e}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),T=(0,a.K)((t,e,r)=>{o.R.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());const i=w(e,25),a=t?10:5,s=Math.atan2(e[0].y-i.y,e[0].x-i.x),l={x:0,y:0};return l.x=Math.sin(s)*a+(e[0].x+i.x)/2,l.y=-Math.cos(s)*a+(e[0].y+i.y)/2,l},"calcCardinalityPosition");function A(t,e,r){const i=structuredClone(r);o.R.info("our points",i),"start_left"!==e&&"start_right"!==e&&i.reverse();const a=w(i,25+t),s=10+.5*t,l=Math.atan2(i[0].y-a.y,i[0].x-a.x),n={x:0,y:0};return"start_left"===e?(n.x=Math.sin(l+Math.PI)*s+(i[0].x+a.x)/2,n.y=-Math.cos(l+Math.PI)*s+(i[0].y+a.y)/2):"end_right"===e?(n.x=Math.sin(l-Math.PI)*s+(i[0].x+a.x)/2,n.y=-Math.cos(l-Math.PI)*s+(i[0].y+a.y)/2):(n.x=Math.sin(l)*s+(i[0].x+a.x)/2,n.y=-Math.cos(l)*s+(i[0].y+a.y)/2),n}function F(t){let e="",r="";for(const i of t)void 0!==i&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":e=e+i+";");return{style:e,labelStyle:r}}(0,a.K)(A,"calcTerminalLabelPosition"),(0,a.K)(F,"getStylesFromArray");var L=0,v=(0,a.K)(()=>(L++,"id-"+Math.random().toString(36).substr(2,12)+"-"+L),"generateId");function M(t){let e="";const r="0123456789abcdef";for(let i=0;i<t;i++)e+=r.charAt(Math.floor(16*Math.random()));return e}(0,a.K)(M,"makeRandomHex");var E=(0,a.K)(t=>M(t.length),"random"),K=(0,a.K)(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"),$=(0,a.K)(function(t,e){const r=e.text.replace(i.Y2.lineBreakRegex," "),[,o]=H(e.fontSize),a=t.append("text");a.attr("x",e.x),a.attr("y",e.y),a.style("text-anchor",e.anchor),a.style("font-family",e.fontFamily),a.style("font-size",o),a.style("font-weight",e.fontWeight),a.attr("fill",e.fill),void 0!==e.class&&a.attr("class",e.class);const s=a.append("tspan");return s.attr("x",e.x+2*e.textMargin),s.attr("fill",e.fill),s.text(r),a},"drawSimpleText"),_=(0,n.B)((t,e,r)=>{if(!t)return t;if(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),i.Y2.hasBreaks(t))return t;const o=t.split(" ").filter(Boolean),a=[];let s="";return o.forEach((t,i)=>{const l=q(`${t} `,r),n=q(s,r);if(l>e){const{hyphenatedStrings:i,remainingWord:o}=O(t,e,"-",r);a.push(s,...i),s=o}else n+l>=e?(a.push(s),s=t):s=[s,t].filter(Boolean).join(" ");i+1===o.length&&a.push(s)}),a.filter(t=>""!==t).join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),O=(0,n.B)((t,e,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const o=[...t],a=[];let s="";return o.forEach((t,l)=>{const n=`${s}${t}`;if(q(n,i)>=e){const t=l+1,e=o.length===t,i=`${n}${r}`;a.push(e?n:i),s=""}else s=n}),{hyphenatedStrings:a,remainingWord:s}},(t,e,r="-",i)=>`${t}${e}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function I(t,e){return W(t,e).height}function q(t,e){return W(t,e).width}(0,a.K)(I,"calculateTextHeight"),(0,a.K)(q,"calculateTextWidth");var D,W=(0,n.B)((t,e)=>{const{fontSize:r=12,fontFamily:o="Arial",fontWeight:a=400}=e;if(!t)return{width:0,height:0};const[,s]=H(r),n=["sans-serif",o],h=t.split(i.Y2.lineBreakRegex),d=[],g=(0,l.Ltv)("body");if(!g.remove)return{width:0,height:0,lineHeight:0};const p=g.append("svg");for(const t of n){let e=0;const r={width:0,height:0,lineHeight:0};for(const i of h){const o=K();o.text=i||c;const l=$(p,o).style("font-size",s).style("font-weight",a).style("font-family",t),n=(l._groups||l)[0][0].getBBox();if(0===n.width&&0===n.height)throw new Error("svg element not in render tree");r.width=Math.round(Math.max(r.width,n.width)),e=Math.round(n.height),r.height+=e,r.lineHeight=Math.round(Math.max(r.lineHeight,e))}d.push(r)}p.remove();return d[isNaN(d[1].height)||isNaN(d[1].width)||isNaN(d[1].lineHeight)||d[0].height>d[1].height&&d[0].width>d[1].width&&d[0].lineHeight>d[1].lineHeight?0:1]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),P=class{constructor(t=!1,e){this.count=0,this.count=e?e.length:0,this.next=t?()=>this.count++:()=>Date.now()}static{(0,a.K)(this,"InitIDGenerator")}},z=(0,a.K)(function(t){return D=D||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),D.innerHTML=t,unescape(D.textContent)},"entityDecode");function R(t){return"str"in t}function N(t){return t instanceof Error?t.message:String(t)}(0,a.K)(R,"isDetailedError"),(0,a.K)(N,"getErrorMessage");var j=(0,a.K)((t,e,r,i)=>{if(!i)return;const o=t.node()?.getBBox();o&&t.append("text").text(i).attr("text-anchor","middle").attr("x",o.x+o.width/2).attr("y",-r).attr("class",e)},"insertTitle"),H=(0,a.K)(t=>{if("number"==typeof t)return[t,t+"px"];const e=parseInt(t??"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]},"parseFontSize");function G(t,e){return(0,h.h)({},t,e)}(0,a.K)(G,"cleanAndMerge");var X={assignWithDepth:i.hH,wrapLabel:_,calculateTextHeight:I,calculateTextWidth:q,calculateTextDimensions:W,cleanAndMerge:G,detectInit:p,detectDirective:u,isSubstringInArray:C,interpolateToCurve:m,calcLabelPosition:B,calcCardinalityPosition:T,calcTerminalLabelPosition:A,formatUrl:f,getStylesFromArray:F,generateId:v,random:E,runFunc:x,entityDecode:z,insertTitle:j,isLabelCoordinateInPath:Q,parseFontSize:H,InitIDGenerator:P},U=(0,a.K)(function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)}),e=e.replace(/#\w+;/g,function(t){const e=t.substring(1,t.length-1);return/^\+?\d+$/.test(e)?"fl°°"+e+"¶ß":"fl°"+e+"¶ß"}),e},"encodeEntities"),Y=(0,a.K)(function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),V=(0,a.K)((t,e,{counter:r=0,prefix:i,suffix:o},a)=>a||`${i?`${i}_`:""}${t}_${e}_${r}${o?`_${o}`:""}`,"getEdgeId");function Z(t){return t??null}function Q(t,e){const r=Math.round(t.x),i=Math.round(t.y),o=e.replace(/(\d+\.\d+)/g,t=>Math.round(parseFloat(t)).toString());return o.includes(r.toString())||o.includes(i.toString())}(0,a.K)(Z,"handleUndefinedAttr"),(0,a.K)(Q,"isLabelCoordinateInPath")},36155(t,e,r){r.d(e,{Fr:()=>d,GX:()=>c,KX:()=>h,WW:()=>l,ue:()=>a});var i=r(89983),o=r(86827),a=(0,o.K)(t=>{const{handDrawnSeed:e}=(0,i.D7)();return{fill:t,hachureAngle:120,hachureGap:1.5,fillWeight:1.5,roughness:.7,stroke:t,seed:e}},"solidStateFill"),s=(0,o.K)(t=>Array.isArray(t)?t:t?t.split(";").map(t=>t.trim()).filter(Boolean):[],"normalizeStyleList"),l=(0,o.K)(t=>{const e=n([...t.cssCompiledStyles||[],...t.cssStyles||[],...s(t.labelStyle)]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),n=(0,o.K)(t=>{const e=new Map;return t.forEach(t=>{const[r,i]=t.split(":");e.set(r.trim(),i?.trim())}),e},"styles2Map"),h=(0,o.K)(t=>"color"===t||"font-size"===t||"font-family"===t||"font-weight"===t||"font-style"===t||"text-decoration"===t||"text-align"===t||"text-transform"===t||"line-height"===t||"letter-spacing"===t||"word-spacing"===t||"text-shadow"===t||"text-overflow"===t||"white-space"===t||"word-wrap"===t||"word-break"===t||"overflow-wrap"===t||"hyphens"===t,"isLabelStyle"),c=(0,o.K)(t=>{const{stylesArray:e}=l(t),r=[],i=[],o=[],a=[];return e.forEach(t=>{const e=t[0];h(e)?r.push(t.join(":")+" !important"):(i.push(t.join(":")+" !important"),e.includes("stroke")&&o.push(t.join(":")+" !important"),"fill"===e&&a.push(t.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:e,borderStyles:o,backgroundStyles:a}},"styles2String"),d=(0,o.K)((t,e)=>{const{themeVariables:r,handDrawnSeed:o}=(0,i.D7)(),{nodeBorder:a,mainBkg:s}=r,{stylesMap:n}=l(t);return Object.assign({roughness:.7,fill:n.get("fill")||s,fillStyle:"hachure",fillWeight:1.5,hachureGap:1.5,stroke:n.get("stroke")||a,seed:o,strokeWidth:n.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:g(n.get("stroke-dasharray"))},e)},"userNodeOverrides"),g=(0,o.K)(t=>{if(!t)return[0,0];const e=t.trim().split(/\s+/).map(Number);if(1===e.length){const t=isNaN(e[0])?0:e[0];return[t,t]}return[isNaN(e[0])?0:e[0],isNaN(e[1])?0:e[1]]},"getStrokeDashArray")},36870(t,e,r){r.d(e,{IU:()=>d,Oi:()=>l,U7:()=>c,U_:()=>g,on:()=>h});var i=r(84076),o=r(51255),a=r(31293),s=r(86827),l=(0,s.K)(({flowchart:t})=>{const e=t?.subGraphTitleMargin?.top??0,r=t?.subGraphTitleMargin?.bottom??0;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:e+r}},"getSubGraphTitleMargins"),n=new Map;async function h(t,e,r){let a,s;"rect"===e.shape&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");const l=e.shape?i.nq[e.shape]:void 0;if(!l)throw new Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let i;"sandbox"===r.config.securityLevel?i="_top":e.linkTarget&&(i=e.linkTarget||"_blank"),a=t.insert("svg:a").attr("xlink:href",e.link).attr("target",i??null),s=await l(a,e,r)}else s=await l(t,e,r),a=s;return a.attr("data-look",(0,o.KL)(e.look)),e.tooltip&&s.attr("title",e.tooltip),n.set(e.id,a),e.haveCallback&&a.attr("class",a.attr("class")+" clickable"),a}(0,s.K)(h,"insertNode");var c=(0,s.K)((t,e)=>{n.set(e.id,t)},"setNodeElem"),d=(0,s.K)(()=>{n.clear()},"clear"),g=(0,s.K)(t=>{const e=n.get(t.id);a.R.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const r=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r},"positionNode")},43247(t,e,r){r.d(e,{F:()=>o});var i=r(86827),o=(0,i.K)((t,e)=>{const{theme:r,themeVariables:o}=e,{useGradient:a,gradientStart:s,gradientStop:l}=o??{},n=t.attr("id"),h=r?.includes("dark")?"#FFFFFF":"#000000",c=(0,i.K)((e,r,i)=>t.append("defs").append("filter").attr("id",e).attr("height",r).attr("width",r).append("feDropShadow").attr("dx",i).attr("dy",i).attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",h),"dropShadow");if(c(`${n}-drop-shadow`,"130%","4"),c(`${n}-drop-shadow-small`,"150%","2"),!a)return;const d=t.append("linearGradient").attr("id",`${n}-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",s).attr("stop-opacity",1),d.append("svg:stop").attr("offset","100%").attr("stop-color",l).attr("stop-opacity",1)},"insertLookDefs")},57588(t,e,r){r.d(e,{GZ:()=>N,O6:()=>m,W6:()=>D,lT:()=>L});var i=r(54912),o=r(51255),a=r(89983),s=r(31293),l=r(86827),n=r(60023),h=r(84146),c=r(51444),d="undefined"!=typeof performance&&"function"==typeof performance.now,g=(0,l.K)(()=>d?performance.now():0,"now"),p="🧜 ",u={parse:"tertiary",prepare:"secondary",measure:"primary",layout:"primary-dark",layoutCore:"error",draw:"primary-light",paint:"secondary-dark",serialize:"tertiary-dark",render:"primary-light"};(class{constructor(){this.enabled=!1,this.autoPrint=!0,this.records=[],this.maxRecords=200,this.roots=[],this.stack=[],this.buckets={}}static{(0,l.K)(this,"Profiler")}enable(){return this.enabled=!0,this}disable(){return this.enabled=!1,this}start(t){this.enabled&&(this.roots=[],this.stack=[],this.buckets={},this.begin(t))}tickSync(t,e){if(!this.enabled)return e();const r=g();try{return e()}finally{this.buckets[t]=(this.buckets[t]??0)+(g()-r)}}async tick(t,e){if(!this.enabled)return e();const r=g();try{return await e()}finally{this.buckets[t]=(this.buckets[t]??0)+(g()-r)}}stop(){if(!this.enabled)return;for(;this.stack.length>0;)this.end();const t=this.roots.at(-1),e=this.runLabel??t?.name;return t&&(this.records.push({label:e??t.name,tree:t,buckets:{...this.buckets}}),this.records.length>this.maxRecords&&this.records.splice(0,this.records.length-this.maxRecords),this.autoPrint&&this.printSummary(t,e)),this.runLabel=void 0,t}begin(t){if(!this.enabled)return;const e={name:t,start:g(),duration:-1,children:[]},r=this.stack.at(-1);if(r?r.children.push(e):this.roots.push(e),this.stack.push(e),d&&"function"==typeof performance.mark)try{performance.mark(`${p}${t} ▶`)}catch{}}end(){if(!this.enabled)return;const t=this.stack.pop();if(!t)return;const e=g();if(t.duration=e-t.start,d&&"function"==typeof performance.measure)try{performance.measure(`${p}${t.name}`,{start:t.start,end:e,detail:{devtools:{dataType:"track-entry",track:"Mermaid render",trackGroup:"Mermaid",color:u[t.name]??"primary",tooltipText:`${t.name} — ${t.duration.toFixed(1)} ms`}}})}catch{}}async span(t,e){if(!this.enabled)return e();this.begin(t);try{return await e()}finally{this.end()}}report(){return this.records.at(-1)?.tree??this.roots.at(-1)}clear(){this.records.length=0,this.roots=[],this.stack=[],this.runLabel=void 0}reset(){this.roots=[],this.stack=[]}printSummary(t=this.report(),e){if(!t)return;const r=t.duration,i=e&&e!==t.name?`${t.name} [${e}]`:t.name,o=["ms % phase"],a=(0,l.K)((t,e)=>{const i=" ".repeat(e),s=t.duration.toFixed(1).padStart(8),l=r>0?`${(t.duration/r*100).toFixed(0).padStart(3)}%`:" -";o.push(`${s} ${l} ${i}${t.name}`);for(const r of t.children)a(r,e+1);if(t.children.length>0){const e=t.children.reduce((t,e)=>t+e.duration,0),r=t.duration-e;if(r>.5){const t=r.toFixed(1).padStart(8);o.push(`${t} ${i} (self)`)}}},"walk");a(t,0);const s=Object.keys(this.buckets);if(s.length>0){o.push("—— buckets (summed) ——");for(const t of s)o.push(`${this.buckets[t].toFixed(1).padStart(8)} ${t}`)}console.log(`${p}mermaid render profile · ${i}\n${o.join("\n")}`)}});globalThis.injected??={includeLargeFeatures:!0,profiling:!1,version:"0.0.0"};function y(t,{markdownAutoWrap:e}){const r=t.replace(/<br\/>/g,"\n").replace(/\n{2,}/g,"\n");return(0,h.T)(r)}function C(t){return t.split(/\\n|\n|<br\s*\/?>/gi).map(t=>t.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(t=>({content:t,type:"normal"}))??[])}function m(t,e={}){const r=y(t,e),i=n.xI.lexer(r),o=[[]];let a=0;function s(t,e="normal"){if("text"===t.type){t.text.split("\n").forEach((t,r)=>{0!==r&&(a++,o.push([])),t.split(" ").forEach(t=>{(t=t.replace(/&#39;/g,"'"))&&o[a].push({content:t,type:e})})})}else"strong"===t.type||"em"===t.type?t.tokens.forEach(e=>{s(e,t.type)}):"html"===t.type&&o[a].push({content:t.text,type:"normal"})}return(0,l.K)(s,"processNode"),i.forEach(t=>{"paragraph"===t.type?t.tokens?.forEach(t=>{s(t)}):"html"===t.type?o[a].push({content:t.text,type:"normal"}):o[a].push({content:t.raw,type:"normal"})}),o}function f(t){return t?`<p>${t.replace(/\\n|\n/g,"<br />")}</p>`:""}function x(t,{markdownAutoWrap:e}={}){const r=n.xI.lexer(t);function i(t){return"text"===t.type?!1===e?t.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):t.text.replace(/\n */g,"<br/>"):"strong"===t.type?`<strong>${t.tokens?.map(i).join("")}</strong>`:"em"===t.type?`<em>${t.tokens?.map(i).join("")}</em>`:"paragraph"===t.type?`<p>${t.tokens?.map(i).join("")}</p>`:"space"===t.type?"":"html"===t.type?`${t.text}`:"escape"===t.type?t.text:(s.R.warn(`Unsupported markdown: ${t.type}`),t.raw)}return(0,l.K)(i,"output"),r.map(i).join("")}(0,l.K)(y,"preprocessMarkdown"),(0,l.K)(C,"nonMarkdownToLines"),(0,l.K)(m,"markdownToLines"),(0,l.K)(f,"nonMarkdownToHTML"),(0,l.K)(x,"markdownToHTML");var b=function(t){var e=function(){},r=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.msRequestAnimationFrame||function(t){return setTimeout(t,16)};function i(){var i=this;i.reads=[],i.writes=[],i.raf=r.bind(t),e("initialized",i)}function o(t){t.scheduled||(t.scheduled=!0,t.raf(a.bind(null,t)),e("flush scheduled"))}function a(t){e("flush");var r,i=t.writes,a=t.reads;try{e("flushing reads",a.length),t.runTasks(a),e("flushing writes",i.length),t.runTasks(i)}catch(t){r=t}if(t.scheduled=!1,(a.length||i.length)&&o(t),r){if(e("task errored",r.message),!t.catch)throw r;t.catch(r)}}function s(t,e){var r=t.indexOf(e);return!!~r&&!!t.splice(r,1)}function n(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])}return(0,l.K)(i,"FastDom"),i.prototype={constructor:i,runTasks:(0,l.K)(function(t){var r;for(e("run tasks");r=t.shift();)r()},"runTasks"),measure:(0,l.K)(function(t,r){e("measure");var i=r?t.bind(r):t;return this.reads.push(i),o(this),i},"measure"),mutate:(0,l.K)(function(t,r){e("mutate");var i=r?t.bind(r):t;return this.writes.push(i),o(this),i},"mutate"),clear:(0,l.K)(function(t){return e("clear",t),s(this.reads,t)||s(this.writes,t)},"clear"),extend:(0,l.K)(function(t){if(e("extend",t),"object"!=typeof t)throw new Error("expected object");var r=Object.create(this);return n(r,t),r.fastdom=this,r.initialize&&r.initialize(),r},"extend"),catch:null},(0,l.K)(o,"scheduleFlush"),(0,l.K)(a,"flush"),(0,l.K)(s,"remove"),(0,l.K)(n,"mixin"),t.fastdom=t.fastdom||new i}("undefined"!=typeof window?window:globalThis),k={initialize:(0,l.K)(function(){this._tasks=new Map},"initialize"),mutate:(0,l.K)(function(t,e){return B(this,"mutate",t,e)},"mutate"),measure:(0,l.K)(function(t,e){return B(this,"measure",t,e)},"measure"),clear:(0,l.K)(function(t){var e=this._tasks,r=e.get(t);this.fastdom.clear(r),e.delete(t)},"clear")};function B(t,e,r,i){var o,a=t._tasks,s=t.fastdom,l=new Promise(function(t,n){o=s[e](function(){a.delete(l);try{t(i?r.call(i):r())}catch(t){n(t)}},i)});return a.set(l,o),l}(0,l.K)(B,"create");var{initialize:S,mutate:w,measure:T,clear:A}=k,F=k,L=b.extend({raf(t){"function"==typeof queueMicrotask?queueMicrotask(t):setTimeout(t,0)}}).extend(F);function v(t){return Intl.Segmenter?[...(new Intl.Segmenter).segment(t)].map(t=>t.segment):[...t]}function M(t,e){return E(t,[],v(e.content),e.type)}function E(t,e,r,i){if(0===r.length)return[{content:e.join(""),type:i},{content:"",type:i}];const[o,...a]=r,s=[...e,o];return t([{content:s.join(""),type:i}])?E(t,s,a,i):(0===e.length&&o&&(e.push(o),r.shift()),[{content:e.join(""),type:i},{content:r.join(""),type:i}])}function K(t,e){if(t.some(({content:t})=>t.includes("\n")))throw new Error("splitLineToFitWidth does not support newlines in the line");return $(t,e)}function $(t,e,r=[],i=[]){if(0===t.length)return i.length>0&&r.push(i),r.length>0?r:[];let o="";" "===t[0].content&&(o=" ",t.shift());const a=t.shift()??{content:" ",type:"normal"},s=[...i];if(""!==o&&s.push({content:o,type:"normal"}),s.push(a),e(s))return $(t,e,r,s);if(i.length>0)r.push(i),t.unshift(a);else if(a.content){const[i,o]=M(e,a);r.push([i]),o.content&&t.unshift(o)}return $(t,e,r)}function _(t,e){e&&t.attr("style",e)}(0,l.K)(v,"splitTextToChars"),(0,l.K)(M,"splitWordToFitWidth"),(0,l.K)(E,"splitWordToFitWidthRecursion"),(0,l.K)(K,"splitLineToFitWidth"),(0,l.K)($,"splitLineToFitWidthRecursion"),(0,l.K)(_,"applyStyle");async function O(t,e,r,i,o=!1,s=(0,a.zj)(),l=0){const n=t.append("foreignObject");n.attr("width",`${Math.min(10*r,16384)}px`),n.attr("height",`${Math.min(10*r,16384)}px`);const h=n.append("xhtml:div"),c=(0,a.Wi)(e.label)?await(0,a.dj)(e.label.replace(a.Y2.lineBreakRegex,"\n"),s):(0,a.jZ)(e.label,s),d=e.isNode?"nodeLabel":"edgeLabel",g=h.append("span");g.html(c),_(g,e.labelStyle),g.attr("class",`${d} ${i}`),_(h,e.labelStyle),h.style("display","table-cell"),h.style("white-space","nowrap"),h.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(h.style("max-width",r+"px"),h.style("text-align","center")),h.attr("xmlns","http://www.w3.org/1999/xhtml"),o&&h.attr("class","labelBkg");const p=await L.measure(()=>h.node().getBoundingClientRect());return p.width===r?(h.style("display","table"),h.style("white-space","break-spaces"),h.style("width",r+"px")):p.width<l&&(h.style("display","table"),h.style("width",l+"px"),h.style("text-align","center")),n.node()}function I(t,e,r,i=!1){const o=t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em");return i&&o.attr("text-anchor","middle"),o}function q(t,e,r){const i=t.append("text"),o=I(i,1,e);z(o,r);const a=o.node().getComputedTextLength();return i.remove(),a}function D(t,e,r){const i=t.append("text"),o=I(i,1,e);z(o,[{content:r,type:"normal"}]);const a=o.node()?.getBoundingClientRect();return a&&i.remove(),a}function W(t,e,r,i=!1,o=!1){const a=e.append("g"),s=a.insert("rect").attr("class","background").attr("style","stroke: none"),n=a.append("text").attr("y","-10.1");o&&n.attr("text-anchor","middle");let h=0;for(const e of r){const r=(0,l.K)(e=>q(a,1.1,e)<=t,"checkWidth"),i=r(e)?[e]:K(e,r);for(const t of i){z(I(n,h,1.1,o),t),h++}}if(i){const t=n.node().getBBox(),e=2;return s.attr("x",t.x-e).attr("y",t.y-e).attr("width",t.width+2*e).attr("height",t.height+2*e),a.node()}return n.node()}function P(t){return t.replace(/&(amp|lt|gt);/g,(t,e)=>{switch(e){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return t}})}function z(t,e){t.text(""),e.forEach((e,r)=>{const i=t.append("tspan").attr("font-style","em"===e.type?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight","strong"===e.type?"bold":"normal");0===r?i.text(P(e.content)):i.text(" "+P(e.content))})}async function R(t,e={}){const r=[];t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(t,o,s)=>(r.push((async()=>{const r=`${o}:${s}`;return await(0,i.dn)(r)?await(0,i.WY)(r,void 0,{class:"label-icon"}):`<i class='${(0,a.jZ)(t,e).replace(":"," ")}'></i>`})()),t));const o=await Promise.all(r);return t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>o.shift()??"")}(0,l.K)(O,"addHtmlSpan"),(0,l.K)(I,"createTspan"),(0,l.K)(q,"computeWidthOfText"),(0,l.K)(D,"computeDimensionOfText"),(0,l.K)(W,"createFormattedText"),(0,l.K)(P,"decodeHTMLEntities"),(0,l.K)(z,"updateTextContentAndStyles"),(0,l.K)(R,"replaceIconSubstring");var N=(0,l.K)(async(t,e="",{style:r="",isTitle:i=!1,classes:l="",useHtmlLabels:n=!0,markdown:h=!0,isNode:d=!0,width:g=200,minWidth:p=0,addSvgBackground:u=!1}={},y)=>{if(s.R.debug("XYZ createText",e,r,i,l,n,d,"addSvgBackground: ",u),n){const i=h?x(e,y):f(e),s=await R((0,o.Sm)(i),y),n=e.replace(/\\\\/g,"\\"),c={isNode:d,label:(0,a.Wi)(e)?n:s,labelStyle:r.replace("fill:","color:")};return await O(t,c,g,l,u,y,p)}{const a=(0,o.Sm)(e.replace(/<br\s*\/?>/g,"<br/>")),s=W(g,t,h?m(a.replace("<br>","<br/>"),y):C(a),!!e&&u,!d);if(d){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");(0,c.Ltv)(s).attr("style",t)}else{const t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");(0,c.Ltv)(s).select("rect").attr("style",t.replace(/background:/g,"fill:"));const e=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");(0,c.Ltv)(s).select("text").attr("style",e)}return i?(0,c.Ltv)(s).selectAll("tspan.text-outer-tspan").classed("title-row",!0):(0,c.Ltv)(s).selectAll("tspan.text-outer-tspan").classed("row",!0),s}},"createText")},54912(t,e,r){r.d(e,{Gc:()=>d,WY:()=>m,dn:()=>C,pC:()=>u});var i=r(89983),o=r(31293),a=r(86827),s=r(73810),l=r(99249),n=r(1452),h=r(40361),c=r(86649),d={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},g=new Map,p=new Map,u=(0,a.K)(t=>{for(const e of t){if(!e.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(o.R.debug("Registering icon pack:",e.name),"loader"in e)p.set(e.name,e.loader);else{if(!("icons"in e))throw o.R.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.');g.set(e.name,e.icons)}}},"registerIconPacks"),y=(0,a.K)(async(t,e)=>{const r=(0,s.ct)(t,!0,void 0!==e);if(!r)throw new Error(`Invalid icon name: ${t}`);const i=r.prefix||e;if(!i)throw new Error(`Icon name must contain a prefix: ${t}`);let a=g.get(i);if(!a){const t=p.get(i);if(!t)throw new Error(`Icon set not found: ${r.prefix}`);try{a={...await t(),prefix:i},g.set(i,a)}catch(t){throw o.R.error(t),new Error(`Failed to load icon set: ${r.prefix}`)}}const n=(0,l.y)(a,r.name);if(!n)throw new Error(`Icon not found: ${t}`);return n},"getRegisteredIconData"),C=(0,a.K)(async t=>{try{return await y(t),!0}catch{return!1}},"isIconAvailable"),m=(0,a.K)(async(t,e,r)=>{let a;try{a=await y(t,e?.fallbackPrefix)}catch(t){o.R.error(t),a=d}const s=(0,n.p)(a,e),l=(0,c.U)((0,h.$)(s.body),{...s.attributes,...r});return(0,i.jZ)(l,(0,i.zj)())},"getIconSVG")},92941(t,e,r){r.d(e,{Fx:()=>o,Hu:()=>h,Ic:()=>a,P1:()=>s,XE:()=>d,nw:()=>c,rq:()=>n});var i=r(86827),o=new Set(["redux-color","redux-dark-color"]),a=(0,i.K)(t=>Array.isArray(t)&&t.length>0,"hasPalette"),s=(0,i.K)((t,e)=>null!=t&&o.has(t)&&a(e),"isColorTheme"),l=/^[\w-]+$/,n=(0,i.K)(t=>{const e="string"==typeof t||"number"==typeof t?String(t):"";return l.test(e)?e:"classic"},"safeLook"),h=(0,i.K)(t=>a(t)?t.length:0,"paletteSlotCount"),c=(0,i.K)((t,e)=>a(e)?h(e):"number"==typeof t&&Number.isInteger(t)&&t>0&&t<=64?t:12,"colorSlotCount"),d=(0,i.K)((t,e,r,i)=>{if(void 0===e||!s(r,i))return;const o=e%h(i);t.attr("data-color-id",`color-${o}`)},"stampColorSlot")},841(t,e,r){r.d(e,{H:()=>$t,r:()=>Mt});var i=r(86827);function o(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}(0,i.K)(o,"getDefaultExportFromCjs");var a,s,l,n,h,c,d,g,p,u,y,C,m,f,x,b,k,B,S,w,T,A,F,L,v,M,E,K,$,_,O,I,q,D,W,P,z,R,N,j,H,G,X,U,Y={},V={},Z={};function Q(){if(a)return Z;function t(t){return null==t}function e(t){return"object"==typeof t&&null!==t}function r(e){return Array.isArray(e)?e:t(e)?[]:[e]}function o(t,e){if(e){const r=Object.keys(e);for(let i=0,o=r.length;i<o;i+=1){const o=r[i];t[o]=e[o]}}return t}function s(t,e){let r="";for(let i=0;i<e;i+=1)r+=t;return r}function l(t){return 0===t&&Number.NEGATIVE_INFINITY===1/t}return a=1,(0,i.K)(t,"isNothing"),(0,i.K)(e,"isObject"),(0,i.K)(r,"toArray"),(0,i.K)(o,"extend"),(0,i.K)(s,"repeat"),(0,i.K)(l,"isNegativeZero"),Z.isNothing=t,Z.isObject=e,Z.toArray=r,Z.repeat=s,Z.isNegativeZero=l,Z.extend=o,Z}function J(){if(l)return s;function t(t,e){let r="";const i=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(r+='in "'+t.mark.name+'" '),r+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(r+="\n\n"+t.mark.snippet),i+" "+r):i}function e(e,r){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=r,this.message=t(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}return l=1,(0,i.K)(t,"formatError"),(0,i.K)(e,"YAMLException2"),e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e.prototype.toString=(0,i.K)(function(e){return this.name+": "+t(this,e)},"toString"),s=e}function tt(){if(h)return n;h=1;const t=Q();function e(t,e,r,i,o){let a="",s="";const l=Math.floor(o/2)-1;return i-e>l&&(a=" ... ",e=i-l+a.length),r-i>l&&(s=" ...",r=i+l-s.length),{str:a+t.slice(e,r).replace(/\t/g,"→")+s,pos:i-e+a.length}}function r(e,r){return t.repeat(" ",r-e.length)+e}function o(i,o){if(o=Object.create(o||null),!i.buffer)return null;o.maxLength||(o.maxLength=79),"number"!=typeof o.indent&&(o.indent=1),"number"!=typeof o.linesBefore&&(o.linesBefore=3),"number"!=typeof o.linesAfter&&(o.linesAfter=2);const a=/\r?\n|\r|\0/g,s=[0],l=[];let n,h=-1;for(;n=a.exec(i.buffer);)l.push(n.index),s.push(n.index+n[0].length),i.position<=n.index&&h<0&&(h=s.length-2);h<0&&(h=s.length-1);let c="";const d=Math.min(i.line+o.linesAfter,l.length).toString().length,g=o.maxLength-(o.indent+d+3);for(let a=1;a<=o.linesBefore&&!(h-a<0);a++){const n=e(i.buffer,s[h-a],l[h-a],i.position-(s[h]-s[h-a]),g);c=t.repeat(" ",o.indent)+r((i.line-a+1).toString(),d)+" | "+n.str+"\n"+c}const p=e(i.buffer,s[h],l[h],i.position,g);c+=t.repeat(" ",o.indent)+r((i.line+1).toString(),d)+" | "+p.str+"\n",c+=t.repeat("-",o.indent+d+3+p.pos)+"^\n";for(let a=1;a<=o.linesAfter&&!(h+a>=l.length);a++){const n=e(i.buffer,s[h+a],l[h+a],i.position-(s[h]-s[h+a]),g);c+=t.repeat(" ",o.indent)+r((i.line+a+1).toString(),d)+" | "+n.str+"\n"}return c.replace(/\n$/,"")}return(0,i.K)(e,"getLine"),(0,i.K)(r,"padStart"),(0,i.K)(o,"makeSnippet"),n=o}function et(){if(d)return c;d=1;const t=J(),e=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],r=["scalar","sequence","mapping"];function o(t){const e={};return null!==t&&Object.keys(t).forEach(function(r){t[r].forEach(function(t){e[String(t)]=r})}),e}function a(i,a){if(a=a||{},Object.keys(a).forEach(function(r){if(-1===e.indexOf(r))throw new t('Unknown option "'+r+'" is met in definition of "'+i+'" YAML type.')}),this.options=a,this.tag=i,this.kind=a.kind||null,this.resolve=a.resolve||function(){return!0},this.construct=a.construct||function(t){return t},this.instanceOf=a.instanceOf||null,this.predicate=a.predicate||null,this.represent=a.represent||null,this.representName=a.representName||null,this.defaultStyle=a.defaultStyle||null,this.multi=a.multi||!1,this.styleAliases=o(a.styleAliases||null),-1===r.indexOf(this.kind))throw new t('Unknown kind "'+this.kind+'" is specified for "'+i+'" YAML type.')}return(0,i.K)(o,"compileStyleAliases"),(0,i.K)(a,"Type2"),c=a}function rt(){if(p)return g;p=1;const t=J(),e=et();function r(t,e){const r=[];return t[e].forEach(function(t){let e=r.length;r.forEach(function(r,i){r.tag===t.tag&&r.kind===t.kind&&r.multi===t.multi&&(e=i)}),r[e]=t}),r}function o(){const t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function e(e){e.multi?(t.multi[e.kind].push(e),t.multi.fallback.push(e)):t[e.kind][e.tag]=t.fallback[e.tag]=e}(0,i.K)(e,"collectType");for(let t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(e);return t}function a(t){return this.extend(t)}return(0,i.K)(r,"compileList"),(0,i.K)(o,"compileMap"),(0,i.K)(a,"Schema2"),a.prototype.extend=(0,i.K)(function(i){let s=[],l=[];if(i instanceof e)l.push(i);else if(Array.isArray(i))l=l.concat(i);else{if(!i||!Array.isArray(i.implicit)&&!Array.isArray(i.explicit))throw new t("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");i.implicit&&(s=s.concat(i.implicit)),i.explicit&&(l=l.concat(i.explicit))}s.forEach(function(r){if(!(r instanceof e))throw new t("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(r.loadKind&&"scalar"!==r.loadKind)throw new t("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(r.multi)throw new t("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),l.forEach(function(r){if(!(r instanceof e))throw new t("Specified list of YAML types (or a single Type object) contains a non-Type object.")});const n=Object.create(a.prototype);return n.implicit=(this.implicit||[]).concat(s),n.explicit=(this.explicit||[]).concat(l),n.compiledImplicit=r(n,"implicit"),n.compiledExplicit=r(n,"explicit"),n.compiledTypeMap=o(n.compiledImplicit,n.compiledExplicit),n},"extend"),g=a}function it(){if(y)return u;y=1;const t=et();return u=new t("tag:yaml.org,2002:str",{kind:"scalar",construct:(0,i.K)(function(t){return null!==t?t:""},"construct")})}function ot(){if(m)return C;m=1;const t=et();return C=new t("tag:yaml.org,2002:seq",{kind:"sequence",construct:(0,i.K)(function(t){return null!==t?t:[]},"construct")})}function at(){if(x)return f;x=1;const t=et();return f=new t("tag:yaml.org,2002:map",{kind:"mapping",construct:(0,i.K)(function(t){return null!==t?t:{}},"construct")})}function st(){if(k)return b;k=1;const t=rt();return b=new t({explicit:[it(),ot(),at()]})}function lt(){if(S)return B;S=1;const t=et();function e(t){if(null===t)return!0;const e=t.length;return 1===e&&"~"===t||4===e&&("null"===t||"Null"===t||"NULL"===t)}function r(){return null}function o(t){return null===t}return(0,i.K)(e,"resolveYamlNull"),(0,i.K)(r,"constructYamlNull"),(0,i.K)(o,"isNull"),B=new t("tag:yaml.org,2002:null",{kind:"scalar",resolve:e,construct:r,predicate:o,represent:{canonical:(0,i.K)(function(){return"~"},"canonical"),lowercase:(0,i.K)(function(){return"null"},"lowercase"),uppercase:(0,i.K)(function(){return"NULL"},"uppercase"),camelcase:(0,i.K)(function(){return"Null"},"camelcase"),empty:(0,i.K)(function(){return""},"empty")},defaultStyle:"lowercase"})}function nt(){if(T)return w;T=1;const t=et();function e(t){if(null===t)return!1;const e=t.length;return 4===e&&("true"===t||"True"===t||"TRUE"===t)||5===e&&("false"===t||"False"===t||"FALSE"===t)}function r(t){return"true"===t||"True"===t||"TRUE"===t}function o(t){return"[object Boolean]"===Object.prototype.toString.call(t)}return(0,i.K)(e,"resolveYamlBoolean"),(0,i.K)(r,"constructYamlBoolean"),(0,i.K)(o,"isBoolean"),w=new t("tag:yaml.org,2002:bool",{kind:"scalar",resolve:e,construct:r,predicate:o,represent:{lowercase:(0,i.K)(function(t){return t?"true":"false"},"lowercase"),uppercase:(0,i.K)(function(t){return t?"TRUE":"FALSE"},"uppercase"),camelcase:(0,i.K)(function(t){return t?"True":"False"},"camelcase")},defaultStyle:"lowercase"})}function ht(){if(F)return A;F=1;const t=Q(),e=et();function r(t){return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function o(t){return t>=48&&t<=55}function a(t){return t>=48&&t<=57}function s(t){if(null===t)return!1;const e=t.length;let i=0,s=!1;if(!e)return!1;let n=t[i];if("-"!==n&&"+"!==n||(n=t[++i]),"0"===n){if(i+1===e)return!0;if(n=t[++i],"b"===n){for(i++;i<e;i++){if(n=t[i],"0"!==n&&"1"!==n)return!1;s=!0}return s&&isFinite(l(t))}if("x"===n){for(i++;i<e;i++){if(!r(t.charCodeAt(i)))return!1;s=!0}return s&&isFinite(l(t))}if("o"===n){for(i++;i<e;i++){if(!o(t.charCodeAt(i)))return!1;s=!0}return s&&isFinite(l(t))}}for(;i<e;i++){if(!a(t.charCodeAt(i)))return!1;s=!0}return!!s&&isFinite(l(t))}function l(t){let e=t,r=1,i=e[0];if("-"!==i&&"+"!==i||("-"===i&&(r=-1),e=e.slice(1),i=e[0]),"0"===e)return 0;if("0"===i){if("b"===e[1])return r*parseInt(e.slice(2),2);if("x"===e[1])return r*parseInt(e.slice(2),16);if("o"===e[1])return r*parseInt(e.slice(2),8)}return r*parseInt(e,10)}function n(t){return l(t)}function h(e){return"[object Number]"===Object.prototype.toString.call(e)&&e%1==0&&!t.isNegativeZero(e)}return(0,i.K)(r,"isHexCode"),(0,i.K)(o,"isOctCode"),(0,i.K)(a,"isDecCode"),(0,i.K)(s,"resolveYamlInteger"),(0,i.K)(l,"parseYamlInteger"),(0,i.K)(n,"constructYamlInteger"),(0,i.K)(h,"isInteger"),A=new e("tag:yaml.org,2002:int",{kind:"scalar",resolve:s,construct:n,predicate:h,represent:{binary:(0,i.K)(function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},"binary"),octal:(0,i.K)(function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},"octal"),decimal:(0,i.K)(function(t){return t.toString(10)},"decimal"),hexadecimal:(0,i.K)(function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})}function ct(){if(v)return L;v=1;const t=Q(),e=et(),r=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),o=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function a(t){return null!==t&&(!!r.test(t)&&(!!isFinite(parseFloat(t,10))||o.test(t)))}function s(t){let e=t.toLowerCase();const r="-"===e[0]?-1:1;return"+-".indexOf(e[0])>=0&&(e=e.slice(1)),".inf"===e?1===r?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:r*parseFloat(e,10)}(0,i.K)(a,"resolveYamlFloat"),(0,i.K)(s,"constructYamlFloat");const l=/^[-+]?[0-9]+e/;function n(e,r){if(isNaN(e))switch(r){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(r){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(r){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(t.isNegativeZero(e))return"-0.0";const i=e.toString(10);return l.test(i)?i.replace("e",".e"):i}function h(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||t.isNegativeZero(e))}return(0,i.K)(n,"representYamlFloat"),(0,i.K)(h,"isFloat"),L=new e("tag:yaml.org,2002:float",{kind:"scalar",resolve:a,construct:s,predicate:h,represent:n,defaultStyle:"lowercase"})}function dt(){return E?M:(E=1,M=st().extend({implicit:[lt(),nt(),ht(),ct()]}))}function gt(){return $?K:($=1,K=dt())}function pt(){if(O)return _;O=1;const t=et(),e=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),r=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function o(t){return null!==t&&(null!==e.exec(t)||null!==r.exec(t))}function a(t){let i=0,o=null,a=e.exec(t);if(null===a&&(a=r.exec(t)),null===a)throw new Error("Date resolve error");const s=+a[1],l=+a[2]-1,n=+a[3];if(!a[4])return new Date(Date.UTC(s,l,n));const h=+a[4],c=+a[5],d=+a[6];if(a[7]){for(i=a[7].slice(0,3);i.length<3;)i+="0";i=+i}if(a[9]){o=6e4*(60*+a[10]+ +(a[11]||0)),"-"===a[9]&&(o=-o)}const g=new Date(Date.UTC(s,l,n,h,c,d,i));return o&&g.setTime(g.getTime()-o),g}function s(t){return t.toISOString()}return(0,i.K)(o,"resolveYamlTimestamp"),(0,i.K)(a,"constructYamlTimestamp"),(0,i.K)(s,"representYamlTimestamp"),_=new t("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:o,construct:a,instanceOf:Date,represent:s})}function ut(){if(q)return I;q=1;const t=et();function e(t){return"<<"===t||null===t}return(0,i.K)(e,"resolveYamlMerge"),I=new t("tag:yaml.org,2002:merge",{kind:"scalar",resolve:e})}function yt(){if(W)return D;W=1;const t=et(),e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function r(t){if(null===t)return!1;let r=0;const i=t.length,o=e;for(let e=0;e<i;e++){const i=o.indexOf(t.charAt(e));if(!(i>64)){if(i<0)return!1;r+=6}}return r%8==0}function o(t){const r=t.replace(/[\r\n=]/g,""),i=r.length,o=e;let a=0;const s=[];for(let t=0;t<i;t++)t%4==0&&t&&(s.push(a>>16&255),s.push(a>>8&255),s.push(255&a)),a=a<<6|o.indexOf(r.charAt(t));const l=i%4*6;return 0===l?(s.push(a>>16&255),s.push(a>>8&255),s.push(255&a)):18===l?(s.push(a>>10&255),s.push(a>>2&255)):12===l&&s.push(a>>4&255),new Uint8Array(s)}function a(t){let r="",i=0;const o=t.length,a=e;for(let e=0;e<o;e++)e%3==0&&e&&(r+=a[i>>18&63],r+=a[i>>12&63],r+=a[i>>6&63],r+=a[63&i]),i=(i<<8)+t[e];const s=o%3;return 0===s?(r+=a[i>>18&63],r+=a[i>>12&63],r+=a[i>>6&63],r+=a[63&i]):2===s?(r+=a[i>>10&63],r+=a[i>>4&63],r+=a[i<<2&63],r+=a[64]):1===s&&(r+=a[i>>2&63],r+=a[i<<4&63],r+=a[64],r+=a[64]),r}function s(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)}return(0,i.K)(r,"resolveYamlBinary"),(0,i.K)(o,"constructYamlBinary"),(0,i.K)(a,"representYamlBinary"),(0,i.K)(s,"isBinary"),D=new t("tag:yaml.org,2002:binary",{kind:"scalar",resolve:r,construct:o,predicate:s,represent:a})}function Ct(){if(z)return P;z=1;const t=et(),e=Object.prototype.hasOwnProperty,r=Object.prototype.toString;function o(t){if(null===t)return!0;const i=[],o=t;for(let t=0,a=o.length;t<a;t+=1){const a=o[t];let s,l=!1;if("[object Object]"!==r.call(a))return!1;for(s in a)if(e.call(a,s)){if(l)return!1;l=!0}if(!l)return!1;if(-1!==i.indexOf(s))return!1;i.push(s)}return!0}function a(t){return null!==t?t:[]}return(0,i.K)(o,"resolveYamlOmap"),(0,i.K)(a,"constructYamlOmap"),P=new t("tag:yaml.org,2002:omap",{kind:"sequence",resolve:o,construct:a})}function mt(){if(N)return R;N=1;const t=et(),e=Object.prototype.toString;function r(t){if(null===t)return!0;const r=t,i=new Array(r.length);for(let t=0,o=r.length;t<o;t+=1){const o=r[t];if("[object Object]"!==e.call(o))return!1;const a=Object.keys(o);if(1!==a.length)return!1;i[t]=[a[0],o[a[0]]]}return!0}function o(t){if(null===t)return[];const e=t,r=new Array(e.length);for(let t=0,i=e.length;t<i;t+=1){const i=e[t],o=Object.keys(i);r[t]=[o[0],i[o[0]]]}return r}return(0,i.K)(r,"resolveYamlPairs"),(0,i.K)(o,"constructYamlPairs"),R=new t("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:r,construct:o})}function ft(){if(H)return j;H=1;const t=et(),e=Object.prototype.hasOwnProperty;function r(t){if(null===t)return!0;const r=t;for(const t in r)if(e.call(r,t)&&null!==r[t])return!1;return!0}function o(t){return null!==t?t:{}}return(0,i.K)(r,"resolveYamlSet"),(0,i.K)(o,"constructYamlSet"),j=new t("tag:yaml.org,2002:set",{kind:"mapping",resolve:r,construct:o})}function xt(){return X?G:(X=1,G=gt().extend({implicit:[pt(),ut()],explicit:[yt(),Ct(),mt(),ft()]}))}function bt(){if(U)return V;U=1;const t=Q(),e=J(),r=tt(),o=xt(),a=Object.prototype.hasOwnProperty,s=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,l=/[\x85\u2028\u2029]/,n=/[,\[\]{}]/,h=/^(?:!|!!|![0-9A-Za-z-]+!)$/,c=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function d(t){return Object.prototype.toString.call(t)}function g(t){return 10===t||13===t}function p(t){return 9===t||32===t}function u(t){return 9===t||32===t||10===t||13===t}function y(t){return 44===t||91===t||93===t||123===t||125===t}function C(t){if(t>=48&&t<=57)return t-48;const e=32|t;return e>=97&&e<=102?e-97+10:-1}function m(t){return 120===t?2:117===t?4:85===t?8:0}function f(t){return t>=48&&t<=57?t-48:-1}function x(t){switch(t){case 48:return"\0";case 97:return"";case 98:return"\b";case 116:case 9:return"\t";case 110:return"\n";case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"…";case 95:return" ";case 76:return"\u2028";case 80:return"\u2029";default:return""}}function b(t){return t<=65535?String.fromCharCode(t):String.fromCharCode(55296+(t-65536>>10),56320+(t-65536&1023))}function k(t,e,r){"__proto__"===e?Object.defineProperty(t,e,{configurable:!0,enumerable:!0,writable:!0,value:r}):t[e]=r}(0,i.K)(d,"_class"),(0,i.K)(g,"isEol"),(0,i.K)(p,"isWhiteSpace"),(0,i.K)(u,"isWsOrEol"),(0,i.K)(y,"isFlowIndicator"),(0,i.K)(C,"fromHexCode"),(0,i.K)(m,"escapedHexLen"),(0,i.K)(f,"fromDecimalCode"),(0,i.K)(x,"simpleEscapeSequence"),(0,i.K)(b,"charFromCodepoint"),(0,i.K)(k,"setProperty");const B=new Array(256),S=new Array(256);for(let t=0;t<256;t++)B[t]=x(t)?1:0,S[t]=x(t);function w(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||o,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.maxDepth="number"==typeof e.maxDepth?e.maxDepth:100,this.maxTotalMergeKeys="number"==typeof e.maxTotalMergeKeys?e.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}function T(t,i){const o={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return o.snippet=r(o),new e(i,o)}function A(t,e){throw T(t,e)}function F(t,e){t.onWarning&&t.onWarning.call(null,T(t,e))}function L(t,e,r){const i=t.anchorMapTransactions;if(0!==i.length){const r=i[i.length-1];a.call(r,e)||(r[e]={existed:a.call(t.anchorMap,e),value:t.anchorMap[e]})}t.anchorMap[e]=r}function v(t){t.anchorMapTransactions.push(Object.create(null))}function M(t){const e=t.anchorMapTransactions.pop(),r=t.anchorMapTransactions;if(0===r.length)return;const i=r[r.length-1],o=Object.keys(e);for(let t=0,r=o.length;t<r;t+=1){const r=o[t];a.call(i,r)||(i[r]=e[r])}}function E(t){const e=t.anchorMapTransactions.pop(),r=Object.keys(e);for(let i=r.length-1;i>=0;i-=1){const o=e[r[i]];o.existed?t.anchorMap[r[i]]=o.value:delete t.anchorMap[r[i]]}}function K(t){return{position:t.position,line:t.line,lineStart:t.lineStart,lineIndent:t.lineIndent,firstTabInLine:t.firstTabInLine,tag:t.tag,anchor:t.anchor,kind:t.kind,result:t.result}}function $(t,e){t.position=e.position,t.line=e.line,t.lineStart=e.lineStart,t.lineIndent=e.lineIndent,t.firstTabInLine=e.firstTabInLine,t.tag=e.tag,t.anchor=e.anchor,t.kind=e.kind,t.result=e.result}(0,i.K)(w,"State"),(0,i.K)(T,"generateError"),(0,i.K)(A,"throwError"),(0,i.K)(F,"throwWarning"),(0,i.K)(L,"storeAnchor"),(0,i.K)(v,"beginAnchorTransaction"),(0,i.K)(M,"commitAnchorTransaction"),(0,i.K)(E,"rollbackAnchorTransaction"),(0,i.K)(K,"snapshotState"),(0,i.K)($,"restoreState");const _={YAML:(0,i.K)(function(t,e,r){null!==t.version&&A(t,"duplication of %YAML directive"),1!==r.length&&A(t,"YAML directive accepts exactly one argument");const i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]);null===i&&A(t,"ill-formed argument of the YAML directive");const o=parseInt(i[1],10),a=parseInt(i[2],10);1!==o&&A(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=a<2,1!==a&&2!==a&&F(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:(0,i.K)(function(t,e,r){let i;2!==r.length&&A(t,"TAG directive accepts exactly two arguments");const o=r[0];i=r[1],h.test(o)||A(t,"ill-formed tag handle (first argument) of the TAG directive"),a.call(t.tagMap,o)&&A(t,'there is a previously declared suffix for "'+o+'" tag handle'),c.test(i)||A(t,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch(e){A(t,"tag prefix is malformed: "+i)}t.tagMap[o]=i},"handleTagDirective")};function O(t,e,r,i){if(e<r){const o=t.input.slice(e,r);if(i)for(let e=0,r=o.length;e<r;e+=1){const r=o.charCodeAt(e);9===r||r>=32&&r<=1114111||A(t,"expected valid JSON character")}else s.test(o)&&A(t,"the stream contains non-printable characters");t.result+=o}}function I(e,r,i,o){t.isObject(i)||A(e,"cannot merge mappings; the provided source object is unacceptable");const s=Object.keys(i);for(let t=0,l=s.length;t<l;t+=1){const l=s[t];-1!==e.maxTotalMergeKeys&&++e.totalMergeKeys>e.maxTotalMergeKeys&&A(e,"merge keys exceeded maxTotalMergeKeys ("+e.maxTotalMergeKeys+")"),a.call(r,l)||(k(r,l,i[l]),o[l]=!0)}}function q(t,e,r,i,o,s,l,n,h){if(Array.isArray(o))for(let e=0,r=(o=Array.prototype.slice.call(o)).length;e<r;e+=1)Array.isArray(o[e])&&A(t,"nested arrays are not supported inside keys"),"object"==typeof o&&"[object Object]"===d(o[e])&&(o[e]="[object Object]");if("object"==typeof o&&"[object Object]"===d(o)&&(o="[object Object]"),o=String(o),null===e&&(e={}),"tag:yaml.org,2002:merge"===i)if(Array.isArray(s))for(let i=0,o=s.length;i<o;i+=1)I(t,e,s[i],r);else I(t,e,s,r);else t.json||a.call(r,o)||!a.call(e,o)||(t.line=l||t.line,t.lineStart=n||t.lineStart,t.position=h||t.position,A(t,"duplicated mapping key")),k(e,o,s),delete r[o];return e}function D(t){const e=t.input.charCodeAt(t.position);10===e?t.position++:13===e?(t.position++,10===t.input.charCodeAt(t.position)&&t.position++):A(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function W(t,e,r){let i=0,o=t.input.charCodeAt(t.position);for(;0!==o;){for(;p(o);)9===o&&-1===t.firstTabInLine&&(t.firstTabInLine=t.position),o=t.input.charCodeAt(++t.position);if(e&&35===o)do{o=t.input.charCodeAt(++t.position)}while(10!==o&&13!==o&&0!==o);if(!g(o))break;for(D(t),o=t.input.charCodeAt(t.position),i++,t.lineIndent=0;32===o;)t.lineIndent++,o=t.input.charCodeAt(++t.position)}return-1!==r&&0!==i&&t.lineIndent<r&&F(t,"deficient indentation"),i}function P(t){let e=t.position,r=t.input.charCodeAt(e);return!(45!==r&&46!==r||r!==t.input.charCodeAt(e+1)||r!==t.input.charCodeAt(e+2)||(e+=3,r=t.input.charCodeAt(e),0!==r&&!u(r)))}function z(e,r){1===r?e.result+=" ":r>1&&(e.result+=t.repeat("\n",r-1))}function R(t,e,r){let i,o,a,s,l,n;const h=t.kind,c=t.result;let d=t.input.charCodeAt(t.position);if(u(d)||y(d)||35===d||38===d||42===d||33===d||124===d||62===d||39===d||34===d||37===d||64===d||96===d)return!1;if(63===d||45===d){const e=t.input.charCodeAt(t.position+1);if(u(e)||r&&y(e))return!1}for(t.kind="scalar",t.result="",i=o=t.position,a=!1;0!==d;){if(58===d){const e=t.input.charCodeAt(t.position+1);if(u(e)||r&&y(e))break}else if(35===d){if(u(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&P(t)||r&&y(d))break;if(g(d)){if(s=t.line,l=t.lineStart,n=t.lineIndent,W(t,!1,-1),t.lineIndent>=e){a=!0,d=t.input.charCodeAt(t.position);continue}t.position=o,t.line=s,t.lineStart=l,t.lineIndent=n;break}}a&&(O(t,i,o,!1),z(t,t.line-s),i=o=t.position,a=!1),p(d)||(o=t.position+1),d=t.input.charCodeAt(++t.position)}return O(t,i,o,!1),!!t.result||(t.kind=h,t.result=c,!1)}function N(t,e){let r,i,o=t.input.charCodeAt(t.position);if(39!==o)return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;0!==(o=t.input.charCodeAt(t.position));)if(39===o){if(O(t,r,t.position,!0),o=t.input.charCodeAt(++t.position),39!==o)return!0;r=t.position,t.position++,i=t.position}else g(o)?(O(t,r,i,!0),z(t,W(t,!1,e)),r=i=t.position):t.position===t.lineStart&&P(t)?A(t,"unexpected end of the document within a single quoted scalar"):(t.position++,p(o)||(i=t.position));A(t,"unexpected end of the stream within a single quoted scalar")}function j(t,e){let r,i,o,a=t.input.charCodeAt(t.position);if(34!==a)return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;0!==(a=t.input.charCodeAt(t.position));){if(34===a)return O(t,r,t.position,!0),t.position++,!0;if(92===a){if(O(t,r,t.position,!0),a=t.input.charCodeAt(++t.position),g(a))W(t,!1,e);else if(a<256&&B[a])t.result+=S[a],t.position++;else if((o=m(a))>0){let e=o,r=0;for(;e>0;e--)a=t.input.charCodeAt(++t.position),(o=C(a))>=0?r=(r<<4)+o:A(t,"expected hexadecimal character");t.result+=b(r),t.position++}else A(t,"unknown escape sequence");r=i=t.position}else g(a)?(O(t,r,i,!0),z(t,W(t,!1,e)),r=i=t.position):t.position===t.lineStart&&P(t)?A(t,"unexpected end of the document within a double quoted scalar"):(t.position++,p(a)||(i=t.position))}A(t,"unexpected end of the stream within a double quoted scalar")}function H(t,e){let r,i,o,a=!0;const s=t.tag;let l;const n=t.anchor;let h,c,d,g;const p=Object.create(null);let y,C,m,f=t.input.charCodeAt(t.position);if(91===f)h=93,g=!1,l=[];else{if(123!==f)return!1;h=125,g=!0,l={}}for(null!==t.anchor&&L(t,t.anchor,l),f=t.input.charCodeAt(++t.position);0!==f;){if(W(t,!0,e),f=t.input.charCodeAt(t.position),f===h)return t.position++,t.tag=s,t.anchor=n,t.kind=g?"mapping":"sequence",t.result=l,!0;if(a?44===f&&A(t,"expected the node content, but found ','"):A(t,"missed comma between flow collection entries"),C=y=m=null,c=d=!1,63===f){u(t.input.charCodeAt(t.position+1))&&(c=d=!0,t.position++,W(t,!0,e))}r=t.line,i=t.lineStart,o=t.position,ot(t,e,1,!1,!0),C=t.tag,y=t.result,W(t,!0,e),f=t.input.charCodeAt(t.position),!d&&t.line!==r||58!==f||(c=!0,f=t.input.charCodeAt(++t.position),W(t,!0,e),ot(t,e,1,!1,!0),m=t.result),g?q(t,l,p,C,y,m,r,i,o):c?l.push(q(t,null,p,C,y,m,r,i,o)):l.push(y),W(t,!0,e),f=t.input.charCodeAt(t.position),44===f?(a=!0,f=t.input.charCodeAt(++t.position)):a=!1}A(t,"unexpected end of the stream within a flow collection")}function G(e,r){let i,o,a=1,s=!1,l=!1,n=r,h=0,c=!1,d=e.input.charCodeAt(e.position);if(124===d)i=!1;else{if(62!==d)return!1;i=!0}for(e.kind="scalar",e.result="";0!==d;)if(d=e.input.charCodeAt(++e.position),43===d||45===d)1===a?a=43===d?3:2:A(e,"repeat of a chomping mode identifier");else{if(!((o=f(d))>=0))break;0===o?A(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?A(e,"repeat of an indentation width identifier"):(n=r+o-1,l=!0)}if(p(d)){do{d=e.input.charCodeAt(++e.position)}while(p(d));if(35===d)do{d=e.input.charCodeAt(++e.position)}while(!g(d)&&0!==d)}for(;0!==d;){for(D(e),e.lineIndent=0,d=e.input.charCodeAt(e.position);(!l||e.lineIndent<n)&&32===d;)e.lineIndent++,d=e.input.charCodeAt(++e.position);if(!l&&e.lineIndent>n&&(n=e.lineIndent),g(d)){h++;continue}if(l||0!==n||A(e,"missing indentation for block scalar"),e.lineIndent<n){3===a?e.result+=t.repeat("\n",s?1+h:h):1===a&&s&&(e.result+="\n");break}i?p(d)?(c=!0,e.result+=t.repeat("\n",s?1+h:h)):c?(c=!1,e.result+=t.repeat("\n",h+1)):0===h?s&&(e.result+=" "):e.result+=t.repeat("\n",h):e.result+=t.repeat("\n",s?1+h:h),s=!0,l=!0,h=0;const r=e.position;for(;!g(d)&&0!==d;)d=e.input.charCodeAt(++e.position);O(e,r,e.position,!1)}return!0}function X(t,e){const r=t.tag,i=t.anchor,o=[];let a=!1;if(-1!==t.firstTabInLine)return!1;null!==t.anchor&&L(t,t.anchor,o);let s=t.input.charCodeAt(t.position);for(;0!==s&&(-1!==t.firstTabInLine&&(t.position=t.firstTabInLine,A(t,"tab characters must not be used in indentation")),45===s);){if(!u(t.input.charCodeAt(t.position+1)))break;if(a=!0,t.position++,W(t,!0,-1)&&t.lineIndent<=e){o.push(null),s=t.input.charCodeAt(t.position);continue}const r=t.line;if(ot(t,e,3,!1,!0),o.push(t.result),W(t,!0,-1),s=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&0!==s)A(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return!!a&&(t.tag=r,t.anchor=i,t.kind="sequence",t.result=o,!0)}function Y(t,e,r){let i,o,a,s;const l=t.tag,n=t.anchor,h={},c=Object.create(null);let d=null,g=null,y=null,C=!1,m=!1;if(-1!==t.firstTabInLine)return!1;null!==t.anchor&&L(t,t.anchor,h);let f=t.input.charCodeAt(t.position);for(;0!==f;){C||-1===t.firstTabInLine||(t.position=t.firstTabInLine,A(t,"tab characters must not be used in indentation"));const x=t.input.charCodeAt(t.position+1),b=t.line;if(63!==f&&58!==f||!u(x)){if(o=t.line,a=t.lineStart,s=t.position,!ot(t,r,2,!1,!0))break;if(t.line===b){for(f=t.input.charCodeAt(t.position);p(f);)f=t.input.charCodeAt(++t.position);if(58===f)f=t.input.charCodeAt(++t.position),u(f)||A(t,"a whitespace character is expected after the key-value separator within a block mapping"),C&&(q(t,h,c,d,g,null,o,a,s),d=g=y=null),m=!0,C=!1,i=!1,d=t.tag,g=t.result;else{if(!m)return t.tag=l,t.anchor=n,!0;A(t,"can not read an implicit mapping pair; a colon is missed")}}else{if(!m)return t.tag=l,t.anchor=n,!0;A(t,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===f?(C&&(q(t,h,c,d,g,null,o,a,s),d=g=y=null),m=!0,C=!0,i=!0):C?(C=!1,i=!0):A(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,f=x;if((t.line===b||t.lineIndent>e)&&(C&&(o=t.line,a=t.lineStart,s=t.position),ot(t,e,4,!0,i)&&(C?g=t.result:y=t.result),C||(q(t,h,c,d,g,y,o,a,s),d=g=y=null),W(t,!0,-1),f=t.input.charCodeAt(t.position)),(t.line===b||t.lineIndent>e)&&0!==f)A(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return C&&q(t,h,c,d,g,null,o,a,s),m&&(t.tag=l,t.anchor=n,t.kind="mapping",t.result=h),m}function Z(t){let e,r,i=!1,o=!1,s=t.input.charCodeAt(t.position);if(33!==s)return!1;null!==t.tag&&A(t,"duplication of a tag property"),s=t.input.charCodeAt(++t.position),60===s?(i=!0,s=t.input.charCodeAt(++t.position)):33===s?(o=!0,e="!!",s=t.input.charCodeAt(++t.position)):e="!";let l=t.position;if(i){do{s=t.input.charCodeAt(++t.position)}while(0!==s&&62!==s);t.position<t.length?(r=t.input.slice(l,t.position),s=t.input.charCodeAt(++t.position)):A(t,"unexpected end of the stream within a verbatim tag")}else{for(;0!==s&&!u(s);)33===s&&(o?A(t,"tag suffix cannot contain exclamation marks"):(e=t.input.slice(l-1,t.position+1),h.test(e)||A(t,"named tag handle cannot contain such characters"),o=!0,l=t.position+1)),s=t.input.charCodeAt(++t.position);r=t.input.slice(l,t.position),n.test(r)&&A(t,"tag suffix cannot contain flow indicator characters")}r&&!c.test(r)&&A(t,"tag name cannot contain such characters: "+r);try{r=decodeURIComponent(r)}catch(e){A(t,"tag name is malformed: "+r)}return i?t.tag=r:a.call(t.tagMap,e)?t.tag=t.tagMap[e]+r:"!"===e?t.tag="!"+r:"!!"===e?t.tag="tag:yaml.org,2002:"+r:A(t,'undeclared tag handle "'+e+'"'),!0}function et(t){let e=t.input.charCodeAt(t.position);if(38!==e)return!1;null!==t.anchor&&A(t,"duplication of an anchor property"),e=t.input.charCodeAt(++t.position);const r=t.position;for(;0!==e&&!u(e)&&!y(e);)e=t.input.charCodeAt(++t.position);return t.position===r&&A(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(r,t.position),!0}function rt(t){let e=t.input.charCodeAt(t.position);if(42!==e)return!1;e=t.input.charCodeAt(++t.position);const r=t.position;for(;0!==e&&!u(e)&&!y(e);)e=t.input.charCodeAt(++t.position);t.position===r&&A(t,"name of an alias node must contain at least one character");const i=t.input.slice(r,t.position);return a.call(t.anchorMap,i)||A(t,'unidentified alias "'+i+'"'),t.result=t.anchorMap[i],W(t,!0,-1),!0}function it(t,e,r,i){const o=K(t);return v(t),$(t,e),t.tag=null,t.anchor=null,t.kind=null,t.result=null,Y(t,r,i)&&"mapping"===t.kind?(M(t),!0):(E(t),$(t,o),!1)}function ot(t,e,r,i,o){let s,l,n,h,c,d=1,g=!1,p=!1,u=null;t.depth>=t.maxDepth&&A(t,"nesting exceeded maxDepth ("+t.maxDepth+")"),t.depth+=1,null!==t.listener&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null;const y=s=l=4===r||3===r;if(i&&W(t,!0,-1)&&(g=!0,t.lineIndent>e?d=1:t.lineIndent===e?d=0:t.lineIndent<e&&(d=-1)),1===d)for(;;){const r=t.input.charCodeAt(t.position),i=K(t);if(g&&(33===r&&null!==t.tag||38===r&&null!==t.anchor))break;if(!Z(t)&&!et(t))break;null===u&&(u=i),W(t,!0,-1)?(g=!0,l=y,t.lineIndent>e?d=1:t.lineIndent===e?d=0:t.lineIndent<e&&(d=-1)):l=!1}if(l&&(l=g||o),1===d||4===r)if(h=1===r||2===r?e:e+1,c=t.position-t.lineStart,1===d)if(l&&(X(t,c)||Y(t,c,h))||H(t,h))p=!0;else{const e=t.input.charCodeAt(t.position);null!==u&&y&&!l&&124!==e&&62!==e&&it(t,u,u.position-u.lineStart,h)||s&&G(t,h)||N(t,h)||j(t,h)?p=!0:rt(t)?(p=!0,null===t.tag&&null===t.anchor||A(t,"alias node should not have any properties")):R(t,h,1===r)&&(p=!0,null===t.tag&&(t.tag="?")),null!==t.anchor&&L(t,t.anchor,t.result)}else 0===d&&(p=l&&X(t,c));if(null===t.tag)null!==t.anchor&&L(t,t.anchor,t.result);else if("?"===t.tag){null!==t.result&&"scalar"!==t.kind&&A(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"');for(let e=0,r=t.implicitTypes.length;e<r;e+=1)if(n=t.implicitTypes[e],n.resolve(t.result)){t.result=n.construct(t.result),t.tag=n.tag,null!==t.anchor&&L(t,t.anchor,t.result);break}}else if("!"!==t.tag){if(a.call(t.typeMap[t.kind||"fallback"],t.tag))n=t.typeMap[t.kind||"fallback"][t.tag];else{n=null;const e=t.typeMap.multi[t.kind||"fallback"];for(let r=0,i=e.length;r<i;r+=1)if(t.tag.slice(0,e[r].tag.length)===e[r].tag){n=e[r];break}}n||A(t,"unknown tag !<"+t.tag+">"),null!==t.result&&n.kind!==t.kind&&A(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+n.kind+'", not "'+t.kind+'"'),n.resolve(t.result,t.tag)?(t.result=n.construct(t.result,t.tag),null!==t.anchor&&L(t,t.anchor,t.result)):A(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),t.depth-=1,null!==t.tag||null!==t.anchor||p}function at(t){const e=t.position;let r,i=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);0!==(r=t.input.charCodeAt(t.position))&&(W(t,!0,-1),r=t.input.charCodeAt(t.position),!(t.lineIndent>0||37!==r));){i=!0,r=t.input.charCodeAt(++t.position);let e=t.position;for(;0!==r&&!u(r);)r=t.input.charCodeAt(++t.position);const o=t.input.slice(e,t.position),s=[];for(o.length<1&&A(t,"directive name must not be less than one character in length");0!==r;){for(;p(r);)r=t.input.charCodeAt(++t.position);if(35===r){do{r=t.input.charCodeAt(++t.position)}while(0!==r&&!g(r));break}if(g(r))break;for(e=t.position;0!==r&&!u(r);)r=t.input.charCodeAt(++t.position);s.push(t.input.slice(e,t.position))}0!==r&&D(t),a.call(_,o)?_[o](t,o,s):F(t,'unknown document directive "'+o+'"')}W(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,W(t,!0,-1)):i&&A(t,"directives end mark is expected"),ot(t,t.lineIndent-1,4,!1,!0),W(t,!0,-1),t.checkLineBreaks&&l.test(t.input.slice(e,t.position))&&F(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&P(t)?46===t.input.charCodeAt(t.position)&&(t.position+=3,W(t,!0,-1)):t.position<t.length-1&&A(t,"end of the stream or a document separator is expected")}function st(t,e){e=e||{},0!==(t=String(t)).length&&(10!==t.charCodeAt(t.length-1)&&13!==t.charCodeAt(t.length-1)&&(t+="\n"),65279===t.charCodeAt(0)&&(t=t.slice(1)));const r=new w(t,e),i=t.indexOf("\0");for(-1!==i&&(r.position=i,A(r,"null byte is not allowed in input")),r.input+="\0";32===r.input.charCodeAt(r.position);)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)at(r);return r.documents}function lt(t,e,r){null!==e&&"object"==typeof e&&void 0===r&&(r=e,e=null);const i=st(t,r);if("function"!=typeof e)return i;for(let t=0,r=i.length;t<r;t+=1)e(i[t])}function nt(t,r){const i=st(t,r);if(0!==i.length){if(1===i.length)return i[0];throw new e("expected a single document in the stream, but found more")}}return(0,i.K)(O,"captureSegment"),(0,i.K)(I,"mergeMappings"),(0,i.K)(q,"storeMappingPair"),(0,i.K)(D,"readLineBreak"),(0,i.K)(W,"skipSeparationSpace"),(0,i.K)(P,"testDocumentSeparator"),(0,i.K)(z,"writeFoldedLines"),(0,i.K)(R,"readPlainScalar"),(0,i.K)(N,"readSingleQuotedScalar"),(0,i.K)(j,"readDoubleQuotedScalar"),(0,i.K)(H,"readFlowCollection"),(0,i.K)(G,"readBlockScalar"),(0,i.K)(X,"readBlockSequence"),(0,i.K)(Y,"readBlockMapping"),(0,i.K)(Z,"readTagProperty"),(0,i.K)(et,"readAnchorProperty"),(0,i.K)(rt,"readAlias"),(0,i.K)(it,"tryReadBlockMappingFromProperty"),(0,i.K)(ot,"composeNode"),(0,i.K)(at,"readDocument"),(0,i.K)(st,"loadDocuments"),(0,i.K)(lt,"loadAll2"),(0,i.K)(nt,"load2"),V.loadAll=lt,V.load=nt,V}(0,i.K)(Q,"requireCommon"),(0,i.K)(J,"requireException"),(0,i.K)(tt,"requireSnippet"),(0,i.K)(et,"requireType"),(0,i.K)(rt,"requireSchema"),(0,i.K)(it,"requireStr"),(0,i.K)(ot,"requireSeq"),(0,i.K)(at,"requireMap"),(0,i.K)(st,"requireFailsafe"),(0,i.K)(lt,"require_null"),(0,i.K)(nt,"requireBool"),(0,i.K)(ht,"requireInt"),(0,i.K)(ct,"requireFloat"),(0,i.K)(dt,"requireJson"),(0,i.K)(gt,"requireCore"),(0,i.K)(pt,"requireTimestamp"),(0,i.K)(ut,"requireMerge"),(0,i.K)(yt,"requireBinary"),(0,i.K)(Ct,"requireOmap"),(0,i.K)(mt,"requirePairs"),(0,i.K)(ft,"requireSet"),(0,i.K)(xt,"require_default"),(0,i.K)(bt,"requireLoader");var kt,Bt,St={};function wt(){if(kt)return St;kt=1;const t=Q(),e=J(),r=xt(),o=Object.prototype.toString,a=Object.prototype.hasOwnProperty,s=65279,l={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},n=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],h=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function c(t,e){if(null===e)return{};const r={},i=Object.keys(e);for(let o=0,s=i.length;o<s;o+=1){let s=i[o],l=String(e[s]);"!!"===s.slice(0,2)&&(s="tag:yaml.org,2002:"+s.slice(2));const n=t.compiledTypeMap.fallback[s];n&&a.call(n.styleAliases,l)&&(l=n.styleAliases[l]),r[s]=l}return r}function d(r){let i,o;const a=r.toString(16).toUpperCase();if(r<=255)i="x",o=2;else if(r<=65535)i="u",o=4;else{if(!(r<=4294967295))throw new e("code point within a string may not be greater than 0xFFFFFFFF");i="U",o=8}return"\\"+i+t.repeat("0",o-a.length)+a}(0,i.K)(c,"compileStyleMap"),(0,i.K)(d,"encodeHex");function g(e){this.schema=e.schema||r,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=t.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=c(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?2:1,this.forceQuotes=e.forceQuotes||!1,this.replacer="function"==typeof e.replacer?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function p(e,r){const i=t.repeat(" ",r);let o=0,a="";const s=e.length;for(;o<s;){let t;const r=e.indexOf("\n",o);-1===r?(t=e.slice(o),o=s):(t=e.slice(o,r+1),o=r+1),t.length&&"\n"!==t&&(a+=i),a+=t}return a}function u(e,r){return"\n"+t.repeat(" ",e.indent*r)}function y(t,e){for(let r=0,i=t.implicitTypes.length;r<i;r+=1){if(t.implicitTypes[r].resolve(e))return!0}return!1}function C(t){return 32===t||9===t}function m(t){return t>=32&&t<=126||t>=161&&t<=55295&&8232!==t&&8233!==t||t>=57344&&t<=65533&&t!==s||t>=65536&&t<=1114111}function f(t){return m(t)&&t!==s&&13!==t&&10!==t}function x(t,e,r){const i=f(t),o=i&&!C(t);return(r?i:i&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t)&&35!==t&&!(58===e&&!o)||f(e)&&!C(e)&&35===t||58===e&&o}function b(t){return m(t)&&t!==s&&!C(t)&&45!==t&&63!==t&&58!==t&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t&&35!==t&&38!==t&&42!==t&&33!==t&&124!==t&&61!==t&&62!==t&&39!==t&&34!==t&&37!==t&&64!==t&&96!==t}function k(t){return!C(t)&&58!==t}function B(t,e){const r=t.charCodeAt(e);let i;return r>=55296&&r<=56319&&e+1<t.length&&(i=t.charCodeAt(e+1),i>=56320&&i<=57343)?1024*(r-55296)+i-56320+65536:r}function S(t){return/^\n* /.test(t)}(0,i.K)(g,"State"),(0,i.K)(p,"indentString"),(0,i.K)(u,"generateNextLine"),(0,i.K)(y,"testImplicitResolving"),(0,i.K)(C,"isWhitespace"),(0,i.K)(m,"isPrintable"),(0,i.K)(f,"isNsCharOrWhitespace"),(0,i.K)(x,"isPlainSafe"),(0,i.K)(b,"isPlainSafeFirst"),(0,i.K)(k,"isPlainSafeLast"),(0,i.K)(B,"codePointAt"),(0,i.K)(S,"needIndentIndicator");function w(t,e,r,i,o,a,s,l){let n,h=0,c=null,d=!1,g=!1;const p=-1!==i;let u=-1,y=b(B(t,0))&&k(B(t,t.length-1));if(e||s)for(n=0;n<t.length;h>=65536?n+=2:n++){if(h=B(t,n),!m(h))return 5;y=y&&x(h,c,l),c=h}else{for(n=0;n<t.length;h>=65536?n+=2:n++){if(h=B(t,n),10===h)d=!0,p&&(g=g||n-u-1>i&&" "!==t[u+1],u=n);else if(!m(h))return 5;y=y&&x(h,c,l),c=h}g=g||p&&n-u-1>i&&" "!==t[u+1]}return d||g?r>9&&S(t)?5:s?2===a?5:2:g?4:3:!y||s||o(t)?2===a?5:2:1}function T(t,r,o,a,s){t.dump=function(){if(0===r.length)return 2===t.quotingType?'""':"''";if(!t.noCompatMode&&(-1!==n.indexOf(r)||h.test(r)))return 2===t.quotingType?'"'+r+'"':"'"+r+"'";const l=t.indent*Math.max(1,o),c=-1===t.lineWidth?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-l),d=a||t.flowLevel>-1&&o>=t.flowLevel;function g(e){return y(t,e)}switch((0,i.K)(g,"testAmbiguity"),w(r,d,t.indent,c,g,t.quotingType,t.forceQuotes&&!a,s)){case 1:return r;case 2:return"'"+r.replace(/'/g,"''")+"'";case 3:return"|"+A(r,t.indent)+F(p(r,l));case 4:return">"+A(r,t.indent)+F(p(L(r,c),l));case 5:return'"'+M(r)+'"';default:throw new e("impossible error: invalid scalar style")}}()}function A(t,e){const r=S(t)?String(e):"",i="\n"===t[t.length-1];return r+(i&&("\n"===t[t.length-2]||"\n"===t)?"+":i?"":"-")+"\n"}function F(t){return"\n"===t[t.length-1]?t.slice(0,-1):t}function L(t,e){const r=/(\n+)([^\n]*)/g;let i,o,a=function(){let i=t.indexOf("\n");return i=-1!==i?i:t.length,r.lastIndex=i,v(t.slice(0,i),e)}(),s="\n"===t[0]||" "===t[0];for(;o=r.exec(t);){const t=o[1],r=o[2];i=" "===r[0],a+=t+(s||i||""===r?"":"\n")+v(r,e),s=i}return a}function v(t,e){if(""===t||" "===t[0])return t;const r=/ [^ ]/g;let i,o,a=0,s=0,l=0,n="";for(;i=r.exec(t);)l=i.index,l-a>e&&(o=s>a?s:l,n+="\n"+t.slice(a,o),a=o+1),s=l;return n+="\n",t.length-a>e&&s>a?n+=t.slice(a,s)+"\n"+t.slice(s+1):n+=t.slice(a),n.slice(1)}function M(t){let e="",r=0;for(let i=0;i<t.length;r>=65536?i+=2:i++){r=B(t,i);const o=l[r];!o&&m(r)?(e+=t[i],r>=65536&&(e+=t[i+1])):e+=o||d(r)}return e}function E(t,e,r){let i="";const o=t.tag;for(let o=0,a=r.length;o<a;o+=1){let a=r[o];t.replacer&&(a=t.replacer.call(r,String(o),a)),(I(t,e,a,!1,!1)||void 0===a&&I(t,e,null,!1,!1))&&(""!==i&&(i+=","+(t.condenseFlow?"":" ")),i+=t.dump)}t.tag=o,t.dump="["+i+"]"}function K(t,e,r,i){let o="";const a=t.tag;for(let a=0,s=r.length;a<s;a+=1){let s=r[a];t.replacer&&(s=t.replacer.call(r,String(a),s)),(I(t,e+1,s,!0,!0,!1,!0)||void 0===s&&I(t,e+1,null,!0,!0,!1,!0))&&(i&&""===o||(o+=u(t,e)),t.dump&&10===t.dump.charCodeAt(0)?o+="-":o+="- ",o+=t.dump)}t.tag=a,t.dump=o||"[]"}function $(t,e,r){let i="";const o=t.tag,a=Object.keys(r);for(let o=0,s=a.length;o<s;o+=1){let s="";""!==i&&(s+=", "),t.condenseFlow&&(s+='"');const l=a[o];let n=r[l];t.replacer&&(n=t.replacer.call(r,l,n)),I(t,e,l,!1,!1)&&(t.dump.length>1024&&(s+="? "),s+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),I(t,e,n,!1,!1)&&(s+=t.dump,i+=s))}t.tag=o,t.dump="{"+i+"}"}function _(t,r,i,o){let a="";const s=t.tag,l=Object.keys(i);if(!0===t.sortKeys)l.sort();else if("function"==typeof t.sortKeys)l.sort(t.sortKeys);else if(t.sortKeys)throw new e("sortKeys must be a boolean or a function");for(let e=0,s=l.length;e<s;e+=1){let s="";o&&""===a||(s+=u(t,r));const n=l[e];let h=i[n];if(t.replacer&&(h=t.replacer.call(i,n,h)),!I(t,r+1,n,!0,!0,!0))continue;const c=null!==t.tag&&"?"!==t.tag||t.dump&&t.dump.length>1024;c&&(t.dump&&10===t.dump.charCodeAt(0)?s+="?":s+="? "),s+=t.dump,c&&(s+=u(t,r)),I(t,r+1,h,!0,c)&&(t.dump&&10===t.dump.charCodeAt(0)?s+=":":s+=": ",s+=t.dump,a+=s)}t.tag=s,t.dump=a||"{}"}function O(t,r,i){const s=i?t.explicitTypes:t.implicitTypes;for(let l=0,n=s.length;l<n;l+=1){const n=s[l];if((n.instanceOf||n.predicate)&&(!n.instanceOf||"object"==typeof r&&r instanceof n.instanceOf)&&(!n.predicate||n.predicate(r))){if(i?n.multi&&n.representName?t.tag=n.representName(r):t.tag=n.tag:t.tag="?",n.represent){const i=t.styleMap[n.tag]||n.defaultStyle;let s;if("[object Function]"===o.call(n.represent))s=n.represent(r,i);else{if(!a.call(n.represent,i))throw new e("!<"+n.tag+'> tag resolver accepts not "'+i+'" style');s=n.represent[i](r,i)}t.dump=s}return!0}}return!1}function I(t,r,i,a,s,l,n){t.tag=null,t.dump=i,O(t,i,!1)||O(t,i,!0);const h=o.call(t.dump),c=a;a&&(a=t.flowLevel<0||t.flowLevel>r);const d="[object Object]"===h||"[object Array]"===h;let g,p;if(d&&(g=t.duplicates.indexOf(i),p=-1!==g),(null!==t.tag&&"?"!==t.tag||p||2!==t.indent&&r>0)&&(s=!1),p&&t.usedDuplicates[g])t.dump="*ref_"+g;else{if(d&&p&&!t.usedDuplicates[g]&&(t.usedDuplicates[g]=!0),"[object Object]"===h)a&&0!==Object.keys(t.dump).length?(_(t,r,t.dump,s),p&&(t.dump="&ref_"+g+t.dump)):($(t,r,t.dump),p&&(t.dump="&ref_"+g+" "+t.dump));else if("[object Array]"===h)a&&0!==t.dump.length?(t.noArrayIndent&&!n&&r>0?K(t,r-1,t.dump,s):K(t,r,t.dump,s),p&&(t.dump="&ref_"+g+t.dump)):(E(t,r,t.dump),p&&(t.dump="&ref_"+g+" "+t.dump));else{if("[object String]"!==h){if("[object Undefined]"===h)return!1;if(t.skipInvalid)return!1;throw new e("unacceptable kind of an object to dump "+h)}"?"!==t.tag&&T(t,t.dump,r,l,c)}if(null!==t.tag&&"?"!==t.tag){let e=encodeURI("!"===t.tag[0]?t.tag.slice(1):t.tag).replace(/!/g,"%21");e="!"===t.tag[0]?"!"+e:"tag:yaml.org,2002:"===e.slice(0,18)?"!!"+e.slice(18):"!<"+e+">",t.dump=e+" "+t.dump}}return!0}function q(t,e){const r=[],i=[];D(t,r,i);const o=i.length;for(let t=0;t<o;t+=1)e.duplicates.push(r[i[t]]);e.usedDuplicates=new Array(o)}function D(t,e,r){if(null!==t&&"object"==typeof t){const i=e.indexOf(t);if(-1!==i)-1===r.indexOf(i)&&r.push(i);else if(e.push(t),Array.isArray(t))for(let i=0,o=t.length;i<o;i+=1)D(t[i],e,r);else{const i=Object.keys(t);for(let o=0,a=i.length;o<a;o+=1)D(t[i[o]],e,r)}}}function W(t,e){const r=new g(e=e||{});r.noRefs||q(t,r);let i=t;return r.replacer&&(i=r.replacer.call({"":i},"",i)),I(r,0,i,!0,!0)?r.dump+"\n":""}return(0,i.K)(w,"chooseScalarStyle"),(0,i.K)(T,"writeScalar"),(0,i.K)(A,"blockHeader"),(0,i.K)(F,"dropEndingNewline"),(0,i.K)(L,"foldString"),(0,i.K)(v,"foldLine"),(0,i.K)(M,"escapeString"),(0,i.K)(E,"writeFlowSequence"),(0,i.K)(K,"writeBlockSequence"),(0,i.K)($,"writeFlowMapping"),(0,i.K)(_,"writeBlockMapping"),(0,i.K)(O,"detectType"),(0,i.K)(I,"writeNode"),(0,i.K)(q,"getDuplicateReferences"),(0,i.K)(D,"inspectNode"),(0,i.K)(W,"dump2"),St.dump=W,St}function Tt(){if(Bt)return Y;Bt=1;const t=bt(),e=wt();function r(t,e){return function(){throw new Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+e+" instead, which is now safe by default.")}}return(0,i.K)(r,"renamed"),Y.Type=et(),Y.Schema=rt(),Y.FAILSAFE_SCHEMA=st(),Y.JSON_SCHEMA=dt(),Y.CORE_SCHEMA=gt(),Y.DEFAULT_SCHEMA=xt(),Y.load=t.load,Y.loadAll=t.loadAll,Y.dump=e.dump,Y.YAMLException=J(),Y.types={binary:yt(),float:ct(),map:at(),null:lt(),pairs:mt(),set:ft(),timestamp:pt(),bool:nt(),int:ht(),merge:ut(),omap:Ct(),seq:ot(),str:it()},Y.safeLoad=r("safeLoad","load"),Y.safeLoadAll=r("safeLoadAll","loadAll"),Y.safeDump=r("safeDump","dump"),Y}(0,i.K)(wt,"requireDumper"),(0,i.K)(Tt,"requireJsYaml");var At=o(Tt()),{Type:Ft,Schema:Lt,FAILSAFE_SCHEMA:vt,JSON_SCHEMA:Mt,CORE_SCHEMA:Et,DEFAULT_SCHEMA:Kt,load:$t,loadAll:_t,dump:Ot,YAMLException:It,types:qt,safeLoad:Dt,safeLoadAll:Wt,safeDump:Pt}=At},99257(t,e,r){r.d(e,{IU:()=>F,U:()=>A,qV:()=>w});var i=r(36870),o=r(84076),a=r(36155),s=r(57588),l=r(92941),n=r(89983),h=r(31293),c=r(86827),d=r(51444),g=r(61057),p=(0,c.K)(async(t,e)=>{const r=(0,n.D7)(),{theme:i,themeVariables:c,handDrawnSeed:p}=r,{clusterBkg:u,clusterBorder:y,borderColorArray:C}=c,m=y,{labelStyles:f,nodeStyles:x,borderStyles:b,backgroundStyles:k}=(0,a.GX)(e),B=t.insert("g").attr("class","cluster swimlane "+(e.cssClasses||"")).attr("id",e.id).attr("data-id",e.id).attr("data-et","cluster").attr("data-look",e.look);(0,l.XE)(B,e.colorIndex,i,C);const S=(0,n._3)(r.flowchart.htmlLabels),w="LR"===e.direction,T=B.insert("g").attr("class","cluster-label swimlane-label"),A=await(0,s.GZ)(T,e.label,{style:e.labelStyle,useHtmlLabels:S,isNode:!0,width:e.width});let F=A.getBBox();if(S){const t=A.children[0],e=(0,d.Ltv)(A);F=t.getBoundingClientRect(),e.attr("width",F.width),e.attr("height",F.height)}const L=e.padding??0,v=e.width<=F.width+L?F.width+L:e.width;e.width<=F.width+L?e.diff=(v-e.width)/2-L:e.diff=-L;const M=e.height,E=e.y-M/2,K=e.y+M/2,$=e.x-v/2,_=void 0!==e.swimlaneContentTop?e.swimlaneContentTop:E+M/3,O=w?4:0,I=F.height+2*O;let q,D;if(w){const t=Math.max(I,F.height+2*O),r=$+t,i=Math.max(0,v-t);if("handDrawn"===e.look){const o=g.A.svg(B),s=(0,a.Fr)(e,{roughness:.7,fill:u,stroke:m,seed:p}),l=(0,a.Fr)(e,{roughness:.7,fill:"none",stroke:m,seed:p}),n=o.rectangle($,E,t,M,s);q=B.insert(()=>n,":first-child").attr("class","swimlane-title");const h=o.rectangle(r,E,i,M,l);D=B.insert(()=>h,":first-child").attr("class","swimlane-body"),q.select("path:nth-child(2)").attr("style",b.join(";")),q.select("path").attr("style",k.join(";").replace("fill","stroke"))}else q=B.insert("rect",":first-child"),D=B.insert("rect",":first-child"),q.attr("class","swimlane-title").attr("style",x).attr("x",$).attr("y",E).attr("width",t).attr("height",M).attr("fill",u).attr("stroke",m),D.attr("class","swimlane-body").attr("style",x).attr("x",r).attr("y",E).attr("width",i).attr("height",M).attr("fill","none").attr("stroke",m);const o=$+t/2,s=e.y;T.attr("transform",`translate(${o}, ${s}) rotate(-90) translate(${-F.width/2}, ${-F.height/2})`)}else{const t=Math.max(0,_-E),r=Math.min(I,t),i=E+r,o=Math.max(0,K-i),s=e.x-v/2;if("handDrawn"===e.look){const t=g.A.svg(B),l=(0,a.Fr)(e,{roughness:.7,fill:u,stroke:m,fillWeight:3,seed:p}),n=(0,a.Fr)(e,{roughness:.7,fill:"none",stroke:m,seed:p}),h=t.rectangle(s,E,v,r,l);q=B.insert(()=>h,":first-child").attr("class","swimlane-title");const c=t.rectangle(s,i,v,o,n);D=B.insert(()=>c,":first-child").attr("class","swimlane-body"),q.select("path:nth-child(2)").attr("style",b.join(";")),q.select("path").attr("style",k.join(";").replace("fill","stroke"))}else q=B.insert("rect",":first-child"),D=B.insert("rect",":first-child"),q.attr("class","swimlane-title").attr("style",x).attr("x",s).attr("y",E).attr("width",v).attr("height",r).attr("fill",u).attr("stroke",m),D.attr("class","swimlane-body").attr("style",x).attr("x",s).attr("y",i).attr("width",v).attr("height",o).attr("fill","none").attr("stroke",m);const l=e.x-F.width/2,n=E+(r-F.height)/2;T.attr("transform",`translate(${l}, ${n})`)}if(h.R.trace("Swimlane data ",e,JSON.stringify(e)),f){const t=T.select("span");t&&t.attr("style",f)}return e.offsetX=0,e.width=v,e.height=M,e.offsetY=F.height-L/2,e.intersect=function(t){return(0,o.nM)(e,t)},{cluster:B,labelBBox:F}},"swimlane"),u=(0,c.K)(async(t,e)=>{h.R.info("Creating subgraph rect for ",e.id,e);const r=(0,n.D7)(),{theme:c,themeVariables:p,handDrawnSeed:u}=r,{clusterBkg:y,clusterBorder:C,borderColorArray:m}=p,{labelStyles:f,nodeStyles:x,borderStyles:b,backgroundStyles:k}=(0,a.GX)(e),B=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look);(0,l.XE)(B,e.colorIndex,c,m);const S=(0,n.E)(r),w=B.insert("g").attr("class","cluster-label ");let T;T="markdown"===e.labelType?await(0,s.GZ)(w,e.label,{style:e.labelStyle,useHtmlLabels:S,isNode:!0,width:e.width}):await(0,o.DA)(w,e.label,e.labelStyle||"",!1,!0);let A=T.getBBox();if((0,n.E)(r)){const t=T.children[0],e=(0,d.Ltv)(T);A=t.getBoundingClientRect(),e.attr("width",A.width),e.attr("height",A.height)}const F=e.width<=A.width+e.padding?A.width+e.padding:e.width;e.width<=A.width+e.padding?e.diff=(F-e.width)/2-e.padding:e.diff=-e.padding;const L=e.height,v=e.x-F/2,M=e.y-L/2;let E;if(h.R.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){const t=g.A.svg(B),r=(0,a.Fr)(e,{roughness:.7,fill:y,stroke:C,fillWeight:3,seed:u}),i=t.path((0,o.FA)(v,M,F,L,0),r);E=B.insert(()=>(h.R.debug("Rough node insert CXC",i),i),":first-child"),E.select("path:nth-child(2)").attr("style",b.join(";")),E.select("path").attr("style",k.join(";").replace("fill","stroke"))}else E=B.insert("rect",":first-child"),E.attr("style",x).attr("rx",e.rx).attr("ry",e.ry).attr("x",v).attr("y",M).attr("width",F).attr("height",L);const{subGraphTitleTopMargin:K}=(0,i.Oi)(r);if(w.attr("transform",`translate(${e.x-A.width/2}, ${e.y-e.height/2+K})`),f){const t=w.select("span");t&&t.attr("style",f)}const $=E.node().getBBox();return e.offsetX=0,e.width=$.width,e.height=$.height,e.offsetY=A.height-e.padding/2,e.intersect=function(t){return(0,o.nM)(e,t)},{cluster:B,labelBBox:A}},"rect"),y=(0,c.K)((t,e)=>{const r=t.insert("g").attr("class","note-cluster").attr("id",e.domId),i=r.insert("rect",":first-child"),a=0*e.padding,s=a/2;i.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-s).attr("y",e.y-e.height/2-s).attr("width",e.width+a).attr("height",e.height+a).attr("fill","none");const l=i.node().getBBox();return e.width=l.width,e.height=l.height,e.intersect=function(t){return(0,o.nM)(e,t)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),C=(0,c.K)(async(t,e)=>{const r=(0,n.D7)(),{theme:i,themeVariables:a,handDrawnSeed:s}=r,{altBackground:h,borderColorArray:c,compositeBackground:p,compositeTitleBackground:u,nodeBorder:y}=a,C=t.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-id",e.id).attr("data-look",e.look);(0,l.XE)(C,e.colorIndex,i,c);const m=C.insert("g",":first-child"),f=C.insert("g").attr("class","cluster-label");let x=C.append("rect");const b=await(0,o.DA)(f,e.label,e.labelStyle,void 0,!0);let k=b.getBBox();if((0,n.E)(r)){const t=b.children[0],e=(0,d.Ltv)(b);k=t.getBoundingClientRect(),e.attr("width",k.width),e.attr("height",k.height)}const B=0*e.padding,S=B/2,w=(e.width<=k.width+e.padding?k.width+e.padding:e.width)+B;e.width<=k.width+e.padding?e.diff=(w-e.width)/2-e.padding:e.diff=-e.padding;const T=e.height+B,A=e.height+B-k.height-6,F=e.x-w/2,L=e.y-T/2;e.width=w;const v=e.y-e.height/2-S+k.height+2;let M;if("handDrawn"===e.look){const t=e.cssClasses.includes("statediagram-cluster-alt"),r=g.A.svg(C),i=e.rx||e.ry?r.path((0,o.FA)(F,L,w,T,10),{roughness:.7,fill:u,fillStyle:"solid",stroke:y,seed:s}):r.rectangle(F,L,w,T,{seed:s});M=C.insert(()=>i,":first-child");const a=r.rectangle(F,v,w,A,{fill:t?h:p,fillStyle:t?"hachure":"solid",stroke:y,seed:s});M=C.insert(()=>i,":first-child"),x=C.insert(()=>a),M.attr("class","outer"),x.attr("class","inner")}else{M=m.insert("rect",":first-child");const t="outer";M.attr("class",t).attr("x",F).attr("y",L).attr("width",w).attr("height",T).attr("data-look",e.look),x.attr("class","inner").attr("x",F).attr("y",v).attr("width",w).attr("height",A)}f.attr("transform",`translate(${e.x-k.width/2}, ${L+1-((0,n.E)(r)?0:3)})`);const E=M.node().getBBox();return e.height=E.height,e.offsetX=0,e.offsetY=k.height-e.padding/2,e.labelBBox=k,e.intersect=function(t){return(0,o.nM)(e,t)},{cluster:C,labelBBox:k}},"roundedWithTitle"),m=(0,c.K)(async(t,e)=>{h.R.info("Creating subgraph rect for ",e.id,e);const r=(0,n.D7)(),{themeVariables:l,handDrawnSeed:c}=r,{clusterBkg:p,clusterBorder:u}=l,{labelStyles:y,nodeStyles:C,borderStyles:m,backgroundStyles:f}=(0,a.GX)(e),x=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),b=(0,n.E)(r),k=x.insert("g").attr("class","cluster-label "),B=await(0,s.GZ)(k,e.label,{style:e.labelStyle,useHtmlLabels:b,isNode:!0,width:e.width});let S=B.getBBox();if((0,n.E)(r)){const t=B.children[0],e=(0,d.Ltv)(B);S=t.getBoundingClientRect(),e.attr("width",S.width),e.attr("height",S.height)}const w=e.width<=S.width+e.padding?S.width+e.padding:e.width;e.width<=S.width+e.padding?e.diff=(w-e.width)/2-e.padding:e.diff=-e.padding;const T=e.height,A=e.x-w/2,F=e.y-T/2;let L;if(h.R.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){const t=g.A.svg(x),r=(0,a.Fr)(e,{roughness:.7,fill:p,stroke:u,fillWeight:4,seed:c}),i=t.path((0,o.FA)(A,F,w,T,e.rx),r);L=x.insert(()=>(h.R.debug("Rough node insert CXC",i),i),":first-child"),L.select("path:nth-child(2)").attr("style",m.join(";")),L.select("path").attr("style",f.join(";").replace("fill","stroke"))}else L=x.insert("rect",":first-child"),L.attr("style",C).attr("rx",e.rx).attr("ry",e.ry).attr("x",A).attr("y",F).attr("width",w).attr("height",T);const{subGraphTitleTopMargin:v}=(0,i.Oi)(r);if(k.attr("transform",`translate(${e.x-S.width/2}, ${e.y-e.height/2+v})`),y){const t=k.select("span");t&&t.attr("style",y)}const M=L.node().getBBox();return e.offsetX=0,e.width=M.width,e.height=M.height,e.offsetY=S.height-e.padding/2,e.intersect=function(t){return(0,o.nM)(e,t)},{cluster:x,labelBBox:S}},"kanbanSection"),f=(0,c.K)((t,e)=>{const r=(0,n.D7)(),{theme:i,themeVariables:a,handDrawnSeed:s}=r,{altBackground:h,nodeBorder:c,borderColorArray:d}=a,p=t.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-look",e.look);(0,l.XE)(p,e.colorIndex,i,d);const u=p.insert("g",":first-child"),y=0*e.padding,C=e.width+y;e.diff=-e.padding;const m=e.height+y,f=e.x-C/2,x=e.y-m/2;let b;if(e.width=C,"handDrawn"===e.look){const t=g.A.svg(p).rectangle(f,x,C,m,{fill:h??"#efefef",fillStyle:"solid",roughness:.5,strokeLineDash:[5],stroke:c,seed:s});b=p.insert(()=>t,":first-child").attr("class","divider")}else{b=u.insert("rect",":first-child");let t="outer";t=(e.look,"divider"),b.attr("class",t).attr("x",f).attr("y",x).attr("width",C).attr("height",m).attr("data-look",e.look)}const k=b.node().getBBox();return e.height=k.height,e.offsetX=0,e.offsetY=0,e.intersect=function(t){return(0,o.nM)(e,t)},{cluster:p,labelBBox:{}}},"divider"),x=(0,c.K)(async(t,e,r)=>{h.R.info(`Creating ${r.cssClass} for `,e.id,e);const c=(0,n.D7)(),{theme:p,themeVariables:u,handDrawnSeed:y}=c,{borderColorArray:C}=u,{labelStyles:m,borderStyles:f}=(0,a.GX)(e),x=t.insert("g").attr("class","cluster "+r.cssClass+" "+e.cssClasses).attr("id",e.domId??e.id).attr("data-look",e.look);(0,l.XE)(x,e.colorIndex,p,C);const b=(0,n.E)(c),k=x.insert("g").attr("class","cluster-label");let B={width:0,height:0};const S=e.label?.trim();if(S){let t;if(t="markdown"===e.labelType?await(0,s.GZ)(k,e.label,{style:e.labelStyle,useHtmlLabels:b,isNode:!0,width:e.width}):await(0,o.DA)(k,e.label,e.labelStyle||"",!1,!0),B=t.getBBox(),b){const e=t.children[0],r=(0,d.Ltv)(t);B=e.getBoundingClientRect(),r.attr("width",B.width),r.attr("height",B.height)}}const w=e.width<=B.width+e.padding?B.width+e.padding:e.width;e.width<=B.width+e.padding?e.diff=(w-e.width)/2-e.padding:e.diff=-e.padding;const T=e.height,A=e.x-w/2,F=e.y-T/2;let L;if("handDrawn"===e.look){const t=g.A.svg(x),i=(0,a.Fr)(e,{roughness:r.roughness,fill:r.fill,stroke:r.stroke,strokeWidth:r.strokeWidth,seed:y,..."none"===r.fill?{fillWeight:0}:{fillStyle:"solid"},...r.strokeDash?{strokeLineDash:r.strokeDash}:{}}),s=t.path((0,o.FA)(A,F,w,T,r.rx),i);L=x.insert(()=>s,":first-child"),L.select("path:nth-child(2)").attr("style",f.join(";"))}else L=x.insert("rect",":first-child"),L.attr("rx",r.rx).attr("ry",r.rx).attr("x",A).attr("y",F).attr("width",w).attr("height",T).attr("fill",r.fill).attr("stroke",r.stroke).attr("stroke-width",r.strokeWidth+"px"),r.strokeDash&&L.attr("stroke-dasharray",r.strokeDash.join(", "));if(S){const{subGraphTitleTopMargin:t}=(0,i.Oi)(c);if(k.attr("transform",`translate(${e.x-B.width/2}, ${e.y-e.height/2+t})`),m){const t=k.select("span");t&&t.attr("style",m)}}const v=L.node().getBBox();return e.offsetX=0,e.width=v.width,e.height=v.height,e.offsetY=B.height-e.padding/2,e.intersect=function(t){return(0,o.nM)(e,t)},{cluster:x,labelBBox:B}},"createContainerGroup"),b=(0,c.K)(async(t,e)=>{const{themeVariables:r}=(0,n.D7)(),i=r.flowContainerStroke||r.secondaryBorderColor;return x(t,e,{cssClass:"flow-cluster",rx:10,fill:"none",stroke:i,strokeWidth:.75,roughness:.7})},"flowGroup"),k=(0,c.K)((t,e)=>{const r=t.boundaryType||"rect",i="package"===r?20:t.padding,o="package"===r?e.height+10:0,a=Math.max(t.width,e.width+i),s="package"===r?Math.max(t.height,o+2*t.padding):t.height,l=t.x-a/2,n=t.y-s/2;return{boundaryType:r,width:a,height:s,x:l,y:n,bodyY:n+o,bodyHeight:s-o,tabHeight:o,tabWidth:"package"===r?Math.min(a,Math.max(80,e.width+20)):0}},"getUsecaseSystemBoundaryGeometry"),B={rect:u,squareRect:u,roundedWithTitle:C,noteGroup:y,divider:f,kanbanSection:m,flowGroup:b,usecaseSystemBoundary:(0,c.K)(async(t,e)=>{h.R.info("Creating usecase system boundary for ",e.id,e);const r=(0,n.D7)(),{theme:c,themeVariables:p,handDrawnSeed:u}=r,{clusterBkg:y,clusterBorder:C,borderColorArray:m}=p,{labelStyles:f,nodeStyles:x}=(0,a.GX)(e),{stylesMap:b}=(0,a.WW)(e),B=e.boundaryType||"rect",S=t.insert("g").attr("class",`cluster usecase-system-boundary usecase-system-boundary-${B} ${e.cssClasses}`).attr("id","string"==typeof e.domId?e.domId:e.id).attr("data-boundary-type",B).attr("data-look",e.look);(0,l.XE)(S,e.colorIndex,c,m);const w=(0,n.E)(r),T=S.insert("g").attr("class","cluster-label system-boundary-title"),A=await(0,s.GZ)(T,e.label,{style:f,useHtmlLabels:w,isNode:!0});let F=A.getBBox();if(w){const t=A.children[0],e=(0,d.Ltv)(A);F=t.getBoundingClientRect(),e.attr("width",F.width),e.attr("height",F.height)}const L=k(e,F),{width:v,height:M,x:E,y:K,bodyY:$,bodyHeight:_,tabHeight:O,tabWidth:I}=L;e.diff=e.width<=F.width+e.padding?(v-e.width)/2-e.padding:-e.padding;const q=(0,a.Fr)(e,{fill:b.get("fill")||y,stroke:b.get("stroke")||C,strokeWidth:b.get("stroke-width")?.replace("px","")||1,seed:u});if("handDrawn"===e.look){const t=g.A.svg(S),e=t.rectangle(E,$,v,_,q);if(S.insert(()=>e,":first-child").attr("class","boundary-body label-container"),"package"===B){const e=t.rectangle(E,K,I,O,q);S.insert(()=>e,":first-child").attr("class","boundary-tab system-boundary-package-tab label-container")}}else S.insert("rect",":first-child").attr("class","boundary-body label-container").attr("style",x).attr("x",E).attr("y",$).attr("width",v).attr("height",_),"package"===B&&S.insert("rect",":first-child").attr("class","boundary-tab system-boundary-package-tab label-container").attr("style",x).attr("x",E).attr("y",K).attr("width",I).attr("height",O);const{subGraphTitleTopMargin:D}=(0,i.Oi)(r);return"package"===B?T.attr("transform",`translate(${E+(I-F.width)/2}, ${K+(O-F.height)/2})`):T.attr("transform",`translate(${e.x-F.width/2}, ${K+D})`),f&&(T.attr("style",f),T.select("span").attr("style",f)),e.offsetX=0,e.width=v,e.height=M,e.offsetY=F.height-e.padding/2,e.labelBBox=F,e.intersect=function(t){return(0,o.nM)(e,t)},{cluster:S,labelBBox:F}},"usecaseSystemBoundary"),swimlane:p},S=new Set(["noteGroup","divider"]),w=(0,c.K)(t=>!S.has(t??"rect"),"clusterPaintsTitle"),T=new Map,A=(0,c.K)(async(t,e)=>{const r=e.shape||"rect",i=await B[r](t,e);return T.set(e.id,i),i},"insertCluster"),F=(0,c.K)(()=>{T=new Map},"clear")},56714(t,e,r){r.d(e,{XX:()=>m,q7:()=>x,sO:()=>y});var i=r(43247),o=r(99257),a=r(24832),s=r(36870),l=r(84076),n=r(51255),h=r(89983),c=r(31293),d=r(86827),g={common:h.Y2,getConfig:h.zj,insertCluster:o.U,insertEdge:a.Jo,insertEdgeLabel:a.jP,insertMarkers:a.g0,insertNode:s.on,interpolateToCurve:n.Ib,labelHelper:l.Zk,log:c.R,positionEdgeLabel:a.T_},p=["elk.stress","elk.force","elk.mrtree","elk.sporeOverlap","elk.box","elk.rectpacking"],u=Object.create(null),y=(0,d.K)(t=>{for(const e of t)u[e.name]=e},"registerLayoutLoaders"),C=(0,d.K)(()=>{const t=(0,d.K)(async()=>await Promise.all([r.e(697),r.e(9970),r.e(3166)]).then(r.bind(r,53166)),"loader");return[{name:"elk",loader:t,algorithm:"elk.layered"},...p.map(e=>({name:e,loader:t,algorithm:e}))]},"elkLayoutLoaders");(0,d.K)(()=>{y([{name:"dagre",loader:(0,d.K)(async()=>await Promise.all([r.e(697),r.e(4193),r.e(9970),r.e(4473)]).then(r.bind(r,24473)),"loader")},{name:"swimlane",loader:(0,d.K)(async()=>await Promise.all([r.e(697),r.e(9970),r.e(3096)]).then(r.bind(r,23096)),"loader")},{name:"cose-bilkent",loader:(0,d.K)(async()=>await Promise.all([r.e(165),r.e(3457),r.e(2180)]).then(r.bind(r,2180)),"loader")},...C()])},"registerDefaultLayoutLoaders")();var m=(0,d.K)(async(t,e)=>{if(!Object.hasOwn(u,t.layoutAlgorithm))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);if(t.diagramId)for(const e of t.nodes){const r=e.domId||e.id;e.domId=`${t.diagramId}-${r}`}const r=u[t.layoutAlgorithm],o=await r.loader();return(0,i.F)(e,t.config),o.render(t,e,g,{algorithm:r.algorithm})},"render"),f="dagre",x=(0,d.K)((t="",{fallback:e=f}={})=>{if(Object.hasOwn(u,t))return t;for(const r of[e,f])if(Object.hasOwn(u,r))return c.R.warn(`Layout algorithm ${t} is not registered. Using ${r} as fallback.`),r;throw new Error(`Neither layout algorithm ${t}, ${e}, nor ${f} is registered.`)},"getRegisteredLayoutAlgorithm")},89983(t,e,r){r.d(e,{$i:()=>ct,B6:()=>Ft,C0:()=>b,Ch:()=>B,D7:()=>Ie,DB:()=>u,Df:()=>dt,Dl:()=>he,E:()=>Wt,EI:()=>Me,Gs:()=>je,H$:()=>tt,H1:()=>Pt,ID:()=>Jt,IU:()=>Fe,J$:()=>T,Js:()=>Ne,KG:()=>fe,ME:()=>De,Nk:()=>vt,P$:()=>D,Q2:()=>Lt,QO:()=>re,SV:()=>Le,TM:()=>Dt,UI:()=>at,UU:()=>Tt,Wi:()=>ne,Wt:()=>Be,XV:()=>qe,Xd:()=>S,Y2:()=>ge,_3:()=>mt,a$:()=>ye,ab:()=>$e,cL:()=>$t,dj:()=>de,hH:()=>F,iN:()=>ve,i_:()=>x,jZ:()=>Xt,ke:()=>Ke,m7:()=>Ee,mW:()=>k,mj:()=>Pe,oB:()=>We,ot:()=>Ce,sb:()=>gt,tM:()=>ke,wZ:()=>At,xA:()=>Kt,yj:()=>wt,zj:()=>Mt});var i,o,a=r(31293),s=r(86827),l=r(5097),n=r(78041),h=r(75263),c=r(58695),d=r(3948),g=r(25582),p=r(99418),u=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,y=/\s/,C=(0,s.K)(t=>{let e="",r=0,i=0;for(;i<t.length;){const o=t.indexOf("%%",i);if(-1===o)break;const a=t.indexOf("\n",o);if(-1===a)break;let s=o;for(;s>r&&y.test(t[s-1]);)s--;e+=t.slice(r,s)+"\n",r=a+1,i=r}return e+t.slice(r)},"stripAnyComments"),m=(0,s.K)(t=>"\n"===t||"\r"===t,"isLineBreak"),f=(0,s.K)((t,e)=>{let r=-1;for(let i=e;i<t.length&&y.test(t[i]);i++)m(t[i])&&(r=i);return r},"lastLineBreakInWhitespaceRun"),x=(0,s.K)(t=>{let e=0;for(;e<t.length&&y.test(t[e])&&!m(t[e]);)e++;const r=t.slice(0,e);if(!t.startsWith("---",e))return;const i=[];for(let r=e+3;r<t.length&&y.test(t[r]);r++)m(t[r])&&i.push(r);if(0===i.length)return;const o=`${r}---`,a=(0,s.K)(e=>m(t[e])&&t.startsWith(o,e+1)?f(t,e+1+o.length):-1,"closingEnd");let l=-1;for(let e=i[0]+1;e<t.length;e++)-1!==a(e)&&(l=e);if(-1===l)return;let n=i[0];for(const t of i)t<l&&(n=t);const h=n+1;for(let e=h;e<=l;e++){const i=a(e);if(-1!==i)return{indent:r,body:t.slice(h,e),length:i+1}}},"matchFrontMatter"),b=class extends Error{static{(0,s.K)(this,"UnknownDiagramError")}constructor(t){super(t),this.name="UnknownDiagramError"}},k={},B=(0,s.K)(function(t,e){const r=x(t);t=C((r?t.slice(r.length):t).replace(u,""));for(const[r,{detector:i}]of Object.entries(k)){if(i(t,e))return r}throw new b(`No diagram type detected matching given configuration for text: ${t}`)},"detectType"),S=(0,s.K)((...t)=>{for(const{id:e,detector:r,loader:i}of t)w(e,r,i)},"registerLazyLoadedDiagrams"),w=(0,s.K)((t,e,r)=>{k[t]&&a.R.warn(`Detector with key ${t} already exists. Overwriting.`),k[t]={detector:e,loader:r},a.R.debug(`Detector with key ${t} added${r?" with loader":""}`)},"addDetector"),T=(0,s.K)(t=>k[t].loader,"getDiagramLoader"),A=(0,s.K)((t,e,{depth:r=2}={})=>{const i={depth:r};if(Array.isArray(e)&&!Array.isArray(t))return e.forEach(e=>A(t,e,i)),t;if(Array.isArray(e)&&Array.isArray(t))return e.forEach(e=>{t.includes(e)||t.push(e)}),t;if(null==t||r<=0)return null!=t&&"object"==typeof t&&"object"==typeof e?Object.assign(t,e):e;if(null!=e&&"object"==typeof t&&"object"==typeof e){const i=t;Object.entries(e).forEach(([e,o])=>{if("object"==typeof o){if(null===o)return;Object.hasOwn(t,e)||Object.defineProperty(t,e,{value:void 0,writable:!0,enumerable:!0,configurable:!0}),void 0===i[e]&&(i[e]=Array.isArray(o)?[]:{}),"object"==typeof i[e]&&(i[e]=A(i[e],o,{depth:r-1}))}else"object"!=typeof i[e]&&(Object.hasOwn(t,e)?i[e]=o:Object.defineProperty(t,e,{value:o,writable:!0,enumerable:!0,configurable:!0}))})}return t},"assignWithDepth"),F=A,L="#ffffff",v="#f2f2f2",M=(0,s.K)((t,e)=>e?(0,c.A)(t,{s:-40,l:10}):(0,c.A)(t,{s:-40,l:-10}),"mkBorder"),E=(0,s.K)(t=>"object"==typeof t&&null!==t&&!Array.isArray(t),"isPlainObject"),K=(0,s.K)((t,e)=>E(t)&&E(e)?{...t,...e}:e,"applyOverride"),$=class{static{(0,s.K)(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||(0,c.A)(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||(0,c.A)(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||M(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||M(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||M(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||M(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||(0,d.A)(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||(0,d.A)(this.tertiaryColor),this.lineColor=this.lineColor||(0,d.A)(this.background),this.arrowheadColor=this.arrowheadColor||(0,d.A)(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?(0,h.A)(this.secondaryColor,30):this.secondaryColor),this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||(0,h.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||(0,d.A)(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||(0,n.A)(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||(0,h.A)(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||(0,h.A)(this.mainBkg,10)):(this.rowOdd=this.rowOdd||(0,n.A)(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||(0,n.A)(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||(0,c.A)(this.primaryColor,{h:30}),this.cScale4=this.cScale4||(0,c.A)(this.primaryColor,{h:60}),this.cScale5=this.cScale5||(0,c.A)(this.primaryColor,{h:90}),this.cScale6=this.cScale6||(0,c.A)(this.primaryColor,{h:120}),this.cScale7=this.cScale7||(0,c.A)(this.primaryColor,{h:150}),this.cScale8=this.cScale8||(0,c.A)(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||(0,c.A)(this.primaryColor,{h:270}),this.cScale10=this.cScale10||(0,c.A)(this.primaryColor,{h:300}),this.cScale11=this.cScale11||(0,c.A)(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,h.A)(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,h.A)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||(0,d.A)(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||(0,n.A)(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||(0,h.A)(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||(0,c.A)(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||(0,c.A)(this.mainBkg,{h:180,s:-15,l:t*(8+3*e)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||(0,c.A)(this.primaryColor,{h:64}),this.fillType3=this.fillType3||(0,c.A)(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||(0,c.A)(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||(0,c.A)(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||(0,c.A)(this.primaryColor,{h:128}),this.fillType7=this.fillType7||(0,c.A)(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||(0,c.A)(this.primaryColor,{l:-10}),this.pie5=this.pie5||(0,c.A)(this.secondaryColor,{l:-10}),this.pie6=this.pie6||(0,c.A)(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||(0,c.A)(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||(0,c.A)(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||(0,c.A)(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||(0,c.A)(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||(0,c.A)(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||(0,c.A)(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??(0,c.A)(this.primaryColor,{l:-30}),this.venn2=this.venn2??(0,c.A)(this.secondaryColor,{l:-30}),this.venn3=this.venn3??(0,c.A)(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??(0,c.A)(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??(0,c.A)(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??(0,c.A)(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??(0,c.A)(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??(0,c.A)(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||(0,c.A)(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||(0,c.A)(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||(0,c.A)(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||(0,c.A)(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||(0,c.A)(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||(0,c.A)(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,l.A)(this.quadrant1Fill)?(0,n.A)(this.quadrant1Fill):(0,h.A)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?(0,h.A)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||(0,c.A)(this.primaryColor,{h:-30}),this.git4=this.git4||(0,c.A)(this.primaryColor,{h:-60}),this.git5=this.git5||(0,c.A)(this.primaryColor,{h:-90}),this.git6=this.git6||(0,c.A)(this.primaryColor,{h:60}),this.git7=this.git7||(0,c.A)(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,n.A)(this.git0,25),this.git1=(0,n.A)(this.git1,25),this.git2=(0,n.A)(this.git2,25),this.git3=(0,n.A)(this.git3,25),this.git4=(0,n.A)(this.git4,25),this.git5=(0,n.A)(this.git5,25),this.git6=(0,n.A)(this.git6,25),this.git7=(0,n.A)(this.git7,25)):(this.git0=(0,h.A)(this.git0,25),this.git1=(0,h.A)(this.git1,25),this.git2=(0,h.A)(this.git2,25),this.git3=(0,h.A)(this.git3,25),this.git4=(0,h.A)(this.git4,25),this.git5=(0,h.A)(this.git5,25),this.git6=(0,h.A)(this.git6,25),this.git7=(0,h.A)(this.git7,25)),this.gitInv0=this.gitInv0||(0,d.A)(this.git0),this.gitInv1=this.gitInv1||(0,d.A)(this.git1),this.gitInv2=this.gitInv2||(0,d.A)(this.git2),this.gitInv3=this.gitInv3||(0,d.A)(this.git3),this.gitInv4=this.gitInv4||(0,d.A)(this.git4),this.gitInv5=this.gitInv5||(0,d.A)(this.git5),this.gitInv6=this.gitInv6||(0,d.A)(this.git6),this.gitInv7=this.gitInv7||(0,d.A)(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||L,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||v,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=K(this[e],t[e])}),Object.hasOwn(t,"nodeBorder")&&!Object.hasOwn(t,"useGradient")&&(this.useGradient=!1)}},_=(0,s.K)(t=>{const e=new $;return e.calculate(t),e},"getThemeVariables"),O=class{static{(0,s.K)(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,n.A)(this.primaryColor,16),this.tertiaryColor=(0,c.A)(this.primaryColor,{h:-160}),this.primaryBorderColor=(0,d.A)(this.background),this.secondaryBorderColor=M(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=M(this.tertiaryColor,this.darkMode),this.primaryTextColor=(0,d.A)(this.primaryColor),this.secondaryTextColor=(0,d.A)(this.secondaryColor),this.tertiaryTextColor=(0,d.A)(this.tertiaryColor),this.lineColor=(0,d.A)(this.background),this.textColor=(0,d.A)(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,n.A)((0,d.A)("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=(0,g.A)(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=(0,h.A)("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=(0,h.A)(this.sectionBkgColor,10),this.taskBorderColor=(0,g.A)(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=(0,g.A)(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||(0,n.A)(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||(0,h.A)(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){this.secondBkg=(0,n.A)(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=(0,n.A)(this.labelBackground,25),this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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=(0,n.A)(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=(0,d.A)(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=(0,c.A)(this.primaryColor,{h:64}),this.fillType3=(0,c.A)(this.secondaryColor,{h:64}),this.fillType4=(0,c.A)(this.primaryColor,{h:-64}),this.fillType5=(0,c.A)(this.secondaryColor,{h:-64}),this.fillType6=(0,c.A)(this.primaryColor,{h:128}),this.fillType7=(0,c.A)(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||(0,c.A)(this.primaryColor,{h:30}),this.cScale4=this.cScale4||(0,c.A)(this.primaryColor,{h:60}),this.cScale5=this.cScale5||(0,c.A)(this.primaryColor,{h:90}),this.cScale6=this.cScale6||(0,c.A)(this.primaryColor,{h:120}),this.cScale7=this.cScale7||(0,c.A)(this.primaryColor,{h:150}),this.cScale8=this.cScale8||(0,c.A)(this.primaryColor,{h:210}),this.cScale9=this.cScale9||(0,c.A)(this.primaryColor,{h:270}),this.cScale10=this.cScale10||(0,c.A)(this.primaryColor,{h:300}),this.cScale11=this.cScale11||(0,c.A)(this.primaryColor,{h:330});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||(0,d.A)(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScalePeer"+t]=this["cScalePeer"+t]||(0,n.A)(this["cScale"+t],10);for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||(0,c.A)(this.mainBkg,{h:30,s:-30,l:-(4*t-10)}),this["surfacePeer"+t]=this["surfacePeer"+t]||(0,c.A)(this.mainBkg,{h:30,s:-30,l:-(4*t-7)});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)]??(0,n.A)(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||(0,c.A)(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||(0,c.A)(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||(0,c.A)(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||(0,c.A)(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||(0,c.A)(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||(0,c.A)(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,l.A)(this.quadrant1Fill)?(0,n.A)(this.quadrant1Fill):(0,h.A)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.mainBkg,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.mainBkg},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?(0,h.A)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=(0,n.A)(this.secondaryColor,20),this.git1=(0,n.A)(this.pie2||this.secondaryColor,20),this.git2=(0,n.A)(this.pie3||this.tertiaryColor,20),this.git3=(0,n.A)(this.pie4||(0,c.A)(this.primaryColor,{h:-30}),20),this.git4=(0,n.A)(this.pie5||(0,c.A)(this.primaryColor,{h:-60}),20),this.git5=(0,n.A)(this.pie6||(0,c.A)(this.primaryColor,{h:-90}),10),this.git6=(0,n.A)(this.pie7||(0,c.A)(this.primaryColor,{h:60}),10),this.git7=(0,n.A)(this.pie8||(0,c.A)(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||(0,d.A)(this.git0),this.gitInv1=this.gitInv1||(0,d.A)(this.git1),this.gitInv2=this.gitInv2||(0,d.A)(this.git2),this.gitInv3=this.gitInv3||(0,d.A)(this.git3),this.gitInv4=this.gitInv4||(0,d.A)(this.git4),this.gitInv5=this.gitInv5||(0,d.A)(this.git5),this.gitInv6=this.gitInv6||(0,d.A)(this.git6),this.gitInv7=this.gitInv7||(0,d.A)(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||(0,d.A)(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||(0,d.A)(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||(0,n.A)("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||(0,n.A)("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||(0,n.A)("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||(0,n.A)("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||(0,n.A)(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||(0,n.A)(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||(0,n.A)(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||(0,n.A)(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=K(this[e],t[e])})}},I=(0,s.K)(t=>{const e=new O;return e.calculate(t),e},"getThemeVariables"),q=class{static{(0,s.K)(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=(0,c.A)(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=(0,c.A)(this.primaryColor,{h:-160}),this.primaryBorderColor=M(this.primaryColor,this.darkMode),this.secondaryBorderColor=M(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=M(this.tertiaryColor,this.darkMode),this.primaryTextColor=(0,d.A)(this.primaryColor),this.secondaryTextColor=(0,d.A)(this.secondaryColor),this.tertiaryTextColor=(0,d.A)(this.tertiaryColor),this.lineColor=(0,d.A)(this.background),this.textColor=(0,d.A)(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=M(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=(0,g.A)(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||(0,c.A)(this.primaryColor,{h:30}),this.cScale4=this.cScale4||(0,c.A)(this.primaryColor,{h:60}),this.cScale5=this.cScale5||(0,c.A)(this.primaryColor,{h:90}),this.cScale6=this.cScale6||(0,c.A)(this.primaryColor,{h:120}),this.cScale7=this.cScale7||(0,c.A)(this.primaryColor,{h:150}),this.cScale8=this.cScale8||(0,c.A)(this.primaryColor,{h:210}),this.cScale9=this.cScale9||(0,c.A)(this.primaryColor,{h:270}),this.cScale10=this.cScale10||(0,c.A)(this.primaryColor,{h:300}),this.cScale11=this.cScale11||(0,c.A)(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,h.A)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,h.A)(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,h.A)(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||(0,h.A)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||(0,c.A)(this["cScale"+t],{h:180});for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||(0,c.A)(this.mainBkg,{h:30,l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||(0,c.A)(this.mainBkg,{h:30,l:-(7+5*t)});if(this.scaleLabelColor="calculated"!==this.scaleLabelColor&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,"calculated"!==this.labelTextColor){this.cScaleLabel0=this.cScaleLabel0||(0,d.A)(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||(0,d.A)(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.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||(0,n.A)(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||(0,n.A)(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=(0,c.A)(this.primaryColor,{h:64}),this.fillType3=(0,c.A)(this.secondaryColor,{h:64}),this.fillType4=(0,c.A)(this.primaryColor,{h:-64}),this.fillType5=(0,c.A)(this.secondaryColor,{h:-64}),this.fillType6=(0,c.A)(this.primaryColor,{h:128}),this.fillType7=(0,c.A)(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||(0,c.A)(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||(0,c.A)(this.primaryColor,{l:-10}),this.pie5=this.pie5||(0,c.A)(this.secondaryColor,{l:-30}),this.pie6=this.pie6||(0,c.A)(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||(0,c.A)(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||(0,c.A)(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||(0,c.A)(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||(0,c.A)(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||(0,c.A)(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||(0,c.A)(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??(0,c.A)(this.primaryColor,{l:-30}),this.venn2=this.venn2??(0,c.A)(this.secondaryColor,{l:-30}),this.venn3=this.venn3??(0,c.A)(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??(0,c.A)(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??(0,c.A)(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??(0,c.A)(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??(0,c.A)(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??(0,c.A)(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||(0,c.A)(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||(0,c.A)(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||(0,c.A)(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||(0,c.A)(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||(0,c.A)(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||(0,c.A)(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,l.A)(this.quadrant1Fill)?(0,n.A)(this.quadrant1Fill):(0,h.A)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||(0,c.A)(this.primaryColor,{h:-30}),this.git4=this.git4||(0,c.A)(this.primaryColor,{h:-60}),this.git5=this.git5||(0,c.A)(this.primaryColor,{h:-90}),this.git6=this.git6||(0,c.A)(this.primaryColor,{h:60}),this.git7=this.git7||(0,c.A)(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,n.A)(this.git0,25),this.git1=(0,n.A)(this.git1,25),this.git2=(0,n.A)(this.git2,25),this.git3=(0,n.A)(this.git3,25),this.git4=(0,n.A)(this.git4,25),this.git5=(0,n.A)(this.git5,25),this.git6=(0,n.A)(this.git6,25),this.git7=(0,n.A)(this.git7,25)):(this.git0=(0,h.A)(this.git0,25),this.git1=(0,h.A)(this.git1,25),this.git2=(0,h.A)(this.git2,25),this.git3=(0,h.A)(this.git3,25),this.git4=(0,h.A)(this.git4,25),this.git5=(0,h.A)(this.git5,25),this.git6=(0,h.A)(this.git6,25),this.git7=(0,h.A)(this.git7,25)),this.gitInv0=this.gitInv0||(0,h.A)((0,d.A)(this.git0),25),this.gitInv1=this.gitInv1||(0,d.A)(this.git1),this.gitInv2=this.gitInv2||(0,d.A)(this.git2),this.gitInv3=this.gitInv3||(0,d.A)(this.git3),this.gitInv4=this.gitInv4||(0,d.A)(this.git4),this.gitInv5=this.gitInv5||(0,d.A)(this.git5),this.gitInv6=this.gitInv6||(0,d.A)(this.git6),this.gitInv7=this.gitInv7||(0,d.A)(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||(0,d.A)(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||(0,d.A)(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||L,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||v}calculate(t){if(Object.keys(this).forEach(t=>{"calculated"===this[t]&&(this[t]=void 0)}),"object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=K(this[e],t[e])})}},D=(0,s.K)(t=>{const e=new q;return e.calculate(t),e},"getThemeVariables"),W=class{static{(0,s.K)(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=(0,n.A)("#cde498",10),this.primaryBorderColor=M(this.primaryColor,this.darkMode),this.secondaryBorderColor=M(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=M(this.tertiaryColor,this.darkMode),this.primaryTextColor=(0,d.A)(this.primaryColor),this.secondaryTextColor=(0,d.A)(this.secondaryColor),this.tertiaryTextColor=(0,d.A)(this.primaryColor),this.lineColor=(0,d.A)(this.background),this.textColor=(0,d.A)(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=(0,h.A)(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||(0,c.A)(this.primaryColor,{h:30}),this.cScale4=this.cScale4||(0,c.A)(this.primaryColor,{h:60}),this.cScale5=this.cScale5||(0,c.A)(this.primaryColor,{h:90}),this.cScale6=this.cScale6||(0,c.A)(this.primaryColor,{h:120}),this.cScale7=this.cScale7||(0,c.A)(this.primaryColor,{h:150}),this.cScale8=this.cScale8||(0,c.A)(this.primaryColor,{h:210}),this.cScale9=this.cScale9||(0,c.A)(this.primaryColor,{h:270}),this.cScale10=this.cScale10||(0,c.A)(this.primaryColor,{h:300}),this.cScale11=this.cScale11||(0,c.A)(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,h.A)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,h.A)(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,h.A)(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||(0,h.A)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||(0,c.A)(this["cScale"+t],{h:180});this.scaleLabelColor="calculated"!==this.scaleLabelColor&&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]||(0,c.A)(this.mainBkg,{h:30,s:-30,l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||(0,c.A)(this.mainBkg,{h:30,s:-30,l:-(8+5*t)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||(0,n.A)(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||(0,n.A)(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=(0,c.A)(this.primaryColor,{h:64}),this.fillType3=(0,c.A)(this.secondaryColor,{h:64}),this.fillType4=(0,c.A)(this.primaryColor,{h:-64}),this.fillType5=(0,c.A)(this.secondaryColor,{h:-64}),this.fillType6=(0,c.A)(this.primaryColor,{h:128}),this.fillType7=(0,c.A)(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||(0,c.A)(this.primaryColor,{l:-30}),this.pie5=this.pie5||(0,c.A)(this.secondaryColor,{l:-30}),this.pie6=this.pie6||(0,c.A)(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||(0,c.A)(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||(0,c.A)(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||(0,c.A)(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||(0,c.A)(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||(0,c.A)(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||(0,c.A)(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??(0,c.A)(this.primaryColor,{l:-30}),this.venn2=this.venn2??(0,c.A)(this.secondaryColor,{l:-30}),this.venn3=this.venn3??(0,c.A)(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??(0,c.A)(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??(0,c.A)(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??(0,c.A)(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??(0,c.A)(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??(0,c.A)(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||(0,c.A)(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||(0,c.A)(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||(0,c.A)(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||(0,c.A)(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||(0,c.A)(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||(0,c.A)(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,l.A)(this.quadrant1Fill)?(0,n.A)(this.quadrant1Fill):(0,h.A)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||(0,c.A)(this.primaryColor,{h:-30}),this.git4=this.git4||(0,c.A)(this.primaryColor,{h:-60}),this.git5=this.git5||(0,c.A)(this.primaryColor,{h:-90}),this.git6=this.git6||(0,c.A)(this.primaryColor,{h:60}),this.git7=this.git7||(0,c.A)(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,n.A)(this.git0,25),this.git1=(0,n.A)(this.git1,25),this.git2=(0,n.A)(this.git2,25),this.git3=(0,n.A)(this.git3,25),this.git4=(0,n.A)(this.git4,25),this.git5=(0,n.A)(this.git5,25),this.git6=(0,n.A)(this.git6,25),this.git7=(0,n.A)(this.git7,25)):(this.git0=(0,h.A)(this.git0,25),this.git1=(0,h.A)(this.git1,25),this.git2=(0,h.A)(this.git2,25),this.git3=(0,h.A)(this.git3,25),this.git4=(0,h.A)(this.git4,25),this.git5=(0,h.A)(this.git5,25),this.git6=(0,h.A)(this.git6,25),this.git7=(0,h.A)(this.git7,25)),this.gitInv0=this.gitInv0||(0,d.A)(this.git0),this.gitInv1=this.gitInv1||(0,d.A)(this.git1),this.gitInv2=this.gitInv2||(0,d.A)(this.git2),this.gitInv3=this.gitInv3||(0,d.A)(this.git3),this.gitInv4=this.gitInv4||(0,d.A)(this.git4),this.gitInv5=this.gitInv5||(0,d.A)(this.git5),this.gitInv6=this.gitInv6||(0,d.A)(this.git6),this.gitInv7=this.gitInv7||(0,d.A)(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||(0,d.A)(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||(0,d.A)(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||L,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||v}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=K(this[e],t[e])})}},P=(0,s.K)(t=>{const e=new W;return e.calculate(t),e},"getThemeVariables"),z=class{static{(0,s.K)(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=(0,n.A)(this.contrast,55),this.background="#ffffff",this.tertiaryColor=(0,c.A)(this.primaryColor,{h:-160}),this.primaryBorderColor=M(this.primaryColor,this.darkMode),this.secondaryBorderColor=M(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=M(this.tertiaryColor,this.darkMode),this.primaryTextColor=(0,d.A)(this.primaryColor),this.secondaryTextColor=(0,d.A)(this.secondaryColor),this.tertiaryTextColor=(0,d.A)(this.tertiaryColor),this.lineColor=(0,d.A)(this.background),this.textColor=(0,d.A)(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||(0,n.A)(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=(0,n.A)(this.contrast,55),this.border2=this.contrast,this.actorBorder=(0,n.A)(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]||(0,d.A)(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||(0,n.A)(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||(0,h.A)(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]||(0,c.A)(this.mainBkg,{l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||(0,c.A)(this.mainBkg,{l:-(8+5*t)});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.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.sectionBkgColor=(0,n.A)(this.contrast,30),this.sectionBkgColor2=(0,n.A)(this.contrast,30),this.taskBorderColor=(0,h.A)(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=(0,n.A)(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=(0,h.A)(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=(0,c.A)(this.primaryColor,{h:64}),this.fillType3=(0,c.A)(this.secondaryColor,{h:64}),this.fillType4=(0,c.A)(this.primaryColor,{h:-64}),this.fillType5=(0,c.A)(this.secondaryColor,{h:-64}),this.fillType6=(0,c.A)(this.primaryColor,{h:128}),this.fillType7=(0,c.A)(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||(0,c.A)(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||(0,c.A)(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||(0,c.A)(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||(0,c.A)(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||(0,c.A)(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||(0,c.A)(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,l.A)(this.quadrant1Fill)?(0,n.A)(this.quadrant1Fill):(0,h.A)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=(0,h.A)(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||(0,c.A)(this.primaryColor,{h:-30}),this.git4=this.pie5||(0,c.A)(this.primaryColor,{h:-60}),this.git5=this.pie6||(0,c.A)(this.primaryColor,{h:-90}),this.git6=this.pie7||(0,c.A)(this.primaryColor,{h:60}),this.git7=this.pie8||(0,c.A)(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||(0,d.A)(this.git0),this.gitInv1=this.gitInv1||(0,d.A)(this.git1),this.gitInv2=this.gitInv2||(0,d.A)(this.git2),this.gitInv3=this.gitInv3||(0,d.A)(this.git3),this.gitInv4=this.gitInv4||(0,d.A)(this.git4),this.gitInv5=this.gitInv5||(0,d.A)(this.git5),this.gitInv6=this.gitInv6||(0,d.A)(this.git6),this.gitInv7=this.gitInv7||(0,d.A)(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||L,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||v}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=K(this[e],t[e])})}},R=(0,s.K)(t=>{const e=new z;return e.calculate(t),e},"getThemeVariables"),N=class{static{(0,s.K)(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=M(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||(0,c.A)(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||(0,c.A)(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||M(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||M(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||M(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||M(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||(0,d.A)(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||(0,d.A)(this.tertiaryColor),this.lineColor=this.lineColor||(0,d.A)(this.background),this.arrowheadColor=this.arrowheadColor||(0,d.A)(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?(0,h.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||(0,h.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||(0,d.A)(this.lineColor),this.rectBkgColor=this.rectBkgColor||((0,l.A)(this.background)?(0,n.A)(this.background,4):(0,h.A)(this.background,4));const t="#ECECFE",e="#E9E9F1",r=(0,c.A)(t,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||e,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||(0,n.A)(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||e,this.cScale2=this.cScale2||r,this.cScale3=this.cScale3||(0,c.A)(t,{h:30}),this.cScale4=this.cScale4||(0,c.A)(t,{h:60}),this.cScale5=this.cScale5||(0,c.A)(t,{h:90}),this.cScale6=this.cScale6||(0,c.A)(t,{h:120}),this.cScale7=this.cScale7||(0,c.A)(t,{h:150}),this.cScale8=this.cScale8||(0,c.A)(t,{h:210,l:150}),this.cScale9=this.cScale9||(0,c.A)(t,{h:270}),this.cScale10=this.cScale10||(0,c.A)(t,{h:300}),this.cScale11=this.cScale11||(0,c.A)(t,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,h.A)(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,h.A)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||(0,d.A)(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||(0,n.A)(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||(0,h.A)(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const i=this.darkMode?-4:-1;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||(0,c.A)(this.mainBkg,{h:180,s:-15,l:i*(5+3*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||(0,c.A)(this.mainBkg,{h:180,s:-15,l:i*(8+3*t)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||e,this.fillType2=this.fillType2||(0,c.A)(t,{h:64}),this.fillType3=this.fillType3||(0,c.A)(e,{h:64}),this.fillType4=this.fillType4||(0,c.A)(t,{h:-64}),this.fillType5=this.fillType5||(0,c.A)(e,{h:-64}),this.fillType6=this.fillType6||(0,c.A)(t,{h:128}),this.fillType7=this.fillType7||(0,c.A)(e,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||e,this.pie3=this.pie3||r,this.pie4=this.pie4||(0,c.A)(t,{l:-10}),this.pie5=this.pie5||(0,c.A)(e,{l:-10}),this.pie6=this.pie6||(0,c.A)(r,{l:-10}),this.pie7=this.pie7||(0,c.A)(t,{h:60,l:-10}),this.pie8=this.pie8||(0,c.A)(t,{h:-60,l:-10}),this.pie9=this.pie9||(0,c.A)(t,{h:120,l:0}),this.pie10=this.pie10||(0,c.A)(t,{h:60,l:-20}),this.pie11=this.pie11||(0,c.A)(t,{h:-60,l:-20}),this.pie12=this.pie12||(0,c.A)(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||(0,c.A)(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||(0,c.A)(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||(0,c.A)(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||(0,c.A)(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||(0,c.A)(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||(0,c.A)(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,l.A)(this.quadrant1Fill)?(0,n.A)(this.quadrant1Fill):(0,h.A)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||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?(0,h.A)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||e,this.git2=this.git2||r,this.git3=this.git3||(0,c.A)(t,{h:-30}),this.git4=this.git4||(0,c.A)(t,{h:-60}),this.git5=this.git5||(0,c.A)(t,{h:-90}),this.git6=this.git6||(0,c.A)(t,{h:60}),this.git7=this.git7||(0,c.A)(t,{h:120}),this.darkMode?(this.git0=(0,n.A)(this.git0,25),this.git1=(0,n.A)(this.git1,25),this.git2=(0,n.A)(this.git2,25),this.git3=(0,n.A)(this.git3,25),this.git4=(0,n.A)(this.git4,25),this.git5=(0,n.A)(this.git5,25),this.git6=(0,n.A)(this.git6,25),this.git7=(0,n.A)(this.git7,25)):(this.git0=(0,h.A)(this.git0,25),this.git1=(0,h.A)(this.git1,25),this.git2=(0,h.A)(this.git2,25),this.git3=(0,h.A)(this.git3,25),this.git4=(0,h.A)(this.git4,25),this.git5=(0,h.A)(this.git5,25),this.git6=(0,h.A)(this.git6,25),this.git7=(0,h.A)(this.git7,25)),this.gitInv0=this.gitInv0||(0,d.A)(this.git0),this.gitInv1=this.gitInv1||(0,d.A)(this.git1),this.gitInv2=this.gitInv2||(0,d.A)(this.git2),this.gitInv3=this.gitInv3||(0,d.A)(this.git3),this.gitInv4=this.gitInv4||(0,d.A)(this.git4),this.gitInv5=this.gitInv5||(0,d.A)(this.git5),this.gitInv6=this.gitInv6||(0,d.A)(this.git6),this.gitInv7=this.gitInv7||(0,d.A)(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||L,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||v}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=K(this[e],t[e])})}},j=(0,s.K)(t=>{const e=new N;return e.calculate(t),e},"getThemeVariables"),H=class{static{(0,s.K)(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,n.A)(this.primaryColor,16),this.tertiaryColor=(0,c.A)(this.primaryColor,{h:-160}),this.primaryBorderColor=(0,d.A)(this.background),this.secondaryBorderColor=M(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=M(this.tertiaryColor,this.darkMode),this.primaryTextColor=(0,d.A)(this.primaryColor),this.secondaryTextColor=(0,d.A)(this.secondaryColor),this.tertiaryTextColor=(0,d.A)(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,n.A)((0,d.A)("#323D47"),10),this.border1="#ccc",this.border2=(0,g.A)(255,255,255,.25),this.arrowheadColor=(0,d.A)(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||(0,c.A)(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||(0,c.A)(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||M(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||M(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||M(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||M(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||(0,d.A)(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||(0,d.A)(this.tertiaryColor),this.lineColor=this.lineColor||(0,d.A)(this.background),this.arrowheadColor=this.arrowheadColor||(0,d.A)(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.secondBkg="calculated"===this.secondBkg?(0,n.A)(this.mainBkg,16):this.secondBkg,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?(0,h.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||(0,h.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||(0,d.A)(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||(0,n.A)(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||this.secondBkg,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||(0,c.A)(this.primaryColor,{h:30}),this.cScale4=this.cScale4||(0,c.A)(this.primaryColor,{h:60}),this.cScale5=this.cScale5||(0,c.A)(this.primaryColor,{h:90}),this.cScale6=this.cScale6||(0,c.A)(this.primaryColor,{h:120}),this.cScale7=this.cScale7||(0,c.A)(this.primaryColor,{h:150}),this.cScale8=this.cScale8||(0,c.A)(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||(0,c.A)(this.primaryColor,{h:270}),this.cScale10=this.cScale10||(0,c.A)(this.primaryColor,{h:300}),this.cScale11=this.cScale11||(0,c.A)(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,h.A)(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,h.A)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||(0,d.A)(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||(0,n.A)(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||(0,h.A)(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||(0,c.A)(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||(0,c.A)(this.mainBkg,{h:180,s:-15,l:t*(8+3*e)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||(0,c.A)(this.primaryColor,{h:64}),this.fillType3=this.fillType3||(0,c.A)(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||(0,c.A)(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||(0,c.A)(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||(0,c.A)(this.primaryColor,{h:128}),this.fillType7=this.fillType7||(0,c.A)(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||(0,c.A)(this.primaryColor,{l:-10}),this.pie5=this.pie5||(0,c.A)(this.secondaryColor,{l:-10}),this.pie6=this.pie6||(0,c.A)(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||(0,c.A)(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||(0,c.A)(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||(0,c.A)(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||(0,c.A)(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||(0,c.A)(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||(0,c.A)(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||(0,c.A)(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||(0,c.A)(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||(0,c.A)(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||(0,c.A)(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||(0,c.A)(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||(0,c.A)(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,l.A)(this.quadrant1Fill)?(0,n.A)(this.quadrant1Fill):(0,h.A)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?(0,h.A)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||"#0b0000",this.git1=this.git1||"#4d1037",this.git2=this.git2||"#3f5258",this.git3=this.git3||"#4f2f1b",this.git4=this.git4||"#6e0a0a",this.git5=this.git5||"#3b0048",this.git6=this.git6||"#995a01",this.git7=this.git7||"#154706",this.gitDarkMode=!0,this.gitDarkMode?(this.git0=(0,n.A)(this.git0,25),this.git1=(0,n.A)(this.git1,25),this.git2=(0,n.A)(this.git2,25),this.git3=(0,n.A)(this.git3,25),this.git4=(0,n.A)(this.git4,25),this.git5=(0,n.A)(this.git5,25),this.git6=(0,n.A)(this.git6,25),this.git7=(0,n.A)(this.git7,25)):(this.git0=(0,h.A)(this.git0,25),this.git1=(0,h.A)(this.git1,25),this.git2=(0,h.A)(this.git2,25),this.git3=(0,h.A)(this.git3,25),this.git4=(0,h.A)(this.git4,25),this.git5=(0,h.A)(this.git5,25),this.git6=(0,h.A)(this.git6,25),this.git7=(0,h.A)(this.git7,25)),this.gitInv0=this.gitInv0||(0,d.A)(this.git0),this.gitInv1=this.gitInv1||(0,d.A)(this.git1),this.gitInv2=this.gitInv2||(0,d.A)(this.git2),this.gitInv3=this.gitInv3||(0,d.A)(this.git3),this.gitInv4=this.gitInv4||(0,d.A)(this.git4),this.gitInv5=this.gitInv5||(0,d.A)(this.git5),this.gitInv6=this.gitInv6||(0,d.A)(this.git6),this.gitInv7=this.gitInv7||(0,d.A)(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||L,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||v}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=K(this[e],t[e])})}},G=(0,s.K)(t=>{const e=new H;return e.calculate(t),e},"getThemeVariables"),X=class{static{(0,s.K)(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=M("#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||(0,c.A)(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||(0,c.A)(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||M(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||M(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||M(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||M(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||(0,d.A)(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||(0,d.A)(this.tertiaryColor),this.lineColor=this.lineColor||(0,d.A)(this.background),this.arrowheadColor=this.arrowheadColor||(0,d.A)(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?(0,h.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||(0,h.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||(0,d.A)(this.lineColor),this.rectBkgColor=this.rectBkgColor||((0,l.A)(this.background)?(0,n.A)(this.background,4):(0,h.A)(this.background,4));const t="#ECECFE",e="#E9E9F1",r=(0,c.A)(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||e,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||(0,n.A)(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 t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=this.mainBkg;if(this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,h.A)(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,h.A)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||(0,d.A)(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||(0,n.A)(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||(0,h.A)(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const i=this.darkMode?-4:-1;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||(0,c.A)(this.mainBkg,{h:180,s:-15,l:i*(5+3*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||(0,c.A)(this.mainBkg,{h:180,s:-15,l:i*(8+3*t)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||e,this.fillType2=this.fillType2||(0,c.A)(t,{h:64}),this.fillType3=this.fillType3||(0,c.A)(e,{h:64}),this.fillType4=this.fillType4||(0,c.A)(t,{h:-64}),this.fillType5=this.fillType5||(0,c.A)(e,{h:-64}),this.fillType6=this.fillType6||(0,c.A)(t,{h:128}),this.fillType7=this.fillType7||(0,c.A)(e,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||e,this.pie3=this.pie3||r,this.pie4=this.pie4||(0,c.A)(t,{l:-10}),this.pie5=this.pie5||(0,c.A)(e,{l:-10}),this.pie6=this.pie6||(0,c.A)(r,{l:-10}),this.pie7=this.pie7||(0,c.A)(t,{h:60,l:-10}),this.pie8=this.pie8||(0,c.A)(t,{h:-60,l:-10}),this.pie9=this.pie9||(0,c.A)(t,{h:120,l:0}),this.pie10=this.pie10||(0,c.A)(t,{h:60,l:-20}),this.pie11=this.pie11||(0,c.A)(t,{h:-60,l:-20}),this.pie12=this.pie12||(0,c.A)(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||(0,c.A)(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||(0,c.A)(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||(0,c.A)(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||(0,c.A)(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||(0,c.A)(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||(0,c.A)(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,l.A)(this.quadrant1Fill)?(0,n.A)(this.quadrant1Fill):(0,h.A)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||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?(0,h.A)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||t,this.git1=this.git1||e,this.git2=this.git2||r,this.git3=this.git3||(0,c.A)(t,{h:-30}),this.git4=this.git4||(0,c.A)(t,{h:-60}),this.git5=this.git5||(0,c.A)(t,{h:-90}),this.git6=this.git6||(0,c.A)(t,{h:60}),this.git7=this.git7||(0,c.A)(t,{h:120}),this.darkMode?(this.git0=(0,n.A)(this.git0,25),this.git1=(0,n.A)(this.git1,25),this.git2=(0,n.A)(this.git2,25),this.git3=(0,n.A)(this.git3,25),this.git4=(0,n.A)(this.git4,25),this.git5=(0,n.A)(this.git5,25),this.git6=(0,n.A)(this.git6,25),this.git7=(0,n.A)(this.git7,25)):(this.git0=(0,h.A)(this.git0,25),this.git1=(0,h.A)(this.git1,25),this.git2=(0,h.A)(this.git2,25),this.git3=(0,h.A)(this.git3,25),this.git4=(0,h.A)(this.git4,25),this.git5=(0,h.A)(this.git5,25),this.git6=(0,h.A)(this.git6,25),this.git7=(0,h.A)(this.git7,25)),this.gitInv0=this.gitInv0||(0,d.A)(this.git0),this.gitInv1=this.gitInv1||(0,d.A)(this.git1),this.gitInv2=this.gitInv2||(0,d.A)(this.git2),this.gitInv3=this.gitInv3||(0,d.A)(this.git3),this.gitInv4=this.gitInv4||(0,d.A)(this.git4),this.gitInv5=this.gitInv5||(0,d.A)(this.git5),this.gitInv6=this.gitInv6||(0,d.A)(this.git6),this.gitInv7=this.gitInv7||(0,d.A)(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||L,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||v}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=K(this[e],t[e])})}},U=(0,s.K)(t=>{const e=new X;return e.calculate(t),e},"getThemeVariables"),Y=class{static{(0,s.K)(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,n.A)(this.primaryColor,16),this.tertiaryColor=(0,c.A)(this.primaryColor,{h:-160}),this.primaryBorderColor=(0,d.A)(this.background),this.secondaryBorderColor=M(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=M(this.tertiaryColor,this.darkMode),this.primaryTextColor=(0,d.A)(this.primaryColor),this.secondaryTextColor=(0,d.A)(this.secondaryColor),this.tertiaryTextColor=(0,d.A)(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,n.A)((0,d.A)("#323D47"),10),this.border1="#ccc",this.border2=(0,g.A)(255,255,255,.25),this.arrowheadColor=(0,d.A)(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||(0,c.A)(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||(0,c.A)(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||M(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||M(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||M(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||M(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||(0,d.A)(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||(0,d.A)(this.tertiaryColor),this.lineColor=this.lineColor||(0,d.A)(this.background),this.arrowheadColor=this.arrowheadColor||(0,d.A)(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.secondBkg="calculated"===this.secondBkg?(0,n.A)(this.mainBkg,16):this.secondBkg,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?(0,h.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||(0,h.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||(0,d.A)(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||(0,n.A)(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||this.secondBkg,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||(0,c.A)(this.primaryColor,{h:30}),this.cScale4=this.cScale4||(0,c.A)(this.primaryColor,{h:60}),this.cScale5=this.cScale5||(0,c.A)(this.primaryColor,{h:90}),this.cScale6=this.cScale6||(0,c.A)(this.primaryColor,{h:120}),this.cScale7=this.cScale7||(0,c.A)(this.primaryColor,{h:150}),this.cScale8=this.cScale8||(0,c.A)(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||(0,c.A)(this.primaryColor,{h:270}),this.cScale10=this.cScale10||(0,c.A)(this.primaryColor,{h:300}),this.cScale11=this.cScale11||(0,c.A)(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,h.A)(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,h.A)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||(0,d.A)(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||(0,n.A)(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||(0,h.A)(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||(0,c.A)(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||(0,c.A)(this.mainBkg,{h:180,s:-15,l:t*(8+3*e)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||(0,c.A)(this.primaryColor,{h:64}),this.fillType3=this.fillType3||(0,c.A)(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||(0,c.A)(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||(0,c.A)(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||(0,c.A)(this.primaryColor,{h:128}),this.fillType7=this.fillType7||(0,c.A)(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||(0,c.A)(this.primaryColor,{l:-10}),this.pie5=this.pie5||(0,c.A)(this.secondaryColor,{l:-10}),this.pie6=this.pie6||(0,c.A)(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||(0,c.A)(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||(0,c.A)(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||(0,c.A)(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||(0,c.A)(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||(0,c.A)(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||(0,c.A)(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||(0,c.A)(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||(0,c.A)(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||(0,c.A)(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||(0,c.A)(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||(0,c.A)(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||(0,c.A)(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,l.A)(this.quadrant1Fill)?(0,n.A)(this.quadrant1Fill):(0,h.A)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?(0,h.A)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||(0,c.A)(this.primaryColor,{h:-30}),this.git4=this.git4||(0,c.A)(this.primaryColor,{h:-60}),this.git5=this.git5||(0,c.A)(this.primaryColor,{h:-90}),this.git6=this.git6||(0,c.A)(this.primaryColor,{h:60}),this.git7=this.git7||(0,c.A)(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,n.A)(this.git0,25),this.git1=(0,n.A)(this.git1,25),this.git2=(0,n.A)(this.git2,25),this.git3=(0,n.A)(this.git3,25),this.git4=(0,n.A)(this.git4,25),this.git5=(0,n.A)(this.git5,25),this.git6=(0,n.A)(this.git6,25),this.git7=(0,n.A)(this.git7,25)):(this.git0=(0,h.A)(this.git0,25),this.git1=(0,h.A)(this.git1,25),this.git2=(0,h.A)(this.git2,25),this.git3=(0,h.A)(this.git3,25),this.git4=(0,h.A)(this.git4,25),this.git5=(0,h.A)(this.git5,25),this.git6=(0,h.A)(this.git6,25),this.git7=(0,h.A)(this.git7,25)),this.gitInv0=this.gitInv0||(0,d.A)(this.git0),this.gitInv1=this.gitInv1||(0,d.A)(this.git1),this.gitInv2=this.gitInv2||(0,d.A)(this.git2),this.gitInv3=this.gitInv3||(0,d.A)(this.git3),this.gitInv4=this.gitInv4||(0,d.A)(this.git4),this.gitInv5=this.gitInv5||(0,d.A)(this.git5),this.gitInv6=this.gitInv6||(0,d.A)(this.git6),this.gitInv7=this.gitInv7||(0,d.A)(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||L,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||v}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=K(this[e],t[e])})}},V=(0,s.K)(t=>{const e=new Y;return e.calculate(t),e},"getThemeVariables"),Z=class{static{(0,s.K)(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=M("#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.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.usecaseActorBorder="#A78BFA",this.usecaseActorBkg="#F5F3FF",this.usecaseBorder="#2DD4BF",this.usecaseBkg="#F0FDFA",this.usecaseBoundaryBorder="#BDBCCC",this.usecaseBoundaryBkg="#FAFAFC",this.usecaseIncludeLine="#38BDF8",this.usecaseExtendLine="#FB923C",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||(0,c.A)(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||(0,c.A)(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||M(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||M(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||M(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||M(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||(0,d.A)(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||(0,d.A)(this.tertiaryColor),this.lineColor=this.lineColor||(0,d.A)(this.background),this.arrowheadColor=this.arrowheadColor||(0,d.A)(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?(0,h.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||(0,h.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||(0,d.A)(this.lineColor),this.rectBkgColor=this.rectBkgColor||((0,l.A)(this.background)?(0,n.A)(this.background,4):(0,h.A)(this.background,4));const t="#ECECFE",e=(0,c.A)(t,{h:180,l:5});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||(0,n.A)(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.stateEdgeLabelBackground=this.stateEdgeLabelBackground||"#FFFFFF",this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#F9F9FB",this.compositeTitleBackground=this.compositeTitleBackground||"#F9F9FB",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",this.sectionBkgColor=this.sectionBkgColor||this.cScale0,this.sectionBkgColor2=this.sectionBkgColor2||this.cScale1,this.altSectionBkgColor=this.altSectionBkgColor||"white";for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||(0,d.A)(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||(0,n.A)(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||(0,h.A)(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const r=this.darkMode?-4:-1;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||(0,c.A)(this.mainBkg,{h:180,s:-15,l:r*(5+3*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||(0,c.A)(this.mainBkg,{h:180,s:-15,l:r*(8+3*t)});this.classText=this.classText||this.textColor;for(let t=0;t<8;t++)this["fillType"+t]=this["fillType"+t]||this.bkgColorArray[t];for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+(t+1)]=this["pie"+(t+1)]||this["cScale"+t];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.borderColorArray[t%this.borderColorArray.length];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||(0,c.A)(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||(0,c.A)(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||(0,c.A)(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||(0,c.A)(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||(0,c.A)(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||(0,c.A)(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,l.A)(this.quadrant1Fill)?(0,n.A)(this.quadrant1Fill):(0,h.A)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||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?(0,h.A)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||t,this.git1=this.git1||"#E9E9F1",this.git2=this.git2||e,this.git3=this.git3||(0,c.A)(t,{h:-30}),this.git4=this.git4||(0,c.A)(t,{h:-60}),this.git5=this.git5||(0,c.A)(t,{h:-90}),this.git6=this.git6||(0,c.A)(t,{h:60}),this.git7=this.git7||(0,c.A)(t,{h:120}),this.darkMode?(this.git0=(0,n.A)(this.git0,25),this.git1=(0,n.A)(this.git1,25),this.git2=(0,n.A)(this.git2,25),this.git3=(0,n.A)(this.git3,25),this.git4=(0,n.A)(this.git4,25),this.git5=(0,n.A)(this.git5,25),this.git6=(0,n.A)(this.git6,25),this.git7=(0,n.A)(this.git7,25)):(this.git0=(0,h.A)(this.git0,25),this.git1=(0,h.A)(this.git1,25),this.git2=(0,h.A)(this.git2,25),this.git3=(0,h.A)(this.git3,25),this.git4=(0,h.A)(this.git4,25),this.git5=(0,h.A)(this.git5,25),this.git6=(0,h.A)(this.git6,25),this.git7=(0,h.A)(this.git7,25)),this.gitInv0=this.gitInv0||(0,d.A)(this.git0),this.gitInv1=this.gitInv1||(0,d.A)(this.git1),this.gitInv2=this.gitInv2||(0,d.A)(this.git2),this.gitInv3=this.gitInv3||(0,d.A)(this.git3),this.gitInv4=this.gitInv4||(0,d.A)(this.git4),this.gitInv5=this.gitInv5||(0,d.A)(this.git5),this.gitInv6=this.gitInv6||(0,d.A)(this.git6),this.gitInv7=this.gitInv7||(0,d.A)(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||L,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||v}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=K(this[e],t[e])})}},Q=(0,s.K)(t=>{const e=new Z;return e.calculate(t),e},"getThemeVariables"),J=class{static{(0,s.K)(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,n.A)(this.primaryColor,16),this.tertiaryColor=(0,c.A)(this.primaryColor,{h:-160}),this.primaryBorderColor=(0,d.A)(this.background),this.secondaryBorderColor=M(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=M(this.tertiaryColor,this.darkMode),this.primaryTextColor=(0,d.A)(this.primaryColor),this.secondaryTextColor=(0,d.A)(this.secondaryColor),this.tertiaryTextColor=(0,d.A)(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,n.A)((0,d.A)("#323D47"),10),this.border1="#ccc",this.border2=(0,g.A)(255,255,255,.25),this.arrowheadColor=(0,d.A)(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.usecaseActorBorder="#A78BFA",this.usecaseBorder="#2DD4BF",this.usecaseBoundaryBorder="#BDBCCC",this.usecaseIncludeLine="#38BDF8",this.usecaseExtendLine="#FB923C",this.filterColor="#FFFFFF"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||(0,c.A)(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||(0,c.A)(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||M(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||M(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||M(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||M(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||(0,d.A)(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||(0,d.A)(this.tertiaryColor),this.lineColor=this.lineColor||(0,d.A)(this.background),this.arrowheadColor=this.arrowheadColor||(0,d.A)(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.secondBkg="calculated"===this.secondBkg?(0,n.A)(this.mainBkg,16):this.secondBkg,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?(0,h.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,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||(0,h.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||(0,d.A)(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.rootLabelColor="#FFFFFF",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||(0,n.A)(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||this.secondBkg,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.stateEdgeLabelBackground=this.stateEdgeLabelBackground||"#16141F",this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||"#16141F",this.altBackground=this.altBackground||"#16141F",this.compositeTitleBackground=this.compositeTitleBackground||"#16141F",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",this.sectionBkgColor=this.sectionBkgColor||this.cScale0,this.sectionBkgColor2=this.sectionBkgColor2||this.cScale1,this.altSectionBkgColor=this.altSectionBkgColor||this.background;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||(0,d.A)(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||(0,n.A)(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||(0,h.A)(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=(0,h.A)(this["cScale"+t],75);const t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||(0,c.A)(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||(0,c.A)(this.mainBkg,{h:180,s:-15,l:t*(8+3*e)});this.classText=this.classText||this.textColor;["#701a75","#134e4a","#7c2d12","#581c87","#14532d","#4c1d95","#7f1d1d","#713f12"].forEach((t,e)=>{this["fillType"+e]=this["fillType"+e]||t});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+(t+1)]=this["pie"+(t+1)]||this["cScale"+t];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||"#28253D",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.borderColorArray[t%this.borderColorArray.length];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||(0,c.A)(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||(0,c.A)(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||(0,c.A)(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||(0,c.A)(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||(0,c.A)(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||(0,c.A)(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,l.A)(this.quadrant1Fill)?(0,n.A)(this.quadrant1Fill):(0,h.A)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?(0,h.A)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||(0,c.A)(this.primaryColor,{h:-30}),this.git4=this.git4||(0,c.A)(this.primaryColor,{h:-60}),this.git5=this.git5||(0,c.A)(this.primaryColor,{h:-90}),this.git6=this.git6||(0,c.A)(this.primaryColor,{h:60}),this.git7=this.git7||(0,c.A)(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,n.A)(this.git0,25),this.git1=(0,n.A)(this.git1,25),this.git2=(0,n.A)(this.git2,25),this.git3=(0,n.A)(this.git3,25),this.git4=(0,n.A)(this.git4,25),this.git5=(0,n.A)(this.git5,25),this.git6=(0,n.A)(this.git6,25),this.git7=(0,n.A)(this.git7,25)):(this.git0=(0,h.A)(this.git0,25),this.git1=(0,h.A)(this.git1,25),this.git2=(0,h.A)(this.git2,25),this.git3=(0,h.A)(this.git3,25),this.git4=(0,h.A)(this.git4,25),this.git5=(0,h.A)(this.git5,25),this.git6=(0,h.A)(this.git6,25),this.git7=(0,h.A)(this.git7,25)),this.gitInv0=this.gitInv0||(0,d.A)(this.git0),this.gitInv1=this.gitInv1||(0,d.A)(this.git1),this.gitInv2=this.gitInv2||(0,d.A)(this.git2),this.gitInv3=this.gitInv3||(0,d.A)(this.git3),this.gitInv4=this.gitInv4||(0,d.A)(this.git4),this.gitInv5=this.gitInv5||(0,d.A)(this.git5),this.gitInv6=this.gitInv6||(0,d.A)(this.git6),this.gitInv7=this.gitInv7||(0,d.A)(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||L,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||v}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=K(this[e],t[e])})}},tt={base:{getThemeVariables:_},dark:{getThemeVariables:I},default:{getThemeVariables:D},forest:{getThemeVariables:P},neutral:{getThemeVariables:R},neo:{getThemeVariables:j},"neo-dark":{getThemeVariables:G},redux:{getThemeVariables:U},"redux-dark":{getThemeVariables:V},"redux-color":{getThemeVariables:Q},"redux-dark-color":{getThemeVariables:(0,s.K)(t=>{const e=new J;return e.calculate(t),e},"getThemeVariables")}},et={flowchart:{useMaxWidth:!0,theme:"redux-color",look:"neo",titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,wrappingWidth:120,minNodeWidth:120,inheritDir:!1},swimlane:{useMaxWidth:!0,theme:"redux-color",look:"neo",layout:"swimlane",lineHops:"arc",ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!1},agentflow:{useMaxWidth:!0,theme:"redux-color",look:"neo",titleTopMargin:25,diagramPadding:8,nodeSpacing:50,rankSpacing:50,wrappingWidth:120,minNodeWidth:120},sequence:{useMaxWidth:!0,theme:"redux-color",look:"neo",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,theme:"redux-color",look:"neo",titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,theme:"redux-color",look:"neo",layout:"elk",wrappingWidth:120,minNodeWidth:120,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},er:{useMaxWidth:!0,theme:"redux-color",look:"neo",titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75,donutHole:0,legendPosition:"right",highlightSlice:""},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,showLegend:!0,legendFontSize:14,legendPadding:10,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,theme:"redux-color",look:"neo",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,bitOrder:"ascending",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},usecase:{useMaxWidth:!0,theme:"redux-color",look:"neo",wrappingWidth:120,minNodeWidth:120,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:"normal",usecaseFontSize:12,usecaseFontFamily:'"Open Sans", sans-serif',usecaseFontWeight:"normal",nodeSpacing:50,rankSpacing:50,diagramPadding:20,colorScheme:"role"},venn:{useMaxWidth:!0,theme:"redux-color",look:"neo",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:"elk",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},rt={...et,deterministicIDSeed:void 0,elk:{mergeEdges:!1,straightenEdges:!0,lineHops:!0,preset:"default",nodePlacementStrategy:void 0,layeringStrategy:void 0,cycleBreakingStrategy:void 0,layeringLayerBound:4,nodePlacementAlignment:void 0,forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES",keepEntryNodeOnTop:!1,orientFeedbackEdges:!0},themeCSS:void 0,themeVariables:tt.default.getThemeVariables(),sequence:{...et.sequence,messageFont:(0,s.K)(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:(0,s.K)(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:(0,s.K)(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{theme:et.class?.theme,look:et.class?.look,layout:et.class?.layout,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...et.gantt,tickInterval:void 0,useWidth:void 0},c4:{...et.c4,useWidth:void 0,personFont:(0,s.K)(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...et.flowchart,inheritDir:!1},external_personFont:(0,s.K)(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:(0,s.K)(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:(0,s.K)(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:(0,s.K)(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:(0,s.K)(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:(0,s.K)(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:(0,s.K)(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:(0,s.K)(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:(0,s.K)(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:(0,s.K)(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:(0,s.K)(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:(0,s.K)(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:(0,s.K)(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:(0,s.K)(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:(0,s.K)(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:(0,s.K)(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:(0,s.K)(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:(0,s.K)(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:(0,s.K)(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:(0,s.K)(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:(0,s.K)(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...et.pie,useWidth:984},xyChart:{...et.xyChart,useWidth:void 0},requirement:{...et.requirement,useWidth:void 0},packet:{...et.packet},eventmodeling:{...et.eventmodeling},treeView:{...et.treeView,useWidth:void 0},radar:{...et.radar},usecase:{...et.usecase},railroad:{...et.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:{...et.ishikawa},sankey:{...et.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:{...et.venn},cynefin:{...et.cynefin}},it=(0,s.K)((t,e="")=>Object.keys(t).reduce((r,i)=>Array.isArray(t[i])?r:"object"==typeof t[i]&&null!==t[i]?[...r,e+i,...it(t[i],"")]:[...r,e+i],[]),"keyify"),ot=new Set(it(rt,"")),at=rt,st={"flowchart-v2":"flowchart","flowchart-elk":"flowchart",classDiagram:"class",stateDiagram:"state",xychart:"xyChart",railroadAbnf:"railroad",railroadEbnf:"railroad",railroadPeg:"railroad"},lt=(0,s.K)(t=>st[t]??t,"getDiagramConfigKey"),nt={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},ht=(0,s.K)((t,e)=>{for(const r of Object.keys(t)){const i=t[r];(r.startsWith("__")||r.includes("proto")||r.includes("constr")||"string"!=typeof i||!e.test(i))&&(a.R.debug("sanitize deleting dictionary entry:",r,i),delete t[r])}},"sanitizeDictionaryConfig"),ct=(0,s.K)(t=>{if(a.R.debug("sanitizeDirective called with",t),"object"==typeof t&&null!=t)if(Array.isArray(t))t.forEach(t=>ct(t));else{for(const e of Object.keys(t)){if(a.R.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!ot.has(e)||null==t[e]){a.R.debug("sanitize deleting key: ",e),delete t[e];continue}if("object"==typeof t[e]){const r=nt[e];r?ht(t[e],r):(a.R.debug("sanitizing object",e),ct(t[e]));continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)e.includes(i)&&(a.R.debug("sanitizing css option",e),t[e]=dt(t[e]))}if(t.themeVariables)for(const e of Object.keys(t.themeVariables)){const r=t.themeVariables[e];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}a.R.debug("After sanitization",t)}},"sanitizeDirective"),dt=(0,s.K)(t=>{let e=0,r=0;for(const i of t){if(e<r)return"{ /* ERROR: Unbalanced CSS */ }";"{"===i?e++:"}"===i&&r++}return e!==r?"{ /* ERROR: Unbalanced CSS */ }":t},"sanitizeCss"),gt=Object.freeze(at),pt=["theme","look","layout"],ut=new Set(["classic","handDrawn","neo"]),yt=(0,s.K)((t,e)=>"theme"===t?"null"===e||Object.hasOwn(tt,e):"look"!==t||ut.has(e),"isUsableAppearance"),Ct=(0,s.K)((t,e,r)=>{if(!t)return;const i=t[e];return[i?.[r],t[r]].find(t=>void 0!==t&&yt(r,t))},"readAppearance"),mt=(0,s.K)(t=>!1!==t&&!["false","null","0"].includes(String(t).trim().toLowerCase()),"evaluate"),ft=F({},gt),xt={},bt=[],kt=F({},gt),Bt=(0,s.K)((t,e)=>{if(!o)return;const r=[e,...[...bt].reverse(),xt,gt],i=t[o];for(const e of pt)for(const a of r){const r=Ct(a,o,e);if(void 0!==r){t[e]=r,void 0!==i?.[e]&&(i[e]=r);break}}},"resolveAppearance"),St=(0,s.K)((t,e)=>{let r=F({},t),o={};for(const t of e)Et(t),o=F(o,t);r=F(r,o),Bt(r,o);if((Boolean(o.theme)||r.theme!==t.theme)&&r.theme&&Object.hasOwn(tt,r.theme)){const t=F({},i),e=F(t.themeVariables||{},o.themeVariables);r.themeVariables=tt[r.theme].getThemeVariables(e)}return qt(kt=r),kt},"updateCurrentConfig"),wt=(0,s.K)(t=>{o=void 0===t?void 0:lt(t),St(ft,bt)},"setDiagramConfigScope"),Tt=(0,s.K)(t=>(ft=F({},gt),ft=F(ft,t),xt=F({},t),t.theme&&Object.hasOwn(tt,t.theme)&&(ft.themeVariables=tt[t.theme].getThemeVariables(t.themeVariables)),St(ft,bt),ft),"setSiteConfig"),At=(0,s.K)(t=>{i=F({},t)},"saveConfigFromInitialize"),Ft=(0,s.K)(t=>(ft=F(ft,t),xt=F(xt,t),St(ft,bt),ft),"updateSiteConfig"),Lt=(0,s.K)(()=>F({},ft),"getSiteConfig"),vt=(0,s.K)(t=>(St(kt,[t]),Mt()),"setConfig"),Mt=(0,s.K)(()=>F({},kt),"getConfig"),Et=(0,s.K)(t=>{t&&(["secure",...ft.secure??[]].forEach(e=>{Object.hasOwn(t,e)&&(a.R.debug(`Denied attempt to modify a secure key ${e}`,t[e]),delete t[e])}),Object.keys(t).forEach(e=>{e.startsWith("__")&&delete t[e]}),Object.keys(t).forEach(e=>{"string"==typeof t[e]&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],"object"==typeof t[e]&&Et(t[e])}))},"sanitize"),Kt=(0,s.K)(t=>{ct(t),t.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),bt.push(t),St(ft,bt)},"addDirective"),$t=(0,s.K)((t=ft)=>{o=void 0,St(t,bt=[])},"reset"),_t={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."},Ot={},It=(0,s.K)(t=>{Ot[t]||(a.R.warn(_t[t]),Ot[t]=!0)},"issueWarning"),qt=(0,s.K)(t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&It("LAZY_LOAD_DEPRECATED")},"checkConfig"),Dt=(0,s.K)(()=>{let t={};i&&(t=F(t,i));for(const e of bt)t=F(t,e);return t},"getUserDefinedConfig"),Wt=(0,s.K)(t=>(null!=t.flowchart?.htmlLabels&&It("FLOWCHART_HTML_LABELS_DEPRECATED"),mt(t.htmlLabels??t.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels"),Pt=/<\/?br\s*\/?>/gi,zt=new RegExp(Pt.source,"i"),Rt=(0,s.K)(t=>{if(!t)return[""];return Qt(t).replace(/\\n/g,"#br#").split("#br#")},"getRows"),Nt=(()=>{let t=!1;return()=>{t||(jt(),t=!0)}})();function jt(){const t="data-temp-href-target";p.A.addHook("beforeSanitizeAttributes",e=>{"A"===e.tagName&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")}),p.A.addHook("afterSanitizeAttributes",e=>{"A"===e.tagName&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)??""),e.removeAttribute(t),"_blank"===e.getAttribute("target")&&e.setAttribute("rel","noopener"))})}(0,s.K)(jt,"setupDompurifyHooks");var Ht=(0,s.K)(t=>{Nt();return p.A.sanitize(t)},"removeScript"),Gt=(0,s.K)((t,e)=>{if(Wt(e)){const r=e.securityLevel;"antiscript"===r||"strict"===r||"sandbox"===r?t=Ht(t):"loose"!==r&&(t=(t=(t=Qt(t)).replace(/</g,"&lt;").replace(/>/g,"&gt;")).replace(/=/g,"&equals;"),t=Zt(t))}return t},"sanitizeMore"),Xt=(0,s.K)((t,e)=>t?t=e.dompurifyConfig?p.A.sanitize(Gt(t,e),e.dompurifyConfig).toString():p.A.sanitize(Gt(t,e),{FORBID_TAGS:["style"]}).toString():t,"sanitizeText"),Ut=(0,s.K)((t,e)=>"string"==typeof t?Xt(t,e):t.flat().map(t=>Xt(t,e)),"sanitizeTextOrArray"),Yt=(0,s.K)(t=>zt.test(t),"hasBreaks"),Vt=(0,s.K)(t=>t.split(Pt),"splitBreaks"),Zt=(0,s.K)(t=>t.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Qt=(0,s.K)(t=>t.replace(Pt,"#br#"),"breakToPlaceholder"),Jt=(0,s.K)(t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=CSS.escape(e)),e},"getUrl"),te=(0,s.K)(function(...t){const e=t.filter(t=>!isNaN(t));return Math.max(...e)},"getMax"),ee=(0,s.K)(function(...t){const e=t.filter(t=>!isNaN(t));return Math.min(...e)},"getMin"),re=(0,s.K)(function(t){const e=t.split(/(,)/),r=[];for(let t=0;t<e.length;t++){let i=e[t];if(","===i&&t>0&&t+1<e.length){const o=e[t-1],a=e[t+1];oe(o,a)&&(i=o+","+a,t++,r.pop())}r.push(ae(i))}return r.join("")},"parseGenericTypes"),ie=(0,s.K)((t,e)=>Math.max(0,t.split(e).length-1),"countOccurrence"),oe=(0,s.K)((t,e)=>{const r=ie(t,"~"),i=ie(e,"~");return 1===r&&1===i},"shouldCombineSets"),ae=(0,s.K)(t=>{const e=ie(t,"~");let r=!1;if(e<=1)return t;e%2!=0&&t.startsWith("~")&&(t=t.substring(1),r=!0);const i=[...t];let o=i.indexOf("~"),a=i.lastIndexOf("~");for(;-1!==o&&-1!==a&&o!==a;)i[o]="<",i[a]=">",o=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),se=(0,s.K)(()=>void 0!==window.MathMLElement,"isMathMLSupported"),le=/\$\$(.*?)\$\$/g,ne=(0,s.K)(t=>(t.match(le)?.length??0)>0,"hasKatex"),he=(0,s.K)(async(t,e)=>{const r=document.createElement("div");r.innerHTML=await de(t,e),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i?.insertAdjacentElement("beforeend",r);const o={width:r.clientWidth,height:r.clientHeight};return r.remove(),o},"calculateMathMLDimensions"),ce=(0,s.K)(async(t,e)=>{if(!ne(t))return t;if(!(se()||e.legacyMathML||e.forceLegacyMathML))return t.replace(le,"MathML is unsupported in this environment.");{const{default:i}=await r.e(2130).then(r.bind(r,99749)),o=e.forceLegacyMathML||!se()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(Pt).map(t=>ne(t)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${t}</div>`:`<div>${t}</div>`).join("").replace(le,(t,e)=>i.renderToString(e,{throwOnError:!0,displayMode:!0,output:o}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),de=(0,s.K)(async(t,e)=>Xt(await ce(t,e),e),"renderKatexSanitized"),ge={getRows:Rt,sanitizeText:Xt,sanitizeTextOrArray:Ut,hasBreaks:Yt,splitBreaks:Vt,lineBreakRegex:Pt,removeScript:Ht,getUrl:Jt,evaluate:mt,getMax:te,getMin:ee},pe=(0,s.K)(function(t,e){for(let r of e)t.attr(r[0],r[1])},"d3Attrs"),ue=(0,s.K)(function(t,e,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${e}px;`)):(i.set("height",t),i.set("width",e)),i},"calculateSvgSizeAttrs"),ye=(0,s.K)(function(t,e,r,i){const o=ue(e,r,i);pe(t,o)},"configureSvgSize"),Ce=(0,s.K)(function(t,e,r,i){const o=e.node().getBBox(),s=o.width,l=o.height;a.R.info(`SVG bounds: ${s}x${l}`,o);let n=0,h=0;a.R.info(`Graph bounds: ${n}x${h}`,t),n=s+2*r,h=l+2*r,a.R.info(`Calculated bounds: ${n}x${h}`),ye(e,h,n,i);const c=`${o.x-r} ${o.y-r} ${o.width+2*r} ${o.height+2*r}`;e.attr("viewBox",c)},"setupGraphViewbox"),me={};function fe(t){return[...t.cssRules].map(t=>t.cssText).join("\n")}(0,s.K)(fe,"cssStyleSheetToString");var xe=(0,s.K)((t,e,r,i)=>{let o="";return t in me&&me[t]?o=me[t]({...r,svgId:i}):a.R.warn(`No theme found for ${t}`),`& {\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n fill: ${r.textColor}\n }\n @keyframes edge-animation-frame {\n from {\n stroke-dashoffset: 0;\n }\n }\n @keyframes dash {\n to {\n stroke-dashoffset: 0;\n }\n }\n & .edge-animation-slow {\n stroke-dasharray: 9,5 !important;\n stroke-dashoffset: 900;\n animation: dash 50s linear infinite;\n stroke-linecap: round;\n }\n & .edge-animation-fast {\n stroke-dasharray: 9,5 !important;\n stroke-dashoffset: 900;\n animation: dash 20s linear infinite;\n stroke-linecap: round;\n }\n /* Classes common for multiple diagrams */\n\n & .error-icon {\n fill: ${r.errorBkgColor};\n }\n & .error-text {\n fill: ${r.errorTextColor};\n stroke: ${r.errorTextColor};\n }\n\n & .edge-thickness-normal {\n stroke-width: ${r.strokeWidth??1}px;\n }\n & .edge-thickness-thick {\n stroke-width: 3.5px\n }\n & .edge-pattern-solid {\n stroke-dasharray: 0;\n }\n & .edge-thickness-invisible {\n stroke-width: 0;\n fill: none;\n }\n & .edge-pattern-dashed{\n stroke-dasharray: 3;\n }\n .edge-pattern-dotted {\n stroke-dasharray: 2;\n }\n\n & .marker {\n fill: ${r.lineColor};\n stroke: ${r.lineColor};\n }\n & .marker.cross {\n stroke: ${r.lineColor};\n }\n\n & svg {\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n }\n & p {\n margin: 0\n }\n\n ${o}\n .node .neo-node {\n stroke: ${r.nodeBorder};\n }\n\n [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {\n stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};\n }\n [data-look="neo"].swimlane.cluster rect {\n filter: none;\n }\n\n\n [data-look="neo"].node path {\n stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};\n stroke-width: ${r.strokeWidth??1}px;\n }\n\n [data-look="neo"].node .outer-path {\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};\n }\n\n [data-look="neo"].node .neo-line path {\n stroke: ${r.nodeBorder};\n filter: none;\n }\n\n [data-look="neo"].node circle{\n stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};\n }\n\n [data-look="neo"].node circle .state-start{\n fill: #000000;\n }\n\n [data-look="neo"].icon-shape .icon {\n fill: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};\n }\n\n [data-look="neo"].icon-shape .icon-neo path {\n stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};\n }\n\n ${e}\n`},"getStyles"),be=(0,s.K)((t,e)=>{void 0!==e&&(me[t]=e)},"addStylesForDiagram"),ke=xe,Be={};(0,s.V)(Be,{clear:()=>Fe,getAccDescription:()=>Ee,getAccTitle:()=>ve,getDiagramTitle:()=>$e,setAccDescription:()=>Me,setAccTitle:()=>Le,setDiagramTitle:()=>Ke});var Se="",we="",Te="",Ae=(0,s.K)(t=>Xt(t,Mt()),"sanitizeText"),Fe=(0,s.K)(()=>{Se="",Te="",we=""},"clear"),Le=(0,s.K)(t=>{Se=Ae(t).replace(/^\s+/g,"")},"setAccTitle"),ve=(0,s.K)(()=>Se,"getAccTitle"),Me=(0,s.K)(t=>{Te=Ae(t).replace(/\n\s+/g,"\n")},"setAccDescription"),Ee=(0,s.K)(()=>Te,"getAccDescription"),Ke=(0,s.K)(t=>{we=Ae(t)},"setDiagramTitle"),$e=(0,s.K)(()=>we,"getDiagramTitle"),_e=a.R,Oe=a.H,Ie=Mt,qe=vt,De=gt,We=(0,s.K)(t=>Xt(t,Ie()),"sanitizeText"),Pe=Ce,ze=(0,s.K)(()=>Be,"getCommonDb"),Re={},Ne=(0,s.K)((t,e,r)=>{Re[t]&&_e.warn(`Diagram with id ${t} already registered. Overwriting.`),Re[t]=e,r&&w(t,r),be(t,e.styles),e.injectUtils?.(_e,Oe,Ie,We,Pe,ze(),()=>{})},"registerDiagram"),je=(0,s.K)(t=>{if(t in Re)return Re[t];throw new He(t)},"getDiagram"),He=class extends Error{static{(0,s.K)(this,"DiagramNotFoundError")}constructor(t){super(`Diagram ${t} not found.`)}}},31293(t,e,r){r.d(e,{H:()=>l,R:()=>s});var i=r(86827),o=r(74353),a={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},s={trace:(0,i.K)((...t)=>{},"trace"),debug:(0,i.K)((...t)=>{},"debug"),info:(0,i.K)((...t)=>{},"info"),warn:(0,i.K)((...t)=>{},"warn"),error:(0,i.K)((...t)=>{},"error"),fatal:(0,i.K)((...t)=>{},"fatal")},l=(0,i.K)(function(t="fatal"){let e=a.fatal;"string"==typeof t?t.toLowerCase()in a&&(e=a[t]):"number"==typeof t&&(e=t),s.trace=()=>{},s.debug=()=>{},s.info=()=>{},s.warn=()=>{},s.error=()=>{},s.fatal=()=>{},e<=a.fatal&&(s.fatal=console.error?console.error.bind(console,n("FATAL"),"color: orange"):console.log.bind(console,"",n("FATAL"))),e<=a.error&&(s.error=console.error?console.error.bind(console,n("ERROR"),"color: orange"):console.log.bind(console,"",n("ERROR"))),e<=a.warn&&(s.warn=console.warn?console.warn.bind(console,n("WARN"),"color: orange"):console.log.bind(console,"",n("WARN"))),e<=a.info&&(s.info=console.info?console.info.bind(console,n("INFO"),"color: lightblue"):console.log.bind(console,"",n("INFO"))),e<=a.debug&&(s.debug=console.debug?console.debug.bind(console,n("DEBUG"),"color: lightgreen"):console.log.bind(console,"",n("DEBUG"))),e<=a.trace&&(s.trace=console.debug?console.debug.bind(console,n("TRACE"),"color: lightgreen"):console.log.bind(console,"",n("TRACE")))},"setLogLevel"),n=(0,i.K)(t=>`%c${o().format("ss.SSS")} : ${t} : `,"format")},84076(t,e,r){r.d(e,{DA:()=>D,FA:()=>q,I7:()=>I,Zk:()=>m,aP:()=>gr,lC:()=>x,nM:()=>T,nq:()=>dr});var i=r(36155),o=r(57588),a=r(54912),s=r(92941),l=r(51255),n=r(89983),h=r(31293),c=r(86827),d=r(51444),g=r(61057);async function p(t){const e=t.getElementsByTagName("img");if(!e||0===e.length)return;const r=!u(t);await Promise.all([...e].map(t=>new Promise(e=>{function i(){if(t.style.display="flex",t.style.flexDirection="column",r){const e=(0,n.D7)().fontSize?(0,n.D7)().fontSize:window.getComputedStyle(document.body).fontSize,r=5,[i=n.UI.fontSize]=(0,l.I5)(e),o=i*r+"px";t.style.minWidth=o,t.style.maxWidth=o}else t.style.width="100%";e(t)}(0,c.K)(i,"setupImage"),setTimeout(()=>{t.complete&&i()}),t.addEventListener("error",i),t.addEventListener("load",i)})))}function u(t){if(3===t.nodeType)return""!==t.textContent?.trim();if(1!==t.nodeType)return!1;return"img"!==t.tagName.toLowerCase()&&[...t.childNodes].some(u)}(0,c.K)(p,"configureLabelImages"),(0,c.K)(u,"hasTextBesidesImages");var y=(0,c.K)(async(t,e,r)=>{const i=(0,n.D7)(),a=t.insert("g").attr("class",r??"node default").attr("id",e.domId||e.id),s=a.insert("g").attr("class","label").attr("style",(0,l.KL)(e.labelStyle)),h=[{text:"string"==typeof e.label?e.label:e.label?.[0]??"",cssClass:"c4-name"},{text:e.stereotype,cssClass:"c4-type"},...(e.description??[]).map(t=>({text:t,cssClass:"c4-descr"}))].filter(t=>t.text),c=e.width?Math.max(e.width-2*(e.padding??0),32):(0,n.D7)().flowchart?.wrappingWidth??200,g=i.c4?.wrap??!0?c:Number.POSITIVE_INFINITY,p=await Promise.all(h.map(async t=>{const r=s.append("g").attr("class",t.cssClass),a=await(0,o.GZ)(r,(0,n.jZ)((0,l.Sm)(t.text??""),i),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:g,style:e.labelStyle},i);return(0,d.Ltv)(a).selectAll("tspan.text-outer-tspan").attr("text-anchor","middle"),(0,d.Ltv)(a).selectAll("tspan.text-inner-tspan").attr("font-weight",null).attr("font-style",null),{el:r,box:r.node().getBBox()}})),u=Math.max(...p.map(({box:t})=>t.width),0);let y=0;for(const{el:t,box:e}of p)t.attr("transform",`translate(${u/2-e.x-e.width/2}, ${y-e.y})`),y+=e.height+3;const C=p.length>0?y-3:0;s.insert("rect",":first-child"),s.attr("transform",`translate(${-u/2}, ${-C/2})`);return{shapeSvg:a,bbox:s.node().getBBox(),halfPadding:(e.padding??0)/2,label:s}},"c4LabelHelper"),C=(0,c.K)((t,e)=>{const{x:r,y:i,width:o,height:a}=t;return o>=e?t:"left"in t?{x:r,y:i,width:e,height:a,top:i,left:r,bottom:i+a,right:r+e,toJSON:(0,c.K)(()=>({}),"toJSON")}:{x:r-(e-o)/2,y:i,width:e,height:a}},"withMinWidth"),m=(0,c.K)(async(t,e,r)=>{if(void 0!==e.stereotype)return y(t,e,r);let i;const a=e.useHtmlLabels||(0,n._3)((0,n.D7)()?.htmlLabels);i=r||"node default";const s=t.insert("g").attr("class",i).attr("id",e.domId||e.id),h=s.insert("g").attr("class","label").attr("style",(0,l.KL)(e.labelStyle));let c;c=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0];const g=!!e.icon||!!e.img,u="markdown"===e.labelType,m=c&&!e.width?e.minWidth??0:0,f=await(0,o.GZ)(h,(0,n.jZ)((0,l.Sm)(c),(0,n.D7)()),{useHtmlLabels:a,width:e.width||e.wrappingWidth||(0,n.D7)().flowchart?.wrappingWidth,minWidth:m,classes:u?"markdown-node-label":"",style:e.labelStyle,addSvgBackground:g,markdown:u},(0,n.D7)()),x=(e?.padding??0)/2;let b;if(a){const t=f.children[0],e=(0,d.Ltv)(f);await p(t),b=await o.lT.measure(()=>t.getBoundingClientRect()),b=C(b,m),e.attr("width",b.width),e.attr("height",b.height)}else b=await o.lT.measure(()=>f.getBBox()),b=C(b,m);return a?h.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"):h.attr("transform","translate(0, "+-b.height/2+")"),e.centerLabel&&h.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"),h.insert("rect",":first-child"),{shapeSvg:s,bbox:b,halfPadding:x,label:h}},"labelHelper"),f=(0,c.K)(async(t,e,r)=>{const i=r.useHtmlLabels??(0,n.E)((0,n.D7)()),a=t.insert("g").attr("class","label").attr("style",r.labelStyle||""),s=await(0,o.GZ)(a,(0,n.jZ)((0,l.Sm)(e),(0,n.D7)()),{useHtmlLabels:i,width:r.width||(0,n.D7)()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),h=r.padding/2;let c;if((0,n.E)((0,n.D7)())){const t=s.children[0],e=(0,d.Ltv)(s);c=await o.lT.measure(()=>t.getBoundingClientRect()),e.attr("width",c.width),e.attr("height",c.height)}else c=await o.lT.measure(()=>s.getBBox());return i?a.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"):a.attr("transform","translate(0, "+-c.height/2+")"),r.centerLabel&&a.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:t,bbox:c,halfPadding:h,label:a}},"insertLabel"),x=(0,c.K)((t,e,r)=>{if(r)return t.width=r.width,void(t.height=r.height);const i=e.node().getBBox();t.width=i.width,t.height=i.height},"updateNodeBounds"),b=(0,c.K)((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");function k(t){const e=t.map((t,e)=>`${0===e?"M":"L"}${t.x},${t.y}`);return e.push("Z"),e.join(" ")}function B(t,e,r,i,o,a){const s=[],l=r-t,n=i-e,h=l/a,c=2*Math.PI/h,d=e+n/2;for(let e=0;e<=50;e++){const r=t+e/50*l,i=d+o*Math.sin(c*(r-t));s.push({x:r,y:i})}return s}function S(t,e,r,i,o,a){const s=[],l=o*Math.PI/180,n=(a*Math.PI/180-l)/(i-1);for(let o=0;o<i;o++){const i=l+o*n,a=t+r*Math.cos(i),h=e+r*Math.sin(i);s.push({x:-a,y:-h})}return s}function w(t){const e=Array.from(t.childNodes).filter(t=>"path"===t.tagName),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=e.map(t=>t.getAttribute("d")).filter(t=>null!==t).join(" ");r.setAttribute("d",i);const o=e.find(t=>"none"!==t.getAttribute("fill")),a=e.find(t=>"none"!==t.getAttribute("stroke")),s=(0,c.K)((t,e)=>t?.getAttribute(e)??void 0,"getAttr");if(o){const t={fill:s(o,"fill"),"fill-opacity":s(o,"fill-opacity")??"1"};Object.entries(t).forEach(([t,e])=>{e&&r.setAttribute(t,e)})}if(a){const t={stroke:s(a,"stroke"),"stroke-width":s(a,"stroke-width")??"1","stroke-opacity":s(a,"stroke-opacity")??"1"};Object.entries(t).forEach(([t,e])=>{e&&r.setAttribute(t,e)})}const l=document.createElementNS("http://www.w3.org/2000/svg","g");return l.appendChild(r),l}(0,c.K)(k,"createPathFromPoints"),(0,c.K)(B,"generateFullSineWavePoints"),(0,c.K)(S,"generateCirclePoints"),(0,c.K)(w,"mergePaths");var T=(0,c.K)((t,e)=>{var r,i,o=t.x,a=t.y,s=e.x-o,l=e.y-a,n=t.width/2,h=t.height/2;return Math.abs(l)*n>Math.abs(s)*h?(l<0&&(h=-h),r=0===l?0:h*s/l,i=h):(s<0&&(n=-n),r=n,i=0===s?0:n*l/s),{x:o+r,y:a+i}},"intersectRect");function A(t,e){return t.intersect(e)}(0,c.K)(A,"intersectNode");var F=A;function L(t,e,r,i){var o=t.x,a=t.y,s=o-i.x,l=a-i.y,n=Math.sqrt(e*e*l*l+r*r*s*s),h=Math.abs(e*r*s/n);i.x<o&&(h=-h);var c=Math.abs(e*r*l/n);return i.y<a&&(c=-c),{x:o+h,y:a+c}}(0,c.K)(L,"intersectEllipse");var v=L;function M(t,e,r){return v(t,e,e,r)}(0,c.K)(M,"intersectCircle");var E=M;function K(t,e,r,i){{const o=e.y-t.y,a=t.x-e.x,s=e.x*t.y-t.x*e.y,l=o*r.x+a*r.y+s,n=o*i.x+a*i.y+s,h=1e-6;if(0!==l&&0!==n&&$(l,n))return;const c=i.y-r.y,d=r.x-i.x,g=i.x*r.y-r.x*i.y,p=c*t.x+d*t.y+g,u=c*e.x+d*e.y+g;if(Math.abs(p)<h&&Math.abs(u)<h&&$(p,u))return;const y=o*d-c*a;if(0===y)return;return{x:(a*g-d*s)/y,y:(c*s-o*g)/y}}}function $(t,e){return t*e>0}(0,c.K)(K,"intersectLine"),(0,c.K)($,"sameSign");var _=K;function O(t,e,r){let i=t.x,o=t.y,a=[],s=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach(function(t){s=Math.min(s,t.x),l=Math.min(l,t.y)}):(s=Math.min(s,e.x),l=Math.min(l,e.y));let n=i-t.width/2-s,h=o-t.height/2-l;for(let i=0;i<e.length;i++){let o=e[i],s=e[i<e.length-1?i+1:0],l=_(t,r,{x:n+o.x,y:h+o.y},{x:n+s.x,y:h+s.y});l&&a.push(l)}return a.length?(a.length>1&&a.sort(function(t,e){let i=t.x-r.x,o=t.y-r.y,a=Math.sqrt(i*i+o*o),s=e.x-r.x,l=e.y-r.y,n=Math.sqrt(s*s+l*l);return a<n?-1:a===n?0:1}),a[0]):t}(0,c.K)(O,"intersectPolygon");var I={node:F,circle:E,ellipse:v,polygon:O,rect:T},q=(0,c.K)((t,e,r,i,o)=>["M",t+o,e,"H",t+r-o,"A",o,o,0,0,1,t+r,e+o,"V",e+i-o,"A",o,o,0,0,1,t+r-o,e+i,"H",t+o,"A",o,o,0,0,1,t,e+i-o,"V",e+o,"A",o,o,0,0,1,t+o,e,"Z"].join(" "),"createRoundedRectPathD"),D=(0,c.K)(async(t,e,r,i=!1,a=!1)=>{let s=e||"";"object"==typeof s&&(s=s[0]);const l=(0,n.D7)(),h=(0,n.E)(l);return await(0,o.GZ)(t,s,{style:r,isTitle:i,useHtmlLabels:h,markdown:!1,isNode:a,width:Number.POSITIVE_INFINITY},l)},"createLabel");function W(t,e){const{labelStyles:r}=(0,i.GX)(e);e.labelStyle=r;const o=b(e);let a=o;o||(a="anchor");const s=t.insert("g").attr("class",a).attr("id",e.domId||e.id),{cssStyles:n}=e,c=g.A.svg(s),d=(0,i.Fr)(e,{fill:"black",stroke:"none",fillStyle:"solid"});"handDrawn"!==e.look&&(d.roughness=0);const p=c.circle(0,0,2,d),u=s.insert(()=>p,":first-child");return u.attr("class","anchor").attr("style",(0,l.KL)(n)),x(e,u),e.intersect=function(t){return h.R.info("Circle intersect",e,1,t),I.circle(e,1,t)},s}function P(t,e,r,i,o,a,s){const l=(t+r)/2,n=(e+i)/2,h=Math.atan2(i-e,r-t),c=(r-t)/2/o,d=(i-e)/2/a,g=Math.sqrt(c**2+d**2);if(g>1)throw new Error("The given radii are too small to create an arc between the points.");const p=Math.sqrt(1-g**2),u=l+p*a*Math.sin(h)*(s?-1:1),y=n-p*o*Math.cos(h)*(s?-1:1),C=Math.atan2((e-y)/a,(t-u)/o);let m=Math.atan2((i-y)/a,(r-u)/o)-C;s&&m<0&&(m+=2*Math.PI),!s&&m>0&&(m-=2*Math.PI);const f=[];for(let t=0;t<20;t++){const e=C+t/19*m,r=u+o*Math.cos(e),i=y+a*Math.sin(e);f.push({x:r,y:i})}return f}function z(t,e,r){const[i,o]=[e,r].sort((t,e)=>e-t);return o*(1-Math.sqrt(1-(t/i/2)**2))}async function R(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const a=e.padding??0,s="neo"===e.look?16:a,l="neo"===e.look?12:a,n=(0,c.K)(t=>t+l,"calcTotalHeight"),h=(0,c.K)(t=>{const e=t/2;return[e/(2.5+t/50),e]},"calcEllipseRadius"),{shapeSvg:d,bbox:p}=await m(t,e,b(e)),u=n(e?.height?e?.height:p.height),[y,C]=h(u),f=z(u,y,C),B=(e?.width?e?.width:p.width)+2*s+f-f,S=u,{cssStyles:w}=e,T=[{x:B/2,y:-S/2},{x:-B/2,y:-S/2},...P(-B/2,-S/2,-B/2,S/2,y,C,!1),{x:B/2,y:S/2},...P(B/2,S/2,B/2,-S/2,y,C,!0)],A=g.A.svg(d),F=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(F.roughness=0,F.fillStyle="solid");const L=k(T),v=A.path(L,F),M=d.insert(()=>v,":first-child");return M.attr("class","basic label-container outer-path"),w&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",w),o&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",o),M.attr("transform",`translate(${y/2}, 0)`),x(e,M),e.intersect=function(t){return I.polygon(e,T,t)},d}async function N(t,e,{config:{themeVariables:r}}){const{labelStyles:o,nodeStyles:a}=(0,i.GX)(e);e.labelStyle=o;const{shapeSvg:s,bbox:l,label:n}=await m(t,e,b(e)),h=r?.nodeBorder??r?.lineColor??"currentColor",d=e.padding??12,p=Math.max(l.width+2*d,e.width??0,80),u=Math.max(Math.min(.08*p,12),5),y=Math.max(l.height+2*d+u,e.height??0),C=-y/2+u,f=y/2,k=.72*p,B=[`M${-p/2},${C}`,`L${-k/2},${f}`,`A${k/2},${u} 0 0 0 ${k/2},${f}`,`L${p/2},${C}`,`A${p/2},${u} 0 0 0 ${-p/2},${C}`,"Z"].join(" "),{cssStyles:S}=e,w=s.insert("g",":first-child").attr("class","basic label-container");if("handDrawn"===e.look){const t=g.A.svg(s).path(B,(0,i.Fr)(e,{}));w.node()?.appendChild(t),S&&w.attr("style",S)}else w.append("path").attr("d",B).attr("style",a);w.append("ellipse").attr("cx",0).attr("cy",C).attr("rx",p/2).attr("ry",u).attr("style",`fill:none;stroke:${h};stroke-width:1px`),x(e,w);const T=C+(f-C)/2;n.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))}, ${T-l.height/2-(l.y-(l.top??0))})`);const A=(0,c.K)((t,e,r)=>Array.from({length:13},(i,o)=>{const a=Math.PI-o*Math.PI/12;return{x:t*Math.cos(a),y:e+r*u*Math.sin(a)}}),"arc"),F=[...A(p/2,C,-1),...A(k/2,f,1).reverse()];return e.intersect=function(t){return I.polygon(e,F,t)},s}(0,c.K)(W,"anchor"),(0,c.K)(P,"generateArcPoints"),(0,c.K)(z,"calculateArcSagitta"),(0,c.K)(R,"bowTieRect"),(0,c.K)(N,"bucket");function j(t){const{themeVariables:e}=(0,n.D7)(),r=e.clusterBkg,i=e.clusterBorder;return"flow"===t?{rx:10,fill:"none",stroke:e.flowContainerStroke||e.secondaryBorderColor,strokeWidth:.75,cssClass:"flow-collapsed"}:{rx:8,fill:r,stroke:i,cssClass:"collapsed-group"}}async function H(t,e){const r=j(e.metadata?.containerType),{fill:o,stroke:a}=r,{nodeStyles:h}=(0,i.GX)(e),{shapeSvg:c,bbox:d}=await m(t,e,b(e)),{theme:p,themeVariables:u}=(0,n.D7)();(0,s.XE)(c,e.colorIndex,p,u.borderColorArray);const y=e.padding??8,C=d.height,f=Math.max(d.width+2*y,80,e?.width??0),k=Math.max(C+8+20+2*y,e?.height??0),B=-f/2,S=-k/2,w=c.select(".label");if(w){e.useHtmlLabels??(0,n.E)((0,n.D7)())?w.attr("transform",`translate(${-d.width/2}, ${-d.height/2-14})`):w.attr("transform",`translate(0, ${-d.height/2-14})`)}let T;if("handDrawn"===e.look){const t=g.A.svg(c),s=(0,i.Fr)(e,{fill:o,stroke:a,...void 0===r.strokeWidth?{}:{strokeWidth:r.strokeWidth},..."none"===o?{fillWeight:0}:{fillStyle:"solid"}}),n=t.path(q(B,S,f,k,r.rx),s);T=c.insert(()=>n,":first-child"),T.attr("class","basic label-container "+r.cssClass).attr("style",(0,l.KL)(e.cssStyles))}else T=c.insert("rect",":first-child"),T.attr("class","basic label-container "+r.cssClass).attr("style",h).attr("rx",r.rx).attr("ry",r.rx).attr("x",B).attr("y",S).attr("width",f).attr("height",k).attr("fill",o).attr("stroke",a),void 0!==r.strokeWidth&&T.attr("stroke-width",r.strokeWidth+"px");const A=S+y+C+8;c.append("line").attr("class","collapsed-separator").attr("x1",B+8).attr("y1",A).attr("x2",B+f-8).attr("y2",A).attr("stroke",a).attr("stroke-dasharray","3, 3");const F=A+10;for(let t=-1;t<=1;t++)c.append("circle").attr("class","collapsed-indicator").attr("cx",10*t).attr("cy",F).attr("r",2.5).attr("fill",a);return x(e,T),e.calcIntersect=function(t,e){return I.rect(t,e)},e.intersect=function(t){return I.rect(e,t)},c}function G(t,e,r,i){return t.insert("polygon",":first-child").attr("points",i.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}(0,c.K)(j,"getCollapsedStyle"),(0,c.K)(H,"collapsedGroup"),(0,c.K)(G,"insertPolygonShape");var X=["right","left","up","down"],U="point",Y=(0,c.K)(t=>{const e=new Set;for(const r of t)switch(r){case"x":e.add("right"),e.add("left");break;case"y":e.add("up"),e.add("down");break;default:e.add(r)}return e},"expandAndDeduplicateDirections"),V=(0,c.K)(t=>X.filter(e=>t.has(e)).join("|")||U,"getDirectionKey"),Z={"right|left|up|down":(0,c.K)(({height:t,midpoint:e,padding:r,width:i})=>[{x:0,y:0},{x:e,y:0},{x:i/2,y:2*r},{x:i-e,y:0},{x:i,y:0},{x:i,y:-t/3},{x:i+2*r,y:-t/2},{x:i,y:-2*t/3},{x:i,y:-t},{x:i-e,y:-t},{x:i/2,y:-t-2*r},{x:e,y:-t},{x:0,y:-t},{x:0,y:-2*t/3},{x:-2*r,y:-t/2},{x:0,y:-t/3}],"right|left|up|down"),"right|left|up":(0,c.K)(({height:t,midpoint:e,width:r})=>[{x:e,y:0},{x:r-e,y:0},{x:r,y:-t/2},{x:r-e,y:-t},{x:e,y:-t},{x:0,y:-t/2}],"right|left|up"),"right|left|down":(0,c.K)(({height:t,midpoint:e,width:r})=>[{x:0,y:0},{x:e,y:-t},{x:r-e,y:-t},{x:r,y:0}],"right|left|down"),"right|up|down":(0,c.K)(({height:t,midpoint:e,width:r})=>[{x:0,y:0},{x:r,y:-e},{x:r,y:-t+e},{x:0,y:-t}],"right|up|down"),"left|up|down":(0,c.K)(({height:t,midpoint:e,width:r})=>[{x:r,y:0},{x:0,y:-e},{x:0,y:-t+e},{x:r,y:-t}],"left|up|down"),"right|left":(0,c.K)(({height:t,midpoint:e,padding:r,width:i})=>[{x:e,y:0},{x:e,y:-r},{x:i-e,y:-r},{x:i-e,y:0},{x:i,y:-t/2},{x:i-e,y:-t},{x:i-e,y:-t+r},{x:e,y:-t+r},{x:e,y:-t},{x:0,y:-t/2}],"right|left"),"up|down":(0,c.K)(({height:t,midpoint:e,padding:r,width:i})=>[{x:i/2,y:0},{x:0,y:-r},{x:e,y:-r},{x:e,y:-t+r},{x:0,y:-t+r},{x:i/2,y:-t},{x:i,y:-t+r},{x:i-e,y:-t+r},{x:i-e,y:-r},{x:i,y:-r}],"up|down"),"right|up":(0,c.K)(({height:t,midpoint:e,width:r})=>[{x:0,y:0},{x:r,y:-e},{x:0,y:-t}],"right|up"),"right|down":(0,c.K)(({height:t,width:e})=>[{x:0,y:0},{x:e,y:0},{x:0,y:-t}],"right|down"),"left|up":(0,c.K)(({height:t,midpoint:e,width:r})=>[{x:r,y:0},{x:0,y:-e},{x:r,y:-t}],"left|up"),"left|down":(0,c.K)(({height:t,width:e})=>[{x:e,y:0},{x:0,y:0},{x:e,y:-t}],"left|down"),right:(0,c.K)(({height:t,midpoint:e,padding:r,width:i})=>[{x:e,y:-r},{x:e,y:-r},{x:i-e,y:-r},{x:i-e,y:0},{x:i,y:-t/2},{x:i-e,y:-t},{x:i-e,y:-t+r},{x:e,y:-t+r},{x:e,y:-t+r}],"right"),left:(0,c.K)(({height:t,midpoint:e,padding:r,width:i})=>[{x:e,y:0},{x:e,y:-r},{x:i-e,y:-r},{x:i-e,y:-t+r},{x:e,y:-t+r},{x:e,y:-t},{x:0,y:-t/2}],"left"),up:(0,c.K)(({height:t,midpoint:e,padding:r,width:i})=>[{x:e,y:-r},{x:e,y:-t+r},{x:0,y:-t+r},{x:i/2,y:-t},{x:i,y:-t+r},{x:i-e,y:-t+r},{x:i-e,y:-r}],"up"),down:(0,c.K)(({height:t,midpoint:e,padding:r,width:i})=>[{x:i/2,y:0},{x:0,y:-r},{x:e,y:-r},{x:e,y:-t+r},{x:i-e,y:-t+r},{x:i-e,y:-r},{x:i,y:-r}],"down"),[U]:()=>[{x:0,y:0}]},Q=(0,c.K)((t,e,r,i)=>{const o=Y(t),a=(r.padding??0)/2,s=e.height+4*a,l=s/2,n=i??e.width+2*l+2*a,h=V(o);return(Z[h]??Z[U])({height:s,midpoint:l,padding:a,width:n})},"getArrowPoints");async function J(t,e){const r=e,{shapeSvg:i,bbox:o}=await m(t,r,b(r)),a=r.padding??0,s=o.height+2*a,l=s/2,n=o.width+2*l+a,h=r.width??0,c=r.positioned&&(r.widthInColumns??1)>1&&h>n?h:n,d=Q(r.directions??[],o,r,c),g=G(i,c,s,d);return g.attr("style",r.style??null),x(r,g),r.intersect=function(t){return I.polygon(r,d,t)},i}async function tt(t,e,{config:{themeVariables:r}}){const{labelStyles:o,nodeStyles:a}=(0,i.GX)(e);e.labelStyle=o;const{shapeSvg:s,bbox:l,label:n}=await m(t,e,b(e)),h=r?.nodeBorder??r?.lineColor??"currentColor",c=e.padding??12,d=18,p=Math.max(l.width+2*c,e.width??0,90),u=Math.max(l.height+2*c+d,e.height??0),y=-u/2,{cssStyles:C}=e,f=s.insert("g",":first-child").attr("class","basic label-container");if("handDrawn"===e.look){const t=g.A.svg(s).path(q(-p/2,y,p,u,12),(0,i.Fr)(e,{}));f.node()?.appendChild(t),C&&f.attr("style",C)}else f.append("rect").attr("x",-p/2).attr("y",y).attr("width",p).attr("height",u).attr("rx",12).attr("ry",12).attr("style",a);f.append("line").attr("x1",-p/2).attr("y1",y+d).attr("x2",p/2).attr("y2",y+d).attr("style",`stroke:${h};stroke-width:1px`);for(let t=0;t<3;t++)f.append("circle").attr("cx",-p/2+12+9*t).attr("cy",y+9).attr("r",2.5).attr("style",`fill:${h};stroke:none`);f.append("rect").attr("class","browser-address-bar").attr("x",-p/2+44).attr("y",y+4).attr("width",Math.max(p-56,10)).attr("height",10).attr("rx",3).attr("ry",3).attr("style",`fill:none;stroke:${h};stroke-width:1px;opacity:0.6`),x(e,f);const k=y+d+(u-d)/2;return n.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))}, ${k-l.height/2-(l.y-(l.top??0))})`),e.intersect=function(t){return I.rect(e,t)},s}(0,c.K)(J,"block_arrow"),(0,c.K)(tt,"browser");async function et(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const a=e.padding??0,s="neo"===e.look?28:a,l="neo"===e.look?24:a,{shapeSvg:n,bbox:h}=await m(t,e,b(e)),c=(e?.width??h.width)+("neo"===e.look?2*s:s+12),d=(e?.height??h.height)+("neo"===e.look?2*l:l),p=-d,u=[{x:12,y:p},{x:c,y:p},{x:c,y:0},{x:0,y:0},{x:0,y:p+12},{x:12,y:p}];let y;const{cssStyles:C}=e;if("handDrawn"===e.look){const t=g.A.svg(n),r=(0,i.Fr)(e,{}),o=k(u),a=t.path(o,r);y=n.insert(()=>a,":first-child").attr("transform",`translate(${-c/2}, ${d/2})`),C&&y.attr("style",C)}else y=G(n,c,d,u);return o&&y.attr("style",o),x(e,y),e.intersect=function(t){return I.polygon(e,u,t)},n}function rt(t,e){const{nodeStyles:r}=(0,i.GX)(e);e.label="";const o=t.insert("g").attr("class",b(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,s=Math.max(28,e.width??0),l=[{x:0,y:s/2},{x:s/2,y:0},{x:0,y:-s/2},{x:-s/2,y:0}],n=g.A.svg(o),h=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(h.roughness=0,h.fillStyle="solid");const c=k(l),d=n.path(c,h),p=o.insert(()=>d,":first-child");return a&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",a),r&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",r),e.width=28,e.height=28,e.intersect=function(t){return I.polygon(e,l,t)},o}async function it(t,e,r){const{labelStyles:o,nodeStyles:a}=(0,i.GX)(e);e.labelStyle=o;const{shapeSvg:s,bbox:n,halfPadding:c}=await m(t,e,b(e)),d=r?.padding??c,p=Math.sqrt(n.width**2+n.height**2)/2,u="neo"===e.look?p+32:p+d;let y;const{cssStyles:C}=e;if("handDrawn"===e.look){const t=g.A.svg(s),r=(0,i.Fr)(e,{}),o=t.circle(0,0,2*u,r);y=s.insert(()=>o,":first-child"),y.attr("class","basic label-container").attr("style",(0,l.KL)(C))}else y=s.insert("circle",":first-child").attr("class","basic label-container").attr("style",a).attr("r",u).attr("cx",0).attr("cy",0);return x(e,y),e.calcIntersect=function(t,e){const r=t.width/2;return I.circle(t,r,e)},e.intersect=function(t){return h.R.info("Circle intersect",e,u,t),I.circle(e,u,t)},s}async function ot(t,e){const r=e,i=["node",r.cssClasses,r.class].filter(Boolean).join(" "),{shapeSvg:o,bbox:a,halfPadding:s}=await m(t,r,i),l=o.insert("rect",":first-child"),n=r.padding??0,h=r.positioned?r.width??0:a.width+n,c=r.positioned?r.height??0:a.height+n,d=r.positioned?-h/2:-a.width/2-s,g=r.positioned?-c/2:-a.height/2-s;return l.attr("class","basic cluster composite label-container").attr("style",r.style??null).attr("rx",r.rx??null).attr("ry",r.ry??null).attr("x",d).attr("y",g).attr("width",h).attr("height",c),x(r,l),r.intersect=function(t){return I.rect(r,t)},o}async function at(t,e,{config:{themeVariables:r}}){const{labelStyles:o,nodeStyles:a}=(0,i.GX)(e);e.labelStyle=o;const{shapeSvg:s,bbox:l,label:n}=await m(t,e,b(e)),h=r?.nodeBorder??r?.lineColor??"currentColor",c=e.padding??12,d=Math.max(l.width+2*c,e.width??0,90),p=Math.max(l.height+2*c+20,e.height??0),u=-p/2,{cssStyles:y}=e,C=s.insert("g",":first-child").attr("class","basic label-container");if("handDrawn"===e.look){const t=g.A.svg(s).path(q(-d/2,u,d,p,12),(0,i.Fr)(e,{}));C.node()?.appendChild(t),y&&C.attr("style",y)}else C.append("rect").attr("x",-d/2).attr("y",u).attr("width",d).attr("height",p).attr("rx",12).attr("ry",12).attr("style",a);C.append("text").attr("x",-d/2+12).attr("y",u+16).attr("class","console-glyph").attr("style",`font-family:monospace;font-weight:bold;font-size:14px;fill:${h}`).text(">_"),x(e,C);const f=u+20+(p-20)/2;return n.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))}, ${f-l.height/2-(l.y-(l.top??0))})`),e.intersect=function(t){return I.rect(e,t)},s}function st(t){const e=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=2*t;return`M ${-i/2*e},${i/2*r} L ${i/2*e},${-i/2*r}\n M ${i/2*e},${i/2*r} L ${-i/2*e},${-i/2*r}`}function lt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r,e.label="";const a=t.insert("g").attr("class",b(e)).attr("id",e.domId??e.id),s=Math.max(30,e?.width??0),{cssStyles:l}=e,n=g.A.svg(a),c=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(c.roughness=0,c.fillStyle="solid");const d=n.circle(0,0,2*s,c),p=st(s),u=n.path(p,c),y=a.insert(()=>d,":first-child");return y.insert(()=>u),y.attr("class","outer-path"),l&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",l),o&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",o),x(e,y),e.intersect=function(t){h.R.info("crossedCircle intersect",e,{radius:s,point:t});return I.circle(e,s,t)},a}function nt(t,e,r,i=100,o=0,a=180){const s=[],l=o*Math.PI/180,n=(a*Math.PI/180-l)/(i-1);for(let o=0;o<i;o++){const i=l+o*n,a=t+r*Math.cos(i),h=e+r*Math.sin(i);s.push({x:-a,y:-h})}return s}async function ht(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s,label:l}=await m(t,e,b(e)),n="neo"===e.look?18:e.padding??0,h="neo"===e.look?12:e.padding??0,c=s.width+n,d=s.height+h,p=Math.max(5,.1*d),{cssStyles:u}=e,y=[...nt(c/2,-d/2,p,30,-90,0),{x:-c/2-p,y:p},...nt(c/2+2*p,-p,p,20,-180,-270),...nt(c/2+2*p,p,p,20,-90,-180),{x:-c/2-p,y:-d/2},...nt(c/2,d/2,p,20,0,90)],C=[{x:c/2,y:-d/2-p},{x:-c/2,y:-d/2-p},...nt(c/2,-d/2,p,20,-90,0),{x:-c/2-p,y:-p},...nt(c/2+.1*c,-p,p,20,-180,-270),...nt(c/2+.1*c,p,p,20,-90,-180),{x:-c/2-p,y:d/2},...nt(c/2,d/2,p,20,0,90),{x:-c/2,y:d/2+p},{x:c/2,y:d/2+p}],f=g.A.svg(a),B=(0,i.Fr)(e,{fill:"none"});"handDrawn"!==e.look&&(B.roughness=0,B.fillStyle="solid");const S=k(y).replace("Z",""),w=f.path(S,B),T=k(C),A=f.path(T,{...B}),F=a.insert("g",":first-child");return F.insert(()=>A,":first-child").attr("stroke-opacity",0),F.insert(()=>w,":first-child"),F.attr("class","text"),u&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",u),o&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",o),F.attr("transform",`translate(${p}, 0)`),l.attr("transform",`translate(${-c/2+p-(s.x-(s.left??0))},${-d/2+(e.padding??0)/2-(s.y-(s.top??0))})`),x(e,F),e.intersect=function(t){return I.polygon(e,C,t)},a}function ct(t,e,r,i=100,o=0,a=180){const s=[],l=o*Math.PI/180,n=(a*Math.PI/180-l)/(i-1);for(let o=0;o<i;o++){const i=l+o*n,a=t+r*Math.cos(i),h=e+r*Math.sin(i);s.push({x:a,y:h})}return s}async function dt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s,label:l}=await m(t,e,b(e)),n="neo"===e.look?18:e.padding??0,h="neo"===e.look?12:e.padding??0,c=s.width+("neo"===e.look?2*n:n),d=s.height+("neo"===e.look?2*h:h),p=Math.max(5,.1*d),{cssStyles:u}=e,y=[...ct(c/2,-d/2,p,20,-90,0),{x:c/2+p,y:-p},...ct(c/2+2*p,-p,p,20,-180,-270),...ct(c/2+2*p,p,p,20,-90,-180),{x:c/2+p,y:d/2},...ct(c/2,d/2,p,20,0,90)],C=[{x:-c/2,y:-d/2-p},{x:c/2,y:-d/2-p},...ct(c/2,-d/2,p,20,-90,0),{x:c/2+p,y:-p},...ct(c/2+2*p,-p,p,20,-180,-270),...ct(c/2+2*p,p,p,20,-90,-180),{x:c/2+p,y:d/2},...ct(c/2,d/2,p,20,0,90),{x:c/2,y:d/2+p},{x:-c/2,y:d/2+p}],f=g.A.svg(a),B=(0,i.Fr)(e,{fill:"none"});"handDrawn"!==e.look&&(B.roughness=0,B.fillStyle="solid");const S=k(y).replace("Z",""),w=f.path(S,B),T=k(C),A=f.path(T,{...B}),F=a.insert("g",":first-child");return F.insert(()=>A,":first-child").attr("stroke-opacity",0),F.insert(()=>w,":first-child"),F.attr("class","text"),u&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",u),o&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",o),F.attr("transform",`translate(${-p}, 0)`),l.attr("transform",`translate(${-c/2+(e.padding??0)/2-(s.x-(s.left??0))},${-d/2+(e.padding??0)/2-(s.y-(s.top??0))})`),x(e,F),e.intersect=function(t){return I.polygon(e,C,t)},a}function gt(t,e,r,i=100,o=0,a=180){const s=[],l=o*Math.PI/180,n=(a*Math.PI/180-l)/(i-1);for(let o=0;o<i;o++){const i=l+o*n,a=t+r*Math.cos(i),h=e+r*Math.sin(i);s.push({x:-a,y:-h})}return s}async function pt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s,label:l}=await m(t,e,b(e)),n="neo"===e.look?18:e.padding??0,h="neo"===e.look?12:e.padding??0,c=s.width+("neo"===e.look?2*n:n),d=s.height+("neo"===e.look?2*h:h),p=Math.max(5,.1*d),{cssStyles:u}=e,y=[...gt(c/2,-d/2,p,30,-90,0),{x:-c/2-p,y:p},...gt(c/2+2*p,-p,p,20,-180,-270),...gt(c/2+2*p,p,p,20,-90,-180),{x:-c/2-p,y:-d/2},...gt(c/2,d/2,p,20,0,90)],C=[...gt(-c/2+p+p/2,-d/2,p,20,-90,-180),{x:c/2-p/2,y:p},...gt(-c/2-p/2,-p,p,20,0,90),...gt(-c/2-p/2,p,p,20,-90,0),{x:c/2-p/2,y:-p},...gt(-c/2+p+p/2,d/2,p,30,-180,-270)],f=[{x:c/2,y:-d/2-p},{x:-c/2,y:-d/2-p},...gt(c/2,-d/2,p,20,-90,0),{x:-c/2-p,y:-p},...gt(c/2+2*p,-p,p,20,-180,-270),...gt(c/2+2*p,p,p,20,-90,-180),{x:-c/2-p,y:d/2},...gt(c/2,d/2,p,20,0,90),{x:-c/2,y:d/2+p},{x:c/2-p-p/2,y:d/2+p},...gt(-c/2+p+p/2,-d/2,p,20,-90,-180),{x:c/2-p/2,y:p},...gt(-c/2-p/2,-p,p,20,0,90),...gt(-c/2-p/2,p,p,20,-90,0),{x:c/2-p/2,y:-p},...gt(-c/2+p+p/2,d/2,p,30,-180,-270)],B=g.A.svg(a),S=(0,i.Fr)(e,{fill:"none"});"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");const w=k(y).replace("Z",""),T=B.path(w,S),A=k(C).replace("Z",""),F=B.path(A,S),L=k(f),v=B.path(L,{...S}),M=a.insert("g",":first-child");return M.insert(()=>v,":first-child").attr("stroke-opacity",0),M.insert(()=>T,":first-child"),M.insert(()=>F,":first-child"),M.attr("class","text"),u&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",u),o&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",o),M.attr("transform",`translate(${p-p/4}, 0)`),l.attr("transform",`translate(${-c/2+(e.padding??0)/2-(s.x-(s.left??0))},${-d/2+(e.padding??0)/2-(s.y-(s.top??0))})`),x(e,M),e.intersect=function(t){return I.polygon(e,f,t)},a}async function ut(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const a=e.padding??0,s="neo"===e.look?16:a,l="neo"===e.look?12:a,{shapeSvg:n,bbox:h}=await m(t,e,b(e)),c=Math.max(5,h.height+2*l,e?.height??0),d=c/2,p=d-Math.sqrt(Math.max(0,d**2-(h.height/2)**2)),u=Math.max(c/4,p),y=Math.max(20,h.width+2*s+2*u,1.25*(h.width+2*s),e?.width??0),{cssStyles:C}=e,f=g.A.svg(n),B=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(B.roughness=0,B.fillStyle="solid");const w=y-d,T=c/4,A=[{x:w,y:0},{x:T,y:0},{x:0,y:c/2},{x:T,y:c},{x:w,y:c},...S(-w,-c/2,d,50,270,90)],F=k(A),L=f.path(F,B),v=n.insert(()=>L,":first-child");return v.attr("class","basic label-container outer-path"),C&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",C),o&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",o),v.attr("transform",`translate(${-y/2}, ${-c/2})`),x(e,v),e.intersect=function(t){return I.polygon(e,A,t)},n}async function yt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s,label:l}=await m(t,e,b(e)),n=e.padding??20,h=Math.max(s.width+2*n,e.width??0,100),c=Math.min(Math.max(.23*h,16),56),d=.27*c,p=Math.max(s.height+2*n,e.height?e.height-(2*c-d):0),u=Math.min(.177*h,.45*p),y=p+2*c-d,C=-y/2,f=C+2*c-d,k=a.insert("g",":first-child").attr("class","basic label-container"),{cssStyles:B}=e;if("handDrawn"===e.look){const t=g.A.svg(a),r=(0,i.Fr)(e,{}),o=t.path(q(-h/2,f,h,p,u),r),s=t.circle(0,C+c,2*c,r);k.insert(()=>s,":first-child"),k.insert(()=>o,":first-child"),B&&k.attr("style",B)}else k.append("rect").attr("x",-h/2).attr("y",f).attr("width",h).attr("height",p).attr("rx",u).attr("ry",u).attr("style",o),k.append("circle").attr("cx",0).attr("cy",C+c).attr("r",c).attr("style",o);x(e,k);const w=f+p/2;l.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${w-s.height/2-(s.y-(s.top??0))})`);const T=C+c,A=180*Math.asin(Math.min(1,(f-T)/c))/Math.PI,F=[...S(0,-T,c,24,180+A,-A),...S(-(-h/2+u),-(f+u),u,12,90,0),...S(-(-h/2+u),-(y/2-u),u,12,360,270),...S(-(h/2-u),-(y/2-u),u,12,270,180),...S(-(h/2-u),-(f+u),u,12,180,90)];return e.intersect=function(t){return I.polygon(e,F,t)},a}(0,c.K)(et,"card"),(0,c.K)(rt,"choice"),(0,c.K)(it,"circle"),(0,c.K)(ot,"composite"),(0,c.K)(at,"consoleWindow"),(0,c.K)(st,"createLine"),(0,c.K)(lt,"crossedCircle"),(0,c.K)(nt,"generateCirclePoints"),(0,c.K)(ht,"curlyBraceLeft"),(0,c.K)(ct,"generateCirclePoints"),(0,c.K)(dt,"curlyBraceRight"),(0,c.K)(gt,"generateCirclePoints"),(0,c.K)(pt,"curlyBraces"),(0,c.K)(ut,"curvedTrapezoid"),(0,c.K)(yt,"person");var Ct=(0,c.K)((t,e,r,i,o,a)=>[`M${t},${e+a}`,`a${o},${a} 0,0,0 ${r},0`,`a${o},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${a} 0,0,0 ${r},0`,"l0,"+-i].join(" "),"createCylinderPathD"),mt=(0,c.K)((t,e,r,i,o,a)=>[`M${t},${e+a}`,`M${t+r},${e+a}`,`a${o},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${a} 0,0,0 ${r},0`,"l0,"+-i].join(" "),"createOuterCylinderPathD"),ft=(0,c.K)((t,e,r,i,o,a)=>[`M${t-r/2},${-i/2}`,`a${o},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function xt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const a=e.padding??0,s="neo"===e.look?24:a,n="neo"===e.look?24:a,h=e.width??0;if(e.width&&(e.width=e.width-n,e.width<8&&(e.width=8)),e.height){const t=h/2/(2.5+h/50);e.height=e.height-s-3*t,e.height<8&&(e.height=8)}const{shapeSvg:c,bbox:d,label:p}=await m(t,e,b(e)),u=Math.max(e.width??0,d.width)+n,y=u/2,C=y/(2.5+u/50),f=Math.max(e.height??0,d.height)+s+C;let k;const{cssStyles:B}=e;if("handDrawn"===e.look){const t=g.A.svg(c),r=mt(0,0,u,f,y,C),o=ft(0,C,u,f,y,C),a=(0,i.Fr)(e,{}),s=t.path(r,a),l=t.path(o,(0,i.Fr)(e,{fill:"none"}));k=c.insert(()=>l,":first-child"),k=c.insert(()=>s,":first-child"),k.attr("class","basic label-container"),B&&k.attr("style",B)}else{const t=Ct(0,0,u,f,y,C);k=c.insert("path",":first-child").attr("d",t).attr("class","basic label-container outer-path").attr("style",(0,l.KL)(B)).attr("style",o)}return k.attr("label-offset-y",C),k.attr("transform",`translate(${-u/2}, ${-(f/2+C)})`),x(e,k),p.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))}, ${-d.height/2+(e.padding??0)/1.5-(d.y-(d.top??0))})`),e.intersect=function(t){const r=I.rect(e,t),i=r.x-(e.x??0);if(0!=y&&(Math.abs(i)<(e.width??0)/2||Math.abs(i)==(e.width??0)/2&&Math.abs(r.y-(e.y??0))>(e.height??0)/2-C)){let o=C*C*(1-i*i/(y*y));o>0&&(o=Math.sqrt(o)),o=C-o,t.y-(e.y??0)>0&&(o=-o),r.y+=o}return r},c}async function bt(t,e,r){const{labelStyles:o,nodeStyles:a}=(0,i.GX)(e);e.labelStyle=o;const{shapeSvg:s,bbox:n}=await m(t,e,b(e)),h=Math.max(n.width+2*r.labelPaddingX,e?.width||0),c=Math.max(n.height+2*r.labelPaddingY,e?.height||0),d=-h/2,p=-c/2;let u,{rx:y,ry:C}=e;const{cssStyles:f}=e;if(r?.rx&&r.ry&&(y=r.rx,C=r.ry),"handDrawn"===e.look){const t=g.A.svg(s),r=(0,i.Fr)(e,{}),o=y||C?t.path(q(d,p,h,c,y||0),r):t.rectangle(d,p,h,c,r);u=s.insert(()=>o,":first-child"),u.attr("class","basic label-container").attr("style",(0,l.KL)(f))}else u=s.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",a).attr("rx",(0,l.KL)(y)).attr("ry",(0,l.KL)(C)).attr("x",d).attr("y",p).attr("width",h).attr("height",c);return x(e,u,"handDrawn"===e.look?void 0:{width:h,height:c}),e.calcIntersect=function(t,e){return I.rect(t,e)},e.intersect=function(t){return I.rect(e,t)},s}async function kt(t,e){const{cssClasses:r,labelPaddingX:o,labelPaddingY:a,padding:s,width:l,height:n}=e,h={rx:0,ry:0,classes:r??"",labelPaddingX:o??2*(s??0),labelPaddingY:a??s??0},c=await bt(t,e,h);if("handDrawn"===e.look){const t=g.A.svg(c),r=(0,i.Fr)(e,{}),o=c.select(".basic.label-container > path:nth-child(2)"),a=o.node();if(!a)return c;let s=null;return a instanceof SVGGraphicsElement?(s=a.getBBox(),c.insert(()=>t.line(s.x,s.y,s.x+s.width,s.y,r),".basic.label-container g.label"),c.insert(()=>t.line(s.x,s.y+s.height,s.x+s.width,s.y+s.height,r),".basic.label-container g.label"),o.remove(),c):c}const d=c.select(".basic.label-container"),p=(Number(d.attr("width"))||l)??0,u=(Number(d.attr("height"))||n)??0;return p>0&&u>0&&d.attr("stroke-dasharray",`${p} ${u}`),c}async function Bt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const a="neo"===e.look?16:e.padding??0,s="neo"===e.look?16:e.padding??0,{shapeSvg:l,bbox:n,label:h}=await m(t,e,b(e)),c=n.width+a,d=n.height+s,p=.2*d,u=-c/2,y=-d/2-p/2,{cssStyles:C}=e,f=g.A.svg(l),k=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const B=[{x:u,y:y+p},{x:-u,y:y+p},{x:-u,y:-y},{x:u,y:-y},{x:u,y},{x:-u,y},{x:-u,y:y+p}],S=f.polygon(B.map(t=>[t.x,t.y]),k),w=l.insert(()=>S,":first-child");return w.attr("class","basic label-container outer-path"),C&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",C),o&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",o),h.attr("transform",`translate(${u+(e.padding??0)/2-(n.x-(n.left??0))}, ${y+p+(e.padding??0)/2-(n.y-(n.top??0))})`),x(e,w),e.intersect=function(t){return I.rect(e,t)},l}async function St(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e),a="neo"===e.look?12:5;e.labelStyle=r;const s=e.padding??0,n="neo"===e.look?16:s,{shapeSvg:c,bbox:d}=await m(t,e,b(e)),p=Math.sqrt(d.width**2+d.height**2)/2,u=(e?.width?e?.width/2:p)+(n??0),y=u+a;let C;const{cssStyles:f}=e;if("handDrawn"===e.look){const t=g.A.svg(c),r=(0,i.Fr)(e,{roughness:.2,strokeWidth:2.5}),o=(0,i.Fr)(e,{roughness:.2,strokeWidth:1.5}),a=t.circle(0,0,2*y,r),s=t.circle(0,0,2*u,o);C=c.insert("g",":first-child"),C.attr("class",(0,l.KL)(e.cssClasses)).attr("style",(0,l.KL)(f)),C.node()?.appendChild(a),C.node()?.appendChild(s)}else{C=c.insert("g",":first-child");const t=C.insert("circle",":first-child"),e=C.insert("circle");C.attr("class","basic label-container").attr("style",o),t.attr("class","outer-circle").attr("style",o).attr("r",y).attr("cx",0).attr("cy",0),e.attr("class","inner-circle").attr("style",o).attr("r",u).attr("cx",0).attr("cy",0)}return x(e,C),e.intersect=function(t){return h.R.info("DoubleCircle intersect",e,y,t),I.circle(e,y,t)},c}async function wt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:l,halfPadding:h}=await m(t,e,b(e)),{theme:c,themeVariables:d}=(0,n.D7)();(0,s.XE)(a,e.colorIndex,c,d.borderColorArray);const p=h??10,u=l.width/2+2*p,y=l.height/2+2*p;let C;const{cssStyles:f}=e;if("handDrawn"===e.look){const t=g.A.svg(a),r=(0,i.Fr)(e,{}),o=t.ellipse(0,0,2*u,2*y,r);C=a.insert(()=>o,":first-child"),C.attr("class","basic label-container"),f&&C.attr("style",f)}else C=a.insert("ellipse",":first-child").attr("class","basic label-container").attr("style",o).attr("rx",u).attr("ry",y).attr("cx",0).attr("cy",0);return e.width=2*u,e.height=2*y,x(e,C),e.calcIntersect=function(t,e){const r=t.width/2,i=t.height/2;return I.ellipse(t,r,i,e)},e.intersect=function(t){return I.ellipse(e,u,y,t)},a}function Tt(t,e,{config:{themeVariables:r}}){const{labelStyles:o,nodeStyles:a}=(0,i.GX)(e);e.label="",e.labelStyle=o;const s=t.insert("g").attr("class",b(e)).attr("id",e.domId??e.id),{cssStyles:l}=e,n=g.A.svg(s),{nodeBorder:c}=r,d=(0,i.Fr)(e,{fillStyle:"solid"});"handDrawn"!==e.look&&(d.roughness=0);const p=n.circle(0,0,14,d),u=s.insert(()=>p,":first-child");return u.selectAll("path").attr("style",`fill: ${c} !important;`),l&&l.length>0&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",l),a&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",a),x(e,u),e.intersect=function(t){h.R.info("filledCircle intersect",e,{radius:7,point:t});return I.circle(e,7,t)},s}(0,c.K)(xt,"cylinder"),(0,c.K)(bt,"drawRect"),(0,c.K)(kt,"datastore"),(0,c.K)(Bt,"dividedRectangle"),(0,c.K)(St,"doublecircle"),(0,c.K)(wt,"usecaseEllipse"),(0,c.K)(Tt,"filledCircle");async function At(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const a=e.padding??0,s="neo"===e.look?2*a:a;(e.width||e.height)&&(e.height=e?.height??0,e.height<10&&(e.height=10),e.width=(e?.width??0)-s-s/2,e.width<10&&(e.width=10));const{shapeSvg:l,bbox:n,label:c}=await m(t,e,b(e)),d=(e?.width?e?.width:n.width)+(s??0),p=e?.height?e?.height:d+n.height,u=[{x:0,y:-p},{x:p,y:-p},{x:p/2,y:0}],{cssStyles:y}=e,C=g.A.svg(l),f=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const B=k(u),S=C.path(B,f),w=l.insert(()=>S,":first-child").attr("transform",`translate(${-p/2}, ${p/2})`).attr("class","outer-path");return y&&"handDrawn"!==e.look&&w.selectChildren("path").attr("style",y),o&&"handDrawn"!==e.look&&w.selectChildren("path").attr("style",o),e.width=d,e.height=p,x(e,w),c.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-p/2+(e.padding??0)/2+(n.y-(n.top??0))})`),e.intersect=function(t){return h.R.info("Triangle intersect",e,u,t),I.polygon(e,u,t)},l}async function Ft(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s,label:l}=await m(t,e,b(e)),n=e.padding??12,h=Math.max(s.width+2*n,e.width??0,90),c=s.height+2*n,d=Math.max(Math.min(.16*c,14),8),p=Math.max(c+d,e.height??0),u=p-d,y=Math.max(.38*h,28),C=-p/2,f=[{x:-h/2,y:C},{x:-h/2+y,y:C},{x:-h/2+y,y:C+d},{x:h/2,y:C+d},{x:h/2,y:p/2},{x:-h/2,y:p/2}],k=[`M${f[0].x},${f[0].y}`,...f.slice(1).map(t=>`L${t.x},${t.y}`),"Z"].join(" "),{cssStyles:B}=e;let S;if("handDrawn"===e.look){const t=g.A.svg(a).path(k,(0,i.Fr)(e,{}));S=a.insert(()=>t,":first-child").attr("class","basic label-container"),B&&S.attr("style",B)}else S=a.insert("path",":first-child").attr("d",k).attr("class","basic label-container").attr("style",o);"handDrawn"===e.look?x(e,S):x(e,S,{width:h,height:p});const w=C+d+u/2;return l.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${w-s.height/2-(s.y-(s.top??0))})`),e.intersect=function(t){return I.polygon(e,f,t)},a}function Lt(t,e,{dir:r,config:{state:o,themeVariables:a}}){const{nodeStyles:s}=(0,i.GX)(e);e.label="";const l=t.insert("g").attr("class",b(e)).attr("id",e.domId??e.id),{cssStyles:n}=e;let h=Math.max(70,e?.width??0),c=Math.max(10,e?.height??0);"LR"!==r&&"RL"!==r||(h=Math.max(10,e?.width??0),c=Math.max(70,e?.height??0));const d=-1*h/2,p=-1*c/2,u=g.A.svg(l),y=(0,i.Fr)(e,{stroke:a.lineColor,fill:a.lineColor});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");const C=u.rectangle(d,p,h,c,y),m=l.insert(()=>C,":first-child");n&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",n),s&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",s),x(e,m);const f=o?.padding??0;return e.width&&e.height&&(e.width+=f/2||0,e.height+=f/2||0),e.intersect=function(t){return I.rect(e,t)},l}async function vt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const a="neo"===e.look?16:e.padding??0,s="neo"===e.look?12:e.padding??0;(e.width||e.height)&&(e.height=(e?.height??0)-2*s,e.height<10&&(e.height=10),e.width=(e?.width??0)-2*a,e.width<15&&(e.width=15));const{shapeSvg:l,bbox:n}=await m(t,e,b(e)),c=(e?.height?e?.height:Math.max(10,n.height))+2*s,d=c/2,p=d-Math.sqrt(Math.max(0,d**2-(n.height/2)**2)),u=(e?.width?e?.width:Math.max(15,n.width)+2*p)+2*a,{cssStyles:y}=e,C=g.A.svg(l),f=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const B=[{x:-u/2,y:-c/2},{x:u/2-d,y:-c/2},...S(-u/2+d,0,d,50,90,270),{x:u/2-d,y:c/2},{x:-u/2,y:c/2}],w=k(B),T=C.path(w,f),A=l.insert(()=>T,":first-child");return A.attr("class","basic label-container outer-path"),y&&"handDrawn"!==e.look&&A.selectChildren("path").attr("style",y),o&&"handDrawn"!==e.look&&A.selectChildren("path").attr("style",o),x(e,A),e.intersect=function(t){h.R.info("Pill intersect",e,{radius:d,point:t});return I.polygon(e,B,t)},l}(0,c.K)(At,"flippedTriangle"),(0,c.K)(Ft,"folder"),(0,c.K)(Lt,"forkJoin"),(0,c.K)(vt,"halfRoundedRectangle");var Mt=(0,c.K)((t,e,r,i,o)=>[`M${t+o},${e}`,`L${t+r-o},${e}`,`L${t+r},${e-i/2}`,`L${t+r-o},${e-i}`,`L${t+o},${e-i}`,`L${t},${e-i/2}`,"Z"].join(" "),"createHexagonPathD");async function Et(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e),a="neo"===e.look?3.5:4;e.labelStyle=r;const s=e.padding??0,l="neo"===e.look?70:s,n="neo"===e.look?32:s;if(e.width||e.height){const t=(e.height??0)/a;e.width=(e?.width??0)-2*t-n,e.height=(e.height??0)-l}const{shapeSvg:h,bbox:c}=await m(t,e,b(e)),d=(e?.height?e?.height:c.height)+l,p=d/a,u=(e?.width?e?.width:c.width)+2*p+n,y=[{x:p,y:0},{x:u-p,y:0},{x:u,y:-d/2},{x:u-p,y:-d},{x:p,y:-d},{x:0,y:-d/2}];let C;const{cssStyles:f}=e;if("handDrawn"===e.look){const t=g.A.svg(h),r=(0,i.Fr)(e,{}),o=Mt(0,0,u,d,p),a=t.path(o,r);C=h.insert(()=>a,":first-child").attr("transform",`translate(${-u/2}, ${d/2})`),f&&C.attr("style",f)}else C=G(h,u,d,y);return o&&C.attr("style",o),e.width=u,e.height=d,x(e,C),e.intersect=function(t){return I.polygon(e,y,t)},h}async function Kt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.label="",e.labelStyle=r;const{shapeSvg:a}=await m(t,e,b(e)),s=Math.max(30,e?.width??0),l=Math.max(30,e?.height??0),{cssStyles:n}=e,c=g.A.svg(a),d=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(d.roughness=0,d.fillStyle="solid");const p=[{x:0,y:0},{x:s,y:0},{x:0,y:l},{x:s,y:l}],u=k(p),y=c.path(u,d),C=a.insert(()=>y,":first-child");return C.attr("class","basic label-container outer-path"),n&&"handDrawn"!==e.look&&C.selectChildren("path").attr("style",n),o&&"handDrawn"!==e.look&&C.selectChildren("path").attr("style",o),C.attr("transform",`translate(${-s/2}, ${-l/2})`),x(e,C),e.intersect=function(t){h.R.info("Pill intersect",e,{points:p});return I.polygon(e,p,t)},a}async function $t(t,e,{config:{themeVariables:r,flowchart:o}}){const{labelStyles:s}=(0,i.GX)(e);e.labelStyle=s;const l=e.assetHeight??48,n=e.assetWidth??48,c=Math.max(l,n),d=o?.wrappingWidth;e.width=Math.max(c,d??0);const{shapeSvg:p,bbox:u,label:y}=await m(t,e,"icon-shape default"),C="t"===e.pos,f=c,b=c,{nodeBorder:k}=r,{stylesMap:B}=(0,i.WW)(e),S=-b/2,w=-f/2,T=e.label?8:0,A=g.A.svg(p),F=(0,i.Fr)(e,{stroke:"none",fill:"none"});"handDrawn"!==e.look&&(F.roughness=0,F.fillStyle="solid");const L=A.rectangle(S,w,b,f,F),v=Math.max(b,u.width),M=f+u.height+T,E=A.rectangle(-v/2,-M/2,v,M,{...F,fill:"transparent",stroke:"none"}),K=p.insert(()=>L,":first-child"),$=p.insert(()=>E);if(e.icon){const t=p.append("g");t.html(`<g>${await(0,a.WY)(e.icon,{height:c,width:c,fallbackPrefix:""})}</g>`);const r=t.node().getBBox(),i=r.width,o=r.height,s=r.x,l=r.y;t.attr("transform",`translate(${-i/2-s},${C?u.height/2+T/2-o/2-l:-u.height/2-T/2-o/2-l})`),t.attr("style",`color: ${B.get("stroke")??k};`)}return y.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${C?-M/2:M/2-u.height})`),K.attr("transform",`translate(0,${C?u.height/2+T/2:-u.height/2-T/2})`),x(e,$),e.intersect=function(t){if(h.R.info("iconSquare intersect",e,t),!e.label)return I.rect(e,t);const r=e.x??0,i=e.y??0,o=e.height??0;let a=[];a=C?[{x:r-u.width/2,y:i-o/2},{x:r+u.width/2,y:i-o/2},{x:r+u.width/2,y:i-o/2+u.height+T},{x:r+b/2,y:i-o/2+u.height+T},{x:r+b/2,y:i+o/2},{x:r-b/2,y:i+o/2},{x:r-b/2,y:i-o/2+u.height+T},{x:r-u.width/2,y:i-o/2+u.height+T}]:[{x:r-b/2,y:i-o/2},{x:r+b/2,y:i-o/2},{x:r+b/2,y:i-o/2+f},{x:r+u.width/2,y:i-o/2+f},{x:r+u.width/2/2,y:i+o/2},{x:r-u.width/2,y:i+o/2},{x:r-u.width/2,y:i-o/2+f},{x:r-b/2,y:i-o/2+f}];return I.polygon(e,a,t)},p}async function _t(t,e,{config:{themeVariables:r,flowchart:o}}){const{labelStyles:s}=(0,i.GX)(e);e.labelStyle=s;const l=e.assetHeight??48,n=e.assetWidth??48,c=Math.max(l,n),d=o?.wrappingWidth;e.width=Math.max(c,d??0);const{shapeSvg:p,bbox:u,label:y}=await m(t,e,"icon-shape default"),C=e.label?8:0,f="t"===e.pos,{nodeBorder:b,mainBkg:k}=r,{stylesMap:B}=(0,i.WW)(e),S=g.A.svg(p),w=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const T=B.get("fill");w.stroke=T??k;const A=p.append("g");e.icon&&A.html(`<g>${await(0,a.WY)(e.icon,{height:c,width:c,fallbackPrefix:""})}</g>`);const F=A.node().getBBox(),L=F.width,v=F.height,M=F.x,E=F.y,K=Math.max(L,v)*Math.SQRT2+40,$=S.circle(0,0,K,w),_=Math.max(K,u.width),O=K+u.height+C,q=S.rectangle(-_/2,-O/2,_,O,{...w,fill:"transparent",stroke:"none"}),D=p.insert(()=>$,":first-child"),W=p.insert(()=>q);return A.attr("transform",`translate(${-L/2-M},${f?u.height/2+C/2-v/2-E:-u.height/2-C/2-v/2-E})`),A.attr("style",`color: ${B.get("stroke")??b};`),y.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${f?-O/2:O/2-u.height})`),D.attr("transform",`translate(0,${f?u.height/2+C/2:-u.height/2-C/2})`),x(e,W),e.intersect=function(t){h.R.info("iconSquare intersect",e,t);return I.rect(e,t)},p}async function Ot(t,e,{config:{themeVariables:r,flowchart:o}}){const{labelStyles:s}=(0,i.GX)(e);e.labelStyle=s;const l=e.assetHeight??48,n=e.assetWidth??48,c=Math.max(l,n),d=o?.wrappingWidth;e.width=Math.max(c,d??0);const{shapeSvg:p,bbox:u,halfPadding:y,label:C}=await m(t,e,"icon-shape default"),f="t"===e.pos,b=c+2*y,k=c+2*y,{nodeBorder:B,mainBkg:S}=r,{stylesMap:w}=(0,i.WW)(e),T=-k/2,A=-b/2,F=e.label?8:0,L=g.A.svg(p),v=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(v.roughness=0,v.fillStyle="solid");const M=w.get("fill");v.stroke=M??S;const E=L.path(q(T,A,k,b,5),v),K=Math.max(k,u.width),$=b+u.height+F,_=L.rectangle(-K/2,-$/2,K,$,{...v,fill:"transparent",stroke:"none"}),O=p.insert(()=>E,":first-child").attr("class","icon-shape2"),D=p.insert(()=>_);if(e.icon){const t=p.append("g");t.html(`<g>${await(0,a.WY)(e.icon,{height:c,width:c,fallbackPrefix:""})}</g>`);const r=t.node().getBBox(),i=r.width,o=r.height,s=r.x,l=r.y;t.attr("transform",`translate(${-i/2-s},${f?u.height/2+F/2-o/2-l:-u.height/2-F/2-o/2-l})`),t.attr("style",`color: ${w.get("stroke")??B};`)}return C.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${f?-$/2:$/2-u.height})`),O.attr("transform",`translate(0,${f?u.height/2+F/2:-u.height/2-F/2})`),x(e,D),e.intersect=function(t){if(h.R.info("iconSquare intersect",e,t),!e.label)return I.rect(e,t);const r=e.x??0,i=e.y??0,o=e.height??0;let a=[];a=f?[{x:r-u.width/2,y:i-o/2},{x:r+u.width/2,y:i-o/2},{x:r+u.width/2,y:i-o/2+u.height+F},{x:r+k/2,y:i-o/2+u.height+F},{x:r+k/2,y:i+o/2},{x:r-k/2,y:i+o/2},{x:r-k/2,y:i-o/2+u.height+F},{x:r-u.width/2,y:i-o/2+u.height+F}]:[{x:r-k/2,y:i-o/2},{x:r+k/2,y:i-o/2},{x:r+k/2,y:i-o/2+b},{x:r+u.width/2,y:i-o/2+b},{x:r+u.width/2/2,y:i+o/2},{x:r-u.width/2,y:i+o/2},{x:r-u.width/2,y:i-o/2+b},{x:r-k/2,y:i-o/2+b}];return I.polygon(e,a,t)},p}async function It(t,e,{config:{themeVariables:r,flowchart:o}}){const{labelStyles:s}=(0,i.GX)(e);e.labelStyle=s;const l=e.assetHeight??48,n=e.assetWidth??48,c=Math.max(l,n),d=o?.wrappingWidth;e.width=Math.max(c,d??0);const{shapeSvg:p,bbox:u,halfPadding:y,label:C}=await m(t,e,"icon-shape default"),f="t"===e.pos,b=c+2*y,k=c+2*y,{nodeBorder:B,mainBkg:S}=r,{stylesMap:w}=(0,i.WW)(e),T=-k/2,A=-b/2,F=e.label?8:0,L=g.A.svg(p),v=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(v.roughness=0,v.fillStyle="solid");const M=w.get("fill");v.stroke=M??S;const E=L.path(q(T,A,k,b,.1),v),K=Math.max(k,u.width),$=b+u.height+F,_=L.rectangle(-K/2,-$/2,K,$,{...v,fill:"transparent",stroke:"none"}),O=p.insert(()=>E,":first-child"),D=p.insert(()=>_);if(e.icon){const t=p.append("g");t.html(`<g>${await(0,a.WY)(e.icon,{height:c,width:c,fallbackPrefix:""})}</g>`);const r=t.node().getBBox(),i=r.width,o=r.height,s=r.x,l=r.y;t.attr("transform",`translate(${-i/2-s},${f?u.height/2+F/2-o/2-l:-u.height/2-F/2-o/2-l})`),t.attr("style",`color: ${w.get("stroke")??B};`)}return C.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${f?-$/2:$/2-u.height})`),O.attr("transform",`translate(0,${f?u.height/2+F/2:-u.height/2-F/2})`),x(e,D),e.intersect=function(t){if(h.R.info("iconSquare intersect",e,t),!e.label)return I.rect(e,t);const r=e.x??0,i=e.y??0,o=e.height??0;let a=[];a=f?[{x:r-u.width/2,y:i-o/2},{x:r+u.width/2,y:i-o/2},{x:r+u.width/2,y:i-o/2+u.height+F},{x:r+k/2,y:i-o/2+u.height+F},{x:r+k/2,y:i+o/2},{x:r-k/2,y:i+o/2},{x:r-k/2,y:i-o/2+u.height+F},{x:r-u.width/2,y:i-o/2+u.height+F}]:[{x:r-k/2,y:i-o/2},{x:r+k/2,y:i-o/2},{x:r+k/2,y:i-o/2+b},{x:r+u.width/2,y:i-o/2+b},{x:r+u.width/2/2,y:i+o/2},{x:r-u.width/2,y:i+o/2},{x:r-u.width/2,y:i-o/2+b},{x:r-k/2,y:i-o/2+b}];return I.polygon(e,a,t)},p}async function qt(t,e,{config:{flowchart:r}}){const o=new Image;o.src=e?.img??"",await o.decode();const a=Number(o.naturalWidth.toString().replace("px","")),s=Number(o.naturalHeight.toString().replace("px",""));e.imageAspectRatio=a/s;const{labelStyles:l}=(0,i.GX)(e);e.labelStyle=l;const n=r?.wrappingWidth;e.defaultWidth=r?.wrappingWidth;const c=Math.max(e.label?n??0:0,e?.assetWidth??a),d="on"===e.constraint&&e?.assetHeight?e.assetHeight*e.imageAspectRatio:c,p="on"===e.constraint?d/e.imageAspectRatio:e?.assetHeight??s;e.width=Math.max(d,n??0);const{shapeSvg:u,bbox:y,label:C}=await m(t,e,"image-shape default"),f="t"===e.pos,b=-d/2,k=-p/2,B=e.label?8:0,S=g.A.svg(u),w=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const T=S.rectangle(b,k,d,p,w),A=Math.max(d,y.width),F=p+y.height+B,L=S.rectangle(-A/2,-F/2,A,F,{...w,fill:"none",stroke:"none"}),v=u.insert(()=>T,":first-child"),M=u.insert(()=>L);if(e.img){const t=u.append("image");t.attr("href",e.img),t.attr("width",d),t.attr("height",p),t.attr("preserveAspectRatio","none"),t.attr("transform",`translate(${-d/2},${f?F/2-p:-F/2})`)}return C.attr("transform",`translate(${-y.width/2-(y.x-(y.left??0))},${f?-p/2-y.height/2-B/2:p/2-y.height/2+B/2})`),v.attr("transform",`translate(0,${f?y.height/2+B/2:-y.height/2-B/2})`),x(e,M),e.intersect=function(t){if(h.R.info("iconSquare intersect",e,t),!e.label)return I.rect(e,t);const r=e.x??0,i=e.y??0,o=e.height??0;let a=[];a=f?[{x:r-y.width/2,y:i-o/2},{x:r+y.width/2,y:i-o/2},{x:r+y.width/2,y:i-o/2+y.height+B},{x:r+d/2,y:i-o/2+y.height+B},{x:r+d/2,y:i+o/2},{x:r-d/2,y:i+o/2},{x:r-d/2,y:i-o/2+y.height+B},{x:r-y.width/2,y:i-o/2+y.height+B}]:[{x:r-d/2,y:i-o/2},{x:r+d/2,y:i-o/2},{x:r+d/2,y:i-o/2+p},{x:r+y.width/2,y:i-o/2+p},{x:r+y.width/2/2,y:i+o/2},{x:r-y.width/2,y:i+o/2},{x:r-y.width/2,y:i-o/2+p},{x:r-d/2,y:i-o/2+p}];return I.polygon(e,a,t)},u}async function Dt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const a=e.padding??0,s=a,l="neo"===e.look?2*a:a,{shapeSvg:n,bbox:h}=await m(t,e,b(e)),c=Math.max(h.height+2*s,e.height??0),d=Math.max(h.width+2*l,(e.width??0)-c),p=[{x:0,y:0},{x:d,y:0},{x:d+3*c/6,y:-c},{x:-3*c/6,y:-c}];let u;const{cssStyles:y}=e;if("handDrawn"===e.look){const t=g.A.svg(n),r=(0,i.Fr)(e,{}),o=k(p),a=t.path(o,r);u=n.insert(()=>a,":first-child").attr("transform",`translate(${-d/2}, ${c/2})`),y&&u.attr("style",y)}else u=G(n,d,c,p);return o&&u.attr("style",o),e.width=d,e.height=c,x(e,u),e.intersect=function(t){return I.polygon(e,p,t)},n}async function Wt(t,e){const{shapeSvg:r,bbox:i,label:o}=await m(t,e,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),o.attr("transform",`translate(${-i.width/2-(i.x-(i.left??0))}, ${-i.height/2-(i.y-(i.top??0))})`),x(e,a),e.intersect=function(t){return I.rect(e,t)},r}async function Pt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const a=e.padding??0,s=a,l="neo"===e.look?2*a:a,{shapeSvg:n,bbox:h}=await m(t,e,b(e)),c=Math.max(h.height+s,e.height??0),d=Math.max(h.width+l,(e.width??0)-c),p=[{x:0,y:0},{x:d+3*c/6,y:0},{x:d,y:-c},{x:-3*c/6,y:-c}];let u;const{cssStyles:y}=e;if("handDrawn"===e.look){const t=g.A.svg(n),r=(0,i.Fr)(e,{}),o=k(p),a=t.path(o,r);u=n.insert(()=>a,":first-child").attr("transform",`translate(${-d/2}, ${c/2})`),y&&u.attr("style",y)}else u=G(n,d,c,p);return o&&u.attr("style",o),e.width=d,e.height=c,x(e,u),e.intersect=function(t){return I.polygon(e,p,t)},n}async function zt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const a=e.padding??0,s=a,l="neo"===e.look?2*a:a,{shapeSvg:n,bbox:h}=await m(t,e,b(e)),c=Math.max(h.height+s,e.height??0),d=Math.max(h.width+l,(e.width??0)-c),p=[{x:-3*c/6,y:0},{x:d,y:0},{x:d+3*c/6,y:-c},{x:0,y:-c}];let u;const{cssStyles:y}=e;if("handDrawn"===e.look){const t=g.A.svg(n),r=(0,i.Fr)(e,{}),o=k(p),a=t.path(o,r);u=n.insert(()=>a,":first-child").attr("transform",`translate(${-d/2}, ${c/2})`),y&&u.attr("style",y)}else u=G(n,d,c,p);return o&&u.attr("style",o),e.width=d,e.height=c,x(e,u),e.intersect=function(t){return I.polygon(e,p,t)},n}function Rt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.label="",e.labelStyle=r;const a=t.insert("g").attr("class",b(e)).attr("id",e.domId??e.id),{cssStyles:s}=e,l=Math.max(35,e?.width??0),n=Math.max(35,e?.height??0),c=[{x:l,y:0},{x:0,y:n+3.5},{x:l-14,y:n+3.5},{x:0,y:2*n},{x:l,y:n-3.5},{x:14,y:n-3.5}],d=g.A.svg(a),p=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const u=k(c),y=d.path(u,p),C=a.insert(()=>y,":first-child");return C.attr("class","outer-path"),s&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",s),o&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",o),C.attr("transform",`translate(-${l/2},${-n})`),x(e,C),e.intersect=function(t){h.R.info("lightningBolt intersect",e,t);return I.polygon(e,c,t)},a}(0,c.K)(Et,"hexagon"),(0,c.K)(Kt,"hourglass"),(0,c.K)($t,"icon"),(0,c.K)(_t,"iconCircle"),(0,c.K)(Ot,"iconRounded"),(0,c.K)(It,"iconSquare"),(0,c.K)(qt,"imageSquare"),(0,c.K)(Dt,"inv_trapezoid"),(0,c.K)(Wt,"labelRect"),(0,c.K)(Pt,"lean_left"),(0,c.K)(zt,"lean_right"),(0,c.K)(Rt,"lightningBolt");var Nt=(0,c.K)((t,e,r,i,o,a,s)=>[`M${t},${e+a}`,`a${o},${a} 0,0,0 ${r},0`,`a${o},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${a} 0,0,0 ${r},0`,"l0,"+-i,`M${t},${e+a+s}`,`a${o},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),jt=(0,c.K)((t,e,r,i,o,a,s)=>[`M${t},${e+a}`,`M${t+r},${e+a}`,`a${o},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${a} 0,0,0 ${r},0`,"l0,"+-i,`M${t},${e+a+s}`,`a${o},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),Ht=(0,c.K)((t,e,r,i,o,a)=>[`M${t-r/2},${-i/2}`,`a${o},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function Gt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const a=e.padding??0,s="neo"===e.look?16:a,n="neo"===e.look?24:a;if(e.width||e.height){const t=e.width??0;e.width=(e.width??0)-s,e.width<10&&(e.width=10);const r=t/2/(2.5+t/50);e.height=(e.height??0)-n-3*r,e.height<10&&(e.height=10)}const{shapeSvg:h,bbox:c,label:d}=await m(t,e,b(e)),p=(e?.width?e?.width:c.width)+2*s,u=p/2,y=u/(2.5+p/50),C=(e?.height?e?.height:c.height)+y+2*n,f=.1*C;let k;const{cssStyles:B}=e;if("handDrawn"===e.look){const t=g.A.svg(h),r=jt(0,0,p,C,u,y,f),o=Ht(0,y,p,C,u,y),a=(0,i.Fr)(e,{}),s=t.path(r,a),l=t.path(o,a);h.insert(()=>l,":first-child").attr("class","line"),k=h.insert(()=>s,":first-child"),k.attr("class","basic label-container"),B&&k.attr("style",B)}else{const t=Nt(0,0,p,C,u,y,f);k=h.insert("path",":first-child").attr("d",t).attr("class","basic label-container outer-path").attr("style",(0,l.KL)(B)).attr("style",o)}return k.attr("label-offset-y",y),k.attr("transform",`translate(${-p/2}, ${-(C/2+y)})`),x(e,k),d.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))}, ${-c.height/2+y-(c.y-(c.top??0))})`),e.intersect=function(t){const r=I.rect(e,t),i=r.x-(e.x??0);if(0!=u&&(Math.abs(i)<(e.width??0)/2||Math.abs(i)==(e.width??0)/2&&Math.abs(r.y-(e.y??0))>(e.height??0)/2-y)){let o=y*y*(1-i*i/(u*u));o>0&&(o=Math.sqrt(o)),o=y-o,t.y-(e.y??0)>0&&(o=-o),r.y+=o}return r},h}async function Xt(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const a=e.padding??0,s="neo"===e.look?16:a,l="neo"===e.look?12:a;if(e.width||e.height){const t=e.width;e.width=10*(t??0)/11-2*s,e.width<10&&(e.width=10),e.height=(e?.height??0)-2*l,e.height<10&&(e.height=10)}const{shapeSvg:n,bbox:h,label:c}=await m(t,e,b(e)),d=(e?.width?e?.width:h.width)+2*(s??0),p=(e?.height?e?.height:h.height)+2*(l??0),u="neo"===e.look?p/4:p/8,y=p+u,{cssStyles:C}=e,f=g.A.svg(n),k=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const S=[{x:-d/2-d/2*.1,y:-y/2},{x:-d/2-d/2*.1,y:y/2},...B(-d/2-d/2*.1,y/2,d/2+d/2*.1,y/2,u,.8),{x:d/2+d/2*.1,y:-y/2},{x:-d/2-d/2*.1,y:-y/2},{x:-d/2,y:-y/2},{x:-d/2,y:y/2*1.1},{x:-d/2,y:-y/2}],w=f.polygon(S.map(t=>[t.x,t.y]),k),T=n.insert(()=>w,":first-child");return T.attr("class","basic label-container outer-path"),C&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",C),o&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",o),T.attr("transform",`translate(0,${-u/2})`),c.attr("transform",`translate(${-d/2+(e.padding??0)+d/2*.1/2-(h.x-(h.left??0))},${-p/2+(e.padding??0)-u-(h.y-(h.top??0))})`),x(e,T),e.intersect=function(t){return I.polygon(e,S,t)},n}(0,c.K)(Gt,"linedCylinder"),(0,c.K)(Xt,"linedWaveEdgedRect");var Ut={normal:"usecase-actor-shape usecase-actor-normal",hollow:"usecase-actor-hollow",awesome:"usecase-actor-awesome",icon:"usecase-actor-icon"},Yt=Math.PI/3,Vt=(0,c.K)((t,e)=>{const r=.6*e,i=e*Math.sqrt(.64),o=Math.cos(Yt),a=-Math.sin(Yt),s=r*-a,l=t+r*o,n=i*o,h=i*a;return`M ${s-n} ${l-h} L ${s+n} ${l+h}`},"businessMarkerPathForCircle"),Zt={normal:Vt(-24,12),hollow:Vt(-23,9),awesome:Vt(-21,13),icon:"M 12 -8 L 26 -26"},Qt=(0,c.K)((t,e,r)=>{const i=(e.x??0)-(e.left??0),o=(e.y??0)-(e.top??0);t.attr("transform",`translate(${-e.width/2-i},${r-e.height/2-o})`)},"positionLabel"),Jt=(0,c.K)((t,e,r,o,a=!1)=>{if("handDrawn"===e.look){const s=g.A.svg(t).path(r,(0,i.Fr)(e,a?{fill:"none"}:{}));return t.insert(()=>s,":first-child").attr("class",o)}const s=t.append("path").attr("class",o).attr("d",r);return a&&s.attr("fill","none"),s},"appendActorPath"),te=(0,c.K)((t,e,r,o,a,s,l=!1)=>{if("handDrawn"===e.look){const n=g.A.svg(t).circle(r,o,2*a,(0,i.Fr)(e,l?{fill:"none"}:{}));return t.insert(()=>n,":first-child").attr("class",s)}const n=t.append("circle").attr("class",s).attr("cx",r).attr("cy",o).attr("r",a);return l&&n.attr("fill","none"),n},"appendActorCircle"),ee=(0,c.K)((t,e,r)=>{e.business&&t.append("path").attr("class","usecase-business-marker usecase-actor-business-marker").attr("d",Zt[r]).attr("fill","none").attr("style","stroke: inherit !important; stroke-width: inherit !important")},"appendBusinessActorMarker");async function re(t,e,r,o){const{labelStyles:a,nodeStyles:l}=(0,i.GX)(e);e.labelStyle=a;const h="icon"===r||void 0!==e.stereotype?{...e,icon:"icon"===r?void 0:e.icon,stereotype:void 0}:e,{shapeSvg:c,bbox:d,label:g}=await m(t,h,b(e,`usecase-actor-variant usecase-actor-${r}`)),p=e.accessibleName??e.label;p&&c.attr("role","img").attr("aria-label",p),g.attr("class","label actor-label usecase-actor-label");const{theme:u,themeVariables:y}=(0,n.D7)();let C,k;if((0,s.XE)(c,e.colorIndex,u,y.borderColorArray),e.stereotype){const t=await f(c,`«${e.stereotype}»`,{labelStyle:a,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0,width:e.wrappingWidth});C=t.label.attr("class","label usecase-stereotype"),k=t.bbox}const B=c.append("g").attr("class",`usecase-actor-glyph ${Ut[r]}`).attr("style",l||null);await o(B,e),ee(B,e,r);const S=e.padding??8,w=k?.height??0,T=80+d.height+(k?w+2:0),A=Math.max(56,d.width,k?.width??0)+2*S,F=T+2*S,L=-T/2;B.attr("transform",`translate(0,${L+36})`);let v=L+72+8;C&&k&&(v+=w/2,Qt(C,k,v),v+=w/2+2),Qt(g,d,v+d.height/2);const M=c.insert("rect",":first-child").attr("class","usecase-actor-outline").attr("x",-A/2).attr("y",-F/2).attr("width",A).attr("height",F).attr("opacity",0).attr("aria-hidden","true");return x(e,M),e.intersect=t=>I.rect(e,t),c}(0,c.K)(re,"renderUsecaseActor");var ie=["M 0 -12","C 6.627 -12 12 -17.373 12 -24","C 12 -30.627 6.627 -36 0 -36","C -6.627 -36 -12 -30.627 -12 -24","C -12 -17.373 -6.627 -12 0 -12 Z","M 0 -12 V 8","M -17 -5 H 17","M 0 8 L -15 28","M 0 8 L 15 28"].join(" ");async function oe(t,e){return re(t,e,"normal",(t,e)=>{Jt(t,e,ie,"usecase-actor-stick")})}(0,c.K)(oe,"usecaseActor");var ae=["M 0 -34","C 7.18 -34 13 -28.18 13 -21","C 13 -13.82 7.18 -8 0 -8","C -7.18 -8 -13 -13.82 -13 -21","C -13 -28.18 -7.18 -34 0 -34 Z","M -24 25","C -24 7 -14 -3 0 -3","C 14 -3 24 7 24 25","C 24 28 21 30 18 30","H -18","C -21 30 -24 28 -24 25 Z"].join(" ");async function se(t,e){return re(t,e,"awesome",(t,e)=>{Jt(t,e,ae,"usecase-actor-awesome-silhouette")})}(0,c.K)(se,"usecaseActorAwesome");var le=["M -22 -10","H 22","V 0","H 6","L 22 17","L 13 28","L 0 13","L -13 28","L -22 17","L -6 0","H -22","Z"].join(" ");async function ne(t,e){return re(t,e,"hollow",(t,e)=>{te(t,e,0,-23,9,"usecase-actor-hollow-head",!0),Jt(t,e,le,"usecase-actor-hollow-body",!0)})}(0,c.K)(ne,"usecaseActorHollow");var he=52,ce=(0,c.K)(async(t,e)=>{if("handDrawn"===e.look){const r=g.A.svg(t).rectangle(-26,-28,he,he,(0,i.Fr)(e,{}));t.insert(()=>r,":first-child").attr("class","usecase-actor-icon-frame")}else t.append("rect").attr("class","usecase-actor-icon-frame").attr("x",-26).attr("y",-28).attr("width",he).attr("height",he).attr("rx",4).attr("ry",4);const r=e.icon??"",o=await(0,a.dn)(r.includes(":")?r:`fa:${r}`),s=await(0,a.WY)(r,{height:42,width:42,fallbackPrefix:"fa"}),l=t.append("g").attr("class","usecase-actor-icon-symbol"+(o?"":" usecase-actor-icon-fallback")).attr("aria-hidden","true").html(`<g>${s}</g>`),n=l.node()?.getBBox();n&&l.attr("transform",`translate(${-n.width/2-n.x},${-2-n.height/2-n.y})`)},"drawIconActor");async function de(t,e){return re(t,e,"icon",ce)}(0,c.K)(de,"usecaseActorIcon");var ge=(0,c.K)((t,e,r)=>{const i=(e.x??0)-(e.left??0),o=(e.y??0)-(e.top??0);t.attr("transform",`translate(${-e.width/2-i},${r-e.height/2-o})`)},"positionLabel");async function pe(t,e){const r=e,{labelStyles:o,nodeStyles:a}=(0,i.GX)(e);e.labelStyle=o;const l=r.stereotype?{...e,stereotype:void 0}:e,{shapeSvg:h,bbox:c,halfPadding:d,label:p}=await m(t,l,b(e,"usecase-business-shape"));p.attr("class","label usecase-label");const{theme:u,themeVariables:y}=(0,n.D7)();let C,k;if((0,s.XE)(h,e.colorIndex,u,y.borderColorArray),r.stereotype){const t=await f(h,`«${r.stereotype}»`,{labelStyle:o,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0,width:e.wrappingWidth});C=t.label.attr("class","label usecase-stereotype"),k=t.bbox}const B=k?2:0,S=c.height+(k?.height??0)+B,w=Math.max(c.width,k?.width??0),T=d??10,A=w/2+2*T,F=S/2+2*T,L=Math.min(Math.max(T/5,1),T/2),v=w/2+L,M=A-L,E=v/A,K=M/A,$=F*Math.sqrt(Math.max(0,1-E*E)),_=-F*Math.sqrt(Math.max(0,1-K*K));let O;if(C&&k&&ge(C,k,-S/2+k.height/2),ge(p,c,S/2-c.height/2),"handDrawn"===e.look){const t=g.A.svg(h).ellipse(0,0,2*A,2*F,(0,i.Fr)(e,{}));O=h.insert(()=>t,":first-child").attr("class","basic label-container usecase-business-ellipse")}else O=h.insert("ellipse",":first-child").attr("class","basic label-container usecase-business-ellipse").attr("style",a).attr("rx",A).attr("ry",F).attr("cx",0).attr("cy",0);h.append("path").attr("class","usecase-business-marker").attr("d",`M ${v} ${$} L ${M} ${_}`).attr("fill","none").attr("style",a||null);const q=r.accessibleName??r.label;return q&&h.attr("role","img").attr("aria-label",q),x(e,O),e.calcIntersect=(t,e)=>I.ellipse(t,t.width/2,t.height/2,e),e.intersect=t=>I.ellipse(e,A,F,t),h}(0,c.K)(pe,"usecaseBusiness");var ue=(0,c.K)((t,e,r,i)=>{const o=(e.x??0)-(e.left??0),a=(e.y??0)-(e.top??0);t.attr("transform",`translate(${r-e.width/2-o},${i-e.height/2-a})`)},"positionLabel"),ye=(0,c.K)(t=>{const e=Number.parseFloat(t??"");return Number.isFinite(e)&&e>=0?e:1},"numericStrokeWidth");async function Ce(t,e){const r=e,{labelStyles:o,nodeStyles:a}=(0,i.GX)(e),{stylesMap:s}=(0,i.WW)(e);e.labelStyle=o;const{shapeSvg:l,bbox:n,label:h}=await m(t,e,b(e,"usecase-json-table"));l.attr("role","img"),r.accessibleName&&l.attr("aria-label",r.accessibleName),h.attr("class","label usecase-json-title");const d=l.append("g").attr("class","usecase-json-table-grid"),p=[];for(const t of r.jsonRows??[]){const r=await f(d,t.key,{labelStyle:o,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0}),i=await f(d,t.value,{labelStyle:o,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0});p.push({key:{label:r.label.attr("class","label usecase-json-key"),bbox:r.bbox},value:{label:i.label.attr("class","label usecase-json-value"),bbox:i.bbox}})}const u=Math.max(0,...p.map(({key:t})=>t.bbox.width))+16,y=Math.max(0,...p.map(({value:t})=>t.bbox.width))+16,C=n.width+16,k=Math.max(C,u+y),B=y+Math.max(0,k-u-y),S=n.height+8,w=p.map(({key:t,value:e})=>Math.max(t.bbox.height,e.bbox.height)+8),T=S+w.reduce((t,e)=>t+e,0),A=ye(s.get("stroke-width")),F=k+2*A,L=T+2*A,v=-k/2,M=-T/2,E="handDrawn"===e.look?g.A.svg(l):void 0,K=E?(0,i.Fr)(e,{}):void 0,$=(0,c.K)((t,e,r,i,o,s)=>{if(E&&K){const a=E.rectangle(r,i,o,s,K);return t.insert(()=>a,":first-child").attr("class",e)}return t.insert("rect",":first-child").attr("class",e).attr("x",r).attr("y",i).attr("width",o).attr("height",s).attr("style",a)},"insertCell"),_=$(l,"label-container usecase-json-border",-F/2,-L/2,F,L);$(d,"usecase-json-cell usecase-json-title-cell",v,M,k,S),d.node()?.append(h.node()),ue(h,n,0,M+S/2);let O=M+S;return p.forEach(({key:t,value:e},r)=>{const i=w[r],o=d.append("g").attr("class","usecase-json-row").attr("data-row-index",r).attr("transform",`translate(0,${O})`);$(o,"usecase-json-cell usecase-json-key-cell",v,0,u,i),$(o,"usecase-json-cell usecase-json-value-cell",v+u,0,B,i),o.node()?.append(t.label.node(),e.label.node()),ue(t.label,t.bbox,v+u/2,i/2),ue(e.label,e.bbox,v+u+B/2,i/2),O+=i}),x(e,_),e.intersect=t=>I.rect(e,t),l}async function me(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const a=e.padding??0,s="neo"===e.look?16:a,l="neo"===e.look?12:a,n="neo"===e.look?10:5;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*s-2*n,10),e.height=Math.max((e?.height??0)-2*l-2*n,10));const{shapeSvg:h,bbox:c,label:d}=await m(t,e,b(e)),p=(e?.width?e?.width:c.width)+2*s+2*n-2*n,u=(e?.height?e?.height:c.height)+2*l+2*n-2*n,y=-p/2,C=-u/2,{cssStyles:f}=e,B=g.A.svg(h),S=(0,i.Fr)(e,{}),T=[{x:y-n,y:C+n},{x:y-n,y:C+u+n},{x:y+p-n,y:C+u+n},{x:y+p-n,y:C+u},{x:y+p,y:C+u},{x:y+p,y:C+u-n},{x:y+p+n,y:C+u-n},{x:y+p+n,y:C-n},{x:y+n,y:C-n},{x:y+n,y:C},{x:y,y:C},{x:y,y:C+n}],A=[{x:y,y:C+n},{x:y+p-n,y:C+n},{x:y+p-n,y:C+u},{x:y+p,y:C+u},{x:y+p,y:C},{x:y,y:C}];"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");const F=k(T);let L=B.path(F,S);const v=k(A);let M=B.path(v,S);"handDrawn"!==e.look&&(L=w(L),M=w(M));const E=h.insert("g",":first-child");return E.insert(()=>L),E.insert(()=>M),E.attr("class","basic label-container outer-path"),f&&"handDrawn"!==e.look&&E.selectAll("path").attr("style",f),o&&"handDrawn"!==e.look&&E.selectAll("path").attr("style",o),d.attr("transform",`translate(${-c.width/2-n-(c.x-(c.left??0))}, ${-c.height/2+n-(c.y-(c.top??0))})`),x(e,E),e.intersect=function(t){return I.polygon(e,T,t)},h}async function fe(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s,label:l}=await m(t,e,b(e)),n=e.padding??0,h="neo"===e.look?16:n,c="neo"===e.look?12:n;let d=!0;(e.width||e.height)&&(d=!1,e.width=(e?.width??0)-2*h,e.height=(e?.height??0)-3*c);const p=Math.max(s.width,e?.width??0)+2*h,u=Math.max(s.height,e?.height??0)+3*c,y="neo"===e.look?u/4:u/8,C=u+(d?y/2:-y/2),f=-p/2,S=-C/2,w=10,{cssStyles:T}=e,A=B(f-w,S+C+w,f+p-w,S+C+w,y,.8),F=A?.[A.length-1],L=[{x:f-w,y:S+w},{x:f-w,y:S+C+w},...A,{x:f+p-w,y:F.y-w},{x:f+p,y:F.y-w},{x:f+p,y:F.y-20},{x:f+p+w,y:F.y-20},{x:f+p+w,y:S-w},{x:f+w,y:S-w},{x:f+w,y:S},{x:f,y:S},{x:f,y:S+w}],v=[{x:f,y:S+w},{x:f+p-w,y:S+w},{x:f+p-w,y:F.y-w},{x:f+p,y:F.y-w},{x:f+p,y:S},{x:f,y:S}],M=g.A.svg(a),E=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(E.roughness=0,E.fillStyle="solid");const K=k(L),$=M.path(K,E),_=k(v),O=M.path(_,E),q=a.insert(()=>$,":first-child");return q.insert(()=>O),q.attr("class","basic label-container outer-path"),T&&"handDrawn"!==e.look&&q.selectAll("path").attr("style",T),o&&"handDrawn"!==e.look&&q.selectAll("path").attr("style",o),q.attr("transform",`translate(0,${-y/2})`),l.attr("transform",`translate(${-s.width/2-w-(s.x-(s.left??0))}, ${-s.height/2+w-y-(s.y-(s.top??0))})`),x(e,q),e.intersect=function(t){return I.polygon(e,L,t)},a}async function xe(t,e,{config:{themeVariables:r}}){const{labelStyles:o,nodeStyles:a}=(0,i.GX)(e);e.labelStyle=o;e.useHtmlLabels||(0,n.E)((0,n.zj)())||(e.centerLabel=!0);const{shapeSvg:s,bbox:l,label:h}=await m(t,e,b(e)),c=Math.max(l.width+2*(e.padding??0),e?.width??0),d=Math.max(l.height+2*(e.padding??0),e?.height??0),p=-c/2,u=-d/2,{cssStyles:y}=e,C=g.A.svg(s),f=(0,i.Fr)(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const k=C.rectangle(p,u,c,d,f),B=s.insert(()=>k,":first-child");return B.attr("class","basic label-container outer-path"),h.attr("class","label noteLabel"),y&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",y),a&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",a),h.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))}, ${-l.height/2-(l.y-(l.top??0))})`),x(e,B),e.intersect=function(t){return I.rect(e,t)},s}(0,c.K)(Ce,"usecaseJsonTable"),(0,c.K)(me,"multiRect"),(0,c.K)(fe,"multiWaveEdgedRectangle"),(0,c.K)(xe,"note");var be=(0,c.K)((t,e,r)=>[`M${t+r/2},${e}`,`L${t+r},${e-r/2}`,`L${t+r/2},${e-r}`,`L${t},${e-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function ke(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s}=await m(t,e,b(e)),l=s.width+(e.padding??0)+(s.height+(e.padding??0)),n=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let h;const{cssStyles:c}=e;if("handDrawn"===e.look){const t=g.A.svg(a),r=(0,i.Fr)(e,{}),o=be(0,0,l),s=t.path(o,r);h=a.insert(()=>s,":first-child").attr("transform",`translate(${-l/2+.5}, ${l/2})`),c&&h.attr("style",c)}else h=G(a,l,l,n),h.attr("transform",`translate(${-l/2+.5}, ${l/2})`);return o&&h.attr("style",o),x(e,h),e.calcIntersect=function(t,e){const r=t.width,i=[{x:r/2,y:0},{x:r,y:-r/2},{x:r/2,y:-r},{x:0,y:-r/2}];return I.polygon(t,i,e)},e.intersect=function(t){return this.calcIntersect(e,t)},a}async function Be(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const a=e.padding??0,s="neo"===e.look?21:a??0,l="neo"===e.look?12:a??0,{shapeSvg:n,bbox:h,label:c}=await m(t,e,b(e)),d=h.width+("neo"===e.look?2*s:s),p=Math.max(h.height+("neo"===e.look?2*l:l),e.height??0),u=p/4,y=-Math.max(d,(e.width??0)-u)/2,C=-p/2,f=C/2,B=[{x:y+f,y:C},{x:y,y:0},{x:y+f,y:-C},{x:-y,y:-C},{x:-y,y:C}],{cssStyles:S}=e,w=g.A.svg(n),T=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");const A=k(B),F=w.path(A,T),L=n.insert(()=>F,":first-child");return L.attr("class","basic label-container outer-path"),S&&"handDrawn"!==e.look&&L.selectAll("path").attr("style",S),o&&"handDrawn"!==e.look&&L.selectAll("path").attr("style",o),L.attr("transform",`translate(${-f/2},0)`),c.attr("transform",`translate(${-f/2-h.width/2-(h.x-(h.left??0))}, ${-h.height/2-(h.y-(h.top??0))})`),x(e,L),e.intersect=function(t){return I.polygon(e,B,t)},n}async function Se(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);let a;e.labelStyle=r,a=e.cssClasses?"node "+e.cssClasses:"node default";const s=t.insert("g").attr("class",a).attr("id",e.domId||e.id),l=s.insert("g"),c=s.insert("g").attr("class","label").attr("style",o),p=e.description,u=e.label,y=await D(c,u,e.labelStyle,!0,!0);let C={width:0,height:0};if((0,n.E)((0,n.D7)())){const t=y.children[0],e=(0,d.Ltv)(y);C=t.getBoundingClientRect(),e.attr("width",C.width),e.attr("height",C.height)}h.R.info("Text 2",p);const m=p||[],f=y.getBBox(),b=await D(c,Array.isArray(m)?m.join("<br/>"):m,e.labelStyle,!0,!0),k=b.children[0],B=(0,d.Ltv)(b);C=k.getBoundingClientRect(),B.attr("width",C.width),B.attr("height",C.height);const S=(e.padding||0)/2;(0,d.Ltv)(b).attr("transform","translate( "+(C.width>f.width?0:(f.width-C.width)/2)+", "+(f.height+S+5)+")"),(0,d.Ltv)(y).attr("transform","translate( "+(C.width<f.width?0:-(f.width-C.width)/2)+", 0)"),C=c.node().getBBox(),c.attr("transform","translate("+-C.width/2+", "+(-C.height/2-S+3)+")");const w=C.width+(e.padding||0),T=C.height+(e.padding||0),A=-C.width/2-S,F=-C.height/2-S;let L,v;if("handDrawn"===e.look){const t=g.A.svg(s),r=(0,i.Fr)(e,{}),o=t.path(q(A,F,w,T,e.rx||0),r),a=t.line(-C.width/2-S,-C.height/2-S+f.height+S,C.width/2+S,-C.height/2-S+f.height+S,r);v=s.insert(()=>(h.R.debug("Rough node insert CXC",o),a),":first-child"),L=s.insert(()=>(h.R.debug("Rough node insert CXC",o),o),":first-child")}else L=l.insert("rect",":first-child"),v=l.insert("line"),L.attr("class","outer title-state").attr("style",o).attr("x",-C.width/2-S).attr("y",-C.height/2-S).attr("width",C.width+(e.padding||0)).attr("height",C.height+(e.padding||0)),v.attr("class","divider").attr("x1",-C.width/2-S).attr("x2",C.width/2+S).attr("y1",-C.height/2-S+f.height+S).attr("y2",-C.height/2-S+f.height+S);return x(e,L),e.intersect=function(t){return I.rect(e,t)},s}async function we(t,e,{config:{themeVariables:r}}){const i=r?.radius??5;return bt(t,e,{rx:i,ry:i,classes:"",labelPaddingX:1*(e?.padding??0),labelPaddingY:1*(e?.padding??0)})}(0,c.K)(ke,"question"),(0,c.K)(Be,"rect_left_inv_arrow"),(0,c.K)(Se,"rectWithTitle"),(0,c.K)(we,"roundedRect");async function Te(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const a="neo"===e.look?16:e.padding??0,s="neo"===e.look?12:e.padding??0,{shapeSvg:n,bbox:h,label:c}=await m(t,e,b(e)),d=(e?.width??h.width)+2*a+("neo"===e.look?8:16),p=(e?.height??h.height)+2*s,u=d-8,y=p,C=8-d/2,f=-p/2,{cssStyles:k}=e,B=g.A.svg(n),S=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");const w=[{x:C,y:f},{x:C+u,y:f},{x:C+u,y:f+y},{x:C-8,y:f+y},{x:C-8,y:f},{x:C,y:f},{x:C,y:f+y}],T=B.polygon(w.map(t=>[t.x,t.y]),S),A=n.insert(()=>T,":first-child");return A.attr("class","basic label-container outer-path").attr("style",(0,l.KL)(k)),o&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",o),k&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",o),c.attr("transform",`translate(${4-h.width/2-(h.x-(h.left??0))}, ${-h.height/2-(h.y-(h.top??0))})`),x(e,A),e.intersect=function(t){return I.rect(e,t)},n}async function Ae(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const a=e.padding??0,s="neo"===e.look?16:a,l="neo"===e.look?12:a;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*s,10),e.height=Math.max((e?.height??0)/1.5-2*l,10));const{shapeSvg:n,bbox:h,label:c}=await m(t,e,b(e)),d=(e?.width?e?.width:h.width)+2*s,p=1.5*((e?.height?e?.height:h.height)+2*l)/1.5,u=-d/2,y=-p/2,{cssStyles:C}=e,f=g.A.svg(n),B=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(B.roughness=0,B.fillStyle="solid");const S=[{x:u,y},{x:u,y:y+p},{x:u+d,y:y+p},{x:u+d,y:y-p/2}],w=k(S),T=f.path(w,B),A=n.insert(()=>T,":first-child");return A.attr("class","basic label-container outer-path"),C&&"handDrawn"!==e.look&&A.selectChildren("path").attr("style",C),o&&"handDrawn"!==e.look&&A.selectChildren("path").attr("style",o),A.attr("transform",`translate(0, ${p/4})`),c.attr("transform",`translate(${-d/2+(e.padding??0)-(h.x-(h.left??0))}, ${-p/4+(e.padding??0)-(h.y-(h.top??0))})`),x(e,A),e.intersect=function(t){return I.polygon(e,S,t)},n}async function Fe(t,e){const r=e.padding??0,i="neo"===e.look?16:2*r,o="neo"===e.look?12:r,a={rx:0,ry:0,classes:"",labelPaddingX:e.labelPaddingX??i,labelPaddingY:o},l=await bt(t,e,a);if(void 0!==e.colorIndex){const{theme:t,themeVariables:r}=(0,n.D7)();(0,s.XE)(l,e.colorIndex,t,r.borderColorArray)}return l}(0,c.K)(Te,"shadedProcess"),(0,c.K)(Ae,"slopedRect"),(0,c.K)(Fe,"squareRect");var Le=(0,c.K)((t,e,r)=>{const i=t.height+r,o=i*Math.cos(Math.PI/98),a=Math.sqrt(Math.max(0,o**2-t.height**2));return{w:Math.max(t.width+i/4+e,1.5*i+(i-o),t.width+e+i-a),h:i}},"stadiumDimensions");async function ve(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const a=e.padding??0,s="neo"===e.look?40:a,l="neo"===e.look?24:a,{shapeSvg:n,bbox:h}=await m(t,e,b(e)),{w:c,h:d}=Le(h,s,l),p=d/2,{cssStyles:u}=e,y=g.A.svg(n),C=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");const f=[{x:-c/2+p,y:-d/2},{x:c/2-p,y:-d/2},...S(-c/2+p,0,p,50,90,270),{x:c/2-p,y:d/2},...S(c/2-p,0,p,50,270,450)],B=k(f),w=y.path(B,C),T=n.insert(()=>w,":first-child");return T.attr("class","basic label-container outer-path"),u&&"handDrawn"!==e.look&&T.selectChildren("path").attr("style",u),o&&"handDrawn"!==e.look&&T.selectChildren("path").attr("style",o),x(e,T),e.intersect=function(t){return I.polygon(e,f,t)},n}async function Me(t,e){return bt(t,e,{rx:"neo"===e.look?3:5,ry:"neo"===e.look?3:5,classes:"flowchart-node"})}function Ee(t,e,{config:{themeVariables:r}}){const{labelStyles:o,nodeStyles:a}=(0,i.GX)(e);e.labelStyle=o;const{cssStyles:s}=e,{lineColor:l,stateBorder:n,nodeBorder:h,nodeShadow:c}=r;(e.width||e.height)&&((e.width??0)<14&&(e.width=14),(e.height??0)<14&&(e.height=14)),e.width||(e.width=14),e.height||(e.height=14);const d=t.insert("g").attr("class","node default").attr("id",e.domId??e.id),p=g.A.svg(d),u=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");const y=p.circle(0,0,e.width,{...u,stroke:l,strokeWidth:2}),C=n??h,m=5*(e.width??0)/14,f=p.circle(0,0,m,{...u,fill:C,stroke:C,strokeWidth:2,fillStyle:"solid"}),b=d.insert(()=>y,":first-child");if(b.insert(()=>f),"handDrawn"!==e.look&&b.attr("class","outer-path"),s&&b.selectAll("path").attr("style",s),a&&b.selectAll("path").attr("style",a),e.width<25&&c&&"handDrawn"!==e.look){const e=t.node()?.ownerSVGElement?.id??"",r=e?`${e}-drop-shadow-small`:"drop-shadow-small";b.attr("style",`filter:url(#${r})`)}return x(e,b),e.intersect=function(t){return I.circle(e,(e.width??0)/2,t)},d}function Ke(t,e,{config:{themeVariables:r}}){const{lineColor:o,nodeShadow:a}=r;(e.width||e.height)&&((e.width??0)<14&&(e.width=14),(e.height??0)<14&&(e.height=14)),e.width||(e.width=14),e.height||(e.height=14);const s=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let l;if("handDrawn"===e.look){const t=g.A.svg(s).circle(0,0,e.width,(0,i.ue)(o));l=s.insert(()=>t),l.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14)}else l=s.insert("circle",":first-child"),l.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14);if(e.width<25&&a&&"handDrawn"!==e.look){const e=t.node()?.ownerSVGElement?.id??"",r=e?`${e}-drop-shadow-small`:"drop-shadow-small";l.attr("style",`filter:url(#${r})`)}return x(e,l),e.intersect=function(t){return I.circle(e,(e.width??7)/2,t)},s}(0,c.K)(ve,"stadium"),(0,c.K)(Me,"state"),(0,c.K)(Ee,"stateEnd"),(0,c.K)(Ke,"stateStart");async function $e(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const a=e?.padding??8,s="neo"===e.look?28:a,n="neo"===e.look?12:a,{shapeSvg:h,bbox:c}=await m(t,e,b(e)),d=Math.max(c.width+16+s,e.width??0),p=Math.max(c.height+n,e.height??0),u=d-16,y=p,C=-d/2,f=-p/2,k=[{x:0,y:0},{x:u,y:0},{x:u,y:-y},{x:0,y:-y},{x:0,y:0},{x:-8,y:0},{x:u+8,y:0},{x:u+8,y:-y},{x:-8,y:-y},{x:-8,y:0}];if("handDrawn"===e.look){const t=g.A.svg(h),r=(0,i.Fr)(e,{}),o=t.rectangle(C,f,u+16,y,r),a=t.line(C+8,f,C+8,f+y,r),s=t.line(C+8+u,f,C+8+u,f+y,r);h.insert(()=>a,":first-child"),h.insert(()=>s,":first-child");const n=h.insert(()=>o,":first-child"),{cssStyles:c}=e;n.attr("class","basic label-container").attr("style",(0,l.KL)(c)),x(e,n)}else{const t=G(h,u,y,k);o&&t.attr("style",o),x(e,t)}return e.intersect=function(t){return I.polygon(e,k,t)},h}(0,c.K)($e,"subroutine");async function _e(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const a=e.padding??0,s="neo"===e.look?16:a,l="neo"===e.look?12:a;(e.width||e.height)&&(e.height=Math.max((e?.height??0)-2*l,10),e.width=Math.max((e?.width??0)-2*s-.2*(e.height+2*l),10));const{shapeSvg:n,bbox:h}=await m(t,e,b(e)),c=(e?.height?e?.height:h.height)+2*l,d=.2*c,p=.2*c,u=(e?.width?e?.width:h.width)+2*s+d-d,y=c,C=-u/2,f=-y/2,{cssStyles:B}=e,S=g.A.svg(n),w=(0,i.Fr)(e,{}),T=[{x:C-d/2,y:f},{x:C+u+d/2,y:f},{x:C+u+d/2,y:f+y},{x:C-d/2,y:f+y}],A=[{x:C+u-d/2,y:f+y},{x:C+u+d/2,y:f+y},{x:C+u+d/2,y:f+y-p}];"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const F=k(T),L=S.path(F,w),v=k(A),M=S.path(v,{...w,fillStyle:"solid"}),E=n.insert(()=>M,":first-child");return E.insert(()=>L,":first-child"),E.attr("class","basic label-container outer-path"),B&&"handDrawn"!==e.look&&E.selectAll("path").attr("style",B),o&&"handDrawn"!==e.look&&E.selectAll("path").attr("style",o),x(e,E),e.intersect=function(t){return I.polygon(e,T,t)},n}async function Oe(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s,label:l}=await m(t,e,b(e)),n=Math.max(s.width+2*(e.padding??0),e?.width??0),h=Math.max(s.height+2*(e.padding??0),e?.height??0),c=h/8,d=.2*n,p=.2*h,u=h+c,{cssStyles:y}=e,C=g.A.svg(a),f=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const S=[{x:-n/2-n/2*.1,y:u/2},...B(-n/2-n/2*.1,u/2,n/2+n/2*.1,u/2,c,.8),{x:n/2+n/2*.1,y:-u/2},{x:-n/2-n/2*.1,y:-u/2}],w=-n/2+n/2*.1,T=-u/2-.4*p,A=[{x:w+n-d,y:1.3*(T+h)},{x:w+n,y:T+h-p},{x:w+n,y:.9*(T+h)},...B(w+n,1.25*(T+h),w+n-d,1.3*(T+h),.02*-h,.5)],F=k(S),L=C.path(F,f),v=k(A),M=C.path(v,{...f,fillStyle:"solid"}),E=a.insert(()=>M,":first-child");return E.insert(()=>L,":first-child"),E.attr("class","basic label-container outer-path"),y&&"handDrawn"!==e.look&&E.selectAll("path").attr("style",y),o&&"handDrawn"!==e.look&&E.selectAll("path").attr("style",o),E.attr("transform",`translate(0,${-c/2})`),l.attr("transform",`translate(${-n/2+(e.padding??0)-(s.x-(s.left??0))},${-h/2+(e.padding??0)-c/2-(s.y-(s.top??0))})`),x(e,E),e.intersect=function(t){return I.polygon(e,S,t)},a}async function Ie(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s}=await m(t,e,b(e)),l=Math.max(s.width+(e.padding??0),e?.width||0),n=Math.max(s.height+(e.padding??0),e?.height||0),h=-l/2,c=-n/2,d=a.insert("rect",":first-child");return d.attr("class","text").attr("style",o).attr("rx",0).attr("ry",0).attr("x",h).attr("y",c).attr("width",l).attr("height",n),x(e,d),e.intersect=function(t){return I.rect(e,t)},a}(0,c.K)(_e,"taggedRect"),(0,c.K)(Oe,"taggedWaveEdgedRectangle"),(0,c.K)(Ie,"text");var qe=(0,c.K)((t,e,r,i,o,a)=>`M${t},${e}\n a${o},${a} 0,0,1 0,${-i}\n l${r},0\n a${o},${a} 0,0,1 0,${i}\n M${r},${-i}\n a${o},${a} 0,0,0 0,${i}\n l${-r},0`,"createCylinderPathD"),De=(0,c.K)((t,e,r,i,o,a)=>[`M${t},${e}`,`M${t+r},${e}`,`a${o},${a} 0,0,0 0,${-i}`,`l${-r},0`,`a${o},${a} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),We=(0,c.K)((t,e,r,i,o,a)=>[`M${t+r/2},${-i/2}`,`a${o},${a} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD");async function Pe(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const a=e.padding??0,s="neo"===e.look?12:a/2,n=e.height??0;if(e.height&&(e.height=e.height-s,e.height<5&&(e.height=5)),e.width){const t=n/2/(2.5+n/50);e.width=e.width-s-3*t,e.width<10&&(e.width=10)}const{shapeSvg:h,bbox:c,label:d}=await m(t,e,b(e)),p=Math.max(e.height??0,c.height)+s,u=p/2,y=u/(2.5+p/50),C=Math.max(e.width??0,c.width)+y+s,{cssStyles:f}=e;let k;if("handDrawn"===e.look){const t=g.A.svg(h),r=De(0,0,C,p,y,u),o=We(0,0,C,p,y,u),a=t.path(r,(0,i.Fr)(e,{})),s=t.path(o,(0,i.Fr)(e,{fill:"none"}));k=h.insert(()=>s,":first-child"),k=h.insert(()=>a,":first-child"),k.attr("class","basic label-container"),f&&k.attr("style",f)}else{const t=qe(0,0,C,p,y,u);k=h.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,l.KL)(f)).attr("style",o),k.attr("class","basic label-container outer-path"),f&&k.selectAll("path").attr("style",f),o&&k.selectAll("path").attr("style",o)}return k.attr("label-offset-x",y),k.attr("transform",`translate(${-C/2}, ${p/2} )`),d.attr("transform",`translate(${-c.width/2-y-(c.x-(c.left??0))}, ${-c.height/2-(c.y-(c.top??0))})`),x(e,k),e.intersect=function(t){const r=I.rect(e,t),i=r.y-(e.y??0);if(0!=u&&(Math.abs(i)<(e.height??0)/2||Math.abs(i)==(e.height??0)/2&&Math.abs(r.x-(e.x??0))>(e.width??0)/2-y)){let o=y*y*(1-i*i/(u*u));0!=o&&(o=Math.sqrt(Math.abs(o))),o=y-o,t.x-(e.x??0)>0&&(o=-o),r.x+=o}return r},h}async function ze(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const a=e.padding??0,s=(e.look,a),l="neo"===e.look?2*a:a,{shapeSvg:n,bbox:h}=await m(t,e,b(e)),c=Math.max(h.height+s,e.height??0),d=Math.max(h.width+l,(e.width??0)-c),p=[{x:-3*c/6,y:0},{x:d+3*c/6,y:0},{x:d,y:-c},{x:0,y:-c}];let u;const{cssStyles:y}=e;if("handDrawn"===e.look){const t=g.A.svg(n),r=(0,i.Fr)(e,{}),o=k(p),a=t.path(o,r);u=n.insert(()=>a,":first-child").attr("transform",`translate(${-d/2}, ${c/2})`),y&&u.attr("style",y)}else u=G(n,d,c,p);return o&&u.attr("style",o),e.width=d,e.height=c,x(e,u),e.intersect=function(t){return I.polygon(e,p,t)},n}async function Re(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const a=e.padding??0,s="neo"===e.look?16:a,l="neo"===e.look?12:a;(e.width||e.height)&&(e.height=(e.height??0)-2*l,e.height<5&&(e.height=5),e.width=(e.width??0)-2*s,e.width<15&&(e.width=15));const{shapeSvg:n,bbox:h}=await m(t,e,b(e)),c=(e?.width?e?.width:h.width)+2*s,d=(e?.height?e?.height:h.height)+2*l,{cssStyles:p}=e,u=g.A.svg(n),y=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");const C=[{x:-c/2*.8,y:-d/2},{x:c/2*.8,y:-d/2},{x:c/2,y:-d/2*.6},{x:c/2,y:d/2},{x:-c/2,y:d/2},{x:-c/2,y:-d/2*.6}],f=k(C),B=u.path(f,y),S=n.insert(()=>B,":first-child");return S.attr("class","basic label-container outer-path"),p&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",p),o&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",o),x(e,S),e.intersect=function(t){return I.polygon(e,C,t)},n}(0,c.K)(Pe,"tiltedCylinder"),(0,c.K)(ze,"trapezoid"),(0,c.K)(Re,"trapezoidalPentagon");async function Ne(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const a=e.padding??0,s="neo"===e.look?2*a:a;(e.width||e.height)&&(e.width=((e?.width??0)-s)/2,e.width<10&&(e.width=10),e.height=e?.height??0,e.height<10&&(e.height=10));const{shapeSvg:l,bbox:c,label:d}=await m(t,e,b(e)),p=(0,n._3)((0,n.D7)().flowchart?.htmlLabels),u=(e?.width?e?.width:c.width)+s,y=e?.height?e?.height:u+c.height,C=[{x:0,y:0},{x:y,y:0},{x:y/2,y:-y}],{cssStyles:f}=e,B=g.A.svg(l),S=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");const w=k(C),T=B.path(w,S),A=l.insert(()=>T,":first-child").attr("transform",`translate(${-y/2}, ${y/2})`).attr("class","outer-path");return f&&"handDrawn"!==e.look&&A.selectChildren("path").attr("style",f),o&&"handDrawn"!==e.look&&A.selectChildren("path").attr("style",o),e.width=u,e.height=y,x(e,A),d.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))}, ${y/2-(c.height+(e.padding??0)/(p?2:1)-(c.y-(c.top??0)))})`),e.intersect=function(t){return h.R.info("Triangle intersect",e,C,t),I.polygon(e,C,t)},l}async function je(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const a=e.padding??0,s="neo"===e.look?16:a,l="neo"===e.look?12:a;let n=!0;(e.width||e.height)&&(n=!1,e.width=(e?.width??0)-2*s,e.width<10&&(e.width=10),e.height=(e?.height??0)-2*l,e.height<10&&(e.height=10));const{shapeSvg:h,bbox:c,label:d}=await m(t,e,b(e)),p=(e?.width?e?.width:c.width)+2*(s??0),u=(e?.height?e?.height:c.height)+2*(l??0),y="neo"===e.look?u/4:u/8,C=u+(n?y:-y),{cssStyles:f}=e,S=14-p,w=S>0?S/2:0,T=g.A.svg(h),A=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(A.roughness=0,A.fillStyle="solid");const F=[{x:-p/2-w,y:C/2},...B(-p/2-w,C/2,p/2+w,C/2,y,.8),{x:p/2+w,y:-C/2},{x:-p/2-w,y:-C/2}],L=k(F),v=T.path(L,A),M=h.insert(()=>v,":first-child");return M.attr("class","basic label-container outer-path"),f&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",f),o&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",o),M.attr("transform",`translate(0,${-y/2})`),d.attr("transform",`translate(${-p/2+(e.padding??0)-(c.x-(c.left??0))},${-u/2+(e.padding??0)-y-(c.y-(c.top??0))})`),x(e,M),e.intersect=function(t){return I.polygon(e,F,t)},h}async function He(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const a=e.padding??0,s="neo"===e.look?16:a,l="neo"===e.look?20:a;if(e.width||e.height){e.width=e?.width??0,e.width<20&&(e.width=20),e.height=e?.height??0,e.height<10&&(e.height=10);const t=Math.min(.2*e.height,e.height/4);e.height=Math.ceil(e.height-l-t*(20/9)),e.width=e.width-2*s}const{shapeSvg:n,bbox:h}=await m(t,e,b(e)),c=(e?.width?e?.width:h.width)+2*s,d=(e?.height?e?.height:h.height)+l,p=d/8,u=d+2*p,{cssStyles:y}=e,C=g.A.svg(n),f=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const S=[{x:-c/2,y:u/2},...B(-c/2,u/2,c/2,u/2,p,1),{x:c/2,y:-u/2},...B(c/2,-u/2,-c/2,-u/2,p,-1)],w=k(S),T=C.path(w,f),A=n.insert(()=>T,":first-child");return A.attr("class","basic label-container"),y&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",y),o&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",o),x(e,A),e.intersect=function(t){return I.polygon(e,S,t)},n}(0,c.K)(Ne,"triangle"),(0,c.K)(je,"waveEdgedRectangle"),(0,c.K)(He,"waveRectangle");var Ge=10;async function Xe(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const a="neo"===e.look?16:e.padding??0,s="neo"===e.look?12:e.padding??0;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*a-Ge,10),e.height=Math.max((e?.height??0)-2*s-Ge,10));const{shapeSvg:l,bbox:n,label:h}=await m(t,e,b(e)),c=(e?.width?e?.width:n.width)+2*a+Ge,d=(e?.height?e?.height:n.height)+2*s+Ge,p=c-Ge,u=d-Ge,y=-p/2,C=-u/2,{cssStyles:f}=e,k=g.A.svg(l),B=(0,i.Fr)(e,{}),S=[{x:y-Ge,y:C-Ge},{x:y-Ge,y:C+u},{x:y+p,y:C+u},{x:y+p,y:C-Ge}],w=`M${y-Ge},${C-Ge} L${y+p},${C-Ge} L${y+p},${C+u} L${y-Ge},${C+u} L${y-Ge},${C-Ge}\n M${y-Ge},${C} L${y+p},${C}\n M${y},${C-Ge} L${y},${C+u}`;"handDrawn"!==e.look&&(B.roughness=0,B.fillStyle="solid");const T=k.path(w,B),A=l.insert(()=>T,":first-child");return A.attr("transform","translate(5, 5)"),A.attr("class","basic label-container outer-path"),f&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",f),o&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",o),h.attr("transform",`translate(${-n.width/2+5-(n.x-(n.left??0))}, ${-n.height/2+5-(n.y-(n.top??0))})`),x(e,A),e.intersect=function(t){return I.polygon(e,S,t)},l}(0,c.K)(Xe,"windowPane");var Ue=new Set(["redux-color","redux-dark-color"]),Ye=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function Ve(t,e){const r=e;r.alias&&(e.label=r.alias);const{theme:o,themeVariables:a}=(0,n.zj)(),{rowEven:s,rowOdd:h,nodeBorder:c,borderColorArray:p}=a;if("handDrawn"===e.look){const{themeVariables:r}=(0,n.zj)(),{background:i}=r,o={...e,id:e.id+"-background",domId:(e.domId||e.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${i}`]};await Ve(t,o)}const u=(0,n.zj)();e.useHtmlLabels=u.htmlLabels;let y=u.er?.diagramPadding??10,C=u.er?.entityPadding??6;const{cssStyles:m}=e,{labelStyles:f,nodeStyles:k}=(0,i.GX)(e);if(0===r.attributes.length&&e.label){const i={rx:0,ry:0,labelPaddingX:y,labelPaddingY:1.5*y,classes:""};(0,l.Un)(e.label,u)+2*i.labelPaddingX<u.er.minEntityWidth&&(e.width=u.er.minEntityWidth);const a=await bt(t,e,i);if(null!=o&&Ue.has(o)){const t=r.colorIndex??0;a.attr("data-color-id","color-"+t%p.length)}if(!(0,n._3)(u.htmlLabels)){const t=a.select("text"),e=t.node()?.getBBox();t.attr("transform",`translate(${-e.width/2}, 0)`)}return a}u.htmlLabels||(y*=1.25,C*=1.25);let B=b(e);B||(B="node default");const S=t.insert("g").attr("class",B).attr("id",e.domId||e.id),w=await Ze(S,e.label??"",u,0,0,["name"],f);w.height+=C;let T=0;const A=[],F=[];let L=0,v=0,M=0,E=0,K=!0,$=!0;for(const t of r.attributes){const e=await Ze(S,t.type,u,0,T,["attribute-type"],f);L=Math.max(L,e.width+y);const r=await Ze(S,t.name,u,0,T,["attribute-name"],f);v=Math.max(v,r.width+y);const i=await Ze(S,t.keys.join(),u,0,T,["attribute-keys"],f);M=Math.max(M,i.width+y);const o=await Ze(S,t.comment,u,0,T,["attribute-comment"],f);E=Math.max(E,o.width+y);const a=Math.max(e.height,r.height,i.height,o.height)+C;F.push({yOffset:T,rowHeight:a}),T+=a}let _=4;M<=y&&(K=!1,M=0,_--),E<=y&&($=!1,E=0,_--);const O=S.node().getBBox();if(w.width+2*y-(L+v+M+E)>0){const t=w.width+2*y-(L+v+M+E);L+=t/_,v+=t/_,M>0&&(M+=t/_),E>0&&(E+=t/_)}const q=L+v+M+E,D=g.A.svg(S),W=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(W.roughness=0,W.fillStyle="solid");let P=0;F.length>0&&(P=F.reduce((t,e)=>t+(e?.rowHeight??0),0));const z=Math.max(O.width+2*y,e?.width||0,q),R=Math.max((P??0)+w.height,e?.height||0),N=-z/2,j=-R/2;if(S.selectAll("g:not(:first-child)").each((t,e,r)=>{const i=(0,d.Ltv)(r[e]),o=i.attr("transform");let a=0,s=0;if(o){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(o);t&&(a=parseFloat(t[1]),s=parseFloat(t[2]),i.attr("class").includes("attribute-name")?a+=L:i.attr("class").includes("attribute-keys")?a+=L+v:i.attr("class").includes("attribute-comment")&&(a+=L+v+M))}i.attr("transform",`translate(${N+y/2+a}, ${s+j+w.height+C/2})`)}),S.select(".name").attr("transform","translate("+-w.width/2+", "+(j+C/2)+")"),null!=o&&Ue.has(o)){const t=r.colorIndex??0;S.attr("data-color-id","color-"+t%p.length)}const H=D.rectangle(N,j,z,R,W),G=S.insert(()=>H,":first-child").attr("class","outer-path").attr("style",m.join(""));A.push(0);for(const[t,e]of F.entries()){const r=(t+1)%2==0&&0!==e.yOffset,i=D.rectangle(N,w.height+j+e?.yOffset,z,e?.rowHeight,{...W,fill:r?s:h,stroke:c});S.insert(()=>i,"g.label").attr("style",m.join("")).attr("class","row-rect-"+(r?"even":"odd"))}const X=1e-4;let U=Qe(N,w.height+j,z+N,w.height+j,X),Y=D.polygon(U.map(t=>[t.x,t.y]),W);if(S.insert(()=>Y).attr("class","divider"),U=Qe(L+N,w.height+j,L+N,R+j,X),Y=D.polygon(U.map(t=>[t.x,t.y]),W),S.insert(()=>Y).attr("class","divider"),K){const t=L+v+N;U=Qe(t,w.height+j,t,R+j,X),Y=D.polygon(U.map(t=>[t.x,t.y]),W),S.insert(()=>Y).attr("class","divider")}if($){const t=L+v+M+N;U=Qe(t,w.height+j,t,R+j,X),Y=D.polygon(U.map(t=>[t.x,t.y]),W),S.insert(()=>Y).attr("class","divider")}for(const t of A){const e=w.height+j+t;U=Qe(N,e,z+N,e,X),Y=D.polygon(U.map(t=>[t.x,t.y]),W),S.insert(()=>Y).attr("class","divider")}if(x(e,G),k&&"handDrawn"!==e.look)if(null!=o&&Ye.has(o))S.selectAll("path").attr("style",k);else{const t=k.split(";"),e=t?.filter(t=>t.includes("stroke"))?.map(t=>`${t}`).join("; ");S.selectAll("path").attr("style",e??""),S.selectAll(".row-rect-even path").attr("style",k)}return e.intersect=function(t){return I.rect(e,t)},S}async function Ze(t,e,r,i=0,a=0,s=[],h=""){const c=t.insert("g").attr("class",`label ${s.join(" ")}`).attr("transform",`translate(${i}, ${a})`).attr("style",h);e!==(0,n.QO)(e)&&(e=(e=(0,n.QO)(e)).replaceAll("<","&lt;").replaceAll(">","&gt;"));const g=c.node().appendChild(await(0,o.GZ)(c,e,{width:(0,l.Un)(e,r)+100,style:h,useHtmlLabels:r.htmlLabels},r));if(e.includes("&lt;")||e.includes("&gt;")){let t=g.children[0];for(t.textContent=t.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");t.childNodes[0];)t=t.childNodes[0],t.textContent=t.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let p=g.getBBox();if((0,n._3)(r.htmlLabels)){const t=g.children[0];t.style.textAlign="start";const e=(0,d.Ltv)(g);p=t.getBoundingClientRect(),e.attr("width",p.width),e.attr("height",p.height)}return p}function Qe(t,e,r,i,o){return t===r?[{x:t-o/2,y:e},{x:t+o/2,y:e},{x:r+o/2,y:i},{x:r-o/2,y:i}]:[{x:t,y:e-o/2},{x:t,y:e+o/2},{x:r,y:i+o/2},{x:r,y:i-o/2}]}async function Je(t,e,r,i,o=r.class.padding??12){const a=i?0:3,s=t.insert("g").attr("class",b(e)).attr("id",e.domId||e.id);let l=null,n=null,h=null,c=null,d=0,g=0,p=0;if(l=s.insert("g").attr("class","annotation-group text"),e.annotations.length>0){const t=e.annotations[0];await tr(l,{text:`«${t}»`},0);d=l.node().getBBox().height}n=s.insert("g").attr("class","label-group text"),await tr(n,e,0,["font-weight: bolder"]);const u=n.node().getBBox();g=u.height,h=s.insert("g").attr("class","members-group text");let y=0;for(const t of e.members){y+=await tr(h,t,y,[t.parseClassifier()])+a}p=h.node().getBBox().height,p<=0&&(p=o/2),c=s.insert("g").attr("class","methods-group text");let C=0;for(const t of e.methods){C+=await tr(c,t,C,[t.parseClassifier()])+a}let m=s.node().getBBox();if(null!==l){const t=l.node().getBBox();l.attr("transform",`translate(${-t.width/2})`)}return n.attr("transform",`translate(${-u.width/2}, ${d})`),m=s.node().getBBox(),h.attr("transform",`translate(0, ${d+g+2*o})`),m=s.node().getBBox(),c.attr("transform",`translate(0, ${d+g+(p?p+4*o:2*o)})`),m=s.node().getBBox(),{shapeSvg:s,bbox:m}}async function tr(t,e,r,i=[]){const a=t.insert("g").attr("class","label").attr("style",i.join("; ")),s=(0,n.zj)();let h="useHtmlLabels"in e?e.useHtmlLabels:(0,n._3)(s.htmlLabels)??!0,c="";c="text"in e?e.text:e.label,!h&&c.startsWith("\\")&&(c=c.substring(1)),(0,n.Wi)(c)&&(h=!0);const g=await(0,o.GZ)(a,(0,n.oB)((0,l.Sm)(c)),{width:(0,l.Un)(c,s)+50,classes:"markdown-node-label",useHtmlLabels:h},s);let u,y=1;if(h){const t=g.children[0],e=(0,d.Ltv)(g);y=t.innerHTML.split("<br>").length,t.innerHTML.includes("</math>")&&(y+=t.innerHTML.split("<mrow>").length-1),await p(t),u=t.getBoundingClientRect(),e.attr("width",u.width),e.attr("height",u.height)}else{i.includes("font-weight: bolder")&&(0,d.Ltv)(g).selectAll("tspan").attr("font-weight",""),y=g.children.length;const t=g.children[0];if(""===g.textContent||g.textContent.includes("&gt")){t.textContent=c[0]+c.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim();" "===c[1]&&(t.textContent=t.textContent[0]+" "+t.textContent.substring(1))}"undefined"===t.textContent&&(t.textContent=""),u=g.getBBox()}return a.attr("transform","translate(0,"+(-u.height/(2*y)+r)+")"),u.height}async function er(t,e){const r=(0,n.D7)(),{theme:o,themeVariables:a}=r,{useGradient:l,borderColorArray:h}=a,c=r.class.padding??12,p=c,u=e.useHtmlLabels??(0,n._3)(r.htmlLabels)??!0,y=e;y.annotations=y.annotations??[],y.members=y.members??[],y.methods=y.methods??[];const{shapeSvg:C,bbox:m}=await Je(t,e,r,u,p);(0,s.XE)(C,e.colorIndex,o,h);const{labelStyles:f,nodeStyles:b}=(0,i.GX)(e);e.labelStyle=f,e.cssStyles=y.styles||"";const k=y.styles?.join(";")||b||"";e.cssStyles||(e.cssStyles=k.replaceAll("!important","").split(";"));const B=0===y.members.length&&0===y.methods.length&&!r.class?.hideEmptyMembersBox,S=g.A.svg(C),w=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const T=Math.max(e.width??0,m.width);let A=Math.max(e.height??0,m.height);const F=(e.height??0)>m.height;0===y.members.length&&0===y.methods.length?A+=p:y.members.length>0&&0===y.methods.length&&(A+=2*p);const L=-T/2,v=-A/2;let M=B?2*c:0===y.members.length&&0===y.methods.length?-c:0;F&&(M=2*c);const E=S.rectangle(L-c,v-c-(B?c:0===y.members.length&&0===y.methods.length?-c/2:0),T+2*c,A+2*c+M,w),K=C.insert(()=>E,":first-child");K.attr("class","basic label-container outer-path");const $=K.node().getBBox(),_=C.select(".annotation-group").node().getBBox().height-(B?c/2:0)||0,O=C.select(".label-group").node().getBBox().height-(B?c/2:0)||0,q=C.select(".members-group").node().getBBox().height-(B?c/2:0)||0,D=(_+O+v+c-(v-c-(B?c:0===y.members.length&&0===y.methods.length?-c/2:0)))/2;if(C.selectAll(".text").each((t,e,i)=>{const o=(0,d.Ltv)(i[e]),a=o.attr("transform");let s=0;if(a){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(a);t&&(s=parseFloat(t[2]))}let l=s+v+c-(B?c:0===y.members.length&&0===y.methods.length?-c/2:0);if(o.attr("class").includes("methods-group")){const t=Math.max(q,p/2);l=F?Math.max(D,_+O+t+v+2*p+c)+2*p:_+O+t+v+4*p+c}0===y.members.length&&0===y.methods.length&&r.class?.hideEmptyMembersBox&&(l=y.annotations.length>0?s-p:s),u||(l-=4);let n=L;(o.attr("class").includes("label-group")||o.attr("class").includes("annotation-group"))&&(n=-o.node()?.getBBox().width/2||0,C.selectAll("text").each(function(t,e,r){"middle"===window.getComputedStyle(r[e]).textAnchor&&(n=0)})),o.attr("transform",`translate(${n}, ${l})`)}),y.members.length>0||y.methods.length>0||B){const t=_+O+v+c,r=S.line($.x,t,$.x+$.width,t+.001,w);C.insert(()=>r).attr("class","divider"+("neo"!==e.look||l?"":" neo-line")).attr("style",k)}if(B||y.members.length>0||y.methods.length>0){const t=_+O+q+v+2*p+c,r=S.line($.x,F?Math.max(D,t):t,$.x+$.width,(F?Math.max(D,t):t)+.001,w);C.insert(()=>r).attr("class","divider"+("neo"!==e.look||l?"":" neo-line")).attr("style",k)}if("handDrawn"!==y.look&&C.selectAll("path").attr("style",k),K.select(":nth-child(2)").attr("style",k),C.selectAll(".divider").select("path").attr("style",k),e.labelStyle?C.selectAll("span").attr("style",e.labelStyle):C.selectAll("span").attr("style",k),!u){const t=RegExp(/color\s*:\s*([^;]*)/),e=t.exec(k);if(e){const t=e[0].replace("color","fill");C.selectAll("tspan").attr("style",t)}else if(f){const e=t.exec(f);if(e){const t=e[0].replace("color","fill");C.selectAll("tspan").attr("style",t)}}}return x(e,K),e.intersect=function(t){return I.rect(e,t)},C}async function rr(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const a=e,s=e,l="verifyMethod"in e,h=b(e),c=(0,n.D7)(),{themeVariables:p}=c,{borderColorArray:u,requirementEdgeLabelBackground:y}=p,C="elk"===c.layout?"start":"center",m=t.insert("g").attr("class",h).attr("id",e.domId??e.id);let f;f=l?await ir(m,`&lt;&lt;${a.type}&gt;&gt;`,0,e.labelStyle):await ir(m,"&lt;&lt;Element&gt;&gt;",0,e.labelStyle);let k=f;const B=await ir(m,a.name,k,e.labelStyle+"; font-weight: bold;");if(k+=B+20,l){k+=await ir(m,""+(a.requirementId?`ID: ${a.requirementId}`:""),k,e.labelStyle,C);k+=await ir(m,""+(a.text?`Text: ${a.text}`:""),k,e.labelStyle,C);k+=await ir(m,""+(a.risk?`Risk: ${a.risk}`:""),k,e.labelStyle,C),await ir(m,""+(a.verifyMethod?`Verification: ${a.verifyMethod}`:""),k,e.labelStyle,C)}else{k+=await ir(m,""+(s.type?`Type: ${s.type}`:""),k,e.labelStyle,C),await ir(m,""+(s.docRef?`Doc Ref: ${s.docRef}`:""),k,e.labelStyle,C)}const S=(m.node()?.getBBox().width??200)+20,w=(m.node()?.getBBox().height??200)+20,T=-S/2,A=-w/2,F=g.A.svg(m),L=(0,i.Fr)(e,{});"handDrawn"!==e.look&&(L.roughness=0,L.fillStyle="solid");const v=F.rectangle(T,A,S,w,L),M=m.insert(()=>v,":first-child");if(M.attr("class","basic label-container outer-path").attr("style",o),u?.length){const t=e.colorIndex??0;m.attr("data-color-id","color-"+t%u.length)}if(m.selectAll(".label").each((t,e,r)=>{const i=(0,d.Ltv)(r[e]),o=i.attr("transform");let a=0,s=0;if(o){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(o);t&&(a=parseFloat(t[1]),s=parseFloat(t[2]))}const l=s-w/2;let n=T+10;0!==e&&1!==e||(n=a),i.attr("transform",`translate(${n}, ${l+20})`)}),k>f+B+20){const t=A+f+B+20;let r;if("neo"===e.look){const e=.001,i=[[T,t],[T+S,t],[T+S,t+e],[T,t+e]];r=F.polygon(i,L)}else r=F.line(T,t,T+S,t,L);m.insert(()=>r).attr("class","divider")}return x(e,M),e.intersect=function(t){return I.rect(e,t)},o&&"handDrawn"!==e.look&&(y||u?.length)&&m.selectAll("path").attr("style",o),m}async function ir(t,e,r,i="",a="center"){if(""===e)return 0;const s=t.insert("g").attr("class","label").attr("style",i),h=(0,n.D7)(),c=h.htmlLabels??!0,g=await(0,o.GZ)(s,(0,n.oB)((0,l.Sm)(e)),{width:(0,l.Un)(e,h)+50,classes:"markdown-node-label",useHtmlLabels:c,style:i},h);let p;if(c){const t=g.children[0],e=(0,d.Ltv)(g);"start"===a&&(0,d.Ltv)(t).style("text-align","left"),p=t.getBoundingClientRect(),e.attr("width",p.width),e.attr("height",p.height)}else{const t=g.children[0];for(const e of t.children)i&&e.setAttribute("style",i);if("start"===a){t.setAttribute("text-anchor","start");for(const e of t.children)e.setAttribute("text-anchor","start")}p=g.getBBox(),p.height+=6}return s.attr("transform",`translate(${-p.width/2},${-p.height/2+r})`),p.height}(0,c.K)(Ve,"erBox"),(0,c.K)(Ze,"addText"),(0,c.K)(Qe,"lineToPolygon"),(0,c.K)(Je,"textHelper"),(0,c.K)(tr,"addText"),(0,c.K)(er,"classBox"),(0,c.K)(rr,"requirementBox"),(0,c.K)(ir,"addText");var or=(0,c.K)(t=>{switch(t){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 ar(t,e,{config:r}){const{labelStyles:o,nodeStyles:a}=(0,i.GX)(e);e.labelStyle=o||"";const s=e.width;e.width=(e.width??200)-10;const{shapeSvg:l,bbox:n,label:h}=await m(t,e,b(e)),c=e.padding||10;let d,p="";"ticket"in e&&e.ticket&&r?.kanban?.ticketBaseUrl&&(p=r?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),d=l.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",p).attr("target","_blank"));const u={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1};let y,C;({label:y,bbox:C}=d?await f(d,"ticket"in e&&e.ticket||"",u):await f(l,"ticket"in e&&e.ticket||"",u));const{label:k,bbox:B}=await f(l,"assigned"in e&&e.assigned||"",u);e.width=s;const S=e?.width||0,w=Math.max(C.height,B.height)/2,T=Math.max(n.height+20,e?.height||0)+w,A=-S/2,F=-T/2;let L;h.attr("transform","translate("+(c-S/2)+", "+(-w-n.height/2)+")"),y.attr("transform","translate("+(c-S/2)+", "+(-w+n.height/2)+")"),k.attr("transform","translate("+(c+S/2-B.width-20)+", "+(-w+n.height/2)+")");const{rx:v,ry:M}=e,{cssStyles:E}=e;if("handDrawn"===e.look){const t=g.A.svg(l),r=(0,i.Fr)(e,{}),o=v||M?t.path(q(A,F,S,T,v||0),r):t.rectangle(A,F,S,T,r);L=l.insert(()=>o,":first-child"),L.attr("class","basic label-container").attr("style",E||null)}else{L=l.insert("rect",":first-child"),L.attr("class","basic label-container __APA__").attr("style",a).attr("rx",v??5).attr("ry",M??5).attr("x",A).attr("y",F).attr("width",S).attr("height",T);const t="priority"in e&&e.priority;if(t){const e=l.append("line"),r=A+2,i=F+Math.floor((v??0)/2),o=F+T-Math.floor((v??0)/2);e.attr("x1",r).attr("y1",i).attr("x2",r).attr("y2",o).attr("stroke-width","4").attr("stroke",or(t))}}return x(e,L),e.height=T,e.intersect=function(t){return I.rect(e,t)},l}async function sr(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s,halfPadding:n,label:c}=await m(t,e,b(e)),d=s.width+10*n,p=s.height+8*n,u=.15*d,{cssStyles:y}=e,C=s.width+20,f=s.height+20,k=Math.max(d,C),B=Math.max(p,f);let S;c.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`);const w=`M0 0 \n a${u},${u} 1 0,0 ${.25*k},${-1*B*.1}\n a${u},${u} 1 0,0 ${.25*k},0\n a${u},${u} 1 0,0 ${.25*k},0\n a${u},${u} 1 0,0 ${.25*k},${.1*B}\n\n a${u},${u} 1 0,0 ${.15*k},${.33*B}\n a${.8*u},${.8*u} 1 0,0 0,${.34*B}\n a${u},${u} 1 0,0 ${-1*k*.15},${.33*B}\n\n a${u},${u} 1 0,0 ${-1*k*.25},${.15*B}\n a${u},${u} 1 0,0 ${-1*k*.25},0\n a${u},${u} 1 0,0 ${-1*k*.25},0\n a${u},${u} 1 0,0 ${-1*k*.25},${-1*B*.15}\n\n a${u},${u} 1 0,0 ${-1*k*.1},${-1*B*.33}\n a${.8*u},${.8*u} 1 0,0 0,${-1*B*.34}\n a${u},${u} 1 0,0 ${.1*k},${-1*B*.33}\n H0 V0 Z`;if("handDrawn"===e.look){const t=g.A.svg(a),r=(0,i.Fr)(e,{}),o=t.path(w,r);S=a.insert(()=>o,":first-child"),S.attr("class","basic label-container").attr("style",(0,l.KL)(y))}else S=a.insert("path",":first-child").attr("class","basic label-container").attr("style",o).attr("d",w);return S.attr("transform",`translate(${-k/2}, ${-B/2})`),x(e,S),e.calcIntersect=function(t,e){return I.rect(t,e)},e.intersect=function(t){return h.R.info("Bang intersect",e,t),I.rect(e,t)},a}async function lr(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s,halfPadding:n,label:c}=await m(t,e,b(e)),d=s.width+2*n,p=s.height+2*n,u=.15*d,y=.25*d,C=.35*d,f=.2*d,{cssStyles:k}=e;let B;const S=`M0 0 \n a${u},${u} 0 0,1 ${.25*d},${-1*d*.1}\n a${C},${C} 1 0,1 ${.4*d},${-1*d*.1}\n a${y},${y} 1 0,1 ${.35*d},${.2*d}\n\n a${u},${u} 1 0,1 ${.15*d},${.35*p}\n a${f},${f} 1 0,1 ${-1*d*.15},${.65*p}\n\n a${y},${u} 1 0,1 ${-1*d*.25},${.15*d}\n a${C},${C} 1 0,1 ${-1*d*.5},0\n a${u},${u} 1 0,1 ${-1*d*.25},${-1*d*.15}\n\n a${u},${u} 1 0,1 ${-1*d*.1},${-1*p*.35}\n a${f},${f} 1 0,1 ${.1*d},${-1*p*.65}\n H0 V0 Z`;if("handDrawn"===e.look){const t=g.A.svg(a),r=(0,i.Fr)(e,{}),o=t.path(S,r);B=a.insert(()=>o,":first-child"),B.attr("class","basic label-container").attr("style",(0,l.KL)(k))}else B=a.insert("path",":first-child").attr("class","basic label-container").attr("style",o).attr("d",S);return c.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),B.attr("transform",`translate(${-d/2}, ${-p/2})`),x(e,B),e.calcIntersect=function(t,e){return I.rect(t,e)},e.intersect=function(t){return h.R.info("Cloud intersect",e,t),I.rect(e,t)},a}async function nr(t,e){const{labelStyles:r,nodeStyles:o}=(0,i.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s,halfPadding:l,label:n}=await m(t,e,b(e)),h=s.width+8*l,c=s.height+2*l,d="neo"===e.look?`\n M${-h/2} ${c/2-5}\n v${10-c}\n q0,-5 5,-5\n h${h-10}\n q5,0 5,5\n v${c-5}\n H${-h/2}\n Z\n `:`\n M${-h/2} ${c/2-5}\n v${10-c}\n q0,-5 5,-5\n h${h-10}\n q5,0 5,5\n v${c-10}\n q0,5 -5,5\n h${-(h-10)}\n q-5,0 -5,-5\n Z\n `;if(!e.domId)throw new Error(`defaultMindmapNode: node "${e.id}" is missing a domId — was render.ts domId prefixing skipped?`);const g=a.append("path").attr("id",e.domId).attr("class","node-bkg node-"+e.type).attr("style",o).attr("d",d);return a.append("line").attr("class","node-line-").attr("x1",-h/2).attr("y1",c/2).attr("x2",h/2).attr("y2",c/2),n.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),a.append(()=>n.node()),x(e,g),e.calcIntersect=function(t,e){return I.rect(t,e)},e.intersect=function(t){return I.rect(e,t)},a}async function hr(t,e){return it(t,e,{padding:e.padding??0})}(0,c.K)(ar,"kanbanItem"),(0,c.K)(sr,"bang"),(0,c.K)(lr,"cloud"),(0,c.K)(nr,"defaultMindmapNode"),(0,c.K)(hr,"mindmapCircle");var cr=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Fe},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:we},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:ve},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:$e},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:xt},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:kt},{semanticName:"Folder",name:"Folder",shortName:"folder",description:"Folder or directory",aliases:["directory"],handler:Ft},{semanticName:"Bucket",name:"Bucket",shortName:"bucket",description:"Object storage bucket",handler:N},{semanticName:"Console",name:"Console (terminal window)",shortName:"console",description:"Terminal or console window",handler:at},{semanticName:"Browser",name:"Browser",shortName:"browser",description:"Browser window",handler:tt},{semanticName:"Person",name:"Person",shortName:"person",description:"Person (circular head above a rounded body)",handler:yt},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:it},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:sr},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:lr},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:ke},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Et},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:zt},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Pt},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:ze},{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:Dt},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:St},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Ie},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:et},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Te},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Ke},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Ee},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Lt},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Kt},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:ht},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:dt},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:pt},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Rt},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:je},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:vt},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Pe},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Gt},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:ut},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Bt},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Ne},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Xe},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Tt},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Re},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:At},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Ae},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:fe},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:me},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:R},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:lt},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Oe},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:_e},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:He},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Be},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Xt}],dr=(0,c.K)(()=>{const t={state:Me,choice:rt,note:xe,composite:ot,rectWithTitle:Se,labelRect:Wt,block_arrow:J,collapsedGroup:H,iconSquare:It,iconCircle:_t,icon:$t,iconRounded:Ot,imageSquare:qt,anchor:W,kanbanItem:ar,mindmapCircle:hr,defaultMindmapNode:nr,classBox:er,erBox:Ve,requirementBox:rr,usecaseActor:oe,usecaseActorHollow:ne,usecaseActorAwesome:se,usecaseActorIcon:de,usecaseBusiness:pe,usecaseEllipse:wt,usecaseJsonTable:Ce},e=[...Object.entries(t),...cr.flatMap(t=>[t.shortName,..."aliases"in t?t.aliases:[],..."internalAliases"in t?t.internalAliases:[]].map(e=>[e,t.handler]))];return Object.fromEntries(e)},"generateShapeMap")();function gr(t){return t in dr}(0,c.K)(gr,"isValidShape")},86827(t,e,r){r.d(e,{K:()=>o,V:()=>a});var i=Object.defineProperty,o=(t,e)=>i(t,"name",{value:e,configurable:!0}),a=(t,e)=>{for(var r in e)i(t,r,{get:e[r],enumerable:!0})}},15319(t,e,r){r.d(e,{D:()=>s});var i=r(89983),o=r(86827),a=r(51444),s=(0,o.K)(t=>{const{securityLevel:e}=(0,i.D7)();let r=(0,a.Ltv)("body");if("sandbox"===e){const e=(0,a.Ltv)(`#i${t}`),i=e.node()?.contentDocument??document;r=(0,a.Ltv)(i.body)}return r.select(`#${t}`)},"selectSvgElement")},9465(t,e,r){r.d(e,{default:()=>Ie});var i,o=r(15319),a=r(841),s=r(56714),l=(r(43247),r(99257),r(24832),r(36870),r(84076),r(36155),r(57588),r(54912)),n=(r(92941),r(51255)),h=r(89983),c=r(31293),d=r(86827),g=r(84146),p=r(51444),u=r(24534),y=r(6057),C=r(50483),m=r(49503),f=r(99418),x=r(75663),b={id:"c4",detector:(0,d.K)(t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await r.e(8953).then(r.bind(r,28953));return{id:"c4",diagram:t}},"loader")},k="flowchart-v2",B={id:k,detector:(0,d.K)(t=>/^\s*(graph|flowchart)/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await Promise.all([r.e(7128),r.e(6029)]).then(r.bind(r,96029));return{id:k,diagram:t}},"loader")},S="agentflow",w={id:S,detector:(0,d.K)(t=>/^\s*agentflow-beta\b/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await r.e(7332).then(r.bind(r,87332));return{id:S,diagram:t}},"loader")},T="swimlane",A={id:T,detector:(0,d.K)(t=>/^\s*swimlane-beta\b/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await Promise.all([r.e(7128),r.e(8376)]).then(r.bind(r,98376));return{id:T,diagram:t}},"loader")},F={id:"er",detector:(0,d.K)(t=>/^\s*erDiagram/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await r.e(7509).then(r.bind(r,27509));return{id:"er",diagram:t}},"loader")},L="gitGraph",v={id:L,detector:(0,d.K)(t=>/^\s*gitGraph/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await Promise.all([r.e(4376),r.e(4951)]).then(r.bind(r,44951));return{id:L,diagram:t}},"loader")},M="gantt",E={id:M,detector:(0,d.K)(t=>/^\s*gantt/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await r.e(8162).then(r.bind(r,78162));return{id:M,diagram:t}},"loader")},K="info",$={id:K,detector:(0,d.K)(t=>/^\s*info/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await Promise.all([r.e(4376),r.e(6455)]).then(r.bind(r,96455));return{id:K,diagram:t}},"loader")},_={id:"pie",detector:(0,d.K)(t=>/^\s*pie/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await Promise.all([r.e(4376),r.e(9456)]).then(r.bind(r,67075));return{id:"pie",diagram:t}},"loader")},O="quadrantChart",I={id:O,detector:(0,d.K)(t=>/^\s*quadrantChart/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await r.e(4087).then(r.bind(r,44087));return{id:O,diagram:t}},"loader")},q="xychart",D={id:q,detector:(0,d.K)(t=>/^\s*xychart(-beta)?/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await r.e(434).then(r.bind(r,20434));return{id:q,diagram:t}},"loader")},W="requirement",P={id:W,detector:(0,d.K)(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await r.e(4122).then(r.bind(r,74122));return{id:W,diagram:t}},"loader")},z="sequence",R={id:z,detector:(0,d.K)(t=>/^\s*sequenceDiagram/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await r.e(8087).then(r.bind(r,18087));return{id:z,diagram:t}},"loader")},N="classDiagram",j={id:N,detector:(0,d.K)(t=>/^\s*classDiagram/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await r.e(8140).then(r.bind(r,58140));return{id:N,diagram:t}},"loader")},H="stateDiagram",G={id:H,detector:(0,d.K)(t=>/^\s*stateDiagram/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await r.e(6530).then(r.bind(r,66530));return{id:H,diagram:t}},"loader")},X="journey",U={id:X,detector:(0,d.K)(t=>/^\s*journey/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await r.e(4141).then(r.bind(r,74141));return{id:X,diagram:t}},"loader")},Y=(0,d.K)(t=>{const e=[];for(const r of t.split(/\s+/)){let t=[...r];for(;t.length>75;)e.push(t.slice(0,75).join("")),t=t.slice(75);t.length>0&&e.push(t.join(""))}const r=[];let i="";for(const t of e){const e=i?`${i} ${t}`:t;[...e].length>75?(r.push(i),i=t):i=e}if(i&&r.push(i),r.length>4){r.length=4;const t=r[3]??"";r[3]=`${[...t].slice(0,72).join("")}...`}return r},"wrapErrorMessage"),V={draw:(0,d.K)((t,e,r,i)=>{c.R.debug("rendering svg for syntax error\n");const a=(0,o.D)(e),s=a.append("g"),l=Y(i?.db.getErrorMessage?.()??""),n=l.length>0?500+56*l.length:512;a.attr("viewBox",`0 0 2412 ${n}`),(0,h.a$)(a,100,n,!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}`),l.forEach((t,e)=>{s.append("text").attr("class","error-text").attr("x",1440).attr("y",510+56*e).attr("font-size","42px").style("text-anchor","middle").text(t)})},"draw")},Z=V,Q={db:{clear(){i=void 0},setErrorMessage(t){i=t},getErrorMessage:()=>i},renderer:V,parser:{parse:(0,d.K)(()=>{},"parse")}},J="flowchart-elk",tt={id:J,detector:(0,d.K)((t,e={})=>!!/^\s*flowchart-elk/.test(t)&&(e.layout="elk",!0),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await Promise.all([r.e(7128),r.e(6029)]).then(r.bind(r,96029));return{id:J,diagram:t}},"loader")},et="timeline",rt={id:et,detector:(0,d.K)(t=>/^\s*timeline/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await r.e(7557).then(r.bind(r,97557));return{id:et,diagram:t}},"loader")},it="mindmap",ot={id:it,detector:(0,d.K)(t=>/^\s*mindmap/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await r.e(1924).then(r.bind(r,1924));return{id:it,diagram:t}},"loader")},at="kanban",st={id:at,detector:(0,d.K)(t=>/^\s*kanban/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await r.e(6926).then(r.bind(r,76926));return{id:at,diagram:t}},"loader")},lt="sankey",nt={id:lt,detector:(0,d.K)(t=>/^\s*sankey(-beta)?/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await r.e(4963).then(r.bind(r,74963));return{id:lt,diagram:t}},"loader")},ht="packet",ct={id:ht,detector:(0,d.K)(t=>/^\s*packet(-beta)?/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await Promise.all([r.e(4376),r.e(2463)]).then(r.bind(r,92463));return{id:ht,diagram:t}},"loader")},dt="radar",gt={id:dt,detector:(0,d.K)(t=>/^\s*radar-beta/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await Promise.all([r.e(4376),r.e(9500)]).then(r.bind(r,49500));return{id:dt,diagram:t}},"loader")},pt="block",ut={id:pt,detector:(0,d.K)(t=>/^\s*block(-beta)?/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await Promise.all([r.e(697),r.e(536)]).then(r.bind(r,10536));return{id:pt,diagram:t}},"loader")},yt="treeView",Ct={id:yt,detector:(0,d.K)(t=>/^\s*treeView-beta/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await Promise.all([r.e(4376),r.e(6089)]).then(r.bind(r,36089));return{id:yt,diagram:t}},"loader")},mt="architecture",ft={id:mt,detector:(0,d.K)(t=>/^\s*architecture/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await Promise.all([r.e(4376),r.e(165),r.e(6527),r.e(5942)]).then(r.bind(r,85942));return{id:mt,diagram:t}},"loader")},xt="eventmodeling",bt={id:xt,detector:(0,d.K)(t=>/^\s*eventmodeling/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await Promise.all([r.e(4376),r.e(3871)]).then(r.bind(r,63871));return{id:xt,diagram:t}},"loader")},kt="ishikawa",Bt={id:kt,detector:(0,d.K)(t=>/^\s*ishikawa(-beta)?\b/i.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await r.e(5741).then(r.bind(r,55741));return{id:kt,diagram:t}},"loader")},St="venn",wt={id:St,detector:(0,d.K)(t=>/^\s*venn-beta/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await Promise.all([r.e(7081),r.e(9614)]).then(r.bind(r,89614));return{id:St,diagram:t}},"loader")},Tt="treemap",At={id:Tt,detector:(0,d.K)(t=>/^\s*treemap/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await Promise.all([r.e(4376),r.e(8322)]).then(r.bind(r,48322));return{id:Tt,diagram:t}},"loader")},Ft="usecase",Lt={id:Ft,detector:(0,d.K)(t=>/^\s*usecase-beta(?:\s|$)/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await r.e(5695).then(r.bind(r,45695));return{id:Ft,diagram:t}},"loader")},vt="wardley",Mt={id:vt,detector:(0,d.K)(t=>/^\s*wardley-beta/i.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await Promise.all([r.e(4376),r.e(1654)]).then(r.bind(r,81654));return{id:vt,diagram:t}},"loader")},Et="cynefin",Kt={id:Et,detector:(0,d.K)(t=>/^\s*cynefin-beta(?:[\s:]|$)/.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await Promise.all([r.e(4376),r.e(9003)]).then(r.bind(r,39003));return{id:Et,diagram:t}},"loader")},$t="railroad",_t={id:$t,detector:(0,d.K)(t=>/^\s*railroad-beta/i.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await Promise.all([r.e(4376),r.e(8080),r.e(1566)]).then(r.bind(r,51566));return{id:$t,diagram:t}},"loader")},Ot="railroadEbnf",It={id:Ot,detector:(0,d.K)(t=>/^\s*railroad-ebnf-beta/i.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await Promise.all([r.e(4376),r.e(8080),r.e(3042)]).then(r.bind(r,33042));return{id:Ot,diagram:t}},"loader")},qt="railroadAbnf",Dt={id:qt,detector:(0,d.K)(t=>/^\s*railroad-abnf-beta/i.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await Promise.all([r.e(4376),r.e(8080),r.e(7639)]).then(r.bind(r,47639));return{id:qt,diagram:t}},"loader")},Wt="railroadPeg",Pt={id:Wt,detector:(0,d.K)(t=>/^\s*railroad-peg-beta/i.test(t),"detector"),loader:(0,d.K)(async()=>{const{diagram:t}=await Promise.all([r.e(4376),r.e(8080),r.e(7163)]).then(r.bind(r,27163));return{id:Wt,diagram:t}},"loader")},zt=!1,Rt=(0,d.K)(()=>{zt||(zt=!0,(0,h.Js)("error",Q,t=>"error"===t.toLowerCase().trim()),(0,h.Js)("---",{db:{clear:(0,d.K)(()=>{},"clear")},styles:{},renderer:{draw:(0,d.K)(()=>{},"draw")},parser:{parse:(0,d.K)(()=>{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:(0,d.K)(()=>null,"init")},t=>t.toLowerCase().trimStart().startsWith("---")),(0,h.Xd)(tt,ot,ft),(0,h.Xd)(w,b,st,j,F,E,$,_,P,R,A,B,rt,v,G,U,I,nt,ct,D,ut,bt,Ct,gt,Bt,At,_t,It,Dt,Pt,wt,Mt,Kt,Lt))},"addDiagrams"),Nt=(0,d.K)(async()=>{c.R.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(h.mW).map(async([t,{detector:e,loader:r}])=>{if(r)try{(0,h.Gs)(t)}catch{try{const{diagram:t,id:i}=await r();(0,h.Js)(i,t,e)}catch(e){throw c.R.error(`Failed to load external diagram with key ${t}. Removing from detectors.`),delete h.mW[t],e}}}))).filter(t=>"rejected"===t.status);if(t.length>0){c.R.error(`Failed to load ${t.length} external diagrams`);for(const e of t)c.R.error(e);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams");function jt(t,e){t.attr("role","graphics-document document"),""!==e&&t.attr("aria-roledescription",e)}function Ht(t,e,r,i){if(void 0!==t.insert){if(r){const e=`chart-desc-${i}`;t.attr("aria-describedby",e),t.insert("desc",":first-child").attr("id",e).text(r)}if(e){const r=`chart-title-${i}`;t.attr("aria-labelledby",r),t.insert("title",":first-child").attr("id",r).text(e)}}}(0,d.K)(jt,"setA11yDiagramInfo"),(0,d.K)(Ht,"addSVGa11yTitleDescription");var Gt=class t{constructor(t,e,r,i,o){this.type=t,this.text=e,this.db=r,this.parser=i,this.renderer=o}static{(0,d.K)(this,"Diagram")}static async fromText(e,r={}){const i="string"==typeof e?{raw:e,cleaned:e}:e,o=(0,h.zj)(),a=(0,h.Ch)(i.cleaned,o);try{(0,h.Gs)(a)}catch{const t=(0,h.J$)(a);if(!t)throw new h.C0(`Diagram ${a} not found.`);const{id:e,diagram:r}=await t();(0,h.Js)(e,r)}const{db:s,parser:l,renderer:d,init:g}=(0,h.Gs)(a);l.parser&&(l.parser.yy=s),s.clear?.(),g?.(o),r.title&&s.setDiagramTitle?.(r.title);let p=i.cleaned;if(s.preserveCommentsWhenParsing&&i.withComments){const t=o.maxTextSize??h.UI.maxTextSize;i.withComments.length>t?c.R.warn(`Comment-preserving source exceeds maxTextSize (${i.withComments.length} > ${t}); parsing the comment-stripped text instead. Reported source positions will not account for comment lines.`):p=i.withComments}const u=(0,n.C4)(p)+"\n";return i.frontmatterLineOffset&&s.setFrontmatterLineOffset?.(i.frontmatterLineOffset),await l.parse(u),new t(a,u,s,l,d)}async render(t,e){await this.renderer.draw(this.text,t,e,this)}getParser(){return this.parser}getType(){return this.type}},Xt=[],Ut=(0,d.K)(()=>{Xt.forEach(t=>{t()}),Xt=[]},"attachFunctions"),Yt=(0,d.K)(t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Vt(t){const e=(0,h.i_)(t);if(!e)return{text:t,metadata:{}};const r=e.indent,i=r?e.body.split("\n").map(t=>t.startsWith(r)?t.slice(r.length):t).join("\n"):e.body;let o=(0,a.H)(i,{schema:a.r})??{};o="object"!=typeof o||Array.isArray(o)?{}:o;const s={};return o.displayMode&&(s.displayMode=o.displayMode.toString()),o.title&&(s.title=o.title.toString()),o.config&&(s.config=o.config),{text:t.slice(e.length),metadata:s}}(0,d.K)(Vt,"extractFrontMatter");var Zt=(0,d.K)(t=>t.replace(/\r\n?/g,"\n").replace(/<(\w+)([^>]*)>/g,(t,e,r)=>"<"+e+r.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),Qt=(0,d.K)(t=>{const{text:e,metadata:r}=Vt(t),{displayMode:i,title:o,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:o,config:a,text:e}},"processFrontmatter"),Jt=(0,d.K)(t=>{const e=n._K.detectInit(t)??{},r=n._K.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:t})=>"wrap"===t):"wrap"===r?.type&&(e.wrap=!0),{text:(0,n.vU)(t),directive:e}},"processDirectives");function te(t){const e=t,r=Zt(t),i=Qt(r),o=Jt(i.text),a=(0,n.$t)(i.config,o.directive),s=o.text;return{code:{raw:e,cleaned:Yt(s),withComments:s,frontmatterLineOffset:r.length>i.text.length?(r.substring(0,r.length-i.text.length).match(/\n/g)??[]).length:0},title:i.title,config:a}}function ee(t){const e=(new TextEncoder).encode(t),r=Array.from(e,t=>String.fromCodePoint(t)).join("");return btoa(r)}(0,d.K)(te,"preprocessDiagram"),(0,d.K)(ee,"toBase64");var re=["foreignobject"],ie=["dominant-baseline"];function oe(t){const e=te(t);let r;(0,h.cL)();try{r=(0,h.Ch)(e.code.cleaned,(0,h.zj)())}catch{r=void 0}return(0,h.yj)(r),(0,h.xA)(e.config??{}),e}async function ae(t,e){Rt();try{const{code:e,config:r}=oe(t);return{diagramType:(await Gt.fromText(e)).type,config:r}}catch(t){if(e?.suppressErrors)return!1;throw t}finally{(0,h.yj)(void 0)}}(0,d.K)(oe,"processAndSetConfigs"),(0,d.K)(ae,"parse");var se=(0,d.K)((t,e,r=[])=>`.${t} ${e} ${(0,h.Df)(`{ ${r.join(" !important; ")} !important; }`)}`,"cssImportantStyles"),le=(0,d.K)((t,e=new Map)=>{const r=new CSSStyleSheet;if(void 0!==t.fontFamily&&r.insertRule(`:root { --mermaid-font-family: ${t.fontFamily}}`,r.cssRules.length),void 0!==t.altFontFamily&&r.insertRule(`:root { --mermaid-alt-font-family: ${t.altFontFamily}}`,r.cssRules.length),e instanceof Map){const i=(0,h.E)(t)?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach(t=>{(0,x.I)(t.styles)||i.forEach(e=>{r.insertRule(se(t.id,e,t.styles),r.cssRules.length)}),(0,x.I)(t.textStyles)||r.insertRule(se(t.id,"tspan",(t?.textStyles||[]).map(t=>t.replace("color","fill"))),r.cssRules.length)})}let i="";if(void 0!==t.themeCSS)if("function"==typeof r.replaceSync){const e=new CSSStyleSheet;e.replaceSync(t.themeCSS),i=(0,h.KG)(e)+"\n"}else i+=`${t.themeCSS}\n`;return i+(0,h.KG)(r)},"createCssStyles"),ne=(0,d.K)((t,e)=>(0,C.l)((0,y.wE)(`${t}{${e}}`),(0,m.r1)([(0,d.K)(function(e,r,i,o){if("rule"===e.type&&Array.isArray(e.props)){if(e.parent&&e.parent.type===u.Sv)return;e.props=e.props.map(r=>{if(r===t&&Array.isArray(e.children)&&e.children.every(t=>{if("decl"!==t.type)return!1;return new Set(["font-family","font-size","fill"]).has(t.props)}))return r;return(r.startsWith(`${t} `)||r.startsWith(`${t}>`))&&!r.startsWith(`${t} ||`)?r:`${t} ${r}`})}else if(e.type.startsWith("@")){[...[u.Rn,u.$1,u.IO,u.hx,"@container","@starting-style"],u.Sv].includes(e.type)||(c.R.warn(`Removing unsupported at-rule ${e.type} from CSS`),e.type=u.YK)}},"addNamespace"),C.A])),"compileCSS"),he=(0,d.K)((t,e,r,i)=>{const o=le(t,r),a=(0,h.tM)(e,o,{...t.themeVariables,theme:t.theme,look:t.look},i);return ne(i,a)},"createUserStyles"),ce=(0,d.K)((t="",e,r)=>{let i=t;return r||e||(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=(0,n.Sm)(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),de=(0,d.K)((t="",e)=>`<iframe style="width:100%;height:${e?.viewBox?.baseVal?.height?e.viewBox.baseVal.height+"px":"100%"};border:0;margin:0;" src="data:text/html;charset=UTF-8;base64,${ee(`<body style="margin:0">${t}</body>`)}" sandbox="allow-top-navigation-by-user-activation allow-popups">\n The "iframe" tag is not supported by your browser.\n</iframe>`,"putIntoIFrame"),ge=(0,d.K)((t,e,r,i,o)=>{const a=t.append("div");a.attr("id",r),i&&a.attr("style",i);const s=a.append("svg").attr("id",e).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg");return o&&s.attr("xmlns:xlink",o),s.append("g"),t},"appendDivSvgG");function pe(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}(0,d.K)(pe,"sandboxedIframe");var ue=(0,d.K)((t,e,r,i)=>{t.getElementById(e)?.remove(),t.getElementById(r)?.remove(),t.getElementById(i)?.remove()},"removeExistingElements"),ye=(0,d.K)(async function(t,e,r){Rt();const i=oe(e);let o=i.code;e=o.cleaned;const a=(0,h.zj)();c.R.debug(a),e.length>(a?.maxTextSize??5e4)&&(o={raw:e="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",cleaned:e});const s=`#${t}`,l="i"+t,g="#"+l,u="d"+t,y="#"+u,C=(0,d.K)(()=>{const t=x?g:y,e=(0,p.Ltv)(t).node();e&&"remove"in e&&e.remove()},"removeTempElements");let m=(0,p.Ltv)(document.body);const x="sandbox"===a.securityLevel,b="loose"===a.securityLevel,k=a.fontFamily;if(void 0!==r){if(r&&(r.innerHTML=""),x){const t=pe((0,p.Ltv)(r),l);m=(0,p.Ltv)(t.nodes()[0].contentDocument.body),m.node().style.margin="0"}else m=(0,p.Ltv)(r);ge(m,t,u,`font-family: ${k}`,"http://www.w3.org/1999/xlink")}else{if(ue(document,t,u,l),x){const t=pe((0,p.Ltv)(document.body),l);m=(0,p.Ltv)(t.nodes()[0].contentDocument.body),m.node().style.margin="0"}else m=(0,p.Ltv)("body");ge(m,t,u)}let B,S;try{B=await Gt.fromText(o,{title:i.title})}catch(t){if(a.suppressErrorRendering)throw C(),t;B=await Gt.fromText("error"),S=t,B.db.setErrorMessage?.((0,n.u1)(t))}const w=m.select(y).node(),T=B.type,A=w.firstChild,F=A.firstChild,L=B.renderer.getClasses?.(e,B),v=he(a,T,L,s),M=document.createElement("style");M.innerHTML=v,A.insertBefore(M,F);try{await B.renderer.draw(e,t,"12.1.0",B)}catch(r){throw a.suppressErrorRendering?C():Z.draw(e,t,"12.1.0"),r}const E=m.select(`${y} svg`),K=B.db.getAccTitle?.(),$=B.db.getAccDescription?.();xe(T,E,K,$);const _=(0,d.K)(()=>{m.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let e=m.select(y).node().innerHTML;if(c.R.debug("config.arrowMarkerAbsolute",a.arrowMarkerAbsolute),e=ce(e,x,(0,h._3)(a.arrowMarkerAbsolute)),x){const t=m.select(y+" svg").node();e=de(e,t)}else b||(e=f.A.sanitize(e,{ADD_TAGS:re,ADD_ATTR:ie,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));return Ut(),e},"serializeSvg")();if(S)throw S;return C(),{diagramType:T,svg:_,bindFunctions:B.db.bindFunctions}},"renderDiagram"),Ce=(0,d.K)(async function(t,e,r){try{return await ye(t,e,r)}finally{(0,h.yj)(void 0)}},"render");function me(t={}){const e=(0,h.hH)({},t);e?.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),(0,h.wZ)(e);const r=h.sb.theme;e?.theme&&Object.hasOwn(h.H$,e.theme)?e.themeVariables=h.H$[e.theme].getThemeVariables(e.themeVariables):e&&(null!=e.theme&&"null"!==e.theme&&(e.theme=r),e.themeVariables=h.H$[r].getThemeVariables(e.themeVariables));const i="object"==typeof e?(0,h.UU)(e):(0,h.Q2)();(0,c.H)(i.logLevel),Rt()}(0,d.K)(me,"initialize");var fe=(0,d.K)((t,e={})=>{const{code:r}=te(t);return Gt.fromText(r,e)},"getDiagramFromText");function xe(t,e,r,i){jt(e,t),Ht(e,r,i,e.attr("id"))}(0,d.K)(xe,"addA11yInfo");var be=Object.freeze({render:Ce,parse:ae,getDiagramFromText:fe,initialize:me,getConfig:h.zj,setConfig:h.Nk,getSiteConfig:h.Q2,updateSiteConfig:h.B6,reset:(0,d.K)(()=>{(0,h.cL)()},"reset"),globalReset:(0,d.K)(()=>{(0,h.cL)(h.sb)},"globalReset"),defaultConfig:h.sb});(0,c.H)((0,h.zj)().logLevel),(0,h.cL)((0,h.zj)());var ke=(0,d.K)((t,e,r)=>{c.R.warn(t),(0,n.dq)(t)?(r&&r(t.str,t.hash),e.push({...t,message:t.str,error:t})):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},"handleError"),Be=(0,d.K)(async function(t={querySelector:".mermaid"}){try{await Se(t)}catch(e){if((0,n.dq)(e)&&c.R.error(e.str),Oe.parseError&&Oe.parseError(e),!t.suppressErrors)throw c.R.error("Use the suppressErrors option to suppress these errors"),e}},"run"),Se=(0,d.K)(async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){const i=be.getConfig();let o;if(c.R.debug((t?"":"No ")+"Callback function found"),r)o=r;else{if(!e)throw new Error("Nodes and querySelector are both undefined");o=document.querySelectorAll(e)}c.R.debug(`Found ${o.length} diagrams`),void 0!==i?.startOnLoad&&(c.R.debug("Start On Load: "+i?.startOnLoad),be.updateSiteConfig({startOnLoad:i?.startOnLoad}));const a=new n._K.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let s;const l=[];for(const e of Array.from(o)){if(c.R.info("Rendering diagram: "+e.id),e.getAttribute("data-processed"))continue;e.setAttribute("data-processed","true");const r=`mermaid-${a.next()}`;s=e.innerHTML,s=(0,g.T)(n._K.entityDecode(s)).trim().replace(/<br\s*\/?>/gi,"<br/>");const i=n._K.detectInit(s);i&&c.R.debug("Detected early reinit: ",i);try{const{svg:i,bindFunctions:o}=await $e(r,s,e);e.innerHTML=i,t&&await t(r),o&&o(e)}catch(t){ke(t,l,Oe.parseError)}}if(l.length>0)throw l[0]},"runThrowsErrors"),we=(0,d.K)(function(t){be.initialize(t)},"initialize"),Te=(0,d.K)(async function(t,e,r){c.R.warn("mermaid.init is deprecated. Please use run instead."),t&&we(t);const i={postRenderCallback:r,querySelector:".mermaid"};"string"==typeof e?i.querySelector=e:e&&(e instanceof HTMLElement?i.nodes=[e]:i.nodes=e),await Be(i)},"init"),Ae=(0,d.K)(async(t,{lazyLoad:e=!0}={})=>{Rt(),(0,h.Xd)(...t),!1===e&&await Nt()},"registerExternalDiagrams"),Fe=(0,d.K)(function(){if(Oe.startOnLoad){const{startOnLoad:t}=be.getConfig();t&&Oe.run().catch(t=>c.R.error("Mermaid failed to initialize",t))}},"contentLoaded");"undefined"!=typeof document&&window.addEventListener("load",Fe,!1);var Le=(0,d.K)(function(t){Oe.parseError=t},"setParseErrorHandler"),ve=[],Me=!1,Ee=(0,d.K)(async()=>{if(!Me){for(Me=!0;ve.length>0;){const t=ve.shift();if(t)try{await t()}catch(t){c.R.error("Error executing queue",t)}}Me=!1}},"executeQueue"),Ke=(0,d.K)(async(t,e)=>new Promise((r,i)=>{const o=(0,d.K)(()=>new Promise((o,a)=>{be.parse(t,e).then(t=>{o(t),r(t)},t=>{c.R.error("Error parsing",t),Oe.parseError?.(t),a(t),i(t)})}),"performCall");ve.push(o),Ee().catch(i)}),"parse"),$e=(0,d.K)((t,e,r)=>new Promise((i,o)=>{const a=(0,d.K)(()=>new Promise((a,s)=>{be.render(t,e,r).then(t=>{a(t),i(t)},t=>{c.R.error("Error parsing",t),Oe.parseError?.(t),s(t),o(t)})}),"performCall");ve.push(a),Ee().catch(o)}),"render"),_e=(0,d.K)(()=>Object.keys(h.mW).map(t=>({id:t})),"getRegisteredDiagramsMetadata"),Oe={startOnLoad:!0,mermaidAPI:be,parse:Ke,render:$e,init:Te,run:Be,registerExternalDiagrams:Ae,registerLayoutLoaders:s.sO,initialize:we,parseError:void 0,contentLoaded:Fe,setParseErrorHandler:Le,detectType:h.Ch,registerIconPacks:l.pC,getRegisteredDiagramsMetadata:_e},Ie=Oe}}]);