@gsc-basic/components 1.1.7 → 1.1.8

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.
Files changed (1053) hide show
  1. package/dist/es/Button/index.js +9 -4
  2. package/dist/es/Button/src/Button.css +3 -3
  3. package/dist/es/Button/src/Button.vue.js +44 -4
  4. package/dist/es/Button/src/Button2.css +3 -3
  5. package/dist/es/CodeEditor/index.js +9 -4
  6. package/dist/es/CodeEditor/src/index.css +3 -3
  7. package/dist/es/CodeEditor/src/index.vue.js +148 -4
  8. package/dist/es/CodeEditor/src/index2.css +3 -3
  9. package/dist/es/CodeEditor/src/index3.css +3 -3
  10. package/dist/es/ConfigProvider/index.js +9 -4
  11. package/dist/es/ConfigProvider/src/configProvider.js +17 -4
  12. package/dist/es/ConfigProvider/src/configProviderProps.js +25 -4
  13. package/dist/es/ConfigProvider/src/constants.js +12 -4
  14. package/dist/es/ConfigProvider/src/useGlobalConfig.js +48 -4
  15. package/dist/es/CountTo/index.js +9 -4
  16. package/dist/es/CountTo/src/index.css +3 -3
  17. package/dist/es/CountTo/src/index.vue.js +126 -4
  18. package/dist/es/Ellipsis/index.js +9 -4
  19. package/dist/es/Ellipsis/src/components/JsEllipsis.css +3 -3
  20. package/dist/es/Ellipsis/src/components/JsEllipsis.vue.js +181 -4
  21. package/dist/es/Ellipsis/src/components/NativeEllipsis.css +3 -3
  22. package/dist/es/Ellipsis/src/components/NativeEllipsis.vue.js +44 -4
  23. package/dist/es/Ellipsis/src/components/NativeEllipsis2.css +3 -3
  24. package/dist/es/Ellipsis/src/index.css +3 -3
  25. package/dist/es/Ellipsis/src/index.vue.js +96 -4
  26. package/dist/es/Ellipsis/src/utils/utils.js +59 -4
  27. package/dist/es/Form/index.js +9 -4
  28. package/dist/es/Form/src/Form.css +3 -3
  29. package/dist/es/Form/src/Form.vue.js +377 -4
  30. package/dist/es/Form/src/Form2.css +3 -3
  31. package/dist/es/Form/src/styles/form.css +3 -3
  32. package/dist/es/Marquee/index.js +9 -4
  33. package/dist/es/Marquee/src/index.css +3 -3
  34. package/dist/es/Marquee/src/index.vue.js +191 -4
  35. package/dist/es/Marquee/src/index2.css +3 -3
  36. package/dist/es/Overlay/index.js +64 -4
  37. package/dist/es/Overlay/src/Message.css +3 -3
  38. package/dist/es/Overlay/src/Message.vue.js +39 -4
  39. package/dist/es/Overlay/src/Message2.css +3 -3
  40. package/dist/es/Overlay/src/Modal.css +3 -3
  41. package/dist/es/Overlay/src/Modal.vue.js +70 -4
  42. package/dist/es/Overlay/src/Modal2.css +3 -3
  43. package/dist/es/Overlay/src/Notice.css +3 -3
  44. package/dist/es/Overlay/src/Notice.vue.js +40 -4
  45. package/dist/es/Overlay/src/Notice2.css +3 -3
  46. package/dist/es/Overlay/src/Tooltip.css +3 -3
  47. package/dist/es/Overlay/src/Tooltip.vue.js +87 -4
  48. package/dist/es/Overlay/src/Tooltip2.css +3 -3
  49. package/dist/es/RichTextEditor/index.js +9 -4
  50. package/dist/es/RichTextEditor/src/ToolbarPanel.css +3 -3
  51. package/dist/es/RichTextEditor/src/ToolbarPanel.vue.js +162 -4
  52. package/dist/es/RichTextEditor/src/ToolbarPanel2.css +3 -3
  53. package/dist/es/RichTextEditor/src/components/BlockquoteButton.css +4 -4
  54. package/dist/es/RichTextEditor/src/components/BlockquoteButton.vue.js +40 -4
  55. package/dist/es/RichTextEditor/src/components/CodeBlockButton.css +4 -4
  56. package/dist/es/RichTextEditor/src/components/CodeBlockButton.vue.js +40 -4
  57. package/dist/es/RichTextEditor/src/components/ColorHighlightPopover.css +3 -3
  58. package/dist/es/RichTextEditor/src/components/ColorHighlightPopover.vue.js +40 -4
  59. package/dist/es/RichTextEditor/src/components/FontSizeDropdownMenu.css +3 -3
  60. package/dist/es/RichTextEditor/src/components/FontSizeDropdownMenu.vue.js +58 -4
  61. package/dist/es/RichTextEditor/src/components/HeadingDropdownMenu.css +3 -3
  62. package/dist/es/RichTextEditor/src/components/HeadingDropdownMenu.vue.js +69 -4
  63. package/dist/es/RichTextEditor/src/components/ImageUploadButton.css +4 -4
  64. package/dist/es/RichTextEditor/src/components/ImageUploadButton.vue.js +74 -4
  65. package/dist/es/RichTextEditor/src/components/LinkPopover.css +4 -4
  66. package/dist/es/RichTextEditor/src/components/LinkPopover.vue.js +92 -4
  67. package/dist/es/RichTextEditor/src/components/LinkPopover2.css +4 -4
  68. package/dist/es/RichTextEditor/src/components/ListDropdownMenu.css +3 -3
  69. package/dist/es/RichTextEditor/src/components/ListDropdownMenu.vue.js +76 -4
  70. package/dist/es/RichTextEditor/src/components/MarkButton.css +4 -4
  71. package/dist/es/RichTextEditor/src/components/MarkButton.vue.js +89 -4
  72. package/dist/es/RichTextEditor/src/components/TableButton.css +3 -3
  73. package/dist/es/RichTextEditor/src/components/TableButton.vue.js +165 -4
  74. package/dist/es/RichTextEditor/src/components/TextAlignDropdownMenu.css +3 -3
  75. package/dist/es/RichTextEditor/src/components/TextAlignDropdownMenu.vue.js +85 -4
  76. package/dist/es/RichTextEditor/src/components/TextColorPopover.css +3 -3
  77. package/dist/es/RichTextEditor/src/components/TextColorPopover.vue.js +40 -4
  78. package/dist/es/RichTextEditor/src/components/ToolbarGroup.css +3 -3
  79. package/dist/es/RichTextEditor/src/components/ToolbarGroup.vue.js +19 -4
  80. package/dist/es/RichTextEditor/src/components/ToolbarSeparator.css +3 -3
  81. package/dist/es/RichTextEditor/src/components/ToolbarSeparator.vue.js +17 -4
  82. package/dist/es/RichTextEditor/src/components/UndoRedoButton.css +4 -4
  83. package/dist/es/RichTextEditor/src/components/UndoRedoButton.vue.js +54 -4
  84. package/dist/es/RichTextEditor/src/components/VideoUploadButton.css +4 -4
  85. package/dist/es/RichTextEditor/src/components/VideoUploadButton.vue.js +74 -4
  86. package/dist/es/RichTextEditor/src/components/basic/ColorPicker.css +4 -4
  87. package/dist/es/RichTextEditor/src/components/basic/ColorPicker.vue.js +101 -4
  88. package/dist/es/RichTextEditor/src/components/basic/MediaUploadModal.css +3 -3
  89. package/dist/es/RichTextEditor/src/components/basic/MediaUploadModal.vue.js +364 -4
  90. package/dist/es/RichTextEditor/src/components/basic/MediaUploadModal2.css +3 -3
  91. package/dist/es/RichTextEditor/src/components/basic/SelectMenu.css +4 -4
  92. package/dist/es/RichTextEditor/src/components/basic/SelectMenu.vue.js +137 -4
  93. package/dist/es/RichTextEditor/src/components/basic/SelectMenu2.css +4 -4
  94. package/dist/es/RichTextEditor/src/constant/index.js +53 -4
  95. package/dist/es/RichTextEditor/src/extensions/video.js +68 -4
  96. package/dist/es/RichTextEditor/src/index.css +4 -4
  97. package/dist/es/RichTextEditor/src/index.vue.js +158 -4
  98. package/dist/es/RichTextEditor/src/index2.css +4 -4
  99. package/dist/es/RichTextEditor/src/props.js +24 -4
  100. package/dist/es/ScaleScreen/index.js +9 -4
  101. package/dist/es/ScaleScreen/src/index.css +3 -3
  102. package/dist/es/ScaleScreen/src/index.vue.js +118 -4
  103. package/dist/es/ScaleScreen/src/index2.css +3 -3
  104. package/dist/es/Transition/index.js +30 -4
  105. package/dist/es/Transition/src/CollapseTransition.css +3 -3
  106. package/dist/es/Transition/src/CollapseTransition.vue.js +44 -4
  107. package/dist/es/Transition/src/CollapseTransition2.css +3 -3
  108. package/dist/es/Transition/src/CreateTransition.js +75 -6
  109. package/dist/es/Transition/src/ExpandTransition.js +42 -4
  110. package/dist/es/Transition/src/style/index.css +3 -3
  111. package/dist/es/Transition/style.js +4 -4
  112. package/dist/es/VideoBackground/index.js +9 -4
  113. package/dist/es/VideoBackground/src/helper.js +32 -4
  114. package/dist/es/VideoBackground/src/index.css +3 -3
  115. package/dist/es/VideoBackground/src/index.vue.js +111 -4
  116. package/dist/es/VideoBackground/src/index2.css +3 -3
  117. package/dist/es/VideoBackground/src/index3.css +3 -3
  118. package/dist/es/VideoBackground/src/videoBackground.js +34 -4
  119. package/dist/es/VideoPlayer/index.js +9 -4
  120. package/dist/es/VideoPlayer/src/index.css +3 -3
  121. package/dist/es/VideoPlayer/src/index.vue.js +63 -4
  122. package/dist/es/VirtualScroll/index.js +9 -4
  123. package/dist/es/VirtualScroll/src/index.css +3 -3
  124. package/dist/es/VirtualScroll/src/index.vue.js +11 -4
  125. package/dist/es/VirtualScroll/src/index.vue2.js +107 -4
  126. package/dist/es/VirtualScroll/src/index2.css +3 -3
  127. package/dist/es/_virtual/_commonjsHelpers.js +9 -4
  128. package/dist/es/_virtual/_plugin-vue_export-helper.js +12 -4
  129. package/dist/es/_virtual/delegate.js +10 -4
  130. package/dist/es/_virtual/download.js +10 -4
  131. package/dist/es/_virtual/download2.js +7 -4
  132. package/dist/es/_virtual/index.js +5 -4
  133. package/dist/es/_virtual/index2.js +7 -4
  134. package/dist/es/_virtual/index3.js +21 -0
  135. package/dist/es/{node_modules/@tanstack/store/dist/esm/types.js → _virtual/index4.js} +7 -4
  136. package/dist/es/hooks/useLocale.js +28 -4
  137. package/dist/es/hooks/useNamespace.js +11 -4
  138. package/dist/es/index.js +79 -4
  139. package/dist/es/locale/lang/en-US.js +167 -4
  140. package/dist/es/locale/lang/ja-JP.js +167 -4
  141. package/dist/es/locale/lang/zh-CN.js +167 -4
  142. package/dist/es/node_modules/@codemirror/autocomplete/dist/index.js +1379 -4
  143. package/dist/es/node_modules/@codemirror/commands/dist/index.js +847 -4
  144. package/dist/es/node_modules/@codemirror/lang-java/dist/index.js +41 -6
  145. package/dist/es/node_modules/@codemirror/lang-javascript/dist/index.js +315 -20
  146. package/dist/es/node_modules/@codemirror/lang-json/dist/index.js +51 -6
  147. package/dist/es/node_modules/@codemirror/lang-python/dist/index.js +402 -15
  148. package/dist/es/node_modules/@codemirror/lang-sql/dist/index.js +500 -7
  149. package/dist/es/node_modules/@codemirror/lang-xml/dist/index.js +219 -7
  150. package/dist/es/node_modules/@codemirror/lang-yaml/dist/index.js +54 -6
  151. package/dist/es/node_modules/@codemirror/language/dist/index.js +1304 -4
  152. package/dist/es/node_modules/@codemirror/lint/dist/index.js +660 -6
  153. package/dist/es/node_modules/@codemirror/search/dist/index.js +842 -5
  154. package/dist/es/node_modules/@codemirror/state/dist/index.js +2646 -4
  155. package/dist/es/node_modules/@codemirror/theme-one-dark/dist/index.js +135 -4
  156. package/dist/es/node_modules/@codemirror/view/dist/index.js +7492 -4
  157. package/dist/es/node_modules/@lezer/common/dist/index.js +1433 -5
  158. package/dist/es/node_modules/@lezer/highlight/dist/index.js +640 -4
  159. package/dist/es/node_modules/@lezer/java/dist/index.js +65 -4
  160. package/dist/es/node_modules/@lezer/javascript/dist/index.js +164 -4
  161. package/dist/es/node_modules/@lezer/json/dist/index.js +37 -4
  162. package/dist/es/node_modules/@lezer/lr/dist/index.js +1312 -4
  163. package/dist/es/node_modules/@lezer/python/dist/index.js +224 -4
  164. package/dist/es/node_modules/@lezer/xml/dist/index.js +103 -4
  165. package/dist/es/node_modules/@lezer/yaml/dist/index.js +277 -4
  166. package/dist/es/node_modules/@marijn/find-cluster-break/src/index.js +72 -4
  167. package/dist/es/node_modules/@tanstack/devtools-event-client/dist/esm/plugin.js +181 -4
  168. package/dist/es/node_modules/@tanstack/form-core/dist/esm/EventClient.js +16 -4
  169. package/dist/es/node_modules/@tanstack/form-core/dist/esm/FieldApi.js +409 -4
  170. package/dist/es/node_modules/@tanstack/form-core/dist/esm/FormApi.js +792 -4
  171. package/dist/es/node_modules/@tanstack/form-core/dist/esm/ValidationLogic.js +58 -4
  172. package/dist/es/node_modules/@tanstack/form-core/dist/esm/metaHelper.js +112 -5
  173. package/dist/es/node_modules/@tanstack/form-core/dist/esm/standardSchemaValidator.js +48 -4
  174. package/dist/es/node_modules/@tanstack/form-core/dist/esm/utils.js +216 -4
  175. package/dist/es/node_modules/@tanstack/pacer-lite/dist/lite-throttler.js +32 -4
  176. package/dist/es/node_modules/@tanstack/store/dist/esm/alien.js +221 -0
  177. package/dist/es/node_modules/@tanstack/store/dist/esm/atom.js +136 -0
  178. package/dist/es/node_modules/@tanstack/store/dist/esm/batch.js +25 -0
  179. package/dist/es/node_modules/@tanstack/store/dist/esm/store.js +47 -4
  180. package/dist/es/node_modules/@tanstack/vue-form/dist/esm/useField.js +41 -4
  181. package/dist/es/node_modules/@tanstack/vue-form/dist/esm/useForm.js +36 -4
  182. package/dist/es/node_modules/@tanstack/vue-store/dist/esm/index.js +51 -4
  183. package/dist/es/node_modules/@tiptap/core/dist/index.js +3984 -4
  184. package/dist/es/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js +20 -4
  185. package/dist/es/node_modules/@tiptap/extension-blockquote/dist/index.js +60 -5
  186. package/dist/es/node_modules/@tiptap/extension-bold/dist/index.js +82 -5
  187. package/dist/es/node_modules/@tiptap/extension-character-count/dist/index.js +9 -4
  188. package/dist/es/node_modules/@tiptap/extension-code/dist/index.js +57 -4
  189. package/dist/es/node_modules/@tiptap/extension-code-block/dist/index.js +220 -4
  190. package/dist/es/node_modules/@tiptap/extension-document/dist/index.js +15 -4
  191. package/dist/es/node_modules/@tiptap/extension-hard-break/dist/index.js +62 -4
  192. package/dist/es/node_modules/@tiptap/extension-heading/dist/index.js +66 -4
  193. package/dist/es/node_modules/@tiptap/extension-highlight/dist/index.js +88 -4
  194. package/dist/es/node_modules/@tiptap/extension-horizontal-rule/dist/index.js +59 -4
  195. package/dist/es/node_modules/@tiptap/extension-image/dist/index.js +133 -4
  196. package/dist/es/node_modules/@tiptap/extension-italic/dist/index.js +80 -4
  197. package/dist/es/node_modules/@tiptap/extension-link/dist/index.js +316 -4
  198. package/dist/es/node_modules/@tiptap/extension-list/dist/index.js +731 -4
  199. package/dist/es/node_modules/@tiptap/extension-paragraph/dist/index.js +47 -4
  200. package/dist/es/node_modules/@tiptap/extension-strike/dist/index.js +69 -4
  201. package/dist/es/node_modules/@tiptap/extension-subscript/dist/index.js +44 -4
  202. package/dist/es/node_modules/@tiptap/extension-superscript/dist/index.js +44 -4
  203. package/dist/es/node_modules/@tiptap/extension-table/dist/index.js +383 -4
  204. package/dist/es/node_modules/@tiptap/extension-task-item/dist/index.js +9 -4
  205. package/dist/es/node_modules/@tiptap/extension-task-list/dist/index.js +9 -4
  206. package/dist/es/node_modules/@tiptap/extension-text/dist/index.js +16 -4
  207. package/dist/es/node_modules/@tiptap/extension-text-align/dist/index.js +50 -4
  208. package/dist/es/node_modules/@tiptap/extension-text-style/dist/index.js +243 -4
  209. package/dist/es/node_modules/@tiptap/extension-underline/dist/index.js +68 -4
  210. package/dist/es/node_modules/@tiptap/extensions/dist/index.js +299 -4
  211. package/dist/es/node_modules/@tiptap/html/dist/index.js +28 -0
  212. package/dist/es/node_modules/@tiptap/starter-kit/dist/index.js +32 -4
  213. package/dist/es/node_modules/@tiptap/vue-3/dist/index.js +260 -4
  214. package/dist/es/node_modules/@vueuse/core/dist/index.js +354 -4
  215. package/dist/es/node_modules/@vueuse/shared/dist/index.js +139 -4
  216. package/dist/es/node_modules/codemirror/dist/index.js +43 -4
  217. package/dist/es/node_modules/crelt/index.js +30 -4
  218. package/dist/es/node_modules/delegate/src/closest.js +24 -4
  219. package/dist/es/node_modules/delegate/src/delegate.js +32 -4
  220. package/dist/es/node_modules/downloadjs/download.js +80 -4
  221. package/dist/es/node_modules/eventemitter3/index.js +114 -4
  222. package/dist/es/node_modules/linkifyjs/dist/linkify.js +710 -4
  223. package/dist/es/node_modules/lodash-es/_DataView.js +9 -4
  224. package/dist/es/node_modules/lodash-es/_Hash.js +23 -4
  225. package/dist/es/node_modules/lodash-es/_ListCache.js +23 -4
  226. package/dist/es/node_modules/lodash-es/_Map.js +9 -4
  227. package/dist/es/node_modules/lodash-es/_MapCache.js +23 -4
  228. package/dist/es/node_modules/lodash-es/_Promise.js +9 -4
  229. package/dist/es/node_modules/lodash-es/_Set.js +9 -4
  230. package/dist/es/node_modules/lodash-es/_SetCache.js +26 -0
  231. package/dist/es/node_modules/lodash-es/_Stack.js +21 -4
  232. package/dist/es/node_modules/lodash-es/_Symbol.js +8 -4
  233. package/dist/es/node_modules/lodash-es/_Uint8Array.js +8 -4
  234. package/dist/es/node_modules/lodash-es/_WeakMap.js +9 -4
  235. package/dist/es/node_modules/lodash-es/_apply.js +19 -4
  236. package/dist/es/node_modules/lodash-es/_arrayEach.js +11 -4
  237. package/dist/es/node_modules/lodash-es/_arrayFilter.js +13 -4
  238. package/dist/es/node_modules/lodash-es/_arrayIncludes.js +21 -0
  239. package/dist/es/node_modules/lodash-es/_arrayIncludesWith.js +22 -0
  240. package/dist/es/node_modules/lodash-es/_arrayLikeKeys.js +23 -4
  241. package/dist/es/node_modules/lodash-es/_arrayMap.js +11 -4
  242. package/dist/es/node_modules/lodash-es/_arrayPush.js +11 -4
  243. package/dist/es/node_modules/lodash-es/_arraySome.js +22 -0
  244. package/dist/es/node_modules/lodash-es/_asciiToArray.js +9 -4
  245. package/dist/es/node_modules/lodash-es/_assignMergeValue.js +21 -0
  246. package/dist/es/node_modules/lodash-es/_assignValue.js +13 -4
  247. package/dist/es/node_modules/lodash-es/_assocIndexOf.js +13 -4
  248. package/dist/es/node_modules/lodash-es/_baseAssignValue.js +15 -4
  249. package/dist/es/node_modules/lodash-es/_baseClone.js +57 -4
  250. package/dist/es/node_modules/lodash-es/_baseCreate.js +30 -0
  251. package/dist/es/node_modules/lodash-es/_baseFindIndex.js +22 -0
  252. package/dist/es/node_modules/lodash-es/_baseFlatten.js +16 -4
  253. package/dist/es/node_modules/lodash-es/_baseFor.js +18 -0
  254. package/dist/es/node_modules/lodash-es/_baseGet.js +14 -4
  255. package/dist/es/node_modules/lodash-es/_baseGetAllKeys.js +12 -4
  256. package/dist/es/node_modules/lodash-es/_baseGetTag.js +13 -4
  257. package/dist/es/node_modules/lodash-es/_baseIndexOf.js +22 -0
  258. package/dist/es/node_modules/lodash-es/_baseIntersection.js +42 -0
  259. package/dist/es/node_modules/lodash-es/_baseIsArguments.js +12 -4
  260. package/dist/es/node_modules/lodash-es/_baseIsEqual.js +21 -0
  261. package/dist/es/node_modules/lodash-es/_baseIsEqualDeep.js +45 -0
  262. package/dist/es/node_modules/lodash-es/_baseIsMap.js +12 -4
  263. package/dist/es/node_modules/lodash-es/_baseIsNaN.js +19 -0
  264. package/dist/es/node_modules/lodash-es/_baseIsNative.js +19 -4
  265. package/dist/es/node_modules/lodash-es/_baseIsRegExp.js +12 -4
  266. package/dist/es/node_modules/lodash-es/_baseIsSet.js +12 -4
  267. package/dist/es/node_modules/lodash-es/_baseIsTypedArray.js +15 -4
  268. package/dist/es/node_modules/lodash-es/_baseKeys.js +27 -0
  269. package/dist/es/node_modules/lodash-es/_baseKeysIn.js +18 -4
  270. package/dist/es/node_modules/lodash-es/_baseMerge.js +33 -0
  271. package/dist/es/node_modules/lodash-es/_baseMergeDeep.js +44 -0
  272. package/dist/es/node_modules/lodash-es/_baseRest.js +22 -0
  273. package/dist/es/node_modules/lodash-es/_baseSetToString.js +17 -4
  274. package/dist/es/node_modules/lodash-es/_baseSlice.js +13 -4
  275. package/dist/es/node_modules/lodash-es/_baseTimes.js +11 -4
  276. package/dist/es/node_modules/lodash-es/_baseToString.js +21 -4
  277. package/dist/es/node_modules/lodash-es/_baseUnary.js +11 -4
  278. package/dist/es/node_modules/lodash-es/_baseUniq.js +46 -0
  279. package/dist/es/node_modules/lodash-es/_baseUnset.js +31 -4
  280. package/dist/es/node_modules/lodash-es/_cacheHas.js +19 -0
  281. package/dist/es/node_modules/lodash-es/_castArrayLikeObject.js +20 -0
  282. package/dist/es/node_modules/lodash-es/_castPath.js +13 -4
  283. package/dist/es/node_modules/lodash-es/_castSlice.js +11 -4
  284. package/dist/es/node_modules/lodash-es/_cloneArrayBuffer.js +11 -4
  285. package/dist/es/node_modules/lodash-es/_cloneBuffer.js +14 -4
  286. package/dist/es/node_modules/lodash-es/_cloneDataView.js +11 -4
  287. package/dist/es/node_modules/lodash-es/_cloneRegExp.js +11 -4
  288. package/dist/es/node_modules/lodash-es/_cloneSymbol.js +11 -4
  289. package/dist/es/node_modules/lodash-es/_cloneTypedArray.js +11 -4
  290. package/dist/es/node_modules/lodash-es/_copyArray.js +22 -0
  291. package/dist/es/node_modules/lodash-es/_copyObject.js +17 -4
  292. package/dist/es/node_modules/lodash-es/_coreJsData.js +8 -4
  293. package/dist/es/node_modules/lodash-es/_createAssigner.js +28 -0
  294. package/dist/es/node_modules/lodash-es/_createBaseFor.js +26 -0
  295. package/dist/es/node_modules/lodash-es/_createCaseFirst.js +17 -4
  296. package/dist/es/node_modules/lodash-es/_createSet.js +22 -0
  297. package/dist/es/node_modules/lodash-es/_customOmitClone.js +10 -4
  298. package/dist/es/node_modules/lodash-es/_defineProperty.js +14 -4
  299. package/dist/es/node_modules/lodash-es/_equalArrays.js +53 -0
  300. package/dist/es/node_modules/lodash-es/_equalByTag.js +58 -0
  301. package/dist/es/node_modules/lodash-es/_equalObjects.js +49 -0
  302. package/dist/es/node_modules/lodash-es/_flatRest.js +12 -4
  303. package/dist/es/node_modules/lodash-es/_freeGlobal.js +7 -4
  304. package/dist/es/node_modules/lodash-es/_getAllKeys.js +22 -0
  305. package/dist/es/node_modules/lodash-es/_getAllKeysIn.js +12 -4
  306. package/dist/es/node_modules/lodash-es/_getMapData.js +11 -4
  307. package/dist/es/node_modules/lodash-es/_getNative.js +12 -4
  308. package/dist/es/node_modules/lodash-es/_getPrototype.js +8 -4
  309. package/dist/es/node_modules/lodash-es/_getRawTag.js +18 -4
  310. package/dist/es/node_modules/lodash-es/_getSymbols.js +13 -4
  311. package/dist/es/node_modules/lodash-es/_getSymbolsIn.js +15 -4
  312. package/dist/es/node_modules/lodash-es/_getTag.js +31 -4
  313. package/dist/es/node_modules/lodash-es/_getValue.js +9 -4
  314. package/dist/es/node_modules/lodash-es/_hasUnicode.js +10 -4
  315. package/dist/es/node_modules/lodash-es/_hashClear.js +10 -4
  316. package/dist/es/node_modules/lodash-es/_hashDelete.js +10 -4
  317. package/dist/es/node_modules/lodash-es/_hashGet.js +16 -4
  318. package/dist/es/node_modules/lodash-es/_hashHas.js +12 -4
  319. package/dist/es/node_modules/lodash-es/_hashSet.js +12 -4
  320. package/dist/es/node_modules/lodash-es/_initCloneArray.js +11 -4
  321. package/dist/es/node_modules/lodash-es/_initCloneByTag.js +45 -4
  322. package/dist/es/node_modules/lodash-es/_initCloneObject.js +22 -0
  323. package/dist/es/node_modules/lodash-es/_isFlattenable.js +13 -4
  324. package/dist/es/node_modules/lodash-es/_isIndex.js +11 -4
  325. package/dist/es/node_modules/lodash-es/_isIterateeCall.js +26 -0
  326. package/dist/es/node_modules/lodash-es/_isKey.js +15 -4
  327. package/dist/es/node_modules/lodash-es/_isKeyable.js +10 -4
  328. package/dist/es/node_modules/lodash-es/_isMasked.js +14 -4
  329. package/dist/es/node_modules/lodash-es/_isPrototype.js +11 -4
  330. package/dist/es/node_modules/lodash-es/_listCacheClear.js +9 -4
  331. package/dist/es/node_modules/lodash-es/_listCacheDelete.js +15 -4
  332. package/dist/es/node_modules/lodash-es/_listCacheGet.js +11 -4
  333. package/dist/es/node_modules/lodash-es/_listCacheHas.js +10 -4
  334. package/dist/es/node_modules/lodash-es/_listCacheSet.js +11 -4
  335. package/dist/es/node_modules/lodash-es/_mapCacheClear.js +16 -4
  336. package/dist/es/node_modules/lodash-es/_mapCacheDelete.js +11 -4
  337. package/dist/es/node_modules/lodash-es/_mapCacheGet.js +10 -4
  338. package/dist/es/node_modules/lodash-es/_mapCacheHas.js +10 -4
  339. package/dist/es/node_modules/lodash-es/_mapCacheSet.js +11 -4
  340. package/dist/es/node_modules/lodash-es/_mapToArray.js +22 -0
  341. package/dist/es/node_modules/lodash-es/_memoizeCapped.js +14 -4
  342. package/dist/es/node_modules/lodash-es/_nativeCreate.js +8 -4
  343. package/dist/es/node_modules/lodash-es/_nativeKeys.js +18 -0
  344. package/dist/es/node_modules/lodash-es/_nativeKeysIn.js +13 -4
  345. package/dist/es/node_modules/lodash-es/_nodeUtil.js +14 -4
  346. package/dist/es/node_modules/lodash-es/_objectToString.js +10 -4
  347. package/dist/es/node_modules/lodash-es/_overArg.js +11 -4
  348. package/dist/es/node_modules/lodash-es/_overRest.js +18 -4
  349. package/dist/es/node_modules/lodash-es/_parent.js +11 -4
  350. package/dist/es/node_modules/lodash-es/_root.js +8 -4
  351. package/dist/es/node_modules/lodash-es/_safeGet.js +20 -0
  352. package/dist/es/node_modules/lodash-es/_setCacheAdd.js +20 -0
  353. package/dist/es/node_modules/lodash-es/_setCacheHas.js +19 -0
  354. package/dist/es/node_modules/lodash-es/_setToArray.js +22 -0
  355. package/dist/es/node_modules/lodash-es/_setToString.js +9 -4
  356. package/dist/es/node_modules/lodash-es/_shortOut.js +19 -4
  357. package/dist/es/node_modules/lodash-es/_stackClear.js +10 -4
  358. package/dist/es/node_modules/lodash-es/_stackDelete.js +10 -4
  359. package/dist/es/node_modules/lodash-es/_stackGet.js +9 -4
  360. package/dist/es/node_modules/lodash-es/_stackHas.js +9 -4
  361. package/dist/es/node_modules/lodash-es/_stackSet.js +20 -4
  362. package/dist/es/node_modules/lodash-es/_strictIndexOf.js +22 -0
  363. package/dist/es/node_modules/lodash-es/_stringToArray.js +12 -4
  364. package/dist/es/node_modules/lodash-es/_stringToPath.js +13 -4
  365. package/dist/es/node_modules/lodash-es/_toKey.js +13 -4
  366. package/dist/es/node_modules/lodash-es/_toSource.js +20 -4
  367. package/dist/es/node_modules/lodash-es/_unicodeToArray.js +10 -4
  368. package/dist/es/node_modules/lodash-es/constant.js +11 -4
  369. package/dist/es/node_modules/lodash-es/eq.js +9 -4
  370. package/dist/es/node_modules/lodash-es/flatten.js +11 -4
  371. package/dist/es/node_modules/lodash-es/get.js +11 -4
  372. package/dist/es/node_modules/lodash-es/identity.js +9 -4
  373. package/dist/es/node_modules/lodash-es/intersectionWith.js +25 -0
  374. package/dist/es/node_modules/lodash-es/isArguments.js +13 -4
  375. package/dist/es/node_modules/lodash-es/isArray.js +7 -4
  376. package/dist/es/node_modules/lodash-es/isArrayLike.js +11 -4
  377. package/dist/es/node_modules/lodash-es/isArrayLikeObject.js +21 -0
  378. package/dist/es/node_modules/lodash-es/isBuffer.js +9 -4
  379. package/dist/es/node_modules/lodash-es/isEqual.js +20 -0
  380. package/dist/es/node_modules/lodash-es/isFinite.js +11 -4
  381. package/dist/es/node_modules/lodash-es/isFunction.js +15 -4
  382. package/dist/es/node_modules/lodash-es/isLength.js +10 -4
  383. package/dist/es/node_modules/lodash-es/isMap.js +10 -4
  384. package/dist/es/node_modules/lodash-es/isNaN.js +10 -4
  385. package/dist/es/node_modules/lodash-es/isNil.js +9 -4
  386. package/dist/es/node_modules/lodash-es/isNumber.js +12 -4
  387. package/dist/es/node_modules/lodash-es/isObject.js +10 -4
  388. package/dist/es/node_modules/lodash-es/isObjectLike.js +9 -4
  389. package/dist/es/node_modules/lodash-es/isPlainObject.js +19 -4
  390. package/dist/es/node_modules/lodash-es/isRegExp.js +10 -4
  391. package/dist/es/node_modules/lodash-es/isSet.js +10 -4
  392. package/dist/es/node_modules/lodash-es/isString.js +13 -4
  393. package/dist/es/node_modules/lodash-es/isSymbol.js +12 -4
  394. package/dist/es/node_modules/lodash-es/isTypedArray.js +10 -4
  395. package/dist/es/node_modules/lodash-es/keys.js +22 -0
  396. package/dist/es/node_modules/lodash-es/keysIn.js +12 -4
  397. package/dist/es/node_modules/lodash-es/last.js +10 -4
  398. package/dist/es/node_modules/lodash-es/memoize.js +21 -4
  399. package/dist/es/node_modules/lodash-es/mergeWith.js +21 -0
  400. package/dist/es/node_modules/lodash-es/noop.js +18 -0
  401. package/dist/es/node_modules/lodash-es/omit.js +26 -4
  402. package/dist/es/node_modules/lodash-es/stubArray.js +9 -4
  403. package/dist/es/node_modules/lodash-es/stubFalse.js +9 -4
  404. package/dist/es/node_modules/lodash-es/toPlainObject.js +21 -0
  405. package/dist/es/node_modules/lodash-es/toString.js +10 -4
  406. package/dist/es/node_modules/lodash-es/unionWith.js +25 -0
  407. package/dist/es/node_modules/lodash-es/upperFirst.js +8 -4
  408. package/dist/es/node_modules/orderedmap/dist/index.js +106 -4
  409. package/dist/es/node_modules/path-to-regexp/dist/index.js +275 -0
  410. package/dist/es/node_modules/prosemirror-commands/dist/index.js +391 -4
  411. package/dist/es/node_modules/prosemirror-dropcursor/dist/index.js +89 -4
  412. package/dist/es/node_modules/prosemirror-gapcursor/dist/index.js +207 -4
  413. package/dist/es/node_modules/prosemirror-history/dist/index.js +251 -4
  414. package/dist/es/node_modules/prosemirror-keymap/dist/index.js +65 -4
  415. package/dist/es/node_modules/prosemirror-model/dist/index.js +2736 -4
  416. package/dist/es/node_modules/prosemirror-schema-list/dist/index.js +91 -4
  417. package/dist/es/node_modules/prosemirror-state/dist/index.js +825 -4
  418. package/dist/es/node_modules/prosemirror-tables/dist/index.js +1449 -4
  419. package/dist/es/node_modules/prosemirror-transform/dist/index.js +1539 -4
  420. package/dist/es/node_modules/prosemirror-view/dist/index.js +3797 -4
  421. package/dist/es/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js +300 -0
  422. package/dist/es/node_modules/rope-sequence/dist/index.js +103 -4
  423. package/dist/es/node_modules/sortablejs/modular/sortable.esm.js +1283 -0
  424. package/dist/es/node_modules/style-mod/src/style-mod.js +112 -4
  425. package/dist/es/node_modules/title-case/dist/index.js +20 -0
  426. package/dist/es/node_modules/vue-codemirror/dist/vue-codemirror.esm.js +135 -4
  427. package/dist/es/node_modules/w3c-keyname/index.js +96 -4
  428. package/dist/es/node_modules/xgplayer/dist/index.min.css +3 -3
  429. package/dist/es/node_modules/xgplayer/es/_virtual/_rollupPluginBabelHelpers.js +200 -4
  430. package/dist/es/node_modules/xgplayer/es/constant.js +10 -4
  431. package/dist/es/node_modules/xgplayer/es/defaultConfig.js +90 -4
  432. package/dist/es/node_modules/xgplayer/es/error.js +67 -4
  433. package/dist/es/node_modules/xgplayer/es/events.js +70 -4
  434. package/dist/es/node_modules/xgplayer/es/index.umd.js +48 -4
  435. package/dist/es/node_modules/xgplayer/es/instManager.js +104 -4
  436. package/dist/es/node_modules/xgplayer/es/lang/en.js +82 -4
  437. package/dist/es/node_modules/xgplayer/es/lang/i18n.js +78 -4
  438. package/dist/es/node_modules/xgplayer/es/lang/jp.js +82 -4
  439. package/dist/es/node_modules/xgplayer/es/lang/zh-cn.js +82 -4
  440. package/dist/es/node_modules/xgplayer/es/mediaProxy.js +469 -4
  441. package/dist/es/node_modules/xgplayer/es/player.js +1243 -4
  442. package/dist/es/node_modules/xgplayer/es/plugin/basePlugin.js +210 -4
  443. package/dist/es/node_modules/xgplayer/es/plugin/hooksDescriptor.js +133 -4
  444. package/dist/es/node_modules/xgplayer/es/plugin/plugin.js +369 -4
  445. package/dist/es/node_modules/xgplayer/es/plugin/pluginsManager.js +207 -4
  446. package/dist/es/node_modules/xgplayer/es/plugin/preset.js +17 -4
  447. package/dist/es/node_modules/xgplayer/es/plugin/resizeObserver.js +84 -4
  448. package/dist/es/node_modules/xgplayer/es/plugins/assets/back.js +13 -4
  449. package/dist/es/node_modules/xgplayer/es/plugins/assets/download.js +23 -4
  450. package/dist/es/node_modules/xgplayer/es/plugins/assets/exitCssFull.js +12 -4
  451. package/dist/es/node_modules/xgplayer/es/plugins/assets/exitFull.js +12 -4
  452. package/dist/es/node_modules/xgplayer/es/plugins/assets/loading.js +12 -4
  453. package/dist/es/node_modules/xgplayer/es/plugins/assets/pause.js +12 -4
  454. package/dist/es/node_modules/xgplayer/es/plugins/assets/pipIcon.js +13 -4
  455. package/dist/es/node_modules/xgplayer/es/plugins/assets/pipIconExit.js +16 -4
  456. package/dist/es/node_modules/xgplayer/es/plugins/assets/play.js +12 -4
  457. package/dist/es/node_modules/xgplayer/es/plugins/assets/playNext.js +12 -4
  458. package/dist/es/node_modules/xgplayer/es/plugins/assets/replay.js +12 -4
  459. package/dist/es/node_modules/xgplayer/es/plugins/assets/requestCssFull.js +12 -4
  460. package/dist/es/node_modules/xgplayer/es/plugins/assets/requestFull.js +12 -4
  461. package/dist/es/node_modules/xgplayer/es/plugins/assets/rotate.js +20 -4
  462. package/dist/es/node_modules/xgplayer/es/plugins/assets/seekicon.js +15 -4
  463. package/dist/es/node_modules/xgplayer/es/plugins/assets/volumeLarge.js +13 -4
  464. package/dist/es/node_modules/xgplayer/es/plugins/assets/volumeMuted.js +13 -4
  465. package/dist/es/node_modules/xgplayer/es/plugins/assets/volumeSmall.js +13 -4
  466. package/dist/es/node_modules/xgplayer/es/plugins/common/iconPlugin.js +38 -4
  467. package/dist/es/node_modules/xgplayer/es/plugins/common/iconTools.js +15 -4
  468. package/dist/es/node_modules/xgplayer/es/plugins/common/optionList.js +82 -4
  469. package/dist/es/node_modules/xgplayer/es/plugins/common/optionsIcon.js +196 -4
  470. package/dist/es/node_modules/xgplayer/es/plugins/common/thumbnail.js +144 -4
  471. package/dist/es/node_modules/xgplayer/es/plugins/controls/index.js +174 -4
  472. package/dist/es/node_modules/xgplayer/es/plugins/cssFullScreen/index.js +108 -4
  473. package/dist/es/node_modules/xgplayer/es/plugins/definition/index.js +113 -4
  474. package/dist/es/node_modules/xgplayer/es/plugins/download/index.js +86 -4
  475. package/dist/es/node_modules/xgplayer/es/plugins/dynamicBg/index.js +235 -5
  476. package/dist/es/node_modules/xgplayer/es/plugins/enter/index.js +45 -4
  477. package/dist/es/node_modules/xgplayer/es/plugins/error/index.js +71 -4
  478. package/dist/es/node_modules/xgplayer/es/plugins/fpsDetect/index.js +119 -4
  479. package/dist/es/node_modules/xgplayer/es/plugins/fullscreen/backicon.js +71 -4
  480. package/dist/es/node_modules/xgplayer/es/plugins/fullscreen/index.js +153 -4
  481. package/dist/es/node_modules/xgplayer/es/plugins/gapJump/index.js +99 -4
  482. package/dist/es/node_modules/xgplayer/es/plugins/keyboard/index.js +302 -4
  483. package/dist/es/node_modules/xgplayer/es/plugins/loading/index.js +49 -4
  484. package/dist/es/node_modules/xgplayer/es/plugins/logger/index.js +174 -5
  485. package/dist/es/node_modules/xgplayer/es/plugins/miniScreen/index.js +172 -4
  486. package/dist/es/node_modules/xgplayer/es/plugins/miniScreen/miniScreenIcon.js +58 -4
  487. package/dist/es/node_modules/xgplayer/es/plugins/mobile/index.js +446 -4
  488. package/dist/es/node_modules/xgplayer/es/plugins/mobile/touch.js +141 -4
  489. package/dist/es/node_modules/xgplayer/es/plugins/pc/index.js +125 -4
  490. package/dist/es/node_modules/xgplayer/es/plugins/pip/index.js +219 -4
  491. package/dist/es/node_modules/xgplayer/es/plugins/play/index.js +105 -4
  492. package/dist/es/node_modules/xgplayer/es/plugins/playNext/index.js +81 -4
  493. package/dist/es/node_modules/xgplayer/es/plugins/playbackRate/index.js +103 -4
  494. package/dist/es/node_modules/xgplayer/es/plugins/poster/index.js +122 -4
  495. package/dist/es/node_modules/xgplayer/es/plugins/progress/index.js +434 -4
  496. package/dist/es/node_modules/xgplayer/es/plugins/progress/innerList.js +218 -4
  497. package/dist/es/node_modules/xgplayer/es/plugins/progress/miniProgress.js +96 -4
  498. package/dist/es/node_modules/xgplayer/es/plugins/progressPreview/dotsApi.js +178 -4
  499. package/dist/es/node_modules/xgplayer/es/plugins/progressPreview/index.js +295 -4
  500. package/dist/es/node_modules/xgplayer/es/plugins/prompt/index.js +89 -4
  501. package/dist/es/node_modules/xgplayer/es/plugins/replay/index.js +95 -4
  502. package/dist/es/node_modules/xgplayer/es/plugins/rotate/index.js +109 -4
  503. package/dist/es/node_modules/xgplayer/es/plugins/screenShot/index.js +137 -4
  504. package/dist/es/node_modules/xgplayer/es/plugins/start/index.js +225 -4
  505. package/dist/es/node_modules/xgplayer/es/plugins/stats/index.js +155 -4
  506. package/dist/es/node_modules/xgplayer/es/plugins/testspeed/index.js +137 -4
  507. package/dist/es/node_modules/xgplayer/es/plugins/time/index.js +167 -4
  508. package/dist/es/node_modules/xgplayer/es/plugins/time/timesegments.js +149 -4
  509. package/dist/es/node_modules/xgplayer/es/plugins/volume/index.js +209 -4
  510. package/dist/es/node_modules/xgplayer/es/plugins/waitingTimeoutJump/index.js +56 -4
  511. package/dist/es/node_modules/xgplayer/es/presets/default.js +64 -4
  512. package/dist/es/node_modules/xgplayer/es/state.js +16 -4
  513. package/dist/es/node_modules/xgplayer/es/stateClassMap.js +37 -4
  514. package/dist/es/node_modules/xgplayer/es/utils/database.js +86 -4
  515. package/dist/es/node_modules/xgplayer/es/utils/debug.js +37 -4
  516. package/dist/es/node_modules/xgplayer/es/utils/draggabilly.js +274 -4
  517. package/dist/es/node_modules/xgplayer/es/utils/sniffer.js +114 -4
  518. package/dist/es/node_modules/xgplayer/es/utils/util.js +520 -4
  519. package/dist/es/node_modules/xgplayer/es/utils/xgplayerTimeRange.js +28 -4
  520. package/dist/es/node_modules/xgplayer/es/version.js +7 -4
  521. package/dist/es/packages/components/index.js +88 -4
  522. package/dist/es/packages/hooks/dist/index.js +81 -0
  523. package/dist/es/packages/utils/dist/index.js +599 -0
  524. package/dist/es/styles/tokens.css +3 -3
  525. package/dist/lib/Button/index.js +4 -4
  526. package/dist/lib/Button/src/Button.css +3 -3
  527. package/dist/lib/Button/src/Button.vue.js +4 -4
  528. package/dist/lib/Button/src/Button2.css +3 -3
  529. package/dist/lib/CodeEditor/index.js +4 -4
  530. package/dist/lib/CodeEditor/src/index.css +3 -3
  531. package/dist/lib/CodeEditor/src/index.vue.js +4 -4
  532. package/dist/lib/CodeEditor/src/index2.css +3 -3
  533. package/dist/lib/CodeEditor/src/index3.css +3 -3
  534. package/dist/lib/ConfigProvider/index.js +4 -4
  535. package/dist/lib/ConfigProvider/src/configProvider.js +4 -4
  536. package/dist/lib/ConfigProvider/src/configProviderProps.js +4 -4
  537. package/dist/lib/ConfigProvider/src/constants.js +4 -4
  538. package/dist/lib/ConfigProvider/src/useGlobalConfig.js +4 -4
  539. package/dist/lib/CountTo/index.js +4 -4
  540. package/dist/lib/CountTo/src/index.css +3 -3
  541. package/dist/lib/CountTo/src/index.vue.js +4 -4
  542. package/dist/lib/Ellipsis/index.js +4 -4
  543. package/dist/lib/Ellipsis/src/components/JsEllipsis.css +3 -3
  544. package/dist/lib/Ellipsis/src/components/JsEllipsis.vue.js +4 -4
  545. package/dist/lib/Ellipsis/src/components/NativeEllipsis.css +3 -3
  546. package/dist/lib/Ellipsis/src/components/NativeEllipsis.vue.js +4 -4
  547. package/dist/lib/Ellipsis/src/components/NativeEllipsis2.css +3 -3
  548. package/dist/lib/Ellipsis/src/index.css +3 -3
  549. package/dist/lib/Ellipsis/src/index.vue.js +4 -4
  550. package/dist/lib/Ellipsis/src/utils/utils.js +4 -4
  551. package/dist/lib/Form/index.js +4 -4
  552. package/dist/lib/Form/src/Form.css +3 -3
  553. package/dist/lib/Form/src/Form.vue.js +4 -4
  554. package/dist/lib/Form/src/Form2.css +3 -3
  555. package/dist/lib/Form/src/styles/form.css +3 -3
  556. package/dist/lib/Marquee/index.js +4 -4
  557. package/dist/lib/Marquee/src/index.css +3 -3
  558. package/dist/lib/Marquee/src/index.vue.js +4 -4
  559. package/dist/lib/Marquee/src/index2.css +3 -3
  560. package/dist/lib/Overlay/index.js +4 -4
  561. package/dist/lib/Overlay/src/Message.css +3 -3
  562. package/dist/lib/Overlay/src/Message.vue.js +4 -4
  563. package/dist/lib/Overlay/src/Message2.css +3 -3
  564. package/dist/lib/Overlay/src/Modal.css +3 -3
  565. package/dist/lib/Overlay/src/Modal.vue.js +4 -4
  566. package/dist/lib/Overlay/src/Modal2.css +3 -3
  567. package/dist/lib/Overlay/src/Notice.css +3 -3
  568. package/dist/lib/Overlay/src/Notice.vue.js +4 -4
  569. package/dist/lib/Overlay/src/Notice2.css +3 -3
  570. package/dist/lib/Overlay/src/Tooltip.css +3 -3
  571. package/dist/lib/Overlay/src/Tooltip.vue.js +4 -4
  572. package/dist/lib/Overlay/src/Tooltip2.css +3 -3
  573. package/dist/lib/RichTextEditor/index.js +4 -4
  574. package/dist/lib/RichTextEditor/src/ToolbarPanel.css +3 -3
  575. package/dist/lib/RichTextEditor/src/ToolbarPanel.vue.js +4 -4
  576. package/dist/lib/RichTextEditor/src/ToolbarPanel2.css +3 -3
  577. package/dist/lib/RichTextEditor/src/components/BlockquoteButton.css +4 -4
  578. package/dist/lib/RichTextEditor/src/components/BlockquoteButton.vue.js +4 -4
  579. package/dist/lib/RichTextEditor/src/components/CodeBlockButton.css +4 -4
  580. package/dist/lib/RichTextEditor/src/components/CodeBlockButton.vue.js +4 -4
  581. package/dist/lib/RichTextEditor/src/components/ColorHighlightPopover.css +3 -3
  582. package/dist/lib/RichTextEditor/src/components/ColorHighlightPopover.vue.js +4 -4
  583. package/dist/lib/RichTextEditor/src/components/FontSizeDropdownMenu.css +3 -3
  584. package/dist/lib/RichTextEditor/src/components/FontSizeDropdownMenu.vue.js +4 -4
  585. package/dist/lib/RichTextEditor/src/components/HeadingDropdownMenu.css +3 -3
  586. package/dist/lib/RichTextEditor/src/components/HeadingDropdownMenu.vue.js +4 -4
  587. package/dist/lib/RichTextEditor/src/components/ImageUploadButton.css +4 -4
  588. package/dist/lib/RichTextEditor/src/components/ImageUploadButton.vue.js +4 -4
  589. package/dist/lib/RichTextEditor/src/components/LinkPopover.css +4 -4
  590. package/dist/lib/RichTextEditor/src/components/LinkPopover.vue.js +4 -4
  591. package/dist/lib/RichTextEditor/src/components/LinkPopover2.css +4 -4
  592. package/dist/lib/RichTextEditor/src/components/ListDropdownMenu.css +3 -3
  593. package/dist/lib/RichTextEditor/src/components/ListDropdownMenu.vue.js +4 -4
  594. package/dist/lib/RichTextEditor/src/components/MarkButton.css +4 -4
  595. package/dist/lib/RichTextEditor/src/components/MarkButton.vue.js +4 -4
  596. package/dist/lib/RichTextEditor/src/components/TableButton.css +3 -3
  597. package/dist/lib/RichTextEditor/src/components/TableButton.vue.js +4 -4
  598. package/dist/lib/RichTextEditor/src/components/TextAlignDropdownMenu.css +3 -3
  599. package/dist/lib/RichTextEditor/src/components/TextAlignDropdownMenu.vue.js +4 -4
  600. package/dist/lib/RichTextEditor/src/components/TextColorPopover.css +3 -3
  601. package/dist/lib/RichTextEditor/src/components/TextColorPopover.vue.js +4 -4
  602. package/dist/lib/RichTextEditor/src/components/ToolbarGroup.css +3 -3
  603. package/dist/lib/RichTextEditor/src/components/ToolbarGroup.vue.js +4 -4
  604. package/dist/lib/RichTextEditor/src/components/ToolbarSeparator.css +3 -3
  605. package/dist/lib/RichTextEditor/src/components/ToolbarSeparator.vue.js +4 -4
  606. package/dist/lib/RichTextEditor/src/components/UndoRedoButton.css +4 -4
  607. package/dist/lib/RichTextEditor/src/components/UndoRedoButton.vue.js +4 -4
  608. package/dist/lib/RichTextEditor/src/components/VideoUploadButton.css +4 -4
  609. package/dist/lib/RichTextEditor/src/components/VideoUploadButton.vue.js +4 -4
  610. package/dist/lib/RichTextEditor/src/components/basic/ColorPicker.css +4 -4
  611. package/dist/lib/RichTextEditor/src/components/basic/ColorPicker.vue.js +4 -4
  612. package/dist/lib/RichTextEditor/src/components/basic/MediaUploadModal.css +3 -3
  613. package/dist/lib/RichTextEditor/src/components/basic/MediaUploadModal.vue.js +4 -4
  614. package/dist/lib/RichTextEditor/src/components/basic/MediaUploadModal2.css +3 -3
  615. package/dist/lib/RichTextEditor/src/components/basic/SelectMenu.css +4 -4
  616. package/dist/lib/RichTextEditor/src/components/basic/SelectMenu.vue.js +4 -4
  617. package/dist/lib/RichTextEditor/src/components/basic/SelectMenu2.css +4 -4
  618. package/dist/lib/RichTextEditor/src/constant/index.js +4 -4
  619. package/dist/lib/RichTextEditor/src/extensions/video.js +4 -4
  620. package/dist/lib/RichTextEditor/src/index.css +4 -4
  621. package/dist/lib/RichTextEditor/src/index.vue.js +4 -4
  622. package/dist/lib/RichTextEditor/src/index2.css +4 -4
  623. package/dist/lib/RichTextEditor/src/props.js +4 -4
  624. package/dist/lib/ScaleScreen/index.js +4 -4
  625. package/dist/lib/ScaleScreen/src/index.css +3 -3
  626. package/dist/lib/ScaleScreen/src/index.vue.js +4 -4
  627. package/dist/lib/ScaleScreen/src/index2.css +3 -3
  628. package/dist/lib/Transition/index.js +4 -4
  629. package/dist/lib/Transition/src/CollapseTransition.css +3 -3
  630. package/dist/lib/Transition/src/CollapseTransition.vue.js +4 -4
  631. package/dist/lib/Transition/src/CollapseTransition2.css +3 -3
  632. package/dist/lib/Transition/src/CreateTransition.js +4 -4
  633. package/dist/lib/Transition/src/ExpandTransition.js +4 -4
  634. package/dist/lib/Transition/src/style/index.css +3 -3
  635. package/dist/lib/Transition/style.js +4 -4
  636. package/dist/lib/VideoBackground/index.js +4 -4
  637. package/dist/lib/VideoBackground/src/helper.js +4 -4
  638. package/dist/lib/VideoBackground/src/index.css +3 -3
  639. package/dist/lib/VideoBackground/src/index.vue.js +4 -4
  640. package/dist/lib/VideoBackground/src/index2.css +3 -3
  641. package/dist/lib/VideoBackground/src/index3.css +3 -3
  642. package/dist/lib/VideoBackground/src/videoBackground.js +4 -4
  643. package/dist/lib/VideoPlayer/index.js +4 -4
  644. package/dist/lib/VideoPlayer/src/index.css +3 -3
  645. package/dist/lib/VideoPlayer/src/index.vue.js +4 -4
  646. package/dist/lib/VirtualScroll/index.js +4 -4
  647. package/dist/lib/VirtualScroll/src/index.css +3 -3
  648. package/dist/lib/VirtualScroll/src/index.vue.js +4 -4
  649. package/dist/lib/VirtualScroll/src/index.vue2.js +4 -4
  650. package/dist/lib/VirtualScroll/src/index2.css +3 -3
  651. package/dist/lib/_virtual/_commonjsHelpers.js +4 -4
  652. package/dist/lib/_virtual/_plugin-vue_export-helper.js +4 -4
  653. package/dist/lib/_virtual/delegate.js +4 -4
  654. package/dist/lib/_virtual/download.js +4 -4
  655. package/dist/lib/_virtual/download2.js +4 -4
  656. package/dist/lib/_virtual/index.js +4 -4
  657. package/dist/lib/_virtual/index2.js +4 -4
  658. package/dist/lib/_virtual/index3.js +14 -0
  659. package/dist/lib/{node_modules/@tanstack/store/dist/esm/types.js → _virtual/index4.js} +4 -4
  660. package/dist/lib/hooks/useLocale.js +4 -4
  661. package/dist/lib/hooks/useNamespace.js +4 -4
  662. package/dist/lib/index.js +4 -4
  663. package/dist/lib/locale/lang/en-US.js +4 -4
  664. package/dist/lib/locale/lang/ja-JP.js +4 -4
  665. package/dist/lib/locale/lang/zh-CN.js +4 -4
  666. package/dist/lib/node_modules/@codemirror/autocomplete/dist/index.js +4 -4
  667. package/dist/lib/node_modules/@codemirror/commands/dist/index.js +4 -4
  668. package/dist/lib/node_modules/@codemirror/lang-java/dist/index.js +4 -4
  669. package/dist/lib/node_modules/@codemirror/lang-javascript/dist/index.js +16 -4
  670. package/dist/lib/node_modules/@codemirror/lang-json/dist/index.js +4 -4
  671. package/dist/lib/node_modules/@codemirror/lang-python/dist/index.js +6 -4
  672. package/dist/lib/node_modules/@codemirror/lang-sql/dist/index.js +5 -4
  673. package/dist/lib/node_modules/@codemirror/lang-xml/dist/index.js +4 -4
  674. package/dist/lib/node_modules/@codemirror/lang-yaml/dist/index.js +4 -4
  675. package/dist/lib/node_modules/@codemirror/language/dist/index.js +4 -4
  676. package/dist/lib/node_modules/@codemirror/lint/dist/index.js +4 -4
  677. package/dist/lib/node_modules/@codemirror/search/dist/index.js +5 -4
  678. package/dist/lib/node_modules/@codemirror/state/dist/index.js +8 -4
  679. package/dist/lib/node_modules/@codemirror/theme-one-dark/dist/index.js +4 -4
  680. package/dist/lib/node_modules/@codemirror/view/dist/index.js +8 -4
  681. package/dist/lib/node_modules/@lezer/common/dist/index.js +4 -4
  682. package/dist/lib/node_modules/@lezer/highlight/dist/index.js +4 -4
  683. package/dist/lib/node_modules/@lezer/java/dist/index.js +4 -4
  684. package/dist/lib/node_modules/@lezer/javascript/dist/index.js +4 -4
  685. package/dist/lib/node_modules/@lezer/json/dist/index.js +4 -4
  686. package/dist/lib/node_modules/@lezer/lr/dist/index.js +4 -4
  687. package/dist/lib/node_modules/@lezer/python/dist/index.js +4 -4
  688. package/dist/lib/node_modules/@lezer/xml/dist/index.js +4 -4
  689. package/dist/lib/node_modules/@lezer/yaml/dist/index.js +4 -4
  690. package/dist/lib/node_modules/@marijn/find-cluster-break/src/index.js +4 -4
  691. package/dist/lib/node_modules/@tanstack/devtools-event-client/dist/esm/plugin.js +4 -4
  692. package/dist/lib/node_modules/@tanstack/form-core/dist/esm/EventClient.js +4 -4
  693. package/dist/lib/node_modules/@tanstack/form-core/dist/esm/FieldApi.js +4 -4
  694. package/dist/lib/node_modules/@tanstack/form-core/dist/esm/FormApi.js +4 -4
  695. package/dist/lib/node_modules/@tanstack/form-core/dist/esm/ValidationLogic.js +4 -4
  696. package/dist/lib/node_modules/@tanstack/form-core/dist/esm/metaHelper.js +4 -4
  697. package/dist/lib/node_modules/@tanstack/form-core/dist/esm/standardSchemaValidator.js +4 -4
  698. package/dist/lib/node_modules/@tanstack/form-core/dist/esm/utils.js +4 -4
  699. package/dist/lib/node_modules/@tanstack/pacer-lite/dist/lite-throttler.js +4 -4
  700. package/dist/lib/node_modules/@tanstack/store/dist/esm/alien.js +14 -0
  701. package/dist/lib/node_modules/@tanstack/store/dist/esm/atom.js +14 -0
  702. package/dist/lib/node_modules/@tanstack/store/dist/esm/batch.js +14 -0
  703. package/dist/lib/node_modules/@tanstack/store/dist/esm/store.js +4 -4
  704. package/dist/lib/node_modules/@tanstack/vue-form/dist/esm/useField.js +4 -4
  705. package/dist/lib/node_modules/@tanstack/vue-form/dist/esm/useForm.js +4 -4
  706. package/dist/lib/node_modules/@tanstack/vue-store/dist/esm/index.js +4 -4
  707. package/dist/lib/node_modules/@tiptap/core/dist/index.js +94 -4
  708. package/dist/lib/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js +4 -4
  709. package/dist/lib/node_modules/@tiptap/extension-blockquote/dist/index.js +8 -4
  710. package/dist/lib/node_modules/@tiptap/extension-bold/dist/index.js +4 -4
  711. package/dist/lib/node_modules/@tiptap/extension-character-count/dist/index.js +4 -4
  712. package/dist/lib/node_modules/@tiptap/extension-code/dist/index.js +4 -4
  713. package/dist/lib/node_modules/@tiptap/extension-code-block/dist/index.js +21 -4
  714. package/dist/lib/node_modules/@tiptap/extension-document/dist/index.js +6 -4
  715. package/dist/lib/node_modules/@tiptap/extension-hard-break/dist/index.js +6 -4
  716. package/dist/lib/node_modules/@tiptap/extension-heading/dist/index.js +4 -4
  717. package/dist/lib/node_modules/@tiptap/extension-highlight/dist/index.js +4 -4
  718. package/dist/lib/node_modules/@tiptap/extension-horizontal-rule/dist/index.js +4 -4
  719. package/dist/lib/node_modules/@tiptap/extension-image/dist/index.js +4 -4
  720. package/dist/lib/node_modules/@tiptap/extension-italic/dist/index.js +4 -4
  721. package/dist/lib/node_modules/@tiptap/extension-link/dist/index.js +4 -4
  722. package/dist/lib/node_modules/@tiptap/extension-list/dist/index.js +15 -4
  723. package/dist/lib/node_modules/@tiptap/extension-paragraph/dist/index.js +4 -4
  724. package/dist/lib/node_modules/@tiptap/extension-strike/dist/index.js +4 -4
  725. package/dist/lib/node_modules/@tiptap/extension-subscript/dist/index.js +4 -4
  726. package/dist/lib/node_modules/@tiptap/extension-superscript/dist/index.js +4 -4
  727. package/dist/lib/node_modules/@tiptap/extension-table/dist/index.js +8 -4
  728. package/dist/lib/node_modules/@tiptap/extension-task-item/dist/index.js +4 -4
  729. package/dist/lib/node_modules/@tiptap/extension-task-list/dist/index.js +4 -4
  730. package/dist/lib/node_modules/@tiptap/extension-text/dist/index.js +4 -4
  731. package/dist/lib/node_modules/@tiptap/extension-text-align/dist/index.js +4 -4
  732. package/dist/lib/node_modules/@tiptap/extension-text-style/dist/index.js +4 -4
  733. package/dist/lib/node_modules/@tiptap/extension-underline/dist/index.js +4 -4
  734. package/dist/lib/node_modules/@tiptap/extensions/dist/index.js +4 -4
  735. package/dist/lib/node_modules/@tiptap/html/dist/index.js +14 -0
  736. package/dist/lib/node_modules/@tiptap/starter-kit/dist/index.js +4 -4
  737. package/dist/lib/node_modules/@tiptap/vue-3/dist/index.js +4 -4
  738. package/dist/lib/node_modules/@vueuse/core/dist/index.js +4 -4
  739. package/dist/lib/node_modules/@vueuse/shared/dist/index.js +4 -4
  740. package/dist/lib/node_modules/codemirror/dist/index.js +4 -4
  741. package/dist/lib/node_modules/crelt/index.js +4 -4
  742. package/dist/lib/node_modules/delegate/src/closest.js +4 -4
  743. package/dist/lib/node_modules/delegate/src/delegate.js +4 -4
  744. package/dist/lib/node_modules/downloadjs/download.js +6 -4
  745. package/dist/lib/node_modules/eventemitter3/index.js +4 -4
  746. package/dist/lib/node_modules/linkifyjs/dist/linkify.js +8 -4
  747. package/dist/lib/node_modules/lodash-es/_DataView.js +4 -4
  748. package/dist/lib/node_modules/lodash-es/_Hash.js +4 -4
  749. package/dist/lib/node_modules/lodash-es/_ListCache.js +4 -4
  750. package/dist/lib/node_modules/lodash-es/_Map.js +4 -4
  751. package/dist/lib/node_modules/lodash-es/_MapCache.js +4 -4
  752. package/dist/lib/node_modules/lodash-es/_Promise.js +4 -4
  753. package/dist/lib/node_modules/lodash-es/_Set.js +4 -4
  754. package/dist/lib/node_modules/lodash-es/_SetCache.js +14 -0
  755. package/dist/lib/node_modules/lodash-es/_Stack.js +4 -4
  756. package/dist/lib/node_modules/lodash-es/_Symbol.js +4 -4
  757. package/dist/lib/node_modules/lodash-es/_Uint8Array.js +4 -4
  758. package/dist/lib/node_modules/lodash-es/_WeakMap.js +4 -4
  759. package/dist/lib/node_modules/lodash-es/_apply.js +4 -4
  760. package/dist/lib/node_modules/lodash-es/_arrayEach.js +4 -4
  761. package/dist/lib/node_modules/lodash-es/_arrayFilter.js +4 -4
  762. package/dist/lib/node_modules/lodash-es/_arrayIncludes.js +14 -0
  763. package/dist/lib/node_modules/lodash-es/_arrayIncludesWith.js +14 -0
  764. package/dist/lib/node_modules/lodash-es/_arrayLikeKeys.js +4 -4
  765. package/dist/lib/node_modules/lodash-es/_arrayMap.js +4 -4
  766. package/dist/lib/node_modules/lodash-es/_arrayPush.js +4 -4
  767. package/dist/lib/node_modules/lodash-es/_arraySome.js +14 -0
  768. package/dist/lib/node_modules/lodash-es/_asciiToArray.js +4 -4
  769. package/dist/lib/node_modules/lodash-es/_assignMergeValue.js +14 -0
  770. package/dist/lib/node_modules/lodash-es/_assignValue.js +4 -4
  771. package/dist/lib/node_modules/lodash-es/_assocIndexOf.js +4 -4
  772. package/dist/lib/node_modules/lodash-es/_baseAssignValue.js +4 -4
  773. package/dist/lib/node_modules/lodash-es/_baseClone.js +4 -4
  774. package/dist/lib/node_modules/lodash-es/_baseCreate.js +14 -0
  775. package/dist/lib/node_modules/lodash-es/_baseFindIndex.js +14 -0
  776. package/dist/lib/node_modules/lodash-es/_baseFlatten.js +4 -4
  777. package/dist/lib/node_modules/lodash-es/_baseFor.js +14 -0
  778. package/dist/lib/node_modules/lodash-es/_baseGet.js +4 -4
  779. package/dist/lib/node_modules/lodash-es/_baseGetAllKeys.js +4 -4
  780. package/dist/lib/node_modules/lodash-es/_baseGetTag.js +4 -4
  781. package/dist/lib/node_modules/lodash-es/_baseIndexOf.js +14 -0
  782. package/dist/lib/node_modules/lodash-es/_baseIntersection.js +14 -0
  783. package/dist/lib/node_modules/lodash-es/_baseIsArguments.js +4 -4
  784. package/dist/lib/node_modules/lodash-es/_baseIsEqual.js +14 -0
  785. package/dist/lib/node_modules/lodash-es/_baseIsEqualDeep.js +14 -0
  786. package/dist/lib/node_modules/lodash-es/_baseIsMap.js +4 -4
  787. package/dist/lib/node_modules/lodash-es/_baseIsNaN.js +14 -0
  788. package/dist/lib/node_modules/lodash-es/_baseIsNative.js +4 -4
  789. package/dist/lib/node_modules/lodash-es/_baseIsRegExp.js +4 -4
  790. package/dist/lib/node_modules/lodash-es/_baseIsSet.js +4 -4
  791. package/dist/lib/node_modules/lodash-es/_baseIsTypedArray.js +4 -4
  792. package/dist/lib/node_modules/lodash-es/_baseKeys.js +14 -0
  793. package/dist/lib/node_modules/lodash-es/_baseKeysIn.js +4 -4
  794. package/dist/lib/node_modules/lodash-es/_baseMerge.js +14 -0
  795. package/dist/lib/node_modules/lodash-es/_baseMergeDeep.js +14 -0
  796. package/dist/lib/node_modules/lodash-es/_baseRest.js +14 -0
  797. package/dist/lib/node_modules/lodash-es/_baseSetToString.js +4 -4
  798. package/dist/lib/node_modules/lodash-es/_baseSlice.js +4 -4
  799. package/dist/lib/node_modules/lodash-es/_baseTimes.js +4 -4
  800. package/dist/lib/node_modules/lodash-es/_baseToString.js +4 -4
  801. package/dist/lib/node_modules/lodash-es/_baseUnary.js +4 -4
  802. package/dist/lib/node_modules/lodash-es/_baseUniq.js +14 -0
  803. package/dist/lib/node_modules/lodash-es/_baseUnset.js +4 -4
  804. package/dist/lib/node_modules/lodash-es/_cacheHas.js +14 -0
  805. package/dist/lib/node_modules/lodash-es/_castArrayLikeObject.js +14 -0
  806. package/dist/lib/node_modules/lodash-es/_castPath.js +4 -4
  807. package/dist/lib/node_modules/lodash-es/_castSlice.js +4 -4
  808. package/dist/lib/node_modules/lodash-es/_cloneArrayBuffer.js +4 -4
  809. package/dist/lib/node_modules/lodash-es/_cloneBuffer.js +4 -4
  810. package/dist/lib/node_modules/lodash-es/_cloneDataView.js +4 -4
  811. package/dist/lib/node_modules/lodash-es/_cloneRegExp.js +4 -4
  812. package/dist/lib/node_modules/lodash-es/_cloneSymbol.js +4 -4
  813. package/dist/lib/node_modules/lodash-es/_cloneTypedArray.js +4 -4
  814. package/dist/lib/node_modules/lodash-es/_copyArray.js +14 -0
  815. package/dist/lib/node_modules/lodash-es/_copyObject.js +4 -4
  816. package/dist/lib/node_modules/lodash-es/_coreJsData.js +4 -4
  817. package/dist/lib/node_modules/lodash-es/_createAssigner.js +14 -0
  818. package/dist/lib/node_modules/lodash-es/_createBaseFor.js +14 -0
  819. package/dist/lib/node_modules/lodash-es/_createCaseFirst.js +4 -4
  820. package/dist/lib/node_modules/lodash-es/_createSet.js +14 -0
  821. package/dist/lib/node_modules/lodash-es/_customOmitClone.js +4 -4
  822. package/dist/lib/node_modules/lodash-es/_defineProperty.js +4 -4
  823. package/dist/lib/node_modules/lodash-es/_equalArrays.js +14 -0
  824. package/dist/lib/node_modules/lodash-es/_equalByTag.js +14 -0
  825. package/dist/lib/node_modules/lodash-es/_equalObjects.js +14 -0
  826. package/dist/lib/node_modules/lodash-es/_flatRest.js +4 -4
  827. package/dist/lib/node_modules/lodash-es/_freeGlobal.js +4 -4
  828. package/dist/lib/node_modules/lodash-es/_getAllKeys.js +14 -0
  829. package/dist/lib/node_modules/lodash-es/_getAllKeysIn.js +4 -4
  830. package/dist/lib/node_modules/lodash-es/_getMapData.js +4 -4
  831. package/dist/lib/node_modules/lodash-es/_getNative.js +4 -4
  832. package/dist/lib/node_modules/lodash-es/_getPrototype.js +4 -4
  833. package/dist/lib/node_modules/lodash-es/_getRawTag.js +4 -4
  834. package/dist/lib/node_modules/lodash-es/_getSymbols.js +4 -4
  835. package/dist/lib/node_modules/lodash-es/_getSymbolsIn.js +4 -4
  836. package/dist/lib/node_modules/lodash-es/_getTag.js +4 -4
  837. package/dist/lib/node_modules/lodash-es/_getValue.js +4 -4
  838. package/dist/lib/node_modules/lodash-es/_hasUnicode.js +4 -4
  839. package/dist/lib/node_modules/lodash-es/_hashClear.js +4 -4
  840. package/dist/lib/node_modules/lodash-es/_hashDelete.js +4 -4
  841. package/dist/lib/node_modules/lodash-es/_hashGet.js +4 -4
  842. package/dist/lib/node_modules/lodash-es/_hashHas.js +4 -4
  843. package/dist/lib/node_modules/lodash-es/_hashSet.js +4 -4
  844. package/dist/lib/node_modules/lodash-es/_initCloneArray.js +4 -4
  845. package/dist/lib/node_modules/lodash-es/_initCloneByTag.js +4 -4
  846. package/dist/lib/node_modules/lodash-es/_initCloneObject.js +14 -0
  847. package/dist/lib/node_modules/lodash-es/_isFlattenable.js +4 -4
  848. package/dist/lib/node_modules/lodash-es/_isIndex.js +4 -4
  849. package/dist/lib/node_modules/lodash-es/_isIterateeCall.js +14 -0
  850. package/dist/lib/node_modules/lodash-es/_isKey.js +4 -4
  851. package/dist/lib/node_modules/lodash-es/_isKeyable.js +4 -4
  852. package/dist/lib/node_modules/lodash-es/_isMasked.js +4 -4
  853. package/dist/lib/node_modules/lodash-es/_isPrototype.js +4 -4
  854. package/dist/lib/node_modules/lodash-es/_listCacheClear.js +4 -4
  855. package/dist/lib/node_modules/lodash-es/_listCacheDelete.js +4 -4
  856. package/dist/lib/node_modules/lodash-es/_listCacheGet.js +4 -4
  857. package/dist/lib/node_modules/lodash-es/_listCacheHas.js +4 -4
  858. package/dist/lib/node_modules/lodash-es/_listCacheSet.js +4 -4
  859. package/dist/lib/node_modules/lodash-es/_mapCacheClear.js +4 -4
  860. package/dist/lib/node_modules/lodash-es/_mapCacheDelete.js +4 -4
  861. package/dist/lib/node_modules/lodash-es/_mapCacheGet.js +4 -4
  862. package/dist/lib/node_modules/lodash-es/_mapCacheHas.js +4 -4
  863. package/dist/lib/node_modules/lodash-es/_mapCacheSet.js +4 -4
  864. package/dist/lib/node_modules/lodash-es/_mapToArray.js +14 -0
  865. package/dist/lib/node_modules/lodash-es/_memoizeCapped.js +4 -4
  866. package/dist/lib/node_modules/lodash-es/_nativeCreate.js +4 -4
  867. package/dist/lib/node_modules/lodash-es/_nativeKeys.js +14 -0
  868. package/dist/lib/node_modules/lodash-es/_nativeKeysIn.js +4 -4
  869. package/dist/lib/node_modules/lodash-es/_nodeUtil.js +4 -4
  870. package/dist/lib/node_modules/lodash-es/_objectToString.js +4 -4
  871. package/dist/lib/node_modules/lodash-es/_overArg.js +4 -4
  872. package/dist/lib/node_modules/lodash-es/_overRest.js +4 -4
  873. package/dist/lib/node_modules/lodash-es/_parent.js +4 -4
  874. package/dist/lib/node_modules/lodash-es/_root.js +4 -4
  875. package/dist/lib/node_modules/lodash-es/_safeGet.js +14 -0
  876. package/dist/lib/node_modules/lodash-es/_setCacheAdd.js +14 -0
  877. package/dist/lib/node_modules/lodash-es/_setCacheHas.js +14 -0
  878. package/dist/lib/node_modules/lodash-es/_setToArray.js +14 -0
  879. package/dist/lib/node_modules/lodash-es/_setToString.js +4 -4
  880. package/dist/lib/node_modules/lodash-es/_shortOut.js +4 -4
  881. package/dist/lib/node_modules/lodash-es/_stackClear.js +4 -4
  882. package/dist/lib/node_modules/lodash-es/_stackDelete.js +4 -4
  883. package/dist/lib/node_modules/lodash-es/_stackGet.js +4 -4
  884. package/dist/lib/node_modules/lodash-es/_stackHas.js +4 -4
  885. package/dist/lib/node_modules/lodash-es/_stackSet.js +4 -4
  886. package/dist/lib/node_modules/lodash-es/_strictIndexOf.js +14 -0
  887. package/dist/lib/node_modules/lodash-es/_stringToArray.js +4 -4
  888. package/dist/lib/node_modules/lodash-es/_stringToPath.js +4 -4
  889. package/dist/lib/node_modules/lodash-es/_toKey.js +4 -4
  890. package/dist/lib/node_modules/lodash-es/_toSource.js +4 -4
  891. package/dist/lib/node_modules/lodash-es/_unicodeToArray.js +4 -4
  892. package/dist/lib/node_modules/lodash-es/constant.js +4 -4
  893. package/dist/lib/node_modules/lodash-es/eq.js +4 -4
  894. package/dist/lib/node_modules/lodash-es/flatten.js +4 -4
  895. package/dist/lib/node_modules/lodash-es/get.js +4 -4
  896. package/dist/lib/node_modules/lodash-es/identity.js +4 -4
  897. package/dist/lib/node_modules/lodash-es/intersectionWith.js +14 -0
  898. package/dist/lib/node_modules/lodash-es/isArguments.js +4 -4
  899. package/dist/lib/node_modules/lodash-es/isArray.js +4 -4
  900. package/dist/lib/node_modules/lodash-es/isArrayLike.js +4 -4
  901. package/dist/lib/node_modules/lodash-es/isArrayLikeObject.js +14 -0
  902. package/dist/lib/node_modules/lodash-es/isBuffer.js +4 -4
  903. package/dist/lib/node_modules/lodash-es/isEqual.js +14 -0
  904. package/dist/lib/node_modules/lodash-es/isFinite.js +4 -4
  905. package/dist/lib/node_modules/lodash-es/isFunction.js +4 -4
  906. package/dist/lib/node_modules/lodash-es/isLength.js +4 -4
  907. package/dist/lib/node_modules/lodash-es/isMap.js +4 -4
  908. package/dist/lib/node_modules/lodash-es/isNaN.js +4 -4
  909. package/dist/lib/node_modules/lodash-es/isNil.js +4 -4
  910. package/dist/lib/node_modules/lodash-es/isNumber.js +4 -4
  911. package/dist/lib/node_modules/lodash-es/isObject.js +4 -4
  912. package/dist/lib/node_modules/lodash-es/isObjectLike.js +4 -4
  913. package/dist/lib/node_modules/lodash-es/isPlainObject.js +4 -4
  914. package/dist/lib/node_modules/lodash-es/isRegExp.js +4 -4
  915. package/dist/lib/node_modules/lodash-es/isSet.js +4 -4
  916. package/dist/lib/node_modules/lodash-es/isString.js +4 -4
  917. package/dist/lib/node_modules/lodash-es/isSymbol.js +4 -4
  918. package/dist/lib/node_modules/lodash-es/isTypedArray.js +4 -4
  919. package/dist/lib/node_modules/lodash-es/keys.js +14 -0
  920. package/dist/lib/node_modules/lodash-es/keysIn.js +4 -4
  921. package/dist/lib/node_modules/lodash-es/last.js +4 -4
  922. package/dist/lib/node_modules/lodash-es/memoize.js +4 -4
  923. package/dist/lib/node_modules/lodash-es/mergeWith.js +14 -0
  924. package/dist/lib/node_modules/lodash-es/noop.js +14 -0
  925. package/dist/lib/node_modules/lodash-es/omit.js +4 -4
  926. package/dist/lib/node_modules/lodash-es/stubArray.js +4 -4
  927. package/dist/lib/node_modules/lodash-es/stubFalse.js +4 -4
  928. package/dist/lib/node_modules/lodash-es/toPlainObject.js +14 -0
  929. package/dist/lib/node_modules/lodash-es/toString.js +4 -4
  930. package/dist/lib/node_modules/lodash-es/unionWith.js +14 -0
  931. package/dist/lib/node_modules/lodash-es/upperFirst.js +4 -4
  932. package/dist/lib/node_modules/orderedmap/dist/index.js +4 -4
  933. package/dist/lib/node_modules/path-to-regexp/dist/index.js +14 -0
  934. package/dist/lib/node_modules/prosemirror-commands/dist/index.js +5 -4
  935. package/dist/lib/node_modules/prosemirror-dropcursor/dist/index.js +4 -4
  936. package/dist/lib/node_modules/prosemirror-gapcursor/dist/index.js +4 -4
  937. package/dist/lib/node_modules/prosemirror-history/dist/index.js +4 -4
  938. package/dist/lib/node_modules/prosemirror-keymap/dist/index.js +4 -4
  939. package/dist/lib/node_modules/prosemirror-model/dist/index.js +7 -4
  940. package/dist/lib/node_modules/prosemirror-schema-list/dist/index.js +4 -4
  941. package/dist/lib/node_modules/prosemirror-state/dist/index.js +4 -4
  942. package/dist/lib/node_modules/prosemirror-tables/dist/index.js +4 -4
  943. package/dist/lib/node_modules/prosemirror-transform/dist/index.js +5 -4
  944. package/dist/lib/node_modules/prosemirror-view/dist/index.js +8 -4
  945. package/dist/lib/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js +14 -0
  946. package/dist/lib/node_modules/rope-sequence/dist/index.js +4 -4
  947. package/dist/lib/node_modules/sortablejs/modular/sortable.esm.js +14 -0
  948. package/dist/lib/node_modules/style-mod/src/style-mod.js +6 -4
  949. package/dist/lib/node_modules/title-case/dist/index.js +14 -0
  950. package/dist/lib/node_modules/vue-codemirror/dist/vue-codemirror.esm.js +4 -4
  951. package/dist/lib/node_modules/w3c-keyname/index.js +4 -4
  952. package/dist/lib/node_modules/xgplayer/dist/index.min.css +3 -3
  953. package/dist/lib/node_modules/xgplayer/es/_virtual/_rollupPluginBabelHelpers.js +5 -4
  954. package/dist/lib/node_modules/xgplayer/es/constant.js +4 -4
  955. package/dist/lib/node_modules/xgplayer/es/defaultConfig.js +4 -4
  956. package/dist/lib/node_modules/xgplayer/es/error.js +4 -4
  957. package/dist/lib/node_modules/xgplayer/es/events.js +4 -4
  958. package/dist/lib/node_modules/xgplayer/es/index.umd.js +4 -4
  959. package/dist/lib/node_modules/xgplayer/es/instManager.js +4 -4
  960. package/dist/lib/node_modules/xgplayer/es/lang/en.js +4 -4
  961. package/dist/lib/node_modules/xgplayer/es/lang/i18n.js +4 -4
  962. package/dist/lib/node_modules/xgplayer/es/lang/jp.js +4 -4
  963. package/dist/lib/node_modules/xgplayer/es/lang/zh-cn.js +4 -4
  964. package/dist/lib/node_modules/xgplayer/es/mediaProxy.js +4 -4
  965. package/dist/lib/node_modules/xgplayer/es/player.js +4 -4
  966. package/dist/lib/node_modules/xgplayer/es/plugin/basePlugin.js +4 -4
  967. package/dist/lib/node_modules/xgplayer/es/plugin/hooksDescriptor.js +4 -4
  968. package/dist/lib/node_modules/xgplayer/es/plugin/plugin.js +4 -4
  969. package/dist/lib/node_modules/xgplayer/es/plugin/pluginsManager.js +4 -4
  970. package/dist/lib/node_modules/xgplayer/es/plugin/preset.js +4 -4
  971. package/dist/lib/node_modules/xgplayer/es/plugin/resizeObserver.js +4 -4
  972. package/dist/lib/node_modules/xgplayer/es/plugins/assets/back.js +8 -4
  973. package/dist/lib/node_modules/xgplayer/es/plugins/assets/download.js +18 -4
  974. package/dist/lib/node_modules/xgplayer/es/plugins/assets/exitCssFull.js +7 -4
  975. package/dist/lib/node_modules/xgplayer/es/plugins/assets/exitFull.js +7 -4
  976. package/dist/lib/node_modules/xgplayer/es/plugins/assets/loading.js +7 -4
  977. package/dist/lib/node_modules/xgplayer/es/plugins/assets/pause.js +7 -4
  978. package/dist/lib/node_modules/xgplayer/es/plugins/assets/pipIcon.js +8 -4
  979. package/dist/lib/node_modules/xgplayer/es/plugins/assets/pipIconExit.js +11 -4
  980. package/dist/lib/node_modules/xgplayer/es/plugins/assets/play.js +7 -4
  981. package/dist/lib/node_modules/xgplayer/es/plugins/assets/playNext.js +7 -4
  982. package/dist/lib/node_modules/xgplayer/es/plugins/assets/replay.js +7 -4
  983. package/dist/lib/node_modules/xgplayer/es/plugins/assets/requestCssFull.js +7 -4
  984. package/dist/lib/node_modules/xgplayer/es/plugins/assets/requestFull.js +7 -4
  985. package/dist/lib/node_modules/xgplayer/es/plugins/assets/rotate.js +15 -4
  986. package/dist/lib/node_modules/xgplayer/es/plugins/assets/seekicon.js +10 -4
  987. package/dist/lib/node_modules/xgplayer/es/plugins/assets/volumeLarge.js +8 -4
  988. package/dist/lib/node_modules/xgplayer/es/plugins/assets/volumeMuted.js +8 -4
  989. package/dist/lib/node_modules/xgplayer/es/plugins/assets/volumeSmall.js +8 -4
  990. package/dist/lib/node_modules/xgplayer/es/plugins/common/iconPlugin.js +4 -4
  991. package/dist/lib/node_modules/xgplayer/es/plugins/common/iconTools.js +6 -4
  992. package/dist/lib/node_modules/xgplayer/es/plugins/common/optionList.js +4 -4
  993. package/dist/lib/node_modules/xgplayer/es/plugins/common/optionsIcon.js +7 -4
  994. package/dist/lib/node_modules/xgplayer/es/plugins/common/thumbnail.js +4 -4
  995. package/dist/lib/node_modules/xgplayer/es/plugins/controls/index.js +12 -4
  996. package/dist/lib/node_modules/xgplayer/es/plugins/cssFullScreen/index.js +8 -4
  997. package/dist/lib/node_modules/xgplayer/es/plugins/definition/index.js +4 -4
  998. package/dist/lib/node_modules/xgplayer/es/plugins/download/index.js +8 -4
  999. package/dist/lib/node_modules/xgplayer/es/plugins/dynamicBg/index.js +5 -4
  1000. package/dist/lib/node_modules/xgplayer/es/plugins/enter/index.js +4 -4
  1001. package/dist/lib/node_modules/xgplayer/es/plugins/error/index.js +9 -4
  1002. package/dist/lib/node_modules/xgplayer/es/plugins/fpsDetect/index.js +4 -4
  1003. package/dist/lib/node_modules/xgplayer/es/plugins/fullscreen/backicon.js +5 -4
  1004. package/dist/lib/node_modules/xgplayer/es/plugins/fullscreen/index.js +8 -4
  1005. package/dist/lib/node_modules/xgplayer/es/plugins/gapJump/index.js +4 -4
  1006. package/dist/lib/node_modules/xgplayer/es/plugins/keyboard/index.js +4 -4
  1007. package/dist/lib/node_modules/xgplayer/es/plugins/loading/index.js +7 -4
  1008. package/dist/lib/node_modules/xgplayer/es/plugins/logger/index.js +4 -4
  1009. package/dist/lib/node_modules/xgplayer/es/plugins/miniScreen/index.js +16 -4
  1010. package/dist/lib/node_modules/xgplayer/es/plugins/miniScreen/miniScreenIcon.js +7 -4
  1011. package/dist/lib/node_modules/xgplayer/es/plugins/mobile/index.js +22 -4
  1012. package/dist/lib/node_modules/xgplayer/es/plugins/mobile/touch.js +4 -4
  1013. package/dist/lib/node_modules/xgplayer/es/plugins/pc/index.js +4 -4
  1014. package/dist/lib/node_modules/xgplayer/es/plugins/pip/index.js +11 -4
  1015. package/dist/lib/node_modules/xgplayer/es/plugins/play/index.js +8 -4
  1016. package/dist/lib/node_modules/xgplayer/es/plugins/playNext/index.js +10 -4
  1017. package/dist/lib/node_modules/xgplayer/es/plugins/playbackRate/index.js +4 -4
  1018. package/dist/lib/node_modules/xgplayer/es/plugins/poster/index.js +5 -4
  1019. package/dist/lib/node_modules/xgplayer/es/plugins/progress/index.js +10 -4
  1020. package/dist/lib/node_modules/xgplayer/es/plugins/progress/innerList.js +4 -4
  1021. package/dist/lib/node_modules/xgplayer/es/plugins/progress/miniProgress.js +7 -4
  1022. package/dist/lib/node_modules/xgplayer/es/plugins/progressPreview/dotsApi.js +4 -4
  1023. package/dist/lib/node_modules/xgplayer/es/plugins/progressPreview/index.js +14 -4
  1024. package/dist/lib/node_modules/xgplayer/es/plugins/prompt/index.js +6 -4
  1025. package/dist/lib/node_modules/xgplayer/es/plugins/replay/index.js +6 -4
  1026. package/dist/lib/node_modules/xgplayer/es/plugins/rotate/index.js +9 -4
  1027. package/dist/lib/node_modules/xgplayer/es/plugins/screenShot/index.js +9 -4
  1028. package/dist/lib/node_modules/xgplayer/es/plugins/start/index.js +7 -4
  1029. package/dist/lib/node_modules/xgplayer/es/plugins/stats/index.js +4 -4
  1030. package/dist/lib/node_modules/xgplayer/es/plugins/testspeed/index.js +4 -4
  1031. package/dist/lib/node_modules/xgplayer/es/plugins/time/index.js +9 -4
  1032. package/dist/lib/node_modules/xgplayer/es/plugins/time/timesegments.js +4 -4
  1033. package/dist/lib/node_modules/xgplayer/es/plugins/volume/index.js +14 -4
  1034. package/dist/lib/node_modules/xgplayer/es/plugins/waitingTimeoutJump/index.js +4 -4
  1035. package/dist/lib/node_modules/xgplayer/es/presets/default.js +4 -4
  1036. package/dist/lib/node_modules/xgplayer/es/state.js +4 -4
  1037. package/dist/lib/node_modules/xgplayer/es/stateClassMap.js +4 -4
  1038. package/dist/lib/node_modules/xgplayer/es/utils/database.js +4 -4
  1039. package/dist/lib/node_modules/xgplayer/es/utils/debug.js +4 -4
  1040. package/dist/lib/node_modules/xgplayer/es/utils/draggabilly.js +4 -4
  1041. package/dist/lib/node_modules/xgplayer/es/utils/sniffer.js +4 -4
  1042. package/dist/lib/node_modules/xgplayer/es/utils/util.js +4 -4
  1043. package/dist/lib/node_modules/xgplayer/es/utils/xgplayerTimeRange.js +4 -4
  1044. package/dist/lib/node_modules/xgplayer/es/version.js +4 -4
  1045. package/dist/lib/packages/components/index.js +4 -4
  1046. package/dist/lib/packages/hooks/dist/index.js +14 -0
  1047. package/dist/lib/packages/utils/dist/index.js +14 -0
  1048. package/dist/lib/styles/tokens.css +3 -3
  1049. package/package.json +28 -29
  1050. package/dist/es/node_modules/@tanstack/store/dist/esm/derived.js +0 -14
  1051. package/dist/es/node_modules/@tanstack/store/dist/esm/scheduler.js +0 -14
  1052. package/dist/lib/node_modules/@tanstack/store/dist/esm/derived.js +0 -14
  1053. package/dist/lib/node_modules/@tanstack/store/dist/esm/scheduler.js +0 -14
