allyhub 0.19.0 → 0.20.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/align.js +1 -1
- package/dist/commands/check.js +1 -1
- package/dist/commands/cloud-tools.js +1 -1
- package/dist/commands/cloud.js +1 -1
- package/dist/commands/dev.js +5 -5
- package/dist/commands/export.js +3 -0
- package/dist/commands/frames/doc.js +1 -1
- package/dist/commands/frames/piece.js +1 -1
- package/dist/commands/frames/sheet.js +1 -1
- package/dist/commands/frames.js +9 -9
- package/dist/commands/index.js +1 -1
- package/dist/commands/inspect/combos.js +1 -1
- package/dist/commands/inspect/common.js +2 -2
- package/dist/commands/inspect/facts.js +2 -2
- package/dist/commands/migrate.js +3 -0
- package/dist/commands/skills.js +3 -3
- package/dist/commands/upgrade.js +5 -0
- package/dist/commands.json +1 -1
- package/dist/help.js +3 -3
- package/dist/main.js +8 -7
- package/dist/node_modules/@allyhub/3d-extension/package.json +2 -2
- package/dist/node_modules/@allyhub/audio/package.json +1 -1
- package/dist/node_modules/@allyhub/blocks/LICENSE +241 -0
- package/dist/node_modules/@allyhub/blocks/dist/alt.js +2 -0
- package/dist/node_modules/@allyhub/blocks/dist/elements.js +2 -0
- package/dist/node_modules/@allyhub/blocks/dist/flow-resolve.js +2 -0
- package/dist/node_modules/@allyhub/blocks/dist/flow-table.js +2 -0
- package/dist/node_modules/@allyhub/blocks/dist/format.js +2 -0
- package/dist/node_modules/@allyhub/blocks/dist/gantt.js +2 -0
- package/dist/node_modules/@allyhub/blocks/dist/grids.js +2 -0
- package/dist/node_modules/@allyhub/blocks/dist/html.js +75 -0
- package/dist/node_modules/@allyhub/blocks/dist/icons.generated.js +2 -0
- package/dist/node_modules/@allyhub/blocks/dist/icons.js +2 -0
- package/dist/node_modules/@allyhub/blocks/dist/index.js +2 -0
- package/dist/node_modules/@allyhub/blocks/dist/layout.js +2 -0
- package/dist/node_modules/@allyhub/blocks/dist/look.js +2 -0
- package/dist/node_modules/@allyhub/blocks/dist/measure.js +3 -0
- package/dist/node_modules/@allyhub/blocks/dist/model.js +2 -0
- package/dist/node_modules/@allyhub/blocks/dist/page.js +2 -0
- package/dist/node_modules/@allyhub/blocks/dist/palette.js +2 -0
- package/dist/node_modules/@allyhub/blocks/dist/path.js +2 -0
- package/dist/node_modules/@allyhub/blocks/dist/resolve.js +2 -0
- package/dist/node_modules/@allyhub/blocks/dist/samples.js +2 -0
- package/dist/node_modules/@allyhub/blocks/dist/sankey.js +2 -0
- package/dist/node_modules/@allyhub/blocks/dist/svg.js +2 -0
- package/dist/node_modules/@allyhub/blocks/dist/tidy.js +2 -0
- package/dist/node_modules/@allyhub/blocks/dist/trees.js +2 -0
- package/dist/node_modules/@allyhub/blocks/package.json +19 -0
- package/dist/node_modules/@allyhub/browser/dist/html.js +1 -1
- package/dist/node_modules/@allyhub/browser/package.json +1 -1
- package/dist/node_modules/@allyhub/build/dist/fonts.js +9 -3
- package/dist/node_modules/@allyhub/build/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/build/dist/inspect-view.js +1 -1
- package/dist/node_modules/@allyhub/build/dist/migrate.js +2 -0
- package/dist/node_modules/@allyhub/build/dist/prepare.js +3 -3
- package/dist/node_modules/@allyhub/build/dist/work.js +3 -3
- package/dist/node_modules/@allyhub/build/package.json +5 -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 +2 -1
- package/dist/node_modules/@allyhub/chart/dist/chart-xml.js +4 -3
- package/dist/node_modules/@allyhub/chart/dist/chart.js +4 -2
- package/dist/node_modules/@allyhub/chart/dist/chartex-xml.js +4 -0
- package/dist/node_modules/@allyhub/chart/dist/classic.js +2 -0
- package/dist/node_modules/@allyhub/chart/dist/embedded.js +2 -2
- package/dist/node_modules/@allyhub/chart/dist/extended.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/dist/tree.js +2 -0
- package/dist/node_modules/@allyhub/chart/package.json +1 -1
- package/dist/node_modules/@allyhub/check/dist/check.js +1 -1
- package/dist/node_modules/@allyhub/check/package.json +1 -1
- package/dist/node_modules/@allyhub/cloud/dist/blobs.js +1 -1
- package/dist/node_modules/@allyhub/cloud/dist/call.js +4 -4
- package/dist/node_modules/@allyhub/cloud/dist/client.js +1 -1
- package/dist/node_modules/@allyhub/cloud/dist/storage.js +2 -0
- 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/background.js +1 -1
- package/dist/node_modules/@allyhub/dev-server/dist/item-process.js +2 -0
- package/dist/node_modules/@allyhub/dev-server/dist/item-worker.js +2 -0
- package/dist/node_modules/@allyhub/dev-server/dist/live.js +1 -1
- package/dist/node_modules/@allyhub/dev-server/dist/pages.js +20 -1
- package/dist/node_modules/@allyhub/dev-server/dist/project.js +1 -1
- package/dist/node_modules/@allyhub/dev-server/dist/record.js +1 -1
- package/dist/node_modules/@allyhub/dev-server/dist/server.js +2 -2
- package/dist/node_modules/@allyhub/dev-server/dist/tools.js +1 -1
- package/dist/node_modules/@allyhub/dev-server/dist/validate.js +2 -2
- package/dist/node_modules/@allyhub/dev-server/dist/writer.js +3 -3
- package/dist/node_modules/@allyhub/dev-server/package.json +1 -1
- package/dist/node_modules/@allyhub/diagnostics/dist/rules.js +1 -1
- package/dist/node_modules/@allyhub/diagnostics/package.json +1 -1
- package/dist/node_modules/@allyhub/doc/dist/blocks.js +2 -0
- package/dist/node_modules/@allyhub/doc/dist/chart.js +1 -1
- package/dist/node_modules/@allyhub/doc/dist/color.js +1 -1
- package/dist/node_modules/@allyhub/doc/dist/docx-read.js +12 -0
- package/dist/node_modules/@allyhub/doc/dist/docx.js +5 -4
- package/dist/node_modules/@allyhub/doc/dist/html.js +83 -48
- package/dist/node_modules/@allyhub/doc/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/doc/dist/markdown.js +1 -1
- package/dist/node_modules/@allyhub/doc/dist/merges.js +2 -0
- package/dist/node_modules/@allyhub/doc/dist/model.js +1 -1
- package/dist/node_modules/@allyhub/doc/dist/numbering.js +2 -0
- package/dist/node_modules/@allyhub/doc/dist/omml.js +3 -0
- package/dist/node_modules/@allyhub/doc/dist/page.js +2 -1
- package/dist/node_modules/@allyhub/doc/dist/paper.js +1 -1
- package/dist/node_modules/@allyhub/doc/dist/parse.js +5 -4
- package/dist/node_modules/@allyhub/doc/dist/redline.js +2 -0
- package/dist/node_modules/@allyhub/doc/dist/revisions.js +2 -0
- package/dist/node_modules/@allyhub/doc/dist/shapes.js +4 -0
- package/dist/node_modules/@allyhub/doc/dist/styles.js +2 -0
- package/dist/node_modules/@allyhub/doc/dist/table.js +1 -1
- package/dist/node_modules/@allyhub/doc/dist/write.js +65 -39
- package/dist/node_modules/@allyhub/doc/package.json +5 -1
- package/dist/node_modules/@allyhub/doc-extension/dist/build.js +2 -2
- package/dist/node_modules/@allyhub/doc-extension/dist/cli/find.js +1 -1
- package/dist/node_modules/@allyhub/doc-extension/dist/cli/import.js +3 -0
- package/dist/node_modules/@allyhub/doc-extension/dist/cli/index.js +1 -1
- package/dist/node_modules/@allyhub/doc-extension/dist/cli/styles.js +4 -0
- package/dist/node_modules/@allyhub/doc-extension/dist/export.js +1 -1
- package/dist/node_modules/@allyhub/doc-extension/dist/inspect.js +1 -1
- package/dist/node_modules/@allyhub/doc-extension/dist/project-tools.js +1 -1
- package/dist/node_modules/@allyhub/doc-extension/dist/tools.js +1 -1
- package/dist/node_modules/@allyhub/doc-extension/package.json +22 -2
- package/dist/node_modules/@allyhub/doc-print/dist/drawn.js +4 -4
- package/dist/node_modules/@allyhub/doc-print/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/doc-print/dist/layout.js +8 -7
- package/dist/node_modules/@allyhub/doc-print/dist/print.js +22 -16
- package/dist/node_modules/@allyhub/doc-print/package.json +1 -1
- package/dist/node_modules/@allyhub/export/dist/export.js +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/dist/points.js +1 -1
- package/dist/node_modules/@allyhub/extension-host/package.json +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/blocks-flow.js +2 -0
- package/dist/node_modules/@allyhub/formats/dist/data/blocks.d.ts +146 -0
- package/dist/node_modules/@allyhub/formats/dist/data/blocks.js +2 -0
- package/dist/node_modules/@allyhub/formats/dist/data/cell-styles.d.ts +9 -0
- package/dist/node_modules/@allyhub/formats/dist/data/cell-styles.js +2 -0
- package/dist/node_modules/@allyhub/formats/dist/data/deck-code.d.ts +47 -40
- package/dist/node_modules/@allyhub/formats/dist/data/deck-code.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/diagram-kinds.d.ts +6 -0
- package/dist/node_modules/@allyhub/formats/dist/data/diagram-kinds.js +2 -0
- package/dist/node_modules/@allyhub/formats/dist/data/diagrams.d.ts +29 -0
- package/dist/node_modules/@allyhub/formats/dist/data/diagrams.js +2 -0
- package/dist/node_modules/@allyhub/formats/dist/data/faces.d.ts +18 -0
- package/dist/node_modules/@allyhub/formats/dist/data/faces.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/page-data.d.ts +59 -0
- package/dist/node_modules/@allyhub/formats/dist/data/page-data.js +2 -0
- package/dist/node_modules/@allyhub/formats/dist/data/reference.d.ts +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/sheet.d.ts +698 -258
- package/dist/node_modules/@allyhub/formats/dist/data/sheet.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/slides.d.ts +14104 -2167
- package/dist/node_modules/@allyhub/formats/dist/data/slides.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/data/themes.d.ts +82 -0
- package/dist/node_modules/@allyhub/formats/dist/data/themes.js +2 -0
- package/dist/node_modules/@allyhub/formats/dist/data/tokens.d.ts +67 -0
- package/dist/node_modules/@allyhub/formats/dist/data/tokens.js +2 -0
- package/dist/node_modules/@allyhub/formats/dist/data/work.d.ts +42 -0
- package/dist/node_modules/@allyhub/formats/dist/data/work.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/index.d.ts +7 -0
- package/dist/node_modules/@allyhub/formats/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/items.d.ts +12 -3
- package/dist/node_modules/@allyhub/formats/dist/schemas.d.ts +3260 -290
- package/dist/node_modules/@allyhub/formats/dist/schemas.js +1 -1
- package/dist/node_modules/@allyhub/formats/dist/tolerant.d.ts +45 -0
- package/dist/node_modules/@allyhub/formats/dist/tolerant.js +2 -0
- package/dist/node_modules/@allyhub/formats/package.json +1 -1
- package/dist/node_modules/@allyhub/html-extension/dist/project-tools.js +21 -9
- package/dist/node_modules/@allyhub/html-extension/dist/tools.js +1 -1
- package/dist/node_modules/@allyhub/html-extension/markup/allyhub.yaml +2 -0
- package/dist/node_modules/@allyhub/html-extension/markup/markup.json +14 -4
- package/dist/node_modules/@allyhub/html-extension/markup/pages/budget.html +22 -1
- package/dist/node_modules/@allyhub/html-extension/package.json +9 -1
- package/dist/node_modules/@allyhub/i18n/package.json +1 -1
- package/dist/node_modules/@allyhub/image-draw/dist/fonts.js +1 -1
- package/dist/node_modules/@allyhub/image-draw/dist/inspect.js +2 -2
- package/dist/node_modules/@allyhub/image-draw/package.json +1 -1
- package/dist/node_modules/@allyhub/image-extension/dist/build-plugins.js +1 -1
- package/dist/node_modules/@allyhub/image-extension/dist/cli.js +1 -1
- package/dist/node_modules/@allyhub/image-extension/package.json +2 -2
- package/dist/node_modules/@allyhub/image-extension/skills/allyhub/references/images.md +1 -1
- package/dist/node_modules/@allyhub/image-measure/dist/layout.js +2 -2
- 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/dist/block.js +2 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/blocks.js +2 -0
- package/dist/node_modules/@allyhub/image-sdk/dist/index.js +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 -3
- package/dist/node_modules/@allyhub/linkedin-extension/skills/allyhub/references/linkedin.md +3 -3
- 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/dist/analyses/faces.js +1 -1
- package/dist/node_modules/@allyhub/media-extension/dist/asr/transcribe.js +1 -1
- package/dist/node_modules/@allyhub/media-extension/dist/ocr/text.js +1 -1
- package/dist/node_modules/@allyhub/media-extension/dist/vision/faces.js +1 -1
- package/dist/node_modules/@allyhub/media-extension/dist/vision/index-media.js +3 -2
- 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/markup/csv/allyhub.yaml +2 -0
- package/dist/node_modules/@allyhub/office-extension/markup/csv/markup.json +1 -1
- package/dist/node_modules/@allyhub/office-extension/markup/document/allyhub.yaml +2 -0
- package/dist/node_modules/@allyhub/office-extension/markup/presentation/allyhub.yaml +2 -0
- package/dist/node_modules/@allyhub/office-extension/markup/workbook/allyhub.yaml +2 -0
- package/dist/node_modules/@allyhub/office-extension/markup/workbook/markup.json +1 -1
- package/dist/node_modules/@allyhub/office-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/ooxml/dist/ext.js +1 -1
- package/dist/node_modules/@allyhub/ooxml/dist/mce.js +1 -1
- package/dist/node_modules/@allyhub/ooxml/dist/node.js +1 -1
- package/dist/node_modules/@allyhub/ooxml/dist/ns.js +1 -1
- package/dist/node_modules/@allyhub/ooxml/dist/opc.js +1 -1
- package/dist/node_modules/@allyhub/ooxml/package.json +1 -1
- package/dist/node_modules/@allyhub/piece/dist/export.d.ts +1 -1
- package/dist/node_modules/@allyhub/piece/dist/layout.d.ts +2 -0
- package/dist/node_modules/@allyhub/piece/dist/look.d.ts +10 -2
- package/dist/node_modules/@allyhub/piece/dist/look.js +1 -1
- package/dist/node_modules/@allyhub/piece/dist/media.d.ts +8 -2
- package/dist/node_modules/@allyhub/piece/dist/script.js +1 -1
- package/dist/node_modules/@allyhub/piece/dist/source.d.ts +3 -0
- package/dist/node_modules/@allyhub/piece/package.json +1 -1
- package/dist/node_modules/@allyhub/project/dist/media-index.js +1 -1
- package/dist/node_modules/@allyhub/project/package.json +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/cli.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/cloud.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/events.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/kinds.js +1 -1
- package/dist/node_modules/@allyhub/protocol/dist/page-frame.js +2 -0
- 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/runtime/dist/footage.js +1 -1
- package/dist/node_modules/@allyhub/runtime/package.json +1 -1
- package/dist/node_modules/@allyhub/runtimes/dist/packages.js +2 -2
- package/dist/node_modules/@allyhub/runtimes/dist/runtimes.js +3 -3
- package/dist/node_modules/@allyhub/runtimes/package.json +1 -1
- package/dist/node_modules/@allyhub/scaffold/dist/index.js +12 -8
- 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/api/capabilities.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/api/charts.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/api/index.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/calc/engine.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/calc/server.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/cell-styles.js +2 -0
- package/dist/node_modules/@allyhub/sheet/dist/chart.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/check.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/file.js +2 -2
- package/dist/node_modules/@allyhub/sheet/dist/heatmap.js +2 -0
- 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/inspect.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/paginate.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/printed.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/sdk.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/sparklines.js +2 -0
- 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/theme.js +2 -0
- package/dist/node_modules/@allyhub/sheet/dist/tiles.js +2 -0
- package/dist/node_modules/@allyhub/sheet/dist/units.js +2 -0
- package/dist/node_modules/@allyhub/sheet/dist/workbook.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/write.js +14 -14
- 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/styles.js +1 -1
- package/dist/node_modules/@allyhub/sheet/dist/xlsx/theme.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/dist/build.js +1 -1
- package/dist/node_modules/@allyhub/sheet-extension/dist/cli/sheet.js +7 -7
- package/dist/node_modules/@allyhub/sheet-extension/dist/code.js +1 -1
- package/dist/node_modules/@allyhub/sheet-extension/dist/evaluate.js +2 -2
- package/dist/node_modules/@allyhub/sheet-extension/dist/export.js +2 -2
- package/dist/node_modules/@allyhub/sheet-extension/dist/inspect.js +2 -2
- package/dist/node_modules/@allyhub/sheet-extension/dist/migrations.js +4 -0
- package/dist/node_modules/@allyhub/sheet-extension/dist/project-tools.js +1 -1
- package/dist/node_modules/@allyhub/sheet-extension/dist/tools.js +1 -1
- package/dist/node_modules/@allyhub/sheet-extension/package.json +7 -3
- package/dist/node_modules/@allyhub/slides-core/dist/api.js +2 -2
- package/dist/node_modules/@allyhub/slides-core/dist/blocks.js +2 -0
- 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/code.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/index.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/measure.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/model.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/office-layouts.js +2 -0
- package/dist/node_modules/@allyhub/slides-core/dist/office.js +1 -1
- 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/styles/brief.js +2 -0
- package/dist/node_modules/@allyhub/slides-core/dist/styles/editorial.js +2 -0
- package/dist/node_modules/@allyhub/slides-core/dist/styles/index.js +2 -0
- package/dist/node_modules/@allyhub/slides-core/dist/styles/kit.js +2 -0
- package/dist/node_modules/@allyhub/slides-core/dist/styles/layouts.js +2 -0
- package/dist/node_modules/@allyhub/slides-core/dist/styles/pitch.js +2 -0
- package/dist/node_modules/@allyhub/slides-core/dist/styles/stage.js +2 -0
- package/dist/node_modules/@allyhub/slides-core/dist/styles/tiles.js +2 -0
- package/dist/node_modules/@allyhub/slides-core/dist/theme.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/dist/units.js +1 -1
- package/dist/node_modules/@allyhub/slides-core/package.json +1 -1
- package/dist/node_modules/@allyhub/slides-extension/dist/check.js +1 -1
- package/dist/node_modules/@allyhub/slides-extension/dist/cli/slides.js +2 -2
- package/dist/node_modules/@allyhub/slides-extension/dist/deck-fonts.js +1 -1
- package/dist/node_modules/@allyhub/slides-extension/dist/project-tools.js +1 -1
- package/dist/node_modules/@allyhub/slides-extension/package.json +24 -1
- package/dist/node_modules/@allyhub/slides-pptx/dist/charts.js +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/dist/fonts.js +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/dist/image-size.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 +7 -2
- package/dist/node_modules/@allyhub/slides-pptx/dist/import/names.js +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/dist/import/script.js +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/slides-pptx/dist/mtx.js +2 -0
- package/dist/node_modules/@allyhub/slides-pptx/dist/read/chart.js +3 -2
- package/dist/node_modules/@allyhub/slides-pptx/dist/read/chartex.js +3 -0
- 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/text.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 +3 -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/load.js +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/dist/fonts/archivo/LICENSE +93 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/files/archivo-latin-400-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/files/archivo-latin-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/files/archivo-latin-700-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/files/archivo-latin-700-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/files/archivo-latin-ext-400-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/files/archivo-latin-ext-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/files/archivo-latin-ext-700-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/files/archivo-latin-ext-700-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/latin-400-italic.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/latin-400.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/latin-700-italic.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/latin-700.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/latin-ext-400-italic.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/latin-ext-400.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/latin-ext-700-italic.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo/latin-ext-700.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo-black/LICENSE +93 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo-black/files/archivo-black-latin-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo-black/files/archivo-black-latin-ext-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo-black/latin-400.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/archivo-black/latin-ext-400.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/LICENSE +93 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/files/ibm-plex-sans-latin-400-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/files/ibm-plex-sans-latin-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/files/ibm-plex-sans-latin-700-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/files/ibm-plex-sans-latin-700-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/files/ibm-plex-sans-latin-ext-400-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/files/ibm-plex-sans-latin-ext-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/files/ibm-plex-sans-latin-ext-700-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/files/ibm-plex-sans-latin-ext-700-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/latin-400-italic.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/latin-400.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/latin-700-italic.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/latin-700.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/latin-ext-400-italic.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/latin-ext-400.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/latin-ext-700-italic.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/ibm-plex-sans/latin-ext-700.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/LICENSE +93 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/files/inter-latin-400-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/files/inter-latin-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/files/inter-latin-700-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/files/inter-latin-700-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/files/inter-latin-ext-400-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/files/inter-latin-ext-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/files/inter-latin-ext-700-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/files/inter-latin-ext-700-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/latin-400-italic.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/latin-400.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/latin-700-italic.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/latin-700.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/latin-ext-400-italic.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/latin-ext-400.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/latin-ext-700-italic.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/inter-static/latin-ext-700.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/LICENSE +93 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/files/newsreader-latin-400-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/files/newsreader-latin-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/files/newsreader-latin-700-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/files/newsreader-latin-700-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/files/newsreader-latin-ext-400-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/files/newsreader-latin-ext-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/files/newsreader-latin-ext-700-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/files/newsreader-latin-ext-700-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/latin-400-italic.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/latin-400.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/latin-700-italic.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/latin-700.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/latin-ext-400-italic.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/latin-ext-400.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/latin-ext-700-italic.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/newsreader/latin-ext-700.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/LICENSE +93 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/files/plus-jakarta-sans-latin-400-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/files/plus-jakarta-sans-latin-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/files/plus-jakarta-sans-latin-700-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/files/plus-jakarta-sans-latin-700-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/files/plus-jakarta-sans-latin-ext-400-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/files/plus-jakarta-sans-latin-ext-400-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/files/plus-jakarta-sans-latin-ext-700-italic.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/files/plus-jakarta-sans-latin-ext-700-normal.woff2 +0 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/latin-400-italic.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/latin-400.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/latin-700-italic.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/latin-700.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/latin-ext-400-italic.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/latin-ext-400.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/latin-ext-700-italic.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/fonts/plus-jakarta-sans/latin-ext-700.css +1 -0
- package/dist/node_modules/@allyhub/stage-page/dist/host.js +1 -1
- package/dist/node_modules/@allyhub/stage-page/dist/runtime/stage.html +42 -0
- package/dist/node_modules/@allyhub/stage-page/dist/style-faces.js +2 -0
- package/dist/node_modules/@allyhub/stage-page/package.json +1 -1
- package/dist/node_modules/@allyhub/stage-runtime/dist/runtime.js +96 -92
- package/dist/node_modules/@allyhub/stage-runtime/package.json +1 -1
- package/dist/node_modules/@allyhub/telemetry/dist/limit.js +2 -0
- package/dist/node_modules/@allyhub/telemetry/package.json +5 -1
- package/dist/node_modules/@allyhub/text-extension/markup/allyhub.yaml +2 -0
- package/dist/node_modules/@allyhub/text-extension/markup-file/allyhub.yaml +2 -0
- package/dist/node_modules/@allyhub/text-extension/package.json +1 -1
- package/dist/node_modules/@allyhub/video-core/dist/footage-motion.js +1 -1
- package/dist/node_modules/@allyhub/video-core/dist/measure.js +1 -1
- package/dist/node_modules/@allyhub/video-core/dist/seams.js +1 -1
- package/dist/node_modules/@allyhub/video-core/package.json +1 -1
- package/dist/node_modules/@allyhub/video-extension/dist/cli/reference-text.js +1 -1
- package/dist/node_modules/@allyhub/video-extension/dist/inspect/index.js +1 -1
- package/dist/node_modules/@allyhub/video-extension/dist/inspect/joins.js +1 -1
- package/dist/node_modules/@allyhub/video-extension/dist/inspect/loop.js +3 -0
- package/dist/node_modules/@allyhub/video-extension/package.json +2 -25
- package/dist/node_modules/@allyhub/video-measure/dist/check.js +2 -2
- package/dist/node_modules/@allyhub/video-measure/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/video-measure/dist/seams.js +1 -1
- package/dist/node_modules/@allyhub/video-measure/dist/version.js +1 -1
- package/dist/node_modules/@allyhub/video-measure/package.json +1 -1
- package/dist/node_modules/@allyhub/video-sdk/dist/free.js +1 -1
- package/dist/node_modules/@allyhub/video-sdk/package.json +1 -1
- package/dist/node_modules/@allyhub/website/dist/index.js +1 -1
- package/dist/node_modules/@allyhub/website/dist/website.js +2 -2
- package/dist/node_modules/@allyhub/website/package.json +1 -1
- package/dist/node_modules/@allyhub/website-extension/package.json +3 -3
- package/dist/node_modules/@allyhub/x-extension/package.json +1 -3
- package/dist/node_modules/@allyhub/x-extension/skills/allyhub/references/x.md +3 -3
- 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 +14 -14
- package/dist/self-upgrade.js +2 -0
- package/dist/text/batch-text.js +1 -1
- package/dist/text/facts-text.js +5 -5
- package/dist/text/format.js +2 -2
- package/dist/update-notice.js +3 -0
- package/dist/version.js +1 -1
- package/dist/works.js +1 -1
- package/editor-web/assets/{abnfDiagram-WEYOIA3C-DYaMS_BB.js → abnfDiagram-WEYOIA3C-BkVJMd53.js} +1 -1
- package/editor-web/assets/{architecture-WOLXFQ4H-g_Tjfl_y.js → architecture-WOLXFQ4H-C6rnaynZ.js} +1 -1
- package/editor-web/assets/{architectureDiagram-ZHVYKT53-CqdhofOL.js → architectureDiagram-ZHVYKT53-D3vrh8LK.js} +1 -1
- package/editor-web/assets/arrow-down-D-QZrqcz.js +1 -0
- package/editor-web/assets/arrow-up-B1zjKUHX.js +1 -0
- package/editor-web/assets/article-DHf6mOY_.js +7 -0
- package/editor-web/assets/article-Dns1-Xh-.js +3 -0
- package/editor-web/assets/{audio-lines-PZj77e7t.js → audio-lines-BFoW_IeO.js} +1 -1
- package/editor-web/assets/bar-button-CKPfx2AB.js +1 -0
- package/editor-web/assets/{blockDiagram-RJAE7QA3-Bc-28Bci.js → blockDiagram-RJAE7QA3-BKngt8H7.js} +1 -1
- package/editor-web/assets/{browser-C9NP0ZYz.js → browser-DEGNhKTV.js} +1 -1
- package/editor-web/assets/{c4Diagram-XDPPPE54-CTGJb8FB.js → c4Diagram-XDPPPE54-j7sUELqF.js} +1 -1
- package/editor-web/assets/calc-worker-Cr4a0xmt.js +168 -0
- package/editor-web/assets/channel-CVWSV3su.js +1 -0
- package/editor-web/assets/{chart-no-axes-column-Be0lFcGF.js → chart-no-axes-column-Dyy25XZ_.js} +1 -1
- package/editor-web/assets/chip-Bn_9JRRG.js +1 -0
- package/editor-web/assets/{chunk-2E7WHVMD-B2MPOVTU.js → chunk-2E7WHVMD-BXa-uRSi.js} +1 -1
- package/editor-web/assets/{chunk-4EMNKR2T-BUV1ZHP0.js → chunk-4EMNKR2T-B3ntcsZN.js} +1 -1
- package/editor-web/assets/{chunk-55XCU76K-BZlpspL5.js → chunk-55XCU76K-AMvnFwUg.js} +1 -1
- package/editor-web/assets/{chunk-7S6XSTFO-CpKeisWE.js → chunk-7S6XSTFO-BA6esfFu.js} +1 -1
- package/editor-web/assets/{chunk-AQDTSKZB-BJqwAPyo.js → chunk-AQDTSKZB-BT_vANXs.js} +1 -1
- package/editor-web/assets/{chunk-DSNLSHJZ-D6oPWl_W.js → chunk-DSNLSHJZ-DoUgmzGB.js} +1 -1
- package/editor-web/assets/{chunk-HAGFOTED-B5pk4MZF.js → chunk-HAGFOTED-DtnIrCZb.js} +1 -1
- package/editor-web/assets/{chunk-HNE4Q36P-DHbSPvxQ.js → chunk-HNE4Q36P-BlPwQx3_.js} +1 -1
- package/editor-web/assets/{chunk-NQOKRVIF-CcL_GcRA.js → chunk-NQOKRVIF-D2r7jp2r.js} +1 -1
- package/editor-web/assets/{chunk-UHW7PFBP-YgiOL6XE.js → chunk-UHW7PFBP-Cmc0_F5o.js} +1 -1
- package/editor-web/assets/{chunk-VQ5W62QI-p14b4UYc.js → chunk-VQ5W62QI-nJSMqAr0.js} +1 -1
- package/editor-web/assets/{chunk-WQQL4CDK-BWW0x-XH.js → chunk-WQQL4CDK-Btq2nbF6.js} +1 -1
- package/editor-web/assets/{chunk-YZO67HFG-oG3qd68C.js → chunk-YZO67HFG-DTbcCoGt.js} +1 -1
- package/editor-web/assets/{chunk-ZAUX2LTX-CpcheH0u.js → chunk-ZAUX2LTX-DVwkg-2N.js} +1 -1
- package/editor-web/assets/{chunk-ZCHMQSOR-cWQvLl1w.js → chunk-ZCHMQSOR-BV39jOOE.js} +1 -1
- package/editor-web/assets/{classDiagram-v2-4MYWR3UA-7PG7YcdU.js → classDiagram-v2-4MYWR3UA-Cj74-fhM.js} +1 -1
- package/editor-web/assets/code-Ch6AB5bZ.js +1 -0
- package/editor-web/assets/collaborator-XiHOxwGM.js +1 -0
- package/editor-web/assets/{copy-CuJSs0nI.js → copy-SoaMYqsN.js} +1 -1
- package/editor-web/assets/{createLucideIcon-lm_6n8YT.js → createLucideIcon-euu7Wcd9.js} +1 -1
- package/editor-web/assets/{cynefin-EF2NZ3EQ-CtcknEQ_.js → cynefin-EF2NZ3EQ-C0CkiipV.js} +1 -1
- package/editor-web/assets/{cynefinDiagram-WF24UDRP-Ca7VIsjN.js → cynefinDiagram-WF24UDRP-hdsnJ4cI.js} +1 -1
- package/editor-web/assets/{dagre-NK4GIZVX-BzcSLtsr.js → dagre-NK4GIZVX-CC7WSgaK.js} +1 -1
- package/editor-web/assets/deck-DQpNIS2p.js +1 -0
- package/editor-web/assets/{diagram-CBK3MWTC-DpRmTGlG.js → diagram-CBK3MWTC-DmaVm13J.js} +1 -1
- package/editor-web/assets/{diagram-I5XIIV2D-BTrs_AX8.js → diagram-I5XIIV2D-De8jqp7b.js} +1 -1
- package/editor-web/assets/{diagram-ODIL2UCW-CkIVjPqH.js → diagram-ODIL2UCW-B5pBTulX.js} +1 -1
- package/editor-web/assets/{diagram-PFBEJUXE-BlFMbAG1.js → diagram-PFBEJUXE-BYsXg5_w.js} +1 -1
- package/editor-web/assets/{diagram-RJA3I4VV-D3f8VJ-D.js → diagram-RJA3I4VV-DZ8f6bYe.js} +1 -1
- package/editor-web/assets/{diagram-TYUNFSNR-Bbpngj6F.js → diagram-TYUNFSNR-qXHUsauD.js} +1 -1
- package/editor-web/assets/dist--z0ZHp4T.js +16 -0
- package/editor-web/assets/dist-9kuRjUTN.js +41 -0
- package/editor-web/assets/dist-B3rd02Cg.js +6 -0
- package/editor-web/assets/dist-B5GOGGEe.js +1 -0
- package/editor-web/assets/dist-Bx6q9kCu.js +1 -0
- package/editor-web/assets/dist-C4hHtrJr.js +1 -0
- package/editor-web/assets/dist-CCXJewsi.js +19 -0
- package/editor-web/assets/dist-CfK2BLl8.js +4 -0
- package/editor-web/assets/dist-Cmux3oJ_.js +1 -0
- package/editor-web/assets/dist-Cspf85KV.js +6 -0
- package/editor-web/assets/dist-DA72-4WB.js +82 -0
- package/editor-web/assets/{dist-DruvDNQe.js → dist-DAhe-kFC.js} +5 -5
- package/editor-web/assets/dist-DIJnhQFK.js +9 -0
- package/editor-web/assets/dist-DOrGo1GD.js +19 -0
- package/editor-web/assets/{dist-Bd8IxQPP.js → dist-DQ6RpEJD.js} +2 -2
- package/editor-web/assets/dist-DjiCHlSu.js +35 -0
- package/editor-web/assets/dist-Do4a40Wn.js +19 -0
- package/editor-web/assets/dist-FKEWS3Co.js +547 -0
- package/editor-web/assets/dist-QKd2i6kG.js +5 -0
- package/editor-web/assets/dist-SGnOfLhx.js +24 -0
- package/editor-web/assets/dist-VmVB7tl4.js +3 -0
- package/editor-web/assets/{docx-draw-CoK1oqQD.js → docx-draw-L54blreB.js} +1 -1
- package/editor-web/assets/{ebnfDiagram-V4P3TTPT-BaKj-yL6.js → ebnfDiagram-V4P3TTPT-B7-IfVI-.js} +1 -1
- package/editor-web/assets/{elk-QONTBCTQ-Cn2qv1_U.js → elk-QONTBCTQ-Gj_WaeBn.js} +1 -1
- package/editor-web/assets/{erDiagram-KYQIGQAA-Bd7AEIDo.js → erDiagram-KYQIGQAA-BDF6Qoqx.js} +1 -1
- package/editor-web/assets/esm-PQD5Pn8a.js +21 -0
- package/editor-web/assets/{eventmodeling-K75KTNOO-Sfp7_461.js → eventmodeling-K75KTNOO-elxVXXEe.js} +1 -1
- package/editor-web/assets/{file-question-mark-DlIjUK37.js → file-question-mark-PeZgyqkK.js} +1 -1
- package/editor-web/assets/flowDiagram-IUGLLWBU-B-25n8zE.js +1 -0
- package/editor-web/assets/{ganttDiagram-R7GPNTJY-CBqcGdHI.js → ganttDiagram-R7GPNTJY-CEogW3jW.js} +1 -1
- package/editor-web/assets/{gitGraph-VSP46ZUC-WTokXKTW.js → gitGraph-VSP46ZUC-Bh9cRWFa.js} +1 -1
- package/editor-web/assets/{gitGraphDiagram-PDYL7XHY-BIWZHD9q.js → gitGraphDiagram-PDYL7XHY-BQAvdM_V.js} +1 -1
- package/editor-web/assets/{group-BdrTp7gi.js → group-DwM2yqU8.js} +1 -1
- package/editor-web/assets/hint-CbwoSBMw.js +1 -0
- package/editor-web/assets/index-CXisi0Cj.css +2 -0
- package/editor-web/assets/index-wMlfx8aT.js +28 -0
- package/editor-web/assets/{info-OHQRW6UA-COC6G-_J.js → info-OHQRW6UA-CdPrqere.js} +1 -1
- package/editor-web/assets/{infoDiagram-MVDRKAX5-DpaqdKBD.js → infoDiagram-MVDRKAX5-uwIMeP44.js} +1 -1
- package/editor-web/assets/{ishikawaDiagram-HPEHV2GE-Dyn2MAy1.js → ishikawaDiagram-HPEHV2GE-rtfvqK7E.js} +1 -1
- package/editor-web/assets/iso-UwGLGD3F.js +1 -0
- package/editor-web/assets/{italic-zw4_eUNF.js → italic-BV7iHxoP.js} +1 -1
- package/editor-web/assets/{journeyDiagram-BOSHW7O7-DeSVfmm7.js → journeyDiagram-BOSHW7O7-mmhfIyVG.js} +1 -1
- package/editor-web/assets/{kanban-definition-FNSA4HC5-Bfg0lj7B.js → kanban-definition-FNSA4HC5-Fe7jBsi-.js} +1 -1
- package/editor-web/assets/{link-DopSU3aa.js → link-CFOv3nz-.js} +1 -1
- package/editor-web/assets/{mermaid-parser.core-CyhovuYE.js → mermaid-parser.core-BxOSjBH9.js} +3 -3
- package/editor-web/assets/{mermaid.core-Dx1fBVUG.js → mermaid.core-BOln9YdH.js} +4 -4
- package/editor-web/assets/{mindmap-definition-6OY57UG3-QEU2HF_m.js → mindmap-definition-6OY57UG3-M3Q1LOtO.js} +1 -1
- package/editor-web/assets/minus-ngE8owxs.js +1 -0
- package/editor-web/assets/{packet-JDAUHWVQ-ReJTa_hw.js → packet-JDAUHWVQ-Dbb0TUG6.js} +1 -1
- package/editor-web/assets/{pegDiagram-ECIUJNBX-Bo1jFrvb.js → pegDiagram-ECIUJNBX-BZMRpSFC.js} +1 -1
- package/editor-web/assets/{pie-XZMESJXO-BrtYafNA.js → pie-XZMESJXO-Ctm9XdKp.js} +1 -1
- package/editor-web/assets/{pieDiagram-GNMPY74T-Cj0zQqs_.js → pieDiagram-GNMPY74T-cGbs5ZTl.js} +1 -1
- package/editor-web/assets/progress-DZQTiRLv.js +6 -0
- package/editor-web/assets/{quadrantDiagram-D57K4MC3-D5npDAVn.js → quadrantDiagram-D57K4MC3-BUe_zsxT.js} +1 -1
- package/editor-web/assets/{radar-ABXABTNO-C8RDrRqi.js → radar-ABXABTNO-CCmKtqLs.js} +1 -1
- package/editor-web/assets/{railroad-I3PHUGI6-ebDrmYTK.js → railroad-I3PHUGI6-k-yhjhjA.js} +1 -1
- package/editor-web/assets/{railroad-abnf-LNEFI6M7-BxKuqg6V.js → railroad-abnf-LNEFI6M7-B-PvntB3.js} +1 -1
- package/editor-web/assets/{railroad-ebnf-DWYD2UWJ-DOclnfpr.js → railroad-ebnf-DWYD2UWJ-Ds2rua1h.js} +1 -1
- package/editor-web/assets/{railroad-peg-JR7BVNR7-DN0A1fpq.js → railroad-peg-JR7BVNR7-jNZ2wEp2.js} +1 -1
- package/editor-web/assets/{railroadDiagram-Y72NRBL7-B3PjoVWw.js → railroadDiagram-Y72NRBL7-CTqSQ15w.js} +1 -1
- package/editor-web/assets/react-Byupo4pA.js +1 -0
- package/editor-web/assets/replace-CLLMtF4e.js +1 -0
- package/editor-web/assets/{requirementDiagram-EQYSW5RA-DLdzkQk5.js → requirementDiagram-EQYSW5RA-CUblhR5M.js} +1 -1
- package/editor-web/assets/ribbon-DajdQ_Ya.js +1 -0
- package/editor-web/assets/row-Bei9HNEe.js +1 -0
- package/editor-web/assets/{sankeyDiagram-SY24JHO5-Dip4Piv_.js → sankeyDiagram-SY24JHO5-nSz6zDX3.js} +1 -1
- package/editor-web/assets/schemas-C21MyseF.js +1 -0
- package/editor-web/assets/{iso-DoC-ZoBr.js → schemas-DlRAoVtq.js} +1 -1
- package/editor-web/assets/{scissors-B_xOiUhd.js → scissors-m6QcoEf2.js} +1 -1
- package/editor-web/assets/search-D75Bi2GU.js +1 -0
- package/editor-web/assets/{sequenceDiagram-BLEHNHQU-QnPcoybL.js → sequenceDiagram-BLEHNHQU-DxTpOYuo.js} +1 -1
- package/editor-web/assets/{session-DMlLCFWg.js → session-BhClkDyr.js} +1 -1
- package/editor-web/assets/{sigma-DSUsJhMn.js → sigma-B4AWtnVA.js} +1 -1
- package/editor-web/assets/snapshots-DwGHDN3t.js +1 -0
- package/editor-web/assets/sound-DkR3qxSt.js +1 -0
- package/editor-web/assets/split-DBAbwPZ5.js +3 -0
- package/editor-web/assets/{square-arrow-out-up-right-DF5dvsSp.js → square-arrow-out-up-right-1NqFsNDe.js} +1 -1
- package/editor-web/assets/{stateDiagram-v2-A6IESKWZ-D103CiMX.js → stateDiagram-v2-A6IESKWZ-C3e14iHY.js} +1 -1
- package/editor-web/assets/{sticky-note-BdkIu5_D.js → sticky-note-s4QfzaBB.js} +1 -1
- package/editor-web/assets/surface-CIF0Ae0z.js +1 -0
- package/editor-web/assets/swatch-BUzr_XmH.js +1 -0
- package/editor-web/assets/{swimlanes-B3ENRKFQ-y4gCqEoa.js → swimlanes-B3ENRKFQ-DPPdzNzu.js} +1 -1
- package/editor-web/assets/swimlanesDiagram-AYQRV4AK-B8n3zOw_.js +8 -0
- package/editor-web/assets/switch-DrZxoPQS.js +1 -0
- package/editor-web/assets/{syntax-CU_WPKxt.js → syntax-emXV4DnN.js} +1 -1
- package/editor-web/assets/table-BW43XXVd.js +1 -0
- package/editor-web/assets/tabs-BwU2E7bU.js +1 -0
- package/editor-web/assets/text-wrap-Baus6l-V.js +1 -0
- package/editor-web/assets/textarea-BX_ax3X8.js +1 -0
- package/editor-web/assets/{timeline-definition-JXYKGLGB-BMp76v4V.js → timeline-definition-JXYKGLGB-DRTJ1_Er.js} +1 -1
- package/editor-web/assets/tolerant-DM9s0Mt1.js +1 -0
- package/editor-web/assets/{treeView-D4JQ5SDB-Q_GYyk0b.js → treeView-D4JQ5SDB-BYJ_m-i5.js} +1 -1
- package/editor-web/assets/{treemap-SAJKECNS-B5lRWdQB.js → treemap-SAJKECNS-BcU6I6Rg.js} +1 -1
- package/editor-web/assets/type-CvZ0HZsV.js +41 -0
- package/editor-web/assets/{undo-2-C47jrRp5.js → undo-2-DCbMWoug.js} +1 -1
- package/editor-web/assets/{usecaseDiagram-WPOLBNNX--QRllA-U.js → usecaseDiagram-WPOLBNNX-YV92pS4o.js} +1 -1
- package/editor-web/assets/{vennDiagram-Q3Y3IDCW-CzkATPA3.js → vennDiagram-Q3Y3IDCW-oAvfHZtf.js} +1 -1
- package/editor-web/assets/video-SJvDRCJK.js +1 -0
- package/editor-web/assets/{wardley-7MLQ67FV-BXzwcdJa.js → wardley-7MLQ67FV-BLNiqxtt.js} +1 -1
- package/editor-web/assets/{wardleyDiagram-IVAIDKWA-BQvC8Agx.js → wardleyDiagram-IVAIDKWA-SppgC6xW.js} +1 -1
- package/editor-web/assets/{whole-word-D3ZAtnkw.js → whole-word-C9TkGBCY.js} +1 -1
- package/editor-web/assets/{words-CaUHhQHf.js → words-BUlNNuH2.js} +3 -3
- package/editor-web/assets/words-zMedmPWc.js +3 -0
- package/editor-web/assets/workbook-BZKYx4WB.js +41 -0
- package/editor-web/assets/{xychartDiagram-4URNHDU4-aY-lsD5o.js → xychartDiagram-4URNHDU4-BHMn_jwJ.js} +1 -1
- package/editor-web/assets/{zoom-in-PgsC94hP.js → zoom-in-yAGKspfC.js} +1 -1
- package/editor-web/index.html +9 -8
- package/package.json +3 -3
- package/CHANGELOG.md +0 -251
- package/dist/commands/render.js +0 -3
- package/dist/node_modules/@allyhub/video-extension/dist/inspect/motion.js +0 -4
- package/dist/node_modules/@allyhub/video-measure/dist/still.js +0 -2
- package/editor-web/assets/arrow-down-B8VUPCGi.js +0 -1
- package/editor-web/assets/arrow-up-Ds4juY8X.js +0 -1
- package/editor-web/assets/article-8evPh712.js +0 -3
- package/editor-web/assets/article-BhRtWYMd.js +0 -7
- package/editor-web/assets/bar-button-J9vbfzTx.js +0 -1
- package/editor-web/assets/calc-worker-oEIqrrTM.js +0 -45
- package/editor-web/assets/channel-wIj_OqDm.js +0 -1
- package/editor-web/assets/chart-amT4lgX3.js +0 -2
- package/editor-web/assets/chart-file-dGiRgFcH.js +0 -1
- package/editor-web/assets/code-CD-CbJG9.js +0 -1
- package/editor-web/assets/collaborator-BU4qU7O3.js +0 -1
- package/editor-web/assets/deck-C7fN0Qtn.js +0 -1
- package/editor-web/assets/dist-3iovns9K.js +0 -16
- package/editor-web/assets/dist-BkHnbOEj.js +0 -4
- package/editor-web/assets/dist-BvOrNcK-.js +0 -19
- package/editor-web/assets/dist-CEIszq39.js +0 -1
- package/editor-web/assets/dist-CU5RbLNH.js +0 -1
- package/editor-web/assets/dist-CWZj8IAm.js +0 -1
- package/editor-web/assets/dist-C_Mtrnif.js +0 -17
- package/editor-web/assets/dist-CdqpwdCV.js +0 -24
- package/editor-web/assets/dist-CjT76RAw.js +0 -43
- package/editor-web/assets/dist-CpzEn9T8.js +0 -6
- package/editor-web/assets/dist-CrFYWl5-.js +0 -3
- package/editor-web/assets/dist-D3C6FyrO.js +0 -82
- package/editor-web/assets/dist-D4eBFGVL.js +0 -1
- package/editor-web/assets/dist-DTcjb3cP.js +0 -18
- package/editor-web/assets/dist-D_WSM29I.js +0 -17
- package/editor-web/assets/dist-Dp_9ISjP.js +0 -531
- package/editor-web/assets/dist-J-tPYKGS.js +0 -5
- package/editor-web/assets/dist-YW8hS4IM.js +0 -9
- package/editor-web/assets/esm-Cjv8ogpP.js +0 -21
- package/editor-web/assets/file-exclamation-point-_L3ElCJ5.js +0 -1
- package/editor-web/assets/flowDiagram-IUGLLWBU-BlVUglzw.js +0 -1
- package/editor-web/assets/hint-rlht0uxG.js +0 -1
- package/editor-web/assets/index-BQWZnyAQ.js +0 -28
- package/editor-web/assets/index-Dvh1t1om.css +0 -2
- package/editor-web/assets/minus-CbPnUIOy.js +0 -1
- package/editor-web/assets/progress-CwKcXARv.js +0 -6
- package/editor-web/assets/props-form-BpSXbrSF.js +0 -1
- package/editor-web/assets/react-Edyoga_4.js +0 -1
- package/editor-web/assets/row-C_svyL8o.js +0 -1
- package/editor-web/assets/schemas-CQ_UU8-Z.js +0 -1
- package/editor-web/assets/search-Ba2BbT6T.js +0 -1
- package/editor-web/assets/slides-7xWhREpt.js +0 -1
- package/editor-web/assets/snapshots-BLX4NTQC.js +0 -1
- package/editor-web/assets/sound-bTlco_K3.js +0 -1
- package/editor-web/assets/split-tFGKk-x8.js +0 -3
- package/editor-web/assets/strikethrough-BwXWi4zg.js +0 -1
- package/editor-web/assets/surface-DtCjIlrq.js +0 -1
- package/editor-web/assets/svg-CWIBMIQ9.js +0 -1
- package/editor-web/assets/swatch-DhztHwPU.js +0 -1
- package/editor-web/assets/swimlanesDiagram-AYQRV4AK-DKzB_wSf.js +0 -8
- package/editor-web/assets/switch-8MU4Nfxe.js +0 -1
- package/editor-web/assets/table-DRbddzx0.js +0 -1
- package/editor-web/assets/tabs-CuEawka3.js +0 -1
- package/editor-web/assets/tag-CIfWT8B_.js +0 -1
- package/editor-web/assets/text-align-start-Cic2-TLh.js +0 -1
- package/editor-web/assets/textarea-D7TnPwv1.js +0 -1
- package/editor-web/assets/video-D0uTbHWx.js +0 -1
- package/editor-web/assets/words-XlXG79Ur.js +0 -3
- package/editor-web/assets/workbook-CiCXkjmN.js +0 -45
- package/editor-web/assets/x-DlhyIKuu.js +0 -41
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./mermaid-parser.core-
|
|
1
|
+
import{n as e}from"./mermaid-parser.core-BxOSjBH9.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-DoUgmzGB.js";import{t as m}from"./chunk-JWPE2WC7-DVXcaiue.js";import{i as h}from"./chunk-7S6XSTFO-BA6esfFu.js";import{a as g}from"./mermaid.core-BOln9YdH.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{t as e}from"./purify.es-B9ve_eFf.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{n,t as r}from"./d3-selection-COWvaQNI.js";import{C as i,G as a,H as o,U as s,_ as c,a as l,b as u,d,it as f,q as p,s as m,v as h}from"./chunk-DSNLSHJZ-
|
|
1
|
+
import{t as e}from"./purify.es-B9ve_eFf.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{n,t as r}from"./d3-selection-COWvaQNI.js";import{C as i,G as a,H as o,U as s,_ as c,a as l,b as u,d,it as f,q as p,s as m,v as h}from"./chunk-DSNLSHJZ-DoUgmzGB.js";import{t as g}from"./channel-CVWSV3su.js";import"./chunk-YZO67HFG-DTbcCoGt.js";import{_,c as v}from"./chunk-7S6XSTFO-BA6esfFu.js";import"./chunk-AQDTSKZB-BT_vANXs.js";import{t as y}from"./chunk-5VM5RSS4-ZNzvKenW.js";import"./chunk-UHW7PFBP-Cmc0_F5o.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-DtnIrCZb.js";import"./chunk-ZAUX2LTX-DVwkg-2N.js";import"./chunk-WQQL4CDK-Btq2nbF6.js";import{t as T}from"./chunk-55XCU76K-AMvnFwUg.js";import{t as E}from"./chunk-XXDRQBXY-i7MKP1NY.js";import{t as D}from"./chunk-VQ5W62QI-nJSMqAr0.js";import"./chunk-HNE4Q36P-BlPwQx3_.js";import{i as O,n as k,r as A,t as j}from"./mermaid.core-BOln9YdH.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)}t(I,`resolveShapeAlias`);function ne(e,t){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}"`;t?.emitError?t.emitError(`SHAPE_REMOVED`,e,{nodeId:r.id}):n.warn(`agentflow: ${e}`),r.shape=F}else if(!te.has(r.shape)){let e=`shape "${r.shape}" is not supported, using "${F}"`;t?.emitWarning?t.emitWarning(`SHAPE_UNSUPPORTED`,e,{nodeId:r.id}):n.warn(`agentflow: ${e}`),r.shape=F}}}t(ne,`normaliseNodeShapes`);var L=new Map([[`tool`,0],[`task`,1],[`decision`,2],[`input`,3],[`refdoc`,4],[`connector`,5],[`action`,6]]),R=L.size,z=t(e=>`af-kind-${e}`,`kindClass`),B=[...L.keys()],V=t(e=>Math.max(1,e-R),`containerSlotCount`),H=t((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())}}t(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}t(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
|
`)}t(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=s,this.setAccDescription=o,this.setDiagramTitle=p,this.getAccTitle=h,this.getAccDescription=c,this.getDiagramTitle=i,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{t(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,16 @@
|
|
|
1
|
+
import{i as e,n as t,t as n}from"./rolldown-runtime-COiEfhsA.js";import{a as r,b as i,c as a,f as o,p as s,s as c}from"./react-Byupo4pA.js";import{Ot as l,_t as u,jt as d,kt as f,xt as p}from"./type-CvZ0HZsV.js";import{E as m}from"./snapshots-DwGHDN3t.js";import{t as h}from"./session-BhClkDyr.js";import{t as g}from"./jsx-runtime-DePvh3-m.js";import{t as _}from"./bar-button-CKPfx2AB.js";import{C as v,E as ee,O as y,S as b,_ as te,b as ne,c as re,d as ie,f as ae,i as oe,l as se,o as ce,p as le,u as ue}from"./dist-Cspf85KV.js";import{a as de,i as fe,r as x}from"./progress-DZQTiRLv.js";import{t as S}from"./createLucideIcon-euu7Wcd9.js";import{t as pe}from"./audio-lines-BFoW_IeO.js";import{t as C}from"./group-DwM2yqU8.js";import{c as me,i as w,l as he,n as ge,o as _e,r as ve,t as ye}from"./syntax-emXV4DnN.js";import{t as be}from"./minus-ngE8owxs.js";import{n as xe,t as Se}from"./undo-2-DCbMWoug.js";import{t as Ce}from"./square-arrow-out-up-right-1NqFsNDe.js";import{t as we}from"./sticky-note-s4QfzaBB.js";import{n as T,t as Te}from"./swatch-BUzr_XmH.js";import{_ as Ee,j as E,l as De,p as Oe,r as ke,v as D,y as O}from"./index-wMlfx8aT.js";import{c as Ae,l as je,n as Me,o as Ne,r as Pe,t as Fe}from"./dist-D2a_y4AE.js";import{t as Ie}from"./collaborator-XiHOxwGM.js";import{t as k}from"./row-Bei9HNEe.js";import{A,F as j,L as Le,M as Re,R as M,S as ze,_ as Be,a as Ve,b as N,g as He,h as Ue,i as We,j as Ge,m as Ke,n as qe,p as Je,r as Ye,t as Xe,v as Ze,x as Qe,y as $e,z as et}from"./syntax-C0iPON60.js";var tt={".html":`text/html; charset=utf-8`,".js":`text/javascript; charset=utf-8`,".mjs":`text/javascript; charset=utf-8`,".css":`text/css; charset=utf-8`,".json":`application/json; charset=utf-8`,".txt":`text/plain; charset=utf-8`,".md":`text/plain; charset=utf-8`,".mdx":`text/plain; charset=utf-8`,".csv":`text/plain; charset=utf-8`,".yaml":`text/plain; charset=utf-8`,".svg":`image/svg+xml`,".png":`image/png`,".jpg":`image/jpeg`,".jpeg":`image/jpeg`,".webp":`image/webp`,".gif":`image/gif`,".avif":`image/avif`,".woff2":`font/woff2`,".woff":`font/woff`,".ttf":`font/ttf`,".otf":`font/otf`,".mp3":`audio/mpeg`,".wav":`audio/wav`,".m4a":`audio/mp4`,".ogg":`audio/ogg`,".aac":`audio/aac`,".flac":`audio/flac`,".mp4":`video/mp4`,".webm":`video/webm`,".mov":`video/quicktime`,".pdf":`application/pdf`,".wasm":`application/wasm`,".glb":`model/gltf-binary`,".gltf":`model/gltf+json`,".bin":`application/octet-stream`,".ktx2":`image/ktx2`,".hdr":`image/vnd.radiance`,".exr":`image/x-exr`,".htm":`text/html; charset=utf-8`,".map":`application/json; charset=utf-8`,".webmanifest":`application/manifest+json`,".xml":`application/xml`,".rss":`application/rss+xml`,".atom":`application/atom+xml`,".ico":`image/x-icon`,".vtt":`text/vtt; charset=utf-8`,".zip":`application/zip`},nt=e=>tt[/\.[^./]+$/u.exec(e)?.[0].toLowerCase()??``]??`application/octet-stream`,rt=S(`file-exclamation-point`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),it=S(`focus`,[[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`path`,{d:`M3 7V5a2 2 0 0 1 2-2h2`,key:`aa7l1z`}],[`path`,{d:`M17 3h2a2 2 0 0 1 2 2v2`,key:`4qcy5o`}],[`path`,{d:`M21 17v2a2 2 0 0 1-2 2h-2`,key:`6vwrx8`}],[`path`,{d:`M7 21H5a2 2 0 0 1-2-2v-2`,key:`ioqczr`}]]),at=S(`maximize`,[[`path`,{d:`M8 3H5a2 2 0 0 0-2 2v3`,key:`1dcmit`}],[`path`,{d:`M21 8V5a2 2 0 0 0-2-2h-3`,key:`1e4gt3`}],[`path`,{d:`M3 16v3a2 2 0 0 0 2 2h3`,key:`wsl5sc`}],[`path`,{d:`M16 21h3a2 2 0 0 0 2-2v-3`,key:`18trek`}]]),ot=S(`paperclip`,[[`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551`,key:`1miecu`}]]),st=[`1`,`2`,`3`,`4`,`5`,`6`],ct=[`top`,`right`,`bottom`,`left`],P=[`none`,`arrow`],F={nodes:[],edges:[],top:{}},I=e=>typeof e==`object`&&!!e&&!Array.isArray(e),L=e=>typeof e==`string`?e:void 0,lt=e=>typeof e==`number`&&Number.isFinite(e)?e:void 0,ut=(e,t)=>typeof t==`string`&&e.includes(t)?t:void 0;function dt(e){let t=L(e.id),n=L(e.type),r=lt(e.x),i=lt(e.y),a=lt(e.width),o=lt(e.height);if(t!==void 0&&t!==``&&n!==void 0&&r!==void 0&&i!==void 0&&a!==void 0&&o!==void 0)return{id:t,type:n,x:r,y:i,width:a,height:o,color:L(e.color),text:L(e.text),file:L(e.file),subpath:L(e.subpath),url:L(e.url),label:L(e.label),background:L(e.background),backgroundStyle:L(e.backgroundStyle),raw:e}}function ft(e){let t=L(e.id),n=L(e.fromNode),r=L(e.toNode);if(t&&n&&r)return{id:t,fromNode:n,fromSide:ut(ct,e.fromSide),fromEnd:ut(P,e.fromEnd)??`none`,toNode:r,toSide:ut(ct,e.toSide),toEnd:ut(P,e.toEnd)??`arrow`,color:L(e.color),label:L(e.label),raw:e}}var R=e=>{let t=e.id;return typeof t==`string`&&t!==``?t:void 0};function pt(e){if(e.trim()===``)return{canvas:F,problems:[],readable:!0};let t;try{t=JSON.parse(e)}catch(e){return{canvas:F,readable:!1,problems:[{at:`file`,message:`It is not JSON: ${e instanceof Error?e.message:String(e)}`}]}}if(!I(t))return{canvas:F,readable:!1,problems:[{at:`file`,message:`It is not a JSON object.`}]};let n=[],r=e=>{let r=t[e];return r===void 0?[]:Array.isArray(r)?r.flatMap((t,r)=>I(t)?[t]:(n.push({at:e===`nodes`?`node`:`edge`,index:r,message:`Its ${e} entry ${String(r)} is not an object.`}),[])):(n.push({at:e,message:`Its "${e}" is not a list.`}),[])},i=r(`nodes`),a=r(`edges`);return i.forEach((e,t)=>{if(dt(e))return;let r=R(e);n.push({at:`node`,index:t,...r===void 0?{}:{id:r},message:`Its node ${r??String(t)} is not drawn: a node has an id, a type, and x, y, width and height as numbers.`})}),a.forEach((e,t)=>{if(ft(e))return;let r=R(e);n.push({at:`edge`,index:t,...r===void 0?{}:{id:r},message:`Its edge ${r??String(t)} is not drawn: an edge has an id, a fromNode and a toNode.`})}),{canvas:{nodes:i,edges:a,top:t},problems:n,readable:!0}}var mt=e=>e.nodes.flatMap(e=>{let t=dt(e);return t?[t]:[]}),ht=e=>e.edges.flatMap(e=>{let t=ft(e);return t?[t]:[]});function gt(e){let t=e=>e.length===0?`[]`:`[\n${e.map(e=>`\t\t${JSON.stringify(e)}`).join(`,
|
|
2
|
+
`)}\n\t]`;return`{\n${[`\t"nodes":${t(e.nodes)}`,`\t"edges":${t(e.edges)}`,...Object.entries(e.top).filter(([e])=>e!==`nodes`&&e!==`edges`).map(([e,t])=>`\t${JSON.stringify(e)}:${JSON.stringify(t)}`)].join(`,
|
|
3
|
+
`)}\n}`}function _t(e,t=Math.random){let n=new Set([...e.nodes,...e.edges].flatMap(e=>R(e)??[]));for(;;){let e=``;for(let n=0;n<16;n++)e+=Math.floor(t()*16).toString(16);if(!n.has(e))return e}}var z=e=>Math.round(e);function B(e,t){let n=new Set(Object.entries(t).filter(([,e])=>e===void 0).map(([e])=>e)),r=Object.fromEntries(Object.entries(e).filter(([e])=>!n.has(e)));for(let[e,n]of Object.entries(t))n!==void 0&&(r[e]=n);return r}var vt=(e,t)=>JSON.stringify(e)===JSON.stringify(t);function yt(e,t,n){if(vt(t,e))return n;if(vt(n,e))return t;if(t===void 0||n===void 0)return t??n;if(e===void 0)return t;let r=[...new Set([...Object.keys(t),...Object.keys(e)])].filter(n=>!vt(t[n],e[n]));return B(n,Object.fromEntries(r.map(e=>[e,t[e]])))}function bt(e,t,n){let r=e=>{let t=new Map;for(let n of e){let e=R(n);e!==void 0&&!t.has(e)&&t.set(e,n)}return t},i=r(e),a=r(t),o=r(n),s=[],c=new Set;for(let e of n){let t=R(e);if(t===void 0){s.push(e);continue}if(c.has(t))continue;c.add(t);let n=yt(i.get(t),a.get(t),e);n&&s.push(n)}let l;for(let e of t){let t=R(e);if(t!==void 0){if(!c.has(t)){c.add(t);let n=yt(i.get(t),e,o.get(t));if(n){let e=l===void 0?-1:s.findIndex(e=>R(e)===l);s.splice(e+1,0,n)}}s.some(e=>R(e)===t)&&(l=t)}}return s}function xt(e,t,n){let r=yt(e.top,t.top,n.top)??{};return{nodes:bt(e.nodes,t.nodes,n.nodes),edges:bt(e.edges,t.edges,n.edges),top:r}}function V(e,t,n){let r=[...e];for(let e of n===`after`?t:[...t].reverse()){let t=n===`after`?e.after:e.before,i=r.findIndex(t=>R(t)===e.id);t===void 0?i>=0&&r.splice(i,1):i>=0?r[i]=t:r.splice(Math.min(e.index,r.length),0,t)}return r}function St(e,t,n){return{...e,nodes:V(e.nodes,t.nodes,n),edges:V(e.edges,t.edges,n)}}function Ct(e,t){let n=(e,t)=>{let n=[],r=new Map;e.forEach((e,t)=>{let n=R(e);n!==void 0&&r.set(n,{raw:e,index:t})});let i=new Set;t.forEach((e,t)=>{let a=R(e);if(a===void 0)return;i.add(a);let o=r.get(a);o?JSON.stringify(o.raw)!==JSON.stringify(e)&&n.push({id:a,before:o.raw,after:e,index:t}):n.push({id:a,after:e,index:t})});for(let[e,t]of r)i.has(e)||n.push({id:e,before:t.raw,index:t.index});return n};return{nodes:n(e.nodes,t.nodes),edges:n(e.edges,t.edges)}}var wt=e=>e.nodes.length===0&&e.edges.length===0;function Tt(e,t){let n=`"id":${JSON.stringify(t)}`,r=`"id": ${JSON.stringify(t)}`,i=e.split(`
|
|
4
|
+
`).findIndex(e=>e.includes(n)||e.includes(r));return i<0?void 0:i+1}function Et(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var Dt=/[ \t\n\f\r]/g;function Ot(e){return typeof e==`object`?e.type===`text`&&kt(e.value):kt(e)}function kt(e){return e.replace(Dt,``)===``}var At=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};At.prototype.normal={},At.prototype.property={},At.prototype.space=void 0;function jt(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new At(n,r,t)}function Mt(e){return e.toLowerCase()}var H=class{constructor(e,t){this.attribute=t,this.property=e}};H.prototype.attribute=``,H.prototype.booleanish=!1,H.prototype.boolean=!1,H.prototype.commaOrSpaceSeparated=!1,H.prototype.commaSeparated=!1,H.prototype.defined=!1,H.prototype.mustUseProperty=!1,H.prototype.number=!1,H.prototype.overloadedBoolean=!1,H.prototype.property=``,H.prototype.spaceSeparated=!1,H.prototype.space=void 0;var Nt=t({boolean:()=>U,booleanish:()=>W,commaOrSpaceSeparated:()=>q,commaSeparated:()=>It,number:()=>G,overloadedBoolean:()=>Ft,spaceSeparated:()=>K}),Pt=0,U=Lt(),W=Lt(),Ft=Lt(),G=Lt(),K=Lt(),It=Lt(),q=Lt();function Lt(){return 2**++Pt}var Rt=Object.keys(Nt),zt=class extends H{constructor(e,t,n,r){let i=-1;if(super(e,t),Bt(this,`space`,r),typeof n==`number`)for(;++i<Rt.length;){let e=Rt[i];Bt(this,Rt[i],(n&Nt[e])===Nt[e])}}};zt.prototype.defined=!0;function Bt(e,t,n){n&&(e[t]=n)}function Vt(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new zt(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Mt(r)]=r,n[Mt(a.attribute)]=r}return new At(t,n,e.space)}var Ht=Vt({properties:{ariaActiveDescendant:null,ariaAtomic:W,ariaAutoComplete:null,ariaBusy:W,ariaChecked:W,ariaColCount:G,ariaColIndex:G,ariaColSpan:G,ariaControls:K,ariaCurrent:null,ariaDescribedBy:K,ariaDetails:null,ariaDisabled:W,ariaDropEffect:K,ariaErrorMessage:null,ariaExpanded:W,ariaFlowTo:K,ariaGrabbed:W,ariaHasPopup:null,ariaHidden:W,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:K,ariaLevel:G,ariaLive:null,ariaModal:W,ariaMultiLine:W,ariaMultiSelectable:W,ariaOrientation:null,ariaOwns:K,ariaPlaceholder:null,ariaPosInSet:G,ariaPressed:W,ariaReadOnly:W,ariaRelevant:null,ariaRequired:W,ariaRoleDescription:K,ariaRowCount:G,ariaRowIndex:G,ariaRowSpan:G,ariaSelected:W,ariaSetSize:G,ariaSort:null,ariaValueMax:G,ariaValueMin:G,ariaValueNow:G,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function Ut(e,t){return t in e?e[t]:t}function Wt(e,t){return Ut(e,t.toLowerCase())}var Gt=Vt({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:It,acceptCharset:K,accessKey:K,action:null,allow:null,allowFullScreen:U,allowPaymentRequest:U,allowUserMedia:U,alpha:U,alt:null,as:null,async:U,autoCapitalize:null,autoComplete:K,autoFocus:U,autoPlay:U,blocking:K,capture:null,charSet:null,checked:U,cite:null,className:K,closedBy:null,colorSpace:null,cols:G,colSpan:G,command:null,commandFor:null,content:null,contentEditable:W,controls:U,controlsList:K,coords:G|It,crossOrigin:null,data:null,dateTime:null,decoding:null,default:U,defer:U,dir:null,dirName:null,disabled:U,download:Ft,draggable:W,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:U,formTarget:null,headers:K,height:G,hidden:Ft,high:G,href:null,hrefLang:null,htmlFor:K,httpEquiv:K,id:null,imageSizes:null,imageSrcSet:null,inert:U,inputMode:null,integrity:null,is:null,isMap:U,itemId:null,itemProp:K,itemRef:K,itemScope:U,itemType:K,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:U,low:G,manifest:null,max:null,maxLength:G,media:null,method:null,min:null,minLength:G,multiple:U,muted:U,name:null,nonce:null,noModule:U,noValidate:U,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:U,optimum:G,pattern:null,ping:K,placeholder:null,playsInline:U,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:U,referrerPolicy:null,rel:K,required:U,reversed:U,rows:G,rowSpan:G,sandbox:K,scope:null,scoped:U,seamless:U,selected:U,shadowRootClonable:U,shadowRootCustomElementRegistry:U,shadowRootDelegatesFocus:U,shadowRootMode:null,shadowRootSerializable:U,shape:null,size:G,sizes:null,slot:null,span:G,spellCheck:W,src:null,srcDoc:null,srcLang:null,srcSet:null,start:G,step:null,style:null,tabIndex:G,target:null,title:null,translate:null,type:null,typeMustMatch:U,useMap:null,value:W,width:G,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:K,axis:null,background:null,bgColor:null,border:G,borderColor:null,bottomMargin:G,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:U,declare:U,event:null,face:null,frame:null,frameBorder:null,hSpace:G,leftMargin:G,link:null,longDesc:null,lowSrc:null,marginHeight:G,marginWidth:G,noResize:U,noHref:U,noShade:U,noWrap:U,object:null,profile:null,prompt:null,rev:null,rightMargin:G,rules:null,scheme:null,scrolling:W,standby:null,summary:null,text:null,topMargin:G,valueType:null,version:null,vAlign:null,vLink:null,vSpace:G,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:U,disablePictureInPicture:U,disableRemotePlayback:U,exportParts:It,part:K,prefix:null,property:null,results:G,security:null,unselectable:null},space:`html`,transform:Wt}),Kt=Vt({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:q,accentHeight:G,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:G,amplitude:G,arabicForm:null,ascent:G,attributeName:null,attributeType:null,azimuth:G,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:G,by:null,calcMode:null,capHeight:G,className:K,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:G,diffuseConstant:G,direction:null,display:null,dur:null,divisor:G,dominantBaseline:null,download:U,dx:null,dy:null,edgeMode:null,editable:null,elevation:G,enableBackground:null,end:null,event:null,exponent:G,externalResourcesRequired:null,fill:null,fillOpacity:G,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:It,g2:It,glyphName:It,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:G,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:G,horizOriginX:G,horizOriginY:G,id:null,ideographic:G,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:G,k:G,k1:G,k2:G,k3:G,k4:G,kernelMatrix:q,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:G,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:G,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:G,overlineThickness:G,paintOrder:null,panose1:null,path:null,pathLength:G,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:K,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:G,pointsAtY:G,pointsAtZ:G,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:q,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:q,rev:q,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:q,requiredFeatures:q,requiredFonts:q,requiredFormats:q,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:G,specularExponent:G,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:G,strikethroughThickness:G,string:null,stroke:null,strokeDashArray:q,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:G,strokeOpacity:G,strokeWidth:null,style:null,surfaceScale:G,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:q,tabIndex:G,tableValues:null,target:null,targetX:G,targetY:G,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:q,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:G,underlineThickness:G,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:G,values:null,vAlphabetic:G,vMathematical:G,vectorEffect:null,vHanging:G,vIdeographic:G,version:null,vertAdvY:G,vertOriginX:G,vertOriginY:G,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:G,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:Ut}),qt=Vt({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),Jt=Vt({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:Wt}),Yt=Vt({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),Xt={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},Zt=/[A-Z]/g,Qt=/-[a-z]/g,$t=/^data[-\w.:]+$/i;function en(e,t){let n=Mt(t),r=t,i=H;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&$t.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Qt,nn);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Qt.test(e)){let n=e.replace(Zt,tn);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=zt}return new i(r,t)}function tn(e){return`-`+e.toLowerCase()}function nn(e){return e.charAt(1).toUpperCase()}var rn=jt([Ht,Gt,qt,Jt,Yt],`html`),an=jt([Ht,Kt,qt,Jt,Yt],`svg`);function on(e){return e.join(` `).trim()}var sn=n(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
|
|
5
|
+
`);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=ee();)t!==!1&&e.push(t);return e}function ee(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function y(){var e=p(),t=g(a);if(t){if(ee(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function b(){var e=[];v(e);for(var t;t=y();)t!==!1&&(e.push(t),v(e));return e}return _(),b()}function d(e){return e?e.replace(l,``):``}t.exports=u})),cn=n(((e,t,n)=>{var r=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var i=r(sn());function a(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=(0,i.default)(e),a=typeof t==`function`;return r.forEach(e=>{if(e.type!==`declaration`)return;let{property:r,value:i}=e;a?t(r,i,e):i&&(n||={},n[r]=i)}),n}})),ln=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),un=n(((e,t,n)=>{var r=(n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(cn()),i=ln();function a(e,t){var n={};return!e||typeof e!=`string`||(0,r.default)(e,function(e,r){e&&r&&(n[(0,i.camelCase)(e,t)]=r)}),n}a.default=a,t.exports=a})),dn=pn(`end`),fn=pn(`start`);function pn(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function mn(e){let t=fn(e),n=dn(e);if(t&&n)return{start:t,end:n}}var hn=e(un(),1),gn={}.hasOwnProperty,_n=new Map,vn=/[A-Z]/g,yn=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),bn=new Set([`td`,`th`]),xn=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function Sn(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=Nn(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=Mn(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?an:rn,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Cn(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Cn(e,t,n){if(t.type===`element`)return wn(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return Tn(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return Dn(e,t,n);if(t.type===`mdxjsEsm`)return En(e,t);if(t.type===`root`)return On(e,t,n);if(t.type===`text`)return kn(e,t)}function wn(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=an,e.schema=i),e.ancestors.push(t);let a=zn(e,t.tagName,!1),o=Pn(e,t),s=In(e,t);return yn.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!Ot(e)})),An(e,o,a,t),jn(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Tn(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Bn(e,t.position)}function En(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Bn(e,t.position)}function Dn(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=an,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:zn(e,t.name,!0),o=Fn(e,t),s=In(e,t);return An(e,o,a,t),jn(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function On(e,t,n){let r={};return jn(r,In(e,t)),e.create(t,e.Fragment,r,n)}function kn(e,t){return t.value}function An(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function jn(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function Mn(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function Nn(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=fn(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function Pn(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&gn.call(t.properties,i)){let a=Ln(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&bn.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function Fn(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Bn(e,t.position)}else{let i=r.name,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else Bn(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function In(e,t){let n=[],r=-1,i=e.passKeys?new Map:_n;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=Cn(e,a,o);s!==void 0&&n.push(s)}return n}function Ln(e,t,n){let r=en(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Et(n):on(n)),r.property===`style`){let t=typeof n==`object`?n:Rn(e,String(n));return e.stylePropertyNameCase===`css`&&(t=Vn(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?Xt[r.property]||r.property:r.attribute,n]}}function Rn(e,t){try{return(0,hn.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new w("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=xn+`#cannot-parse-style-attribute`,r}}function zn(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=_e(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=_e(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return gn.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Bn(e)}function Bn(e,t){let n=new w("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=xn+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function Vn(e){let t={},n;for(n in e)gn.call(e,n)&&(t[Hn(n)]=e[n]);return t}function Hn(e){let t=e.replace(vn,Un);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function Un(e){return`-`+e.toLowerCase()}var Wn={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]};function Gn(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&Ge(e.charCodeAt(n+1))&&Ge(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function Kn(e){let t=this;t.parser=n;function n(n){return ze(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function qn(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Jn(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
6
|
+
`}]}function Yn(e,t){let n=t.value?t.value+`
|
|
7
|
+
`:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function Xn(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Zn(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Qn(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=Gn(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function $n(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function er(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function tr(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function nr(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return tr(e,t);let i={src:Gn(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function rr(e,t){let n={src:Gn(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function ir(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function ar(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return tr(e,t);let i={href:Gn(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function or(e,t){let n={href:Gn(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function sr(e,t,n){let r=e.all(t),i=n?cr(n):lr(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
8
|
+
`}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
9
|
+
`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function cr(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=lr(n[r])}return t}function lr(e){return e.spread??e.children.length>1}function ur(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function dr(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function fr(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function pr(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function mr(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=fn(t.children[1]),o=dn(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function hr(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function gr(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var _r=9,vr=32;function yr(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(br(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(br(t.slice(i),i>0,!1)),a.join(``)}function br(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===_r||t===vr;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===_r||t===vr;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function xr(e,t){let n={type:`text`,value:yr(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Sr(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var Cr={blockquote:qn,break:Jn,code:Yn,delete:Xn,emphasis:Zn,footnoteReference:Qn,heading:$n,html:er,imageReference:nr,image:rr,inlineCode:ir,linkReference:ar,link:or,listItem:sr,list:ur,paragraph:dr,root:fr,strong:pr,table:mr,tableCell:gr,tableRow:hr,text:xr,thematicBreak:Sr,toml:wr,yaml:wr,definition:wr,footnoteDefinition:wr};function wr(){}var{defineProperty:Tr}=Object,Er=typeof self==`object`?self:globalThis,Dr=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new Er[e](t)},Or=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o){let i=r(t),a=r(n);i===`__proto__`?Tr(e,i,{value:a,configurable:!0,enumerable:!0,writable:!0}):e[i]=a}return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(typeof Er[e]==`function`?Dr(e,t):Error(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}case`-0`:return-0}return n(Dr(a,o),i)};return r},kr=e=>Or(new Map,e)(0),Ar=``,{toString:jr}={},{keys:Mr,is:Nr}=Object,Pr=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=jr.call(e).slice(8,-1);switch(n){case`Array`:return[1,Ar];case`Object`:return[2,Ar];case`Date`:return[3,Ar];case`RegExp`:return[4,Ar];case`Map`:return[5,Ar];case`Set`:return[6,Ar];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:e instanceof Error?[7,e.name||`Error`]:[2,n]},Fr=([e,t])=>e===0&&(t===`function`||t===`symbol`),Ir=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=o=>{if(n.has(o))return n.get(o);let[s,c]=Pr(o);switch(s){case 0:{let t=o;switch(c){case`bigint`:s=8,t=o.toString();break;case`number`:if(!o&&Nr(o,-0))return r.push([`-0`])-1;break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+c);t=null;break;case`undefined`:return i([-1],o)}return i([s,t],o)}case 1:{if(c){let e=o;return c===`DataView`?e=new Uint8Array(o.buffer):c===`ArrayBuffer`&&(e=new Uint8Array(o)),i([c,[...e]],o)}let e=[],t=i([s,e],o);for(let t of o)e.push(a(t));return t}case 2:{if(c)switch(c){case`BigInt`:return i([c,o.toString()],o);case`Boolean`:case`Number`:case`String`:return i([c,o.valueOf()],o)}if(t&&`toJSON`in o)return a(o.toJSON());let n=[],r=i([s,n],o);for(let t of Mr(o))(e||!Fr(Pr(o[t])))&&n.push([a(t),a(o[t])]);return r}case 3:return i([s,isNaN(o.getTime())?Ar:o.toISOString()],o);case 4:{let{source:e,flags:t}=o;return i([s,{source:e,flags:t}],o)}case 5:{let t=[],n=i([s,t],o);for(let[n,r]of o)(e||!(Fr(Pr(n))||Fr(Pr(r))))&&t.push([a(n),a(r)]);return n}case 6:{let t=[],n=i([s,t],o);for(let n of o)(e||!Fr(Pr(n)))&&t.push(a(n));return n}}let{message:l}=o;return i([s,{name:c,message:l}],o)};return a},Lr=(e,{json:t,lossy:n}={})=>{let r=[];return Ir(!(t||n),!!t,new Map,r)(e),r},Rr=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?kr(Lr(e,t)):structuredClone(e):(e,t)=>kr(Lr(e,t));function zr(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function Br(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function Vr(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||zr,r=e.options.footnoteBackLabel||Br,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=Gn(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...Rr(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
|
|
10
|
+
`},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
|
|
11
|
+
`}]}}var Hr={}.hasOwnProperty,Ur={};function Wr(e,t){let n=t||Ur,r=new Map,i=new Map,a={all:s,applyData:Kr,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...Cr,...n.handlers},one:o,options:n,patch:Gr,wrap:Jr};return Ze(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(Hr.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=Rr(n);return r.children=a.all(e),r}return Rr(e)}return(a.options.unknownHandler||qr)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=Yr(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=Yr(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function Gr(e,t){e.position&&(t.position=mn(e))}function Kr(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,Rr(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function qr(e,t){let n=t.data||{},r=`value`in t&&!(Hr.call(n,`hProperties`)||Hr.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Jr(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
|
|
12
|
+
`});++r<e.length;)r&&n.push({type:`text`,value:`
|
|
13
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
|
|
14
|
+
`}),n}function Yr(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Xr(e,t){let n=Wr(e,t),r=n.one(e,void 0),i=Vr(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
|
|
15
|
+
`},i)),a}function Zr(e,t){return e&&`run`in e?async function(n,r){let i=Xr(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Xr(n,{file:r,...e||t})}}function Qr(e){if(e)throw e}var $r=n(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function ei(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function ti(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a)r(a);else{for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?ni(s,i)(...o):r(null,...o)}}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function ni(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var J={basename:ri,dirname:ii,extname:ai,join:oi,sep:`/`};function ri(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);li(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function ii(e){if(li(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function ai(e){li(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}}else n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function oi(...e){let t=-1,n;for(;++t<e.length;)li(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:si(n)}function si(e){li(e);let t=e.codePointAt(0)===47,n=ci(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function ci(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(i!==o-1&&a!==1){if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1}i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function li(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var ui={cwd:di};function di(){return`/`}function fi(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function pi(e){if(typeof e==`string`)e=new URL(e);else if(!fi(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return mi(e)}function mi(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var hi=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],gi=class{constructor(e){let t;t=e?fi(e)?{path:e}:typeof e==`string`||bi(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:ui.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<hi.length;){let e=hi[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)hi.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?J.basename(this.path):void 0}set basename(e){vi(e,`basename`),_i(e,`basename`),this.path=J.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?J.dirname(this.path):void 0}set dirname(e){yi(this.basename,`dirname`),this.path=J.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?J.extname(this.path):void 0}set extname(e){if(_i(e,`extname`),yi(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=J.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){fi(e)&&(e=pi(e)),vi(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?J.basename(this.path,this.extname):void 0}set stem(e){vi(e,`stem`),_i(e,`stem`),this.path=J.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new w(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function _i(e,t){if(e&&e.includes(J.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+J.sep+"`")}function vi(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function yi(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function bi(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var xi=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),Si=e($r(),1),Ci={}.hasOwnProperty,wi=new class e extends xi{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=ti()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,Si.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(Di(`data`,this.frozen),this.namespace[e]=t,this):Ci.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Di(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=Ai(e),n=this.parser||this.Parser;return Ti(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),Ti(`process`,this.parser||this.Parser),Ei(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=Ai(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);Mi(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),Ti(`processSync`,this.parser||this.Parser),Ei(`processSync`,this.compiler||this.Compiler),this.process(e,r),ki(`processSync`,`process`,t),n;function r(e,r){t=!0,Qr(e),n=r}}run(e,t,n){Oi(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=Ai(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),ki(`runSync`,`run`,n),r;function i(e,t){Qr(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=Ai(t),r=this.compiler||this.Compiler;return Ei(`stringify`,r),Oi(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(Di(`use`,this.frozen),e!=null){if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`")}return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`){if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e)}else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,Si.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null){if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];ei(o)&&ei(r)&&(r=(0,Si.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function Ti(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function Ei(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function Di(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Oi(e){if(!ei(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function ki(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ai(e){return ji(e)?e:new gi(e)}function ji(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function Mi(e){return typeof e==`string`||Ni(e)}function Ni(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Y=g(),X=e(i(),1),Pi=[],Fi={allowDangerousHtml:!0},Ii=/^(https?|ircs?|mailto|xmpp)$/i,Li=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function Ri(e){let t=zi(e),n=Bi(e);return Vi(t.runSync(t.parse(n),n),e)}function zi(e){let t=e.rehypePlugins||Pi,n=e.remarkPlugins||Pi,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Fi}:Fi;return wi().use(Kn).use(n).use(Zr,r).use(t)}function Bi(e){let t=e.children||``,n=new gi;return typeof t==`string`?n.value=t:``+t,n}function Vi(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||Hi;for(let e of Li)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return Ze(e,l),Sn(e,{Fragment:Y.Fragment,components:i,ignoreInvalidStyle:!0,jsx:Y.jsx,jsxs:Y.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in Wn)if(Object.hasOwn(Wn,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=Wn[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function Hi(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||Ii.test(e.slice(0,t))?e:``}function Ui(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function Wi(e,t,n){let r=Qe((n||{}).ignore||[]),i=Gi(t),a=-1;for(;++a<i.length;)N(e,o);function o(e,t,n){if(e.type===`text`&&typeof n==`number`)return s(e,t,n);if(r(e,n,t[t.length-1]))return $e}function s(e,t,n){let r=t[t.length-1],o=i[a][0],s=i[a][1],c=0,l=!1,u=[];o.lastIndex=0;let d=o.exec(e.value);for(;d;){let n=d.index,r={index:d.index,input:d.input,stack:[...t,e]},i=s(...d,r);if(typeof i==`string`&&(i=i.length>0?{type:`text`,value:i}:void 0),i===!1)o.lastIndex=n+1;else{if(c!==n&&f({type:`text`,value:e.value.slice(c,n)}),Array.isArray(i))for(let e of i)f(e);else i&&f(i);c=n+d[0].length,l=!0}if(!o.global)break;d=o.exec(e.value)}return l?(c<e.value.length&&f({type:`text`,value:e.value.slice(c)}),r.children.splice(n,1,...u)):u=[e],n+u.length;function f(e){let t=u[u.length-1];t&&t.type===`text`&&e.type===`text`?t.value+=e.value:u.push(e)}}}function Gi(e){if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let t=[],n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([Ki(e[0]),qi(e[1])])}return t}function Ki(e){return typeof e==`string`?new RegExp(Be(e),`g`):e}function qi(e){return typeof e==`function`?e:function(){return e}}var Ji=`phrasing`,Yi=[`autolink`,`link`,`image`,`label`];function Xi(){return{transforms:[ia],enter:{literalAutolink:Qi,literalAutolinkEmail:$i,literalAutolinkHttp:$i,literalAutolinkWww:$i},exit:{literalAutolink:ra,literalAutolinkEmail:na,literalAutolinkHttp:ea,literalAutolinkWww:ta}}}function Zi(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:Ji,notInConstruct:Yi},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:Ji,notInConstruct:Yi},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:Ji,notInConstruct:Yi}]}}function Qi(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function $i(e){this.config.enter.autolinkProtocol.call(this,e)}function ea(e){this.config.exit.autolinkProtocol.call(this,e)}function ta(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function na(e){this.config.exit.autolinkEmail.call(this,e)}function ra(e){this.exit(e)}function ia(e){Wi(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,aa],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,oa]],{ignore:[`link`,`linkReference`]})}function aa(e,t,n,r,i){let a=``;if(!la(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!sa(n)))return!1;let o=ca(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function oa(e,t,n,r){return!la(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function sa(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function ca(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=Ui(e,`(`),a=Ui(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function la(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||M(n)||Le(n))&&(!t||n!==47)}function ua(){return[Xi(),Ue(),Je(),We(),ge()]}function da(e){return{extensions:[Zi(),He(e),Ke(),Ve(e),ve()]}}var fa={tokenize:wa,partial:!0},pa={tokenize:Ta,partial:!0},ma={tokenize:Ea,partial:!0},ha={tokenize:Da,partial:!0},ga={tokenize:Oa,partial:!0},_a={name:`wwwAutolink`,tokenize:Sa,previous:ka},va={name:`protocolAutolink`,tokenize:Ca,previous:Aa},Z={name:`emailAutolink`,tokenize:xa,previous:ja},Q={};function ya(){return{text:Q}}for(var ba=48;ba<123;)Q[ba]=Z,ba++,ba===58?ba=65:ba===91&&(ba=97);Q[43]=Z,Q[45]=Z,Q[46]=Z,Q[95]=Z,Q[72]=[Z,va],Q[104]=[Z,va],Q[87]=[Z,_a],Q[119]=[Z,_a];function xa(e,t,n){let r=this,i,a;return o;function o(t){return!Ma(t)||!ja.call(r,r.previous)||Na(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return Ma(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(ga,u,l)(t):t===45||t===95||Ge(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&A(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function Sa(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!ka.call(r,r.previous)||Na(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(fa,e.attempt(pa,e.attempt(ma,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function Ca(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&Aa.call(r,r.previous)&&!Na(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(A(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||Re(t)||j(t)||M(t)||Le(t)?n(t):e.attempt(pa,e.attempt(ma,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function wa(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function Ta(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(ha,c,s)(t):t===null||j(t)||M(t)||t!==45&&Le(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function Ea(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(ha,t,a)(o):o===null||j(o)||M(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function Da(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||j(o)||M(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||j(e)||M(e)?t(e):r(e)}function a(e){return A(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):A(t)?(e.consume(t),o):n(t)}}function Oa(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return Ge(e)?n(e):t(e)}}function ka(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||j(e)}function Aa(e){return!A(e)}function ja(e){return!(e===47||Ma(e))}function Ma(e){return e===43||e===45||e===46||e===95||Ge(e)}function Na(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}function Pa(e){return et([ya(),Ye(),qe(e),Xe(),ye()])}var Fa={};function Ia(e){let t=this,n=e||Fa,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(Pa(n)),a.push(ua()),o.push(da(n))}function La(){let e=c(),[t,n]=(0,X.useState)();return(0,X.useEffect)(()=>{let t=!0,r,i=()=>{E(e,`project/items`,{}).then(e=>{t&&n({items:e.items,revision:e.revision})},()=>void 0)};i();let a=e.on(`project/changed`,()=>{clearTimeout(r),r=setTimeout(i,300)});return()=>{t=!1,clearTimeout(r),a()}},[e]),t}function Ra(e,t){let n=t.replace(/^\.\//u,``).replace(/\/+$/u,``),r=e?.items.find(e=>e.kind!==void 0&&e.entry===n);if(r)return{type:`item`,item:r};let i=nt(n);return/^(image|video|audio)\//u.test(i)?{type:`media`,path:n,mime:i}:{type:`file`,path:n}}var za=new Map;function Ba(e,t,n){let[r,i]=(0,X.useState)(),a=`${t??``}@${String(n??-1)}`;if((0,X.useEffect)(()=>{if(t===void 0||n===void 0)return;let r=!0,o=za.get(a);return o||(o=E(e,`items/preview`,{item:t}).then(e=>e.preview,()=>void 0),za.set(a,o)),o.then(e=>{r&&i({key:a,preview:e})}),()=>{r=!1}},[e,t,n,a]),r!==void 0)return r.preview??`none`}var Va=new Map;function Ha(e,t){let[n,r]=(0,X.useState)();return(0,X.useEffect)(()=>{if(t===void 0)return;let n=!0,i=Va.get(t);return i||(i=e[`files/url`]({path:t}).then(e=>e.url,()=>void 0),Va.set(t,i)),i.then(e=>{n&&r(e)}),()=>{n=!1}},[e,t]),n}var Ua=new Map;function Wa(e,t){let[n,r]=(0,X.useState)();return(0,X.useEffect)(()=>{if(t===void 0||t===``)return;let n=!0,i=t.lastIndexOf(`/`),a=i<0?``:t.slice(0,i),o=Ua.get(a);return o||(o=e[`files/list`]({dir:a}).then(e=>new Set([...e.files.map(e=>e.path),...e.dirs]),()=>void 0),Ua.set(a,o),setTimeout(()=>Ua.delete(a),2e3)),o.then(e=>{n&&r(e===void 0?void 0:e.has(t))}),()=>{n=!1}},[e,t]),n}var Ga=p({en:{loading:`Opening the canvas…`,empty:`Double-click to add a note, or drop a file here.`,undo:`Undo`,redo:`Redo`,zoom:`Zoom`,zoomIn:`Zoom in`,zoomOut:`Zoom out`,zoomFit:`Zoom to fit`,zoomActual:`Zoom to 100%`,zoomSelection:`Zoom to selection`,history:`History`,adding:`Add to the canvas`,selected:`Selection`,note:`Note`,noteHint:`Add a note in Markdown`,file:`File`,fileHint:`Add an item or a file of the project`,link:`Link`,linkHint:`Add a link to a page`,linkPlaceholder:`https://`,linkAdd:`Add`,group:`Group`,groupHint:`Put the selection in a group`,color:`Colour`,noColor:`No colour`,colors:{1:`Red`,2:`Orange`,3:`Yellow`,4:`Green`,5:`Cyan`,6:`Purple`},find:`Find an item or a file`,items:`Items`,media:`Media`,nothingFound:`Nothing matches`,open:`Open`,openHint:`Open it in its own editor`,openLinkHint:`Open the page in the browser`,delete:`Delete`,label:`Label`,missing:e=>`${e} is not in the project`,unknownType:e=>`A “${e}” node, kept as it is`,edits:{add:`Add`,move:`Move`,resize:`Resize`,type:`Typing`,delete:`Delete`,color:`Colour`,group:`Group`,connect:`Connect`,label:`Label`}},"zh-cn":{loading:`正在打开画布…`,empty:`双击添加便签,或把文件拖到这里。`,undo:`撤销`,redo:`重做`,zoom:`缩放`,zoomIn:`放大`,zoomOut:`缩小`,zoomFit:`缩放到合适大小`,zoomActual:`缩放到 100%`,zoomSelection:`缩放到所选内容`,history:`历史记录`,adding:`添加到画布`,selected:`所选内容`,note:`便签`,noteHint:`添加 Markdown 便签`,file:`文件`,fileHint:`添加项目中的作品或文件`,link:`链接`,linkHint:`添加网页链接`,linkPlaceholder:`https://`,linkAdd:`添加`,group:`分组`,groupHint:`把所选内容放进一个分组`,color:`颜色`,noColor:`无颜色`,colors:{1:`红色`,2:`橙色`,3:`黄色`,4:`绿色`,5:`青色`,6:`紫色`},find:`查找作品或文件`,items:`作品`,media:`媒体`,nothingFound:`没有匹配的内容`,open:`打开`,openHint:`在它自己的编辑器中打开`,openLinkHint:`在浏览器中打开网页`,delete:`删除`,label:`标签`,missing:e=>`${e} 不在项目中`,unknownType:e=>`“${e}”节点,按原样保留`,edits:{add:`添加`,move:`移动`,resize:`调整大小`,type:`输入`,delete:`删除`,color:`颜色`,group:`分组`,connect:`连接`,label:`标签`}},"zh-tw":{loading:`正在開啟畫布…`,empty:`按兩下新增便條,或把檔案拖到這裡。`,undo:`復原`,redo:`重做`,zoom:`縮放`,zoomIn:`放大`,zoomOut:`縮小`,zoomFit:`縮放至適當大小`,zoomActual:`縮放至 100%`,zoomSelection:`縮放至所選內容`,history:`記錄`,adding:`加入畫布`,selected:`所選內容`,note:`便條`,noteHint:`新增 Markdown 便條`,file:`檔案`,fileHint:`新增專案中的作品或檔案`,link:`連結`,linkHint:`新增網頁連結`,linkPlaceholder:`https://`,linkAdd:`新增`,group:`群組`,groupHint:`把所選內容放進一個群組`,color:`顏色`,noColor:`無顏色`,colors:{1:`紅色`,2:`橙色`,3:`黃色`,4:`綠色`,5:`青色`,6:`紫色`},find:`尋找作品或檔案`,items:`作品`,media:`媒體`,nothingFound:`沒有相符的內容`,open:`開啟`,openHint:`在它自己的編輯器中開啟`,openLinkHint:`在瀏覽器中開啟網頁`,delete:`刪除`,label:`標籤`,missing:e=>`${e} 不在專案中`,unknownType:e=>`「${e}」節點,依原樣保留`,edits:{add:`新增`,move:`移動`,resize:`調整大小`,type:`輸入`,delete:`刪除`,color:`顏色`,group:`群組`,connect:`連接`,label:`標籤`}},ja:{loading:`キャンバスを開いています…`,empty:`ダブルクリックでメモを追加するか、ここにファイルをドロップします。`,undo:`取り消す`,redo:`やり直す`,zoom:`ズーム`,zoomIn:`拡大`,zoomOut:`縮小`,zoomFit:`全体を表示`,zoomActual:`100% で表示`,zoomSelection:`選択範囲にズーム`,history:`履歴`,adding:`キャンバスに追加`,selected:`選択範囲`,note:`メモ`,noteHint:`Markdown のメモを追加`,file:`ファイル`,fileHint:`プロジェクトの作品やファイルを追加`,link:`リンク`,linkHint:`ページへのリンクを追加`,linkPlaceholder:`https://`,linkAdd:`追加`,group:`グループ`,groupHint:`選択したものをグループにまとめる`,color:`色`,noColor:`色なし`,colors:{1:`赤`,2:`オレンジ`,3:`黄`,4:`緑`,5:`シアン`,6:`紫`},find:`作品やファイルを検索`,items:`作品`,media:`メディア`,nothingFound:`一致するものはありません`,open:`開く`,openHint:`専用のエディタで開く`,openLinkHint:`ページをブラウザで開く`,delete:`削除`,label:`ラベル`,missing:e=>`${e} はプロジェクトにありません`,unknownType:e=>`「${e}」ノード(そのまま保持)`,edits:{add:`追加`,move:`移動`,resize:`サイズ変更`,type:`入力`,delete:`削除`,color:`色`,group:`グループ`,connect:`接続`,label:`ラベル`}},ko:{loading:`캔버스를 여는 중…`,empty:`두 번 클릭해 메모를 추가하거나 여기에 파일을 놓으세요.`,undo:`실행 취소`,redo:`다시 실행`,zoom:`확대/축소`,zoomIn:`확대`,zoomOut:`축소`,zoomFit:`화면에 맞추기`,zoomActual:`100%로 확대/축소`,zoomSelection:`선택 항목으로 확대/축소`,history:`기록`,adding:`캔버스에 추가`,selected:`선택 항목`,note:`메모`,noteHint:`Markdown 메모 추가`,file:`파일`,fileHint:`프로젝트의 작업물이나 파일 추가`,link:`링크`,linkHint:`페이지 링크 추가`,linkPlaceholder:`https://`,linkAdd:`추가`,group:`그룹`,groupHint:`선택한 항목을 그룹으로 묶기`,color:`색상`,noColor:`색상 없음`,colors:{1:`빨강`,2:`주황`,3:`노랑`,4:`초록`,5:`청록`,6:`보라`},find:`작업물이나 파일 찾기`,items:`작업물`,media:`미디어`,nothingFound:`일치하는 항목이 없습니다`,open:`열기`,openHint:`전용 편집기에서 열기`,openLinkHint:`브라우저에서 페이지 열기`,delete:`삭제`,label:`레이블`,missing:e=>`${e}이(가) 프로젝트에 없습니다`,unknownType:e=>`“${e}” 노드, 그대로 유지됨`,edits:{add:`추가`,move:`이동`,resize:`크기 조정`,type:`입력`,delete:`삭제`,color:`색상`,group:`그룹`,connect:`연결`,label:`레이블`}},es:{loading:`Abriendo el lienzo…`,empty:`Haz doble clic para añadir una nota, o suelta aquí un archivo.`,undo:`Deshacer`,redo:`Rehacer`,zoom:`Zoom`,zoomIn:`Acercar`,zoomOut:`Alejar`,zoomFit:`Ajustar a la vista`,zoomActual:`Zoom al 100 %`,zoomSelection:`Zoom a la selección`,history:`Historial`,adding:`Añadir al lienzo`,selected:`Selección`,note:`Nota`,noteHint:`Añadir una nota en Markdown`,file:`Archivo`,fileHint:`Añadir un elemento o un archivo del proyecto`,link:`Enlace`,linkHint:`Añadir un enlace a una página`,linkPlaceholder:`https://`,linkAdd:`Añadir`,group:`Agrupar`,groupHint:`Poner la selección en un grupo`,color:`Color`,noColor:`Sin color`,colors:{1:`Rojo`,2:`Naranja`,3:`Amarillo`,4:`Verde`,5:`Cian`,6:`Morado`},find:`Buscar un elemento o un archivo`,items:`Elementos`,media:`Multimedia`,nothingFound:`No hay coincidencias`,open:`Abrir`,openHint:`Abrirlo en su propio editor`,openLinkHint:`Abrir la página en el navegador`,delete:`Eliminar`,label:`Etiqueta`,missing:e=>`${e} no está en el proyecto`,unknownType:e=>`Un nodo «${e}», conservado tal cual`,edits:{add:`Añadir`,move:`Mover`,resize:`Cambiar tamaño`,type:`Escritura`,delete:`Eliminar`,color:`Color`,group:`Agrupar`,connect:`Conectar`,label:`Etiqueta`}},fr:{loading:`Ouverture du canevas…`,empty:`Double-cliquez pour ajouter une note, ou déposez un fichier ici.`,undo:`Annuler`,redo:`Rétablir`,zoom:`Zoom`,zoomIn:`Zoom avant`,zoomOut:`Zoom arrière`,zoomFit:`Ajuster à la fenêtre`,zoomActual:`Zoom à 100 %`,zoomSelection:`Zoom sur la sélection`,history:`Historique`,adding:`Ajouter au canevas`,selected:`Sélection`,note:`Note`,noteHint:`Ajouter une note en Markdown`,file:`Fichier`,fileHint:`Ajouter un élément ou un fichier du projet`,link:`Lien`,linkHint:`Ajouter un lien vers une page`,linkPlaceholder:`https://`,linkAdd:`Ajouter`,group:`Grouper`,groupHint:`Mettre la sélection dans un groupe`,color:`Couleur`,noColor:`Sans couleur`,colors:{1:`Rouge`,2:`Orange`,3:`Jaune`,4:`Vert`,5:`Cyan`,6:`Violet`},find:`Chercher un élément ou un fichier`,items:`Éléments`,media:`Médias`,nothingFound:`Aucun résultat`,open:`Ouvrir`,openHint:`L’ouvrir dans son propre éditeur`,openLinkHint:`Ouvrir la page dans le navigateur`,delete:`Supprimer`,label:`Libellé`,missing:e=>`${e} n’est pas dans le projet`,unknownType:e=>`Un nœud « ${e} », conservé tel quel`,edits:{add:`Ajout`,move:`Déplacement`,resize:`Redimensionnement`,type:`Saisie`,delete:`Suppression`,color:`Couleur`,group:`Groupe`,connect:`Liaison`,label:`Libellé`}},de:{loading:`Canvas wird geöffnet …`,empty:`Doppelklicken, um eine Notiz hinzuzufügen, oder eine Datei hier ablegen.`,undo:`Widerrufen`,redo:`Wiederholen`,zoom:`Zoom`,zoomIn:`Vergrößern`,zoomOut:`Verkleinern`,zoomFit:`Alles zeigen`,zoomActual:`Auf 100 % zoomen`,zoomSelection:`Auf Auswahl zoomen`,history:`Verlauf`,adding:`Zum Canvas hinzufügen`,selected:`Auswahl`,note:`Notiz`,noteHint:`Eine Notiz in Markdown hinzufügen`,file:`Datei`,fileHint:`Ein Werk oder eine Datei des Projekts hinzufügen`,link:`Link`,linkHint:`Einen Link zu einer Seite hinzufügen`,linkPlaceholder:`https://`,linkAdd:`Hinzufügen`,group:`Gruppieren`,groupHint:`Die Auswahl in eine Gruppe legen`,color:`Farbe`,noColor:`Keine Farbe`,colors:{1:`Rot`,2:`Orange`,3:`Gelb`,4:`Grün`,5:`Cyan`,6:`Lila`},find:`Ein Werk oder eine Datei suchen`,items:`Werke`,media:`Medien`,nothingFound:`Keine Treffer`,open:`Öffnen`,openHint:`Im eigenen Editor öffnen`,openLinkHint:`Seite im Browser öffnen`,delete:`Löschen`,label:`Beschriftung`,missing:e=>`${e} ist nicht im Projekt`,unknownType:e=>`Ein „${e}“-Knoten, unverändert behalten`,edits:{add:`Hinzufügen`,move:`Verschieben`,resize:`Größe ändern`,type:`Eingabe`,delete:`Löschen`,color:`Farbe`,group:`Gruppieren`,connect:`Verbinden`,label:`Beschriftung`}},pt:{loading:`Abrindo a tela…`,empty:`Clique duas vezes para adicionar uma nota, ou solte um arquivo aqui.`,undo:`Desfazer`,redo:`Refazer`,zoom:`Zoom`,zoomIn:`Ampliar`,zoomOut:`Reduzir`,zoomFit:`Ajustar à tela`,zoomActual:`Zoom em 100%`,zoomSelection:`Zoom na seleção`,history:`Histórico`,adding:`Adicionar à tela`,selected:`Seleção`,note:`Nota`,noteHint:`Adicionar uma nota em Markdown`,file:`Arquivo`,fileHint:`Adicionar um item ou um arquivo do projeto`,link:`Link`,linkHint:`Adicionar um link para uma página`,linkPlaceholder:`https://`,linkAdd:`Adicionar`,group:`Agrupar`,groupHint:`Colocar a seleção em um grupo`,color:`Cor`,noColor:`Sem cor`,colors:{1:`Vermelho`,2:`Laranja`,3:`Amarelo`,4:`Verde`,5:`Ciano`,6:`Roxo`},find:`Procurar um item ou um arquivo`,items:`Itens`,media:`Mídia`,nothingFound:`Nada corresponde`,open:`Abrir`,openHint:`Abrir no seu próprio editor`,openLinkHint:`Abrir a página no navegador`,delete:`Excluir`,label:`Rótulo`,missing:e=>`${e} não está no projeto`,unknownType:e=>`Um nó “${e}”, mantido como está`,edits:{add:`Adicionar`,move:`Mover`,resize:`Redimensionar`,type:`Digitação`,delete:`Excluir`,color:`Cor`,group:`Agrupar`,connect:`Conectar`,label:`Rótulo`}}});function Ka(){return Ga.of(a()?.locale)}var qa={1:`#cf5f5a`,2:`#d98a45`,3:`#c9a63a`,4:`#579f67`,5:`#459fb2`,6:`#8f78bd`},Ja=e=>e===void 0?void 0:qa[e]??(/^#[0-9a-f]{3,8}$/iu.test(e)?e:void 0);function Ya({target:e,className:t}){return e.type===`item`?(0,Y.jsx)(De,{name:e.item.kindInfo?.icon,className:t}):e.type===`media`?e.mime.startsWith(`audio/`)?(0,Y.jsx)(pe,{className:t,"aria-hidden":!0}):(0,Y.jsx)(Ee,{className:t,"aria-hidden":!0}):(0,Y.jsx)(O,{className:t,"aria-hidden":!0})}var Xa=e=>e.slice(e.lastIndexOf(`/`)+1);function Za(e){return e.type===`item`?e.item.title??Xa(e.item.id):Xa(e.path)}function Qa({text:e}){return(0,Y.jsx)(`div`,{className:`text-ink size-full overflow-hidden px-4 py-3 text-base leading-relaxed [&_a]:text-pencil-text [&_a]:underline [&_blockquote]:border-l-2 [&_blockquote]:pl-3 [&_code]:font-mono [&_code]:text-sm [&_h1]:mb-2 [&_h1]:text-2xl [&_h1]:font-semibold [&_h2]:mb-2 [&_h2]:text-xl [&_h2]:font-semibold [&_h3]:mb-1 [&_h3]:font-semibold [&_li]:mb-0.5 [&_ol]:mb-2 [&_ol]:list-decimal [&_ol]:pl-5 [&_p]:mb-2 [&_strong]:font-semibold [&_ul]:mb-2 [&_ul]:list-disc [&_ul]:pl-5`,"data-testid":`canvas-text`,children:(0,Y.jsx)(Ri,{remarkPlugins:[Ia],children:e})})}function $a({preview:e}){switch(e.type){case`picture`:return(0,Y.jsx)(`img`,{src:`data:${e.image.mime};base64,${e.image.data}`,alt:``,draggable:!1,className:`pointer-events-none size-full object-contain select-none`,"data-testid":`canvas-preview-picture`});case`text`:return(0,Y.jsx)(`div`,{className:`text-ink size-full overflow-hidden px-5 py-4 text-base leading-relaxed`,"data-testid":`canvas-preview-text`,children:e.lines.map((e,t)=>(0,Y.jsx)(`p`,{className:t===0?`mb-2 font-semibold`:`mb-1`,children:e},t))});case`table`:return(0,Y.jsx)(`div`,{className:`size-full overflow-hidden p-2 text-xs`,"data-testid":`canvas-preview-table`,children:(0,Y.jsxs)(`table`,{className:`w-full border-collapse`,children:[(0,Y.jsx)(`thead`,{children:(0,Y.jsx)(`tr`,{children:e.columns.map((e,t)=>(0,Y.jsx)(`th`,{className:`border-rule truncate border px-1 text-left font-semibold`,children:e},t))})}),(0,Y.jsx)(`tbody`,{children:e.rows.map((e,t)=>(0,Y.jsx)(`tr`,{children:e.map((e,t)=>(0,Y.jsx)(`td`,{className:`border-rule truncate border px-1`,children:e},t))},t))})]})})}}function eo({icon:e,words:t,className:n}){return(0,Y.jsxs)(`div`,{className:u(`text-lead flex size-full flex-col items-center justify-center gap-2 p-3 text-center text-xs [&_svg]:size-6`,n),children:[e,(0,Y.jsx)(`span`,{className:`max-w-full truncate`,children:t})]})}function to({target:e,project:t}){let n=Ba(c(),e.item.id,t?.revision);return n===void 0||n===`none`?(0,Y.jsx)(eo,{icon:(0,Y.jsx)(Ya,{target:e}),words:e.item.id}):(0,Y.jsxs)(`div`,{className:`relative size-full`,children:[(0,Y.jsx)($a,{preview:n}),n.type===`picture`&&n.duration!==void 0?(0,Y.jsx)(`span`,{className:`bg-ink/70 text-paper absolute right-2 bottom-2 rounded-xs px-1 text-xs tabular-nums`,children:`${String(Math.floor(n.duration/60))}:${String(Math.round(n.duration%60)).padStart(2,`0`)}`}):null]})}function no({target:e,active:t}){let n=Ha(c(),e.path),r=s(e.mime),i=(0,Y.jsx)(eo,{icon:(0,Y.jsx)(Ya,{target:e}),words:e.path});return!r||n===void 0?i:(0,Y.jsx)(X.Suspense,{fallback:i,children:(0,Y.jsx)(r,{url:n,path:e.path,type:e.mime,active:t})})}function ro({node:e,project:t,active:n}){let r=Ka(),i=c(),a=e.file??``,o=Ra(t,a),s=Wa(i,o.type===`item`?void 0:o.path);return o.type===`item`?(0,Y.jsx)(to,{target:o,project:t}):s===!1||a===``?(0,Y.jsx)(eo,{icon:(0,Y.jsx)(rt,{"aria-hidden":!0}),words:r.missing(a),className:`text-problem-text`}):o.type===`media`?(0,Y.jsx)(no,{target:o,active:n}):(0,Y.jsx)(eo,{icon:(0,Y.jsx)(O,{"aria-hidden":!0}),words:a})}function io({node:e,project:t}){let n=a()?.locale??`en`,r=Ra(t,e.file??``),i=r.type===`item`&&r.item.kindInfo?m(r.item.kindInfo,n):void 0;return(0,Y.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1`,title:e.file,children:[(0,Y.jsx)(Ya,{target:r,className:`size-3.5 flex-none`}),(0,Y.jsx)(`span`,{className:`truncate`,children:Za(r)}),i===void 0?null:(0,Y.jsx)(`span`,{className:`text-lead-soft flex-none`,children:i})]})}function ao({url:e}){let t=e,n=``;try{let r=new URL(e);t=r.host,n=`${r.pathname===`/`?``:r.pathname}${r.search}`}catch{}return(0,Y.jsxs)(`div`,{className:`flex size-full flex-col justify-center gap-1 overflow-hidden px-4 py-3`,"data-testid":`canvas-link`,children:[(0,Y.jsxs)(`span`,{className:`text-ink flex min-w-0 items-center gap-2 font-semibold`,children:[(0,Y.jsx)(D,{className:`text-lead size-4 flex-none`,"aria-hidden":!0}),(0,Y.jsx)(`span`,{className:`truncate`,children:t})]}),n===``?null:(0,Y.jsx)(`span`,{className:`text-lead truncate text-xs`,children:n})]})}function oo({type:e}){let t=Ka();return(0,Y.jsx)(eo,{icon:(0,Y.jsx)(O,{"aria-hidden":!0}),words:t.unknownType(e)})}var so=typeof navigator<`u`&&navigator.userAgent.includes(`Mac`)?`⌘`:`Ctrl+`,co=(e,t)=>t===void 0?e:`${e} (${t})`,lo=`application/x-allyhub-canvas-note`,uo=`bg-sheet border-rule shadow-overlay pointer-events-auto flex items-center gap-0.5 rounded-lg border p-1`,fo=/\.(?:png|jpe?g|webp|avif|gif|svg|mp4|webm|mov|mp3|wav|m4a|ogg|aac|flac)$/iu;async function po(e,t,n=3){let r=await e(t).catch(()=>({files:[],dirs:[]})),i=r.files.map(e=>e.path).filter(e=>fo.test(e));if(n===0)return i;let a=await Promise.all(r.dirs.filter(e=>!e.split(`/`).some(e=>e.startsWith(`.`)||e===`node_modules`)).map(t=>po(e,t,n-1)));return[...i,...a.flat()]}function mo(e){let t=Ka(),n=c(),r=a()?.locale??`en`,[i,o]=(0,X.useState)(``),[s,l]=(0,X.useState)([]);(0,X.useEffect)(()=>{let e=!0;return po(e=>n[`files/list`]({dir:e}),``).then(t=>{e&&l([...new Set(t)].sort())}),()=>{e=!1}},[n]);let u=i.trim().toLowerCase(),d=(0,X.useMemo)(()=>(e.project?.items??[]).filter(t=>t.entry!==e.self&&(u===``||t.id.toLowerCase().includes(u)||(t.title??``).toLowerCase().includes(u))),[e.project,e.self,u]),f=s.filter(e=>u===``||e.toLowerCase().includes(u));return(0,Y.jsxs)(`div`,{className:`flex w-80 flex-col gap-2`,"data-testid":`canvas-picker`,children:[(0,Y.jsx)(ke,{autoFocus:!0,value:i,placeholder:t.find,"aria-label":t.find,onChange:e=>{o(e.target.value)}}),(0,Y.jsxs)(`div`,{className:`flex h-80 flex-col overflow-y-auto`,children:[d.length>0&&(0,Y.jsx)(`p`,{className:`text-lead px-2 pt-1 text-xs font-semibold`,children:t.items}),d.map(t=>(0,Y.jsx)(k,{size:`dense`,"data-testid":`canvas-pick`,"data-path":t.entry,onClick:()=>{e.onPick(t.entry)},meta:t.kindInfo?(0,Y.jsx)(`span`,{className:`text-lead-soft text-xs`,children:m(t.kindInfo,r)}):void 0,children:t.title??t.id},t.id)),f.length>0&&(0,Y.jsx)(`p`,{className:`text-lead px-2 pt-2 text-xs font-semibold`,children:t.media}),f.map(t=>(0,Y.jsx)(k,{size:`dense`,"data-testid":`canvas-pick`,"data-path":t,onClick:()=>{e.onPick(t)},children:t},t)),d.length===0&&f.length===0&&(0,Y.jsx)(`p`,{className:`text-lead px-2 py-1 text-xs`,children:t.nothingFound})]})]})}function ho(e){let t=Ka(),[n,r]=(0,X.useState)(!1),[i,a]=(0,X.useState)(!1),[o,s]=(0,X.useState)(``),c=()=>{let t=o.trim();t!==``&&(a(!1),s(``),e.onLink(/^[a-z][a-z0-9+.-]*:/iu.test(t)?t:`https://${t}`))};return(0,Y.jsxs)(`div`,{role:`toolbar`,"aria-label":t.adding,"data-testid":`canvas-add-bar`,className:u(uo,`absolute bottom-3 left-1/2 -translate-x-1/2`),children:[(0,Y.jsx)(_,{icon:!0,draggable:!0,"aria-label":t.note,title:t.noteHint,"data-testid":`canvas-add-note`,onClick:e.onNote,onDragStart:e=>{e.dataTransfer.setData(lo,`text`),e.dataTransfer.effectAllowed=`copy`},children:(0,Y.jsx)(we,{})}),(0,Y.jsxs)(ne,{open:n,onOpenChange:r,children:[(0,Y.jsx)(v,{asChild:!0,children:(0,Y.jsx)(_,{icon:!0,"aria-label":t.file,title:t.fileHint,"data-testid":`canvas-add-file`,children:(0,Y.jsx)(ot,{})})}),(0,Y.jsx)(b,{side:`top`,align:`center`,className:`w-auto p-2`,children:(0,Y.jsx)(mo,{project:e.project,self:e.self,onPick:t=>{r(!1),e.onFile(t)}})})]}),(0,Y.jsxs)(ne,{open:i,onOpenChange:a,children:[(0,Y.jsx)(v,{asChild:!0,children:(0,Y.jsx)(_,{icon:!0,"aria-label":t.link,title:t.linkHint,"data-testid":`canvas-add-link`,children:(0,Y.jsx)(he,{})})}),(0,Y.jsxs)(b,{side:`top`,align:`center`,className:`flex w-80 gap-2 p-2`,children:[(0,Y.jsx)(ke,{autoFocus:!0,value:o,placeholder:t.linkPlaceholder,"aria-label":t.link,"data-testid":`canvas-link-url`,onChange:e=>{s(e.target.value)},onKeyDown:e=>{e.key===`Enter`&&c()}}),(0,Y.jsx)(_,{"data-testid":`canvas-link-add`,disabled:o.trim()===``,onClick:c,children:t.linkAdd})]})]}),(0,Y.jsx)(_,{icon:!0,"aria-label":t.group,title:co(t.groupHint,`${so}G`),disabled:!e.groupable,"data-testid":`canvas-group`,onClick:e.onGroup,children:(0,Y.jsx)(C,{})})]})}function go(e){let t=Ka();return(0,Y.jsxs)(`div`,{className:u(uo,`absolute top-3 right-3 flex-col`),"data-testid":`canvas-view-controls`,children:[(0,Y.jsxs)(`div`,{role:`toolbar`,"aria-label":t.zoom,"aria-orientation":`vertical`,className:`flex flex-col gap-0.5`,children:[(0,Y.jsx)(_,{icon:!0,"aria-label":t.zoomIn,title:co(t.zoomIn,`${so}+`),"data-testid":`canvas-zoom-in`,onClick:()=>{e.onZoom(`in`)},children:(0,Y.jsx)(Oe,{})}),(0,Y.jsx)(_,{icon:!0,"aria-label":t.zoomOut,title:co(t.zoomOut,`${so}−`),"data-testid":`canvas-zoom-out`,onClick:()=>{e.onZoom(`out`)},children:(0,Y.jsx)(be,{})}),(0,Y.jsx)(_,{icon:!0,"aria-label":t.zoomFit,title:co(t.zoomFit,`⇧1`),"data-testid":`canvas-zoom-fit`,onClick:()=>{e.onZoom(`fit`)},children:(0,Y.jsx)(at,{})}),(0,Y.jsx)(_,{icon:!0,"aria-label":t.zoomActual,title:co(t.zoomActual,`⇧0`),"data-testid":`canvas-zoom-actual`,className:`text-[11px] tabular-nums`,onClick:()=>{e.onZoom(`actual`)},children:`1:1`})]}),e.history?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`span`,{className:`bg-rule my-0.5 h-px w-5`,"aria-hidden":!0}),(0,Y.jsxs)(`div`,{role:`toolbar`,"aria-label":t.history,"aria-orientation":`vertical`,className:`flex flex-col gap-0.5`,children:[(0,Y.jsx)(_,{icon:!0,"aria-label":t.undo,title:co(t.undo,`${so}Z`),"data-testid":`canvas-undo`,disabled:!e.history.canUndo,onClick:e.history.onUndo,children:(0,Y.jsx)(Se,{})}),(0,Y.jsx)(_,{icon:!0,"aria-label":t.redo,title:co(t.redo,`⇧${so}Z`),"data-testid":`canvas-redo`,disabled:!e.history.canRedo,onClick:e.history.onRedo,children:(0,Y.jsx)(xe,{})})]})]}):null]})}var _o=8,vo=20,yo=8;function bo(e){let t=Ka(),n=e.markUp,r=(0,X.useRef)(null),[i,a]=(0,X.useState)({width:0,height:0});(0,X.useLayoutEffect)(()=>{let e=r.current;if(!e)return;let t=()=>{a({width:e.offsetWidth,height:e.offsetHeight})};t();let n=new ResizeObserver(t);return n.observe(e),()=>{n.disconnect()}},[]);let o=e.box.left+e.box.width/2,s=Math.min(Math.max(yo,o-i.width/2),Math.max(yo,e.view.width-yo-i.width)),c=e.box.top-Math.max(e.above,vo)-_o-i.height,l=e.box.top+e.box.height+_o,d=c>=yo?c:l+i.height<=e.view.height-yo?l:yo,f=e.color===void 0?void 0:qa[e.color];return(0,Y.jsxs)(`div`,{ref:r,role:`toolbar`,"aria-label":t.selected,"data-testid":`canvas-selection-bar`,"data-note-chrome":``,className:u(uo,`absolute`),style:{left:s,top:d,...i.width===0?{opacity:0,pointerEvents:`none`}:{}},children:[e.onColor?(0,Y.jsxs)(ne,{children:[(0,Y.jsx)(v,{asChild:!0,children:(0,Y.jsx)(_,{icon:!0,"aria-label":t.color,title:t.color,"data-testid":`canvas-color`,children:(0,Y.jsx)(me,{style:f?{color:f}:void 0})})}),(0,Y.jsxs)(b,{side:`top`,align:`center`,className:`flex w-auto items-center gap-2 p-2`,role:`radiogroup`,"aria-label":t.color,children:[(0,Y.jsx)(Te,{color:`linear-gradient(135deg, transparent 45%, var(--color-lead) 45%, var(--color-lead) 55%, transparent 55%)`,label:t.noColor,checked:e.color===void 0,"data-testid":`canvas-color-none`,onClick:()=>{e.onColor?.(void 0)}}),st.map(n=>(0,Y.jsx)(Te,{color:qa[n]??``,label:t.colors[n],checked:e.color===n,"data-testid":`canvas-color-${n}`,onClick:()=>{e.onColor?.(n)}},n))]})]}):null,e.onDelete?(0,Y.jsx)(_,{icon:!0,"aria-label":t.delete,title:co(t.delete,`⌫`),"data-testid":`canvas-delete`,onClick:e.onDelete,children:(0,Y.jsx)(T,{})}):null,e.open?(0,Y.jsx)(_,{icon:!0,"aria-label":t.open,title:e.open.link?t.openLinkHint:t.openHint,"data-testid":`canvas-open`,onClick:e.open.run,children:(0,Y.jsx)(Ce,{})}):null,(0,Y.jsx)(_,{icon:!0,"aria-label":t.zoomSelection,title:co(t.zoomSelection,`⇧2`),"data-testid":`canvas-zoom-selection`,onClick:e.onZoomTo,children:(0,Y.jsx)(it,{})}),n?(0,Y.jsxs)(_,{title:n.hint,"data-testid":`mark-up-selected`,className:`text-ink`,onClick:e=>{let t=e.currentTarget.getBoundingClientRect();n.begin({x:t.x,y:t.y,width:t.width,height:t.height},!0)},children:[(0,Y.jsx)(y,{"aria-hidden":!0}),n.label]}):null]})}function xo(e,t){let n=e.split(`
|
|
16
|
+
`)[t-1]?.trim().replace(/,$/u,``);if(n?.startsWith(`{`)===!0)try{let e=JSON.parse(n);return typeof e.fromNode==`string`?e.fromNode:typeof e.id==`string`?e.id:void 0}catch{return}}function So(e){let t=e.nodes.find(e=>e.after!==void 0)??e.nodes[0];if(t)return t.id;let n=e.edges[0],r=n?.after??n?.before;return typeof r?.fromNode==`string`?r.fromNode:void 0}var Co=class e{path;session;canvas;unreadable;revision=0;landed;snapshot;listeners=new Set;amending;stops=[];constructor(e,t){this.path=e,this.session=t;let n=pt(t.text);this.canvas=n.readable?n.canvas:F,this.unreadable=!n.readable,this.snapshot=this.make(),t.attach({save:e=>{if(this.unreadable)return;let t=gt(this.canvas);return t===e?void 0:t},take:(e,t,n)=>{let r=pt(e);if(!r.readable)this.canvas=F,this.unreadable=!0;else{let e=pt(t),i=n?.kind===`agent`&&e.readable?So(Ct(e.canvas,r.canvas)):void 0;i!==void 0&&(this.landed={id:i,at:Date.now()}),this.canvas=this.unreadable||!e.readable?r.canvas:xt(e.canvas,this.canvas,r.canvas),this.unreadable=!1}this.emit()}}),this.stops.push(t.onState(()=>{this.emit()}),t.onUndo(()=>{this.emit()}))}static async open(t,n){return new e(n,await h.open(t,n))}make(){return{canvas:this.canvas,state:this.session.state,canUndo:this.session.canUndo,canRedo:this.session.canRedo,unreadable:this.unreadable,revision:this.revision,landed:this.landed}}emit(){this.revision+=1,this.snapshot=this.make();for(let e of this.listeners)e()}get(){return this.snapshot}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}get text(){return this.session.text}edit(e,t,n){if(this.unreadable)return;let r=this.canvas,i=t(r);if(i===r)return;if(n!==void 0&&this.amending?.key===n&&this.session.canUndo){this.session.undo(),this.canvas=i,this.push(this.amending.label,Ct(this.amending.from,i));return}let a=Ct(r,i);wt(a)||(this.canvas=i,this.amending=n===void 0?void 0:{key:n,from:r,label:e},this.push(e,a))}settle(){this.amending=void 0}push(e,t){this.session.pushEdit({label:e,undo:()=>{this.canvas=St(this.canvas,t,`before`),this.emit()},redo:()=>{this.canvas=St(this.canvas,t,`after`),this.emit()}}),this.emit()}undo(){this.amending=void 0,this.session.undo()}redo(){this.amending=void 0,this.session.redo()}flush(){return this.session.flush()}async close(){for(let e of this.stops.splice(0))e();await this.session.close()}},wo=.1,To=e=>Math.min(4,Math.max(wo,e)),Eo=(e,t)=>({x:(t.x-e.x)*e.zoom,y:(t.y-e.y)*e.zoom}),Do=(e,t)=>({x:t.x/e.zoom+e.x,y:t.y/e.zoom+e.y});function Oo(e,t,n){let r=To(n),i=Do(e,t);return{x:i.x-t.x/r,y:i.y-t.y/r,zoom:r}}var $=e=>({left:e.x,top:e.y,width:e.width,height:e.height});function ko(e,t,n=48){if(e.length===0||t.width<=0||t.height<=0)return{x:-t.width/2,y:-t.height/2,zoom:1};let r=Math.min(...e.map(e=>e.left)),i=Math.min(...e.map(e=>e.top)),a=Math.max(...e.map(e=>e.left+e.width)),o=Math.max(...e.map(e=>e.top+e.height)),s=To(Math.min((t.width-2*n)/Math.max(1,a-r),(t.height-2*n)/Math.max(1,o-i),1));return{x:(r+a)/2-t.width/2/s,y:(i+o)/2-t.height/2/s,zoom:s}}function Ao(e,t){switch(t){case`top`:return{x:e.left+e.width/2,y:e.top};case`bottom`:return{x:e.left+e.width/2,y:e.top+e.height};case`left`:return{x:e.left,y:e.top+e.height/2};case`right`:return{x:e.left+e.width,y:e.top+e.height/2}}}function jo(e,t){let n=[[`top`,Math.abs(t.y-e.top)],[`bottom`,Math.abs(t.y-(e.top+e.height))],[`left`,Math.abs(t.x-e.left)],[`right`,Math.abs(t.x-(e.left+e.width))]];return n.sort((e,t)=>e[1]-t[1]),n[0]?.[0]??`right`}function Mo(e,t){let n=t.left+t.width/2-(e.left+e.width/2),r=t.top+t.height/2-(e.top+e.height/2);return Math.abs(n)*e.height>=Math.abs(r)*e.width?n>=0?`right`:`left`:r>=0?`bottom`:`top`}var No={top:{x:0,y:-1},bottom:{x:0,y:1},left:{x:-1,y:0},right:{x:1,y:0}};function Po(e,t,n,r){let i=Math.max(40,Math.hypot(n.x-e.x,n.y-e.y)/3),a=No[t],o={x:e.x+a.x*i,y:e.y+a.y*i},s=r?No[r]:{x:0,y:0},c={x:n.x+s.x*i,y:n.y+s.y*i},l=t=>{let r=1-t;return{x:r*r*r*e.x+3*r*r*t*o.x+3*r*t*t*c.x+t*t*t*n.x,y:r*r*r*e.y+3*r*r*t*o.y+3*r*t*t*c.y+t*t*t*n.y}},u=e=>String(Math.round(e*10)/10),d=r?{x:-s.x,y:-s.y}:(()=>{let e=l(.95),t=Math.hypot(n.x-e.x,n.y-e.y)||1;return{x:(n.x-e.x)/t,y:(n.y-e.y)/t}})();return{d:`M ${u(e.x)} ${u(e.y)} C ${u(o.x)} ${u(o.y)} ${u(c.x)} ${u(c.y)} ${u(n.x)} ${u(n.y)}`,mid:l(.5),end:n,endDir:d}}function Fo(e,t,n){let r={x:e.x-t.x*n,y:e.y-t.y*n},i={x:-t.y*n*.5,y:t.x*n*.5};return[e,{x:r.x+i.x,y:r.y+i.y},{x:r.x-i.x,y:r.y-i.y}].map(e=>`${String(e.x)},${String(e.y)}`).join(` `)}function Io(e,t){let n=e.filter(e=>t.x>=e.x&&t.x<=e.x+e.width&&t.y>=e.y&&t.y<=e.y+e.height);return[...n].reverse().find(e=>e.type!==`group`)??n.at(-1)}function Lo(e,t,n,r=48){let i=r/t.zoom,a=(e,n,r,a)=>{let o=a/t.zoom;return n+2*i>o||e-i<r?e-i:e+n+i>r+o?e+n+i-o:r},o=a(e.left,e.width,t.x,n.width),s=a(e.top,e.height,t.y,n.height);return o===t.x&&s===t.y?void 0:{...t,x:o,y:s}}function Ro(e,t,n,r,i){let a=e=>({x:n.x+(e.x-t.x)*t.zoom,y:n.y+(e.y-t.y)*t.zoom,width:e.width*t.zoom,height:e.height*t.zoom});return[...e].reverse().filter(e=>d(r,a(e))).map(e=>zo(e,i))}function zo(e,t){let n=Tt(t.text,e.id),r={path:t.file,...n===void 0?{}:{line:n}};switch(e.type){case`text`:return{name:`the note ${e.id} on the canvas`,source:r,...e.text===void 0?{}:{text:e.text}};case`file`:{let n=Ra(t.project,e.file??``),i=n.type===`item`?`the ${n.item.kindInfo?.noun??n.item.kind??`item`} ${n.item.id} (${n.item.entry})`:`the file ${n.path}`;return{name:`node ${e.id}, showing ${i}`,source:r}}case`link`:return{name:`node ${e.id}, a link to ${e.url??``}`,source:r};case`group`:return{name:`the group ${e.label===void 0?e.id:`"${e.label}"`}`,source:r};default:return{name:`node ${e.id}, of type ${e.type}`,source:r}}}function Bo(e,t,n,r){return{element:zo(e,r),outline:f({x:n.x+(e.x-t.x)*t.zoom,y:n.y+(e.y-t.y)*t.zoom,width:e.width*t.zoom,height:e.height*t.zoom})}}function Vo(e,t,n,r){let i=Do(t,{x:r.x-n.x,y:r.y-n.y}),a=[...e].reverse().find(e=>i.x>=e.x&&i.x<=e.x+e.width&&i.y>=e.y&&i.y<=e.y+e.height);return a?`on the canvas, over node ${a.id}`:`on the canvas at ${String(Math.round(i.x))}, ${String(Math.round(i.y))}`}var Ho=3e4,Uo=3,Wo=6,Go=40,Ko=24,qo=6,Jo=14,Yo=10;function Xo(e,t){let n=1/Math.max(t,.5);if(e.type===`file`)return Math.max(16*n,14);if(e.type===`group`)return 20*n+4}var Zo={text:{width:260,height:140},file:{width:480,height:300},link:{width:320,height:96}},Qo=24,$o=typeof navigator<`u`&&navigator.userAgent.includes(`Mac`),es=$o?`⌘G`:`Ctrl+G`,ts=e=>typeof e==`object`&&!!e&&typeof e.x==`number`&&typeof e.y==`number`&&typeof e.zoom==`number`&&e.zoom>0,ns={nodes:new Set,edges:new Set},rs=(e,t,n)=>({...e,nodes:e.nodes.map(e=>typeof e.id==`string`&&t.has(e.id)?n(e):e)}),is=(e,t,n)=>({...e,edges:e.edges.map(e=>typeof e.id==`string`&&t.has(e.id)?n(e):e)}),as=e=>{let t=``,n=new Uint8Array(e);for(let e=0;e<n.length;e+=32768)t+=String.fromCharCode(...n.subarray(e,e+32768));return btoa(t)};function os({doc:e,path:t,shown:n,updating:i}){let s=Ka(),d=c(),f=a(),p=La(),m=(0,X.useSyncExternalStore)(t=>e.subscribe(t),()=>e.get()),h=f?.mode!==`edit`||i,g=(0,X.useMemo)(()=>mt(n),[n]),_=(0,X.useMemo)(()=>ht(n),[n]),v=(0,X.useMemo)(()=>new Map(g.map(e=>[e.id,e])),[g]),y=(0,X.useRef)(null),[b,ne]=(0,X.useState)({width:0,height:0}),de=ts(f?.place)?f.place:void 0,[x,S]=(0,X.useState)(de),pe=(0,X.useMemo)(()=>b.width===0?{x:0,y:0,zoom:1}:ko(g.map($),b),[g,b]),C=x??pe,me=(0,X.useRef)(C);(0,X.useEffect)(()=>{me.current=C});let{agent:w,following:he}=r(),ge=ee(),_e=(()=>{if(w?.doing===void 0)return;let n=m.landed,r=n&&n.at>=w.at-Ho,i=w.source?.path===t;if(r&&i)return n.id;let a=i?w.source?.from:void 0,o=a===void 0?void 0:xo(e.text,a);return o!==void 0&&v.has(o)?o:r?n.id:void 0})(),ve=_e===void 0?void 0:v.get(_e),ye=he?ve:void 0,[be,xe]=(0,X.useState)();if(ye?.id!==be&&(xe(ye?.id),ye&&b.width>0)){let e=Lo($(ye),C,b);e&&S(e)}let Se=()=>{x===void 0&&S(C)},[Ce,we]=(0,X.useState)(ns),T=(0,X.useMemo)(()=>{let e=[...Ce.nodes].filter(e=>v.has(e)),t=[...Ce.edges].filter(e=>_.some(t=>t.id===e));return e.length===Ce.nodes.size&&t.length===Ce.edges.size?Ce:{nodes:new Set(e),edges:new Set(t)}},[Ce,v,_]),[Te,Ee]=(0,X.useState)(),[E,De]=(0,X.useState)({}),Oe=(0,X.useRef)({}),ke=e=>{Oe.current=e,De(e)},[D,O]=(0,X.useState)(),k=(0,X.useRef)(void 0),[A,j]=(0,X.useState)(),Le=(0,X.useRef)(!1);(0,X.useLayoutEffect)(()=>{let e=y.current;if(!e)return;let t=new ResizeObserver(()=>{ne({width:e.clientWidth,height:e.clientHeight})});return t.observe(e),()=>{t.disconnect()}},[]),(0,X.useEffect)(()=>{if(x===void 0)return;let e=setTimeout(()=>{d[`editor/place`]({place:{x:Math.round(x.x),y:Math.round(x.y),zoom:Math.round(x.zoom*1e3)/1e3}}).catch(()=>void 0)},400);return()=>{clearTimeout(e)}},[d,x]);let Re=()=>{let e=y.current?.getBoundingClientRect();return{x:e?.left??0,y:e?.top??0}},M=e=>{let t=Re();return Do(C,{x:e.clientX-t.x,y:e.clientY-t.y})},ze=()=>Do(C,{x:b.width/2,y:b.height/2});(0,X.useEffect)(()=>{let e=y.current;if(!e)return;let t=t=>{if(t.target?.closest(`[data-canvas-scrolls]`))return;t.preventDefault();let n=e.getBoundingClientRect(),r={x:t.clientX-n.left,y:t.clientY-n.top};S(e=>{let n=e??me.current;if(t.ctrlKey||t.metaKey)return Oo(n,r,n.zoom*Math.exp(-t.deltaY*.01));let i=t.shiftKey&&t.deltaX===0?t.deltaY:t.deltaX,a=t.shiftKey&&t.deltaX===0?0:t.deltaY;return{...n,x:n.x+i/n.zoom,y:n.y+a/n.zoom}})};return e.addEventListener(`wheel`,t,{passive:!1}),()=>{e.removeEventListener(`wheel`,t)}},[]);let Be=(0,X.useCallback)(e=>{if(e===`fit`||typeof e!=`string`){let t=e===`fit`?g.map($):e;t.length>0&&S(ko(t,b))}else S(t=>{let n=t??me.current,r=e===`actual`?1:e===`in`?n.zoom*1.25:n.zoom/1.25;return Oo(n,{x:b.width/2,y:b.height/2},To(r))})},[g,b]),Ve=e=>{let t=new Map;for(let n of e){let e=v.get(n);if(e&&(t.set(n,$(e)),e.type===`group`))for(let n of g)n.id!==e.id&&n.x>=e.x&&n.y>=e.y&&n.x+n.width<=e.x+e.width&&n.y+n.height<=e.y+e.height&&t.set(n.id,$(n))}return t},N=e=>{we(e)},He=(e,t,n,r)=>{let i={left:e.x-t/2,top:e.y-n/2,width:t,height:n};if(!r)return i;let a=e=>g.filter(t=>t.type!==`group`&&t.x<e.left+e.width&&t.x+t.width>e.left&&t.y<e.top+e.height&&t.y+t.height>e.top);for(let e=0;e<50;e++){let e=a(i);if(e.length===0)break;i={...i,left:Math.max(...e.map(e=>e.x+e.width))+Ko}}let o=(i.left+i.width-C.x)*C.zoom,s=(i.top+i.height-C.y)*C.zoom;return(o>b.width||s>b.height||i.left<C.x||i.top<C.y)&&S({...C,x:i.left+i.width/2-b.width/2/C.zoom,y:i.top+i.height/2-b.height/2/C.zoom}),i},Ue=(t,n,r=!1)=>{Se();let i=_t(m.canvas),a=typeof t.width==`number`?t.width:260,o=typeof t.height==`number`?t.height:140,c=He(n??ze(),a,o,n===void 0),l={id:i,...t,x:z(c.left),y:z(c.top),width:z(a),height:z(o)},u={id:i,type:l.type,...Object.fromEntries(Object.entries(l).filter(([e])=>![`id`,`type`,`x`,`y`,`width`,`height`].includes(e))),x:l.x,y:l.y,width:l.width,height:l.height};return e.edit(s.edits.add,e=>({...e,nodes:[...e.nodes,u]})),N({nodes:new Set([i]),edges:new Set}),r&&t.type===`text`&&O({type:`text`,id:i,text:``}),i},We=e=>Ue({type:`text`,text:``,...Zo.text},e,!0),Ge=(e,t)=>Ue({type:`file`,file:e,...Zo.file},t),Ke=(e,t)=>Ue({type:`link`,url:e,...Zo.link},t),qe=()=>{if(T.nodes.size===0&&T.edges.size===0)return;let t=T.nodes;e.edit(s.edits.delete,e=>({...e,nodes:e.nodes.filter(e=>!(typeof e.id==`string`&&t.has(e.id))),edges:e.edges.filter(e=>!(typeof e.id==`string`&&T.edges.has(e.id))&&!t.has(String(e.fromNode))&&!t.has(String(e.toNode)))})),N(ns)},Je=()=>{let t=g.filter(e=>T.nodes.has(e.id));if(t.length===0)return;let n=je(t.map($)),r=_t(m.canvas),i=t.some(e=>e.type===`file`)?48:Ko,a={id:r,type:`group`,x:z(n.left-Ko),y:z(n.top-i),width:z(n.width+48),height:z(n.height+Ko+i)};e.edit(s.edits.group,e=>{let t=e.nodes.findIndex(e=>typeof e.id==`string`&&T.nodes.has(e.id)),n=[...e.nodes];return n.splice(t<0?0:t,0,a),{...e,nodes:n}}),N({nodes:new Set([r]),edges:new Set}),O({type:`group`,id:r,text:``})},Ye=t=>{e.edit(s.edits.color,e=>is(rs(e,T.nodes,e=>B(e,{color:t})),T.edges,e=>B(e,{color:t})))},Xe=()=>{let e=[...g.filter(e=>T.nodes.has(e.id)).map(e=>e.color),..._.filter(e=>T.edges.has(e.id)).map(e=>e.color)],t=e[0];return e.length>0&&e.every(e=>e===t)?t:void 0},Ze=()=>[...g.filter(e=>T.nodes.has(e.id)).map(P),..._.filter(e=>T.edges.has(e.id)).flatMap(e=>{let t=ut(e);return t?[Pe(t.start,t.end)]:[]})],Qe=(t=D)=>{if(!t)return;O(void 0);let n=t.text;t.type===`edge`?e.edit(s.edits.label,e=>is(e,new Set([t.id]),e=>B(e,{label:n.trim()===``?void 0:n}))):t.type===`group`?e.edit(s.edits.label,e=>rs(e,new Set([t.id]),e=>B(e,{label:n.trim()===``?void 0:n}))):e.edit(s.edits.type,e=>rs(e,new Set([t.id]),e=>B(e,{text:n}))),y.current?.focus()},$e=e=>{e.type===`file`&&e.file?d[`items/open`]({target:{type:`file`,path:e.file}}).catch(()=>void 0):e.type===`link`&&e.url&&/^https?:\/\//u.test(e.url)&&d[`items/open`]({target:{type:`browser`,url:e.url}}).catch(()=>void 0)},et=e=>{Se(),D&&Qe();let t=e.target;if(t.closest(`[data-canvas-own]`))return;y.current?.focus();let n=M(e);if(e.button===1||e.button===0&&Le.current){k.current={type:`pan`,start:{x:e.clientX,y:e.clientY},camera:C},j(`pan`),e.currentTarget.setPointerCapture(e.pointerId);return}if(e.button!==0)return;let r=t.closest(`[data-handle]`)?.dataset.handle,i=t.closest(`[data-connector]`),a=t.closest(`[data-edge]`),o=t.closest(`[data-node]`);if(!(h&&(r||i))){if(r){let e=[...T.nodes][0],t=e===void 0?void 0:v.get(e);if(!t)return;k.current={type:`resize`,id:t.id,handle:r,start:n,frame:$(t)}}else if(i){let e=i.dataset.connector??``,t=i.dataset.side??`right`;k.current={type:`connect`,from:e,side:t,start:n},ke({connect:{from:e,side:t,to:n}})}else if(a){let t=a.dataset.edge??``,n=e.shiftKey||e.metaKey;N(n?{nodes:T.nodes,edges:new Set(T.edges.has(t)?[...T.edges].filter(e=>e!==t):[...T.edges,t])}:{nodes:new Set,edges:new Set([t])});return}else if(o){let t=o.dataset.node??``,r=e.shiftKey||e.metaKey,i=T;if(r?i={nodes:new Set(T.nodes.has(t)?[...T.nodes].filter(e=>e!==t):[...T.nodes,t]),edges:T.edges}:T.nodes.has(t)||(i={nodes:new Set([t]),edges:new Set}),N(i),h)return;k.current={type:`move`,start:n,frames:Ve(i.nodes),dragged:!1}}else k.current={type:`marquee`,start:n,add:e.shiftKey},e.shiftKey||N(ns);j(k.current.type),e.currentTarget.setPointerCapture(e.pointerId)}},tt=e=>{let t=k.current;if(!t){let t=e.target,n=M(e),r=24/C.zoom,i=t.closest(`[data-connector]`)?.dataset.connector??[...g].reverse().find(e=>e.type!==`group`&&n.x>=e.x-r&&n.x<=e.x+e.width+r&&n.y>=e.y-r&&n.y<=e.y+e.height+r)?.id??t.closest(`[data-node]`)?.dataset.node;i!==Te&&Ee(i);return}let n=M(e);if(t.type===`pan`){S({...t.camera,x:t.camera.x-(e.clientX-t.start.x)/t.camera.zoom,y:t.camera.y-(e.clientY-t.start.y)/t.camera.zoom});return}let r=Wo/C.zoom;if(t.type===`move`){let i=n.x-t.start.x,a=n.y-t.start.y;if(!t.dragged&&Math.hypot(i,a)*C.zoom<Uo)return;t.dragged=!0;let o=[...t.frames.values()],s=je(o),c=g.filter(e=>!t.frames.has(e.id)).map($),l=e.metaKey||e.ctrlKey?{frame:{...s,left:s.left+i,top:s.top+a},guides:[]}:Ae({...s,left:s.left+i,top:s.top+a},c,void 0,r),u=l.frame.left-s.left,d=l.frame.top-s.top,f=new Map;for(let[e,n]of t.frames)f.set(e,{...n,left:n.left+u,top:n.top+d});ke({frames:f,guides:l.guides})}else if(t.type===`resize`){let i=g.filter(e=>e.id!==t.id).map($),a=Ne(t.frame,t.handle,n.x-t.start.x,n.y-t.start.y,{keep:e.shiftKey,min:Go,...e.metaKey||e.ctrlKey?{}:{snap:{others:i,surface:void 0,tol:r}}});ke({frames:new Map([[t.id,a.frame]]),guides:a.guides})}else if(t.type===`connect`){let e=Io(g.filter(e=>e.id!==t.from),n);ke({connect:{from:t.from,side:t.side,to:n,...e?{over:{id:e.id,side:jo($(e),n)}}:{}}})}else{let e=Pe(t.start,n),r=g.filter(t=>t.x<e.left+e.width&&t.x+t.width>e.left&&t.y<e.top+e.height&&t.y+t.height>e.top&&(t.type!==`group`||t.x>=e.left&&t.y>=e.top&&t.x+t.width<=e.left+e.width&&t.y+t.height<=e.top+e.height));N({nodes:new Set([...t.add?T.nodes:[],...r.map(e=>e.id)]),edges:t.add?T.edges:new Set}),ke({marquee:e})}},nt=()=>{let t=k.current;k.current=void 0,j(void 0);let n=Oe.current;if(ke({}),t){if(t.type===`move`&&t.dragged&&n.frames){let t=n.frames;e.edit(s.edits.move,e=>rs(e,new Set(t.keys()),e=>{let n=t.get(String(e.id));return n?B(e,{x:z(n.left),y:z(n.top)}):e}))}else if(t.type===`resize`&&n.frames){let r=n.frames.get(t.id);r&&e.edit(s.edits.resize,e=>rs(e,new Set([t.id]),e=>B(e,{x:z(r.left),y:z(r.top),width:z(r.width),height:z(r.height)})))}else if(t.type===`connect`&&n.connect?.over){let r=n.connect.over,i=_t(m.canvas);e.edit(s.edits.connect,e=>({...e,edges:[...e.edges,{id:i,fromNode:t.from,fromSide:t.side,toNode:r.id,toSide:r.side}]})),N({nodes:new Set,edges:new Set([i])})}}},rt=e=>{let t=document.elementFromPoint(e.clientX,e.clientY)??e.target;if(h){let e=t.closest(`[data-node]`)?.dataset.node,n=e===void 0?void 0:v.get(e);n&&$e(n);return}if(t.closest(`[data-canvas-own]`))return;let n=t.closest(`[data-edge]`)?.dataset.edge;if(n!==void 0){let e=_.find(e=>e.id===n);O({type:`edge`,id:n,text:e?.label??``});return}if(t.closest(`[data-group-label]`)){let e=t.closest(`[data-node]`)?.dataset.node??``;O({type:`group`,id:e,text:v.get(e)?.label??``});return}let r=t.closest(`[data-node]`)?.dataset.node,i=r===void 0?void 0:v.get(r);i?i.type===`text`?O({type:`text`,id:i.id,text:i.text??``}):i.type===`group`?O({type:`group`,id:i.id,text:i.label??``}):$e(i):We(M(e))},it=t=>{if(t.target.closest(`textarea, input, [contenteditable]`))return;Se();let n=$o?t.metaKey:t.ctrlKey;if(t.key===` `)Le.current=!0,t.preventDefault();else if(n&&t.key.toLowerCase()===`z`)t.preventDefault(),t.shiftKey?e.redo():e.undo();else if(n&&t.key.toLowerCase()===`y`)t.preventDefault(),e.redo();else if(n&&t.key.toLowerCase()===`a`)t.preventDefault(),N({nodes:new Set(g.map(e=>e.id)),edges:new Set(_.map(e=>e.id))});else if(n&&t.key.toLowerCase()===`g`&&!h)t.preventDefault(),Je();else if((t.key===`Delete`||t.key===`Backspace`)&&!h)t.preventDefault(),qe();else if(t.key===`Escape`)N(ns);else if(t.shiftKey&&(t.key===`!`||t.code===`Digit1`))Be(`fit`);else if(t.shiftKey&&(t.key===`@`||t.code===`Digit2`))Be(Ze());else if(t.shiftKey&&(t.key===`)`||t.code===`Digit0`))Be(`actual`);else if(n&&(t.key===`=`||t.key===`+`))t.preventDefault(),Be(`in`);else if(n&&t.key===`-`)t.preventDefault(),Be(`out`);else if(t.key===`Enter`&&T.nodes.size===1&&!h){let e=v.get([...T.nodes][0]??``);e?.type===`text`&&(t.preventDefault(),O({type:`text`,id:e.id,text:e.text??``}))}else if(t.key.startsWith(`Arrow`)&&T.nodes.size>0&&!h){t.preventDefault();let n=t.shiftKey?10:1,r=t.key===`ArrowLeft`?-n:t.key===`ArrowRight`?n:0,i=t.key===`ArrowUp`?-n:t.key===`ArrowDown`?n:0,a=Ve(T.nodes);e.edit(s.edits.move,e=>rs(e,new Set(a.keys()),e=>B(e,{x:z(Number(e.x)+r),y:z(Number(e.y)+i)})),`nudge`)}},at=t=>{t.key===` `&&(Le.current=!1),t.key.startsWith(`Arrow`)&&e.settle()},ot=e=>{if(h)return;e.preventDefault();let n=M(e);if(e.dataTransfer.types.includes(`application/x-allyhub-canvas-note`)){We(n);return}let r=[...e.dataTransfer.files];if(r.length>0){(async()=>{let e=0;for(let i of r)try{let{path:r}=await d[`files/upload`]({dir:t.includes(`/`)?t.slice(0,t.lastIndexOf(`/`)):``,name:i.name,data:as(await i.arrayBuffer())});Ge(r,{x:n.x+e*40,y:n.y+e*40}),e+=1}catch{}})();return}let i=(e.dataTransfer.getData(`text/uri-list`)||e.dataTransfer.getData(`text/plain`)).trim();i!==``&&(/^https?:\/\//u.test(i)?Ke(i,n):Ge(i.replace(/^\.\//u,``),n))},st=re();o({hold:()=>Promise.resolve({key:`${t}@${String(m.revision)}`,what:`The canvas ${t}, its nodes laid out with notes and edges`,source:{path:t}}),locate:n=>{let r=l(n)[0];return Promise.resolve({elements:Ro(g,C,Re(),n,{file:t,text:e.text,project:p}),...r?{where:Vo(g,C,Re(),r)}:{}})},pick:n=>{let r=Re(),i=Io(g,Do(C,{x:n.x-r.x,y:n.y-r.y}));return Promise.resolve(i?Bo(i,C,Re(),{file:t,text:e.text,project:p}):void 0)},selected:()=>Promise.resolve(g.filter(e=>T.nodes.has(e.id)).map(n=>Bo(n,C,Re(),{file:t,text:e.text,project:p})))});let P=e=>E.frames?.get(e.id)??$(e),F=T.nodes.size===1&&T.edges.size===0?v.get([...T.nodes][0]??``):void 0,I=C.zoom,L=g.filter(e=>e.type===`group`),lt=g.filter(e=>e.type!==`group`),ut=e=>{let t=v.get(e.fromNode),n=v.get(e.toNode);if(!t||!n)return;let r=P(t),i=P(n),a=e.fromSide??Mo(r,i),o=e.toSide??Mo(i,r),s=Ao(r,a),c=Ao(i,o);return{...Po(s,a,c,o),start:s,startDir:Po(c,o,s,a).endDir}},dt=e=>{let t=P(e),n=T.nodes.has(e.id),r=Ja(e.color),i=e.type===`group`,a=i?(0,Y.jsx)(`div`,{"data-group-label":``,className:`text-ink absolute bottom-full left-0 max-w-full truncate rounded-sm px-1.5 py-0.5 text-sm font-semibold`,style:{marginBottom:qo/I,fontSize:14/Math.max(I,.5),background:r?`color-mix(in oklab, ${r} 22%, transparent)`:void 0},children:D?.type===`group`&&D.id===e.id?null:e.label??`\xA0`}):e.type===`file`?(0,Y.jsx)(`div`,{className:`text-lead absolute bottom-full left-0 flex max-w-full text-xs`,style:{marginBottom:qo/I,fontSize:12/Math.max(I,.5)},children:(0,Y.jsx)(io,{node:e,project:p})}):null;return(0,Y.jsxs)(`div`,{"data-node":e.id,"data-testid":`canvas-node`,"data-type":e.type,"data-selected":n?``:void 0,className:`group/node absolute`,style:{left:t.left,top:t.top,width:t.width,height:t.height},children:[a,(0,Y.jsx)(`div`,{className:u(`size-full overflow-hidden rounded-md border`,i?`border-rule-strong`:`bg-sheet border-rule motion-safe:transition-shadow`,!i&&Te===e.id&&`border-rule-strong shadow-overlay`,n&&`outline-pencil outline-2 outline-offset-2`),style:{...r?{borderColor:r}:{},...i?{background:r?`color-mix(in oklab, ${r} 8%, transparent)`:`color-mix(in oklab, var(--color-lead) 5%, transparent)`}:e.type===`text`&&r?{background:`color-mix(in oklab, ${r} 10%, var(--color-sheet))`}:{},borderWidth:Math.max(1,1/I)},children:e.type===`text`?D?.type===`text`&&D.id===e.id?(0,Y.jsx)(`textarea`,{"data-canvas-own":``,"data-testid":`canvas-typing`,autoFocus:!0,value:D.text,"aria-label":s.note,className:`text-ink size-full resize-none bg-transparent px-4 py-3 text-base leading-relaxed outline-none`,onChange:e=>{O({...D,text:e.target.value})},onBlur:()=>{Qe()},onKeyDown:e=>{e.stopPropagation(),e.key===`Escape`&&Qe()}}):(0,Y.jsx)(Qa,{text:e.text??``}):e.type===`file`?(0,Y.jsx)(ro,{node:e,project:p,active:Te===e.id}):e.type===`link`?(0,Y.jsx)(ao,{url:e.url??``}):i?null:(0,Y.jsx)(oo,{type:e.type})}),i&&D?.type===`group`&&D.id===e.id?(0,Y.jsx)(`input`,{"data-canvas-own":``,"data-testid":`canvas-typing`,autoFocus:!0,value:D.text,"aria-label":s.label,className:`bg-sheet text-ink border-pencil absolute bottom-full left-0 rounded-sm border px-1.5 py-0.5 text-sm font-semibold outline-none`,style:{marginBottom:qo/I,fontSize:14/Math.max(I,.5)},onChange:e=>{O({...D,text:e.target.value})},onBlur:()=>{Qe()},onKeyDown:e=>{e.stopPropagation(),(e.key===`Escape`||e.key===`Enter`)&&Qe()}}):null]},e.id)},ft=h||A!==void 0?null:g.filter(e=>e.id===Te||T.nodes.has(e.id)).flatMap(e=>{let t=P(e),n=Jo/I,r=Xo(e,I);return ct.map(i=>{let a=Ao({left:t.left-n,top:t.top-n,width:t.width+2*n,height:t.height+2*n},i),o=i===`top`&&r!==void 0?{x:a.x,y:t.top-15/I-r}:a;return(0,Y.jsx)(`span`,{"data-connector":e.id,"data-side":i,"data-testid":`canvas-connector`,className:`bg-sheet border-pencil absolute rounded-full border`,style:{left:o.x,top:o.y,width:Yo/I,height:Yo/I,marginLeft:-5/I,marginTop:-5/I,borderWidth:1.5/I,cursor:`crosshair`}},`${e.id} ${i}`)})}),R=(()=>{let e=E.connect;if(!e)return;let t=v.get(e.from);if(!t)return;let n=P(t),r=e.over?v.get(e.over.id):void 0;return Po(Ao(n,e.side),e.side,r&&e.over?Ao($(r),e.over.side):e.to,e.over?.side)})(),pt=_.map(e=>{let t=ut(e);if(!t)return null;let n=T.edges.has(e.id),r=Ja(e.color)??`var(--color-lead)`,i=(n?2.5:1.75)/I;return(0,Y.jsxs)(`g`,{"data-edge":e.id,"data-testid":`canvas-edge`,children:[(0,Y.jsx)(`path`,{d:t.d,stroke:`transparent`,strokeWidth:14/I,fill:`none`,pointerEvents:`stroke`}),(0,Y.jsx)(`path`,{d:t.d,stroke:n?`var(--color-pencil)`:r,strokeWidth:i,fill:`none`,pointerEvents:`none`}),e.fromEnd===`arrow`?(0,Y.jsx)(`polygon`,{points:Fo(t.start,t.startDir,10/Math.max(I,.4)),fill:n?`var(--color-pencil)`:r,pointerEvents:`none`}):null,e.toEnd===`arrow`?(0,Y.jsx)(`polygon`,{points:Fo(t.end,t.endDir,10/Math.max(I,.4)),fill:n?`var(--color-pencil)`:r,pointerEvents:`none`}):null]},e.id)}),gt=_.map(e=>{let t=ut(e);if(!t)return null;let n=D?.type===`edge`&&D.id===e.id;return!n&&(e.label===void 0||e.label===``)?null:(0,Y.jsx)(`div`,{"data-edge":e.id,className:`absolute -translate-x-1/2 -translate-y-1/2`,style:{left:t.mid.x,top:t.mid.y,fontSize:13/Math.max(I,.5)},children:n?(0,Y.jsx)(`input`,{"data-canvas-own":``,"data-testid":`canvas-typing`,autoFocus:!0,value:D.text,"aria-label":s.label,className:`bg-sheet text-ink border-pencil w-40 rounded-sm border px-1.5 py-0.5 text-center outline-none`,onChange:e=>{O({...D,text:e.target.value})},onBlur:()=>{Qe()},onKeyDown:e=>{e.stopPropagation(),(e.key===`Escape`||e.key===`Enter`)&&Qe()}}):(0,Y.jsx)(`span`,{"data-testid":`canvas-edge-label`,className:`bg-paper text-ink rounded-sm px-1.5 py-0.5 whitespace-nowrap`,children:e.label})},e.id)}),vt=F&&!h&&F.id!==D?.id?Fe.map(e=>{let t=P(F),[n,r]=Me[e],i=9/I;return(0,Y.jsx)(`span`,{"data-handle":e,"data-testid":`canvas-handle`,className:`bg-sheet border-pencil absolute border`,style:{left:t.left+n*t.width-i/2,top:t.top+r*t.height-i/2,width:i,height:i,borderWidth:1.5/I,cursor:`${e===`n`||e===`s`?`ns`:e===`e`||e===`w`?`ew`:e===`ne`||e===`sw`?`nesw`:`nwse`}-resize`}},e)}):null,yt=Qo*I,bt=F,xt=!h,V=()=>{y.current?.focus()},St=(()=>{if(A!==void 0||D!==void 0)return;let e=Ze();if(e.length===0)return;let t=je(e),n=Eo(C,{x:t.left,y:t.top}),r={left:n.x,top:n.y,width:t.width*I,height:t.height*I};if(r.left>b.width||r.top>b.height||r.left+r.width<0||r.top+r.height<0)return;let i=Math.max(0,...g.filter(e=>T.nodes.has(e.id)&&e.y<=t.top).map(e=>Xo(e,I)??0));return{box:r,above:i>0?i*I+qo+Yo+4:0}})(),Ct=F&&(F.type===`file`||F.type===`link`)?F:void 0;return(0,Y.jsxs)(`div`,{className:`flex size-full min-h-0 flex-col`,"data-testid":`canvas-editor`,"data-state":`ready`,children:[(0,Y.jsx)(oe,{saved:{state:m.state}}),(0,Y.jsxs)(`div`,{className:`relative min-h-0 flex-1`,children:[i?(0,Y.jsx)(`div`,{className:`pointer-events-none absolute top-0 right-16 left-0 h-12`,children:(0,Y.jsx)(fe,{})}):null,(0,Y.jsxs)(se,{children:[(0,Y.jsx)(te,{asChild:!0,children:(0,Y.jsxs)(`div`,{ref:y,tabIndex:0,role:`application`,"aria-label":t,"data-testid":`canvas-surface`,"data-zoom":I,className:`bg-paper absolute inset-0 touch-none overflow-hidden outline-none select-none`,style:{backgroundImage:`radial-gradient(circle, var(--color-rule-strong) ${String(Math.max(.6,I))}px, transparent ${String(Math.max(.6,I)+.4)}px)`,backgroundSize:`${String(yt)}px ${String(yt)}px`,backgroundPosition:`${String(-C.x*I)}px ${String(-C.y*I)}px`,cursor:A===`pan`?`grabbing`:A===`move`?`move`:A===`connect`?`crosshair`:void 0},onPointerDown:et,onPointerMove:tt,onPointerUp:nt,onPointerCancel:nt,onPointerLeave:()=>{A===void 0&&Ee(void 0)},onDoubleClick:rt,onKeyDown:it,onKeyUp:at,onDragOver:e=>{h||e.preventDefault()},onDrop:ot,onContextMenu:e=>{let t=e.target.closest(`[data-node]`)?.dataset.node;t!==void 0&&!T.nodes.has(t)&&N({nodes:new Set([t]),edges:new Set})},children:[(0,Y.jsxs)(`div`,{className:`absolute top-0 left-0`,"data-testid":`canvas-world`,style:{transform:`translate(${String(-C.x*I)}px, ${String(-C.y*I)}px) scale(${String(I)})`,transformOrigin:`0 0`},children:[L.map(dt),(0,Y.jsx)(`svg`,{className:`pointer-events-none absolute top-0 left-0 overflow-visible`,width:1,height:1,children:(0,Y.jsx)(`g`,{className:`pointer-events-auto`,children:pt})}),lt.map(dt),R?(0,Y.jsx)(`svg`,{className:`pointer-events-none absolute top-0 left-0 overflow-visible`,width:1,height:1,children:(0,Y.jsx)(`path`,{d:R.d,stroke:`var(--color-pencil)`,strokeWidth:2/I,strokeDasharray:`${String(6/I)} ${String(4/I)}`,fill:`none`})}):null,gt,vt,ft,(E.guides??[]).map((e,t)=>(0,Y.jsx)(`span`,{className:`bg-pencil pointer-events-none absolute`,style:e.axis===`x`?{left:e.at,top:C.y-1e4,width:1/I,height:2e4+b.height/I}:{top:e.at,left:C.x-1e4,height:1/I,width:2e4+b.width/I}},t)),E.marquee?(0,Y.jsx)(`span`,{className:`border-pencil bg-pencil-wash pointer-events-none absolute border`,style:{left:E.marquee.left,top:E.marquee.top,width:E.marquee.width,height:E.marquee.height,borderWidth:1/I}}):null]}),w&&ve?(()=>{let e=$(ve);return(0,Y.jsx)(Ie,{"data-testid":`canvas-agent`,label:ge(w),style:{left:(e.left-C.x)*I,top:(e.top-C.y)*I,width:e.width*I,height:e.height*I}})})():null,g.length===0&&!h?(0,Y.jsx)(`p`,{className:`text-lead pointer-events-none absolute inset-x-0 top-1/2 text-center text-sm`,"data-testid":`canvas-empty`,children:s.empty}):null]})}),(0,Y.jsxs)(ue,{className:`w-52`,"data-testid":`canvas-menu`,children:[bt&&(bt.type===`file`||bt.type===`link`)?(0,Y.jsx)(ie,{onSelect:()=>{$e(bt)},children:s.open}):null,!h&&T.nodes.size>0?(0,Y.jsxs)(ie,{onSelect:Je,children:[s.group,(0,Y.jsx)(le,{children:es})]}):null,!h&&T.nodes.size+T.edges.size>0?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(ae,{}),(0,Y.jsxs)(ie,{variant:`destructive`,onSelect:qe,children:[s.delete,(0,Y.jsx)(le,{children:`⌫`})]})]}):null,!h&&T.nodes.size===0&&T.edges.size===0?(0,Y.jsx)(ie,{onSelect:()=>{We()},children:s.note}):null,(0,Y.jsx)(ce,{})]})]}),xt?(0,Y.jsx)(ho,{onNote:()=>{We()},onFile:e=>{Ge(e),V()},onLink:e=>{Ke(e),V()},groupable:T.nodes.size>0,onGroup:Je,project:p,self:t}):null,(0,Y.jsx)(go,{onZoom:e=>{Se(),Be(e),V()},history:xt?{canUndo:m.canUndo,canRedo:m.canRedo,onUndo:()=>{e.undo(),V()},onRedo:()=>{e.redo(),V()}}:void 0}),St?(0,Y.jsx)(bo,{markUp:st,box:St.box,above:St.above,view:b,color:Xe(),onColor:xt?Ye:void 0,onDelete:xt?()=>{qe(),V()}:void 0,open:Ct?{link:Ct.type===`link`,run:()=>{$e(Ct)}}:void 0,onZoomTo:()=>{Se(),Be(Ze()),V()}}):null]})]})}function ss({doc:e,path:t}){let n=(0,X.useSyncExternalStore)(t=>e.subscribe(t),()=>e.get()),{shown:r,updating:i}=de(n.unreadable?void 0:n.canvas);return r===void 0?(0,Y.jsxs)(`div`,{className:`flex size-full flex-col`,"data-testid":`canvas-editor`,"data-state":`updating`,children:[(0,Y.jsx)(oe,{saved:{state:n.state}}),(0,Y.jsx)(x,{className:`flex min-h-0 flex-1 items-center justify-center`})]}):(0,Y.jsx)(os,{doc:e,path:t,shown:r,updating:i})}function cs(){let e=Ka(),t=c(),n=a()?.item.entry,[r,i]=(0,X.useState)(),[o,s]=(0,X.useState)(!1);return(0,X.useEffect)(()=>{if(n===void 0)return;let e,r=!0;return Co.open(t,n).then(t=>{r?(e=t,i(t)):t.close()},e=>{reportError(e),r&&s(!0)}),()=>{r=!1,e?.close()}},[t,n]),o?(0,Y.jsx)(`div`,{className:`flex size-full`,"data-testid":`canvas-editor`,"data-state":`updating`,children:(0,Y.jsx)(x,{})}):!r||n===void 0?(0,Y.jsx)(`div`,{className:`text-lead flex size-full items-center justify-center text-sm`,"data-testid":`canvas-editor`,"data-state":`loading`,children:e.loading}):(0,Y.jsx)(ss,{doc:r,path:n})}export{Co as CanvasDocument,cs as CanvasEditor,cs as default,Ga as WORDS};
|