@gsc-basic/shared-service 1.0.5 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +14 -0
- package/dist/shared-service.js +14 -0
- package/index.d.ts +64 -62
- package/package.json +16 -13
- package/dist/es/_virtual/_plugin-vue_export-helper.js +0 -22
- package/dist/es/_virtual/index.js +0 -15
- package/dist/es/_virtual/index2.js +0 -17
- package/dist/es/configs/auth-config/dist/index.js +0 -91
- package/dist/es/email-center/AccountConf/index.js +0 -19
- package/dist/es/email-center/AccountConf/src/config/columns.js +0 -82
- package/dist/es/email-center/AccountConf/src/config/filters.js +0 -61
- package/dist/es/email-center/AccountConf/src/config/schema.js +0 -139
- package/dist/es/email-center/AccountConf/src/constant/index.js +0 -72
- package/dist/es/email-center/AccountConf/src/index.css +0 -14
- package/dist/es/email-center/AccountConf/src/index.vue.js +0 -98
- package/dist/es/email-center/AccountConf/src/index2.css +0 -14
- package/dist/es/email-center/CmGroup/index.js +0 -19
- package/dist/es/email-center/CmGroup/src/config/columns.js +0 -77
- package/dist/es/email-center/CmGroup/src/config/filters.js +0 -64
- package/dist/es/email-center/CmGroup/src/config/schema.js +0 -79
- package/dist/es/email-center/CmGroup/src/constant/index.js +0 -26
- package/dist/es/email-center/CmGroup/src/index.css +0 -14
- package/dist/es/email-center/CmGroup/src/index.vue.js +0 -91
- package/dist/es/email-center/CmGroup/src/index2.css +0 -14
- package/dist/es/email-center/InboxNotifyConf/index.js +0 -19
- package/dist/es/email-center/InboxNotifyConf/src/config/columns.js +0 -124
- package/dist/es/email-center/InboxNotifyConf/src/config/filters.js +0 -61
- package/dist/es/email-center/InboxNotifyConf/src/config/schema.js +0 -152
- package/dist/es/email-center/InboxNotifyConf/src/constant/index.js +0 -104
- package/dist/es/email-center/InboxNotifyConf/src/index.css +0 -14
- package/dist/es/email-center/InboxNotifyConf/src/index.vue.js +0 -122
- package/dist/es/email-center/InboxNotifyConf/src/index2.css +0 -14
- package/dist/es/email-center/Log/index.js +0 -19
- package/dist/es/email-center/Log/src/config/columns.js +0 -115
- package/dist/es/email-center/Log/src/config/filters.js +0 -81
- package/dist/es/email-center/Log/src/index.css +0 -14
- package/dist/es/email-center/Log/src/index.vue.js +0 -161
- package/dist/es/email-center/Log/src/index2.css +0 -14
- package/dist/es/email-center/Template/index.js +0 -19
- package/dist/es/email-center/Template/src/components/MailTemplateSend.css +0 -14
- package/dist/es/email-center/Template/src/components/MailTemplateSend.vue.js +0 -256
- package/dist/es/email-center/Template/src/components/MailTemplateSend2.css +0 -14
- package/dist/es/email-center/Template/src/config/columns.js +0 -107
- package/dist/es/email-center/Template/src/config/filters.js +0 -82
- package/dist/es/email-center/Template/src/config/schema.js +0 -179
- package/dist/es/email-center/Template/src/constant/index.js +0 -274
- package/dist/es/email-center/Template/src/index.css +0 -14
- package/dist/es/email-center/Template/src/index.vue.js +0 -255
- package/dist/es/email-center/Template/src/index2.css +0 -14
- package/dist/es/email-center/api/accountConf.js +0 -21
- package/dist/es/email-center/api/cmGroup.js +0 -21
- package/dist/es/email-center/api/common.js +0 -42
- package/dist/es/email-center/api/inboxNotifyConf.js +0 -21
- package/dist/es/email-center/api/log.js +0 -23
- package/dist/es/email-center/api/template.js +0 -27
- package/dist/es/email-center/components/form.css +0 -14
- package/dist/es/email-center/components/form.vue.js +0 -116
- package/dist/es/email-center/components/form2.css +0 -14
- package/dist/es/email-center/components/grid.css +0 -14
- package/dist/es/email-center/components/grid.vue.js +0 -308
- package/dist/es/email-center/components/grid2.css +0 -14
- package/dist/es/file-flow/DownloadCenter/index.js +0 -19
- package/dist/es/file-flow/DownloadCenter/src/components/progress.css +0 -14
- package/dist/es/file-flow/DownloadCenter/src/components/progress.vue.js +0 -135
- package/dist/es/file-flow/DownloadCenter/src/components/progress2.css +0 -14
- package/dist/es/file-flow/DownloadCenter/src/config/columns.js +0 -80
- package/dist/es/file-flow/DownloadCenter/src/config/filters.js +0 -79
- package/dist/es/file-flow/DownloadCenter/src/config/logColumns.js +0 -48
- package/dist/es/file-flow/DownloadCenter/src/config/schema.js +0 -50
- package/dist/es/file-flow/DownloadCenter/src/index.css +0 -14
- package/dist/es/file-flow/DownloadCenter/src/index.vue.js +0 -219
- package/dist/es/file-flow/DownloadCenter/src/index2.css +0 -14
- package/dist/es/file-flow/DownloadCenter/src/index3.css +0 -14
- package/dist/es/file-flow/UploadButton/index.js +0 -19
- package/dist/es/file-flow/UploadButton/src/component/upload.css +0 -14
- package/dist/es/file-flow/UploadButton/src/component/upload.vue.js +0 -139
- package/dist/es/file-flow/UploadButton/src/composables/useUploadFile.js +0 -57
- package/dist/es/file-flow/UploadButton/src/index.css +0 -14
- package/dist/es/file-flow/UploadButton/src/index.vue.js +0 -63
- package/dist/es/file-flow/UploadCenter/index.js +0 -19
- package/dist/es/file-flow/UploadCenter/src/config/columns.js +0 -75
- package/dist/es/file-flow/UploadCenter/src/config/filters.js +0 -103
- package/dist/es/file-flow/UploadCenter/src/config/logColumns.js +0 -47
- package/dist/es/file-flow/UploadCenter/src/config/schema.js +0 -50
- package/dist/es/file-flow/UploadCenter/src/config/statusColumns.js +0 -45
- package/dist/es/file-flow/UploadCenter/src/index.css +0 -14
- package/dist/es/file-flow/UploadCenter/src/index.vue.js +0 -244
- package/dist/es/file-flow/UploadCenter/src/index2.css +0 -14
- package/dist/es/file-flow/api/downloadCenter.js +0 -64
- package/dist/es/file-flow/api/uploadButton.js +0 -24
- package/dist/es/file-flow/api/uploadCenter.js +0 -62
- package/dist/es/file-flow/components/InterruptModal.css +0 -14
- package/dist/es/file-flow/components/InterruptModal.vue.js +0 -83
- package/dist/es/hooks/useLocale.js +0 -40
- package/dist/es/index.js +0 -49
- package/dist/es/locale/index.js +0 -44
- package/dist/es/locale/lang/en-US.js +0 -205
- package/dist/es/locale/lang/ja-JP.js +0 -206
- package/dist/es/locale/lang/zh-CN.js +0 -203
- package/dist/es/node_modules/@vueuse/core/dist/index.js +0 -230
- package/dist/es/node_modules/@vueuse/shared/dist/index.js +0 -165
- package/dist/es/node_modules/lodash-es/_Hash.js +0 -33
- package/dist/es/node_modules/lodash-es/_ListCache.js +0 -33
- package/dist/es/node_modules/lodash-es/_Map.js +0 -19
- package/dist/es/node_modules/lodash-es/_MapCache.js +0 -33
- package/dist/es/node_modules/lodash-es/_Symbol.js +0 -18
- package/dist/es/node_modules/lodash-es/_apply.js +0 -29
- package/dist/es/node_modules/lodash-es/_arrayMap.js +0 -21
- package/dist/es/node_modules/lodash-es/_arrayPush.js +0 -21
- package/dist/es/node_modules/lodash-es/_assignValue.js +0 -23
- package/dist/es/node_modules/lodash-es/_assocIndexOf.js +0 -23
- package/dist/es/node_modules/lodash-es/_baseAssignValue.js +0 -25
- package/dist/es/node_modules/lodash-es/_baseFlatten.js +0 -26
- package/dist/es/node_modules/lodash-es/_baseGet.js +0 -24
- package/dist/es/node_modules/lodash-es/_baseGetTag.js +0 -23
- package/dist/es/node_modules/lodash-es/_baseHasIn.js +0 -19
- package/dist/es/node_modules/lodash-es/_baseIsArguments.js +0 -22
- package/dist/es/node_modules/lodash-es/_baseIsNative.js +0 -29
- package/dist/es/node_modules/lodash-es/_basePick.js +0 -23
- package/dist/es/node_modules/lodash-es/_basePickBy.js +0 -26
- package/dist/es/node_modules/lodash-es/_baseSet.js +0 -37
- package/dist/es/node_modules/lodash-es/_baseSetToString.js +0 -27
- package/dist/es/node_modules/lodash-es/_baseToString.js +0 -31
- package/dist/es/node_modules/lodash-es/_castPath.js +0 -23
- package/dist/es/node_modules/lodash-es/_coreJsData.js +0 -18
- package/dist/es/node_modules/lodash-es/_defineProperty.js +0 -24
- package/dist/es/node_modules/lodash-es/_flatRest.js +0 -22
- package/dist/es/node_modules/lodash-es/_freeGlobal.js +0 -17
- package/dist/es/node_modules/lodash-es/_getMapData.js +0 -21
- package/dist/es/node_modules/lodash-es/_getNative.js +0 -22
- package/dist/es/node_modules/lodash-es/_getRawTag.js +0 -28
- package/dist/es/node_modules/lodash-es/_getValue.js +0 -19
- package/dist/es/node_modules/lodash-es/_hasPath.js +0 -32
- package/dist/es/node_modules/lodash-es/_hashClear.js +0 -20
- package/dist/es/node_modules/lodash-es/_hashDelete.js +0 -20
- package/dist/es/node_modules/lodash-es/_hashGet.js +0 -26
- package/dist/es/node_modules/lodash-es/_hashHas.js +0 -22
- package/dist/es/node_modules/lodash-es/_hashSet.js +0 -22
- package/dist/es/node_modules/lodash-es/_isFlattenable.js +0 -23
- package/dist/es/node_modules/lodash-es/_isIndex.js +0 -21
- package/dist/es/node_modules/lodash-es/_isKey.js +0 -25
- package/dist/es/node_modules/lodash-es/_isKeyable.js +0 -20
- package/dist/es/node_modules/lodash-es/_isMasked.js +0 -24
- package/dist/es/node_modules/lodash-es/_listCacheClear.js +0 -19
- package/dist/es/node_modules/lodash-es/_listCacheDelete.js +0 -25
- package/dist/es/node_modules/lodash-es/_listCacheGet.js +0 -21
- package/dist/es/node_modules/lodash-es/_listCacheHas.js +0 -20
- package/dist/es/node_modules/lodash-es/_listCacheSet.js +0 -21
- package/dist/es/node_modules/lodash-es/_mapCacheClear.js +0 -26
- package/dist/es/node_modules/lodash-es/_mapCacheDelete.js +0 -21
- package/dist/es/node_modules/lodash-es/_mapCacheGet.js +0 -20
- package/dist/es/node_modules/lodash-es/_mapCacheHas.js +0 -20
- package/dist/es/node_modules/lodash-es/_mapCacheSet.js +0 -21
- package/dist/es/node_modules/lodash-es/_memoizeCapped.js +0 -24
- package/dist/es/node_modules/lodash-es/_nativeCreate.js +0 -18
- package/dist/es/node_modules/lodash-es/_objectToString.js +0 -20
- package/dist/es/node_modules/lodash-es/_overRest.js +0 -28
- package/dist/es/node_modules/lodash-es/_root.js +0 -18
- package/dist/es/node_modules/lodash-es/_setToString.js +0 -19
- package/dist/es/node_modules/lodash-es/_shortOut.js +0 -29
- package/dist/es/node_modules/lodash-es/_stringToPath.js +0 -23
- package/dist/es/node_modules/lodash-es/_toKey.js +0 -23
- package/dist/es/node_modules/lodash-es/_toSource.js +0 -30
- package/dist/es/node_modules/lodash-es/constant.js +0 -21
- package/dist/es/node_modules/lodash-es/eq.js +0 -19
- package/dist/es/node_modules/lodash-es/flatten.js +0 -21
- package/dist/es/node_modules/lodash-es/get.js +0 -21
- package/dist/es/node_modules/lodash-es/hasIn.js +0 -21
- package/dist/es/node_modules/lodash-es/identity.js +0 -19
- package/dist/es/node_modules/lodash-es/isArguments.js +0 -23
- package/dist/es/node_modules/lodash-es/isArray.js +0 -17
- package/dist/es/node_modules/lodash-es/isFunction.js +0 -25
- package/dist/es/node_modules/lodash-es/isLength.js +0 -20
- package/dist/es/node_modules/lodash-es/isObject.js +0 -20
- package/dist/es/node_modules/lodash-es/isObjectLike.js +0 -19
- package/dist/es/node_modules/lodash-es/isSymbol.js +0 -22
- package/dist/es/node_modules/lodash-es/memoize.js +0 -31
- package/dist/es/node_modules/lodash-es/pick.js +0 -21
- package/dist/es/node_modules/lodash-es/toString.js +0 -20
- package/dist/es/node_modules/path-to-regexp/dist/index.js +0 -275
- package/dist/es/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js +0 -300
- package/dist/es/node_modules/sortablejs/modular/sortable.esm.js +0 -1283
- package/dist/es/node_modules/title-case/dist/index.js +0 -20
- package/dist/es/packages/components/dist/es/Button/index.js +0 -19
- package/dist/es/packages/components/dist/es/Button/src/Button.css +0 -14
- package/dist/es/packages/components/dist/es/Button/src/Button.vue.js +0 -54
- package/dist/es/packages/components/dist/es/Button/src/Button2.css +0 -14
- package/dist/es/packages/components/dist/es/ConfigProvider/index.js +0 -19
- package/dist/es/packages/components/dist/es/ConfigProvider/src/configProvider.js +0 -27
- package/dist/es/packages/components/dist/es/ConfigProvider/src/configProviderProps.js +0 -35
- package/dist/es/packages/components/dist/es/ConfigProvider/src/constants.js +0 -22
- package/dist/es/packages/components/dist/es/ConfigProvider/src/useGlobalConfig.js +0 -47
- package/dist/es/packages/components/dist/es/Form/index.js +0 -19
- package/dist/es/packages/components/dist/es/Form/src/Form.css +0 -14
- package/dist/es/packages/components/dist/es/Form/src/Form.vue.js +0 -386
- package/dist/es/packages/components/dist/es/Form/src/Form2.css +0 -14
- package/dist/es/packages/components/dist/es/Form/src/styles/form.css +0 -14
- package/dist/es/packages/components/dist/es/Overlay/src/Modal.css +0 -14
- package/dist/es/packages/components/dist/es/Overlay/src/Modal.vue.js +0 -80
- package/dist/es/packages/components/dist/es/Overlay/src/Modal2.css +0 -14
- package/dist/es/packages/components/dist/es/RichTextEditor/index.js +0 -19
- package/dist/es/packages/components/dist/es/RichTextEditor/src/ToolbarPanel.css +0 -14
- package/dist/es/packages/components/dist/es/RichTextEditor/src/ToolbarPanel.vue.js +0 -182
- package/dist/es/packages/components/dist/es/RichTextEditor/src/ToolbarPanel2.css +0 -14
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/BlockquoteButton.css +0 -14
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/BlockquoteButton.vue.js +0 -50
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/CodeBlockButton.css +0 -14
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/CodeBlockButton.vue.js +0 -50
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/ColorHighlightPopover.css +0 -14
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/ColorHighlightPopover.vue.js +0 -53
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/FontSizeDropdownMenu.css +0 -14
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/FontSizeDropdownMenu.vue.js +0 -68
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/HeadingDropdownMenu.css +0 -14
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/HeadingDropdownMenu.vue.js +0 -79
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/ImageUploadButton.css +0 -14
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/ImageUploadButton.vue.js +0 -90
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/LinkPopover.css +0 -14
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/LinkPopover.vue.js +0 -102
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/LinkPopover2.css +0 -14
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/ListDropdownMenu.css +0 -14
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/ListDropdownMenu.vue.js +0 -86
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/MarkButton.css +0 -14
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/MarkButton.vue.js +0 -99
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/TableButton.css +0 -14
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/TableButton.vue.js +0 -175
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/TextAlignDropdownMenu.css +0 -14
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/TextAlignDropdownMenu.vue.js +0 -95
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/TextColorPopover.css +0 -14
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/TextColorPopover.vue.js +0 -53
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/ToolbarGroup.css +0 -14
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/ToolbarGroup.vue.js +0 -29
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/ToolbarSeparator.css +0 -14
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/ToolbarSeparator.vue.js +0 -27
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/UndoRedoButton.css +0 -14
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/UndoRedoButton.vue.js +0 -64
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/VideoUploadButton.css +0 -14
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/VideoUploadButton.vue.js +0 -90
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/basic/ColorPicker.css +0 -14
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/basic/ColorPicker.vue.js +0 -111
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/basic/MediaUploadModal.css +0 -14
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/basic/MediaUploadModal.vue.js +0 -390
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/basic/MediaUploadModal2.css +0 -14
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/basic/SelectMenu.css +0 -14
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/basic/SelectMenu.vue.js +0 -147
- package/dist/es/packages/components/dist/es/RichTextEditor/src/components/basic/SelectMenu2.css +0 -14
- package/dist/es/packages/components/dist/es/RichTextEditor/src/constant/index.js +0 -63
- package/dist/es/packages/components/dist/es/RichTextEditor/src/extensions/styledTable.js +0 -112
- package/dist/es/packages/components/dist/es/RichTextEditor/src/extensions/video.js +0 -78
- package/dist/es/packages/components/dist/es/RichTextEditor/src/index.css +0 -14
- package/dist/es/packages/components/dist/es/RichTextEditor/src/index.vue.js +0 -176
- package/dist/es/packages/components/dist/es/RichTextEditor/src/index2.css +0 -14
- package/dist/es/packages/components/dist/es/RichTextEditor/src/props.js +0 -50
- package/dist/es/packages/components/dist/es/_virtual/_plugin-vue_export-helper.js +0 -22
- package/dist/es/packages/components/dist/es/hooks/useLocale.js +0 -38
- package/dist/es/packages/components/dist/es/hooks/useNamespace.js +0 -21
- package/dist/es/packages/components/dist/es/locale/lang/en-US.js +0 -134
- package/dist/es/packages/components/dist/es/locale/lang/ja-JP.js +0 -134
- package/dist/es/packages/components/dist/es/locale/lang/zh-CN.js +0 -134
- package/dist/es/packages/components/dist/es/node_modules/@tanstack/devtools-event-client/dist/esm/plugin.js +0 -191
- package/dist/es/packages/components/dist/es/node_modules/@tanstack/form-core/dist/esm/EventClient.js +0 -26
- package/dist/es/packages/components/dist/es/node_modules/@tanstack/form-core/dist/esm/FieldApi.js +0 -419
- package/dist/es/packages/components/dist/es/node_modules/@tanstack/form-core/dist/esm/FormApi.js +0 -799
- package/dist/es/packages/components/dist/es/node_modules/@tanstack/form-core/dist/esm/ValidationLogic.js +0 -68
- package/dist/es/packages/components/dist/es/node_modules/@tanstack/form-core/dist/esm/metaHelper.js +0 -122
- package/dist/es/packages/components/dist/es/node_modules/@tanstack/form-core/dist/esm/standardSchemaValidator.js +0 -58
- package/dist/es/packages/components/dist/es/node_modules/@tanstack/form-core/dist/esm/utils.js +0 -226
- package/dist/es/packages/components/dist/es/node_modules/@tanstack/pacer-lite/dist/lite-throttler.js +0 -42
- package/dist/es/packages/components/dist/es/node_modules/@tanstack/store/dist/esm/alien.js +0 -221
- package/dist/es/packages/components/dist/es/node_modules/@tanstack/store/dist/esm/atom.js +0 -136
- package/dist/es/packages/components/dist/es/node_modules/@tanstack/store/dist/esm/batch.js +0 -25
- package/dist/es/packages/components/dist/es/node_modules/@tanstack/store/dist/esm/store.js +0 -57
- package/dist/es/packages/components/dist/es/node_modules/@tanstack/vue-form/dist/esm/useField.js +0 -51
- package/dist/es/packages/components/dist/es/node_modules/@tanstack/vue-form/dist/esm/useForm.js +0 -46
- package/dist/es/packages/components/dist/es/node_modules/@tanstack/vue-store/dist/esm/index.js +0 -61
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/core/dist/index.js +0 -3995
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js +0 -30
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/extension-blockquote/dist/index.js +0 -75
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/extension-bold/dist/index.js +0 -98
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/extension-character-count/dist/index.js +0 -19
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/extension-code/dist/index.js +0 -67
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/extension-code-block/dist/index.js +0 -227
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/extension-document/dist/index.js +0 -25
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/extension-hard-break/dist/index.js +0 -72
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/extension-heading/dist/index.js +0 -76
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/extension-horizontal-rule/dist/index.js +0 -69
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/extension-image/dist/index.js +0 -143
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/extension-italic/dist/index.js +0 -96
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/extension-link/dist/index.js +0 -326
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/extension-list/dist/index.js +0 -743
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/extension-paragraph/dist/index.js +0 -62
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/extension-strike/dist/index.js +0 -79
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/extension-subscript/dist/index.js +0 -54
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/extension-superscript/dist/index.js +0 -54
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/extension-table/dist/index.js +0 -392
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/extension-task-item/dist/index.js +0 -19
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/extension-task-list/dist/index.js +0 -19
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/extension-text/dist/index.js +0 -26
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/extension-text-align/dist/index.js +0 -60
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/extension-text-style/dist/index.js +0 -253
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/extension-underline/dist/index.js +0 -78
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/extensions/dist/index.js +0 -311
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/html/dist/index.js +0 -28
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/starter-kit/dist/index.js +0 -42
- package/dist/es/packages/components/dist/es/node_modules/@tiptap/vue-3/dist/index.js +0 -270
- package/dist/es/packages/components/dist/es/node_modules/linkifyjs/dist/linkify.js +0 -720
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_DataView.js +0 -19
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_Hash.js +0 -33
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_ListCache.js +0 -33
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_Map.js +0 -19
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_MapCache.js +0 -33
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_Promise.js +0 -19
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_Set.js +0 -19
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_SetCache.js +0 -26
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_Stack.js +0 -31
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_Symbol.js +0 -18
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_Uint8Array.js +0 -18
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_WeakMap.js +0 -19
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_apply.js +0 -29
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_arrayFilter.js +0 -23
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_arrayIncludes.js +0 -21
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_arrayIncludesWith.js +0 -22
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_arrayLikeKeys.js +0 -33
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_arrayMap.js +0 -21
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_arrayPush.js +0 -21
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_arraySome.js +0 -22
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_assignMergeValue.js +0 -21
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_assignValue.js +0 -23
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_assocIndexOf.js +0 -23
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_baseAssignValue.js +0 -25
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_baseCreate.js +0 -30
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_baseFindIndex.js +0 -22
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_baseFlatten.js +0 -26
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_baseFor.js +0 -18
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_baseGet.js +0 -24
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_baseGetAllKeys.js +0 -22
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_baseGetTag.js +0 -23
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_baseIndexOf.js +0 -22
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_baseIntersection.js +0 -42
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_baseIsArguments.js +0 -22
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_baseIsEqual.js +0 -21
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_baseIsEqualDeep.js +0 -45
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_baseIsNaN.js +0 -19
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_baseIsNative.js +0 -29
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_baseIsTypedArray.js +0 -25
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_baseKeys.js +0 -27
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_baseKeysIn.js +0 -28
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_baseMerge.js +0 -33
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_baseMergeDeep.js +0 -44
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_baseRest.js +0 -22
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_baseSetToString.js +0 -27
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_baseTimes.js +0 -21
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_baseToString.js +0 -31
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_baseUnary.js +0 -21
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_baseUniq.js +0 -46
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_cacheHas.js +0 -19
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_castArrayLikeObject.js +0 -20
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_castPath.js +0 -23
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_cloneArrayBuffer.js +0 -21
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_cloneBuffer.js +0 -22
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_cloneTypedArray.js +0 -21
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_copyArray.js +0 -22
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_copyObject.js +0 -27
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_coreJsData.js +0 -18
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_createAssigner.js +0 -28
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_createBaseFor.js +0 -26
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_createSet.js +0 -22
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_defineProperty.js +0 -24
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_equalArrays.js +0 -53
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_equalByTag.js +0 -58
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_equalObjects.js +0 -49
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_freeGlobal.js +0 -17
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_getAllKeys.js +0 -22
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_getMapData.js +0 -21
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_getNative.js +0 -22
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_getPrototype.js +0 -18
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_getRawTag.js +0 -28
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_getSymbols.js +0 -23
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_getTag.js +0 -41
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_getValue.js +0 -19
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_hashClear.js +0 -20
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_hashDelete.js +0 -20
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_hashGet.js +0 -26
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_hashHas.js +0 -22
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_hashSet.js +0 -22
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_initCloneObject.js +0 -22
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_isFlattenable.js +0 -23
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_isIndex.js +0 -21
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_isIterateeCall.js +0 -26
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_isKey.js +0 -25
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_isKeyable.js +0 -20
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_isMasked.js +0 -24
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_isPrototype.js +0 -21
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_listCacheClear.js +0 -19
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_listCacheDelete.js +0 -25
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_listCacheGet.js +0 -21
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_listCacheHas.js +0 -20
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_listCacheSet.js +0 -21
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_mapCacheClear.js +0 -26
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_mapCacheDelete.js +0 -21
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_mapCacheGet.js +0 -20
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_mapCacheHas.js +0 -20
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_mapCacheSet.js +0 -21
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_mapToArray.js +0 -22
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_memoizeCapped.js +0 -24
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_nativeCreate.js +0 -18
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_nativeKeys.js +0 -18
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_nativeKeysIn.js +0 -23
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_nodeUtil.js +0 -24
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_objectToString.js +0 -20
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_overArg.js +0 -21
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_overRest.js +0 -28
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_root.js +0 -18
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_safeGet.js +0 -20
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_setCacheAdd.js +0 -20
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_setCacheHas.js +0 -19
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_setToArray.js +0 -22
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_setToString.js +0 -19
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_shortOut.js +0 -29
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_stackClear.js +0 -20
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_stackDelete.js +0 -20
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_stackGet.js +0 -19
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_stackHas.js +0 -19
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_stackSet.js +0 -30
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_strictIndexOf.js +0 -22
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_stringToPath.js +0 -23
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_toKey.js +0 -23
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/_toSource.js +0 -30
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/constant.js +0 -21
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/eq.js +0 -19
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/get.js +0 -21
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/identity.js +0 -19
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/intersectionWith.js +0 -25
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/isArguments.js +0 -23
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/isArray.js +0 -17
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/isArrayLike.js +0 -21
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/isArrayLikeObject.js +0 -21
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/isBuffer.js +0 -19
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/isEqual.js +0 -20
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/isFunction.js +0 -25
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/isLength.js +0 -20
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/isObject.js +0 -20
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/isObjectLike.js +0 -19
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/isPlainObject.js +0 -29
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/isSymbol.js +0 -22
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/isTypedArray.js +0 -20
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/keys.js +0 -22
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/keysIn.js +0 -22
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/last.js +0 -20
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/memoize.js +0 -31
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/mergeWith.js +0 -21
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/noop.js +0 -18
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/stubArray.js +0 -19
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/stubFalse.js +0 -19
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/toPlainObject.js +0 -21
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/toString.js +0 -20
- package/dist/es/packages/components/dist/es/node_modules/lodash-es/unionWith.js +0 -25
- package/dist/es/packages/components/dist/es/node_modules/orderedmap/dist/index.js +0 -116
- package/dist/es/packages/components/dist/es/node_modules/prosemirror-commands/dist/index.js +0 -401
- package/dist/es/packages/components/dist/es/node_modules/prosemirror-dropcursor/dist/index.js +0 -99
- package/dist/es/packages/components/dist/es/node_modules/prosemirror-gapcursor/dist/index.js +0 -217
- package/dist/es/packages/components/dist/es/node_modules/prosemirror-history/dist/index.js +0 -261
- package/dist/es/packages/components/dist/es/node_modules/prosemirror-keymap/dist/index.js +0 -75
- package/dist/es/packages/components/dist/es/node_modules/prosemirror-model/dist/index.js +0 -2746
- package/dist/es/packages/components/dist/es/node_modules/prosemirror-schema-list/dist/index.js +0 -101
- package/dist/es/packages/components/dist/es/node_modules/prosemirror-state/dist/index.js +0 -835
- package/dist/es/packages/components/dist/es/node_modules/prosemirror-tables/dist/index.js +0 -1459
- package/dist/es/packages/components/dist/es/node_modules/prosemirror-transform/dist/index.js +0 -1549
- package/dist/es/packages/components/dist/es/node_modules/prosemirror-view/dist/index.js +0 -3811
- package/dist/es/packages/components/dist/es/node_modules/rope-sequence/dist/index.js +0 -113
- package/dist/es/packages/components/dist/es/node_modules/w3c-keyname/index.js +0 -106
- package/dist/es/packages/components/dist/es/packages/utils/dist/index.js +0 -556
- package/dist/es/packages/components/dist/es/styles/tokens.css +0 -14
- package/dist/es/packages/hooks/dist/index.js +0 -114
- package/dist/es/packages/shared-service/index.js +0 -59
- package/dist/es/packages/utils/dist/index.js +0 -532
- package/dist/es/utils/request.js +0 -98
- package/dist/es/utils/util.js +0 -53
- package/dist/lib/_virtual/_plugin-vue_export-helper.js +0 -14
- package/dist/lib/_virtual/index.js +0 -14
- package/dist/lib/_virtual/index2.js +0 -14
- package/dist/lib/configs/auth-config/dist/index.js +0 -14
- package/dist/lib/email-center/AccountConf/index.js +0 -14
- package/dist/lib/email-center/AccountConf/src/config/columns.js +0 -14
- package/dist/lib/email-center/AccountConf/src/config/filters.js +0 -14
- package/dist/lib/email-center/AccountConf/src/config/schema.js +0 -14
- package/dist/lib/email-center/AccountConf/src/constant/index.js +0 -14
- package/dist/lib/email-center/AccountConf/src/index.css +0 -14
- package/dist/lib/email-center/AccountConf/src/index.vue.js +0 -14
- package/dist/lib/email-center/AccountConf/src/index2.css +0 -14
- package/dist/lib/email-center/CmGroup/index.js +0 -14
- package/dist/lib/email-center/CmGroup/src/config/columns.js +0 -14
- package/dist/lib/email-center/CmGroup/src/config/filters.js +0 -14
- package/dist/lib/email-center/CmGroup/src/config/schema.js +0 -14
- package/dist/lib/email-center/CmGroup/src/constant/index.js +0 -14
- package/dist/lib/email-center/CmGroup/src/index.css +0 -14
- package/dist/lib/email-center/CmGroup/src/index.vue.js +0 -14
- package/dist/lib/email-center/CmGroup/src/index2.css +0 -14
- package/dist/lib/email-center/InboxNotifyConf/index.js +0 -14
- package/dist/lib/email-center/InboxNotifyConf/src/config/columns.js +0 -14
- package/dist/lib/email-center/InboxNotifyConf/src/config/filters.js +0 -14
- package/dist/lib/email-center/InboxNotifyConf/src/config/schema.js +0 -14
- package/dist/lib/email-center/InboxNotifyConf/src/constant/index.js +0 -14
- package/dist/lib/email-center/InboxNotifyConf/src/index.css +0 -14
- package/dist/lib/email-center/InboxNotifyConf/src/index.vue.js +0 -14
- package/dist/lib/email-center/InboxNotifyConf/src/index2.css +0 -14
- package/dist/lib/email-center/Log/index.js +0 -14
- package/dist/lib/email-center/Log/src/config/columns.js +0 -14
- package/dist/lib/email-center/Log/src/config/filters.js +0 -14
- package/dist/lib/email-center/Log/src/index.css +0 -14
- package/dist/lib/email-center/Log/src/index.vue.js +0 -14
- package/dist/lib/email-center/Log/src/index2.css +0 -14
- package/dist/lib/email-center/Template/index.js +0 -14
- package/dist/lib/email-center/Template/src/components/MailTemplateSend.css +0 -14
- package/dist/lib/email-center/Template/src/components/MailTemplateSend.vue.js +0 -14
- package/dist/lib/email-center/Template/src/components/MailTemplateSend2.css +0 -14
- package/dist/lib/email-center/Template/src/config/columns.js +0 -14
- package/dist/lib/email-center/Template/src/config/filters.js +0 -14
- package/dist/lib/email-center/Template/src/config/schema.js +0 -14
- package/dist/lib/email-center/Template/src/constant/index.js +0 -14
- package/dist/lib/email-center/Template/src/index.css +0 -14
- package/dist/lib/email-center/Template/src/index.vue.js +0 -14
- package/dist/lib/email-center/Template/src/index2.css +0 -14
- package/dist/lib/email-center/api/accountConf.js +0 -14
- package/dist/lib/email-center/api/cmGroup.js +0 -14
- package/dist/lib/email-center/api/common.js +0 -14
- package/dist/lib/email-center/api/inboxNotifyConf.js +0 -14
- package/dist/lib/email-center/api/log.js +0 -14
- package/dist/lib/email-center/api/template.js +0 -14
- package/dist/lib/email-center/components/form.css +0 -14
- package/dist/lib/email-center/components/form.vue.js +0 -14
- package/dist/lib/email-center/components/form2.css +0 -14
- package/dist/lib/email-center/components/grid.css +0 -14
- package/dist/lib/email-center/components/grid.vue.js +0 -14
- package/dist/lib/email-center/components/grid2.css +0 -14
- package/dist/lib/file-flow/DownloadCenter/index.js +0 -14
- package/dist/lib/file-flow/DownloadCenter/src/components/progress.css +0 -14
- package/dist/lib/file-flow/DownloadCenter/src/components/progress.vue.js +0 -14
- package/dist/lib/file-flow/DownloadCenter/src/components/progress2.css +0 -14
- package/dist/lib/file-flow/DownloadCenter/src/config/columns.js +0 -14
- package/dist/lib/file-flow/DownloadCenter/src/config/filters.js +0 -14
- package/dist/lib/file-flow/DownloadCenter/src/config/logColumns.js +0 -14
- package/dist/lib/file-flow/DownloadCenter/src/config/schema.js +0 -14
- package/dist/lib/file-flow/DownloadCenter/src/index.css +0 -14
- package/dist/lib/file-flow/DownloadCenter/src/index.vue.js +0 -14
- package/dist/lib/file-flow/DownloadCenter/src/index2.css +0 -14
- package/dist/lib/file-flow/DownloadCenter/src/index3.css +0 -14
- package/dist/lib/file-flow/UploadButton/index.js +0 -14
- package/dist/lib/file-flow/UploadButton/src/component/upload.css +0 -14
- package/dist/lib/file-flow/UploadButton/src/component/upload.vue.js +0 -14
- package/dist/lib/file-flow/UploadButton/src/composables/useUploadFile.js +0 -14
- package/dist/lib/file-flow/UploadButton/src/index.css +0 -14
- package/dist/lib/file-flow/UploadButton/src/index.vue.js +0 -14
- package/dist/lib/file-flow/UploadCenter/index.js +0 -14
- package/dist/lib/file-flow/UploadCenter/src/config/columns.js +0 -14
- package/dist/lib/file-flow/UploadCenter/src/config/filters.js +0 -14
- package/dist/lib/file-flow/UploadCenter/src/config/logColumns.js +0 -14
- package/dist/lib/file-flow/UploadCenter/src/config/schema.js +0 -14
- package/dist/lib/file-flow/UploadCenter/src/config/statusColumns.js +0 -14
- package/dist/lib/file-flow/UploadCenter/src/index.css +0 -14
- package/dist/lib/file-flow/UploadCenter/src/index.vue.js +0 -14
- package/dist/lib/file-flow/UploadCenter/src/index2.css +0 -14
- package/dist/lib/file-flow/api/downloadCenter.js +0 -14
- package/dist/lib/file-flow/api/uploadButton.js +0 -14
- package/dist/lib/file-flow/api/uploadCenter.js +0 -14
- package/dist/lib/file-flow/components/InterruptModal.css +0 -14
- package/dist/lib/file-flow/components/InterruptModal.vue.js +0 -14
- package/dist/lib/hooks/useLocale.js +0 -14
- package/dist/lib/index.js +0 -14
- package/dist/lib/locale/index.js +0 -14
- package/dist/lib/locale/lang/en-US.js +0 -14
- package/dist/lib/locale/lang/ja-JP.js +0 -14
- package/dist/lib/locale/lang/zh-CN.js +0 -14
- package/dist/lib/node_modules/@vueuse/core/dist/index.js +0 -14
- package/dist/lib/node_modules/@vueuse/shared/dist/index.js +0 -14
- package/dist/lib/node_modules/lodash-es/_Hash.js +0 -14
- package/dist/lib/node_modules/lodash-es/_ListCache.js +0 -14
- package/dist/lib/node_modules/lodash-es/_Map.js +0 -14
- package/dist/lib/node_modules/lodash-es/_MapCache.js +0 -14
- package/dist/lib/node_modules/lodash-es/_Symbol.js +0 -14
- package/dist/lib/node_modules/lodash-es/_apply.js +0 -14
- package/dist/lib/node_modules/lodash-es/_arrayMap.js +0 -14
- package/dist/lib/node_modules/lodash-es/_arrayPush.js +0 -14
- package/dist/lib/node_modules/lodash-es/_assignValue.js +0 -14
- package/dist/lib/node_modules/lodash-es/_assocIndexOf.js +0 -14
- package/dist/lib/node_modules/lodash-es/_baseAssignValue.js +0 -14
- package/dist/lib/node_modules/lodash-es/_baseFlatten.js +0 -14
- package/dist/lib/node_modules/lodash-es/_baseGet.js +0 -14
- package/dist/lib/node_modules/lodash-es/_baseGetTag.js +0 -14
- package/dist/lib/node_modules/lodash-es/_baseHasIn.js +0 -14
- package/dist/lib/node_modules/lodash-es/_baseIsArguments.js +0 -14
- package/dist/lib/node_modules/lodash-es/_baseIsNative.js +0 -14
- package/dist/lib/node_modules/lodash-es/_basePick.js +0 -14
- package/dist/lib/node_modules/lodash-es/_basePickBy.js +0 -14
- package/dist/lib/node_modules/lodash-es/_baseSet.js +0 -14
- package/dist/lib/node_modules/lodash-es/_baseSetToString.js +0 -14
- package/dist/lib/node_modules/lodash-es/_baseToString.js +0 -14
- package/dist/lib/node_modules/lodash-es/_castPath.js +0 -14
- package/dist/lib/node_modules/lodash-es/_coreJsData.js +0 -14
- package/dist/lib/node_modules/lodash-es/_defineProperty.js +0 -14
- package/dist/lib/node_modules/lodash-es/_flatRest.js +0 -14
- package/dist/lib/node_modules/lodash-es/_freeGlobal.js +0 -14
- package/dist/lib/node_modules/lodash-es/_getMapData.js +0 -14
- package/dist/lib/node_modules/lodash-es/_getNative.js +0 -14
- package/dist/lib/node_modules/lodash-es/_getRawTag.js +0 -14
- package/dist/lib/node_modules/lodash-es/_getValue.js +0 -14
- package/dist/lib/node_modules/lodash-es/_hasPath.js +0 -14
- package/dist/lib/node_modules/lodash-es/_hashClear.js +0 -14
- package/dist/lib/node_modules/lodash-es/_hashDelete.js +0 -14
- package/dist/lib/node_modules/lodash-es/_hashGet.js +0 -14
- package/dist/lib/node_modules/lodash-es/_hashHas.js +0 -14
- package/dist/lib/node_modules/lodash-es/_hashSet.js +0 -14
- package/dist/lib/node_modules/lodash-es/_isFlattenable.js +0 -14
- package/dist/lib/node_modules/lodash-es/_isIndex.js +0 -14
- package/dist/lib/node_modules/lodash-es/_isKey.js +0 -14
- package/dist/lib/node_modules/lodash-es/_isKeyable.js +0 -14
- package/dist/lib/node_modules/lodash-es/_isMasked.js +0 -14
- package/dist/lib/node_modules/lodash-es/_listCacheClear.js +0 -14
- package/dist/lib/node_modules/lodash-es/_listCacheDelete.js +0 -14
- package/dist/lib/node_modules/lodash-es/_listCacheGet.js +0 -14
- package/dist/lib/node_modules/lodash-es/_listCacheHas.js +0 -14
- package/dist/lib/node_modules/lodash-es/_listCacheSet.js +0 -14
- package/dist/lib/node_modules/lodash-es/_mapCacheClear.js +0 -14
- package/dist/lib/node_modules/lodash-es/_mapCacheDelete.js +0 -14
- package/dist/lib/node_modules/lodash-es/_mapCacheGet.js +0 -14
- package/dist/lib/node_modules/lodash-es/_mapCacheHas.js +0 -14
- package/dist/lib/node_modules/lodash-es/_mapCacheSet.js +0 -14
- package/dist/lib/node_modules/lodash-es/_memoizeCapped.js +0 -14
- package/dist/lib/node_modules/lodash-es/_nativeCreate.js +0 -14
- package/dist/lib/node_modules/lodash-es/_objectToString.js +0 -14
- package/dist/lib/node_modules/lodash-es/_overRest.js +0 -14
- package/dist/lib/node_modules/lodash-es/_root.js +0 -14
- package/dist/lib/node_modules/lodash-es/_setToString.js +0 -14
- package/dist/lib/node_modules/lodash-es/_shortOut.js +0 -14
- package/dist/lib/node_modules/lodash-es/_stringToPath.js +0 -14
- package/dist/lib/node_modules/lodash-es/_toKey.js +0 -14
- package/dist/lib/node_modules/lodash-es/_toSource.js +0 -14
- package/dist/lib/node_modules/lodash-es/constant.js +0 -14
- package/dist/lib/node_modules/lodash-es/eq.js +0 -14
- package/dist/lib/node_modules/lodash-es/flatten.js +0 -14
- package/dist/lib/node_modules/lodash-es/get.js +0 -14
- package/dist/lib/node_modules/lodash-es/hasIn.js +0 -14
- package/dist/lib/node_modules/lodash-es/identity.js +0 -14
- package/dist/lib/node_modules/lodash-es/isArguments.js +0 -14
- package/dist/lib/node_modules/lodash-es/isArray.js +0 -14
- package/dist/lib/node_modules/lodash-es/isFunction.js +0 -14
- package/dist/lib/node_modules/lodash-es/isLength.js +0 -14
- package/dist/lib/node_modules/lodash-es/isObject.js +0 -14
- package/dist/lib/node_modules/lodash-es/isObjectLike.js +0 -14
- package/dist/lib/node_modules/lodash-es/isSymbol.js +0 -14
- package/dist/lib/node_modules/lodash-es/memoize.js +0 -14
- package/dist/lib/node_modules/lodash-es/pick.js +0 -14
- package/dist/lib/node_modules/lodash-es/toString.js +0 -14
- package/dist/lib/node_modules/path-to-regexp/dist/index.js +0 -14
- package/dist/lib/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js +0 -14
- package/dist/lib/node_modules/sortablejs/modular/sortable.esm.js +0 -14
- package/dist/lib/node_modules/title-case/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/Button/index.js +0 -14
- package/dist/lib/packages/components/dist/es/Button/src/Button.css +0 -14
- package/dist/lib/packages/components/dist/es/Button/src/Button.vue.js +0 -14
- package/dist/lib/packages/components/dist/es/Button/src/Button2.css +0 -14
- package/dist/lib/packages/components/dist/es/ConfigProvider/index.js +0 -14
- package/dist/lib/packages/components/dist/es/ConfigProvider/src/configProvider.js +0 -14
- package/dist/lib/packages/components/dist/es/ConfigProvider/src/configProviderProps.js +0 -14
- package/dist/lib/packages/components/dist/es/ConfigProvider/src/constants.js +0 -14
- package/dist/lib/packages/components/dist/es/ConfigProvider/src/useGlobalConfig.js +0 -14
- package/dist/lib/packages/components/dist/es/Form/index.js +0 -14
- package/dist/lib/packages/components/dist/es/Form/src/Form.css +0 -14
- package/dist/lib/packages/components/dist/es/Form/src/Form.vue.js +0 -14
- package/dist/lib/packages/components/dist/es/Form/src/Form2.css +0 -14
- package/dist/lib/packages/components/dist/es/Form/src/styles/form.css +0 -14
- package/dist/lib/packages/components/dist/es/Overlay/src/Modal.css +0 -14
- package/dist/lib/packages/components/dist/es/Overlay/src/Modal.vue.js +0 -14
- package/dist/lib/packages/components/dist/es/Overlay/src/Modal2.css +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/index.js +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/ToolbarPanel.css +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/ToolbarPanel.vue.js +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/ToolbarPanel2.css +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/BlockquoteButton.css +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/BlockquoteButton.vue.js +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/CodeBlockButton.css +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/CodeBlockButton.vue.js +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/ColorHighlightPopover.css +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/ColorHighlightPopover.vue.js +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/FontSizeDropdownMenu.css +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/FontSizeDropdownMenu.vue.js +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/HeadingDropdownMenu.css +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/HeadingDropdownMenu.vue.js +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/ImageUploadButton.css +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/ImageUploadButton.vue.js +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/LinkPopover.css +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/LinkPopover.vue.js +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/LinkPopover2.css +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/ListDropdownMenu.css +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/ListDropdownMenu.vue.js +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/MarkButton.css +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/MarkButton.vue.js +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/TableButton.css +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/TableButton.vue.js +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/TextAlignDropdownMenu.css +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/TextAlignDropdownMenu.vue.js +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/TextColorPopover.css +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/TextColorPopover.vue.js +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/ToolbarGroup.css +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/ToolbarGroup.vue.js +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/ToolbarSeparator.css +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/ToolbarSeparator.vue.js +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/UndoRedoButton.css +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/UndoRedoButton.vue.js +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/VideoUploadButton.css +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/VideoUploadButton.vue.js +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/basic/ColorPicker.css +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/basic/ColorPicker.vue.js +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/basic/MediaUploadModal.css +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/basic/MediaUploadModal.vue.js +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/basic/MediaUploadModal2.css +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/basic/SelectMenu.css +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/basic/SelectMenu.vue.js +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/components/basic/SelectMenu2.css +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/constant/index.js +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/extensions/styledTable.js +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/extensions/video.js +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/index.css +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/index.vue.js +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/index2.css +0 -14
- package/dist/lib/packages/components/dist/es/RichTextEditor/src/props.js +0 -14
- package/dist/lib/packages/components/dist/es/_virtual/_plugin-vue_export-helper.js +0 -14
- package/dist/lib/packages/components/dist/es/hooks/useLocale.js +0 -14
- package/dist/lib/packages/components/dist/es/hooks/useNamespace.js +0 -14
- package/dist/lib/packages/components/dist/es/locale/lang/en-US.js +0 -14
- package/dist/lib/packages/components/dist/es/locale/lang/ja-JP.js +0 -14
- package/dist/lib/packages/components/dist/es/locale/lang/zh-CN.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tanstack/devtools-event-client/dist/esm/plugin.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tanstack/form-core/dist/esm/EventClient.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tanstack/form-core/dist/esm/FieldApi.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tanstack/form-core/dist/esm/FormApi.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tanstack/form-core/dist/esm/ValidationLogic.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tanstack/form-core/dist/esm/metaHelper.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tanstack/form-core/dist/esm/standardSchemaValidator.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tanstack/form-core/dist/esm/utils.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tanstack/pacer-lite/dist/lite-throttler.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tanstack/store/dist/esm/alien.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tanstack/store/dist/esm/atom.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tanstack/store/dist/esm/batch.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tanstack/store/dist/esm/store.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tanstack/vue-form/dist/esm/useField.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tanstack/vue-form/dist/esm/useForm.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tanstack/vue-store/dist/esm/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/core/dist/index.js +0 -106
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/extension-blockquote/dist/index.js +0 -18
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/extension-bold/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/extension-character-count/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/extension-code/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/extension-code-block/dist/index.js +0 -31
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/extension-document/dist/index.js +0 -16
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/extension-hard-break/dist/index.js +0 -16
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/extension-heading/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/extension-horizontal-rule/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/extension-image/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/extension-italic/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/extension-link/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/extension-list/dist/index.js +0 -25
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/extension-paragraph/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/extension-strike/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/extension-subscript/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/extension-superscript/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/extension-table/dist/index.js +0 -18
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/extension-task-item/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/extension-task-list/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/extension-text/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/extension-text-align/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/extension-text-style/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/extension-underline/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/extensions/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/html/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/starter-kit/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/@tiptap/vue-3/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/linkifyjs/dist/linkify.js +0 -18
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_DataView.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_Hash.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_ListCache.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_Map.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_MapCache.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_Promise.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_Set.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_SetCache.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_Stack.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_Symbol.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_Uint8Array.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_WeakMap.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_apply.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_arrayFilter.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_arrayIncludes.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_arrayIncludesWith.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_arrayLikeKeys.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_arrayMap.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_arrayPush.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_arraySome.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_assignMergeValue.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_assignValue.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_assocIndexOf.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_baseAssignValue.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_baseCreate.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_baseFindIndex.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_baseFlatten.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_baseFor.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_baseGet.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_baseGetAllKeys.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_baseGetTag.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_baseIndexOf.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_baseIntersection.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_baseIsArguments.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_baseIsEqual.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_baseIsEqualDeep.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_baseIsNaN.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_baseIsNative.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_baseIsTypedArray.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_baseKeys.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_baseKeysIn.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_baseMerge.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_baseMergeDeep.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_baseRest.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_baseSetToString.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_baseTimes.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_baseToString.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_baseUnary.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_baseUniq.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_cacheHas.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_castArrayLikeObject.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_castPath.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_cloneArrayBuffer.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_cloneBuffer.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_cloneTypedArray.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_copyArray.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_copyObject.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_coreJsData.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_createAssigner.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_createBaseFor.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_createSet.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_defineProperty.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_equalArrays.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_equalByTag.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_equalObjects.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_freeGlobal.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_getAllKeys.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_getMapData.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_getNative.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_getPrototype.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_getRawTag.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_getSymbols.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_getTag.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_getValue.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_hashClear.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_hashDelete.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_hashGet.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_hashHas.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_hashSet.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_initCloneObject.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_isFlattenable.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_isIndex.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_isIterateeCall.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_isKey.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_isKeyable.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_isMasked.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_isPrototype.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_listCacheClear.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_listCacheDelete.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_listCacheGet.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_listCacheHas.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_listCacheSet.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_mapCacheClear.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_mapCacheDelete.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_mapCacheGet.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_mapCacheHas.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_mapCacheSet.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_mapToArray.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_memoizeCapped.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_nativeCreate.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_nativeKeys.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_nativeKeysIn.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_nodeUtil.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_objectToString.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_overArg.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_overRest.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_root.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_safeGet.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_setCacheAdd.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_setCacheHas.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_setToArray.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_setToString.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_shortOut.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_stackClear.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_stackDelete.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_stackGet.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_stackHas.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_stackSet.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_strictIndexOf.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_stringToPath.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_toKey.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/_toSource.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/constant.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/eq.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/get.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/identity.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/intersectionWith.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/isArguments.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/isArray.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/isArrayLike.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/isArrayLikeObject.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/isBuffer.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/isEqual.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/isFunction.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/isLength.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/isObject.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/isObjectLike.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/isPlainObject.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/isSymbol.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/isTypedArray.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/keys.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/keysIn.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/last.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/memoize.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/mergeWith.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/noop.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/stubArray.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/stubFalse.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/toPlainObject.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/toString.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/lodash-es/unionWith.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/orderedmap/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/prosemirror-commands/dist/index.js +0 -15
- package/dist/lib/packages/components/dist/es/node_modules/prosemirror-dropcursor/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/prosemirror-gapcursor/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/prosemirror-history/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/prosemirror-keymap/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/prosemirror-model/dist/index.js +0 -17
- package/dist/lib/packages/components/dist/es/node_modules/prosemirror-schema-list/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/prosemirror-state/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/prosemirror-tables/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/prosemirror-transform/dist/index.js +0 -15
- package/dist/lib/packages/components/dist/es/node_modules/prosemirror-view/dist/index.js +0 -18
- package/dist/lib/packages/components/dist/es/node_modules/rope-sequence/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/node_modules/w3c-keyname/index.js +0 -14
- package/dist/lib/packages/components/dist/es/packages/utils/dist/index.js +0 -14
- package/dist/lib/packages/components/dist/es/styles/tokens.css +0 -14
- package/dist/lib/packages/hooks/dist/index.js +0 -14
- package/dist/lib/packages/shared-service/index.js +0 -14
- package/dist/lib/packages/utils/dist/index.js +0 -14
- package/dist/lib/utils/request.js +0 -14
- package/dist/lib/utils/util.js +0 -14
|
@@ -1,3811 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
Copyright (c) 2026 Lenovo SSG BASD. All rights reserved.
|
|
3
|
-
@license Proprietary
|
|
4
|
-
|
|
5
|
-
This software is the confidential and proprietary property of Lenovo SSG BASD.
|
|
6
|
-
You shall not disclose such Confidential Information and shall use it only in
|
|
7
|
-
accordance with the terms of the license agreement.
|
|
8
|
-
|
|
9
|
-
--- Build Info ---
|
|
10
|
-
Version: 1.0.4
|
|
11
|
-
Build Time: 2026/3/20 19:01:32
|
|
12
|
-
Build Commit: e870d54d366d1b5dce52602a729199a8d55c50a8
|
|
13
|
-
*/
|
|
14
|
-
import { NodeSelection as w, Selection as be, TextSelection as M, AllSelection as Do } from "../../prosemirror-state/dist/index.js";
|
|
15
|
-
import { Slice as se, DOMSerializer as Pe, Fragment as H, DOMParser as It, Mark as No } from "../../prosemirror-model/dist/index.js";
|
|
16
|
-
import { dropPoint as So } from "../../prosemirror-transform/dist/index.js";
|
|
17
|
-
const N = function(t) {
|
|
18
|
-
for (var e = 0; ; e++)
|
|
19
|
-
if (t = t.previousSibling, !t)
|
|
20
|
-
return e;
|
|
21
|
-
}, fe = function(t) {
|
|
22
|
-
let e = t.assignedSlot || t.parentNode;
|
|
23
|
-
return e && e.nodeType == 11 ? e.host : e;
|
|
24
|
-
};
|
|
25
|
-
let $e = null;
|
|
26
|
-
const q = function(t, e, o) {
|
|
27
|
-
let n = $e || ($e = document.createRange());
|
|
28
|
-
return n.setEnd(t, o ?? t.nodeValue.length), n.setStart(t, e || 0), n;
|
|
29
|
-
}, Oo = function() {
|
|
30
|
-
$e = null;
|
|
31
|
-
}, re = function(t, e, o, n) {
|
|
32
|
-
return o && (st(t, e, o, n, -1) || st(t, e, o, n, 1));
|
|
33
|
-
}, Co = /^(img|br|input|textarea|hr)$/i;
|
|
34
|
-
function st(t, e, o, n, i) {
|
|
35
|
-
for (var s; ; ) {
|
|
36
|
-
if (t == o && e == n)
|
|
37
|
-
return !0;
|
|
38
|
-
if (e == (i < 0 ? 0 : A(t))) {
|
|
39
|
-
let r = t.parentNode;
|
|
40
|
-
if (!r || r.nodeType != 1 || Ne(t) || Co.test(t.nodeName) || t.contentEditable == "false")
|
|
41
|
-
return !1;
|
|
42
|
-
e = N(t) + (i < 0 ? 0 : 1), t = r;
|
|
43
|
-
} else if (t.nodeType == 1) {
|
|
44
|
-
let r = t.childNodes[e + (i < 0 ? -1 : 0)];
|
|
45
|
-
if (r.nodeType == 1 && r.contentEditable == "false")
|
|
46
|
-
if (!((s = r.pmViewDesc) === null || s === void 0) && s.ignoreForSelection)
|
|
47
|
-
e += i;
|
|
48
|
-
else
|
|
49
|
-
return !1;
|
|
50
|
-
else
|
|
51
|
-
t = r, e = i < 0 ? A(t) : 0;
|
|
52
|
-
} else
|
|
53
|
-
return !1;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
function A(t) {
|
|
57
|
-
return t.nodeType == 3 ? t.nodeValue.length : t.childNodes.length;
|
|
58
|
-
}
|
|
59
|
-
function Mo(t, e) {
|
|
60
|
-
for (; ; ) {
|
|
61
|
-
if (t.nodeType == 3 && e)
|
|
62
|
-
return t;
|
|
63
|
-
if (t.nodeType == 1 && e > 0) {
|
|
64
|
-
if (t.contentEditable == "false")
|
|
65
|
-
return null;
|
|
66
|
-
t = t.childNodes[e - 1], e = A(t);
|
|
67
|
-
} else if (t.parentNode && !Ne(t))
|
|
68
|
-
e = N(t), t = t.parentNode;
|
|
69
|
-
else
|
|
70
|
-
return null;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
function xo(t, e) {
|
|
74
|
-
for (; ; ) {
|
|
75
|
-
if (t.nodeType == 3 && e < t.nodeValue.length)
|
|
76
|
-
return t;
|
|
77
|
-
if (t.nodeType == 1 && e < t.childNodes.length) {
|
|
78
|
-
if (t.contentEditable == "false")
|
|
79
|
-
return null;
|
|
80
|
-
t = t.childNodes[e], e = 0;
|
|
81
|
-
} else if (t.parentNode && !Ne(t))
|
|
82
|
-
e = N(t) + 1, t = t.parentNode;
|
|
83
|
-
else
|
|
84
|
-
return null;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
function To(t, e, o) {
|
|
88
|
-
for (let n = e == 0, i = e == A(t); n || i; ) {
|
|
89
|
-
if (t == o)
|
|
90
|
-
return !0;
|
|
91
|
-
let s = N(t);
|
|
92
|
-
if (t = t.parentNode, !t)
|
|
93
|
-
return !1;
|
|
94
|
-
n = n && s == 0, i = i && s == A(t);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
function Ne(t) {
|
|
98
|
-
let e;
|
|
99
|
-
for (let o = t; o && !(e = o.pmViewDesc); o = o.parentNode)
|
|
100
|
-
;
|
|
101
|
-
return e && e.node && e.node.isBlock && (e.dom == t || e.contentDOM == t);
|
|
102
|
-
}
|
|
103
|
-
const Ae = function(t) {
|
|
104
|
-
return t.focusNode && re(t.focusNode, t.focusOffset, t.anchorNode, t.anchorOffset);
|
|
105
|
-
};
|
|
106
|
-
function ee(t, e) {
|
|
107
|
-
let o = document.createEvent("Event");
|
|
108
|
-
return o.initEvent("keydown", !0, !0), o.keyCode = t, o.key = o.code = e, o;
|
|
109
|
-
}
|
|
110
|
-
function ko(t) {
|
|
111
|
-
let e = t.activeElement;
|
|
112
|
-
for (; e && e.shadowRoot; )
|
|
113
|
-
e = e.shadowRoot.activeElement;
|
|
114
|
-
return e;
|
|
115
|
-
}
|
|
116
|
-
function Eo(t, e, o) {
|
|
117
|
-
if (t.caretPositionFromPoint)
|
|
118
|
-
try {
|
|
119
|
-
let n = t.caretPositionFromPoint(e, o);
|
|
120
|
-
if (n)
|
|
121
|
-
return { node: n.offsetNode, offset: Math.min(A(n.offsetNode), n.offset) };
|
|
122
|
-
} catch {
|
|
123
|
-
}
|
|
124
|
-
if (t.caretRangeFromPoint) {
|
|
125
|
-
let n = t.caretRangeFromPoint(e, o);
|
|
126
|
-
if (n)
|
|
127
|
-
return { node: n.startContainer, offset: Math.min(A(n.startContainer), n.startOffset) };
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
const I = typeof navigator < "u" ? navigator : null, rt = typeof document < "u" ? document : null, Z = I && I.userAgent || "", qe = /Edge\/(\d+)/.exec(Z), Lt = /MSIE \d/.exec(Z), Ke = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Z), E = !!(Lt || Ke || qe), X = Lt ? document.documentMode : Ke ? +Ke[1] : qe ? +qe[1] : 0, V = !E && /gecko\/(\d+)/i.test(Z);
|
|
131
|
-
V && +(/Firefox\/(\d+)/.exec(Z) || [0, 0])[1];
|
|
132
|
-
const We = !E && /Chrome\/(\d+)/.exec(Z), S = !!We, $t = We ? +We[1] : 0, C = !E && !!I && /Apple Computer/.test(I.vendor), ue = C && (/Mobile\/\w+/.test(Z) || !!I && I.maxTouchPoints > 2), P = ue || (I ? /Mac/.test(I.platform) : !1), qt = I ? /Win/.test(I.platform) : !1, K = /Android \d/.test(Z), Se = !!rt && "webkitFontSmoothing" in rt.documentElement.style, Po = Se ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
|
|
133
|
-
function Ao(t) {
|
|
134
|
-
let e = t.defaultView && t.defaultView.visualViewport;
|
|
135
|
-
return e ? {
|
|
136
|
-
left: 0,
|
|
137
|
-
right: e.width,
|
|
138
|
-
top: 0,
|
|
139
|
-
bottom: e.height
|
|
140
|
-
} : {
|
|
141
|
-
left: 0,
|
|
142
|
-
right: t.documentElement.clientWidth,
|
|
143
|
-
top: 0,
|
|
144
|
-
bottom: t.documentElement.clientHeight
|
|
145
|
-
};
|
|
146
|
-
}
|
|
147
|
-
function $(t, e) {
|
|
148
|
-
return typeof t == "number" ? t : t[e];
|
|
149
|
-
}
|
|
150
|
-
function Vo(t) {
|
|
151
|
-
let e = t.getBoundingClientRect(), o = e.width / t.offsetWidth || 1, n = e.height / t.offsetHeight || 1;
|
|
152
|
-
return {
|
|
153
|
-
left: e.left,
|
|
154
|
-
right: e.left + t.clientWidth * o,
|
|
155
|
-
top: e.top,
|
|
156
|
-
bottom: e.top + t.clientHeight * n
|
|
157
|
-
};
|
|
158
|
-
}
|
|
159
|
-
function lt(t, e, o) {
|
|
160
|
-
let n = t.someProp("scrollThreshold") || 0, i = t.someProp("scrollMargin") || 5, s = t.dom.ownerDocument;
|
|
161
|
-
for (let r = o || t.dom; r; ) {
|
|
162
|
-
if (r.nodeType != 1) {
|
|
163
|
-
r = fe(r);
|
|
164
|
-
continue;
|
|
165
|
-
}
|
|
166
|
-
let l = r, a = l == s.body, d = a ? Ao(s) : Vo(l), c = 0, h = 0;
|
|
167
|
-
if (e.top < d.top + $(n, "top") ? h = -(d.top - e.top + $(i, "top")) : e.bottom > d.bottom - $(n, "bottom") && (h = e.bottom - e.top > d.bottom - d.top ? e.top + $(i, "top") - d.top : e.bottom - d.bottom + $(i, "bottom")), e.left < d.left + $(n, "left") ? c = -(d.left - e.left + $(i, "left")) : e.right > d.right - $(n, "right") && (c = e.right - d.right + $(i, "right")), c || h)
|
|
168
|
-
if (a)
|
|
169
|
-
s.defaultView.scrollBy(c, h);
|
|
170
|
-
else {
|
|
171
|
-
let p = l.scrollLeft, f = l.scrollTop;
|
|
172
|
-
h && (l.scrollTop += h), c && (l.scrollLeft += c);
|
|
173
|
-
let g = l.scrollLeft - p, m = l.scrollTop - f;
|
|
174
|
-
e = { left: e.left - g, top: e.top - m, right: e.right - g, bottom: e.bottom - m };
|
|
175
|
-
}
|
|
176
|
-
let u = a ? "fixed" : getComputedStyle(r).position;
|
|
177
|
-
if (/^(fixed|sticky)$/.test(u))
|
|
178
|
-
break;
|
|
179
|
-
r = u == "absolute" ? r.offsetParent : fe(r);
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
function Ro(t) {
|
|
183
|
-
let e = t.dom.getBoundingClientRect(), o = Math.max(0, e.top), n, i;
|
|
184
|
-
for (let s = (e.left + e.right) / 2, r = o + 1; r < Math.min(innerHeight, e.bottom); r += 5) {
|
|
185
|
-
let l = t.root.elementFromPoint(s, r);
|
|
186
|
-
if (!l || l == t.dom || !t.dom.contains(l))
|
|
187
|
-
continue;
|
|
188
|
-
let a = l.getBoundingClientRect();
|
|
189
|
-
if (a.top >= o - 20) {
|
|
190
|
-
n = l, i = a.top;
|
|
191
|
-
break;
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
return { refDOM: n, refTop: i, stack: Kt(t.dom) };
|
|
195
|
-
}
|
|
196
|
-
function Kt(t) {
|
|
197
|
-
let e = [], o = t.ownerDocument;
|
|
198
|
-
for (let n = t; n && (e.push({ dom: n, top: n.scrollTop, left: n.scrollLeft }), t != o); n = fe(n))
|
|
199
|
-
;
|
|
200
|
-
return e;
|
|
201
|
-
}
|
|
202
|
-
function Bo({ refDOM: t, refTop: e, stack: o }) {
|
|
203
|
-
let n = t ? t.getBoundingClientRect().top : 0;
|
|
204
|
-
Wt(o, n == 0 ? 0 : n - e);
|
|
205
|
-
}
|
|
206
|
-
function Wt(t, e) {
|
|
207
|
-
for (let o = 0; o < t.length; o++) {
|
|
208
|
-
let { dom: n, top: i, left: s } = t[o];
|
|
209
|
-
n.scrollTop != i + e && (n.scrollTop = i + e), n.scrollLeft != s && (n.scrollLeft = s);
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
let ae = null;
|
|
213
|
-
function zo(t) {
|
|
214
|
-
if (t.setActive)
|
|
215
|
-
return t.setActive();
|
|
216
|
-
if (ae)
|
|
217
|
-
return t.focus(ae);
|
|
218
|
-
let e = Kt(t);
|
|
219
|
-
t.focus(ae == null ? {
|
|
220
|
-
get preventScroll() {
|
|
221
|
-
return ae = { preventScroll: !0 }, !0;
|
|
222
|
-
}
|
|
223
|
-
} : void 0), ae || (ae = !1, Wt(e, 0));
|
|
224
|
-
}
|
|
225
|
-
function Ht(t, e) {
|
|
226
|
-
let o, n = 2e8, i, s = 0, r = e.top, l = e.top, a, d;
|
|
227
|
-
for (let c = t.firstChild, h = 0; c; c = c.nextSibling, h++) {
|
|
228
|
-
let u;
|
|
229
|
-
if (c.nodeType == 1)
|
|
230
|
-
u = c.getClientRects();
|
|
231
|
-
else if (c.nodeType == 3)
|
|
232
|
-
u = q(c).getClientRects();
|
|
233
|
-
else
|
|
234
|
-
continue;
|
|
235
|
-
for (let p = 0; p < u.length; p++) {
|
|
236
|
-
let f = u[p];
|
|
237
|
-
if (f.top <= r && f.bottom >= l) {
|
|
238
|
-
r = Math.max(f.bottom, r), l = Math.min(f.top, l);
|
|
239
|
-
let g = f.left > e.left ? f.left - e.left : f.right < e.left ? e.left - f.right : 0;
|
|
240
|
-
if (g < n) {
|
|
241
|
-
o = c, n = g, i = g && o.nodeType == 3 ? {
|
|
242
|
-
left: f.right < e.left ? f.right : f.left,
|
|
243
|
-
top: e.top
|
|
244
|
-
} : e, c.nodeType == 1 && g && (s = h + (e.left >= (f.left + f.right) / 2 ? 1 : 0));
|
|
245
|
-
continue;
|
|
246
|
-
}
|
|
247
|
-
} else f.top > e.top && !a && f.left <= e.left && f.right >= e.left && (a = c, d = { left: Math.max(f.left, Math.min(f.right, e.left)), top: f.top });
|
|
248
|
-
!o && (e.left >= f.right && e.top >= f.top || e.left >= f.left && e.top >= f.bottom) && (s = h + 1);
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
return !o && a && (o = a, i = d, n = 0), o && o.nodeType == 3 ? Fo(o, i) : !o || n && o.nodeType == 1 ? { node: t, offset: s } : Ht(o, i);
|
|
252
|
-
}
|
|
253
|
-
function Fo(t, e) {
|
|
254
|
-
let o = t.nodeValue.length, n = document.createRange(), i;
|
|
255
|
-
for (let s = 0; s < o; s++) {
|
|
256
|
-
n.setEnd(t, s + 1), n.setStart(t, s);
|
|
257
|
-
let r = U(n, 1);
|
|
258
|
-
if (r.top != r.bottom && Je(e, r)) {
|
|
259
|
-
i = { node: t, offset: s + (e.left >= (r.left + r.right) / 2 ? 1 : 0) };
|
|
260
|
-
break;
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
return n.detach(), i || { node: t, offset: 0 };
|
|
264
|
-
}
|
|
265
|
-
function Je(t, e) {
|
|
266
|
-
return t.left >= e.left - 1 && t.left <= e.right + 1 && t.top >= e.top - 1 && t.top <= e.bottom + 1;
|
|
267
|
-
}
|
|
268
|
-
function Io(t, e) {
|
|
269
|
-
let o = t.parentNode;
|
|
270
|
-
return o && /^li$/i.test(o.nodeName) && e.left < t.getBoundingClientRect().left ? o : t;
|
|
271
|
-
}
|
|
272
|
-
function Lo(t, e, o) {
|
|
273
|
-
let { node: n, offset: i } = Ht(e, o), s = -1;
|
|
274
|
-
if (n.nodeType == 1 && !n.firstChild) {
|
|
275
|
-
let r = n.getBoundingClientRect();
|
|
276
|
-
s = r.left != r.right && o.left > (r.left + r.right) / 2 ? 1 : -1;
|
|
277
|
-
}
|
|
278
|
-
return t.docView.posFromDOM(n, i, s);
|
|
279
|
-
}
|
|
280
|
-
function $o(t, e, o, n) {
|
|
281
|
-
let i = -1;
|
|
282
|
-
for (let s = e, r = !1; s != t.dom; ) {
|
|
283
|
-
let l = t.docView.nearestDesc(s, !0), a;
|
|
284
|
-
if (!l)
|
|
285
|
-
return null;
|
|
286
|
-
if (l.dom.nodeType == 1 && (l.node.isBlock && l.parent || !l.contentDOM) && // Ignore elements with zero-size bounding rectangles
|
|
287
|
-
((a = l.dom.getBoundingClientRect()).width || a.height) && (l.node.isBlock && l.parent && !/^T(R|BODY|HEAD|FOOT)$/.test(l.dom.nodeName) && (!r && a.left > n.left || a.top > n.top ? i = l.posBefore : (!r && a.right < n.left || a.bottom < n.top) && (i = l.posAfter), r = !0), !l.contentDOM && i < 0 && !l.node.isText))
|
|
288
|
-
return (l.node.isBlock ? n.top < (a.top + a.bottom) / 2 : n.left < (a.left + a.right) / 2) ? l.posBefore : l.posAfter;
|
|
289
|
-
s = l.dom.parentNode;
|
|
290
|
-
}
|
|
291
|
-
return i > -1 ? i : t.docView.posFromDOM(e, o, -1);
|
|
292
|
-
}
|
|
293
|
-
function Ut(t, e, o) {
|
|
294
|
-
let n = t.childNodes.length;
|
|
295
|
-
if (n && o.top < o.bottom)
|
|
296
|
-
for (let i = Math.max(0, Math.min(n - 1, Math.floor(n * (e.top - o.top) / (o.bottom - o.top)) - 2)), s = i; ; ) {
|
|
297
|
-
let r = t.childNodes[s];
|
|
298
|
-
if (r.nodeType == 1) {
|
|
299
|
-
let l = r.getClientRects();
|
|
300
|
-
for (let a = 0; a < l.length; a++) {
|
|
301
|
-
let d = l[a];
|
|
302
|
-
if (Je(e, d))
|
|
303
|
-
return Ut(r, e, d);
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
if ((s = (s + 1) % n) == i)
|
|
307
|
-
break;
|
|
308
|
-
}
|
|
309
|
-
return t;
|
|
310
|
-
}
|
|
311
|
-
function qo(t, e) {
|
|
312
|
-
let o = t.dom.ownerDocument, n, i = 0, s = Eo(o, e.left, e.top);
|
|
313
|
-
s && ({ node: n, offset: i } = s);
|
|
314
|
-
let r = (t.root.elementFromPoint ? t.root : o).elementFromPoint(e.left, e.top), l;
|
|
315
|
-
if (!r || !t.dom.contains(r.nodeType != 1 ? r.parentNode : r)) {
|
|
316
|
-
let d = t.dom.getBoundingClientRect();
|
|
317
|
-
if (!Je(e, d) || (r = Ut(t.dom, e, d), !r))
|
|
318
|
-
return null;
|
|
319
|
-
}
|
|
320
|
-
if (C)
|
|
321
|
-
for (let d = r; n && d; d = fe(d))
|
|
322
|
-
d.draggable && (n = void 0);
|
|
323
|
-
if (r = Io(r, e), n) {
|
|
324
|
-
if (V && n.nodeType == 1 && (i = Math.min(i, n.childNodes.length), i < n.childNodes.length)) {
|
|
325
|
-
let c = n.childNodes[i], h;
|
|
326
|
-
c.nodeName == "IMG" && (h = c.getBoundingClientRect()).right <= e.left && h.bottom > e.top && i++;
|
|
327
|
-
}
|
|
328
|
-
let d;
|
|
329
|
-
Se && i && n.nodeType == 1 && (d = n.childNodes[i - 1]).nodeType == 1 && d.contentEditable == "false" && d.getBoundingClientRect().top >= e.top && i--, n == t.dom && i == n.childNodes.length - 1 && n.lastChild.nodeType == 1 && e.top > n.lastChild.getBoundingClientRect().bottom ? l = t.state.doc.content.size : (i == 0 || n.nodeType != 1 || n.childNodes[i - 1].nodeName != "BR") && (l = $o(t, n, i, e));
|
|
330
|
-
}
|
|
331
|
-
l == null && (l = Lo(t, r, e));
|
|
332
|
-
let a = t.docView.nearestDesc(r, !0);
|
|
333
|
-
return { pos: l, inside: a ? a.posAtStart - a.border : -1 };
|
|
334
|
-
}
|
|
335
|
-
function at(t) {
|
|
336
|
-
return t.top < t.bottom || t.left < t.right;
|
|
337
|
-
}
|
|
338
|
-
function U(t, e) {
|
|
339
|
-
let o = t.getClientRects();
|
|
340
|
-
if (o.length) {
|
|
341
|
-
let n = o[e < 0 ? 0 : o.length - 1];
|
|
342
|
-
if (at(n))
|
|
343
|
-
return n;
|
|
344
|
-
}
|
|
345
|
-
return Array.prototype.find.call(o, at) || t.getBoundingClientRect();
|
|
346
|
-
}
|
|
347
|
-
const Ko = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;
|
|
348
|
-
function Gt(t, e, o) {
|
|
349
|
-
let { node: n, offset: i, atom: s } = t.docView.domFromPos(e, o < 0 ? -1 : 1), r = Se || V;
|
|
350
|
-
if (n.nodeType == 3)
|
|
351
|
-
if (r && (Ko.test(n.nodeValue) || (o < 0 ? !i : i == n.nodeValue.length))) {
|
|
352
|
-
let l = U(q(n, i, i), o);
|
|
353
|
-
if (V && i && /\s/.test(n.nodeValue[i - 1]) && i < n.nodeValue.length) {
|
|
354
|
-
let a = U(q(n, i - 1, i - 1), -1);
|
|
355
|
-
if (a.top == l.top) {
|
|
356
|
-
let d = U(q(n, i, i + 1), -1);
|
|
357
|
-
if (d.top != l.top)
|
|
358
|
-
return me(d, d.left < a.left);
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
return l;
|
|
362
|
-
} else {
|
|
363
|
-
let l = i, a = i, d = o < 0 ? 1 : -1;
|
|
364
|
-
return o < 0 && !i ? (a++, d = -1) : o >= 0 && i == n.nodeValue.length ? (l--, d = 1) : o < 0 ? l-- : a++, me(U(q(n, l, a), d), d < 0);
|
|
365
|
-
}
|
|
366
|
-
if (!t.state.doc.resolve(e - (s || 0)).parent.inlineContent) {
|
|
367
|
-
if (s == null && i && (o < 0 || i == A(n))) {
|
|
368
|
-
let l = n.childNodes[i - 1];
|
|
369
|
-
if (l.nodeType == 1)
|
|
370
|
-
return Be(l.getBoundingClientRect(), !1);
|
|
371
|
-
}
|
|
372
|
-
if (s == null && i < A(n)) {
|
|
373
|
-
let l = n.childNodes[i];
|
|
374
|
-
if (l.nodeType == 1)
|
|
375
|
-
return Be(l.getBoundingClientRect(), !0);
|
|
376
|
-
}
|
|
377
|
-
return Be(n.getBoundingClientRect(), o >= 0);
|
|
378
|
-
}
|
|
379
|
-
if (s == null && i && (o < 0 || i == A(n))) {
|
|
380
|
-
let l = n.childNodes[i - 1], a = l.nodeType == 3 ? q(l, A(l) - (r ? 0 : 1)) : l.nodeType == 1 && (l.nodeName != "BR" || !l.nextSibling) ? l : null;
|
|
381
|
-
if (a)
|
|
382
|
-
return me(U(a, 1), !1);
|
|
383
|
-
}
|
|
384
|
-
if (s == null && i < A(n)) {
|
|
385
|
-
let l = n.childNodes[i];
|
|
386
|
-
for (; l.pmViewDesc && l.pmViewDesc.ignoreForCoords; )
|
|
387
|
-
l = l.nextSibling;
|
|
388
|
-
let a = l ? l.nodeType == 3 ? q(l, 0, r ? 0 : 1) : l.nodeType == 1 ? l : null : null;
|
|
389
|
-
if (a)
|
|
390
|
-
return me(U(a, -1), !0);
|
|
391
|
-
}
|
|
392
|
-
return me(U(n.nodeType == 3 ? q(n) : n, -o), o >= 0);
|
|
393
|
-
}
|
|
394
|
-
function me(t, e) {
|
|
395
|
-
if (t.width == 0)
|
|
396
|
-
return t;
|
|
397
|
-
let o = e ? t.left : t.right;
|
|
398
|
-
return { top: t.top, bottom: t.bottom, left: o, right: o };
|
|
399
|
-
}
|
|
400
|
-
function Be(t, e) {
|
|
401
|
-
if (t.height == 0)
|
|
402
|
-
return t;
|
|
403
|
-
let o = e ? t.top : t.bottom;
|
|
404
|
-
return { top: o, bottom: o, left: t.left, right: t.right };
|
|
405
|
-
}
|
|
406
|
-
function jt(t, e, o) {
|
|
407
|
-
let n = t.state, i = t.root.activeElement;
|
|
408
|
-
n != e && t.updateState(e), i != t.dom && t.focus();
|
|
409
|
-
try {
|
|
410
|
-
return o();
|
|
411
|
-
} finally {
|
|
412
|
-
n != e && t.updateState(n), i != t.dom && i && i.focus();
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
function Wo(t, e, o) {
|
|
416
|
-
let n = e.selection, i = o == "up" ? n.$from : n.$to;
|
|
417
|
-
return jt(t, e, () => {
|
|
418
|
-
let { node: s } = t.docView.domFromPos(i.pos, o == "up" ? -1 : 1);
|
|
419
|
-
for (; ; ) {
|
|
420
|
-
let l = t.docView.nearestDesc(s, !0);
|
|
421
|
-
if (!l)
|
|
422
|
-
break;
|
|
423
|
-
if (l.node.isBlock) {
|
|
424
|
-
s = l.contentDOM || l.dom;
|
|
425
|
-
break;
|
|
426
|
-
}
|
|
427
|
-
s = l.dom.parentNode;
|
|
428
|
-
}
|
|
429
|
-
let r = Gt(t, i.pos, 1);
|
|
430
|
-
for (let l = s.firstChild; l; l = l.nextSibling) {
|
|
431
|
-
let a;
|
|
432
|
-
if (l.nodeType == 1)
|
|
433
|
-
a = l.getClientRects();
|
|
434
|
-
else if (l.nodeType == 3)
|
|
435
|
-
a = q(l, 0, l.nodeValue.length).getClientRects();
|
|
436
|
-
else
|
|
437
|
-
continue;
|
|
438
|
-
for (let d = 0; d < a.length; d++) {
|
|
439
|
-
let c = a[d];
|
|
440
|
-
if (c.bottom > c.top + 1 && (o == "up" ? r.top - c.top > (c.bottom - r.top) * 2 : c.bottom - r.bottom > (r.bottom - c.top) * 2))
|
|
441
|
-
return !1;
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
return !0;
|
|
445
|
-
});
|
|
446
|
-
}
|
|
447
|
-
const Ho = /[\u0590-\u08ac]/;
|
|
448
|
-
function Uo(t, e, o) {
|
|
449
|
-
let { $head: n } = e.selection;
|
|
450
|
-
if (!n.parent.isTextblock)
|
|
451
|
-
return !1;
|
|
452
|
-
let i = n.parentOffset, s = !i, r = i == n.parent.content.size, l = t.domSelection();
|
|
453
|
-
return l ? !Ho.test(n.parent.textContent) || !l.modify ? o == "left" || o == "backward" ? s : r : jt(t, e, () => {
|
|
454
|
-
let { focusNode: a, focusOffset: d, anchorNode: c, anchorOffset: h } = t.domSelectionRange(), u = l.caretBidiLevel;
|
|
455
|
-
l.modify("move", o, "character");
|
|
456
|
-
let p = n.depth ? t.docView.domAfterPos(n.before()) : t.dom, { focusNode: f, focusOffset: g } = t.domSelectionRange(), m = f && !p.contains(f.nodeType == 1 ? f : f.parentNode) || a == f && d == g;
|
|
457
|
-
try {
|
|
458
|
-
l.collapse(c, h), a && (a != c || d != h) && l.extend && l.extend(a, d);
|
|
459
|
-
} catch {
|
|
460
|
-
}
|
|
461
|
-
return u != null && (l.caretBidiLevel = u), m;
|
|
462
|
-
}) : n.pos == n.start() || n.pos == n.end();
|
|
463
|
-
}
|
|
464
|
-
let dt = null, ct = null, ht = !1;
|
|
465
|
-
function Go(t, e, o) {
|
|
466
|
-
return dt == e && ct == o ? ht : (dt = e, ct = o, ht = o == "up" || o == "down" ? Wo(t, e, o) : Uo(t, e, o));
|
|
467
|
-
}
|
|
468
|
-
const R = 0, ft = 1, te = 2, L = 3;
|
|
469
|
-
class Oe {
|
|
470
|
-
constructor(e, o, n, i) {
|
|
471
|
-
this.parent = e, this.children = o, this.dom = n, this.contentDOM = i, this.dirty = R, n.pmViewDesc = this;
|
|
472
|
-
}
|
|
473
|
-
// Used to check whether a given description corresponds to a
|
|
474
|
-
// widget/mark/node.
|
|
475
|
-
matchesWidget(e) {
|
|
476
|
-
return !1;
|
|
477
|
-
}
|
|
478
|
-
matchesMark(e) {
|
|
479
|
-
return !1;
|
|
480
|
-
}
|
|
481
|
-
matchesNode(e, o, n) {
|
|
482
|
-
return !1;
|
|
483
|
-
}
|
|
484
|
-
matchesHack(e) {
|
|
485
|
-
return !1;
|
|
486
|
-
}
|
|
487
|
-
// When parsing in-editor content (in domchange.js), we allow
|
|
488
|
-
// descriptions to determine the parse rules that should be used to
|
|
489
|
-
// parse them.
|
|
490
|
-
parseRule() {
|
|
491
|
-
return null;
|
|
492
|
-
}
|
|
493
|
-
// Used by the editor's event handler to ignore events that come
|
|
494
|
-
// from certain descs.
|
|
495
|
-
stopEvent(e) {
|
|
496
|
-
return !1;
|
|
497
|
-
}
|
|
498
|
-
// The size of the content represented by this desc.
|
|
499
|
-
get size() {
|
|
500
|
-
let e = 0;
|
|
501
|
-
for (let o = 0; o < this.children.length; o++)
|
|
502
|
-
e += this.children[o].size;
|
|
503
|
-
return e;
|
|
504
|
-
}
|
|
505
|
-
// For block nodes, this represents the space taken up by their
|
|
506
|
-
// start/end tokens.
|
|
507
|
-
get border() {
|
|
508
|
-
return 0;
|
|
509
|
-
}
|
|
510
|
-
destroy() {
|
|
511
|
-
this.parent = void 0, this.dom.pmViewDesc == this && (this.dom.pmViewDesc = void 0);
|
|
512
|
-
for (let e = 0; e < this.children.length; e++)
|
|
513
|
-
this.children[e].destroy();
|
|
514
|
-
}
|
|
515
|
-
posBeforeChild(e) {
|
|
516
|
-
for (let o = 0, n = this.posAtStart; ; o++) {
|
|
517
|
-
let i = this.children[o];
|
|
518
|
-
if (i == e)
|
|
519
|
-
return n;
|
|
520
|
-
n += i.size;
|
|
521
|
-
}
|
|
522
|
-
}
|
|
523
|
-
get posBefore() {
|
|
524
|
-
return this.parent.posBeforeChild(this);
|
|
525
|
-
}
|
|
526
|
-
get posAtStart() {
|
|
527
|
-
return this.parent ? this.parent.posBeforeChild(this) + this.border : 0;
|
|
528
|
-
}
|
|
529
|
-
get posAfter() {
|
|
530
|
-
return this.posBefore + this.size;
|
|
531
|
-
}
|
|
532
|
-
get posAtEnd() {
|
|
533
|
-
return this.posAtStart + this.size - 2 * this.border;
|
|
534
|
-
}
|
|
535
|
-
localPosFromDOM(e, o, n) {
|
|
536
|
-
if (this.contentDOM && this.contentDOM.contains(e.nodeType == 1 ? e : e.parentNode))
|
|
537
|
-
if (n < 0) {
|
|
538
|
-
let s, r;
|
|
539
|
-
if (e == this.contentDOM)
|
|
540
|
-
s = e.childNodes[o - 1];
|
|
541
|
-
else {
|
|
542
|
-
for (; e.parentNode != this.contentDOM; )
|
|
543
|
-
e = e.parentNode;
|
|
544
|
-
s = e.previousSibling;
|
|
545
|
-
}
|
|
546
|
-
for (; s && !((r = s.pmViewDesc) && r.parent == this); )
|
|
547
|
-
s = s.previousSibling;
|
|
548
|
-
return s ? this.posBeforeChild(r) + r.size : this.posAtStart;
|
|
549
|
-
} else {
|
|
550
|
-
let s, r;
|
|
551
|
-
if (e == this.contentDOM)
|
|
552
|
-
s = e.childNodes[o];
|
|
553
|
-
else {
|
|
554
|
-
for (; e.parentNode != this.contentDOM; )
|
|
555
|
-
e = e.parentNode;
|
|
556
|
-
s = e.nextSibling;
|
|
557
|
-
}
|
|
558
|
-
for (; s && !((r = s.pmViewDesc) && r.parent == this); )
|
|
559
|
-
s = s.nextSibling;
|
|
560
|
-
return s ? this.posBeforeChild(r) : this.posAtEnd;
|
|
561
|
-
}
|
|
562
|
-
let i;
|
|
563
|
-
if (e == this.dom && this.contentDOM)
|
|
564
|
-
i = o > N(this.contentDOM);
|
|
565
|
-
else if (this.contentDOM && this.contentDOM != this.dom && this.dom.contains(this.contentDOM))
|
|
566
|
-
i = e.compareDocumentPosition(this.contentDOM) & 2;
|
|
567
|
-
else if (this.dom.firstChild) {
|
|
568
|
-
if (o == 0)
|
|
569
|
-
for (let s = e; ; s = s.parentNode) {
|
|
570
|
-
if (s == this.dom) {
|
|
571
|
-
i = !1;
|
|
572
|
-
break;
|
|
573
|
-
}
|
|
574
|
-
if (s.previousSibling)
|
|
575
|
-
break;
|
|
576
|
-
}
|
|
577
|
-
if (i == null && o == e.childNodes.length)
|
|
578
|
-
for (let s = e; ; s = s.parentNode) {
|
|
579
|
-
if (s == this.dom) {
|
|
580
|
-
i = !0;
|
|
581
|
-
break;
|
|
582
|
-
}
|
|
583
|
-
if (s.nextSibling)
|
|
584
|
-
break;
|
|
585
|
-
}
|
|
586
|
-
}
|
|
587
|
-
return i ?? n > 0 ? this.posAtEnd : this.posAtStart;
|
|
588
|
-
}
|
|
589
|
-
nearestDesc(e, o = !1) {
|
|
590
|
-
for (let n = !0, i = e; i; i = i.parentNode) {
|
|
591
|
-
let s = this.getDesc(i), r;
|
|
592
|
-
if (s && (!o || s.node))
|
|
593
|
-
if (n && (r = s.nodeDOM) && !(r.nodeType == 1 ? r.contains(e.nodeType == 1 ? e : e.parentNode) : r == e))
|
|
594
|
-
n = !1;
|
|
595
|
-
else
|
|
596
|
-
return s;
|
|
597
|
-
}
|
|
598
|
-
}
|
|
599
|
-
getDesc(e) {
|
|
600
|
-
let o = e.pmViewDesc;
|
|
601
|
-
for (let n = o; n; n = n.parent)
|
|
602
|
-
if (n == this)
|
|
603
|
-
return o;
|
|
604
|
-
}
|
|
605
|
-
posFromDOM(e, o, n) {
|
|
606
|
-
for (let i = e; i; i = i.parentNode) {
|
|
607
|
-
let s = this.getDesc(i);
|
|
608
|
-
if (s)
|
|
609
|
-
return s.localPosFromDOM(e, o, n);
|
|
610
|
-
}
|
|
611
|
-
return -1;
|
|
612
|
-
}
|
|
613
|
-
// Find the desc for the node after the given pos, if any. (When a
|
|
614
|
-
// parent node overrode rendering, there might not be one.)
|
|
615
|
-
descAt(e) {
|
|
616
|
-
for (let o = 0, n = 0; o < this.children.length; o++) {
|
|
617
|
-
let i = this.children[o], s = n + i.size;
|
|
618
|
-
if (n == e && s != n) {
|
|
619
|
-
for (; !i.border && i.children.length; )
|
|
620
|
-
for (let r = 0; r < i.children.length; r++) {
|
|
621
|
-
let l = i.children[r];
|
|
622
|
-
if (l.size) {
|
|
623
|
-
i = l;
|
|
624
|
-
break;
|
|
625
|
-
}
|
|
626
|
-
}
|
|
627
|
-
return i;
|
|
628
|
-
}
|
|
629
|
-
if (e < s)
|
|
630
|
-
return i.descAt(e - n - i.border);
|
|
631
|
-
n = s;
|
|
632
|
-
}
|
|
633
|
-
}
|
|
634
|
-
domFromPos(e, o) {
|
|
635
|
-
if (!this.contentDOM)
|
|
636
|
-
return { node: this.dom, offset: 0, atom: e + 1 };
|
|
637
|
-
let n = 0, i = 0;
|
|
638
|
-
for (let s = 0; n < this.children.length; n++) {
|
|
639
|
-
let r = this.children[n], l = s + r.size;
|
|
640
|
-
if (l > e || r instanceof Xt) {
|
|
641
|
-
i = e - s;
|
|
642
|
-
break;
|
|
643
|
-
}
|
|
644
|
-
s = l;
|
|
645
|
-
}
|
|
646
|
-
if (i)
|
|
647
|
-
return this.children[n].domFromPos(i - this.children[n].border, o);
|
|
648
|
-
for (let s; n && !(s = this.children[n - 1]).size && s instanceof Yt && s.side >= 0; n--)
|
|
649
|
-
;
|
|
650
|
-
if (o <= 0) {
|
|
651
|
-
let s, r = !0;
|
|
652
|
-
for (; s = n ? this.children[n - 1] : null, !(!s || s.dom.parentNode == this.contentDOM); n--, r = !1)
|
|
653
|
-
;
|
|
654
|
-
return s && o && r && !s.border && !s.domAtom ? s.domFromPos(s.size, o) : { node: this.contentDOM, offset: s ? N(s.dom) + 1 : 0 };
|
|
655
|
-
} else {
|
|
656
|
-
let s, r = !0;
|
|
657
|
-
for (; s = n < this.children.length ? this.children[n] : null, !(!s || s.dom.parentNode == this.contentDOM); n++, r = !1)
|
|
658
|
-
;
|
|
659
|
-
return s && r && !s.border && !s.domAtom ? s.domFromPos(0, o) : { node: this.contentDOM, offset: s ? N(s.dom) : this.contentDOM.childNodes.length };
|
|
660
|
-
}
|
|
661
|
-
}
|
|
662
|
-
// Used to find a DOM range in a single parent for a given changed
|
|
663
|
-
// range.
|
|
664
|
-
parseRange(e, o, n = 0) {
|
|
665
|
-
if (this.children.length == 0)
|
|
666
|
-
return { node: this.contentDOM, from: e, to: o, fromOffset: 0, toOffset: this.contentDOM.childNodes.length };
|
|
667
|
-
let i = -1, s = -1;
|
|
668
|
-
for (let r = n, l = 0; ; l++) {
|
|
669
|
-
let a = this.children[l], d = r + a.size;
|
|
670
|
-
if (i == -1 && e <= d) {
|
|
671
|
-
let c = r + a.border;
|
|
672
|
-
if (e >= c && o <= d - a.border && a.node && a.contentDOM && this.contentDOM.contains(a.contentDOM))
|
|
673
|
-
return a.parseRange(e, o, c);
|
|
674
|
-
e = r;
|
|
675
|
-
for (let h = l; h > 0; h--) {
|
|
676
|
-
let u = this.children[h - 1];
|
|
677
|
-
if (u.size && u.dom.parentNode == this.contentDOM && !u.emptyChildAt(1)) {
|
|
678
|
-
i = N(u.dom) + 1;
|
|
679
|
-
break;
|
|
680
|
-
}
|
|
681
|
-
e -= u.size;
|
|
682
|
-
}
|
|
683
|
-
i == -1 && (i = 0);
|
|
684
|
-
}
|
|
685
|
-
if (i > -1 && (d > o || l == this.children.length - 1)) {
|
|
686
|
-
o = d;
|
|
687
|
-
for (let c = l + 1; c < this.children.length; c++) {
|
|
688
|
-
let h = this.children[c];
|
|
689
|
-
if (h.size && h.dom.parentNode == this.contentDOM && !h.emptyChildAt(-1)) {
|
|
690
|
-
s = N(h.dom);
|
|
691
|
-
break;
|
|
692
|
-
}
|
|
693
|
-
o += h.size;
|
|
694
|
-
}
|
|
695
|
-
s == -1 && (s = this.contentDOM.childNodes.length);
|
|
696
|
-
break;
|
|
697
|
-
}
|
|
698
|
-
r = d;
|
|
699
|
-
}
|
|
700
|
-
return { node: this.contentDOM, from: e, to: o, fromOffset: i, toOffset: s };
|
|
701
|
-
}
|
|
702
|
-
emptyChildAt(e) {
|
|
703
|
-
if (this.border || !this.contentDOM || !this.children.length)
|
|
704
|
-
return !1;
|
|
705
|
-
let o = this.children[e < 0 ? 0 : this.children.length - 1];
|
|
706
|
-
return o.size == 0 || o.emptyChildAt(e);
|
|
707
|
-
}
|
|
708
|
-
domAfterPos(e) {
|
|
709
|
-
let { node: o, offset: n } = this.domFromPos(e, 0);
|
|
710
|
-
if (o.nodeType != 1 || n == o.childNodes.length)
|
|
711
|
-
throw new RangeError("No node after pos " + e);
|
|
712
|
-
return o.childNodes[n];
|
|
713
|
-
}
|
|
714
|
-
// View descs are responsible for setting any selection that falls
|
|
715
|
-
// entirely inside of them, so that custom implementations can do
|
|
716
|
-
// custom things with the selection. Note that this falls apart when
|
|
717
|
-
// a selection starts in such a node and ends in another, in which
|
|
718
|
-
// case we just use whatever domFromPos produces as a best effort.
|
|
719
|
-
setSelection(e, o, n, i = !1) {
|
|
720
|
-
let s = Math.min(e, o), r = Math.max(e, o);
|
|
721
|
-
for (let p = 0, f = 0; p < this.children.length; p++) {
|
|
722
|
-
let g = this.children[p], m = f + g.size;
|
|
723
|
-
if (s > f && r < m)
|
|
724
|
-
return g.setSelection(e - f - g.border, o - f - g.border, n, i);
|
|
725
|
-
f = m;
|
|
726
|
-
}
|
|
727
|
-
let l = this.domFromPos(e, e ? -1 : 1), a = o == e ? l : this.domFromPos(o, o ? -1 : 1), d = n.root.getSelection(), c = n.domSelectionRange(), h = !1;
|
|
728
|
-
if ((V || C) && e == o) {
|
|
729
|
-
let { node: p, offset: f } = l;
|
|
730
|
-
if (p.nodeType == 3) {
|
|
731
|
-
if (h = !!(f && p.nodeValue[f - 1] == `
|
|
732
|
-
`), h && f == p.nodeValue.length)
|
|
733
|
-
for (let g = p, m; g; g = g.parentNode) {
|
|
734
|
-
if (m = g.nextSibling) {
|
|
735
|
-
m.nodeName == "BR" && (l = a = { node: m.parentNode, offset: N(m) + 1 });
|
|
736
|
-
break;
|
|
737
|
-
}
|
|
738
|
-
let y = g.pmViewDesc;
|
|
739
|
-
if (y && y.node && y.node.isBlock)
|
|
740
|
-
break;
|
|
741
|
-
}
|
|
742
|
-
} else {
|
|
743
|
-
let g = p.childNodes[f - 1];
|
|
744
|
-
h = g && (g.nodeName == "BR" || g.contentEditable == "false");
|
|
745
|
-
}
|
|
746
|
-
}
|
|
747
|
-
if (V && c.focusNode && c.focusNode != a.node && c.focusNode.nodeType == 1) {
|
|
748
|
-
let p = c.focusNode.childNodes[c.focusOffset];
|
|
749
|
-
p && p.contentEditable == "false" && (i = !0);
|
|
750
|
-
}
|
|
751
|
-
if (!(i || h && C) && re(l.node, l.offset, c.anchorNode, c.anchorOffset) && re(a.node, a.offset, c.focusNode, c.focusOffset))
|
|
752
|
-
return;
|
|
753
|
-
let u = !1;
|
|
754
|
-
if ((d.extend || e == o) && !(h && V)) {
|
|
755
|
-
d.collapse(l.node, l.offset);
|
|
756
|
-
try {
|
|
757
|
-
e != o && d.extend(a.node, a.offset), u = !0;
|
|
758
|
-
} catch {
|
|
759
|
-
}
|
|
760
|
-
}
|
|
761
|
-
if (!u) {
|
|
762
|
-
if (e > o) {
|
|
763
|
-
let f = l;
|
|
764
|
-
l = a, a = f;
|
|
765
|
-
}
|
|
766
|
-
let p = document.createRange();
|
|
767
|
-
p.setEnd(a.node, a.offset), p.setStart(l.node, l.offset), d.removeAllRanges(), d.addRange(p);
|
|
768
|
-
}
|
|
769
|
-
}
|
|
770
|
-
ignoreMutation(e) {
|
|
771
|
-
return !this.contentDOM && e.type != "selection";
|
|
772
|
-
}
|
|
773
|
-
get contentLost() {
|
|
774
|
-
return this.contentDOM && this.contentDOM != this.dom && !this.dom.contains(this.contentDOM);
|
|
775
|
-
}
|
|
776
|
-
// Remove a subtree of the element tree that has been touched
|
|
777
|
-
// by a DOM change, so that the next update will redraw it.
|
|
778
|
-
markDirty(e, o) {
|
|
779
|
-
for (let n = 0, i = 0; i < this.children.length; i++) {
|
|
780
|
-
let s = this.children[i], r = n + s.size;
|
|
781
|
-
if (n == r ? e <= r && o >= n : e < r && o > n) {
|
|
782
|
-
let l = n + s.border, a = r - s.border;
|
|
783
|
-
if (e >= l && o <= a) {
|
|
784
|
-
this.dirty = e == n || o == r ? te : ft, e == l && o == a && (s.contentLost || s.dom.parentNode != this.contentDOM) ? s.dirty = L : s.markDirty(e - l, o - l);
|
|
785
|
-
return;
|
|
786
|
-
} else
|
|
787
|
-
s.dirty = s.dom == s.contentDOM && s.dom.parentNode == this.contentDOM && !s.children.length ? te : L;
|
|
788
|
-
}
|
|
789
|
-
n = r;
|
|
790
|
-
}
|
|
791
|
-
this.dirty = te;
|
|
792
|
-
}
|
|
793
|
-
markParentsDirty() {
|
|
794
|
-
let e = 1;
|
|
795
|
-
for (let o = this.parent; o; o = o.parent, e++) {
|
|
796
|
-
let n = e == 1 ? te : ft;
|
|
797
|
-
o.dirty < n && (o.dirty = n);
|
|
798
|
-
}
|
|
799
|
-
}
|
|
800
|
-
get domAtom() {
|
|
801
|
-
return !1;
|
|
802
|
-
}
|
|
803
|
-
get ignoreForCoords() {
|
|
804
|
-
return !1;
|
|
805
|
-
}
|
|
806
|
-
get ignoreForSelection() {
|
|
807
|
-
return !1;
|
|
808
|
-
}
|
|
809
|
-
isText(e) {
|
|
810
|
-
return !1;
|
|
811
|
-
}
|
|
812
|
-
}
|
|
813
|
-
class Yt extends Oe {
|
|
814
|
-
constructor(e, o, n, i) {
|
|
815
|
-
let s, r = o.type.toDOM;
|
|
816
|
-
if (typeof r == "function" && (r = r(n, () => {
|
|
817
|
-
if (!s)
|
|
818
|
-
return i;
|
|
819
|
-
if (s.parent)
|
|
820
|
-
return s.parent.posBeforeChild(s);
|
|
821
|
-
})), !o.type.spec.raw) {
|
|
822
|
-
if (r.nodeType != 1) {
|
|
823
|
-
let l = document.createElement("span");
|
|
824
|
-
l.appendChild(r), r = l;
|
|
825
|
-
}
|
|
826
|
-
r.contentEditable = "false", r.classList.add("ProseMirror-widget");
|
|
827
|
-
}
|
|
828
|
-
super(e, [], r, null), this.widget = o, this.widget = o, s = this;
|
|
829
|
-
}
|
|
830
|
-
matchesWidget(e) {
|
|
831
|
-
return this.dirty == R && e.type.eq(this.widget.type);
|
|
832
|
-
}
|
|
833
|
-
parseRule() {
|
|
834
|
-
return { ignore: !0 };
|
|
835
|
-
}
|
|
836
|
-
stopEvent(e) {
|
|
837
|
-
let o = this.widget.spec.stopEvent;
|
|
838
|
-
return o ? o(e) : !1;
|
|
839
|
-
}
|
|
840
|
-
ignoreMutation(e) {
|
|
841
|
-
return e.type != "selection" || this.widget.spec.ignoreSelection;
|
|
842
|
-
}
|
|
843
|
-
destroy() {
|
|
844
|
-
this.widget.type.destroy(this.dom), super.destroy();
|
|
845
|
-
}
|
|
846
|
-
get domAtom() {
|
|
847
|
-
return !0;
|
|
848
|
-
}
|
|
849
|
-
get ignoreForSelection() {
|
|
850
|
-
return !!this.widget.type.spec.relaxedSide;
|
|
851
|
-
}
|
|
852
|
-
get side() {
|
|
853
|
-
return this.widget.type.side;
|
|
854
|
-
}
|
|
855
|
-
}
|
|
856
|
-
class jo extends Oe {
|
|
857
|
-
constructor(e, o, n, i) {
|
|
858
|
-
super(e, [], o, null), this.textDOM = n, this.text = i;
|
|
859
|
-
}
|
|
860
|
-
get size() {
|
|
861
|
-
return this.text.length;
|
|
862
|
-
}
|
|
863
|
-
localPosFromDOM(e, o) {
|
|
864
|
-
return e != this.textDOM ? this.posAtStart + (o ? this.size : 0) : this.posAtStart + o;
|
|
865
|
-
}
|
|
866
|
-
domFromPos(e) {
|
|
867
|
-
return { node: this.textDOM, offset: e };
|
|
868
|
-
}
|
|
869
|
-
ignoreMutation(e) {
|
|
870
|
-
return e.type === "characterData" && e.target.nodeValue == e.oldValue;
|
|
871
|
-
}
|
|
872
|
-
}
|
|
873
|
-
class le extends Oe {
|
|
874
|
-
constructor(e, o, n, i, s) {
|
|
875
|
-
super(e, [], n, i), this.mark = o, this.spec = s;
|
|
876
|
-
}
|
|
877
|
-
static create(e, o, n, i) {
|
|
878
|
-
let s = i.nodeViews[o.type.name], r = s && s(o, i, n);
|
|
879
|
-
return (!r || !r.dom) && (r = Pe.renderSpec(document, o.type.spec.toDOM(o, n), null, o.attrs)), new le(e, o, r.dom, r.contentDOM || r.dom, r);
|
|
880
|
-
}
|
|
881
|
-
parseRule() {
|
|
882
|
-
return this.dirty & L || this.mark.type.spec.reparseInView ? null : { mark: this.mark.type.name, attrs: this.mark.attrs, contentElement: this.contentDOM };
|
|
883
|
-
}
|
|
884
|
-
matchesMark(e) {
|
|
885
|
-
return this.dirty != L && this.mark.eq(e);
|
|
886
|
-
}
|
|
887
|
-
markDirty(e, o) {
|
|
888
|
-
if (super.markDirty(e, o), this.dirty != R) {
|
|
889
|
-
let n = this.parent;
|
|
890
|
-
for (; !n.node; )
|
|
891
|
-
n = n.parent;
|
|
892
|
-
n.dirty < this.dirty && (n.dirty = this.dirty), this.dirty = R;
|
|
893
|
-
}
|
|
894
|
-
}
|
|
895
|
-
slice(e, o, n) {
|
|
896
|
-
let i = le.create(this.parent, this.mark, !0, n), s = this.children, r = this.size;
|
|
897
|
-
o < r && (s = Ue(s, o, r, n)), e > 0 && (s = Ue(s, 0, e, n));
|
|
898
|
-
for (let l = 0; l < s.length; l++)
|
|
899
|
-
s[l].parent = i;
|
|
900
|
-
return i.children = s, i;
|
|
901
|
-
}
|
|
902
|
-
ignoreMutation(e) {
|
|
903
|
-
return this.spec.ignoreMutation ? this.spec.ignoreMutation(e) : super.ignoreMutation(e);
|
|
904
|
-
}
|
|
905
|
-
destroy() {
|
|
906
|
-
this.spec.destroy && this.spec.destroy(), super.destroy();
|
|
907
|
-
}
|
|
908
|
-
}
|
|
909
|
-
class J extends Oe {
|
|
910
|
-
constructor(e, o, n, i, s, r, l, a, d) {
|
|
911
|
-
super(e, [], s, r), this.node = o, this.outerDeco = n, this.innerDeco = i, this.nodeDOM = l;
|
|
912
|
-
}
|
|
913
|
-
// By default, a node is rendered using the `toDOM` method from the
|
|
914
|
-
// node type spec. But client code can use the `nodeViews` spec to
|
|
915
|
-
// supply a custom node view, which can influence various aspects of
|
|
916
|
-
// the way the node works.
|
|
917
|
-
//
|
|
918
|
-
// (Using subclassing for this was intentionally decided against,
|
|
919
|
-
// since it'd require exposing a whole slew of finicky
|
|
920
|
-
// implementation details to the user code that they probably will
|
|
921
|
-
// never need.)
|
|
922
|
-
static create(e, o, n, i, s, r) {
|
|
923
|
-
let l = s.nodeViews[o.type.name], a, d = l && l(o, s, () => {
|
|
924
|
-
if (!a)
|
|
925
|
-
return r;
|
|
926
|
-
if (a.parent)
|
|
927
|
-
return a.parent.posBeforeChild(a);
|
|
928
|
-
}, n, i), c = d && d.dom, h = d && d.contentDOM;
|
|
929
|
-
if (o.isText) {
|
|
930
|
-
if (!c)
|
|
931
|
-
c = document.createTextNode(o.text);
|
|
932
|
-
else if (c.nodeType != 3)
|
|
933
|
-
throw new RangeError("Text must be rendered as a DOM text node");
|
|
934
|
-
} else c || ({ dom: c, contentDOM: h } = Pe.renderSpec(document, o.type.spec.toDOM(o), null, o.attrs));
|
|
935
|
-
!h && !o.isText && c.nodeName != "BR" && (c.hasAttribute("contenteditable") || (c.contentEditable = "false"), o.type.spec.draggable && (c.draggable = !0));
|
|
936
|
-
let u = c;
|
|
937
|
-
return c = Zt(c, n, o), d ? a = new Yo(e, o, n, i, c, h || null, u, d, s, r + 1) : o.isText ? new Ve(e, o, n, i, c, u, s) : new J(e, o, n, i, c, h || null, u, s, r + 1);
|
|
938
|
-
}
|
|
939
|
-
parseRule() {
|
|
940
|
-
if (this.node.type.spec.reparseInView)
|
|
941
|
-
return null;
|
|
942
|
-
let e = { node: this.node.type.name, attrs: this.node.attrs };
|
|
943
|
-
if (this.node.type.whitespace == "pre" && (e.preserveWhitespace = "full"), !this.contentDOM)
|
|
944
|
-
e.getContent = () => this.node.content;
|
|
945
|
-
else if (!this.contentLost)
|
|
946
|
-
e.contentElement = this.contentDOM;
|
|
947
|
-
else {
|
|
948
|
-
for (let o = this.children.length - 1; o >= 0; o--) {
|
|
949
|
-
let n = this.children[o];
|
|
950
|
-
if (this.dom.contains(n.dom.parentNode)) {
|
|
951
|
-
e.contentElement = n.dom.parentNode;
|
|
952
|
-
break;
|
|
953
|
-
}
|
|
954
|
-
}
|
|
955
|
-
e.contentElement || (e.getContent = () => H.empty);
|
|
956
|
-
}
|
|
957
|
-
return e;
|
|
958
|
-
}
|
|
959
|
-
matchesNode(e, o, n) {
|
|
960
|
-
return this.dirty == R && e.eq(this.node) && Me(o, this.outerDeco) && n.eq(this.innerDeco);
|
|
961
|
-
}
|
|
962
|
-
get size() {
|
|
963
|
-
return this.node.nodeSize;
|
|
964
|
-
}
|
|
965
|
-
get border() {
|
|
966
|
-
return this.node.isLeaf ? 0 : 1;
|
|
967
|
-
}
|
|
968
|
-
// Syncs `this.children` to match `this.node.content` and the local
|
|
969
|
-
// decorations, possibly introducing nesting for marks. Then, in a
|
|
970
|
-
// separate step, syncs the DOM inside `this.contentDOM` to
|
|
971
|
-
// `this.children`.
|
|
972
|
-
updateChildren(e, o) {
|
|
973
|
-
let n = this.node.inlineContent, i = o, s = e.composing ? this.localCompositionInfo(e, o) : null, r = s && s.pos > -1 ? s : null, l = s && s.pos < 0, a = new Jo(this, r && r.node, e);
|
|
974
|
-
Qo(this.node, this.innerDeco, (d, c, h) => {
|
|
975
|
-
d.spec.marks ? a.syncToMarks(d.spec.marks, n, e, c) : d.type.side >= 0 && !h && a.syncToMarks(c == this.node.childCount ? No.none : this.node.child(c).marks, n, e, c), a.placeWidget(d, e, i);
|
|
976
|
-
}, (d, c, h, u) => {
|
|
977
|
-
a.syncToMarks(d.marks, n, e, u);
|
|
978
|
-
let p;
|
|
979
|
-
a.findNodeMatch(d, c, h, u) || l && e.state.selection.from > i && e.state.selection.to < i + d.nodeSize && (p = a.findIndexWithChild(s.node)) > -1 && a.updateNodeAt(d, c, h, p, e) || a.updateNextNode(d, c, h, e, u, i) || a.addNode(d, c, h, e, i), i += d.nodeSize;
|
|
980
|
-
}), a.syncToMarks([], n, e, 0), this.node.isTextblock && a.addTextblockHacks(), a.destroyRest(), (a.changed || this.dirty == te) && (r && this.protectLocalComposition(e, r), Jt(this.contentDOM, this.children, e), ue && en(this.dom));
|
|
981
|
-
}
|
|
982
|
-
localCompositionInfo(e, o) {
|
|
983
|
-
let { from: n, to: i } = e.state.selection;
|
|
984
|
-
if (!(e.state.selection instanceof M) || n < o || i > o + this.node.content.size)
|
|
985
|
-
return null;
|
|
986
|
-
let s = e.input.compositionNode;
|
|
987
|
-
if (!s || !this.dom.contains(s.parentNode))
|
|
988
|
-
return null;
|
|
989
|
-
if (this.node.inlineContent) {
|
|
990
|
-
let r = s.nodeValue, l = tn(this.node.content, r, n - o, i - o);
|
|
991
|
-
return l < 0 ? null : { node: s, pos: l, text: r };
|
|
992
|
-
} else
|
|
993
|
-
return { node: s, pos: -1, text: "" };
|
|
994
|
-
}
|
|
995
|
-
protectLocalComposition(e, { node: o, pos: n, text: i }) {
|
|
996
|
-
if (this.getDesc(o))
|
|
997
|
-
return;
|
|
998
|
-
let s = o;
|
|
999
|
-
for (; s.parentNode != this.contentDOM; s = s.parentNode) {
|
|
1000
|
-
for (; s.previousSibling; )
|
|
1001
|
-
s.parentNode.removeChild(s.previousSibling);
|
|
1002
|
-
for (; s.nextSibling; )
|
|
1003
|
-
s.parentNode.removeChild(s.nextSibling);
|
|
1004
|
-
s.pmViewDesc && (s.pmViewDesc = void 0);
|
|
1005
|
-
}
|
|
1006
|
-
let r = new jo(this, s, o, i);
|
|
1007
|
-
e.input.compositionNodes.push(r), this.children = Ue(this.children, n, n + i.length, e, r);
|
|
1008
|
-
}
|
|
1009
|
-
// If this desc must be updated to match the given node decoration,
|
|
1010
|
-
// do so and return true.
|
|
1011
|
-
update(e, o, n, i) {
|
|
1012
|
-
return this.dirty == L || !e.sameMarkup(this.node) ? !1 : (this.updateInner(e, o, n, i), !0);
|
|
1013
|
-
}
|
|
1014
|
-
updateInner(e, o, n, i) {
|
|
1015
|
-
this.updateOuterDeco(o), this.node = e, this.innerDeco = n, this.contentDOM && this.updateChildren(i, this.posAtStart), this.dirty = R;
|
|
1016
|
-
}
|
|
1017
|
-
updateOuterDeco(e) {
|
|
1018
|
-
if (Me(e, this.outerDeco))
|
|
1019
|
-
return;
|
|
1020
|
-
let o = this.nodeDOM.nodeType != 1, n = this.dom;
|
|
1021
|
-
this.dom = _t(this.dom, this.nodeDOM, He(this.outerDeco, this.node, o), He(e, this.node, o)), this.dom != n && (n.pmViewDesc = void 0, this.dom.pmViewDesc = this), this.outerDeco = e;
|
|
1022
|
-
}
|
|
1023
|
-
// Mark this node as being the selected node.
|
|
1024
|
-
selectNode() {
|
|
1025
|
-
this.nodeDOM.nodeType == 1 && (this.nodeDOM.classList.add("ProseMirror-selectednode"), (this.contentDOM || !this.node.type.spec.draggable) && (this.nodeDOM.draggable = !0));
|
|
1026
|
-
}
|
|
1027
|
-
// Remove selected node marking from this node.
|
|
1028
|
-
deselectNode() {
|
|
1029
|
-
this.nodeDOM.nodeType == 1 && (this.nodeDOM.classList.remove("ProseMirror-selectednode"), (this.contentDOM || !this.node.type.spec.draggable) && this.nodeDOM.removeAttribute("draggable"));
|
|
1030
|
-
}
|
|
1031
|
-
get domAtom() {
|
|
1032
|
-
return this.node.isAtom;
|
|
1033
|
-
}
|
|
1034
|
-
}
|
|
1035
|
-
function ut(t, e, o, n, i) {
|
|
1036
|
-
Zt(n, e, t);
|
|
1037
|
-
let s = new J(void 0, t, e, o, n, n, n, i, 0);
|
|
1038
|
-
return s.contentDOM && s.updateChildren(i, 0), s;
|
|
1039
|
-
}
|
|
1040
|
-
class Ve extends J {
|
|
1041
|
-
constructor(e, o, n, i, s, r, l) {
|
|
1042
|
-
super(e, o, n, i, s, null, r, l, 0);
|
|
1043
|
-
}
|
|
1044
|
-
parseRule() {
|
|
1045
|
-
let e = this.nodeDOM.parentNode;
|
|
1046
|
-
for (; e && e != this.dom && !e.pmIsDeco; )
|
|
1047
|
-
e = e.parentNode;
|
|
1048
|
-
return { skip: e || !0 };
|
|
1049
|
-
}
|
|
1050
|
-
update(e, o, n, i) {
|
|
1051
|
-
return this.dirty == L || this.dirty != R && !this.inParent() || !e.sameMarkup(this.node) ? !1 : (this.updateOuterDeco(o), (this.dirty != R || e.text != this.node.text) && e.text != this.nodeDOM.nodeValue && (this.nodeDOM.nodeValue = e.text, i.trackWrites == this.nodeDOM && (i.trackWrites = null)), this.node = e, this.dirty = R, !0);
|
|
1052
|
-
}
|
|
1053
|
-
inParent() {
|
|
1054
|
-
let e = this.parent.contentDOM;
|
|
1055
|
-
for (let o = this.nodeDOM; o; o = o.parentNode)
|
|
1056
|
-
if (o == e)
|
|
1057
|
-
return !0;
|
|
1058
|
-
return !1;
|
|
1059
|
-
}
|
|
1060
|
-
domFromPos(e) {
|
|
1061
|
-
return { node: this.nodeDOM, offset: e };
|
|
1062
|
-
}
|
|
1063
|
-
localPosFromDOM(e, o, n) {
|
|
1064
|
-
return e == this.nodeDOM ? this.posAtStart + Math.min(o, this.node.text.length) : super.localPosFromDOM(e, o, n);
|
|
1065
|
-
}
|
|
1066
|
-
ignoreMutation(e) {
|
|
1067
|
-
return e.type != "characterData" && e.type != "selection";
|
|
1068
|
-
}
|
|
1069
|
-
slice(e, o, n) {
|
|
1070
|
-
let i = this.node.cut(e, o), s = document.createTextNode(i.text);
|
|
1071
|
-
return new Ve(this.parent, i, this.outerDeco, this.innerDeco, s, s, n);
|
|
1072
|
-
}
|
|
1073
|
-
markDirty(e, o) {
|
|
1074
|
-
super.markDirty(e, o), this.dom != this.nodeDOM && (e == 0 || o == this.nodeDOM.nodeValue.length) && (this.dirty = L);
|
|
1075
|
-
}
|
|
1076
|
-
get domAtom() {
|
|
1077
|
-
return !1;
|
|
1078
|
-
}
|
|
1079
|
-
isText(e) {
|
|
1080
|
-
return this.node.text == e;
|
|
1081
|
-
}
|
|
1082
|
-
}
|
|
1083
|
-
class Xt extends Oe {
|
|
1084
|
-
parseRule() {
|
|
1085
|
-
return { ignore: !0 };
|
|
1086
|
-
}
|
|
1087
|
-
matchesHack(e) {
|
|
1088
|
-
return this.dirty == R && this.dom.nodeName == e;
|
|
1089
|
-
}
|
|
1090
|
-
get domAtom() {
|
|
1091
|
-
return !0;
|
|
1092
|
-
}
|
|
1093
|
-
get ignoreForCoords() {
|
|
1094
|
-
return this.dom.nodeName == "IMG";
|
|
1095
|
-
}
|
|
1096
|
-
}
|
|
1097
|
-
class Yo extends J {
|
|
1098
|
-
constructor(e, o, n, i, s, r, l, a, d, c) {
|
|
1099
|
-
super(e, o, n, i, s, r, l, d, c), this.spec = a;
|
|
1100
|
-
}
|
|
1101
|
-
// A custom `update` method gets to decide whether the update goes
|
|
1102
|
-
// through. If it does, and there's a `contentDOM` node, our logic
|
|
1103
|
-
// updates the children.
|
|
1104
|
-
update(e, o, n, i) {
|
|
1105
|
-
if (this.dirty == L)
|
|
1106
|
-
return !1;
|
|
1107
|
-
if (this.spec.update && (this.node.type == e.type || this.spec.multiType)) {
|
|
1108
|
-
let s = this.spec.update(e, o, n);
|
|
1109
|
-
return s && this.updateInner(e, o, n, i), s;
|
|
1110
|
-
} else return !this.contentDOM && !e.isLeaf ? !1 : super.update(e, o, n, i);
|
|
1111
|
-
}
|
|
1112
|
-
selectNode() {
|
|
1113
|
-
this.spec.selectNode ? this.spec.selectNode() : super.selectNode();
|
|
1114
|
-
}
|
|
1115
|
-
deselectNode() {
|
|
1116
|
-
this.spec.deselectNode ? this.spec.deselectNode() : super.deselectNode();
|
|
1117
|
-
}
|
|
1118
|
-
setSelection(e, o, n, i) {
|
|
1119
|
-
this.spec.setSelection ? this.spec.setSelection(e, o, n.root) : super.setSelection(e, o, n, i);
|
|
1120
|
-
}
|
|
1121
|
-
destroy() {
|
|
1122
|
-
this.spec.destroy && this.spec.destroy(), super.destroy();
|
|
1123
|
-
}
|
|
1124
|
-
stopEvent(e) {
|
|
1125
|
-
return this.spec.stopEvent ? this.spec.stopEvent(e) : !1;
|
|
1126
|
-
}
|
|
1127
|
-
ignoreMutation(e) {
|
|
1128
|
-
return this.spec.ignoreMutation ? this.spec.ignoreMutation(e) : super.ignoreMutation(e);
|
|
1129
|
-
}
|
|
1130
|
-
}
|
|
1131
|
-
function Jt(t, e, o) {
|
|
1132
|
-
let n = t.firstChild, i = !1;
|
|
1133
|
-
for (let s = 0; s < e.length; s++) {
|
|
1134
|
-
let r = e[s], l = r.dom;
|
|
1135
|
-
if (l.parentNode == t) {
|
|
1136
|
-
for (; l != n; )
|
|
1137
|
-
n = pt(n), i = !0;
|
|
1138
|
-
n = n.nextSibling;
|
|
1139
|
-
} else
|
|
1140
|
-
i = !0, t.insertBefore(l, n);
|
|
1141
|
-
if (r instanceof le) {
|
|
1142
|
-
let a = n ? n.previousSibling : t.lastChild;
|
|
1143
|
-
Jt(r.contentDOM, r.children, o), n = a ? a.nextSibling : t.firstChild;
|
|
1144
|
-
}
|
|
1145
|
-
}
|
|
1146
|
-
for (; n; )
|
|
1147
|
-
n = pt(n), i = !0;
|
|
1148
|
-
i && o.trackWrites == t && (o.trackWrites = null);
|
|
1149
|
-
}
|
|
1150
|
-
const ge = function(t) {
|
|
1151
|
-
t && (this.nodeName = t);
|
|
1152
|
-
};
|
|
1153
|
-
ge.prototype = /* @__PURE__ */ Object.create(null);
|
|
1154
|
-
const oe = [new ge()];
|
|
1155
|
-
function He(t, e, o) {
|
|
1156
|
-
if (t.length == 0)
|
|
1157
|
-
return oe;
|
|
1158
|
-
let n = o ? oe[0] : new ge(), i = [n];
|
|
1159
|
-
for (let s = 0; s < t.length; s++) {
|
|
1160
|
-
let r = t[s].type.attrs;
|
|
1161
|
-
if (r) {
|
|
1162
|
-
r.nodeName && i.push(n = new ge(r.nodeName));
|
|
1163
|
-
for (let l in r) {
|
|
1164
|
-
let a = r[l];
|
|
1165
|
-
a != null && (o && i.length == 1 && i.push(n = new ge(e.isInline ? "span" : "div")), l == "class" ? n.class = (n.class ? n.class + " " : "") + a : l == "style" ? n.style = (n.style ? n.style + ";" : "") + a : l != "nodeName" && (n[l] = a));
|
|
1166
|
-
}
|
|
1167
|
-
}
|
|
1168
|
-
}
|
|
1169
|
-
return i;
|
|
1170
|
-
}
|
|
1171
|
-
function _t(t, e, o, n) {
|
|
1172
|
-
if (o == oe && n == oe)
|
|
1173
|
-
return e;
|
|
1174
|
-
let i = e;
|
|
1175
|
-
for (let s = 0; s < n.length; s++) {
|
|
1176
|
-
let r = n[s], l = o[s];
|
|
1177
|
-
if (s) {
|
|
1178
|
-
let a;
|
|
1179
|
-
l && l.nodeName == r.nodeName && i != t && (a = i.parentNode) && a.nodeName.toLowerCase() == r.nodeName || (a = document.createElement(r.nodeName), a.pmIsDeco = !0, a.appendChild(i), l = oe[0]), i = a;
|
|
1180
|
-
}
|
|
1181
|
-
Xo(i, l || oe[0], r);
|
|
1182
|
-
}
|
|
1183
|
-
return i;
|
|
1184
|
-
}
|
|
1185
|
-
function Xo(t, e, o) {
|
|
1186
|
-
for (let n in e)
|
|
1187
|
-
n != "class" && n != "style" && n != "nodeName" && !(n in o) && t.removeAttribute(n);
|
|
1188
|
-
for (let n in o)
|
|
1189
|
-
n != "class" && n != "style" && n != "nodeName" && o[n] != e[n] && t.setAttribute(n, o[n]);
|
|
1190
|
-
if (e.class != o.class) {
|
|
1191
|
-
let n = e.class ? e.class.split(" ").filter(Boolean) : [], i = o.class ? o.class.split(" ").filter(Boolean) : [];
|
|
1192
|
-
for (let s = 0; s < n.length; s++)
|
|
1193
|
-
i.indexOf(n[s]) == -1 && t.classList.remove(n[s]);
|
|
1194
|
-
for (let s = 0; s < i.length; s++)
|
|
1195
|
-
n.indexOf(i[s]) == -1 && t.classList.add(i[s]);
|
|
1196
|
-
t.classList.length == 0 && t.removeAttribute("class");
|
|
1197
|
-
}
|
|
1198
|
-
if (e.style != o.style) {
|
|
1199
|
-
if (e.style) {
|
|
1200
|
-
let n = /\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g, i;
|
|
1201
|
-
for (; i = n.exec(e.style); )
|
|
1202
|
-
t.style.removeProperty(i[1]);
|
|
1203
|
-
}
|
|
1204
|
-
o.style && (t.style.cssText += o.style);
|
|
1205
|
-
}
|
|
1206
|
-
}
|
|
1207
|
-
function Zt(t, e, o) {
|
|
1208
|
-
return _t(t, t, oe, He(e, o, t.nodeType != 1));
|
|
1209
|
-
}
|
|
1210
|
-
function Me(t, e) {
|
|
1211
|
-
if (t.length != e.length)
|
|
1212
|
-
return !1;
|
|
1213
|
-
for (let o = 0; o < t.length; o++)
|
|
1214
|
-
if (!t[o].type.eq(e[o].type))
|
|
1215
|
-
return !1;
|
|
1216
|
-
return !0;
|
|
1217
|
-
}
|
|
1218
|
-
function pt(t) {
|
|
1219
|
-
let e = t.nextSibling;
|
|
1220
|
-
return t.parentNode.removeChild(t), e;
|
|
1221
|
-
}
|
|
1222
|
-
class Jo {
|
|
1223
|
-
constructor(e, o, n) {
|
|
1224
|
-
this.lock = o, this.view = n, this.index = 0, this.stack = [], this.changed = !1, this.top = e, this.preMatch = _o(e.node.content, e);
|
|
1225
|
-
}
|
|
1226
|
-
// Destroy and remove the children between the given indices in
|
|
1227
|
-
// `this.top`.
|
|
1228
|
-
destroyBetween(e, o) {
|
|
1229
|
-
if (e != o) {
|
|
1230
|
-
for (let n = e; n < o; n++)
|
|
1231
|
-
this.top.children[n].destroy();
|
|
1232
|
-
this.top.children.splice(e, o - e), this.changed = !0;
|
|
1233
|
-
}
|
|
1234
|
-
}
|
|
1235
|
-
// Destroy all remaining children in `this.top`.
|
|
1236
|
-
destroyRest() {
|
|
1237
|
-
this.destroyBetween(this.index, this.top.children.length);
|
|
1238
|
-
}
|
|
1239
|
-
// Sync the current stack of mark descs with the given array of
|
|
1240
|
-
// marks, reusing existing mark descs when possible.
|
|
1241
|
-
syncToMarks(e, o, n, i) {
|
|
1242
|
-
let s = 0, r = this.stack.length >> 1, l = Math.min(r, e.length);
|
|
1243
|
-
for (; s < l && (s == r - 1 ? this.top : this.stack[s + 1 << 1]).matchesMark(e[s]) && e[s].type.spec.spanning !== !1; )
|
|
1244
|
-
s++;
|
|
1245
|
-
for (; s < r; )
|
|
1246
|
-
this.destroyRest(), this.top.dirty = R, this.index = this.stack.pop(), this.top = this.stack.pop(), r--;
|
|
1247
|
-
for (; r < e.length; ) {
|
|
1248
|
-
this.stack.push(this.top, this.index + 1);
|
|
1249
|
-
let a = -1, d = this.top.children.length;
|
|
1250
|
-
i < this.preMatch.index && (d = Math.min(this.index + 3, d));
|
|
1251
|
-
for (let c = this.index; c < d; c++) {
|
|
1252
|
-
let h = this.top.children[c];
|
|
1253
|
-
if (h.matchesMark(e[r]) && !this.isLocked(h.dom)) {
|
|
1254
|
-
a = c;
|
|
1255
|
-
break;
|
|
1256
|
-
}
|
|
1257
|
-
}
|
|
1258
|
-
if (a > -1)
|
|
1259
|
-
a > this.index && (this.changed = !0, this.destroyBetween(this.index, a)), this.top = this.top.children[this.index];
|
|
1260
|
-
else {
|
|
1261
|
-
let c = le.create(this.top, e[r], o, n);
|
|
1262
|
-
this.top.children.splice(this.index, 0, c), this.top = c, this.changed = !0;
|
|
1263
|
-
}
|
|
1264
|
-
this.index = 0, r++;
|
|
1265
|
-
}
|
|
1266
|
-
}
|
|
1267
|
-
// Try to find a node desc matching the given data. Skip over it and
|
|
1268
|
-
// return true when successful.
|
|
1269
|
-
findNodeMatch(e, o, n, i) {
|
|
1270
|
-
let s = -1, r;
|
|
1271
|
-
if (i >= this.preMatch.index && (r = this.preMatch.matches[i - this.preMatch.index]).parent == this.top && r.matchesNode(e, o, n))
|
|
1272
|
-
s = this.top.children.indexOf(r, this.index);
|
|
1273
|
-
else
|
|
1274
|
-
for (let l = this.index, a = Math.min(this.top.children.length, l + 5); l < a; l++) {
|
|
1275
|
-
let d = this.top.children[l];
|
|
1276
|
-
if (d.matchesNode(e, o, n) && !this.preMatch.matched.has(d)) {
|
|
1277
|
-
s = l;
|
|
1278
|
-
break;
|
|
1279
|
-
}
|
|
1280
|
-
}
|
|
1281
|
-
return s < 0 ? !1 : (this.destroyBetween(this.index, s), this.index++, !0);
|
|
1282
|
-
}
|
|
1283
|
-
updateNodeAt(e, o, n, i, s) {
|
|
1284
|
-
let r = this.top.children[i];
|
|
1285
|
-
return r.dirty == L && r.dom == r.contentDOM && (r.dirty = te), r.update(e, o, n, s) ? (this.destroyBetween(this.index, i), this.index++, !0) : !1;
|
|
1286
|
-
}
|
|
1287
|
-
findIndexWithChild(e) {
|
|
1288
|
-
for (; ; ) {
|
|
1289
|
-
let o = e.parentNode;
|
|
1290
|
-
if (!o)
|
|
1291
|
-
return -1;
|
|
1292
|
-
if (o == this.top.contentDOM) {
|
|
1293
|
-
let n = e.pmViewDesc;
|
|
1294
|
-
if (n) {
|
|
1295
|
-
for (let i = this.index; i < this.top.children.length; i++)
|
|
1296
|
-
if (this.top.children[i] == n)
|
|
1297
|
-
return i;
|
|
1298
|
-
}
|
|
1299
|
-
return -1;
|
|
1300
|
-
}
|
|
1301
|
-
e = o;
|
|
1302
|
-
}
|
|
1303
|
-
}
|
|
1304
|
-
// Try to update the next node, if any, to the given data. Checks
|
|
1305
|
-
// pre-matches to avoid overwriting nodes that could still be used.
|
|
1306
|
-
updateNextNode(e, o, n, i, s, r) {
|
|
1307
|
-
for (let l = this.index; l < this.top.children.length; l++) {
|
|
1308
|
-
let a = this.top.children[l];
|
|
1309
|
-
if (a instanceof J) {
|
|
1310
|
-
let d = this.preMatch.matched.get(a);
|
|
1311
|
-
if (d != null && d != s)
|
|
1312
|
-
return !1;
|
|
1313
|
-
let c = a.dom, h, u = this.isLocked(c) && !(e.isText && a.node && a.node.isText && a.nodeDOM.nodeValue == e.text && a.dirty != L && Me(o, a.outerDeco));
|
|
1314
|
-
if (!u && a.update(e, o, n, i))
|
|
1315
|
-
return this.destroyBetween(this.index, l), a.dom != c && (this.changed = !0), this.index++, !0;
|
|
1316
|
-
if (!u && (h = this.recreateWrapper(a, e, o, n, i, r)))
|
|
1317
|
-
return this.destroyBetween(this.index, l), this.top.children[this.index] = h, h.contentDOM && (h.dirty = te, h.updateChildren(i, r + 1), h.dirty = R), this.changed = !0, this.index++, !0;
|
|
1318
|
-
break;
|
|
1319
|
-
}
|
|
1320
|
-
}
|
|
1321
|
-
return !1;
|
|
1322
|
-
}
|
|
1323
|
-
// When a node with content is replaced by a different node with
|
|
1324
|
-
// identical content, move over its children.
|
|
1325
|
-
recreateWrapper(e, o, n, i, s, r) {
|
|
1326
|
-
if (e.dirty || o.isAtom || !e.children.length || !e.node.content.eq(o.content) || !Me(n, e.outerDeco) || !i.eq(e.innerDeco))
|
|
1327
|
-
return null;
|
|
1328
|
-
let l = J.create(this.top, o, n, i, s, r);
|
|
1329
|
-
if (l.contentDOM) {
|
|
1330
|
-
l.children = e.children, e.children = [];
|
|
1331
|
-
for (let a of l.children)
|
|
1332
|
-
a.parent = l;
|
|
1333
|
-
}
|
|
1334
|
-
return e.destroy(), l;
|
|
1335
|
-
}
|
|
1336
|
-
// Insert the node as a newly created node desc.
|
|
1337
|
-
addNode(e, o, n, i, s) {
|
|
1338
|
-
let r = J.create(this.top, e, o, n, i, s);
|
|
1339
|
-
r.contentDOM && r.updateChildren(i, s + 1), this.top.children.splice(this.index++, 0, r), this.changed = !0;
|
|
1340
|
-
}
|
|
1341
|
-
placeWidget(e, o, n) {
|
|
1342
|
-
let i = this.index < this.top.children.length ? this.top.children[this.index] : null;
|
|
1343
|
-
if (i && i.matchesWidget(e) && (e == i.widget || !i.widget.type.toDOM.parentNode))
|
|
1344
|
-
this.index++;
|
|
1345
|
-
else {
|
|
1346
|
-
let s = new Yt(this.top, e, o, n);
|
|
1347
|
-
this.top.children.splice(this.index++, 0, s), this.changed = !0;
|
|
1348
|
-
}
|
|
1349
|
-
}
|
|
1350
|
-
// Make sure a textblock looks and behaves correctly in
|
|
1351
|
-
// contentEditable.
|
|
1352
|
-
addTextblockHacks() {
|
|
1353
|
-
let e = this.top.children[this.index - 1], o = this.top;
|
|
1354
|
-
for (; e instanceof le; )
|
|
1355
|
-
o = e, e = o.children[o.children.length - 1];
|
|
1356
|
-
(!e || // Empty textblock
|
|
1357
|
-
!(e instanceof Ve) || /\n$/.test(e.node.text) || this.view.requiresGeckoHackNode && /\s$/.test(e.node.text)) && ((C || S) && e && e.dom.contentEditable == "false" && this.addHackNode("IMG", o), this.addHackNode("BR", this.top));
|
|
1358
|
-
}
|
|
1359
|
-
addHackNode(e, o) {
|
|
1360
|
-
if (o == this.top && this.index < o.children.length && o.children[this.index].matchesHack(e))
|
|
1361
|
-
this.index++;
|
|
1362
|
-
else {
|
|
1363
|
-
let n = document.createElement(e);
|
|
1364
|
-
e == "IMG" && (n.className = "ProseMirror-separator", n.alt = ""), e == "BR" && (n.className = "ProseMirror-trailingBreak");
|
|
1365
|
-
let i = new Xt(this.top, [], n, null);
|
|
1366
|
-
o != this.top ? o.children.push(i) : o.children.splice(this.index++, 0, i), this.changed = !0;
|
|
1367
|
-
}
|
|
1368
|
-
}
|
|
1369
|
-
isLocked(e) {
|
|
1370
|
-
return this.lock && (e == this.lock || e.nodeType == 1 && e.contains(this.lock.parentNode));
|
|
1371
|
-
}
|
|
1372
|
-
}
|
|
1373
|
-
function _o(t, e) {
|
|
1374
|
-
let o = e, n = o.children.length, i = t.childCount, s = /* @__PURE__ */ new Map(), r = [];
|
|
1375
|
-
e: for (; i > 0; ) {
|
|
1376
|
-
let l;
|
|
1377
|
-
for (; ; )
|
|
1378
|
-
if (n) {
|
|
1379
|
-
let d = o.children[n - 1];
|
|
1380
|
-
if (d instanceof le)
|
|
1381
|
-
o = d, n = d.children.length;
|
|
1382
|
-
else {
|
|
1383
|
-
l = d, n--;
|
|
1384
|
-
break;
|
|
1385
|
-
}
|
|
1386
|
-
} else {
|
|
1387
|
-
if (o == e)
|
|
1388
|
-
break e;
|
|
1389
|
-
n = o.parent.children.indexOf(o), o = o.parent;
|
|
1390
|
-
}
|
|
1391
|
-
let a = l.node;
|
|
1392
|
-
if (a) {
|
|
1393
|
-
if (a != t.child(i - 1))
|
|
1394
|
-
break;
|
|
1395
|
-
--i, s.set(l, i), r.push(l);
|
|
1396
|
-
}
|
|
1397
|
-
}
|
|
1398
|
-
return { index: i, matched: s, matches: r.reverse() };
|
|
1399
|
-
}
|
|
1400
|
-
function Zo(t, e) {
|
|
1401
|
-
return t.type.side - e.type.side;
|
|
1402
|
-
}
|
|
1403
|
-
function Qo(t, e, o, n) {
|
|
1404
|
-
let i = e.locals(t), s = 0;
|
|
1405
|
-
if (i.length == 0) {
|
|
1406
|
-
for (let d = 0; d < t.childCount; d++) {
|
|
1407
|
-
let c = t.child(d);
|
|
1408
|
-
n(c, i, e.forChild(s, c), d), s += c.nodeSize;
|
|
1409
|
-
}
|
|
1410
|
-
return;
|
|
1411
|
-
}
|
|
1412
|
-
let r = 0, l = [], a = null;
|
|
1413
|
-
for (let d = 0; ; ) {
|
|
1414
|
-
let c, h;
|
|
1415
|
-
for (; r < i.length && i[r].to == s; ) {
|
|
1416
|
-
let m = i[r++];
|
|
1417
|
-
m.widget && (c ? (h || (h = [c])).push(m) : c = m);
|
|
1418
|
-
}
|
|
1419
|
-
if (c)
|
|
1420
|
-
if (h) {
|
|
1421
|
-
h.sort(Zo);
|
|
1422
|
-
for (let m = 0; m < h.length; m++)
|
|
1423
|
-
o(h[m], d, !!a);
|
|
1424
|
-
} else
|
|
1425
|
-
o(c, d, !!a);
|
|
1426
|
-
let u, p;
|
|
1427
|
-
if (a)
|
|
1428
|
-
p = -1, u = a, a = null;
|
|
1429
|
-
else if (d < t.childCount)
|
|
1430
|
-
p = d, u = t.child(d++);
|
|
1431
|
-
else
|
|
1432
|
-
break;
|
|
1433
|
-
for (let m = 0; m < l.length; m++)
|
|
1434
|
-
l[m].to <= s && l.splice(m--, 1);
|
|
1435
|
-
for (; r < i.length && i[r].from <= s && i[r].to > s; )
|
|
1436
|
-
l.push(i[r++]);
|
|
1437
|
-
let f = s + u.nodeSize;
|
|
1438
|
-
if (u.isText) {
|
|
1439
|
-
let m = f;
|
|
1440
|
-
r < i.length && i[r].from < m && (m = i[r].from);
|
|
1441
|
-
for (let y = 0; y < l.length; y++)
|
|
1442
|
-
l[y].to < m && (m = l[y].to);
|
|
1443
|
-
m < f && (a = u.cut(m - s), u = u.cut(0, m - s), f = m, p = -1);
|
|
1444
|
-
} else
|
|
1445
|
-
for (; r < i.length && i[r].to < f; )
|
|
1446
|
-
r++;
|
|
1447
|
-
let g = u.isInline && !u.isLeaf ? l.filter((m) => !m.inline) : l.slice();
|
|
1448
|
-
n(u, g, e.forChild(s, u), p), s = f;
|
|
1449
|
-
}
|
|
1450
|
-
}
|
|
1451
|
-
function en(t) {
|
|
1452
|
-
if (t.nodeName == "UL" || t.nodeName == "OL") {
|
|
1453
|
-
let e = t.style.cssText;
|
|
1454
|
-
t.style.cssText = e + "; list-style: square !important", window.getComputedStyle(t).listStyle, t.style.cssText = e;
|
|
1455
|
-
}
|
|
1456
|
-
}
|
|
1457
|
-
function tn(t, e, o, n) {
|
|
1458
|
-
for (let i = 0, s = 0; i < t.childCount && s <= n; ) {
|
|
1459
|
-
let r = t.child(i++), l = s;
|
|
1460
|
-
if (s += r.nodeSize, !r.isText)
|
|
1461
|
-
continue;
|
|
1462
|
-
let a = r.text;
|
|
1463
|
-
for (; i < t.childCount; ) {
|
|
1464
|
-
let d = t.child(i++);
|
|
1465
|
-
if (s += d.nodeSize, !d.isText)
|
|
1466
|
-
break;
|
|
1467
|
-
a += d.text;
|
|
1468
|
-
}
|
|
1469
|
-
if (s >= o) {
|
|
1470
|
-
if (s >= n && a.slice(n - e.length - l, n - l) == e)
|
|
1471
|
-
return n - e.length;
|
|
1472
|
-
let d = l < n ? a.lastIndexOf(e, n - l - 1) : -1;
|
|
1473
|
-
if (d >= 0 && d + e.length + l >= o)
|
|
1474
|
-
return l + d;
|
|
1475
|
-
if (o == n && a.length >= n + e.length - l && a.slice(n - l, n - l + e.length) == e)
|
|
1476
|
-
return n;
|
|
1477
|
-
}
|
|
1478
|
-
}
|
|
1479
|
-
return -1;
|
|
1480
|
-
}
|
|
1481
|
-
function Ue(t, e, o, n, i) {
|
|
1482
|
-
let s = [];
|
|
1483
|
-
for (let r = 0, l = 0; r < t.length; r++) {
|
|
1484
|
-
let a = t[r], d = l, c = l += a.size;
|
|
1485
|
-
d >= o || c <= e ? s.push(a) : (d < e && s.push(a.slice(0, e - d, n)), i && (s.push(i), i = void 0), c > o && s.push(a.slice(o - d, a.size, n)));
|
|
1486
|
-
}
|
|
1487
|
-
return s;
|
|
1488
|
-
}
|
|
1489
|
-
function _e(t, e = null) {
|
|
1490
|
-
let o = t.domSelectionRange(), n = t.state.doc;
|
|
1491
|
-
if (!o.focusNode)
|
|
1492
|
-
return null;
|
|
1493
|
-
let i = t.docView.nearestDesc(o.focusNode), s = i && i.size == 0, r = t.docView.posFromDOM(o.focusNode, o.focusOffset, 1);
|
|
1494
|
-
if (r < 0)
|
|
1495
|
-
return null;
|
|
1496
|
-
let l = n.resolve(r), a, d;
|
|
1497
|
-
if (Ae(o)) {
|
|
1498
|
-
for (a = r; i && !i.node; )
|
|
1499
|
-
i = i.parent;
|
|
1500
|
-
let h = i.node;
|
|
1501
|
-
if (i && h.isAtom && w.isSelectable(h) && i.parent && !(h.isInline && To(o.focusNode, o.focusOffset, i.dom))) {
|
|
1502
|
-
let u = i.posBefore;
|
|
1503
|
-
d = new w(r == u ? l : n.resolve(u));
|
|
1504
|
-
}
|
|
1505
|
-
} else {
|
|
1506
|
-
if (o instanceof t.dom.ownerDocument.defaultView.Selection && o.rangeCount > 1) {
|
|
1507
|
-
let h = r, u = r;
|
|
1508
|
-
for (let p = 0; p < o.rangeCount; p++) {
|
|
1509
|
-
let f = o.getRangeAt(p);
|
|
1510
|
-
h = Math.min(h, t.docView.posFromDOM(f.startContainer, f.startOffset, 1)), u = Math.max(u, t.docView.posFromDOM(f.endContainer, f.endOffset, -1));
|
|
1511
|
-
}
|
|
1512
|
-
if (h < 0)
|
|
1513
|
-
return null;
|
|
1514
|
-
[a, r] = u == t.state.selection.anchor ? [u, h] : [h, u], l = n.resolve(r);
|
|
1515
|
-
} else
|
|
1516
|
-
a = t.docView.posFromDOM(o.anchorNode, o.anchorOffset, 1);
|
|
1517
|
-
if (a < 0)
|
|
1518
|
-
return null;
|
|
1519
|
-
}
|
|
1520
|
-
let c = n.resolve(a);
|
|
1521
|
-
if (!d) {
|
|
1522
|
-
let h = e == "pointer" || t.state.selection.head < l.pos && !s ? 1 : -1;
|
|
1523
|
-
d = Ze(t, c, l, h);
|
|
1524
|
-
}
|
|
1525
|
-
return d;
|
|
1526
|
-
}
|
|
1527
|
-
function Qt(t) {
|
|
1528
|
-
return t.editable ? t.hasFocus() : to(t) && document.activeElement && document.activeElement.contains(t.dom);
|
|
1529
|
-
}
|
|
1530
|
-
function W(t, e = !1) {
|
|
1531
|
-
let o = t.state.selection;
|
|
1532
|
-
if (eo(t, o), !!Qt(t)) {
|
|
1533
|
-
if (!e && t.input.mouseDown && t.input.mouseDown.allowDefault && S) {
|
|
1534
|
-
let n = t.domSelectionRange(), i = t.domObserver.currentSelection;
|
|
1535
|
-
if (n.anchorNode && i.anchorNode && re(n.anchorNode, n.anchorOffset, i.anchorNode, i.anchorOffset)) {
|
|
1536
|
-
t.input.mouseDown.delayedSelectionSync = !0, t.domObserver.setCurSelection();
|
|
1537
|
-
return;
|
|
1538
|
-
}
|
|
1539
|
-
}
|
|
1540
|
-
if (t.domObserver.disconnectSelection(), t.cursorWrapper)
|
|
1541
|
-
nn(t);
|
|
1542
|
-
else {
|
|
1543
|
-
let { anchor: n, head: i } = o, s, r;
|
|
1544
|
-
mt && !(o instanceof M) && (o.$from.parent.inlineContent || (s = gt(t, o.from)), !o.empty && !o.$from.parent.inlineContent && (r = gt(t, o.to))), t.docView.setSelection(n, i, t, e), mt && (s && yt(s), r && yt(r)), o.visible ? t.dom.classList.remove("ProseMirror-hideselection") : (t.dom.classList.add("ProseMirror-hideselection"), "onselectionchange" in document && on(t));
|
|
1545
|
-
}
|
|
1546
|
-
t.domObserver.setCurSelection(), t.domObserver.connectSelection();
|
|
1547
|
-
}
|
|
1548
|
-
}
|
|
1549
|
-
const mt = C || S && $t < 63;
|
|
1550
|
-
function gt(t, e) {
|
|
1551
|
-
let { node: o, offset: n } = t.docView.domFromPos(e, 0), i = n < o.childNodes.length ? o.childNodes[n] : null, s = n ? o.childNodes[n - 1] : null;
|
|
1552
|
-
if (C && i && i.contentEditable == "false")
|
|
1553
|
-
return ze(i);
|
|
1554
|
-
if ((!i || i.contentEditable == "false") && (!s || s.contentEditable == "false")) {
|
|
1555
|
-
if (i)
|
|
1556
|
-
return ze(i);
|
|
1557
|
-
if (s)
|
|
1558
|
-
return ze(s);
|
|
1559
|
-
}
|
|
1560
|
-
}
|
|
1561
|
-
function ze(t) {
|
|
1562
|
-
return t.contentEditable = "true", C && t.draggable && (t.draggable = !1, t.wasDraggable = !0), t;
|
|
1563
|
-
}
|
|
1564
|
-
function yt(t) {
|
|
1565
|
-
t.contentEditable = "false", t.wasDraggable && (t.draggable = !0, t.wasDraggable = null);
|
|
1566
|
-
}
|
|
1567
|
-
function on(t) {
|
|
1568
|
-
let e = t.dom.ownerDocument;
|
|
1569
|
-
e.removeEventListener("selectionchange", t.input.hideSelectionGuard);
|
|
1570
|
-
let o = t.domSelectionRange(), n = o.anchorNode, i = o.anchorOffset;
|
|
1571
|
-
e.addEventListener("selectionchange", t.input.hideSelectionGuard = () => {
|
|
1572
|
-
(o.anchorNode != n || o.anchorOffset != i) && (e.removeEventListener("selectionchange", t.input.hideSelectionGuard), setTimeout(() => {
|
|
1573
|
-
(!Qt(t) || t.state.selection.visible) && t.dom.classList.remove("ProseMirror-hideselection");
|
|
1574
|
-
}, 20));
|
|
1575
|
-
});
|
|
1576
|
-
}
|
|
1577
|
-
function nn(t) {
|
|
1578
|
-
let e = t.domSelection();
|
|
1579
|
-
if (!e)
|
|
1580
|
-
return;
|
|
1581
|
-
let o = t.cursorWrapper.dom, n = o.nodeName == "IMG";
|
|
1582
|
-
n ? e.collapse(o.parentNode, N(o) + 1) : e.collapse(o, 0), !n && !t.state.selection.visible && E && X <= 11 && (o.disabled = !0, o.disabled = !1);
|
|
1583
|
-
}
|
|
1584
|
-
function eo(t, e) {
|
|
1585
|
-
if (e instanceof w) {
|
|
1586
|
-
let o = t.docView.descAt(e.from);
|
|
1587
|
-
o != t.lastSelectedViewDesc && (bt(t), o && o.selectNode(), t.lastSelectedViewDesc = o);
|
|
1588
|
-
} else
|
|
1589
|
-
bt(t);
|
|
1590
|
-
}
|
|
1591
|
-
function bt(t) {
|
|
1592
|
-
t.lastSelectedViewDesc && (t.lastSelectedViewDesc.parent && t.lastSelectedViewDesc.deselectNode(), t.lastSelectedViewDesc = void 0);
|
|
1593
|
-
}
|
|
1594
|
-
function Ze(t, e, o, n) {
|
|
1595
|
-
return t.someProp("createSelectionBetween", (i) => i(t, e, o)) || M.between(e, o, n);
|
|
1596
|
-
}
|
|
1597
|
-
function wt(t) {
|
|
1598
|
-
return t.editable && !t.hasFocus() ? !1 : to(t);
|
|
1599
|
-
}
|
|
1600
|
-
function to(t) {
|
|
1601
|
-
let e = t.domSelectionRange();
|
|
1602
|
-
if (!e.anchorNode)
|
|
1603
|
-
return !1;
|
|
1604
|
-
try {
|
|
1605
|
-
return t.dom.contains(e.anchorNode.nodeType == 3 ? e.anchorNode.parentNode : e.anchorNode) && (t.editable || t.dom.contains(e.focusNode.nodeType == 3 ? e.focusNode.parentNode : e.focusNode));
|
|
1606
|
-
} catch {
|
|
1607
|
-
return !1;
|
|
1608
|
-
}
|
|
1609
|
-
}
|
|
1610
|
-
function sn(t) {
|
|
1611
|
-
let e = t.docView.domFromPos(t.state.selection.anchor, 0), o = t.domSelectionRange();
|
|
1612
|
-
return re(e.node, e.offset, o.anchorNode, o.anchorOffset);
|
|
1613
|
-
}
|
|
1614
|
-
function Ge(t, e) {
|
|
1615
|
-
let { $anchor: o, $head: n } = t.selection, i = e > 0 ? o.max(n) : o.min(n), s = i.parent.inlineContent ? i.depth ? t.doc.resolve(e > 0 ? i.after() : i.before()) : null : i;
|
|
1616
|
-
return s && be.findFrom(s, e);
|
|
1617
|
-
}
|
|
1618
|
-
function G(t, e) {
|
|
1619
|
-
return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()), !0;
|
|
1620
|
-
}
|
|
1621
|
-
function vt(t, e, o) {
|
|
1622
|
-
let n = t.state.selection;
|
|
1623
|
-
if (n instanceof M)
|
|
1624
|
-
if (o.indexOf("s") > -1) {
|
|
1625
|
-
let { $head: i } = n, s = i.textOffset ? null : e < 0 ? i.nodeBefore : i.nodeAfter;
|
|
1626
|
-
if (!s || s.isText || !s.isLeaf)
|
|
1627
|
-
return !1;
|
|
1628
|
-
let r = t.state.doc.resolve(i.pos + s.nodeSize * (e < 0 ? -1 : 1));
|
|
1629
|
-
return G(t, new M(n.$anchor, r));
|
|
1630
|
-
} else if (n.empty) {
|
|
1631
|
-
if (t.endOfTextblock(e > 0 ? "forward" : "backward")) {
|
|
1632
|
-
let i = Ge(t.state, e);
|
|
1633
|
-
return i && i instanceof w ? G(t, i) : !1;
|
|
1634
|
-
} else if (!(P && o.indexOf("m") > -1)) {
|
|
1635
|
-
let i = n.$head, s = i.textOffset ? null : e < 0 ? i.nodeBefore : i.nodeAfter, r;
|
|
1636
|
-
if (!s || s.isText)
|
|
1637
|
-
return !1;
|
|
1638
|
-
let l = e < 0 ? i.pos - s.nodeSize : i.pos;
|
|
1639
|
-
return s.isAtom || (r = t.docView.descAt(l)) && !r.contentDOM ? w.isSelectable(s) ? G(t, new w(e < 0 ? t.state.doc.resolve(i.pos - s.nodeSize) : i)) : Se ? G(t, new M(t.state.doc.resolve(e < 0 ? l : l + s.nodeSize))) : !1 : !1;
|
|
1640
|
-
}
|
|
1641
|
-
} else return !1;
|
|
1642
|
-
else {
|
|
1643
|
-
if (n instanceof w && n.node.isInline)
|
|
1644
|
-
return G(t, new M(e > 0 ? n.$to : n.$from));
|
|
1645
|
-
{
|
|
1646
|
-
let i = Ge(t.state, e);
|
|
1647
|
-
return i ? G(t, i) : !1;
|
|
1648
|
-
}
|
|
1649
|
-
}
|
|
1650
|
-
}
|
|
1651
|
-
function xe(t) {
|
|
1652
|
-
return t.nodeType == 3 ? t.nodeValue.length : t.childNodes.length;
|
|
1653
|
-
}
|
|
1654
|
-
function ye(t, e) {
|
|
1655
|
-
let o = t.pmViewDesc;
|
|
1656
|
-
return o && o.size == 0 && (e < 0 || t.nextSibling || t.nodeName != "BR");
|
|
1657
|
-
}
|
|
1658
|
-
function de(t, e) {
|
|
1659
|
-
return e < 0 ? rn(t) : ln(t);
|
|
1660
|
-
}
|
|
1661
|
-
function rn(t) {
|
|
1662
|
-
let e = t.domSelectionRange(), o = e.focusNode, n = e.focusOffset;
|
|
1663
|
-
if (!o)
|
|
1664
|
-
return;
|
|
1665
|
-
let i, s, r = !1;
|
|
1666
|
-
for (V && o.nodeType == 1 && n < xe(o) && ye(o.childNodes[n], -1) && (r = !0); ; )
|
|
1667
|
-
if (n > 0) {
|
|
1668
|
-
if (o.nodeType != 1)
|
|
1669
|
-
break;
|
|
1670
|
-
{
|
|
1671
|
-
let l = o.childNodes[n - 1];
|
|
1672
|
-
if (ye(l, -1))
|
|
1673
|
-
i = o, s = --n;
|
|
1674
|
-
else if (l.nodeType == 3)
|
|
1675
|
-
o = l, n = o.nodeValue.length;
|
|
1676
|
-
else
|
|
1677
|
-
break;
|
|
1678
|
-
}
|
|
1679
|
-
} else {
|
|
1680
|
-
if (oo(o))
|
|
1681
|
-
break;
|
|
1682
|
-
{
|
|
1683
|
-
let l = o.previousSibling;
|
|
1684
|
-
for (; l && ye(l, -1); )
|
|
1685
|
-
i = o.parentNode, s = N(l), l = l.previousSibling;
|
|
1686
|
-
if (l)
|
|
1687
|
-
o = l, n = xe(o);
|
|
1688
|
-
else {
|
|
1689
|
-
if (o = o.parentNode, o == t.dom)
|
|
1690
|
-
break;
|
|
1691
|
-
n = 0;
|
|
1692
|
-
}
|
|
1693
|
-
}
|
|
1694
|
-
}
|
|
1695
|
-
r ? je(t, o, n) : i && je(t, i, s);
|
|
1696
|
-
}
|
|
1697
|
-
function ln(t) {
|
|
1698
|
-
let e = t.domSelectionRange(), o = e.focusNode, n = e.focusOffset;
|
|
1699
|
-
if (!o)
|
|
1700
|
-
return;
|
|
1701
|
-
let i = xe(o), s, r;
|
|
1702
|
-
for (; ; )
|
|
1703
|
-
if (n < i) {
|
|
1704
|
-
if (o.nodeType != 1)
|
|
1705
|
-
break;
|
|
1706
|
-
let l = o.childNodes[n];
|
|
1707
|
-
if (ye(l, 1))
|
|
1708
|
-
s = o, r = ++n;
|
|
1709
|
-
else
|
|
1710
|
-
break;
|
|
1711
|
-
} else {
|
|
1712
|
-
if (oo(o))
|
|
1713
|
-
break;
|
|
1714
|
-
{
|
|
1715
|
-
let l = o.nextSibling;
|
|
1716
|
-
for (; l && ye(l, 1); )
|
|
1717
|
-
s = l.parentNode, r = N(l) + 1, l = l.nextSibling;
|
|
1718
|
-
if (l)
|
|
1719
|
-
o = l, n = 0, i = xe(o);
|
|
1720
|
-
else {
|
|
1721
|
-
if (o = o.parentNode, o == t.dom)
|
|
1722
|
-
break;
|
|
1723
|
-
n = i = 0;
|
|
1724
|
-
}
|
|
1725
|
-
}
|
|
1726
|
-
}
|
|
1727
|
-
s && je(t, s, r);
|
|
1728
|
-
}
|
|
1729
|
-
function oo(t) {
|
|
1730
|
-
let e = t.pmViewDesc;
|
|
1731
|
-
return e && e.node && e.node.isBlock;
|
|
1732
|
-
}
|
|
1733
|
-
function an(t, e) {
|
|
1734
|
-
for (; t && e == t.childNodes.length && !Ne(t); )
|
|
1735
|
-
e = N(t) + 1, t = t.parentNode;
|
|
1736
|
-
for (; t && e < t.childNodes.length; ) {
|
|
1737
|
-
let o = t.childNodes[e];
|
|
1738
|
-
if (o.nodeType == 3)
|
|
1739
|
-
return o;
|
|
1740
|
-
if (o.nodeType == 1 && o.contentEditable == "false")
|
|
1741
|
-
break;
|
|
1742
|
-
t = o, e = 0;
|
|
1743
|
-
}
|
|
1744
|
-
}
|
|
1745
|
-
function dn(t, e) {
|
|
1746
|
-
for (; t && !e && !Ne(t); )
|
|
1747
|
-
e = N(t), t = t.parentNode;
|
|
1748
|
-
for (; t && e; ) {
|
|
1749
|
-
let o = t.childNodes[e - 1];
|
|
1750
|
-
if (o.nodeType == 3)
|
|
1751
|
-
return o;
|
|
1752
|
-
if (o.nodeType == 1 && o.contentEditable == "false")
|
|
1753
|
-
break;
|
|
1754
|
-
t = o, e = t.childNodes.length;
|
|
1755
|
-
}
|
|
1756
|
-
}
|
|
1757
|
-
function je(t, e, o) {
|
|
1758
|
-
if (e.nodeType != 3) {
|
|
1759
|
-
let s, r;
|
|
1760
|
-
(r = an(e, o)) ? (e = r, o = 0) : (s = dn(e, o)) && (e = s, o = s.nodeValue.length);
|
|
1761
|
-
}
|
|
1762
|
-
let n = t.domSelection();
|
|
1763
|
-
if (!n)
|
|
1764
|
-
return;
|
|
1765
|
-
if (Ae(n)) {
|
|
1766
|
-
let s = document.createRange();
|
|
1767
|
-
s.setEnd(e, o), s.setStart(e, o), n.removeAllRanges(), n.addRange(s);
|
|
1768
|
-
} else n.extend && n.extend(e, o);
|
|
1769
|
-
t.domObserver.setCurSelection();
|
|
1770
|
-
let { state: i } = t;
|
|
1771
|
-
setTimeout(() => {
|
|
1772
|
-
t.state == i && W(t);
|
|
1773
|
-
}, 50);
|
|
1774
|
-
}
|
|
1775
|
-
function Dt(t, e) {
|
|
1776
|
-
let o = t.state.doc.resolve(e);
|
|
1777
|
-
if (!(S || qt) && o.parent.inlineContent) {
|
|
1778
|
-
let n = t.coordsAtPos(e);
|
|
1779
|
-
if (e > o.start()) {
|
|
1780
|
-
let i = t.coordsAtPos(e - 1), s = (i.top + i.bottom) / 2;
|
|
1781
|
-
if (s > n.top && s < n.bottom && Math.abs(i.left - n.left) > 1)
|
|
1782
|
-
return i.left < n.left ? "ltr" : "rtl";
|
|
1783
|
-
}
|
|
1784
|
-
if (e < o.end()) {
|
|
1785
|
-
let i = t.coordsAtPos(e + 1), s = (i.top + i.bottom) / 2;
|
|
1786
|
-
if (s > n.top && s < n.bottom && Math.abs(i.left - n.left) > 1)
|
|
1787
|
-
return i.left > n.left ? "ltr" : "rtl";
|
|
1788
|
-
}
|
|
1789
|
-
}
|
|
1790
|
-
return getComputedStyle(t.dom).direction == "rtl" ? "rtl" : "ltr";
|
|
1791
|
-
}
|
|
1792
|
-
function Nt(t, e, o) {
|
|
1793
|
-
let n = t.state.selection;
|
|
1794
|
-
if (n instanceof M && !n.empty || o.indexOf("s") > -1 || P && o.indexOf("m") > -1)
|
|
1795
|
-
return !1;
|
|
1796
|
-
let { $from: i, $to: s } = n;
|
|
1797
|
-
if (!i.parent.inlineContent || t.endOfTextblock(e < 0 ? "up" : "down")) {
|
|
1798
|
-
let r = Ge(t.state, e);
|
|
1799
|
-
if (r && r instanceof w)
|
|
1800
|
-
return G(t, r);
|
|
1801
|
-
}
|
|
1802
|
-
if (!i.parent.inlineContent) {
|
|
1803
|
-
let r = e < 0 ? i : s, l = n instanceof Do ? be.near(r, e) : be.findFrom(r, e);
|
|
1804
|
-
return l ? G(t, l) : !1;
|
|
1805
|
-
}
|
|
1806
|
-
return !1;
|
|
1807
|
-
}
|
|
1808
|
-
function St(t, e) {
|
|
1809
|
-
if (!(t.state.selection instanceof M))
|
|
1810
|
-
return !0;
|
|
1811
|
-
let { $head: o, $anchor: n, empty: i } = t.state.selection;
|
|
1812
|
-
if (!o.sameParent(n))
|
|
1813
|
-
return !0;
|
|
1814
|
-
if (!i)
|
|
1815
|
-
return !1;
|
|
1816
|
-
if (t.endOfTextblock(e > 0 ? "forward" : "backward"))
|
|
1817
|
-
return !0;
|
|
1818
|
-
let s = !o.textOffset && (e < 0 ? o.nodeBefore : o.nodeAfter);
|
|
1819
|
-
if (s && !s.isText) {
|
|
1820
|
-
let r = t.state.tr;
|
|
1821
|
-
return e < 0 ? r.delete(o.pos - s.nodeSize, o.pos) : r.delete(o.pos, o.pos + s.nodeSize), t.dispatch(r), !0;
|
|
1822
|
-
}
|
|
1823
|
-
return !1;
|
|
1824
|
-
}
|
|
1825
|
-
function Ot(t, e, o) {
|
|
1826
|
-
t.domObserver.stop(), e.contentEditable = o, t.domObserver.start();
|
|
1827
|
-
}
|
|
1828
|
-
function cn(t) {
|
|
1829
|
-
if (!C || t.state.selection.$head.parentOffset > 0)
|
|
1830
|
-
return !1;
|
|
1831
|
-
let { focusNode: e, focusOffset: o } = t.domSelectionRange();
|
|
1832
|
-
if (e && e.nodeType == 1 && o == 0 && e.firstChild && e.firstChild.contentEditable == "false") {
|
|
1833
|
-
let n = e.firstChild;
|
|
1834
|
-
Ot(t, n, "true"), setTimeout(() => Ot(t, n, "false"), 20);
|
|
1835
|
-
}
|
|
1836
|
-
return !1;
|
|
1837
|
-
}
|
|
1838
|
-
function hn(t) {
|
|
1839
|
-
let e = "";
|
|
1840
|
-
return t.ctrlKey && (e += "c"), t.metaKey && (e += "m"), t.altKey && (e += "a"), t.shiftKey && (e += "s"), e;
|
|
1841
|
-
}
|
|
1842
|
-
function fn(t, e) {
|
|
1843
|
-
let o = e.keyCode, n = hn(e);
|
|
1844
|
-
if (o == 8 || P && o == 72 && n == "c")
|
|
1845
|
-
return St(t, -1) || de(t, -1);
|
|
1846
|
-
if (o == 46 && !e.shiftKey || P && o == 68 && n == "c")
|
|
1847
|
-
return St(t, 1) || de(t, 1);
|
|
1848
|
-
if (o == 13 || o == 27)
|
|
1849
|
-
return !0;
|
|
1850
|
-
if (o == 37 || P && o == 66 && n == "c") {
|
|
1851
|
-
let i = o == 37 ? Dt(t, t.state.selection.from) == "ltr" ? -1 : 1 : -1;
|
|
1852
|
-
return vt(t, i, n) || de(t, i);
|
|
1853
|
-
} else if (o == 39 || P && o == 70 && n == "c") {
|
|
1854
|
-
let i = o == 39 ? Dt(t, t.state.selection.from) == "ltr" ? 1 : -1 : 1;
|
|
1855
|
-
return vt(t, i, n) || de(t, i);
|
|
1856
|
-
} else {
|
|
1857
|
-
if (o == 38 || P && o == 80 && n == "c")
|
|
1858
|
-
return Nt(t, -1, n) || de(t, -1);
|
|
1859
|
-
if (o == 40 || P && o == 78 && n == "c")
|
|
1860
|
-
return cn(t) || Nt(t, 1, n) || de(t, 1);
|
|
1861
|
-
if (n == (P ? "m" : "c") && (o == 66 || o == 73 || o == 89 || o == 90))
|
|
1862
|
-
return !0;
|
|
1863
|
-
}
|
|
1864
|
-
return !1;
|
|
1865
|
-
}
|
|
1866
|
-
function Qe(t, e) {
|
|
1867
|
-
t.someProp("transformCopied", (p) => {
|
|
1868
|
-
e = p(e, t);
|
|
1869
|
-
});
|
|
1870
|
-
let o = [], { content: n, openStart: i, openEnd: s } = e;
|
|
1871
|
-
for (; i > 1 && s > 1 && n.childCount == 1 && n.firstChild.childCount == 1; ) {
|
|
1872
|
-
i--, s--;
|
|
1873
|
-
let p = n.firstChild;
|
|
1874
|
-
o.push(p.type.name, p.attrs != p.type.defaultAttrs ? p.attrs : null), n = p.content;
|
|
1875
|
-
}
|
|
1876
|
-
let r = t.someProp("clipboardSerializer") || Pe.fromSchema(t.state.schema), l = ao(), a = l.createElement("div");
|
|
1877
|
-
a.appendChild(r.serializeFragment(n, { document: l }));
|
|
1878
|
-
let d = a.firstChild, c, h = 0;
|
|
1879
|
-
for (; d && d.nodeType == 1 && (c = lo[d.nodeName.toLowerCase()]); ) {
|
|
1880
|
-
for (let p = c.length - 1; p >= 0; p--) {
|
|
1881
|
-
let f = l.createElement(c[p]);
|
|
1882
|
-
for (; a.firstChild; )
|
|
1883
|
-
f.appendChild(a.firstChild);
|
|
1884
|
-
a.appendChild(f), h++;
|
|
1885
|
-
}
|
|
1886
|
-
d = a.firstChild;
|
|
1887
|
-
}
|
|
1888
|
-
d && d.nodeType == 1 && d.setAttribute("data-pm-slice", `${i} ${s}${h ? ` -${h}` : ""} ${JSON.stringify(o)}`);
|
|
1889
|
-
let u = t.someProp("clipboardTextSerializer", (p) => p(e, t)) || e.content.textBetween(0, e.content.size, `
|
|
1890
|
-
|
|
1891
|
-
`);
|
|
1892
|
-
return { dom: a, text: u, slice: e };
|
|
1893
|
-
}
|
|
1894
|
-
function no(t, e, o, n, i) {
|
|
1895
|
-
let s = i.parent.type.spec.code, r, l;
|
|
1896
|
-
if (!o && !e)
|
|
1897
|
-
return null;
|
|
1898
|
-
let a = !!e && (n || s || !o);
|
|
1899
|
-
if (a) {
|
|
1900
|
-
if (t.someProp("transformPastedText", (u) => {
|
|
1901
|
-
e = u(e, s || n, t);
|
|
1902
|
-
}), s)
|
|
1903
|
-
return l = new se(H.from(t.state.schema.text(e.replace(/\r\n?/g, `
|
|
1904
|
-
`))), 0, 0), t.someProp("transformPasted", (u) => {
|
|
1905
|
-
l = u(l, t, !0);
|
|
1906
|
-
}), l;
|
|
1907
|
-
let h = t.someProp("clipboardTextParser", (u) => u(e, i, n, t));
|
|
1908
|
-
if (h)
|
|
1909
|
-
l = h;
|
|
1910
|
-
else {
|
|
1911
|
-
let u = i.marks(), { schema: p } = t.state, f = Pe.fromSchema(p);
|
|
1912
|
-
r = document.createElement("div"), e.split(/(?:\r\n?|\n)+/).forEach((g) => {
|
|
1913
|
-
let m = r.appendChild(document.createElement("p"));
|
|
1914
|
-
g && m.appendChild(f.serializeNode(p.text(g, u)));
|
|
1915
|
-
});
|
|
1916
|
-
}
|
|
1917
|
-
} else
|
|
1918
|
-
t.someProp("transformPastedHTML", (h) => {
|
|
1919
|
-
o = h(o, t);
|
|
1920
|
-
}), r = gn(o), Se && yn(r);
|
|
1921
|
-
let d = r && r.querySelector("[data-pm-slice]"), c = d && /^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(d.getAttribute("data-pm-slice") || "");
|
|
1922
|
-
if (c && c[3])
|
|
1923
|
-
for (let h = +c[3]; h > 0; h--) {
|
|
1924
|
-
let u = r.firstChild;
|
|
1925
|
-
for (; u && u.nodeType != 1; )
|
|
1926
|
-
u = u.nextSibling;
|
|
1927
|
-
if (!u)
|
|
1928
|
-
break;
|
|
1929
|
-
r = u;
|
|
1930
|
-
}
|
|
1931
|
-
if (l || (l = (t.someProp("clipboardParser") || t.someProp("domParser") || It.fromSchema(t.state.schema)).parseSlice(r, {
|
|
1932
|
-
preserveWhitespace: !!(a || c),
|
|
1933
|
-
context: i,
|
|
1934
|
-
ruleFromNode(h) {
|
|
1935
|
-
return h.nodeName == "BR" && !h.nextSibling && h.parentNode && !un.test(h.parentNode.nodeName) ? { ignore: !0 } : null;
|
|
1936
|
-
}
|
|
1937
|
-
})), c)
|
|
1938
|
-
l = bn(Ct(l, +c[1], +c[2]), c[4]);
|
|
1939
|
-
else if (l = se.maxOpen(pn(l.content, i), !0), l.openStart || l.openEnd) {
|
|
1940
|
-
let h = 0, u = 0;
|
|
1941
|
-
for (let p = l.content.firstChild; h < l.openStart && !p.type.spec.isolating; h++, p = p.firstChild)
|
|
1942
|
-
;
|
|
1943
|
-
for (let p = l.content.lastChild; u < l.openEnd && !p.type.spec.isolating; u++, p = p.lastChild)
|
|
1944
|
-
;
|
|
1945
|
-
l = Ct(l, h, u);
|
|
1946
|
-
}
|
|
1947
|
-
return t.someProp("transformPasted", (h) => {
|
|
1948
|
-
l = h(l, t, a);
|
|
1949
|
-
}), l;
|
|
1950
|
-
}
|
|
1951
|
-
const un = /^(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;
|
|
1952
|
-
function pn(t, e) {
|
|
1953
|
-
if (t.childCount < 2)
|
|
1954
|
-
return t;
|
|
1955
|
-
for (let o = e.depth; o >= 0; o--) {
|
|
1956
|
-
let n = e.node(o).contentMatchAt(e.index(o)), i, s = [];
|
|
1957
|
-
if (t.forEach((r) => {
|
|
1958
|
-
if (!s)
|
|
1959
|
-
return;
|
|
1960
|
-
let l = n.findWrapping(r.type), a;
|
|
1961
|
-
if (!l)
|
|
1962
|
-
return s = null;
|
|
1963
|
-
if (a = s.length && i.length && so(l, i, r, s[s.length - 1], 0))
|
|
1964
|
-
s[s.length - 1] = a;
|
|
1965
|
-
else {
|
|
1966
|
-
s.length && (s[s.length - 1] = ro(s[s.length - 1], i.length));
|
|
1967
|
-
let d = io(r, l);
|
|
1968
|
-
s.push(d), n = n.matchType(d.type), i = l;
|
|
1969
|
-
}
|
|
1970
|
-
}), s)
|
|
1971
|
-
return H.from(s);
|
|
1972
|
-
}
|
|
1973
|
-
return t;
|
|
1974
|
-
}
|
|
1975
|
-
function io(t, e, o = 0) {
|
|
1976
|
-
for (let n = e.length - 1; n >= o; n--)
|
|
1977
|
-
t = e[n].create(null, H.from(t));
|
|
1978
|
-
return t;
|
|
1979
|
-
}
|
|
1980
|
-
function so(t, e, o, n, i) {
|
|
1981
|
-
if (i < t.length && i < e.length && t[i] == e[i]) {
|
|
1982
|
-
let s = so(t, e, o, n.lastChild, i + 1);
|
|
1983
|
-
if (s)
|
|
1984
|
-
return n.copy(n.content.replaceChild(n.childCount - 1, s));
|
|
1985
|
-
if (n.contentMatchAt(n.childCount).matchType(i == t.length - 1 ? o.type : t[i + 1]))
|
|
1986
|
-
return n.copy(n.content.append(H.from(io(o, t, i + 1))));
|
|
1987
|
-
}
|
|
1988
|
-
}
|
|
1989
|
-
function ro(t, e) {
|
|
1990
|
-
if (e == 0)
|
|
1991
|
-
return t;
|
|
1992
|
-
let o = t.content.replaceChild(t.childCount - 1, ro(t.lastChild, e - 1)), n = t.contentMatchAt(t.childCount).fillBefore(H.empty, !0);
|
|
1993
|
-
return t.copy(o.append(n));
|
|
1994
|
-
}
|
|
1995
|
-
function Ye(t, e, o, n, i, s) {
|
|
1996
|
-
let r = e < 0 ? t.firstChild : t.lastChild, l = r.content;
|
|
1997
|
-
return t.childCount > 1 && (s = 0), i < n - 1 && (l = Ye(l, e, o, n, i + 1, s)), i >= o && (l = e < 0 ? r.contentMatchAt(0).fillBefore(l, s <= i).append(l) : l.append(r.contentMatchAt(r.childCount).fillBefore(H.empty, !0))), t.replaceChild(e < 0 ? 0 : t.childCount - 1, r.copy(l));
|
|
1998
|
-
}
|
|
1999
|
-
function Ct(t, e, o) {
|
|
2000
|
-
return e < t.openStart && (t = new se(Ye(t.content, -1, e, t.openStart, 0, t.openEnd), e, t.openEnd)), o < t.openEnd && (t = new se(Ye(t.content, 1, o, t.openEnd, 0, 0), t.openStart, o)), t;
|
|
2001
|
-
}
|
|
2002
|
-
const lo = {
|
|
2003
|
-
thead: ["table"],
|
|
2004
|
-
tbody: ["table"],
|
|
2005
|
-
tfoot: ["table"],
|
|
2006
|
-
caption: ["table"],
|
|
2007
|
-
colgroup: ["table"],
|
|
2008
|
-
col: ["table", "colgroup"],
|
|
2009
|
-
tr: ["table", "tbody"],
|
|
2010
|
-
td: ["table", "tbody", "tr"],
|
|
2011
|
-
th: ["table", "tbody", "tr"]
|
|
2012
|
-
};
|
|
2013
|
-
let Mt = null;
|
|
2014
|
-
function ao() {
|
|
2015
|
-
return Mt || (Mt = document.implementation.createHTMLDocument("title"));
|
|
2016
|
-
}
|
|
2017
|
-
let Fe = null;
|
|
2018
|
-
function mn(t) {
|
|
2019
|
-
let e = window.trustedTypes;
|
|
2020
|
-
return e ? (Fe || (Fe = e.defaultPolicy || e.createPolicy("ProseMirrorClipboard", { createHTML: (o) => o })), Fe.createHTML(t)) : t;
|
|
2021
|
-
}
|
|
2022
|
-
function gn(t) {
|
|
2023
|
-
let e = /^(\s*<meta [^>]*>)*/.exec(t);
|
|
2024
|
-
e && (t = t.slice(e[0].length));
|
|
2025
|
-
let o = ao().createElement("div"), n = /<([a-z][^>\s]+)/i.exec(t), i;
|
|
2026
|
-
if ((i = n && lo[n[1].toLowerCase()]) && (t = i.map((s) => "<" + s + ">").join("") + t + i.map((s) => "</" + s + ">").reverse().join("")), o.innerHTML = mn(t), i)
|
|
2027
|
-
for (let s = 0; s < i.length; s++)
|
|
2028
|
-
o = o.querySelector(i[s]) || o;
|
|
2029
|
-
return o;
|
|
2030
|
-
}
|
|
2031
|
-
function yn(t) {
|
|
2032
|
-
let e = t.querySelectorAll(S ? "span:not([class]):not([style])" : "span.Apple-converted-space");
|
|
2033
|
-
for (let o = 0; o < e.length; o++) {
|
|
2034
|
-
let n = e[o];
|
|
2035
|
-
n.childNodes.length == 1 && n.textContent == " " && n.parentNode && n.parentNode.replaceChild(t.ownerDocument.createTextNode(" "), n);
|
|
2036
|
-
}
|
|
2037
|
-
}
|
|
2038
|
-
function bn(t, e) {
|
|
2039
|
-
if (!t.size)
|
|
2040
|
-
return t;
|
|
2041
|
-
let o = t.content.firstChild.type.schema, n;
|
|
2042
|
-
try {
|
|
2043
|
-
n = JSON.parse(e);
|
|
2044
|
-
} catch {
|
|
2045
|
-
return t;
|
|
2046
|
-
}
|
|
2047
|
-
let { content: i, openStart: s, openEnd: r } = t;
|
|
2048
|
-
for (let l = n.length - 2; l >= 0; l -= 2) {
|
|
2049
|
-
let a = o.nodes[n[l]];
|
|
2050
|
-
if (!a || a.hasRequiredAttrs())
|
|
2051
|
-
break;
|
|
2052
|
-
i = H.from(a.create(n[l + 1], i)), s++, r++;
|
|
2053
|
-
}
|
|
2054
|
-
return new se(i, s, r);
|
|
2055
|
-
}
|
|
2056
|
-
const x = {}, T = {}, wn = { touchstart: !0, touchmove: !0 };
|
|
2057
|
-
class vn {
|
|
2058
|
-
constructor() {
|
|
2059
|
-
this.shiftKey = !1, this.mouseDown = null, this.lastKeyCode = null, this.lastKeyCodeTime = 0, this.lastClick = { time: 0, x: 0, y: 0, type: "", button: 0 }, this.lastSelectionOrigin = null, this.lastSelectionTime = 0, this.lastIOSEnter = 0, this.lastIOSEnterFallbackTimeout = -1, this.lastFocus = 0, this.lastTouch = 0, this.lastChromeDelete = 0, this.composing = !1, this.compositionNode = null, this.composingTimeout = -1, this.compositionNodes = [], this.compositionEndedAt = -2e8, this.compositionID = 1, this.badSafariComposition = !1, this.compositionPendingChanges = 0, this.domChangeCount = 0, this.eventHandlers = /* @__PURE__ */ Object.create(null), this.hideSelectionGuard = null;
|
|
2060
|
-
}
|
|
2061
|
-
}
|
|
2062
|
-
function Dn(t) {
|
|
2063
|
-
for (let e in x) {
|
|
2064
|
-
let o = x[e];
|
|
2065
|
-
t.dom.addEventListener(e, t.input.eventHandlers[e] = (n) => {
|
|
2066
|
-
Sn(t, n) && !et(t, n) && (t.editable || !(n.type in T)) && o(t, n);
|
|
2067
|
-
}, wn[e] ? { passive: !0 } : void 0);
|
|
2068
|
-
}
|
|
2069
|
-
C && t.dom.addEventListener("input", () => null), Xe(t);
|
|
2070
|
-
}
|
|
2071
|
-
function Y(t, e) {
|
|
2072
|
-
t.input.lastSelectionOrigin = e, t.input.lastSelectionTime = Date.now();
|
|
2073
|
-
}
|
|
2074
|
-
function Nn(t) {
|
|
2075
|
-
t.domObserver.stop();
|
|
2076
|
-
for (let e in t.input.eventHandlers)
|
|
2077
|
-
t.dom.removeEventListener(e, t.input.eventHandlers[e]);
|
|
2078
|
-
clearTimeout(t.input.composingTimeout), clearTimeout(t.input.lastIOSEnterFallbackTimeout);
|
|
2079
|
-
}
|
|
2080
|
-
function Xe(t) {
|
|
2081
|
-
t.someProp("handleDOMEvents", (e) => {
|
|
2082
|
-
for (let o in e)
|
|
2083
|
-
t.input.eventHandlers[o] || t.dom.addEventListener(o, t.input.eventHandlers[o] = (n) => et(t, n));
|
|
2084
|
-
});
|
|
2085
|
-
}
|
|
2086
|
-
function et(t, e) {
|
|
2087
|
-
return t.someProp("handleDOMEvents", (o) => {
|
|
2088
|
-
let n = o[e.type];
|
|
2089
|
-
return n ? n(t, e) || e.defaultPrevented : !1;
|
|
2090
|
-
});
|
|
2091
|
-
}
|
|
2092
|
-
function Sn(t, e) {
|
|
2093
|
-
if (!e.bubbles)
|
|
2094
|
-
return !0;
|
|
2095
|
-
if (e.defaultPrevented)
|
|
2096
|
-
return !1;
|
|
2097
|
-
for (let o = e.target; o != t.dom; o = o.parentNode)
|
|
2098
|
-
if (!o || o.nodeType == 11 || o.pmViewDesc && o.pmViewDesc.stopEvent(e))
|
|
2099
|
-
return !1;
|
|
2100
|
-
return !0;
|
|
2101
|
-
}
|
|
2102
|
-
function On(t, e) {
|
|
2103
|
-
!et(t, e) && x[e.type] && (t.editable || !(e.type in T)) && x[e.type](t, e);
|
|
2104
|
-
}
|
|
2105
|
-
T.keydown = (t, e) => {
|
|
2106
|
-
let o = e;
|
|
2107
|
-
if (t.input.shiftKey = o.keyCode == 16 || o.shiftKey, !ho(t, o) && (t.input.lastKeyCode = o.keyCode, t.input.lastKeyCodeTime = Date.now(), !(K && S && o.keyCode == 13)))
|
|
2108
|
-
if (o.keyCode != 229 && t.domObserver.forceFlush(), ue && o.keyCode == 13 && !o.ctrlKey && !o.altKey && !o.metaKey) {
|
|
2109
|
-
let n = Date.now();
|
|
2110
|
-
t.input.lastIOSEnter = n, t.input.lastIOSEnterFallbackTimeout = setTimeout(() => {
|
|
2111
|
-
t.input.lastIOSEnter == n && (t.someProp("handleKeyDown", (i) => i(t, ee(13, "Enter"))), t.input.lastIOSEnter = 0);
|
|
2112
|
-
}, 200);
|
|
2113
|
-
} else t.someProp("handleKeyDown", (n) => n(t, o)) || fn(t, o) ? o.preventDefault() : Y(t, "key");
|
|
2114
|
-
};
|
|
2115
|
-
T.keyup = (t, e) => {
|
|
2116
|
-
e.keyCode == 16 && (t.input.shiftKey = !1);
|
|
2117
|
-
};
|
|
2118
|
-
T.keypress = (t, e) => {
|
|
2119
|
-
let o = e;
|
|
2120
|
-
if (ho(t, o) || !o.charCode || o.ctrlKey && !o.altKey || P && o.metaKey)
|
|
2121
|
-
return;
|
|
2122
|
-
if (t.someProp("handleKeyPress", (i) => i(t, o))) {
|
|
2123
|
-
o.preventDefault();
|
|
2124
|
-
return;
|
|
2125
|
-
}
|
|
2126
|
-
let n = t.state.selection;
|
|
2127
|
-
if (!(n instanceof M) || !n.$from.sameParent(n.$to)) {
|
|
2128
|
-
let i = String.fromCharCode(o.charCode), s = () => t.state.tr.insertText(i).scrollIntoView();
|
|
2129
|
-
!/[\r\n]/.test(i) && !t.someProp("handleTextInput", (r) => r(t, n.$from.pos, n.$to.pos, i, s)) && t.dispatch(s()), o.preventDefault();
|
|
2130
|
-
}
|
|
2131
|
-
};
|
|
2132
|
-
function Re(t) {
|
|
2133
|
-
return { left: t.clientX, top: t.clientY };
|
|
2134
|
-
}
|
|
2135
|
-
function Cn(t, e) {
|
|
2136
|
-
let o = e.x - t.clientX, n = e.y - t.clientY;
|
|
2137
|
-
return o * o + n * n < 100;
|
|
2138
|
-
}
|
|
2139
|
-
function tt(t, e, o, n, i) {
|
|
2140
|
-
if (n == -1)
|
|
2141
|
-
return !1;
|
|
2142
|
-
let s = t.state.doc.resolve(n);
|
|
2143
|
-
for (let r = s.depth + 1; r > 0; r--)
|
|
2144
|
-
if (t.someProp(e, (l) => r > s.depth ? l(t, o, s.nodeAfter, s.before(r), i, !0) : l(t, o, s.node(r), s.before(r), i, !1)))
|
|
2145
|
-
return !0;
|
|
2146
|
-
return !1;
|
|
2147
|
-
}
|
|
2148
|
-
function he(t, e, o) {
|
|
2149
|
-
if (t.focused || t.focus(), t.state.selection.eq(e))
|
|
2150
|
-
return;
|
|
2151
|
-
let n = t.state.tr.setSelection(e);
|
|
2152
|
-
n.setMeta("pointer", !0), t.dispatch(n);
|
|
2153
|
-
}
|
|
2154
|
-
function Mn(t, e) {
|
|
2155
|
-
if (e == -1)
|
|
2156
|
-
return !1;
|
|
2157
|
-
let o = t.state.doc.resolve(e), n = o.nodeAfter;
|
|
2158
|
-
return n && n.isAtom && w.isSelectable(n) ? (he(t, new w(o)), !0) : !1;
|
|
2159
|
-
}
|
|
2160
|
-
function xn(t, e) {
|
|
2161
|
-
if (e == -1)
|
|
2162
|
-
return !1;
|
|
2163
|
-
let o = t.state.selection, n, i;
|
|
2164
|
-
o instanceof w && (n = o.node);
|
|
2165
|
-
let s = t.state.doc.resolve(e);
|
|
2166
|
-
for (let r = s.depth + 1; r > 0; r--) {
|
|
2167
|
-
let l = r > s.depth ? s.nodeAfter : s.node(r);
|
|
2168
|
-
if (w.isSelectable(l)) {
|
|
2169
|
-
n && o.$from.depth > 0 && r >= o.$from.depth && s.before(o.$from.depth + 1) == o.$from.pos ? i = s.before(o.$from.depth) : i = s.before(r);
|
|
2170
|
-
break;
|
|
2171
|
-
}
|
|
2172
|
-
}
|
|
2173
|
-
return i != null ? (he(t, w.create(t.state.doc, i)), !0) : !1;
|
|
2174
|
-
}
|
|
2175
|
-
function Tn(t, e, o, n, i) {
|
|
2176
|
-
return tt(t, "handleClickOn", e, o, n) || t.someProp("handleClick", (s) => s(t, e, n)) || (i ? xn(t, o) : Mn(t, o));
|
|
2177
|
-
}
|
|
2178
|
-
function kn(t, e, o, n) {
|
|
2179
|
-
return tt(t, "handleDoubleClickOn", e, o, n) || t.someProp("handleDoubleClick", (i) => i(t, e, n));
|
|
2180
|
-
}
|
|
2181
|
-
function En(t, e, o, n) {
|
|
2182
|
-
return tt(t, "handleTripleClickOn", e, o, n) || t.someProp("handleTripleClick", (i) => i(t, e, n)) || Pn(t, o, n);
|
|
2183
|
-
}
|
|
2184
|
-
function Pn(t, e, o) {
|
|
2185
|
-
if (o.button != 0)
|
|
2186
|
-
return !1;
|
|
2187
|
-
let n = t.state.doc;
|
|
2188
|
-
if (e == -1)
|
|
2189
|
-
return n.inlineContent ? (he(t, M.create(n, 0, n.content.size)), !0) : !1;
|
|
2190
|
-
let i = n.resolve(e);
|
|
2191
|
-
for (let s = i.depth + 1; s > 0; s--) {
|
|
2192
|
-
let r = s > i.depth ? i.nodeAfter : i.node(s), l = i.before(s);
|
|
2193
|
-
if (r.inlineContent)
|
|
2194
|
-
he(t, M.create(n, l + 1, l + 1 + r.content.size));
|
|
2195
|
-
else if (w.isSelectable(r))
|
|
2196
|
-
he(t, w.create(n, l));
|
|
2197
|
-
else
|
|
2198
|
-
continue;
|
|
2199
|
-
return !0;
|
|
2200
|
-
}
|
|
2201
|
-
}
|
|
2202
|
-
function ot(t) {
|
|
2203
|
-
return Te(t);
|
|
2204
|
-
}
|
|
2205
|
-
const co = P ? "metaKey" : "ctrlKey";
|
|
2206
|
-
x.mousedown = (t, e) => {
|
|
2207
|
-
let o = e;
|
|
2208
|
-
t.input.shiftKey = o.shiftKey;
|
|
2209
|
-
let n = ot(t), i = Date.now(), s = "singleClick";
|
|
2210
|
-
i - t.input.lastClick.time < 500 && Cn(o, t.input.lastClick) && !o[co] && t.input.lastClick.button == o.button && (t.input.lastClick.type == "singleClick" ? s = "doubleClick" : t.input.lastClick.type == "doubleClick" && (s = "tripleClick")), t.input.lastClick = { time: i, x: o.clientX, y: o.clientY, type: s, button: o.button };
|
|
2211
|
-
let r = t.posAtCoords(Re(o));
|
|
2212
|
-
r && (s == "singleClick" ? (t.input.mouseDown && t.input.mouseDown.done(), t.input.mouseDown = new An(t, r, o, !!n)) : (s == "doubleClick" ? kn : En)(t, r.pos, r.inside, o) ? o.preventDefault() : Y(t, "pointer"));
|
|
2213
|
-
};
|
|
2214
|
-
class An {
|
|
2215
|
-
constructor(e, o, n, i) {
|
|
2216
|
-
this.view = e, this.pos = o, this.event = n, this.flushed = i, this.delayedSelectionSync = !1, this.mightDrag = null, this.startDoc = e.state.doc, this.selectNode = !!n[co], this.allowDefault = n.shiftKey;
|
|
2217
|
-
let s, r;
|
|
2218
|
-
if (o.inside > -1)
|
|
2219
|
-
s = e.state.doc.nodeAt(o.inside), r = o.inside;
|
|
2220
|
-
else {
|
|
2221
|
-
let c = e.state.doc.resolve(o.pos);
|
|
2222
|
-
s = c.parent, r = c.depth ? c.before() : 0;
|
|
2223
|
-
}
|
|
2224
|
-
const l = i ? null : n.target, a = l ? e.docView.nearestDesc(l, !0) : null;
|
|
2225
|
-
this.target = a && a.nodeDOM.nodeType == 1 ? a.nodeDOM : null;
|
|
2226
|
-
let { selection: d } = e.state;
|
|
2227
|
-
(n.button == 0 && s.type.spec.draggable && s.type.spec.selectable !== !1 || d instanceof w && d.from <= r && d.to > r) && (this.mightDrag = {
|
|
2228
|
-
node: s,
|
|
2229
|
-
pos: r,
|
|
2230
|
-
addAttr: !!(this.target && !this.target.draggable),
|
|
2231
|
-
setUneditable: !!(this.target && V && !this.target.hasAttribute("contentEditable"))
|
|
2232
|
-
}), 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(() => {
|
|
2233
|
-
this.view.input.mouseDown == this && this.target.setAttribute("contentEditable", "false");
|
|
2234
|
-
}, 20), this.view.domObserver.start()), e.root.addEventListener("mouseup", this.up = this.up.bind(this)), e.root.addEventListener("mousemove", this.move = this.move.bind(this)), Y(e, "pointer");
|
|
2235
|
-
}
|
|
2236
|
-
done() {
|
|
2237
|
-
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(() => W(this.view)), this.view.input.mouseDown = null;
|
|
2238
|
-
}
|
|
2239
|
-
up(e) {
|
|
2240
|
-
if (this.done(), !this.view.dom.contains(e.target))
|
|
2241
|
-
return;
|
|
2242
|
-
let o = this.pos;
|
|
2243
|
-
this.view.state.doc != this.startDoc && (o = this.view.posAtCoords(Re(e))), this.updateAllowDefault(e), this.allowDefault || !o ? Y(this.view, "pointer") : Tn(this.view, o.pos, o.inside, e, this.selectNode) ? e.preventDefault() : e.button == 0 && (this.flushed || // Safari ignores clicks on draggable elements
|
|
2244
|
-
C && this.mightDrag && !this.mightDrag.node.isAtom || // Chrome will sometimes treat a node selection as a
|
|
2245
|
-
// cursor, but still report that the node is selected
|
|
2246
|
-
// when asked through getSelection. You'll then get a
|
|
2247
|
-
// situation where clicking at the point where that
|
|
2248
|
-
// (hidden) cursor is doesn't change the selection, and
|
|
2249
|
-
// thus doesn't get a reaction from ProseMirror. This
|
|
2250
|
-
// works around that.
|
|
2251
|
-
S && !this.view.state.selection.visible && Math.min(Math.abs(o.pos - this.view.state.selection.from), Math.abs(o.pos - this.view.state.selection.to)) <= 2) ? (he(this.view, be.near(this.view.state.doc.resolve(o.pos))), e.preventDefault()) : Y(this.view, "pointer");
|
|
2252
|
-
}
|
|
2253
|
-
move(e) {
|
|
2254
|
-
this.updateAllowDefault(e), Y(this.view, "pointer"), e.buttons == 0 && this.done();
|
|
2255
|
-
}
|
|
2256
|
-
updateAllowDefault(e) {
|
|
2257
|
-
!this.allowDefault && (Math.abs(this.event.x - e.clientX) > 4 || Math.abs(this.event.y - e.clientY) > 4) && (this.allowDefault = !0);
|
|
2258
|
-
}
|
|
2259
|
-
}
|
|
2260
|
-
x.touchstart = (t) => {
|
|
2261
|
-
t.input.lastTouch = Date.now(), ot(t), Y(t, "pointer");
|
|
2262
|
-
};
|
|
2263
|
-
x.touchmove = (t) => {
|
|
2264
|
-
t.input.lastTouch = Date.now(), Y(t, "pointer");
|
|
2265
|
-
};
|
|
2266
|
-
x.contextmenu = (t) => ot(t);
|
|
2267
|
-
function ho(t, e) {
|
|
2268
|
-
return t.composing ? !0 : C && Math.abs(e.timeStamp - t.input.compositionEndedAt) < 500 ? (t.input.compositionEndedAt = -2e8, !0) : !1;
|
|
2269
|
-
}
|
|
2270
|
-
const Vn = K ? 5e3 : -1;
|
|
2271
|
-
T.compositionstart = T.compositionupdate = (t) => {
|
|
2272
|
-
if (!t.composing) {
|
|
2273
|
-
t.domObserver.flush();
|
|
2274
|
-
let { state: e } = t, o = e.selection.$to;
|
|
2275
|
-
if (e.selection instanceof M && (e.storedMarks || !o.textOffset && o.parentOffset && o.nodeBefore.marks.some((n) => n.type.spec.inclusive === !1) || S && qt && Rn(t)))
|
|
2276
|
-
t.markCursor = t.state.storedMarks || o.marks(), Te(t, !0), t.markCursor = null;
|
|
2277
|
-
else if (Te(t, !e.selection.empty), V && e.selection.empty && o.parentOffset && !o.textOffset && o.nodeBefore.marks.length) {
|
|
2278
|
-
let n = t.domSelectionRange();
|
|
2279
|
-
for (let i = n.focusNode, s = n.focusOffset; i && i.nodeType == 1 && s != 0; ) {
|
|
2280
|
-
let r = s < 0 ? i.lastChild : i.childNodes[s - 1];
|
|
2281
|
-
if (!r)
|
|
2282
|
-
break;
|
|
2283
|
-
if (r.nodeType == 3) {
|
|
2284
|
-
let l = t.domSelection();
|
|
2285
|
-
l && l.collapse(r, r.nodeValue.length);
|
|
2286
|
-
break;
|
|
2287
|
-
} else
|
|
2288
|
-
i = r, s = -1;
|
|
2289
|
-
}
|
|
2290
|
-
}
|
|
2291
|
-
t.input.composing = !0;
|
|
2292
|
-
}
|
|
2293
|
-
fo(t, Vn);
|
|
2294
|
-
};
|
|
2295
|
-
function Rn(t) {
|
|
2296
|
-
let { focusNode: e, focusOffset: o } = t.domSelectionRange();
|
|
2297
|
-
if (!e || e.nodeType != 1 || o >= e.childNodes.length)
|
|
2298
|
-
return !1;
|
|
2299
|
-
let n = e.childNodes[o];
|
|
2300
|
-
return n.nodeType == 1 && n.contentEditable == "false";
|
|
2301
|
-
}
|
|
2302
|
-
T.compositionend = (t, e) => {
|
|
2303
|
-
t.composing && (t.input.composing = !1, t.input.compositionEndedAt = e.timeStamp, t.input.compositionPendingChanges = t.domObserver.pendingRecords().length ? t.input.compositionID : 0, t.input.compositionNode = null, t.input.badSafariComposition ? t.domObserver.forceFlush() : t.input.compositionPendingChanges && Promise.resolve().then(() => t.domObserver.flush()), t.input.compositionID++, fo(t, 20));
|
|
2304
|
-
};
|
|
2305
|
-
function fo(t, e) {
|
|
2306
|
-
clearTimeout(t.input.composingTimeout), e > -1 && (t.input.composingTimeout = setTimeout(() => Te(t), e));
|
|
2307
|
-
}
|
|
2308
|
-
function uo(t) {
|
|
2309
|
-
for (t.composing && (t.input.composing = !1, t.input.compositionEndedAt = zn()); t.input.compositionNodes.length > 0; )
|
|
2310
|
-
t.input.compositionNodes.pop().markParentsDirty();
|
|
2311
|
-
}
|
|
2312
|
-
function Bn(t) {
|
|
2313
|
-
let e = t.domSelectionRange();
|
|
2314
|
-
if (!e.focusNode)
|
|
2315
|
-
return null;
|
|
2316
|
-
let o = Mo(e.focusNode, e.focusOffset), n = xo(e.focusNode, e.focusOffset);
|
|
2317
|
-
if (o && n && o != n) {
|
|
2318
|
-
let i = n.pmViewDesc, s = t.domObserver.lastChangedTextNode;
|
|
2319
|
-
if (o == s || n == s)
|
|
2320
|
-
return s;
|
|
2321
|
-
if (!i || !i.isText(n.nodeValue))
|
|
2322
|
-
return n;
|
|
2323
|
-
if (t.input.compositionNode == n) {
|
|
2324
|
-
let r = o.pmViewDesc;
|
|
2325
|
-
if (!(!r || !r.isText(o.nodeValue)))
|
|
2326
|
-
return n;
|
|
2327
|
-
}
|
|
2328
|
-
}
|
|
2329
|
-
return o || n;
|
|
2330
|
-
}
|
|
2331
|
-
function zn() {
|
|
2332
|
-
let t = document.createEvent("Event");
|
|
2333
|
-
return t.initEvent("event", !0, !0), t.timeStamp;
|
|
2334
|
-
}
|
|
2335
|
-
function Te(t, e = !1) {
|
|
2336
|
-
if (!(K && t.domObserver.flushingSoon >= 0)) {
|
|
2337
|
-
if (t.domObserver.forceFlush(), uo(t), e || t.docView && t.docView.dirty) {
|
|
2338
|
-
let o = _e(t), n = t.state.selection;
|
|
2339
|
-
return o && !o.eq(n) ? t.dispatch(t.state.tr.setSelection(o)) : (t.markCursor || e) && !n.$from.node(n.$from.sharedDepth(n.to)).inlineContent ? t.dispatch(t.state.tr.deleteSelection()) : t.updateState(t.state), !0;
|
|
2340
|
-
}
|
|
2341
|
-
return !1;
|
|
2342
|
-
}
|
|
2343
|
-
}
|
|
2344
|
-
function Fn(t, e) {
|
|
2345
|
-
if (!t.dom.parentNode)
|
|
2346
|
-
return;
|
|
2347
|
-
let o = t.dom.parentNode.appendChild(document.createElement("div"));
|
|
2348
|
-
o.appendChild(e), o.style.cssText = "position: fixed; left: -10000px; top: 10px";
|
|
2349
|
-
let n = getSelection(), i = document.createRange();
|
|
2350
|
-
i.selectNodeContents(e), t.dom.blur(), n.removeAllRanges(), n.addRange(i), setTimeout(() => {
|
|
2351
|
-
o.parentNode && o.parentNode.removeChild(o), t.focus();
|
|
2352
|
-
}, 50);
|
|
2353
|
-
}
|
|
2354
|
-
const we = E && X < 15 || ue && Po < 604;
|
|
2355
|
-
x.copy = T.cut = (t, e) => {
|
|
2356
|
-
let o = e, n = t.state.selection, i = o.type == "cut";
|
|
2357
|
-
if (n.empty)
|
|
2358
|
-
return;
|
|
2359
|
-
let s = we ? null : o.clipboardData, r = n.content(), { dom: l, text: a } = Qe(t, r);
|
|
2360
|
-
s ? (o.preventDefault(), s.clearData(), s.setData("text/html", l.innerHTML), s.setData("text/plain", a)) : Fn(t, l), i && t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent", "cut"));
|
|
2361
|
-
};
|
|
2362
|
-
function In(t) {
|
|
2363
|
-
return t.openStart == 0 && t.openEnd == 0 && t.content.childCount == 1 ? t.content.firstChild : null;
|
|
2364
|
-
}
|
|
2365
|
-
function Ln(t, e) {
|
|
2366
|
-
if (!t.dom.parentNode)
|
|
2367
|
-
return;
|
|
2368
|
-
let o = t.input.shiftKey || t.state.selection.$from.parent.type.spec.code, n = t.dom.parentNode.appendChild(document.createElement(o ? "textarea" : "div"));
|
|
2369
|
-
o || (n.contentEditable = "true"), n.style.cssText = "position: fixed; left: -10000px; top: 10px", n.focus();
|
|
2370
|
-
let i = t.input.shiftKey && t.input.lastKeyCode != 45;
|
|
2371
|
-
setTimeout(() => {
|
|
2372
|
-
t.focus(), n.parentNode && n.parentNode.removeChild(n), o ? ve(t, n.value, null, i, e) : ve(t, n.textContent, n.innerHTML, i, e);
|
|
2373
|
-
}, 50);
|
|
2374
|
-
}
|
|
2375
|
-
function ve(t, e, o, n, i) {
|
|
2376
|
-
let s = no(t, e, o, n, t.state.selection.$from);
|
|
2377
|
-
if (t.someProp("handlePaste", (a) => a(t, i, s || se.empty)))
|
|
2378
|
-
return !0;
|
|
2379
|
-
if (!s)
|
|
2380
|
-
return !1;
|
|
2381
|
-
let r = In(s), l = r ? t.state.tr.replaceSelectionWith(r, n) : t.state.tr.replaceSelection(s);
|
|
2382
|
-
return t.dispatch(l.scrollIntoView().setMeta("paste", !0).setMeta("uiEvent", "paste")), !0;
|
|
2383
|
-
}
|
|
2384
|
-
function po(t) {
|
|
2385
|
-
let e = t.getData("text/plain") || t.getData("Text");
|
|
2386
|
-
if (e)
|
|
2387
|
-
return e;
|
|
2388
|
-
let o = t.getData("text/uri-list");
|
|
2389
|
-
return o ? o.replace(/\r?\n/g, " ") : "";
|
|
2390
|
-
}
|
|
2391
|
-
T.paste = (t, e) => {
|
|
2392
|
-
let o = e;
|
|
2393
|
-
if (t.composing && !K)
|
|
2394
|
-
return;
|
|
2395
|
-
let n = we ? null : o.clipboardData, i = t.input.shiftKey && t.input.lastKeyCode != 45;
|
|
2396
|
-
n && ve(t, po(n), n.getData("text/html"), i, o) ? o.preventDefault() : Ln(t, o);
|
|
2397
|
-
};
|
|
2398
|
-
class mo {
|
|
2399
|
-
constructor(e, o, n) {
|
|
2400
|
-
this.slice = e, this.move = o, this.node = n;
|
|
2401
|
-
}
|
|
2402
|
-
}
|
|
2403
|
-
const $n = P ? "altKey" : "ctrlKey";
|
|
2404
|
-
function go(t, e) {
|
|
2405
|
-
return t.someProp("dragCopies", (n) => !n(e)) ?? !e[$n];
|
|
2406
|
-
}
|
|
2407
|
-
x.dragstart = (t, e) => {
|
|
2408
|
-
let o = e, n = t.input.mouseDown;
|
|
2409
|
-
if (n && n.done(), !o.dataTransfer)
|
|
2410
|
-
return;
|
|
2411
|
-
let i = t.state.selection, s = i.empty ? null : t.posAtCoords(Re(o)), r;
|
|
2412
|
-
if (!(s && s.pos >= i.from && s.pos <= (i instanceof w ? i.to - 1 : i.to))) {
|
|
2413
|
-
if (n && n.mightDrag)
|
|
2414
|
-
r = w.create(t.state.doc, n.mightDrag.pos);
|
|
2415
|
-
else if (o.target && o.target.nodeType == 1) {
|
|
2416
|
-
let h = t.docView.nearestDesc(o.target, !0);
|
|
2417
|
-
h && h.node.type.spec.draggable && h != t.docView && (r = w.create(t.state.doc, h.posBefore));
|
|
2418
|
-
}
|
|
2419
|
-
}
|
|
2420
|
-
let l = (r || t.state.selection).content(), { dom: a, text: d, slice: c } = Qe(t, l);
|
|
2421
|
-
(!o.dataTransfer.files.length || !S || $t > 120) && o.dataTransfer.clearData(), o.dataTransfer.setData(we ? "Text" : "text/html", a.innerHTML), o.dataTransfer.effectAllowed = "copyMove", we || o.dataTransfer.setData("text/plain", d), t.dragging = new mo(c, go(t, o), r);
|
|
2422
|
-
};
|
|
2423
|
-
x.dragend = (t) => {
|
|
2424
|
-
let e = t.dragging;
|
|
2425
|
-
window.setTimeout(() => {
|
|
2426
|
-
t.dragging == e && (t.dragging = null);
|
|
2427
|
-
}, 50);
|
|
2428
|
-
};
|
|
2429
|
-
T.dragover = T.dragenter = (t, e) => e.preventDefault();
|
|
2430
|
-
T.drop = (t, e) => {
|
|
2431
|
-
try {
|
|
2432
|
-
qn(t, e, t.dragging);
|
|
2433
|
-
} finally {
|
|
2434
|
-
t.dragging = null;
|
|
2435
|
-
}
|
|
2436
|
-
};
|
|
2437
|
-
function qn(t, e, o) {
|
|
2438
|
-
if (!e.dataTransfer)
|
|
2439
|
-
return;
|
|
2440
|
-
let n = t.posAtCoords(Re(e));
|
|
2441
|
-
if (!n)
|
|
2442
|
-
return;
|
|
2443
|
-
let i = t.state.doc.resolve(n.pos), s = o && o.slice;
|
|
2444
|
-
s ? t.someProp("transformPasted", (p) => {
|
|
2445
|
-
s = p(s, t, !1);
|
|
2446
|
-
}) : s = no(t, po(e.dataTransfer), we ? null : e.dataTransfer.getData("text/html"), !1, i);
|
|
2447
|
-
let r = !!(o && go(t, e));
|
|
2448
|
-
if (t.someProp("handleDrop", (p) => p(t, e, s || se.empty, r))) {
|
|
2449
|
-
e.preventDefault();
|
|
2450
|
-
return;
|
|
2451
|
-
}
|
|
2452
|
-
if (!s)
|
|
2453
|
-
return;
|
|
2454
|
-
e.preventDefault();
|
|
2455
|
-
let l = s ? So(t.state.doc, i.pos, s) : i.pos;
|
|
2456
|
-
l == null && (l = i.pos);
|
|
2457
|
-
let a = t.state.tr;
|
|
2458
|
-
if (r) {
|
|
2459
|
-
let { node: p } = o;
|
|
2460
|
-
p ? p.replace(a) : a.deleteSelection();
|
|
2461
|
-
}
|
|
2462
|
-
let d = a.mapping.map(l), c = s.openStart == 0 && s.openEnd == 0 && s.content.childCount == 1, h = a.doc;
|
|
2463
|
-
if (c ? a.replaceRangeWith(d, d, s.content.firstChild) : a.replaceRange(d, d, s), a.doc.eq(h))
|
|
2464
|
-
return;
|
|
2465
|
-
let u = a.doc.resolve(d);
|
|
2466
|
-
if (c && w.isSelectable(s.content.firstChild) && u.nodeAfter && u.nodeAfter.sameMarkup(s.content.firstChild))
|
|
2467
|
-
a.setSelection(new w(u));
|
|
2468
|
-
else {
|
|
2469
|
-
let p = a.mapping.map(l);
|
|
2470
|
-
a.mapping.maps[a.mapping.maps.length - 1].forEach((f, g, m, y) => p = y), a.setSelection(Ze(t, u, a.doc.resolve(p)));
|
|
2471
|
-
}
|
|
2472
|
-
t.focus(), t.dispatch(a.setMeta("uiEvent", "drop"));
|
|
2473
|
-
}
|
|
2474
|
-
x.focus = (t) => {
|
|
2475
|
-
t.input.lastFocus = Date.now(), t.focused || (t.domObserver.stop(), t.dom.classList.add("ProseMirror-focused"), t.domObserver.start(), t.focused = !0, setTimeout(() => {
|
|
2476
|
-
t.docView && t.hasFocus() && !t.domObserver.currentSelection.eq(t.domSelectionRange()) && W(t);
|
|
2477
|
-
}, 20));
|
|
2478
|
-
};
|
|
2479
|
-
x.blur = (t, e) => {
|
|
2480
|
-
let o = e;
|
|
2481
|
-
t.focused && (t.domObserver.stop(), t.dom.classList.remove("ProseMirror-focused"), t.domObserver.start(), o.relatedTarget && t.dom.contains(o.relatedTarget) && t.domObserver.currentSelection.clear(), t.focused = !1);
|
|
2482
|
-
};
|
|
2483
|
-
x.beforeinput = (t, e) => {
|
|
2484
|
-
if (S && K && e.inputType == "deleteContentBackward") {
|
|
2485
|
-
t.domObserver.flushSoon();
|
|
2486
|
-
let { domChangeCount: o } = t.input;
|
|
2487
|
-
setTimeout(() => {
|
|
2488
|
-
if (t.input.domChangeCount != o || (t.dom.blur(), t.focus(), t.someProp("handleKeyDown", (i) => i(t, ee(8, "Backspace")))))
|
|
2489
|
-
return;
|
|
2490
|
-
let { $cursor: n } = t.state.selection;
|
|
2491
|
-
n && n.pos > 0 && t.dispatch(t.state.tr.delete(n.pos - 1, n.pos).scrollIntoView());
|
|
2492
|
-
}, 50);
|
|
2493
|
-
}
|
|
2494
|
-
};
|
|
2495
|
-
for (let t in T)
|
|
2496
|
-
x[t] = T[t];
|
|
2497
|
-
function De(t, e) {
|
|
2498
|
-
if (t == e)
|
|
2499
|
-
return !0;
|
|
2500
|
-
for (let o in t)
|
|
2501
|
-
if (t[o] !== e[o])
|
|
2502
|
-
return !1;
|
|
2503
|
-
for (let o in e)
|
|
2504
|
-
if (!(o in t))
|
|
2505
|
-
return !1;
|
|
2506
|
-
return !0;
|
|
2507
|
-
}
|
|
2508
|
-
class ke {
|
|
2509
|
-
constructor(e, o) {
|
|
2510
|
-
this.toDOM = e, this.spec = o || ne, this.side = this.spec.side || 0;
|
|
2511
|
-
}
|
|
2512
|
-
map(e, o, n, i) {
|
|
2513
|
-
let { pos: s, deleted: r } = e.mapResult(o.from + i, this.side < 0 ? -1 : 1);
|
|
2514
|
-
return r ? null : new F(s - n, s - n, this);
|
|
2515
|
-
}
|
|
2516
|
-
valid() {
|
|
2517
|
-
return !0;
|
|
2518
|
-
}
|
|
2519
|
-
eq(e) {
|
|
2520
|
-
return this == e || e instanceof ke && (this.spec.key && this.spec.key == e.spec.key || this.toDOM == e.toDOM && De(this.spec, e.spec));
|
|
2521
|
-
}
|
|
2522
|
-
destroy(e) {
|
|
2523
|
-
this.spec.destroy && this.spec.destroy(e);
|
|
2524
|
-
}
|
|
2525
|
-
}
|
|
2526
|
-
class _ {
|
|
2527
|
-
constructor(e, o) {
|
|
2528
|
-
this.attrs = e, this.spec = o || ne;
|
|
2529
|
-
}
|
|
2530
|
-
map(e, o, n, i) {
|
|
2531
|
-
let s = e.map(o.from + i, this.spec.inclusiveStart ? -1 : 1) - n, r = e.map(o.to + i, this.spec.inclusiveEnd ? 1 : -1) - n;
|
|
2532
|
-
return s >= r ? null : new F(s, r, this);
|
|
2533
|
-
}
|
|
2534
|
-
valid(e, o) {
|
|
2535
|
-
return o.from < o.to;
|
|
2536
|
-
}
|
|
2537
|
-
eq(e) {
|
|
2538
|
-
return this == e || e instanceof _ && De(this.attrs, e.attrs) && De(this.spec, e.spec);
|
|
2539
|
-
}
|
|
2540
|
-
static is(e) {
|
|
2541
|
-
return e.type instanceof _;
|
|
2542
|
-
}
|
|
2543
|
-
destroy() {
|
|
2544
|
-
}
|
|
2545
|
-
}
|
|
2546
|
-
class nt {
|
|
2547
|
-
constructor(e, o) {
|
|
2548
|
-
this.attrs = e, this.spec = o || ne;
|
|
2549
|
-
}
|
|
2550
|
-
map(e, o, n, i) {
|
|
2551
|
-
let s = e.mapResult(o.from + i, 1);
|
|
2552
|
-
if (s.deleted)
|
|
2553
|
-
return null;
|
|
2554
|
-
let r = e.mapResult(o.to + i, -1);
|
|
2555
|
-
return r.deleted || r.pos <= s.pos ? null : new F(s.pos - n, r.pos - n, this);
|
|
2556
|
-
}
|
|
2557
|
-
valid(e, o) {
|
|
2558
|
-
let { index: n, offset: i } = e.content.findIndex(o.from), s;
|
|
2559
|
-
return i == o.from && !(s = e.child(n)).isText && i + s.nodeSize == o.to;
|
|
2560
|
-
}
|
|
2561
|
-
eq(e) {
|
|
2562
|
-
return this == e || e instanceof nt && De(this.attrs, e.attrs) && De(this.spec, e.spec);
|
|
2563
|
-
}
|
|
2564
|
-
destroy() {
|
|
2565
|
-
}
|
|
2566
|
-
}
|
|
2567
|
-
class F {
|
|
2568
|
-
/**
|
|
2569
|
-
@internal
|
|
2570
|
-
*/
|
|
2571
|
-
constructor(e, o, n) {
|
|
2572
|
-
this.from = e, this.to = o, this.type = n;
|
|
2573
|
-
}
|
|
2574
|
-
/**
|
|
2575
|
-
@internal
|
|
2576
|
-
*/
|
|
2577
|
-
copy(e, o) {
|
|
2578
|
-
return new F(e, o, this.type);
|
|
2579
|
-
}
|
|
2580
|
-
/**
|
|
2581
|
-
@internal
|
|
2582
|
-
*/
|
|
2583
|
-
eq(e, o = 0) {
|
|
2584
|
-
return this.type.eq(e.type) && this.from + o == e.from && this.to + o == e.to;
|
|
2585
|
-
}
|
|
2586
|
-
/**
|
|
2587
|
-
@internal
|
|
2588
|
-
*/
|
|
2589
|
-
map(e, o, n) {
|
|
2590
|
-
return this.type.map(e, this, o, n);
|
|
2591
|
-
}
|
|
2592
|
-
/**
|
|
2593
|
-
Creates a widget decoration, which is a DOM node that's shown in
|
|
2594
|
-
the document at the given position. It is recommended that you
|
|
2595
|
-
delay rendering the widget by passing a function that will be
|
|
2596
|
-
called when the widget is actually drawn in a view, but you can
|
|
2597
|
-
also directly pass a DOM node. `getPos` can be used to find the
|
|
2598
|
-
widget's current document position.
|
|
2599
|
-
*/
|
|
2600
|
-
static widget(e, o, n) {
|
|
2601
|
-
return new F(e, e, new ke(o, n));
|
|
2602
|
-
}
|
|
2603
|
-
/**
|
|
2604
|
-
Creates an inline decoration, which adds the given attributes to
|
|
2605
|
-
each inline node between `from` and `to`.
|
|
2606
|
-
*/
|
|
2607
|
-
static inline(e, o, n, i) {
|
|
2608
|
-
return new F(e, o, new _(n, i));
|
|
2609
|
-
}
|
|
2610
|
-
/**
|
|
2611
|
-
Creates a node decoration. `from` and `to` should point precisely
|
|
2612
|
-
before and after a node in the document. That node, and only that
|
|
2613
|
-
node, will receive the given attributes.
|
|
2614
|
-
*/
|
|
2615
|
-
static node(e, o, n, i) {
|
|
2616
|
-
return new F(e, o, new nt(n, i));
|
|
2617
|
-
}
|
|
2618
|
-
/**
|
|
2619
|
-
The spec provided when creating this decoration. Can be useful
|
|
2620
|
-
if you've stored extra information in that object.
|
|
2621
|
-
*/
|
|
2622
|
-
get spec() {
|
|
2623
|
-
return this.type.spec;
|
|
2624
|
-
}
|
|
2625
|
-
/**
|
|
2626
|
-
@internal
|
|
2627
|
-
*/
|
|
2628
|
-
get inline() {
|
|
2629
|
-
return this.type instanceof _;
|
|
2630
|
-
}
|
|
2631
|
-
/**
|
|
2632
|
-
@internal
|
|
2633
|
-
*/
|
|
2634
|
-
get widget() {
|
|
2635
|
-
return this.type instanceof ke;
|
|
2636
|
-
}
|
|
2637
|
-
}
|
|
2638
|
-
const ce = [], ne = {};
|
|
2639
|
-
class D {
|
|
2640
|
-
/**
|
|
2641
|
-
@internal
|
|
2642
|
-
*/
|
|
2643
|
-
constructor(e, o) {
|
|
2644
|
-
this.local = e.length ? e : ce, this.children = o.length ? o : ce;
|
|
2645
|
-
}
|
|
2646
|
-
/**
|
|
2647
|
-
Create a set of decorations, using the structure of the given
|
|
2648
|
-
document. This will consume (modify) the `decorations` array, so
|
|
2649
|
-
you must make a copy if you want need to preserve that.
|
|
2650
|
-
*/
|
|
2651
|
-
static create(e, o) {
|
|
2652
|
-
return o.length ? Ee(o, e, 0, ne) : O;
|
|
2653
|
-
}
|
|
2654
|
-
/**
|
|
2655
|
-
Find all decorations in this set which touch the given range
|
|
2656
|
-
(including decorations that start or end directly at the
|
|
2657
|
-
boundaries) and match the given predicate on their spec. When
|
|
2658
|
-
`start` and `end` are omitted, all decorations in the set are
|
|
2659
|
-
considered. When `predicate` isn't given, all decorations are
|
|
2660
|
-
assumed to match.
|
|
2661
|
-
*/
|
|
2662
|
-
find(e, o, n) {
|
|
2663
|
-
let i = [];
|
|
2664
|
-
return this.findInner(e ?? 0, o ?? 1e9, i, 0, n), i;
|
|
2665
|
-
}
|
|
2666
|
-
findInner(e, o, n, i, s) {
|
|
2667
|
-
for (let r = 0; r < this.local.length; r++) {
|
|
2668
|
-
let l = this.local[r];
|
|
2669
|
-
l.from <= o && l.to >= e && (!s || s(l.spec)) && n.push(l.copy(l.from + i, l.to + i));
|
|
2670
|
-
}
|
|
2671
|
-
for (let r = 0; r < this.children.length; r += 3)
|
|
2672
|
-
if (this.children[r] < o && this.children[r + 1] > e) {
|
|
2673
|
-
let l = this.children[r] + 1;
|
|
2674
|
-
this.children[r + 2].findInner(e - l, o - l, n, i + l, s);
|
|
2675
|
-
}
|
|
2676
|
-
}
|
|
2677
|
-
/**
|
|
2678
|
-
Map the set of decorations in response to a change in the
|
|
2679
|
-
document.
|
|
2680
|
-
*/
|
|
2681
|
-
map(e, o, n) {
|
|
2682
|
-
return this == O || e.maps.length == 0 ? this : this.mapInner(e, o, 0, 0, n || ne);
|
|
2683
|
-
}
|
|
2684
|
-
/**
|
|
2685
|
-
@internal
|
|
2686
|
-
*/
|
|
2687
|
-
mapInner(e, o, n, i, s) {
|
|
2688
|
-
let r;
|
|
2689
|
-
for (let l = 0; l < this.local.length; l++) {
|
|
2690
|
-
let a = this.local[l].map(e, n, i);
|
|
2691
|
-
a && a.type.valid(o, a) ? (r || (r = [])).push(a) : s.onRemove && s.onRemove(this.local[l].spec);
|
|
2692
|
-
}
|
|
2693
|
-
return this.children.length ? Kn(this.children, r || [], e, o, n, i, s) : r ? new D(r.sort(ie), ce) : O;
|
|
2694
|
-
}
|
|
2695
|
-
/**
|
|
2696
|
-
Add the given array of decorations to the ones in the set,
|
|
2697
|
-
producing a new set. Consumes the `decorations` array. Needs
|
|
2698
|
-
access to the current document to create the appropriate tree
|
|
2699
|
-
structure.
|
|
2700
|
-
*/
|
|
2701
|
-
add(e, o) {
|
|
2702
|
-
return o.length ? this == O ? D.create(e, o) : this.addInner(e, o, 0) : this;
|
|
2703
|
-
}
|
|
2704
|
-
addInner(e, o, n) {
|
|
2705
|
-
let i, s = 0;
|
|
2706
|
-
e.forEach((l, a) => {
|
|
2707
|
-
let d = a + n, c;
|
|
2708
|
-
if (c = bo(o, l, d)) {
|
|
2709
|
-
for (i || (i = this.children.slice()); s < i.length && i[s] < a; )
|
|
2710
|
-
s += 3;
|
|
2711
|
-
i[s] == a ? i[s + 2] = i[s + 2].addInner(l, c, d + 1) : i.splice(s, 0, a, a + l.nodeSize, Ee(c, l, d + 1, ne)), s += 3;
|
|
2712
|
-
}
|
|
2713
|
-
});
|
|
2714
|
-
let r = yo(s ? wo(o) : o, -n);
|
|
2715
|
-
for (let l = 0; l < r.length; l++)
|
|
2716
|
-
r[l].type.valid(e, r[l]) || r.splice(l--, 1);
|
|
2717
|
-
return new D(r.length ? this.local.concat(r).sort(ie) : this.local, i || this.children);
|
|
2718
|
-
}
|
|
2719
|
-
/**
|
|
2720
|
-
Create a new set that contains the decorations in this set, minus
|
|
2721
|
-
the ones in the given array.
|
|
2722
|
-
*/
|
|
2723
|
-
remove(e) {
|
|
2724
|
-
return e.length == 0 || this == O ? this : this.removeInner(e, 0);
|
|
2725
|
-
}
|
|
2726
|
-
removeInner(e, o) {
|
|
2727
|
-
let n = this.children, i = this.local;
|
|
2728
|
-
for (let s = 0; s < n.length; s += 3) {
|
|
2729
|
-
let r, l = n[s] + o, a = n[s + 1] + o;
|
|
2730
|
-
for (let c = 0, h; c < e.length; c++)
|
|
2731
|
-
(h = e[c]) && h.from > l && h.to < a && (e[c] = null, (r || (r = [])).push(h));
|
|
2732
|
-
if (!r)
|
|
2733
|
-
continue;
|
|
2734
|
-
n == this.children && (n = this.children.slice());
|
|
2735
|
-
let d = n[s + 2].removeInner(r, l + 1);
|
|
2736
|
-
d != O ? n[s + 2] = d : (n.splice(s, 3), s -= 3);
|
|
2737
|
-
}
|
|
2738
|
-
if (i.length) {
|
|
2739
|
-
for (let s = 0, r; s < e.length; s++)
|
|
2740
|
-
if (r = e[s])
|
|
2741
|
-
for (let l = 0; l < i.length; l++)
|
|
2742
|
-
i[l].eq(r, o) && (i == this.local && (i = this.local.slice()), i.splice(l--, 1));
|
|
2743
|
-
}
|
|
2744
|
-
return n == this.children && i == this.local ? this : i.length || n.length ? new D(i, n) : O;
|
|
2745
|
-
}
|
|
2746
|
-
forChild(e, o) {
|
|
2747
|
-
if (this == O)
|
|
2748
|
-
return this;
|
|
2749
|
-
if (o.isLeaf)
|
|
2750
|
-
return D.empty;
|
|
2751
|
-
let n, i;
|
|
2752
|
-
for (let l = 0; l < this.children.length; l += 3)
|
|
2753
|
-
if (this.children[l] >= e) {
|
|
2754
|
-
this.children[l] == e && (n = this.children[l + 2]);
|
|
2755
|
-
break;
|
|
2756
|
-
}
|
|
2757
|
-
let s = e + 1, r = s + o.content.size;
|
|
2758
|
-
for (let l = 0; l < this.local.length; l++) {
|
|
2759
|
-
let a = this.local[l];
|
|
2760
|
-
if (a.from < r && a.to > s && a.type instanceof _) {
|
|
2761
|
-
let d = Math.max(s, a.from) - s, c = Math.min(r, a.to) - s;
|
|
2762
|
-
d < c && (i || (i = [])).push(a.copy(d, c));
|
|
2763
|
-
}
|
|
2764
|
-
}
|
|
2765
|
-
if (i) {
|
|
2766
|
-
let l = new D(i.sort(ie), ce);
|
|
2767
|
-
return n ? new j([l, n]) : l;
|
|
2768
|
-
}
|
|
2769
|
-
return n || O;
|
|
2770
|
-
}
|
|
2771
|
-
/**
|
|
2772
|
-
@internal
|
|
2773
|
-
*/
|
|
2774
|
-
eq(e) {
|
|
2775
|
-
if (this == e)
|
|
2776
|
-
return !0;
|
|
2777
|
-
if (!(e instanceof D) || this.local.length != e.local.length || this.children.length != e.children.length)
|
|
2778
|
-
return !1;
|
|
2779
|
-
for (let o = 0; o < this.local.length; o++)
|
|
2780
|
-
if (!this.local[o].eq(e.local[o]))
|
|
2781
|
-
return !1;
|
|
2782
|
-
for (let o = 0; o < this.children.length; o += 3)
|
|
2783
|
-
if (this.children[o] != e.children[o] || this.children[o + 1] != e.children[o + 1] || !this.children[o + 2].eq(e.children[o + 2]))
|
|
2784
|
-
return !1;
|
|
2785
|
-
return !0;
|
|
2786
|
-
}
|
|
2787
|
-
/**
|
|
2788
|
-
@internal
|
|
2789
|
-
*/
|
|
2790
|
-
locals(e) {
|
|
2791
|
-
return it(this.localsInner(e));
|
|
2792
|
-
}
|
|
2793
|
-
/**
|
|
2794
|
-
@internal
|
|
2795
|
-
*/
|
|
2796
|
-
localsInner(e) {
|
|
2797
|
-
if (this == O)
|
|
2798
|
-
return ce;
|
|
2799
|
-
if (e.inlineContent || !this.local.some(_.is))
|
|
2800
|
-
return this.local;
|
|
2801
|
-
let o = [];
|
|
2802
|
-
for (let n = 0; n < this.local.length; n++)
|
|
2803
|
-
this.local[n].type instanceof _ || o.push(this.local[n]);
|
|
2804
|
-
return o;
|
|
2805
|
-
}
|
|
2806
|
-
forEachSet(e) {
|
|
2807
|
-
e(this);
|
|
2808
|
-
}
|
|
2809
|
-
}
|
|
2810
|
-
D.empty = new D([], []);
|
|
2811
|
-
D.removeOverlap = it;
|
|
2812
|
-
const O = D.empty;
|
|
2813
|
-
class j {
|
|
2814
|
-
constructor(e) {
|
|
2815
|
-
this.members = e;
|
|
2816
|
-
}
|
|
2817
|
-
map(e, o) {
|
|
2818
|
-
const n = this.members.map((i) => i.map(e, o, ne));
|
|
2819
|
-
return j.from(n);
|
|
2820
|
-
}
|
|
2821
|
-
forChild(e, o) {
|
|
2822
|
-
if (o.isLeaf)
|
|
2823
|
-
return D.empty;
|
|
2824
|
-
let n = [];
|
|
2825
|
-
for (let i = 0; i < this.members.length; i++) {
|
|
2826
|
-
let s = this.members[i].forChild(e, o);
|
|
2827
|
-
s != O && (s instanceof j ? n = n.concat(s.members) : n.push(s));
|
|
2828
|
-
}
|
|
2829
|
-
return j.from(n);
|
|
2830
|
-
}
|
|
2831
|
-
eq(e) {
|
|
2832
|
-
if (!(e instanceof j) || e.members.length != this.members.length)
|
|
2833
|
-
return !1;
|
|
2834
|
-
for (let o = 0; o < this.members.length; o++)
|
|
2835
|
-
if (!this.members[o].eq(e.members[o]))
|
|
2836
|
-
return !1;
|
|
2837
|
-
return !0;
|
|
2838
|
-
}
|
|
2839
|
-
locals(e) {
|
|
2840
|
-
let o, n = !0;
|
|
2841
|
-
for (let i = 0; i < this.members.length; i++) {
|
|
2842
|
-
let s = this.members[i].localsInner(e);
|
|
2843
|
-
if (s.length)
|
|
2844
|
-
if (!o)
|
|
2845
|
-
o = s;
|
|
2846
|
-
else {
|
|
2847
|
-
n && (o = o.slice(), n = !1);
|
|
2848
|
-
for (let r = 0; r < s.length; r++)
|
|
2849
|
-
o.push(s[r]);
|
|
2850
|
-
}
|
|
2851
|
-
}
|
|
2852
|
-
return o ? it(n ? o : o.sort(ie)) : ce;
|
|
2853
|
-
}
|
|
2854
|
-
// Create a group for the given array of decoration sets, or return
|
|
2855
|
-
// a single set when possible.
|
|
2856
|
-
static from(e) {
|
|
2857
|
-
switch (e.length) {
|
|
2858
|
-
case 0:
|
|
2859
|
-
return O;
|
|
2860
|
-
case 1:
|
|
2861
|
-
return e[0];
|
|
2862
|
-
default:
|
|
2863
|
-
return new j(e.every((o) => o instanceof D) ? e : e.reduce((o, n) => o.concat(n instanceof D ? n : n.members), []));
|
|
2864
|
-
}
|
|
2865
|
-
}
|
|
2866
|
-
forEachSet(e) {
|
|
2867
|
-
for (let o = 0; o < this.members.length; o++)
|
|
2868
|
-
this.members[o].forEachSet(e);
|
|
2869
|
-
}
|
|
2870
|
-
}
|
|
2871
|
-
function Kn(t, e, o, n, i, s, r) {
|
|
2872
|
-
let l = t.slice();
|
|
2873
|
-
for (let d = 0, c = s; d < o.maps.length; d++) {
|
|
2874
|
-
let h = 0;
|
|
2875
|
-
o.maps[d].forEach((u, p, f, g) => {
|
|
2876
|
-
let m = g - f - (p - u);
|
|
2877
|
-
for (let y = 0; y < l.length; y += 3) {
|
|
2878
|
-
let B = l[y + 1];
|
|
2879
|
-
if (B < 0 || u > B + c - h)
|
|
2880
|
-
continue;
|
|
2881
|
-
let z = l[y] + c - h;
|
|
2882
|
-
p >= z ? l[y + 1] = u <= z ? -2 : -1 : u >= c && m && (l[y] += m, l[y + 1] += m);
|
|
2883
|
-
}
|
|
2884
|
-
h += m;
|
|
2885
|
-
}), c = o.maps[d].map(c, -1);
|
|
2886
|
-
}
|
|
2887
|
-
let a = !1;
|
|
2888
|
-
for (let d = 0; d < l.length; d += 3)
|
|
2889
|
-
if (l[d + 1] < 0) {
|
|
2890
|
-
if (l[d + 1] == -2) {
|
|
2891
|
-
a = !0, l[d + 1] = -1;
|
|
2892
|
-
continue;
|
|
2893
|
-
}
|
|
2894
|
-
let c = o.map(t[d] + s), h = c - i;
|
|
2895
|
-
if (h < 0 || h >= n.content.size) {
|
|
2896
|
-
a = !0;
|
|
2897
|
-
continue;
|
|
2898
|
-
}
|
|
2899
|
-
let u = o.map(t[d + 1] + s, -1), p = u - i, { index: f, offset: g } = n.content.findIndex(h), m = n.maybeChild(f);
|
|
2900
|
-
if (m && g == h && g + m.nodeSize == p) {
|
|
2901
|
-
let y = l[d + 2].mapInner(o, m, c + 1, t[d] + s + 1, r);
|
|
2902
|
-
y != O ? (l[d] = h, l[d + 1] = p, l[d + 2] = y) : (l[d + 1] = -2, a = !0);
|
|
2903
|
-
} else
|
|
2904
|
-
a = !0;
|
|
2905
|
-
}
|
|
2906
|
-
if (a) {
|
|
2907
|
-
let d = Wn(l, t, e, o, i, s, r), c = Ee(d, n, 0, r);
|
|
2908
|
-
e = c.local;
|
|
2909
|
-
for (let h = 0; h < l.length; h += 3)
|
|
2910
|
-
l[h + 1] < 0 && (l.splice(h, 3), h -= 3);
|
|
2911
|
-
for (let h = 0, u = 0; h < c.children.length; h += 3) {
|
|
2912
|
-
let p = c.children[h];
|
|
2913
|
-
for (; u < l.length && l[u] < p; )
|
|
2914
|
-
u += 3;
|
|
2915
|
-
l.splice(u, 0, c.children[h], c.children[h + 1], c.children[h + 2]);
|
|
2916
|
-
}
|
|
2917
|
-
}
|
|
2918
|
-
return new D(e.sort(ie), l);
|
|
2919
|
-
}
|
|
2920
|
-
function yo(t, e) {
|
|
2921
|
-
if (!e || !t.length)
|
|
2922
|
-
return t;
|
|
2923
|
-
let o = [];
|
|
2924
|
-
for (let n = 0; n < t.length; n++) {
|
|
2925
|
-
let i = t[n];
|
|
2926
|
-
o.push(new F(i.from + e, i.to + e, i.type));
|
|
2927
|
-
}
|
|
2928
|
-
return o;
|
|
2929
|
-
}
|
|
2930
|
-
function Wn(t, e, o, n, i, s, r) {
|
|
2931
|
-
function l(a, d) {
|
|
2932
|
-
for (let c = 0; c < a.local.length; c++) {
|
|
2933
|
-
let h = a.local[c].map(n, i, d);
|
|
2934
|
-
h ? o.push(h) : r.onRemove && r.onRemove(a.local[c].spec);
|
|
2935
|
-
}
|
|
2936
|
-
for (let c = 0; c < a.children.length; c += 3)
|
|
2937
|
-
l(a.children[c + 2], a.children[c] + d + 1);
|
|
2938
|
-
}
|
|
2939
|
-
for (let a = 0; a < t.length; a += 3)
|
|
2940
|
-
t[a + 1] == -1 && l(t[a + 2], e[a] + s + 1);
|
|
2941
|
-
return o;
|
|
2942
|
-
}
|
|
2943
|
-
function bo(t, e, o) {
|
|
2944
|
-
if (e.isLeaf)
|
|
2945
|
-
return null;
|
|
2946
|
-
let n = o + e.nodeSize, i = null;
|
|
2947
|
-
for (let s = 0, r; s < t.length; s++)
|
|
2948
|
-
(r = t[s]) && r.from > o && r.to < n && ((i || (i = [])).push(r), t[s] = null);
|
|
2949
|
-
return i;
|
|
2950
|
-
}
|
|
2951
|
-
function wo(t) {
|
|
2952
|
-
let e = [];
|
|
2953
|
-
for (let o = 0; o < t.length; o++)
|
|
2954
|
-
t[o] != null && e.push(t[o]);
|
|
2955
|
-
return e;
|
|
2956
|
-
}
|
|
2957
|
-
function Ee(t, e, o, n) {
|
|
2958
|
-
let i = [], s = !1;
|
|
2959
|
-
e.forEach((l, a) => {
|
|
2960
|
-
let d = bo(t, l, a + o);
|
|
2961
|
-
if (d) {
|
|
2962
|
-
s = !0;
|
|
2963
|
-
let c = Ee(d, l, o + a + 1, n);
|
|
2964
|
-
c != O && i.push(a, a + l.nodeSize, c);
|
|
2965
|
-
}
|
|
2966
|
-
});
|
|
2967
|
-
let r = yo(s ? wo(t) : t, -o).sort(ie);
|
|
2968
|
-
for (let l = 0; l < r.length; l++)
|
|
2969
|
-
r[l].type.valid(e, r[l]) || (n.onRemove && n.onRemove(r[l].spec), r.splice(l--, 1));
|
|
2970
|
-
return r.length || i.length ? new D(r, i) : O;
|
|
2971
|
-
}
|
|
2972
|
-
function ie(t, e) {
|
|
2973
|
-
return t.from - e.from || t.to - e.to;
|
|
2974
|
-
}
|
|
2975
|
-
function it(t) {
|
|
2976
|
-
let e = t;
|
|
2977
|
-
for (let o = 0; o < e.length - 1; o++) {
|
|
2978
|
-
let n = e[o];
|
|
2979
|
-
if (n.from != n.to)
|
|
2980
|
-
for (let i = o + 1; i < e.length; i++) {
|
|
2981
|
-
let s = e[i];
|
|
2982
|
-
if (s.from == n.from) {
|
|
2983
|
-
s.to != n.to && (e == t && (e = t.slice()), e[i] = s.copy(s.from, n.to), xt(e, i + 1, s.copy(n.to, s.to)));
|
|
2984
|
-
continue;
|
|
2985
|
-
} else {
|
|
2986
|
-
s.from < n.to && (e == t && (e = t.slice()), e[o] = n.copy(n.from, s.from), xt(e, i, n.copy(s.from, n.to)));
|
|
2987
|
-
break;
|
|
2988
|
-
}
|
|
2989
|
-
}
|
|
2990
|
-
}
|
|
2991
|
-
return e;
|
|
2992
|
-
}
|
|
2993
|
-
function xt(t, e, o) {
|
|
2994
|
-
for (; e < t.length && ie(o, t[e]) > 0; )
|
|
2995
|
-
e++;
|
|
2996
|
-
t.splice(e, 0, o);
|
|
2997
|
-
}
|
|
2998
|
-
function Ie(t) {
|
|
2999
|
-
let e = [];
|
|
3000
|
-
return t.someProp("decorations", (o) => {
|
|
3001
|
-
let n = o(t.state);
|
|
3002
|
-
n && n != O && e.push(n);
|
|
3003
|
-
}), t.cursorWrapper && e.push(D.create(t.state.doc, [t.cursorWrapper.deco])), j.from(e);
|
|
3004
|
-
}
|
|
3005
|
-
const Hn = {
|
|
3006
|
-
childList: !0,
|
|
3007
|
-
characterData: !0,
|
|
3008
|
-
characterDataOldValue: !0,
|
|
3009
|
-
attributes: !0,
|
|
3010
|
-
attributeOldValue: !0,
|
|
3011
|
-
subtree: !0
|
|
3012
|
-
}, Un = E && X <= 11;
|
|
3013
|
-
class Gn {
|
|
3014
|
-
constructor() {
|
|
3015
|
-
this.anchorNode = null, this.anchorOffset = 0, this.focusNode = null, this.focusOffset = 0;
|
|
3016
|
-
}
|
|
3017
|
-
set(e) {
|
|
3018
|
-
this.anchorNode = e.anchorNode, this.anchorOffset = e.anchorOffset, this.focusNode = e.focusNode, this.focusOffset = e.focusOffset;
|
|
3019
|
-
}
|
|
3020
|
-
clear() {
|
|
3021
|
-
this.anchorNode = this.focusNode = null;
|
|
3022
|
-
}
|
|
3023
|
-
eq(e) {
|
|
3024
|
-
return e.anchorNode == this.anchorNode && e.anchorOffset == this.anchorOffset && e.focusNode == this.focusNode && e.focusOffset == this.focusOffset;
|
|
3025
|
-
}
|
|
3026
|
-
}
|
|
3027
|
-
class jn {
|
|
3028
|
-
constructor(e, o) {
|
|
3029
|
-
this.view = e, this.handleDOMChange = o, this.queue = [], this.flushingSoon = -1, this.observer = null, this.currentSelection = new Gn(), this.onCharData = null, this.suppressingSelectionUpdates = !1, this.lastChangedTextNode = null, this.observer = window.MutationObserver && new window.MutationObserver((n) => {
|
|
3030
|
-
for (let i = 0; i < n.length; i++)
|
|
3031
|
-
this.queue.push(n[i]);
|
|
3032
|
-
E && X <= 11 && n.some((i) => i.type == "childList" && i.removedNodes.length || i.type == "characterData" && i.oldValue.length > i.target.nodeValue.length) ? this.flushSoon() : C && e.composing && n.some((i) => i.type == "childList" && i.target.nodeName == "TR") ? (e.input.badSafariComposition = !0, this.flushSoon()) : this.flush();
|
|
3033
|
-
}), Un && (this.onCharData = (n) => {
|
|
3034
|
-
this.queue.push({ target: n.target, type: "characterData", oldValue: n.prevValue }), this.flushSoon();
|
|
3035
|
-
}), this.onSelectionChange = this.onSelectionChange.bind(this);
|
|
3036
|
-
}
|
|
3037
|
-
flushSoon() {
|
|
3038
|
-
this.flushingSoon < 0 && (this.flushingSoon = window.setTimeout(() => {
|
|
3039
|
-
this.flushingSoon = -1, this.flush();
|
|
3040
|
-
}, 20));
|
|
3041
|
-
}
|
|
3042
|
-
forceFlush() {
|
|
3043
|
-
this.flushingSoon > -1 && (window.clearTimeout(this.flushingSoon), this.flushingSoon = -1, this.flush());
|
|
3044
|
-
}
|
|
3045
|
-
start() {
|
|
3046
|
-
this.observer && (this.observer.takeRecords(), this.observer.observe(this.view.dom, Hn)), this.onCharData && this.view.dom.addEventListener("DOMCharacterDataModified", this.onCharData), this.connectSelection();
|
|
3047
|
-
}
|
|
3048
|
-
stop() {
|
|
3049
|
-
if (this.observer) {
|
|
3050
|
-
let e = this.observer.takeRecords();
|
|
3051
|
-
if (e.length) {
|
|
3052
|
-
for (let o = 0; o < e.length; o++)
|
|
3053
|
-
this.queue.push(e[o]);
|
|
3054
|
-
window.setTimeout(() => this.flush(), 20);
|
|
3055
|
-
}
|
|
3056
|
-
this.observer.disconnect();
|
|
3057
|
-
}
|
|
3058
|
-
this.onCharData && this.view.dom.removeEventListener("DOMCharacterDataModified", this.onCharData), this.disconnectSelection();
|
|
3059
|
-
}
|
|
3060
|
-
connectSelection() {
|
|
3061
|
-
this.view.dom.ownerDocument.addEventListener("selectionchange", this.onSelectionChange);
|
|
3062
|
-
}
|
|
3063
|
-
disconnectSelection() {
|
|
3064
|
-
this.view.dom.ownerDocument.removeEventListener("selectionchange", this.onSelectionChange);
|
|
3065
|
-
}
|
|
3066
|
-
suppressSelectionUpdates() {
|
|
3067
|
-
this.suppressingSelectionUpdates = !0, setTimeout(() => this.suppressingSelectionUpdates = !1, 50);
|
|
3068
|
-
}
|
|
3069
|
-
onSelectionChange() {
|
|
3070
|
-
if (wt(this.view)) {
|
|
3071
|
-
if (this.suppressingSelectionUpdates)
|
|
3072
|
-
return W(this.view);
|
|
3073
|
-
if (E && X <= 11 && !this.view.state.selection.empty) {
|
|
3074
|
-
let e = this.view.domSelectionRange();
|
|
3075
|
-
if (e.focusNode && re(e.focusNode, e.focusOffset, e.anchorNode, e.anchorOffset))
|
|
3076
|
-
return this.flushSoon();
|
|
3077
|
-
}
|
|
3078
|
-
this.flush();
|
|
3079
|
-
}
|
|
3080
|
-
}
|
|
3081
|
-
setCurSelection() {
|
|
3082
|
-
this.currentSelection.set(this.view.domSelectionRange());
|
|
3083
|
-
}
|
|
3084
|
-
ignoreSelectionChange(e) {
|
|
3085
|
-
if (!e.focusNode)
|
|
3086
|
-
return !0;
|
|
3087
|
-
let o = /* @__PURE__ */ new Set(), n;
|
|
3088
|
-
for (let s = e.focusNode; s; s = fe(s))
|
|
3089
|
-
o.add(s);
|
|
3090
|
-
for (let s = e.anchorNode; s; s = fe(s))
|
|
3091
|
-
if (o.has(s)) {
|
|
3092
|
-
n = s;
|
|
3093
|
-
break;
|
|
3094
|
-
}
|
|
3095
|
-
let i = n && this.view.docView.nearestDesc(n);
|
|
3096
|
-
if (i && i.ignoreMutation({
|
|
3097
|
-
type: "selection",
|
|
3098
|
-
target: n.nodeType == 3 ? n.parentNode : n
|
|
3099
|
-
}))
|
|
3100
|
-
return this.setCurSelection(), !0;
|
|
3101
|
-
}
|
|
3102
|
-
pendingRecords() {
|
|
3103
|
-
if (this.observer)
|
|
3104
|
-
for (let e of this.observer.takeRecords())
|
|
3105
|
-
this.queue.push(e);
|
|
3106
|
-
return this.queue;
|
|
3107
|
-
}
|
|
3108
|
-
flush() {
|
|
3109
|
-
let { view: e } = this;
|
|
3110
|
-
if (!e.docView || this.flushingSoon > -1)
|
|
3111
|
-
return;
|
|
3112
|
-
let o = this.pendingRecords();
|
|
3113
|
-
o.length && (this.queue = []);
|
|
3114
|
-
let n = e.domSelectionRange(), i = !this.suppressingSelectionUpdates && !this.currentSelection.eq(n) && wt(e) && !this.ignoreSelectionChange(n), s = -1, r = -1, l = !1, a = [];
|
|
3115
|
-
if (e.editable)
|
|
3116
|
-
for (let c = 0; c < o.length; c++) {
|
|
3117
|
-
let h = this.registerMutation(o[c], a);
|
|
3118
|
-
h && (s = s < 0 ? h.from : Math.min(h.from, s), r = r < 0 ? h.to : Math.max(h.to, r), h.typeOver && (l = !0));
|
|
3119
|
-
}
|
|
3120
|
-
if (a.some((c) => c.nodeName == "BR") && (e.input.lastKeyCode == 8 || e.input.lastKeyCode == 46)) {
|
|
3121
|
-
for (let c of a)
|
|
3122
|
-
if (c.nodeName == "BR" && c.parentNode) {
|
|
3123
|
-
let h = c.nextSibling;
|
|
3124
|
-
for (; h && h.nodeType == 1; ) {
|
|
3125
|
-
if (h.contentEditable == "false") {
|
|
3126
|
-
c.parentNode.removeChild(c);
|
|
3127
|
-
break;
|
|
3128
|
-
}
|
|
3129
|
-
h = h.firstChild;
|
|
3130
|
-
}
|
|
3131
|
-
}
|
|
3132
|
-
} else if (V && a.length) {
|
|
3133
|
-
let c = a.filter((h) => h.nodeName == "BR");
|
|
3134
|
-
if (c.length == 2) {
|
|
3135
|
-
let [h, u] = c;
|
|
3136
|
-
h.parentNode && h.parentNode.parentNode == u.parentNode ? u.remove() : h.remove();
|
|
3137
|
-
} else {
|
|
3138
|
-
let { focusNode: h } = this.currentSelection;
|
|
3139
|
-
for (let u of c) {
|
|
3140
|
-
let p = u.parentNode;
|
|
3141
|
-
p && p.nodeName == "LI" && (!h || Jn(e, h) != p) && u.remove();
|
|
3142
|
-
}
|
|
3143
|
-
}
|
|
3144
|
-
}
|
|
3145
|
-
let d = null;
|
|
3146
|
-
s < 0 && i && e.input.lastFocus > Date.now() - 200 && Math.max(e.input.lastTouch, e.input.lastClick.time) < Date.now() - 300 && Ae(n) && (d = _e(e)) && d.eq(be.near(e.state.doc.resolve(0), 1)) ? (e.input.lastFocus = 0, W(e), this.currentSelection.set(n), e.scrollToSelection()) : (s > -1 || i) && (s > -1 && (e.docView.markDirty(s, r), Yn(e)), e.input.badSafariComposition && (e.input.badSafariComposition = !1, _n(e, a)), this.handleDOMChange(s, r, l, a), e.docView && e.docView.dirty ? e.updateState(e.state) : this.currentSelection.eq(n) || W(e), this.currentSelection.set(n));
|
|
3147
|
-
}
|
|
3148
|
-
registerMutation(e, o) {
|
|
3149
|
-
if (o.indexOf(e.target) > -1)
|
|
3150
|
-
return null;
|
|
3151
|
-
let n = this.view.docView.nearestDesc(e.target);
|
|
3152
|
-
if (e.type == "attributes" && (n == this.view.docView || e.attributeName == "contenteditable" || // Firefox sometimes fires spurious events for null/empty styles
|
|
3153
|
-
e.attributeName == "style" && !e.oldValue && !e.target.getAttribute("style")) || !n || n.ignoreMutation(e))
|
|
3154
|
-
return null;
|
|
3155
|
-
if (e.type == "childList") {
|
|
3156
|
-
for (let c = 0; c < e.addedNodes.length; c++) {
|
|
3157
|
-
let h = e.addedNodes[c];
|
|
3158
|
-
o.push(h), h.nodeType == 3 && (this.lastChangedTextNode = h);
|
|
3159
|
-
}
|
|
3160
|
-
if (n.contentDOM && n.contentDOM != n.dom && !n.contentDOM.contains(e.target))
|
|
3161
|
-
return { from: n.posBefore, to: n.posAfter };
|
|
3162
|
-
let i = e.previousSibling, s = e.nextSibling;
|
|
3163
|
-
if (E && X <= 11 && e.addedNodes.length)
|
|
3164
|
-
for (let c = 0; c < e.addedNodes.length; c++) {
|
|
3165
|
-
let { previousSibling: h, nextSibling: u } = e.addedNodes[c];
|
|
3166
|
-
(!h || Array.prototype.indexOf.call(e.addedNodes, h) < 0) && (i = h), (!u || Array.prototype.indexOf.call(e.addedNodes, u) < 0) && (s = u);
|
|
3167
|
-
}
|
|
3168
|
-
let r = i && i.parentNode == e.target ? N(i) + 1 : 0, l = n.localPosFromDOM(e.target, r, -1), a = s && s.parentNode == e.target ? N(s) : e.target.childNodes.length, d = n.localPosFromDOM(e.target, a, 1);
|
|
3169
|
-
return { from: l, to: d };
|
|
3170
|
-
} else return e.type == "attributes" ? { from: n.posAtStart - n.border, to: n.posAtEnd + n.border } : (this.lastChangedTextNode = e.target, {
|
|
3171
|
-
from: n.posAtStart,
|
|
3172
|
-
to: n.posAtEnd,
|
|
3173
|
-
// An event was generated for a text change that didn't change
|
|
3174
|
-
// any text. Mark the dom change to fall back to assuming the
|
|
3175
|
-
// selection was typed over with an identical value if it can't
|
|
3176
|
-
// find another change.
|
|
3177
|
-
typeOver: e.target.nodeValue == e.oldValue
|
|
3178
|
-
});
|
|
3179
|
-
}
|
|
3180
|
-
}
|
|
3181
|
-
let Tt = /* @__PURE__ */ new WeakMap(), kt = !1;
|
|
3182
|
-
function Yn(t) {
|
|
3183
|
-
if (!Tt.has(t) && (Tt.set(t, null), ["normal", "nowrap", "pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace) !== -1)) {
|
|
3184
|
-
if (t.requiresGeckoHackNode = V, kt)
|
|
3185
|
-
return;
|
|
3186
|
-
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."), kt = !0;
|
|
3187
|
-
}
|
|
3188
|
-
}
|
|
3189
|
-
function Et(t, e) {
|
|
3190
|
-
let o = e.startContainer, n = e.startOffset, i = e.endContainer, s = e.endOffset, r = t.domAtPos(t.state.selection.anchor);
|
|
3191
|
-
return re(r.node, r.offset, i, s) && ([o, n, i, s] = [i, s, o, n]), { anchorNode: o, anchorOffset: n, focusNode: i, focusOffset: s };
|
|
3192
|
-
}
|
|
3193
|
-
function Xn(t, e) {
|
|
3194
|
-
if (e.getComposedRanges) {
|
|
3195
|
-
let i = e.getComposedRanges(t.root)[0];
|
|
3196
|
-
if (i)
|
|
3197
|
-
return Et(t, i);
|
|
3198
|
-
}
|
|
3199
|
-
let o;
|
|
3200
|
-
function n(i) {
|
|
3201
|
-
i.preventDefault(), i.stopImmediatePropagation(), o = i.getTargetRanges()[0];
|
|
3202
|
-
}
|
|
3203
|
-
return t.dom.addEventListener("beforeinput", n, !0), document.execCommand("indent"), t.dom.removeEventListener("beforeinput", n, !0), o ? Et(t, o) : null;
|
|
3204
|
-
}
|
|
3205
|
-
function Jn(t, e) {
|
|
3206
|
-
for (let o = e.parentNode; o && o != t.dom; o = o.parentNode) {
|
|
3207
|
-
let n = t.docView.nearestDesc(o, !0);
|
|
3208
|
-
if (n && n.node.isBlock)
|
|
3209
|
-
return o;
|
|
3210
|
-
}
|
|
3211
|
-
return null;
|
|
3212
|
-
}
|
|
3213
|
-
function _n(t, e) {
|
|
3214
|
-
var o;
|
|
3215
|
-
let { focusNode: n, focusOffset: i } = t.domSelectionRange();
|
|
3216
|
-
for (let s of e)
|
|
3217
|
-
if (((o = s.parentNode) === null || o === void 0 ? void 0 : o.nodeName) == "TR") {
|
|
3218
|
-
let r = s.nextSibling;
|
|
3219
|
-
for (; r && r.nodeName != "TD" && r.nodeName != "TH"; )
|
|
3220
|
-
r = r.nextSibling;
|
|
3221
|
-
if (r) {
|
|
3222
|
-
let l = r;
|
|
3223
|
-
for (; ; ) {
|
|
3224
|
-
let a = l.firstChild;
|
|
3225
|
-
if (!a || a.nodeType != 1 || a.contentEditable == "false" || /^(BR|IMG)$/.test(a.nodeName))
|
|
3226
|
-
break;
|
|
3227
|
-
l = a;
|
|
3228
|
-
}
|
|
3229
|
-
l.insertBefore(s, l.firstChild), n == s && t.domSelection().collapse(s, i);
|
|
3230
|
-
} else
|
|
3231
|
-
s.parentNode.removeChild(s);
|
|
3232
|
-
}
|
|
3233
|
-
}
|
|
3234
|
-
function Zn(t, e, o) {
|
|
3235
|
-
let { node: n, fromOffset: i, toOffset: s, from: r, to: l } = t.docView.parseRange(e, o), a = t.domSelectionRange(), d, c = a.anchorNode;
|
|
3236
|
-
if (c && t.dom.contains(c.nodeType == 1 ? c : c.parentNode) && (d = [{ node: c, offset: a.anchorOffset }], Ae(a) || d.push({ node: a.focusNode, offset: a.focusOffset })), S && t.input.lastKeyCode === 8)
|
|
3237
|
-
for (let m = s; m > i; m--) {
|
|
3238
|
-
let y = n.childNodes[m - 1], B = y.pmViewDesc;
|
|
3239
|
-
if (y.nodeName == "BR" && !B) {
|
|
3240
|
-
s = m;
|
|
3241
|
-
break;
|
|
3242
|
-
}
|
|
3243
|
-
if (!B || B.size)
|
|
3244
|
-
break;
|
|
3245
|
-
}
|
|
3246
|
-
let h = t.state.doc, u = t.someProp("domParser") || It.fromSchema(t.state.schema), p = h.resolve(r), f = null, g = u.parse(n, {
|
|
3247
|
-
topNode: p.parent,
|
|
3248
|
-
topMatch: p.parent.contentMatchAt(p.index()),
|
|
3249
|
-
topOpen: !0,
|
|
3250
|
-
from: i,
|
|
3251
|
-
to: s,
|
|
3252
|
-
preserveWhitespace: p.parent.type.whitespace == "pre" ? "full" : !0,
|
|
3253
|
-
findPositions: d,
|
|
3254
|
-
ruleFromNode: Qn,
|
|
3255
|
-
context: p
|
|
3256
|
-
});
|
|
3257
|
-
if (d && d[0].pos != null) {
|
|
3258
|
-
let m = d[0].pos, y = d[1] && d[1].pos;
|
|
3259
|
-
y == null && (y = m), f = { anchor: m + r, head: y + r };
|
|
3260
|
-
}
|
|
3261
|
-
return { doc: g, sel: f, from: r, to: l };
|
|
3262
|
-
}
|
|
3263
|
-
function Qn(t) {
|
|
3264
|
-
let e = t.pmViewDesc;
|
|
3265
|
-
if (e)
|
|
3266
|
-
return e.parseRule();
|
|
3267
|
-
if (t.nodeName == "BR" && t.parentNode) {
|
|
3268
|
-
if (C && /^(ul|ol)$/i.test(t.parentNode.nodeName)) {
|
|
3269
|
-
let o = document.createElement("div");
|
|
3270
|
-
return o.appendChild(document.createElement("li")), { skip: o };
|
|
3271
|
-
} else if (t.parentNode.lastChild == t || C && /^(tr|table)$/i.test(t.parentNode.nodeName))
|
|
3272
|
-
return { ignore: !0 };
|
|
3273
|
-
} else if (t.nodeName == "IMG" && t.getAttribute("mark-placeholder"))
|
|
3274
|
-
return { ignore: !0 };
|
|
3275
|
-
return null;
|
|
3276
|
-
}
|
|
3277
|
-
const ei = /^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;
|
|
3278
|
-
function ti(t, e, o, n, i) {
|
|
3279
|
-
let s = t.input.compositionPendingChanges || (t.composing ? t.input.compositionID : 0);
|
|
3280
|
-
if (t.input.compositionPendingChanges = 0, e < 0) {
|
|
3281
|
-
let b = t.input.lastSelectionTime > Date.now() - 50 ? t.input.lastSelectionOrigin : null, v = _e(t, b);
|
|
3282
|
-
if (v && !t.state.selection.eq(v)) {
|
|
3283
|
-
if (S && K && t.input.lastKeyCode === 13 && Date.now() - 100 < t.input.lastKeyCodeTime && t.someProp("handleKeyDown", (vo) => vo(t, ee(13, "Enter"))))
|
|
3284
|
-
return;
|
|
3285
|
-
let k = t.state.tr.setSelection(v);
|
|
3286
|
-
b == "pointer" ? k.setMeta("pointer", !0) : b == "key" && k.scrollIntoView(), s && k.setMeta("composition", s), t.dispatch(k);
|
|
3287
|
-
}
|
|
3288
|
-
return;
|
|
3289
|
-
}
|
|
3290
|
-
let r = t.state.doc.resolve(e), l = r.sharedDepth(o);
|
|
3291
|
-
e = r.before(l + 1), o = t.state.doc.resolve(o).after(l + 1);
|
|
3292
|
-
let a = t.state.selection, d = Zn(t, e, o), c = t.state.doc, h = c.slice(d.from, d.to), u, p;
|
|
3293
|
-
t.input.lastKeyCode === 8 && Date.now() - 100 < t.input.lastKeyCodeTime ? (u = t.state.selection.to, p = "end") : (u = t.state.selection.from, p = "start"), t.input.lastKeyCode = null;
|
|
3294
|
-
let f = ii(h.content, d.doc.content, d.from, u, p);
|
|
3295
|
-
if (f && t.input.domChangeCount++, (ue && t.input.lastIOSEnter > Date.now() - 225 || K) && i.some((b) => b.nodeType == 1 && !ei.test(b.nodeName)) && (!f || f.endA >= f.endB) && t.someProp("handleKeyDown", (b) => b(t, ee(13, "Enter")))) {
|
|
3296
|
-
t.input.lastIOSEnter = 0;
|
|
3297
|
-
return;
|
|
3298
|
-
}
|
|
3299
|
-
if (!f)
|
|
3300
|
-
if (n && a instanceof M && !a.empty && a.$head.sameParent(a.$anchor) && !t.composing && !(d.sel && d.sel.anchor != d.sel.head))
|
|
3301
|
-
f = { start: a.from, endA: a.to, endB: a.to };
|
|
3302
|
-
else {
|
|
3303
|
-
if (d.sel) {
|
|
3304
|
-
let b = Pt(t, t.state.doc, d.sel);
|
|
3305
|
-
if (b && !b.eq(t.state.selection)) {
|
|
3306
|
-
let v = t.state.tr.setSelection(b);
|
|
3307
|
-
s && v.setMeta("composition", s), t.dispatch(v);
|
|
3308
|
-
}
|
|
3309
|
-
}
|
|
3310
|
-
return;
|
|
3311
|
-
}
|
|
3312
|
-
t.state.selection.from < t.state.selection.to && f.start == f.endB && t.state.selection instanceof M && (f.start > t.state.selection.from && f.start <= t.state.selection.from + 2 && t.state.selection.from >= d.from ? f.start = t.state.selection.from : f.endA < t.state.selection.to && f.endA >= t.state.selection.to - 2 && t.state.selection.to <= d.to && (f.endB += t.state.selection.to - f.endA, f.endA = t.state.selection.to)), E && X <= 11 && f.endB == f.start + 1 && f.endA == f.start && f.start > d.from && d.doc.textBetween(f.start - d.from - 1, f.start - d.from + 1) == " " && (f.start--, f.endA--, f.endB--);
|
|
3313
|
-
let g = d.doc.resolveNoCache(f.start - d.from), m = d.doc.resolveNoCache(f.endB - d.from), y = c.resolve(f.start), B = g.sameParent(m) && g.parent.inlineContent && y.end() >= f.endA;
|
|
3314
|
-
if ((ue && t.input.lastIOSEnter > Date.now() - 225 && (!B || i.some((b) => b.nodeName == "DIV" || b.nodeName == "P")) || !B && g.pos < d.doc.content.size && (!g.sameParent(m) || !g.parent.inlineContent) && g.pos < m.pos && !/\S/.test(d.doc.textBetween(g.pos, m.pos, "", ""))) && t.someProp("handleKeyDown", (b) => b(t, ee(13, "Enter")))) {
|
|
3315
|
-
t.input.lastIOSEnter = 0;
|
|
3316
|
-
return;
|
|
3317
|
-
}
|
|
3318
|
-
if (t.state.selection.anchor > f.start && ni(c, f.start, f.endA, g, m) && t.someProp("handleKeyDown", (b) => b(t, ee(8, "Backspace")))) {
|
|
3319
|
-
K && S && t.domObserver.suppressSelectionUpdates();
|
|
3320
|
-
return;
|
|
3321
|
-
}
|
|
3322
|
-
S && f.endB == f.start && (t.input.lastChromeDelete = Date.now()), K && !B && g.start() != m.start() && m.parentOffset == 0 && g.depth == m.depth && d.sel && d.sel.anchor == d.sel.head && d.sel.head == f.endA && (f.endB -= 2, m = d.doc.resolveNoCache(f.endB - d.from), setTimeout(() => {
|
|
3323
|
-
t.someProp("handleKeyDown", function(b) {
|
|
3324
|
-
return b(t, ee(13, "Enter"));
|
|
3325
|
-
});
|
|
3326
|
-
}, 20));
|
|
3327
|
-
let z = f.start, Q = f.endA, pe = (b) => {
|
|
3328
|
-
let v = b || t.state.tr.replace(z, Q, d.doc.slice(f.start - d.from, f.endB - d.from));
|
|
3329
|
-
if (d.sel) {
|
|
3330
|
-
let k = Pt(t, v.doc, d.sel);
|
|
3331
|
-
k && !(S && t.composing && k.empty && (f.start != f.endB || t.input.lastChromeDelete < Date.now() - 100) && (k.head == z || k.head == v.mapping.map(Q) - 1) || E && k.empty && k.head == z) && v.setSelection(k);
|
|
3332
|
-
}
|
|
3333
|
-
return s && v.setMeta("composition", s), v.scrollIntoView();
|
|
3334
|
-
}, Ce;
|
|
3335
|
-
if (B)
|
|
3336
|
-
if (g.pos == m.pos) {
|
|
3337
|
-
E && X <= 11 && g.parentOffset == 0 && (t.domObserver.suppressSelectionUpdates(), setTimeout(() => W(t), 20));
|
|
3338
|
-
let b = pe(t.state.tr.delete(z, Q)), v = c.resolve(f.start).marksAcross(c.resolve(f.endA));
|
|
3339
|
-
v && b.ensureMarks(v), t.dispatch(b);
|
|
3340
|
-
} else if (
|
|
3341
|
-
// Adding or removing a mark
|
|
3342
|
-
f.endA == f.endB && (Ce = oi(g.parent.content.cut(g.parentOffset, m.parentOffset), y.parent.content.cut(y.parentOffset, f.endA - y.start())))
|
|
3343
|
-
) {
|
|
3344
|
-
let b = pe(t.state.tr);
|
|
3345
|
-
Ce.type == "add" ? b.addMark(z, Q, Ce.mark) : b.removeMark(z, Q, Ce.mark), t.dispatch(b);
|
|
3346
|
-
} else if (g.parent.child(g.index()).isText && g.index() == m.index() - (m.textOffset ? 0 : 1)) {
|
|
3347
|
-
let b = g.parent.textBetween(g.parentOffset, m.parentOffset), v = () => pe(t.state.tr.insertText(b, z, Q));
|
|
3348
|
-
t.someProp("handleTextInput", (k) => k(t, z, Q, b, v)) || t.dispatch(v());
|
|
3349
|
-
} else
|
|
3350
|
-
t.dispatch(pe());
|
|
3351
|
-
else
|
|
3352
|
-
t.dispatch(pe());
|
|
3353
|
-
}
|
|
3354
|
-
function Pt(t, e, o) {
|
|
3355
|
-
return Math.max(o.anchor, o.head) > e.content.size ? null : Ze(t, e.resolve(o.anchor), e.resolve(o.head));
|
|
3356
|
-
}
|
|
3357
|
-
function oi(t, e) {
|
|
3358
|
-
let o = t.firstChild.marks, n = e.firstChild.marks, i = o, s = n, r, l, a;
|
|
3359
|
-
for (let c = 0; c < n.length; c++)
|
|
3360
|
-
i = n[c].removeFromSet(i);
|
|
3361
|
-
for (let c = 0; c < o.length; c++)
|
|
3362
|
-
s = o[c].removeFromSet(s);
|
|
3363
|
-
if (i.length == 1 && s.length == 0)
|
|
3364
|
-
l = i[0], r = "add", a = (c) => c.mark(l.addToSet(c.marks));
|
|
3365
|
-
else if (i.length == 0 && s.length == 1)
|
|
3366
|
-
l = s[0], r = "remove", a = (c) => c.mark(l.removeFromSet(c.marks));
|
|
3367
|
-
else
|
|
3368
|
-
return null;
|
|
3369
|
-
let d = [];
|
|
3370
|
-
for (let c = 0; c < e.childCount; c++)
|
|
3371
|
-
d.push(a(e.child(c)));
|
|
3372
|
-
if (H.from(d).eq(t))
|
|
3373
|
-
return { mark: l, type: r };
|
|
3374
|
-
}
|
|
3375
|
-
function ni(t, e, o, n, i) {
|
|
3376
|
-
if (
|
|
3377
|
-
// The content must have shrunk
|
|
3378
|
-
o - e <= i.pos - n.pos || // newEnd must point directly at or after the end of the block that newStart points into
|
|
3379
|
-
Le(n, !0, !1) < i.pos
|
|
3380
|
-
)
|
|
3381
|
-
return !1;
|
|
3382
|
-
let s = t.resolve(e);
|
|
3383
|
-
if (!n.parent.isTextblock) {
|
|
3384
|
-
let l = s.nodeAfter;
|
|
3385
|
-
return l != null && o == e + l.nodeSize;
|
|
3386
|
-
}
|
|
3387
|
-
if (s.parentOffset < s.parent.content.size || !s.parent.isTextblock)
|
|
3388
|
-
return !1;
|
|
3389
|
-
let r = t.resolve(Le(s, !0, !0));
|
|
3390
|
-
return !r.parent.isTextblock || r.pos > o || Le(r, !0, !1) < o ? !1 : n.parent.content.cut(n.parentOffset).eq(r.parent.content);
|
|
3391
|
-
}
|
|
3392
|
-
function Le(t, e, o) {
|
|
3393
|
-
let n = t.depth, i = e ? t.end() : t.pos;
|
|
3394
|
-
for (; n > 0 && (e || t.indexAfter(n) == t.node(n).childCount); )
|
|
3395
|
-
n--, i++, e = !1;
|
|
3396
|
-
if (o) {
|
|
3397
|
-
let s = t.node(n).maybeChild(t.indexAfter(n));
|
|
3398
|
-
for (; s && !s.isLeaf; )
|
|
3399
|
-
s = s.firstChild, i++;
|
|
3400
|
-
}
|
|
3401
|
-
return i;
|
|
3402
|
-
}
|
|
3403
|
-
function ii(t, e, o, n, i) {
|
|
3404
|
-
let s = t.findDiffStart(e, o);
|
|
3405
|
-
if (s == null)
|
|
3406
|
-
return null;
|
|
3407
|
-
let { a: r, b: l } = t.findDiffEnd(e, o + t.size, o + e.size);
|
|
3408
|
-
if (i == "end") {
|
|
3409
|
-
let a = Math.max(0, s - Math.min(r, l));
|
|
3410
|
-
n -= r + a - s;
|
|
3411
|
-
}
|
|
3412
|
-
if (r < s && t.size < e.size) {
|
|
3413
|
-
let a = n <= s && n >= r ? s - n : 0;
|
|
3414
|
-
s -= a, s && s < e.size && At(e.textBetween(s - 1, s + 1)) && (s += a ? 1 : -1), l = s + (l - r), r = s;
|
|
3415
|
-
} else if (l < s) {
|
|
3416
|
-
let a = n <= s && n >= l ? s - n : 0;
|
|
3417
|
-
s -= a, s && s < t.size && At(t.textBetween(s - 1, s + 1)) && (s += a ? 1 : -1), r = s + (r - l), l = s;
|
|
3418
|
-
}
|
|
3419
|
-
return { start: s, endA: r, endB: l };
|
|
3420
|
-
}
|
|
3421
|
-
function At(t) {
|
|
3422
|
-
if (t.length != 2)
|
|
3423
|
-
return !1;
|
|
3424
|
-
let e = t.charCodeAt(0), o = t.charCodeAt(1);
|
|
3425
|
-
return e >= 56320 && e <= 57343 && o >= 55296 && o <= 56319;
|
|
3426
|
-
}
|
|
3427
|
-
class si {
|
|
3428
|
-
/**
|
|
3429
|
-
Create a view. `place` may be a DOM node that the editor should
|
|
3430
|
-
be appended to, a function that will place it into the document,
|
|
3431
|
-
or an object whose `mount` property holds the node to use as the
|
|
3432
|
-
document container. If it is `null`, the editor will not be
|
|
3433
|
-
added to the document.
|
|
3434
|
-
*/
|
|
3435
|
-
constructor(e, o) {
|
|
3436
|
-
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 vn(), this.prevDirectPlugins = [], this.pluginViews = [], this.requiresGeckoHackNode = !1, this.dragging = null, this._props = o, this.state = o.state, this.directPlugins = o.plugins || [], this.directPlugins.forEach(Ft), this.dispatch = this.dispatch.bind(this), this.dom = e && e.mount || document.createElement("div"), e && (e.appendChild ? e.appendChild(this.dom) : typeof e == "function" ? e(this.dom) : e.mount && (this.mounted = !0)), this.editable = Bt(this), Rt(this), this.nodeViews = zt(this), this.docView = ut(this.state.doc, Vt(this), Ie(this), this.dom, this), this.domObserver = new jn(this, (n, i, s, r) => ti(this, n, i, s, r)), this.domObserver.start(), Dn(this), this.updatePluginViews();
|
|
3437
|
-
}
|
|
3438
|
-
/**
|
|
3439
|
-
Holds `true` when a
|
|
3440
|
-
[composition](https://w3c.github.io/uievents/#events-compositionevents)
|
|
3441
|
-
is active.
|
|
3442
|
-
*/
|
|
3443
|
-
get composing() {
|
|
3444
|
-
return this.input.composing;
|
|
3445
|
-
}
|
|
3446
|
-
/**
|
|
3447
|
-
The view's current [props](https://prosemirror.net/docs/ref/#view.EditorProps).
|
|
3448
|
-
*/
|
|
3449
|
-
get props() {
|
|
3450
|
-
if (this._props.state != this.state) {
|
|
3451
|
-
let e = this._props;
|
|
3452
|
-
this._props = {};
|
|
3453
|
-
for (let o in e)
|
|
3454
|
-
this._props[o] = e[o];
|
|
3455
|
-
this._props.state = this.state;
|
|
3456
|
-
}
|
|
3457
|
-
return this._props;
|
|
3458
|
-
}
|
|
3459
|
-
/**
|
|
3460
|
-
Update the view's props. Will immediately cause an update to
|
|
3461
|
-
the DOM.
|
|
3462
|
-
*/
|
|
3463
|
-
update(e) {
|
|
3464
|
-
e.handleDOMEvents != this._props.handleDOMEvents && Xe(this);
|
|
3465
|
-
let o = this._props;
|
|
3466
|
-
this._props = e, e.plugins && (e.plugins.forEach(Ft), this.directPlugins = e.plugins), this.updateStateInner(e.state, o);
|
|
3467
|
-
}
|
|
3468
|
-
/**
|
|
3469
|
-
Update the view by updating existing props object with the object
|
|
3470
|
-
given as argument. Equivalent to `view.update(Object.assign({},
|
|
3471
|
-
view.props, props))`.
|
|
3472
|
-
*/
|
|
3473
|
-
setProps(e) {
|
|
3474
|
-
let o = {};
|
|
3475
|
-
for (let n in this._props)
|
|
3476
|
-
o[n] = this._props[n];
|
|
3477
|
-
o.state = this.state;
|
|
3478
|
-
for (let n in e)
|
|
3479
|
-
o[n] = e[n];
|
|
3480
|
-
this.update(o);
|
|
3481
|
-
}
|
|
3482
|
-
/**
|
|
3483
|
-
Update the editor's `state` prop, without touching any of the
|
|
3484
|
-
other props.
|
|
3485
|
-
*/
|
|
3486
|
-
updateState(e) {
|
|
3487
|
-
this.updateStateInner(e, this._props);
|
|
3488
|
-
}
|
|
3489
|
-
updateStateInner(e, o) {
|
|
3490
|
-
var n;
|
|
3491
|
-
let i = this.state, s = !1, r = !1;
|
|
3492
|
-
e.storedMarks && this.composing && (uo(this), r = !0), this.state = e;
|
|
3493
|
-
let l = i.plugins != e.plugins || this._props.plugins != o.plugins;
|
|
3494
|
-
if (l || this._props.plugins != o.plugins || this._props.nodeViews != o.nodeViews) {
|
|
3495
|
-
let p = zt(this);
|
|
3496
|
-
li(p, this.nodeViews) && (this.nodeViews = p, s = !0);
|
|
3497
|
-
}
|
|
3498
|
-
(l || o.handleDOMEvents != this._props.handleDOMEvents) && Xe(this), this.editable = Bt(this), Rt(this);
|
|
3499
|
-
let a = Ie(this), d = Vt(this), c = i.plugins != e.plugins && !i.doc.eq(e.doc) ? "reset" : e.scrollToSelection > i.scrollToSelection ? "to selection" : "preserve", h = s || !this.docView.matchesNode(e.doc, d, a);
|
|
3500
|
-
(h || !e.selection.eq(i.selection)) && (r = !0);
|
|
3501
|
-
let u = c == "preserve" && r && this.dom.style.overflowAnchor == null && Ro(this);
|
|
3502
|
-
if (r) {
|
|
3503
|
-
this.domObserver.stop();
|
|
3504
|
-
let p = h && (E || S) && !this.composing && !i.selection.empty && !e.selection.empty && ri(i.selection, e.selection);
|
|
3505
|
-
if (h) {
|
|
3506
|
-
let f = S ? this.trackWrites = this.domSelectionRange().focusNode : null;
|
|
3507
|
-
this.composing && (this.input.compositionNode = Bn(this)), (s || !this.docView.update(e.doc, d, a, this)) && (this.docView.updateOuterDeco(d), this.docView.destroy(), this.docView = ut(e.doc, d, a, this.dom, this)), f && (!this.trackWrites || !this.dom.contains(this.trackWrites)) && (p = !0);
|
|
3508
|
-
}
|
|
3509
|
-
p || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && sn(this)) ? W(this, p) : (eo(this, e.selection), this.domObserver.setCurSelection()), this.domObserver.start();
|
|
3510
|
-
}
|
|
3511
|
-
this.updatePluginViews(i), !((n = this.dragging) === null || n === void 0) && n.node && !i.doc.eq(e.doc) && this.updateDraggedNode(this.dragging, i), c == "reset" ? this.dom.scrollTop = 0 : c == "to selection" ? this.scrollToSelection() : u && Bo(u);
|
|
3512
|
-
}
|
|
3513
|
-
/**
|
|
3514
|
-
@internal
|
|
3515
|
-
*/
|
|
3516
|
-
scrollToSelection() {
|
|
3517
|
-
let e = this.domSelectionRange().focusNode;
|
|
3518
|
-
if (!(!e || !this.dom.contains(e.nodeType == 1 ? e : e.parentNode)) && !this.someProp("handleScrollToSelection", (o) => o(this)))
|
|
3519
|
-
if (this.state.selection instanceof w) {
|
|
3520
|
-
let o = this.docView.domAfterPos(this.state.selection.from);
|
|
3521
|
-
o.nodeType == 1 && lt(this, o.getBoundingClientRect(), e);
|
|
3522
|
-
} else
|
|
3523
|
-
lt(this, this.coordsAtPos(this.state.selection.head, 1), e);
|
|
3524
|
-
}
|
|
3525
|
-
destroyPluginViews() {
|
|
3526
|
-
let e;
|
|
3527
|
-
for (; e = this.pluginViews.pop(); )
|
|
3528
|
-
e.destroy && e.destroy();
|
|
3529
|
-
}
|
|
3530
|
-
updatePluginViews(e) {
|
|
3531
|
-
if (!e || e.plugins != this.state.plugins || this.directPlugins != this.prevDirectPlugins) {
|
|
3532
|
-
this.prevDirectPlugins = this.directPlugins, this.destroyPluginViews();
|
|
3533
|
-
for (let o = 0; o < this.directPlugins.length; o++) {
|
|
3534
|
-
let n = this.directPlugins[o];
|
|
3535
|
-
n.spec.view && this.pluginViews.push(n.spec.view(this));
|
|
3536
|
-
}
|
|
3537
|
-
for (let o = 0; o < this.state.plugins.length; o++) {
|
|
3538
|
-
let n = this.state.plugins[o];
|
|
3539
|
-
n.spec.view && this.pluginViews.push(n.spec.view(this));
|
|
3540
|
-
}
|
|
3541
|
-
} else
|
|
3542
|
-
for (let o = 0; o < this.pluginViews.length; o++) {
|
|
3543
|
-
let n = this.pluginViews[o];
|
|
3544
|
-
n.update && n.update(this, e);
|
|
3545
|
-
}
|
|
3546
|
-
}
|
|
3547
|
-
updateDraggedNode(e, o) {
|
|
3548
|
-
let n = e.node, i = -1;
|
|
3549
|
-
if (n.from < this.state.doc.content.size && this.state.doc.nodeAt(n.from) == n.node)
|
|
3550
|
-
i = n.from;
|
|
3551
|
-
else {
|
|
3552
|
-
let s = n.from + (this.state.doc.content.size - o.doc.content.size);
|
|
3553
|
-
(s > 0 && s < this.state.doc.content.size && this.state.doc.nodeAt(s)) == n.node && (i = s);
|
|
3554
|
-
}
|
|
3555
|
-
this.dragging = new mo(e.slice, e.move, i < 0 ? void 0 : w.create(this.state.doc, i));
|
|
3556
|
-
}
|
|
3557
|
-
someProp(e, o) {
|
|
3558
|
-
let n = this._props && this._props[e], i;
|
|
3559
|
-
if (n != null && (i = o ? o(n) : n))
|
|
3560
|
-
return i;
|
|
3561
|
-
for (let r = 0; r < this.directPlugins.length; r++) {
|
|
3562
|
-
let l = this.directPlugins[r].props[e];
|
|
3563
|
-
if (l != null && (i = o ? o(l) : l))
|
|
3564
|
-
return i;
|
|
3565
|
-
}
|
|
3566
|
-
let s = this.state.plugins;
|
|
3567
|
-
if (s)
|
|
3568
|
-
for (let r = 0; r < s.length; r++) {
|
|
3569
|
-
let l = s[r].props[e];
|
|
3570
|
-
if (l != null && (i = o ? o(l) : l))
|
|
3571
|
-
return i;
|
|
3572
|
-
}
|
|
3573
|
-
}
|
|
3574
|
-
/**
|
|
3575
|
-
Query whether the view has focus.
|
|
3576
|
-
*/
|
|
3577
|
-
hasFocus() {
|
|
3578
|
-
if (E) {
|
|
3579
|
-
let e = this.root.activeElement;
|
|
3580
|
-
if (e == this.dom)
|
|
3581
|
-
return !0;
|
|
3582
|
-
if (!e || !this.dom.contains(e))
|
|
3583
|
-
return !1;
|
|
3584
|
-
for (; e && this.dom != e && this.dom.contains(e); ) {
|
|
3585
|
-
if (e.contentEditable == "false")
|
|
3586
|
-
return !1;
|
|
3587
|
-
e = e.parentElement;
|
|
3588
|
-
}
|
|
3589
|
-
return !0;
|
|
3590
|
-
}
|
|
3591
|
-
return this.root.activeElement == this.dom;
|
|
3592
|
-
}
|
|
3593
|
-
/**
|
|
3594
|
-
Focus the editor.
|
|
3595
|
-
*/
|
|
3596
|
-
focus() {
|
|
3597
|
-
this.domObserver.stop(), this.editable && zo(this.dom), W(this), this.domObserver.start();
|
|
3598
|
-
}
|
|
3599
|
-
/**
|
|
3600
|
-
Get the document root in which the editor exists. This will
|
|
3601
|
-
usually be the top-level `document`, but might be a [shadow
|
|
3602
|
-
DOM](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Shadow_DOM)
|
|
3603
|
-
root if the editor is inside one.
|
|
3604
|
-
*/
|
|
3605
|
-
get root() {
|
|
3606
|
-
let e = this._root;
|
|
3607
|
-
if (e == null) {
|
|
3608
|
-
for (let o = this.dom.parentNode; o; o = o.parentNode)
|
|
3609
|
-
if (o.nodeType == 9 || o.nodeType == 11 && o.host)
|
|
3610
|
-
return o.getSelection || (Object.getPrototypeOf(o).getSelection = () => o.ownerDocument.getSelection()), this._root = o;
|
|
3611
|
-
}
|
|
3612
|
-
return e || document;
|
|
3613
|
-
}
|
|
3614
|
-
/**
|
|
3615
|
-
When an existing editor view is moved to a new document or
|
|
3616
|
-
shadow tree, call this to make it recompute its root.
|
|
3617
|
-
*/
|
|
3618
|
-
updateRoot() {
|
|
3619
|
-
this._root = null;
|
|
3620
|
-
}
|
|
3621
|
-
/**
|
|
3622
|
-
Given a pair of viewport coordinates, return the document
|
|
3623
|
-
position that corresponds to them. May return null if the given
|
|
3624
|
-
coordinates aren't inside of the editor. When an object is
|
|
3625
|
-
returned, its `pos` property is the position nearest to the
|
|
3626
|
-
coordinates, and its `inside` property holds the position of the
|
|
3627
|
-
inner node that the position falls inside of, or -1 if it is at
|
|
3628
|
-
the top level, not in any node.
|
|
3629
|
-
*/
|
|
3630
|
-
posAtCoords(e) {
|
|
3631
|
-
return qo(this, e);
|
|
3632
|
-
}
|
|
3633
|
-
/**
|
|
3634
|
-
Returns the viewport rectangle at a given document position.
|
|
3635
|
-
`left` and `right` will be the same number, as this returns a
|
|
3636
|
-
flat cursor-ish rectangle. If the position is between two things
|
|
3637
|
-
that aren't directly adjacent, `side` determines which element
|
|
3638
|
-
is used. When < 0, the element before the position is used,
|
|
3639
|
-
otherwise the element after.
|
|
3640
|
-
*/
|
|
3641
|
-
coordsAtPos(e, o = 1) {
|
|
3642
|
-
return Gt(this, e, o);
|
|
3643
|
-
}
|
|
3644
|
-
/**
|
|
3645
|
-
Find the DOM position that corresponds to the given document
|
|
3646
|
-
position. When `side` is negative, find the position as close as
|
|
3647
|
-
possible to the content before the position. When positive,
|
|
3648
|
-
prefer positions close to the content after the position. When
|
|
3649
|
-
zero, prefer as shallow a position as possible.
|
|
3650
|
-
|
|
3651
|
-
Note that you should **not** mutate the editor's internal DOM,
|
|
3652
|
-
only inspect it (and even that is usually not necessary).
|
|
3653
|
-
*/
|
|
3654
|
-
domAtPos(e, o = 0) {
|
|
3655
|
-
return this.docView.domFromPos(e, o);
|
|
3656
|
-
}
|
|
3657
|
-
/**
|
|
3658
|
-
Find the DOM node that represents the document node after the
|
|
3659
|
-
given position. May return `null` when the position doesn't point
|
|
3660
|
-
in front of a node or if the node is inside an opaque node view.
|
|
3661
|
-
|
|
3662
|
-
This is intended to be able to call things like
|
|
3663
|
-
`getBoundingClientRect` on that DOM node. Do **not** mutate the
|
|
3664
|
-
editor DOM directly, or add styling this way, since that will be
|
|
3665
|
-
immediately overriden by the editor as it redraws the node.
|
|
3666
|
-
*/
|
|
3667
|
-
nodeDOM(e) {
|
|
3668
|
-
let o = this.docView.descAt(e);
|
|
3669
|
-
return o ? o.nodeDOM : null;
|
|
3670
|
-
}
|
|
3671
|
-
/**
|
|
3672
|
-
Find the document position that corresponds to a given DOM
|
|
3673
|
-
position. (Whenever possible, it is preferable to inspect the
|
|
3674
|
-
document structure directly, rather than poking around in the
|
|
3675
|
-
DOM, but sometimes—for example when interpreting an event
|
|
3676
|
-
target—you don't have a choice.)
|
|
3677
|
-
|
|
3678
|
-
The `bias` parameter can be used to influence which side of a DOM
|
|
3679
|
-
node to use when the position is inside a leaf node.
|
|
3680
|
-
*/
|
|
3681
|
-
posAtDOM(e, o, n = -1) {
|
|
3682
|
-
let i = this.docView.posFromDOM(e, o, n);
|
|
3683
|
-
if (i == null)
|
|
3684
|
-
throw new RangeError("DOM position not inside the editor");
|
|
3685
|
-
return i;
|
|
3686
|
-
}
|
|
3687
|
-
/**
|
|
3688
|
-
Find out whether the selection is at the end of a textblock when
|
|
3689
|
-
moving in a given direction. When, for example, given `"left"`,
|
|
3690
|
-
it will return true if moving left from the current cursor
|
|
3691
|
-
position would leave that position's parent textblock. Will apply
|
|
3692
|
-
to the view's current state by default, but it is possible to
|
|
3693
|
-
pass a different state.
|
|
3694
|
-
*/
|
|
3695
|
-
endOfTextblock(e, o) {
|
|
3696
|
-
return Go(this, o || this.state, e);
|
|
3697
|
-
}
|
|
3698
|
-
/**
|
|
3699
|
-
Run the editor's paste logic with the given HTML string. The
|
|
3700
|
-
`event`, if given, will be passed to the
|
|
3701
|
-
[`handlePaste`](https://prosemirror.net/docs/ref/#view.EditorProps.handlePaste) hook.
|
|
3702
|
-
*/
|
|
3703
|
-
pasteHTML(e, o) {
|
|
3704
|
-
return ve(this, "", e, !1, o || new ClipboardEvent("paste"));
|
|
3705
|
-
}
|
|
3706
|
-
/**
|
|
3707
|
-
Run the editor's paste logic with the given plain-text input.
|
|
3708
|
-
*/
|
|
3709
|
-
pasteText(e, o) {
|
|
3710
|
-
return ve(this, e, null, !0, o || new ClipboardEvent("paste"));
|
|
3711
|
-
}
|
|
3712
|
-
/**
|
|
3713
|
-
Serialize the given slice as it would be if it was copied from
|
|
3714
|
-
this editor. Returns a DOM element that contains a
|
|
3715
|
-
representation of the slice as its children, a textual
|
|
3716
|
-
representation, and the transformed slice (which can be
|
|
3717
|
-
different from the given input due to hooks like
|
|
3718
|
-
[`transformCopied`](https://prosemirror.net/docs/ref/#view.EditorProps.transformCopied)).
|
|
3719
|
-
*/
|
|
3720
|
-
serializeForClipboard(e) {
|
|
3721
|
-
return Qe(this, e);
|
|
3722
|
-
}
|
|
3723
|
-
/**
|
|
3724
|
-
Removes the editor from the DOM and destroys all [node
|
|
3725
|
-
views](https://prosemirror.net/docs/ref/#view.NodeView).
|
|
3726
|
-
*/
|
|
3727
|
-
destroy() {
|
|
3728
|
-
this.docView && (Nn(this), this.destroyPluginViews(), this.mounted ? (this.docView.update(this.state.doc, [], Ie(this), this), this.dom.textContent = "") : this.dom.parentNode && this.dom.parentNode.removeChild(this.dom), this.docView.destroy(), this.docView = null, Oo());
|
|
3729
|
-
}
|
|
3730
|
-
/**
|
|
3731
|
-
This is true when the view has been
|
|
3732
|
-
[destroyed](https://prosemirror.net/docs/ref/#view.EditorView.destroy) (and thus should not be
|
|
3733
|
-
used anymore).
|
|
3734
|
-
*/
|
|
3735
|
-
get isDestroyed() {
|
|
3736
|
-
return this.docView == null;
|
|
3737
|
-
}
|
|
3738
|
-
/**
|
|
3739
|
-
Used for testing.
|
|
3740
|
-
*/
|
|
3741
|
-
dispatchEvent(e) {
|
|
3742
|
-
return On(this, e);
|
|
3743
|
-
}
|
|
3744
|
-
/**
|
|
3745
|
-
@internal
|
|
3746
|
-
*/
|
|
3747
|
-
domSelectionRange() {
|
|
3748
|
-
let e = this.domSelection();
|
|
3749
|
-
return e ? C && this.root.nodeType === 11 && ko(this.dom.ownerDocument) == this.dom && Xn(this, e) || e : { focusNode: null, focusOffset: 0, anchorNode: null, anchorOffset: 0 };
|
|
3750
|
-
}
|
|
3751
|
-
/**
|
|
3752
|
-
@internal
|
|
3753
|
-
*/
|
|
3754
|
-
domSelection() {
|
|
3755
|
-
return this.root.getSelection();
|
|
3756
|
-
}
|
|
3757
|
-
}
|
|
3758
|
-
si.prototype.dispatch = function(t) {
|
|
3759
|
-
let e = this._props.dispatchTransaction;
|
|
3760
|
-
e ? e.call(this, t) : this.updateState(this.state.apply(t));
|
|
3761
|
-
};
|
|
3762
|
-
function Vt(t) {
|
|
3763
|
-
let e = /* @__PURE__ */ Object.create(null);
|
|
3764
|
-
return e.class = "ProseMirror", e.contenteditable = String(t.editable), t.someProp("attributes", (o) => {
|
|
3765
|
-
if (typeof o == "function" && (o = o(t.state)), o)
|
|
3766
|
-
for (let n in o)
|
|
3767
|
-
n == "class" ? e.class += " " + o[n] : n == "style" ? e.style = (e.style ? e.style + ";" : "") + o[n] : !e[n] && n != "contenteditable" && n != "nodeName" && (e[n] = String(o[n]));
|
|
3768
|
-
}), e.translate || (e.translate = "no"), [F.node(0, t.state.doc.content.size, e)];
|
|
3769
|
-
}
|
|
3770
|
-
function Rt(t) {
|
|
3771
|
-
if (t.markCursor) {
|
|
3772
|
-
let e = document.createElement("img");
|
|
3773
|
-
e.className = "ProseMirror-separator", e.setAttribute("mark-placeholder", "true"), e.setAttribute("alt", ""), t.cursorWrapper = { dom: e, deco: F.widget(t.state.selection.from, e, { raw: !0, marks: t.markCursor }) };
|
|
3774
|
-
} else
|
|
3775
|
-
t.cursorWrapper = null;
|
|
3776
|
-
}
|
|
3777
|
-
function Bt(t) {
|
|
3778
|
-
return !t.someProp("editable", (e) => e(t.state) === !1);
|
|
3779
|
-
}
|
|
3780
|
-
function ri(t, e) {
|
|
3781
|
-
let o = Math.min(t.$anchor.sharedDepth(t.head), e.$anchor.sharedDepth(e.head));
|
|
3782
|
-
return t.$anchor.start(o) != e.$anchor.start(o);
|
|
3783
|
-
}
|
|
3784
|
-
function zt(t) {
|
|
3785
|
-
let e = /* @__PURE__ */ Object.create(null);
|
|
3786
|
-
function o(n) {
|
|
3787
|
-
for (let i in n)
|
|
3788
|
-
Object.prototype.hasOwnProperty.call(e, i) || (e[i] = n[i]);
|
|
3789
|
-
}
|
|
3790
|
-
return t.someProp("nodeViews", o), t.someProp("markViews", o), e;
|
|
3791
|
-
}
|
|
3792
|
-
function li(t, e) {
|
|
3793
|
-
let o = 0, n = 0;
|
|
3794
|
-
for (let i in t) {
|
|
3795
|
-
if (t[i] != e[i])
|
|
3796
|
-
return !0;
|
|
3797
|
-
o++;
|
|
3798
|
-
}
|
|
3799
|
-
for (let i in e)
|
|
3800
|
-
n++;
|
|
3801
|
-
return o != n;
|
|
3802
|
-
}
|
|
3803
|
-
function Ft(t) {
|
|
3804
|
-
if (t.spec.state || t.spec.filterTransaction || t.spec.appendTransaction)
|
|
3805
|
-
throw new RangeError("Plugins passed directly to the view must not have a state component");
|
|
3806
|
-
}
|
|
3807
|
-
export {
|
|
3808
|
-
F as Decoration,
|
|
3809
|
-
D as DecorationSet,
|
|
3810
|
-
si as EditorView
|
|
3811
|
-
};
|