useblocks 1.1.85-dev.10 → 1.1.85-dev.11
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/README.md +70 -40
- package/compat-globals.js +1 -1
- package/iframe/.vite/manifest.json +4 -4
- package/iframe/js/discussHandlers.sDXLf5I7.js +88 -0
- package/iframe/js/{iframe-eblock.body.js → iframe-eblock.body.714faf8a.js} +1 -1
- package/iframe/js/iframe-eblock.js +2 -2
- package/iframe/js/{iframe.body.js → iframe.body.714faf8a.js} +35 -35
- package/iframe/js/iframe.js +2 -2
- package/package.json +4 -1
- package/runtime/THIRD_PARTY_LICENSES.txt +49 -42
- package/runtime/package.json +4 -1
- package/runtime/react/index.js +1 -1
- package/runtime/uuid/index.js +21 -0
- package/static/core/11bc33e0.js +1 -0
- package/static/core/1ed86ed3.js +1 -0
- package/static/core/248de796.js +1 -0
- package/static/core/{e50b6f57.js → 274b5d7a.js} +1 -1
- package/static/core/4067c5be.js +1 -0
- package/static/core/453596ac.js +27 -0
- package/static/core/4b12ae50.js +1 -0
- package/static/core/{db82c42b.js → 50d547f6.js} +1 -1
- package/static/core/549c0ef1.js +1 -0
- package/static/core/{b29146b3.js → 563a690f.js} +5 -5
- package/static/core/{c1bf6439.js → 5c62f38b.js} +1 -1
- package/static/core/5f949f39.js +1 -0
- package/static/core/{e0d71533.js → 60aa31a3.js} +6 -6
- package/static/core/{79749848.js → 66619f08.js} +7 -7
- package/static/core/7052d050.js +28 -0
- package/static/core/{984e936f.js → 7555e955.js} +1 -1
- package/static/core/{55a38638.js → 7c89682e.js} +7 -7
- package/static/core/83c17079.js +2 -0
- package/static/core/{4c83d06a.js → 8c5284f6.js} +1 -1
- package/static/core/{e0e5c9b9.js → 958fe93e.js} +2 -2
- package/static/core/{6fcb3c31.js → a3f7b4c9.js} +1 -1
- package/static/core/{9560f31a.js → a494cc9f.js} +1 -1
- package/static/core/{a5996860.js → a6303cb2.js} +1 -1
- package/static/core/b8a0f663.js +1 -0
- package/static/core/bb65f553.js +1 -0
- package/static/core/{4c3f5897.js → c2f990cf.js} +2 -2
- package/static/core/{72d350ea.js → c8d6258e.js} +1 -1
- package/static/core/{3ece766f.js → d58ae4ac.js} +2 -2
- package/static/core/d61988e0.js +7 -0
- package/static/core/d887672a.js +1 -0
- package/static/core/dcc37768.js +1 -0
- package/static/core/{30841c46.js → e50f64f6.js} +1 -1
- package/static/core/{175b5b0f.js → ff7d14e8.js} +1 -1
- package/static/esm/2490dab8.js +1 -0
- package/static/esm/971f1b2c.js +1 -0
- package/static/esm/ad8c16a9.js +1 -0
- package/static/esm/f76c9d9d.js +1 -0
- package/static/umd/6639d610.js +1 -0
- package/static/umd-runtime/B7h7P1Np.js +1 -0
- package/static/umd-runtime/{DHIkHsbq.js → BAqQTgiL.js} +1 -1
- package/static/umd-runtime/{DiNHpyis.js → BB6AXfHj.js} +1 -1
- package/static/umd-runtime/{CnUGCoaH.js → BauvM4c_.js} +1 -1
- package/static/umd-runtime/{cL_ha9ef.js → CgVJ4rE0.js} +1 -1
- package/static/umd-runtime/Cvm7BS4_.js +341 -0
- package/static/umd-runtime/{BnE05QKl.js → D7DggGzi.js} +1 -1
- package/static/umd-runtime/{2iAslXEF.js → DBbch1O-.js} +1 -1
- package/static/umd-runtime/{Bcqtk2f7.js → Dqoi-pC_.js} +2 -2
- package/static/umd-runtime/{CDTBLHGd.js → G2k8ELiO.js} +3 -3
- package/static/umd-runtime/{CVtPwspX.js → SFp4nbvq.js} +1 -1
- package/static/umd-runtime/{DVB_-O4B.js → UsRzAWs2.js} +1 -1
- package/static/umd-runtime/runtime.js +1 -1
- package/static/umd-runtime/ui-kit-icons.js +1 -1
- package/static/umd-runtime/ui-kit.js +2 -2
- package/static/umd-runtime/{DP3QTW77.js → uk9LyZos.js} +1 -1
- package/useblocks-core.714faf8a.js +859 -0
- package/useblocks-esm.js +11 -11
- package/{useblocks-po.8098d114.js → useblocks-po.714faf8a.js} +1 -1
- package/useblocks.d.ts +109 -25
- package/useblocks.js +39 -15
- package/vendor/@rc-component/cascader/package.json +1 -1
- package/vendor/@rc-component/dialog/es/Dialog/Content/Panel.js +3 -2
- package/vendor/@rc-component/dialog/package.json +1 -1
- package/vendor/@rc-component/image/es/Preview/index.js +3 -3
- package/vendor/@rc-component/image/package.json +1 -1
- package/vendor/@rc-component/input/es/BaseInput.js +3 -3
- package/vendor/@rc-component/input/es/Input.js +20 -27
- package/vendor/@rc-component/{textarea → input}/es/ResizableTextArea.js +5 -4
- package/vendor/@rc-component/{textarea → input}/es/TextArea.js +30 -40
- package/vendor/@rc-component/{textarea → input}/es/calculateNodeHeight.js +4 -4
- package/vendor/@rc-component/input/es/hooks/useCountDisplay.js +25 -0
- package/vendor/@rc-component/input/es/hooks/useCountExceed.js +25 -0
- package/vendor/@rc-component/input/es/hooks/useMergedValue.js +13 -0
- package/vendor/@rc-component/input/es/index.js +3 -1
- package/vendor/@rc-component/input/package.json +1 -1
- package/vendor/@rc-component/mentions/es/DropdownMenu.js +1 -1
- package/vendor/@rc-component/mentions/es/Mentions.js +35 -8
- package/vendor/@rc-component/mentions/package.json +1 -1
- package/vendor/@rc-component/menu/es/Menu.js +1 -0
- package/vendor/@rc-component/menu/es/MenuItem.js +1 -0
- package/vendor/@rc-component/menu/es/MenuItemGroup.js +1 -0
- package/vendor/@rc-component/menu/es/SubMenu/PopupTrigger.js +1 -0
- package/vendor/@rc-component/menu/es/SubMenu/index.js +1 -0
- package/vendor/@rc-component/menu/es/context/MenuContext.js +1 -0
- package/vendor/@rc-component/menu/es/hooks/useAccessibility.js +1 -0
- package/vendor/@rc-component/menu/es/hooks/useKeyRecords.js +1 -0
- package/vendor/@rc-component/menu/es/utils/commonUtil.js +1 -0
- package/vendor/@rc-component/menu/es/utils/nodeUtil.js +2 -1
- package/vendor/@rc-component/menu/es/utils/warnUtil.js +1 -0
- package/vendor/@rc-component/menu/package.json +1 -1
- package/vendor/@rc-component/notification/LICENSE +21 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/LICENSE +22 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/Children/toArray.js +15 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/Dom/canUseDom.js +6 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/Dom/contains.js +13 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/Dom/dynamicCSS.js +94 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/Dom/findDOMNode.js +14 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/Dom/focus.js +99 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/Dom/isVisible.js +18 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/Dom/shadow.js +12 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/Dom/styleChecker.js +2 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/KeyCode.js +499 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/Portal.js +28 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/React/isFragment.js +12 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/React/render.js +2 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/getScrollBarSize.js +2 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/hooks/useControlledState.js +3 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/hooks/useDelayState.js +4 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/hooks/useEvent.js +9 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/hooks/useId.js +23 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/hooks/useLayoutEffect.js +26 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/hooks/useMemo.js +12 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/hooks/useMergedState.js +4 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/hooks/useState.js +24 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/hooks/useSyncState.js +20 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/index.js +36 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/is.js +21 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/isEqual.js +35 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/isMobile.js +11 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/mergeProps.js +14 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/omit.js +1 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/pickAttrs.js +50 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/proxyObject.js +1 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/raf.js +36 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/ref.js +38 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/test/domHook.js +36 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/utils/get.js +11 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/utils/set.js +58 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/es/warning.js +46 -0
- package/vendor/@rc-component/notification/_/@rc-component/util/package.json +6 -0
- package/vendor/@rc-component/notification/es/Notification.js +129 -0
- package/vendor/@rc-component/notification/es/NotificationList/Content.js +33 -0
- package/vendor/@rc-component/notification/es/NotificationList/index.js +174 -0
- package/vendor/@rc-component/notification/es/NotificationProvider.js +4 -3
- package/vendor/@rc-component/notification/es/Notifications.js +28 -31
- package/vendor/@rc-component/notification/es/Progress.js +10 -0
- package/vendor/@rc-component/notification/es/hooks/useClosable.js +30 -0
- package/vendor/@rc-component/notification/es/hooks/useListPosition/index.js +50 -0
- package/vendor/@rc-component/notification/es/hooks/useListPosition/useSizes.js +33 -0
- package/vendor/@rc-component/notification/es/hooks/useNoticeTimer.js +58 -0
- package/vendor/@rc-component/notification/es/hooks/useNotification.js +27 -18
- package/vendor/@rc-component/notification/es/hooks/useStack.js +4 -4
- package/vendor/@rc-component/notification/es/index.js +4 -2
- package/vendor/@rc-component/notification/package.json +1 -1
- package/vendor/@rc-component/picker/es/PickerInput/Selector/SingleSelector/MultipleDates.js +13 -3
- package/vendor/@rc-component/picker/es/PickerInput/Selector/SingleSelector/index.js +3 -1
- package/vendor/@rc-component/picker/es/PickerInput/SinglePicker.js +2 -1
- package/vendor/@rc-component/picker/package.json +1 -1
- package/vendor/@rc-component/table/LICENSE +21 -0
- package/vendor/@rc-component/table/es/Body/MeasureCell.js +1 -0
- package/vendor/@rc-component/table/es/Body/MeasureRow.js +1 -0
- package/vendor/@rc-component/table/es/Cell/useCellRender.js +1 -0
- package/vendor/@rc-component/table/es/FixedHolder/index.js +1 -0
- package/vendor/@rc-component/table/es/Table.js +17 -9
- package/vendor/@rc-component/table/es/VirtualTable/BodyGrid.js +10 -4
- package/vendor/@rc-component/table/es/VirtualTable/BodyLine.js +13 -5
- package/vendor/@rc-component/table/es/hooks/useColumns/index.js +1 -0
- package/vendor/@rc-component/table/es/hooks/useExpand.js +1 -0
- package/vendor/@rc-component/table/es/hooks/useFixedInfo.js +1 -0
- package/vendor/@rc-component/table/es/hooks/useSticky.js +1 -0
- package/vendor/@rc-component/table/es/index.js +2 -1
- package/vendor/@rc-component/table/es/stickyScrollBar.js +1 -0
- package/vendor/@rc-component/table/es/utils/legacyUtil.js +1 -0
- package/vendor/@rc-component/table/es/utils/offsetUtil.js +1 -0
- package/vendor/@rc-component/table/package.json +1 -1
- package/vendor/@rc-component/tabs/es/TabNavList/OperationNode.js +4 -2
- package/vendor/@rc-component/tabs/es/TabNavList/TabNode.js +5 -4
- package/vendor/@rc-component/tabs/es/TabNavList/index.js +11 -4
- package/vendor/@rc-component/tabs/es/Tabs.js +1 -0
- package/vendor/@rc-component/tabs/es/hooks/useAnimateConfig.js +1 -0
- package/vendor/@rc-component/tabs/es/hooks/useIndicator.js +1 -0
- package/vendor/@rc-component/tabs/es/hooks/useUpdate.js +1 -0
- package/vendor/@rc-component/tabs/package.json +1 -1
- package/vendor/@rc-component/tour/es/TourStep/DefaultPanel.js +4 -1
- package/vendor/@rc-component/tour/package.json +1 -1
- package/vendor/@rc-component/tree/es/MotionTreeNode.js +1 -0
- package/vendor/@rc-component/tree/es/NodeList.js +2 -2
- package/vendor/@rc-component/tree/es/Tree.js +4 -5
- package/vendor/@rc-component/tree/es/TreeNode.js +7 -2
- package/vendor/@rc-component/tree/es/index.js +3 -0
- package/vendor/@rc-component/tree/es/useUnmount.js +1 -0
- package/vendor/@rc-component/tree/es/util.js +1 -0
- package/vendor/@rc-component/tree/es/utils/conductUtil.js +1 -0
- package/vendor/@rc-component/tree/es/utils/treeUtil.js +1 -0
- package/vendor/@rc-component/tree/package.json +1 -1
- package/vendor/@rc-component/tree-select/package.json +1 -1
- package/vendor/@rc-component/util/es/index.js +10 -10
- package/vendor/antd/es/_util/ActionButton.js +2 -3
- package/vendor/antd/es/_util/ContextIsolator.js +1 -1
- package/vendor/antd/es/_util/PurePanel.js +7 -4
- package/vendor/antd/es/_util/convertToTooltipProps.js +2 -2
- package/vendor/antd/es/_util/fallbackProp.js +15 -0
- package/vendor/antd/es/_util/gapSize.js +2 -1
- package/vendor/antd/es/_util/getRenderPropValue.js +2 -1
- package/vendor/antd/es/_util/getScroll.js +4 -4
- package/vendor/antd/es/_util/hooks/index.js +2 -2
- package/vendor/antd/es/_util/hooks/useAllowClear.js +25 -0
- package/vendor/antd/es/_util/hooks/useClosable.js +6 -5
- package/vendor/antd/es/_util/hooks/{useMergeSemantic.js → useMergeSemantic/index.js} +14 -24
- package/vendor/antd/es/_util/hooks/useMergeSemantic/utils.js +14 -0
- package/vendor/antd/es/_util/hooks/useMergedMask.js +2 -1
- package/vendor/antd/es/_util/is.js +27 -0
- package/vendor/antd/es/_util/motion.js +8 -8
- package/vendor/antd/es/_util/normalizeIcon.js +9 -0
- package/vendor/antd/es/_util/placements.js +2 -1
- package/vendor/antd/es/_util/reactNode.js +2 -1
- package/vendor/antd/es/_util/responsiveObserver.js +3 -2
- package/vendor/antd/es/_util/scrollTo.js +3 -1
- package/vendor/antd/es/_util/styleChecker.js +1 -0
- package/vendor/antd/es/_util/throttleByAnimationFrame.js +1 -0
- package/vendor/antd/es/_util/toList.js +1 -1
- package/vendor/antd/es/_util/wave/WaveEffect.js +3 -1
- package/vendor/antd/es/_util/wave/index.js +14 -4
- package/vendor/antd/es/_util/wave/util.js +5 -3
- package/vendor/antd/es/alert/Alert.js +12 -10
- package/vendor/antd/es/alert/ErrorBoundary.js +1 -1
- package/vendor/antd/es/alert/style/index.js +16 -10
- package/vendor/antd/es/anchor/Anchor.js +23 -16
- package/vendor/antd/es/anchor/AnchorLink.js +4 -4
- package/vendor/antd/es/app/App.js +7 -3
- package/vendor/antd/es/auto-complete/AutoComplete.js +7 -8
- package/vendor/antd/es/avatar/Avatar.js +5 -3
- package/vendor/antd/es/back-top/index.js +1 -0
- package/vendor/antd/es/badge/Badge.js +5 -6
- package/vendor/antd/es/badge/Ribbon.js +1 -2
- package/vendor/antd/es/badge/style/index.js +4 -3
- package/vendor/antd/es/border-beam/BorderBeam.js +42 -0
- package/vendor/antd/es/border-beam/BorderBeamEffect.js +24 -0
- package/vendor/antd/es/border-beam/hooks/useBorderSize.js +37 -0
- package/vendor/antd/es/border-beam/hooks/useChildDom.js +24 -0
- package/vendor/antd/es/border-beam/index.js +7 -0
- package/vendor/antd/es/border-beam/style/index.js +60 -0
- package/vendor/antd/es/border-beam/util.js +26 -0
- package/vendor/antd/es/breadcrumb/Breadcrumb.js +1 -2
- package/vendor/antd/es/breadcrumb/BreadcrumbItem.js +1 -1
- package/vendor/antd/es/breadcrumb/useItemRender.js +3 -2
- package/vendor/antd/es/button/Button.js +7 -6
- package/vendor/antd/es/button/buttonHelpers.js +4 -8
- package/vendor/antd/es/button/index.js +2 -2
- package/vendor/antd/es/button/style/index.js +5 -0
- package/vendor/antd/es/calendar/generateCalendar.js +20 -8
- package/vendor/antd/es/card/Card.js +5 -7
- package/vendor/antd/es/card/CardMeta.js +1 -2
- package/vendor/antd/es/carousel/index.js +2 -1
- package/vendor/antd/es/cascader/Panel.js +1 -1
- package/vendor/antd/es/cascader/index.js +23 -16
- package/vendor/antd/es/cascader/style/columns.js +6 -2
- package/vendor/antd/es/checkbox/Checkbox.js +2 -3
- package/vendor/antd/es/checkbox/Group.js +2 -1
- package/vendor/antd/es/checkbox/style/index.js +1 -5
- package/vendor/antd/es/checkbox/useBubbleLock.js +1 -0
- package/vendor/antd/es/collapse/Collapse.js +3 -3
- package/vendor/antd/es/collapse/style/index.js +1 -4
- package/vendor/antd/es/color-picker/ColorPicker.js +1 -2
- package/vendor/antd/es/color-picker/ColorPickerPanel.js +2 -1
- package/vendor/antd/es/color-picker/components/ColorTrigger.js +3 -1
- package/vendor/antd/es/color-picker/components/PanelPicker/index.js +1 -0
- package/vendor/antd/es/config-provider/hooks/useSize.js +3 -2
- package/vendor/antd/es/config-provider/hooks/useTheme.js +2 -0
- package/vendor/antd/es/config-provider/index.js +11 -3
- package/vendor/antd/es/date-picker/generatePicker/generateRangePicker.js +20 -10
- package/vendor/antd/es/date-picker/generatePicker/generateSinglePicker.js +17 -8
- package/vendor/antd/es/date-picker/generatePicker/useSuffixIcon.js +1 -1
- package/vendor/antd/es/date-picker/hooks/useMergedPickerSemantic.js +1 -2
- package/vendor/antd/es/date-picker/style/index.js +13 -3
- package/vendor/antd/es/date-picker/style/multiple.js +3 -4
- package/vendor/antd/es/date-picker/style/panel.js +5 -20
- package/vendor/antd/es/date-picker/util.js +14 -13
- package/vendor/antd/es/descriptions/Cell.js +2 -3
- package/vendor/antd/es/descriptions/hooks/useItems.js +2 -1
- package/vendor/antd/es/descriptions/index.js +3 -3
- package/vendor/antd/es/divider/index.js +3 -2
- package/vendor/antd/es/drawer/Drawer.js +10 -5
- package/vendor/antd/es/drawer/DrawerPanel.js +3 -2
- package/vendor/antd/es/dropdown/dropdown.js +11 -8
- package/vendor/antd/es/dropdown/style/index.js +2 -6
- package/vendor/antd/es/empty/index.js +1 -2
- package/vendor/antd/es/flex/index.js +2 -2
- package/vendor/antd/es/float-button/BackTop.js +1 -0
- package/vendor/antd/es/float-button/FloatButton.js +3 -3
- package/vendor/antd/es/float-button/FloatButtonGroup.js +2 -2
- package/vendor/antd/es/form/ErrorList.js +13 -6
- package/vendor/antd/es/form/Form.js +7 -6
- package/vendor/antd/es/form/FormItem/ItemHolder.js +1 -1
- package/vendor/antd/es/form/FormItem/index.js +6 -6
- package/vendor/antd/es/form/FormItemInput.js +5 -3
- package/vendor/antd/es/form/FormItemLabel.js +2 -1
- package/vendor/antd/es/form/FormList.js +1 -0
- package/vendor/antd/es/form/hooks/useChildren.js +4 -3
- package/vendor/antd/es/form/hooks/useForm.js +3 -1
- package/vendor/antd/es/form/hooks/useFrameState.js +1 -0
- package/vendor/antd/es/form/hooks/useItemRef.js +7 -5
- package/vendor/antd/es/form/style/index.js +1 -3
- package/vendor/antd/es/grid/col.js +5 -7
- package/vendor/antd/es/grid/hooks/useBreakpoint.js +1 -0
- package/vendor/antd/es/grid/hooks/useGutter.js +2 -1
- package/vendor/antd/es/grid/row.js +7 -6
- package/vendor/antd/es/image/PreviewGroup.js +1 -2
- package/vendor/antd/es/image/Progress.js +58 -0
- package/vendor/antd/es/image/hooks/useMergedPreviewConfig.js +3 -1
- package/vendor/antd/es/image/hooks/usePlaceholderConfig.js +15 -0
- package/vendor/antd/es/image/hooks/usePreviewConfig.js +3 -2
- package/vendor/antd/es/image/index.js +36 -5
- package/vendor/antd/es/image/style/index.js +114 -4
- package/vendor/antd/es/image/style/progressAnimation.js +26 -0
- package/vendor/antd/es/index.js +2 -1
- package/vendor/antd/es/input/Input.js +9 -4
- package/vendor/antd/es/input/OTP/OTPInput.js +1 -0
- package/vendor/antd/es/input/OTP/index.js +3 -3
- package/vendor/antd/es/input/Password.js +45 -26
- package/vendor/antd/es/input/Search.js +6 -5
- package/vendor/antd/es/input/TextArea.js +13 -7
- package/vendor/antd/es/input/style/index.js +17 -11
- package/vendor/antd/es/input/style/otp.js +2 -1
- package/vendor/antd/es/input/style/variants.js +16 -10
- package/vendor/antd/es/input-number/index.js +3 -3
- package/vendor/antd/es/input-number/style/index.js +9 -9
- package/vendor/antd/es/layout/Sider.js +3 -2
- package/vendor/antd/es/list/index.js +5 -3
- package/vendor/antd/es/locale/en_US.js +3 -1
- package/vendor/antd/es/locale/ru_RU.js +3 -1
- package/vendor/antd/es/locale/useLocale.js +2 -1
- package/vendor/antd/es/masonry/Masonry.js +4 -3
- package/vendor/antd/es/mentions/index.js +28 -14
- package/vendor/antd/es/menu/MenuItem.js +2 -1
- package/vendor/antd/es/menu/OverrideContext.js +1 -0
- package/vendor/antd/es/menu/SubMenu.js +1 -1
- package/vendor/antd/es/menu/menu.js +5 -5
- package/vendor/antd/es/menu/style/index.js +21 -36
- package/vendor/antd/es/menu/style/vertical.js +2 -1
- package/vendor/antd/es/message/PureList.js +49 -0
- package/vendor/antd/es/message/PurePanel.js +28 -36
- package/vendor/antd/es/message/index.js +6 -3
- package/vendor/antd/es/message/style/index.js +102 -99
- package/vendor/antd/es/message/useMessage.js +29 -33
- package/vendor/antd/es/message/util.js +1 -1
- package/vendor/antd/es/modal/ConfirmDialog.js +11 -9
- package/vendor/antd/es/modal/Modal.js +12 -7
- package/vendor/antd/es/modal/PurePanel.js +1 -2
- package/vendor/antd/es/modal/confirm.js +4 -3
- package/vendor/antd/es/modal/shared.js +3 -2
- package/vendor/antd/es/modal/useModal/HookModal.js +2 -1
- package/vendor/antd/es/notification/PureList.js +46 -0
- package/vendor/antd/es/notification/PurePanel.js +37 -56
- package/vendor/antd/es/notification/hooks/useStackConfig.js +13 -0
- package/vendor/antd/es/notification/index.js +3 -1
- package/vendor/antd/es/notification/style/index.js +103 -170
- package/vendor/antd/es/notification/style/notification.js +191 -0
- package/vendor/antd/es/notification/style/placement.js +117 -60
- package/vendor/antd/es/notification/useNotification.js +37 -40
- package/vendor/antd/es/notification/util.js +9 -50
- package/vendor/antd/es/pagination/Pagination.js +1 -2
- package/vendor/antd/es/pagination/useShowSizeChanger.js +2 -1
- package/vendor/antd/es/popconfirm/PurePanel.js +4 -1
- package/vendor/antd/es/popconfirm/index.js +1 -2
- package/vendor/antd/es/popover/PurePanel.js +1 -2
- package/vendor/antd/es/popover/index.js +1 -2
- package/vendor/antd/es/progress/Circle.js +2 -1
- package/vendor/antd/es/progress/progress.js +3 -3
- package/vendor/antd/es/progress/utils.js +4 -3
- package/vendor/antd/es/qr-code/index.js +4 -4
- package/vendor/antd/es/radio/group.js +4 -3
- package/vendor/antd/es/radio/radio.js +2 -2
- package/vendor/antd/es/radio/style/index.js +1 -1
- package/vendor/antd/es/rate/index.js +2 -4
- package/vendor/antd/es/result/index.js +6 -5
- package/vendor/antd/es/result/style/index.js +10 -6
- package/vendor/antd/es/segmented/index.js +5 -3
- package/vendor/antd/es/select/index.js +23 -12
- package/vendor/antd/es/select/style/dropdown.js +1 -1
- package/vendor/antd/es/select/style/select-input.js +23 -15
- package/vendor/antd/es/select/useIcons.js +43 -26
- package/vendor/antd/es/skeleton/Element.js +2 -1
- package/vendor/antd/es/skeleton/Skeleton.js +3 -3
- package/vendor/antd/es/slider/SliderTooltip.js +1 -0
- package/vendor/antd/es/slider/index.js +5 -3
- package/vendor/antd/es/slider/useRafLock.js +1 -0
- package/vendor/antd/es/space/Compact.js +1 -1
- package/vendor/antd/es/space/Item.js +1 -1
- package/vendor/antd/es/space/index.js +2 -2
- package/vendor/antd/es/space/style/addon.js +5 -2
- package/vendor/antd/es/spin/Indicator/Progress.js +2 -1
- package/vendor/antd/es/spin/index.js +1 -2
- package/vendor/antd/es/splitter/Panel.js +7 -3
- package/vendor/antd/es/splitter/SplitBar.js +5 -4
- package/vendor/antd/es/splitter/Splitter.js +9 -6
- package/vendor/antd/es/splitter/hooks/useItems.js +2 -1
- package/vendor/antd/es/splitter/hooks/useSizes.js +1 -1
- package/vendor/antd/es/splitter/style/index.js +8 -6
- package/vendor/antd/es/statistic/Number.js +8 -4
- package/vendor/antd/es/statistic/Statistic.js +14 -10
- package/vendor/antd/es/steps/index.js +4 -4
- package/vendor/antd/es/style/compact-item-vertical.js +2 -1
- package/vendor/antd/es/style/compact-item.js +6 -6
- package/vendor/antd/es/switch/index.js +1 -2
- package/vendor/antd/es/table/InternalTable.js +23 -14
- package/vendor/antd/es/table/hooks/useFilledColumns.js +23 -0
- package/vendor/antd/es/table/hooks/useFilter/FilterDropdown.js +22 -16
- package/vendor/antd/es/table/hooks/useFilter/FilterWrapper.js +1 -0
- package/vendor/antd/es/table/hooks/useFilter/index.js +34 -18
- package/vendor/antd/es/table/hooks/useLazyKVMap.js +2 -1
- package/vendor/antd/es/table/hooks/usePagination.js +7 -4
- package/vendor/antd/es/table/hooks/useSelection.js +32 -21
- package/vendor/antd/es/table/hooks/useSorter.js +10 -5
- package/vendor/antd/es/table/style/bordered.js +5 -27
- package/vendor/antd/es/table/style/empty.js +1 -4
- package/vendor/antd/es/table/style/index.js +1 -4
- package/vendor/antd/es/table/util.js +6 -6
- package/vendor/antd/es/tabs/hooks/useAnimateConfig.js +2 -1
- package/vendor/antd/es/tabs/index.js +1 -2
- package/vendor/antd/es/tag/CheckableTagGroup.js +8 -5
- package/vendor/antd/es/tag/hooks/useColor.js +4 -3
- package/vendor/antd/es/tag/index.js +13 -7
- package/vendor/antd/es/theme/themes/dark/colors.js +2 -1
- package/vendor/antd/es/theme/themes/default/colors.js +2 -1
- package/vendor/antd/es/theme/useToken.js +2 -2
- package/vendor/antd/es/theme/util/alias.js +34 -29
- package/vendor/antd/es/timeline/Timeline.js +3 -4
- package/vendor/antd/es/tooltip/PurePanel.js +1 -2
- package/vendor/antd/es/tooltip/UniqueProvider/index.js +2 -1
- package/vendor/antd/es/tooltip/index.js +9 -7
- package/vendor/antd/es/tour/PurePanel.js +2 -2
- package/vendor/antd/es/tour/index.js +1 -1
- package/vendor/antd/es/tour/panelRender.js +4 -2
- package/vendor/antd/es/transfer/ListBody.js +3 -1
- package/vendor/antd/es/transfer/ListItem.js +2 -1
- package/vendor/antd/es/transfer/Section.js +17 -8
- package/vendor/antd/es/transfer/index.js +51 -16
- package/vendor/antd/es/transfer/style/index.js +5 -1
- package/vendor/antd/es/tree/Tree.js +1 -2
- package/vendor/antd/es/tree/style/index.js +5 -1
- package/vendor/antd/es/tree/utils/iconUtil.js +5 -4
- package/vendor/antd/es/tree-select/index.js +3 -3
- package/vendor/antd/es/typography/Base/CopyBtn.js +3 -2
- package/vendor/antd/es/typography/Base/Ellipsis.js +3 -3
- package/vendor/antd/es/typography/Base/index.js +38 -31
- package/vendor/antd/es/typography/Editable.js +10 -4
- package/vendor/antd/es/typography/Link.js +1 -0
- package/vendor/antd/es/typography/Text.js +2 -1
- package/vendor/antd/es/typography/Typography.js +20 -10
- package/vendor/antd/es/typography/hooks/useCopyClick.js +2 -1
- package/vendor/antd/es/typography/hooks/useMergedConfig.js +13 -7
- package/vendor/antd/es/typography/hooks/useTooltipProps.js +2 -1
- package/vendor/antd/es/typography/hooks/useTypographySemantic.js +33 -0
- package/vendor/antd/es/typography/style/index.js +12 -27
- package/vendor/antd/es/typography/style/mixins.js +46 -13
- package/vendor/antd/es/upload/Upload.js +13 -7
- package/vendor/antd/es/upload/UploadList/ListItem.js +6 -5
- package/vendor/antd/es/upload/UploadList/index.js +4 -3
- package/vendor/antd/es/upload/utils.js +18 -1
- package/vendor/antd/es/version/version.js +1 -1
- package/vendor/antd/es/watermark/index.js +6 -4
- package/vendor/antd/es/watermark/useSingletonCache.js +1 -0
- package/vendor/antd/es/watermark/useWatermark.js +3 -3
- package/vendor/antd/package.json +1 -1
- package/vendor/useblocks-ui-kit/es/components/DataEntry/Input/index.js +1 -1
- package/vendor/useblocks-ui-kit/package.json +1 -1
- package/iframe/js/discussHandlers.CCCXIEaO.js +0 -88
- package/static/core/1f101241.js +0 -1
- package/static/core/1fa93ad8.js +0 -28
- package/static/core/2007bc93.js +0 -1
- package/static/core/30ab7b1d.js +0 -1
- package/static/core/440a91be.js +0 -1
- package/static/core/44e96a78.js +0 -1
- package/static/core/823aedee.js +0 -1
- package/static/core/828583e1.js +0 -2
- package/static/core/8cc6e392.js +0 -1
- package/static/core/9aefcefb.js +0 -1
- package/static/core/a4f90443.js +0 -27
- package/static/core/a7ac37cd.js +0 -1
- package/static/core/df41de18.js +0 -7
- package/static/esm/349f9e2c.js +0 -1
- package/static/esm/50fbfdf6.js +0 -1
- package/static/media/icon-sets/lucide.json +0 -6275
- package/static/media/icon-sets/tabler.json +0 -19336
- package/static/umd-runtime/Cl8heeC3.js +0 -1
- package/static/umd-runtime/D0xo8o9c.js +0 -335
- package/useblocks-core.8098d114.js +0 -859
- package/vendor/@rc-component/notification/es/Notice.js +0 -106
- package/vendor/@rc-component/notification/es/NoticeList.js +0 -98
- package/vendor/@rc-component/textarea/LICENSE.md +0 -9
- package/vendor/@rc-component/textarea/es/index.js +0 -6
- package/vendor/@rc-component/textarea/package.json +0 -6
- package/vendor/antd/es/_util/extendsObject.js +0 -12
- package/vendor/antd/es/_util/getAllowClear.js +0 -12
- package/vendor/antd/es/_util/isNonNullable.js +0 -6
- package/vendor/antd/es/_util/isPrimitive.js +0 -4
- package/vendor/antd/es/notification/style/pure-panel.js +0 -18
- package/vendor/antd/es/notification/style/stack.js +0 -85
- /package/iframe/{iframe-eblock.8098d114.html → iframe-eblock.714faf8a.html} +0 -0
- /package/iframe/{iframe.8098d114.html → iframe.714faf8a.html} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
(function(){try{if(typeof document<"u"){var r=".blocks-app .image-editor-modal .ant-modal-container{flex-direction:column;min-height:100vh;display:flex;border-radius:0!important}.blocks-app .image-editor-modal .ant-modal-body{border-bottom:1px solid #d9d9d9;flex-grow:1;display:flex}.blocks-app .image-editor-modal .ant-modal-body #filerobot-editor{flex-grow:1;height:calc(100vh - 70px);min-height:calc(100vh - 70px);overflow:hidden}.blocks-app .image-editor-modal .pi .text-on-primary{background:var(--ub-colorPrimary);border-color:var(--ub-colorPrimary)}.blocks-app .image-editor-modal .pi .text-on-primary:hover{background:var(--ub-colorPrimaryHover);border-color:var(--ub-colorPrimaryHover)}.blocks-app .image-editor-modal .pi .text-on-primary.rounded-full{border-radius:calc(var(--ub-borderRadius) * 1px)}.blocks-app .image-editor-modal .pi .shadow-xl{box-shadow:none}.blocks-app .image-editor-modal .w-\\[4ch\\].text-sm.text-center{width:5ch}.blocks-app .image-editor-modal .pi .border-white{border-color:var(--ub-colorPrimary)}.blocks-app .image-editor-modal .pi .bg-white\\/50{background-color:var(--ub-colorPrimary)}.blocks-app .image-editor-modal .pi .text-on-primary{color:var(--ub-colorWhite)}",e=window.__useblocks_styles__||(window.__useblocks_styles__={sheets:{},order:[]}),l=r;if(!e.sheets[l]){var t=null;try{typeof CSSStyleSheet=="function"&&"replaceSync"in CSSStyleSheet.prototype&&(t=new CSSStyleSheet,t.replaceSync(r))}catch{t=null}if(t){if(!e.host||!e.host.isConnected||!e.host.sheet){var o=document.createElement("style");o.setAttribute("data-useblocks","true"),document.head.appendChild(o),e.host=o}for(var d=e.host.sheet,i=0;i<t.cssRules.length;i++)try{d.insertRule(t.cssRules[i].cssText,d.cssRules.length)}catch{}(e.texts||(e.texts=[])).push(r),(e.listeners||[]).forEach(function(a){try{a(r)}catch{}})}else{var o=document.createElement("style");o.setAttribute("data-useblocks","true"),o.appendChild(document.createTextNode(r)),document.head.appendChild(o)}e.sheets[l]=!0,e.order.push(l)}}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
|
|
2
|
+
__useblocks__.define("static/core/83c17079.js",["require","exports","module","static/core/2ff39ddf.js","static/core/734b5dbf.js","static/core/41d2fa95.js","static/core/8c5284f6.js","static/core/7c89682e.js","static/core/958fe93e.js","static/core/a73da823.js","react","react/jsx-runtime","__delivery__/libs"],function(r,O,H){const R=r("./2ff39ddf.js"),j=r("./734b5dbf.js"),e=r("./41d2fa95.js"),u=r("./8c5284f6.js"),M=r("./7c89682e.js");r("./958fe93e.js");const N=r("./a73da823.js");let s=r("react");s=R.__toESM(s);let c=r("react/jsx-runtime"),_=r("__delivery__/libs");var U={width:"100%",height:"100%"},F=[u.TABS_IDS.ADJUST,u.TABS_IDS.ANNOTATE,u.TABS_IDS.RESIZE];function L(n,l){if(n==="json")return new Blob([l],{type:"application/json"});if(n==="svg")return new Blob([l],{type:"image/svg+xml"});const f=`image/${n}`,p=l.replace(/data:image\/([a-z]*)?;base64,/,"");return N.base64ToBlob(p,f)}var $=({currentImageLink:n,prefetchedBlob:l,resolveImageBlob:f,onSave:p,uploadImageResultIsLoading:z})=>{const b=e.useCookieManager(),[E,v]=(0,s.useState)(),[I,S]=(0,s.useState)(),{__:C}=e.useI18n();let m=e.useDispatch();const T=e.useStore(),h=e.useAppConfig(),w=e.useEditorLocale(),P=e.useSelector(e.selectSecondModal),D=e.useProjectData();(0,s.useMemo)(()=>{if(!h?.icons)return;const o={};for(const[i,t]of Object.entries(h.icons))typeof t=="string"&&(o[i]=e.sanitizeHtml(t));return Object.keys(o).length>0?o:void 0},[h?.icons]);const[J,k]=(0,s.useState)(!1),y=(0,s.useRef)(),A=e.useEventEmitter(j.events.FILE_PROXY_EVENT_ID);(0,s.useEffect)(()=>{let o=!1;return(async()=>{const t=n;if(!t&&!l)return;let a=l;if(!a&&t)try{typeof f=="function"?a=await f(t):a=await(await fetch(t)).blob()}catch{if(o)return;if(a=await A.fire({url:t,project:D}).filter(d=>d instanceof Blob)[0],!a){const d=b.get(e.APP_COOKIES.em_token)||await e.di.getContainer(T)?.getInstance(j.TOKEN_ID);a=await(await fetch(`https://app.useblocks.io/api/wp-json/cors-proxy/v1/get?url=${encodeURIComponent(t)}`,{headers:{authorization:`Bearer ${d}`}})).blob()}}if(o||!a)return;const g=new FileReader;g.onload=()=>{if(o)return;const d=g.result;typeof d=="string"&&(v(d),S(a.type))},g.onerror=()=>{},g.readAsDataURL(a)})().catch(t=>{}),()=>{o=!0}},[n,l,f,b,A,D,T]);const K=(0,s.useCallback)(()=>{v(null),S(null),k(!1),m(e.closeSecondModal()),m(e.closeModal$1(e.MODALS.UPLOAD_IMAGE_MODAL))},[m]),x=(0,s.useRef)();x.current=async function(o,i,t){try{const a=L(t,o);p&&await p(new File([a],i,{lastModified:Date.now(),type:a.type}))}catch(a){throw a}};const V=(0,s.useCallback)(o=>{k(!!o)},[]),Y=(0,s.useCallback)(()=>{if(!y.current)return;const o=n?.split("/").pop().split(".")[0]||"image",i=I?.split("/")[1]||"png";try{const{imageData:t}=y.current({name:o,extension:i},void 0,!1),a=t.imageBase64??(t.imageCanvas?t.imageCanvas.toDataURL(`image/${i}`):void 0);if(!a)throw new Error("FIE не вернул ни imageBase64, ни imageCanvas");x.current(a,o,i)}catch{}},[n,I]),B=w?w.replace("_","-"):"en-US";return(0,c.jsxs)(_.ui_kit$Modal,{afterOpenChange:V,width:"100%",style:{maxWidth:"100%",minHeight:"100vh"},className:"image-editor-modal",centered:!0,closable:!1,zIndex:1100,mask:!1,open:P,footer:[(0,c.jsx)(_.ui_kit$Button,{className:"em-analytics__profile-cancel",onClick:K,children:C("Cancel")},"Cancel"),(0,c.jsx)(_.ui_kit$Button,{className:"em-analytics__profile-updafilerobotte",id:"save",type:"primary",onClick:Y,children:C("Update")},"Ok")],children:[z&&(0,c.jsx)("div",{style:{position:"absolute",height:"100%",width:"100%",display:"flex",alignItems:"center",justifyContent:"center",background:e.emCssVar("colorBgLayout"),zIndex:10,opacity:.7},children:(0,c.jsx)(_.ui_kit$Spin,{size:"large"})}),(0,c.jsx)("div",{id:"filerobot-editor",style:U,children:J&&E&&(0,c.jsx)(u.AssemblyPoint_default,{source:E,useBackendTranslations:!1,language:B.split("-")[0],translations:M.d(B),tabsIds:F,defaultTabId:u.TABS_IDS.ADJUST,avoidChangesNotSavedAlertOnLeave:!0,removeSaveButton:!0,getCurrentImgDataFnRef:y})})]})};O.default=$});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
(function(){try{if(typeof document<"u"){var e='.blocks-app .tippy-box[data-animation=fade][data-state=hidden]{opacity:0}.blocks-app [data-tippy-root]{max-width:calc(100vw - 10px)}.blocks-app .tippy-box{color:#fff;white-space:normal;background-color:#333;border-radius:4px;outline:0;font-size:14px;line-height:1.4;transition-property:transform,visibility,opacity;position:relative}.blocks-app .tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.blocks-app .tippy-box[data-placement^=top]>.tippy-arrow:before{border-width:8px 8px 0;border-top-color:initial;transform-origin:top;bottom:-7px;left:0}.blocks-app .tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.blocks-app .tippy-box[data-placement^=bottom]>.tippy-arrow:before{border-width:0 8px 8px;border-bottom-color:initial;transform-origin:bottom;top:-7px;left:0}.blocks-app .tippy-box[data-placement^=left]>.tippy-arrow{right:0}.blocks-app .tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;transform-origin:0;right:-7px}.blocks-app .tippy-box[data-placement^=right]>.tippy-arrow{left:0}.blocks-app .tippy-box[data-placement^=right]>.tippy-arrow:before{border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:100%;left:-7px}.blocks-app .tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.blocks-app .tippy-arrow{color:#333;width:16px;height:16px}.blocks-app .tippy-arrow:before{content:"";border-style:solid;border-color:#0000;position:absolute}.blocks-app .tippy-content{z-index:1;padding:5px 9px;position:relative}.blocks-app .tippy-box[data-animation=scale][data-placement^=top]{transform-origin:bottom}.blocks-app .tippy-box[data-animation=scale][data-placement^=bottom]{transform-origin:top}.blocks-app .tippy-box[data-animation=scale][data-placement^=left]{transform-origin:100%}.blocks-app .tippy-box[data-animation=scale][data-placement^=right]{transform-origin:0}.blocks-app .tippy-box[data-animation=scale][data-state=hidden]{opacity:0;transform:scale(.5)}',t=window.__useblocks_styles__||(window.__useblocks_styles__={sheets:{},order:[]}),i=e;if(!t.sheets[i]){var a=null;try{typeof CSSStyleSheet=="function"&&"replaceSync"in CSSStyleSheet.prototype&&(a=new CSSStyleSheet,a.replaceSync(e))}catch{a=null}if(a){if(!t.host||!t.host.isConnected||!t.host.sheet){var o=document.createElement("style");o.setAttribute("data-useblocks","true"),document.head.appendChild(o),t.host=o}for(var n=t.host.sheet,r=0;r<a.cssRules.length;r++)try{n.insertRule(a.cssRules[r].cssText,n.cssRules.length)}catch{}(t.texts||(t.texts=[])).push(e),(t.listeners||[]).forEach(function(p){try{p(e)}catch{}})}else{var o=document.createElement("style");o.setAttribute("data-useblocks","true"),o.appendChild(document.createTextNode(e)),document.head.appendChild(o)}t.sheets[i]=!0,t.order.push(i)}}}catch(p){console.error("vite-plugin-css-injected-by-js",p)}})();
|
|
2
|
-
__useblocks__.define("static/core/
|
|
2
|
+
__useblocks__.define("static/core/8c5284f6.js",["require","exports","module","static/core/2ff39ddf.js","static/core/41d2fa95.js","react","react-dom","react-dom/client"],function(Ri,_2,Pk){const De=Ri("./2ff39ddf.js"),te=Ri("./41d2fa95.js");let u=Ri("react"),er=De.__toESM(u,1);u=De.__toESM(u);let _o=Ri("react-dom"),Kd=Ri("react-dom/client");Kd=De.__toESM(Kd);var vc=De.__toESM(te.require_prop_types());te.init__polyfill_node_global(),te.init__polyfill_node_process();function u8(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function qd(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Jd(t,e){if(t){if(typeof t=="string")return qd(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?qd(t,e):void 0}}function d8(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&te._setPrototypeOf(t,e)}function gc(t){return gc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},gc(t)}function f8(t,e){if(e&&(te._typeof(e)=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return u8(t)}function h8(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p8(t,e){if(te._typeof(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(te._typeof(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function T2(t){var e=p8(t,"string");return te._typeof(e)=="symbol"?e:e+""}function A2(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,T2(r.key),r)}}function m8(t,e,n){return e&&A2(t.prototype,e),n&&A2(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function P(t,e,n){return(e=T2(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function M2(t){if(Array.isArray(t))return t}function v8(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,o,l,s,c=[],f=!0,p=!1;try{if(l=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;f=!1}else for(;!(f=(r=l.call(n)).done)&&(c.push(r.value),c.length!==e);f=!0);}catch(m){p=!0,o=m}finally{try{if(!f&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(p)throw o}}return c}}function I2(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
3
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Te(t,e){return M2(t)||v8(t,e)||Jd(t,e)||I2()}function ue(t,e){if(t==null)return{};var n,r,o=te._objectWithoutPropertiesLoose(t,e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(r=0;r<l.length;r++)n=l[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}var dt=De.__commonJSMin((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t._registerNode=t.Konva=t.glob=void 0;var e=Math.PI/180;function n(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}t.glob=typeof te._polyfill_node_global_default<"u"?te._polyfill_node_global_default:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},t.Konva={_global:t.glob,version:"9.3.18",isBrowser:n(),isUnminified:/param/.test(function(o){}.toString()),dblClickWindow:400,getAngle(o){return t.Konva.angleDeg?o*e:o},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,_fixTextRendering:!1,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return t.Konva.DD.isDragging},isTransforming(){var o;return(o=t.Konva.Transformer)===null||o===void 0?void 0:o.isTransforming()},isDragReady(){return!!t.Konva.DD.node},releaseCanvasOnDestroy:!0,document:t.glob.document,_injectGlobal(o){t.glob.Konva=o}};var r=o=>{t.Konva[o.prototype.getClassName()]=o};t._registerNode=r,t.Konva._injectGlobal(t.Konva)})),Wt=De.__commonJSMin((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Util=t.Transform=void 0;var e=dt(),n=class l8{constructor(w=[1,0,0,1,0,0]){this.dirty=!1,this.m=w&&w.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new l8(this.m)}copyInto(w){w.m[0]=this.m[0],w.m[1]=this.m[1],w.m[2]=this.m[2],w.m[3]=this.m[3],w.m[4]=this.m[4],w.m[5]=this.m[5]}point(w){const T=this.m;return{x:T[0]*w.x+T[2]*w.y+T[4],y:T[1]*w.x+T[3]*w.y+T[5]}}translate(w,T){return this.m[4]+=this.m[0]*w+this.m[2]*T,this.m[5]+=this.m[1]*w+this.m[3]*T,this}scale(w,T){return this.m[0]*=w,this.m[1]*=w,this.m[2]*=T,this.m[3]*=T,this}rotate(w){const T=Math.cos(w),R=Math.sin(w),L=this.m[0]*T+this.m[2]*R,j=this.m[1]*T+this.m[3]*R,I=this.m[0]*-R+this.m[2]*T,z=this.m[1]*-R+this.m[3]*T;return this.m[0]=L,this.m[1]=j,this.m[2]=I,this.m[3]=z,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(w,T){const R=this.m[0]+this.m[2]*T,L=this.m[1]+this.m[3]*T,j=this.m[2]+this.m[0]*w,I=this.m[3]+this.m[1]*w;return this.m[0]=R,this.m[1]=L,this.m[2]=j,this.m[3]=I,this}multiply(w){const T=this.m[0]*w.m[0]+this.m[2]*w.m[1],R=this.m[1]*w.m[0]+this.m[3]*w.m[1],L=this.m[0]*w.m[2]+this.m[2]*w.m[3],j=this.m[1]*w.m[2]+this.m[3]*w.m[3],I=this.m[0]*w.m[4]+this.m[2]*w.m[5]+this.m[4],z=this.m[1]*w.m[4]+this.m[3]*w.m[5]+this.m[5];return this.m[0]=T,this.m[1]=R,this.m[2]=L,this.m[3]=j,this.m[4]=I,this.m[5]=z,this}invert(){const w=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),T=this.m[3]*w,R=-this.m[1]*w,L=-this.m[2]*w,j=this.m[0]*w,I=w*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),z=w*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=T,this.m[1]=R,this.m[2]=L,this.m[3]=j,this.m[4]=I,this.m[5]=z,this}getMatrix(){return this.m}decompose(){const w=this.m[0],T=this.m[1],R=this.m[2],L=this.m[3],j=this.m[4],I=this.m[5],z=w*L-T*R,k={x:j,y:I,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(w!=0||T!=0){const F=Math.sqrt(w*w+T*T);k.rotation=T>0?Math.acos(w/F):-Math.acos(w/F),k.scaleX=F,k.scaleY=z/F,k.skewX=(w*R+T*L)/z,k.skewY=0}else if(R!=0||L!=0){const F=Math.sqrt(R*R+L*L);k.rotation=Math.PI/2-(L>0?Math.acos(-R/F):-Math.acos(R/F)),k.scaleX=z/F,k.scaleY=F,k.skewX=0,k.skewY=(w*R+T*L)/z}return k.rotation=t.Util._getRotation(k.rotation),k}};t.Transform=n;var r="[object Array]",o="[object Number]",l="[object String]",s="[object Boolean]",c=Math.PI/180,f=180/Math.PI,p="#",m="",E="0",S="Konva warning: ",y="Konva error: ",b="rgb(",g={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},O=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,A=[],C=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(v){setTimeout(v,60)};t.Util={_isElement(v){return!!(v&&v.nodeType==1)},_isFunction(v){return!!(v&&v.constructor&&v.call&&v.apply)},_isPlainObject(v){return!!v&&v.constructor===Object},_isArray(v){return Object.prototype.toString.call(v)===r},_isNumber(v){return Object.prototype.toString.call(v)===o&&!isNaN(v)&&isFinite(v)},_isString(v){return Object.prototype.toString.call(v)===l},_isBoolean(v){return Object.prototype.toString.call(v)===s},isObject(v){return v instanceof Object},isValidSelector(v){if(typeof v!="string")return!1;const w=v[0];return w==="#"||w==="."||w===w.toUpperCase()},_sign(v){return v===0||v>0?1:-1},requestAnimFrame(v){A.push(v),A.length===1&&C(function(){const w=A;A=[],w.forEach(function(T){T()})})},createCanvasElement(){const v=document.createElement("canvas");try{v.style=v.style||{}}catch{}return v},createImageElement(){return document.createElement("img")},_isInDocument(v){for(;v=v.parentNode;)if(v==document)return!0;return!1},_urlToImage(v,w){const T=t.Util.createImageElement();T.onload=function(){w(T)},T.src=v},_rgbToHex(v,w,T){return((1<<24)+(v<<16)+(w<<8)+T).toString(16).slice(1)},_hexToRgb(v){v=v.replace(p,m);const w=parseInt(v,16);return{r:w>>16&255,g:w>>8&255,b:w&255}},getRandomColor(){let v=(Math.random()*16777215<<0).toString(16);for(;v.length<6;)v=E+v;return p+v},getRGB(v){let w;return v in g?(w=g[v],{r:w[0],g:w[1],b:w[2]}):v[0]===p?this._hexToRgb(v.substring(1)):v.substr(0,4)===b?(w=O.exec(v.replace(/ /g,"")),{r:parseInt(w[1],10),g:parseInt(w[2],10),b:parseInt(w[3],10)}):{r:0,g:0,b:0}},colorToRGBA(v){return v=v||"black",t.Util._namedColorToRBA(v)||t.Util._hex3ColorToRGBA(v)||t.Util._hex4ColorToRGBA(v)||t.Util._hex6ColorToRGBA(v)||t.Util._hex8ColorToRGBA(v)||t.Util._rgbColorToRGBA(v)||t.Util._rgbaColorToRGBA(v)||t.Util._hslColorToRGBA(v)},_namedColorToRBA(v){const w=g[v.toLowerCase()];return w?{r:w[0],g:w[1],b:w[2],a:1}:null},_rgbColorToRGBA(v){if(v.indexOf("rgb(")===0){v=v.match(/rgb\(([^)]+)\)/)[1];const w=v.split(/ *, */).map(Number);return{r:w[0],g:w[1],b:w[2],a:1}}},_rgbaColorToRGBA(v){if(v.indexOf("rgba(")===0){v=v.match(/rgba\(([^)]+)\)/)[1];const w=v.split(/ *, */).map((T,R)=>T.slice(-1)==="%"?R===3?parseInt(T)/100:parseInt(T)/100*255:Number(T));return{r:w[0],g:w[1],b:w[2],a:w[3]}}},_hex8ColorToRGBA(v){if(v[0]==="#"&&v.length===9)return{r:parseInt(v.slice(1,3),16),g:parseInt(v.slice(3,5),16),b:parseInt(v.slice(5,7),16),a:parseInt(v.slice(7,9),16)/255}},_hex6ColorToRGBA(v){if(v[0]==="#"&&v.length===7)return{r:parseInt(v.slice(1,3),16),g:parseInt(v.slice(3,5),16),b:parseInt(v.slice(5,7),16),a:1}},_hex4ColorToRGBA(v){if(v[0]==="#"&&v.length===5)return{r:parseInt(v[1]+v[1],16),g:parseInt(v[2]+v[2],16),b:parseInt(v[3]+v[3],16),a:parseInt(v[4]+v[4],16)/255}},_hex3ColorToRGBA(v){if(v[0]==="#"&&v.length===4)return{r:parseInt(v[1]+v[1],16),g:parseInt(v[2]+v[2],16),b:parseInt(v[3]+v[3],16),a:1}},_hslColorToRGBA(v){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(v)){const[w,...T]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(v),R=Number(T[0])/360,L=Number(T[1])/100,j=Number(T[2])/100;let I,z,k;if(L===0)return k=j*255,{r:Math.round(k),g:Math.round(k),b:Math.round(k),a:1};j<.5?I=j*(1+L):I=j+L-j*L;const F=2*j-I,G=[0,0,0];for(let _=0;_<3;_++)z=R+1/3*-(_-1),z<0&&z++,z>1&&z--,6*z<1?k=F+(I-F)*6*z:2*z<1?k=I:3*z<2?k=F+(I-F)*(2/3-z)*6:k=F,G[_]=k*255;return{r:Math.round(G[0]),g:Math.round(G[1]),b:Math.round(G[2]),a:1}}},haveIntersection(v,w){return!(w.x>v.x+v.width||w.x+w.width<v.x||w.y>v.y+v.height||w.y+w.height<v.y)},cloneObject(v){const w={};for(const T in v)this._isPlainObject(v[T])?w[T]=this.cloneObject(v[T]):this._isArray(v[T])?w[T]=this.cloneArray(v[T]):w[T]=v[T];return w},cloneArray(v){return v.slice(0)},degToRad(v){return v*c},radToDeg(v){return v*f},_degToRad(v){return t.Util.warn("Util._degToRad is removed. Please use public Util.degToRad instead."),t.Util.degToRad(v)},_radToDeg(v){return t.Util.warn("Util._radToDeg is removed. Please use public Util.radToDeg instead."),t.Util.radToDeg(v)},_getRotation(v){return e.Konva.angleDeg?t.Util.radToDeg(v):v},_capitalize(v){return v.charAt(0).toUpperCase()+v.slice(1)},throw(v){throw new Error(y+v)},error(v){},warn(v){e.Konva.showWarnings},each(v,w){for(const T in v)w(T,v[T])},_inRange(v,w,T){return w<=v&&v<T},_getProjectionToSegment(v,w,T,R,L,j){let I,z,k;const F=(v-T)*(v-T)+(w-R)*(w-R);if(F==0)I=v,z=w,k=(L-T)*(L-T)+(j-R)*(j-R);else{const G=((L-v)*(T-v)+(j-w)*(R-w))/F;G<0?(I=v,z=w,k=(v-L)*(v-L)+(w-j)*(w-j)):G>1?(I=T,z=R,k=(T-L)*(T-L)+(R-j)*(R-j)):(I=v+G*(T-v),z=w+G*(R-w),k=(I-L)*(I-L)+(z-j)*(z-j))}return[I,z,k]},_getProjectionToLine(v,w,T){const R=t.Util.cloneObject(v);let L=Number.MAX_VALUE;return w.forEach(function(j,I){if(!T&&I===w.length-1)return;const z=w[(I+1)%w.length],k=t.Util._getProjectionToSegment(j.x,j.y,z.x,z.y,v.x,v.y),F=k[0],G=k[1],_=k[2];_<L&&(R.x=F,R.y=G,L=_)}),R},_prepareArrayForTween(v,w,T){const R=[],L=[];if(v.length>w.length){const I=w;w=v,v=I}for(let I=0;I<v.length;I+=2)R.push({x:v[I],y:v[I+1]});for(let I=0;I<w.length;I+=2)L.push({x:w[I],y:w[I+1]});const j=[];return L.forEach(function(I){const z=t.Util._getProjectionToLine(I,R,T);j.push(z.x),j.push(z.y)}),j},_prepareToStringify(v){let w;v.visitedByCircularReferenceRemoval=!0;for(const T in v)if(v.hasOwnProperty(T)&&v[T]&&typeof v[T]=="object"){if(w=Object.getOwnPropertyDescriptor(v,T),v[T].visitedByCircularReferenceRemoval||t.Util._isElement(v[T]))if(w.configurable)delete v[T];else return null;else if(t.Util._prepareToStringify(v[T])===null)if(w.configurable)delete v[T];else return null}return delete v.visitedByCircularReferenceRemoval,v},_assign(v,w){for(const T in w)v[T]=w[T];return v},_getFirstPointerId(v){return v.touches?v.changedTouches[0].identifier:v.pointerId||999},releaseCanvas(...v){e.Konva.releaseCanvasOnDestroy&&v.forEach(w=>{w.width=0,w.height=0})},drawRoundedRectPath(v,w,T,R){let L=0,j=0,I=0,z=0;typeof R=="number"?L=j=I=z=Math.min(R,w/2,T/2):(L=Math.min(R[0]||0,w/2,T/2),j=Math.min(R[1]||0,w/2,T/2),z=Math.min(R[2]||0,w/2,T/2),I=Math.min(R[3]||0,w/2,T/2)),v.moveTo(L,0),v.lineTo(w-j,0),v.arc(w-j,j,j,Math.PI*3/2,0,!1),v.lineTo(w,T-z),v.arc(w-z,T-z,z,0,Math.PI/2,!1),v.lineTo(I,T),v.arc(I,T-I,I,Math.PI/2,Math.PI,!1),v.lineTo(0,L),v.arc(L,L,L,Math.PI,Math.PI*3/2,!1)}}})),pt=De.__commonJSMin((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RGBComponent=o,t.alphaComponent=l,t.getNumberValidator=s,t.getNumberOrArrayOfNumbersValidator=c,t.getNumberOrAutoValidator=f,t.getStringValidator=p,t.getStringOrGradientValidator=m,t.getFunctionValidator=E,t.getNumberArrayValidator=S,t.getBooleanValidator=y,t.getComponentValidator=b;var e=dt(),n=Wt();function r(g){return n.Util._isString(g)?'"'+g+'"':Object.prototype.toString.call(g)==="[object Number]"||n.Util._isBoolean(g)?g:Object.prototype.toString.call(g)}function o(g){return g>255?255:g<0?0:Math.round(g)}function l(g){return g>1?1:g<1e-4?1e-4:g}function s(){if(e.Konva.isUnminified)return function(g,O){return n.Util._isNumber(g)||n.Util.warn(r(g)+' is a not valid value for "'+O+'" attribute. The value should be a number.'),g}}function c(g){if(e.Konva.isUnminified)return function(O,A){let C=n.Util._isNumber(O),v=n.Util._isArray(O)&&O.length==g;return!C&&!v&&n.Util.warn(r(O)+' is a not valid value for "'+A+'" attribute. The value should be a number or Array<number>('+g+")"),O}}function f(){if(e.Konva.isUnminified)return function(g,O){return n.Util._isNumber(g)||g==="auto"||n.Util.warn(r(g)+' is a not valid value for "'+O+'" attribute. The value should be a number or "auto".'),g}}function p(){if(e.Konva.isUnminified)return function(g,O){return n.Util._isString(g)||n.Util.warn(r(g)+' is a not valid value for "'+O+'" attribute. The value should be a string.'),g}}function m(){if(e.Konva.isUnminified)return function(g,O){const A=n.Util._isString(g),C=Object.prototype.toString.call(g)==="[object CanvasGradient]"||g&&g.addColorStop;return A||C||n.Util.warn(r(g)+' is a not valid value for "'+O+'" attribute. The value should be a string or a native gradient.'),g}}function E(){if(e.Konva.isUnminified)return function(g,O){return n.Util._isFunction(g)||n.Util.warn(r(g)+' is a not valid value for "'+O+'" attribute. The value should be a function.'),g}}function S(){if(e.Konva.isUnminified)return function(g,O){const A=Int8Array?Object.getPrototypeOf(Int8Array):null;return A&&g instanceof A||(n.Util._isArray(g)?g.forEach(function(C){n.Util._isNumber(C)||n.Util.warn('"'+O+'" attribute has non numeric element '+C+". Make sure that all elements are numbers.")}):n.Util.warn(r(g)+' is a not valid value for "'+O+'" attribute. The value should be a array of numbers.')),g}}function y(){if(e.Konva.isUnminified)return function(g,O){return g===!0||g===!1||n.Util.warn(r(g)+' is a not valid value for "'+O+'" attribute. The value should be a boolean.'),g}}function b(g){if(e.Konva.isUnminified)return function(O,A){return O==null||n.Util.isObject(O)||n.Util.warn(r(O)+' is a not valid value for "'+A+'" attribute. The value should be an object with properties '+g),O}}})),ft=De.__commonJSMin((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Factory=void 0;var e=Wt(),n=pt(),r="get",o="set";t.Factory={addGetterSetter(l,s,c,f,p){t.Factory.addGetter(l,s,c),t.Factory.addSetter(l,s,f,p),t.Factory.addOverloadedGetterSetter(l,s)},addGetter(l,s,c){var f=r+e.Util._capitalize(s);l.prototype[f]=l.prototype[f]||function(){const p=this.attrs[s];return p===void 0?c:p}},addSetter(l,s,c,f){var p=o+e.Util._capitalize(s);l.prototype[p]||t.Factory.overWriteSetter(l,s,c,f)},overWriteSetter(l,s,c,f){var p=o+e.Util._capitalize(s);l.prototype[p]=function(m){return c&&m!==void 0&&m!==null&&(m=c.call(this,m,s)),this._setAttr(s,m),f&&f.call(this),this}},addComponentsGetterSetter(l,s,c,f,p){const m=c.length,E=e.Util._capitalize,S=r+E(s),y=o+E(s);l.prototype[S]=function(){const g={};for(let O=0;O<m;O++){const A=c[O];g[A]=this.getAttr(s+E(A))}return g};const b=(0,n.getComponentValidator)(c);l.prototype[y]=function(g){const O=this.attrs[s];f&&(g=f.call(this,g,s)),b&&b.call(this,g,s);for(const A in g)g.hasOwnProperty(A)&&this._setAttr(s+E(A),g[A]);return g||c.forEach(A=>{this._setAttr(s+E(A),void 0)}),this._fireChangeEvent(s,O,g),p&&p.call(this),this},t.Factory.addOverloadedGetterSetter(l,s)},addOverloadedGetterSetter(l,s){var c=e.Util._capitalize(s),f=o+c,p=r+c;l.prototype[s]=function(){return arguments.length?(this[f](arguments[0]),this):this[p]()}},addDeprecatedGetterSetter(l,s,c,f){e.Util.error("Adding deprecated "+s);const p=r+e.Util._capitalize(s),m=s+" property is deprecated and will be removed soon. Look at Konva change log for more information.";l.prototype[p]=function(){e.Util.error(m);const E=this.attrs[s];return E===void 0?c:E},t.Factory.addSetter(l,s,f,function(){e.Util.error(m)}),t.Factory.addOverloadedGetterSetter(l,s)},backCompat(l,s){e.Util.each(s,function(c,f){const p=l.prototype[f],m=r+e.Util._capitalize(c),E=o+e.Util._capitalize(c);function S(){p.apply(this,arguments),e.Util.error('"'+c+'" method is deprecated and will be removed soon. Use ""'+f+'" instead.')}l.prototype[c]=S,l.prototype[m]=S,l.prototype[E]=S})},afterSetFilter(){this._filterUpToDate=!1}}})),N2=De.__commonJSMin((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.HitContext=t.SceneContext=t.Context=void 0;var e=Wt(),n=dt();function r(C){const v=[],w=C.length,T=e.Util;for(let R=0;R<w;R++){let L=C[R];T._isNumber(L)?L=Math.round(L*1e3)/1e3:T._isString(L)||(L=L+""),v.push(L)}return v}var o=",",l="(",s=")",c="([",f="])",p=";",m="()",E="=",S=["arc","arcTo","beginPath","bezierCurveTo","clearRect","clip","closePath","createLinearGradient","createPattern","createRadialGradient","drawImage","ellipse","fill","fillText","getImageData","createImageData","lineTo","moveTo","putImageData","quadraticCurveTo","rect","roundRect","restore","rotate","save","scale","setLineDash","setTransform","stroke","strokeText","transform","translate"],y=["fillStyle","strokeStyle","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","letterSpacing","lineCap","lineDashOffset","lineJoin","lineWidth","miterLimit","direction","font","textAlign","textBaseline","globalAlpha","globalCompositeOperation","imageSmoothingEnabled"],b=100,g=class{constructor(C){this.canvas=C,n.Konva.enableTrace&&(this.traceArr=[],this._enableTrace())}fillShape(C){C.fillEnabled()&&this._fill(C)}_fill(C){}strokeShape(C){C.hasStroke()&&this._stroke(C)}_stroke(C){}fillStrokeShape(C){C.attrs.fillAfterStrokeEnabled?(this.strokeShape(C),this.fillShape(C)):(this.fillShape(C),this.strokeShape(C))}getTrace(C,v){let w=this.traceArr,T=w.length,R="",L,j,I,z;for(L=0;L<T;L++)j=w[L],I=j.method,I?(z=j.args,R+=I,C?R+=m:e.Util._isArray(z[0])?R+=c+z.join(o)+f:(v&&(z=z.map(k=>typeof k=="number"?Math.floor(k):k)),R+=l+z.join(o)+s)):(R+=j.property,C||(R+=E+j.val)),R+=p;return R}clearTrace(){this.traceArr=[]}_trace(C){let v=this.traceArr,w;v.push(C),w=v.length,w>=b&&v.shift()}reset(){const C=this.getCanvas().getPixelRatio();this.setTransform(1*C,0,0,1*C,0,0)}getCanvas(){return this.canvas}clear(C){const v=this.getCanvas();C?this.clearRect(C.x||0,C.y||0,C.width||0,C.height||0):this.clearRect(0,0,v.getWidth()/v.pixelRatio,v.getHeight()/v.pixelRatio)}_applyLineCap(C){const v=C.attrs.lineCap;v&&this.setAttr("lineCap",v)}_applyOpacity(C){const v=C.getAbsoluteOpacity();v!==1&&this.setAttr("globalAlpha",v)}_applyLineJoin(C){const v=C.attrs.lineJoin;v&&this.setAttr("lineJoin",v)}setAttr(C,v){this._context[C]=v}arc(C,v,w,T,R,L){this._context.arc(C,v,w,T,R,L)}arcTo(C,v,w,T,R){this._context.arcTo(C,v,w,T,R)}beginPath(){this._context.beginPath()}bezierCurveTo(C,v,w,T,R,L){this._context.bezierCurveTo(C,v,w,T,R,L)}clearRect(C,v,w,T){this._context.clearRect(C,v,w,T)}clip(...C){this._context.clip.apply(this._context,C)}closePath(){this._context.closePath()}createImageData(C,v){const w=arguments;if(w.length===2)return this._context.createImageData(C,v);if(w.length===1)return this._context.createImageData(C)}createLinearGradient(C,v,w,T){return this._context.createLinearGradient(C,v,w,T)}createPattern(C,v){return this._context.createPattern(C,v)}createRadialGradient(C,v,w,T,R,L){return this._context.createRadialGradient(C,v,w,T,R,L)}drawImage(C,v,w,T,R,L,j,I,z){const k=arguments,F=this._context;k.length===3?F.drawImage(C,v,w):k.length===5?F.drawImage(C,v,w,T,R):k.length===9&&F.drawImage(C,v,w,T,R,L,j,I,z)}ellipse(C,v,w,T,R,L,j,I){this._context.ellipse(C,v,w,T,R,L,j,I)}isPointInPath(C,v,w,T){return w?this._context.isPointInPath(w,C,v,T):this._context.isPointInPath(C,v,T)}fill(...C){this._context.fill.apply(this._context,C)}fillRect(C,v,w,T){this._context.fillRect(C,v,w,T)}strokeRect(C,v,w,T){this._context.strokeRect(C,v,w,T)}fillText(C,v,w,T){T?this._context.fillText(C,v,w,T):this._context.fillText(C,v,w)}measureText(C){return this._context.measureText(C)}getImageData(C,v,w,T){return this._context.getImageData(C,v,w,T)}lineTo(C,v){this._context.lineTo(C,v)}moveTo(C,v){this._context.moveTo(C,v)}rect(C,v,w,T){this._context.rect(C,v,w,T)}roundRect(C,v,w,T,R){this._context.roundRect(C,v,w,T,R)}putImageData(C,v,w){this._context.putImageData(C,v,w)}quadraticCurveTo(C,v,w,T){this._context.quadraticCurveTo(C,v,w,T)}restore(){this._context.restore()}rotate(C){this._context.rotate(C)}save(){this._context.save()}scale(C,v){this._context.scale(C,v)}setLineDash(C){this._context.setLineDash?this._context.setLineDash(C):"mozDash"in this._context?this._context.mozDash=C:"webkitLineDash"in this._context&&(this._context.webkitLineDash=C)}getLineDash(){return this._context.getLineDash()}setTransform(C,v,w,T,R,L){this._context.setTransform(C,v,w,T,R,L)}stroke(C){C?this._context.stroke(C):this._context.stroke()}strokeText(C,v,w,T){this._context.strokeText(C,v,w,T)}transform(C,v,w,T,R,L){this._context.transform(C,v,w,T,R,L)}translate(C,v){this._context.translate(C,v)}_enableTrace(){let C=this,v=S.length,w=this.setAttr,T,R;const L=function(j){let I=C[j],z;C[j]=function(){return R=r(Array.prototype.slice.call(arguments,0)),z=I.apply(C,arguments),C._trace({method:j,args:R}),z}};for(T=0;T<v;T++)L(S[T]);C.setAttr=function(){w.apply(C,arguments);const j=arguments[0];let I=arguments[1];(j==="shadowOffsetX"||j==="shadowOffsetY"||j==="shadowBlur")&&(I=I/this.canvas.getPixelRatio()),C._trace({property:j,val:I})}}_applyGlobalCompositeOperation(C){const v=C.attrs.globalCompositeOperation;!v||v==="source-over"||this.setAttr("globalCompositeOperation",v)}};t.Context=g,y.forEach(function(C){Object.defineProperty(g.prototype,C,{get(){return this._context[C]},set(v){this._context[C]=v}})});var O=class extends g{constructor(C,{willReadFrequently:v=!1}={}){super(C),this._context=C._canvas.getContext("2d",{willReadFrequently:v})}_fillColor(C){const v=C.fill();this.setAttr("fillStyle",v),C._fillFunc(this)}_fillPattern(C){this.setAttr("fillStyle",C._getFillPattern()),C._fillFunc(this)}_fillLinearGradient(C){const v=C._getLinearGradient();v&&(this.setAttr("fillStyle",v),C._fillFunc(this))}_fillRadialGradient(C){const v=C._getRadialGradient();v&&(this.setAttr("fillStyle",v),C._fillFunc(this))}_fill(C){const v=C.fill(),w=C.getFillPriority();if(v&&w==="color"){this._fillColor(C);return}const T=C.getFillPatternImage();if(T&&w==="pattern"){this._fillPattern(C);return}const R=C.getFillLinearGradientColorStops();if(R&&w==="linear-gradient"){this._fillLinearGradient(C);return}const L=C.getFillRadialGradientColorStops();if(L&&w==="radial-gradient"){this._fillRadialGradient(C);return}v?this._fillColor(C):T?this._fillPattern(C):R?this._fillLinearGradient(C):L&&this._fillRadialGradient(C)}_strokeLinearGradient(C){const v=C.getStrokeLinearGradientStartPoint(),w=C.getStrokeLinearGradientEndPoint(),T=C.getStrokeLinearGradientColorStops(),R=this.createLinearGradient(v.x,v.y,w.x,w.y);if(T){for(let L=0;L<T.length;L+=2)R.addColorStop(T[L],T[L+1]);this.setAttr("strokeStyle",R)}}_stroke(C){const v=C.dash(),w=C.getStrokeScaleEnabled();if(C.hasStroke()){if(!w){this.save();const T=this.getCanvas().getPixelRatio();this.setTransform(T,0,0,T,0,0)}this._applyLineCap(C),v&&C.dashEnabled()&&(this.setLineDash(v),this.setAttr("lineDashOffset",C.dashOffset())),this.setAttr("lineWidth",C.strokeWidth()),C.getShadowForStrokeEnabled()||this.setAttr("shadowColor","rgba(0,0,0,0)"),C.getStrokeLinearGradientColorStops()?this._strokeLinearGradient(C):this.setAttr("strokeStyle",C.stroke()),C._strokeFunc(this),w||this.restore()}}_applyShadow(C){var v,w,T;const R=(v=C.getShadowRGBA())!==null&&v!==void 0?v:"black",L=(w=C.getShadowBlur())!==null&&w!==void 0?w:5,j=(T=C.getShadowOffset())!==null&&T!==void 0?T:{x:0,y:0},I=C.getAbsoluteScale(),z=this.canvas.getPixelRatio(),k=I.x*z,F=I.y*z;this.setAttr("shadowColor",R),this.setAttr("shadowBlur",L*Math.min(Math.abs(k),Math.abs(F))),this.setAttr("shadowOffsetX",j.x*k),this.setAttr("shadowOffsetY",j.y*F)}};t.SceneContext=O;var A=class extends g{constructor(C){super(C),this._context=C._canvas.getContext("2d",{willReadFrequently:!0})}_fill(C){this.save(),this.setAttr("fillStyle",C.colorKey),C._fillFuncHit(this),this.restore()}strokeShape(C){C.hasHitStroke()&&this._stroke(C)}_stroke(C){if(C.hasHitStroke()){const v=C.getStrokeScaleEnabled();if(!v){this.save();const R=this.getCanvas().getPixelRatio();this.setTransform(R,0,0,R,0,0)}this._applyLineCap(C);const w=C.hitStrokeWidth(),T=w==="auto"?C.strokeWidth():w;this.setAttr("lineWidth",T),this.setAttr("strokeStyle",C.colorKey),C._strokeFuncHit(this),v||this.restore()}}};t.HitContext=A})),yc=De.__commonJSMin((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.HitCanvas=t.SceneCanvas=t.Canvas=void 0;var e=Wt(),n=N2(),r=dt(),o=ft(),l=pt(),s;function c(){if(s)return s;const E=e.Util.createCanvasElement(),S=E.getContext("2d");return s=(function(){return(r.Konva._global.devicePixelRatio||1)/(S.webkitBackingStorePixelRatio||S.mozBackingStorePixelRatio||S.msBackingStorePixelRatio||S.oBackingStorePixelRatio||S.backingStorePixelRatio||1)})(),e.Util.releaseCanvas(E),s}var f=class{constructor(E){this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;const S=(E||{}).pixelRatio||r.Konva.pixelRatio||c();this.pixelRatio=S,this._canvas=e.Util.createCanvasElement(),this._canvas.style.padding="0",this._canvas.style.margin="0",this._canvas.style.border="0",this._canvas.style.background="transparent",this._canvas.style.position="absolute",this._canvas.style.top="0",this._canvas.style.left="0"}getContext(){return this.context}getPixelRatio(){return this.pixelRatio}setPixelRatio(E){const S=this.pixelRatio;this.pixelRatio=E,this.setSize(this.getWidth()/S,this.getHeight()/S)}setWidth(E){this.width=this._canvas.width=E*this.pixelRatio,this._canvas.style.width=E+"px";const S=this.pixelRatio;this.getContext()._context.scale(S,S)}setHeight(E){this.height=this._canvas.height=E*this.pixelRatio,this._canvas.style.height=E+"px";const S=this.pixelRatio;this.getContext()._context.scale(S,S)}getWidth(){return this.width}getHeight(){return this.height}setSize(E,S){this.setWidth(E||0),this.setHeight(S||0)}toDataURL(E,S){try{return this._canvas.toDataURL(E,S)}catch{try{return this._canvas.toDataURL()}catch(b){return e.Util.error("Unable to get data URL. "+b.message+" For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html."),""}}}};t.Canvas=f,o.Factory.addGetterSetter(f,"pixelRatio",void 0,(0,l.getNumberValidator)());var p=class extends f{constructor(E={width:0,height:0,willReadFrequently:!1}){super(E),this.context=new n.SceneContext(this,{willReadFrequently:E.willReadFrequently}),this.setSize(E.width,E.height)}};t.SceneCanvas=p;var m=class extends f{constructor(E={width:0,height:0}){super(E),this.hitCanvas=!0,this.context=new n.HitContext(this),this.setSize(E.width,E.height)}};t.HitCanvas=m})),Qd=De.__commonJSMin((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DD=void 0;var e=dt(),n=Wt();t.DD={get isDragging(){let r=!1;return t.DD._dragElements.forEach(o=>{o.dragStatus==="dragging"&&(r=!0)}),r},justDragged:!1,get node(){let r;return t.DD._dragElements.forEach(o=>{r=o.node}),r},_dragElements:new Map,_drag(r){const o=[];t.DD._dragElements.forEach((l,s)=>{const{node:c}=l,f=c.getStage();f.setPointersPositions(r),l.pointerId===void 0&&(l.pointerId=n.Util._getFirstPointerId(r));const p=f._changedPointerPositions.find(m=>m.id===l.pointerId);if(p){if(l.dragStatus!=="dragging"){const m=c.dragDistance();if(Math.max(Math.abs(p.x-l.startPointerPos.x),Math.abs(p.y-l.startPointerPos.y))<m||(c.startDrag({evt:r}),!c.isDragging()))return}c._setDragPosition(r,l),o.push(c)}}),o.forEach(l=>{l.fire("dragmove",{type:"dragmove",target:l,evt:r},!0)})},_endDragBefore(r){const o=[];t.DD._dragElements.forEach(l=>{const{node:s}=l,c=s.getStage();if(r&&c.setPointersPositions(r),!c._changedPointerPositions.find(p=>p.id===l.pointerId))return;(l.dragStatus==="dragging"||l.dragStatus==="stopped")&&(t.DD.justDragged=!0,e.Konva._mouseListenClick=!1,e.Konva._touchListenClick=!1,e.Konva._pointerListenClick=!1,l.dragStatus="stopped");const f=l.node.getLayer()||l.node instanceof e.Konva.Stage&&l.node;f&&o.indexOf(f)===-1&&o.push(f)}),o.forEach(l=>{l.draw()})},_endDragAfter(r){t.DD._dragElements.forEach((o,l)=>{o.dragStatus==="stopped"&&o.node.fire("dragend",{type:"dragend",target:o.node,evt:r},!0),o.dragStatus!=="dragging"&&t.DD._dragElements.delete(l)})}},e.Konva.isBrowser&&(window.addEventListener("mouseup",t.DD._endDragBefore,!0),window.addEventListener("touchend",t.DD._endDragBefore,!0),window.addEventListener("touchcancel",t.DD._endDragBefore,!0),window.addEventListener("mousemove",t.DD._drag),window.addEventListener("touchmove",t.DD._drag),window.addEventListener("mouseup",t.DD._endDragAfter,!1),window.addEventListener("touchend",t.DD._endDragAfter,!1),window.addEventListener("touchcancel",t.DD._endDragAfter,!1))})),rn=De.__commonJSMin((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Node=void 0;var e=Wt(),n=ft(),r=yc(),o=dt(),l=Qd(),s=pt(),c="absoluteOpacity",f="allEventListeners",p="absoluteTransform",m="absoluteScale",E="canvas",S="Change",y="children",b="konva",g="listening",O="mouseenter",A="mouseleave",C="set",v="Shape",w=" ",T="stage",R="transform",L="Stage",j="visible",I=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(w),z=1,k=class w2{constructor(_){this._id=z++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(_),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(_){(_===R||_===p)&&this._cache.get(_)?this._cache.get(_).dirty=!0:_?this._cache.delete(_):this._cache.clear()}_getCache(_,D){let N=this._cache.get(_);return(N===void 0||(_===R||_===p)&&N.dirty===!0)&&(N=D.call(this),this._cache.set(_,N)),N}_calculate(_,D,N){if(!this._attachedDepsListeners.get(_)){const H=D.map(V=>V+"Change.konva").join(w);this.on(H,()=>{this._clearCache(_)}),this._attachedDepsListeners.set(_,!0)}return this._getCache(_,N)}_getCanvasCache(){return this._cache.get(E)}_clearSelfAndDescendantCache(_){this._clearCache(_),_===p&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(E)){const{scene:_,filter:D,hit:N}=this._cache.get(E);e.Util.releaseCanvas(_,D,N),this._cache.delete(E)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(_){const D=_||{};let N={};(D.x===void 0||D.y===void 0||D.width===void 0||D.height===void 0)&&(N=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()||void 0}));let H=Math.ceil(D.width||N.width),V=Math.ceil(D.height||N.height),W=D.pixelRatio,$=D.x===void 0?Math.floor(N.x):D.x,Q=D.y===void 0?Math.floor(N.y):D.y,ae=D.offset||0,Z=D.drawBorder||!1,oe=D.hitCanvasPixelRatio||1;if(!H||!V){e.Util.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}const re=Math.abs(Math.round(N.x)-$)>.5?1:0,X=Math.abs(Math.round(N.y)-Q)>.5?1:0;H+=ae*2+re,V+=ae*2+X,$-=ae,Q-=ae;const q=new r.SceneCanvas({pixelRatio:W,width:H,height:V}),se=new r.SceneCanvas({pixelRatio:W,width:0,height:0,willReadFrequently:!0}),he=new r.HitCanvas({pixelRatio:oe,width:H,height:V}),de=q.getContext(),pe=he.getContext();return he.isCache=!0,q.isCache=!0,this._cache.delete(E),this._filterUpToDate=!1,D.imageSmoothingEnabled===!1&&(q.getContext()._context.imageSmoothingEnabled=!1,se.getContext()._context.imageSmoothingEnabled=!1),de.save(),pe.save(),de.translate(-$,-Q),pe.translate(-$,-Q),this._isUnderCache=!0,this._clearSelfAndDescendantCache(c),this._clearSelfAndDescendantCache(m),this.drawScene(q,this),this.drawHit(he,this),this._isUnderCache=!1,de.restore(),pe.restore(),Z&&(de.save(),de.beginPath(),de.rect(0,0,H,V),de.closePath(),de.setAttr("strokeStyle","red"),de.setAttr("lineWidth",5),de.stroke(),de.restore()),this._cache.set(E,{scene:q,filter:se,hit:he,x:$,y:Q}),this._requestDraw(),this}isCached(){return this._cache.has(E)}getClientRect(_){throw new Error('abstract "getClientRect" method call')}_transformedRect(_,D){const N=[{x:_.x,y:_.y},{x:_.x+_.width,y:_.y},{x:_.x+_.width,y:_.y+_.height},{x:_.x,y:_.y+_.height}];let H=1/0,V=1/0,W=-1/0,$=-1/0;const Q=this.getAbsoluteTransform(D);return N.forEach(function(ae){const Z=Q.point(ae);H===void 0&&(H=W=Z.x,V=$=Z.y),H=Math.min(H,Z.x),V=Math.min(V,Z.y),W=Math.max(W,Z.x),$=Math.max($,Z.y)}),{x:H,y:V,width:W-H,height:$-V}}_drawCachedSceneCanvas(_){_.save(),_._applyOpacity(this),_._applyGlobalCompositeOperation(this);const D=this._getCanvasCache();_.translate(D.x,D.y);const N=this._getCachedSceneCanvas(),H=N.pixelRatio;_.drawImage(N._canvas,0,0,N.width/H,N.height/H),_.restore()}_drawCachedHitCanvas(_){const D=this._getCanvasCache(),N=D.hit;_.save(),_.translate(D.x,D.y),_.drawImage(N._canvas,0,0,N.width/N.pixelRatio,N.height/N.pixelRatio),_.restore()}_getCachedSceneCanvas(){let _=this.filters(),D=this._getCanvasCache(),N=D.scene,H=D.filter,V=H.getContext(),W,$,Q,ae;if(_){if(!this._filterUpToDate){const Z=N.pixelRatio;H.setSize(N.width/N.pixelRatio,N.height/N.pixelRatio);try{for(W=_.length,V.clear(),V.drawImage(N._canvas,0,0,N.getWidth()/Z,N.getHeight()/Z),$=V.getImageData(0,0,H.getWidth(),H.getHeight()),Q=0;Q<W;Q++){if(ae=_[Q],typeof ae!="function"){e.Util.error("Filter should be type of function, but got "+typeof ae+" instead. Please check correct filters");continue}ae.call(this,$),V.putImageData($,0,0)}}catch(oe){e.Util.error("Unable to apply filter. "+oe.message+" This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.")}this._filterUpToDate=!0}return H}return N}on(_,D){if(this._cache&&this._cache.delete(f),arguments.length===3)return this._delegate.apply(this,arguments);let N=_.split(w),H=N.length,V,W,$,Q,ae;for(V=0;V<H;V++)W=N[V],$=W.split("."),Q=$[0],ae=$[1]||"",this.eventListeners[Q]||(this.eventListeners[Q]=[]),this.eventListeners[Q].push({name:ae,handler:D});return this}off(_,D){let N=(_||"").split(w),H=N.length,V,W,$,Q,ae,Z;if(this._cache&&this._cache.delete(f),!_)for(W in this.eventListeners)this._off(W);for(V=0;V<H;V++)if($=N[V],Q=$.split("."),ae=Q[0],Z=Q[1],ae)this.eventListeners[ae]&&this._off(ae,Z,D);else for(W in this.eventListeners)this._off(W,Z,D);return this}dispatchEvent(_){const D={target:this,type:_.type,evt:_};return this.fire(_.type,D),this}addEventListener(_,D){return this.on(_,function(N){D.call(this,N.evt)}),this}removeEventListener(_){return this.off(_),this}_delegate(_,D,N){const H=this;this.on(_,function(V){const W=V.target.findAncestors(D,!0,H);for(let $=0;$<W.length;$++)V=e.Util.cloneObject(V),V.currentTarget=W[$],N.call(W[$],V)})}remove(){return this.isDragging()&&this.stopDrag(),l.DD._dragElements.delete(this._id),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(p),this._clearSelfAndDescendantCache(c),this._clearSelfAndDescendantCache(m),this._clearSelfAndDescendantCache(T),this._clearSelfAndDescendantCache(j),this._clearSelfAndDescendantCache(g)}_remove(){this._clearCaches();const _=this.getParent();_&&_.children&&(_.children.splice(this.index,1),_._setChildrenIndices(),this.parent=null)}destroy(){return this.remove(),this.clearCache(),this}getAttr(_){const D="get"+e.Util._capitalize(_);return e.Util._isFunction(this[D])?this[D]():this.attrs[_]}getAncestors(){let _=this.getParent(),D=[];for(;_;)D.push(_),_=_.getParent();return D}getAttrs(){return this.attrs||{}}setAttrs(_){return this._batchTransformChanges(()=>{let D,N;if(!_)return this;for(D in _)D!==y&&(N=C+e.Util._capitalize(D),e.Util._isFunction(this[N])?this[N](_[D]):this._setAttr(D,_[D]))}),this}isListening(){return this._getCache(g,this._isListening)}_isListening(_){if(!this.listening())return!1;const D=this.getParent();return D&&D!==_&&this!==_?D._isListening(_):!0}isVisible(){return this._getCache(j,this._isVisible)}_isVisible(_){if(!this.visible())return!1;const D=this.getParent();return D&&D!==_&&this!==_?D._isVisible(_):!0}shouldDrawHit(_,D=!1){if(_)return this._isVisible(_)&&this._isListening(_);const N=this.getLayer();let H=!1;l.DD._dragElements.forEach(W=>{W.dragStatus==="dragging"&&(W.node.nodeType==="Stage"||W.node.getLayer()===N)&&(H=!0)});const V=!D&&!o.Konva.hitOnDragEnabled&&(H||o.Konva.isTransforming());return this.isListening()&&this.isVisible()&&!V}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){let _=this.getDepth(),D=this,N=0,H,V,W,$;function Q(Z){for(H=[],V=Z.length,W=0;W<V;W++)$=Z[W],N++,$.nodeType!==v&&(H=H.concat($.getChildren().slice())),$._id===D._id&&(W=V);H.length>0&&H[0].getDepth()<=_&&Q(H)}const ae=this.getStage();return D.nodeType!==L&&ae&&Q(ae.getChildren()),N}getDepth(){let _=0,D=this.parent;for(;D;)_++,D=D.parent;return _}_batchTransformChanges(_){this._batchingTransformChange=!0,_(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(R),this._clearSelfAndDescendantCache(p)),this._needClearTransformCache=!1}setPosition(_){return this._batchTransformChanges(()=>{this.x(_.x),this.y(_.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){const _=this.getStage();if(!_)return null;const D=_.getPointerPosition();if(!D)return null;const N=this.getAbsoluteTransform().copy();return N.invert(),N.point(D)}getAbsolutePosition(_){let D=!1,N=this.parent;for(;N;){if(N.isCached()){D=!0;break}N=N.parent}D&&!_&&(_=!0);const H=this.getAbsoluteTransform(_).getMatrix(),V=new e.Transform,W=this.offset();return V.m=H.slice(),V.translate(W.x,W.y),V.getTranslation()}setAbsolutePosition(_){const{x:D,y:N,...H}=this._clearTransform();this.attrs.x=D,this.attrs.y=N,this._clearCache(R);const V=this._getAbsoluteTransform().copy();return V.invert(),V.translate(_.x,_.y),_={x:this.attrs.x+V.getTranslation().x,y:this.attrs.y+V.getTranslation().y},this._setTransform(H),this.setPosition({x:_.x,y:_.y}),this._clearCache(R),this._clearSelfAndDescendantCache(p),this}_setTransform(_){let D;for(D in _)this.attrs[D]=_[D]}_clearTransform(){const _={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,_}move(_){let D=_.x,N=_.y,H=this.x(),V=this.y();return D!==void 0&&(H+=D),N!==void 0&&(V+=N),this.setPosition({x:H,y:V}),this}_eachAncestorReverse(_,D){let N=[],H=this.getParent(),V,W;if(!(D&&D._id===this._id)){for(N.unshift(this);H&&(!D||H._id!==D._id);)N.unshift(H),H=H.parent;for(V=N.length,W=0;W<V;W++)_(N[W])}}rotate(_){return this.rotation(this.rotation()+_),this}moveToTop(){if(!this.parent)return e.Util.warn("Node has no parent. moveToTop function is ignored."),!1;const _=this.index;return _<this.parent.getChildren().length-1?(this.parent.children.splice(_,1),this.parent.children.push(this),this.parent._setChildrenIndices(),!0):!1}moveUp(){if(!this.parent)return e.Util.warn("Node has no parent. moveUp function is ignored."),!1;const _=this.index;return _<this.parent.getChildren().length-1?(this.parent.children.splice(_,1),this.parent.children.splice(_+1,0,this),this.parent._setChildrenIndices(),!0):!1}moveDown(){if(!this.parent)return e.Util.warn("Node has no parent. moveDown function is ignored."),!1;const _=this.index;return _>0?(this.parent.children.splice(_,1),this.parent.children.splice(_-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return e.Util.warn("Node has no parent. moveToBottom function is ignored."),!1;const _=this.index;return _>0?(this.parent.children.splice(_,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(_){if(!this.parent)return e.Util.warn("Node has no parent. zIndex parameter is ignored."),this;(_<0||_>=this.parent.children.length)&&e.Util.warn("Unexpected value "+_+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");const D=this.index;return this.parent.children.splice(D,1),this.parent.children.splice(_,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(c,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){let _=this.opacity();const D=this.getParent();return D&&!D._isUnderCache&&(_*=D.getAbsoluteOpacity()),_}moveTo(_){return this.getParent()!==_&&(this._remove(),_.add(this)),this}toObject(){let _=this.getAttrs(),D,N,H,V,W;const $={attrs:{},className:this.getClassName()};for(D in _)N=_[D],W=e.Util.isObject(N)&&!e.Util._isPlainObject(N)&&!e.Util._isArray(N),!W&&(H=typeof this[D]=="function"&&this[D],delete _[D],V=H?H.call(this):null,_[D]=N,V!==N&&($.attrs[D]=N));return e.Util._prepareToStringify($)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(_,D,N){const H=[];D&&this._isMatch(_)&&H.push(this);let V=this.parent;for(;V;){if(V===N)return H;V._isMatch(_)&&H.push(V),V=V.parent}return H}isAncestorOf(_){return!1}findAncestor(_,D,N){return this.findAncestors(_,D,N)[0]}_isMatch(_){if(!_)return!1;if(typeof _=="function")return _(this);let D=_.replace(/ /g,"").split(","),N=D.length,H,V;for(H=0;H<N;H++)if(V=D[H],e.Util.isValidSelector(V)||(e.Util.warn('Selector "'+V+'" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".'),e.Util.warn('If you have a custom shape with such className, please change it to start with upper letter like "Triangle".'),e.Util.warn("Konva is awesome, right?")),V.charAt(0)==="#"){if(this.id()===V.slice(1))return!0}else if(V.charAt(0)==="."){if(this.hasName(V.slice(1)))return!0}else if(this.className===V||this.nodeType===V)return!0;return!1}getLayer(){const _=this.getParent();return _?_.getLayer():null}getStage(){return this._getCache(T,this._getStage)}_getStage(){const _=this.getParent();return _?_.getStage():null}fire(_,D={},N){return D.target=D.target||this,N?this._fireAndBubble(_,D):this._fire(_,D),this}getAbsoluteTransform(_){return _?this._getAbsoluteTransform(_):this._getCache(p,this._getAbsoluteTransform)}_getAbsoluteTransform(_){let D;if(_)return D=new e.Transform,this._eachAncestorReverse(function(N){const H=N.transformsEnabled();H==="all"?D.multiply(N.getTransform()):H==="position"&&D.translate(N.x()-N.offsetX(),N.y()-N.offsetY())},_),D;{D=this._cache.get(p)||new e.Transform,this.parent?this.parent.getAbsoluteTransform().copyInto(D):D.reset();const N=this.transformsEnabled();if(N==="all")D.multiply(this.getTransform());else if(N==="position"){const H=this.attrs.x||0,V=this.attrs.y||0,W=this.attrs.offsetX||0,$=this.attrs.offsetY||0;D.translate(H-W,V-$)}return D.dirty=!1,D}}getAbsoluteScale(_){let D=this;for(;D;)D._isUnderCache&&(_=D),D=D.getParent();const N=this.getAbsoluteTransform(_).decompose();return{x:N.scaleX,y:N.scaleY}}getAbsoluteRotation(){return this.getAbsoluteTransform().decompose().rotation}getTransform(){return this._getCache(R,this._getTransform)}_getTransform(){var _,D;const N=this._cache.get(R)||new e.Transform;N.reset();const H=this.x(),V=this.y(),W=o.Konva.getAngle(this.rotation()),$=(_=this.attrs.scaleX)!==null&&_!==void 0?_:1,Q=(D=this.attrs.scaleY)!==null&&D!==void 0?D:1,ae=this.attrs.skewX||0,Z=this.attrs.skewY||0,oe=this.attrs.offsetX||0,re=this.attrs.offsetY||0;return(H!==0||V!==0)&&N.translate(H,V),W!==0&&N.rotate(W),(ae!==0||Z!==0)&&N.skew(ae,Z),($!==1||Q!==1)&&N.scale($,Q),(oe!==0||re!==0)&&N.translate(-1*oe,-1*re),N.dirty=!1,N}clone(_){let D=e.Util.cloneObject(this.attrs),N,H,V,W,$;for(N in _)D[N]=_[N];const Q=new this.constructor(D);for(N in this.eventListeners)for(H=this.eventListeners[N],V=H.length,W=0;W<V;W++)$=H[W],$.name.indexOf(b)<0&&(Q.eventListeners[N]||(Q.eventListeners[N]=[]),Q.eventListeners[N].push($));return Q}_toKonvaCanvas(_){_=_||{};const D=this.getClientRect(),N=this.getStage(),H=_.x!==void 0?_.x:Math.floor(D.x),V=_.y!==void 0?_.y:Math.floor(D.y),W=_.pixelRatio||1,$=new r.SceneCanvas({width:_.width||Math.ceil(D.width)||(N?N.width():0),height:_.height||Math.ceil(D.height)||(N?N.height():0),pixelRatio:W}),Q=$.getContext(),ae=new r.SceneCanvas({width:$.width/$.pixelRatio+Math.abs(H),height:$.height/$.pixelRatio+Math.abs(V),pixelRatio:$.pixelRatio});return _.imageSmoothingEnabled===!1&&(Q._context.imageSmoothingEnabled=!1),Q.save(),(H||V)&&Q.translate(-1*H,-1*V),this.drawScene($,void 0,ae),Q.restore(),$}toCanvas(_){return this._toKonvaCanvas(_)._canvas}toDataURL(_){_=_||{};const D=_.mimeType||null,N=_.quality||null,H=this._toKonvaCanvas(_).toDataURL(D,N);return _.callback&&_.callback(H),H}toImage(_){return new Promise((D,N)=>{try{const H=_?.callback;H&&delete _.callback,e.Util._urlToImage(this.toDataURL(_),function(V){D(V),H?.(V)})}catch(H){N(H)}})}toBlob(_){return new Promise((D,N)=>{try{const H=_?.callback;H&&delete _.callback,this.toCanvas(_).toBlob(V=>{D(V),H?.(V)},_?.mimeType,_?.quality)}catch(H){N(H)}})}setSize(_){return this.width(_.width),this.height(_.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():o.Konva.dragDistance}_off(_,D,N){let H=this.eventListeners[_],V,W,$;for(V=0;V<H.length;V++)if(W=H[V].name,$=H[V].handler,(W!=="konva"||D==="konva")&&(!D||W===D)&&(!N||N===$)){if(H.splice(V,1),H.length===0){delete this.eventListeners[_];break}V--}}_fireChangeEvent(_,D,N){this._fire(_+S,{oldVal:D,newVal:N})}addName(_){if(!this.hasName(_)){const D=this.name(),N=D?D+" "+_:_;this.name(N)}return this}hasName(_){if(!_)return!1;const D=this.name();return D?(D||"").split(/\s/g).indexOf(_)!==-1:!1}removeName(_){const D=(this.name()||"").split(/\s/g),N=D.indexOf(_);return N!==-1&&(D.splice(N,1),this.name(D.join(" "))),this}setAttr(_,D){const N=this[C+e.Util._capitalize(_)];return e.Util._isFunction(N)?N.call(this,D):this._setAttr(_,D),this}_requestDraw(){if(o.Konva.autoDrawEnabled){const _=this.getLayer()||this.getStage();_?.batchDraw()}}_setAttr(_,D){const N=this.attrs[_];N===D&&!e.Util.isObject(D)||(D==null?delete this.attrs[_]:this.attrs[_]=D,this._shouldFireChangeEvents&&this._fireChangeEvent(_,N,D),this._requestDraw())}_setComponentAttr(_,D,N){let H;N!==void 0&&(H=this.attrs[_],H||(this.attrs[_]=this.getAttr(_)),this.attrs[_][D]=N,this._fireChangeEvent(_,H,N))}_fireAndBubble(_,D,N){if(D&&this.nodeType===v&&(D.target=this),!((_===O||_===A)&&(N&&(this===N||this.isAncestorOf&&this.isAncestorOf(N))||this.nodeType==="Stage"&&!N))){this._fire(_,D);const H=(_===O||_===A)&&N&&N.isAncestorOf&&N.isAncestorOf(this)&&!N.isAncestorOf(this.parent);(D&&!D.cancelBubble||!D)&&this.parent&&this.parent.isListening()&&!H&&(N&&N.parent?this._fireAndBubble.call(this.parent,_,D,N):this._fireAndBubble.call(this.parent,_,D))}}_getProtoListeners(_){var D,N,H;const V=(D=this._cache.get(f))!==null&&D!==void 0?D:{};let W=V?.[_];if(W===void 0){W=[];let $=Object.getPrototypeOf(this);for(;$;){const Q=(H=(N=$.eventListeners)===null||N===void 0?void 0:N[_])!==null&&H!==void 0?H:[];W.push(...Q),$=Object.getPrototypeOf($)}V[_]=W,this._cache.set(f,V)}return W}_fire(_,D){D=D||{},D.currentTarget=this,D.type=_;const N=this._getProtoListeners(_);if(N)for(var H=0;H<N.length;H++)N[H].handler.call(this,D);const V=this.eventListeners[_];if(V)for(var H=0;H<V.length;H++)V[H].handler.call(this,D)}draw(){return this.drawScene(),this.drawHit(),this}_createDragElement(_){const D=_?_.pointerId:void 0,N=this.getStage(),H=this.getAbsolutePosition();if(!N)return;const V=N._getPointerById(D)||N._changedPointerPositions[0]||H;l.DD._dragElements.set(this._id,{node:this,startPointerPos:V,offset:{x:V.x-H.x,y:V.y-H.y},dragStatus:"ready",pointerId:D})}startDrag(_,D=!0){l.DD._dragElements.has(this._id)||this._createDragElement(_);const N=l.DD._dragElements.get(this._id);N.dragStatus="dragging",this.fire("dragstart",{type:"dragstart",target:this,evt:_&&_.evt},D)}_setDragPosition(_,D){const N=this.getStage()._getPointerById(D.pointerId);if(!N)return;let H={x:N.x-D.offset.x,y:N.y-D.offset.y};const V=this.dragBoundFunc();if(V!==void 0){const W=V.call(this,H,_);W?H=W:e.Util.warn("dragBoundFunc did not return any value. That is unexpected behavior. You must return new absolute position from dragBoundFunc.")}(!this._lastPos||this._lastPos.x!==H.x||this._lastPos.y!==H.y)&&(this.setAbsolutePosition(H),this._requestDraw()),this._lastPos=H}stopDrag(_){const D=l.DD._dragElements.get(this._id);D&&(D.dragStatus="stopped"),l.DD._endDragBefore(_),l.DD._endDragAfter(_)}setDraggable(_){this._setAttr("draggable",_),this._dragChange()}isDragging(){const _=l.DD._dragElements.get(this._id);return _?_.dragStatus==="dragging":!1}_listenDrag(){this._dragCleanup(),this.on("mousedown.konva touchstart.konva",function(_){if(!(_.evt.button===void 0||o.Konva.dragButtons.indexOf(_.evt.button)>=0)||this.isDragging())return;let D=!1;l.DD._dragElements.forEach(N=>{this.isAncestorOf(N.node)&&(D=!0)}),D||this._createDragElement(_)})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{if(this._dragCleanup(),!this.getStage())return;const _=l.DD._dragElements.get(this._id),D=_&&_.dragStatus==="dragging",N=_&&_.dragStatus==="ready";D?this.stopDrag():N&&l.DD._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(_={x:0,y:0}){const D=this.getStage();if(!D)return!1;const N={x:-_.x,y:-_.y,width:D.width()+2*_.x,height:D.height()+2*_.y};return e.Util.haveIntersection(N,this.getClientRect())}static create(_,D){return e.Util._isString(_)&&(_=JSON.parse(_)),this._createNode(_,D)}static _createNode(_,D){let N=w2.prototype.getClassName.call(_),H=_.children,V,W,$;D&&(_.attrs.container=D),o.Konva[N]||(e.Util.warn('Can not find a node with class name "'+N+'". Fallback to "Shape".'),N="Shape");const Q=o.Konva[N];if(V=new Q(_.attrs),H)for(W=H.length,$=0;$<W;$++)V.add(w2._createNode(H[$]));return V}};t.Node=k,k.prototype.nodeType="Node",k.prototype._attrsAffectingSize=[],k.prototype.eventListeners={},k.prototype.on.call(k.prototype,I,function(){if(this._batchingTransformChange){this._needClearTransformCache=!0;return}this._clearCache(R),this._clearSelfAndDescendantCache(p)}),k.prototype.on.call(k.prototype,"visibleChange.konva",function(){this._clearSelfAndDescendantCache(j)}),k.prototype.on.call(k.prototype,"listeningChange.konva",function(){this._clearSelfAndDescendantCache(g)}),k.prototype.on.call(k.prototype,"opacityChange.konva",function(){this._clearSelfAndDescendantCache(c)});var F=n.Factory.addGetterSetter;F(k,"zIndex"),F(k,"absolutePosition"),F(k,"position"),F(k,"x",0,(0,s.getNumberValidator)()),F(k,"y",0,(0,s.getNumberValidator)()),F(k,"globalCompositeOperation","source-over",(0,s.getStringValidator)()),F(k,"opacity",1,(0,s.getNumberValidator)()),F(k,"name","",(0,s.getStringValidator)()),F(k,"id","",(0,s.getStringValidator)()),F(k,"rotation",0,(0,s.getNumberValidator)()),n.Factory.addComponentsGetterSetter(k,"scale",["x","y"]),F(k,"scaleX",1,(0,s.getNumberValidator)()),F(k,"scaleY",1,(0,s.getNumberValidator)()),n.Factory.addComponentsGetterSetter(k,"skew",["x","y"]),F(k,"skewX",0,(0,s.getNumberValidator)()),F(k,"skewY",0,(0,s.getNumberValidator)()),n.Factory.addComponentsGetterSetter(k,"offset",["x","y"]),F(k,"offsetX",0,(0,s.getNumberValidator)()),F(k,"offsetY",0,(0,s.getNumberValidator)()),F(k,"dragDistance",void 0,(0,s.getNumberValidator)()),F(k,"width",0,(0,s.getNumberValidator)()),F(k,"height",0,(0,s.getNumberValidator)()),F(k,"listening",!0,(0,s.getBooleanValidator)()),F(k,"preventDefault",!0,(0,s.getBooleanValidator)()),F(k,"filters",void 0,function(G){return this._filterUpToDate=!1,G}),F(k,"visible",!0,(0,s.getBooleanValidator)()),F(k,"transformsEnabled","all",(0,s.getStringValidator)()),F(k,"size"),F(k,"dragBoundFunc"),F(k,"draggable",!1,(0,s.getBooleanValidator)()),n.Factory.backCompat(k,{rotateDeg:"rotate",setRotationDeg:"setRotation",getRotationDeg:"getRotation"})})),bc=De.__commonJSMin((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Container=void 0;var e=ft(),n=rn(),r=pt(),o=class extends n.Node{constructor(){super(...arguments),this.children=[]}getChildren(l){if(!l)return this.children||[];const s=this.children||[],c=[];return s.forEach(function(f){l(f)&&c.push(f)}),c}hasChildren(){return this.getChildren().length>0}removeChildren(){return this.getChildren().forEach(l=>{l.parent=null,l.index=0,l.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(l=>{l.parent=null,l.index=0,l.destroy()}),this.children=[],this._requestDraw(),this}add(...l){if(l.length===0)return this;if(l.length>1){for(let c=0;c<l.length;c++)this.add(l[c]);return this}const s=l[0];return s.getParent()?(s.moveTo(this),this):(this._validateAdd(s),s.index=this.getChildren().length,s.parent=this,s._clearCaches(),this.getChildren().push(s),this._fire("add",{child:s}),this._requestDraw(),this)}destroy(){return this.hasChildren()&&this.destroyChildren(),super.destroy(),this}find(l){return this._generalFind(l,!1)}findOne(l){const s=this._generalFind(l,!0);return s.length>0?s[0]:void 0}_generalFind(l,s){const c=[];return this._descendants(f=>{const p=f._isMatch(l);return p&&c.push(f),!!(p&&s)}),c}_descendants(l){let s=!1;const c=this.getChildren();for(const f of c){if(s=l(f),s)return!0;if(f.hasChildren()&&(s=f._descendants(l),s))return!0}return!1}toObject(){const l=n.Node.prototype.toObject.call(this);return l.children=[],this.getChildren().forEach(s=>{l.children.push(s.toObject())}),l}isAncestorOf(l){let s=l.getParent();for(;s;){if(s._id===this._id)return!0;s=s.getParent()}return!1}clone(l){const s=n.Node.prototype.clone.call(this,l);return this.getChildren().forEach(function(c){s.add(c.clone())}),s}getAllIntersections(l){const s=[];return this.find("Shape").forEach(c=>{c.isVisible()&&c.intersects(l)&&s.push(c)}),s}_clearSelfAndDescendantCache(l){var s;super._clearSelfAndDescendantCache(l),!this.isCached()&&((s=this.children)===null||s===void 0||s.forEach(function(c){c._clearSelfAndDescendantCache(l)}))}_setChildrenIndices(){var l;(l=this.children)===null||l===void 0||l.forEach(function(s,c){s.index=c}),this._requestDraw()}drawScene(l,s,c){const f=this.getLayer(),p=l||f&&f.getCanvas(),m=p&&p.getContext(),E=this._getCanvasCache(),S=E&&E.scene,y=p&&p.isCache;if(!this.isVisible()&&!y)return this;if(S){m.save();const b=this.getAbsoluteTransform(s).getMatrix();m.transform(b[0],b[1],b[2],b[3],b[4],b[5]),this._drawCachedSceneCanvas(m),m.restore()}else this._drawChildren("drawScene",p,s,c);return this}drawHit(l,s){if(!this.shouldDrawHit(s))return this;const c=this.getLayer(),f=l||c&&c.hitCanvas,p=f&&f.getContext(),m=this._getCanvasCache();if(m&&m.hit){p.save();const E=this.getAbsoluteTransform(s).getMatrix();p.transform(E[0],E[1],E[2],E[3],E[4],E[5]),this._drawCachedHitCanvas(p),p.restore()}else this._drawChildren("drawHit",f,s);return this}_drawChildren(l,s,c,f){var p;const m=s&&s.getContext(),E=this.clipWidth(),S=this.clipHeight(),y=this.clipFunc(),b=typeof E=="number"&&typeof S=="number"||y,g=c===this;if(b){m.save();const A=this.getAbsoluteTransform(c);let C=A.getMatrix();m.transform(C[0],C[1],C[2],C[3],C[4],C[5]),m.beginPath();let v;if(y)v=y.call(this,m,this);else{const w=this.clipX(),T=this.clipY();m.rect(w||0,T||0,E,S)}m.clip.apply(m,v),C=A.copy().invert().getMatrix(),m.transform(C[0],C[1],C[2],C[3],C[4],C[5])}const O=!g&&this.globalCompositeOperation()!=="source-over"&&l==="drawScene";O&&(m.save(),m._applyGlobalCompositeOperation(this)),(p=this.children)===null||p===void 0||p.forEach(function(A){A[l](s,c,f)}),O&&m.restore(),b&&m.restore()}getClientRect(l={}){var s;const c=l.skipTransform,f=l.relativeTo;let p,m,E,S,y={x:1/0,y:1/0,width:0,height:0};const b=this;(s=this.children)===null||s===void 0||s.forEach(function(A){if(!A.visible())return;const C=A.getClientRect({relativeTo:b,skipShadow:l.skipShadow,skipStroke:l.skipStroke});C.width===0&&C.height===0||(p===void 0?(p=C.x,m=C.y,E=C.x+C.width,S=C.y+C.height):(p=Math.min(p,C.x),m=Math.min(m,C.y),E=Math.max(E,C.x+C.width),S=Math.max(S,C.y+C.height)))});const g=this.find("Shape");let O=!1;for(let A=0;A<g.length;A++)if(g[A]._isVisible(this)){O=!0;break}return O&&p!==void 0?y={x:p,y:m,width:E-p,height:S-m}:y={x:0,y:0,width:0,height:0},c?y:this._transformedRect(y,f)}};t.Container=o,e.Factory.addComponentsGetterSetter(o,"clip",["x","y","width","height"]),e.Factory.addGetterSetter(o,"clipX",void 0,(0,r.getNumberValidator)()),e.Factory.addGetterSetter(o,"clipY",void 0,(0,r.getNumberValidator)()),e.Factory.addGetterSetter(o,"clipWidth",void 0,(0,r.getNumberValidator)()),e.Factory.addGetterSetter(o,"clipHeight",void 0,(0,r.getNumberValidator)()),e.Factory.addGetterSetter(o,"clipFunc")})),P2=De.__commonJSMin((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getCapturedShape=o,t.createEvent=l,t.hasPointerCapture=s,t.setPointerCapture=c,t.releaseCapture=f;var e=dt(),n=new Map,r=e.Konva._global.PointerEvent!==void 0;function o(p){return n.get(p)}function l(p){return{evt:p,pointerId:p.pointerId}}function s(p,m){return n.get(p)===m}function c(p,m){f(p),m.getStage()&&(n.set(p,m),r&&m._fire("gotpointercapture",l(new PointerEvent("gotpointercapture"))))}function f(p,m){const E=n.get(p);if(!E)return;const S=E.getStage();S&&S.content,n.delete(p),r&&E._fire("lostpointercapture",l(new PointerEvent("lostpointercapture")))}})),g8=De.__commonJSMin((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Stage=t.stages=void 0;var e=Wt(),n=ft(),r=bc(),o=dt(),l=yc(),s=Qd(),c=dt(),f=P2(),p="Stage",m="string",E="px",S="mouseout",y="mouseleave",b="mouseover",g="mouseenter",O="mousemove",A="mousedown",C="mouseup",v="pointermove",w="pointerdown",T="pointerup",R="pointercancel",L="lostpointercapture",j="pointerout",I="pointerleave",z="pointerover",k="pointerenter",F="contextmenu",G="touchstart",_="touchend",D="touchmove",N="touchcancel",H="wheel",V=5,W=[[g,"_pointerenter"],[A,"_pointerdown"],[O,"_pointermove"],[C,"_pointerup"],[y,"_pointerleave"],[G,"_pointerdown"],[D,"_pointermove"],[_,"_pointerup"],[N,"_pointercancel"],[b,"_pointerover"],[H,"_wheel"],[F,"_contextmenu"],[w,"_pointerdown"],[v,"_pointermove"],[T,"_pointerup"],[R,"_pointercancel"],[L,"_lostpointercapture"]],$={mouse:{[j]:S,[I]:y,[z]:b,[k]:g,[v]:O,[w]:A,[T]:C,[R]:"mousecancel",pointerclick:"click",pointerdblclick:"dblclick"},touch:{[j]:"touchout",[I]:"touchleave",[z]:"touchover",[k]:"touchenter",[v]:D,[w]:G,[T]:_,[R]:N,pointerclick:"tap",pointerdblclick:"dbltap"},pointer:{[j]:j,[I]:I,[z]:z,[k]:k,[v]:v,[w]:w,[T]:T,[R]:R,pointerclick:"pointerclick",pointerdblclick:"pointerdblclick"}},Q=X=>X.indexOf("pointer")>=0?"pointer":X.indexOf("touch")>=0?"touch":"mouse",ae=X=>{const q=Q(X);if(q==="pointer")return o.Konva.pointerEventsEnabled&&$.pointer;if(q==="touch")return $.touch;if(q==="mouse")return $.mouse};function Z(X={}){return(X.clipFunc||X.clipWidth||X.clipHeight)&&e.Util.warn("Stage does not support clipping. Please use clip for Layers or Groups."),X}var oe="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);";t.stages=[];var re=class extends r.Container{constructor(X){super(Z(X)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),t.stages.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{Z(this.attrs)}),this._checkVisibility()}_validateAdd(X){const q=X.getType()==="Layer",se=X.getType()==="FastLayer";q||se||e.Util.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const X=this.visible()?"":"none";this.content.style.display=X}setContainer(X){if(typeof X===m){if(X.charAt(0)==="."){const se=X.slice(1);X=document.getElementsByClassName(se)[0]}else{var q;X.charAt(0)!=="#"?q=X:q=X.slice(1),X=document.getElementById(q)}if(!X)throw"Can not find container in document with id "+q}return this._setAttr("container",X),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),X.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){const X=this.children,q=X.length;for(let se=0;se<q;se++)X[se].clear();return this}clone(X){return X||(X={}),X.container=typeof document<"u"&&document.createElement("div"),r.Container.prototype.clone.call(this,X)}destroy(){super.destroy();const X=this.content;X&&e.Util._isInDocument(X)&&this.container().removeChild(X);const q=t.stages.indexOf(this);return q>-1&&t.stages.splice(q,1),e.Util.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const X=this._pointerPositions[0]||this._changedPointerPositions[0];return X?{x:X.x,y:X.y}:(e.Util.warn(oe),null)}_getPointerById(X){return this._pointerPositions.find(q=>q.id===X)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(X){X=X||{},X.x=X.x||0,X.y=X.y||0,X.width=X.width||this.width(),X.height=X.height||this.height();const q=new l.SceneCanvas({width:X.width,height:X.height,pixelRatio:X.pixelRatio||1}),se=q.getContext()._context,he=this.children;return(X.x||X.y)&&se.translate(-1*X.x,-1*X.y),he.forEach(function(de){if(!de.isVisible())return;const pe=de._toKonvaCanvas(X);se.drawImage(pe._canvas,X.x,X.y,pe.getWidth()/pe.getPixelRatio(),pe.getHeight()/pe.getPixelRatio())}),q}getIntersection(X){if(!X)return null;const q=this.children,se=q.length-1;for(let he=se;he>=0;he--){const de=q[he].getIntersection(X);if(de)return de}return null}_resizeDOM(){const X=this.width(),q=this.height();this.content&&(this.content.style.width=X+E,this.content.style.height=q+E),this.bufferCanvas.setSize(X,q),this.bufferHitCanvas.setSize(X,q),this.children.forEach(se=>{se.setSize({width:X,height:q}),se.draw()})}add(X,...q){if(arguments.length>1){for(let he=0;he<arguments.length;he++)this.add(arguments[he]);return this}super.add(X);const se=this.children.length;return se>V&&e.Util.warn("The stage has "+se+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),X.setSize({width:this.width(),height:this.height()}),X.draw(),o.Konva.isBrowser&&this.content.appendChild(X.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(X){return f.hasPointerCapture(X,this)}setPointerCapture(X){f.setPointerCapture(X,this)}releaseCapture(X){f.releaseCapture(X,this)}getLayers(){return this.children}_bindContentEvents(){o.Konva.isBrowser&&W.forEach(([X,q])=>{this.content.addEventListener(X,se=>{this[q](se)},{passive:!1})})}_pointerenter(X){this.setPointersPositions(X);const q=ae(X.type);q&&this._fire(q.pointerenter,{evt:X,target:this,currentTarget:this})}_pointerover(X){this.setPointersPositions(X);const q=ae(X.type);q&&this._fire(q.pointerover,{evt:X,target:this,currentTarget:this})}_getTargetShape(X){let q=this[X+"targetShape"];return q&&!q.getStage()&&(q=null),q}_pointerleave(X){const q=ae(X.type),se=Q(X.type);if(!q)return;this.setPointersPositions(X);const he=this._getTargetShape(se),de=!(o.Konva.isDragging()||o.Konva.isTransforming())||o.Konva.hitOnDragEnabled;he&&de?(he._fireAndBubble(q.pointerout,{evt:X}),he._fireAndBubble(q.pointerleave,{evt:X}),this._fire(q.pointerleave,{evt:X,target:this,currentTarget:this}),this[se+"targetShape"]=null):de&&(this._fire(q.pointerleave,{evt:X,target:this,currentTarget:this}),this._fire(q.pointerout,{evt:X,target:this,currentTarget:this})),this.pointerPos=null,this._pointerPositions=[]}_pointerdown(X){const q=ae(X.type),se=Q(X.type);if(!q)return;this.setPointersPositions(X);let he=!1;this._changedPointerPositions.forEach(de=>{const pe=this.getIntersection(de);if(s.DD.justDragged=!1,o.Konva["_"+se+"ListenClick"]=!0,!pe||!pe.isListening()){this[se+"ClickStartShape"]=void 0;return}o.Konva.capturePointerEventsEnabled&&pe.setPointerCapture(de.id),this[se+"ClickStartShape"]=pe,pe._fireAndBubble(q.pointerdown,{evt:X,pointerId:de.id}),he=!0;const xe=X.type.indexOf("touch")>=0;pe.preventDefault()&&X.cancelable&&xe&&X.preventDefault()}),he||this._fire(q.pointerdown,{evt:X,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}_pointermove(X){const q=ae(X.type),se=Q(X.type);if(!q||(o.Konva.isDragging()&&s.DD.node.preventDefault()&&X.cancelable&&X.preventDefault(),this.setPointersPositions(X),!(!(o.Konva.isDragging()||o.Konva.isTransforming())||o.Konva.hitOnDragEnabled)))return;const he={};let de=!1;const pe=this._getTargetShape(se);this._changedPointerPositions.forEach(xe=>{const Ee=f.getCapturedShape(xe.id)||this.getIntersection(xe),Ne=xe.id,Xe={evt:X,pointerId:Ne},Ge=pe!==Ee;if(Ge&&pe&&(pe._fireAndBubble(q.pointerout,{...Xe},Ee),pe._fireAndBubble(q.pointerleave,{...Xe},Ee)),Ee){if(he[Ee._id])return;he[Ee._id]=!0}Ee&&Ee.isListening()?(de=!0,Ge&&(Ee._fireAndBubble(q.pointerover,{...Xe},pe),Ee._fireAndBubble(q.pointerenter,{...Xe},pe),this[se+"targetShape"]=Ee),Ee._fireAndBubble(q.pointermove,{...Xe})):pe&&(this._fire(q.pointerover,{evt:X,target:this,currentTarget:this,pointerId:Ne}),this[se+"targetShape"]=null)}),de||this._fire(q.pointermove,{evt:X,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(X){const q=ae(X.type),se=Q(X.type);if(!q)return;this.setPointersPositions(X);const he=this[se+"ClickStartShape"],de=this[se+"ClickEndShape"],pe={};let xe=!1;this._changedPointerPositions.forEach(Ee=>{const Ne=f.getCapturedShape(Ee.id)||this.getIntersection(Ee);if(Ne){if(Ne.releaseCapture(Ee.id),pe[Ne._id])return;pe[Ne._id]=!0}const Xe=Ee.id,Ge={evt:X,pointerId:Xe};let Le=!1;o.Konva["_"+se+"InDblClickWindow"]?(Le=!0,clearTimeout(this[se+"DblTimeout"])):s.DD.justDragged||(o.Konva["_"+se+"InDblClickWindow"]=!0,clearTimeout(this[se+"DblTimeout"])),this[se+"DblTimeout"]=setTimeout(function(){o.Konva["_"+se+"InDblClickWindow"]=!1},o.Konva.dblClickWindow),Ne&&Ne.isListening()?(xe=!0,this[se+"ClickEndShape"]=Ne,Ne._fireAndBubble(q.pointerup,{...Ge}),o.Konva["_"+se+"ListenClick"]&&he&&he===Ne&&(Ne._fireAndBubble(q.pointerclick,{...Ge}),Le&&de&&de===Ne&&Ne._fireAndBubble(q.pointerdblclick,{...Ge}))):(this[se+"ClickEndShape"]=null,o.Konva["_"+se+"ListenClick"]&&this._fire(q.pointerclick,{evt:X,target:this,currentTarget:this,pointerId:Xe}),Le&&this._fire(q.pointerdblclick,{evt:X,target:this,currentTarget:this,pointerId:Xe}))}),xe||this._fire(q.pointerup,{evt:X,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),o.Konva["_"+se+"ListenClick"]=!1,X.cancelable&&se!=="touch"&&se!=="pointer"&&X.preventDefault()}_contextmenu(X){this.setPointersPositions(X);const q=this.getIntersection(this.getPointerPosition());q&&q.isListening()?q._fireAndBubble(F,{evt:X}):this._fire(F,{evt:X,target:this,currentTarget:this})}_wheel(X){this.setPointersPositions(X);const q=this.getIntersection(this.getPointerPosition());q&&q.isListening()?q._fireAndBubble(H,{evt:X}):this._fire(H,{evt:X,target:this,currentTarget:this})}_pointercancel(X){this.setPointersPositions(X);const q=f.getCapturedShape(X.pointerId)||this.getIntersection(this.getPointerPosition());q&&q._fireAndBubble(T,f.createEvent(X)),f.releaseCapture(X.pointerId)}_lostpointercapture(X){f.releaseCapture(X.pointerId)}setPointersPositions(X){const q=this._getContentPosition();let se=null,he=null;X=X||window.event,X.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(X.touches,de=>{this._pointerPositions.push({id:de.identifier,x:(de.clientX-q.left)/q.scaleX,y:(de.clientY-q.top)/q.scaleY})}),Array.prototype.forEach.call(X.changedTouches||X.touches,de=>{this._changedPointerPositions.push({id:de.identifier,x:(de.clientX-q.left)/q.scaleX,y:(de.clientY-q.top)/q.scaleY})})):(se=(X.clientX-q.left)/q.scaleX,he=(X.clientY-q.top)/q.scaleY,this.pointerPos={x:se,y:he},this._pointerPositions=[{x:se,y:he,id:e.Util._getFirstPointerId(X)}],this._changedPointerPositions=[{x:se,y:he,id:e.Util._getFirstPointerId(X)}])}_setPointerPosition(X){e.Util.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(X)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};const X=this.content.getBoundingClientRect();return{top:X.top,left:X.left,scaleX:X.width/this.content.clientWidth||1,scaleY:X.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new l.SceneCanvas({width:this.width(),height:this.height()}),this.bufferHitCanvas=new l.HitCanvas({pixelRatio:1,width:this.width(),height:this.height()}),!o.Konva.isBrowser)return;const X=this.container();if(!X)throw"Stage has no container. A container is required.";X.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),X.appendChild(this.content),this._resizeDOM()}cache(){return e.Util.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(X){X.batchDraw()}),this}};t.Stage=re,re.prototype.nodeType=p,(0,c._registerNode)(re),n.Factory.addGetterSetter(re,"container"),o.Konva.isBrowser&&document.addEventListener("visibilitychange",()=>{t.stages.forEach(X=>{X.batchDraw()})})})),yn=De.__commonJSMin((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Shape=t.shapes=void 0;var e=dt(),n=Wt(),r=ft(),o=rn(),l=pt(),s=dt(),c=P2(),f="hasShadow",p="shadowRGBA",m="patternImage",E="linearGradient",S="radialGradient",y;function b(){return y||(y=n.Util.createCanvasElement().getContext("2d"),y)}t.shapes={};function g(I){const z=this.attrs.fillRule;z?I.fill(z):I.fill()}function O(I){I.stroke()}function A(I){const z=this.attrs.fillRule;z?I.fill(z):I.fill()}function C(I){I.stroke()}function v(){this._clearCache(f)}function w(){this._clearCache(p)}function T(){this._clearCache(m)}function R(){this._clearCache(E)}function L(){this._clearCache(S)}var j=class extends o.Node{constructor(I){super(I);let z;for(;z=n.Util.getRandomColor(),!(z&&!(z in t.shapes)););this.colorKey=z,t.shapes[z]=this}getContext(){return n.Util.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return n.Util.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(f,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(m,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){const I=b().createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(I&&I.setTransform){const z=new n.Transform;z.translate(this.fillPatternX(),this.fillPatternY()),z.rotate(e.Konva.getAngle(this.fillPatternRotation())),z.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),z.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const k=z.getMatrix(),F=typeof DOMMatrix>"u"?{a:k[0],b:k[1],c:k[2],d:k[3],e:k[4],f:k[5]}:new DOMMatrix(k);I.setTransform(F)}return I}}_getLinearGradient(){return this._getCache(E,this.__getLinearGradient)}__getLinearGradient(){const I=this.fillLinearGradientColorStops();if(I){const z=b(),k=this.fillLinearGradientStartPoint(),F=this.fillLinearGradientEndPoint(),G=z.createLinearGradient(k.x,k.y,F.x,F.y);for(let _=0;_<I.length;_+=2)G.addColorStop(I[_],I[_+1]);return G}}_getRadialGradient(){return this._getCache(S,this.__getRadialGradient)}__getRadialGradient(){const I=this.fillRadialGradientColorStops();if(I){const z=b(),k=this.fillRadialGradientStartPoint(),F=this.fillRadialGradientEndPoint(),G=z.createRadialGradient(k.x,k.y,this.fillRadialGradientStartRadius(),F.x,F.y,this.fillRadialGradientEndRadius());for(let _=0;_<I.length;_+=2)G.addColorStop(I[_],I[_+1]);return G}}getShadowRGBA(){return this._getCache(p,this._getShadowRGBA)}_getShadowRGBA(){if(!this.hasShadow())return;const I=n.Util.colorToRGBA(this.shadowColor());if(I)return"rgba("+I.r+","+I.g+","+I.b+","+I.a*(this.shadowOpacity()||1)+")"}hasFill(){return this._calculate("hasFill",["fillEnabled","fill","fillPatternImage","fillLinearGradientColorStops","fillRadialGradientColorStops"],()=>this.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const I=this.hitStrokeWidth();return I==="auto"?this.hasStroke():this.strokeEnabled()&&!!I}intersects(I){const z=this.getStage();if(!z)return!1;const k=z.bufferHitCanvas;return k.getContext().clear(),this.drawHit(k,void 0,!0),k.context.getImageData(Math.round(I.x),Math.round(I.y),1,1).data[3]>0}destroy(){return o.Node.prototype.destroy.call(this),delete t.shapes[this.colorKey],delete this.colorKey,this}_useBufferCanvas(I){var z;if(!(!((z=this.attrs.perfectDrawEnabled)!==null&&z!==void 0)||z))return!1;const k=I||this.hasFill(),F=this.hasStroke(),G=this.getAbsoluteOpacity()!==1;if(k&&F&&G)return!0;const _=this.hasShadow(),D=this.shadowForStrokeEnabled();return!!(k&&F&&_&&D)}setStrokeHitEnabled(I){n.Util.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),I?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){const I=this.size();return{x:this._centroid?-I.width/2:0,y:this._centroid?-I.height/2:0,width:I.width,height:I.height}}getClientRect(I={}){let z=!1,k=this.getParent();for(;k;){if(k.isCached()){z=!0;break}k=k.getParent()}const F=I.skipTransform,G=I.relativeTo||z&&this.getStage()||void 0,_=this.getSelfRect(),D=!I.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,N=_.width+D,H=_.height+D,V=!I.skipShadow&&this.hasShadow(),W=V?this.shadowOffsetX():0,$=V?this.shadowOffsetY():0,Q=N+Math.abs(W),ae=H+Math.abs($),Z=V&&this.shadowBlur()||0,oe={width:Q+Z*2,height:ae+Z*2,x:-(D/2+Z)+Math.min(W,0)+_.x,y:-(D/2+Z)+Math.min($,0)+_.y};return F?oe:this._transformedRect(oe,G)}drawScene(I,z,k){const F=this.getLayer();let G=I||F.getCanvas(),_=G.getContext(),D=this._getCanvasCache(),N=this.getSceneFunc(),H=this.hasShadow(),V,W;const $=G.isCache,Q=z===this;if(!this.isVisible()&&!Q)return this;if(D){_.save();const Z=this.getAbsoluteTransform(z).getMatrix();return _.transform(Z[0],Z[1],Z[2],Z[3],Z[4],Z[5]),this._drawCachedSceneCanvas(_),_.restore(),this}if(!N)return this;if(_.save(),this._useBufferCanvas()&&!$){V=this.getStage();const Z=k||V.bufferCanvas;W=Z.getContext(),W.clear(),W.save(),W._applyLineJoin(this);var ae=this.getAbsoluteTransform(z).getMatrix();W.transform(ae[0],ae[1],ae[2],ae[3],ae[4],ae[5]),N.call(this,W,this),W.restore();const oe=Z.pixelRatio;H&&_._applyShadow(this),_._applyOpacity(this),_._applyGlobalCompositeOperation(this),_.drawImage(Z._canvas,0,0,Z.width/oe,Z.height/oe)}else{if(_._applyLineJoin(this),!Q){var ae=this.getAbsoluteTransform(z).getMatrix();_.transform(ae[0],ae[1],ae[2],ae[3],ae[4],ae[5]),_._applyOpacity(this),_._applyGlobalCompositeOperation(this)}H&&_._applyShadow(this),N.call(this,_,this)}return _.restore(),this}drawHit(I,z,k=!1){if(!this.shouldDrawHit(z,k))return this;const F=this.getLayer(),G=I||F.hitCanvas,_=G&&G.getContext(),D=this.hitFunc()||this.sceneFunc(),N=this._getCanvasCache(),H=N&&N.hit;if(this.colorKey||n.Util.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),H){_.save();const V=this.getAbsoluteTransform(z).getMatrix();return _.transform(V[0],V[1],V[2],V[3],V[4],V[5]),this._drawCachedHitCanvas(_),_.restore(),this}if(!D)return this;if(_.save(),_._applyLineJoin(this),this!==z){const V=this.getAbsoluteTransform(z).getMatrix();_.transform(V[0],V[1],V[2],V[3],V[4],V[5])}return D.call(this,_,this),_.restore(),this}drawHitFromCache(I=0){const z=this._getCanvasCache(),k=this._getCachedSceneCanvas(),F=z.hit,G=F.getContext(),_=F.getWidth(),D=F.getHeight();G.clear(),G.drawImage(k._canvas,0,0,_,D);try{const N=G.getImageData(0,0,_,D),H=N.data,V=H.length,W=n.Util._hexToRgb(this.colorKey);for(let $=0;$<V;$+=4)H[$+3]>I?(H[$]=W.r,H[$+1]=W.g,H[$+2]=W.b,H[$+3]=255):H[$+3]=0;G.putImageData(N,0,0)}catch(N){n.Util.error("Unable to draw hit graph from cached scene canvas. "+N.message)}return this}hasPointerCapture(I){return c.hasPointerCapture(I,this)}setPointerCapture(I){c.setPointerCapture(I,this)}releaseCapture(I){c.releaseCapture(I,this)}};t.Shape=j,j.prototype._fillFunc=g,j.prototype._strokeFunc=O,j.prototype._fillFuncHit=A,j.prototype._strokeFuncHit=C,j.prototype._centroid=!1,j.prototype.nodeType="Shape",(0,s._registerNode)(j),j.prototype.eventListeners={},j.prototype.on.call(j.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",v),j.prototype.on.call(j.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",w),j.prototype.on.call(j.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",T),j.prototype.on.call(j.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",R),j.prototype.on.call(j.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",L),r.Factory.addGetterSetter(j,"stroke",void 0,(0,l.getStringOrGradientValidator)()),r.Factory.addGetterSetter(j,"strokeWidth",2,(0,l.getNumberValidator)()),r.Factory.addGetterSetter(j,"fillAfterStrokeEnabled",!1),r.Factory.addGetterSetter(j,"hitStrokeWidth","auto",(0,l.getNumberOrAutoValidator)()),r.Factory.addGetterSetter(j,"strokeHitEnabled",!0,(0,l.getBooleanValidator)()),r.Factory.addGetterSetter(j,"perfectDrawEnabled",!0,(0,l.getBooleanValidator)()),r.Factory.addGetterSetter(j,"shadowForStrokeEnabled",!0,(0,l.getBooleanValidator)()),r.Factory.addGetterSetter(j,"lineJoin"),r.Factory.addGetterSetter(j,"lineCap"),r.Factory.addGetterSetter(j,"sceneFunc"),r.Factory.addGetterSetter(j,"hitFunc"),r.Factory.addGetterSetter(j,"dash"),r.Factory.addGetterSetter(j,"dashOffset",0,(0,l.getNumberValidator)()),r.Factory.addGetterSetter(j,"shadowColor",void 0,(0,l.getStringValidator)()),r.Factory.addGetterSetter(j,"shadowBlur",0,(0,l.getNumberValidator)()),r.Factory.addGetterSetter(j,"shadowOpacity",1,(0,l.getNumberValidator)()),r.Factory.addComponentsGetterSetter(j,"shadowOffset",["x","y"]),r.Factory.addGetterSetter(j,"shadowOffsetX",0,(0,l.getNumberValidator)()),r.Factory.addGetterSetter(j,"shadowOffsetY",0,(0,l.getNumberValidator)()),r.Factory.addGetterSetter(j,"fillPatternImage"),r.Factory.addGetterSetter(j,"fill",void 0,(0,l.getStringOrGradientValidator)()),r.Factory.addGetterSetter(j,"fillPatternX",0,(0,l.getNumberValidator)()),r.Factory.addGetterSetter(j,"fillPatternY",0,(0,l.getNumberValidator)()),r.Factory.addGetterSetter(j,"fillLinearGradientColorStops"),r.Factory.addGetterSetter(j,"strokeLinearGradientColorStops"),r.Factory.addGetterSetter(j,"fillRadialGradientStartRadius",0),r.Factory.addGetterSetter(j,"fillRadialGradientEndRadius",0),r.Factory.addGetterSetter(j,"fillRadialGradientColorStops"),r.Factory.addGetterSetter(j,"fillPatternRepeat","repeat"),r.Factory.addGetterSetter(j,"fillEnabled",!0),r.Factory.addGetterSetter(j,"strokeEnabled",!0),r.Factory.addGetterSetter(j,"shadowEnabled",!0),r.Factory.addGetterSetter(j,"dashEnabled",!0),r.Factory.addGetterSetter(j,"strokeScaleEnabled",!0),r.Factory.addGetterSetter(j,"fillPriority","color"),r.Factory.addComponentsGetterSetter(j,"fillPatternOffset",["x","y"]),r.Factory.addGetterSetter(j,"fillPatternOffsetX",0,(0,l.getNumberValidator)()),r.Factory.addGetterSetter(j,"fillPatternOffsetY",0,(0,l.getNumberValidator)()),r.Factory.addComponentsGetterSetter(j,"fillPatternScale",["x","y"]),r.Factory.addGetterSetter(j,"fillPatternScaleX",1,(0,l.getNumberValidator)()),r.Factory.addGetterSetter(j,"fillPatternScaleY",1,(0,l.getNumberValidator)()),r.Factory.addComponentsGetterSetter(j,"fillLinearGradientStartPoint",["x","y"]),r.Factory.addComponentsGetterSetter(j,"strokeLinearGradientStartPoint",["x","y"]),r.Factory.addGetterSetter(j,"fillLinearGradientStartPointX",0),r.Factory.addGetterSetter(j,"strokeLinearGradientStartPointX",0),r.Factory.addGetterSetter(j,"fillLinearGradientStartPointY",0),r.Factory.addGetterSetter(j,"strokeLinearGradientStartPointY",0),r.Factory.addComponentsGetterSetter(j,"fillLinearGradientEndPoint",["x","y"]),r.Factory.addComponentsGetterSetter(j,"strokeLinearGradientEndPoint",["x","y"]),r.Factory.addGetterSetter(j,"fillLinearGradientEndPointX",0),r.Factory.addGetterSetter(j,"strokeLinearGradientEndPointX",0),r.Factory.addGetterSetter(j,"fillLinearGradientEndPointY",0),r.Factory.addGetterSetter(j,"strokeLinearGradientEndPointY",0),r.Factory.addComponentsGetterSetter(j,"fillRadialGradientStartPoint",["x","y"]),r.Factory.addGetterSetter(j,"fillRadialGradientStartPointX",0),r.Factory.addGetterSetter(j,"fillRadialGradientStartPointY",0),r.Factory.addComponentsGetterSetter(j,"fillRadialGradientEndPoint",["x","y"]),r.Factory.addGetterSetter(j,"fillRadialGradientEndPointX",0),r.Factory.addGetterSetter(j,"fillRadialGradientEndPointY",0),r.Factory.addGetterSetter(j,"fillPatternRotation",0),r.Factory.addGetterSetter(j,"fillRule",void 0,(0,l.getStringValidator)()),r.Factory.backCompat(j,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"})})),L2=De.__commonJSMin((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Layer=void 0;var e=Wt(),n=bc(),r=rn(),o=ft(),l=yc(),s=pt(),c=yn(),f=dt(),p="#",m="beforeDraw",E="draw",S=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],y=S.length,b=class extends n.Container{constructor(g){super(g),this.canvas=new l.SceneCanvas,this.hitCanvas=new l.HitCanvas({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(g){return this.getContext().clear(g),this.getHitCanvas().getContext().clear(g),this}setZIndex(g){super.setZIndex(g);const O=this.getStage();return O&&O.content&&(O.content.removeChild(this.getNativeCanvasElement()),g<O.children.length-1?O.content.insertBefore(this.getNativeCanvasElement(),O.children[g+1].getCanvas()._canvas):O.content.appendChild(this.getNativeCanvasElement())),this}moveToTop(){r.Node.prototype.moveToTop.call(this);const g=this.getStage();return g&&g.content&&(g.content.removeChild(this.getNativeCanvasElement()),g.content.appendChild(this.getNativeCanvasElement())),!0}moveUp(){if(!r.Node.prototype.moveUp.call(this))return!1;const g=this.getStage();return!g||!g.content?!1:(g.content.removeChild(this.getNativeCanvasElement()),this.index<g.children.length-1?g.content.insertBefore(this.getNativeCanvasElement(),g.children[this.index+1].getCanvas()._canvas):g.content.appendChild(this.getNativeCanvasElement()),!0)}moveDown(){if(r.Node.prototype.moveDown.call(this)){const g=this.getStage();if(g){const O=g.children;g.content&&(g.content.removeChild(this.getNativeCanvasElement()),g.content.insertBefore(this.getNativeCanvasElement(),O[this.index+1].getCanvas()._canvas))}return!0}return!1}moveToBottom(){if(r.Node.prototype.moveToBottom.call(this)){const g=this.getStage();if(g){const O=g.children;g.content&&(g.content.removeChild(this.getNativeCanvasElement()),g.content.insertBefore(this.getNativeCanvasElement(),O[1].getCanvas()._canvas))}return!0}return!1}getLayer(){return this}remove(){const g=this.getNativeCanvasElement();return r.Node.prototype.remove.call(this),g&&g.parentNode&&e.Util._isInDocument(g)&&g.parentNode.removeChild(g),this}getStage(){return this.parent}setSize({width:g,height:O}){return this.canvas.setSize(g,O),this.hitCanvas.setSize(g,O),this._setSmoothEnabled(),this}_validateAdd(g){const O=g.getType();O!=="Group"&&O!=="Shape"&&e.Util.throw("You may only add groups and shapes to a layer.")}_toKonvaCanvas(g){return g=g||{},g.width=g.width||this.getWidth(),g.height=g.height||this.getHeight(),g.x=g.x!==void 0?g.x:this.x(),g.y=g.y!==void 0?g.y:this.y(),r.Node.prototype._toKonvaCanvas.call(this,g)}_checkVisibility(){this.visible()?this.canvas._canvas.style.display="block":this.canvas._canvas.style.display="none"}_setSmoothEnabled(){this.getContext()._context.imageSmoothingEnabled=this.imageSmoothingEnabled()}getWidth(){if(this.parent)return this.parent.width()}setWidth(){e.Util.warn('Can not change width of layer. Use "stage.width(value)" function instead.')}getHeight(){if(this.parent)return this.parent.height()}setHeight(){e.Util.warn('Can not change height of layer. Use "stage.height(value)" function instead.')}batchDraw(){return this._waitingForDraw||(this._waitingForDraw=!0,e.Util.requestAnimFrame(()=>{this.draw(),this._waitingForDraw=!1})),this}getIntersection(g){if(!this.isListening()||!this.isVisible())return null;let O=1,A=!1;for(;;){for(let C=0;C<y;C++){const v=S[C],w=this._getIntersection({x:g.x+v.x*O,y:g.y+v.y*O}),T=w.shape;if(T)return T;if(A=!!w.antialiased,!w.antialiased)break}if(A)O+=1;else return null}}_getIntersection(g){const O=this.hitCanvas.pixelRatio,A=this.hitCanvas.context.getImageData(Math.round(g.x*O),Math.round(g.y*O),1,1).data,C=A[3];if(C===255){const v=e.Util._rgbToHex(A[0],A[1],A[2]),w=c.shapes[p+v];return w?{shape:w}:{antialiased:!0}}else if(C>0)return{antialiased:!0};return{}}drawScene(g,O){const A=this.getLayer(),C=g||A&&A.getCanvas();return this._fire(m,{node:this}),this.clearBeforeDraw()&&C.getContext().clear(),n.Container.prototype.drawScene.call(this,C,O),this._fire(E,{node:this}),this}drawHit(g,O){const A=this.getLayer(),C=g||A&&A.hitCanvas;return A&&A.clearBeforeDraw()&&A.getHitCanvas().getContext().clear(),n.Container.prototype.drawHit.call(this,C,O),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(g){e.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(g)}getHitGraphEnabled(g){return e.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!this.parent||!this.parent.content)return;const g=this.parent;this.hitCanvas._canvas.parentNode?g.content.removeChild(this.hitCanvas._canvas):g.content.appendChild(this.hitCanvas._canvas)}destroy(){return e.Util.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}};t.Layer=b,b.prototype.nodeType="Layer",(0,f._registerNode)(b),o.Factory.addGetterSetter(b,"imageSmoothingEnabled",!0),o.Factory.addGetterSetter(b,"clearBeforeDraw",!0),o.Factory.addGetterSetter(b,"hitGraphEnabled",!0,(0,s.getBooleanValidator)())})),y8=De.__commonJSMin((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FastLayer=void 0;var e=Wt(),n=L2(),r=dt(),o=class extends n.Layer{constructor(l){super(l),this.listening(!1),e.Util.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}};t.FastLayer=o,o.prototype.nodeType="FastLayer",(0,r._registerNode)(o)})),ef=De.__commonJSMin((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Group=void 0;var e=Wt(),n=bc(),r=dt(),o=class extends n.Container{_validateAdd(l){const s=l.getType();s!=="Group"&&s!=="Shape"&&e.Util.throw("You may only add groups and shapes to groups.")}};t.Group=o,o.prototype.nodeType="Group",(0,r._registerNode)(o)})),tf=De.__commonJSMin((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Animation=void 0;var e=dt(),n=Wt(),r=(function(){return e.glob.performance&&e.glob.performance.now?function(){return e.glob.performance.now()}:function(){return new Date().getTime()}})(),o=class Zl{constructor(s,c){this.id=Zl.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:r(),frameRate:0},this.func=s,this.setLayers(c)}setLayers(s){let c=[];return s&&(c=Array.isArray(s)?s:[s]),this.layers=c,this}getLayers(){return this.layers}addLayer(s){const c=this.layers,f=c.length;for(let p=0;p<f;p++)if(c[p]._id===s._id)return!1;return this.layers.push(s),!0}isRunning(){const s=Zl.animations,c=s.length;for(let f=0;f<c;f++)if(s[f].id===this.id)return!0;return!1}start(){return this.stop(),this.frame.timeDiff=0,this.frame.lastTime=r(),Zl._addAnimation(this),this}stop(){return Zl._removeAnimation(this),this}_updateFrameObject(s){this.frame.timeDiff=s-this.frame.lastTime,this.frame.lastTime=s,this.frame.time+=this.frame.timeDiff,this.frame.frameRate=1e3/this.frame.timeDiff}static _addAnimation(s){this.animations.push(s),this._handleAnimation()}static _removeAnimation(s){const c=s.id,f=this.animations,p=f.length;for(let m=0;m<p;m++)if(f[m].id===c){this.animations.splice(m,1);break}}static _runFrames(){const s={},c=this.animations;for(let f=0;f<c.length;f++){const p=c[f],m=p.layers,E=p.func;p._updateFrameObject(r());const S=m.length;let y;if(E?y=E.call(p,p.frame)!==!1:y=!0,!!y)for(let b=0;b<S;b++){const g=m[b];g._id!==void 0&&(s[g._id]=g)}}for(const f in s)s.hasOwnProperty(f)&&s[f].batchDraw()}static _animationLoop(){const s=Zl;s.animations.length?(s._runFrames(),n.Util.requestAnimFrame(s._animationLoop)):s.animRunning=!1}static _handleAnimation(){this.animRunning||(this.animRunning=!0,n.Util.requestAnimFrame(this._animationLoop))}};t.Animation=o,o.animations=[],o.animIdCounter=0,o.animRunning=!1})),b8=De.__commonJSMin((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Easings=t.Tween=void 0;var e=Wt(),n=tf(),r=rn(),o=dt(),l={node:1,duration:1,easing:1,onFinish:1,yoyo:1},s=1,c=2,f=3,p=["fill","stroke","shadowColor"],m=0,E=class{constructor(y,b,g,O,A,C,v){this.prop=y,this.propFunc=b,this.begin=O,this._pos=O,this.duration=C,this._change=0,this.prevPos=0,this.yoyo=v,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=g,this._change=A-this.begin,this.pause()}fire(y){const b=this[y];b&&b()}setTime(y){y>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():y<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=y,this.update())}getTime(){return this._time}setPosition(y){this.prevPos=this._pos,this.propFunc(y),this._pos=y}getPosition(y){return y===void 0&&(y=this._time),this.func(y,this.begin,this._change,this.duration)}play(){this.state=c,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=f,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(y){this.pause(),this._time=y,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){const y=this.getTimer()-this._startTime;this.state===c?this.setTime(y):this.state===f&&this.setTime(this.duration-y)}pause(){this.state=s,this.fire("onPause")}getTimer(){return new Date().getTime()}},S=class kn{constructor(b){const g=this,O=b.node,A=O._id,C=b.easing||t.Easings.Linear,v=!!b.yoyo;let w,T;typeof b.duration>"u"?w=.3:b.duration===0?w=.001:w=b.duration,this.node=O,this._id=m++;const R=O.getLayer()||(O instanceof o.Konva.Stage?O.getLayers():null);R||e.Util.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new n.Animation(function(){g.tween.onEnterFrame()},R),this.tween=new E(T,function(L){g._tweenFunc(L)},C,0,1,w*1e3,v),this._addListeners(),kn.attrs[A]||(kn.attrs[A]={}),kn.attrs[A][this._id]||(kn.attrs[A][this._id]={}),kn.tweens[A]||(kn.tweens[A]={});for(T in b)l[T]===void 0&&this._addAttr(T,b[T]);this.reset(),this.onFinish=b.onFinish,this.onReset=b.onReset,this.onUpdate=b.onUpdate}_addAttr(b,g){const O=this.node,A=O._id;let C,v,w,T,R;const L=kn.tweens[A][b];L&&delete kn.attrs[A][L][b];let j=O.getAttr(b);if(e.Util._isArray(g))if(C=[],v=Math.max(g.length,j.length),b==="points"&&g.length!==j.length&&(g.length>j.length?(T=j,j=e.Util._prepareArrayForTween(j,g,O.closed())):(w=g,g=e.Util._prepareArrayForTween(g,j,O.closed()))),b.indexOf("fill")===0)for(let I=0;I<v;I++)if(I%2===0)C.push(g[I]-j[I]);else{const z=e.Util.colorToRGBA(j[I]);R=e.Util.colorToRGBA(g[I]),j[I]=z,C.push({r:R.r-z.r,g:R.g-z.g,b:R.b-z.b,a:R.a-z.a})}else for(let I=0;I<v;I++)C.push(g[I]-j[I]);else p.indexOf(b)!==-1?(j=e.Util.colorToRGBA(j),R=e.Util.colorToRGBA(g),C={r:R.r-j.r,g:R.g-j.g,b:R.b-j.b,a:R.a-j.a}):C=g-j;kn.attrs[A][this._id][b]={start:j,diff:C,end:g,trueEnd:w,trueStart:T},kn.tweens[A][b]=this._id}_tweenFunc(b){const g=this.node,O=kn.attrs[g._id][this._id];let A,C,v,w,T,R,L,j;for(A in O){if(C=O[A],v=C.start,w=C.diff,j=C.end,e.Util._isArray(v))if(T=[],L=Math.max(v.length,j.length),A.indexOf("fill")===0)for(R=0;R<L;R++)R%2===0?T.push((v[R]||0)+w[R]*b):T.push("rgba("+Math.round(v[R].r+w[R].r*b)+","+Math.round(v[R].g+w[R].g*b)+","+Math.round(v[R].b+w[R].b*b)+","+(v[R].a+w[R].a*b)+")");else for(R=0;R<L;R++)T.push((v[R]||0)+w[R]*b);else p.indexOf(A)!==-1?T="rgba("+Math.round(v.r+w.r*b)+","+Math.round(v.g+w.g*b)+","+Math.round(v.b+w.b*b)+","+(v.a+w.a*b)+")":T=v+w*b;g.setAttr(A,T)}}_addListeners(){this.tween.onPlay=()=>{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{const b=this.node,g=kn.attrs[b._id][this._id];g.points&&g.points.trueEnd&&b.setAttr("points",g.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{const b=this.node,g=kn.attrs[b._id][this._id];g.points&&g.points.trueStart&&b.points(g.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(b){return this.tween.seek(b*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){const b=this.node._id,g=this._id,O=kn.tweens[b];this.pause();for(const A in O)delete kn.tweens[b][A];delete kn.attrs[b][g]}};t.Tween=S,S.attrs={},S.tweens={},r.Node.prototype.to=function(y){const b=y.onFinish;y.node=this,y.onFinish=function(){this.destroy(),b&&b()},new S(y).play()},t.Easings={BackEaseIn(y,b,g,O){return g*(y/=O)*y*(2.70158*y-1.70158)+b},BackEaseOut(y,b,g,O){return g*((y=y/O-1)*y*(2.70158*y+1.70158)+1)+b},BackEaseInOut(y,b,g,O){let A=1.70158;return(y/=O/2)<1?g/2*(y*y*(((A*=1.525)+1)*y-A))+b:g/2*((y-=2)*y*(((A*=1.525)+1)*y+A)+2)+b},ElasticEaseIn(y,b,g,O,A,C){let v=0;return y===0?b:(y/=O)===1?b+g:(C||(C=O*.3),!A||A<Math.abs(g)?(A=g,v=C/4):v=C/(2*Math.PI)*Math.asin(g/A),-(A*Math.pow(2,10*(y-=1))*Math.sin((y*O-v)*(2*Math.PI)/C))+b)},ElasticEaseOut(y,b,g,O,A,C){let v=0;return y===0?b:(y/=O)===1?b+g:(C||(C=O*.3),!A||A<Math.abs(g)?(A=g,v=C/4):v=C/(2*Math.PI)*Math.asin(g/A),A*Math.pow(2,-10*y)*Math.sin((y*O-v)*(2*Math.PI)/C)+g+b)},ElasticEaseInOut(y,b,g,O,A,C){let v=0;return y===0?b:(y/=O/2)===2?b+g:(C||(C=O*(.3*1.5)),!A||A<Math.abs(g)?(A=g,v=C/4):v=C/(2*Math.PI)*Math.asin(g/A),y<1?-.5*(A*Math.pow(2,10*(y-=1))*Math.sin((y*O-v)*(2*Math.PI)/C))+b:A*Math.pow(2,-10*(y-=1))*Math.sin((y*O-v)*(2*Math.PI)/C)*.5+g+b)},BounceEaseOut(y,b,g,O){return(y/=O)<1/2.75?g*(7.5625*y*y)+b:y<2/2.75?g*(7.5625*(y-=1.5/2.75)*y+.75)+b:y<2.5/2.75?g*(7.5625*(y-=2.25/2.75)*y+.9375)+b:g*(7.5625*(y-=2.625/2.75)*y+.984375)+b},BounceEaseIn(y,b,g,O){return g-t.Easings.BounceEaseOut(O-y,0,g,O)+b},BounceEaseInOut(y,b,g,O){return y<O/2?t.Easings.BounceEaseIn(y*2,0,g,O)*.5+b:t.Easings.BounceEaseOut(y*2-O,0,g,O)*.5+g*.5+b},EaseIn(y,b,g,O){return g*(y/=O)*y+b},EaseOut(y,b,g,O){return-g*(y/=O)*(y-2)+b},EaseInOut(y,b,g,O){return(y/=O/2)<1?g/2*y*y+b:-g/2*(--y*(y-2)-1)+b},StrongEaseIn(y,b,g,O){return g*(y/=O)*y*y*y*y+b},StrongEaseOut(y,b,g,O){return g*((y=y/O-1)*y*y*y*y+1)+b},StrongEaseInOut(y,b,g,O){return(y/=O/2)<1?g/2*y*y*y*y*y+b:g/2*((y-=2)*y*y*y*y+2)+b},Linear(y,b,g,O){return g*y/O+b}}})),nf=De.__commonJSMin((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Konva=void 0;var e=dt(),n=Wt(),r=rn(),o=bc(),l=g8(),s=L2(),c=y8(),f=ef(),p=Qd(),m=yn(),E=tf(),S=b8(),y=N2(),b=yc();t.Konva=n.Util._assign(e.Konva,{Util:n.Util,Transform:n.Transform,Node:r.Node,Container:o.Container,Stage:l.Stage,stages:l.stages,Layer:s.Layer,FastLayer:c.FastLayer,Group:f.Group,DD:p.DD,Shape:m.Shape,shapes:m.shapes,Animation:E.Animation,Tween:S.Tween,Easings:S.Easings,Context:y.Context,Canvas:b.Canvas}),t.default=t.Konva})),C8=De.__commonJSMin((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Arc=void 0;var e=ft(),n=yn(),r=dt(),o=pt(),l=dt(),s=class extends n.Shape{_sceneFunc(c){const f=r.Konva.getAngle(this.angle()),p=this.clockwise();c.beginPath(),c.arc(0,0,this.outerRadius(),0,f,p),c.arc(0,0,this.innerRadius(),f,0,!p),c.closePath(),c.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(c){this.outerRadius(c/2)}setHeight(c){this.outerRadius(c/2)}getSelfRect(){const c=this.innerRadius(),f=this.outerRadius(),p=this.clockwise(),m=r.Konva.getAngle(p?360-this.angle():this.angle()),E=Math.cos(Math.min(m,Math.PI)),S=1,y=Math.sin(Math.min(Math.max(Math.PI,m),3*Math.PI/2)),b=Math.sin(Math.min(m,Math.PI/2)),g=E*(E>0?c:f),O=S*f,A=y*(y>0?c:f),C=b*(b>0?f:c);return{x:g,y:p?-1*C:A,width:O-g,height:C-A}}};t.Arc=s,s.prototype._centroid=!0,s.prototype.className="Arc",s.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,l._registerNode)(s),e.Factory.addGetterSetter(s,"innerRadius",0,(0,o.getNumberValidator)()),e.Factory.addGetterSetter(s,"outerRadius",0,(0,o.getNumberValidator)()),e.Factory.addGetterSetter(s,"angle",0,(0,o.getNumberValidator)()),e.Factory.addGetterSetter(s,"clockwise",!1,(0,o.getBooleanValidator)())})),R2=De.__commonJSMin((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Line=void 0;var e=ft(),n=dt(),r=yn(),o=pt();function l(f,p,m,E,S,y,b){const g=Math.sqrt(Math.pow(m-f,2)+Math.pow(E-p,2)),O=Math.sqrt(Math.pow(S-m,2)+Math.pow(y-E,2)),A=b*g/(g+O),C=b*O/(g+O);return[m-A*(S-f),E-A*(y-p),m+C*(S-f),E+C*(y-p)]}function s(f,p){const m=f.length,E=[];for(let S=2;S<m-2;S+=2){const y=l(f[S-2],f[S-1],f[S],f[S+1],f[S+2],f[S+3],p);isNaN(y[0])||(E.push(y[0]),E.push(y[1]),E.push(f[S]),E.push(f[S+1]),E.push(y[2]),E.push(y[3]))}return E}var c=class extends r.Shape{constructor(f){super(f),this.on("pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva",function(){this._clearCache("tensionPoints")})}_sceneFunc(f){let p=this.points(),m=p.length,E=this.tension(),S=this.closed(),y=this.bezier(),b,g,O;if(m){if(f.beginPath(),f.moveTo(p[0],p[1]),E!==0&&m>4){for(b=this.getTensionPoints(),g=b.length,O=S?0:4,S||f.quadraticCurveTo(b[0],b[1],b[2],b[3]);O<g-2;)f.bezierCurveTo(b[O++],b[O++],b[O++],b[O++],b[O++],b[O++]);S||f.quadraticCurveTo(b[g-2],b[g-1],p[m-2],p[m-1])}else if(y)for(O=2;O<m;)f.bezierCurveTo(p[O++],p[O++],p[O++],p[O++],p[O++],p[O++]);else for(O=2;O<m;O+=2)f.lineTo(p[O],p[O+1]);S?(f.closePath(),f.fillStrokeShape(this)):f.strokeShape(this)}}getTensionPoints(){return this._getCache("tensionPoints",this._getTensionPoints)}_getTensionPoints(){return this.closed()?this._getTensionPointsClosed():s(this.points(),this.tension())}_getTensionPointsClosed(){const f=this.points(),p=f.length,m=this.tension(),E=l(f[p-2],f[p-1],f[0],f[1],f[2],f[3],m),S=l(f[p-4],f[p-3],f[p-2],f[p-1],f[0],f[1],m),y=s(f,m);return[E[2],E[3]].concat(y).concat([S[0],S[1],f[p-2],f[p-1],S[2],S[3],E[0],E[1],f[0],f[1]])}getWidth(){return this.getSelfRect().width}getHeight(){return this.getSelfRect().height}getSelfRect(){let f=this.points();if(f.length<4)return{x:f[0]||0,y:f[1]||0,width:0,height:0};this.tension()!==0?f=[f[0],f[1],...this._getTensionPoints(),f[f.length-2],f[f.length-1]]:f=this.points();let p=f[0],m=f[0],E=f[1],S=f[1],y,b;for(let g=0;g<f.length/2;g++)y=f[g*2],b=f[g*2+1],p=Math.min(p,y),m=Math.max(m,y),E=Math.min(E,b),S=Math.max(S,b);return{x:p,y:E,width:m-p,height:S-E}}};t.Line=c,c.prototype.className="Line",c.prototype._attrsAffectingSize=["points","bezier","tension"],(0,n._registerNode)(c),e.Factory.addGetterSetter(c,"closed",!1),e.Factory.addGetterSetter(c,"bezier",!1),e.Factory.addGetterSetter(c,"tension",0,(0,o.getNumberValidator)()),e.Factory.addGetterSetter(c,"points",[],(0,o.getNumberArrayValidator)())})),S8=De.__commonJSMin((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.t2length=t.getQuadraticArcLength=t.getCubicArcLength=t.binomialCoefficients=t.cValues=t.tValues=void 0,t.tValues=[[],[],[-.5773502691896257,.5773502691896257],[0,-.7745966692414834,.7745966692414834],[-.33998104358485626,.33998104358485626,-.8611363115940526,.8611363115940526],[0,-.5384693101056831,.5384693101056831,-.906179845938664,.906179845938664],[.6612093864662645,-.6612093864662645,-.2386191860831969,.2386191860831969,-.932469514203152,.932469514203152],[0,.4058451513773972,-.4058451513773972,-.7415311855993945,.7415311855993945,-.9491079123427585,.9491079123427585],[-.1834346424956498,.1834346424956498,-.525532409916329,.525532409916329,-.7966664774136267,.7966664774136267,-.9602898564975363,.9602898564975363],[0,-.8360311073266358,.8360311073266358,-.9681602395076261,.9681602395076261,-.3242534234038089,.3242534234038089,-.6133714327005904,.6133714327005904],[-.14887433898163122,.14887433898163122,-.4333953941292472,.4333953941292472,-.6794095682990244,.6794095682990244,-.8650633666889845,.8650633666889845,-.9739065285171717,.9739065285171717],[0,-.26954315595234496,.26954315595234496,-.5190961292068118,.5190961292068118,-.7301520055740494,.7301520055740494,-.8870625997680953,.8870625997680953,-.978228658146057,.978228658146057],[-.1252334085114689,.1252334085114689,-.3678314989981802,.3678314989981802,-.5873179542866175,.5873179542866175,-.7699026741943047,.7699026741943047,-.9041172563704749,.9041172563704749,-.9815606342467192,.9815606342467192],[0,-.2304583159551348,.2304583159551348,-.44849275103644687,.44849275103644687,-.6423493394403402,.6423493394403402,-.8015780907333099,.8015780907333099,-.9175983992229779,.9175983992229779,-.9841830547185881,.9841830547185881],[-.10805494870734367,.10805494870734367,-.31911236892788974,.31911236892788974,-.5152486363581541,.5152486363581541,-.6872929048116855,.6872929048116855,-.827201315069765,.827201315069765,-.9284348836635735,.9284348836635735,-.9862838086968123,.9862838086968123],[0,-.20119409399743451,.20119409399743451,-.3941513470775634,.3941513470775634,-.5709721726085388,.5709721726085388,-.7244177313601701,.7244177313601701,-.8482065834104272,.8482065834104272,-.937273392400706,.937273392400706,-.9879925180204854,.9879925180204854],[-.09501250983763744,.09501250983763744,-.2816035507792589,.2816035507792589,-.45801677765722737,.45801677765722737,-.6178762444026438,.6178762444026438,-.755404408355003,.755404408355003,-.8656312023878318,.8656312023878318,-.9445750230732326,.9445750230732326,-.9894009349916499,.9894009349916499],[0,-.17848418149584785,.17848418149584785,-.3512317634538763,.3512317634538763,-.5126905370864769,.5126905370864769,-.6576711592166907,.6576711592166907,-.7815140038968014,.7815140038968014,-.8802391537269859,.8802391537269859,-.9506755217687678,.9506755217687678,-.9905754753144174,.9905754753144174],[-.0847750130417353,.0847750130417353,-.2518862256915055,.2518862256915055,-.41175116146284263,.41175116146284263,-.5597708310739475,.5597708310739475,-.6916870430603532,.6916870430603532,-.8037049589725231,.8037049589725231,-.8926024664975557,.8926024664975557,-.9558239495713977,.9558239495713977,-.9915651684209309,.9915651684209309],[0,-.16035864564022537,.16035864564022537,-.31656409996362983,.31656409996362983,-.46457074137596094,.46457074137596094,-.600545304661681,.600545304661681,-.7209661773352294,.7209661773352294,-.8227146565371428,.8227146565371428,-.9031559036148179,.9031559036148179,-.96020815213483,.96020815213483,-.9924068438435844,.9924068438435844],[-.07652652113349734,.07652652113349734,-.22778585114164507,.22778585114164507,-.37370608871541955,.37370608871541955,-.5108670019508271,.5108670019508271,-.636053680726515,.636053680726515,-.7463319064601508,.7463319064601508,-.8391169718222188,.8391169718222188,-.912234428251326,.912234428251326,-.9639719272779138,.9639719272779138,-.9931285991850949,.9931285991850949],[0,-.1455618541608951,.1455618541608951,-.2880213168024011,.2880213168024011,-.4243421202074388,.4243421202074388,-.5516188358872198,.5516188358872198,-.6671388041974123,.6671388041974123,-.7684399634756779,.7684399634756779,-.8533633645833173,.8533633645833173,-.9200993341504008,.9200993341504008,-.9672268385663063,.9672268385663063,-.9937521706203895,.9937521706203895],[-.06973927331972223,.06973927331972223,-.20786042668822127,.20786042668822127,-.34193582089208424,.34193582089208424,-.469355837986757,.469355837986757,-.5876404035069116,.5876404035069116,-.6944872631866827,.6944872631866827,-.7878168059792081,.7878168059792081,-.8658125777203002,.8658125777203002,-.926956772187174,.926956772187174,-.9700604978354287,.9700604978354287,-.9942945854823992,.9942945854823992],[0,-.1332568242984661,.1332568242984661,-.26413568097034495,.26413568097034495,-.3903010380302908,.3903010380302908,-.5095014778460075,.5095014778460075,-.6196098757636461,.6196098757636461,-.7186613631319502,.7186613631319502,-.8048884016188399,.8048884016188399,-.8767523582704416,.8767523582704416,-.9329710868260161,.9329710868260161,-.9725424712181152,.9725424712181152,-.9947693349975522,.9947693349975522],[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213]],t.cValues=[[],[],[1,1],[.8888888888888888,.5555555555555556,.5555555555555556],[.6521451548625461,.6521451548625461,.34785484513745385,.34785484513745385],[.5688888888888889,.47862867049936647,.47862867049936647,.23692688505618908,.23692688505618908],[.3607615730481386,.3607615730481386,.46791393457269104,.46791393457269104,.17132449237917036,.17132449237917036],[.4179591836734694,.3818300505051189,.3818300505051189,.27970539148927664,.27970539148927664,.1294849661688697,.1294849661688697],[.362683783378362,.362683783378362,.31370664587788727,.31370664587788727,.22238103445337448,.22238103445337448,.10122853629037626,.10122853629037626],[.3302393550012598,.1806481606948574,.1806481606948574,.08127438836157441,.08127438836157441,.31234707704000286,.31234707704000286,.26061069640293544,.26061069640293544],[.29552422471475287,.29552422471475287,.26926671930999635,.26926671930999635,.21908636251598204,.21908636251598204,.1494513491505806,.1494513491505806,.06667134430868814,.06667134430868814],[.2729250867779006,.26280454451024665,.26280454451024665,.23319376459199048,.23319376459199048,.18629021092773426,.18629021092773426,.1255803694649046,.1255803694649046,.05566856711617366,.05566856711617366],[.24914704581340277,.24914704581340277,.2334925365383548,.2334925365383548,.20316742672306592,.20316742672306592,.16007832854334622,.16007832854334622,.10693932599531843,.10693932599531843,.04717533638651183,.04717533638651183],[.2325515532308739,.22628318026289723,.22628318026289723,.2078160475368885,.2078160475368885,.17814598076194574,.17814598076194574,.13887351021978725,.13887351021978725,.09212149983772845,.09212149983772845,.04048400476531588,.04048400476531588],[.2152638534631578,.2152638534631578,.2051984637212956,.2051984637212956,.18553839747793782,.18553839747793782,.15720316715819355,.15720316715819355,.12151857068790319,.12151857068790319,.08015808715976021,.08015808715976021,.03511946033175186,.03511946033175186],[.2025782419255613,.19843148532711158,.19843148532711158,.1861610000155622,.1861610000155622,.16626920581699392,.16626920581699392,.13957067792615432,.13957067792615432,.10715922046717194,.10715922046717194,.07036604748810812,.07036604748810812,.03075324199611727,.03075324199611727],[.1894506104550685,.1894506104550685,.18260341504492358,.18260341504492358,.16915651939500254,.16915651939500254,.14959598881657674,.14959598881657674,.12462897125553388,.12462897125553388,.09515851168249279,.09515851168249279,.062253523938647894,.062253523938647894,.027152459411754096,.027152459411754096],[.17944647035620653,.17656270536699264,.17656270536699264,.16800410215645004,.16800410215645004,.15404576107681028,.15404576107681028,.13513636846852548,.13513636846852548,.11188384719340397,.11188384719340397,.08503614831717918,.08503614831717918,.0554595293739872,.0554595293739872,.02414830286854793,.02414830286854793],[.1691423829631436,.1691423829631436,.16427648374583273,.16427648374583273,.15468467512626524,.15468467512626524,.14064291467065065,.14064291467065065,.12255520671147846,.12255520671147846,.10094204410628717,.10094204410628717,.07642573025488905,.07642573025488905,.0497145488949698,.0497145488949698,.02161601352648331,.02161601352648331],[.1610544498487837,.15896884339395434,.15896884339395434,.15276604206585967,.15276604206585967,.1426067021736066,.1426067021736066,.12875396253933621,.12875396253933621,.11156664554733399,.11156664554733399,.09149002162245,.09149002162245,.06904454273764123,.06904454273764123,.0448142267656996,.0448142267656996,.019461788229726478,.019461788229726478],[.15275338713072584,.15275338713072584,.14917298647260374,.14917298647260374,.14209610931838204,.14209610931838204,.13168863844917664,.13168863844917664,.11819453196151841,.11819453196151841,.10193011981724044,.10193011981724044,.08327674157670475,.08327674157670475,.06267204833410907,.06267204833410907,.04060142980038694,.04060142980038694,.017614007139152118,.017614007139152118],[.14608113364969041,.14452440398997005,.14452440398997005,.13988739479107315,.13988739479107315,.13226893863333747,.13226893863333747,.12183141605372853,.12183141605372853,.10879729916714838,.10879729916714838,.09344442345603386,.09344442345603386,.0761001136283793,.0761001136283793,.057134425426857205,.057134425426857205,.036953789770852494,.036953789770852494,.016017228257774335,.016017228257774335],[.13925187285563198,.13925187285563198,.13654149834601517,.13654149834601517,.13117350478706238,.13117350478706238,.12325237681051242,.12325237681051242,.11293229608053922,.11293229608053922,.10041414444288096,.10041414444288096,.08594160621706773,.08594160621706773,.06979646842452049,.06979646842452049,.052293335152683286,.052293335152683286,.03377490158481415,.03377490158481415,.0146279952982722,.0146279952982722],[.13365457218610619,.1324620394046966,.1324620394046966,.12890572218808216,.12890572218808216,.12304908430672953,.12304908430672953,.11499664022241136,.11499664022241136,.10489209146454141,.10489209146454141,.09291576606003515,.09291576606003515,.07928141177671895,.07928141177671895,.06423242140852585,.06423242140852585,.04803767173108467,.04803767173108467,.030988005856979445,.030988005856979445,.013411859487141771,.013411859487141771],[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872]],t.binomialCoefficients=[[1],[1,1],[1,2,1],[1,3,3,1]];var e=(s,c,f)=>{let p,m;const S=f/2;p=0;for(let y=0;y<20;y++)m=S*t.tValues[20][y]+S,p+=t.cValues[20][y]*r(s,c,m);return S*p};t.getCubicArcLength=e;var n=(s,c,f)=>{f===void 0&&(f=1);const p=s[0]-2*s[1]+s[2],m=c[0]-2*c[1]+c[2],E=2*s[1]-2*s[0],S=2*c[1]-2*c[0],y=4*(p*p+m*m),b=4*(p*E+m*S),g=E*E+S*S;if(y===0)return f*Math.sqrt(Math.pow(s[2]-s[0],2)+Math.pow(c[2]-c[0],2));const O=b/(2*y),A=g/y,C=f+O,v=A-O*O,w=C*C+v>0?Math.sqrt(C*C+v):0,T=O*O+v>0?Math.sqrt(O*O+v):0,R=O+Math.sqrt(O*O+v)!==0?v*Math.log(Math.abs((C+w)/(O+T))):0;return Math.sqrt(y)/2*(C*w-O*T+R)};t.getQuadraticArcLength=n;function r(s,c,f){const p=o(1,f,s),m=o(1,f,c),E=p*p+m*m;return Math.sqrt(E)}var o=(s,c,f)=>{const p=f.length-1;let m,E;if(p===0)return 0;if(s===0){E=0;for(let S=0;S<=p;S++)E+=t.binomialCoefficients[p][S]*Math.pow(1-c,p-S)*Math.pow(c,S)*f[S];return E}else{m=new Array(p);for(let S=0;S<p;S++)m[S]=p*(f[S+1]-f[S]);return o(s-1,c,m)}},l=(s,c,f)=>{let p=1,m=s/c,E=(s-f(m))/c,S=0;for(;p>.001;){const y=f(m+E),b=Math.abs(s-y)/c;if(b<p)p=b,m+=E;else{const g=f(m-E),O=Math.abs(s-g)/c;O<p?(p=O,m-=E):E/=2}if(S++,S>500)break}return m};t.t2length=l})),rf=De.__commonJSMin((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Path=void 0;var e=ft(),n=yn(),r=dt(),o=S8(),l=class sr extends n.Shape{constructor(c){super(c),this.dataArray=[],this.pathLength=0,this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute()})}_readDataAttribute(){this.dataArray=sr.parsePathData(this.data()),this.pathLength=sr.getPathLength(this.dataArray)}_sceneFunc(c){const f=this.dataArray;c.beginPath();let p=!1;for(let T=0;T<f.length;T++){const R=f[T].command,L=f[T].points;switch(R){case"L":c.lineTo(L[0],L[1]);break;case"M":c.moveTo(L[0],L[1]);break;case"C":c.bezierCurveTo(L[0],L[1],L[2],L[3],L[4],L[5]);break;case"Q":c.quadraticCurveTo(L[0],L[1],L[2],L[3]);break;case"A":var m=L[0],E=L[1],S=L[2],y=L[3],b=L[4],g=L[5],O=L[6],A=L[7],C=S>y?S:y,v=S>y?1:S/y,w=S>y?y/S:1;c.translate(m,E),c.rotate(O),c.scale(v,w),c.arc(0,0,C,b,b+g,1-A),c.scale(1/v,1/w),c.rotate(-O),c.translate(-m,-E);break;case"z":p=!0,c.closePath()}}!p&&!this.hasFill()?c.strokeShape(this):c.fillStrokeShape(this)}getSelfRect(){let c=[];this.dataArray.forEach(function(b){if(b.command==="A"){const g=b.points[4],O=b.points[5],A=b.points[4]+O;let C=Math.PI/180;if(Math.abs(g-A)<C&&(C=Math.abs(g-A)),O<0)for(let v=g-C;v>A;v-=C){const w=sr.getPointOnEllipticalArc(b.points[0],b.points[1],b.points[2],b.points[3],v,0);c.push(w.x,w.y)}else for(let v=g+C;v<A;v+=C){const w=sr.getPointOnEllipticalArc(b.points[0],b.points[1],b.points[2],b.points[3],v,0);c.push(w.x,w.y)}}else if(b.command==="C")for(let g=0;g<=1;g+=.01){const O=sr.getPointOnCubicBezier(g,b.start.x,b.start.y,b.points[0],b.points[1],b.points[2],b.points[3],b.points[4],b.points[5]);c.push(O.x,O.y)}else c=c.concat(b.points)});let f=c[0],p=c[0],m=c[1],E=c[1],S,y;for(let b=0;b<c.length/2;b++)S=c[b*2],y=c[b*2+1],isNaN(S)||(f=Math.min(f,S),p=Math.max(p,S)),isNaN(y)||(m=Math.min(m,y),E=Math.max(E,y));return{x:f,y:m,width:p-f,height:E-m}}getLength(){return this.pathLength}getPointAtLength(c){return sr.getPointAtLengthOfDataArray(c,this.dataArray)}static getLineLength(c,f,p,m){return Math.sqrt((p-c)*(p-c)+(m-f)*(m-f))}static getPathLength(c){let f=0;for(let p=0;p<c.length;++p)f+=c[p].pathLength;return f}static getPointAtLengthOfDataArray(c,f){let p,m=0,E=f.length;if(!E)return null;for(;m<E&&c>f[m].pathLength;)c-=f[m].pathLength,++m;if(m===E)return p=f[m-1].points.slice(-2),{x:p[0],y:p[1]};if(c<.01)return p=f[m].points.slice(0,2),{x:p[0],y:p[1]};const S=f[m],y=S.points;switch(S.command){case"L":return sr.getPointOnLine(c,S.start.x,S.start.y,y[0],y[1]);case"C":return sr.getPointOnCubicBezier((0,o.t2length)(c,sr.getPathLength(f),T=>(0,o.getCubicArcLength)([S.start.x,y[0],y[2],y[4]],[S.start.y,y[1],y[3],y[5]],T)),S.start.x,S.start.y,y[0],y[1],y[2],y[3],y[4],y[5]);case"Q":return sr.getPointOnQuadraticBezier((0,o.t2length)(c,sr.getPathLength(f),T=>(0,o.getQuadraticArcLength)([S.start.x,y[0],y[2]],[S.start.y,y[1],y[3]],T)),S.start.x,S.start.y,y[0],y[1],y[2],y[3]);case"A":var b=y[0],g=y[1],O=y[2],A=y[3],C=y[4],v=y[5],w=y[6];return C+=v*c/S.pathLength,sr.getPointOnEllipticalArc(b,g,O,A,C,w)}return null}static getPointOnLine(c,f,p,m,E,S,y){S=S??f,y=y??p;const b=this.getLineLength(f,p,m,E);if(b<1e-10)return{x:f,y:p};if(m===f)return{x:S,y:y+(E>p?c:-c)};const g=(E-p)/(m-f),O=Math.sqrt(c*c/(1+g*g))*(m<f?-1:1),A=g*O;if(Math.abs(y-p-g*(S-f))<1e-10)return{x:S+O,y:y+A};const C=((S-f)*(m-f)+(y-p)*(E-p))/(b*b),v=f+C*(m-f),w=p+C*(E-p),T=this.getLineLength(S,y,v,w),R=Math.sqrt(c*c-T*T),L=Math.sqrt(R*R/(1+g*g))*(m<f?-1:1),j=g*L;return{x:v+L,y:w+j}}static getPointOnCubicBezier(c,f,p,m,E,S,y,b,g){function O(w){return w*w*w}function A(w){return 3*w*w*(1-w)}function C(w){return 3*w*(1-w)*(1-w)}function v(w){return(1-w)*(1-w)*(1-w)}return{x:b*O(c)+S*A(c)+m*C(c)+f*v(c),y:g*O(c)+y*A(c)+E*C(c)+p*v(c)}}static getPointOnQuadraticBezier(c,f,p,m,E,S,y){function b(A){return A*A}function g(A){return 2*A*(1-A)}function O(A){return(1-A)*(1-A)}return{x:S*b(c)+m*g(c)+f*O(c),y:y*b(c)+E*g(c)+p*O(c)}}static getPointOnEllipticalArc(c,f,p,m,E,S){const y=Math.cos(S),b=Math.sin(S),g={x:p*Math.cos(E),y:m*Math.sin(E)};return{x:c+(g.x*y-g.y*b),y:f+(g.x*b+g.y*y)}}static parsePathData(c){if(!c)return[];let f=c;const p=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"];f=f.replace(new RegExp(" ","g"),",");for(var m=0;m<p.length;m++)f=f.replace(new RegExp(p[m],"g"),"|"+p[m]);const E=f.split("|"),S=[],y=[];let b=0,g=0;const O=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi;let A;for(m=1;m<E.length;m++){let _=E[m],D=_.charAt(0);for(_=_.slice(1),y.length=0;A=O.exec(_);)y.push(A[0]);const N=[];for(let H=0,V=y.length;H<V;H++){if(y[H]==="00"){N.push(0,0);continue}const W=parseFloat(y[H]);isNaN(W)?N.push(0):N.push(W)}for(;N.length>0&&!isNaN(N[0]);){let H="",V=[];const W=b,$=g;var C,v,w,T,R,L,j,I,z,k;switch(D){case"l":b+=N.shift(),g+=N.shift(),H="L",V.push(b,g);break;case"L":b=N.shift(),g=N.shift(),V.push(b,g);break;case"m":var F=N.shift(),G=N.shift();if(b+=F,g+=G,H="M",S.length>2&&S[S.length-1].command==="z"){for(let Q=S.length-2;Q>=0;Q--)if(S[Q].command==="M"){b=S[Q].points[0]+F,g=S[Q].points[1]+G;break}}V.push(b,g),D="l";break;case"M":b=N.shift(),g=N.shift(),H="M",V.push(b,g),D="L";break;case"h":b+=N.shift(),H="L",V.push(b,g);break;case"H":b=N.shift(),H="L",V.push(b,g);break;case"v":g+=N.shift(),H="L",V.push(b,g);break;case"V":g=N.shift(),H="L",V.push(b,g);break;case"C":V.push(N.shift(),N.shift(),N.shift(),N.shift()),b=N.shift(),g=N.shift(),V.push(b,g);break;case"c":V.push(b+N.shift(),g+N.shift(),b+N.shift(),g+N.shift()),b+=N.shift(),g+=N.shift(),H="C",V.push(b,g);break;case"S":v=b,w=g,C=S[S.length-1],C.command==="C"&&(v=b+(b-C.points[2]),w=g+(g-C.points[3])),V.push(v,w,N.shift(),N.shift()),b=N.shift(),g=N.shift(),H="C",V.push(b,g);break;case"s":v=b,w=g,C=S[S.length-1],C.command==="C"&&(v=b+(b-C.points[2]),w=g+(g-C.points[3])),V.push(v,w,b+N.shift(),g+N.shift()),b+=N.shift(),g+=N.shift(),H="C",V.push(b,g);break;case"Q":V.push(N.shift(),N.shift()),b=N.shift(),g=N.shift(),V.push(b,g);break;case"q":V.push(b+N.shift(),g+N.shift()),b+=N.shift(),g+=N.shift(),H="Q",V.push(b,g);break;case"T":v=b,w=g,C=S[S.length-1],C.command==="Q"&&(v=b+(b-C.points[0]),w=g+(g-C.points[1])),b=N.shift(),g=N.shift(),H="Q",V.push(v,w,b,g);break;case"t":v=b,w=g,C=S[S.length-1],C.command==="Q"&&(v=b+(b-C.points[0]),w=g+(g-C.points[1])),b+=N.shift(),g+=N.shift(),H="Q",V.push(v,w,b,g);break;case"A":T=N.shift(),R=N.shift(),L=N.shift(),j=N.shift(),I=N.shift(),z=b,k=g,b=N.shift(),g=N.shift(),H="A",V=this.convertEndpointToCenterParameterization(z,k,b,g,j,I,T,R,L);break;case"a":T=N.shift(),R=N.shift(),L=N.shift(),j=N.shift(),I=N.shift(),z=b,k=g,b+=N.shift(),g+=N.shift(),H="A",V=this.convertEndpointToCenterParameterization(z,k,b,g,j,I,T,R,L)}S.push({command:H||D,points:V,start:{x:W,y:$},pathLength:this.calcLength(W,$,H||D,V)})}(D==="z"||D==="Z")&&S.push({command:"z",points:[],start:void 0,pathLength:0})}return S}static calcLength(c,f,p,m){let E,S,y,b;const g=sr;switch(p){case"L":return g.getLineLength(c,f,m[0],m[1]);case"C":return(0,o.getCubicArcLength)([c,m[0],m[2],m[4]],[f,m[1],m[3],m[5]],1);case"Q":return(0,o.getQuadraticArcLength)([c,m[0],m[2]],[f,m[1],m[3]],1);case"A":E=0;var O=m[4],A=m[5],C=m[4]+A,v=Math.PI/180;if(Math.abs(O-C)<v&&(v=Math.abs(O-C)),S=g.getPointOnEllipticalArc(m[0],m[1],m[2],m[3],O,0),A<0)for(b=O-v;b>C;b-=v)y=g.getPointOnEllipticalArc(m[0],m[1],m[2],m[3],b,0),E+=g.getLineLength(S.x,S.y,y.x,y.y),S=y;else for(b=O+v;b<C;b+=v)y=g.getPointOnEllipticalArc(m[0],m[1],m[2],m[3],b,0),E+=g.getLineLength(S.x,S.y,y.x,y.y),S=y;return y=g.getPointOnEllipticalArc(m[0],m[1],m[2],m[3],C,0),E+=g.getLineLength(S.x,S.y,y.x,y.y),E}return 0}static convertEndpointToCenterParameterization(c,f,p,m,E,S,y,b,g){const O=g*(Math.PI/180),A=Math.cos(O)*(c-p)/2+Math.sin(O)*(f-m)/2,C=-1*Math.sin(O)*(c-p)/2+Math.cos(O)*(f-m)/2,v=A*A/(y*y)+C*C/(b*b);v>1&&(y*=Math.sqrt(v),b*=Math.sqrt(v));let w=Math.sqrt((y*y*(b*b)-y*y*(C*C)-b*b*(A*A))/(y*y*(C*C)+b*b*(A*A)));E===S&&(w*=-1),isNaN(w)&&(w=0);const T=w*y*C/b,R=w*-b*A/y,L=(c+p)/2+Math.cos(O)*T-Math.sin(O)*R,j=(f+m)/2+Math.sin(O)*T+Math.cos(O)*R,I=function(N){return Math.sqrt(N[0]*N[0]+N[1]*N[1])},z=function(N,H){return(N[0]*H[0]+N[1]*H[1])/(I(N)*I(H))},k=function(N,H){return(N[0]*H[1]<N[1]*H[0]?-1:1)*Math.acos(z(N,H))},F=k([1,0],[(A-T)/y,(C-R)/b]),G=[(A-T)/y,(C-R)/b],_=[(-1*A-T)/y,(-1*C-R)/b];let D=k(G,_);return z(G,_)<=-1&&(D=Math.PI),z(G,_)>=1&&(D=0),S===0&&D>0&&(D=D-2*Math.PI),S===1&&D<0&&(D=D+2*Math.PI),[L,j,y,b,F,D,O,S]}};t.Path=l,l.prototype.className="Path",l.prototype._attrsAffectingSize=["data"],(0,r._registerNode)(l),e.Factory.addGetterSetter(l,"data")})),E8=De.__commonJSMin((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Arrow=void 0;var e=ft(),n=R2(),r=pt(),o=dt(),l=rf(),s=class extends n.Line{_sceneFunc(c){super._sceneFunc(c);const f=Math.PI*2,p=this.points();let m=p;const E=this.tension()!==0&&p.length>4;E&&(m=this.getTensionPoints());const S=this.pointerLength(),y=p.length;let b,g;if(E){const C=[m[m.length-4],m[m.length-3],m[m.length-2],m[m.length-1],p[y-2],p[y-1]],v=l.Path.calcLength(m[m.length-4],m[m.length-3],"C",C),w=l.Path.getPointOnQuadraticBezier(Math.min(1,1-S/v),C[0],C[1],C[2],C[3],C[4],C[5]);b=p[y-2]-w.x,g=p[y-1]-w.y}else b=p[y-2]-p[y-4],g=p[y-1]-p[y-3];const O=(Math.atan2(g,b)+f)%f,A=this.pointerWidth();this.pointerAtEnding()&&(c.save(),c.beginPath(),c.translate(p[y-2],p[y-1]),c.rotate(O),c.moveTo(0,0),c.lineTo(-S,A/2),c.lineTo(-S,-A/2),c.closePath(),c.restore(),this.__fillStroke(c)),this.pointerAtBeginning()&&(c.save(),c.beginPath(),c.translate(p[0],p[1]),E?(b=(m[0]+m[2])/2-p[0],g=(m[1]+m[3])/2-p[1]):(b=p[2]-p[0],g=p[3]-p[1]),c.rotate((Math.atan2(-g,-b)+f)%f),c.moveTo(0,0),c.lineTo(-S,A/2),c.lineTo(-S,-A/2),c.closePath(),c.restore(),this.__fillStroke(c))}__fillStroke(c){const f=this.dashEnabled();f&&(this.attrs.dashEnabled=!1,c.setLineDash([])),c.fillStrokeShape(this),f&&(this.attrs.dashEnabled=!0)}getSelfRect(){const c=super.getSelfRect(),f=this.pointerWidth()/2;return{x:c.x,y:c.y-f,width:c.width,height:c.height+f*2}}};t.Arrow=s,s.prototype.className="Arrow",(0,o._registerNode)(s),e.Factory.addGetterSetter(s,"pointerLength",10,(0,r.getNumberValidator)()),e.Factory.addGetterSetter(s,"pointerWidth",10,(0,r.getNumberValidator)()),e.Factory.addGetterSetter(s,"pointerAtBeginning",!1),e.Factory.addGetterSetter(s,"pointerAtEnding",!0)})),x8=De.__commonJSMin((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Circle=void 0;var e=ft(),n=yn(),r=pt(),o=dt(),l=class extends n.Shape{_sceneFunc(s){s.beginPath(),s.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),s.closePath(),s.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(s){this.radius()!==s/2&&this.radius(s/2)}setHeight(s){this.radius()!==s/2&&this.radius(s/2)}};t.Circle=l,l.prototype._centroid=!0,l.prototype.className="Circle",l.prototype._attrsAffectingSize=["radius"],(0,o._registerNode)(l),e.Factory.addGetterSetter(l,"radius",0,(0,r.getNumberValidator)())})),O8=De.__commonJSMin((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Ellipse=void 0;var e=ft(),n=yn(),r=pt(),o=dt(),l=class extends n.Shape{_sceneFunc(s){const c=this.radiusX(),f=this.radiusY();s.beginPath(),s.save(),c!==f&&s.scale(1,f/c),s.arc(0,0,c,0,Math.PI*2,!1),s.restore(),s.closePath(),s.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(s){this.radiusX(s/2)}setHeight(s){this.radiusY(s/2)}};t.Ellipse=l,l.prototype.className="Ellipse",l.prototype._centroid=!0,l.prototype._attrsAffectingSize=["radiusX","radiusY"],(0,o._registerNode)(l),e.Factory.addComponentsGetterSetter(l,"radius",["x","y"]),e.Factory.addGetterSetter(l,"radiusX",0,(0,r.getNumberValidator)()),e.Factory.addGetterSetter(l,"radiusY",0,(0,r.getNumberValidator)())})),w8=De.__commonJSMin((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Image=void 0;var e=Wt(),n=ft(),r=yn(),o=dt(),l=pt(),s=class s8 extends r.Shape{constructor(f){super(f),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const f=this.image();f&&f.complete||f&&f.readyState===4||f&&f.addEventListener&&f.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){const f=!!this.cornerRadius(),p=this.hasShadow();return f&&p?!0:super._useBufferCanvas(!0)}_sceneFunc(f){const p=this.getWidth(),m=this.getHeight(),E=this.cornerRadius(),S=this.attrs.image;let y;if(S){const b=this.attrs.cropWidth,g=this.attrs.cropHeight;b&&g?y=[S,this.cropX(),this.cropY(),b,g,0,0,p,m]:y=[S,0,0,p,m]}(this.hasFill()||this.hasStroke()||E)&&(f.beginPath(),E?e.Util.drawRoundedRectPath(f,p,m,E):f.rect(0,0,p,m),f.closePath(),f.fillStrokeShape(this)),S&&(E&&f.clip(),f.drawImage.apply(f,y))}_hitFunc(f){const p=this.width(),m=this.height(),E=this.cornerRadius();f.beginPath(),E?e.Util.drawRoundedRectPath(f,p,m,E):f.rect(0,0,p,m),f.closePath(),f.fillStrokeShape(this)}getWidth(){var f,p;return(f=this.attrs.width)!==null&&f!==void 0?f:(p=this.image())===null||p===void 0?void 0:p.width}getHeight(){var f,p;return(f=this.attrs.height)!==null&&f!==void 0?f:(p=this.image())===null||p===void 0?void 0:p.height}static fromURL(f,p,m=null){const E=e.Util.createImageElement();E.onload=function(){p(new s8({image:E}))},E.onerror=m,E.crossOrigin="Anonymous",E.src=f}};t.Image=s,s.prototype.className="Image",(0,o._registerNode)(s),n.Factory.addGetterSetter(s,"cornerRadius",0,(0,l.getNumberOrArrayOfNumbersValidator)(4)),n.Factory.addGetterSetter(s,"image"),n.Factory.addComponentsGetterSetter(s,"crop",["x","y","width","height"]),n.Factory.addGetterSetter(s,"cropX",0,(0,l.getNumberValidator)()),n.Factory.addGetterSetter(s,"cropY",0,(0,l.getNumberValidator)()),n.Factory.addGetterSetter(s,"cropWidth",0,(0,l.getNumberValidator)()),n.Factory.addGetterSetter(s,"cropHeight",0,(0,l.getNumberValidator)())})),_8=De.__commonJSMin((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Tag=t.Label=void 0;var e=ft(),n=yn(),r=ef(),o=pt(),l=dt(),s=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],c="Change.konva",f="none",p="up",m="right",E="down",S="left",y=s.length,b=class extends r.Group{constructor(O){super(O),this.on("add.konva",function(A){this._addListeners(A.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(O){let A=this,C;const v=function(){A._sync()};for(C=0;C<y;C++)O.on(s[C]+c,v)}getWidth(){return this.getText().width()}getHeight(){return this.getText().height()}_sync(){let O=this.getText(),A=this.getTag(),C,v,w,T,R,L,j;if(O&&A){switch(C=O.width(),v=O.height(),w=A.pointerDirection(),T=A.pointerWidth(),j=A.pointerHeight(),R=0,L=0,w){case p:R=C/2,L=-1*j;break;case m:R=C+T,L=v/2;break;case E:R=C/2,L=v+j;break;case S:R=-1*T,L=v/2}A.setAttrs({x:-1*R,y:-1*L,width:C,height:v}),O.setAttrs({x:-1*R,y:-1*L})}}};t.Label=b,b.prototype.className="Label",(0,l._registerNode)(b);var g=class extends n.Shape{_sceneFunc(O){const A=this.width(),C=this.height(),v=this.pointerDirection(),w=this.pointerWidth(),T=this.pointerHeight(),R=this.cornerRadius();let L=0,j=0,I=0,z=0;typeof R=="number"?L=j=I=z=Math.min(R,A/2,C/2):(L=Math.min(R[0]||0,A/2,C/2),j=Math.min(R[1]||0,A/2,C/2),z=Math.min(R[2]||0,A/2,C/2),I=Math.min(R[3]||0,A/2,C/2)),O.beginPath(),O.moveTo(L,0),v===p&&(O.lineTo((A-w)/2,0),O.lineTo(A/2,-1*T),O.lineTo((A+w)/2,0)),O.lineTo(A-j,0),O.arc(A-j,j,j,Math.PI*3/2,0,!1),v===m&&(O.lineTo(A,(C-T)/2),O.lineTo(A+w,C/2),O.lineTo(A,(C+T)/2)),O.lineTo(A,C-z),O.arc(A-z,C-z,z,0,Math.PI/2,!1),v===E&&(O.lineTo((A+w)/2,C),O.lineTo(A/2,C+T),O.lineTo((A-w)/2,C)),O.lineTo(I,C),O.arc(I,C-I,I,Math.PI/2,Math.PI,!1),v===S&&(O.lineTo(0,(C+T)/2),O.lineTo(-1*w,C/2),O.lineTo(0,(C-T)/2)),O.lineTo(0,L),O.arc(L,L,L,Math.PI,Math.PI*3/2,!1),O.closePath(),O.fillStrokeShape(this)}getSelfRect(){let O=0,A=0,C=this.pointerWidth(),v=this.pointerHeight(),w=this.pointerDirection(),T=this.width(),R=this.height();return w===p?(A-=v,R+=v):w===E?R+=v:w===S?(O-=C*1.5,T+=C):w===m&&(T+=C*1.5),{x:O,y:A,width:T,height:R}}};t.Tag=g,g.prototype.className="Tag",(0,l._registerNode)(g),e.Factory.addGetterSetter(g,"pointerDirection",f),e.Factory.addGetterSetter(g,"pointerWidth",0,(0,o.getNumberValidator)()),e.Factory.addGetterSetter(g,"pointerHeight",0,(0,o.getNumberValidator)()),e.Factory.addGetterSetter(g,"cornerRadius",0,(0,o.getNumberOrArrayOfNumbersValidator)(4))})),j2=De.__commonJSMin((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Rect=void 0;var e=ft(),n=yn(),r=dt(),o=Wt(),l=pt(),s=class extends n.Shape{_sceneFunc(c){const f=this.cornerRadius(),p=this.width(),m=this.height();c.beginPath(),f?o.Util.drawRoundedRectPath(c,p,m,f):c.rect(0,0,p,m),c.closePath(),c.fillStrokeShape(this)}};t.Rect=s,s.prototype.className="Rect",(0,r._registerNode)(s),e.Factory.addGetterSetter(s,"cornerRadius",0,(0,l.getNumberOrArrayOfNumbersValidator)(4))})),T8=De.__commonJSMin((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RegularPolygon=void 0;var e=ft(),n=yn(),r=pt(),o=dt(),l=class extends n.Shape{_sceneFunc(s){const c=this._getPoints();s.beginPath(),s.moveTo(c[0].x,c[0].y);for(let f=1;f<c.length;f++)s.lineTo(c[f].x,c[f].y);s.closePath(),s.fillStrokeShape(this)}_getPoints(){const s=this.attrs.sides,c=this.attrs.radius||0,f=[];for(let p=0;p<s;p++)f.push({x:c*Math.sin(p*2*Math.PI/s),y:-1*c*Math.cos(p*2*Math.PI/s)});return f}getSelfRect(){const s=this._getPoints();let c=s[0].x,f=s[0].y,p=s[0].x,m=s[0].y;return s.forEach(E=>{c=Math.min(c,E.x),f=Math.max(f,E.x),p=Math.min(p,E.y),m=Math.max(m,E.y)}),{x:c,y:p,width:f-c,height:m-p}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(s){this.radius(s/2)}setHeight(s){this.radius(s/2)}};t.RegularPolygon=l,l.prototype.className="RegularPolygon",l.prototype._centroid=!0,l.prototype._attrsAffectingSize=["radius"],(0,o._registerNode)(l),e.Factory.addGetterSetter(l,"radius",0,(0,r.getNumberValidator)()),e.Factory.addGetterSetter(l,"sides",0,(0,r.getNumberValidator)())})),A8=De.__commonJSMin((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Ring=void 0;var e=ft(),n=yn(),r=pt(),o=dt(),l=Math.PI*2,s=class extends n.Shape{_sceneFunc(c){c.beginPath(),c.arc(0,0,this.innerRadius(),0,l,!1),c.moveTo(this.outerRadius(),0),c.arc(0,0,this.outerRadius(),l,0,!0),c.closePath(),c.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(c){this.outerRadius(c/2)}setHeight(c){this.outerRadius(c/2)}};t.Ring=s,s.prototype.className="Ring",s.prototype._centroid=!0,s.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,o._registerNode)(s),e.Factory.addGetterSetter(s,"innerRadius",0,(0,r.getNumberValidator)()),e.Factory.addGetterSetter(s,"outerRadius",0,(0,r.getNumberValidator)())})),M8=De.__commonJSMin((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Sprite=void 0;var e=ft(),n=yn(),r=tf(),o=pt(),l=dt(),s=class extends n.Shape{constructor(c){super(c),this._updated=!0,this.anim=new r.Animation(()=>{const f=this._updated;return this._updated=!1,f}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){this.anim.isRunning()&&(clearInterval(this.interval),this._setInterval())})}_sceneFunc(c){const f=this.animation(),p=this.frameIndex(),m=p*4,E=this.animations()[f],S=this.frameOffsets(),y=E[m+0],b=E[m+1],g=E[m+2],O=E[m+3],A=this.image();if((this.hasFill()||this.hasStroke())&&(c.beginPath(),c.rect(0,0,g,O),c.closePath(),c.fillStrokeShape(this)),A)if(S){const C=S[f],v=p*2;c.drawImage(A,y,b,g,O,C[v+0],C[v+1],g,O)}else c.drawImage(A,y,b,g,O,0,0,g,O)}_hitFunc(c){const f=this.animation(),p=this.frameIndex(),m=p*4,E=this.animations()[f],S=this.frameOffsets(),y=E[m+2],b=E[m+3];if(c.beginPath(),S){const g=S[f],O=p*2;c.rect(g[O+0],g[O+1],y,b)}else c.rect(0,0,y,b);c.closePath(),c.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){const c=this;this.interval=setInterval(function(){c._updateIndex()},1e3/this.frameRate())}start(){if(this.isRunning())return;const c=this.getLayer();this.anim.setLayers(c),this._setInterval(),this.anim.start()}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){const c=this.frameIndex(),f=this.animation();c<this.animations()[f].length/4-1?this.frameIndex(c+1):this.frameIndex(0)}};t.Sprite=s,s.prototype.className="Sprite",(0,l._registerNode)(s),e.Factory.addGetterSetter(s,"animation"),e.Factory.addGetterSetter(s,"animations"),e.Factory.addGetterSetter(s,"frameOffsets"),e.Factory.addGetterSetter(s,"image"),e.Factory.addGetterSetter(s,"frameIndex",0,(0,o.getNumberValidator)()),e.Factory.addGetterSetter(s,"frameRate",17,(0,o.getNumberValidator)()),e.Factory.backCompat(s,{index:"frameIndex",getIndex:"getFrameIndex",setIndex:"setFrameIndex"})})),I8=De.__commonJSMin((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Star=void 0;var e=ft(),n=yn(),r=pt(),o=dt(),l=class extends n.Shape{_sceneFunc(s){const c=this.innerRadius(),f=this.outerRadius(),p=this.numPoints();s.beginPath(),s.moveTo(0,0-f);for(let m=1;m<p*2;m++){const E=m%2===0?f:c,S=E*Math.sin(m*Math.PI/p),y=-1*E*Math.cos(m*Math.PI/p);s.lineTo(S,y)}s.closePath(),s.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(s){this.outerRadius(s/2)}setHeight(s){this.outerRadius(s/2)}};t.Star=l,l.prototype.className="Star",l.prototype._centroid=!0,l.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,o._registerNode)(l),e.Factory.addGetterSetter(l,"numPoints",5,(0,r.getNumberValidator)()),e.Factory.addGetterSetter(l,"innerRadius",0,(0,r.getNumberValidator)()),e.Factory.addGetterSetter(l,"outerRadius",0,(0,r.getNumberValidator)())})),D2=De.__commonJSMin((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Text=void 0,t.stringToArray=c;var e=Wt(),n=ft(),r=yn(),o=dt(),l=pt(),s=dt();function c(Z){return[...Z].reduce((oe,re,X,q)=>{if(new RegExp("\\p{Emoji}","u").test(re)){const se=q[X+1];se&&new RegExp("\\p{Emoji_Modifier}|\\u200D","u").test(se)?(oe.push(re+se),q[X+1]=""):oe.push(re)}else new RegExp("\\p{Regional_Indicator}{2}","u").test(re+(q[X+1]||""))?oe.push(re+q[X+1]):X>0&&new RegExp("\\p{Mn}|\\p{Me}|\\p{Mc}","u").test(re)?oe[oe.length-1]+=re:re&&oe.push(re);return oe},[])}var f="auto",p="center",m="inherit",E="justify",S="Change.konva",y="2d",b="-",g="left",O="text",A="Text",C="top",v="bottom",w="middle",T="normal",R="px ",L=" ",j="right",I="rtl",z="word",k="char",F="none",G="…",_=["direction","fontFamily","fontSize","fontStyle","fontVariant","padding","align","verticalAlign","lineHeight","text","width","height","wrap","ellipsis","letterSpacing"],D=_.length;function N(Z){return Z.split(",").map(oe=>{oe=oe.trim();const re=oe.indexOf(" ")>=0,X=oe.indexOf('"')>=0||oe.indexOf("'")>=0;return re&&!X&&(oe=`"${oe}"`),oe}).join(", ")}var H;function V(){return H||(H=e.Util.createCanvasElement().getContext(y),H)}function W(Z){Z.fillText(this._partialText,this._partialTextX,this._partialTextY)}function $(Z){Z.setAttr("miterLimit",2),Z.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function Q(Z){return Z=Z||{},!Z.fillLinearGradientColorStops&&!Z.fillRadialGradientColorStops&&!Z.fillPatternImage&&(Z.fill=Z.fill||"black"),Z}var ae=class extends r.Shape{constructor(Z){super(Q(Z)),this._partialTextX=0,this._partialTextY=0;for(let oe=0;oe<D;oe++)this.on(_[oe]+S,this._setTextData);this._setTextData()}_sceneFunc(Z){const oe=this.textArr,re=oe.length;if(!this.text())return;let X=this.padding(),q=this.fontSize(),se=this.lineHeight()*q,he=this.verticalAlign(),de=this.direction(),pe=0,xe=this.align(),Ee=this.getWidth(),Ne=this.letterSpacing(),Xe=this.fill(),Ge=this.textDecoration(),Le=Ge.indexOf("underline")!==-1,je=Ge.indexOf("line-through")!==-1,Pe;de=de===m?Z.direction:de;let ze=se/2,He=w;if(o.Konva._fixTextRendering){const Gt=this.measureSize("M");He="alphabetic",ze=(Gt.fontBoundingBoxAscent-Gt.fontBoundingBoxDescent)/2+se/2}var $e=0,Me=0;for(de===I&&Z.setAttr("direction",de),Z.setAttr("font",this._getContextFont()),Z.setAttr("textBaseline",He),Z.setAttr("textAlign",g),he===w?pe=(this.getHeight()-re*se-X*2)/2:he===v&&(pe=this.getHeight()-re*se-X*2),Z.translate(X,pe+X),Pe=0;Pe<re;Pe++){var $e=0,Me=0,Be=oe[Pe],Ke=Be.text,We=Be.width,et=Be.lastInParagraph,ut,Ot;if(Z.save(),xe===j?$e+=Ee-We-X*2:xe===p&&($e+=(Ee-We-X*2)/2),Le){Z.save(),Z.beginPath();const qe=o.Konva._fixTextRendering?Math.round(q/4):Math.round(q/2),ee=$e,ye=ze+Me+qe;Z.moveTo(ee,ye),ut=Ke.split(" ").length-1,Ot=xe===E&&!et?Ee-X*2:We,Z.lineTo(ee+Math.round(Ot),ye),Z.lineWidth=q/15,Z.strokeStyle=this._getLinearGradient()||Xe,Z.stroke(),Z.restore()}if(je){Z.save(),Z.beginPath();const qe=o.Konva._fixTextRendering?-Math.round(q/4):0;Z.moveTo($e,ze+Me+qe),ut=Ke.split(" ").length-1,Ot=xe===E&&!et?Ee-X*2:We,Z.lineTo($e+Math.round(Ot),ze+Me+qe),Z.lineWidth=q/15,Z.strokeStyle=this._getLinearGradient()||Xe,Z.stroke(),Z.restore()}if(de!==I&&(Ne!==0||xe===E)){ut=Ke.split(" ").length-1;const qe=c(Ke);for(let ee=0;ee<qe.length;ee++){const ye=qe[ee];ye===" "&&!et&&xe===E&&($e+=(Ee-X*2-We)/ut),this._partialTextX=$e,this._partialTextY=ze+Me,this._partialText=ye,Z.fillStrokeShape(this),$e+=this.measureSize(ye).width+Ne}}else Ne!==0&&Z.setAttr("letterSpacing",`${Ne}px`),this._partialTextX=$e,this._partialTextY=ze+Me,this._partialText=Ke,Z.fillStrokeShape(this);Z.restore(),re>1&&(ze+=se)}}_hitFunc(Z){const oe=this.getWidth(),re=this.getHeight();Z.beginPath(),Z.rect(0,0,oe,re),Z.closePath(),Z.fillStrokeShape(this)}setText(Z){const oe=e.Util._isString(Z)?Z:Z==null?"":Z+"";return this._setAttr(O,oe),this}getWidth(){return this.attrs.width===f||this.attrs.width===void 0?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){return this.attrs.height===f||this.attrs.height===void 0?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return e.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(Z){var oe,re,X,q,se,he,de,pe,xe,Ee,Ne;let Xe=V(),Ge=this.fontSize(),Le;Xe.save(),Xe.font=this._getContextFont(),Le=Xe.measureText(Z),Xe.restore();const je=Ge/100;return{actualBoundingBoxAscent:(oe=Le.actualBoundingBoxAscent)!==null&&oe!==void 0?oe:71.58203125*je,actualBoundingBoxDescent:(re=Le.actualBoundingBoxDescent)!==null&&re!==void 0?re:0,actualBoundingBoxLeft:(X=Le.actualBoundingBoxLeft)!==null&&X!==void 0?X:-7.421875*je,actualBoundingBoxRight:(q=Le.actualBoundingBoxRight)!==null&&q!==void 0?q:75.732421875*je,alphabeticBaseline:(se=Le.alphabeticBaseline)!==null&&se!==void 0?se:0,emHeightAscent:(he=Le.emHeightAscent)!==null&&he!==void 0?he:100*je,emHeightDescent:(de=Le.emHeightDescent)!==null&&de!==void 0?de:-20*je,fontBoundingBoxAscent:(pe=Le.fontBoundingBoxAscent)!==null&&pe!==void 0?pe:91*je,fontBoundingBoxDescent:(xe=Le.fontBoundingBoxDescent)!==null&&xe!==void 0?xe:21*je,hangingBaseline:(Ee=Le.hangingBaseline)!==null&&Ee!==void 0?Ee:72.80000305175781*je,ideographicBaseline:(Ne=Le.ideographicBaseline)!==null&&Ne!==void 0?Ne:-21*je,width:Le.width,height:Ge}}_getContextFont(){return this.fontStyle()+L+this.fontVariant()+L+(this.fontSize()+R)+N(this.fontFamily())}_addTextLine(Z){this.align()===E&&(Z=Z.trim());const oe=this._getTextWidth(Z);return this.textArr.push({text:Z,width:oe,lastInParagraph:!1})}_getTextWidth(Z){const oe=this.letterSpacing(),re=Z.length;return V().measureText(Z).width+oe*re}_setTextData(){let Z=this.text().split(`
|
|
4
4
|
`),oe=+this.fontSize(),re=0,X=this.lineHeight()*oe,q=this.attrs.width,se=this.attrs.height,he=q!==f&&q!==void 0,de=se!==f&&se!==void 0,pe=this.padding(),xe=q-pe*2,Ee=se-pe*2,Ne=0,Xe=this.wrap(),Ge=Xe!==k&&Xe!==F,Le=this.ellipsis();this.textArr=[],V().font=this._getContextFont();const je=Le?this._getTextWidth(G):0;for(let Pe=0,ze=Z.length;Pe<ze;++Pe){let He=Z[Pe],$e=this._getTextWidth(He);if(he&&$e>xe)for(;He.length>0;){let Me=0,Be=c(He).length,Ke="",We=0;for(;Me<Be;){const et=Me+Be>>>1,ut=c(He).slice(0,et+1).join(""),Ot=this._getTextWidth(ut)+je;Ot<=xe?(Me=et+1,Ke=ut,We=Ot):Be=et}if(Ke){if(Ge){const et=c(He),ut=c(Ke),Ot=et[ut.length],Gt=Ot===L||Ot===b;let Kt;if(Gt&&We<=xe)Kt=ut.length;else{const qe=ut.lastIndexOf(L),ee=ut.lastIndexOf(b);Kt=Math.max(qe,ee)+1}Kt>0&&(Me=Kt,Ke=et.slice(0,Me).join(""),We=this._getTextWidth(Ke))}if(Ke=Ke.trimRight(),this._addTextLine(Ke),re=Math.max(re,We),Ne+=X,this._shouldHandleEllipsis(Ne)){this._tryToAddEllipsisToLastLine();break}if(He=c(He).slice(Me).join("").trimLeft(),He.length>0&&($e=this._getTextWidth(He),$e<=xe)){this._addTextLine(He),Ne+=X,re=Math.max(re,$e);break}}else break}else this._addTextLine(He),Ne+=X,re=Math.max(re,$e),this._shouldHandleEllipsis(Ne)&&Pe<ze-1&&this._tryToAddEllipsisToLastLine();if(this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0),de&&Ne+X>Ee)break}this.textHeight=oe,this.textWidth=re}_shouldHandleEllipsis(Z){const oe=+this.fontSize(),re=this.lineHeight()*oe,X=this.attrs.height,q=X!==f&&X!==void 0,se=X-this.padding()*2;return this.wrap()===F||q&&Z+re>se}_tryToAddEllipsisToLastLine(){const Z=this.attrs.width,oe=Z!==f&&Z!==void 0,re=Z-this.padding()*2,X=this.ellipsis(),q=this.textArr[this.textArr.length-1];!q||!X||(oe&&(this._getTextWidth(q.text+G)<re||(q.text=q.text.slice(0,q.text.length-3))),this.textArr.splice(this.textArr.length-1,1),this._addTextLine(q.text+G))}getStrokeScaleEnabled(){return!0}_useBufferCanvas(){const Z=this.textDecoration().indexOf("underline")!==-1||this.textDecoration().indexOf("line-through")!==-1,oe=this.hasShadow();return Z&&oe?!0:super._useBufferCanvas()}};t.Text=ae,ae.prototype._fillFunc=W,ae.prototype._strokeFunc=$,ae.prototype.className=A,ae.prototype._attrsAffectingSize=["text","fontSize","padding","wrap","lineHeight","letterSpacing"],(0,s._registerNode)(ae),n.Factory.overWriteSetter(ae,"width",(0,l.getNumberOrAutoValidator)()),n.Factory.overWriteSetter(ae,"height",(0,l.getNumberOrAutoValidator)()),n.Factory.addGetterSetter(ae,"direction",m),n.Factory.addGetterSetter(ae,"fontFamily","Arial"),n.Factory.addGetterSetter(ae,"fontSize",12,(0,l.getNumberValidator)()),n.Factory.addGetterSetter(ae,"fontStyle",T),n.Factory.addGetterSetter(ae,"fontVariant",T),n.Factory.addGetterSetter(ae,"padding",0,(0,l.getNumberValidator)()),n.Factory.addGetterSetter(ae,"align",g),n.Factory.addGetterSetter(ae,"verticalAlign",C),n.Factory.addGetterSetter(ae,"lineHeight",1,(0,l.getNumberValidator)()),n.Factory.addGetterSetter(ae,"wrap",z),n.Factory.addGetterSetter(ae,"ellipsis",!1,(0,l.getBooleanValidator)()),n.Factory.addGetterSetter(ae,"letterSpacing",0,(0,l.getNumberValidator)()),n.Factory.addGetterSetter(ae,"text","",(0,l.getStringValidator)()),n.Factory.addGetterSetter(ae,"textDecoration","")})),N8=De.__commonJSMin((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextPath=void 0;var e=Wt(),n=ft(),r=yn(),o=rf(),l=D2(),s=pt(),c=dt(),f="",p="normal";function m(y){y.fillText(this.partialText,0,0)}function E(y){y.strokeText(this.partialText,0,0)}var S=class extends r.Shape{constructor(y){super(y),this.dummyCanvas=e.Util.createCanvasElement(),this.dataArray=[],this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute(),this._setTextData()}),this.on("textChange.konva alignChange.konva letterSpacingChange.konva kerningFuncChange.konva fontSizeChange.konva fontFamilyChange.konva",this._setTextData),this._setTextData()}_getTextPathLength(){return o.Path.getPathLength(this.dataArray)}_getPointAtLength(y){if(!this.attrs.data)return null;const b=this.pathLength;return y-1>b?null:o.Path.getPointAtLengthOfDataArray(y,this.dataArray)}_readDataAttribute(){this.dataArray=o.Path.parsePathData(this.attrs.data),this.pathLength=this._getTextPathLength()}_sceneFunc(y){y.setAttr("font",this._getContextFont()),y.setAttr("textBaseline",this.textBaseline()),y.setAttr("textAlign","left"),y.save();const b=this.textDecoration(),g=this.fill(),O=this.fontSize(),A=this.glyphInfo;b==="underline"&&y.beginPath();for(let C=0;C<A.length;C++){y.save();const v=A[C].p0;y.translate(v.x,v.y),y.rotate(A[C].rotation),this.partialText=A[C].text,y.fillStrokeShape(this),b==="underline"&&(C===0&&y.moveTo(0,O/2+1),y.lineTo(O,O/2+1)),y.restore()}b==="underline"&&(y.strokeStyle=g,y.lineWidth=O/20,y.stroke()),y.restore()}_hitFunc(y){y.beginPath();const b=this.glyphInfo;if(b.length>=1){const g=b[0].p0;y.moveTo(g.x,g.y)}for(let g=0;g<b.length;g++){const O=b[g].p1;y.lineTo(O.x,O.y)}y.setAttr("lineWidth",this.fontSize()),y.setAttr("strokeStyle",this.colorKey),y.stroke()}getTextWidth(){return this.textWidth}getTextHeight(){return e.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}setText(y){return l.Text.prototype.setText.call(this,y)}_getContextFont(){return l.Text.prototype._getContextFont.call(this)}_getTextSize(y){const b=this.dummyCanvas.getContext("2d");b.save(),b.font=this._getContextFont();const g=b.measureText(y);return b.restore(),{width:g.width,height:parseInt(`${this.fontSize()}`,10)}}_setTextData(){const{width:y,height:b}=this._getTextSize(this.attrs.text);if(this.textWidth=y,this.textHeight=b,this.glyphInfo=[],!this.attrs.data)return null;const g=this.letterSpacing(),O=this.align(),A=this.kerningFunc(),C=Math.max(this.textWidth+((this.attrs.text||"").length-1)*g,0);let v=0;O==="center"&&(v=Math.max(0,this.pathLength/2-C/2)),O==="right"&&(v=Math.max(0,this.pathLength-C));const w=(0,l.stringToArray)(this.text());let T=v;for(let R=0;R<w.length;R++){const L=this._getPointAtLength(T);if(!L)return;let j=this._getTextSize(w[R]).width+g;if(w[R]===" "&&O==="justify"){const _=this.text().split(" ").length-1;j+=(this.pathLength-C)/_}const I=this._getPointAtLength(T+j);if(!I)return;const z=o.Path.getLineLength(L.x,L.y,I.x,I.y);let k=0;if(A)try{k=A(w[R-1],w[R])*this.fontSize()}catch{k=0}L.x+=k,I.x+=k,this.textWidth+=k;const F=o.Path.getPointOnLine(k+z/2,L.x,L.y,I.x,I.y),G=Math.atan2(I.y-L.y,I.x-L.x);this.glyphInfo.push({transposeX:F.x,transposeY:F.y,text:w[R],rotation:G,p0:L,p1:I}),T+=j}}getSelfRect(){if(!this.glyphInfo.length)return{x:0,y:0,width:0,height:0};const y=[];this.glyphInfo.forEach(function(T){y.push(T.p0.x),y.push(T.p0.y),y.push(T.p1.x),y.push(T.p1.y)});let b=y[0]||0,g=y[0]||0,O=y[1]||0,A=y[1]||0,C,v;for(let T=0;T<y.length/2;T++)C=y[T*2],v=y[T*2+1],b=Math.min(b,C),g=Math.max(g,C),O=Math.min(O,v),A=Math.max(A,v);const w=this.fontSize();return{x:b-w/2,y:O-w/2,width:g-b+w,height:A-O+w}}destroy(){return e.Util.releaseCanvas(this.dummyCanvas),super.destroy()}};t.TextPath=S,S.prototype._fillFunc=m,S.prototype._strokeFunc=E,S.prototype._fillFuncHit=m,S.prototype._strokeFuncHit=E,S.prototype.className="TextPath",S.prototype._attrsAffectingSize=["text","fontSize","data"],(0,c._registerNode)(S),n.Factory.addGetterSetter(S,"data"),n.Factory.addGetterSetter(S,"fontFamily","Arial"),n.Factory.addGetterSetter(S,"fontSize",12,(0,s.getNumberValidator)()),n.Factory.addGetterSetter(S,"fontStyle",p),n.Factory.addGetterSetter(S,"align","left"),n.Factory.addGetterSetter(S,"letterSpacing",0,(0,s.getNumberValidator)()),n.Factory.addGetterSetter(S,"textBaseline","middle"),n.Factory.addGetterSetter(S,"fontVariant",p),n.Factory.addGetterSetter(S,"text",f),n.Factory.addGetterSetter(S,"textDecoration",""),n.Factory.addGetterSetter(S,"kerningFunc",void 0)})),P8=De.__commonJSMin((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Transformer=void 0;var e=Wt(),n=ft(),r=rn(),o=yn(),l=j2(),s=ef(),c=dt(),f=pt(),p=dt(),m="tr-konva",E=["resizeEnabledChange","rotateAnchorOffsetChange","rotateEnabledChange","enabledAnchorsChange","anchorSizeChange","borderEnabledChange","borderStrokeChange","borderStrokeWidthChange","borderDashChange","anchorStrokeChange","anchorStrokeWidthChange","anchorFillChange","anchorCornerRadiusChange","ignoreStrokeChange","anchorStyleFuncChange"].map(I=>I+`.${m}`).join(" "),S="nodesRect",y=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],b={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135},g="ontouchstart"in c.Konva._global;function O(I,z,k){if(I==="rotater")return k;z+=e.Util.degToRad(b[I]||0);const F=(e.Util.radToDeg(z)%360+360)%360;return e.Util._inRange(F,337.5,360)||e.Util._inRange(F,0,22.5)?"ns-resize":e.Util._inRange(F,22.5,67.5)?"nesw-resize":e.Util._inRange(F,67.5,112.5)?"ew-resize":e.Util._inRange(F,112.5,157.5)?"nwse-resize":e.Util._inRange(F,157.5,202.5)?"ns-resize":e.Util._inRange(F,202.5,247.5)?"nesw-resize":e.Util._inRange(F,247.5,292.5)?"ew-resize":e.Util._inRange(F,292.5,337.5)?"nwse-resize":(e.Util.error("Transformer has unknown angle for cursor detection: "+F),"pointer")}var A=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"];function C(I){return{x:I.x+I.width/2*Math.cos(I.rotation)+I.height/2*Math.sin(-I.rotation),y:I.y+I.height/2*Math.cos(I.rotation)+I.width/2*Math.sin(I.rotation)}}function v(I,z,k){const F=k.x+(I.x-k.x)*Math.cos(z)-(I.y-k.y)*Math.sin(z),G=k.y+(I.x-k.x)*Math.sin(z)+(I.y-k.y)*Math.cos(z);return{...I,rotation:I.rotation+z,x:F,y:G}}function w(I,z){return v(I,z,C(I))}function T(I,z,k){let F=z;for(let G=0;G<I.length;G++){const _=c.Konva.getAngle(I[G]),D=Math.abs(_-z)%(Math.PI*2);Math.min(D,Math.PI*2-D)<k&&(F=_)}return F}var R=0,L=class extends s.Group{constructor(I){super(I),this._movingAnchorName=null,this._transforming=!1,this._createElements(),this._handleMouseMove=this._handleMouseMove.bind(this),this._handleMouseUp=this._handleMouseUp.bind(this),this.update=this.update.bind(this),this.on(E,this.update),this.getNode()&&this.update()}attachTo(I){return this.setNode(I),this}setNode(I){return e.Util.warn("tr.setNode(shape), tr.node(shape) and tr.attachTo(shape) methods are deprecated. Please use tr.nodes(nodesArray) instead."),this.setNodes([I])}getNode(){return this._nodes&&this._nodes[0]}_getEventNamespace(){return m+this._id}setNodes(I=[]){this._nodes&&this._nodes.length&&this.detach();const z=I.filter(k=>k.isAncestorOf(this)?(e.Util.error("Konva.Transformer cannot be an a child of the node you are trying to attach"),!1):!0);return this._nodes=I=z,I.length===1&&this.useSingleNodeRotation()?this.rotation(I[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach(k=>{const F=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},G=k._attrsAffectingSize.map(_=>_+"Change."+this._getEventNamespace()).join(" ");k.on(G,F),k.on(y.map(_=>_+`.${this._getEventNamespace()}`).join(" "),F),k.on(`absoluteTransformChange.${this._getEventNamespace()}`,F),this._proxyDrag(k)}),this._resetTransformCache(),this.findOne(".top-left")&&this.update(),this}_proxyDrag(I){let z;I.on(`dragstart.${this._getEventNamespace()}`,k=>{z=I.getAbsolutePosition(),!this.isDragging()&&I!==this.findOne(".back")&&this.startDrag(k,!1)}),I.on(`dragmove.${this._getEventNamespace()}`,k=>{if(!z)return;const F=I.getAbsolutePosition(),G=F.x-z.x,_=F.y-z.y;this.nodes().forEach(D=>{if(D===I||D.isDragging())return;const N=D.getAbsolutePosition();D.setAbsolutePosition({x:N.x+G,y:N.y+_}),D.startDrag(k)}),z=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(I=>{I.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(S),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(S,this.__getNodeRect)}__getNodeShape(I,z=this.rotation(),k){const F=I.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),G=I.getAbsoluteScale(k),_=I.getAbsolutePosition(k),D=F.x*G.x-I.offsetX()*G.x,N=F.y*G.y-I.offsetY()*G.y,H=(c.Konva.getAngle(I.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2);return v({x:_.x+D*Math.cos(H)+N*Math.sin(-H),y:_.y+N*Math.cos(H)+D*Math.sin(H),width:F.width*G.x,height:F.height*G.y,rotation:H},-c.Konva.getAngle(z),{x:0,y:0})}__getNodeRect(){if(!this.getNode())return{x:-1e8,y:-1e8,width:0,height:0,rotation:0};const I=[];this.nodes().map(N=>{const H=N.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),V=[{x:H.x,y:H.y},{x:H.x+H.width,y:H.y},{x:H.x+H.width,y:H.y+H.height},{x:H.x,y:H.y+H.height}],W=N.getAbsoluteTransform();V.forEach(function($){const Q=W.point($);I.push(Q)})});const z=new e.Transform;z.rotate(-c.Konva.getAngle(this.rotation()));let k=1/0,F=1/0,G=-1/0,_=-1/0;I.forEach(function(N){const H=z.point(N);k===void 0&&(k=G=H.x,F=_=H.y),k=Math.min(k,H.x),F=Math.min(F,H.y),G=Math.max(G,H.x),_=Math.max(_,H.y)}),z.invert();const D=z.point({x:k,y:F});return{x:D.x,y:D.y,width:G-k,height:_-F,rotation:c.Konva.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),A.forEach(I=>{this._createAnchor(I)}),this._createAnchor("rotater")}_createAnchor(I){const z=new l.Rect({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:I+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:g?10:"auto"}),k=this;z.on("mousedown touchstart",function(F){k._handleMouseDown(F)}),z.on("dragstart",F=>{z.stopDrag(),F.cancelBubble=!0}),z.on("dragend",F=>{F.cancelBubble=!0}),z.on("mouseenter",()=>{const F=O(I,c.Konva.getAngle(this.rotation()),this.rotateAnchorCursor());z.getStage().content&&(z.getStage().content.style.cursor=F),this._cursorChange=!0}),z.on("mouseout",()=>{z.getStage().content&&(z.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(z)}_createBack(){const I=new o.Shape({name:"back",width:0,height:0,draggable:!0,sceneFunc(z,k){const F=k.getParent(),G=F.padding();z.beginPath(),z.rect(-G,-G,k.width()+G*2,k.height()+G*2),z.moveTo(k.width()/2,-G),F.rotateEnabled()&&F.rotateLineVisible()&&z.lineTo(k.width()/2,-F.rotateAnchorOffset()*e.Util._sign(k.height())-G),z.fillStrokeShape(k)},hitFunc:(z,k)=>{if(!this.shouldOverdrawWholeArea())return;const F=this.padding();z.beginPath(),z.rect(-F,-F,k.width()+F*2,k.height()+F*2),z.fillStrokeShape(k)}});this.add(I),this._proxyDrag(I),I.on("dragstart",z=>{z.cancelBubble=!0}),I.on("dragmove",z=>{z.cancelBubble=!0}),I.on("dragend",z=>{z.cancelBubble=!0}),this.on("dragmove",z=>{this.update()})}_handleMouseDown(I){if(this._transforming)return;this._movingAnchorName=I.target.name().split(" ")[0];const z=this._getNodeRect(),k=z.width,F=z.height,G=Math.sqrt(Math.pow(k,2)+Math.pow(F,2));this.sin=Math.abs(F/G),this.cos=Math.abs(k/G),typeof window<"u"&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;const _=I.target.getAbsolutePosition(),D=I.target.getStage().getPointerPosition();this._anchorDragOffset={x:D.x-_.x,y:D.y-_.y},R++,this._fire("transformstart",{evt:I.evt,target:this.getNode()}),this._nodes.forEach(N=>{N._fire("transformstart",{evt:I.evt,target:N})})}_handleMouseMove(I){let z,k,F;const G=this.findOne("."+this._movingAnchorName),_=G.getStage();_.setPointersPositions(I);const D=_.getPointerPosition();let N={x:D.x-this._anchorDragOffset.x,y:D.y-this._anchorDragOffset.y};const H=G.getAbsolutePosition();this.anchorDragBoundFunc()&&(N=this.anchorDragBoundFunc()(H,N,I)),G.setAbsolutePosition(N);const V=G.getAbsolutePosition();if(H.x===V.x&&H.y===V.y)return;if(this._movingAnchorName==="rotater"){const he=this._getNodeRect();z=G.x()-he.width/2,k=-G.y()+he.height/2;let de=Math.atan2(-k,z)+Math.PI/2;he.height<0&&(de-=Math.PI);const pe=c.Konva.getAngle(this.rotation())+de,xe=c.Konva.getAngle(this.rotationSnapTolerance()),Ee=w(he,T(this.rotationSnaps(),pe,xe)-he.rotation);this._fitNodesInto(Ee,I);return}const W=this.shiftBehavior();let $;W==="inverted"?$=this.keepRatio()&&!I.shiftKey:W==="none"?$=this.keepRatio():$=this.keepRatio()||I.shiftKey;var re=this.centeredScaling()||I.altKey;if(this._movingAnchorName==="top-left"){if($){var Q=re?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};F=Math.sqrt(Math.pow(Q.x-G.x(),2)+Math.pow(Q.y-G.y(),2));var ae=this.findOne(".top-left").x()>Q.x?-1:1,Z=this.findOne(".top-left").y()>Q.y?-1:1;z=F*this.cos*ae,k=F*this.sin*Z,this.findOne(".top-left").x(Q.x-z),this.findOne(".top-left").y(Q.y-k)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(G.y());else if(this._movingAnchorName==="top-right"){if($){var Q=re?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};F=Math.sqrt(Math.pow(G.x()-Q.x,2)+Math.pow(Q.y-G.y(),2));var ae=this.findOne(".top-right").x()<Q.x?-1:1,Z=this.findOne(".top-right").y()>Q.y?-1:1;z=F*this.cos*ae,k=F*this.sin*Z,this.findOne(".top-right").x(Q.x+z),this.findOne(".top-right").y(Q.y-k)}var oe=G.position();this.findOne(".top-left").y(oe.y),this.findOne(".bottom-right").x(oe.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(G.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(G.x());else if(this._movingAnchorName==="bottom-left"){if($){var Q=re?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};F=Math.sqrt(Math.pow(Q.x-G.x(),2)+Math.pow(G.y()-Q.y,2));var ae=Q.x<G.x()?-1:1,Z=G.y()<Q.y?-1:1;z=F*this.cos*ae,k=F*this.sin*Z,G.x(Q.x-z),G.y(Q.y+k)}oe=G.position(),this.findOne(".top-left").x(oe.x),this.findOne(".bottom-right").y(oe.y)}else if(this._movingAnchorName==="bottom-center")this.findOne(".bottom-right").y(G.y());else if(this._movingAnchorName==="bottom-right"&&$){var Q=re?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-left").x(),y:this.findOne(".top-left").y()};F=Math.sqrt(Math.pow(G.x()-Q.x,2)+Math.pow(G.y()-Q.y,2));var ae=this.findOne(".bottom-right").x()<Q.x?-1:1,Z=this.findOne(".bottom-right").y()<Q.y?-1:1;z=F*this.cos*ae,k=F*this.sin*Z,this.findOne(".bottom-right").x(Q.x+z),this.findOne(".bottom-right").y(Q.y+k)}var re=this.centeredScaling()||I.altKey;if(re){const he=this.findOne(".top-left"),de=this.findOne(".bottom-right"),pe=he.x(),xe=he.y(),Ee=this.getWidth()-de.x(),Ne=this.getHeight()-de.y();de.move({x:-pe,y:-xe}),he.move({x:Ee,y:Ne})}const X=this.findOne(".top-left").getAbsolutePosition();z=X.x,k=X.y;const q=this.findOne(".bottom-right").x()-this.findOne(".top-left").x(),se=this.findOne(".bottom-right").y()-this.findOne(".top-left").y();this._fitNodesInto({x:z,y:k,width:q,height:se,rotation:c.Konva.getAngle(this.rotation())},I)}_handleMouseUp(I){this._removeEvents(I)}getAbsoluteTransform(){return this.getTransform()}_removeEvents(I){var z;if(this._transforming){this._transforming=!1,typeof window<"u"&&(window.removeEventListener("mousemove",this._handleMouseMove),window.removeEventListener("touchmove",this._handleMouseMove),window.removeEventListener("mouseup",this._handleMouseUp,!0),window.removeEventListener("touchend",this._handleMouseUp,!0));const k=this.getNode();R--,this._fire("transformend",{evt:I,target:k}),(z=this.getLayer())===null||z===void 0||z.batchDraw(),k&&this._nodes.forEach(F=>{var G;F._fire("transformend",{evt:I,target:F}),(G=F.getLayer())===null||G===void 0||G.batchDraw()}),this._movingAnchorName=null}}_fitNodesInto(I,z){const k=this._getNodeRect(),F=1;if(e.Util._inRange(I.width,-this.padding()*2-F,F)){this.update();return}if(e.Util._inRange(I.height,-this.padding()*2-F,F)){this.update();return}const G=new e.Transform;if(G.rotate(c.Konva.getAngle(this.rotation())),this._movingAnchorName&&I.width<0&&this._movingAnchorName.indexOf("left")>=0){const $=G.point({x:-this.padding()*2,y:0});I.x+=$.x,I.y+=$.y,I.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=$.x,this._anchorDragOffset.y-=$.y}else if(this._movingAnchorName&&I.width<0&&this._movingAnchorName.indexOf("right")>=0){const $=G.point({x:this.padding()*2,y:0});this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=$.x,this._anchorDragOffset.y-=$.y,I.width+=this.padding()*2}if(this._movingAnchorName&&I.height<0&&this._movingAnchorName.indexOf("top")>=0){const $=G.point({x:0,y:-this.padding()*2});I.x+=$.x,I.y+=$.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=$.x,this._anchorDragOffset.y-=$.y,I.height+=this.padding()*2}else if(this._movingAnchorName&&I.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const $=G.point({x:0,y:this.padding()*2});this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=$.x,this._anchorDragOffset.y-=$.y,I.height+=this.padding()*2}if(this.boundBoxFunc()){const $=this.boundBoxFunc()(k,I);$?I=$:e.Util.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const _=1e7,D=new e.Transform;D.translate(k.x,k.y),D.rotate(k.rotation),D.scale(k.width/_,k.height/_);const N=new e.Transform,H=I.width/_,V=I.height/_;this.flipEnabled()===!1?(N.translate(I.x,I.y),N.rotate(I.rotation),N.translate(I.width<0?I.width:0,I.height<0?I.height:0),N.scale(Math.abs(H),Math.abs(V))):(N.translate(I.x,I.y),N.rotate(I.rotation),N.scale(H,V));const W=N.multiply(D.invert());this._nodes.forEach($=>{var Q;const ae=$.getParent().getAbsoluteTransform(),Z=$.getTransform().copy();Z.translate($.offsetX(),$.offsetY());const oe=new e.Transform;oe.multiply(ae.copy().invert()).multiply(W).multiply(ae).multiply(Z);const re=oe.decompose();$.setAttrs(re),(Q=$.getLayer())===null||Q===void 0||Q.batchDraw()}),this.rotation(e.Util._getRotation(I.rotation)),this._nodes.forEach($=>{this._fire("transform",{evt:z,target:$}),$._fire("transform",{evt:z,target:$})}),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(I,z){this.findOne(I).setAttrs(z)}update(){var I;const z=this._getNodeRect();this.rotation(e.Util._getRotation(z.rotation));const k=z.width,F=z.height,G=this.enabledAnchors(),_=this.resizeEnabled(),D=this.padding(),N=this.anchorSize(),H=this.find("._anchor");H.forEach(W=>{W.setAttrs({width:N,height:N,offsetX:N/2,offsetY:N/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:N/2+D,offsetY:N/2+D,visible:_&&G.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:k/2,y:0,offsetY:N/2+D,visible:_&&G.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:k,y:0,offsetX:N/2-D,offsetY:N/2+D,visible:_&&G.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:F/2,offsetX:N/2+D,visible:_&&G.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:k,y:F/2,offsetX:N/2-D,visible:_&&G.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:F,offsetX:N/2+D,offsetY:N/2-D,visible:_&&G.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:k/2,y:F,offsetY:N/2-D,visible:_&&G.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:k,y:F,offsetX:N/2-D,offsetY:N/2-D,visible:_&&G.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:k/2,y:-this.rotateAnchorOffset()*e.Util._sign(F)-D,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:k,height:F,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0});const V=this.anchorStyleFunc();V&&H.forEach(W=>{V(W)}),(I=this.getLayer())===null||I===void 0||I.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();const I=this.findOne("."+this._movingAnchorName);I&&I.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),s.Group.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return r.Node.prototype.toObject.call(this)}clone(I){return r.Node.prototype.clone.call(this,I)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}};t.Transformer=L,L.isTransforming=()=>R>0;function j(I){return I instanceof Array||e.Util.warn("enabledAnchors value should be an array"),I instanceof Array&&I.forEach(function(z){A.indexOf(z)===-1&&e.Util.warn("Unknown anchor name: "+z+". Available names are: "+A.join(", "))}),I||[]}L.prototype.className="Transformer",(0,p._registerNode)(L),n.Factory.addGetterSetter(L,"enabledAnchors",A,j),n.Factory.addGetterSetter(L,"flipEnabled",!0,(0,f.getBooleanValidator)()),n.Factory.addGetterSetter(L,"resizeEnabled",!0),n.Factory.addGetterSetter(L,"anchorSize",10,(0,f.getNumberValidator)()),n.Factory.addGetterSetter(L,"rotateEnabled",!0),n.Factory.addGetterSetter(L,"rotateLineVisible",!0),n.Factory.addGetterSetter(L,"rotationSnaps",[]),n.Factory.addGetterSetter(L,"rotateAnchorOffset",50,(0,f.getNumberValidator)()),n.Factory.addGetterSetter(L,"rotateAnchorCursor","crosshair"),n.Factory.addGetterSetter(L,"rotationSnapTolerance",5,(0,f.getNumberValidator)()),n.Factory.addGetterSetter(L,"borderEnabled",!0),n.Factory.addGetterSetter(L,"anchorStroke","rgb(0, 161, 255)"),n.Factory.addGetterSetter(L,"anchorStrokeWidth",1,(0,f.getNumberValidator)()),n.Factory.addGetterSetter(L,"anchorFill","white"),n.Factory.addGetterSetter(L,"anchorCornerRadius",0,(0,f.getNumberValidator)()),n.Factory.addGetterSetter(L,"borderStroke","rgb(0, 161, 255)"),n.Factory.addGetterSetter(L,"borderStrokeWidth",1,(0,f.getNumberValidator)()),n.Factory.addGetterSetter(L,"borderDash"),n.Factory.addGetterSetter(L,"keepRatio",!0),n.Factory.addGetterSetter(L,"shiftBehavior","default"),n.Factory.addGetterSetter(L,"centeredScaling",!1),n.Factory.addGetterSetter(L,"ignoreStroke",!1),n.Factory.addGetterSetter(L,"padding",0,(0,f.getNumberValidator)()),n.Factory.addGetterSetter(L,"nodes"),n.Factory.addGetterSetter(L,"node"),n.Factory.addGetterSetter(L,"boundBoxFunc"),n.Factory.addGetterSetter(L,"anchorDragBoundFunc"),n.Factory.addGetterSetter(L,"anchorStyleFunc"),n.Factory.addGetterSetter(L,"shouldOverdrawWholeArea",!1),n.Factory.addGetterSetter(L,"useSingleNodeRotation",!0),n.Factory.backCompat(L,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"})})),L8=De.__commonJSMin((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Wedge=void 0;var e=ft(),n=yn(),r=dt(),o=pt(),l=dt(),s=class extends n.Shape{_sceneFunc(c){c.beginPath(),c.arc(0,0,this.radius(),0,r.Konva.getAngle(this.angle()),this.clockwise()),c.lineTo(0,0),c.closePath(),c.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(c){this.radius(c/2)}setHeight(c){this.radius(c/2)}};t.Wedge=s,s.prototype.className="Wedge",s.prototype._centroid=!0,s.prototype._attrsAffectingSize=["radius"],(0,l._registerNode)(s),e.Factory.addGetterSetter(s,"radius",0,(0,o.getNumberValidator)()),e.Factory.addGetterSetter(s,"angle",0,(0,o.getNumberValidator)()),e.Factory.addGetterSetter(s,"clockwise",!1),e.Factory.backCompat(s,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"})})),R8=De.__commonJSMin((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Blur=void 0;var e=ft(),n=rn(),r=pt();function o(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var l=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],s=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function c(p,m){const E=p.data,S=p.width,y=p.height;let b,g,O,A,C,v,w,T,R,L,j,I,z,k,F,G,_,D,N,H,V,W,$,Q;const ae=m+m+1,Z=S-1,oe=y-1,re=m+1,X=re*(re+1)/2,q=new o,se=l[m],he=s[m];let de=null,pe=q,xe=null,Ee=null;for(O=1;O<ae;O++)pe=pe.next=new o,O===re&&(de=pe);for(pe.next=q,w=v=0,g=0;g<y;g++){for(G=_=D=N=T=R=L=j=0,I=re*(H=E[v]),z=re*(V=E[v+1]),k=re*(W=E[v+2]),F=re*($=E[v+3]),T+=X*H,R+=X*V,L+=X*W,j+=X*$,pe=q,O=0;O<re;O++)pe.r=H,pe.g=V,pe.b=W,pe.a=$,pe=pe.next;for(O=1;O<re;O++)A=v+((Z<O?Z:O)<<2),T+=(pe.r=H=E[A])*(Q=re-O),R+=(pe.g=V=E[A+1])*Q,L+=(pe.b=W=E[A+2])*Q,j+=(pe.a=$=E[A+3])*Q,G+=H,_+=V,D+=W,N+=$,pe=pe.next;for(xe=q,Ee=de,b=0;b<S;b++)E[v+3]=$=j*se>>he,$!==0?($=255/$,E[v]=(T*se>>he)*$,E[v+1]=(R*se>>he)*$,E[v+2]=(L*se>>he)*$):E[v]=E[v+1]=E[v+2]=0,T-=I,R-=z,L-=k,j-=F,I-=xe.r,z-=xe.g,k-=xe.b,F-=xe.a,A=w+((A=b+m+1)<Z?A:Z)<<2,G+=xe.r=E[A],_+=xe.g=E[A+1],D+=xe.b=E[A+2],N+=xe.a=E[A+3],T+=G,R+=_,L+=D,j+=N,xe=xe.next,I+=H=Ee.r,z+=V=Ee.g,k+=W=Ee.b,F+=$=Ee.a,G-=H,_-=V,D-=W,N-=$,Ee=Ee.next,v+=4;w+=S}for(b=0;b<S;b++){for(_=D=N=G=R=L=j=T=0,v=b<<2,I=re*(H=E[v]),z=re*(V=E[v+1]),k=re*(W=E[v+2]),F=re*($=E[v+3]),T+=X*H,R+=X*V,L+=X*W,j+=X*$,pe=q,O=0;O<re;O++)pe.r=H,pe.g=V,pe.b=W,pe.a=$,pe=pe.next;for(C=S,O=1;O<=m;O++)v=C+b<<2,T+=(pe.r=H=E[v])*(Q=re-O),R+=(pe.g=V=E[v+1])*Q,L+=(pe.b=W=E[v+2])*Q,j+=(pe.a=$=E[v+3])*Q,G+=H,_+=V,D+=W,N+=$,pe=pe.next,O<oe&&(C+=S);for(v=b,xe=q,Ee=de,g=0;g<y;g++)A=v<<2,E[A+3]=$=j*se>>he,$>0?($=255/$,E[A]=(T*se>>he)*$,E[A+1]=(R*se>>he)*$,E[A+2]=(L*se>>he)*$):E[A]=E[A+1]=E[A+2]=0,T-=I,R-=z,L-=k,j-=F,I-=xe.r,z-=xe.g,k-=xe.b,F-=xe.a,A=b+((A=g+re)<oe?A:oe)*S<<2,T+=G+=xe.r=E[A],R+=_+=xe.g=E[A+1],L+=D+=xe.b=E[A+2],j+=N+=xe.a=E[A+3],xe=xe.next,I+=H=Ee.r,z+=V=Ee.g,k+=W=Ee.b,F+=$=Ee.a,G-=H,_-=V,D-=W,N-=$,Ee=Ee.next,v+=S}}var f=function(m){const E=Math.round(this.blurRadius());E>0&&c(m,E)};t.Blur=f,e.Factory.addGetterSetter(n.Node,"blurRadius",0,(0,r.getNumberValidator)(),e.Factory.afterSetFilter)})),j8=De.__commonJSMin((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Brighten=void 0;var e=ft(),n=rn(),r=pt(),o=function(l){const s=this.brightness()*255,c=l.data,f=c.length;for(let p=0;p<f;p+=4)c[p]+=s,c[p+1]+=s,c[p+2]+=s};t.Brighten=o,e.Factory.addGetterSetter(n.Node,"brightness",0,(0,r.getNumberValidator)(),e.Factory.afterSetFilter)})),D8=De.__commonJSMin((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Contrast=void 0;var e=ft(),n=rn(),r=pt(),o=function(l){const s=Math.pow((this.contrast()+100)/100,2),c=l.data,f=c.length;let p=150,m=150,E=150;for(let S=0;S<f;S+=4)p=c[S],m=c[S+1],E=c[S+2],p/=255,p-=.5,p*=s,p+=.5,p*=255,m/=255,m-=.5,m*=s,m+=.5,m*=255,E/=255,E-=.5,E*=s,E+=.5,E*=255,p=p<0?0:p>255?255:p,m=m<0?0:m>255?255:m,E=E<0?0:E>255?255:E,c[S]=p,c[S+1]=m,c[S+2]=E};t.Contrast=o,e.Factory.addGetterSetter(n.Node,"contrast",0,(0,r.getNumberValidator)(),e.Factory.afterSetFilter)})),z8=De.__commonJSMin((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Emboss=void 0;var e=ft(),n=rn(),r=Wt(),o=pt(),l=function(s){const c=this.embossStrength()*10,f=this.embossWhiteLevel()*255,p=this.embossDirection(),m=this.embossBlend(),E=s.data,S=s.width,y=s.height,b=S*4;let g=0,O=0,A=y;switch(p){case"top-left":g=-1,O=-1;break;case"top":g=-1,O=0;break;case"top-right":g=-1,O=1;break;case"right":g=0,O=1;break;case"bottom-right":g=1,O=1;break;case"bottom":g=1,O=0;break;case"bottom-left":g=1,O=-1;break;case"left":g=0,O=-1;break;default:r.Util.error("Unknown emboss direction: "+p)}do{const C=(A-1)*b;let v=g;A+v<1&&(v=0),A+v>y&&(v=0);const w=(A-1+v)*S*4;let T=S;do{const R=C+(T-1)*4;let L=O;T+L<1&&(L=0),T+L>S&&(L=0);const j=w+(T-1+L)*4,I=E[R]-E[j],z=E[R+1]-E[j+1],k=E[R+2]-E[j+2];let F=I;const G=F>0?F:-F,_=z>0?z:-z,D=k>0?k:-k;if(_>G&&(F=z),D>G&&(F=k),F*=c,m){const N=E[R]+F,H=E[R+1]+F,V=E[R+2]+F;E[R]=N>255?255:N<0?0:N,E[R+1]=H>255?255:H<0?0:H,E[R+2]=V>255?255:V<0?0:V}else{let N=f-F;N<0?N=0:N>255&&(N=255),E[R]=E[R+1]=E[R+2]=N}}while(--T)}while(--A)};t.Emboss=l,e.Factory.addGetterSetter(n.Node,"embossStrength",.5,(0,o.getNumberValidator)(),e.Factory.afterSetFilter),e.Factory.addGetterSetter(n.Node,"embossWhiteLevel",.5,(0,o.getNumberValidator)(),e.Factory.afterSetFilter),e.Factory.addGetterSetter(n.Node,"embossDirection","top-left",void 0,e.Factory.afterSetFilter),e.Factory.addGetterSetter(n.Node,"embossBlend",!1,void 0,e.Factory.afterSetFilter)})),B8=De.__commonJSMin((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Enhance=void 0;var e=ft(),n=rn(),r=pt();function o(s,c,f,p,m){const E=f-c,S=m-p;if(E===0)return p+S/2;if(S===0)return p;let y=(s-c)/E;return y=S*y+p,y}var l=function(s){const c=s.data,f=c.length;let p=c[0],m=p,E,S=c[1],y=S,b,g=c[2],O=g,A;const C=this.enhance();if(C===0)return;for(let F=0;F<f;F+=4)E=c[F+0],E<p?p=E:E>m&&(m=E),b=c[F+1],b<S?S=b:b>y&&(y=b),A=c[F+2],A<g?g=A:A>O&&(O=A);m===p&&(m=255,p=0),y===S&&(y=255,S=0),O===g&&(O=255,g=0);let v,w,T,R,L,j,I,z,k;C>0?(w=m+C*(255-m),T=p-C*(p-0),L=y+C*(255-y),j=S-C*(S-0),z=O+C*(255-O),k=g-C*(g-0)):(v=(m+p)*.5,w=m+C*(m-v),T=p+C*(p-v),R=(y+S)*.5,L=y+C*(y-R),j=S+C*(S-R),I=(O+g)*.5,z=O+C*(O-I),k=g+C*(g-I));for(let F=0;F<f;F+=4)c[F+0]=o(c[F+0],p,m,T,w),c[F+1]=o(c[F+1],S,y,j,L),c[F+2]=o(c[F+2],g,O,k,z)};t.Enhance=l,e.Factory.addGetterSetter(n.Node,"enhance",0,(0,r.getNumberValidator)(),e.Factory.afterSetFilter)})),k8=De.__commonJSMin((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Grayscale=void 0;var e=function(n){const r=n.data,o=r.length;for(let l=0;l<o;l+=4){const s=.34*r[l]+.5*r[l+1]+.16*r[l+2];r[l]=s,r[l+1]=s,r[l+2]=s}};t.Grayscale=e})),H8=De.__commonJSMin((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.HSL=void 0;var e=ft(),n=rn(),r=pt();e.Factory.addGetterSetter(n.Node,"hue",0,(0,r.getNumberValidator)(),e.Factory.afterSetFilter),e.Factory.addGetterSetter(n.Node,"saturation",0,(0,r.getNumberValidator)(),e.Factory.afterSetFilter),e.Factory.addGetterSetter(n.Node,"luminance",0,(0,r.getNumberValidator)(),e.Factory.afterSetFilter);var o=function(l){const s=l.data,c=s.length,f=1,p=Math.pow(2,this.saturation()),m=Math.abs(this.hue()+360)%360,E=this.luminance()*127,S=f*p*Math.cos(m*Math.PI/180),y=f*p*Math.sin(m*Math.PI/180),b=.299*f+.701*S+.167*y,g=.587*f-.587*S+.33*y,O=.114*f-.114*S-.497*y,A=.299*f-.299*S-.328*y,C=.587*f+.413*S+.035*y,v=.114*f-.114*S+.293*y,w=.299*f-.3*S+1.25*y,T=.587*f-.586*S-1.05*y,R=.114*f+.886*S-.2*y;let L,j,I,z;for(let k=0;k<c;k+=4)L=s[k+0],j=s[k+1],I=s[k+2],z=s[k+3],s[k+0]=b*L+g*j+O*I+E,s[k+1]=A*L+C*j+v*I+E,s[k+2]=w*L+T*j+R*I+E,s[k+3]=z};t.HSL=o})),F8=De.__commonJSMin((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.HSV=void 0;var e=ft(),n=rn(),r=pt(),o=function(l){const s=l.data,c=s.length,f=Math.pow(2,this.value()),p=Math.pow(2,this.saturation()),m=Math.abs(this.hue()+360)%360,E=f*p*Math.cos(m*Math.PI/180),S=f*p*Math.sin(m*Math.PI/180),y=.299*f+.701*E+.167*S,b=.587*f-.587*E+.33*S,g=.114*f-.114*E-.497*S,O=.299*f-.299*E-.328*S,A=.587*f+.413*E+.035*S,C=.114*f-.114*E+.293*S,v=.299*f-.3*E+1.25*S,w=.587*f-.586*E-1.05*S,T=.114*f+.886*E-.2*S;let R,L,j,I;for(let z=0;z<c;z+=4)R=s[z+0],L=s[z+1],j=s[z+2],I=s[z+3],s[z+0]=y*R+b*L+g*j,s[z+1]=O*R+A*L+C*j,s[z+2]=v*R+w*L+T*j,s[z+3]=I};t.HSV=o,e.Factory.addGetterSetter(n.Node,"hue",0,(0,r.getNumberValidator)(),e.Factory.afterSetFilter),e.Factory.addGetterSetter(n.Node,"saturation",0,(0,r.getNumberValidator)(),e.Factory.afterSetFilter),e.Factory.addGetterSetter(n.Node,"value",0,(0,r.getNumberValidator)(),e.Factory.afterSetFilter)})),V8=De.__commonJSMin((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Invert=void 0;var e=function(n){const r=n.data,o=r.length;for(let l=0;l<o;l+=4)r[l]=255-r[l],r[l+1]=255-r[l+1],r[l+2]=255-r[l+2]};t.Invert=e})),G8=De.__commonJSMin((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Kaleidoscope=void 0;var e=ft(),n=rn(),r=Wt(),o=pt(),l=function(f,p,m){const E=f.data,S=p.data,y=f.width,b=f.height,g=m.polarCenterX||y/2,O=m.polarCenterY||b/2;let A=Math.sqrt(g*g+O*O),C=y-g,v=b-O;const w=Math.sqrt(C*C+v*v);A=w>A?w:A;const T=b,R=y,L=360/R*Math.PI/180;for(let j=0;j<R;j+=1){const I=Math.sin(j*L),z=Math.cos(j*L);for(let k=0;k<T;k+=1){C=Math.floor(g+A*k/T*z),v=Math.floor(O+A*k/T*I);let F=(v*y+C)*4;const G=E[F+0],_=E[F+1],D=E[F+2],N=E[F+3];F=(j+k*y)*4,S[F+0]=G,S[F+1]=_,S[F+2]=D,S[F+3]=N}}},s=function(f,p,m){const E=f.data,S=p.data,y=f.width,b=f.height,g=m.polarCenterX||y/2,O=m.polarCenterY||b/2;let A=Math.sqrt(g*g+O*O),C=y-g,v=b-O;const w=Math.sqrt(C*C+v*v);A=w>A?w:A;const T=b,R=y,L=m.polarRotation||0;let j,I;for(C=0;C<y;C+=1)for(v=0;v<b;v+=1){const z=C-g,k=v-O,F=Math.sqrt(z*z+k*k)*T/A;let G=(Math.atan2(k,z)*180/Math.PI+360+L)%360;G=G*R/360,j=Math.floor(G),I=Math.floor(F);let _=(I*y+j)*4;const D=E[_+0],N=E[_+1],H=E[_+2],V=E[_+3];_=(v*y+C)*4,S[_+0]=D,S[_+1]=N,S[_+2]=H,S[_+3]=V}},c=function(f){const p=f.width,m=f.height;let E,S,y,b,g,O,A,C,v,w,T=Math.round(this.kaleidoscopePower());const R=Math.round(this.kaleidoscopeAngle()),L=Math.floor(p*(R%360)/360);if(T<1)return;const j=r.Util.createCanvasElement();j.width=p,j.height=m;const I=j.getContext("2d").getImageData(0,0,p,m);r.Util.releaseCanvas(j),l(f,I,{polarCenterX:p/2,polarCenterY:m/2});let z=p/Math.pow(2,T);for(;z<=8;)z=z*2,T-=1;z=Math.ceil(z);let k=z,F=0,G=k,_=1;for(L+z>p&&(F=k,G=0,_=-1),S=0;S<m;S+=1)for(E=F;E!==G;E+=_)y=Math.round(E+L)%p,v=(p*S+y)*4,g=I.data[v+0],O=I.data[v+1],A=I.data[v+2],C=I.data[v+3],w=(p*S+E)*4,I.data[w+0]=g,I.data[w+1]=O,I.data[w+2]=A,I.data[w+3]=C;for(S=0;S<m;S+=1)for(k=Math.floor(z),b=0;b<T;b+=1){for(E=0;E<k+1;E+=1)v=(p*S+E)*4,g=I.data[v+0],O=I.data[v+1],A=I.data[v+2],C=I.data[v+3],w=(p*S+k*2-E-1)*4,I.data[w+0]=g,I.data[w+1]=O,I.data[w+2]=A,I.data[w+3]=C;k*=2}s(I,f,{polarRotation:0})};t.Kaleidoscope=c,e.Factory.addGetterSetter(n.Node,"kaleidoscopePower",2,(0,o.getNumberValidator)(),e.Factory.afterSetFilter),e.Factory.addGetterSetter(n.Node,"kaleidoscopeAngle",0,(0,o.getNumberValidator)(),e.Factory.afterSetFilter)})),U8=De.__commonJSMin((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Mask=void 0;var e=ft(),n=rn(),r=pt();function o(y,b,g){let O=(g*y.width+b)*4;const A=[];return A.push(y.data[O++],y.data[O++],y.data[O++],y.data[O++]),A}function l(y,b){return Math.sqrt(Math.pow(y[0]-b[0],2)+Math.pow(y[1]-b[1],2)+Math.pow(y[2]-b[2],2))}function s(y){const b=[0,0,0];for(let g=0;g<y.length;g++)b[0]+=y[g][0],b[1]+=y[g][1],b[2]+=y[g][2];return b[0]/=y.length,b[1]/=y.length,b[2]/=y.length,b}function c(y,b){const g=o(y,0,0),O=o(y,y.width-1,0),A=o(y,0,y.height-1),C=o(y,y.width-1,y.height-1),v=b||10;if(l(g,O)<v&&l(O,C)<v&&l(C,A)<v&&l(A,g)<v){const w=s([O,g,C,A]),T=[];for(let R=0;R<y.width*y.height;R++){const L=l(w,[y.data[R*4],y.data[R*4+1],y.data[R*4+2]]);T[R]=L<v?0:255}return T}}function f(y,b){for(let g=0;g<y.width*y.height;g++)y.data[4*g+3]=b[g]}function p(y,b,g){const O=[1,1,1,1,0,1,1,1,1],A=Math.round(Math.sqrt(O.length)),C=Math.floor(A/2),v=[];for(let w=0;w<g;w++)for(let T=0;T<b;T++){const R=w*b+T;let L=0;for(let j=0;j<A;j++)for(let I=0;I<A;I++){const z=w+j-C,k=T+I-C;if(z>=0&&z<g&&k>=0&&k<b){const F=z*b+k,G=O[j*A+I];L+=y[F]*G}}v[R]=L===2040?255:0}return v}function m(y,b,g){const O=[1,1,1,1,1,1,1,1,1],A=Math.round(Math.sqrt(O.length)),C=Math.floor(A/2),v=[];for(let w=0;w<g;w++)for(let T=0;T<b;T++){const R=w*b+T;let L=0;for(let j=0;j<A;j++)for(let I=0;I<A;I++){const z=w+j-C,k=T+I-C;if(z>=0&&z<g&&k>=0&&k<b){const F=z*b+k,G=O[j*A+I];L+=y[F]*G}}v[R]=L>=1020?255:0}return v}function E(y,b,g){const O=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],A=Math.round(Math.sqrt(O.length)),C=Math.floor(A/2),v=[];for(let w=0;w<g;w++)for(let T=0;T<b;T++){const R=w*b+T;let L=0;for(let j=0;j<A;j++)for(let I=0;I<A;I++){const z=w+j-C,k=T+I-C;if(z>=0&&z<g&&k>=0&&k<b){const F=z*b+k,G=O[j*A+I];L+=y[F]*G}}v[R]=L}return v}var S=function(y){let b=c(y,this.threshold());return b&&(b=p(b,y.width,y.height),b=m(b,y.width,y.height),b=E(b,y.width,y.height),f(y,b)),y};t.Mask=S,e.Factory.addGetterSetter(n.Node,"threshold",0,(0,r.getNumberValidator)(),e.Factory.afterSetFilter)})),$8=De.__commonJSMin((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Noise=void 0;var e=ft(),n=rn(),r=pt(),o=function(l){const s=this.noise()*255,c=l.data,f=c.length,p=s/2;for(let m=0;m<f;m+=4)c[m+0]+=p-2*p*Math.random(),c[m+1]+=p-2*p*Math.random(),c[m+2]+=p-2*p*Math.random()};t.Noise=o,e.Factory.addGetterSetter(n.Node,"noise",.2,(0,r.getNumberValidator)(),e.Factory.afterSetFilter)})),X8=De.__commonJSMin((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Pixelate=void 0;var e=ft(),n=Wt(),r=rn(),o=pt(),l=function(s){let c=Math.ceil(this.pixelSize()),f=s.width,p=s.height,m,E,S,y,b,g,O,A=Math.ceil(f/c),C=Math.ceil(p/c),v,w,T,R,L,j,I,z=s.data;if(c<=0){n.Util.error("pixelSize value can not be <= 0");return}for(L=0;L<A;L+=1)for(j=0;j<C;j+=1){for(y=0,b=0,g=0,O=0,v=L*c,w=v+c,T=j*c,R=T+c,I=0,m=v;m<w;m+=1)if(!(m>=f))for(E=T;E<R;E+=1)E>=p||(S=(f*E+m)*4,y+=z[S+0],b+=z[S+1],g+=z[S+2],O+=z[S+3],I+=1);for(y=y/I,b=b/I,g=g/I,O=O/I,m=v;m<w;m+=1)if(!(m>=f))for(E=T;E<R;E+=1)E>=p||(S=(f*E+m)*4,z[S+0]=y,z[S+1]=b,z[S+2]=g,z[S+3]=O)}};t.Pixelate=l,e.Factory.addGetterSetter(r.Node,"pixelSize",8,(0,o.getNumberValidator)(),e.Factory.afterSetFilter)})),Z8=De.__commonJSMin((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Posterize=void 0;var e=ft(),n=rn(),r=pt(),o=function(l){const s=Math.round(this.levels()*254)+1,c=l.data,f=c.length,p=255/s;for(let m=0;m<f;m+=1)c[m]=Math.floor(c[m]/p)*p};t.Posterize=o,e.Factory.addGetterSetter(n.Node,"levels",.5,(0,r.getNumberValidator)(),e.Factory.afterSetFilter)})),W8=De.__commonJSMin((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RGB=void 0;var e=ft(),n=rn(),r=pt(),o=function(l){const s=l.data,c=s.length,f=this.red(),p=this.green(),m=this.blue();for(let E=0;E<c;E+=4){const S=(.34*s[E]+.5*s[E+1]+.16*s[E+2])/255;s[E]=S*f,s[E+1]=S*p,s[E+2]=S*m,s[E+3]=s[E+3]}};t.RGB=o,e.Factory.addGetterSetter(n.Node,"red",0,function(l){return this._filterUpToDate=!1,l>255?255:l<0?0:Math.round(l)}),e.Factory.addGetterSetter(n.Node,"green",0,function(l){return this._filterUpToDate=!1,l>255?255:l<0?0:Math.round(l)}),e.Factory.addGetterSetter(n.Node,"blue",0,r.RGBComponent,e.Factory.afterSetFilter)})),Y8=De.__commonJSMin((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RGBA=void 0;var e=ft(),n=rn(),r=pt(),o=function(l){const s=l.data,c=s.length,f=this.red(),p=this.green(),m=this.blue(),E=this.alpha();for(let S=0;S<c;S+=4){const y=1-E;s[S]=f*E+s[S]*y,s[S+1]=p*E+s[S+1]*y,s[S+2]=m*E+s[S+2]*y}};t.RGBA=o,e.Factory.addGetterSetter(n.Node,"red",0,function(l){return this._filterUpToDate=!1,l>255?255:l<0?0:Math.round(l)}),e.Factory.addGetterSetter(n.Node,"green",0,function(l){return this._filterUpToDate=!1,l>255?255:l<0?0:Math.round(l)}),e.Factory.addGetterSetter(n.Node,"blue",0,r.RGBComponent,e.Factory.afterSetFilter),e.Factory.addGetterSetter(n.Node,"alpha",1,function(l){return this._filterUpToDate=!1,l>1?1:l<0?0:l})})),K8=De.__commonJSMin((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Sepia=void 0;var e=function(n){const r=n.data,o=r.length;for(let l=0;l<o;l+=4){const s=r[l+0],c=r[l+1],f=r[l+2];r[l+0]=Math.min(255,s*.393+c*.769+f*.189),r[l+1]=Math.min(255,s*.349+c*.686+f*.168),r[l+2]=Math.min(255,s*.272+c*.534+f*.131)}};t.Sepia=e})),q8=De.__commonJSMin((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Solarize=void 0;var e=function(n){const r=n.data,o=n.width,l=n.height,s=o*4;let c=l;do{const f=(c-1)*s;let p=o;do{const m=f+(p-1)*4;let E=r[m],S=r[m+1],y=r[m+2];E>127&&(E=255-E),S>127&&(S=255-S),y>127&&(y=255-y),r[m]=E,r[m+1]=S,r[m+2]=y}while(--p)}while(--c)};t.Solarize=e})),J8=De.__commonJSMin((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Threshold=void 0;var e=ft(),n=rn(),r=pt(),o=function(l){const s=this.threshold()*255,c=l.data,f=c.length;for(let p=0;p<f;p+=1)c[p]=c[p]<s?0:255};t.Threshold=o,e.Factory.addGetterSetter(n.Node,"threshold",.5,(0,r.getNumberValidator)(),e.Factory.afterSetFilter)})),Q8=De.__commonJSMin((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Konva=void 0;var e=nf(),n=C8(),r=E8(),o=x8(),l=O8(),s=w8(),c=_8(),f=R2(),p=rf(),m=j2(),E=T8(),S=A8(),y=M8(),b=I8(),g=D2(),O=N8(),A=P8(),C=L8(),v=R8(),w=j8(),T=D8(),R=z8(),L=B8(),j=k8(),I=H8(),z=F8(),k=V8(),F=G8(),G=U8(),_=$8(),D=X8(),N=Z8(),H=W8(),V=Y8(),W=K8(),$=q8(),Q=J8();t.Konva=e.Konva.Util._assign(e.Konva,{Arc:n.Arc,Arrow:r.Arrow,Circle:o.Circle,Ellipse:l.Ellipse,Image:s.Image,Label:c.Label,Tag:c.Tag,Line:f.Line,Path:p.Path,Rect:m.Rect,RegularPolygon:E.RegularPolygon,Ring:S.Ring,Sprite:y.Sprite,Star:b.Star,Text:g.Text,TextPath:O.TextPath,Transformer:A.Transformer,Wedge:C.Wedge,Filters:{Blur:v.Blur,Brighten:w.Brighten,Contrast:T.Contrast,Emboss:R.Emboss,Enhance:L.Enhance,Grayscale:j.Grayscale,HSL:I.HSL,HSV:z.HSV,Invert:k.Invert,Kaleidoscope:F.Kaleidoscope,Mask:G.Mask,Noise:_.Noise,Pixelate:D.Pixelate,Posterize:N.Posterize,RGB:H.RGB,RGBA:V.RGBA,Sepia:W.Sepia,Solarize:$.Solarize,Threshold:Q.Threshold}})})),e9=De.__commonJSMin(((t,e)=>{Object.defineProperty(t,"__esModule",{value:!0});var n=Q8();e.exports=n.Konva})),t9=De.__commonJSMin(((t,e)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Konva=void 0;var n=nf();Object.defineProperty(t,"Konva",{enumerable:!0,get:function(){return n.Konva}});var r=nf();e.exports=r.Konva})),n9=De.__commonJSMin((t=>{function e(N,H){var V=N.length;N.push(H);e:for(;0<V;){var W=V-1>>>1,$=N[W];if(0<o($,H))N[W]=H,N[V]=$,V=W;else break e}}function n(N){return N.length===0?null:N[0]}function r(N){if(N.length===0)return null;var H=N[0],V=N.pop();if(V!==H){N[0]=V;e:for(var W=0,$=N.length,Q=$>>>1;W<Q;){var ae=2*(W+1)-1,Z=N[ae],oe=ae+1,re=N[oe];if(0>o(Z,V))oe<$&&0>o(re,Z)?(N[W]=re,N[oe]=V,W=oe):(N[W]=Z,N[ae]=V,W=ae);else if(oe<$&&0>o(re,V))N[W]=re,N[oe]=V,W=oe;else break e}}return H}function o(N,H){var V=N.sortIndex-H.sortIndex;return V!==0?V:N.id-H.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;t.unstable_now=function(){return l.now()}}else{var s=Date,c=s.now();t.unstable_now=function(){return s.now()-c}}var f=[],p=[],m=1,E=null,S=3,y=!1,b=!1,g=!1,O=!1,A=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;function w(N){for(var H=n(p);H!==null;){if(H.callback===null)r(p);else if(H.startTime<=N)r(p),H.sortIndex=H.expirationTime,e(f,H);else break;H=n(p)}}function T(N){if(g=!1,w(N),!b)if(n(f)!==null)b=!0,R||(R=!0,F());else{var H=n(p);H!==null&&D(T,H.startTime-N)}}var R=!1,L=-1,j=5,I=-1;function z(){return O?!0:!(t.unstable_now()-I<j)}function k(){if(O=!1,R){var N=t.unstable_now();I=N;var H=!0;try{e:{b=!1,g&&(g=!1,C(L),L=-1),y=!0;var V=S;try{t:{for(w(N),E=n(f);E!==null&&!(E.expirationTime>N&&z());){var W=E.callback;if(typeof W=="function"){E.callback=null,S=E.priorityLevel;var $=W(E.expirationTime<=N);if(N=t.unstable_now(),typeof $=="function"){E.callback=$,w(N),H=!0;break t}E===n(f)&&r(f),w(N)}else r(f);E=n(f)}if(E!==null)H=!0;else{var Q=n(p);Q!==null&&D(T,Q.startTime-N),H=!1}}break e}finally{E=null,S=V,y=!1}H=void 0}}finally{H?F():R=!1}}}var F;if(typeof v=="function")F=function(){v(k)};else if(typeof MessageChannel<"u"){var G=new MessageChannel,_=G.port2;G.port1.onmessage=k,F=function(){_.postMessage(null)}}else F=function(){A(k,0)};function D(N,H){L=A(function(){N(t.unstable_now())},H)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(N){N.callback=null},t.unstable_forceFrameRate=function(N){0>N||125<N||(j=0<N?Math.floor(1e3/N):5)},t.unstable_getCurrentPriorityLevel=function(){return S},t.unstable_next=function(N){switch(S){case 1:case 2:case 3:var H=3;break;default:H=S}var V=S;S=H;try{return N()}finally{S=V}},t.unstable_requestPaint=function(){O=!0},t.unstable_runWithPriority=function(N,H){switch(N){case 1:case 2:case 3:case 4:case 5:break;default:N=3}var V=S;S=N;try{return H()}finally{S=V}},t.unstable_scheduleCallback=function(N,H,V){var W=t.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?W+V:W):V=W,N){case 1:var $=-1;break;case 2:$=250;break;case 5:$=1073741823;break;case 4:$=1e4;break;default:$=5e3}return $=V+$,N={id:m++,callback:H,priorityLevel:N,startTime:V,expirationTime:$,sortIndex:-1},V>W?(N.sortIndex=V,e(p,N),n(f)===null&&N===n(p)&&(g?(C(L),L=-1):g=!0,D(T,V-W))):(N.sortIndex=$,e(f,N),b||y||(b=!0,R||(R=!0,F()))),N},t.unstable_shouldYield=z,t.unstable_wrapCallback=function(N){var H=S;return function(){var V=S;S=H;try{return N.apply(this,arguments)}finally{S=V}}}})),z2=De.__commonJSMin(((t,e)=>{e.exports=n9()})),r9=De.__commonJSMin(((t,e)=>{e.exports=function(n){function r(a,i,d,h){return new zz(a,i,d,h)}function o(){}function l(a){var i="https://react.dev/errors/"+a;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)i+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+a+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(a){var i=a,d=a;if(a.alternate)for(;i.return;)i=i.return;else{a=i;do i=a,(i.flags&4098)!==0&&(d=i.return),a=i.return;while(a)}return i.tag===3?d:null}function c(a){if(s(a)!==a)throw Error(l(188))}function f(a){var i=a.alternate;if(!i){if(i=s(a),i===null)throw Error(l(188));return i!==a?null:a}for(var d=a,h=i;;){var x=d.return;if(x===null)break;var M=x.alternate;if(M===null){if(h=x.return,h!==null){d=h;continue}break}if(x.child===M.child){for(M=x.child;M;){if(M===d)return c(x),a;if(M===h)return c(x),i;M=M.sibling}throw Error(l(188))}if(d.return!==h.return)d=x,h=M;else{for(var U=!1,ne=x.child;ne;){if(ne===d){U=!0,d=x,h=M;break}if(ne===h){U=!0,h=x,d=M;break}ne=ne.sibling}if(!U){for(ne=M.child;ne;){if(ne===d){U=!0,d=M,h=x;break}if(ne===h){U=!0,h=M,d=x;break}ne=ne.sibling}if(!U)throw Error(l(189))}}if(d.alternate!==h)throw Error(l(190))}if(d.tag!==3)throw Error(l(188));return d.stateNode.current===d?a:i}function p(a){var i=a.tag;if(i===5||i===26||i===27||i===6)return a;for(a=a.child;a!==null;){if(i=p(a),i!==null)return i;a=a.sibling}return null}function m(a){var i=a.tag;if(i===5||i===26||i===27||i===6)return a;for(a=a.child;a!==null;){if(a.tag!==4&&(i=m(a),i!==null))return i;a=a.sibling}return null}function E(a){return a===null||typeof a!="object"?null:(a=_7&&a[_7]||a["@@iterator"],typeof a=="function"?a:null)}function S(a){if(a==null)return null;if(typeof a=="function")return a.$$typeof===Vz?null:a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case Tl:return"Fragment";case $h:return"Profiler";case O7:return"StrictMode";case Zh:return"Suspense";case Wh:return"SuspenseList";case Kh:return"Activity"}if(typeof a=="object")switch(a.$$typeof){case _l:return"Portal";case xi:return a.displayName||"Context";case w7:return(a._context.displayName||"Context")+".Consumer";case Xh:var i=a.render;return a=a.displayName,a||(a=i.displayName||i.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case Yh:return i=a.displayName||null,i!==null?i:S(a.type)||"Memo";case Oi:i=a._payload,a=a._init;try{return S(a(i))}catch{}}return null}function y(a){return{current:a}}function b(a){0>Il||(a.current=n2[Il],n2[Il]=null,Il--)}function g(a,i){Il++,n2[Il]=a.current,a.current=i}function O(a){return a>>>=0,a===0?32:31-(vk(a)/gk|0)|0}function A(a){var i=a&42;if(i!==0)return i;switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return a&261888;case 262144:case 524288:case 1048576:case 2097152:return a&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return a&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return a}}function C(a,i,d){var h=a.pendingLanes;if(h===0)return 0;var x=0,M=a.suspendedLanes,U=a.pingedLanes;a=a.warmLanes;var ne=h&134217727;return ne!==0?(h=ne&~M,h!==0?x=A(h):(U&=ne,U!==0?x=A(U):d||(d=ne&~a,d!==0&&(x=A(d))))):(ne=h&~M,ne!==0?x=A(ne):U!==0?x=A(U):d||(d=h&~a,d!==0&&(x=A(d)))),x===0?0:i!==0&&i!==x&&(i&M)===0&&(M=x&-x,d=i&-i,M>=d||M===32&&(d&4194048)!==0)?i:x}function v(a,i){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&i)===0}function w(a,i){switch(a){case 1:case 2:case 4:case 8:case 64:return i+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function T(){var a=Nd;return Nd<<=1,(Nd&62914560)===0&&(Nd=4194304),a}function R(a){for(var i=[],d=0;31>d;d++)i.push(a);return i}function L(a,i){a.pendingLanes|=i,i!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function j(a,i,d,h,x,M){var U=a.pendingLanes;a.pendingLanes=d,a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0,a.expiredLanes&=d,a.entangledLanes&=d,a.errorRecoveryDisabledLanes&=d,a.shellSuspendCounter=0;var ne=a.entanglements,ge=a.expirationTimes,Oe=a.hiddenUpdates;for(d=U&~d;0<d;){var ke=31-xr(d),Ie=1<<ke;ne[ke]=0,ge[ke]=-1;var Ve=Oe[ke];if(Ve!==null)for(Oe[ke]=null,ke=0;ke<Ve.length;ke++){var lt=Ve[ke];lt!==null&&(lt.lane&=-536870913)}d&=~Ie}h!==0&&I(a,h,0),M!==0&&x===0&&a.tag!==0&&(a.suspendedLanes|=M&~(U&~i))}function I(a,i,d){a.pendingLanes|=i,a.suspendedLanes&=~i;var h=31-xr(i);a.entangledLanes|=i,a.entanglements[h]=a.entanglements[h]|1073741824|d&261930}function z(a,i){var d=a.entangledLanes|=i;for(a=a.entanglements;d;){var h=31-xr(d),x=1<<h;x&i|a[h]&i&&(a[h]|=i),d&=~x}}function k(a,i){var d=i&-i;return d=(d&42)!==0?1:F(d),(d&(a.suspendedLanes|i))!==0?0:d}function F(a){switch(a){case 2:a=1;break;case 8:a=4;break;case 32:a=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:a=128;break;case 268435456:a=134217728;break;default:a=0}return a}function G(a){return a&=-a,2<a?8<a?(a&134217727)!==0?32:268435456:8:2}function _(a){if(typeof Ek=="function"&&xk(a),Or&&typeof Or.setStrictMode=="function")try{Or.setStrictMode(ac,a)}catch{}}function D(a,i){return a===i&&(a!==0||1/a===1/i)||a!==a&&i!==i}function N(a){if(i2===void 0)try{throw Error()}catch(d){var i=d.stack.trim().match(/\n( *(at )?)/);i2=i&&i[1]||"",J7=-1<d.stack.indexOf(`
|
|
5
5
|
at`)?" (<anonymous>)":-1<d.stack.indexOf("@")?"@unknown:0:0":""}return`
|