@flyfish-group/file-viewer3 1.0.26 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (359) hide show
  1. package/README.en.md +3 -388
  2. package/README.md +3 -364
  3. package/dist/file-viewer3.css +1 -2
  4. package/dist/index.d.ts +2 -0
  5. package/dist/index.js +2 -0
  6. package/package.json +22 -126
  7. package/dist/components/3MFLoader.js +0 -527
  8. package/dist/components/AMFLoader.js +0 -188
  9. package/dist/components/ArchiveViewer.js +0 -526
  10. package/dist/components/AudioViewer.js +0 -66
  11. package/dist/components/CadViewer.js +0 -9040
  12. package/dist/components/CodeViewer.js +0 -151
  13. package/dist/components/ColladaLoader.js +0 -2282
  14. package/dist/components/DrawingViewer.js +0 -295
  15. package/dist/components/EdaViewer.js +0 -630
  16. package/dist/components/EmailViewer.js +0 -276
  17. package/dist/components/EpubViewer.js +0 -172
  18. package/dist/components/FBXLoader.js +0 -1574
  19. package/dist/components/GLTFLoader.js +0 -1383
  20. package/dist/components/ImageViewer.js +0 -1519
  21. package/dist/components/KMZLoader.js +0 -45
  22. package/dist/components/MarkdownViewer.js +0 -1476
  23. package/dist/components/ModelViewer.js +0 -797
  24. package/dist/components/OBJLoader.js +0 -287
  25. package/dist/components/OfdViewer.js +0 -133
  26. package/dist/components/PCDLoader.js +0 -141
  27. package/dist/components/PLYLoader.js +0 -305
  28. package/dist/components/PdfView.js +0 -27667
  29. package/dist/components/PptxRender.js +0 -11217
  30. package/dist/components/STLLoader.js +0 -83
  31. package/dist/components/TDSLoader.js +0 -228
  32. package/dist/components/TypstViewer.js +0 -1697
  33. package/dist/components/USDLoader.js +0 -2526
  34. package/dist/components/UmdViewer.js +0 -1873
  35. package/dist/components/VRMLLoader.js +0 -6422
  36. package/dist/components/VTKLoader.js +0 -337
  37. package/dist/components/XYZLoader.js +0 -30
  38. package/dist/components/XlsxTable.js +0 -7879
  39. package/dist/components/__vite-browser-external.js +0 -7
  40. package/dist/components/_plugin-vue_export-helper.js +0 -8
  41. package/dist/components/ar-SA-G6X2FPQ2.js +0 -523
  42. package/dist/components/arc.js +0 -79
  43. package/dist/components/architecture-7EHR7CIX.js +0 -3
  44. package/dist/components/architectureDiagram-3BPJPVTR.js +0 -4096
  45. package/dist/components/archive.js +0 -24
  46. package/dist/components/asyncToGenerator.js +0 -29
  47. package/dist/components/audio.js +0 -19
  48. package/dist/components/az-AZ-76LH7QW2.js +0 -523
  49. package/dist/components/bash.js +0 -169
  50. package/dist/components/bg-BG-XCXSNQG7.js +0 -523
  51. package/dist/components/blockDiagram-GPEHLZMM.js +0 -3357
  52. package/dist/components/bn-BD-2XOGV67Q.js +0 -523
  53. package/dist/components/c4Diagram-AAUBKEIU.js +0 -2957
  54. package/dist/components/ca-ES-6MX7JW3Y.js +0 -523
  55. package/dist/components/cad.js +0 -23
  56. package/dist/components/cfb.js +0 -1174
  57. package/dist/components/channel.js +0 -5
  58. package/dist/components/chunk-2J33WTMH.js +0 -26
  59. package/dist/components/chunk-3OPIFGDE.js +0 -4167
  60. package/dist/components/chunk-4BX2VUAB.js +0 -19
  61. package/dist/components/chunk-55IACEB6.js +0 -9
  62. package/dist/components/chunk-5ZQYHXKU.js +0 -669
  63. package/dist/components/chunk-6U3AYISY.js +0 -624
  64. package/dist/components/chunk-727SXJPM.js +0 -3356
  65. package/dist/components/chunk-AGHRB4JF.js +0 -324
  66. package/dist/components/chunk-AQP2D5EJ.js +0 -2055
  67. package/dist/components/chunk-BSJP7CBP.js +0 -83
  68. package/dist/components/chunk-CSCIHK7Q.js +0 -3500
  69. package/dist/components/chunk-EIO257PC.js +0 -1836
  70. package/dist/components/chunk-FMBD7UC4.js +0 -5
  71. package/dist/components/chunk-K2UTITRG.js +0 -17627
  72. package/dist/components/chunk-KSCS5N6A.js +0 -572
  73. package/dist/components/chunk-L5ZTLDWV.js +0 -40
  74. package/dist/components/chunk-LZXEDZCA.js +0 -60
  75. package/dist/components/chunk-ND2GUHAM.js +0 -61
  76. package/dist/components/chunk-NNHCCRGN.js +0 -20425
  77. package/dist/components/chunk-NZK2D7GU.js +0 -68
  78. package/dist/components/chunk-O5CBEL6O.js +0 -1894
  79. package/dist/components/chunk-QZHKN3VN.js +0 -12
  80. package/dist/components/chunk-SRAX5OIU.js +0 -22
  81. package/dist/components/chunk-WU5MYG2G.js +0 -14
  82. package/dist/components/chunk-XPW4576I.js +0 -1146
  83. package/dist/components/chunk-Z3N5DIM6.js +0 -59
  84. package/dist/components/chunk-ZUYEQ4TG.js +0 -22
  85. package/dist/components/chunk.js +0 -23
  86. package/dist/components/classDiagram-4FO5ZUOK.js +0 -29
  87. package/dist/components/classDiagram-v2-Q7XG4LA2.js +0 -29
  88. package/dist/components/compiler.js +0 -2
  89. package/dist/components/core.js +0 -845
  90. package/dist/components/cose-bilkent-S5V4N54A.js +0 -2268
  91. package/dist/components/cpp.js +0 -225
  92. package/dist/components/cs-CZ-2BRQDIVT.js +0 -523
  93. package/dist/components/csharp.js +0 -260
  94. package/dist/components/css.js +0 -140
  95. package/dist/components/cytoscape.esm.js +0 -18114
  96. package/dist/components/da-DK-5WZEPLOC.js +0 -523
  97. package/dist/components/dagre-BM42HDAG.js +0 -325
  98. package/dist/components/dagre.js +0 -1936
  99. package/dist/components/de-DE-XR44H4JA.js +0 -523
  100. package/dist/components/defaultLocale.js +0 -201
  101. package/dist/components/defineProperty.js +0 -50
  102. package/dist/components/diagram-2AECGRRQ.js +0 -229
  103. package/dist/components/diagram-5GNKFQAL.js +0 -108
  104. package/dist/components/diagram-KO2AKTUF.js +0 -443
  105. package/dist/components/diagram-LMA3HP47.js +0 -139
  106. package/dist/components/diagram-OG6HWLK6.js +0 -541
  107. package/dist/components/diff.js +0 -39
  108. package/dist/components/directory-open-01563666.js +0 -26
  109. package/dist/components/directory-open-4ed118d0.js +0 -83
  110. package/dist/components/dist.js +0 -50
  111. package/dist/components/dist2.js +0 -3291
  112. package/dist/components/dist3.js +0 -1593
  113. package/dist/components/documentSearch.js +0 -378
  114. package/dist/components/docx-preview.js +0 -3113
  115. package/dist/components/drawing.js +0 -19
  116. package/dist/components/ebook.js +0 -16
  117. package/dist/components/eda.js +0 -20
  118. package/dist/components/el-GR-BZB4AONW.js +0 -523
  119. package/dist/components/email.js +0 -21
  120. package/dist/components/en-B4ZKOASM.js +0 -3
  121. package/dist/components/erDiagram-TEJ5UH35.js +0 -1719
  122. package/dist/components/es-ES-U4NZUMDT.js +0 -523
  123. package/dist/components/eu-ES-A7QVB2H4.js +0 -523
  124. package/dist/components/eventmodeling-FCH6USID.js +0 -3
  125. package/dist/components/fa-IR-HGAKTJCU.js +0 -523
  126. package/dist/components/fflate.module.js +0 -323
  127. package/dist/components/fi-FI-Z5N7JZ37.js +0 -523
  128. package/dist/components/file-open-002ab408.js +0 -38
  129. package/dist/components/file-open-7c801643.js +0 -24
  130. package/dist/components/file-save-3189631c.js +0 -40
  131. package/dist/components/file-save-745eba88.js +0 -36
  132. package/dist/components/flowDiagram-I6XJVG4X.js +0 -4181
  133. package/dist/components/fr-FR-RHASNOE6.js +0 -523
  134. package/dist/components/ganttDiagram-6RSMTGT7.js +0 -2182
  135. package/dist/components/gitGraph-WXDBUCRP.js +0 -3
  136. package/dist/components/gitGraphDiagram-PVQCEYII.js +0 -788
  137. package/dist/components/gl-ES-HMX3MZ6V.js +0 -523
  138. package/dist/components/global-compiler.js +0 -23
  139. package/dist/components/global-renderer.js +0 -23
  140. package/dist/components/go.js +0 -140
  141. package/dist/components/graphlib.js +0 -1267
  142. package/dist/components/he-IL-6SHJWFNN.js +0 -523
  143. package/dist/components/hi-IN-IWLTKZ5I.js +0 -523
  144. package/dist/components/hu-HU-A5ZG7DT2.js +0 -523
  145. package/dist/components/id-ID-SAP4L64H.js +0 -523
  146. package/dist/components/image-GAAHSSAO.js +0 -3
  147. package/dist/components/image-blob-reduce.esm.js +0 -1429
  148. package/dist/components/image.js +0 -17
  149. package/dist/components/info-J43DQDTF.js +0 -3
  150. package/dist/components/infoDiagram-5YYISTIA.js +0 -26
  151. package/dist/components/ini.js +0 -88
  152. package/dist/components/init.js +0 -15
  153. package/dist/components/ishikawaDiagram-YF4QCWOH.js +0 -718
  154. package/dist/components/it-IT-JPQ66NNP.js +0 -523
  155. package/dist/components/ja-JP-DBVTYXUO.js +0 -523
  156. package/dist/components/java.js +0 -169
  157. package/dist/components/javascript.js +0 -436
  158. package/dist/components/journeyDiagram-JHISSGLW.js +0 -885
  159. package/dist/components/json.js +0 -36
  160. package/dist/components/jszip.min.js +0 -3033
  161. package/dist/components/kaa-6HZHGXH3.js +0 -523
  162. package/dist/components/kab-KAB-ZGHBKWFO.js +0 -523
  163. package/dist/components/kanban-definition-UN3LZRKU.js +0 -986
  164. package/dist/components/katex.js +0 -21979
  165. package/dist/components/kk-KZ-P5N5QNE5.js +0 -523
  166. package/dist/components/km-KH-HSX4SM5Z.js +0 -523
  167. package/dist/components/ko-KR-MTYHY66A.js +0 -523
  168. package/dist/components/ku-TR-6OUDTVRD.js +0 -523
  169. package/dist/components/lib.js +0 -4877
  170. package/dist/components/libarchive.js +0 -360
  171. package/dist/components/linear.js +0 -289
  172. package/dist/components/lt-LT-XHIRWOB4.js +0 -523
  173. package/dist/components/lv-LV-5QDEKY6T.js +0 -523
  174. package/dist/components/markdown.js +0 -181
  175. package/dist/components/md.js +0 -17
  176. package/dist/components/mermaid-parser.core.js +0 -328
  177. package/dist/components/mindmap-definition-RKZ34NQL.js +0 -1016
  178. package/dist/components/model.js +0 -21
  179. package/dist/components/mp4.js +0 -12
  180. package/dist/components/mr-IN-CRQNXWMA.js +0 -523
  181. package/dist/components/my-MM-5M5IBNSE.js +0 -523
  182. package/dist/components/nb-NO-T6EIAALU.js +0 -523
  183. package/dist/components/nestedRender.js +0 -158
  184. package/dist/components/nl-NL-IS3SIHDZ.js +0 -523
  185. package/dist/components/nn-NO-6E72VCQL.js +0 -523
  186. package/dist/components/objectSpread2.js +0 -29
  187. package/dist/components/objectWithoutProperties.js +0 -28
  188. package/dist/components/oc-FR-POXYY2M6.js +0 -523
  189. package/dist/components/ofd.js +0 -5261
  190. package/dist/components/ofd2.js +0 -16
  191. package/dist/components/ordinal.js +0 -65
  192. package/dist/components/pa-IN-N4M65BXN.js +0 -523
  193. package/dist/components/packet-YPE3B663.js +0 -3
  194. package/dist/components/pdf.js +0 -24
  195. package/dist/components/percentages-BXMCSKIN.js +0 -3
  196. package/dist/components/php.js +0 -294
  197. package/dist/components/pica.js +0 -1009
  198. package/dist/components/pie-LRSECV5Y.js +0 -3
  199. package/dist/components/pie.js +0 -47
  200. package/dist/components/pieDiagram-4H26LBE5.js +0 -130
  201. package/dist/components/pl-PL-T2D74RX3.js +0 -523
  202. package/dist/components/postal-mime.js +0 -3146
  203. package/dist/components/pptx.js +0 -15
  204. package/dist/components/printLayout.js +0 -42
  205. package/dist/components/prod.js +0 -21770
  206. package/dist/components/pt-BR-5N22H2LF.js +0 -523
  207. package/dist/components/pt-PT-UZXXM6DQ.js +0 -523
  208. package/dist/components/python.js +0 -238
  209. package/dist/components/quadrantDiagram-W4KKPZXB.js +0 -1988
  210. package/dist/components/radar-GUYGQ44K.js +0 -3
  211. package/dist/components/renderer.js +0 -2
  212. package/dist/components/requirementDiagram-4Y6WPE33.js +0 -2230
  213. package/dist/components/ro-RO-JPDTUUEW.js +0 -523
  214. package/dist/components/rough.esm.js +0 -1355
  215. package/dist/components/roundRect.js +0 -90
  216. package/dist/components/ru-RU-B4JR7IUQ.js +0 -523
  217. package/dist/components/rust.js +0 -169
  218. package/dist/components/sankeyDiagram-5OEKKPKP.js +0 -972
  219. package/dist/components/sequenceDiagram-3UESZ5HK.js +0 -4255
  220. package/dist/components/shared.js +0 -175
  221. package/dist/components/shared2.js +0 -4
  222. package/dist/components/si-LK-N5RQ5JYF.js +0 -523
  223. package/dist/components/sk-SK-C5VTKIMK.js +0 -523
  224. package/dist/components/sl-SI-NN7IZMDC.js +0 -523
  225. package/dist/components/sourceLoading.js +0 -134
  226. package/dist/components/sql.js +0 -118
  227. package/dist/components/src.js +0 -2664
  228. package/dist/components/src2.js +0 -10722
  229. package/dist/components/stateDiagram-AJRCARHV.js +0 -217
  230. package/dist/components/stateDiagram-v2-BHNVJYJU.js +0 -27
  231. package/dist/components/subset-shared.chunk.js +0 -3
  232. package/dist/components/subset-worker.chunk.js +0 -21
  233. package/dist/components/sv-SE-XGPEYMSR.js +0 -523
  234. package/dist/components/ta-IN-2NMHFXQM.js +0 -523
  235. package/dist/components/text.js +0 -20
  236. package/dist/components/th-TH-HPSO5L25.js +0 -523
  237. package/dist/components/three.module.js +0 -13134
  238. package/dist/components/time.js +0 -910
  239. package/dist/components/timeline-definition-PNZ67QCA.js +0 -1084
  240. package/dist/components/tr-TR-DEFEU3FU.js +0 -523
  241. package/dist/components/treeView-BLDUP644.js +0 -3
  242. package/dist/components/treemap-LRROVOQU.js +0 -3
  243. package/dist/components/typescript.js +0 -521
  244. package/dist/components/typst.js +0 -25
  245. package/dist/components/uk-UA-QMV73CPH.js +0 -523
  246. package/dist/components/umd.js +0 -16
  247. package/dist/components/use.js +0 -422
  248. package/dist/components/util.js +0 -49
  249. package/dist/components/vennDiagram-CIIHVFJN.js +0 -1880
  250. package/dist/components/vi-VN-M7AON7JQ.js +0 -523
  251. package/dist/components/viewerZoom.js +0 -92
  252. package/dist/components/wardley-L42UT6IY.js +0 -3
  253. package/dist/components/wardleyDiagram-YWT4CUSO.js +0 -656
  254. package/dist/components/wasm-pack-shim.js +0 -1711
  255. package/dist/components/wasm-pack-shim2.js +0 -934
  256. package/dist/components/wasm.js +0 -97
  257. package/dist/components/word.js +0 -3055
  258. package/dist/components/worker-ref.js +0 -16
  259. package/dist/components/xlsx.js +0 -21
  260. package/dist/components/xml.js +0 -166
  261. package/dist/components/xychartDiagram-2RQKCTM6.js +0 -2015
  262. package/dist/components/yaml.js +0 -144
  263. package/dist/components/zh-CN-LNUGB5OW.js +0 -523
  264. package/dist/components/zh-HK-E62DVLB3.js +0 -523
  265. package/dist/components/zh-TW-RAJ6MFWO.js +0 -523
  266. package/dist/index.mjs +0 -3293
  267. package/dist/src/App.vue.d.ts +0 -3
  268. package/dist/src/compare/CompareApp.vue.d.ts +0 -3
  269. package/dist/src/compare/main.d.ts +0 -0
  270. package/dist/src/compare/useSynchronizedScroll.d.ts +0 -7
  271. package/dist/src/components/HelloWorld.vue.d.ts +0 -3
  272. package/dist/src/components/utils.d.ts +0 -4
  273. package/dist/src/main.d.ts +0 -0
  274. package/dist/src/package/common/printCapability.d.ts +0 -27
  275. package/dist/src/package/common/printLayout.d.ts +0 -16
  276. package/dist/src/package/common/sourceLoading.d.ts +0 -10
  277. package/dist/src/package/common/type.d.ts +0 -544
  278. package/dist/src/package/common/util.d.ts +0 -5
  279. package/dist/src/package/common/worker-ref.d.ts +0 -12
  280. package/dist/src/package/components/FileViewer/FileViewer.vue.d.ts +0 -75
  281. package/dist/src/package/components/FileViewer/exportDocumentTemplate.d.ts +0 -9
  282. package/dist/src/package/components/FileViewer/hooks/useViewerDocumentFeatures.d.ts +0 -29
  283. package/dist/src/package/components/FileViewer/hooks/useViewerExport.d.ts +0 -21
  284. package/dist/src/package/components/FileViewer/hooks/useViewerWatermark.d.ts +0 -8
  285. package/dist/src/package/components/FileViewer/hooks/useViewerZoom.d.ts +0 -34
  286. package/dist/src/package/components/FileViewer/index.d.ts +0 -2
  287. package/dist/src/package/components/FileViewer/util.d.ts +0 -3
  288. package/dist/src/package/index.d.ts +0 -22
  289. package/dist/src/package/use/documentLocation.d.ts +0 -15
  290. package/dist/src/package/use/documentSearch.d.ts +0 -234
  291. package/dist/src/package/use/index.d.ts +0 -5
  292. package/dist/src/package/use/loading.d.ts +0 -33
  293. package/dist/src/package/use/viewerZoom.d.ts +0 -42
  294. package/dist/src/package/use/worker.d.ts +0 -24
  295. package/dist/src/package/vendors/archive/ArchiveViewer.vue.d.ts +0 -9
  296. package/dist/src/package/vendors/archive/cache.d.ts +0 -10
  297. package/dist/src/package/vendors/archive/fallback.d.ts +0 -9
  298. package/dist/src/package/vendors/archive/index.d.ts +0 -3
  299. package/dist/src/package/vendors/archive/shared.d.ts +0 -24
  300. package/dist/src/package/vendors/audio/AudioViewer.vue.d.ts +0 -7
  301. package/dist/src/package/vendors/audio/index.d.ts +0 -7
  302. package/dist/src/package/vendors/cad/CadViewer.vue.d.ts +0 -9
  303. package/dist/src/package/vendors/cad/index.d.ts +0 -8
  304. package/dist/src/package/vendors/drawing/DrawingViewer.vue.d.ts +0 -15
  305. package/dist/src/package/vendors/drawing/index.d.ts +0 -7
  306. package/dist/src/package/vendors/ebook/EpubViewer.vue.d.ts +0 -6
  307. package/dist/src/package/vendors/ebook/index.d.ts +0 -7
  308. package/dist/src/package/vendors/eda/EdaViewer.vue.d.ts +0 -8
  309. package/dist/src/package/vendors/eda/index.d.ts +0 -2
  310. package/dist/src/package/vendors/eda/parser.d.ts +0 -77
  311. package/dist/src/package/vendors/email/EmailViewer.vue.d.ts +0 -10
  312. package/dist/src/package/vendors/email/index.d.ts +0 -2
  313. package/dist/src/package/vendors/image/ImageViewer.vue.d.ts +0 -6
  314. package/dist/src/package/vendors/image/index.d.ts +0 -4
  315. package/dist/src/package/vendors/md/MarkdownViewer.vue.d.ts +0 -6
  316. package/dist/src/package/vendors/md/index.d.ts +0 -4
  317. package/dist/src/package/vendors/model/ModelViewer.vue.d.ts +0 -8
  318. package/dist/src/package/vendors/model/index.d.ts +0 -3
  319. package/dist/src/package/vendors/model/shared.d.ts +0 -1
  320. package/dist/src/package/vendors/mp4/index.d.ts +0 -4
  321. package/dist/src/package/vendors/nestedRender.d.ts +0 -10
  322. package/dist/src/package/vendors/ofd/OfdViewer.vue.d.ts +0 -6
  323. package/dist/src/package/vendors/ofd/index.d.ts +0 -7
  324. package/dist/src/package/vendors/pdf/PdfView.vue.d.ts +0 -10
  325. package/dist/src/package/vendors/pdf/index.d.ts +0 -2
  326. package/dist/src/package/vendors/pdf/worker/index.d.ts +0 -4
  327. package/dist/src/package/vendors/pdf/worker/pdf.worker.d.ts +0 -0
  328. package/dist/src/package/vendors/pptx/PptxRender.vue.d.ts +0 -9
  329. package/dist/src/package/vendors/pptx/index.d.ts +0 -6
  330. package/dist/src/package/vendors/pptx/options.d.ts +0 -39
  331. package/dist/src/package/vendors/pptx/support/chart.d.ts +0 -4
  332. package/dist/src/package/vendors/pptx/worker/index.d.ts +0 -4
  333. package/dist/src/package/vendors/renders.d.ts +0 -3
  334. package/dist/src/package/vendors/text/CodeViewer.vue.d.ts +0 -7
  335. package/dist/src/package/vendors/text/index.d.ts +0 -10
  336. package/dist/src/package/vendors/typst/TypstViewer.vue.d.ts +0 -15
  337. package/dist/src/package/vendors/typst/index.d.ts +0 -8
  338. package/dist/src/package/vendors/umd/UmdViewer.vue.d.ts +0 -6
  339. package/dist/src/package/vendors/umd/index.d.ts +0 -7
  340. package/dist/src/package/vendors/umd/parser.d.ts +0 -30
  341. package/dist/src/package/vendors/word/doc.d.ts +0 -5
  342. package/dist/src/package/vendors/word/docx.d.ts +0 -5
  343. package/dist/src/package/vendors/word/docx.worker.d.ts +0 -1
  344. package/dist/src/package/vendors/word/index.d.ts +0 -3
  345. package/dist/src/package/vendors/xlsx/XlsxTable.state.d.ts +0 -80
  346. package/dist/src/package/vendors/xlsx/XlsxTable.view.d.ts +0 -25
  347. package/dist/src/package/vendors/xlsx/XlsxTable.vue.d.ts +0 -6
  348. package/dist/src/package/vendors/xlsx/index.d.ts +0 -6
  349. package/dist/src/package/vendors/xlsx/util.d.ts +0 -3
  350. package/dist/src/package/vendors/xlsx/worker/index.d.ts +0 -4
  351. package/dist/src/package/vendors/xlsx/worker/sheetjs/SheetJsModel.d.ts +0 -73
  352. package/dist/src/package/vendors/xlsx/worker/sheetjs/color.d.ts +0 -2
  353. package/dist/src/package/vendors/xlsx/worker/sheetjs/index.d.ts +0 -4
  354. package/dist/src/package/vendors/xlsx/worker/sheetjs/sheet.worker.d.ts +0 -1
  355. package/dist/style.css +0 -1
  356. package/dist/wasm/cad/dwfv-render.wasm +0 -0
  357. package/dist/wasm/cad/dwg-worker.js +0 -24
  358. package/dist/wasm/cad/libredwg-web.js +0 -15
  359. package/dist/wasm/cad/libredwg-web.wasm +0 -0
