@excalidraw/common 0.18.0-c6f8ef9 → 0.18.0-cf212b2
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/dev/index.js +1751 -329
- package/dist/dev/index.js.map +4 -4
- package/dist/prod/index.js +3 -3
- package/dist/types/common/debug.d.ts +21 -0
- package/dist/types/common/src/appEventBus.d.ts +27 -0
- package/dist/types/common/src/bounds.d.ts +10 -0
- package/dist/types/common/src/colors.d.ts +69 -39
- package/dist/types/common/src/constants.d.ts +50 -34
- package/dist/types/common/src/editorInterface.d.ts +34 -0
- package/dist/types/common/src/font-metadata.d.ts +1 -3
- package/dist/types/common/src/index.d.ts +5 -0
- package/dist/types/common/src/keys.d.ts +3 -1
- package/dist/types/common/src/points.d.ts +1 -1
- package/dist/types/common/src/utility-types.d.ts +0 -1
- package/dist/types/common/src/utils.d.ts +48 -78
- package/dist/types/common/src/versionedSnapshotStore.d.ts +17 -0
- package/dist/types/element/src/Scene.d.ts +12 -8
- package/dist/types/element/src/align.d.ts +2 -2
- package/dist/types/element/src/arrowEndpointText.d.ts +49 -0
- package/dist/types/element/src/arrowheads.d.ts +3 -0
- package/dist/types/element/src/arrows/focus.d.ts +30 -0
- package/dist/types/element/src/arrows/helpers.d.ts +5 -0
- package/dist/types/element/src/binding.d.ts +79 -51
- package/dist/types/element/src/bounds.d.ts +26 -19
- package/dist/types/element/src/bucketFill.d.ts +110 -0
- package/dist/types/element/src/collision.d.ts +7 -2
- package/dist/types/element/src/comparisons.d.ts +8 -7
- package/dist/types/element/src/convertToShape.d.ts +23 -0
- package/dist/types/element/src/delta.d.ts +0 -1
- package/dist/types/element/src/distribute.d.ts +3 -2
- package/dist/types/element/src/dragElements.d.ts +30 -3
- package/dist/types/element/src/duplicate.d.ts +7 -6
- package/dist/types/element/src/elbowArrow.d.ts +2 -0
- package/dist/types/element/src/embeddable.d.ts +2 -2
- package/dist/types/element/src/flowchart.d.ts +7 -7
- package/dist/types/element/src/fractionalIndex.d.ts +4 -4
- package/dist/types/element/src/frame.d.ts +16 -11
- package/dist/types/element/src/groups.d.ts +9 -9
- package/dist/types/element/src/heading.d.ts +2 -1
- package/dist/types/element/src/image.d.ts +1 -11
- package/dist/types/element/src/index.d.ts +9 -4
- package/dist/types/element/src/linearElementEditor.d.ts +38 -30
- package/dist/types/element/src/mutateElement.d.ts +5 -1
- package/dist/types/element/src/newElement.d.ts +20 -6
- package/dist/types/element/src/positionElementsOnGrid.d.ts +2 -0
- package/dist/types/element/src/renderElement.d.ts +4 -10
- package/dist/types/element/src/resizeElements.d.ts +12 -12
- package/dist/types/element/src/resizeTest.d.ts +6 -5
- package/dist/types/element/src/selection.d.ts +14 -14
- package/dist/types/element/src/shape.d.ts +21 -8
- package/dist/types/element/src/sortElements.d.ts +10 -0
- package/dist/types/element/src/textElement.d.ts +14 -11
- package/dist/types/element/src/textMeasurements.d.ts +1 -3
- package/dist/types/element/src/textWrapping.d.ts +26 -0
- package/dist/types/{excalidraw/data → element/src}/transform.d.ts +3 -3
- package/dist/types/element/src/transformHandles.d.ts +8 -27
- package/dist/types/element/src/typeChecks.d.ts +29 -31
- package/dist/types/element/src/types.d.ts +20 -14
- package/dist/types/element/src/utils.d.ts +9 -4
- package/dist/types/element/src/zindex.d.ts +7 -1
- package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +191 -219
- package/dist/types/excalidraw/actions/actionAlign.d.ts +12 -13
- package/dist/types/excalidraw/actions/actionBoundText.d.ts +112 -131
- package/dist/types/excalidraw/actions/actionCanvas.d.ts +447 -1599
- package/dist/types/excalidraw/actions/actionClipboard.d.ts +139 -899
- package/dist/types/excalidraw/actions/actionCropEditor.d.ts +54 -64
- package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +180 -211
- package/dist/types/excalidraw/actions/actionDeselect.d.ts +160 -0
- package/dist/types/excalidraw/actions/actionDistribute.d.ts +4 -6
- package/dist/types/excalidraw/actions/actionDuplicateSelection.d.ts +3 -4
- package/dist/types/excalidraw/actions/actionElementLink.d.ts +61 -77
- package/dist/types/excalidraw/actions/actionElementLock.d.ts +111 -130
- package/dist/types/excalidraw/actions/actionExport.d.ts +189 -1413
- package/dist/types/excalidraw/actions/actionFinalize.d.ts +10 -394
- package/dist/types/excalidraw/actions/actionFlip.d.ts +2 -3
- package/dist/types/excalidraw/actions/actionFrame.d.ts +292 -543
- package/dist/types/excalidraw/actions/actionGroup.d.ts +122 -149
- package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +193 -239
- package/dist/types/excalidraw/actions/actionLink.d.ts +67 -77
- package/dist/types/excalidraw/actions/actionMenu.d.ts +56 -438
- package/dist/types/excalidraw/actions/actionNavigate.d.ts +18 -359
- package/dist/types/excalidraw/actions/actionProperties.d.ts +194 -2531
- package/dist/types/excalidraw/actions/actionSelectAll.d.ts +61 -75
- package/dist/types/excalidraw/actions/actionStyles.d.ts +54 -63
- package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +4 -4
- package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +176 -0
- package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +69 -80
- package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +176 -0
- package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +68 -78
- package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +57 -74
- package/dist/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +2 -2
- package/dist/types/excalidraw/actions/actionToggleStats.d.ts +67 -77
- package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +68 -78
- package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +68 -78
- package/dist/types/excalidraw/actions/actionZindex.d.ts +8 -9
- package/dist/types/excalidraw/actions/index.d.ts +5 -3
- package/dist/types/excalidraw/actions/manager.d.ts +1 -0
- package/dist/types/excalidraw/actions/register.d.ts +2 -2
- package/dist/types/excalidraw/actions/shortcuts.d.ts +1 -1
- package/dist/types/excalidraw/actions/types.d.ts +11 -7
- package/dist/types/excalidraw/{animated-trail.d.ts → animatedTrail.d.ts} +4 -3
- package/dist/types/excalidraw/appState.d.ts +46 -37
- package/dist/types/excalidraw/charts/charts.bar.d.ts +2 -0
- package/dist/types/excalidraw/charts/charts.constants.d.ts +48 -0
- package/dist/types/excalidraw/charts/charts.helpers.d.ts +32 -0
- package/dist/types/excalidraw/charts/charts.line.d.ts +2 -0
- package/dist/types/excalidraw/charts/charts.parse.d.ts +10 -0
- package/dist/types/excalidraw/charts/charts.radar.d.ts +2 -0
- package/dist/types/excalidraw/charts/charts.types.d.ts +18 -0
- package/dist/types/excalidraw/charts/index.d.ts +7 -0
- package/dist/types/excalidraw/clipboard.d.ts +59 -21
- package/dist/types/excalidraw/components/Actions.d.ts +33 -11
- package/dist/types/excalidraw/components/ActiveConfirmDialog.d.ts +1 -1
- package/dist/types/excalidraw/components/App.arrowText.d.ts +72 -0
- package/dist/types/excalidraw/components/App.bucketFill.d.ts +48 -0
- package/dist/types/excalidraw/components/App.cursor.d.ts +30 -0
- package/dist/types/excalidraw/components/App.d.ts +461 -123
- package/dist/types/excalidraw/components/App.drawshape.d.ts +55 -0
- package/dist/types/excalidraw/components/App.flowchart.d.ts +21 -0
- package/dist/types/excalidraw/components/App.viewport.d.ts +73 -0
- package/dist/types/excalidraw/components/AppStateObserver.d.ts +37 -0
- package/dist/types/excalidraw/components/Card.d.ts +1 -3
- package/dist/types/excalidraw/components/ColorPicker/ColorInput.d.ts +2 -4
- package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +5 -4
- package/dist/types/excalidraw/components/ColorPicker/Picker.d.ts +3 -0
- package/dist/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +7 -1
- package/dist/types/excalidraw/components/ColorPicker/ShadeList.d.ts +2 -1
- package/dist/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +1 -2
- package/dist/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +2 -2
- package/dist/types/excalidraw/components/CommandPalette/CommandPalette.d.ts +1 -0
- package/dist/types/excalidraw/components/CommandPalette/defaultCommandPaletteItems.d.ts +1 -2
- package/dist/types/excalidraw/components/CommandPalette/types.d.ts +2 -4
- package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +4 -4
- package/dist/types/excalidraw/components/CursorHint.d.ts +46 -0
- package/dist/types/excalidraw/components/DarkModeToggle.d.ts +1 -1
- package/dist/types/excalidraw/components/DefaultSidebar.d.ts +9 -13
- package/dist/types/excalidraw/components/ElementLinkDialog.d.ts +1 -1
- package/dist/types/excalidraw/components/Ellipsify.d.ts +1 -2
- package/dist/types/excalidraw/components/ErrorDialog.d.ts +1 -1
- package/dist/types/excalidraw/components/EyeDropper.d.ts +1 -2
- package/dist/types/excalidraw/components/FilledButton.d.ts +2 -1
- package/dist/types/excalidraw/components/FontPicker/FontPicker.d.ts +2 -1
- package/dist/types/excalidraw/components/FontPicker/FontPickerTrigger.d.ts +3 -1
- package/dist/types/excalidraw/components/FontPicker/keyboardNavHandlers.d.ts +0 -1
- package/dist/types/excalidraw/components/HelpDialog.d.ts +1 -1
- package/dist/types/excalidraw/components/HintViewer.d.ts +4 -3
- package/dist/types/excalidraw/components/{ToolButton.d.ts → IconButton.d.ts} +16 -19
- package/dist/types/excalidraw/components/IconPicker.d.ts +14 -9
- package/dist/types/excalidraw/components/InlineIcon.d.ts +3 -1
- package/dist/types/excalidraw/components/Island.d.ts +7 -0
- package/dist/types/excalidraw/components/LaserPointerButton.d.ts +2 -4
- package/dist/types/excalidraw/components/LayerUI.d.ts +6 -2
- package/dist/types/excalidraw/components/LibraryMenu.d.ts +1 -1
- package/dist/types/excalidraw/components/LibraryMenuControlButtons.d.ts +1 -1
- package/dist/types/excalidraw/components/LibraryMenuHeaderContent.d.ts +1 -2
- package/dist/types/excalidraw/components/LibraryMenuSection.d.ts +1 -1
- package/dist/types/excalidraw/components/LibraryUnit.d.ts +2 -3
- package/dist/types/excalidraw/components/LoadingMessage.d.ts +0 -1
- package/dist/types/excalidraw/components/LockButton.d.ts +3 -4
- package/dist/types/excalidraw/components/MagicButton.d.ts +0 -2
- package/dist/types/excalidraw/components/MobileMenu.d.ts +5 -7
- package/dist/types/excalidraw/components/MobileToolbar.d.ts +9 -0
- package/dist/types/excalidraw/components/Modal.d.ts +0 -1
- package/dist/types/excalidraw/components/OverwriteConfirm/OverwriteConfirm.d.ts +1 -1
- package/dist/types/excalidraw/components/OverwriteConfirm/OverwriteConfirmState.d.ts +1 -1
- package/dist/types/excalidraw/components/PasteChartDialog.d.ts +4 -5
- package/dist/types/excalidraw/components/PenModeButton.d.ts +2 -5
- package/dist/types/excalidraw/components/Popover.d.ts +2 -3
- package/dist/types/excalidraw/components/PropertiesPopover.d.ts +2 -1
- package/dist/types/excalidraw/components/{ButtonIcon.d.ts → RadioButton.d.ts} +2 -5
- package/dist/types/excalidraw/components/RadioGroup.d.ts +0 -1
- package/dist/types/excalidraw/components/RadioSelection.d.ts +4 -4
- package/dist/types/excalidraw/components/Range.d.ts +10 -4
- package/dist/types/excalidraw/components/SVGLayer.d.ts +1 -1
- package/dist/types/excalidraw/components/ScrollableList.d.ts +0 -1
- package/dist/types/excalidraw/components/SearchMenu.d.ts +1 -1
- package/dist/types/excalidraw/components/Sidebar/Sidebar.d.ts +16 -22
- package/dist/types/excalidraw/components/Sidebar/SidebarHeader.d.ts +1 -1
- package/dist/types/excalidraw/components/Sidebar/SidebarTab.d.ts +1 -2
- package/dist/types/excalidraw/components/Sidebar/SidebarTabTrigger.d.ts +1 -2
- package/dist/types/excalidraw/components/Sidebar/SidebarTabTriggers.d.ts +1 -2
- package/dist/types/excalidraw/components/Sidebar/SidebarTabs.d.ts +1 -2
- package/dist/types/excalidraw/components/Spinner.d.ts +4 -4
- package/dist/types/excalidraw/components/Stats/Angle.d.ts +2 -2
- package/dist/types/excalidraw/components/Stats/CanvasGrid.d.ts +0 -1
- package/dist/types/excalidraw/components/Stats/Collapsible.d.ts +0 -1
- package/dist/types/excalidraw/components/Stats/Dimension.d.ts +2 -2
- package/dist/types/excalidraw/components/Stats/DragInput.d.ts +2 -3
- package/dist/types/excalidraw/components/Stats/MultiAngle.d.ts +2 -2
- package/dist/types/excalidraw/components/Stats/MultiDimension.d.ts +2 -2
- package/dist/types/excalidraw/components/Stats/MultiPosition.d.ts +2 -2
- package/dist/types/excalidraw/components/Stats/Position.d.ts +3 -3
- package/dist/types/excalidraw/components/Stats/index.d.ts +7 -8
- package/dist/types/excalidraw/components/Stats/utils.d.ts +1 -1
- package/dist/types/excalidraw/components/TTDDialog/Chat/ChatHistoryMenu.d.ts +15 -0
- package/dist/types/excalidraw/components/TTDDialog/Chat/ChatInterface.d.ts +23 -0
- package/dist/types/excalidraw/components/TTDDialog/Chat/ChatMessage.d.ts +14 -0
- package/dist/types/excalidraw/components/TTDDialog/Chat/TTDChatPanel.d.ts +27 -0
- package/dist/types/excalidraw/components/TTDDialog/Chat/index.d.ts +3 -0
- package/dist/types/excalidraw/components/TTDDialog/Chat/useChatAgent.d.ts +8 -0
- package/dist/types/excalidraw/components/TTDDialog/CodeMirrorEditor.d.ts +11 -0
- package/dist/types/excalidraw/components/TTDDialog/MermaidToExcalidraw.d.ts +3 -2
- package/dist/types/excalidraw/components/TTDDialog/TTDContext.d.ts +13 -0
- package/dist/types/excalidraw/components/TTDDialog/TTDDialog.d.ts +12 -29
- package/dist/types/excalidraw/components/TTDDialog/TTDDialogInput.d.ts +3 -3
- package/dist/types/excalidraw/components/TTDDialog/TTDDialogOutput.d.ts +5 -2
- package/dist/types/excalidraw/components/TTDDialog/TTDDialogPanel.d.ts +13 -9
- package/dist/types/excalidraw/components/TTDDialog/TTDDialogTab.d.ts +1 -2
- package/dist/types/excalidraw/components/TTDDialog/TTDDialogTabTrigger.d.ts +1 -2
- package/dist/types/excalidraw/components/TTDDialog/TTDDialogTabTriggers.d.ts +1 -2
- package/dist/types/excalidraw/components/TTDDialog/TTDPreviewPanel.d.ts +9 -0
- package/dist/types/excalidraw/components/TTDDialog/TTDWelcomeMessage.d.ts +1 -0
- package/dist/types/excalidraw/components/TTDDialog/TextToDiagram.d.ts +9 -0
- package/dist/types/excalidraw/components/TTDDialog/common.d.ts +16 -16
- package/dist/types/excalidraw/components/TTDDialog/hooks/useChatManagement.d.ts +13 -0
- package/dist/types/excalidraw/components/TTDDialog/hooks/useMermaidRenderer.d.ts +14 -0
- package/dist/types/excalidraw/components/TTDDialog/hooks/useTextGeneration.d.ts +7 -0
- package/dist/types/excalidraw/components/TTDDialog/mermaid-lang-lite.d.ts +2 -0
- package/dist/types/excalidraw/components/TTDDialog/types.d.ts +95 -0
- package/dist/types/excalidraw/components/TTDDialog/useTTDChatStorage.d.ts +22 -0
- package/dist/types/excalidraw/components/TTDDialog/utils/chat.d.ts +10 -0
- package/dist/types/excalidraw/components/TTDDialog/utils/mermaidAutoFix.d.ts +1 -0
- package/dist/types/excalidraw/components/TTDDialog/utils/mermaidError.d.ts +10 -0
- package/dist/types/excalidraw/components/TTDDialog/utils/mermaidValidation.d.ts +1 -0
- package/dist/types/excalidraw/components/TextField.d.ts +1 -0
- package/dist/types/excalidraw/components/Toast.d.ts +11 -7
- package/dist/types/excalidraw/components/ToolPopover.d.ts +22 -0
- package/dist/types/excalidraw/components/Toolbar.d.ts +11 -0
- package/dist/types/excalidraw/components/Tools.d.ts +146 -0
- package/dist/types/excalidraw/components/Trans.d.ts +2 -2
- package/dist/types/excalidraw/components/UserList.d.ts +3 -2
- package/dist/types/excalidraw/components/ViewportStatusFrame/ViewportStatusFrame.d.ts +11 -0
- package/dist/types/excalidraw/components/canvases/InteractiveCanvas.d.ts +10 -4
- package/dist/types/excalidraw/components/canvases/NewElementCanvas.d.ts +1 -0
- package/dist/types/excalidraw/components/canvases/StaticCanvas.d.ts +1 -1
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +47 -35
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuContent.d.ts +7 -5
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuGroup.d.ts +3 -3
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItem.d.ts +13 -22
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemCheckbox.d.ts +5 -0
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContent.d.ts +5 -4
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContentRadio.d.ts +2 -2
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemCustom.d.ts +2 -2
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemLink.d.ts +6 -6
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSub.d.ts +23 -0
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubContent.d.ts +8 -0
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuSubTrigger.d.ts +12 -0
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuTrigger.d.ts +3 -4
- package/dist/types/excalidraw/components/dropdownMenu/common.d.ts +2 -2
- package/dist/types/excalidraw/components/dropdownMenu/dropdownMenuUtils.d.ts +2 -0
- package/dist/types/excalidraw/components/footer/Footer.d.ts +3 -1
- package/dist/types/excalidraw/components/hoc/withInternalFallback.d.ts +1 -1
- package/dist/types/excalidraw/components/hyperlink/helpers.d.ts +3 -3
- package/dist/types/excalidraw/components/icons.d.ts +55 -22
- package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +24 -3
- package/dist/types/excalidraw/components/main-menu/MainMenu.d.ts +39 -35
- package/dist/types/excalidraw/components/positionElementBesideCursor.d.ts +26 -0
- package/dist/types/excalidraw/components/shapeActionPredicates.d.ts +39 -0
- package/dist/types/excalidraw/data/blob.d.ts +335 -12
- package/dist/types/excalidraw/data/encode.d.ts +4 -4
- package/dist/types/excalidraw/data/encryption.d.ts +5 -5
- package/dist/types/excalidraw/data/filesystem.d.ts +5 -7
- package/dist/types/excalidraw/data/index.d.ts +8 -9
- package/dist/types/excalidraw/data/json.d.ts +173 -3
- package/dist/types/excalidraw/data/library.d.ts +25 -10
- package/dist/types/excalidraw/data/resave.d.ts +7 -2
- package/dist/types/excalidraw/data/restore.d.ts +25 -10
- package/dist/types/excalidraw/data/types.d.ts +4 -1
- package/dist/types/excalidraw/drawShapeTrail.d.ts +16 -0
- package/dist/types/excalidraw/editor-jotai.d.ts +11 -11
- package/dist/types/excalidraw/eraser/index.d.ts +2 -3
- package/dist/types/excalidraw/errors.d.ts +14 -0
- package/dist/types/excalidraw/hooks/useAppStateValue.d.ts +29 -0
- package/dist/types/excalidraw/hooks/useLibraryItemSvg.d.ts +2 -2
- package/dist/types/excalidraw/hooks/useOutsideClick.d.ts +4 -3
- package/dist/types/excalidraw/hooks/useScrollPosition.d.ts +1 -2
- package/dist/types/excalidraw/hooks/useTextEditorFocus.d.ts +14 -0
- package/dist/types/excalidraw/i18n.d.ts +2 -2
- package/dist/types/excalidraw/{laser-trails.d.ts → laserTrails.d.ts} +5 -7
- package/dist/types/excalidraw/lasso/index.d.ts +2 -3
- package/dist/types/excalidraw/renderer/animation.d.ts +16 -0
- package/dist/types/excalidraw/renderer/helpers.d.ts +6 -8
- package/dist/types/excalidraw/renderer/interactiveScene.d.ts +7 -15
- package/dist/types/excalidraw/scene/Renderer.d.ts +428 -18
- package/dist/types/excalidraw/scene/export.d.ts +4 -4
- package/dist/types/excalidraw/scene/index.d.ts +2 -2
- package/dist/types/excalidraw/scene/types.d.ts +26 -8
- package/dist/types/excalidraw/shortcut.d.ts +1 -0
- package/dist/types/excalidraw/snapping.d.ts +12 -12
- package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-bindings.d.ts +1 -1
- package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-loader.d.ts +1 -1
- package/dist/types/excalidraw/subset/harfbuzz/harfbuzz-wasm.d.ts +1 -1
- package/dist/types/excalidraw/subset/woff2/woff2-loader.d.ts +2 -2
- package/dist/types/excalidraw/subset/woff2/woff2-wasm.d.ts +1 -1
- package/dist/types/excalidraw/textAutoResizeHandle.d.ts +15 -0
- package/dist/types/excalidraw/types.d.ts +523 -54
- package/dist/types/excalidraw/viewport.d.ts +270 -0
- package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +8 -5
- package/dist/types/fractional-indexing/src/index.d.ts +29 -0
- package/dist/types/laser-pointer/src/index.d.ts +2 -0
- package/dist/types/laser-pointer/src/math.d.ts +16 -0
- package/dist/types/laser-pointer/src/simplify.d.ts +2 -0
- package/dist/types/laser-pointer/src/state.d.ts +36 -0
- package/dist/types/math/src/constants.d.ts +0 -1
- package/dist/types/math/src/curve.d.ts +4 -1
- package/dist/types/math/src/index.d.ts +1 -0
- package/dist/types/math/src/pca.d.ts +79 -0
- package/dist/types/math/src/point.d.ts +8 -2
- package/dist/types/math/src/polygon.d.ts +26 -2
- package/dist/types/math/src/range.d.ts +1 -3
- package/dist/types/math/src/segment.d.ts +4 -3
- package/dist/types/math/src/types.d.ts +25 -1
- package/dist/types/utils/src/export.d.ts +8 -8
- package/dist/types/utils/src/index.d.ts +1 -2
- package/dist/types/utils/src/shape.d.ts +6 -6
- package/package.json +7 -1
- package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +0 -185
- package/dist/types/excalidraw/animation-frame-handler.d.ts +0 -16
- package/dist/types/excalidraw/charts.d.ts +0 -27
- package/dist/types/excalidraw/components/DiagramToCodePlugin/DiagramToCodePlugin.d.ts +0 -4
- package/dist/types/excalidraw/components/ExcalidrawLogo.d.ts +0 -16
- package/dist/types/excalidraw/components/FollowMode/FollowMode.d.ts +0 -10
- package/dist/types/excalidraw/components/HandButton.d.ts +0 -10
- package/dist/types/excalidraw/components/InitializeApp.d.ts +0 -10
- package/dist/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +0 -9
- package/dist/types/excalidraw/components/footer/FooterCenter.d.ts +0 -8
- package/dist/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +0 -10
- package/dist/types/excalidraw/components/shapes.d.ts +0 -62
- package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Center.d.ts +0 -58
- package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.Hints.d.ts +0 -19
- package/dist/types/excalidraw/components/welcome-screen/WelcomeScreen.d.ts +0 -85
- package/dist/types/excalidraw/cursor.d.ts +0 -5
- package/dist/types/excalidraw/data/reconcile.d.ts +0 -7
- package/dist/types/excalidraw/index.d.ts +0 -47
- package/dist/types/excalidraw/polyfill.d.ts +0 -2
- package/dist/types/excalidraw/scene/scroll.d.ts +0 -23
- package/dist/types/excalidraw/scene/zoom.d.ts +0 -12
- package/dist/types/utils/src/bbox.d.ts +0 -9
- package/dist/types/utils/src/withinBounds.d.ts +0 -19
package/dist/prod/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var he=Object.create;var Y=Object.defineProperty;var ye=Object.getOwnPropertyDescriptor;var ge=Object.getOwnPropertyNames;var Le=Object.getPrototypeOf,Se=Object.prototype.hasOwnProperty;var Re=(e,t)=>()=>(e&&(t=e(e=0)),t);var V=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Oe=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of ge(t))!Se.call(e,s)&&s!==n&&Y(e,s,{get:()=>t[s],enumerable:!(r=ye(t,s))||r.enumerable});return e};var X=(e,t,n)=>(n=e!=null?he(Le(e)):{},Oe(t||!e||!e.__esModule?Y(n,"default",{value:e,enumerable:!0}):n,e));var f,c=Re(()=>{f={PROD:!0}});var le=V((G,ae)=>{c();(function(e,t){typeof define=="function"&&define.amd?define([],t):typeof G=="object"?ae.exports=t():(e.PromisePool=t(),e.promisePool=e.PromisePool)})(G,function(){"use strict";var e=function(){this._listeners={}};e.prototype.addEventListener=function(o,a){this._listeners[o]=this._listeners[o]||[],this._listeners[o].indexOf(a)<0&&this._listeners[o].push(a)},e.prototype.removeEventListener=function(o,a){if(this._listeners[o]){var p=this._listeners[o].indexOf(a);p>=0&&this._listeners[o].splice(p,1)}},e.prototype.dispatchEvent=function(o){if(this._listeners[o.type]&&this._listeners[o.type].length)for(var a=this._listeners[o.type].slice(),p=0,m=a.length;p<m;++p)a[p].call(this,o)};var t=function(o){return typeof o.constructor=="function"&&o.constructor.name==="GeneratorFunction"},n=function(o){return{next:function(){var a=o();return a?{value:a}:{done:!0}}}},r=function(o){var a=!1;return{next:function(){return a?{done:!0}:(a=!0,{value:o})}}},s=function(o,a){var p=typeof o;if(p==="object"){if(typeof o.next=="function")return o;if(typeof o.then=="function")return r(o)}return p==="function"?t(o)?o():n(o):r(a.resolve(o))},l=function(o,a,p){this.target=o,this.type=a,this.data=p},i=function(o,a,p){if(e.call(this),typeof a!="number"||Math.floor(a)!==a||a<1)throw new Error("Invalid concurrency");this._concurrency=a,this._options=p||{},this._options.promise=this._options.promise||Promise,this._iterator=s(o,this._options.promise),this._done=!1,this._size=0,this._promise=null,this._callbacks=null};return i.prototype=new e,i.prototype.constructor=i,i.prototype.concurrency=function(o){return typeof o<"u"&&(this._concurrency=o,this.active()&&this._proceed()),this._concurrency},i.prototype.size=function(){return this._size},i.prototype.active=function(){return!!this._promise},i.prototype.promise=function(){return this._promise},i.prototype.start=function(){var o=this,a=this._options.promise;return this._promise=new a(function(p,m){o._callbacks={reject:m,resolve:p},o._proceed()}),this._promise},i.prototype._fireEvent=function(o,a){this.dispatchEvent(new l(this,o,a))},i.prototype._settle=function(o){o?this._callbacks.reject(o):this._callbacks.resolve(),this._promise=null,this._callbacks=null},i.prototype._onPooledPromiseFulfilled=function(o,a){this._size--,this.active()&&(this._fireEvent("fulfilled",{promise:o,result:a}),this._proceed())},i.prototype._onPooledPromiseRejected=function(o,a){this._size--,this.active()&&(this._fireEvent("rejected",{promise:o,error:a}),this._settle(a||new Error("Unknown error")))},i.prototype._trackPromise=function(o){var a=this;o.then(function(p){a._onPooledPromiseFulfilled(o,p)},function(p){a._onPooledPromiseRejected(o,p)}).catch(function(p){a._settle(new Error("Promise processing failed: "+p))})},i.prototype._proceed=function(){if(!this._done){for(var o={done:!1};this._size<this._concurrency&&!(o=this._iterator.next()).done;)this._size++,this._trackPromise(o.value);this._done=o===null||!!o.done}this._done&&this._size===0&&this._settle()},i.PromisePoolEvent=l,i.PromisePool=i,i})});var be=V(U=>{"use strict";c();Object.defineProperty(U,"__esModule",{value:!0});U.sanitizeUrl=void 0;var tt=/^([^\w]*)(javascript|data|vbscript)/im,nt=/&#(\w+)(^\w|;)?/g,rt=/&(newline|tab);/gi,ot=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,st=/^.+(:|:)/gim,it=[".","/"];function at(e){return it.indexOf(e[0])>-1}function lt(e){return e.replace(nt,function(t,n){return String.fromCharCode(n)})}function ct(e){var t=lt(e||"").replace(rt,"").replace(ot,"").trim();if(!t)return"about:blank";if(at(t))return t;var n=t.match(st);if(!n)return t;var r=n[0];return tt.test(r)?"about:blank":t}U.sanitizeUrl=ct});c();c();var $=class{constructor(t){this.scoreFunction=t}content=[];sinkDown(t){let n=this.content[t];for(;t>0;){let r=(t+1>>1)-1,s=this.content[r];if(this.scoreFunction(n)<this.scoreFunction(s))this.content[r]=n,this.content[t]=s,t=r;else break}}bubbleUp(t){let n=this.content.length,r=this.content[t],s=this.scoreFunction(r);for(;;){let l=t+1<<1,i=l-1,o=null,a=0;if(i<n){let p=this.content[i];a=this.scoreFunction(p),a<s&&(o=i)}if(l<n){let p=this.content[l];this.scoreFunction(p)<(o===null?s:a)&&(o=l)}if(o!==null)this.content[t]=this.content[o],this.content[o]=r,t=o;else break}}push(t){this.content.push(t),this.sinkDown(this.content.length-1)}pop(){if(this.content.length===0)return null;let t=this.content[0],n=this.content.pop();return this.content.length>0&&(this.content[0]=n,this.bubbleUp(0)),t}remove(t){if(this.content.length===0)return;let n=this.content.indexOf(t),r=this.content.pop();n<this.content.length&&(this.content[n]=r,this.scoreFunction(r)<this.scoreFunction(t)?this.sinkDown(n):this.bubbleUp(n))}size(){return this.content.length}rescoreElement(t){this.sinkDown(this.content.indexOf(t))}};c();var z={white:"#ffffff",black:"#000000",gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],teal:["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],green:["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],lime:["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],orange:["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]};var xt=240,Fe=(e,t)=>t.reduce((n,r)=>(r in e&&(n[r]=e[r]),n),{}),bt=5,_t=5,At=4,C=4,F=1,E=[0,2,4,6,8],ht=[0,1,2,3,4],x=(e,t)=>t.map(n=>z[e][n]),u={transparent:"transparent",black:"#1e1e1e",white:"#ffffff",gray:x("gray",E),red:x("red",E),pink:x("pink",E),grape:x("grape",E),violet:x("violet",E),blue:x("blue",E),cyan:x("cyan",E),teal:x("teal",E),green:x("green",E),yellow:x("yellow",E),orange:x("orange",E),bronze:["#f8f1ee","#eaddd7","#d2bab0","#a18072","#846358"]},j=Fe(u,["cyan","blue","violet","grape","pink","green","teal","yellow","orange","red"]),yt=[u.black,u.red[C],u.green[C],u.blue[C],u.yellow[C]],gt=[u.transparent,u.red[F],u.green[F],u.blue[F],u.yellow[F]],Lt=[u.white,"#f8f9fa","#f5faff","#fffce8","#fdf8f6"],St={transparent:u.transparent,white:u.white,gray:u.gray,black:u.black,bronze:u.bronze,...j},Rt={transparent:u.transparent,white:u.white,gray:u.gray,black:u.black,bronze:u.bronze,...j},Ot=e=>[u.cyan[e],u.blue[e],u.violet[e],u.grape[e],u.pink[e],u.green[e],u.teal[e],u.yellow[e],u.orange[e],u.red[e]],vt=(e,t,n)=>`#${((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)}`;c();var w=/Mac|iPod|iPhone|iPad/.test(navigator.platform),It=/^Win/.test(navigator.platform),Mt=/\b(android)\b/i.test(navigator.userAgent),Pt=typeof window<"u"&&"netscape"in window&&navigator.userAgent.indexOf("rv:")>1&&navigator.userAgent.indexOf("Gecko")>1,we=navigator.userAgent.indexOf("Chrome")!==-1,Dt=!we&&navigator.userAgent.indexOf("Safari")!==-1,Ut=/iPad|iPhone/.test(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document,Nt=()=>navigator.brave?.isBrave?.name==="isBrave",kt=typeof window<"u"&&"ResizeObserver"in window,Ht="Excalidraw",Kt=36,Bt=10,Gt=20,Wt=8,Yt=5,Vt=1,Xt=30,$t=Math.PI/12,zt="red",jt={TEXT:"text",CROSSHAIR:"crosshair",GRABBING:"grabbing",GRAB:"grab",POINTER:"pointer",MOVE:"move",AUTO:""},Zt={MAIN:0,WHEEL:1,SECONDARY:2,TOUCH:-1,ERASER:5},qt={enabled:"all",disabled:"none",inheritFromUI:"var(--ui-pointerEvents)"},Ie=(d=>(d.COPY="copy",d.PASTE="paste",d.CUT="cut",d.KEYDOWN="keydown",d.KEYUP="keyup",d.MOUSE_MOVE="mousemove",d.RESIZE="resize",d.UNLOAD="unload",d.FOCUS="focus",d.BLUR="blur",d.DRAG_OVER="dragover",d.DROP="drop",d.GESTURE_END="gestureend",d.BEFORE_UNLOAD="beforeunload",d.GESTURE_START="gesturestart",d.GESTURE_CHANGE="gesturechange",d.POINTER_MOVE="pointermove",d.POINTER_DOWN="pointerdown",d.POINTER_UP="pointerup",d.STATE_CHANGE="statechange",d.WHEEL="wheel",d.TOUCH_START="touchstart",d.TOUCH_END="touchend",d.HASHCHANGE="hashchange",d.VISIBILITY_CHANGE="visibilitychange",d.SCROLL="scroll",d.EXCALIDRAW_LINK="excalidraw-link",d.MENU_ITEM_SELECT="menu.itemSelect",d.MESSAGE="message",d.FULLSCREENCHANGE="fullscreenchange",d))(Ie||{}),Qt={UNSTARTED:-1,ENDED:0,PLAYING:1,PAUSED:2,BUFFERING:3,CUED:5},I={TEST:"test",DEVELOPMENT:"development",PRODUCTION:"production"},Jt={SHAPE_ACTIONS_MENU:"App-menu__left",ZOOM_ACTIONS:"zoom-actions",SEARCH_MENU_INPUT_WRAPPER:"layer-ui__search-inputWrapper",CONVERT_ELEMENT_TYPE_POPUP:"ConvertElementTypePopup"},q="Xiaolai",L="Segoe UI Emoji",T={Virgil:1,Helvetica:2,Cascadia:3,Excalifont:5,Nunito:6,"Lilita One":7,"Comic Shanns":8,"Liberation Sans":9,Assistant:10},Q="sans-serif",J="monospace",Me={[Q]:998,[J]:999},B={[q]:100,...Me,[L]:1e3};function Pe(e){switch(e){case T.Cascadia:case T["Comic Shanns"]:return J;default:return Q}}var ee=e=>{let t=Pe(e);switch(e){case T.Excalifont:return[q,t,L];default:return[t,L]}},en={LIGHT:"light",DARK:"dark"},tn={strokeColor:"#bbb",strokeWidth:2,strokeStyle:"solid",fillStyle:"solid",roughness:0,roundness:null,backgroundColor:"transparent",radius:8,nameOffsetY:3,nameColorLightTheme:"#999999",nameColorDarkTheme:"#7a7a7a",nameFontSize:14,nameLineHeight:1.25},nn=1,rn=20,on=T.Excalifont,sn="left",an="top",te="{version}",De=2,Ue=2*De,Ne=1e-5,ln=2*Ue-Ne,cn="#ffffff",un="#1e1e1e",pn="#a2f1a6",dn=["selectAll"],fn=20,Tn=5,ne={svg:"image/svg+xml",png:"image/png",jpg:"image/jpeg",gif:"image/gif",webp:"image/webp",bmp:"image/bmp",ico:"image/x-icon",avif:"image/avif",jfif:"image/jfif"},Z={text:"text/plain",html:"text/html",json:"application/json",excalidraw:"application/vnd.excalidraw+json",excalidrawlib:"application/vnd.excalidrawlib+json","excalidraw.svg":"image/svg+xml","excalidraw.png":"image/png",binary:"application/octet-stream",...ne},mn=[Z.text,Z.html,...Object.values(ne)],En={png:"png",svg:"svg",clipboard:"clipboard"},xn={excalidraw:"excalidraw",excalidrawClipboard:"excalidraw/clipboard",excalidrawLibrary:"excalidrawlib",excalidrawClipboardWithAPI:"excalidraw-api/clipboard"},bn=()=>window.EXCALIDRAW_EXPORT_SOURCE||window.location.origin,_n=500,An=300,hn=500,yn=1e4,gn=3e4,Ln=100,Sn=.1,Rn=.1,On=30,vn=300,Cn=6e4,Fn=3e3,wn="invert(93%) hue-rotate(180deg)",In={addLibrary:"addLibrary"},Mn={addLibrary:"addLibrary"},Pn={canvasActions:{changeViewBackgroundColor:!0,clearCanvas:!0,export:{saveFileToDisk:!0},loadScene:!0,saveToActiveFile:!0,toggleTheme:null,saveAsImage:!0},tools:{image:!0}},Dn=730,Un=1e3,Nn=500,kn=1229,Hn=2,Kn=[1,2,3],Bn=10,Gn=1440,Wn=4*1024*1024,Yn="http://www.w3.org/2000/svg",Vn=`<?xml version="1.0" standalone="no"?>
|
|
1
|
+
var Xe=Object.create;var Q=Object.defineProperty;var je=Object.getOwnPropertyDescriptor;var qe=Object.getOwnPropertyNames;var Ze=Object.getPrototypeOf,Qe=Object.prototype.hasOwnProperty;var Je=(e,t)=>()=>(e&&(t=e(e=0)),t);var J=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var et=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of qe(t))!Qe.call(e,o)&&o!==n&&Q(e,o,{get:()=>t[o],enumerable:!(r=je(t,o))||r.enumerable});return e};var ee=(e,t,n)=>(n=e!=null?Xe(Ze(e)):{},et(t||!e||!e.__esModule?Q(n,"default",{value:e,enumerable:!0}):n,e));var h,p=Je(()=>{h={PROD:!0}});var Ce=J(($,Ie)=>{p();(function(e,t){typeof define=="function"&&define.amd?define([],t):typeof $=="object"?Ie.exports=t():(e.PromisePool=t(),e.promisePool=e.PromisePool)})($,function(){"use strict";var e=function(){this._listeners={}};e.prototype.addEventListener=function(a,l){this._listeners[a]=this._listeners[a]||[],this._listeners[a].indexOf(l)<0&&this._listeners[a].push(l)},e.prototype.removeEventListener=function(a,l){if(this._listeners[a]){var u=this._listeners[a].indexOf(l);u>=0&&this._listeners[a].splice(u,1)}},e.prototype.dispatchEvent=function(a){if(this._listeners[a.type]&&this._listeners[a.type].length)for(var l=this._listeners[a.type].slice(),u=0,m=l.length;u<m;++u)l[u].call(this,a)};var t=function(a){return typeof a.constructor=="function"&&a.constructor.name==="GeneratorFunction"},n=function(a){return{next:function(){var l=a();return l?{value:l}:{done:!0}}}},r=function(a){var l=!1;return{next:function(){return l?{done:!0}:(l=!0,{value:a})}}},o=function(a,l){var u=typeof a;if(u==="object"){if(typeof a.next=="function")return a;if(typeof a.then=="function")return r(a)}return u==="function"?t(a)?a():n(a):r(l.resolve(a))},s=function(a,l,u){this.target=a,this.type=l,this.data=u},i=function(a,l,u){if(e.call(this),typeof l!="number"||Math.floor(l)!==l||l<1)throw new Error("Invalid concurrency");this._concurrency=l,this._options=u||{},this._options.promise=this._options.promise||Promise,this._iterator=o(a,this._options.promise),this._done=!1,this._size=0,this._promise=null,this._callbacks=null};return i.prototype=new e,i.prototype.constructor=i,i.prototype.concurrency=function(a){return typeof a<"u"&&(this._concurrency=a,this.active()&&this._proceed()),this._concurrency},i.prototype.size=function(){return this._size},i.prototype.active=function(){return!!this._promise},i.prototype.promise=function(){return this._promise},i.prototype.start=function(){var a=this,l=this._options.promise;return this._promise=new l(function(u,m){a._callbacks={reject:m,resolve:u},a._proceed()}),this._promise},i.prototype._fireEvent=function(a,l){this.dispatchEvent(new s(this,a,l))},i.prototype._settle=function(a){a?this._callbacks.reject(a):this._callbacks.resolve(),this._promise=null,this._callbacks=null},i.prototype._onPooledPromiseFulfilled=function(a,l){this._size--,this.active()&&(this._fireEvent("fulfilled",{promise:a,result:l}),this._proceed())},i.prototype._onPooledPromiseRejected=function(a,l){this._size--,this.active()&&(this._fireEvent("rejected",{promise:a,error:l}),this._settle(l||new Error("Unknown error")))},i.prototype._trackPromise=function(a){var l=this;a.then(function(u){l._onPooledPromiseFulfilled(a,u)},function(u){l._onPooledPromiseRejected(a,u)}).catch(function(u){l._settle(new Error("Promise processing failed: "+u))})},i.prototype._proceed=function(){if(!this._done){for(var a={done:!1};this._size<this._concurrency&&!(a=this._iterator.next()).done;)this._size++,this._trackPromise(a.value);this._done=a===null||!!a.done}this._done&&this._size===0&&this._settle()},i.PromisePoolEvent=s,i.PromisePool=i,i})});var We=J(H=>{"use strict";p();Object.defineProperty(H,"__esModule",{value:!0});H.sanitizeUrl=void 0;var ln=/^([^\w]*)(javascript|data|vbscript)/im,cn=/&#(\w+)(^\w|;)?/g,un=/&(newline|tab);/gi,pn=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,dn=/^.+(:|:)/gim,fn=[".","/"];function hn(e){return fn.indexOf(e[0])>-1}function mn(e){return e.replace(cn,function(t,n){return String.fromCharCode(n)})}function En(e){var t=mn(e||"").replace(un,"").replace(pn,"").trim();if(!t)return"about:blank";if(hn(t))return t;var n=t.match(dn);if(!n)return t;var r=n[0];return ln.test(r)?"about:blank":t}H.sanitizeUrl=En});p();p();var te=class{constructor(t){this.scoreFunction=t}content=[];sinkDown(t){let n=this.content[t],r=this.scoreFunction(n);for(;t>0;){let o=(t+1>>1)-1,s=this.content[o];if(r<this.scoreFunction(s))this.content[t]=s,t=o;else break}this.content[t]=n}bubbleUp(t){let n=this.content.length,r=this.content[t],o=this.scoreFunction(r);for(;;){let s=(t+1<<1)-1,i=s+1,a=t,l=o;if(s<n){let u=this.scoreFunction(this.content[s]);u<l&&(a=s,l=u)}if(i<n&&this.scoreFunction(this.content[i])<l&&(a=i),a===t)break;this.content[t]=this.content[a],t=a}this.content[t]=r}push(t){this.content.push(t),this.sinkDown(this.content.length-1)}pop(){if(this.content.length===0)return null;let t=this.content[0],n=this.content.pop();return this.content.length>0&&(this.content[0]=n,this.bubbleUp(0)),t}remove(t){if(this.content.length===0)return;let n=this.content.indexOf(t),r=this.content.pop();n<this.content.length&&(this.content[n]=r,this.scoreFunction(r)<this.scoreFunction(t)?this.sinkDown(n):this.bubbleUp(n))}size(){return this.content.length}rescoreElement(t){this.sinkDown(this.content.indexOf(t))}};p();var yn=e=>Array.isArray(e)&&e.length===4&&typeof e[0]=="number"&&typeof e[1]=="number"&&typeof e[2]=="number"&&typeof e[3]=="number";p();p();function C(e){"@babel/helpers - typeof";return C=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},C(e)}var nt=/^\s+/,rt=/\s+$/;function c(e,t){if(e=e||"",t=t||{},e instanceof c)return e;if(!(this instanceof c))return new c(e,t);var n=ot(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}c.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},getLuminance:function(){var t=this.toRgb(),n,r,o,s,i,a;return n=t.r/255,r=t.g/255,o=t.b/255,n<=.03928?s=n/12.92:s=Math.pow((n+.055)/1.055,2.4),r<=.03928?i=r/12.92:i=Math.pow((r+.055)/1.055,2.4),o<=.03928?a=o/12.92:a=Math.pow((o+.055)/1.055,2.4),.2126*s+.7152*i+.0722*a},setAlpha:function(t){return this._a=le(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=re(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=re(this._r,this._g,this._b),n=Math.round(t.h*360),r=Math.round(t.s*100),o=Math.round(t.v*100);return this._a==1?"hsv("+n+", "+r+"%, "+o+"%)":"hsva("+n+", "+r+"%, "+o+"%, "+this._roundA+")"},toHsl:function(){var t=ne(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=ne(this._r,this._g,this._b),n=Math.round(t.h*360),r=Math.round(t.s*100),o=Math.round(t.l*100);return this._a==1?"hsl("+n+", "+r+"%, "+o+"%)":"hsla("+n+", "+r+"%, "+o+"%, "+this._roundA+")"},toHex:function(t){return oe(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return lt(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(E(this._r,255)*100)+"%",g:Math.round(E(this._g,255)*100)+"%",b:Math.round(E(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(E(this._r,255)*100)+"%, "+Math.round(E(this._g,255)*100)+"%, "+Math.round(E(this._b,255)*100)+"%)":"rgba("+Math.round(E(this._r,255)*100)+"%, "+Math.round(E(this._g,255)*100)+"%, "+Math.round(E(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:_t[oe(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var n="#"+se(this._r,this._g,this._b,this._a),r=n,o=this._gradientType?"GradientType = 1, ":"";if(t){var s=c(t);r="#"+se(s._r,s._g,s._b,s._a)}return"progid:DXImageTransform.Microsoft.gradient("+o+"startColorstr="+n+",endColorstr="+r+")"},toString:function(t){var n=!!t;t=t||this._format;var r=!1,o=this._a<1&&this._a>=0,s=!n&&o&&(t==="hex"||t==="hex6"||t==="hex3"||t==="hex4"||t==="hex8"||t==="name");return s?t==="name"&&this._a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return c(this.toString())},_applyModification:function(t,n){var r=t.apply(null,[this].concat([].slice.call(n)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(dt,arguments)},brighten:function(){return this._applyModification(ft,arguments)},darken:function(){return this._applyModification(ht,arguments)},desaturate:function(){return this._applyModification(ct,arguments)},saturate:function(){return this._applyModification(ut,arguments)},greyscale:function(){return this._applyModification(pt,arguments)},spin:function(){return this._applyModification(mt,arguments)},_applyCombination:function(t,n){return t.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(bt,arguments)},complement:function(){return this._applyCombination(Et,arguments)},monochromatic:function(){return this._applyCombination(gt,arguments)},splitcomplement:function(){return this._applyCombination(Tt,arguments)},triad:function(){return this._applyCombination(ae,[3])},tetrad:function(){return this._applyCombination(ae,[4])}};c.fromRatio=function(e,t){if(C(e)=="object"){var n={};for(var r in e)e.hasOwnProperty(r)&&(r==="a"?n[r]=e[r]:n[r]=L(e[r]));e=n}return c(e,t)};function ot(e){var t={r:0,g:0,b:0},n=1,r=null,o=null,s=null,i=!1,a=!1;return typeof e=="string"&&(e=vt(e)),C(e)=="object"&&(x(e.r)&&x(e.g)&&x(e.b)?(t=st(e.r,e.g,e.b),i=!0,a=String(e.r).substr(-1)==="%"?"prgb":"rgb"):x(e.h)&&x(e.s)&&x(e.v)?(r=L(e.s),o=L(e.v),t=it(e.h,r,o),i=!0,a="hsv"):x(e.h)&&x(e.s)&&x(e.l)&&(r=L(e.s),s=L(e.l),t=at(e.h,r,s),i=!0,a="hsl"),e.hasOwnProperty("a")&&(n=e.a)),n=le(n),{ok:i,format:e.format||a,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}function st(e,t,n){return{r:E(e,255)*255,g:E(t,255)*255,b:E(n,255)*255}}function ne(e,t,n){e=E(e,255),t=E(t,255),n=E(n,255);var r=Math.max(e,t,n),o=Math.min(e,t,n),s,i,a=(r+o)/2;if(r==o)s=i=0;else{var l=r-o;switch(i=a>.5?l/(2-r-o):l/(r+o),r){case e:s=(t-n)/l+(t<n?6:0);break;case t:s=(n-e)/l+2;break;case n:s=(e-t)/l+4;break}s/=6}return{h:s,s:i,l:a}}function at(e,t,n){var r,o,s;e=E(e,360),t=E(t,100),n=E(n,100);function i(u,m,b){return b<0&&(b+=1),b>1&&(b-=1),b<1/6?u+(m-u)*6*b:b<1/2?m:b<2/3?u+(m-u)*(2/3-b)*6:u}if(t===0)r=o=s=n;else{var a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;r=i(l,a,e+1/3),o=i(l,a,e),s=i(l,a,e-1/3)}return{r:r*255,g:o*255,b:s*255}}function re(e,t,n){e=E(e,255),t=E(t,255),n=E(n,255);var r=Math.max(e,t,n),o=Math.min(e,t,n),s,i,a=r,l=r-o;if(i=r===0?0:l/r,r==o)s=0;else{switch(r){case e:s=(t-n)/l+(t<n?6:0);break;case t:s=(n-e)/l+2;break;case n:s=(e-t)/l+4;break}s/=6}return{h:s,s:i,v:a}}function it(e,t,n){e=E(e,360)*6,t=E(t,100),n=E(n,100);var r=Math.floor(e),o=e-r,s=n*(1-t),i=n*(1-o*t),a=n*(1-(1-o)*t),l=r%6,u=[n,i,s,s,a,n][l],m=[a,n,n,i,s,s][l],b=[s,s,a,n,n,i][l];return{r:u*255,g:m*255,b:b*255}}function oe(e,t,n,r){var o=[A(Math.round(e).toString(16)),A(Math.round(t).toString(16)),A(Math.round(n).toString(16))];return r&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function lt(e,t,n,r,o){var s=[A(Math.round(e).toString(16)),A(Math.round(t).toString(16)),A(Math.round(n).toString(16)),A(ce(r))];return o&&s[0].charAt(0)==s[0].charAt(1)&&s[1].charAt(0)==s[1].charAt(1)&&s[2].charAt(0)==s[2].charAt(1)&&s[3].charAt(0)==s[3].charAt(1)?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0)+s[3].charAt(0):s.join("")}function se(e,t,n,r){var o=[A(ce(r)),A(Math.round(e).toString(16)),A(Math.round(t).toString(16)),A(Math.round(n).toString(16))];return o.join("")}c.equals=function(e,t){return!e||!t?!1:c(e).toRgbString()==c(t).toRgbString()};c.random=function(){return c.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function ct(e,t){t=t===0?0:t||10;var n=c(e).toHsl();return n.s-=t/100,n.s=P(n.s),c(n)}function ut(e,t){t=t===0?0:t||10;var n=c(e).toHsl();return n.s+=t/100,n.s=P(n.s),c(n)}function pt(e){return c(e).desaturate(100)}function dt(e,t){t=t===0?0:t||10;var n=c(e).toHsl();return n.l+=t/100,n.l=P(n.l),c(n)}function ft(e,t){t=t===0?0:t||10;var n=c(e).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),c(n)}function ht(e,t){t=t===0?0:t||10;var n=c(e).toHsl();return n.l-=t/100,n.l=P(n.l),c(n)}function mt(e,t){var n=c(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,c(n)}function Et(e){var t=c(e).toHsl();return t.h=(t.h+180)%360,c(t)}function ae(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var n=c(e).toHsl(),r=[c(e)],o=360/t,s=1;s<t;s++)r.push(c({h:(n.h+s*o)%360,s:n.s,l:n.l}));return r}function Tt(e){var t=c(e).toHsl(),n=t.h;return[c(e),c({h:(n+72)%360,s:t.s,l:t.l}),c({h:(n+216)%360,s:t.s,l:t.l})]}function bt(e,t,n){t=t||6,n=n||30;var r=c(e).toHsl(),o=360/n,s=[c(e)];for(r.h=(r.h-(o*t>>1)+720)%360;--t;)r.h=(r.h+o)%360,s.push(c(r));return s}function gt(e,t){t=t||6;for(var n=c(e).toHsv(),r=n.h,o=n.s,s=n.v,i=[],a=1/t;t--;)i.push(c({h:r,s:o,v:s})),s=(s+a)%1;return i}c.mix=function(e,t,n){n=n===0?0:n||50;var r=c(e).toRgb(),o=c(t).toRgb(),s=n/100,i={r:(o.r-r.r)*s+r.r,g:(o.g-r.g)*s+r.g,b:(o.b-r.b)*s+r.b,a:(o.a-r.a)*s+r.a};return c(i)};c.readability=function(e,t){var n=c(e),r=c(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)};c.isReadable=function(e,t,n){var r=c.readability(e,t),o,s;switch(s=!1,o=St(n),o.level+o.size){case"AAsmall":case"AAAlarge":s=r>=4.5;break;case"AAlarge":s=r>=3;break;case"AAAsmall":s=r>=7;break}return s};c.mostReadable=function(e,t,n){var r=null,o=0,s,i,a,l;n=n||{},i=n.includeFallbackColors,a=n.level,l=n.size;for(var u=0;u<t.length;u++)s=c.readability(e,t[u]),s>o&&(o=s,r=c(t[u]));return c.isReadable(e,r,{level:a,size:l})||!i?r:(n.includeFallbackColors=!1,c.mostReadable(e,["#fff","#000"],n))};var B=c.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},_t=c.hexNames=At(B);function At(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function le(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function E(e,t){xt(e)&&(e="100%");var n=yt(e);return e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function P(e){return Math.min(1,Math.max(0,e))}function g(e){return parseInt(e,16)}function xt(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function yt(e){return typeof e=="string"&&e.indexOf("%")!=-1}function A(e){return e.length==1?"0"+e:""+e}function L(e){return e<=1&&(e=e*100+"%"),e}function ce(e){return Math.round(parseFloat(e)*255).toString(16)}function ie(e){return g(e)/255}var _=function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",n="(?:"+t+")|(?:"+e+")",r="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",o="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+r),rgba:new RegExp("rgba"+o),hsl:new RegExp("hsl"+r),hsla:new RegExp("hsla"+o),hsv:new RegExp("hsv"+r),hsva:new RegExp("hsva"+o),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function x(e){return!!_.CSS_UNIT.exec(e)}function vt(e){e=e.replace(nt,"").replace(rt,"").toLowerCase();var t=!1;if(B[e])e=B[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=_.rgb.exec(e))?{r:n[1],g:n[2],b:n[3]}:(n=_.rgba.exec(e))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=_.hsl.exec(e))?{h:n[1],s:n[2],l:n[3]}:(n=_.hsla.exec(e))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=_.hsv.exec(e))?{h:n[1],s:n[2],v:n[3]}:(n=_.hsva.exec(e))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=_.hex8.exec(e))?{r:g(n[1]),g:g(n[2]),b:g(n[3]),a:ie(n[4]),format:t?"name":"hex8"}:(n=_.hex6.exec(e))?{r:g(n[1]),g:g(n[2]),b:g(n[3]),format:t?"name":"hex"}:(n=_.hex4.exec(e))?{r:g(n[1]+""+n[1]),g:g(n[2]+""+n[2]),b:g(n[3]+""+n[3]),a:ie(n[4]+""+n[4]),format:t?"name":"hex8"}:(n=_.hex3.exec(e))?{r:g(n[1]+""+n[1]),g:g(n[2]+""+n[2]),b:g(n[3]+""+n[3]),format:t?"name":"hex"}:!1}function St(e){var t,n;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:t,size:n}}import{clamp as W}from"@excalidraw/math";import{degreesToRadians as Mt}from"@excalidraw/math";var K=typeof window<"u"?new Map:null,ue=93,pe=180;function de(e,t,n,r){let o=e/255,s=t/255,i=n/255,a=Mt(r),l=Math.cos(a),u=Math.sin(a),m=[.213+l*.787-u*.213,.715-l*.715-u*.715,.072-l*.072+u*.928,.213-l*.213+u*.143,.715+l*.285+u*.14,.072-l*.072-u*.283,.213-l*.213-u*.787,.715-l*.715+u*.715,.072+l*.928+u*.072],b=o*m[0]+s*m[1]+i*m[2],Z=o*m[3]+s*m[4]+i*m[5],y=o*m[6]+s*m[7]+i*m[8];return{r:Math.round(Math.max(0,Math.min(1,b))*255),g:Math.round(Math.max(0,Math.min(1,Z))*255),b:Math.round(Math.max(0,Math.min(1,y))*255)}}var Rt=(e,t,n,r)=>{let o=W(r,0,100)/100,s=u=>{let m=u*(1-o)+(255-u)*o;return Math.round(W(m,0,255))},i=s(e),a=s(t),l=s(n);return{r:i,g:a,b:l}},Fn=(e,t=!0)=>{if(!t)return e;let n=K?.get(e);if(n)return n;let r=c(e),o=r.getAlpha(),s=r.toRgb(),i=Rt(s.r,s.g,s.b,ue),a=de(i.r,i.g,i.b,pe),l=V(a.r,a.g,a.b,o);return K&&K.set(e,l),l},Lt=(e,t,n)=>{let r=ue/100,o=1-2*r,s=i=>Math.round(W((i-255*r)/o,0,255));return{r:s(e),g:s(t),b:s(n)}},In=e=>{let t=c(e),n=t.getAlpha(),r=t.toRgb(),o=de(r.r,r.g,r.b,pe),s=Lt(o.r,o.g,o.b);return V(s.r,s.g,s.b,n)},Ot=(e,t)=>t.reduce((n,r)=>(r in e&&(n[r]=e[r]),n),{}),Cn=5,Pn=5,Dn=4,D=4,v=1,d={transparent:"transparent",black:"#1e1e1e",white:"#ffffff",gray:["#f8f9fa","#e9ecef","#ced4da","#868e96","#343a40"],red:["#fff5f5","#ffc9c9","#ff8787","#fa5252","#e03131"],pink:["#fff0f6","#fcc2d7","#f783ac","#e64980","#c2255c"],grape:["#f8f0fc","#eebefa","#da77f2","#be4bdb","#9c36b5"],violet:["#f3f0ff","#d0bfff","#9775fa","#7950f2","#6741d9"],blue:["#e7f5ff","#a5d8ff","#4dabf7","#228be6","#1971c2"],cyan:["#e3fafc","#99e9f2","#3bc9db","#15aabf","#0c8599"],teal:["#e6fcf5","#96f2d7","#38d9a9","#12b886","#099268"],green:["#ebfbee","#b2f2bb","#69db7c","#40c057","#2f9e44"],yellow:["#fff9db","#ffec99","#ffd43b","#fab005","#f08c00"],orange:["#fff4e6","#ffd8a8","#ffa94d","#fd7e14","#e8590c"],bronze:["#f8f1ee","#eaddd7","#d2bab0","#a18072","#846358"]},fe=Ot(d,["cyan","blue","violet","grape","pink","green","teal","yellow","orange","red"]),kn=[d.black,d.red[D],d.green[D],d.blue[D],d.yellow[D]],Un=[d.transparent,d.red[v],d.green[v],d.blue[v],d.yellow[v]],Nn=[d.white,d.red[v],d.green[v],d.blue[v],d.yellow[v]],Hn=[d.white,"#f8f9fa","#f5faff","#fffce8","#fdf8f6"],Gn={transparent:d.transparent,white:d.white,gray:d.gray,black:d.black,bronze:d.bronze,...fe},Bn={transparent:d.transparent,white:d.white,gray:d.gray,black:d.black,bronze:d.bronze,...fe},Kn=e=>[d.cyan[e],d.blue[e],d.violet[e],d.grape[e],d.pink[e],d.green[e],d.teal[e],d.yellow[e],d.orange[e],d.red[e]],V=(e,t,n,r)=>{let o=`#${(16777216+(e<<16)+(t<<8)+n).toString(16).slice(1)}`;if(r!==void 0&&r<1){let s=Math.round(r*255).toString(16).padStart(2,"0");return`${o}${s}`}return o},Wn=e=>{let t=c(e);if(!t.isValid())return null;let{r:n,g:r,b:o,a:s}=t.toRgb();return V(n,r,o,s)},he=e=>c(e).getAlpha()===0,Vn=e=>c(e).getAlpha()===1,Yn=240,wt=(e,t,n)=>(e*299+t*587+n*114)/1e3,$n=(e,t=160)=>{if(!e)return!0;if(he(e))return!1;let n=c(e);if(!n.isValid())return!0;let{r,g:o,b:s}=n.toRgb();return wt(r,o,s)<t},zn=e=>{if(e=e.trim(),he(e))return e;let t=c(e);return t.isValid()?["hex","hex8"].includes(t.getFormat())&&!e.startsWith("#")?`#${e}`:e:null};p();var Zn=typeof window<"u"&&"ResizeObserver"in window,Qn="Excalidraw",Jn=36,er=10,tr=20,nr=8,rr=5,or=1,sr=30,ar=Math.PI/12,ir="red",lr={TEXT:"text",CROSSHAIR:"crosshair",GRABBING:"grabbing",GRAB:"grab",POINTER:"pointer",MOVE:"move",AUTO:""},cr={MAIN:0,WHEEL:1,SECONDARY:2,TOUCH:-1,ERASER:5},ur={enabled:"all",disabled:"none",inheritFromUI:"var(--ui-pointerEvents)"},Ft=(f=>(f.COPY="copy",f.PASTE="paste",f.CUT="cut",f.KEYDOWN="keydown",f.KEYUP="keyup",f.MOUSE_MOVE="mousemove",f.RESIZE="resize",f.UNLOAD="unload",f.FOCUS="focus",f.BLUR="blur",f.DRAG_OVER="dragover",f.DROP="drop",f.GESTURE_END="gestureend",f.BEFORE_UNLOAD="beforeunload",f.GESTURE_START="gesturestart",f.GESTURE_CHANGE="gesturechange",f.POINTER_MOVE="pointermove",f.POINTER_DOWN="pointerdown",f.POINTER_UP="pointerup",f.STATE_CHANGE="statechange",f.WHEEL="wheel",f.TOUCH_START="touchstart",f.TOUCH_END="touchend",f.HASHCHANGE="hashchange",f.VISIBILITY_CHANGE="visibilitychange",f.SCROLL="scroll",f.EXCALIDRAW_LINK="excalidraw-link",f.MENU_ITEM_SELECT="menu.itemSelect",f.MESSAGE="message",f.FULLSCREENCHANGE="fullscreenchange",f))(Ft||{}),pr={UNSTARTED:-1,ENDED:0,PLAYING:1,PAUSED:2,BUFFERING:3,CUED:5},k={TEST:"test",DEVELOPMENT:"development",PRODUCTION:"production"},dr={SIDEBAR:"sidebar",SHAPE_ACTIONS_MENU:"App-menu__left",ZOOM_ACTIONS:"zoom-actions",SEARCH_MENU_INPUT_WRAPPER:"layer-ui__search-inputWrapper",CONVERT_ELEMENT_TYPE_POPUP:"ConvertElementTypePopup",SHAPE_ACTIONS_THEME_SCOPE:"shape-actions-theme-scope",FRAME_NAME:"frame-name",DROPDOWN_MENU_EVENT_WRAPPER:"dropdown-menu-event-wrapper"},fr={sm:16,md:20,lg:28,xl:36},Ee="Xiaolai",O="Segoe UI Emoji",T={Virgil:1,Helvetica:2,Cascadia:3,Excalifont:5,Nunito:6,"Lilita One":7,"Comic Shanns":8,"Liberation Sans":9,Assistant:10},Te="sans-serif",be="monospace",It={[Te]:998,[be]:999},Y={[Ee]:100,...It,[O]:1e3};function Ct(e){switch(e){case T.Cascadia:case T["Comic Shanns"]:return be;default:return Te}}var ge=e=>{let t=Ct(e);switch(e){case T.Excalifont:return[Ee,t,O];default:return[t,O]}},hr={LIGHT:"light",DARK:"dark"},mr="invert(93%) hue-rotate(180deg)",Er={strokeColor:"#bbb",strokeWidth:2,strokeStyle:"solid",fillStyle:"solid",roughness:0,roundness:null,backgroundColor:"transparent",radius:8,nameOffsetY:3,nameColorLightTheme:"#999999",nameColorDarkTheme:"#7a7a7a",nameFontSize:14,nameLineHeight:1.25},Tr=1,br=20,gr=T.Excalifont,_r="left",Ar="top",_e="{version}",Pt=2,Dt=2*Pt,kt=1e-5,xr=2*Dt-kt,yr="#ffffff",vr="#1e1e1e",Sr="#a2f1a6",Mr=["selectAll"],Rr=20,Lr=5,Ae={svg:"image/svg+xml",png:"image/png",jpg:"image/jpeg",gif:"image/gif",webp:"image/webp",bmp:"image/bmp",ico:"image/x-icon",avif:"image/avif",jfif:"image/jfif"},Ut={text:"text/plain",html:"text/html",json:"application/json",excalidraw:"application/vnd.excalidraw+json",excalidrawClipboard:"application/vnd.excalidraw.clipboard+json",excalidrawlib:"application/vnd.excalidrawlib+json",excalidrawlibIds:"application/vnd.excalidrawlib.ids+json"},me={...Ut,"excalidraw.svg":"image/svg+xml","excalidraw.png":"image/png",binary:"application/octet-stream",...Ae},Or=[me.text,me.html,...Object.values(Ae)],wr={png:"png",svg:"svg",clipboard:"clipboard"},Fr={excalidraw:"excalidraw",excalidrawClipboard:"excalidraw/clipboard",excalidrawLibrary:"excalidrawlib",excalidrawClipboardWithAPI:"excalidraw-api/clipboard"},Ir=()=>window.EXCALIDRAW_EXPORT_SOURCE||window.location.origin,Cr=500,Pr=300,Dr=500,kr=1e4,Ur=3e4,Nr=100,Hr=.1,Gr=.1,Br=30,Kr=300,Wr=6e4,Vr=3e3,Yr={addLibrary:"addLibrary"},$r={addLibrary:"addLibrary"},zr={canvasActions:{changeViewBackgroundColor:!0,clearCanvas:!0,export:{saveFileToDisk:!0},loadScene:!0,saveToActiveFile:!0,toggleTheme:null,saveAsImage:!0},tools:{image:!0}},Xr=2,jr=[1,2,3],qr=10,Zr={maxWidthOrHeight:1440,maxFileSizeBytes:4*1024*1024},Qr="http://www.w3.org/2000/svg",Jr=`<?xml version="1.0" standalone="no"?>
|
|
2
2
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
|
3
|
-
`,Xn=128,$n={excalidraw:2,excalidrawLibrary:2},zn=5,jn=.7,Zn=11,qn={TOP:"top",MIDDLE:"middle",BOTTOM:"bottom"},Qn={LEFT:"left",CENTER:"center",RIGHT:"right"},Jn=20,er=.25,tr=32,nr={LEGACY:1,PROPORTIONAL_RADIUS:2,ADAPTIVE_RADIUS:3},ke={architect:0,artist:1,cartoonist:2},rr={thin:1,bold:2,extraBold:4},or={strokeColor:u.black,backgroundColor:u.transparent,fillStyle:"solid",strokeWidth:2,strokeStyle:"solid",roughness:ke.artist,opacity:100,locked:!1},He="library",sr="search",ir={name:"default",defaultTab:He},ar=new Set(["iframe","embeddable","image"]),lr={selection:"selection",lasso:"lasso",rectangle:"rectangle",diamond:"diamond",ellipse:"ellipse",arrow:"arrow",line:"line",freedraw:"freedraw",text:"text",image:"image",eraser:"eraser",hand:"hand",frame:"frame",magicframe:"magicframe",embeddable:"embeddable",laser:"laser"},cr={OAI_API_KEY:"excalidraw-oai-api-key",MERMAID_TO_EXCALIDRAW:"mermaid-to-excalidraw",PUBLISH_LIBRARY:"publish-library-data"},ur="Untitled",pr={generalStats:1,elementProperties:2},dr=1,fr={sharp:"sharp",round:"round",elbow:"elbow"},Tr=.3,mr="element",Er=Symbol.for("__test__originalId__"),Ke=(r=>(r.ACTIVE="active",r.AWAY="away",r.IDLE="idle",r))(Ke||{}),xr=20;c();var M={[T.Excalifont]:{metrics:{unitsPerEm:1e3,ascender:886,descender:-374,lineHeight:1.25}},[T.Nunito]:{metrics:{unitsPerEm:1e3,ascender:1011,descender:-353,lineHeight:1.25}},[T["Lilita One"]]:{metrics:{unitsPerEm:1e3,ascender:923,descender:-220,lineHeight:1.15}},[T["Comic Shanns"]]:{metrics:{unitsPerEm:1e3,ascender:750,descender:-250,lineHeight:1.25}},[T.Virgil]:{metrics:{unitsPerEm:1e3,ascender:886,descender:-374,lineHeight:1.25},deprecated:!0},[T.Helvetica]:{metrics:{unitsPerEm:2048,ascender:1577,descender:-471,lineHeight:1.15},deprecated:!0,local:!0},[T.Cascadia]:{metrics:{unitsPerEm:2048,ascender:1900,descender:-480,lineHeight:1.2},deprecated:!0},[T["Liberation Sans"]]:{metrics:{unitsPerEm:2048,ascender:1854,descender:-434,lineHeight:1.15},private:!0},[T.Assistant]:{metrics:{unitsPerEm:2048,ascender:1021,descender:-287,lineHeight:1.25},private:!0},[B.Xiaolai]:{metrics:{unitsPerEm:1e3,ascender:880,descender:-144,lineHeight:1.25},fallback:!0},[B["Segoe UI Emoji"]]:{metrics:{unitsPerEm:1e3,ascender:886,descender:-374,lineHeight:1.25},local:!0,fallback:!0}},hr={LATIN:"U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD",LATIN_EXT:"U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF",CYRILIC_EXT:"U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F",CYRILIC:"U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116",VIETNAMESE:"U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB"},yr="local:",gr=(e,t,n)=>{let{unitsPerEm:r,ascender:s,descender:l}=M[e]?.metrics||M[T.Excalifont].metrics,i=t/r,o=(n-i*s+i*l)/2;return i*s+o},Lr=e=>{let{lineHeight:t}=M[e]?.metrics||M[T.Excalifont].metrics;return t};c();var re=class{jobs=[];running=!1;tick(){if(this.running)return;let t=this.jobs.shift();t?(this.running=!0,t.promise.resolve(se(t.jobFactory,...t.args).finally(()=>{this.running=!1,this.tick()}))):this.running=!1}push(t,...n){let r=oe();return this.jobs.push({jobFactory:t,promise:r,args:n}),this.tick(),r}};c();var ie={EQUAL:"Equal",MINUS:"Minus",NUM_ADD:"NumpadAdd",NUM_SUBTRACT:"NumpadSubtract",NUM_ZERO:"Numpad0",BRACKET_RIGHT:"BracketRight",BRACKET_LEFT:"BracketLeft",ONE:"Digit1",TWO:"Digit2",THREE:"Digit3",NINE:"Digit9",QUOTE:"Quote",ZERO:"Digit0",SLASH:"Slash",C:"KeyC",D:"KeyD",H:"KeyH",V:"KeyV",Z:"KeyZ",Y:"KeyY",R:"KeyR",S:"KeyS"},y={ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ARROW_UP:"ArrowUp",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",BACKSPACE:"Backspace",ALT:"Alt",CTRL_OR_CMD:w?"metaKey":"ctrlKey",DELETE:"Delete",ENTER:"Enter",ESCAPE:"Escape",QUESTION_MARK:"?",SPACE:" ",TAB:"Tab",CHEVRON_LEFT:"<",CHEVRON_RIGHT:">",PERIOD:".",COMMA:",",SUBTRACT:"-",SLASH:"/",A:"a",C:"c",D:"d",E:"e",F:"f",G:"g",H:"h",I:"i",L:"l",O:"o",P:"p",Q:"q",R:"r",S:"s",T:"t",V:"v",X:"x",Y:"y",Z:"z",K:"k",W:"w",0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9"},Be=new Map([[y.Z,ie.Z],[y.Y,ie.Y]]),Ge=e=>/^[a-z]$/.test(e.toLowerCase()),wr=(e,t)=>{if(t===e.key.toLowerCase())return!0;let n=Be.get(t);return!!(n&&!Ge(e.key)&&e.code===n)},Ir=e=>e===y.ARROW_LEFT||e===y.ARROW_RIGHT||e===y.ARROW_DOWN||e===y.ARROW_UP,Mr=e=>e.altKey,Pr=e=>e.shiftKey,Dr=e=>e.shiftKey;c();import{pointFromPair as We}from"@excalidraw/math";var Hr=e=>{let t=e.map(r=>r[0]),n=e.map(r=>r[1]);return{width:Math.max(...t)-Math.min(...t),height:Math.max(...n)-Math.min(...n)}},Kr=(e,t,n,r)=>{let s=n.map(b=>b[e]),l=Math.max(...s),i=Math.min(...s),o=l-i,a=o===0?1:t/o,p=1/0,m=n.map(b=>{let _=b[e]*a,A=[...b];return A[e]=_,_<p&&(p=_),A});if(!r||m.length===2)return m;let R=i-p;return m.map(b=>We(b.map((_,A)=>A===e?_+R:_)))},Br=(e,t,n)=>n?[Math.round(e/n)*n,Math.round(t/n)*n]:[e,t];c();var ue=X(le(),1),ce=class{pool;entries={};constructor(t,n){this.pool=new ue.default(t,n)}all(){let t=n=>{if(n.data.result){let[r,s]=n.data.result;this.entries[r]=s}};return this.pool.addEventListener("fulfilled",t),this.pool.start().then(()=>(setTimeout(()=>{this.pool.removeEventListener("fulfilled",t)}),Object.values(this.entries)))}};c();c();c();var pe=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,n)=>(n&=63,n<36?t+=n.toString(36):n<62?t+=(n-26).toString(36).toUpperCase():n>62?t+="-":t+="_",t),"");c();var S=class{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}};c();import{average as P}from"@excalidraw/math";var W=null,oo=e=>{W=e},so=()=>{if(W)return W;let e=new Date,t=e.getFullYear(),n=`${e.getMonth()+1}`.padStart(2,"0"),r=`${e.getDate()}`.padStart(2,"0"),s=`${e.getHours()}`.padStart(2,"0"),l=`${e.getMinutes()}`.padStart(2,"0");return`${t}-${n}-${r}-${s}${l}`},io=e=>e.charAt(0).toUpperCase()+e.slice(1),ao=e=>e instanceof HTMLElement&&e.className.includes("ToolIcon"),Ye=e=>e instanceof HTMLElement&&e.dataset.type==="wysiwyg"||e instanceof HTMLBRElement||e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement,lo=e=>Ye(e)||e instanceof Element&&!!e.closest("label, button"),co=e=>e instanceof HTMLElement&&e.dataset.type==="wysiwyg"||e instanceof HTMLBRElement||e instanceof HTMLTextAreaElement||e instanceof HTMLInputElement&&(e.type==="text"||e.type==="number"||e.type==="password"),Ve=({fontFamily:e})=>{for(let[t,n]of Object.entries(T))if(n===e)return`${t}${ee(n).map(r=>`, ${r}`).join("")}`;return L},uo=({fontSize:e,fontFamily:t})=>`${e}px ${Ve({fontFamily:t})}`,po=(e,t)=>{let n=0,r=null,s=(...l)=>{r=l,clearTimeout(n),n=window.setTimeout(()=>{r=null,e(...l)},t)};return s.flush=()=>{if(clearTimeout(n),r){let l=r;r=null,e(...l)}},s.cancel=()=>{r=null,clearTimeout(n)},s},fo=(e,t)=>{let n=null,r=null,s=null,l=o=>{n=window.requestAnimationFrame(()=>{n=null,e(...o),r=null,s&&(r=s,s=null,l(r))})},i=(...o)=>{if(D()){e(...o);return}r=o,n===null?l(r):t?.trailing&&(s=o)};return i.flush=()=>{n!==null&&(cancelAnimationFrame(n),n=null),r&&(e(...s||r),r=s=null)},i.cancel=()=>{r=s=null,n!==null&&(cancelAnimationFrame(n),n=null)},i},Te=e=>1-Math.pow(1-e,4),de=(e,t,n)=>(t-e)*Te(n)+e,To=({fromValues:e,toValues:t,onStep:n,duration:r=250,interpolateValue:s,onStart:l,onEnd:i,onCancel:o})=>{let a=!1,p=0,m;function R(N){if(a)return;m===void 0&&(m=N,l?.());let b=Math.min(N-m,r),_=Te(b/r),A={};if(Object.keys(e).forEach(g=>{let h=g,k=(t[h]-e[h])*_+e[h];A[h]=k}),n(A),b<r){let g=b/r,h={};Object.keys(e).forEach(k=>{let O=k,H=e[O],K=t[O],v;v=s?s(H,K,g,O):de(H,K,g),v==null&&(v=de(H,K,g)),h[O]=v}),n(h),p=window.requestAnimationFrame(R)}else n(t),i?.()}return p=window.requestAnimationFrame(R),()=>{o?.(),a=!0,window.cancelAnimationFrame(p)}},mo=(e,t)=>{if(!e.length||t<1)return[];let n=0,r=0,s=Array(Math.ceil(e.length/t));for(;n<e.length;)s[r++]=e.slice(n,n+=t);return s},Eo=e=>{let t=window.getSelection();if(t){let n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n)}},xo=()=>{let e=window.getSelection();e&&e.removeAllRanges()},bo=(e,t)=>Math.abs(e-t),_o=(e,t)=>t.type==="custom"?{...e.activeTool,type:"custom",customType:t.customType,locked:t.locked??e.activeTool.locked}:{...e.activeTool,lastActiveTool:t.lastActiveToolBeforeEraser===void 0?e.activeTool.lastActiveTool:t.lastActiveToolBeforeEraser,type:t.type,customType:null,locked:t.locked??e.activeTool.locked,fromSelection:t.fromSelection??!1},Ao=()=>document.fullscreenElement?.nodeName==="HTML",ho=()=>document.documentElement.requestFullscreen(),yo=()=>document.exitFullscreen(),go=e=>(e=e.replace(/\bAlt\b/i,"Alt").replace(/\bShift\b/i,"Shift").replace(/\b(Enter|Return)\b/i,"Enter"),w?e.replace(/\bCtrlOrCmd\b/gi,"Cmd").replace(/\bAlt\b/i,"Option"):e.replace(/\bCtrlOrCmd\b/gi,"Ctrl")),Lo=({clientX:e,clientY:t},{zoom:n,offsetLeft:r,offsetTop:s,scrollX:l,scrollY:i})=>{let o=(e-r)/n.value-l,a=(t-s)/n.value-i;return{x:o,y:a}},So=({sceneX:e,sceneY:t},{zoom:n,offsetLeft:r,offsetTop:s,scrollX:l,scrollY:i})=>{let o=(e+l)*n.value+r,a=(t+i)*n.value+s;return{x:o,y:a}},Ro=e=>getComputedStyle(document.documentElement).getPropertyValue(`--${e}`),Xe="A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u0300-\u0590\u0800-\u1FFF\u2C00-\uFB1C\uFDFE-\uFE6F\uFEFD-\uFFFF",$e="\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC",ze=new RegExp(`^[^${Xe}]*[${$e}]`),Oo=e=>ze.test(e),vo=e=>{let[t,n]=e;return{x:t,y:n}},Co=e=>{if(e?.name==="AbortError"){console.warn(e);return}throw e},Fo=(e,t,n=0)=>{n<0&&(n=e.length+n),n=Math.min(e.length,Math.max(n,0));let r=n-1;for(;++r<e.length;)if(t(e[r],r,e))return r;return-1},wo=(e,t,n=e.length-1)=>{n<0&&(n=e.length+n),n=Math.min(e.length-1,Math.max(n,0));let r=n+1;for(;--r>-1;)if(t(e[r],r,e))return r;return-1},Io=(e,t)=>{for(let n=0;n<e.length;n++){let r=t(e[n],n);if(r!=null)return r}},je=e=>{let t=e.length===5&&e.substr(4,1)==="0",n=e.length===9&&e.substr(7,2)==="00";return t||n||e===u.transparent},Mo=e=>e.fillStyle!=="solid"||je(e.backgroundColor),oe=()=>{let e,t,n=new Promise((r,s)=>{e=r,t=s});return n.resolve=e,n.reject=t,n},Po=(e,t)=>{let n=[{value:1,symbol:"b"},{value:1e3,symbol:"k"},{value:1e6,symbol:"M"},{value:1e9,symbol:"G"}],r=/\.0+$|(\.[0-9]*[1-9])0+$/,s;for(s=n.length-1;s>0&&!(e>=n[s].value);s--);return(e/n[s].value).toFixed(t).replace(r,"$1")+n[s].symbol},Do=()=>document.querySelector('meta[name="version"]')?.content||te,Uo=()=>{let t=document.createElement("canvas").getContext("2d");if(!t)return!1;let n=12;return t.fillStyle="#f00",t.textBaseline="top",t.font="32px Arial",t.fillText("\u{1F600}",0,0),t.getImageData(n,n,1,1).data[0]!==0},No=e=>{let t=e.parentElement;for(;t;){if(t===document.body)return document;let{overflowY:n}=window.getComputedStyle(t);if(t.scrollHeight>t.clientHeight&&(n==="auto"||n==="scroll"||n==="overlay"))return t;t=t.parentElement}return document},ko=e=>{let t=e.parentElement;for(;t;){if(t.tabIndex>-1){t.focus();return}t=t.parentElement}},Ho=e=>{e.preventDefault(),e.returnValue=""},Ko=e=>Array.from(e).map(t=>`0${t.toString(16)}`.slice(-2)).join(""),Bo=()=>D()?1:Date.now(),Go=e=>e instanceof Map?e:e.reduce((t,n)=>(t.set(typeof n=="string"?n:n.id,n),t),new Map),Wo=e=>e.reduce((t,n,r)=>(t.set(n.id,[n,r]),t),new Map),Yo=(e,t)=>e.reduce((n,r,s)=>(n[t?t(r):s]=r,n),{}),Vo=e=>e.reduce((t,n,r)=>{let s={...n,prev:null,next:null};if(r!==0){let l=t[r-1];if(s.prev=l,l.next=s,r===e.length-1){let i=t[0];s.next=i,i.prev=s}}return t.push(s),t},[]),Ze=e=>Array.isArray(e)?e:e.values(),Xo=e=>Array.isArray(e)?e:Array.from(Ze(e)),D=()=>f.MODE===I.TEST,$o=()=>f.MODE===I.DEVELOPMENT,zo=()=>f.MODE===I.PRODUCTION,jo=()=>typeof process<"u"&&!0,Zo=(e,t)=>new CustomEvent(e,{detail:{nativeEvent:t},cancelable:!0}),qo=(e,t)=>{let n=!1;for(let r in t){let s=t[r];if(typeof s<"u"){if(e[r]===s&&(typeof s!="object"||s===null))continue;n=!0}}return n?{...e,...t}:e},Qo=e=>{let t=typeof e;return e==null||t!=="object"&&t!=="function"},qe=()=>{try{return window.self===window.top?"top":"iframe"}catch{return"iframe"}},Jo=()=>qe()==="iframe",es=e=>!!e&&typeof e=="object"&&"then"in e&&"catch"in e&&"finally"in e,ts=e=>{let t=e?.querySelectorAll("button, a, input, select, textarea, div[tabindex], label[tabindex]");return t?Array.from(t).filter(n=>n.tabIndex>-1&&!n.disabled):[]},fe=(e,t)=>Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t,Qe=(e,t,n,r=!1)=>{let s=Object.keys(e),l=Object.keys(t);if(s.length!==l.length)return r&&console.warn("%cisShallowEqual: objects don't have same properties ->","color: #8B4000",e,t),!1;if(n&&Array.isArray(n)){for(let i of n)if(!(e[i]===t[i]||fe(e[i],t[i])))return r&&console.warn(`%cisShallowEqual: ${i} not equal ->`,"color: #8B4000",e[i],t[i]),!1;return!0}return s.every(i=>{let o=n?.[i],a=o?o(e[i],t[i]):e[i]===t[i]||fe(e[i],t[i]);return!a&&r&&console.warn(`%cisShallowEqual: ${i} not equal ->`,"color: #8B4000",e[i],t[i]),a})},ns=(e,t,{checkForDefaultPrevented:n=!0}={})=>function(s){if(e?.(s),!n||!s?.defaultPrevented)return t?.(s)},rs=(e,t,n)=>{if(!t)return e;if(n)return console.error(t),e;throw new Error(t)};function os(e,t){if(!e)throw new Error(t)}var ss=e=>{let t,n,r=function(s){let l=Object.entries(s);if(t){let o=!0;for(let[a,p]of l)if(t.get(a)!==p){o=!1;break}if(o)return n}let i=e(s);return t=new Map(l),n=i,i};return r.clear=()=>{t=void 0,n=void 0},r},is=(e,t)=>e instanceof Set||e instanceof Map?e.has(t):"includes"in e?e.includes(t):e.hasOwnProperty(t),as=e=>JSON.parse(JSON.stringify(e)),ls=(e,t)=>Qe(e,t)?e:t;function cs(e,t,n,r){return e?(e?.addEventListener?.(t,n,r),()=>{e?.removeEventListener?.(t,n,r)}):()=>{}}function us(e,t=!0){let n=e.length;if(n<4)return"";let r=e[0],s=e[1],l=e[2],i=`M${r[0].toFixed(2)},${r[1].toFixed(2)} Q${s[0].toFixed(2)},${s[1].toFixed(2)} ${P(s[0],l[0]).toFixed(2)},${P(s[1],l[1]).toFixed(2)} T`;for(let o=2,a=n-1;o<a;o++)r=e[o],s=e[o+1],i+=`${P(r[0],s[0]).toFixed(2)},${P(r[1],s[1]).toFixed(2)} `;return t&&(i+="Z"),i}var ps=e=>e.replace(/\r?\n|\r/g,`
|
|
4
|
-
`),ds=e=>e,se=async(e,...t)=>new Promise(n=>{n(e(...t))}),fs=(...e)=>Math.max(...e.map(t=>t?1:0))>0,Ts=e=>{try{return JSON.parse(e)}catch{return null}},me=e=>e.replace(/"/g,"""),ms=e=>Array.isArray(e)?e:[e],Je=e=>Array.isArray(e),et=e=>Je(e)?e.length:e instanceof Map||e instanceof Set?e.size:Object.keys(e).length,Es=(e,t)=>{if(et(e)===0)return null;let n=t||(s=>s),r=null;for(let s of e){let l=n(s);if((r===null||r===l)&&l!=null)r=l;else return null}return r};var Ee=new S(Date.now()),xe=0,ys=()=>Math.floor(Ee.next()*2**31),gs=e=>{Ee=new S(e),xe=0},Ls=()=>D()?`id${xe++}`:pe();c();var _e=X(be(),1);var ut=e=>(e=e.trim(),e&&(0,_e.sanitizeUrl)(me(e))),Fs=e=>!!(e?.includes(location.origin)||e?.startsWith("/")),ws=e=>{if(e=ut(e),e.startsWith("/"))return`${location.origin}${e}`;try{new URL(e)}catch{return"about:blank"}return e};c();var Ae=class{subscribers=[];on(...t){let n=t.flat().filter(r=>typeof r=="function");return this.subscribers.push(...n),()=>this.off(n)}once(...t){let n=t.flat().filter(s=>typeof s=="function");n.push(()=>r());let r=this.on(...n);return r}off(...t){let n=t.flat();this.subscribers=this.subscribers.filter(r=>!n.includes(r))}trigger(...t){for(let n of this.subscribers)n(...t);return this}clear(){this.subscribers=[]}};export{Fn as ACTIVE_THRESHOLD,mn as ALLOWED_PASTE_MIME_TYPES,Ht as APP_NAME,Zn as ARROW_LABEL_FONT_SIZE_TO_MIN_WIDTH_RATIO,jn as ARROW_LABEL_WIDTH_FRACTION,fr as ARROW_TYPE,zn as BOUND_TEXT_PADDING,$ as BinaryHeap,dn as CANVAS_ONLY_ACTIONS,ht as CANVAS_PALETTE_SHADE_INDEXES,sr as CANVAS_SEARCH_TAB,q as CJK_HAND_DRAWN_FALLBACK_FONT,Jt as CLASSES,ie as CODES,_t as COLORS_PER_ROW,un as COLOR_CHARCOAL_BLACK,xt as COLOR_OUTLINE_CONTRAST_THRESHOLD,u as COLOR_PALETTE,pn as COLOR_VOICE_CALL,cn as COLOR_WHITE,jt as CURSOR_TYPE,tr as DEFAULT_ADAPTIVE_RADIUS,Lt as DEFAULT_CANVAS_BACKGROUND_PICKS,At as DEFAULT_CHART_COLOR_INDEX,ln as DEFAULT_COLLISION_THRESHOLD,F as DEFAULT_ELEMENT_BACKGROUND_COLOR_INDEX,Rt as DEFAULT_ELEMENT_BACKGROUND_COLOR_PALETTE,gt as DEFAULT_ELEMENT_BACKGROUND_PICKS,or as DEFAULT_ELEMENT_PROPS,C as DEFAULT_ELEMENT_STROKE_COLOR_INDEX,St as DEFAULT_ELEMENT_STROKE_COLOR_PALETTE,yt as DEFAULT_ELEMENT_STROKE_PICKS,Bn as DEFAULT_EXPORT_PADDING,ur as DEFAULT_FILENAME,on as DEFAULT_FONT_FAMILY,rn as DEFAULT_FONT_SIZE,fn as DEFAULT_GRID_SIZE,Tn as DEFAULT_GRID_STEP,zt as DEFAULT_LASER_COLOR,Gn as DEFAULT_MAX_IMAGE_WIDTH_OR_HEIGHT,er as DEFAULT_PROPORTIONAL_RADIUS,Tr as DEFAULT_REDUCED_GLOBAL_ALPHA,ir as DEFAULT_SIDEBAR,sn as DEFAULT_TEXT_ALIGN,De as DEFAULT_TRANSFORM_HANDLE_SPACING,Pn as DEFAULT_UI_OPTIONS,te as DEFAULT_VERSION,an as DEFAULT_VERTICAL_ALIGN,Bt as DRAGGING_THRESHOLD,cr as EDITOR_LS_KEYS,E as ELEMENTS_PALETTE_SHADE_INDEXES,mr as ELEMENT_LINK_KEY,Jn as ELEMENT_READY_TO_ERASE_OPACITY,Yt as ELEMENT_SHIFT_TRANSLATE_AMOUNT,Vt as ELEMENT_TRANSLATE_AMOUNT,Xn as ENCRYPTION_KEY_BITS,I as ENV,Ne as EPSILON,Ie as EVENT,xn as EXPORT_DATA_TYPES,En as EXPORT_IMAGE_TYPES,Kn as EXPORT_SCALES,Ae as Emitter,T as FONT_FAMILY,B as FONT_FAMILY_FALLBACKS,Me as FONT_FAMILY_GENERIC_FALLBACKS,M as FONT_METADATA,tn as FRAME_STYLE,hr as GOOGLE_FONTS_RANGES,vn as HYPERLINK_TOOLTIP_DELAY,Cn as IDLE_THRESHOLD,ne as IMAGE_MIME_TYPES,_n as IMAGE_RENDER_TIMEOUT,y as KEYS,Be as KeyCodeMap,ar as LIBRARY_DISABLED_TYPES,He as LIBRARY_SIDEBAR_TAB,Wt as LINE_CONFIRM_THRESHOLD,xr as LINE_POLYGON_POINT_MERGE_DISTANCE,yr as LOCAL_FONT_PROTOCOL,Wn as MAX_ALLOWED_FILE_BYTES,bt as MAX_CUSTOM_COLORS_USED_IN_CANVAS,Hn as MAX_DECIMALS_FOR_SVG_EXPORT,On as MAX_ZOOM,Z as MIME_TYPES,Gt as MINIMUM_ARROW_SIZE,nn as MIN_FONT_SIZE,dr as MIN_WIDTH_OR_HEIGHT,Rn as MIN_ZOOM,J as MONOSPACE_GENERIC_FONT,Nn as MQ_MAX_HEIGHT_LANDSCAPE,Un as MQ_MAX_WIDTH_LANDSCAPE,Dn as MQ_MAX_WIDTH_PORTRAIT,kn as MQ_RIGHT_SIDEBAR_MIN_WIDTH,Er as ORIG_ID,Zt as POINTER_BUTTON,qt as POINTER_EVENTS,ce as PromisePool,re as Queue,ke as ROUGHNESS,nr as ROUNDNESS,Q as SANS_SERIF_GENERIC_FONT,Ln as SCROLL_TIMEOUT,$t as SHIFT_LOCKING_ANGLE,Ue as SIDE_RESIZING_THRESHOLD,pr as STATS_PANELS,rr as STROKE_WIDTH,Vn as SVG_DOCUMENT_PREAMBLE,Yn as SVG_NS,An as TAP_TWICE_TIMEOUT,Qn as TEXT_ALIGN,Kt as TEXT_AUTOWRAP_THRESHOLD,Xt as TEXT_TO_CENTER_SNAP_THRESHOLD,en as THEME,wn as THEME_FILTER,yn as TITLE_TIMEOUT,lr as TOOL_TYPE,hn as TOUCH_CTX_MENU_TIMEOUT,Mn as URL_HASH_KEYS,In as URL_QUERY_KEYS,Ke as UserIdleState,$n as VERSIONS,gn as VERSION_TIMEOUT,qn as VERTICAL_ALIGN,L as WINDOWS_EMOJI_FALLBACK_FONT,Qt as YOUTUBE_STATES,Sn as ZOOM_STEP,cs as addEventListener,ho as allowFullScreen,Vo as arrayToList,Go as arrayToMap,Wo as arrayToMapWithIndex,Yo as arrayToObject,rs as assertNever,Ko as bytesToHexString,io as capitalizeString,ms as castArray,mo as chunk,as as cloneJSON,ns as composeEventHandlers,po as debounce,bo as distance,Te as easeOut,To as easeToValuesRAF,me as escapeDoubleQuotes,yo as exitFullScreen,Fo as findIndex,wo as findLastIndex,ko as focusNearestParent,Ot as getAllColorsSpecificShade,so as getDateTime,bn as getExportSource,ee as getFontFamilyFallbacks,Ve as getFontFamilyString,uo as getFontString,qe as getFrame,Pe as getGenericFontFamilyFallback,Ro as getGlobalCSSVariable,Br as getGridPoint,Lr as getLineHeight,No as getNearestScrollableContainer,go as getShortcutKey,Hr as getSizeFromPoints,x as getSpecificColorShades,us as getSvgPathFromStroke,Bo as getUpdatedTimestamp,Do as getVersion,gr as getVerticalOffset,os as invariant,Mt as isAndroid,fs as isAnyTrue,Ir as isArrowKey,Mo as isBindingFallthroughEnabled,Nt as isBrave,we as isChrome,w as isDarwin,$o as isDevEnv,Pt as isFirefox,Ao as isFullScreen,Ut as isIOS,Ye as isInputLike,lo as isInteractive,Ge as isLatinChar,Fs as isLocalLink,is as isMemberOf,Qo as isPrimitive,zo as isProdEnv,es as isPromiseLike,Oo as isRTL,Je as isReadonlyArray,Jo as isRunningInIframe,Dt as isSafari,jo as isServerEnv,Qe as isShallowEqual,D as isTestEnv,ao as isToolIcon,je as isTransparent,It as isWindows,co as isWritableElement,Io as mapFind,wr as matchKey,ss as memoize,Co as muteFSAbortError,Po as nFormatter,ps as normalizeEOL,ut as normalizeLink,Ho as preventUnload,se as promiseTry,ts as queryFocusableElements,Ls as randomId,ys as randomInteger,Es as reduceToCommonValue,xo as removeSelection,Kr as rescalePoints,gs as reseed,oe as resolvablePromise,vt as rgbToHex,Ts as safelyParseJSON,So as sceneCoordsToViewportCoords,Eo as selectNode,oo as setDateTimeForTests,Pr as shouldMaintainAspectRatio,Mr as shouldResizeFromCenter,Dr as shouldRotateWithDiscreteAngle,et as sizeOf,Uo as supportsEmoji,kt as supportsResizeObserver,fo as throttleRAF,Xo as toArray,ds as toBrandedType,Ze as toIterable,ws as toValidURL,vo as tupleToCoors,_o as updateActiveTool,qo as updateObject,ls as updateStable,Lo as viewportCoordsToSceneCoords,Zo as wrapEvent};
|
|
3
|
+
`,eo=128,to={excalidraw:2,excalidrawLibrary:2},no=5,ro=.7,oo=11,so={TOP:"top",MIDDLE:"middle",BOTTOM:"bottom"},ao={LEFT:"left",CENTER:"center",RIGHT:"right"},io=20,lo=70,co=.25,uo=32,po={LEGACY:1,PROPORTIONAL_RADIUS:2,ADAPTIVE_RADIUS:3},Nt={architect:0,artist:1,cartoonist:2},fo=["thin","medium","bold"],xe={thin:1,medium:2,bold:4,extraBold:8},Ht={thin:.5,medium:1,bold:2,extraBold:4},ho=(e,t)=>e==="freedraw"?Ht[t]:xe[t],Gt="medium",mo={strokeColor:d.black,backgroundColor:d.transparent,fillStyle:"solid",strokeWidth:xe[Gt],strokeStyle:"solid",roughness:Nt.artist,opacity:100,locked:!1},Bt="library",Eo="search",To={name:"default",defaultTab:Bt},bo=new Set(["iframe","embeddable","image"]),go={selection:"selection",lasso:"lasso",rectangle:"rectangle",diamond:"diamond",ellipse:"ellipse",arrow:"arrow",line:"line",freedraw:"freedraw",text:"text",image:"image",eraser:"eraser",hand:"hand",frame:"frame",magicframe:"magicframe",embeddable:"embeddable",laser:"laser",autoshape:"autoshape",bucketfill:"bucketfill"},_o={OAI_API_KEY:"excalidraw-oai-api-key",MERMAID_TO_EXCALIDRAW:"mermaid-to-excalidraw",PUBLISH_LIBRARY:"publish-library-data"},Ao="Untitled",xo={generalStats:1,elementProperties:2},yo=1,vo={sharp:"sharp",round:"round",elbow:"elbow"},So=.3,Mo="element",Ro=Symbol.for("__test__originalId__"),Kt=(r=>(r.ACTIVE="active",r.AWAY="away",r.IDLE="idle",r))(Kt||{}),Lo=20,Oo=35,wo=700,Fo={background:"var(--mobile-action-button-bg)"},Io=.5,Co=.2;p();var U={[T.Excalifont]:{metrics:{unitsPerEm:1e3,ascender:886,descender:-374,lineHeight:1.25}},[T.Nunito]:{metrics:{unitsPerEm:1e3,ascender:1011,descender:-353,lineHeight:1.25}},[T["Lilita One"]]:{metrics:{unitsPerEm:1e3,ascender:923,descender:-220,lineHeight:1.15}},[T["Comic Shanns"]]:{metrics:{unitsPerEm:1e3,ascender:750,descender:-250,lineHeight:1.25}},[T.Virgil]:{metrics:{unitsPerEm:1e3,ascender:886,descender:-374,lineHeight:1.25},deprecated:!0},[T.Helvetica]:{metrics:{unitsPerEm:2048,ascender:1577,descender:-471,lineHeight:1.15},deprecated:!0,local:!0},[T.Cascadia]:{metrics:{unitsPerEm:2048,ascender:1900,descender:-480,lineHeight:1.2},deprecated:!0},[T["Liberation Sans"]]:{metrics:{unitsPerEm:2048,ascender:1854,descender:-434,lineHeight:1.15},private:!0},[T.Assistant]:{metrics:{unitsPerEm:2048,ascender:1021,descender:-287,lineHeight:1.25},private:!0},[Y.Xiaolai]:{metrics:{unitsPerEm:1e3,ascender:880,descender:-144,lineHeight:1.25},fallback:!0},[Y["Segoe UI Emoji"]]:{metrics:{unitsPerEm:1e3,ascender:886,descender:-374,lineHeight:1.25},local:!0,fallback:!0}},Uo={LATIN:"U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD",LATIN_EXT:"U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF",CYRILIC_EXT:"U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F",CYRILIC:"U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116",VIETNAMESE:"U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB"},No="local:",Ho=(e,t,n)=>{let{unitsPerEm:r,ascender:o,descender:s}=U[e]?.metrics||U[T.Excalifont].metrics,i=t/r,a=(n-i*o+i*s)/2;return i*o+a},Go=e=>{let{lineHeight:t}=U[e]?.metrics||U[T.Excalifont].metrics;return t};p();var ye=class{jobs=[];running=!1;tick(){if(this.running)return;let t=this.jobs.shift();t?(this.running=!0,t.promise.resolve(Se(t.jobFactory,...t.args).finally(()=>{this.running=!1,this.tick()}))):this.running=!1}push(t,...n){let r=ve();return this.jobs.push({jobFactory:t,promise:r,args:n}),this.tick(),r}};p();p();var Me="excalidraw.desktopUIMode",$o=599,zo=1e3,Xo=500,jo=600,qo=1180,Zo=1440,Qo=1229,Re=/Mac|iPod|iPhone|iPad/.test(navigator.platform),Jo=/^Win/.test(navigator.platform),Le=/\b(android)\b/i.test(navigator.userAgent),es=typeof window<"u"&&"netscape"in window&&navigator.userAgent.indexOf("rv:")>1&&navigator.userAgent.indexOf("Gecko")>1,Wt=navigator.userAgent.indexOf("Chrome")!==-1,ts=!Wt&&navigator.userAgent.indexOf("Safari")!==-1,Oe=/iPad|iPhone/i.test(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document,ns=()=>navigator.brave?.isBrave?.name==="isBrave",Vt=(e,t)=>e<=599||t<500&&e<1e3,Yt=(e,t)=>{let n=Math.min(e,t),r=Math.max(e,t);return n>=600&&r<=1180},$t=()=>{let e=navigator.userAgent||"",t=navigator.platform||"",n=navigator.userAgentData;if(n){let o=(n.platform||"").toLowerCase(),s=o==="windows"||o==="macos"||o==="linux"||o==="chrome os";if(n.mobile===!0)return!0;if(n.mobile===!1&&o==="android")return matchMedia?.("(hover: none)").matches&&matchMedia?.("(pointer: coarse)").matches;if(s)return!1}if(Oe)return!0;if(Le){let o=/Mobile/i.test(e);if(o||!o)return matchMedia?.("(hover: none)").matches&&matchMedia?.("(pointer: coarse)").matches}return/Win|Linux|CrOS|Mac/.test(t)||/Windows NT|X11|CrOS|Macintosh/.test(e),!1},rs=(e,t)=>Vt(e,t)?"phone":Yt(e,t)?"tablet":"desktop",os=e=>e.formFactor==="phone"?"mobile":e.formFactor==="tablet"?"compact":e.desktopUIMode,ss=e=>{let t=e??"",n="unknown";return Oe?n="ios":Le?n="android":t&&(n="other"),{isMobileDevice:$t(),platform:n}},as=()=>{if(typeof window>"u")return null;try{let e=window.localStorage.getItem(Me);if(e==="compact"||e==="full")return e}catch{}return null},zt=e=>{if(!(typeof window>"u"))try{window.localStorage.setItem(Me,e)}catch{}},is=e=>{if(!(e!=="compact"&&e!=="full"))return zt(e),e};var we={EQUAL:"Equal",MINUS:"Minus",NUM_ADD:"NumpadAdd",NUM_SUBTRACT:"NumpadSubtract",NUM_ZERO:"Numpad0",BRACKET_RIGHT:"BracketRight",BRACKET_LEFT:"BracketLeft",ONE:"Digit1",TWO:"Digit2",THREE:"Digit3",NINE:"Digit9",QUOTE:"Quote",ZERO:"Digit0",SLASH:"Slash",C:"KeyC",D:"KeyD",H:"KeyH",V:"KeyV",Z:"KeyZ",Y:"KeyY",R:"KeyR",S:"KeyS"},M={ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ARROW_UP:"ArrowUp",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",BACKSPACE:"Backspace",ALT:"Alt",CTRL_OR_CMD:Re?"metaKey":"ctrlKey",DELETE:"Delete",ENTER:"Enter",ESCAPE:"Escape",QUESTION_MARK:"?",SPACE:" ",TAB:"Tab",CHEVRON_LEFT:"<",CHEVRON_RIGHT:">",PERIOD:".",COMMA:",",SUBTRACT:"-",SLASH:"/",A:"a",B:"b",C:"c",D:"d",E:"e",F:"f",G:"g",H:"h",I:"i",L:"l",O:"o",P:"p",Q:"q",R:"r",S:"s",T:"t",V:"v",X:"x",Y:"y",Z:"z",K:"k",W:"w",0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9"},Xt=new Map([[M.Z,we.Z],[M.Y,we.Y]]),jt=e=>/^[a-z]$/.test(e.toLowerCase()),ps=(e,t)=>{if(t===e.key.toLowerCase())return!0;let n=Xt.get(t);return!!(n&&!jt(e.key)&&e.code===n)},ds=e=>e===M.ARROW_LEFT||e===M.ARROW_RIGHT||e===M.ARROW_DOWN||e===M.ARROW_UP,fs=e=>e.altKey,hs=e=>e.shiftKey,ms=e=>e.shiftKey;p();import{pointFrom as Fe,pointFromPair as qt}from"@excalidraw/math";var gs=e=>{let t=e.map(r=>r[0]),n=e.map(r=>r[1]);return{width:Math.max(...t)-Math.min(...t),height:Math.max(...n)-Math.min(...n)}},_s=(e,t,n,r)=>{let o=n.map(y=>y[e]),s=Math.max(...o),i=Math.min(...o),a=s-i,l=a===0?1:t/a,u=1/0,m=n.map(y=>{let S=y[e]*l,I=[...y];return I[e]=S,S<u&&(u=S),I});if(!r||m.length===2)return m;let b=i-u;return m.map(y=>qt(y.map((S,I)=>I===e?S+b:S)))},As=(e,t,n)=>n?Fe(Math.round(e/n)*n,Math.round(t/n)*n):Fe(e,t);p();var De=ee(Ce(),1),Pe=class{pool;entries={};constructor(t,n){this.pool=new De.default(t,n)}all(){let t=n=>{if(n.data.result){let[r,o]=n.data.result;this.entries[r]=o}};return this.pool.addEventListener("fulfilled",t),this.pool.start().then(()=>(setTimeout(()=>{this.pool.removeEventListener("fulfilled",t)}),Object.values(this.entries)))}};p();p();p();var ke=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,n)=>(n&=63,n<36?t+=n.toString(36):n<62?t+=(n-26).toString(36).toUpperCase():n>62?t+="-":t+="_",t),"");p();var w=class{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}};p();import{average as N}from"@excalidraw/math";var z=null,Us=e=>{z=e},Ns=()=>{if(z)return z;let e=new Date,t=e.getFullYear(),n=`${e.getMonth()+1}`.padStart(2,"0"),r=`${e.getDate()}`.padStart(2,"0"),o=`${e.getHours()}`.padStart(2,"0"),s=`${e.getMinutes()}`.padStart(2,"0");return`${t}-${n}-${r}-${o}${s}`},Hs=e=>e.charAt(0).toUpperCase()+e.slice(1),Gs=e=>e instanceof HTMLElement&&e.className.includes("ToolIcon"),Zt=e=>e instanceof HTMLElement&&e.dataset.type==="wysiwyg"||e instanceof HTMLBRElement||e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement,Bs=e=>Zt(e)||e instanceof Element&&!!e.closest("label, button"),Ks=e=>e instanceof HTMLElement&&e.dataset.type==="wysiwyg"||e instanceof HTMLBRElement||e instanceof HTMLTextAreaElement||e instanceof HTMLInputElement&&(e.type==="text"||e.type==="number"||e.type==="password"||e.type==="search")||e instanceof HTMLElement&&e.closest(".cm-editor")!==null,Qt=({fontFamily:e})=>{for(let[t,n]of Object.entries(T))if(n===e)return`${t}${ge(n).map(r=>`, ${r}`).join("")}`;return O},Ws=({fontSize:e,fontFamily:t})=>`${e}px ${Qt({fontFamily:t})}`,Vs=async e=>{requestAnimationFrame(()=>requestAnimationFrame(e))},Ys=(e,t)=>{let n=0,r=null,o=(...s)=>{r=s,clearTimeout(n),n=window.setTimeout(()=>{r=null,e(...s)},t)};return o.flush=()=>{if(clearTimeout(n),r){let s=r;r=null,e(...s)}},o.cancel=()=>{r=null,clearTimeout(n)},o},$s=e=>{let t=null,n=null,r=()=>{t=window.requestAnimationFrame(()=>{t=null;let s=n;n=null,s&&e(...s)})},o=(...s)=>{n=s,t===null&&r()};return o.flush=()=>{t!==null&&(cancelAnimationFrame(t),t=null),n&&(e(...n),n=null)},o.cancel=()=>{n=null,t!==null&&(cancelAnimationFrame(t),t=null)},o},zs=e=>1-Math.pow(1-e,4),Xs=(e,t)=>{if(!e.length||t<1)return[];let n=0,r=0,o=Array(Math.ceil(e.length/t));for(;n<e.length;)o[r++]=e.slice(n,n+=t);return o},js=e=>{let t=window.getSelection();if(t){let n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n)}},qs=()=>{let e=window.getSelection();e&&e.removeAllRanges()},Zs=(e,t)=>Math.abs(e-t),Qs=e=>e==="selection"||e==="lasso",Js=(e,t)=>t.type==="custom"?{...e.activeTool,type:"custom",customType:t.customType,locked:t.locked??e.activeTool.locked}:{...e.activeTool,lastActiveTool:t.lastActiveTool===void 0?e.activeTool.lastActiveTool:t.lastActiveTool,type:t.type,customType:null,locked:t.locked??e.activeTool.locked,fromSelection:t.fromSelection??!1},ea=()=>document.fullscreenElement?.nodeName==="HTML",ta=()=>document.documentElement.requestFullscreen(),na=()=>document.exitFullscreen(),ra=({clientX:e,clientY:t},{zoom:n,offsetLeft:r,offsetTop:o,scrollX:s,scrollY:i})=>{let a=(e-r)/n.value-s,l=(t-o)/n.value-i;return{x:a,y:l}},oa=({sceneX:e,sceneY:t},{zoom:n,offsetLeft:r,offsetTop:o,scrollX:s,scrollY:i})=>{let a=(e+s)*n.value+r,l=(t+i)*n.value+o;return{x:a,y:l}},sa=e=>getComputedStyle(document.documentElement).getPropertyValue(`--${e}`),Jt="A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u0300-\u0590\u0800-\u1FFF\u2C00-\uFB1C\uFDFE-\uFE6F\uFEFD-\uFFFF",en="\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC",tn=new RegExp(`^[^${Jt}]*[${en}]`),aa=e=>tn.test(e),ia=e=>{let[t,n]=e;return{x:t,y:n}},la=e=>{if(e?.name==="AbortError"){console.warn(e);return}throw e},ca=(e,t,n=0)=>{n<0&&(n=e.length+n),n=Math.min(e.length,Math.max(n,0));let r=n-1;for(;++r<e.length;)if(t(e[r],r,e))return r;return-1},ua=(e,t,n=e.length-1)=>{n<0&&(n=e.length+n),n=Math.min(e.length-1,Math.max(n,0));let r=n+1;for(;--r>-1;)if(t(e[r],r,e))return r;return-1},pa=(e,t)=>{for(let n=0;n<e.length;n++){let r=t(e[n],n);if(r!=null)return r}},ve=()=>{let e,t,n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n},da=(e,t)=>{let n=[{value:1,symbol:"b"},{value:1e3,symbol:"k"},{value:1e6,symbol:"M"},{value:1e9,symbol:"G"}],r=/\.0+$|(\.[0-9]*[1-9])0+$/,o;for(o=n.length-1;o>0&&!(e>=n[o].value);o--);return(e/n[o].value).toFixed(t).replace(r,"$1")+n[o].symbol},fa=()=>document.querySelector('meta[name="version"]')?.content||_e,ha=()=>{let t=document.createElement("canvas").getContext("2d");if(!t)return!1;let n=12;return t.fillStyle="#f00",t.textBaseline="top",t.font="32px Arial",t.fillText("\u{1F600}",0,0),t.getImageData(n,n,1,1).data[0]!==0},ma=e=>{let t=e.parentElement;for(;t;){if(t===document.body)return document;let{overflowY:n}=window.getComputedStyle(t);if(t.scrollHeight>t.clientHeight&&(n==="auto"||n==="scroll"||n==="overlay"))return t;t=t.parentElement}return document},Ea=e=>{let t=e.parentElement;for(;t;){if(t.tabIndex>-1){t.focus();return}t=t.parentElement}},Ta=e=>{e.preventDefault(),e.returnValue=""},ba=e=>Array.from(e).map(t=>`0${t.toString(16)}`.slice(-2)).join(""),ga=()=>j()?1:Date.now(),_a=e=>e instanceof Map?e:e.reduce((t,n)=>(t.set(typeof n=="string"?n:n.id,n),t),new Map),Aa=e=>e.reduce((t,n,r)=>(t.set(n.id,[n,r]),t),new Map),xa=(e,t)=>e.reduce((n,r,o)=>(n[t?t(r):o]=r,n),{}),ya=e=>e.reduce((t,n,r)=>{let o={...n,prev:null,next:null};if(r!==0){let s=t[r-1];if(o.prev=s,s.next=o,r===e.length-1){let i=t[0];o.next=i,i.prev=o}}return t.push(o),t},[]),nn=e=>Array.isArray(e)?e:e.values(),va=e=>Array.isArray(e)?e:Array.from(nn(e)),j=()=>h.MODE===k.TEST,Sa=()=>h.MODE===k.DEVELOPMENT,Ne=()=>h.MODE===k.PRODUCTION,Ma=()=>typeof process<"u"&&!0,Ra=(e,t)=>new CustomEvent(e,{detail:{nativeEvent:t},cancelable:!0}),La=(e,t)=>{let n=!1;for(let r in t){let o=t[r];if(typeof o<"u"){if(e[r]===o&&(typeof o!="object"||o===null))continue;n=!0}}return n?{...e,...t}:e},Oa=e=>{let t=typeof e;return e==null||t!=="object"&&t!=="function"},rn=()=>{try{return window.self===window.top?"top":"iframe"}catch{return"iframe"}},wa=()=>rn()==="iframe",Fa=e=>!!e&&typeof e=="object"&&"then"in e&&"catch"in e&&"finally"in e,Ia=e=>{let t=e?.querySelectorAll("button, a, input, select, textarea, div[tabindex], label[tabindex]");return t?Array.from(t).filter(n=>n.tabIndex>-1&&!n.disabled):[]},Ue=(e,t)=>Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t,on=(e,t,n,r=!1)=>{let o=Object.keys(e),s=Object.keys(t);if(o.length!==s.length)return r&&console.warn("%cisShallowEqual: objects don't have same properties ->","color: #8B4000",e,t),!1;if(n&&Array.isArray(n)){for(let i of n)if(!(e[i]===t[i]||Ue(e[i],t[i])))return r&&console.warn(`%cisShallowEqual: ${i} not equal ->`,"color: #8B4000",e[i],t[i]),!1;return!0}return o.every(i=>{let a=n?.[i],l=a?a(e[i],t[i]):e[i]===t[i]||Ue(e[i],t[i]);return!l&&r&&console.warn(`%cisShallowEqual: ${i} not equal ->`,"color: #8B4000",e[i],t[i]),l})},Ca=(e,t,{checkForDefaultPrevented:n=!0}={})=>function(o){if(e?.(o),!n||!o?.defaultPrevented)return t?.(o)},Pa=(e,t,n)=>{if(!t)return e;if(n)return console.error(t),e;throw new Error(t)};function Da(e,t){if(!e)throw new Error(t)}var ka=e=>{let t,n,r=function(o){let s=Object.entries(o);if(t){let a=!0;for(let[l,u]of s)if(t.get(l)!==u){a=!1;break}if(a)return n}let i=e(o);return t=new Map(s),n=i,i};return r.clear=()=>{t=void 0,n=void 0},r},Ua=(e,t)=>e instanceof Set||e instanceof Map?e.has(t):"includes"in e?e.includes(t):e.hasOwnProperty(t),Na=e=>JSON.parse(JSON.stringify(e)),Ha=(e,t)=>on(e,t)?e:t;function Ga(e,t,n,r){return e?(e?.addEventListener?.(t,n,r),()=>{e?.removeEventListener?.(t,n,r)}):()=>{}}function Ba(e,t=!0){let n=e.length;if(n<4)return"";let r=e[0],o=e[1],s=e[2],i=`M${r[0].toFixed(2)},${r[1].toFixed(2)} Q${o[0].toFixed(2)},${o[1].toFixed(2)} ${N(o[0],s[0]).toFixed(2)},${N(o[1],s[1]).toFixed(2)} T`;for(let a=2,l=n-1;a<l;a++)r=e[a],o=e[a+1],i+=`${N(r[0],o[0]).toFixed(2)},${N(r[1],o[1]).toFixed(2)} `;return t&&(i+="Z"),i}var Ka=e=>e.replace(/\r?\n|\r/g,`
|
|
4
|
+
`);function Wa(e){return e}var Se=async(e,...t)=>new Promise(n=>{n(e(...t))}),Va=(...e)=>Math.max(...e.map(t=>t?1:0))>0,Ya=e=>{try{return JSON.parse(e)}catch{return null}},He=e=>e.replace(/"/g,"""),$a=e=>Array.isArray(e)?e:[e],sn=e=>Array.isArray(e),an=e=>sn(e)?e.length:e instanceof Map||e instanceof Set?e.size:Object.keys(e).length,za=(e,t)=>{if(an(e)===0)return null;let n=t||(o=>o),r=null;for(let o of e){let s=n(o);if((r===null||r===s)&&s!=null)r=s;else return null}return r},Ge="excalidraw-feature-flags",X={COMPLEX_BINDINGS:!1},R=null,Xa=e=>{if(!R)try{let t=localStorage.getItem(Ge);t&&(R=JSON.parse(t)??X)}catch{}return(R||X)[e]},ja=(e,t)=>{try{R={...R||X,[e]:t},localStorage.setItem(Ge,JSON.stringify(R))}catch(n){console.error("unable to set feature flag",n)}},qa=(e,t)=>t.includes(e);var Be=new w(Date.now()),Ke=0,ni=()=>Math.floor(Be.next()*2**31),ri=e=>{Be=new w(e),Ke=0},oi=()=>j()?`id${Ke++}`:ke();p();var Ve=ee(We(),1);var Tn=e=>(e=e.trim(),e&&(0,Ve.sanitizeUrl)(He(e))),ui=e=>!!(e?.includes(location.origin)||e?.startsWith("/")),pi=e=>{if(e=Tn(e),e.startsWith("/"))return`${location.origin}${e}`;try{new URL(e)}catch{return"about:blank"}return e};p();var G=class{subscribers=[];on(...t){let n=t.flat().filter(r=>typeof r=="function");return this.subscribers.push(...n),()=>this.off(n)}once(...t){let n=t.flat().filter(o=>typeof o=="function");n.push(()=>r());let r=this.on(...n);return r}off(...t){let n=t.flat();this.subscribers=this.subscribers.filter(r=>!n.includes(r))}trigger(...t){for(let n of this.subscribers)n(...t);return this}clear(){this.subscribers=[]}};p();var Ye=class{constructor(t){this.behavior=t}emitters=new Map;lastPayload=new Map;emittedOnce=new Set;getEmitter(t){let n=this.emitters.get(t);return n||(n=new G,this.emitters.set(t,n)),n}toPromiseValue(t){return t.length===1?t[0]:t}on(t,n){let r=this.behavior[t],o=this.lastPayload.get(t);if(n)return r.replay==="last"&&o&&(queueMicrotask(()=>n(...o)),r.cardinality==="once")?()=>{}:this.getEmitter(t).on(n);if(r.cardinality!=="once"||r.replay!=="last")throw new Error(`Event "${String(t)}" requires a callback`);return o?Promise.resolve(this.toPromiseValue(o)):new Promise(s=>{this.getEmitter(t).once((...i)=>{s(this.toPromiseValue(i))})})}emit(t,...n){let r=this.behavior[t];if(!Ne()&&r.cardinality==="once"){if(this.emittedOnce.has(t))throw new Error(`Event "${String(t)}" can only be emitted once`);this.emittedOnce.add(t)}r.replay==="last"&&this.lastPayload.set(t,n);try{this.getEmitter(t).trigger(...n)}finally{r.cardinality==="once"&&this.getEmitter(t).clear()}}clear(){this.lastPayload.clear(),this.emittedOnce.clear();for(let t of this.emitters.values())t.clear();this.emitters.clear()}};p();var $e=class{constructor(t,n=Object.is){this.isEqual=n;this.value=t}version=0;value;waiters=new Set;subscribers=new Set;getSnapshot(){return{version:this.version,value:this.value}}set(t){if(this.isEqual(this.value,t))return!1;this.value=t,this.version+=1;let n=this.getSnapshot();for(let r of this.subscribers)r(n);for(let r of this.waiters)r(n);return this.waiters.clear(),!0}update(t){return this.set(t(this.value))}subscribe(t){return this.subscribers.add(t),()=>{this.subscribers.delete(t)}}pull(t=-1){return this.version!==t?Promise.resolve(this.getSnapshot()):new Promise(n=>{this.waiters.add(n)})}};p();var F=(e,t=5)=>parseFloat(e.toPrecision(t)),bn=e=>F(e.reduce((t,n)=>t+n)/e.length),q=class e{static DEBUG_LOG_TIMES=!0;static TIMES_AGGR={};static TIMES_AVG={};static LAST_DEBUG_LOG_CALL=0;static DEBUG_LOG_INTERVAL_ID=null;static LAST_FRAME_TIMESTAMP=0;static FRAME_COUNT=0;static ANIMATION_FRAME_ID=null;static scheduleAnimationFrame=()=>{e.DEBUG_LOG_INTERVAL_ID!==null&&(e.ANIMATION_FRAME_ID=requestAnimationFrame(t=>{e.LAST_FRAME_TIMESTAMP!==t&&(e.LAST_FRAME_TIMESTAMP=t,e.FRAME_COUNT++),e.DEBUG_LOG_INTERVAL_ID!==null&&e.scheduleAnimationFrame()}))};static setupInterval=()=>{e.DEBUG_LOG_INTERVAL_ID===null&&(console.info("%c(starting perf recording)","color: lime"),e.DEBUG_LOG_INTERVAL_ID=window.setInterval(e.debugLogger,1e3),e.scheduleAnimationFrame()),e.LAST_DEBUG_LOG_CALL=Date.now()};static debugLogger=()=>{if(e.DEBUG_LOG_TIMES){for(let[t,{t:n,times:r}]of Object.entries(e.TIMES_AGGR))r.length&&(console.info(t,F(r.reduce((o,s)=>o+s)),r.sort((o,s)=>o-s).map(o=>F(o))),e.TIMES_AGGR[t]={t:n,times:[]});for(let[t,{t:n,times:r,avg:o}]of Object.entries(e.TIMES_AVG))if(r.length){let s=r.reduce((a,l)=>a+l),i=F(s/e.FRAME_COUNT);console.info(t,`- ${r.length} calls - ${i}ms/frame across ${e.FRAME_COUNT} frames (${F(i/16.67*100,1)}% of frame budget)`),e.TIMES_AVG[t]={t:n,times:[],avg:o!=null?bn([o,i]):i}}}e.FRAME_COUNT=0,Date.now()-e.LAST_DEBUG_LOG_CALL>600&&e.DEBUG_LOG_INTERVAL_ID!==null&&(console.info("%c(stopping perf recording)","color: red"),window.clearInterval(e.DEBUG_LOG_INTERVAL_ID),window.cancelAnimationFrame(e.ANIMATION_FRAME_ID),e.ANIMATION_FRAME_ID=null,e.FRAME_COUNT=0,e.LAST_FRAME_TIMESTAMP=0,e.DEBUG_LOG_INTERVAL_ID=null,e.TIMES_AGGR={},e.TIMES_AVG={})};static logTime=(t,n="default")=>{e.setupInterval();let r=performance.now(),{t:o,times:s}=e.TIMES_AGGR[n]=e.TIMES_AGGR[n]||{t:0,times:[]};o&&s.push(t??r-o),e.TIMES_AGGR[n].t=r};static logTimeAverage=(t,n="default")=>{e.setupInterval();let r=performance.now(),{t:o,times:s}=e.TIMES_AVG[n]=e.TIMES_AVG[n]||{t:0,times:[]};o&&s.push(t??r-o),e.TIMES_AVG[n].t=r};static logWrapper=t=>(n,r="default")=>(...o)=>{let s=performance.now(),i=n(...o);return e[t](performance.now()-s,r),i};static logTimeWrap=e.logWrapper("logTime");static logTimeAverageWrap=e.logWrapper("logTimeAverage");static perfWrap=(t,n="default")=>(...r)=>{console.time(n);let o=t(...r);return console.timeEnd(n),o};static CHANGED_CACHE={};static logChanged(t,n){let r=e.CHANGED_CACHE[t];if(e.CHANGED_CACHE[t]=n,!r)return;let o=new Set([...Object.keys(r),...Object.keys(n)]),s={};for(let i of o){let a=r[i],l=n[i];ze(a,l)||(s[i]={prev:a,next:l})}Object.keys(s).length>0&&console.info(`[${t}] changed:`,s)}};function ze(e,t){if(Object.is(e,t))return!0;if(e===null||t===null||typeof e!="object"||typeof t!="object"||Array.isArray(e)!==Array.isArray(t))return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let o of n)if(!ze(e[o],t[o]))return!1;return!0}export{Vr as ACTIVE_THRESHOLD,Or as ALLOWED_PASTE_MIME_TYPES,Qn as APP_NAME,oo as ARROW_LABEL_FONT_SIZE_TO_MIN_WIDTH_RATIO,ro as ARROW_LABEL_WIDTH_FRACTION,vo as ARROW_TYPE,Ye as AppEventBus,wo as BIND_MODE_TIMEOUT,no as BOUND_TEXT_PADDING,Nn as BUCKET_FILL_BACKGROUND_PICKS,te as BinaryHeap,Mr as CANVAS_ONLY_ACTIONS,Eo as CANVAS_SEARCH_TAB,Ee as CJK_HAND_DRAWN_FALLBACK_FONT,dr as CLASSES,we as CODES,Pn as COLORS_PER_ROW,vr as COLOR_CHARCOAL_BLACK,Yn as COLOR_OUTLINE_CONTRAST_THRESHOLD,d as COLOR_PALETTE,Sr as COLOR_VOICE_CALL,yr as COLOR_WHITE,lr as CURSOR_TYPE,mr as DARK_THEME_FILTER,uo as DEFAULT_ADAPTIVE_RADIUS,Hn as DEFAULT_CANVAS_BACKGROUND_PICKS,Dn as DEFAULT_CHART_COLOR_INDEX,xr as DEFAULT_COLLISION_THRESHOLD,v as DEFAULT_ELEMENT_BACKGROUND_COLOR_INDEX,Bn as DEFAULT_ELEMENT_BACKGROUND_COLOR_PALETTE,Un as DEFAULT_ELEMENT_BACKGROUND_PICKS,mo as DEFAULT_ELEMENT_PROPS,D as DEFAULT_ELEMENT_STROKE_COLOR_INDEX,Gn as DEFAULT_ELEMENT_STROKE_COLOR_PALETTE,kn as DEFAULT_ELEMENT_STROKE_PICKS,Gt as DEFAULT_ELEMENT_STROKE_WIDTH_KEY,qr as DEFAULT_EXPORT_PADDING,Ao as DEFAULT_FILENAME,gr as DEFAULT_FONT_FAMILY,br as DEFAULT_FONT_SIZE,Rr as DEFAULT_GRID_SIZE,Lr as DEFAULT_GRID_STEP,Zr as DEFAULT_IMAGE_OPTIONS,ir as DEFAULT_LASER_COLOR,co as DEFAULT_PROPORTIONAL_RADIUS,So as DEFAULT_REDUCED_GLOBAL_ALPHA,To as DEFAULT_SIDEBAR,Io as DEFAULT_STROKE_STREAMLINE,Co as DEFAULT_STROKE_STREAMLINE_PRECISE,_r as DEFAULT_TEXT_ALIGN,Pt as DEFAULT_TRANSFORM_HANDLE_SPACING,zr as DEFAULT_UI_OPTIONS,_e as DEFAULT_VERSION,Ar as DEFAULT_VERTICAL_ALIGN,Oo as DOUBLE_TAP_POSITION_THRESHOLD,er as DRAGGING_THRESHOLD,q as Debug,_o as EDITOR_LS_KEYS,Mo as ELEMENT_LINK_KEY,lo as ELEMENT_PENDING_DRAW_SHAPE_OPACITY,io as ELEMENT_READY_TO_ERASE_OPACITY,rr as ELEMENT_SHIFT_TRANSLATE_AMOUNT,or as ELEMENT_TRANSLATE_AMOUNT,eo as ENCRYPTION_KEY_BITS,k as ENV,kt as EPSILON,Ft as EVENT,Fr as EXPORT_DATA_TYPES,wr as EXPORT_IMAGE_TYPES,jr as EXPORT_SCALES,G as Emitter,T as FONT_FAMILY,Y as FONT_FAMILY_FALLBACKS,It as FONT_FAMILY_GENERIC_FALLBACKS,U as FONT_METADATA,fr as FONT_SIZES,Er as FRAME_STYLE,Ht as FREEDRAW_STROKE_WIDTH,Uo as GOOGLE_FONTS_RANGES,Kr as HYPERLINK_TOOLTIP_DELAY,Wr as IDLE_THRESHOLD,Ae as IMAGE_MIME_TYPES,Cr as IMAGE_RENDER_TIMEOUT,M as KEYS,Xt as KeyCodeMap,bo as LIBRARY_DISABLED_TYPES,Bt as LIBRARY_SIDEBAR_TAB,nr as LINE_CONFIRM_THRESHOLD,Lo as LINE_POLYGON_POINT_MERGE_DISTANCE,No as LOCAL_FONT_PROTOCOL,Cn as MAX_CUSTOM_COLORS_USED_IN_CANVAS,Xr as MAX_DECIMALS_FOR_SVG_EXPORT,Br as MAX_ZOOM,me as MIME_TYPES,tr as MINIMUM_ARROW_SIZE,Tr as MIN_FONT_SIZE,yo as MIN_WIDTH_OR_HEIGHT,Gr as MIN_ZOOM,Fo as MOBILE_ACTION_BUTTON_BG,be as MONOSPACE_GENERIC_FONT,Xo as MQ_MAX_HEIGHT_LANDSCAPE,$o as MQ_MAX_MOBILE,qo as MQ_MAX_TABLET,zo as MQ_MAX_WIDTH_LANDSCAPE,jo as MQ_MIN_TABLET,Zo as MQ_MIN_WIDTH_DESKTOP,Qo as MQ_RIGHT_SIDEBAR_MIN_WIDTH,Ro as ORIG_ID,cr as POINTER_BUTTON,ur as POINTER_EVENTS,Pe as PromisePool,ye as Queue,Nt as ROUGHNESS,po as ROUNDNESS,Te as SANS_SERIF_GENERIC_FONT,Nr as SCROLL_TIMEOUT,ar as SHIFT_LOCKING_ANGLE,Dt as SIDE_RESIZING_THRESHOLD,xo as STATS_PANELS,Ut as STRING_MIME_TYPES,xe as STROKE_WIDTH,fo as STROKE_WIDTH_KEYS,Jr as SVG_DOCUMENT_PREAMBLE,Qr as SVG_NS,Pr as TAP_TWICE_TIMEOUT,ao as TEXT_ALIGN,Jn as TEXT_AUTOWRAP_THRESHOLD,sr as TEXT_TO_CENTER_SNAP_THRESHOLD,hr as THEME,kr as TITLE_TIMEOUT,go as TOOL_TYPE,Dr as TOUCH_CTX_MENU_TIMEOUT,$r as URL_HASH_KEYS,Yr as URL_QUERY_KEYS,Kt as UserIdleState,to as VERSIONS,Ur as VERSION_TIMEOUT,so as VERTICAL_ALIGN,$e as VersionedSnapshotStore,O as WINDOWS_EMOJI_FALLBACK_FONT,pr as YOUTUBE_STATES,Hr as ZOOM_STEP,Ga as addEventListener,ta as allowFullScreen,Fn as applyDarkModeFilter,ya as arrayToList,_a as arrayToMap,Aa as arrayToMapWithIndex,xa as arrayToObject,Pa as assertNever,ba as bytesToHexString,Hs as capitalizeString,$a as castArray,Xs as chunk,Na as cloneJSON,Wn as colorToHex,Ca as composeEventHandlers,ss as createUserAgentDescriptor,Ys as debounce,os as deriveStylesPanelMode,Zs as distance,zs as easeOut,He as escapeDoubleQuotes,na as exitFullScreen,ca as findIndex,ua as findLastIndex,Ea as focusNearestParent,Kn as getAllColorsSpecificShade,Ns as getDateTime,Ir as getExportSource,Xa as getFeatureFlag,ge as getFontFamilyFallbacks,Qt as getFontFamilyString,Ws as getFontString,rs as getFormFactor,rn as getFrame,Ct as getGenericFontFamilyFallback,sa as getGlobalCSSVariable,As as getGridPoint,Go as getLineHeight,ma as getNearestScrollableContainer,gs as getSizeFromPoints,ho as getStrokeWidthByKey,Ba as getSvgPathFromStroke,ga as getUpdatedTimestamp,fa as getVersion,Ho as getVerticalOffset,Da as invariant,Le as isAndroid,Va as isAnyTrue,ds as isArrowKey,yn as isBounds,ns as isBrave,Wt as isChrome,$n as isColorDark,Re as isDarwin,Sa as isDevEnv,es as isFirefox,ea as isFullScreen,Oe as isIOS,Zt as isInputLike,Bs as isInteractive,jt as isLatinChar,ui as isLocalLink,Ua as isMemberOf,Vt as isMobileBreakpoint,Vn as isOpaqueColor,Oa as isPrimitive,Ne as isProdEnv,Fa as isPromiseLike,aa as isRTL,sn as isReadonlyArray,wa as isRunningInIframe,ts as isSafari,Qs as isSelectionLikeTool,Ma as isServerEnv,on as isShallowEqual,Yt as isTabletBreakpoint,j as isTestEnv,Gs as isToolIcon,he as isTransparent,Jo as isWindows,Ks as isWritableElement,as as loadDesktopUIModePreference,pa as mapFind,ps as matchKey,ka as memoize,la as muteFSAbortError,da as nFormatter,Vs as nextAnimationFrame,Ka as normalizeEOL,zn as normalizeInputColor,Tn as normalizeLink,qa as oneOf,Ta as preventUnload,Se as promiseTry,Ia as queryFocusableElements,oi as randomId,ni as randomInteger,za as reduceToCommonValue,In as removeDarkModeFilter,qs as removeSelection,_s as rescalePoints,ri as reseed,ve as resolvablePromise,V as rgbToHex,Ya as safelyParseJSON,oa as sceneCoordsToViewportCoords,js as selectNode,Us as setDateTimeForTests,is as setDesktopUIMode,ja as setFeatureFlag,hs as shouldMaintainAspectRatio,fs as shouldResizeFromCenter,ms as shouldRotateWithDiscreteAngle,an as sizeOf,ha as supportsEmoji,Zn as supportsResizeObserver,$s as throttleRAF,va as toArray,Wa as toBrandedType,nn as toIterable,pi as toValidURL,ia as tupleToCoors,Js as updateActiveTool,La as updateObject,Ha as updateStable,ra as viewportCoordsToSceneCoords,Ra as wrapEvent};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare class Debug {
|
|
2
|
+
static DEBUG_LOG_TIMES: boolean;
|
|
3
|
+
private static TIMES_AGGR;
|
|
4
|
+
private static TIMES_AVG;
|
|
5
|
+
private static LAST_DEBUG_LOG_CALL;
|
|
6
|
+
private static DEBUG_LOG_INTERVAL_ID;
|
|
7
|
+
private static LAST_FRAME_TIMESTAMP;
|
|
8
|
+
private static FRAME_COUNT;
|
|
9
|
+
private static ANIMATION_FRAME_ID;
|
|
10
|
+
private static scheduleAnimationFrame;
|
|
11
|
+
private static setupInterval;
|
|
12
|
+
private static debugLogger;
|
|
13
|
+
static logTime: (time?: number, name?: string) => void;
|
|
14
|
+
static logTimeAverage: (time?: number, name?: string) => void;
|
|
15
|
+
private static logWrapper;
|
|
16
|
+
static logTimeWrap: <T extends any[], R>(fn: (...args: T) => R, name?: string) => (...args: T) => R;
|
|
17
|
+
static logTimeAverageWrap: <T extends any[], R>(fn: (...args: T) => R, name?: string) => (...args: T) => R;
|
|
18
|
+
static perfWrap: <T extends any[], R>(fn: (...args: T) => R, name?: string) => (...args: T) => R;
|
|
19
|
+
private static CHANGED_CACHE;
|
|
20
|
+
static logChanged(name: string, obj: Record<string, unknown>): void;
|
|
21
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { UnsubscribeCallback } from "@excalidraw/excalidraw/types";
|
|
2
|
+
export type AppEventPayloadMap = Record<string, unknown[]>;
|
|
3
|
+
export type AppEventBehavior = {
|
|
4
|
+
cardinality: "once" | "many";
|
|
5
|
+
replay: "none" | "last";
|
|
6
|
+
};
|
|
7
|
+
export type AppEventBehaviorMap<Events extends AppEventPayloadMap> = {
|
|
8
|
+
[K in keyof Events]: AppEventBehavior;
|
|
9
|
+
};
|
|
10
|
+
type AwaitableAppEventKeys<Events extends AppEventPayloadMap, Behavior extends AppEventBehaviorMap<Events>> = {
|
|
11
|
+
[K in keyof Events]: Behavior[K]["cardinality"] extends "once" ? Behavior[K]["replay"] extends "last" ? K : never : never;
|
|
12
|
+
}[keyof Events];
|
|
13
|
+
type AppEventPromiseValue<Args extends any[]> = Args extends [infer Only] ? Only : Args;
|
|
14
|
+
export declare class AppEventBus<Events extends AppEventPayloadMap, Behavior extends AppEventBehaviorMap<Events>> {
|
|
15
|
+
private readonly behavior;
|
|
16
|
+
private readonly emitters;
|
|
17
|
+
private readonly lastPayload;
|
|
18
|
+
private readonly emittedOnce;
|
|
19
|
+
constructor(behavior: Behavior);
|
|
20
|
+
private getEmitter;
|
|
21
|
+
private toPromiseValue;
|
|
22
|
+
on<K extends keyof Events>(name: K, callback: (...args: Events[K]) => void): UnsubscribeCallback;
|
|
23
|
+
on<K extends AwaitableAppEventKeys<Events, Behavior>>(name: K): Promise<AppEventPromiseValue<Events[K]>>;
|
|
24
|
+
emit<K extends keyof Events>(name: K, ...args: Events[K]): void;
|
|
25
|
+
clear(): void;
|
|
26
|
+
}
|
|
27
|
+
export {};
|
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export declare const COLOR_OUTLINE_CONTRAST_THRESHOLD = 240;
|
|
4
|
-
export type ColorPickerColor = Exclude<keyof oc, "indigo" | "lime"> | "transparent" | "bronze";
|
|
1
|
+
export declare const applyDarkModeFilter: (color: string, enable?: boolean) => string;
|
|
2
|
+
export declare const removeDarkModeFilter: (color: string) => string;
|
|
5
3
|
export type ColorTuple = readonly [string, string, string, string, string];
|
|
6
|
-
export type ColorPalette = Merge<Record<ColorPickerColor, ColorTuple>, {
|
|
7
|
-
black: "#1e1e1e";
|
|
8
|
-
white: "#ffffff";
|
|
9
|
-
transparent: "transparent";
|
|
10
|
-
}>;
|
|
11
4
|
export type ColorPaletteCustom = {
|
|
12
5
|
[key: string]: ColorTuple | string;
|
|
13
6
|
};
|
|
@@ -17,46 +10,83 @@ export declare const COLORS_PER_ROW = 5;
|
|
|
17
10
|
export declare const DEFAULT_CHART_COLOR_INDEX = 4;
|
|
18
11
|
export declare const DEFAULT_ELEMENT_STROKE_COLOR_INDEX = 4;
|
|
19
12
|
export declare const DEFAULT_ELEMENT_BACKGROUND_COLOR_INDEX = 1;
|
|
20
|
-
export declare const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
13
|
+
export declare const COLOR_PALETTE: {
|
|
14
|
+
readonly transparent: "transparent";
|
|
15
|
+
readonly black: "#1e1e1e";
|
|
16
|
+
readonly white: "#ffffff";
|
|
17
|
+
readonly gray: readonly ["#f8f9fa", "#e9ecef", "#ced4da", "#868e96", "#343a40"];
|
|
18
|
+
readonly red: readonly ["#fff5f5", "#ffc9c9", "#ff8787", "#fa5252", "#e03131"];
|
|
19
|
+
readonly pink: readonly ["#fff0f6", "#fcc2d7", "#f783ac", "#e64980", "#c2255c"];
|
|
20
|
+
readonly grape: readonly ["#f8f0fc", "#eebefa", "#da77f2", "#be4bdb", "#9c36b5"];
|
|
21
|
+
readonly violet: readonly ["#f3f0ff", "#d0bfff", "#9775fa", "#7950f2", "#6741d9"];
|
|
22
|
+
readonly blue: readonly ["#e7f5ff", "#a5d8ff", "#4dabf7", "#228be6", "#1971c2"];
|
|
23
|
+
readonly cyan: readonly ["#e3fafc", "#99e9f2", "#3bc9db", "#15aabf", "#0c8599"];
|
|
24
|
+
readonly teal: readonly ["#e6fcf5", "#96f2d7", "#38d9a9", "#12b886", "#099268"];
|
|
25
|
+
readonly green: readonly ["#ebfbee", "#b2f2bb", "#69db7c", "#40c057", "#2f9e44"];
|
|
26
|
+
readonly yellow: readonly ["#fff9db", "#ffec99", "#ffd43b", "#fab005", "#f08c00"];
|
|
27
|
+
readonly orange: readonly ["#fff4e6", "#ffd8a8", "#ffa94d", "#fd7e14", "#e8590c"];
|
|
28
|
+
readonly bronze: readonly ["#f8f1ee", "#eaddd7", "#d2bab0", "#a18072", "#846358"];
|
|
29
|
+
};
|
|
30
|
+
export type ColorPalette = typeof COLOR_PALETTE;
|
|
31
|
+
export type ColorPickerColor = keyof typeof COLOR_PALETTE;
|
|
24
32
|
export declare const DEFAULT_ELEMENT_STROKE_PICKS: ColorTuple;
|
|
25
33
|
export declare const DEFAULT_ELEMENT_BACKGROUND_PICKS: ColorTuple;
|
|
34
|
+
export declare const BUCKET_FILL_BACKGROUND_PICKS: ColorTuple;
|
|
26
35
|
export declare const DEFAULT_CANVAS_BACKGROUND_PICKS: ColorTuple;
|
|
27
36
|
export declare const DEFAULT_ELEMENT_STROKE_COLOR_PALETTE: {
|
|
28
|
-
readonly
|
|
29
|
-
readonly
|
|
30
|
-
readonly
|
|
31
|
-
readonly
|
|
32
|
-
readonly
|
|
33
|
-
readonly
|
|
34
|
-
readonly teal:
|
|
35
|
-
readonly
|
|
36
|
-
readonly
|
|
37
|
-
readonly
|
|
37
|
+
readonly cyan: readonly ["#e3fafc", "#99e9f2", "#3bc9db", "#15aabf", "#0c8599"];
|
|
38
|
+
readonly blue: readonly ["#e7f5ff", "#a5d8ff", "#4dabf7", "#228be6", "#1971c2"];
|
|
39
|
+
readonly violet: readonly ["#f3f0ff", "#d0bfff", "#9775fa", "#7950f2", "#6741d9"];
|
|
40
|
+
readonly grape: readonly ["#f8f0fc", "#eebefa", "#da77f2", "#be4bdb", "#9c36b5"];
|
|
41
|
+
readonly pink: readonly ["#fff0f6", "#fcc2d7", "#f783ac", "#e64980", "#c2255c"];
|
|
42
|
+
readonly green: readonly ["#ebfbee", "#b2f2bb", "#69db7c", "#40c057", "#2f9e44"];
|
|
43
|
+
readonly teal: readonly ["#e6fcf5", "#96f2d7", "#38d9a9", "#12b886", "#099268"];
|
|
44
|
+
readonly yellow: readonly ["#fff9db", "#ffec99", "#ffd43b", "#fab005", "#f08c00"];
|
|
45
|
+
readonly orange: readonly ["#fff4e6", "#ffd8a8", "#ffa94d", "#fd7e14", "#e8590c"];
|
|
46
|
+
readonly red: readonly ["#fff5f5", "#ffc9c9", "#ff8787", "#fa5252", "#e03131"];
|
|
38
47
|
readonly transparent: "transparent";
|
|
39
48
|
readonly white: "#ffffff";
|
|
40
|
-
readonly gray:
|
|
49
|
+
readonly gray: readonly ["#f8f9fa", "#e9ecef", "#ced4da", "#868e96", "#343a40"];
|
|
41
50
|
readonly black: "#1e1e1e";
|
|
42
|
-
readonly bronze:
|
|
51
|
+
readonly bronze: readonly ["#f8f1ee", "#eaddd7", "#d2bab0", "#a18072", "#846358"];
|
|
43
52
|
};
|
|
44
53
|
export declare const DEFAULT_ELEMENT_BACKGROUND_COLOR_PALETTE: {
|
|
45
|
-
readonly
|
|
46
|
-
readonly
|
|
47
|
-
readonly
|
|
48
|
-
readonly
|
|
49
|
-
readonly
|
|
50
|
-
readonly
|
|
51
|
-
readonly teal:
|
|
52
|
-
readonly
|
|
53
|
-
readonly
|
|
54
|
-
readonly
|
|
54
|
+
readonly cyan: readonly ["#e3fafc", "#99e9f2", "#3bc9db", "#15aabf", "#0c8599"];
|
|
55
|
+
readonly blue: readonly ["#e7f5ff", "#a5d8ff", "#4dabf7", "#228be6", "#1971c2"];
|
|
56
|
+
readonly violet: readonly ["#f3f0ff", "#d0bfff", "#9775fa", "#7950f2", "#6741d9"];
|
|
57
|
+
readonly grape: readonly ["#f8f0fc", "#eebefa", "#da77f2", "#be4bdb", "#9c36b5"];
|
|
58
|
+
readonly pink: readonly ["#fff0f6", "#fcc2d7", "#f783ac", "#e64980", "#c2255c"];
|
|
59
|
+
readonly green: readonly ["#ebfbee", "#b2f2bb", "#69db7c", "#40c057", "#2f9e44"];
|
|
60
|
+
readonly teal: readonly ["#e6fcf5", "#96f2d7", "#38d9a9", "#12b886", "#099268"];
|
|
61
|
+
readonly yellow: readonly ["#fff9db", "#ffec99", "#ffd43b", "#fab005", "#f08c00"];
|
|
62
|
+
readonly orange: readonly ["#fff4e6", "#ffd8a8", "#ffa94d", "#fd7e14", "#e8590c"];
|
|
63
|
+
readonly red: readonly ["#fff5f5", "#ffc9c9", "#ff8787", "#fa5252", "#e03131"];
|
|
55
64
|
readonly transparent: "transparent";
|
|
56
65
|
readonly white: "#ffffff";
|
|
57
|
-
readonly gray:
|
|
66
|
+
readonly gray: readonly ["#f8f9fa", "#e9ecef", "#ced4da", "#868e96", "#343a40"];
|
|
58
67
|
readonly black: "#1e1e1e";
|
|
59
|
-
readonly bronze:
|
|
68
|
+
readonly bronze: readonly ["#f8f1ee", "#eaddd7", "#d2bab0", "#a18072", "#846358"];
|
|
60
69
|
};
|
|
61
|
-
export declare const getAllColorsSpecificShade: (index: 0 | 1 | 2 | 3 | 4) =>
|
|
62
|
-
export declare const rgbToHex: (r: number, g: number, b: number) => string;
|
|
70
|
+
export declare const getAllColorsSpecificShade: (index: 0 | 1 | 2 | 3 | 4) => ("#fff5f5" | "#ffc9c9" | "#ff8787" | "#fa5252" | "#e03131" | "#fff0f6" | "#fcc2d7" | "#f783ac" | "#e64980" | "#c2255c" | "#f8f0fc" | "#eebefa" | "#da77f2" | "#be4bdb" | "#9c36b5" | "#f3f0ff" | "#d0bfff" | "#9775fa" | "#7950f2" | "#6741d9" | "#e7f5ff" | "#a5d8ff" | "#4dabf7" | "#228be6" | "#1971c2" | "#e3fafc" | "#99e9f2" | "#3bc9db" | "#15aabf" | "#0c8599" | "#e6fcf5" | "#96f2d7" | "#38d9a9" | "#12b886" | "#099268" | "#ebfbee" | "#b2f2bb" | "#69db7c" | "#40c057" | "#2f9e44" | "#fff9db" | "#ffec99" | "#ffd43b" | "#fab005" | "#f08c00" | "#fff4e6" | "#ffd8a8" | "#ffa94d" | "#fd7e14" | "#e8590c")[];
|
|
71
|
+
export declare const rgbToHex: (r: number, g: number, b: number, a?: number) => string;
|
|
72
|
+
/**
|
|
73
|
+
* @returns #RRGGBB or #RRGGBBAA based on color containing non-opaque alpha,
|
|
74
|
+
* null if not valid color
|
|
75
|
+
*/
|
|
76
|
+
export declare const colorToHex: (color: string) => string | null;
|
|
77
|
+
export declare const isTransparent: (color: string) => boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Whether the color is fully opaque (alpha exactly 1).
|
|
80
|
+
*
|
|
81
|
+
* NOT the negation of `isTransparent`, which is true only at alpha 0 — a
|
|
82
|
+
* partial-alpha color (`#RRGGBBAA`, `rgba(…, 0.5)`) is neither transparent
|
|
83
|
+
* (it renders) nor opaque (what's beneath shows through it).
|
|
84
|
+
*/
|
|
85
|
+
export declare const isOpaqueColor: (color: string) => boolean;
|
|
86
|
+
export declare const COLOR_OUTLINE_CONTRAST_THRESHOLD = 240;
|
|
87
|
+
export declare const isColorDark: (color: string, threshold?: number) => boolean;
|
|
88
|
+
/**
|
|
89
|
+
* tries to keep the input color as-is if it's valid, making minimal adjustments
|
|
90
|
+
* (trimming whitespace or adding `#` to hex colors)
|
|
91
|
+
*/
|
|
92
|
+
export declare const normalizeInputColor: (color: string) => string | null;
|
|
@@ -1,13 +1,5 @@
|
|
|
1
1
|
import type { ExcalidrawElement, FontFamilyValues } from "@excalidraw/element/types";
|
|
2
2
|
import type { AppProps, AppState } from "@excalidraw/excalidraw/types";
|
|
3
|
-
export declare const isDarwin: boolean;
|
|
4
|
-
export declare const isWindows: boolean;
|
|
5
|
-
export declare const isAndroid: boolean;
|
|
6
|
-
export declare const isFirefox: boolean;
|
|
7
|
-
export declare const isChrome: boolean;
|
|
8
|
-
export declare const isSafari: boolean;
|
|
9
|
-
export declare const isIOS: boolean;
|
|
10
|
-
export declare const isBrave: () => boolean;
|
|
11
3
|
export declare const supportsResizeObserver: boolean;
|
|
12
4
|
export declare const APP_NAME = "Excalidraw";
|
|
13
5
|
export declare const TEXT_AUTOWRAP_THRESHOLD = 36;
|
|
@@ -86,10 +78,20 @@ export declare const ENV: {
|
|
|
86
78
|
PRODUCTION: string;
|
|
87
79
|
};
|
|
88
80
|
export declare const CLASSES: {
|
|
81
|
+
SIDEBAR: string;
|
|
89
82
|
SHAPE_ACTIONS_MENU: string;
|
|
90
83
|
ZOOM_ACTIONS: string;
|
|
91
84
|
SEARCH_MENU_INPUT_WRAPPER: string;
|
|
92
85
|
CONVERT_ELEMENT_TYPE_POPUP: string;
|
|
86
|
+
SHAPE_ACTIONS_THEME_SCOPE: string;
|
|
87
|
+
FRAME_NAME: string;
|
|
88
|
+
DROPDOWN_MENU_EVENT_WRAPPER: string;
|
|
89
|
+
};
|
|
90
|
+
export declare const FONT_SIZES: {
|
|
91
|
+
readonly sm: 16;
|
|
92
|
+
readonly md: 20;
|
|
93
|
+
readonly lg: 28;
|
|
94
|
+
readonly xl: 36;
|
|
93
95
|
};
|
|
94
96
|
export declare const CJK_HAND_DRAWN_FALLBACK_FONT = "Xiaolai";
|
|
95
97
|
export declare const WINDOWS_EMOJI_FALLBACK_FONT = "Segoe UI Emoji";
|
|
@@ -130,17 +132,15 @@ export declare const THEME: {
|
|
|
130
132
|
readonly LIGHT: "light";
|
|
131
133
|
readonly DARK: "dark";
|
|
132
134
|
};
|
|
135
|
+
export declare const DARK_THEME_FILTER = "invert(93%) hue-rotate(180deg)";
|
|
133
136
|
export declare const FRAME_STYLE: {
|
|
134
|
-
strokeColor:
|
|
135
|
-
strokeWidth:
|
|
136
|
-
strokeStyle:
|
|
137
|
-
fillStyle:
|
|
138
|
-
roughness:
|
|
139
|
-
roundness:
|
|
140
|
-
|
|
141
|
-
value?: number | undefined;
|
|
142
|
-
} | null;
|
|
143
|
-
backgroundColor: string;
|
|
137
|
+
strokeColor: ExcalidrawElement["strokeColor"];
|
|
138
|
+
strokeWidth: ExcalidrawElement["strokeWidth"];
|
|
139
|
+
strokeStyle: ExcalidrawElement["strokeStyle"];
|
|
140
|
+
fillStyle: ExcalidrawElement["fillStyle"];
|
|
141
|
+
roughness: ExcalidrawElement["roughness"];
|
|
142
|
+
roundness: ExcalidrawElement["roundness"];
|
|
143
|
+
backgroundColor: ExcalidrawElement["backgroundColor"];
|
|
144
144
|
radius: number;
|
|
145
145
|
nameOffsetY: number;
|
|
146
146
|
nameColorLightTheme: string;
|
|
@@ -175,6 +175,15 @@ export declare const IMAGE_MIME_TYPES: {
|
|
|
175
175
|
readonly avif: "image/avif";
|
|
176
176
|
readonly jfif: "image/jfif";
|
|
177
177
|
};
|
|
178
|
+
export declare const STRING_MIME_TYPES: {
|
|
179
|
+
readonly text: "text/plain";
|
|
180
|
+
readonly html: "text/html";
|
|
181
|
+
readonly json: "application/json";
|
|
182
|
+
readonly excalidraw: "application/vnd.excalidraw+json";
|
|
183
|
+
readonly excalidrawClipboard: "application/vnd.excalidraw.clipboard+json";
|
|
184
|
+
readonly excalidrawlib: "application/vnd.excalidrawlib+json";
|
|
185
|
+
readonly excalidrawlibIds: "application/vnd.excalidrawlib.ids+json";
|
|
186
|
+
};
|
|
178
187
|
export declare const MIME_TYPES: {
|
|
179
188
|
readonly svg: "image/svg+xml";
|
|
180
189
|
readonly png: "image/png";
|
|
@@ -185,14 +194,16 @@ export declare const MIME_TYPES: {
|
|
|
185
194
|
readonly ico: "image/x-icon";
|
|
186
195
|
readonly avif: "image/avif";
|
|
187
196
|
readonly jfif: "image/jfif";
|
|
197
|
+
readonly "excalidraw.svg": "image/svg+xml";
|
|
198
|
+
readonly "excalidraw.png": "image/png";
|
|
199
|
+
readonly binary: "application/octet-stream";
|
|
188
200
|
readonly text: "text/plain";
|
|
189
201
|
readonly html: "text/html";
|
|
190
202
|
readonly json: "application/json";
|
|
191
203
|
readonly excalidraw: "application/vnd.excalidraw+json";
|
|
204
|
+
readonly excalidrawClipboard: "application/vnd.excalidraw.clipboard+json";
|
|
192
205
|
readonly excalidrawlib: "application/vnd.excalidrawlib+json";
|
|
193
|
-
readonly
|
|
194
|
-
readonly "excalidraw.png": "image/png";
|
|
195
|
-
readonly binary: "application/octet-stream";
|
|
206
|
+
readonly excalidrawlibIds: "application/vnd.excalidrawlib.ids+json";
|
|
196
207
|
};
|
|
197
208
|
export declare const ALLOWED_PASTE_MIME_TYPES: readonly ["text/plain", "text/html", ...("image/svg+xml" | "image/png" | "image/jpeg" | "image/gif" | "image/webp" | "image/bmp" | "image/x-icon" | "image/avif" | "image/jfif")[]];
|
|
198
209
|
export declare const EXPORT_IMAGE_TYPES: {
|
|
@@ -219,7 +230,6 @@ export declare const MAX_ZOOM = 30;
|
|
|
219
230
|
export declare const HYPERLINK_TOOLTIP_DELAY = 300;
|
|
220
231
|
export declare const IDLE_THRESHOLD = 60000;
|
|
221
232
|
export declare const ACTIVE_THRESHOLD = 3000;
|
|
222
|
-
export declare const THEME_FILTER = "invert(93%) hue-rotate(180deg)";
|
|
223
233
|
export declare const URL_QUERY_KEYS: {
|
|
224
234
|
readonly addLibrary: "addLibrary";
|
|
225
235
|
};
|
|
@@ -227,15 +237,10 @@ export declare const URL_HASH_KEYS: {
|
|
|
227
237
|
readonly addLibrary: "addLibrary";
|
|
228
238
|
};
|
|
229
239
|
export declare const DEFAULT_UI_OPTIONS: AppProps["UIOptions"];
|
|
230
|
-
export declare const MQ_MAX_WIDTH_PORTRAIT = 730;
|
|
231
|
-
export declare const MQ_MAX_WIDTH_LANDSCAPE = 1000;
|
|
232
|
-
export declare const MQ_MAX_HEIGHT_LANDSCAPE = 500;
|
|
233
|
-
export declare const MQ_RIGHT_SIDEBAR_MIN_WIDTH = 1229;
|
|
234
240
|
export declare const MAX_DECIMALS_FOR_SVG_EXPORT = 2;
|
|
235
241
|
export declare const EXPORT_SCALES: number[];
|
|
236
242
|
export declare const DEFAULT_EXPORT_PADDING = 10;
|
|
237
|
-
export declare const
|
|
238
|
-
export declare const MAX_ALLOWED_FILE_BYTES: number;
|
|
243
|
+
export declare const DEFAULT_IMAGE_OPTIONS: AppProps["imageOptions"];
|
|
239
244
|
export declare const SVG_NS = "http://www.w3.org/2000/svg";
|
|
240
245
|
export declare const SVG_DOCUMENT_PREAMBLE = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n";
|
|
241
246
|
export declare const ENCRYPTION_KEY_BITS = 128;
|
|
@@ -257,6 +262,7 @@ export declare const TEXT_ALIGN: {
|
|
|
257
262
|
RIGHT: string;
|
|
258
263
|
};
|
|
259
264
|
export declare const ELEMENT_READY_TO_ERASE_OPACITY = 20;
|
|
265
|
+
export declare const ELEMENT_PENDING_DRAW_SHAPE_OPACITY = 70;
|
|
260
266
|
export declare const DEFAULT_PROPORTIONAL_RADIUS = 0.25;
|
|
261
267
|
export declare const DEFAULT_ADAPTIVE_RADIUS = 32;
|
|
262
268
|
export declare const ROUNDNESS: {
|
|
@@ -269,11 +275,12 @@ export declare const ROUGHNESS: {
|
|
|
269
275
|
readonly artist: 1;
|
|
270
276
|
readonly cartoonist: 2;
|
|
271
277
|
};
|
|
272
|
-
export
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
278
|
+
export type StrokeWidthKey = "thin" | "medium" | "bold";
|
|
279
|
+
export declare const STROKE_WIDTH_KEYS: readonly StrokeWidthKey[];
|
|
280
|
+
export declare const STROKE_WIDTH: Readonly<Record<StrokeWidthKey | "extraBold", ExcalidrawElement["strokeWidth"]>>;
|
|
281
|
+
export declare const FREEDRAW_STROKE_WIDTH: Readonly<Record<StrokeWidthKey | "extraBold", ExcalidrawElement["strokeWidth"]>>;
|
|
282
|
+
export declare const getStrokeWidthByKey: (elementType: ExcalidrawElement["type"], strokeWidthKey: StrokeWidthKey) => ExcalidrawElement["strokeWidth"];
|
|
283
|
+
export declare const DEFAULT_ELEMENT_STROKE_WIDTH_KEY: StrokeWidthKey;
|
|
277
284
|
export declare const DEFAULT_ELEMENT_PROPS: {
|
|
278
285
|
strokeColor: ExcalidrawElement["strokeColor"];
|
|
279
286
|
backgroundColor: ExcalidrawElement["backgroundColor"];
|
|
@@ -290,7 +297,7 @@ export declare const DEFAULT_SIDEBAR: {
|
|
|
290
297
|
readonly name: "default";
|
|
291
298
|
readonly defaultTab: "library";
|
|
292
299
|
};
|
|
293
|
-
export declare const LIBRARY_DISABLED_TYPES: Set<"embeddable" | "
|
|
300
|
+
export declare const LIBRARY_DISABLED_TYPES: Set<"embeddable" | "iframe" | "image">;
|
|
294
301
|
export declare const TOOL_TYPE: {
|
|
295
302
|
readonly selection: "selection";
|
|
296
303
|
readonly lasso: "lasso";
|
|
@@ -308,6 +315,8 @@ export declare const TOOL_TYPE: {
|
|
|
308
315
|
readonly magicframe: "magicframe";
|
|
309
316
|
readonly embeddable: "embeddable";
|
|
310
317
|
readonly laser: "laser";
|
|
318
|
+
readonly autoshape: "autoshape";
|
|
319
|
+
readonly bucketfill: "bucketfill";
|
|
311
320
|
};
|
|
312
321
|
export declare const EDITOR_LS_KEYS: {
|
|
313
322
|
readonly OAI_API_KEY: "excalidraw-oai-api-key";
|
|
@@ -342,3 +351,10 @@ export declare enum UserIdleState {
|
|
|
342
351
|
* the start and end points)
|
|
343
352
|
*/
|
|
344
353
|
export declare const LINE_POLYGON_POINT_MERGE_DISTANCE = 20;
|
|
354
|
+
export declare const DOUBLE_TAP_POSITION_THRESHOLD = 35;
|
|
355
|
+
export declare const BIND_MODE_TIMEOUT = 700;
|
|
356
|
+
export declare const MOBILE_ACTION_BUTTON_BG: {
|
|
357
|
+
readonly background: "var(--mobile-action-button-bg)";
|
|
358
|
+
};
|
|
359
|
+
export declare const DEFAULT_STROKE_STREAMLINE = 0.5;
|
|
360
|
+
export declare const DEFAULT_STROKE_STREAMLINE_PRECISE = 0.2;
|