allyhub 0.21.0 → 0.22.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.
- package/dist/commands/export.js +1 -1
- package/dist/commands/index.js +1 -1
- package/dist/commands/run.js +2 -0
- package/dist/commands.json +1 -1
- package/dist/main.js +4 -4
- package/dist/node_modules/@allyhub/3d-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/audio/package.json +1 -1
- package/dist/node_modules/@allyhub/blocks/package.json +1 -1
- package/dist/node_modules/@allyhub/browser/package.json +1 -1
- package/dist/node_modules/@allyhub/build/dist/migrate.js +1 -1
- package/dist/node_modules/@allyhub/build/dist/prepare.js +3 -3
- package/dist/node_modules/@allyhub/build/dist/project-root.js +1 -1
- package/dist/node_modules/@allyhub/build/dist/work.js +3 -3
- package/dist/node_modules/@allyhub/build/package.json +1 -1
- package/dist/node_modules/@allyhub/canvas-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/canvas-model/package.json +1 -1
- package/dist/node_modules/@allyhub/chart/package.json +1 -1
- package/dist/node_modules/@allyhub/check/package.json +1 -1
- package/dist/node_modules/@allyhub/cloud/dist/client.js +1 -1
- package/dist/node_modules/@allyhub/cloud/package.json +1 -1
- package/dist/node_modules/@allyhub/components/package.json +1 -1
- package/dist/node_modules/@allyhub/dev-server/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/dev-server/dist/record.js +2 -1
- package/dist/node_modules/@allyhub/dev-server/dist/validate.js +2 -2
- package/dist/node_modules/@allyhub/dev-server/package.json +1 -1
- package/dist/node_modules/@allyhub/diagnostics/package.json +1 -1
- package/dist/node_modules/@allyhub/doc/package.json +1 -1
- package/dist/node_modules/@allyhub/doc-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/doc-print/package.json +1 -1
- package/dist/node_modules/@allyhub/export/package.json +1 -1
- package/dist/node_modules/@allyhub/extension-api/package.json +1 -1
- package/dist/node_modules/@allyhub/extension-host/package.json +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/deck-code.d.ts +3 -3
- package/dist/node_modules/@allyhub/formats/dist/data/sheet.d.ts +151 -151
- package/dist/node_modules/@allyhub/formats/dist/data/slides.d.ts +173 -173
- package/dist/node_modules/@allyhub/formats/dist/data/work.d.ts +1 -2
- package/dist/node_modules/@allyhub/formats/dist/data/work.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/index.d.ts +1 -1
- package/dist/node_modules/@allyhub/formats/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/layout.d.ts +2 -0
- package/dist/node_modules/@allyhub/formats/dist/layout.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/schemas.d.ts +106 -101
- package/dist/node_modules/@allyhub/formats/dist/schemas.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/tolerant.d.ts +26 -1
- package/dist/node_modules/@allyhub/formats/dist/tolerant.js +1 -1
- package/dist/node_modules/@allyhub/formats/package.json +1 -1
- package/dist/node_modules/@allyhub/html-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/i18n/package.json +1 -1
- package/dist/node_modules/@allyhub/image-draw/package.json +1 -1
- package/dist/node_modules/@allyhub/image-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/image-measure/package.json +1 -1
- package/dist/node_modules/@allyhub/image-psd/package.json +1 -1
- package/dist/node_modules/@allyhub/image-render/package.json +1 -1
- package/dist/node_modules/@allyhub/image-runtime/package.json +1 -1
- package/dist/node_modules/@allyhub/image-sdk/package.json +1 -1
- package/dist/node_modules/@allyhub/jobs/package.json +1 -1
- package/dist/node_modules/@allyhub/linkedin-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/linkedin-model/package.json +1 -1
- package/dist/node_modules/@allyhub/linkedin-view/package.json +1 -1
- package/dist/node_modules/@allyhub/measure/package.json +1 -1
- package/dist/node_modules/@allyhub/media/package.json +1 -1
- package/dist/node_modules/@allyhub/media-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/model/package.json +1 -1
- package/dist/node_modules/@allyhub/office-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/ooxml/package.json +1 -1
- package/dist/node_modules/@allyhub/piece/package.json +1 -1
- package/dist/node_modules/@allyhub/project/package.json +1 -1
- package/dist/node_modules/@allyhub/protocol/package.json +1 -1
- package/dist/node_modules/@allyhub/registry/package.json +1 -1
- package/dist/node_modules/@allyhub/render/package.json +1 -1
- package/dist/node_modules/@allyhub/report-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/runtime/package.json +1 -1
- package/dist/node_modules/@allyhub/runtimes/package.json +1 -1
- package/dist/node_modules/@allyhub/scaffold/dist/index.js +6 -6
- package/dist/node_modules/@allyhub/scaffold/package.json +1 -1
- package/dist/node_modules/@allyhub/scenery/package.json +1 -1
- package/dist/node_modules/@allyhub/scenery-host/package.json +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/file.js +2 -2
- package/dist/node_modules/@allyhub/sheet/package.json +1 -1
- package/dist/node_modules/@allyhub/sheet-extension/dist/build.js +1 -1
- package/dist/node_modules/@allyhub/sheet-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/file.js +3 -3
- package/dist/node_modules/@allyhub/slides-core/package.json +1 -1
- package/dist/node_modules/@allyhub/slides-extension/dist/build.js +2 -2
- package/dist/node_modules/@allyhub/slides-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/package.json +1 -1
- package/dist/node_modules/@allyhub/slides-runtime/package.json +1 -1
- package/dist/node_modules/@allyhub/stage/package.json +1 -1
- package/dist/node_modules/@allyhub/stage-page/package.json +1 -1
- package/dist/node_modules/@allyhub/stage-runtime/package.json +1 -1
- package/dist/node_modules/@allyhub/telemetry/package.json +1 -1
- package/dist/node_modules/@allyhub/text-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/video-core/package.json +1 -1
- package/dist/node_modules/@allyhub/video-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/video-measure/package.json +1 -1
- package/dist/node_modules/@allyhub/video-sdk/package.json +1 -1
- package/dist/node_modules/@allyhub/website/package.json +1 -1
- package/dist/node_modules/@allyhub/website-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/x-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/x-model/package.json +1 -1
- package/dist/node_modules/@allyhub/x-view/package.json +1 -1
- package/dist/package.json +15 -15
- package/dist/run-register.js +2 -0
- package/dist/works.js +1 -1
- package/editor-web/assets/{abnfDiagram-WEYOIA3C-B4tvwU6C.js → abnfDiagram-WEYOIA3C-D6qI3rai.js} +1 -1
- package/editor-web/assets/{architecture-WOLXFQ4H-V2fA0vY2.js → architecture-WOLXFQ4H-B3V6ggq8.js} +1 -1
- package/editor-web/assets/{architectureDiagram-ZHVYKT53-B6B7XN0M.js → architectureDiagram-ZHVYKT53-IauNyxXn.js} +1 -1
- package/editor-web/assets/{article-DW4eD_8K.js → article-BHjKp5We.js} +1 -1
- package/editor-web/assets/{article-Dm2dIEwc.js → article-BlNKv1Cn.js} +1 -1
- package/editor-web/assets/{blockDiagram-RJAE7QA3-BizcUGOM.js → blockDiagram-RJAE7QA3-yXhlfxbH.js} +1 -1
- package/editor-web/assets/{c4Diagram-XDPPPE54-CBHS0dQ0.js → c4Diagram-XDPPPE54-B-anrhvt.js} +1 -1
- package/editor-web/assets/{calc-worker-Cr4a0xmt.js → calc-worker-BpAgQE9E.js} +3 -3
- package/editor-web/assets/channel-Bhb-_8v6.js +1 -0
- package/editor-web/assets/{chip-BdQRH3FL.js → chip-pNQlYa2W.js} +1 -1
- package/editor-web/assets/{chunk-2E7WHVMD-CMPBck_Q.js → chunk-2E7WHVMD-QPOni4XB.js} +1 -1
- package/editor-web/assets/{chunk-4EMNKR2T-Df22Adpt.js → chunk-4EMNKR2T-DG1FCRRI.js} +1 -1
- package/editor-web/assets/{chunk-55XCU76K-CYrZ6_Q7.js → chunk-55XCU76K-mKuMXpnC.js} +1 -1
- package/editor-web/assets/{chunk-7S6XSTFO-BfdG9NNW.js → chunk-7S6XSTFO-CgZAazgt.js} +1 -1
- package/editor-web/assets/{chunk-AQDTSKZB-BCzZMoTJ.js → chunk-AQDTSKZB-BRU84phF.js} +1 -1
- package/editor-web/assets/{chunk-DSNLSHJZ-DT0xT8Wf.js → chunk-DSNLSHJZ-zku9oeG3.js} +1 -1
- package/editor-web/assets/{chunk-HAGFOTED-Bg3-EotU.js → chunk-HAGFOTED-CaUkBv_0.js} +1 -1
- package/editor-web/assets/{chunk-HNE4Q36P-BrSym24V.js → chunk-HNE4Q36P-BQz4ZCJf.js} +1 -1
- package/editor-web/assets/{chunk-NQOKRVIF-CMxgkJWF.js → chunk-NQOKRVIF-CHVBEDkg.js} +1 -1
- package/editor-web/assets/{chunk-UHW7PFBP-DWEwoyPy.js → chunk-UHW7PFBP-DrYeJo1e.js} +1 -1
- package/editor-web/assets/{chunk-VQ5W62QI-eTFh5_T9.js → chunk-VQ5W62QI-D8ToVCUe.js} +1 -1
- package/editor-web/assets/{chunk-WQQL4CDK-4PTupr9T.js → chunk-WQQL4CDK-DZ0tyi9F.js} +1 -1
- package/editor-web/assets/{chunk-YZO67HFG-D5XAAFWm.js → chunk-YZO67HFG-BLe7PXER.js} +1 -1
- package/editor-web/assets/{chunk-ZAUX2LTX-CPsdaisO.js → chunk-ZAUX2LTX-ByaeSIre.js} +1 -1
- package/editor-web/assets/{chunk-ZCHMQSOR-ClnuUyfy.js → chunk-ZCHMQSOR-DdMJr_t5.js} +1 -1
- package/editor-web/assets/{classDiagram-v2-4MYWR3UA-CM21waNF.js → classDiagram-v2-4MYWR3UA-DDpq7fFC.js} +1 -1
- package/editor-web/assets/{color-picker-BmKFn2ww.js → color-picker-CDeICDN5.js} +1 -1
- package/editor-web/assets/{cynefin-EF2NZ3EQ-CJUHTgee.js → cynefin-EF2NZ3EQ-CMivy2fr.js} +1 -1
- package/editor-web/assets/{cynefinDiagram-WF24UDRP-C9RIfuIV.js → cynefinDiagram-WF24UDRP-GtxT_9wW.js} +1 -1
- package/editor-web/assets/{dagre-NK4GIZVX-g-01KdpO.js → dagre-NK4GIZVX-Bn1O2Hjl.js} +1 -1
- package/editor-web/assets/deck-Cohd-G5m.js +1 -0
- package/editor-web/assets/{diagram-CBK3MWTC-CbOjWUu-.js → diagram-CBK3MWTC-W715PWZw.js} +1 -1
- package/editor-web/assets/{diagram-I5XIIV2D-C6psNS8J.js → diagram-I5XIIV2D-BKObZPn2.js} +1 -1
- package/editor-web/assets/{diagram-ODIL2UCW-C9PUE46P.js → diagram-ODIL2UCW-UtQxEPoW.js} +1 -1
- package/editor-web/assets/{diagram-PFBEJUXE-vJ_pnB33.js → diagram-PFBEJUXE-CpLGEK-k.js} +1 -1
- package/editor-web/assets/{diagram-RJA3I4VV-FwYlEfJ-.js → diagram-RJA3I4VV-DGyMXoHb.js} +1 -1
- package/editor-web/assets/{diagram-TYUNFSNR-FKpIxeUc.js → diagram-TYUNFSNR-Dy_Ewr8V.js} +1 -1
- package/editor-web/assets/{dist-H0z_DXDz.js → dist-0I0Obj60.js} +14 -14
- package/editor-web/assets/{dist-DCI21ljp.js → dist-6ugUm4dS.js} +1 -1
- package/editor-web/assets/{dist-D2rGVz9C.js → dist-B0rUvCi2.js} +1 -1
- package/editor-web/assets/{dist-D07Kj8GR.js → dist-CKD_paj_.js} +1 -1
- package/editor-web/assets/{dist-BgKyM9U6.js → dist-CKUW5NzS.js} +1 -1
- package/editor-web/assets/{dist-DJvfQvM7.js → dist-Ca9Gsuu0.js} +1 -1
- package/editor-web/assets/{dist-BqijryYd.js → dist-Cc8v9lfc.js} +1 -1
- package/editor-web/assets/{dist-BaWFMuvr.js → dist-CynBNzYv.js} +1 -1
- package/editor-web/assets/{dist-CB-_0-X4.js → dist-D7M5YTq2.js} +1 -1
- package/editor-web/assets/{dist-ByguWp3a.js → dist-D9tsFc2N.js} +1 -1
- package/editor-web/assets/{dist-DH8oJJw9.js → dist-DNMKDcLg.js} +3 -3
- package/editor-web/assets/{dist-D3DwRF1k.js → dist-Doj7_HUI.js} +17 -17
- package/editor-web/assets/{dist-CtYjYJdv.js → dist-DptBQzJR.js} +1 -1
- package/editor-web/assets/{dist-BdmMT8fP.js → dist-DzKB210A.js} +1 -1
- package/editor-web/assets/{dist-Cg0Z26Kv.js → dist-H9rTuNhb.js} +4 -4
- package/editor-web/assets/{dist-DmCDcb2_.js → dist-RyGsFHE0.js} +1 -1
- package/editor-web/assets/{dist-BI_BaYhO.js → dist-oeSWr2LE.js} +4 -4
- package/editor-web/assets/dist-wD_hHJ8_.js +19 -0
- package/editor-web/assets/{docx-draw-Dxb67W2d.js → docx-draw-B5cM77hc.js} +1 -1
- package/editor-web/assets/{ebnfDiagram-V4P3TTPT-DBymUM-F.js → ebnfDiagram-V4P3TTPT-GPYcx6dU.js} +1 -1
- package/editor-web/assets/{elk-QONTBCTQ-BNYR3OlS.js → elk-QONTBCTQ-Bi0r4UFM.js} +1 -1
- package/editor-web/assets/{erDiagram-KYQIGQAA-cTNyOqW6.js → erDiagram-KYQIGQAA-DrOSrnci.js} +1 -1
- package/editor-web/assets/esm-jIPnpbBD.js +21 -0
- package/editor-web/assets/{eventmodeling-K75KTNOO-C6FUZeXP.js → eventmodeling-K75KTNOO-Dw-MjgUb.js} +1 -1
- package/editor-web/assets/flowDiagram-IUGLLWBU-DbZTfPEP.js +1 -0
- package/editor-web/assets/{ganttDiagram-R7GPNTJY-LD9mqQ1x.js → ganttDiagram-R7GPNTJY-Bwe8cQqi.js} +1 -1
- package/editor-web/assets/{gitGraph-VSP46ZUC-CtCBcQFl.js → gitGraph-VSP46ZUC-DsAcAKP0.js} +1 -1
- package/editor-web/assets/{gitGraphDiagram-PDYL7XHY-DYQpOozz.js → gitGraphDiagram-PDYL7XHY-aObRwdru.js} +1 -1
- package/editor-web/assets/index-D-MNVykg.js +28 -0
- package/editor-web/assets/{info-OHQRW6UA-IXInKPRO.js → info-OHQRW6UA-DBPN8JFr.js} +1 -1
- package/editor-web/assets/{infoDiagram-MVDRKAX5-Ds7Cei7T.js → infoDiagram-MVDRKAX5-Bx26Hq7M.js} +1 -1
- package/editor-web/assets/{ishikawaDiagram-HPEHV2GE-DWs3qtAX.js → ishikawaDiagram-HPEHV2GE-BJ_MCDwA.js} +1 -1
- package/editor-web/assets/{journeyDiagram-BOSHW7O7-BkNKVYBA.js → journeyDiagram-BOSHW7O7-B5g4W2Dx.js} +1 -1
- package/editor-web/assets/{kanban-definition-FNSA4HC5-D3dMswnI.js → kanban-definition-FNSA4HC5-U8YNlxN7.js} +1 -1
- package/editor-web/assets/layout-CuWN7_3k.js +1 -0
- package/editor-web/assets/{mermaid-parser.core-D_W_0X0N.js → mermaid-parser.core-DYLQlYDo.js} +3 -3
- package/editor-web/assets/{mermaid.core-Bkirj-s5.js → mermaid.core-qNJmZ0b4.js} +4 -4
- package/editor-web/assets/{mindmap-definition-6OY57UG3-CMKkAAvI.js → mindmap-definition-6OY57UG3-CI5aBWbK.js} +1 -1
- package/editor-web/assets/{packet-JDAUHWVQ-CzCkgCfg.js → packet-JDAUHWVQ-BBclMGlJ.js} +1 -1
- package/editor-web/assets/{panes-BexRuZd2.js → panes-BShVq38A.js} +1 -1
- package/editor-web/assets/{pegDiagram-ECIUJNBX-C8qHkx7M.js → pegDiagram-ECIUJNBX-B3pljPTu.js} +1 -1
- package/editor-web/assets/{pie-XZMESJXO-BJqgxMrD.js → pie-XZMESJXO-B7WzimHm.js} +1 -1
- package/editor-web/assets/{pieDiagram-GNMPY74T-DyNntV5y.js → pieDiagram-GNMPY74T-tM1Da50-.js} +1 -1
- package/editor-web/assets/{quadrantDiagram-D57K4MC3-BHa-69ir.js → quadrantDiagram-D57K4MC3-BEq_Shj9.js} +1 -1
- package/editor-web/assets/{radar-ABXABTNO-BeRPjBBR.js → radar-ABXABTNO-v2jJSW5T.js} +1 -1
- package/editor-web/assets/{railroad-I3PHUGI6-BaRQqRsK.js → railroad-I3PHUGI6-6W3Z4F8Y.js} +1 -1
- package/editor-web/assets/{railroad-abnf-LNEFI6M7-BZfwomxZ.js → railroad-abnf-LNEFI6M7-DxIN7Zrt.js} +1 -1
- package/editor-web/assets/{railroad-ebnf-DWYD2UWJ-DbgqpEF5.js → railroad-ebnf-DWYD2UWJ-Bb5O7tAx.js} +1 -1
- package/editor-web/assets/{railroad-peg-JR7BVNR7-BYOf3PsQ.js → railroad-peg-JR7BVNR7-i2LjEP5t.js} +1 -1
- package/editor-web/assets/{railroadDiagram-Y72NRBL7-B5OAzOsD.js → railroadDiagram-Y72NRBL7-DhsyVKbG.js} +1 -1
- package/editor-web/assets/{requirementDiagram-EQYSW5RA-wqYNoqO0.js → requirementDiagram-EQYSW5RA-Du2k7i1E.js} +1 -1
- package/editor-web/assets/{ribbon-tabs-B3IC9WOt.js → ribbon-tabs-Bxuj_hct.js} +1 -1
- package/editor-web/assets/{sankeyDiagram-SY24JHO5-Crf6GRsa.js → sankeyDiagram-SY24JHO5-CDnRMu7J.js} +1 -1
- package/editor-web/assets/schemas-CnlOL0u4.js +1 -0
- package/editor-web/assets/{sequenceDiagram-BLEHNHQU-DUcHz4_d.js → sequenceDiagram-BLEHNHQU-BUXBhWYW.js} +1 -1
- package/editor-web/assets/{stateDiagram-v2-A6IESKWZ-DbeLdnpS.js → stateDiagram-v2-A6IESKWZ-Enb8LZUA.js} +1 -1
- package/editor-web/assets/{swimlanes-B3ENRKFQ-BDi6AeJI.js → swimlanes-B3ENRKFQ-pnpjgTrl.js} +1 -1
- package/editor-web/assets/swimlanesDiagram-AYQRV4AK-B-B2Eoc8.js +8 -0
- package/editor-web/assets/themes-D_ISkWVz.js +1 -0
- package/editor-web/assets/{timeline-definition-JXYKGLGB-B0awa2hh.js → timeline-definition-JXYKGLGB-C4pR18kd.js} +1 -1
- package/editor-web/assets/{treeView-D4JQ5SDB-C91G0IGm.js → treeView-D4JQ5SDB-kzNGeAv6.js} +1 -1
- package/editor-web/assets/{treemap-SAJKECNS-CiOWiwl2.js → treemap-SAJKECNS-Buhb5wzt.js} +1 -1
- package/editor-web/assets/{updating-D0GEtwnJ.js → updating-Cbxw83_O.js} +1 -1
- package/editor-web/assets/{usecaseDiagram-WPOLBNNX-DMYM1MRe.js → usecaseDiagram-WPOLBNNX-CL-xLQWl.js} +1 -1
- package/editor-web/assets/{vennDiagram-Q3Y3IDCW-DQIJ5vvN.js → vennDiagram-Q3Y3IDCW-bwsyCcdK.js} +1 -1
- package/editor-web/assets/{video-mMOFXHYK.js → video-8MxWX9f5.js} +1 -1
- package/editor-web/assets/{wardley-7MLQ67FV-C3H9HG8r.js → wardley-7MLQ67FV-DXsLgedI.js} +1 -1
- package/editor-web/assets/{wardleyDiagram-IVAIDKWA-DgsjqY1Y.js → wardleyDiagram-IVAIDKWA-Cn0ph953.js} +1 -1
- package/editor-web/assets/{workbook-NtMEyLgf.js → workbook-BDWkQ149.js} +1 -1
- package/editor-web/assets/{xychartDiagram-4URNHDU4-DzsGI527.js → xychartDiagram-4URNHDU4-CfXnqGWZ.js} +1 -1
- package/editor-web/index.html +2 -1
- package/package.json +2 -2
- package/editor-web/assets/channel-dyUtlVPg.js +0 -1
- package/editor-web/assets/deck-C0VxrlzX.js +0 -1
- package/editor-web/assets/dist-CCP24Lel.js +0 -19
- package/editor-web/assets/esm-Cl3GKSDd.js +0 -21
- package/editor-web/assets/flowDiagram-IUGLLWBU-ukTovy07.js +0 -1
- package/editor-web/assets/index-omhSywJb.js +0 -28
- package/editor-web/assets/schemas-C21MyseF.js +0 -1
- package/editor-web/assets/swimlanesDiagram-AYQRV4AK-2wwOmxbv.js +0 -8
- package/editor-web/assets/tolerant-DM9s0Mt1.js +0 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-COiEfhsA.js";import{a as t,b as n,c as r,f as i,m as a,s as o}from"./react-Byupo4pA.js";import{Et as s,ht as c,kt as l,n as u,t as d}from"./x-BAJilkKD.js";import{t as f}from"./session--OJYv_B7.js";import{t as p}from"./jsx-runtime-DePvh3-m.js";import{A as m,C as h,f as g,m as _,u as v}from"./bar-button-CJmpgNg4.js";import{C as y,E as ee,S as b,b as x,i as te}from"./dist-DCI21ljp.js";import{n as ne,t as S}from"./italic-BV7iHxoP.js";import{t as C}from"./code-Ch6AB5bZ.js";import{c as re,d as w,i as ie,l as ae,n as oe,o as se,r as ce,s as le,t as ue,u as T}from"./panes-BexRuZd2.js";import{t as E}from"./link-CFOv3nz-.js";import{D,O}from"./dist-DQ6RpEJD.js";import{t as de}from"./minus-ngE8owxs.js";import{O as k,T as A,n as j,nt as M,o as N,s as fe,t as pe,ut as P}from"./dist-QLXI7XGS.js";import{n as F,t as I}from"./undo-2-DCbMWoug.js";import{t as me}from"./sigma-B4AWtnVA.js";import{n as he,t as L}from"./table-BW43XXVd.js";import{a as R,g as ge}from"./index-omhSywJb.js";import{n as _e,t as ve}from"./updating-D0GEtwnJ.js";import{t as ye}from"./collaborator-CbTacvkB.js";import{t as be}from"./row-DqS4-5b1.js";import{c as xe,n as Se,s as Ce,t as we}from"./dist-DIJnhQFK.js";import{i as Te,n as Ee,r as De,t as Oe}from"./dist-B8_6sJ_V.js";import{S as ke,_ as Ae,a as je,c as Me,g as z,h as Ne,i as Pe,m as Fe,o as Ie,r as Le,s as Re,t as B,u as V,v as ze,x as Be}from"./words-B2jQwWpp.js";var H=e(n(),1),U=p(),Ve=(e,t)=>JSON.stringify(e)===JSON.stringify(t);function He(e,t){if(e.title!==t.title||!Ve(e.cover,t.cover))return{head:!0};for(let n=0;n<t.blocks.length;n++)if(!Ve(e.blocks[n],t.blocks[n]))return{block:n};if(e.blocks.length>t.blocks.length&&t.blocks.length>0)return{block:t.blocks.length-1}}function Ue(e,t){let n=z(e),r=e=>e.from<=t.to&&t.from<=e.to;if(n.head&&r(n.head))return{head:!0};let i=n.lines.findIndex(r);return i<0?void 0:{block:i}}function We(e,t){if(e.from!==void 0&&e.path===t.path)return Ue(t.text,{from:e.from,to:e.to??e.from})}var W=new xe(`xArticleAgent`),Ge=A.create({name:`xArticleAgent`,addProseMirrorPlugins(){return[new Ce({key:W,state:{init:()=>null,apply:(e,t)=>{let n=e.getMeta(W);return n===void 0?t:n}},props:{decorations(e){let t=W.getState(e);if(!t)return null;let n;return e.doc.forEach((e,r,i)=>{i===t.block&&(n=we.node(r,r+e.nodeSize,{class:`ak-x-agent`,"data-agent":t.label,"data-testid":`x-agent-block`}))}),n?Se.create(e.doc,[n]):null}}})]}});function Ke(e,t){e.isDestroyed||e.view.dispatch(e.state.tr.setMeta(W,t))}var G={image:`xImage`,post:`xPost`,link:`xLink`,latex:`xLatex`,markdown:`xMarkdown`};function qe(e){let t=[];return e.bold===!0&&t.push({type:`bold`}),e.italic===!0&&t.push({type:`italic`}),e.strike===!0&&t.push({type:`strike`}),e.link!==void 0&&t.push({type:`link`,attrs:{href:e.link}}),{type:`text`,text:e.text,...t.length>0?{marks:t}:{}}}var K=e=>({type:`paragraph`,...e.length>0?{content:e.filter(e=>e.text!==``).map(qe)}:{}});function q(e){let t=e.map(e=>{switch(e.type){case`paragraph`:return K(e.runs);case`h1`:case`h2`:return{type:`heading`,attrs:{level:e.type===`h1`?1:2},...e.runs.length>0?{content:e.runs.map(qe)}:{}};case`quote`:return{type:`blockquote`,content:[K(e.runs)]};case`ul`:case`ol`:return{type:e.type===`ul`?`bulletList`:`orderedList`,content:e.items.map(e=>({type:`listItem`,content:[K(e)]}))};case`image`:return{type:G.image,attrs:{file:e.file,alt:e.alt??``,caption:e.caption??``}};case`post`:return{type:G.post,attrs:{url:e.url,id:e.id}};case`link`:return{type:G.link,attrs:{url:e.url}};case`divider`:return{type:`horizontalRule`};case`latex`:return{type:G.latex,attrs:{tex:e.tex}};case`markdown`:return{type:G.markdown,attrs:{markdown:e.markdown}}}});return{type:`doc`,content:t.length>0?t:[{type:`paragraph`}]}}function Je(e){let t=e.marks??[],n=e=>t.some(t=>t.type===e),r=t.find(e=>e.type===`link`)?.attrs?.href;return{text:e.text??``,...n(`bold`)?{bold:!0}:{},...n(`italic`)?{italic:!0}:{},...n(`strike`)?{strike:!0}:{},...r===void 0?{}:{link:r}}}var J=e=>(e?.content??[]).map(e=>e.type===`hardBreak`?{text:` `}:Je(e)),Y=(e,t)=>{let n=e.attrs?.[t];return typeof n==`string`?n:``};function X(e){let t=[];for(let n of e.content??[])switch(n.type){case`paragraph`:t.push({type:`paragraph`,runs:J(n)});break;case`heading`:{let e=Number(n.attrs?.level??1);t.push({type:e<=1?`h1`:`h2`,runs:J(n)});break}case`blockquote`:for(let e of n.content??[])t.push({type:`quote`,runs:J(e)});break;case`bulletList`:case`orderedList`:t.push({type:n.type===`bulletList`?`ul`:`ol`,items:(n.content??[]).map(e=>(e.content??[]).flatMap(e=>J(e)))});break;case`horizontalRule`:t.push({type:`divider`});break;case G.image:{let e=Y(n,`alt`),r=Y(n,`caption`);t.push({type:`image`,file:Y(n,`file`),...e===``?{}:{alt:e},...r===``?{}:{caption:r}});break}case G.post:t.push({type:`post`,url:Y(n,`url`),id:Y(n,`id`)});break;case G.link:t.push({type:`link`,url:Y(n,`url`)});break;case G.latex:t.push({type:`latex`,tex:Y(n,`tex`)});break;case G.markdown:t.push({type:`markdown`,markdown:Y(n,`markdown`)})}let n=t[0];return t.length===1&&n?.type===`paragraph`&&n.runs.every(e=>e.text===``)?[]:t}var Ye=new xe(`x-found`);function Xe(e){let t=[];return e.descendants((e,n)=>{if(!e.isTextblock)return!0;let r=e.textContent;for(let e of Be(r))t.push(we.inline(n+1+e.start,n+1+e.end,{class:`ak-x-link`}));return!1}),Se.create(e,t)}var Ze=A.create({name:`xFound`,addProseMirrorPlugins(){return[new Ce({key:Ye,state:{init:(e,t)=>Xe(t.doc),apply:(e,t)=>e.docChanged?Xe(e.doc):t},props:{decorations:e=>Ye.getState(e)}})]}}),Qe=(0,H.createContext)(()=>void 0),Z=e=>typeof e==`string`?e:``;function $e({node:e,updateAttributes:t}){let n=B(),r=(0,H.useContext)(Qe),i=Z(e.attrs.file),a=r(i),o=ze(i.split(`#`)[0]?.split(`.`).pop()??``);return(0,U.jsxs)(j,{as:`figure`,"data-x":`image`,className:`relative`,children:[(0,U.jsxs)(`div`,{className:`ak-x-a-picture`,children:[a===void 0?(0,U.jsx)(`div`,{className:`ak-x-made`,children:i}):o===`video`?(0,U.jsx)(re,{src:a,file:i,controls:!0,muted:!0,playsInline:!0,className:`w-full`}):(0,U.jsx)(`img`,{src:a,alt:Z(e.attrs.alt)}),(0,U.jsxs)(`div`,{className:`ak-x-labels`,contentEditable:!1,children:[o===`gif`?(0,U.jsx)(`span`,{className:`ak-x-label`,children:n.gif}):null,(0,U.jsx)(T,{most:ke.alt,alt:Z(e.attrs.alt),onAlt:e=>{t({alt:e})},trigger:(0,U.jsx)(u,{variant:`secondary`,size:`xs`,className:`bg-media/75 text-on-media font-bold`,"aria-label":n.altText,children:n.alt})})]})]}),(0,U.jsx)(`input`,{className:`mt-2 w-full bg-transparent text-left text-[13px] leading-4 text-[var(--ak-x-caption)] outline-none`,value:Z(e.attrs.caption),placeholder:n.caption,"aria-label":n.caption,dir:`auto`,onChange:e=>{t({caption:e.target.value})}})]})}function et({node:e}){return(0,U.jsx)(j,{"data-x":`link`,children:(0,U.jsx)(Re,{url:Z(e.attrs.url)})})}function tt({node:e}){return(0,U.jsx)(j,{className:`ak-x-a-post`,"data-x":`post`,children:Ne(Z(e.attrs.url))})}function nt(e){return function({node:t,updateAttributes:n,selected:r}){let i=B(),a=e===`tex`?i.article.equation:i.article.code,o=Z(t.attrs[e]);return!r&&o.trim()!==``?(0,U.jsx)(j,{"data-x":e,children:e===`tex`?(0,U.jsx)(Ie,{tex:o}):(0,U.jsx)(Me,{markdown:o})}):(0,U.jsx)(j,{as:`pre`,"data-latex":e===`tex`?``:void 0,children:(0,U.jsx)(`textarea`,{className:`block w-full resize-none bg-transparent font-[inherit] outline-none [field-sizing:content]`,value:o,"aria-label":a,placeholder:a,spellCheck:!1,onChange:t=>{n({[e]:t.target.value})}})})}}function Q(e,t,n){return k.create({name:e,group:`block`,atom:!0,selectable:!0,draggable:!0,addAttributes(){return Object.fromEntries(t.map(e=>[e,{default:``}]))},parseHTML(){return[{tag:`div[data-node="${e}"]`}]},renderHTML({HTMLAttributes:t}){return[`div`,M(t,{"data-node":e})]},addNodeView(){return N(n)}})}var rt=[Q(G.image,[`file`,`alt`,`caption`],$e),Q(G.post,[`url`,`id`],tt),Q(G.link,[`url`],et),Q(G.latex,[`tex`],nt(`tex`)),Q(G.markdown,[`markdown`],nt(`markdown`))],it=/^https?:\/\/(?:www\.)?(?:x|twitter)\.com\/[A-Za-z0-9_]+\/status\/([0-9]{1,19})/u,at=3e4;function ot(e){return z(e).issues.some(e=>e.rule===`article-markup`||e.rule===`format`)}var st=class{head;listeners=new Set;body;show;session;constructor(e){this.session=e;let{article:t}=z(e.text);this.head={title:t.title,cover:t.cover,state:e.state,held:ot(e.text)},e.attach({save:e=>{let t=this.article();if(t===void 0||ot(e))return;let n=Ae(t);return n===Ae(z(e).article)?void 0:n},take:(e,t,n)=>{let{article:r}=z(e),i=n?.kind===`agent`?He(z(t).article,r):void 0;this.set({title:r.title,cover:r.cover,held:ot(e),...i===void 0?{}:{landed:{spot:i,at:Date.now()}}}),this.show?.(r)}}),e.onState(e=>{this.set({state:e})})}get read(){return z(this.session.text).article}bind(e,t){this.body=e,this.show=t}article(){if(this.body!==void 0)return{title:this.head.title,...this.head.cover?{cover:this.head.cover}:{},blocks:this.body()}}get(){return this.head}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}set(e){this.head={...this.head,...e};for(let e of this.listeners)e()}edited(e={}){Object.keys(e).length>0&&this.set(e),this.session.edited()}};function $(e){return(0,U.jsx)(u,{variant:`ghost`,size:`icon-sm`,"aria-label":e.label,title:e.label,"aria-pressed":e.on,disabled:e.disabled,className:c(e.on===!0&&`bg-here`),onMouseDown:e=>{e.preventDefault()},onClick:e.onClick,children:e.children})}function ct(e){let t=B(),[n,r]=(0,H.useState)(!1),[i,a]=(0,H.useState)(``),o=i.trim()===``?void 0:e.check?.(i.trim());return(0,U.jsxs)(x,{open:n,onOpenChange:e=>{r(e),e&&a(``)},children:[(0,U.jsx)(y,{asChild:!0,children:(0,U.jsx)(u,{variant:`ghost`,size:`icon-sm`,"aria-label":e.label,title:e.label,disabled:e.disabled,children:e.icon})}),(0,U.jsx)(b,{className:`w-80`,align:`start`,children:(0,U.jsxs)(`form`,{className:`flex flex-col gap-2`,onSubmit:t=>{t.preventDefault(),i.trim()!==``&&o===void 0&&(e.onAnswer(i.trim()),r(!1))},children:[(0,U.jsx)(R,{autoFocus:!0,value:i,placeholder:e.hint,"aria-label":e.hint,onChange:e=>{a(e.target.value)}}),o===void 0?null:(0,U.jsx)(`p`,{className:`text-destructive text-xs`,children:o}),(0,U.jsx)(u,{type:`submit`,size:`sm`,className:`self-end`,disabled:i.trim()===``||o!==void 0,children:t.article.add})]})})]})}function lt({dir:e,entry:t,insert:n,divider:r}){let i=B().article,[a,o]=(0,H.useState)(!1),[s,l]=(0,H.useState)(`menu`),[d,f]=(0,H.useState)(``),p=()=>{o(!1)},h=(e,t,n)=>(0,U.jsx)(be,{size:`dense`,icon:t,onClick:n,children:e}),g=(e,t,n)=>{let r=d.trim()===``?void 0:t(d.trim());return(0,U.jsxs)(`form`,{className:`flex w-80 flex-col gap-2`,onSubmit:e=>{e.preventDefault(),d.trim()!==``&&r===void 0&&(n(d.trim()),p())},children:[(0,U.jsx)(R,{autoFocus:!0,value:d,placeholder:e,"aria-label":e,onChange:e=>{f(e.target.value)}}),r===void 0?null:(0,U.jsx)(`p`,{className:`text-destructive text-xs`,children:r}),(0,U.jsx)(u,{type:`submit`,size:`sm`,className:`self-end`,disabled:d.trim()===``||r!==void 0,children:i.add})]})};return(0,U.jsxs)(x,{open:a,onOpenChange:e=>{o(e),e&&(l(`menu`),f(``))},children:[(0,U.jsx)(y,{asChild:!0,children:(0,U.jsxs)(u,{variant:`ghost`,size:`sm`,className:`gap-1 px-2`,children:[i.insert,(0,U.jsx)(m,{})]})}),(0,U.jsx)(b,{className:c(s===`menu`?`w-48 p-1`:`w-auto`),align:`start`,children:s===`menu`?(0,U.jsxs)(`div`,{role:`menu`,children:[h(i.media,(0,U.jsx)(w,{}),()=>{l(`media`)}),h(i.post,(0,U.jsx)(ge,{}),()=>{l(`post`)}),h(i.linkCard,(0,U.jsx)(E,{}),()=>{l(`link`)}),h(i.divider,(0,U.jsx)(de,{}),()=>{r(),p()}),h(i.code,(0,U.jsx)(C,{}),()=>{n(G.markdown,{markdown:"```\n\n```"}),p()}),h(i.equation,(0,U.jsx)(me,{}),()=>{n(G.latex,{tex:``}),p()}),h(i.table,(0,U.jsx)(L,{}),()=>{n(G.markdown,{markdown:`| A | B |
|
|
1
|
+
import{i as e}from"./rolldown-runtime-COiEfhsA.js";import{a as t,b as n,c as r,f as i,m as a,s as o}from"./react-Byupo4pA.js";import{Et as s,ht as c,kt as l,n as u,t as d}from"./x-BAJilkKD.js";import{t as f}from"./session--OJYv_B7.js";import{t as p}from"./jsx-runtime-DePvh3-m.js";import{A as m,C as h,f as g,m as _,u as v}from"./bar-button-CJmpgNg4.js";import{C as y,E as ee,S as b,b as x,i as te}from"./dist-6ugUm4dS.js";import{n as ne,t as S}from"./italic-BV7iHxoP.js";import{t as C}from"./code-Ch6AB5bZ.js";import{c as re,d as w,i as ie,l as ae,n as oe,o as se,r as ce,s as le,t as ue,u as T}from"./panes-BShVq38A.js";import{t as E}from"./link-CFOv3nz-.js";import{D,O}from"./dist-DQ6RpEJD.js";import{t as de}from"./minus-ngE8owxs.js";import{O as k,T as A,n as j,nt as M,o as N,s as fe,t as pe,ut as P}from"./dist-QLXI7XGS.js";import{n as F,t as I}from"./undo-2-DCbMWoug.js";import{t as me}from"./sigma-B4AWtnVA.js";import{n as he,t as L}from"./table-BW43XXVd.js";import{a as R,g as ge}from"./index-D-MNVykg.js";import{n as _e,t as ve}from"./updating-Cbxw83_O.js";import{t as ye}from"./collaborator-CbTacvkB.js";import{t as be}from"./row-DqS4-5b1.js";import{c as xe,n as Se,s as Ce,t as we}from"./dist-DIJnhQFK.js";import{i as Te,n as Ee,r as De,t as Oe}from"./dist-B8_6sJ_V.js";import{S as ke,_ as Ae,a as je,c as Me,g as z,h as Ne,i as Pe,m as Fe,o as Ie,r as Le,s as Re,t as B,u as V,v as ze,x as Be}from"./words-B2jQwWpp.js";var H=e(n(),1),U=p(),Ve=(e,t)=>JSON.stringify(e)===JSON.stringify(t);function He(e,t){if(e.title!==t.title||!Ve(e.cover,t.cover))return{head:!0};for(let n=0;n<t.blocks.length;n++)if(!Ve(e.blocks[n],t.blocks[n]))return{block:n};if(e.blocks.length>t.blocks.length&&t.blocks.length>0)return{block:t.blocks.length-1}}function Ue(e,t){let n=z(e),r=e=>e.from<=t.to&&t.from<=e.to;if(n.head&&r(n.head))return{head:!0};let i=n.lines.findIndex(r);return i<0?void 0:{block:i}}function We(e,t){if(e.from!==void 0&&e.path===t.path)return Ue(t.text,{from:e.from,to:e.to??e.from})}var W=new xe(`xArticleAgent`),Ge=A.create({name:`xArticleAgent`,addProseMirrorPlugins(){return[new Ce({key:W,state:{init:()=>null,apply:(e,t)=>{let n=e.getMeta(W);return n===void 0?t:n}},props:{decorations(e){let t=W.getState(e);if(!t)return null;let n;return e.doc.forEach((e,r,i)=>{i===t.block&&(n=we.node(r,r+e.nodeSize,{class:`ak-x-agent`,"data-agent":t.label,"data-testid":`x-agent-block`}))}),n?Se.create(e.doc,[n]):null}}})]}});function Ke(e,t){e.isDestroyed||e.view.dispatch(e.state.tr.setMeta(W,t))}var G={image:`xImage`,post:`xPost`,link:`xLink`,latex:`xLatex`,markdown:`xMarkdown`};function qe(e){let t=[];return e.bold===!0&&t.push({type:`bold`}),e.italic===!0&&t.push({type:`italic`}),e.strike===!0&&t.push({type:`strike`}),e.link!==void 0&&t.push({type:`link`,attrs:{href:e.link}}),{type:`text`,text:e.text,...t.length>0?{marks:t}:{}}}var K=e=>({type:`paragraph`,...e.length>0?{content:e.filter(e=>e.text!==``).map(qe)}:{}});function q(e){let t=e.map(e=>{switch(e.type){case`paragraph`:return K(e.runs);case`h1`:case`h2`:return{type:`heading`,attrs:{level:e.type===`h1`?1:2},...e.runs.length>0?{content:e.runs.map(qe)}:{}};case`quote`:return{type:`blockquote`,content:[K(e.runs)]};case`ul`:case`ol`:return{type:e.type===`ul`?`bulletList`:`orderedList`,content:e.items.map(e=>({type:`listItem`,content:[K(e)]}))};case`image`:return{type:G.image,attrs:{file:e.file,alt:e.alt??``,caption:e.caption??``}};case`post`:return{type:G.post,attrs:{url:e.url,id:e.id}};case`link`:return{type:G.link,attrs:{url:e.url}};case`divider`:return{type:`horizontalRule`};case`latex`:return{type:G.latex,attrs:{tex:e.tex}};case`markdown`:return{type:G.markdown,attrs:{markdown:e.markdown}}}});return{type:`doc`,content:t.length>0?t:[{type:`paragraph`}]}}function Je(e){let t=e.marks??[],n=e=>t.some(t=>t.type===e),r=t.find(e=>e.type===`link`)?.attrs?.href;return{text:e.text??``,...n(`bold`)?{bold:!0}:{},...n(`italic`)?{italic:!0}:{},...n(`strike`)?{strike:!0}:{},...r===void 0?{}:{link:r}}}var J=e=>(e?.content??[]).map(e=>e.type===`hardBreak`?{text:` `}:Je(e)),Y=(e,t)=>{let n=e.attrs?.[t];return typeof n==`string`?n:``};function X(e){let t=[];for(let n of e.content??[])switch(n.type){case`paragraph`:t.push({type:`paragraph`,runs:J(n)});break;case`heading`:{let e=Number(n.attrs?.level??1);t.push({type:e<=1?`h1`:`h2`,runs:J(n)});break}case`blockquote`:for(let e of n.content??[])t.push({type:`quote`,runs:J(e)});break;case`bulletList`:case`orderedList`:t.push({type:n.type===`bulletList`?`ul`:`ol`,items:(n.content??[]).map(e=>(e.content??[]).flatMap(e=>J(e)))});break;case`horizontalRule`:t.push({type:`divider`});break;case G.image:{let e=Y(n,`alt`),r=Y(n,`caption`);t.push({type:`image`,file:Y(n,`file`),...e===``?{}:{alt:e},...r===``?{}:{caption:r}});break}case G.post:t.push({type:`post`,url:Y(n,`url`),id:Y(n,`id`)});break;case G.link:t.push({type:`link`,url:Y(n,`url`)});break;case G.latex:t.push({type:`latex`,tex:Y(n,`tex`)});break;case G.markdown:t.push({type:`markdown`,markdown:Y(n,`markdown`)})}let n=t[0];return t.length===1&&n?.type===`paragraph`&&n.runs.every(e=>e.text===``)?[]:t}var Ye=new xe(`x-found`);function Xe(e){let t=[];return e.descendants((e,n)=>{if(!e.isTextblock)return!0;let r=e.textContent;for(let e of Be(r))t.push(we.inline(n+1+e.start,n+1+e.end,{class:`ak-x-link`}));return!1}),Se.create(e,t)}var Ze=A.create({name:`xFound`,addProseMirrorPlugins(){return[new Ce({key:Ye,state:{init:(e,t)=>Xe(t.doc),apply:(e,t)=>e.docChanged?Xe(e.doc):t},props:{decorations:e=>Ye.getState(e)}})]}}),Qe=(0,H.createContext)(()=>void 0),Z=e=>typeof e==`string`?e:``;function $e({node:e,updateAttributes:t}){let n=B(),r=(0,H.useContext)(Qe),i=Z(e.attrs.file),a=r(i),o=ze(i.split(`#`)[0]?.split(`.`).pop()??``);return(0,U.jsxs)(j,{as:`figure`,"data-x":`image`,className:`relative`,children:[(0,U.jsxs)(`div`,{className:`ak-x-a-picture`,children:[a===void 0?(0,U.jsx)(`div`,{className:`ak-x-made`,children:i}):o===`video`?(0,U.jsx)(re,{src:a,file:i,controls:!0,muted:!0,playsInline:!0,className:`w-full`}):(0,U.jsx)(`img`,{src:a,alt:Z(e.attrs.alt)}),(0,U.jsxs)(`div`,{className:`ak-x-labels`,contentEditable:!1,children:[o===`gif`?(0,U.jsx)(`span`,{className:`ak-x-label`,children:n.gif}):null,(0,U.jsx)(T,{most:ke.alt,alt:Z(e.attrs.alt),onAlt:e=>{t({alt:e})},trigger:(0,U.jsx)(u,{variant:`secondary`,size:`xs`,className:`bg-media/75 text-on-media font-bold`,"aria-label":n.altText,children:n.alt})})]})]}),(0,U.jsx)(`input`,{className:`mt-2 w-full bg-transparent text-left text-[13px] leading-4 text-[var(--ak-x-caption)] outline-none`,value:Z(e.attrs.caption),placeholder:n.caption,"aria-label":n.caption,dir:`auto`,onChange:e=>{t({caption:e.target.value})}})]})}function et({node:e}){return(0,U.jsx)(j,{"data-x":`link`,children:(0,U.jsx)(Re,{url:Z(e.attrs.url)})})}function tt({node:e}){return(0,U.jsx)(j,{className:`ak-x-a-post`,"data-x":`post`,children:Ne(Z(e.attrs.url))})}function nt(e){return function({node:t,updateAttributes:n,selected:r}){let i=B(),a=e===`tex`?i.article.equation:i.article.code,o=Z(t.attrs[e]);return!r&&o.trim()!==``?(0,U.jsx)(j,{"data-x":e,children:e===`tex`?(0,U.jsx)(Ie,{tex:o}):(0,U.jsx)(Me,{markdown:o})}):(0,U.jsx)(j,{as:`pre`,"data-latex":e===`tex`?``:void 0,children:(0,U.jsx)(`textarea`,{className:`block w-full resize-none bg-transparent font-[inherit] outline-none [field-sizing:content]`,value:o,"aria-label":a,placeholder:a,spellCheck:!1,onChange:t=>{n({[e]:t.target.value})}})})}}function Q(e,t,n){return k.create({name:e,group:`block`,atom:!0,selectable:!0,draggable:!0,addAttributes(){return Object.fromEntries(t.map(e=>[e,{default:``}]))},parseHTML(){return[{tag:`div[data-node="${e}"]`}]},renderHTML({HTMLAttributes:t}){return[`div`,M(t,{"data-node":e})]},addNodeView(){return N(n)}})}var rt=[Q(G.image,[`file`,`alt`,`caption`],$e),Q(G.post,[`url`,`id`],tt),Q(G.link,[`url`],et),Q(G.latex,[`tex`],nt(`tex`)),Q(G.markdown,[`markdown`],nt(`markdown`))],it=/^https?:\/\/(?:www\.)?(?:x|twitter)\.com\/[A-Za-z0-9_]+\/status\/([0-9]{1,19})/u,at=3e4;function ot(e){return z(e).issues.some(e=>e.rule===`article-markup`||e.rule===`format`)}var st=class{head;listeners=new Set;body;show;session;constructor(e){this.session=e;let{article:t}=z(e.text);this.head={title:t.title,cover:t.cover,state:e.state,held:ot(e.text)},e.attach({save:e=>{let t=this.article();if(t===void 0||ot(e))return;let n=Ae(t);return n===Ae(z(e).article)?void 0:n},take:(e,t,n)=>{let{article:r}=z(e),i=n?.kind===`agent`?He(z(t).article,r):void 0;this.set({title:r.title,cover:r.cover,held:ot(e),...i===void 0?{}:{landed:{spot:i,at:Date.now()}}}),this.show?.(r)}}),e.onState(e=>{this.set({state:e})})}get read(){return z(this.session.text).article}bind(e,t){this.body=e,this.show=t}article(){if(this.body!==void 0)return{title:this.head.title,...this.head.cover?{cover:this.head.cover}:{},blocks:this.body()}}get(){return this.head}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}set(e){this.head={...this.head,...e};for(let e of this.listeners)e()}edited(e={}){Object.keys(e).length>0&&this.set(e),this.session.edited()}};function $(e){return(0,U.jsx)(u,{variant:`ghost`,size:`icon-sm`,"aria-label":e.label,title:e.label,"aria-pressed":e.on,disabled:e.disabled,className:c(e.on===!0&&`bg-here`),onMouseDown:e=>{e.preventDefault()},onClick:e.onClick,children:e.children})}function ct(e){let t=B(),[n,r]=(0,H.useState)(!1),[i,a]=(0,H.useState)(``),o=i.trim()===``?void 0:e.check?.(i.trim());return(0,U.jsxs)(x,{open:n,onOpenChange:e=>{r(e),e&&a(``)},children:[(0,U.jsx)(y,{asChild:!0,children:(0,U.jsx)(u,{variant:`ghost`,size:`icon-sm`,"aria-label":e.label,title:e.label,disabled:e.disabled,children:e.icon})}),(0,U.jsx)(b,{className:`w-80`,align:`start`,children:(0,U.jsxs)(`form`,{className:`flex flex-col gap-2`,onSubmit:t=>{t.preventDefault(),i.trim()!==``&&o===void 0&&(e.onAnswer(i.trim()),r(!1))},children:[(0,U.jsx)(R,{autoFocus:!0,value:i,placeholder:e.hint,"aria-label":e.hint,onChange:e=>{a(e.target.value)}}),o===void 0?null:(0,U.jsx)(`p`,{className:`text-destructive text-xs`,children:o}),(0,U.jsx)(u,{type:`submit`,size:`sm`,className:`self-end`,disabled:i.trim()===``||o!==void 0,children:t.article.add})]})})]})}function lt({dir:e,entry:t,insert:n,divider:r}){let i=B().article,[a,o]=(0,H.useState)(!1),[s,l]=(0,H.useState)(`menu`),[d,f]=(0,H.useState)(``),p=()=>{o(!1)},h=(e,t,n)=>(0,U.jsx)(be,{size:`dense`,icon:t,onClick:n,children:e}),g=(e,t,n)=>{let r=d.trim()===``?void 0:t(d.trim());return(0,U.jsxs)(`form`,{className:`flex w-80 flex-col gap-2`,onSubmit:e=>{e.preventDefault(),d.trim()!==``&&r===void 0&&(n(d.trim()),p())},children:[(0,U.jsx)(R,{autoFocus:!0,value:d,placeholder:e,"aria-label":e,onChange:e=>{f(e.target.value)}}),r===void 0?null:(0,U.jsx)(`p`,{className:`text-destructive text-xs`,children:r}),(0,U.jsx)(u,{type:`submit`,size:`sm`,className:`self-end`,disabled:d.trim()===``||r!==void 0,children:i.add})]})};return(0,U.jsxs)(x,{open:a,onOpenChange:e=>{o(e),e&&(l(`menu`),f(``))},children:[(0,U.jsx)(y,{asChild:!0,children:(0,U.jsxs)(u,{variant:`ghost`,size:`sm`,className:`gap-1 px-2`,children:[i.insert,(0,U.jsx)(m,{})]})}),(0,U.jsx)(b,{className:c(s===`menu`?`w-48 p-1`:`w-auto`),align:`start`,children:s===`menu`?(0,U.jsxs)(`div`,{role:`menu`,children:[h(i.media,(0,U.jsx)(w,{}),()=>{l(`media`)}),h(i.post,(0,U.jsx)(ge,{}),()=>{l(`post`)}),h(i.linkCard,(0,U.jsx)(E,{}),()=>{l(`link`)}),h(i.divider,(0,U.jsx)(de,{}),()=>{r(),p()}),h(i.code,(0,U.jsx)(C,{}),()=>{n(G.markdown,{markdown:"```\n\n```"}),p()}),h(i.equation,(0,U.jsx)(me,{}),()=>{n(G.latex,{tex:``}),p()}),h(i.table,(0,U.jsx)(L,{}),()=>{n(G.markdown,{markdown:`| A | B |
|
|
2
2
|
| - | - |
|
|
3
3
|
| | |`}),p()})]}):s===`media`?(0,U.jsx)(ie,{self:t,types:Pe,testId:`x-picker`,onPick:t=>{n(G.image,{file:le(e,t),alt:``,caption:``}),p()}}):s===`post`?g(i.postHint,e=>it.test(e)?void 0:i.notPost,e=>{n(G.post,{url:e,id:it.exec(e)?.[1]??``})}):g(i.linkHint,e=>/^https?:\/\/\S+$/u.test(e)?void 0:i.notLink,e=>{n(G.link,{url:e})})})]})}function ut({editor:e}){let t=B().article,n=()=>e.chain().focus(),r=e.isActive(`heading`,{level:1})?t.heading:e.isActive(`heading`,{level:2})?t.subheading:t.paragraph;return(0,U.jsxs)(v,{children:[(0,U.jsx)(h,{asChild:!0,children:(0,U.jsxs)(u,{variant:`ghost`,size:`sm`,className:`w-32 justify-between gap-1 px-2`,onMouseDown:e=>{e.preventDefault()},children:[r,(0,U.jsx)(m,{})]})}),(0,U.jsxs)(g,{align:`start`,className:`ak-x w-48`,children:[(0,U.jsx)(_,{className:`text-[31px] leading-10 font-extrabold`,onSelect:()=>n().setHeading({level:1}).run(),children:t.heading}),(0,U.jsx)(_,{className:`text-[26px] leading-9 font-extrabold`,onSelect:()=>n().setHeading({level:2}).run(),children:t.subheading}),(0,U.jsx)(_,{className:`text-[15px] font-bold`,onSelect:()=>n().setParagraph().run(),children:t.paragraph})]})]})}function dt({editor:e,dir:t,entry:n}){let r=B(),i=r.article,[,a]=(0,H.useState)(0);(0,H.useEffect)(()=>{let t=()=>{a(e=>e+1)};return e.on(`transaction`,t),()=>{e.off(`transaction`,t)}},[e]);let o=()=>e.chain().focus(),s=(t,n)=>{let{$from:r}=e.state.selection;r.depth>1?o().insertContentAt(r.after(1),{type:t,attrs:n}).run():o().insertContent({type:t,attrs:n}).run()},c=e.getText().split(/\s+/u).filter(e=>e!==``).length;return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)($,{label:r.undo,disabled:!e.can().undo(),onClick:()=>o().undo().run(),children:(0,U.jsx)(I,{})}),(0,U.jsx)($,{label:r.redo,disabled:!e.can().redo(),onClick:()=>o().redo().run(),children:(0,U.jsx)(F,{})}),(0,U.jsx)(`span`,{className:`bg-rule mx-1 h-5 w-px`,"aria-hidden":`true`}),(0,U.jsx)($,{label:i.bold,on:e.isActive(`bold`),onClick:()=>o().toggleBold().run(),children:(0,U.jsx)(ne,{})}),(0,U.jsx)($,{label:i.italic,on:e.isActive(`italic`),onClick:()=>o().toggleItalic().run(),children:(0,U.jsx)(S,{})}),(0,U.jsx)($,{label:i.strike,on:e.isActive(`strike`),onClick:()=>o().toggleStrike().run(),children:(0,U.jsx)(he,{})}),(0,U.jsx)(ut,{editor:e}),(0,U.jsx)(`span`,{className:`bg-rule mx-1 h-5 w-px`,"aria-hidden":`true`}),(0,U.jsx)($,{label:i.quote,on:e.isActive(`blockquote`),onClick:()=>o().toggleBlockquote().run(),children:(0,U.jsx)(P,{})}),(0,U.jsx)($,{label:i.bullets,on:e.isActive(`bulletList`),onClick:()=>o().toggleBulletList().run(),children:(0,U.jsx)(D,{})}),(0,U.jsx)($,{label:i.numbers,on:e.isActive(`orderedList`),onClick:()=>o().toggleOrderedList().run(),children:(0,U.jsx)(O,{})}),(0,U.jsx)(`span`,{className:`bg-rule mx-1 h-5 w-px`,"aria-hidden":`true`}),e.isActive(`link`)?(0,U.jsx)($,{label:i.removeLink,on:!0,onClick:()=>o().extendMarkRange(`link`).unsetLink().run(),children:(0,U.jsx)(d,{})}):(0,U.jsx)(ct,{label:i.link,hint:i.linkHint,icon:(0,U.jsx)(E,{}),disabled:e.state.selection.empty,onAnswer:e=>{o().extendMarkRange(`link`).setLink({href:e}).run()}}),(0,U.jsx)(lt,{dir:t,entry:n,insert:s,divider:()=>o().setHorizontalRule().run()}),(0,U.jsx)(`span`,{className:`text-muted-foreground ml-2 text-xs tabular-nums`,children:i.words(c)})]})}function ft({doc:e,dir:n,entry:o}){let c=B(),f=r(),p=a(),[m,h]=ce(),g=(0,H.useSyncExternalStore)(t=>e.subscribe(t),()=>e.get()),_=p||g.held,v=(0,H.useMemo)(()=>e.read,[e]),[ne,S]=(0,H.useState)(()=>v.blocks.flatMap(e=>e.type===`image`?[e.file]:[])),C=fe({textDirection:`auto`,editable:!_,immediatelyRender:!0,extensions:[Oe.configure({heading:{levels:[1,2]},listItem:!1,blockquote:!1,code:!1,codeBlock:!1,underline:!1,hardBreak:!1,link:{openOnClick:!1,autolink:!0}}),Ee.extend({content:`paragraph`}),De.extend({content:`paragraph`}),Te.configure({placeholder:c.article.body}),Ze,Ge,...rt],content:q(v.blocks),onUpdate:({editor:t,transaction:n})=>{n.docChanged&&(S(X(t.getJSON()).flatMap(e=>e.type===`image`?[e.file]:[])),e.edited())}}),[re,T]=(0,H.useState)(()=>v.blocks);(0,H.useEffect)(()=>{e.bind(()=>X(C.getJSON()),e=>{C.commands.setContent(q(e.blocks),{emitUpdate:!1}),S(e.blocks.flatMap(e=>e.type===`image`?[e.file]:[])),T(e.blocks)})},[e,C]),(0,H.useEffect)(()=>{C.setEditable(!_)},[C,_]),(0,H.useEffect)(()=>{let e=()=>{T(X(C.getJSON()))};return C.on(`update`,e),()=>{C.off(`update`,e)}},[C]);let E=(0,H.useDeferredValue)(re),{agent:D,following:O}=t(),de=ee(),k=(()=>{if(D?.doing===void 0)return;let t=g.landed,n=t!==void 0&&t.at>=D.at-at;return n&&D.source?.path===o?t.spot:(D.source?We(D.source,{path:o,text:e.session.text}):void 0)??(n?t.spot:void 0)})(),A=k&&`block`in k?k.block:void 0,j=k!==void 0&&`head`in k,M=D?de(D):``,N=(0,H.useRef)(null),P=(0,H.useRef)(null);(0,H.useEffect)(()=>{Ke(C,A===void 0?null:{block:A,label:M})},[C,A,M]),(0,H.useEffect)(()=>{let e=P.current;if(e){for(let t of e.querySelectorAll(`[data-agent]`))t.removeAttribute(`data-agent`);(j?e.querySelector(`.ak-x-a-title`):A===void 0?null:e.querySelector(`.ak-x-a-body`)?.children[A])?.setAttribute(`data-agent`,``)}},[A,j,E,g.title]),(0,H.useEffect)(()=>{O&&k!==void 0&&((j?N.current?.querySelector(`.ak-x-a-title`):N.current?.querySelector(`[data-testid="x-agent-block"]`))?.scrollIntoView({block:`nearest`}),P.current?.querySelector(`[data-agent]`)?.scrollIntoView({block:`nearest`}))},[O,k,j,g.landed]),i({hold:()=>Promise.resolve({key:`${o}@${String(e.session.text.length)}`,what:`The X article ${o}`,source:{path:o}}),locate:t=>{let n=z(e.session.text),r=e=>{let t=e?.getBoundingClientRect();return t&&t.width>0&&t.height>0?{x:t.x,y:t.y,width:t.width,height:t.height}:void 0},i=s(t)[0],a=e=>e!==void 0&&i!==void 0&&i.x>=e.x&&i.x<=e.x+e.width&&i.y>=e.y&&i.y<=e.y+e.height,c=[{as:`where it is written`,head:[`.ak-x-a-cover`,`.ak-x-a-title`].map(e=>N.current?.querySelector(e)),blocks:[...N.current?.querySelector(`.ak-x-a-body .ProseMirror`)?.children??[]]},{as:`as X will show it`,head:[`.ak-x-a-cover`,`.ak-x-a-title`].map(e=>P.current?.querySelector(e)),blocks:[...P.current?.querySelector(`.ak-x-a-body`)?.children??[]]}],u=e=>e===void 0?{}:{line:e.from,...e.to>e.from?{endLine:e.to}:{}},d=c.some(e=>e.head.some(e=>{let n=r(e);return n!==void 0&&l(t,n)})),f=new Set;for(let e of c)e.blocks.forEach((e,n)=>{let i=r(e);i&&l(t,i)&&f.add(n)});let p=[...d?[{name:`the article's head: its cover and title`,source:{path:o,...u(n.head)},...g.title===``?{}:{text:g.title}}]:[],...[...f].sort((e,t)=>e-t).map(e=>{let t=c.map(t=>t.blocks[e]?.textContent.trim()??``).find(e=>e!==``)??``;return{name:`block ${String(e+1)} of the article`,source:{path:o,...u(n.lines[e])},...t===``?{}:{text:t}}})],m=c.flatMap(e=>{if(e.head.some(e=>a(r(e))))return[`in the article's head, ${e.as}`];let t=e.blocks.findIndex(e=>a(r(e)));return t<0?[]:[`in block ${String(t+1)}, ${e.as}`]}).at(0);return Promise.resolve({elements:p,...m===void 0?{}:{where:m}})}});let F=se(n,[...g.cover?[g.cover.file]:[],...ne]),I=(0,H.useMemo)(()=>e=>F.get(e),[F]),[me,he]=(0,H.useState)(!1),L=g.cover===void 0?void 0:F.get(g.cover.file),R=f?.theme===`dark`,ge=(0,U.jsxs)(x,{open:me,onOpenChange:he,children:[(0,U.jsx)(`div`,{className:`group/cover ak-x-a-cover relative`,children:g.cover===void 0?_?null:(0,U.jsx)(y,{asChild:!0,children:(0,U.jsxs)(u,{variant:`ghost`,className:`size-full flex-col gap-2 rounded-none text-[13px] font-normal text-[var(--ak-x-muted)]`,"aria-label":c.article.addCover,children:[(0,U.jsx)(`span`,{className:`grid size-10 place-items-center rounded-full bg-[var(--ak-x-muted)] text-[var(--ak-x-bg)]`,children:(0,U.jsx)(w,{className:`size-5`})}),c.article.coverHint]})}):(0,U.jsxs)(U.Fragment,{children:[L===void 0?(0,U.jsx)(`div`,{className:`ak-x-made`,children:g.cover.file}):(0,U.jsx)(`img`,{src:L,alt:g.cover.alt??``}),_?null:(0,U.jsxs)(`div`,{className:`absolute top-2 right-2 flex gap-1`,children:[(0,U.jsx)(y,{asChild:!0,children:(0,U.jsxs)(u,{variant:`secondary`,size:`sm`,className:`bg-media/75 text-on-media`,children:[(0,U.jsx)(w,{}),c.article.changeCover]})}),(0,U.jsx)(u,{variant:`secondary`,size:`icon-sm`,className:`bg-media/75 text-on-media`,"aria-label":c.article.removeCover,title:c.article.removeCover,onClick:()=>{e.edited({cover:void 0})},children:(0,U.jsx)(d,{})})]})]})}),(0,U.jsx)(b,{className:`w-auto`,align:`center`,children:(0,U.jsx)(ie,{self:o,types:Le,testId:`x-picker`,onPick:t=>{he(!1),e.edited({cover:{file:le(n,t)}})}})})]}),ve=(0,U.jsxs)(`div`,{ref:N,className:`ak-x ak-x-editing min-h-full`,"data-theme":R?`dark`:`light`,children:[ge,(0,U.jsxs)(`div`,{className:`ak-x-e-page`,children:[(0,U.jsxs)(`div`,{className:`relative`,children:[(0,U.jsx)(`textarea`,{className:`ak-x-a-title block w-full resize-none border-0 bg-transparent p-0 outline-none [field-sizing:content] placeholder:text-[var(--ak-x-muted)]`,value:g.title,placeholder:c.article.title,"aria-label":c.article.title,readOnly:_,dir:`auto`,"data-testid":`x-article-title`,onChange:t=>{_||e.edited({title:t.target.value.replace(/\n/gu,` `)})}}),D&&j?(0,U.jsx)(ye,{"data-testid":`x-agent-head`,label:M,className:`-inset-1`}):null]}),(0,U.jsxs)(`div`,{className:`ak-x-e-by`,children:[(0,U.jsx)(`div`,{className:`ak-x-avatar`,"aria-hidden":`true`,children:V.name.slice(0,1)}),(0,U.jsx)(`span`,{className:`ak-x-name`,children:V.name}),(0,U.jsxs)(`span`,{className:`ak-x-handle`,children:[`@`,V.handle]})]}),(0,U.jsx)(Qe.Provider,{value:I,children:(0,U.jsx)(`div`,{className:`ak-x-a-body`,"data-testid":`x-article-body`,children:(0,U.jsx)(pe,{editor:C,className:`[&_.ProseMirror]:outline-none`})})})]})]}),be=(0,U.jsx)(`div`,{ref:P,className:`ak-x ak-x-column`,"data-theme":R?`dark`:`light`,children:(0,U.jsx)(je,{article:{title:g.title,...g.cover?{cover:g.cover}:{},blocks:E},source:I})});return(0,U.jsxs)(`div`,{className:`bg-background flex size-full flex-col`,"data-testid":`x-article-editor`,children:[(0,U.jsx)(te,{start:(0,U.jsxs)(U.Fragment,{children:[_||m!==`edit`?null:(0,U.jsx)(dt,{editor:C,dir:n,entry:o}),(0,U.jsx)(`span`,{className:`flex-1`}),(0,U.jsx)(ue,{pane:m,onPane:h})]}),saved:{state:g.state},exports:{}}),(0,U.jsx)(Fe.Provider,{value:ae,children:(0,U.jsxs)(`div`,{className:`relative flex min-h-0 flex-1 flex-col`,children:[g.held?(0,U.jsx)(_e,{}):null,(0,U.jsx)(oe,{pane:m,edit:ve,preview:be,width:600,background:R?`#000000`:`#ffffff`,testId:`x-preview`})]})})]})}function pt(){let e=B(),t=o(),n=r(),i=n?.item.entry,a=n?.item.dir??``,[s,c]=(0,H.useState)(),[l,u]=(0,H.useState)(!1);return(0,H.useEffect)(()=>{if(i===void 0)return;let e,n=!0;return f.open(t,i).then(t=>{n?(e=t,c(new st(t))):t.close()},e=>{reportError(e),n&&u(!0)}),()=>{n=!1,e?.close()}},[t,i]),l?(0,U.jsx)(`div`,{className:`flex size-full`,"data-testid":`x-article-editor`,"data-state":`updating`,children:(0,U.jsx)(ve,{})}):!s||i===void 0?(0,U.jsx)(`div`,{className:`text-muted-foreground flex size-full items-center justify-center text-sm`,"data-testid":`x-article-editor`,"data-state":`loading`,children:e.article.loading}):(0,U.jsx)(ft,{doc:s,dir:a,entry:i})}export{pt as XArticleEditor,pt as default,X as fromDoc,q as toDoc};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-COiEfhsA.js";import{a as t,b as n,c as r,f as i,m as a,s as o}from"./react-Byupo4pA.js";import{Et as s,ht as c,kt as l,n as u,t as d}from"./x-BAJilkKD.js";import{C as f,S as p,T as m}from"./schemas-DlRAoVtq.js";import{t as ee}from"./session--OJYv_B7.js";import{t as h}from"./jsx-runtime-DePvh3-m.js";import{A as g,C as _,f as te,j as v,m as y,u as ne}from"./bar-button-CJmpgNg4.js";import{C as b,E as re,S as x,b as S,i as ie}from"./dist-
|
|
1
|
+
import{i as e}from"./rolldown-runtime-COiEfhsA.js";import{a as t,b as n,c as r,f as i,m as a,s as o}from"./react-Byupo4pA.js";import{Et as s,ht as c,kt as l,n as u,t as d}from"./x-BAJilkKD.js";import{C as f,S as p,T as m}from"./schemas-DlRAoVtq.js";import{t as ee}from"./session--OJYv_B7.js";import{t as h}from"./jsx-runtime-DePvh3-m.js";import{A as g,C as _,f as te,j as v,m as y,u as ne}from"./bar-button-CJmpgNg4.js";import{C as b,E as re,S as x,b as S,i as ie}from"./dist-6ugUm4dS.js";import{t as C}from"./createLucideIcon-euu7Wcd9.js";import{n as w,t as T}from"./italic-BV7iHxoP.js";import{t as E}from"./copy-SoaMYqsN.js";import{d as ae,i as oe,l as se,n as ce,o as le,r as ue,s as de,t as fe,u as pe}from"./panes-BShVq38A.js";import{t as D}from"./link-CFOv3nz-.js";import{D as O,O as k}from"./dist-DQ6RpEJD.js";import{t as A}from"./minus-ngE8owxs.js";import{O as j,T as M,n as N,nt as P,o as me,s as he,t as ge,ut as F}from"./dist-QLXI7XGS.js";import{n as I,t as L}from"./undo-2-DCbMWoug.js";import{a as _e,y as ve}from"./index-D-MNVykg.js";import{n as ye,t as be}from"./updating-Cbxw83_O.js";import{t as xe}from"./collaborator-CbTacvkB.js";import{S as Se,h as Ce,i as we,n as Te,p as Ee,r as De,t as Oe}from"./syntax-C0iPON60.js";import{i as ke,n as Ae,t as je}from"./syntax-BIEjjMZL.js";import{r as Me,t as Ne}from"./browser-DEGNhKTV.js";import{n as Pe,r as Fe,t as Ie}from"./lib-KOEbW83T.js";import{c as Le,n as Re,s as ze,t as Be}from"./dist-DIJnhQFK.js";import{i as Ve,n as He,r as Ue,t as We}from"./dist-B8_6sJ_V.js";import{d as Ge,l as Ke,o as qe,p as Je,r as Ye,s as Xe,t as R,v as Ze}from"./words-DgMuEmDO.js";var Qe=C(`braces`,[[`path`,{d:`M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1`,key:`ezmyqa`}],[`path`,{d:`M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1`,key:`e1hn23`}]]),$e=C(`square-play`,[[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}],[`path`,{d:`M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z`,key:`kmsa83`}]]),et=p({title:f().optional(),cover:m([f().min(1),p({file:f().min(1),alt:f().optional()})]).optional()}),tt=/^<br\s*\/?>$/iu,nt=/^https?:\/\/\S+$/u,rt={extensions:[Fe([`yaml`]),Te(),Oe(),De(),je()],mdastExtensions:[Ie([`yaml`]),Ce(),Ee(),we(),Ae()]},it={extensions:[Pe([`yaml`])],bullet:`-`,emphasis:`*`,strong:`*`,rule:`-`,fences:!0},at=e=>`${e.bold===!0?`b`:``}${e.italic===!0?`i`:``}|${e.link??``}`;function z(e){let t=[];for(let n of e){if(n.text===``)continue;let e=t.at(-1);e&&at(e)===at(n)?t[t.length-1]={...e,text:e.text+n.text}:t.push(n)}return t}function B(e,t,n,r={}){let i=[];for(let a of e)switch(a.type){case`text`:i.push({...r,text:a.value.replace(/\n/gu,` `)});break;case`break`:i.push({...r,text:` `});break;case`strong`:i.push(...B(a.children,t,n,{...r,bold:!0}));break;case`emphasis`:i.push(...B(a.children,t,n,{...r,italic:!0}));break;case`delete`:t(a,`strikethrough, which LinkedIn's article editor does not have: its words are kept plain`),i.push(...B(a.children,t,n,r));break;case`link`:i.push(...B(a.children,t,n,{...r,link:a.url}));break;case`linkReference`:{let e=n.get(a.identifier.toLowerCase());i.push(...B(a.children,t,n,e===void 0?r:{...r,link:e}));break}case`footnoteReference`:t(a,`a footnote, which LinkedIn's blocks do not hold: write the source in the words, or as a link`);break;case`inlineCode`:t(a,`inline code, which LinkedIn's article editor does not style: write it as words, or as a code snippet`),i.push({...r,text:a.value});break;case`image`:t(a,`a picture inside a line: LinkedIn takes a picture as a block of its own, on a line of its own`);break;case`inlineMath`:t(a,`an equation, which LinkedIn's article editor does not have`),i.push({...r,text:a.value});break;case`html`:/^<!--[\s\S]*-->$/u.test(a.value.trim())||t(a,`HTML, which LinkedIn's blocks do not hold`);break;default:t(a,`${a.type}, which LinkedIn's blocks do not hold`)}return i}var ot=e=>e.map(e=>`value`in e?e.value:`children`in e?ot(e.children):``).join(``);function V(e){let t=[],n=(e,n)=>{t.push({rule:`article-markup`,line:e.position?.start.line,message:`${n[0]?.toUpperCase()??``}${n.slice(1)}.`})},r=Se(e,rt),i=new Map;for(let e of r.children)e.type===`definition`&&i.set(e.identifier.toLowerCase(),e.url);let a=``,o,s=[],c=e=>{switch(e.type){case`yaml`:{let n;try{n=Ne(e.value)}catch(n){t.push({rule:`format`,line:e.position?.start.line,message:`Its front matter is not YAML: ${n.message.split(`
|
|
2
2
|
`)[0]??``}`});break}let r=et.safeParse(n??{});if(!r.success){t.push({rule:`format`,line:e.position?.start.line,message:`Its front matter takes a title and a cover (a file, or { file, alt }): ${r.error.issues.map(e=>e.message).join(`; `)}`});break}a=r.data.title??``;let i=r.data.cover;o=i===void 0?void 0:typeof i==`string`?{file:i}:{file:i.file,...i.alt===void 0?{}:{alt:i.alt}};break}case`paragraph`:{let t=e.children.filter(e=>e.type===`image`),r=e.children.filter(e=>e.type!==`image`&&e.type!==`break`&&(e.type!==`text`||e.value.trim()!==``));if(t.length>0&&r.length===0){for(let e of t)s.push({type:`image`,file:e.url,...e.alt?{alt:e.alt}:{},...e.title?{caption:e.title}:{}});break}let a=ot(e.children).trim();if(!a.includes(` `)&&nt.test(a)){s.push({type:`embed`,url:a});break}s.push({type:`paragraph`,runs:z(B(e.children,n,i))});break}case`heading`:e.depth>2&&n(e,`a heading of level ${String(e.depth)}: LinkedIn has a Heading (#) and a Subheading (##)`),s.push({type:e.depth===1?`h1`:`h2`,runs:z(B(e.children,n,i))});break;case`blockquote`:for(let t of e.children)t.type===`paragraph`?s.push({type:`quote`,runs:z(B(t.children,n,i))}):n(t,`${t.type} inside a quote, which LinkedIn's blocks do not hold`);break;case`list`:{let t=[],r=()=>{t.length>0&&s.push({type:e.ordered===!0?`ol`:`ul`,items:t}),t=[]};e.ordered===!0&&(e.start??1)!==1&&n(e,`a numbered list starting at ${String(e.start)}: LinkedIn numbers every list from 1`);for(let a of e.children){let[e,...o]=a.children;t.push(e?.type===`paragraph`?z(B(e.children,n,i)):[]),e!==void 0&&e.type!==`paragraph`&&o.unshift(e);for(let e of o)e.type===`list`?n(e,`a list inside a list: LinkedIn's lists are one level deep`):(r(),c(e))}r();break}case`thematicBreak`:s.push({type:`divider`});break;case`code`:s.push({type:`code`,code:e.value,...e.lang?{lang:e.lang}:{}});break;case`math`:n(e,`an equation, which LinkedIn's article editor does not have`);break;case`table`:n(e,`a table, which LinkedIn's article editor does not have: a picture of it, or a list`);break;case`html`:if(tt.test(e.value.trim())){s.push({type:`paragraph`,runs:[]});break}if(/^<!--[\s\S]*-->$/u.test(e.value.trim()))break;n(e,`HTML, which LinkedIn's blocks do not hold (an empty line is <br /> alone)`);break;case`definition`:break;case`footnoteDefinition`:n(e,`a footnote, which LinkedIn's blocks do not hold: write the source in the words, or as a link`);break;default:n(e,`${e.type}, which LinkedIn's blocks do not hold`)}},l=[],u;for(let e of r.children){let t=s.length;c(e);let n=e.position&&{from:e.position.start.line,to:e.position.end.line};if(n){e.type===`yaml`&&(u=n);for(let e=t;e<s.length;e++)l.push(n)}}return a.trim()===``&&t.push({rule:`article-title`,line:1,message:`It has no title: LinkedIn's article needs one (front matter: title: …).`}),{article:{title:a,...o?{cover:o}:{},blocks:s},issues:t,lines:l,head:u}}function H(e){return e.map(e=>{let t={type:`text`,value:e.text};return e.italic===!0&&(t={type:`emphasis`,children:[t]}),e.bold===!0&&(t={type:`strong`,children:[t]}),e.link!==void 0&&(t={type:`link`,url:e.link,children:[t]}),t})}function st(e){switch(e.type){case`paragraph`:return e.runs.every(e=>e.text===``)?[{type:`html`,value:`<br />`}]:[{type:`paragraph`,children:H(e.runs)}];case`h1`:case`h2`:return[{type:`heading`,depth:e.type===`h1`?1:2,children:H(e.runs)}];case`quote`:return[{type:`blockquote`,children:[{type:`paragraph`,children:H(e.runs)}]}];case`ul`:case`ol`:return[{type:`list`,ordered:e.type===`ol`,spread:!1,children:e.items.map(e=>({type:`listItem`,spread:!1,children:[{type:`paragraph`,children:H(e)}]}))}];case`image`:return[{type:`paragraph`,children:[{type:`image`,url:e.file,alt:e.alt??``,title:e.caption??null}]}];case`embed`:return[{type:`paragraph`,children:[{type:`text`,value:e.url}]}];case`divider`:return[{type:`thematicBreak`}];case`code`:return[{type:`code`,lang:e.lang??null,value:e.code}]}}function ct(e){let t={title:e.title};e.cover&&(t.cover=e.cover.alt===void 0?e.cover.file:{file:e.cover.file,alt:e.cover.alt});let n={type:`root`,children:[{type:`yaml`,value:Me(t,{lineWidth:0}).trimEnd()},...e.blocks.flatMap(st)]};return ke(n,it)}var U=e=>e.replace(/&/gu,`&`).replace(/</gu,`<`).replace(/>/gu,`>`).replace(/"/gu,`"`);function W(e){return e.map(e=>{let t=U(e.text);return e.italic===!0&&(t=`<em>${t}</em>`),e.bold===!0&&(t=`<strong>${t}</strong>`),e.link!==void 0&&(t=`<a href="${U(e.link)}">${t}</a>`),t}).join(``)}function lt(e,t){switch(e.type){case`paragraph`:return e.runs.length===0?`<p><br></p>`:`<p>${W(e.runs)}</p>`;case`h1`:return`<h1>${W(e.runs)}</h1>`;case`h2`:return`<h2>${W(e.runs)}</h2>`;case`quote`:return`<blockquote><p>${W(e.runs)}</p></blockquote>`;case`ul`:case`ol`:return`<${e.type}>${e.items.map(e=>`<li>${W(e)}</li>`).join(``)}</${e.type}>`;case`code`:return`<pre><code>${U(e.code)}</code></pre>`;case`divider`:return`<hr>`;case`embed`:return`<p><a href="${U(e.url)}">${U(e.url)}</a></p>`;case`image`:{let n=t(e.file);return n===void 0?``:`<figure><img src="${U(n)}" alt="${U(e.alt??``)}">${e.caption===void 0?``:`<figcaption>${U(e.caption)}</figcaption>`}</figure>`}}}function ut(e,t=()=>void 0){return e.blocks.map(e=>lt(e,t)).filter(e=>e!==``).join(`
|
|
3
3
|
`)}function dt(e){return e.blocks.map(e=>{switch(e.type){case`ul`:return e.items.map(e=>`• ${e.map(e=>e.text).join(``)}`).join(`
|
|
4
4
|
`);case`ol`:return e.items.map((e,t)=>`${String(t+1)}. ${e.map(e=>e.text).join(``)}`).join(`
|
package/editor-web/assets/{blockDiagram-RJAE7QA3-BizcUGOM.js → blockDiagram-RJAE7QA3-yXhlfxbH.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{n as t,t as n}from"./d3-selection-COWvaQNI.js";import{a as r,b as i,c as a,it as o,s,y as c}from"./chunk-DSNLSHJZ-DT0xT8Wf.js";import{t as l}from"./channel-dyUtlVPg.js";import"./chunk-YZO67HFG-D5XAAFWm.js";import{A as u,B as d,C as f,D as p,E as m,F as h,G as g,H as _,I as v,K as y,L as b,M as x,N as S,O as C,P as w,R as T,S as E,T as D,U as O,V as k,W as A,b as j,j as M,k as ee,u as te,w as ne,z as re}from"./chunk-7S6XSTFO-BfdG9NNW.js";import"./chunk-AQDTSKZB-BCzZMoTJ.js";import{t as ie}from"./chunk-5VM5RSS4-ZNzvKenW.js";import{t as ae}from"./chunk-DUW6YSOI-Dgx8z5s3.js";import"./chunk-UHW7PFBP-DWEwoyPy.js";import{i as oe,n as se,o as ce,r as le,s as ue}from"./chunk-J5ZVWO5B-oDCd-gWO.js";import"./chunk-HAGFOTED-Bg3-EotU.js";import{i as de,r as fe}from"./chunk-ZAUX2LTX-CPsdaisO.js";import{a as pe,c as me,i as he,l as ge}from"./chunk-WQQL4CDK-4PTupr9T.js";import{t as _e}from"./graphlib-DS17s2tU.js";function ve(e){return Array.isArray(e)}function ye(e){if(g(e))return e;let t=A(e);if(!be(e))return{};if(ve(e)){let t=Array.from(e);return e.length>0&&typeof e[0]==`string`&&y(e,`index`)&&(t.index=e.index,t.input=e.input),t}if(j(e)){let t=e,n=t.constructor;return new n(t.buffer,t.byteOffset,t.length)}if(t===`[object ArrayBuffer]`)return new ArrayBuffer(e.byteLength);if(t===`[object DataView]`){let t=e,n=t.buffer,r=t.byteOffset,i=t.byteLength,a=new ArrayBuffer(i),o=new Uint8Array(n,r,i);return new Uint8Array(a).set(o),new DataView(a)}if(t===`[object Boolean]`||t===`[object Number]`||t===`[object String]`){let n=e.constructor,r=new n(e.valueOf());return t===`[object String]`?Se(r,e):N(r,e),r}if(t===`[object Date]`)return new Date(Number(e));if(t===`[object RegExp]`){let t=e,n=new RegExp(t.source,t.flags);return n.lastIndex=t.lastIndex,n}if(t===`[object Symbol]`)return Object(Symbol.prototype.valueOf.call(e));if(t===`[object Map]`){let t=e,n=new Map;return t.forEach((e,t)=>{n.set(t,e)}),n}if(t===`[object Set]`){let t=e,n=new Set;return t.forEach(e=>{n.add(e)}),n}if(t===`[object Arguments]`){let t=e,n={};return N(n,t),n.length=t.length,n[Symbol.iterator]=t[Symbol.iterator],n}let n={};return Ce(n,e),N(n,e),xe(n,e),n}function be(e){switch(A(e)){case E:case ne:case f:case m:case D:case p:case C:case ee:case x:case u:case M:case S:case w:case h:case v:case b:case T:case re:case _:case O:case d:case k:return!0;default:return!1}}function N(e,t){for(let n in t)y(t,n)&&(e[n]=t[n])}function xe(e,t){let n=Object.getOwnPropertySymbols(t);for(let r=0;r<n.length;r++){let i=n[r];Object.prototype.propertyIsEnumerable.call(t,i)&&(e[i]=t[i])}}function Se(e,t){let n=t.valueOf().length;for(let r in t)y(t,r)&&(Number.isNaN(Number(r))||Number(r)>=n)&&(e[r]=t[r])}function Ce(e,t){let n=Object.getPrototypeOf(t);n!==null&&typeof t.constructor==`function`&&Object.setPrototypeOf(e,n)}var P=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,15],r=[1,7],i=[1,13],a=[1,14],o=[1,19],s=[1,16],c=[1,17],l=[1,18],u=[8,30],d=[8,10,21,28,29,30,31,39,43,46],f=[1,23],p=[1,24],m=[8,10,15,16,21,28,29,30,31,39,43,46],h=[8,10,15,16,21,27,28,29,30,31,39,43,46],g=[1,49],_={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:`error`,4:`SPACELINE`,5:`NL`,7:`SPACE`,8:`EOF`,10:`BLOCK_DIAGRAM_KEY`,15:`LINK`,16:`START_LINK`,17:`LINK_LABEL`,18:`STR`,21:`SPACE_BLOCK`,27:`SIZE`,28:`COLUMNS`,29:`id-block`,30:`end`,31:`NODE_ID`,34:`DIR`,35:`NODE_DSTART`,36:`NODE_DEND`,37:`BLOCK_ARROW_START`,38:`BLOCK_ARROW_END`,39:`classDef`,40:`CLASSDEF_ID`,41:`CLASSDEF_STYLEOPTS`,42:`DEFAULT`,43:`class`,44:`CLASSENTITY_IDS`,45:`STYLECLASS`,46:`style`,47:`STYLE_ENTITY_IDS`,48:`STYLE_DEFINITION_DATA`},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 4:r.getLogger().debug(`Rule: separator (NL) `);break;case 5:r.getLogger().debug(`Rule: separator (Space) `);break;case 6:r.getLogger().debug(`Rule: separator (EOF) `);break;case 7:r.getLogger().debug(`Rule: hierarchy: `,a[s-1]),r.setHierarchy(a[s-1]);break;case 8:r.getLogger().debug(`Stop NL `);break;case 9:r.getLogger().debug(`Stop EOF `);break;case 10:r.getLogger().debug(`Stop NL2 `);break;case 11:r.getLogger().debug(`Stop EOF2 `);break;case 12:r.getLogger().debug(`Rule: statement: `,a[s]),this.$=typeof a[s].length==`number`?a[s]:[a[s]];break;case 13:r.getLogger().debug(`Rule: statement #2: `,a[s-1]),this.$=[a[s-1]].concat(a[s]);break;case 14:r.getLogger().debug(`Rule: link: `,a[s],e),this.$={edgeTypeStr:a[s],label:``};break;case 15:r.getLogger().debug(`Rule: LABEL link: `,a[s-3],a[s-1],a[s]),this.$={edgeTypeStr:a[s],label:a[s-1]};break;case 18:let t=parseInt(a[s]),n=r.generateId();this.$={id:n,type:`space`,label:``,width:t,children:[]};break;case 23:r.getLogger().debug(`Rule: (nodeStatement link node) `,a[s-2],a[s-1],a[s],` typestr: `,a[s-1].edgeTypeStr);let i=r.edgeStrToEdgeData(a[s-1].edgeTypeStr),o=r.edgeStrToEdgeStartData(a[s-1].edgeTypeStr),c=r.edgeStrToThickness(a[s-1].edgeTypeStr),l=r.edgeStrToPattern(a[s-1].edgeTypeStr);this.$=[{id:a[s-2].id,label:a[s-2].label,type:a[s-2].type,directions:a[s-2].directions},{id:a[s-2].id+`-`+a[s].id,start:a[s-2].id,end:a[s].id,label:a[s-1].label,type:`edge`,thickness:c,pattern:l,directions:a[s].directions,arrowTypeEnd:i,arrowTypeStart:o},{id:a[s].id,label:a[s].label,type:r.typeStr2Type(a[s].typeStr),directions:a[s].directions}];break;case 24:r.getLogger().debug(`Rule: nodeStatement (abc88 node size) `,a[s-1],a[s]),this.$={id:a[s-1].id,label:a[s-1].label,type:r.typeStr2Type(a[s-1].typeStr),directions:a[s-1].directions,widthInColumns:parseInt(a[s],10)};break;case 25:r.getLogger().debug(`Rule: nodeStatement (node) `,a[s]),this.$={id:a[s].id,label:a[s].label,type:r.typeStr2Type(a[s].typeStr),directions:a[s].directions,widthInColumns:1};break;case 26:r.getLogger().debug(`APA123`,this?this:`na`),r.getLogger().debug(`COLUMNS: `,a[s]),this.$={type:`column-setting`,columns:a[s]===`auto`?-1:parseInt(a[s])};break;case 27:r.getLogger().debug(`Rule: id-block statement : `,a[s-2],a[s-1]),r.generateId(),this.$={...a[s-2],type:`composite`,children:a[s-1]};break;case 28:r.getLogger().debug(`Rule: blockStatement : `,a[s-2],a[s-1],a[s]);let u=r.generateId();this.$={id:u,type:`composite`,label:``,children:a[s-1]};break;case 29:r.getLogger().debug(`Rule: node (NODE_ID separator): `,a[s]),this.$={id:a[s]};break;case 30:r.getLogger().debug(`Rule: node (NODE_ID nodeShapeNLabel separator): `,a[s-1],a[s]),this.$={id:a[s-1],label:a[s].label,typeStr:a[s].typeStr,directions:a[s].directions};break;case 31:r.getLogger().debug(`Rule: dirList: `,a[s]),this.$=[a[s]];break;case 32:r.getLogger().debug(`Rule: dirList: `,a[s-1],a[s]),this.$=[a[s-1]].concat(a[s]);break;case 33:r.getLogger().debug(`Rule: nodeShapeNLabel: `,a[s-2],a[s-1],a[s]),this.$={typeStr:a[s-2]+a[s],label:a[s-1]};break;case 34:r.getLogger().debug(`Rule: BLOCK_ARROW nodeShapeNLabel: `,a[s-3],a[s-2],` #3:`,a[s-1],a[s]),this.$={typeStr:a[s-3]+a[s],label:a[s-2],directions:a[s-1]};break;case 35:case 36:this.$={type:`classDef`,id:a[s-1].trim(),css:a[s].trim()};break;case 37:this.$={type:`applyClass`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 38:this.$={type:`applyStyles`,id:a[s-1].trim(),stylesStr:a[s].trim()}}},`anonymous`),table:[{9:1,10:[1,2]},{1:[3]},{10:n,11:3,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:o,39:s,43:c,46:l},{8:[1,20]},t(u,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:n,21:r,28:i,29:a,31:o,39:s,43:c,46:l}),t(d,[2,16],{14:22,15:f,16:p}),t(d,[2,17]),t(d,[2,18]),t(d,[2,19]),t(d,[2,20]),t(d,[2,21]),t(d,[2,22]),t(m,[2,25],{27:[1,25]}),t(d,[2,26]),{19:26,26:12,31:o},{10:n,11:27,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:o,39:s,43:c,46:l},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},t(h,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},t(u,[2,13]),{26:35,31:o},{31:[2,14]},{17:[1,36]},t(m,[2,24]),{10:n,11:37,13:4,14:22,15:f,16:p,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:o,39:s,43:c,46:l},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},t(h,[2,30]),{18:[1,43]},{18:[1,44]},t(m,[2,23]),{18:[1,45]},{30:[1,46]},t(d,[2,28]),t(d,[2,35]),t(d,[2,36]),t(d,[2,37]),t(d,[2,38]),{36:[1,47]},{33:48,34:g},{15:[1,50]},t(d,[2,27]),t(h,[2,33]),{38:[1,51]},{33:52,34:g,38:[2,31]},{31:[2,15]},t(h,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],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:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
|
|
1
|
+
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{n as t,t as n}from"./d3-selection-COWvaQNI.js";import{a as r,b as i,c as a,it as o,s,y as c}from"./chunk-DSNLSHJZ-zku9oeG3.js";import{t as l}from"./channel-Bhb-_8v6.js";import"./chunk-YZO67HFG-BLe7PXER.js";import{A as u,B as d,C as f,D as p,E as m,F as h,G as g,H as _,I as v,K as y,L as b,M as x,N as S,O as C,P as w,R as T,S as E,T as D,U as O,V as k,W as A,b as j,j as M,k as ee,u as te,w as ne,z as re}from"./chunk-7S6XSTFO-CgZAazgt.js";import"./chunk-AQDTSKZB-BRU84phF.js";import{t as ie}from"./chunk-5VM5RSS4-ZNzvKenW.js";import{t as ae}from"./chunk-DUW6YSOI-Dgx8z5s3.js";import"./chunk-UHW7PFBP-DrYeJo1e.js";import{i as oe,n as se,o as ce,r as le,s as ue}from"./chunk-J5ZVWO5B-oDCd-gWO.js";import"./chunk-HAGFOTED-CaUkBv_0.js";import{i as de,r as fe}from"./chunk-ZAUX2LTX-ByaeSIre.js";import{a as pe,c as me,i as he,l as ge}from"./chunk-WQQL4CDK-DZ0tyi9F.js";import{t as _e}from"./graphlib-DS17s2tU.js";function ve(e){return Array.isArray(e)}function ye(e){if(g(e))return e;let t=A(e);if(!be(e))return{};if(ve(e)){let t=Array.from(e);return e.length>0&&typeof e[0]==`string`&&y(e,`index`)&&(t.index=e.index,t.input=e.input),t}if(j(e)){let t=e,n=t.constructor;return new n(t.buffer,t.byteOffset,t.length)}if(t===`[object ArrayBuffer]`)return new ArrayBuffer(e.byteLength);if(t===`[object DataView]`){let t=e,n=t.buffer,r=t.byteOffset,i=t.byteLength,a=new ArrayBuffer(i),o=new Uint8Array(n,r,i);return new Uint8Array(a).set(o),new DataView(a)}if(t===`[object Boolean]`||t===`[object Number]`||t===`[object String]`){let n=e.constructor,r=new n(e.valueOf());return t===`[object String]`?Se(r,e):N(r,e),r}if(t===`[object Date]`)return new Date(Number(e));if(t===`[object RegExp]`){let t=e,n=new RegExp(t.source,t.flags);return n.lastIndex=t.lastIndex,n}if(t===`[object Symbol]`)return Object(Symbol.prototype.valueOf.call(e));if(t===`[object Map]`){let t=e,n=new Map;return t.forEach((e,t)=>{n.set(t,e)}),n}if(t===`[object Set]`){let t=e,n=new Set;return t.forEach(e=>{n.add(e)}),n}if(t===`[object Arguments]`){let t=e,n={};return N(n,t),n.length=t.length,n[Symbol.iterator]=t[Symbol.iterator],n}let n={};return Ce(n,e),N(n,e),xe(n,e),n}function be(e){switch(A(e)){case E:case ne:case f:case m:case D:case p:case C:case ee:case x:case u:case M:case S:case w:case h:case v:case b:case T:case re:case _:case O:case d:case k:return!0;default:return!1}}function N(e,t){for(let n in t)y(t,n)&&(e[n]=t[n])}function xe(e,t){let n=Object.getOwnPropertySymbols(t);for(let r=0;r<n.length;r++){let i=n[r];Object.prototype.propertyIsEnumerable.call(t,i)&&(e[i]=t[i])}}function Se(e,t){let n=t.valueOf().length;for(let r in t)y(t,r)&&(Number.isNaN(Number(r))||Number(r)>=n)&&(e[r]=t[r])}function Ce(e,t){let n=Object.getPrototypeOf(t);n!==null&&typeof t.constructor==`function`&&Object.setPrototypeOf(e,n)}var P=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,15],r=[1,7],i=[1,13],a=[1,14],o=[1,19],s=[1,16],c=[1,17],l=[1,18],u=[8,30],d=[8,10,21,28,29,30,31,39,43,46],f=[1,23],p=[1,24],m=[8,10,15,16,21,28,29,30,31,39,43,46],h=[8,10,15,16,21,27,28,29,30,31,39,43,46],g=[1,49],_={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:`error`,4:`SPACELINE`,5:`NL`,7:`SPACE`,8:`EOF`,10:`BLOCK_DIAGRAM_KEY`,15:`LINK`,16:`START_LINK`,17:`LINK_LABEL`,18:`STR`,21:`SPACE_BLOCK`,27:`SIZE`,28:`COLUMNS`,29:`id-block`,30:`end`,31:`NODE_ID`,34:`DIR`,35:`NODE_DSTART`,36:`NODE_DEND`,37:`BLOCK_ARROW_START`,38:`BLOCK_ARROW_END`,39:`classDef`,40:`CLASSDEF_ID`,41:`CLASSDEF_STYLEOPTS`,42:`DEFAULT`,43:`class`,44:`CLASSENTITY_IDS`,45:`STYLECLASS`,46:`style`,47:`STYLE_ENTITY_IDS`,48:`STYLE_DEFINITION_DATA`},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 4:r.getLogger().debug(`Rule: separator (NL) `);break;case 5:r.getLogger().debug(`Rule: separator (Space) `);break;case 6:r.getLogger().debug(`Rule: separator (EOF) `);break;case 7:r.getLogger().debug(`Rule: hierarchy: `,a[s-1]),r.setHierarchy(a[s-1]);break;case 8:r.getLogger().debug(`Stop NL `);break;case 9:r.getLogger().debug(`Stop EOF `);break;case 10:r.getLogger().debug(`Stop NL2 `);break;case 11:r.getLogger().debug(`Stop EOF2 `);break;case 12:r.getLogger().debug(`Rule: statement: `,a[s]),this.$=typeof a[s].length==`number`?a[s]:[a[s]];break;case 13:r.getLogger().debug(`Rule: statement #2: `,a[s-1]),this.$=[a[s-1]].concat(a[s]);break;case 14:r.getLogger().debug(`Rule: link: `,a[s],e),this.$={edgeTypeStr:a[s],label:``};break;case 15:r.getLogger().debug(`Rule: LABEL link: `,a[s-3],a[s-1],a[s]),this.$={edgeTypeStr:a[s],label:a[s-1]};break;case 18:let t=parseInt(a[s]),n=r.generateId();this.$={id:n,type:`space`,label:``,width:t,children:[]};break;case 23:r.getLogger().debug(`Rule: (nodeStatement link node) `,a[s-2],a[s-1],a[s],` typestr: `,a[s-1].edgeTypeStr);let i=r.edgeStrToEdgeData(a[s-1].edgeTypeStr),o=r.edgeStrToEdgeStartData(a[s-1].edgeTypeStr),c=r.edgeStrToThickness(a[s-1].edgeTypeStr),l=r.edgeStrToPattern(a[s-1].edgeTypeStr);this.$=[{id:a[s-2].id,label:a[s-2].label,type:a[s-2].type,directions:a[s-2].directions},{id:a[s-2].id+`-`+a[s].id,start:a[s-2].id,end:a[s].id,label:a[s-1].label,type:`edge`,thickness:c,pattern:l,directions:a[s].directions,arrowTypeEnd:i,arrowTypeStart:o},{id:a[s].id,label:a[s].label,type:r.typeStr2Type(a[s].typeStr),directions:a[s].directions}];break;case 24:r.getLogger().debug(`Rule: nodeStatement (abc88 node size) `,a[s-1],a[s]),this.$={id:a[s-1].id,label:a[s-1].label,type:r.typeStr2Type(a[s-1].typeStr),directions:a[s-1].directions,widthInColumns:parseInt(a[s],10)};break;case 25:r.getLogger().debug(`Rule: nodeStatement (node) `,a[s]),this.$={id:a[s].id,label:a[s].label,type:r.typeStr2Type(a[s].typeStr),directions:a[s].directions,widthInColumns:1};break;case 26:r.getLogger().debug(`APA123`,this?this:`na`),r.getLogger().debug(`COLUMNS: `,a[s]),this.$={type:`column-setting`,columns:a[s]===`auto`?-1:parseInt(a[s])};break;case 27:r.getLogger().debug(`Rule: id-block statement : `,a[s-2],a[s-1]),r.generateId(),this.$={...a[s-2],type:`composite`,children:a[s-1]};break;case 28:r.getLogger().debug(`Rule: blockStatement : `,a[s-2],a[s-1],a[s]);let u=r.generateId();this.$={id:u,type:`composite`,label:``,children:a[s-1]};break;case 29:r.getLogger().debug(`Rule: node (NODE_ID separator): `,a[s]),this.$={id:a[s]};break;case 30:r.getLogger().debug(`Rule: node (NODE_ID nodeShapeNLabel separator): `,a[s-1],a[s]),this.$={id:a[s-1],label:a[s].label,typeStr:a[s].typeStr,directions:a[s].directions};break;case 31:r.getLogger().debug(`Rule: dirList: `,a[s]),this.$=[a[s]];break;case 32:r.getLogger().debug(`Rule: dirList: `,a[s-1],a[s]),this.$=[a[s-1]].concat(a[s]);break;case 33:r.getLogger().debug(`Rule: nodeShapeNLabel: `,a[s-2],a[s-1],a[s]),this.$={typeStr:a[s-2]+a[s],label:a[s-1]};break;case 34:r.getLogger().debug(`Rule: BLOCK_ARROW nodeShapeNLabel: `,a[s-3],a[s-2],` #3:`,a[s-1],a[s]),this.$={typeStr:a[s-3]+a[s],label:a[s-2],directions:a[s-1]};break;case 35:case 36:this.$={type:`classDef`,id:a[s-1].trim(),css:a[s].trim()};break;case 37:this.$={type:`applyClass`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 38:this.$={type:`applyStyles`,id:a[s-1].trim(),stylesStr:a[s].trim()}}},`anonymous`),table:[{9:1,10:[1,2]},{1:[3]},{10:n,11:3,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:o,39:s,43:c,46:l},{8:[1,20]},t(u,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:n,21:r,28:i,29:a,31:o,39:s,43:c,46:l}),t(d,[2,16],{14:22,15:f,16:p}),t(d,[2,17]),t(d,[2,18]),t(d,[2,19]),t(d,[2,20]),t(d,[2,21]),t(d,[2,22]),t(m,[2,25],{27:[1,25]}),t(d,[2,26]),{19:26,26:12,31:o},{10:n,11:27,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:o,39:s,43:c,46:l},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},t(h,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},t(u,[2,13]),{26:35,31:o},{31:[2,14]},{17:[1,36]},t(m,[2,24]),{10:n,11:37,13:4,14:22,15:f,16:p,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:o,39:s,43:c,46:l},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},t(h,[2,30]),{18:[1,43]},{18:[1,44]},t(m,[2,23]),{18:[1,45]},{30:[1,46]},t(d,[2,28]),t(d,[2,35]),t(d,[2,36]),t(d,[2,37]),t(d,[2,38]),{36:[1,47]},{33:48,34:g},{15:[1,50]},t(d,[2,27]),t(h,[2,33]),{38:[1,51]},{33:52,34:g,38:[2,31]},{31:[2,15]},t(h,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],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:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
|
|
2
2
|
`+h.showPosition()+`
|
|
3
3
|
Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.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--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};_.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){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={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];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},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);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);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,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},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;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).
|
|
4
4
|
`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{n as t,t as n}from"./d3-selection-COWvaQNI.js";import{H as r,U as i,_ as a,b as o,c as s,r as l,s as u,v as d,z as f}from"./chunk-DSNLSHJZ-DT0xT8Wf.js";import"./chunk-YZO67HFG-D5XAAFWm.js";import{n as p,r as m,v as h}from"./chunk-7S6XSTFO-BfdG9NNW.js";import"./chunk-AQDTSKZB-BCzZMoTJ.js";import"./chunk-UHW7PFBP-DWEwoyPy.js";import{r as g,s as _}from"./chunk-HAGFOTED-Bg3-EotU.js";import{a as v}from"./chunk-55XCU76K-CYrZ6_Q7.js";var y=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,24],r=[1,25],i=[1,26],a=[1,27],o=[1,28],s=[1,63],l=[1,64],u=[1,65],d=[1,66],f=[1,67],p=[1,68],m=[1,69],h=[1,29],g=[1,30],_=[1,31],v=[1,32],y=[1,33],b=[1,34],x=[1,35],S=[1,36],C=[1,37],w=[1,38],T=[1,39],E=[1,40],D=[1,41],O=[1,42],k=[1,43],A=[1,44],j=[1,45],M=[1,46],N=[1,47],P=[1,48],F=[1,50],I=[1,51],L=[1,52],R=[1,53],z=[1,54],B=[1,55],V=[1,56],H=[1,57],U=[1,58],W=[1,59],G=[1,60],ee=[14,42],te=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],ne=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],K=[1,82],q=[1,83],J=[1,84],Y=[1,85],X=[12,14,42],re=[12,14,33,42],ie=[12,14,33,42,76,77,79,80],Z=[12,33],ae=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],oe={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:`error`,6:`direction_tb`,7:`direction_bt`,8:`direction_rl`,9:`direction_lr`,11:`C4_CONTEXT`,12:`NEWLINE`,14:`EOF`,15:`C4_CONTAINER`,16:`C4_COMPONENT`,17:`C4_DYNAMIC`,18:`C4_DEPLOYMENT`,22:`title`,23:`accDescription`,24:`acc_title`,25:`acc_title_value`,26:`acc_descr`,27:`acc_descr_value`,28:`acc_descr_multiline_value`,33:`LBRACE`,34:`ENTERPRISE_BOUNDARY`,36:`SYSTEM_BOUNDARY`,37:`BOUNDARY`,38:`CONTAINER_BOUNDARY`,39:`NODE`,40:`NODE_L`,41:`NODE_R`,42:`RBRACE`,44:`PERSON`,45:`PERSON_EXT`,46:`SYSTEM`,47:`SYSTEM_DB`,48:`SYSTEM_QUEUE`,49:`SYSTEM_EXT`,50:`SYSTEM_EXT_DB`,51:`SYSTEM_EXT_QUEUE`,52:`CONTAINER`,53:`CONTAINER_DB`,54:`CONTAINER_QUEUE`,55:`CONTAINER_EXT`,56:`CONTAINER_EXT_DB`,57:`CONTAINER_EXT_QUEUE`,58:`COMPONENT`,59:`COMPONENT_DB`,60:`COMPONENT_QUEUE`,61:`COMPONENT_EXT`,62:`COMPONENT_EXT_DB`,63:`COMPONENT_EXT_QUEUE`,64:`REL`,65:`BIREL`,66:`REL_U`,67:`REL_D`,68:`REL_L`,69:`REL_R`,70:`REL_B`,71:`REL_INDEX`,72:`UPDATE_EL_STYLE`,73:`UPDATE_REL_STYLE`,74:`UPDATE_LAYOUT_CONFIG`,76:`STR`,77:`STR_KEY`,78:`STR_VALUE`,79:`ATTRIBUTE`,80:`ATTRIBUTE_EMPTY`},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 3:r.setDirection(`TB`);break;case 4:r.setDirection(`BT`);break;case 5:r.setDirection(`RL`);break;case 6:r.setDirection(`LR`);break;case 8:case 9:case 10:case 11:case 12:r.setC4Type(a[s-3]);break;case 19:r.setTitle(a[s].substring(6)),this.$=a[s].substring(6);break;case 20:r.setAccDescription(a[s].substring(15)),this.$=a[s].substring(15);break;case 21:this.$=a[s].trim(),r.setTitle(this.$);break;case 22:case 23:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 28:a[s].splice(2,0,`ENTERPRISE`),r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 29:a[s].splice(2,0,`SYSTEM`),r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 30:r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 31:a[s].splice(2,0,`CONTAINER`),r.addContainerBoundary(...a[s]),this.$=a[s];break;case 32:r.addDeploymentNode(`node`,...a[s]),this.$=a[s];break;case 33:r.addDeploymentNode(`nodeL`,...a[s]),this.$=a[s];break;case 34:r.addDeploymentNode(`nodeR`,...a[s]),this.$=a[s];break;case 35:r.popBoundaryParseStack();break;case 39:r.addPersonOrSystem(`person`,...a[s]),this.$=a[s];break;case 40:r.addPersonOrSystem(`external_person`,...a[s]),this.$=a[s];break;case 41:r.addPersonOrSystem(`system`,...a[s]),this.$=a[s];break;case 42:r.addPersonOrSystem(`system_db`,...a[s]),this.$=a[s];break;case 43:r.addPersonOrSystem(`system_queue`,...a[s]),this.$=a[s];break;case 44:r.addPersonOrSystem(`external_system`,...a[s]),this.$=a[s];break;case 45:r.addPersonOrSystem(`external_system_db`,...a[s]),this.$=a[s];break;case 46:r.addPersonOrSystem(`external_system_queue`,...a[s]),this.$=a[s];break;case 47:r.addContainer(`container`,...a[s]),this.$=a[s];break;case 48:r.addContainer(`container_db`,...a[s]),this.$=a[s];break;case 49:r.addContainer(`container_queue`,...a[s]),this.$=a[s];break;case 50:r.addContainer(`external_container`,...a[s]),this.$=a[s];break;case 51:r.addContainer(`external_container_db`,...a[s]),this.$=a[s];break;case 52:r.addContainer(`external_container_queue`,...a[s]),this.$=a[s];break;case 53:r.addComponent(`component`,...a[s]),this.$=a[s];break;case 54:r.addComponent(`component_db`,...a[s]),this.$=a[s];break;case 55:r.addComponent(`component_queue`,...a[s]),this.$=a[s];break;case 56:r.addComponent(`external_component`,...a[s]),this.$=a[s];break;case 57:r.addComponent(`external_component_db`,...a[s]),this.$=a[s];break;case 58:r.addComponent(`external_component_queue`,...a[s]),this.$=a[s];break;case 60:r.addRel(`rel`,...a[s]),this.$=a[s];break;case 61:r.addRel(`birel`,...a[s]),this.$=a[s];break;case 62:r.addRel(`rel_u`,...a[s]),this.$=a[s];break;case 63:r.addRel(`rel_d`,...a[s]),this.$=a[s];break;case 64:r.addRel(`rel_l`,...a[s]),this.$=a[s];break;case 65:r.addRel(`rel_r`,...a[s]),this.$=a[s];break;case 66:r.addRel(`rel_b`,...a[s]),this.$=a[s];break;case 67:a[s].splice(0,1),r.addRel(`rel`,...a[s]),this.$=a[s];break;case 68:r.updateElStyle(`update_el_style`,...a[s]),this.$=a[s];break;case 69:r.updateRelStyle(`update_rel_style`,...a[s]),this.$=a[s];break;case 70:r.updateLayoutConfig(`update_layout_config`,...a[s]),this.$=a[s];break;case 71:this.$=[a[s]];break;case 72:a[s].unshift(a[s-1]),this.$=a[s];break;case 73:case 75:this.$=a[s].trim();break;case 74:let e={};e[a[s-1].trim()]=a[s].trim(),this.$=e;break;case 76:this.$=``}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:n,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{13:70,19:20,20:21,21:22,22:n,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{13:71,19:20,20:21,21:22,22:n,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{13:72,19:20,20:21,21:22,22:n,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{13:73,19:20,20:21,21:22,22:n,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{14:[1,74]},t(ee,[2,13],{43:23,29:49,30:61,32:62,20:75,34:s,36:l,37:u,38:d,39:f,40:p,41:m,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G}),t(ee,[2,14]),t(te,[2,16],{12:[1,76]}),t(ee,[2,36],{12:[1,77]}),t(ne,[2,19]),t(ne,[2,20]),{25:[1,78]},{27:[1,79]},t(ne,[2,23]),{35:80,75:81,76:K,77:q,79:J,80:Y},{35:86,75:81,76:K,77:q,79:J,80:Y},{35:87,75:81,76:K,77:q,79:J,80:Y},{35:88,75:81,76:K,77:q,79:J,80:Y},{35:89,75:81,76:K,77:q,79:J,80:Y},{35:90,75:81,76:K,77:q,79:J,80:Y},{35:91,75:81,76:K,77:q,79:J,80:Y},{35:92,75:81,76:K,77:q,79:J,80:Y},{35:93,75:81,76:K,77:q,79:J,80:Y},{35:94,75:81,76:K,77:q,79:J,80:Y},{35:95,75:81,76:K,77:q,79:J,80:Y},{35:96,75:81,76:K,77:q,79:J,80:Y},{35:97,75:81,76:K,77:q,79:J,80:Y},{35:98,75:81,76:K,77:q,79:J,80:Y},{35:99,75:81,76:K,77:q,79:J,80:Y},{35:100,75:81,76:K,77:q,79:J,80:Y},{35:101,75:81,76:K,77:q,79:J,80:Y},{35:102,75:81,76:K,77:q,79:J,80:Y},{35:103,75:81,76:K,77:q,79:J,80:Y},{35:104,75:81,76:K,77:q,79:J,80:Y},t(X,[2,59]),{35:105,75:81,76:K,77:q,79:J,80:Y},{35:106,75:81,76:K,77:q,79:J,80:Y},{35:107,75:81,76:K,77:q,79:J,80:Y},{35:108,75:81,76:K,77:q,79:J,80:Y},{35:109,75:81,76:K,77:q,79:J,80:Y},{35:110,75:81,76:K,77:q,79:J,80:Y},{35:111,75:81,76:K,77:q,79:J,80:Y},{35:112,75:81,76:K,77:q,79:J,80:Y},{35:113,75:81,76:K,77:q,79:J,80:Y},{35:114,75:81,76:K,77:q,79:J,80:Y},{35:115,75:81,76:K,77:q,79:J,80:Y},{20:116,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{12:[1,118],33:[1,117]},{35:119,75:81,76:K,77:q,79:J,80:Y},{35:120,75:81,76:K,77:q,79:J,80:Y},{35:121,75:81,76:K,77:q,79:J,80:Y},{35:122,75:81,76:K,77:q,79:J,80:Y},{35:123,75:81,76:K,77:q,79:J,80:Y},{35:124,75:81,76:K,77:q,79:J,80:Y},{35:125,75:81,76:K,77:q,79:J,80:Y},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t(ee,[2,15]),t(te,[2,17],{21:22,19:130,22:n,23:r,24:i,26:a,28:o}),t(ee,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:n,23:r,24:i,26:a,28:o,34:s,36:l,37:u,38:d,39:f,40:p,41:m,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G}),t(ne,[2,21]),t(ne,[2,22]),t(X,[2,39]),t(re,[2,71],{75:81,35:132,76:K,77:q,79:J,80:Y}),t(ie,[2,73]),{78:[1,133]},t(ie,[2,75]),t(ie,[2,76]),t(X,[2,40]),t(X,[2,41]),t(X,[2,42]),t(X,[2,43]),t(X,[2,44]),t(X,[2,45]),t(X,[2,46]),t(X,[2,47]),t(X,[2,48]),t(X,[2,49]),t(X,[2,50]),t(X,[2,51]),t(X,[2,52]),t(X,[2,53]),t(X,[2,54]),t(X,[2,55]),t(X,[2,56]),t(X,[2,57]),t(X,[2,58]),t(X,[2,60]),t(X,[2,61]),t(X,[2,62]),t(X,[2,63]),t(X,[2,64]),t(X,[2,65]),t(X,[2,66]),t(X,[2,67]),t(X,[2,68]),t(X,[2,69]),t(X,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(Z,[2,28]),t(Z,[2,29]),t(Z,[2,30]),t(Z,[2,31]),t(Z,[2,32]),t(Z,[2,33]),t(Z,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t(te,[2,18]),t(ee,[2,38]),t(re,[2,72]),t(ie,[2,74]),t(X,[2,24]),t(X,[2,35]),t(ae,[2,25]),t(ae,[2,26],{12:[1,138]}),t(ae,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,l=``,u=0,d=0,f=0,p=2,m=1,h=o.slice.call(arguments,1),g=Object.create(this.lexer),_={yy:{}};for(var v in this.yy)Object.prototype.hasOwnProperty.call(this.yy,v)&&(_.yy[v]=this.yy[v]);g.setInput(t,_.yy),_.yy.lexer=g,_.yy.parser=this,g.yylloc===void 0&&(g.yylloc={});var y=g.yylloc;o.push(y);var b=g.options&&g.options.ranges;this.parseError=typeof _.yy.parseError==`function`?_.yy.parseError:Object.getPrototypeOf(this).parseError;function x(e){r.length-=2*e,a.length-=e,o.length-=e}e(x,`popStack`);function S(){var e=i.pop()||g.lex()||m;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(S,`lex`);for(var C,w,T,E,D,O={},k,A,j,M;;){if(T=r[r.length-1],this.defaultActions[T]?E=this.defaultActions[T]:(C??=S(),E=s[T]&&s[T][C]),E===void 0||!E.length||!E[0]){var N=``;for(k in M=[],s[T])this.terminals_[k]&&k>p&&M.push(`'`+this.terminals_[k]+`'`);N=g.showPosition?`Parse error on line `+(u+1)+`:
|
|
1
|
+
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{n as t,t as n}from"./d3-selection-COWvaQNI.js";import{H as r,U as i,_ as a,b as o,c as s,r as l,s as u,v as d,z as f}from"./chunk-DSNLSHJZ-zku9oeG3.js";import"./chunk-YZO67HFG-BLe7PXER.js";import{n as p,r as m,v as h}from"./chunk-7S6XSTFO-CgZAazgt.js";import"./chunk-AQDTSKZB-BRU84phF.js";import"./chunk-UHW7PFBP-DrYeJo1e.js";import{r as g,s as _}from"./chunk-HAGFOTED-CaUkBv_0.js";import{a as v}from"./chunk-55XCU76K-mKuMXpnC.js";var y=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,24],r=[1,25],i=[1,26],a=[1,27],o=[1,28],s=[1,63],l=[1,64],u=[1,65],d=[1,66],f=[1,67],p=[1,68],m=[1,69],h=[1,29],g=[1,30],_=[1,31],v=[1,32],y=[1,33],b=[1,34],x=[1,35],S=[1,36],C=[1,37],w=[1,38],T=[1,39],E=[1,40],D=[1,41],O=[1,42],k=[1,43],A=[1,44],j=[1,45],M=[1,46],N=[1,47],P=[1,48],F=[1,50],I=[1,51],L=[1,52],R=[1,53],z=[1,54],B=[1,55],V=[1,56],H=[1,57],U=[1,58],W=[1,59],G=[1,60],ee=[14,42],te=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],ne=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],K=[1,82],q=[1,83],J=[1,84],Y=[1,85],X=[12,14,42],re=[12,14,33,42],ie=[12,14,33,42,76,77,79,80],Z=[12,33],ae=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],oe={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:`error`,6:`direction_tb`,7:`direction_bt`,8:`direction_rl`,9:`direction_lr`,11:`C4_CONTEXT`,12:`NEWLINE`,14:`EOF`,15:`C4_CONTAINER`,16:`C4_COMPONENT`,17:`C4_DYNAMIC`,18:`C4_DEPLOYMENT`,22:`title`,23:`accDescription`,24:`acc_title`,25:`acc_title_value`,26:`acc_descr`,27:`acc_descr_value`,28:`acc_descr_multiline_value`,33:`LBRACE`,34:`ENTERPRISE_BOUNDARY`,36:`SYSTEM_BOUNDARY`,37:`BOUNDARY`,38:`CONTAINER_BOUNDARY`,39:`NODE`,40:`NODE_L`,41:`NODE_R`,42:`RBRACE`,44:`PERSON`,45:`PERSON_EXT`,46:`SYSTEM`,47:`SYSTEM_DB`,48:`SYSTEM_QUEUE`,49:`SYSTEM_EXT`,50:`SYSTEM_EXT_DB`,51:`SYSTEM_EXT_QUEUE`,52:`CONTAINER`,53:`CONTAINER_DB`,54:`CONTAINER_QUEUE`,55:`CONTAINER_EXT`,56:`CONTAINER_EXT_DB`,57:`CONTAINER_EXT_QUEUE`,58:`COMPONENT`,59:`COMPONENT_DB`,60:`COMPONENT_QUEUE`,61:`COMPONENT_EXT`,62:`COMPONENT_EXT_DB`,63:`COMPONENT_EXT_QUEUE`,64:`REL`,65:`BIREL`,66:`REL_U`,67:`REL_D`,68:`REL_L`,69:`REL_R`,70:`REL_B`,71:`REL_INDEX`,72:`UPDATE_EL_STYLE`,73:`UPDATE_REL_STYLE`,74:`UPDATE_LAYOUT_CONFIG`,76:`STR`,77:`STR_KEY`,78:`STR_VALUE`,79:`ATTRIBUTE`,80:`ATTRIBUTE_EMPTY`},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 3:r.setDirection(`TB`);break;case 4:r.setDirection(`BT`);break;case 5:r.setDirection(`RL`);break;case 6:r.setDirection(`LR`);break;case 8:case 9:case 10:case 11:case 12:r.setC4Type(a[s-3]);break;case 19:r.setTitle(a[s].substring(6)),this.$=a[s].substring(6);break;case 20:r.setAccDescription(a[s].substring(15)),this.$=a[s].substring(15);break;case 21:this.$=a[s].trim(),r.setTitle(this.$);break;case 22:case 23:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 28:a[s].splice(2,0,`ENTERPRISE`),r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 29:a[s].splice(2,0,`SYSTEM`),r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 30:r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 31:a[s].splice(2,0,`CONTAINER`),r.addContainerBoundary(...a[s]),this.$=a[s];break;case 32:r.addDeploymentNode(`node`,...a[s]),this.$=a[s];break;case 33:r.addDeploymentNode(`nodeL`,...a[s]),this.$=a[s];break;case 34:r.addDeploymentNode(`nodeR`,...a[s]),this.$=a[s];break;case 35:r.popBoundaryParseStack();break;case 39:r.addPersonOrSystem(`person`,...a[s]),this.$=a[s];break;case 40:r.addPersonOrSystem(`external_person`,...a[s]),this.$=a[s];break;case 41:r.addPersonOrSystem(`system`,...a[s]),this.$=a[s];break;case 42:r.addPersonOrSystem(`system_db`,...a[s]),this.$=a[s];break;case 43:r.addPersonOrSystem(`system_queue`,...a[s]),this.$=a[s];break;case 44:r.addPersonOrSystem(`external_system`,...a[s]),this.$=a[s];break;case 45:r.addPersonOrSystem(`external_system_db`,...a[s]),this.$=a[s];break;case 46:r.addPersonOrSystem(`external_system_queue`,...a[s]),this.$=a[s];break;case 47:r.addContainer(`container`,...a[s]),this.$=a[s];break;case 48:r.addContainer(`container_db`,...a[s]),this.$=a[s];break;case 49:r.addContainer(`container_queue`,...a[s]),this.$=a[s];break;case 50:r.addContainer(`external_container`,...a[s]),this.$=a[s];break;case 51:r.addContainer(`external_container_db`,...a[s]),this.$=a[s];break;case 52:r.addContainer(`external_container_queue`,...a[s]),this.$=a[s];break;case 53:r.addComponent(`component`,...a[s]),this.$=a[s];break;case 54:r.addComponent(`component_db`,...a[s]),this.$=a[s];break;case 55:r.addComponent(`component_queue`,...a[s]),this.$=a[s];break;case 56:r.addComponent(`external_component`,...a[s]),this.$=a[s];break;case 57:r.addComponent(`external_component_db`,...a[s]),this.$=a[s];break;case 58:r.addComponent(`external_component_queue`,...a[s]),this.$=a[s];break;case 60:r.addRel(`rel`,...a[s]),this.$=a[s];break;case 61:r.addRel(`birel`,...a[s]),this.$=a[s];break;case 62:r.addRel(`rel_u`,...a[s]),this.$=a[s];break;case 63:r.addRel(`rel_d`,...a[s]),this.$=a[s];break;case 64:r.addRel(`rel_l`,...a[s]),this.$=a[s];break;case 65:r.addRel(`rel_r`,...a[s]),this.$=a[s];break;case 66:r.addRel(`rel_b`,...a[s]),this.$=a[s];break;case 67:a[s].splice(0,1),r.addRel(`rel`,...a[s]),this.$=a[s];break;case 68:r.updateElStyle(`update_el_style`,...a[s]),this.$=a[s];break;case 69:r.updateRelStyle(`update_rel_style`,...a[s]),this.$=a[s];break;case 70:r.updateLayoutConfig(`update_layout_config`,...a[s]),this.$=a[s];break;case 71:this.$=[a[s]];break;case 72:a[s].unshift(a[s-1]),this.$=a[s];break;case 73:case 75:this.$=a[s].trim();break;case 74:let e={};e[a[s-1].trim()]=a[s].trim(),this.$=e;break;case 76:this.$=``}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:n,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{13:70,19:20,20:21,21:22,22:n,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{13:71,19:20,20:21,21:22,22:n,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{13:72,19:20,20:21,21:22,22:n,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{13:73,19:20,20:21,21:22,22:n,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{14:[1,74]},t(ee,[2,13],{43:23,29:49,30:61,32:62,20:75,34:s,36:l,37:u,38:d,39:f,40:p,41:m,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G}),t(ee,[2,14]),t(te,[2,16],{12:[1,76]}),t(ee,[2,36],{12:[1,77]}),t(ne,[2,19]),t(ne,[2,20]),{25:[1,78]},{27:[1,79]},t(ne,[2,23]),{35:80,75:81,76:K,77:q,79:J,80:Y},{35:86,75:81,76:K,77:q,79:J,80:Y},{35:87,75:81,76:K,77:q,79:J,80:Y},{35:88,75:81,76:K,77:q,79:J,80:Y},{35:89,75:81,76:K,77:q,79:J,80:Y},{35:90,75:81,76:K,77:q,79:J,80:Y},{35:91,75:81,76:K,77:q,79:J,80:Y},{35:92,75:81,76:K,77:q,79:J,80:Y},{35:93,75:81,76:K,77:q,79:J,80:Y},{35:94,75:81,76:K,77:q,79:J,80:Y},{35:95,75:81,76:K,77:q,79:J,80:Y},{35:96,75:81,76:K,77:q,79:J,80:Y},{35:97,75:81,76:K,77:q,79:J,80:Y},{35:98,75:81,76:K,77:q,79:J,80:Y},{35:99,75:81,76:K,77:q,79:J,80:Y},{35:100,75:81,76:K,77:q,79:J,80:Y},{35:101,75:81,76:K,77:q,79:J,80:Y},{35:102,75:81,76:K,77:q,79:J,80:Y},{35:103,75:81,76:K,77:q,79:J,80:Y},{35:104,75:81,76:K,77:q,79:J,80:Y},t(X,[2,59]),{35:105,75:81,76:K,77:q,79:J,80:Y},{35:106,75:81,76:K,77:q,79:J,80:Y},{35:107,75:81,76:K,77:q,79:J,80:Y},{35:108,75:81,76:K,77:q,79:J,80:Y},{35:109,75:81,76:K,77:q,79:J,80:Y},{35:110,75:81,76:K,77:q,79:J,80:Y},{35:111,75:81,76:K,77:q,79:J,80:Y},{35:112,75:81,76:K,77:q,79:J,80:Y},{35:113,75:81,76:K,77:q,79:J,80:Y},{35:114,75:81,76:K,77:q,79:J,80:Y},{35:115,75:81,76:K,77:q,79:J,80:Y},{20:116,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G},{12:[1,118],33:[1,117]},{35:119,75:81,76:K,77:q,79:J,80:Y},{35:120,75:81,76:K,77:q,79:J,80:Y},{35:121,75:81,76:K,77:q,79:J,80:Y},{35:122,75:81,76:K,77:q,79:J,80:Y},{35:123,75:81,76:K,77:q,79:J,80:Y},{35:124,75:81,76:K,77:q,79:J,80:Y},{35:125,75:81,76:K,77:q,79:J,80:Y},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t(ee,[2,15]),t(te,[2,17],{21:22,19:130,22:n,23:r,24:i,26:a,28:o}),t(ee,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:n,23:r,24:i,26:a,28:o,34:s,36:l,37:u,38:d,39:f,40:p,41:m,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:U,73:W,74:G}),t(ne,[2,21]),t(ne,[2,22]),t(X,[2,39]),t(re,[2,71],{75:81,35:132,76:K,77:q,79:J,80:Y}),t(ie,[2,73]),{78:[1,133]},t(ie,[2,75]),t(ie,[2,76]),t(X,[2,40]),t(X,[2,41]),t(X,[2,42]),t(X,[2,43]),t(X,[2,44]),t(X,[2,45]),t(X,[2,46]),t(X,[2,47]),t(X,[2,48]),t(X,[2,49]),t(X,[2,50]),t(X,[2,51]),t(X,[2,52]),t(X,[2,53]),t(X,[2,54]),t(X,[2,55]),t(X,[2,56]),t(X,[2,57]),t(X,[2,58]),t(X,[2,60]),t(X,[2,61]),t(X,[2,62]),t(X,[2,63]),t(X,[2,64]),t(X,[2,65]),t(X,[2,66]),t(X,[2,67]),t(X,[2,68]),t(X,[2,69]),t(X,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(Z,[2,28]),t(Z,[2,29]),t(Z,[2,30]),t(Z,[2,31]),t(Z,[2,32]),t(Z,[2,33]),t(Z,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t(te,[2,18]),t(ee,[2,38]),t(re,[2,72]),t(ie,[2,74]),t(X,[2,24]),t(X,[2,35]),t(ae,[2,25]),t(ae,[2,26],{12:[1,138]}),t(ae,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,l=``,u=0,d=0,f=0,p=2,m=1,h=o.slice.call(arguments,1),g=Object.create(this.lexer),_={yy:{}};for(var v in this.yy)Object.prototype.hasOwnProperty.call(this.yy,v)&&(_.yy[v]=this.yy[v]);g.setInput(t,_.yy),_.yy.lexer=g,_.yy.parser=this,g.yylloc===void 0&&(g.yylloc={});var y=g.yylloc;o.push(y);var b=g.options&&g.options.ranges;this.parseError=typeof _.yy.parseError==`function`?_.yy.parseError:Object.getPrototypeOf(this).parseError;function x(e){r.length-=2*e,a.length-=e,o.length-=e}e(x,`popStack`);function S(){var e=i.pop()||g.lex()||m;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(S,`lex`);for(var C,w,T,E,D,O={},k,A,j,M;;){if(T=r[r.length-1],this.defaultActions[T]?E=this.defaultActions[T]:(C??=S(),E=s[T]&&s[T][C]),E===void 0||!E.length||!E[0]){var N=``;for(k in M=[],s[T])this.terminals_[k]&&k>p&&M.push(`'`+this.terminals_[k]+`'`);N=g.showPosition?`Parse error on line `+(u+1)+`:
|
|
2
2
|
`+g.showPosition()+`
|
|
3
3
|
Expecting `+M.join(`, `)+`, got '`+(this.terminals_[C]||C)+`'`:`Parse error on line `+(u+1)+`: Unexpected `+(C==m?`end of input`:`'`+(this.terminals_[C]||C)+`'`),this.parseError(N,{text:g.match,token:this.terminals_[C]||C,line:g.yylineno,loc:y,expected:M})}if(E[0]instanceof Array&&E.length>1)throw Error(`Parse Error: multiple actions possible at state: `+T+`, token: `+C);switch(E[0]){case 1:r.push(C),a.push(g.yytext),o.push(g.yylloc),r.push(E[1]),C=null,w?(C=w,w=null):(d=g.yyleng,l=g.yytext,u=g.yylineno,y=g.yylloc,f>0&&f--);break;case 2:if(A=this.productions_[E[1]][1],O.$=a[a.length-A],O._$={first_line:o[o.length-(A||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(A||1)].first_column,last_column:o[o.length-1].last_column},b&&(O._$.range=[o[o.length-(A||1)].range[0],o[o.length-1].range[1]]),D=this.performAction.apply(O,[l,d,u,_.yy,E[1],a,o].concat(h)),D!==void 0)return D;A&&(r=r.slice(0,-1*A*2),a=a.slice(0,-1*A),o=o.slice(0,-1*A)),r.push(this.productions_[E[1]][0]),a.push(O.$),o.push(O._$),j=s[r[r.length-2]][r[r.length-1]],r.push(j);break;case 3:return!0}}return!0},`parse`)};oe.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){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={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];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},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);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);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,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},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;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).
|
|
4
4
|
`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
|