@@ -1,3357 +0,0 @@
1
- import { n as e, t } from "./objectSpread2.js";
2
- import { n, t as r } from "./asyncToGenerator.js";
3
- import { n as i, r as a } from "./chunk-AGHRB4JF.js";
4
- import { O as o, T as s, a as c, b as l, c as u, it as d, s as f, x as p, z as m } from "./chunk-CSCIHK7Q.js";
5
- import { t as h } from "./channel.js";
6
- import { Q as g, _, v } from "./src.js";
7
- import { A as y, B as b, C as x, D as S, E as C, F as w, H as T, I as E, L as D, M as O, N as k, O as ee, P as A, R as te, S as ne, T as re, U as ie, V as ae, W as oe, a as se, g as j, j as ce, k as le, l as ue, v as de, w as fe, x as pe, z as me } from "./chunk-5ZQYHXKU.js";
8
- import { n as he, t as M } from "./chunk-BSJP7CBP.js";
9
- import { n as ge, t as _e } from "./chunk-L5ZTLDWV.js";
10
- import { n as ve } from "./chunk-O5CBEL6O.js";
11
- import { t as ye } from "./chunk-FMBD7UC4.js";
12
- import { t as be } from "./graphlib.js";
13
- //#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/predicate/isArray.mjs
14
- function xe(e) {
15
- return Array.isArray(e);
16
- }
17
- //#endregion
18
- //#region node_modules/.pnpm/es-toolkit@1.46.1/node_modules/es-toolkit/dist/compat/object/clone.mjs
19
- function Se(e) {
20
- if (oe(e)) return e;
21
- let t = ie(e);
22
- if (!Ce(e)) return {};
23
- if (xe(e)) {
24
- let t = Array.from(e);
25
- return e.length > 0 && typeof e[0] == "string" && Object.hasOwn(e, "index") && (t.index = e.index, t.input = e.input), t;
26
- }
27
- if (de(e)) {
28
- let t = e, n = t.constructor;
29
- return new n(t.buffer, t.byteOffset, t.length);
30
- }
31
- if (t === "[object ArrayBuffer]") return new ArrayBuffer(e.byteLength);
32
- if (t === "[object DataView]") {
33
- let t = e, n = t.buffer, r = t.byteOffset, i = t.byteLength, a = new ArrayBuffer(i), o = new Uint8Array(n, r, i);
34
- return new Uint8Array(a).set(o), new DataView(a);
35
- }
36
- if (t === "[object Boolean]" || t === "[object Number]" || t === "[object String]") {
37
- let n = e.constructor, r = new n(e.valueOf());
38
- return t === "[object String]" ? Te(r, e) : N(r, e), r;
39
- }
40
- if (t === "[object Date]") return new Date(Number(e));
41
- if (t === "[object RegExp]") {
42
- let t = e, n = new RegExp(t.source, t.flags);
43
- return n.lastIndex = t.lastIndex, n;
44
- }
45
- if (t === "[object Symbol]") return Object(Symbol.prototype.valueOf.call(e));
46
- if (t === "[object Map]") {
47
- let t = e, n = /* @__PURE__ */ new Map();
48
- return t.forEach((e, t) => {
49
- n.set(t, e);
50
- }), n;
51
- }
52
- if (t === "[object Set]") {
53
- let t = e, n = /* @__PURE__ */ new Set();
54
- return t.forEach((e) => {
55
- n.add(e);
56
- }), n;
57
- }
58
- if (t === "[object Arguments]") {
59
- let t = e, n = {};
60
- return N(n, t), n.length = t.length, n[Symbol.iterator] = t[Symbol.iterator], n;
61
- }
62
- let n = {};
63
- return Ee(n, e), N(n, e), we(n, e), n;
64
- }
65
- function Ce(e) {
66
- switch (ie(e)) {
67
- case pe:
68
- case x:
69
- case ne:
70
- case re:
71
- case fe:
72
- case C:
73
- case S:
74
- case ee:
75
- case ce:
76
- case le:
77
- case y:
78
- case O:
79
- case k:
80
- case A:
81
- case w:
82
- case E:
83
- case D:
84
- case te:
85
- case ae:
86
- case T:
87
- case me:
88
- case b: return !0;
89
- default: return !1;
90
- }
91
- }
92
- function N(e, t) {
93
- for (let n in t) Object.hasOwn(t, n) && (e[n] = t[n]);
94
- }
95
- function we(e, t) {
96
- let n = Object.getOwnPropertySymbols(t);
97
- for (let r = 0; r < n.length; r++) {
98
- let i = n[r];
99
- Object.prototype.propertyIsEnumerable.call(t, i) && (e[i] = t[i]);
100
- }
101
- }
102
- function Te(e, t) {
103
- let n = t.valueOf().length;
104
- for (let r in t) Object.hasOwn(t, r) && (Number.isNaN(Number(r)) || Number(r) >= n) && (e[r] = t[r]);
105
- }
106
- function Ee(e, t) {
107
- let n = Object.getPrototypeOf(t);
108
- n !== null && typeof t.constructor == "function" && Object.setPrototypeOf(e, n);
109
- }
110
- e(), n();
111
- var De, P, F = (function() {
112
- var e = /* @__PURE__ */ i(function(e, t, n, r) {
113
- for (n = n || {}, r = e.length; r--; n[e[r]] = t);
114
- return n;
115
- }, "o"), n = [1, 15], r = [1, 7], a = [1, 13], o = [1, 14], s = [1, 19], c = [1, 16], l = [1, 17], u = [1, 18], d = [8, 30], f = [
116
- 8,
117
- 10,
118
- 21,
119
- 28,
120
- 29,
121
- 30,
122
- 31,
123
- 39,
124
- 43,
125
- 46
126
- ], p = [1, 23], m = [1, 24], h = [
127
- 8,
128
- 10,
129
- 15,
130
- 16,
131
- 21,
132
- 28,
133
- 29,
134
- 30,
135
- 31,
136
- 39,
137
- 43,
138
- 46
139
- ], g = [
140
- 8,
141
- 10,
142
- 15,
143
- 16,
144
- 21,
145
- 27,
146
- 28,
147
- 29,
148
- 30,
149
- 31,
150
- 39,
151
- 43,
152
- 46
153
- ], _ = [1, 49], v = {
154
- trace: /* @__PURE__ */ i(function() {}, "trace"),
155
- yy: {},
156
- symbols_: {
157
- error: 2,
158
- spaceLines: 3,
159
- SPACELINE: 4,
160
- NL: 5,
161
- separator: 6,
162
- SPACE: 7,
163
- EOF: 8,
164
- start: 9,
165
- BLOCK_DIAGRAM_KEY: 10,
166
- document: 11,
167
- stop: 12,
168
- statement: 13,
169
- link: 14,
170
- LINK: 15,
171
- START_LINK: 16,
172
- LINK_LABEL: 17,
173
- STR: 18,
174
- nodeStatement: 19,
175
- columnsStatement: 20,
176
- SPACE_BLOCK: 21,
177
- blockStatement: 22,
178
- classDefStatement: 23,
179
- cssClassStatement: 24,
180
- styleStatement: 25,
181
- node: 26,
182
- SIZE: 27,
183
- COLUMNS: 28,
184
- "id-block": 29,
185
- end: 30,
186
- NODE_ID: 31,
187
- nodeShapeNLabel: 32,
188
- dirList: 33,
189
- DIR: 34,
190
- NODE_DSTART: 35,
191
- NODE_DEND: 36,
192
- BLOCK_ARROW_START: 37,
193
- BLOCK_ARROW_END: 38,
194
- classDef: 39,
195
- CLASSDEF_ID: 40,
196
- CLASSDEF_STYLEOPTS: 41,
197
- DEFAULT: 42,
198
- class: 43,
199
- CLASSENTITY_IDS: 44,
200
- STYLECLASS: 45,
201
- style: 46,
202
- STYLE_ENTITY_IDS: 47,
203
- STYLE_DEFINITION_DATA: 48,
204
- $accept: 0,
205
- $end: 1
206
- },
207
- terminals_: {
208
- 2: "error",
209
- 4: "SPACELINE",
210
- 5: "NL",
211
- 7: "SPACE",
212
- 8: "EOF",
213
- 10: "BLOCK_DIAGRAM_KEY",
214
- 15: "LINK",
215
- 16: "START_LINK",
216
- 17: "LINK_LABEL",
217
- 18: "STR",
218
- 21: "SPACE_BLOCK",
219
- 27: "SIZE",
220
- 28: "COLUMNS",
221
- 29: "id-block",
222
- 30: "end",
223
- 31: "NODE_ID",
224
- 34: "DIR",
225
- 35: "NODE_DSTART",
226
- 36: "NODE_DEND",
227
- 37: "BLOCK_ARROW_START",
228
- 38: "BLOCK_ARROW_END",
229
- 39: "classDef",
230
- 40: "CLASSDEF_ID",
231
- 41: "CLASSDEF_STYLEOPTS",
232
- 42: "DEFAULT",
233
- 43: "class",
234
- 44: "CLASSENTITY_IDS",
235
- 45: "STYLECLASS",
236
- 46: "style",
237
- 47: "STYLE_ENTITY_IDS",
238
- 48: "STYLE_DEFINITION_DATA"
239
- },
240
- productions_: [
241
- 0,
242
- [3, 1],
243
- [3, 2],
244
- [3, 2],
245
- [6, 1],
246
- [6, 1],
247
- [6, 1],
248
- [9, 3],
249
- [12, 1],
250
- [12, 1],
251
- [12, 2],
252
- [12, 2],
253
- [11, 1],
254
- [11, 2],
255
- [14, 1],
256
- [14, 4],
257
- [13, 1],
258
- [13, 1],
259
- [13, 1],
260
- [13, 1],
261
- [13, 1],
262
- [13, 1],
263
- [13, 1],
264
- [19, 3],
265
- [19, 2],
266
- [19, 1],
267
- [20, 1],
268
- [22, 4],
269
- [22, 3],
270
- [26, 1],
271
- [26, 2],
272
- [33, 1],
273
- [33, 2],
274
- [32, 3],
275
- [32, 4],
276
- [23, 3],
277
- [23, 3],
278
- [24, 3],
279
- [25, 3]
280
- ],
281
- performAction: /* @__PURE__ */ i(function(e, n, r, i, a, o, s) {
282
- var c = o.length - 1;
283
- switch (a) {
284
- case 4:
285
- i.getLogger().debug("Rule: separator (NL) ");
286
- break;
287
- case 5:
288
- i.getLogger().debug("Rule: separator (Space) ");
289
- break;
290
- case 6:
291
- i.getLogger().debug("Rule: separator (EOF) ");
292
- break;
293
- case 7:
294
- i.getLogger().debug("Rule: hierarchy: ", o[c - 1]), i.setHierarchy(o[c - 1]);
295
- break;
296
- case 8:
297
- i.getLogger().debug("Stop NL ");
298
- break;
299
- case 9:
300
- i.getLogger().debug("Stop EOF ");
301
- break;
302
- case 10:
303
- i.getLogger().debug("Stop NL2 ");
304
- break;
305
- case 11:
306
- i.getLogger().debug("Stop EOF2 ");
307
- break;
308
- case 12:
309
- i.getLogger().debug("Rule: statement: ", o[c]), typeof o[c].length == "number" ? this.$ = o[c] : this.$ = [o[c]];
310
- break;
311
- case 13:
312
- i.getLogger().debug("Rule: statement #2: ", o[c - 1]), this.$ = [o[c - 1]].concat(o[c]);
313
- break;
314
- case 14:
315
- i.getLogger().debug("Rule: link: ", o[c], e), this.$ = {
316
- edgeTypeStr: o[c],
317
- label: ""
318
- };
319
- break;
320
- case 15:
321
- i.getLogger().debug("Rule: LABEL link: ", o[c - 3], o[c - 1], o[c]), this.$ = {
322
- edgeTypeStr: o[c],
323
- label: o[c - 1]
324
- };
325
- break;
326
- case 18:
327
- let n = parseInt(o[c]), r = i.generateId();
328
- this.$ = {
329
- id: r,
330
- type: "space",
331
- label: "",
332
- width: n,
333
- children: []
334
- };
335
- break;
336
- case 23:
337
- i.getLogger().debug("Rule: (nodeStatement link node) ", o[c - 2], o[c - 1], o[c], " typestr: ", o[c - 1].edgeTypeStr);
338
- let a = i.edgeStrToEdgeData(o[c - 1].edgeTypeStr), s = i.edgeStrToEdgeStartData(o[c - 1].edgeTypeStr), l = i.edgeStrToThickness(o[c - 1].edgeTypeStr), u = i.edgeStrToPattern(o[c - 1].edgeTypeStr);
339
- this.$ = [
340
- {
341
- id: o[c - 2].id,
342
- label: o[c - 2].label,
343
- type: o[c - 2].type,
344
- directions: o[c - 2].directions
345
- },
346
- {
347
- id: o[c - 2].id + "-" + o[c].id,
348
- start: o[c - 2].id,
349
- end: o[c].id,
350
- label: o[c - 1].label,
351
- type: "edge",
352
- thickness: l,
353
- pattern: u,
354
- directions: o[c].directions,
355
- arrowTypeEnd: a,
356
- arrowTypeStart: s
357
- },
358
- {
359
- id: o[c].id,
360
- label: o[c].label,
361
- type: i.typeStr2Type(o[c].typeStr),
362
- directions: o[c].directions
363
- }
364
- ];
365
- break;
366
- case 24:
367
- i.getLogger().debug("Rule: nodeStatement (abc88 node size) ", o[c - 1], o[c]), this.$ = {
368
- id: o[c - 1].id,
369
- label: o[c - 1].label,
370
- type: i.typeStr2Type(o[c - 1].typeStr),
371
- directions: o[c - 1].directions,
372
- widthInColumns: parseInt(o[c], 10)
373
- };
374
- break;
375
- case 25:
376
- i.getLogger().debug("Rule: nodeStatement (node) ", o[c]), this.$ = {
377
- id: o[c].id,
378
- label: o[c].label,
379
- type: i.typeStr2Type(o[c].typeStr),
380
- directions: o[c].directions,
381
- widthInColumns: 1
382
- };
383
- break;
384
- case 26:
385
- i.getLogger().debug("APA123", this ? this : "na"), i.getLogger().debug("COLUMNS: ", o[c]), this.$ = {
386
- type: "column-setting",
387
- columns: o[c] === "auto" ? -1 : parseInt(o[c])
388
- };
389
- break;
390
- case 27:
391
- i.getLogger().debug("Rule: id-block statement : ", o[c - 2], o[c - 1]), i.generateId(), this.$ = t(t({}, o[c - 2]), {}, {
392
- type: "composite",
393
- children: o[c - 1]
394
- });
395
- break;
396
- case 28:
397
- i.getLogger().debug("Rule: blockStatement : ", o[c - 2], o[c - 1], o[c]);
398
- let d = i.generateId();
399
- this.$ = {
400
- id: d,
401
- type: "composite",
402
- label: "",
403
- children: o[c - 1]
404
- };
405
- break;
406
- case 29:
407
- i.getLogger().debug("Rule: node (NODE_ID separator): ", o[c]), this.$ = { id: o[c] };
408
- break;
409
- case 30:
410
- i.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ", o[c - 1], o[c]), this.$ = {
411
- id: o[c - 1],
412
- label: o[c].label,
413
- typeStr: o[c].typeStr,
414
- directions: o[c].directions
415
- };
416
- break;
417
- case 31:
418
- i.getLogger().debug("Rule: dirList: ", o[c]), this.$ = [o[c]];
419
- break;
420
- case 32:
421
- i.getLogger().debug("Rule: dirList: ", o[c - 1], o[c]), this.$ = [o[c - 1]].concat(o[c]);
422
- break;
423
- case 33:
424
- i.getLogger().debug("Rule: nodeShapeNLabel: ", o[c - 2], o[c - 1], o[c]), this.$ = {
425
- typeStr: o[c - 2] + o[c],
426
- label: o[c - 1]
427
- };
428
- break;
429
- case 34:
430
- i.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ", o[c - 3], o[c - 2], " #3:", o[c - 1], o[c]), this.$ = {
431
- typeStr: o[c - 3] + o[c],
432
- label: o[c - 2],
433
- directions: o[c - 1]
434
- };
435
- break;
436
- case 35:
437
- case 36:
438
- this.$ = {
439
- type: "classDef",
440
- id: o[c - 1].trim(),
441
- css: o[c].trim()
442
- };
443
- break;
444
- case 37:
445
- this.$ = {
446
- type: "applyClass",
447
- id: o[c - 1].trim(),
448
- styleClass: o[c].trim()
449
- };
450
- break;
451
- case 38:
452
- this.$ = {
453
- type: "applyStyles",
454
- id: o[c - 1].trim(),
455
- stylesStr: o[c].trim()
456
- };
457
- break;
458
- }
459
- }, "anonymous"),
460
- table: [
461
- {
462
- 9: 1,
463
- 10: [1, 2]
464
- },
465
- { 1: [3] },
466
- {
467
- 10: n,
468
- 11: 3,
469
- 13: 4,
470
- 19: 5,
471
- 20: 6,
472
- 21: r,
473
- 22: 8,
474
- 23: 9,
475
- 24: 10,
476
- 25: 11,
477
- 26: 12,
478
- 28: a,
479
- 29: o,
480
- 31: s,
481
- 39: c,
482
- 43: l,
483
- 46: u
484
- },
485
- { 8: [1, 20] },
486
- e(d, [2, 12], {
487
- 13: 4,
488
- 19: 5,
489
- 20: 6,
490
- 22: 8,
491
- 23: 9,
492
- 24: 10,
493
- 25: 11,
494
- 26: 12,
495
- 11: 21,
496
- 10: n,
497
- 21: r,
498
- 28: a,
499
- 29: o,
500
- 31: s,
501
- 39: c,
502
- 43: l,
503
- 46: u
504
- }),
505
- e(f, [2, 16], {
506
- 14: 22,
507
- 15: p,
508
- 16: m
509
- }),
510
- e(f, [2, 17]),
511
- e(f, [2, 18]),
512
- e(f, [2, 19]),
513
- e(f, [2, 20]),
514
- e(f, [2, 21]),
515
- e(f, [2, 22]),
516
- e(h, [2, 25], { 27: [1, 25] }),
517
- e(f, [2, 26]),
518
- {
519
- 19: 26,
520
- 26: 12,
521
- 31: s
522
- },
523
- {
524
- 10: n,
525
- 11: 27,
526
- 13: 4,
527
- 19: 5,
528
- 20: 6,
529
- 21: r,
530
- 22: 8,
531
- 23: 9,
532
- 24: 10,
533
- 25: 11,
534
- 26: 12,
535
- 28: a,
536
- 29: o,
537
- 31: s,
538
- 39: c,
539
- 43: l,
540
- 46: u
541
- },
542
- {
543
- 40: [1, 28],
544
- 42: [1, 29]
545
- },
546
- { 44: [1, 30] },
547
- { 47: [1, 31] },
548
- e(g, [2, 29], {
549
- 32: 32,
550
- 35: [1, 33],
551
- 37: [1, 34]
552
- }),
553
- { 1: [2, 7] },
554
- e(d, [2, 13]),
555
- {
556
- 26: 35,
557
- 31: s
558
- },
559
- { 31: [2, 14] },
560
- { 17: [1, 36] },
561
- e(h, [2, 24]),
562
- {
563
- 10: n,
564
- 11: 37,
565
- 13: 4,
566
- 14: 22,
567
- 15: p,
568
- 16: m,
569
- 19: 5,
570
- 20: 6,
571
- 21: r,
572
- 22: 8,
573
- 23: 9,
574
- 24: 10,
575
- 25: 11,
576
- 26: 12,
577
- 28: a,
578
- 29: o,
579
- 31: s,
580
- 39: c,
581
- 43: l,
582
- 46: u
583
- },
584
- { 30: [1, 38] },
585
- { 41: [1, 39] },
586
- { 41: [1, 40] },
587
- { 45: [1, 41] },
588
- { 48: [1, 42] },
589
- e(g, [2, 30]),
590
- { 18: [1, 43] },
591
- { 18: [1, 44] },
592
- e(h, [2, 23]),
593
- { 18: [1, 45] },
594
- { 30: [1, 46] },
595
- e(f, [2, 28]),
596
- e(f, [2, 35]),
597
- e(f, [2, 36]),
598
- e(f, [2, 37]),
599
- e(f, [2, 38]),
600
- { 36: [1, 47] },
601
- {
602
- 33: 48,
603
- 34: _
604
- },
605
- { 15: [1, 50] },
606
- e(f, [2, 27]),
607
- e(g, [2, 33]),
608
- { 38: [1, 51] },
609
- {
610
- 33: 52,
611
- 34: _,
612
- 38: [2, 31]
613
- },
614
- { 31: [2, 15] },
615
- e(g, [2, 34]),
616
- { 38: [2, 32] }
617
- ],
618
- defaultActions: {
619
- 20: [2, 7],
620
- 23: [2, 14],
621
- 50: [2, 15],
622
- 52: [2, 32]
623
- },
624
- parseError: /* @__PURE__ */ i(function(e, t) {
625
- if (t.recoverable) this.trace(e);
626
- else {
627
- var n = Error(e);
628
- throw n.hash = t, n;
629
- }
630
- }, "parseError"),
631
- parse: /* @__PURE__ */ i(function(e) {
632
- var t = this, n = [0], r = [], a = [null], o = [], s = this.table, c = "", l = 0, u = 0, d = 0, f = 2, p = 1, m = o.slice.call(arguments, 1), h = Object.create(this.lexer), g = { yy: {} };
633
- for (var _ in this.yy) Object.prototype.hasOwnProperty.call(this.yy, _) && (g.yy[_] = this.yy[_]);
634
- h.setInput(e, g.yy), g.yy.lexer = h, g.yy.parser = this, h.yylloc === void 0 && (h.yylloc = {});
635
- var v = h.yylloc;
636
- o.push(v);
637
- var y = h.options && h.options.ranges;
638
- typeof g.yy.parseError == "function" ? this.parseError = g.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
639
- function b(e) {
640
- n.length -= 2 * e, a.length -= e, o.length -= e;
641
- }
642
- i(b, "popStack");
643
- function x() {
644
- var e = r.pop() || h.lex() || p;
645
- return typeof e != "number" && (e instanceof Array && (r = e, e = r.pop()), e = t.symbols_[e] || e), e;
646
- }
647
- i(x, "lex");
648
- for (var S, C, w, T, E, D = {}, O, k, ee, A;;) {
649
- if (w = n[n.length - 1], this.defaultActions[w] ? T = this.defaultActions[w] : (S == null && (S = x()), T = s[w] && s[w][S]), T === void 0 || !T.length || !T[0]) {
650
- var te = "";
651
- for (O in A = [], s[w]) this.terminals_[O] && O > f && A.push("'" + this.terminals_[O] + "'");
652
- te = h.showPosition ? "Parse error on line " + (l + 1) + ":\n" + h.showPosition() + "\nExpecting " + A.join(", ") + ", got '" + (this.terminals_[S] || S) + "'" : "Parse error on line " + (l + 1) + ": Unexpected " + (S == p ? "end of input" : "'" + (this.terminals_[S] || S) + "'"), this.parseError(te, {
653
- text: h.match,
654
- token: this.terminals_[S] || S,
655
- line: h.yylineno,
656
- loc: v,
657
- expected: A
658
- });
659
- }
660
- if (T[0] instanceof Array && T.length > 1) throw Error("Parse Error: multiple actions possible at state: " + w + ", token: " + S);
661
- switch (T[0]) {
662
- case 1:
663
- n.push(S), a.push(h.yytext), o.push(h.yylloc), n.push(T[1]), S = null, C ? (S = C, C = null) : (u = h.yyleng, c = h.yytext, l = h.yylineno, v = h.yylloc, d > 0 && d--);
664
- break;
665
- case 2:
666
- if (k = this.productions_[T[1]][1], D.$ = a[a.length - k], D._$ = {
667
- first_line: o[o.length - (k || 1)].first_line,
668
- last_line: o[o.length - 1].last_line,
669
- first_column: o[o.length - (k || 1)].first_column,
670
- last_column: o[o.length - 1].last_column
671
- }, y && (D._$.range = [o[o.length - (k || 1)].range[0], o[o.length - 1].range[1]]), E = this.performAction.apply(D, [
672
- c,
673
- u,
674
- l,
675
- g.yy,
676
- T[1],
677
- a,
678
- o
679
- ].concat(m)), E !== void 0) return E;
680
- k && (n = n.slice(0, -1 * k * 2), a = a.slice(0, -1 * k), o = o.slice(0, -1 * k)), n.push(this.productions_[T[1]][0]), a.push(D.$), o.push(D._$), ee = s[n[n.length - 2]][n[n.length - 1]], n.push(ee);
681
- break;
682
- case 3: return !0;
683
- }
684
- }
685
- return !0;
686
- }, "parse")
687
- };
688
- v.lexer = /* @__PURE__ */ (function() {
689
- return {
690
- EOF: 1,
691
- parseError: /* @__PURE__ */ i(function(e, t) {
692
- if (this.yy.parser) this.yy.parser.parseError(e, t);
693
- else throw Error(e);
694
- }, "parseError"),
695
- setInput: /* @__PURE__ */ i(function(e, t) {
696
- return this.yy = t || this.yy || {}, this._input = e, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
697
- first_line: 1,
698
- first_column: 0,
699
- last_line: 1,
700
- last_column: 0
701
- }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
702
- }, "setInput"),
703
- input: /* @__PURE__ */ i(function() {
704
- var e = this._input[0];
705
- return this.yytext += e, this.yyleng++, this.offset++, this.match += e, this.matched += e, e.match(/(?:\r\n?|\n).*/g) ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), e;
706
- }, "input"),
707
- unput: /* @__PURE__ */ i(function(e) {
708
- var t = e.length, n = e.split(/(?:\r\n?|\n)/g);
709
- this._input = e + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - t), this.offset -= t;
710
- var r = this.match.split(/(?:\r\n?|\n)/g);
711
- this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), n.length - 1 && (this.yylineno -= n.length - 1);
712
- var i = this.yylloc.range;
713
- return this.yylloc = {
714
- first_line: this.yylloc.first_line,
715
- last_line: this.yylineno + 1,
716
- first_column: this.yylloc.first_column,
717
- last_column: n ? (n.length === r.length ? this.yylloc.first_column : 0) + r[r.length - n.length].length - n[0].length : this.yylloc.first_column - t
718
- }, this.options.ranges && (this.yylloc.range = [i[0], i[0] + this.yyleng - t]), this.yyleng = this.yytext.length, this;
719
- }, "unput"),
720
- more: /* @__PURE__ */ i(function() {
721
- return this._more = !0, this;
722
- }, "more"),
723
- reject: /* @__PURE__ */ i(function() {
724
- if (this.options.backtrack_lexer) this._backtrack = !0;
725
- else return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), {
726
- text: "",
727
- token: null,
728
- line: this.yylineno
729
- });
730
- return this;
731
- }, "reject"),
732
- less: /* @__PURE__ */ i(function(e) {
733
- this.unput(this.match.slice(e));
734
- }, "less"),
735
- pastInput: /* @__PURE__ */ i(function() {
736
- var e = this.matched.substr(0, this.matched.length - this.match.length);
737
- return (e.length > 20 ? "..." : "") + e.substr(-20).replace(/\n/g, "");
738
- }, "pastInput"),
739
- upcomingInput: /* @__PURE__ */ i(function() {
740
- var e = this.match;
741
- return e.length < 20 && (e += this._input.substr(0, 20 - e.length)), (e.substr(0, 20) + (e.length > 20 ? "..." : "")).replace(/\n/g, "");
742
- }, "upcomingInput"),
743
- showPosition: /* @__PURE__ */ i(function() {
744
- var e = this.pastInput(), t = Array(e.length + 1).join("-");
745
- return e + this.upcomingInput() + "\n" + t + "^";
746
- }, "showPosition"),
747
- test_match: /* @__PURE__ */ i(function(e, t) {
748
- var n, r, i;
749
- if (this.options.backtrack_lexer && (i = {
750
- yylineno: this.yylineno,
751
- yylloc: {
752
- first_line: this.yylloc.first_line,
753
- last_line: this.last_line,
754
- first_column: this.yylloc.first_column,
755
- last_column: this.yylloc.last_column
756
- },
757
- yytext: this.yytext,
758
- match: this.match,
759
- matches: this.matches,
760
- matched: this.matched,
761
- yyleng: this.yyleng,
762
- offset: this.offset,
763
- _more: this._more,
764
- _input: this._input,
765
- yy: this.yy,
766
- conditionStack: this.conditionStack.slice(0),
767
- done: this.done
768
- }, this.options.ranges && (i.yylloc.range = this.yylloc.range.slice(0))), r = e[0].match(/(?:\r\n?|\n).*/g), r && (this.yylineno += r.length), this.yylloc = {
769
- first_line: this.yylloc.last_line,
770
- last_line: this.yylineno + 1,
771
- first_column: this.yylloc.last_column,
772
- last_column: r ? r[r.length - 1].length - r[r.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + e[0].length
773
- }, this.yytext += e[0], this.match += e[0], this.matches = e, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(e[0].length), this.matched += e[0], n = this.performAction.call(this, this.yy, this, t, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), n) return n;
774
- if (this._backtrack) {
775
- for (var a in i) this[a] = i[a];
776
- return !1;
777
- }
778
- return !1;
779
- }, "test_match"),
780
- next: /* @__PURE__ */ i(function() {
781
- if (this.done) return this.EOF;
782
- this._input || (this.done = !0);
783
- var e, t, n, r;
784
- this._more || (this.yytext = "", this.match = "");
785
- for (var i = this._currentRules(), a = 0; a < i.length; a++) if (n = this._input.match(this.rules[i[a]]), n && (!t || n[0].length > t[0].length)) {
786
- if (t = n, r = a, this.options.backtrack_lexer) {
787
- if (e = this.test_match(n, i[a]), e !== !1) return e;
788
- if (this._backtrack) {
789
- t = !1;
790
- continue;
791
- } else return !1;
792
- } else if (!this.options.flex) break;
793
- }
794
- return t ? (e = this.test_match(t, i[r]), e === !1 ? !1 : e) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
795
- text: "",
796
- token: null,
797
- line: this.yylineno
798
- });
799
- }, "next"),
800
- lex: /* @__PURE__ */ i(function() {
801
- return this.next() || this.lex();
802
- }, "lex"),
803
- begin: /* @__PURE__ */ i(function(e) {
804
- this.conditionStack.push(e);
805
- }, "begin"),
806
- popState: /* @__PURE__ */ i(function() {
807
- return this.conditionStack.length - 1 > 0 ? this.conditionStack.pop() : this.conditionStack[0];
808
- }, "popState"),
809
- _currentRules: /* @__PURE__ */ i(function() {
810
- return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
811
- }, "_currentRules"),
812
- topState: /* @__PURE__ */ i(function(e) {
813
- return e = this.conditionStack.length - 1 - Math.abs(e || 0), e >= 0 ? this.conditionStack[e] : "INITIAL";
814
- }, "topState"),
815
- pushState: /* @__PURE__ */ i(function(e) {
816
- this.begin(e);
817
- }, "pushState"),
818
- stateStackSize: /* @__PURE__ */ i(function() {
819
- return this.conditionStack.length;
820
- }, "stateStackSize"),
821
- options: {},
822
- performAction: /* @__PURE__ */ i(function(e, t, n, r) {
823
- switch (n) {
824
- case 0: return e.getLogger().debug("Found block-beta"), 10;
825
- case 1: return e.getLogger().debug("Found id-block"), 29;
826
- case 2: return e.getLogger().debug("Found block"), 10;
827
- case 3:
828
- e.getLogger().debug(".", t.yytext);
829
- break;
830
- case 4:
831
- e.getLogger().debug("_", t.yytext);
832
- break;
833
- case 5: return 5;
834
- case 6: return t.yytext = -1, 28;
835
- case 7: return t.yytext = t.yytext.replace(/columns\s+/, ""), e.getLogger().debug("COLUMNS (LEX)", t.yytext), 28;
836
- case 8:
837
- this.pushState("md_string");
838
- break;
839
- case 9: return "MD_STR";
840
- case 10:
841
- this.popState();
842
- break;
843
- case 11:
844
- this.pushState("string");
845
- break;
846
- case 12:
847
- e.getLogger().debug("LEX: POPPING STR:", t.yytext), this.popState();
848
- break;
849
- case 13: return e.getLogger().debug("LEX: STR end:", t.yytext), "STR";
850
- case 14: return t.yytext = t.yytext.replace(/space\:/, ""), e.getLogger().debug("SPACE NUM (LEX)", t.yytext), 21;
851
- case 15: return t.yytext = "1", e.getLogger().debug("COLUMNS (LEX)", t.yytext), 21;
852
- case 16: return 42;
853
- case 17: return "LINKSTYLE";
854
- case 18: return "INTERPOLATE";
855
- case 19: return this.pushState("CLASSDEF"), 39;
856
- case 20: return this.popState(), this.pushState("CLASSDEFID"), "DEFAULT_CLASSDEF_ID";
857
- case 21: return this.popState(), this.pushState("CLASSDEFID"), 40;
858
- case 22: return this.popState(), 41;
859
- case 23: return this.pushState("CLASS"), 43;
860
- case 24: return this.popState(), this.pushState("CLASS_STYLE"), 44;
861
- case 25: return this.popState(), 45;
862
- case 26: return this.pushState("STYLE_STMNT"), 46;
863
- case 27: return this.popState(), this.pushState("STYLE_DEFINITION"), 47;
864
- case 28: return this.popState(), 48;
865
- case 29: return this.pushState("acc_title"), "acc_title";
866
- case 30: return this.popState(), "acc_title_value";
867
- case 31: return this.pushState("acc_descr"), "acc_descr";
868
- case 32: return this.popState(), "acc_descr_value";
869
- case 33:
870
- this.pushState("acc_descr_multiline");
871
- break;
872
- case 34:
873
- this.popState();
874
- break;
875
- case 35: return "acc_descr_multiline_value";
876
- case 36: return 30;
877
- case 37: return this.popState(), e.getLogger().debug("Lex: (("), "NODE_DEND";
878
- case 38: return this.popState(), e.getLogger().debug("Lex: (("), "NODE_DEND";
879
- case 39: return this.popState(), e.getLogger().debug("Lex: ))"), "NODE_DEND";
880
- case 40: return this.popState(), e.getLogger().debug("Lex: (("), "NODE_DEND";
881
- case 41: return this.popState(), e.getLogger().debug("Lex: (("), "NODE_DEND";
882
- case 42: return this.popState(), e.getLogger().debug("Lex: (-"), "NODE_DEND";
883
- case 43: return this.popState(), e.getLogger().debug("Lex: -)"), "NODE_DEND";
884
- case 44: return this.popState(), e.getLogger().debug("Lex: (("), "NODE_DEND";
885
- case 45: return this.popState(), e.getLogger().debug("Lex: ]]"), "NODE_DEND";
886
- case 46: return this.popState(), e.getLogger().debug("Lex: ("), "NODE_DEND";
887
- case 47: return this.popState(), e.getLogger().debug("Lex: ])"), "NODE_DEND";
888
- case 48: return this.popState(), e.getLogger().debug("Lex: /]"), "NODE_DEND";
889
- case 49: return this.popState(), e.getLogger().debug("Lex: /]"), "NODE_DEND";
890
- case 50: return this.popState(), e.getLogger().debug("Lex: )]"), "NODE_DEND";
891
- case 51: return this.popState(), e.getLogger().debug("Lex: )"), "NODE_DEND";
892
- case 52: return this.popState(), e.getLogger().debug("Lex: ]>"), "NODE_DEND";
893
- case 53: return this.popState(), e.getLogger().debug("Lex: ]"), "NODE_DEND";
894
- case 54: return e.getLogger().debug("Lexa: -)"), this.pushState("NODE"), 35;
895
- case 55: return e.getLogger().debug("Lexa: (-"), this.pushState("NODE"), 35;
896
- case 56: return e.getLogger().debug("Lexa: ))"), this.pushState("NODE"), 35;
897
- case 57: return e.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
898
- case 58: return e.getLogger().debug("Lex: ((("), this.pushState("NODE"), 35;
899
- case 59: return e.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
900
- case 60: return e.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
901
- case 61: return e.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
902
- case 62: return e.getLogger().debug("Lexc: >"), this.pushState("NODE"), 35;
903
- case 63: return e.getLogger().debug("Lexa: (["), this.pushState("NODE"), 35;
904
- case 64: return e.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
905
- case 65: return this.pushState("NODE"), 35;
906
- case 66: return this.pushState("NODE"), 35;
907
- case 67: return this.pushState("NODE"), 35;
908
- case 68: return this.pushState("NODE"), 35;
909
- case 69: return this.pushState("NODE"), 35;
910
- case 70: return this.pushState("NODE"), 35;
911
- case 71: return this.pushState("NODE"), 35;
912
- case 72: return e.getLogger().debug("Lexa: ["), this.pushState("NODE"), 35;
913
- case 73: return this.pushState("BLOCK_ARROW"), e.getLogger().debug("LEX ARR START"), 37;
914
- case 74: return e.getLogger().debug("Lex: NODE_ID", t.yytext), 31;
915
- case 75: return e.getLogger().debug("Lex: EOF", t.yytext), 8;
916
- case 76:
917
- this.pushState("md_string");
918
- break;
919
- case 77:
920
- this.pushState("md_string");
921
- break;
922
- case 78: return "NODE_DESCR";
923
- case 79:
924
- this.popState();
925
- break;
926
- case 80:
927
- e.getLogger().debug("Lex: Starting string"), this.pushState("string");
928
- break;
929
- case 81:
930
- e.getLogger().debug("LEX ARR: Starting string"), this.pushState("string");
931
- break;
932
- case 82: return e.getLogger().debug("LEX: NODE_DESCR:", t.yytext), "NODE_DESCR";
933
- case 83:
934
- e.getLogger().debug("LEX POPPING"), this.popState();
935
- break;
936
- case 84:
937
- e.getLogger().debug("Lex: =>BAE"), this.pushState("ARROW_DIR");
938
- break;
939
- case 85: return t.yytext = t.yytext.replace(/^,\s*/, ""), e.getLogger().debug("Lex (right): dir:", t.yytext), "DIR";
940
- case 86: return t.yytext = t.yytext.replace(/^,\s*/, ""), e.getLogger().debug("Lex (left):", t.yytext), "DIR";
941
- case 87: return t.yytext = t.yytext.replace(/^,\s*/, ""), e.getLogger().debug("Lex (x):", t.yytext), "DIR";
942
- case 88: return t.yytext = t.yytext.replace(/^,\s*/, ""), e.getLogger().debug("Lex (y):", t.yytext), "DIR";
943
- case 89: return t.yytext = t.yytext.replace(/^,\s*/, ""), e.getLogger().debug("Lex (up):", t.yytext), "DIR";
944
- case 90: return t.yytext = t.yytext.replace(/^,\s*/, ""), e.getLogger().debug("Lex (down):", t.yytext), "DIR";
945
- case 91: return t.yytext = "]>", e.getLogger().debug("Lex (ARROW_DIR end):", t.yytext), this.popState(), this.popState(), "BLOCK_ARROW_END";
946
- case 92: return e.getLogger().debug("Lex: LINK", "#" + t.yytext + "#"), 15;
947
- case 93: return e.getLogger().debug("Lex: LINK", t.yytext), 15;
948
- case 94: return e.getLogger().debug("Lex: LINK", t.yytext), 15;
949
- case 95: return e.getLogger().debug("Lex: LINK", t.yytext), 15;
950
- case 96: return e.getLogger().debug("Lex: START_LINK", t.yytext), this.pushState("LLABEL"), 16;
951
- case 97: return e.getLogger().debug("Lex: START_LINK", t.yytext), this.pushState("LLABEL"), 16;
952
- case 98: return e.getLogger().debug("Lex: START_LINK", t.yytext), this.pushState("LLABEL"), 16;
953
- case 99:
954
- this.pushState("md_string");
955
- break;
956
- case 100: return e.getLogger().debug("Lex: Starting string"), this.pushState("string"), "LINK_LABEL";
957
- case 101: return this.popState(), e.getLogger().debug("Lex: LINK", "#" + t.yytext + "#"), 15;
958
- case 102: return this.popState(), e.getLogger().debug("Lex: LINK", t.yytext), 15;
959
- case 103: return this.popState(), e.getLogger().debug("Lex: LINK", t.yytext), 15;
960
- case 104: return e.getLogger().debug("Lex: COLON", t.yytext), t.yytext = t.yytext.slice(1), 27;
961
- }
962
- }, "anonymous"),
963
- rules: [
964
- /^(?:block-beta\b)/,
965
- /^(?:block:)/,
966
- /^(?:block\b)/,
967
- /^(?:[\s]+)/,
968
- /^(?:[\n]+)/,
969
- /^(?:((\u000D\u000A)|(\u000A)))/,
970
- /^(?:columns\s+auto\b)/,
971
- /^(?:columns\s+[\d]+)/,
972
- /^(?:["][`])/,
973
- /^(?:[^`"]+)/,
974
- /^(?:[`]["])/,
975
- /^(?:["])/,
976
- /^(?:["])/,
977
- /^(?:[^"]*)/,
978
- /^(?:space[:]\d+)/,
979
- /^(?:space\b)/,
980
- /^(?:default\b)/,
981
- /^(?:linkStyle\b)/,
982
- /^(?:interpolate\b)/,
983
- /^(?:classDef\s+)/,
984
- /^(?:DEFAULT\s+)/,
985
- /^(?:\w+\s+)/,
986
- /^(?:[^\n]*)/,
987
- /^(?:class\s+)/,
988
- /^(?:(\w+)+((,\s*\w+)*))/,
989
- /^(?:[^\n]*)/,
990
- /^(?:style\s+)/,
991
- /^(?:(\w+)+((,\s*\w+)*))/,
992
- /^(?:[^\n]*)/,
993
- /^(?:accTitle\s*:\s*)/,
994
- /^(?:(?!\n||)*[^\n]*)/,
995
- /^(?:accDescr\s*:\s*)/,
996
- /^(?:(?!\n||)*[^\n]*)/,
997
- /^(?:accDescr\s*\{\s*)/,
998
- /^(?:[\}])/,
999
- /^(?:[^\}]*)/,
1000
- /^(?:end\b\s*)/,
1001
- /^(?:\(\(\()/,
1002
- /^(?:\)\)\))/,
1003
- /^(?:[\)]\))/,
1004
- /^(?:\}\})/,
1005
- /^(?:\})/,
1006
- /^(?:\(-)/,
1007
- /^(?:-\))/,
1008
- /^(?:\(\()/,
1009
- /^(?:\]\])/,
1010
- /^(?:\()/,
1011
- /^(?:\]\))/,
1012
- /^(?:\\\])/,
1013
- /^(?:\/\])/,
1014
- /^(?:\)\])/,
1015
- /^(?:[\)])/,
1016
- /^(?:\]>)/,
1017
- /^(?:[\]])/,
1018
- /^(?:-\))/,
1019
- /^(?:\(-)/,
1020
- /^(?:\)\))/,
1021
- /^(?:\))/,
1022
- /^(?:\(\(\()/,
1023
- /^(?:\(\()/,
1024
- /^(?:\{\{)/,
1025
- /^(?:\{)/,
1026
- /^(?:>)/,
1027
- /^(?:\(\[)/,
1028
- /^(?:\()/,
1029
- /^(?:\[\[)/,
1030
- /^(?:\[\|)/,
1031
- /^(?:\[\()/,
1032
- /^(?:\)\)\))/,
1033
- /^(?:\[\\)/,
1034
- /^(?:\[\/)/,
1035
- /^(?:\[\\)/,
1036
- /^(?:\[)/,
1037
- /^(?:<\[)/,
1038
- /^(?:[^\(\[\n\-\)\{\}\s\<\>:=]+)/,
1039
- /^(?:$)/,
1040
- /^(?:["][`])/,
1041
- /^(?:["][`])/,
1042
- /^(?:[^`"]+)/,
1043
- /^(?:[`]["])/,
1044
- /^(?:["])/,
1045
- /^(?:["])/,
1046
- /^(?:[^"]+)/,
1047
- /^(?:["])/,
1048
- /^(?:\]>\s*\()/,
1049
- /^(?:,?\s*right\s*)/,
1050
- /^(?:,?\s*left\s*)/,
1051
- /^(?:,?\s*x\s*)/,
1052
- /^(?:,?\s*y\s*)/,
1053
- /^(?:,?\s*up\s*)/,
1054
- /^(?:,?\s*down\s*)/,
1055
- /^(?:\)\s*)/,
1056
- /^(?:\s*[xo<]?--+[-xo>]\s*)/,
1057
- /^(?:\s*[xo<]?==+[=xo>]\s*)/,
1058
- /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,
1059
- /^(?:\s*~~[\~]+\s*)/,
1060
- /^(?:\s*[xo<]?--\s*)/,
1061
- /^(?:\s*[xo<]?==\s*)/,
1062
- /^(?:\s*[xo<]?-\.\s*)/,
1063
- /^(?:["][`])/,
1064
- /^(?:["])/,
1065
- /^(?:\s*[xo<]?--+[-xo>]\s*)/,
1066
- /^(?:\s*[xo<]?==+[=xo>]\s*)/,
1067
- /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,
1068
- /^(?::\d+)/
1069
- ],
1070
- conditions: {
1071
- STYLE_DEFINITION: {
1072
- rules: [28],
1073
- inclusive: !1
1074
- },
1075
- STYLE_STMNT: {
1076
- rules: [27],
1077
- inclusive: !1
1078
- },
1079
- CLASSDEFID: {
1080
- rules: [22],
1081
- inclusive: !1
1082
- },
1083
- CLASSDEF: {
1084
- rules: [20, 21],
1085
- inclusive: !1
1086
- },
1087
- CLASS_STYLE: {
1088
- rules: [25],
1089
- inclusive: !1
1090
- },
1091
- CLASS: {
1092
- rules: [24],
1093
- inclusive: !1
1094
- },
1095
- LLABEL: {
1096
- rules: [
1097
- 99,
1098
- 100,
1099
- 101,
1100
- 102,
1101
- 103
1102
- ],
1103
- inclusive: !1
1104
- },
1105
- ARROW_DIR: {
1106
- rules: [
1107
- 85,
1108
- 86,
1109
- 87,
1110
- 88,
1111
- 89,
1112
- 90,
1113
- 91
1114
- ],
1115
- inclusive: !1
1116
- },
1117
- BLOCK_ARROW: {
1118
- rules: [
1119
- 76,
1120
- 81,
1121
- 84
1122
- ],
1123
- inclusive: !1
1124
- },
1125
- NODE: {
1126
- rules: [
1127
- 37,
1128
- 38,
1129
- 39,
1130
- 40,
1131
- 41,
1132
- 42,
1133
- 43,
1134
- 44,
1135
- 45,
1136
- 46,
1137
- 47,
1138
- 48,
1139
- 49,
1140
- 50,
1141
- 51,
1142
- 52,
1143
- 53,
1144
- 77,
1145
- 80
1146
- ],
1147
- inclusive: !1
1148
- },
1149
- md_string: {
1150
- rules: [
1151
- 9,
1152
- 10,
1153
- 78,
1154
- 79
1155
- ],
1156
- inclusive: !1
1157
- },
1158
- space: {
1159
- rules: [],
1160
- inclusive: !1
1161
- },
1162
- string: {
1163
- rules: [
1164
- 12,
1165
- 13,
1166
- 82,
1167
- 83
1168
- ],
1169
- inclusive: !1
1170
- },
1171
- acc_descr_multiline: {
1172
- rules: [34, 35],
1173
- inclusive: !1
1174
- },
1175
- acc_descr: {
1176
- rules: [32],
1177
- inclusive: !1
1178
- },
1179
- acc_title: {
1180
- rules: [30],
1181
- inclusive: !1
1182
- },
1183
- INITIAL: {
1184
- rules: [
1185
- 0,
1186
- 1,
1187
- 2,
1188
- 3,
1189
- 4,
1190
- 5,
1191
- 6,
1192
- 7,
1193
- 8,
1194
- 11,
1195
- 14,
1196
- 15,
1197
- 16,
1198
- 17,
1199
- 18,
1200
- 19,
1201
- 23,
1202
- 26,
1203
- 29,
1204
- 31,
1205
- 33,
1206
- 36,
1207
- 54,
1208
- 55,
1209
- 56,
1210
- 57,
1211
- 58,
1212
- 59,
1213
- 60,
1214
- 61,
1215
- 62,
1216
- 63,
1217
- 64,
1218
- 65,
1219
- 66,
1220
- 67,
1221
- 68,
1222
- 69,
1223
- 70,
1224
- 71,
1225
- 72,
1226
- 73,
1227
- 74,
1228
- 75,
1229
- 92,
1230
- 93,
1231
- 94,
1232
- 95,
1233
- 96,
1234
- 97,
1235
- 98,
1236
- 104
1237
- ],
1238
- inclusive: !0
1239
- }
1240
- }
1241
- };
1242
- })();
1243
- function y() {
1244
- this.yy = {};
1245
- }
1246
- return i(y, "Parser"), y.prototype = v, v.Parser = y, new y();
1247
- })();
1248
- F.parser = F;
1249
- var Oe = F, I = /* @__PURE__ */ new Map(), L = [], ke = /* @__PURE__ */ new Map(), Ae = "color", je = "fill", Me = "bgFill", Ne = ",", Pe = p(), R = /* @__PURE__ */ new Map(), Fe = "", Ie = /* @__PURE__ */ i((e) => f.sanitizeText(e, Pe), "sanitizeText"), Le = /* @__PURE__ */ i(function(e, t = "") {
1250
- let n = R.get(e);
1251
- n || (n = {
1252
- id: e,
1253
- styles: [],
1254
- textStyles: []
1255
- }, R.set(e, n)), t != null && t.split(Ne).forEach((e) => {
1256
- let t = e.replace(/([^;]*);/, "$1").trim();
1257
- if (RegExp(Ae).exec(e)) {
1258
- let e = t.replace(je, Me).replace(Ae, je);
1259
- n.textStyles.push(e);
1260
- }
1261
- n.styles.push(t);
1262
- });
1263
- }, "addStyleClass"), Re = /* @__PURE__ */ i(function(e, t = "") {
1264
- let n = I.get(e);
1265
- t != null && (n.styles = t.split(Ne));
1266
- }, "addStyle2Node"), ze = /* @__PURE__ */ i(function(e, t) {
1267
- e.split(",").forEach(function(e) {
1268
- let n = I.get(e);
1269
- if (n === void 0) {
1270
- let t = e.trim();
1271
- n = {
1272
- id: t,
1273
- type: "na",
1274
- children: []
1275
- }, I.set(t, n);
1276
- }
1277
- n.classes || (n.classes = []), n.classes.push(t);
1278
- });
1279
- }, "setCssClass"), Be = /* @__PURE__ */ i((e, t) => {
1280
- var n;
1281
- let r = e.flat(), i = [], o = r.find((e) => (e == null ? void 0 : e.type) === "column-setting"), s = (n = o == null ? void 0 : o.columns) == null ? -1 : n;
1282
- for (let e of r) {
1283
- if (typeof s == "number" && s > 0 && e.type !== "column-setting" && typeof e.widthInColumns == "number" && e.widthInColumns > s && a.warn(`Block ${e.id} width ${e.widthInColumns} exceeds configured column width ${s}`), e.label && (e.label = Ie(e.label)), e.type === "classDef") {
1284
- Le(e.id, e.css);
1285
- continue;
1286
- }
1287
- if (e.type === "applyClass") {
1288
- var c;
1289
- ze(e.id, (c = e == null ? void 0 : e.styleClass) == null ? "" : c);
1290
- continue;
1291
- }
1292
- if (e.type === "applyStyles") {
1293
- e != null && e.stylesStr && Re(e.id, e == null ? void 0 : e.stylesStr);
1294
- continue;
1295
- }
1296
- if (e.type === "column-setting") {
1297
- var l;
1298
- t.columns = (l = e.columns) == null ? -1 : l;
1299
- } else if (e.type === "edge") {
1300
- var u;
1301
- let t = ((u = ke.get(e.id)) == null ? 0 : u) + 1;
1302
- ke.set(e.id, t), e.id = t + "-" + e.id, L.push(e);
1303
- } else {
1304
- e.label || (e.type === "composite" ? e.label = "" : e.label = e.id);
1305
- let t = I.get(e.id);
1306
- if (t === void 0 ? I.set(e.id, e) : (e.type !== "na" && (t.type = e.type), e.label !== e.id && (t.label = e.label)), e.children && Be(e.children, e), e.type === "space") {
1307
- var d;
1308
- let t = (d = e.width) == null ? 1 : d;
1309
- for (let n = 0; n < t; n++) {
1310
- let t = Se(e);
1311
- t.id = t.id + "-" + n, I.set(t.id, t), i.push(t);
1312
- }
1313
- } else t === void 0 && i.push(e);
1314
- }
1315
- }
1316
- t.children = i;
1317
- }, "populateBlockDatabase"), Ve = [], z = {
1318
- id: "root",
1319
- type: "composite",
1320
- children: [],
1321
- columns: -1
1322
- }, He = /* @__PURE__ */ i(() => {
1323
- a.debug("Clear called"), c(), z = {
1324
- id: "root",
1325
- type: "composite",
1326
- children: [],
1327
- columns: -1
1328
- }, I = /* @__PURE__ */ new Map([["root", z]]), Ve = [], R = /* @__PURE__ */ new Map(), L = [], ke = /* @__PURE__ */ new Map(), Fe = "";
1329
- }, "clear");
1330
- function Ue(e) {
1331
- switch (a.debug("typeStr2Type", e), e) {
1332
- case "[]": return "square";
1333
- case "()": return a.debug("we have a round"), "round";
1334
- case "(())": return "circle";
1335
- case ">]": return "rect_left_inv_arrow";
1336
- case "{}": return "diamond";
1337
- case "{{}}": return "hexagon";
1338
- case "([])": return "stadium";
1339
- case "[[]]": return "subroutine";
1340
- case "[()]": return "cylinder";
1341
- case "((()))": return "doublecircle";
1342
- case "[//]": return "lean_right";
1343
- case "[\\\\]": return "lean_left";
1344
- case "[/\\]": return "trapezoid";
1345
- case "[\\/]": return "inv_trapezoid";
1346
- case "<[]>": return "block_arrow";
1347
- default: return "na";
1348
- }
1349
- }
1350
- i(Ue, "typeStr2Type");
1351
- function We(e) {
1352
- switch (a.debug("typeStr2Type", e), e) {
1353
- case "==": return "thick";
1354
- default: return "normal";
1355
- }
1356
- }
1357
- i(We, "edgeTypeStr2Type");
1358
- function Ge(e) {
1359
- switch (e.trim().slice(-1)) {
1360
- case "x": return "arrow_cross";
1361
- case "o": return "arrow_circle";
1362
- case ">": return "arrow_point";
1363
- default: return "";
1364
- }
1365
- }
1366
- i(Ge, "edgeStrToEdgeData");
1367
- function Ke(e) {
1368
- switch (e.trim().charAt(0)) {
1369
- case "x": return "arrow_cross";
1370
- case "o": return "arrow_circle";
1371
- case "<": return "arrow_point";
1372
- default: return "arrow_open";
1373
- }
1374
- }
1375
- i(Ke, "edgeStrToEdgeStartData");
1376
- function qe(e) {
1377
- return e.includes("==") ? "thick" : "normal";
1378
- }
1379
- i(qe, "edgeStrToThickness");
1380
- function Je(e) {
1381
- return e.includes(".-") ? "dotted" : "solid";
1382
- }
1383
- i(Je, "edgeStrToPattern");
1384
- var Ye = 0, Xe = {
1385
- getConfig: /* @__PURE__ */ i(() => l().block, "getConfig"),
1386
- typeStr2Type: Ue,
1387
- edgeTypeStr2Type: We,
1388
- edgeStrToEdgeData: Ge,
1389
- edgeStrToEdgeStartData: Ke,
1390
- edgeStrToThickness: qe,
1391
- edgeStrToPattern: Je,
1392
- getLogger: /* @__PURE__ */ i(() => a, "getLogger"),
1393
- getBlocksFlat: /* @__PURE__ */ i(() => [...I.values()], "getBlocksFlat"),
1394
- getBlocks: /* @__PURE__ */ i(() => Ve || [], "getBlocks"),
1395
- getEdges: /* @__PURE__ */ i(() => L, "getEdges"),
1396
- setHierarchy: /* @__PURE__ */ i((e) => {
1397
- z.children = e, Be(e, z), Ve = z.children;
1398
- }, "setHierarchy"),
1399
- getBlock: /* @__PURE__ */ i((e) => I.get(e), "getBlock"),
1400
- setBlock: /* @__PURE__ */ i((e) => {
1401
- I.set(e.id, e);
1402
- }, "setBlock"),
1403
- getColumns: /* @__PURE__ */ i((e) => {
1404
- let t = I.get(e);
1405
- return t ? t.columns ? t.columns : t.children ? t.children.length : -1 : -1;
1406
- }, "getColumns"),
1407
- getClasses: /* @__PURE__ */ i(function() {
1408
- return R;
1409
- }, "getClasses"),
1410
- clear: He,
1411
- generateId: /* @__PURE__ */ i(() => (Ye++, "id-" + Math.random().toString(36).substr(2, 12) + "-" + Ye), "generateId"),
1412
- setDiagramId: /* @__PURE__ */ i((e) => {
1413
- Fe = e;
1414
- }, "setDiagramId"),
1415
- getDiagramId: /* @__PURE__ */ i(() => Fe, "getDiagramId")
1416
- }, Ze = /* @__PURE__ */ i((e, t) => {
1417
- let n = h;
1418
- return d(n(e, "r"), n(e, "g"), n(e, "b"), t);
1419
- }, "fade"), Qe = /* @__PURE__ */ i((e) => `.label {
1420
- font-family: ${e.fontFamily};
1421
- color: ${e.nodeTextColor || e.textColor};
1422
- }
1423
- .cluster-label text {
1424
- fill: ${e.titleColor};
1425
- }
1426
- .cluster-label span,p {
1427
- color: ${e.titleColor};
1428
- }
1429
-
1430
-
1431
-
1432
- .label text,span,p {
1433
- fill: ${e.nodeTextColor || e.textColor};
1434
- color: ${e.nodeTextColor || e.textColor};
1435
- }
1436
-
1437
- .node rect,
1438
- .node circle,
1439
- .node ellipse,
1440
- .node polygon,
1441
- .node path {
1442
- fill: ${e.mainBkg};
1443
- stroke: ${e.nodeBorder};
1444
- stroke-width: 1px;
1445
- }
1446
- .flowchart-label text {
1447
- text-anchor: middle;
1448
- }
1449
- // .flowchart-label .text-outer-tspan {
1450
- // text-anchor: middle;
1451
- // }
1452
- // .flowchart-label .text-inner-tspan {
1453
- // text-anchor: start;
1454
- // }
1455
-
1456
- .node .label {
1457
- text-align: center;
1458
- }
1459
- .node.clickable {
1460
- cursor: pointer;
1461
- }
1462
-
1463
- .arrowheadPath {
1464
- fill: ${e.arrowheadColor};
1465
- }
1466
-
1467
- .edgePath .path {
1468
- stroke: ${e.lineColor};
1469
- stroke-width: 2.0px;
1470
- }
1471
-
1472
- .flowchart-link {
1473
- stroke: ${e.lineColor};
1474
- fill: none;
1475
- }
1476
-
1477
- .edgeLabel {
1478
- background-color: ${e.edgeLabelBackground};
1479
- /*
1480
- * This is for backward compatibility with existing code that didn't
1481
- * add a \`<p>\` around edge labels.
1482
- *
1483
- * TODO: We should probably remove this in a future release.
1484
- */
1485
- p {
1486
- margin: 0;
1487
- padding: 0;
1488
- display: inline;
1489
- }
1490
- rect {
1491
- opacity: 0.5;
1492
- background-color: ${e.edgeLabelBackground};
1493
- fill: ${e.edgeLabelBackground};
1494
- }
1495
- text-align: center;
1496
- }
1497
-
1498
- /* For html labels only */
1499
- .labelBkg {
1500
- background-color: ${e.edgeLabelBackground};
1501
- }
1502
-
1503
- .node .cluster {
1504
- // fill: ${Ze(e.mainBkg, .5)};
1505
- fill: ${Ze(e.clusterBkg, .5)};
1506
- stroke: ${Ze(e.clusterBorder, .2)};
1507
- box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
1508
- stroke-width: 1px;
1509
- }
1510
-
1511
- .cluster text {
1512
- fill: ${e.titleColor};
1513
- }
1514
-
1515
- .cluster span,p {
1516
- color: ${e.titleColor};
1517
- }
1518
- /* .cluster div {
1519
- color: ${e.titleColor};
1520
- } */
1521
-
1522
- div.mermaidTooltip {
1523
- position: absolute;
1524
- text-align: center;
1525
- max-width: 200px;
1526
- padding: 2px;
1527
- font-family: ${e.fontFamily};
1528
- font-size: 12px;
1529
- background: ${e.tertiaryColor};
1530
- border: 1px solid ${e.border2};
1531
- border-radius: 2px;
1532
- pointer-events: none;
1533
- z-index: 100;
1534
- }
1535
-
1536
- .flowchartTitleText {
1537
- text-anchor: middle;
1538
- font-size: 18px;
1539
- fill: ${e.textColor};
1540
- }
1541
- ${ye()}
1542
- `, "getStyles"), $e = /* @__PURE__ */ i((e, t, n, r) => {
1543
- t.forEach((t) => {
1544
- et[t](e, n, r);
1545
- });
1546
- }, "insertMarkers"), et = {
1547
- extension: /* @__PURE__ */ i((e, t, n) => {
1548
- a.trace("Making markers for ", n), e.append("defs").append("marker").attr("id", n + "_" + t + "-extensionStart").attr("class", "marker extension " + t).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z"), e.append("defs").append("marker").attr("id", n + "_" + t + "-extensionEnd").attr("class", "marker extension " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z");
1549
- }, "extension"),
1550
- composition: /* @__PURE__ */ i((e, t, n) => {
1551
- e.append("defs").append("marker").attr("id", n + "_" + t + "-compositionStart").attr("class", "marker composition " + t).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", n + "_" + t + "-compositionEnd").attr("class", "marker composition " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
1552
- }, "composition"),
1553
- aggregation: /* @__PURE__ */ i((e, t, n) => {
1554
- e.append("defs").append("marker").attr("id", n + "_" + t + "-aggregationStart").attr("class", "marker aggregation " + t).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", n + "_" + t + "-aggregationEnd").attr("class", "marker aggregation " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
1555
- }, "aggregation"),
1556
- dependency: /* @__PURE__ */ i((e, t, n) => {
1557
- e.append("defs").append("marker").attr("id", n + "_" + t + "-dependencyStart").attr("class", "marker dependency " + t).attr("refX", 6).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", n + "_" + t + "-dependencyEnd").attr("class", "marker dependency " + t).attr("refX", 13).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
1558
- }, "dependency"),
1559
- lollipop: /* @__PURE__ */ i((e, t, n) => {
1560
- e.append("defs").append("marker").attr("id", n + "_" + t + "-lollipopStart").attr("class", "marker lollipop " + t).attr("refX", 13).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6), e.append("defs").append("marker").attr("id", n + "_" + t + "-lollipopEnd").attr("class", "marker lollipop " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6);
1561
- }, "lollipop"),
1562
- point: /* @__PURE__ */ i((e, t, n) => {
1563
- e.append("marker").attr("id", n + "_" + t + "-pointEnd").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 6).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", n + "_" + t + "-pointStart").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 4.5).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).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");
1564
- }, "point"),
1565
- circle: /* @__PURE__ */ i((e, t, n) => {
1566
- e.append("marker").attr("id", n + "_" + t + "-circleEnd").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 11).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", n + "_" + t + "-circleStart").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", -1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
1567
- }, "circle"),
1568
- cross: /* @__PURE__ */ i((e, t, n) => {
1569
- e.append("marker").attr("id", n + "_" + t + "-crossEnd").attr("class", "marker cross " + t).attr("viewBox", "0 0 11 11").attr("refX", 12).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", n + "_" + t + "-crossStart").attr("class", "marker cross " + t).attr("viewBox", "0 0 11 11").attr("refX", -1).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0");
1570
- }, "cross"),
1571
- barb: /* @__PURE__ */ i((e, t, n) => {
1572
- e.append("defs").append("marker").attr("id", n + "_" + t + "-barbEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 14).attr("markerUnits", "strokeWidth").attr("orient", "auto").append("path").attr("d", "M 19,7 L9,13 L14,7 L9,1 Z");
1573
- }, "barb")
1574
- }, tt = $e, B = (De = (P = p()) == null || (P = P.block) == null ? void 0 : P.padding) == null ? 8 : De;
1575
- function nt(e, t) {
1576
- if (e === 0 || !Number.isInteger(e)) throw Error("Columns must be an integer !== 0.");
1577
- if (t < 0 || !Number.isInteger(t)) throw Error("Position must be a non-negative integer." + t);
1578
- return e < 0 ? {
1579
- px: t,
1580
- py: 0
1581
- } : e === 1 ? {
1582
- px: 0,
1583
- py: t
1584
- } : {
1585
- px: t % e,
1586
- py: Math.floor(t / e)
1587
- };
1588
- }
1589
- i(nt, "calculateBlockPosition");
1590
- var rt = /* @__PURE__ */ i((e) => {
1591
- let t = 0, n = 0;
1592
- for (let o of e.children) {
1593
- var r, i;
1594
- let { width: e, height: s, x: c, y: l } = (r = o.size) == null ? {
1595
- width: 0,
1596
- height: 0,
1597
- x: 0,
1598
- y: 0
1599
- } : r;
1600
- if (a.debug("getMaxChildSize abc95 child:", o.id, "width:", e, "height:", s, "x:", c, "y:", l, o.type), o.type === "space") continue;
1601
- let u = e / ((i = o.widthInColumns) == null ? 1 : i);
1602
- u > t && (t = u), s > n && (n = s);
1603
- }
1604
- return {
1605
- width: t,
1606
- height: n
1607
- };
1608
- }, "getMaxChildSize");
1609
- function V(e, t, n = 0, r = 0) {
1610
- var i, o, s, c, l, u, d;
1611
- a.debug("setBlockSizes abc95 (start)", e.id, e == null || (i = e.size) == null ? void 0 : i.x, "block width =", e == null ? void 0 : e.size, "siblingWidth", n), !(e == null || (o = e.size) == null) && o.width || (e.size = {
1612
- width: n,
1613
- height: r,
1614
- x: 0,
1615
- y: 0
1616
- });
1617
- let f = 0, p = 0;
1618
- if (((s = e.children) == null ? void 0 : s.length) > 0) {
1619
- var m, h, g;
1620
- for (let n of e.children) V(n, t);
1621
- let i = rt(e);
1622
- f = i.width, p = i.height, a.debug("setBlockSizes abc95 maxWidth of", e.id, ":s children is ", f, p);
1623
- for (let t of e.children) if (t.size) {
1624
- var _, v;
1625
- a.debug(`abc95 Setting size of children of ${e.id} id=${t.id} ${f} ${p} ${JSON.stringify(t.size)}`), t.size.width = f * ((_ = t.widthInColumns) == null ? 1 : _) + B * (((v = t.widthInColumns) == null ? 1 : v) - 1), t.size.height = p, t.size.x = 0, t.size.y = 0, a.debug(`abc95 updating size of ${e.id} children child:${t.id} maxWidth:${f} maxHeight:${p}`);
1626
- }
1627
- for (let n of e.children) V(n, t, f, p);
1628
- let o = (m = e.columns) == null ? -1 : m, s = 0;
1629
- for (let t of e.children) {
1630
- var y;
1631
- s += (y = t.widthInColumns) == null ? 1 : y;
1632
- }
1633
- let c = e.children.length;
1634
- o > 0 && o < s && (c = o);
1635
- let l = Math.ceil(s / c), u = c * (f + B) + B, d = l * (p + B) + B;
1636
- if (u < n) {
1637
- a.debug(`Detected to small sibling: abc95 ${e.id} siblingWidth ${n} siblingHeight ${r} width ${u}`), u = n, d = r;
1638
- let t = (n - c * B - B) / c, i = (r - l * B - B) / l;
1639
- a.debug("Size indata abc88", e.id, "childWidth", t, "maxWidth", f), a.debug("Size indata abc88", e.id, "childHeight", i, "maxHeight", p), a.debug("Size indata abc88 xSize", c, "padding", B);
1640
- for (let n of e.children) n.size && (n.size.width = t, n.size.height = i, n.size.x = 0, n.size.y = 0);
1641
- }
1642
- if (a.debug(`abc95 (finale calc) ${e.id} xSize ${c} ySize ${l} columns ${o}${e.children.length} width=${Math.max(u, ((h = e.size) == null ? void 0 : h.width) || 0)}`), u < ((e == null || (g = e.size) == null ? void 0 : g.width) || 0)) {
1643
- var b;
1644
- u = (e == null || (b = e.size) == null ? void 0 : b.width) || 0;
1645
- let t = o > 0 ? Math.min(e.children.length, o) : e.children.length;
1646
- if (t > 0) {
1647
- var x;
1648
- let n = (u - t * B - B) / t;
1649
- a.debug("abc95 (growing to fit) width", e.id, u, (x = e.size) == null ? void 0 : x.width, n);
1650
- for (let t of e.children) t.size && (t.size.width = n);
1651
- }
1652
- }
1653
- e.size = {
1654
- width: u,
1655
- height: d,
1656
- x: 0,
1657
- y: 0
1658
- };
1659
- }
1660
- a.debug("setBlockSizes abc94 (done)", e.id, e == null || (c = e.size) == null ? void 0 : c.x, e == null || (l = e.size) == null ? void 0 : l.width, e == null || (u = e.size) == null ? void 0 : u.y, e == null || (d = e.size) == null ? void 0 : d.height);
1661
- }
1662
- i(V, "setBlockSizes");
1663
- function it(e, t) {
1664
- var n, r, i, o, s, c, l;
1665
- a.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e == null || (n = e.size) == null ? void 0 : n.x} y: ${e == null || (r = e.size) == null ? void 0 : r.y} width: ${e == null || (i = e.size) == null ? void 0 : i.width}`);
1666
- let u = (o = e.columns) == null ? -1 : o;
1667
- if (a.debug("layoutBlocks columns abc95", e.id, "=>", u, e), e.children && e.children.length > 0) {
1668
- var d, f, p, m, h, g;
1669
- let n = (d = e == null || (f = e.children[0]) == null || (f = f.size) == null ? void 0 : f.width) == null ? 0 : d, r = e.children.length * n + (e.children.length - 1) * B;
1670
- a.debug("widthOfChildren 88", r, "posX");
1671
- let i = /* @__PURE__ */ new Map();
1672
- {
1673
- let t = 0;
1674
- for (let n of e.children) {
1675
- var _, v;
1676
- if (!n.size) continue;
1677
- let { py: e } = nt(u, t), r = (_ = i.get(e)) == null ? 0 : _;
1678
- n.size.height > r && i.set(e, n.size.height);
1679
- let a = (v = n == null ? void 0 : n.widthInColumns) == null ? 1 : v;
1680
- u > 0 && (a = Math.min(a, u - t % u)), t += a;
1681
- }
1682
- }
1683
- let o = /* @__PURE__ */ new Map();
1684
- {
1685
- let e = 0, t = [...i.keys()].sort((e, t) => e - t);
1686
- for (let n of t) {
1687
- var y;
1688
- o.set(n, e), e += ((y = i.get(n)) == null ? 0 : y) + B;
1689
- }
1690
- }
1691
- let s = 0;
1692
- a.debug("abc91 block?.size?.x", e.id, e == null || (p = e.size) == null ? void 0 : p.x);
1693
- let c = !(e == null || (m = e.size) == null) && m.x ? (e == null || (h = e.size) == null ? void 0 : h.x) + (-(e == null || (g = e.size) == null ? void 0 : g.width) / 2 || 0) : -B, l = 0;
1694
- for (let n of e.children) {
1695
- var b, x, S;
1696
- let r = e;
1697
- if (!n.size) continue;
1698
- let { width: d, height: f } = n.size, { px: p, py: m } = nt(u, s);
1699
- if (m != l) {
1700
- var C, w, T;
1701
- l = m, c = !(e == null || (C = e.size) == null) && C.x ? (e == null || (w = e.size) == null ? void 0 : w.x) + (-(e == null || (T = e.size) == null ? void 0 : T.width) / 2 || 0) : -B, a.debug("New row in layout for block", e.id, " and child ", n.id, l);
1702
- }
1703
- if (a.debug(`abc89 layout blocks (child) id: ${n.id} Pos: ${s} (px, py) ${p},${m} (${r == null || (b = r.size) == null ? void 0 : b.x},${r == null || (x = r.size) == null ? void 0 : x.y}) parent: ${r.id} width: ${d}${B}`), r.size) {
1704
- var E, D, O, k;
1705
- let e = d / 2;
1706
- n.size.x = c + B + e, a.debug(`abc91 layout blocks (calc) px, pyid:${n.id} startingPos=X${c} new startingPosX${n.size.x} ${e} padding=${B} width=${d} halfWidth=${e} => x:${n.size.x} y:${n.size.y} ${n.widthInColumns} (width * (child?.w || 1)) / 2 ${d * ((E = n == null ? void 0 : n.widthInColumns) == null ? 1 : E) / 2}`), c = n.size.x + e;
1707
- let t = (D = o.get(m)) == null ? 0 : D, s = (O = i.get(m)) == null ? f : O;
1708
- n.size.y = r.size.y - r.size.height / 2 + t + s / 2 + B, a.debug(`abc88 layout blocks (calc) px, pyid:${n.id}startingPosX${c}${B}${e}=>x:${n.size.x}y:${n.size.y}${n.widthInColumns}(width * (child?.w || 1)) / 2${d * ((k = n == null ? void 0 : n.widthInColumns) == null ? 1 : k) / 2}`);
1709
- }
1710
- n.children && it(n, t);
1711
- let h = (S = n == null ? void 0 : n.widthInColumns) == null ? 1 : S;
1712
- u > 0 && (h = Math.min(h, u - s % u)), s += h, a.debug("abc88 columnsPos", n, s);
1713
- }
1714
- }
1715
- a.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${e == null || (s = e.size) == null ? void 0 : s.x} y: ${e == null || (c = e.size) == null ? void 0 : c.y} width: ${e == null || (l = e.size) == null ? void 0 : l.width}`);
1716
- }
1717
- i(it, "layoutBlocks");
1718
- function at(e, { minX: t, minY: n, maxX: r, maxY: i } = {
1719
- minX: 0,
1720
- minY: 0,
1721
- maxX: 0,
1722
- maxY: 0
1723
- }) {
1724
- if (e.size && e.id !== "root") {
1725
- let { x: a, y: o, width: s, height: c } = e.size;
1726
- a - s / 2 < t && (t = a - s / 2), o - c / 2 < n && (n = o - c / 2), a + s / 2 > r && (r = a + s / 2), o + c / 2 > i && (i = o + c / 2);
1727
- }
1728
- if (e.children) for (let a of e.children) ({minX: t, minY: n, maxX: r, maxY: i} = at(a, {
1729
- minX: t,
1730
- minY: n,
1731
- maxX: r,
1732
- maxY: i
1733
- }));
1734
- return {
1735
- minX: t,
1736
- minY: n,
1737
- maxX: r,
1738
- maxY: i
1739
- };
1740
- }
1741
- i(at, "findBounds");
1742
- function ot(e) {
1743
- let t = e.getBlock("root");
1744
- if (!t) return;
1745
- V(t, e, 0, 0), it(t, e), a.debug("getBlocks", JSON.stringify(t, null, 2));
1746
- let { minX: n, minY: r, maxX: i, maxY: o } = at(t), s = o - r;
1747
- return {
1748
- x: n,
1749
- y: r,
1750
- width: i - n,
1751
- height: s
1752
- };
1753
- }
1754
- i(ot, "layout");
1755
- var H = /* @__PURE__ */ i(function() {
1756
- var e = r(function* (e, t, n, r = !1, i = !1) {
1757
- let a = t || "";
1758
- typeof a == "object" && (a = a[0]);
1759
- let o = p(), c = s(o);
1760
- return yield ve(e, a, {
1761
- style: n,
1762
- isTitle: r,
1763
- useHtmlLabels: c,
1764
- markdown: !1,
1765
- isNode: i,
1766
- width: Infinity
1767
- }, o);
1768
- });
1769
- return function(t, n, r) {
1770
- return e.apply(this, arguments);
1771
- };
1772
- }(), "createLabel"), st = /* @__PURE__ */ i((e, t, n, r, i) => {
1773
- t.arrowTypeStart && lt(e, "start", t.arrowTypeStart, n, r, i), t.arrowTypeEnd && lt(e, "end", t.arrowTypeEnd, n, r, i);
1774
- }, "addEdgeMarkers"), ct = {
1775
- arrow_cross: "cross",
1776
- arrow_point: "point",
1777
- arrow_barb: "barb",
1778
- arrow_circle: "circle",
1779
- aggregation: "aggregation",
1780
- extension: "extension",
1781
- composition: "composition",
1782
- dependency: "dependency",
1783
- lollipop: "lollipop"
1784
- }, lt = /* @__PURE__ */ i((e, t, n, r, i, o) => {
1785
- let s = ct[n];
1786
- if (!s) {
1787
- a.warn(`Unknown arrow type: ${n}`);
1788
- return;
1789
- }
1790
- let c = t === "start" ? "Start" : "End";
1791
- e.attr(`marker-${t}`, `url(${r}#${i}_${o}-${s}${c})`);
1792
- }, "addEdgeMarker"), ut = {}, U = {}, dt = /* @__PURE__ */ i(function() {
1793
- var e = r(function* (e, t) {
1794
- let n = p(), r = s(n), i = e.insert("g").attr("class", "edgeLabel"), a = i.insert("g").attr("class", "label"), o = t.labelType === "markdown", c = yield ve(e, t.label, {
1795
- style: t.labelStyle,
1796
- useHtmlLabels: r,
1797
- addSvgBackground: o,
1798
- isNode: !1,
1799
- markdown: o,
1800
- width: o ? void 0 : Infinity
1801
- }, n);
1802
- a.node().appendChild(c);
1803
- let l = c.getBBox(), u = l;
1804
- if (r) {
1805
- let e = c.children[0], t = g(c);
1806
- l = e.getBoundingClientRect(), u = l, t.attr("width", l.width), t.attr("height", l.height);
1807
- } else {
1808
- let e = g(c).select("text").node();
1809
- e && typeof e.getBBox == "function" && (u = e.getBBox());
1810
- }
1811
- a.attr("transform", M(u, r)), ut[t.id] = i, t.width = l.width, t.height = l.height;
1812
- let d;
1813
- if (t.startLabelLeft) {
1814
- let n = e.insert("g").attr("class", "edgeTerminals"), i = n.insert("g").attr("class", "inner"), a = yield H(i, t.startLabelLeft, t.labelStyle);
1815
- d = a;
1816
- let o = a.getBBox();
1817
- if (r) {
1818
- let e = a.children[0], t = g(a);
1819
- o = e.getBoundingClientRect(), t.attr("width", o.width), t.attr("height", o.height);
1820
- }
1821
- i.attr("transform", M(o, r)), U[t.id] || (U[t.id] = {}), U[t.id].startLeft = n, W(d, t.startLabelLeft);
1822
- }
1823
- if (t.startLabelRight) {
1824
- let n = e.insert("g").attr("class", "edgeTerminals"), i = n.insert("g").attr("class", "inner"), a = yield H(i, t.startLabelRight, t.labelStyle);
1825
- d = a;
1826
- let o = a.getBBox();
1827
- if (r) {
1828
- let e = a.children[0], t = g(a);
1829
- o = e.getBoundingClientRect(), t.attr("width", o.width), t.attr("height", o.height);
1830
- }
1831
- i.attr("transform", M(o, r)), U[t.id] || (U[t.id] = {}), U[t.id].startRight = n, W(d, t.startLabelRight);
1832
- }
1833
- if (t.endLabelLeft) {
1834
- let n = e.insert("g").attr("class", "edgeTerminals"), i = n.insert("g").attr("class", "inner"), a = yield H(n, t.endLabelLeft, t.labelStyle);
1835
- d = a;
1836
- let o = a.getBBox();
1837
- if (r) {
1838
- let e = a.children[0], t = g(a);
1839
- o = e.getBoundingClientRect(), t.attr("width", o.width), t.attr("height", o.height);
1840
- }
1841
- i.attr("transform", M(o, r)), U[t.id] || (U[t.id] = {}), U[t.id].endLeft = n, W(d, t.endLabelLeft);
1842
- }
1843
- if (t.endLabelRight) {
1844
- let n = e.insert("g").attr("class", "edgeTerminals"), i = n.insert("g").attr("class", "inner"), a = yield H(n, t.endLabelRight, t.labelStyle);
1845
- d = a;
1846
- let o = a.getBBox();
1847
- if (r) {
1848
- let e = a.children[0], t = g(a);
1849
- o = e.getBoundingClientRect(), t.attr("width", o.width), t.attr("height", o.height);
1850
- }
1851
- i.attr("transform", M(o, r)), U[t.id] || (U[t.id] = {}), U[t.id].endRight = n, W(d, t.endLabelRight);
1852
- }
1853
- return c;
1854
- });
1855
- return function(t, n) {
1856
- return e.apply(this, arguments);
1857
- };
1858
- }(), "insertEdgeLabel");
1859
- function W(e, t) {
1860
- s(p()) && e && (e.style.width = t.length * 9 + "px", e.style.height = "12px");
1861
- }
1862
- i(W, "setTerminalWidth");
1863
- var ft = /* @__PURE__ */ i((e, t) => {
1864
- a.debug("Moving label abc88 ", e.id, e.label, ut[e.id], t);
1865
- let n = t.updatedPath ? t.updatedPath : t.originalPath, { subGraphTitleTotalMargin: r } = ge(p());
1866
- if (e.label) {
1867
- let i = ut[e.id], o = e.x, s = e.y;
1868
- if (n) {
1869
- let r = j.calcLabelPosition(n);
1870
- a.debug("Moving label " + e.label + " from (", o, ",", s, ") to (", r.x, ",", r.y, ") abc88"), t.updatedPath && (o = r.x, s = r.y);
1871
- }
1872
- i.attr("transform", `translate(${o}, ${s + r / 2})`);
1873
- }
1874
- if (e.startLabelLeft) {
1875
- let t = U[e.id].startLeft, r = e.x, i = e.y;
1876
- if (n) {
1877
- let t = j.calcTerminalLabelPosition(e.arrowTypeStart ? 10 : 0, "start_left", n);
1878
- r = t.x, i = t.y;
1879
- }
1880
- t.attr("transform", `translate(${r}, ${i})`);
1881
- }
1882
- if (e.startLabelRight) {
1883
- let t = U[e.id].startRight, r = e.x, i = e.y;
1884
- if (n) {
1885
- let t = j.calcTerminalLabelPosition(e.arrowTypeStart ? 10 : 0, "start_right", n);
1886
- r = t.x, i = t.y;
1887
- }
1888
- t.attr("transform", `translate(${r}, ${i})`);
1889
- }
1890
- if (e.endLabelLeft) {
1891
- let t = U[e.id].endLeft, r = e.x, i = e.y;
1892
- if (n) {
1893
- let t = j.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_left", n);
1894
- r = t.x, i = t.y;
1895
- }
1896
- t.attr("transform", `translate(${r}, ${i})`);
1897
- }
1898
- if (e.endLabelRight) {
1899
- let t = U[e.id].endRight, r = e.x, i = e.y;
1900
- if (n) {
1901
- let t = j.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_right", n);
1902
- r = t.x, i = t.y;
1903
- }
1904
- t.attr("transform", `translate(${r}, ${i})`);
1905
- }
1906
- }, "positionEdgeLabel"), pt = /* @__PURE__ */ i((e, t) => {
1907
- let n = e.x, r = e.y, i = Math.abs(t.x - n), a = Math.abs(t.y - r), o = e.width / 2, s = e.height / 2;
1908
- return i >= o || a >= s;
1909
- }, "outsideNode"), mt = /* @__PURE__ */ i((e, t, n) => {
1910
- a.debug(`intersection calc abc89:
1911
- outsidePoint: ${JSON.stringify(t)}
1912
- insidePoint : ${JSON.stringify(n)}
1913
- node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);
1914
- let r = e.x, i = e.y, o = Math.abs(r - n.x), s = e.width / 2, c = n.x < t.x ? s - o : s + o, l = e.height / 2, u = Math.abs(t.y - n.y), d = Math.abs(t.x - n.x);
1915
- if (Math.abs(i - t.y) * s > Math.abs(r - t.x) * l) {
1916
- let e = n.y < t.y ? t.y - l - i : i - l - t.y;
1917
- c = d * e / u;
1918
- let r = {
1919
- x: n.x < t.x ? n.x + c : n.x - d + c,
1920
- y: n.y < t.y ? n.y + u - e : n.y - u + e
1921
- };
1922
- return c === 0 && (r.x = t.x, r.y = t.y), d === 0 && (r.x = t.x), u === 0 && (r.y = t.y), a.debug(`abc89 topp/bott calc, Q ${u}, q ${e}, R ${d}, r ${c}`, r), r;
1923
- } else {
1924
- c = n.x < t.x ? t.x - s - r : r - s - t.x;
1925
- let e = u * c / d, i = n.x < t.x ? n.x + d - c : n.x - d + c, o = n.y < t.y ? n.y + e : n.y - e;
1926
- return a.debug(`sides calc abc89, Q ${u}, q ${e}, R ${d}, r ${c}`, {
1927
- _x: i,
1928
- _y: o
1929
- }), c === 0 && (i = t.x, o = t.y), d === 0 && (i = t.x), u === 0 && (o = t.y), {
1930
- x: i,
1931
- y: o
1932
- };
1933
- }
1934
- }, "intersection"), ht = /* @__PURE__ */ i((e, t) => {
1935
- a.debug("abc88 cutPathAtIntersect", e, t);
1936
- let n = [], r = e[0], i = !1;
1937
- return e.forEach((e) => {
1938
- if (!pt(t, e) && !i) {
1939
- let a = mt(t, r, e), o = !1;
1940
- n.forEach((e) => {
1941
- o = o || e.x === a.x && e.y === a.y;
1942
- }), n.some((e) => e.x === a.x && e.y === a.y) || n.push(a), i = !0;
1943
- } else r = e, i || n.push(e);
1944
- }), n;
1945
- }, "cutPathAtIntersect"), gt = /* @__PURE__ */ i(function(e, t, n, r, i, s, c) {
1946
- let l = n.points;
1947
- a.debug("abc88 InsertEdge: edge=", n, "e=", t);
1948
- let u = !1, d = s.node(t.v);
1949
- var f = s.node(t.w);
1950
- f != null && f.intersect && d != null && d.intersect && (l = l.slice(1, n.points.length - 1), l.unshift(d.intersect(l[0])), l.push(f.intersect(l[l.length - 1]))), n.toCluster && (a.debug("to cluster abc88", r[n.toCluster]), l = ht(n.points, r[n.toCluster].node), u = !0), n.fromCluster && (a.debug("from cluster abc88", r[n.fromCluster]), l = ht(l.reverse(), r[n.fromCluster].node).reverse(), u = !0);
1951
- let m = l.filter((e) => !Number.isNaN(e.y)), h = _;
1952
- n.curve && (i === "graph" || i === "flowchart") && (h = n.curve);
1953
- let { x: g, y } = he(n), b = v().x(g).y(y).curve(h), x;
1954
- switch (n.thickness) {
1955
- case "normal":
1956
- x = "edge-thickness-normal";
1957
- break;
1958
- case "thick":
1959
- x = "edge-thickness-thick";
1960
- break;
1961
- case "invisible":
1962
- x = "edge-thickness-thick";
1963
- break;
1964
- default: x = "";
1965
- }
1966
- switch (n.pattern) {
1967
- case "solid":
1968
- x += " edge-pattern-solid";
1969
- break;
1970
- case "dotted":
1971
- x += " edge-pattern-dotted";
1972
- break;
1973
- case "dashed":
1974
- x += " edge-pattern-dashed";
1975
- break;
1976
- }
1977
- let S = e.append("path").attr("d", b(m)).attr("id", n.id).attr("class", " " + x + (n.classes ? " " + n.classes : "")).attr("style", n.style), C = "";
1978
- (p().flowchart.arrowMarkerAbsolute || p().state.arrowMarkerAbsolute) && (C = o(!0)), st(S, n, C, c, i);
1979
- let w = {};
1980
- return u && (w.updatedPath = l), w.originalPath = n.points, w;
1981
- }, "insertEdge"), _t = /* @__PURE__ */ i((e) => {
1982
- let t = /* @__PURE__ */ new Set();
1983
- for (let n of e) switch (n) {
1984
- case "x":
1985
- t.add("right"), t.add("left");
1986
- break;
1987
- case "y":
1988
- t.add("up"), t.add("down");
1989
- break;
1990
- default:
1991
- t.add(n);
1992
- break;
1993
- }
1994
- return t;
1995
- }, "expandAndDeduplicateDirections"), vt = /* @__PURE__ */ i((e, t, n, r) => {
1996
- let i = _t(e), a = t.height + 2 * n.padding, o = a / 2, s = r == null ? t.width + 2 * o + n.padding : r, c = n.padding / 2;
1997
- return i.has("right") && i.has("left") && i.has("up") && i.has("down") ? [
1998
- {
1999
- x: 0,
2000
- y: 0
2001
- },
2002
- {
2003
- x: o,
2004
- y: 0
2005
- },
2006
- {
2007
- x: s / 2,
2008
- y: 2 * c
2009
- },
2010
- {
2011
- x: s - o,
2012
- y: 0
2013
- },
2014
- {
2015
- x: s,
2016
- y: 0
2017
- },
2018
- {
2019
- x: s,
2020
- y: -a / 3
2021
- },
2022
- {
2023
- x: s + 2 * c,
2024
- y: -a / 2
2025
- },
2026
- {
2027
- x: s,
2028
- y: -2 * a / 3
2029
- },
2030
- {
2031
- x: s,
2032
- y: -a
2033
- },
2034
- {
2035
- x: s - o,
2036
- y: -a
2037
- },
2038
- {
2039
- x: s / 2,
2040
- y: -a - 2 * c
2041
- },
2042
- {
2043
- x: o,
2044
- y: -a
2045
- },
2046
- {
2047
- x: 0,
2048
- y: -a
2049
- },
2050
- {
2051
- x: 0,
2052
- y: -2 * a / 3
2053
- },
2054
- {
2055
- x: -2 * c,
2056
- y: -a / 2
2057
- },
2058
- {
2059
- x: 0,
2060
- y: -a / 3
2061
- }
2062
- ] : i.has("right") && i.has("left") && i.has("up") ? [
2063
- {
2064
- x: o,
2065
- y: 0
2066
- },
2067
- {
2068
- x: s - o,
2069
- y: 0
2070
- },
2071
- {
2072
- x: s,
2073
- y: -a / 2
2074
- },
2075
- {
2076
- x: s - o,
2077
- y: -a
2078
- },
2079
- {
2080
- x: o,
2081
- y: -a
2082
- },
2083
- {
2084
- x: 0,
2085
- y: -a / 2
2086
- }
2087
- ] : i.has("right") && i.has("left") && i.has("down") ? [
2088
- {
2089
- x: 0,
2090
- y: 0
2091
- },
2092
- {
2093
- x: o,
2094
- y: -a
2095
- },
2096
- {
2097
- x: s - o,
2098
- y: -a
2099
- },
2100
- {
2101
- x: s,
2102
- y: 0
2103
- }
2104
- ] : i.has("right") && i.has("up") && i.has("down") ? [
2105
- {
2106
- x: 0,
2107
- y: 0
2108
- },
2109
- {
2110
- x: s,
2111
- y: -o
2112
- },
2113
- {
2114
- x: s,
2115
- y: -a + o
2116
- },
2117
- {
2118
- x: 0,
2119
- y: -a
2120
- }
2121
- ] : i.has("left") && i.has("up") && i.has("down") ? [
2122
- {
2123
- x: s,
2124
- y: 0
2125
- },
2126
- {
2127
- x: 0,
2128
- y: -o
2129
- },
2130
- {
2131
- x: 0,
2132
- y: -a + o
2133
- },
2134
- {
2135
- x: s,
2136
- y: -a
2137
- }
2138
- ] : i.has("right") && i.has("left") ? [
2139
- {
2140
- x: o,
2141
- y: 0
2142
- },
2143
- {
2144
- x: o,
2145
- y: -c
2146
- },
2147
- {
2148
- x: s - o,
2149
- y: -c
2150
- },
2151
- {
2152
- x: s - o,
2153
- y: 0
2154
- },
2155
- {
2156
- x: s,
2157
- y: -a / 2
2158
- },
2159
- {
2160
- x: s - o,
2161
- y: -a
2162
- },
2163
- {
2164
- x: s - o,
2165
- y: -a + c
2166
- },
2167
- {
2168
- x: o,
2169
- y: -a + c
2170
- },
2171
- {
2172
- x: o,
2173
- y: -a
2174
- },
2175
- {
2176
- x: 0,
2177
- y: -a / 2
2178
- }
2179
- ] : i.has("up") && i.has("down") ? [
2180
- {
2181
- x: s / 2,
2182
- y: 0
2183
- },
2184
- {
2185
- x: 0,
2186
- y: -c
2187
- },
2188
- {
2189
- x: o,
2190
- y: -c
2191
- },
2192
- {
2193
- x: o,
2194
- y: -a + c
2195
- },
2196
- {
2197
- x: 0,
2198
- y: -a + c
2199
- },
2200
- {
2201
- x: s / 2,
2202
- y: -a
2203
- },
2204
- {
2205
- x: s,
2206
- y: -a + c
2207
- },
2208
- {
2209
- x: s - o,
2210
- y: -a + c
2211
- },
2212
- {
2213
- x: s - o,
2214
- y: -c
2215
- },
2216
- {
2217
- x: s,
2218
- y: -c
2219
- }
2220
- ] : i.has("right") && i.has("up") ? [
2221
- {
2222
- x: 0,
2223
- y: 0
2224
- },
2225
- {
2226
- x: s,
2227
- y: -o
2228
- },
2229
- {
2230
- x: 0,
2231
- y: -a
2232
- }
2233
- ] : i.has("right") && i.has("down") ? [
2234
- {
2235
- x: 0,
2236
- y: 0
2237
- },
2238
- {
2239
- x: s,
2240
- y: 0
2241
- },
2242
- {
2243
- x: 0,
2244
- y: -a
2245
- }
2246
- ] : i.has("left") && i.has("up") ? [
2247
- {
2248
- x: s,
2249
- y: 0
2250
- },
2251
- {
2252
- x: 0,
2253
- y: -o
2254
- },
2255
- {
2256
- x: s,
2257
- y: -a
2258
- }
2259
- ] : i.has("left") && i.has("down") ? [
2260
- {
2261
- x: s,
2262
- y: 0
2263
- },
2264
- {
2265
- x: 0,
2266
- y: 0
2267
- },
2268
- {
2269
- x: s,
2270
- y: -a
2271
- }
2272
- ] : i.has("right") ? [
2273
- {
2274
- x: o,
2275
- y: -c
2276
- },
2277
- {
2278
- x: o,
2279
- y: -c
2280
- },
2281
- {
2282
- x: s - o,
2283
- y: -c
2284
- },
2285
- {
2286
- x: s - o,
2287
- y: 0
2288
- },
2289
- {
2290
- x: s,
2291
- y: -a / 2
2292
- },
2293
- {
2294
- x: s - o,
2295
- y: -a
2296
- },
2297
- {
2298
- x: s - o,
2299
- y: -a + c
2300
- },
2301
- {
2302
- x: o,
2303
- y: -a + c
2304
- },
2305
- {
2306
- x: o,
2307
- y: -a + c
2308
- }
2309
- ] : i.has("left") ? [
2310
- {
2311
- x: o,
2312
- y: 0
2313
- },
2314
- {
2315
- x: o,
2316
- y: -c
2317
- },
2318
- {
2319
- x: s - o,
2320
- y: -c
2321
- },
2322
- {
2323
- x: s - o,
2324
- y: -a + c
2325
- },
2326
- {
2327
- x: o,
2328
- y: -a + c
2329
- },
2330
- {
2331
- x: o,
2332
- y: -a
2333
- },
2334
- {
2335
- x: 0,
2336
- y: -a / 2
2337
- }
2338
- ] : i.has("up") ? [
2339
- {
2340
- x: o,
2341
- y: -c
2342
- },
2343
- {
2344
- x: o,
2345
- y: -a + c
2346
- },
2347
- {
2348
- x: 0,
2349
- y: -a + c
2350
- },
2351
- {
2352
- x: s / 2,
2353
- y: -a
2354
- },
2355
- {
2356
- x: s,
2357
- y: -a + c
2358
- },
2359
- {
2360
- x: s - o,
2361
- y: -a + c
2362
- },
2363
- {
2364
- x: s - o,
2365
- y: -c
2366
- }
2367
- ] : i.has("down") ? [
2368
- {
2369
- x: s / 2,
2370
- y: 0
2371
- },
2372
- {
2373
- x: 0,
2374
- y: -c
2375
- },
2376
- {
2377
- x: o,
2378
- y: -c
2379
- },
2380
- {
2381
- x: o,
2382
- y: -a + c
2383
- },
2384
- {
2385
- x: s - o,
2386
- y: -a + c
2387
- },
2388
- {
2389
- x: s - o,
2390
- y: -c
2391
- },
2392
- {
2393
- x: s,
2394
- y: -c
2395
- }
2396
- ] : [{
2397
- x: 0,
2398
- y: 0
2399
- }];
2400
- }, "getArrowPoints");
2401
- function yt(e, t) {
2402
- return e.intersect(t);
2403
- }
2404
- i(yt, "intersectNode");
2405
- var bt = yt;
2406
- function xt(e, t, n, r) {
2407
- var i = e.x, a = e.y, o = i - r.x, s = a - r.y, c = Math.sqrt(t * t * s * s + n * n * o * o), l = Math.abs(t * n * o / c);
2408
- r.x < i && (l = -l);
2409
- var u = Math.abs(t * n * s / c);
2410
- return r.y < a && (u = -u), {
2411
- x: i + l,
2412
- y: a + u
2413
- };
2414
- }
2415
- i(xt, "intersectEllipse");
2416
- var St = xt;
2417
- function Ct(e, t, n) {
2418
- return St(e, t, t, n);
2419
- }
2420
- i(Ct, "intersectCircle");
2421
- var wt = Ct;
2422
- function Tt(e, t, n, r) {
2423
- var i = t.y - e.y, a, o = e.x - t.x, s, c = t.x * e.y - e.x * t.y, l, u, d, f = i * n.x + o * n.y + c, p = i * r.x + o * r.y + c, m, h, g, _, v;
2424
- if (!(f !== 0 && p !== 0 && Et(f, p)) && (a = r.y - n.y, s = n.x - r.x, l = r.x * n.y - n.x * r.y, u = a * e.x + s * e.y + l, d = a * t.x + s * t.y + l, !(u !== 0 && d !== 0 && Et(u, d)) && (m = i * s - a * o, m !== 0))) return h = Math.abs(m / 2), g = o * l - s * c, _ = g < 0 ? (g - h) / m : (g + h) / m, g = a * c - i * l, v = g < 0 ? (g - h) / m : (g + h) / m, {
2425
- x: _,
2426
- y: v
2427
- };
2428
- }
2429
- i(Tt, "intersectLine");
2430
- function Et(e, t) {
2431
- return e * t > 0;
2432
- }
2433
- i(Et, "sameSign");
2434
- var Dt = Tt, Ot = kt;
2435
- function kt(e, t, n) {
2436
- var r = e.x, i = e.y, a = [], o = Infinity, s = Infinity;
2437
- typeof t.forEach == "function" ? t.forEach(function(e) {
2438
- o = Math.min(o, e.x), s = Math.min(s, e.y);
2439
- }) : (o = Math.min(o, t.x), s = Math.min(s, t.y));
2440
- for (var c = r - e.width / 2 - o, l = i - e.height / 2 - s, u = 0; u < t.length; u++) {
2441
- var d = t[u], f = t[u < t.length - 1 ? u + 1 : 0], p = Dt(e, n, {
2442
- x: c + d.x,
2443
- y: l + d.y
2444
- }, {
2445
- x: c + f.x,
2446
- y: l + f.y
2447
- });
2448
- p && a.push(p);
2449
- }
2450
- return a.length ? (a.length > 1 && a.sort(function(e, t) {
2451
- var r = e.x - n.x, i = e.y - n.y, a = Math.sqrt(r * r + i * i), o = t.x - n.x, s = t.y - n.y, c = Math.sqrt(o * o + s * s);
2452
- return a < c ? -1 : a === c ? 0 : 1;
2453
- }), a[0]) : e;
2454
- }
2455
- i(kt, "intersectPolygon");
2456
- var G = {
2457
- node: bt,
2458
- circle: wt,
2459
- ellipse: St,
2460
- polygon: Ot,
2461
- rect: /* @__PURE__ */ i((e, t) => {
2462
- var n = e.x, r = e.y, i = t.x - n, a = t.y - r, o = e.width / 2, s = e.height / 2, c, l;
2463
- return Math.abs(a) * o > Math.abs(i) * s ? (a < 0 && (s = -s), c = a === 0 ? 0 : s * i / a, l = s) : (i < 0 && (o = -o), c = o, l = i === 0 ? 0 : o * a / i), {
2464
- x: n + c,
2465
- y: r + l
2466
- };
2467
- }, "intersectRect")
2468
- }, K = /* @__PURE__ */ i(function() {
2469
- var e = r(function* (e, t, n, r) {
2470
- let i = p(), a, o = t.useHtmlLabels || s(i);
2471
- a = n || "node default";
2472
- let c = e.insert("g").attr("class", a).attr("id", t.domId || t.id), l = c.insert("g").attr("class", "label").attr("style", t.labelStyle), u;
2473
- u = t.labelText === void 0 ? "" : typeof t.labelText == "string" ? t.labelText : t.labelText[0];
2474
- let d;
2475
- d = t.labelType === "markdown" ? ve(l, m(se(u), i), {
2476
- useHtmlLabels: o,
2477
- width: t.width || i.flowchart.wrappingWidth,
2478
- classes: "markdown-node-label"
2479
- }, i) : yield H(l, m(se(u), i), t.labelStyle, !1, r);
2480
- let f = d.getBBox(), h = t.padding / 2;
2481
- if (s(i)) {
2482
- let e = d.children[0], t = g(d);
2483
- yield _e(e, u), f = e.getBoundingClientRect(), t.attr("width", f.width), t.attr("height", f.height);
2484
- }
2485
- return o ? l.attr("transform", "translate(" + -f.width / 2 + ", " + -f.height / 2 + ")") : l.attr("transform", "translate(0, " + -f.height / 2 + ")"), t.centerLabel && l.attr("transform", "translate(" + -f.width / 2 + ", " + -f.height / 2 + ")"), l.insert("rect", ":first-child"), {
2486
- shapeSvg: c,
2487
- bbox: f,
2488
- halfPadding: h,
2489
- label: l
2490
- };
2491
- });
2492
- return function(t, n, r, i) {
2493
- return e.apply(this, arguments);
2494
- };
2495
- }(), "labelHelper"), q = /* @__PURE__ */ i((e, t) => {
2496
- let n = t.node().getBBox();
2497
- e.width = n.width, e.height = n.height;
2498
- }, "updateNodeBounds");
2499
- function J(e, t, n, r) {
2500
- return e.insert("polygon", ":first-child").attr("points", r.map(function(e) {
2501
- return e.x + "," + e.y;
2502
- }).join(" ")).attr("class", "label-container").attr("transform", "translate(" + -t / 2 + "," + n / 2 + ")");
2503
- }
2504
- i(J, "insertPolygonShape");
2505
- var At = /* @__PURE__ */ i(function() {
2506
- var e = r(function* (e, t) {
2507
- t.useHtmlLabels || s(p()) || (t.centerLabel = !0);
2508
- let { shapeSvg: n, bbox: r, halfPadding: i } = yield K(e, t, "node " + t.classes, !0);
2509
- a.info("Classes = ", t.classes);
2510
- let o = n.insert("rect", ":first-child");
2511
- return o.attr("rx", t.rx).attr("ry", t.ry).attr("x", -r.width / 2 - i).attr("y", -r.height / 2 - i).attr("width", r.width + t.padding).attr("height", r.height + t.padding), q(t, o), t.intersect = function(e) {
2512
- return G.rect(t, e);
2513
- }, n;
2514
- });
2515
- return function(t, n) {
2516
- return e.apply(this, arguments);
2517
- };
2518
- }(), "note"), jt = /* @__PURE__ */ i((e) => e ? " " + e : "", "formatClass"), Y = /* @__PURE__ */ i((e, t) => `${t || "node default"}${jt(e.classes)} ${jt(e.class)}`, "getClassesFromNode"), Mt = /* @__PURE__ */ i(function() {
2519
- var e = r(function* (e, t) {
2520
- let { shapeSvg: n, bbox: r } = yield K(e, t, Y(t, void 0), !0), i = r.width + t.padding + (r.height + t.padding), o = [
2521
- {
2522
- x: i / 2,
2523
- y: 0
2524
- },
2525
- {
2526
- x: i,
2527
- y: -i / 2
2528
- },
2529
- {
2530
- x: i / 2,
2531
- y: -i
2532
- },
2533
- {
2534
- x: 0,
2535
- y: -i / 2
2536
- }
2537
- ];
2538
- a.info("Question main (Circle)");
2539
- let s = J(n, i, i, o);
2540
- return s.attr("style", t.style), q(t, s), t.intersect = function(e) {
2541
- return a.warn("Intersect called"), G.polygon(t, o, e);
2542
- }, n;
2543
- });
2544
- return function(t, n) {
2545
- return e.apply(this, arguments);
2546
- };
2547
- }(), "question"), Nt = /* @__PURE__ */ i((e, t) => {
2548
- let n = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id);
2549
- return n.insert("polygon", ":first-child").attr("points", [
2550
- {
2551
- x: 0,
2552
- y: 28 / 2
2553
- },
2554
- {
2555
- x: 28 / 2,
2556
- y: 0
2557
- },
2558
- {
2559
- x: 0,
2560
- y: -28 / 2
2561
- },
2562
- {
2563
- x: -28 / 2,
2564
- y: 0
2565
- }
2566
- ].map(function(e) {
2567
- return e.x + "," + e.y;
2568
- }).join(" ")).attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28), t.width = 28, t.height = 28, t.intersect = function(e) {
2569
- return G.circle(t, 14, e);
2570
- }, n;
2571
- }, "choice"), Pt = /* @__PURE__ */ i(function() {
2572
- var e = r(function* (e, t) {
2573
- let { shapeSvg: n, bbox: r } = yield K(e, t, Y(t, void 0), !0), i = t.positioned ? t.height : r.height + t.padding, a = i / 4, o = t.positioned ? t.width : r.width + 2 * a + t.padding, s = [
2574
- {
2575
- x: a,
2576
- y: 0
2577
- },
2578
- {
2579
- x: o - a,
2580
- y: 0
2581
- },
2582
- {
2583
- x: o,
2584
- y: -i / 2
2585
- },
2586
- {
2587
- x: o - a,
2588
- y: -i
2589
- },
2590
- {
2591
- x: a,
2592
- y: -i
2593
- },
2594
- {
2595
- x: 0,
2596
- y: -i / 2
2597
- }
2598
- ], c = J(n, o, i, s);
2599
- return c.attr("style", t.style), q(t, c), t.intersect = function(e) {
2600
- return G.polygon(t, s, e);
2601
- }, n;
2602
- });
2603
- return function(t, n) {
2604
- return e.apply(this, arguments);
2605
- };
2606
- }(), "hexagon"), Ft = /* @__PURE__ */ i(function() {
2607
- var e = r(function* (e, t) {
2608
- var n;
2609
- let { shapeSvg: r, bbox: i } = yield K(e, t, void 0, !0), a = i.height + 2 * t.padding, o = a / 2, s = i.width + 2 * o + t.padding, c = t.positioned && ((n = t.widthInColumns) == null ? 1 : n) > 1 && t.width > s ? t.width : s, l = vt(t.directions, i, t, c), u = J(r, c, a, l);
2610
- return u.attr("style", t.style), q(t, u), t.intersect = function(e) {
2611
- return G.polygon(t, l, e);
2612
- }, r;
2613
- });
2614
- return function(t, n) {
2615
- return e.apply(this, arguments);
2616
- };
2617
- }(), "block_arrow"), It = /* @__PURE__ */ i(function() {
2618
- var e = r(function* (e, t) {
2619
- let { shapeSvg: n, bbox: r } = yield K(e, t, Y(t, void 0), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
2620
- {
2621
- x: -a / 2,
2622
- y: 0
2623
- },
2624
- {
2625
- x: i,
2626
- y: 0
2627
- },
2628
- {
2629
- x: i,
2630
- y: -a
2631
- },
2632
- {
2633
- x: -a / 2,
2634
- y: -a
2635
- },
2636
- {
2637
- x: 0,
2638
- y: -a / 2
2639
- }
2640
- ];
2641
- return J(n, i, a, o).attr("style", t.style), t.width = i + a, t.height = a, t.intersect = function(e) {
2642
- return G.polygon(t, o, e);
2643
- }, n;
2644
- });
2645
- return function(t, n) {
2646
- return e.apply(this, arguments);
2647
- };
2648
- }(), "rect_left_inv_arrow"), Lt = /* @__PURE__ */ i(function() {
2649
- var e = r(function* (e, t) {
2650
- let { shapeSvg: n, bbox: r } = yield K(e, t, Y(t), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
2651
- {
2652
- x: -2 * a / 6,
2653
- y: 0
2654
- },
2655
- {
2656
- x: i - a / 6,
2657
- y: 0
2658
- },
2659
- {
2660
- x: i + 2 * a / 6,
2661
- y: -a
2662
- },
2663
- {
2664
- x: a / 6,
2665
- y: -a
2666
- }
2667
- ], s = J(n, i, a, o);
2668
- return s.attr("style", t.style), q(t, s), t.intersect = function(e) {
2669
- return G.polygon(t, o, e);
2670
- }, n;
2671
- });
2672
- return function(t, n) {
2673
- return e.apply(this, arguments);
2674
- };
2675
- }(), "lean_right"), Rt = /* @__PURE__ */ i(function() {
2676
- var e = r(function* (e, t) {
2677
- let { shapeSvg: n, bbox: r } = yield K(e, t, Y(t, void 0), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
2678
- {
2679
- x: 2 * a / 6,
2680
- y: 0
2681
- },
2682
- {
2683
- x: i + a / 6,
2684
- y: 0
2685
- },
2686
- {
2687
- x: i - 2 * a / 6,
2688
- y: -a
2689
- },
2690
- {
2691
- x: -a / 6,
2692
- y: -a
2693
- }
2694
- ], s = J(n, i, a, o);
2695
- return s.attr("style", t.style), q(t, s), t.intersect = function(e) {
2696
- return G.polygon(t, o, e);
2697
- }, n;
2698
- });
2699
- return function(t, n) {
2700
- return e.apply(this, arguments);
2701
- };
2702
- }(), "lean_left"), zt = /* @__PURE__ */ i(function() {
2703
- var e = r(function* (e, t) {
2704
- let { shapeSvg: n, bbox: r } = yield K(e, t, Y(t, void 0), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
2705
- {
2706
- x: -2 * a / 6,
2707
- y: 0
2708
- },
2709
- {
2710
- x: i + 2 * a / 6,
2711
- y: 0
2712
- },
2713
- {
2714
- x: i - a / 6,
2715
- y: -a
2716
- },
2717
- {
2718
- x: a / 6,
2719
- y: -a
2720
- }
2721
- ], s = J(n, i, a, o);
2722
- return s.attr("style", t.style), q(t, s), t.intersect = function(e) {
2723
- return G.polygon(t, o, e);
2724
- }, n;
2725
- });
2726
- return function(t, n) {
2727
- return e.apply(this, arguments);
2728
- };
2729
- }(), "trapezoid"), Bt = /* @__PURE__ */ i(function() {
2730
- var e = r(function* (e, t) {
2731
- let { shapeSvg: n, bbox: r } = yield K(e, t, Y(t, void 0), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
2732
- {
2733
- x: a / 6,
2734
- y: 0
2735
- },
2736
- {
2737
- x: i - a / 6,
2738
- y: 0
2739
- },
2740
- {
2741
- x: i + 2 * a / 6,
2742
- y: -a
2743
- },
2744
- {
2745
- x: -2 * a / 6,
2746
- y: -a
2747
- }
2748
- ], s = J(n, i, a, o);
2749
- return s.attr("style", t.style), q(t, s), t.intersect = function(e) {
2750
- return G.polygon(t, o, e);
2751
- }, n;
2752
- });
2753
- return function(t, n) {
2754
- return e.apply(this, arguments);
2755
- };
2756
- }(), "inv_trapezoid"), Vt = /* @__PURE__ */ i(function() {
2757
- var e = r(function* (e, t) {
2758
- let { shapeSvg: n, bbox: r } = yield K(e, t, Y(t, void 0), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
2759
- {
2760
- x: 0,
2761
- y: 0
2762
- },
2763
- {
2764
- x: i + a / 2,
2765
- y: 0
2766
- },
2767
- {
2768
- x: i,
2769
- y: -a / 2
2770
- },
2771
- {
2772
- x: i + a / 2,
2773
- y: -a
2774
- },
2775
- {
2776
- x: 0,
2777
- y: -a
2778
- }
2779
- ], s = J(n, i, a, o);
2780
- return s.attr("style", t.style), q(t, s), t.intersect = function(e) {
2781
- return G.polygon(t, o, e);
2782
- }, n;
2783
- });
2784
- return function(t, n) {
2785
- return e.apply(this, arguments);
2786
- };
2787
- }(), "rect_right_inv_arrow"), Ht = /* @__PURE__ */ i(function() {
2788
- var e = r(function* (e, t) {
2789
- let { shapeSvg: n, bbox: r } = yield K(e, t, Y(t, void 0), !0), i = r.width + t.padding, a = i / 2, o = a / (2.5 + i / 50), s = r.height + o + t.padding, c = "M 0," + o + " a " + a + "," + o + " 0,0,0 " + i + " 0 a " + a + "," + o + " 0,0,0 " + -i + " 0 l 0," + s + " a " + a + "," + o + " 0,0,0 " + i + " 0 l 0," + -s;
2790
- return q(t, n.attr("label-offset-y", o).insert("path", ":first-child").attr("style", t.style).attr("d", c).attr("transform", "translate(" + -i / 2 + "," + -(s / 2 + o) + ")")), t.intersect = function(e) {
2791
- let n = G.rect(t, e), r = n.x - t.x;
2792
- if (a != 0 && (Math.abs(r) < t.width / 2 || Math.abs(r) == t.width / 2 && Math.abs(n.y - t.y) > t.height / 2 - o)) {
2793
- let i = o * o * (1 - r * r / (a * a));
2794
- i != 0 && (i = Math.sqrt(i)), i = o - i, e.y - t.y > 0 && (i = -i), n.y += i;
2795
- }
2796
- return n;
2797
- }, n;
2798
- });
2799
- return function(t, n) {
2800
- return e.apply(this, arguments);
2801
- };
2802
- }(), "cylinder"), Ut = /* @__PURE__ */ i(function() {
2803
- var e = r(function* (e, t) {
2804
- let { shapeSvg: n, bbox: r, halfPadding: i } = yield K(e, t, "node " + t.classes + " " + t.class, !0), o = n.insert("rect", ":first-child"), s = t.positioned ? t.width : r.width + t.padding, c = t.positioned ? t.height : r.height + t.padding, l = t.positioned ? -s / 2 : -r.width / 2 - i, u = t.positioned ? -c / 2 : -r.height / 2 - i;
2805
- if (o.attr("class", "basic label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", l).attr("y", u).attr("width", s).attr("height", c), t.props) {
2806
- let e = new Set(Object.keys(t.props));
2807
- t.props.borders && (X(o, t.props.borders, s, c), e.delete("borders")), e.forEach((e) => {
2808
- a.warn(`Unknown node property ${e}`);
2809
- });
2810
- }
2811
- return q(t, o), t.intersect = function(e) {
2812
- return G.rect(t, e);
2813
- }, n;
2814
- });
2815
- return function(t, n) {
2816
- return e.apply(this, arguments);
2817
- };
2818
- }(), "rect"), Wt = /* @__PURE__ */ i(function() {
2819
- var e = r(function* (e, t) {
2820
- let { shapeSvg: n, bbox: r, halfPadding: i } = yield K(e, t, "node " + t.classes, !0), o = n.insert("rect", ":first-child"), s = t.positioned ? t.width : r.width + t.padding, c = t.positioned ? t.height : r.height + t.padding, l = t.positioned ? -s / 2 : -r.width / 2 - i, u = t.positioned ? -c / 2 : -r.height / 2 - i;
2821
- if (o.attr("class", "basic cluster composite label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", l).attr("y", u).attr("width", s).attr("height", c), t.props) {
2822
- let e = new Set(Object.keys(t.props));
2823
- t.props.borders && (X(o, t.props.borders, s, c), e.delete("borders")), e.forEach((e) => {
2824
- a.warn(`Unknown node property ${e}`);
2825
- });
2826
- }
2827
- return q(t, o), t.intersect = function(e) {
2828
- return G.rect(t, e);
2829
- }, n;
2830
- });
2831
- return function(t, n) {
2832
- return e.apply(this, arguments);
2833
- };
2834
- }(), "composite"), Gt = /* @__PURE__ */ i(function() {
2835
- var e = r(function* (e, t) {
2836
- let { shapeSvg: n } = yield K(e, t, "label", !0);
2837
- a.trace("Classes = ", t.class);
2838
- let r = n.insert("rect", ":first-child");
2839
- if (r.attr("width", 0).attr("height", 0), n.attr("class", "label edgeLabel"), t.props) {
2840
- let e = new Set(Object.keys(t.props));
2841
- t.props.borders && (X(r, t.props.borders, 0, 0), e.delete("borders")), e.forEach((e) => {
2842
- a.warn(`Unknown node property ${e}`);
2843
- });
2844
- }
2845
- return q(t, r), t.intersect = function(e) {
2846
- return G.rect(t, e);
2847
- }, n;
2848
- });
2849
- return function(t, n) {
2850
- return e.apply(this, arguments);
2851
- };
2852
- }(), "labelRect");
2853
- function X(e, t, n, r) {
2854
- let o = [], s = /* @__PURE__ */ i((e) => {
2855
- o.push(e, 0);
2856
- }, "addBorder"), c = /* @__PURE__ */ i((e) => {
2857
- o.push(0, e);
2858
- }, "skipBorder");
2859
- t.includes("t") ? (a.debug("add top border"), s(n)) : c(n), t.includes("r") ? (a.debug("add right border"), s(r)) : c(r), t.includes("b") ? (a.debug("add bottom border"), s(n)) : c(n), t.includes("l") ? (a.debug("add left border"), s(r)) : c(r), e.attr("stroke-dasharray", o.join(" "));
2860
- }
2861
- i(X, "applyNodePropertyBorders");
2862
- var Kt = /* @__PURE__ */ i(function() {
2863
- var e = r(function* (e, t) {
2864
- let n;
2865
- n = t.classes ? "node " + t.classes : "node default";
2866
- let r = e.insert("g").attr("class", n).attr("id", t.domId || t.id), i = r.insert("rect", ":first-child"), o = r.insert("line"), c = r.insert("g").attr("class", "label"), l = t.labelText.flat ? t.labelText.flat() : t.labelText, u = "";
2867
- u = typeof l == "object" ? l[0] : l, a.info("Label text abc79", u, l, typeof l == "object");
2868
- let d = yield H(c, u, t.labelStyle, !0, !0), f = {
2869
- width: 0,
2870
- height: 0
2871
- };
2872
- if (s(p())) {
2873
- let e = d.children[0], t = g(d);
2874
- f = e.getBoundingClientRect(), t.attr("width", f.width), t.attr("height", f.height);
2875
- }
2876
- a.info("Text 2", l);
2877
- let m = l.slice(1, l.length), h = d.getBBox(), _ = yield H(c, m.join ? m.join("<br/>") : m, t.labelStyle, !0, !0);
2878
- if (s(p())) {
2879
- let e = _.children[0], t = g(_);
2880
- f = e.getBoundingClientRect(), t.attr("width", f.width), t.attr("height", f.height);
2881
- }
2882
- let v = t.padding / 2;
2883
- return g(_).attr("transform", "translate( " + (f.width > h.width ? 0 : (h.width - f.width) / 2) + ", " + (h.height + v + 5) + ")"), g(d).attr("transform", "translate( " + (f.width < h.width ? 0 : -(h.width - f.width) / 2) + ", 0)"), f = c.node().getBBox(), c.attr("transform", "translate(" + -f.width / 2 + ", " + (-f.height / 2 - v + 3) + ")"), i.attr("class", "outer title-state").attr("x", -f.width / 2 - v).attr("y", -f.height / 2 - v).attr("width", f.width + t.padding).attr("height", f.height + t.padding), o.attr("class", "divider").attr("x1", -f.width / 2 - v).attr("x2", f.width / 2 + v).attr("y1", -f.height / 2 - v + h.height + v).attr("y2", -f.height / 2 - v + h.height + v), q(t, i), t.intersect = function(e) {
2884
- return G.rect(t, e);
2885
- }, r;
2886
- });
2887
- return function(t, n) {
2888
- return e.apply(this, arguments);
2889
- };
2890
- }(), "rectWithTitle"), qt = /* @__PURE__ */ i(function() {
2891
- var e = r(function* (e, t) {
2892
- let { shapeSvg: n, bbox: r } = yield K(e, t, Y(t, void 0), !0), i = r.height + t.padding, a = r.width + i / 4 + t.padding;
2893
- return q(t, n.insert("rect", ":first-child").attr("style", t.style).attr("rx", i / 2).attr("ry", i / 2).attr("x", -a / 2).attr("y", -i / 2).attr("width", a).attr("height", i)), t.intersect = function(e) {
2894
- return G.rect(t, e);
2895
- }, n;
2896
- });
2897
- return function(t, n) {
2898
- return e.apply(this, arguments);
2899
- };
2900
- }(), "stadium"), Jt = /* @__PURE__ */ i(function() {
2901
- var e = r(function* (e, t) {
2902
- let { shapeSvg: n, bbox: r, halfPadding: i } = yield K(e, t, Y(t, void 0), !0), o = n.insert("circle", ":first-child");
2903
- return o.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", r.width / 2 + i).attr("width", r.width + t.padding).attr("height", r.height + t.padding), a.info("Circle main"), q(t, o), t.intersect = function(e) {
2904
- return a.info("Circle intersect", t, r.width / 2 + i, e), G.circle(t, r.width / 2 + i, e);
2905
- }, n;
2906
- });
2907
- return function(t, n) {
2908
- return e.apply(this, arguments);
2909
- };
2910
- }(), "circle"), Yt = /* @__PURE__ */ i(function() {
2911
- var e = r(function* (e, t) {
2912
- let { shapeSvg: n, bbox: r, halfPadding: i } = yield K(e, t, Y(t, void 0), !0), o = n.insert("g", ":first-child"), s = o.insert("circle"), c = o.insert("circle");
2913
- return o.attr("class", t.class), s.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", r.width / 2 + i + 5).attr("width", r.width + t.padding + 10).attr("height", r.height + t.padding + 10), c.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", r.width / 2 + i).attr("width", r.width + t.padding).attr("height", r.height + t.padding), a.info("DoubleCircle main"), q(t, s), t.intersect = function(e) {
2914
- return a.info("DoubleCircle intersect", t, r.width / 2 + i + 5, e), G.circle(t, r.width / 2 + i + 5, e);
2915
- }, n;
2916
- });
2917
- return function(t, n) {
2918
- return e.apply(this, arguments);
2919
- };
2920
- }(), "doublecircle"), Xt = /* @__PURE__ */ i(function() {
2921
- var e = r(function* (e, t) {
2922
- let { shapeSvg: n, bbox: r } = yield K(e, t, Y(t, void 0), !0), i = r.width + t.padding, a = r.height + t.padding, o = [
2923
- {
2924
- x: 0,
2925
- y: 0
2926
- },
2927
- {
2928
- x: i,
2929
- y: 0
2930
- },
2931
- {
2932
- x: i,
2933
- y: -a
2934
- },
2935
- {
2936
- x: 0,
2937
- y: -a
2938
- },
2939
- {
2940
- x: 0,
2941
- y: 0
2942
- },
2943
- {
2944
- x: -8,
2945
- y: 0
2946
- },
2947
- {
2948
- x: i + 8,
2949
- y: 0
2950
- },
2951
- {
2952
- x: i + 8,
2953
- y: -a
2954
- },
2955
- {
2956
- x: -8,
2957
- y: -a
2958
- },
2959
- {
2960
- x: -8,
2961
- y: 0
2962
- }
2963
- ], s = J(n, i, a, o);
2964
- return s.attr("style", t.style), q(t, s), t.intersect = function(e) {
2965
- return G.polygon(t, o, e);
2966
- }, n;
2967
- });
2968
- return function(t, n) {
2969
- return e.apply(this, arguments);
2970
- };
2971
- }(), "subroutine"), Zt = /* @__PURE__ */ i((e, t) => {
2972
- let n = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), r = n.insert("circle", ":first-child");
2973
- return r.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), q(t, r), t.intersect = function(e) {
2974
- return G.circle(t, 7, e);
2975
- }, n;
2976
- }, "start"), Qt = /* @__PURE__ */ i((e, t, n) => {
2977
- let r = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), i = 70, a = 10;
2978
- return n === "LR" && (i = 10, a = 70), q(t, r.append("rect").attr("x", -1 * i / 2).attr("y", -1 * a / 2).attr("width", i).attr("height", a).attr("class", "fork-join")), t.height += t.padding / 2, t.width += t.padding / 2, t.intersect = function(e) {
2979
- return G.rect(t, e);
2980
- }, r;
2981
- }, "forkJoin"), $t = {
2982
- rhombus: Mt,
2983
- composite: Wt,
2984
- question: Mt,
2985
- rect: Ut,
2986
- labelRect: Gt,
2987
- rectWithTitle: Kt,
2988
- choice: Nt,
2989
- circle: Jt,
2990
- doublecircle: Yt,
2991
- stadium: qt,
2992
- hexagon: Pt,
2993
- block_arrow: Ft,
2994
- rect_left_inv_arrow: It,
2995
- lean_right: Lt,
2996
- lean_left: Rt,
2997
- trapezoid: zt,
2998
- inv_trapezoid: Bt,
2999
- rect_right_inv_arrow: Vt,
3000
- cylinder: Ht,
3001
- start: Zt,
3002
- end: /* @__PURE__ */ i((e, t) => {
3003
- let n = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), r = n.insert("circle", ":first-child"), i = n.insert("circle", ":first-child");
3004
- return i.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), r.attr("class", "state-end").attr("r", 5).attr("width", 10).attr("height", 10), q(t, i), t.intersect = function(e) {
3005
- return G.circle(t, 7, e);
3006
- }, n;
3007
- }, "end"),
3008
- note: At,
3009
- subroutine: Xt,
3010
- fork: Qt,
3011
- join: Qt,
3012
- class_box: /* @__PURE__ */ i(function() {
3013
- var e = r(function* (e, t) {
3014
- var n;
3015
- let i = t.padding / 2, a;
3016
- a = t.classes ? "node " + t.classes : "node default";
3017
- let o = e.insert("g").attr("class", a).attr("id", t.domId || t.id), c = o.insert("rect", ":first-child"), l = o.insert("line"), u = o.insert("line"), d = 0, f = 4, m = o.insert("g").attr("class", "label"), h = 0, _ = (n = t.classData.annotations) == null ? void 0 : n[0], v = yield H(m, t.classData.annotations[0] ? "«" + t.classData.annotations[0] + "»" : "", t.labelStyle, !0, !0), y = v.getBBox();
3018
- if (s(p())) {
3019
- let e = v.children[0], t = g(v);
3020
- y = e.getBoundingClientRect(), t.attr("width", y.width), t.attr("height", y.height);
3021
- }
3022
- t.classData.annotations[0] && (f += y.height + 4, d += y.width);
3023
- let b = t.classData.label;
3024
- t.classData.type !== void 0 && t.classData.type !== "" && (s(p()) ? b += "&lt;" + t.classData.type + "&gt;" : b += "<" + t.classData.type + ">");
3025
- let x = yield H(m, b, t.labelStyle, !0, !0);
3026
- g(x).attr("class", "classTitle");
3027
- let S = x.getBBox();
3028
- if (s(p())) {
3029
- let e = x.children[0], t = g(x);
3030
- S = e.getBoundingClientRect(), t.attr("width", S.width), t.attr("height", S.height);
3031
- }
3032
- f += S.height + 4, S.width > d && (d = S.width);
3033
- let C = [];
3034
- t.classData.members.forEach(function() {
3035
- var e = r(function* (e) {
3036
- let n = e.getDisplayDetails(), r = n.displayText;
3037
- s(p()) && (r = r.replace(/</g, "&lt;").replace(/>/g, "&gt;"));
3038
- let i = yield H(m, r, n.cssStyle ? n.cssStyle : t.labelStyle, !0, !0), a = i.getBBox();
3039
- if (s(p())) {
3040
- let e = i.children[0], t = g(i);
3041
- a = e.getBoundingClientRect(), t.attr("width", a.width), t.attr("height", a.height);
3042
- }
3043
- a.width > d && (d = a.width), f += a.height + 4, C.push(i);
3044
- });
3045
- return function(t) {
3046
- return e.apply(this, arguments);
3047
- };
3048
- }()), f += 8;
3049
- let w = [];
3050
- if (t.classData.methods.forEach(function() {
3051
- var e = r(function* (e) {
3052
- let n = e.getDisplayDetails(), r = n.displayText;
3053
- s(p()) && (r = r.replace(/</g, "&lt;").replace(/>/g, "&gt;"));
3054
- let i = yield H(m, r, n.cssStyle ? n.cssStyle : t.labelStyle, !0, !0), a = i.getBBox();
3055
- if (s(p())) {
3056
- let e = i.children[0], t = g(i);
3057
- a = e.getBoundingClientRect(), t.attr("width", a.width), t.attr("height", a.height);
3058
- }
3059
- a.width > d && (d = a.width), f += a.height + 4, w.push(i);
3060
- });
3061
- return function(t) {
3062
- return e.apply(this, arguments);
3063
- };
3064
- }()), f += 8, _) {
3065
- let e = (d - y.width) / 2;
3066
- g(v).attr("transform", "translate( " + (-1 * d / 2 + e) + ", " + -1 * f / 2 + ")"), h = y.height + 4;
3067
- }
3068
- let T = (d - S.width) / 2;
3069
- return g(x).attr("transform", "translate( " + (-1 * d / 2 + T) + ", " + (-1 * f / 2 + h) + ")"), h += S.height + 4, l.attr("class", "divider").attr("x1", -d / 2 - i).attr("x2", d / 2 + i).attr("y1", -f / 2 - i + 8 + h).attr("y2", -f / 2 - i + 8 + h), h += 8, C.forEach((e) => {
3070
- var t;
3071
- g(e).attr("transform", "translate( " + -d / 2 + ", " + (-1 * f / 2 + h + 8 / 2) + ")");
3072
- let n = e == null ? void 0 : e.getBBox();
3073
- h += ((t = n == null ? void 0 : n.height) == null ? 0 : t) + 4;
3074
- }), h += 8, u.attr("class", "divider").attr("x1", -d / 2 - i).attr("x2", d / 2 + i).attr("y1", -f / 2 - i + 8 + h).attr("y2", -f / 2 - i + 8 + h), h += 8, w.forEach((e) => {
3075
- var t;
3076
- g(e).attr("transform", "translate( " + -d / 2 + ", " + (-1 * f / 2 + h) + ")");
3077
- let n = e == null ? void 0 : e.getBBox();
3078
- h += ((t = n == null ? void 0 : n.height) == null ? 0 : t) + 4;
3079
- }), c.attr("style", t.style).attr("class", "outer title-state").attr("x", -d / 2 - i).attr("y", -(f / 2) - i).attr("width", d + t.padding).attr("height", f + t.padding), q(t, c), t.intersect = function(e) {
3080
- return G.rect(t, e);
3081
- }, o;
3082
- });
3083
- return function(t, n) {
3084
- return e.apply(this, arguments);
3085
- };
3086
- }(), "class_box")
3087
- }, Z = {}, en = /* @__PURE__ */ i(function() {
3088
- var e = r(function* (e, t, n) {
3089
- let r, i;
3090
- if (t.link) {
3091
- let a;
3092
- p().securityLevel === "sandbox" ? a = "_top" : t.linkTarget && (a = t.linkTarget || "_blank"), r = e.insert("svg:a").attr("xlink:href", t.link).attr("target", a), i = yield $t[t.shape](r, t, n);
3093
- } else i = yield $t[t.shape](e, t, n), r = i;
3094
- return t.tooltip && i.attr("title", t.tooltip), t.class && i.attr("class", "node default " + t.class), Z[t.id] = r, t.haveCallback && Z[t.id].attr("class", Z[t.id].attr("class") + " clickable"), r;
3095
- });
3096
- return function(t, n, r) {
3097
- return e.apply(this, arguments);
3098
- };
3099
- }(), "insertNode"), tn = /* @__PURE__ */ i((e) => {
3100
- let t = Z[e.id];
3101
- a.trace("Transforming node", e.diff, e, "translate(" + (e.x - e.width / 2 - 5) + ", " + e.width / 2 + ")");
3102
- let n = e.diff || 0;
3103
- return e.clusterNode ? t.attr("transform", "translate(" + (e.x + n - e.width / 2) + ", " + (e.y - e.height / 2 - 8) + ")") : t.attr("transform", "translate(" + e.x + ", " + e.y + ")"), n;
3104
- }, "positionNode");
3105
- function Q(e, t, n = !1) {
3106
- var r, i, a, o, s, c, u;
3107
- let d = e, f = "default";
3108
- if (((d == null || (r = d.classes) == null ? void 0 : r.length) || 0) > 0) {
3109
- var p;
3110
- f = ((p = d == null ? void 0 : d.classes) == null ? [] : p).join(" ");
3111
- }
3112
- f += " flowchart-label";
3113
- let m = 0, h = "", g;
3114
- switch (d.type) {
3115
- case "round":
3116
- m = 5, h = "rect";
3117
- break;
3118
- case "composite":
3119
- m = 0, h = "composite", g = 0;
3120
- break;
3121
- case "square":
3122
- h = "rect";
3123
- break;
3124
- case "diamond":
3125
- h = "question";
3126
- break;
3127
- case "hexagon":
3128
- h = "hexagon";
3129
- break;
3130
- case "block_arrow":
3131
- h = "block_arrow";
3132
- break;
3133
- case "odd":
3134
- h = "rect_left_inv_arrow";
3135
- break;
3136
- case "lean_right":
3137
- h = "lean_right";
3138
- break;
3139
- case "lean_left":
3140
- h = "lean_left";
3141
- break;
3142
- case "trapezoid":
3143
- h = "trapezoid";
3144
- break;
3145
- case "inv_trapezoid":
3146
- h = "inv_trapezoid";
3147
- break;
3148
- case "rect_left_inv_arrow":
3149
- h = "rect_left_inv_arrow";
3150
- break;
3151
- case "circle":
3152
- h = "circle";
3153
- break;
3154
- case "ellipse":
3155
- h = "ellipse";
3156
- break;
3157
- case "stadium":
3158
- h = "stadium";
3159
- break;
3160
- case "subroutine":
3161
- h = "subroutine";
3162
- break;
3163
- case "cylinder":
3164
- h = "cylinder";
3165
- break;
3166
- case "group":
3167
- h = "rect";
3168
- break;
3169
- case "doublecircle":
3170
- h = "doublecircle";
3171
- break;
3172
- default: h = "rect";
3173
- }
3174
- let _ = ue((i = d == null ? void 0 : d.styles) == null ? [] : i), v = d.label, y = (a = d.size) == null ? {
3175
- width: 0,
3176
- height: 0,
3177
- x: 0,
3178
- y: 0
3179
- } : a, b = t.getDiagramId();
3180
- return {
3181
- labelStyle: _.labelStyle,
3182
- shape: h,
3183
- labelText: v,
3184
- rx: m,
3185
- ry: m,
3186
- class: f,
3187
- style: _.style,
3188
- id: d.id,
3189
- domId: b ? `${b}-${d.id}` : d.id,
3190
- directions: d.directions,
3191
- width: y.width,
3192
- height: y.height,
3193
- x: y.x,
3194
- y: y.y,
3195
- positioned: n,
3196
- intersect: void 0,
3197
- type: d.type,
3198
- padding: (o = (s = g) == null ? (c = l()) == null || (c = c.block) == null ? void 0 : c.padding : s) == null ? 0 : o,
3199
- widthInColumns: (u = d.widthInColumns) == null ? 1 : u
3200
- };
3201
- }
3202
- i(Q, "getNodeFromBlock");
3203
- function nn(e, t, n) {
3204
- return rn.apply(this, arguments);
3205
- }
3206
- function rn() {
3207
- return rn = r(function* (e, t, n) {
3208
- let r = Q(t, n, !1);
3209
- if (r.type === "group") return;
3210
- let i = yield en(e, r, { config: l() }), a = i.node().getBBox(), o = n.getBlock(r.id);
3211
- o.size = {
3212
- width: a.width,
3213
- height: a.height,
3214
- x: 0,
3215
- y: 0,
3216
- node: i
3217
- }, n.setBlock(o), i.remove();
3218
- }), rn.apply(this, arguments);
3219
- }
3220
- i(nn, "calculateBlockSize");
3221
- function an(e, t, n) {
3222
- return on.apply(this, arguments);
3223
- }
3224
- function on() {
3225
- return on = r(function* (e, t, n) {
3226
- let r = Q(t, n, !0);
3227
- n.getBlock(r.id).type !== "space" && (yield en(e, r, { config: l() }), t.intersect = r == null ? void 0 : r.intersect, tn(r));
3228
- }), on.apply(this, arguments);
3229
- }
3230
- i(an, "insertBlockPositioned");
3231
- function $(e, t, n, r) {
3232
- return sn.apply(this, arguments);
3233
- }
3234
- function sn() {
3235
- return sn = r(function* (e, t, n, r) {
3236
- for (let i of t) yield r(e, i, n), i.children && (yield $(e, i.children, n, r));
3237
- }), sn.apply(this, arguments);
3238
- }
3239
- i($, "performOperations");
3240
- function cn(e, t, n) {
3241
- return ln.apply(this, arguments);
3242
- }
3243
- function ln() {
3244
- return ln = r(function* (e, t, n) {
3245
- yield $(e, t, n, nn);
3246
- }), ln.apply(this, arguments);
3247
- }
3248
- i(cn, "calculateBlockSizes");
3249
- function un(e, t, n) {
3250
- return dn.apply(this, arguments);
3251
- }
3252
- function dn() {
3253
- return dn = r(function* (e, t, n) {
3254
- yield $(e, t, n, an);
3255
- }), dn.apply(this, arguments);
3256
- }
3257
- i(un, "insertBlocks");
3258
- function fn(e, t, n, r, i) {
3259
- return pn.apply(this, arguments);
3260
- }
3261
- function pn() {
3262
- return pn = r(function* (e, n, r, i, a) {
3263
- let o = new be({
3264
- multigraph: !0,
3265
- compound: !0
3266
- });
3267
- o.setGraph({
3268
- rankdir: "TB",
3269
- nodesep: 10,
3270
- ranksep: 10,
3271
- marginx: 8,
3272
- marginy: 8
3273
- });
3274
- for (let e of r) e.size && o.setNode(e.id, {
3275
- width: e.size.width,
3276
- height: e.size.height,
3277
- intersect: e.intersect
3278
- });
3279
- for (let r of n) if (r.start && r.end) {
3280
- let n = i.getBlock(r.start), s = i.getBlock(r.end);
3281
- if (n != null && n.size && s != null && s.size) {
3282
- let i = n.size, c = s.size, l = [
3283
- {
3284
- x: i.x,
3285
- y: i.y
3286
- },
3287
- {
3288
- x: i.x + (c.x - i.x) / 2,
3289
- y: i.y + (c.y - i.y) / 2
3290
- },
3291
- {
3292
- x: c.x,
3293
- y: c.y
3294
- }
3295
- ], u = a ? `${a}-${r.id}` : r.id, d = `${r.thickness === "thick" ? "edge-thickness-thick" : "edge-thickness-normal"} ${r.pattern === "dotted" ? "edge-pattern-dotted" : "edge-pattern-solid"} flowchart-link LS-a1 LE-b1`;
3296
- gt(e, {
3297
- v: r.start,
3298
- w: r.end,
3299
- name: u
3300
- }, t(t({}, r), {}, {
3301
- id: u,
3302
- arrowTypeEnd: r.arrowTypeEnd,
3303
- arrowTypeStart: r.arrowTypeStart,
3304
- points: l,
3305
- classes: d
3306
- }), void 0, "block", o, a), r.label && (yield dt(e, t(t({}, r), {}, {
3307
- label: r.label,
3308
- labelStyle: "stroke: #333; stroke-width: 1.5px;fill:none;",
3309
- arrowTypeEnd: r.arrowTypeEnd,
3310
- arrowTypeStart: r.arrowTypeStart,
3311
- points: l,
3312
- classes: d
3313
- })), ft(t(t({}, r), {}, {
3314
- x: l[1].x,
3315
- y: l[1].y
3316
- }), { originalPath: l }));
3317
- }
3318
- }
3319
- }), pn.apply(this, arguments);
3320
- }
3321
- i(fn, "insertEdges");
3322
- var mn = {
3323
- parser: Oe,
3324
- db: Xe,
3325
- renderer: {
3326
- draw: /* @__PURE__ */ i(/* @__PURE__ */ function() {
3327
- var e = r(function* (e, t, n, r) {
3328
- let { securityLevel: i, block: o } = l(), s = r.db;
3329
- s.setDiagramId(t);
3330
- let c;
3331
- i === "sandbox" && (c = g("#i" + t));
3332
- let d = g(i === "sandbox" ? c.nodes()[0].contentDocument.body : "body"), f = i === "sandbox" ? d.select(`[id="${t}"]`) : g(`[id="${t}"]`);
3333
- tt(f, [
3334
- "point",
3335
- "circle",
3336
- "cross"
3337
- ], r.type, t);
3338
- let p = s.getBlocks(), m = s.getBlocksFlat(), h = s.getEdges(), _ = f.insert("g").attr("class", "block");
3339
- yield cn(_, p, s);
3340
- let v = ot(s);
3341
- if (yield un(_, p, s), yield fn(_, h, m, s, t), v) {
3342
- let e = v, t = Math.max(1, Math.round(.125 * (e.width / e.height))), n = e.height + t + 10, r = e.width + 10, { useMaxWidth: i } = o;
3343
- u(f, n, r, !!i), a.debug("Here Bounds", v, e), f.attr("viewBox", `${e.x - 5} ${e.y - 5} ${e.width + 10} ${e.height + 10}`);
3344
- }
3345
- });
3346
- return function(t, n, r, i) {
3347
- return e.apply(this, arguments);
3348
- };
3349
- }(), "draw"),
3350
- getClasses: /* @__PURE__ */ i(function(e, t) {
3351
- return t.db.getClasses();
3352
- }, "getClasses")
3353
- },
3354
- styles: Qe
3355
- };
3356
- //#endregion
3357
- export { mn as diagram };