@lotte-innovate/ui-component-test 0.1.76 → 0.1.77
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +9 -11
- package/dist/globals.css +2 -2
- package/dist/lib/_virtual/index.mjs +1 -1
- package/dist/lib/_virtual/index2.mjs +1 -1
- package/dist/lib/_virtual/index3.mjs +1 -1
- package/dist/lib/_virtual/react-is.development.mjs +2 -0
- package/dist/lib/_virtual/react-is.development.mjs.map +1 -0
- package/dist/lib/_virtual/react-is.production.min.mjs +2 -0
- package/dist/lib/_virtual/react-is.production.min.mjs.map +1 -0
- package/dist/lib/components/Editor/index.d.ts +10 -5
- package/dist/lib/components/Editor/index.js +50 -6
- package/dist/lib/components/Footer/index.js +8 -1
- package/dist/lib/components/Gnb/GnbInfo.js +1 -0
- package/dist/lib/components/Gnb/GnbLogo.js +3 -4
- package/dist/lib/components/Gnb/GnbMenu.js +1 -0
- package/dist/lib/components/Gnb/GnbRoot.js +4 -2
- package/dist/lib/components/Grid/Pagination.d.ts +2 -0
- package/dist/lib/components/Grid/Pagination.js +17 -0
- package/dist/lib/components/Grid/index.d.ts +1 -2
- package/dist/lib/components/Grid/index.js +40 -47
- package/dist/lib/components/Grid/useGrid.d.ts +1 -1
- package/dist/lib/components/Grid/useGrid.js +19 -11
- package/dist/lib/components/Slider/index.d.ts +2 -1
- package/dist/lib/components/index.d.ts +2 -1
- package/dist/lib/components/index.js +3 -1
- package/dist/lib/dist/lib/components/BarChart/index.mjs.map +1 -1
- package/dist/lib/dist/lib/components/Breadcrumb/BreadcrumbEllipsis.mjs.map +1 -1
- package/dist/lib/dist/lib/components/Breadcrumb/BreadcrumbItem.mjs.map +1 -1
- package/dist/lib/dist/lib/components/Breadcrumb/BreadcrumbLink.mjs.map +1 -1
- package/dist/lib/dist/lib/components/Breadcrumb/BreadcrumbList.mjs.map +1 -1
- package/dist/lib/dist/lib/components/Breadcrumb/BreadcrumbPage.mjs.map +1 -1
- package/dist/lib/dist/lib/components/Breadcrumb/BreadcrumbSeparator.mjs.map +1 -1
- package/dist/lib/dist/lib/components/BubbleChart/index.mjs.map +1 -1
- package/dist/lib/dist/lib/components/ContextMenu/ContextMenuGroup.mjs.map +1 -1
- package/dist/lib/dist/lib/components/ContextMenu/ContextMenuSeparator.mjs.map +1 -1
- package/dist/lib/dist/lib/components/ContextMenu/ContextMenuTrigger.mjs.map +1 -1
- package/dist/lib/dist/lib/components/Dialog/DialogTrigger.mjs.map +1 -1
- package/dist/lib/dist/lib/components/DoughnutChart/index.mjs.map +1 -1
- package/dist/lib/dist/lib/components/DropdownMenu/DropdonMenuRadioGroup.mjs.map +1 -1
- package/dist/lib/dist/lib/components/DropdownMenu/DropdownMenuSeparator.mjs.map +1 -1
- package/dist/lib/dist/lib/components/DropdownMenu/DropdownMenuSub.mjs.map +1 -1
- package/dist/lib/dist/lib/components/Editor/index.mjs +1 -1
- package/dist/lib/dist/lib/components/Footer/index.mjs +1 -1
- package/dist/lib/dist/lib/components/Gnb/GnbInfo.mjs +1 -0
- package/dist/lib/dist/lib/components/Gnb/GnbInfo.mjs.map +1 -1
- package/dist/lib/dist/lib/components/Gnb/GnbLogo.mjs +1 -1
- package/dist/lib/dist/lib/components/Gnb/GnbLogo.mjs.map +1 -1
- package/dist/lib/dist/lib/components/Gnb/GnbMenu.mjs +2 -1
- package/dist/lib/dist/lib/components/Gnb/GnbMenu.mjs.map +1 -1
- package/dist/lib/dist/lib/components/Gnb/GnbRoot.mjs +1 -1
- package/dist/lib/dist/lib/components/Grid/Pagination.mjs +2 -0
- package/dist/lib/dist/lib/components/Grid/Pagination.mjs.map +1 -0
- package/dist/lib/dist/lib/components/Grid/index.mjs +3 -0
- package/dist/lib/dist/lib/components/Grid/index.mjs.map +1 -0
- package/dist/lib/dist/lib/components/Grid/useGrid.mjs +3 -0
- package/dist/lib/dist/lib/components/Grid/useGrid.mjs.map +1 -0
- package/dist/lib/dist/lib/components/HoverCard/HoverCardTrigger.mjs.map +1 -1
- package/dist/lib/dist/lib/components/LineChart/index.mjs.map +1 -1
- package/dist/lib/dist/lib/components/Menubar/MenubarMenu.mjs.map +1 -1
- package/dist/lib/dist/lib/components/Menubar/MenubarSeparator.mjs.map +1 -1
- package/dist/lib/dist/lib/components/Menubar/MenubarSub.mjs.map +1 -1
- package/dist/lib/dist/lib/components/NavigationMenu/NavigationMenuIndicator.mjs.map +1 -1
- package/dist/lib/dist/lib/components/NavigationMenu/NavigationMenuItem.mjs.map +1 -1
- package/dist/lib/dist/lib/components/PieChart/index.mjs.map +1 -1
- package/dist/lib/dist/lib/components/Popover/PopoverTrigger.mjs.map +1 -1
- package/dist/lib/dist/lib/components/RadarChart/index.mjs.map +1 -1
- package/dist/lib/dist/lib/components/SegmentedControl/SegmentedControlItem.mjs.map +1 -1
- package/dist/lib/dist/lib/constants.mjs +1 -1
- package/dist/lib/dist/lib/constants.mjs.map +1 -1
- package/dist/lib/dist/lib/index.mjs +1 -1
- package/dist/lib/node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/ScriptLoader2.mjs +2 -0
- package/dist/lib/node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/ScriptLoader2.mjs.map +1 -0
- package/dist/lib/node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/TinyMCE.mjs +2 -0
- package/dist/lib/node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/TinyMCE.mjs.map +1 -0
- package/dist/lib/node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/Utils.mjs +2 -0
- package/dist/lib/node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/Utils.mjs.map +1 -0
- package/dist/lib/node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/components/Editor.mjs +2 -0
- package/dist/lib/node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/components/Editor.mjs.map +1 -0
- package/dist/lib/node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/components/EditorPropTypes.mjs +2 -0
- package/dist/lib/node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/components/EditorPropTypes.mjs.map +1 -0
- package/dist/lib/node_modules/marked/lib/marked.esm.mjs +2 -0
- package/dist/lib/node_modules/marked/lib/marked.esm.mjs.map +1 -0
- package/dist/lib/node_modules/object-assign/index.mjs +7 -0
- package/dist/lib/node_modules/object-assign/index.mjs.map +1 -0
- package/dist/lib/node_modules/prop-types/checkPropTypes.mjs +2 -0
- package/dist/lib/node_modules/prop-types/checkPropTypes.mjs.map +1 -0
- package/dist/lib/node_modules/prop-types/factoryWithThrowingShims.mjs +2 -0
- package/dist/lib/node_modules/prop-types/factoryWithThrowingShims.mjs.map +1 -0
- package/dist/lib/node_modules/prop-types/factoryWithTypeCheckers.mjs +2 -0
- package/dist/lib/node_modules/prop-types/factoryWithTypeCheckers.mjs.map +1 -0
- package/dist/lib/node_modules/prop-types/index.mjs +2 -0
- package/dist/lib/node_modules/prop-types/index.mjs.map +1 -0
- package/dist/lib/node_modules/prop-types/lib/ReactPropTypesSecret.mjs +2 -0
- package/dist/lib/node_modules/prop-types/lib/ReactPropTypesSecret.mjs.map +1 -0
- package/dist/lib/node_modules/prop-types/lib/has.mjs +2 -0
- package/dist/lib/node_modules/prop-types/lib/has.mjs.map +1 -0
- package/dist/lib/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.mjs +10 -0
- package/dist/lib/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.mjs.map +1 -0
- package/dist/lib/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.mjs +10 -0
- package/dist/lib/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.mjs.map +1 -0
- package/dist/lib/node_modules/prop-types/node_modules/react-is/index.mjs +2 -0
- package/dist/lib/node_modules/prop-types/node_modules/react-is/index.mjs.map +1 -0
- package/dist/lib/tsconfig.tsbuildinfo +1 -1
- package/dist/lib/types.d.ts +2 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -6
- package/dist/lib/_virtual/_commonjsHelpers.mjs +0 -2
- package/dist/lib/_virtual/_commonjsHelpers.mjs.map +0 -1
- package/dist/lib/_virtual/_interop_require_default.mjs +0 -2
- package/dist/lib/_virtual/_interop_require_default.mjs.map +0 -1
- package/dist/lib/_virtual/_interop_require_wildcard.mjs +0 -2
- package/dist/lib/_virtual/_interop_require_wildcard.mjs.map +0 -1
- package/dist/lib/_virtual/action-async-storage.external.mjs +0 -2
- package/dist/lib/_virtual/action-async-storage.external.mjs.map +0 -1
- package/dist/lib/_virtual/add-base-path.mjs +0 -2
- package/dist/lib/_virtual/add-base-path.mjs.map +0 -1
- package/dist/lib/_virtual/add-locale.mjs +0 -2
- package/dist/lib/_virtual/add-locale.mjs.map +0 -1
- package/dist/lib/_virtual/add-locale2.mjs +0 -2
- package/dist/lib/_virtual/add-locale2.mjs.map +0 -1
- package/dist/lib/_virtual/add-path-prefix.mjs +0 -2
- package/dist/lib/_virtual/add-path-prefix.mjs.map +0 -1
- package/dist/lib/_virtual/amp-context.shared-runtime.mjs +0 -2
- package/dist/lib/_virtual/amp-context.shared-runtime.mjs.map +0 -1
- package/dist/lib/_virtual/amp-mode.mjs +0 -2
- package/dist/lib/_virtual/amp-mode.mjs.map +0 -1
- package/dist/lib/_virtual/app-paths.mjs +0 -2
- package/dist/lib/_virtual/app-paths.mjs.map +0 -1
- package/dist/lib/_virtual/app-router-context.shared-runtime.mjs +0 -2
- package/dist/lib/_virtual/app-router-context.shared-runtime.mjs.map +0 -1
- package/dist/lib/_virtual/async-local-storage.mjs +0 -2
- package/dist/lib/_virtual/async-local-storage.mjs.map +0 -1
- package/dist/lib/_virtual/bailout-to-client-rendering.mjs +0 -2
- package/dist/lib/_virtual/bailout-to-client-rendering.mjs.map +0 -1
- package/dist/lib/_virtual/bailout-to-csr.mjs +0 -2
- package/dist/lib/_virtual/bailout-to-csr.mjs.map +0 -1
- package/dist/lib/_virtual/client-hook-in-server-component-error.mjs +0 -2
- package/dist/lib/_virtual/client-hook-in-server-component-error.mjs.map +0 -1
- package/dist/lib/_virtual/detect-domain-locale.mjs +0 -2
- package/dist/lib/_virtual/detect-domain-locale.mjs.map +0 -1
- package/dist/lib/_virtual/detect-domain-locale2.mjs +0 -2
- package/dist/lib/_virtual/detect-domain-locale2.mjs.map +0 -1
- package/dist/lib/_virtual/ensure-leading-slash.mjs +0 -2
- package/dist/lib/_virtual/ensure-leading-slash.mjs.map +0 -1
- package/dist/lib/_virtual/escape-regexp.mjs +0 -2
- package/dist/lib/_virtual/escape-regexp.mjs.map +0 -1
- package/dist/lib/_virtual/format-url.mjs +0 -2
- package/dist/lib/_virtual/format-url.mjs.map +0 -1
- package/dist/lib/_virtual/get-domain-locale.mjs +0 -2
- package/dist/lib/_virtual/get-domain-locale.mjs.map +0 -1
- package/dist/lib/_virtual/get-img-props.mjs +0 -2
- package/dist/lib/_virtual/get-img-props.mjs.map +0 -1
- package/dist/lib/_virtual/get-segment-value.mjs +0 -2
- package/dist/lib/_virtual/get-segment-value.mjs.map +0 -1
- package/dist/lib/_virtual/has-base-path.mjs +0 -2
- package/dist/lib/_virtual/has-base-path.mjs.map +0 -1
- package/dist/lib/_virtual/head-manager-context.shared-runtime.mjs +0 -2
- package/dist/lib/_virtual/head-manager-context.shared-runtime.mjs.map +0 -1
- package/dist/lib/_virtual/head.mjs +0 -2
- package/dist/lib/_virtual/head.mjs.map +0 -1
- package/dist/lib/_virtual/hooks-client-context.shared-runtime.mjs +0 -2
- package/dist/lib/_virtual/hooks-client-context.shared-runtime.mjs.map +0 -1
- package/dist/lib/_virtual/image-blur-svg.mjs +0 -2
- package/dist/lib/_virtual/image-blur-svg.mjs.map +0 -1
- package/dist/lib/_virtual/image-component.mjs +0 -2
- package/dist/lib/_virtual/image-component.mjs.map +0 -1
- package/dist/lib/_virtual/image-config-context.shared-runtime.mjs +0 -2
- package/dist/lib/_virtual/image-config-context.shared-runtime.mjs.map +0 -1
- package/dist/lib/_virtual/image-config.mjs +0 -2
- package/dist/lib/_virtual/image-config.mjs.map +0 -1
- package/dist/lib/_virtual/image-external.mjs +0 -2
- package/dist/lib/_virtual/image-external.mjs.map +0 -1
- package/dist/lib/_virtual/image-loader.mjs +0 -2
- package/dist/lib/_virtual/image-loader.mjs.map +0 -1
- package/dist/lib/_virtual/image.mjs +0 -2
- package/dist/lib/_virtual/image.mjs.map +0 -1
- package/dist/lib/_virtual/index4.mjs +0 -2
- package/dist/lib/_virtual/index4.mjs.map +0 -1
- package/dist/lib/_virtual/index5.mjs +0 -2
- package/dist/lib/_virtual/index5.mjs.map +0 -1
- package/dist/lib/_virtual/index6.mjs +0 -2
- package/dist/lib/_virtual/index6.mjs.map +0 -1
- package/dist/lib/_virtual/index7.mjs +0 -2
- package/dist/lib/_virtual/index7.mjs.map +0 -1
- package/dist/lib/_virtual/index8.mjs +0 -2
- package/dist/lib/_virtual/index8.mjs.map +0 -1
- package/dist/lib/_virtual/index9.mjs +0 -2
- package/dist/lib/_virtual/index9.mjs.map +0 -1
- package/dist/lib/_virtual/interception-routes.mjs +0 -2
- package/dist/lib/_virtual/interception-routes.mjs.map +0 -1
- package/dist/lib/_virtual/interpolate-as.mjs +0 -2
- package/dist/lib/_virtual/interpolate-as.mjs.map +0 -1
- package/dist/lib/_virtual/is-dynamic.mjs +0 -2
- package/dist/lib/_virtual/is-dynamic.mjs.map +0 -1
- package/dist/lib/_virtual/is-local-url.mjs +0 -2
- package/dist/lib/_virtual/is-local-url.mjs.map +0 -1
- package/dist/lib/_virtual/link.mjs +0 -2
- package/dist/lib/_virtual/link.mjs.map +0 -1
- package/dist/lib/_virtual/link2.mjs +0 -2
- package/dist/lib/_virtual/link2.mjs.map +0 -1
- package/dist/lib/_virtual/match-remote-pattern.mjs +0 -2
- package/dist/lib/_virtual/match-remote-pattern.mjs.map +0 -1
- package/dist/lib/_virtual/navigation.mjs +0 -2
- package/dist/lib/_virtual/navigation.mjs.map +0 -1
- package/dist/lib/_virtual/navigation2.mjs +0 -2
- package/dist/lib/_virtual/navigation2.mjs.map +0 -1
- package/dist/lib/_virtual/normalize-locale-path.mjs +0 -2
- package/dist/lib/_virtual/normalize-locale-path.mjs.map +0 -1
- package/dist/lib/_virtual/normalize-locale-path2.mjs +0 -2
- package/dist/lib/_virtual/normalize-locale-path2.mjs.map +0 -1
- package/dist/lib/_virtual/normalize-trailing-slash.mjs +0 -2
- package/dist/lib/_virtual/normalize-trailing-slash.mjs.map +0 -1
- package/dist/lib/_virtual/not-found.mjs +0 -2
- package/dist/lib/_virtual/not-found.mjs.map +0 -1
- package/dist/lib/_virtual/omit.mjs +0 -2
- package/dist/lib/_virtual/omit.mjs.map +0 -1
- package/dist/lib/_virtual/parse-path.mjs +0 -2
- package/dist/lib/_virtual/parse-path.mjs.map +0 -1
- package/dist/lib/_virtual/path-has-prefix.mjs +0 -2
- package/dist/lib/_virtual/path-has-prefix.mjs.map +0 -1
- package/dist/lib/_virtual/querystring.mjs +0 -2
- package/dist/lib/_virtual/querystring.mjs.map +0 -1
- package/dist/lib/_virtual/redirect-status-code.mjs +0 -2
- package/dist/lib/_virtual/redirect-status-code.mjs.map +0 -1
- package/dist/lib/_virtual/redirect.mjs +0 -2
- package/dist/lib/_virtual/redirect.mjs.map +0 -1
- package/dist/lib/_virtual/remove-trailing-slash.mjs +0 -2
- package/dist/lib/_virtual/remove-trailing-slash.mjs.map +0 -1
- package/dist/lib/_virtual/request-async-storage.external.mjs +0 -2
- package/dist/lib/_virtual/request-async-storage.external.mjs.map +0 -1
- package/dist/lib/_virtual/request-idle-callback.mjs +0 -2
- package/dist/lib/_virtual/request-idle-callback.mjs.map +0 -1
- package/dist/lib/_virtual/resolve-href.mjs +0 -2
- package/dist/lib/_virtual/resolve-href.mjs.map +0 -1
- package/dist/lib/_virtual/route-matcher.mjs +0 -2
- package/dist/lib/_virtual/route-matcher.mjs.map +0 -1
- package/dist/lib/_virtual/route-regex.mjs +0 -2
- package/dist/lib/_virtual/route-regex.mjs.map +0 -1
- package/dist/lib/_virtual/router-context.shared-runtime.mjs +0 -2
- package/dist/lib/_virtual/router-context.shared-runtime.mjs.map +0 -1
- package/dist/lib/_virtual/router-reducer-types.mjs +0 -2
- package/dist/lib/_virtual/router-reducer-types.mjs.map +0 -1
- package/dist/lib/_virtual/segment.mjs +0 -2
- package/dist/lib/_virtual/segment.mjs.map +0 -1
- package/dist/lib/_virtual/server-inserted-html.shared-runtime.mjs +0 -2
- package/dist/lib/_virtual/server-inserted-html.shared-runtime.mjs.map +0 -1
- package/dist/lib/_virtual/side-effect.mjs +0 -2
- package/dist/lib/_virtual/side-effect.mjs.map +0 -1
- package/dist/lib/_virtual/sorted-routes.mjs +0 -2
- package/dist/lib/_virtual/sorted-routes.mjs.map +0 -1
- package/dist/lib/_virtual/static-generation-async-storage.external.mjs +0 -2
- package/dist/lib/_virtual/static-generation-async-storage.external.mjs.map +0 -1
- package/dist/lib/_virtual/toastui-editor-plugin-color-syntax.mjs +0 -2
- package/dist/lib/_virtual/toastui-editor-plugin-color-syntax.mjs.map +0 -1
- package/dist/lib/_virtual/toastui-editor-plugin-color-syntax2.mjs +0 -2
- package/dist/lib/_virtual/toastui-editor-plugin-color-syntax2.mjs.map +0 -1
- package/dist/lib/_virtual/toastui-editor-viewer.mjs +0 -2
- package/dist/lib/_virtual/toastui-editor-viewer.mjs.map +0 -1
- package/dist/lib/_virtual/toastui-editor-viewer2.mjs +0 -2
- package/dist/lib/_virtual/toastui-editor-viewer2.mjs.map +0 -1
- package/dist/lib/_virtual/tui-color-picker.mjs +0 -2
- package/dist/lib/_virtual/tui-color-picker.mjs.map +0 -1
- package/dist/lib/_virtual/use-intersection.mjs +0 -2
- package/dist/lib/_virtual/use-intersection.mjs.map +0 -1
- package/dist/lib/_virtual/utils.mjs +0 -2
- package/dist/lib/_virtual/utils.mjs.map +0 -1
- package/dist/lib/_virtual/warn-once.mjs +0 -2
- package/dist/lib/_virtual/warn-once.mjs.map +0 -1
- package/dist/lib/dist/lib/components/Timeline/TimelineConnector.mjs +0 -2
- package/dist/lib/dist/lib/components/Timeline/TimelineConnector.mjs.map +0 -1
- package/dist/lib/dist/lib/components/Timeline/TimelineContent.mjs +0 -2
- package/dist/lib/dist/lib/components/Timeline/TimelineContent.mjs.map +0 -1
- package/dist/lib/dist/lib/components/Timeline/TimelineDescription.mjs +0 -2
- package/dist/lib/dist/lib/components/Timeline/TimelineDescription.mjs.map +0 -1
- package/dist/lib/dist/lib/components/Timeline/TimelineHeader.mjs +0 -2
- package/dist/lib/dist/lib/components/Timeline/TimelineHeader.mjs.map +0 -1
- package/dist/lib/dist/lib/components/Timeline/TimelineIcon.mjs +0 -2
- package/dist/lib/dist/lib/components/Timeline/TimelineIcon.mjs.map +0 -1
- package/dist/lib/dist/lib/components/Timeline/TimelineItem.mjs +0 -2
- package/dist/lib/dist/lib/components/Timeline/TimelineItem.mjs.map +0 -1
- package/dist/lib/dist/lib/components/Timeline/TimelineRoot.mjs +0 -3
- package/dist/lib/dist/lib/components/Timeline/TimelineRoot.mjs.map +0 -1
- package/dist/lib/dist/lib/components/Timeline/TimelineTime.mjs +0 -2
- package/dist/lib/dist/lib/components/Timeline/TimelineTime.mjs.map +0 -1
- package/dist/lib/dist/lib/components/Timeline/TimelineTitle.mjs +0 -2
- package/dist/lib/dist/lib/components/Timeline/TimelineTitle.mjs.map +0 -1
- package/dist/lib/dist/lib/components/Timeline/index.mjs +0 -2
- package/dist/lib/dist/lib/components/Timeline/index.mjs.map +0 -1
- package/dist/lib/node_modules/@swc/helpers/cjs/_interop_require_default.mjs +0 -2
- package/dist/lib/node_modules/@swc/helpers/cjs/_interop_require_default.mjs.map +0 -1
- package/dist/lib/node_modules/@swc/helpers/cjs/_interop_require_wildcard.mjs +0 -2
- package/dist/lib/node_modules/@swc/helpers/cjs/_interop_require_wildcard.mjs.map +0 -1
- package/dist/lib/node_modules/@toast-ui/editor/dist/esm/index.mjs +0 -37
- package/dist/lib/node_modules/@toast-ui/editor/dist/esm/index.mjs.map +0 -1
- package/dist/lib/node_modules/@toast-ui/editor/dist/toastui-editor-viewer.mjs +0 -24
- package/dist/lib/node_modules/@toast-ui/editor/dist/toastui-editor-viewer.mjs.map +0 -1
- package/dist/lib/node_modules/@toast-ui/editor-plugin-color-syntax/dist/toastui-editor-plugin-color-syntax.mjs +0 -8
- package/dist/lib/node_modules/@toast-ui/editor-plugin-color-syntax/dist/toastui-editor-plugin-color-syntax.mjs.map +0 -1
- package/dist/lib/node_modules/@toast-ui/react-editor/dist/esm/index.mjs +0 -22
- package/dist/lib/node_modules/@toast-ui/react-editor/dist/esm/index.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/client/add-base-path.mjs +0 -2
- package/dist/lib/node_modules/next/dist/client/add-base-path.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/client/add-locale.mjs +0 -2
- package/dist/lib/node_modules/next/dist/client/add-locale.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/client/components/action-async-storage.external.mjs +0 -2
- package/dist/lib/node_modules/next/dist/client/components/action-async-storage.external.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/client/components/async-local-storage.mjs +0 -2
- package/dist/lib/node_modules/next/dist/client/components/async-local-storage.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/client/components/bailout-to-client-rendering.mjs +0 -2
- package/dist/lib/node_modules/next/dist/client/components/bailout-to-client-rendering.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/client/components/client-hook-in-server-component-error.mjs +0 -2
- package/dist/lib/node_modules/next/dist/client/components/client-hook-in-server-component-error.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/client/components/navigation.mjs +0 -2
- package/dist/lib/node_modules/next/dist/client/components/navigation.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/client/components/not-found.mjs +0 -2
- package/dist/lib/node_modules/next/dist/client/components/not-found.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/client/components/redirect-status-code.mjs +0 -2
- package/dist/lib/node_modules/next/dist/client/components/redirect-status-code.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/client/components/redirect.mjs +0 -2
- package/dist/lib/node_modules/next/dist/client/components/redirect.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/client/components/request-async-storage.external.mjs +0 -2
- package/dist/lib/node_modules/next/dist/client/components/request-async-storage.external.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/client/components/router-reducer/reducers/get-segment-value.mjs +0 -2
- package/dist/lib/node_modules/next/dist/client/components/router-reducer/reducers/get-segment-value.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/client/components/router-reducer/router-reducer-types.mjs +0 -2
- package/dist/lib/node_modules/next/dist/client/components/router-reducer/router-reducer-types.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/client/components/static-generation-async-storage.external.mjs +0 -2
- package/dist/lib/node_modules/next/dist/client/components/static-generation-async-storage.external.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/client/detect-domain-locale.mjs +0 -2
- package/dist/lib/node_modules/next/dist/client/detect-domain-locale.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/client/get-domain-locale.mjs +0 -2
- package/dist/lib/node_modules/next/dist/client/get-domain-locale.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/client/has-base-path.mjs +0 -2
- package/dist/lib/node_modules/next/dist/client/has-base-path.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/client/image-component.mjs +0 -2
- package/dist/lib/node_modules/next/dist/client/image-component.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/client/link.mjs +0 -2
- package/dist/lib/node_modules/next/dist/client/link.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/client/normalize-locale-path.mjs +0 -2
- package/dist/lib/node_modules/next/dist/client/normalize-locale-path.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/client/normalize-trailing-slash.mjs +0 -2
- package/dist/lib/node_modules/next/dist/client/normalize-trailing-slash.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/client/request-idle-callback.mjs +0 -2
- package/dist/lib/node_modules/next/dist/client/request-idle-callback.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/client/resolve-href.mjs +0 -2
- package/dist/lib/node_modules/next/dist/client/resolve-href.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/client/use-intersection.mjs +0 -2
- package/dist/lib/node_modules/next/dist/client/use-intersection.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/compiled/micromatch/index.mjs +0 -23
- package/dist/lib/node_modules/next/dist/compiled/micromatch/index.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/server/future/helpers/interception-routes.mjs +0 -2
- package/dist/lib/node_modules/next/dist/server/future/helpers/interception-routes.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/amp-context.shared-runtime.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/amp-context.shared-runtime.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/amp-mode.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/amp-mode.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/app-router-context.shared-runtime.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/app-router-context.shared-runtime.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/escape-regexp.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/escape-regexp.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/get-img-props.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/get-img-props.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/head.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/head.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/hooks-client-context.shared-runtime.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/hooks-client-context.shared-runtime.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/i18n/detect-domain-locale.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/i18n/detect-domain-locale.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/i18n/normalize-locale-path.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/i18n/normalize-locale-path.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/image-blur-svg.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/image-blur-svg.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/image-config-context.shared-runtime.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/image-config-context.shared-runtime.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/image-config.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/image-config.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/image-external.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/image-external.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/image-loader.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/image-loader.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/lazy-dynamic/bailout-to-csr.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/lazy-dynamic/bailout-to-csr.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/match-remote-pattern.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/match-remote-pattern.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/add-locale.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/add-locale.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/add-path-prefix.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/add-path-prefix.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/app-paths.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/app-paths.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/format-url.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/format-url.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/index.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/index.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/interpolate-as.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/interpolate-as.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/is-dynamic.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/is-dynamic.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/is-local-url.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/is-local-url.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/omit.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/omit.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/parse-path.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/parse-path.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/path-has-prefix.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/path-has-prefix.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/querystring.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/querystring.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/route-matcher.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/route-matcher.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/route-regex.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/route-regex.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/sorted-routes.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/router/utils/sorted-routes.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/router-context.shared-runtime.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/router-context.shared-runtime.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/segment.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/segment.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/server-inserted-html.shared-runtime.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/server-inserted-html.shared-runtime.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/side-effect.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/side-effect.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/utils/warn-once.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/utils/warn-once.mjs.map +0 -1
- package/dist/lib/node_modules/next/dist/shared/lib/utils.mjs +0 -2
- package/dist/lib/node_modules/next/dist/shared/lib/utils.mjs.map +0 -1
- package/dist/lib/node_modules/next/image.mjs +0 -2
- package/dist/lib/node_modules/next/image.mjs.map +0 -1
- package/dist/lib/node_modules/next/link.mjs +0 -2
- package/dist/lib/node_modules/next/link.mjs.map +0 -1
- package/dist/lib/node_modules/next/navigation.mjs +0 -2
- package/dist/lib/node_modules/next/navigation.mjs.map +0 -1
- package/dist/lib/node_modules/orderedmap/dist/index.mjs +0 -2
- package/dist/lib/node_modules/orderedmap/dist/index.mjs.map +0 -1
- package/dist/lib/node_modules/orderedmap/dist/index2.mjs +0 -2
- package/dist/lib/node_modules/orderedmap/dist/index2.mjs.map +0 -1
- package/dist/lib/node_modules/prosemirror-commands/dist/index.mjs +0 -2
- package/dist/lib/node_modules/prosemirror-commands/dist/index.mjs.map +0 -1
- package/dist/lib/node_modules/prosemirror-history/dist/index.mjs +0 -2
- package/dist/lib/node_modules/prosemirror-history/dist/index.mjs.map +0 -1
- package/dist/lib/node_modules/prosemirror-inputrules/dist/index.mjs +0 -2
- package/dist/lib/node_modules/prosemirror-inputrules/dist/index.mjs.map +0 -1
- package/dist/lib/node_modules/prosemirror-inputrules/dist/index2.mjs +0 -2
- package/dist/lib/node_modules/prosemirror-inputrules/dist/index2.mjs.map +0 -1
- package/dist/lib/node_modules/prosemirror-keymap/dist/index.mjs +0 -2
- package/dist/lib/node_modules/prosemirror-keymap/dist/index.mjs.map +0 -1
- package/dist/lib/node_modules/prosemirror-keymap/dist/index2.mjs +0 -2
- package/dist/lib/node_modules/prosemirror-keymap/dist/index2.mjs.map +0 -1
- package/dist/lib/node_modules/prosemirror-model/dist/index.mjs +0 -2
- package/dist/lib/node_modules/prosemirror-model/dist/index.mjs.map +0 -1
- package/dist/lib/node_modules/prosemirror-model/dist/index2.mjs +0 -2
- package/dist/lib/node_modules/prosemirror-model/dist/index2.mjs.map +0 -1
- package/dist/lib/node_modules/prosemirror-state/dist/index.mjs +0 -2
- package/dist/lib/node_modules/prosemirror-state/dist/index.mjs.map +0 -1
- package/dist/lib/node_modules/prosemirror-state/dist/index2.mjs +0 -2
- package/dist/lib/node_modules/prosemirror-state/dist/index2.mjs.map +0 -1
- package/dist/lib/node_modules/prosemirror-transform/dist/index.mjs +0 -2
- package/dist/lib/node_modules/prosemirror-transform/dist/index.mjs.map +0 -1
- package/dist/lib/node_modules/prosemirror-transform/dist/index2.mjs +0 -2
- package/dist/lib/node_modules/prosemirror-transform/dist/index2.mjs.map +0 -1
- package/dist/lib/node_modules/prosemirror-view/dist/index.mjs +0 -2
- package/dist/lib/node_modules/prosemirror-view/dist/index.mjs.map +0 -1
- package/dist/lib/node_modules/prosemirror-view/dist/index2.mjs +0 -2
- package/dist/lib/node_modules/prosemirror-view/dist/index2.mjs.map +0 -1
- package/dist/lib/node_modules/rope-sequence/dist/index.mjs +0 -2
- package/dist/lib/node_modules/rope-sequence/dist/index.mjs.map +0 -1
- package/dist/lib/node_modules/tui-color-picker/dist/tui-color-picker.mjs +0 -10
- package/dist/lib/node_modules/tui-color-picker/dist/tui-color-picker.mjs.map +0 -1
- package/dist/lib/node_modules/w3c-keyname/index.mjs +0 -2
- package/dist/lib/node_modules/w3c-keyname/index.mjs.map +0 -1
- package/dist/lib/node_modules/w3c-keyname/index2.mjs +0 -2
- package/dist/lib/node_modules/w3c-keyname/index2.mjs.map +0 -1
@@ -1,2 +0,0 @@
|
|
1
|
-
import{NodeSelection as e,TextSelection as t,Selection as n,AllSelection as o}from"../../prosemirror-state/dist/index2.mjs";import{Slice as i,Fragment as s,DOMSerializer as r,DOMParser as l,Mark as d}from"../../prosemirror-model/dist/index2.mjs";import{dropPoint as a}from"../../prosemirror-transform/dist/index.mjs";const c=function(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t},h=function(e){let t=e.assignedSlot||e.parentNode;return t&&11==t.nodeType?t.host:t};let f=null;const u=function(e,t,n){let o=f||(f=document.createRange());return o.setEnd(e,null==n?e.nodeValue.length:n),o.setStart(e,t||0),o},p=function(e,t,n,o){return n&&(g(e,t,n,o,-1)||g(e,t,n,o,1))},m=/^(img|br|input|textarea|hr)$/i;function g(e,t,n,o,i){for(;;){if(e==n&&t==o)return!0;if(t==(i<0?0:y(e))){let n=e.parentNode;if(!n||1!=n.nodeType||b(e)||m.test(e.nodeName)||"false"==e.contentEditable)return!1;t=c(e)+(i<0?0:1),e=n}else{if(1!=e.nodeType)return!1;if("false"==(e=e.childNodes[t+(i<0?-1:0)]).contentEditable)return!1;t=i<0?y(e):0}}}function y(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function b(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}const w=function(e){return e.focusNode&&p(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function v(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}const D="undefined"!=typeof navigator?navigator:null,N="undefined"!=typeof document?document:null,O=D&&D.userAgent||"",S=/Edge\/(\d+)/.exec(O),C=/MSIE \d/.exec(O),M=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(O),x=!!(C||M||S),T=C?document.documentMode:M?+M[1]:S?+S[1]:0,k=!x&&/gecko\/(\d+)/i.test(O);k&&(/Firefox\/(\d+)/.exec(O)||[0,0])[1];const E=!x&&/Chrome\/(\d+)/.exec(O),A=!!E,P=E?+E[1]:0,V=!x&&!!D&&/Apple Computer/.test(D.vendor),R=V&&(/Mobile\/\w+/.test(O)||!!D&&D.maxTouchPoints>2),B=R||!!D&&/Mac/.test(D.platform),z=!!D&&/Win/.test(D.platform),I=/Android \d/.test(O),L=!!N&&"webkitFontSmoothing"in N.documentElement.style,F=L?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function q(e){let t=e.defaultView&&e.defaultView.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function $(e,t){return"number"==typeof e?e:e[t]}function K(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,o=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*o}}function W(e,t,n){let o=e.someProp("scrollThreshold")||0,i=e.someProp("scrollMargin")||5,s=e.dom.ownerDocument;for(let r=n||e.dom;r;r=h(r)){if(1!=r.nodeType)continue;let e=r,n=e==s.body,l=n?q(s):K(e),d=0,a=0;if(t.top<l.top+$(o,"top")?a=-(l.top-t.top+$(i,"top")):t.bottom>l.bottom-$(o,"bottom")&&(a=t.bottom-t.top>l.bottom-l.top?t.top+$(i,"top")-l.top:t.bottom-l.bottom+$(i,"bottom")),t.left<l.left+$(o,"left")?d=-(l.left-t.left+$(i,"left")):t.right>l.right-$(o,"right")&&(d=t.right-l.right+$(i,"right")),d||a)if(n)s.defaultView.scrollBy(d,a);else{let n=e.scrollLeft,o=e.scrollTop;a&&(e.scrollTop+=a),d&&(e.scrollLeft+=d);let i=e.scrollLeft-n,s=e.scrollTop-o;t={left:t.left-i,top:t.top-s,right:t.right-i,bottom:t.bottom-s}}if(n||/^(fixed|sticky)$/.test(getComputedStyle(r).position))break}}function H(e){let t=[],n=e.ownerDocument;for(let o=e;o&&(t.push({dom:o,top:o.scrollTop,left:o.scrollLeft}),e!=n);o=h(o));return t}function _(e,t){for(let n=0;n<e.length;n++){let{dom:o,top:i,left:s}=e[n];o.scrollTop!=i+t&&(o.scrollTop=i+t),o.scrollLeft!=s&&(o.scrollLeft=s)}}let G=null;function U(e,t){let n,o,i,s,r=2e8,l=0,d=t.top,a=t.top;for(let c=e.firstChild,h=0;c;c=c.nextSibling,h++){let e;if(1==c.nodeType)e=c.getClientRects();else{if(3!=c.nodeType)continue;e=u(c).getClientRects()}for(let f=0;f<e.length;f++){let u=e[f];if(u.top<=d&&u.bottom>=a){d=Math.max(u.bottom,d),a=Math.min(u.top,a);let e=u.left>t.left?u.left-t.left:u.right<t.left?t.left-u.right:0;if(e<r){n=c,r=e,o=e&&3==n.nodeType?{left:u.right<t.left?u.right:u.left,top:t.top}:t,1==c.nodeType&&e&&(l=h+(t.left>=(u.left+u.right)/2?1:0));continue}}else u.top>t.top&&!i&&u.left<=t.left&&u.right>=t.left&&(i=c,s={left:Math.max(u.left,Math.min(u.right,t.left)),top:u.top});!n&&(t.left>=u.right&&t.top>=u.top||t.left>=u.left&&t.top>=u.bottom)&&(l=h+1)}}return!n&&i&&(n=i,o=s,r=0),n&&3==n.nodeType?function(e,t){let n=e.nodeValue.length,o=document.createRange();for(let i=0;i<n;i++){o.setEnd(e,i+1),o.setStart(e,i);let n=Q(o,1);if(n.top!=n.bottom&&j(t,n))return{node:e,offset:i+(t.left>=(n.left+n.right)/2?1:0)}}return{node:e,offset:0}}(n,o):!n||r&&1==n.nodeType?{node:e,offset:l}:U(n,o)}function j(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function X(e,t,n){let o=e.childNodes.length;if(o&&n.top<n.bottom)for(let i=Math.max(0,Math.min(o-1,Math.floor(o*(t.top-n.top)/(n.bottom-n.top))-2)),s=i;;){let n=e.childNodes[s];if(1==n.nodeType){let e=n.getClientRects();for(let o=0;o<e.length;o++){let i=e[o];if(j(t,i))return X(n,t,i)}}if((s=(s+1)%o)==i)break}return e}function Y(e,t){let n,o=e.dom.ownerDocument,i=0,s=function(e,t,n){if(e.caretPositionFromPoint)try{let o=e.caretPositionFromPoint(t,n);if(o)return{node:o.offsetNode,offset:Math.min(y(o.offsetNode),o.offset)}}catch(e){}if(e.caretRangeFromPoint){let o=e.caretRangeFromPoint(t,n);if(o)return{node:o.startContainer,offset:Math.min(y(o.startContainer),o.startOffset)}}}(o,t.left,t.top);s&&({node:n,offset:i}=s);let r,l=(e.root.elementFromPoint?e.root:o).elementFromPoint(t.left,t.top);if(!l||!e.dom.contains(1!=l.nodeType?l.parentNode:l)){let n=e.dom.getBoundingClientRect();if(!j(t,n))return null;if(l=X(e.dom,t,n),!l)return null}if(V)for(let e=l;n&&e;e=h(e))e.draggable&&(n=void 0);if(l=function(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}(l,t),n){if(k&&1==n.nodeType&&(i=Math.min(i,n.childNodes.length),i<n.childNodes.length)){let e,o=n.childNodes[i];"IMG"==o.nodeName&&(e=o.getBoundingClientRect()).right<=t.left&&e.bottom>t.top&&i++}let o;L&&i&&1==n.nodeType&&1==(o=n.childNodes[i-1]).nodeType&&"false"==o.contentEditable&&o.getBoundingClientRect().top>=t.top&&i--,n==e.dom&&i==n.childNodes.length-1&&1==n.lastChild.nodeType&&t.top>n.lastChild.getBoundingClientRect().bottom?r=e.state.doc.content.size:0!=i&&1==n.nodeType&&"BR"==n.childNodes[i-1].nodeName||(r=function(e,t,n,o){let i=-1;for(let n=t,s=!1;n!=e.dom;){let t=e.docView.nearestDesc(n,!0);if(!t)return null;if(1==t.dom.nodeType&&(t.node.isBlock&&t.parent||!t.contentDOM)){let e=t.dom.getBoundingClientRect();if(t.node.isBlock&&t.parent&&(!s&&e.left>o.left||e.top>o.top?i=t.posBefore:(!s&&e.right<o.left||e.bottom<o.top)&&(i=t.posAfter),s=!0),!t.contentDOM&&i<0&&!t.node.isText)return(t.node.isBlock?o.top<(e.top+e.bottom)/2:o.left<(e.left+e.right)/2)?t.posBefore:t.posAfter}n=t.dom.parentNode}return i>-1?i:e.docView.posFromDOM(t,n,-1)}(e,n,i,t))}null==r&&(r=function(e,t,n){let{node:o,offset:i}=U(t,n),s=-1;if(1==o.nodeType&&!o.firstChild){let e=o.getBoundingClientRect();s=e.left!=e.right&&n.left>(e.left+e.right)/2?1:-1}return e.docView.posFromDOM(o,i,s)}(e,l,t));let d=e.docView.nearestDesc(l,!0);return{pos:r,inside:d?d.posAtStart-d.border:-1}}function J(e){return e.top<e.bottom||e.left<e.right}function Q(e,t){let n=e.getClientRects();if(n.length){let e=n[t<0?0:n.length-1];if(J(e))return e}return Array.prototype.find.call(n,J)||e.getBoundingClientRect()}const Z=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function ee(e,t,n){let{node:o,offset:i,atom:s}=e.docView.domFromPos(t,n<0?-1:1),r=L||k;if(3==o.nodeType){if(!r||!Z.test(o.nodeValue)&&(n<0?i:i!=o.nodeValue.length)){let e=i,t=i,s=n<0?1:-1;return n<0&&!i?(t++,s=-1):n>=0&&i==o.nodeValue.length?(e--,s=1):n<0?e--:t++,te(Q(u(o,e,t),s),s<0)}{let e=Q(u(o,i,i),n);if(k&&i&&/\s/.test(o.nodeValue[i-1])&&i<o.nodeValue.length){let t=Q(u(o,i-1,i-1),-1);if(t.top==e.top){let n=Q(u(o,i,i+1),-1);if(n.top!=e.top)return te(n,n.left<t.left)}}return e}}if(!e.state.doc.resolve(t-(s||0)).parent.inlineContent){if(null==s&&i&&(n<0||i==y(o))){let e=o.childNodes[i-1];if(1==e.nodeType)return ne(e.getBoundingClientRect(),!1)}if(null==s&&i<y(o)){let e=o.childNodes[i];if(1==e.nodeType)return ne(e.getBoundingClientRect(),!0)}return ne(o.getBoundingClientRect(),n>=0)}if(null==s&&i&&(n<0||i==y(o))){let e=o.childNodes[i-1],t=3==e.nodeType?u(e,y(e)-(r?0:1)):1!=e.nodeType||"BR"==e.nodeName&&e.nextSibling?null:e;if(t)return te(Q(t,1),!1)}if(null==s&&i<y(o)){let e=o.childNodes[i];for(;e.pmViewDesc&&e.pmViewDesc.ignoreForCoords;)e=e.nextSibling;let t=e?3==e.nodeType?u(e,0,r?0:1):1==e.nodeType?e:null:null;if(t)return te(Q(t,-1),!0)}return te(Q(3==o.nodeType?u(o):o,-n),n>=0)}function te(e,t){if(0==e.width)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function ne(e,t){if(0==e.height)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function oe(e,t,n){let o=e.state,i=e.root.activeElement;o!=t&&e.updateState(t),i!=e.dom&&e.focus();try{return n()}finally{o!=t&&e.updateState(o),i!=e.dom&&i&&i.focus()}}const ie=/[\u0590-\u08ac]/;let se=null,re=null,le=!1;function de(e,t,n){return se==t&&re==n?le:(se=t,re=n,le="up"==n||"down"==n?function(e,t,n){let o=t.selection,i="up"==n?o.$from:o.$to;return oe(e,t,(()=>{let{node:t}=e.docView.domFromPos(i.pos,"up"==n?-1:1);for(;;){let n=e.docView.nearestDesc(t,!0);if(!n)break;if(n.node.isBlock){t=n.contentDOM||n.dom;break}t=n.dom.parentNode}let o=ee(e,i.pos,1);for(let e=t.firstChild;e;e=e.nextSibling){let t;if(1==e.nodeType)t=e.getClientRects();else{if(3!=e.nodeType)continue;t=u(e,0,e.nodeValue.length).getClientRects()}for(let e=0;e<t.length;e++){let i=t[e];if(i.bottom>i.top+1&&("up"==n?o.top-i.top>2*(i.bottom-o.top):i.bottom-o.bottom>2*(o.bottom-i.top)))return!1}}return!0}))}(e,t,n):function(e,t,n){let{$head:o}=t.selection;if(!o.parent.isTextblock)return!1;let i=o.parentOffset,s=!i,r=i==o.parent.content.size,l=e.domSelection();return l?ie.test(o.parent.textContent)&&l.modify?oe(e,t,(()=>{let{focusNode:t,focusOffset:i,anchorNode:s,anchorOffset:r}=e.domSelectionRange(),d=l.caretBidiLevel;l.modify("move",n,"character");let a=o.depth?e.docView.domAfterPos(o.before()):e.dom,{focusNode:c,focusOffset:h}=e.domSelectionRange(),f=c&&!a.contains(1==c.nodeType?c:c.parentNode)||t==c&&i==h;try{l.collapse(s,r),t&&(t!=s||i!=r)&&l.extend&&l.extend(t,i)}catch(e){}return null!=d&&(l.caretBidiLevel=d),f})):"left"==n||"backward"==n?s:r:o.pos==o.start()||o.pos==o.end()}(e,t,n))}class ae{constructor(e,t,n,o){this.parent=e,this.children=t,this.dom=n,this.contentDOM=o,this.dirty=0,n.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,n){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;t<this.children.length;t++)e+=this.children[t].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let t=0,n=this.posAtStart;;t++){let o=this.children[t];if(o==e)return n;n+=o.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,t,n){if(this.contentDOM&&this.contentDOM.contains(1==e.nodeType?e:e.parentNode)){if(n<0){let n,o;if(e==this.contentDOM)n=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;n=e.previousSibling}for(;n&&(!(o=n.pmViewDesc)||o.parent!=this);)n=n.previousSibling;return n?this.posBeforeChild(o)+o.size:this.posAtStart}{let n,o;if(e==this.contentDOM)n=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;n=e.nextSibling}for(;n&&(!(o=n.pmViewDesc)||o.parent!=this);)n=n.nextSibling;return n?this.posBeforeChild(o):this.posAtEnd}}let o;if(e==this.dom&&this.contentDOM)o=t>c(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))o=2&e.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==t)for(let t=e;;t=t.parentNode){if(t==this.dom){o=!1;break}if(t.previousSibling)break}if(null==o&&t==e.childNodes.length)for(let t=e;;t=t.parentNode){if(t==this.dom){o=!0;break}if(t.nextSibling)break}}return(null==o?n>0:o)?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let n=!0,o=e;o;o=o.parentNode){let i,s=this.getDesc(o);if(s&&(!t||s.node)){if(!n||!(i=s.nodeDOM)||(1==i.nodeType?i.contains(1==e.nodeType?e:e.parentNode):i==e))return s;n=!1}}}getDesc(e){let t=e.pmViewDesc;for(let e=t;e;e=e.parent)if(e==this)return t}posFromDOM(e,t,n){for(let o=e;o;o=o.parentNode){let i=this.getDesc(o);if(i)return i.localPosFromDOM(e,t,n)}return-1}descAt(e){for(let t=0,n=0;t<this.children.length;t++){let o=this.children[t],i=n+o.size;if(n==e&&i!=n){for(;!o.border&&o.children.length;)o=o.children[0];return o}if(e<i)return o.descAt(e-n-o.border);n=i}}domFromPos(e,t){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let n=0,o=0;for(let t=0;n<this.children.length;n++){let i=this.children[n],s=t+i.size;if(s>e||i instanceof ge){o=e-t;break}t=s}if(o)return this.children[n].domFromPos(o-this.children[n].border,t);for(let e;n&&!(e=this.children[n-1]).size&&e instanceof ce&&e.side>=0;n--);if(t<=0){let e,o=!0;for(;e=n?this.children[n-1]:null,e&&e.dom.parentNode!=this.contentDOM;n--,o=!1);return e&&t&&o&&!e.border&&!e.domAtom?e.domFromPos(e.size,t):{node:this.contentDOM,offset:e?c(e.dom)+1:0}}{let e,o=!0;for(;e=n<this.children.length?this.children[n]:null,e&&e.dom.parentNode!=this.contentDOM;n++,o=!1);return e&&o&&!e.border&&!e.domAtom?e.domFromPos(0,t):{node:this.contentDOM,offset:e?c(e.dom):this.contentDOM.childNodes.length}}}parseRange(e,t,n=0){if(0==this.children.length)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let o=-1,i=-1;for(let s=n,r=0;;r++){let n=this.children[r],l=s+n.size;if(-1==o&&e<=l){let i=s+n.border;if(e>=i&&t<=l-n.border&&n.node&&n.contentDOM&&this.contentDOM.contains(n.contentDOM))return n.parseRange(e,t,i);e=s;for(let t=r;t>0;t--){let n=this.children[t-1];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(1)){o=c(n.dom)+1;break}e-=n.size}-1==o&&(o=0)}if(o>-1&&(l>t||r==this.children.length-1)){t=l;for(let e=r+1;e<this.children.length;e++){let n=this.children[e];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(-1)){i=c(n.dom);break}t+=n.size}-1==i&&(i=this.contentDOM.childNodes.length);break}s=l}return{node:this.contentDOM,from:e,to:t,fromOffset:o,toOffset:i}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let t=this.children[e<0?0:this.children.length-1];return 0==t.size||t.emptyChildAt(e)}domAfterPos(e){let{node:t,offset:n}=this.domFromPos(e,0);if(1!=t.nodeType||n==t.childNodes.length)throw new RangeError("No node after pos "+e);return t.childNodes[n]}setSelection(e,t,n,o=!1){let i=Math.min(e,t),s=Math.max(e,t);for(let r=0,l=0;r<this.children.length;r++){let d=this.children[r],a=l+d.size;if(i>l&&s<a)return d.setSelection(e-l-d.border,t-l-d.border,n,o);l=a}let r=this.domFromPos(e,e?-1:1),l=t==e?r:this.domFromPos(t,t?-1:1),d=n.getSelection(),a=!1;if((k||V)&&e==t){let{node:e,offset:t}=r;if(3==e.nodeType){if(a=!(!t||"\n"!=e.nodeValue[t-1]),a&&t==e.nodeValue.length)for(let t,n=e;n;n=n.parentNode){if(t=n.nextSibling){"BR"==t.nodeName&&(r=l={node:t.parentNode,offset:c(t)+1});break}let e=n.pmViewDesc;if(e&&e.node&&e.node.isBlock)break}}else{let n=e.childNodes[t-1];a=n&&("BR"==n.nodeName||"false"==n.contentEditable)}}if(k&&d.focusNode&&d.focusNode!=l.node&&1==d.focusNode.nodeType){let e=d.focusNode.childNodes[d.focusOffset];e&&"false"==e.contentEditable&&(o=!0)}if(!(o||a&&V)&&p(r.node,r.offset,d.anchorNode,d.anchorOffset)&&p(l.node,l.offset,d.focusNode,d.focusOffset))return;let h=!1;if((d.extend||e==t)&&!a){d.collapse(r.node,r.offset);try{e!=t&&d.extend(l.node,l.offset),h=!0}catch(e){}}if(!h){if(e>t){let e=r;r=l,l=e}let n=document.createRange();n.setEnd(l.node,l.offset),n.setStart(r.node,r.offset),d.removeAllRanges(),d.addRange(n)}}ignoreMutation(e){return!this.contentDOM&&"selection"!=e.type}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let n=0,o=0;o<this.children.length;o++){let i=this.children[o],s=n+i.size;if(n==s?e<=s&&t>=n:e<s&&t>n){let o=n+i.border,r=s-i.border;if(e>=o&&t<=r)return this.dirty=e==n||t==s?2:1,void(e!=o||t!=r||!i.contentLost&&i.dom.parentNode==this.contentDOM?i.markDirty(e-o,t-o):i.dirty=3);i.dirty=i.dom!=i.contentDOM||i.dom.parentNode!=this.contentDOM||i.children.length?3:2}n=s}this.dirty=2}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let n=1==e?2:1;t.dirty<n&&(t.dirty=n)}}get domAtom(){return!1}get ignoreForCoords(){return!1}isText(e){return!1}}class ce extends ae{constructor(e,t,n,o){let i,s=t.type.toDOM;if("function"==typeof s&&(s=s(n,(()=>i?i.parent?i.parent.posBeforeChild(i):void 0:o))),!t.type.spec.raw){if(1!=s.nodeType){let e=document.createElement("span");e.appendChild(s),s=e}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(e,[],s,null),this.widget=t,this.widget=t,i=this}matchesWidget(e){return 0==this.dirty&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return!!t&&t(e)}ignoreMutation(e){return"selection"!=e.type||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class he extends ae{constructor(e,t,n,o){super(e,[],t,null),this.textDOM=n,this.text=o}get size(){return this.text.length}localPosFromDOM(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return"characterData"===e.type&&e.target.nodeValue==e.oldValue}}class fe extends ae{constructor(e,t,n,o){super(e,[],n,o),this.mark=t}static create(e,t,n,o){let i=o.nodeViews[t.type.name],s=i&&i(t,o,n);return s&&s.dom||(s=r.renderSpec(document,t.type.spec.toDOM(t,n),null,t.attrs)),new fe(e,t,s.dom,s.contentDOM||s.dom)}parseRule(){return 3&this.dirty||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return 3!=this.dirty&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),0!=this.dirty){let e=this.parent;for(;!e.node;)e=e.parent;e.dirty<this.dirty&&(e.dirty=this.dirty),this.dirty=0}}slice(e,t,n){let o=fe.create(this.parent,this.mark,!0,n),i=this.children,s=this.size;t<s&&(i=ke(i,t,s,n)),e>0&&(i=ke(i,0,e,n));for(let e=0;e<i.length;e++)i[e].parent=o;return o.children=i,o}}class ue extends ae{constructor(e,t,n,o,i,s,r,l,d){super(e,[],i,s),this.node=t,this.outerDeco=n,this.innerDeco=o,this.nodeDOM=r}static create(e,t,n,o,i,s){let l,d=i.nodeViews[t.type.name],a=d&&d(t,i,(()=>l?l.parent?l.parent.posBeforeChild(l):void 0:s),n,o),c=a&&a.dom,h=a&&a.contentDOM;if(t.isText)if(c){if(3!=c.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else c=document.createTextNode(t.text);else if(!c){let e=r.renderSpec(document,t.type.spec.toDOM(t),null,t.attrs);({dom:c,contentDOM:h}=e)}h||t.isText||"BR"==c.nodeName||(c.hasAttribute("contenteditable")||(c.contentEditable="false"),t.type.spec.draggable&&(c.draggable=!0));let f=c;return c=Se(c,n,t),a?l=new ye(e,t,n,o,c,h||null,f,a,i,s+1):t.isText?new me(e,t,n,o,c,f,i):new ue(e,t,n,o,c,h||null,f,i,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if("pre"==this.node.type.whitespace&&(e.preserveWhitespace="full"),this.contentDOM)if(this.contentLost){for(let t=this.children.length-1;t>=0;t--){let n=this.children[t];if(this.dom.contains(n.dom.parentNode)){e.contentElement=n.dom.parentNode;break}}e.contentElement||(e.getContent=()=>s.empty)}else e.contentElement=this.contentDOM;else e.getContent=()=>this.node.content;return e}matchesNode(e,t,n){return 0==this.dirty&&e.eq(this.node)&&Ce(t,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,t){let n=this.node.inlineContent,o=t,i=e.composing?this.localCompositionInfo(e,t):null,s=i&&i.pos>-1?i:null,r=i&&i.pos<0,l=new xe(this,s&&s.node,e);!function(e,t,n,o){let i=t.locals(e),s=0;if(0==i.length){for(let n=0;n<e.childCount;n++){let r=e.child(n);o(r,i,t.forChild(s,r),n),s+=r.nodeSize}return}let r=0,l=[],d=null;for(let a=0;;){let c,h,f,u;for(;r<i.length&&i[r].to==s;){let e=i[r++];e.widget&&(c?(h||(h=[c])).push(e):c=e)}if(c)if(h){h.sort(Te);for(let e=0;e<h.length;e++)n(h[e],a,!!d)}else n(c,a,!!d);if(d)u=-1,f=d,d=null;else{if(!(a<e.childCount))break;u=a,f=e.child(a++)}for(let e=0;e<l.length;e++)l[e].to<=s&&l.splice(e--,1);for(;r<i.length&&i[r].from<=s&&i[r].to>s;)l.push(i[r++]);let p=s+f.nodeSize;if(f.isText){let e=p;r<i.length&&i[r].from<e&&(e=i[r].from);for(let t=0;t<l.length;t++)l[t].to<e&&(e=l[t].to);e<p&&(d=f.cut(e-s),f=f.cut(0,e-s),p=e,u=-1)}else for(;r<i.length&&i[r].to<p;)r++;o(f,f.isInline&&!f.isLeaf?l.filter((e=>!e.inline)):l.slice(),t.forChild(s,f),u),s=p}}(this.node,this.innerDeco,((t,i,s)=>{t.spec.marks?l.syncToMarks(t.spec.marks,n,e):t.type.side>=0&&!s&&l.syncToMarks(i==this.node.childCount?d.none:this.node.child(i).marks,n,e),l.placeWidget(t,e,o)}),((t,s,d,a)=>{let c;l.syncToMarks(t.marks,n,e),l.findNodeMatch(t,s,d,a)||r&&e.state.selection.from>o&&e.state.selection.to<o+t.nodeSize&&(c=l.findIndexWithChild(i.node))>-1&&l.updateNodeAt(t,s,d,c,e)||l.updateNextNode(t,s,d,e,a,o)||l.addNode(t,s,d,e,o),o+=t.nodeSize})),l.syncToMarks([],n,e),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||2==this.dirty)&&(s&&this.protectLocalComposition(e,s),be(this.contentDOM,this.children,e),R&&function(e){if("UL"==e.nodeName||"OL"==e.nodeName){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}(this.dom))}localCompositionInfo(e,n){let{from:o,to:i}=e.state.selection;if(!(e.state.selection instanceof t)||o<n||i>n+this.node.content.size)return null;let s=e.input.compositionNode;if(!s||!this.dom.contains(s.parentNode))return null;if(this.node.inlineContent){let e=s.nodeValue,t=function(e,t,n,o){for(let i=0,s=0;i<e.childCount&&s<=o;){let r=e.child(i++),l=s;if(s+=r.nodeSize,!r.isText)continue;let d=r.text;for(;i<e.childCount;){let t=e.child(i++);if(s+=t.nodeSize,!t.isText)break;d+=t.text}if(s>=n){if(s>=o&&d.slice(o-t.length-l,o-l)==t)return o-t.length;let e=l<o?d.lastIndexOf(t,o-l-1):-1;if(e>=0&&e+t.length+l>=n)return l+e;if(n==o&&d.length>=o+t.length-l&&d.slice(o-l,o-l+t.length)==t)return o}}return-1}(this.node.content,e,o-n,i-n);return t<0?null:{node:s,pos:t,text:e}}return{node:s,pos:-1,text:""}}protectLocalComposition(e,{node:t,pos:n,text:o}){if(this.getDesc(t))return;let i=t;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let s=new he(this,i,t,o);e.input.compositionNodes.push(s),this.children=ke(this.children,n,n+o.length,e,s)}update(e,t,n,o){return!(3==this.dirty||!e.sameMarkup(this.node))&&(this.updateInner(e,t,n,o),!0)}updateInner(e,t,n,o){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(o,this.posAtStart),this.dirty=0}updateOuterDeco(e){if(Ce(e,this.outerDeco))return;let t=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=Ne(this.dom,this.nodeDOM,De(this.outerDeco,this.node,t),De(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!0)}deselectNode(){1==this.nodeDOM.nodeType&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.dom.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function pe(e,t,n,o,i){Se(o,t,e);let s=new ue(void 0,e,t,n,o,o,o,i,0);return s.contentDOM&&s.updateChildren(i,0),s}class me extends ue{constructor(e,t,n,o,i,s,r){super(e,t,n,o,i,null,s,r,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,t,n,o){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!e.sameMarkup(this.node))&&(this.updateOuterDeco(t),0==this.dirty&&e.text==this.node.text||e.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=e.text,o.trackWrites==this.nodeDOM&&(o.trackWrites=null)),this.node=e,this.dirty=0,!0)}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,n){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,n)}ignoreMutation(e){return"characterData"!=e.type&&"selection"!=e.type}slice(e,t,n){let o=this.node.cut(e,t),i=document.createTextNode(o.text);return new me(this.parent,o,this.outerDeco,this.innerDeco,i,i,n)}markDirty(e,t){super.markDirty(e,t),this.dom==this.nodeDOM||0!=e&&t!=this.nodeDOM.nodeValue.length||(this.dirty=3)}get domAtom(){return!1}isText(e){return this.node.text==e}}class ge extends ae{parseRule(){return{ignore:!0}}matchesHack(e){return 0==this.dirty&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return"IMG"==this.dom.nodeName}}class ye extends ue{constructor(e,t,n,o,i,s,r,l,d,a){super(e,t,n,o,i,s,r,d,a),this.spec=l}update(e,t,n,o){if(3==this.dirty)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let i=this.spec.update(e,t,n);return i&&this.updateInner(e,t,n,o),i}return!(!this.contentDOM&&!e.isLeaf)&&super.update(e,t,n,o)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,n,o){this.spec.setSelection?this.spec.setSelection(e,t,n):super.setSelection(e,t,n,o)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return!!this.spec.stopEvent&&this.spec.stopEvent(e)}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function be(e,t,n){let o=e.firstChild,i=!1;for(let s=0;s<t.length;s++){let r=t[s],l=r.dom;if(l.parentNode==e){for(;l!=o;)o=Me(o),i=!0;o=o.nextSibling}else i=!0,e.insertBefore(l,o);if(r instanceof fe){let t=o?o.previousSibling:e.lastChild;be(r.contentDOM,r.children,n),o=t?t.nextSibling:e.firstChild}}for(;o;)o=Me(o),i=!0;i&&n.trackWrites==e&&(n.trackWrites=null)}const we=function(e){e&&(this.nodeName=e)};we.prototype=Object.create(null);const ve=[new we];function De(e,t,n){if(0==e.length)return ve;let o=n?ve[0]:new we,i=[o];for(let s=0;s<e.length;s++){let r=e[s].type.attrs;if(r){r.nodeName&&i.push(o=new we(r.nodeName));for(let e in r){let s=r[e];null!=s&&(n&&1==i.length&&i.push(o=new we(t.isInline?"span":"div")),"class"==e?o.class=(o.class?o.class+" ":"")+s:"style"==e?o.style=(o.style?o.style+";":"")+s:"nodeName"!=e&&(o[e]=s))}}}return i}function Ne(e,t,n,o){if(n==ve&&o==ve)return t;let i=t;for(let t=0;t<o.length;t++){let s=o[t],r=n[t];if(t){let t;r&&r.nodeName==s.nodeName&&i!=e&&(t=i.parentNode)&&t.nodeName.toLowerCase()==s.nodeName||(t=document.createElement(s.nodeName),t.pmIsDeco=!0,t.appendChild(i),r=ve[0]),i=t}Oe(i,r||ve[0],s)}return i}function Oe(e,t,n){for(let o in t)"class"==o||"style"==o||"nodeName"==o||o in n||e.removeAttribute(o);for(let o in n)"class"!=o&&"style"!=o&&"nodeName"!=o&&n[o]!=t[o]&&e.setAttribute(o,n[o]);if(t.class!=n.class){let o=t.class?t.class.split(" ").filter(Boolean):[],i=n.class?n.class.split(" ").filter(Boolean):[];for(let t=0;t<o.length;t++)-1==i.indexOf(o[t])&&e.classList.remove(o[t]);for(let t=0;t<i.length;t++)-1==o.indexOf(i[t])&&e.classList.add(i[t]);0==e.classList.length&&e.removeAttribute("class")}if(t.style!=n.style){if(t.style){let n,o=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g;for(;n=o.exec(t.style);)e.style.removeProperty(n[1])}n.style&&(e.style.cssText+=n.style)}}function Se(e,t,n){return Ne(e,e,ve,De(t,n,1!=e.nodeType))}function Ce(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function Me(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}class xe{constructor(e,t,n){this.lock=t,this.view=n,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=function(e,t){let n=t,o=n.children.length,i=e.childCount,s=new Map,r=[];e:for(;i>0;){let l;for(;;)if(o){let e=n.children[o-1];if(!(e instanceof fe)){l=e,o--;break}n=e,o=e.children.length}else{if(n==t)break e;o=n.parent.children.indexOf(n),n=n.parent}let d=l.node;if(d){if(d!=e.child(i-1))break;--i,s.set(l,i),r.push(l)}}return{index:i,matched:s,matches:r.reverse()}}(e.node.content,e)}destroyBetween(e,t){if(e!=t){for(let n=e;n<t;n++)this.top.children[n].destroy();this.top.children.splice(e,t-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,t,n){let o=0,i=this.stack.length>>1,s=Math.min(i,e.length);for(;o<s&&(o==i-1?this.top:this.stack[o+1<<1]).matchesMark(e[o])&&!1!==e[o].type.spec.spanning;)o++;for(;o<i;)this.destroyRest(),this.top.dirty=0,this.index=this.stack.pop(),this.top=this.stack.pop(),i--;for(;i<e.length;){this.stack.push(this.top,this.index+1);let o=-1;for(let t=this.index;t<Math.min(this.index+3,this.top.children.length);t++){let n=this.top.children[t];if(n.matchesMark(e[i])&&!this.isLocked(n.dom)){o=t;break}}if(o>-1)o>this.index&&(this.changed=!0,this.destroyBetween(this.index,o)),this.top=this.top.children[this.index];else{let o=fe.create(this.top,e[i],t,n);this.top.children.splice(this.index,0,o),this.top=o,this.changed=!0}this.index=0,i++}}findNodeMatch(e,t,n,o){let i,s=-1;if(o>=this.preMatch.index&&(i=this.preMatch.matches[o-this.preMatch.index]).parent==this.top&&i.matchesNode(e,t,n))s=this.top.children.indexOf(i,this.index);else for(let o=this.index,i=Math.min(this.top.children.length,o+5);o<i;o++){let i=this.top.children[o];if(i.matchesNode(e,t,n)&&!this.preMatch.matched.has(i)){s=o;break}}return!(s<0)&&(this.destroyBetween(this.index,s),this.index++,!0)}updateNodeAt(e,t,n,o,i){let s=this.top.children[o];return 3==s.dirty&&s.dom==s.contentDOM&&(s.dirty=2),!!s.update(e,t,n,i)&&(this.destroyBetween(this.index,o),this.index++,!0)}findIndexWithChild(e){for(;;){let t=e.parentNode;if(!t)return-1;if(t==this.top.contentDOM){let t=e.pmViewDesc;if(t)for(let e=this.index;e<this.top.children.length;e++)if(this.top.children[e]==t)return e;return-1}e=t}}updateNextNode(e,t,n,o,i,s){for(let r=this.index;r<this.top.children.length;r++){let l=this.top.children[r];if(l instanceof ue){let d=this.preMatch.matched.get(l);if(null!=d&&d!=i)return!1;let a,c=l.dom,h=this.isLocked(c)&&!(e.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==e.text&&3!=l.dirty&&Ce(t,l.outerDeco));if(!h&&l.update(e,t,n,o))return this.destroyBetween(this.index,r),l.dom!=c&&(this.changed=!0),this.index++,!0;if(!h&&(a=this.recreateWrapper(l,e,t,n,o,s)))return this.destroyBetween(this.index,r),this.top.children[this.index]=a,a.contentDOM&&(a.dirty=2,a.updateChildren(o,s+1),a.dirty=0),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,t,n,o,i,s){if(e.dirty||t.isAtom||!e.children.length||!e.node.content.eq(t.content)||!Ce(n,e.outerDeco)||!o.eq(e.innerDeco))return null;let r=ue.create(this.top,t,n,o,i,s);if(r.contentDOM){r.children=e.children,e.children=[];for(let e of r.children)e.parent=r}return e.destroy(),r}addNode(e,t,n,o,i){let s=ue.create(this.top,e,t,n,o,i);s.contentDOM&&s.updateChildren(o,i+1),this.top.children.splice(this.index++,0,s),this.changed=!0}placeWidget(e,t,n){let o=this.index<this.top.children.length?this.top.children[this.index]:null;if(!o||!o.matchesWidget(e)||e!=o.widget&&o.widget.type.toDOM.parentNode){let o=new ce(this.top,e,t,n);this.top.children.splice(this.index++,0,o),this.changed=!0}else this.index++}addTextblockHacks(){let e=this.top.children[this.index-1],t=this.top;for(;e instanceof fe;)t=e,e=t.children[t.children.length-1];(!e||!(e instanceof me)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((V||A)&&e&&"false"==e.dom.contentEditable&&this.addHackNode("IMG",t),this.addHackNode("BR",this.top))}addHackNode(e,t){if(t==this.top&&this.index<t.children.length&&t.children[this.index].matchesHack(e))this.index++;else{let n=document.createElement(e);"IMG"==e&&(n.className="ProseMirror-separator",n.alt=""),"BR"==e&&(n.className="ProseMirror-trailingBreak");let o=new ge(this.top,[],n,null);t!=this.top?t.children.push(o):t.children.splice(this.index++,0,o),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||1==e.nodeType&&e.contains(this.lock.parentNode))}}function Te(e,t){return e.type.side-t.type.side}function ke(e,t,n,o,i){let s=[];for(let r=0,l=0;r<e.length;r++){let d=e[r],a=l,c=l+=d.size;a>=n||c<=t?s.push(d):(a<t&&s.push(d.slice(0,t-a,o)),i&&(s.push(i),i=void 0),c>n&&s.push(d.slice(n-a,d.size,o)))}return s}function Ee(t,n=null){let o=t.domSelectionRange(),i=t.state.doc;if(!o.focusNode)return null;let s=t.docView.nearestDesc(o.focusNode),r=s&&0==s.size,l=t.docView.posFromDOM(o.focusNode,o.focusOffset,1);if(l<0)return null;let d,a,h=i.resolve(l);if(w(o)){for(d=l;s&&!s.node;)s=s.parent;let t=s.node;if(s&&t.isAtom&&e.isSelectable(t)&&s.parent&&(!t.isInline||!function(e,t,n){for(let o=0==t,i=t==y(e);o||i;){if(e==n)return!0;let t=c(e);if(!(e=e.parentNode))return!1;o=o&&0==t,i=i&&t==y(e)}}(o.focusNode,o.focusOffset,s.dom))){let t=s.posBefore;a=new e(l==t?h:i.resolve(t))}}else{if(o instanceof t.dom.ownerDocument.defaultView.Selection&&o.rangeCount>1){let e=l,n=l;for(let i=0;i<o.rangeCount;i++){let s=o.getRangeAt(i);e=Math.min(e,t.docView.posFromDOM(s.startContainer,s.startOffset,1)),n=Math.max(n,t.docView.posFromDOM(s.endContainer,s.endOffset,-1))}if(e<0)return null;[d,l]=n==t.state.selection.anchor?[n,e]:[e,n],h=i.resolve(l)}else d=t.docView.posFromDOM(o.anchorNode,o.anchorOffset,1);if(d<0)return null}let f=i.resolve(d);if(!a){a=Fe(t,f,h,"pointer"==n||t.state.selection.head<h.pos&&!r?1:-1)}return a}function Ae(e){return e.editable?e.hasFocus():$e(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function Pe(e,n=!1){let o=e.state.selection;if(Ie(e,o),Ae(e)){if(!n&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&A){let t=e.domSelectionRange(),n=e.domObserver.currentSelection;if(t.anchorNode&&n.anchorNode&&p(t.anchorNode,t.anchorOffset,n.anchorNode,n.anchorOffset))return e.input.mouseDown.delayedSelectionSync=!0,void e.domObserver.setCurSelection()}if(e.domObserver.disconnectSelection(),e.cursorWrapper)!function(e){let t=e.domSelection(),n=document.createRange();if(!t)return;let o=e.cursorWrapper.dom,i="IMG"==o.nodeName;i?n.setStart(o.parentNode,c(o)+1):n.setStart(o,0);n.collapse(!0),t.removeAllRanges(),t.addRange(n),!i&&!e.state.selection.visible&&x&&T<=11&&(o.disabled=!0,o.disabled=!1)}(e);else{let i,s,{anchor:r,head:l}=o;!Ve||o instanceof t||(o.$from.parent.inlineContent||(i=Re(e,o.from)),o.empty||o.$from.parent.inlineContent||(s=Re(e,o.to))),e.docView.setSelection(r,l,e.root,n),Ve&&(i&&ze(i),s&&ze(s)),o.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&function(e){let t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.input.hideSelectionGuard);let n=e.domSelectionRange(),o=n.anchorNode,i=n.anchorOffset;t.addEventListener("selectionchange",e.input.hideSelectionGuard=()=>{n.anchorNode==o&&n.anchorOffset==i||(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout((()=>{Ae(e)&&!e.state.selection.visible||e.dom.classList.remove("ProseMirror-hideselection")}),20))})}(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}const Ve=V||A&&P<63;function Re(e,t){let{node:n,offset:o}=e.docView.domFromPos(t,0),i=o<n.childNodes.length?n.childNodes[o]:null,s=o?n.childNodes[o-1]:null;if(V&&i&&"false"==i.contentEditable)return Be(i);if(!(i&&"false"!=i.contentEditable||s&&"false"!=s.contentEditable)){if(i)return Be(i);if(s)return Be(s)}}function Be(e){return e.contentEditable="true",V&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function ze(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function Ie(t,n){if(n instanceof e){let e=t.docView.descAt(n.from);e!=t.lastSelectedViewDesc&&(Le(t),e&&e.selectNode(),t.lastSelectedViewDesc=e)}else Le(t)}function Le(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function Fe(e,n,o,i){return e.someProp("createSelectionBetween",(t=>t(e,n,o)))||t.between(n,o,i)}function qe(e){return!(e.editable&&!e.hasFocus())&&$e(e)}function $e(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(3==t.anchorNode.nodeType?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(3==t.focusNode.nodeType?t.focusNode.parentNode:t.focusNode))}catch(e){return!1}}function Ke(e,t){let{$anchor:o,$head:i}=e.selection,s=t>0?o.max(i):o.min(i),r=s.parent.inlineContent?s.depth?e.doc.resolve(t>0?s.after():s.before()):null:s;return r&&n.findFrom(r,t)}function We(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function He(n,o,i){let s=n.state.selection;if(!(s instanceof t)){if(s instanceof e&&s.node.isInline)return We(n,new t(o>0?s.$to:s.$from));{let e=Ke(n.state,o);return!!e&&We(n,e)}}if(i.indexOf("s")>-1){let{$head:e}=s,i=e.textOffset?null:o<0?e.nodeBefore:e.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let r=n.state.doc.resolve(e.pos+i.nodeSize*(o<0?-1:1));return We(n,new t(s.$anchor,r))}if(!s.empty)return!1;if(n.endOfTextblock(o>0?"forward":"backward")){let t=Ke(n.state,o);return!!(t&&t instanceof e)&&We(n,t)}if(!(B&&i.indexOf("m")>-1)){let i,r=s.$head,l=r.textOffset?null:o<0?r.nodeBefore:r.nodeAfter;if(!l||l.isText)return!1;let d=o<0?r.pos-l.nodeSize:r.pos;return!!(l.isAtom||(i=n.docView.descAt(d))&&!i.contentDOM)&&(e.isSelectable(l)?We(n,new e(o<0?n.state.doc.resolve(r.pos-l.nodeSize):r)):!!L&&We(n,new t(n.state.doc.resolve(o<0?d:d+l.nodeSize))))}}function _e(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function Ge(e,t){let n=e.pmViewDesc;return n&&0==n.size&&(t<0||e.nextSibling||"BR"!=e.nodeName)}function Ue(e,t){return t<0?function(e){let t=e.domSelectionRange(),n=t.focusNode,o=t.focusOffset;if(!n)return;let i,s,r=!1;k&&1==n.nodeType&&o<_e(n)&&Ge(n.childNodes[o],-1)&&(r=!0);for(;;)if(o>0){if(1!=n.nodeType)break;{let e=n.childNodes[o-1];if(Ge(e,-1))i=n,s=--o;else{if(3!=e.nodeType)break;n=e,o=n.nodeValue.length}}}else{if(je(n))break;{let t=n.previousSibling;for(;t&&Ge(t,-1);)i=n.parentNode,s=c(t),t=t.previousSibling;if(t)n=t,o=_e(n);else{if(n=n.parentNode,n==e.dom)break;o=0}}}r?Xe(e,n,o):i&&Xe(e,i,s)}(e):function(e){let t=e.domSelectionRange(),n=t.focusNode,o=t.focusOffset;if(!n)return;let i,s,r=_e(n);for(;;)if(o<r){if(1!=n.nodeType)break;if(!Ge(n.childNodes[o],1))break;i=n,s=++o}else{if(je(n))break;{let t=n.nextSibling;for(;t&&Ge(t,1);)i=t.parentNode,s=c(t)+1,t=t.nextSibling;if(t)n=t,o=0,r=_e(n);else{if(n=n.parentNode,n==e.dom)break;o=r=0}}}i&&Xe(e,i,s)}(e)}function je(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function Xe(e,t,n){if(3!=t.nodeType){let e,o;(o=function(e,t){for(;e&&t==e.childNodes.length&&!b(e);)t=c(e)+1,e=e.parentNode;for(;e&&t<e.childNodes.length;){let n=e.childNodes[t];if(3==n.nodeType)return n;if(1==n.nodeType&&"false"==n.contentEditable)break;e=n,t=0}}(t,n))?(t=o,n=0):(e=function(e,t){for(;e&&!t&&!b(e);)t=c(e),e=e.parentNode;for(;e&&t;){let n=e.childNodes[t-1];if(3==n.nodeType)return n;if(1==n.nodeType&&"false"==n.contentEditable)break;t=(e=n).childNodes.length}}(t,n))&&(t=e,n=e.nodeValue.length)}let o=e.domSelection();if(!o)return;if(w(o)){let e=document.createRange();e.setEnd(t,n),e.setStart(t,n),o.removeAllRanges(),o.addRange(e)}else o.extend&&o.extend(t,n);e.domObserver.setCurSelection();let{state:i}=e;setTimeout((()=>{e.state==i&&Pe(e)}),50)}function Ye(e,t){let n=e.state.doc.resolve(t);if(!A&&!z&&n.parent.inlineContent){let o=e.coordsAtPos(t);if(t>n.start()){let n=e.coordsAtPos(t-1),i=(n.top+n.bottom)/2;if(i>o.top&&i<o.bottom&&Math.abs(n.left-o.left)>1)return n.left<o.left?"ltr":"rtl"}if(t<n.end()){let n=e.coordsAtPos(t+1),i=(n.top+n.bottom)/2;if(i>o.top&&i<o.bottom&&Math.abs(n.left-o.left)>1)return n.left>o.left?"ltr":"rtl"}}return"rtl"==getComputedStyle(e.dom).direction?"rtl":"ltr"}function Je(i,s,r){let l=i.state.selection;if(l instanceof t&&!l.empty||r.indexOf("s")>-1)return!1;if(B&&r.indexOf("m")>-1)return!1;let{$from:d,$to:a}=l;if(!d.parent.inlineContent||i.endOfTextblock(s<0?"up":"down")){let t=Ke(i.state,s);if(t&&t instanceof e)return We(i,t)}if(!d.parent.inlineContent){let e=s<0?d:a,t=l instanceof o?n.near(e,s):n.findFrom(e,s);return!!t&&We(i,t)}return!1}function Qe(e,n){if(!(e.state.selection instanceof t))return!0;let{$head:o,$anchor:i,empty:s}=e.state.selection;if(!o.sameParent(i))return!0;if(!s)return!1;if(e.endOfTextblock(n>0?"forward":"backward"))return!0;let r=!o.textOffset&&(n<0?o.nodeBefore:o.nodeAfter);if(r&&!r.isText){let t=e.state.tr;return n<0?t.delete(o.pos-r.nodeSize,o.pos):t.delete(o.pos,o.pos+r.nodeSize),e.dispatch(t),!0}return!1}function Ze(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function et(e,t){let n=t.keyCode,o=function(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}(t);if(8==n||B&&72==n&&"c"==o)return Qe(e,-1)||Ue(e,-1);if(46==n&&!t.shiftKey||B&&68==n&&"c"==o)return Qe(e,1)||Ue(e,1);if(13==n||27==n)return!0;if(37==n||B&&66==n&&"c"==o){let t=37==n?"ltr"==Ye(e,e.state.selection.from)?-1:1:-1;return He(e,t,o)||Ue(e,t)}if(39==n||B&&70==n&&"c"==o){let t=39==n?"ltr"==Ye(e,e.state.selection.from)?1:-1:1;return He(e,t,o)||Ue(e,t)}return 38==n||B&&80==n&&"c"==o?Je(e,-1,o)||Ue(e,-1):40==n||B&&78==n&&"c"==o?function(e){if(!V||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&1==t.nodeType&&0==n&&t.firstChild&&"false"==t.firstChild.contentEditable){let n=t.firstChild;Ze(e,n,"true"),setTimeout((()=>Ze(e,n,"false")),20)}return!1}(e)||Je(e,1,o)||Ue(e,1):o==(B?"m":"c")&&(66==n||73==n||89==n||90==n)}function tt(e,t){e.someProp("transformCopied",(n=>{t=n(t,e)}));let n=[],{content:o,openStart:i,openEnd:s}=t;for(;i>1&&s>1&&1==o.childCount&&1==o.firstChild.childCount;){i--,s--;let e=o.firstChild;n.push(e.type.name,e.attrs!=e.type.defaultAttrs?e.attrs:null),o=e.content}let l=e.someProp("clipboardSerializer")||r.fromSchema(e.state.schema),d=ht(),a=d.createElement("div");a.appendChild(l.serializeFragment(o,{document:d}));let c,h=a.firstChild,f=0;for(;h&&1==h.nodeType&&(c=at[h.nodeName.toLowerCase()]);){for(let e=c.length-1;e>=0;e--){let t=d.createElement(c[e]);for(;a.firstChild;)t.appendChild(a.firstChild);a.appendChild(t),f++}h=a.firstChild}return h&&1==h.nodeType&&h.setAttribute("data-pm-slice",`${i} ${s}${f?` -${f}`:""} ${JSON.stringify(n)}`),{dom:a,text:e.someProp("clipboardTextSerializer",(n=>n(t,e)))||t.content.textBetween(0,t.content.size,"\n\n"),slice:t}}function nt(e,t,n,o,d){let a,c,h=d.parent.type.spec.code;if(!n&&!t)return null;let f=t&&(o||h||!n);if(f){if(e.someProp("transformPastedText",(n=>{t=n(t,h||o,e)})),h)return t?new i(s.from(e.state.schema.text(t.replace(/\r\n?/g,"\n"))),0,0):i.empty;let n=e.someProp("clipboardTextParser",(n=>n(t,d,o,e)));if(n)c=n;else{let n=d.marks(),{schema:o}=e.state,i=r.fromSchema(o);a=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach((e=>{let t=a.appendChild(document.createElement("p"));e&&t.appendChild(i.serializeNode(o.text(e,n)))}))}}else e.someProp("transformPastedHTML",(t=>{n=t(n,e)})),a=function(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n,o=ht().createElement("div"),i=/<([a-z][^>\s]+)/i.exec(e);(n=i&&at[i[1].toLowerCase()])&&(e=n.map((e=>"<"+e+">")).join("")+e+n.map((e=>"</"+e+">")).reverse().join(""));if(o.innerHTML=function(e){let t=window.trustedTypes;return t?t.createPolicy("detachedDocument",{createHTML:e=>e}).createHTML(e):e}(e),n)for(let e=0;e<n.length;e++)o=o.querySelector(n[e])||o;return o}(n),L&&function(e){let t=e.querySelectorAll(A?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<t.length;n++){let o=t[n];1==o.childNodes.length&&" "==o.textContent&&o.parentNode&&o.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),o)}}(a);let u=a&&a.querySelector("[data-pm-slice]"),p=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(p&&p[3])for(let e=+p[3];e>0;e--){let e=a.firstChild;for(;e&&1!=e.nodeType;)e=e.nextSibling;if(!e)break;a=e}if(!c){let t=e.someProp("clipboardParser")||e.someProp("domParser")||l.fromSchema(e.state.schema);c=t.parseSlice(a,{preserveWhitespace:!(!f&&!p),context:d,ruleFromNode:e=>"BR"!=e.nodeName||e.nextSibling||!e.parentNode||ot.test(e.parentNode.nodeName)?null:{ignore:!0}})}if(p)c=function(e,t){if(!e.size)return e;let n,o=e.content.firstChild.type.schema;try{n=JSON.parse(t)}catch(t){return e}let{content:r,openStart:l,openEnd:d}=e;for(let e=n.length-2;e>=0;e-=2){let t=o.nodes[n[e]];if(!t||t.hasRequiredAttrs())break;r=s.from(t.create(n[e+1],r)),l++,d++}return new i(r,l,d)}(dt(c,+p[1],+p[2]),p[4]);else if(c=i.maxOpen(function(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let o,i=t.node(n).contentMatchAt(t.index(n)),r=[];if(e.forEach((e=>{if(!r)return;let t,n=i.findWrapping(e.type);if(!n)return r=null;if(t=r.length&&o.length&&st(n,o,e,r[r.length-1],0))r[r.length-1]=t;else{r.length&&(r[r.length-1]=rt(r[r.length-1],o.length));let t=it(e,n);r.push(t),i=i.matchType(t.type),o=n}})),r)return s.from(r)}return e}(c.content,d),!0),c.openStart||c.openEnd){let e=0,t=0;for(let t=c.content.firstChild;e<c.openStart&&!t.type.spec.isolating;e++,t=t.firstChild);for(let e=c.content.lastChild;t<c.openEnd&&!e.type.spec.isolating;t++,e=e.lastChild);c=dt(c,e,t)}return e.someProp("transformPasted",(t=>{c=t(c,e)})),c}const ot=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function it(e,t,n=0){for(let o=t.length-1;o>=n;o--)e=t[o].create(null,s.from(e));return e}function st(e,t,n,o,i){if(i<e.length&&i<t.length&&e[i]==t[i]){let r=st(e,t,n,o.lastChild,i+1);if(r)return o.copy(o.content.replaceChild(o.childCount-1,r));if(o.contentMatchAt(o.childCount).matchType(i==e.length-1?n.type:e[i+1]))return o.copy(o.content.append(s.from(it(n,e,i+1))))}}function rt(e,t){if(0==t)return e;let n=e.content.replaceChild(e.childCount-1,rt(e.lastChild,t-1)),o=e.contentMatchAt(e.childCount).fillBefore(s.empty,!0);return e.copy(n.append(o))}function lt(e,t,n,o,i,r){let l=t<0?e.firstChild:e.lastChild,d=l.content;return e.childCount>1&&(r=0),i<o-1&&(d=lt(d,t,n,o,i+1,r)),i>=n&&(d=t<0?l.contentMatchAt(0).fillBefore(d,r<=i).append(d):d.append(l.contentMatchAt(l.childCount).fillBefore(s.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,l.copy(d))}function dt(e,t,n){return t<e.openStart&&(e=new i(lt(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new i(lt(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}const at={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let ct=null;function ht(){return ct||(ct=document.implementation.createHTMLDocument("title"))}const ft={},ut={},pt={touchstart:!0,touchmove:!0};class mt{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastAndroidDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function gt(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function yt(e){e.someProp("handleDOMEvents",(t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=t=>bt(e,t))}))}function bt(e,t){return e.someProp("handleDOMEvents",(n=>{let o=n[t.type];return!!o&&(o(e,t)||t.defaultPrevented)}))}function wt(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||11==n.nodeType||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function vt(e){return{left:e.clientX,top:e.clientY}}function Dt(e,t,n,o,i){if(-1==o)return!1;let s=e.state.doc.resolve(o);for(let o=s.depth+1;o>0;o--)if(e.someProp(t,(t=>o>s.depth?t(e,n,s.nodeAfter,s.before(o),i,!0):t(e,n,s.node(o),s.before(o),i,!1))))return!0;return!1}function Nt(e,t,n){if(e.focused||e.focus(),e.state.selection.eq(t))return;let o=e.state.tr.setSelection(t);o.setMeta("pointer",!0),e.dispatch(o)}function Ot(t,n,o,i,s){return Dt(t,"handleClickOn",n,o,i)||t.someProp("handleClick",(e=>e(t,n,i)))||(s?function(t,n){if(-1==n)return!1;let o,i,s=t.state.selection;s instanceof e&&(o=s.node);let r=t.state.doc.resolve(n);for(let t=r.depth+1;t>0;t--){let n=t>r.depth?r.nodeAfter:r.node(t);if(e.isSelectable(n)){i=o&&s.$from.depth>0&&t>=s.$from.depth&&r.before(s.$from.depth+1)==s.$from.pos?r.before(s.$from.depth):r.before(t);break}}return null!=i&&(Nt(t,e.create(t.state.doc,i)),!0)}(t,o):function(t,n){if(-1==n)return!1;let o=t.state.doc.resolve(n),i=o.nodeAfter;return!!(i&&i.isAtom&&e.isSelectable(i))&&(Nt(t,new e(o)),!0)}(t,o))}function St(e,t,n,o){return Dt(e,"handleDoubleClickOn",t,n,o)||e.someProp("handleDoubleClick",(n=>n(e,t,o)))}function Ct(n,o,i,s){return Dt(n,"handleTripleClickOn",o,i,s)||n.someProp("handleTripleClick",(e=>e(n,o,s)))||function(n,o,i){if(0!=i.button)return!1;let s=n.state.doc;if(-1==o)return!!s.inlineContent&&(Nt(n,t.create(s,0,s.content.size)),!0);let r=s.resolve(o);for(let o=r.depth+1;o>0;o--){let i=o>r.depth?r.nodeAfter:r.node(o),l=r.before(o);if(i.inlineContent)Nt(n,t.create(s,l+1,l+1+i.content.size));else{if(!e.isSelectable(i))continue;Nt(n,e.create(s,l))}return!0}}(n,i,s)}function Mt(e){return Rt(e)}ut.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=16==n.keyCode||n.shiftKey,!kt(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!I||!A||13!=n.keyCode))if(229!=n.keyCode&&e.domObserver.forceFlush(),!R||13!=n.keyCode||n.ctrlKey||n.altKey||n.metaKey)e.someProp("handleKeyDown",(t=>t(e,n)))||et(e,n)?n.preventDefault():gt(e,"key");else{let t=Date.now();e.input.lastIOSEnter=t,e.input.lastIOSEnterFallbackTimeout=setTimeout((()=>{e.input.lastIOSEnter==t&&(e.someProp("handleKeyDown",(t=>t(e,v(13,"Enter")))),e.input.lastIOSEnter=0)}),200)}},ut.keyup=(e,t)=>{16==t.keyCode&&(e.input.shiftKey=!1)},ut.keypress=(e,n)=>{let o=n;if(kt(e,o)||!o.charCode||o.ctrlKey&&!o.altKey||B&&o.metaKey)return;if(e.someProp("handleKeyPress",(t=>t(e,o))))return void o.preventDefault();let i=e.state.selection;if(!(i instanceof t&&i.$from.sameParent(i.$to))){let t=String.fromCharCode(o.charCode);/[\r\n]/.test(t)||e.someProp("handleTextInput",(n=>n(e,i.$from.pos,i.$to.pos,t)))||e.dispatch(e.state.tr.insertText(t).scrollIntoView()),o.preventDefault()}};const xt=B?"metaKey":"ctrlKey";ft.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let o=Mt(e),i=Date.now(),s="singleClick";i-e.input.lastClick.time<500&&function(e,t){let n=t.x-e.clientX,o=t.y-e.clientY;return n*n+o*o<100}(n,e.input.lastClick)&&!n[xt]&&("singleClick"==e.input.lastClick.type?s="doubleClick":"doubleClick"==e.input.lastClick.type&&(s="tripleClick")),e.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:s};let r=e.posAtCoords(vt(n));r&&("singleClick"==s?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new Tt(e,r,n,!!o)):("doubleClick"==s?St:Ct)(e,r.pos,r.inside,n)?n.preventDefault():gt(e,"pointer"))};class Tt{constructor(t,n,o,i){let s,r;if(this.view=t,this.pos=n,this.event=o,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!o[xt],this.allowDefault=o.shiftKey,n.inside>-1)s=t.state.doc.nodeAt(n.inside),r=n.inside;else{let e=t.state.doc.resolve(n.pos);s=e.parent,r=e.depth?e.before():0}const l=i?null:o.target,d=l?t.docView.nearestDesc(l,!0):null;this.target=d&&1==d.dom.nodeType?d.dom:null;let{selection:a}=t.state;(0==o.button&&s.type.spec.draggable&&!1!==s.type.spec.selectable||a instanceof e&&a.from<=r&&a.to>r)&&(this.mightDrag={node:s,pos:r,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!k||this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout((()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")}),20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),gt(t,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout((()=>Pe(this.view))),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(vt(e))),this.updateAllowDefault(e),this.allowDefault||!t?gt(this.view,"pointer"):Ot(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():0==e.button&&(this.flushed||V&&this.mightDrag&&!this.mightDrag.node.isAtom||A&&!this.view.state.selection.visible&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(Nt(this.view,n.near(this.view.state.doc.resolve(t.pos))),e.preventDefault()):gt(this.view,"pointer")}move(e){this.updateAllowDefault(e),gt(this.view,"pointer"),0==e.buttons&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}function kt(e,t){return!!e.composing||!!(V&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500)&&(e.input.compositionEndedAt=-2e8,!0)}ft.touchstart=e=>{e.input.lastTouch=Date.now(),Mt(e),gt(e,"pointer")},ft.touchmove=e=>{e.input.lastTouch=Date.now(),gt(e,"pointer")},ft.contextmenu=e=>Mt(e);const Et=I?5e3:-1;function At(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout((()=>Rt(e)),t))}function Pt(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=function(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function Vt(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let n=function(e,t){for(;;){if(3==e.nodeType&&t)return e;if(1==e.nodeType&&t>0){if("false"==e.contentEditable)return null;t=y(e=e.childNodes[t-1])}else{if(!e.parentNode||b(e))return null;t=c(e),e=e.parentNode}}}(t.focusNode,t.focusOffset),o=function(e,t){for(;;){if(3==e.nodeType&&t<e.nodeValue.length)return e;if(1==e.nodeType&&t<e.childNodes.length){if("false"==e.contentEditable)return null;e=e.childNodes[t],t=0}else{if(!e.parentNode||b(e))return null;t=c(e)+1,e=e.parentNode}}}(t.focusNode,t.focusOffset);if(n&&o&&n!=o){let t=o.pmViewDesc,i=e.domObserver.lastChangedTextNode;if(n==i||o==i)return i;if(!t||!t.isText(o.nodeValue))return o;if(e.input.compositionNode==o){let e=n.pmViewDesc;if(e&&e.isText(n.nodeValue))return o}}return n||o}function Rt(e,t=!1){if(!(I&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),Pt(e),t||e.docView&&e.docView.dirty){let n=Ee(e);return n&&!n.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(n)):!e.markCursor&&!t||e.state.selection.empty?e.updateState(e.state):e.dispatch(e.state.tr.deleteSelection()),!0}return!1}}ut.compositionstart=ut.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:n}=e,o=n.selection.$to;if(n.selection instanceof t&&(n.storedMarks||!o.textOffset&&o.parentOffset&&o.nodeBefore.marks.some((e=>!1===e.type.spec.inclusive))))e.markCursor=e.state.storedMarks||o.marks(),Rt(e,!0),e.markCursor=null;else if(Rt(e,!n.selection.empty),k&&n.selection.empty&&o.parentOffset&&!o.textOffset&&o.nodeBefore.marks.length){let t=e.domSelectionRange();for(let n=t.focusNode,o=t.focusOffset;n&&1==n.nodeType&&0!=o;){let t=o<0?n.lastChild:n.childNodes[o-1];if(!t)break;if(3==t.nodeType){let n=e.domSelection();n&&n.collapse(t,t.nodeValue.length);break}n=t,o=-1}}e.input.composing=!0}At(e,Et)},ut.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionNode=null,e.input.compositionPendingChanges&&Promise.resolve().then((()=>e.domObserver.flush())),e.input.compositionID++,At(e,20))};const Bt=x&&T<15||R&&F<604;function zt(e,t,n,o,s){let r=nt(e,t,n,o,e.state.selection.$from);if(e.someProp("handlePaste",(t=>t(e,s,r||i.empty))))return!0;if(!r)return!1;let l=function(e){return 0==e.openStart&&0==e.openEnd&&1==e.content.childCount?e.content.firstChild:null}(r),d=l?e.state.tr.replaceSelectionWith(l,o):e.state.tr.replaceSelection(r);return e.dispatch(d.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function It(e){let t=e.getData("text/plain")||e.getData("Text");if(t)return t;let n=e.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}ft.copy=ut.cut=(e,t)=>{let n=t,o=e.state.selection,i="cut"==n.type;if(o.empty)return;let s=Bt?null:n.clipboardData,r=o.content(),{dom:l,text:d}=tt(e,r);s?(n.preventDefault(),s.clearData(),s.setData("text/html",l.innerHTML),s.setData("text/plain",d)):function(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let o=getSelection(),i=document.createRange();i.selectNodeContents(t),e.dom.blur(),o.removeAllRanges(),o.addRange(i),setTimeout((()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()}),50)}(e,l),i&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},ut.paste=(e,t)=>{let n=t;if(e.composing&&!I)return;let o=Bt?null:n.clipboardData,i=e.input.shiftKey&&45!=e.input.lastKeyCode;o&&zt(e,It(o),o.getData("text/html"),i,n)?n.preventDefault():function(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,o=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(o.contentEditable="true"),o.style.cssText="position: fixed; left: -10000px; top: 10px",o.focus();let i=e.input.shiftKey&&45!=e.input.lastKeyCode;setTimeout((()=>{e.focus(),o.parentNode&&o.parentNode.removeChild(o),n?zt(e,o.value,null,i,t):zt(e,o.textContent,o.innerHTML,i,t)}),50)}(e,n)};class Lt{constructor(e,t,n){this.slice=e,this.move=t,this.node=n}}const Ft=B?"altKey":"ctrlKey";ft.dragstart=(t,n)=>{let o=n,i=t.input.mouseDown;if(i&&i.done(),!o.dataTransfer)return;let s,r=t.state.selection,l=r.empty?null:t.posAtCoords(vt(o));if(l&&l.pos>=r.from&&l.pos<=(r instanceof e?r.to-1:r.to));else if(i&&i.mightDrag)s=e.create(t.state.doc,i.mightDrag.pos);else if(o.target&&1==o.target.nodeType){let n=t.docView.nearestDesc(o.target,!0);n&&n.node.type.spec.draggable&&n!=t.docView&&(s=e.create(t.state.doc,n.posBefore))}let d=(s||t.state.selection).content(),{dom:a,text:c,slice:h}=tt(t,d);(!o.dataTransfer.files.length||!A||P>120)&&o.dataTransfer.clearData(),o.dataTransfer.setData(Bt?"Text":"text/html",a.innerHTML),o.dataTransfer.effectAllowed="copyMove",Bt||o.dataTransfer.setData("text/plain",c),t.dragging=new Lt(h,!o[Ft],s)},ft.dragend=e=>{let t=e.dragging;window.setTimeout((()=>{e.dragging==t&&(e.dragging=null)}),50)},ut.dragover=ut.dragenter=(e,t)=>t.preventDefault(),ut.drop=(t,n)=>{let o=n,s=t.dragging;if(t.dragging=null,!o.dataTransfer)return;let r=t.posAtCoords(vt(o));if(!r)return;let l=t.state.doc.resolve(r.pos),d=s&&s.slice;d?t.someProp("transformPasted",(e=>{d=e(d,t)})):d=nt(t,It(o.dataTransfer),Bt?null:o.dataTransfer.getData("text/html"),!1,l);let c=!(!s||o[Ft]);if(t.someProp("handleDrop",(e=>e(t,o,d||i.empty,c))))return void o.preventDefault();if(!d)return;o.preventDefault();let h=d?a(t.state.doc,l.pos,d):l.pos;null==h&&(h=l.pos);let f=t.state.tr;if(c){let{node:e}=s;e?e.replace(f):f.deleteSelection()}let u=f.mapping.map(h),p=0==d.openStart&&0==d.openEnd&&1==d.content.childCount,m=f.doc;if(p?f.replaceRangeWith(u,u,d.content.firstChild):f.replaceRange(u,u,d),f.doc.eq(m))return;let g=f.doc.resolve(u);if(p&&e.isSelectable(d.content.firstChild)&&g.nodeAfter&&g.nodeAfter.sameMarkup(d.content.firstChild))f.setSelection(new e(g));else{let e=f.mapping.map(h);f.mapping.maps[f.mapping.maps.length-1].forEach(((t,n,o,i)=>e=i)),f.setSelection(Fe(t,g,f.doc.resolve(e)))}t.focus(),t.dispatch(f.setMeta("uiEvent","drop"))},ft.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout((()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&Pe(e)}),20))},ft.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)},ft.beforeinput=(e,t)=>{if(A&&I&&"deleteContentBackward"==t.inputType){e.domObserver.flushSoon();let{domChangeCount:t}=e.input;setTimeout((()=>{if(e.input.domChangeCount!=t)return;if(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",(t=>t(e,v(8,"Backspace")))))return;let{$cursor:n}=e.state.selection;n&&n.pos>0&&e.dispatch(e.state.tr.delete(n.pos-1,n.pos).scrollIntoView())}),50)}};for(let e in ut)ft[e]=ut[e];function qt(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}class $t{constructor(e,t){this.toDOM=e,this.spec=t||Gt,this.side=this.spec.side||0}map(e,t,n,o){let{pos:i,deleted:s}=e.mapResult(t.from+o,this.side<0?-1:1);return s?null:new Ht(i-n,i-n,this)}valid(){return!0}eq(e){return this==e||e instanceof $t&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&qt(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Kt{constructor(e,t){this.attrs=e,this.spec=t||Gt}map(e,t,n,o){let i=e.map(t.from+o,this.spec.inclusiveStart?-1:1)-n,s=e.map(t.to+o,this.spec.inclusiveEnd?1:-1)-n;return i>=s?null:new Ht(i,s,this)}valid(e,t){return t.from<t.to}eq(e){return this==e||e instanceof Kt&&qt(this.attrs,e.attrs)&&qt(this.spec,e.spec)}static is(e){return e.type instanceof Kt}destroy(){}}class Wt{constructor(e,t){this.attrs=e,this.spec=t||Gt}map(e,t,n,o){let i=e.mapResult(t.from+o,1);if(i.deleted)return null;let s=e.mapResult(t.to+o,-1);return s.deleted||s.pos<=i.pos?null:new Ht(i.pos-n,s.pos-n,this)}valid(e,t){let n,{index:o,offset:i}=e.content.findIndex(t.from);return i==t.from&&!(n=e.child(o)).isText&&i+n.nodeSize==t.to}eq(e){return this==e||e instanceof Wt&&qt(this.attrs,e.attrs)&&qt(this.spec,e.spec)}destroy(){}}class Ht{constructor(e,t,n){this.from=e,this.to=t,this.type=n}copy(e,t){return new Ht(e,t,this.type)}eq(e,t=0){return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}map(e,t,n){return this.type.map(e,this,t,n)}static widget(e,t,n){return new Ht(e,e,new $t(t,n))}static inline(e,t,n,o){return new Ht(e,t,new Kt(n,o))}static node(e,t,n,o){return new Ht(e,t,new Wt(n,o))}get spec(){return this.type.spec}get inline(){return this.type instanceof Kt}get widget(){return this.type instanceof $t}}const _t=[],Gt={};class Ut{constructor(e,t){this.local=e.length?e:_t,this.children=t.length?t:_t}static create(e,t){return t.length?Zt(t,e,0,Gt):jt}find(e,t,n){let o=[];return this.findInner(null==e?0:e,null==t?1e9:t,o,0,n),o}findInner(e,t,n,o,i){for(let s=0;s<this.local.length;s++){let r=this.local[s];r.from<=t&&r.to>=e&&(!i||i(r.spec))&&n.push(r.copy(r.from+o,r.to+o))}for(let s=0;s<this.children.length;s+=3)if(this.children[s]<t&&this.children[s+1]>e){let r=this.children[s]+1;this.children[s+2].findInner(e-r,t-r,n,o+r,i)}}map(e,t,n){return this==jt||0==e.maps.length?this:this.mapInner(e,t,0,0,n||Gt)}mapInner(e,t,n,o,i){let s;for(let r=0;r<this.local.length;r++){let l=this.local[r].map(e,n,o);l&&l.type.valid(t,l)?(s||(s=[])).push(l):i.onRemove&&i.onRemove(this.local[r].spec)}return this.children.length?function(e,t,n,o,i,s,r){let l=e.slice();for(let e=0,t=s;e<n.maps.length;e++){let o=0;n.maps[e].forEach(((e,n,i,s)=>{let r=s-i-(n-e);for(let i=0;i<l.length;i+=3){let s=l[i+1];if(s<0||e>s+t-o)continue;let d=l[i]+t-o;n>=d?l[i+1]=e<=d?-2:-1:e>=t&&r&&(l[i]+=r,l[i+1]+=r)}o+=r})),t=n.maps[e].map(t,-1)}let d=!1;for(let t=0;t<l.length;t+=3)if(l[t+1]<0){if(-2==l[t+1]){d=!0,l[t+1]=-1;continue}let a=n.map(e[t]+s),c=a-i;if(c<0||c>=o.content.size){d=!0;continue}let h=n.map(e[t+1]+s,-1)-i,{index:f,offset:u}=o.content.findIndex(c),p=o.maybeChild(f);if(p&&u==c&&u+p.nodeSize==h){let o=l[t+2].mapInner(n,p,a+1,e[t]+s+1,r);o!=jt?(l[t]=c,l[t+1]=h,l[t+2]=o):(l[t+1]=-2,d=!0)}else d=!0}if(d){let d=function(e,t,n,o,i,s,r){function l(e,t){for(let s=0;s<e.local.length;s++){let l=e.local[s].map(o,i,t);l?n.push(l):r.onRemove&&r.onRemove(e.local[s].spec)}for(let n=0;n<e.children.length;n+=3)l(e.children[n+2],e.children[n]+t+1)}for(let n=0;n<e.length;n+=3)-1==e[n+1]&&l(e[n+2],t[n]+s+1);return n}(l,e,t,n,i,s,r),a=Zt(d,o,0,r);t=a.local;for(let e=0;e<l.length;e+=3)l[e+1]<0&&(l.splice(e,3),e-=3);for(let e=0,t=0;e<a.children.length;e+=3){let n=a.children[e];for(;t<l.length&&l[t]<n;)t+=3;l.splice(t,0,a.children[e],a.children[e+1],a.children[e+2])}}return new Ut(t.sort(en),l)}(this.children,s||[],e,t,n,o,i):s?new Ut(s.sort(en),_t):jt}add(e,t){return t.length?this==jt?Ut.create(e,t):this.addInner(e,t,0):this}addInner(e,t,n){let o,i=0;e.forEach(((e,s)=>{let r,l=s+n;if(r=Jt(t,e,l)){for(o||(o=this.children.slice());i<o.length&&o[i]<s;)i+=3;o[i]==s?o[i+2]=o[i+2].addInner(e,r,l+1):o.splice(i,0,s,s+e.nodeSize,Zt(r,e,l+1,Gt)),i+=3}}));let s=Yt(i?Qt(t):t,-n);for(let t=0;t<s.length;t++)s[t].type.valid(e,s[t])||s.splice(t--,1);return new Ut(s.length?this.local.concat(s).sort(en):this.local,o||this.children)}remove(e){return 0==e.length||this==jt?this:this.removeInner(e,0)}removeInner(e,t){let n=this.children,o=this.local;for(let o=0;o<n.length;o+=3){let i,s=n[o]+t,r=n[o+1]+t;for(let t,n=0;n<e.length;n++)(t=e[n])&&t.from>s&&t.to<r&&(e[n]=null,(i||(i=[])).push(t));if(!i)continue;n==this.children&&(n=this.children.slice());let l=n[o+2].removeInner(i,s+1);l!=jt?n[o+2]=l:(n.splice(o,3),o-=3)}if(o.length)for(let n,i=0;i<e.length;i++)if(n=e[i])for(let e=0;e<o.length;e++)o[e].eq(n,t)&&(o==this.local&&(o=this.local.slice()),o.splice(e--,1));return n==this.children&&o==this.local?this:o.length||n.length?new Ut(o,n):jt}forChild(e,t){if(this==jt)return this;if(t.isLeaf)return Ut.empty;let n,o;for(let t=0;t<this.children.length;t+=3)if(this.children[t]>=e){this.children[t]==e&&(n=this.children[t+2]);break}let i=e+1,s=i+t.content.size;for(let e=0;e<this.local.length;e++){let t=this.local[e];if(t.from<s&&t.to>i&&t.type instanceof Kt){let e=Math.max(i,t.from)-i,n=Math.min(s,t.to)-i;e<n&&(o||(o=[])).push(t.copy(e,n))}}if(o){let e=new Ut(o.sort(en),_t);return n?new Xt([e,n]):e}return n||jt}eq(e){if(this==e)return!0;if(!(e instanceof Ut)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let t=0;t<this.local.length;t++)if(!this.local[t].eq(e.local[t]))return!1;for(let t=0;t<this.children.length;t+=3)if(this.children[t]!=e.children[t]||this.children[t+1]!=e.children[t+1]||!this.children[t+2].eq(e.children[t+2]))return!1;return!0}locals(e){return tn(this.localsInner(e))}localsInner(e){if(this==jt)return _t;if(e.inlineContent||!this.local.some(Kt.is))return this.local;let t=[];for(let e=0;e<this.local.length;e++)this.local[e].type instanceof Kt||t.push(this.local[e]);return t}forEachSet(e){e(this)}}Ut.empty=new Ut([],[]),Ut.removeOverlap=tn;const jt=Ut.empty;class Xt{constructor(e){this.members=e}map(e,t){const n=this.members.map((n=>n.map(e,t,Gt)));return Xt.from(n)}forChild(e,t){if(t.isLeaf)return Ut.empty;let n=[];for(let o=0;o<this.members.length;o++){let i=this.members[o].forChild(e,t);i!=jt&&(i instanceof Xt?n=n.concat(i.members):n.push(i))}return Xt.from(n)}eq(e){if(!(e instanceof Xt)||e.members.length!=this.members.length)return!1;for(let t=0;t<this.members.length;t++)if(!this.members[t].eq(e.members[t]))return!1;return!0}locals(e){let t,n=!0;for(let o=0;o<this.members.length;o++){let i=this.members[o].localsInner(e);if(i.length)if(t){n&&(t=t.slice(),n=!1);for(let e=0;e<i.length;e++)t.push(i[e])}else t=i}return t?tn(n?t:t.sort(en)):_t}static from(e){switch(e.length){case 0:return jt;case 1:return e[0];default:return new Xt(e.every((e=>e instanceof Ut))?e:e.reduce(((e,t)=>e.concat(t instanceof Ut?t:t.members)),[]))}}forEachSet(e){for(let t=0;t<this.members.length;t++)this.members[t].forEachSet(e)}}function Yt(e,t){if(!t||!e.length)return e;let n=[];for(let o=0;o<e.length;o++){let i=e[o];n.push(new Ht(i.from+t,i.to+t,i.type))}return n}function Jt(e,t,n){if(t.isLeaf)return null;let o=n+t.nodeSize,i=null;for(let t,s=0;s<e.length;s++)(t=e[s])&&t.from>n&&t.to<o&&((i||(i=[])).push(t),e[s]=null);return i}function Qt(e){let t=[];for(let n=0;n<e.length;n++)null!=e[n]&&t.push(e[n]);return t}function Zt(e,t,n,o){let i=[],s=!1;t.forEach(((t,r)=>{let l=Jt(e,t,r+n);if(l){s=!0;let e=Zt(l,t,n+r+1,o);e!=jt&&i.push(r,r+t.nodeSize,e)}}));let r=Yt(s?Qt(e):e,-n).sort(en);for(let e=0;e<r.length;e++)r[e].type.valid(t,r[e])||(o.onRemove&&o.onRemove(r[e].spec),r.splice(e--,1));return r.length||i.length?new Ut(r,i):jt}function en(e,t){return e.from-t.from||e.to-t.to}function tn(e){let t=e;for(let n=0;n<t.length-1;n++){let o=t[n];if(o.from!=o.to)for(let i=n+1;i<t.length;i++){let s=t[i];if(s.from!=o.from){s.from<o.to&&(t==e&&(t=e.slice()),t[n]=o.copy(o.from,s.from),nn(t,i,o.copy(s.from,o.to)));break}s.to!=o.to&&(t==e&&(t=e.slice()),t[i]=s.copy(s.from,o.to),nn(t,i+1,s.copy(o.to,s.to)))}}return t}function nn(e,t,n){for(;t<e.length&&en(n,e[t])>0;)t++;e.splice(t,0,n)}function on(e){let t=[];return e.someProp("decorations",(n=>{let o=n(e.state);o&&o!=jt&&t.push(o)})),e.cursorWrapper&&t.push(Ut.create(e.state.doc,[e.cursorWrapper.deco])),Xt.from(t)}const sn={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},rn=x&&T<=11;class ln{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class dn{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new ln,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver((e=>{for(let t=0;t<e.length;t++)this.queue.push(e[t]);x&&T<=11&&e.some((e=>"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length))?this.flushSoon():this.flush()})),rn&&(this.onCharData=e=>{this.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout((()=>{this.flushingSoon=-1,this.flush()}),20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,sn)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let t=0;t<e.length;t++)this.queue.push(e[t]);window.setTimeout((()=>this.flush()),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout((()=>this.suppressingSelectionUpdates=!1),50)}onSelectionChange(){if(qe(this.view)){if(this.suppressingSelectionUpdates)return Pe(this.view);if(x&&T<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&p(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let t,n=new Set;for(let t=e.focusNode;t;t=h(t))n.add(t);for(let o=e.anchorNode;o;o=h(o))if(n.has(o)){t=o;break}let o=t&&this.view.docView.nearestDesc(t);return o&&o.ignoreMutation({type:"selection",target:3==t.nodeType?t.parentNode:t})?(this.setCurSelection(),!0):void 0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let t=this.pendingRecords();t.length&&(this.queue=[]);let o=e.domSelectionRange(),i=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(o)&&qe(e)&&!this.ignoreSelectionChange(o),s=-1,r=-1,l=!1,d=[];if(e.editable)for(let e=0;e<t.length;e++){let n=this.registerMutation(t[e],d);n&&(s=s<0?n.from:Math.min(n.from,s),r=r<0?n.to:Math.max(n.to,r),n.typeOver&&(l=!0))}if(k&&d.length){let t=d.filter((e=>"BR"==e.nodeName));if(2==t.length){let[e,n]=t;e.parentNode&&e.parentNode.parentNode==n.parentNode?n.remove():e.remove()}else{let{focusNode:n}=this.currentSelection;for(let o of t){let t=o.parentNode;!t||"LI"!=t.nodeName||n&&fn(e,n)==t||o.remove()}}}let a=null;s<0&&i&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&w(o)&&(a=Ee(e))&&a.eq(n.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,Pe(e),this.currentSelection.set(o),e.scrollToSelection()):(s>-1||i)&&(s>-1&&(e.docView.markDirty(s,r),function(e){if(an.has(e))return;if(an.set(e,null),-1!==["normal","nowrap","pre-line"].indexOf(getComputedStyle(e.dom).whiteSpace)){if(e.requiresGeckoHackNode=k,cn)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),cn=!0}}(e)),this.handleDOMChange(s,r,l,d),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(o)||Pe(e),this.currentSelection.set(o))}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let n=this.view.docView.nearestDesc(e.target);if("attributes"==e.type&&(n==this.view.docView||"contenteditable"==e.attributeName||"style"==e.attributeName&&!e.oldValue&&!e.target.getAttribute("style")))return null;if(!n||n.ignoreMutation(e))return null;if("childList"==e.type){for(let n=0;n<e.addedNodes.length;n++){let o=e.addedNodes[n];t.push(o),3==o.nodeType&&(this.lastChangedTextNode=o)}if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(e.target))return{from:n.posBefore,to:n.posAfter};let o=e.previousSibling,i=e.nextSibling;if(x&&T<=11&&e.addedNodes.length)for(let t=0;t<e.addedNodes.length;t++){let{previousSibling:n,nextSibling:s}=e.addedNodes[t];(!n||Array.prototype.indexOf.call(e.addedNodes,n)<0)&&(o=n),(!s||Array.prototype.indexOf.call(e.addedNodes,s)<0)&&(i=s)}let s=o&&o.parentNode==e.target?c(o)+1:0,r=n.localPosFromDOM(e.target,s,-1),l=i&&i.parentNode==e.target?c(i):e.target.childNodes.length;return{from:r,to:n.localPosFromDOM(e.target,l,1)}}return"attributes"==e.type?{from:n.posAtStart-n.border,to:n.posAtEnd+n.border}:(this.lastChangedTextNode=e.target,{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let an=new WeakMap,cn=!1;function hn(e,t){let n=t.startContainer,o=t.startOffset,i=t.endContainer,s=t.endOffset,r=e.domAtPos(e.state.selection.anchor);return p(r.node,r.offset,i,s)&&([n,o,i,s]=[i,s,n,o]),{anchorNode:n,anchorOffset:o,focusNode:i,focusOffset:s}}function fn(e,t){for(let n=t.parentNode;n&&n!=e.dom;n=n.parentNode){let t=e.docView.nearestDesc(n,!0);if(t&&t.node.isBlock)return n}return null}function un(e){let t=e.pmViewDesc;if(t)return t.parseRule();if("BR"==e.nodeName&&e.parentNode){if(V&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let e=document.createElement("div");return e.appendChild(document.createElement("li")),{skip:e}}if(e.parentNode.lastChild==e||V&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if("IMG"==e.nodeName&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}const pn=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function mn(e,o,i,r,d){let a=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,o<0){let t=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,n=Ee(e,t);if(n&&!e.state.selection.eq(n)){if(A&&I&&13===e.input.lastKeyCode&&Date.now()-100<e.input.lastKeyCodeTime&&e.someProp("handleKeyDown",(t=>t(e,v(13,"Enter")))))return;let o=e.state.tr.setSelection(n);"pointer"==t?o.setMeta("pointer",!0):"key"==t&&o.scrollIntoView(),a&&o.setMeta("composition",a),e.dispatch(o)}return}let c=e.state.doc.resolve(o),h=c.sharedDepth(i);o=c.before(h+1),i=e.state.doc.resolve(i).after(h+1);let f,u,p=e.state.selection,m=function(e,t,n){let o,{node:i,fromOffset:s,toOffset:r,from:d,to:a}=e.docView.parseRange(t,n),c=e.domSelectionRange(),h=c.anchorNode;if(h&&e.dom.contains(1==h.nodeType?h:h.parentNode)&&(o=[{node:h,offset:c.anchorOffset}],w(c)||o.push({node:c.focusNode,offset:c.focusOffset})),A&&8===e.input.lastKeyCode)for(let e=r;e>s;e--){let t=i.childNodes[e-1],n=t.pmViewDesc;if("BR"==t.nodeName&&!n){r=e;break}if(!n||n.size)break}let f=e.state.doc,u=e.someProp("domParser")||l.fromSchema(e.state.schema),p=f.resolve(d),m=null,g=u.parse(i,{topNode:p.parent,topMatch:p.parent.contentMatchAt(p.index()),topOpen:!0,from:s,to:r,preserveWhitespace:"pre"!=p.parent.type.whitespace||"full",findPositions:o,ruleFromNode:un,context:p});if(o&&null!=o[0].pos){let e=o[0].pos,t=o[1]&&o[1].pos;null==t&&(t=e),m={anchor:e+d,head:t+d}}return{doc:g,sel:m,from:d,to:a}}(e,o,i),g=e.state.doc,y=g.slice(m.from,m.to);8===e.input.lastKeyCode&&Date.now()-100<e.input.lastKeyCodeTime?(f=e.state.selection.to,u="end"):(f=e.state.selection.from,u="start"),e.input.lastKeyCode=null;let b=function(e,t,n,o,i){let s=e.findDiffStart(t,n);if(null==s)return null;let{a:r,b:l}=e.findDiffEnd(t,n+e.size,n+t.size);if("end"==i){o-=r+Math.max(0,s-Math.min(r,l))-s}if(r<s&&e.size<t.size){let e=o<=s&&o>=r?s-o:0;s-=e,s&&s<t.size&&bn(t.textBetween(s-1,s+1))&&(s+=e?1:-1),l=s+(l-r),r=s}else if(l<s){let t=o<=s&&o>=l?s-o:0;s-=t,s&&s<e.size&&bn(e.textBetween(s-1,s+1))&&(s+=t?1:-1),r=s+(r-l),l=s}return{start:s,endA:r,endB:l}}(y.content,m.doc.content,m.from,f,u);if(b&&e.input.domChangeCount++,(R&&e.input.lastIOSEnter>Date.now()-225||I)&&d.some((e=>1==e.nodeType&&!pn.test(e.nodeName)))&&(!b||b.endA>=b.endB)&&e.someProp("handleKeyDown",(t=>t(e,v(13,"Enter")))))return void(e.input.lastIOSEnter=0);if(!b){if(!(r&&p instanceof t&&!p.empty&&p.$head.sameParent(p.$anchor))||e.composing||m.sel&&m.sel.anchor!=m.sel.head){if(m.sel){let t=gn(e,e.state.doc,m.sel);if(t&&!t.eq(e.state.selection)){let n=e.state.tr.setSelection(t);a&&n.setMeta("composition",a),e.dispatch(n)}}return}b={start:p.from,endA:p.to,endB:p.to}}e.state.selection.from<e.state.selection.to&&b.start==b.endB&&e.state.selection instanceof t&&(b.start>e.state.selection.from&&b.start<=e.state.selection.from+2&&e.state.selection.from>=m.from?b.start=e.state.selection.from:b.endA<e.state.selection.to&&b.endA>=e.state.selection.to-2&&e.state.selection.to<=m.to&&(b.endB+=e.state.selection.to-b.endA,b.endA=e.state.selection.to)),x&&T<=11&&b.endB==b.start+1&&b.endA==b.start&&b.start>m.from&&" "==m.doc.textBetween(b.start-m.from-1,b.start-m.from+1)&&(b.start--,b.endA--,b.endB--);let D,N=m.doc.resolveNoCache(b.start-m.from),O=m.doc.resolveNoCache(b.endB-m.from),S=g.resolve(b.start),C=N.sameParent(O)&&N.parent.inlineContent&&S.end()>=b.endA;if((R&&e.input.lastIOSEnter>Date.now()-225&&(!C||d.some((e=>"DIV"==e.nodeName||"P"==e.nodeName)))||!C&&N.pos<m.doc.content.size&&!N.sameParent(O)&&(D=n.findFrom(m.doc.resolve(N.pos+1),1,!0))&&D.head==O.pos)&&e.someProp("handleKeyDown",(t=>t(e,v(13,"Enter")))))return void(e.input.lastIOSEnter=0);if(e.state.selection.anchor>b.start&&function(e,t,n,o,i){if(n-t<=i.pos-o.pos||yn(o,!0,!1)<i.pos)return!1;let s=e.resolve(t);if(!o.parent.isTextblock){let e=s.nodeAfter;return null!=e&&n==t+e.nodeSize}if(s.parentOffset<s.parent.content.size||!s.parent.isTextblock)return!1;let r=e.resolve(yn(s,!0,!0));return!(!r.parent.isTextblock||r.pos>n||yn(r,!0,!1)<n)&&o.parent.content.cut(o.parentOffset).eq(r.parent.content)}(g,b.start,b.endA,N,O)&&e.someProp("handleKeyDown",(t=>t(e,v(8,"Backspace")))))return void(I&&A&&e.domObserver.suppressSelectionUpdates());A&&I&&b.endB==b.start&&(e.input.lastAndroidDelete=Date.now()),I&&!C&&N.start()!=O.start()&&0==O.parentOffset&&N.depth==O.depth&&m.sel&&m.sel.anchor==m.sel.head&&m.sel.head==b.endA&&(b.endB-=2,O=m.doc.resolveNoCache(b.endB-m.from),setTimeout((()=>{e.someProp("handleKeyDown",(function(t){return t(e,v(13,"Enter"))}))}),20));let M,k,E,P=b.start,V=b.endA;if(C)if(N.pos==O.pos)x&&T<=11&&0==N.parentOffset&&(e.domObserver.suppressSelectionUpdates(),setTimeout((()=>Pe(e)),20)),M=e.state.tr.delete(P,V),k=g.resolve(b.start).marksAcross(g.resolve(b.endA));else if(b.endA==b.endB&&(E=function(e,t){let n,o,i,r=e.firstChild.marks,l=t.firstChild.marks,d=r,a=l;for(let e=0;e<l.length;e++)d=l[e].removeFromSet(d);for(let e=0;e<r.length;e++)a=r[e].removeFromSet(a);if(1==d.length&&0==a.length)o=d[0],n="add",i=e=>e.mark(o.addToSet(e.marks));else{if(0!=d.length||1!=a.length)return null;o=a[0],n="remove",i=e=>e.mark(o.removeFromSet(e.marks))}let c=[];for(let e=0;e<t.childCount;e++)c.push(i(t.child(e)));if(s.from(c).eq(e))return{mark:o,type:n}}(N.parent.content.cut(N.parentOffset,O.parentOffset),S.parent.content.cut(S.parentOffset,b.endA-S.start()))))M=e.state.tr,"add"==E.type?M.addMark(P,V,E.mark):M.removeMark(P,V,E.mark);else if(N.parent.child(N.index()).isText&&N.index()==O.index()-(O.textOffset?0:1)){let t=N.parent.textBetween(N.parentOffset,O.parentOffset);if(e.someProp("handleTextInput",(n=>n(e,P,V,t))))return;M=e.state.tr.insertText(t,P,V)}if(M||(M=e.state.tr.replace(P,V,m.doc.slice(b.start-m.from,b.endB-m.from))),m.sel){let t=gn(e,M.doc,m.sel);t&&!(A&&I&&e.composing&&t.empty&&(b.start!=b.endB||e.input.lastAndroidDelete<Date.now()-100)&&(t.head==P||t.head==M.mapping.map(V)-1)||x&&t.empty&&t.head==P)&&M.setSelection(t)}k&&M.ensureMarks(k),a&&M.setMeta("composition",a),e.dispatch(M.scrollIntoView())}function gn(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:Fe(e,t.resolve(n.anchor),t.resolve(n.head))}function yn(e,t,n){let o=e.depth,i=t?e.end():e.pos;for(;o>0&&(t||e.indexAfter(o)==e.node(o).childCount);)o--,i++,t=!1;if(n){let t=e.node(o).maybeChild(e.indexAfter(o));for(;t&&!t.isLeaf;)t=t.firstChild,i++}return i}function bn(e){if(2!=e.length)return!1;let t=e.charCodeAt(0),n=e.charCodeAt(1);return t>=56320&&t<=57343&&n>=55296&&n<=56319}class wn{constructor(e,t){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new mt,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(Sn),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):"function"==typeof e?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=Nn(this),Dn(this),this.nodeViews=On(this),this.docView=pe(this.state.doc,vn(this),on(this),this.dom,this),this.domObserver=new dn(this,((e,t,n,o)=>mn(this,e,t,n,o))),this.domObserver.start(),function(e){for(let t in ft){let n=ft[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=t=>{!wt(e,t)||bt(e,t)||!e.editable&&t.type in ut||n(e,t)},pt[t]?{passive:!0}:void 0)}V&&e.dom.addEventListener("input",(()=>null)),yt(e)}(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&yt(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(Sn),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let e in this._props)t[e]=this._props[e];t.state=this.state;for(let n in e)t[n]=e[n];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){var n;let o=this.state,i=!1,s=!1;e.storedMarks&&this.composing&&(Pt(this),s=!0),this.state=e;let r=o.plugins!=e.plugins||this._props.plugins!=t.plugins;if(r||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let e=On(this);(function(e,t){let n=0,o=0;for(let o in e){if(e[o]!=t[o])return!0;n++}for(let e in t)o++;return n!=o})(e,this.nodeViews)&&(this.nodeViews=e,i=!0)}(r||t.handleDOMEvents!=this._props.handleDOMEvents)&&yt(this),this.editable=Nn(this),Dn(this);let l=on(this),d=vn(this),a=o.plugins==e.plugins||o.doc.eq(e.doc)?e.scrollToSelection>o.scrollToSelection?"to selection":"preserve":"reset",c=i||!this.docView.matchesNode(e.doc,d,l);!c&&e.selection.eq(o.selection)||(s=!0);let h="preserve"==a&&s&&null==this.dom.style.overflowAnchor&&function(e){let t,n,o=e.dom.getBoundingClientRect(),i=Math.max(0,o.top);for(let s=(o.left+o.right)/2,r=i+1;r<Math.min(innerHeight,o.bottom);r+=5){let o=e.root.elementFromPoint(s,r);if(!o||o==e.dom||!e.dom.contains(o))continue;let l=o.getBoundingClientRect();if(l.top>=i-20){t=o,n=l.top;break}}return{refDOM:t,refTop:n,stack:H(e.dom)}}(this);if(s){this.domObserver.stop();let t=c&&(x||A)&&!this.composing&&!o.selection.empty&&!e.selection.empty&&function(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}(o.selection,e.selection);if(c){let n=A?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=Vt(this)),!i&&this.docView.update(e.doc,d,l,this)||(this.docView.updateOuterDeco(d),this.docView.destroy(),this.docView=pe(e.doc,d,l,this.dom,this)),n&&!this.trackWrites&&(t=!0)}t||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&function(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return p(t.node,t.offset,n.anchorNode,n.anchorOffset)}(this))?Pe(this,t):(Ie(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(o),(null===(n=this.dragging)||void 0===n?void 0:n.node)&&!o.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,o),"reset"==a?this.dom.scrollTop=0:"to selection"==a?this.scrollToSelection():h&&function({refDOM:e,refTop:t,stack:n}){let o=e?e.getBoundingClientRect().top:0;_(n,0==o?0:o-t)}(h)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(this.someProp("handleScrollToSelection",(e=>e(this))));else if(this.state.selection instanceof e){let e=this.docView.domAfterPos(this.state.selection.from);1==e.nodeType&&W(this,e.getBoundingClientRect(),t)}else W(this,this.coordsAtPos(this.state.selection.head,1),t)}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(e&&e.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(let t=0;t<this.pluginViews.length;t++){let n=this.pluginViews[t];n.update&&n.update(this,e)}else{this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let e=0;e<this.directPlugins.length;e++){let t=this.directPlugins[e];t.spec.view&&this.pluginViews.push(t.spec.view(this))}for(let e=0;e<this.state.plugins.length;e++){let t=this.state.plugins[e];t.spec.view&&this.pluginViews.push(t.spec.view(this))}}}updateDraggedNode(t,n){let o=t.node,i=-1;if(this.state.doc.nodeAt(o.from)==o.node)i=o.from;else{let e=o.from+(this.state.doc.content.size-n.doc.content.size);(e>0&&this.state.doc.nodeAt(e))==o.node&&(i=e)}this.dragging=new Lt(t.slice,t.move,i<0?void 0:e.create(this.state.doc,i))}someProp(e,t){let n,o=this._props&&this._props[e];if(null!=o&&(n=t?t(o):o))return n;for(let o=0;o<this.directPlugins.length;o++){let i=this.directPlugins[o].props[e];if(null!=i&&(n=t?t(i):i))return n}let i=this.state.plugins;if(i)for(let o=0;o<i.length;o++){let s=i[o].props[e];if(null!=s&&(n=t?t(s):s))return n}}hasFocus(){if(x){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if("false"==e.contentEditable)return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&function(e){if(e.setActive)return e.setActive();if(G)return e.focus(G);let t=H(e);e.focus(null==G?{get preventScroll(){return G={preventScroll:!0},!0}}:void 0),G||(G=!1,_(t,0))}(this.dom),Pe(this),this.domObserver.start()}get root(){let e=this._root;if(null==e)for(let e=this.dom.parentNode;e;e=e.parentNode)if(9==e.nodeType||11==e.nodeType&&e.host)return e.getSelection||(Object.getPrototypeOf(e).getSelection=()=>e.ownerDocument.getSelection()),this._root=e;return e||document}updateRoot(){this._root=null}posAtCoords(e){return Y(this,e)}coordsAtPos(e,t=1){return ee(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,n=-1){let o=this.docView.posFromDOM(e,t,n);if(null==o)throw new RangeError("DOM position not inside the editor");return o}endOfTextblock(e,t){return de(this,t||this.state,e)}pasteHTML(e,t){return zt(this,"",e,!1,t||new ClipboardEvent("paste"))}pasteText(e,t){return zt(this,e,null,!0,t||new ClipboardEvent("paste"))}destroy(){this.docView&&(!function(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],on(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,f=null)}get isDestroyed(){return null==this.docView}dispatchEvent(e){return function(e,t){bt(e,t)||!ft[t.type]||!e.editable&&t.type in ut||ft[t.type](e,t)}(this,e)}dispatch(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))}domSelectionRange(){let e=this.domSelection();return e?V&&11===this.root.nodeType&&function(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}(this.dom.ownerDocument)==this.dom&&function(e,t){if(t.getComposedRanges){let n=t.getComposedRanges(e.root)[0];if(n)return hn(e,n)}let n;function o(e){e.preventDefault(),e.stopImmediatePropagation(),n=e.getTargetRanges()[0]}return e.dom.addEventListener("beforeinput",o,!0),document.execCommand("indent"),e.dom.removeEventListener("beforeinput",o,!0),n?hn(e,n):null}(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function vn(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",(n=>{if("function"==typeof n&&(n=n(e.state)),n)for(let e in n)"class"==e?t.class+=" "+n[e]:"style"==e?t.style=(t.style?t.style+";":"")+n[e]:t[e]||"contenteditable"==e||"nodeName"==e||(t[e]=String(n[e]))})),t.translate||(t.translate="no"),[Ht.node(0,e.state.doc.content.size,t)]}function Dn(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:Ht.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function Nn(e){return!e.someProp("editable",(t=>!1===t(e.state)))}function On(e){let t=Object.create(null);function n(e){for(let n in e)Object.prototype.hasOwnProperty.call(t,n)||(t[n]=e[n])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function Sn(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}export{Ht as Decoration,Ut as DecorationSet,wn as EditorView};
|
2
|
-
//# sourceMappingURL=index2.mjs.map
|