@@ -7,8 +7,2740 @@ You shall not disclose such Confidential Information and shall use it only in
7
7
  accordance with the terms of the license agreement.
8
8
 
9
9
  --- Build Info ---
10
- Version: 1.1.6
11
- Build Time: 2026/3/4 16:49:40
12
- Build Commit: 63f88fe7a59965e471017742b570179ac37f5591
10
+ Version: 1.1.7
11
+ Build Time: 2026/3/13 18:25:06
12
+ Build Commit: 0b162dea954baa715e67b70f80401a571205058a
13
13
  */
14
- import t from"../../orderedmap/dist/index.js";function e(t,n,r){for(let i=0;;i++){if(i==t.childCount||i==n.childCount)return t.childCount==n.childCount?null:r;let s=t.child(i),o=n.child(i);if(s!=o){if(!s.sameMarkup(o))return r;if(s.isText&&s.text!=o.text){for(let t=0;s.text[t]==o.text[t];t++)r++;return r}if(s.content.size||o.content.size){let t=e(s.content,o.content,r+1);if(null!=t)return t}r+=s.nodeSize}else r+=s.nodeSize}}function n(t,e,r,i){for(let s=t.childCount,o=e.childCount;;){if(0==s||0==o)return s==o?null:{a:r,b:i};let h=t.child(--s),l=e.child(--o),a=h.nodeSize;if(h!=l){if(!h.sameMarkup(l))return{a:r,b:i};if(h.isText&&h.text!=l.text){let t=0,e=Math.min(h.text.length,l.text.length);for(;t<e&&h.text[h.text.length-t-1]==l.text[l.text.length-t-1];)t++,r--,i--;return{a:r,b:i}}if(h.content.size||l.content.size){let t=n(h.content,l.content,r-1,i-1);if(t)return t}r-=a,i-=a}else r-=a,i-=a}}class r{constructor(t,e){if(this.content=t,this.size=e||0,null==e)for(let n=0;n<t.length;n++)this.size+=t[n].nodeSize}nodesBetween(t,e,n,r=0,i){for(let s=0,o=0;o<e;s++){let h=this.content[s],l=o+h.nodeSize;if(l>t&&!1!==n(h,r+o,i||null,s)&&h.content.size){let i=o+1;h.nodesBetween(Math.max(0,t-i),Math.min(h.content.size,e-i),n,r+i)}o=l}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,e,n,r){let i="",s=!0;return this.nodesBetween(t,e,(o,h)=>{let l=o.isText?o.text.slice(Math.max(t,h)-h,e-h):o.isLeaf?r?"function"==typeof r?r(o):r:o.type.spec.leafText?o.type.spec.leafText(o):"":"";o.isBlock&&(o.isLeaf&&l||o.isTextblock)&&n&&(s?s=!1:i+=n),i+=l},0),i}append(t){if(!t.size)return this;if(!this.size)return t;let e=this.lastChild,n=t.firstChild,i=this.content.slice(),s=0;for(e.isText&&e.sameMarkup(n)&&(i[i.length-1]=e.withText(e.text+n.text),s=1);s<t.content.length;s++)i.push(t.content[s]);return new r(i,this.size+t.size)}cut(t,e=this.size){if(0==t&&e==this.size)return this;let n=[],i=0;if(e>t)for(let r=0,s=0;s<e;r++){let o=this.content[r],h=s+o.nodeSize;h>t&&((s<t||h>e)&&(o=o.isText?o.cut(Math.max(0,t-s),Math.min(o.text.length,e-s)):o.cut(Math.max(0,t-s-1),Math.min(o.content.size,e-s-1))),n.push(o),i+=o.nodeSize),s=h}return new r(n,i)}cutByIndex(t,e){return t==e?r.empty:0==t&&e==this.content.length?this:new r(this.content.slice(t,e))}replaceChild(t,e){let n=this.content[t];if(n==e)return this;let i=this.content.slice(),s=this.size+e.nodeSize-n.nodeSize;return i[t]=e,new r(i,s)}addToStart(t){return new r([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new r(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let e=0;e<this.content.length;e++)if(!this.content[e].eq(t.content[e]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(t){let e=this.content[t];if(!e)throw new RangeError("Index "+t+" out of range for "+this);return e}maybeChild(t){return this.content[t]||null}forEach(t){for(let e=0,n=0;e<this.content.length;e++){let r=this.content[e];t(r,n,e),n+=r.nodeSize}}findDiffStart(t,n=0){return e(this,t,n)}findDiffEnd(t,e=this.size,r=t.size){return n(this,t,e,r)}findIndex(t){if(0==t)return s(0,t);if(t==this.size)return s(this.content.length,t);if(t>this.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let e=0,n=0;;e++){let r=n+this.child(e).nodeSize;if(r>=t)return r==t?s(e+1,r):s(e,n);n=r}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,e){if(!e)return r.empty;if(!Array.isArray(e))throw new RangeError("Invalid input for Fragment.fromJSON");return new r(e.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return r.empty;let e,n=0;for(let r=0;r<t.length;r++){let i=t[r];n+=i.nodeSize,r&&i.isText&&t[r-1].sameMarkup(i)?(e||(e=t.slice(0,r)),e[e.length-1]=i.withText(e[e.length-1].text+i.text)):e&&e.push(i)}return new r(e||t,n)}static from(t){if(!t)return r.empty;if(t instanceof r)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new r([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}r.empty=new r([],0);const i={index:0,offset:0};function s(t,e){return i.index=t,i.offset=e,i}function o(t,e){if(t===e)return!0;if(!t||"object"!=typeof t||!e||"object"!=typeof e)return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!o(t[n],e[n]))return!1}else{for(let n in t)if(!(n in e)||!o(t[n],e[n]))return!1;for(let n in e)if(!(n in t))return!1}return!0}class h{constructor(t,e){this.type=t,this.attrs=e}addToSet(t){let e,n=!1;for(let r=0;r<t.length;r++){let i=t[r];if(this.eq(i))return t;if(this.type.excludes(i.type))e||(e=t.slice(0,r));else{if(i.type.excludes(this.type))return t;!n&&i.type.rank>this.type.rank&&(e||(e=t.slice(0,r)),e.push(this),n=!0),e&&e.push(i)}}return e||(e=t.slice()),n||e.push(this),e}removeFromSet(t){for(let e=0;e<t.length;e++)if(this.eq(t[e]))return t.slice(0,e).concat(t.slice(e+1));return t}isInSet(t){for(let e=0;e<t.length;e++)if(this.eq(t[e]))return!0;return!1}eq(t){return this==t||this.type==t.type&&o(this.attrs,t.attrs)}toJSON(){let t={type:this.type.name};for(let e in this.attrs){t.attrs=this.attrs;break}return t}static fromJSON(t,e){if(!e)throw new RangeError("Invalid input for Mark.fromJSON");let n=t.marks[e.type];if(!n)throw new RangeError(`There is no mark type ${e.type} in this schema`);let r=n.create(e.attrs);return n.checkAttrs(r.attrs),r}static sameSet(t,e){if(t==e)return!0;if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].eq(e[n]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&0==t.length)return h.none;if(t instanceof h)return[t];let e=t.slice();return e.sort((t,e)=>t.type.rank-e.type.rank),e}}h.none=[];class l extends Error{}class a{constructor(t,e,n){this.content=t,this.openStart=e,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,e){let n=p(this.content,t+this.openStart,e);return n&&new a(n,this.openStart,this.openEnd)}removeBetween(t,e){return new a(c(this.content,t+this.openStart,e+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,e){if(!e)return a.empty;let n=e.openStart||0,i=e.openEnd||0;if("number"!=typeof n||"number"!=typeof i)throw new RangeError("Invalid input for Slice.fromJSON");return new a(r.fromJSON(t,e.content),n,i)}static maxOpen(t,e=!0){let n=0,r=0;for(let i=t.firstChild;i&&!i.isLeaf&&(e||!i.type.spec.isolating);i=i.firstChild)n++;for(let i=t.lastChild;i&&!i.isLeaf&&(e||!i.type.spec.isolating);i=i.lastChild)r++;return new a(t,n,r)}}function c(t,e,n){let{index:r,offset:i}=t.findIndex(e),s=t.maybeChild(r),{index:o,offset:h}=t.findIndex(n);if(i==e||s.isText){if(h!=n&&!t.child(o).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=o)throw new RangeError("Removing non-flat range");return t.replaceChild(r,s.copy(c(s.content,e-i-1,n-i-1)))}function p(t,e,n,r){let{index:i,offset:s}=t.findIndex(e),o=t.maybeChild(i);if(s==e||o.isText)return r&&!r.canReplace(i,i,n)?null:t.cut(0,e).append(n).append(t.cut(e));let h=p(o.content,e-s-1,n,o);return h&&t.replaceChild(i,o.copy(h))}function f(t,e,n){if(n.openStart>t.depth)throw new l("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new l("Inconsistent open depths");return u(t,e,n,0)}function u(t,e,n,i){let s=t.index(i),o=t.node(i);if(s==e.index(i)&&i<t.depth-n.openStart){let r=u(t,e,n,i+1);return o.copy(o.content.replaceChild(s,r))}if(n.content.size){if(n.openStart||n.openEnd||t.depth!=i||e.depth!=i){let{start:s,end:h}=function(t,e){let n=e.depth-t.openStart,i=e.node(n).copy(t.content);for(let s=n-1;s>=0;s--)i=e.node(s).copy(r.from(i));return{start:i.resolveNoCache(t.openStart+n),end:i.resolveNoCache(i.content.size-t.openEnd-n)}}(n,t);return y(o,k(t,s,h,e,i))}{let r=t.parent,i=r.content;return y(r,i.cut(0,t.parentOffset).append(n.content).append(i.cut(e.parentOffset)))}}return y(o,w(t,e,i))}function d(t,e){if(!e.type.compatibleContent(t.type))throw new l("Cannot join "+e.type.name+" onto "+t.type.name)}function m(t,e,n){let r=t.node(n);return d(r,e.node(n)),r}function g(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function x(t,e,n,r){let i=(e||t).node(n),s=0,o=e?e.index(n):i.childCount;t&&(s=t.index(n),t.depth>n?s++:t.textOffset&&(g(t.nodeAfter,r),s++));for(let h=s;h<o;h++)g(i.child(h),r);e&&e.depth==n&&e.textOffset&&g(e.nodeBefore,r)}function y(t,e){return t.type.checkContent(e),t.copy(e)}function k(t,e,n,i,s){let o=t.depth>s&&m(t,e,s+1),h=i.depth>s&&m(n,i,s+1),l=[];return x(null,t,s,l),o&&h&&e.index(s)==n.index(s)?(d(o,h),g(y(o,k(t,e,n,i,s+1)),l)):(o&&g(y(o,w(t,e,s+1)),l),x(e,n,s,l),h&&g(y(h,w(n,i,s+1)),l)),x(i,null,s,l),new r(l)}function w(t,e,n){let i=[];if(x(null,t,n,i),t.depth>n){g(y(m(t,e,n+1),w(t,e,n+1)),i)}return x(e,null,n,i),new r(i)}a.empty=new a(r.empty,0,0);class S{constructor(t,e,n){this.pos=t,this.path=e,this.parentOffset=n,this.depth=e.length/3-1}resolveDepth(t){return null==t?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[3*this.resolveDepth(t)]}index(t){return this.path[3*this.resolveDepth(t)+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t!=this.depth||this.textOffset?1:0)}start(t){return 0==(t=this.resolveDepth(t))?0:this.path[3*t-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(!(t=this.resolveDepth(t)))throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]}after(t){if(!(t=this.resolveDepth(t)))throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]+this.path[3*t].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,e=this.index(this.depth);if(e==t.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=t.child(e);return n?t.child(e).cut(n):r}get nodeBefore(){let t=this.index(this.depth),e=this.pos-this.path[this.path.length-1];return e?this.parent.child(t).cut(0,e):0==t?null:this.parent.child(t-1)}posAtIndex(t,e){e=this.resolveDepth(e);let n=this.path[3*e],r=0==e?0:this.path[3*e-1]+1;for(let i=0;i<t;i++)r+=n.child(i).nodeSize;return r}marks(){let t=this.parent,e=this.index();if(0==t.content.size)return h.none;if(this.textOffset)return t.child(e).marks;let n=t.maybeChild(e-1),r=t.maybeChild(e);if(!n){let t=n;n=r,r=t}let i=n.marks;for(var s=0;s<i.length;s++)!1!==i[s].type.spec.inclusive||r&&i[s].isInSet(r.marks)||(i=i[s--].removeFromSet(i));return i}marksAcross(t){let e=this.parent.maybeChild(this.index());if(!e||!e.isInline)return null;let n=e.marks,r=t.parent.maybeChild(t.index());for(var i=0;i<n.length;i++)!1!==n[i].type.spec.inclusive||r&&n[i].isInSet(r.marks)||(n=n[i--].removeFromSet(n));return n}sharedDepth(t){for(let e=this.depth;e>0;e--)if(this.start(e)<=t&&this.end(e)>=t)return e;return 0}blockRange(t=this,e){if(t.pos<this.pos)return t.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);n>=0;n--)if(t.pos<=this.end(n)&&(!e||e(this.node(n))))return new O(this,t,n);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos<this.pos?t:this}toString(){let t="";for(let e=1;e<=this.depth;e++)t+=(t?"/":"")+this.node(e).type.name+"_"+this.index(e-1);return t+":"+this.parentOffset}static resolve(t,e){if(!(e>=0&&e<=t.content.size))throw new RangeError("Position "+e+" out of range");let n=[],r=0,i=e;for(let s=t;;){let{index:t,offset:e}=s.content.findIndex(i),o=i-e;if(n.push(s,t,r+e),!o)break;if(s=s.child(t),s.isText)break;i=o-1,r+=e+1}return new S(e,n,i)}static resolveCached(t,e){let n=E.get(t);if(n)for(let i=0;i<n.elts.length;i++){let t=n.elts[i];if(t.pos==e)return t}else E.set(t,n=new b);let r=n.elts[n.i]=S.resolve(t,e);return n.i=(n.i+1)%C,r}}class b{constructor(){this.elts=[],this.i=0}}const C=12,E=/* @__PURE__ */new WeakMap;class O{constructor(t,e,n){this.$from=t,this.$to=e,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const v=/* @__PURE__ */Object.create(null);class T{constructor(t,e,n,i=h.none){this.type=t,this.attrs=e,this.marks=i,this.content=n||r.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(t){return this.content.child(t)}maybeChild(t){return this.content.maybeChild(t)}forEach(t){this.content.forEach(t)}nodesBetween(t,e,n,r=0){this.content.nodesBetween(t,e,n,r,this)}descendants(t){this.nodesBetween(0,this.content.size,t)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(t,e,n,r){return this.content.textBetween(t,e,n,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content)}sameMarkup(t){return this.hasMarkup(t.type,t.attrs,t.marks)}hasMarkup(t,e,n){return this.type==t&&o(this.attrs,e||t.defaultAttrs||v)&&h.sameSet(this.marks,n||h.none)}copy(t=null){return t==this.content?this:new T(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new T(this.type,this.attrs,this.content,t)}cut(t,e=this.content.size){return 0==t&&e==this.content.size?this:this.copy(this.content.cut(t,e))}slice(t,e=this.content.size,n=!1){if(t==e)return a.empty;let r=this.resolve(t),i=this.resolve(e),s=n?0:r.sharedDepth(e),o=r.start(s),h=r.node(s).content.cut(r.pos-o,i.pos-o);return new a(h,r.depth-s,i.depth-s)}replace(t,e,n){return f(this.resolve(t),this.resolve(e),n)}nodeAt(t){for(let e=this;;){let{index:n,offset:r}=e.content.findIndex(t);if(e=e.maybeChild(n),!e)return null;if(r==t||e.isText)return e;t-=r+1}}childAfter(t){let{index:e,offset:n}=this.content.findIndex(t);return{node:this.content.maybeChild(e),index:e,offset:n}}childBefore(t){if(0==t)return{node:null,index:0,offset:0};let{index:e,offset:n}=this.content.findIndex(t);if(n<t)return{node:this.content.child(e),index:e,offset:n};let r=this.content.child(e-1);return{node:r,index:e-1,offset:n-r.nodeSize}}resolve(t){return S.resolveCached(this,t)}resolveNoCache(t){return S.resolve(this,t)}rangeHasMark(t,e,n){let r=!1;return e>t&&this.nodesBetween(t,e,t=>(n.isInSet(t.marks)&&(r=!0),!r)),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),A(this.marks,t)}contentMatchAt(t){let e=this.type.contentMatch.matchFragment(this.content,0,t);if(!e)throw new Error("Called contentMatchAt on a node with invalid content");return e}canReplace(t,e,n=r.empty,i=0,s=n.childCount){let o=this.contentMatchAt(t).matchFragment(n,i,s),h=o&&o.matchFragment(this.content,e);if(!h||!h.validEnd)return!1;for(let r=i;r<s;r++)if(!this.type.allowsMarks(n.child(r).marks))return!1;return!0}canReplaceWith(t,e,n,r){if(r&&!this.type.allowsMarks(r))return!1;let i=this.contentMatchAt(t).matchType(n),s=i&&i.matchFragment(this.content,e);return!!s&&s.validEnd}canAppend(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let t=h.none;for(let e=0;e<this.marks.length;e++){let n=this.marks[e];n.type.checkAttrs(n.attrs),t=n.addToSet(t)}if(!h.sameSet(t,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let t={type:this.type.name};for(let e in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(t=>t.toJSON())),t}static fromJSON(t,e){if(!e)throw new RangeError("Invalid input for Node.fromJSON");let n;if(e.marks){if(!Array.isArray(e.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=e.marks.map(t.markFromJSON)}if("text"==e.type){if("string"!=typeof e.text)throw new RangeError("Invalid text node in JSON");return t.text(e.text,n)}let i=r.fromJSON(t,e.content),s=t.nodeType(e.type).create(e.attrs,i,n);return s.type.checkAttrs(s.attrs),s}}T.prototype.text=void 0;class M extends T{constructor(t,e,n,r){if(super(t,e,null,r),!n)throw new RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):A(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,e){return this.text.slice(t,e)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new M(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new M(this.type,this.attrs,t,this.marks)}cut(t=0,e=this.text.length){return 0==t&&e==this.text.length?this:this.withText(this.text.slice(t,e))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function A(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class z{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,e){let n=new N(t,e);if(null==n.next)return z.empty;let r=R(n);n.next&&n.err("Unexpected trailing text");let i=function(t){let e=/* @__PURE__ */Object.create(null);return n(J(t,0));function n(r){let i=[];r.forEach(e=>{t[e].forEach(({term:e,to:n})=>{if(!e)return;let r;for(let t=0;t<i.length;t++)i[t][0]==e&&(r=i[t][1]);J(t,n).forEach(t=>{r||i.push([e,r=[]]),-1==r.indexOf(t)&&r.push(t)})})});let s=e[r.join(",")]=new z(r.indexOf(t.length-1)>-1);for(let t=0;t<i.length;t++){let r=i[t][1].sort(P);s.next.push({type:i[t][0],next:e[r.join(",")]||n(r)})}return s}}(function(t){let e=[[]];return i(s(t,0),n()),e;function n(){return e.push([])-1}function r(t,n,r){let i={term:r,to:n};return e[t].push(i),i}function i(t,e){t.forEach(t=>t.to=e)}function s(t,e){if("choice"==t.type)return t.exprs.reduce((t,n)=>t.concat(s(n,e)),[]);if("seq"!=t.type){if("star"==t.type){let o=n();return r(e,o),i(s(t.expr,o),o),[r(o)]}if("plus"==t.type){let o=n();return i(s(t.expr,e),o),i(s(t.expr,o),o),[r(o)]}if("opt"==t.type)return[r(e)].concat(s(t.expr,e));if("range"==t.type){let o=e;for(let e=0;e<t.min;e++){let e=n();i(s(t.expr,o),e),o=e}if(-1==t.max)i(s(t.expr,o),o);else for(let e=t.min;e<t.max;e++){let e=n();r(o,e),i(s(t.expr,o),e),o=e}return[r(o)]}if("name"==t.type)return[r(e,void 0,t.value)];throw new Error("Unknown expr type")}for(let r=0;;r++){let o=s(t.exprs[r],e);if(r==t.exprs.length-1)return o;i(o,e=n())}}}(r));return function(t,e){for(let n=0,r=[t];n<r.length;n++){let t=r[n],i=!t.validEnd,s=[];for(let e=0;e<t.next.length;e++){let{type:n,next:o}=t.next[e];s.push(n.name),!i||n.isText||n.hasRequiredAttrs()||(i=!1),-1==r.indexOf(o)&&r.push(o)}i&&e.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(i,n),i}matchType(t){for(let e=0;e<this.next.length;e++)if(this.next[e].type==t)return this.next[e].next;return null}matchFragment(t,e=0,n=t.childCount){let r=this;for(let i=e;r&&i<n;i++)r=r.matchType(t.child(i).type);return r}get inlineContent(){return 0!=this.next.length&&this.next[0].type.isInline}get defaultType(){for(let t=0;t<this.next.length;t++){let{type:e}=this.next[t];if(!e.isText&&!e.hasRequiredAttrs())return e}return null}compatible(t){for(let e=0;e<this.next.length;e++)for(let n=0;n<t.next.length;n++)if(this.next[e].type==t.next[n].type)return!0;return!1}fillBefore(t,e=!1,n=0){let i=[this];return function s(o,h){let l=o.matchFragment(t,n);if(l&&(!e||l.validEnd))return r.from(h.map(t=>t.createAndFill()));for(let t=0;t<o.next.length;t++){let{type:e,next:n}=o.next[t];if(!e.isText&&!e.hasRequiredAttrs()&&-1==i.indexOf(n)){i.push(n);let t=s(n,h.concat(e));if(t)return t}}return null}(this,[])}findWrapping(t){for(let n=0;n<this.wrapCache.length;n+=2)if(this.wrapCache[n]==t)return this.wrapCache[n+1];let e=this.computeWrapping(t);return this.wrapCache.push(t,e),e}computeWrapping(t){let e=/* @__PURE__ */Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),i=r.match;if(i.matchType(t)){let t=[];for(let e=r;e.type;e=e.via)t.push(e.type);return t.reverse()}for(let t=0;t<i.next.length;t++){let{type:s,next:o}=i.next[t];s.isLeaf||s.hasRequiredAttrs()||s.name in e||r.type&&!o.validEnd||(n.push({match:s.contentMatch,type:s,via:r}),e[s.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(t){if(t>=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];return function e(n){t.push(n);for(let r=0;r<n.next.length;r++)-1==t.indexOf(n.next[r].next)&&e(n.next[r].next)}(this),t.map((e,n)=>{let r=n+(e.validEnd?"*":" ")+" ";for(let i=0;i<e.next.length;i++)r+=(i?", ":"")+e.next[i].type.name+"->"+t.indexOf(e.next[i].next);return r}).join("\n")}}z.empty=new z(!0);class N{constructor(t,e){this.string=t,this.nodeTypes=e,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function R(t){let e=[];do{e.push(I(t))}while(t.eat("|"));return 1==e.length?e[0]:{type:"choice",exprs:e}}function I(t){let e=[];do{e.push(F(t))}while(t.next&&")"!=t.next&&"|"!=t.next);return 1==e.length?e[0]:{type:"seq",exprs:e}}function F(t){let e=function(t){if(t.eat("(")){let e=R(t);return t.eat(")")||t.err("Missing closing paren"),e}if(!/\W/.test(t.next)){let e=function(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let i=[];for(let s in n){let t=n[s];t.isInGroup(e)&&i.push(t)}0==i.length&&t.err("No node type or group '"+e+"' found");return i}(t,t.next).map(e=>(null==t.inline?t.inline=e.isInline:t.inline!=e.isInline&&t.err("Mixing inline and block content"),{type:"name",value:e}));return t.pos++,1==e.length?e[0]:{type:"choice",exprs:e}}t.err("Unexpected token '"+t.next+"'")}(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else{if(!t.eat("{"))break;e=D(t,e)}return e}function B(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function D(t,e){let n=B(t),r=n;return t.eat(",")&&(r="}"!=t.next?B(t):-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function P(t,e){return e-t}function J(t,e){let n=[];return function e(r){let i=t[r];if(1==i.length&&!i[0].term)return e(i[0].to);n.push(r);for(let t=0;t<i.length;t++){let{term:r,to:s}=i[t];r||-1!=n.indexOf(s)||e(s)}}(e),n.sort(P)}function j(t){let e=/* @__PURE__ */Object.create(null);for(let n in t){let r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}function q(t,e){let n=/* @__PURE__ */Object.create(null);for(let r in t){let i=e&&e[r];if(void 0===i){let e=t[r];if(!e.hasDefault)throw new RangeError("No value supplied for attribute "+r);i=e.default}n[r]=i}return n}function $(t,e,n,r){for(let i in e)if(!(i in t))throw new RangeError(`Unsupported attribute ${i} for ${n} of type ${i}`);for(let i in t){let n=t[i];n.validate&&n.validate(e[i])}}function L(t,e){let n=/* @__PURE__ */Object.create(null);if(e)for(let r in e)n[r]=new U(t,r,e[r]);return n}class W{constructor(t,e,n){this.name=t,this.schema=e,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(" "):[],this.attrs=L(t,n.attrs),this.defaultAttrs=j(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||"text"==t),this.isText="text"==t}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==z.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(t){return this.groups.indexOf(t)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:q(this.attrs,t)}create(t=null,e,n){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new T(this,this.computeAttrs(t),r.from(e),h.setFrom(n))}createChecked(t=null,e,n){return e=r.from(e),this.checkContent(e),new T(this,this.computeAttrs(t),e,h.setFrom(n))}createAndFill(t=null,e,n){if(t=this.computeAttrs(t),(e=r.from(e)).size){let t=this.contentMatch.fillBefore(e);if(!t)return null;e=t.append(e)}let i=this.contentMatch.matchFragment(e),s=i&&i.fillBefore(r.empty,!0);return s?new T(this,t,e.append(s),h.setFrom(n)):null}validContent(t){let e=this.contentMatch.matchFragment(t);if(!e||!e.validEnd)return!1;for(let n=0;n<t.childCount;n++)if(!this.allowsMarks(t.child(n).marks))return!1;return!0}checkContent(t){if(!this.validContent(t))throw new RangeError(`Invalid content for node ${this.name}: ${t.toString().slice(0,50)}`)}checkAttrs(t){$(this.attrs,t,"node",this.name)}allowsMarkType(t){return null==this.markSet||this.markSet.indexOf(t)>-1}allowsMarks(t){if(null==this.markSet)return!0;for(let e=0;e<t.length;e++)if(!this.allowsMarkType(t[e].type))return!1;return!0}allowedMarks(t){if(null==this.markSet)return t;let e;for(let n=0;n<t.length;n++)this.allowsMarkType(t[n].type)?e&&e.push(t[n]):e||(e=t.slice(0,n));return e?e.length?e:h.none:t}static compile(t,e){let n=/* @__PURE__ */Object.create(null);t.forEach((t,r)=>n[t]=new W(t,e,r));let r=e.spec.topNode||"doc";if(!n[r])throw new RangeError("Schema is missing its top node type ('"+r+"')");if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(let i in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n}}class U{constructor(t,e,n){this.hasDefault=Object.prototype.hasOwnProperty.call(n,"default"),this.default=n.default,this.validate="string"==typeof n.validate?function(t,e,n){let r=n.split("|");return n=>{let i=null===n?"null":typeof n;if(r.indexOf(i)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${t}, got ${i}`)}}(t,e,n.validate):n.validate}get isRequired(){return!this.hasDefault}}class G{constructor(t,e,n,r){this.name=t,this.rank=e,this.schema=n,this.spec=r,this.attrs=L(t,r.attrs),this.excluded=null;let i=j(this.attrs);this.instance=i?new h(this,i):null}create(t=null){return!t&&this.instance?this.instance:new h(this,q(this.attrs,t))}static compile(t,e){let n=/* @__PURE__ */Object.create(null),r=0;return t.forEach((t,i)=>n[t]=new G(t,r++,e,i)),n}removeFromSet(t){for(var e=0;e<t.length;e++)t[e].type==this&&(t=t.slice(0,e).concat(t.slice(e+1)),e--);return t}isInSet(t){for(let e=0;e<t.length;e++)if(t[e].type==this)return t[e]}checkAttrs(t){$(this.attrs,t,"mark",this.name)}excludes(t){return this.excluded.indexOf(t)>-1}}class V{constructor(e){this.linebreakReplacement=null,this.cached=/* @__PURE__ */Object.create(null);let n=this.spec={};for(let t in e)n[t]=e[t];n.nodes=t.from(e.nodes),n.marks=t.from(e.marks||{}),this.nodes=W.compile(this.spec.nodes,this),this.marks=G.compile(this.spec.marks,this);let r=/* @__PURE__ */Object.create(null);for(let t in this.nodes){if(t in this.marks)throw new RangeError(t+" can not be both a node and a mark");let e=this.nodes[t],n=e.spec.content||"",i=e.spec.marks;if(e.contentMatch=r[n]||(r[n]=z.parse(n,this.nodes)),e.inlineContent=e.contentMatch.inlineContent,e.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!e.isInline||!e.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=e}e.markSet="_"==i?null:i?_(this,i.split(" ")):""!=i&&e.inlineContent?null:[]}for(let t in this.marks){let e=this.marks[t],n=e.spec.excludes;e.excluded=null==n?[e]:""==n?[]:_(this,n.split(" "))}this.nodeFromJSON=t=>T.fromJSON(this,t),this.markFromJSON=t=>h.fromJSON(this,t),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=/* @__PURE__ */Object.create(null)}node(t,e=null,n,r){if("string"==typeof t)t=this.nodeType(t);else{if(!(t instanceof W))throw new RangeError("Invalid node type: "+t);if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}return t.createChecked(e,n,r)}text(t,e){let n=this.nodes.text;return new M(n,n.defaultAttrs,t,h.setFrom(e))}mark(t,e){return"string"==typeof t&&(t=this.marks[t]),t.create(e)}nodeType(t){let e=this.nodes[t];if(!e)throw new RangeError("Unknown node type: "+t);return e}}function _(t,e){let n=[];for(let r=0;r<e.length;r++){let i=e[r],s=t.marks[i],o=s;if(s)n.push(s);else for(let e in t.marks){let r=t.marks[e];("_"==i||r.spec.group&&r.spec.group.split(" ").indexOf(i)>-1)&&n.push(o=r)}if(!o)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}class H{constructor(t,e){this.schema=t,this.rules=e,this.tags=[],this.styles=[];let n=this.matchedStyles=[];e.forEach(t=>{if(function(t){return null!=t.tag}(t))this.tags.push(t);else if(function(t){return null!=t.style}(t)){let e=/[^=]*/.exec(t.style)[0];n.indexOf(e)<0&&n.push(e),this.styles.push(t)}}),this.normalizeLists=!this.tags.some(e=>{if(!/^(ul|ol)\b/.test(e.tag)||!e.node)return!1;let n=t.nodes[e.node];return n.contentMatch.matchType(n)})}parse(t,e={}){let n=new tt(this,e,!1);return n.addAll(t,h.none,e.from,e.to),n.finish()}parseSlice(t,e={}){let n=new tt(this,e,!0);return n.addAll(t,h.none,e.from,e.to),a.maxOpen(n.finish())}matchTag(t,e,n){for(let r=n?this.tags.indexOf(n)+1:0;r<this.tags.length;r++){let n=this.tags[r];if(et(t,n.tag)&&(void 0===n.namespace||t.namespaceURI==n.namespace)&&(!n.context||e.matchesContext(n.context))){if(n.getAttrs){let e=n.getAttrs(t);if(!1===e)continue;n.attrs=e||void 0}return n}}}matchStyle(t,e,n,r){for(let i=r?this.styles.indexOf(r)+1:0;i<this.styles.length;i++){let r=this.styles[i],s=r.style;if(!(0!=s.indexOf(t)||r.context&&!n.matchesContext(r.context)||s.length>t.length&&(61!=s.charCodeAt(t.length)||s.slice(t.length+1)!=e))){if(r.getAttrs){let t=r.getAttrs(e);if(!1===t)continue;r.attrs=t||void 0}return r}}}static schemaRules(t){let e=[];function n(t){let n=null==t.priority?50:t.priority,r=0;for(;r<e.length;r++){let t=e[r];if((null==t.priority?50:t.priority)<n)break}e.splice(r,0,t)}for(let r in t.marks){let e=t.marks[r].spec.parseDOM;e&&e.forEach(t=>{n(t=nt(t)),t.mark||t.ignore||t.clearMark||(t.mark=r)})}for(let r in t.nodes){let e=t.nodes[r].spec.parseDOM;e&&e.forEach(t=>{n(t=nt(t)),t.node||t.ignore||t.mark||(t.node=r)})}return e}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new H(t,H.schemaRules(t)))}}const K={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Q={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},X={ol:!0,ul:!0};function Y(t,e,n){return null!=e?(e?1:0)|("full"===e?2:0):t&&"pre"==t.whitespace?3:-5&n}class Z{constructor(t,e,n,r,i,s){this.type=t,this.attrs=e,this.marks=n,this.solid=r,this.options=s,this.content=[],this.activeMarks=h.none,this.match=i||(4&s?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let e=this.type.contentMatch.fillBefore(r.from(t));if(!e){let e,n=this.type.contentMatch;return(e=n.findWrapping(t.type))?(this.match=n,e):null}this.match=this.type.contentMatch.matchFragment(e)}return this.match.findWrapping(t.type)}finish(t){if(!(1&this.options)){let t,e=this.content[this.content.length-1];if(e&&e.isText&&(t=/[ \t\r\n\u000c]+$/.exec(e.text))){let n=e;e.text.length==t[0].length?this.content.pop():this.content[this.content.length-1]=n.withText(n.text.slice(0,n.text.length-t[0].length))}}let e=r.from(this.content);return!t&&this.match&&(e=e.append(this.match.fillBefore(r.empty,!0))),this.type?this.type.create(this.attrs,e,this.marks):e}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!K.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}}class tt{constructor(t,e,n){this.parser=t,this.options=e,this.isOpen=n,this.open=0,this.localPreserveWS=!1;let r,i=e.topNode,s=Y(null,e.preserveWhitespace,0)|(n?4:0);r=i?new Z(i.type,i.attrs,h.none,!0,e.topMatch||i.type.contentMatch,s):new Z(n?null:t.schema.topNodeType,null,h.none,!0,null,s),this.nodes=[r],this.find=e.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t,e){3==t.nodeType?this.addTextNode(t,e):1==t.nodeType&&this.addElement(t,e)}addTextNode(t,e){let n=t.nodeValue,r=this.top,i=2&r.options?"full":this.localPreserveWS||(1&r.options)>0,{schema:s}=this.parser;if("full"===i||r.inlineContext(t)||/[^ \t\r\n\u000c]/.test(n)){if(i)if("full"===i)n=n.replace(/\r\n?/g,"\n");else if(s.linebreakReplacement&&/[\r\n]/.test(n)&&this.top.findWrapping(s.linebreakReplacement.create())){let t=n.split(/\r?\n|\r/);for(let n=0;n<t.length;n++)n&&this.insertNode(s.linebreakReplacement.create(),e,!0),t[n]&&this.insertNode(s.text(t[n]),e,!/\S/.test(t[n]));n=""}else n=n.replace(/\r?\n|\r/g," ");else if(n=n.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let e=r.content[r.content.length-1],i=t.previousSibling;(!e||i&&"BR"==i.nodeName||e.isText&&/[ \t\r\n\u000c]$/.test(e.text))&&(n=n.slice(1))}n&&this.insertNode(s.text(n),e,!/\S/.test(n)),this.findInText(t)}else this.findInside(t)}addElement(t,e,n){let r=this.localPreserveWS,i=this.top;("PRE"==t.tagName||/pre/.test(t.style&&t.style.whiteSpace))&&(this.localPreserveWS=!0);let s,o=t.nodeName.toLowerCase();X.hasOwnProperty(o)&&this.parser.normalizeLists&&function(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let t=1==e.nodeType?e.nodeName.toLowerCase():null;t&&X.hasOwnProperty(t)&&n?(n.appendChild(e),e=n):"li"==t?n=e:t&&(n=null)}}(t);let h=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(s=this.parser.matchTag(t,this,n));t:if(h?h.ignore:Q.hasOwnProperty(o))this.findInside(t),this.ignoreFallback(t,e);else if(!h||h.skip||h.closeParent){h&&h.closeParent?this.open=Math.max(0,this.open-1):h&&h.skip.nodeType&&(t=h.skip);let n,r=this.needsBlock;if(K.hasOwnProperty(o))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),n=!0,i.type||(this.needsBlock=!0);else if(!t.firstChild){this.leafFallback(t,e);break t}let s=h&&h.skip?e:this.readStyles(t,e);s&&this.addAll(t,s),n&&this.sync(i),this.needsBlock=r}else{let n=this.readStyles(t,e);n&&this.addElementByRule(t,h,n,!1===h.consuming?s:void 0)}this.localPreserveWS=r}leafFallback(t,e){"BR"==t.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode("\n"),e)}ignoreFallback(t,e){"BR"!=t.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"),e,!0)}readStyles(t,e){let n=t.style;if(n&&n.length)for(let r=0;r<this.parser.matchedStyles.length;r++){let t=this.parser.matchedStyles[r],i=n.getPropertyValue(t);if(i)for(let n;;){let r=this.parser.matchStyle(t,i,this,n);if(!r)break;if(r.ignore)return null;if(e=r.clearMark?e.filter(t=>!r.clearMark(t)):e.concat(this.parser.schema.marks[r.mark].create(r.attrs)),!1!==r.consuming)break;n=r}}return e}addElementByRule(t,e,n,r){let i,s;if(e.node)if(s=this.parser.schema.nodes[e.node],s.isLeaf)this.insertNode(s.create(e.attrs),n,"BR"==t.nodeName)||this.leafFallback(t,n);else{let t=this.enter(s,e.attrs||null,n,e.preserveWhitespace);t&&(i=!0,n=t)}else{let t=this.parser.schema.marks[e.mark];n=n.concat(t.create(e.attrs))}let o=this.top;if(s&&s.isLeaf)this.findInside(t);else if(r)this.addElement(t,n,r);else if(e.getContent)this.findInside(t),e.getContent(t,this.parser.schema).forEach(t=>this.insertNode(t,n,!1));else{let r=t;"string"==typeof e.contentElement?r=t.querySelector(e.contentElement):"function"==typeof e.contentElement?r=e.contentElement(t):e.contentElement&&(r=e.contentElement),this.findAround(t,r,!0),this.addAll(r,n),this.findAround(t,r,!1)}i&&this.sync(o)&&this.open--}addAll(t,e,n,r){let i=n||0;for(let s=n?t.childNodes[n]:t.firstChild,o=null==r?null:t.childNodes[r];s!=o;s=s.nextSibling,++i)this.findAtPoint(t,i),this.addDOM(s,e);this.findAtPoint(t,i)}findPlace(t,e,n){let r,i;for(let s=this.open,o=0;s>=0;s--){let e=this.nodes[s],h=e.findWrapping(t);if(h&&(!r||r.length>h.length+o)&&(r=h,i=e,!h.length))break;if(e.solid){if(n)break;o+=2}}if(!r)return null;this.sync(i);for(let s=0;s<r.length;s++)e=this.enterInner(r[s],null,e,!1);return e}insertNode(t,e,n){if(t.isInline&&this.needsBlock&&!this.top.type){let t=this.textblockFromContext();t&&(e=this.enterInner(t,null,e))}let r=this.findPlace(t,e,n);if(r){this.closeExtra();let e=this.top;e.match&&(e.match=e.match.matchType(t.type));let n=h.none;for(let i of r.concat(t.marks))(e.type?e.type.allowsMarkType(i.type):rt(i.type,t.type))&&(n=i.addToSet(n));return e.content.push(t.mark(n)),!0}return!1}enter(t,e,n,r){let i=this.findPlace(t.create(e),n,!1);return i&&(i=this.enterInner(t,e,n,!0,r)),i}enterInner(t,e,n,r=!1,i){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(t);let o=Y(t,i,s.options);4&s.options&&0==s.content.length&&(o|=4);let l=h.none;return n=n.filter(e=>!(s.type?s.type.allowsMarkType(e.type):rt(e.type,t))||(l=e.addToSet(l),!1)),this.nodes.push(new Z(t,e,l,r,null,o)),this.open++,n}closeExtra(t=!1){let e=this.nodes.length-1;if(e>this.open){for(;e>this.open;e--)this.nodes[e-1].content.push(this.nodes[e].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!(!this.isOpen&&!this.options.topOpen))}sync(t){for(let e=this.open;e>=0;e--){if(this.nodes[e]==t)return this.open=e,!0;this.localPreserveWS&&(this.nodes[e].options|=1)}return!1}get currentPos(){this.closeExtra();let t=0;for(let e=this.open;e>=0;e--){let n=this.nodes[e].content;for(let e=n.length-1;e>=0;e--)t+=n[e].nodeSize;e&&t++}return t}findAtPoint(t,e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==t&&this.find[n].offset==e&&(this.find[n].pos=this.currentPos)}findInside(t){if(this.find)for(let e=0;e<this.find.length;e++)null==this.find[e].pos&&1==t.nodeType&&t.contains(this.find[e].node)&&(this.find[e].pos=this.currentPos)}findAround(t,e,n){if(t!=e&&this.find)for(let r=0;r<this.find.length;r++)if(null==this.find[r].pos&&1==t.nodeType&&t.contains(this.find[r].node)){e.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}}findInText(t){if(this.find)for(let e=0;e<this.find.length;e++)this.find[e].node==t&&(this.find[e].pos=this.currentPos-(t.nodeValue.length-this.find[e].offset))}matchesContext(t){if(t.indexOf("|")>-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let e=t.split("/"),n=this.options.context,r=!(this.isOpen||n&&n.parent.type!=this.nodes[0].type),i=-(n?n.depth+1:0)+(r?0:1),s=(t,o)=>{for(;t>=0;t--){let h=e[t];if(""==h){if(t==e.length-1||0==t)continue;for(;o>=i;o--)if(s(t-1,o))return!0;return!1}{let t=o>0||0==o&&r?this.nodes[o].type:n&&o>=i?n.node(o-i).type:null;if(!t||t.name!=h&&!t.isInGroup(h))return!1;o--}}return!0};return s(e.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let e=t.depth;e>=0;e--){let n=t.node(e).contentMatchAt(t.indexAfter(e)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let e in this.parser.schema.nodes){let t=this.parser.schema.nodes[e];if(t.isTextblock&&t.defaultAttrs)return t}}}function et(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function nt(t){let e={};for(let n in t)e[n]=t[n];return e}function rt(t,e){let n=e.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(t))continue;let s=[],o=t=>{s.push(t);for(let n=0;n<t.edgeCount;n++){let{type:r,next:i}=t.edge(n);if(r==e)return!0;if(s.indexOf(i)<0&&o(i))return!0}};if(o(i.contentMatch))return!0}}class it{constructor(t,e){this.nodes=t,this.marks=e}serializeFragment(t,e={},n){n||(n=ot(e).createDocumentFragment());let r=n,i=[];return t.forEach(t=>{if(i.length||t.marks.length){let n=0,s=0;for(;n<i.length&&s<t.marks.length;){let e=t.marks[s];if(this.marks[e.type.name]){if(!e.eq(i[n][0])||!1===e.type.spec.spanning)break;n++,s++}else s++}for(;n<i.length;)r=i.pop()[1];for(;s<t.marks.length;){let n=t.marks[s++],o=this.serializeMark(n,t.isInline,e);o&&(i.push([n,r]),r.appendChild(o.dom),r=o.contentDOM||o.dom)}}r.appendChild(this.serializeNodeInner(t,e))}),n}serializeNodeInner(t,e){let{dom:n,contentDOM:r}=at(ot(e),this.nodes[t.type.name](t),null,t.attrs);if(r){if(t.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(t.content,e,r)}return n}serializeNode(t,e={}){let n=this.serializeNodeInner(t,e);for(let r=t.marks.length-1;r>=0;r--){let i=this.serializeMark(t.marks[r],t.isInline,e);i&&((i.contentDOM||i.dom).appendChild(n),n=i.dom)}return n}serializeMark(t,e,n={}){let r=this.marks[t.type.name];return r&&at(ot(n),r(t,e),null,t.attrs)}static renderSpec(t,e,n=null,r){return at(t,e,n,r)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new it(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let e=st(t.nodes);return e.text||(e.text=t=>t.text),e}static marksFromSchema(t){return st(t.marks)}}function st(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function ot(t){return t.document||window.document}const ht=/* @__PURE__ */new WeakMap;function lt(t){let e=ht.get(t);return void 0===e&&ht.set(t,e=function(t){let e=null;function n(t){if(t&&"object"==typeof t)if(Array.isArray(t))if("string"==typeof t[0])e||(e=[]),e.push(t);else for(let e=0;e<t.length;e++)n(t[e]);else for(let e in t)n(t[e])}return n(t),e}(t)),e}function at(t,e,n,r){if("string"==typeof e)return{dom:t.createTextNode(e)};if(null!=e.nodeType)return{dom:e};if(e.dom&&null!=e.dom.nodeType)return e;let i,s=e[0];if("string"!=typeof s)throw new RangeError("Invalid array passed to renderSpec");if(r&&(i=lt(r))&&i.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let o,h=s.indexOf(" ");h>0&&(n=s.slice(0,h),s=s.slice(h+1));let l=n?t.createElementNS(n,s):t.createElement(s),a=e[1],c=1;if(a&&"object"==typeof a&&null==a.nodeType&&!Array.isArray(a)){c=2;for(let t in a)if(null!=a[t]){let e=t.indexOf(" ");e>0?l.setAttributeNS(t.slice(0,e),t.slice(e+1),a[t]):"style"==t&&l.style?l.style.cssText=a[t]:l.setAttribute(t,a[t])}}for(let p=c;p<e.length;p++){let i=e[p];if(0===i){if(p<e.length-1||p>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}{let{dom:e,contentDOM:s}=at(t,i,n,r);if(l.appendChild(e),s){if(o)throw new RangeError("Multiple content holes");o=s}}}return{dom:l,contentDOM:o}}export{z as ContentMatch,H as DOMParser,it as DOMSerializer,r as Fragment,h as Mark,G as MarkType,T as Node,O as NodeRange,W as NodeType,l as ReplaceError,S as ResolvedPos,V as Schema,a as Slice};
14
+ import q from "../../orderedmap/dist/index.js";
15
+ function Y(l, t, e) {
16
+ for (let n = 0; ; n++) {
17
+ if (n == l.childCount || n == t.childCount)
18
+ return l.childCount == t.childCount ? null : e;
19
+ let i = l.child(n), r = t.child(n);
20
+ if (i == r) {
21
+ e += i.nodeSize;
22
+ continue;
23
+ }
24
+ if (!i.sameMarkup(r))
25
+ return e;
26
+ if (i.isText && i.text != r.text) {
27
+ for (let s = 0; i.text[s] == r.text[s]; s++)
28
+ e++;
29
+ return e;
30
+ }
31
+ if (i.content.size || r.content.size) {
32
+ let s = Y(i.content, r.content, e + 1);
33
+ if (s != null)
34
+ return s;
35
+ }
36
+ e += i.nodeSize;
37
+ }
38
+ }
39
+ function Z(l, t, e, n) {
40
+ for (let i = l.childCount, r = t.childCount; ; ) {
41
+ if (i == 0 || r == 0)
42
+ return i == r ? null : { a: e, b: n };
43
+ let s = l.child(--i), o = t.child(--r), h = s.nodeSize;
44
+ if (s == o) {
45
+ e -= h, n -= h;
46
+ continue;
47
+ }
48
+ if (!s.sameMarkup(o))
49
+ return { a: e, b: n };
50
+ if (s.isText && s.text != o.text) {
51
+ let a = 0, f = Math.min(s.text.length, o.text.length);
52
+ for (; a < f && s.text[s.text.length - a - 1] == o.text[o.text.length - a - 1]; )
53
+ a++, e--, n--;
54
+ return { a: e, b: n };
55
+ }
56
+ if (s.content.size || o.content.size) {
57
+ let a = Z(s.content, o.content, e - 1, n - 1);
58
+ if (a)
59
+ return a;
60
+ }
61
+ e -= h, n -= h;
62
+ }
63
+ }
64
+ class c {
65
+ /**
66
+ @internal
67
+ */
68
+ constructor(t, e) {
69
+ if (this.content = t, this.size = e || 0, e == null)
70
+ for (let n = 0; n < t.length; n++)
71
+ this.size += t[n].nodeSize;
72
+ }
73
+ /**
74
+ Invoke a callback for all descendant nodes between the given two
75
+ positions (relative to start of this fragment). Doesn't descend
76
+ into a node when the callback returns `false`.
77
+ */
78
+ nodesBetween(t, e, n, i = 0, r) {
79
+ for (let s = 0, o = 0; o < e; s++) {
80
+ let h = this.content[s], a = o + h.nodeSize;
81
+ if (a > t && n(h, i + o, r || null, s) !== !1 && h.content.size) {
82
+ let f = o + 1;
83
+ h.nodesBetween(Math.max(0, t - f), Math.min(h.content.size, e - f), n, i + f);
84
+ }
85
+ o = a;
86
+ }
87
+ }
88
+ /**
89
+ Call the given callback for every descendant node. `pos` will be
90
+ relative to the start of the fragment. The callback may return
91
+ `false` to prevent traversal of a given node's children.
92
+ */
93
+ descendants(t) {
94
+ this.nodesBetween(0, this.size, t);
95
+ }
96
+ /**
97
+ Extract the text between `from` and `to`. See the same method on
98
+ [`Node`](https://prosemirror.net/docs/ref/#model.Node.textBetween).
99
+ */
100
+ textBetween(t, e, n, i) {
101
+ let r = "", s = !0;
102
+ return this.nodesBetween(t, e, (o, h) => {
103
+ let a = o.isText ? o.text.slice(Math.max(t, h) - h, e - h) : o.isLeaf ? i ? typeof i == "function" ? i(o) : i : o.type.spec.leafText ? o.type.spec.leafText(o) : "" : "";
104
+ o.isBlock && (o.isLeaf && a || o.isTextblock) && n && (s ? s = !1 : r += n), r += a;
105
+ }, 0), r;
106
+ }
107
+ /**
108
+ Create a new fragment containing the combined content of this
109
+ fragment and the other.
110
+ */
111
+ append(t) {
112
+ if (!t.size)
113
+ return this;
114
+ if (!this.size)
115
+ return t;
116
+ let e = this.lastChild, n = t.firstChild, i = this.content.slice(), r = 0;
117
+ for (e.isText && e.sameMarkup(n) && (i[i.length - 1] = e.withText(e.text + n.text), r = 1); r < t.content.length; r++)
118
+ i.push(t.content[r]);
119
+ return new c(i, this.size + t.size);
120
+ }
121
+ /**
122
+ Cut out the sub-fragment between the two given positions.
123
+ */
124
+ cut(t, e = this.size) {
125
+ if (t == 0 && e == this.size)
126
+ return this;
127
+ let n = [], i = 0;
128
+ if (e > t)
129
+ for (let r = 0, s = 0; s < e; r++) {
130
+ let o = this.content[r], h = s + o.nodeSize;
131
+ h > t && ((s < t || h > e) && (o.isText ? o = o.cut(Math.max(0, t - s), Math.min(o.text.length, e - s)) : o = o.cut(Math.max(0, t - s - 1), Math.min(o.content.size, e - s - 1))), n.push(o), i += o.nodeSize), s = h;
132
+ }
133
+ return new c(n, i);
134
+ }
135
+ /**
136
+ @internal
137
+ */
138
+ cutByIndex(t, e) {
139
+ return t == e ? c.empty : t == 0 && e == this.content.length ? this : new c(this.content.slice(t, e));
140
+ }
141
+ /**
142
+ Create a new fragment in which the node at the given index is
143
+ replaced by the given node.
144
+ */
145
+ replaceChild(t, e) {
146
+ let n = this.content[t];
147
+ if (n == e)
148
+ return this;
149
+ let i = this.content.slice(), r = this.size + e.nodeSize - n.nodeSize;
150
+ return i[t] = e, new c(i, r);
151
+ }
152
+ /**
153
+ Create a new fragment by prepending the given node to this
154
+ fragment.
155
+ */
156
+ addToStart(t) {
157
+ return new c([t].concat(this.content), this.size + t.nodeSize);
158
+ }
159
+ /**
160
+ Create a new fragment by appending the given node to this
161
+ fragment.
162
+ */
163
+ addToEnd(t) {
164
+ return new c(this.content.concat(t), this.size + t.nodeSize);
165
+ }
166
+ /**
167
+ Compare this fragment to another one.
168
+ */
169
+ eq(t) {
170
+ if (this.content.length != t.content.length)
171
+ return !1;
172
+ for (let e = 0; e < this.content.length; e++)
173
+ if (!this.content[e].eq(t.content[e]))
174
+ return !1;
175
+ return !0;
176
+ }
177
+ /**
178
+ The first child of the fragment, or `null` if it is empty.
179
+ */
180
+ get firstChild() {
181
+ return this.content.length ? this.content[0] : null;
182
+ }
183
+ /**
184
+ The last child of the fragment, or `null` if it is empty.
185
+ */
186
+ get lastChild() {
187
+ return this.content.length ? this.content[this.content.length - 1] : null;
188
+ }
189
+ /**
190
+ The number of child nodes in this fragment.
191
+ */
192
+ get childCount() {
193
+ return this.content.length;
194
+ }
195
+ /**
196
+ Get the child node at the given index. Raise an error when the
197
+ index is out of range.
198
+ */
199
+ child(t) {
200
+ let e = this.content[t];
201
+ if (!e)
202
+ throw new RangeError("Index " + t + " out of range for " + this);
203
+ return e;
204
+ }
205
+ /**
206
+ Get the child node at the given index, if it exists.
207
+ */
208
+ maybeChild(t) {
209
+ return this.content[t] || null;
210
+ }
211
+ /**
212
+ Call `f` for every child node, passing the node, its offset
213
+ into this parent node, and its index.
214
+ */
215
+ forEach(t) {
216
+ for (let e = 0, n = 0; e < this.content.length; e++) {
217
+ let i = this.content[e];
218
+ t(i, n, e), n += i.nodeSize;
219
+ }
220
+ }
221
+ /**
222
+ Find the first position at which this fragment and another
223
+ fragment differ, or `null` if they are the same.
224
+ */
225
+ findDiffStart(t, e = 0) {
226
+ return Y(this, t, e);
227
+ }
228
+ /**
229
+ Find the first position, searching from the end, at which this
230
+ fragment and the given fragment differ, or `null` if they are
231
+ the same. Since this position will not be the same in both
232
+ nodes, an object with two separate positions is returned.
233
+ */
234
+ findDiffEnd(t, e = this.size, n = t.size) {
235
+ return Z(this, t, e, n);
236
+ }
237
+ /**
238
+ Find the index and inner offset corresponding to a given relative
239
+ position in this fragment. The result object will be reused
240
+ (overwritten) the next time the function is called. @internal
241
+ */
242
+ findIndex(t) {
243
+ if (t == 0)
244
+ return O(0, t);
245
+ if (t == this.size)
246
+ return O(this.content.length, t);
247
+ if (t > this.size || t < 0)
248
+ throw new RangeError(`Position ${t} outside of fragment (${this})`);
249
+ for (let e = 0, n = 0; ; e++) {
250
+ let i = this.child(e), r = n + i.nodeSize;
251
+ if (r >= t)
252
+ return r == t ? O(e + 1, r) : O(e, n);
253
+ n = r;
254
+ }
255
+ }
256
+ /**
257
+ Return a debugging string that describes this fragment.
258
+ */
259
+ toString() {
260
+ return "<" + this.toStringInner() + ">";
261
+ }
262
+ /**
263
+ @internal
264
+ */
265
+ toStringInner() {
266
+ return this.content.join(", ");
267
+ }
268
+ /**
269
+ Create a JSON-serializeable representation of this fragment.
270
+ */
271
+ toJSON() {
272
+ return this.content.length ? this.content.map((t) => t.toJSON()) : null;
273
+ }
274
+ /**
275
+ Deserialize a fragment from its JSON representation.
276
+ */
277
+ static fromJSON(t, e) {
278
+ if (!e)
279
+ return c.empty;
280
+ if (!Array.isArray(e))
281
+ throw new RangeError("Invalid input for Fragment.fromJSON");
282
+ return new c(e.map(t.nodeFromJSON));
283
+ }
284
+ /**
285
+ Build a fragment from an array of nodes. Ensures that adjacent
286
+ text nodes with the same marks are joined together.
287
+ */
288
+ static fromArray(t) {
289
+ if (!t.length)
290
+ return c.empty;
291
+ let e, n = 0;
292
+ for (let i = 0; i < t.length; i++) {
293
+ let r = t[i];
294
+ n += r.nodeSize, i && r.isText && t[i - 1].sameMarkup(r) ? (e || (e = t.slice(0, i)), e[e.length - 1] = r.withText(e[e.length - 1].text + r.text)) : e && e.push(r);
295
+ }
296
+ return new c(e || t, n);
297
+ }
298
+ /**
299
+ Create a fragment from something that can be interpreted as a
300
+ set of nodes. For `null`, it returns the empty fragment. For a
301
+ fragment, the fragment itself. For a node or array of nodes, a
302
+ fragment containing those nodes.
303
+ */
304
+ static from(t) {
305
+ if (!t)
306
+ return c.empty;
307
+ if (t instanceof c)
308
+ return t;
309
+ if (Array.isArray(t))
310
+ return this.fromArray(t);
311
+ if (t.attrs)
312
+ return new c([t], t.nodeSize);
313
+ throw new RangeError("Can not convert " + t + " to a Fragment" + (t.nodesBetween ? " (looks like multiple versions of prosemirror-model were loaded)" : ""));
314
+ }
315
+ }
316
+ c.empty = new c([], 0);
317
+ const N = { index: 0, offset: 0 };
318
+ function O(l, t) {
319
+ return N.index = l, N.offset = t, N;
320
+ }
321
+ function M(l, t) {
322
+ if (l === t)
323
+ return !0;
324
+ if (!(l && typeof l == "object") || !(t && typeof t == "object"))
325
+ return !1;
326
+ let e = Array.isArray(l);
327
+ if (Array.isArray(t) != e)
328
+ return !1;
329
+ if (e) {
330
+ if (l.length != t.length)
331
+ return !1;
332
+ for (let n = 0; n < l.length; n++)
333
+ if (!M(l[n], t[n]))
334
+ return !1;
335
+ } else {
336
+ for (let n in l)
337
+ if (!(n in t) || !M(l[n], t[n]))
338
+ return !1;
339
+ for (let n in t)
340
+ if (!(n in l))
341
+ return !1;
342
+ }
343
+ return !0;
344
+ }
345
+ class u {
346
+ /**
347
+ @internal
348
+ */
349
+ constructor(t, e) {
350
+ this.type = t, this.attrs = e;
351
+ }
352
+ /**
353
+ Given a set of marks, create a new set which contains this one as
354
+ well, in the right position. If this mark is already in the set,
355
+ the set itself is returned. If any marks that are set to be
356
+ [exclusive](https://prosemirror.net/docs/ref/#model.MarkSpec.excludes) with this mark are present,
357
+ those are replaced by this one.
358
+ */
359
+ addToSet(t) {
360
+ let e, n = !1;
361
+ for (let i = 0; i < t.length; i++) {
362
+ let r = t[i];
363
+ if (this.eq(r))
364
+ return t;
365
+ if (this.type.excludes(r.type))
366
+ e || (e = t.slice(0, i));
367
+ else {
368
+ if (r.type.excludes(this.type))
369
+ return t;
370
+ !n && r.type.rank > this.type.rank && (e || (e = t.slice(0, i)), e.push(this), n = !0), e && e.push(r);
371
+ }
372
+ }
373
+ return e || (e = t.slice()), n || e.push(this), e;
374
+ }
375
+ /**
376
+ Remove this mark from the given set, returning a new set. If this
377
+ mark is not in the set, the set itself is returned.
378
+ */
379
+ removeFromSet(t) {
380
+ for (let e = 0; e < t.length; e++)
381
+ if (this.eq(t[e]))
382
+ return t.slice(0, e).concat(t.slice(e + 1));
383
+ return t;
384
+ }
385
+ /**
386
+ Test whether this mark is in the given set of marks.
387
+ */
388
+ isInSet(t) {
389
+ for (let e = 0; e < t.length; e++)
390
+ if (this.eq(t[e]))
391
+ return !0;
392
+ return !1;
393
+ }
394
+ /**
395
+ Test whether this mark has the same type and attributes as
396
+ another mark.
397
+ */
398
+ eq(t) {
399
+ return this == t || this.type == t.type && M(this.attrs, t.attrs);
400
+ }
401
+ /**
402
+ Convert this mark to a JSON-serializeable representation.
403
+ */
404
+ toJSON() {
405
+ let t = { type: this.type.name };
406
+ for (let e in this.attrs) {
407
+ t.attrs = this.attrs;
408
+ break;
409
+ }
410
+ return t;
411
+ }
412
+ /**
413
+ Deserialize a mark from JSON.
414
+ */
415
+ static fromJSON(t, e) {
416
+ if (!e)
417
+ throw new RangeError("Invalid input for Mark.fromJSON");
418
+ let n = t.marks[e.type];
419
+ if (!n)
420
+ throw new RangeError(`There is no mark type ${e.type} in this schema`);
421
+ let i = n.create(e.attrs);
422
+ return n.checkAttrs(i.attrs), i;
423
+ }
424
+ /**
425
+ Test whether two sets of marks are identical.
426
+ */
427
+ static sameSet(t, e) {
428
+ if (t == e)
429
+ return !0;
430
+ if (t.length != e.length)
431
+ return !1;
432
+ for (let n = 0; n < t.length; n++)
433
+ if (!t[n].eq(e[n]))
434
+ return !1;
435
+ return !0;
436
+ }
437
+ /**
438
+ Create a properly sorted mark set from null, a single mark, or an
439
+ unsorted array of marks.
440
+ */
441
+ static setFrom(t) {
442
+ if (!t || Array.isArray(t) && t.length == 0)
443
+ return u.none;
444
+ if (t instanceof u)
445
+ return [t];
446
+ let e = t.slice();
447
+ return e.sort((n, i) => n.type.rank - i.type.rank), e;
448
+ }
449
+ }
450
+ u.none = [];
451
+ class I extends Error {
452
+ }
453
+ class d {
454
+ /**
455
+ Create a slice. When specifying a non-zero open depth, you must
456
+ make sure that there are nodes of at least that depth at the
457
+ appropriate side of the fragment—i.e. if the fragment is an
458
+ empty paragraph node, `openStart` and `openEnd` can't be greater
459
+ than 1.
460
+
461
+ It is not necessary for the content of open nodes to conform to
462
+ the schema's content constraints, though it should be a valid
463
+ start/end/middle for such a node, depending on which sides are
464
+ open.
465
+ */
466
+ constructor(t, e, n) {
467
+ this.content = t, this.openStart = e, this.openEnd = n;
468
+ }
469
+ /**
470
+ The size this slice would add when inserted into a document.
471
+ */
472
+ get size() {
473
+ return this.content.size - this.openStart - this.openEnd;
474
+ }
475
+ /**
476
+ @internal
477
+ */
478
+ insertAt(t, e) {
479
+ let n = $(this.content, t + this.openStart, e);
480
+ return n && new d(n, this.openStart, this.openEnd);
481
+ }
482
+ /**
483
+ @internal
484
+ */
485
+ removeBetween(t, e) {
486
+ return new d(_(this.content, t + this.openStart, e + this.openStart), this.openStart, this.openEnd);
487
+ }
488
+ /**
489
+ Tests whether this slice is equal to another slice.
490
+ */
491
+ eq(t) {
492
+ return this.content.eq(t.content) && this.openStart == t.openStart && this.openEnd == t.openEnd;
493
+ }
494
+ /**
495
+ @internal
496
+ */
497
+ toString() {
498
+ return this.content + "(" + this.openStart + "," + this.openEnd + ")";
499
+ }
500
+ /**
501
+ Convert a slice to a JSON-serializable representation.
502
+ */
503
+ toJSON() {
504
+ if (!this.content.size)
505
+ return null;
506
+ let t = { content: this.content.toJSON() };
507
+ return this.openStart > 0 && (t.openStart = this.openStart), this.openEnd > 0 && (t.openEnd = this.openEnd), t;
508
+ }
509
+ /**
510
+ Deserialize a slice from its JSON representation.
511
+ */
512
+ static fromJSON(t, e) {
513
+ if (!e)
514
+ return d.empty;
515
+ let n = e.openStart || 0, i = e.openEnd || 0;
516
+ if (typeof n != "number" || typeof i != "number")
517
+ throw new RangeError("Invalid input for Slice.fromJSON");
518
+ return new d(c.fromJSON(t, e.content), n, i);
519
+ }
520
+ /**
521
+ Create a slice from a fragment by taking the maximum possible
522
+ open value on both side of the fragment.
523
+ */
524
+ static maxOpen(t, e = !0) {
525
+ let n = 0, i = 0;
526
+ for (let r = t.firstChild; r && !r.isLeaf && (e || !r.type.spec.isolating); r = r.firstChild)
527
+ n++;
528
+ for (let r = t.lastChild; r && !r.isLeaf && (e || !r.type.spec.isolating); r = r.lastChild)
529
+ i++;
530
+ return new d(t, n, i);
531
+ }
532
+ }
533
+ d.empty = new d(c.empty, 0, 0);
534
+ function _(l, t, e) {
535
+ let { index: n, offset: i } = l.findIndex(t), r = l.maybeChild(n), { index: s, offset: o } = l.findIndex(e);
536
+ if (i == t || r.isText) {
537
+ if (o != e && !l.child(s).isText)
538
+ throw new RangeError("Removing non-flat range");
539
+ return l.cut(0, t).append(l.cut(e));
540
+ }
541
+ if (n != s)
542
+ throw new RangeError("Removing non-flat range");
543
+ return l.replaceChild(n, r.copy(_(r.content, t - i - 1, e - i - 1)));
544
+ }
545
+ function $(l, t, e, n) {
546
+ let { index: i, offset: r } = l.findIndex(t), s = l.maybeChild(i);
547
+ if (r == t || s.isText)
548
+ return n && !n.canReplace(i, i, e) ? null : l.cut(0, t).append(e).append(l.cut(t));
549
+ let o = $(s.content, t - r - 1, e, s);
550
+ return o && l.replaceChild(i, s.copy(o));
551
+ }
552
+ function dt(l, t, e) {
553
+ if (e.openStart > l.depth)
554
+ throw new I("Inserted content deeper than insertion position");
555
+ if (l.depth - e.openStart != t.depth - e.openEnd)
556
+ throw new I("Inconsistent open depths");
557
+ return tt(l, t, e, 0);
558
+ }
559
+ function tt(l, t, e, n) {
560
+ let i = l.index(n), r = l.node(n);
561
+ if (i == t.index(n) && n < l.depth - e.openStart) {
562
+ let s = tt(l, t, e, n + 1);
563
+ return r.copy(r.content.replaceChild(i, s));
564
+ } else if (e.content.size)
565
+ if (!e.openStart && !e.openEnd && l.depth == n && t.depth == n) {
566
+ let s = l.parent, o = s.content;
567
+ return m(s, o.cut(0, l.parentOffset).append(e.content).append(o.cut(t.parentOffset)));
568
+ } else {
569
+ let { start: s, end: o } = yt(e, l);
570
+ return m(r, nt(l, s, o, t, n));
571
+ }
572
+ else return m(r, A(l, t, n));
573
+ }
574
+ function et(l, t) {
575
+ if (!t.type.compatibleContent(l.type))
576
+ throw new I("Cannot join " + t.type.name + " onto " + l.type.name);
577
+ }
578
+ function D(l, t, e) {
579
+ let n = l.node(e);
580
+ return et(n, t.node(e)), n;
581
+ }
582
+ function x(l, t) {
583
+ let e = t.length - 1;
584
+ e >= 0 && l.isText && l.sameMarkup(t[e]) ? t[e] = l.withText(t[e].text + l.text) : t.push(l);
585
+ }
586
+ function k(l, t, e, n) {
587
+ let i = (t || l).node(e), r = 0, s = t ? t.index(e) : i.childCount;
588
+ l && (r = l.index(e), l.depth > e ? r++ : l.textOffset && (x(l.nodeAfter, n), r++));
589
+ for (let o = r; o < s; o++)
590
+ x(i.child(o), n);
591
+ t && t.depth == e && t.textOffset && x(t.nodeBefore, n);
592
+ }
593
+ function m(l, t) {
594
+ return l.type.checkContent(t), l.copy(t);
595
+ }
596
+ function nt(l, t, e, n, i) {
597
+ let r = l.depth > i && D(l, t, i + 1), s = n.depth > i && D(e, n, i + 1), o = [];
598
+ return k(null, l, i, o), r && s && t.index(i) == e.index(i) ? (et(r, s), x(m(r, nt(l, t, e, n, i + 1)), o)) : (r && x(m(r, A(l, t, i + 1)), o), k(t, e, i, o), s && x(m(s, A(e, n, i + 1)), o)), k(n, null, i, o), new c(o);
599
+ }
600
+ function A(l, t, e) {
601
+ let n = [];
602
+ if (k(null, l, e, n), l.depth > e) {
603
+ let i = D(l, t, e + 1);
604
+ x(m(i, A(l, t, e + 1)), n);
605
+ }
606
+ return k(t, null, e, n), new c(n);
607
+ }
608
+ function yt(l, t) {
609
+ let e = t.depth - l.openStart, i = t.node(e).copy(l.content);
610
+ for (let r = e - 1; r >= 0; r--)
611
+ i = t.node(r).copy(c.from(i));
612
+ return {
613
+ start: i.resolveNoCache(l.openStart + e),
614
+ end: i.resolveNoCache(i.content.size - l.openEnd - e)
615
+ };
616
+ }
617
+ class E {
618
+ /**
619
+ @internal
620
+ */
621
+ constructor(t, e, n) {
622
+ this.pos = t, this.path = e, this.parentOffset = n, this.depth = e.length / 3 - 1;
623
+ }
624
+ /**
625
+ @internal
626
+ */
627
+ resolveDepth(t) {
628
+ return t == null ? this.depth : t < 0 ? this.depth + t : t;
629
+ }
630
+ /**
631
+ The parent node that the position points into. Note that even if
632
+ a position points into a text node, that node is not considered
633
+ the parent—text nodes are ‘flat’ in this model, and have no content.
634
+ */
635
+ get parent() {
636
+ return this.node(this.depth);
637
+ }
638
+ /**
639
+ The root node in which the position was resolved.
640
+ */
641
+ get doc() {
642
+ return this.node(0);
643
+ }
644
+ /**
645
+ The ancestor node at the given level. `p.node(p.depth)` is the
646
+ same as `p.parent`.
647
+ */
648
+ node(t) {
649
+ return this.path[this.resolveDepth(t) * 3];
650
+ }
651
+ /**
652
+ The index into the ancestor at the given level. If this points
653
+ at the 3rd node in the 2nd paragraph on the top level, for
654
+ example, `p.index(0)` is 1 and `p.index(1)` is 2.
655
+ */
656
+ index(t) {
657
+ return this.path[this.resolveDepth(t) * 3 + 1];
658
+ }
659
+ /**
660
+ The index pointing after this position into the ancestor at the
661
+ given level.
662
+ */
663
+ indexAfter(t) {
664
+ return t = this.resolveDepth(t), this.index(t) + (t == this.depth && !this.textOffset ? 0 : 1);
665
+ }
666
+ /**
667
+ The (absolute) position at the start of the node at the given
668
+ level.
669
+ */
670
+ start(t) {
671
+ return t = this.resolveDepth(t), t == 0 ? 0 : this.path[t * 3 - 1] + 1;
672
+ }
673
+ /**
674
+ The (absolute) position at the end of the node at the given
675
+ level.
676
+ */
677
+ end(t) {
678
+ return t = this.resolveDepth(t), this.start(t) + this.node(t).content.size;
679
+ }
680
+ /**
681
+ The (absolute) position directly before the wrapping node at the
682
+ given level, or, when `depth` is `this.depth + 1`, the original
683
+ position.
684
+ */
685
+ before(t) {
686
+ if (t = this.resolveDepth(t), !t)
687
+ throw new RangeError("There is no position before the top-level node");
688
+ return t == this.depth + 1 ? this.pos : this.path[t * 3 - 1];
689
+ }
690
+ /**
691
+ The (absolute) position directly after the wrapping node at the
692
+ given level, or the original position when `depth` is `this.depth + 1`.
693
+ */
694
+ after(t) {
695
+ if (t = this.resolveDepth(t), !t)
696
+ throw new RangeError("There is no position after the top-level node");
697
+ return t == this.depth + 1 ? this.pos : this.path[t * 3 - 1] + this.path[t * 3].nodeSize;
698
+ }
699
+ /**
700
+ When this position points into a text node, this returns the
701
+ distance between the position and the start of the text node.
702
+ Will be zero for positions that point between nodes.
703
+ */
704
+ get textOffset() {
705
+ return this.pos - this.path[this.path.length - 1];
706
+ }
707
+ /**
708
+ Get the node directly after the position, if any. If the position
709
+ points into a text node, only the part of that node after the
710
+ position is returned.
711
+ */
712
+ get nodeAfter() {
713
+ let t = this.parent, e = this.index(this.depth);
714
+ if (e == t.childCount)
715
+ return null;
716
+ let n = this.pos - this.path[this.path.length - 1], i = t.child(e);
717
+ return n ? t.child(e).cut(n) : i;
718
+ }
719
+ /**
720
+ Get the node directly before the position, if any. If the
721
+ position points into a text node, only the part of that node
722
+ before the position is returned.
723
+ */
724
+ get nodeBefore() {
725
+ let t = this.index(this.depth), e = this.pos - this.path[this.path.length - 1];
726
+ return e ? this.parent.child(t).cut(0, e) : t == 0 ? null : this.parent.child(t - 1);
727
+ }
728
+ /**
729
+ Get the position at the given index in the parent node at the
730
+ given depth (which defaults to `this.depth`).
731
+ */
732
+ posAtIndex(t, e) {
733
+ e = this.resolveDepth(e);
734
+ let n = this.path[e * 3], i = e == 0 ? 0 : this.path[e * 3 - 1] + 1;
735
+ for (let r = 0; r < t; r++)
736
+ i += n.child(r).nodeSize;
737
+ return i;
738
+ }
739
+ /**
740
+ Get the marks at this position, factoring in the surrounding
741
+ marks' [`inclusive`](https://prosemirror.net/docs/ref/#model.MarkSpec.inclusive) property. If the
742
+ position is at the start of a non-empty node, the marks of the
743
+ node after it (if any) are returned.
744
+ */
745
+ marks() {
746
+ let t = this.parent, e = this.index();
747
+ if (t.content.size == 0)
748
+ return u.none;
749
+ if (this.textOffset)
750
+ return t.child(e).marks;
751
+ let n = t.maybeChild(e - 1), i = t.maybeChild(e);
752
+ if (!n) {
753
+ let o = n;
754
+ n = i, i = o;
755
+ }
756
+ let r = n.marks;
757
+ for (var s = 0; s < r.length; s++)
758
+ r[s].type.spec.inclusive === !1 && (!i || !r[s].isInSet(i.marks)) && (r = r[s--].removeFromSet(r));
759
+ return r;
760
+ }
761
+ /**
762
+ Get the marks after the current position, if any, except those
763
+ that are non-inclusive and not present at position `$end`. This
764
+ is mostly useful for getting the set of marks to preserve after a
765
+ deletion. Will return `null` if this position is at the end of
766
+ its parent node or its parent node isn't a textblock (in which
767
+ case no marks should be preserved).
768
+ */
769
+ marksAcross(t) {
770
+ let e = this.parent.maybeChild(this.index());
771
+ if (!e || !e.isInline)
772
+ return null;
773
+ let n = e.marks, i = t.parent.maybeChild(t.index());
774
+ for (var r = 0; r < n.length; r++)
775
+ n[r].type.spec.inclusive === !1 && (!i || !n[r].isInSet(i.marks)) && (n = n[r--].removeFromSet(n));
776
+ return n;
777
+ }
778
+ /**
779
+ The depth up to which this position and the given (non-resolved)
780
+ position share the same parent nodes.
781
+ */
782
+ sharedDepth(t) {
783
+ for (let e = this.depth; e > 0; e--)
784
+ if (this.start(e) <= t && this.end(e) >= t)
785
+ return e;
786
+ return 0;
787
+ }
788
+ /**
789
+ Returns a range based on the place where this position and the
790
+ given position diverge around block content. If both point into
791
+ the same textblock, for example, a range around that textblock
792
+ will be returned. If they point into different blocks, the range
793
+ around those blocks in their shared ancestor is returned. You can
794
+ pass in an optional predicate that will be called with a parent
795
+ node to see if a range into that parent is acceptable.
796
+ */
797
+ blockRange(t = this, e) {
798
+ if (t.pos < this.pos)
799
+ return t.blockRange(this);
800
+ for (let n = this.depth - (this.parent.inlineContent || this.pos == t.pos ? 1 : 0); n >= 0; n--)
801
+ if (t.pos <= this.end(n) && (!e || e(this.node(n))))
802
+ return new mt(this, t, n);
803
+ return null;
804
+ }
805
+ /**
806
+ Query whether the given position shares the same parent node.
807
+ */
808
+ sameParent(t) {
809
+ return this.pos - this.parentOffset == t.pos - t.parentOffset;
810
+ }
811
+ /**
812
+ Return the greater of this and the given position.
813
+ */
814
+ max(t) {
815
+ return t.pos > this.pos ? t : this;
816
+ }
817
+ /**
818
+ Return the smaller of this and the given position.
819
+ */
820
+ min(t) {
821
+ return t.pos < this.pos ? t : this;
822
+ }
823
+ /**
824
+ @internal
825
+ */
826
+ toString() {
827
+ let t = "";
828
+ for (let e = 1; e <= this.depth; e++)
829
+ t += (t ? "/" : "") + this.node(e).type.name + "_" + this.index(e - 1);
830
+ return t + ":" + this.parentOffset;
831
+ }
832
+ /**
833
+ @internal
834
+ */
835
+ static resolve(t, e) {
836
+ if (!(e >= 0 && e <= t.content.size))
837
+ throw new RangeError("Position " + e + " out of range");
838
+ let n = [], i = 0, r = e;
839
+ for (let s = t; ; ) {
840
+ let { index: o, offset: h } = s.content.findIndex(r), a = r - h;
841
+ if (n.push(s, o, i + h), !a || (s = s.child(o), s.isText))
842
+ break;
843
+ r = a - 1, i += h + 1;
844
+ }
845
+ return new E(e, n, r);
846
+ }
847
+ /**
848
+ @internal
849
+ */
850
+ static resolveCached(t, e) {
851
+ let n = L.get(t);
852
+ if (n)
853
+ for (let r = 0; r < n.elts.length; r++) {
854
+ let s = n.elts[r];
855
+ if (s.pos == e)
856
+ return s;
857
+ }
858
+ else
859
+ L.set(t, n = new gt());
860
+ let i = n.elts[n.i] = E.resolve(t, e);
861
+ return n.i = (n.i + 1) % xt, i;
862
+ }
863
+ }
864
+ class gt {
865
+ constructor() {
866
+ this.elts = [], this.i = 0;
867
+ }
868
+ }
869
+ const xt = 12, L = /* @__PURE__ */ new WeakMap();
870
+ class mt {
871
+ /**
872
+ Construct a node range. `$from` and `$to` should point into the
873
+ same node until at least the given `depth`, since a node range
874
+ denotes an adjacent set of nodes in a single parent node.
875
+ */
876
+ constructor(t, e, n) {
877
+ this.$from = t, this.$to = e, this.depth = n;
878
+ }
879
+ /**
880
+ The position at the start of the range.
881
+ */
882
+ get start() {
883
+ return this.$from.before(this.depth + 1);
884
+ }
885
+ /**
886
+ The position at the end of the range.
887
+ */
888
+ get end() {
889
+ return this.$to.after(this.depth + 1);
890
+ }
891
+ /**
892
+ The parent node that the range points into.
893
+ */
894
+ get parent() {
895
+ return this.$from.node(this.depth);
896
+ }
897
+ /**
898
+ The start index of the range in the parent node.
899
+ */
900
+ get startIndex() {
901
+ return this.$from.index(this.depth);
902
+ }
903
+ /**
904
+ The end index of the range in the parent node.
905
+ */
906
+ get endIndex() {
907
+ return this.$to.indexAfter(this.depth);
908
+ }
909
+ }
910
+ const wt = /* @__PURE__ */ Object.create(null);
911
+ class g {
912
+ /**
913
+ @internal
914
+ */
915
+ constructor(t, e, n, i = u.none) {
916
+ this.type = t, this.attrs = e, this.marks = i, this.content = n || c.empty;
917
+ }
918
+ /**
919
+ The array of this node's child nodes.
920
+ */
921
+ get children() {
922
+ return this.content.content;
923
+ }
924
+ /**
925
+ The size of this node, as defined by the integer-based [indexing
926
+ scheme](https://prosemirror.net/docs/guide/#doc.indexing). For text nodes, this is the
927
+ amount of characters. For other leaf nodes, it is one. For
928
+ non-leaf nodes, it is the size of the content plus two (the
929
+ start and end token).
930
+ */
931
+ get nodeSize() {
932
+ return this.isLeaf ? 1 : 2 + this.content.size;
933
+ }
934
+ /**
935
+ The number of children that the node has.
936
+ */
937
+ get childCount() {
938
+ return this.content.childCount;
939
+ }
940
+ /**
941
+ Get the child node at the given index. Raises an error when the
942
+ index is out of range.
943
+ */
944
+ child(t) {
945
+ return this.content.child(t);
946
+ }
947
+ /**
948
+ Get the child node at the given index, if it exists.
949
+ */
950
+ maybeChild(t) {
951
+ return this.content.maybeChild(t);
952
+ }
953
+ /**
954
+ Call `f` for every child node, passing the node, its offset
955
+ into this parent node, and its index.
956
+ */
957
+ forEach(t) {
958
+ this.content.forEach(t);
959
+ }
960
+ /**
961
+ Invoke a callback for all descendant nodes recursively between
962
+ the given two positions that are relative to start of this
963
+ node's content. The callback is invoked with the node, its
964
+ position relative to the original node (method receiver),
965
+ its parent node, and its child index. When the callback returns
966
+ false for a given node, that node's children will not be
967
+ recursed over. The last parameter can be used to specify a
968
+ starting position to count from.
969
+ */
970
+ nodesBetween(t, e, n, i = 0) {
971
+ this.content.nodesBetween(t, e, n, i, this);
972
+ }
973
+ /**
974
+ Call the given callback for every descendant node. Doesn't
975
+ descend into a node when the callback returns `false`.
976
+ */
977
+ descendants(t) {
978
+ this.nodesBetween(0, this.content.size, t);
979
+ }
980
+ /**
981
+ Concatenates all the text nodes found in this fragment and its
982
+ children.
983
+ */
984
+ get textContent() {
985
+ return this.isLeaf && this.type.spec.leafText ? this.type.spec.leafText(this) : this.textBetween(0, this.content.size, "");
986
+ }
987
+ /**
988
+ Get all text between positions `from` and `to`. When
989
+ `blockSeparator` is given, it will be inserted to separate text
990
+ from different block nodes. If `leafText` is given, it'll be
991
+ inserted for every non-text leaf node encountered, otherwise
992
+ [`leafText`](https://prosemirror.net/docs/ref/#model.NodeSpec.leafText) will be used.
993
+ */
994
+ textBetween(t, e, n, i) {
995
+ return this.content.textBetween(t, e, n, i);
996
+ }
997
+ /**
998
+ Returns this node's first child, or `null` if there are no
999
+ children.
1000
+ */
1001
+ get firstChild() {
1002
+ return this.content.firstChild;
1003
+ }
1004
+ /**
1005
+ Returns this node's last child, or `null` if there are no
1006
+ children.
1007
+ */
1008
+ get lastChild() {
1009
+ return this.content.lastChild;
1010
+ }
1011
+ /**
1012
+ Test whether two nodes represent the same piece of document.
1013
+ */
1014
+ eq(t) {
1015
+ return this == t || this.sameMarkup(t) && this.content.eq(t.content);
1016
+ }
1017
+ /**
1018
+ Compare the markup (type, attributes, and marks) of this node to
1019
+ those of another. Returns `true` if both have the same markup.
1020
+ */
1021
+ sameMarkup(t) {
1022
+ return this.hasMarkup(t.type, t.attrs, t.marks);
1023
+ }
1024
+ /**
1025
+ Check whether this node's markup correspond to the given type,
1026
+ attributes, and marks.
1027
+ */
1028
+ hasMarkup(t, e, n) {
1029
+ return this.type == t && M(this.attrs, e || t.defaultAttrs || wt) && u.sameSet(this.marks, n || u.none);
1030
+ }
1031
+ /**
1032
+ Create a new node with the same markup as this node, containing
1033
+ the given content (or empty, if no content is given).
1034
+ */
1035
+ copy(t = null) {
1036
+ return t == this.content ? this : new g(this.type, this.attrs, t, this.marks);
1037
+ }
1038
+ /**
1039
+ Create a copy of this node, with the given set of marks instead
1040
+ of the node's own marks.
1041
+ */
1042
+ mark(t) {
1043
+ return t == this.marks ? this : new g(this.type, this.attrs, this.content, t);
1044
+ }
1045
+ /**
1046
+ Create a copy of this node with only the content between the
1047
+ given positions. If `to` is not given, it defaults to the end of
1048
+ the node.
1049
+ */
1050
+ cut(t, e = this.content.size) {
1051
+ return t == 0 && e == this.content.size ? this : this.copy(this.content.cut(t, e));
1052
+ }
1053
+ /**
1054
+ Cut out the part of the document between the given positions, and
1055
+ return it as a `Slice` object.
1056
+ */
1057
+ slice(t, e = this.content.size, n = !1) {
1058
+ if (t == e)
1059
+ return d.empty;
1060
+ let i = this.resolve(t), r = this.resolve(e), s = n ? 0 : i.sharedDepth(e), o = i.start(s), a = i.node(s).content.cut(i.pos - o, r.pos - o);
1061
+ return new d(a, i.depth - s, r.depth - s);
1062
+ }
1063
+ /**
1064
+ Replace the part of the document between the given positions with
1065
+ the given slice. The slice must 'fit', meaning its open sides
1066
+ must be able to connect to the surrounding content, and its
1067
+ content nodes must be valid children for the node they are placed
1068
+ into. If any of this is violated, an error of type
1069
+ [`ReplaceError`](https://prosemirror.net/docs/ref/#model.ReplaceError) is thrown.
1070
+ */
1071
+ replace(t, e, n) {
1072
+ return dt(this.resolve(t), this.resolve(e), n);
1073
+ }
1074
+ /**
1075
+ Find the node directly after the given position.
1076
+ */
1077
+ nodeAt(t) {
1078
+ for (let e = this; ; ) {
1079
+ let { index: n, offset: i } = e.content.findIndex(t);
1080
+ if (e = e.maybeChild(n), !e)
1081
+ return null;
1082
+ if (i == t || e.isText)
1083
+ return e;
1084
+ t -= i + 1;
1085
+ }
1086
+ }
1087
+ /**
1088
+ Find the (direct) child node after the given offset, if any,
1089
+ and return it along with its index and offset relative to this
1090
+ node.
1091
+ */
1092
+ childAfter(t) {
1093
+ let { index: e, offset: n } = this.content.findIndex(t);
1094
+ return { node: this.content.maybeChild(e), index: e, offset: n };
1095
+ }
1096
+ /**
1097
+ Find the (direct) child node before the given offset, if any,
1098
+ and return it along with its index and offset relative to this
1099
+ node.
1100
+ */
1101
+ childBefore(t) {
1102
+ if (t == 0)
1103
+ return { node: null, index: 0, offset: 0 };
1104
+ let { index: e, offset: n } = this.content.findIndex(t);
1105
+ if (n < t)
1106
+ return { node: this.content.child(e), index: e, offset: n };
1107
+ let i = this.content.child(e - 1);
1108
+ return { node: i, index: e - 1, offset: n - i.nodeSize };
1109
+ }
1110
+ /**
1111
+ Resolve the given position in the document, returning an
1112
+ [object](https://prosemirror.net/docs/ref/#model.ResolvedPos) with information about its context.
1113
+ */
1114
+ resolve(t) {
1115
+ return E.resolveCached(this, t);
1116
+ }
1117
+ /**
1118
+ @internal
1119
+ */
1120
+ resolveNoCache(t) {
1121
+ return E.resolve(this, t);
1122
+ }
1123
+ /**
1124
+ Test whether a given mark or mark type occurs in this document
1125
+ between the two given positions.
1126
+ */
1127
+ rangeHasMark(t, e, n) {
1128
+ let i = !1;
1129
+ return e > t && this.nodesBetween(t, e, (r) => (n.isInSet(r.marks) && (i = !0), !i)), i;
1130
+ }
1131
+ /**
1132
+ True when this is a block (non-inline node)
1133
+ */
1134
+ get isBlock() {
1135
+ return this.type.isBlock;
1136
+ }
1137
+ /**
1138
+ True when this is a textblock node, a block node with inline
1139
+ content.
1140
+ */
1141
+ get isTextblock() {
1142
+ return this.type.isTextblock;
1143
+ }
1144
+ /**
1145
+ True when this node allows inline content.
1146
+ */
1147
+ get inlineContent() {
1148
+ return this.type.inlineContent;
1149
+ }
1150
+ /**
1151
+ True when this is an inline node (a text node or a node that can
1152
+ appear among text).
1153
+ */
1154
+ get isInline() {
1155
+ return this.type.isInline;
1156
+ }
1157
+ /**
1158
+ True when this is a text node.
1159
+ */
1160
+ get isText() {
1161
+ return this.type.isText;
1162
+ }
1163
+ /**
1164
+ True when this is a leaf node.
1165
+ */
1166
+ get isLeaf() {
1167
+ return this.type.isLeaf;
1168
+ }
1169
+ /**
1170
+ True when this is an atom, i.e. when it does not have directly
1171
+ editable content. This is usually the same as `isLeaf`, but can
1172
+ be configured with the [`atom` property](https://prosemirror.net/docs/ref/#model.NodeSpec.atom)
1173
+ on a node's spec (typically used when the node is displayed as
1174
+ an uneditable [node view](https://prosemirror.net/docs/ref/#view.NodeView)).
1175
+ */
1176
+ get isAtom() {
1177
+ return this.type.isAtom;
1178
+ }
1179
+ /**
1180
+ Return a string representation of this node for debugging
1181
+ purposes.
1182
+ */
1183
+ toString() {
1184
+ if (this.type.spec.toDebugString)
1185
+ return this.type.spec.toDebugString(this);
1186
+ let t = this.type.name;
1187
+ return this.content.size && (t += "(" + this.content.toStringInner() + ")"), it(this.marks, t);
1188
+ }
1189
+ /**
1190
+ Get the content match in this node at the given index.
1191
+ */
1192
+ contentMatchAt(t) {
1193
+ let e = this.type.contentMatch.matchFragment(this.content, 0, t);
1194
+ if (!e)
1195
+ throw new Error("Called contentMatchAt on a node with invalid content");
1196
+ return e;
1197
+ }
1198
+ /**
1199
+ Test whether replacing the range between `from` and `to` (by
1200
+ child index) with the given replacement fragment (which defaults
1201
+ to the empty fragment) would leave the node's content valid. You
1202
+ can optionally pass `start` and `end` indices into the
1203
+ replacement fragment.
1204
+ */
1205
+ canReplace(t, e, n = c.empty, i = 0, r = n.childCount) {
1206
+ let s = this.contentMatchAt(t).matchFragment(n, i, r), o = s && s.matchFragment(this.content, e);
1207
+ if (!o || !o.validEnd)
1208
+ return !1;
1209
+ for (let h = i; h < r; h++)
1210
+ if (!this.type.allowsMarks(n.child(h).marks))
1211
+ return !1;
1212
+ return !0;
1213
+ }
1214
+ /**
1215
+ Test whether replacing the range `from` to `to` (by index) with
1216
+ a node of the given type would leave the node's content valid.
1217
+ */
1218
+ canReplaceWith(t, e, n, i) {
1219
+ if (i && !this.type.allowsMarks(i))
1220
+ return !1;
1221
+ let r = this.contentMatchAt(t).matchType(n), s = r && r.matchFragment(this.content, e);
1222
+ return s ? s.validEnd : !1;
1223
+ }
1224
+ /**
1225
+ Test whether the given node's content could be appended to this
1226
+ node. If that node is empty, this will only return true if there
1227
+ is at least one node type that can appear in both nodes (to avoid
1228
+ merging completely incompatible nodes).
1229
+ */
1230
+ canAppend(t) {
1231
+ return t.content.size ? this.canReplace(this.childCount, this.childCount, t.content) : this.type.compatibleContent(t.type);
1232
+ }
1233
+ /**
1234
+ Check whether this node and its descendants conform to the
1235
+ schema, and raise an exception when they do not.
1236
+ */
1237
+ check() {
1238
+ this.type.checkContent(this.content), this.type.checkAttrs(this.attrs);
1239
+ let t = u.none;
1240
+ for (let e = 0; e < this.marks.length; e++) {
1241
+ let n = this.marks[e];
1242
+ n.type.checkAttrs(n.attrs), t = n.addToSet(t);
1243
+ }
1244
+ if (!u.sameSet(t, this.marks))
1245
+ throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map((e) => e.type.name)}`);
1246
+ this.content.forEach((e) => e.check());
1247
+ }
1248
+ /**
1249
+ Return a JSON-serializeable representation of this node.
1250
+ */
1251
+ toJSON() {
1252
+ let t = { type: this.type.name };
1253
+ for (let e in this.attrs) {
1254
+ t.attrs = this.attrs;
1255
+ break;
1256
+ }
1257
+ return this.content.size && (t.content = this.content.toJSON()), this.marks.length && (t.marks = this.marks.map((e) => e.toJSON())), t;
1258
+ }
1259
+ /**
1260
+ Deserialize a node from its JSON representation.
1261
+ */
1262
+ static fromJSON(t, e) {
1263
+ if (!e)
1264
+ throw new RangeError("Invalid input for Node.fromJSON");
1265
+ let n;
1266
+ if (e.marks) {
1267
+ if (!Array.isArray(e.marks))
1268
+ throw new RangeError("Invalid mark data for Node.fromJSON");
1269
+ n = e.marks.map(t.markFromJSON);
1270
+ }
1271
+ if (e.type == "text") {
1272
+ if (typeof e.text != "string")
1273
+ throw new RangeError("Invalid text node in JSON");
1274
+ return t.text(e.text, n);
1275
+ }
1276
+ let i = c.fromJSON(t, e.content), r = t.nodeType(e.type).create(e.attrs, i, n);
1277
+ return r.type.checkAttrs(r.attrs), r;
1278
+ }
1279
+ }
1280
+ g.prototype.text = void 0;
1281
+ class z extends g {
1282
+ /**
1283
+ @internal
1284
+ */
1285
+ constructor(t, e, n, i) {
1286
+ if (super(t, e, null, i), !n)
1287
+ throw new RangeError("Empty text nodes are not allowed");
1288
+ this.text = n;
1289
+ }
1290
+ toString() {
1291
+ return this.type.spec.toDebugString ? this.type.spec.toDebugString(this) : it(this.marks, JSON.stringify(this.text));
1292
+ }
1293
+ get textContent() {
1294
+ return this.text;
1295
+ }
1296
+ textBetween(t, e) {
1297
+ return this.text.slice(t, e);
1298
+ }
1299
+ get nodeSize() {
1300
+ return this.text.length;
1301
+ }
1302
+ mark(t) {
1303
+ return t == this.marks ? this : new z(this.type, this.attrs, this.text, t);
1304
+ }
1305
+ withText(t) {
1306
+ return t == this.text ? this : new z(this.type, this.attrs, t, this.marks);
1307
+ }
1308
+ cut(t = 0, e = this.text.length) {
1309
+ return t == 0 && e == this.text.length ? this : this.withText(this.text.slice(t, e));
1310
+ }
1311
+ eq(t) {
1312
+ return this.sameMarkup(t) && this.text == t.text;
1313
+ }
1314
+ toJSON() {
1315
+ let t = super.toJSON();
1316
+ return t.text = this.text, t;
1317
+ }
1318
+ }
1319
+ function it(l, t) {
1320
+ for (let e = l.length - 1; e >= 0; e--)
1321
+ t = l[e].type.name + "(" + t + ")";
1322
+ return t;
1323
+ }
1324
+ class w {
1325
+ /**
1326
+ @internal
1327
+ */
1328
+ constructor(t) {
1329
+ this.validEnd = t, this.next = [], this.wrapCache = [];
1330
+ }
1331
+ /**
1332
+ @internal
1333
+ */
1334
+ static parse(t, e) {
1335
+ let n = new kt(t, e);
1336
+ if (n.next == null)
1337
+ return w.empty;
1338
+ let i = rt(n);
1339
+ n.next && n.err("Unexpected trailing text");
1340
+ let r = Mt(bt(i));
1341
+ return At(r, n), r;
1342
+ }
1343
+ /**
1344
+ Match a node type, returning a match after that node if
1345
+ successful.
1346
+ */
1347
+ matchType(t) {
1348
+ for (let e = 0; e < this.next.length; e++)
1349
+ if (this.next[e].type == t)
1350
+ return this.next[e].next;
1351
+ return null;
1352
+ }
1353
+ /**
1354
+ Try to match a fragment. Returns the resulting match when
1355
+ successful.
1356
+ */
1357
+ matchFragment(t, e = 0, n = t.childCount) {
1358
+ let i = this;
1359
+ for (let r = e; i && r < n; r++)
1360
+ i = i.matchType(t.child(r).type);
1361
+ return i;
1362
+ }
1363
+ /**
1364
+ @internal
1365
+ */
1366
+ get inlineContent() {
1367
+ return this.next.length != 0 && this.next[0].type.isInline;
1368
+ }
1369
+ /**
1370
+ Get the first matching node type at this match position that can
1371
+ be generated.
1372
+ */
1373
+ get defaultType() {
1374
+ for (let t = 0; t < this.next.length; t++) {
1375
+ let { type: e } = this.next[t];
1376
+ if (!(e.isText || e.hasRequiredAttrs()))
1377
+ return e;
1378
+ }
1379
+ return null;
1380
+ }
1381
+ /**
1382
+ @internal
1383
+ */
1384
+ compatible(t) {
1385
+ for (let e = 0; e < this.next.length; e++)
1386
+ for (let n = 0; n < t.next.length; n++)
1387
+ if (this.next[e].type == t.next[n].type)
1388
+ return !0;
1389
+ return !1;
1390
+ }
1391
+ /**
1392
+ Try to match the given fragment, and if that fails, see if it can
1393
+ be made to match by inserting nodes in front of it. When
1394
+ successful, return a fragment of inserted nodes (which may be
1395
+ empty if nothing had to be inserted). When `toEnd` is true, only
1396
+ return a fragment if the resulting match goes to the end of the
1397
+ content expression.
1398
+ */
1399
+ fillBefore(t, e = !1, n = 0) {
1400
+ let i = [this];
1401
+ function r(s, o) {
1402
+ let h = s.matchFragment(t, n);
1403
+ if (h && (!e || h.validEnd))
1404
+ return c.from(o.map((a) => a.createAndFill()));
1405
+ for (let a = 0; a < s.next.length; a++) {
1406
+ let { type: f, next: p } = s.next[a];
1407
+ if (!(f.isText || f.hasRequiredAttrs()) && i.indexOf(p) == -1) {
1408
+ i.push(p);
1409
+ let y = r(p, o.concat(f));
1410
+ if (y)
1411
+ return y;
1412
+ }
1413
+ }
1414
+ return null;
1415
+ }
1416
+ return r(this, []);
1417
+ }
1418
+ /**
1419
+ Find a set of wrapping node types that would allow a node of the
1420
+ given type to appear at this position. The result may be empty
1421
+ (when it fits directly) and will be null when no such wrapping
1422
+ exists.
1423
+ */
1424
+ findWrapping(t) {
1425
+ for (let n = 0; n < this.wrapCache.length; n += 2)
1426
+ if (this.wrapCache[n] == t)
1427
+ return this.wrapCache[n + 1];
1428
+ let e = this.computeWrapping(t);
1429
+ return this.wrapCache.push(t, e), e;
1430
+ }
1431
+ /**
1432
+ @internal
1433
+ */
1434
+ computeWrapping(t) {
1435
+ let e = /* @__PURE__ */ Object.create(null), n = [{ match: this, type: null, via: null }];
1436
+ for (; n.length; ) {
1437
+ let i = n.shift(), r = i.match;
1438
+ if (r.matchType(t)) {
1439
+ let s = [];
1440
+ for (let o = i; o.type; o = o.via)
1441
+ s.push(o.type);
1442
+ return s.reverse();
1443
+ }
1444
+ for (let s = 0; s < r.next.length; s++) {
1445
+ let { type: o, next: h } = r.next[s];
1446
+ !o.isLeaf && !o.hasRequiredAttrs() && !(o.name in e) && (!i.type || h.validEnd) && (n.push({ match: o.contentMatch, type: o, via: i }), e[o.name] = !0);
1447
+ }
1448
+ }
1449
+ return null;
1450
+ }
1451
+ /**
1452
+ The number of outgoing edges this node has in the finite
1453
+ automaton that describes the content expression.
1454
+ */
1455
+ get edgeCount() {
1456
+ return this.next.length;
1457
+ }
1458
+ /**
1459
+ Get the _n_​th outgoing edge from this node in the finite
1460
+ automaton that describes the content expression.
1461
+ */
1462
+ edge(t) {
1463
+ if (t >= this.next.length)
1464
+ throw new RangeError(`There's no ${t}th edge in this content match`);
1465
+ return this.next[t];
1466
+ }
1467
+ /**
1468
+ @internal
1469
+ */
1470
+ toString() {
1471
+ let t = [];
1472
+ function e(n) {
1473
+ t.push(n);
1474
+ for (let i = 0; i < n.next.length; i++)
1475
+ t.indexOf(n.next[i].next) == -1 && e(n.next[i].next);
1476
+ }
1477
+ return e(this), t.map((n, i) => {
1478
+ let r = i + (n.validEnd ? "*" : " ") + " ";
1479
+ for (let s = 0; s < n.next.length; s++)
1480
+ r += (s ? ", " : "") + n.next[s].type.name + "->" + t.indexOf(n.next[s].next);
1481
+ return r;
1482
+ }).join(`
1483
+ `);
1484
+ }
1485
+ }
1486
+ w.empty = new w(!0);
1487
+ class kt {
1488
+ constructor(t, e) {
1489
+ this.string = t, this.nodeTypes = e, this.inline = null, this.pos = 0, this.tokens = t.split(/\s*(?=\b|\W|$)/), this.tokens[this.tokens.length - 1] == "" && this.tokens.pop(), this.tokens[0] == "" && this.tokens.shift();
1490
+ }
1491
+ get next() {
1492
+ return this.tokens[this.pos];
1493
+ }
1494
+ eat(t) {
1495
+ return this.next == t && (this.pos++ || !0);
1496
+ }
1497
+ err(t) {
1498
+ throw new SyntaxError(t + " (in content expression '" + this.string + "')");
1499
+ }
1500
+ }
1501
+ function rt(l) {
1502
+ let t = [];
1503
+ do
1504
+ t.push(St(l));
1505
+ while (l.eat("|"));
1506
+ return t.length == 1 ? t[0] : { type: "choice", exprs: t };
1507
+ }
1508
+ function St(l) {
1509
+ let t = [];
1510
+ do
1511
+ t.push(Et(l));
1512
+ while (l.next && l.next != ")" && l.next != "|");
1513
+ return t.length == 1 ? t[0] : { type: "seq", exprs: t };
1514
+ }
1515
+ function Et(l) {
1516
+ let t = Tt(l);
1517
+ for (; ; )
1518
+ if (l.eat("+"))
1519
+ t = { type: "plus", expr: t };
1520
+ else if (l.eat("*"))
1521
+ t = { type: "star", expr: t };
1522
+ else if (l.eat("?"))
1523
+ t = { type: "opt", expr: t };
1524
+ else if (l.eat("{"))
1525
+ t = Ct(l, t);
1526
+ else
1527
+ break;
1528
+ return t;
1529
+ }
1530
+ function W(l) {
1531
+ /\D/.test(l.next) && l.err("Expected number, got '" + l.next + "'");
1532
+ let t = Number(l.next);
1533
+ return l.pos++, t;
1534
+ }
1535
+ function Ct(l, t) {
1536
+ let e = W(l), n = e;
1537
+ return l.eat(",") && (l.next != "}" ? n = W(l) : n = -1), l.eat("}") || l.err("Unclosed braced range"), { type: "range", min: e, max: n, expr: t };
1538
+ }
1539
+ function Ot(l, t) {
1540
+ let e = l.nodeTypes, n = e[t];
1541
+ if (n)
1542
+ return [n];
1543
+ let i = [];
1544
+ for (let r in e) {
1545
+ let s = e[r];
1546
+ s.isInGroup(t) && i.push(s);
1547
+ }
1548
+ return i.length == 0 && l.err("No node type or group '" + t + "' found"), i;
1549
+ }
1550
+ function Tt(l) {
1551
+ if (l.eat("(")) {
1552
+ let t = rt(l);
1553
+ return l.eat(")") || l.err("Missing closing paren"), t;
1554
+ } else if (/\W/.test(l.next))
1555
+ l.err("Unexpected token '" + l.next + "'");
1556
+ else {
1557
+ let t = Ot(l, l.next).map((e) => (l.inline == null ? l.inline = e.isInline : l.inline != e.isInline && l.err("Mixing inline and block content"), { type: "name", value: e }));
1558
+ return l.pos++, t.length == 1 ? t[0] : { type: "choice", exprs: t };
1559
+ }
1560
+ }
1561
+ function bt(l) {
1562
+ let t = [[]];
1563
+ return i(r(l, 0), e()), t;
1564
+ function e() {
1565
+ return t.push([]) - 1;
1566
+ }
1567
+ function n(s, o, h) {
1568
+ let a = { term: h, to: o };
1569
+ return t[s].push(a), a;
1570
+ }
1571
+ function i(s, o) {
1572
+ s.forEach((h) => h.to = o);
1573
+ }
1574
+ function r(s, o) {
1575
+ if (s.type == "choice")
1576
+ return s.exprs.reduce((h, a) => h.concat(r(a, o)), []);
1577
+ if (s.type == "seq")
1578
+ for (let h = 0; ; h++) {
1579
+ let a = r(s.exprs[h], o);
1580
+ if (h == s.exprs.length - 1)
1581
+ return a;
1582
+ i(a, o = e());
1583
+ }
1584
+ else if (s.type == "star") {
1585
+ let h = e();
1586
+ return n(o, h), i(r(s.expr, h), h), [n(h)];
1587
+ } else if (s.type == "plus") {
1588
+ let h = e();
1589
+ return i(r(s.expr, o), h), i(r(s.expr, h), h), [n(h)];
1590
+ } else {
1591
+ if (s.type == "opt")
1592
+ return [n(o)].concat(r(s.expr, o));
1593
+ if (s.type == "range") {
1594
+ let h = o;
1595
+ for (let a = 0; a < s.min; a++) {
1596
+ let f = e();
1597
+ i(r(s.expr, h), f), h = f;
1598
+ }
1599
+ if (s.max == -1)
1600
+ i(r(s.expr, h), h);
1601
+ else
1602
+ for (let a = s.min; a < s.max; a++) {
1603
+ let f = e();
1604
+ n(h, f), i(r(s.expr, h), f), h = f;
1605
+ }
1606
+ return [n(h)];
1607
+ } else {
1608
+ if (s.type == "name")
1609
+ return [n(o, void 0, s.value)];
1610
+ throw new Error("Unknown expr type");
1611
+ }
1612
+ }
1613
+ }
1614
+ }
1615
+ function st(l, t) {
1616
+ return t - l;
1617
+ }
1618
+ function j(l, t) {
1619
+ let e = [];
1620
+ return n(t), e.sort(st);
1621
+ function n(i) {
1622
+ let r = l[i];
1623
+ if (r.length == 1 && !r[0].term)
1624
+ return n(r[0].to);
1625
+ e.push(i);
1626
+ for (let s = 0; s < r.length; s++) {
1627
+ let { term: o, to: h } = r[s];
1628
+ !o && e.indexOf(h) == -1 && n(h);
1629
+ }
1630
+ }
1631
+ }
1632
+ function Mt(l) {
1633
+ let t = /* @__PURE__ */ Object.create(null);
1634
+ return e(j(l, 0));
1635
+ function e(n) {
1636
+ let i = [];
1637
+ n.forEach((s) => {
1638
+ l[s].forEach(({ term: o, to: h }) => {
1639
+ if (!o)
1640
+ return;
1641
+ let a;
1642
+ for (let f = 0; f < i.length; f++)
1643
+ i[f][0] == o && (a = i[f][1]);
1644
+ j(l, h).forEach((f) => {
1645
+ a || i.push([o, a = []]), a.indexOf(f) == -1 && a.push(f);
1646
+ });
1647
+ });
1648
+ });
1649
+ let r = t[n.join(",")] = new w(n.indexOf(l.length - 1) > -1);
1650
+ for (let s = 0; s < i.length; s++) {
1651
+ let o = i[s][1].sort(st);
1652
+ r.next.push({ type: i[s][0], next: t[o.join(",")] || e(o) });
1653
+ }
1654
+ return r;
1655
+ }
1656
+ }
1657
+ function At(l, t) {
1658
+ for (let e = 0, n = [l]; e < n.length; e++) {
1659
+ let i = n[e], r = !i.validEnd, s = [];
1660
+ for (let o = 0; o < i.next.length; o++) {
1661
+ let { type: h, next: a } = i.next[o];
1662
+ s.push(h.name), r && !(h.isText || h.hasRequiredAttrs()) && (r = !1), n.indexOf(a) == -1 && n.push(a);
1663
+ }
1664
+ r && t.err("Only non-generatable nodes (" + s.join(", ") + ") in a required position (see https://prosemirror.net/docs/guide/#generatable)");
1665
+ }
1666
+ }
1667
+ function lt(l) {
1668
+ let t = /* @__PURE__ */ Object.create(null);
1669
+ for (let e in l) {
1670
+ let n = l[e];
1671
+ if (!n.hasDefault)
1672
+ return null;
1673
+ t[e] = n.default;
1674
+ }
1675
+ return t;
1676
+ }
1677
+ function ot(l, t) {
1678
+ let e = /* @__PURE__ */ Object.create(null);
1679
+ for (let n in l) {
1680
+ let i = t && t[n];
1681
+ if (i === void 0) {
1682
+ let r = l[n];
1683
+ if (r.hasDefault)
1684
+ i = r.default;
1685
+ else
1686
+ throw new RangeError("No value supplied for attribute " + n);
1687
+ }
1688
+ e[n] = i;
1689
+ }
1690
+ return e;
1691
+ }
1692
+ function ht(l, t, e, n) {
1693
+ for (let i in t)
1694
+ if (!(i in l))
1695
+ throw new RangeError(`Unsupported attribute ${i} for ${e} of type ${i}`);
1696
+ for (let i in l) {
1697
+ let r = l[i];
1698
+ r.validate && r.validate(t[i]);
1699
+ }
1700
+ }
1701
+ function at(l, t) {
1702
+ let e = /* @__PURE__ */ Object.create(null);
1703
+ if (t)
1704
+ for (let n in t)
1705
+ e[n] = new vt(l, n, t[n]);
1706
+ return e;
1707
+ }
1708
+ class v {
1709
+ /**
1710
+ @internal
1711
+ */
1712
+ constructor(t, e, n) {
1713
+ this.name = t, this.schema = e, this.spec = n, this.markSet = null, this.groups = n.group ? n.group.split(" ") : [], this.attrs = at(t, n.attrs), this.defaultAttrs = lt(this.attrs), this.contentMatch = null, this.inlineContent = null, this.isBlock = !(n.inline || t == "text"), this.isText = t == "text";
1714
+ }
1715
+ /**
1716
+ True if this is an inline type.
1717
+ */
1718
+ get isInline() {
1719
+ return !this.isBlock;
1720
+ }
1721
+ /**
1722
+ True if this is a textblock type, a block that contains inline
1723
+ content.
1724
+ */
1725
+ get isTextblock() {
1726
+ return this.isBlock && this.inlineContent;
1727
+ }
1728
+ /**
1729
+ True for node types that allow no content.
1730
+ */
1731
+ get isLeaf() {
1732
+ return this.contentMatch == w.empty;
1733
+ }
1734
+ /**
1735
+ True when this node is an atom, i.e. when it does not have
1736
+ directly editable content.
1737
+ */
1738
+ get isAtom() {
1739
+ return this.isLeaf || !!this.spec.atom;
1740
+ }
1741
+ /**
1742
+ Return true when this node type is part of the given
1743
+ [group](https://prosemirror.net/docs/ref/#model.NodeSpec.group).
1744
+ */
1745
+ isInGroup(t) {
1746
+ return this.groups.indexOf(t) > -1;
1747
+ }
1748
+ /**
1749
+ The node type's [whitespace](https://prosemirror.net/docs/ref/#model.NodeSpec.whitespace) option.
1750
+ */
1751
+ get whitespace() {
1752
+ return this.spec.whitespace || (this.spec.code ? "pre" : "normal");
1753
+ }
1754
+ /**
1755
+ Tells you whether this node type has any required attributes.
1756
+ */
1757
+ hasRequiredAttrs() {
1758
+ for (let t in this.attrs)
1759
+ if (this.attrs[t].isRequired)
1760
+ return !0;
1761
+ return !1;
1762
+ }
1763
+ /**
1764
+ Indicates whether this node allows some of the same content as
1765
+ the given node type.
1766
+ */
1767
+ compatibleContent(t) {
1768
+ return this == t || this.contentMatch.compatible(t.contentMatch);
1769
+ }
1770
+ /**
1771
+ @internal
1772
+ */
1773
+ computeAttrs(t) {
1774
+ return !t && this.defaultAttrs ? this.defaultAttrs : ot(this.attrs, t);
1775
+ }
1776
+ /**
1777
+ Create a `Node` of this type. The given attributes are
1778
+ checked and defaulted (you can pass `null` to use the type's
1779
+ defaults entirely, if no required attributes exist). `content`
1780
+ may be a `Fragment`, a node, an array of nodes, or
1781
+ `null`. Similarly `marks` may be `null` to default to the empty
1782
+ set of marks.
1783
+ */
1784
+ create(t = null, e, n) {
1785
+ if (this.isText)
1786
+ throw new Error("NodeType.create can't construct text nodes");
1787
+ return new g(this, this.computeAttrs(t), c.from(e), u.setFrom(n));
1788
+ }
1789
+ /**
1790
+ Like [`create`](https://prosemirror.net/docs/ref/#model.NodeType.create), but check the given content
1791
+ against the node type's content restrictions, and throw an error
1792
+ if it doesn't match.
1793
+ */
1794
+ createChecked(t = null, e, n) {
1795
+ return e = c.from(e), this.checkContent(e), new g(this, this.computeAttrs(t), e, u.setFrom(n));
1796
+ }
1797
+ /**
1798
+ Like [`create`](https://prosemirror.net/docs/ref/#model.NodeType.create), but see if it is
1799
+ necessary to add nodes to the start or end of the given fragment
1800
+ to make it fit the node. If no fitting wrapping can be found,
1801
+ return null. Note that, due to the fact that required nodes can
1802
+ always be created, this will always succeed if you pass null or
1803
+ `Fragment.empty` as content.
1804
+ */
1805
+ createAndFill(t = null, e, n) {
1806
+ if (t = this.computeAttrs(t), e = c.from(e), e.size) {
1807
+ let s = this.contentMatch.fillBefore(e);
1808
+ if (!s)
1809
+ return null;
1810
+ e = s.append(e);
1811
+ }
1812
+ let i = this.contentMatch.matchFragment(e), r = i && i.fillBefore(c.empty, !0);
1813
+ return r ? new g(this, t, e.append(r), u.setFrom(n)) : null;
1814
+ }
1815
+ /**
1816
+ Returns true if the given fragment is valid content for this node
1817
+ type.
1818
+ */
1819
+ validContent(t) {
1820
+ let e = this.contentMatch.matchFragment(t);
1821
+ if (!e || !e.validEnd)
1822
+ return !1;
1823
+ for (let n = 0; n < t.childCount; n++)
1824
+ if (!this.allowsMarks(t.child(n).marks))
1825
+ return !1;
1826
+ return !0;
1827
+ }
1828
+ /**
1829
+ Throws a RangeError if the given fragment is not valid content for this
1830
+ node type.
1831
+ @internal
1832
+ */
1833
+ checkContent(t) {
1834
+ if (!this.validContent(t))
1835
+ throw new RangeError(`Invalid content for node ${this.name}: ${t.toString().slice(0, 50)}`);
1836
+ }
1837
+ /**
1838
+ @internal
1839
+ */
1840
+ checkAttrs(t) {
1841
+ ht(this.attrs, t, "node", this.name);
1842
+ }
1843
+ /**
1844
+ Check whether the given mark type is allowed in this node.
1845
+ */
1846
+ allowsMarkType(t) {
1847
+ return this.markSet == null || this.markSet.indexOf(t) > -1;
1848
+ }
1849
+ /**
1850
+ Test whether the given set of marks are allowed in this node.
1851
+ */
1852
+ allowsMarks(t) {
1853
+ if (this.markSet == null)
1854
+ return !0;
1855
+ for (let e = 0; e < t.length; e++)
1856
+ if (!this.allowsMarkType(t[e].type))
1857
+ return !1;
1858
+ return !0;
1859
+ }
1860
+ /**
1861
+ Removes the marks that are not allowed in this node from the given set.
1862
+ */
1863
+ allowedMarks(t) {
1864
+ if (this.markSet == null)
1865
+ return t;
1866
+ let e;
1867
+ for (let n = 0; n < t.length; n++)
1868
+ this.allowsMarkType(t[n].type) ? e && e.push(t[n]) : e || (e = t.slice(0, n));
1869
+ return e ? e.length ? e : u.none : t;
1870
+ }
1871
+ /**
1872
+ @internal
1873
+ */
1874
+ static compile(t, e) {
1875
+ let n = /* @__PURE__ */ Object.create(null);
1876
+ t.forEach((r, s) => n[r] = new v(r, e, s));
1877
+ let i = e.spec.topNode || "doc";
1878
+ if (!n[i])
1879
+ throw new RangeError("Schema is missing its top node type ('" + i + "')");
1880
+ if (!n.text)
1881
+ throw new RangeError("Every schema needs a 'text' type");
1882
+ for (let r in n.text.attrs)
1883
+ throw new RangeError("The text node type should not have attributes");
1884
+ return n;
1885
+ }
1886
+ }
1887
+ function zt(l, t, e) {
1888
+ let n = e.split("|");
1889
+ return (i) => {
1890
+ let r = i === null ? "null" : typeof i;
1891
+ if (n.indexOf(r) < 0)
1892
+ throw new RangeError(`Expected value of type ${n} for attribute ${t} on type ${l}, got ${r}`);
1893
+ };
1894
+ }
1895
+ class vt {
1896
+ constructor(t, e, n) {
1897
+ this.hasDefault = Object.prototype.hasOwnProperty.call(n, "default"), this.default = n.default, this.validate = typeof n.validate == "string" ? zt(t, e, n.validate) : n.validate;
1898
+ }
1899
+ get isRequired() {
1900
+ return !this.hasDefault;
1901
+ }
1902
+ }
1903
+ class F {
1904
+ /**
1905
+ @internal
1906
+ */
1907
+ constructor(t, e, n, i) {
1908
+ this.name = t, this.rank = e, this.schema = n, this.spec = i, this.attrs = at(t, i.attrs), this.excluded = null;
1909
+ let r = lt(this.attrs);
1910
+ this.instance = r ? new u(this, r) : null;
1911
+ }
1912
+ /**
1913
+ Create a mark of this type. `attrs` may be `null` or an object
1914
+ containing only some of the mark's attributes. The others, if
1915
+ they have defaults, will be added.
1916
+ */
1917
+ create(t = null) {
1918
+ return !t && this.instance ? this.instance : new u(this, ot(this.attrs, t));
1919
+ }
1920
+ /**
1921
+ @internal
1922
+ */
1923
+ static compile(t, e) {
1924
+ let n = /* @__PURE__ */ Object.create(null), i = 0;
1925
+ return t.forEach((r, s) => n[r] = new F(r, i++, e, s)), n;
1926
+ }
1927
+ /**
1928
+ When there is a mark of this type in the given set, a new set
1929
+ without it is returned. Otherwise, the input set is returned.
1930
+ */
1931
+ removeFromSet(t) {
1932
+ for (var e = 0; e < t.length; e++)
1933
+ t[e].type == this && (t = t.slice(0, e).concat(t.slice(e + 1)), e--);
1934
+ return t;
1935
+ }
1936
+ /**
1937
+ Tests whether there is a mark of this type in the given set.
1938
+ */
1939
+ isInSet(t) {
1940
+ for (let e = 0; e < t.length; e++)
1941
+ if (t[e].type == this)
1942
+ return t[e];
1943
+ }
1944
+ /**
1945
+ @internal
1946
+ */
1947
+ checkAttrs(t) {
1948
+ ht(this.attrs, t, "mark", this.name);
1949
+ }
1950
+ /**
1951
+ Queries whether a given mark type is
1952
+ [excluded](https://prosemirror.net/docs/ref/#model.MarkSpec.excludes) by this one.
1953
+ */
1954
+ excludes(t) {
1955
+ return this.excluded.indexOf(t) > -1;
1956
+ }
1957
+ }
1958
+ class qt {
1959
+ /**
1960
+ Construct a schema from a schema [specification](https://prosemirror.net/docs/ref/#model.SchemaSpec).
1961
+ */
1962
+ constructor(t) {
1963
+ this.linebreakReplacement = null, this.cached = /* @__PURE__ */ Object.create(null);
1964
+ let e = this.spec = {};
1965
+ for (let i in t)
1966
+ e[i] = t[i];
1967
+ e.nodes = q.from(t.nodes), e.marks = q.from(t.marks || {}), this.nodes = v.compile(this.spec.nodes, this), this.marks = F.compile(this.spec.marks, this);
1968
+ let n = /* @__PURE__ */ Object.create(null);
1969
+ for (let i in this.nodes) {
1970
+ if (i in this.marks)
1971
+ throw new RangeError(i + " can not be both a node and a mark");
1972
+ let r = this.nodes[i], s = r.spec.content || "", o = r.spec.marks;
1973
+ if (r.contentMatch = n[s] || (n[s] = w.parse(s, this.nodes)), r.inlineContent = r.contentMatch.inlineContent, r.spec.linebreakReplacement) {
1974
+ if (this.linebreakReplacement)
1975
+ throw new RangeError("Multiple linebreak nodes defined");
1976
+ if (!r.isInline || !r.isLeaf)
1977
+ throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");
1978
+ this.linebreakReplacement = r;
1979
+ }
1980
+ r.markSet = o == "_" ? null : o ? U(this, o.split(" ")) : o == "" || !r.inlineContent ? [] : null;
1981
+ }
1982
+ for (let i in this.marks) {
1983
+ let r = this.marks[i], s = r.spec.excludes;
1984
+ r.excluded = s == null ? [r] : s == "" ? [] : U(this, s.split(" "));
1985
+ }
1986
+ this.nodeFromJSON = (i) => g.fromJSON(this, i), this.markFromJSON = (i) => u.fromJSON(this, i), this.topNodeType = this.nodes[this.spec.topNode || "doc"], this.cached.wrappings = /* @__PURE__ */ Object.create(null);
1987
+ }
1988
+ /**
1989
+ Create a node in this schema. The `type` may be a string or a
1990
+ `NodeType` instance. Attributes will be extended with defaults,
1991
+ `content` may be a `Fragment`, `null`, a `Node`, or an array of
1992
+ nodes.
1993
+ */
1994
+ node(t, e = null, n, i) {
1995
+ if (typeof t == "string")
1996
+ t = this.nodeType(t);
1997
+ else if (t instanceof v) {
1998
+ if (t.schema != this)
1999
+ throw new RangeError("Node type from different schema used (" + t.name + ")");
2000
+ } else throw new RangeError("Invalid node type: " + t);
2001
+ return t.createChecked(e, n, i);
2002
+ }
2003
+ /**
2004
+ Create a text node in the schema. Empty text nodes are not
2005
+ allowed.
2006
+ */
2007
+ text(t, e) {
2008
+ let n = this.nodes.text;
2009
+ return new z(n, n.defaultAttrs, t, u.setFrom(e));
2010
+ }
2011
+ /**
2012
+ Create a mark with the given type and attributes.
2013
+ */
2014
+ mark(t, e) {
2015
+ return typeof t == "string" && (t = this.marks[t]), t.create(e);
2016
+ }
2017
+ /**
2018
+ @internal
2019
+ */
2020
+ nodeType(t) {
2021
+ let e = this.nodes[t];
2022
+ if (!e)
2023
+ throw new RangeError("Unknown node type: " + t);
2024
+ return e;
2025
+ }
2026
+ }
2027
+ function U(l, t) {
2028
+ let e = [];
2029
+ for (let n = 0; n < t.length; n++) {
2030
+ let i = t[n], r = l.marks[i], s = r;
2031
+ if (r)
2032
+ e.push(r);
2033
+ else
2034
+ for (let o in l.marks) {
2035
+ let h = l.marks[o];
2036
+ (i == "_" || h.spec.group && h.spec.group.split(" ").indexOf(i) > -1) && e.push(s = h);
2037
+ }
2038
+ if (!s)
2039
+ throw new SyntaxError("Unknown mark type: '" + t[n] + "'");
2040
+ }
2041
+ return e;
2042
+ }
2043
+ function Nt(l) {
2044
+ return l.tag != null;
2045
+ }
2046
+ function Rt(l) {
2047
+ return l.style != null;
2048
+ }
2049
+ class P {
2050
+ /**
2051
+ Create a parser that targets the given schema, using the given
2052
+ parsing rules.
2053
+ */
2054
+ constructor(t, e) {
2055
+ this.schema = t, this.rules = e, this.tags = [], this.styles = [];
2056
+ let n = this.matchedStyles = [];
2057
+ e.forEach((i) => {
2058
+ if (Nt(i))
2059
+ this.tags.push(i);
2060
+ else if (Rt(i)) {
2061
+ let r = /[^=]*/.exec(i.style)[0];
2062
+ n.indexOf(r) < 0 && n.push(r), this.styles.push(i);
2063
+ }
2064
+ }), this.normalizeLists = !this.tags.some((i) => {
2065
+ if (!/^(ul|ol)\b/.test(i.tag) || !i.node)
2066
+ return !1;
2067
+ let r = t.nodes[i.node];
2068
+ return r.contentMatch.matchType(r);
2069
+ });
2070
+ }
2071
+ /**
2072
+ Parse a document from the content of a DOM node.
2073
+ */
2074
+ parse(t, e = {}) {
2075
+ let n = new G(this, e, !1);
2076
+ return n.addAll(t, u.none, e.from, e.to), n.finish();
2077
+ }
2078
+ /**
2079
+ Parses the content of the given DOM node, like
2080
+ [`parse`](https://prosemirror.net/docs/ref/#model.DOMParser.parse), and takes the same set of
2081
+ options. But unlike that method, which produces a whole node,
2082
+ this one returns a slice that is open at the sides, meaning that
2083
+ the schema constraints aren't applied to the start of nodes to
2084
+ the left of the input and the end of nodes at the end.
2085
+ */
2086
+ parseSlice(t, e = {}) {
2087
+ let n = new G(this, e, !0);
2088
+ return n.addAll(t, u.none, e.from, e.to), d.maxOpen(n.finish());
2089
+ }
2090
+ /**
2091
+ @internal
2092
+ */
2093
+ matchTag(t, e, n) {
2094
+ for (let i = n ? this.tags.indexOf(n) + 1 : 0; i < this.tags.length; i++) {
2095
+ let r = this.tags[i];
2096
+ if (Pt(t, r.tag) && (r.namespace === void 0 || t.namespaceURI == r.namespace) && (!r.context || e.matchesContext(r.context))) {
2097
+ if (r.getAttrs) {
2098
+ let s = r.getAttrs(t);
2099
+ if (s === !1)
2100
+ continue;
2101
+ r.attrs = s || void 0;
2102
+ }
2103
+ return r;
2104
+ }
2105
+ }
2106
+ }
2107
+ /**
2108
+ @internal
2109
+ */
2110
+ matchStyle(t, e, n, i) {
2111
+ for (let r = i ? this.styles.indexOf(i) + 1 : 0; r < this.styles.length; r++) {
2112
+ let s = this.styles[r], o = s.style;
2113
+ if (!(o.indexOf(t) != 0 || s.context && !n.matchesContext(s.context) || // Test that the style string either precisely matches the prop,
2114
+ // or has an '=' sign after the prop, followed by the given
2115
+ // value.
2116
+ o.length > t.length && (o.charCodeAt(t.length) != 61 || o.slice(t.length + 1) != e))) {
2117
+ if (s.getAttrs) {
2118
+ let h = s.getAttrs(e);
2119
+ if (h === !1)
2120
+ continue;
2121
+ s.attrs = h || void 0;
2122
+ }
2123
+ return s;
2124
+ }
2125
+ }
2126
+ }
2127
+ /**
2128
+ @internal
2129
+ */
2130
+ static schemaRules(t) {
2131
+ let e = [];
2132
+ function n(i) {
2133
+ let r = i.priority == null ? 50 : i.priority, s = 0;
2134
+ for (; s < e.length; s++) {
2135
+ let o = e[s];
2136
+ if ((o.priority == null ? 50 : o.priority) < r)
2137
+ break;
2138
+ }
2139
+ e.splice(s, 0, i);
2140
+ }
2141
+ for (let i in t.marks) {
2142
+ let r = t.marks[i].spec.parseDOM;
2143
+ r && r.forEach((s) => {
2144
+ n(s = H(s)), s.mark || s.ignore || s.clearMark || (s.mark = i);
2145
+ });
2146
+ }
2147
+ for (let i in t.nodes) {
2148
+ let r = t.nodes[i].spec.parseDOM;
2149
+ r && r.forEach((s) => {
2150
+ n(s = H(s)), s.node || s.ignore || s.mark || (s.node = i);
2151
+ });
2152
+ }
2153
+ return e;
2154
+ }
2155
+ /**
2156
+ Construct a DOM parser using the parsing rules listed in a
2157
+ schema's [node specs](https://prosemirror.net/docs/ref/#model.NodeSpec.parseDOM), reordered by
2158
+ [priority](https://prosemirror.net/docs/ref/#model.GenericParseRule.priority).
2159
+ */
2160
+ static fromSchema(t) {
2161
+ return t.cached.domParser || (t.cached.domParser = new P(t, P.schemaRules(t)));
2162
+ }
2163
+ }
2164
+ const ft = {
2165
+ address: !0,
2166
+ article: !0,
2167
+ aside: !0,
2168
+ blockquote: !0,
2169
+ canvas: !0,
2170
+ dd: !0,
2171
+ div: !0,
2172
+ dl: !0,
2173
+ fieldset: !0,
2174
+ figcaption: !0,
2175
+ figure: !0,
2176
+ footer: !0,
2177
+ form: !0,
2178
+ h1: !0,
2179
+ h2: !0,
2180
+ h3: !0,
2181
+ h4: !0,
2182
+ h5: !0,
2183
+ h6: !0,
2184
+ header: !0,
2185
+ hgroup: !0,
2186
+ hr: !0,
2187
+ li: !0,
2188
+ noscript: !0,
2189
+ ol: !0,
2190
+ output: !0,
2191
+ p: !0,
2192
+ pre: !0,
2193
+ section: !0,
2194
+ table: !0,
2195
+ tfoot: !0,
2196
+ ul: !0
2197
+ }, It = {
2198
+ head: !0,
2199
+ noscript: !0,
2200
+ object: !0,
2201
+ script: !0,
2202
+ style: !0,
2203
+ title: !0
2204
+ }, ct = { ol: !0, ul: !0 }, C = 1, B = 2, S = 4;
2205
+ function V(l, t, e) {
2206
+ return t != null ? (t ? C : 0) | (t === "full" ? B : 0) : l && l.whitespace == "pre" ? C | B : e & ~S;
2207
+ }
2208
+ class T {
2209
+ constructor(t, e, n, i, r, s) {
2210
+ this.type = t, this.attrs = e, this.marks = n, this.solid = i, this.options = s, this.content = [], this.activeMarks = u.none, this.match = r || (s & S ? null : t.contentMatch);
2211
+ }
2212
+ findWrapping(t) {
2213
+ if (!this.match) {
2214
+ if (!this.type)
2215
+ return [];
2216
+ let e = this.type.contentMatch.fillBefore(c.from(t));
2217
+ if (e)
2218
+ this.match = this.type.contentMatch.matchFragment(e);
2219
+ else {
2220
+ let n = this.type.contentMatch, i;
2221
+ return (i = n.findWrapping(t.type)) ? (this.match = n, i) : null;
2222
+ }
2223
+ }
2224
+ return this.match.findWrapping(t.type);
2225
+ }
2226
+ finish(t) {
2227
+ if (!(this.options & C)) {
2228
+ let n = this.content[this.content.length - 1], i;
2229
+ if (n && n.isText && (i = /[ \t\r\n\u000c]+$/.exec(n.text))) {
2230
+ let r = n;
2231
+ n.text.length == i[0].length ? this.content.pop() : this.content[this.content.length - 1] = r.withText(r.text.slice(0, r.text.length - i[0].length));
2232
+ }
2233
+ }
2234
+ let e = c.from(this.content);
2235
+ return !t && this.match && (e = e.append(this.match.fillBefore(c.empty, !0))), this.type ? this.type.create(this.attrs, e, this.marks) : e;
2236
+ }
2237
+ inlineContext(t) {
2238
+ return this.type ? this.type.inlineContent : this.content.length ? this.content[0].isInline : t.parentNode && !ft.hasOwnProperty(t.parentNode.nodeName.toLowerCase());
2239
+ }
2240
+ }
2241
+ class G {
2242
+ constructor(t, e, n) {
2243
+ this.parser = t, this.options = e, this.isOpen = n, this.open = 0, this.localPreserveWS = !1;
2244
+ let i = e.topNode, r, s = V(null, e.preserveWhitespace, 0) | (n ? S : 0);
2245
+ i ? r = new T(i.type, i.attrs, u.none, !0, e.topMatch || i.type.contentMatch, s) : n ? r = new T(null, null, u.none, !0, null, s) : r = new T(t.schema.topNodeType, null, u.none, !0, null, s), this.nodes = [r], this.find = e.findPositions, this.needsBlock = !1;
2246
+ }
2247
+ get top() {
2248
+ return this.nodes[this.open];
2249
+ }
2250
+ // Add a DOM node to the content. Text is inserted as text node,
2251
+ // otherwise, the node is passed to `addElement` or, if it has a
2252
+ // `style` attribute, `addElementWithStyles`.
2253
+ addDOM(t, e) {
2254
+ t.nodeType == 3 ? this.addTextNode(t, e) : t.nodeType == 1 && this.addElement(t, e);
2255
+ }
2256
+ addTextNode(t, e) {
2257
+ let n = t.nodeValue, i = this.top, r = i.options & B ? "full" : this.localPreserveWS || (i.options & C) > 0, { schema: s } = this.parser;
2258
+ if (r === "full" || i.inlineContext(t) || /[^ \t\r\n\u000c]/.test(n)) {
2259
+ if (r)
2260
+ if (r === "full")
2261
+ n = n.replace(/\r\n?/g, `
2262
+ `);
2263
+ else if (s.linebreakReplacement && /[\r\n]/.test(n) && this.top.findWrapping(s.linebreakReplacement.create())) {
2264
+ let o = n.split(/\r?\n|\r/);
2265
+ for (let h = 0; h < o.length; h++)
2266
+ h && this.insertNode(s.linebreakReplacement.create(), e, !0), o[h] && this.insertNode(s.text(o[h]), e, !/\S/.test(o[h]));
2267
+ n = "";
2268
+ } else
2269
+ n = n.replace(/\r?\n|\r/g, " ");
2270
+ else if (n = n.replace(/[ \t\r\n\u000c]+/g, " "), /^[ \t\r\n\u000c]/.test(n) && this.open == this.nodes.length - 1) {
2271
+ let o = i.content[i.content.length - 1], h = t.previousSibling;
2272
+ (!o || h && h.nodeName == "BR" || o.isText && /[ \t\r\n\u000c]$/.test(o.text)) && (n = n.slice(1));
2273
+ }
2274
+ n && this.insertNode(s.text(n), e, !/\S/.test(n)), this.findInText(t);
2275
+ } else
2276
+ this.findInside(t);
2277
+ }
2278
+ // Try to find a handler for the given tag and use that to parse. If
2279
+ // none is found, the element's content nodes are added directly.
2280
+ addElement(t, e, n) {
2281
+ let i = this.localPreserveWS, r = this.top;
2282
+ (t.tagName == "PRE" || /pre/.test(t.style && t.style.whiteSpace)) && (this.localPreserveWS = !0);
2283
+ let s = t.nodeName.toLowerCase(), o;
2284
+ ct.hasOwnProperty(s) && this.parser.normalizeLists && Dt(t);
2285
+ let h = this.options.ruleFromNode && this.options.ruleFromNode(t) || (o = this.parser.matchTag(t, this, n));
2286
+ t: if (h ? h.ignore : It.hasOwnProperty(s))
2287
+ this.findInside(t), this.ignoreFallback(t, e);
2288
+ else if (!h || h.skip || h.closeParent) {
2289
+ h && h.closeParent ? this.open = Math.max(0, this.open - 1) : h && h.skip.nodeType && (t = h.skip);
2290
+ let a, f = this.needsBlock;
2291
+ if (ft.hasOwnProperty(s))
2292
+ r.content.length && r.content[0].isInline && this.open && (this.open--, r = this.top), a = !0, r.type || (this.needsBlock = !0);
2293
+ else if (!t.firstChild) {
2294
+ this.leafFallback(t, e);
2295
+ break t;
2296
+ }
2297
+ let p = h && h.skip ? e : this.readStyles(t, e);
2298
+ p && this.addAll(t, p), a && this.sync(r), this.needsBlock = f;
2299
+ } else {
2300
+ let a = this.readStyles(t, e);
2301
+ a && this.addElementByRule(t, h, a, h.consuming === !1 ? o : void 0);
2302
+ }
2303
+ this.localPreserveWS = i;
2304
+ }
2305
+ // Called for leaf DOM nodes that would otherwise be ignored
2306
+ leafFallback(t, e) {
2307
+ t.nodeName == "BR" && this.top.type && this.top.type.inlineContent && this.addTextNode(t.ownerDocument.createTextNode(`
2308
+ `), e);
2309
+ }
2310
+ // Called for ignored nodes
2311
+ ignoreFallback(t, e) {
2312
+ t.nodeName == "BR" && (!this.top.type || !this.top.type.inlineContent) && this.findPlace(this.parser.schema.text("-"), e, !0);
2313
+ }
2314
+ // Run any style parser associated with the node's styles. Either
2315
+ // return an updated array of marks, or null to indicate some of the
2316
+ // styles had a rule with `ignore` set.
2317
+ readStyles(t, e) {
2318
+ let n = t.style;
2319
+ if (n && n.length)
2320
+ for (let i = 0; i < this.parser.matchedStyles.length; i++) {
2321
+ let r = this.parser.matchedStyles[i], s = n.getPropertyValue(r);
2322
+ if (s)
2323
+ for (let o = void 0; ; ) {
2324
+ let h = this.parser.matchStyle(r, s, this, o);
2325
+ if (!h)
2326
+ break;
2327
+ if (h.ignore)
2328
+ return null;
2329
+ if (h.clearMark ? e = e.filter((a) => !h.clearMark(a)) : e = e.concat(this.parser.schema.marks[h.mark].create(h.attrs)), h.consuming === !1)
2330
+ o = h;
2331
+ else
2332
+ break;
2333
+ }
2334
+ }
2335
+ return e;
2336
+ }
2337
+ // Look up a handler for the given node. If none are found, return
2338
+ // false. Otherwise, apply it, use its return value to drive the way
2339
+ // the node's content is wrapped, and return true.
2340
+ addElementByRule(t, e, n, i) {
2341
+ let r, s;
2342
+ if (e.node)
2343
+ if (s = this.parser.schema.nodes[e.node], s.isLeaf)
2344
+ this.insertNode(s.create(e.attrs), n, t.nodeName == "BR") || this.leafFallback(t, n);
2345
+ else {
2346
+ let h = this.enter(s, e.attrs || null, n, e.preserveWhitespace);
2347
+ h && (r = !0, n = h);
2348
+ }
2349
+ else {
2350
+ let h = this.parser.schema.marks[e.mark];
2351
+ n = n.concat(h.create(e.attrs));
2352
+ }
2353
+ let o = this.top;
2354
+ if (s && s.isLeaf)
2355
+ this.findInside(t);
2356
+ else if (i)
2357
+ this.addElement(t, n, i);
2358
+ else if (e.getContent)
2359
+ this.findInside(t), e.getContent(t, this.parser.schema).forEach((h) => this.insertNode(h, n, !1));
2360
+ else {
2361
+ let h = t;
2362
+ typeof e.contentElement == "string" ? h = t.querySelector(e.contentElement) : typeof e.contentElement == "function" ? h = e.contentElement(t) : e.contentElement && (h = e.contentElement), this.findAround(t, h, !0), this.addAll(h, n), this.findAround(t, h, !1);
2363
+ }
2364
+ r && this.sync(o) && this.open--;
2365
+ }
2366
+ // Add all child nodes between `startIndex` and `endIndex` (or the
2367
+ // whole node, if not given). If `sync` is passed, use it to
2368
+ // synchronize after every block element.
2369
+ addAll(t, e, n, i) {
2370
+ let r = n || 0;
2371
+ for (let s = n ? t.childNodes[n] : t.firstChild, o = i == null ? null : t.childNodes[i]; s != o; s = s.nextSibling, ++r)
2372
+ this.findAtPoint(t, r), this.addDOM(s, e);
2373
+ this.findAtPoint(t, r);
2374
+ }
2375
+ // Try to find a way to fit the given node type into the current
2376
+ // context. May add intermediate wrappers and/or leave non-solid
2377
+ // nodes that we're in.
2378
+ findPlace(t, e, n) {
2379
+ let i, r;
2380
+ for (let s = this.open, o = 0; s >= 0; s--) {
2381
+ let h = this.nodes[s], a = h.findWrapping(t);
2382
+ if (a && (!i || i.length > a.length + o) && (i = a, r = h, !a.length))
2383
+ break;
2384
+ if (h.solid) {
2385
+ if (n)
2386
+ break;
2387
+ o += 2;
2388
+ }
2389
+ }
2390
+ if (!i)
2391
+ return null;
2392
+ this.sync(r);
2393
+ for (let s = 0; s < i.length; s++)
2394
+ e = this.enterInner(i[s], null, e, !1);
2395
+ return e;
2396
+ }
2397
+ // Try to insert the given node, adjusting the context when needed.
2398
+ insertNode(t, e, n) {
2399
+ if (t.isInline && this.needsBlock && !this.top.type) {
2400
+ let r = this.textblockFromContext();
2401
+ r && (e = this.enterInner(r, null, e));
2402
+ }
2403
+ let i = this.findPlace(t, e, n);
2404
+ if (i) {
2405
+ this.closeExtra();
2406
+ let r = this.top;
2407
+ r.match && (r.match = r.match.matchType(t.type));
2408
+ let s = u.none;
2409
+ for (let o of i.concat(t.marks))
2410
+ (r.type ? r.type.allowsMarkType(o.type) : K(o.type, t.type)) && (s = o.addToSet(s));
2411
+ return r.content.push(t.mark(s)), !0;
2412
+ }
2413
+ return !1;
2414
+ }
2415
+ // Try to start a node of the given type, adjusting the context when
2416
+ // necessary.
2417
+ enter(t, e, n, i) {
2418
+ let r = this.findPlace(t.create(e), n, !1);
2419
+ return r && (r = this.enterInner(t, e, n, !0, i)), r;
2420
+ }
2421
+ // Open a node of the given type
2422
+ enterInner(t, e, n, i = !1, r) {
2423
+ this.closeExtra();
2424
+ let s = this.top;
2425
+ s.match = s.match && s.match.matchType(t);
2426
+ let o = V(t, r, s.options);
2427
+ s.options & S && s.content.length == 0 && (o |= S);
2428
+ let h = u.none;
2429
+ return n = n.filter((a) => (s.type ? s.type.allowsMarkType(a.type) : K(a.type, t)) ? (h = a.addToSet(h), !1) : !0), this.nodes.push(new T(t, e, h, i, null, o)), this.open++, n;
2430
+ }
2431
+ // Make sure all nodes above this.open are finished and added to
2432
+ // their parents
2433
+ closeExtra(t = !1) {
2434
+ let e = this.nodes.length - 1;
2435
+ if (e > this.open) {
2436
+ for (; e > this.open; e--)
2437
+ this.nodes[e - 1].content.push(this.nodes[e].finish(t));
2438
+ this.nodes.length = this.open + 1;
2439
+ }
2440
+ }
2441
+ finish() {
2442
+ return this.open = 0, this.closeExtra(this.isOpen), this.nodes[0].finish(!!(this.isOpen || this.options.topOpen));
2443
+ }
2444
+ sync(t) {
2445
+ for (let e = this.open; e >= 0; e--) {
2446
+ if (this.nodes[e] == t)
2447
+ return this.open = e, !0;
2448
+ this.localPreserveWS && (this.nodes[e].options |= C);
2449
+ }
2450
+ return !1;
2451
+ }
2452
+ get currentPos() {
2453
+ this.closeExtra();
2454
+ let t = 0;
2455
+ for (let e = this.open; e >= 0; e--) {
2456
+ let n = this.nodes[e].content;
2457
+ for (let i = n.length - 1; i >= 0; i--)
2458
+ t += n[i].nodeSize;
2459
+ e && t++;
2460
+ }
2461
+ return t;
2462
+ }
2463
+ findAtPoint(t, e) {
2464
+ if (this.find)
2465
+ for (let n = 0; n < this.find.length; n++)
2466
+ this.find[n].node == t && this.find[n].offset == e && (this.find[n].pos = this.currentPos);
2467
+ }
2468
+ findInside(t) {
2469
+ if (this.find)
2470
+ for (let e = 0; e < this.find.length; e++)
2471
+ this.find[e].pos == null && t.nodeType == 1 && t.contains(this.find[e].node) && (this.find[e].pos = this.currentPos);
2472
+ }
2473
+ findAround(t, e, n) {
2474
+ if (t != e && this.find)
2475
+ for (let i = 0; i < this.find.length; i++)
2476
+ this.find[i].pos == null && t.nodeType == 1 && t.contains(this.find[i].node) && e.compareDocumentPosition(this.find[i].node) & (n ? 2 : 4) && (this.find[i].pos = this.currentPos);
2477
+ }
2478
+ findInText(t) {
2479
+ if (this.find)
2480
+ for (let e = 0; e < this.find.length; e++)
2481
+ this.find[e].node == t && (this.find[e].pos = this.currentPos - (t.nodeValue.length - this.find[e].offset));
2482
+ }
2483
+ // Determines whether the given context string matches this context.
2484
+ matchesContext(t) {
2485
+ if (t.indexOf("|") > -1)
2486
+ return t.split(/\s*\|\s*/).some(this.matchesContext, this);
2487
+ let e = t.split("/"), n = this.options.context, i = !this.isOpen && (!n || n.parent.type == this.nodes[0].type), r = -(n ? n.depth + 1 : 0) + (i ? 0 : 1), s = (o, h) => {
2488
+ for (; o >= 0; o--) {
2489
+ let a = e[o];
2490
+ if (a == "") {
2491
+ if (o == e.length - 1 || o == 0)
2492
+ continue;
2493
+ for (; h >= r; h--)
2494
+ if (s(o - 1, h))
2495
+ return !0;
2496
+ return !1;
2497
+ } else {
2498
+ let f = h > 0 || h == 0 && i ? this.nodes[h].type : n && h >= r ? n.node(h - r).type : null;
2499
+ if (!f || f.name != a && !f.isInGroup(a))
2500
+ return !1;
2501
+ h--;
2502
+ }
2503
+ }
2504
+ return !0;
2505
+ };
2506
+ return s(e.length - 1, this.open);
2507
+ }
2508
+ textblockFromContext() {
2509
+ let t = this.options.context;
2510
+ if (t)
2511
+ for (let e = t.depth; e >= 0; e--) {
2512
+ let n = t.node(e).contentMatchAt(t.indexAfter(e)).defaultType;
2513
+ if (n && n.isTextblock && n.defaultAttrs)
2514
+ return n;
2515
+ }
2516
+ for (let e in this.parser.schema.nodes) {
2517
+ let n = this.parser.schema.nodes[e];
2518
+ if (n.isTextblock && n.defaultAttrs)
2519
+ return n;
2520
+ }
2521
+ }
2522
+ }
2523
+ function Dt(l) {
2524
+ for (let t = l.firstChild, e = null; t; t = t.nextSibling) {
2525
+ let n = t.nodeType == 1 ? t.nodeName.toLowerCase() : null;
2526
+ n && ct.hasOwnProperty(n) && e ? (e.appendChild(t), t = e) : n == "li" ? e = t : n && (e = null);
2527
+ }
2528
+ }
2529
+ function Pt(l, t) {
2530
+ return (l.matches || l.msMatchesSelector || l.webkitMatchesSelector || l.mozMatchesSelector).call(l, t);
2531
+ }
2532
+ function H(l) {
2533
+ let t = {};
2534
+ for (let e in l)
2535
+ t[e] = l[e];
2536
+ return t;
2537
+ }
2538
+ function K(l, t) {
2539
+ let e = t.schema.nodes;
2540
+ for (let n in e) {
2541
+ let i = e[n];
2542
+ if (!i.allowsMarkType(l))
2543
+ continue;
2544
+ let r = [], s = (o) => {
2545
+ r.push(o);
2546
+ for (let h = 0; h < o.edgeCount; h++) {
2547
+ let { type: a, next: f } = o.edge(h);
2548
+ if (a == t || r.indexOf(f) < 0 && s(f))
2549
+ return !0;
2550
+ }
2551
+ };
2552
+ if (s(i.contentMatch))
2553
+ return !0;
2554
+ }
2555
+ }
2556
+ class ut {
2557
+ /**
2558
+ Create a serializer. `nodes` should map node names to functions
2559
+ that take a node and return a description of the corresponding
2560
+ DOM. `marks` does the same for mark names, but also gets an
2561
+ argument that tells it whether the mark's content is block or
2562
+ inline content (for typical use, it'll always be inline). A mark
2563
+ serializer may be `null` to indicate that marks of that type
2564
+ should not be serialized.
2565
+ */
2566
+ constructor(t, e) {
2567
+ this.nodes = t, this.marks = e;
2568
+ }
2569
+ /**
2570
+ Serialize the content of this fragment to a DOM fragment. When
2571
+ not in the browser, the `document` option, containing a DOM
2572
+ document, should be passed so that the serializer can create
2573
+ nodes.
2574
+ */
2575
+ serializeFragment(t, e = {}, n) {
2576
+ n || (n = R(e).createDocumentFragment());
2577
+ let i = n, r = [];
2578
+ return t.forEach((s) => {
2579
+ if (r.length || s.marks.length) {
2580
+ let o = 0, h = 0;
2581
+ for (; o < r.length && h < s.marks.length; ) {
2582
+ let a = s.marks[h];
2583
+ if (!this.marks[a.type.name]) {
2584
+ h++;
2585
+ continue;
2586
+ }
2587
+ if (!a.eq(r[o][0]) || a.type.spec.spanning === !1)
2588
+ break;
2589
+ o++, h++;
2590
+ }
2591
+ for (; o < r.length; )
2592
+ i = r.pop()[1];
2593
+ for (; h < s.marks.length; ) {
2594
+ let a = s.marks[h++], f = this.serializeMark(a, s.isInline, e);
2595
+ f && (r.push([a, i]), i.appendChild(f.dom), i = f.contentDOM || f.dom);
2596
+ }
2597
+ }
2598
+ i.appendChild(this.serializeNodeInner(s, e));
2599
+ }), n;
2600
+ }
2601
+ /**
2602
+ @internal
2603
+ */
2604
+ serializeNodeInner(t, e) {
2605
+ let { dom: n, contentDOM: i } = b(R(e), this.nodes[t.type.name](t), null, t.attrs);
2606
+ if (i) {
2607
+ if (t.isLeaf)
2608
+ throw new RangeError("Content hole not allowed in a leaf node spec");
2609
+ this.serializeFragment(t.content, e, i);
2610
+ }
2611
+ return n;
2612
+ }
2613
+ /**
2614
+ Serialize this node to a DOM node. This can be useful when you
2615
+ need to serialize a part of a document, as opposed to the whole
2616
+ document. To serialize a whole document, use
2617
+ [`serializeFragment`](https://prosemirror.net/docs/ref/#model.DOMSerializer.serializeFragment) on
2618
+ its [content](https://prosemirror.net/docs/ref/#model.Node.content).
2619
+ */
2620
+ serializeNode(t, e = {}) {
2621
+ let n = this.serializeNodeInner(t, e);
2622
+ for (let i = t.marks.length - 1; i >= 0; i--) {
2623
+ let r = this.serializeMark(t.marks[i], t.isInline, e);
2624
+ r && ((r.contentDOM || r.dom).appendChild(n), n = r.dom);
2625
+ }
2626
+ return n;
2627
+ }
2628
+ /**
2629
+ @internal
2630
+ */
2631
+ serializeMark(t, e, n = {}) {
2632
+ let i = this.marks[t.type.name];
2633
+ return i && b(R(n), i(t, e), null, t.attrs);
2634
+ }
2635
+ static renderSpec(t, e, n = null, i) {
2636
+ return b(t, e, n, i);
2637
+ }
2638
+ /**
2639
+ Build a serializer using the [`toDOM`](https://prosemirror.net/docs/ref/#model.NodeSpec.toDOM)
2640
+ properties in a schema's node and mark specs.
2641
+ */
2642
+ static fromSchema(t) {
2643
+ return t.cached.domSerializer || (t.cached.domSerializer = new ut(this.nodesFromSchema(t), this.marksFromSchema(t)));
2644
+ }
2645
+ /**
2646
+ Gather the serializers in a schema's node specs into an object.
2647
+ This can be useful as a base to build a custom serializer from.
2648
+ */
2649
+ static nodesFromSchema(t) {
2650
+ let e = Q(t.nodes);
2651
+ return e.text || (e.text = (n) => n.text), e;
2652
+ }
2653
+ /**
2654
+ Gather the serializers in a schema's mark specs into an object.
2655
+ */
2656
+ static marksFromSchema(t) {
2657
+ return Q(t.marks);
2658
+ }
2659
+ }
2660
+ function Q(l) {
2661
+ let t = {};
2662
+ for (let e in l) {
2663
+ let n = l[e].spec.toDOM;
2664
+ n && (t[e] = n);
2665
+ }
2666
+ return t;
2667
+ }
2668
+ function R(l) {
2669
+ return l.document || window.document;
2670
+ }
2671
+ const X = /* @__PURE__ */ new WeakMap();
2672
+ function Bt(l) {
2673
+ let t = X.get(l);
2674
+ return t === void 0 && X.set(l, t = Ft(l)), t;
2675
+ }
2676
+ function Ft(l) {
2677
+ let t = null;
2678
+ function e(n) {
2679
+ if (n && typeof n == "object")
2680
+ if (Array.isArray(n))
2681
+ if (typeof n[0] == "string")
2682
+ t || (t = []), t.push(n);
2683
+ else
2684
+ for (let i = 0; i < n.length; i++)
2685
+ e(n[i]);
2686
+ else
2687
+ for (let i in n)
2688
+ e(n[i]);
2689
+ }
2690
+ return e(l), t;
2691
+ }
2692
+ function b(l, t, e, n) {
2693
+ if (typeof t == "string")
2694
+ return { dom: l.createTextNode(t) };
2695
+ if (t.nodeType != null)
2696
+ return { dom: t };
2697
+ if (t.dom && t.dom.nodeType != null)
2698
+ return t;
2699
+ let i = t[0], r;
2700
+ if (typeof i != "string")
2701
+ throw new RangeError("Invalid array passed to renderSpec");
2702
+ if (n && (r = Bt(n)) && r.indexOf(t) > -1)
2703
+ throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");
2704
+ let s = i.indexOf(" ");
2705
+ s > 0 && (e = i.slice(0, s), i = i.slice(s + 1));
2706
+ let o, h = e ? l.createElementNS(e, i) : l.createElement(i), a = t[1], f = 1;
2707
+ if (a && typeof a == "object" && a.nodeType == null && !Array.isArray(a)) {
2708
+ f = 2;
2709
+ for (let p in a)
2710
+ if (a[p] != null) {
2711
+ let y = p.indexOf(" ");
2712
+ y > 0 ? h.setAttributeNS(p.slice(0, y), p.slice(y + 1), a[p]) : p == "style" && h.style ? h.style.cssText = a[p] : h.setAttribute(p, a[p]);
2713
+ }
2714
+ }
2715
+ for (let p = f; p < t.length; p++) {
2716
+ let y = t[p];
2717
+ if (y === 0) {
2718
+ if (p < t.length - 1 || p > f)
2719
+ throw new RangeError("Content hole must be the only child of its parent node");
2720
+ return { dom: h, contentDOM: h };
2721
+ } else {
2722
+ let { dom: pt, contentDOM: J } = b(l, y, e, n);
2723
+ if (h.appendChild(pt), J) {
2724
+ if (o)
2725
+ throw new RangeError("Multiple content holes");
2726
+ o = J;
2727
+ }
2728
+ }
2729
+ }
2730
+ return { dom: h, contentDOM: o };
2731
+ }
2732
+ export {
2733
+ w as ContentMatch,
2734
+ P as DOMParser,
2735
+ ut as DOMSerializer,
2736
+ c as Fragment,
2737
+ u as Mark,
2738
+ F as MarkType,
2739
+ g as Node,
2740
+ mt as NodeRange,
2741
+ v as NodeType,
2742
+ I as ReplaceError,
2743
+ E as ResolvedPos,
2744
+ qt as Schema,
2745
+ d as Slice
2746
+ };