@gsc-basic/components 1.0.3 → 1.1.0
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/LICENSE +6 -0
- package/README.md +4 -0
- package/dist/es/Button/index.js +14 -0
- package/dist/es/Button/src/Button.css +14 -0
- package/dist/es/Button/src/Button.vue.js +14 -0
- package/dist/{lib/src → es}/Button/src/Button2.css +14 -1
- package/dist/es/CodeEditor/index.js +14 -0
- package/dist/es/CodeEditor/src/index.css +14 -0
- package/dist/es/CodeEditor/src/index.vue.js +14 -0
- package/dist/es/{src/CodeEditor → CodeEditor}/src/index2.css +14 -1
- package/dist/es/ConfigProvider/index.js +14 -0
- package/dist/es/ConfigProvider/src/configProvider.js +14 -0
- package/dist/es/ConfigProvider/src/configProviderProps.js +14 -0
- package/dist/es/ConfigProvider/src/constants.js +14 -0
- package/dist/es/ConfigProvider/src/useGlobalConfig.js +14 -0
- package/dist/es/CountTo/index.js +14 -0
- package/dist/es/CountTo/src/index.css +14 -0
- package/dist/es/CountTo/src/index.vue.js +14 -0
- package/dist/es/Ellipsis/index.js +14 -0
- package/dist/es/Ellipsis/src/components/JsEllipsis.css +14 -0
- package/dist/es/Ellipsis/src/components/JsEllipsis.vue.js +14 -0
- package/dist/es/Ellipsis/src/components/NativeEllipsis.css +14 -0
- package/dist/es/Ellipsis/src/components/NativeEllipsis.vue.js +14 -0
- package/dist/es/Ellipsis/src/components/NativeEllipsis2.css +14 -0
- package/dist/es/{src/Grid/src/components/ActionBar.css → Ellipsis/src/index.css} +14 -1
- package/dist/es/Ellipsis/src/index.vue.js +14 -0
- package/dist/es/Ellipsis/src/utils/utils.js +14 -0
- package/dist/es/Form/index.js +14 -0
- package/dist/{lib/src → es}/Form/src/Form.css +14 -1
- package/dist/es/Form/src/Form.vue.js +14 -0
- package/dist/es/{src/Form → Form}/src/styles/form.css +13 -0
- package/dist/es/Grid/index.js +14 -0
- package/dist/{lib/src → es}/Grid/src/Grid.css +14 -1
- package/dist/es/Grid/src/Grid.vue.js +14 -0
- package/dist/es/Grid/src/components/ActionBar.css +14 -0
- package/dist/es/Grid/src/components/ActionBar.vue.js +14 -0
- package/dist/es/Grid/src/components/CellEditor.css +14 -0
- package/dist/es/Grid/src/components/CellEditor.vue.js +14 -0
- package/dist/{lib/src → es}/Grid/src/components/CellEditor2.css +14 -1
- package/dist/es/{src/Grid → Grid}/src/components/ColumnFilter.css +14 -1
- package/dist/es/Grid/src/components/ColumnFilter.vue.js +14 -0
- package/dist/es/{src/Grid → Grid}/src/components/ColumnSettings.css +14 -1
- package/dist/es/Grid/src/components/ColumnSettings.vue.js +14 -0
- package/dist/{lib/src → es}/Grid/src/components/DataTable.css +14 -1
- package/dist/es/Grid/src/components/DataTable.vue.js +14 -0
- package/dist/es/{src/Grid → Grid}/src/components/Pager.css +14 -1
- package/dist/es/Grid/src/components/Pager.vue.js +14 -0
- package/dist/es/{src/Grid → Grid}/src/components/QueryBar.css +14 -1
- package/dist/es/Grid/src/components/QueryBar.vue.js +14 -0
- package/dist/es/Grid/src/composables/useCellEditor.js +14 -0
- package/dist/es/Grid/src/composables/useGridTable.js +14 -0
- package/dist/es/{src/Grid → Grid}/src/styles/table.css +13 -0
- package/dist/es/Marquee/index.js +14 -0
- package/dist/es/Marquee/src/index.css +14 -0
- package/dist/es/Marquee/src/index.vue.js +14 -0
- package/dist/es/{src/Form/src/Form.css → Marquee/src/index2.css} +14 -1
- package/dist/es/Overlay/index.js +14 -0
- package/dist/es/Overlay/src/Message.css +14 -0
- package/dist/es/Overlay/src/Message.vue.js +14 -0
- package/dist/es/{src/Overlay → Overlay}/src/Message2.css +14 -1
- package/dist/es/Overlay/src/Modal.css +14 -0
- package/dist/es/Overlay/src/Modal.vue.js +14 -0
- package/dist/es/{src/Overlay → Overlay}/src/Modal2.css +14 -1
- package/dist/es/Overlay/src/Notice.css +14 -0
- package/dist/es/Overlay/src/Notice.vue.js +14 -0
- package/dist/es/{src/Overlay → Overlay}/src/Notice2.css +14 -1
- package/dist/es/RichTextEditor/index.js +14 -0
- package/dist/es/RichTextEditor/src/ToolbarPanel.css +14 -0
- package/dist/es/RichTextEditor/src/ToolbarPanel.vue.js +14 -0
- package/dist/es/RichTextEditor/src/ToolbarPanel2.css +14 -0
- package/dist/es/{src/Grid/src/components/CellEditor2.css → RichTextEditor/src/components/BlockquoteButton.css} +14 -1
- package/dist/es/RichTextEditor/src/components/BlockquoteButton.vue.js +14 -0
- package/dist/es/{src/Grid/src/Grid.css → RichTextEditor/src/components/CodeBlockButton.css} +14 -1
- package/dist/es/RichTextEditor/src/components/CodeBlockButton.vue.js +14 -0
- package/dist/es/{src/Button/src/Button2.css → RichTextEditor/src/components/ColorHighlightPopover.css} +14 -1
- package/dist/es/RichTextEditor/src/components/ColorHighlightPopover.vue.js +14 -0
- package/dist/es/RichTextEditor/src/components/FontSizeDropdownMenu.css +14 -0
- package/dist/es/RichTextEditor/src/components/FontSizeDropdownMenu.vue.js +14 -0
- package/dist/es/RichTextEditor/src/components/HeadingDropdownMenu.css +14 -0
- package/dist/es/RichTextEditor/src/components/HeadingDropdownMenu.vue.js +14 -0
- package/dist/es/RichTextEditor/src/components/ImageUploadButton.css +14 -0
- package/dist/es/RichTextEditor/src/components/ImageUploadButton.vue.js +14 -0
- package/dist/es/RichTextEditor/src/components/LinkPopover.css +14 -0
- package/dist/es/RichTextEditor/src/components/LinkPopover.vue.js +14 -0
- package/dist/{lib/src/Grid/src/components/ActionBar.css → es/RichTextEditor/src/components/ListDropdownMenu.css} +14 -1
- package/dist/es/RichTextEditor/src/components/ListDropdownMenu.vue.js +14 -0
- package/dist/es/RichTextEditor/src/components/MarkButton.css +14 -0
- package/dist/es/RichTextEditor/src/components/MarkButton.vue.js +14 -0
- package/dist/es/RichTextEditor/src/components/TableButton.css +14 -0
- package/dist/es/RichTextEditor/src/components/TableButton.vue.js +14 -0
- package/dist/es/RichTextEditor/src/components/TextAlignDropdownMenu.css +14 -0
- package/dist/es/RichTextEditor/src/components/TextAlignDropdownMenu.vue.js +14 -0
- package/dist/es/RichTextEditor/src/components/TextColorPopover.css +14 -0
- package/dist/es/RichTextEditor/src/components/TextColorPopover.vue.js +14 -0
- package/dist/es/RichTextEditor/src/components/ToolbarGroup.css +14 -0
- package/dist/es/RichTextEditor/src/components/ToolbarGroup.vue.js +14 -0
- package/dist/es/RichTextEditor/src/components/ToolbarSeparator.css +14 -0
- package/dist/es/RichTextEditor/src/components/ToolbarSeparator.vue.js +14 -0
- package/dist/es/RichTextEditor/src/components/UndoRedoButton.css +14 -0
- package/dist/es/RichTextEditor/src/components/UndoRedoButton.vue.js +14 -0
- package/dist/es/RichTextEditor/src/components/VideoUploadButton.css +14 -0
- package/dist/es/RichTextEditor/src/components/VideoUploadButton.vue.js +14 -0
- package/dist/es/RichTextEditor/src/components/basic/ColorPicker.css +14 -0
- package/dist/es/RichTextEditor/src/components/basic/ColorPicker.vue.js +14 -0
- package/dist/es/RichTextEditor/src/components/basic/MediaUploadModal.css +14 -0
- package/dist/es/RichTextEditor/src/components/basic/MediaUploadModal.vue.js +14 -0
- package/dist/es/RichTextEditor/src/components/basic/SelectMenu.css +14 -0
- package/dist/es/RichTextEditor/src/components/basic/SelectMenu.vue.js +14 -0
- package/dist/es/RichTextEditor/src/components/basic/SelectMenu2.css +14 -0
- package/dist/es/RichTextEditor/src/components/icons.js +14 -0
- package/dist/es/RichTextEditor/src/constant/index.js +14 -0
- package/dist/es/RichTextEditor/src/extensions/video.js +14 -0
- package/dist/es/RichTextEditor/src/index.css +14 -0
- package/dist/es/RichTextEditor/src/index.vue.js +14 -0
- package/dist/es/RichTextEditor/src/index2.css +14 -0
- package/dist/es/RichTextEditor/src/props.js +14 -0
- package/dist/es/ScaleScreen/index.js +14 -0
- package/dist/es/ScaleScreen/src/index.css +14 -0
- package/dist/es/ScaleScreen/src/index.vue.js +14 -0
- package/dist/es/{src/ScaleScreen → ScaleScreen}/src/index2.css +13 -0
- package/dist/es/Transition/index.js +14 -0
- package/dist/es/Transition/src/CollapseTransition.css +14 -0
- package/dist/es/Transition/src/CollapseTransition.vue.js +14 -0
- package/dist/es/Transition/src/CreateTransition.js +16 -0
- package/dist/es/Transition/src/ExpandTransition.js +14 -0
- package/dist/es/Transition/src/style/index.css +14 -0
- package/dist/es/VideoBackground/index.js +14 -0
- package/dist/es/VideoBackground/src/helper.js +14 -0
- package/dist/es/VideoBackground/src/index.css +14 -0
- package/dist/es/VideoBackground/src/index.vue.js +14 -0
- package/dist/es/VideoBackground/src/index2.css +14 -0
- package/dist/es/{src/VideoBackground → VideoBackground}/src/index3.css +13 -0
- package/dist/es/VideoBackground/src/videoBackground.js +14 -0
- package/dist/es/VideoPlayer/index.js +14 -0
- package/dist/es/VideoPlayer/src/index.css +14 -0
- package/dist/es/VideoPlayer/src/index.vue.js +14 -0
- package/dist/es/VideoPlayer/src/localeSetting.js +14 -0
- package/dist/es/VirtualScroll/index.js +14 -0
- package/dist/es/VirtualScroll/src/index.css +14 -0
- package/dist/es/VirtualScroll/src/index.vue.js +14 -0
- package/dist/es/VirtualScroll/src/index.vue2.js +14 -0
- package/dist/es/VirtualScroll/src/index2.css +14 -0
- package/dist/es/_virtual/_commonjsHelpers.js +14 -0
- package/dist/es/_virtual/_plugin-vue_export-helper.js +14 -9
- package/dist/es/_virtual/delegate.js +14 -0
- package/dist/es/_virtual/download.js +14 -0
- package/dist/es/_virtual/download2.js +14 -0
- package/dist/es/_virtual/index.js +14 -0
- package/dist/es/_virtual/index2.js +14 -0
- package/dist/es/hooks/useLocale.js +14 -0
- package/dist/es/hooks/useNamespace.js +14 -0
- package/dist/es/index.js +14 -53
- package/dist/es/locale/lang/en-US.js +14 -0
- package/dist/es/locale/lang/ja-JP.js +14 -0
- package/dist/es/locale/lang/zh-CN.js +14 -0
- package/dist/es/node_modules/@codemirror/autocomplete/dist/index.js +14 -1371
- package/dist/es/node_modules/@codemirror/commands/dist/index.js +14 -844
- package/dist/es/node_modules/@codemirror/lang-java/dist/index.js +16 -38
- package/dist/es/node_modules/@codemirror/lang-javascript/dist/index.js +30 -300
- package/dist/es/node_modules/@codemirror/lang-json/dist/index.js +16 -48
- package/dist/es/node_modules/@codemirror/lang-python/dist/index.js +25 -399
- package/dist/es/node_modules/@codemirror/lang-sql/dist/index.js +17 -497
- package/dist/es/node_modules/@codemirror/lang-xml/dist/index.js +17 -216
- package/dist/es/node_modules/@codemirror/lang-yaml/dist/index.js +16 -51
- package/dist/es/node_modules/@codemirror/language/dist/index.js +14 -1299
- package/dist/es/node_modules/@codemirror/lint/dist/index.js +16 -649
- package/dist/es/node_modules/@codemirror/search/dist/index.js +15 -839
- package/dist/es/node_modules/@codemirror/state/dist/index.js +14 -2643
- package/dist/es/node_modules/@codemirror/theme-one-dark/dist/index.js +14 -132
- package/dist/es/node_modules/@codemirror/view/dist/index.js +14 -7365
- package/dist/es/node_modules/@lezer/common/dist/index.js +15 -1431
- package/dist/es/node_modules/@lezer/highlight/dist/index.js +14 -637
- package/dist/es/node_modules/@lezer/java/dist/index.js +14 -62
- package/dist/es/node_modules/@lezer/javascript/dist/index.js +14 -161
- package/dist/es/node_modules/@lezer/json/dist/index.js +14 -34
- package/dist/es/node_modules/@lezer/lr/dist/index.js +14 -1309
- package/dist/es/node_modules/@lezer/python/dist/index.js +14 -221
- package/dist/es/node_modules/@lezer/xml/dist/index.js +14 -100
- package/dist/es/node_modules/@lezer/yaml/dist/index.js +14 -274
- package/dist/es/node_modules/@marijn/find-cluster-break/src/index.js +14 -69
- package/dist/es/node_modules/@tanstack/devtools-event-client/dist/esm/plugin.js +14 -178
- package/dist/es/node_modules/@tanstack/form-core/dist/esm/EventClient.js +14 -13
- package/dist/es/node_modules/@tanstack/form-core/dist/esm/FieldApi.js +14 -406
- package/dist/es/node_modules/@tanstack/form-core/dist/esm/FormApi.js +14 -772
- package/dist/es/node_modules/@tanstack/form-core/dist/esm/ValidationLogic.js +14 -55
- package/dist/es/node_modules/@tanstack/form-core/dist/esm/metaHelper.js +15 -109
- package/dist/es/node_modules/@tanstack/form-core/dist/esm/standardSchemaValidator.js +14 -45
- package/dist/es/node_modules/@tanstack/form-core/dist/esm/utils.js +14 -213
- package/dist/es/node_modules/@tanstack/pacer-lite/dist/lite-throttler.js +14 -29
- package/dist/es/node_modules/@tanstack/store/dist/esm/derived.js +14 -74
- package/dist/es/node_modules/@tanstack/store/dist/esm/scheduler.js +14 -79
- package/dist/es/node_modules/@tanstack/store/dist/esm/store.js +14 -21
- package/dist/es/node_modules/@tanstack/store/dist/esm/types.js +14 -6
- package/dist/es/node_modules/@tanstack/table-core/build/lib/index.js +14 -1885
- package/dist/es/node_modules/@tanstack/vue-form/dist/esm/useField.js +14 -38
- package/dist/es/node_modules/@tanstack/vue-form/dist/esm/useForm.js +14 -33
- package/dist/es/node_modules/@tanstack/vue-store/dist/esm/index.js +14 -48
- package/dist/es/node_modules/@tanstack/vue-table/build/lib/index.js +14 -159
- package/dist/es/node_modules/@tiptap/core/dist/index.js +14 -0
- package/dist/es/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js +14 -0
- package/dist/es/node_modules/@tiptap/extension-blockquote/dist/index.js +15 -0
- package/dist/es/node_modules/@tiptap/extension-bold/dist/index.js +15 -0
- package/dist/es/node_modules/@tiptap/extension-character-count/dist/index.js +14 -0
- package/dist/es/node_modules/@tiptap/extension-code/dist/index.js +14 -0
- package/dist/es/node_modules/@tiptap/extension-code-block/dist/index.js +14 -0
- package/dist/es/node_modules/@tiptap/extension-document/dist/index.js +14 -0
- package/dist/es/node_modules/@tiptap/extension-hard-break/dist/index.js +14 -0
- package/dist/es/node_modules/@tiptap/extension-heading/dist/index.js +14 -0
- package/dist/es/node_modules/@tiptap/extension-highlight/dist/index.js +14 -0
- package/dist/es/node_modules/@tiptap/extension-horizontal-rule/dist/index.js +14 -0
- package/dist/es/node_modules/@tiptap/extension-image/dist/index.js +14 -0
- package/dist/es/node_modules/@tiptap/extension-italic/dist/index.js +14 -0
- package/dist/es/node_modules/@tiptap/extension-link/dist/index.js +14 -0
- package/dist/es/node_modules/@tiptap/extension-list/dist/index.js +14 -0
- package/dist/es/node_modules/@tiptap/extension-paragraph/dist/index.js +14 -0
- package/dist/es/node_modules/@tiptap/extension-strike/dist/index.js +14 -0
- package/dist/es/node_modules/@tiptap/extension-subscript/dist/index.js +14 -0
- package/dist/es/node_modules/@tiptap/extension-superscript/dist/index.js +14 -0
- package/dist/es/node_modules/@tiptap/extension-table/dist/index.js +14 -0
- package/dist/es/node_modules/@tiptap/extension-task-item/dist/index.js +14 -0
- package/dist/es/node_modules/@tiptap/extension-task-list/dist/index.js +14 -0
- package/dist/es/node_modules/@tiptap/extension-text/dist/index.js +14 -0
- package/dist/es/node_modules/@tiptap/extension-text-align/dist/index.js +14 -0
- package/dist/es/node_modules/@tiptap/extension-text-style/dist/index.js +14 -0
- package/dist/es/node_modules/@tiptap/extension-underline/dist/index.js +14 -0
- package/dist/es/node_modules/@tiptap/extensions/dist/index.js +14 -0
- package/dist/es/node_modules/@tiptap/starter-kit/dist/index.js +14 -0
- package/dist/es/node_modules/@tiptap/vue-3/dist/index.js +14 -0
- package/dist/es/node_modules/@vueuse/core/dist/index.js +14 -125
- package/dist/es/node_modules/@vueuse/shared/dist/index.js +14 -55
- package/dist/es/node_modules/codemirror/dist/index.js +14 -40
- package/dist/es/node_modules/crelt/index.js +14 -27
- package/dist/es/node_modules/delegate/src/closest.js +14 -0
- package/dist/es/node_modules/delegate/src/delegate.js +14 -0
- package/dist/es/node_modules/downloadjs/download.js +14 -0
- package/dist/es/node_modules/eventemitter3/index.js +14 -0
- package/dist/es/node_modules/linkifyjs/dist/linkify.js +14 -0
- package/dist/es/node_modules/lodash-es/_DataView.js +14 -0
- package/dist/es/node_modules/lodash-es/_Hash.js +14 -20
- package/dist/es/node_modules/lodash-es/_ListCache.js +14 -20
- package/dist/es/node_modules/lodash-es/_Map.js +14 -6
- package/dist/es/node_modules/lodash-es/_MapCache.js +14 -20
- package/dist/es/node_modules/lodash-es/_Promise.js +14 -0
- package/dist/es/node_modules/lodash-es/_Set.js +14 -0
- package/dist/es/node_modules/lodash-es/_Stack.js +14 -0
- package/dist/es/node_modules/lodash-es/_Symbol.js +14 -5
- package/dist/es/node_modules/lodash-es/_Uint8Array.js +14 -0
- package/dist/es/node_modules/lodash-es/_WeakMap.js +14 -0
- package/dist/es/node_modules/lodash-es/_apply.js +14 -0
- package/dist/es/node_modules/lodash-es/_arrayEach.js +14 -0
- package/dist/es/node_modules/lodash-es/_arrayFilter.js +14 -0
- package/dist/es/node_modules/lodash-es/_arrayLikeKeys.js +14 -0
- package/dist/es/node_modules/lodash-es/_arrayMap.js +14 -8
- package/dist/es/node_modules/lodash-es/_arrayPush.js +14 -0
- package/dist/es/node_modules/lodash-es/_assignValue.js +14 -0
- package/dist/es/node_modules/lodash-es/_assocIndexOf.js +14 -10
- package/dist/es/node_modules/lodash-es/_baseAssignValue.js +14 -0
- package/dist/es/node_modules/lodash-es/_baseClone.js +14 -0
- package/dist/es/node_modules/lodash-es/_baseFlatten.js +14 -0
- package/dist/es/node_modules/lodash-es/_baseGet.js +14 -11
- package/dist/es/node_modules/lodash-es/_baseGetAllKeys.js +14 -0
- package/dist/es/node_modules/lodash-es/_baseGetTag.js +14 -10
- package/dist/es/node_modules/lodash-es/_baseIsArguments.js +14 -0
- package/dist/es/node_modules/lodash-es/_baseIsMap.js +14 -0
- package/dist/es/node_modules/lodash-es/_baseIsNative.js +14 -16
- package/dist/es/node_modules/lodash-es/_baseIsRegExp.js +14 -0
- package/dist/es/node_modules/lodash-es/_baseIsSet.js +14 -0
- package/dist/es/node_modules/lodash-es/_baseIsTypedArray.js +14 -0
- package/dist/es/node_modules/lodash-es/_baseKeysIn.js +14 -0
- package/dist/es/node_modules/lodash-es/_baseSetToString.js +14 -0
- package/dist/es/node_modules/lodash-es/_baseSlice.js +14 -0
- package/dist/es/node_modules/lodash-es/_baseTimes.js +14 -0
- package/dist/es/node_modules/lodash-es/_baseToString.js +14 -18
- package/dist/es/node_modules/lodash-es/_baseUnary.js +14 -0
- package/dist/es/node_modules/lodash-es/_baseUnset.js +14 -0
- package/dist/es/node_modules/lodash-es/_castPath.js +14 -10
- package/dist/es/node_modules/lodash-es/_cloneArrayBuffer.js +14 -0
- package/dist/es/node_modules/lodash-es/_cloneBuffer.js +14 -0
- package/dist/es/node_modules/lodash-es/_cloneDataView.js +14 -0
- package/dist/es/node_modules/lodash-es/_cloneRegExp.js +14 -0
- package/dist/es/node_modules/lodash-es/_cloneSymbol.js +14 -0
- package/dist/es/node_modules/lodash-es/_cloneTypedArray.js +14 -0
- package/dist/es/node_modules/lodash-es/_copyObject.js +14 -0
- package/dist/es/node_modules/lodash-es/_coreJsData.js +14 -5
- package/dist/es/node_modules/lodash-es/_customOmitClone.js +14 -0
- package/dist/es/node_modules/lodash-es/_defineProperty.js +14 -0
- package/dist/es/node_modules/lodash-es/_flatRest.js +14 -0
- package/dist/es/node_modules/lodash-es/_freeGlobal.js +14 -4
- package/dist/es/node_modules/lodash-es/_getAllKeysIn.js +14 -0
- package/dist/es/node_modules/lodash-es/_getMapData.js +14 -8
- package/dist/es/node_modules/lodash-es/_getNative.js +14 -9
- package/dist/es/node_modules/lodash-es/_getPrototype.js +14 -0
- package/dist/es/node_modules/lodash-es/_getRawTag.js +14 -15
- package/dist/es/node_modules/lodash-es/_getSymbols.js +14 -0
- package/dist/es/node_modules/lodash-es/_getSymbolsIn.js +14 -0
- package/dist/es/node_modules/lodash-es/_getTag.js +14 -0
- package/dist/es/node_modules/lodash-es/_getValue.js +14 -6
- package/dist/es/node_modules/lodash-es/_hashClear.js +14 -7
- package/dist/es/node_modules/lodash-es/_hashDelete.js +14 -7
- package/dist/es/node_modules/lodash-es/_hashGet.js +14 -13
- package/dist/es/node_modules/lodash-es/_hashHas.js +14 -9
- package/dist/es/node_modules/lodash-es/_hashSet.js +14 -9
- package/dist/es/node_modules/lodash-es/_initCloneArray.js +14 -0
- package/dist/es/node_modules/lodash-es/_initCloneByTag.js +14 -0
- package/dist/es/node_modules/lodash-es/_isFlattenable.js +14 -0
- package/dist/es/node_modules/lodash-es/_isIndex.js +14 -0
- package/dist/es/node_modules/lodash-es/_isKey.js +14 -12
- package/dist/es/node_modules/lodash-es/_isKeyable.js +14 -7
- package/dist/es/node_modules/lodash-es/_isMasked.js +14 -11
- package/dist/es/node_modules/lodash-es/_isPrototype.js +14 -0
- package/dist/es/node_modules/lodash-es/_listCacheClear.js +14 -6
- package/dist/es/node_modules/lodash-es/_listCacheDelete.js +14 -12
- package/dist/es/node_modules/lodash-es/_listCacheGet.js +14 -8
- package/dist/es/node_modules/lodash-es/_listCacheHas.js +14 -7
- package/dist/es/node_modules/lodash-es/_listCacheSet.js +14 -8
- package/dist/es/node_modules/lodash-es/_mapCacheClear.js +14 -13
- package/dist/es/node_modules/lodash-es/_mapCacheDelete.js +14 -8
- package/dist/es/node_modules/lodash-es/_mapCacheGet.js +14 -7
- package/dist/es/node_modules/lodash-es/_mapCacheHas.js +14 -7
- package/dist/es/node_modules/lodash-es/_mapCacheSet.js +14 -8
- package/dist/es/node_modules/lodash-es/_memoizeCapped.js +14 -11
- package/dist/es/node_modules/lodash-es/_nativeCreate.js +14 -5
- package/dist/es/node_modules/lodash-es/_nativeKeysIn.js +14 -0
- package/dist/es/node_modules/lodash-es/_nodeUtil.js +14 -0
- package/dist/es/node_modules/lodash-es/_objectToString.js +14 -7
- package/dist/es/node_modules/lodash-es/_overArg.js +14 -0
- package/dist/es/node_modules/lodash-es/_overRest.js +14 -0
- package/dist/es/node_modules/lodash-es/_parent.js +14 -0
- package/dist/es/node_modules/lodash-es/_root.js +14 -5
- package/dist/es/node_modules/lodash-es/_setToString.js +14 -0
- package/dist/es/node_modules/lodash-es/_shortOut.js +14 -0
- package/dist/es/node_modules/lodash-es/_stackClear.js +14 -0
- package/dist/es/node_modules/lodash-es/_stackDelete.js +14 -0
- package/dist/es/node_modules/lodash-es/_stackGet.js +14 -0
- package/dist/es/node_modules/lodash-es/_stackHas.js +14 -0
- package/dist/es/node_modules/lodash-es/_stackSet.js +14 -0
- package/dist/es/node_modules/lodash-es/_stringToPath.js +14 -10
- package/dist/es/node_modules/lodash-es/_toKey.js +14 -10
- package/dist/es/node_modules/lodash-es/_toSource.js +14 -17
- package/dist/es/node_modules/lodash-es/constant.js +14 -0
- package/dist/es/node_modules/lodash-es/eq.js +14 -6
- package/dist/es/node_modules/lodash-es/flatten.js +14 -0
- package/dist/es/node_modules/lodash-es/get.js +14 -8
- package/dist/es/node_modules/lodash-es/identity.js +14 -0
- package/dist/es/node_modules/lodash-es/isArguments.js +14 -0
- package/dist/es/node_modules/lodash-es/isArray.js +14 -4
- package/dist/es/node_modules/lodash-es/isArrayLike.js +14 -0
- package/dist/es/node_modules/lodash-es/isBuffer.js +14 -0
- package/dist/es/node_modules/lodash-es/isFinite.js +14 -0
- package/dist/es/node_modules/lodash-es/isFunction.js +14 -12
- package/dist/es/node_modules/lodash-es/isLength.js +14 -0
- package/dist/es/node_modules/lodash-es/isMap.js +14 -0
- package/dist/es/node_modules/lodash-es/isNaN.js +14 -0
- package/dist/es/node_modules/lodash-es/isNil.js +14 -6
- package/dist/es/node_modules/lodash-es/isNumber.js +14 -0
- package/dist/es/node_modules/lodash-es/isObject.js +14 -7
- package/dist/es/node_modules/lodash-es/isObjectLike.js +14 -6
- package/dist/es/node_modules/lodash-es/isPlainObject.js +14 -0
- package/dist/es/node_modules/lodash-es/isRegExp.js +14 -0
- package/dist/es/node_modules/lodash-es/isSet.js +14 -0
- package/dist/es/node_modules/lodash-es/isString.js +14 -10
- package/dist/es/node_modules/lodash-es/isSymbol.js +14 -9
- package/dist/es/node_modules/lodash-es/isTypedArray.js +14 -0
- package/dist/es/node_modules/lodash-es/keysIn.js +14 -0
- package/dist/es/node_modules/lodash-es/last.js +14 -0
- package/dist/es/node_modules/lodash-es/memoize.js +14 -18
- package/dist/es/node_modules/lodash-es/omit.js +14 -0
- package/dist/es/node_modules/lodash-es/stubArray.js +14 -0
- package/dist/es/node_modules/lodash-es/stubFalse.js +14 -0
- package/dist/es/node_modules/lodash-es/toString.js +14 -7
- package/dist/es/node_modules/orderedmap/dist/index.js +14 -0
- package/dist/es/node_modules/prosemirror-commands/dist/index.js +14 -0
- package/dist/es/node_modules/prosemirror-dropcursor/dist/index.js +14 -0
- package/dist/es/node_modules/prosemirror-gapcursor/dist/index.js +14 -0
- package/dist/es/node_modules/prosemirror-history/dist/index.js +14 -0
- package/dist/es/node_modules/prosemirror-keymap/dist/index.js +14 -0
- package/dist/es/node_modules/prosemirror-model/dist/index.js +14 -0
- package/dist/es/node_modules/prosemirror-schema-list/dist/index.js +14 -0
- package/dist/es/node_modules/prosemirror-state/dist/index.js +14 -0
- package/dist/es/node_modules/prosemirror-tables/dist/index.js +14 -0
- package/dist/es/node_modules/prosemirror-transform/dist/index.js +14 -0
- package/dist/es/node_modules/prosemirror-view/dist/index.js +14 -0
- package/dist/es/node_modules/rope-sequence/dist/index.js +14 -0
- package/dist/es/node_modules/style-mod/src/style-mod.js +14 -109
- package/dist/es/node_modules/vue-codemirror/dist/vue-codemirror.esm.js +14 -132
- package/dist/es/node_modules/w3c-keyname/index.js +14 -93
- package/dist/es/node_modules/xgplayer/dist/index.min.css +14 -0
- package/dist/es/node_modules/xgplayer/es/_virtual/_rollupPluginBabelHelpers.js +14 -0
- package/dist/es/node_modules/xgplayer/es/constant.js +14 -0
- package/dist/es/node_modules/xgplayer/es/defaultConfig.js +14 -0
- package/dist/es/node_modules/xgplayer/es/error.js +14 -0
- package/dist/es/node_modules/xgplayer/es/events.js +14 -0
- package/dist/es/node_modules/xgplayer/es/index.umd.js +14 -0
- package/dist/es/node_modules/xgplayer/es/instManager.js +14 -0
- package/dist/es/node_modules/xgplayer/es/lang/en.js +14 -0
- package/dist/es/node_modules/xgplayer/es/lang/i18n.js +14 -0
- package/dist/es/node_modules/xgplayer/es/lang/jp.js +14 -0
- package/dist/es/node_modules/xgplayer/es/lang/zh-cn.js +14 -0
- package/dist/es/node_modules/xgplayer/es/mediaProxy.js +14 -0
- package/dist/es/node_modules/xgplayer/es/player.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugin/basePlugin.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugin/hooksDescriptor.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugin/plugin.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugin/pluginsManager.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugin/preset.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugin/resizeObserver.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/assets/back.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/assets/download.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/assets/exitCssFull.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/assets/exitFull.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/assets/loading.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/assets/pause.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/assets/pipIcon.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/assets/pipIconExit.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/assets/play.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/assets/playNext.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/assets/replay.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/assets/requestCssFull.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/assets/requestFull.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/assets/rotate.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/assets/seekicon.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/assets/volumeLarge.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/assets/volumeMuted.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/assets/volumeSmall.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/common/iconPlugin.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/common/iconTools.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/common/optionList.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/common/optionsIcon.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/common/thumbnail.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/controls/index.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/cssFullScreen/index.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/definition/index.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/download/index.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/dynamicBg/index.js +15 -0
- package/dist/es/node_modules/xgplayer/es/plugins/enter/index.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/error/index.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/fpsDetect/index.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/fullscreen/backicon.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/fullscreen/index.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/gapJump/index.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/keyboard/index.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/loading/index.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/logger/index.js +15 -0
- package/dist/es/node_modules/xgplayer/es/plugins/miniScreen/index.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/miniScreen/miniScreenIcon.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/mobile/index.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/mobile/touch.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/pc/index.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/pip/index.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/play/index.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/playNext/index.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/playbackRate/index.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/poster/index.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/progress/index.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/progress/innerList.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/progress/miniProgress.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/progressPreview/dotsApi.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/progressPreview/index.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/prompt/index.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/replay/index.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/rotate/index.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/screenShot/index.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/start/index.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/stats/index.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/testspeed/index.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/time/index.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/time/timesegments.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/volume/index.js +14 -0
- package/dist/es/node_modules/xgplayer/es/plugins/waitingTimeoutJump/index.js +14 -0
- package/dist/es/node_modules/xgplayer/es/presets/default.js +14 -0
- package/dist/es/node_modules/xgplayer/es/state.js +14 -0
- package/dist/es/node_modules/xgplayer/es/stateClassMap.js +14 -0
- package/dist/es/node_modules/xgplayer/es/utils/database.js +14 -0
- package/dist/es/node_modules/xgplayer/es/utils/debug.js +14 -0
- package/dist/es/node_modules/xgplayer/es/utils/draggabilly.js +14 -0
- package/dist/es/node_modules/xgplayer/es/utils/sniffer.js +14 -0
- package/dist/es/node_modules/xgplayer/es/utils/util.js +14 -0
- package/dist/es/node_modules/xgplayer/es/utils/xgplayerTimeRange.js +14 -0
- package/dist/es/node_modules/xgplayer/es/version.js +14 -0
- package/dist/es/packages/components/index.js +14 -0
- package/dist/es/{src/styles → styles}/tokens.css +13 -0
- package/dist/lib/Button/index.js +14 -0
- package/dist/lib/Button/src/Button.css +14 -0
- package/dist/lib/Button/src/Button.vue.js +14 -0
- package/dist/lib/Button/src/Button2.css +14 -0
- package/dist/lib/CodeEditor/index.js +14 -0
- package/dist/lib/CodeEditor/src/index.css +14 -0
- package/dist/lib/CodeEditor/src/index.vue.js +14 -0
- package/dist/lib/{src/CodeEditor → CodeEditor}/src/index2.css +14 -1
- package/dist/lib/ConfigProvider/index.js +14 -0
- package/dist/lib/ConfigProvider/src/configProvider.js +14 -0
- package/dist/lib/ConfigProvider/src/configProviderProps.js +14 -0
- package/dist/lib/ConfigProvider/src/constants.js +14 -0
- package/dist/lib/ConfigProvider/src/useGlobalConfig.js +14 -0
- package/dist/lib/CountTo/index.js +14 -0
- package/dist/lib/CountTo/src/index.css +14 -0
- package/dist/lib/CountTo/src/index.vue.js +14 -0
- package/dist/lib/Ellipsis/index.js +14 -0
- package/dist/lib/Ellipsis/src/components/JsEllipsis.css +14 -0
- package/dist/lib/Ellipsis/src/components/JsEllipsis.vue.js +14 -0
- package/dist/lib/Ellipsis/src/components/NativeEllipsis.css +14 -0
- package/dist/lib/Ellipsis/src/components/NativeEllipsis.vue.js +14 -0
- package/dist/lib/Ellipsis/src/components/NativeEllipsis2.css +14 -0
- package/dist/lib/Ellipsis/src/index.css +14 -0
- package/dist/lib/Ellipsis/src/index.vue.js +14 -0
- package/dist/lib/Ellipsis/src/utils/utils.js +14 -0
- package/dist/lib/Form/index.js +14 -0
- package/dist/lib/Form/src/Form.css +14 -0
- package/dist/lib/Form/src/Form.vue.js +14 -0
- package/dist/lib/{src/Form → Form}/src/styles/form.css +13 -0
- package/dist/lib/Grid/index.js +14 -0
- package/dist/lib/Grid/src/Grid.css +14 -0
- package/dist/lib/Grid/src/Grid.vue.js +14 -0
- package/dist/lib/Grid/src/components/ActionBar.css +14 -0
- package/dist/lib/Grid/src/components/ActionBar.vue.js +14 -0
- package/dist/lib/Grid/src/components/CellEditor.css +14 -0
- package/dist/lib/Grid/src/components/CellEditor.vue.js +14 -0
- package/dist/lib/Grid/src/components/CellEditor2.css +14 -0
- package/dist/lib/{src/Grid → Grid}/src/components/ColumnFilter.css +14 -1
- package/dist/lib/Grid/src/components/ColumnFilter.vue.js +14 -0
- package/dist/lib/{src/Grid → Grid}/src/components/ColumnSettings.css +14 -1
- package/dist/lib/Grid/src/components/ColumnSettings.vue.js +14 -0
- package/dist/{es/src → lib}/Grid/src/components/DataTable.css +14 -1
- package/dist/lib/Grid/src/components/DataTable.vue.js +14 -0
- package/dist/lib/{src/Grid → Grid}/src/components/Pager.css +14 -1
- package/dist/lib/Grid/src/components/Pager.vue.js +14 -0
- package/dist/lib/{src/Grid → Grid}/src/components/QueryBar.css +14 -1
- package/dist/lib/Grid/src/components/QueryBar.vue.js +14 -0
- package/dist/lib/Grid/src/composables/useCellEditor.js +14 -0
- package/dist/lib/Grid/src/composables/useGridTable.js +14 -0
- package/dist/lib/{src/Grid → Grid}/src/styles/table.css +13 -0
- package/dist/lib/Marquee/index.js +14 -0
- package/dist/lib/Marquee/src/index.css +14 -0
- package/dist/lib/Marquee/src/index.vue.js +14 -0
- package/dist/lib/Marquee/src/index2.css +14 -0
- package/dist/lib/Overlay/index.js +14 -0
- package/dist/lib/Overlay/src/Message.css +14 -0
- package/dist/lib/Overlay/src/Message.vue.js +14 -0
- package/dist/lib/{src/Overlay → Overlay}/src/Message2.css +14 -1
- package/dist/lib/Overlay/src/Modal.css +14 -0
- package/dist/lib/Overlay/src/Modal.vue.js +14 -0
- package/dist/lib/{src/Overlay → Overlay}/src/Modal2.css +14 -1
- package/dist/lib/Overlay/src/Notice.css +14 -0
- package/dist/lib/Overlay/src/Notice.vue.js +14 -0
- package/dist/lib/{src/Overlay → Overlay}/src/Notice2.css +14 -1
- package/dist/lib/RichTextEditor/index.js +14 -0
- package/dist/lib/RichTextEditor/src/ToolbarPanel.css +14 -0
- package/dist/lib/RichTextEditor/src/ToolbarPanel.vue.js +14 -0
- package/dist/lib/RichTextEditor/src/ToolbarPanel2.css +14 -0
- package/dist/lib/RichTextEditor/src/components/BlockquoteButton.css +14 -0
- package/dist/lib/RichTextEditor/src/components/BlockquoteButton.vue.js +14 -0
- package/dist/lib/RichTextEditor/src/components/CodeBlockButton.css +14 -0
- package/dist/lib/RichTextEditor/src/components/CodeBlockButton.vue.js +14 -0
- package/dist/lib/RichTextEditor/src/components/ColorHighlightPopover.css +14 -0
- package/dist/lib/RichTextEditor/src/components/ColorHighlightPopover.vue.js +14 -0
- package/dist/lib/RichTextEditor/src/components/FontSizeDropdownMenu.css +14 -0
- package/dist/lib/RichTextEditor/src/components/FontSizeDropdownMenu.vue.js +14 -0
- package/dist/lib/RichTextEditor/src/components/HeadingDropdownMenu.css +14 -0
- package/dist/lib/RichTextEditor/src/components/HeadingDropdownMenu.vue.js +14 -0
- package/dist/lib/RichTextEditor/src/components/ImageUploadButton.css +14 -0
- package/dist/lib/RichTextEditor/src/components/ImageUploadButton.vue.js +14 -0
- package/dist/lib/RichTextEditor/src/components/LinkPopover.css +14 -0
- package/dist/lib/RichTextEditor/src/components/LinkPopover.vue.js +14 -0
- package/dist/lib/RichTextEditor/src/components/ListDropdownMenu.css +14 -0
- package/dist/lib/RichTextEditor/src/components/ListDropdownMenu.vue.js +14 -0
- package/dist/lib/RichTextEditor/src/components/MarkButton.css +14 -0
- package/dist/lib/RichTextEditor/src/components/MarkButton.vue.js +14 -0
- package/dist/lib/RichTextEditor/src/components/TableButton.css +14 -0
- package/dist/lib/RichTextEditor/src/components/TableButton.vue.js +14 -0
- package/dist/lib/RichTextEditor/src/components/TextAlignDropdownMenu.css +14 -0
- package/dist/lib/RichTextEditor/src/components/TextAlignDropdownMenu.vue.js +14 -0
- package/dist/lib/RichTextEditor/src/components/TextColorPopover.css +14 -0
- package/dist/lib/RichTextEditor/src/components/TextColorPopover.vue.js +14 -0
- package/dist/lib/RichTextEditor/src/components/ToolbarGroup.css +14 -0
- package/dist/lib/RichTextEditor/src/components/ToolbarGroup.vue.js +14 -0
- package/dist/lib/RichTextEditor/src/components/ToolbarSeparator.css +14 -0
- package/dist/lib/RichTextEditor/src/components/ToolbarSeparator.vue.js +14 -0
- package/dist/lib/RichTextEditor/src/components/UndoRedoButton.css +14 -0
- package/dist/lib/RichTextEditor/src/components/UndoRedoButton.vue.js +14 -0
- package/dist/lib/RichTextEditor/src/components/VideoUploadButton.css +14 -0
- package/dist/lib/RichTextEditor/src/components/VideoUploadButton.vue.js +14 -0
- package/dist/lib/RichTextEditor/src/components/basic/ColorPicker.css +14 -0
- package/dist/lib/RichTextEditor/src/components/basic/ColorPicker.vue.js +14 -0
- package/dist/lib/RichTextEditor/src/components/basic/MediaUploadModal.css +14 -0
- package/dist/lib/RichTextEditor/src/components/basic/MediaUploadModal.vue.js +14 -0
- package/dist/lib/RichTextEditor/src/components/basic/SelectMenu.css +14 -0
- package/dist/lib/RichTextEditor/src/components/basic/SelectMenu.vue.js +14 -0
- package/dist/lib/RichTextEditor/src/components/basic/SelectMenu2.css +14 -0
- package/dist/lib/RichTextEditor/src/components/icons.js +14 -0
- package/dist/lib/RichTextEditor/src/constant/index.js +14 -0
- package/dist/lib/RichTextEditor/src/extensions/video.js +14 -0
- package/dist/lib/RichTextEditor/src/index.css +14 -0
- package/dist/lib/RichTextEditor/src/index.vue.js +14 -0
- package/dist/lib/RichTextEditor/src/index2.css +14 -0
- package/dist/lib/RichTextEditor/src/props.js +14 -0
- package/dist/lib/ScaleScreen/index.js +14 -0
- package/dist/lib/ScaleScreen/src/index.css +14 -0
- package/dist/lib/ScaleScreen/src/index.vue.js +14 -0
- package/dist/lib/{src/ScaleScreen → ScaleScreen}/src/index2.css +13 -0
- package/dist/lib/Transition/index.js +14 -0
- package/dist/lib/Transition/src/CollapseTransition.css +14 -0
- package/dist/lib/Transition/src/CollapseTransition.vue.js +14 -0
- package/dist/lib/Transition/src/CreateTransition.js +14 -0
- package/dist/lib/Transition/src/ExpandTransition.js +14 -0
- package/dist/lib/Transition/src/style/index.css +14 -0
- package/dist/lib/VideoBackground/index.js +14 -0
- package/dist/lib/VideoBackground/src/helper.js +14 -0
- package/dist/lib/VideoBackground/src/index.css +14 -0
- package/dist/lib/VideoBackground/src/index.vue.js +14 -0
- package/dist/lib/VideoBackground/src/index2.css +14 -0
- package/dist/lib/{src/VideoBackground → VideoBackground}/src/index3.css +13 -0
- package/dist/lib/VideoBackground/src/videoBackground.js +14 -0
- package/dist/lib/VideoPlayer/index.js +14 -0
- package/dist/lib/VideoPlayer/src/index.css +14 -0
- package/dist/lib/VideoPlayer/src/index.vue.js +14 -0
- package/dist/lib/VideoPlayer/src/localeSetting.js +14 -0
- package/dist/lib/VirtualScroll/index.js +14 -0
- package/dist/lib/VirtualScroll/src/index.css +14 -0
- package/dist/lib/VirtualScroll/src/index.vue.js +14 -0
- package/dist/lib/VirtualScroll/src/index.vue2.js +14 -0
- package/dist/lib/VirtualScroll/src/index2.css +14 -0
- package/dist/lib/_virtual/_commonjsHelpers.js +14 -0
- package/dist/lib/_virtual/_plugin-vue_export-helper.js +14 -1
- package/dist/lib/_virtual/delegate.js +14 -0
- package/dist/lib/_virtual/download.js +14 -0
- package/dist/lib/_virtual/download2.js +14 -0
- package/dist/lib/_virtual/index.js +14 -0
- package/dist/lib/_virtual/index2.js +14 -0
- package/dist/lib/hooks/useLocale.js +14 -0
- package/dist/lib/hooks/useNamespace.js +14 -0
- package/dist/lib/index.js +14 -1
- package/dist/lib/locale/lang/en-US.js +14 -0
- package/dist/lib/locale/lang/ja-JP.js +14 -0
- package/dist/lib/locale/lang/zh-CN.js +14 -0
- package/dist/lib/node_modules/@codemirror/autocomplete/dist/index.js +14 -1
- package/dist/lib/node_modules/@codemirror/commands/dist/index.js +14 -1
- package/dist/lib/node_modules/@codemirror/lang-java/dist/index.js +14 -1
- package/dist/lib/node_modules/@codemirror/lang-javascript/dist/index.js +14 -13
- package/dist/lib/node_modules/@codemirror/lang-json/dist/index.js +14 -1
- package/dist/lib/node_modules/@codemirror/lang-python/dist/index.js +14 -3
- package/dist/lib/node_modules/@codemirror/lang-sql/dist/index.js +14 -2
- package/dist/lib/node_modules/@codemirror/lang-xml/dist/index.js +14 -1
- package/dist/lib/node_modules/@codemirror/lang-yaml/dist/index.js +14 -1
- package/dist/lib/node_modules/@codemirror/language/dist/index.js +14 -1
- package/dist/lib/node_modules/@codemirror/lint/dist/index.js +14 -1
- package/dist/lib/node_modules/@codemirror/search/dist/index.js +14 -2
- package/dist/lib/node_modules/@codemirror/state/dist/index.js +14 -5
- package/dist/lib/node_modules/@codemirror/theme-one-dark/dist/index.js +14 -1
- package/dist/lib/node_modules/@codemirror/view/dist/index.js +14 -5
- package/dist/lib/node_modules/@lezer/common/dist/index.js +14 -1
- package/dist/lib/node_modules/@lezer/highlight/dist/index.js +14 -1
- package/dist/lib/node_modules/@lezer/java/dist/index.js +14 -1
- package/dist/lib/node_modules/@lezer/javascript/dist/index.js +14 -1
- package/dist/lib/node_modules/@lezer/json/dist/index.js +14 -1
- package/dist/lib/node_modules/@lezer/lr/dist/index.js +14 -1
- package/dist/lib/node_modules/@lezer/python/dist/index.js +14 -1
- package/dist/lib/node_modules/@lezer/xml/dist/index.js +14 -1
- package/dist/lib/node_modules/@lezer/yaml/dist/index.js +14 -1
- package/dist/lib/node_modules/@marijn/find-cluster-break/src/index.js +14 -1
- package/dist/lib/node_modules/@tanstack/devtools-event-client/dist/esm/plugin.js +14 -1
- package/dist/lib/node_modules/@tanstack/form-core/dist/esm/EventClient.js +14 -1
- package/dist/lib/node_modules/@tanstack/form-core/dist/esm/FieldApi.js +14 -1
- package/dist/lib/node_modules/@tanstack/form-core/dist/esm/FormApi.js +14 -1
- package/dist/lib/node_modules/@tanstack/form-core/dist/esm/ValidationLogic.js +14 -1
- package/dist/lib/node_modules/@tanstack/form-core/dist/esm/metaHelper.js +14 -1
- package/dist/lib/node_modules/@tanstack/form-core/dist/esm/standardSchemaValidator.js +14 -1
- package/dist/lib/node_modules/@tanstack/form-core/dist/esm/utils.js +14 -1
- package/dist/lib/node_modules/@tanstack/pacer-lite/dist/lite-throttler.js +14 -1
- package/dist/lib/node_modules/@tanstack/store/dist/esm/derived.js +14 -1
- package/dist/lib/node_modules/@tanstack/store/dist/esm/scheduler.js +14 -1
- package/dist/lib/node_modules/@tanstack/store/dist/esm/store.js +14 -1
- package/dist/lib/node_modules/@tanstack/store/dist/esm/types.js +14 -1
- package/dist/lib/node_modules/@tanstack/table-core/build/lib/index.js +14 -4
- package/dist/lib/node_modules/@tanstack/vue-form/dist/esm/useField.js +14 -1
- package/dist/lib/node_modules/@tanstack/vue-form/dist/esm/useForm.js +14 -1
- package/dist/lib/node_modules/@tanstack/vue-store/dist/esm/index.js +14 -1
- package/dist/lib/node_modules/@tanstack/vue-table/build/lib/index.js +14 -1
- package/dist/lib/node_modules/@tiptap/core/dist/index.js +14 -0
- package/dist/lib/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js +14 -0
- package/dist/lib/node_modules/@tiptap/extension-blockquote/dist/index.js +14 -0
- package/dist/lib/node_modules/@tiptap/extension-bold/dist/index.js +14 -0
- package/dist/lib/node_modules/@tiptap/extension-character-count/dist/index.js +14 -0
- package/dist/lib/node_modules/@tiptap/extension-code/dist/index.js +14 -0
- package/dist/lib/node_modules/@tiptap/extension-code-block/dist/index.js +14 -0
- package/dist/lib/node_modules/@tiptap/extension-document/dist/index.js +14 -0
- package/dist/lib/node_modules/@tiptap/extension-hard-break/dist/index.js +14 -0
- package/dist/lib/node_modules/@tiptap/extension-heading/dist/index.js +14 -0
- package/dist/lib/node_modules/@tiptap/extension-highlight/dist/index.js +14 -0
- package/dist/lib/node_modules/@tiptap/extension-horizontal-rule/dist/index.js +14 -0
- package/dist/lib/node_modules/@tiptap/extension-image/dist/index.js +14 -0
- package/dist/lib/node_modules/@tiptap/extension-italic/dist/index.js +14 -0
- package/dist/lib/node_modules/@tiptap/extension-link/dist/index.js +14 -0
- package/dist/lib/node_modules/@tiptap/extension-list/dist/index.js +14 -0
- package/dist/lib/node_modules/@tiptap/extension-paragraph/dist/index.js +14 -0
- package/dist/lib/node_modules/@tiptap/extension-strike/dist/index.js +14 -0
- package/dist/lib/node_modules/@tiptap/extension-subscript/dist/index.js +14 -0
- package/dist/lib/node_modules/@tiptap/extension-superscript/dist/index.js +14 -0
- package/dist/lib/node_modules/@tiptap/extension-table/dist/index.js +14 -0
- package/dist/lib/node_modules/@tiptap/extension-task-item/dist/index.js +14 -0
- package/dist/lib/node_modules/@tiptap/extension-task-list/dist/index.js +14 -0
- package/dist/lib/node_modules/@tiptap/extension-text/dist/index.js +14 -0
- package/dist/lib/node_modules/@tiptap/extension-text-align/dist/index.js +14 -0
- package/dist/lib/node_modules/@tiptap/extension-text-style/dist/index.js +14 -0
- package/dist/lib/node_modules/@tiptap/extension-underline/dist/index.js +14 -0
- package/dist/lib/node_modules/@tiptap/extensions/dist/index.js +14 -0
- package/dist/lib/node_modules/@tiptap/starter-kit/dist/index.js +14 -0
- package/dist/lib/node_modules/@tiptap/vue-3/dist/index.js +14 -0
- package/dist/lib/node_modules/@vueuse/core/dist/index.js +14 -1
- package/dist/lib/node_modules/@vueuse/shared/dist/index.js +14 -1
- package/dist/lib/node_modules/codemirror/dist/index.js +14 -1
- package/dist/lib/node_modules/crelt/index.js +14 -1
- package/dist/lib/node_modules/delegate/src/closest.js +14 -0
- package/dist/lib/node_modules/delegate/src/delegate.js +14 -0
- package/dist/lib/node_modules/downloadjs/download.js +14 -0
- package/dist/lib/node_modules/eventemitter3/index.js +14 -0
- package/dist/lib/node_modules/linkifyjs/dist/linkify.js +14 -0
- package/dist/lib/node_modules/lodash-es/_DataView.js +14 -0
- package/dist/lib/node_modules/lodash-es/_Hash.js +14 -1
- package/dist/lib/node_modules/lodash-es/_ListCache.js +14 -1
- package/dist/lib/node_modules/lodash-es/_Map.js +14 -1
- package/dist/lib/node_modules/lodash-es/_MapCache.js +14 -1
- package/dist/lib/node_modules/lodash-es/_Promise.js +14 -0
- package/dist/lib/node_modules/lodash-es/_Set.js +14 -0
- package/dist/lib/node_modules/lodash-es/_Stack.js +14 -0
- package/dist/lib/node_modules/lodash-es/_Symbol.js +14 -1
- package/dist/lib/node_modules/lodash-es/_Uint8Array.js +14 -0
- package/dist/lib/node_modules/lodash-es/_WeakMap.js +14 -0
- package/dist/lib/node_modules/lodash-es/_apply.js +14 -0
- package/dist/lib/node_modules/lodash-es/_arrayEach.js +14 -0
- package/dist/lib/node_modules/lodash-es/_arrayFilter.js +14 -0
- package/dist/lib/node_modules/lodash-es/_arrayLikeKeys.js +14 -0
- package/dist/lib/node_modules/lodash-es/_arrayMap.js +14 -1
- package/dist/lib/node_modules/lodash-es/_arrayPush.js +14 -0
- package/dist/lib/node_modules/lodash-es/_assignValue.js +14 -0
- package/dist/lib/node_modules/lodash-es/_assocIndexOf.js +14 -1
- package/dist/lib/node_modules/lodash-es/_baseAssignValue.js +14 -0
- package/dist/lib/node_modules/lodash-es/_baseClone.js +14 -0
- package/dist/lib/node_modules/lodash-es/_baseFlatten.js +14 -0
- package/dist/lib/node_modules/lodash-es/_baseGet.js +14 -1
- package/dist/lib/node_modules/lodash-es/_baseGetAllKeys.js +14 -0
- package/dist/lib/node_modules/lodash-es/_baseGetTag.js +14 -1
- package/dist/lib/node_modules/lodash-es/_baseIsArguments.js +14 -0
- package/dist/lib/node_modules/lodash-es/_baseIsMap.js +14 -0
- package/dist/lib/node_modules/lodash-es/_baseIsNative.js +14 -1
- package/dist/lib/node_modules/lodash-es/_baseIsRegExp.js +14 -0
- package/dist/lib/node_modules/lodash-es/_baseIsSet.js +14 -0
- package/dist/lib/node_modules/lodash-es/_baseIsTypedArray.js +14 -0
- package/dist/lib/node_modules/lodash-es/_baseKeysIn.js +14 -0
- package/dist/lib/node_modules/lodash-es/_baseSetToString.js +14 -0
- package/dist/lib/node_modules/lodash-es/_baseSlice.js +14 -0
- package/dist/lib/node_modules/lodash-es/_baseTimes.js +14 -0
- package/dist/lib/node_modules/lodash-es/_baseToString.js +14 -1
- package/dist/lib/node_modules/lodash-es/_baseUnary.js +14 -0
- package/dist/lib/node_modules/lodash-es/_baseUnset.js +14 -0
- package/dist/lib/node_modules/lodash-es/_castPath.js +14 -1
- package/dist/lib/node_modules/lodash-es/_cloneArrayBuffer.js +14 -0
- package/dist/lib/node_modules/lodash-es/_cloneBuffer.js +14 -0
- package/dist/lib/node_modules/lodash-es/_cloneDataView.js +14 -0
- package/dist/lib/node_modules/lodash-es/_cloneRegExp.js +14 -0
- package/dist/lib/node_modules/lodash-es/_cloneSymbol.js +14 -0
- package/dist/lib/node_modules/lodash-es/_cloneTypedArray.js +14 -0
- package/dist/lib/node_modules/lodash-es/_copyObject.js +14 -0
- package/dist/lib/node_modules/lodash-es/_coreJsData.js +14 -1
- package/dist/lib/node_modules/lodash-es/_customOmitClone.js +14 -0
- package/dist/lib/node_modules/lodash-es/_defineProperty.js +14 -0
- package/dist/lib/node_modules/lodash-es/_flatRest.js +14 -0
- package/dist/lib/node_modules/lodash-es/_freeGlobal.js +14 -1
- package/dist/lib/node_modules/lodash-es/_getAllKeysIn.js +14 -0
- package/dist/lib/node_modules/lodash-es/_getMapData.js +14 -1
- package/dist/lib/node_modules/lodash-es/_getNative.js +14 -1
- package/dist/lib/node_modules/lodash-es/_getPrototype.js +14 -0
- package/dist/lib/node_modules/lodash-es/_getRawTag.js +14 -1
- package/dist/lib/node_modules/lodash-es/_getSymbols.js +14 -0
- package/dist/lib/node_modules/lodash-es/_getSymbolsIn.js +14 -0
- package/dist/lib/node_modules/lodash-es/_getTag.js +14 -0
- package/dist/lib/node_modules/lodash-es/_getValue.js +14 -1
- package/dist/lib/node_modules/lodash-es/_hashClear.js +14 -1
- package/dist/lib/node_modules/lodash-es/_hashDelete.js +14 -1
- package/dist/lib/node_modules/lodash-es/_hashGet.js +14 -1
- package/dist/lib/node_modules/lodash-es/_hashHas.js +14 -1
- package/dist/lib/node_modules/lodash-es/_hashSet.js +14 -1
- package/dist/lib/node_modules/lodash-es/_initCloneArray.js +14 -0
- package/dist/lib/node_modules/lodash-es/_initCloneByTag.js +14 -0
- package/dist/lib/node_modules/lodash-es/_isFlattenable.js +14 -0
- package/dist/lib/node_modules/lodash-es/_isIndex.js +14 -0
- package/dist/lib/node_modules/lodash-es/_isKey.js +14 -1
- package/dist/lib/node_modules/lodash-es/_isKeyable.js +14 -1
- package/dist/lib/node_modules/lodash-es/_isMasked.js +14 -1
- package/dist/lib/node_modules/lodash-es/_isPrototype.js +14 -0
- package/dist/lib/node_modules/lodash-es/_listCacheClear.js +14 -1
- package/dist/lib/node_modules/lodash-es/_listCacheDelete.js +14 -1
- package/dist/lib/node_modules/lodash-es/_listCacheGet.js +14 -1
- package/dist/lib/node_modules/lodash-es/_listCacheHas.js +14 -1
- package/dist/lib/node_modules/lodash-es/_listCacheSet.js +14 -1
- package/dist/lib/node_modules/lodash-es/_mapCacheClear.js +14 -1
- package/dist/lib/node_modules/lodash-es/_mapCacheDelete.js +14 -1
- package/dist/lib/node_modules/lodash-es/_mapCacheGet.js +14 -1
- package/dist/lib/node_modules/lodash-es/_mapCacheHas.js +14 -1
- package/dist/lib/node_modules/lodash-es/_mapCacheSet.js +14 -1
- package/dist/lib/node_modules/lodash-es/_memoizeCapped.js +14 -1
- package/dist/lib/node_modules/lodash-es/_nativeCreate.js +14 -1
- package/dist/lib/node_modules/lodash-es/_nativeKeysIn.js +14 -0
- package/dist/lib/node_modules/lodash-es/_nodeUtil.js +14 -0
- package/dist/lib/node_modules/lodash-es/_objectToString.js +14 -1
- package/dist/lib/node_modules/lodash-es/_overArg.js +14 -0
- package/dist/lib/node_modules/lodash-es/_overRest.js +14 -0
- package/dist/lib/node_modules/lodash-es/_parent.js +14 -0
- package/dist/lib/node_modules/lodash-es/_root.js +14 -1
- package/dist/lib/node_modules/lodash-es/_setToString.js +14 -0
- package/dist/lib/node_modules/lodash-es/_shortOut.js +14 -0
- package/dist/lib/node_modules/lodash-es/_stackClear.js +14 -0
- package/dist/lib/node_modules/lodash-es/_stackDelete.js +14 -0
- package/dist/lib/node_modules/lodash-es/_stackGet.js +14 -0
- package/dist/lib/node_modules/lodash-es/_stackHas.js +14 -0
- package/dist/lib/node_modules/lodash-es/_stackSet.js +14 -0
- package/dist/lib/node_modules/lodash-es/_stringToPath.js +14 -1
- package/dist/lib/node_modules/lodash-es/_toKey.js +14 -1
- package/dist/lib/node_modules/lodash-es/_toSource.js +14 -1
- package/dist/lib/node_modules/lodash-es/constant.js +14 -0
- package/dist/lib/node_modules/lodash-es/eq.js +14 -1
- package/dist/lib/node_modules/lodash-es/flatten.js +14 -0
- package/dist/lib/node_modules/lodash-es/get.js +14 -1
- package/dist/lib/node_modules/lodash-es/identity.js +14 -0
- package/dist/lib/node_modules/lodash-es/isArguments.js +14 -0
- package/dist/lib/node_modules/lodash-es/isArray.js +14 -1
- package/dist/lib/node_modules/lodash-es/isArrayLike.js +14 -0
- package/dist/lib/node_modules/lodash-es/isBuffer.js +14 -0
- package/dist/lib/node_modules/lodash-es/isFinite.js +14 -0
- package/dist/lib/node_modules/lodash-es/isFunction.js +14 -1
- package/dist/lib/node_modules/lodash-es/isLength.js +14 -0
- package/dist/lib/node_modules/lodash-es/isMap.js +14 -0
- package/dist/lib/node_modules/lodash-es/isNaN.js +14 -0
- package/dist/lib/node_modules/lodash-es/isNil.js +14 -1
- package/dist/lib/node_modules/lodash-es/isNumber.js +14 -0
- package/dist/lib/node_modules/lodash-es/isObject.js +14 -1
- package/dist/lib/node_modules/lodash-es/isObjectLike.js +14 -1
- package/dist/lib/node_modules/lodash-es/isPlainObject.js +14 -0
- package/dist/lib/node_modules/lodash-es/isRegExp.js +14 -0
- package/dist/lib/node_modules/lodash-es/isSet.js +14 -0
- package/dist/lib/node_modules/lodash-es/isString.js +14 -1
- package/dist/lib/node_modules/lodash-es/isSymbol.js +14 -1
- package/dist/lib/node_modules/lodash-es/isTypedArray.js +14 -0
- package/dist/lib/node_modules/lodash-es/keysIn.js +14 -0
- package/dist/lib/node_modules/lodash-es/last.js +14 -0
- package/dist/lib/node_modules/lodash-es/memoize.js +14 -1
- package/dist/lib/node_modules/lodash-es/omit.js +14 -0
- package/dist/lib/node_modules/lodash-es/stubArray.js +14 -0
- package/dist/lib/node_modules/lodash-es/stubFalse.js +14 -0
- package/dist/lib/node_modules/lodash-es/toString.js +14 -1
- package/dist/lib/node_modules/orderedmap/dist/index.js +14 -0
- package/dist/lib/node_modules/prosemirror-commands/dist/index.js +14 -0
- package/dist/lib/node_modules/prosemirror-dropcursor/dist/index.js +14 -0
- package/dist/lib/node_modules/prosemirror-gapcursor/dist/index.js +14 -0
- package/dist/lib/node_modules/prosemirror-history/dist/index.js +14 -0
- package/dist/lib/node_modules/prosemirror-keymap/dist/index.js +14 -0
- package/dist/lib/node_modules/prosemirror-model/dist/index.js +14 -0
- package/dist/lib/node_modules/prosemirror-schema-list/dist/index.js +14 -0
- package/dist/lib/node_modules/prosemirror-state/dist/index.js +14 -0
- package/dist/lib/node_modules/prosemirror-tables/dist/index.js +14 -0
- package/dist/lib/node_modules/prosemirror-transform/dist/index.js +14 -0
- package/dist/lib/node_modules/prosemirror-view/dist/index.js +14 -0
- package/dist/lib/node_modules/rope-sequence/dist/index.js +14 -0
- package/dist/lib/node_modules/style-mod/src/style-mod.js +14 -3
- package/dist/lib/node_modules/vue-codemirror/dist/vue-codemirror.esm.js +14 -1
- package/dist/lib/node_modules/w3c-keyname/index.js +14 -1
- package/dist/lib/node_modules/xgplayer/dist/index.min.css +14 -0
- package/dist/lib/node_modules/xgplayer/es/_virtual/_rollupPluginBabelHelpers.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/constant.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/defaultConfig.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/error.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/events.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/index.umd.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/instManager.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/lang/en.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/lang/i18n.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/lang/jp.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/lang/zh-cn.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/mediaProxy.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/player.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugin/basePlugin.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugin/hooksDescriptor.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugin/plugin.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugin/pluginsManager.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugin/preset.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugin/resizeObserver.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/assets/back.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/assets/download.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/assets/exitCssFull.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/assets/exitFull.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/assets/loading.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/assets/pause.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/assets/pipIcon.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/assets/pipIconExit.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/assets/play.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/assets/playNext.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/assets/replay.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/assets/requestCssFull.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/assets/requestFull.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/assets/rotate.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/assets/seekicon.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/assets/volumeLarge.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/assets/volumeMuted.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/assets/volumeSmall.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/common/iconPlugin.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/common/iconTools.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/common/optionList.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/common/optionsIcon.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/common/thumbnail.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/controls/index.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/cssFullScreen/index.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/definition/index.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/download/index.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/dynamicBg/index.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/enter/index.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/error/index.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/fpsDetect/index.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/fullscreen/backicon.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/fullscreen/index.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/gapJump/index.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/keyboard/index.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/loading/index.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/logger/index.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/miniScreen/index.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/miniScreen/miniScreenIcon.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/mobile/index.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/mobile/touch.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/pc/index.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/pip/index.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/play/index.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/playNext/index.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/playbackRate/index.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/poster/index.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/progress/index.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/progress/innerList.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/progress/miniProgress.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/progressPreview/dotsApi.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/progressPreview/index.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/prompt/index.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/replay/index.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/rotate/index.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/screenShot/index.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/start/index.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/stats/index.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/testspeed/index.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/time/index.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/time/timesegments.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/volume/index.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/plugins/waitingTimeoutJump/index.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/presets/default.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/state.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/stateClassMap.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/utils/database.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/utils/debug.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/utils/draggabilly.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/utils/sniffer.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/utils/util.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/utils/xgplayerTimeRange.js +14 -0
- package/dist/lib/node_modules/xgplayer/es/version.js +14 -0
- package/dist/lib/packages/components/index.js +14 -0
- package/dist/lib/{src/styles → styles}/tokens.css +13 -0
- package/package.json +32 -16
- package/dist/es/src/Button/index.js +0 -6
- package/dist/es/src/Button/src/Button.css +0 -1
- package/dist/es/src/Button/src/Button.vue.js +0 -41
- package/dist/es/src/CodeEditor/index.js +0 -6
- package/dist/es/src/CodeEditor/src/index.css +0 -1
- package/dist/es/src/CodeEditor/src/index.vue.js +0 -131
- package/dist/es/src/ConfigProvider/index.js +0 -6
- package/dist/es/src/ConfigProvider/src/configProvider.js +0 -14
- package/dist/es/src/ConfigProvider/src/configProviderProps.js +0 -22
- package/dist/es/src/ConfigProvider/src/constants.js +0 -9
- package/dist/es/src/ConfigProvider/src/useGlobalConfig.js +0 -45
- package/dist/es/src/Form/index.js +0 -6
- package/dist/es/src/Form/src/Form.vue.js +0 -208
- package/dist/es/src/Grid/index.js +0 -6
- package/dist/es/src/Grid/src/Grid.vue.js +0 -180
- package/dist/es/src/Grid/src/components/ActionBar.vue.js +0 -65
- package/dist/es/src/Grid/src/components/CellEditor.css +0 -1
- package/dist/es/src/Grid/src/components/CellEditor.vue.js +0 -132
- package/dist/es/src/Grid/src/components/ColumnFilter.vue.js +0 -72
- package/dist/es/src/Grid/src/components/ColumnSettings.vue.js +0 -109
- package/dist/es/src/Grid/src/components/DataTable.vue.js +0 -556
- package/dist/es/src/Grid/src/components/Pager.vue.js +0 -64
- package/dist/es/src/Grid/src/components/QueryBar.vue.js +0 -156
- package/dist/es/src/Grid/src/composables/useCellEditor.js +0 -20
- package/dist/es/src/Grid/src/composables/useGridTable.js +0 -213
- package/dist/es/src/Overlay/index.js +0 -61
- package/dist/es/src/Overlay/src/Message.css +0 -1
- package/dist/es/src/Overlay/src/Message.vue.js +0 -36
- package/dist/es/src/Overlay/src/Modal.css +0 -1
- package/dist/es/src/Overlay/src/Modal.vue.js +0 -67
- package/dist/es/src/Overlay/src/Notice.css +0 -1
- package/dist/es/src/Overlay/src/Notice.vue.js +0 -37
- package/dist/es/src/ScaleScreen/index.js +0 -6
- package/dist/es/src/ScaleScreen/src/index.css +0 -1
- package/dist/es/src/ScaleScreen/src/index.vue.js +0 -115
- package/dist/es/src/VideoBackground/index.js +0 -6
- package/dist/es/src/VideoBackground/src/helper.js +0 -29
- package/dist/es/src/VideoBackground/src/index.css +0 -1
- package/dist/es/src/VideoBackground/src/index.vue.js +0 -108
- package/dist/es/src/VideoBackground/src/index2.css +0 -1
- package/dist/es/src/VideoBackground/src/videoBackground.js +0 -31
- package/dist/es/src/hooks/useLocale.js +0 -24
- package/dist/es/src/hooks/useNamespace.js +0 -8
- package/dist/es/src/index.js +0 -44
- package/dist/es/src/locale/lang/en-US.js +0 -72
- package/dist/es/src/locale/lang/ja-JP.js +0 -72
- package/dist/es/src/locale/lang/zh-CN.js +0 -72
- package/dist/lib/src/Button/index.js +0 -1
- package/dist/lib/src/Button/src/Button.css +0 -1
- package/dist/lib/src/Button/src/Button.vue.js +0 -1
- package/dist/lib/src/CodeEditor/index.js +0 -1
- package/dist/lib/src/CodeEditor/src/index.css +0 -1
- package/dist/lib/src/CodeEditor/src/index.vue.js +0 -1
- package/dist/lib/src/ConfigProvider/index.js +0 -1
- package/dist/lib/src/ConfigProvider/src/configProvider.js +0 -1
- package/dist/lib/src/ConfigProvider/src/configProviderProps.js +0 -1
- package/dist/lib/src/ConfigProvider/src/constants.js +0 -1
- package/dist/lib/src/ConfigProvider/src/useGlobalConfig.js +0 -1
- package/dist/lib/src/Form/index.js +0 -1
- package/dist/lib/src/Form/src/Form.vue.js +0 -1
- package/dist/lib/src/Grid/index.js +0 -1
- package/dist/lib/src/Grid/src/Grid.vue.js +0 -1
- package/dist/lib/src/Grid/src/components/ActionBar.vue.js +0 -1
- package/dist/lib/src/Grid/src/components/CellEditor.css +0 -1
- package/dist/lib/src/Grid/src/components/CellEditor.vue.js +0 -1
- package/dist/lib/src/Grid/src/components/ColumnFilter.vue.js +0 -1
- package/dist/lib/src/Grid/src/components/ColumnSettings.vue.js +0 -1
- package/dist/lib/src/Grid/src/components/DataTable.vue.js +0 -1
- package/dist/lib/src/Grid/src/components/Pager.vue.js +0 -1
- package/dist/lib/src/Grid/src/components/QueryBar.vue.js +0 -1
- package/dist/lib/src/Grid/src/composables/useCellEditor.js +0 -1
- package/dist/lib/src/Grid/src/composables/useGridTable.js +0 -1
- package/dist/lib/src/Overlay/index.js +0 -1
- package/dist/lib/src/Overlay/src/Message.css +0 -1
- package/dist/lib/src/Overlay/src/Message.vue.js +0 -1
- package/dist/lib/src/Overlay/src/Modal.css +0 -1
- package/dist/lib/src/Overlay/src/Modal.vue.js +0 -1
- package/dist/lib/src/Overlay/src/Notice.css +0 -1
- package/dist/lib/src/Overlay/src/Notice.vue.js +0 -1
- package/dist/lib/src/ScaleScreen/index.js +0 -1
- package/dist/lib/src/ScaleScreen/src/index.css +0 -1
- package/dist/lib/src/ScaleScreen/src/index.vue.js +0 -1
- package/dist/lib/src/VideoBackground/index.js +0 -1
- package/dist/lib/src/VideoBackground/src/helper.js +0 -1
- package/dist/lib/src/VideoBackground/src/index.css +0 -1
- package/dist/lib/src/VideoBackground/src/index.vue.js +0 -1
- package/dist/lib/src/VideoBackground/src/index2.css +0 -1
- package/dist/lib/src/VideoBackground/src/videoBackground.js +0 -1
- package/dist/lib/src/hooks/useLocale.js +0 -1
- package/dist/lib/src/hooks/useNamespace.js +0 -1
- package/dist/lib/src/index.js +0 -1
- package/dist/lib/src/locale/lang/en-US.js +0 -1
- package/dist/lib/src/locale/lang/ja-JP.js +0 -1
- package/dist/lib/src/locale/lang/zh-CN.js +0 -1
|
@@ -1,2643 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
line(e) {
|
|
15
|
-
if (e < 1 || e > this.lines)
|
|
16
|
-
throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);
|
|
17
|
-
return this.lineInner(e, !0, 1, 0);
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
Replace a range of the text with the given content.
|
|
21
|
-
*/
|
|
22
|
-
replace(e, t, n) {
|
|
23
|
-
[e, t] = J(this, e, t);
|
|
24
|
-
let i = [];
|
|
25
|
-
return this.decompose(
|
|
26
|
-
0,
|
|
27
|
-
e,
|
|
28
|
-
i,
|
|
29
|
-
2
|
|
30
|
-
/* Open.To */
|
|
31
|
-
), n.length && n.decompose(
|
|
32
|
-
0,
|
|
33
|
-
n.length,
|
|
34
|
-
i,
|
|
35
|
-
3
|
|
36
|
-
/* Open.To */
|
|
37
|
-
), this.decompose(
|
|
38
|
-
t,
|
|
39
|
-
this.length,
|
|
40
|
-
i,
|
|
41
|
-
1
|
|
42
|
-
/* Open.From */
|
|
43
|
-
), O.from(i, this.length - (t - e) + n.length);
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
Append another document to this one.
|
|
47
|
-
*/
|
|
48
|
-
append(e) {
|
|
49
|
-
return this.replace(this.length, this.length, e);
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
Retrieve the text between the given points.
|
|
53
|
-
*/
|
|
54
|
-
slice(e, t = this.length) {
|
|
55
|
-
[e, t] = J(this, e, t);
|
|
56
|
-
let n = [];
|
|
57
|
-
return this.decompose(e, t, n, 0), O.from(n, t - e);
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
Test whether this text is equal to another instance.
|
|
61
|
-
*/
|
|
62
|
-
eq(e) {
|
|
63
|
-
if (e == this)
|
|
64
|
-
return !0;
|
|
65
|
-
if (e.length != this.length || e.lines != this.lines)
|
|
66
|
-
return !1;
|
|
67
|
-
let t = this.scanIdentical(e, 1), n = this.length - this.scanIdentical(e, -1), i = new D(this), s = new D(e);
|
|
68
|
-
for (let r = t, h = t; ; ) {
|
|
69
|
-
if (i.next(r), s.next(r), r = 0, i.lineBreak != s.lineBreak || i.done != s.done || i.value != s.value)
|
|
70
|
-
return !1;
|
|
71
|
-
if (h += i.value.length, i.done || h >= n)
|
|
72
|
-
return !0;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
Iterate over the text. When `dir` is `-1`, iteration happens
|
|
77
|
-
from end to start. This will return lines and the breaks between
|
|
78
|
-
them as separate strings.
|
|
79
|
-
*/
|
|
80
|
-
iter(e = 1) {
|
|
81
|
-
return new D(this, e);
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
Iterate over a range of the text. When `from` > `to`, the
|
|
85
|
-
iterator will run in reverse.
|
|
86
|
-
*/
|
|
87
|
-
iterRange(e, t = this.length) {
|
|
88
|
-
return new Ie(this, e, t);
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
Return a cursor that iterates over the given range of lines,
|
|
92
|
-
_without_ returning the line breaks between, and yielding empty
|
|
93
|
-
strings for empty lines.
|
|
94
|
-
|
|
95
|
-
When `from` and `to` are given, they should be 1-based line numbers.
|
|
96
|
-
*/
|
|
97
|
-
iterLines(e, t) {
|
|
98
|
-
let n;
|
|
99
|
-
if (e == null)
|
|
100
|
-
n = this.iter();
|
|
101
|
-
else {
|
|
102
|
-
t == null && (t = this.lines + 1);
|
|
103
|
-
let i = this.line(e).from;
|
|
104
|
-
n = this.iterRange(i, Math.max(i, t == this.lines + 1 ? this.length : t <= 1 ? 0 : this.line(t - 1).to));
|
|
105
|
-
}
|
|
106
|
-
return new Pe(n);
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
Return the document as a string, using newline characters to
|
|
110
|
-
separate lines.
|
|
111
|
-
*/
|
|
112
|
-
toString() {
|
|
113
|
-
return this.sliceString(0);
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
Convert the document to an array of lines (which can be
|
|
117
|
-
deserialized again via [`Text.of`](https://codemirror.net/6/docs/ref/#state.Text^of)).
|
|
118
|
-
*/
|
|
119
|
-
toJSON() {
|
|
120
|
-
let e = [];
|
|
121
|
-
return this.flatten(e), e;
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
@internal
|
|
125
|
-
*/
|
|
126
|
-
constructor() {
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
Create a `Text` instance for the given array of lines.
|
|
130
|
-
*/
|
|
131
|
-
static of(e) {
|
|
132
|
-
if (e.length == 0)
|
|
133
|
-
throw new RangeError("A document must have at least one line");
|
|
134
|
-
return e.length == 1 && !e[0] ? x.empty : e.length <= 32 ? new m(e) : O.from(m.split(e, []));
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
class m extends x {
|
|
138
|
-
constructor(e, t = Ne(e)) {
|
|
139
|
-
super(), this.text = e, this.length = t;
|
|
140
|
-
}
|
|
141
|
-
get lines() {
|
|
142
|
-
return this.text.length;
|
|
143
|
-
}
|
|
144
|
-
get children() {
|
|
145
|
-
return null;
|
|
146
|
-
}
|
|
147
|
-
lineInner(e, t, n, i) {
|
|
148
|
-
for (let s = 0; ; s++) {
|
|
149
|
-
let r = this.text[s], h = i + r.length;
|
|
150
|
-
if ((t ? n : h) >= e)
|
|
151
|
-
return new De(i, h, n, r);
|
|
152
|
-
i = h + 1, n++;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
decompose(e, t, n, i) {
|
|
156
|
-
let s = e <= 0 && t >= this.length ? this : new m(ve(this.text, e, t), Math.min(t, this.length) - Math.max(0, e));
|
|
157
|
-
if (i & 1) {
|
|
158
|
-
let r = n.pop(), h = Q(s.text, r.text.slice(), 0, s.length);
|
|
159
|
-
if (h.length <= 32)
|
|
160
|
-
n.push(new m(h, r.length + s.length));
|
|
161
|
-
else {
|
|
162
|
-
let o = h.length >> 1;
|
|
163
|
-
n.push(new m(h.slice(0, o)), new m(h.slice(o)));
|
|
164
|
-
}
|
|
165
|
-
} else
|
|
166
|
-
n.push(s);
|
|
167
|
-
}
|
|
168
|
-
replace(e, t, n) {
|
|
169
|
-
if (!(n instanceof m))
|
|
170
|
-
return super.replace(e, t, n);
|
|
171
|
-
[e, t] = J(this, e, t);
|
|
172
|
-
let i = Q(this.text, Q(n.text, ve(this.text, 0, e)), t), s = this.length + n.length - (t - e);
|
|
173
|
-
return i.length <= 32 ? new m(i, s) : O.from(m.split(i, []), s);
|
|
174
|
-
}
|
|
175
|
-
sliceString(e, t = this.length, n = `
|
|
176
|
-
`) {
|
|
177
|
-
[e, t] = J(this, e, t);
|
|
178
|
-
let i = "";
|
|
179
|
-
for (let s = 0, r = 0; s <= t && r < this.text.length; r++) {
|
|
180
|
-
let h = this.text[r], o = s + h.length;
|
|
181
|
-
s > e && r && (i += n), e < o && t > s && (i += h.slice(Math.max(0, e - s), t - s)), s = o + 1;
|
|
182
|
-
}
|
|
183
|
-
return i;
|
|
184
|
-
}
|
|
185
|
-
flatten(e) {
|
|
186
|
-
for (let t of this.text)
|
|
187
|
-
e.push(t);
|
|
188
|
-
}
|
|
189
|
-
scanIdentical() {
|
|
190
|
-
return 0;
|
|
191
|
-
}
|
|
192
|
-
static split(e, t) {
|
|
193
|
-
let n = [], i = -1;
|
|
194
|
-
for (let s of e)
|
|
195
|
-
n.push(s), i += s.length + 1, n.length == 32 && (t.push(new m(n, i)), n = [], i = -1);
|
|
196
|
-
return i > -1 && t.push(new m(n, i)), t;
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
class O extends x {
|
|
200
|
-
constructor(e, t) {
|
|
201
|
-
super(), this.children = e, this.length = t, this.lines = 0;
|
|
202
|
-
for (let n of e)
|
|
203
|
-
this.lines += n.lines;
|
|
204
|
-
}
|
|
205
|
-
lineInner(e, t, n, i) {
|
|
206
|
-
for (let s = 0; ; s++) {
|
|
207
|
-
let r = this.children[s], h = i + r.length, o = n + r.lines - 1;
|
|
208
|
-
if ((t ? o : h) >= e)
|
|
209
|
-
return r.lineInner(e, t, n, i);
|
|
210
|
-
i = h + 1, n = o + 1;
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
decompose(e, t, n, i) {
|
|
214
|
-
for (let s = 0, r = 0; r <= t && s < this.children.length; s++) {
|
|
215
|
-
let h = this.children[s], o = r + h.length;
|
|
216
|
-
if (e <= o && t >= r) {
|
|
217
|
-
let a = i & ((r <= e ? 1 : 0) | (o >= t ? 2 : 0));
|
|
218
|
-
r >= e && o <= t && !a ? n.push(h) : h.decompose(e - r, t - r, n, a);
|
|
219
|
-
}
|
|
220
|
-
r = o + 1;
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
replace(e, t, n) {
|
|
224
|
-
if ([e, t] = J(this, e, t), n.lines < this.lines)
|
|
225
|
-
for (let i = 0, s = 0; i < this.children.length; i++) {
|
|
226
|
-
let r = this.children[i], h = s + r.length;
|
|
227
|
-
if (e >= s && t <= h) {
|
|
228
|
-
let o = r.replace(e - s, t - s, n), a = this.lines - r.lines + o.lines;
|
|
229
|
-
if (o.lines < a >> 4 && o.lines > a >> 6) {
|
|
230
|
-
let u = this.children.slice();
|
|
231
|
-
return u[i] = o, new O(u, this.length - (t - e) + n.length);
|
|
232
|
-
}
|
|
233
|
-
return super.replace(s, h, o);
|
|
234
|
-
}
|
|
235
|
-
s = h + 1;
|
|
236
|
-
}
|
|
237
|
-
return super.replace(e, t, n);
|
|
238
|
-
}
|
|
239
|
-
sliceString(e, t = this.length, n = `
|
|
240
|
-
`) {
|
|
241
|
-
[e, t] = J(this, e, t);
|
|
242
|
-
let i = "";
|
|
243
|
-
for (let s = 0, r = 0; s < this.children.length && r <= t; s++) {
|
|
244
|
-
let h = this.children[s], o = r + h.length;
|
|
245
|
-
r > e && s && (i += n), e < o && t > r && (i += h.sliceString(e - r, t - r, n)), r = o + 1;
|
|
246
|
-
}
|
|
247
|
-
return i;
|
|
248
|
-
}
|
|
249
|
-
flatten(e) {
|
|
250
|
-
for (let t of this.children)
|
|
251
|
-
t.flatten(e);
|
|
252
|
-
}
|
|
253
|
-
scanIdentical(e, t) {
|
|
254
|
-
if (!(e instanceof O))
|
|
255
|
-
return 0;
|
|
256
|
-
let n = 0, [i, s, r, h] = t > 0 ? [0, 0, this.children.length, e.children.length] : [this.children.length - 1, e.children.length - 1, -1, -1];
|
|
257
|
-
for (; ; i += t, s += t) {
|
|
258
|
-
if (i == r || s == h)
|
|
259
|
-
return n;
|
|
260
|
-
let o = this.children[i], a = e.children[s];
|
|
261
|
-
if (o != a)
|
|
262
|
-
return n + o.scanIdentical(a, t);
|
|
263
|
-
n += o.length + 1;
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
static from(e, t = e.reduce((n, i) => n + i.length + 1, -1)) {
|
|
267
|
-
let n = 0;
|
|
268
|
-
for (let c of e)
|
|
269
|
-
n += c.lines;
|
|
270
|
-
if (n < 32) {
|
|
271
|
-
let c = [];
|
|
272
|
-
for (let g of e)
|
|
273
|
-
g.flatten(c);
|
|
274
|
-
return new m(c, t);
|
|
275
|
-
}
|
|
276
|
-
let i = Math.max(
|
|
277
|
-
32,
|
|
278
|
-
n >> 5
|
|
279
|
-
/* Tree.BranchShift */
|
|
280
|
-
), s = i << 1, r = i >> 1, h = [], o = 0, a = -1, u = [];
|
|
281
|
-
function f(c) {
|
|
282
|
-
let g;
|
|
283
|
-
if (c.lines > s && c instanceof O)
|
|
284
|
-
for (let E of c.children)
|
|
285
|
-
f(E);
|
|
286
|
-
else c.lines > r && (o > r || !o) ? (d(), h.push(c)) : c instanceof m && o && (g = u[u.length - 1]) instanceof m && c.lines + g.lines <= 32 ? (o += c.lines, a += c.length + 1, u[u.length - 1] = new m(g.text.concat(c.text), g.length + 1 + c.length)) : (o + c.lines > i && d(), o += c.lines, a += c.length + 1, u.push(c));
|
|
287
|
-
}
|
|
288
|
-
function d() {
|
|
289
|
-
o != 0 && (h.push(u.length == 1 ? u[0] : O.from(u, a)), a = -1, o = u.length = 0);
|
|
290
|
-
}
|
|
291
|
-
for (let c of e)
|
|
292
|
-
f(c);
|
|
293
|
-
return d(), h.length == 1 ? h[0] : new O(h, t);
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
x.empty = /* @__PURE__ */ new m([""], 0);
|
|
297
|
-
function Ne(l) {
|
|
298
|
-
let e = -1;
|
|
299
|
-
for (let t of l)
|
|
300
|
-
e += t.length + 1;
|
|
301
|
-
return e;
|
|
302
|
-
}
|
|
303
|
-
function Q(l, e, t = 0, n = 1e9) {
|
|
304
|
-
for (let i = 0, s = 0, r = !0; s < l.length && i <= n; s++) {
|
|
305
|
-
let h = l[s], o = i + h.length;
|
|
306
|
-
o >= t && (o > n && (h = h.slice(0, n - i)), i < t && (h = h.slice(t - i)), r ? (e[e.length - 1] += h, r = !1) : e.push(h)), i = o + 1;
|
|
307
|
-
}
|
|
308
|
-
return e;
|
|
309
|
-
}
|
|
310
|
-
function ve(l, e, t) {
|
|
311
|
-
return Q(l, [""], e, t);
|
|
312
|
-
}
|
|
313
|
-
class D {
|
|
314
|
-
constructor(e, t = 1) {
|
|
315
|
-
this.dir = t, this.done = !1, this.lineBreak = !1, this.value = "", this.nodes = [e], this.offsets = [t > 0 ? 1 : (e instanceof m ? e.text.length : e.children.length) << 1];
|
|
316
|
-
}
|
|
317
|
-
nextInner(e, t) {
|
|
318
|
-
for (this.done = this.lineBreak = !1; ; ) {
|
|
319
|
-
let n = this.nodes.length - 1, i = this.nodes[n], s = this.offsets[n], r = s >> 1, h = i instanceof m ? i.text.length : i.children.length;
|
|
320
|
-
if (r == (t > 0 ? h : 0)) {
|
|
321
|
-
if (n == 0)
|
|
322
|
-
return this.done = !0, this.value = "", this;
|
|
323
|
-
t > 0 && this.offsets[n - 1]++, this.nodes.pop(), this.offsets.pop();
|
|
324
|
-
} else if ((s & 1) == (t > 0 ? 0 : 1)) {
|
|
325
|
-
if (this.offsets[n] += t, e == 0)
|
|
326
|
-
return this.lineBreak = !0, this.value = `
|
|
327
|
-
`, this;
|
|
328
|
-
e--;
|
|
329
|
-
} else if (i instanceof m) {
|
|
330
|
-
let o = i.text[r + (t < 0 ? -1 : 0)];
|
|
331
|
-
if (this.offsets[n] += t, o.length > Math.max(0, e))
|
|
332
|
-
return this.value = e == 0 ? o : t > 0 ? o.slice(e) : o.slice(0, o.length - e), this;
|
|
333
|
-
e -= o.length;
|
|
334
|
-
} else {
|
|
335
|
-
let o = i.children[r + (t < 0 ? -1 : 0)];
|
|
336
|
-
e > o.length ? (e -= o.length, this.offsets[n] += t) : (t < 0 && this.offsets[n]--, this.nodes.push(o), this.offsets.push(t > 0 ? 1 : (o instanceof m ? o.text.length : o.children.length) << 1));
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
next(e = 0) {
|
|
341
|
-
return e < 0 && (this.nextInner(-e, -this.dir), e = this.value.length), this.nextInner(e, this.dir);
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
class Ie {
|
|
345
|
-
constructor(e, t, n) {
|
|
346
|
-
this.value = "", this.done = !1, this.cursor = new D(e, t > n ? -1 : 1), this.pos = t > n ? e.length : 0, this.from = Math.min(t, n), this.to = Math.max(t, n);
|
|
347
|
-
}
|
|
348
|
-
nextInner(e, t) {
|
|
349
|
-
if (t < 0 ? this.pos <= this.from : this.pos >= this.to)
|
|
350
|
-
return this.value = "", this.done = !0, this;
|
|
351
|
-
e += Math.max(0, t < 0 ? this.pos - this.to : this.from - this.pos);
|
|
352
|
-
let n = t < 0 ? this.pos - this.from : this.to - this.pos;
|
|
353
|
-
e > n && (e = n), n -= e;
|
|
354
|
-
let { value: i } = this.cursor.next(e);
|
|
355
|
-
return this.pos += (i.length + e) * t, this.value = i.length <= n ? i : t < 0 ? i.slice(i.length - n) : i.slice(0, n), this.done = !this.value, this;
|
|
356
|
-
}
|
|
357
|
-
next(e = 0) {
|
|
358
|
-
return e < 0 ? e = Math.max(e, this.from - this.pos) : e > 0 && (e = Math.min(e, this.to - this.pos)), this.nextInner(e, this.cursor.dir);
|
|
359
|
-
}
|
|
360
|
-
get lineBreak() {
|
|
361
|
-
return this.cursor.lineBreak && this.value != "";
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
class Pe {
|
|
365
|
-
constructor(e) {
|
|
366
|
-
this.inner = e, this.afterBreak = !0, this.value = "", this.done = !1;
|
|
367
|
-
}
|
|
368
|
-
next(e = 0) {
|
|
369
|
-
let { done: t, lineBreak: n, value: i } = this.inner.next(e);
|
|
370
|
-
return t && this.afterBreak ? (this.value = "", this.afterBreak = !1) : t ? (this.done = !0, this.value = "") : n ? this.afterBreak ? this.value = "" : (this.afterBreak = !0, this.next()) : (this.value = i, this.afterBreak = !1), this;
|
|
371
|
-
}
|
|
372
|
-
get lineBreak() {
|
|
373
|
-
return !1;
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
typeof Symbol < "u" && (x.prototype[Symbol.iterator] = function() {
|
|
377
|
-
return this.iter();
|
|
378
|
-
}, D.prototype[Symbol.iterator] = Ie.prototype[Symbol.iterator] = Pe.prototype[Symbol.iterator] = function() {
|
|
379
|
-
return this;
|
|
380
|
-
});
|
|
381
|
-
class De {
|
|
382
|
-
/**
|
|
383
|
-
@internal
|
|
384
|
-
*/
|
|
385
|
-
constructor(e, t, n, i) {
|
|
386
|
-
this.from = e, this.to = t, this.number = n, this.text = i;
|
|
387
|
-
}
|
|
388
|
-
/**
|
|
389
|
-
The length of the line (not including any line break after it).
|
|
390
|
-
*/
|
|
391
|
-
get length() {
|
|
392
|
-
return this.to - this.from;
|
|
393
|
-
}
|
|
394
|
-
}
|
|
395
|
-
function J(l, e, t) {
|
|
396
|
-
return e = Math.max(0, Math.min(l.length, e)), [e, Math.max(e, Math.min(l.length, t))];
|
|
397
|
-
}
|
|
398
|
-
function Y(l, e, t = !0, n = !0) {
|
|
399
|
-
return Ve(l, e, t, n);
|
|
400
|
-
}
|
|
401
|
-
function $e(l) {
|
|
402
|
-
return l >= 56320 && l < 57344;
|
|
403
|
-
}
|
|
404
|
-
function ze(l) {
|
|
405
|
-
return l >= 55296 && l < 56320;
|
|
406
|
-
}
|
|
407
|
-
function tt(l, e) {
|
|
408
|
-
let t = l.charCodeAt(e);
|
|
409
|
-
if (!ze(t) || e + 1 == l.length)
|
|
410
|
-
return t;
|
|
411
|
-
let n = l.charCodeAt(e + 1);
|
|
412
|
-
return $e(n) ? (t - 55296 << 10) + (n - 56320) + 65536 : t;
|
|
413
|
-
}
|
|
414
|
-
function nt(l) {
|
|
415
|
-
return l <= 65535 ? String.fromCharCode(l) : (l -= 65536, String.fromCharCode((l >> 10) + 55296, (l & 1023) + 56320));
|
|
416
|
-
}
|
|
417
|
-
function it(l) {
|
|
418
|
-
return l < 65536 ? 1 : 2;
|
|
419
|
-
}
|
|
420
|
-
const se = /\r\n?|\n/;
|
|
421
|
-
var M = /* @__PURE__ */ (function(l) {
|
|
422
|
-
return l[l.Simple = 0] = "Simple", l[l.TrackDel = 1] = "TrackDel", l[l.TrackBefore = 2] = "TrackBefore", l[l.TrackAfter = 3] = "TrackAfter", l;
|
|
423
|
-
})(M || (M = {}));
|
|
424
|
-
class C {
|
|
425
|
-
// Sections are encoded as pairs of integers. The first is the
|
|
426
|
-
// length in the current document, and the second is -1 for
|
|
427
|
-
// unaffected sections, and the length of the replacement content
|
|
428
|
-
// otherwise. So an insertion would be (0, n>0), a deletion (n>0,
|
|
429
|
-
// 0), and a replacement two positive numbers.
|
|
430
|
-
/**
|
|
431
|
-
@internal
|
|
432
|
-
*/
|
|
433
|
-
constructor(e) {
|
|
434
|
-
this.sections = e;
|
|
435
|
-
}
|
|
436
|
-
/**
|
|
437
|
-
The length of the document before the change.
|
|
438
|
-
*/
|
|
439
|
-
get length() {
|
|
440
|
-
let e = 0;
|
|
441
|
-
for (let t = 0; t < this.sections.length; t += 2)
|
|
442
|
-
e += this.sections[t];
|
|
443
|
-
return e;
|
|
444
|
-
}
|
|
445
|
-
/**
|
|
446
|
-
The length of the document after the change.
|
|
447
|
-
*/
|
|
448
|
-
get newLength() {
|
|
449
|
-
let e = 0;
|
|
450
|
-
for (let t = 0; t < this.sections.length; t += 2) {
|
|
451
|
-
let n = this.sections[t + 1];
|
|
452
|
-
e += n < 0 ? this.sections[t] : n;
|
|
453
|
-
}
|
|
454
|
-
return e;
|
|
455
|
-
}
|
|
456
|
-
/**
|
|
457
|
-
False when there are actual changes in this set.
|
|
458
|
-
*/
|
|
459
|
-
get empty() {
|
|
460
|
-
return this.sections.length == 0 || this.sections.length == 2 && this.sections[1] < 0;
|
|
461
|
-
}
|
|
462
|
-
/**
|
|
463
|
-
Iterate over the unchanged parts left by these changes. `posA`
|
|
464
|
-
provides the position of the range in the old document, `posB`
|
|
465
|
-
the new position in the changed document.
|
|
466
|
-
*/
|
|
467
|
-
iterGaps(e) {
|
|
468
|
-
for (let t = 0, n = 0, i = 0; t < this.sections.length; ) {
|
|
469
|
-
let s = this.sections[t++], r = this.sections[t++];
|
|
470
|
-
r < 0 ? (e(n, i, s), i += s) : i += r, n += s;
|
|
471
|
-
}
|
|
472
|
-
}
|
|
473
|
-
/**
|
|
474
|
-
Iterate over the ranges changed by these changes. (See
|
|
475
|
-
[`ChangeSet.iterChanges`](https://codemirror.net/6/docs/ref/#state.ChangeSet.iterChanges) for a
|
|
476
|
-
variant that also provides you with the inserted text.)
|
|
477
|
-
`fromA`/`toA` provides the extent of the change in the starting
|
|
478
|
-
document, `fromB`/`toB` the extent of the replacement in the
|
|
479
|
-
changed document.
|
|
480
|
-
|
|
481
|
-
When `individual` is true, adjacent changes (which are kept
|
|
482
|
-
separate for [position mapping](https://codemirror.net/6/docs/ref/#state.ChangeDesc.mapPos)) are
|
|
483
|
-
reported separately.
|
|
484
|
-
*/
|
|
485
|
-
iterChangedRanges(e, t = !1) {
|
|
486
|
-
re(this, e, t);
|
|
487
|
-
}
|
|
488
|
-
/**
|
|
489
|
-
Get a description of the inverted form of these changes.
|
|
490
|
-
*/
|
|
491
|
-
get invertedDesc() {
|
|
492
|
-
let e = [];
|
|
493
|
-
for (let t = 0; t < this.sections.length; ) {
|
|
494
|
-
let n = this.sections[t++], i = this.sections[t++];
|
|
495
|
-
i < 0 ? e.push(n, i) : e.push(i, n);
|
|
496
|
-
}
|
|
497
|
-
return new C(e);
|
|
498
|
-
}
|
|
499
|
-
/**
|
|
500
|
-
Compute the combined effect of applying another set of changes
|
|
501
|
-
after this one. The length of the document after this set should
|
|
502
|
-
match the length before `other`.
|
|
503
|
-
*/
|
|
504
|
-
composeDesc(e) {
|
|
505
|
-
return this.empty ? e : e.empty ? this : Ae(this, e);
|
|
506
|
-
}
|
|
507
|
-
/**
|
|
508
|
-
Map this description, which should start with the same document
|
|
509
|
-
as `other`, over another set of changes, so that it can be
|
|
510
|
-
applied after it. When `before` is true, map as if the changes
|
|
511
|
-
in `this` happened before the ones in `other`.
|
|
512
|
-
*/
|
|
513
|
-
mapDesc(e, t = !1) {
|
|
514
|
-
return e.empty ? this : le(this, e, t);
|
|
515
|
-
}
|
|
516
|
-
mapPos(e, t = -1, n = M.Simple) {
|
|
517
|
-
let i = 0, s = 0;
|
|
518
|
-
for (let r = 0; r < this.sections.length; ) {
|
|
519
|
-
let h = this.sections[r++], o = this.sections[r++], a = i + h;
|
|
520
|
-
if (o < 0) {
|
|
521
|
-
if (a > e)
|
|
522
|
-
return s + (e - i);
|
|
523
|
-
s += h;
|
|
524
|
-
} else {
|
|
525
|
-
if (n != M.Simple && a >= e && (n == M.TrackDel && i < e && a > e || n == M.TrackBefore && i < e || n == M.TrackAfter && a > e))
|
|
526
|
-
return null;
|
|
527
|
-
if (a > e || a == e && t < 0 && !h)
|
|
528
|
-
return e == i || t < 0 ? s : s + o;
|
|
529
|
-
s += o;
|
|
530
|
-
}
|
|
531
|
-
i = a;
|
|
532
|
-
}
|
|
533
|
-
if (e > i)
|
|
534
|
-
throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);
|
|
535
|
-
return s;
|
|
536
|
-
}
|
|
537
|
-
/**
|
|
538
|
-
Check whether these changes touch a given range. When one of the
|
|
539
|
-
changes entirely covers the range, the string `"cover"` is
|
|
540
|
-
returned.
|
|
541
|
-
*/
|
|
542
|
-
touchesRange(e, t = e) {
|
|
543
|
-
for (let n = 0, i = 0; n < this.sections.length && i <= t; ) {
|
|
544
|
-
let s = this.sections[n++], r = this.sections[n++], h = i + s;
|
|
545
|
-
if (r >= 0 && i <= t && h >= e)
|
|
546
|
-
return i < e && h > t ? "cover" : !0;
|
|
547
|
-
i = h;
|
|
548
|
-
}
|
|
549
|
-
return !1;
|
|
550
|
-
}
|
|
551
|
-
/**
|
|
552
|
-
@internal
|
|
553
|
-
*/
|
|
554
|
-
toString() {
|
|
555
|
-
let e = "";
|
|
556
|
-
for (let t = 0; t < this.sections.length; ) {
|
|
557
|
-
let n = this.sections[t++], i = this.sections[t++];
|
|
558
|
-
e += (e ? " " : "") + n + (i >= 0 ? ":" + i : "");
|
|
559
|
-
}
|
|
560
|
-
return e;
|
|
561
|
-
}
|
|
562
|
-
/**
|
|
563
|
-
Serialize this change desc to a JSON-representable value.
|
|
564
|
-
*/
|
|
565
|
-
toJSON() {
|
|
566
|
-
return this.sections;
|
|
567
|
-
}
|
|
568
|
-
/**
|
|
569
|
-
Create a change desc from its JSON representation (as produced
|
|
570
|
-
by [`toJSON`](https://codemirror.net/6/docs/ref/#state.ChangeDesc.toJSON).
|
|
571
|
-
*/
|
|
572
|
-
static fromJSON(e) {
|
|
573
|
-
if (!Array.isArray(e) || e.length % 2 || e.some((t) => typeof t != "number"))
|
|
574
|
-
throw new RangeError("Invalid JSON representation of ChangeDesc");
|
|
575
|
-
return new C(e);
|
|
576
|
-
}
|
|
577
|
-
/**
|
|
578
|
-
@internal
|
|
579
|
-
*/
|
|
580
|
-
static create(e) {
|
|
581
|
-
return new C(e);
|
|
582
|
-
}
|
|
583
|
-
}
|
|
584
|
-
class y extends C {
|
|
585
|
-
constructor(e, t) {
|
|
586
|
-
super(e), this.inserted = t;
|
|
587
|
-
}
|
|
588
|
-
/**
|
|
589
|
-
Apply the changes to a document, returning the modified
|
|
590
|
-
document.
|
|
591
|
-
*/
|
|
592
|
-
apply(e) {
|
|
593
|
-
if (this.length != e.length)
|
|
594
|
-
throw new RangeError("Applying change set to a document with the wrong length");
|
|
595
|
-
return re(this, (t, n, i, s, r) => e = e.replace(i, i + (n - t), r), !1), e;
|
|
596
|
-
}
|
|
597
|
-
mapDesc(e, t = !1) {
|
|
598
|
-
return le(this, e, t, !0);
|
|
599
|
-
}
|
|
600
|
-
/**
|
|
601
|
-
Given the document as it existed _before_ the changes, return a
|
|
602
|
-
change set that represents the inverse of this set, which could
|
|
603
|
-
be used to go from the document created by the changes back to
|
|
604
|
-
the document as it existed before the changes.
|
|
605
|
-
*/
|
|
606
|
-
invert(e) {
|
|
607
|
-
let t = this.sections.slice(), n = [];
|
|
608
|
-
for (let i = 0, s = 0; i < t.length; i += 2) {
|
|
609
|
-
let r = t[i], h = t[i + 1];
|
|
610
|
-
if (h >= 0) {
|
|
611
|
-
t[i] = h, t[i + 1] = r;
|
|
612
|
-
let o = i >> 1;
|
|
613
|
-
for (; n.length < o; )
|
|
614
|
-
n.push(x.empty);
|
|
615
|
-
n.push(r ? e.slice(s, s + r) : x.empty);
|
|
616
|
-
}
|
|
617
|
-
s += r;
|
|
618
|
-
}
|
|
619
|
-
return new y(t, n);
|
|
620
|
-
}
|
|
621
|
-
/**
|
|
622
|
-
Combine two subsequent change sets into a single set. `other`
|
|
623
|
-
must start in the document produced by `this`. If `this` goes
|
|
624
|
-
`docA` → `docB` and `other` represents `docB` → `docC`, the
|
|
625
|
-
returned value will represent the change `docA` → `docC`.
|
|
626
|
-
*/
|
|
627
|
-
compose(e) {
|
|
628
|
-
return this.empty ? e : e.empty ? this : Ae(this, e, !0);
|
|
629
|
-
}
|
|
630
|
-
/**
|
|
631
|
-
Given another change set starting in the same document, maps this
|
|
632
|
-
change set over the other, producing a new change set that can be
|
|
633
|
-
applied to the document produced by applying `other`. When
|
|
634
|
-
`before` is `true`, order changes as if `this` comes before
|
|
635
|
-
`other`, otherwise (the default) treat `other` as coming first.
|
|
636
|
-
|
|
637
|
-
Given two changes `A` and `B`, `A.compose(B.map(A))` and
|
|
638
|
-
`B.compose(A.map(B, true))` will produce the same document. This
|
|
639
|
-
provides a basic form of [operational
|
|
640
|
-
transformation](https://en.wikipedia.org/wiki/Operational_transformation),
|
|
641
|
-
and can be used for collaborative editing.
|
|
642
|
-
*/
|
|
643
|
-
map(e, t = !1) {
|
|
644
|
-
return e.empty ? this : le(this, e, t, !0);
|
|
645
|
-
}
|
|
646
|
-
/**
|
|
647
|
-
Iterate over the changed ranges in the document, calling `f` for
|
|
648
|
-
each, with the range in the original document (`fromA`-`toA`)
|
|
649
|
-
and the range that replaces it in the new document
|
|
650
|
-
(`fromB`-`toB`).
|
|
651
|
-
|
|
652
|
-
When `individual` is true, adjacent changes are reported
|
|
653
|
-
separately.
|
|
654
|
-
*/
|
|
655
|
-
iterChanges(e, t = !1) {
|
|
656
|
-
re(this, e, t);
|
|
657
|
-
}
|
|
658
|
-
/**
|
|
659
|
-
Get a [change description](https://codemirror.net/6/docs/ref/#state.ChangeDesc) for this change
|
|
660
|
-
set.
|
|
661
|
-
*/
|
|
662
|
-
get desc() {
|
|
663
|
-
return C.create(this.sections);
|
|
664
|
-
}
|
|
665
|
-
/**
|
|
666
|
-
@internal
|
|
667
|
-
*/
|
|
668
|
-
filter(e) {
|
|
669
|
-
let t = [], n = [], i = [], s = new z(this);
|
|
670
|
-
e: for (let r = 0, h = 0; ; ) {
|
|
671
|
-
let o = r == e.length ? 1e9 : e[r++];
|
|
672
|
-
for (; h < o || h == o && s.len == 0; ) {
|
|
673
|
-
if (s.done)
|
|
674
|
-
break e;
|
|
675
|
-
let u = Math.min(s.len, o - h);
|
|
676
|
-
k(i, u, -1);
|
|
677
|
-
let f = s.ins == -1 ? -1 : s.off == 0 ? s.ins : 0;
|
|
678
|
-
k(t, u, f), f > 0 && b(n, t, s.text), s.forward(u), h += u;
|
|
679
|
-
}
|
|
680
|
-
let a = e[r++];
|
|
681
|
-
for (; h < a; ) {
|
|
682
|
-
if (s.done)
|
|
683
|
-
break e;
|
|
684
|
-
let u = Math.min(s.len, a - h);
|
|
685
|
-
k(t, u, -1), k(i, u, s.ins == -1 ? -1 : s.off == 0 ? s.ins : 0), s.forward(u), h += u;
|
|
686
|
-
}
|
|
687
|
-
}
|
|
688
|
-
return {
|
|
689
|
-
changes: new y(t, n),
|
|
690
|
-
filtered: C.create(i)
|
|
691
|
-
};
|
|
692
|
-
}
|
|
693
|
-
/**
|
|
694
|
-
Serialize this change set to a JSON-representable value.
|
|
695
|
-
*/
|
|
696
|
-
toJSON() {
|
|
697
|
-
let e = [];
|
|
698
|
-
for (let t = 0; t < this.sections.length; t += 2) {
|
|
699
|
-
let n = this.sections[t], i = this.sections[t + 1];
|
|
700
|
-
i < 0 ? e.push(n) : i == 0 ? e.push([n]) : e.push([n].concat(this.inserted[t >> 1].toJSON()));
|
|
701
|
-
}
|
|
702
|
-
return e;
|
|
703
|
-
}
|
|
704
|
-
/**
|
|
705
|
-
Create a change set for the given changes, for a document of the
|
|
706
|
-
given length, using `lineSep` as line separator.
|
|
707
|
-
*/
|
|
708
|
-
static of(e, t, n) {
|
|
709
|
-
let i = [], s = [], r = 0, h = null;
|
|
710
|
-
function o(u = !1) {
|
|
711
|
-
if (!u && !i.length)
|
|
712
|
-
return;
|
|
713
|
-
r < t && k(i, t - r, -1);
|
|
714
|
-
let f = new y(i, s);
|
|
715
|
-
h = h ? h.compose(f.map(h)) : f, i = [], s = [], r = 0;
|
|
716
|
-
}
|
|
717
|
-
function a(u) {
|
|
718
|
-
if (Array.isArray(u))
|
|
719
|
-
for (let f of u)
|
|
720
|
-
a(f);
|
|
721
|
-
else if (u instanceof y) {
|
|
722
|
-
if (u.length != t)
|
|
723
|
-
throw new RangeError(`Mismatched change set length (got ${u.length}, expected ${t})`);
|
|
724
|
-
o(), h = h ? h.compose(u.map(h)) : u;
|
|
725
|
-
} else {
|
|
726
|
-
let { from: f, to: d = f, insert: c } = u;
|
|
727
|
-
if (f > d || f < 0 || d > t)
|
|
728
|
-
throw new RangeError(`Invalid change range ${f} to ${d} (in doc of length ${t})`);
|
|
729
|
-
let g = c ? typeof c == "string" ? x.of(c.split(n || se)) : c : x.empty, E = g.length;
|
|
730
|
-
if (f == d && E == 0)
|
|
731
|
-
return;
|
|
732
|
-
f < r && o(), f > r && k(i, f - r, -1), k(i, d - f, E), b(s, i, g), r = d;
|
|
733
|
-
}
|
|
734
|
-
}
|
|
735
|
-
return a(e), o(!h), h;
|
|
736
|
-
}
|
|
737
|
-
/**
|
|
738
|
-
Create an empty changeset of the given length.
|
|
739
|
-
*/
|
|
740
|
-
static empty(e) {
|
|
741
|
-
return new y(e ? [e, -1] : [], []);
|
|
742
|
-
}
|
|
743
|
-
/**
|
|
744
|
-
Create a changeset from its JSON representation (as produced by
|
|
745
|
-
[`toJSON`](https://codemirror.net/6/docs/ref/#state.ChangeSet.toJSON).
|
|
746
|
-
*/
|
|
747
|
-
static fromJSON(e) {
|
|
748
|
-
if (!Array.isArray(e))
|
|
749
|
-
throw new RangeError("Invalid JSON representation of ChangeSet");
|
|
750
|
-
let t = [], n = [];
|
|
751
|
-
for (let i = 0; i < e.length; i++) {
|
|
752
|
-
let s = e[i];
|
|
753
|
-
if (typeof s == "number")
|
|
754
|
-
t.push(s, -1);
|
|
755
|
-
else {
|
|
756
|
-
if (!Array.isArray(s) || typeof s[0] != "number" || s.some((r, h) => h && typeof r != "string"))
|
|
757
|
-
throw new RangeError("Invalid JSON representation of ChangeSet");
|
|
758
|
-
if (s.length == 1)
|
|
759
|
-
t.push(s[0], 0);
|
|
760
|
-
else {
|
|
761
|
-
for (; n.length < i; )
|
|
762
|
-
n.push(x.empty);
|
|
763
|
-
n[i] = x.of(s.slice(1)), t.push(s[0], n[i].length);
|
|
764
|
-
}
|
|
765
|
-
}
|
|
766
|
-
}
|
|
767
|
-
return new y(t, n);
|
|
768
|
-
}
|
|
769
|
-
/**
|
|
770
|
-
@internal
|
|
771
|
-
*/
|
|
772
|
-
static createSet(e, t) {
|
|
773
|
-
return new y(e, t);
|
|
774
|
-
}
|
|
775
|
-
}
|
|
776
|
-
function k(l, e, t, n = !1) {
|
|
777
|
-
if (e == 0 && t <= 0)
|
|
778
|
-
return;
|
|
779
|
-
let i = l.length - 2;
|
|
780
|
-
i >= 0 && t <= 0 && t == l[i + 1] ? l[i] += e : i >= 0 && e == 0 && l[i] == 0 ? l[i + 1] += t : n ? (l[i] += e, l[i + 1] += t) : l.push(e, t);
|
|
781
|
-
}
|
|
782
|
-
function b(l, e, t) {
|
|
783
|
-
if (t.length == 0)
|
|
784
|
-
return;
|
|
785
|
-
let n = e.length - 2 >> 1;
|
|
786
|
-
if (n < l.length)
|
|
787
|
-
l[l.length - 1] = l[l.length - 1].append(t);
|
|
788
|
-
else {
|
|
789
|
-
for (; l.length < n; )
|
|
790
|
-
l.push(x.empty);
|
|
791
|
-
l.push(t);
|
|
792
|
-
}
|
|
793
|
-
}
|
|
794
|
-
function re(l, e, t) {
|
|
795
|
-
let n = l.inserted;
|
|
796
|
-
for (let i = 0, s = 0, r = 0; r < l.sections.length; ) {
|
|
797
|
-
let h = l.sections[r++], o = l.sections[r++];
|
|
798
|
-
if (o < 0)
|
|
799
|
-
i += h, s += h;
|
|
800
|
-
else {
|
|
801
|
-
let a = i, u = s, f = x.empty;
|
|
802
|
-
for (; a += h, u += o, o && n && (f = f.append(n[r - 2 >> 1])), !(t || r == l.sections.length || l.sections[r + 1] < 0); )
|
|
803
|
-
h = l.sections[r++], o = l.sections[r++];
|
|
804
|
-
e(i, a, s, u, f), i = a, s = u;
|
|
805
|
-
}
|
|
806
|
-
}
|
|
807
|
-
}
|
|
808
|
-
function le(l, e, t, n = !1) {
|
|
809
|
-
let i = [], s = n ? [] : null, r = new z(l), h = new z(e);
|
|
810
|
-
for (let o = -1; ; ) {
|
|
811
|
-
if (r.done && h.len || h.done && r.len)
|
|
812
|
-
throw new Error("Mismatched change set lengths");
|
|
813
|
-
if (r.ins == -1 && h.ins == -1) {
|
|
814
|
-
let a = Math.min(r.len, h.len);
|
|
815
|
-
k(i, a, -1), r.forward(a), h.forward(a);
|
|
816
|
-
} else if (h.ins >= 0 && (r.ins < 0 || o == r.i || r.off == 0 && (h.len < r.len || h.len == r.len && !t))) {
|
|
817
|
-
let a = h.len;
|
|
818
|
-
for (k(i, h.ins, -1); a; ) {
|
|
819
|
-
let u = Math.min(r.len, a);
|
|
820
|
-
r.ins >= 0 && o < r.i && r.len <= u && (k(i, 0, r.ins), s && b(s, i, r.text), o = r.i), r.forward(u), a -= u;
|
|
821
|
-
}
|
|
822
|
-
h.next();
|
|
823
|
-
} else if (r.ins >= 0) {
|
|
824
|
-
let a = 0, u = r.len;
|
|
825
|
-
for (; u; )
|
|
826
|
-
if (h.ins == -1) {
|
|
827
|
-
let f = Math.min(u, h.len);
|
|
828
|
-
a += f, u -= f, h.forward(f);
|
|
829
|
-
} else if (h.ins == 0 && h.len < u)
|
|
830
|
-
u -= h.len, h.next();
|
|
831
|
-
else
|
|
832
|
-
break;
|
|
833
|
-
k(i, a, o < r.i ? r.ins : 0), s && o < r.i && b(s, i, r.text), o = r.i, r.forward(r.len - u);
|
|
834
|
-
} else {
|
|
835
|
-
if (r.done && h.done)
|
|
836
|
-
return s ? y.createSet(i, s) : C.create(i);
|
|
837
|
-
throw new Error("Mismatched change set lengths");
|
|
838
|
-
}
|
|
839
|
-
}
|
|
840
|
-
}
|
|
841
|
-
function Ae(l, e, t = !1) {
|
|
842
|
-
let n = [], i = t ? [] : null, s = new z(l), r = new z(e);
|
|
843
|
-
for (let h = !1; ; ) {
|
|
844
|
-
if (s.done && r.done)
|
|
845
|
-
return i ? y.createSet(n, i) : C.create(n);
|
|
846
|
-
if (s.ins == 0)
|
|
847
|
-
k(n, s.len, 0, h), s.next();
|
|
848
|
-
else if (r.len == 0 && !r.done)
|
|
849
|
-
k(n, 0, r.ins, h), i && b(i, n, r.text), r.next();
|
|
850
|
-
else {
|
|
851
|
-
if (s.done || r.done)
|
|
852
|
-
throw new Error("Mismatched change set lengths");
|
|
853
|
-
{
|
|
854
|
-
let o = Math.min(s.len2, r.len), a = n.length;
|
|
855
|
-
if (s.ins == -1) {
|
|
856
|
-
let u = r.ins == -1 ? -1 : r.off ? 0 : r.ins;
|
|
857
|
-
k(n, o, u, h), i && u && b(i, n, r.text);
|
|
858
|
-
} else r.ins == -1 ? (k(n, s.off ? 0 : s.len, o, h), i && b(i, n, s.textBit(o))) : (k(n, s.off ? 0 : s.len, r.off ? 0 : r.ins, h), i && !r.off && b(i, n, r.text));
|
|
859
|
-
h = (s.ins > o || r.ins >= 0 && r.len > o) && (h || n.length > a), s.forward2(o), r.forward(o);
|
|
860
|
-
}
|
|
861
|
-
}
|
|
862
|
-
}
|
|
863
|
-
}
|
|
864
|
-
class z {
|
|
865
|
-
constructor(e) {
|
|
866
|
-
this.set = e, this.i = 0, this.next();
|
|
867
|
-
}
|
|
868
|
-
next() {
|
|
869
|
-
let { sections: e } = this.set;
|
|
870
|
-
this.i < e.length ? (this.len = e[this.i++], this.ins = e[this.i++]) : (this.len = 0, this.ins = -2), this.off = 0;
|
|
871
|
-
}
|
|
872
|
-
get done() {
|
|
873
|
-
return this.ins == -2;
|
|
874
|
-
}
|
|
875
|
-
get len2() {
|
|
876
|
-
return this.ins < 0 ? this.len : this.ins;
|
|
877
|
-
}
|
|
878
|
-
get text() {
|
|
879
|
-
let { inserted: e } = this.set, t = this.i - 2 >> 1;
|
|
880
|
-
return t >= e.length ? x.empty : e[t];
|
|
881
|
-
}
|
|
882
|
-
textBit(e) {
|
|
883
|
-
let { inserted: t } = this.set, n = this.i - 2 >> 1;
|
|
884
|
-
return n >= t.length && !e ? x.empty : t[n].slice(this.off, e == null ? void 0 : this.off + e);
|
|
885
|
-
}
|
|
886
|
-
forward(e) {
|
|
887
|
-
e == this.len ? this.next() : (this.len -= e, this.off += e);
|
|
888
|
-
}
|
|
889
|
-
forward2(e) {
|
|
890
|
-
this.ins == -1 ? this.forward(e) : e == this.ins ? this.next() : (this.ins -= e, this.off += e);
|
|
891
|
-
}
|
|
892
|
-
}
|
|
893
|
-
class B {
|
|
894
|
-
constructor(e, t, n) {
|
|
895
|
-
this.from = e, this.to = t, this.flags = n;
|
|
896
|
-
}
|
|
897
|
-
/**
|
|
898
|
-
The anchor of the range—the side that doesn't move when you
|
|
899
|
-
extend it.
|
|
900
|
-
*/
|
|
901
|
-
get anchor() {
|
|
902
|
-
return this.flags & 32 ? this.to : this.from;
|
|
903
|
-
}
|
|
904
|
-
/**
|
|
905
|
-
The head of the range, which is moved when the range is
|
|
906
|
-
[extended](https://codemirror.net/6/docs/ref/#state.SelectionRange.extend).
|
|
907
|
-
*/
|
|
908
|
-
get head() {
|
|
909
|
-
return this.flags & 32 ? this.from : this.to;
|
|
910
|
-
}
|
|
911
|
-
/**
|
|
912
|
-
True when `anchor` and `head` are at the same position.
|
|
913
|
-
*/
|
|
914
|
-
get empty() {
|
|
915
|
-
return this.from == this.to;
|
|
916
|
-
}
|
|
917
|
-
/**
|
|
918
|
-
If this is a cursor that is explicitly associated with the
|
|
919
|
-
character on one of its sides, this returns the side. -1 means
|
|
920
|
-
the character before its position, 1 the character after, and 0
|
|
921
|
-
means no association.
|
|
922
|
-
*/
|
|
923
|
-
get assoc() {
|
|
924
|
-
return this.flags & 8 ? -1 : this.flags & 16 ? 1 : 0;
|
|
925
|
-
}
|
|
926
|
-
/**
|
|
927
|
-
The bidirectional text level associated with this cursor, if
|
|
928
|
-
any.
|
|
929
|
-
*/
|
|
930
|
-
get bidiLevel() {
|
|
931
|
-
let e = this.flags & 7;
|
|
932
|
-
return e == 7 ? null : e;
|
|
933
|
-
}
|
|
934
|
-
/**
|
|
935
|
-
The goal column (stored vertical offset) associated with a
|
|
936
|
-
cursor. This is used to preserve the vertical position when
|
|
937
|
-
[moving](https://codemirror.net/6/docs/ref/#view.EditorView.moveVertically) across
|
|
938
|
-
lines of different length.
|
|
939
|
-
*/
|
|
940
|
-
get goalColumn() {
|
|
941
|
-
let e = this.flags >> 6;
|
|
942
|
-
return e == 16777215 ? void 0 : e;
|
|
943
|
-
}
|
|
944
|
-
/**
|
|
945
|
-
Map this range through a change, producing a valid range in the
|
|
946
|
-
updated document.
|
|
947
|
-
*/
|
|
948
|
-
map(e, t = -1) {
|
|
949
|
-
let n, i;
|
|
950
|
-
return this.empty ? n = i = e.mapPos(this.from, t) : (n = e.mapPos(this.from, 1), i = e.mapPos(this.to, -1)), n == this.from && i == this.to ? this : new B(n, i, this.flags);
|
|
951
|
-
}
|
|
952
|
-
/**
|
|
953
|
-
Extend this range to cover at least `from` to `to`.
|
|
954
|
-
*/
|
|
955
|
-
extend(e, t = e) {
|
|
956
|
-
if (e <= this.anchor && t >= this.anchor)
|
|
957
|
-
return p.range(e, t);
|
|
958
|
-
let n = Math.abs(e - this.anchor) > Math.abs(t - this.anchor) ? e : t;
|
|
959
|
-
return p.range(this.anchor, n);
|
|
960
|
-
}
|
|
961
|
-
/**
|
|
962
|
-
Compare this range to another range.
|
|
963
|
-
*/
|
|
964
|
-
eq(e, t = !1) {
|
|
965
|
-
return this.anchor == e.anchor && this.head == e.head && this.goalColumn == e.goalColumn && (!t || !this.empty || this.assoc == e.assoc);
|
|
966
|
-
}
|
|
967
|
-
/**
|
|
968
|
-
Return a JSON-serializable object representing the range.
|
|
969
|
-
*/
|
|
970
|
-
toJSON() {
|
|
971
|
-
return { anchor: this.anchor, head: this.head };
|
|
972
|
-
}
|
|
973
|
-
/**
|
|
974
|
-
Convert a JSON representation of a range to a `SelectionRange`
|
|
975
|
-
instance.
|
|
976
|
-
*/
|
|
977
|
-
static fromJSON(e) {
|
|
978
|
-
if (!e || typeof e.anchor != "number" || typeof e.head != "number")
|
|
979
|
-
throw new RangeError("Invalid JSON representation for SelectionRange");
|
|
980
|
-
return p.range(e.anchor, e.head);
|
|
981
|
-
}
|
|
982
|
-
/**
|
|
983
|
-
@internal
|
|
984
|
-
*/
|
|
985
|
-
static create(e, t, n) {
|
|
986
|
-
return new B(e, t, n);
|
|
987
|
-
}
|
|
988
|
-
}
|
|
989
|
-
class p {
|
|
990
|
-
constructor(e, t) {
|
|
991
|
-
this.ranges = e, this.mainIndex = t;
|
|
992
|
-
}
|
|
993
|
-
/**
|
|
994
|
-
Map a selection through a change. Used to adjust the selection
|
|
995
|
-
position for changes.
|
|
996
|
-
*/
|
|
997
|
-
map(e, t = -1) {
|
|
998
|
-
return e.empty ? this : p.create(this.ranges.map((n) => n.map(e, t)), this.mainIndex);
|
|
999
|
-
}
|
|
1000
|
-
/**
|
|
1001
|
-
Compare this selection to another selection. By default, ranges
|
|
1002
|
-
are compared only by position. When `includeAssoc` is true,
|
|
1003
|
-
cursor ranges must also have the same
|
|
1004
|
-
[`assoc`](https://codemirror.net/6/docs/ref/#state.SelectionRange.assoc) value.
|
|
1005
|
-
*/
|
|
1006
|
-
eq(e, t = !1) {
|
|
1007
|
-
if (this.ranges.length != e.ranges.length || this.mainIndex != e.mainIndex)
|
|
1008
|
-
return !1;
|
|
1009
|
-
for (let n = 0; n < this.ranges.length; n++)
|
|
1010
|
-
if (!this.ranges[n].eq(e.ranges[n], t))
|
|
1011
|
-
return !1;
|
|
1012
|
-
return !0;
|
|
1013
|
-
}
|
|
1014
|
-
/**
|
|
1015
|
-
Get the primary selection range. Usually, you should make sure
|
|
1016
|
-
your code applies to _all_ ranges, by using methods like
|
|
1017
|
-
[`changeByRange`](https://codemirror.net/6/docs/ref/#state.EditorState.changeByRange).
|
|
1018
|
-
*/
|
|
1019
|
-
get main() {
|
|
1020
|
-
return this.ranges[this.mainIndex];
|
|
1021
|
-
}
|
|
1022
|
-
/**
|
|
1023
|
-
Make sure the selection only has one range. Returns a selection
|
|
1024
|
-
holding only the main range from this selection.
|
|
1025
|
-
*/
|
|
1026
|
-
asSingle() {
|
|
1027
|
-
return this.ranges.length == 1 ? this : new p([this.main], 0);
|
|
1028
|
-
}
|
|
1029
|
-
/**
|
|
1030
|
-
Extend this selection with an extra range.
|
|
1031
|
-
*/
|
|
1032
|
-
addRange(e, t = !0) {
|
|
1033
|
-
return p.create([e].concat(this.ranges), t ? 0 : this.mainIndex + 1);
|
|
1034
|
-
}
|
|
1035
|
-
/**
|
|
1036
|
-
Replace a given range with another range, and then normalize the
|
|
1037
|
-
selection to merge and sort ranges if necessary.
|
|
1038
|
-
*/
|
|
1039
|
-
replaceRange(e, t = this.mainIndex) {
|
|
1040
|
-
let n = this.ranges.slice();
|
|
1041
|
-
return n[t] = e, p.create(n, this.mainIndex);
|
|
1042
|
-
}
|
|
1043
|
-
/**
|
|
1044
|
-
Convert this selection to an object that can be serialized to
|
|
1045
|
-
JSON.
|
|
1046
|
-
*/
|
|
1047
|
-
toJSON() {
|
|
1048
|
-
return { ranges: this.ranges.map((e) => e.toJSON()), main: this.mainIndex };
|
|
1049
|
-
}
|
|
1050
|
-
/**
|
|
1051
|
-
Create a selection from a JSON representation.
|
|
1052
|
-
*/
|
|
1053
|
-
static fromJSON(e) {
|
|
1054
|
-
if (!e || !Array.isArray(e.ranges) || typeof e.main != "number" || e.main >= e.ranges.length)
|
|
1055
|
-
throw new RangeError("Invalid JSON representation for EditorSelection");
|
|
1056
|
-
return new p(e.ranges.map((t) => B.fromJSON(t)), e.main);
|
|
1057
|
-
}
|
|
1058
|
-
/**
|
|
1059
|
-
Create a selection holding a single range.
|
|
1060
|
-
*/
|
|
1061
|
-
static single(e, t = e) {
|
|
1062
|
-
return new p([p.range(e, t)], 0);
|
|
1063
|
-
}
|
|
1064
|
-
/**
|
|
1065
|
-
Sort and merge the given set of ranges, creating a valid
|
|
1066
|
-
selection.
|
|
1067
|
-
*/
|
|
1068
|
-
static create(e, t = 0) {
|
|
1069
|
-
if (e.length == 0)
|
|
1070
|
-
throw new RangeError("A selection needs at least one range");
|
|
1071
|
-
for (let n = 0, i = 0; i < e.length; i++) {
|
|
1072
|
-
let s = e[i];
|
|
1073
|
-
if (s.empty ? s.from <= n : s.from < n)
|
|
1074
|
-
return p.normalized(e.slice(), t);
|
|
1075
|
-
n = s.to;
|
|
1076
|
-
}
|
|
1077
|
-
return new p(e, t);
|
|
1078
|
-
}
|
|
1079
|
-
/**
|
|
1080
|
-
Create a cursor selection range at the given position. You can
|
|
1081
|
-
safely ignore the optional arguments in most situations.
|
|
1082
|
-
*/
|
|
1083
|
-
static cursor(e, t = 0, n, i) {
|
|
1084
|
-
return B.create(e, e, (t == 0 ? 0 : t < 0 ? 8 : 16) | (n == null ? 7 : Math.min(6, n)) | (i ?? 16777215) << 6);
|
|
1085
|
-
}
|
|
1086
|
-
/**
|
|
1087
|
-
Create a selection range.
|
|
1088
|
-
*/
|
|
1089
|
-
static range(e, t, n, i) {
|
|
1090
|
-
let s = (n ?? 16777215) << 6 | (i == null ? 7 : Math.min(6, i));
|
|
1091
|
-
return t < e ? B.create(t, e, 48 | s) : B.create(e, t, (t > e ? 8 : 0) | s);
|
|
1092
|
-
}
|
|
1093
|
-
/**
|
|
1094
|
-
@internal
|
|
1095
|
-
*/
|
|
1096
|
-
static normalized(e, t = 0) {
|
|
1097
|
-
let n = e[t];
|
|
1098
|
-
e.sort((i, s) => i.from - s.from), t = e.indexOf(n);
|
|
1099
|
-
for (let i = 1; i < e.length; i++) {
|
|
1100
|
-
let s = e[i], r = e[i - 1];
|
|
1101
|
-
if (s.empty ? s.from <= r.to : s.from < r.to) {
|
|
1102
|
-
let h = r.from, o = Math.max(s.to, r.to);
|
|
1103
|
-
i <= t && t--, e.splice(--i, 2, s.anchor > s.head ? p.range(o, h) : p.range(h, o));
|
|
1104
|
-
}
|
|
1105
|
-
}
|
|
1106
|
-
return new p(e, t);
|
|
1107
|
-
}
|
|
1108
|
-
}
|
|
1109
|
-
function Ee(l, e) {
|
|
1110
|
-
for (let t of l.ranges)
|
|
1111
|
-
if (t.to > e)
|
|
1112
|
-
throw new RangeError("Selection points outside of document");
|
|
1113
|
-
}
|
|
1114
|
-
let ge = 0;
|
|
1115
|
-
class A {
|
|
1116
|
-
constructor(e, t, n, i, s) {
|
|
1117
|
-
this.combine = e, this.compareInput = t, this.compare = n, this.isStatic = i, this.id = ge++, this.default = e([]), this.extensions = typeof s == "function" ? s(this) : s;
|
|
1118
|
-
}
|
|
1119
|
-
/**
|
|
1120
|
-
Returns a facet reader for this facet, which can be used to
|
|
1121
|
-
[read](https://codemirror.net/6/docs/ref/#state.EditorState.facet) it but not to define values for it.
|
|
1122
|
-
*/
|
|
1123
|
-
get reader() {
|
|
1124
|
-
return this;
|
|
1125
|
-
}
|
|
1126
|
-
/**
|
|
1127
|
-
Define a new facet.
|
|
1128
|
-
*/
|
|
1129
|
-
static define(e = {}) {
|
|
1130
|
-
return new A(e.combine || ((t) => t), e.compareInput || ((t, n) => t === n), e.compare || (e.combine ? (t, n) => t === n : pe), !!e.static, e.enables);
|
|
1131
|
-
}
|
|
1132
|
-
/**
|
|
1133
|
-
Returns an extension that adds the given value to this facet.
|
|
1134
|
-
*/
|
|
1135
|
-
of(e) {
|
|
1136
|
-
return new X([], this, 0, e);
|
|
1137
|
-
}
|
|
1138
|
-
/**
|
|
1139
|
-
Create an extension that computes a value for the facet from a
|
|
1140
|
-
state. You must take care to declare the parts of the state that
|
|
1141
|
-
this value depends on, since your function is only called again
|
|
1142
|
-
for a new state when one of those parts changed.
|
|
1143
|
-
|
|
1144
|
-
In cases where your value depends only on a single field, you'll
|
|
1145
|
-
want to use the [`from`](https://codemirror.net/6/docs/ref/#state.Facet.from) method instead.
|
|
1146
|
-
*/
|
|
1147
|
-
compute(e, t) {
|
|
1148
|
-
if (this.isStatic)
|
|
1149
|
-
throw new Error("Can't compute a static facet");
|
|
1150
|
-
return new X(e, this, 1, t);
|
|
1151
|
-
}
|
|
1152
|
-
/**
|
|
1153
|
-
Create an extension that computes zero or more values for this
|
|
1154
|
-
facet from a state.
|
|
1155
|
-
*/
|
|
1156
|
-
computeN(e, t) {
|
|
1157
|
-
if (this.isStatic)
|
|
1158
|
-
throw new Error("Can't compute a static facet");
|
|
1159
|
-
return new X(e, this, 2, t);
|
|
1160
|
-
}
|
|
1161
|
-
from(e, t) {
|
|
1162
|
-
return t || (t = (n) => n), this.compute([e], (n) => t(n.field(e)));
|
|
1163
|
-
}
|
|
1164
|
-
}
|
|
1165
|
-
function pe(l, e) {
|
|
1166
|
-
return l == e || l.length == e.length && l.every((t, n) => t === e[n]);
|
|
1167
|
-
}
|
|
1168
|
-
class X {
|
|
1169
|
-
constructor(e, t, n, i) {
|
|
1170
|
-
this.dependencies = e, this.facet = t, this.type = n, this.value = i, this.id = ge++;
|
|
1171
|
-
}
|
|
1172
|
-
dynamicSlot(e) {
|
|
1173
|
-
var t;
|
|
1174
|
-
let n = this.value, i = this.facet.compareInput, s = this.id, r = e[s] >> 1, h = this.type == 2, o = !1, a = !1, u = [];
|
|
1175
|
-
for (let f of this.dependencies)
|
|
1176
|
-
f == "doc" ? o = !0 : f == "selection" ? a = !0 : (((t = e[f.id]) !== null && t !== void 0 ? t : 1) & 1) == 0 && u.push(e[f.id]);
|
|
1177
|
-
return {
|
|
1178
|
-
create(f) {
|
|
1179
|
-
return f.values[r] = n(f), 1;
|
|
1180
|
-
},
|
|
1181
|
-
update(f, d) {
|
|
1182
|
-
if (o && d.docChanged || a && (d.docChanged || d.selection) || he(f, u)) {
|
|
1183
|
-
let c = n(f);
|
|
1184
|
-
if (h ? !xe(c, f.values[r], i) : !i(c, f.values[r]))
|
|
1185
|
-
return f.values[r] = c, 1;
|
|
1186
|
-
}
|
|
1187
|
-
return 0;
|
|
1188
|
-
},
|
|
1189
|
-
reconfigure: (f, d) => {
|
|
1190
|
-
let c, g = d.config.address[s];
|
|
1191
|
-
if (g != null) {
|
|
1192
|
-
let E = j(d, g);
|
|
1193
|
-
if (this.dependencies.every((v) => v instanceof A ? d.facet(v) === f.facet(v) : v instanceof L ? d.field(v, !1) == f.field(v, !1) : !0) || (h ? xe(c = n(f), E, i) : i(c = n(f), E)))
|
|
1194
|
-
return f.values[r] = E, 0;
|
|
1195
|
-
} else
|
|
1196
|
-
c = n(f);
|
|
1197
|
-
return f.values[r] = c, 1;
|
|
1198
|
-
}
|
|
1199
|
-
};
|
|
1200
|
-
}
|
|
1201
|
-
}
|
|
1202
|
-
function xe(l, e, t) {
|
|
1203
|
-
if (l.length != e.length)
|
|
1204
|
-
return !1;
|
|
1205
|
-
for (let n = 0; n < l.length; n++)
|
|
1206
|
-
if (!t(l[n], e[n]))
|
|
1207
|
-
return !1;
|
|
1208
|
-
return !0;
|
|
1209
|
-
}
|
|
1210
|
-
function he(l, e) {
|
|
1211
|
-
let t = !1;
|
|
1212
|
-
for (let n of e)
|
|
1213
|
-
$(l, n) & 1 && (t = !0);
|
|
1214
|
-
return t;
|
|
1215
|
-
}
|
|
1216
|
-
function qe(l, e, t) {
|
|
1217
|
-
let n = t.map((o) => l[o.id]), i = t.map((o) => o.type), s = n.filter((o) => !(o & 1)), r = l[e.id] >> 1;
|
|
1218
|
-
function h(o) {
|
|
1219
|
-
let a = [];
|
|
1220
|
-
for (let u = 0; u < n.length; u++) {
|
|
1221
|
-
let f = j(o, n[u]);
|
|
1222
|
-
if (i[u] == 2)
|
|
1223
|
-
for (let d of f)
|
|
1224
|
-
a.push(d);
|
|
1225
|
-
else
|
|
1226
|
-
a.push(f);
|
|
1227
|
-
}
|
|
1228
|
-
return e.combine(a);
|
|
1229
|
-
}
|
|
1230
|
-
return {
|
|
1231
|
-
create(o) {
|
|
1232
|
-
for (let a of n)
|
|
1233
|
-
$(o, a);
|
|
1234
|
-
return o.values[r] = h(o), 1;
|
|
1235
|
-
},
|
|
1236
|
-
update(o, a) {
|
|
1237
|
-
if (!he(o, s))
|
|
1238
|
-
return 0;
|
|
1239
|
-
let u = h(o);
|
|
1240
|
-
return e.compare(u, o.values[r]) ? 0 : (o.values[r] = u, 1);
|
|
1241
|
-
},
|
|
1242
|
-
reconfigure(o, a) {
|
|
1243
|
-
let u = he(o, n), f = a.config.facets[e.id], d = a.facet(e);
|
|
1244
|
-
if (f && !u && pe(t, f))
|
|
1245
|
-
return o.values[r] = d, 0;
|
|
1246
|
-
let c = h(o);
|
|
1247
|
-
return e.compare(c, d) ? (o.values[r] = d, 0) : (o.values[r] = c, 1);
|
|
1248
|
-
}
|
|
1249
|
-
};
|
|
1250
|
-
}
|
|
1251
|
-
const G = /* @__PURE__ */ A.define({ static: !0 });
|
|
1252
|
-
class L {
|
|
1253
|
-
constructor(e, t, n, i, s) {
|
|
1254
|
-
this.id = e, this.createF = t, this.updateF = n, this.compareF = i, this.spec = s, this.provides = void 0;
|
|
1255
|
-
}
|
|
1256
|
-
/**
|
|
1257
|
-
Define a state field.
|
|
1258
|
-
*/
|
|
1259
|
-
static define(e) {
|
|
1260
|
-
let t = new L(ge++, e.create, e.update, e.compare || ((n, i) => n === i), e);
|
|
1261
|
-
return e.provide && (t.provides = e.provide(t)), t;
|
|
1262
|
-
}
|
|
1263
|
-
create(e) {
|
|
1264
|
-
let t = e.facet(G).find((n) => n.field == this);
|
|
1265
|
-
return (t?.create || this.createF)(e);
|
|
1266
|
-
}
|
|
1267
|
-
/**
|
|
1268
|
-
@internal
|
|
1269
|
-
*/
|
|
1270
|
-
slot(e) {
|
|
1271
|
-
let t = e[this.id] >> 1;
|
|
1272
|
-
return {
|
|
1273
|
-
create: (n) => (n.values[t] = this.create(n), 1),
|
|
1274
|
-
update: (n, i) => {
|
|
1275
|
-
let s = n.values[t], r = this.updateF(s, i);
|
|
1276
|
-
return this.compareF(s, r) ? 0 : (n.values[t] = r, 1);
|
|
1277
|
-
},
|
|
1278
|
-
reconfigure: (n, i) => {
|
|
1279
|
-
let s = n.facet(G), r = i.facet(G), h;
|
|
1280
|
-
return (h = s.find((o) => o.field == this)) && h != r.find((o) => o.field == this) ? (n.values[t] = h.create(n), 1) : i.config.address[this.id] != null ? (n.values[t] = i.field(this), 0) : (n.values[t] = this.create(n), 1);
|
|
1281
|
-
}
|
|
1282
|
-
};
|
|
1283
|
-
}
|
|
1284
|
-
/**
|
|
1285
|
-
Returns an extension that enables this field and overrides the
|
|
1286
|
-
way it is initialized. Can be useful when you need to provide a
|
|
1287
|
-
non-default starting value for the field.
|
|
1288
|
-
*/
|
|
1289
|
-
init(e) {
|
|
1290
|
-
return [this, G.of({ field: this, create: e })];
|
|
1291
|
-
}
|
|
1292
|
-
/**
|
|
1293
|
-
State field instances can be used as
|
|
1294
|
-
[`Extension`](https://codemirror.net/6/docs/ref/#state.Extension) values to enable the field in a
|
|
1295
|
-
given state.
|
|
1296
|
-
*/
|
|
1297
|
-
get extension() {
|
|
1298
|
-
return this;
|
|
1299
|
-
}
|
|
1300
|
-
}
|
|
1301
|
-
const T = { lowest: 4, low: 3, default: 2, high: 1, highest: 0 };
|
|
1302
|
-
function V(l) {
|
|
1303
|
-
return (e) => new Oe(e, l);
|
|
1304
|
-
}
|
|
1305
|
-
const st = {
|
|
1306
|
-
/**
|
|
1307
|
-
The highest precedence level, for extensions that should end up
|
|
1308
|
-
near the start of the precedence ordering.
|
|
1309
|
-
*/
|
|
1310
|
-
highest: /* @__PURE__ */ V(T.highest),
|
|
1311
|
-
/**
|
|
1312
|
-
A higher-than-default precedence, for extensions that should
|
|
1313
|
-
come before those with default precedence.
|
|
1314
|
-
*/
|
|
1315
|
-
high: /* @__PURE__ */ V(T.high),
|
|
1316
|
-
/**
|
|
1317
|
-
The default precedence, which is also used for extensions
|
|
1318
|
-
without an explicit precedence.
|
|
1319
|
-
*/
|
|
1320
|
-
default: /* @__PURE__ */ V(T.default),
|
|
1321
|
-
/**
|
|
1322
|
-
A lower-than-default precedence.
|
|
1323
|
-
*/
|
|
1324
|
-
low: /* @__PURE__ */ V(T.low),
|
|
1325
|
-
/**
|
|
1326
|
-
The lowest precedence level. Meant for things that should end up
|
|
1327
|
-
near the end of the extension order.
|
|
1328
|
-
*/
|
|
1329
|
-
lowest: /* @__PURE__ */ V(T.lowest)
|
|
1330
|
-
};
|
|
1331
|
-
class Oe {
|
|
1332
|
-
constructor(e, t) {
|
|
1333
|
-
this.inner = e, this.prec = t;
|
|
1334
|
-
}
|
|
1335
|
-
}
|
|
1336
|
-
class te {
|
|
1337
|
-
/**
|
|
1338
|
-
Create an instance of this compartment to add to your [state
|
|
1339
|
-
configuration](https://codemirror.net/6/docs/ref/#state.EditorStateConfig.extensions).
|
|
1340
|
-
*/
|
|
1341
|
-
of(e) {
|
|
1342
|
-
return new oe(this, e);
|
|
1343
|
-
}
|
|
1344
|
-
/**
|
|
1345
|
-
Create an [effect](https://codemirror.net/6/docs/ref/#state.TransactionSpec.effects) that
|
|
1346
|
-
reconfigures this compartment.
|
|
1347
|
-
*/
|
|
1348
|
-
reconfigure(e) {
|
|
1349
|
-
return te.reconfigure.of({ compartment: this, extension: e });
|
|
1350
|
-
}
|
|
1351
|
-
/**
|
|
1352
|
-
Get the current content of the compartment in the state, or
|
|
1353
|
-
`undefined` if it isn't present.
|
|
1354
|
-
*/
|
|
1355
|
-
get(e) {
|
|
1356
|
-
return e.config.compartments.get(this);
|
|
1357
|
-
}
|
|
1358
|
-
}
|
|
1359
|
-
class oe {
|
|
1360
|
-
constructor(e, t) {
|
|
1361
|
-
this.compartment = e, this.inner = t;
|
|
1362
|
-
}
|
|
1363
|
-
}
|
|
1364
|
-
class Z {
|
|
1365
|
-
constructor(e, t, n, i, s, r) {
|
|
1366
|
-
for (this.base = e, this.compartments = t, this.dynamicSlots = n, this.address = i, this.staticValues = s, this.facets = r, this.statusTemplate = []; this.statusTemplate.length < n.length; )
|
|
1367
|
-
this.statusTemplate.push(
|
|
1368
|
-
0
|
|
1369
|
-
/* SlotStatus.Unresolved */
|
|
1370
|
-
);
|
|
1371
|
-
}
|
|
1372
|
-
staticFacet(e) {
|
|
1373
|
-
let t = this.address[e.id];
|
|
1374
|
-
return t == null ? e.default : this.staticValues[t >> 1];
|
|
1375
|
-
}
|
|
1376
|
-
static resolve(e, t, n) {
|
|
1377
|
-
let i = [], s = /* @__PURE__ */ Object.create(null), r = /* @__PURE__ */ new Map();
|
|
1378
|
-
for (let d of We(e, t, r))
|
|
1379
|
-
d instanceof L ? i.push(d) : (s[d.facet.id] || (s[d.facet.id] = [])).push(d);
|
|
1380
|
-
let h = /* @__PURE__ */ Object.create(null), o = [], a = [];
|
|
1381
|
-
for (let d of i)
|
|
1382
|
-
h[d.id] = a.length << 1, a.push((c) => d.slot(c));
|
|
1383
|
-
let u = n?.config.facets;
|
|
1384
|
-
for (let d in s) {
|
|
1385
|
-
let c = s[d], g = c[0].facet, E = u && u[d] || [];
|
|
1386
|
-
if (c.every(
|
|
1387
|
-
(v) => v.type == 0
|
|
1388
|
-
/* Provider.Static */
|
|
1389
|
-
))
|
|
1390
|
-
if (h[g.id] = o.length << 1 | 1, pe(E, c))
|
|
1391
|
-
o.push(n.facet(g));
|
|
1392
|
-
else {
|
|
1393
|
-
let v = g.combine(c.map((ne) => ne.value));
|
|
1394
|
-
o.push(n && g.compare(v, n.facet(g)) ? n.facet(g) : v);
|
|
1395
|
-
}
|
|
1396
|
-
else {
|
|
1397
|
-
for (let v of c)
|
|
1398
|
-
v.type == 0 ? (h[v.id] = o.length << 1 | 1, o.push(v.value)) : (h[v.id] = a.length << 1, a.push((ne) => v.dynamicSlot(ne)));
|
|
1399
|
-
h[g.id] = a.length << 1, a.push((v) => qe(v, g, c));
|
|
1400
|
-
}
|
|
1401
|
-
}
|
|
1402
|
-
let f = a.map((d) => d(h));
|
|
1403
|
-
return new Z(e, r, f, h, o, s);
|
|
1404
|
-
}
|
|
1405
|
-
}
|
|
1406
|
-
function We(l, e, t) {
|
|
1407
|
-
let n = [[], [], [], [], []], i = /* @__PURE__ */ new Map();
|
|
1408
|
-
function s(r, h) {
|
|
1409
|
-
let o = i.get(r);
|
|
1410
|
-
if (o != null) {
|
|
1411
|
-
if (o <= h)
|
|
1412
|
-
return;
|
|
1413
|
-
let a = n[o].indexOf(r);
|
|
1414
|
-
a > -1 && n[o].splice(a, 1), r instanceof oe && t.delete(r.compartment);
|
|
1415
|
-
}
|
|
1416
|
-
if (i.set(r, h), Array.isArray(r))
|
|
1417
|
-
for (let a of r)
|
|
1418
|
-
s(a, h);
|
|
1419
|
-
else if (r instanceof oe) {
|
|
1420
|
-
if (t.has(r.compartment))
|
|
1421
|
-
throw new RangeError("Duplicate use of compartment in extensions");
|
|
1422
|
-
let a = e.get(r.compartment) || r.inner;
|
|
1423
|
-
t.set(r.compartment, a), s(a, h);
|
|
1424
|
-
} else if (r instanceof Oe)
|
|
1425
|
-
s(r.inner, r.prec);
|
|
1426
|
-
else if (r instanceof L)
|
|
1427
|
-
n[h].push(r), r.provides && s(r.provides, h);
|
|
1428
|
-
else if (r instanceof X)
|
|
1429
|
-
n[h].push(r), r.facet.extensions && s(r.facet.extensions, T.default);
|
|
1430
|
-
else {
|
|
1431
|
-
let a = r.extension;
|
|
1432
|
-
if (!a)
|
|
1433
|
-
throw new Error(`Unrecognized extension value in extension set (${r}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);
|
|
1434
|
-
s(a, h);
|
|
1435
|
-
}
|
|
1436
|
-
}
|
|
1437
|
-
return s(l, T.default), n.reduce((r, h) => r.concat(h));
|
|
1438
|
-
}
|
|
1439
|
-
function $(l, e) {
|
|
1440
|
-
if (e & 1)
|
|
1441
|
-
return 2;
|
|
1442
|
-
let t = e >> 1, n = l.status[t];
|
|
1443
|
-
if (n == 4)
|
|
1444
|
-
throw new Error("Cyclic dependency between fields and/or facets");
|
|
1445
|
-
if (n & 2)
|
|
1446
|
-
return n;
|
|
1447
|
-
l.status[t] = 4;
|
|
1448
|
-
let i = l.computeSlot(l, l.config.dynamicSlots[t]);
|
|
1449
|
-
return l.status[t] = 2 | i;
|
|
1450
|
-
}
|
|
1451
|
-
function j(l, e) {
|
|
1452
|
-
return e & 1 ? l.config.staticValues[e >> 1] : l.values[e >> 1];
|
|
1453
|
-
}
|
|
1454
|
-
const Ce = /* @__PURE__ */ A.define(), ae = /* @__PURE__ */ A.define({
|
|
1455
|
-
combine: (l) => l.some((e) => e),
|
|
1456
|
-
static: !0
|
|
1457
|
-
}), Me = /* @__PURE__ */ A.define({
|
|
1458
|
-
combine: (l) => l.length ? l[0] : void 0,
|
|
1459
|
-
static: !0
|
|
1460
|
-
}), be = /* @__PURE__ */ A.define(), Re = /* @__PURE__ */ A.define(), Te = /* @__PURE__ */ A.define(), Be = /* @__PURE__ */ A.define({
|
|
1461
|
-
combine: (l) => l.length ? l[0] : !1
|
|
1462
|
-
});
|
|
1463
|
-
class U {
|
|
1464
|
-
/**
|
|
1465
|
-
@internal
|
|
1466
|
-
*/
|
|
1467
|
-
constructor(e, t) {
|
|
1468
|
-
this.type = e, this.value = t;
|
|
1469
|
-
}
|
|
1470
|
-
/**
|
|
1471
|
-
Define a new type of annotation.
|
|
1472
|
-
*/
|
|
1473
|
-
static define() {
|
|
1474
|
-
return new Ue();
|
|
1475
|
-
}
|
|
1476
|
-
}
|
|
1477
|
-
class Ue {
|
|
1478
|
-
/**
|
|
1479
|
-
Create an instance of this annotation.
|
|
1480
|
-
*/
|
|
1481
|
-
of(e) {
|
|
1482
|
-
return new U(this, e);
|
|
1483
|
-
}
|
|
1484
|
-
}
|
|
1485
|
-
class Ge {
|
|
1486
|
-
/**
|
|
1487
|
-
@internal
|
|
1488
|
-
*/
|
|
1489
|
-
constructor(e) {
|
|
1490
|
-
this.map = e;
|
|
1491
|
-
}
|
|
1492
|
-
/**
|
|
1493
|
-
Create a [state effect](https://codemirror.net/6/docs/ref/#state.StateEffect) instance of this
|
|
1494
|
-
type.
|
|
1495
|
-
*/
|
|
1496
|
-
of(e) {
|
|
1497
|
-
return new I(this, e);
|
|
1498
|
-
}
|
|
1499
|
-
}
|
|
1500
|
-
class I {
|
|
1501
|
-
/**
|
|
1502
|
-
@internal
|
|
1503
|
-
*/
|
|
1504
|
-
constructor(e, t) {
|
|
1505
|
-
this.type = e, this.value = t;
|
|
1506
|
-
}
|
|
1507
|
-
/**
|
|
1508
|
-
Map this effect through a position mapping. Will return
|
|
1509
|
-
`undefined` when that ends up deleting the effect.
|
|
1510
|
-
*/
|
|
1511
|
-
map(e) {
|
|
1512
|
-
let t = this.type.map(this.value, e);
|
|
1513
|
-
return t === void 0 ? void 0 : t == this.value ? this : new I(this.type, t);
|
|
1514
|
-
}
|
|
1515
|
-
/**
|
|
1516
|
-
Tells you whether this effect object is of a given
|
|
1517
|
-
[type](https://codemirror.net/6/docs/ref/#state.StateEffectType).
|
|
1518
|
-
*/
|
|
1519
|
-
is(e) {
|
|
1520
|
-
return this.type == e;
|
|
1521
|
-
}
|
|
1522
|
-
/**
|
|
1523
|
-
Define a new effect type. The type parameter indicates the type
|
|
1524
|
-
of values that his effect holds. It should be a type that
|
|
1525
|
-
doesn't include `undefined`, since that is used in
|
|
1526
|
-
[mapping](https://codemirror.net/6/docs/ref/#state.StateEffect.map) to indicate that an effect is
|
|
1527
|
-
removed.
|
|
1528
|
-
*/
|
|
1529
|
-
static define(e = {}) {
|
|
1530
|
-
return new Ge(e.map || ((t) => t));
|
|
1531
|
-
}
|
|
1532
|
-
/**
|
|
1533
|
-
Map an array of effects through a change set.
|
|
1534
|
-
*/
|
|
1535
|
-
static mapEffects(e, t) {
|
|
1536
|
-
if (!e.length)
|
|
1537
|
-
return e;
|
|
1538
|
-
let n = [];
|
|
1539
|
-
for (let i of e) {
|
|
1540
|
-
let s = i.map(t);
|
|
1541
|
-
s && n.push(s);
|
|
1542
|
-
}
|
|
1543
|
-
return n;
|
|
1544
|
-
}
|
|
1545
|
-
}
|
|
1546
|
-
I.reconfigure = /* @__PURE__ */ I.define();
|
|
1547
|
-
I.appendConfig = /* @__PURE__ */ I.define();
|
|
1548
|
-
class P {
|
|
1549
|
-
constructor(e, t, n, i, s, r) {
|
|
1550
|
-
this.startState = e, this.changes = t, this.selection = n, this.effects = i, this.annotations = s, this.scrollIntoView = r, this._doc = null, this._state = null, n && Ee(n, t.newLength), s.some((h) => h.type == P.time) || (this.annotations = s.concat(P.time.of(Date.now())));
|
|
1551
|
-
}
|
|
1552
|
-
/**
|
|
1553
|
-
@internal
|
|
1554
|
-
*/
|
|
1555
|
-
static create(e, t, n, i, s, r) {
|
|
1556
|
-
return new P(e, t, n, i, s, r);
|
|
1557
|
-
}
|
|
1558
|
-
/**
|
|
1559
|
-
The new document produced by the transaction. Contrary to
|
|
1560
|
-
[`.state`](https://codemirror.net/6/docs/ref/#state.Transaction.state)`.doc`, accessing this won't
|
|
1561
|
-
force the entire new state to be computed right away, so it is
|
|
1562
|
-
recommended that [transaction
|
|
1563
|
-
filters](https://codemirror.net/6/docs/ref/#state.EditorState^transactionFilter) use this getter
|
|
1564
|
-
when they need to look at the new document.
|
|
1565
|
-
*/
|
|
1566
|
-
get newDoc() {
|
|
1567
|
-
return this._doc || (this._doc = this.changes.apply(this.startState.doc));
|
|
1568
|
-
}
|
|
1569
|
-
/**
|
|
1570
|
-
The new selection produced by the transaction. If
|
|
1571
|
-
[`this.selection`](https://codemirror.net/6/docs/ref/#state.Transaction.selection) is undefined,
|
|
1572
|
-
this will [map](https://codemirror.net/6/docs/ref/#state.EditorSelection.map) the start state's
|
|
1573
|
-
current selection through the changes made by the transaction.
|
|
1574
|
-
*/
|
|
1575
|
-
get newSelection() {
|
|
1576
|
-
return this.selection || this.startState.selection.map(this.changes);
|
|
1577
|
-
}
|
|
1578
|
-
/**
|
|
1579
|
-
The new state created by the transaction. Computed on demand
|
|
1580
|
-
(but retained for subsequent access), so it is recommended not to
|
|
1581
|
-
access it in [transaction
|
|
1582
|
-
filters](https://codemirror.net/6/docs/ref/#state.EditorState^transactionFilter) when possible.
|
|
1583
|
-
*/
|
|
1584
|
-
get state() {
|
|
1585
|
-
return this._state || this.startState.applyTransaction(this), this._state;
|
|
1586
|
-
}
|
|
1587
|
-
/**
|
|
1588
|
-
Get the value of the given annotation type, if any.
|
|
1589
|
-
*/
|
|
1590
|
-
annotation(e) {
|
|
1591
|
-
for (let t of this.annotations)
|
|
1592
|
-
if (t.type == e)
|
|
1593
|
-
return t.value;
|
|
1594
|
-
}
|
|
1595
|
-
/**
|
|
1596
|
-
Indicates whether the transaction changed the document.
|
|
1597
|
-
*/
|
|
1598
|
-
get docChanged() {
|
|
1599
|
-
return !this.changes.empty;
|
|
1600
|
-
}
|
|
1601
|
-
/**
|
|
1602
|
-
Indicates whether this transaction reconfigures the state
|
|
1603
|
-
(through a [configuration compartment](https://codemirror.net/6/docs/ref/#state.Compartment) or
|
|
1604
|
-
with a top-level configuration
|
|
1605
|
-
[effect](https://codemirror.net/6/docs/ref/#state.StateEffect^reconfigure).
|
|
1606
|
-
*/
|
|
1607
|
-
get reconfigured() {
|
|
1608
|
-
return this.startState.config != this.state.config;
|
|
1609
|
-
}
|
|
1610
|
-
/**
|
|
1611
|
-
Returns true if the transaction has a [user
|
|
1612
|
-
event](https://codemirror.net/6/docs/ref/#state.Transaction^userEvent) annotation that is equal to
|
|
1613
|
-
or more specific than `event`. For example, if the transaction
|
|
1614
|
-
has `"select.pointer"` as user event, `"select"` and
|
|
1615
|
-
`"select.pointer"` will match it.
|
|
1616
|
-
*/
|
|
1617
|
-
isUserEvent(e) {
|
|
1618
|
-
let t = this.annotation(P.userEvent);
|
|
1619
|
-
return !!(t && (t == e || t.length > e.length && t.slice(0, e.length) == e && t[e.length] == "."));
|
|
1620
|
-
}
|
|
1621
|
-
}
|
|
1622
|
-
P.time = /* @__PURE__ */ U.define();
|
|
1623
|
-
P.userEvent = /* @__PURE__ */ U.define();
|
|
1624
|
-
P.addToHistory = /* @__PURE__ */ U.define();
|
|
1625
|
-
P.remote = /* @__PURE__ */ U.define();
|
|
1626
|
-
function He(l, e) {
|
|
1627
|
-
let t = [];
|
|
1628
|
-
for (let n = 0, i = 0; ; ) {
|
|
1629
|
-
let s, r;
|
|
1630
|
-
if (n < l.length && (i == e.length || e[i] >= l[n]))
|
|
1631
|
-
s = l[n++], r = l[n++];
|
|
1632
|
-
else if (i < e.length)
|
|
1633
|
-
s = e[i++], r = e[i++];
|
|
1634
|
-
else
|
|
1635
|
-
return t;
|
|
1636
|
-
!t.length || t[t.length - 1] < s ? t.push(s, r) : t[t.length - 1] < r && (t[t.length - 1] = r);
|
|
1637
|
-
}
|
|
1638
|
-
}
|
|
1639
|
-
function Fe(l, e, t) {
|
|
1640
|
-
var n;
|
|
1641
|
-
let i, s, r;
|
|
1642
|
-
return t ? (i = e.changes, s = y.empty(e.changes.length), r = l.changes.compose(e.changes)) : (i = e.changes.map(l.changes), s = l.changes.mapDesc(e.changes, !0), r = l.changes.compose(i)), {
|
|
1643
|
-
changes: r,
|
|
1644
|
-
selection: e.selection ? e.selection.map(s) : (n = l.selection) === null || n === void 0 ? void 0 : n.map(i),
|
|
1645
|
-
effects: I.mapEffects(l.effects, i).concat(I.mapEffects(e.effects, s)),
|
|
1646
|
-
annotations: l.annotations.length ? l.annotations.concat(e.annotations) : e.annotations,
|
|
1647
|
-
scrollIntoView: l.scrollIntoView || e.scrollIntoView
|
|
1648
|
-
};
|
|
1649
|
-
}
|
|
1650
|
-
function ue(l, e, t) {
|
|
1651
|
-
let n = e.selection, i = F(e.annotations);
|
|
1652
|
-
return e.userEvent && (i = i.concat(P.userEvent.of(e.userEvent))), {
|
|
1653
|
-
changes: e.changes instanceof y ? e.changes : y.of(e.changes || [], t, l.facet(Me)),
|
|
1654
|
-
selection: n && (n instanceof p ? n : p.single(n.anchor, n.head)),
|
|
1655
|
-
effects: F(e.effects),
|
|
1656
|
-
annotations: i,
|
|
1657
|
-
scrollIntoView: !!e.scrollIntoView
|
|
1658
|
-
};
|
|
1659
|
-
}
|
|
1660
|
-
function Je(l, e, t) {
|
|
1661
|
-
let n = ue(l, e.length ? e[0] : {}, l.doc.length);
|
|
1662
|
-
e.length && e[0].filter === !1 && (t = !1);
|
|
1663
|
-
for (let s = 1; s < e.length; s++) {
|
|
1664
|
-
e[s].filter === !1 && (t = !1);
|
|
1665
|
-
let r = !!e[s].sequential;
|
|
1666
|
-
n = Fe(n, ue(l, e[s], r ? n.changes.newLength : l.doc.length), r);
|
|
1667
|
-
}
|
|
1668
|
-
let i = P.create(l, n.changes, n.selection, n.effects, n.annotations, n.scrollIntoView);
|
|
1669
|
-
return Qe(t ? Ke(i) : i);
|
|
1670
|
-
}
|
|
1671
|
-
function Ke(l) {
|
|
1672
|
-
let e = l.startState, t = !0;
|
|
1673
|
-
for (let i of e.facet(be)) {
|
|
1674
|
-
let s = i(l);
|
|
1675
|
-
if (s === !1) {
|
|
1676
|
-
t = !1;
|
|
1677
|
-
break;
|
|
1678
|
-
}
|
|
1679
|
-
Array.isArray(s) && (t = t === !0 ? s : He(t, s));
|
|
1680
|
-
}
|
|
1681
|
-
if (t !== !0) {
|
|
1682
|
-
let i, s;
|
|
1683
|
-
if (t === !1)
|
|
1684
|
-
s = l.changes.invertedDesc, i = y.empty(e.doc.length);
|
|
1685
|
-
else {
|
|
1686
|
-
let r = l.changes.filter(t);
|
|
1687
|
-
i = r.changes, s = r.filtered.mapDesc(r.changes).invertedDesc;
|
|
1688
|
-
}
|
|
1689
|
-
l = P.create(e, i, l.selection && l.selection.map(s), I.mapEffects(l.effects, s), l.annotations, l.scrollIntoView);
|
|
1690
|
-
}
|
|
1691
|
-
let n = e.facet(Re);
|
|
1692
|
-
for (let i = n.length - 1; i >= 0; i--) {
|
|
1693
|
-
let s = n[i](l);
|
|
1694
|
-
s instanceof P ? l = s : Array.isArray(s) && s.length == 1 && s[0] instanceof P ? l = s[0] : l = Je(e, F(s), !1);
|
|
1695
|
-
}
|
|
1696
|
-
return l;
|
|
1697
|
-
}
|
|
1698
|
-
function Qe(l) {
|
|
1699
|
-
let e = l.startState, t = e.facet(Te), n = l;
|
|
1700
|
-
for (let i = t.length - 1; i >= 0; i--) {
|
|
1701
|
-
let s = t[i](l);
|
|
1702
|
-
s && Object.keys(s).length && (n = Fe(n, ue(e, s, l.changes.newLength), !0));
|
|
1703
|
-
}
|
|
1704
|
-
return n == l ? l : P.create(e, l.changes, l.selection, n.effects, n.annotations, n.scrollIntoView);
|
|
1705
|
-
}
|
|
1706
|
-
const Xe = [];
|
|
1707
|
-
function F(l) {
|
|
1708
|
-
return l == null ? Xe : Array.isArray(l) ? l : [l];
|
|
1709
|
-
}
|
|
1710
|
-
var R = /* @__PURE__ */ (function(l) {
|
|
1711
|
-
return l[l.Word = 0] = "Word", l[l.Space = 1] = "Space", l[l.Other = 2] = "Other", l;
|
|
1712
|
-
})(R || (R = {}));
|
|
1713
|
-
const Ye = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;
|
|
1714
|
-
let fe;
|
|
1715
|
-
try {
|
|
1716
|
-
fe = /* @__PURE__ */ new RegExp("[\\p{Alphabetic}\\p{Number}_]", "u");
|
|
1717
|
-
} catch {
|
|
1718
|
-
}
|
|
1719
|
-
function Ze(l) {
|
|
1720
|
-
if (fe)
|
|
1721
|
-
return fe.test(l);
|
|
1722
|
-
for (let e = 0; e < l.length; e++) {
|
|
1723
|
-
let t = l[e];
|
|
1724
|
-
if (/\w/.test(t) || t > "" && (t.toUpperCase() != t.toLowerCase() || Ye.test(t)))
|
|
1725
|
-
return !0;
|
|
1726
|
-
}
|
|
1727
|
-
return !1;
|
|
1728
|
-
}
|
|
1729
|
-
function je(l) {
|
|
1730
|
-
return (e) => {
|
|
1731
|
-
if (!/\S/.test(e))
|
|
1732
|
-
return R.Space;
|
|
1733
|
-
if (Ze(e))
|
|
1734
|
-
return R.Word;
|
|
1735
|
-
for (let t = 0; t < l.length; t++)
|
|
1736
|
-
if (e.indexOf(l[t]) > -1)
|
|
1737
|
-
return R.Word;
|
|
1738
|
-
return R.Other;
|
|
1739
|
-
};
|
|
1740
|
-
}
|
|
1741
|
-
class w {
|
|
1742
|
-
constructor(e, t, n, i, s, r) {
|
|
1743
|
-
this.config = e, this.doc = t, this.selection = n, this.values = i, this.status = e.statusTemplate.slice(), this.computeSlot = s, r && (r._state = this);
|
|
1744
|
-
for (let h = 0; h < this.config.dynamicSlots.length; h++)
|
|
1745
|
-
$(this, h << 1);
|
|
1746
|
-
this.computeSlot = null;
|
|
1747
|
-
}
|
|
1748
|
-
field(e, t = !0) {
|
|
1749
|
-
let n = this.config.address[e.id];
|
|
1750
|
-
if (n == null) {
|
|
1751
|
-
if (t)
|
|
1752
|
-
throw new RangeError("Field is not present in this state");
|
|
1753
|
-
return;
|
|
1754
|
-
}
|
|
1755
|
-
return $(this, n), j(this, n);
|
|
1756
|
-
}
|
|
1757
|
-
/**
|
|
1758
|
-
Create a [transaction](https://codemirror.net/6/docs/ref/#state.Transaction) that updates this
|
|
1759
|
-
state. Any number of [transaction specs](https://codemirror.net/6/docs/ref/#state.TransactionSpec)
|
|
1760
|
-
can be passed. Unless
|
|
1761
|
-
[`sequential`](https://codemirror.net/6/docs/ref/#state.TransactionSpec.sequential) is set, the
|
|
1762
|
-
[changes](https://codemirror.net/6/docs/ref/#state.TransactionSpec.changes) (if any) of each spec
|
|
1763
|
-
are assumed to start in the _current_ document (not the document
|
|
1764
|
-
produced by previous specs), and its
|
|
1765
|
-
[selection](https://codemirror.net/6/docs/ref/#state.TransactionSpec.selection) and
|
|
1766
|
-
[effects](https://codemirror.net/6/docs/ref/#state.TransactionSpec.effects) are assumed to refer
|
|
1767
|
-
to the document created by its _own_ changes. The resulting
|
|
1768
|
-
transaction contains the combined effect of all the different
|
|
1769
|
-
specs. For [selection](https://codemirror.net/6/docs/ref/#state.TransactionSpec.selection), later
|
|
1770
|
-
specs take precedence over earlier ones.
|
|
1771
|
-
*/
|
|
1772
|
-
update(...e) {
|
|
1773
|
-
return Je(this, e, !0);
|
|
1774
|
-
}
|
|
1775
|
-
/**
|
|
1776
|
-
@internal
|
|
1777
|
-
*/
|
|
1778
|
-
applyTransaction(e) {
|
|
1779
|
-
let t = this.config, { base: n, compartments: i } = t;
|
|
1780
|
-
for (let h of e.effects)
|
|
1781
|
-
h.is(te.reconfigure) ? (t && (i = /* @__PURE__ */ new Map(), t.compartments.forEach((o, a) => i.set(a, o)), t = null), i.set(h.value.compartment, h.value.extension)) : h.is(I.reconfigure) ? (t = null, n = h.value) : h.is(I.appendConfig) && (t = null, n = F(n).concat(h.value));
|
|
1782
|
-
let s;
|
|
1783
|
-
t ? s = e.startState.values.slice() : (t = Z.resolve(n, i, this), s = new w(t, this.doc, this.selection, t.dynamicSlots.map(() => null), (o, a) => a.reconfigure(o, this), null).values);
|
|
1784
|
-
let r = e.startState.facet(ae) ? e.newSelection : e.newSelection.asSingle();
|
|
1785
|
-
new w(t, e.newDoc, r, s, (h, o) => o.update(h, e), e);
|
|
1786
|
-
}
|
|
1787
|
-
/**
|
|
1788
|
-
Create a [transaction spec](https://codemirror.net/6/docs/ref/#state.TransactionSpec) that
|
|
1789
|
-
replaces every selection range with the given content.
|
|
1790
|
-
*/
|
|
1791
|
-
replaceSelection(e) {
|
|
1792
|
-
return typeof e == "string" && (e = this.toText(e)), this.changeByRange((t) => ({
|
|
1793
|
-
changes: { from: t.from, to: t.to, insert: e },
|
|
1794
|
-
range: p.cursor(t.from + e.length)
|
|
1795
|
-
}));
|
|
1796
|
-
}
|
|
1797
|
-
/**
|
|
1798
|
-
Create a set of changes and a new selection by running the given
|
|
1799
|
-
function for each range in the active selection. The function
|
|
1800
|
-
can return an optional set of changes (in the coordinate space
|
|
1801
|
-
of the start document), plus an updated range (in the coordinate
|
|
1802
|
-
space of the document produced by the call's own changes). This
|
|
1803
|
-
method will merge all the changes and ranges into a single
|
|
1804
|
-
changeset and selection, and return it as a [transaction
|
|
1805
|
-
spec](https://codemirror.net/6/docs/ref/#state.TransactionSpec), which can be passed to
|
|
1806
|
-
[`update`](https://codemirror.net/6/docs/ref/#state.EditorState.update).
|
|
1807
|
-
*/
|
|
1808
|
-
changeByRange(e) {
|
|
1809
|
-
let t = this.selection, n = e(t.ranges[0]), i = this.changes(n.changes), s = [n.range], r = F(n.effects);
|
|
1810
|
-
for (let h = 1; h < t.ranges.length; h++) {
|
|
1811
|
-
let o = e(t.ranges[h]), a = this.changes(o.changes), u = a.map(i);
|
|
1812
|
-
for (let d = 0; d < h; d++)
|
|
1813
|
-
s[d] = s[d].map(u);
|
|
1814
|
-
let f = i.mapDesc(a, !0);
|
|
1815
|
-
s.push(o.range.map(f)), i = i.compose(u), r = I.mapEffects(r, u).concat(I.mapEffects(F(o.effects), f));
|
|
1816
|
-
}
|
|
1817
|
-
return {
|
|
1818
|
-
changes: i,
|
|
1819
|
-
selection: p.create(s, t.mainIndex),
|
|
1820
|
-
effects: r
|
|
1821
|
-
};
|
|
1822
|
-
}
|
|
1823
|
-
/**
|
|
1824
|
-
Create a [change set](https://codemirror.net/6/docs/ref/#state.ChangeSet) from the given change
|
|
1825
|
-
description, taking the state's document length and line
|
|
1826
|
-
separator into account.
|
|
1827
|
-
*/
|
|
1828
|
-
changes(e = []) {
|
|
1829
|
-
return e instanceof y ? e : y.of(e, this.doc.length, this.facet(w.lineSeparator));
|
|
1830
|
-
}
|
|
1831
|
-
/**
|
|
1832
|
-
Using the state's [line
|
|
1833
|
-
separator](https://codemirror.net/6/docs/ref/#state.EditorState^lineSeparator), create a
|
|
1834
|
-
[`Text`](https://codemirror.net/6/docs/ref/#state.Text) instance from the given string.
|
|
1835
|
-
*/
|
|
1836
|
-
toText(e) {
|
|
1837
|
-
return x.of(e.split(this.facet(w.lineSeparator) || se));
|
|
1838
|
-
}
|
|
1839
|
-
/**
|
|
1840
|
-
Return the given range of the document as a string.
|
|
1841
|
-
*/
|
|
1842
|
-
sliceDoc(e = 0, t = this.doc.length) {
|
|
1843
|
-
return this.doc.sliceString(e, t, this.lineBreak);
|
|
1844
|
-
}
|
|
1845
|
-
/**
|
|
1846
|
-
Get the value of a state [facet](https://codemirror.net/6/docs/ref/#state.Facet).
|
|
1847
|
-
*/
|
|
1848
|
-
facet(e) {
|
|
1849
|
-
let t = this.config.address[e.id];
|
|
1850
|
-
return t == null ? e.default : ($(this, t), j(this, t));
|
|
1851
|
-
}
|
|
1852
|
-
/**
|
|
1853
|
-
Convert this state to a JSON-serializable object. When custom
|
|
1854
|
-
fields should be serialized, you can pass them in as an object
|
|
1855
|
-
mapping property names (in the resulting object, which should
|
|
1856
|
-
not use `doc` or `selection`) to fields.
|
|
1857
|
-
*/
|
|
1858
|
-
toJSON(e) {
|
|
1859
|
-
let t = {
|
|
1860
|
-
doc: this.sliceDoc(),
|
|
1861
|
-
selection: this.selection.toJSON()
|
|
1862
|
-
};
|
|
1863
|
-
if (e)
|
|
1864
|
-
for (let n in e) {
|
|
1865
|
-
let i = e[n];
|
|
1866
|
-
i instanceof L && this.config.address[i.id] != null && (t[n] = i.spec.toJSON(this.field(e[n]), this));
|
|
1867
|
-
}
|
|
1868
|
-
return t;
|
|
1869
|
-
}
|
|
1870
|
-
/**
|
|
1871
|
-
Deserialize a state from its JSON representation. When custom
|
|
1872
|
-
fields should be deserialized, pass the same object you passed
|
|
1873
|
-
to [`toJSON`](https://codemirror.net/6/docs/ref/#state.EditorState.toJSON) when serializing as
|
|
1874
|
-
third argument.
|
|
1875
|
-
*/
|
|
1876
|
-
static fromJSON(e, t = {}, n) {
|
|
1877
|
-
if (!e || typeof e.doc != "string")
|
|
1878
|
-
throw new RangeError("Invalid JSON representation for EditorState");
|
|
1879
|
-
let i = [];
|
|
1880
|
-
if (n) {
|
|
1881
|
-
for (let s in n)
|
|
1882
|
-
if (Object.prototype.hasOwnProperty.call(e, s)) {
|
|
1883
|
-
let r = n[s], h = e[s];
|
|
1884
|
-
i.push(r.init((o) => r.spec.fromJSON(h, o)));
|
|
1885
|
-
}
|
|
1886
|
-
}
|
|
1887
|
-
return w.create({
|
|
1888
|
-
doc: e.doc,
|
|
1889
|
-
selection: p.fromJSON(e.selection),
|
|
1890
|
-
extensions: t.extensions ? i.concat([t.extensions]) : i
|
|
1891
|
-
});
|
|
1892
|
-
}
|
|
1893
|
-
/**
|
|
1894
|
-
Create a new state. You'll usually only need this when
|
|
1895
|
-
initializing an editor—updated states are created by applying
|
|
1896
|
-
transactions.
|
|
1897
|
-
*/
|
|
1898
|
-
static create(e = {}) {
|
|
1899
|
-
let t = Z.resolve(e.extensions || [], /* @__PURE__ */ new Map()), n = e.doc instanceof x ? e.doc : x.of((e.doc || "").split(t.staticFacet(w.lineSeparator) || se)), i = e.selection ? e.selection instanceof p ? e.selection : p.single(e.selection.anchor, e.selection.head) : p.single(0);
|
|
1900
|
-
return Ee(i, n.length), t.staticFacet(ae) || (i = i.asSingle()), new w(t, n, i, t.dynamicSlots.map(() => null), (s, r) => r.create(s), null);
|
|
1901
|
-
}
|
|
1902
|
-
/**
|
|
1903
|
-
The size (in columns) of a tab in the document, determined by
|
|
1904
|
-
the [`tabSize`](https://codemirror.net/6/docs/ref/#state.EditorState^tabSize) facet.
|
|
1905
|
-
*/
|
|
1906
|
-
get tabSize() {
|
|
1907
|
-
return this.facet(w.tabSize);
|
|
1908
|
-
}
|
|
1909
|
-
/**
|
|
1910
|
-
Get the proper [line-break](https://codemirror.net/6/docs/ref/#state.EditorState^lineSeparator)
|
|
1911
|
-
string for this state.
|
|
1912
|
-
*/
|
|
1913
|
-
get lineBreak() {
|
|
1914
|
-
return this.facet(w.lineSeparator) || `
|
|
1915
|
-
`;
|
|
1916
|
-
}
|
|
1917
|
-
/**
|
|
1918
|
-
Returns true when the editor is
|
|
1919
|
-
[configured](https://codemirror.net/6/docs/ref/#state.EditorState^readOnly) to be read-only.
|
|
1920
|
-
*/
|
|
1921
|
-
get readOnly() {
|
|
1922
|
-
return this.facet(Be);
|
|
1923
|
-
}
|
|
1924
|
-
/**
|
|
1925
|
-
Look up a translation for the given phrase (via the
|
|
1926
|
-
[`phrases`](https://codemirror.net/6/docs/ref/#state.EditorState^phrases) facet), or return the
|
|
1927
|
-
original string if no translation is found.
|
|
1928
|
-
|
|
1929
|
-
If additional arguments are passed, they will be inserted in
|
|
1930
|
-
place of markers like `$1` (for the first value) and `$2`, etc.
|
|
1931
|
-
A single `$` is equivalent to `$1`, and `$$` will produce a
|
|
1932
|
-
literal dollar sign.
|
|
1933
|
-
*/
|
|
1934
|
-
phrase(e, ...t) {
|
|
1935
|
-
for (let n of this.facet(w.phrases))
|
|
1936
|
-
if (Object.prototype.hasOwnProperty.call(n, e)) {
|
|
1937
|
-
e = n[e];
|
|
1938
|
-
break;
|
|
1939
|
-
}
|
|
1940
|
-
return t.length && (e = e.replace(/\$(\$|\d*)/g, (n, i) => {
|
|
1941
|
-
if (i == "$")
|
|
1942
|
-
return "$";
|
|
1943
|
-
let s = +(i || 1);
|
|
1944
|
-
return !s || s > t.length ? n : t[s - 1];
|
|
1945
|
-
})), e;
|
|
1946
|
-
}
|
|
1947
|
-
/**
|
|
1948
|
-
Find the values for a given language data field, provided by the
|
|
1949
|
-
the [`languageData`](https://codemirror.net/6/docs/ref/#state.EditorState^languageData) facet.
|
|
1950
|
-
|
|
1951
|
-
Examples of language data fields are...
|
|
1952
|
-
|
|
1953
|
-
- [`"commentTokens"`](https://codemirror.net/6/docs/ref/#commands.CommentTokens) for specifying
|
|
1954
|
-
comment syntax.
|
|
1955
|
-
- [`"autocomplete"`](https://codemirror.net/6/docs/ref/#autocomplete.autocompletion^config.override)
|
|
1956
|
-
for providing language-specific completion sources.
|
|
1957
|
-
- [`"wordChars"`](https://codemirror.net/6/docs/ref/#state.EditorState.charCategorizer) for adding
|
|
1958
|
-
characters that should be considered part of words in this
|
|
1959
|
-
language.
|
|
1960
|
-
- [`"closeBrackets"`](https://codemirror.net/6/docs/ref/#autocomplete.CloseBracketConfig) controls
|
|
1961
|
-
bracket closing behavior.
|
|
1962
|
-
*/
|
|
1963
|
-
languageDataAt(e, t, n = -1) {
|
|
1964
|
-
let i = [];
|
|
1965
|
-
for (let s of this.facet(Ce))
|
|
1966
|
-
for (let r of s(this, t, n))
|
|
1967
|
-
Object.prototype.hasOwnProperty.call(r, e) && i.push(r[e]);
|
|
1968
|
-
return i;
|
|
1969
|
-
}
|
|
1970
|
-
/**
|
|
1971
|
-
Return a function that can categorize strings (expected to
|
|
1972
|
-
represent a single [grapheme cluster](https://codemirror.net/6/docs/ref/#state.findClusterBreak))
|
|
1973
|
-
into one of:
|
|
1974
|
-
|
|
1975
|
-
- Word (contains an alphanumeric character or a character
|
|
1976
|
-
explicitly listed in the local language's `"wordChars"`
|
|
1977
|
-
language data, which should be a string)
|
|
1978
|
-
- Space (contains only whitespace)
|
|
1979
|
-
- Other (anything else)
|
|
1980
|
-
*/
|
|
1981
|
-
charCategorizer(e) {
|
|
1982
|
-
let t = this.languageDataAt("wordChars", e);
|
|
1983
|
-
return je(t.length ? t[0] : "");
|
|
1984
|
-
}
|
|
1985
|
-
/**
|
|
1986
|
-
Find the word at the given position, meaning the range
|
|
1987
|
-
containing all [word](https://codemirror.net/6/docs/ref/#state.CharCategory.Word) characters
|
|
1988
|
-
around it. If no word characters are adjacent to the position,
|
|
1989
|
-
this returns null.
|
|
1990
|
-
*/
|
|
1991
|
-
wordAt(e) {
|
|
1992
|
-
let { text: t, from: n, length: i } = this.doc.lineAt(e), s = this.charCategorizer(e), r = e - n, h = e - n;
|
|
1993
|
-
for (; r > 0; ) {
|
|
1994
|
-
let o = Y(t, r, !1);
|
|
1995
|
-
if (s(t.slice(o, r)) != R.Word)
|
|
1996
|
-
break;
|
|
1997
|
-
r = o;
|
|
1998
|
-
}
|
|
1999
|
-
for (; h < i; ) {
|
|
2000
|
-
let o = Y(t, h);
|
|
2001
|
-
if (s(t.slice(h, o)) != R.Word)
|
|
2002
|
-
break;
|
|
2003
|
-
h = o;
|
|
2004
|
-
}
|
|
2005
|
-
return r == h ? null : p.range(r + n, h + n);
|
|
2006
|
-
}
|
|
2007
|
-
}
|
|
2008
|
-
w.allowMultipleSelections = ae;
|
|
2009
|
-
w.tabSize = /* @__PURE__ */ A.define({
|
|
2010
|
-
combine: (l) => l.length ? l[0] : 4
|
|
2011
|
-
});
|
|
2012
|
-
w.lineSeparator = Me;
|
|
2013
|
-
w.readOnly = Be;
|
|
2014
|
-
w.phrases = /* @__PURE__ */ A.define({
|
|
2015
|
-
compare(l, e) {
|
|
2016
|
-
let t = Object.keys(l), n = Object.keys(e);
|
|
2017
|
-
return t.length == n.length && t.every((i) => l[i] == e[i]);
|
|
2018
|
-
}
|
|
2019
|
-
});
|
|
2020
|
-
w.languageData = Ce;
|
|
2021
|
-
w.changeFilter = be;
|
|
2022
|
-
w.transactionFilter = Re;
|
|
2023
|
-
w.transactionExtender = Te;
|
|
2024
|
-
te.reconfigure = /* @__PURE__ */ I.define();
|
|
2025
|
-
function rt(l, e, t = {}) {
|
|
2026
|
-
let n = {};
|
|
2027
|
-
for (let i of l)
|
|
2028
|
-
for (let s of Object.keys(i)) {
|
|
2029
|
-
let r = i[s], h = n[s];
|
|
2030
|
-
if (h === void 0)
|
|
2031
|
-
n[s] = r;
|
|
2032
|
-
else if (!(h === r || r === void 0)) if (Object.hasOwnProperty.call(t, s))
|
|
2033
|
-
n[s] = t[s](h, r);
|
|
2034
|
-
else
|
|
2035
|
-
throw new Error("Config merge conflict for field " + s);
|
|
2036
|
-
}
|
|
2037
|
-
for (let i in e)
|
|
2038
|
-
n[i] === void 0 && (n[i] = e[i]);
|
|
2039
|
-
return n;
|
|
2040
|
-
}
|
|
2041
|
-
class _ {
|
|
2042
|
-
/**
|
|
2043
|
-
Compare this value with another value. Used when comparing
|
|
2044
|
-
rangesets. The default implementation compares by identity.
|
|
2045
|
-
Unless you are only creating a fixed number of unique instances
|
|
2046
|
-
of your value type, it is a good idea to implement this
|
|
2047
|
-
properly.
|
|
2048
|
-
*/
|
|
2049
|
-
eq(e) {
|
|
2050
|
-
return this == e;
|
|
2051
|
-
}
|
|
2052
|
-
/**
|
|
2053
|
-
Create a [range](https://codemirror.net/6/docs/ref/#state.Range) with this value.
|
|
2054
|
-
*/
|
|
2055
|
-
range(e, t = e) {
|
|
2056
|
-
return q.create(e, t, this);
|
|
2057
|
-
}
|
|
2058
|
-
}
|
|
2059
|
-
_.prototype.startSide = _.prototype.endSide = 0;
|
|
2060
|
-
_.prototype.point = !1;
|
|
2061
|
-
_.prototype.mapMode = M.TrackDel;
|
|
2062
|
-
function me(l, e) {
|
|
2063
|
-
return l == e || l.constructor == e.constructor && l.eq(e);
|
|
2064
|
-
}
|
|
2065
|
-
class q {
|
|
2066
|
-
constructor(e, t, n) {
|
|
2067
|
-
this.from = e, this.to = t, this.value = n;
|
|
2068
|
-
}
|
|
2069
|
-
/**
|
|
2070
|
-
@internal
|
|
2071
|
-
*/
|
|
2072
|
-
static create(e, t, n) {
|
|
2073
|
-
return new q(e, t, n);
|
|
2074
|
-
}
|
|
2075
|
-
}
|
|
2076
|
-
function ce(l, e) {
|
|
2077
|
-
return l.from - e.from || l.value.startSide - e.value.startSide;
|
|
2078
|
-
}
|
|
2079
|
-
class we {
|
|
2080
|
-
constructor(e, t, n, i) {
|
|
2081
|
-
this.from = e, this.to = t, this.value = n, this.maxPoint = i;
|
|
2082
|
-
}
|
|
2083
|
-
get length() {
|
|
2084
|
-
return this.to[this.to.length - 1];
|
|
2085
|
-
}
|
|
2086
|
-
// Find the index of the given position and side. Use the ranges'
|
|
2087
|
-
// `from` pos when `end == false`, `to` when `end == true`.
|
|
2088
|
-
findIndex(e, t, n, i = 0) {
|
|
2089
|
-
let s = n ? this.to : this.from;
|
|
2090
|
-
for (let r = i, h = s.length; ; ) {
|
|
2091
|
-
if (r == h)
|
|
2092
|
-
return r;
|
|
2093
|
-
let o = r + h >> 1, a = s[o] - e || (n ? this.value[o].endSide : this.value[o].startSide) - t;
|
|
2094
|
-
if (o == r)
|
|
2095
|
-
return a >= 0 ? r : h;
|
|
2096
|
-
a >= 0 ? h = o : r = o + 1;
|
|
2097
|
-
}
|
|
2098
|
-
}
|
|
2099
|
-
between(e, t, n, i) {
|
|
2100
|
-
for (let s = this.findIndex(t, -1e9, !0), r = this.findIndex(n, 1e9, !1, s); s < r; s++)
|
|
2101
|
-
if (i(this.from[s] + e, this.to[s] + e, this.value[s]) === !1)
|
|
2102
|
-
return !1;
|
|
2103
|
-
}
|
|
2104
|
-
map(e, t) {
|
|
2105
|
-
let n = [], i = [], s = [], r = -1, h = -1;
|
|
2106
|
-
for (let o = 0; o < this.value.length; o++) {
|
|
2107
|
-
let a = this.value[o], u = this.from[o] + e, f = this.to[o] + e, d, c;
|
|
2108
|
-
if (u == f) {
|
|
2109
|
-
let g = t.mapPos(u, a.startSide, a.mapMode);
|
|
2110
|
-
if (g == null || (d = c = g, a.startSide != a.endSide && (c = t.mapPos(u, a.endSide), c < d)))
|
|
2111
|
-
continue;
|
|
2112
|
-
} else if (d = t.mapPos(u, a.startSide), c = t.mapPos(f, a.endSide), d > c || d == c && a.startSide > 0 && a.endSide <= 0)
|
|
2113
|
-
continue;
|
|
2114
|
-
(c - d || a.endSide - a.startSide) < 0 || (r < 0 && (r = d), a.point && (h = Math.max(h, c - d)), n.push(a), i.push(d - r), s.push(c - r));
|
|
2115
|
-
}
|
|
2116
|
-
return { mapped: n.length ? new we(i, s, n, h) : null, pos: r };
|
|
2117
|
-
}
|
|
2118
|
-
}
|
|
2119
|
-
class S {
|
|
2120
|
-
constructor(e, t, n, i) {
|
|
2121
|
-
this.chunkPos = e, this.chunk = t, this.nextLayer = n, this.maxPoint = i;
|
|
2122
|
-
}
|
|
2123
|
-
/**
|
|
2124
|
-
@internal
|
|
2125
|
-
*/
|
|
2126
|
-
static create(e, t, n, i) {
|
|
2127
|
-
return new S(e, t, n, i);
|
|
2128
|
-
}
|
|
2129
|
-
/**
|
|
2130
|
-
@internal
|
|
2131
|
-
*/
|
|
2132
|
-
get length() {
|
|
2133
|
-
let e = this.chunk.length - 1;
|
|
2134
|
-
return e < 0 ? 0 : Math.max(this.chunkEnd(e), this.nextLayer.length);
|
|
2135
|
-
}
|
|
2136
|
-
/**
|
|
2137
|
-
The number of ranges in the set.
|
|
2138
|
-
*/
|
|
2139
|
-
get size() {
|
|
2140
|
-
if (this.isEmpty)
|
|
2141
|
-
return 0;
|
|
2142
|
-
let e = this.nextLayer.size;
|
|
2143
|
-
for (let t of this.chunk)
|
|
2144
|
-
e += t.value.length;
|
|
2145
|
-
return e;
|
|
2146
|
-
}
|
|
2147
|
-
/**
|
|
2148
|
-
@internal
|
|
2149
|
-
*/
|
|
2150
|
-
chunkEnd(e) {
|
|
2151
|
-
return this.chunkPos[e] + this.chunk[e].length;
|
|
2152
|
-
}
|
|
2153
|
-
/**
|
|
2154
|
-
Update the range set, optionally adding new ranges or filtering
|
|
2155
|
-
out existing ones.
|
|
2156
|
-
|
|
2157
|
-
(Note: The type parameter is just there as a kludge to work
|
|
2158
|
-
around TypeScript variance issues that prevented `RangeSet<X>`
|
|
2159
|
-
from being a subtype of `RangeSet<Y>` when `X` is a subtype of
|
|
2160
|
-
`Y`.)
|
|
2161
|
-
*/
|
|
2162
|
-
update(e) {
|
|
2163
|
-
let { add: t = [], sort: n = !1, filterFrom: i = 0, filterTo: s = this.length } = e, r = e.filter;
|
|
2164
|
-
if (t.length == 0 && !r)
|
|
2165
|
-
return this;
|
|
2166
|
-
if (n && (t = t.slice().sort(ce)), this.isEmpty)
|
|
2167
|
-
return t.length ? S.of(t) : this;
|
|
2168
|
-
let h = new Le(this, null, -1).goto(0), o = 0, a = [], u = new ee();
|
|
2169
|
-
for (; h.value || o < t.length; )
|
|
2170
|
-
if (o < t.length && (h.from - t[o].from || h.startSide - t[o].value.startSide) >= 0) {
|
|
2171
|
-
let f = t[o++];
|
|
2172
|
-
u.addInner(f.from, f.to, f.value) || a.push(f);
|
|
2173
|
-
} else h.rangeIndex == 1 && h.chunkIndex < this.chunk.length && (o == t.length || this.chunkEnd(h.chunkIndex) < t[o].from) && (!r || i > this.chunkEnd(h.chunkIndex) || s < this.chunkPos[h.chunkIndex]) && u.addChunk(this.chunkPos[h.chunkIndex], this.chunk[h.chunkIndex]) ? h.nextChunk() : ((!r || i > h.to || s < h.from || r(h.from, h.to, h.value)) && (u.addInner(h.from, h.to, h.value) || a.push(q.create(h.from, h.to, h.value))), h.next());
|
|
2174
|
-
return u.finishInner(this.nextLayer.isEmpty && !a.length ? S.empty : this.nextLayer.update({ add: a, filter: r, filterFrom: i, filterTo: s }));
|
|
2175
|
-
}
|
|
2176
|
-
/**
|
|
2177
|
-
Map this range set through a set of changes, return the new set.
|
|
2178
|
-
*/
|
|
2179
|
-
map(e) {
|
|
2180
|
-
if (e.empty || this.isEmpty)
|
|
2181
|
-
return this;
|
|
2182
|
-
let t = [], n = [], i = -1;
|
|
2183
|
-
for (let r = 0; r < this.chunk.length; r++) {
|
|
2184
|
-
let h = this.chunkPos[r], o = this.chunk[r], a = e.touchesRange(h, h + o.length);
|
|
2185
|
-
if (a === !1)
|
|
2186
|
-
i = Math.max(i, o.maxPoint), t.push(o), n.push(e.mapPos(h));
|
|
2187
|
-
else if (a === !0) {
|
|
2188
|
-
let { mapped: u, pos: f } = o.map(h, e);
|
|
2189
|
-
u && (i = Math.max(i, u.maxPoint), t.push(u), n.push(f));
|
|
2190
|
-
}
|
|
2191
|
-
}
|
|
2192
|
-
let s = this.nextLayer.map(e);
|
|
2193
|
-
return t.length == 0 ? s : new S(n, t, s || S.empty, i);
|
|
2194
|
-
}
|
|
2195
|
-
/**
|
|
2196
|
-
Iterate over the ranges that touch the region `from` to `to`,
|
|
2197
|
-
calling `f` for each. There is no guarantee that the ranges will
|
|
2198
|
-
be reported in any specific order. When the callback returns
|
|
2199
|
-
`false`, iteration stops.
|
|
2200
|
-
*/
|
|
2201
|
-
between(e, t, n) {
|
|
2202
|
-
if (!this.isEmpty) {
|
|
2203
|
-
for (let i = 0; i < this.chunk.length; i++) {
|
|
2204
|
-
let s = this.chunkPos[i], r = this.chunk[i];
|
|
2205
|
-
if (t >= s && e <= s + r.length && r.between(s, e - s, t - s, n) === !1)
|
|
2206
|
-
return;
|
|
2207
|
-
}
|
|
2208
|
-
this.nextLayer.between(e, t, n);
|
|
2209
|
-
}
|
|
2210
|
-
}
|
|
2211
|
-
/**
|
|
2212
|
-
Iterate over the ranges in this set, in order, including all
|
|
2213
|
-
ranges that end at or after `from`.
|
|
2214
|
-
*/
|
|
2215
|
-
iter(e = 0) {
|
|
2216
|
-
return W.from([this]).goto(e);
|
|
2217
|
-
}
|
|
2218
|
-
/**
|
|
2219
|
-
@internal
|
|
2220
|
-
*/
|
|
2221
|
-
get isEmpty() {
|
|
2222
|
-
return this.nextLayer == this;
|
|
2223
|
-
}
|
|
2224
|
-
/**
|
|
2225
|
-
Iterate over the ranges in a collection of sets, in order,
|
|
2226
|
-
starting from `from`.
|
|
2227
|
-
*/
|
|
2228
|
-
static iter(e, t = 0) {
|
|
2229
|
-
return W.from(e).goto(t);
|
|
2230
|
-
}
|
|
2231
|
-
/**
|
|
2232
|
-
Iterate over two groups of sets, calling methods on `comparator`
|
|
2233
|
-
to notify it of possible differences.
|
|
2234
|
-
*/
|
|
2235
|
-
static compare(e, t, n, i, s = -1) {
|
|
2236
|
-
let r = e.filter((f) => f.maxPoint > 0 || !f.isEmpty && f.maxPoint >= s), h = t.filter((f) => f.maxPoint > 0 || !f.isEmpty && f.maxPoint >= s), o = ye(r, h, n), a = new N(r, o, s), u = new N(h, o, s);
|
|
2237
|
-
n.iterGaps((f, d, c) => ke(a, f, u, d, c, i)), n.empty && n.length == 0 && ke(a, 0, u, 0, 0, i);
|
|
2238
|
-
}
|
|
2239
|
-
/**
|
|
2240
|
-
Compare the contents of two groups of range sets, returning true
|
|
2241
|
-
if they are equivalent in the given range.
|
|
2242
|
-
*/
|
|
2243
|
-
static eq(e, t, n = 0, i) {
|
|
2244
|
-
i == null && (i = 999999999);
|
|
2245
|
-
let s = e.filter((u) => !u.isEmpty && t.indexOf(u) < 0), r = t.filter((u) => !u.isEmpty && e.indexOf(u) < 0);
|
|
2246
|
-
if (s.length != r.length)
|
|
2247
|
-
return !1;
|
|
2248
|
-
if (!s.length)
|
|
2249
|
-
return !0;
|
|
2250
|
-
let h = ye(s, r), o = new N(s, h, 0).goto(n), a = new N(r, h, 0).goto(n);
|
|
2251
|
-
for (; ; ) {
|
|
2252
|
-
if (o.to != a.to || !de(o.active, a.active) || o.point && (!a.point || !me(o.point, a.point)))
|
|
2253
|
-
return !1;
|
|
2254
|
-
if (o.to > i)
|
|
2255
|
-
return !0;
|
|
2256
|
-
o.next(), a.next();
|
|
2257
|
-
}
|
|
2258
|
-
}
|
|
2259
|
-
/**
|
|
2260
|
-
Iterate over a group of range sets at the same time, notifying
|
|
2261
|
-
the iterator about the ranges covering every given piece of
|
|
2262
|
-
content. Returns the open count (see
|
|
2263
|
-
[`SpanIterator.span`](https://codemirror.net/6/docs/ref/#state.SpanIterator.span)) at the end
|
|
2264
|
-
of the iteration.
|
|
2265
|
-
*/
|
|
2266
|
-
static spans(e, t, n, i, s = -1) {
|
|
2267
|
-
let r = new N(e, null, s).goto(t), h = t, o = r.openStart;
|
|
2268
|
-
for (; ; ) {
|
|
2269
|
-
let a = Math.min(r.to, n);
|
|
2270
|
-
if (r.point) {
|
|
2271
|
-
let u = r.activeForPoint(r.to), f = r.pointFrom < t ? u.length + 1 : r.point.startSide < 0 ? u.length : Math.min(u.length, o);
|
|
2272
|
-
i.point(h, a, r.point, u, f, r.pointRank), o = Math.min(r.openEnd(a), u.length);
|
|
2273
|
-
} else a > h && (i.span(h, a, r.active, o), o = r.openEnd(a));
|
|
2274
|
-
if (r.to > n)
|
|
2275
|
-
return o + (r.point && r.to > n ? 1 : 0);
|
|
2276
|
-
h = r.to, r.next();
|
|
2277
|
-
}
|
|
2278
|
-
}
|
|
2279
|
-
/**
|
|
2280
|
-
Create a range set for the given range or array of ranges. By
|
|
2281
|
-
default, this expects the ranges to be _sorted_ (by start
|
|
2282
|
-
position and, if two start at the same position,
|
|
2283
|
-
`value.startSide`). You can pass `true` as second argument to
|
|
2284
|
-
cause the method to sort them.
|
|
2285
|
-
*/
|
|
2286
|
-
static of(e, t = !1) {
|
|
2287
|
-
let n = new ee();
|
|
2288
|
-
for (let i of e instanceof q ? [e] : t ? _e(e) : e)
|
|
2289
|
-
n.add(i.from, i.to, i.value);
|
|
2290
|
-
return n.finish();
|
|
2291
|
-
}
|
|
2292
|
-
/**
|
|
2293
|
-
Join an array of range sets into a single set.
|
|
2294
|
-
*/
|
|
2295
|
-
static join(e) {
|
|
2296
|
-
if (!e.length)
|
|
2297
|
-
return S.empty;
|
|
2298
|
-
let t = e[e.length - 1];
|
|
2299
|
-
for (let n = e.length - 2; n >= 0; n--)
|
|
2300
|
-
for (let i = e[n]; i != S.empty; i = i.nextLayer)
|
|
2301
|
-
t = new S(i.chunkPos, i.chunk, t, Math.max(i.maxPoint, t.maxPoint));
|
|
2302
|
-
return t;
|
|
2303
|
-
}
|
|
2304
|
-
}
|
|
2305
|
-
S.empty = /* @__PURE__ */ new S([], [], null, -1);
|
|
2306
|
-
function _e(l) {
|
|
2307
|
-
if (l.length > 1)
|
|
2308
|
-
for (let e = l[0], t = 1; t < l.length; t++) {
|
|
2309
|
-
let n = l[t];
|
|
2310
|
-
if (ce(e, n) > 0)
|
|
2311
|
-
return l.slice().sort(ce);
|
|
2312
|
-
e = n;
|
|
2313
|
-
}
|
|
2314
|
-
return l;
|
|
2315
|
-
}
|
|
2316
|
-
S.empty.nextLayer = S.empty;
|
|
2317
|
-
class ee {
|
|
2318
|
-
finishChunk(e) {
|
|
2319
|
-
this.chunks.push(new we(this.from, this.to, this.value, this.maxPoint)), this.chunkPos.push(this.chunkStart), this.chunkStart = -1, this.setMaxPoint = Math.max(this.setMaxPoint, this.maxPoint), this.maxPoint = -1, e && (this.from = [], this.to = [], this.value = []);
|
|
2320
|
-
}
|
|
2321
|
-
/**
|
|
2322
|
-
Create an empty builder.
|
|
2323
|
-
*/
|
|
2324
|
-
constructor() {
|
|
2325
|
-
this.chunks = [], this.chunkPos = [], this.chunkStart = -1, this.last = null, this.lastFrom = -1e9, this.lastTo = -1e9, this.from = [], this.to = [], this.value = [], this.maxPoint = -1, this.setMaxPoint = -1, this.nextLayer = null;
|
|
2326
|
-
}
|
|
2327
|
-
/**
|
|
2328
|
-
Add a range. Ranges should be added in sorted (by `from` and
|
|
2329
|
-
`value.startSide`) order.
|
|
2330
|
-
*/
|
|
2331
|
-
add(e, t, n) {
|
|
2332
|
-
this.addInner(e, t, n) || (this.nextLayer || (this.nextLayer = new ee())).add(e, t, n);
|
|
2333
|
-
}
|
|
2334
|
-
/**
|
|
2335
|
-
@internal
|
|
2336
|
-
*/
|
|
2337
|
-
addInner(e, t, n) {
|
|
2338
|
-
let i = e - this.lastTo || n.startSide - this.last.endSide;
|
|
2339
|
-
if (i <= 0 && (e - this.lastFrom || n.startSide - this.last.startSide) < 0)
|
|
2340
|
-
throw new Error("Ranges must be added sorted by `from` position and `startSide`");
|
|
2341
|
-
return i < 0 ? !1 : (this.from.length == 250 && this.finishChunk(!0), this.chunkStart < 0 && (this.chunkStart = e), this.from.push(e - this.chunkStart), this.to.push(t - this.chunkStart), this.last = n, this.lastFrom = e, this.lastTo = t, this.value.push(n), n.point && (this.maxPoint = Math.max(this.maxPoint, t - e)), !0);
|
|
2342
|
-
}
|
|
2343
|
-
/**
|
|
2344
|
-
@internal
|
|
2345
|
-
*/
|
|
2346
|
-
addChunk(e, t) {
|
|
2347
|
-
if ((e - this.lastTo || t.value[0].startSide - this.last.endSide) < 0)
|
|
2348
|
-
return !1;
|
|
2349
|
-
this.from.length && this.finishChunk(!0), this.setMaxPoint = Math.max(this.setMaxPoint, t.maxPoint), this.chunks.push(t), this.chunkPos.push(e);
|
|
2350
|
-
let n = t.value.length - 1;
|
|
2351
|
-
return this.last = t.value[n], this.lastFrom = t.from[n] + e, this.lastTo = t.to[n] + e, !0;
|
|
2352
|
-
}
|
|
2353
|
-
/**
|
|
2354
|
-
Finish the range set. Returns the new set. The builder can't be
|
|
2355
|
-
used anymore after this has been called.
|
|
2356
|
-
*/
|
|
2357
|
-
finish() {
|
|
2358
|
-
return this.finishInner(S.empty);
|
|
2359
|
-
}
|
|
2360
|
-
/**
|
|
2361
|
-
@internal
|
|
2362
|
-
*/
|
|
2363
|
-
finishInner(e) {
|
|
2364
|
-
if (this.from.length && this.finishChunk(!1), this.chunks.length == 0)
|
|
2365
|
-
return e;
|
|
2366
|
-
let t = S.create(this.chunkPos, this.chunks, this.nextLayer ? this.nextLayer.finishInner(e) : e, this.setMaxPoint);
|
|
2367
|
-
return this.from = null, t;
|
|
2368
|
-
}
|
|
2369
|
-
}
|
|
2370
|
-
function ye(l, e, t) {
|
|
2371
|
-
let n = /* @__PURE__ */ new Map();
|
|
2372
|
-
for (let s of l)
|
|
2373
|
-
for (let r = 0; r < s.chunk.length; r++)
|
|
2374
|
-
s.chunk[r].maxPoint <= 0 && n.set(s.chunk[r], s.chunkPos[r]);
|
|
2375
|
-
let i = /* @__PURE__ */ new Set();
|
|
2376
|
-
for (let s of e)
|
|
2377
|
-
for (let r = 0; r < s.chunk.length; r++) {
|
|
2378
|
-
let h = n.get(s.chunk[r]);
|
|
2379
|
-
h != null && (t ? t.mapPos(h) : h) == s.chunkPos[r] && !t?.touchesRange(h, h + s.chunk[r].length) && i.add(s.chunk[r]);
|
|
2380
|
-
}
|
|
2381
|
-
return i;
|
|
2382
|
-
}
|
|
2383
|
-
class Le {
|
|
2384
|
-
constructor(e, t, n, i = 0) {
|
|
2385
|
-
this.layer = e, this.skip = t, this.minPoint = n, this.rank = i;
|
|
2386
|
-
}
|
|
2387
|
-
get startSide() {
|
|
2388
|
-
return this.value ? this.value.startSide : 0;
|
|
2389
|
-
}
|
|
2390
|
-
get endSide() {
|
|
2391
|
-
return this.value ? this.value.endSide : 0;
|
|
2392
|
-
}
|
|
2393
|
-
goto(e, t = -1e9) {
|
|
2394
|
-
return this.chunkIndex = this.rangeIndex = 0, this.gotoInner(e, t, !1), this;
|
|
2395
|
-
}
|
|
2396
|
-
gotoInner(e, t, n) {
|
|
2397
|
-
for (; this.chunkIndex < this.layer.chunk.length; ) {
|
|
2398
|
-
let i = this.layer.chunk[this.chunkIndex];
|
|
2399
|
-
if (!(this.skip && this.skip.has(i) || this.layer.chunkEnd(this.chunkIndex) < e || i.maxPoint < this.minPoint))
|
|
2400
|
-
break;
|
|
2401
|
-
this.chunkIndex++, n = !1;
|
|
2402
|
-
}
|
|
2403
|
-
if (this.chunkIndex < this.layer.chunk.length) {
|
|
2404
|
-
let i = this.layer.chunk[this.chunkIndex].findIndex(e - this.layer.chunkPos[this.chunkIndex], t, !0);
|
|
2405
|
-
(!n || this.rangeIndex < i) && this.setRangeIndex(i);
|
|
2406
|
-
}
|
|
2407
|
-
this.next();
|
|
2408
|
-
}
|
|
2409
|
-
forward(e, t) {
|
|
2410
|
-
(this.to - e || this.endSide - t) < 0 && this.gotoInner(e, t, !0);
|
|
2411
|
-
}
|
|
2412
|
-
next() {
|
|
2413
|
-
for (; ; )
|
|
2414
|
-
if (this.chunkIndex == this.layer.chunk.length) {
|
|
2415
|
-
this.from = this.to = 1e9, this.value = null;
|
|
2416
|
-
break;
|
|
2417
|
-
} else {
|
|
2418
|
-
let e = this.layer.chunkPos[this.chunkIndex], t = this.layer.chunk[this.chunkIndex], n = e + t.from[this.rangeIndex];
|
|
2419
|
-
if (this.from = n, this.to = e + t.to[this.rangeIndex], this.value = t.value[this.rangeIndex], this.setRangeIndex(this.rangeIndex + 1), this.minPoint < 0 || this.value.point && this.to - this.from >= this.minPoint)
|
|
2420
|
-
break;
|
|
2421
|
-
}
|
|
2422
|
-
}
|
|
2423
|
-
setRangeIndex(e) {
|
|
2424
|
-
if (e == this.layer.chunk[this.chunkIndex].value.length) {
|
|
2425
|
-
if (this.chunkIndex++, this.skip)
|
|
2426
|
-
for (; this.chunkIndex < this.layer.chunk.length && this.skip.has(this.layer.chunk[this.chunkIndex]); )
|
|
2427
|
-
this.chunkIndex++;
|
|
2428
|
-
this.rangeIndex = 0;
|
|
2429
|
-
} else
|
|
2430
|
-
this.rangeIndex = e;
|
|
2431
|
-
}
|
|
2432
|
-
nextChunk() {
|
|
2433
|
-
this.chunkIndex++, this.rangeIndex = 0, this.next();
|
|
2434
|
-
}
|
|
2435
|
-
compare(e) {
|
|
2436
|
-
return this.from - e.from || this.startSide - e.startSide || this.rank - e.rank || this.to - e.to || this.endSide - e.endSide;
|
|
2437
|
-
}
|
|
2438
|
-
}
|
|
2439
|
-
class W {
|
|
2440
|
-
constructor(e) {
|
|
2441
|
-
this.heap = e;
|
|
2442
|
-
}
|
|
2443
|
-
static from(e, t = null, n = -1) {
|
|
2444
|
-
let i = [];
|
|
2445
|
-
for (let s = 0; s < e.length; s++)
|
|
2446
|
-
for (let r = e[s]; !r.isEmpty; r = r.nextLayer)
|
|
2447
|
-
r.maxPoint >= n && i.push(new Le(r, t, n, s));
|
|
2448
|
-
return i.length == 1 ? i[0] : new W(i);
|
|
2449
|
-
}
|
|
2450
|
-
get startSide() {
|
|
2451
|
-
return this.value ? this.value.startSide : 0;
|
|
2452
|
-
}
|
|
2453
|
-
goto(e, t = -1e9) {
|
|
2454
|
-
for (let n of this.heap)
|
|
2455
|
-
n.goto(e, t);
|
|
2456
|
-
for (let n = this.heap.length >> 1; n >= 0; n--)
|
|
2457
|
-
ie(this.heap, n);
|
|
2458
|
-
return this.next(), this;
|
|
2459
|
-
}
|
|
2460
|
-
forward(e, t) {
|
|
2461
|
-
for (let n of this.heap)
|
|
2462
|
-
n.forward(e, t);
|
|
2463
|
-
for (let n = this.heap.length >> 1; n >= 0; n--)
|
|
2464
|
-
ie(this.heap, n);
|
|
2465
|
-
(this.to - e || this.value.endSide - t) < 0 && this.next();
|
|
2466
|
-
}
|
|
2467
|
-
next() {
|
|
2468
|
-
if (this.heap.length == 0)
|
|
2469
|
-
this.from = this.to = 1e9, this.value = null, this.rank = -1;
|
|
2470
|
-
else {
|
|
2471
|
-
let e = this.heap[0];
|
|
2472
|
-
this.from = e.from, this.to = e.to, this.value = e.value, this.rank = e.rank, e.value && e.next(), ie(this.heap, 0);
|
|
2473
|
-
}
|
|
2474
|
-
}
|
|
2475
|
-
}
|
|
2476
|
-
function ie(l, e) {
|
|
2477
|
-
for (let t = l[e]; ; ) {
|
|
2478
|
-
let n = (e << 1) + 1;
|
|
2479
|
-
if (n >= l.length)
|
|
2480
|
-
break;
|
|
2481
|
-
let i = l[n];
|
|
2482
|
-
if (n + 1 < l.length && i.compare(l[n + 1]) >= 0 && (i = l[n + 1], n++), t.compare(i) < 0)
|
|
2483
|
-
break;
|
|
2484
|
-
l[n] = t, l[e] = i, e = n;
|
|
2485
|
-
}
|
|
2486
|
-
}
|
|
2487
|
-
class N {
|
|
2488
|
-
constructor(e, t, n) {
|
|
2489
|
-
this.minPoint = n, this.active = [], this.activeTo = [], this.activeRank = [], this.minActive = -1, this.point = null, this.pointFrom = 0, this.pointRank = 0, this.to = -1e9, this.endSide = 0, this.openStart = -1, this.cursor = W.from(e, t, n);
|
|
2490
|
-
}
|
|
2491
|
-
goto(e, t = -1e9) {
|
|
2492
|
-
return this.cursor.goto(e, t), this.active.length = this.activeTo.length = this.activeRank.length = 0, this.minActive = -1, this.to = e, this.endSide = t, this.openStart = -1, this.next(), this;
|
|
2493
|
-
}
|
|
2494
|
-
forward(e, t) {
|
|
2495
|
-
for (; this.minActive > -1 && (this.activeTo[this.minActive] - e || this.active[this.minActive].endSide - t) < 0; )
|
|
2496
|
-
this.removeActive(this.minActive);
|
|
2497
|
-
this.cursor.forward(e, t);
|
|
2498
|
-
}
|
|
2499
|
-
removeActive(e) {
|
|
2500
|
-
H(this.active, e), H(this.activeTo, e), H(this.activeRank, e), this.minActive = Se(this.active, this.activeTo);
|
|
2501
|
-
}
|
|
2502
|
-
addActive(e) {
|
|
2503
|
-
let t = 0, { value: n, to: i, rank: s } = this.cursor;
|
|
2504
|
-
for (; t < this.activeRank.length && (s - this.activeRank[t] || i - this.activeTo[t]) > 0; )
|
|
2505
|
-
t++;
|
|
2506
|
-
K(this.active, t, n), K(this.activeTo, t, i), K(this.activeRank, t, s), e && K(e, t, this.cursor.from), this.minActive = Se(this.active, this.activeTo);
|
|
2507
|
-
}
|
|
2508
|
-
// After calling this, if `this.point` != null, the next range is a
|
|
2509
|
-
// point. Otherwise, it's a regular range, covered by `this.active`.
|
|
2510
|
-
next() {
|
|
2511
|
-
let e = this.to, t = this.point;
|
|
2512
|
-
this.point = null;
|
|
2513
|
-
let n = this.openStart < 0 ? [] : null;
|
|
2514
|
-
for (; ; ) {
|
|
2515
|
-
let i = this.minActive;
|
|
2516
|
-
if (i > -1 && (this.activeTo[i] - this.cursor.from || this.active[i].endSide - this.cursor.startSide) < 0) {
|
|
2517
|
-
if (this.activeTo[i] > e) {
|
|
2518
|
-
this.to = this.activeTo[i], this.endSide = this.active[i].endSide;
|
|
2519
|
-
break;
|
|
2520
|
-
}
|
|
2521
|
-
this.removeActive(i), n && H(n, i);
|
|
2522
|
-
} else if (this.cursor.value)
|
|
2523
|
-
if (this.cursor.from > e) {
|
|
2524
|
-
this.to = this.cursor.from, this.endSide = this.cursor.startSide;
|
|
2525
|
-
break;
|
|
2526
|
-
} else {
|
|
2527
|
-
let s = this.cursor.value;
|
|
2528
|
-
if (!s.point)
|
|
2529
|
-
this.addActive(n), this.cursor.next();
|
|
2530
|
-
else if (t && this.cursor.to == this.to && this.cursor.from < this.cursor.to)
|
|
2531
|
-
this.cursor.next();
|
|
2532
|
-
else {
|
|
2533
|
-
this.point = s, this.pointFrom = this.cursor.from, this.pointRank = this.cursor.rank, this.to = this.cursor.to, this.endSide = s.endSide, this.cursor.next(), this.forward(this.to, this.endSide);
|
|
2534
|
-
break;
|
|
2535
|
-
}
|
|
2536
|
-
}
|
|
2537
|
-
else {
|
|
2538
|
-
this.to = this.endSide = 1e9;
|
|
2539
|
-
break;
|
|
2540
|
-
}
|
|
2541
|
-
}
|
|
2542
|
-
if (n) {
|
|
2543
|
-
this.openStart = 0;
|
|
2544
|
-
for (let i = n.length - 1; i >= 0 && n[i] < e; i--)
|
|
2545
|
-
this.openStart++;
|
|
2546
|
-
}
|
|
2547
|
-
}
|
|
2548
|
-
activeForPoint(e) {
|
|
2549
|
-
if (!this.active.length)
|
|
2550
|
-
return this.active;
|
|
2551
|
-
let t = [];
|
|
2552
|
-
for (let n = this.active.length - 1; n >= 0 && !(this.activeRank[n] < this.pointRank); n--)
|
|
2553
|
-
(this.activeTo[n] > e || this.activeTo[n] == e && this.active[n].endSide >= this.point.endSide) && t.push(this.active[n]);
|
|
2554
|
-
return t.reverse();
|
|
2555
|
-
}
|
|
2556
|
-
openEnd(e) {
|
|
2557
|
-
let t = 0;
|
|
2558
|
-
for (let n = this.activeTo.length - 1; n >= 0 && this.activeTo[n] > e; n--)
|
|
2559
|
-
t++;
|
|
2560
|
-
return t;
|
|
2561
|
-
}
|
|
2562
|
-
}
|
|
2563
|
-
function ke(l, e, t, n, i, s) {
|
|
2564
|
-
l.goto(e), t.goto(n);
|
|
2565
|
-
let r = n + i, h = n, o = n - e, a = !!s.boundChange;
|
|
2566
|
-
for (let u = !1; ; ) {
|
|
2567
|
-
let f = l.to + o - t.to, d = f || l.endSide - t.endSide, c = d < 0 ? l.to + o : t.to, g = Math.min(c, r);
|
|
2568
|
-
if (l.point || t.point ? (l.point && t.point && me(l.point, t.point) && de(l.activeForPoint(l.to), t.activeForPoint(t.to)) || s.comparePoint(h, g, l.point, t.point), u = !1) : (u && s.boundChange(h), g > h && !de(l.active, t.active) && s.compareRange(h, g, l.active, t.active), a && g < r && (f || l.openEnd(c) != t.openEnd(c)) && (u = !0)), c > r)
|
|
2569
|
-
break;
|
|
2570
|
-
h = c, d <= 0 && l.next(), d >= 0 && t.next();
|
|
2571
|
-
}
|
|
2572
|
-
}
|
|
2573
|
-
function de(l, e) {
|
|
2574
|
-
if (l.length != e.length)
|
|
2575
|
-
return !1;
|
|
2576
|
-
for (let t = 0; t < l.length; t++)
|
|
2577
|
-
if (l[t] != e[t] && !me(l[t], e[t]))
|
|
2578
|
-
return !1;
|
|
2579
|
-
return !0;
|
|
2580
|
-
}
|
|
2581
|
-
function H(l, e) {
|
|
2582
|
-
for (let t = e, n = l.length - 1; t < n; t++)
|
|
2583
|
-
l[t] = l[t + 1];
|
|
2584
|
-
l.pop();
|
|
2585
|
-
}
|
|
2586
|
-
function K(l, e, t) {
|
|
2587
|
-
for (let n = l.length - 1; n >= e; n--)
|
|
2588
|
-
l[n + 1] = l[n];
|
|
2589
|
-
l[e] = t;
|
|
2590
|
-
}
|
|
2591
|
-
function Se(l, e) {
|
|
2592
|
-
let t = -1, n = 1e9;
|
|
2593
|
-
for (let i = 0; i < e.length; i++)
|
|
2594
|
-
(e[i] - n || l[i].endSide - l[t].endSide) < 0 && (t = i, n = e[i]);
|
|
2595
|
-
return t;
|
|
2596
|
-
}
|
|
2597
|
-
function lt(l, e, t = l.length) {
|
|
2598
|
-
let n = 0;
|
|
2599
|
-
for (let i = 0; i < t && i < l.length; )
|
|
2600
|
-
l.charCodeAt(i) == 9 ? (n += e - n % e, i++) : (n++, i = Y(l, i));
|
|
2601
|
-
return n;
|
|
2602
|
-
}
|
|
2603
|
-
function ht(l, e, t, n) {
|
|
2604
|
-
for (let i = 0, s = 0; ; ) {
|
|
2605
|
-
if (s >= e)
|
|
2606
|
-
return i;
|
|
2607
|
-
if (i == l.length)
|
|
2608
|
-
break;
|
|
2609
|
-
s += l.charCodeAt(i) == 9 ? t - s % t : 1, i = Y(l, i);
|
|
2610
|
-
}
|
|
2611
|
-
return n === !0 ? -1 : l.length;
|
|
2612
|
-
}
|
|
2613
|
-
export {
|
|
2614
|
-
U as Annotation,
|
|
2615
|
-
Ue as AnnotationType,
|
|
2616
|
-
C as ChangeDesc,
|
|
2617
|
-
y as ChangeSet,
|
|
2618
|
-
R as CharCategory,
|
|
2619
|
-
te as Compartment,
|
|
2620
|
-
p as EditorSelection,
|
|
2621
|
-
w as EditorState,
|
|
2622
|
-
A as Facet,
|
|
2623
|
-
De as Line,
|
|
2624
|
-
M as MapMode,
|
|
2625
|
-
st as Prec,
|
|
2626
|
-
q as Range,
|
|
2627
|
-
S as RangeSet,
|
|
2628
|
-
ee as RangeSetBuilder,
|
|
2629
|
-
_ as RangeValue,
|
|
2630
|
-
B as SelectionRange,
|
|
2631
|
-
I as StateEffect,
|
|
2632
|
-
Ge as StateEffectType,
|
|
2633
|
-
L as StateField,
|
|
2634
|
-
x as Text,
|
|
2635
|
-
P as Transaction,
|
|
2636
|
-
tt as codePointAt,
|
|
2637
|
-
it as codePointSize,
|
|
2638
|
-
rt as combineConfig,
|
|
2639
|
-
lt as countColumn,
|
|
2640
|
-
Y as findClusterBreak,
|
|
2641
|
-
ht as findColumn,
|
|
2642
|
-
nt as fromCodePoint
|
|
2643
|
-
};
|
|
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/2/11 18:34:19
|
|
12
|
+
Build Commit: 9b4b89872743098216d14081433fa57d7fa73fd3
|
|
13
|
+
*/
|
|
14
|
+
import{findClusterBreak as t}from"../../../@marijn/find-cluster-break/src/index.js";class e{lineAt(t){if(t<0||t>this.length)throw new RangeError(`Invalid position ${t} in document of length ${this.length}`);return this.lineInner(t,!1,1,0)}line(t){if(t<1||t>this.lines)throw new RangeError(`Invalid line number ${t} in ${this.lines}-line document`);return this.lineInner(t,!0,1,0)}replace(t,e,n){[t,e]=c(this,t,e);let s=[];return this.decompose(0,t,s,2),n.length&&n.decompose(0,n.length,s,3),this.decompose(e,this.length,s,1),i.from(s,this.length-(e-t)+n.length)}append(t){return this.replace(this.length,this.length,t)}slice(t,e=this.length){[t,e]=c(this,t,e);let n=[];return this.decompose(t,e,n,0),i.from(n,e-t)}eq(t){if(t==this)return!0;if(t.length!=this.length||t.lines!=this.lines)return!1;let e=this.scanIdentical(t,1),n=this.length-this.scanIdentical(t,-1),i=new h(this),s=new h(t);for(let r=e,h=e;;){if(i.next(r),s.next(r),r=0,i.lineBreak!=s.lineBreak||i.done!=s.done||i.value!=s.value)return!1;if(h+=i.value.length,i.done||h>=n)return!0}}iter(t=1){return new h(this,t)}iterRange(t,e=this.length){return new o(this,t,e)}iterLines(t,e){let n;if(null==t)n=this.iter();else{null==e&&(e=this.lines+1);let i=this.line(t).from;n=this.iterRange(i,Math.max(i,e==this.lines+1?this.length:e<=1?0:this.line(e-1).to))}return new l(n)}toString(){return this.sliceString(0)}toJSON(){let t=[];return this.flatten(t),t}constructor(){}static of(t){if(0==t.length)throw new RangeError("A document must have at least one line");return 1!=t.length||t[0]?t.length<=32?new n(t):i.from(n.split(t,[])):e.empty}}class n extends e{constructor(t,e=function(t){let e=-1;for(let n of t)e+=n.length+1;return e}(t)){super(),this.text=t,this.length=e}get lines(){return this.text.length}get children(){return null}lineInner(t,e,n,i){for(let s=0;;s++){let r=this.text[s],h=i+r.length;if((e?n:h)>=t)return new a(i,h,n,r);i=h+1,n++}}decompose(t,e,i,h){let o=t<=0&&e>=this.length?this:new n(r(this.text,t,e),Math.min(e,this.length)-Math.max(0,t));if(1&h){let t=i.pop(),e=s(o.text,t.text.slice(),0,o.length);if(e.length<=32)i.push(new n(e,t.length+o.length));else{let t=e.length>>1;i.push(new n(e.slice(0,t)),new n(e.slice(t)))}}else i.push(o)}replace(t,e,h){if(!(h instanceof n))return super.replace(t,e,h);[t,e]=c(this,t,e);let o=s(this.text,s(h.text,r(this.text,0,t)),e),l=this.length+h.length-(e-t);return o.length<=32?new n(o,l):i.from(n.split(o,[]),l)}sliceString(t,e=this.length,n="\n"){[t,e]=c(this,t,e);let i="";for(let s=0,r=0;s<=e&&r<this.text.length;r++){let h=this.text[r],o=s+h.length;s>t&&r&&(i+=n),t<o&&e>s&&(i+=h.slice(Math.max(0,t-s),e-s)),s=o+1}return i}flatten(t){for(let e of this.text)t.push(e)}scanIdentical(){return 0}static split(t,e){let i=[],s=-1;for(let r of t)i.push(r),s+=r.length+1,32==i.length&&(e.push(new n(i,s)),i=[],s=-1);return s>-1&&e.push(new n(i,s)),e}}class i extends e{constructor(t,e){super(),this.children=t,this.length=e,this.lines=0;for(let n of t)this.lines+=n.lines}lineInner(t,e,n,i){for(let s=0;;s++){let r=this.children[s],h=i+r.length,o=n+r.lines-1;if((e?o:h)>=t)return r.lineInner(t,e,n,i);i=h+1,n=o+1}}decompose(t,e,n,i){for(let s=0,r=0;r<=e&&s<this.children.length;s++){let h=this.children[s],o=r+h.length;if(t<=o&&e>=r){let s=i&((r<=t?1:0)|(o>=e?2:0));r>=t&&o<=e&&!s?n.push(h):h.decompose(t-r,e-r,n,s)}r=o+1}}replace(t,e,n){if([t,e]=c(this,t,e),n.lines<this.lines)for(let s=0,r=0;s<this.children.length;s++){let h=this.children[s],o=r+h.length;if(t>=r&&e<=o){let l=h.replace(t-r,e-r,n),a=this.lines-h.lines+l.lines;if(l.lines<a>>4&&l.lines>a>>6){let r=this.children.slice();return r[s]=l,new i(r,this.length-(e-t)+n.length)}return super.replace(r,o,l)}r=o+1}return super.replace(t,e,n)}sliceString(t,e=this.length,n="\n"){[t,e]=c(this,t,e);let i="";for(let s=0,r=0;s<this.children.length&&r<=e;s++){let h=this.children[s],o=r+h.length;r>t&&s&&(i+=n),t<o&&e>r&&(i+=h.sliceString(t-r,e-r,n)),r=o+1}return i}flatten(t){for(let e of this.children)e.flatten(t)}scanIdentical(t,e){if(!(t instanceof i))return 0;let n=0,[s,r,h,o]=e>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;s+=e,r+=e){if(s==h||r==o)return n;let i=this.children[s],l=t.children[r];if(i!=l)return n+i.scanIdentical(l,e);n+=i.length+1}}static from(t,e=t.reduce((t,e)=>t+e.length+1,-1)){let s=0;for(let n of t)s+=n.lines;if(s<32){let i=[];for(let e of t)e.flatten(i);return new n(i,e)}let r=Math.max(32,s>>5),h=r<<1,o=r>>1,l=[],a=0,c=-1,f=[];function u(t){let e;if(t.lines>h&&t instanceof i)for(let n of t.children)u(n);else t.lines>o&&(a>o||!a)?(g(),l.push(t)):t instanceof n&&a&&(e=f[f.length-1])instanceof n&&t.lines+e.lines<=32?(a+=t.lines,c+=t.length+1,f[f.length-1]=new n(e.text.concat(t.text),e.length+1+t.length)):(a+t.lines>r&&g(),a+=t.lines,c+=t.length+1,f.push(t))}function g(){0!=a&&(l.push(1==f.length?f[0]:i.from(f,c)),c=-1,a=f.length=0)}for(let n of t)u(n);return g(),1==l.length?l[0]:new i(l,e)}}function s(t,e,n=0,i=1e9){for(let s=0,r=0,h=!0;r<t.length&&s<=i;r++){let o=t[r],l=s+o.length;l>=n&&(l>i&&(o=o.slice(0,i-s)),s<n&&(o=o.slice(n-s)),h?(e[e.length-1]+=o,h=!1):e.push(o)),s=l+1}return e}function r(t,e,n){return s(t,[""],e,n)}e.empty=/* @__PURE__ */new n([""],0);class h{constructor(t,e=1){this.dir=e,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[t],this.offsets=[e>0?1:(t instanceof n?t.text.length:t.children.length)<<1]}nextInner(t,e){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,s=this.nodes[i],r=this.offsets[i],h=r>>1,o=s instanceof n?s.text.length:s.children.length;if(h==(e>0?o:0)){if(0==i)return this.done=!0,this.value="",this;e>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&r)==(e>0?0:1)){if(this.offsets[i]+=e,0==t)return this.lineBreak=!0,this.value="\n",this;t--}else if(s instanceof n){let n=s.text[h+(e<0?-1:0)];if(this.offsets[i]+=e,n.length>Math.max(0,t))return this.value=0==t?n:e>0?n.slice(t):n.slice(0,n.length-t),this;t-=n.length}else{let r=s.children[h+(e<0?-1:0)];t>r.length?(t-=r.length,this.offsets[i]+=e):(e<0&&this.offsets[i]--,this.nodes.push(r),this.offsets.push(e>0?1:(r instanceof n?r.text.length:r.children.length)<<1))}}}next(t=0){return t<0&&(this.nextInner(-t,-this.dir),t=this.value.length),this.nextInner(t,this.dir)}}class o{constructor(t,e,n){this.value="",this.done=!1,this.cursor=new h(t,e>n?-1:1),this.pos=e>n?t.length:0,this.from=Math.min(e,n),this.to=Math.max(e,n)}nextInner(t,e){if(e<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;t+=Math.max(0,e<0?this.pos-this.to:this.from-this.pos);let n=e<0?this.pos-this.from:this.to-this.pos;t>n&&(t=n),n-=t;let{value:i}=this.cursor.next(t);return this.pos+=(i.length+t)*e,this.value=i.length<=n?i:e<0?i.slice(i.length-n):i.slice(0,n),this.done=!this.value,this}next(t=0){return t<0?t=Math.max(t,this.from-this.pos):t>0&&(t=Math.min(t,this.to-this.pos)),this.nextInner(t,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&""!=this.value}}class l{constructor(t){this.inner=t,this.afterBreak=!0,this.value="",this.done=!1}next(t=0){let{done:e,lineBreak:n,value:i}=this.inner.next(t);return e&&this.afterBreak?(this.value="",this.afterBreak=!1):e?(this.done=!0,this.value=""):n?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}"undefined"!=typeof Symbol&&(e.prototype[Symbol.iterator]=function(){return this.iter()},h.prototype[Symbol.iterator]=o.prototype[Symbol.iterator]=l.prototype[Symbol.iterator]=function(){return this});class a{constructor(t,e,n,i){this.from=t,this.to=e,this.number=n,this.text=i}get length(){return this.to-this.from}}function c(t,e,n){return[e=Math.max(0,Math.min(t.length,e)),Math.max(e,Math.min(t.length,n))]}function f(e,n,i=!0,s=!0){return t(e,n,i,s)}function u(t,e){let n=t.charCodeAt(e);if(!(i=n,i>=55296&&i<56320&&e+1!=t.length))return n;var i;let s=t.charCodeAt(e+1);return function(t){return t>=56320&&t<57344}(s)?s-56320+(n-55296<<10)+65536:n}function g(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t)))}function d(t){return t<65536?1:2}const p=/\r\n?|\n/;var m=/* @__PURE__ */function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(m||(m={}));class v{constructor(t){this.sections=t}get length(){let t=0;for(let e=0;e<this.sections.length;e+=2)t+=this.sections[e];return t}get newLength(){let t=0;for(let e=0;e<this.sections.length;e+=2){let n=this.sections[e+1];t+=n<0?this.sections[e]:n}return t}get empty(){return 0==this.sections.length||2==this.sections.length&&this.sections[1]<0}iterGaps(t){for(let e=0,n=0,i=0;e<this.sections.length;){let s=this.sections[e++],r=this.sections[e++];r<0?(t(n,i,s),i+=s):i+=r,n+=s}}iterChangedRanges(t,e=!1){k(this,t,e)}get invertedDesc(){let t=[];for(let e=0;e<this.sections.length;){let n=this.sections[e++],i=this.sections[e++];i<0?t.push(n,i):t.push(i,n)}return new v(t)}composeDesc(t){return this.empty?t:t.empty?this:I(this,t)}mapDesc(t,e=!1){return t.empty?this:S(this,t,e)}mapPos(t,e=-1,n=m.Simple){let i=0,s=0;for(let r=0;r<this.sections.length;){let h=this.sections[r++],o=this.sections[r++],l=i+h;if(o<0){if(l>t)return s+(t-i);s+=h}else{if(n!=m.Simple&&l>=t&&(n==m.TrackDel&&i<t&&l>t||n==m.TrackBefore&&i<t||n==m.TrackAfter&&l>t))return null;if(l>t||l==t&&e<0&&!h)return t==i||e<0?s:s+o;s+=o}i=l}if(t>i)throw new RangeError(`Position ${t} is out of range for changeset of length ${i}`);return s}touchesRange(t,e=t){for(let n=0,i=0;n<this.sections.length&&i<=e;){let s=i+this.sections[n++];if(this.sections[n++]>=0&&i<=e&&s>=t)return!(i<t&&s>e)||"cover";i=s}return!1}toString(){let t="";for(let e=0;e<this.sections.length;){let n=this.sections[e++],i=this.sections[e++];t+=(t?" ":"")+n+(i>=0?":"+i:"")}return t}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some(t=>"number"!=typeof t))throw new RangeError("Invalid JSON representation of ChangeDesc");return new v(t)}static create(t){return new v(t)}}class x extends v{constructor(t,e){super(t),this.inserted=e}apply(t){if(this.length!=t.length)throw new RangeError("Applying change set to a document with the wrong length");return k(this,(e,n,i,s,r)=>t=t.replace(i,i+(n-e),r),!1),t}mapDesc(t,e=!1){return S(this,t,e,!0)}invert(t){let n=this.sections.slice(),i=[];for(let s=0,r=0;s<n.length;s+=2){let h=n[s],o=n[s+1];if(o>=0){n[s]=o,n[s+1]=h;let l=s>>1;for(;i.length<l;)i.push(e.empty);i.push(h?t.slice(r,r+h):e.empty)}r+=h}return new x(n,i)}compose(t){return this.empty?t:t.empty?this:I(this,t,!0)}map(t,e=!1){return t.empty?this:S(this,t,e,!0)}iterChanges(t,e=!1){k(this,t,e)}get desc(){return v.create(this.sections)}filter(t){let e=[],n=[],i=[],s=new b(this);t:for(let r=0,h=0;;){let o=r==t.length?1e9:t[r++];for(;h<o||h==o&&0==s.len;){if(s.done)break t;let t=Math.min(s.len,o-h);w(i,t,-1);let r=-1==s.ins?-1:0==s.off?s.ins:0;w(e,t,r),r>0&&y(n,e,s.text),s.forward(t),h+=t}let l=t[r++];for(;h<l;){if(s.done)break t;let t=Math.min(s.len,l-h);w(e,t,-1),w(i,t,-1==s.ins?-1:0==s.off?s.ins:0),s.forward(t),h+=t}}return{changes:new x(e,n),filtered:v.create(i)}}toJSON(){let t=[];for(let e=0;e<this.sections.length;e+=2){let n=this.sections[e],i=this.sections[e+1];i<0?t.push(n):0==i?t.push([n]):t.push([n].concat(this.inserted[e>>1].toJSON()))}return t}static of(t,n,i){let s=[],r=[],h=0,o=null;function l(t=!1){if(!t&&!s.length)return;h<n&&w(s,n-h,-1);let e=new x(s,r);o=o?o.compose(e.map(o)):e,s=[],r=[],h=0}return function t(a){if(Array.isArray(a))for(let e of a)t(e);else if(a instanceof x){if(a.length!=n)throw new RangeError(`Mismatched change set length (got ${a.length}, expected ${n})`);l(),o=o?o.compose(a.map(o)):a}else{let{from:t,to:o=t,insert:c}=a;if(t>o||t<0||o>n)throw new RangeError(`Invalid change range ${t} to ${o} (in doc of length ${n})`);let f=c?"string"==typeof c?e.of(c.split(i||p)):c:e.empty,u=f.length;if(t==o&&0==u)return;t<h&&l(),t>h&&w(s,t-h,-1),w(s,o-t,u),y(r,s,f),h=o}}(t),l(!o),o}static empty(t){return new x(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],i=[];for(let s=0;s<t.length;s++){let r=t[s];if("number"==typeof r)n.push(r,-1);else{if(!Array.isArray(r)||"number"!=typeof r[0]||r.some((t,e)=>e&&"string"!=typeof t))throw new RangeError("Invalid JSON representation of ChangeSet");if(1==r.length)n.push(r[0],0);else{for(;i.length<s;)i.push(e.empty);i[s]=e.of(r.slice(1)),n.push(r[0],i[s].length)}}}return new x(n,i)}static createSet(t,e){return new x(t,e)}}function w(t,e,n,i=!1){if(0==e&&n<=0)return;let s=t.length-2;s>=0&&n<=0&&n==t[s+1]?t[s]+=e:s>=0&&0==e&&0==t[s]?t[s+1]+=n:i?(t[s]+=e,t[s+1]+=n):t.push(e,n)}function y(t,n,i){if(0==i.length)return;let s=n.length-2>>1;if(s<t.length)t[t.length-1]=t[t.length-1].append(i);else{for(;t.length<s;)t.push(e.empty);t.push(i)}}function k(t,n,i){let s=t.inserted;for(let r=0,h=0,o=0;o<t.sections.length;){let l=t.sections[o++],a=t.sections[o++];if(a<0)r+=l,h+=l;else{let c=r,f=h,u=e.empty;for(;c+=l,f+=a,a&&s&&(u=u.append(s[o-2>>1])),!(i||o==t.sections.length||t.sections[o+1]<0);)l=t.sections[o++],a=t.sections[o++];n(r,c,h,f,u),r=c,h=f}}}function S(t,e,n,i=!1){let s=[],r=i?[]:null,h=new b(t),o=new b(e);for(let l=-1;;){if(h.done&&o.len||o.done&&h.len)throw new Error("Mismatched change set lengths");if(-1==h.ins&&-1==o.ins){let t=Math.min(h.len,o.len);w(s,t,-1),h.forward(t),o.forward(t)}else if(o.ins>=0&&(h.ins<0||l==h.i||0==h.off&&(o.len<h.len||o.len==h.len&&!n))){let t=o.len;for(w(s,o.ins,-1);t;){let e=Math.min(h.len,t);h.ins>=0&&l<h.i&&h.len<=e&&(w(s,0,h.ins),r&&y(r,s,h.text),l=h.i),h.forward(e),t-=e}o.next()}else{if(!(h.ins>=0)){if(h.done&&o.done)return r?x.createSet(s,r):v.create(s);throw new Error("Mismatched change set lengths")}{let t=0,e=h.len;for(;e;)if(-1==o.ins){let n=Math.min(e,o.len);t+=n,e-=n,o.forward(n)}else{if(!(0==o.ins&&o.len<e))break;e-=o.len,o.next()}w(s,t,l<h.i?h.ins:0),r&&l<h.i&&y(r,s,h.text),l=h.i,h.forward(h.len-e)}}}}function I(t,e,n=!1){let i=[],s=n?[]:null,r=new b(t),h=new b(e);for(let o=!1;;){if(r.done&&h.done)return s?x.createSet(i,s):v.create(i);if(0==r.ins)w(i,r.len,0,o),r.next();else if(0!=h.len||h.done){if(r.done||h.done)throw new Error("Mismatched change set lengths");{let t=Math.min(r.len2,h.len),e=i.length;if(-1==r.ins){let e=-1==h.ins?-1:h.off?0:h.ins;w(i,t,e,o),s&&e&&y(s,i,h.text)}else-1==h.ins?(w(i,r.off?0:r.len,t,o),s&&y(s,i,r.textBit(t))):(w(i,r.off?0:r.len,h.off?0:h.ins,o),s&&!h.off&&y(s,i,h.text));o=(r.ins>t||h.ins>=0&&h.len>t)&&(o||i.length>e),r.forward2(t),h.forward(t)}}else w(i,0,h.ins,o),s&&y(s,i,h.text),h.next()}}class b{constructor(t){this.set=t,this.i=0,this.next()}next(){let{sections:t}=this.set;this.i<t.length?(this.len=t[this.i++],this.ins=t[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return-2==this.ins}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length?e.empty:t[n]}textBit(t){let{inserted:n}=this.set,i=this.i-2>>1;return i>=n.length&&!t?e.empty:n[i].slice(this.off,null==t?void 0:this.off+t)}forward(t){t==this.len?this.next():(this.len-=t,this.off+=t)}forward2(t){-1==this.ins?this.forward(t):t==this.ins?this.next():(this.ins-=t,this.off+=t)}}class P{constructor(t,e,n){this.from=t,this.to=e,this.flags=n}get anchor(){return 32&this.flags?this.to:this.from}get head(){return 32&this.flags?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return 8&this.flags?-1:16&this.flags?1:0}get bidiLevel(){let t=7&this.flags;return 7==t?null:t}get goalColumn(){let t=this.flags>>6;return 16777215==t?void 0:t}map(t,e=-1){let n,i;return this.empty?n=i=t.mapPos(this.from,e):(n=t.mapPos(this.from,1),i=t.mapPos(this.to,-1)),n==this.from&&i==this.to?this:new P(n,i,this.flags)}extend(t,e=t){if(t<=this.anchor&&e>=this.anchor)return E.range(t,e);let n=Math.abs(t-this.anchor)>Math.abs(e-this.anchor)?t:e;return E.range(this.anchor,n)}eq(t,e=!1){return!(this.anchor!=t.anchor||this.head!=t.head||this.goalColumn!=t.goalColumn||e&&this.empty&&this.assoc!=t.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(t){if(!t||"number"!=typeof t.anchor||"number"!=typeof t.head)throw new RangeError("Invalid JSON representation for SelectionRange");return E.range(t.anchor,t.head)}static create(t,e,n){return new P(t,e,n)}}class E{constructor(t,e){this.ranges=t,this.mainIndex=e}map(t,e=-1){return t.empty?this:E.create(this.ranges.map(n=>n.map(t,e)),this.mainIndex)}eq(t,e=!1){if(this.ranges.length!=t.ranges.length||this.mainIndex!=t.mainIndex)return!1;for(let n=0;n<this.ranges.length;n++)if(!this.ranges[n].eq(t.ranges[n],e))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return 1==this.ranges.length?this:new E([this.main],0)}addRange(t,e=!0){return E.create([t].concat(this.ranges),e?0:this.mainIndex+1)}replaceRange(t,e=this.mainIndex){let n=this.ranges.slice();return n[e]=t,E.create(n,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(t=>t.toJSON()),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||"number"!=typeof t.main||t.main>=t.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new E(t.ranges.map(t=>P.fromJSON(t)),t.main)}static single(t,e=t){return new E([E.range(t,e)],0)}static create(t,e=0){if(0==t.length)throw new RangeError("A selection needs at least one range");for(let n=0,i=0;i<t.length;i++){let s=t[i];if(s.empty?s.from<=n:s.from<n)return E.normalized(t.slice(),e);n=s.to}return new E(t,e)}static cursor(t,e=0,n,i){return P.create(t,t,(0==e?0:e<0?8:16)|(null==n?7:Math.min(6,n))|(null!=i?i:16777215)<<6)}static range(t,e,n,i){let s=(null!=n?n:16777215)<<6|(null==i?7:Math.min(6,i));return e<t?P.create(e,t,48|s):P.create(t,e,(e>t?8:0)|s)}static normalized(t,e=0){let n=t[e];t.sort((t,e)=>t.from-e.from),e=t.indexOf(n);for(let i=1;i<t.length;i++){let n=t[i],s=t[i-1];if(n.empty?n.from<=s.to:n.from<s.to){let r=s.from,h=Math.max(n.to,s.to);i<=e&&e--,t.splice(--i,2,n.anchor>n.head?E.range(h,r):E.range(r,h))}}return new E(t,e)}}function M(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let A=0;class O{constructor(t,e,n,i,s){this.combine=t,this.compareInput=e,this.compare=n,this.isStatic=i,this.id=A++,this.default=t([]),this.extensions="function"==typeof s?s(this):s}get reader(){return this}static define(t={}){return new O(t.combine||(t=>t),t.compareInput||((t,e)=>t===e),t.compare||(t.combine?(t,e)=>t===e:R),!!t.static,t.enables)}of(t){return new T([],this,0,t)}compute(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new T(t,this,1,e)}computeN(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new T(t,this,2,e)}from(t,e){return e||(e=t=>t),this.compute([t],n=>e(n.field(t)))}}function R(t,e){return t==e||t.length==e.length&&t.every((t,n)=>t===e[n])}class T{constructor(t,e,n,i){this.dependencies=t,this.facet=e,this.type=n,this.value=i,this.id=A++}dynamicSlot(t){var e;let n=this.value,i=this.facet.compareInput,s=this.id,r=t[s]>>1,h=2==this.type,o=!1,l=!1,a=[];for(let c of this.dependencies)"doc"==c?o=!0:"selection"==c?l=!0:1&(null!==(e=t[c.id])&&void 0!==e?e:1)||a.push(t[c.id]);return{create:t=>(t.values[r]=n(t),1),update(t,e){if(o&&e.docChanged||l&&(e.docChanged||e.selection)||N(t,a)){let e=n(t);if(h?!C(e,t.values[r],i):!i(e,t.values[r]))return t.values[r]=e,1}return 0},reconfigure:(t,e)=>{let o,l=e.config.address[s];if(null!=l){let s=H(e,l);if(this.dependencies.every(n=>n instanceof O?e.facet(n)===t.facet(n):!(n instanceof J)||e.field(n,!1)==t.field(n,!1))||(h?C(o=n(t),s,i):i(o=n(t),s)))return t.values[r]=s,0}else o=n(t);return t.values[r]=o,1}}}}function C(t,e,n){if(t.length!=e.length)return!1;for(let i=0;i<t.length;i++)if(!n(t[i],e[i]))return!1;return!0}function N(t,e){let n=!1;for(let i of e)1&G(t,i)&&(n=!0);return n}function B(t,e,n){let i=n.map(e=>t[e.id]),s=n.map(t=>t.type),r=i.filter(t=>!(1&t)),h=t[e.id]>>1;function o(t){let n=[];for(let e=0;e<i.length;e++){let r=H(t,i[e]);if(2==s[e])for(let t of r)n.push(t);else n.push(r)}return e.combine(n)}return{create(t){for(let e of i)G(t,e);return t.values[h]=o(t),1},update(t,n){if(!N(t,r))return 0;let i=o(t);return e.compare(i,t.values[h])?0:(t.values[h]=i,1)},reconfigure(t,s){let r=N(t,i),l=s.config.facets[e.id],a=s.facet(e);if(l&&!r&&R(n,l))return t.values[h]=a,0;let c=o(t);return e.compare(c,a)?(t.values[h]=a,0):(t.values[h]=c,1)}}}const F=/* @__PURE__ */O.define({static:!0});class J{constructor(t,e,n,i,s){this.id=t,this.createF=e,this.updateF=n,this.compareF=i,this.spec=s,this.provides=void 0}static define(t){let e=new J(A++,t.create,t.update,t.compare||((t,e)=>t===e),t);return t.provide&&(e.provides=t.provide(e)),e}create(t){let e=t.facet(F).find(t=>t.field==this);return((null==e?void 0:e.create)||this.createF)(t)}slot(t){let e=t[this.id]>>1;return{create:t=>(t.values[e]=this.create(t),1),update:(t,n)=>{let i=t.values[e],s=this.updateF(i,n);return this.compareF(i,s)?0:(t.values[e]=s,1)},reconfigure:(t,n)=>{let i,s=t.facet(F),r=n.facet(F);return(i=s.find(t=>t.field==this))&&i!=r.find(t=>t.field==this)?(t.values[e]=i.create(t),1):null!=n.config.address[this.id]?(t.values[e]=n.field(this),0):(t.values[e]=this.create(t),1)}}}init(t){return[this,F.of({field:this,create:t})]}get extension(){return this}}const D=4,L=3,$=2,j=1;function V(t){return e=>new q(e,t)}const z={highest:/* @__PURE__ */V(0),high:/* @__PURE__ */V(j),default:/* @__PURE__ */V($),low:/* @__PURE__ */V(L),lowest:/* @__PURE__ */V(D)};class q{constructor(t,e){this.inner=t,this.prec=e}}class _{of(t){return new W(this,t)}reconfigure(t){return _.reconfigure.of({compartment:this,extension:t})}get(t){return t.config.compartments.get(this)}}class W{constructor(t,e){this.compartment=t,this.inner=e}}class U{constructor(t,e,n,i,s,r){for(this.base=t,this.compartments=e,this.dynamicSlots=n,this.address=i,this.staticValues=s,this.facets=r,this.statusTemplate=[];this.statusTemplate.length<n.length;)this.statusTemplate.push(0)}staticFacet(t){let e=this.address[t.id];return null==e?t.default:this.staticValues[e>>1]}static resolve(t,e,n){let i=[],s=/* @__PURE__ */Object.create(null),r=/* @__PURE__ */new Map;for(let f of function(t,e,n){let i=[[],[],[],[],[]],s=/* @__PURE__ */new Map;function r(t,h){let o=s.get(t);if(null!=o){if(o<=h)return;let e=i[o].indexOf(t);e>-1&&i[o].splice(e,1),t instanceof W&&n.delete(t.compartment)}if(s.set(t,h),Array.isArray(t))for(let e of t)r(e,h);else if(t instanceof W){if(n.has(t.compartment))throw new RangeError("Duplicate use of compartment in extensions");let i=e.get(t.compartment)||t.inner;n.set(t.compartment,i),r(i,h)}else if(t instanceof q)r(t.inner,t.prec);else if(t instanceof J)i[h].push(t),t.provides&&r(t.provides,h);else if(t instanceof T)i[h].push(t),t.facet.extensions&&r(t.facet.extensions,$);else{let e=t.extension;if(!e)throw new Error(`Unrecognized extension value in extension set (${t}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);r(e,h)}}return r(t,$),i.reduce((t,e)=>t.concat(e))}(t,e,r))f instanceof J?i.push(f):(s[f.facet.id]||(s[f.facet.id]=[])).push(f);let h=/* @__PURE__ */Object.create(null),o=[],l=[];for(let f of i)h[f.id]=l.length<<1,l.push(t=>f.slot(t));let a=null==n?void 0:n.config.facets;for(let f in s){let t=s[f],e=t[0].facet,i=a&&a[f]||[];if(t.every(t=>0==t.type))if(h[e.id]=o.length<<1|1,R(i,t))o.push(n.facet(e));else{let i=e.combine(t.map(t=>t.value));o.push(n&&e.compare(i,n.facet(e))?n.facet(e):i)}else{for(let e of t)0==e.type?(h[e.id]=o.length<<1|1,o.push(e.value)):(h[e.id]=l.length<<1,l.push(t=>e.dynamicSlot(t)));h[e.id]=l.length<<1,l.push(n=>B(n,e,t))}}let c=l.map(t=>t(h));return new U(t,r,c,h,o,s)}}function G(t,e){if(1&e)return 2;let n=e>>1,i=t.status[n];if(4==i)throw new Error("Cyclic dependency between fields and/or facets");if(2&i)return i;t.status[n]=4;let s=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|s}function H(t,e){return 1&e?t.config.staticValues[e>>1]:t.values[e>>1]}const K=/* @__PURE__ */O.define(),Q=/* @__PURE__ */O.define({combine:t=>t.some(t=>t),static:!0}),X=/* @__PURE__ */O.define({combine:t=>t.length?t[0]:void 0,static:!0}),Y=/* @__PURE__ */O.define(),Z=/* @__PURE__ */O.define(),tt=/* @__PURE__ */O.define(),et=/* @__PURE__ */O.define({combine:t=>!!t.length&&t[0]});class nt{constructor(t,e){this.type=t,this.value=e}static define(){return new it}}class it{of(t){return new nt(this,t)}}class st{constructor(t){this.map=t}of(t){return new rt(this,t)}}class rt{constructor(t,e){this.type=t,this.value=e}map(t){let e=this.type.map(this.value,t);return void 0===e?void 0:e==this.value?this:new rt(this.type,e)}is(t){return this.type==t}static define(t={}){return new st(t.map||(t=>t))}static mapEffects(t,e){if(!t.length)return t;let n=[];for(let i of t){let t=i.map(e);t&&n.push(t)}return n}}rt.reconfigure=/* @__PURE__ */rt.define(),rt.appendConfig=/* @__PURE__ */rt.define();class ht{constructor(t,e,n,i,s,r){this.startState=t,this.changes=e,this.selection=n,this.effects=i,this.annotations=s,this.scrollIntoView=r,this._doc=null,this._state=null,n&&M(n,e.newLength),s.some(t=>t.type==ht.time)||(this.annotations=s.concat(ht.time.of(Date.now())))}static create(t,e,n,i,s,r){return new ht(t,e,n,i,s,r)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(t){for(let e of this.annotations)if(e.type==t)return e.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let e=this.annotation(ht.userEvent);return!(!e||!(e==t||e.length>t.length&&e.slice(0,t.length)==t&&"."==e[t.length]))}}function ot(t,e){let n=[];for(let i=0,s=0;;){let r,h;if(i<t.length&&(s==e.length||e[s]>=t[i]))r=t[i++],h=t[i++];else{if(!(s<e.length))return n;r=e[s++],h=e[s++]}!n.length||n[n.length-1]<r?n.push(r,h):n[n.length-1]<h&&(n[n.length-1]=h)}}function lt(t,e,n){var i;let s,r,h;return n?(s=e.changes,r=x.empty(e.changes.length),h=t.changes.compose(e.changes)):(s=e.changes.map(t.changes),r=t.changes.mapDesc(e.changes,!0),h=t.changes.compose(s)),{changes:h,selection:e.selection?e.selection.map(r):null===(i=t.selection)||void 0===i?void 0:i.map(s),effects:rt.mapEffects(t.effects,s).concat(rt.mapEffects(e.effects,r)),annotations:t.annotations.length?t.annotations.concat(e.annotations):e.annotations,scrollIntoView:t.scrollIntoView||e.scrollIntoView}}function at(t,e,n){let i=e.selection,s=ut(e.annotations);return e.userEvent&&(s=s.concat(ht.userEvent.of(e.userEvent))),{changes:e.changes instanceof x?e.changes:x.of(e.changes||[],n,t.facet(X)),selection:i&&(i instanceof E?i:E.single(i.anchor,i.head)),effects:ut(e.effects),annotations:s,scrollIntoView:!!e.scrollIntoView}}function ct(t,e,n){let i=at(t,e.length?e[0]:{},t.doc.length);e.length&&!1===e[0].filter&&(n=!1);for(let r=1;r<e.length;r++){!1===e[r].filter&&(n=!1);let s=!!e[r].sequential;i=lt(i,at(t,e[r],s?i.changes.newLength:t.doc.length),s)}let s=ht.create(t,i.changes,i.selection,i.effects,i.annotations,i.scrollIntoView);return function(t){let e=t.startState,n=e.facet(tt),i=t;for(let s=n.length-1;s>=0;s--){let r=n[s](t);r&&Object.keys(r).length&&(i=lt(i,at(e,r,t.changes.newLength),!0))}return i==t?t:ht.create(e,t.changes,t.selection,i.effects,i.annotations,i.scrollIntoView)}(n?function(t){let e=t.startState,n=!0;for(let s of e.facet(Y)){let e=s(t);if(!1===e){n=!1;break}Array.isArray(e)&&(n=!0===n?e:ot(n,e))}if(!0!==n){let i,s;if(!1===n)s=t.changes.invertedDesc,i=x.empty(e.doc.length);else{let e=t.changes.filter(n);i=e.changes,s=e.filtered.mapDesc(e.changes).invertedDesc}t=ht.create(e,i,t.selection&&t.selection.map(s),rt.mapEffects(t.effects,s),t.annotations,t.scrollIntoView)}let i=e.facet(Z);for(let s=i.length-1;s>=0;s--){let n=i[s](t);t=n instanceof ht?n:Array.isArray(n)&&1==n.length&&n[0]instanceof ht?n[0]:ct(e,ut(n),!1)}return t}(s):s)}ht.time=/* @__PURE__ */nt.define(),ht.userEvent=/* @__PURE__ */nt.define(),ht.addToHistory=/* @__PURE__ */nt.define(),ht.remote=/* @__PURE__ */nt.define();const ft=[];function ut(t){return null==t?ft:Array.isArray(t)?t:[t]}var gt=/* @__PURE__ */function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(gt||(gt={}));const dt=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let pt;try{pt=/* @__PURE__ */new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(Lt){}function mt(t){return e=>{if(!/\S/.test(e))return gt.Space;if(function(t){if(pt)return pt.test(t);for(let e=0;e<t.length;e++){let n=t[e];if(/\w/.test(n)||n>""&&(n.toUpperCase()!=n.toLowerCase()||dt.test(n)))return!0}return!1}(e))return gt.Word;for(let n=0;n<t.length;n++)if(e.indexOf(t[n])>-1)return gt.Word;return gt.Other}}class vt{constructor(t,e,n,i,s,r){this.config=t,this.doc=e,this.selection=n,this.values=i,this.status=t.statusTemplate.slice(),this.computeSlot=s,r&&(r._state=this);for(let h=0;h<this.config.dynamicSlots.length;h++)G(this,h<<1);this.computeSlot=null}field(t,e=!0){let n=this.config.address[t.id];if(null!=n)return G(this,n),H(this,n);if(e)throw new RangeError("Field is not present in this state")}update(...t){return ct(this,t,!0)}applyTransaction(t){let e,n=this.config,{base:i,compartments:s}=n;for(let h of t.effects)h.is(_.reconfigure)?(n&&(s=/* @__PURE__ */new Map,n.compartments.forEach((t,e)=>s.set(e,t)),n=null),s.set(h.value.compartment,h.value.extension)):h.is(rt.reconfigure)?(n=null,i=h.value):h.is(rt.appendConfig)&&(n=null,i=ut(i).concat(h.value));if(n)e=t.startState.values.slice();else{n=U.resolve(i,s,this),e=new vt(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(t,e)=>e.reconfigure(t,this),null).values}let r=t.startState.facet(Q)?t.newSelection:t.newSelection.asSingle();new vt(n,t.newDoc,r,e,(e,n)=>n.update(e,t),t)}replaceSelection(t){return"string"==typeof t&&(t=this.toText(t)),this.changeByRange(e=>({changes:{from:e.from,to:e.to,insert:t},range:E.cursor(e.from+t.length)}))}changeByRange(t){let e=this.selection,n=t(e.ranges[0]),i=this.changes(n.changes),s=[n.range],r=ut(n.effects);for(let h=1;h<e.ranges.length;h++){let n=t(e.ranges[h]),o=this.changes(n.changes),l=o.map(i);for(let t=0;t<h;t++)s[t]=s[t].map(l);let a=i.mapDesc(o,!0);s.push(n.range.map(a)),i=i.compose(l),r=rt.mapEffects(r,l).concat(rt.mapEffects(ut(n.effects),a))}return{changes:i,selection:E.create(s,e.mainIndex),effects:r}}changes(t=[]){return t instanceof x?t:x.of(t,this.doc.length,this.facet(vt.lineSeparator))}toText(t){return e.of(t.split(this.facet(vt.lineSeparator)||p))}sliceDoc(t=0,e=this.doc.length){return this.doc.sliceString(t,e,this.lineBreak)}facet(t){let e=this.config.address[t.id];return null==e?t.default:(G(this,e),H(this,e))}toJSON(t){let e={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(t)for(let n in t){let i=t[n];i instanceof J&&null!=this.config.address[i.id]&&(e[n]=i.spec.toJSON(this.field(t[n]),this))}return e}static fromJSON(t,e={},n){if(!t||"string"!=typeof t.doc)throw new RangeError("Invalid JSON representation for EditorState");let i=[];if(n)for(let s in n)if(Object.prototype.hasOwnProperty.call(t,s)){let e=n[s],r=t[s];i.push(e.init(t=>e.spec.fromJSON(r,t)))}return vt.create({doc:t.doc,selection:E.fromJSON(t.selection),extensions:e.extensions?i.concat([e.extensions]):i})}static create(t={}){let n=U.resolve(t.extensions||[],/* @__PURE__ */new Map),i=t.doc instanceof e?t.doc:e.of((t.doc||"").split(n.staticFacet(vt.lineSeparator)||p)),s=t.selection?t.selection instanceof E?t.selection:E.single(t.selection.anchor,t.selection.head):E.single(0);return M(s,i.length),n.staticFacet(Q)||(s=s.asSingle()),new vt(n,i,s,n.dynamicSlots.map(()=>null),(t,e)=>e.create(t),null)}get tabSize(){return this.facet(vt.tabSize)}get lineBreak(){return this.facet(vt.lineSeparator)||"\n"}get readOnly(){return this.facet(et)}phrase(t,...e){for(let n of this.facet(vt.phrases))if(Object.prototype.hasOwnProperty.call(n,t)){t=n[t];break}return e.length&&(t=t.replace(/\$(\$|\d*)/g,(t,n)=>{if("$"==n)return"$";let i=+(n||1);return!i||i>e.length?t:e[i-1]})),t}languageDataAt(t,e,n=-1){let i=[];for(let s of this.facet(K))for(let r of s(this,e,n))Object.prototype.hasOwnProperty.call(r,t)&&i.push(r[t]);return i}charCategorizer(t){let e=this.languageDataAt("wordChars",t);return mt(e.length?e[0]:"")}wordAt(t){let{text:e,from:n,length:i}=this.doc.lineAt(t),s=this.charCategorizer(t),r=t-n,h=t-n;for(;r>0;){let t=f(e,r,!1);if(s(e.slice(t,r))!=gt.Word)break;r=t}for(;h<i;){let t=f(e,h);if(s(e.slice(h,t))!=gt.Word)break;h=t}return r==h?null:E.range(r+n,h+n)}}function xt(t,e,n={}){let i={};for(let s of t)for(let t of Object.keys(s)){let e=s[t],r=i[t];if(void 0===r)i[t]=e;else if(r===e||void 0===e);else{if(!Object.hasOwnProperty.call(n,t))throw new Error("Config merge conflict for field "+t);i[t]=n[t](r,e)}}for(let s in e)void 0===i[s]&&(i[s]=e[s]);return i}vt.allowMultipleSelections=Q,vt.tabSize=/* @__PURE__ */O.define({combine:t=>t.length?t[0]:4}),vt.lineSeparator=X,vt.readOnly=et,vt.phrases=/* @__PURE__ */O.define({compare(t,e){let n=Object.keys(t),i=Object.keys(e);return n.length==i.length&&n.every(n=>t[n]==e[n])}}),vt.languageData=K,vt.changeFilter=Y,vt.transactionFilter=Z,vt.transactionExtender=tt,_.reconfigure=/* @__PURE__ */rt.define();class wt{eq(t){return this==t}range(t,e=t){return kt.create(t,e,this)}}function yt(t,e){return t==e||t.constructor==e.constructor&&t.eq(e)}wt.prototype.startSide=wt.prototype.endSide=0,wt.prototype.point=!1,wt.prototype.mapMode=m.TrackDel;class kt{constructor(t,e,n){this.from=t,this.to=e,this.value=n}static create(t,e,n){return new kt(t,e,n)}}function St(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class It{constructor(t,e,n,i){this.from=t,this.to=e,this.value=n,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(t,e,n,i=0){let s=n?this.to:this.from;for(let r=i,h=s.length;;){if(r==h)return r;let i=r+h>>1,o=s[i]-t||(n?this.value[i].endSide:this.value[i].startSide)-e;if(i==r)return o>=0?r:h;o>=0?h=i:r=i+1}}between(t,e,n,i){for(let s=this.findIndex(e,-1e9,!0),r=this.findIndex(n,1e9,!1,s);s<r;s++)if(!1===i(this.from[s]+t,this.to[s]+t,this.value[s]))return!1}map(t,e){let n=[],i=[],s=[],r=-1,h=-1;for(let o=0;o<this.value.length;o++){let l,a,c=this.value[o],f=this.from[o]+t,u=this.to[o]+t;if(f==u){let t=e.mapPos(f,c.startSide,c.mapMode);if(null==t)continue;if(l=a=t,c.startSide!=c.endSide&&(a=e.mapPos(f,c.endSide),a<l))continue}else if(l=e.mapPos(f,c.startSide),a=e.mapPos(u,c.endSide),l>a||l==a&&c.startSide>0&&c.endSide<=0)continue;(a-l||c.endSide-c.startSide)<0||(r<0&&(r=l),c.point&&(h=Math.max(h,a-l)),n.push(c),i.push(l-r),s.push(a-r))}return{mapped:n.length?new It(i,s,n,h):null,pos:r}}}class bt{constructor(t,e,n,i){this.chunkPos=t,this.chunk=e,this.nextLayer=n,this.maxPoint=i}static create(t,e,n,i){return new bt(t,e,n,i)}get length(){let t=this.chunk.length-1;return t<0?0:Math.max(this.chunkEnd(t),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let t=this.nextLayer.size;for(let e of this.chunk)t+=e.value.length;return t}chunkEnd(t){return this.chunkPos[t]+this.chunk[t].length}update(t){let{add:e=[],sort:n=!1,filterFrom:i=0,filterTo:s=this.length}=t,r=t.filter;if(0==e.length&&!r)return this;if(n&&(e=e.slice().sort(St)),this.isEmpty)return e.length?bt.of(e):this;let h=new Mt(this,null,-1).goto(0),o=0,l=[],a=new Pt;for(;h.value||o<e.length;)if(o<e.length&&(h.from-e[o].from||h.startSide-e[o].value.startSide)>=0){let t=e[o++];a.addInner(t.from,t.to,t.value)||l.push(t)}else 1==h.rangeIndex&&h.chunkIndex<this.chunk.length&&(o==e.length||this.chunkEnd(h.chunkIndex)<e[o].from)&&(!r||i>this.chunkEnd(h.chunkIndex)||s<this.chunkPos[h.chunkIndex])&&a.addChunk(this.chunkPos[h.chunkIndex],this.chunk[h.chunkIndex])?h.nextChunk():((!r||i>h.to||s<h.from||r(h.from,h.to,h.value))&&(a.addInner(h.from,h.to,h.value)||l.push(kt.create(h.from,h.to,h.value))),h.next());return a.finishInner(this.nextLayer.isEmpty&&!l.length?bt.empty:this.nextLayer.update({add:l,filter:r,filterFrom:i,filterTo:s}))}map(t){if(t.empty||this.isEmpty)return this;let e=[],n=[],i=-1;for(let r=0;r<this.chunk.length;r++){let s=this.chunkPos[r],h=this.chunk[r],o=t.touchesRange(s,s+h.length);if(!1===o)i=Math.max(i,h.maxPoint),e.push(h),n.push(t.mapPos(s));else if(!0===o){let{mapped:r,pos:o}=h.map(s,t);r&&(i=Math.max(i,r.maxPoint),e.push(r),n.push(o))}}let s=this.nextLayer.map(t);return 0==e.length?s:new bt(n,e,s||bt.empty,i)}between(t,e,n){if(!this.isEmpty){for(let i=0;i<this.chunk.length;i++){let s=this.chunkPos[i],r=this.chunk[i];if(e>=s&&t<=s+r.length&&!1===r.between(s,t-s,e-s,n))return}this.nextLayer.between(t,e,n)}}iter(t=0){return At.from([this]).goto(t)}get isEmpty(){return this.nextLayer==this}static iter(t,e=0){return At.from(t).goto(e)}static compare(t,e,n,i,s=-1){let r=t.filter(t=>t.maxPoint>0||!t.isEmpty&&t.maxPoint>=s),h=e.filter(t=>t.maxPoint>0||!t.isEmpty&&t.maxPoint>=s),o=Et(r,h,n),l=new Rt(r,o,s),a=new Rt(h,o,s);n.iterGaps((t,e,n)=>Tt(l,t,a,e,n,i)),n.empty&&0==n.length&&Tt(l,0,a,0,0,i)}static eq(t,e,n=0,i){null==i&&(i=999999999);let s=t.filter(t=>!t.isEmpty&&e.indexOf(t)<0),r=e.filter(e=>!e.isEmpty&&t.indexOf(e)<0);if(s.length!=r.length)return!1;if(!s.length)return!0;let h=Et(s,r),o=new Rt(s,h,0).goto(n),l=new Rt(r,h,0).goto(n);for(;;){if(o.to!=l.to||!Ct(o.active,l.active)||o.point&&(!l.point||!yt(o.point,l.point)))return!1;if(o.to>i)return!0;o.next(),l.next()}}static spans(t,e,n,i,s=-1){let r=new Rt(t,null,s).goto(e),h=e,o=r.openStart;for(;;){let t=Math.min(r.to,n);if(r.point){let n=r.activeForPoint(r.to),s=r.pointFrom<e?n.length+1:r.point.startSide<0?n.length:Math.min(n.length,o);i.point(h,t,r.point,n,s,r.pointRank),o=Math.min(r.openEnd(t),n.length)}else t>h&&(i.span(h,t,r.active,o),o=r.openEnd(t));if(r.to>n)return o+(r.point&&r.to>n?1:0);h=r.to,r.next()}}static of(t,e=!1){let n=new Pt;for(let i of t instanceof kt?[t]:e?function(t){if(t.length>1)for(let e=t[0],n=1;n<t.length;n++){let i=t[n];if(St(e,i)>0)return t.slice().sort(St);e=i}return t}(t):t)n.add(i.from,i.to,i.value);return n.finish()}static join(t){if(!t.length)return bt.empty;let e=t[t.length-1];for(let n=t.length-2;n>=0;n--)for(let i=t[n];i!=bt.empty;i=i.nextLayer)e=new bt(i.chunkPos,i.chunk,e,Math.max(i.maxPoint,e.maxPoint));return e}}bt.empty=/* @__PURE__ */new bt([],[],null,-1),bt.empty.nextLayer=bt.empty;class Pt{finishChunk(t){this.chunks.push(new It(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,t&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(t,e,n){this.addInner(t,e,n)||(this.nextLayer||(this.nextLayer=new Pt)).add(t,e,n)}addInner(t,e,n){let i=t-this.lastTo||n.startSide-this.last.endSide;if(i<=0&&(t-this.lastFrom||n.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return!(i<0)&&(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=t),this.from.push(t-this.chunkStart),this.to.push(e-this.chunkStart),this.last=n,this.lastFrom=t,this.lastTo=e,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,e-t)),!0)}addChunk(t,e){if((t-this.lastTo||e.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,e.maxPoint),this.chunks.push(e),this.chunkPos.push(t);let n=e.value.length-1;return this.last=e.value[n],this.lastFrom=e.from[n]+t,this.lastTo=e.to[n]+t,!0}finish(){return this.finishInner(bt.empty)}finishInner(t){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return t;let e=bt.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(t):t,this.setMaxPoint);return this.from=null,e}}function Et(t,e,n){let i=/* @__PURE__ */new Map;for(let r of t)for(let t=0;t<r.chunk.length;t++)r.chunk[t].maxPoint<=0&&i.set(r.chunk[t],r.chunkPos[t]);let s=/* @__PURE__ */new Set;for(let r of e)for(let t=0;t<r.chunk.length;t++){let e=i.get(r.chunk[t]);null==e||(n?n.mapPos(e):e)!=r.chunkPos[t]||(null==n?void 0:n.touchesRange(e,e+r.chunk[t].length))||s.add(r.chunk[t])}return s}class Mt{constructor(t,e,n,i=0){this.layer=t,this.skip=e,this.minPoint=n,this.rank=i}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(t,e=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(t,e,!1),this}gotoInner(t,e,n){for(;this.chunkIndex<this.layer.chunk.length;){let e=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(e)||this.layer.chunkEnd(this.chunkIndex)<t||e.maxPoint<this.minPoint))break;this.chunkIndex++,n=!1}if(this.chunkIndex<this.layer.chunk.length){let i=this.layer.chunk[this.chunkIndex].findIndex(t-this.layer.chunkPos[this.chunkIndex],e,!0);(!n||this.rangeIndex<i)&&this.setRangeIndex(i)}this.next()}forward(t,e){(this.to-t||this.endSide-e)<0&&this.gotoInner(t,e,!0)}next(){for(;;){if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}{let t=this.layer.chunkPos[this.chunkIndex],e=this.layer.chunk[this.chunkIndex],n=t+e.from[this.rangeIndex];if(this.from=n,this.to=t+e.to[this.rangeIndex],this.value=e.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}}setRangeIndex(t){if(t==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=t}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(t){return this.from-t.from||this.startSide-t.startSide||this.rank-t.rank||this.to-t.to||this.endSide-t.endSide}}class At{constructor(t){this.heap=t}static from(t,e=null,n=-1){let i=[];for(let s=0;s<t.length;s++)for(let r=t[s];!r.isEmpty;r=r.nextLayer)r.maxPoint>=n&&i.push(new Mt(r,e,n,s));return 1==i.length?i[0]:new At(i)}get startSide(){return this.value?this.value.startSide:0}goto(t,e=-1e9){for(let n of this.heap)n.goto(t,e);for(let n=this.heap.length>>1;n>=0;n--)Ot(this.heap,n);return this.next(),this}forward(t,e){for(let n of this.heap)n.forward(t,e);for(let n=this.heap.length>>1;n>=0;n--)Ot(this.heap,n);(this.to-t||this.value.endSide-e)<0&&this.next()}next(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let t=this.heap[0];this.from=t.from,this.to=t.to,this.value=t.value,this.rank=t.rank,t.value&&t.next(),Ot(this.heap,0)}}}function Ot(t,e){for(let n=t[e];;){let i=1+(e<<1);if(i>=t.length)break;let s=t[i];if(i+1<t.length&&s.compare(t[i+1])>=0&&(s=t[i+1],i++),n.compare(s)<0)break;t[i]=n,t[e]=s,e=i}}class Rt{constructor(t,e,n){this.minPoint=n,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=At.from(t,e,n)}goto(t,e=-1e9){return this.cursor.goto(t,e),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=t,this.endSide=e,this.openStart=-1,this.next(),this}forward(t,e){for(;this.minActive>-1&&(this.activeTo[this.minActive]-t||this.active[this.minActive].endSide-e)<0;)this.removeActive(this.minActive);this.cursor.forward(t,e)}removeActive(t){Nt(this.active,t),Nt(this.activeTo,t),Nt(this.activeRank,t),this.minActive=Ft(this.active,this.activeTo)}addActive(t){let e=0,{value:n,to:i,rank:s}=this.cursor;for(;e<this.activeRank.length&&(s-this.activeRank[e]||i-this.activeTo[e])>0;)e++;Bt(this.active,e,n),Bt(this.activeTo,e,i),Bt(this.activeRank,e,s),t&&Bt(t,e,this.cursor.from),this.minActive=Ft(this.active,this.activeTo)}next(){let t=this.to,e=this.point;this.point=null;let n=this.openStart<0?[]:null;for(;;){let i=this.minActive;if(i>-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>t){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),n&&Nt(n,i)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}if(this.cursor.from>t){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}{let t=this.cursor.value;if(t.point){if(!(e&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)){this.point=t,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=t.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}this.cursor.next()}else this.addActive(n),this.cursor.next()}}}if(n){this.openStart=0;for(let e=n.length-1;e>=0&&n[e]<t;e--)this.openStart++}}activeForPoint(t){if(!this.active.length)return this.active;let e=[];for(let n=this.active.length-1;n>=0&&!(this.activeRank[n]<this.pointRank);n--)(this.activeTo[n]>t||this.activeTo[n]==t&&this.active[n].endSide>=this.point.endSide)&&e.push(this.active[n]);return e.reverse()}openEnd(t){let e=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>t;n--)e++;return e}}function Tt(t,e,n,i,s,r){t.goto(e),n.goto(i);let h=i+s,o=i,l=i-e,a=!!r.boundChange;for(let c=!1;;){let e=t.to+l-n.to,i=e||t.endSide-n.endSide,s=i<0?t.to+l:n.to,f=Math.min(s,h);if(t.point||n.point?(t.point&&n.point&&yt(t.point,n.point)&&Ct(t.activeForPoint(t.to),n.activeForPoint(n.to))||r.comparePoint(o,f,t.point,n.point),c=!1):(c&&r.boundChange(o),f>o&&!Ct(t.active,n.active)&&r.compareRange(o,f,t.active,n.active),a&&f<h&&(e||t.openEnd(s)!=n.openEnd(s))&&(c=!0)),s>h)break;o=s,i<=0&&t.next(),i>=0&&n.next()}}function Ct(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!=e[n]&&!yt(t[n],e[n]))return!1;return!0}function Nt(t,e){for(let n=e,i=t.length-1;n<i;n++)t[n]=t[n+1];t.pop()}function Bt(t,e,n){for(let i=t.length-1;i>=e;i--)t[i+1]=t[i];t[e]=n}function Ft(t,e){let n=-1,i=1e9;for(let s=0;s<e.length;s++)(e[s]-i||t[s].endSide-t[n].endSide)<0&&(n=s,i=e[s]);return n}function Jt(t,e,n=t.length){let i=0;for(let s=0;s<n&&s<t.length;)9==t.charCodeAt(s)?(i+=e-i%e,s++):(i++,s=f(t,s));return i}function Dt(t,e,n,i){for(let s=0,r=0;;){if(r>=e)return s;if(s==t.length)break;r+=9==t.charCodeAt(s)?n-r%n:1,s=f(t,s)}return!0===i?-1:t.length}export{nt as Annotation,it as AnnotationType,v as ChangeDesc,x as ChangeSet,gt as CharCategory,_ as Compartment,E as EditorSelection,vt as EditorState,O as Facet,a as Line,m as MapMode,z as Prec,kt as Range,bt as RangeSet,Pt as RangeSetBuilder,wt as RangeValue,P as SelectionRange,rt as StateEffect,st as StateEffectType,J as StateField,e as Text,ht as Transaction,u as codePointAt,d as codePointSize,xt as combineConfig,Jt as countColumn,f as findClusterBreak,Dt as findColumn,g as fromCodePoint};
|