@excalidraw/common 0.18.0-3a5ef40 → 0.18.0-3c916c5
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 +536 -119
- 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/colors.d.ts +36 -14
- package/dist/types/common/src/constants.d.ts +66 -7
- package/dist/types/common/src/index.d.ts +3 -0
- package/dist/types/common/src/keys.d.ts +4 -0
- package/dist/types/common/src/points.d.ts +1 -1
- package/dist/types/common/src/random.d.ts +7 -0
- package/dist/types/common/src/utils.d.ts +16 -50
- package/dist/types/common/src/versionedSnapshotStore.d.ts +17 -0
- package/dist/types/element/src/Scene.d.ts +9 -5
- package/dist/types/element/src/align.d.ts +5 -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 +6 -3
- package/dist/types/element/src/binding.d.ts +94 -17
- package/dist/types/element/src/bounds.d.ts +32 -9
- package/dist/types/element/src/bucketFill.d.ts +110 -0
- package/dist/types/element/src/collision.d.ts +21 -5
- package/dist/types/element/src/comparisons.d.ts +8 -5
- package/dist/types/element/src/convertToShape.d.ts +23 -0
- package/dist/types/element/src/cropElement.d.ts +36 -4
- package/dist/types/element/src/delta.d.ts +30 -2
- package/dist/types/element/src/distribute.d.ts +5 -2
- package/dist/types/element/src/dragElements.d.ts +34 -2
- package/dist/types/element/src/duplicate.d.ts +64 -3
- package/dist/types/element/src/elbowArrow.d.ts +7 -0
- package/dist/types/element/src/embeddable.d.ts +3 -2
- package/dist/types/element/src/flowchart.d.ts +9 -11
- package/dist/types/element/src/fractionalIndex.d.ts +2 -2
- package/dist/types/element/src/frame.d.ts +30 -11
- package/dist/types/element/src/groups.d.ts +10 -15
- package/dist/types/element/src/image.d.ts +5 -2
- package/dist/types/element/src/index.d.ts +8 -1
- package/dist/types/element/src/linearElementEditor.d.ts +34 -11
- package/dist/types/element/src/listMarker.d.ts +39 -0
- package/dist/types/element/src/mutateElement.d.ts +3 -1
- package/dist/types/element/src/newElement.d.ts +55 -3
- package/dist/types/element/src/renderElement.d.ts +31 -7
- package/dist/types/element/src/renderEnvironment.d.ts +66 -0
- package/dist/types/element/src/resizeElements.d.ts +14 -4
- package/dist/types/element/src/selection.d.ts +11 -13
- package/dist/types/element/src/shape.d.ts +30 -2
- package/dist/types/element/src/sizeHelpers.d.ts +6 -0
- package/dist/types/element/src/sortElements.d.ts +10 -0
- package/dist/types/element/src/stickyNote.d.ts +191 -0
- package/dist/types/element/src/textElement.d.ts +23 -11
- package/dist/types/element/src/textMeasurements.d.ts +15 -11
- package/dist/types/element/src/textWrapping.d.ts +28 -1
- package/dist/types/element/src/transform.d.ts +31 -8
- package/dist/types/element/src/typeChecks.d.ts +29 -27
- package/dist/types/element/src/types.d.ts +48 -9
- package/dist/types/element/src/utils.d.ts +19 -6
- package/dist/types/element/src/zindex.d.ts +2 -2
- package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +125 -53
- package/dist/types/excalidraw/actions/actionAlign.d.ts +6 -6
- package/dist/types/excalidraw/actions/actionBoundText.d.ts +86 -213
- package/dist/types/excalidraw/actions/actionCanvas.d.ts +410 -1073
- package/dist/types/excalidraw/actions/actionClipboard.d.ts +84 -36
- package/dist/types/excalidraw/actions/actionCropEditor.d.ts +42 -18
- package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +4 -515
- package/dist/types/excalidraw/actions/actionDeselect.d.ts +182 -0
- package/dist/types/excalidraw/actions/actionDistribute.d.ts +2 -3
- package/dist/types/excalidraw/actions/actionElementLink.d.ts +38 -18
- package/dist/types/excalidraw/actions/actionElementLock.d.ts +85 -37
- package/dist/types/excalidraw/actions/actionExport.d.ts +173 -399
- package/dist/types/excalidraw/actions/actionFinalize.d.ts +1 -0
- package/dist/types/excalidraw/actions/actionFrame.d.ts +151 -684
- package/dist/types/excalidraw/actions/actionGroup.d.ts +100 -52
- package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +97 -21
- package/dist/types/excalidraw/actions/actionLink.d.ts +43 -19
- package/dist/types/excalidraw/actions/actionMenu.d.ts +38 -18
- package/dist/types/excalidraw/actions/actionProperties.d.ts +120 -56
- package/dist/types/excalidraw/actions/actionSelectAll.d.ts +47 -23
- package/dist/types/excalidraw/actions/actionStyles.d.ts +43 -18
- package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +3 -3
- package/dist/types/excalidraw/actions/{actionEmbeddable.d.ts → actionToggleArrowBinding.d.ts} +57 -32
- package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +46 -23
- package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +195 -0
- package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +43 -19
- package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +42 -23
- package/dist/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionToggleShowHints.d.ts +197 -0
- package/dist/types/excalidraw/actions/actionToggleStats.d.ts +43 -19
- package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +44 -20
- package/dist/types/excalidraw/actions/actionToggleWrap.d.ts +12 -0
- package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +43 -19
- package/dist/types/excalidraw/actions/colorTargets.d.ts +39 -0
- package/dist/types/excalidraw/actions/index.d.ts +6 -2
- package/dist/types/excalidraw/actions/manager.d.ts +1 -0
- package/dist/types/excalidraw/actions/shortcuts.d.ts +1 -1
- package/dist/types/excalidraw/actions/types.d.ts +8 -4
- package/dist/types/excalidraw/{animated-trail.d.ts → animatedTrail.d.ts} +4 -3
- package/dist/types/excalidraw/appState.d.ts +55 -29
- package/dist/types/excalidraw/charts/charts.bar.d.ts +3 -0
- package/dist/types/excalidraw/charts/charts.constants.d.ts +48 -0
- package/dist/types/excalidraw/charts/charts.helpers.d.ts +33 -0
- package/dist/types/excalidraw/charts/charts.line.d.ts +3 -0
- package/dist/types/excalidraw/charts/charts.parse.d.ts +10 -0
- package/dist/types/excalidraw/charts/charts.radar.d.ts +3 -0
- package/dist/types/excalidraw/charts/charts.types.d.ts +18 -0
- package/dist/types/excalidraw/charts/index.d.ts +8 -0
- package/dist/types/excalidraw/clipboard.d.ts +4 -7
- package/dist/types/excalidraw/components/Actions.d.ts +17 -12
- package/dist/types/excalidraw/components/ActiveConfirmDialog.d.ts +1 -1
- package/dist/types/excalidraw/components/App.arrowText.d.ts +70 -0
- package/dist/types/excalidraw/components/App.bucketFill.d.ts +48 -0
- package/dist/types/excalidraw/components/App.clipboard.d.ts +31 -0
- package/dist/types/excalidraw/components/App.cursor.d.ts +38 -0
- package/dist/types/excalidraw/components/App.d.ts +372 -116
- package/dist/types/excalidraw/components/App.drawshape.d.ts +55 -0
- package/dist/types/excalidraw/components/App.duplicate.d.ts +101 -0
- package/dist/types/excalidraw/components/App.flowchart.d.ts +21 -0
- package/dist/types/excalidraw/components/App.host.d.ts +102 -0
- package/dist/types/excalidraw/components/App.modifiers.d.ts +38 -0
- package/dist/types/excalidraw/components/App.pan.d.ts +62 -0
- package/dist/types/excalidraw/components/App.selection.d.ts +265 -0
- package/dist/types/excalidraw/components/App.selectionTool.d.ts +93 -0
- package/dist/types/excalidraw/components/App.text.d.ts +146 -0
- package/dist/types/excalidraw/components/App.textTool.d.ts +140 -0
- package/dist/types/excalidraw/components/App.toolDrag.d.ts +63 -0
- package/dist/types/excalidraw/components/App.viewport.d.ts +123 -0
- package/dist/types/excalidraw/components/App.wheel.d.ts +26 -0
- package/dist/types/excalidraw/components/App.wrap.d.ts +31 -0
- package/dist/types/excalidraw/components/AppStateObserver.d.ts +37 -0
- package/dist/types/excalidraw/components/ColorPicker/ColorPicker.d.ts +9 -3
- package/dist/types/excalidraw/components/ColorPicker/CustomColorList.d.ts +3 -1
- package/dist/types/excalidraw/components/ColorPicker/Picker.d.ts +5 -1
- package/dist/types/excalidraw/components/ColorPicker/PickerColorList.d.ts +9 -2
- package/dist/types/excalidraw/components/ColorPicker/ShadeList.d.ts +4 -2
- package/dist/types/excalidraw/components/ColorPicker/TopPicks.d.ts +8 -1
- package/dist/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +1 -1
- package/dist/types/excalidraw/components/ColorPicker/colorTopPicksDnD.d.ts +11 -0
- package/dist/types/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +2 -1
- package/dist/types/excalidraw/components/CommandPalette/defaultCommandPaletteItems.d.ts +1 -2
- package/dist/types/excalidraw/components/CommandPalette/types.d.ts +1 -1
- package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +4 -3
- package/dist/types/excalidraw/components/CursorHint.d.ts +46 -0
- package/dist/types/excalidraw/components/EyeDropper.d.ts +1 -1
- package/dist/types/excalidraw/components/FileDropOverlay.d.ts +2 -0
- package/dist/types/excalidraw/components/FontPicker/FontPicker.d.ts +4 -1
- package/dist/types/excalidraw/components/FontPicker/FontPickerList.d.ts +6 -1
- package/dist/types/excalidraw/components/FontPicker/fontTopPicksDnD.d.ts +12 -0
- package/dist/types/excalidraw/components/IconButton.d.ts +48 -0
- package/dist/types/excalidraw/components/IconPicker.d.ts +14 -9
- 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 +5 -2
- package/dist/types/excalidraw/components/LibraryMenu.d.ts +1 -1
- package/dist/types/excalidraw/components/LibraryMenuSection.d.ts +6 -2
- package/dist/types/excalidraw/components/LibraryUnit.d.ts +7 -2
- 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 +4 -4
- package/dist/types/excalidraw/components/MobileToolbar.d.ts +9 -0
- 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 +1 -3
- package/dist/types/excalidraw/components/{ButtonIcon.d.ts → RadioButton.d.ts} +2 -5
- 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/SearchMenu.d.ts +1 -1
- package/dist/types/excalidraw/components/Sidebar/Sidebar.d.ts +1 -1
- package/dist/types/excalidraw/components/Stats/Angle.d.ts +2 -2
- package/dist/types/excalidraw/components/Stats/Dimension.d.ts +2 -2
- package/dist/types/excalidraw/components/Stats/DragInput.d.ts +2 -2
- 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/utils.d.ts +4 -2
- package/dist/types/excalidraw/components/TTDDialog/CodeMirrorEditor.d.ts +11 -0
- package/dist/types/excalidraw/components/TTDDialog/MermaidToExcalidraw.d.ts +2 -1
- package/dist/types/excalidraw/components/TTDDialog/TTDContext.d.ts +4 -4
- package/dist/types/excalidraw/components/TTDDialog/TTDDialogInput.d.ts +3 -3
- package/dist/types/excalidraw/components/TTDDialog/TTDDialogOutput.d.ts +8 -2
- package/dist/types/excalidraw/components/TTDDialog/TTDPreviewPanel.d.ts +5 -2
- package/dist/types/excalidraw/components/TTDDialog/TextToDiagram.d.ts +2 -1
- package/dist/types/excalidraw/components/TTDDialog/common.d.ts +4 -1
- package/dist/types/excalidraw/components/TTDDialog/hooks/useTextGeneration.d.ts +3 -2
- package/dist/types/excalidraw/components/TTDDialog/mermaid-lang-lite.d.ts +2 -0
- package/dist/types/excalidraw/components/TTDDialog/types.d.ts +14 -1
- package/dist/types/excalidraw/components/TTDDialog/useTTDChatStorage.d.ts +3 -3
- package/dist/types/excalidraw/components/TTDDialog/utils/mermaidAutoFix.d.ts +1 -0
- package/dist/types/excalidraw/components/TTDDialog/utils/mermaidError.d.ts +26 -0
- package/dist/types/excalidraw/components/Toast.d.ts +8 -4
- package/dist/types/excalidraw/components/ToolPopover.d.ts +3 -6
- package/dist/types/excalidraw/components/Toolbar.d.ts +11 -0
- package/dist/types/excalidraw/components/Tools.d.ts +151 -0
- package/dist/types/excalidraw/components/Tooltip.d.ts +26 -2
- package/dist/types/excalidraw/components/TopPicksDnD/TopPicksContextMenu.d.ts +14 -0
- package/dist/types/excalidraw/components/TopPicksDnD/TopPicksTip.d.ts +11 -0
- package/dist/types/excalidraw/components/TopPicksDnD/topPicksDnD.d.ts +58 -0
- 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 +4 -2
- package/dist/types/excalidraw/components/canvases/NewElementCanvas.d.ts +3 -0
- package/dist/types/excalidraw/components/canvases/StaticCanvas.d.ts +1 -1
- package/dist/types/excalidraw/components/dropdownMenu/DropdownMenuItemContentRadio.d.ts +2 -1
- package/dist/types/excalidraw/components/footer/Footer.d.ts +3 -1
- package/dist/types/excalidraw/components/hyperlink/Hyperlink.d.ts +3 -2
- package/dist/types/excalidraw/components/hyperlink/helpers.d.ts +15 -4
- package/dist/types/excalidraw/components/icons.d.ts +27 -10
- package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +12 -4
- 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 +221 -174
- package/dist/types/excalidraw/data/filesystem.d.ts +3 -5
- package/dist/types/excalidraw/data/index.d.ts +9 -10
- package/dist/types/excalidraw/data/json.d.ts +119 -87
- package/dist/types/excalidraw/data/library.d.ts +1 -1
- package/dist/types/excalidraw/data/resave.d.ts +7 -2
- package/dist/types/excalidraw/drawShapeTrail.d.ts +16 -0
- package/dist/types/excalidraw/eraser/index.d.ts +2 -3
- package/dist/types/excalidraw/fonts/Fonts.d.ts +12 -8
- package/dist/types/excalidraw/history.d.ts +10 -4
- package/dist/types/excalidraw/hooks/useAppStateValue.d.ts +29 -0
- package/dist/types/excalidraw/hooks/useLibraryItemSvg.d.ts +1 -1
- package/dist/types/excalidraw/hooks/useTextEditorFocus.d.ts +5 -5
- 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/lasso/utils.d.ts +2 -0
- package/dist/types/excalidraw/mermaid.d.ts +7 -0
- package/dist/types/excalidraw/reactUtils.d.ts +1 -1
- package/dist/types/excalidraw/renderOverrides.d.ts +9 -0
- package/dist/types/excalidraw/renderer/animation.d.ts +15 -4
- package/dist/types/excalidraw/renderer/helpers.d.ts +25 -0
- package/dist/types/excalidraw/renderer/interactiveScene.d.ts +2 -4
- package/dist/types/excalidraw/renderer/staticScene.d.ts +11 -6
- package/dist/types/excalidraw/scene/Renderer.d.ts +490 -21
- package/dist/types/excalidraw/scene/export.d.ts +344 -21
- package/dist/types/excalidraw/scene/index.d.ts +2 -2
- package/dist/types/excalidraw/scene/types.d.ts +30 -5
- package/dist/types/excalidraw/snapping.d.ts +7 -7
- package/dist/types/excalidraw/textAutoResizeHandle.d.ts +15 -0
- package/dist/types/excalidraw/types.d.ts +670 -43
- package/dist/types/excalidraw/viewport.d.ts +302 -0
- package/dist/types/excalidraw/wysiwyg/textWysiwyg.d.ts +17 -3
- 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 +23 -13
- 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 +25 -1
- package/dist/types/math/src/segment.d.ts +6 -0
- package/dist/types/math/src/types.d.ts +25 -1
- package/dist/types/utils/src/index.d.ts +4 -3
- package/dist/types/utils/src/shape.d.ts +2 -2
- package/package.json +1 -1
- 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 -15
- 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/MobileToolBar.d.ts +0 -10
- package/dist/types/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +0 -8
- package/dist/types/excalidraw/components/TTDDialog/utils/TTDStreamFetch.d.ts +0 -24
- package/dist/types/excalidraw/components/ToolButton.d.ts +0 -49
- package/dist/types/excalidraw/components/footer/FooterCenter.d.ts +0 -8
- package/dist/types/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +0 -11
- package/dist/types/excalidraw/components/shapes.d.ts +0 -190
- 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 -84
- 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 -18
- 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/export.d.ts +0 -35
- package/dist/types/utils/src/withinBounds.d.ts +0 -19
package/dist/prod/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Xe=Object.create;var ee=Object.defineProperty;var ze=Object.getOwnPropertyDescriptor;var $e=Object.getOwnPropertyNames;var qe=Object.getPrototypeOf,je=Object.prototype.hasOwnProperty;var Ze=(e,t)=>()=>(e&&(t=e(e=0)),t);var te=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Qe=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of $e(t))!je.call(e,o)&&o!==n&&ee(e,o,{get:()=>t[o],enumerable:!(r=ze(t,o))||r.enumerable});return e};var ne=(e,t,n)=>(n=e!=null?Xe(qe(e)):{},Qe(t||!e||!e.__esModule?ee(n,"default",{value:e,enumerable:!0}):n,e));var m,f=Ze(()=>{m={PROD:!0}});var Ie=te((Z,we)=>{f();(function(e,t){typeof define=="function"&&define.amd?define([],t):typeof Z=="object"?we.exports=t():(e.PromisePool=t(),e.promisePool=e.PromisePool)})(Z,function(){"use strict";var e=function(){this._listeners={}};e.prototype.addEventListener=function(s,l){this._listeners[s]=this._listeners[s]||[],this._listeners[s].indexOf(l)<0&&this._listeners[s].push(l)},e.prototype.removeEventListener=function(s,l){if(this._listeners[s]){var u=this._listeners[s].indexOf(l);u>=0&&this._listeners[s].splice(u,1)}},e.prototype.dispatchEvent=function(s){if(this._listeners[s.type]&&this._listeners[s.type].length)for(var l=this._listeners[s.type].slice(),u=0,p=l.length;u<p;++u)l[u].call(this,s)};var t=function(s){return typeof s.constructor=="function"&&s.constructor.name==="GeneratorFunction"},n=function(s){return{next:function(){var l=s();return l?{value:l}:{done:!0}}}},r=function(s){var l=!1;return{next:function(){return l?{done:!0}:(l=!0,{value:s})}}},o=function(s,l){var u=typeof s;if(u==="object"){if(typeof s.next=="function")return s;if(typeof s.then=="function")return r(s)}return u==="function"?t(s)?s():n(s):r(l.resolve(s))},a=function(s,l,u){this.target=s,this.type=l,this.data=u},i=function(s,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(s,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(s){return typeof s<"u"&&(this._concurrency=s,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 s=this,l=this._options.promise;return this._promise=new l(function(u,p){s._callbacks={reject:p,resolve:u},s._proceed()}),this._promise},i.prototype._fireEvent=function(s,l){this.dispatchEvent(new a(this,s,l))},i.prototype._settle=function(s){s?this._callbacks.reject(s):this._callbacks.resolve(),this._promise=null,this._callbacks=null},i.prototype._onPooledPromiseFulfilled=function(s,l){this._size--,this.active()&&(this._fireEvent("fulfilled",{promise:s,result:l}),this._proceed())},i.prototype._onPooledPromiseRejected=function(s,l){this._size--,this.active()&&(this._fireEvent("rejected",{promise:s,error:l}),this._settle(l||new Error("Unknown error")))},i.prototype._trackPromise=function(s){var l=this;s.then(function(u){l._onPooledPromiseFulfilled(s,u)},function(u){l._onPooledPromiseRejected(s,u)}).catch(function(u){l._settle(new Error("Promise processing failed: "+u))})},i.prototype._proceed=function(){if(!this._done){for(var s={done:!1};this._size<this._concurrency&&!(s=this._iterator.next()).done;)this._size++,this._trackPromise(s.value);this._done=s===null||!!s.done}this._done&&this._size===0&&this._settle()},i.PromisePoolEvent=a,i.PromisePool=i,i})});var We=te(Y=>{"use strict";f();Object.defineProperty(Y,"__esModule",{value:!0});Y.sanitizeUrl=void 0;var rn=/^([^\w]*)(javascript|data|vbscript)/im,on=/&#(\w+)(^\w|;)?/g,an=/&(newline|tab);/gi,sn=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,ln=/^.+(:|:)/gim,cn=[".","/"];function un(e){return cn.indexOf(e[0])>-1}function fn(e){return e.replace(on,function(t,n){return String.fromCharCode(n)})}function dn(e){var t=fn(e||"").replace(an,"").replace(sn,"").trim();if(!t)return"about:blank";if(un(t))return t;var n=t.match(ln);if(!n)return t;var r=n[0];return rn.test(r)?"about:blank":t}Y.sanitizeUrl=dn});f();f();var re=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,a=this.content[o];if(r<this.scoreFunction(a))this.content[t]=a,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 a=(t+1<<1)-1,i=a+1,s=t,l=o;if(a<n){let u=this.scoreFunction(this.content[a]);u<l&&(s=a,l=u)}if(i<n&&this.scoreFunction(this.content[i])<l&&(s=i),s===t)break;this.content[t]=this.content[s],t=s}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))}};f();var gn=e=>Array.isArray(e)&&e.length===4&&typeof e[0]=="number"&&typeof e[1]=="number"&&typeof e[2]=="number"&&typeof e[3]=="number";f();f();function U(e){"@babel/helpers - typeof";return U=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},U(e)}var et=/^\s+/,tt=/\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=nt(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,a,i,s;return n=t.r/255,r=t.g/255,o=t.b/255,n<=.03928?a=n/12.92:a=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?s=o/12.92:s=Math.pow((o+.055)/1.055,2.4),.2126*a+.7152*i+.0722*s},setAlpha:function(t){return this._a=ue(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=ae(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=ae(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=oe(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=oe(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 se(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return st(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(T(this._r,255)*100)+"%",g:Math.round(T(this._g,255)*100)+"%",b:Math.round(T(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(T(this._r,255)*100)+"%, "+Math.round(T(this._g,255)*100)+"%, "+Math.round(T(this._b,255)*100)+"%)":"rgba("+Math.round(T(this._r,255)*100)+"%, "+Math.round(T(this._g,255)*100)+"%, "+Math.round(T(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:gt[se(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var n="#"+ie(this._r,this._g,this._b,this._a),r=n,o=this._gradientType?"GradientType = 1, ":"";if(t){var a=c(t);r="#"+ie(a._r,a._g,a._b,a._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,a=!n&&o&&(t==="hex"||t==="hex6"||t==="hex3"||t==="hex4"||t==="hex8"||t==="name");return a?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(ut,arguments)},brighten:function(){return this._applyModification(ft,arguments)},darken:function(){return this._applyModification(dt,arguments)},desaturate:function(){return this._applyModification(it,arguments)},saturate:function(){return this._applyModification(lt,arguments)},greyscale:function(){return this._applyModification(ct,arguments)},spin:function(){return this._applyModification(pt,arguments)},_applyCombination:function(t,n){return t.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(Tt,arguments)},complement:function(){return this._applyCombination(ht,arguments)},monochromatic:function(){return this._applyCombination(bt,arguments)},splitcomplement:function(){return this._applyCombination(mt,arguments)},triad:function(){return this._applyCombination(le,[3])},tetrad:function(){return this._applyCombination(le,[4])}};c.fromRatio=function(e,t){if(U(e)=="object"){var n={};for(var r in e)e.hasOwnProperty(r)&&(r==="a"?n[r]=e[r]:n[r]=w(e[r]));e=n}return c(e,t)};function nt(e){var t={r:0,g:0,b:0},n=1,r=null,o=null,a=null,i=!1,s=!1;return typeof e=="string"&&(e=yt(e)),U(e)=="object"&&(A(e.r)&&A(e.g)&&A(e.b)?(t=rt(e.r,e.g,e.b),i=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):A(e.h)&&A(e.s)&&A(e.v)?(r=w(e.s),o=w(e.v),t=at(e.h,r,o),i=!0,s="hsv"):A(e.h)&&A(e.s)&&A(e.l)&&(r=w(e.s),a=w(e.l),t=ot(e.h,r,a),i=!0,s="hsl"),e.hasOwnProperty("a")&&(n=e.a)),n=ue(n),{ok:i,format:e.format||s,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 rt(e,t,n){return{r:T(e,255)*255,g:T(t,255)*255,b:T(n,255)*255}}function oe(e,t,n){e=T(e,255),t=T(t,255),n=T(n,255);var r=Math.max(e,t,n),o=Math.min(e,t,n),a,i,s=(r+o)/2;if(r==o)a=i=0;else{var l=r-o;switch(i=s>.5?l/(2-r-o):l/(r+o),r){case e:a=(t-n)/l+(t<n?6:0);break;case t:a=(n-e)/l+2;break;case n:a=(e-t)/l+4;break}a/=6}return{h:a,s:i,l:s}}function ot(e,t,n){var r,o,a;e=T(e,360),t=T(t,100),n=T(n,100);function i(u,p,b){return b<0&&(b+=1),b>1&&(b-=1),b<1/6?u+(p-u)*6*b:b<1/2?p:b<2/3?u+(p-u)*(2/3-b)*6:u}if(t===0)r=o=a=n;else{var s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;r=i(l,s,e+1/3),o=i(l,s,e),a=i(l,s,e-1/3)}return{r:r*255,g:o*255,b:a*255}}function ae(e,t,n){e=T(e,255),t=T(t,255),n=T(n,255);var r=Math.max(e,t,n),o=Math.min(e,t,n),a,i,s=r,l=r-o;if(i=r===0?0:l/r,r==o)a=0;else{switch(r){case e:a=(t-n)/l+(t<n?6:0);break;case t:a=(n-e)/l+2;break;case n:a=(e-t)/l+4;break}a/=6}return{h:a,s:i,v:s}}function at(e,t,n){e=T(e,360)*6,t=T(t,100),n=T(n,100);var r=Math.floor(e),o=e-r,a=n*(1-t),i=n*(1-o*t),s=n*(1-(1-o)*t),l=r%6,u=[n,i,a,a,s,n][l],p=[s,n,n,i,a,a][l],b=[a,a,s,n,n,i][l];return{r:u*255,g:p*255,b:b*255}}function se(e,t,n,r){var o=[y(Math.round(e).toString(16)),y(Math.round(t).toString(16)),y(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 st(e,t,n,r,o){var a=[y(Math.round(e).toString(16)),y(Math.round(t).toString(16)),y(Math.round(n).toString(16)),y(fe(r))];return o&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function ie(e,t,n,r){var o=[y(fe(r)),y(Math.round(e).toString(16)),y(Math.round(t).toString(16)),y(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 it(e,t){t=t===0?0:t||10;var n=c(e).toHsl();return n.s-=t/100,n.s=k(n.s),c(n)}function lt(e,t){t=t===0?0:t||10;var n=c(e).toHsl();return n.s+=t/100,n.s=k(n.s),c(n)}function ct(e){return c(e).desaturate(100)}function ut(e,t){t=t===0?0:t||10;var n=c(e).toHsl();return n.l+=t/100,n.l=k(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 dt(e,t){t=t===0?0:t||10;var n=c(e).toHsl();return n.l-=t/100,n.l=k(n.l),c(n)}function pt(e,t){var n=c(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,c(n)}function ht(e){var t=c(e).toHsl();return t.h=(t.h+180)%360,c(t)}function le(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,a=1;a<t;a++)r.push(c({h:(n.h+a*o)%360,s:n.s,l:n.l}));return r}function mt(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 Tt(e,t,n){t=t||6,n=n||30;var r=c(e).toHsl(),o=360/n,a=[c(e)];for(r.h=(r.h-(o*t>>1)+720)%360;--t;)r.h=(r.h+o)%360,a.push(c(r));return a}function bt(e,t){t=t||6;for(var n=c(e).toHsv(),r=n.h,o=n.s,a=n.v,i=[],s=1/t;t--;)i.push(c({h:r,s:o,v:a})),a=(a+s)%1;return i}c.mix=function(e,t,n){n=n===0?0:n||50;var r=c(e).toRgb(),o=c(t).toRgb(),a=n/100,i={r:(o.r-r.r)*a+r.r,g:(o.g-r.g)*a+r.g,b:(o.b-r.b)*a+r.b,a:(o.a-r.a)*a+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,a;switch(a=!1,o=At(n),o.level+o.size){case"AAsmall":case"AAAlarge":a=r>=4.5;break;case"AAlarge":a=r>=3;break;case"AAAsmall":a=r>=7;break}return a};c.mostReadable=function(e,t,n){var r=null,o=0,a,i,s,l;n=n||{},i=n.includeFallbackColors,s=n.level,l=n.size;for(var u=0;u<t.length;u++)a=c.readability(e,t[u]),a>o&&(o=a,r=c(t[u]));return c.isReadable(e,r,{level:s,size:l})||!i?r:(n.includeFallbackColors=!1,c.mostReadable(e,["#fff","#000"],n))};var $=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"},gt=c.hexNames=Et($);function Et(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function ue(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function T(e,t){_t(e)&&(e="100%");var n=xt(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 k(e){return Math.min(1,Math.max(0,e))}function E(e){return parseInt(e,16)}function _t(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function xt(e){return typeof e=="string"&&e.indexOf("%")!=-1}function y(e){return e.length==1?"0"+e:""+e}function w(e){return e<=1&&(e=e*100+"%"),e}function fe(e){return Math.round(parseFloat(e)*255).toString(16)}function ce(e){return E(e)/255}var x=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 A(e){return!!x.CSS_UNIT.exec(e)}function yt(e){e=e.replace(et,"").replace(tt,"").toLowerCase();var t=!1;if($[e])e=$[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=x.rgb.exec(e))?{r:n[1],g:n[2],b:n[3]}:(n=x.rgba.exec(e))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=x.hsl.exec(e))?{h:n[1],s:n[2],l:n[3]}:(n=x.hsla.exec(e))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=x.hsv.exec(e))?{h:n[1],s:n[2],v:n[3]}:(n=x.hsva.exec(e))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=x.hex8.exec(e))?{r:E(n[1]),g:E(n[2]),b:E(n[3]),a:ce(n[4]),format:t?"name":"hex8"}:(n=x.hex6.exec(e))?{r:E(n[1]),g:E(n[2]),b:E(n[3]),format:t?"name":"hex"}:(n=x.hex4.exec(e))?{r:E(n[1]+""+n[1]),g:E(n[2]+""+n[2]),b:E(n[3]+""+n[3]),a:ce(n[4]+""+n[4]),format:t?"name":"hex8"}:(n=x.hex3.exec(e))?{r:E(n[1]+""+n[1]),g:E(n[2]+""+n[2]),b:E(n[3]+""+n[3]),format:t?"name":"hex"}:!1}function At(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 de}from"@excalidraw/math";import{degreesToRadians as vt}from"@excalidraw/math";var q=typeof window<"u"?new Map:null;function St(e,t,n,r){let o=e/255,a=t/255,i=n/255,s=vt(r),l=Math.cos(s),u=Math.sin(s),p=[.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*p[0]+a*p[1]+i*p[2],O=o*p[3]+a*p[4]+i*p[5],_=o*p[6]+a*p[7]+i*p[8];return{r:Math.round(Math.max(0,Math.min(1,b))*255),g:Math.round(Math.max(0,Math.min(1,O))*255),b:Math.round(Math.max(0,Math.min(1,_))*255)}}var Mt=(e,t,n,r)=>{let o=de(r,0,100)/100,a=u=>{let p=u*(1-o)+(255-u)*o;return Math.round(de(p,0,255))},i=a(e),s=a(t),l=a(n);return{r:i,g:s,b:l}},Mn=e=>{let t=q?.get(e);if(t)return t;let n=c(e),r=n.getAlpha(),o=n.toRgb(),a=Mt(o.r,o.g,o.b,93),i=St(a.r,a.g,a.b,180),s=he(i.r,i.g,i.b,r);return q&&q.set(e,s),s},Rt=(e,t)=>t.reduce((n,r)=>(r in e&&(n[r]=e[r]),n),{}),Rn=5,Ln=5,On=4,N=4,H=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"]},pe=Rt(d,["cyan","blue","violet","grape","pink","green","teal","yellow","orange","red"]),Fn=[d.black,d.red[N],d.green[N],d.blue[N],d.yellow[N]],wn=[d.transparent,d.red[H],d.green[H],d.blue[H],d.yellow[H]],In=[d.white,"#f8f9fa","#f5faff","#fffce8","#fdf8f6"],Cn={transparent:d.transparent,white:d.white,gray:d.gray,black:d.black,bronze:d.bronze,...pe},Pn={transparent:d.transparent,white:d.white,gray:d.gray,black:d.black,bronze:d.bronze,...pe},Dn=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]],he=(e,t,n,r)=>{let o=`#${(16777216+(e<<16)+(t<<8)+n).toString(16).slice(1)}`;if(r!==void 0&&r<1){let a=Math.round(r*255).toString(16).padStart(2,"0");return`${o}${a}`}return o},Un=e=>{let t=c(e);if(!t.isValid())return null;let{r:n,g:r,b:o,a}=t.toRgb();return he(n,r,o,a)},me=e=>c(e).getAlpha()===0,kn=240,Lt=(e,t,n)=>(e*299+t*587+n*114)/1e3,Nn=(e,t=160)=>{if(!e)return!0;if(me(e))return!1;let n=c(e);if(!n.isValid())return!0;let{r,g:o,b:a}=n.toRgb();return Lt(r,o,a)<t},Hn=e=>{if(e=e.trim(),me(e))return e;let t=c(e);return t.isValid()?t.getFormat()==="hex"&&!e.startsWith("#")?`#${e}`:e:null};f();var Wn=typeof window<"u"&&"ResizeObserver"in window,Yn="Excalidraw",Vn=36,Xn=10,zn=20,$n=8,qn=5,jn=1,Zn=30,Qn=Math.PI/12,Jn="red",er={TEXT:"text",CROSSHAIR:"crosshair",GRABBING:"grabbing",GRAB:"grab",POINTER:"pointer",MOVE:"move",AUTO:""},tr={MAIN:0,WHEEL:1,SECONDARY:2,TOUCH:-1,ERASER:5},nr={enabled:"all",disabled:"none",inheritFromUI:"var(--ui-pointerEvents)"},Ot=(h=>(h.COPY="copy",h.PASTE="paste",h.CUT="cut",h.KEYDOWN="keydown",h.KEYUP="keyup",h.MOUSE_MOVE="mousemove",h.RESIZE="resize",h.UNLOAD="unload",h.FOCUS="focus",h.BLUR="blur",h.DRAG_OVER="dragover",h.DROP="drop",h.GESTURE_END="gestureend",h.BEFORE_UNLOAD="beforeunload",h.GESTURE_START="gesturestart",h.GESTURE_CHANGE="gesturechange",h.POINTER_MOVE="pointermove",h.POINTER_DOWN="pointerdown",h.POINTER_UP="pointerup",h.STATE_CHANGE="statechange",h.WHEEL="wheel",h.TOUCH_START="touchstart",h.TOUCH_END="touchend",h.HASHCHANGE="hashchange",h.VISIBILITY_CHANGE="visibilitychange",h.SCROLL="scroll",h.EXCALIDRAW_LINK="excalidraw-link",h.MENU_ITEM_SELECT="menu.itemSelect",h.MESSAGE="message",h.FULLSCREENCHANGE="fullscreenchange",h))(Ot||{}),rr={UNSTARTED:-1,ENDED:0,PLAYING:1,PAUSED:2,BUFFERING:3,CUED:5},B={TEST:"test",DEVELOPMENT:"development",PRODUCTION:"production"},or={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"},ar={sm:16,md:20,lg:28,xl:36},be="Xiaolai",I="Segoe UI Emoji",g={Virgil:1,Helvetica:2,Cascadia:3,Excalifont:5,Nunito:6,"Lilita One":7,"Comic Shanns":8,"Liberation Sans":9,Assistant:10},ge="sans-serif",Ee="monospace",Ft={[ge]:998,[Ee]:999},j={[be]:100,...Ft,[I]:1e3};function wt(e){switch(e){case g.Cascadia:case g["Comic Shanns"]:return Ee;default:return ge}}var _e=e=>{let t=wt(e);switch(e){case g.Excalifont:return[be,t,I];default:return[t,I]}},sr={LIGHT:"light",DARK:"dark"},ir="invert(93%) hue-rotate(180deg)",lr={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},cr=1,ur=20,fr=g.Excalifont,dr="left",pr="top",xe="{version}",It=2,Ct=2*It,Pt=1e-5,hr=2*Ct-Pt,mr="#ffffff",Tr="#1e1e1e",br="#a2f1a6",gr=["selectAll"],Er=20,_r=5,ye={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"},Dt={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"},Te={...Dt,"excalidraw.svg":"image/svg+xml","excalidraw.png":"image/png",binary:"application/octet-stream",...ye},xr=[Te.text,Te.html,...Object.values(ye)],yr={png:"png",svg:"svg",clipboard:"clipboard"},Ar={excalidraw:"excalidraw",excalidrawClipboard:"excalidraw/clipboard",excalidrawLibrary:"excalidrawlib",excalidrawClipboardWithAPI:"excalidraw-api/clipboard"},vr=()=>window.EXCALIDRAW_EXPORT_SOURCE||window.location.origin,Sr=500,Mr=300,Rr=500,Lr=1e4,Or=3e4,Fr=100,wr=.1,Ir=.1,Cr=30,Pr=300,Dr=6e4,Ur=3e3,kr={addLibrary:"addLibrary"},Nr={addLibrary:"addLibrary"},Hr={canvasActions:{changeViewBackgroundColor:!0,clearCanvas:!0,export:{saveFileToDisk:!0},loadScene:!0,saveToActiveFile:!0,toggleTheme:null,saveAsImage:!0},tools:{image:!0}},Br=2,Gr=[1,2,3],Kr=10,Wr=1440,Yr=4*1024*1024,Vr="http://www.w3.org/2000/svg",Xr=`<?xml version="1.0" standalone="no"?>
|
|
1
|
+
var et=Object.create;var ne=Object.defineProperty;var tt=Object.getOwnPropertyDescriptor;var nt=Object.getOwnPropertyNames;var rt=Object.getPrototypeOf,ot=Object.prototype.hasOwnProperty;var st=(e,t)=>()=>(e&&(t=e(e=0)),t);var re=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var it=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of nt(t))!ot.call(e,o)&&o!==n&&ne(e,o,{get:()=>t[o],enumerable:!(r=tt(t,o))||r.enumerable});return e};var oe=(e,t,n)=>(n=e!=null?et(rt(e)):{},it(t||!e||!e.__esModule?ne(n,"default",{value:e,enumerable:!0}):n,e));var m,p=st(()=>{m={PROD:!0}});var Ue=re((q,ke)=>{p();(function(e,t){typeof define=="function"&&define.amd?define([],t):typeof q=="object"?ke.exports=t():(e.PromisePool=t(),e.promisePool=e.PromisePool)})(q,function(){"use strict";var e=function(){this._listeners={}};e.prototype.addEventListener=function(i,l){this._listeners[i]=this._listeners[i]||[],this._listeners[i].indexOf(l)<0&&this._listeners[i].push(l)},e.prototype.removeEventListener=function(i,l){if(this._listeners[i]){var u=this._listeners[i].indexOf(l);u>=0&&this._listeners[i].splice(u,1)}},e.prototype.dispatchEvent=function(i){if(this._listeners[i.type]&&this._listeners[i.type].length)for(var l=this._listeners[i.type].slice(),u=0,h=l.length;u<h;++u)l[u].call(this,i)};var t=function(i){return typeof i.constructor=="function"&&i.constructor.name==="GeneratorFunction"},n=function(i){return{next:function(){var l=i();return l?{value:l}:{done:!0}}}},r=function(i){var l=!1;return{next:function(){return l?{done:!0}:(l=!0,{value:i})}}},o=function(i,l){var u=typeof i;if(u==="object"){if(typeof i.next=="function")return i;if(typeof i.then=="function")return r(i)}return u==="function"?t(i)?i():n(i):r(l.resolve(i))},s=function(i,l,u){this.target=i,this.type=l,this.data=u},a=function(i,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(i,this._options.promise),this._done=!1,this._size=0,this._promise=null,this._callbacks=null};return a.prototype=new e,a.prototype.constructor=a,a.prototype.concurrency=function(i){return typeof i<"u"&&(this._concurrency=i,this.active()&&this._proceed()),this._concurrency},a.prototype.size=function(){return this._size},a.prototype.active=function(){return!!this._promise},a.prototype.promise=function(){return this._promise},a.prototype.start=function(){var i=this,l=this._options.promise;return this._promise=new l(function(u,h){i._callbacks={reject:h,resolve:u},i._proceed()}),this._promise},a.prototype._fireEvent=function(i,l){this.dispatchEvent(new s(this,i,l))},a.prototype._settle=function(i){i?this._callbacks.reject(i):this._callbacks.resolve(),this._promise=null,this._callbacks=null},a.prototype._onPooledPromiseFulfilled=function(i,l){this._size--,this.active()&&(this._fireEvent("fulfilled",{promise:i,result:l}),this._proceed())},a.prototype._onPooledPromiseRejected=function(i,l){this._size--,this.active()&&(this._fireEvent("rejected",{promise:i,error:l}),this._settle(l||new Error("Unknown error")))},a.prototype._trackPromise=function(i){var l=this;i.then(function(u){l._onPooledPromiseFulfilled(i,u)},function(u){l._onPooledPromiseRejected(i,u)}).catch(function(u){l._settle(new Error("Promise processing failed: "+u))})},a.prototype._proceed=function(){if(!this._done){for(var i={done:!1};this._size<this._concurrency&&!(i=this._iterator.next()).done;)this._size++,this._trackPromise(i.value);this._done=i===null||!!i.done}this._done&&this._size===0&&this._settle()},a.PromisePoolEvent=s,a.PromisePool=a,a})});var je=re(B=>{"use strict";p();Object.defineProperty(B,"__esModule",{value:!0});B.sanitizeUrl=void 0;var Tn=/^([^\w]*)(javascript|data|vbscript)/im,bn=/&#(\w+)(^\w|;)?/g,gn=/&(newline|tab);/gi,_n=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,xn=/^.+(:|:)/gim,An=[".","/"];function yn(e){return An.indexOf(e[0])>-1}function vn(e){return e.replace(bn,function(t,n){return String.fromCharCode(n)})}function Sn(e){var t=vn(e||"").replace(gn,"").replace(_n,"").trim();if(!t)return"about:blank";if(yn(t))return t;var n=t.match(xn);if(!n)return t;var r=n[0];return Tn.test(r)?"about:blank":t}B.sanitizeUrl=Sn});p();p();var se=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,a=s+1,i=t,l=o;if(s<n){let u=this.scoreFunction(this.content[s]);u<l&&(i=s,l=u)}if(a<n&&this.scoreFunction(this.content[a])<l&&(i=a),i===t)break;this.content[t]=this.content[i],t=i}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 Fn=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 P(e){"@babel/helpers - typeof";return P=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},P(e)}var lt=/^\s+/,ct=/\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=ut(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,a,i;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?a=r/12.92:a=Math.pow((r+.055)/1.055,2.4),o<=.03928?i=o/12.92:i=Math.pow((o+.055)/1.055,2.4),.2126*s+.7152*a+.0722*i},setAlpha:function(t){return this._a=de(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=ae(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=ae(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=ie(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=ie(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 le(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return mt(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:Mt[le(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var n="#"+ce(this._r,this._g,this._b,this._a),r=n,o=this._gradientType?"GradientType = 1, ":"";if(t){var s=c(t);r="#"+ce(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(bt,arguments)},brighten:function(){return this._applyModification(gt,arguments)},darken:function(){return this._applyModification(_t,arguments)},desaturate:function(){return this._applyModification(ht,arguments)},saturate:function(){return this._applyModification(Et,arguments)},greyscale:function(){return this._applyModification(Tt,arguments)},spin:function(){return this._applyModification(xt,arguments)},_applyCombination:function(t,n){return t.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(vt,arguments)},complement:function(){return this._applyCombination(At,arguments)},monochromatic:function(){return this._applyCombination(St,arguments)},splitcomplement:function(){return this._applyCombination(yt,arguments)},triad:function(){return this._applyCombination(ue,[3])},tetrad:function(){return this._applyCombination(ue,[4])}};c.fromRatio=function(e,t){if(P(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 ut(e){var t={r:0,g:0,b:0},n=1,r=null,o=null,s=null,a=!1,i=!1;return typeof e=="string"&&(e=It(e)),P(e)=="object"&&(A(e.r)&&A(e.g)&&A(e.b)?(t=pt(e.r,e.g,e.b),a=!0,i=String(e.r).substr(-1)==="%"?"prgb":"rgb"):A(e.h)&&A(e.s)&&A(e.v)?(r=L(e.s),o=L(e.v),t=ft(e.h,r,o),a=!0,i="hsv"):A(e.h)&&A(e.s)&&A(e.l)&&(r=L(e.s),s=L(e.l),t=dt(e.h,r,s),a=!0,i="hsl"),e.hasOwnProperty("a")&&(n=e.a)),n=de(n),{ok:a,format:e.format||i,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 pt(e,t,n){return{r:E(e,255)*255,g:E(t,255)*255,b:E(n,255)*255}}function ie(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,a,i=(r+o)/2;if(r==o)s=a=0;else{var l=r-o;switch(a=i>.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:a,l:i}}function dt(e,t,n){var r,o,s;e=E(e,360),t=E(t,100),n=E(n,100);function a(u,h,b){return b<0&&(b+=1),b>1&&(b-=1),b<1/6?u+(h-u)*6*b:b<1/2?h:b<2/3?u+(h-u)*(2/3-b)*6:u}if(t===0)r=o=s=n;else{var i=n<.5?n*(1+t):n+t-n*t,l=2*n-i;r=a(l,i,e+1/3),o=a(l,i,e),s=a(l,i,e-1/3)}return{r:r*255,g:o*255,b:s*255}}function ae(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,a,i=r,l=r-o;if(a=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:a,v:i}}function ft(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),a=n*(1-o*t),i=n*(1-(1-o)*t),l=r%6,u=[n,a,s,s,i,n][l],h=[i,n,n,a,s,s][l],b=[s,s,i,n,n,a][l];return{r:u*255,g:h*255,b:b*255}}function le(e,t,n,r){var o=[x(Math.round(e).toString(16)),x(Math.round(t).toString(16)),x(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 mt(e,t,n,r,o){var s=[x(Math.round(e).toString(16)),x(Math.round(t).toString(16)),x(Math.round(n).toString(16)),x(fe(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 ce(e,t,n,r){var o=[x(fe(r)),x(Math.round(e).toString(16)),x(Math.round(t).toString(16)),x(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 ht(e,t){t=t===0?0:t||10;var n=c(e).toHsl();return n.s-=t/100,n.s=D(n.s),c(n)}function Et(e,t){t=t===0?0:t||10;var n=c(e).toHsl();return n.s+=t/100,n.s=D(n.s),c(n)}function Tt(e){return c(e).desaturate(100)}function bt(e,t){t=t===0?0:t||10;var n=c(e).toHsl();return n.l+=t/100,n.l=D(n.l),c(n)}function gt(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 _t(e,t){t=t===0?0:t||10;var n=c(e).toHsl();return n.l-=t/100,n.l=D(n.l),c(n)}function xt(e,t){var n=c(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,c(n)}function At(e){var t=c(e).toHsl();return t.h=(t.h+180)%360,c(t)}function ue(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 yt(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 vt(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 St(e,t){t=t||6;for(var n=c(e).toHsv(),r=n.h,o=n.s,s=n.v,a=[],i=1/t;t--;)a.push(c({h:r,s:o,v:s})),s=(s+i)%1;return a}c.mix=function(e,t,n){n=n===0?0:n||50;var r=c(e).toRgb(),o=c(t).toRgb(),s=n/100,a={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(a)};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=wt(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,a,i,l;n=n||{},a=n.includeFallbackColors,i=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:i,size:l})||!a?r:(n.includeFallbackColors=!1,c.mostReadable(e,["#fff","#000"],n))};var Y=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"},Mt=c.hexNames=Rt(Y);function Rt(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function de(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function E(e,t){Ot(e)&&(e="100%");var n=Lt(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 D(e){return Math.min(1,Math.max(0,e))}function g(e){return parseInt(e,16)}function Ot(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function Lt(e){return typeof e=="string"&&e.indexOf("%")!=-1}function x(e){return e.length==1?"0"+e:""+e}function L(e){return e<=1&&(e=e*100+"%"),e}function fe(e){return Math.round(parseFloat(e)*255).toString(16)}function pe(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 A(e){return!!_.CSS_UNIT.exec(e)}function It(e){e=e.replace(lt,"").replace(ct,"").toLowerCase();var t=!1;if(Y[e])e=Y[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:pe(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:pe(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 wt(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 $}from"@excalidraw/math";import{degreesToRadians as Ft}from"@excalidraw/math";var V=typeof window<"u"?new Map:null,me=93,he=180;function Ee(e,t,n,r){let o=e/255,s=t/255,a=n/255,i=Ft(r),l=Math.cos(i),u=Math.sin(i),h=[.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*h[0]+s*h[1]+a*h[2],te=o*h[3]+s*h[4]+a*h[5],y=o*h[6]+s*h[7]+a*h[8];return{r:Math.round(Math.max(0,Math.min(1,b))*255),g:Math.round(Math.max(0,Math.min(1,te))*255),b:Math.round(Math.max(0,Math.min(1,y))*255)}}var Ct=(e,t,n,r)=>{let o=$(r,0,100)/100,s=u=>{let h=u*(1-o)+(255-u)*o;return Math.round($(h,0,255))},a=s(e),i=s(t),l=s(n);return{r:a,g:i,b:l}},Gn=(e,t=!0)=>{if(!t)return e;let n=V?.get(e);if(n)return n;let r=c(e),o=r.getAlpha(),s=r.toRgb(),a=Ct(s.r,s.g,s.b,me),i=Ee(a.r,a.g,a.b,he),l=k(i.r,i.g,i.b,o);return V&&V.set(e,l),l},Pt=(e,t,n)=>{let r=me/100,o=1-2*r,s=a=>Math.round($((a-255*r)/o,0,255));return{r:s(e),g:s(t),b:s(n)}},Kn=e=>{let t=c(e),n=t.getAlpha(),r=t.toRgb(),o=Ee(r.r,r.g,r.b,he),s=Pt(o.r,o.g,o.b);return k(s.r,s.g,s.b,n)},Dt=(e,t)=>t.reduce((n,r)=>(r in e&&(n[r]=e[r]),n),{}),Bn=5,Wn=5,Yn=4,N=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"]},Te=Dt(d,["cyan","blue","violet","grape","pink","green","teal","yellow","orange","red"]),Vn=5,Nt=[d.black,d.red[N],d.green[N],d.blue[N],d.yellow[N]],$n=[d.transparent,d.red[v],d.green[v],d.blue[v],d.yellow[v]],zn=[d.white,d.red[v],d.green[v],d.blue[v],d.yellow[v]],be="#ffdf6b",Xn=Nt,jn=[be,d.pink[1],d.green[1],d.blue[1],d.orange[1]],qn=[d.white,"#f8f9fa","#f5faff","#fffce8","#fdf8f6"],Zn={transparent:d.transparent,white:d.white,gray:d.gray,black:d.black,bronze:d.bronze,...Te},Qn={transparent:d.transparent,white:d.white,gray:d.gray,black:d.black,bronze:d.bronze,...Te},Jn=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]],k=(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},er=(e,t)=>{let n=c(e);if(!n.isValid())return e;let{r,g:o,b:s}=n.toRgb();return k(r,o,s,t)},tr=e=>{let t=c(e);if(!t.isValid())return null;let{r:n,g:r,b:o,a:s}=t.toRgb();return k(n,r,o,s)},ge=e=>c(e).getAlpha()===0,nr=e=>c(e).getAlpha()===1,rr=240,kt=(e,t,n)=>(e*299+t*587+n*114)/1e3,or=(e,t=160)=>{if(!e)return!0;if(ge(e))return!1;let n=c(e);if(!n.isValid())return!0;let{r,g:o,b:s}=n.toRgb();return kt(r,o,s)<t},sr=e=>{if(e=e.trim(),ge(e))return e;let t=c(e);return t.isValid()?["hex","hex8"].includes(t.getFormat())&&!e.startsWith("#")?`#${e}`:e:null};p();var cr=typeof window<"u"&&"ResizeObserver"in window,ur="Excalidraw",pr=36,dr=20,fr=800,mr=10,hr=20,Er=8,Tr=5,br=1,gr=30,_r=Math.PI/12,xr="red",Ar={TEXT:"text",CROSSHAIR:"crosshair",GRABBING:"grabbing",GRAB:"grab",POINTER:"pointer",MOVE:"move",AUTO:""},yr={MAIN:0,WHEEL:1,SECONDARY:2,TOUCH:-1,ERASER:5},vr={enabled:"all",disabled:"none",inheritFromUI:"var(--ui-pointerEvents)"},Ut=(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.POINTER_CANCEL="pointercancel",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))(Ut||{}),Sr={UNSTARTED:-1,ENDED:0,PLAYING:1,PAUSED:2,BUFFERING:3,CUED:5},U={TEST:"test",DEVELOPMENT:"development",PRODUCTION:"production"},Mr={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"},Rr={sm:16,md:20,lg:28,xl:36},xe="Xiaolai",I="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},Ae="sans-serif",ye="monospace",Ht={[Ae]:998,[ye]:999},z={[xe]:100,...Ht,[I]:1e3};function Gt(e){switch(e){case T.Cascadia:case T["Comic Shanns"]:return ye;default:return Ae}}var ve=e=>{let t=Gt(e);switch(e){case T.Excalifont:return[xe,t,I];default:return[t,I]}},Or={LIGHT:"light",DARK:"dark"},Lr="invert(93%) hue-rotate(180deg)",Ir={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},wr=1,Fr=20,Cr=16,Pr=512,Dr=28,Nr=2,Kt=16,Bt={height:20,fontSize:12,fontFamily:"Helvetica, Arial, sans-serif",baselineFromBottom:14,opacity:1,minBodyWidthForYear:80},kr=Kt*2+Bt.height,Ur=250,Hr=75,Gr=3,Kr=.16,Br=.5,Wr=.08,Yr=T.Excalifont,Vr=3,$r="left",zr="top",Se="{version}",Wt=2,Yt=2*Wt,Vt=1e-5,Xr=2*Yt-Vt,jr="#ffffff",qr="#1e1e1e",Zr="#a2f1a6",Qr=["selectAll"],Jr=20,eo=5,Me={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"},$t={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"},_e={...$t,"excalidraw.svg":"image/svg+xml","excalidraw.png":"image/png",binary:"application/octet-stream",...Me},to=[_e.text,_e.html,...Object.values(Me)],no={png:"png",svg:"svg",clipboard:"clipboard"},ro={excalidraw:"excalidraw",excalidrawClipboard:"excalidraw/clipboard",excalidrawLibrary:"excalidrawlib",excalidrawClipboardWithAPI:"excalidraw-api/clipboard"},oo=()=>window.EXCALIDRAW_EXPORT_SOURCE||window.location.origin,so=500,io=300,ao=500,lo=1e4,co=3e4,uo=100,po=250,fo=.1,mo=.1,ho=30,Eo=Object.freeze({value:1}),To=300,bo=6e4,go=3e3,_o={addLibrary:"addLibrary"},xo={addLibrary:"addLibrary"},Ao={canvasActions:{changeViewBackgroundColor:!0,clearCanvas:!0,export:{saveFileToDisk:!0},loadScene:!0,saveToActiveFile:!0,toggleTheme:null,saveAsImage:!0},tools:{image:!0}},yo=2,vo=[1,2,3],So=10,Mo={maxWidthOrHeight:1440,maxFileSizeBytes:4*1024*1024},Ro="http://www.w3.org/2000/svg",Oo=`<?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
|
-
`,zr=128,$r={excalidraw:2,excalidrawLibrary:2},qr=5,jr=.7,Zr=11,Qr={TOP:"top",MIDDLE:"middle",BOTTOM:"bottom"},Jr={LEFT:"left",CENTER:"center",RIGHT:"right"},eo=20,to=.25,no=32,ro={LEGACY:1,PROPORTIONAL_RADIUS:2,ADAPTIVE_RADIUS:3},Ut={architect:0,artist:1,cartoonist:2},oo={thin:1,bold:2,extraBold:4},ao={strokeColor:d.black,backgroundColor:d.transparent,fillStyle:"solid",strokeWidth:2,strokeStyle:"solid",roughness:Ut.artist,opacity:100,locked:!1},kt="library",so="search",io={name:"default",defaultTab:kt},lo=new Set(["iframe","embeddable","image"]),co={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"},uo={OAI_API_KEY:"excalidraw-oai-api-key",MERMAID_TO_EXCALIDRAW:"mermaid-to-excalidraw",PUBLISH_LIBRARY:"publish-library-data"},fo="Untitled",po={generalStats:1,elementProperties:2},ho=1,mo={sharp:"sharp",round:"round",elbow:"elbow"},To=.3,bo="element",go=Symbol.for("__test__originalId__"),Nt=(r=>(r.ACTIVE="active",r.AWAY="away",r.IDLE="idle",r))(Nt||{}),Eo=20,_o=35,xo=700,yo={background:"var(--mobile-action-button-bg)"};f();var G={[g.Excalifont]:{metrics:{unitsPerEm:1e3,ascender:886,descender:-374,lineHeight:1.25}},[g.Nunito]:{metrics:{unitsPerEm:1e3,ascender:1011,descender:-353,lineHeight:1.25}},[g["Lilita One"]]:{metrics:{unitsPerEm:1e3,ascender:923,descender:-220,lineHeight:1.15}},[g["Comic Shanns"]]:{metrics:{unitsPerEm:1e3,ascender:750,descender:-250,lineHeight:1.25}},[g.Virgil]:{metrics:{unitsPerEm:1e3,ascender:886,descender:-374,lineHeight:1.25},deprecated:!0},[g.Helvetica]:{metrics:{unitsPerEm:2048,ascender:1577,descender:-471,lineHeight:1.15},deprecated:!0,local:!0},[g.Cascadia]:{metrics:{unitsPerEm:2048,ascender:1900,descender:-480,lineHeight:1.2},deprecated:!0},[g["Liberation Sans"]]:{metrics:{unitsPerEm:2048,ascender:1854,descender:-434,lineHeight:1.15},private:!0},[g.Assistant]:{metrics:{unitsPerEm:2048,ascender:1021,descender:-287,lineHeight:1.25},private:!0},[j.Xiaolai]:{metrics:{unitsPerEm:1e3,ascender:880,descender:-144,lineHeight:1.25},fallback:!0},[j["Segoe UI Emoji"]]:{metrics:{unitsPerEm:1e3,ascender:886,descender:-374,lineHeight:1.25},local:!0,fallback:!0}},Mo={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"},Ro="local:",Lo=(e,t,n)=>{let{unitsPerEm:r,ascender:o,descender:a}=G[e]?.metrics||G[g.Excalifont].metrics,i=t/r,s=(n-i*o+i*a)/2;return i*o+s},Oo=e=>{let{lineHeight:t}=G[e]?.metrics||G[g.Excalifont].metrics;return t};f();var Ae=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}};f();f();var Me="excalidraw.desktopUIMode",Do=599,Uo=1e3,ko=500,No=600,Ho=1180,Bo=1440,Go=1229,Re=/Mac|iPod|iPhone|iPad/.test(navigator.platform),Ko=/^Win/.test(navigator.platform),Le=/\b(android)\b/i.test(navigator.userAgent),Wo=typeof window<"u"&&"netscape"in window&&navigator.userAgent.indexOf("rv:")>1&&navigator.userAgent.indexOf("Gecko")>1,Ht=navigator.userAgent.indexOf("Chrome")!==-1,Yo=!Ht&&navigator.userAgent.indexOf("Safari")!==-1,Oe=/iPad|iPhone/i.test(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document,Vo=()=>navigator.brave?.isBrave?.name==="isBrave",Bt=(e,t)=>e<=599||t<500&&e<1e3,Gt=(e,t)=>{let n=Math.min(e,t),r=Math.max(e,t);return n>=600&&r<=1180},Kt=()=>{let e=navigator.userAgent||"",t=navigator.platform||"",n=navigator.userAgentData;if(n){let o=(n.platform||"").toLowerCase(),a=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(a)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},Xo=(e,t)=>Bt(e,t)?"phone":Gt(e,t)?"tablet":"desktop",zo=e=>e.formFactor==="phone"?"mobile":e.formFactor==="tablet"?"compact":e.desktopUIMode,$o=e=>{let t=e??"",n="unknown";return Oe?n="ios":Le?n="android":t&&(n="other"),{isMobileDevice:Kt(),platform:n}},qo=()=>{if(typeof window>"u")return null;try{let e=window.localStorage.getItem(Me);if(e==="compact"||e==="full")return e}catch{}return null},Wt=e=>{if(!(typeof window>"u"))try{window.localStorage.setItem(Me,e)}catch{}},jo=e=>{if(!(e!=="compact"&&e!=="full"))return Wt(e),e};var Fe={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"},R={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",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"},Yt=new Map([[R.Z,Fe.Z],[R.Y,Fe.Y]]),Vt=e=>/^[a-z]$/.test(e.toLowerCase()),ea=(e,t)=>{if(t===e.key.toLowerCase())return!0;let n=Yt.get(t);return!!(n&&!Vt(e.key)&&e.code===n)},ta=e=>e===R.ARROW_LEFT||e===R.ARROW_RIGHT||e===R.ARROW_DOWN||e===R.ARROW_UP,na=e=>e.altKey,ra=e=>e.shiftKey,oa=e=>e.shiftKey;f();import{pointFromPair as Xt}from"@excalidraw/math";var la=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)}},ca=(e,t,n,r)=>{let o=n.map(_=>_[e]),a=Math.max(...o),i=Math.min(...o),s=a-i,l=s===0?1:t/s,u=1/0,p=n.map(_=>{let v=_[e]*l,S=[..._];return S[e]=v,v<u&&(u=v),S});if(!r||p.length===2)return p;let b=i-u;return p.map(_=>Xt(_.map((v,S)=>S===e?v+b:v)))},ua=(e,t,n)=>n?[Math.round(e/n)*n,Math.round(t/n)*n]:[e,t];f();var Pe=ne(Ie(),1),Ce=class{pool;entries={};constructor(t,n){this.pool=new Pe.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)))}};f();f();f();var De=(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),"");f();var C=class{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}};f();import{average as K}from"@excalidraw/math";var Q=null,Ma=e=>{Q=e},Ra=()=>{if(Q)return Q;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"),a=`${e.getMinutes()}`.padStart(2,"0");return`${t}-${n}-${r}-${o}${a}`},La=e=>e.charAt(0).toUpperCase()+e.slice(1),Oa=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,Fa=e=>zt(e)||e instanceof Element&&!!e.closest("label, button"),wa=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"),$t=({fontFamily:e})=>{for(let[t,n]of Object.entries(g))if(n===e)return`${t}${_e(n).map(r=>`, ${r}`).join("")}`;return I},Ia=({fontSize:e,fontFamily:t})=>`${e}px ${$t({fontFamily:t})}`,Ca=async e=>{requestAnimationFrame(()=>requestAnimationFrame(e))},Pa=(e,t)=>{let n=0,r=null,o=(...a)=>{r=a,clearTimeout(n),n=window.setTimeout(()=>{r=null,e(...a)},t)};return o.flush=()=>{if(clearTimeout(n),r){let a=r;r=null,e(...a)}},o.cancel=()=>{r=null,clearTimeout(n)},o},Da=(e,t)=>{let n=null,r=null,o=null,a=s=>{n=window.requestAnimationFrame(()=>{n=null,e(...s),r=null,o&&(r=o,o=null,a(r))})},i=(...s)=>{if(W()){e(...s);return}r=s,n===null?a(r):t?.trailing&&(o=s)};return i.flush=()=>{n!==null&&(cancelAnimationFrame(n),n=null),r&&(e(...o||r),r=o=null)},i.cancel=()=>{r=o=null,n!==null&&(cancelAnimationFrame(n),n=null)},i},Ne=e=>1-Math.pow(1-e,4),Ue=(e,t,n)=>(t-e)*Ne(n)+e,Ua=({fromValues:e,toValues:t,onStep:n,duration:r=250,interpolateValue:o,onStart:a,onEnd:i,onCancel:s})=>{let l=!1,u=0,p;function b(O){if(l)return;p===void 0&&(p=O,a?.());let _=Math.min(O-p,r),v=Ne(_/r),S={};if(Object.keys(e).forEach(F=>{let M=F,V=(t[M]-e[M])*v+e[M];S[M]=V}),n(S),_<r){let F=_/r,M={};Object.keys(e).forEach(V=>{let P=V,X=e[P],z=t[P],D;D=o?o(X,z,F,P):Ue(X,z,F),D==null&&(D=Ue(X,z,F)),M[P]=D}),n(M),u=window.requestAnimationFrame(b)}else n(t),i?.()}return u=window.requestAnimationFrame(b),()=>{s?.(),l=!0,window.cancelAnimationFrame(u)}},ka=(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},Na=e=>{let t=window.getSelection();if(t){let n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n)}},Ha=()=>{let e=window.getSelection();e&&e.removeAllRanges()},Ba=(e,t)=>Math.abs(e-t),Ga=e=>e==="selection"||e==="lasso",Ka=(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},Wa=()=>document.fullscreenElement?.nodeName==="HTML",Ya=()=>document.documentElement.requestFullscreen(),Va=()=>document.exitFullscreen(),Xa=({clientX:e,clientY:t},{zoom:n,offsetLeft:r,offsetTop:o,scrollX:a,scrollY:i})=>{let s=(e-r)/n.value-a,l=(t-o)/n.value-i;return{x:s,y:l}},za=({sceneX:e,sceneY:t},{zoom:n,offsetLeft:r,offsetTop:o,scrollX:a,scrollY:i})=>{let s=(e+a)*n.value+r,l=(t+i)*n.value+o;return{x:s,y:l}},$a=e=>getComputedStyle(document.documentElement).getPropertyValue(`--${e}`),qt="A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u0300-\u0590\u0800-\u1FFF\u2C00-\uFB1C\uFDFE-\uFE6F\uFEFD-\uFFFF",jt="\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC",Zt=new RegExp(`^[^${qt}]*[${jt}]`),qa=e=>Zt.test(e),ja=e=>{let[t,n]=e;return{x:t,y:n}},Za=e=>{if(e?.name==="AbortError"){console.warn(e);return}throw e},Qa=(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},Ja=(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},es=(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},ts=(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},ns=()=>document.querySelector('meta[name="version"]')?.content||xe,rs=()=>{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},os=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},as=e=>{let t=e.parentElement;for(;t;){if(t.tabIndex>-1){t.focus();return}t=t.parentElement}},ss=e=>{e.preventDefault(),e.returnValue=""},is=e=>Array.from(e).map(t=>`0${t.toString(16)}`.slice(-2)).join(""),ls=()=>W()?1:Date.now(),cs=e=>e instanceof Map?e:e.reduce((t,n)=>(t.set(typeof n=="string"?n:n.id,n),t),new Map),us=e=>e.reduce((t,n,r)=>(t.set(n.id,[n,r]),t),new Map),fs=(e,t)=>e.reduce((n,r,o)=>(n[t?t(r):o]=r,n),{}),ds=e=>e.reduce((t,n,r)=>{let o={...n,prev:null,next:null};if(r!==0){let a=t[r-1];if(o.prev=a,a.next=o,r===e.length-1){let i=t[0];o.next=i,i.prev=o}}return t.push(o),t},[]),Qt=e=>Array.isArray(e)?e:e.values(),ps=e=>Array.isArray(e)?e:Array.from(Qt(e)),W=()=>m.MODE===B.TEST,hs=()=>m.MODE===B.DEVELOPMENT,ms=()=>m.MODE===B.PRODUCTION,Ts=()=>typeof process<"u"&&!0,bs=(e,t)=>new CustomEvent(e,{detail:{nativeEvent:t},cancelable:!0}),gs=(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},Es=e=>{let t=typeof e;return e==null||t!=="object"&&t!=="function"},Jt=()=>{try{return window.self===window.top?"top":"iframe"}catch{return"iframe"}},_s=()=>Jt()==="iframe",xs=e=>!!e&&typeof e=="object"&&"then"in e&&"catch"in e&&"finally"in e,ys=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):[]},ke=(e,t)=>Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t,en=(e,t,n,r=!1)=>{let o=Object.keys(e),a=Object.keys(t);if(o.length!==a.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]||ke(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 s=n?.[i],l=s?s(e[i],t[i]):e[i]===t[i]||ke(e[i],t[i]);return!l&&r&&console.warn(`%cisShallowEqual: ${i} not equal ->`,"color: #8B4000",e[i],t[i]),l})},As=(e,t,{checkForDefaultPrevented:n=!0}={})=>function(o){if(e?.(o),!n||!o?.defaultPrevented)return t?.(o)},vs=(e,t,n)=>{if(!t)return e;if(n)return console.error(t),e;throw new Error(t)};function Ss(e,t){if(!e)throw new Error(t)}var Ms=e=>{let t,n,r=function(o){let a=Object.entries(o);if(t){let s=!0;for(let[l,u]of a)if(t.get(l)!==u){s=!1;break}if(s)return n}let i=e(o);return t=new Map(a),n=i,i};return r.clear=()=>{t=void 0,n=void 0},r},Rs=(e,t)=>e instanceof Set||e instanceof Map?e.has(t):"includes"in e?e.includes(t):e.hasOwnProperty(t),Ls=e=>JSON.parse(JSON.stringify(e)),Os=(e,t)=>en(e,t)?e:t;function Fs(e,t,n,r){return e?(e?.addEventListener?.(t,n,r),()=>{e?.removeEventListener?.(t,n,r)}):()=>{}}function ws(e,t=!0){let n=e.length;if(n<4)return"";let r=e[0],o=e[1],a=e[2],i=`M${r[0].toFixed(2)},${r[1].toFixed(2)} Q${o[0].toFixed(2)},${o[1].toFixed(2)} ${K(o[0],a[0]).toFixed(2)},${K(o[1],a[1]).toFixed(2)} T`;for(let s=2,l=n-1;s<l;s++)r=e[s],o=e[s+1],i+=`${K(r[0],o[0]).toFixed(2)},${K(r[1],o[1]).toFixed(2)} `;return t&&(i+="Z"),i}var Is=e=>e.replace(/\r?\n|\r/g,`
|
|
4
|
-
`);function Cs(e){return e}var Se=async(e,...t)=>new Promise(n=>{n(e(...t))}),Ps=(...e)=>Math.max(...e.map(t=>t?1:0))>0,Ds=e=>{try{return JSON.parse(e)}catch{return null}},He=e=>e.replace(/"/g,"""),Us=e=>Array.isArray(e)?e:[e],tn=e=>Array.isArray(e),nn=e=>tn(e)?e.length:e instanceof Map||e instanceof Set?e.size:Object.keys(e).length,ks=(e,t)=>{if(nn(e)===0)return null;let n=t||(o=>o),r=null;for(let o of e){let a=n(o);if((r===null||r===a)&&a!=null)r=a;else return null}return r},Be="excalidraw-feature-flags",J={COMPLEX_BINDINGS:!1},L=null,Ns=e=>{if(!L)try{let t=localStorage.getItem(Be);t&&(L=JSON.parse(t)??J)}catch{}return(L||J)[e]},Hs=(e,t)=>{try{L={...L||J,[e]:t},localStorage.setItem(Be,JSON.stringify(L))}catch(n){console.error("unable to set feature flag",n)}};var Ge=new C(Date.now()),Ke=0,Vs=()=>Math.floor(Ge.next()*2**31),Xs=e=>{Ge=new C(e),Ke=0},zs=()=>W()?`id${Ke++}`:De();f();var Ye=ne(We(),1);var pn=e=>(e=e.trim(),e&&(0,Ye.sanitizeUrl)(He(e))),Js=e=>!!(e?.includes(location.origin)||e?.startsWith("/")),ei=e=>{if(e=pn(e),e.startsWith("/"))return`${location.origin}${e}`;try{new URL(e)}catch{return"about:blank"}return e};f();var Ve=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=[]}};export{Ur as ACTIVE_THRESHOLD,xr as ALLOWED_PASTE_MIME_TYPES,Yn as APP_NAME,Zr as ARROW_LABEL_FONT_SIZE_TO_MIN_WIDTH_RATIO,jr as ARROW_LABEL_WIDTH_FRACTION,mo as ARROW_TYPE,xo as BIND_MODE_TIMEOUT,qr as BOUND_TEXT_PADDING,re as BinaryHeap,gr as CANVAS_ONLY_ACTIONS,so as CANVAS_SEARCH_TAB,be as CJK_HAND_DRAWN_FALLBACK_FONT,or as CLASSES,Fe as CODES,Ln as COLORS_PER_ROW,Tr as COLOR_CHARCOAL_BLACK,kn as COLOR_OUTLINE_CONTRAST_THRESHOLD,d as COLOR_PALETTE,br as COLOR_VOICE_CALL,mr as COLOR_WHITE,er as CURSOR_TYPE,ir as DARK_THEME_FILTER,no as DEFAULT_ADAPTIVE_RADIUS,In as DEFAULT_CANVAS_BACKGROUND_PICKS,On as DEFAULT_CHART_COLOR_INDEX,hr as DEFAULT_COLLISION_THRESHOLD,H as DEFAULT_ELEMENT_BACKGROUND_COLOR_INDEX,Pn as DEFAULT_ELEMENT_BACKGROUND_COLOR_PALETTE,wn as DEFAULT_ELEMENT_BACKGROUND_PICKS,ao as DEFAULT_ELEMENT_PROPS,N as DEFAULT_ELEMENT_STROKE_COLOR_INDEX,Cn as DEFAULT_ELEMENT_STROKE_COLOR_PALETTE,Fn as DEFAULT_ELEMENT_STROKE_PICKS,Kr as DEFAULT_EXPORT_PADDING,fo as DEFAULT_FILENAME,fr as DEFAULT_FONT_FAMILY,ur as DEFAULT_FONT_SIZE,Er as DEFAULT_GRID_SIZE,_r as DEFAULT_GRID_STEP,Jn as DEFAULT_LASER_COLOR,Wr as DEFAULT_MAX_IMAGE_WIDTH_OR_HEIGHT,to as DEFAULT_PROPORTIONAL_RADIUS,To as DEFAULT_REDUCED_GLOBAL_ALPHA,io as DEFAULT_SIDEBAR,dr as DEFAULT_TEXT_ALIGN,It as DEFAULT_TRANSFORM_HANDLE_SPACING,Hr as DEFAULT_UI_OPTIONS,xe as DEFAULT_VERSION,pr as DEFAULT_VERTICAL_ALIGN,_o as DOUBLE_TAP_POSITION_THRESHOLD,Xn as DRAGGING_THRESHOLD,uo as EDITOR_LS_KEYS,bo as ELEMENT_LINK_KEY,eo as ELEMENT_READY_TO_ERASE_OPACITY,qn as ELEMENT_SHIFT_TRANSLATE_AMOUNT,jn as ELEMENT_TRANSLATE_AMOUNT,zr as ENCRYPTION_KEY_BITS,B as ENV,Pt as EPSILON,Ot as EVENT,Ar as EXPORT_DATA_TYPES,yr as EXPORT_IMAGE_TYPES,Gr as EXPORT_SCALES,Ve as Emitter,g as FONT_FAMILY,j as FONT_FAMILY_FALLBACKS,Ft as FONT_FAMILY_GENERIC_FALLBACKS,G as FONT_METADATA,ar as FONT_SIZES,lr as FRAME_STYLE,Mo as GOOGLE_FONTS_RANGES,Pr as HYPERLINK_TOOLTIP_DELAY,Dr as IDLE_THRESHOLD,ye as IMAGE_MIME_TYPES,Sr as IMAGE_RENDER_TIMEOUT,R as KEYS,Yt as KeyCodeMap,lo as LIBRARY_DISABLED_TYPES,kt as LIBRARY_SIDEBAR_TAB,$n as LINE_CONFIRM_THRESHOLD,Eo as LINE_POLYGON_POINT_MERGE_DISTANCE,Ro as LOCAL_FONT_PROTOCOL,Yr as MAX_ALLOWED_FILE_BYTES,Rn as MAX_CUSTOM_COLORS_USED_IN_CANVAS,Br as MAX_DECIMALS_FOR_SVG_EXPORT,Cr as MAX_ZOOM,Te as MIME_TYPES,zn as MINIMUM_ARROW_SIZE,cr as MIN_FONT_SIZE,ho as MIN_WIDTH_OR_HEIGHT,Ir as MIN_ZOOM,yo as MOBILE_ACTION_BUTTON_BG,Ee as MONOSPACE_GENERIC_FONT,ko as MQ_MAX_HEIGHT_LANDSCAPE,Do as MQ_MAX_MOBILE,Ho as MQ_MAX_TABLET,Uo as MQ_MAX_WIDTH_LANDSCAPE,No as MQ_MIN_TABLET,Bo as MQ_MIN_WIDTH_DESKTOP,Go as MQ_RIGHT_SIDEBAR_MIN_WIDTH,go as ORIG_ID,tr as POINTER_BUTTON,nr as POINTER_EVENTS,Ce as PromisePool,Ae as Queue,Ut as ROUGHNESS,ro as ROUNDNESS,ge as SANS_SERIF_GENERIC_FONT,Fr as SCROLL_TIMEOUT,Qn as SHIFT_LOCKING_ANGLE,Ct as SIDE_RESIZING_THRESHOLD,po as STATS_PANELS,Dt as STRING_MIME_TYPES,oo as STROKE_WIDTH,Xr as SVG_DOCUMENT_PREAMBLE,Vr as SVG_NS,Mr as TAP_TWICE_TIMEOUT,Jr as TEXT_ALIGN,Vn as TEXT_AUTOWRAP_THRESHOLD,Zn as TEXT_TO_CENTER_SNAP_THRESHOLD,sr as THEME,Lr as TITLE_TIMEOUT,co as TOOL_TYPE,Rr as TOUCH_CTX_MENU_TIMEOUT,Nr as URL_HASH_KEYS,kr as URL_QUERY_KEYS,Nt as UserIdleState,$r as VERSIONS,Or as VERSION_TIMEOUT,Qr as VERTICAL_ALIGN,I as WINDOWS_EMOJI_FALLBACK_FONT,rr as YOUTUBE_STATES,wr as ZOOM_STEP,Fs as addEventListener,Ya as allowFullScreen,Mn as applyDarkModeFilter,ds as arrayToList,cs as arrayToMap,us as arrayToMapWithIndex,fs as arrayToObject,vs as assertNever,is as bytesToHexString,La as capitalizeString,Us as castArray,ka as chunk,Ls as cloneJSON,Un as colorToHex,As as composeEventHandlers,$o as createUserAgentDescriptor,Pa as debounce,zo as deriveStylesPanelMode,Ba as distance,Ne as easeOut,Ua as easeToValuesRAF,He as escapeDoubleQuotes,Va as exitFullScreen,Qa as findIndex,Ja as findLastIndex,as as focusNearestParent,Dn as getAllColorsSpecificShade,Ra as getDateTime,vr as getExportSource,Ns as getFeatureFlag,_e as getFontFamilyFallbacks,$t as getFontFamilyString,Ia as getFontString,Xo as getFormFactor,Jt as getFrame,wt as getGenericFontFamilyFallback,$a as getGlobalCSSVariable,ua as getGridPoint,Oo as getLineHeight,os as getNearestScrollableContainer,la as getSizeFromPoints,ws as getSvgPathFromStroke,ls as getUpdatedTimestamp,ns as getVersion,Lo as getVerticalOffset,Ss as invariant,Le as isAndroid,Ps as isAnyTrue,ta as isArrowKey,gn as isBounds,Vo as isBrave,Ht as isChrome,Nn as isColorDark,Re as isDarwin,hs as isDevEnv,Wo as isFirefox,Wa as isFullScreen,Oe as isIOS,zt as isInputLike,Fa as isInteractive,Vt as isLatinChar,Js as isLocalLink,Rs as isMemberOf,Bt as isMobileBreakpoint,Es as isPrimitive,ms as isProdEnv,xs as isPromiseLike,qa as isRTL,tn as isReadonlyArray,_s as isRunningInIframe,Yo as isSafari,Ga as isSelectionLikeTool,Ts as isServerEnv,en as isShallowEqual,Gt as isTabletBreakpoint,W as isTestEnv,Oa as isToolIcon,me as isTransparent,Ko as isWindows,wa as isWritableElement,qo as loadDesktopUIModePreference,es as mapFind,ea as matchKey,Ms as memoize,Za as muteFSAbortError,ts as nFormatter,Ca as nextAnimationFrame,Is as normalizeEOL,Hn as normalizeInputColor,pn as normalizeLink,ss as preventUnload,Se as promiseTry,ys as queryFocusableElements,zs as randomId,Vs as randomInteger,ks as reduceToCommonValue,Ha as removeSelection,ca as rescalePoints,Xs as reseed,ve as resolvablePromise,he as rgbToHex,Ds as safelyParseJSON,za as sceneCoordsToViewportCoords,Na as selectNode,Ma as setDateTimeForTests,jo as setDesktopUIMode,Hs as setFeatureFlag,ra as shouldMaintainAspectRatio,na as shouldResizeFromCenter,oa as shouldRotateWithDiscreteAngle,nn as sizeOf,rs as supportsEmoji,Wn as supportsResizeObserver,Da as throttleRAF,ps as toArray,Cs as toBrandedType,Qt as toIterable,ei as toValidURL,ja as tupleToCoors,Ka as updateActiveTool,gs as updateObject,Os as updateStable,Xa as viewportCoordsToSceneCoords,bs as wrapEvent};
|
|
3
|
+
`,Lo=128,Io={excalidraw:2,excalidrawLibrary:2},wo=5,Fo=.7,Co=11,Po={TOP:"top",MIDDLE:"middle",BOTTOM:"bottom"},Do={LEFT:"left",CENTER:"center",RIGHT:"right"},No=20,ko=70,Uo=.25,Ho=32,Go={LEGACY:1,PROPORTIONAL_RADIUS:2,ADAPTIVE_RADIUS:3},zt={architect:0,artist:1,cartoonist:2},Ko=["thin","medium","bold"],Re={thin:1,medium:2,bold:4,extraBold:8},Xt={thin:.5,medium:1,bold:2,extraBold:4},Bo=(e,t)=>e==="freedraw"?Xt[t]:Re[t],jt="medium",Wo={strokeColor:d.black,backgroundColor:d.transparent,fillStyle:"solid",strokeWidth:Re[jt],strokeStyle:"solid",roughness:zt.artist,opacity:100,locked:!1},qt="library",Yo="search",Vo={name:"default",defaultTab:qt},$o=new Set(["iframe","embeddable","image"]),zo={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",stickynote:"stickynote",embeddable:"embeddable",laser:"laser",autoshape:"autoshape",bucketfill:"bucketfill"},Xo={OAI_API_KEY:"excalidraw-oai-api-key",MERMAID_TO_EXCALIDRAW:"mermaid-to-excalidraw",PUBLISH_LIBRARY:"publish-library-data"},jo="Untitled",qo={generalStats:1,elementProperties:2},Zo=1,Qo={sharp:"sharp",round:"round",elbow:"elbow"},Jo=.3,es="element",ts=Symbol.for("__test__originalId__"),Zt=(r=>(r.ACTIVE="active",r.AWAY="away",r.IDLE="idle",r))(Zt||{}),ns=20,rs=35,os=700,ss={background:"var(--mobile-action-button-bg)"},is=.5,as=.2;p();var H={[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},[z.Xiaolai]:{metrics:{unitsPerEm:1e3,ascender:880,descender:-144,lineHeight:1.25},fallback:!0},[z["Segoe UI Emoji"]]:{metrics:{unitsPerEm:1e3,ascender:886,descender:-374,lineHeight:1.25},local:!0,fallback:!0}},ds={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"},fs="local:",ms=(e,t,n)=>{let{unitsPerEm:r,ascender:o,descender:s}=H[e]?.metrics||H[T.Excalifont].metrics,a=t/r,i=(n-a*o+a*s)/2;return a*o+i},hs=e=>{let{lineHeight:t}=H[e]?.metrics||H[T.Excalifont].metrics;return t};p();var Oe=class{jobs=[];running=!1;tick(){if(this.running)return;let t=this.jobs.shift();t?(this.running=!0,t.promise.resolve(Ie(t.jobFactory,...t.args).finally(()=>{this.running=!1,this.tick()}))):this.running=!1}push(t,...n){let r=Le();return this.jobs.push({jobFactory:t,promise:r,args:n}),this.tick(),r}};p();p();var we="excalidraw.desktopUIMode",xs=599,As=1e3,ys=500,vs=600,Ss=1180,Ms=1440,Rs=1229,X=typeof navigator>"u"?void 0:navigator,j=X?.platform??"",M=X?.userAgent??"",Fe=/Mac|iPod|iPhone|iPad/.test(j),Os=/^Win/.test(j),Ce=/\b(android)\b/i.test(M),Ls=typeof window<"u"&&"netscape"in window&&M.indexOf("rv:")>1&&M.indexOf("Gecko")>1,Qt=M.indexOf("Chrome")!==-1,Is=!Qt&&M.indexOf("Safari")!==-1,Pe=/iPad|iPhone/i.test(j)||M.includes("Mac")&&typeof document<"u"&&"ontouchend"in document,ws=()=>X?.brave?.isBrave?.name==="isBrave",Jt=(e,t)=>e<=599||t<500&&e<1e3,en=(e,t)=>{let n=Math.min(e,t),r=Math.max(e,t);return n>=600&&r<=1180},tn=()=>{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(Pe)return!0;if(Ce){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},Fs=(e,t)=>Jt(e,t)?"phone":en(e,t)?"tablet":"desktop",Cs=e=>e.formFactor==="phone"?"mobile":e.formFactor==="tablet"?"compact":e.desktopUIMode,Ps=e=>{let t=e??"",n="unknown";return Pe?n="ios":Ce?n="android":t&&(n="other"),{isMobileDevice:tn(),platform:n}},Ds=()=>{if(typeof window>"u")return null;try{let e=window.localStorage.getItem(we);if(e==="compact"||e==="full")return e}catch{}return null},nn=e=>{if(!(typeof window>"u"))try{window.localStorage.setItem(we,e)}catch{}},Ns=e=>{if(!(e!=="compact"&&e!=="full"))return nn(e),e};var De={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"},R={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:Fe?"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",N:"n",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"},rn=new Map([[R.Z,De.Z],[R.Y,De.Y]]),on=e=>/^[a-z]$/.test(e.toLowerCase()),Gs=(e,t)=>{if(t===e.key.toLowerCase())return!0;let n=rn.get(t);return!!(n&&!on(e.key)&&e.code===n)},Ks=e=>e===R.ARROW_LEFT||e===R.ARROW_RIGHT||e===R.ARROW_DOWN||e===R.ARROW_UP,Bs=e=>e.altKey,Ws=e=>e.shiftKey,Ys=e=>e.shiftKey;p();import{pointFrom as Ne,pointFromPair as sn}from"@excalidraw/math";var Xs=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)}},js=(e,t,n,r)=>{let o=n.map(y=>y[e]),s=Math.max(...o),a=Math.min(...o),i=s-a,l=i===0?1:t/i,u=1/0,h=n.map(y=>{let S=y[e]*l,C=[...y];return C[e]=S,S<u&&(u=S),C});if(!r||h.length===2)return h;let b=a-u;return h.map(y=>sn(y.map((S,C)=>C===e?S+b:S)))},qs=(e,t,n)=>n?Ne(Math.round(e/n)*n,Math.round(t/n)*n):Ne(e,t);p();var Ge=oe(Ue(),1),He=class{pool;entries={};constructor(t,n){this.pool=new Ge.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 G}from"@excalidraw/math";var Z=null,di=e=>{Z=e},fi=()=>{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}`},mi=e=>e.charAt(0).toUpperCase()+e.slice(1),K=e=>{let t=e;return t?.ownerDocument?.defaultView??t?.defaultView??(typeof window>"u"?null:window)},hi=e=>{let t=K(e);return!!t&&e instanceof t.HTMLElement&&e.className.includes("ToolIcon")},an=e=>{let t=K(e);return!!t&&(e instanceof t.HTMLElement&&e.dataset.type==="wysiwyg"||e instanceof t.HTMLBRElement||e instanceof t.HTMLInputElement||e instanceof t.HTMLTextAreaElement||e instanceof t.HTMLSelectElement)},Ei=e=>{let t=K(e);return an(e)||!!t&&e instanceof t.Element&&!!e.closest("label, button")},Ti=e=>{let t=K(e);return!!t&&(e instanceof t.HTMLElement&&e.dataset.type==="wysiwyg"||e instanceof t.HTMLBRElement||e instanceof t.HTMLTextAreaElement||e instanceof t.HTMLInputElement&&(e.type==="text"||e.type==="number"||e.type==="password"||e.type==="search")||e instanceof t.HTMLElement&&e.closest(".cm-editor")!==null)},ln=({fontFamily:e})=>{for(let[t,n]of Object.entries(T))if(n===e)return`${t}${ve(n).map(r=>`, ${r}`).join("")}`;return I},bi=({fontSize:e,fontFamily:t})=>`${e}px ${ln({fontFamily:t})}`,gi=async e=>{requestAnimationFrame(()=>requestAnimationFrame(e))},_i=(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},xi=(e,t)=>{let n=null,r=null,o=()=>t??window,s=()=>{n=o().requestAnimationFrame(()=>{n=null;let i=r;r=null,i&&e(...i)})},a=(...i)=>{r=i,n===null&&s()};return a.flush=()=>{n!==null&&(o().cancelAnimationFrame(n),n=null),r&&(e(...r),r=null)},a.cancel=()=>{r=null,n!==null&&(o().cancelAnimationFrame(n),n=null)},a},Ai=e=>1-Math.pow(1-e,4),yi=(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},vi=e=>{let t=window.getSelection();if(t){let n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n)}},Si=()=>{let e=window.getSelection();e&&e.removeAllRanges()},Mi=(e,t)=>Math.abs(e-t),Ri=e=>e==="selection"||e==="lasso",Oi=(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},Li=()=>document.fullscreenElement?.nodeName==="HTML",Ii=()=>document.documentElement.requestFullscreen(),wi=()=>document.exitFullscreen(),Fi=({clientX:e,clientY:t},{zoom:n,offsetLeft:r,offsetTop:o,scrollX:s,scrollY:a})=>{let i=(e-r)/n.value-s,l=(t-o)/n.value-a;return{x:i,y:l}},Ci=({sceneX:e,sceneY:t},{zoom:n,offsetLeft:r,offsetTop:o,scrollX:s,scrollY:a})=>{let i=(e+s)*n.value+r,l=(t+a)*n.value+o;return{x:i,y:l}},Pi=e=>getComputedStyle(document.documentElement).getPropertyValue(`--${e}`),cn="A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u0300-\u0590\u0800-\u1FFF\u2C00-\uFB1C\uFDFE-\uFE6F\uFEFD-\uFFFF",We="\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC",un=new RegExp(`^[^${cn}]*[${We}]`),Di=e=>un.test(e),pn=new RegExp(`[${We}]`),Ni=e=>pn.test(e),ki=e=>{let[t,n]=e;return{x:t,y:n}},Ui=e=>{if(e?.name==="AbortError"){console.warn(e);return}throw e},Hi=(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},Gi=(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},Ki=(e,t)=>{for(let n=0;n<e.length;n++){let r=t(e[n],n);if(r!=null)return r}},Le=()=>{let e,t,n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n},Bi=(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},Wi=()=>document.querySelector('meta[name="version"]')?.content||Se,Yi=()=>{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},Vi=e=>{let t=e.ownerDocument,n=t.defaultView??window,r=e.parentElement;for(;r;){if(r===t.body)return t;let{overflowY:o}=n.getComputedStyle(r);if(r.scrollHeight>r.clientHeight&&(o==="auto"||o==="scroll"||o==="overlay"))return r;r=r.parentElement}return t},$i=e=>{let t=e.parentElement;for(;t;){if(t.tabIndex>-1){t.focus();return}t=t.parentElement}},zi=e=>{e.preventDefault(),e.returnValue=""},Xi=e=>Array.from(e).map(t=>`0${t.toString(16)}`.slice(-2)).join(""),ji=()=>J()?1:Date.now(),qi=e=>e instanceof Map?e:e.reduce((t,n)=>(t.set(typeof n=="string"?n:n.id,n),t),new Map),Zi=e=>e.reduce((t,n,r)=>(t.set(n.id,[n,r]),t),new Map),Qi=(e,t)=>e.reduce((n,r,o)=>(n[t?t(r):o]=r,n),{}),Ji=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 a=t[0];o.next=a,a.prev=o}}return t.push(o),t},[]),dn=e=>Array.isArray(e)?e:e.values(),ea=e=>Array.isArray(e)?e:Array.from(dn(e)),J=()=>m.MODE===U.TEST,ta=()=>m.MODE===U.DEVELOPMENT,Ye=()=>m.MODE===U.PRODUCTION,na=()=>typeof process<"u"&&!0,ra=(e,t)=>new CustomEvent(e,{detail:{nativeEvent:t},cancelable:!0}),oa=(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},sa=e=>{let t=typeof e;return e==null||t!=="object"&&t!=="function"},fn=()=>{try{return window.self===window.top?"top":"iframe"}catch{return"iframe"}},ia=()=>fn()==="iframe",aa=e=>!!e&&typeof e=="object"&&"then"in e&&"catch"in e&&"finally"in e,la=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):[]},Be=(e,t)=>Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t,mn=(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 a of n)if(!(e[a]===t[a]||Be(e[a],t[a])))return r&&console.warn(`%cisShallowEqual: ${a} not equal ->`,"color: #8B4000",e[a],t[a]),!1;return!0}return o.every(a=>{let i=n?.[a],l=i?i(e[a],t[a]):e[a]===t[a]||Be(e[a],t[a]);return!l&&r&&console.warn(`%cisShallowEqual: ${a} not equal ->`,"color: #8B4000",e[a],t[a]),l})},ca=(e,t,{checkForDefaultPrevented:n=!0}={})=>function(o){if(e?.(o),!n||!o?.defaultPrevented)return t?.(o)},ua=(e,t,n)=>{if(!t)return e;if(n)return console.error(t),e;throw new Error(t)};function pa(e,t){if(!e)throw new Error(t)}var da=e=>{let t,n,r=function(o){let s=Object.entries(o);if(t){let i=!0;for(let[l,u]of s)if(t.get(l)!==u){i=!1;break}if(i)return n}let a=e(o);return t=new Map(s),n=a,a};return r.clear=()=>{t=void 0,n=void 0},r},fa=(e,t)=>e instanceof Set||e instanceof Map?e.has(t):"includes"in e?e.includes(t):e.hasOwnProperty(t),ma=e=>JSON.parse(JSON.stringify(e)),ha=(e,t)=>mn(e,t)?e:t;function Ea(e,t,n,r){return e?(e?.addEventListener?.(t,n,r),()=>{e?.removeEventListener?.(t,n,r)}):()=>{}}function Ta(e,t=!0){let n=e.length;if(n<4)return"";let r=e[0],o=e[1],s=e[2],a=`M${r[0].toFixed(2)},${r[1].toFixed(2)} Q${o[0].toFixed(2)},${o[1].toFixed(2)} ${G(o[0],s[0]).toFixed(2)},${G(o[1],s[1]).toFixed(2)} T`;for(let i=2,l=n-1;i<l;i++)r=e[i],o=e[i+1],a+=`${G(r[0],o[0]).toFixed(2)},${G(r[1],o[1]).toFixed(2)} `;return t&&(a+="Z"),a}var ba=e=>e.replace(/\r?\n|\r/g,`
|
|
4
|
+
`);function ga(e){return e}var Ie=async(e,...t)=>new Promise(n=>{n(e(...t))}),_a=(...e)=>Math.max(...e.map(t=>t?1:0))>0,xa=e=>{try{return JSON.parse(e)}catch{return null}},Ve=e=>e.replace(/"/g,"""),Aa=e=>Array.isArray(e)?e:[e],hn=e=>Array.isArray(e),En=e=>hn(e)?e.length:e instanceof Map||e instanceof Set?e.size:Object.keys(e).length,ya=(e,t)=>{if(En(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},$e="excalidraw-feature-flags",Q={COMPLEX_BINDINGS:!1},O=null,va=e=>{if(!O)try{let t=localStorage.getItem($e);t&&(O=JSON.parse(t)??Q)}catch{}return(O||Q)[e]},Sa=(e,t)=>{try{O={...O||Q,[e]:t},localStorage.setItem($e,JSON.stringify(O))}catch(n){console.error("unable to set feature flag",n)}},Ma=(e,t)=>t.includes(e);var ze=new w(Date.now()),Xe=0,Fa=()=>Math.floor(ze.next()*2**31),Ca=e=>{ze=new w(e),Xe=0},Pa=()=>J()?`id${Xe++}`:Ke(),Da=e=>{let t=e>>>0;return()=>{t+=1831565813;let n=t;return n=Math.imul(n^n>>>15,n|1),n^=n+Math.imul(n^n>>>7,n|61),((n^n>>>14)>>>0)/4294967296}};p();var qe=oe(je(),1);var Mn=e=>(e=e.trim(),e&&(0,qe.sanitizeUrl)(Ve(e))),Ka=e=>!!(e?.includes(location.origin)||e?.startsWith("/")),Ba=e=>{if(e=Mn(e),e.startsWith("/"))return`${location.origin}${e}`;try{new URL(e)}catch{return"about:blank"}return e};p();var W=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 Ze=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 W,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((...a)=>{s(this.toPromiseValue(a))})})}emit(t,...n){let r=this.behavior[t];if(!Ye()&&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 Qe=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)),Rn=e=>F(e.reduce((t,n)=>t+n)/e.length),ee=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((i,l)=>i+l),a=F(s/e.FRAME_COUNT);console.info(t,`- ${r.length} calls - ${a}ms/frame across ${e.FRAME_COUNT} frames (${F(a/16.67*100,1)}% of frame budget)`),e.TIMES_AVG[t]={t:n,times:[],avg:o!=null?Rn([o,a]):a}}}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(),a=n(...o);return e[t](performance.now()-s,r),a};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 a of o){let i=r[a],l=n[a];Je(i,l)||(s[a]={prev:i,next:l})}Object.keys(s).length>0&&console.info(`[${t}] changed:`,s)}};function Je(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(!Je(e[o],t[o]))return!1;return!0}export{go as ACTIVE_THRESHOLD,to as ALLOWED_PASTE_MIME_TYPES,ur as APP_NAME,Co as ARROW_LABEL_FONT_SIZE_TO_MIN_WIDTH_RATIO,Fo as ARROW_LABEL_WIDTH_FRACTION,Qo as ARROW_TYPE,Ze as AppEventBus,os as BIND_MODE_TIMEOUT,wo as BOUND_TEXT_PADDING,zn as BUCKET_FILL_BACKGROUND_PICKS,se as BinaryHeap,Qr as CANVAS_ONLY_ACTIONS,Yo as CANVAS_SEARCH_TAB,xe as CJK_HAND_DRAWN_FALLBACK_FONT,Mr as CLASSES,De as CODES,Wn as COLORS_PER_ROW,qr as COLOR_CHARCOAL_BLACK,rr as COLOR_OUTLINE_CONTRAST_THRESHOLD,d as COLOR_PALETTE,Vn as COLOR_TOP_PICKS_SLOTS,Zr as COLOR_VOICE_CALL,jr as COLOR_WHITE,Ar as CURSOR_TYPE,Lr as DARK_THEME_FILTER,Ho as DEFAULT_ADAPTIVE_RADIUS,qn as DEFAULT_CANVAS_BACKGROUND_PICKS,Yn as DEFAULT_CHART_COLOR_INDEX,Xr as DEFAULT_COLLISION_THRESHOLD,v as DEFAULT_ELEMENT_BACKGROUND_COLOR_INDEX,Qn as DEFAULT_ELEMENT_BACKGROUND_COLOR_PALETTE,$n as DEFAULT_ELEMENT_BACKGROUND_PICKS,Wo as DEFAULT_ELEMENT_PROPS,N as DEFAULT_ELEMENT_STROKE_COLOR_INDEX,Zn as DEFAULT_ELEMENT_STROKE_COLOR_PALETTE,Nt as DEFAULT_ELEMENT_STROKE_PICKS,jt as DEFAULT_ELEMENT_STROKE_WIDTH_KEY,So as DEFAULT_EXPORT_PADDING,jo as DEFAULT_FILENAME,Yr as DEFAULT_FONT_FAMILY,Fr as DEFAULT_FONT_SIZE,Jr as DEFAULT_GRID_SIZE,eo as DEFAULT_GRID_STEP,Mo as DEFAULT_IMAGE_OPTIONS,xr as DEFAULT_LASER_COLOR,Uo as DEFAULT_PROPORTIONAL_RADIUS,Jo as DEFAULT_REDUCED_GLOBAL_ALPHA,Vo as DEFAULT_SIDEBAR,be as DEFAULT_STICKY_NOTE_BG,Ur as DEFAULT_STICKY_NOTE_SIZE,is as DEFAULT_STROKE_STREAMLINE,as as DEFAULT_STROKE_STREAMLINE_PRECISE,$r as DEFAULT_TEXT_ALIGN,Wt as DEFAULT_TRANSFORM_HANDLE_SPACING,Ao as DEFAULT_UI_OPTIONS,Se as DEFAULT_VERSION,zr as DEFAULT_VERTICAL_ALIGN,Eo as DEFAULT_ZOOM,rs as DOUBLE_TAP_POSITION_THRESHOLD,mr as DRAGGING_THRESHOLD,ee as Debug,Xo as EDITOR_LS_KEYS,es as ELEMENT_LINK_KEY,ko as ELEMENT_PENDING_DRAW_SHAPE_OPACITY,No as ELEMENT_READY_TO_ERASE_OPACITY,Tr as ELEMENT_SHIFT_TRANSLATE_AMOUNT,br as ELEMENT_TRANSLATE_AMOUNT,Lo as ENCRYPTION_KEY_BITS,U as ENV,Vt as EPSILON,Ut as EVENT,ro as EXPORT_DATA_TYPES,no as EXPORT_IMAGE_TYPES,vo as EXPORT_SCALES,W as Emitter,T as FONT_FAMILY,z as FONT_FAMILY_FALLBACKS,Ht as FONT_FAMILY_GENERIC_FALLBACKS,H as FONT_METADATA,Rr as FONT_SIZES,Vr as FONT_TOP_PICKS_SLOTS,Ir as FRAME_STYLE,Xt as FREEDRAW_STROKE_WIDTH,ds as GOOGLE_FONTS_RANGES,To as HYPERLINK_TOOLTIP_DELAY,bo as IDLE_THRESHOLD,Me as IMAGE_MIME_TYPES,so as IMAGE_RENDER_TIMEOUT,R as KEYS,rn as KeyCodeMap,$o as LIBRARY_DISABLED_TYPES,qt as LIBRARY_SIDEBAR_TAB,Er as LINE_CONFIRM_THRESHOLD,ns as LINE_POLYGON_POINT_MERGE_DISTANCE,fs as LOCAL_FONT_PROTOCOL,Bn as MAX_CUSTOM_COLORS_USED_IN_CANVAS,yo as MAX_DECIMALS_FOR_SVG_EXPORT,ho as MAX_ZOOM,_e as MIME_TYPES,hr as MINIMUM_ARROW_SIZE,wr as MIN_FONT_SIZE,Zo as MIN_WIDTH_OR_HEIGHT,mo as MIN_ZOOM,ss as MOBILE_ACTION_BUTTON_BG,ye as MONOSPACE_GENERIC_FONT,ys as MQ_MAX_HEIGHT_LANDSCAPE,xs as MQ_MAX_MOBILE,Ss as MQ_MAX_TABLET,As as MQ_MAX_WIDTH_LANDSCAPE,vs as MQ_MIN_TABLET,Ms as MQ_MIN_WIDTH_DESKTOP,Rs as MQ_RIGHT_SIDEBAR_MIN_WIDTH,ts as ORIG_ID,yr as POINTER_BUTTON,vr as POINTER_EVENTS,He as PromisePool,Oe as Queue,zt as ROUGHNESS,Go as ROUNDNESS,Ae as SANS_SERIF_GENERIC_FONT,uo as SCROLL_TIMEOUT,_r as SHIFT_LOCKING_ANGLE,Yt as SIDE_RESIZING_THRESHOLD,qo as STATS_PANELS,jn as STICKY_NOTE_BACKGROUND_PICKS,kr as STICKY_NOTE_BODY_INSET_Y,Wr as STICKY_NOTE_EDGE_SHADOW_OPACITY,Br as STICKY_NOTE_EDGE_SHADOW_WIDTH,Dr as STICKY_NOTE_FALLBACK_FONT_SIZE,Nr as STICKY_NOTE_FONT_STEP,Bt as STICKY_NOTE_FOOTER,Pr as STICKY_NOTE_MAX_FONT_SIZE,Cr as STICKY_NOTE_MIN_FONT_SIZE,Hr as STICKY_NOTE_MIN_SIZE,Kt as STICKY_NOTE_PADDING,Gr as STICKY_NOTE_SHADOW_OFFSET,Kr as STICKY_NOTE_SHADOW_OPACITY,Xn as STICKY_NOTE_STROKE_PICKS,$t as STRING_MIME_TYPES,Re as STROKE_WIDTH,Ko as STROKE_WIDTH_KEYS,Oo as SVG_DOCUMENT_PREAMBLE,Ro as SVG_NS,io as TAP_TWICE_TIMEOUT,Do as TEXT_ALIGN,pr as TEXT_AUTOWRAP_THRESHOLD,fr as TEXT_MAX_WRAP_WIDTH,gr as TEXT_TO_CENTER_SNAP_THRESHOLD,dr as TEXT_VIEWPORT_PADDING,Or as THEME,lo as TITLE_TIMEOUT,zo as TOOL_TYPE,ao as TOUCH_CTX_MENU_TIMEOUT,xo as URL_HASH_KEYS,_o as URL_QUERY_KEYS,Zt as UserIdleState,Io as VERSIONS,co as VERSION_TIMEOUT,Po as VERTICAL_ALIGN,Qe as VersionedSnapshotStore,I as WINDOWS_EMOJI_FALLBACK_FONT,Sr as YOUTUBE_STATES,po as ZEN_MODE_TRANSITION_DURATION,fo as ZOOM_STEP,Ea as addEventListener,Ii as allowFullScreen,Gn as applyDarkModeFilter,Ji as arrayToList,qi as arrayToMap,Zi as arrayToMapWithIndex,Qi as arrayToObject,ua as assertNever,Xi as bytesToHexString,mi as capitalizeString,Aa as castArray,yi as chunk,ma as cloneJSON,tr as colorToHex,ca as composeEventHandlers,Ps as createUserAgentDescriptor,_i as debounce,Cs as deriveStylesPanelMode,Mi as distance,Ai as easeOut,Ve as escapeDoubleQuotes,wi as exitFullScreen,Hi as findIndex,Gi as findLastIndex,$i as focusNearestParent,Jn as getAllColorsSpecificShade,fi as getDateTime,oo as getExportSource,va as getFeatureFlag,ve as getFontFamilyFallbacks,ln as getFontFamilyString,bi as getFontString,Fs as getFormFactor,fn as getFrame,Gt as getGenericFontFamilyFallback,Pi as getGlobalCSSVariable,qs as getGridPoint,hs as getLineHeight,Vi as getNearestScrollableContainer,Xs as getSizeFromPoints,Bo as getStrokeWidthByKey,Ta as getSvgPathFromStroke,K as getTargetWindow,ji as getUpdatedTimestamp,Wi as getVersion,ms as getVerticalOffset,Ni as hasRTLChars,pa as invariant,Ce as isAndroid,_a as isAnyTrue,Ks as isArrowKey,Fn as isBounds,ws as isBrave,Qt as isChrome,or as isColorDark,Fe as isDarwin,ta as isDevEnv,Ls as isFirefox,Li as isFullScreen,Pe as isIOS,an as isInputLike,Ei as isInteractive,on as isLatinChar,Ka as isLocalLink,fa as isMemberOf,Jt as isMobileBreakpoint,nr as isOpaqueColor,sa as isPrimitive,Ye as isProdEnv,aa as isPromiseLike,Di as isRTL,hn as isReadonlyArray,ia as isRunningInIframe,Is as isSafari,Ri as isSelectionLikeTool,na as isServerEnv,mn as isShallowEqual,en as isTabletBreakpoint,J as isTestEnv,hi as isToolIcon,ge as isTransparent,Os as isWindows,Ti as isWritableElement,Ds as loadDesktopUIModePreference,Ki as mapFind,Gs as matchKey,da as memoize,Ui as muteFSAbortError,Bi as nFormatter,gi as nextAnimationFrame,ba as normalizeEOL,sr as normalizeInputColor,Mn as normalizeLink,Ma as oneOf,zi as preventUnload,Ie as promiseTry,la as queryFocusableElements,Pa as randomId,Fa as randomInteger,ya as reduceToCommonValue,Kn as removeDarkModeFilter,Si as removeSelection,js as rescalePoints,Ca as reseed,Le as resolvablePromise,k as rgbToHex,xa as safelyParseJSON,Ci as sceneCoordsToViewportCoords,Da as seededRandom,vi as selectNode,er as setColorAlpha,di as setDateTimeForTests,Ns as setDesktopUIMode,Sa as setFeatureFlag,Ws as shouldMaintainAspectRatio,Bs as shouldResizeFromCenter,Ys as shouldRotateWithDiscreteAngle,En as sizeOf,Yi as supportsEmoji,cr as supportsResizeObserver,xi as throttleRAF,ea as toArray,ga as toBrandedType,dn as toIterable,Ba as toValidURL,ki as tupleToCoors,Oi as updateActiveTool,oa as updateObject,ha as updateStable,Fi 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,4 +1,5 @@
|
|
|
1
|
-
export declare const applyDarkModeFilter: (color: string) => string;
|
|
1
|
+
export declare const applyDarkModeFilter: (color: string, enable?: boolean) => string;
|
|
2
|
+
export declare const removeDarkModeFilter: (color: string) => string;
|
|
2
3
|
export type ColorTuple = readonly [string, string, string, string, string];
|
|
3
4
|
export type ColorPaletteCustom = {
|
|
4
5
|
[key: string]: ColorTuple | string;
|
|
@@ -28,20 +29,28 @@ export declare const COLOR_PALETTE: {
|
|
|
28
29
|
};
|
|
29
30
|
export type ColorPalette = typeof COLOR_PALETTE;
|
|
30
31
|
export type ColorPickerColor = keyof typeof COLOR_PALETTE;
|
|
32
|
+
/** number of slots in the color-picker top-picks strip — the strip layout is
|
|
33
|
+
* sized for exactly this many swatches, and pick customization (replace /
|
|
34
|
+
* reorder) preserves it */
|
|
35
|
+
export declare const COLOR_TOP_PICKS_SLOTS = 5;
|
|
31
36
|
export declare const DEFAULT_ELEMENT_STROKE_PICKS: ColorTuple;
|
|
32
37
|
export declare const DEFAULT_ELEMENT_BACKGROUND_PICKS: ColorTuple;
|
|
38
|
+
export declare const BUCKET_FILL_BACKGROUND_PICKS: ColorTuple;
|
|
39
|
+
export declare const DEFAULT_STICKY_NOTE_BG = "#ffdf6b";
|
|
40
|
+
export declare const STICKY_NOTE_STROKE_PICKS: ColorTuple;
|
|
41
|
+
export declare const STICKY_NOTE_BACKGROUND_PICKS: ColorTuple;
|
|
33
42
|
export declare const DEFAULT_CANVAS_BACKGROUND_PICKS: ColorTuple;
|
|
34
43
|
export declare const DEFAULT_ELEMENT_STROKE_COLOR_PALETTE: {
|
|
35
|
-
readonly red: readonly ["#fff5f5", "#ffc9c9", "#ff8787", "#fa5252", "#e03131"];
|
|
36
|
-
readonly pink: readonly ["#fff0f6", "#fcc2d7", "#f783ac", "#e64980", "#c2255c"];
|
|
37
|
-
readonly grape: readonly ["#f8f0fc", "#eebefa", "#da77f2", "#be4bdb", "#9c36b5"];
|
|
38
|
-
readonly violet: readonly ["#f3f0ff", "#d0bfff", "#9775fa", "#7950f2", "#6741d9"];
|
|
39
|
-
readonly blue: readonly ["#e7f5ff", "#a5d8ff", "#4dabf7", "#228be6", "#1971c2"];
|
|
40
44
|
readonly cyan: readonly ["#e3fafc", "#99e9f2", "#3bc9db", "#15aabf", "#0c8599"];
|
|
41
|
-
readonly
|
|
45
|
+
readonly blue: readonly ["#e7f5ff", "#a5d8ff", "#4dabf7", "#228be6", "#1971c2"];
|
|
46
|
+
readonly violet: readonly ["#f3f0ff", "#d0bfff", "#9775fa", "#7950f2", "#6741d9"];
|
|
47
|
+
readonly grape: readonly ["#f8f0fc", "#eebefa", "#da77f2", "#be4bdb", "#9c36b5"];
|
|
48
|
+
readonly pink: readonly ["#fff0f6", "#fcc2d7", "#f783ac", "#e64980", "#c2255c"];
|
|
42
49
|
readonly green: readonly ["#ebfbee", "#b2f2bb", "#69db7c", "#40c057", "#2f9e44"];
|
|
50
|
+
readonly teal: readonly ["#e6fcf5", "#96f2d7", "#38d9a9", "#12b886", "#099268"];
|
|
43
51
|
readonly yellow: readonly ["#fff9db", "#ffec99", "#ffd43b", "#fab005", "#f08c00"];
|
|
44
52
|
readonly orange: readonly ["#fff4e6", "#ffd8a8", "#ffa94d", "#fd7e14", "#e8590c"];
|
|
53
|
+
readonly red: readonly ["#fff5f5", "#ffc9c9", "#ff8787", "#fa5252", "#e03131"];
|
|
45
54
|
readonly transparent: "transparent";
|
|
46
55
|
readonly white: "#ffffff";
|
|
47
56
|
readonly gray: readonly ["#f8f9fa", "#e9ecef", "#ced4da", "#868e96", "#343a40"];
|
|
@@ -49,30 +58,43 @@ export declare const DEFAULT_ELEMENT_STROKE_COLOR_PALETTE: {
|
|
|
49
58
|
readonly bronze: readonly ["#f8f1ee", "#eaddd7", "#d2bab0", "#a18072", "#846358"];
|
|
50
59
|
};
|
|
51
60
|
export declare const DEFAULT_ELEMENT_BACKGROUND_COLOR_PALETTE: {
|
|
52
|
-
readonly red: readonly ["#fff5f5", "#ffc9c9", "#ff8787", "#fa5252", "#e03131"];
|
|
53
|
-
readonly pink: readonly ["#fff0f6", "#fcc2d7", "#f783ac", "#e64980", "#c2255c"];
|
|
54
|
-
readonly grape: readonly ["#f8f0fc", "#eebefa", "#da77f2", "#be4bdb", "#9c36b5"];
|
|
55
|
-
readonly violet: readonly ["#f3f0ff", "#d0bfff", "#9775fa", "#7950f2", "#6741d9"];
|
|
56
|
-
readonly blue: readonly ["#e7f5ff", "#a5d8ff", "#4dabf7", "#228be6", "#1971c2"];
|
|
57
61
|
readonly cyan: readonly ["#e3fafc", "#99e9f2", "#3bc9db", "#15aabf", "#0c8599"];
|
|
58
|
-
readonly
|
|
62
|
+
readonly blue: readonly ["#e7f5ff", "#a5d8ff", "#4dabf7", "#228be6", "#1971c2"];
|
|
63
|
+
readonly violet: readonly ["#f3f0ff", "#d0bfff", "#9775fa", "#7950f2", "#6741d9"];
|
|
64
|
+
readonly grape: readonly ["#f8f0fc", "#eebefa", "#da77f2", "#be4bdb", "#9c36b5"];
|
|
65
|
+
readonly pink: readonly ["#fff0f6", "#fcc2d7", "#f783ac", "#e64980", "#c2255c"];
|
|
59
66
|
readonly green: readonly ["#ebfbee", "#b2f2bb", "#69db7c", "#40c057", "#2f9e44"];
|
|
67
|
+
readonly teal: readonly ["#e6fcf5", "#96f2d7", "#38d9a9", "#12b886", "#099268"];
|
|
60
68
|
readonly yellow: readonly ["#fff9db", "#ffec99", "#ffd43b", "#fab005", "#f08c00"];
|
|
61
69
|
readonly orange: readonly ["#fff4e6", "#ffd8a8", "#ffa94d", "#fd7e14", "#e8590c"];
|
|
70
|
+
readonly red: readonly ["#fff5f5", "#ffc9c9", "#ff8787", "#fa5252", "#e03131"];
|
|
62
71
|
readonly transparent: "transparent";
|
|
63
72
|
readonly white: "#ffffff";
|
|
64
73
|
readonly gray: readonly ["#f8f9fa", "#e9ecef", "#ced4da", "#868e96", "#343a40"];
|
|
65
74
|
readonly black: "#1e1e1e";
|
|
66
75
|
readonly bronze: readonly ["#f8f1ee", "#eaddd7", "#d2bab0", "#a18072", "#846358"];
|
|
67
76
|
};
|
|
68
|
-
export declare const getAllColorsSpecificShade: (index: 0 | 1 | 2 | 3 | 4) =>
|
|
77
|
+
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")[];
|
|
69
78
|
export declare const rgbToHex: (r: number, g: number, b: number, a?: number) => string;
|
|
79
|
+
/**
|
|
80
|
+
* @returns the color with its alpha replaced by `alpha` (as #RRGGBBAA), or the
|
|
81
|
+
* input unchanged if it's not a valid color
|
|
82
|
+
*/
|
|
83
|
+
export declare const setColorAlpha: (color: string, alpha: number) => string;
|
|
70
84
|
/**
|
|
71
85
|
* @returns #RRGGBB or #RRGGBBAA based on color containing non-opaque alpha,
|
|
72
86
|
* null if not valid color
|
|
73
87
|
*/
|
|
74
88
|
export declare const colorToHex: (color: string) => string | null;
|
|
75
89
|
export declare const isTransparent: (color: string) => boolean;
|
|
90
|
+
/**
|
|
91
|
+
* Whether the color is fully opaque (alpha exactly 1).
|
|
92
|
+
*
|
|
93
|
+
* NOT the negation of `isTransparent`, which is true only at alpha 0 — a
|
|
94
|
+
* partial-alpha color (`#RRGGBBAA`, `rgba(…, 0.5)`) is neither transparent
|
|
95
|
+
* (it renders) nor opaque (what's beneath shows through it).
|
|
96
|
+
*/
|
|
97
|
+
export declare const isOpaqueColor: (color: string) => boolean;
|
|
76
98
|
export declare const COLOR_OUTLINE_CONTRAST_THRESHOLD = 240;
|
|
77
99
|
export declare const isColorDark: (color: string, threshold?: number) => boolean;
|
|
78
100
|
/**
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import type { ExcalidrawElement, FontFamilyValues } from "@excalidraw/element/types";
|
|
2
2
|
import type { AppProps, AppState } from "@excalidraw/excalidraw/types";
|
|
3
|
+
export { DEFAULT_STICKY_NOTE_BG } from "./colors";
|
|
3
4
|
export declare const supportsResizeObserver: boolean;
|
|
4
5
|
export declare const APP_NAME = "Excalidraw";
|
|
5
6
|
export declare const TEXT_AUTOWRAP_THRESHOLD = 36;
|
|
7
|
+
export declare const TEXT_VIEWPORT_PADDING = 20;
|
|
8
|
+
export declare const TEXT_MAX_WRAP_WIDTH = 800;
|
|
6
9
|
export declare const DRAGGING_THRESHOLD = 10;
|
|
7
10
|
export declare const MINIMUM_ARROW_SIZE = 20;
|
|
8
11
|
export declare const LINE_CONFIRM_THRESHOLD = 8;
|
|
@@ -52,6 +55,7 @@ export declare enum EVENT {
|
|
|
52
55
|
POINTER_MOVE = "pointermove",
|
|
53
56
|
POINTER_DOWN = "pointerdown",
|
|
54
57
|
POINTER_UP = "pointerup",
|
|
58
|
+
POINTER_CANCEL = "pointercancel",
|
|
55
59
|
STATE_CHANGE = "statechange",
|
|
56
60
|
WHEEL = "wheel",
|
|
57
61
|
TOUCH_START = "touchstart",
|
|
@@ -150,7 +154,53 @@ export declare const FRAME_STYLE: {
|
|
|
150
154
|
};
|
|
151
155
|
export declare const MIN_FONT_SIZE = 1;
|
|
152
156
|
export declare const DEFAULT_FONT_SIZE = 20;
|
|
157
|
+
export declare const STICKY_NOTE_MIN_FONT_SIZE = 16;
|
|
158
|
+
export declare const STICKY_NOTE_MAX_FONT_SIZE = 512;
|
|
159
|
+
export declare const STICKY_NOTE_FALLBACK_FONT_SIZE = 28;
|
|
160
|
+
export declare const STICKY_NOTE_FONT_STEP = 2;
|
|
161
|
+
export declare const STICKY_NOTE_PADDING = 16;
|
|
162
|
+
/**
|
|
163
|
+
* The creation-date footer: a 20px text row under the label body plus a 12px
|
|
164
|
+
* gap above it, inside the note's bottom padding. Reserved for every note —
|
|
165
|
+
* also when `created` is unknown — so geometry never depends on data
|
|
166
|
+
* availability. The label is chosen by width bucket, never measured, so
|
|
167
|
+
* painting stays measurement-free (the server has no text measurer):
|
|
168
|
+
* `minBodyWidthForYear` is the worst case ("30 May 2026") in the system sans
|
|
169
|
+
* stack at 12px, with margin for wider fallbacks such as DejaVu Sans.
|
|
170
|
+
*/
|
|
171
|
+
/**
|
|
172
|
+
* The creation-date footer of a sticky note. The label body ends `height`
|
|
173
|
+
* above the note's bottom padding, and the date's baseline sits
|
|
174
|
+
* `baselineFromBottom` above the note's bottom edge — so the 12px glyphs
|
|
175
|
+
* (~9px above the baseline, ~3px below) end up roughly 11px from the edge
|
|
176
|
+
* with a ~13px gap to the label body above them.
|
|
177
|
+
*/
|
|
178
|
+
export declare const STICKY_NOTE_FOOTER: {
|
|
179
|
+
readonly height: 20;
|
|
180
|
+
readonly fontSize: 12;
|
|
181
|
+
readonly fontFamily: "Helvetica, Arial, sans-serif";
|
|
182
|
+
readonly baselineFromBottom: 14;
|
|
183
|
+
readonly opacity: 1;
|
|
184
|
+
readonly minBodyWidthForYear: 80;
|
|
185
|
+
};
|
|
186
|
+
/**
|
|
187
|
+
* outer height → label body height: top + bottom padding + footer. The body
|
|
188
|
+
* is what the label is fitted into; a middle-aligned label is still centered
|
|
189
|
+
* in the whole padded note when it fits (see `computeBoundTextPosition`).
|
|
190
|
+
*/
|
|
191
|
+
export declare const STICKY_NOTE_BODY_INSET_Y: number;
|
|
192
|
+
export declare const DEFAULT_STICKY_NOTE_SIZE = 250;
|
|
193
|
+
export declare const STICKY_NOTE_MIN_SIZE = 75;
|
|
194
|
+
export declare const STICKY_NOTE_SHADOW_OFFSET = 3;
|
|
195
|
+
export declare const STICKY_NOTE_SHADOW_OPACITY = 0.16;
|
|
196
|
+
export declare const STICKY_NOTE_EDGE_SHADOW_WIDTH = 0.5;
|
|
197
|
+
export declare const STICKY_NOTE_EDGE_SHADOW_OPACITY = 0.08;
|
|
153
198
|
export declare const DEFAULT_FONT_FAMILY: FontFamilyValues;
|
|
199
|
+
/** number of slots in the font-picker top-picks strip — pick customization
|
|
200
|
+
* (replace / reorder) preserves it. Must equal `DEFAULT_FONTS.length` in
|
|
201
|
+
* `packages/excalidraw/components/FontPicker/FontPicker.tsx` (enforced by
|
|
202
|
+
* `fontTopPicks.test.ts`) */
|
|
203
|
+
export declare const FONT_TOP_PICKS_SLOTS = 3;
|
|
154
204
|
export declare const DEFAULT_TEXT_ALIGN = "left";
|
|
155
205
|
export declare const DEFAULT_VERTICAL_ALIGN = "top";
|
|
156
206
|
export declare const DEFAULT_VERSION = "{version}";
|
|
@@ -224,9 +274,12 @@ export declare const TOUCH_CTX_MENU_TIMEOUT = 500;
|
|
|
224
274
|
export declare const TITLE_TIMEOUT = 10000;
|
|
225
275
|
export declare const VERSION_TIMEOUT = 30000;
|
|
226
276
|
export declare const SCROLL_TIMEOUT = 100;
|
|
277
|
+
export declare const ZEN_MODE_TRANSITION_DURATION = 250;
|
|
227
278
|
export declare const ZOOM_STEP = 0.1;
|
|
228
279
|
export declare const MIN_ZOOM = 0.1;
|
|
229
280
|
export declare const MAX_ZOOM = 30;
|
|
281
|
+
/** 100% zoom, for computations that have no editor zoom to go by */
|
|
282
|
+
export declare const DEFAULT_ZOOM: AppState["zoom"];
|
|
230
283
|
export declare const HYPERLINK_TOOLTIP_DELAY = 300;
|
|
231
284
|
export declare const IDLE_THRESHOLD = 60000;
|
|
232
285
|
export declare const ACTIVE_THRESHOLD = 3000;
|
|
@@ -240,8 +293,7 @@ export declare const DEFAULT_UI_OPTIONS: AppProps["UIOptions"];
|
|
|
240
293
|
export declare const MAX_DECIMALS_FOR_SVG_EXPORT = 2;
|
|
241
294
|
export declare const EXPORT_SCALES: number[];
|
|
242
295
|
export declare const DEFAULT_EXPORT_PADDING = 10;
|
|
243
|
-
export declare const
|
|
244
|
-
export declare const MAX_ALLOWED_FILE_BYTES: number;
|
|
296
|
+
export declare const DEFAULT_IMAGE_OPTIONS: AppProps["imageOptions"];
|
|
245
297
|
export declare const SVG_NS = "http://www.w3.org/2000/svg";
|
|
246
298
|
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";
|
|
247
299
|
export declare const ENCRYPTION_KEY_BITS = 128;
|
|
@@ -263,6 +315,7 @@ export declare const TEXT_ALIGN: {
|
|
|
263
315
|
RIGHT: string;
|
|
264
316
|
};
|
|
265
317
|
export declare const ELEMENT_READY_TO_ERASE_OPACITY = 20;
|
|
318
|
+
export declare const ELEMENT_PENDING_DRAW_SHAPE_OPACITY = 70;
|
|
266
319
|
export declare const DEFAULT_PROPORTIONAL_RADIUS = 0.25;
|
|
267
320
|
export declare const DEFAULT_ADAPTIVE_RADIUS = 32;
|
|
268
321
|
export declare const ROUNDNESS: {
|
|
@@ -275,11 +328,12 @@ export declare const ROUGHNESS: {
|
|
|
275
328
|
readonly artist: 1;
|
|
276
329
|
readonly cartoonist: 2;
|
|
277
330
|
};
|
|
278
|
-
export
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
331
|
+
export type StrokeWidthKey = "thin" | "medium" | "bold";
|
|
332
|
+
export declare const STROKE_WIDTH_KEYS: readonly StrokeWidthKey[];
|
|
333
|
+
export declare const STROKE_WIDTH: Readonly<Record<StrokeWidthKey | "extraBold", ExcalidrawElement["strokeWidth"]>>;
|
|
334
|
+
export declare const FREEDRAW_STROKE_WIDTH: Readonly<Record<StrokeWidthKey | "extraBold", ExcalidrawElement["strokeWidth"]>>;
|
|
335
|
+
export declare const getStrokeWidthByKey: (elementType: ExcalidrawElement["type"], strokeWidthKey: StrokeWidthKey) => ExcalidrawElement["strokeWidth"];
|
|
336
|
+
export declare const DEFAULT_ELEMENT_STROKE_WIDTH_KEY: StrokeWidthKey;
|
|
283
337
|
export declare const DEFAULT_ELEMENT_PROPS: {
|
|
284
338
|
strokeColor: ExcalidrawElement["strokeColor"];
|
|
285
339
|
backgroundColor: ExcalidrawElement["backgroundColor"];
|
|
@@ -312,8 +366,11 @@ export declare const TOOL_TYPE: {
|
|
|
312
366
|
readonly hand: "hand";
|
|
313
367
|
readonly frame: "frame";
|
|
314
368
|
readonly magicframe: "magicframe";
|
|
369
|
+
readonly stickynote: "stickynote";
|
|
315
370
|
readonly embeddable: "embeddable";
|
|
316
371
|
readonly laser: "laser";
|
|
372
|
+
readonly autoshape: "autoshape";
|
|
373
|
+
readonly bucketfill: "bucketfill";
|
|
317
374
|
};
|
|
318
375
|
export declare const EDITOR_LS_KEYS: {
|
|
319
376
|
readonly OAI_API_KEY: "excalidraw-oai-api-key";
|
|
@@ -353,3 +410,5 @@ export declare const BIND_MODE_TIMEOUT = 700;
|
|
|
353
410
|
export declare const MOBILE_ACTION_BUTTON_BG: {
|
|
354
411
|
readonly background: "var(--mobile-action-button-bg)";
|
|
355
412
|
};
|
|
413
|
+
export declare const DEFAULT_STROKE_STREAMLINE = 0.5;
|
|
414
|
+
export declare const DEFAULT_STROKE_STREAMLINE_PRECISE = 0.2;
|