@toimc/markdown 0.0.1 → 0.0.2
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.
- package/dist/{CodeBlock.vue.d.ts → components/CodeBlock.vue.d.ts} +10 -1
- package/dist/components/CodeBlock.vue.d.ts.map +1 -0
- package/dist/components/LatexBlock.vue.d.ts.map +1 -0
- package/dist/components/MarkdownRenderer.vue.d.ts.map +1 -0
- package/dist/components/MermaidBlock.vue.d.ts.map +1 -0
- package/dist/composables/useMarkdownIt.d.ts.map +1 -1
- package/dist/index.cjs +62 -59
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +4536 -4331
- package/dist/markdown.css +1 -1
- package/dist/utils/formula-guard.d.ts +13 -0
- package/dist/utils/formula-guard.d.ts.map +1 -0
- package/dist/utils/split-lines.d.ts +10 -0
- package/dist/utils/split-lines.d.ts.map +1 -0
- package/package.json +6 -3
- package/dist/CodeBlock.test.d.ts +0 -2
- package/dist/CodeBlock.test.d.ts.map +0 -1
- package/dist/CodeBlock.vue.d.ts.map +0 -1
- package/dist/LatexBlock.test.d.ts +0 -2
- package/dist/LatexBlock.test.d.ts.map +0 -1
- package/dist/LatexBlock.vue.d.ts.map +0 -1
- package/dist/MarkdownRenderer.test.d.ts +0 -2
- package/dist/MarkdownRenderer.test.d.ts.map +0 -1
- package/dist/MarkdownRenderer.vue.d.ts.map +0 -1
- package/dist/MermaidBlock.test.d.ts +0 -2
- package/dist/MermaidBlock.test.d.ts.map +0 -1
- package/dist/MermaidBlock.vue.d.ts.map +0 -1
- package/dist/abnfDiagram-N423BO3Z-CpvDGmAd.cjs +0 -1
- package/dist/abnfDiagram-N423BO3Z-DuAPsGBR.js +0 -89
- package/dist/arc-CFxpoaLu.js +0 -82
- package/dist/arc-Dh2Zrypi.cjs +0 -1
- package/dist/architecture-TIHT7OUA-CUym9zMN.cjs +0 -1
- package/dist/architecture-TIHT7OUA-DDwCCw0y.js +0 -3
- package/dist/architectureDiagram-T3A2C74G-CS6-PQjR.cjs +0 -36
- package/dist/architectureDiagram-T3A2C74G-d7xzbLJQ.js +0 -4155
- package/dist/array-CApNbSU9.js +0 -6
- package/dist/array-DZSRzHA_.cjs +0 -1
- package/dist/blockDiagram-VBNYF7ZC-CnvNE8Hq.js +0 -3157
- package/dist/blockDiagram-VBNYF7ZC-DVl7vKmv.cjs +0 -132
- package/dist/c4Diagram-5PPSVZJV-B1RTcquO.js +0 -2982
- package/dist/c4Diagram-5PPSVZJV-Djkk0hzr.cjs +0 -10
- package/dist/channel-CNZiSge7.cjs +0 -1
- package/dist/channel-CqlbSsMQ.js +0 -5
- package/dist/chunk-2GRJ4B5K-BgeLbn06.cjs +0 -1
- package/dist/chunk-2GRJ4B5K-C5VToU5T.js +0 -61
- package/dist/chunk-2Q5K7J3B-B8v9mTdK.cjs +0 -1
- package/dist/chunk-2Q5K7J3B-C3WfnuyI.js +0 -15
- package/dist/chunk-4I5QYGJK-Bs8S-Wfu.js +0 -275
- package/dist/chunk-4I5QYGJK-CBqJO_mi.cjs +0 -1
- package/dist/chunk-5RXB4S5H-BnJ1P9K2.js +0 -2042
- package/dist/chunk-5RXB4S5H-BtEDiC1U.cjs +0 -231
- package/dist/chunk-5VM5RSS4-BsUXY5k9.js +0 -5
- package/dist/chunk-5VM5RSS4-CwDmQ9T_.cjs +0 -15
- package/dist/chunk-6Q2QTUOP-C0P-wtth.js +0 -490
- package/dist/chunk-6Q2QTUOP-UC-G8b3B.cjs +0 -88
- package/dist/chunk-7BUUIJ7U-CZdUK2qY.js +0 -82
- package/dist/chunk-7BUUIJ7U-MzS1pW_S.cjs +0 -1
- package/dist/chunk-7Z6QIM7H-CJdupq9f.js +0 -593
- package/dist/chunk-7Z6QIM7H-CUGcycR0.cjs +0 -10
- package/dist/chunk-GF5L2VYU-CDGpCl8Z.js +0 -3357
- package/dist/chunk-GF5L2VYU-DWhSvqYP.cjs +0 -206
- package/dist/chunk-I66GZJ75-D8wVRUgw.cjs +0 -127
- package/dist/chunk-I66GZJ75-xmbkwRyp.js +0 -3754
- package/dist/chunk-JQJVKLGR-B-jNEb9r.js +0 -4135
- package/dist/chunk-JQJVKLGR-CbhQdRxu.cjs +0 -156
- package/dist/chunk-JWPE2WC7-B8JIODrM.js +0 -8
- package/dist/chunk-JWPE2WC7-Cs1kjq8S.cjs +0 -1
- package/dist/chunk-KBJHAD2P-BMuT9eJO.cjs +0 -1
- package/dist/chunk-KBJHAD2P-CCpB6hWQ.js +0 -26
- package/dist/chunk-KEIR6QF5-RwFi50en.js +0 -21456
- package/dist/chunk-KEIR6QF5-rUKzMPy0.cjs +0 -161
- package/dist/chunk-NSK5VX7P-BO1SrWAL.js +0 -1335
- package/dist/chunk-NSK5VX7P-BiC_63US.cjs +0 -2
- package/dist/chunk-QR6OTTB3-BSxbyKp_.cjs +0 -62
- package/dist/chunk-QR6OTTB3-CGxJcV-X.js +0 -3738
- package/dist/chunk-RYQCIY6F-Lf2oVMMh.cjs +0 -1
- package/dist/chunk-RYQCIY6F-UBebC0ib.js +0 -241
- package/dist/chunk-UBXNYLIW-BURVNZm2.cjs +0 -1
- package/dist/chunk-UBXNYLIW-fOGkdEwd.js +0 -32
- package/dist/chunk-W5SLKNZC-BLFqePZ1.cjs +0 -1
- package/dist/chunk-W5SLKNZC-C2SYjJjL.js +0 -67
- package/dist/chunk-WRU74C26-Cr4HTCc1.cjs +0 -70
- package/dist/chunk-WRU74C26-UGtU6H2a.js +0 -1636
- package/dist/chunk-XXDRQBXY-GENMsCHk.js +0 -9
- package/dist/chunk-XXDRQBXY-yMT3rT5Y.cjs +0 -1
- package/dist/chunk-Y2CYZVJY-CnmLqFtv.cjs +0 -1
- package/dist/chunk-Y2CYZVJY-DO9UHHon.js +0 -12
- package/dist/classDiagram-JCYQIIEL-DUjWUDYG.cjs +0 -1
- package/dist/classDiagram-JCYQIIEL-Dm9anlJw.js +0 -30
- package/dist/classDiagram-v2-OCEON4UE-Bl-vyFyz.js +0 -30
- package/dist/classDiagram-v2-OCEON4UE-DUjWUDYG.cjs +0 -1
- package/dist/composables/useHighlighter.test.d.ts +0 -2
- package/dist/composables/useHighlighter.test.d.ts.map +0 -1
- package/dist/composables/useMarkdownIt.test.d.ts +0 -2
- package/dist/composables/useMarkdownIt.test.d.ts.map +0 -1
- package/dist/composables/useShikiTokenizer.test.d.ts +0 -2
- package/dist/composables/useShikiTokenizer.test.d.ts.map +0 -1
- package/dist/composables/useStreamingMarkdown.test.d.ts +0 -2
- package/dist/composables/useStreamingMarkdown.test.d.ts.map +0 -1
- package/dist/cose-bilkent-JH36ORCC-C1RCVzVZ.cjs +0 -1
- package/dist/cose-bilkent-JH36ORCC-C5FbROLY.js +0 -2254
- package/dist/cynefin-VYW2F7L2-CMgnLl46.js +0 -3
- package/dist/cynefin-VYW2F7L2-DVi1CF5b.cjs +0 -1
- package/dist/cynefinDiagram-MW4NZA55-CkZY080C.cjs +0 -62
- package/dist/cynefinDiagram-MW4NZA55-DbAAx9CC.js +0 -355
- package/dist/cytoscape.esm-BKhIYxsH.cjs +0 -321
- package/dist/cytoscape.esm-DMXbtFI-.js +0 -18145
- package/dist/dagre-DarAkhy1.cjs +0 -1
- package/dist/dagre-VZM6K2ZE-CpL0s3GG.js +0 -328
- package/dist/dagre-VZM6K2ZE-D1_S1oSj.cjs +0 -4
- package/dist/dagre-x4cMb6gU.js +0 -1699
- package/dist/defaultLocale-ybN1Vtvg.cjs +0 -1
- package/dist/defaultLocale-yzzuPw6P.js +0 -198
- package/dist/diagram-7IWD3JNH-BXvOBw2z.js +0 -300
- package/dist/diagram-7IWD3JNH-W-Kjft6l.cjs +0 -30
- package/dist/diagram-B4RE2ZJO-C4lLgW4X.cjs +0 -3
- package/dist/diagram-B4RE2ZJO-DyAAD_bR.js +0 -432
- package/dist/diagram-LBJQPF4R-BTgCWP5o.cjs +0 -24
- package/dist/diagram-LBJQPF4R-BbMQOpt2.js +0 -134
- package/dist/diagram-Q27KOJAE-ink_R6qE.js +0 -527
- package/dist/diagram-Q27KOJAE-v-ZMzCxs.cjs +0 -24
- package/dist/diagram-UB23O5K3-BXTm2BG0.cjs +0 -41
- package/dist/diagram-UB23O5K3-C6rqCJBb.js +0 -214
- package/dist/dist-BP2me-br.js +0 -59
- package/dist/dist-Dwv2VYAL.cjs +0 -1
- package/dist/ebnfDiagram-BXEA7PRR-C80cjdjP.js +0 -100
- package/dist/ebnfDiagram-BXEA7PRR-lKO9XwUp.cjs +0 -1
- package/dist/erDiagram-JOGREHBK-Blwfr6w3.js +0 -1727
- package/dist/erDiagram-JOGREHBK-ChgcmULa.cjs +0 -85
- package/dist/eventmodeling-45OFAUF4-BDhzj03B.js +0 -3
- package/dist/eventmodeling-45OFAUF4-BtU19idK.cjs +0 -1
- package/dist/flowDiagram-UKHOOZJN-Co0JpKUU.js +0 -16
- package/dist/flowDiagram-UKHOOZJN-db1Ur2LI.cjs +0 -1
- package/dist/ganttDiagram-PKOTCBZU-Byi4E8Ye.js +0 -3073
- package/dist/ganttDiagram-PKOTCBZU-C_Vwv1o8.cjs +0 -292
- package/dist/gitGraph-TEB2WS4Q-CAeGPNFR.cjs +0 -1
- package/dist/gitGraph-TEB2WS4Q-DJA_hE4G.js +0 -3
- package/dist/gitGraphDiagram-DS77QQ5N-BG8AQVtP.js +0 -733
- package/dist/gitGraphDiagram-DS77QQ5N-DK9VJTjf.cjs +0 -106
- package/dist/graphlib-BaETKKSa.cjs +0 -1
- package/dist/graphlib-DoD0LnUK.js +0 -1267
- package/dist/info-DKCQHKI2-BD_vOCz6.js +0 -3
- package/dist/info-DKCQHKI2-p0Lazone.cjs +0 -1
- package/dist/infoDiagram-6WML65LV-B6PBOy7T.js +0 -20
- package/dist/infoDiagram-6WML65LV-nBSrP53Z.cjs +0 -2
- package/dist/init-BJdqMO10.cjs +0 -1
- package/dist/init-sjaVZO3f.js +0 -13
- package/dist/ishikawaDiagram-WSZJBQD7-BxEkaF2A.js +0 -719
- package/dist/ishikawaDiagram-WSZJBQD7-CjyKQ_N6.cjs +0 -70
- package/dist/journeyDiagram-NVQOT4AX-BPCuqjbW.js +0 -884
- package/dist/journeyDiagram-NVQOT4AX-DKgEeNcy.cjs +0 -139
- package/dist/kanban-definition-27J2QSJJ-BeKnR9zB.cjs +0 -89
- package/dist/kanban-definition-27J2QSJJ-D1pVuCv2.js +0 -974
- package/dist/katex-BfeHGk4M.js +0 -21977
- package/dist/katex-CEF6MvLx.cjs +0 -257
- package/dist/line-8EHPtDZA.cjs +0 -1
- package/dist/line-BifI9Y7j.js +0 -34
- package/dist/linear-Nt9BuHfn.cjs +0 -1
- package/dist/linear-l8AD1ib_.js +0 -288
- package/dist/map-CCpPjiU9.cjs +0 -1
- package/dist/map-DUk1uXZC.js +0 -241
- package/dist/mermaid-parser.core-BupC9XGF.js +0 -638
- package/dist/mermaid-parser.core-aXxW1VLR.cjs +0 -6
- package/dist/mermaid.core-C05C5gh_.cjs +0 -41
- package/dist/mermaid.core-CxM-VhZd.js +0 -2297
- package/dist/mindmap-definition-FAOFIHXS-B_k8KOvw.js +0 -1006
- package/dist/mindmap-definition-FAOFIHXS-CKPAiVKf.cjs +0 -96
- package/dist/ordinal-Bm_chml2.cjs +0 -1
- package/dist/ordinal-CNQzPcrr.js +0 -65
- package/dist/packet-7NZHBO7P-CVdRavgo.cjs +0 -1
- package/dist/packet-7NZHBO7P-CgBlALV1.js +0 -3
- package/dist/path-DIS6ck99.cjs +0 -1
- package/dist/path-DVvH25eQ.js +0 -84
- package/dist/pegDiagram-VL7TDLO6-B5Jhedbv.cjs +0 -1
- package/dist/pegDiagram-VL7TDLO6-PP-A-3Lv.js +0 -94
- package/dist/pie-RZYD4A2V-CryPC-P_.js +0 -3
- package/dist/pie-RZYD4A2V-CwDJ0bEW.cjs +0 -1
- package/dist/pieDiagram-7S7Q4E2Y-CgDU9E10.cjs +0 -39
- package/dist/pieDiagram-7S7Q4E2Y-CxNt1xaN.js +0 -203
- package/dist/quadrantDiagram-CIZ2JOQS-CMUanfcR.js +0 -2001
- package/dist/quadrantDiagram-CIZ2JOQS-vybEBK1o.cjs +0 -7
- package/dist/radar-I7S5WNFK-DaVgEjvC.cjs +0 -1
- package/dist/radar-I7S5WNFK-DgzJDRy3.js +0 -3
- package/dist/railroad-3IZDKUUU-BPsrMjqz.cjs +0 -1
- package/dist/railroad-3IZDKUUU-DFp3mbpB.js +0 -3
- package/dist/railroad-abnf-AHOZXSZD-BRjidKH0.js +0 -3
- package/dist/railroad-abnf-AHOZXSZD-ZpHq_KEy.cjs +0 -1
- package/dist/railroad-ebnf-EBAXGLYW-B45niwuq.cjs +0 -1
- package/dist/railroad-ebnf-EBAXGLYW-PgrDWact.js +0 -3
- package/dist/railroad-peg-LSFZ7HO6-CMKir81Y.js +0 -3
- package/dist/railroad-peg-LSFZ7HO6-DUsuEX2Z.cjs +0 -1
- package/dist/railroadDiagram-AXF67PYL-D7y_2yAa.cjs +0 -1
- package/dist/railroadDiagram-AXF67PYL-iLkvx2oU.js +0 -76
- package/dist/renderers/tokensToHtml.test.d.ts +0 -2
- package/dist/renderers/tokensToHtml.test.d.ts.map +0 -1
- package/dist/requirementDiagram-LRYGKXZP-Bs2mCDzB.js +0 -2223
- package/dist/requirementDiagram-LRYGKXZP-lA2nVr6h.cjs +0 -84
- package/dist/rolldown-runtime-B0aSnxlc.js +0 -20
- package/dist/rolldown-runtime-DF3sbh8G.cjs +0 -1
- package/dist/rough.esm-B2w_aYoc.js +0 -1361
- package/dist/rough.esm-ChRLLRha.cjs +0 -1
- package/dist/sankeyDiagram-W5VNT64P-BxYQllhE.js +0 -972
- package/dist/sankeyDiagram-W5VNT64P-vPci5pOT.cjs +0 -40
- package/dist/sequenceDiagram-SI44F4Z6-BNu1-3EN.cjs +0 -162
- package/dist/sequenceDiagram-SI44F4Z6-E6AoYU_R.js +0 -4156
- package/dist/sizeCapture-X5ZJPWSS-8gbZlYqg.js +0 -46
- package/dist/sizeCapture-X5ZJPWSS-bJ2ZX4Du.cjs +0 -1
- package/dist/src-C7bjHtAI.js +0 -2139
- package/dist/src-D9o9TOtH.cjs +0 -1
- package/dist/stateDiagram-OKZ733FA-B7ITlY91.cjs +0 -1
- package/dist/stateDiagram-OKZ733FA-BfcOAK65.js +0 -220
- package/dist/stateDiagram-v2-UEYNNEHI-BHO-uUPG.js +0 -30
- package/dist/stateDiagram-v2-UEYNNEHI-lgGjJyRM.cjs +0 -1
- package/dist/swimlanes-SLNWSIFB-BHIPInzG.js +0 -5069
- package/dist/swimlanes-SLNWSIFB-C-Z31wMl.cjs +0 -1
- package/dist/swimlanesDiagram-ULZ7WXOC-C8pvRoyc.cjs +0 -8
- package/dist/swimlanesDiagram-ULZ7WXOC-CK6AVyRM.js +0 -30
- package/dist/timeline-definition-Z64GVDOM-C31otJwb.cjs +0 -120
- package/dist/timeline-definition-Z64GVDOM-rUKJY7cp.js +0 -1069
- package/dist/treeView-QDETBFTQ-BkNUN560.cjs +0 -1
- package/dist/treeView-QDETBFTQ-DVp4aTZQ.js +0 -3
- package/dist/treemap-6X3UGDF4-BbBnHMHJ.js +0 -3
- package/dist/treemap-6X3UGDF4-BcO657a2.cjs +0 -1
- package/dist/utils/extractCompleteMarkdown.test.d.ts +0 -2
- package/dist/utils/extractCompleteMarkdown.test.d.ts.map +0 -1
- package/dist/vennDiagram-T6HMQDX7-DjlTuTEH.cjs +0 -34
- package/dist/vennDiagram-T6HMQDX7-vxMe-3nF.js +0 -1880
- package/dist/wardley-OPB4EBWU-B-RXhnoN.js +0 -3
- package/dist/wardley-OPB4EBWU-CiILNYeL.cjs +0 -1
- package/dist/wardleyDiagram-T6FBY63Y-BMQLZV1W.cjs +0 -78
- package/dist/wardleyDiagram-T6FBY63Y-C_Q2NmJu.js +0 -645
- package/dist/xychartDiagram-ELKLHX3M-Bsa_zeyd.cjs +0 -7
- package/dist/xychartDiagram-ELKLHX3M-OcVmrPL6.js +0 -2101
- /package/dist/{LatexBlock.vue.d.ts → components/LatexBlock.vue.d.ts} +0 -0
- /package/dist/{MarkdownRenderer.vue.d.ts → components/MarkdownRenderer.vue.d.ts} +0 -0
- /package/dist/{MermaidBlock.vue.d.ts → components/MermaidBlock.vue.d.ts} +0 -0
package/dist/dagre-DarAkhy1.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require("./graphlib-BaETKKSa.cjs"),t=require("./map-CCpPjiU9.cjs");var n=/\s/;function r(e){for(var t=e.length;t--&&n.test(e.charAt(t)););return t}var i=/^\s+/;function a(e){return e&&e.slice(0,r(e)+1).replace(i,``)}var o=NaN,s=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,l=/^0o[0-7]+$/i,u=parseInt;function d(t){if(typeof t==`number`)return t;if(e.et(t))return o;if(e.Z(t)){var n=typeof t.valueOf==`function`?t.valueOf():t;t=e.Z(n)?n+``:n}if(typeof t!=`string`)return t===0?t:+t;t=a(t);var r=c.test(t);return r||l.test(t)?u(t.slice(2),r?2:8):s.test(t)?o:+t}var f=1/0,p=17976931348623157e292;function m(e){return e?(e=d(e),e===f||e===-f?(e<0?-1:1)*p:e===e?e:0):e===0?e:0}function h(e){var t=m(e),n=t%1;return t===t?n?t-n:t:0}function g(t,n,r){if(!e.Z(r))return!1;var i=typeof n;return(i==`number`?e.z(r)&&e.U(n,r.length):i==`string`&&n in r)?e.H(r[n],t):!1}function ee(t){return e.B(function(e,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=t.length>3&&typeof a==`function`?(i--,a):void 0,o&&g(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),e=Object(e);++r<i;){var s=n[r];s&&t(e,s,r,a)}return e})}function _(t){return t!=null&&t.length?e.C(t,1):[]}function te(t){return e.K(e.V(t,void 0,_),t+``)}var ne=`[object Object]`,re=Function.prototype,ie=Object.prototype,ae=re.toString,oe=ie.hasOwnProperty,se=ae.call(Object);function ce(n){if(!e.tt(n)||e.nt(n)!=ne)return!1;var r=t.s(n);if(r===null)return!0;var i=oe.call(r,`constructor`)&&r.constructor;return typeof i==`function`&&i instanceof i&&ae.call(i)==se}var le=RegExp(`[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]`);function ue(e){return le.test(e)}var de=1,fe=4;function pe(e){return t.r(e,de|fe)}var me=function(){return e.it.Date.now()},he=Object.prototype,ge=he.hasOwnProperty,_e=e.B(function(n,r){n=Object(n);var i=-1,a=r.length,o=a>2?r[2]:void 0;for(o&&g(r[0],r[1],o)&&(a=1);++i<a;)for(var s=r[i],c=t.c(s),l=-1,u=c.length;++l<u;){var d=c[l],f=n[d];(f===void 0||e.H(f,he[d])&&!ge.call(n,d))&&(n[d]=s[d])}return n});function v(n,r,i){(i!==void 0&&!e.H(n[r],i)||i===void 0&&!(r in n))&&t.d(n,r,i)}function y(e,t){if((t!==`constructor`||typeof e[t]!=`function`)&&t!=`__proto__`)return e[t]}function ve(e){return t.l(e,t.c(e))}function ye(n,r,i,a,o,s,c){var l=y(n,i),u=y(r,i),d=c.get(u);if(d){v(n,i,d);return}var f=s?s(l,u,i+``,n,r,c):void 0,p=f===void 0;if(p){var m=e.Q(u),h=!m&&e.I(u),g=!m&&!h&&e.N(u);f=u,m||h||g?e.Q(l)?f=l:e.c(l)?f=t.f(l):h?(p=!1,f=t.o(u,!0)):g?(p=!1,f=t.a(u,!0)):f=[]:ce(u)||e.L(u)?(f=l,e.L(l)?f=ve(l):(!e.Z(l)||e.Y(l))&&(f=t.i(u))):p=!1}p&&(c.set(u,f),o(f,u,a,s,c),c.delete(u)),v(n,i,f)}function be(n,r,i,a,o){n!==r&&e.d(r,function(t,s){if(o||=new e.S,e.Z(t))ye(n,r,s,i,be,a,o);else{var c=a?a(y(n,s),t,s+``,n,r,o):void 0;c===void 0&&(c=t),v(n,s,c)}},t.c)}function b(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function xe(t){return function(n,r,i){var a=Object(n);if(!e.z(n)){var o=e.f(r,3);n=e.k(n),r=function(e){return o(a[e],e,a)}}var s=t(n,r,i);return s>-1?a[o?n[s]:s]:void 0}}var Se=Math.max;function Ce(t,n,r){var i=t==null?0:t.length;if(!i)return-1;var a=r==null?0:h(r);return a<0&&(a=Se(i+a,0)),e.W(t,e.f(n,3),a)}var x=xe(Ce);function we(n,r){return n==null?n:e.d(n,e.s(r),t.c)}function Te(t,n){return t&&e.u(t,e.s(n))}function Ee(e,t){return e>t}var De=Object.prototype.hasOwnProperty;function Oe(e,t){return e!=null&&De.call(e,t)}function ke(t,n){return t!=null&&e.h(t,n,Oe)}var Ae=`[object String]`;function je(t){return typeof t==`string`||!e.Q(t)&&e.tt(t)&&e.nt(t)==Ae}function S(e,t){return e<t}function C(n,r){var i={};return r=e.f(r,3),e.u(n,function(e,n,a){t.d(i,n,r(e,n,a))}),i}function w(t,n,r){for(var i=-1,a=t.length;++i<a;){var o=t[i],s=n(o);if(s!=null&&(c===void 0?s===s&&!e.et(s):r(s,c)))var c=s,l=o}return l}function T(t){return t&&t.length?w(t,e.X,Ee):void 0}var E=ee(function(e,t,n){be(e,t,n)});function D(t){return t&&t.length?w(t,e.X,S):void 0}function O(t,n){return t&&t.length?w(t,e.f(n,2),S):void 0}function Me(n,r,i,a){if(!e.Z(n))return n;r=e.D(r,n);for(var o=-1,s=r.length,c=s-1,l=n;l!=null&&++o<s;){var u=e.E(r[o]),d=i;if(u===`__proto__`||u===`constructor`||u===`prototype`)return n;if(o!=c){var f=l[u];d=a?a(f,u,l):void 0,d===void 0&&(d=e.Z(f)?f:e.U(r[o+1])?[]:{})}t.u(l,u,d),l=l[u]}return n}function Ne(t,n,r){for(var i=-1,a=n.length,o={};++i<a;){var s=n[i],c=e.T(t,s);r(c,s)&&Me(o,e.D(s,t),c)}return o}function Pe(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}function Fe(t,n){if(t!==n){var r=t!==void 0,i=t===null,a=t===t,o=e.et(t),s=n!==void 0,c=n===null,l=n===n,u=e.et(n);if(!c&&!u&&!o&&t>n||o&&s&&l&&!c&&!u||i&&s&&l||!r&&l||!a)return 1;if(!i&&!o&&!u&&t<n||u&&r&&a&&!i&&!o||c&&r&&a||!s&&a||!l)return-1}return 0}function Ie(e,t,n){for(var r=-1,i=e.criteria,a=t.criteria,o=i.length,s=n.length;++r<o;){var c=Fe(i[r],a[r]);if(c)return r>=s?c:c*(n[r]==`desc`?-1:1)}return e.index-t.index}function Le(n,r,i){r=r.length?e.$(r,function(t){return e.Q(t)?function(n){return e.T(n,t.length===1?t[0]:t)}:t}):[e.X];var a=-1;return r=e.$(r,e.F(e.f)),Pe(t.n(n,function(t,n,i){return{criteria:e.$(r,function(e){return e(t)}),index:++a,value:t}}),function(e,t){return Ie(e,t,i)})}var Re=e.p(`length`),ze=`\\ud800-\\udfff`,Be=`\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff`,Ve=`\\ufe0e\\ufe0f`,He=`[`+ze+`]`,k=`[`+Be+`]`,A=`\\ud83c[\\udffb-\\udfff]`,Ue=`(?:`+k+`|`+A+`)`,We=`[^`+ze+`]`,Ge=`(?:\\ud83c[\\udde6-\\uddff]){2}`,Ke=`[\\ud800-\\udbff][\\udc00-\\udfff]`,qe=`\\u200d`,Je=Ue+`?`,Ye=`[`+Ve+`]?`,Xe=`(?:`+qe+`(?:`+[We,Ge,Ke].join(`|`)+`)`+Ye+Je+`)*`,Ze=Ye+Je+Xe,Qe=`(?:`+[We+k+`?`,k,Ge,Ke,He].join(`|`)+`)`,$e=RegExp(A+`(?=`+A+`)|`+Qe+Ze,`g`);function et(e){for(var t=$e.lastIndex=0;$e.test(e);)++t;return t}function tt(e){return ue(e)?et(e):Re(e)}function nt(t,n){return Ne(t,n,function(n,r){return e.m(t,r)})}var j=te(function(e,t){return e==null?{}:nt(e,t)}),rt=Math.ceil,it=Math.max;function at(e,t,n,r){for(var i=-1,a=it(rt((t-e)/(n||1)),0),o=Array(a);a--;)o[r?a:++i]=e,e+=n;return o}function ot(e){return function(t,n,r){return r&&typeof r!=`number`&&g(t,n,r)&&(n=r=void 0),t=m(t),n===void 0?(n=t,t=0):n=m(n),r=r===void 0?t<n?1:-1:m(r),at(t,n,r,e)}}var M=ot(),st=`[object Map]`,ct=`[object Set]`;function lt(t){if(t==null)return 0;if(e.z(t))return je(t)?tt(t):t.length;var n=e._(t);return n==st||n==ct?t.size:e.A(t).length}var N=e.B(function(t,n){if(t==null)return[];var r=n.length;return r>1&&g(t,n[0],n[1])?n=[]:r>2&&g(n[0],n[1],n[2])&&(n=[n[0]]),Le(t,e.C(n,1),[])}),ut=0;function P(t){var n=++ut;return e.O(t)+n}function dt(e,t,n){for(var r=-1,i=e.length,a=t.length,o={};++r<i;){var s=r<a?t[r]:void 0;n(o,e[r],s)}return o}function ft(e,n){return dt(e||[],n||[],t.u)}var pt=class{constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,t=e._prev;if(t!==e)return mt(t),t}enqueue(e){var t=this._sentinel;e._prev&&e._next&&mt(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t}toString(){for(var e=[],t=this._sentinel,n=t._prev;n!==t;)e.push(JSON.stringify(n,ht)),n=n._prev;return`[`+e.join(`, `)+`]`}};function mt(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function ht(e,t){if(e!==`_next`&&e!==`_prev`)return t}var gt=e.J(1);function _t(e,n){if(e.nodeCount()<=1)return[];var r=yt(e,n||gt),i=vt(r.graph,r.buckets,r.zeroIdx);return _(t.t(i,function(t){return e.outEdges(t.v,t.w)}))}function vt(e,t,n){for(var r=[],i=t[t.length-1],a=t[0],o;e.nodeCount();){for(;o=a.dequeue();)F(e,t,n,o);for(;o=i.dequeue();)F(e,t,n,o);if(e.nodeCount()){for(var s=t.length-2;s>0;--s)if(o=t[s].dequeue(),o){r=r.concat(F(e,t,n,o,!0));break}}}return r}function F(t,n,r,i,a){var o=a?[]:void 0;return e.o(t.inEdges(i.v),function(e){var i=t.edge(e),s=t.node(e.v);a&&o.push({v:e.v,w:e.w}),s.out-=i,I(n,r,s)}),e.o(t.outEdges(i.v),function(e){var i=t.edge(e),a=e.w,o=t.node(a);o.in-=i,I(n,r,o)}),t.removeNode(i.v),o}function yt(t,n){var r=new e.t,i=0,a=0;e.o(t.nodes(),function(e){r.setNode(e,{v:e,in:0,out:0})}),e.o(t.edges(),function(e){var t=r.edge(e.v,e.w)||0,o=n(e),s=t+o;r.setEdge(e.v,e.w,s),a=Math.max(a,r.node(e.v).out+=o),i=Math.max(i,r.node(e.w).in+=o)});var o=M(a+i+3).map(function(){return new pt}),s=i+1;return e.o(r.nodes(),function(e){I(o,s,r.node(e))}),{graph:r,buckets:o,zeroIdx:s}}function I(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}function bt(t){var n=t.graph().acyclicer===`greedy`?_t(t,r(t)):xt(t);e.o(n,function(e){var n=t.edge(e);t.removeEdge(e),n.forwardName=e.name,n.reversed=!0,t.setEdge(e.w,e.v,n,P(`rev`))});function r(e){return function(t){return e.edge(t).weight}}}function xt(t){var n=[],r={},i={};function a(o){Object.prototype.hasOwnProperty.call(i,o)||(i[o]=!0,r[o]=!0,e.o(t.outEdges(o),function(e){Object.prototype.hasOwnProperty.call(r,e.w)?n.push(e):a(e.w)}),delete r[o])}return e.o(t.nodes(),a),n}function St(t){e.o(t.edges(),function(e){var n=t.edge(e);if(n.reversed){t.removeEdge(e);var r=n.forwardName;delete n.reversed,delete n.forwardName,t.setEdge(e.w,e.v,n,r)}})}function L(e,t,n,r){var i;do i=P(r);while(e.hasNode(i));return n.dummy=t,e.setNode(i,n),i}function Ct(t){var n=new e.t().setGraph(t.graph());return e.o(t.nodes(),function(e){n.setNode(e,t.node(e))}),e.o(t.edges(),function(e){var r=n.edge(e.v,e.w)||{weight:0,minlen:1},i=t.edge(e);n.setEdge(e.v,e.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),n}function R(t){var n=new e.t({multigraph:t.isMultigraph()}).setGraph(t.graph());return e.o(t.nodes(),function(e){t.children(e).length||n.setNode(e,t.node(e))}),e.o(t.edges(),function(e){n.setEdge(e,t.edge(e))}),n}function z(e,t){var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2;if(!i&&!a)throw Error(`Not possible to find intersection inside of the rectangle`);var c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=s*i/a,l=s):(i<0&&(o=-o),c=o,l=o*a/i),{x:n+c,y:r+l}}function B(n){var r=t.t(M(H(n)+1),function(){return[]});return e.o(n.nodes(),function(t){var i=n.node(t),a=i.rank;e.r(a)||(r[a][i.order]=t)}),r}function wt(n){var r=D(t.t(n.nodes(),function(e){return n.node(e).rank}));e.o(n.nodes(),function(e){var t=n.node(e);ke(t,`rank`)&&(t.rank-=r)})}function Tt(n){var r=D(t.t(n.nodes(),function(e){return n.node(e).rank})),i=[];e.o(n.nodes(),function(e){var t=n.node(e).rank-r;i[t]||(i[t]=[]),i[t].push(e)});var a=0,o=n.graph().nodeRankFactor;e.o(i,function(t,r){e.r(t)&&r%o!==0?--a:a&&e.o(t,function(e){n.node(e).rank+=a})})}function V(e,t,n,r){var i={width:0,height:0};return arguments.length>=4&&(i.rank=n,i.order=r),L(e,`border`,i,t)}function H(n){return T(t.t(n.nodes(),function(t){var r=n.node(t).rank;if(!e.r(r))return r}))}function Et(t,n){var r={lhs:[],rhs:[]};return e.o(t,function(e){n(e)?r.lhs.push(e):r.rhs.push(e)}),r}function Dt(e,t){var n=me();try{return t()}finally{console.log(e+` time: `+(me()-n)+`ms`)}}function Ot(e,t){return t()}function kt(t){function n(r){var i=t.children(r),a=t.node(r);if(i.length&&e.o(i,n),Object.prototype.hasOwnProperty.call(a,`minRank`)){a.borderLeft=[],a.borderRight=[];for(var o=a.minRank,s=a.maxRank+1;o<s;++o)At(t,`borderLeft`,`_bl`,r,a,o),At(t,`borderRight`,`_br`,r,a,o)}}e.o(t.children(),n)}function At(e,t,n,r,i,a){var o={width:0,height:0,rank:a,borderType:t},s=i[t][a-1],c=L(e,`border`,o,n);i[t][a]=c,e.setParent(c,r),s&&e.setEdge(s,c,{weight:1})}function jt(e){var t=e.graph().rankdir.toLowerCase();(t===`lr`||t===`rl`)&&Nt(e)}function Mt(e){var t=e.graph().rankdir.toLowerCase();(t===`bt`||t===`rl`)&&Ft(e),(t===`lr`||t===`rl`)&&(It(e),Nt(e))}function Nt(t){e.o(t.nodes(),function(e){Pt(t.node(e))}),e.o(t.edges(),function(e){Pt(t.edge(e))})}function Pt(e){var t=e.width;e.width=e.height,e.height=t}function Ft(t){e.o(t.nodes(),function(e){U(t.node(e))}),e.o(t.edges(),function(n){var r=t.edge(n);e.o(r.points,U),Object.prototype.hasOwnProperty.call(r,`y`)&&U(r)})}function U(e){e.y=-e.y}function It(t){e.o(t.nodes(),function(e){W(t.node(e))}),e.o(t.edges(),function(n){var r=t.edge(n);e.o(r.points,W),Object.prototype.hasOwnProperty.call(r,`x`)&&W(r)})}function W(e){var t=e.x;e.x=e.y,e.y=t}function Lt(t){t.graph().dummyChains=[],e.o(t.edges(),function(e){Rt(t,e)})}function Rt(e,t){var n=t.v,r=e.node(n).rank,i=t.w,a=e.node(i).rank,o=t.name,s=e.edge(t),c=s.labelRank;if(a!==r+1){e.removeEdge(t);var l=void 0,u,d;for(d=0,++r;r<a;++d,++r)s.points=[],l={width:0,height:0,edgeLabel:s,edgeObj:t,rank:r},u=L(e,`edge`,l,`_d`),r===c&&(l.width=s.width,l.height=s.height,l.dummy=`edge-label`,l.labelpos=s.labelpos),e.setEdge(n,u,{weight:s.weight},o),d===0&&e.graph().dummyChains.push(u),n=u;e.setEdge(n,i,{weight:s.weight},o)}}function zt(t){e.o(t.graph().dummyChains,function(e){var n=t.node(e),r=n.edgeLabel,i;for(t.setEdge(n.edgeObj,r);n.dummy;)i=t.successors(e)[0],t.removeNode(e),r.points.push({x:n.x,y:n.y}),n.dummy===`edge-label`&&(r.x=n.x,r.y=n.y,r.width=n.width,r.height=n.height),e=i,n=t.node(e)})}function G(n){var r={};function i(e){var a=n.node(e);if(Object.prototype.hasOwnProperty.call(r,e))return a.rank;r[e]=!0;var o=D(t.t(n.outEdges(e),function(e){return i(e.w)-n.edge(e).minlen}));return(o===1/0||o==null)&&(o=0),a.rank=o}e.o(n.sources(),i)}function K(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}function Bt(t){var n=new e.t({directed:!1}),r=t.nodes()[0],i=t.nodeCount();n.setNode(r,{});for(var a,o;Vt(n,t)<i;)a=Ht(n,t),o=n.hasNode(a.v)?K(t,a):-K(t,a),Ut(n,t,o);return n}function Vt(t,n){function r(i){e.o(n.nodeEdges(i),function(e){var a=e.v,o=i===a?e.w:a;!t.hasNode(o)&&!K(n,e)&&(t.setNode(o,{}),t.setEdge(i,o,{}),r(o))})}return e.o(t.nodes(),r),t.nodeCount()}function Ht(e,t){return O(t.edges(),function(n){if(e.hasNode(n.v)!==e.hasNode(n.w))return K(t,n)})}function Ut(t,n,r){e.o(t.nodes(),function(e){n.node(e).rank+=r})}e.J(1),e.J(1),Wt.CycleException=q;function Wt(t){var n={},r={},i=[];function a(o){if(Object.prototype.hasOwnProperty.call(r,o))throw new q;Object.prototype.hasOwnProperty.call(n,o)||(r[o]=!0,n[o]=!0,e.o(t.predecessors(o),a),delete r[o],i.push(o))}if(e.o(t.sinks(),a),lt(n)!==t.nodeCount())throw new q;return i}function q(){}q.prototype=Error();function Gt(t,n,r){e.Q(n)||(n=[n]);var i=(t.isDirected()?t.successors:t.neighbors).bind(t),a=[],o={};return e.o(n,function(e){if(!t.hasNode(e))throw Error(`Graph does not have node: `+e);Kt(t,e,r===`post`,o,i,a)}),a}function Kt(t,n,r,i,a,o){Object.prototype.hasOwnProperty.call(i,n)||(i[n]=!0,r||o.push(n),e.o(a(n),function(e){Kt(t,e,r,i,a,o)}),r&&o.push(n))}function qt(e,t){return Gt(e,t,`post`)}function Jt(e,t){return Gt(e,t,`pre`)}J.initLowLimValues=X,J.initCutValues=Y,J.calcCutValue=Xt,J.leaveEdge=Qt,J.enterEdge=$t,J.exchangeEdges=Z;function J(e){e=Ct(e),G(e);var t=Bt(e);X(t),Y(t,e);for(var n,r;n=Qt(t);)r=$t(t,e,n),Z(t,e,n,r)}function Y(t,n){var r=qt(t,t.nodes());r=r.slice(0,r.length-1),e.o(r,function(e){Yt(t,n,e)})}function Yt(e,t,n){var r=e.node(n).parent;e.edge(n,r).cutvalue=Xt(e,t,n)}function Xt(t,n,r){var i=t.node(r).parent,a=!0,o=n.edge(r,i),s=0;return o||=(a=!1,n.edge(i,r)),s=o.weight,e.o(n.nodeEdges(r),function(e){var o=e.v===r,c=o?e.w:e.v;if(c!==i){var l=o===a,u=n.edge(e).weight;if(s+=l?u:-u,tn(t,r,c)){var d=t.edge(r,c).cutvalue;s+=l?-d:d}}}),s}function X(e,t){arguments.length<2&&(t=e.nodes()[0]),Zt(e,{},1,t)}function Zt(t,n,r,i,a){var o=r,s=t.node(i);return n[i]=!0,e.o(t.neighbors(i),function(e){Object.prototype.hasOwnProperty.call(n,e)||(r=Zt(t,n,r,e,i))}),s.low=o,s.lim=r++,a?s.parent=a:delete s.parent,r}function Qt(e){return x(e.edges(),function(t){return e.edge(t).cutvalue<0})}function $t(t,n,r){var i=r.v,a=r.w;n.hasEdge(i,a)||(i=r.w,a=r.v);var o=t.node(i),s=t.node(a),c=o,l=!1;return o.lim>s.lim&&(c=s,l=!0),O(e.a(n.edges(),function(e){return l===nn(t,t.node(e.v),c)&&l!==nn(t,t.node(e.w),c)}),function(e){return K(n,e)})}function Z(e,t,n,r){var i=n.v,a=n.w;e.removeEdge(i,a),e.setEdge(r.v,r.w,{}),X(e),Y(e,t),en(e,t)}function en(t,n){var r=Jt(t,x(t.nodes(),function(e){return!n.node(e).parent}));r=r.slice(1),e.o(r,function(e){var r=t.node(e).parent,i=n.edge(e,r),a=!1;i||(i=n.edge(r,e),a=!0),n.node(e).rank=n.node(r).rank+(a?i.minlen:-i.minlen)})}function tn(e,t,n){return e.hasEdge(t,n)}function nn(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}function rn(e){switch(e.graph().ranker){case`network-simplex`:sn(e);break;case`tight-tree`:on(e);break;case`longest-path`:an(e);break;default:sn(e)}}var an=G;function on(e){G(e),Bt(e)}function sn(e){J(e)}function cn(t){var n=L(t,`root`,{},`_root`),r=un(t),i=T(e.i(r))-1,a=2*i+1;t.graph().nestingRoot=n,e.o(t.edges(),function(e){t.edge(e).minlen*=a});var o=dn(t)+1;e.o(t.children(),function(e){ln(t,n,a,o,i,r,e)}),t.graph().nodeRankFactor=a}function ln(t,n,r,i,a,o,s){var c=t.children(s);if(!c.length){s!==n&&t.setEdge(n,s,{weight:0,minlen:r});return}var l=V(t,`_bt`),u=V(t,`_bb`),d=t.node(s);t.setParent(l,s),d.borderTop=l,t.setParent(u,s),d.borderBottom=u,e.o(c,function(e){ln(t,n,r,i,a,o,e);var c=t.node(e),d=c.borderTop?c.borderTop:e,f=c.borderBottom?c.borderBottom:e,p=c.borderTop?i:2*i,m=d===f?a-o[s]+1:1;t.setEdge(l,d,{weight:p,minlen:m,nestingEdge:!0}),t.setEdge(f,u,{weight:p,minlen:m,nestingEdge:!0})}),t.parent(s)||t.setEdge(n,l,{weight:0,minlen:a+o[s]})}function un(t){var n={};function r(i,a){var o=t.children(i);o&&o.length&&e.o(o,function(e){r(e,a+1)}),n[i]=a}return e.o(t.children(),function(e){r(e,1)}),n}function dn(t){return e.n(t.edges(),function(e,n){return e+t.edge(n).weight},0)}function fn(t){var n=t.graph();t.removeNode(n.nestingRoot),delete n.nestingRoot,e.o(t.edges(),function(e){t.edge(e).nestingEdge&&t.removeEdge(e)})}function pn(t,n,r){var i={},a;e.o(r,function(e){for(var r=t.parent(e),o,s;r;){if(o=t.parent(r),o?(s=i[o],i[o]=r):(s=a,a=r),s&&s!==r){n.setEdge(s,r);return}r=o}})}function mn(t,n,r){var i=hn(t),a=new e.t({compound:!0}).setGraph({root:i}).setDefaultNodeLabel(function(e){return t.node(e)});return e.o(t.nodes(),function(o){var s=t.node(o),c=t.parent(o);(s.rank===n||s.minRank<=n&&n<=s.maxRank)&&(a.setNode(o),a.setParent(o,c||i),e.o(t[r](o),function(n){var r=n.v===o?n.w:n.v,i=a.edge(r,o),s=e.r(i)?0:i.weight;a.setEdge(r,o,{weight:t.edge(n).weight+s})}),Object.prototype.hasOwnProperty.call(s,`minRank`)&&a.setNode(o,{borderLeft:s.borderLeft[n],borderRight:s.borderRight[n]}))}),a}function hn(e){for(var t;e.hasNode(t=P(`_root`)););return t}function gn(e,t){for(var n=0,r=1;r<t.length;++r)n+=_n(e,t[r-1],t[r]);return n}function _n(n,r,i){for(var a=ft(i,t.t(i,function(e,t){return t})),o=_(t.t(r,function(e){return N(t.t(n.outEdges(e),function(e){return{pos:a[e.w],weight:n.edge(e).weight}}),`pos`)})),s=1;s<i.length;)s<<=1;var c=2*s-1;--s;var l=t.t(Array(c),function(){return 0}),u=0;return e.o(o.forEach(function(e){var t=e.pos+s;l[t]+=e.weight;for(var n=0;t>0;)t%2&&(n+=l[t+1]),t=t-1>>1,l[t]+=e.weight;u+=e.weight*n})),u}function vn(n){var r={},i=e.a(n.nodes(),function(e){return!n.children(e).length}),a=T(t.t(i,function(e){return n.node(e).rank})),o=t.t(M(a+1),function(){return[]});function s(t){ke(r,t)||(r[t]=!0,o[n.node(t).rank].push(t),e.o(n.successors(t),s))}var c=N(i,function(e){return n.node(e).rank});return e.o(c,s),o}function yn(n,r){return t.t(r,function(t){var r=n.inEdges(t);if(r.length){var i=e.n(r,function(e,t){var r=n.edge(t),i=n.node(t.v);return{sum:e.sum+r.weight*i.order,weight:e.weight+r.weight}},{sum:0,weight:0});return{v:t,barycenter:i.sum/i.weight,weight:i.weight}}return{v:t}})}function bn(t,n){var r={};return e.o(t,function(t,n){var i=r[t.v]={indegree:0,in:[],out:[],vs:[t.v],i:n};e.r(t.barycenter)||(i.barycenter=t.barycenter,i.weight=t.weight)}),e.o(n.edges(),function(t){var n=r[t.v],i=r[t.w];!e.r(n)&&!e.r(i)&&(i.indegree++,n.out.push(r[t.w]))}),xn(e.a(r,function(e){return!e.indegree}))}function xn(n){var r=[];function i(t){return function(n){n.merged||(e.r(n.barycenter)||e.r(t.barycenter)||n.barycenter>=t.barycenter)&&Sn(t,n)}}function a(e){return function(t){t.in.push(e),--t.indegree===0&&n.push(t)}}for(;n.length;){var o=n.pop();r.push(o),e.o(o.in.reverse(),i(o)),e.o(o.out,a(o))}return t.t(e.a(r,function(e){return!e.merged}),function(e){return j(e,[`vs`,`i`,`barycenter`,`weight`])})}function Sn(e,t){var n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}function Cn(t,n){var r=Et(t,function(e){return Object.prototype.hasOwnProperty.call(e,`barycenter`)}),i=r.lhs,a=N(r.rhs,function(e){return-e.i}),o=[],s=0,c=0,l=0;i.sort(Tn(!!n)),l=wn(o,a,l),e.o(i,function(e){l+=e.vs.length,o.push(e.vs),s+=e.barycenter*e.weight,c+=e.weight,l=wn(o,a,l)});var u={vs:_(o)};return c&&(u.barycenter=s/c,u.weight=c),u}function wn(e,t,n){for(var r;t.length&&(r=b(t)).i<=n;)t.pop(),e.push(r.vs),n++;return n}function Tn(e){return function(t,n){return t.barycenter<n.barycenter?-1:t.barycenter>n.barycenter?1:e?n.i-t.i:t.i-n.i}}function En(t,n,r,i){var a=t.children(n),o=t.node(n),s=o?o.borderLeft:void 0,c=o?o.borderRight:void 0,l={};s&&(a=e.a(a,function(e){return e!==s&&e!==c}));var u=yn(t,a);e.o(u,function(e){if(t.children(e.v).length){var n=En(t,e.v,r,i);l[e.v]=n,Object.prototype.hasOwnProperty.call(n,`barycenter`)&&On(e,n)}});var d=bn(u,r);Dn(d,l);var f=Cn(d,i);if(s&&(f.vs=_([s,f.vs,c]),t.predecessors(s).length)){var p=t.node(t.predecessors(s)[0]),m=t.node(t.predecessors(c)[0]);Object.prototype.hasOwnProperty.call(f,`barycenter`)||(f.barycenter=0,f.weight=0),f.barycenter=(f.barycenter*f.weight+p.order+m.order)/(f.weight+2),f.weight+=2}return f}function Dn(t,n){e.o(t,function(e){e.vs=_(e.vs.map(function(e){return n[e]?n[e].vs:e}))})}function On(t,n){e.r(t.barycenter)?(t.barycenter=n.barycenter,t.weight=n.weight):(t.barycenter=(t.barycenter*t.weight+n.barycenter*n.weight)/(t.weight+n.weight),t.weight+=n.weight)}function kn(e){var t=H(e),n=An(e,M(1,t+1),`inEdges`),r=An(e,M(t-1,-1,-1),`outEdges`),i=vn(e);Mn(e,i);for(var a=1/0,o,s=0,c=0;c<4;++s,++c){jn(s%2?n:r,s%4>=2),i=B(e);var l=gn(e,i);l<a&&(c=0,o=pe(i),a=l)}Mn(e,o)}function An(e,n,r){return t.t(n,function(t){return mn(e,t,r)})}function jn(t,n){var r=new e.t;e.o(t,function(t){var i=t.graph().root,a=En(t,i,r,n);e.o(a.vs,function(e,n){t.node(e).order=n}),pn(t,r,a.vs)})}function Mn(t,n){e.o(n,function(n){e.o(n,function(e,n){t.node(e).order=n})})}function Nn(t){var n=Fn(t);e.o(t.graph().dummyChains,function(e){for(var r=t.node(e),i=r.edgeObj,a=Pn(t,n,i.v,i.w),o=a.path,s=a.lca,c=0,l=o[c],u=!0;e!==i.w;){if(r=t.node(e),u){for(;(l=o[c])!==s&&t.node(l).maxRank<r.rank;)c++;l===s&&(u=!1)}if(!u){for(;c<o.length-1&&t.node(l=o[c+1]).minRank<=r.rank;)c++;l=o[c]}t.setParent(e,l),e=t.successors(e)[0]}})}function Pn(e,t,n,r){var i=[],a=[],o=Math.min(t[n].low,t[r].low),s=Math.max(t[n].lim,t[r].lim),c=n,l;do c=e.parent(c),i.push(c);while(c&&(t[c].low>o||s>t[c].lim));for(l=c,c=r;(c=e.parent(c))!==l;)a.push(c);return{path:i.concat(a.reverse()),lca:l}}function Fn(t){var n={},r=0;function i(a){var o=r;e.o(t.children(a),i),n[a]={low:o,lim:r++}}return e.o(t.children(),i),n}function In(t,n){var r={};function i(n,i){var a=0,o=0,s=n.length,c=b(i);return e.o(i,function(n,l){var u=Rn(t,n),d=u?t.node(u).order:s;(u||n===c)&&(e.o(i.slice(o,l+1),function(n){e.o(t.predecessors(n),function(e){var i=t.node(e),o=i.order;(o<a||d<o)&&!(i.dummy&&t.node(n).dummy)&&zn(r,e,n)})}),o=l+1,a=d)}),i}return e.n(n,i),r}function Ln(t,n){var r={};function i(n,i,a,o,s){var c;e.o(M(i,a),function(i){c=n[i],t.node(c).dummy&&e.o(t.predecessors(c),function(e){var n=t.node(e);n.dummy&&(n.order<o||n.order>s)&&zn(r,e,c)})})}function a(n,r){var a=-1,o,s=0;return e.o(r,function(e,c){if(t.node(e).dummy===`border`){var l=t.predecessors(e);l.length&&(o=t.node(l[0]).order,i(r,s,c,a,o),s=c,a=o)}i(r,s,r.length,o,n.length)}),r}return e.n(n,a),r}function Rn(e,t){if(e.node(t).dummy)return x(e.predecessors(t),function(t){return e.node(t).dummy})}function zn(e,t,n){if(t>n){var r=t;t=n,n=r}Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,configurable:!0,value:{},writable:!0});var i=e[t];Object.defineProperty(i,n,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function Bn(e,t,n){if(t>n){var r=t;t=n,n=r}return!!e[t]&&Object.prototype.hasOwnProperty.call(e[t],n)}function Vn(t,n,r,i){var a={},o={},s={};return e.o(n,function(t){e.o(t,function(e,t){a[e]=e,o[e]=e,s[e]=t})}),e.o(n,function(t){var n=-1;e.o(t,function(e){var t=i(e);if(t.length){t=N(t,function(e){return s[e]});for(var c=(t.length-1)/2,l=Math.floor(c),u=Math.ceil(c);l<=u;++l){var d=t[l];o[e]===e&&n<s[d]&&!Bn(r,e,d)&&(o[d]=e,o[e]=a[e]=a[d],n=s[d])}}})}),{root:a,align:o}}function Hn(t,n,r,i,a){var o={},s=Un(t,n,r,a),c=a?`borderLeft`:`borderRight`;function l(e,t){for(var n=s.nodes(),r=n.pop(),i={};r;)i[r]?e(r):(i[r]=!0,n.push(r),n=n.concat(t(r))),r=n.pop()}function u(e){o[e]=s.inEdges(e).reduce(function(e,t){return Math.max(e,o[t.v]+s.edge(t))},0)}function d(e){var n=s.outEdges(e).reduce(function(e,t){return Math.min(e,o[t.w]-s.edge(t))},1/0),r=t.node(e);n!==1/0&&r.borderType!==c&&(o[e]=Math.max(o[e],n))}return l(u,s.predecessors.bind(s)),l(d,s.successors.bind(s)),e.o(i,function(e){o[e]=o[r[e]]}),o}function Un(t,n,r,i){var a=new e.t,o=t.graph(),s=Jn(o.nodesep,o.edgesep,i);return e.o(n,function(n){var i;e.o(n,function(e){var n=r[e];if(a.setNode(n),i){var o=r[i],c=a.edge(o,n);a.setEdge(o,n,Math.max(s(t,e,i),c||0))}i=e})}),a}function Wn(t,n){return O(e.i(n),function(e){var n=-1/0,r=1/0;return we(e,function(e,i){var a=Yn(t,i)/2;n=Math.max(e+a,n),r=Math.min(e-a,r)}),n-r})}function Gn(t,n){var r=e.i(n),i=D(r),a=T(r);e.o([`u`,`d`],function(r){e.o([`l`,`r`],function(o){var s=r+o,c=t[s],l;if(c!==n){var u=e.i(c);l=o===`l`?i-D(u):a-T(u),l&&(t[s]=C(c,function(e){return e+l}))}})})}function Kn(e,n){return C(e.ul,function(r,i){if(n)return e[n.toLowerCase()][i];var a=N(t.t(e,i));return(a[1]+a[2])/2})}function qn(n){var r=B(n),i=E(In(n,r),Ln(n,r)),a={},o;return e.o([`u`,`d`],function(s){o=s===`u`?r:e.i(r).reverse(),e.o([`l`,`r`],function(r){r===`r`&&(o=t.t(o,function(t){return e.i(t).reverse()}));var c=(s===`u`?n.predecessors:n.successors).bind(n),l=Vn(n,o,i,c),u=Hn(n,o,l.root,l.align,r===`r`);r===`r`&&(u=C(u,function(e){return-e})),a[s+r]=u})}),Gn(a,Wn(n,a)),Kn(a,n.graph().align)}function Jn(e,t,n){return function(r,i,a){var o=r.node(i),s=r.node(a),c=0,l;if(c+=o.width/2,Object.prototype.hasOwnProperty.call(o,`labelpos`))switch(o.labelpos.toLowerCase()){case`l`:l=-o.width/2;break;case`r`:l=o.width/2}if(l&&(c+=n?l:-l),l=0,c+=(o.dummy?t:e)/2,c+=(s.dummy?t:e)/2,c+=s.width/2,Object.prototype.hasOwnProperty.call(s,`labelpos`))switch(s.labelpos.toLowerCase()){case`l`:l=s.width/2;break;case`r`:l=-s.width/2}return l&&(c+=n?l:-l),l=0,c}}function Yn(e,t){return e.node(t).width}function Xn(e){e=R(e),Zn(e),Te(qn(e),function(t,n){e.node(n).x=t})}function Zn(n){var r=B(n),i=n.graph().ranksep,a=0;e.o(r,function(r){var o=T(t.t(r,function(e){return n.node(e).height}));e.o(r,function(e){n.node(e).y=a+o/2}),a+=o+i})}function Qn(e,t){var n=t&&t.debugTiming?Dt:Ot;n(`layout`,()=>{var t=n(` buildLayoutGraph`,()=>lr(e));n(` runLayout`,()=>$n(t,n)),n(` updateInputGraph`,()=>er(e,t))})}function $n(e,t){t(` makeSpaceForEdgeLabels`,()=>ur(e)),t(` removeSelfEdges`,()=>yr(e)),t(` acyclic`,()=>bt(e)),t(` nestingGraph.run`,()=>cn(e)),t(` rank`,()=>rn(R(e))),t(` injectEdgeLabelProxies`,()=>dr(e)),t(` removeEmptyRanks`,()=>Tt(e)),t(` nestingGraph.cleanup`,()=>fn(e)),t(` normalizeRanks`,()=>wt(e)),t(` assignRankMinMax`,()=>fr(e)),t(` removeEdgeLabelProxies`,()=>pr(e)),t(` normalize.run`,()=>Lt(e)),t(` parentDummyChains`,()=>Nn(e)),t(` addBorderSegments`,()=>kt(e)),t(` order`,()=>kn(e)),t(` insertSelfEdges`,()=>br(e)),t(` adjustCoordinateSystem`,()=>jt(e)),t(` position`,()=>Xn(e)),t(` positionSelfEdges`,()=>xr(e)),t(` removeBorderNodes`,()=>vr(e)),t(` normalize.undo`,()=>zt(e)),t(` fixupEdgeLabelCoords`,()=>gr(e)),t(` undoCoordinateSystem`,()=>Mt(e)),t(` translateGraph`,()=>mr(e)),t(` assignNodeIntersects`,()=>hr(e)),t(` reversePoints`,()=>_r(e)),t(` acyclic.undo`,()=>St(e))}function er(t,n){e.o(t.nodes(),function(e){var r=t.node(e),i=n.node(e);r&&(r.x=i.x,r.y=i.y,n.children(e).length&&(r.width=i.width,r.height=i.height))}),e.o(t.edges(),function(e){var r=t.edge(e),i=n.edge(e);r.points=i.points,Object.prototype.hasOwnProperty.call(i,`x`)&&(r.x=i.x,r.y=i.y)}),t.graph().width=n.graph().width,t.graph().height=n.graph().height}var tr=[`nodesep`,`edgesep`,`ranksep`,`marginx`,`marginy`],nr={ranksep:50,edgesep:20,nodesep:50,rankdir:`tb`},rr=[`acyclicer`,`ranker`,`rankdir`,`align`],ir=[`width`,`height`],ar={width:0,height:0},or=[`minlen`,`weight`,`width`,`height`,`labeloffset`],sr={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:`r`},cr=[`labelpos`];function lr(t){var n=new e.t({multigraph:!0,compound:!0}),r=$(t.graph());return n.setGraph(E({},nr,Q(r,tr),j(r,rr))),e.o(t.nodes(),function(e){var r=$(t.node(e));n.setNode(e,_e(Q(r,ir),ar)),n.setParent(e,t.parent(e))}),e.o(t.edges(),function(e){var r=$(t.edge(e));n.setEdge(e,E({},sr,Q(r,or),j(r,cr)))}),n}function ur(t){var n=t.graph();n.ranksep/=2,e.o(t.edges(),function(e){var r=t.edge(e);r.minlen*=2,r.labelpos.toLowerCase()!==`c`&&(n.rankdir===`TB`||n.rankdir===`BT`?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function dr(t){e.o(t.edges(),function(e){var n=t.edge(e);if(n.width&&n.height){var r=t.node(e.v);L(t,`edge-proxy`,{rank:(t.node(e.w).rank-r.rank)/2+r.rank,e},`_ep`)}})}function fr(t){var n=0;e.o(t.nodes(),function(e){var r=t.node(e);r.borderTop&&(r.minRank=t.node(r.borderTop).rank,r.maxRank=t.node(r.borderBottom).rank,n=T(n,r.maxRank))}),t.graph().maxRank=n}function pr(t){e.o(t.nodes(),function(e){var n=t.node(e);n.dummy===`edge-proxy`&&(t.edge(n.e).labelRank=n.rank,t.removeNode(e))})}function mr(t){var n=1/0,r=0,i=1/0,a=0,o=t.graph(),s=o.marginx||0,c=o.marginy||0;function l(e){var t=e.x,o=e.y,s=e.width,c=e.height;n=Math.min(n,t-s/2),r=Math.max(r,t+s/2),i=Math.min(i,o-c/2),a=Math.max(a,o+c/2)}e.o(t.nodes(),function(e){l(t.node(e))}),e.o(t.edges(),function(e){var n=t.edge(e);Object.prototype.hasOwnProperty.call(n,`x`)&&l(n)}),n-=s,i-=c,e.o(t.nodes(),function(e){var r=t.node(e);r.x-=n,r.y-=i}),e.o(t.edges(),function(r){var a=t.edge(r);e.o(a.points,function(e){e.x-=n,e.y-=i}),Object.prototype.hasOwnProperty.call(a,`x`)&&(a.x-=n),Object.prototype.hasOwnProperty.call(a,`y`)&&(a.y-=i)}),o.width=r-n+s,o.height=a-i+c}function hr(t){e.o(t.edges(),function(e){var n=t.edge(e),r=t.node(e.v),i=t.node(e.w),a,o;n.points?(a=n.points[0],o=n.points[n.points.length-1]):(n.points=[],a=i,o=r),n.points.unshift(z(r,a)),n.points.push(z(i,o))})}function gr(t){e.o(t.edges(),function(e){var n=t.edge(e);if(Object.prototype.hasOwnProperty.call(n,`x`))switch((n.labelpos===`l`||n.labelpos===`r`)&&(n.width-=n.labeloffset),n.labelpos){case`l`:n.x-=n.width/2+n.labeloffset;break;case`r`:n.x+=n.width/2+n.labeloffset}})}function _r(t){e.o(t.edges(),function(e){var n=t.edge(e);n.reversed&&n.points.reverse()})}function vr(t){e.o(t.nodes(),function(e){if(t.children(e).length){var n=t.node(e),r=t.node(n.borderTop),i=t.node(n.borderBottom),a=t.node(b(n.borderLeft)),o=t.node(b(n.borderRight));n.width=Math.abs(o.x-a.x),n.height=Math.abs(i.y-r.y),n.x=a.x+n.width/2,n.y=r.y+n.height/2}}),e.o(t.nodes(),function(e){t.node(e).dummy===`border`&&t.removeNode(e)})}function yr(t){e.o(t.edges(),function(e){if(e.v===e.w){var n=t.node(e.v);n.selfEdges||=[],n.selfEdges.push({e,label:t.edge(e)}),t.removeEdge(e)}})}function br(t){var n=B(t);e.o(n,function(n){var r=0;e.o(n,function(n,i){var a=t.node(n);a.order=i+r,e.o(a.selfEdges,function(e){L(t,`selfedge`,{width:e.label.width,height:e.label.height,rank:a.rank,order:i+ ++r,e:e.e,label:e.label},`_se`)}),delete a.selfEdges})})}function xr(t){e.o(t.nodes(),function(e){var n=t.node(e);if(n.dummy===`selfedge`){var r=t.node(n.e.v),i=r.x+r.width/2,a=r.y,o=n.x-i,s=r.height/2;t.setEdge(n.e,n.label),t.removeNode(e),n.label.points=[{x:i+2*o/3,y:a-s},{x:i+5*o/6,y:a-s},{x:i+o,y:a},{x:i+5*o/6,y:a+s},{x:i+2*o/3,y:a+s}],n.label.x=n.x,n.label.y=n.y}})}function Q(e,t){return C(j(e,t),Number)}function $(t){var n={};return e.o(t,function(e,t){n[t.toLowerCase()]=e}),n}Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return Qn}});
|
|
@@ -1,328 +0,0 @@
|
|
|
1
|
-
import { n as e } from "./chunk-Y2CYZVJY-DO9UHHon.js";
|
|
2
|
-
import { m as t } from "./src-C7bjHtAI.js";
|
|
3
|
-
import { x as n } from "./chunk-I66GZJ75-xmbkwRyp.js";
|
|
4
|
-
import "./chunk-NSK5VX7P-BO1SrWAL.js";
|
|
5
|
-
import "./chunk-4I5QYGJK-Bs8S-Wfu.js";
|
|
6
|
-
import "./chunk-WRU74C26-UGtU6H2a.js";
|
|
7
|
-
import "./chunk-7BUUIJ7U-CZdUK2qY.js";
|
|
8
|
-
import { n as r } from "./chunk-UBXNYLIW-fOGkdEwd.js";
|
|
9
|
-
import { t as i } from "./graphlib-DoD0LnUK.js";
|
|
10
|
-
import { t as a } from "./dagre-x4cMb6gU.js";
|
|
11
|
-
import { a as o, i as s, n as c, o as l, r as u, t as d } from "./chunk-RYQCIY6F-UBebC0ib.js";
|
|
12
|
-
import "./chunk-W5SLKNZC-C2SYjJjL.js";
|
|
13
|
-
import { a as f, c as p, i as m, l as h, n as g, t as _, u as v } from "./chunk-QR6OTTB3-CGxJcV-X.js";
|
|
14
|
-
import { a as y, i as b, o as x, r as S, t as C } from "./chunk-7Z6QIM7H-CJdupq9f.js";
|
|
15
|
-
//#region ../../node_modules/.pnpm/mermaid@11.16.1/node_modules/mermaid/dist/chunks/mermaid.core/dagre-VZM6K2ZE.mjs
|
|
16
|
-
var w = /* @__PURE__ */ e((e, t, n) => Math.max(t, Math.min(n, e)), "clamp"), T = /* @__PURE__ */ e((e = "TB") => {
|
|
17
|
-
switch (e) {
|
|
18
|
-
case "BT": return "bottom";
|
|
19
|
-
case "LR": return "right";
|
|
20
|
-
case "RL": return "left";
|
|
21
|
-
default: return "top";
|
|
22
|
-
}
|
|
23
|
-
}, "getDefaultSelfLoopSide"), E = /* @__PURE__ */ e((e) => e === "flowchart" || e === "flowchart-v2" || e === "stateDiagram", "shouldMergeSelfLoopSegments"), D = /* @__PURE__ */ e((e, t, n, r, i) => {
|
|
24
|
-
let a = [], o = /* @__PURE__ */ new Set();
|
|
25
|
-
if (n.forEach(({ start: e, end: t }) => {
|
|
26
|
-
e !== r && o.add(e), t !== r && o.add(t);
|
|
27
|
-
}), o.forEach((t) => {
|
|
28
|
-
let n = e.node(t);
|
|
29
|
-
typeof n?.x == "number" && typeof n?.y == "number" && a.push(n);
|
|
30
|
-
}), a.length === 0 && n.forEach(({ edge: e }) => {
|
|
31
|
-
(e.points ?? []).forEach((e) => {
|
|
32
|
-
typeof e?.x == "number" && typeof e?.y == "number" && a.push(e);
|
|
33
|
-
});
|
|
34
|
-
}), a.length === 0) return T(i);
|
|
35
|
-
let s = a.reduce((e, t) => ({
|
|
36
|
-
x: e.x + t.x / a.length,
|
|
37
|
-
y: e.y + t.y / a.length
|
|
38
|
-
}), {
|
|
39
|
-
x: 0,
|
|
40
|
-
y: 0
|
|
41
|
-
}), c = s.x - t.x, l = s.y - t.y;
|
|
42
|
-
return Math.abs(c) > Math.abs(l) ? c > 0 ? "right" : "left" : Math.abs(l) > 0 ? l > 0 ? "bottom" : "top" : T(i);
|
|
43
|
-
}, "getSelfLoopSide"), O = /* @__PURE__ */ e((e, t = "top", n = 0, r = 0) => {
|
|
44
|
-
let i = e.x, a = e.y - n, o = e.width / 2, s = e.height / 2, c = Math.max(36, Math.min(100, e.width * .8)), l = w(Math.max(r, e.width * .35), 36, c), u = w(Math.min(e.width, e.height) * .45, 24, 48);
|
|
45
|
-
switch (t) {
|
|
46
|
-
case "bottom": {
|
|
47
|
-
let e = a + s;
|
|
48
|
-
return [
|
|
49
|
-
{
|
|
50
|
-
x: i - l / 2,
|
|
51
|
-
y: e
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
x: i - l / 2,
|
|
55
|
-
y: e + u
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
x: i + l / 2,
|
|
59
|
-
y: e + u
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
x: i + l / 2,
|
|
63
|
-
y: e
|
|
64
|
-
}
|
|
65
|
-
];
|
|
66
|
-
}
|
|
67
|
-
case "right": {
|
|
68
|
-
let e = i + o;
|
|
69
|
-
return [
|
|
70
|
-
{
|
|
71
|
-
x: e,
|
|
72
|
-
y: a - l / 2
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
x: e + u,
|
|
76
|
-
y: a - l / 2
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
x: e + u,
|
|
80
|
-
y: a + l / 2
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
x: e,
|
|
84
|
-
y: a + l / 2
|
|
85
|
-
}
|
|
86
|
-
];
|
|
87
|
-
}
|
|
88
|
-
case "left": {
|
|
89
|
-
let e = i - o;
|
|
90
|
-
return [
|
|
91
|
-
{
|
|
92
|
-
x: e,
|
|
93
|
-
y: a - l / 2
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
x: e - u,
|
|
97
|
-
y: a - l / 2
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
x: e - u,
|
|
101
|
-
y: a + l / 2
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
x: e,
|
|
105
|
-
y: a + l / 2
|
|
106
|
-
}
|
|
107
|
-
];
|
|
108
|
-
}
|
|
109
|
-
default: {
|
|
110
|
-
let e = a - s;
|
|
111
|
-
return [
|
|
112
|
-
{
|
|
113
|
-
x: i - l / 2,
|
|
114
|
-
y: e
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
x: i - l / 2,
|
|
118
|
-
y: e - u
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
x: i + l / 2,
|
|
122
|
-
y: e - u
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
x: i + l / 2,
|
|
126
|
-
y: e
|
|
127
|
-
}
|
|
128
|
-
];
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
}, "getSelfLoopPoints"), k = /* @__PURE__ */ e((e, t, n = "top", r = 0, i = {}) => {
|
|
132
|
-
let a = e.x, o = e.y - r, s = i.width ?? 0, c = i.height ?? 0;
|
|
133
|
-
switch (n) {
|
|
134
|
-
case "bottom": return {
|
|
135
|
-
x: a,
|
|
136
|
-
y: Math.max(...t.map((e) => e.y)) + c / 2 + 4
|
|
137
|
-
};
|
|
138
|
-
case "right": return {
|
|
139
|
-
x: Math.max(...t.map((e) => e.x)) + s / 2 + 4,
|
|
140
|
-
y: o
|
|
141
|
-
};
|
|
142
|
-
case "left": return {
|
|
143
|
-
x: Math.min(...t.map((e) => e.x)) - s / 2 - 4,
|
|
144
|
-
y: o
|
|
145
|
-
};
|
|
146
|
-
default: return {
|
|
147
|
-
x: a,
|
|
148
|
-
y: Math.min(...t.map((e) => e.y)) - c / 2 - 4
|
|
149
|
-
};
|
|
150
|
-
}
|
|
151
|
-
}, "getSelfLoopLabelPosition"), A = /* @__PURE__ */ e((e, t = 0, { mergeSelfLoops: n = !0 } = {}) => {
|
|
152
|
-
let r = /* @__PURE__ */ new Map(), i = [], a = e.graph()?.rankdir;
|
|
153
|
-
return e.edges().forEach((t) => {
|
|
154
|
-
let a = e.edge(t);
|
|
155
|
-
if (n && a.selfLoop) {
|
|
156
|
-
let e = a.selfLoop.id;
|
|
157
|
-
r.has(e) || r.set(e, []), r.get(e).push({
|
|
158
|
-
edge: a,
|
|
159
|
-
start: t.v,
|
|
160
|
-
end: t.w
|
|
161
|
-
});
|
|
162
|
-
} else i.push({
|
|
163
|
-
edge: a,
|
|
164
|
-
start: t.v,
|
|
165
|
-
end: t.w
|
|
166
|
-
});
|
|
167
|
-
}), r.forEach((n) => {
|
|
168
|
-
if (n.length !== 3) {
|
|
169
|
-
n.forEach((e) => i.push(e));
|
|
170
|
-
return;
|
|
171
|
-
}
|
|
172
|
-
n.sort((e, t) => e.edge.selfLoop.order - t.edge.selfLoop.order);
|
|
173
|
-
let [r, o, s] = n, c = r.edge.originalEdge ?? o.edge.originalEdge ?? s.edge.originalEdge ?? o.edge, l = e.node(c.start);
|
|
174
|
-
if (!l) {
|
|
175
|
-
n.forEach((e) => i.push(e));
|
|
176
|
-
return;
|
|
177
|
-
}
|
|
178
|
-
let u = {
|
|
179
|
-
width: o.edge.width,
|
|
180
|
-
height: o.edge.height
|
|
181
|
-
}, d = D(e, l, n, c.start, a), f = O(l, d, t, u.width ?? 0), p = k(l, f, d, t, u), m = {
|
|
182
|
-
...o.edge,
|
|
183
|
-
...c,
|
|
184
|
-
id: c.id,
|
|
185
|
-
points: f,
|
|
186
|
-
start: c.start,
|
|
187
|
-
end: c.end,
|
|
188
|
-
x: p.x,
|
|
189
|
-
y: p.y,
|
|
190
|
-
width: u.width,
|
|
191
|
-
height: u.height,
|
|
192
|
-
labelStyle: o.edge.labelStyle,
|
|
193
|
-
fromCluster: r.edge.fromCluster ?? o.edge.fromCluster ?? s.edge.fromCluster,
|
|
194
|
-
toCluster: r.edge.toCluster ?? o.edge.toCluster ?? s.edge.toCluster
|
|
195
|
-
};
|
|
196
|
-
delete m.selfLoop, delete m.originalEdge, i.push({
|
|
197
|
-
edge: m,
|
|
198
|
-
start: m.start,
|
|
199
|
-
end: m.end
|
|
200
|
-
});
|
|
201
|
-
}), i;
|
|
202
|
-
}, "getEdgesToRender"), j = /* @__PURE__ */ e(async (n, i, c, d, g, _) => {
|
|
203
|
-
t.warn("Graph in recursive render:XAX", l(i), g);
|
|
204
|
-
let y = i.graph().rankdir;
|
|
205
|
-
t.trace("Dir in recursive render - dir:", y);
|
|
206
|
-
let C = n.insert("g").attr("class", "root");
|
|
207
|
-
i.nodes() ? t.info("Recursive render XXX", i.nodes()) : t.info("No nodes found for", i), i.edges().length > 0 && t.info("Recursive edges", i.edge(i.edges()[0]));
|
|
208
|
-
let w = C.insert("g").attr("class", "clusters"), T = C.insert("g").attr("class", "edgePaths"), D = C.insert("g").attr("class", "edgeLabels"), O = C.insert("g").attr("class", "nodes"), k = E(c);
|
|
209
|
-
await Promise.all(i.nodes().map(async function(e) {
|
|
210
|
-
let n = i.node(e);
|
|
211
|
-
if (g !== void 0) {
|
|
212
|
-
let n = JSON.parse(JSON.stringify(g.clusterData));
|
|
213
|
-
t.trace("Setting data for parent cluster XXX\n Node.id = ", e, "\n data=", n.height, "\nParent cluster", g.height), i.setNode(g.id, n), i.parent(e) || (t.trace("Setting parent", e, g.id), i.setParent(e, g.id, n));
|
|
214
|
-
}
|
|
215
|
-
if (t.info("(Insert) Node XXX" + e + ": " + JSON.stringify(i.node(e))), n?.clusterNode) {
|
|
216
|
-
t.info("Cluster identified XBX", e, n.width, i.node(e));
|
|
217
|
-
let { ranksep: r, nodesep: a } = i.graph();
|
|
218
|
-
n.graph.setGraph({
|
|
219
|
-
...n.graph.graph(),
|
|
220
|
-
ranksep: r + 25,
|
|
221
|
-
nodesep: a
|
|
222
|
-
});
|
|
223
|
-
let o = await j(O, n.graph, c, d, i.node(e), _), s = o.elem;
|
|
224
|
-
v(n, s), n.diff = o.diff || 0, t.info("New compound node after recursive render XAX", e, "width", n.width, "height", n.height), h(s, n);
|
|
225
|
-
} else i.children(e).length > 0 ? (t.trace("Cluster - the non recursive path XBX", e, n.id, n, n.width, "Graph:", i), t.trace(s(n.id, i)), u.set(n.id, {
|
|
226
|
-
id: s(n.id, i),
|
|
227
|
-
node: n
|
|
228
|
-
})) : (t.trace("Node - the non recursive path XAX", e, O, i.node(e), y), await f(O, i.node(e), {
|
|
229
|
-
config: _,
|
|
230
|
-
dir: y
|
|
231
|
-
}));
|
|
232
|
-
})), await (/* @__PURE__ */ e(async () => {
|
|
233
|
-
let e = i.edges().map(async function(e) {
|
|
234
|
-
let n = i.edge(e.v, e.w, e.name);
|
|
235
|
-
if (t.info("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(e)), t.info("Edge " + e.v + " -> " + e.w + ": ", e, " ", JSON.stringify(i.edge(e))), t.info("Fix", u, "ids:", e.v, e.w, "Translating: ", u.get(e.v), u.get(e.w)), k && n.selfLoop) {
|
|
236
|
-
if (n.selfLoop.order !== 1) return;
|
|
237
|
-
let e = n.id;
|
|
238
|
-
n.id = n.selfLoop.id, await b(D, n), n.id = e;
|
|
239
|
-
return;
|
|
240
|
-
}
|
|
241
|
-
await b(D, n);
|
|
242
|
-
});
|
|
243
|
-
await Promise.all(e);
|
|
244
|
-
}, "processEdges"))(), t.info("Graph before layout:", JSON.stringify(l(i))), t.info("############################################# XXX"), t.info("### Layout ### XXX"), t.info("############################################# XXX"), a(i), t.info("Graph after layout:", JSON.stringify(l(i)));
|
|
245
|
-
let M = 0, { subGraphTitleTotalMargin: N } = r(_);
|
|
246
|
-
await Promise.all(o(i).map(async function(e) {
|
|
247
|
-
let n = i.node(e);
|
|
248
|
-
if (t.info("Position XBX => " + e + ": (" + n.x, "," + n.y, ") width: ", n.width, " height: ", n.height), n?.clusterNode) n.y += N, t.info("A tainted cluster node XBX1", e, n.id, n.width, n.height, n.x, n.y, i.parent(e)), u.get(n.id).node = n, p(n);
|
|
249
|
-
else if (i.children(e).length > 0) {
|
|
250
|
-
t.info("A pure cluster node XBX1", e, n.id, n.x, n.y, n.width, n.height, i.parent(e)), n.height += N, i.node(n.parentId);
|
|
251
|
-
let r = n?.padding / 2 || 0, a = n?.labelBBox?.height || 0, o = a - r || 0;
|
|
252
|
-
t.debug("OffsetY", o, "labelHeight", a, "halfPadding", r), await m(w, n), u.get(n.id).node = n;
|
|
253
|
-
} else {
|
|
254
|
-
let e = i.node(n.parentId);
|
|
255
|
-
n.y += N / 2, t.info("A regular node XBX1 - using the padding", n.id, "parent", n.parentId, n.width, n.height, n.x, n.y, "offsetY", n.offsetY, "parent", e, e?.offsetY, n), p(n);
|
|
256
|
-
}
|
|
257
|
-
}));
|
|
258
|
-
let P = N / 2;
|
|
259
|
-
return A(i, P, { mergeSelfLoops: k }).forEach(function({ edge: e, start: n, end: r }) {
|
|
260
|
-
t.info("Edge " + n + " -> " + r + ": " + JSON.stringify(e), e), e.points.forEach((e) => e.y += P);
|
|
261
|
-
let a = i.node(n), o = i.node(r), s = S(T, e, u, c, a, o, d);
|
|
262
|
-
x(e, s);
|
|
263
|
-
}), i.nodes().forEach(function(e) {
|
|
264
|
-
let n = i.node(e);
|
|
265
|
-
t.info(e, n.type, n.diff), n.isGroup && (M = n.diff);
|
|
266
|
-
}), t.warn("Returning from recursive render XAX", C, M), {
|
|
267
|
-
elem: C,
|
|
268
|
-
diff: M
|
|
269
|
-
};
|
|
270
|
-
}, "recursiveRender"), M = /* @__PURE__ */ e(async (e, r) => {
|
|
271
|
-
let a = new i({
|
|
272
|
-
multigraph: !0,
|
|
273
|
-
compound: !0
|
|
274
|
-
}).setGraph({
|
|
275
|
-
rankdir: e.direction,
|
|
276
|
-
nodesep: e.config?.nodeSpacing || e.config?.flowchart?.nodeSpacing || e.nodeSpacing,
|
|
277
|
-
ranksep: e.config?.rankSpacing || e.config?.flowchart?.rankSpacing || e.rankSpacing,
|
|
278
|
-
marginx: 8,
|
|
279
|
-
marginy: 8
|
|
280
|
-
}).setDefaultEdgeLabel(function() {
|
|
281
|
-
return {};
|
|
282
|
-
}), o = r.select("g");
|
|
283
|
-
y(o, e.markers, e.type, e.diagramId), g(), C(), _(), c(), e.nodes.forEach((e) => {
|
|
284
|
-
a.setNode(e.id, { ...e }), e.parentId && a.setParent(e.id, e.parentId);
|
|
285
|
-
}), t.debug("Edges:", e.edges), e.edges.forEach((e) => {
|
|
286
|
-
if (e.start === e.end) {
|
|
287
|
-
let t = e.start, n = t + "---" + t + "---1", r = t + "---" + t + "---2", i = a.node(t);
|
|
288
|
-
a.setNode(n, {
|
|
289
|
-
domId: n,
|
|
290
|
-
id: n,
|
|
291
|
-
parentId: i.parentId,
|
|
292
|
-
labelStyle: "",
|
|
293
|
-
label: "",
|
|
294
|
-
padding: 0,
|
|
295
|
-
shape: "labelRect",
|
|
296
|
-
style: "",
|
|
297
|
-
width: 10,
|
|
298
|
-
height: 10
|
|
299
|
-
}), a.setParent(n, i.parentId), a.setNode(r, {
|
|
300
|
-
domId: r,
|
|
301
|
-
id: r,
|
|
302
|
-
parentId: i.parentId,
|
|
303
|
-
labelStyle: "",
|
|
304
|
-
padding: 0,
|
|
305
|
-
shape: "labelRect",
|
|
306
|
-
label: "",
|
|
307
|
-
style: "",
|
|
308
|
-
width: 10,
|
|
309
|
-
height: 10
|
|
310
|
-
}), a.setParent(r, i.parentId);
|
|
311
|
-
let o = structuredClone(e), s = structuredClone(e), c = structuredClone(e), l = structuredClone(e);
|
|
312
|
-
s.originalEdge = o, s.selfLoop = {
|
|
313
|
-
id: o.id,
|
|
314
|
-
order: 0
|
|
315
|
-
}, c.originalEdge = o, c.selfLoop = {
|
|
316
|
-
id: o.id,
|
|
317
|
-
order: 1
|
|
318
|
-
}, l.originalEdge = o, l.selfLoop = {
|
|
319
|
-
id: o.id,
|
|
320
|
-
order: 2
|
|
321
|
-
}, s.label = "", s.arrowTypeEnd = "none", s.endLabelLeft = "", s.endLabelRight = "", s.startLabelLeft = "", s.id = t + "-cyclic-special-1", c.startLabelRight = "", c.startLabelLeft = "", c.endLabelLeft = "", c.endLabelRight = "", c.arrowTypeStart = "none", c.arrowTypeEnd = "none", c.id = t + "-cyclic-special-mid", l.label = "", l.startLabelRight = "", l.startLabelLeft = "", l.arrowTypeStart = "none", i.isGroup && (s.fromCluster = t, l.toCluster = t), l.id = t + "-cyclic-special-2", l.arrowTypeStart = "none", a.setEdge(t, n, s, t + "-cyclic-special-0"), a.setEdge(n, r, c, t + "-cyclic-special-1"), a.setEdge(r, t, l, t + "-cyclic-special-2");
|
|
322
|
-
} else a.setEdge(e.start, e.end, { ...e }, e.id);
|
|
323
|
-
}), t.warn("Graph at first:", JSON.stringify(l(a))), d(a), t.warn("Graph after XAX:", JSON.stringify(l(a)));
|
|
324
|
-
let s = n();
|
|
325
|
-
await j(o, a, e.type, e.diagramId, void 0, s);
|
|
326
|
-
}, "render");
|
|
327
|
-
//#endregion
|
|
328
|
-
export { A as getEdgesToRender, M as render };
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
const e=require("./chunk-Y2CYZVJY-CnmLqFtv.cjs"),t=require("./src-D9o9TOtH.cjs"),n=require("./chunk-I66GZJ75-D8wVRUgw.cjs");require("./chunk-NSK5VX7P-BiC_63US.cjs"),require("./chunk-4I5QYGJK-CBqJO_mi.cjs"),require("./chunk-WRU74C26-Cr4HTCc1.cjs"),require("./chunk-7BUUIJ7U-MzS1pW_S.cjs");const r=require("./chunk-UBXNYLIW-BURVNZm2.cjs"),i=require("./graphlib-BaETKKSa.cjs"),a=require("./dagre-DarAkhy1.cjs"),o=require("./chunk-RYQCIY6F-Lf2oVMMh.cjs");require("./chunk-W5SLKNZC-BLFqePZ1.cjs");const s=require("./chunk-QR6OTTB3-BSxbyKp_.cjs"),c=require("./chunk-7Z6QIM7H-CUGcycR0.cjs");var l=e.n((e,t,n)=>Math.max(t,Math.min(n,e)),`clamp`),u=e.n((e=`TB`)=>{switch(e){case`BT`:return`bottom`;case`LR`:return`right`;case`RL`:return`left`;default:return`top`}},`getDefaultSelfLoopSide`),d=e.n(e=>e===`flowchart`||e===`flowchart-v2`||e===`stateDiagram`,`shouldMergeSelfLoopSegments`),f=e.n((e,t,n,r,i)=>{let a=[],o=new Set;if(n.forEach(({start:e,end:t})=>{e!==r&&o.add(e),t!==r&&o.add(t)}),o.forEach(t=>{let n=e.node(t);typeof n?.x==`number`&&typeof n?.y==`number`&&a.push(n)}),a.length===0&&n.forEach(({edge:e})=>{(e.points??[]).forEach(e=>{typeof e?.x==`number`&&typeof e?.y==`number`&&a.push(e)})}),a.length===0)return u(i);let s=a.reduce((e,t)=>({x:e.x+t.x/a.length,y:e.y+t.y/a.length}),{x:0,y:0}),c=s.x-t.x,l=s.y-t.y;return Math.abs(c)>Math.abs(l)?c>0?`right`:`left`:Math.abs(l)>0?l>0?`bottom`:`top`:u(i)},`getSelfLoopSide`),p=e.n((e,t=`top`,n=0,r=0)=>{let i=e.x,a=e.y-n,o=e.width/2,s=e.height/2,c=Math.max(36,Math.min(100,e.width*.8)),u=l(Math.max(r,e.width*.35),36,c),d=l(Math.min(e.width,e.height)*.45,24,48);switch(t){case`bottom`:{let e=a+s;return[{x:i-u/2,y:e},{x:i-u/2,y:e+d},{x:i+u/2,y:e+d},{x:i+u/2,y:e}]}case`right`:{let e=i+o;return[{x:e,y:a-u/2},{x:e+d,y:a-u/2},{x:e+d,y:a+u/2},{x:e,y:a+u/2}]}case`left`:{let e=i-o;return[{x:e,y:a-u/2},{x:e-d,y:a-u/2},{x:e-d,y:a+u/2},{x:e,y:a+u/2}]}default:{let e=a-s;return[{x:i-u/2,y:e},{x:i-u/2,y:e-d},{x:i+u/2,y:e-d},{x:i+u/2,y:e}]}}},`getSelfLoopPoints`),m=e.n((e,t,n=`top`,r=0,i={})=>{let a=e.x,o=e.y-r,s=i.width??0,c=i.height??0;switch(n){case`bottom`:return{x:a,y:Math.max(...t.map(e=>e.y))+c/2+4};case`right`:return{x:Math.max(...t.map(e=>e.x))+s/2+4,y:o};case`left`:return{x:Math.min(...t.map(e=>e.x))-s/2-4,y:o};default:return{x:a,y:Math.min(...t.map(e=>e.y))-c/2-4}}},`getSelfLoopLabelPosition`),h=e.n((e,t=0,{mergeSelfLoops:n=!0}={})=>{let r=new Map,i=[],a=e.graph()?.rankdir;return e.edges().forEach(t=>{let a=e.edge(t);if(n&&a.selfLoop){let e=a.selfLoop.id;r.has(e)||r.set(e,[]),r.get(e).push({edge:a,start:t.v,end:t.w})}else i.push({edge:a,start:t.v,end:t.w})}),r.forEach(n=>{if(n.length!==3){n.forEach(e=>i.push(e));return}n.sort((e,t)=>e.edge.selfLoop.order-t.edge.selfLoop.order);let[r,o,s]=n,c=r.edge.originalEdge??o.edge.originalEdge??s.edge.originalEdge??o.edge,l=e.node(c.start);if(!l){n.forEach(e=>i.push(e));return}let u={width:o.edge.width,height:o.edge.height},d=f(e,l,n,c.start,a),h=p(l,d,t,u.width??0),g=m(l,h,d,t,u),_={...o.edge,...c,id:c.id,points:h,start:c.start,end:c.end,x:g.x,y:g.y,width:u.width,height:u.height,labelStyle:o.edge.labelStyle,fromCluster:r.edge.fromCluster??o.edge.fromCluster??s.edge.fromCluster,toCluster:r.edge.toCluster??o.edge.toCluster??s.edge.toCluster};delete _.selfLoop,delete _.originalEdge,i.push({edge:_,start:_.start,end:_.end})}),i},`getEdgesToRender`),g=e.n(async(n,i,l,u,f,p)=>{t.m.warn(`Graph in recursive render:XAX`,o.o(i),f);let m=i.graph().rankdir;t.m.trace(`Dir in recursive render - dir:`,m);let _=n.insert(`g`).attr(`class`,`root`);i.nodes()?t.m.info(`Recursive render XXX`,i.nodes()):t.m.info(`No nodes found for`,i),i.edges().length>0&&t.m.info(`Recursive edges`,i.edge(i.edges()[0]));let v=_.insert(`g`).attr(`class`,`clusters`),y=_.insert(`g`).attr(`class`,`edgePaths`),b=_.insert(`g`).attr(`class`,`edgeLabels`),x=_.insert(`g`).attr(`class`,`nodes`),S=d(l);await Promise.all(i.nodes().map(async function(e){let n=i.node(e);if(f!==void 0){let n=JSON.parse(JSON.stringify(f.clusterData));t.m.trace(`Setting data for parent cluster XXX
|
|
2
|
-
Node.id = `,e,`
|
|
3
|
-
data=`,n.height,`
|
|
4
|
-
Parent cluster`,f.height),i.setNode(f.id,n),i.parent(e)||(t.m.trace(`Setting parent`,e,f.id),i.setParent(e,f.id,n))}if(t.m.info(`(Insert) Node XXX`+e+`: `+JSON.stringify(i.node(e))),n?.clusterNode){t.m.info(`Cluster identified XBX`,e,n.width,i.node(e));let{ranksep:r,nodesep:a}=i.graph();n.graph.setGraph({...n.graph.graph(),ranksep:r+25,nodesep:a});let o=await g(x,n.graph,l,u,i.node(e),p),c=o.elem;s.u(n,c),n.diff=o.diff||0,t.m.info(`New compound node after recursive render XAX`,e,`width`,n.width,`height`,n.height),s.l(c,n)}else i.children(e).length>0?(t.m.trace(`Cluster - the non recursive path XBX`,e,n.id,n,n.width,`Graph:`,i),t.m.trace(o.i(n.id,i)),o.r.set(n.id,{id:o.i(n.id,i),node:n})):(t.m.trace(`Node - the non recursive path XAX`,e,x,i.node(e),m),await s.a(x,i.node(e),{config:p,dir:m}))})),await e.n(async()=>{let e=i.edges().map(async function(e){let n=i.edge(e.v,e.w,e.name);if(t.m.info(`Edge `+e.v+` -> `+e.w+`: `+JSON.stringify(e)),t.m.info(`Edge `+e.v+` -> `+e.w+`: `,e,` `,JSON.stringify(i.edge(e))),t.m.info(`Fix`,o.r,`ids:`,e.v,e.w,`Translating: `,o.r.get(e.v),o.r.get(e.w)),S&&n.selfLoop){if(n.selfLoop.order!==1)return;let e=n.id;n.id=n.selfLoop.id,await c.i(b,n),n.id=e;return}await c.i(b,n)});await Promise.all(e)},`processEdges`)(),t.m.info(`Graph before layout:`,JSON.stringify(o.o(i))),t.m.info(`############################################# XXX`),t.m.info(`### Layout ### XXX`),t.m.info(`############################################# XXX`),a.t(i),t.m.info(`Graph after layout:`,JSON.stringify(o.o(i)));let C=0,{subGraphTitleTotalMargin:w}=r.n(p);await Promise.all(o.a(i).map(async function(e){let n=i.node(e);if(t.m.info(`Position XBX => `+e+`: (`+n.x,`,`+n.y,`) width: `,n.width,` height: `,n.height),n?.clusterNode)n.y+=w,t.m.info(`A tainted cluster node XBX1`,e,n.id,n.width,n.height,n.x,n.y,i.parent(e)),o.r.get(n.id).node=n,s.c(n);else if(i.children(e).length>0){t.m.info(`A pure cluster node XBX1`,e,n.id,n.x,n.y,n.width,n.height,i.parent(e)),n.height+=w,i.node(n.parentId);let r=n?.padding/2||0,a=n?.labelBBox?.height||0,c=a-r||0;t.m.debug(`OffsetY`,c,`labelHeight`,a,`halfPadding`,r),await s.i(v,n),o.r.get(n.id).node=n}else{let e=i.node(n.parentId);n.y+=w/2,t.m.info(`A regular node XBX1 - using the padding`,n.id,`parent`,n.parentId,n.width,n.height,n.x,n.y,`offsetY`,n.offsetY,`parent`,e,e?.offsetY,n),s.c(n)}}));let T=w/2;return h(i,T,{mergeSelfLoops:S}).forEach(function({edge:e,start:n,end:r}){t.m.info(`Edge `+n+` -> `+r+`: `+JSON.stringify(e),e),e.points.forEach(e=>e.y+=T);let a=i.node(n),s=i.node(r),d=c.r(y,e,o.r,l,a,s,u);c.o(e,d)}),i.nodes().forEach(function(e){let n=i.node(e);t.m.info(e,n.type,n.diff),n.isGroup&&(C=n.diff)}),t.m.warn(`Returning from recursive render XAX`,_,C),{elem:_,diff:C}},`recursiveRender`),_=e.n(async(e,r)=>{let a=new i.t({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:e.config?.nodeSpacing||e.config?.flowchart?.nodeSpacing||e.nodeSpacing,ranksep:e.config?.rankSpacing||e.config?.flowchart?.rankSpacing||e.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),l=r.select(`g`);c.a(l,e.markers,e.type,e.diagramId),s.n(),c.t(),s.t(),o.n(),e.nodes.forEach(e=>{a.setNode(e.id,{...e}),e.parentId&&a.setParent(e.id,e.parentId)}),t.m.debug(`Edges:`,e.edges),e.edges.forEach(e=>{if(e.start===e.end){let t=e.start,n=t+`---`+t+`---1`,r=t+`---`+t+`---2`,i=a.node(t);a.setNode(n,{domId:n,id:n,parentId:i.parentId,labelStyle:``,label:``,padding:0,shape:`labelRect`,style:``,width:10,height:10}),a.setParent(n,i.parentId),a.setNode(r,{domId:r,id:r,parentId:i.parentId,labelStyle:``,padding:0,shape:`labelRect`,label:``,style:``,width:10,height:10}),a.setParent(r,i.parentId);let o=structuredClone(e),s=structuredClone(e),c=structuredClone(e),l=structuredClone(e);s.originalEdge=o,s.selfLoop={id:o.id,order:0},c.originalEdge=o,c.selfLoop={id:o.id,order:1},l.originalEdge=o,l.selfLoop={id:o.id,order:2},s.label=``,s.arrowTypeEnd=`none`,s.endLabelLeft=``,s.endLabelRight=``,s.startLabelLeft=``,s.id=t+`-cyclic-special-1`,c.startLabelRight=``,c.startLabelLeft=``,c.endLabelLeft=``,c.endLabelRight=``,c.arrowTypeStart=`none`,c.arrowTypeEnd=`none`,c.id=t+`-cyclic-special-mid`,l.label=``,l.startLabelRight=``,l.startLabelLeft=``,l.arrowTypeStart=`none`,i.isGroup&&(s.fromCluster=t,l.toCluster=t),l.id=t+`-cyclic-special-2`,l.arrowTypeStart=`none`,a.setEdge(t,n,s,t+`-cyclic-special-0`),a.setEdge(n,r,c,t+`-cyclic-special-1`),a.setEdge(r,t,l,t+`-cyclic-special-2`)}else a.setEdge(e.start,e.end,{...e},e.id)}),t.m.warn(`Graph at first:`,JSON.stringify(o.o(a))),o.t(a),t.m.warn(`Graph after XAX:`,JSON.stringify(o.o(a)));let u=n.x();await g(l,a,e.type,e.diagramId,void 0,u)},`render`);exports.getEdgesToRender=h,exports.render=_;
|