allyhub 0.11.0 → 0.13.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/CHANGELOG.md +16 -0
- package/bin/allyhub.js +2 -2
- package/dist/commands/frames/report.js +1 -1
- package/dist/commands/frames.js +11 -11
- package/dist/main.js +6 -6
- package/dist/node_modules/@allyhub/3d-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/audio/dist/render.js +1 -1
- package/dist/node_modules/@allyhub/audio/package.json +1 -1
- package/dist/node_modules/@allyhub/browser/package.json +1 -1
- package/dist/node_modules/@allyhub/build/dist/media.js +1 -1
- 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/dist/chart-file.js +1 -1
- package/dist/node_modules/@allyhub/chart/dist/chart-xml.js +3 -2
- package/dist/node_modules/@allyhub/chart/dist/chart.js +2 -1
- package/dist/node_modules/@allyhub/chart/dist/color.js +2 -0
- package/dist/node_modules/@allyhub/chart/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/chart/dist/svg.js +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/call.js +4 -4
- package/dist/node_modules/@allyhub/cloud/dist/client.d.ts +2 -0
- package/dist/node_modules/@allyhub/cloud/dist/client.js +1 -1
- package/dist/node_modules/@allyhub/cloud/dist/config.d.ts +6 -0
- package/dist/node_modules/@allyhub/cloud/dist/config.js +1 -1
- package/dist/node_modules/@allyhub/cloud/dist/credentials.js +2 -2
- package/dist/node_modules/@allyhub/cloud/dist/device.d.ts +2 -0
- package/dist/node_modules/@allyhub/cloud/dist/device.js +1 -1
- package/dist/node_modules/@allyhub/cloud/dist/records.d.ts +1 -1
- package/dist/node_modules/@allyhub/cloud/dist/signin.d.ts +11 -3
- package/dist/node_modules/@allyhub/cloud/dist/signin.js +2 -2
- package/dist/node_modules/@allyhub/cloud/dist/uploads.d.ts +1 -1
- package/dist/node_modules/@allyhub/cloud/dist/uploads.js +2 -2
- 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/live.js +1 -1
- package/dist/node_modules/@allyhub/dev-server/dist/server.js +1 -1
- 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 +130 -0
- package/dist/node_modules/@allyhub/formats/dist/data/deck-code.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/gen.d.ts +3 -1
- package/dist/node_modules/@allyhub/formats/dist/data/gen.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/sheet.d.ts +512 -166
- package/dist/node_modules/@allyhub/formats/dist/data/sheet.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/slides.d.ts +2523 -136
- package/dist/node_modules/@allyhub/formats/dist/data/slides.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/schemas.d.ts +931 -87
- package/dist/node_modules/@allyhub/formats/dist/schemas.js +1 -1
- package/dist/node_modules/@allyhub/formats/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/dist/run.d.ts +6 -1
- package/dist/node_modules/@allyhub/media/dist/run.js +2 -2
- 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/ooxml/dist/color.js +1 -1
- package/dist/node_modules/@allyhub/ooxml/dist/ext.js +1 -1
- package/dist/node_modules/@allyhub/ooxml/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/ooxml/dist/transform.js +2 -0
- package/dist/node_modules/@allyhub/ooxml/package.json +5 -1
- package/dist/node_modules/@allyhub/piece/dist/gen.d.ts +4 -4
- package/dist/node_modules/@allyhub/piece/dist/media.d.ts +2 -2
- package/dist/node_modules/@allyhub/piece/package.json +1 -1
- package/dist/node_modules/@allyhub/project/dist/part-keys.js +1 -1
- package/dist/node_modules/@allyhub/project/package.json +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/account.d.ts +49 -5
- package/dist/node_modules/@allyhub/protocol/dist/account.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/auth.d.ts +56 -0
- package/dist/node_modules/@allyhub/protocol/dist/auth.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/cloud.d.ts +72 -9
- package/dist/node_modules/@allyhub/protocol/dist/cloud.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/editor.d.ts +35 -20
- package/dist/node_modules/@allyhub/protocol/dist/editor.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/errors.d.ts +7 -0
- package/dist/node_modules/@allyhub/protocol/dist/errors.js +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/events.d.ts +328 -0
- package/dist/node_modules/@allyhub/protocol/dist/events.js +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/frame.d.ts +28 -2
- package/dist/node_modules/@allyhub/protocol/dist/frame.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/index.d.ts +2 -0
- package/dist/node_modules/@allyhub/protocol/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/jobs.d.ts +6 -6
- package/dist/node_modules/@allyhub/protocol/dist/mail.d.ts +2 -2
- package/dist/node_modules/@allyhub/protocol/dist/routes.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/snapshots.d.ts +69 -6
- package/dist/node_modules/@allyhub/protocol/dist/snapshots.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/tools.d.ts +9 -9
- 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/dist/cli/find.js +1 -1
- package/dist/node_modules/@allyhub/report-extension/dist/cli/index.js +3 -3
- package/dist/node_modules/@allyhub/report-extension/dist/cli/picture.js +29 -1
- package/dist/node_modules/@allyhub/report-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/report-extension/styles/allyhub/STYLE.md +11 -4
- package/dist/node_modules/@allyhub/report-extension/styles/allyhub/style.css +6 -2
- package/dist/node_modules/@allyhub/report-extension/styles/allyhub/style.json +1 -1
- package/dist/node_modules/@allyhub/report-extension/styles/allyhub/tokens.js +3 -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/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/annotations.js +2 -0
- package/dist/node_modules/@allyhub/sheet/dist/api/capabilities.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/api/index.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/api/rules.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/api/styles.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/api/workbook.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/arrange.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/data-tools.js +2 -0
- package/dist/node_modules/@allyhub/sheet/dist/edit.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/fill.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/filter.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/formula/rewrite.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/html.js +10 -10
- package/dist/node_modules/@allyhub/sheet/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/outline.js +2 -0
- package/dist/node_modules/@allyhub/sheet/dist/rich.js +2 -0
- package/dist/node_modules/@allyhub/sheet/dist/rules.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/table-style.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/table-styles.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/workbook.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/charts.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/import.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/read.js +2 -2
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/runs.js +2 -0
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/styles.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/write.js +1 -1
- package/dist/node_modules/@allyhub/sheet/package.json +1 -1
- package/dist/node_modules/@allyhub/sheet-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/animation.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/api.js +3 -3
- package/dist/node_modules/@allyhub/slides-core/dist/capabilities.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/chart-api.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/check.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/enums.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/file.js +3 -3
- package/dist/node_modules/@allyhub/slides-core/dist/generated/table-styles.js +2 -0
- package/dist/node_modules/@allyhub/slides-core/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/merge.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/numbering.js +2 -0
- package/dist/node_modules/@allyhub/slides-core/dist/office.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/patterns.js +2 -0
- package/dist/node_modules/@allyhub/slides-core/dist/resolve.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/script.js +2 -2
- package/dist/node_modules/@allyhub/slides-core/dist/sdk.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/table-style.js +2 -0
- package/dist/node_modules/@allyhub/slides-core/package.json +1 -1
- package/dist/node_modules/@allyhub/slides-extension/dist/deck-pptx.js +1 -1
- package/dist/node_modules/@allyhub/slides-extension/dist/workspace.js +1 -1
- package/dist/node_modules/@allyhub/slides-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/dist/audio-icon.js +2 -0
- package/dist/node_modules/@allyhub/slides-pptx/dist/import/code.js +3 -3
- package/dist/node_modules/@allyhub/slides-pptx/dist/import/index.js +2 -2
- package/dist/node_modules/@allyhub/slides-pptx/dist/import/script.js +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/dist/read/chart.js +2 -1
- package/dist/node_modules/@allyhub/slides-pptx/dist/read/common.js +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/dist/read/index.js +2 -2
- package/dist/node_modules/@allyhub/slides-pptx/dist/read/shapes.js +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/dist/read/table.js +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/dist/read/text.js +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/dist/read/timing.js +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/dist/shapes.js +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/dist/table-styles.js +2 -0
- package/dist/node_modules/@allyhub/slides-pptx/dist/text.js +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/dist/theme.js +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/dist/timing.js +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/dist/write.js +2 -2
- package/dist/node_modules/@allyhub/slides-pptx/dist/xml.js +2 -2
- package/dist/node_modules/@allyhub/slides-pptx/package.json +1 -1
- package/dist/node_modules/@allyhub/slides-runtime/dist/draw.js +2 -2
- package/dist/node_modules/@allyhub/slides-runtime/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/slides-runtime/dist/ink.js +1 -1
- package/dist/node_modules/@allyhub/slides-runtime/dist/load.js +5 -5
- 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/dist/runtime.js +101 -49
- package/dist/node_modules/@allyhub/stage-runtime/package.json +1 -1
- package/dist/node_modules/@allyhub/telemetry/LICENSE +241 -0
- package/dist/node_modules/@allyhub/telemetry/dist/doc.js +47 -0
- package/dist/node_modules/@allyhub/telemetry/dist/errors.js +2 -0
- package/dist/node_modules/@allyhub/telemetry/dist/index.js +2 -0
- package/dist/node_modules/@allyhub/telemetry/dist/level.js +3 -0
- package/dist/node_modules/@allyhub/telemetry/dist/scrub.js +2 -0
- package/dist/node_modules/@allyhub/telemetry/dist/telemetry.js +5 -0
- package/dist/node_modules/@allyhub/telemetry/package.json +21 -0
- package/dist/node_modules/@allyhub/video-core/dist/mix-plan.js +1 -1
- package/dist/node_modules/@allyhub/video-core/package.json +1 -1
- package/dist/node_modules/@allyhub/video-extension/dist/inspect/timeline-text.js +1 -1
- package/dist/node_modules/@allyhub/video-extension/package.json +3 -3
- 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 +12 -12
- package/dist/telemetry.js +4 -0
- package/dist/turn.js +2 -0
- package/editor-web/assets/{abnfDiagram-WEYOIA3C-BKmMA6gn.js → abnfDiagram-WEYOIA3C-D70jg8mE.js} +1 -1
- package/editor-web/assets/{architecture-WOLXFQ4H-BEFBgb4k.js → architecture-WOLXFQ4H-CrXS3E8e.js} +1 -1
- package/editor-web/assets/{architectureDiagram-ZHVYKT53-_u5YfCjY.js → architectureDiagram-ZHVYKT53-JrBljCOx.js} +1 -1
- package/editor-web/assets/arrow-down-DzZjFrBL.js +1 -0
- package/editor-web/assets/arrow-up-hdmh9LVD.js +1 -0
- package/editor-web/assets/{article-BUmD3xtR.js → article-BWrfVMRA.js} +6 -6
- package/editor-web/assets/article-hxHjqzV1.js +7 -0
- package/editor-web/assets/{audio-lines-CzuzsGjI.js → audio-lines-1s1eRs4Q.js} +1 -1
- package/editor-web/assets/{blockDiagram-RJAE7QA3-DybfaO3Z.js → blockDiagram-RJAE7QA3-BzfC1xTS.js} +1 -1
- package/editor-web/assets/{bookmark-Dsd3kHJJ.js → bookmark-Dfji3syX.js} +1 -1
- package/editor-web/assets/{button-eGxLxbv9.js → button-EftXSfev.js} +1 -1
- package/editor-web/assets/{c4Diagram-XDPPPE54-BfqLHB5i.js → c4Diagram-XDPPPE54-s2TpXKgH.js} +1 -1
- package/editor-web/assets/calc-worker-jImBXoeb.js +45 -0
- package/editor-web/assets/channel-BFbXY6R0.js +1 -0
- package/editor-web/assets/chart-BC3kUUDD.js +2 -0
- package/editor-web/assets/{chart-no-axes-column-BVkeF_Mr.js → chart-no-axes-column-CJmeYOSo.js} +1 -1
- package/editor-web/assets/{chunk-2E7WHVMD-BVp1I_d0.js → chunk-2E7WHVMD-DyE9v6UX.js} +1 -1
- package/editor-web/assets/{chunk-4EMNKR2T-CTdgWEMr.js → chunk-4EMNKR2T-CCunMMcT.js} +1 -1
- package/editor-web/assets/{chunk-55XCU76K-7pnsxeaP.js → chunk-55XCU76K-CZgJYrN4.js} +1 -1
- package/editor-web/assets/{chunk-7S6XSTFO-Dc0Dvkq7.js → chunk-7S6XSTFO-B01FlTFf.js} +1 -1
- package/editor-web/assets/{chunk-AQDTSKZB-VAILIsfx.js → chunk-AQDTSKZB-latWUvVu.js} +1 -1
- package/editor-web/assets/{chunk-DSNLSHJZ-CUDx1Rv5.js → chunk-DSNLSHJZ-BHFiQInN.js} +1 -1
- package/editor-web/assets/{chunk-HAGFOTED-DAoEe-dJ.js → chunk-HAGFOTED-C4hR36ab.js} +1 -1
- package/editor-web/assets/{chunk-HNE4Q36P-g0akya12.js → chunk-HNE4Q36P-CNrxiD2Q.js} +1 -1
- package/editor-web/assets/{chunk-NQOKRVIF-hTGjzXdJ.js → chunk-NQOKRVIF-DpyEHKEY.js} +1 -1
- package/editor-web/assets/{chunk-UHW7PFBP-BgLV8BIJ.js → chunk-UHW7PFBP-SIEJdixh.js} +1 -1
- package/editor-web/assets/{chunk-VQ5W62QI-Bw19OOSD.js → chunk-VQ5W62QI-CxWnQRxx.js} +1 -1
- package/editor-web/assets/{chunk-WQQL4CDK-CMST9dyE.js → chunk-WQQL4CDK-CbRuCBm6.js} +1 -1
- package/editor-web/assets/{chunk-YZO67HFG-Bbpu36XF.js → chunk-YZO67HFG-Cgu-EQvs.js} +1 -1
- package/editor-web/assets/{chunk-ZAUX2LTX-C48Ri0Gs.js → chunk-ZAUX2LTX-pAl5CV3o.js} +1 -1
- package/editor-web/assets/{chunk-ZCHMQSOR-DN1g01Oe.js → chunk-ZCHMQSOR-Du5hY-FP.js} +1 -1
- package/editor-web/assets/{classDiagram-v2-4MYWR3UA-U6jbPr2d.js → classDiagram-v2-4MYWR3UA-CevU94T6.js} +1 -1
- package/editor-web/assets/{collaborator-B1u2td9m.js → collaborator-C6IJkcGR.js} +1 -1
- package/editor-web/assets/copy-DvOiv9Ra.js +1 -0
- package/editor-web/assets/{createLucideIcon-GFZ_fxLc.js → createLucideIcon-REX213UO.js} +1 -1
- package/editor-web/assets/{cynefin-EF2NZ3EQ-gzkai_7-.js → cynefin-EF2NZ3EQ-DBHwpMRJ.js} +1 -1
- package/editor-web/assets/{cynefinDiagram-WF24UDRP-DtSekSr6.js → cynefinDiagram-WF24UDRP-CxUzpjvG.js} +1 -1
- package/editor-web/assets/{dagre-NK4GIZVX-CiUwYVT6.js → dagre-NK4GIZVX-BAJNBDYO.js} +1 -1
- package/editor-web/assets/{diagram-CBK3MWTC-r9XHCV-k.js → diagram-CBK3MWTC-BQW9Fbw-.js} +1 -1
- package/editor-web/assets/{diagram-I5XIIV2D-DxVsDZ34.js → diagram-I5XIIV2D-DQBROUfn.js} +1 -1
- package/editor-web/assets/{diagram-ODIL2UCW-B0eNQoHV.js → diagram-ODIL2UCW-DEoK31qy.js} +1 -1
- package/editor-web/assets/{diagram-PFBEJUXE-C7f2MfJT.js → diagram-PFBEJUXE-BTCa2We1.js} +1 -1
- package/editor-web/assets/{diagram-RJA3I4VV-CSXcnvct.js → diagram-RJA3I4VV-DNM8qWC3.js} +1 -1
- package/editor-web/assets/{diagram-TYUNFSNR-DXzOD_ii.js → diagram-TYUNFSNR-BcKpED4d.js} +1 -1
- package/editor-web/assets/dist-90dg0B0d.js +2 -0
- package/editor-web/assets/dist-BSPs7tZR.js +1 -0
- package/editor-web/assets/dist-CP9XwbBS.js +45 -0
- package/editor-web/assets/dist-CRxtC7DG.js +24 -0
- package/editor-web/assets/{dist-CC7OeU1e.js → dist-Cmnq14RO.js} +3 -3
- package/editor-web/assets/dist-CrZwqOm2.js +1 -0
- package/editor-web/assets/dist-CzUWTcvC.js +38 -0
- package/editor-web/assets/dist-D2a_y4AE.js +1 -0
- package/editor-web/assets/{dist-DDv_SbKw.js → dist-DMZ1VHPK.js} +1 -1
- package/editor-web/assets/dist-DYnXIW8F.js +16 -0
- package/editor-web/assets/{dist-BuWaZ3Y4.js → dist-Dpet39Yp.js} +30 -30
- package/editor-web/assets/dist-Dre4Cwpz.js +1 -0
- package/editor-web/assets/dist-RkxskWGK.js +5 -0
- package/editor-web/assets/dist-aANR6S2I.js +3 -0
- package/editor-web/assets/{dist-Gz6NDS0J.js → dist-qSuFWuVB.js} +3 -3
- package/editor-web/assets/{ebnfDiagram-V4P3TTPT-Cs4YRvDD.js → ebnfDiagram-V4P3TTPT-D-1x27Eh.js} +1 -1
- package/editor-web/assets/{elk-QONTBCTQ-Bh3LZ9WI.js → elk-QONTBCTQ-BJSCxiTH.js} +1 -1
- package/editor-web/assets/{erDiagram-KYQIGQAA-C4vYTYXp.js → erDiagram-KYQIGQAA-C7Q357iD.js} +1 -1
- package/editor-web/assets/{eventmodeling-K75KTNOO-BN1kkHWS.js → eventmodeling-K75KTNOO-kXrQLSF5.js} +1 -1
- package/editor-web/assets/flowDiagram-IUGLLWBU-GSC4btef.js +1 -0
- package/editor-web/assets/{ganttDiagram-R7GPNTJY-CA1LkkC5.js → ganttDiagram-R7GPNTJY-Bt3SRgK7.js} +1 -1
- package/editor-web/assets/{gitGraph-VSP46ZUC-Dy5tA7dG.js → gitGraph-VSP46ZUC-DS4CkhfK.js} +1 -1
- package/editor-web/assets/{gitGraphDiagram-PDYL7XHY-hJIB8EkH.js → gitGraphDiagram-PDYL7XHY-BgfmSVdI.js} +1 -1
- package/editor-web/assets/group-pebHQTdP.js +1 -0
- package/editor-web/assets/{hint-B8JpEypy.js → hint-BmRKl2nL.js} +1 -1
- package/editor-web/assets/index-D8qc_ipi.js +28 -0
- package/editor-web/assets/index-DDtZpLDF.css +2 -0
- package/editor-web/assets/{info-OHQRW6UA-DvzSf7rQ.js → info-OHQRW6UA-BZjctF3x.js} +1 -1
- package/editor-web/assets/{infoDiagram-MVDRKAX5-BjIMm4Af.js → infoDiagram-MVDRKAX5-BAp5oUXk.js} +1 -1
- package/editor-web/assets/{ishikawaDiagram-HPEHV2GE-Bpz71S40.js → ishikawaDiagram-HPEHV2GE-DGL7ZfUu.js} +1 -1
- package/editor-web/assets/{italic-D10w8n6C.js → italic-CtlNOXN9.js} +1 -1
- package/editor-web/assets/{journeyDiagram-BOSHW7O7-DAB-pZjD.js → journeyDiagram-BOSHW7O7-DOOoBGx-.js} +1 -1
- package/editor-web/assets/{kanban-definition-FNSA4HC5-cYeyh3P6.js → kanban-definition-FNSA4HC5-lbLuUiMW.js} +1 -1
- package/editor-web/assets/katex-UWCZofcd.js +257 -0
- package/editor-web/assets/{link-BC5xK1-1.js → link-CW2KxKT_.js} +1 -1
- package/editor-web/assets/{mermaid-parser.core-req5LE0X.js → mermaid-parser.core-RkCFmJcg.js} +3 -3
- package/editor-web/assets/{mermaid.core-zFwZug4C.js → mermaid.core-BVUl-afX.js} +4 -4
- package/editor-web/assets/{mindmap-definition-6OY57UG3-TStWb7DG.js → mindmap-definition-6OY57UG3-C3DC4T1J.js} +1 -1
- package/editor-web/assets/minus-D1tgAHbU.js +1 -0
- package/editor-web/assets/{packet-JDAUHWVQ-smFhVKcB.js → packet-JDAUHWVQ-Bkd6YpX8.js} +1 -1
- package/editor-web/assets/{palette-BIOudGkm.js → palette-INFK0Zsr.js} +1 -1
- package/editor-web/assets/{pegDiagram-ECIUJNBX-DvSNRv0-.js → pegDiagram-ECIUJNBX-B5Seh4Oe.js} +1 -1
- package/editor-web/assets/{pie-XZMESJXO-qjaGsBZG.js → pie-XZMESJXO-BNbb4Q8k.js} +1 -1
- package/editor-web/assets/{pieDiagram-GNMPY74T-Dd9P-Pdc.js → pieDiagram-GNMPY74T-_hnbUloZ.js} +1 -1
- package/editor-web/assets/play-DvMyq5xW.js +1 -0
- package/editor-web/assets/{progress-DE4C5_3x.js → progress-D6wSFdpY.js} +1 -1
- package/editor-web/assets/props-form-BfwEi6jW.js +1 -0
- package/editor-web/assets/{quadrantDiagram-D57K4MC3-h2IIKUUA.js → quadrantDiagram-D57K4MC3-1rbqW-KO.js} +1 -1
- package/editor-web/assets/{radar-ABXABTNO-DlVrSA1d.js → radar-ABXABTNO-BWSnhBSp.js} +1 -1
- package/editor-web/assets/{railroad-I3PHUGI6-nFbuLAtc.js → railroad-I3PHUGI6-BNB-OKs1.js} +1 -1
- package/editor-web/assets/{railroad-abnf-LNEFI6M7-Daj8h2iV.js → railroad-abnf-LNEFI6M7-BKgidf_B.js} +1 -1
- package/editor-web/assets/{railroad-ebnf-DWYD2UWJ-eYJyl5PH.js → railroad-ebnf-DWYD2UWJ-CNCnxtHp.js} +1 -1
- package/editor-web/assets/{railroad-peg-JR7BVNR7-BTRhKZQq.js → railroad-peg-JR7BVNR7-CyBW6_0o.js} +1 -1
- package/editor-web/assets/{railroadDiagram-Y72NRBL7-CeLGUjdp.js → railroadDiagram-Y72NRBL7-Cud3SJ7O.js} +1 -1
- package/editor-web/assets/{react-WA6wlt8S.js → react-Bk7NnOLX.js} +1 -1
- package/editor-web/assets/{repeat-2-VQP1EVOZ.js → repeat-2-DfPmKp4w.js} +1 -1
- package/editor-web/assets/{requirementDiagram-EQYSW5RA-Dmk9XRM5.js → requirementDiagram-EQYSW5RA-BrSCcpqV.js} +1 -1
- package/editor-web/assets/{row-BRlEWRrK.js → row-VwyPfa1b.js} +1 -1
- package/editor-web/assets/{sankeyDiagram-SY24JHO5-Yn4zlrAM.js → sankeyDiagram-SY24JHO5-rJV4dJFn.js} +1 -1
- package/editor-web/assets/scissors-D9WmgvNP.js +1 -0
- package/editor-web/assets/{sequenceDiagram-BLEHNHQU-BTRnp_PW.js → sequenceDiagram-BLEHNHQU-CEUuD2n6.js} +1 -1
- package/editor-web/assets/{session-Do9AqS38.js → session-DE0fvAcs.js} +1 -1
- package/editor-web/assets/sigma-CY2Chbro.js +1 -0
- package/editor-web/assets/slides-BgacyjJW.js +1 -0
- package/editor-web/assets/{snapshots-BUGlKQIB.js → snapshots-D8TtZp1x.js} +1 -1
- package/editor-web/assets/{sound-Bj3o9_Fa.js → sound-DUCxe9eC.js} +1 -1
- package/editor-web/assets/split-Cx2MMnC_.js +3 -0
- package/editor-web/assets/{stateDiagram-v2-A6IESKWZ-kstrRKv2.js → stateDiagram-v2-A6IESKWZ-BRE_C2he.js} +1 -1
- package/editor-web/assets/sticky-note-C5qUDHhC.js +1 -0
- package/editor-web/assets/{strikethrough-CfXx6IYH.js → strikethrough-DP-7tMz0.js} +1 -1
- package/editor-web/assets/svg-nJtFNJ-7.js +1 -0
- package/editor-web/assets/{swatch-WeJD41aW.js → swatch-lxK4C8fD.js} +1 -1
- package/editor-web/assets/{swimlanes-B3ENRKFQ-DaZsZkeP.js → swimlanes-B3ENRKFQ-BEPqWgVe.js} +1 -1
- package/editor-web/assets/swimlanesDiagram-AYQRV4AK-DAcNszZ6.js +8 -0
- package/editor-web/assets/{switch-N0G_sbqt.js → switch-DaG6OuAi.js} +1 -1
- package/editor-web/assets/{syntax-oWsKBWFw.js → syntax-9LD8MzGy.js} +1 -1
- package/editor-web/assets/{syntax-BVsgRJ4I.js → syntax-CLaCSmoi.js} +1 -1
- package/editor-web/assets/{table-B6hVZAMi.js → table-CTjNpE4W.js} +1 -1
- package/editor-web/assets/tabs-DjhzblAG.js +1 -0
- package/editor-web/assets/{textarea-tEWvBY9p.js → textarea-DBwRbOyF.js} +1 -1
- package/editor-web/assets/{timeline-definition-JXYKGLGB-CLCvY-Yf.js → timeline-definition-JXYKGLGB-p8Qeg4pS.js} +1 -1
- package/editor-web/assets/{trash-2-BP6nqpg2.js → trash-2-DrnRa91l.js} +1 -1
- package/editor-web/assets/{treeView-D4JQ5SDB-BmN0gwdC.js → treeView-D4JQ5SDB-C9FTdXKq.js} +1 -1
- package/editor-web/assets/{treemap-SAJKECNS-DN29G_E_.js → treemap-SAJKECNS-XAeLVOtI.js} +1 -1
- package/editor-web/assets/{undo-2-CHR0nvWL.js → undo-2-DUGGyBdX.js} +1 -1
- package/editor-web/assets/{usecaseDiagram-WPOLBNNX-DTRS54cB.js → usecaseDiagram-WPOLBNNX-BV3AMRuH.js} +1 -1
- package/editor-web/assets/{vennDiagram-Q3Y3IDCW-DAAc11Hx.js → vennDiagram-Q3Y3IDCW-CJdKcYyA.js} +1 -1
- package/editor-web/assets/{video-BlvmR8BK.js → video-He8p6dr6.js} +1 -1
- package/editor-web/assets/{wardley-7MLQ67FV-B-UYkmdB.js → wardley-7MLQ67FV-DZh6Mf22.js} +1 -1
- package/editor-web/assets/{wardleyDiagram-IVAIDKWA-BmbwCaky.js → wardleyDiagram-IVAIDKWA-XtvKSX-m.js} +1 -1
- package/editor-web/assets/{words-D_4T9Adq.js → words-CPHp_0tt.js} +1 -1
- package/editor-web/assets/{words-WgdEQdYP.js → words-CjW-1tZI.js} +1 -1
- package/editor-web/assets/{xychartDiagram-4URNHDU4-ChAfAq1U.js → xychartDiagram-4URNHDU4-CGkL42sz.js} +1 -1
- package/editor-web/assets/zoom-in-C4lxmIDE.js +1 -0
- package/editor-web/index.html +6 -6
- package/package.json +2 -2
- package/editor-web/assets/arrow-up-B5rJbBv0.js +0 -1
- package/editor-web/assets/article-DNioBb3p.js +0 -7
- package/editor-web/assets/calc-worker-D2pGis6e.js +0 -45
- package/editor-web/assets/channel-TNPgFDrw.js +0 -1
- package/editor-web/assets/chart-C37xvZT2.js +0 -1
- package/editor-web/assets/dist-BGRwhCQO.js +0 -1
- package/editor-web/assets/dist-BW4X7BrF.js +0 -1
- package/editor-web/assets/dist-BgDRE85b.js +0 -2
- package/editor-web/assets/dist-Blq5nJnU.js +0 -24
- package/editor-web/assets/dist-C1emZ9wX.js +0 -37
- package/editor-web/assets/dist-CX-fiPSn.js +0 -38
- package/editor-web/assets/dist-C_VvG-_9.js +0 -5
- package/editor-web/assets/dist-Ce7HrBxv.js +0 -3
- package/editor-web/assets/dist-D2k6w-_a.js +0 -1
- package/editor-web/assets/dist-DEoEO4zs.js +0 -1
- package/editor-web/assets/dist-DlDxxPIP.js +0 -16
- package/editor-web/assets/flowDiagram-IUGLLWBU-B04NGsyi.js +0 -1
- package/editor-web/assets/index-CgB5osVc.js +0 -28
- package/editor-web/assets/index-Daytem9N.css +0 -2
- package/editor-web/assets/katex-5Z2zF-9g.js +0 -257
- package/editor-web/assets/minus-DaWs5i8B.js +0 -1
- package/editor-web/assets/play-CrMmPghG.js +0 -1
- package/editor-web/assets/props-form-CsmDBqzy.js +0 -1
- package/editor-web/assets/schemas-VikZYZIK.js +0 -1
- package/editor-web/assets/slides-diTEQ3C5.js +0 -1
- package/editor-web/assets/split-CNU1RHcX.js +0 -3
- package/editor-web/assets/svg-Cx50MpxK.js +0 -1
- package/editor-web/assets/swimlanesDiagram-AYQRV4AK-CBZAujYY.js +0 -8
- package/editor-web/assets/tabs-DIFDqj-l.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./mermaid-parser.core-
|
|
1
|
+
import{n as e}from"./mermaid-parser.core-RkCFmJcg.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{n}from"./d3-selection-COWvaQNI.js";import{C as r,E as i,H as a,U as o,_ as s,a as c,c as l,f as u,q as d,v as f,y as p}from"./chunk-DSNLSHJZ-BHFiQInN.js";import{t as m}from"./chunk-JWPE2WC7-DVXcaiue.js";import{i as h}from"./chunk-7S6XSTFO-B01FlTFf.js";import{a as g}from"./mermaid.core-BVUl-afX.js";var _={showLegend:!0,ticks:5,max:null,min:0,graticule:`circle`},v=32,y={axes:[],curves:[],options:_},b=structuredClone(y),x=u.radar,S=t(()=>h({...x,...p().radar}),`getConfig`),C=t(()=>b.axes,`getAxes`),w=t(()=>b.curves,`getCurves`),T=t(()=>b.options,`getOptions`),E=t(e=>{b.axes=e.map(e=>({name:e.name,label:e.label??e.name}))},`setAxes`),D=t(e=>{b.curves=e.map(e=>({name:e.name,label:e.label??e.name,entries:O(e.entries)}))},`setCurves`),O=t(e=>{if(e[0].axis==null)return e.map(e=>e.value);let t=C();if(t.length===0)throw Error(`Axes must be populated before curves for reference entries`);return t.map(t=>{let n=e.find(e=>e.axis?.$refText===t.name);if(n===void 0)throw Error(`Missing entry for axis `+t.label);return n.value})},`computeCurveEntries`),k={getAxes:C,getCurves:w,getOptions:T,setAxes:E,setCurves:D,setOptions:t(e=>{let t=e.reduce((e,t)=>(e[t.name]=t,e),{});b.options={showLegend:t.showLegend?.value??_.showLegend,ticks:t.ticks?.value??_.ticks,max:t.max?.value??_.max,min:t.min?.value??_.min,graticule:t.graticule?.value??_.graticule},b.options.ticks>v&&(n.warn(`Radar diagram ticks (${b.options.ticks}) exceeds maximum allowed (${v}). Using ${v} instead.`),b.options.ticks=v)},`setOptions`),getConfig:S,clear:t(()=>{c(),b=structuredClone(y)},`clear`),setAccTitle:o,getAccTitle:f,setDiagramTitle:d,getDiagramTitle:r,getAccDescription:s,setAccDescription:a},A=t(e=>{m(e,k);let{axes:t,curves:n,options:r}=e;k.setAxes(t),k.setCurves(n),k.setOptions(r)},`populate`),j={parse:t(async t=>{let r=await e(`radar`,t);n.debug(r),A(r)},`parse`)},M=t((e,t,n,r)=>{let i=r.db,a=i.getAxes(),o=i.getCurves(),s=i.getOptions(),c=i.getConfig(),l=i.getDiagramTitle(),u=N(g(t),c),d=s.max??Math.max(...o.map(e=>Math.max(...e.entries))),f=s.min,p=Math.min(c.width,c.height)/2;P(u,a,p,s.ticks,s.graticule),F(u,a,p,c),I(u,a,o,f,d,s.graticule,c),z(u,o,s.showLegend,c),u.append(`text`).attr(`class`,`radarTitle`).text(l).attr(`x`,0).attr(`y`,-c.height/2-c.marginTop)},`draw`),N=t((e,t)=>{let n=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,i={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return l(e,r,n,t.useMaxWidth??!0),e.attr(`viewBox`,`0 0 ${n} ${r}`).attr(`overflow`,`visible`),e.append(`g`).attr(`transform`,`translate(${i.x}, ${i.y})`)},`drawFrame`),P=t((e,t,n,r,i)=>{if(i===`circle`)for(let t=0;t<r;t++){let i=n*(t+1)/r;e.append(`circle`).attr(`r`,i).attr(`class`,`radarGraticule`)}else if(i===`polygon`){let i=t.length;for(let a=0;a<r;a++){let o=n*(a+1)/r,s=t.map((e,t)=>{let n=2*t*Math.PI/i-Math.PI/2;return`${o*Math.cos(n)},${o*Math.sin(n)}`}).join(` `);e.append(`polygon`).attr(`points`,s).attr(`class`,`radarGraticule`)}}},`drawGraticule`),F=t((e,t,n,r)=>{let i=t.length;for(let a=0;a<i;a++){let o=t[a].label,s=2*a*Math.PI/i-Math.PI/2,c=Math.cos(s),l=Math.sin(s);e.append(`line`).attr(`x1`,0).attr(`y1`,0).attr(`x2`,n*r.axisScaleFactor*c).attr(`y2`,n*r.axisScaleFactor*l).attr(`class`,`radarAxisLine`);let u=c>.01?`start`:c<-.01?`end`:`middle`,d=l>.01?`hanging`:l<-.01?`auto`:`central`;e.append(`text`).text(o).attr(`x`,n*r.axisLabelFactor*c+4*c).attr(`y`,n*r.axisLabelFactor*l+4*l).attr(`text-anchor`,u).attr(`dominant-baseline`,d).attr(`class`,`radarAxisLabel`)}},`drawAxes`);function I(e,t,n,r,i,a,o){let s=t.length,c=Math.min(o.width,o.height)/2;n.forEach((t,n)=>{if(t.entries.length!==s)return;let l=t.entries.map((e,t)=>{let n=2*Math.PI*t/s-Math.PI/2,a=L(e,r,i,c);return{x:a*Math.cos(n),y:a*Math.sin(n)}});a===`circle`?e.append(`path`).attr(`d`,R(l,o.curveTension)).attr(`class`,`radarCurve-${n}`):a===`polygon`&&e.append(`polygon`).attr(`points`,l.map(e=>`${e.x},${e.y}`).join(` `)).attr(`class`,`radarCurve-${n}`)})}t(I,`drawCurves`);function L(e,t,n,r){return r*(Math.min(Math.max(e,t),n)-t)/(n-t)}t(L,`relativeRadius`);function R(e,t){let n=e.length,r=`M${e[0].x},${e[0].y}`;for(let i=0;i<n;i++){let a=e[(i-1+n)%n],o=e[i],s=e[(i+1)%n],c=e[(i+2)%n],l={x:o.x+(s.x-a.x)*t,y:o.y+(s.y-a.y)*t},u={x:s.x-(c.x-o.x)*t,y:s.y-(c.y-o.y)*t};r+=` C${l.x},${l.y} ${u.x},${u.y} ${s.x},${s.y}`}return`${r} Z`}t(R,`closedRoundCurve`);function z(e,t,n,r){if(!n)return;let i=(r.width/2+r.marginRight)*3/4,a=-(r.height/2+r.marginTop)*3/4;t.forEach((t,n)=>{let r=e.append(`g`).attr(`transform`,`translate(${i}, ${a+n*20})`);r.append(`rect`).attr(`width`,12).attr(`height`,12).attr(`class`,`radarLegendBox-${n}`),r.append(`text`).attr(`x`,16).attr(`y`,0).attr(`class`,`radarLegendText`).text(t.label)})}t(z,`drawLegend`);var B={draw:M},V=t((e,t)=>{let n=``;for(let r=0;r<e.THEME_COLOR_LIMIT;r++){let i=e[`cScale${r}`];n+=`
|
|
2
2
|
.radarCurve-${r} {
|
|
3
3
|
color: ${i};
|
|
4
4
|
fill: ${i};
|
|
@@ -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{C as r,G as i,H as a,U as o,_ as s,a as c,at as l,b as u,d,et as f,q as p,s as m,v as h}from"./chunk-DSNLSHJZ-
|
|
1
|
+
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{n as t,t as n}from"./d3-selection-COWvaQNI.js";import{C as r,G as i,H as a,U as o,_ as s,a as c,at as l,b as u,d,et as f,q as p,s as m,v as h}from"./chunk-DSNLSHJZ-BHFiQInN.js";import{t as g}from"./channel-BFbXY6R0.js";import"./chunk-YZO67HFG-Cgu-EQvs.js";import{_,c as v}from"./chunk-7S6XSTFO-B01FlTFf.js";import"./chunk-AQDTSKZB-latWUvVu.js";import{t as y}from"./chunk-5VM5RSS4-ZNzvKenW.js";import"./chunk-UHW7PFBP-SIEJdixh.js";import{i as b,n as x,o as S,r as C}from"./chunk-J5ZVWO5B-oDCd-gWO.js";import{a as w}from"./chunk-HAGFOTED-C4hR36ab.js";import"./chunk-ZAUX2LTX-pAl5CV3o.js";import"./chunk-WQQL4CDK-CbRuCBm6.js";import{t as T}from"./chunk-55XCU76K-CZgJYrN4.js";import{t as E}from"./chunk-XXDRQBXY-i7MKP1NY.js";import{t as D}from"./chunk-VQ5W62QI-CxWnQRxx.js";import"./chunk-HNE4Q36P-CNrxiD2Q.js";import{i as O,n as k,r as A,t as j}from"./mermaid.core-BVUl-afX.js";var M={SHAPE_UNSUPPORTED:`SHAPE_UNSUPPORTED`,SHAPE_REMOVED:`SHAPE_REMOVED`,EDGE_OPERATOR_UNSUPPORTED:`EDGE_OPERATOR_UNSUPPORTED`,REFERENCE_EDGE_LABEL_REJECTED:`REFERENCE_EDGE_LABEL_REJECTED`,CONNECTOR_REF_UNRESOLVED:`CONNECTOR_REF_UNRESOLVED`,CONNECTOR_REF_NOT_A_CONNECTOR:`CONNECTOR_REF_NOT_A_CONNECTOR`,METADATA_KEY_MISAPPLIED:`METADATA_KEY_MISAPPLIED`,DUPLICATE_ID_NODE:`DUPLICATE_ID_NODE`,RESERVED_SYNTHETIC_ID:`RESERVED_SYNTHETIC_ID`,CONTAINMENT_VIOLATION:`CONTAINMENT_VIOLATION`,EDGE_SEMANTIC_CONTRADICTION:`EDGE_SEMANTIC_CONTRADICTION`,FLOW_NO_INPUT:`FLOW_NO_INPUT`},N=new Set([M.SHAPE_UNSUPPORTED,M.SHAPE_REMOVED,M.CONTAINMENT_VIOLATION]);new Set(Object.values(M).filter(e=>!N.has(e)));var P=new Map([[`task`,`roundedRect`],[`tool`,`subroutine`],[`input`,`lean-right`],[`decision`,`diamond`],[`refdoc`,`lin-doc`],[`action`,`hexagon`],[`round`,`rect`]]),ee=new Set(`doc.stadium.terminal.circle.trapezoid.inv_trapezoid.inv-trapezoid.doublecircle.double-circle.typeDeclaration.procs.lean_left.lean-left.in-out.cylinder.ellipse.odd.tag-rect.tagged-rectangle.delay.half-rounded-rectangle.lin-rect.lined-rectangle.win-pane.window-pane.curv-trap.curved-trapezoid`.split(`.`)),te=new Set([`roundedRect`,`subroutine`,`subprocess`,`subproc`,`framed-rectangle`,`lean-right`,`diamond`,`lin-doc`,`lined-document`,`hexagon`,`hex`,`connector`,`collapsedGroup`]),F=`roundedRect`;function I(e){return e&&(P.get(e)??e)}e(I,`resolveShapeAlias`);function ne(e,n){for(let r of e)if(!r.isGroup){if(r.shape&&r.shape!==`squareRect`&&r.shape!==`rect`||(r.shape=F),ee.has(r.shape)){let e=`shape "${r.shape}" was removed in v0.8.1, using "${F}"`;n?.emitError?n.emitError(`SHAPE_REMOVED`,e,{nodeId:r.id}):t.warn(`agentflow: ${e}`),r.shape=F}else if(!te.has(r.shape)){let e=`shape "${r.shape}" is not supported, using "${F}"`;n?.emitWarning?n.emitWarning(`SHAPE_UNSUPPORTED`,e,{nodeId:r.id}):t.warn(`agentflow: ${e}`),r.shape=F}}}e(ne,`normaliseNodeShapes`);var L=new Map([[`tool`,0],[`task`,1],[`decision`,2],[`input`,3],[`refdoc`,4],[`connector`,5],[`action`,6]]),R=L.size,z=e(e=>`af-kind-${e}`,`kindClass`),B=[...L.keys()],V=e(e=>Math.max(1,e-R),`containerSlotCount`),H=e((e,t)=>{let n=R+e%V(t);return t>0?n%t:n},`containerSlot`);function re(e,t,n){let r=u().themeVariables?.borderColorArray,i=Array.isArray(r)?r.length:0,a=n.size;for(let r of e??[]){if(r.isGroup||r.shape===`collapsedGroup`){r.colorIndex=H(n.get(String(r.id))??a++,i);continue}let e=t(String(r.id));e&&L.has(e)&&(r.cssClasses=`${r.cssClasses??``} ${z(e)}`.replace(/\s+/g,` `).trim())}}e(re,`assignColorSlots`);var ie=`agentflow-`,ae=new Set([`shape`,`view`,`icon`,`img`,`form`,`pos`,`w`,`h`,`class`,`style`,`labelType`]),oe=new Set([`subroutine`,`subprocess`,`subproc`,`framed-rectangle`,`tool`]),se={flow:`flowGroup`};function ce(e){if(Array.isArray(e))return e.map(e=>ce(e));if(typeof e!=`object`||!e)return e;let t={};for(let n of Object.keys(e))n!==`__proto__`&&n!==`constructor`&&n!==`prototype`&&(t[n]=ce(e[n]));return t}e(ce,`stripPrototypeKeys`);function le(e){let t=!1,n=!1,r=0,i,a=[];for(let o of e.split(`
|
|
2
2
|
`)){if(i!==void 0){let e=o.length-o.trimStart().length;if(o.trim()===``||e>i){a.push(o);continue}i=void 0}let e=-1;for(let i=0;i<o.length;i++){let a=o[i];if(n)a===`\\`?i++:a===`"`&&(n=!1);else if(t)a===`'`&&(t=!1);else if(a===`"`)n=!0;else if(a===`'`)t=!0;else if(a===`#`&&(i===0||o[i-1]===` `||o[i-1]===` `)){e=i;break}else a===`[`||a===`{`?r++:(a===`]`||a===`}`)&&(r=Math.max(0,r-1))}if(t||n||r>0){a.push(o);continue}let s=e>=0?o.slice(0,e):o,c=e>=0?o.slice(e):``;/:\s*[>|][\d+-]*\s*$/.test(s)?(i=o.length-o.trimStart().length,a.push(o)):a.push(s.replace(/,([\t ]*)$/,`$1`)+c)}return a.join(`
|
|
3
3
|
`)}e(le,`stripLineTrailingCommas`);var ue=class{constructor(){this.vertexCounter=0,this.config=u(),this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.globalNodes=new Set,this.connectors=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.diagramId=``,this.preserveCommentsWhenParsing=!0,this.frontmatterLineOffset=0,this.elementMappings=[],this.bareVertexMappings=new WeakSet,this.diagnostics=[],this.postParseValidationRun=!1,this.funs=[],this.setAccTitle=o,this.setAccDescription=a,this.setDiagramTitle=p,this.getAccTitle=h,this.getAccDescription=s,this.getDiagramTitle=r,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addGlobal=this.addGlobal.bind(this),this.addConnector=this.addConnector.bind(this),this.addConnectorMapping=this.addConnectorMapping.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.setFrontmatterLineOffset=this.setFrontmatterLineOffset.bind(this),this.addVertexMapping=this.addVertexMapping.bind(this),this.extendVertexMapping=this.extendVertexMapping.bind(this),this.addEdgeMapping=this.addEdgeMapping.bind(this),this.addSubgraphMapping=this.addSubgraphMapping.bind(this),this.emitWarning=this.emitWarning.bind(this),this.emitError=this.emitError.bind(this),this.getDiagnostics=this.getDiagnostics.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen(`gen-2`)}static{e(this,`AgentFlowDB`)}sanitizeText(e){return m.sanitizeText(e,this.config)}sanitizeNodeLabelType(e){switch(e){case`markdown`:case`string`:case`text`:return e;default:return`markdown`}}setDiagramId(e){this.diagramId=e}lookUpDomId(e){for(let t of this.vertices.values())if(t.id===e)return this.diagramId?`${this.diagramId}-${t.domId}`:t.domId;return this.diagramId?`${this.diagramId}-${e}`:e}addVertex(e,t,n,r,i,a,o={},s,c){if(!e||e.trim().length===0)return;let l;if(s!==void 0){let e;e=s.includes(`
|
|
4
4
|
`)?s+`
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{t as e}from"./createLucideIcon-REX213UO.js";import{C as t,E as n,S as r,_ as i,b as a,c as o,d as s,f as c,h as l,i as u,k as d,l as f,m as p,o as m,s as h,v as g,x as _}from"./dist-YW8hS4IM.js";var v=e(`list-ordered`,[[`path`,{d:`M11 5h10`,key:`1cz7ny`}],[`path`,{d:`M11 12h10`,key:`1438ji`}],[`path`,{d:`M11 19h10`,key:`11t30w`}],[`path`,{d:`M4 4h1v5`,key:`10yrso`}],[`path`,{d:`M4 9h2`,key:`r1h2o0`}],[`path`,{d:`M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02`,key:`xtkcd5`}]]),ee=e(`list`,[[`path`,{d:`M3 5h.01`,key:`18ugdj`}],[`path`,{d:`M3 12h.01`,key:`nlz23k`}],[`path`,{d:`M3 19h.01`,key:`noohij`}],[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M8 12h13`,key:`1za7za`}],[`path`,{d:`M8 19h13`,key:`m83p4d`}]]),y=(e,t)=>!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function b(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock(`backward`,e):n.parentOffset>0)?null:n}var x=(e,n,i)=>{let a=b(e,i);if(!a)return!1;let o=C(a);if(!o){let t=a.blockRange(),i=t&&r(t);return i!=null&&(n&&n(e.tr.lift(t,i).scrollIntoView()),!0)}let s=o.nodeBefore;if(k(e,o,n,-1))return!0;if(a.parent.content.size==0&&(S(s,`end`)||m.isSelectable(s)))for(let r=a.depth;;r--){let i=t(e.doc,a.before(r),a.after(r),d.empty);if(i&&i.slice.size<i.to-i.from){if(n){let t=e.tr.step(i);t.setSelection(S(s,`end`)?f.findFrom(t.doc.resolve(t.mapping.map(o.pos,-1)),-1):m.create(t.doc,o.pos-s.nodeSize)),n(t.scrollIntoView())}return!0}if(r==1||a.node(r-1).childCount>1)break}return s.isAtom&&o.depth==a.depth-1?(n&&n(e.tr.delete(o.pos-s.nodeSize,o.pos).scrollIntoView()),!0):!1},te=(e,t,n)=>{let r=b(e,n);if(!r)return!1;let i=C(r);return i?re(e,i,t):!1},ne=(e,t,n)=>{let r=ae(e,n);if(!r)return!1;let i=w(r);return i?re(e,i,t):!1};function re(e,n,r){let i=n.nodeBefore,a=n.pos-1;for(;!i.isTextblock;a--){if(i.type.spec.isolating)return!1;let e=i.lastChild;if(!e)return!1;i=e}let o=n.nodeAfter,c=n.pos+1;for(;!o.isTextblock;c++){if(o.type.spec.isolating)return!1;let e=o.firstChild;if(!e)return!1;o=e}let u=t(e.doc,a,c,d.empty);if(!u||u.from!=a||u instanceof l&&u.slice.size>=c-a)return!1;if(r){let t=e.tr.step(u);t.setSelection(s.create(t.doc,a)),r(t.scrollIntoView())}return!0}function S(e,t,n=!1){for(let r=e;r;r=t==`start`?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}var ie=(e,t,n)=>{let{$head:r,empty:i}=e.selection,a=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock(`backward`,e):r.parentOffset>0)return!1;a=C(r)}let o=a&&a.nodeBefore;return!o||!m.isSelectable(o)?!1:(t&&t(e.tr.setSelection(m.create(e.doc,a.pos-o.nodeSize)).scrollIntoView()),!0)};function C(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function ae(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock(`forward`,e):n.parentOffset<n.parent.content.size)?null:n}var oe=(e,n,r)=>{let i=ae(e,r);if(!i)return!1;let a=w(i);if(!a)return!1;let o=a.nodeAfter;if(k(e,a,n,1))return!0;if(i.parent.content.size==0&&(S(o,`start`)||m.isSelectable(o))){let r=t(e.doc,i.before(),i.after(),d.empty);if(r&&r.slice.size<r.to-r.from){if(n){let t=e.tr.step(r);t.setSelection(S(o,`start`)?f.findFrom(t.doc.resolve(t.mapping.map(a.pos)),1):m.create(t.doc,t.mapping.map(a.pos))),n(t.scrollIntoView())}return!0}}return o.isAtom&&a.depth==i.depth-1?(n&&n(e.tr.delete(a.pos,a.pos+o.nodeSize).scrollIntoView()),!0):!1},se=(e,t,n)=>{let{$head:r,empty:i}=e.selection,a=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock(`forward`,e):r.parentOffset<r.parent.content.size)return!1;a=w(r)}let o=a&&a.nodeAfter;return!o||!m.isSelectable(o)?!1:(t&&t(e.tr.setSelection(m.create(e.doc,a.pos)).scrollIntoView()),!0)};function w(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}var ce=(e,t)=>{let n=e.selection,r=n instanceof m,a;if(r){if(n.node.isTextblock||!i(e.doc,n.from))return!1;a=n.from}else if(a=_(e.doc,n.from,-1),a==null)return!1;if(t){let n=e.tr.join(a);r&&n.setSelection(m.create(n.doc,a-e.doc.resolve(a).nodeBefore.nodeSize)),t(n.scrollIntoView())}return!0},le=(e,t)=>{let n=e.selection,r;if(n instanceof m){if(n.node.isTextblock||!i(e.doc,n.to))return!1;r=n.to}else if(r=_(e.doc,n.to,1),r==null)return!1;return t&&t(e.tr.join(r).scrollIntoView()),!0},ue=(e,t)=>{let{$from:n,$to:i}=e.selection,a=n.blockRange(i),o=a&&r(a);return o!=null&&(t&&t(e.tr.lift(a,o).scrollIntoView()),!0)},T=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(t&&t(e.tr.insertText(`
|
|
2
|
+
`).scrollIntoView()),!0)};function E(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}var D=(e,t)=>{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),a=n.indexAfter(-1),o=E(i.contentMatchAt(a));if(!o||!i.canReplaceWith(a,a,o))return!1;if(t){let r=n.after(),i=e.tr.replaceWith(r,r,o.createAndFill());i.setSelection(f.near(i.doc.resolve(r),1)),t(i.scrollIntoView())}return!0},O=(e,t)=>{let n=e.selection,{$from:r,$to:i}=n;if(n instanceof u||r.parent.inlineContent||i.parent.inlineContent)return!1;let a=E(i.parent.contentMatchAt(i.indexAfter()));if(!a||!a.isTextblock)return!1;if(t){let n=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,o=e.tr.insert(n,a.createAndFill());o.setSelection(s.create(o.doc,n+1)),t(o.scrollIntoView())}return!0},de=(e,t)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let r=n.before();if(g(e.doc,r))return t&&t(e.tr.split(r).scrollIntoView()),!0}let i=n.blockRange(),a=i&&r(i);return a!=null&&(t&&t(e.tr.lift(i,a).scrollIntoView()),!0)};function fe(e){return(t,n)=>{if(t.selection instanceof m&&t.selection.node.isBlock){let{$from:e}=t.selection;return!e.parentOffset||!g(t.doc,e.pos)?!1:(n&&n(t.tr.split(e.pos).scrollIntoView()),!0)}if(!t.selection.$from.depth)return!1;let r=t.tr;!t.selection.empty&&(t.selection instanceof s||t.selection instanceof u)&&r.deleteSelection();let{$from:i}=r.selection,a=r.steps.length,o=[],c,l,d=!1,f=!1;for(let t=i.depth;;t--)if(i.node(t).isBlock){d=i.end(t)==i.pos+(i.depth-t),f=i.start(t)==i.pos-(i.depth-t),l=E(i.node(t-1).contentMatchAt(i.indexAfter(t-1)));let n=e&&e(i.parent,d,i);o.unshift(n||(d&&l?{type:l}:null)),c=t;break}else{if(t==1)return!1;o.unshift(null)}let p=i.pos,h=g(r.doc,p,o.length,o);if(h||=(o[0]=l?{type:l}:null,g(r.doc,p,o.length,o)),!h)return!1;if(r.split(p,o.length,o),!d&&f&&i.node(c).type!=l){let e=r.mapping.slice(a),t=e.map(i.before(c)),n=r.doc.resolve(t);l&&i.node(c-1).canReplaceWith(n.index(),n.index()+1,l)&&r.setNodeMarkup(e.map(i.before(c)),l)}return n&&n(r.scrollIntoView()),!0}}var pe=fe(),me=(e,t)=>{let{$from:n,to:r}=e.selection,i,a=n.sharedDepth(r);return a!=0&&(i=n.before(a),t&&t(e.tr.setSelection(m.create(e.doc,i))),!0)},he=(e,t)=>(t&&t(e.tr.setSelection(new u(e.doc))),!0);function ge(e,t,n){let r=t.nodeBefore,a=t.nodeAfter,o=t.index();return!r||!a||!r.type.compatibleContent(a.type)?!1:!r.content.size&&t.parent.canReplace(o-1,o)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(o,o+1)||!(a.isTextblock||i(e.doc,t.pos))?!1:(n&&n(e.tr.join(t.pos).scrollIntoView()),!0)}function k(e,t,a,o){let s=t.nodeBefore,c=t.nodeAfter,l,u,m=s.type.spec.isolating||c.type.spec.isolating;if(!m&&ge(e,t,a))return!0;let h=!m&&t.parent.canReplace(t.index(),t.index()+1);if(h&&(l=(u=s.contentMatchAt(s.childCount)).findWrapping(c.type))&&u.matchType(l[0]||c.type).validEnd){if(a){let r=t.pos+c.nodeSize,o=n.empty;for(let e=l.length-1;e>=0;e--)o=n.from(l[e].create(null,o));o=n.from(s.copy(o));let u=e.tr.step(new p(t.pos-1,r,t.pos,r,new d(o,1,0),l.length,!0)),f=u.doc.resolve(r+2*l.length);f.nodeAfter&&f.nodeAfter.type==s.type&&i(u.doc,f.pos)&&u.join(f.pos),a(u.scrollIntoView())}return!0}let g=c.type.spec.isolating||o>0&&m?null:f.findFrom(t,1),_=g&&g.$from.blockRange(g.$to),v=_&&r(_);if(v!=null&&v>=t.depth)return a&&a(e.tr.lift(_,v).scrollIntoView()),!0;if(h&&S(c,`start`,!0)&&S(s,`end`)){let r=s,i=[];for(;i.push(r),!r.isTextblock;)r=r.lastChild;let o=c,l=1;for(;!o.isTextblock;o=o.firstChild)l++;if(r.canReplace(r.childCount,r.childCount,o.content)){if(a){let r=n.empty;for(let e=i.length-1;e>=0;e--)r=n.from(i[e].copy(r));a(e.tr.step(new p(t.pos-i.length,t.pos+c.nodeSize,t.pos+l,t.pos+c.nodeSize-l,new d(r,i.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function A(e){return function(t,n){let r=t.selection,i=e<0?r.$from:r.$to,a=i.depth;for(;i.node(a).isInline;){if(!a)return!1;a--}return i.node(a).isTextblock?(n&&n(t.tr.setSelection(s.create(t.doc,e<0?i.start(a):i.end(a)))),!0):!1}}var j=A(-1),M=A(1);function _e(e,t=null){return function(n,r){let{$from:i,$to:o}=n.selection,s=i.blockRange(o),c=s&&a(s,e,t);return c?(r&&r(n.tr.wrap(s,c).scrollIntoView()),!0):!1}}function ve(e,t=null){return function(n,r){let i=!1;for(let r=0;r<n.selection.ranges.length&&!i;r++){let{$from:{pos:a},$to:{pos:o}}=n.selection.ranges[r];n.doc.nodesBetween(a,o,(r,a)=>{if(i)return!1;if(r.isTextblock&&!r.hasMarkup(e,t)){if(r.type==e)i=!0;else{let t=n.doc.resolve(a),r=t.index();i=t.parent.canReplaceWith(r,r+1,e)}}})}if(!i)return!1;if(r){let i=n.tr;for(let r=0;r<n.selection.ranges.length;r++){let{$from:{pos:a},$to:{pos:o}}=n.selection.ranges[r];i.setBlockType(a,o,e,t)}r(i.scrollIntoView())}return!0}}function N(...e){return function(t,n,r){for(let i=0;i<e.length;i++)if(e[i](t,n,r))return!0;return!1}}var P=N(y,x,ie),F=N(y,oe,se),I={Enter:N(T,O,de,pe),"Mod-Enter":D,Backspace:P,"Mod-Backspace":P,"Shift-Backspace":P,Delete:F,"Mod-Delete":F,"Mod-a":he},L={"Ctrl-h":I.Backspace,"Alt-Backspace":I[`Mod-Backspace`],"Ctrl-d":I.Delete,"Ctrl-Alt-Backspace":I[`Mod-Delete`],"Alt-Delete":I[`Mod-Delete`],"Alt-d":I[`Mod-Delete`],"Ctrl-a":j,"Ctrl-e":M};for(let e in I)L[e]=I[e];for(var ye=(typeof navigator<`u`?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<`u`&&os.platform&&os.platform()==`darwin`)?L:I,R={8:`Backspace`,9:`Tab`,10:`Enter`,12:`NumLock`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,44:`PrintScreen`,45:`Insert`,46:`Delete`,59:`;`,61:`=`,91:`Meta`,92:`Meta`,106:`*`,107:`+`,108:`,`,109:`-`,110:`.`,111:`/`,144:`NumLock`,145:`ScrollLock`,160:`Shift`,161:`Shift`,162:`Control`,163:`Control`,164:`Alt`,165:`Alt`,173:`-`,186:`;`,187:`=`,188:`,`,189:`-`,190:`.`,191:`/`,192:"`",219:`[`,220:`\\`,221:`]`,222:`'`},z={48:`)`,49:`!`,50:`@`,51:`#`,52:`$`,53:`%`,54:`^`,55:`&`,56:`*`,57:`(`,59:`:`,61:`+`,173:`_`,186:`:`,187:`+`,188:`<`,189:`_`,190:`>`,191:`?`,192:`~`,219:`{`,220:`|`,221:`}`,222:`"`},be=typeof navigator<`u`&&/Mac/.test(navigator.platform),xe=typeof navigator<`u`&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),B=0;B<10;B++)R[48+B]=R[96+B]=String(B);for(var B=1;B<=24;B++)R[B+111]=`F`+B;for(var B=65;B<=90;B++)R[B]=String.fromCharCode(B+32),z[B]=String.fromCharCode(B);for(var V in R)z.hasOwnProperty(V)||(z[V]=R[V]);function Se(e){var t=!(be&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||xe&&e.shiftKey&&e.key&&e.key.length==1||e.key==`Unidentified`)&&e.key||(e.shiftKey?z:R)[e.keyCode]||e.key||`Unidentified`;return t==`Esc`&&(t=`Escape`),t==`Del`&&(t=`Delete`),t==`Left`&&(t=`ArrowLeft`),t==`Up`&&(t=`ArrowUp`),t==`Right`&&(t=`ArrowRight`),t==`Down`&&(t=`ArrowDown`),t}var Ce=typeof navigator<`u`&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),we=typeof navigator<`u`&&/Win/.test(navigator.platform);function Te(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n==`Space`&&(n=` `);let r,i,a,o;for(let e=0;e<t.length-1;e++){let n=t[e];if(/^(cmd|meta|m)$/i.test(n))o=!0;else if(/^a(lt)?$/i.test(n))r=!0;else if(/^(c|ctrl|control)$/i.test(n))i=!0;else if(/^s(hift)?$/i.test(n))a=!0;else if(/^mod$/i.test(n))Ce?o=!0:i=!0;else throw Error(`Unrecognized modifier name: `+n)}return r&&(n=`Alt-`+n),i&&(n=`Ctrl-`+n),o&&(n=`Meta-`+n),a&&(n=`Shift-`+n),n}function Ee(e){let t=Object.create(null);for(let n in e)t[Te(n)]=e[n];return t}function H(e,t,n=!0){return t.altKey&&(e=`Alt-`+e),t.ctrlKey&&(e=`Ctrl-`+e),t.metaKey&&(e=`Meta-`+e),n&&t.shiftKey&&(e=`Shift-`+e),e}function De(e){return new h({props:{handleKeyDown:U(e)}})}function U(e){let t=Ee(e);return function(e,n){let r=Se(n),i,a=t[H(r,n)];if(a&&a(e.state,e.dispatch,e))return!0;if(r.length==1&&r!=` `){if(n.shiftKey){let i=t[H(r,n,!1)];if(i&&i(e.state,e.dispatch,e))return!0}if((n.altKey||n.metaKey||n.ctrlKey)&&!(we&&n.ctrlKey&&n.altKey)&&(i=R[n.keyCode])&&i!=r){let r=t[H(i,n)];if(r&&r(e.state,e.dispatch,e))return!0}}return!1}}var W=200,G=function(){};G.prototype.append=function(e){return e.length?(e=G.from(e),!this.length&&e||e.length<W&&this.leafAppend(e)||this.length<W&&e.leafPrepend(this)||this.appendInner(e)):this},G.prototype.prepend=function(e){return e.length?G.from(e).append(this):this},G.prototype.appendInner=function(e){return new ke(this,e)},G.prototype.slice=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.length),e>=t?G.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},G.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},G.prototype.forEach=function(e,t,n){t===void 0&&(t=0),n===void 0&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},G.prototype.map=function(e,t,n){t===void 0&&(t=0),n===void 0&&(n=this.length);var r=[];return this.forEach(function(t,n){return r.push(e(t,n))},t,n),r},G.from=function(e){return e instanceof G?e:e&&e.length?new Oe(e):G.empty};var Oe=function(e){function t(t){e.call(this),this.values=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return e==0&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,r){for(var i=t;i<n;i++)if(e(this.values[i],r+i)===!1)return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){for(var i=t-1;i>=n;i--)if(e(this.values[i],r+i)===!1)return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=W)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=W)return new t(e.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(G);G.empty=new Oe([]);var ke=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,t,n,r){var i=this.left.length;if(t<i&&this.left.forEachInner(e,t,Math.min(n,i),r)===!1||n>i&&this.right.forEachInner(e,Math.max(t-i,0),Math.min(this.length,n)-i,r+i)===!1)return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){var i=this.left.length;if(t>i&&this.right.forEachInvertedInner(e,t-i,Math.max(n,i)-i,r+i)===!1||n<i&&this.left.forEachInvertedInner(e,Math.min(t,i),n,r)===!1)return!1},t.prototype.sliceInner=function(e,t){if(e==0&&t==this.length)return this;var n=this.left.length;return t<=n?this.left.slice(e,t):e>=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(G),Ae=500,K=class e{constructor(e,t){this.items=e,this.eventCount=t}popEvent(t,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let i,a;n&&(i=this.remapping(r,this.items.length),a=i.maps.length);let o=t.tr,s,c,l=[],u=[];return this.items.forEach((t,n)=>{if(!t.step)i||(i=this.remapping(r,n+1),a=i.maps.length),a--,u.push(t);else{if(i){u.push(new q(t.map));let e=t.step.map(i.slice(a)),n;e&&o.maybeStep(e).doc&&(n=o.mapping.maps[o.mapping.maps.length-1],l.push(new q(n,void 0,void 0,l.length+u.length))),a--,n&&i.appendMap(n,a)}else o.maybeStep(t.step);if(t.selection)return s=i?t.selection.map(i.slice(a)):t.selection,c=new e(this.items.slice(0,r).append(u.reverse().concat(l)),this.eventCount-1),!1}},this.items.length,0),{remaining:c,transform:o,selection:s}}addTransform(t,n,r,i){let a=[],o=this.eventCount,s=this.items,c=!i&&s.length?s.get(s.length-1):null;for(let e=0;e<t.steps.length;e++){let r=t.steps[e].invert(t.docs[e]),l=new q(t.mapping.maps[e],r,n),u;(u=c&&c.merge(l))&&(l=u,e?a.pop():s=s.slice(0,s.length-1)),a.push(l),n&&=(o++,void 0),i||(c=l)}let l=o-r.depth;return l>Me&&(s=je(s,l),o-=l),new e(s.append(a),o)}remapping(e,t){let n=new c;return this.items.forEach((t,r)=>{let i=t.mirrorOffset!=null&&r-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0;n.appendMap(t.map,i)},e,t),n}addMaps(t){return this.eventCount==0?this:new e(this.items.append(t.map(e=>new q(e))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;n=Math.min(this.items.length,n);let r=[],i=this.items.length-n,a=t.mapping,o=t.steps.length,s=this.eventCount;this.items.forEach(e=>{e.selection&&s--},i);let c=n;this.items.forEach(e=>{let n=a.getMirror(--c);if(n==null)return;o=Math.min(o,n);let i=a.maps[n];if(e.step){let o=t.steps[n].invert(t.docs[n]),l=e.selection&&e.selection.map(a.slice(c+1,n));l&&s++,r.push(new q(i,o,l))}else r.push(new q(i))},i);let l=[];for(let e=n;e<o;e++)l.push(new q(a.maps[e]));let u=this.items.slice(0,i).append(l).append(r),d=new e(u,s);return d.emptyItemCount()>Ae&&(d=d.compress(this.items.length-r.length)),d}emptyItemCount(){let e=0;return this.items.forEach(t=>{t.step||e++}),e}compress(t=this.items.length){let n=this.remapping(0,t),r=n.maps.length,i=[],a=0;return this.items.forEach((e,o)=>{if(o>=t)i.push(e),e.selection&&a++;else if(e.step){let t=e.step.map(n.slice(r)),o=t&&t.getMap();if(r--,o&&n.appendMap(o,r),t){let s=e.selection&&e.selection.map(n.slice(r));s&&a++;let c=new q(o.invert(),t,s),l,u=i.length-1;(l=i.length&&i[u].merge(c))?i[u]=l:i.push(c)}}else e.map&&r--},this.items.length,0),new e(G.from(i.reverse()),a)}};K.empty=new K(G.empty,0);function je(e,t){let n;return e.forEach((e,r)=>{if(e.selection&&t--==0)return n=r,!1}),e.slice(n)}var q=class e{constructor(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new e(n.getMap().invert(),n,this.selection)}}},J=class{constructor(e,t,n,r,i){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r,this.prevComposition=i}},Me=20;function Ne(e,t,n,r){let i=n.getMeta(Q),a;if(i)return i.historyState;n.getMeta(ze)&&(e=new J(e.done,e.undone,null,0,-1));let o=n.getMeta(`appendedTransaction`);if(n.steps.length==0)return e;if(o&&o.getMeta(Q))return o.getMeta(Q).redo?new J(e.done.addTransform(n,void 0,r,Z(t)),e.undone,Fe(n.mapping.maps),e.prevTime,e.prevComposition):new J(e.done,e.undone.addTransform(n,void 0,r,Z(t)),null,e.prevTime,e.prevComposition);if(n.getMeta(`addToHistory`)!==!1&&!(o&&o.getMeta(`addToHistory`)===!1)){let i=n.getMeta(`composition`),a=e.prevTime==0||!o&&e.prevComposition!=i&&(e.prevTime<(n.time||0)-r.newGroupDelay||!Pe(n,e.prevRanges)),s=o?Y(e.prevRanges,n.mapping):Fe(n.mapping.maps);return new J(e.done.addTransform(n,a?t.selection.getBookmark():void 0,r,Z(t)),K.empty,s,n.time,i??e.prevComposition)}return(a=n.getMeta(`rebased`))?new J(e.done.rebased(n,a),e.undone.rebased(n,a),Y(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new J(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),Y(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function Pe(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((e,r)=>{for(let i=0;i<t.length;i+=2)e<=t[i+1]&&r>=t[i]&&(n=!0)}),n}function Fe(e){let t=[];for(let n=e.length-1;n>=0&&t.length==0;n--)e[n].forEach((e,n,r,i)=>t.push(r,i));return t}function Y(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let i=t.map(e[r],1),a=t.map(e[r+1],-1);i<=a&&n.push(i,a)}return n}function Ie(e,t,n){let r=Z(t),i=Q.get(t).spec.config,a=(n?e.undone:e.done).popEvent(t,r);if(!a)return null;let o=a.selection.resolve(a.transform.doc),s=(n?e.done:e.undone).addTransform(a.transform,t.selection.getBookmark(),i,r),c=new J(n?s:a.remaining,n?a.remaining:s,null,0,-1);return a.transform.setSelection(o).setMeta(Q,{redo:n,historyState:c})}var X=!1,Le=null;function Z(e){let t=e.plugins;if(Le!=t){X=!1,Le=t;for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){X=!0;break}}return X}function Re(e){return e.setMeta(ze,!0)}var Q=new o(`history`),ze=new o(`closeHistory`);function Be(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new h({key:Q,state:{init(){return new J(K.empty,K.empty,null,0,-1)},apply(t,n,r){return Ne(n,r,t,e)}},config:e,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,r=n==`historyUndo`?He:n==`historyRedo`?$:null;return!r||!e.editable?!1:(t.preventDefault(),r(e.state,e.dispatch))}}}})}function Ve(e,t){return(n,r)=>{let i=Q.getState(n);if(!i||(e?i.undone:i.done).eventCount==0)return!1;if(r){let a=Ie(i,n,e);a&&r(t?a.scrollIntoView():a)}return!0}}var He=Ve(!1,!0),$=Ve(!0,!0);function Ue(e){return e.getMeta(Q)!=null}export{M as C,ee as D,_e as E,v as O,me as S,ve as T,ue as _,He as a,ie as b,ye as c,x as d,le as f,ce as g,ne as h,$ as i,O as l,te as m,Be as n,U as o,oe as p,Ue as r,De as s,Re as t,D as u,de as v,j as w,se as x,T as y};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e}from"./rolldown-runtime-COiEfhsA.js";import{d as t,l as n,m as r,o as i,s as a,u as o,v as s}from"./react-Bk7NnOLX.js";import{Tt as c,gt as l,t as u,yt as d}from"./button-EftXSfev.js";import{A as f,P as p,Y as m,et as h,g,nt as _,x as v}from"./snapshots-D8TtZp1x.js";import{t as y}from"./jsx-runtime-DePvh3-m.js";import{t as b}from"./createLucideIcon-REX213UO.js";import{i as x}from"./dist-Cmnq14RO.js";import{t as ee}from"./zoom-in-C4lxmIDE.js";var te=b(`corner-up-left`,[[`path`,{d:`M20 20v-7a4 4 0 0 0-4-4H4`,key:`1nkjon`}],[`path`,{d:`M9 14 4 9l5-5`,key:`102s5s`}]]),S=e(s(),1),C=y(),w=_([m(),m(),m()]),T={"scenery/viewer":p(h({item:f,camera:h({position:w,target:w}).optional()}),g,`The address of a scenery's viewer page, for a sandboxed frame: it tells what the person does by postMessage.`)},E=v(T),D=d({en:{title:`3D scenery`,loading:`Loading the scenery`,loadFailed:`The scenery did not load`,zoomIn:`Zoom in`,back:`Back`,size:(e,t,n)=>`${e} × ${t} × ${n} m`},"zh-cn":{title:`3D 布景`,loading:`正在加载布景`,loadFailed:`布景没能加载`,zoomIn:`放大`,back:`返回`,size:(e,t,n)=>`${e} × ${t} × ${n} 米`},"zh-tw":{title:`3D 布景`,loading:`正在載入布景`,loadFailed:`布景無法載入`,zoomIn:`放大`,back:`返回`,size:(e,t,n)=>`${e} × ${t} × ${n} 公尺`},ja:{title:`3D セット`,loading:`セットを読み込み中`,loadFailed:`セットを読み込めませんでした`,zoomIn:`ズームイン`,back:`戻る`,size:(e,t,n)=>`${e} × ${t} × ${n} m`},ko:{title:`3D 세트`,loading:`세트를 불러오는 중`,loadFailed:`세트를 불러오지 못했습니다`,zoomIn:`확대`,back:`뒤로`,size:(e,t,n)=>`${e} × ${t} × ${n} m`},es:{title:`Decorado 3D`,loading:`Cargando el decorado`,loadFailed:`El decorado no se cargó`,zoomIn:`Acercar`,back:`Atrás`,size:(e,t,n)=>`${e} × ${t} × ${n} m`},fr:{title:`Décor 3D`,loading:`Chargement du décor`,loadFailed:`Le décor ne s’est pas chargé`,zoomIn:`Zoomer`,back:`Retour`,size:(e,t,n)=>`${e} × ${t} × ${n} m`},de:{title:`3D-Kulisse`,loading:`Kulisse wird geladen`,loadFailed:`Die Kulisse wurde nicht geladen`,zoomIn:`Heranzoomen`,back:`Zurück`,size:(e,t,n)=>`${e} × ${t} × ${n} m`},pt:{title:`Cenário 3D`,loading:`Carregando o cenário`,loadFailed:`O cenário não carregou`,zoomIn:`Aproximar`,back:`Voltar`,size:(e,t,n)=>`${e} × ${t} × ${n} m`}}),O=8;function k(e,t,n,r=8){let i={left:n.left+O,top:n.top+O},a={left:Math.max(i.left,n.right-O-t.width),top:Math.max(i.top,n.bottom-O-t.height)},o=e=>Math.max(i.left,Math.min(e,a.left)),s=e=>Math.max(i.top,Math.min(e,a.top)),c=o(e.left),l=e.bottom+r;if(l<=a.top)return{left:c,top:l};let u=e.top-r-t.height;if(u>=i.top)return{left:c,top:u};let d=e.right+r;return{left:d<=a.left?d:o(e.left-r-t.width),top:s((e.top+e.bottom)/2-t.height/2)}}var A=e=>e>=1?e.toFixed(2):e>=.1?e.toFixed(3):e.toFixed(4),j=1500,M={width:300,height:56},N=e=>[e[0],e[1],e[2]],ne=e=>Array.isArray(e)&&e.length===3&&e.every(e=>typeof e==`number`);function re(e){if(typeof e!=`object`||!e)return;let t=e;if(t.allyhub===!0){if(t.type===`error`)return{type:`error`,message:typeof t.message==`string`?t.message:``};if(t.type===`scenery`&&typeof t.event==`object`)return{type:`scenery`,event:t.event}}}function P({className:e}){return(0,C.jsxs)(`div`,{className:`flex size-full min-h-0 flex-col`,children:[(0,C.jsx)(x,{}),(0,C.jsx)(`div`,{className:`min-h-0 flex-1`,children:(0,C.jsx)(F,{...e===void 0?{}:{className:e}})})]})}function F({className:e}){let s=i(),d=a(),f=D.of(d?.locale),p=d?.item,m=p?.id,h=p?.entry,g=(0,S.useRef)(null),_=(0,S.useRef)(null),v=(0,S.useRef)(void 0),[y,b]=(0,S.useState)({n:0}),[x,w]=(0,S.useState)(),[T,O]=(0,S.useState)(),P=r(T),[F,I]=(0,S.useState)(),[L,R]=(0,S.useState)(),[z,ie]=(0,S.useState)([]),[B,V]=(0,S.useState)(null),[H,ae]=(0,S.useState)({hover:null,select:null}),[oe,se]=(0,S.useState)(!1);(0,S.useEffect)(()=>{if(m===void 0)return;let e=!0,t=y.from;return E(s,`scenery/viewer`,{item:m,...t?{camera:{position:N(t.position),target:N(t.target)}}:{}}).then(t=>{e&&(w({n:y.n,url:t.url}),O(t.probe))},t=>{e&&R({n:y.n,message:t instanceof Error?t.message:String(t)})}),()=>{e=!1}},[s,m,y]),n(m,()=>{let e=v.current;b(t=>({n:t.n+1,...e?{from:e}:{}}))});let U=(0,S.useCallback)(e=>{g.current?.contentWindow?.postMessage({allyhub:!0,command:e},`*`)},[]),W=(0,S.useRef)([]),G=(0,S.useRef)(new Map),K=(0,S.useRef)(!1),q=()=>{let e=g.current?.getBoundingClientRect();return e&&e.width>0&&e.height>0?{x:e.x,y:e.y,width:e.width,height:e.height}:void 0};t({hold:()=>Promise.resolve({key:`${m??``}@${String(y.n)}@${JSON.stringify(v.current??null)}`,what:`The 3D scene ${m??``}`,...h===void 0?{}:{source:{path:h}}}),locate:()=>Promise.resolve({elements:[]})}),o({element:()=>g.current,pictures:()=>new Promise(e=>{let t=q();W.current.push(n=>{e(t?[{rect:t,mime:n.slice(5,n.indexOf(`;`)),data:n.slice(n.indexOf(`,`)+1)}]:[])}),K.current&&U({type:`shot`})}),locate:async e=>{let t=q(),n=await Promise.all(c(e).map(({x:e,y:n})=>new Promise(r=>{let i=crypto.randomUUID(),a=setTimeout(()=>{G.current.delete(i),r(null)},j);G.current.set(i,e=>{clearTimeout(a),r(e)}),U({type:`pick`,id:i,x:e-(t?.x??0),y:n-(t?.y??0)})})));return{elements:[...new Set(n.flatMap(e=>e?[e.path.join(` > `)]:[]))].map(e=>({name:`the object ${e}`,...h===void 0?{}:{source:{path:h}}}))}},pick:e=>new Promise(t=>{let n=q(),r=crypto.randomUUID(),i=setTimeout(()=>{G.current.delete(r),t(void 0)},j);G.current.set(r,e=>{clearTimeout(i),t(e?.screen&&n?{element:{name:`the object ${e.path.join(` > `)}`,...h===void 0?{}:{source:{path:h}}},outline:[e.screen.map(([e,t])=>({x:n.x+e,y:n.y+t}))]}:void 0)}),U({type:`pick`,id:r,x:e.x-(n?.x??0),y:e.y-(n?.y??0)})})}),(0,S.useEffect)(()=>{let e=_.current;if(!e)return;let t=e=>{K.current&&(e.preventDefault(),U({type:`wheel`,deltaY:e.deltaY,ctrlKey:e.ctrlKey}))};return e.addEventListener(`wheel`,t,{passive:!1}),()=>{e.removeEventListener(`wheel`,t)}},[U]);let J=(0,S.useRef)(null);(0,S.useEffect)(()=>{J.current=B},[B]),(0,S.useEffect)(()=>{let e=e=>{if(!x||e.source!==g.current?.contentWindow)return;let t=re(e.data);if(!t)return;if(t.type===`error`){R({n:x.n,message:t.message});return}let n=t.event;switch(n.type){case`ready`:I(x.n),ie(n.cameras),K.current=!0,W.current.forEach(()=>{U({type:`shot`})}),J.current&&U({type:`select`,path:J.current.path});return;case`select`:V(n.object);return;case`camera`:{let e=n.camera;ne(e.target)&&(v.current={position:e.position,target:e.target,...e.lens===void 0?{}:{lens:e.lens}}),se(n.framed);return}case`place`:ae({hover:n.hover,select:n.select});return;case`shot`:W.current.shift()?.(n.picture);return;case`picked`:G.current.get(n.id)?.(n.object),G.current.delete(n.id);return;default:return}};return window.addEventListener(`message`,e),()=>{window.removeEventListener(`message`,e)}},[U,s,x]);let ce=(0,S.useCallback)(()=>{B&&U({type:`select`,path:null}),V(null)},[U,B]),[Y,le]=(0,S.useState)({width:0,height:0});(0,S.useEffect)(()=>{let e=_.current;if(!e)return;let t=new ResizeObserver(()=>{le({width:e.clientWidth,height:e.clientHeight})});return t.observe(e),()=>{t.disconnect()}},[]);let X=B?H.select:null,Z=B&&X?k({left:X.x,top:X.y,right:X.x+X.width,bottom:X.y+X.height},M,{left:0,top:0,right:Y.width,bottom:Y.height}):void 0,Q=x!==void 0&&F===x.n,$=L?.n===y.n?L.message:void 0;return(0,C.jsxs)(`div`,{ref:_,"data-testid":`scenery-viewer`,className:l(`bg-paper relative size-full overflow-hidden`,e),onKeyDown:e=>{e.key===`Escape`&&B&&ce()},children:[x&&P!==void 0&&(0,C.jsx)(`iframe`,{ref:g,src:x.url,title:f.title,...P?{sandbox:`allow-scripts`}:{},"data-testid":`scenery-frame`,...Q?{"data-ready":``}:{},className:l(`absolute inset-0 size-full border-0 transition-opacity`,Q?`opacity-100`:`opacity-0`)},x.n),!Q&&$===void 0&&(0,C.jsx)(`p`,{className:`text-lead absolute inset-0 grid place-items-center text-sm`,children:f.loading}),$!==void 0&&(0,C.jsxs)(`div`,{role:`alert`,className:`absolute inset-x-6 top-6 text-sm`,"data-testid":`scenery-error`,children:[(0,C.jsx)(`p`,{className:`text-problem-text`,children:f.loadFailed}),$&&(0,C.jsx)(`p`,{className:`text-lead mt-1 font-mono text-xs`,children:$})]}),Q&&H.hover&&(0,C.jsx)(`div`,{"aria-hidden":!0,className:`border-pencil pointer-events-none absolute rounded-sm border border-dashed`,style:{left:H.hover.x,top:H.hover.y,width:H.hover.width,height:H.hover.height}}),Q&&B&&H.select&&(0,C.jsx)(`div`,{"aria-hidden":!0,className:`border-pencil pointer-events-none absolute rounded-sm border-2`,style:{left:H.select.x,top:H.select.y,width:H.select.width,height:H.select.height}}),Q&&(0,C.jsxs)(`div`,{className:`pointer-events-none absolute inset-x-3 bottom-3 flex flex-wrap items-center gap-1.5`,children:[z.map(e=>(0,C.jsx)(u,{size:`sm`,variant:`outline`,className:`bg-card pointer-events-auto`,"data-testid":`scenery-camera`,onClick:()=>{U({type:`camera`,name:e})},children:e},e)),oe&&(0,C.jsxs)(u,{size:`sm`,variant:`outline`,className:`bg-card pointer-events-auto ml-auto`,"data-testid":`scenery-back`,onClick:()=>{U({type:`back`})},children:[(0,C.jsx)(te,{size:14}),f.back]})]}),Z&&B&&(0,C.jsxs)(`div`,{role:`dialog`,"aria-label":B.path.join(` › `),"data-testid":`scenery-card`,className:`bg-card animate-set-in shadow-overlay absolute z-10 flex items-start gap-2 rounded-lg border p-3`,style:{left:Z.left,top:Z.top,width:M.width},children:[(0,C.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,C.jsx)(`p`,{className:`truncate text-sm font-semibold`,children:B.path.join(` › `)}),(0,C.jsx)(`p`,{className:`text-lead text-xs`,children:f.size(A(B.size[0]),A(B.size[1]),A(B.size[2]))})]}),(0,C.jsxs)(u,{size:`sm`,variant:`ghost`,"data-testid":`scenery-zoom`,onClick:()=>{U({type:`frame`,path:B.path})},children:[(0,C.jsx)(ee,{size:14}),f.zoomIn]})]})]})}export{P as SceneryViewer,P as default,D as WORDS,k as cardPlace,A as metres};
|