@umbraco-cms/backoffice 15.2.2 → 15.3.0-rc

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 (2922) hide show
  1. package/dist-cms/apps/app/app.context.js +2 -0
  2. package/dist-cms/apps/app/network-connection-status.manager.d.ts +7 -0
  3. package/dist-cms/apps/app/network-connection-status.manager.js +39 -0
  4. package/dist-cms/apps/backoffice/backoffice.context.js +1 -0
  5. package/dist-cms/apps/backoffice/components/backoffice-main.element.js +1 -1
  6. package/dist-cms/assets/lang/bs.js +0 -2
  7. package/dist-cms/assets/lang/bs.ts +0 -3
  8. package/dist-cms/assets/lang/cs-cz.js +0 -2
  9. package/dist-cms/assets/lang/cs-cz.ts +0 -3
  10. package/dist-cms/assets/lang/cy-gb.js +0 -2
  11. package/dist-cms/assets/lang/cy-gb.ts +0 -3
  12. package/dist-cms/assets/lang/da-dk.js +57 -21
  13. package/dist-cms/assets/lang/da-dk.ts +57 -21
  14. package/dist-cms/assets/lang/de-de.js +0 -2
  15. package/dist-cms/assets/lang/de-de.ts +0 -3
  16. package/dist-cms/assets/lang/en-us.js +36 -7
  17. package/dist-cms/assets/lang/en-us.ts +37 -7
  18. package/dist-cms/assets/lang/en.js +93 -18
  19. package/dist-cms/assets/lang/en.ts +98 -20
  20. package/dist-cms/assets/lang/es-es.js +0 -2
  21. package/dist-cms/assets/lang/es-es.ts +0 -3
  22. package/dist-cms/assets/lang/fr-fr.js +0 -2
  23. package/dist-cms/assets/lang/fr-fr.ts +0 -3
  24. package/dist-cms/assets/lang/hr-hr.js +0 -2
  25. package/dist-cms/assets/lang/hr-hr.ts +0 -3
  26. package/dist-cms/assets/lang/it-it.js +0 -2
  27. package/dist-cms/assets/lang/it-it.ts +0 -3
  28. package/dist-cms/assets/lang/nb-no.js +1 -1
  29. package/dist-cms/assets/lang/nb-no.ts +41 -21
  30. package/dist-cms/assets/lang/nl-nl.js +0 -2
  31. package/dist-cms/assets/lang/nl-nl.ts +0 -3
  32. package/dist-cms/assets/lang/ru-ru.js +0 -2
  33. package/dist-cms/assets/lang/ru-ru.ts +0 -3
  34. package/dist-cms/assets/lang/tr-tr.js +0 -2
  35. package/dist-cms/assets/lang/tr-tr.ts +0 -3
  36. package/dist-cms/assets/lang/uk-ua.js +0 -2
  37. package/dist-cms/assets/lang/uk-ua.ts +0 -3
  38. package/dist-cms/custom-elements.json +1013 -308
  39. package/dist-cms/external/backend-api/index.js +1 -1
  40. package/dist-cms/external/backend-api/src/sdk.gen.d.ts +13 -1
  41. package/dist-cms/external/backend-api/src/types.gen.d.ts +41 -1
  42. package/dist-cms/external/base64-js/index.d.ts +19 -1
  43. package/dist-cms/external/base64-js/index.js +1 -1
  44. package/dist-cms/external/diff/index.js +1 -1
  45. package/dist-cms/external/dompurify/index.js +2 -2
  46. package/dist-cms/external/lit/index.js +30 -30
  47. package/dist-cms/external/marked/index.js +18 -18
  48. package/dist-cms/external/monaco-editor/cssMode-CUXEefSS.js +9 -0
  49. package/dist-cms/external/monaco-editor/freemarker2-DzwWvbKB.js +8 -0
  50. package/dist-cms/external/monaco-editor/handlebars-CemuYN_Z.js +6 -0
  51. package/dist-cms/external/monaco-editor/html-D4e50Vly.js +6 -0
  52. package/dist-cms/external/monaco-editor/htmlMode-CgKTZMjM.js +9 -0
  53. package/dist-cms/external/monaco-editor/index-Def4N_V2.js +1155 -0
  54. package/dist-cms/external/monaco-editor/index.js +1 -1
  55. package/dist-cms/external/monaco-editor/javascript-yQGGFsNP.js +6 -0
  56. package/dist-cms/external/monaco-editor/jsonMode-8iHkAe7E.js +15 -0
  57. package/dist-cms/external/monaco-editor/liquid-DGgcY_1I.js +6 -0
  58. package/dist-cms/external/monaco-editor/mdx-DqMkUct3.js +6 -0
  59. package/dist-cms/external/monaco-editor/python-CCzWdJbb.js +6 -0
  60. package/dist-cms/external/monaco-editor/razor-CI9Hqcx_.js +6 -0
  61. package/dist-cms/external/monaco-editor/tsMode-BtpWVR7g.js +16 -0
  62. package/dist-cms/external/monaco-editor/typescript-M3dWBSCy.js +6 -0
  63. package/dist-cms/external/monaco-editor/xml-DQw1AQuz.js +6 -0
  64. package/dist-cms/external/monaco-editor/yaml-Ds0726bJ.js +6 -0
  65. package/dist-cms/external/openid/index.js +2 -2
  66. package/dist-cms/external/rxjs/index.js +3 -3
  67. package/dist-cms/external/tinymce/index.d.ts +9 -9
  68. package/dist-cms/external/tinymce/index.js +22 -22
  69. package/dist-cms/external/tiptap/extensions/tiptap-div.extension.d.ts +10 -0
  70. package/dist-cms/external/tiptap/extensions/tiptap-html-global-attributes.extension.d.ts +10 -0
  71. package/dist-cms/external/tiptap/extensions/tiptap-span.extension.d.ts +17 -0
  72. package/dist-cms/external/tiptap/extensions/tiptap-text-direction-extension.d.ts +14 -0
  73. package/dist-cms/external/tiptap/extensions/tiptap-trailing-node.extension.d.ts +6 -0
  74. package/dist-cms/external/tiptap/extensions/tiptap-umb-table.extension.d.ts +13 -0
  75. package/dist-cms/external/tiptap/index.d.ts +7 -1
  76. package/dist-cms/external/tiptap/index.js +19 -19
  77. package/dist-cms/external/uui/index.js +249 -249
  78. package/dist-cms/libs/extension-api/controller/base-extensions-initializer.controller.js +1 -0
  79. package/dist-cms/libs/extension-api/functions/create-extension-api.function.d.ts +4 -4
  80. package/dist-cms/libs/extension-api/functions/create-extension-api.function.js +4 -4
  81. package/dist-cms/libs/extension-api/registry/extension.registry.js +3 -1
  82. package/dist-cms/libs/localization-api/localization.controller.d.ts +32 -9
  83. package/dist-cms/libs/localization-api/localization.controller.js +64 -8
  84. package/dist-cms/libs/observable-api/utils/append-to-frozen-array.function.d.ts +1 -2
  85. package/dist-cms/libs/observable-api/utils/append-to-frozen-array.function.js +1 -2
  86. package/dist-cms/libs/observable-api/utils/partial-update-frozen-array.function.d.ts +4 -3
  87. package/dist-cms/libs/observable-api/utils/partial-update-frozen-array.function.js +4 -3
  88. package/dist-cms/mocks/data/data-type/data-type.data.js +139 -5
  89. package/dist-cms/mocks/data/document/document-publishing.manager.js +35 -8
  90. package/dist-cms/mocks/data/document/document.data.js +27 -1
  91. package/dist-cms/mocks/data/document/document.db.js +2 -0
  92. package/dist-cms/mocks/data/media/media.data.js +28 -16
  93. package/dist-cms/mocks/data/media-type/media-type.data.d.ts +1 -0
  94. package/dist-cms/mocks/data/media-type/media-type.data.js +8 -8
  95. package/dist-cms/mocks/data/media-type/media-type.db.d.ts +2 -1
  96. package/dist-cms/mocks/data/media-type/media-type.db.js +24 -0
  97. package/dist-cms/mocks/data/tracked-reference.data.js +4 -0
  98. package/dist-cms/mocks/handlers/document/detail.handlers.js +6 -0
  99. package/dist-cms/mocks/handlers/document/publishing.handlers.js +11 -2
  100. package/dist-cms/mocks/handlers/media/detail.handlers.js +15 -0
  101. package/dist-cms/mocks/handlers/media/imaging.handlers.d.ts +1 -0
  102. package/dist-cms/mocks/handlers/media/imaging.handlers.js +18 -0
  103. package/dist-cms/mocks/handlers/media/index.js +2 -0
  104. package/dist-cms/mocks/handlers/media/tree.handlers.js +7 -0
  105. package/dist-cms/mocks/handlers/media-type/item.handlers.js +7 -0
  106. package/dist-cms/mocks/handlers/temporary-file/temporary-file.handlers.js +10 -1
  107. package/dist-cms/packages/block/block/context/block-entry.context.d.ts +8 -7
  108. package/dist-cms/packages/block/block/context/block-entry.context.js +42 -35
  109. package/dist-cms/packages/block/block/context/block-manager.context.d.ts +16 -9
  110. package/dist-cms/packages/block/block/context/block-manager.context.js +83 -20
  111. package/dist-cms/packages/block/block/validation/block-element-data-validation-path-translator.controller.js +1 -1
  112. package/dist-cms/packages/block/block/workspace/block-element-manager.js +2 -4
  113. package/dist-cms/packages/block/block/workspace/block-workspace.context.js +58 -52
  114. package/dist-cms/packages/block/block-custom-view/types.d.ts +1 -0
  115. package/dist-cms/packages/block/block-grid/components/block-grid-block/block-grid-block.element.js +1 -1
  116. package/dist-cms/packages/block/block-grid/components/block-grid-block-inline/block-grid-block-inline.element.js +2 -2
  117. package/dist-cms/packages/block/block-grid/components/block-grid-block-unsupported/block-grid-block-unsupported.element.d.ts +14 -0
  118. package/dist-cms/packages/block/block-grid/components/block-grid-block-unsupported/block-grid-block-unsupported.element.js +157 -0
  119. package/dist-cms/packages/block/block-grid/components/block-grid-block-unsupported/index.d.ts +1 -0
  120. package/dist-cms/packages/block/block-grid/components/block-grid-block-unsupported/index.js +1 -0
  121. package/dist-cms/packages/block/block-grid/components/block-grid-entries/block-grid-entries.element.js +20 -1
  122. package/dist-cms/packages/block/block-grid/components/block-grid-entry/block-grid-entry.element.d.ts +4 -0
  123. package/dist-cms/packages/block/block-grid/components/block-grid-entry/block-grid-entry.element.js +79 -32
  124. package/dist-cms/packages/block/block-grid/context/block-grid-entries.context.d.ts +8 -1
  125. package/dist-cms/packages/block/block-grid/context/block-grid-entries.context.js +41 -3
  126. package/dist-cms/packages/block/block-grid/context/block-grid-entry.context.d.ts +1 -0
  127. package/dist-cms/packages/block/block-grid/context/block-grid-entry.context.js +10 -0
  128. package/dist-cms/packages/block/block-grid/context/block-grid-manager.context.d.ts +8 -4
  129. package/dist-cms/packages/block/block-grid/context/block-grid-manager.context.js +31 -15
  130. package/dist-cms/packages/block/block-grid/property-editors/block-grid-area-type-permission/block-grid-area-type-permission.element.d.ts +2 -1
  131. package/dist-cms/packages/block/block-grid/property-editors/block-grid-area-type-permission/block-grid-area-type-permission.element.js +4 -1
  132. package/dist-cms/packages/block/block-grid/property-editors/block-grid-editor/property-editor-ui-block-grid.element.d.ts +0 -1
  133. package/dist-cms/packages/block/block-grid/property-editors/block-grid-editor/property-editor-ui-block-grid.element.js +16 -20
  134. package/dist-cms/packages/block/block-grid/property-editors/block-grid-type-configuration/property-editor-ui-block-grid-type-configuration.element.js +1 -1
  135. package/dist-cms/packages/block/block-grid/types.d.ts +1 -1
  136. package/dist-cms/packages/block/block-list/components/block-list-entry/block-list-entry.element.d.ts +3 -1
  137. package/dist-cms/packages/block/block-list/components/block-list-entry/block-list-entry.element.js +38 -4
  138. package/dist-cms/packages/block/block-list/components/inline-list-block/inline-list-block.element.js +3 -2
  139. package/dist-cms/packages/block/block-list/components/unsupported-list-block/index.d.ts +1 -0
  140. package/dist-cms/packages/block/block-list/components/unsupported-list-block/index.js +1 -0
  141. package/dist-cms/packages/block/block-list/components/unsupported-list-block/unsupported-list-block.element.d.ts +15 -0
  142. package/dist-cms/packages/block/block-list/components/unsupported-list-block/unsupported-list-block.element.js +158 -0
  143. package/dist-cms/packages/block/block-list/context/block-list-entries.context.d.ts +1 -1
  144. package/dist-cms/packages/block/block-list/context/block-list-entries.context.js +1 -1
  145. package/dist-cms/packages/block/block-list/context/block-list-manager.context.d.ts +8 -4
  146. package/dist-cms/packages/block/block-list/context/block-list-manager.context.js +16 -2
  147. package/dist-cms/packages/block/block-list/property-editors/block-list-editor/Umbraco.BlockList.js +1 -1
  148. package/dist-cms/packages/block/block-list/property-editors/block-list-editor/property-editor-ui-block-list.element.d.ts +2 -1
  149. package/dist-cms/packages/block/block-list/property-editors/block-list-editor/property-editor-ui-block-list.element.js +95 -87
  150. package/dist-cms/packages/block/block-rte/components/block-rte-entry/block-rte-entry.element.d.ts +3 -2
  151. package/dist-cms/packages/block/block-rte/components/block-rte-entry/block-rte-entry.element.js +22 -20
  152. package/dist-cms/packages/block/block-rte/context/block-rte-entries.context.d.ts +1 -1
  153. package/dist-cms/packages/block/block-rte/context/block-rte-entries.context.js +1 -1
  154. package/dist-cms/packages/block/block-rte/context/block-rte-manager.context.d.ts +8 -4
  155. package/dist-cms/packages/block/block-rte/context/block-rte-manager.context.js +16 -2
  156. package/dist-cms/packages/block/block-rte/property-value-cloner/property-value-cloner-block-rte.cloner.d.ts +3 -3
  157. package/dist-cms/packages/block/block-type/components/block-type-card/block-type-card.element.js +10 -4
  158. package/dist-cms/packages/block/block-type/workspace/block-type-workspace-editor.element.js +1 -1
  159. package/dist-cms/packages/clipboard/property/value-translator/paste/clipboard-paste-translator-value-resolver.js +1 -0
  160. package/dist-cms/packages/code-editor/code-editor-modal/code-editor-modal.element.d.ts +1 -2
  161. package/dist-cms/packages/code-editor/code-editor-modal/code-editor-modal.element.js +23 -16
  162. package/dist-cms/packages/code-editor/code-editor-modal/code-editor-modal.token.d.ts +1 -0
  163. package/dist-cms/packages/core/auth/modals/umb-app-auth-modal.element.js +1 -1
  164. package/dist-cms/packages/core/collection/action/collection-action-base.d.ts +14 -0
  165. package/dist-cms/packages/core/collection/action/collection-action-button.element.d.ts +4 -2
  166. package/dist-cms/packages/core/collection/action/collection-action-button.element.js +41 -37
  167. package/dist-cms/packages/core/collection/action/manifests.js +13 -1
  168. package/dist-cms/packages/core/collection/collection-view.manager.js +5 -2
  169. package/dist-cms/packages/core/collection/collection.element.d.ts +6 -3
  170. package/dist-cms/packages/core/collection/collection.element.js +19 -0
  171. package/dist-cms/packages/core/collection/components/date-table-column-view/date-table-column-view.element.d.ts +11 -0
  172. package/dist-cms/packages/core/collection/components/date-table-column-view/date-table-column-view.element.js +23 -0
  173. package/dist-cms/packages/core/collection/components/index.d.ts +1 -0
  174. package/dist-cms/packages/core/collection/components/index.js +1 -0
  175. package/dist-cms/packages/core/collection/extensions/collection-action.extension.d.ts +4 -1
  176. package/dist-cms/packages/core/collection/index.d.ts +1 -0
  177. package/dist-cms/packages/core/collection/index.js +1 -0
  178. package/dist-cms/packages/core/collection/workspace-view/collection-workspace-view.element.d.ts +4 -2
  179. package/dist-cms/packages/core/collection/workspace-view/collection-workspace-view.element.js +12 -4
  180. package/dist-cms/packages/core/components/code-block/code-block.element.js +0 -1
  181. package/dist-cms/packages/core/components/entity-actions-bundle/entity-actions-bundle.element.d.ts +1 -0
  182. package/dist-cms/packages/core/components/entity-actions-bundle/entity-actions-bundle.element.js +11 -2
  183. package/dist-cms/packages/core/components/input-collection-configuration/input-collection-configuration.element.js +1 -1
  184. package/dist-cms/packages/core/components/input-date/input-date.element.d.ts +10 -22
  185. package/dist-cms/packages/core/components/input-date/input-date.element.js +16 -55
  186. package/dist-cms/packages/core/components/input-number-range/input-number-range.element.js +1 -1
  187. package/dist-cms/packages/core/components/input-slider/input-slider.element.d.ts +1 -0
  188. package/dist-cms/packages/core/components/input-slider/input-slider.element.js +6 -0
  189. package/dist-cms/packages/core/components/input-toggle/input-toggle.element.d.ts +9 -4
  190. package/dist-cms/packages/core/components/input-toggle/input-toggle.element.js +21 -15
  191. package/dist-cms/packages/core/components/ref-item/ref-item.element.d.ts +1 -1
  192. package/dist-cms/packages/core/components/ref-item/ref-item.element.js +6 -4
  193. package/dist-cms/packages/core/content/manager/content-data-manager.d.ts +1 -0
  194. package/dist-cms/packages/core/content/manager/content-data-manager.js +18 -5
  195. package/dist-cms/packages/core/content/manager/element-data-manager.d.ts +1 -0
  196. package/dist-cms/packages/core/content/manager/element-data-manager.js +20 -4
  197. package/dist-cms/packages/core/content/workspace/content-detail-workspace-base.d.ts +6 -3
  198. package/dist-cms/packages/core/content/workspace/content-detail-workspace-base.js +88 -19
  199. package/dist-cms/packages/core/content/workspace/views/edit/content-editor.element.js +23 -23
  200. package/dist-cms/packages/core/content-type/structure/content-type-move-root-containers-into-first-tab-helper.class.js +7 -9
  201. package/dist-cms/packages/core/content-type/structure/content-type-structure-manager.class.d.ts +5 -7
  202. package/dist-cms/packages/core/content-type/structure/content-type-structure-manager.class.js +40 -14
  203. package/dist-cms/packages/core/content-type/workspace/content-type-workspace-context-base.d.ts +2 -2
  204. package/dist-cms/packages/core/content-type/workspace/content-type-workspace-context-base.js +25 -13
  205. package/dist-cms/packages/core/content-type/workspace/views/design/content-type-design-editor-group.element.js +55 -4
  206. package/dist-cms/packages/core/content-type/workspace/views/design/content-type-design-editor-tab.element.js +3 -10
  207. package/dist-cms/packages/core/content-type/workspace/views/design/content-type-design-editor.element.js +8 -2
  208. package/dist-cms/packages/core/culture/manifests.d.ts +1 -1
  209. package/dist-cms/packages/core/entity-action/common/constants.d.ts +1 -0
  210. package/dist-cms/packages/core/entity-action/common/constants.js +1 -0
  211. package/dist-cms/packages/core/entity-action/common/create/create.action.d.ts +1 -0
  212. package/dist-cms/packages/core/entity-action/common/create/create.action.js +37 -16
  213. package/dist-cms/packages/core/entity-action/common/delete/constants.d.ts +1 -0
  214. package/dist-cms/packages/core/entity-action/common/delete/constants.js +1 -0
  215. package/dist-cms/packages/core/entity-action/common/delete/delete.action.d.ts +2 -1
  216. package/dist-cms/packages/core/entity-action/common/delete/delete.action.js +19 -7
  217. package/dist-cms/packages/core/entity-action/common/delete/delete.action.kind.d.ts +1 -0
  218. package/dist-cms/packages/core/entity-action/common/delete/delete.action.kind.js +2 -1
  219. package/dist-cms/packages/core/entity-action/common/types.d.ts +1 -0
  220. package/dist-cms/packages/core/entity-action/default/entity-action.element.js +1 -1
  221. package/dist-cms/packages/core/entity-action/entity-action.event.d.ts +2 -0
  222. package/dist-cms/packages/core/entity-action/entity-action.event.js +3 -0
  223. package/dist-cms/packages/core/entity-action/entity-deleted.event.d.ts +6 -0
  224. package/dist-cms/packages/core/entity-action/entity-deleted.event.js +7 -0
  225. package/dist-cms/packages/core/entity-action/entity-updated.event.d.ts +6 -0
  226. package/dist-cms/packages/core/entity-action/entity-updated.event.js +7 -0
  227. package/dist-cms/packages/core/entity-action/global-components/entity-actions-table-column-view/entity-actions-table-column-view.element.d.ts +0 -1
  228. package/dist-cms/packages/core/entity-action/global-components/entity-actions-table-column-view/entity-actions-table-column-view.element.js +2 -13
  229. package/dist-cms/packages/core/entity-action/index.d.ts +2 -0
  230. package/dist-cms/packages/core/entity-action/index.js +2 -0
  231. package/dist-cms/packages/core/entity-action/types.d.ts +1 -0
  232. package/dist-cms/packages/core/entity-bulk-action/common/bulk-delete/bulk-delete.action.d.ts +9 -0
  233. package/dist-cms/packages/core/entity-bulk-action/common/bulk-delete/bulk-delete.action.js +89 -0
  234. package/dist-cms/packages/core/entity-bulk-action/common/bulk-delete/bulk-delete.action.kind.d.ts +4 -0
  235. package/dist-cms/packages/core/entity-bulk-action/common/bulk-delete/bulk-delete.action.kind.js +20 -0
  236. package/dist-cms/packages/core/entity-bulk-action/common/bulk-delete/constants.d.ts +1 -0
  237. package/dist-cms/packages/core/entity-bulk-action/common/bulk-delete/constants.js +1 -0
  238. package/dist-cms/packages/core/entity-bulk-action/common/bulk-delete/index.d.ts +2 -0
  239. package/dist-cms/packages/core/entity-bulk-action/common/bulk-delete/index.js +1 -0
  240. package/dist-cms/packages/core/entity-bulk-action/common/bulk-delete/manifests.d.ts +2 -0
  241. package/dist-cms/packages/core/entity-bulk-action/common/bulk-delete/manifests.js +2 -0
  242. package/dist-cms/packages/core/entity-bulk-action/common/bulk-delete/types.d.ts +14 -0
  243. package/dist-cms/packages/core/entity-bulk-action/common/trash/constants.d.ts +1 -0
  244. package/dist-cms/packages/core/entity-bulk-action/common/trash/constants.js +1 -0
  245. package/dist-cms/packages/core/entity-bulk-action/common/trash/trash-repository.interface.d.ts +6 -0
  246. package/dist-cms/packages/core/entity-bulk-action/common/trash/trash.action.d.ts +9 -1
  247. package/dist-cms/packages/core/entity-bulk-action/common/trash/trash.action.js +15 -0
  248. package/dist-cms/packages/core/entity-bulk-action/common/trash/trash.action.kind.js +3 -2
  249. package/dist-cms/packages/core/entity-bulk-action/common/types.d.ts +4 -0
  250. package/dist-cms/packages/core/entity-bulk-action/index.d.ts +3 -3
  251. package/dist-cms/packages/core/entity-bulk-action/index.js +3 -0
  252. package/dist-cms/packages/core/entity-bulk-action/manifests.js +2 -0
  253. package/dist-cms/packages/core/entity-bulk-action/types.d.ts +3 -0
  254. package/dist-cms/packages/core/entity-item/entity-item-ref/default-item-ref.element.d.ts +14 -0
  255. package/dist-cms/packages/core/entity-item/entity-item-ref/default-item-ref.element.js +39 -0
  256. package/dist-cms/packages/core/entity-item/entity-item-ref/entity-item-ref.element.d.ts +23 -0
  257. package/dist-cms/packages/core/entity-item/entity-item-ref/entity-item-ref.element.js +109 -0
  258. package/dist-cms/packages/core/entity-item/entity-item-ref/entity-item-ref.extension.d.ts +13 -0
  259. package/dist-cms/packages/core/entity-item/entity-item-ref/global-components.d.ts +1 -0
  260. package/dist-cms/packages/core/entity-item/entity-item-ref/global-components.js +1 -0
  261. package/dist-cms/packages/core/entity-item/entity-item-ref/index.d.ts +1 -0
  262. package/dist-cms/packages/core/entity-item/entity-item-ref/index.js +1 -0
  263. package/dist-cms/packages/core/entity-item/entity-item-ref/types.d.ts +1 -0
  264. package/dist-cms/packages/core/entity-item/global-components.d.ts +1 -0
  265. package/dist-cms/packages/core/entity-item/global-components.js +1 -0
  266. package/dist-cms/packages/core/entity-item/index.d.ts +1 -0
  267. package/dist-cms/packages/core/entity-item/index.js +1 -0
  268. package/dist-cms/packages/core/entity-item/types.d.ts +4 -0
  269. package/dist-cms/packages/core/entry-point.d.ts +1 -0
  270. package/dist-cms/packages/core/entry-point.js +1 -0
  271. package/dist-cms/packages/core/extension-registry/extensions/entity-bulk-action.extension.d.ts +1 -1
  272. package/dist-cms/packages/core/icon-registry/icon-dictionary.json +15 -1
  273. package/dist-cms/packages/core/icon-registry/icon-registry.context.js +1 -1
  274. package/dist-cms/packages/core/icon-registry/icons/icon-activity.d.ts +1 -1
  275. package/dist-cms/packages/core/icon-registry/icons/icon-activity.js +1 -14
  276. package/dist-cms/packages/core/icon-registry/icons/icon-add.d.ts +1 -1
  277. package/dist-cms/packages/core/icon-registry/icons/icon-add.js +1 -15
  278. package/dist-cms/packages/core/icon-registry/icons/icon-addressbook.d.ts +1 -1
  279. package/dist-cms/packages/core/icon-registry/icons/icon-addressbook.js +1 -16
  280. package/dist-cms/packages/core/icon-registry/icons/icon-alarm-clock.d.ts +1 -1
  281. package/dist-cms/packages/core/icon-registry/icons/icon-alarm-clock.js +1 -19
  282. package/dist-cms/packages/core/icon-registry/icons/icon-alert-alt.d.ts +1 -1
  283. package/dist-cms/packages/core/icon-registry/icons/icon-alert-alt.js +1 -16
  284. package/dist-cms/packages/core/icon-registry/icons/icon-alert.d.ts +1 -1
  285. package/dist-cms/packages/core/icon-registry/icons/icon-alert.js +1 -16
  286. package/dist-cms/packages/core/icon-registry/icons/icon-alt.d.ts +1 -1
  287. package/dist-cms/packages/core/icon-registry/icons/icon-alt.js +1 -15
  288. package/dist-cms/packages/core/icon-registry/icons/icon-anchor.d.ts +1 -1
  289. package/dist-cms/packages/core/icon-registry/icons/icon-anchor.js +1 -16
  290. package/dist-cms/packages/core/icon-registry/icons/icon-app.d.ts +1 -1
  291. package/dist-cms/packages/core/icon-registry/icons/icon-app.js +1 -17
  292. package/dist-cms/packages/core/icon-registry/icons/icon-application-error.d.ts +1 -1
  293. package/dist-cms/packages/core/icon-registry/icons/icon-application-error.js +1 -16
  294. package/dist-cms/packages/core/icon-registry/icons/icon-application-window-alt.d.ts +1 -1
  295. package/dist-cms/packages/core/icon-registry/icons/icon-application-window-alt.js +1 -17
  296. package/dist-cms/packages/core/icon-registry/icons/icon-application-window.d.ts +1 -1
  297. package/dist-cms/packages/core/icon-registry/icons/icon-application-window.js +1 -17
  298. package/dist-cms/packages/core/icon-registry/icons/icon-arrivals.d.ts +1 -1
  299. package/dist-cms/packages/core/icon-registry/icons/icon-arrivals.js +1 -15
  300. package/dist-cms/packages/core/icon-registry/icons/icon-arrow-down.d.ts +1 -1
  301. package/dist-cms/packages/core/icon-registry/icons/icon-arrow-down.js +1 -15
  302. package/dist-cms/packages/core/icon-registry/icons/icon-arrow-left.d.ts +1 -1
  303. package/dist-cms/packages/core/icon-registry/icons/icon-arrow-left.js +1 -15
  304. package/dist-cms/packages/core/icon-registry/icons/icon-arrow-right.d.ts +1 -1
  305. package/dist-cms/packages/core/icon-registry/icons/icon-arrow-right.js +1 -15
  306. package/dist-cms/packages/core/icon-registry/icons/icon-arrow-up.d.ts +1 -1
  307. package/dist-cms/packages/core/icon-registry/icons/icon-arrow-up.js +1 -15
  308. package/dist-cms/packages/core/icon-registry/icons/icon-art-easel.d.ts +1 -1
  309. package/dist-cms/packages/core/icon-registry/icons/icon-art-easel.js +1 -1
  310. package/dist-cms/packages/core/icon-registry/icons/icon-article.d.ts +1 -1
  311. package/dist-cms/packages/core/icon-registry/icons/icon-article.js +1 -1
  312. package/dist-cms/packages/core/icon-registry/icons/icon-attachment.d.ts +1 -1
  313. package/dist-cms/packages/core/icon-registry/icons/icon-attachment.js +1 -15
  314. package/dist-cms/packages/core/icon-registry/icons/icon-auction-hammer.d.ts +1 -1
  315. package/dist-cms/packages/core/icon-registry/icons/icon-auction-hammer.js +1 -1
  316. package/dist-cms/packages/core/icon-registry/icons/icon-audio-lines.d.ts +1 -1
  317. package/dist-cms/packages/core/icon-registry/icons/icon-audio-lines.js +1 -19
  318. package/dist-cms/packages/core/icon-registry/icons/icon-autofill.d.ts +1 -1
  319. package/dist-cms/packages/core/icon-registry/icons/icon-autofill.js +1 -18
  320. package/dist-cms/packages/core/icon-registry/icons/icon-award.d.ts +1 -1
  321. package/dist-cms/packages/core/icon-registry/icons/icon-award.js +1 -15
  322. package/dist-cms/packages/core/icon-registry/icons/icon-axis-rotation-2.d.ts +1 -1
  323. package/dist-cms/packages/core/icon-registry/icons/icon-axis-rotation-2.js +1 -17
  324. package/dist-cms/packages/core/icon-registry/icons/icon-axis-rotation-3.d.ts +1 -1
  325. package/dist-cms/packages/core/icon-registry/icons/icon-axis-rotation-3.js +1 -17
  326. package/dist-cms/packages/core/icon-registry/icons/icon-axis-rotation.d.ts +1 -1
  327. package/dist-cms/packages/core/icon-registry/icons/icon-axis-rotation.js +1 -17
  328. package/dist-cms/packages/core/icon-registry/icons/icon-azure.d.ts +1 -1
  329. package/dist-cms/packages/core/icon-registry/icons/icon-azure.js +1 -6
  330. package/dist-cms/packages/core/icon-registry/icons/icon-baby-stroller.d.ts +1 -1
  331. package/dist-cms/packages/core/icon-registry/icons/icon-baby-stroller.js +1 -1
  332. package/dist-cms/packages/core/icon-registry/icons/icon-backspace.d.ts +1 -1
  333. package/dist-cms/packages/core/icon-registry/icons/icon-backspace.js +1 -16
  334. package/dist-cms/packages/core/icon-registry/icons/icon-badge-add.d.ts +1 -1
  335. package/dist-cms/packages/core/icon-registry/icons/icon-badge-add.js +1 -16
  336. package/dist-cms/packages/core/icon-registry/icons/icon-badge-count.d.ts +1 -1
  337. package/dist-cms/packages/core/icon-registry/icons/icon-badge-count.js +1 -1
  338. package/dist-cms/packages/core/icon-registry/icons/icon-badge-remove.d.ts +1 -1
  339. package/dist-cms/packages/core/icon-registry/icons/icon-badge-remove.js +1 -15
  340. package/dist-cms/packages/core/icon-registry/icons/icon-badge-restricted.d.ts +1 -1
  341. package/dist-cms/packages/core/icon-registry/icons/icon-badge-restricted.js +1 -15
  342. package/dist-cms/packages/core/icon-registry/icons/icon-ball.d.ts +1 -1
  343. package/dist-cms/packages/core/icon-registry/icons/icon-ball.js +1 -17
  344. package/dist-cms/packages/core/icon-registry/icons/icon-band-aid.d.ts +1 -1
  345. package/dist-cms/packages/core/icon-registry/icons/icon-band-aid.js +1 -1
  346. package/dist-cms/packages/core/icon-registry/icons/icon-bar-chart.d.ts +1 -1
  347. package/dist-cms/packages/core/icon-registry/icons/icon-bar-chart.js +1 -16
  348. package/dist-cms/packages/core/icon-registry/icons/icon-barcode.d.ts +1 -1
  349. package/dist-cms/packages/core/icon-registry/icons/icon-barcode.js +1 -20
  350. package/dist-cms/packages/core/icon-registry/icons/icon-bars.d.ts +1 -1
  351. package/dist-cms/packages/core/icon-registry/icons/icon-bars.js +1 -16
  352. package/dist-cms/packages/core/icon-registry/icons/icon-battery-full.d.ts +1 -1
  353. package/dist-cms/packages/core/icon-registry/icons/icon-battery-full.js +1 -18
  354. package/dist-cms/packages/core/icon-registry/icons/icon-battery-low.d.ts +1 -1
  355. package/dist-cms/packages/core/icon-registry/icons/icon-battery-low.js +1 -16
  356. package/dist-cms/packages/core/icon-registry/icons/icon-beer-glass.d.ts +1 -1
  357. package/dist-cms/packages/core/icon-registry/icons/icon-beer-glass.js +1 -18
  358. package/dist-cms/packages/core/icon-registry/icons/icon-bell-off.d.ts +1 -1
  359. package/dist-cms/packages/core/icon-registry/icons/icon-bell-off.js +1 -17
  360. package/dist-cms/packages/core/icon-registry/icons/icon-bell.d.ts +1 -1
  361. package/dist-cms/packages/core/icon-registry/icons/icon-bell.js +1 -15
  362. package/dist-cms/packages/core/icon-registry/icons/icon-bill-dollar.d.ts +1 -1
  363. package/dist-cms/packages/core/icon-registry/icons/icon-bill-dollar.js +1 -1
  364. package/dist-cms/packages/core/icon-registry/icons/icon-bill-euro.d.ts +1 -1
  365. package/dist-cms/packages/core/icon-registry/icons/icon-bill-euro.js +1 -1
  366. package/dist-cms/packages/core/icon-registry/icons/icon-bill-pound.d.ts +1 -1
  367. package/dist-cms/packages/core/icon-registry/icons/icon-bill-pound.js +1 -1
  368. package/dist-cms/packages/core/icon-registry/icons/icon-bill-yen.d.ts +1 -1
  369. package/dist-cms/packages/core/icon-registry/icons/icon-bill-yen.js +1 -1
  370. package/dist-cms/packages/core/icon-registry/icons/icon-bill.d.ts +1 -1
  371. package/dist-cms/packages/core/icon-registry/icons/icon-bill.js +1 -1
  372. package/dist-cms/packages/core/icon-registry/icons/icon-billboard.d.ts +1 -1
  373. package/dist-cms/packages/core/icon-registry/icons/icon-billboard.js +1 -1
  374. package/dist-cms/packages/core/icon-registry/icons/icon-bills-dollar.d.ts +1 -1
  375. package/dist-cms/packages/core/icon-registry/icons/icon-bills-dollar.js +1 -1
  376. package/dist-cms/packages/core/icon-registry/icons/icon-bills-euro.d.ts +1 -1
  377. package/dist-cms/packages/core/icon-registry/icons/icon-bills-euro.js +1 -1
  378. package/dist-cms/packages/core/icon-registry/icons/icon-bills-pound.d.ts +1 -1
  379. package/dist-cms/packages/core/icon-registry/icons/icon-bills-pound.js +1 -1
  380. package/dist-cms/packages/core/icon-registry/icons/icon-bills-yen.d.ts +1 -1
  381. package/dist-cms/packages/core/icon-registry/icons/icon-bills-yen.js +1 -1
  382. package/dist-cms/packages/core/icon-registry/icons/icon-bills.d.ts +1 -1
  383. package/dist-cms/packages/core/icon-registry/icons/icon-bills.js +1 -1
  384. package/dist-cms/packages/core/icon-registry/icons/icon-binarycode.d.ts +1 -1
  385. package/dist-cms/packages/core/icon-registry/icons/icon-binarycode.js +1 -19
  386. package/dist-cms/packages/core/icon-registry/icons/icon-binoculars.d.ts +1 -1
  387. package/dist-cms/packages/core/icon-registry/icons/icon-binoculars.js +1 -19
  388. package/dist-cms/packages/core/icon-registry/icons/icon-bird.d.ts +1 -1
  389. package/dist-cms/packages/core/icon-registry/icons/icon-bird.js +1 -19
  390. package/dist-cms/packages/core/icon-registry/icons/icon-birthday-cake.d.ts +1 -1
  391. package/dist-cms/packages/core/icon-registry/icons/icon-birthday-cake.js +1 -22
  392. package/dist-cms/packages/core/icon-registry/icons/icon-block.d.ts +1 -1
  393. package/dist-cms/packages/core/icon-registry/icons/icon-block.js +1 -15
  394. package/dist-cms/packages/core/icon-registry/icons/icon-blockquote.d.ts +1 -1
  395. package/dist-cms/packages/core/icon-registry/icons/icon-blockquote.js +1 -17
  396. package/dist-cms/packages/core/icon-registry/icons/icon-blueprint.d.ts +1 -1
  397. package/dist-cms/packages/core/icon-registry/icons/icon-blueprint.js +1 -1
  398. package/dist-cms/packages/core/icon-registry/icons/icon-bluetooth.d.ts +1 -1
  399. package/dist-cms/packages/core/icon-registry/icons/icon-bluetooth.js +1 -14
  400. package/dist-cms/packages/core/icon-registry/icons/icon-boat-shipping.d.ts +1 -1
  401. package/dist-cms/packages/core/icon-registry/icons/icon-boat-shipping.js +1 -18
  402. package/dist-cms/packages/core/icon-registry/icons/icon-bold.d.ts +1 -1
  403. package/dist-cms/packages/core/icon-registry/icons/icon-bold.js +1 -14
  404. package/dist-cms/packages/core/icon-registry/icons/icon-bomb.d.ts +1 -1
  405. package/dist-cms/packages/core/icon-registry/icons/icon-bomb.js +1 -1
  406. package/dist-cms/packages/core/icon-registry/icons/icon-bones.d.ts +1 -1
  407. package/dist-cms/packages/core/icon-registry/icons/icon-bones.js +1 -14
  408. package/dist-cms/packages/core/icon-registry/icons/icon-book-alt-2.d.ts +1 -1
  409. package/dist-cms/packages/core/icon-registry/icons/icon-book-alt-2.js +1 -19
  410. package/dist-cms/packages/core/icon-registry/icons/icon-book-alt.d.ts +1 -1
  411. package/dist-cms/packages/core/icon-registry/icons/icon-book-alt.js +1 -15
  412. package/dist-cms/packages/core/icon-registry/icons/icon-book.d.ts +1 -1
  413. package/dist-cms/packages/core/icon-registry/icons/icon-book.js +1 -16
  414. package/dist-cms/packages/core/icon-registry/icons/icon-bookmark.d.ts +1 -1
  415. package/dist-cms/packages/core/icon-registry/icons/icon-bookmark.js +1 -14
  416. package/dist-cms/packages/core/icon-registry/icons/icon-books.d.ts +1 -1
  417. package/dist-cms/packages/core/icon-registry/icons/icon-books.js +1 -17
  418. package/dist-cms/packages/core/icon-registry/icons/icon-box-alt.d.ts +1 -1
  419. package/dist-cms/packages/core/icon-registry/icons/icon-box-alt.js +1 -16
  420. package/dist-cms/packages/core/icon-registry/icons/icon-box-open.d.ts +1 -1
  421. package/dist-cms/packages/core/icon-registry/icons/icon-box-open.js +1 -17
  422. package/dist-cms/packages/core/icon-registry/icons/icon-box.d.ts +1 -1
  423. package/dist-cms/packages/core/icon-registry/icons/icon-box.js +1 -17
  424. package/dist-cms/packages/core/icon-registry/icons/icon-brackets.d.ts +1 -1
  425. package/dist-cms/packages/core/icon-registry/icons/icon-brackets.js +1 -15
  426. package/dist-cms/packages/core/icon-registry/icons/icon-brick.d.ts +1 -1
  427. package/dist-cms/packages/core/icon-registry/icons/icon-brick.js +1 -16
  428. package/dist-cms/packages/core/icon-registry/icons/icon-briefcase.d.ts +1 -1
  429. package/dist-cms/packages/core/icon-registry/icons/icon-briefcase.js +1 -15
  430. package/dist-cms/packages/core/icon-registry/icons/icon-browser-window.d.ts +1 -1
  431. package/dist-cms/packages/core/icon-registry/icons/icon-browser-window.js +1 -17
  432. package/dist-cms/packages/core/icon-registry/icons/icon-brush-alt-2.d.ts +1 -1
  433. package/dist-cms/packages/core/icon-registry/icons/icon-brush-alt-2.js +1 -17
  434. package/dist-cms/packages/core/icon-registry/icons/icon-brush-alt.d.ts +1 -1
  435. package/dist-cms/packages/core/icon-registry/icons/icon-brush-alt.js +1 -16
  436. package/dist-cms/packages/core/icon-registry/icons/icon-brush.d.ts +1 -1
  437. package/dist-cms/packages/core/icon-registry/icons/icon-brush.js +1 -15
  438. package/dist-cms/packages/core/icon-registry/icons/icon-bug.d.ts +1 -1
  439. package/dist-cms/packages/core/icon-registry/icons/icon-bug.js +1 -24
  440. package/dist-cms/packages/core/icon-registry/icons/icon-bulleted-list.d.ts +1 -1
  441. package/dist-cms/packages/core/icon-registry/icons/icon-bulleted-list.js +1 -19
  442. package/dist-cms/packages/core/icon-registry/icons/icon-burn.d.ts +1 -1
  443. package/dist-cms/packages/core/icon-registry/icons/icon-burn.js +1 -17
  444. package/dist-cms/packages/core/icon-registry/icons/icon-bus.d.ts +1 -1
  445. package/dist-cms/packages/core/icon-registry/icons/icon-bus.js +1 -20
  446. package/dist-cms/packages/core/icon-registry/icons/icon-calculator.d.ts +1 -1
  447. package/dist-cms/packages/core/icon-registry/icons/icon-calculator.js +1 -23
  448. package/dist-cms/packages/core/icon-registry/icons/icon-calendar-alt.d.ts +1 -1
  449. package/dist-cms/packages/core/icon-registry/icons/icon-calendar-alt.js +1 -23
  450. package/dist-cms/packages/core/icon-registry/icons/icon-calendar.d.ts +1 -1
  451. package/dist-cms/packages/core/icon-registry/icons/icon-calendar.js +1 -18
  452. package/dist-cms/packages/core/icon-registry/icons/icon-camcorder.d.ts +1 -1
  453. package/dist-cms/packages/core/icon-registry/icons/icon-camcorder.js +1 -15
  454. package/dist-cms/packages/core/icon-registry/icons/icon-camera-roll.d.ts +1 -1
  455. package/dist-cms/packages/core/icon-registry/icons/icon-camera-roll.js +1 -18
  456. package/dist-cms/packages/core/icon-registry/icons/icon-candy.d.ts +1 -1
  457. package/dist-cms/packages/core/icon-registry/icons/icon-candy.js +1 -18
  458. package/dist-cms/packages/core/icon-registry/icons/icon-caps-lock.d.ts +1 -1
  459. package/dist-cms/packages/core/icon-registry/icons/icon-caps-lock.js +1 -15
  460. package/dist-cms/packages/core/icon-registry/icons/icon-car.d.ts +1 -1
  461. package/dist-cms/packages/core/icon-registry/icons/icon-car.js +1 -17
  462. package/dist-cms/packages/core/icon-registry/icons/icon-cash-register.d.ts +1 -1
  463. package/dist-cms/packages/core/icon-registry/icons/icon-cash-register.js +1 -1
  464. package/dist-cms/packages/core/icon-registry/icons/icon-categories.d.ts +1 -1
  465. package/dist-cms/packages/core/icon-registry/icons/icon-categories.js +1 -16
  466. package/dist-cms/packages/core/icon-registry/icons/icon-certificate.d.ts +1 -1
  467. package/dist-cms/packages/core/icon-registry/icons/icon-certificate.js +1 -17
  468. package/dist-cms/packages/core/icon-registry/icons/icon-chart-curve.d.ts +1 -1
  469. package/dist-cms/packages/core/icon-registry/icons/icon-chart-curve.js +1 -19
  470. package/dist-cms/packages/core/icon-registry/icons/icon-chart.d.ts +1 -1
  471. package/dist-cms/packages/core/icon-registry/icons/icon-chart.js +1 -15
  472. package/dist-cms/packages/core/icon-registry/icons/icon-chat-active.d.ts +1 -1
  473. package/dist-cms/packages/core/icon-registry/icons/icon-chat-active.js +1 -14
  474. package/dist-cms/packages/core/icon-registry/icons/icon-chat.d.ts +1 -1
  475. package/dist-cms/packages/core/icon-registry/icons/icon-chat.js +1 -14
  476. package/dist-cms/packages/core/icon-registry/icons/icon-check.d.ts +1 -1
  477. package/dist-cms/packages/core/icon-registry/icons/icon-check.js +1 -14
  478. package/dist-cms/packages/core/icon-registry/icons/icon-checkbox-dotted-active.d.ts +1 -1
  479. package/dist-cms/packages/core/icon-registry/icons/icon-checkbox-dotted-active.js +1 -1
  480. package/dist-cms/packages/core/icon-registry/icons/icon-checkbox-dotted.d.ts +1 -1
  481. package/dist-cms/packages/core/icon-registry/icons/icon-checkbox-dotted.js +1 -25
  482. package/dist-cms/packages/core/icon-registry/icons/icon-checkbox-empty.d.ts +1 -1
  483. package/dist-cms/packages/core/icon-registry/icons/icon-checkbox-empty.js +1 -25
  484. package/dist-cms/packages/core/icon-registry/icons/icon-checkbox.d.ts +1 -1
  485. package/dist-cms/packages/core/icon-registry/icons/icon-checkbox.js +1 -15
  486. package/dist-cms/packages/core/icon-registry/icons/icon-chess.d.ts +1 -1
  487. package/dist-cms/packages/core/icon-registry/icons/icon-chess.js +1 -1
  488. package/dist-cms/packages/core/icon-registry/icons/icon-chip-alt.d.ts +1 -1
  489. package/dist-cms/packages/core/icon-registry/icons/icon-chip-alt.js +1 -23
  490. package/dist-cms/packages/core/icon-registry/icons/icon-chip.d.ts +1 -1
  491. package/dist-cms/packages/core/icon-registry/icons/icon-chip.js +1 -23
  492. package/dist-cms/packages/core/icon-registry/icons/icon-cinema.d.ts +1 -1
  493. package/dist-cms/packages/core/icon-registry/icons/icon-cinema.js +1 -22
  494. package/dist-cms/packages/core/icon-registry/icons/icon-circle-dotted-active.d.ts +1 -1
  495. package/dist-cms/packages/core/icon-registry/icons/icon-circle-dotted-active.js +1 -15
  496. package/dist-cms/packages/core/icon-registry/icons/icon-circle-dotted.d.ts +1 -1
  497. package/dist-cms/packages/core/icon-registry/icons/icon-circle-dotted.js +1 -21
  498. package/dist-cms/packages/core/icon-registry/icons/icon-circuits.d.ts +1 -1
  499. package/dist-cms/packages/core/icon-registry/icons/icon-circuits.js +1 -18
  500. package/dist-cms/packages/core/icon-registry/icons/icon-circus.d.ts +1 -1
  501. package/dist-cms/packages/core/icon-registry/icons/icon-circus.js +1 -1
  502. package/dist-cms/packages/core/icon-registry/icons/icon-clear-formatting.d.ts +1 -1
  503. package/dist-cms/packages/core/icon-registry/icons/icon-clear-formatting.js +1 -18
  504. package/dist-cms/packages/core/icon-registry/icons/icon-client.d.ts +1 -1
  505. package/dist-cms/packages/core/icon-registry/icons/icon-client.js +1 -15
  506. package/dist-cms/packages/core/icon-registry/icons/icon-clipboard-copy.d.ts +1 -1
  507. package/dist-cms/packages/core/icon-registry/icons/icon-clipboard-copy.js +1 -18
  508. package/dist-cms/packages/core/icon-registry/icons/icon-clipboard-entry.d.ts +1 -1
  509. package/dist-cms/packages/core/icon-registry/icons/icon-clipboard-entry.js +1 -15
  510. package/dist-cms/packages/core/icon-registry/icons/icon-clipboard-paste.d.ts +1 -1
  511. package/dist-cms/packages/core/icon-registry/icons/icon-clipboard-paste.js +1 -16
  512. package/dist-cms/packages/core/icon-registry/icons/icon-clipboard.d.ts +1 -1
  513. package/dist-cms/packages/core/icon-registry/icons/icon-clipboard.js +1 -15
  514. package/dist-cms/packages/core/icon-registry/icons/icon-clothes-hanger.d.ts +1 -1
  515. package/dist-cms/packages/core/icon-registry/icons/icon-clothes-hanger.js +1 -1
  516. package/dist-cms/packages/core/icon-registry/icons/icon-cloud-drive.d.ts +1 -1
  517. package/dist-cms/packages/core/icon-registry/icons/icon-cloud-drive.js +1 -17
  518. package/dist-cms/packages/core/icon-registry/icons/icon-cloud-upload.d.ts +1 -1
  519. package/dist-cms/packages/core/icon-registry/icons/icon-cloud-upload.js +1 -16
  520. package/dist-cms/packages/core/icon-registry/icons/icon-cloud.d.ts +1 -1
  521. package/dist-cms/packages/core/icon-registry/icons/icon-cloud.js +1 -14
  522. package/dist-cms/packages/core/icon-registry/icons/icon-cloudy.d.ts +1 -1
  523. package/dist-cms/packages/core/icon-registry/icons/icon-cloudy.js +1 -15
  524. package/dist-cms/packages/core/icon-registry/icons/icon-clubs.d.ts +1 -1
  525. package/dist-cms/packages/core/icon-registry/icons/icon-clubs.js +1 -15
  526. package/dist-cms/packages/core/icon-registry/icons/icon-cocktail.d.ts +1 -1
  527. package/dist-cms/packages/core/icon-registry/icons/icon-cocktail.js +1 -16
  528. package/dist-cms/packages/core/icon-registry/icons/icon-code-xml.d.ts +1 -1
  529. package/dist-cms/packages/core/icon-registry/icons/icon-code-xml.js +1 -16
  530. package/dist-cms/packages/core/icon-registry/icons/icon-code.d.ts +1 -1
  531. package/dist-cms/packages/core/icon-registry/icons/icon-code.js +1 -15
  532. package/dist-cms/packages/core/icon-registry/icons/icon-coffee.d.ts +1 -1
  533. package/dist-cms/packages/core/icon-registry/icons/icon-coffee.js +1 -17
  534. package/dist-cms/packages/core/icon-registry/icons/icon-coin-dollar.d.ts +1 -1
  535. package/dist-cms/packages/core/icon-registry/icons/icon-coin-dollar.js +1 -15
  536. package/dist-cms/packages/core/icon-registry/icons/icon-coin-euro.d.ts +1 -1
  537. package/dist-cms/packages/core/icon-registry/icons/icon-coin-euro.js +1 -16
  538. package/dist-cms/packages/core/icon-registry/icons/icon-coin-pound.d.ts +1 -1
  539. package/dist-cms/packages/core/icon-registry/icons/icon-coin-pound.js +1 -17
  540. package/dist-cms/packages/core/icon-registry/icons/icon-coin-yen.d.ts +1 -1
  541. package/dist-cms/packages/core/icon-registry/icons/icon-coin-yen.js +1 -16
  542. package/dist-cms/packages/core/icon-registry/icons/icon-coin.d.ts +1 -1
  543. package/dist-cms/packages/core/icon-registry/icons/icon-coin.js +1 -1
  544. package/dist-cms/packages/core/icon-registry/icons/icon-coins-alt.d.ts +1 -1
  545. package/dist-cms/packages/core/icon-registry/icons/icon-coins-alt.js +1 -17
  546. package/dist-cms/packages/core/icon-registry/icons/icon-coins-dollar-alt.d.ts +1 -1
  547. package/dist-cms/packages/core/icon-registry/icons/icon-coins-dollar-alt.js +1 -1
  548. package/dist-cms/packages/core/icon-registry/icons/icon-coins-dollar.d.ts +1 -1
  549. package/dist-cms/packages/core/icon-registry/icons/icon-coins-dollar.js +1 -1
  550. package/dist-cms/packages/core/icon-registry/icons/icon-coins-euro-alt.d.ts +1 -1
  551. package/dist-cms/packages/core/icon-registry/icons/icon-coins-euro-alt.js +1 -1
  552. package/dist-cms/packages/core/icon-registry/icons/icon-coins-euro.d.ts +1 -1
  553. package/dist-cms/packages/core/icon-registry/icons/icon-coins-euro.js +1 -1
  554. package/dist-cms/packages/core/icon-registry/icons/icon-coins-pound-alt.d.ts +1 -1
  555. package/dist-cms/packages/core/icon-registry/icons/icon-coins-pound-alt.js +1 -1
  556. package/dist-cms/packages/core/icon-registry/icons/icon-coins-pound.d.ts +1 -1
  557. package/dist-cms/packages/core/icon-registry/icons/icon-coins-pound.js +1 -1
  558. package/dist-cms/packages/core/icon-registry/icons/icon-coins-yen-alt.d.ts +1 -1
  559. package/dist-cms/packages/core/icon-registry/icons/icon-coins-yen-alt.js +1 -1
  560. package/dist-cms/packages/core/icon-registry/icons/icon-coins-yen.d.ts +1 -1
  561. package/dist-cms/packages/core/icon-registry/icons/icon-coins-yen.js +1 -1
  562. package/dist-cms/packages/core/icon-registry/icons/icon-coins.d.ts +1 -1
  563. package/dist-cms/packages/core/icon-registry/icons/icon-coins.js +1 -17
  564. package/dist-cms/packages/core/icon-registry/icons/icon-color-bucket.d.ts +1 -1
  565. package/dist-cms/packages/core/icon-registry/icons/icon-color-bucket.js +1 -17
  566. package/dist-cms/packages/core/icon-registry/icons/icon-colorpicker.d.ts +1 -1
  567. package/dist-cms/packages/core/icon-registry/icons/icon-colorpicker.js +1 -16
  568. package/dist-cms/packages/core/icon-registry/icons/icon-columns.d.ts +1 -1
  569. package/dist-cms/packages/core/icon-registry/icons/icon-columns.js +1 -16
  570. package/dist-cms/packages/core/icon-registry/icons/icon-comb.d.ts +1 -1
  571. package/dist-cms/packages/core/icon-registry/icons/icon-comb.js +1 -1
  572. package/dist-cms/packages/core/icon-registry/icons/icon-combination-lock-open.d.ts +1 -1
  573. package/dist-cms/packages/core/icon-registry/icons/icon-combination-lock-open.js +1 -16
  574. package/dist-cms/packages/core/icon-registry/icons/icon-combination-lock.d.ts +1 -1
  575. package/dist-cms/packages/core/icon-registry/icons/icon-combination-lock.js +1 -16
  576. package/dist-cms/packages/core/icon-registry/icons/icon-command.d.ts +1 -1
  577. package/dist-cms/packages/core/icon-registry/icons/icon-command.js +1 -15
  578. package/dist-cms/packages/core/icon-registry/icons/icon-company.d.ts +1 -1
  579. package/dist-cms/packages/core/icon-registry/icons/icon-company.js +1 -20
  580. package/dist-cms/packages/core/icon-registry/icons/icon-compress.d.ts +1 -1
  581. package/dist-cms/packages/core/icon-registry/icons/icon-compress.js +1 -19
  582. package/dist-cms/packages/core/icon-registry/icons/icon-connection.d.ts +1 -1
  583. package/dist-cms/packages/core/icon-registry/icons/icon-connection.js +1 -14
  584. package/dist-cms/packages/core/icon-registry/icons/icon-console.d.ts +1 -1
  585. package/dist-cms/packages/core/icon-registry/icons/icon-console.js +1 -16
  586. package/dist-cms/packages/core/icon-registry/icons/icon-contrast.d.ts +1 -1
  587. package/dist-cms/packages/core/icon-registry/icons/icon-contrast.js +1 -15
  588. package/dist-cms/packages/core/icon-registry/icons/icon-conversation-alt.d.ts +1 -1
  589. package/dist-cms/packages/core/icon-registry/icons/icon-conversation-alt.js +1 -15
  590. package/dist-cms/packages/core/icon-registry/icons/icon-conversation.d.ts +1 -1
  591. package/dist-cms/packages/core/icon-registry/icons/icon-conversation.js +1 -17
  592. package/dist-cms/packages/core/icon-registry/icons/icon-coverflow.d.ts +1 -1
  593. package/dist-cms/packages/core/icon-registry/icons/icon-coverflow.js +1 -16
  594. package/dist-cms/packages/core/icon-registry/icons/icon-credit-card-alt.d.ts +1 -1
  595. package/dist-cms/packages/core/icon-registry/icons/icon-credit-card-alt.js +1 -15
  596. package/dist-cms/packages/core/icon-registry/icons/icon-credit-card.d.ts +1 -1
  597. package/dist-cms/packages/core/icon-registry/icons/icon-credit-card.js +1 -15
  598. package/dist-cms/packages/core/icon-registry/icons/icon-crop.d.ts +1 -1
  599. package/dist-cms/packages/core/icon-registry/icons/icon-crop.js +1 -15
  600. package/dist-cms/packages/core/icon-registry/icons/icon-crosshair.d.ts +1 -1
  601. package/dist-cms/packages/core/icon-registry/icons/icon-crosshair.js +1 -18
  602. package/dist-cms/packages/core/icon-registry/icons/icon-crown-alt.d.ts +1 -1
  603. package/dist-cms/packages/core/icon-registry/icons/icon-crown-alt.js +1 -15
  604. package/dist-cms/packages/core/icon-registry/icons/icon-crown.d.ts +1 -1
  605. package/dist-cms/packages/core/icon-registry/icons/icon-crown.js +1 -15
  606. package/dist-cms/packages/core/icon-registry/icons/icon-cupcake.d.ts +1 -1
  607. package/dist-cms/packages/core/icon-registry/icons/icon-cupcake.js +1 -16
  608. package/dist-cms/packages/core/icon-registry/icons/icon-curve.d.ts +1 -1
  609. package/dist-cms/packages/core/icon-registry/icons/icon-curve.js +1 -17
  610. package/dist-cms/packages/core/icon-registry/icons/icon-cut.d.ts +1 -1
  611. package/dist-cms/packages/core/icon-registry/icons/icon-cut.js +1 -18
  612. package/dist-cms/packages/core/icon-registry/icons/icon-dashboard.d.ts +1 -1
  613. package/dist-cms/packages/core/icon-registry/icons/icon-dashboard.js +1 -15
  614. package/dist-cms/packages/core/icon-registry/icons/icon-database.d.ts +1 -1
  615. package/dist-cms/packages/core/icon-registry/icons/icon-database.js +1 -16
  616. package/dist-cms/packages/core/icon-registry/icons/icon-defrag.d.ts +1 -1
  617. package/dist-cms/packages/core/icon-registry/icons/icon-defrag.js +1 -19
  618. package/dist-cms/packages/core/icon-registry/icons/icon-delete-key.d.ts +1 -1
  619. package/dist-cms/packages/core/icon-registry/icons/icon-delete-key.js +1 -16
  620. package/dist-cms/packages/core/icon-registry/icons/icon-delete.d.ts +1 -1
  621. package/dist-cms/packages/core/icon-registry/icons/icon-delete.js +1 -15
  622. package/dist-cms/packages/core/icon-registry/icons/icon-departure.d.ts +1 -1
  623. package/dist-cms/packages/core/icon-registry/icons/icon-departure.js +1 -15
  624. package/dist-cms/packages/core/icon-registry/icons/icon-desk.d.ts +1 -1
  625. package/dist-cms/packages/core/icon-registry/icons/icon-desk.js +1 -1
  626. package/dist-cms/packages/core/icon-registry/icons/icon-desktop.d.ts +1 -1
  627. package/dist-cms/packages/core/icon-registry/icons/icon-desktop.js +1 -16
  628. package/dist-cms/packages/core/icon-registry/icons/icon-diagnostics.d.ts +1 -1
  629. package/dist-cms/packages/core/icon-registry/icons/icon-diagnostics.js +1 -18
  630. package/dist-cms/packages/core/icon-registry/icons/icon-diagonal-arrow-alt.d.ts +1 -1
  631. package/dist-cms/packages/core/icon-registry/icons/icon-diagonal-arrow-alt.js +1 -16
  632. package/dist-cms/packages/core/icon-registry/icons/icon-diagonal-arrow.d.ts +1 -1
  633. package/dist-cms/packages/core/icon-registry/icons/icon-diagonal-arrow.js +1 -16
  634. package/dist-cms/packages/core/icon-registry/icons/icon-diamond.d.ts +1 -1
  635. package/dist-cms/packages/core/icon-registry/icons/icon-diamond.js +1 -16
  636. package/dist-cms/packages/core/icon-registry/icons/icon-diamonds.d.ts +1 -1
  637. package/dist-cms/packages/core/icon-registry/icons/icon-diamonds.js +1 -14
  638. package/dist-cms/packages/core/icon-registry/icons/icon-dice.d.ts +1 -1
  639. package/dist-cms/packages/core/icon-registry/icons/icon-dice.js +1 -19
  640. package/dist-cms/packages/core/icon-registry/icons/icon-diploma-alt.d.ts +1 -1
  641. package/dist-cms/packages/core/icon-registry/icons/icon-diploma-alt.js +1 -17
  642. package/dist-cms/packages/core/icon-registry/icons/icon-diploma.d.ts +1 -1
  643. package/dist-cms/packages/core/icon-registry/icons/icon-diploma.js +1 -17
  644. package/dist-cms/packages/core/icon-registry/icons/icon-directions-alt.d.ts +1 -1
  645. package/dist-cms/packages/core/icon-registry/icons/icon-directions-alt.js +1 -17
  646. package/dist-cms/packages/core/icon-registry/icons/icon-directions.d.ts +1 -1
  647. package/dist-cms/packages/core/icon-registry/icons/icon-directions.js +1 -17
  648. package/dist-cms/packages/core/icon-registry/icons/icon-disc.d.ts +1 -1
  649. package/dist-cms/packages/core/icon-registry/icons/icon-disc.js +1 -17
  650. package/dist-cms/packages/core/icon-registry/icons/icon-disk-image.d.ts +1 -1
  651. package/dist-cms/packages/core/icon-registry/icons/icon-disk-image.js +1 -17
  652. package/dist-cms/packages/core/icon-registry/icons/icon-display.d.ts +1 -1
  653. package/dist-cms/packages/core/icon-registry/icons/icon-display.js +1 -16
  654. package/dist-cms/packages/core/icon-registry/icons/icon-dna.d.ts +1 -1
  655. package/dist-cms/packages/core/icon-registry/icons/icon-dna.js +1 -24
  656. package/dist-cms/packages/core/icon-registry/icons/icon-dock-connector.d.ts +1 -1
  657. package/dist-cms/packages/core/icon-registry/icons/icon-dock-connector.js +1 -18
  658. package/dist-cms/packages/core/icon-registry/icons/icon-document-3d.d.ts +1 -1
  659. package/dist-cms/packages/core/icon-registry/icons/icon-document-3d.js +1 -17
  660. package/dist-cms/packages/core/icon-registry/icons/icon-document-chart-bar.d.ts +1 -1
  661. package/dist-cms/packages/core/icon-registry/icons/icon-document-chart-bar.js +1 -18
  662. package/dist-cms/packages/core/icon-registry/icons/icon-document-chart-graph.d.ts +1 -1
  663. package/dist-cms/packages/core/icon-registry/icons/icon-document-chart-graph.js +1 -16
  664. package/dist-cms/packages/core/icon-registry/icons/icon-document-command.d.ts +1 -1
  665. package/dist-cms/packages/core/icon-registry/icons/icon-document-command.js +1 -17
  666. package/dist-cms/packages/core/icon-registry/icons/icon-document-dashed-line.d.ts +1 -1
  667. package/dist-cms/packages/core/icon-registry/icons/icon-document-dashed-line.js +1 -15
  668. package/dist-cms/packages/core/icon-registry/icons/icon-document-font.d.ts +1 -1
  669. package/dist-cms/packages/core/icon-registry/icons/icon-document-font.js +1 -18
  670. package/dist-cms/packages/core/icon-registry/icons/icon-document-html.d.ts +1 -1
  671. package/dist-cms/packages/core/icon-registry/icons/icon-document-html.js +1 -17
  672. package/dist-cms/packages/core/icon-registry/icons/icon-document-image.d.ts +1 -1
  673. package/dist-cms/packages/core/icon-registry/icons/icon-document-image.js +1 -17
  674. package/dist-cms/packages/core/icon-registry/icons/icon-document-js.d.ts +1 -1
  675. package/dist-cms/packages/core/icon-registry/icons/icon-document-js.js +1 -17
  676. package/dist-cms/packages/core/icon-registry/icons/icon-document-key.d.ts +1 -1
  677. package/dist-cms/packages/core/icon-registry/icons/icon-document-key.js +1 -17
  678. package/dist-cms/packages/core/icon-registry/icons/icon-document-medal.d.ts +1 -1
  679. package/dist-cms/packages/core/icon-registry/icons/icon-document-medal.js +1 -17
  680. package/dist-cms/packages/core/icon-registry/icons/icon-document-play.d.ts +1 -1
  681. package/dist-cms/packages/core/icon-registry/icons/icon-document-play.js +1 -16
  682. package/dist-cms/packages/core/icon-registry/icons/icon-document-search.d.ts +1 -1
  683. package/dist-cms/packages/core/icon-registry/icons/icon-document-search.js +1 -17
  684. package/dist-cms/packages/core/icon-registry/icons/icon-document-settings.d.ts +1 -1
  685. package/dist-cms/packages/core/icon-registry/icons/icon-document-settings.js +1 -19
  686. package/dist-cms/packages/core/icon-registry/icons/icon-document-spreadsheet.d.ts +1 -1
  687. package/dist-cms/packages/core/icon-registry/icons/icon-document-spreadsheet.js +1 -19
  688. package/dist-cms/packages/core/icon-registry/icons/icon-document-user.d.ts +1 -1
  689. package/dist-cms/packages/core/icon-registry/icons/icon-document-user.js +1 -17
  690. package/dist-cms/packages/core/icon-registry/icons/icon-document.d.ts +1 -1
  691. package/dist-cms/packages/core/icon-registry/icons/icon-document.js +1 -15
  692. package/dist-cms/packages/core/icon-registry/icons/icon-documents.d.ts +1 -1
  693. package/dist-cms/packages/core/icon-registry/icons/icon-documents.js +1 -16
  694. package/dist-cms/packages/core/icon-registry/icons/icon-dollar-bag.d.ts +1 -1
  695. package/dist-cms/packages/core/icon-registry/icons/icon-dollar-bag.js +1 -1
  696. package/dist-cms/packages/core/icon-registry/icons/icon-donate.d.ts +1 -1
  697. package/dist-cms/packages/core/icon-registry/icons/icon-donate.js +1 -16
  698. package/dist-cms/packages/core/icon-registry/icons/icon-door-open-alt.d.ts +1 -1
  699. package/dist-cms/packages/core/icon-registry/icons/icon-door-open-alt.js +1 -18
  700. package/dist-cms/packages/core/icon-registry/icons/icon-door-open.d.ts +1 -1
  701. package/dist-cms/packages/core/icon-registry/icons/icon-door-open.js +1 -18
  702. package/dist-cms/packages/core/icon-registry/icons/icon-download-alt.d.ts +1 -1
  703. package/dist-cms/packages/core/icon-registry/icons/icon-download-alt.js +1 -16
  704. package/dist-cms/packages/core/icon-registry/icons/icon-download.d.ts +1 -1
  705. package/dist-cms/packages/core/icon-registry/icons/icon-download.js +1 -18
  706. package/dist-cms/packages/core/icon-registry/icons/icon-drop.d.ts +1 -1
  707. package/dist-cms/packages/core/icon-registry/icons/icon-drop.js +1 -14
  708. package/dist-cms/packages/core/icon-registry/icons/icon-eco.d.ts +1 -1
  709. package/dist-cms/packages/core/icon-registry/icons/icon-eco.js +1 -15
  710. package/dist-cms/packages/core/icon-registry/icons/icon-economy.d.ts +1 -1
  711. package/dist-cms/packages/core/icon-registry/icons/icon-economy.js +1 -17
  712. package/dist-cms/packages/core/icon-registry/icons/icon-edit.d.ts +1 -1
  713. package/dist-cms/packages/core/icon-registry/icons/icon-edit.js +1 -15
  714. package/dist-cms/packages/core/icon-registry/icons/icon-eject.d.ts +1 -1
  715. package/dist-cms/packages/core/icon-registry/icons/icon-eject.js +1 -1
  716. package/dist-cms/packages/core/icon-registry/icons/icon-embed.d.ts +1 -1
  717. package/dist-cms/packages/core/icon-registry/icons/icon-embed.js +1 -17
  718. package/dist-cms/packages/core/icon-registry/icons/icon-employee.d.ts +1 -1
  719. package/dist-cms/packages/core/icon-registry/icons/icon-employee.js +1 -15
  720. package/dist-cms/packages/core/icon-registry/icons/icon-energy-saving-bulb.d.ts +1 -1
  721. package/dist-cms/packages/core/icon-registry/icons/icon-energy-saving-bulb.js +1 -16
  722. package/dist-cms/packages/core/icon-registry/icons/icon-enter.d.ts +1 -1
  723. package/dist-cms/packages/core/icon-registry/icons/icon-enter.js +1 -15
  724. package/dist-cms/packages/core/icon-registry/icons/icon-equalizer.d.ts +1 -1
  725. package/dist-cms/packages/core/icon-registry/icons/icon-equalizer.js +1 -22
  726. package/dist-cms/packages/core/icon-registry/icons/icon-escape.d.ts +1 -1
  727. package/dist-cms/packages/core/icon-registry/icons/icon-escape.js +1 -16
  728. package/dist-cms/packages/core/icon-registry/icons/icon-ethernet.d.ts +1 -1
  729. package/dist-cms/packages/core/icon-registry/icons/icon-ethernet.js +1 -18
  730. package/dist-cms/packages/core/icon-registry/icons/icon-euro-bag.d.ts +1 -1
  731. package/dist-cms/packages/core/icon-registry/icons/icon-euro-bag.js +1 -1
  732. package/dist-cms/packages/core/icon-registry/icons/icon-exit-fullscreen.d.ts +1 -1
  733. package/dist-cms/packages/core/icon-registry/icons/icon-exit-fullscreen.js +1 -17
  734. package/dist-cms/packages/core/icon-registry/icons/icon-eye.d.ts +1 -1
  735. package/dist-cms/packages/core/icon-registry/icons/icon-eye.js +1 -15
  736. package/dist-cms/packages/core/icon-registry/icons/icon-facebook-like.d.ts +1 -1
  737. package/dist-cms/packages/core/icon-registry/icons/icon-facebook-like.js +1 -15
  738. package/dist-cms/packages/core/icon-registry/icons/icon-facebook.d.ts +1 -1
  739. package/dist-cms/packages/core/icon-registry/icons/icon-facebook.js +1 -1
  740. package/dist-cms/packages/core/icon-registry/icons/icon-factory.d.ts +1 -1
  741. package/dist-cms/packages/core/icon-registry/icons/icon-factory.js +1 -17
  742. package/dist-cms/packages/core/icon-registry/icons/icon-favorite.d.ts +1 -1
  743. package/dist-cms/packages/core/icon-registry/icons/icon-favorite.js +1 -14
  744. package/dist-cms/packages/core/icon-registry/icons/icon-female-symbol.d.ts +1 -1
  745. package/dist-cms/packages/core/icon-registry/icons/icon-female-symbol.js +1 -1
  746. package/dist-cms/packages/core/icon-registry/icons/icon-file-cabinet.d.ts +1 -1
  747. package/dist-cms/packages/core/icon-registry/icons/icon-file-cabinet.js +1 -17
  748. package/dist-cms/packages/core/icon-registry/icons/icon-files.d.ts +1 -1
  749. package/dist-cms/packages/core/icon-registry/icons/icon-files.js +1 -17
  750. package/dist-cms/packages/core/icon-registry/icons/icon-filter-arrows.d.ts +1 -1
  751. package/dist-cms/packages/core/icon-registry/icons/icon-filter-arrows.js +1 -18
  752. package/dist-cms/packages/core/icon-registry/icons/icon-filter.d.ts +1 -1
  753. package/dist-cms/packages/core/icon-registry/icons/icon-filter.js +1 -14
  754. package/dist-cms/packages/core/icon-registry/icons/icon-fingerprint.d.ts +1 -1
  755. package/dist-cms/packages/core/icon-registry/icons/icon-fingerprint.js +1 -22
  756. package/dist-cms/packages/core/icon-registry/icons/icon-fire.d.ts +1 -1
  757. package/dist-cms/packages/core/icon-registry/icons/icon-fire.js +1 -16
  758. package/dist-cms/packages/core/icon-registry/icons/icon-firewall.d.ts +1 -1
  759. package/dist-cms/packages/core/icon-registry/icons/icon-firewall.js +1 -1
  760. package/dist-cms/packages/core/icon-registry/icons/icon-firewire.d.ts +1 -1
  761. package/dist-cms/packages/core/icon-registry/icons/icon-firewire.js +1 -20
  762. package/dist-cms/packages/core/icon-registry/icons/icon-flag-alt.d.ts +1 -1
  763. package/dist-cms/packages/core/icon-registry/icons/icon-flag-alt.js +1 -15
  764. package/dist-cms/packages/core/icon-registry/icons/icon-flag.d.ts +1 -1
  765. package/dist-cms/packages/core/icon-registry/icons/icon-flag.js +1 -14
  766. package/dist-cms/packages/core/icon-registry/icons/icon-flash.d.ts +1 -1
  767. package/dist-cms/packages/core/icon-registry/icons/icon-flash.js +1 -14
  768. package/dist-cms/packages/core/icon-registry/icons/icon-flashlight.d.ts +1 -1
  769. package/dist-cms/packages/core/icon-registry/icons/icon-flashlight.js +1 -16
  770. package/dist-cms/packages/core/icon-registry/icons/icon-flowerpot.d.ts +1 -1
  771. package/dist-cms/packages/core/icon-registry/icons/icon-flowerpot.js +1 -18
  772. package/dist-cms/packages/core/icon-registry/icons/icon-folder-open.d.ts +1 -1
  773. package/dist-cms/packages/core/icon-registry/icons/icon-folder-open.js +1 -1
  774. package/dist-cms/packages/core/icon-registry/icons/icon-folder-outline.d.ts +1 -1
  775. package/dist-cms/packages/core/icon-registry/icons/icon-folder-outline.js +1 -1
  776. package/dist-cms/packages/core/icon-registry/icons/icon-folder.d.ts +1 -1
  777. package/dist-cms/packages/core/icon-registry/icons/icon-folder.js +1 -14
  778. package/dist-cms/packages/core/icon-registry/icons/icon-folders.d.ts +1 -1
  779. package/dist-cms/packages/core/icon-registry/icons/icon-folders.js +1 -15
  780. package/dist-cms/packages/core/icon-registry/icons/icon-font.d.ts +1 -1
  781. package/dist-cms/packages/core/icon-registry/icons/icon-font.js +1 -16
  782. package/dist-cms/packages/core/icon-registry/icons/icon-food.d.ts +1 -1
  783. package/dist-cms/packages/core/icon-registry/icons/icon-food.js +1 -17
  784. package/dist-cms/packages/core/icon-registry/icons/icon-footprints.d.ts +1 -1
  785. package/dist-cms/packages/core/icon-registry/icons/icon-footprints.js +1 -17
  786. package/dist-cms/packages/core/icon-registry/icons/icon-forking.d.ts +1 -1
  787. package/dist-cms/packages/core/icon-registry/icons/icon-forking.js +1 -17
  788. package/dist-cms/packages/core/icon-registry/icons/icon-frame-alt.d.ts +1 -1
  789. package/dist-cms/packages/core/icon-registry/icons/icon-frame-alt.js +1 -17
  790. package/dist-cms/packages/core/icon-registry/icons/icon-frame.d.ts +1 -1
  791. package/dist-cms/packages/core/icon-registry/icons/icon-frame.js +1 -17
  792. package/dist-cms/packages/core/icon-registry/icons/icon-fullscreen-alt.d.ts +1 -1
  793. package/dist-cms/packages/core/icon-registry/icons/icon-fullscreen-alt.js +1 -17
  794. package/dist-cms/packages/core/icon-registry/icons/icon-fullscreen.d.ts +1 -1
  795. package/dist-cms/packages/core/icon-registry/icons/icon-fullscreen.js +1 -17
  796. package/dist-cms/packages/core/icon-registry/icons/icon-game.d.ts +1 -1
  797. package/dist-cms/packages/core/icon-registry/icons/icon-game.js +1 -18
  798. package/dist-cms/packages/core/icon-registry/icons/icon-geometry.d.ts +1 -1
  799. package/dist-cms/packages/core/icon-registry/icons/icon-geometry.js +1 -18
  800. package/dist-cms/packages/core/icon-registry/icons/icon-gift.d.ts +1 -1
  801. package/dist-cms/packages/core/icon-registry/icons/icon-gift.js +1 -17
  802. package/dist-cms/packages/core/icon-registry/icons/icon-gitbook.d.ts +1 -1
  803. package/dist-cms/packages/core/icon-registry/icons/icon-gitbook.js +1 -1
  804. package/dist-cms/packages/core/icon-registry/icons/icon-github.d.ts +1 -1
  805. package/dist-cms/packages/core/icon-registry/icons/icon-github.js +1 -1
  806. package/dist-cms/packages/core/icon-registry/icons/icon-gitlab.d.ts +1 -1
  807. package/dist-cms/packages/core/icon-registry/icons/icon-gitlab.js +1 -1
  808. package/dist-cms/packages/core/icon-registry/icons/icon-glasses.d.ts +1 -1
  809. package/dist-cms/packages/core/icon-registry/icons/icon-glasses.js +1 -18
  810. package/dist-cms/packages/core/icon-registry/icons/icon-globe-alt.d.ts +1 -1
  811. package/dist-cms/packages/core/icon-registry/icons/icon-globe-alt.js +1 -16
  812. package/dist-cms/packages/core/icon-registry/icons/icon-globe-asia.d.ts +1 -1
  813. package/dist-cms/packages/core/icon-registry/icons/icon-globe-asia.js +1 -16
  814. package/dist-cms/packages/core/icon-registry/icons/icon-globe-europe-africa.d.ts +1 -1
  815. package/dist-cms/packages/core/icon-registry/icons/icon-globe-europe-africa.js +1 -16
  816. package/dist-cms/packages/core/icon-registry/icons/icon-globe-inverted-america.d.ts +1 -1
  817. package/dist-cms/packages/core/icon-registry/icons/icon-globe-inverted-america.js +1 -16
  818. package/dist-cms/packages/core/icon-registry/icons/icon-globe-inverted-asia.d.ts +1 -1
  819. package/dist-cms/packages/core/icon-registry/icons/icon-globe-inverted-asia.js +1 -16
  820. package/dist-cms/packages/core/icon-registry/icons/icon-globe-inverted-europe-africa.d.ts +1 -1
  821. package/dist-cms/packages/core/icon-registry/icons/icon-globe-inverted-europe-africa.js +1 -16
  822. package/dist-cms/packages/core/icon-registry/icons/icon-globe.d.ts +1 -1
  823. package/dist-cms/packages/core/icon-registry/icons/icon-globe.js +1 -16
  824. package/dist-cms/packages/core/icon-registry/icons/icon-google.d.ts +1 -1
  825. package/dist-cms/packages/core/icon-registry/icons/icon-google.js +1 -1
  826. package/dist-cms/packages/core/icon-registry/icons/icon-gps.d.ts +1 -1
  827. package/dist-cms/packages/core/icon-registry/icons/icon-gps.js +1 -18
  828. package/dist-cms/packages/core/icon-registry/icons/icon-graduate.d.ts +1 -1
  829. package/dist-cms/packages/core/icon-registry/icons/icon-graduate.js +1 -16
  830. package/dist-cms/packages/core/icon-registry/icons/icon-grid.d.ts +1 -1
  831. package/dist-cms/packages/core/icon-registry/icons/icon-grid.js +1 -18
  832. package/dist-cms/packages/core/icon-registry/icons/icon-hammer.d.ts +1 -1
  833. package/dist-cms/packages/core/icon-registry/icons/icon-hammer.js +1 -16
  834. package/dist-cms/packages/core/icon-registry/icons/icon-hand-active-alt.d.ts +1 -1
  835. package/dist-cms/packages/core/icon-registry/icons/icon-hand-active-alt.js +1 -18
  836. package/dist-cms/packages/core/icon-registry/icons/icon-hand-active.d.ts +1 -1
  837. package/dist-cms/packages/core/icon-registry/icons/icon-hand-active.js +1 -18
  838. package/dist-cms/packages/core/icon-registry/icons/icon-hand-pointer-alt.d.ts +1 -1
  839. package/dist-cms/packages/core/icon-registry/icons/icon-hand-pointer-alt.js +1 -18
  840. package/dist-cms/packages/core/icon-registry/icons/icon-hand-pointer.d.ts +1 -1
  841. package/dist-cms/packages/core/icon-registry/icons/icon-hand-pointer.js +1 -18
  842. package/dist-cms/packages/core/icon-registry/icons/icon-handprint.d.ts +1 -1
  843. package/dist-cms/packages/core/icon-registry/icons/icon-handprint.js +1 -1
  844. package/dist-cms/packages/core/icon-registry/icons/icon-handshake.d.ts +1 -1
  845. package/dist-cms/packages/core/icon-registry/icons/icon-handshake.js +1 -17
  846. package/dist-cms/packages/core/icon-registry/icons/icon-handtool-alt.d.ts +1 -1
  847. package/dist-cms/packages/core/icon-registry/icons/icon-handtool-alt.js +1 -17
  848. package/dist-cms/packages/core/icon-registry/icons/icon-handtool.d.ts +1 -1
  849. package/dist-cms/packages/core/icon-registry/icons/icon-handtool.js +1 -17
  850. package/dist-cms/packages/core/icon-registry/icons/icon-hard-drive-alt.d.ts +1 -1
  851. package/dist-cms/packages/core/icon-registry/icons/icon-hard-drive-alt.js +1 -17
  852. package/dist-cms/packages/core/icon-registry/icons/icon-hard-drive.d.ts +1 -1
  853. package/dist-cms/packages/core/icon-registry/icons/icon-hard-drive.js +1 -17
  854. package/dist-cms/packages/core/icon-registry/icons/icon-hat.d.ts +1 -1
  855. package/dist-cms/packages/core/icon-registry/icons/icon-hat.js +1 -1
  856. package/dist-cms/packages/core/icon-registry/icons/icon-hd.d.ts +1 -1
  857. package/dist-cms/packages/core/icon-registry/icons/icon-hd.js +1 -1
  858. package/dist-cms/packages/core/icon-registry/icons/icon-heading-1.d.ts +1 -1
  859. package/dist-cms/packages/core/icon-registry/icons/icon-heading-1.js +1 -17
  860. package/dist-cms/packages/core/icon-registry/icons/icon-heading-2.d.ts +1 -1
  861. package/dist-cms/packages/core/icon-registry/icons/icon-heading-2.js +1 -17
  862. package/dist-cms/packages/core/icon-registry/icons/icon-heading-3.d.ts +1 -1
  863. package/dist-cms/packages/core/icon-registry/icons/icon-heading-3.js +1 -18
  864. package/dist-cms/packages/core/icon-registry/icons/icon-headphones.d.ts +1 -1
  865. package/dist-cms/packages/core/icon-registry/icons/icon-headphones.js +1 -14
  866. package/dist-cms/packages/core/icon-registry/icons/icon-headset.d.ts +1 -1
  867. package/dist-cms/packages/core/icon-registry/icons/icon-headset.js +1 -14
  868. package/dist-cms/packages/core/icon-registry/icons/icon-hearts.d.ts +1 -1
  869. package/dist-cms/packages/core/icon-registry/icons/icon-hearts.js +1 -14
  870. package/dist-cms/packages/core/icon-registry/icons/icon-height.d.ts +1 -1
  871. package/dist-cms/packages/core/icon-registry/icons/icon-height.js +1 -16
  872. package/dist-cms/packages/core/icon-registry/icons/icon-help-alt.d.ts +1 -1
  873. package/dist-cms/packages/core/icon-registry/icons/icon-help-alt.js +1 -16
  874. package/dist-cms/packages/core/icon-registry/icons/icon-help.d.ts +1 -1
  875. package/dist-cms/packages/core/icon-registry/icons/icon-help.js +1 -19
  876. package/dist-cms/packages/core/icon-registry/icons/icon-history.d.ts +1 -1
  877. package/dist-cms/packages/core/icon-registry/icons/icon-history.js +1 -16
  878. package/dist-cms/packages/core/icon-registry/icons/icon-home.d.ts +1 -1
  879. package/dist-cms/packages/core/icon-registry/icons/icon-home.js +1 -15
  880. package/dist-cms/packages/core/icon-registry/icons/icon-horizontal-rule.d.ts +1 -1
  881. package/dist-cms/packages/core/icon-registry/icons/icon-horizontal-rule.js +1 -16
  882. package/dist-cms/packages/core/icon-registry/icons/icon-hourglass.d.ts +1 -1
  883. package/dist-cms/packages/core/icon-registry/icons/icon-hourglass.js +1 -17
  884. package/dist-cms/packages/core/icon-registry/icons/icon-imac.d.ts +1 -1
  885. package/dist-cms/packages/core/icon-registry/icons/icon-imac.js +1 -16
  886. package/dist-cms/packages/core/icon-registry/icons/icon-image-up.d.ts +1 -1
  887. package/dist-cms/packages/core/icon-registry/icons/icon-image-up.js +1 -17
  888. package/dist-cms/packages/core/icon-registry/icons/icon-inactive-line.d.ts +1 -1
  889. package/dist-cms/packages/core/icon-registry/icons/icon-inactive-line.js +1 -1
  890. package/dist-cms/packages/core/icon-registry/icons/icon-inbox-full.d.ts +1 -1
  891. package/dist-cms/packages/core/icon-registry/icons/icon-inbox-full.js +1 -15
  892. package/dist-cms/packages/core/icon-registry/icons/icon-inbox.d.ts +1 -1
  893. package/dist-cms/packages/core/icon-registry/icons/icon-inbox.js +1 -15
  894. package/dist-cms/packages/core/icon-registry/icons/icon-indent.d.ts +1 -1
  895. package/dist-cms/packages/core/icon-registry/icons/icon-indent.js +1 -17
  896. package/dist-cms/packages/core/icon-registry/icons/icon-infinity.d.ts +1 -1
  897. package/dist-cms/packages/core/icon-registry/icons/icon-infinity.js +1 -14
  898. package/dist-cms/packages/core/icon-registry/icons/icon-info.d.ts +1 -1
  899. package/dist-cms/packages/core/icon-registry/icons/icon-info.js +1 -16
  900. package/dist-cms/packages/core/icon-registry/icons/icon-invoice.d.ts +1 -1
  901. package/dist-cms/packages/core/icon-registry/icons/icon-invoice.js +1 -17
  902. package/dist-cms/packages/core/icon-registry/icons/icon-ipad.d.ts +1 -1
  903. package/dist-cms/packages/core/icon-registry/icons/icon-ipad.js +1 -15
  904. package/dist-cms/packages/core/icon-registry/icons/icon-iphone.d.ts +1 -1
  905. package/dist-cms/packages/core/icon-registry/icons/icon-iphone.js +1 -15
  906. package/dist-cms/packages/core/icon-registry/icons/icon-italic.d.ts +1 -1
  907. package/dist-cms/packages/core/icon-registry/icons/icon-italic.js +1 -16
  908. package/dist-cms/packages/core/icon-registry/icons/icon-item-arrangement.d.ts +1 -1
  909. package/dist-cms/packages/core/icon-registry/icons/icon-item-arrangement.js +1 -17
  910. package/dist-cms/packages/core/icon-registry/icons/icon-junk.d.ts +1 -1
  911. package/dist-cms/packages/core/icon-registry/icons/icon-junk.js +1 -17
  912. package/dist-cms/packages/core/icon-registry/icons/icon-key.d.ts +1 -1
  913. package/dist-cms/packages/core/icon-registry/icons/icon-key.js +1 -15
  914. package/dist-cms/packages/core/icon-registry/icons/icon-keyboard.d.ts +1 -1
  915. package/dist-cms/packages/core/icon-registry/icons/icon-keyboard.js +1 -22
  916. package/dist-cms/packages/core/icon-registry/icons/icon-keychain.d.ts +1 -1
  917. package/dist-cms/packages/core/icon-registry/icons/icon-keychain.js +1 -1
  918. package/dist-cms/packages/core/icon-registry/icons/icon-keyhole.d.ts +1 -1
  919. package/dist-cms/packages/core/icon-registry/icons/icon-keyhole.js +1 -1
  920. package/dist-cms/packages/core/icon-registry/icons/icon-lab.d.ts +1 -1
  921. package/dist-cms/packages/core/icon-registry/icons/icon-lab.js +1 -16
  922. package/dist-cms/packages/core/icon-registry/icons/icon-laptop.d.ts +1 -1
  923. package/dist-cms/packages/core/icon-registry/icons/icon-laptop.js +1 -14
  924. package/dist-cms/packages/core/icon-registry/icons/icon-layers-alt.d.ts +1 -1
  925. package/dist-cms/packages/core/icon-registry/icons/icon-layers-alt.js +1 -16
  926. package/dist-cms/packages/core/icon-registry/icons/icon-layers.d.ts +1 -1
  927. package/dist-cms/packages/core/icon-registry/icons/icon-layers.js +1 -16
  928. package/dist-cms/packages/core/icon-registry/icons/icon-layout.d.ts +1 -1
  929. package/dist-cms/packages/core/icon-registry/icons/icon-layout.js +1 -17
  930. package/dist-cms/packages/core/icon-registry/icons/icon-left-double-arrow.d.ts +1 -1
  931. package/dist-cms/packages/core/icon-registry/icons/icon-left-double-arrow.js +1 -15
  932. package/dist-cms/packages/core/icon-registry/icons/icon-legal.d.ts +1 -1
  933. package/dist-cms/packages/core/icon-registry/icons/icon-legal.js +1 -18
  934. package/dist-cms/packages/core/icon-registry/icons/icon-lense.d.ts +1 -1
  935. package/dist-cms/packages/core/icon-registry/icons/icon-lense.js +1 -18
  936. package/dist-cms/packages/core/icon-registry/icons/icon-library.d.ts +1 -1
  937. package/dist-cms/packages/core/icon-registry/icons/icon-library.js +1 -19
  938. package/dist-cms/packages/core/icon-registry/icons/icon-light-down.d.ts +1 -1
  939. package/dist-cms/packages/core/icon-registry/icons/icon-light-down.js +1 -22
  940. package/dist-cms/packages/core/icon-registry/icons/icon-light-up.d.ts +1 -1
  941. package/dist-cms/packages/core/icon-registry/icons/icon-light-up.js +1 -22
  942. package/dist-cms/packages/core/icon-registry/icons/icon-lightbulb-active.d.ts +1 -1
  943. package/dist-cms/packages/core/icon-registry/icons/icon-lightbulb-active.js +1 -16
  944. package/dist-cms/packages/core/icon-registry/icons/icon-lightbulb.d.ts +1 -1
  945. package/dist-cms/packages/core/icon-registry/icons/icon-lightbulb.js +1 -18
  946. package/dist-cms/packages/core/icon-registry/icons/icon-lightning.d.ts +1 -1
  947. package/dist-cms/packages/core/icon-registry/icons/icon-lightning.js +1 -15
  948. package/dist-cms/packages/core/icon-registry/icons/icon-link.d.ts +1 -1
  949. package/dist-cms/packages/core/icon-registry/icons/icon-link.js +1 -15
  950. package/dist-cms/packages/core/icon-registry/icons/icon-linkedin.d.ts +1 -1
  951. package/dist-cms/packages/core/icon-registry/icons/icon-linkedin.js +1 -1
  952. package/dist-cms/packages/core/icon-registry/icons/icon-linux-tux.d.ts +1 -1
  953. package/dist-cms/packages/core/icon-registry/icons/icon-linux-tux.js +1 -1
  954. package/dist-cms/packages/core/icon-registry/icons/icon-list.d.ts +1 -1
  955. package/dist-cms/packages/core/icon-registry/icons/icon-list.js +1 -16
  956. package/dist-cms/packages/core/icon-registry/icons/icon-load.d.ts +1 -1
  957. package/dist-cms/packages/core/icon-registry/icons/icon-load.js +1 -16
  958. package/dist-cms/packages/core/icon-registry/icons/icon-loading.d.ts +1 -1
  959. package/dist-cms/packages/core/icon-registry/icons/icon-loading.js +1 -17
  960. package/dist-cms/packages/core/icon-registry/icons/icon-locate.d.ts +1 -1
  961. package/dist-cms/packages/core/icon-registry/icons/icon-locate.js +1 -18
  962. package/dist-cms/packages/core/icon-registry/icons/icon-location-near-me.d.ts +1 -1
  963. package/dist-cms/packages/core/icon-registry/icons/icon-location-near-me.js +1 -16
  964. package/dist-cms/packages/core/icon-registry/icons/icon-location-nearby.d.ts +1 -1
  965. package/dist-cms/packages/core/icon-registry/icons/icon-location-nearby.js +1 -16
  966. package/dist-cms/packages/core/icon-registry/icons/icon-lock.d.ts +1 -1
  967. package/dist-cms/packages/core/icon-registry/icons/icon-lock.js +1 -15
  968. package/dist-cms/packages/core/icon-registry/icons/icon-log-out.d.ts +1 -1
  969. package/dist-cms/packages/core/icon-registry/icons/icon-log-out.js +1 -16
  970. package/dist-cms/packages/core/icon-registry/icons/icon-logout.d.ts +1 -1
  971. package/dist-cms/packages/core/icon-registry/icons/icon-logout.js +1 -16
  972. package/dist-cms/packages/core/icon-registry/icons/icon-loupe.d.ts +1 -1
  973. package/dist-cms/packages/core/icon-registry/icons/icon-loupe.js +1 -19
  974. package/dist-cms/packages/core/icon-registry/icons/icon-magnet.d.ts +1 -1
  975. package/dist-cms/packages/core/icon-registry/icons/icon-magnet.js +1 -16
  976. package/dist-cms/packages/core/icon-registry/icons/icon-mailbox.d.ts +1 -1
  977. package/dist-cms/packages/core/icon-registry/icons/icon-mailbox.js +1 -17
  978. package/dist-cms/packages/core/icon-registry/icons/icon-male-and-female.d.ts +1 -1
  979. package/dist-cms/packages/core/icon-registry/icons/icon-male-and-female.js +1 -1
  980. package/dist-cms/packages/core/icon-registry/icons/icon-male-symbol.d.ts +1 -1
  981. package/dist-cms/packages/core/icon-registry/icons/icon-male-symbol.js +1 -1
  982. package/dist-cms/packages/core/icon-registry/icons/icon-map-alt.d.ts +1 -1
  983. package/dist-cms/packages/core/icon-registry/icons/icon-map-alt.js +1 -14
  984. package/dist-cms/packages/core/icon-registry/icons/icon-map-location.d.ts +1 -1
  985. package/dist-cms/packages/core/icon-registry/icons/icon-map-location.js +1 -16
  986. package/dist-cms/packages/core/icon-registry/icons/icon-map-marker.d.ts +1 -1
  987. package/dist-cms/packages/core/icon-registry/icons/icon-map-marker.js +1 -15
  988. package/dist-cms/packages/core/icon-registry/icons/icon-map.d.ts +1 -1
  989. package/dist-cms/packages/core/icon-registry/icons/icon-map.js +1 -16
  990. package/dist-cms/packages/core/icon-registry/icons/icon-mastodon.d.ts +1 -1
  991. package/dist-cms/packages/core/icon-registry/icons/icon-mastodon.js +1 -1
  992. package/dist-cms/packages/core/icon-registry/icons/icon-medal.d.ts +1 -1
  993. package/dist-cms/packages/core/icon-registry/icons/icon-medal.js +1 -19
  994. package/dist-cms/packages/core/icon-registry/icons/icon-medical-emergency.d.ts +1 -1
  995. package/dist-cms/packages/core/icon-registry/icons/icon-medical-emergency.js +1 -15
  996. package/dist-cms/packages/core/icon-registry/icons/icon-medicine.d.ts +1 -1
  997. package/dist-cms/packages/core/icon-registry/icons/icon-medicine.js +1 -15
  998. package/dist-cms/packages/core/icon-registry/icons/icon-meeting.d.ts +1 -1
  999. package/dist-cms/packages/core/icon-registry/icons/icon-meeting.js +1 -16
  1000. package/dist-cms/packages/core/icon-registry/icons/icon-megaphone.d.ts +1 -1
  1001. package/dist-cms/packages/core/icon-registry/icons/icon-megaphone.js +1 -15
  1002. package/dist-cms/packages/core/icon-registry/icons/icon-merge.d.ts +1 -1
  1003. package/dist-cms/packages/core/icon-registry/icons/icon-merge.js +1 -16
  1004. package/dist-cms/packages/core/icon-registry/icons/icon-message-open.d.ts +1 -1
  1005. package/dist-cms/packages/core/icon-registry/icons/icon-message-open.js +1 -15
  1006. package/dist-cms/packages/core/icon-registry/icons/icon-message-unopened.d.ts +1 -1
  1007. package/dist-cms/packages/core/icon-registry/icons/icon-message-unopened.js +1 -15
  1008. package/dist-cms/packages/core/icon-registry/icons/icon-message.d.ts +1 -1
  1009. package/dist-cms/packages/core/icon-registry/icons/icon-message.js +1 -15
  1010. package/dist-cms/packages/core/icon-registry/icons/icon-microscope.d.ts +1 -1
  1011. package/dist-cms/packages/core/icon-registry/icons/icon-microscope.js +1 -19
  1012. package/dist-cms/packages/core/icon-registry/icons/icon-microsoft.d.ts +1 -1
  1013. package/dist-cms/packages/core/icon-registry/icons/icon-microsoft.js +1 -6
  1014. package/dist-cms/packages/core/icon-registry/icons/icon-mindmap.d.ts +1 -1
  1015. package/dist-cms/packages/core/icon-registry/icons/icon-mindmap.js +1 -18
  1016. package/dist-cms/packages/core/icon-registry/icons/icon-mobile.d.ts +1 -1
  1017. package/dist-cms/packages/core/icon-registry/icons/icon-mobile.js +1 -15
  1018. package/dist-cms/packages/core/icon-registry/icons/icon-molecular-network.d.ts +1 -1
  1019. package/dist-cms/packages/core/icon-registry/icons/icon-molecular-network.js +1 -1
  1020. package/dist-cms/packages/core/icon-registry/icons/icon-molecular.d.ts +1 -1
  1021. package/dist-cms/packages/core/icon-registry/icons/icon-molecular.js +1 -1
  1022. package/dist-cms/packages/core/icon-registry/icons/icon-mountain.d.ts +1 -1
  1023. package/dist-cms/packages/core/icon-registry/icons/icon-mountain.js +1 -15
  1024. package/dist-cms/packages/core/icon-registry/icons/icon-mouse-cursor.d.ts +1 -1
  1025. package/dist-cms/packages/core/icon-registry/icons/icon-mouse-cursor.js +1 -15
  1026. package/dist-cms/packages/core/icon-registry/icons/icon-mouse.d.ts +1 -1
  1027. package/dist-cms/packages/core/icon-registry/icons/icon-mouse.js +1 -15
  1028. package/dist-cms/packages/core/icon-registry/icons/icon-movie-alt.d.ts +1 -1
  1029. package/dist-cms/packages/core/icon-registry/icons/icon-movie-alt.js +1 -17
  1030. package/dist-cms/packages/core/icon-registry/icons/icon-movie.d.ts +1 -1
  1031. package/dist-cms/packages/core/icon-registry/icons/icon-movie.js +1 -21
  1032. package/dist-cms/packages/core/icon-registry/icons/icon-multiple-credit-cards.d.ts +1 -1
  1033. package/dist-cms/packages/core/icon-registry/icons/icon-multiple-credit-cards.js +1 -16
  1034. package/dist-cms/packages/core/icon-registry/icons/icon-multiple-windows.d.ts +1 -1
  1035. package/dist-cms/packages/core/icon-registry/icons/icon-multiple-windows.js +1 -16
  1036. package/dist-cms/packages/core/icon-registry/icons/icon-music.d.ts +1 -1
  1037. package/dist-cms/packages/core/icon-registry/icons/icon-music.js +1 -16
  1038. package/dist-cms/packages/core/icon-registry/icons/icon-name-badge.d.ts +1 -1
  1039. package/dist-cms/packages/core/icon-registry/icons/icon-name-badge.js +1 -18
  1040. package/dist-cms/packages/core/icon-registry/icons/icon-navigation-bottom.d.ts +1 -1
  1041. package/dist-cms/packages/core/icon-registry/icons/icon-navigation-bottom.js +1 -16
  1042. package/dist-cms/packages/core/icon-registry/icons/icon-navigation-down.d.ts +1 -1
  1043. package/dist-cms/packages/core/icon-registry/icons/icon-navigation-down.js +1 -14
  1044. package/dist-cms/packages/core/icon-registry/icons/icon-navigation-first.d.ts +1 -1
  1045. package/dist-cms/packages/core/icon-registry/icons/icon-navigation-first.js +1 -16
  1046. package/dist-cms/packages/core/icon-registry/icons/icon-navigation-horizontal.d.ts +1 -1
  1047. package/dist-cms/packages/core/icon-registry/icons/icon-navigation-horizontal.js +1 -16
  1048. package/dist-cms/packages/core/icon-registry/icons/icon-navigation-last.d.ts +1 -1
  1049. package/dist-cms/packages/core/icon-registry/icons/icon-navigation-last.js +1 -16
  1050. package/dist-cms/packages/core/icon-registry/icons/icon-navigation-left.d.ts +1 -1
  1051. package/dist-cms/packages/core/icon-registry/icons/icon-navigation-left.js +1 -14
  1052. package/dist-cms/packages/core/icon-registry/icons/icon-navigation-right.d.ts +1 -1
  1053. package/dist-cms/packages/core/icon-registry/icons/icon-navigation-right.js +1 -14
  1054. package/dist-cms/packages/core/icon-registry/icons/icon-navigation-road.d.ts +1 -1
  1055. package/dist-cms/packages/core/icon-registry/icons/icon-navigation-road.js +1 -16
  1056. package/dist-cms/packages/core/icon-registry/icons/icon-navigation-top.d.ts +1 -1
  1057. package/dist-cms/packages/core/icon-registry/icons/icon-navigation-top.js +1 -16
  1058. package/dist-cms/packages/core/icon-registry/icons/icon-navigation-up.d.ts +1 -1
  1059. package/dist-cms/packages/core/icon-registry/icons/icon-navigation-up.js +1 -14
  1060. package/dist-cms/packages/core/icon-registry/icons/icon-navigation-vertical.d.ts +1 -1
  1061. package/dist-cms/packages/core/icon-registry/icons/icon-navigation-vertical.js +1 -16
  1062. package/dist-cms/packages/core/icon-registry/icons/icon-navigation.d.ts +1 -1
  1063. package/dist-cms/packages/core/icon-registry/icons/icon-navigation.js +1 -19
  1064. package/dist-cms/packages/core/icon-registry/icons/icon-navigational-arrow.d.ts +1 -1
  1065. package/dist-cms/packages/core/icon-registry/icons/icon-navigational-arrow.js +1 -14
  1066. package/dist-cms/packages/core/icon-registry/icons/icon-network-alt.d.ts +1 -1
  1067. package/dist-cms/packages/core/icon-registry/icons/icon-network-alt.js +1 -18
  1068. package/dist-cms/packages/core/icon-registry/icons/icon-newspaper-alt.d.ts +1 -1
  1069. package/dist-cms/packages/core/icon-registry/icons/icon-newspaper-alt.js +1 -17
  1070. package/dist-cms/packages/core/icon-registry/icons/icon-newspaper.d.ts +1 -1
  1071. package/dist-cms/packages/core/icon-registry/icons/icon-newspaper.js +1 -17
  1072. package/dist-cms/packages/core/icon-registry/icons/icon-next-media.d.ts +1 -1
  1073. package/dist-cms/packages/core/icon-registry/icons/icon-next-media.js +1 -15
  1074. package/dist-cms/packages/core/icon-registry/icons/icon-next.d.ts +1 -1
  1075. package/dist-cms/packages/core/icon-registry/icons/icon-next.js +1 -14
  1076. package/dist-cms/packages/core/icon-registry/icons/icon-nodes.d.ts +1 -1
  1077. package/dist-cms/packages/core/icon-registry/icons/icon-nodes.js +1 -20
  1078. package/dist-cms/packages/core/icon-registry/icons/icon-notepad-alt.d.ts +1 -1
  1079. package/dist-cms/packages/core/icon-registry/icons/icon-notepad-alt.js +1 -18
  1080. package/dist-cms/packages/core/icon-registry/icons/icon-notepad.d.ts +1 -1
  1081. package/dist-cms/packages/core/icon-registry/icons/icon-notepad.js +1 -18
  1082. package/dist-cms/packages/core/icon-registry/icons/icon-old-key.d.ts +1 -1
  1083. package/dist-cms/packages/core/icon-registry/icons/icon-old-key.js +1 -16
  1084. package/dist-cms/packages/core/icon-registry/icons/icon-old-phone.d.ts +1 -1
  1085. package/dist-cms/packages/core/icon-registry/icons/icon-old-phone.js +1 -14
  1086. package/dist-cms/packages/core/icon-registry/icons/icon-operator.d.ts +1 -1
  1087. package/dist-cms/packages/core/icon-registry/icons/icon-operator.js +1 -24
  1088. package/dist-cms/packages/core/icon-registry/icons/icon-ordered-list.d.ts +1 -1
  1089. package/dist-cms/packages/core/icon-registry/icons/icon-ordered-list.js +1 -19
  1090. package/dist-cms/packages/core/icon-registry/icons/icon-origami.d.ts +1 -1
  1091. package/dist-cms/packages/core/icon-registry/icons/icon-origami.js +1 -16
  1092. package/dist-cms/packages/core/icon-registry/icons/icon-os-x.d.ts +1 -1
  1093. package/dist-cms/packages/core/icon-registry/icons/icon-os-x.js +1 -1
  1094. package/dist-cms/packages/core/icon-registry/icons/icon-out.d.ts +1 -1
  1095. package/dist-cms/packages/core/icon-registry/icons/icon-out.js +1 -16
  1096. package/dist-cms/packages/core/icon-registry/icons/icon-outbox.d.ts +1 -1
  1097. package/dist-cms/packages/core/icon-registry/icons/icon-outbox.js +1 -18
  1098. package/dist-cms/packages/core/icon-registry/icons/icon-outdent.d.ts +1 -1
  1099. package/dist-cms/packages/core/icon-registry/icons/icon-outdent.js +1 -17
  1100. package/dist-cms/packages/core/icon-registry/icons/icon-page-add.d.ts +1 -1
  1101. package/dist-cms/packages/core/icon-registry/icons/icon-page-add.js +1 -17
  1102. package/dist-cms/packages/core/icon-registry/icons/icon-page-down.d.ts +1 -1
  1103. package/dist-cms/packages/core/icon-registry/icons/icon-page-down.js +1 -16
  1104. package/dist-cms/packages/core/icon-registry/icons/icon-page-remove.d.ts +1 -1
  1105. package/dist-cms/packages/core/icon-registry/icons/icon-page-remove.js +1 -16
  1106. package/dist-cms/packages/core/icon-registry/icons/icon-page-restricted.d.ts +1 -1
  1107. package/dist-cms/packages/core/icon-registry/icons/icon-page-restricted.js +1 -17
  1108. package/dist-cms/packages/core/icon-registry/icons/icon-page-up.d.ts +1 -1
  1109. package/dist-cms/packages/core/icon-registry/icons/icon-page-up.js +1 -16
  1110. package/dist-cms/packages/core/icon-registry/icons/icon-paint-roller.d.ts +1 -1
  1111. package/dist-cms/packages/core/icon-registry/icons/icon-paint-roller.js +1 -17
  1112. package/dist-cms/packages/core/icon-registry/icons/icon-palette.d.ts +1 -1
  1113. package/dist-cms/packages/core/icon-registry/icons/icon-palette.js +1 -18
  1114. package/dist-cms/packages/core/icon-registry/icons/icon-panel-show.d.ts +1 -1
  1115. package/dist-cms/packages/core/icon-registry/icons/icon-panel-show.js +1 -16
  1116. package/dist-cms/packages/core/icon-registry/icons/icon-pannel-close.d.ts +1 -1
  1117. package/dist-cms/packages/core/icon-registry/icons/icon-pannel-close.js +1 -16
  1118. package/dist-cms/packages/core/icon-registry/icons/icon-pants.d.ts +1 -1
  1119. package/dist-cms/packages/core/icon-registry/icons/icon-pants.js +1 -1
  1120. package/dist-cms/packages/core/icon-registry/icons/icon-paper-bag.d.ts +1 -1
  1121. package/dist-cms/packages/core/icon-registry/icons/icon-paper-bag.js +1 -20
  1122. package/dist-cms/packages/core/icon-registry/icons/icon-paper-plane-alt.d.ts +1 -1
  1123. package/dist-cms/packages/core/icon-registry/icons/icon-paper-plane-alt.js +1 -15
  1124. package/dist-cms/packages/core/icon-registry/icons/icon-paper-plane.d.ts +1 -1
  1125. package/dist-cms/packages/core/icon-registry/icons/icon-paper-plane.js +1 -15
  1126. package/dist-cms/packages/core/icon-registry/icons/icon-parachute-drop.d.ts +1 -1
  1127. package/dist-cms/packages/core/icon-registry/icons/icon-parachute-drop.js +1 -1
  1128. package/dist-cms/packages/core/icon-registry/icons/icon-parental-control.d.ts +1 -1
  1129. package/dist-cms/packages/core/icon-registry/icons/icon-parental-control.js +1 -1
  1130. package/dist-cms/packages/core/icon-registry/icons/icon-partly-cloudy.d.ts +1 -1
  1131. package/dist-cms/packages/core/icon-registry/icons/icon-partly-cloudy.js +1 -19
  1132. package/dist-cms/packages/core/icon-registry/icons/icon-paste-in.d.ts +1 -1
  1133. package/dist-cms/packages/core/icon-registry/icons/icon-paste-in.js +1 -16
  1134. package/dist-cms/packages/core/icon-registry/icons/icon-path.d.ts +1 -1
  1135. package/dist-cms/packages/core/icon-registry/icons/icon-path.js +1 -1
  1136. package/dist-cms/packages/core/icon-registry/icons/icon-pause.d.ts +1 -1
  1137. package/dist-cms/packages/core/icon-registry/icons/icon-pause.js +1 -15
  1138. package/dist-cms/packages/core/icon-registry/icons/icon-pc.d.ts +1 -1
  1139. package/dist-cms/packages/core/icon-registry/icons/icon-pc.js +1 -16
  1140. package/dist-cms/packages/core/icon-registry/icons/icon-people-alt-2.d.ts +1 -1
  1141. package/dist-cms/packages/core/icon-registry/icons/icon-people-alt-2.js +1 -17
  1142. package/dist-cms/packages/core/icon-registry/icons/icon-people-alt.d.ts +1 -1
  1143. package/dist-cms/packages/core/icon-registry/icons/icon-people-alt.js +1 -17
  1144. package/dist-cms/packages/core/icon-registry/icons/icon-people-female.d.ts +1 -1
  1145. package/dist-cms/packages/core/icon-registry/icons/icon-people-female.js +1 -17
  1146. package/dist-cms/packages/core/icon-registry/icons/icon-people.d.ts +1 -1
  1147. package/dist-cms/packages/core/icon-registry/icons/icon-people.js +1 -17
  1148. package/dist-cms/packages/core/icon-registry/icons/icon-phone-ring.d.ts +1 -1
  1149. package/dist-cms/packages/core/icon-registry/icons/icon-phone-ring.js +1 -16
  1150. package/dist-cms/packages/core/icon-registry/icons/icon-phone.d.ts +1 -1
  1151. package/dist-cms/packages/core/icon-registry/icons/icon-phone.js +1 -14
  1152. package/dist-cms/packages/core/icon-registry/icons/icon-photo-album.d.ts +1 -1
  1153. package/dist-cms/packages/core/icon-registry/icons/icon-photo-album.js +1 -16
  1154. package/dist-cms/packages/core/icon-registry/icons/icon-picture.d.ts +1 -1
  1155. package/dist-cms/packages/core/icon-registry/icons/icon-picture.js +1 -16
  1156. package/dist-cms/packages/core/icon-registry/icons/icon-pictures-alt-2.d.ts +1 -1
  1157. package/dist-cms/packages/core/icon-registry/icons/icon-pictures-alt-2.js +1 -18
  1158. package/dist-cms/packages/core/icon-registry/icons/icon-pictures-alt.d.ts +1 -1
  1159. package/dist-cms/packages/core/icon-registry/icons/icon-pictures-alt.js +1 -16
  1160. package/dist-cms/packages/core/icon-registry/icons/icon-pictures.d.ts +1 -1
  1161. package/dist-cms/packages/core/icon-registry/icons/icon-pictures.js +1 -15
  1162. package/dist-cms/packages/core/icon-registry/icons/icon-pie-chart.d.ts +1 -1
  1163. package/dist-cms/packages/core/icon-registry/icons/icon-pie-chart.js +1 -15
  1164. package/dist-cms/packages/core/icon-registry/icons/icon-piggy-bank.d.ts +1 -1
  1165. package/dist-cms/packages/core/icon-registry/icons/icon-piggy-bank.js +1 -16
  1166. package/dist-cms/packages/core/icon-registry/icons/icon-pin-location.d.ts +1 -1
  1167. package/dist-cms/packages/core/icon-registry/icons/icon-pin-location.js +1 -15
  1168. package/dist-cms/packages/core/icon-registry/icons/icon-piracy.d.ts +1 -1
  1169. package/dist-cms/packages/core/icon-registry/icons/icon-piracy.js +1 -1
  1170. package/dist-cms/packages/core/icon-registry/icons/icon-plane.d.ts +1 -1
  1171. package/dist-cms/packages/core/icon-registry/icons/icon-plane.js +1 -14
  1172. package/dist-cms/packages/core/icon-registry/icons/icon-planet.d.ts +1 -1
  1173. package/dist-cms/packages/core/icon-registry/icons/icon-planet.js +1 -18
  1174. package/dist-cms/packages/core/icon-registry/icons/icon-play.d.ts +1 -1
  1175. package/dist-cms/packages/core/icon-registry/icons/icon-play.js +1 -14
  1176. package/dist-cms/packages/core/icon-registry/icons/icon-playing-cards.d.ts +1 -1
  1177. package/dist-cms/packages/core/icon-registry/icons/icon-playing-cards.js +1 -16
  1178. package/dist-cms/packages/core/icon-registry/icons/icon-playlist.d.ts +1 -1
  1179. package/dist-cms/packages/core/icon-registry/icons/icon-playlist.js +1 -18
  1180. package/dist-cms/packages/core/icon-registry/icons/icon-plugin.d.ts +1 -1
  1181. package/dist-cms/packages/core/icon-registry/icons/icon-plugin.js +1 -15
  1182. package/dist-cms/packages/core/icon-registry/icons/icon-podcast.d.ts +1 -1
  1183. package/dist-cms/packages/core/icon-registry/icons/icon-podcast.js +1 -17
  1184. package/dist-cms/packages/core/icon-registry/icons/icon-poker-chip.d.ts +1 -1
  1185. package/dist-cms/packages/core/icon-registry/icons/icon-poker-chip.js +1 -1
  1186. package/dist-cms/packages/core/icon-registry/icons/icon-poll.d.ts +1 -1
  1187. package/dist-cms/packages/core/icon-registry/icons/icon-poll.js +1 -16
  1188. package/dist-cms/packages/core/icon-registry/icons/icon-post-it.d.ts +1 -1
  1189. package/dist-cms/packages/core/icon-registry/icons/icon-post-it.js +1 -15
  1190. package/dist-cms/packages/core/icon-registry/icons/icon-pound-bag.d.ts +1 -1
  1191. package/dist-cms/packages/core/icon-registry/icons/icon-pound-bag.js +1 -1
  1192. package/dist-cms/packages/core/icon-registry/icons/icon-power-outlet.d.ts +1 -1
  1193. package/dist-cms/packages/core/icon-registry/icons/icon-power-outlet.js +1 -16
  1194. package/dist-cms/packages/core/icon-registry/icons/icon-power.d.ts +1 -1
  1195. package/dist-cms/packages/core/icon-registry/icons/icon-power.js +1 -15
  1196. package/dist-cms/packages/core/icon-registry/icons/icon-presentation.d.ts +1 -1
  1197. package/dist-cms/packages/core/icon-registry/icons/icon-presentation.js +1 -16
  1198. package/dist-cms/packages/core/icon-registry/icons/icon-previous-media.d.ts +1 -1
  1199. package/dist-cms/packages/core/icon-registry/icons/icon-previous-media.js +1 -15
  1200. package/dist-cms/packages/core/icon-registry/icons/icon-previous.d.ts +1 -1
  1201. package/dist-cms/packages/core/icon-registry/icons/icon-previous.js +1 -15
  1202. package/dist-cms/packages/core/icon-registry/icons/icon-price-dollar.d.ts +1 -1
  1203. package/dist-cms/packages/core/icon-registry/icons/icon-price-dollar.js +1 -16
  1204. package/dist-cms/packages/core/icon-registry/icons/icon-price-euro.d.ts +1 -1
  1205. package/dist-cms/packages/core/icon-registry/icons/icon-price-euro.js +1 -16
  1206. package/dist-cms/packages/core/icon-registry/icons/icon-price-pound.d.ts +1 -1
  1207. package/dist-cms/packages/core/icon-registry/icons/icon-price-pound.js +1 -17
  1208. package/dist-cms/packages/core/icon-registry/icons/icon-price-yen.d.ts +1 -1
  1209. package/dist-cms/packages/core/icon-registry/icons/icon-price-yen.js +1 -18
  1210. package/dist-cms/packages/core/icon-registry/icons/icon-print.d.ts +1 -1
  1211. package/dist-cms/packages/core/icon-registry/icons/icon-print.js +1 -16
  1212. package/dist-cms/packages/core/icon-registry/icons/icon-printer-alt.d.ts +1 -1
  1213. package/dist-cms/packages/core/icon-registry/icons/icon-printer-alt.js +1 -16
  1214. package/dist-cms/packages/core/icon-registry/icons/icon-projector.d.ts +1 -1
  1215. package/dist-cms/packages/core/icon-registry/icons/icon-projector.js +1 -19
  1216. package/dist-cms/packages/core/icon-registry/icons/icon-pulse.d.ts +1 -1
  1217. package/dist-cms/packages/core/icon-registry/icons/icon-pulse.js +1 -14
  1218. package/dist-cms/packages/core/icon-registry/icons/icon-pushpin.d.ts +1 -1
  1219. package/dist-cms/packages/core/icon-registry/icons/icon-pushpin.js +1 -15
  1220. package/dist-cms/packages/core/icon-registry/icons/icon-puzzle-piece.d.ts +2 -0
  1221. package/dist-cms/packages/core/icon-registry/icons/icon-puzzle-piece.js +1 -0
  1222. package/dist-cms/packages/core/icon-registry/icons/icon-qr-code.d.ts +1 -1
  1223. package/dist-cms/packages/core/icon-registry/icons/icon-qr-code.js +1 -25
  1224. package/dist-cms/packages/core/icon-registry/icons/icon-quote.d.ts +1 -1
  1225. package/dist-cms/packages/core/icon-registry/icons/icon-quote.js +1 -15
  1226. package/dist-cms/packages/core/icon-registry/icons/icon-radio-alt.d.ts +1 -1
  1227. package/dist-cms/packages/core/icon-registry/icons/icon-radio-alt.js +1 -18
  1228. package/dist-cms/packages/core/icon-registry/icons/icon-radio-receiver.d.ts +1 -1
  1229. package/dist-cms/packages/core/icon-registry/icons/icon-radio-receiver.js +1 -20
  1230. package/dist-cms/packages/core/icon-registry/icons/icon-radio.d.ts +1 -1
  1231. package/dist-cms/packages/core/icon-registry/icons/icon-radio.js +1 -20
  1232. package/dist-cms/packages/core/icon-registry/icons/icon-rain.d.ts +1 -1
  1233. package/dist-cms/packages/core/icon-registry/icons/icon-rain.js +1 -17
  1234. package/dist-cms/packages/core/icon-registry/icons/icon-rate.d.ts +1 -1
  1235. package/dist-cms/packages/core/icon-registry/icons/icon-rate.js +1 -14
  1236. package/dist-cms/packages/core/icon-registry/icons/icon-re-post.d.ts +1 -1
  1237. package/dist-cms/packages/core/icon-registry/icons/icon-re-post.js +1 -17
  1238. package/dist-cms/packages/core/icon-registry/icons/icon-readonly.d.ts +1 -1
  1239. package/dist-cms/packages/core/icon-registry/icons/icon-readonly.js +1 -17
  1240. package/dist-cms/packages/core/icon-registry/icons/icon-receipt-alt.d.ts +1 -1
  1241. package/dist-cms/packages/core/icon-registry/icons/icon-receipt-alt.js +1 -16
  1242. package/dist-cms/packages/core/icon-registry/icons/icon-receipt-dollar.d.ts +1 -1
  1243. package/dist-cms/packages/core/icon-registry/icons/icon-receipt-dollar.js +1 -1
  1244. package/dist-cms/packages/core/icon-registry/icons/icon-receipt-euro.d.ts +1 -1
  1245. package/dist-cms/packages/core/icon-registry/icons/icon-receipt-euro.js +1 -1
  1246. package/dist-cms/packages/core/icon-registry/icons/icon-receipt-pound.d.ts +1 -1
  1247. package/dist-cms/packages/core/icon-registry/icons/icon-receipt-pound.js +1 -1
  1248. package/dist-cms/packages/core/icon-registry/icons/icon-receipt-yen.d.ts +1 -1
  1249. package/dist-cms/packages/core/icon-registry/icons/icon-receipt-yen.js +1 -1
  1250. package/dist-cms/packages/core/icon-registry/icons/icon-reception.d.ts +1 -1
  1251. package/dist-cms/packages/core/icon-registry/icons/icon-reception.js +1 -17
  1252. package/dist-cms/packages/core/icon-registry/icons/icon-record.d.ts +1 -1
  1253. package/dist-cms/packages/core/icon-registry/icons/icon-record.js +1 -17
  1254. package/dist-cms/packages/core/icon-registry/icons/icon-rectangle-ellipsis.d.ts +1 -1
  1255. package/dist-cms/packages/core/icon-registry/icons/icon-rectangle-ellipsis.js +1 -17
  1256. package/dist-cms/packages/core/icon-registry/icons/icon-redo.d.ts +1 -1
  1257. package/dist-cms/packages/core/icon-registry/icons/icon-redo.js +1 -15
  1258. package/dist-cms/packages/core/icon-registry/icons/icon-refresh.d.ts +1 -1
  1259. package/dist-cms/packages/core/icon-registry/icons/icon-refresh.js +1 -15
  1260. package/dist-cms/packages/core/icon-registry/icons/icon-remote.d.ts +1 -1
  1261. package/dist-cms/packages/core/icon-registry/icons/icon-remote.js +1 -23
  1262. package/dist-cms/packages/core/icon-registry/icons/icon-remove.d.ts +1 -1
  1263. package/dist-cms/packages/core/icon-registry/icons/icon-remove.js +1 -18
  1264. package/dist-cms/packages/core/icon-registry/icons/icon-repeat-one.d.ts +1 -1
  1265. package/dist-cms/packages/core/icon-registry/icons/icon-repeat-one.js +1 -18
  1266. package/dist-cms/packages/core/icon-registry/icons/icon-repeat.d.ts +1 -1
  1267. package/dist-cms/packages/core/icon-registry/icons/icon-repeat.js +1 -17
  1268. package/dist-cms/packages/core/icon-registry/icons/icon-reply-arrow.d.ts +1 -1
  1269. package/dist-cms/packages/core/icon-registry/icons/icon-reply-arrow.js +1 -15
  1270. package/dist-cms/packages/core/icon-registry/icons/icon-resize.d.ts +1 -1
  1271. package/dist-cms/packages/core/icon-registry/icons/icon-resize.js +1 -17
  1272. package/dist-cms/packages/core/icon-registry/icons/icon-return-to-top.d.ts +1 -1
  1273. package/dist-cms/packages/core/icon-registry/icons/icon-return-to-top.js +1 -16
  1274. package/dist-cms/packages/core/icon-registry/icons/icon-right-double-arrow.d.ts +1 -1
  1275. package/dist-cms/packages/core/icon-registry/icons/icon-right-double-arrow.js +1 -15
  1276. package/dist-cms/packages/core/icon-registry/icons/icon-road.d.ts +1 -1
  1277. package/dist-cms/packages/core/icon-registry/icons/icon-road.js +1 -1
  1278. package/dist-cms/packages/core/icon-registry/icons/icon-roadsign.d.ts +1 -1
  1279. package/dist-cms/packages/core/icon-registry/icons/icon-roadsign.js +1 -16
  1280. package/dist-cms/packages/core/icon-registry/icons/icon-rocket.d.ts +1 -1
  1281. package/dist-cms/packages/core/icon-registry/icons/icon-rocket.js +1 -17
  1282. package/dist-cms/packages/core/icon-registry/icons/icon-rss.d.ts +1 -1
  1283. package/dist-cms/packages/core/icon-registry/icons/icon-rss.js +1 -16
  1284. package/dist-cms/packages/core/icon-registry/icons/icon-ruler-alt.d.ts +1 -1
  1285. package/dist-cms/packages/core/icon-registry/icons/icon-ruler-alt.js +1 -19
  1286. package/dist-cms/packages/core/icon-registry/icons/icon-ruler.d.ts +1 -1
  1287. package/dist-cms/packages/core/icon-registry/icons/icon-ruler.js +1 -18
  1288. package/dist-cms/packages/core/icon-registry/icons/icon-safe.d.ts +1 -1
  1289. package/dist-cms/packages/core/icon-registry/icons/icon-safe.js +1 -1
  1290. package/dist-cms/packages/core/icon-registry/icons/icon-safedial.d.ts +1 -1
  1291. package/dist-cms/packages/core/icon-registry/icons/icon-safedial.js +1 -1
  1292. package/dist-cms/packages/core/icon-registry/icons/icon-sandbox-toys.d.ts +1 -1
  1293. package/dist-cms/packages/core/icon-registry/icons/icon-sandbox-toys.js +1 -1
  1294. package/dist-cms/packages/core/icon-registry/icons/icon-satellite-dish.d.ts +1 -1
  1295. package/dist-cms/packages/core/icon-registry/icons/icon-satellite-dish.js +1 -17
  1296. package/dist-cms/packages/core/icon-registry/icons/icon-save.d.ts +1 -1
  1297. package/dist-cms/packages/core/icon-registry/icons/icon-save.js +1 -16
  1298. package/dist-cms/packages/core/icon-registry/icons/icon-scan.d.ts +1 -1
  1299. package/dist-cms/packages/core/icon-registry/icons/icon-scan.js +1 -21
  1300. package/dist-cms/packages/core/icon-registry/icons/icon-school.d.ts +1 -1
  1301. package/dist-cms/packages/core/icon-registry/icons/icon-school.js +1 -19
  1302. package/dist-cms/packages/core/icon-registry/icons/icon-science.d.ts +1 -1
  1303. package/dist-cms/packages/core/icon-registry/icons/icon-science.js +1 -16
  1304. package/dist-cms/packages/core/icon-registry/icons/icon-screensharing.d.ts +1 -1
  1305. package/dist-cms/packages/core/icon-registry/icons/icon-screensharing.js +1 -18
  1306. package/dist-cms/packages/core/icon-registry/icons/icon-script-alt.d.ts +1 -1
  1307. package/dist-cms/packages/core/icon-registry/icons/icon-script-alt.js +1 -15
  1308. package/dist-cms/packages/core/icon-registry/icons/icon-script.d.ts +1 -1
  1309. package/dist-cms/packages/core/icon-registry/icons/icon-script.js +1 -17
  1310. package/dist-cms/packages/core/icon-registry/icons/icon-scull.d.ts +1 -1
  1311. package/dist-cms/packages/core/icon-registry/icons/icon-scull.js +1 -17
  1312. package/dist-cms/packages/core/icon-registry/icons/icon-search.d.ts +1 -1
  1313. package/dist-cms/packages/core/icon-registry/icons/icon-search.js +1 -15
  1314. package/dist-cms/packages/core/icon-registry/icons/icon-security-camera.d.ts +1 -1
  1315. package/dist-cms/packages/core/icon-registry/icons/icon-security-camera.js +1 -1
  1316. package/dist-cms/packages/core/icon-registry/icons/icon-sensor.d.ts +1 -1
  1317. package/dist-cms/packages/core/icon-registry/icons/icon-sensor.js +1 -19
  1318. package/dist-cms/packages/core/icon-registry/icons/icon-server-alt.d.ts +1 -1
  1319. package/dist-cms/packages/core/icon-registry/icons/icon-server-alt.js +1 -16
  1320. package/dist-cms/packages/core/icon-registry/icons/icon-server.d.ts +1 -1
  1321. package/dist-cms/packages/core/icon-registry/icons/icon-server.js +1 -17
  1322. package/dist-cms/packages/core/icon-registry/icons/icon-settings-alt-2.d.ts +1 -1
  1323. package/dist-cms/packages/core/icon-registry/icons/icon-settings-alt-2.js +1 -1
  1324. package/dist-cms/packages/core/icon-registry/icons/icon-settings-alt.d.ts +1 -1
  1325. package/dist-cms/packages/core/icon-registry/icons/icon-settings-alt.js +1 -15
  1326. package/dist-cms/packages/core/icon-registry/icons/icon-settings.d.ts +1 -1
  1327. package/dist-cms/packages/core/icon-registry/icons/icon-settings.js +1 -15
  1328. package/dist-cms/packages/core/icon-registry/icons/icon-share-alt-2.d.ts +1 -1
  1329. package/dist-cms/packages/core/icon-registry/icons/icon-share-alt-2.js +1 -1
  1330. package/dist-cms/packages/core/icon-registry/icons/icon-share-alt.d.ts +1 -1
  1331. package/dist-cms/packages/core/icon-registry/icons/icon-share-alt.js +1 -17
  1332. package/dist-cms/packages/core/icon-registry/icons/icon-share.d.ts +1 -1
  1333. package/dist-cms/packages/core/icon-registry/icons/icon-share.js +1 -18
  1334. package/dist-cms/packages/core/icon-registry/icons/icon-sharing-iphone.d.ts +1 -1
  1335. package/dist-cms/packages/core/icon-registry/icons/icon-sharing-iphone.js +1 -16
  1336. package/dist-cms/packages/core/icon-registry/icons/icon-shield.d.ts +1 -1
  1337. package/dist-cms/packages/core/icon-registry/icons/icon-shield.js +1 -15
  1338. package/dist-cms/packages/core/icon-registry/icons/icon-shift.d.ts +1 -1
  1339. package/dist-cms/packages/core/icon-registry/icons/icon-shift.js +1 -14
  1340. package/dist-cms/packages/core/icon-registry/icons/icon-shipping-box.d.ts +1 -1
  1341. package/dist-cms/packages/core/icon-registry/icons/icon-shipping-box.js +1 -18
  1342. package/dist-cms/packages/core/icon-registry/icons/icon-shipping.d.ts +1 -1
  1343. package/dist-cms/packages/core/icon-registry/icons/icon-shipping.js +1 -18
  1344. package/dist-cms/packages/core/icon-registry/icons/icon-shoe.d.ts +1 -1
  1345. package/dist-cms/packages/core/icon-registry/icons/icon-shoe.js +1 -17
  1346. package/dist-cms/packages/core/icon-registry/icons/icon-shopping-basket-alt-2.d.ts +1 -1
  1347. package/dist-cms/packages/core/icon-registry/icons/icon-shopping-basket-alt-2.js +1 -20
  1348. package/dist-cms/packages/core/icon-registry/icons/icon-shopping-basket-alt.d.ts +1 -1
  1349. package/dist-cms/packages/core/icon-registry/icons/icon-shopping-basket-alt.js +1 -20
  1350. package/dist-cms/packages/core/icon-registry/icons/icon-shopping-basket.d.ts +1 -1
  1351. package/dist-cms/packages/core/icon-registry/icons/icon-shopping-basket.js +1 -16
  1352. package/dist-cms/packages/core/icon-registry/icons/icon-shorts.d.ts +1 -1
  1353. package/dist-cms/packages/core/icon-registry/icons/icon-shorts.js +1 -1
  1354. package/dist-cms/packages/core/icon-registry/icons/icon-shuffle.d.ts +1 -1
  1355. package/dist-cms/packages/core/icon-registry/icons/icon-shuffle.js +1 -18
  1356. package/dist-cms/packages/core/icon-registry/icons/icon-sience.d.ts +1 -1
  1357. package/dist-cms/packages/core/icon-registry/icons/icon-sience.js +1 -16
  1358. package/dist-cms/packages/core/icon-registry/icons/icon-simcard.d.ts +1 -1
  1359. package/dist-cms/packages/core/icon-registry/icons/icon-simcard.js +1 -1
  1360. package/dist-cms/packages/core/icon-registry/icons/icon-single-note.d.ts +1 -1
  1361. package/dist-cms/packages/core/icon-registry/icons/icon-single-note.js +1 -15
  1362. package/dist-cms/packages/core/icon-registry/icons/icon-sitemap.d.ts +1 -1
  1363. package/dist-cms/packages/core/icon-registry/icons/icon-sitemap.js +1 -18
  1364. package/dist-cms/packages/core/icon-registry/icons/icon-sleep.d.ts +1 -1
  1365. package/dist-cms/packages/core/icon-registry/icons/icon-sleep.js +1 -16
  1366. package/dist-cms/packages/core/icon-registry/icons/icon-slideshow.d.ts +1 -1
  1367. package/dist-cms/packages/core/icon-registry/icons/icon-slideshow.js +1 -16
  1368. package/dist-cms/packages/core/icon-registry/icons/icon-smiley-inverted.d.ts +1 -1
  1369. package/dist-cms/packages/core/icon-registry/icons/icon-smiley-inverted.js +1 -17
  1370. package/dist-cms/packages/core/icon-registry/icons/icon-smiley.d.ts +1 -1
  1371. package/dist-cms/packages/core/icon-registry/icons/icon-smiley.js +1 -17
  1372. package/dist-cms/packages/core/icon-registry/icons/icon-snow.d.ts +1 -1
  1373. package/dist-cms/packages/core/icon-registry/icons/icon-snow.js +1 -20
  1374. package/dist-cms/packages/core/icon-registry/icons/icon-sound-low.d.ts +1 -1
  1375. package/dist-cms/packages/core/icon-registry/icons/icon-sound-low.js +1 -15
  1376. package/dist-cms/packages/core/icon-registry/icons/icon-sound-medium.d.ts +1 -1
  1377. package/dist-cms/packages/core/icon-registry/icons/icon-sound-medium.js +1 -16
  1378. package/dist-cms/packages/core/icon-registry/icons/icon-sound-off.d.ts +1 -1
  1379. package/dist-cms/packages/core/icon-registry/icons/icon-sound-off.js +1 -14
  1380. package/dist-cms/packages/core/icon-registry/icons/icon-sound-waves.d.ts +1 -1
  1381. package/dist-cms/packages/core/icon-registry/icons/icon-sound-waves.js +1 -16
  1382. package/dist-cms/packages/core/icon-registry/icons/icon-sound.d.ts +1 -1
  1383. package/dist-cms/packages/core/icon-registry/icons/icon-sound.js +1 -16
  1384. package/dist-cms/packages/core/icon-registry/icons/icon-spades.d.ts +1 -1
  1385. package/dist-cms/packages/core/icon-registry/icons/icon-spades.js +1 -15
  1386. package/dist-cms/packages/core/icon-registry/icons/icon-speaker.d.ts +1 -1
  1387. package/dist-cms/packages/core/icon-registry/icons/icon-speaker.js +1 -17
  1388. package/dist-cms/packages/core/icon-registry/icons/icon-speed-gauge.d.ts +1 -1
  1389. package/dist-cms/packages/core/icon-registry/icons/icon-speed-gauge.js +1 -16
  1390. package/dist-cms/packages/core/icon-registry/icons/icon-split-alt.d.ts +1 -1
  1391. package/dist-cms/packages/core/icon-registry/icons/icon-split-alt.js +1 -16
  1392. package/dist-cms/packages/core/icon-registry/icons/icon-split.d.ts +1 -1
  1393. package/dist-cms/packages/core/icon-registry/icons/icon-split.js +1 -17
  1394. package/dist-cms/packages/core/icon-registry/icons/icon-sprout.d.ts +1 -1
  1395. package/dist-cms/packages/core/icon-registry/icons/icon-sprout.js +1 -17
  1396. package/dist-cms/packages/core/icon-registry/icons/icon-squiggly-line.d.ts +1 -1
  1397. package/dist-cms/packages/core/icon-registry/icons/icon-squiggly-line.js +1 -16
  1398. package/dist-cms/packages/core/icon-registry/icons/icon-ssd.d.ts +1 -1
  1399. package/dist-cms/packages/core/icon-registry/icons/icon-ssd.js +1 -17
  1400. package/dist-cms/packages/core/icon-registry/icons/icon-stacked-disks.d.ts +1 -1
  1401. package/dist-cms/packages/core/icon-registry/icons/icon-stacked-disks.js +1 -17
  1402. package/dist-cms/packages/core/icon-registry/icons/icon-stamp.d.ts +1 -1
  1403. package/dist-cms/packages/core/icon-registry/icons/icon-stamp.js +1 -17
  1404. package/dist-cms/packages/core/icon-registry/icons/icon-star.d.ts +1 -1
  1405. package/dist-cms/packages/core/icon-registry/icons/icon-star.js +1 -14
  1406. package/dist-cms/packages/core/icon-registry/icons/icon-stop-alt.d.ts +1 -1
  1407. package/dist-cms/packages/core/icon-registry/icons/icon-stop-alt.js +1 -16
  1408. package/dist-cms/packages/core/icon-registry/icons/icon-stop-hand.d.ts +1 -1
  1409. package/dist-cms/packages/core/icon-registry/icons/icon-stop-hand.js +1 -17
  1410. package/dist-cms/packages/core/icon-registry/icons/icon-stop.d.ts +1 -1
  1411. package/dist-cms/packages/core/icon-registry/icons/icon-stop.js +1 -14
  1412. package/dist-cms/packages/core/icon-registry/icons/icon-store.d.ts +1 -1
  1413. package/dist-cms/packages/core/icon-registry/icons/icon-store.js +1 -18
  1414. package/dist-cms/packages/core/icon-registry/icons/icon-stream.d.ts +1 -1
  1415. package/dist-cms/packages/core/icon-registry/icons/icon-stream.js +1 -15
  1416. package/dist-cms/packages/core/icon-registry/icons/icon-strikethrough.d.ts +1 -1
  1417. package/dist-cms/packages/core/icon-registry/icons/icon-strikethrough.js +1 -16
  1418. package/dist-cms/packages/core/icon-registry/icons/icon-subscript.d.ts +1 -1
  1419. package/dist-cms/packages/core/icon-registry/icons/icon-subscript.js +1 -16
  1420. package/dist-cms/packages/core/icon-registry/icons/icon-sunny.d.ts +1 -1
  1421. package/dist-cms/packages/core/icon-registry/icons/icon-sunny.js +1 -22
  1422. package/dist-cms/packages/core/icon-registry/icons/icon-superscript.d.ts +1 -1
  1423. package/dist-cms/packages/core/icon-registry/icons/icon-superscript.js +1 -16
  1424. package/dist-cms/packages/core/icon-registry/icons/icon-sweatshirt.d.ts +1 -1
  1425. package/dist-cms/packages/core/icon-registry/icons/icon-sweatshirt.js +1 -14
  1426. package/dist-cms/packages/core/icon-registry/icons/icon-sync.d.ts +1 -1
  1427. package/dist-cms/packages/core/icon-registry/icons/icon-sync.js +1 -17
  1428. package/dist-cms/packages/core/icon-registry/icons/icon-t-shirt.d.ts +1 -1
  1429. package/dist-cms/packages/core/icon-registry/icons/icon-t-shirt.js +1 -14
  1430. package/dist-cms/packages/core/icon-registry/icons/icon-tab-key.d.ts +1 -1
  1431. package/dist-cms/packages/core/icon-registry/icons/icon-tab-key.js +1 -16
  1432. package/dist-cms/packages/core/icon-registry/icons/icon-tab.d.ts +1 -1
  1433. package/dist-cms/packages/core/icon-registry/icons/icon-tab.js +1 -1
  1434. package/dist-cms/packages/core/icon-registry/icons/icon-table.d.ts +1 -1
  1435. package/dist-cms/packages/core/icon-registry/icons/icon-table.js +1 -17
  1436. package/dist-cms/packages/core/icon-registry/icons/icon-tactics.d.ts +1 -1
  1437. package/dist-cms/packages/core/icon-registry/icons/icon-tactics.js +1 -1
  1438. package/dist-cms/packages/core/icon-registry/icons/icon-tag.d.ts +1 -1
  1439. package/dist-cms/packages/core/icon-registry/icons/icon-tag.js +1 -15
  1440. package/dist-cms/packages/core/icon-registry/icons/icon-tags.d.ts +1 -1
  1441. package/dist-cms/packages/core/icon-registry/icons/icon-tags.js +1 -16
  1442. package/dist-cms/packages/core/icon-registry/icons/icon-takeaway-cup.d.ts +1 -1
  1443. package/dist-cms/packages/core/icon-registry/icons/icon-takeaway-cup.js +1 -17
  1444. package/dist-cms/packages/core/icon-registry/icons/icon-target.d.ts +1 -1
  1445. package/dist-cms/packages/core/icon-registry/icons/icon-target.js +1 -16
  1446. package/dist-cms/packages/core/icon-registry/icons/icon-temperatrure-alt.d.ts +1 -1
  1447. package/dist-cms/packages/core/icon-registry/icons/icon-temperatrure-alt.js +1 -21
  1448. package/dist-cms/packages/core/icon-registry/icons/icon-temperature.d.ts +1 -1
  1449. package/dist-cms/packages/core/icon-registry/icons/icon-temperature.js +1 -19
  1450. package/dist-cms/packages/core/icon-registry/icons/icon-terminal.d.ts +1 -1
  1451. package/dist-cms/packages/core/icon-registry/icons/icon-terminal.js +1 -16
  1452. package/dist-cms/packages/core/icon-registry/icons/icon-text-align-center.d.ts +1 -1
  1453. package/dist-cms/packages/core/icon-registry/icons/icon-text-align-center.js +1 -16
  1454. package/dist-cms/packages/core/icon-registry/icons/icon-text-align-justify.d.ts +1 -1
  1455. package/dist-cms/packages/core/icon-registry/icons/icon-text-align-justify.js +1 -16
  1456. package/dist-cms/packages/core/icon-registry/icons/icon-text-align-left.d.ts +1 -1
  1457. package/dist-cms/packages/core/icon-registry/icons/icon-text-align-left.js +1 -16
  1458. package/dist-cms/packages/core/icon-registry/icons/icon-text-align-right.d.ts +1 -1
  1459. package/dist-cms/packages/core/icon-registry/icons/icon-text-align-right.js +1 -16
  1460. package/dist-cms/packages/core/icon-registry/icons/icon-text-direction-ltr.d.ts +2 -0
  1461. package/dist-cms/packages/core/icon-registry/icons/icon-text-direction-ltr.js +1 -0
  1462. package/dist-cms/packages/core/icon-registry/icons/icon-text-direction-rtl.d.ts +2 -0
  1463. package/dist-cms/packages/core/icon-registry/icons/icon-text-direction-rtl.js +1 -0
  1464. package/dist-cms/packages/core/icon-registry/icons/icon-theater.d.ts +1 -1
  1465. package/dist-cms/packages/core/icon-registry/icons/icon-theater.js +1 -21
  1466. package/dist-cms/packages/core/icon-registry/icons/icon-theif.d.ts +1 -1
  1467. package/dist-cms/packages/core/icon-registry/icons/icon-theif.js +1 -1
  1468. package/dist-cms/packages/core/icon-registry/icons/icon-thought-bubble.d.ts +1 -1
  1469. package/dist-cms/packages/core/icon-registry/icons/icon-thought-bubble.js +1 -1
  1470. package/dist-cms/packages/core/icon-registry/icons/icon-thumb-down.d.ts +1 -1
  1471. package/dist-cms/packages/core/icon-registry/icons/icon-thumb-down.js +1 -15
  1472. package/dist-cms/packages/core/icon-registry/icons/icon-thumb-up.d.ts +1 -1
  1473. package/dist-cms/packages/core/icon-registry/icons/icon-thumb-up.js +1 -15
  1474. package/dist-cms/packages/core/icon-registry/icons/icon-thumbnail-list.d.ts +1 -1
  1475. package/dist-cms/packages/core/icon-registry/icons/icon-thumbnail-list.js +1 -19
  1476. package/dist-cms/packages/core/icon-registry/icons/icon-thumbnails-small.d.ts +1 -1
  1477. package/dist-cms/packages/core/icon-registry/icons/icon-thumbnails-small.js +1 -22
  1478. package/dist-cms/packages/core/icon-registry/icons/icon-thumbnails.d.ts +1 -1
  1479. package/dist-cms/packages/core/icon-registry/icons/icon-thumbnails.js +1 -17
  1480. package/dist-cms/packages/core/icon-registry/icons/icon-ticket.d.ts +1 -1
  1481. package/dist-cms/packages/core/icon-registry/icons/icon-ticket.js +1 -17
  1482. package/dist-cms/packages/core/icon-registry/icons/icon-time.d.ts +1 -1
  1483. package/dist-cms/packages/core/icon-registry/icons/icon-time.js +1 -15
  1484. package/dist-cms/packages/core/icon-registry/icons/icon-timer.d.ts +1 -1
  1485. package/dist-cms/packages/core/icon-registry/icons/icon-timer.js +1 -16
  1486. package/dist-cms/packages/core/icon-registry/icons/icon-tools.d.ts +1 -1
  1487. package/dist-cms/packages/core/icon-registry/icons/icon-tools.js +1 -14
  1488. package/dist-cms/packages/core/icon-registry/icons/icon-top.d.ts +1 -1
  1489. package/dist-cms/packages/core/icon-registry/icons/icon-top.js +1 -14
  1490. package/dist-cms/packages/core/icon-registry/icons/icon-traffic-alt.d.ts +1 -1
  1491. package/dist-cms/packages/core/icon-registry/icons/icon-traffic-alt.js +1 -17
  1492. package/dist-cms/packages/core/icon-registry/icons/icon-trafic.d.ts +1 -1
  1493. package/dist-cms/packages/core/icon-registry/icons/icon-trafic.js +1 -17
  1494. package/dist-cms/packages/core/icon-registry/icons/icon-train.d.ts +1 -1
  1495. package/dist-cms/packages/core/icon-registry/icons/icon-train.js +1 -19
  1496. package/dist-cms/packages/core/icon-registry/icons/icon-trash-alt-2.d.ts +1 -1
  1497. package/dist-cms/packages/core/icon-registry/icons/icon-trash-alt-2.js +1 -18
  1498. package/dist-cms/packages/core/icon-registry/icons/icon-trash-alt.d.ts +1 -1
  1499. package/dist-cms/packages/core/icon-registry/icons/icon-trash-alt.js +1 -18
  1500. package/dist-cms/packages/core/icon-registry/icons/icon-trash.d.ts +1 -1
  1501. package/dist-cms/packages/core/icon-registry/icons/icon-trash.js +1 -18
  1502. package/dist-cms/packages/core/icon-registry/icons/icon-tree.d.ts +1 -1
  1503. package/dist-cms/packages/core/icon-registry/icons/icon-tree.js +1 -15
  1504. package/dist-cms/packages/core/icon-registry/icons/icon-trophy.d.ts +1 -1
  1505. package/dist-cms/packages/core/icon-registry/icons/icon-trophy.js +1 -19
  1506. package/dist-cms/packages/core/icon-registry/icons/icon-truck.d.ts +1 -1
  1507. package/dist-cms/packages/core/icon-registry/icons/icon-truck.js +1 -17
  1508. package/dist-cms/packages/core/icon-registry/icons/icon-tv-old.d.ts +1 -1
  1509. package/dist-cms/packages/core/icon-registry/icons/icon-tv-old.js +1 -15
  1510. package/dist-cms/packages/core/icon-registry/icons/icon-tv.d.ts +1 -1
  1511. package/dist-cms/packages/core/icon-registry/icons/icon-tv.js +1 -17
  1512. package/dist-cms/packages/core/icon-registry/icons/icon-twitter-x.d.ts +1 -1
  1513. package/dist-cms/packages/core/icon-registry/icons/icon-twitter-x.js +1 -1
  1514. package/dist-cms/packages/core/icon-registry/icons/icon-twitter.d.ts +1 -1
  1515. package/dist-cms/packages/core/icon-registry/icons/icon-twitter.js +1 -6
  1516. package/dist-cms/packages/core/icon-registry/icons/icon-umb-content.d.ts +1 -1
  1517. package/dist-cms/packages/core/icon-registry/icons/icon-umb-content.js +1 -15
  1518. package/dist-cms/packages/core/icon-registry/icons/icon-umb-contour.d.ts +1 -1
  1519. package/dist-cms/packages/core/icon-registry/icons/icon-umb-contour.js +1 -1
  1520. package/dist-cms/packages/core/icon-registry/icons/icon-umb-deploy.d.ts +1 -1
  1521. package/dist-cms/packages/core/icon-registry/icons/icon-umb-deploy.js +1 -1
  1522. package/dist-cms/packages/core/icon-registry/icons/icon-umb-developer.d.ts +1 -1
  1523. package/dist-cms/packages/core/icon-registry/icons/icon-umb-developer.js +1 -24
  1524. package/dist-cms/packages/core/icon-registry/icons/icon-umb-manifest.d.ts +1 -1
  1525. package/dist-cms/packages/core/icon-registry/icons/icon-umb-manifest.js +1 -14
  1526. package/dist-cms/packages/core/icon-registry/icons/icon-umb-media.d.ts +1 -1
  1527. package/dist-cms/packages/core/icon-registry/icons/icon-umb-media.js +1 -16
  1528. package/dist-cms/packages/core/icon-registry/icons/icon-umb-members.d.ts +1 -1
  1529. package/dist-cms/packages/core/icon-registry/icons/icon-umb-members.js +1 -1
  1530. package/dist-cms/packages/core/icon-registry/icons/icon-umb-settings.d.ts +1 -1
  1531. package/dist-cms/packages/core/icon-registry/icons/icon-umb-settings.js +1 -14
  1532. package/dist-cms/packages/core/icon-registry/icons/icon-umb-users.d.ts +1 -1
  1533. package/dist-cms/packages/core/icon-registry/icons/icon-umb-users.js +1 -15
  1534. package/dist-cms/packages/core/icon-registry/icons/icon-umbraco.d.ts +1 -1
  1535. package/dist-cms/packages/core/icon-registry/icons/icon-umbraco.js +1 -5
  1536. package/dist-cms/packages/core/icon-registry/icons/icon-umbrella.d.ts +1 -1
  1537. package/dist-cms/packages/core/icon-registry/icons/icon-umbrella.js +1 -16
  1538. package/dist-cms/packages/core/icon-registry/icons/icon-underline.d.ts +1 -1
  1539. package/dist-cms/packages/core/icon-registry/icons/icon-underline.js +1 -15
  1540. package/dist-cms/packages/core/icon-registry/icons/icon-undo.d.ts +1 -1
  1541. package/dist-cms/packages/core/icon-registry/icons/icon-undo.js +1 -15
  1542. package/dist-cms/packages/core/icon-registry/icons/icon-universal.d.ts +1 -1
  1543. package/dist-cms/packages/core/icon-registry/icons/icon-universal.js +1 -1
  1544. package/dist-cms/packages/core/icon-registry/icons/icon-unlink.d.ts +1 -1
  1545. package/dist-cms/packages/core/icon-registry/icons/icon-unlink.js +1 -19
  1546. package/dist-cms/packages/core/icon-registry/icons/icon-unlocked.d.ts +1 -1
  1547. package/dist-cms/packages/core/icon-registry/icons/icon-unlocked.js +1 -15
  1548. package/dist-cms/packages/core/icon-registry/icons/icon-unplug.d.ts +1 -1
  1549. package/dist-cms/packages/core/icon-registry/icons/icon-unplug.js +1 -19
  1550. package/dist-cms/packages/core/icon-registry/icons/icon-untitled.d.ts +1 -1
  1551. package/dist-cms/packages/core/icon-registry/icons/icon-untitled.js +1 -16
  1552. package/dist-cms/packages/core/icon-registry/icons/icon-usb-connector.d.ts +1 -1
  1553. package/dist-cms/packages/core/icon-registry/icons/icon-usb-connector.js +1 -18
  1554. package/dist-cms/packages/core/icon-registry/icons/icon-usb.d.ts +1 -1
  1555. package/dist-cms/packages/core/icon-registry/icons/icon-usb.js +1 -20
  1556. package/dist-cms/packages/core/icon-registry/icons/icon-user-female.d.ts +1 -1
  1557. package/dist-cms/packages/core/icon-registry/icons/icon-user-female.js +1 -15
  1558. package/dist-cms/packages/core/icon-registry/icons/icon-user-females-alt.d.ts +1 -1
  1559. package/dist-cms/packages/core/icon-registry/icons/icon-user-females-alt.js +1 -17
  1560. package/dist-cms/packages/core/icon-registry/icons/icon-user-females.d.ts +1 -1
  1561. package/dist-cms/packages/core/icon-registry/icons/icon-user-females.js +1 -17
  1562. package/dist-cms/packages/core/icon-registry/icons/icon-user-glasses.d.ts +1 -1
  1563. package/dist-cms/packages/core/icon-registry/icons/icon-user-glasses.js +1 -15
  1564. package/dist-cms/packages/core/icon-registry/icons/icon-user.d.ts +1 -1
  1565. package/dist-cms/packages/core/icon-registry/icons/icon-user.js +1 -15
  1566. package/dist-cms/packages/core/icon-registry/icons/icon-users-alt.d.ts +1 -1
  1567. package/dist-cms/packages/core/icon-registry/icons/icon-users-alt.js +1 -17
  1568. package/dist-cms/packages/core/icon-registry/icons/icon-users.d.ts +1 -1
  1569. package/dist-cms/packages/core/icon-registry/icons/icon-users.js +1 -17
  1570. package/dist-cms/packages/core/icon-registry/icons/icon-utilities.d.ts +1 -1
  1571. package/dist-cms/packages/core/icon-registry/icons/icon-utilities.js +1 -18
  1572. package/dist-cms/packages/core/icon-registry/icons/icon-vcard.d.ts +1 -1
  1573. package/dist-cms/packages/core/icon-registry/icons/icon-vcard.js +1 -18
  1574. package/dist-cms/packages/core/icon-registry/icons/icon-video.d.ts +1 -1
  1575. package/dist-cms/packages/core/icon-registry/icons/icon-video.js +1 -15
  1576. package/dist-cms/packages/core/icon-registry/icons/icon-voice.d.ts +1 -1
  1577. package/dist-cms/packages/core/icon-registry/icons/icon-voice.js +1 -16
  1578. package/dist-cms/packages/core/icon-registry/icons/icon-wall-plug.d.ts +1 -1
  1579. package/dist-cms/packages/core/icon-registry/icons/icon-wall-plug.js +1 -17
  1580. package/dist-cms/packages/core/icon-registry/icons/icon-wallet.d.ts +1 -1
  1581. package/dist-cms/packages/core/icon-registry/icons/icon-wallet.js +1 -15
  1582. package/dist-cms/packages/core/icon-registry/icons/icon-wand.d.ts +1 -1
  1583. package/dist-cms/packages/core/icon-registry/icons/icon-wand.js +1 -21
  1584. package/dist-cms/packages/core/icon-registry/icons/icon-war.d.ts +1 -1
  1585. package/dist-cms/packages/core/icon-registry/icons/icon-war.js +1 -1
  1586. package/dist-cms/packages/core/icon-registry/icons/icon-webhook.d.ts +1 -1
  1587. package/dist-cms/packages/core/icon-registry/icons/icon-webhook.js +1 -16
  1588. package/dist-cms/packages/core/icon-registry/icons/icon-weight.d.ts +1 -1
  1589. package/dist-cms/packages/core/icon-registry/icons/icon-weight.js +1 -15
  1590. package/dist-cms/packages/core/icon-registry/icons/icon-width.d.ts +1 -1
  1591. package/dist-cms/packages/core/icon-registry/icons/icon-width.js +1 -16
  1592. package/dist-cms/packages/core/icon-registry/icons/icon-wifi.d.ts +1 -1
  1593. package/dist-cms/packages/core/icon-registry/icons/icon-wifi.js +1 -17
  1594. package/dist-cms/packages/core/icon-registry/icons/icon-window-popin.d.ts +1 -1
  1595. package/dist-cms/packages/core/icon-registry/icons/icon-window-popin.js +1 -16
  1596. package/dist-cms/packages/core/icon-registry/icons/icon-window-popout.d.ts +1 -1
  1597. package/dist-cms/packages/core/icon-registry/icons/icon-window-popout.js +1 -16
  1598. package/dist-cms/packages/core/icon-registry/icons/icon-window-sizes.d.ts +1 -1
  1599. package/dist-cms/packages/core/icon-registry/icons/icon-window-sizes.js +1 -17
  1600. package/dist-cms/packages/core/icon-registry/icons/icon-windows.d.ts +1 -1
  1601. package/dist-cms/packages/core/icon-registry/icons/icon-windows.js +1 -1
  1602. package/dist-cms/packages/core/icon-registry/icons/icon-wine-glass.d.ts +1 -1
  1603. package/dist-cms/packages/core/icon-registry/icons/icon-wine-glass.js +1 -17
  1604. package/dist-cms/packages/core/icon-registry/icons/icon-wrench.d.ts +1 -1
  1605. package/dist-cms/packages/core/icon-registry/icons/icon-wrench.js +1 -14
  1606. package/dist-cms/packages/core/icon-registry/icons/icon-wrong.d.ts +1 -1
  1607. package/dist-cms/packages/core/icon-registry/icons/icon-wrong.js +1 -16
  1608. package/dist-cms/packages/core/icon-registry/icons/icon-yen-bag.d.ts +1 -1
  1609. package/dist-cms/packages/core/icon-registry/icons/icon-yen-bag.js +1 -1
  1610. package/dist-cms/packages/core/icon-registry/icons/icon-zip.d.ts +1 -1
  1611. package/dist-cms/packages/core/icon-registry/icons/icon-zip.js +1 -19
  1612. package/dist-cms/packages/core/icon-registry/icons/icon-zom-out.d.ts +1 -1
  1613. package/dist-cms/packages/core/icon-registry/icons/icon-zom-out.js +1 -16
  1614. package/dist-cms/packages/core/icon-registry/icons/icon-zoom-in.d.ts +1 -1
  1615. package/dist-cms/packages/core/icon-registry/icons/icon-zoom-in.js +1 -17
  1616. package/dist-cms/packages/core/icon-registry/icons/icon-zoom-out.d.ts +1 -1
  1617. package/dist-cms/packages/core/icon-registry/icons/icon-zoom-out.js +1 -16
  1618. package/dist-cms/packages/core/icon-registry/icons.d.ts +625 -4
  1619. package/dist-cms/packages/core/icon-registry/icons.js +176 -0
  1620. package/dist-cms/packages/core/icon-registry/types.d.ts +4 -0
  1621. package/dist-cms/packages/core/localization/localize-date.element.d.ts +8 -2
  1622. package/dist-cms/packages/core/localization/localize-date.element.js +26 -6
  1623. package/dist-cms/packages/core/localization/localize-relative-time.element.js +2 -2
  1624. package/dist-cms/packages/core/localization/registry/localization.registry.js +24 -19
  1625. package/dist-cms/packages/core/manifests.js +2 -0
  1626. package/dist-cms/packages/core/modal/common/confirm/confirm-modal.element.js +3 -1
  1627. package/dist-cms/packages/core/modal/common/error-viewer/error-viewer-modal.element.d.ts +17 -0
  1628. package/dist-cms/packages/core/modal/common/error-viewer/error-viewer-modal.element.js +78 -0
  1629. package/dist-cms/packages/core/modal/common/error-viewer/error-viewer-modal.token.d.ts +6 -0
  1630. package/dist-cms/packages/core/modal/common/error-viewer/error-viewer-modal.token.js +7 -0
  1631. package/dist-cms/packages/core/modal/common/error-viewer/index.d.ts +2 -0
  1632. package/dist-cms/packages/core/modal/common/error-viewer/index.js +2 -0
  1633. package/dist-cms/packages/core/modal/common/error-viewer/manifest.d.ts +2 -0
  1634. package/dist-cms/packages/core/modal/common/error-viewer/manifest.js +8 -0
  1635. package/dist-cms/packages/core/modal/common/index.d.ts +1 -0
  1636. package/dist-cms/packages/core/modal/common/index.js +1 -0
  1637. package/dist-cms/packages/core/modal/common/manifests.js +2 -0
  1638. package/dist-cms/packages/core/modal/component/modal.element.js +1 -2
  1639. package/dist-cms/packages/core/notification/controllers/peek-error/index.d.ts +1 -0
  1640. package/dist-cms/packages/core/notification/controllers/peek-error/index.js +1 -0
  1641. package/dist-cms/packages/core/notification/controllers/peek-error/peek-error-notification.element.d.ts +15 -0
  1642. package/dist-cms/packages/core/notification/controllers/peek-error/peek-error-notification.element.js +37 -0
  1643. package/dist-cms/packages/core/notification/controllers/peek-error/peek-error.controller.d.ts +14 -0
  1644. package/dist-cms/packages/core/notification/controllers/peek-error/peek-error.controller.js +24 -0
  1645. package/dist-cms/packages/core/notification/extractUmbNotificationColor.function.d.ts +1 -1
  1646. package/dist-cms/packages/core/notification/index.d.ts +5 -3
  1647. package/dist-cms/packages/core/notification/index.js +4 -3
  1648. package/dist-cms/packages/core/notification/layouts/default/notification-layout-default.element.js +3 -0
  1649. package/dist-cms/packages/core/notification/notification-handler.d.ts +3 -8
  1650. package/dist-cms/packages/core/notification/notification-handler.js +2 -11
  1651. package/dist-cms/packages/core/notification/notification.context.d.ts +4 -29
  1652. package/dist-cms/packages/core/notification/notification.context.js +4 -4
  1653. package/dist-cms/packages/core/notification/types.d.ts +27 -0
  1654. package/dist-cms/packages/core/picker/search/index.d.ts +1 -0
  1655. package/dist-cms/packages/core/picker/search/index.js +1 -0
  1656. package/dist-cms/packages/core/picker/search/manager/picker-search.manager.d.ts +9 -9
  1657. package/dist-cms/packages/core/picker/search/manager/picker-search.manager.js +4 -6
  1658. package/dist-cms/packages/core/picker/search/result-item/default/default-picker-search-result-item.element.d.ts +3 -10
  1659. package/dist-cms/packages/core/picker/search/result-item/default/default-picker-search-result-item.element.js +7 -45
  1660. package/dist-cms/packages/core/picker/search/result-item/default/index.d.ts +2 -0
  1661. package/dist-cms/packages/core/picker/search/result-item/default/index.js +2 -0
  1662. package/dist-cms/packages/core/picker/search/result-item/index.d.ts +2 -0
  1663. package/dist-cms/packages/core/picker/search/result-item/index.js +2 -0
  1664. package/dist-cms/packages/core/picker/search/result-item/picker-search-result-item-element-base.d.ts +13 -0
  1665. package/dist-cms/packages/core/picker/search/result-item/picker-search-result-item-element-base.js +59 -0
  1666. package/dist-cms/packages/core/picker-input/index.d.ts +1 -0
  1667. package/dist-cms/packages/core/picker-input/index.js +1 -0
  1668. package/dist-cms/packages/core/picker-input/picker-input.context-token.d.ts +21 -0
  1669. package/dist-cms/packages/core/picker-input/picker-input.context-token.js +2 -0
  1670. package/dist-cms/packages/core/picker-input/picker-input.context.d.ts +10 -2
  1671. package/dist-cms/packages/core/picker-input/picker-input.context.js +24 -7
  1672. package/dist-cms/packages/core/property/components/property/property.element.js +3 -1
  1673. package/dist-cms/packages/core/property/index.d.ts +2 -1
  1674. package/dist-cms/packages/core/property/index.js +2 -1
  1675. package/dist-cms/packages/core/property/manifests.d.ts +1 -1
  1676. package/dist-cms/packages/core/property/property-value-preset/index.d.ts +4 -0
  1677. package/dist-cms/packages/core/property/property-value-preset/index.js +2 -0
  1678. package/dist-cms/packages/core/property/property-value-preset/property-value-preset-builder.controller.d.ts +14 -0
  1679. package/dist-cms/packages/core/property/property-value-preset/property-value-preset-builder.controller.js +71 -0
  1680. package/dist-cms/packages/core/property/property-value-preset/property-value-preset-variant-builder.controller.d.ts +11 -0
  1681. package/dist-cms/packages/core/property/property-value-preset/property-value-preset-variant-builder.controller.js +72 -0
  1682. package/dist-cms/packages/core/property/property-value-preset/property-value-preset.extension.d.ts +12 -0
  1683. package/dist-cms/packages/core/property/property-value-preset/property-value-preset.extension.js +1 -0
  1684. package/dist-cms/packages/core/property/property-value-preset/types.d.ts +25 -0
  1685. package/dist-cms/packages/core/property/property-value-preset/types.js +1 -0
  1686. package/dist-cms/packages/core/property/property-value-resolver/property-value-resolver.extension.d.ts +1 -1
  1687. package/dist-cms/packages/core/property/types.d.ts +2 -1
  1688. package/dist-cms/packages/core/property-action/kinds/default/property-action.element.js +3 -5
  1689. package/dist-cms/packages/core/property-editor/config/index.d.ts +0 -1
  1690. package/dist-cms/packages/core/property-editor/config/property-editor-config-collection.class.d.ts +1 -1
  1691. package/dist-cms/packages/core/property-editor/config/types.d.ts +1 -0
  1692. package/dist-cms/packages/core/property-editor/index.d.ts +1 -1
  1693. package/dist-cms/packages/core/property-editor/types.d.ts +2 -0
  1694. package/dist-cms/packages/core/property-editor/types.js +1 -0
  1695. package/dist-cms/packages/core/recycle-bin/constants.d.ts +1 -0
  1696. package/dist-cms/packages/core/recycle-bin/constants.js +1 -0
  1697. package/dist-cms/packages/core/recycle-bin/entity-action/constants.d.ts +1 -0
  1698. package/dist-cms/packages/core/recycle-bin/entity-action/constants.js +1 -0
  1699. package/dist-cms/packages/core/recycle-bin/entity-action/index.d.ts +1 -1
  1700. package/dist-cms/packages/core/recycle-bin/entity-action/index.js +1 -1
  1701. package/dist-cms/packages/core/recycle-bin/entity-action/trash/constants.d.ts +1 -0
  1702. package/dist-cms/packages/core/recycle-bin/entity-action/trash/constants.js +1 -0
  1703. package/dist-cms/packages/core/recycle-bin/entity-action/trash/index.d.ts +2 -1
  1704. package/dist-cms/packages/core/recycle-bin/entity-action/trash/index.js +1 -0
  1705. package/dist-cms/packages/core/recycle-bin/entity-action/trash/trash.action.d.ts +4 -2
  1706. package/dist-cms/packages/core/recycle-bin/entity-action/trash/trash.action.js +32 -12
  1707. package/dist-cms/packages/core/recycle-bin/entity-action/trash/trash.action.kind.d.ts +1 -0
  1708. package/dist-cms/packages/core/recycle-bin/entity-action/trash/trash.action.kind.js +2 -4
  1709. package/dist-cms/packages/core/recycle-bin/entity-action/trash/trash.event.d.ts +5 -0
  1710. package/dist-cms/packages/core/recycle-bin/entity-action/trash/trash.event.js +7 -0
  1711. package/dist-cms/packages/core/recycle-bin/entity-bulk-action/bulk-trash/bulk-trash.action.d.ts +9 -0
  1712. package/dist-cms/packages/core/recycle-bin/entity-bulk-action/bulk-trash/bulk-trash.action.js +90 -0
  1713. package/dist-cms/packages/core/recycle-bin/entity-bulk-action/bulk-trash/bulk-trash.action.kind.d.ts +4 -0
  1714. package/dist-cms/packages/core/recycle-bin/entity-bulk-action/bulk-trash/bulk-trash.action.kind.js +25 -0
  1715. package/dist-cms/packages/core/recycle-bin/entity-bulk-action/bulk-trash/constants.d.ts +1 -0
  1716. package/dist-cms/packages/core/recycle-bin/entity-bulk-action/bulk-trash/constants.js +1 -0
  1717. package/dist-cms/packages/core/recycle-bin/entity-bulk-action/bulk-trash/index.d.ts +2 -0
  1718. package/dist-cms/packages/core/recycle-bin/entity-bulk-action/bulk-trash/index.js +1 -0
  1719. package/dist-cms/packages/core/recycle-bin/entity-bulk-action/bulk-trash/manifests.d.ts +2 -0
  1720. package/dist-cms/packages/core/recycle-bin/entity-bulk-action/bulk-trash/manifests.js +2 -0
  1721. package/dist-cms/packages/core/recycle-bin/entity-bulk-action/bulk-trash/types.d.ts +14 -0
  1722. package/dist-cms/packages/core/recycle-bin/entity-bulk-action/bulk-trash/types.js +1 -0
  1723. package/dist-cms/packages/core/recycle-bin/entity-bulk-action/constants.d.ts +1 -0
  1724. package/dist-cms/packages/core/recycle-bin/entity-bulk-action/constants.js +1 -0
  1725. package/dist-cms/packages/core/recycle-bin/entity-bulk-action/index.d.ts +1 -0
  1726. package/dist-cms/packages/core/recycle-bin/entity-bulk-action/index.js +1 -0
  1727. package/dist-cms/packages/core/recycle-bin/entity-bulk-action/types.d.ts +1 -0
  1728. package/dist-cms/packages/core/recycle-bin/entity-bulk-action/types.js +1 -0
  1729. package/dist-cms/packages/core/recycle-bin/index.d.ts +2 -1
  1730. package/dist-cms/packages/core/recycle-bin/index.js +2 -1
  1731. package/dist-cms/packages/core/recycle-bin/manifests.js +7 -3
  1732. package/dist-cms/packages/core/recycle-bin/recycle-bin-repository-base.js +11 -6
  1733. package/dist-cms/packages/core/recycle-bin/tree/manifests.d.ts +2 -0
  1734. package/dist-cms/packages/core/recycle-bin/tree/manifests.js +2 -0
  1735. package/dist-cms/packages/core/recycle-bin/tree/tree-item/manifests.d.ts +2 -0
  1736. package/dist-cms/packages/core/recycle-bin/tree/tree-item/manifests.js +15 -0
  1737. package/dist-cms/packages/core/recycle-bin/tree/tree-item/recycle-bin-tree-item.context.d.ts +9 -0
  1738. package/dist-cms/packages/core/recycle-bin/tree/tree-item/recycle-bin-tree-item.context.js +36 -0
  1739. package/dist-cms/packages/core/recycle-bin/tree/tree-item/types.d.ts +14 -0
  1740. package/dist-cms/packages/core/recycle-bin/tree/tree-item/types.js +1 -0
  1741. package/dist-cms/packages/core/recycle-bin/types.d.ts +1 -0
  1742. package/dist-cms/packages/core/repository/constants.d.ts +1 -0
  1743. package/dist-cms/packages/core/repository/constants.js +1 -0
  1744. package/dist-cms/packages/core/repository/data-mapper/constants.d.ts +1 -0
  1745. package/dist-cms/packages/core/repository/data-mapper/constants.js +1 -0
  1746. package/dist-cms/packages/core/repository/data-mapper/data-mapper.d.ts +11 -0
  1747. package/dist-cms/packages/core/repository/data-mapper/data-mapper.js +27 -0
  1748. package/dist-cms/packages/core/repository/data-mapper/index.d.ts +3 -0
  1749. package/dist-cms/packages/core/repository/data-mapper/index.js +3 -0
  1750. package/dist-cms/packages/core/repository/data-mapper/management-api/constants.d.ts +1 -0
  1751. package/dist-cms/packages/core/repository/data-mapper/management-api/constants.js +1 -0
  1752. package/dist-cms/packages/core/repository/data-mapper/management-api/management-api-data-mapper.d.ts +8 -0
  1753. package/dist-cms/packages/core/repository/data-mapper/management-api/management-api-data-mapper.js +15 -0
  1754. package/dist-cms/packages/core/repository/data-mapper/mapping/data-mapping-resolver.d.ts +6 -0
  1755. package/dist-cms/packages/core/repository/data-mapper/mapping/data-mapping-resolver.js +47 -0
  1756. package/dist-cms/packages/core/repository/data-mapper/mapping/data-mapping.extension.d.ts +15 -0
  1757. package/dist-cms/packages/core/repository/data-mapper/mapping/data-mapping.extension.js +1 -0
  1758. package/dist-cms/packages/core/repository/data-mapper/mapping/index.d.ts +1 -0
  1759. package/dist-cms/packages/core/repository/data-mapper/mapping/index.js +1 -0
  1760. package/dist-cms/packages/core/repository/data-mapper/mapping/types.d.ts +5 -0
  1761. package/dist-cms/packages/core/repository/data-mapper/mapping/types.js +1 -0
  1762. package/dist-cms/packages/core/repository/data-mapper/types.d.ts +1 -0
  1763. package/dist-cms/packages/core/repository/data-mapper/types.js +1 -0
  1764. package/dist-cms/packages/core/repository/data-source-response.interface.d.ts +4 -0
  1765. package/dist-cms/packages/core/repository/detail/detail-repository-base.js +9 -3
  1766. package/dist-cms/packages/core/repository/index.d.ts +5 -3
  1767. package/dist-cms/packages/core/repository/index.js +5 -3
  1768. package/dist-cms/packages/core/repository/repository-items.manager.d.ts +18 -1
  1769. package/dist-cms/packages/core/repository/repository-items.manager.js +112 -6
  1770. package/dist-cms/packages/core/repository/types.d.ts +1 -0
  1771. package/dist-cms/packages/core/resources/apiTypeValidators.function.js +1 -1
  1772. package/dist-cms/packages/core/resources/index.d.ts +2 -0
  1773. package/dist-cms/packages/core/resources/index.js +1 -0
  1774. package/dist-cms/packages/core/resources/resource.controller.d.ts +10 -3
  1775. package/dist-cms/packages/core/resources/resource.controller.js +137 -38
  1776. package/dist-cms/packages/core/resources/tryXhrRequest.function.d.ts +8 -0
  1777. package/dist-cms/packages/core/resources/tryXhrRequest.function.js +14 -0
  1778. package/dist-cms/packages/core/resources/types.d.ts +11 -0
  1779. package/dist-cms/packages/core/resources/types.js +1 -0
  1780. package/dist-cms/packages/core/router/components/not-found/route-not-found.element.js +1 -1
  1781. package/dist-cms/packages/core/router/components/router-slot/route.context.js +8 -0
  1782. package/dist-cms/packages/core/section/section-main-views/section-main-views.element.d.ts +1 -0
  1783. package/dist-cms/packages/core/section/section-main-views/section-main-views.element.js +14 -6
  1784. package/dist-cms/packages/core/section/section-sidebar/section-sidebar.element.js +0 -1
  1785. package/dist-cms/packages/core/sorter/sorter.controller.d.ts +7 -3
  1786. package/dist-cms/packages/core/sorter/sorter.controller.js +99 -18
  1787. package/dist-cms/packages/core/temporary-file/components/temporary-file-badge.element.d.ts +3 -2
  1788. package/dist-cms/packages/core/temporary-file/components/temporary-file-badge.element.js +37 -34
  1789. package/dist-cms/packages/core/temporary-file/config/config.repository.d.ts +23 -0
  1790. package/dist-cms/packages/core/temporary-file/config/config.repository.js +48 -0
  1791. package/dist-cms/packages/core/temporary-file/config/config.server.data-source.d.ts +9 -0
  1792. package/dist-cms/packages/core/temporary-file/config/config.server.data-source.js +14 -0
  1793. package/dist-cms/packages/core/temporary-file/config/config.store.d.ts +7 -0
  1794. package/dist-cms/packages/core/temporary-file/config/config.store.js +8 -0
  1795. package/dist-cms/packages/core/temporary-file/config/config.store.token.d.ts +3 -0
  1796. package/dist-cms/packages/core/temporary-file/config/config.store.token.js +3 -0
  1797. package/dist-cms/packages/core/temporary-file/config/constants.d.ts +2 -0
  1798. package/dist-cms/packages/core/temporary-file/config/constants.js +2 -0
  1799. package/dist-cms/packages/core/temporary-file/config/index.d.ts +4 -0
  1800. package/dist-cms/packages/core/temporary-file/config/index.js +4 -0
  1801. package/dist-cms/packages/core/temporary-file/config/manifests.js +15 -0
  1802. package/dist-cms/packages/core/temporary-file/index.d.ts +1 -0
  1803. package/dist-cms/packages/core/temporary-file/index.js +1 -0
  1804. package/dist-cms/packages/core/temporary-file/manifests.d.ts +1 -0
  1805. package/dist-cms/packages/core/temporary-file/manifests.js +2 -0
  1806. package/dist-cms/packages/core/temporary-file/temporary-file-manager.class.js +62 -14
  1807. package/dist-cms/packages/core/temporary-file/temporary-file.repository.d.ts +2 -1
  1808. package/dist-cms/packages/core/temporary-file/temporary-file.repository.js +3 -2
  1809. package/dist-cms/packages/core/temporary-file/temporary-file.server.data-source.d.ts +5 -3
  1810. package/dist-cms/packages/core/temporary-file/temporary-file.server.data-source.js +14 -8
  1811. package/dist-cms/packages/core/temporary-file/types.d.ts +4 -0
  1812. package/dist-cms/packages/core/themes/manifests.d.ts +1 -1
  1813. package/dist-cms/packages/core/tree/default/default-tree.context.js +7 -21
  1814. package/dist-cms/packages/core/tree/entity-actions/sort-children-of/modal/sort-children-of-modal.element.js +19 -2
  1815. package/dist-cms/packages/core/tree/tree-item/tree-item-base/tree-item-context-base.d.ts +5 -4
  1816. package/dist-cms/packages/core/tree/tree-item/tree-item-base/tree-item-context-base.js +17 -35
  1817. package/dist-cms/packages/core/tree/tree-item/tree-item-base/tree-item-element-base.d.ts +5 -3
  1818. package/dist-cms/packages/core/tree/tree-item/tree-item-base/tree-item-element-base.js +41 -37
  1819. package/dist-cms/packages/core/tree/tree-item/tree-item-context.interface.d.ts +1 -0
  1820. package/dist-cms/packages/core/tree/tree-item/tree-item-default/index.d.ts +1 -0
  1821. package/dist-cms/packages/core/tree/tree-item/tree-item-default/index.js +1 -0
  1822. package/dist-cms/packages/core/tree/tree-item/tree-item-default/manifests.d.ts +2 -1
  1823. package/dist-cms/packages/core/tree/tree-item/tree-item-default/manifests.js +11 -12
  1824. package/dist-cms/packages/core/tree/tree-item/tree-item-default/tree-item-default.context.d.ts +2 -2
  1825. package/dist-cms/packages/core/tree/tree-picker-modal/tree-picker-modal.element.js +11 -2
  1826. package/dist-cms/packages/core/utils/bytes/bytes.function.d.ts +24 -0
  1827. package/dist-cms/packages/core/utils/bytes/bytes.function.js +22 -0
  1828. package/dist-cms/packages/core/utils/index.d.ts +1 -0
  1829. package/dist-cms/packages/core/utils/index.js +1 -0
  1830. package/dist-cms/packages/core/utils/path/umbraco-path.function.d.ts +5 -3
  1831. package/dist-cms/packages/core/utils/path/umbraco-path.function.js +6 -4
  1832. package/dist-cms/packages/core/utils/state-manager/state.manager.d.ts +1 -0
  1833. package/dist-cms/packages/core/utils/state-manager/state.manager.js +4 -0
  1834. package/dist-cms/packages/core/validation/const.d.ts +1 -0
  1835. package/dist-cms/packages/core/validation/const.js +1 -0
  1836. package/dist-cms/packages/core/validation/context/server-model-validator.context.js +11 -3
  1837. package/dist-cms/packages/core/validation/controllers/validation.controller.js +14 -16
  1838. package/dist-cms/packages/core/validation/mixins/form-control.mixin.js +1 -2
  1839. package/dist-cms/packages/core/validation/utils/extract-json-query-properties.function.d.ts +2 -2
  1840. package/dist-cms/packages/core/validation/utils/extract-json-query-properties.function.js +2 -2
  1841. package/dist-cms/packages/core/validation/utils/replace-start-of-path.function.d.ts +8 -0
  1842. package/dist-cms/packages/core/validation/utils/replace-start-of-path.function.js +14 -0
  1843. package/dist-cms/packages/core/variant/index.d.ts +1 -0
  1844. package/dist-cms/packages/core/variant/index.js +1 -0
  1845. package/dist-cms/packages/core/variant/types.d.ts +4 -0
  1846. package/dist-cms/packages/core/variant/variant-id.class.d.ts +7 -5
  1847. package/dist-cms/packages/core/variant/variant-id.class.js +18 -1
  1848. package/dist-cms/packages/core/variant/variant-object-compare.function.d.ts +2 -0
  1849. package/dist-cms/packages/core/variant/variant-object-compare.function.js +3 -0
  1850. package/dist-cms/packages/core/vite.config.js +1 -0
  1851. package/dist-cms/packages/core/workspace/components/types.d.ts +2 -0
  1852. package/dist-cms/packages/core/workspace/components/types.js +1 -0
  1853. package/dist-cms/packages/core/workspace/components/workspace-action/common/submit/index.d.ts +1 -0
  1854. package/dist-cms/packages/core/workspace/components/workspace-action/common/submit/submit.action.d.ts +7 -3
  1855. package/dist-cms/packages/core/workspace/components/workspace-action/common/submit/submit.action.js +12 -8
  1856. package/dist-cms/packages/core/workspace/components/workspace-action/common/submit/types.d.ts +6 -0
  1857. package/dist-cms/packages/core/workspace/components/workspace-action/common/submit/types.js +1 -0
  1858. package/dist-cms/packages/core/workspace/components/workspace-action/default/manifests.d.ts +1 -0
  1859. package/dist-cms/packages/core/workspace/components/workspace-action/default/manifests.js +16 -2
  1860. package/dist-cms/packages/core/workspace/components/workspace-action/default/workspace-action-default-kind.element.d.ts +22 -0
  1861. package/dist-cms/packages/core/workspace/components/workspace-action/default/workspace-action-default-kind.element.js +170 -0
  1862. package/dist-cms/packages/core/workspace/components/workspace-action/default/workspace-action-default-kind.interface.d.ts +8 -0
  1863. package/dist-cms/packages/core/workspace/components/workspace-action/default/workspace-action-default-kind.interface.js +1 -0
  1864. package/dist-cms/packages/core/workspace/components/workspace-action/index.d.ts +0 -2
  1865. package/dist-cms/packages/core/workspace/components/workspace-action/types.d.ts +2 -0
  1866. package/dist-cms/packages/core/workspace/components/workspace-action/workspace-action.interface.d.ts +1 -1
  1867. package/dist-cms/packages/core/workspace/components/workspace-action-menu-item/default/workspace-action-menu-item.element.d.ts +1 -1
  1868. package/dist-cms/packages/core/workspace/components/workspace-action-menu-item/index.d.ts +0 -2
  1869. package/dist-cms/packages/core/workspace/components/workspace-action-menu-item/types.d.ts +1 -0
  1870. package/dist-cms/packages/core/workspace/components/workspace-split-view/workspace-split-view-variant-selector.element.js +11 -6
  1871. package/dist-cms/packages/core/workspace/conditions/const.d.ts +2 -2
  1872. package/dist-cms/packages/core/workspace/conditions/const.js +2 -2
  1873. package/dist-cms/packages/core/workspace/controllers/workspace-is-new-redirect.controller.js +1 -1
  1874. package/dist-cms/packages/core/workspace/entity/entity-workspace-data-manager.d.ts +1 -0
  1875. package/dist-cms/packages/core/workspace/entity/entity-workspace-data-manager.js +22 -1
  1876. package/dist-cms/packages/core/workspace/entity-detail/entity-detail-workspace-base.d.ts +2 -0
  1877. package/dist-cms/packages/core/workspace/entity-detail/entity-detail-workspace-base.js +50 -8
  1878. package/dist-cms/packages/core/workspace/extensions/workspace-action.model.d.ts +5 -3
  1879. package/dist-cms/packages/core/workspace/index.d.ts +1 -2
  1880. package/dist-cms/packages/core/workspace/index.js +1 -2
  1881. package/dist-cms/packages/core/workspace/info-app/global-components/index.d.ts +2 -0
  1882. package/dist-cms/packages/core/workspace/info-app/global-components/index.js +2 -0
  1883. package/dist-cms/packages/core/workspace/info-app/global-components/workspace-info-app-layout.element.d.ts +11 -0
  1884. package/dist-cms/packages/core/workspace/info-app/global-components/workspace-info-app-layout.element.js +32 -0
  1885. package/dist-cms/packages/core/workspace/info-app/index.d.ts +2 -0
  1886. package/dist-cms/packages/core/workspace/info-app/index.js +2 -0
  1887. package/dist-cms/packages/core/workspace/info-app/types.d.ts +1 -0
  1888. package/dist-cms/packages/core/workspace/info-app/types.js +1 -0
  1889. package/dist-cms/packages/core/workspace/info-app/workspace-info-app.extension.d.ts +15 -0
  1890. package/dist-cms/packages/core/workspace/info-app/workspace-info-app.extension.js +1 -0
  1891. package/dist-cms/packages/core/workspace/submittable/submittable-workspace-context-base.js +0 -1
  1892. package/dist-cms/packages/core/workspace/types.d.ts +5 -3
  1893. package/dist-cms/packages/data-type/entity-actions/create/default/manifests.js +1 -0
  1894. package/dist-cms/packages/data-type/tree/tree-item-children/collection/views/data-type-tree-item-table-collection-view.element.js +1 -0
  1895. package/dist-cms/packages/documents/document-blueprints/workspace/document-blueprint-workspace.context.js +1 -0
  1896. package/dist-cms/packages/documents/document-types/tree/tree-item-children/collection/views/document-type-tree-item-table-collection-view.element.js +1 -0
  1897. package/dist-cms/packages/documents/document-types/workspace/document-type/document-type-workspace-editor.element.js +2 -2
  1898. package/dist-cms/packages/documents/document-types/workspace/document-type/document-type-workspace.context.js +1 -1
  1899. package/dist-cms/packages/documents/document-types/workspace/document-type/views/settings/document-type-workspace-view-settings.element.js +3 -3
  1900. package/dist-cms/packages/documents/documents/audit-log/info-app/document-history-workspace-info-app.element.d.ts +16 -0
  1901. package/dist-cms/packages/documents/documents/audit-log/info-app/document-history-workspace-info-app.element.js +185 -0
  1902. package/dist-cms/packages/documents/documents/audit-log/info-app/manifests.js +17 -0
  1903. package/dist-cms/packages/documents/documents/audit-log/info-app/utils.d.ts +20 -0
  1904. package/dist-cms/packages/documents/documents/audit-log/info-app/utils.js +106 -0
  1905. package/dist-cms/packages/documents/documents/audit-log/manifests.d.ts +2 -0
  1906. package/dist-cms/packages/documents/documents/audit-log/manifests.js +2 -0
  1907. package/dist-cms/packages/documents/documents/collection/action/create-document-collection-action.element.js +1 -0
  1908. package/dist-cms/packages/documents/documents/collection/repository/document-collection.server.data-source.js +17 -2
  1909. package/dist-cms/packages/documents/documents/collection/types.d.ts +35 -7
  1910. package/dist-cms/packages/documents/documents/collection/views/table/column-layouts/document-table-column-name.element.d.ts +4 -1
  1911. package/dist-cms/packages/documents/documents/collection/views/table/column-layouts/document-table-column-name.element.js +23 -13
  1912. package/dist-cms/packages/documents/documents/collection/views/table/column-layouts/document-table-column-state.element.d.ts +5 -1
  1913. package/dist-cms/packages/documents/documents/collection/views/table/column-layouts/document-table-column-state.element.js +24 -3
  1914. package/dist-cms/packages/documents/documents/collection/views/table/document-table-collection-view.element.js +8 -3
  1915. package/dist-cms/packages/documents/documents/components/input-document/input-document.context.d.ts +10 -1
  1916. package/dist-cms/packages/documents/documents/components/input-document/input-document.context.js +31 -2
  1917. package/dist-cms/packages/documents/documents/components/input-document/input-document.element.d.ts +1 -3
  1918. package/dist-cms/packages/documents/documents/components/input-document/input-document.element.js +23 -68
  1919. package/dist-cms/packages/documents/documents/constants.d.ts +2 -0
  1920. package/dist-cms/packages/documents/documents/constants.js +2 -0
  1921. package/dist-cms/packages/documents/documents/entity-actions/create/create.action.js +1 -1
  1922. package/dist-cms/packages/documents/documents/entity-actions/create/document-create-options-modal.element.js +1 -1
  1923. package/dist-cms/packages/documents/documents/entity-actions/manifests.js +5 -2
  1924. package/dist-cms/packages/documents/documents/entity-actions/notifications/modal/document-notifications-modal.element.js +1 -1
  1925. package/dist-cms/packages/documents/documents/entity-actions/public-access/modal/public-access-modal.element.js +1 -1
  1926. package/dist-cms/packages/documents/documents/entity-actions/sort-children-of/manifests.js +1 -1
  1927. package/dist-cms/packages/documents/documents/entity-bulk-actions/constants.d.ts +0 -1
  1928. package/dist-cms/packages/documents/documents/entity-bulk-actions/constants.js +0 -1
  1929. package/dist-cms/packages/documents/documents/entity-bulk-actions/manifests.js +1 -2
  1930. package/dist-cms/packages/documents/documents/index.d.ts +5 -3
  1931. package/dist-cms/packages/documents/documents/index.js +5 -3
  1932. package/dist-cms/packages/documents/documents/item/document-item-data-resolver.d.ts +70 -0
  1933. package/dist-cms/packages/documents/documents/item/document-item-data-resolver.js +172 -0
  1934. package/dist-cms/packages/documents/documents/item/document-item-ref.element.d.ts +24 -0
  1935. package/dist-cms/packages/documents/documents/item/document-item-ref.element.js +114 -0
  1936. package/dist-cms/packages/documents/documents/item/index.d.ts +2 -0
  1937. package/dist-cms/packages/documents/documents/item/index.js +2 -0
  1938. package/dist-cms/packages/documents/documents/item/manifests.js +12 -0
  1939. package/dist-cms/packages/documents/documents/item/repository/types.d.ts +26 -0
  1940. package/dist-cms/packages/documents/documents/item/repository/types.js +1 -0
  1941. package/dist-cms/packages/documents/documents/item/types.d.ts +1 -0
  1942. package/dist-cms/packages/documents/documents/item/types.js +1 -0
  1943. package/dist-cms/packages/documents/documents/manifests.js +6 -0
  1944. package/dist-cms/packages/documents/documents/modals/save-modal/document-save-modal.element.js +11 -2
  1945. package/dist-cms/packages/documents/documents/modals/shared/document-variant-language-picker.element.d.ts +1 -1
  1946. package/dist-cms/packages/documents/documents/modals/shared/document-variant-language-picker.element.js +9 -3
  1947. package/dist-cms/packages/documents/documents/picker/document-picker-search-result-item.element.d.ts +12 -0
  1948. package/dist-cms/packages/documents/documents/picker/document-picker-search-result-item.element.js +32 -0
  1949. package/dist-cms/packages/documents/documents/picker/manifests.js +1 -0
  1950. package/dist-cms/packages/documents/documents/publishing/pending-changes/document-published-pending-changes.manager.js +3 -0
  1951. package/dist-cms/packages/documents/documents/publishing/publish/entity-action/publish.action.js +23 -2
  1952. package/dist-cms/packages/documents/documents/publishing/publish/entity-bulk-action/publish.bulk-action.js +28 -3
  1953. package/dist-cms/packages/documents/documents/publishing/publish/modal/document-publish-modal.element.js +12 -4
  1954. package/dist-cms/packages/documents/documents/publishing/publish/workspace-action/save-and-publish.action.d.ts +3 -2
  1955. package/dist-cms/packages/documents/documents/publishing/publish/workspace-action/save-and-publish.action.js +6 -0
  1956. package/dist-cms/packages/documents/documents/publishing/publish-with-descendants/modal/document-publish-with-descendants-modal.element.js +40 -6
  1957. package/dist-cms/packages/documents/documents/publishing/publish-with-descendants/modal/document-publish-with-descendants-modal.token.d.ts +1 -0
  1958. package/dist-cms/packages/documents/documents/publishing/publish-with-descendants/workspace-action/manifests.js +2 -2
  1959. package/dist-cms/packages/documents/documents/publishing/repository/document-publishing.repository.d.ts +3 -4
  1960. package/dist-cms/packages/documents/documents/publishing/repository/document-publishing.repository.js +9 -8
  1961. package/dist-cms/packages/documents/documents/publishing/repository/document-publishing.server.data-source.d.ts +2 -1
  1962. package/dist-cms/packages/documents/documents/publishing/repository/document-publishing.server.data-source.js +5 -1
  1963. package/dist-cms/packages/documents/documents/publishing/schedule-publish/modal/document-schedule-modal.element.d.ts +7 -5
  1964. package/dist-cms/packages/documents/documents/publishing/schedule-publish/modal/document-schedule-modal.element.js +258 -63
  1965. package/dist-cms/packages/documents/documents/publishing/schedule-publish/modal/document-schedule-modal.token.d.ts +2 -0
  1966. package/dist-cms/packages/documents/documents/publishing/schedule-publish/workspace-action/manifests.js +7 -2
  1967. package/dist-cms/packages/documents/documents/publishing/unpublish/entity-bulk-action/unpublish.bulk-action.js +2 -0
  1968. package/dist-cms/packages/documents/documents/publishing/unpublish/modal/document-unpublish-modal.element.js +11 -3
  1969. package/dist-cms/packages/documents/documents/publishing/unpublish/workspace-action/manifests.js +7 -2
  1970. package/dist-cms/packages/documents/documents/publishing/workspace-context/document-publishing.workspace-context.js +78 -16
  1971. package/dist-cms/packages/documents/documents/recycle-bin/constants.d.ts +1 -0
  1972. package/dist-cms/packages/documents/documents/recycle-bin/constants.js +1 -0
  1973. package/dist-cms/packages/documents/documents/recycle-bin/entity-action/bulk-trash/manifests.js +35 -0
  1974. package/dist-cms/packages/documents/documents/recycle-bin/entity-action/bulk-trash/repository/trash.repository.d.ts +13 -0
  1975. package/dist-cms/packages/documents/documents/recycle-bin/entity-action/bulk-trash/repository/trash.repository.js +41 -0
  1976. package/dist-cms/packages/documents/documents/recycle-bin/entity-action/constants.d.ts +1 -0
  1977. package/dist-cms/packages/documents/documents/recycle-bin/entity-action/constants.js +1 -0
  1978. package/dist-cms/packages/documents/documents/recycle-bin/entity-action/manifests.js +6 -2
  1979. package/dist-cms/packages/documents/documents/recycle-bin/tree/constants.d.ts +1 -1
  1980. package/dist-cms/packages/documents/documents/recycle-bin/tree/constants.js +1 -1
  1981. package/dist-cms/packages/documents/documents/recycle-bin/tree/data/document-recycle-bin-tree.repository.d.ts +19 -0
  1982. package/dist-cms/packages/documents/documents/recycle-bin/tree/data/document-recycle-bin-tree.repository.js +24 -0
  1983. package/dist-cms/packages/documents/documents/recycle-bin/tree/data/document-recycle-bin-tree.server.data-source.d.ts +17 -0
  1984. package/dist-cms/packages/documents/documents/recycle-bin/tree/data/document-recycle-bin-tree.server.data-source.js +75 -0
  1985. package/dist-cms/packages/documents/documents/recycle-bin/tree/data/document-recycle-bin-tree.store.context-token.d.ts +3 -0
  1986. package/dist-cms/packages/documents/documents/recycle-bin/tree/data/document-recycle-bin-tree.store.context-token.js +2 -0
  1987. package/dist-cms/packages/documents/documents/recycle-bin/tree/data/document-recycle-bin-tree.store.d.ts +16 -0
  1988. package/dist-cms/packages/documents/documents/recycle-bin/tree/data/document-recycle-bin-tree.store.js +18 -0
  1989. package/dist-cms/packages/documents/documents/recycle-bin/tree/data/index.d.ts +2 -0
  1990. package/dist-cms/packages/documents/documents/recycle-bin/tree/data/index.js +2 -0
  1991. package/dist-cms/packages/documents/documents/recycle-bin/tree/data/manifests.js +15 -0
  1992. package/dist-cms/packages/documents/documents/recycle-bin/tree/index.d.ts +1 -2
  1993. package/dist-cms/packages/documents/documents/recycle-bin/tree/index.js +1 -2
  1994. package/dist-cms/packages/documents/documents/recycle-bin/tree/manifests.js +5 -20
  1995. package/dist-cms/packages/documents/documents/recycle-bin/tree/tree-item/manifests.js +14 -0
  1996. package/dist-cms/packages/documents/documents/reference/components/document-reference-table.element.js +2 -0
  1997. package/dist-cms/packages/documents/documents/reference/info-app/document-references-workspace-view-info.element.d.ts +17 -0
  1998. package/dist-cms/packages/documents/documents/reference/info-app/document-references-workspace-view-info.element.js +126 -0
  1999. package/dist-cms/packages/documents/documents/reference/info-app/manifests.js +17 -0
  2000. package/dist-cms/packages/documents/documents/reference/manifests.js +2 -1
  2001. package/dist-cms/packages/documents/documents/reference/repository/document-reference-response.management-api.mapping.d.ts +8 -0
  2002. package/dist-cms/packages/documents/documents/reference/repository/document-reference-response.management-api.mapping.js +28 -0
  2003. package/dist-cms/packages/documents/documents/reference/repository/document-reference.repository.d.ts +5 -2
  2004. package/dist-cms/packages/documents/documents/reference/repository/document-reference.repository.js +10 -0
  2005. package/dist-cms/packages/documents/documents/reference/repository/document-reference.server.data.d.ts +27 -10
  2006. package/dist-cms/packages/documents/documents/reference/repository/document-reference.server.data.js +69 -12
  2007. package/dist-cms/packages/documents/documents/reference/repository/manifests.js +9 -0
  2008. package/dist-cms/packages/documents/documents/reference/types.d.ts +25 -0
  2009. package/dist-cms/packages/documents/documents/reference/types.js +1 -0
  2010. package/dist-cms/packages/documents/documents/repository/constants.d.ts +0 -2
  2011. package/dist-cms/packages/documents/documents/repository/constants.js +0 -2
  2012. package/dist-cms/packages/documents/documents/repository/detail/document-detail.server.data-source.js +2 -0
  2013. package/dist-cms/packages/documents/documents/repository/index.d.ts +0 -3
  2014. package/dist-cms/packages/documents/documents/repository/index.js +0 -2
  2015. package/dist-cms/packages/documents/documents/repository/manifests.js +1 -3
  2016. package/dist-cms/packages/documents/documents/rollback/entity-action/manifests.js +2 -9
  2017. package/dist-cms/packages/documents/documents/rollback/modal/rollback-modal.element.d.ts +10 -4
  2018. package/dist-cms/packages/documents/documents/rollback/modal/rollback-modal.element.js +206 -123
  2019. package/dist-cms/packages/documents/documents/search/document-search-result-item.element.d.ts +1 -1
  2020. package/dist-cms/packages/documents/documents/search/document-search.repository.d.ts +10 -12
  2021. package/dist-cms/packages/documents/documents/search/document-search.repository.js +6 -0
  2022. package/dist-cms/packages/documents/documents/search/document-search.server.data-source.d.ts +5 -5
  2023. package/dist-cms/packages/documents/documents/search/document-search.server.data-source.js +2 -1
  2024. package/dist-cms/packages/documents/documents/search/document.search-provider.d.ts +17 -13
  2025. package/dist-cms/packages/documents/documents/search/document.search-provider.js +12 -0
  2026. package/dist-cms/packages/documents/documents/search/types.d.ts +9 -1
  2027. package/dist-cms/packages/documents/documents/tree/tree-item/document-tree-item.context.d.ts +4 -0
  2028. package/dist-cms/packages/documents/documents/tree/tree-item/document-tree-item.context.js +10 -0
  2029. package/dist-cms/packages/documents/documents/tree/tree-item/document-tree-item.element.d.ts +8 -6
  2030. package/dist-cms/packages/documents/documents/tree/tree-item/document-tree-item.element.js +24 -51
  2031. package/dist-cms/packages/documents/documents/types.d.ts +6 -4
  2032. package/dist-cms/packages/documents/documents/url/constants.d.ts +1 -0
  2033. package/dist-cms/packages/documents/documents/url/constants.js +1 -0
  2034. package/dist-cms/packages/documents/documents/url/index.d.ts +2 -0
  2035. package/dist-cms/packages/documents/documents/url/index.js +2 -0
  2036. package/dist-cms/packages/documents/documents/url/info-app/document-links-workspace-info-app.element.d.ts +20 -0
  2037. package/dist-cms/packages/documents/documents/url/info-app/document-links-workspace-info-app.element.js +239 -0
  2038. package/dist-cms/packages/documents/documents/url/info-app/manifests.js +17 -0
  2039. package/dist-cms/packages/documents/documents/url/manifests.js +3 -0
  2040. package/dist-cms/packages/documents/documents/url/repository/types.js +1 -0
  2041. package/dist-cms/packages/documents/documents/user-permissions/conditions/document-user-permission.condition.d.ts +6 -3
  2042. package/dist-cms/packages/documents/documents/user-permissions/conditions/document-user-permission.condition.js +16 -6
  2043. package/dist-cms/packages/documents/documents/user-permissions/input-document-granular-user-permission/input-document-granular-user-permission.element.js +1 -1
  2044. package/dist-cms/packages/documents/documents/user-permissions/manifests.js +2 -2
  2045. package/dist-cms/packages/documents/documents/utils.d.ts +1 -0
  2046. package/dist-cms/packages/documents/documents/utils.js +8 -0
  2047. package/dist-cms/packages/documents/documents/workspace/actions/manifests.js +47 -0
  2048. package/dist-cms/packages/documents/documents/workspace/actions/save.action.d.ts +7 -3
  2049. package/dist-cms/packages/documents/documents/workspace/actions/save.action.js +34 -25
  2050. package/dist-cms/packages/documents/documents/workspace/constants.js +2 -0
  2051. package/dist-cms/packages/documents/documents/workspace/document-workspace.context.d.ts +1 -0
  2052. package/dist-cms/packages/documents/documents/workspace/document-workspace.context.js +59 -9
  2053. package/dist-cms/packages/documents/documents/workspace/index.d.ts +1 -0
  2054. package/dist-cms/packages/documents/documents/workspace/index.js +1 -0
  2055. package/dist-cms/packages/documents/documents/workspace/manifests.js +2 -43
  2056. package/dist-cms/packages/documents/documents/workspace/views/info/document-workspace-view-info.element.d.ts +0 -3
  2057. package/dist-cms/packages/documents/documents/workspace/views/info/document-workspace-view-info.element.js +30 -13
  2058. package/dist-cms/packages/extension-insights/collection/views/table/extension-table-collection-view.element.js +1 -0
  2059. package/dist-cms/packages/extension-types/index.d.ts +1 -0
  2060. package/dist-cms/packages/health-check/health-check-dashboard.context.d.ts +1 -1
  2061. package/dist-cms/packages/health-check/health-check-dashboard.context.js +2 -2
  2062. package/dist-cms/packages/health-check/views/health-check-group.element.js +2 -2
  2063. package/dist-cms/packages/health-check/views/health-check-overview.element.js +12 -2
  2064. package/dist-cms/packages/help/header-app/help-header-app.element.d.ts +2 -5
  2065. package/dist-cms/packages/help/header-app/help-header-app.element.js +8 -19
  2066. package/dist-cms/packages/language/collection/views/table/language-table-collection-view.element.js +1 -0
  2067. package/dist-cms/packages/language/global-contexts/app-language.context.d.ts +7 -2
  2068. package/dist-cms/packages/language/global-contexts/app-language.context.js +22 -6
  2069. package/dist-cms/packages/markdown-editor/components/input-markdown-editor/input-markdown.element.d.ts +1 -1
  2070. package/dist-cms/packages/markdown-editor/components/input-markdown-editor/input-markdown.element.js +2 -2
  2071. package/dist-cms/packages/markdown-editor/property-editors/markdown-editor/manifests.js +8 -1
  2072. package/dist-cms/packages/markdown-editor/property-editors/markdown-editor/markdown-editor-property-value-preset.d.ts +8 -0
  2073. package/dist-cms/packages/markdown-editor/property-editors/markdown-editor/markdown-editor-property-value-preset.js +8 -0
  2074. package/dist-cms/packages/markdown-editor/property-editors/markdown-editor/property-editor-ui-markdown-editor.element.d.ts +2 -3
  2075. package/dist-cms/packages/markdown-editor/property-editors/markdown-editor/property-editor-ui-markdown-editor.element.js +2 -4
  2076. package/dist-cms/packages/markdown-editor/property-editors/markdown-editor/types.d.ts +1 -0
  2077. package/dist-cms/packages/markdown-editor/property-editors/markdown-editor/types.js +1 -0
  2078. package/dist-cms/packages/media/imaging/components/media-image.element.js +1 -1
  2079. package/dist-cms/packages/media/manifests.d.ts +2 -1
  2080. package/dist-cms/packages/media/media/audit-log/info-app/manifests.js +17 -0
  2081. package/dist-cms/packages/media/media/audit-log/info-app/media-history-workspace-info-app.element.d.ts +16 -0
  2082. package/dist-cms/packages/media/media/audit-log/info-app/media-history-workspace-info-app.element.js +174 -0
  2083. package/dist-cms/packages/media/media/audit-log/info-app/utils.d.ts +20 -0
  2084. package/dist-cms/packages/media/media/audit-log/info-app/utils.js +28 -0
  2085. package/dist-cms/packages/media/media/audit-log/manifests.d.ts +1 -0
  2086. package/dist-cms/packages/media/media/audit-log/manifests.js +2 -0
  2087. package/dist-cms/packages/media/media/collection/media-collection.context.d.ts +1 -0
  2088. package/dist-cms/packages/media/media/collection/media-collection.context.js +4 -0
  2089. package/dist-cms/packages/media/media/collection/media-collection.element.d.ts +0 -1
  2090. package/dist-cms/packages/media/media/collection/media-collection.element.js +17 -17
  2091. package/dist-cms/packages/media/media/collection/types.d.ts +4 -0
  2092. package/dist-cms/packages/media/media/collection/views/grid/media-grid-collection-view.element.js +5 -5
  2093. package/dist-cms/packages/media/media/collection/views/table/media-table-collection-view.element.js +6 -2
  2094. package/dist-cms/packages/media/media/components/input-image-cropper/image-cropper.element.js +1 -1
  2095. package/dist-cms/packages/media/media/components/input-image-cropper/input-image-cropper.element.d.ts +9 -2
  2096. package/dist-cms/packages/media/media/components/input-image-cropper/input-image-cropper.element.js +31 -21
  2097. package/dist-cms/packages/media/media/components/input-media/input-media.context.d.ts +12 -1
  2098. package/dist-cms/packages/media/media/components/input-media/input-media.context.js +29 -0
  2099. package/dist-cms/packages/media/media/components/input-media/input-media.element.d.ts +2 -1
  2100. package/dist-cms/packages/media/media/components/input-media/input-media.element.js +7 -10
  2101. package/dist-cms/packages/media/media/components/input-rich-media/input-rich-media.element.d.ts +12 -6
  2102. package/dist-cms/packages/media/media/components/input-rich-media/input-rich-media.element.js +64 -60
  2103. package/dist-cms/packages/media/media/components/input-upload-field/input-upload-field.element.d.ts +4 -4
  2104. package/dist-cms/packages/media/media/components/input-upload-field/input-upload-field.element.js +145 -44
  2105. package/dist-cms/packages/media/media/components/input-upload-field/preview/input-upload-field-file.element.d.ts +1 -4
  2106. package/dist-cms/packages/media/media/components/input-upload-field/preview/input-upload-field-file.element.js +23 -33
  2107. package/dist-cms/packages/media/media/constants.d.ts +2 -0
  2108. package/dist-cms/packages/media/media/constants.js +2 -0
  2109. package/dist-cms/packages/media/media/dropzone/dropzone-manager.class.d.ts +6 -7
  2110. package/dist-cms/packages/media/media/dropzone/dropzone-manager.class.js +51 -34
  2111. package/dist-cms/packages/media/media/dropzone/dropzone-submitted.event.d.ts +9 -0
  2112. package/dist-cms/packages/media/media/dropzone/dropzone-submitted.event.js +7 -0
  2113. package/dist-cms/packages/media/media/dropzone/dropzone.element.js +3 -2
  2114. package/dist-cms/packages/media/media/dropzone/index.d.ts +1 -0
  2115. package/dist-cms/packages/media/media/dropzone/index.js +1 -0
  2116. package/dist-cms/packages/media/media/dropzone/types.d.ts +1 -0
  2117. package/dist-cms/packages/media/media/entity-actions/manifests.js +3 -2
  2118. package/dist-cms/packages/media/media/entity-bulk-actions/constants.d.ts +0 -1
  2119. package/dist-cms/packages/media/media/entity-bulk-actions/constants.js +0 -1
  2120. package/dist-cms/packages/media/media/entity-bulk-actions/manifests.js +1 -2
  2121. package/dist-cms/packages/media/media/index.d.ts +2 -1
  2122. package/dist-cms/packages/media/media/index.js +2 -1
  2123. package/dist-cms/packages/media/media/item/manifests.d.ts +1 -0
  2124. package/dist-cms/packages/media/media/item/manifests.js +10 -0
  2125. package/dist-cms/packages/media/media/item/media-item-ref.element.d.ts +20 -0
  2126. package/dist-cms/packages/media/media/item/media-item-ref.element.js +94 -0
  2127. package/dist-cms/packages/media/media/manifests.js +10 -2
  2128. package/dist-cms/packages/media/media/modals/image-cropper-editor/image-cropper-editor-modal.element.js +6 -2
  2129. package/dist-cms/packages/media/media/modals/media-picker/media-picker-modal.element.d.ts +3 -1
  2130. package/dist-cms/packages/media/media/modals/media-picker/media-picker-modal.element.js +59 -10
  2131. package/dist-cms/packages/media/media/modals/media-picker/media-picker-modal.token.d.ts +6 -11
  2132. package/dist-cms/packages/media/media/property-editors/image-cropper/property-editor-ui-image-cropper.element.d.ts +11 -5
  2133. package/dist-cms/packages/media/media/property-editors/image-cropper/property-editor-ui-image-cropper.element.js +18 -26
  2134. package/dist-cms/packages/media/media/property-editors/media-picker/property-editor-ui-media-picker.element.d.ts +12 -4
  2135. package/dist-cms/packages/media/media/property-editors/media-picker/property-editor-ui-media-picker.element.js +22 -7
  2136. package/dist-cms/packages/media/media/property-editors/types.d.ts +7 -1
  2137. package/dist-cms/packages/media/media/property-editors/upload-field/Umbraco.UploadField.js +1 -1
  2138. package/dist-cms/packages/media/media/recycle-bin/constants.d.ts +1 -0
  2139. package/dist-cms/packages/media/media/recycle-bin/constants.js +1 -0
  2140. package/dist-cms/packages/media/media/recycle-bin/entity-action/bulk-trash/constants.d.ts +1 -0
  2141. package/dist-cms/packages/media/media/recycle-bin/entity-action/bulk-trash/constants.js +1 -0
  2142. package/dist-cms/packages/media/media/recycle-bin/entity-action/bulk-trash/manifests.d.ts +1 -0
  2143. package/dist-cms/packages/media/media/recycle-bin/entity-action/bulk-trash/manifests.js +28 -0
  2144. package/dist-cms/packages/media/media/recycle-bin/entity-action/bulk-trash/repository/manifests.d.ts +1 -0
  2145. package/dist-cms/packages/media/media/recycle-bin/entity-action/bulk-trash/repository/trash.repository.d.ts +13 -0
  2146. package/dist-cms/packages/media/media/recycle-bin/entity-action/bulk-trash/repository/trash.repository.js +41 -0
  2147. package/dist-cms/packages/media/media/recycle-bin/entity-action/constants.d.ts +1 -0
  2148. package/dist-cms/packages/media/media/recycle-bin/entity-action/constants.js +1 -0
  2149. package/dist-cms/packages/media/media/recycle-bin/entity-action/manifests.js +5 -1
  2150. package/dist-cms/packages/media/media/recycle-bin/tree/manifests.js +5 -1
  2151. package/dist-cms/packages/media/media/reference/info-app/manifests.d.ts +1 -0
  2152. package/dist-cms/packages/media/media/reference/info-app/manifests.js +17 -0
  2153. package/dist-cms/packages/media/media/reference/info-app/media-references-workspace-info-app.element.d.ts +19 -0
  2154. package/dist-cms/packages/media/media/reference/info-app/media-references-workspace-info-app.element.js +135 -0
  2155. package/dist-cms/packages/media/media/reference/manifests.js +2 -1
  2156. package/dist-cms/packages/media/media/reference/repository/manifests.js +9 -0
  2157. package/dist-cms/packages/media/media/reference/repository/media-reference-response.management-api.mapping.d.ts +8 -0
  2158. package/dist-cms/packages/media/media/reference/repository/media-reference-response.management-api.mapping.js +25 -0
  2159. package/dist-cms/packages/media/media/reference/repository/media-reference.repository.d.ts +7 -2
  2160. package/dist-cms/packages/media/media/reference/repository/media-reference.repository.js +10 -0
  2161. package/dist-cms/packages/media/media/reference/repository/media-reference.server.data.d.ts +27 -10
  2162. package/dist-cms/packages/media/media/reference/repository/media-reference.server.data.js +69 -12
  2163. package/dist-cms/packages/media/media/reference/repository/types.d.ts +25 -0
  2164. package/dist-cms/packages/media/media/reference/repository/types.js +1 -0
  2165. package/dist-cms/packages/media/media/repository/constants.d.ts +0 -1
  2166. package/dist-cms/packages/media/media/repository/constants.js +0 -1
  2167. package/dist-cms/packages/media/media/repository/index.d.ts +0 -1
  2168. package/dist-cms/packages/media/media/repository/index.js +0 -1
  2169. package/dist-cms/packages/media/media/repository/manifests.js +1 -7
  2170. package/dist-cms/packages/media/media/repository/types.d.ts +0 -1
  2171. package/dist-cms/packages/media/media/search/constants.d.ts +1 -0
  2172. package/dist-cms/packages/media/media/search/constants.js +1 -0
  2173. package/dist-cms/packages/media/media/search/manifests.js +2 -1
  2174. package/dist-cms/packages/media/media/search/media-search.repository.d.ts +4 -4
  2175. package/dist-cms/packages/media/media/search/media-search.server.data-source.d.ts +5 -5
  2176. package/dist-cms/packages/media/media/search/media-search.server.data-source.js +2 -1
  2177. package/dist-cms/packages/media/media/search/media.search-provider.d.ts +4 -4
  2178. package/dist-cms/packages/media/media/search/types.d.ts +8 -0
  2179. package/dist-cms/packages/media/media/types.d.ts +2 -1
  2180. package/dist-cms/packages/media/media/url/constants.d.ts +1 -0
  2181. package/dist-cms/packages/media/media/url/constants.js +1 -0
  2182. package/dist-cms/packages/media/media/url/index.d.ts +1 -0
  2183. package/dist-cms/packages/media/media/url/index.js +1 -0
  2184. package/dist-cms/packages/media/media/url/info-app/manifests.d.ts +1 -0
  2185. package/dist-cms/packages/media/media/url/info-app/manifests.js +17 -0
  2186. package/dist-cms/packages/media/media/url/info-app/media-links-workspace-info-app.element.d.ts +14 -0
  2187. package/dist-cms/packages/media/media/url/info-app/media-links-workspace-info-app.element.js +129 -0
  2188. package/dist-cms/packages/media/media/url/manifests.d.ts +1 -0
  2189. package/dist-cms/packages/media/media/url/manifests.js +3 -0
  2190. package/dist-cms/packages/media/media/url/types.d.ts +1 -0
  2191. package/dist-cms/packages/media/media/url/types.js +1 -0
  2192. package/dist-cms/packages/media/media/workspace/media-workspace.context.js +3 -1
  2193. package/dist-cms/packages/media/media/workspace/views/info/media-workspace-view-info.element.d.ts +0 -3
  2194. package/dist-cms/packages/media/media/workspace/views/info/media-workspace-view-info.element.js +3 -104
  2195. package/dist-cms/packages/media/media-types/entity-actions/create/default/default-media-type-create-option-action.d.ts +6 -0
  2196. package/dist-cms/packages/media/media-types/entity-actions/create/default/default-media-type-create-option-action.js +15 -0
  2197. package/dist-cms/packages/media/media-types/entity-actions/create/default/manifests.d.ts +2 -0
  2198. package/dist-cms/packages/media/media-types/entity-actions/create/default/manifests.js +15 -0
  2199. package/dist-cms/packages/media/media-types/entity-actions/create/folder/manifests.d.ts +2 -0
  2200. package/dist-cms/packages/media/media-types/entity-actions/create/folder/manifests.js +17 -0
  2201. package/dist-cms/packages/media/media-types/entity-actions/create/manifests.d.ts +2 -1
  2202. package/dist-cms/packages/media/media-types/entity-actions/create/manifests.js +6 -7
  2203. package/dist-cms/packages/media/media-types/entity-actions/create/modal/media-type-create-options-modal.element.d.ts +10 -3
  2204. package/dist-cms/packages/media/media-types/entity-actions/create/modal/media-type-create-options-modal.element.js +18 -5
  2205. package/dist-cms/packages/media/media-types/entity-actions/manifests.d.ts +2 -1
  2206. package/dist-cms/packages/media/media-types/manifests.d.ts +2 -1
  2207. package/dist-cms/packages/media/media-types/tree/tree-item-children/collection/action/manifests.js +16 -0
  2208. package/dist-cms/packages/media/media-types/tree/tree-item-children/collection/manifests.js +4 -2
  2209. package/dist-cms/packages/media/media-types/tree/tree-item-children/collection/views/media-type-tree-item-table-collection-view.element.js +1 -0
  2210. package/dist-cms/packages/media/media-types/workspace/media-type-workspace-editor.element.js +2 -2
  2211. package/dist-cms/packages/members/member/collection/action/create-member-collection-action.element.js +11 -2
  2212. package/dist-cms/packages/members/member/collection/action/manifests.js +0 -1
  2213. package/dist-cms/packages/members/member/collection/repository/member-collection.server.data-source.js +1 -1
  2214. package/dist-cms/packages/members/member/collection/views/table/member-table-collection-view.element.js +1 -0
  2215. package/dist-cms/packages/members/member/components/input-member/input-member.context.d.ts +12 -2
  2216. package/dist-cms/packages/members/member/components/input-member/input-member.context.js +30 -2
  2217. package/dist-cms/packages/members/member/components/input-member/input-member.element.d.ts +2 -5
  2218. package/dist-cms/packages/members/member/components/input-member/input-member.element.js +19 -52
  2219. package/dist-cms/packages/members/member/components/member-picker-modal/member-picker-modal.element.d.ts +1 -0
  2220. package/dist-cms/packages/members/member/components/member-picker-modal/member-picker-modal.element.js +24 -3
  2221. package/dist-cms/packages/members/member/components/member-picker-modal/member-picker-modal.token.d.ts +5 -11
  2222. package/dist-cms/packages/members/member/constants.d.ts +1 -0
  2223. package/dist-cms/packages/members/member/constants.js +1 -0
  2224. package/dist-cms/packages/members/member/entity-actions/manifests.js +1 -1
  2225. package/dist-cms/packages/members/member/index.d.ts +1 -0
  2226. package/dist-cms/packages/members/member/index.js +1 -0
  2227. package/dist-cms/packages/members/member/item/constants.d.ts +1 -0
  2228. package/dist-cms/packages/members/member/item/constants.js +1 -0
  2229. package/dist-cms/packages/members/member/item/index.d.ts +2 -0
  2230. package/dist-cms/packages/members/member/item/index.js +1 -0
  2231. package/dist-cms/packages/members/member/item/manifests.d.ts +1 -0
  2232. package/dist-cms/packages/members/member/item/manifests.js +12 -0
  2233. package/dist-cms/packages/members/member/item/member-item-ref.element.d.ts +20 -0
  2234. package/dist-cms/packages/members/member/item/member-item-ref.element.js +93 -0
  2235. package/dist-cms/packages/members/member/item/repository/types.js +1 -0
  2236. package/dist-cms/packages/members/member/item/types.d.ts +1 -0
  2237. package/dist-cms/packages/members/member/item/types.js +1 -0
  2238. package/dist-cms/packages/members/member/manifests.js +2 -0
  2239. package/dist-cms/packages/members/member/paths.d.ts +5 -0
  2240. package/dist-cms/packages/members/member/paths.js +1 -0
  2241. package/dist-cms/packages/members/member/picker/manifests.js +1 -0
  2242. package/dist-cms/packages/members/member/picker/member-picker-search-result-item.element.d.ts +12 -0
  2243. package/dist-cms/packages/members/member/picker/member-picker-search-result-item.element.js +32 -0
  2244. package/dist-cms/packages/members/member/repository/constants.d.ts +0 -1
  2245. package/dist-cms/packages/members/member/repository/constants.js +0 -1
  2246. package/dist-cms/packages/members/member/repository/detail/member-detail.server.data-source.js +2 -0
  2247. package/dist-cms/packages/members/member/repository/index.d.ts +0 -1
  2248. package/dist-cms/packages/members/member/repository/index.js +0 -1
  2249. package/dist-cms/packages/members/member/repository/manifests.js +1 -2
  2250. package/dist-cms/packages/members/member/repository/member-repository-base.d.ts +1 -1
  2251. package/dist-cms/packages/members/member/repository/member-repository-base.js +1 -1
  2252. package/dist-cms/packages/members/member/search/member-search.repository.d.ts +1 -1
  2253. package/dist-cms/packages/members/member/search/member-search.server.data-source.d.ts +4 -4
  2254. package/dist-cms/packages/members/member/search/member-search.server.data-source.js +1 -0
  2255. package/dist-cms/packages/members/member/search/member.search-provider.d.ts +4 -7
  2256. package/dist-cms/packages/members/member/search/types.d.ts +12 -0
  2257. package/dist-cms/packages/members/member/search/types.js +1 -0
  2258. package/dist-cms/packages/members/member/types.d.ts +2 -0
  2259. package/dist-cms/packages/members/member/workspace/member/member-workspace.context.js +2 -0
  2260. package/dist-cms/packages/members/member-group/collection/views/table/member-group-table-collection-view.element.js +1 -0
  2261. package/dist-cms/packages/members/member-type/constants.d.ts +1 -0
  2262. package/dist-cms/packages/members/member-type/constants.js +1 -0
  2263. package/dist-cms/packages/members/member-type/entity-actions/create/default/default-member-type-create-option-action.d.ts +6 -0
  2264. package/dist-cms/packages/members/member-type/entity-actions/create/default/default-member-type-create-option-action.js +15 -0
  2265. package/dist-cms/packages/members/member-type/entity-actions/create/default/manifests.d.ts +2 -0
  2266. package/dist-cms/packages/members/member-type/entity-actions/create/default/manifests.js +15 -0
  2267. package/dist-cms/packages/members/member-type/entity-actions/create/manifests.d.ts +2 -0
  2268. package/dist-cms/packages/members/member-type/entity-actions/create/manifests.js +12 -0
  2269. package/dist-cms/packages/members/member-type/entity-actions/manifests.d.ts +2 -1
  2270. package/dist-cms/packages/members/member-type/entity-actions/manifests.js +3 -16
  2271. package/dist-cms/packages/members/member-type/manifests.d.ts +2 -1
  2272. package/dist-cms/packages/members/member-type/paths.d.ts +16 -0
  2273. package/dist-cms/packages/members/member-type/paths.js +14 -0
  2274. package/dist-cms/packages/members/member-type/workspace/member-type-workspace-editor.element.js +2 -2
  2275. package/dist-cms/packages/models-builder/models-builder-dashboard.element.js +1 -1
  2276. package/dist-cms/packages/multi-url-picker/components/input-multi-url/input-multi-url.element.js +1 -0
  2277. package/dist-cms/packages/multi-url-picker/link-picker-modal/link-picker-modal.element.js +4 -3
  2278. package/dist-cms/packages/multi-url-picker/link-picker-modal/link-picker-modal.token.d.ts +1 -0
  2279. package/dist-cms/packages/multi-url-picker/monaco-markdown-editor-action/url-picker-monaco-markdown-editor-action.js +1 -0
  2280. package/dist-cms/packages/multi-url-picker/property-editor/property-editor-ui-multi-url-picker.element.d.ts +2 -0
  2281. package/dist-cms/packages/multi-url-picker/property-editor/property-editor-ui-multi-url-picker.element.js +10 -1
  2282. package/dist-cms/packages/multi-url-picker/tiny-mce-plugin/tiny-mce-multi-url-picker.plugin.js +1 -0
  2283. package/dist-cms/packages/property-editors/accepted-types/index.d.ts +1 -0
  2284. package/dist-cms/packages/property-editors/accepted-types/index.js +1 -0
  2285. package/dist-cms/packages/property-editors/accepted-types/manifests.d.ts +2 -0
  2286. package/dist-cms/packages/property-editors/accepted-types/manifests.js +12 -0
  2287. package/dist-cms/packages/property-editors/accepted-types/property-editor-ui-accepted-upload-types.element.d.ts +20 -0
  2288. package/dist-cms/packages/property-editors/accepted-types/property-editor-ui-accepted-upload-types.element.js +123 -0
  2289. package/dist-cms/packages/property-editors/color-picker/Umbraco.ColorPicker.js +4 -4
  2290. package/dist-cms/packages/property-editors/content-picker/property-editor-ui-content-picker.element.d.ts +1 -0
  2291. package/dist-cms/packages/property-editors/content-picker/property-editor-ui-content-picker.element.js +6 -0
  2292. package/dist-cms/packages/property-editors/date-picker/property-editor-ui-date-picker.element.js +1 -0
  2293. package/dist-cms/packages/property-editors/index.d.ts +1 -0
  2294. package/dist-cms/packages/property-editors/index.js +1 -0
  2295. package/dist-cms/packages/property-editors/manifests.js +2 -0
  2296. package/dist-cms/packages/property-editors/multiple-text-string/property-editor-ui-multiple-text-string.element.d.ts +7 -0
  2297. package/dist-cms/packages/property-editors/multiple-text-string/property-editor-ui-multiple-text-string.element.js +52 -17
  2298. package/dist-cms/packages/property-editors/number/Umbraco.Decimal.js +6 -6
  2299. package/dist-cms/packages/property-editors/number/Umbraco.Integer.js +1 -0
  2300. package/dist-cms/packages/property-editors/number/property-editor-ui-number.element.d.ts +5 -2
  2301. package/dist-cms/packages/property-editors/number/property-editor-ui-number.element.js +35 -18
  2302. package/dist-cms/packages/property-editors/slider/manifests.js +7 -0
  2303. package/dist-cms/packages/property-editors/slider/property-editor-ui-slider.element.d.ts +11 -11
  2304. package/dist-cms/packages/property-editors/slider/property-editor-ui-slider.element.js +34 -20
  2305. package/dist-cms/packages/property-editors/slider/slider-property-value-preset.d.ts +11 -0
  2306. package/dist-cms/packages/property-editors/slider/slider-property-value-preset.js +23 -0
  2307. package/dist-cms/packages/property-editors/slider/types.d.ts +8 -0
  2308. package/dist-cms/packages/property-editors/slider/types.js +1 -0
  2309. package/dist-cms/packages/property-editors/textarea/property-editor-ui-textarea.element.d.ts +15 -2
  2310. package/dist-cms/packages/property-editors/textarea/property-editor-ui-textarea.element.js +20 -2
  2311. package/dist-cms/packages/property-editors/toggle/Umbraco.TrueFalse.js +1 -1
  2312. package/dist-cms/packages/property-editors/toggle/manifests.js +28 -6
  2313. package/dist-cms/packages/property-editors/toggle/property-editor-ui-toggle.element.d.ts +11 -6
  2314. package/dist-cms/packages/property-editors/toggle/property-editor-ui-toggle.element.js +25 -10
  2315. package/dist-cms/packages/property-editors/toggle/true-false-property-value-preset.d.ts +8 -0
  2316. package/dist-cms/packages/property-editors/toggle/true-false-property-value-preset.js +8 -0
  2317. package/dist-cms/packages/property-editors/toggle/types.d.ts +1 -0
  2318. package/dist-cms/packages/property-editors/toggle/types.js +1 -0
  2319. package/dist-cms/packages/property-editors/types.d.ts +2 -0
  2320. package/dist-cms/packages/property-editors/types.js +1 -0
  2321. package/dist-cms/packages/relations/manifests.d.ts +2 -1
  2322. package/dist-cms/packages/relations/relations/constants.d.ts +5 -1
  2323. package/dist-cms/packages/relations/relations/constants.js +5 -1
  2324. package/dist-cms/packages/relations/relations/entity-actions/bulk-delete/bulk-delete-with-relation.action.d.ts +6 -0
  2325. package/dist-cms/packages/relations/relations/entity-actions/bulk-delete/bulk-delete-with-relation.action.js +17 -0
  2326. package/dist-cms/packages/relations/relations/entity-actions/bulk-delete/bulk-delete-with-relation.action.kind.d.ts +3 -0
  2327. package/dist-cms/packages/relations/relations/entity-actions/bulk-delete/bulk-delete-with-relation.action.kind.js +14 -0
  2328. package/dist-cms/packages/relations/relations/entity-actions/bulk-delete/constants.d.ts +2 -0
  2329. package/dist-cms/packages/relations/relations/entity-actions/bulk-delete/constants.js +2 -0
  2330. package/dist-cms/packages/relations/relations/entity-actions/bulk-delete/index.d.ts +2 -0
  2331. package/dist-cms/packages/relations/relations/entity-actions/bulk-delete/index.js +1 -0
  2332. package/dist-cms/packages/relations/relations/entity-actions/bulk-delete/manifests.d.ts +2 -0
  2333. package/dist-cms/packages/relations/relations/entity-actions/bulk-delete/manifests.js +6 -0
  2334. package/dist-cms/packages/relations/relations/entity-actions/bulk-delete/modal/bulk-delete-with-relation-modal.element.d.ts +17 -0
  2335. package/dist-cms/packages/relations/relations/entity-actions/bulk-delete/modal/bulk-delete-with-relation-modal.element.js +67 -0
  2336. package/dist-cms/packages/relations/relations/entity-actions/bulk-delete/modal/bulk-delete-with-relation-modal.token.d.ts +8 -0
  2337. package/dist-cms/packages/relations/relations/entity-actions/bulk-delete/modal/bulk-delete-with-relation-modal.token.js +6 -0
  2338. package/dist-cms/packages/relations/relations/entity-actions/bulk-delete/modal/constants.d.ts +1 -0
  2339. package/dist-cms/packages/relations/relations/entity-actions/bulk-delete/modal/constants.js +1 -0
  2340. package/dist-cms/packages/relations/relations/entity-actions/bulk-delete/modal/manifests.d.ts +1 -0
  2341. package/dist-cms/packages/relations/relations/entity-actions/bulk-delete/modal/manifests.js +8 -0
  2342. package/dist-cms/packages/relations/relations/entity-actions/bulk-delete/types.d.ts +14 -0
  2343. package/dist-cms/packages/relations/relations/entity-actions/bulk-delete/types.js +1 -0
  2344. package/dist-cms/packages/relations/relations/entity-actions/bulk-trash/bulk-trash-with-relation.action.d.ts +6 -0
  2345. package/dist-cms/packages/relations/relations/entity-actions/bulk-trash/bulk-trash-with-relation.action.js +17 -0
  2346. package/dist-cms/packages/relations/relations/entity-actions/bulk-trash/bulk-trash-with-relation.action.kind.d.ts +3 -0
  2347. package/dist-cms/packages/relations/relations/entity-actions/bulk-trash/bulk-trash-with-relation.action.kind.js +14 -0
  2348. package/dist-cms/packages/relations/relations/entity-actions/bulk-trash/constants.d.ts +2 -0
  2349. package/dist-cms/packages/relations/relations/entity-actions/bulk-trash/constants.js +2 -0
  2350. package/dist-cms/packages/relations/relations/entity-actions/bulk-trash/index.d.ts +2 -0
  2351. package/dist-cms/packages/relations/relations/entity-actions/bulk-trash/index.js +1 -0
  2352. package/dist-cms/packages/relations/relations/entity-actions/bulk-trash/manifests.d.ts +2 -0
  2353. package/dist-cms/packages/relations/relations/entity-actions/bulk-trash/manifests.js +3 -0
  2354. package/dist-cms/packages/relations/relations/entity-actions/bulk-trash/modal/bulk-trash-with-relation-modal.element.d.ts +17 -0
  2355. package/dist-cms/packages/relations/relations/entity-actions/bulk-trash/modal/bulk-trash-with-relation-modal.element.js +67 -0
  2356. package/dist-cms/packages/relations/relations/entity-actions/bulk-trash/modal/bulk-trash-with-relation-modal.token.d.ts +8 -0
  2357. package/dist-cms/packages/relations/relations/entity-actions/bulk-trash/modal/bulk-trash-with-relation-modal.token.js +6 -0
  2358. package/dist-cms/packages/relations/relations/entity-actions/bulk-trash/modal/constants.d.ts +1 -0
  2359. package/dist-cms/packages/relations/relations/entity-actions/bulk-trash/modal/constants.js +1 -0
  2360. package/dist-cms/packages/relations/relations/entity-actions/bulk-trash/modal/manifests.d.ts +1 -0
  2361. package/dist-cms/packages/relations/relations/entity-actions/bulk-trash/modal/manifests.js +8 -0
  2362. package/dist-cms/packages/relations/relations/entity-actions/bulk-trash/types.d.ts +14 -0
  2363. package/dist-cms/packages/relations/relations/entity-actions/bulk-trash/types.js +1 -0
  2364. package/dist-cms/packages/relations/relations/entity-actions/delete/constants.d.ts +1 -0
  2365. package/dist-cms/packages/relations/relations/entity-actions/delete/constants.js +1 -0
  2366. package/dist-cms/packages/relations/relations/entity-actions/delete/delete-with-relation.action.d.ts +11 -0
  2367. package/dist-cms/packages/relations/relations/entity-actions/delete/delete-with-relation.action.js +25 -0
  2368. package/dist-cms/packages/relations/relations/entity-actions/delete/delete-with-relation.action.kind.d.ts +2 -0
  2369. package/dist-cms/packages/relations/relations/entity-actions/delete/delete-with-relation.action.kind.js +13 -0
  2370. package/dist-cms/packages/relations/relations/entity-actions/delete/index.d.ts +2 -0
  2371. package/dist-cms/packages/relations/relations/entity-actions/delete/index.js +1 -0
  2372. package/dist-cms/packages/relations/relations/entity-actions/delete/manifests.d.ts +2 -0
  2373. package/dist-cms/packages/relations/relations/entity-actions/delete/manifests.js +6 -0
  2374. package/dist-cms/packages/relations/relations/entity-actions/delete/modal/constants.d.ts +1 -0
  2375. package/dist-cms/packages/relations/relations/entity-actions/delete/modal/constants.js +1 -0
  2376. package/dist-cms/packages/relations/relations/entity-actions/delete/modal/delete-with-relation-modal.element.d.ts +18 -0
  2377. package/dist-cms/packages/relations/relations/entity-actions/delete/modal/delete-with-relation-modal.element.js +83 -0
  2378. package/dist-cms/packages/relations/relations/entity-actions/delete/modal/delete-with-relation-modal.token.d.ts +9 -0
  2379. package/dist-cms/packages/relations/relations/entity-actions/delete/modal/delete-with-relation-modal.token.js +6 -0
  2380. package/dist-cms/packages/relations/relations/entity-actions/delete/modal/manifests.d.ts +1 -0
  2381. package/dist-cms/packages/relations/relations/entity-actions/delete/modal/manifests.js +8 -0
  2382. package/dist-cms/packages/relations/relations/entity-actions/delete/types.d.ts +13 -0
  2383. package/dist-cms/packages/relations/relations/entity-actions/delete/types.js +1 -0
  2384. package/dist-cms/packages/relations/relations/entity-actions/local-components/confirm-action-entity-references.element.d.ts +25 -0
  2385. package/dist-cms/packages/relations/relations/entity-actions/local-components/confirm-action-entity-references.element.js +129 -0
  2386. package/dist-cms/packages/relations/relations/entity-actions/local-components/confirm-bulk-action-entity-references.element.d.ts +21 -0
  2387. package/dist-cms/packages/relations/relations/entity-actions/local-components/confirm-bulk-action-entity-references.element.js +103 -0
  2388. package/dist-cms/packages/relations/relations/entity-actions/trash/constants.d.ts +1 -0
  2389. package/dist-cms/packages/relations/relations/entity-actions/trash/constants.js +1 -0
  2390. package/dist-cms/packages/relations/relations/entity-actions/trash/index.d.ts +2 -0
  2391. package/dist-cms/packages/relations/relations/entity-actions/trash/index.js +1 -0
  2392. package/dist-cms/packages/relations/relations/entity-actions/trash/manifests.d.ts +2 -0
  2393. package/dist-cms/packages/relations/relations/entity-actions/trash/manifests.js +3 -0
  2394. package/dist-cms/packages/relations/relations/entity-actions/trash/modal/constants.d.ts +1 -0
  2395. package/dist-cms/packages/relations/relations/entity-actions/trash/modal/constants.js +1 -0
  2396. package/dist-cms/packages/relations/relations/entity-actions/trash/modal/manifests.d.ts +1 -0
  2397. package/dist-cms/packages/relations/relations/entity-actions/trash/modal/manifests.js +8 -0
  2398. package/dist-cms/packages/relations/relations/entity-actions/trash/modal/trash-with-relation-modal.element.d.ts +18 -0
  2399. package/dist-cms/packages/relations/relations/entity-actions/trash/modal/trash-with-relation-modal.element.js +81 -0
  2400. package/dist-cms/packages/relations/relations/entity-actions/trash/modal/trash-with-relation-modal.token.d.ts +9 -0
  2401. package/dist-cms/packages/relations/relations/entity-actions/trash/modal/trash-with-relation-modal.token.js +6 -0
  2402. package/dist-cms/packages/relations/relations/entity-actions/trash/trash-with-relation.action.d.ts +11 -0
  2403. package/dist-cms/packages/relations/relations/entity-actions/trash/trash-with-relation.action.js +23 -0
  2404. package/dist-cms/packages/relations/relations/entity-actions/trash/trash-with-relation.action.kind.d.ts +2 -0
  2405. package/dist-cms/packages/relations/relations/entity-actions/trash/trash-with-relation.action.kind.js +13 -0
  2406. package/dist-cms/packages/relations/relations/entity-actions/trash/types.d.ts +14 -0
  2407. package/dist-cms/packages/relations/relations/entity-actions/trash/types.js +1 -0
  2408. package/dist-cms/packages/relations/relations/manifests.d.ts +2 -1
  2409. package/dist-cms/packages/relations/relations/manifests.js +11 -1
  2410. package/dist-cms/packages/relations/relations/reference/types.d.ts +17 -0
  2411. package/dist-cms/packages/relations/relations/reference/types.js +1 -0
  2412. package/dist-cms/packages/relations/relations/types.d.ts +1 -2
  2413. package/dist-cms/packages/rte/Umbraco.RichText.js +5 -5
  2414. package/dist-cms/packages/rte/components/rte-base.element.d.ts +13 -9
  2415. package/dist-cms/packages/rte/components/rte-base.element.js +90 -68
  2416. package/dist-cms/packages/rte/property-value-resolver/rte-block-value-resolver.api.d.ts +4 -4
  2417. package/dist-cms/packages/rte/types.d.ts +6 -1
  2418. package/dist-cms/packages/search/search-data-source.interface.d.ts +2 -2
  2419. package/dist-cms/packages/search/search-repository.interface.d.ts +2 -2
  2420. package/dist-cms/packages/templating/modals/templating-page-field-builder/templating-page-field-builder-modal.element.js +1 -1
  2421. package/dist-cms/packages/templating/templates/modals/query-builder/query-builder-modal.element.js +3 -1
  2422. package/dist-cms/packages/templating/utils/index.js +1 -1
  2423. package/dist-cms/packages/tiny-mce/components/input-tiny-mce/input-tiny-mce.element.d.ts +1 -1
  2424. package/dist-cms/packages/tiny-mce/components/input-tiny-mce/input-tiny-mce.element.js +7 -3
  2425. package/dist-cms/packages/tiny-mce/plugins/tiny-mce-mediapicker.plugin.js +3 -3
  2426. package/dist-cms/packages/tiny-mce/property-editors/tiny-mce/manifests.js +6 -6
  2427. package/dist-cms/packages/tiny-mce/property-editors/tiny-mce/property-editor-ui-tiny-mce.element.js +8 -10
  2428. package/dist-cms/packages/tiptap/components/cascading-menu-popover/cascading-menu-popover.element.d.ts +23 -0
  2429. package/dist-cms/packages/tiptap/components/cascading-menu-popover/cascading-menu-popover.element.js +113 -0
  2430. package/dist-cms/packages/tiptap/components/index.d.ts +1 -1
  2431. package/dist-cms/packages/tiptap/components/index.js +1 -1
  2432. package/dist-cms/packages/tiptap/components/input-tiptap/input-tiptap.element.d.ts +9 -2
  2433. package/dist-cms/packages/tiptap/components/input-tiptap/input-tiptap.element.js +97 -165
  2434. package/dist-cms/packages/tiptap/components/input-tiptap/tiptap-toolbar.element.d.ts +1 -1
  2435. package/dist-cms/packages/tiptap/components/input-tiptap/tiptap-toolbar.element.js +9 -4
  2436. package/dist-cms/packages/tiptap/components/toolbar/default-tiptap-toolbar-element.api.d.ts +4 -0
  2437. package/dist-cms/packages/tiptap/components/toolbar/default-tiptap-toolbar-element.api.js +4 -0
  2438. package/dist-cms/packages/tiptap/components/toolbar/tiptap-toolbar-button.element.js +1 -1
  2439. package/dist-cms/packages/tiptap/extensions/base.d.ts +5 -0
  2440. package/dist-cms/packages/tiptap/extensions/base.js +6 -0
  2441. package/dist-cms/packages/tiptap/extensions/block/block.tipap-api.d.ts +22 -0
  2442. package/dist-cms/packages/tiptap/extensions/block/block.tipap-api.js +91 -0
  2443. package/dist-cms/packages/tiptap/extensions/block/block.tiptap-toolbar-api.d.ts +9 -0
  2444. package/dist-cms/packages/tiptap/extensions/block/block.tiptap-toolbar-api.js +40 -0
  2445. package/dist-cms/packages/tiptap/extensions/block/manifests.d.ts +3 -0
  2446. package/dist-cms/packages/tiptap/extensions/block/manifests.js +26 -0
  2447. package/dist-cms/packages/tiptap/extensions/core/embedded-media.tiptap-api.d.ts +1 -0
  2448. package/dist-cms/packages/tiptap/extensions/core/embedded-media.tiptap-api.js +28 -0
  2449. package/dist-cms/packages/tiptap/extensions/core/image.tiptap-api.d.ts +2 -1
  2450. package/dist-cms/packages/tiptap/extensions/core/image.tiptap-api.js +24 -2
  2451. package/dist-cms/packages/tiptap/extensions/core/link.tiptap-api.d.ts +1 -1
  2452. package/dist-cms/packages/tiptap/extensions/core/link.tiptap-api.js +3 -2
  2453. package/dist-cms/packages/tiptap/extensions/core/media-upload.tiptap-api.js +3 -2
  2454. package/dist-cms/packages/tiptap/extensions/core/rich-text-essentials.tiptap-api.d.ts +7 -0
  2455. package/dist-cms/packages/tiptap/extensions/core/rich-text-essentials.tiptap-api.js +47 -0
  2456. package/dist-cms/packages/tiptap/extensions/core/text-direction.tiptap-api.d.ts +4 -0
  2457. package/dist-cms/packages/tiptap/extensions/core/text-direction.tiptap-api.js +12 -0
  2458. package/dist-cms/packages/tiptap/extensions/manifests.js +84 -28
  2459. package/dist-cms/packages/tiptap/extensions/style-select/manifests.d.ts +2 -0
  2460. package/dist-cms/packages/tiptap/extensions/style-select/manifests.js +13 -0
  2461. package/dist-cms/packages/tiptap/extensions/style-select/style-select-tiptap-toolbar.element.d.ts +17 -0
  2462. package/dist-cms/packages/tiptap/extensions/style-select/style-select-tiptap-toolbar.element.js +86 -0
  2463. package/dist-cms/packages/tiptap/extensions/table/components/table-insert.element.d.ts +17 -0
  2464. package/dist-cms/packages/tiptap/extensions/table/components/table-insert.element.js +93 -0
  2465. package/dist-cms/packages/tiptap/extensions/table/manifests.d.ts +2 -0
  2466. package/dist-cms/packages/tiptap/extensions/table/manifests.js +30 -0
  2467. package/dist-cms/packages/tiptap/extensions/table/table-tiptap-toolbar-button.element.d.ts +14 -0
  2468. package/dist-cms/packages/tiptap/extensions/table/table-tiptap-toolbar-button.element.js +44 -0
  2469. package/dist-cms/packages/tiptap/extensions/table/table.tiptap-api.d.ts +5 -0
  2470. package/dist-cms/packages/tiptap/extensions/table/table.tiptap-api.js +135 -0
  2471. package/dist-cms/packages/tiptap/extensions/table/table.tiptap-toolbar-api.d.ts +8 -0
  2472. package/dist-cms/packages/tiptap/extensions/table/table.tiptap-toolbar-api.js +112 -0
  2473. package/dist-cms/packages/tiptap/extensions/tiptap.extension.d.ts +1 -0
  2474. package/dist-cms/packages/tiptap/extensions/toolbar/font-family-tiptap-toolbar.element.d.ts +13 -0
  2475. package/dist-cms/packages/tiptap/extensions/toolbar/font-family-tiptap-toolbar.element.js +81 -0
  2476. package/dist-cms/packages/tiptap/extensions/toolbar/font-size-tiptap-toolbar.element.d.ts +13 -0
  2477. package/dist-cms/packages/tiptap/extensions/toolbar/font-size-tiptap-toolbar.element.js +48 -0
  2478. package/dist-cms/packages/tiptap/extensions/toolbar/link.tiptap-toolbar-api.js +1 -1
  2479. package/dist-cms/packages/tiptap/extensions/toolbar/media-picker.tiptap-toolbar-api.js +3 -0
  2480. package/dist-cms/packages/tiptap/extensions/toolbar/redo.tiptap-toolbar-api.d.ts +2 -1
  2481. package/dist-cms/packages/tiptap/extensions/toolbar/redo.tiptap-toolbar-api.js +4 -2
  2482. package/dist-cms/packages/tiptap/extensions/toolbar/source-editor.tiptap-toolbar-api.d.ts +1 -0
  2483. package/dist-cms/packages/tiptap/extensions/toolbar/source-editor.tiptap-toolbar-api.js +4 -1
  2484. package/dist-cms/packages/tiptap/extensions/toolbar/text-direction-ltr.tiptap-toolbar-api.d.ts +6 -0
  2485. package/dist-cms/packages/tiptap/extensions/toolbar/text-direction-ltr.tiptap-toolbar-api.js +15 -0
  2486. package/dist-cms/packages/tiptap/extensions/toolbar/text-direction-rtl.tiptap-toolbar-api.d.ts +6 -0
  2487. package/dist-cms/packages/tiptap/extensions/toolbar/text-direction-rtl.tiptap-toolbar-api.js +15 -0
  2488. package/dist-cms/packages/tiptap/extensions/toolbar/undo.tiptap-toolbar-api.d.ts +2 -1
  2489. package/dist-cms/packages/tiptap/extensions/toolbar/undo.tiptap-toolbar-api.js +4 -2
  2490. package/dist-cms/packages/tiptap/extensions/toolbar/unlink.tiptap-toolbar-api.d.ts +1 -0
  2491. package/dist-cms/packages/tiptap/extensions/toolbar/unlink.tiptap-toolbar-api.js +2 -1
  2492. package/dist-cms/packages/tiptap/extensions/types.d.ts +5 -0
  2493. package/dist-cms/packages/tiptap/manifests.js +1 -6
  2494. package/dist-cms/packages/tiptap/property-editors/tiptap/components/property-editor-ui-tiptap-extensions-configuration.element.d.ts +1 -2
  2495. package/dist-cms/packages/tiptap/property-editors/tiptap/components/property-editor-ui-tiptap-extensions-configuration.element.js +8 -11
  2496. package/dist-cms/packages/tiptap/property-editors/tiptap/contexts/tiptap-toolbar-configuration.context.js +4 -3
  2497. package/dist-cms/packages/tiptap/property-editors/tiptap/manifests.js +8 -8
  2498. package/dist-cms/packages/tiptap/property-editors/tiptap/property-editor-ui-tiptap.element.d.ts +3 -2
  2499. package/dist-cms/packages/tiptap/property-editors/tiptap/property-editor-ui-tiptap.element.js +13 -8
  2500. package/dist-cms/packages/umbraco-news/umbraco-news-dashboard.element.js +17 -7
  2501. package/dist-cms/packages/user/user/collection/views/table/user-table-collection-view.element.js +1 -0
  2502. package/dist-cms/packages/user/user/components/user-input/user-input.element.js +3 -12
  2503. package/dist-cms/packages/user/user/conditions/allow-change-password/manifests.js +1 -1
  2504. package/dist-cms/packages/user/user/entity-actions/manifests.js +1 -1
  2505. package/dist-cms/packages/user/user/invite/collection-action/manifests.js +1 -0
  2506. package/dist-cms/packages/user/user/item/manifests.d.ts +1 -0
  2507. package/dist-cms/packages/user/user/item/manifests.js +10 -0
  2508. package/dist-cms/packages/user/user/item/user-item-ref.element.d.ts +21 -0
  2509. package/dist-cms/packages/user/user/item/user-item-ref.element.js +99 -0
  2510. package/dist-cms/packages/user/user/manifests.js +4 -2
  2511. package/dist-cms/packages/user/user/paths.d.ts +6 -0
  2512. package/dist-cms/packages/user/user/paths.js +2 -0
  2513. package/dist-cms/packages/user/user/repository/config/manifests.js +1 -1
  2514. package/dist-cms/packages/user/user/workspace/user/components/user-workspace-profile-settings/user-workspace-profile-settings.element.js +1 -0
  2515. package/dist-cms/packages/user/user-group/collection/views/user-group-table-collection-view.element.js +1 -0
  2516. package/dist-cms/packages/user/user-group/entity-bulk-actions/manifests.js +5 -2
  2517. package/dist-cms/packages/user/user-group/modals/user-group-picker/user-group-picker-modal.element.d.ts +2 -0
  2518. package/dist-cms/packages/user/user-group/modals/user-group-picker/user-group-picker-modal.element.js +43 -4
  2519. package/dist-cms/packages/user/user-group/workspace/user-group/user-group-workspace-editor.element.js +3 -1
  2520. package/dist-cms/packages/webhook/constants.d.ts +4 -4
  2521. package/dist-cms/packages/webhook/constants.js +4 -4
  2522. package/dist-cms/packages/webhook/entity.d.ts +2 -0
  2523. package/dist-cms/packages/webhook/entity.js +1 -0
  2524. package/dist-cms/packages/webhook/index.d.ts +2 -2
  2525. package/dist-cms/packages/webhook/index.js +2 -2
  2526. package/dist-cms/packages/webhook/manifests.js +8 -16
  2527. package/dist-cms/packages/webhook/types.d.ts +3 -15
  2528. package/dist-cms/packages/webhook/webhook/collection/action/manifests.d.ts +1 -0
  2529. package/dist-cms/packages/webhook/webhook/collection/action/manifests.js +20 -0
  2530. package/dist-cms/packages/webhook/webhook/collection/manifests.d.ts +1 -0
  2531. package/dist-cms/packages/webhook/webhook/collection/repository/manifests.d.ts +1 -0
  2532. package/dist-cms/packages/webhook/webhook/collection/repository/types.d.ts +4 -0
  2533. package/dist-cms/packages/webhook/webhook/collection/repository/types.js +1 -0
  2534. package/dist-cms/packages/webhook/webhook/collection/repository/webhook-collection.repository.d.ts +10 -0
  2535. package/dist-cms/packages/webhook/webhook/collection/repository/webhook-collection.repository.js +13 -0
  2536. package/dist-cms/packages/webhook/webhook/collection/repository/webhook-collection.server.data-source.d.ts +34 -0
  2537. package/dist-cms/packages/webhook/webhook/collection/repository/webhook-collection.server.data-source.js +47 -0
  2538. package/dist-cms/packages/webhook/webhook/collection/types.js +1 -0
  2539. package/dist-cms/packages/webhook/webhook/collection/views/manifests.js +21 -0
  2540. package/dist-cms/packages/webhook/webhook/collection/views/table/column-layouts/content-type/webhook-table-name-column-layout.element.d.ts +18 -0
  2541. package/dist-cms/packages/webhook/webhook/collection/views/table/column-layouts/content-type/webhook-table-name-column-layout.element.js +52 -0
  2542. package/dist-cms/packages/webhook/webhook/collection/views/table/column-layouts/name/webhook-table-name-column-layout.element.d.ts +14 -0
  2543. package/dist-cms/packages/webhook/webhook/collection/views/table/column-layouts/name/webhook-table-name-column-layout.element.js +30 -0
  2544. package/dist-cms/packages/webhook/webhook/collection/views/table/webhook-table-collection-view.element.d.ts +18 -0
  2545. package/dist-cms/packages/webhook/webhook/collection/views/table/webhook-table-collection-view.element.js +134 -0
  2546. package/dist-cms/packages/webhook/webhook/constants.d.ts +4 -0
  2547. package/dist-cms/packages/webhook/webhook/constants.js +4 -0
  2548. package/dist-cms/packages/webhook/webhook/entity-actions/manifests.d.ts +1 -0
  2549. package/dist-cms/packages/webhook/webhook/entity-actions/manifests.js +15 -0
  2550. package/dist-cms/packages/webhook/webhook/index.d.ts +2 -0
  2551. package/dist-cms/packages/webhook/webhook/index.js +2 -0
  2552. package/dist-cms/packages/webhook/webhook/manifests.d.ts +1 -0
  2553. package/dist-cms/packages/webhook/webhook/manifests.js +10 -0
  2554. package/dist-cms/packages/webhook/webhook/paths.d.ts +8 -0
  2555. package/dist-cms/packages/webhook/webhook/paths.js +10 -0
  2556. package/dist-cms/packages/webhook/webhook/repository/constants.d.ts +2 -0
  2557. package/dist-cms/packages/webhook/webhook/repository/constants.js +2 -0
  2558. package/dist-cms/packages/webhook/webhook/repository/detail/webhook-detail.repository.d.ts +20 -0
  2559. package/dist-cms/packages/webhook/webhook/repository/detail/webhook-detail.repository.js +33 -0
  2560. package/dist-cms/packages/webhook/webhook/repository/detail/webhook-detail.server.data-source.d.ts +73 -0
  2561. package/dist-cms/packages/webhook/webhook/repository/detail/webhook-detail.server.data-source.js +138 -0
  2562. package/dist-cms/packages/webhook/webhook/repository/detail/webhook-detail.store.d.ts +19 -0
  2563. package/dist-cms/packages/webhook/webhook/repository/detail/webhook-detail.store.js +19 -0
  2564. package/dist-cms/packages/webhook/webhook/repository/index.d.ts +2 -0
  2565. package/dist-cms/packages/webhook/webhook/repository/index.js +2 -0
  2566. package/dist-cms/packages/webhook/webhook/repository/item/types.js +1 -0
  2567. package/dist-cms/packages/webhook/webhook/repository/item/webhook-item.repository.d.ts +7 -0
  2568. package/dist-cms/packages/webhook/webhook/repository/item/webhook-item.repository.js +9 -0
  2569. package/dist-cms/packages/webhook/webhook/repository/item/webhook-item.server.data-source.d.ts +17 -0
  2570. package/dist-cms/packages/webhook/webhook/repository/item/webhook-item.server.data-source.js +28 -0
  2571. package/dist-cms/packages/webhook/webhook/repository/item/webhook-item.store.d.ts +19 -0
  2572. package/dist-cms/packages/webhook/webhook/repository/item/webhook-item.store.js +19 -0
  2573. package/dist-cms/packages/webhook/webhook/repository/manifests.d.ts +1 -0
  2574. package/dist-cms/packages/webhook/webhook/repository/manifests.js +3 -0
  2575. package/dist-cms/packages/webhook/webhook/types.d.ts +14 -0
  2576. package/dist-cms/packages/webhook/webhook/types.js +1 -0
  2577. package/dist-cms/packages/webhook/webhook/workspace/manifests.d.ts +1 -0
  2578. package/dist-cms/packages/webhook/webhook/workspace/manifests.js +50 -0
  2579. package/dist-cms/packages/webhook/webhook/workspace/views/webhook-details-workspace-view.element.d.ts +20 -0
  2580. package/dist-cms/packages/webhook/webhook/workspace/views/webhook-details-workspace-view.element.js +149 -0
  2581. package/dist-cms/packages/webhook/webhook/workspace/webhook-workspace-editor.element.d.ts +16 -0
  2582. package/dist-cms/packages/webhook/webhook/workspace/webhook-workspace-editor.element.js +95 -0
  2583. package/dist-cms/packages/webhook/webhook/workspace/webhook-workspace.context.d.ts +90 -0
  2584. package/dist-cms/packages/webhook/webhook/workspace/webhook-workspace.context.js +136 -0
  2585. package/dist-cms/packages/webhook/webhook-delivery/collection/constants.d.ts +2 -0
  2586. package/dist-cms/packages/webhook/webhook-delivery/collection/constants.js +2 -0
  2587. package/dist-cms/packages/webhook/webhook-delivery/collection/index.d.ts +2 -0
  2588. package/dist-cms/packages/webhook/webhook-delivery/collection/index.js +2 -0
  2589. package/dist-cms/packages/webhook/webhook-delivery/collection/manifests.d.ts +1 -0
  2590. package/dist-cms/packages/webhook/webhook-delivery/collection/manifests.js +16 -0
  2591. package/dist-cms/packages/webhook/webhook-delivery/collection/repository/constants.d.ts +1 -0
  2592. package/dist-cms/packages/webhook/webhook-delivery/collection/repository/constants.js +1 -0
  2593. package/dist-cms/packages/webhook/webhook-delivery/collection/repository/index.d.ts +1 -0
  2594. package/dist-cms/packages/webhook/webhook-delivery/collection/repository/index.js +1 -0
  2595. package/dist-cms/packages/webhook/webhook-delivery/collection/repository/manifests.d.ts +1 -0
  2596. package/dist-cms/packages/webhook/webhook-delivery/collection/repository/manifests.js +9 -0
  2597. package/dist-cms/packages/webhook/webhook-delivery/collection/repository/types.d.ts +4 -0
  2598. package/dist-cms/packages/webhook/webhook-delivery/collection/repository/types.js +1 -0
  2599. package/dist-cms/packages/webhook/webhook-delivery/collection/repository/webhook-delivery-collection.repository.d.ts +11 -0
  2600. package/dist-cms/packages/webhook/webhook-delivery/collection/repository/webhook-delivery-collection.repository.js +13 -0
  2601. package/dist-cms/packages/webhook/webhook-delivery/collection/repository/webhook-delivery-collection.server.data-source.d.ts +34 -0
  2602. package/dist-cms/packages/webhook/webhook-delivery/collection/repository/webhook-delivery-collection.server.data-source.js +49 -0
  2603. package/dist-cms/packages/webhook/webhook-delivery/collection/types.d.ts +7 -0
  2604. package/dist-cms/packages/webhook/webhook-delivery/collection/types.js +1 -0
  2605. package/dist-cms/packages/webhook/webhook-delivery/collection/views/manifests.d.ts +1 -0
  2606. package/dist-cms/packages/webhook/webhook-delivery/collection/views/manifests.js +20 -0
  2607. package/dist-cms/packages/webhook/webhook-delivery/collection/views/table/column-layouts/status-code/webhook-delivery-table-status-code-column-layout.element.d.ts +12 -0
  2608. package/dist-cms/packages/webhook/webhook-delivery/collection/views/table/column-layouts/status-code/webhook-delivery-table-status-code-column-layout.element.js +46 -0
  2609. package/dist-cms/packages/webhook/webhook-delivery/collection/views/table/webhook-delivery-table-collection-view.element.d.ts +17 -0
  2610. package/dist-cms/packages/webhook/webhook-delivery/collection/views/table/webhook-delivery-table-collection-view.element.js +109 -0
  2611. package/dist-cms/packages/webhook/webhook-delivery/constants.d.ts +1 -0
  2612. package/dist-cms/packages/webhook/webhook-delivery/constants.js +1 -0
  2613. package/dist-cms/packages/webhook/webhook-delivery/manifests.d.ts +1 -0
  2614. package/dist-cms/packages/webhook/webhook-delivery/manifests.js +3 -0
  2615. package/dist-cms/packages/webhook/webhook-delivery/types.d.ts +10 -0
  2616. package/dist-cms/packages/webhook/webhook-delivery/types.js +1 -0
  2617. package/dist-cms/packages/webhook/webhook-delivery/workspace-view/manifests.d.ts +1 -0
  2618. package/dist-cms/packages/webhook/webhook-delivery/workspace-view/manifests.js +24 -0
  2619. package/dist-cms/packages/webhook/webhook-delivery/workspace-view/webhook-delivery-collection-workspace-view.element.d.ts +11 -0
  2620. package/dist-cms/packages/webhook/webhook-delivery/workspace-view/webhook-delivery-collection-workspace-view.element.js +27 -0
  2621. package/dist-cms/packages/webhook/webhook-event/constants.d.ts +2 -0
  2622. package/dist-cms/packages/webhook/webhook-event/constants.js +2 -0
  2623. package/dist-cms/packages/webhook/webhook-event/index.d.ts +1 -0
  2624. package/dist-cms/packages/webhook/webhook-event/index.js +1 -0
  2625. package/dist-cms/packages/webhook/webhook-event/input-webhook-events.element.d.ts +17 -0
  2626. package/dist-cms/packages/webhook/webhook-event/input-webhook-events.element.js +80 -0
  2627. package/dist-cms/packages/webhook/webhook-event/manifests.d.ts +1 -0
  2628. package/dist-cms/packages/webhook/webhook-event/manifests.js +3 -0
  2629. package/dist-cms/packages/webhook/webhook-event/modal/constants.d.ts +1 -0
  2630. package/dist-cms/packages/webhook/webhook-event/modal/constants.js +1 -0
  2631. package/dist-cms/packages/webhook/webhook-event/modal/manifests.d.ts +1 -0
  2632. package/dist-cms/packages/webhook/webhook-event/modal/manifests.js +8 -0
  2633. package/dist-cms/packages/webhook/webhook-event/modal/webhook-events-modal.element.d.ts +15 -0
  2634. package/dist-cms/packages/webhook/webhook-event/modal/webhook-events-modal.element.js +90 -0
  2635. package/dist-cms/packages/webhook/webhook-event/modal/webhook-events-modal.token.d.ts +9 -0
  2636. package/dist-cms/packages/webhook/webhook-event/repository/webhook-event.repository.d.ts +20 -0
  2637. package/dist-cms/packages/webhook/webhook-event/repository/webhook-event.store.d.ts +19 -0
  2638. package/dist-cms/packages/webhook/webhook-event/types.d.ts +5 -0
  2639. package/dist-cms/packages/webhook/webhook-event/types.js +1 -0
  2640. package/dist-cms/packages/webhook/webhook-root/constants.d.ts +2 -0
  2641. package/dist-cms/packages/webhook/webhook-root/constants.js +2 -0
  2642. package/dist-cms/packages/webhook/webhook-root/manifests.d.ts +1 -0
  2643. package/dist-cms/packages/webhook/webhook-root/manifests.js +3 -0
  2644. package/dist-cms/packages/webhook/webhook-root/menu-item/manifests.d.ts +1 -0
  2645. package/dist-cms/packages/webhook/webhook-root/menu-item/manifests.js +14 -0
  2646. package/dist-cms/packages/webhook/webhook-root/paths.d.ts +1 -0
  2647. package/dist-cms/packages/webhook/webhook-root/paths.js +7 -0
  2648. package/dist-cms/packages/webhook/webhook-root/workspace/manifests.d.ts +1 -0
  2649. package/dist-cms/packages/webhook/webhook-root/workspace/manifests.js +34 -0
  2650. package/dist-cms/tsconfig.build.tsbuildinfo +1 -1
  2651. package/dist-cms/umbraco-package-schema.json +2163 -417
  2652. package/dist-cms/umbraco-package.json +1 -1
  2653. package/dist-cms/vscode-html-custom-data.json +501 -181
  2654. package/package.json +23 -23
  2655. package/dist-cms/external/monaco-editor/cssMode-DxTuDrIE.js +0 -9
  2656. package/dist-cms/external/monaco-editor/freemarker2-DrcQQyGV.js +0 -8
  2657. package/dist-cms/external/monaco-editor/handlebars-Cbmb1STm.js +0 -6
  2658. package/dist-cms/external/monaco-editor/html-BPXby1qp.js +0 -6
  2659. package/dist-cms/external/monaco-editor/htmlMode-DF_SYfsq.js +0 -9
  2660. package/dist-cms/external/monaco-editor/index-VhKS2cWK.js +0 -1155
  2661. package/dist-cms/external/monaco-editor/javascript-CZYSexvK.js +0 -6
  2662. package/dist-cms/external/monaco-editor/jsonMode-CdxcfQWB.js +0 -15
  2663. package/dist-cms/external/monaco-editor/liquid-C71zL89N.js +0 -6
  2664. package/dist-cms/external/monaco-editor/mdx-D6BxM9uf.js +0 -6
  2665. package/dist-cms/external/monaco-editor/python-BzacYavb.js +0 -6
  2666. package/dist-cms/external/monaco-editor/razor-B08_l6rN.js +0 -6
  2667. package/dist-cms/external/monaco-editor/tsMode-4CPodS-z.js +0 -16
  2668. package/dist-cms/external/monaco-editor/typescript-DR00swPg.js +0 -6
  2669. package/dist-cms/external/monaco-editor/xml-BzeRVSw9.js +0 -6
  2670. package/dist-cms/external/monaco-editor/yaml-BAxWk40b.js +0 -6
  2671. package/dist-cms/packages/core/entity-bulk-action/common/index.d.ts +0 -3
  2672. package/dist-cms/packages/core/workspace/components/workspace-action/default/default.action.kind.d.ts +0 -2
  2673. package/dist-cms/packages/core/workspace/components/workspace-action/default/default.action.kind.js +0 -16
  2674. package/dist-cms/packages/core/workspace/components/workspace-action/default/workspace-action.element.d.ts +0 -23
  2675. package/dist-cms/packages/core/workspace/components/workspace-action/default/workspace-action.element.js +0 -152
  2676. package/dist-cms/packages/documents/documents/entity-bulk-actions/trash/manifests.js +0 -30
  2677. package/dist-cms/packages/documents/documents/entity-bulk-actions/trash/repository/trash.repository.d.ts +0 -10
  2678. package/dist-cms/packages/documents/documents/entity-bulk-actions/trash/repository/trash.repository.js +0 -32
  2679. package/dist-cms/packages/documents/documents/recycle-bin/tree/document-recycle-bin-tree.repository.d.ts +0 -19
  2680. package/dist-cms/packages/documents/documents/recycle-bin/tree/document-recycle-bin-tree.repository.js +0 -24
  2681. package/dist-cms/packages/documents/documents/recycle-bin/tree/document-recycle-bin-tree.server.data-source.d.ts +0 -17
  2682. package/dist-cms/packages/documents/documents/recycle-bin/tree/document-recycle-bin-tree.server.data-source.js +0 -75
  2683. package/dist-cms/packages/documents/documents/recycle-bin/tree/document-recycle-bin-tree.store.context-token.d.ts +0 -3
  2684. package/dist-cms/packages/documents/documents/recycle-bin/tree/document-recycle-bin-tree.store.context-token.js +0 -2
  2685. package/dist-cms/packages/documents/documents/recycle-bin/tree/document-recycle-bin-tree.store.d.ts +0 -16
  2686. package/dist-cms/packages/documents/documents/recycle-bin/tree/document-recycle-bin-tree.store.js +0 -18
  2687. package/dist-cms/packages/documents/documents/repository/item/types.d.ts +0 -26
  2688. package/dist-cms/packages/documents/documents/repository/types.d.ts +0 -1
  2689. package/dist-cms/packages/documents/documents/workspace/views/info/document-workspace-view-info-history.element.d.ts +0 -16
  2690. package/dist-cms/packages/documents/documents/workspace/views/info/document-workspace-view-info-history.element.js +0 -171
  2691. package/dist-cms/packages/documents/documents/workspace/views/info/document-workspace-view-info-links.element.d.ts +0 -20
  2692. package/dist-cms/packages/documents/documents/workspace/views/info/document-workspace-view-info-links.element.js +0 -240
  2693. package/dist-cms/packages/documents/documents/workspace/views/info/document-workspace-view-info-reference.element.d.ts +0 -20
  2694. package/dist-cms/packages/documents/documents/workspace/views/info/document-workspace-view-info-reference.element.js +0 -185
  2695. package/dist-cms/packages/documents/documents/workspace/views/info/utils.d.ts +0 -21
  2696. package/dist-cms/packages/documents/documents/workspace/views/info/utils.js +0 -114
  2697. package/dist-cms/packages/media/media/entity-bulk-actions/trash/manifests.js +0 -23
  2698. package/dist-cms/packages/media/media/entity-bulk-actions/trash/repository/trash.repository.d.ts +0 -10
  2699. package/dist-cms/packages/media/media/entity-bulk-actions/trash/repository/trash.repository.js +0 -32
  2700. package/dist-cms/packages/media/media/workspace/views/info/media-workspace-view-info-history.element.d.ts +0 -16
  2701. package/dist-cms/packages/media/media/workspace/views/info/media-workspace-view-info-history.element.js +0 -168
  2702. package/dist-cms/packages/media/media/workspace/views/info/media-workspace-view-info-reference.element.d.ts +0 -19
  2703. package/dist-cms/packages/media/media/workspace/views/info/media-workspace-view-info-reference.element.js +0 -193
  2704. package/dist-cms/packages/media/media/workspace/views/info/utils.d.ts +0 -20
  2705. package/dist-cms/packages/media/media/workspace/views/info/utils.js +0 -28
  2706. package/dist-cms/packages/media/media-types/entity-actions/create/create.action.d.ts +0 -8
  2707. package/dist-cms/packages/media/media-types/entity-actions/create/create.action.js +0 -21
  2708. package/dist-cms/packages/members/member-type/entity-actions/create.action.d.ts +0 -7
  2709. package/dist-cms/packages/members/member-type/entity-actions/create.action.js +0 -10
  2710. package/dist-cms/packages/tiptap/components/input-tiptap/tiptap-hover-menu.element.d.ts +0 -15
  2711. package/dist-cms/packages/tiptap/components/input-tiptap/tiptap-hover-menu.element.js +0 -53
  2712. package/dist-cms/packages/tiptap/components/toolbar/tiptap-toolbar-dropdown-base.element.d.ts +0 -20
  2713. package/dist-cms/packages/tiptap/components/toolbar/tiptap-toolbar-dropdown-base.element.js +0 -96
  2714. package/dist-cms/packages/tiptap/extensions/core/table.tiptap-api.d.ts +0 -4
  2715. package/dist-cms/packages/tiptap/extensions/core/table.tiptap-api.js +0 -8
  2716. package/dist-cms/packages/tiptap/extensions/toolbar/style-select.tiptap-toolbar-api.d.ts +0 -13
  2717. package/dist-cms/packages/tiptap/extensions/toolbar/style-select.tiptap-toolbar-api.js +0 -27
  2718. package/dist-cms/packages/tiptap/extensions/toolbar/table.tiptap-toolbar-api.d.ts +0 -5
  2719. package/dist-cms/packages/tiptap/extensions/toolbar/table.tiptap-toolbar-api.js +0 -6
  2720. package/dist-cms/packages/tiptap/plugins/block-picker-toolbar.extension.d.ts +0 -9
  2721. package/dist-cms/packages/tiptap/plugins/block-picker-toolbar.extension.js +0 -40
  2722. package/dist-cms/packages/tiptap/plugins/block.extension.d.ts +0 -22
  2723. package/dist-cms/packages/tiptap/plugins/block.extension.js +0 -91
  2724. package/dist-cms/packages/tiptap/plugins/manifests.d.ts +0 -3
  2725. package/dist-cms/packages/tiptap/plugins/manifests.js +0 -26
  2726. package/dist-cms/packages/webhook/collection/action/manifests.js +0 -20
  2727. package/dist-cms/packages/webhook/collection/repository/types.d.ts +0 -4
  2728. package/dist-cms/packages/webhook/collection/repository/webhook-collection.repository.d.ts +0 -10
  2729. package/dist-cms/packages/webhook/collection/repository/webhook-collection.repository.js +0 -13
  2730. package/dist-cms/packages/webhook/collection/repository/webhook-collection.server.data-source.d.ts +0 -34
  2731. package/dist-cms/packages/webhook/collection/repository/webhook-collection.server.data-source.js +0 -45
  2732. package/dist-cms/packages/webhook/collection/views/manifests.js +0 -21
  2733. package/dist-cms/packages/webhook/collection/views/table/column-layouts/content-type/webhook-table-name-column-layout.element.d.ts +0 -18
  2734. package/dist-cms/packages/webhook/collection/views/table/column-layouts/content-type/webhook-table-name-column-layout.element.js +0 -59
  2735. package/dist-cms/packages/webhook/collection/views/table/column-layouts/name/webhook-table-name-column-layout.element.d.ts +0 -14
  2736. package/dist-cms/packages/webhook/collection/views/table/column-layouts/name/webhook-table-name-column-layout.element.js +0 -30
  2737. package/dist-cms/packages/webhook/collection/views/table/webhook-table-collection-view.element.d.ts +0 -18
  2738. package/dist-cms/packages/webhook/collection/views/table/webhook-table-collection-view.element.js +0 -124
  2739. package/dist-cms/packages/webhook/components/constants.d.ts +0 -1
  2740. package/dist-cms/packages/webhook/components/constants.js +0 -1
  2741. package/dist-cms/packages/webhook/components/input-webhook-events.element.d.ts +0 -17
  2742. package/dist-cms/packages/webhook/components/input-webhook-events.element.js +0 -80
  2743. package/dist-cms/packages/webhook/components/webhook-events-modal/webhook-events-modal.element.d.ts +0 -15
  2744. package/dist-cms/packages/webhook/components/webhook-events-modal/webhook-events-modal.element.js +0 -90
  2745. package/dist-cms/packages/webhook/components/webhook-events-modal/webhook-events-modal.token.d.ts +0 -9
  2746. package/dist-cms/packages/webhook/entity-actions/manifests.js +0 -15
  2747. package/dist-cms/packages/webhook/menu-item/manifests.js +0 -14
  2748. package/dist-cms/packages/webhook/repository/constants.d.ts +0 -3
  2749. package/dist-cms/packages/webhook/repository/constants.js +0 -3
  2750. package/dist-cms/packages/webhook/repository/detail/webhook-detail.repository.d.ts +0 -15
  2751. package/dist-cms/packages/webhook/repository/detail/webhook-detail.repository.js +0 -23
  2752. package/dist-cms/packages/webhook/repository/detail/webhook-detail.server.data-source.d.ts +0 -73
  2753. package/dist-cms/packages/webhook/repository/detail/webhook-detail.server.data-source.js +0 -130
  2754. package/dist-cms/packages/webhook/repository/detail/webhook-detail.store.d.ts +0 -19
  2755. package/dist-cms/packages/webhook/repository/detail/webhook-detail.store.js +0 -19
  2756. package/dist-cms/packages/webhook/repository/event/webhook-event.repository.d.ts +0 -20
  2757. package/dist-cms/packages/webhook/repository/event/webhook-event.store.d.ts +0 -19
  2758. package/dist-cms/packages/webhook/repository/index.d.ts +0 -3
  2759. package/dist-cms/packages/webhook/repository/index.js +0 -3
  2760. package/dist-cms/packages/webhook/repository/item/webhook-item.repository.d.ts +0 -7
  2761. package/dist-cms/packages/webhook/repository/item/webhook-item.repository.js +0 -9
  2762. package/dist-cms/packages/webhook/repository/item/webhook-item.server.data-source.d.ts +0 -17
  2763. package/dist-cms/packages/webhook/repository/item/webhook-item.server.data-source.js +0 -28
  2764. package/dist-cms/packages/webhook/repository/item/webhook-item.store.d.ts +0 -19
  2765. package/dist-cms/packages/webhook/repository/item/webhook-item.store.js +0 -19
  2766. package/dist-cms/packages/webhook/repository/manifests.js +0 -4
  2767. package/dist-cms/packages/webhook/workspace/constants.d.ts +0 -2
  2768. package/dist-cms/packages/webhook/workspace/constants.js +0 -2
  2769. package/dist-cms/packages/webhook/workspace/manifests.js +0 -3
  2770. package/dist-cms/packages/webhook/workspace/webhook/manifests.js +0 -50
  2771. package/dist-cms/packages/webhook/workspace/webhook/views/webhook-details-workspace-view.element.d.ts +0 -22
  2772. package/dist-cms/packages/webhook/workspace/webhook/views/webhook-details-workspace-view.element.js +0 -160
  2773. package/dist-cms/packages/webhook/workspace/webhook/webhook-workspace-editor.element.d.ts +0 -11
  2774. package/dist-cms/packages/webhook/workspace/webhook/webhook-workspace-editor.element.js +0 -23
  2775. package/dist-cms/packages/webhook/workspace/webhook/webhook-workspace.context.d.ts +0 -15
  2776. package/dist-cms/packages/webhook/workspace/webhook/webhook-workspace.context.js +0 -47
  2777. package/dist-cms/packages/webhook/workspace/webhook-root/manifests.js +0 -34
  2778. /package/dist-cms/packages/{documents/documents/repository/item → core/entity-action/common}/types.js +0 -0
  2779. /package/dist-cms/packages/{documents/documents/repository → core/entity-bulk-action/common/bulk-delete}/types.js +0 -0
  2780. /package/dist-cms/packages/{documents/documents/repository/url → core/entity-bulk-action/common}/types.js +0 -0
  2781. /package/dist-cms/packages/core/{entity-bulk-action/common/index.js → entity-item/entity-item-ref/entity-item-ref.extension.js} +0 -0
  2782. /package/dist-cms/packages/{members/member/repository/item → core/entity-item/entity-item-ref}/types.js +0 -0
  2783. /package/dist-cms/packages/{webhook/collection/repository → core/entity-item}/types.js +0 -0
  2784. /package/dist-cms/packages/{webhook/collection → core/notification}/types.js +0 -0
  2785. /package/dist-cms/packages/core/property/{controllers → property-value-cloner}/property-value-clone.controller.d.ts +0 -0
  2786. /package/dist-cms/packages/core/property/{controllers → property-value-cloner}/property-value-clone.controller.js +0 -0
  2787. /package/dist-cms/packages/{webhook/repository/item → core/property-editor/config}/types.js +0 -0
  2788. /package/dist-cms/packages/{documents/documents/entity-bulk-actions/trash → core/temporary-file/config}/manifests.d.ts +0 -0
  2789. /package/dist-cms/packages/documents/documents/{entity-bulk-actions/trash/repository → audit-log/info-app}/manifests.d.ts +0 -0
  2790. /package/dist-cms/packages/documents/documents/{entity-bulk-actions/trash → item}/constants.d.ts +0 -0
  2791. /package/dist-cms/packages/documents/documents/{entity-bulk-actions/trash → item}/constants.js +0 -0
  2792. /package/dist-cms/packages/documents/documents/{repository/item → item}/manifests.d.ts +0 -0
  2793. /package/dist-cms/packages/documents/documents/{repository/item → item/repository}/constants.d.ts +0 -0
  2794. /package/dist-cms/packages/documents/documents/{repository/item → item/repository}/constants.js +0 -0
  2795. /package/dist-cms/packages/documents/documents/{repository/item → item/repository}/document-item.repository.d.ts +0 -0
  2796. /package/dist-cms/packages/documents/documents/{repository/item → item/repository}/document-item.repository.js +0 -0
  2797. /package/dist-cms/packages/documents/documents/{repository/item → item/repository}/document-item.server.data-source.d.ts +0 -0
  2798. /package/dist-cms/packages/documents/documents/{repository/item → item/repository}/document-item.server.data-source.js +0 -0
  2799. /package/dist-cms/packages/documents/documents/{repository/item → item/repository}/document-item.store.context-token.d.ts +0 -0
  2800. /package/dist-cms/packages/documents/documents/{repository/item → item/repository}/document-item.store.context-token.js +0 -0
  2801. /package/dist-cms/packages/documents/documents/{repository/item → item/repository}/document-item.store.d.ts +0 -0
  2802. /package/dist-cms/packages/documents/documents/{repository/item → item/repository}/document-item.store.js +0 -0
  2803. /package/dist-cms/packages/documents/documents/{repository/item → item/repository}/index.d.ts +0 -0
  2804. /package/dist-cms/packages/documents/documents/{repository/item → item/repository}/index.js +0 -0
  2805. /package/dist-cms/packages/{media/media/entity-bulk-actions/trash → documents/documents/item/repository}/manifests.d.ts +0 -0
  2806. /package/dist-cms/packages/documents/documents/{repository/item → item/repository}/manifests.js +0 -0
  2807. /package/dist-cms/packages/{media/media/entity-bulk-actions/trash → documents/documents/recycle-bin/entity-action/bulk-trash}/constants.d.ts +0 -0
  2808. /package/dist-cms/packages/{media/media/entity-bulk-actions/trash → documents/documents/recycle-bin/entity-action/bulk-trash}/constants.js +0 -0
  2809. /package/dist-cms/packages/documents/documents/{entity-bulk-actions/trash → recycle-bin/entity-action/bulk-trash}/index.d.ts +0 -0
  2810. /package/dist-cms/packages/documents/documents/{entity-bulk-actions/trash → recycle-bin/entity-action/bulk-trash}/index.js +0 -0
  2811. /package/dist-cms/packages/{media/media/entity-bulk-actions/trash/repository → documents/documents/recycle-bin/entity-action/bulk-trash}/manifests.d.ts +0 -0
  2812. /package/dist-cms/packages/documents/documents/{entity-bulk-actions/trash → recycle-bin/entity-action/bulk-trash}/repository/constants.d.ts +0 -0
  2813. /package/dist-cms/packages/documents/documents/{entity-bulk-actions/trash → recycle-bin/entity-action/bulk-trash}/repository/constants.js +0 -0
  2814. /package/dist-cms/packages/documents/documents/{entity-bulk-actions/trash → recycle-bin/entity-action/bulk-trash}/repository/index.d.ts +0 -0
  2815. /package/dist-cms/packages/documents/documents/{entity-bulk-actions/trash → recycle-bin/entity-action/bulk-trash}/repository/index.js +0 -0
  2816. /package/dist-cms/packages/{webhook/collection/action → documents/documents/recycle-bin/entity-action/bulk-trash/repository}/manifests.d.ts +0 -0
  2817. /package/dist-cms/packages/documents/documents/{entity-bulk-actions/trash → recycle-bin/entity-action/bulk-trash}/repository/manifests.js +0 -0
  2818. /package/dist-cms/packages/{webhook/collection → documents/documents/recycle-bin/tree/data}/manifests.d.ts +0 -0
  2819. /package/dist-cms/packages/{webhook/collection/repository → documents/documents/recycle-bin/tree/tree-item}/manifests.d.ts +0 -0
  2820. /package/dist-cms/packages/{webhook/entity-actions → documents/documents/reference/info-app}/manifests.d.ts +0 -0
  2821. /package/dist-cms/packages/{webhook/menu-item → documents/documents/url/info-app}/manifests.d.ts +0 -0
  2822. /package/dist-cms/packages/{webhook/repository → documents/documents/url}/manifests.d.ts +0 -0
  2823. /package/dist-cms/packages/documents/documents/{repository/url → url/repository}/constants.d.ts +0 -0
  2824. /package/dist-cms/packages/documents/documents/{repository/url → url/repository}/constants.js +0 -0
  2825. /package/dist-cms/packages/documents/documents/{repository/url → url/repository}/document-url.repository.d.ts +0 -0
  2826. /package/dist-cms/packages/documents/documents/{repository/url → url/repository}/document-url.repository.js +0 -0
  2827. /package/dist-cms/packages/documents/documents/{repository/url → url/repository}/document-url.server.data-source.d.ts +0 -0
  2828. /package/dist-cms/packages/documents/documents/{repository/url → url/repository}/document-url.server.data-source.js +0 -0
  2829. /package/dist-cms/packages/documents/documents/{repository/url → url/repository}/document-url.store.context-token.d.ts +0 -0
  2830. /package/dist-cms/packages/documents/documents/{repository/url → url/repository}/document-url.store.context-token.js +0 -0
  2831. /package/dist-cms/packages/documents/documents/{repository/url → url/repository}/document-url.store.d.ts +0 -0
  2832. /package/dist-cms/packages/documents/documents/{repository/url → url/repository}/document-url.store.js +0 -0
  2833. /package/dist-cms/packages/documents/documents/{repository/url → url/repository}/index.d.ts +0 -0
  2834. /package/dist-cms/packages/documents/documents/{repository/url → url/repository}/index.js +0 -0
  2835. /package/dist-cms/packages/documents/documents/{repository/url → url/repository}/manifests.d.ts +0 -0
  2836. /package/dist-cms/packages/documents/documents/{repository/url → url/repository}/manifests.js +0 -0
  2837. /package/dist-cms/packages/documents/documents/{repository/url → url/repository}/types.d.ts +0 -0
  2838. /package/dist-cms/packages/{webhook/workspace → documents/documents/workspace/actions}/manifests.d.ts +0 -0
  2839. /package/dist-cms/packages/{webhook/workspace/webhook → media/media/audit-log/info-app}/manifests.d.ts +0 -0
  2840. /package/dist-cms/packages/media/media/{entity-bulk-actions/trash → recycle-bin/entity-action/bulk-trash}/index.d.ts +0 -0
  2841. /package/dist-cms/packages/media/media/{entity-bulk-actions/trash → recycle-bin/entity-action/bulk-trash}/index.js +0 -0
  2842. /package/dist-cms/packages/media/media/{entity-bulk-actions/trash → recycle-bin/entity-action/bulk-trash}/repository/constants.d.ts +0 -0
  2843. /package/dist-cms/packages/media/media/{entity-bulk-actions/trash → recycle-bin/entity-action/bulk-trash}/repository/constants.js +0 -0
  2844. /package/dist-cms/packages/media/media/{entity-bulk-actions/trash → recycle-bin/entity-action/bulk-trash}/repository/index.d.ts +0 -0
  2845. /package/dist-cms/packages/media/media/{entity-bulk-actions/trash → recycle-bin/entity-action/bulk-trash}/repository/index.js +0 -0
  2846. /package/dist-cms/packages/media/media/{entity-bulk-actions/trash → recycle-bin/entity-action/bulk-trash}/repository/manifests.js +0 -0
  2847. /package/dist-cms/packages/media/media/{repository/url → url/repository}/constants.d.ts +0 -0
  2848. /package/dist-cms/packages/media/media/{repository/url → url/repository}/constants.js +0 -0
  2849. /package/dist-cms/packages/media/media/{repository/url → url/repository}/index.d.ts +0 -0
  2850. /package/dist-cms/packages/media/media/{repository/url → url/repository}/index.js +0 -0
  2851. /package/dist-cms/packages/media/media/{repository/url → url/repository}/manifests.d.ts +0 -0
  2852. /package/dist-cms/packages/media/media/{repository/url → url/repository}/manifests.js +0 -0
  2853. /package/dist-cms/packages/media/media/{repository/url → url/repository}/media-url.repository.d.ts +0 -0
  2854. /package/dist-cms/packages/media/media/{repository/url → url/repository}/media-url.repository.js +0 -0
  2855. /package/dist-cms/packages/media/media/{repository/url → url/repository}/media-url.server.data-source.d.ts +0 -0
  2856. /package/dist-cms/packages/media/media/{repository/url → url/repository}/media-url.server.data-source.js +0 -0
  2857. /package/dist-cms/packages/media/media/{repository/url → url/repository}/media-url.store.context-token.d.ts +0 -0
  2858. /package/dist-cms/packages/media/media/{repository/url → url/repository}/media-url.store.context-token.js +0 -0
  2859. /package/dist-cms/packages/media/media/{repository/url → url/repository}/media-url.store.d.ts +0 -0
  2860. /package/dist-cms/packages/media/media/{repository/url → url/repository}/media-url.store.js +0 -0
  2861. /package/dist-cms/packages/media/media/{repository/url → url/repository}/types.d.ts +0 -0
  2862. /package/dist-cms/packages/media/media/{repository/url → url/repository}/types.js +0 -0
  2863. /package/dist-cms/packages/{webhook/workspace/webhook-root → media/media-types/tree/tree-item-children/collection/action}/manifests.d.ts +0 -0
  2864. /package/dist-cms/packages/members/member/{repository/item → item/repository}/constants.d.ts +0 -0
  2865. /package/dist-cms/packages/members/member/{repository/item → item/repository}/constants.js +0 -0
  2866. /package/dist-cms/packages/members/member/{repository/item → item/repository}/index.d.ts +0 -0
  2867. /package/dist-cms/packages/members/member/{repository/item → item/repository}/index.js +0 -0
  2868. /package/dist-cms/packages/members/member/{repository/item → item/repository}/manifests.d.ts +0 -0
  2869. /package/dist-cms/packages/members/member/{repository/item → item/repository}/manifests.js +0 -0
  2870. /package/dist-cms/packages/members/member/{repository/item → item/repository}/member-item.repository.d.ts +0 -0
  2871. /package/dist-cms/packages/members/member/{repository/item → item/repository}/member-item.repository.js +0 -0
  2872. /package/dist-cms/packages/members/member/{repository/item → item/repository}/member-item.server.data-source.d.ts +0 -0
  2873. /package/dist-cms/packages/members/member/{repository/item → item/repository}/member-item.server.data-source.js +0 -0
  2874. /package/dist-cms/packages/members/member/{repository/item → item/repository}/member-item.store.context-token.d.ts +0 -0
  2875. /package/dist-cms/packages/members/member/{repository/item → item/repository}/member-item.store.context-token.js +0 -0
  2876. /package/dist-cms/packages/members/member/{repository/item → item/repository}/member-item.store.d.ts +0 -0
  2877. /package/dist-cms/packages/members/member/{repository/item → item/repository}/member-item.store.js +0 -0
  2878. /package/dist-cms/packages/members/member/{repository/item → item/repository}/types.d.ts +0 -0
  2879. /package/dist-cms/packages/webhook/{collection → webhook/collection}/constants.d.ts +0 -0
  2880. /package/dist-cms/packages/webhook/{collection → webhook/collection}/constants.js +0 -0
  2881. /package/dist-cms/packages/webhook/{collection → webhook/collection}/index.d.ts +0 -0
  2882. /package/dist-cms/packages/webhook/{collection → webhook/collection}/index.js +0 -0
  2883. /package/dist-cms/packages/webhook/{collection → webhook/collection}/manifests.js +0 -0
  2884. /package/dist-cms/packages/webhook/{collection → webhook/collection}/repository/constants.d.ts +0 -0
  2885. /package/dist-cms/packages/webhook/{collection → webhook/collection}/repository/constants.js +0 -0
  2886. /package/dist-cms/packages/webhook/{collection → webhook/collection}/repository/index.d.ts +0 -0
  2887. /package/dist-cms/packages/webhook/{collection → webhook/collection}/repository/index.js +0 -0
  2888. /package/dist-cms/packages/webhook/{collection → webhook/collection}/repository/manifests.js +0 -0
  2889. /package/dist-cms/packages/webhook/{collection → webhook/collection}/types.d.ts +0 -0
  2890. /package/dist-cms/packages/webhook/{collection → webhook/collection}/views/constants.d.ts +0 -0
  2891. /package/dist-cms/packages/webhook/{collection → webhook/collection}/views/constants.js +0 -0
  2892. /package/dist-cms/packages/webhook/{collection → webhook/collection}/views/manifests.d.ts +0 -0
  2893. /package/dist-cms/packages/webhook/{repository → webhook/repository}/detail/constants.d.ts +0 -0
  2894. /package/dist-cms/packages/webhook/{repository → webhook/repository}/detail/constants.js +0 -0
  2895. /package/dist-cms/packages/webhook/{repository → webhook/repository}/detail/index.d.ts +0 -0
  2896. /package/dist-cms/packages/webhook/{repository → webhook/repository}/detail/index.js +0 -0
  2897. /package/dist-cms/packages/webhook/{repository → webhook/repository}/detail/manifests.d.ts +0 -0
  2898. /package/dist-cms/packages/webhook/{repository → webhook/repository}/detail/manifests.js +0 -0
  2899. /package/dist-cms/packages/webhook/{repository → webhook/repository}/item/constants.d.ts +0 -0
  2900. /package/dist-cms/packages/webhook/{repository → webhook/repository}/item/constants.js +0 -0
  2901. /package/dist-cms/packages/webhook/{repository → webhook/repository}/item/index.d.ts +0 -0
  2902. /package/dist-cms/packages/webhook/{repository → webhook/repository}/item/index.js +0 -0
  2903. /package/dist-cms/packages/webhook/{repository → webhook/repository}/item/manifests.d.ts +0 -0
  2904. /package/dist-cms/packages/webhook/{repository → webhook/repository}/item/manifests.js +0 -0
  2905. /package/dist-cms/packages/webhook/{repository → webhook/repository}/item/types.d.ts +0 -0
  2906. /package/dist-cms/packages/webhook/{workspace/webhook → webhook/workspace}/constants.d.ts +0 -0
  2907. /package/dist-cms/packages/webhook/{workspace/webhook → webhook/workspace}/constants.js +0 -0
  2908. /package/dist-cms/packages/webhook/{workspace/webhook → webhook/workspace}/webhook-workspace.context-token.d.ts +0 -0
  2909. /package/dist-cms/packages/webhook/{workspace/webhook → webhook/workspace}/webhook-workspace.context-token.js +0 -0
  2910. /package/dist-cms/packages/webhook/{components/webhook-events-modal → webhook-event/modal}/webhook-events-modal.token.js +0 -0
  2911. /package/dist-cms/packages/webhook/{repository/event → webhook-event/repository}/constants.d.ts +0 -0
  2912. /package/dist-cms/packages/webhook/{repository/event → webhook-event/repository}/constants.js +0 -0
  2913. /package/dist-cms/packages/webhook/{repository/event → webhook-event/repository}/index.d.ts +0 -0
  2914. /package/dist-cms/packages/webhook/{repository/event → webhook-event/repository}/index.js +0 -0
  2915. /package/dist-cms/packages/webhook/{repository/event → webhook-event/repository}/manifests.d.ts +0 -0
  2916. /package/dist-cms/packages/webhook/{repository/event → webhook-event/repository}/manifests.js +0 -0
  2917. /package/dist-cms/packages/webhook/{repository/event → webhook-event/repository}/webhook-event.repository.js +0 -0
  2918. /package/dist-cms/packages/webhook/{repository/event → webhook-event/repository}/webhook-event.server.data-source.d.ts +0 -0
  2919. /package/dist-cms/packages/webhook/{repository/event → webhook-event/repository}/webhook-event.server.data-source.js +0 -0
  2920. /package/dist-cms/packages/webhook/{repository/event → webhook-event/repository}/webhook-event.store.js +0 -0
  2921. /package/dist-cms/packages/webhook/{workspace/webhook-root → webhook-root/workspace}/constants.d.ts +0 -0
  2922. /package/dist-cms/packages/webhook/{workspace/webhook-root → webhook-root/workspace}/constants.js +0 -0
@@ -1,18 +1,18 @@
1
- function X(n){this.content=n}X.prototype={constructor:X,find:function(n){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===n)return e;return-1},get:function(n){var e=this.find(n);return e==-1?void 0:this.content[e+1]},update:function(n,e,t){var r=t&&t!=n?this.remove(t):this,s=r.find(n),i=r.content.slice();return s==-1?i.push(t||n,e):(i[s+1]=e,t&&(i[s]=t)),new X(i)},remove:function(n){var e=this.find(n);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new X(t)},addToStart:function(n,e){return new X([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new X(t)},addBefore:function(n,e,t){var r=this.remove(e),s=r.content.slice(),i=r.find(n);return s.splice(i==-1?s.length:i,0,e,t),new X(s)},forEach:function(n){for(var e=0;e<this.content.length;e+=2)n(this.content[e],this.content[e+1])},prepend:function(n){return n=X.from(n),n.size?new X(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=X.from(n),n.size?new X(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=X.from(n);for(var t=0;t<n.content.length;t+=2)e=e.remove(n.content[t]);return e},toObject:function(){var n={};return this.forEach(function(e,t){n[e]=t}),n},get size(){return this.content.length>>1}},X.from=function(n){if(n instanceof X)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new X(e)};function no(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let s=n.child(r),i=e.child(r);if(s==i){t+=s.nodeSize;continue}if(!s.sameMarkup(i))return t;if(s.isText&&s.text!=i.text){for(let o=0;s.text[o]==i.text[o];o++)t++;return t}if(s.content.size||i.content.size){let o=no(s.content,i.content,t+1);if(o!=null)return o}t+=s.nodeSize}}function ro(n,e,t,r){for(let s=n.childCount,i=e.childCount;;){if(s==0||i==0)return s==i?null:{a:t,b:r};let o=n.child(--s),l=e.child(--i),a=o.nodeSize;if(o==l){t-=a,r-=a;continue}if(!o.sameMarkup(l))return{a:t,b:r};if(o.isText&&o.text!=l.text){let c=0,d=Math.min(o.text.length,l.text.length);for(;c<d&&o.text[o.text.length-c-1]==l.text[l.text.length-c-1];)c++,t--,r--;return{a:t,b:r}}if(o.content.size||l.content.size){let c=ro(o.content,l.content,t-1,r-1);if(c)return c}t-=a,r-=a}}class b{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,t,r,s=0,i){for(let o=0,l=0;l<t;o++){let a=this.content[o],c=l+a.nodeSize;if(c>e&&r(a,s+l,i||null,o)!==!1&&a.content.size){let d=l+1;a.nodesBetween(Math.max(0,e-d),Math.min(a.content.size,t-d),r,s+d)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,s){let i="",o=!0;return this.nodesBetween(e,t,(l,a)=>{let c=l.isText?l.text.slice(Math.max(e,a)-a,t-a):l.isLeaf?s?typeof s=="function"?s(l):s:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&r&&(o?o=!1:i+=r),i+=c},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,s=this.content.slice(),i=0;for(t.isText&&t.sameMarkup(r)&&(s[s.length-1]=t.withText(t.text+r.text),i=1);i<e.content.length;i++)s.push(e.content[i]);return new b(s,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],s=0;if(t>e)for(let i=0,o=0;o<t;i++){let l=this.content[i],a=o+l.nodeSize;a>e&&((o<e||a>t)&&(l.isText?l=l.cut(Math.max(0,e-o),Math.min(l.text.length,t-o)):l=l.cut(Math.max(0,e-o-1),Math.min(l.content.size,t-o-1))),r.push(l),s+=l.nodeSize),o=a}return new b(r,s)}cutByIndex(e,t){return e==t?b.empty:e==0&&t==this.content.length?this:new b(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let s=this.content.slice(),i=this.size+t.nodeSize-r.nodeSize;return s[e]=t,new b(s,i)}addToStart(e){return new b([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new b(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))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(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,r=0;t<this.content.length;t++){let s=this.content[t];e(s,r,t),r+=s.nodeSize}}findDiffStart(e,t=0){return no(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return ro(this,e,t,r)}findIndex(e,t=-1){if(e==0)return zn(0,e);if(e==this.size)return zn(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let r=0,s=0;;r++){let i=this.child(r),o=s+i.nodeSize;if(o>=e)return o==e||t>0?zn(r+1,o):zn(r,s);s=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return b.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new b(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return b.empty;let t,r=0;for(let s=0;s<e.length;s++){let i=e[s];r+=i.nodeSize,s&&i.isText&&e[s-1].sameMarkup(i)?(t||(t=e.slice(0,s)),t[t.length-1]=i.withText(t[t.length-1].text+i.text)):t&&t.push(i)}return new b(t||e,r)}static from(e){if(!e)return b.empty;if(e instanceof b)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new b([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}b.empty=new b([],0);const us={index:0,offset:0};function zn(n,e){return us.index=n,us.offset=e,us}function Hn(n,e){if(n===e)return!0;if(!(n&&typeof n=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(n);if(Array.isArray(e)!=t)return!1;if(t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!Hn(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!Hn(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let P=class Yi{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let s=0;s<e.length;s++){let i=e[s];if(this.eq(i))return e;if(this.type.excludes(i.type))t||(t=e.slice(0,s));else{if(i.type.excludes(this.type))return e;!r&&i.type.rank>this.type.rank&&(t||(t=e.slice(0,s)),t.push(this),r=!0),t&&t.push(i)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Hn(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[t.type];if(!r)throw new RangeError(`There is no mark type ${t.type} in this schema`);let s=r.create(t.attrs);return r.checkAttrs(s.attrs),s}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(t[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Yi.none;if(e instanceof Yi)return[e];let t=e.slice();return t.sort((r,s)=>r.type.rank-s.type.rank),t}};P.none=[];class Fn extends Error{}class x{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=io(this.content,e+this.openStart,t);return r&&new x(r,this.openStart,this.openEnd)}removeBetween(e,t){return new x(so(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return x.empty;let r=t.openStart||0,s=t.openEnd||0;if(typeof r!="number"||typeof s!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new x(b.fromJSON(e,t.content),r,s)}static maxOpen(e,t=!0){let r=0,s=0;for(let i=e.firstChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.lastChild)s++;return new x(e,r,s)}}x.empty=new x(b.empty,0,0);function so(n,e,t){let{index:r,offset:s}=n.findIndex(e),i=n.maybeChild(r),{index:o,offset:l}=n.findIndex(t);if(s==e||i.isText){if(l!=t&&!n.child(o).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=o)throw new RangeError("Removing non-flat range");return n.replaceChild(r,i.copy(so(i.content,e-s-1,t-s-1)))}function io(n,e,t,r){let{index:s,offset:i}=n.findIndex(e),o=n.maybeChild(s);if(i==e||o.isText)return n.cut(0,e).append(t).append(n.cut(e));let l=io(o.content,e-i-1,t);return l&&n.replaceChild(s,o.copy(l))}function cd(n,e,t){if(t.openStart>n.depth)throw new Fn("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new Fn("Inconsistent open depths");return oo(n,e,t,0)}function oo(n,e,t,r){let s=n.index(r),i=n.node(r);if(s==e.index(r)&&r<n.depth-t.openStart){let o=oo(n,e,t,r+1);return i.copy(i.content.replaceChild(s,o))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&n.depth==r&&e.depth==r){let o=n.parent,l=o.content;return dt(o,l.cut(0,n.parentOffset).append(t.content).append(l.cut(e.parentOffset)))}else{let{start:o,end:l}=dd(t,n);return dt(i,ao(n,o,l,e,r))}else return dt(i,$n(n,e,r))}function lo(n,e){if(!e.type.compatibleContent(n.type))throw new Fn("Cannot join "+e.type.name+" onto "+n.type.name)}function fs(n,e,t){let r=n.node(t);return lo(r,e.node(t)),r}function ct(n,e){let t=e.length-1;t>=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function Yt(n,e,t,r){let s=(e||n).node(t),i=0,o=e?e.index(t):s.childCount;n&&(i=n.index(t),n.depth>t?i++:n.textOffset&&(ct(n.nodeAfter,r),i++));for(let l=i;l<o;l++)ct(s.child(l),r);e&&e.depth==t&&e.textOffset&&ct(e.nodeBefore,r)}function dt(n,e){return n.type.checkContent(e),n.copy(e)}function ao(n,e,t,r,s){let i=n.depth>s&&fs(n,e,s+1),o=r.depth>s&&fs(t,r,s+1),l=[];return Yt(null,n,s,l),i&&o&&e.index(s)==t.index(s)?(lo(i,o),ct(dt(i,ao(n,e,t,r,s+1)),l)):(i&&ct(dt(i,$n(n,e,s+1)),l),Yt(e,t,s,l),o&&ct(dt(o,$n(t,r,s+1)),l)),Yt(r,null,s,l),new b(l)}function $n(n,e,t){let r=[];if(Yt(null,n,t,r),n.depth>t){let s=fs(n,e,t+1);ct(dt(s,$n(n,e,t+1)),r)}return Yt(e,null,t,r),new b(r)}function dd(n,e){let t=e.depth-n.openStart,s=e.node(t).copy(n.content);for(let i=t-1;i>=0;i--)s=e.node(i).copy(b.from(s));return{start:s.resolveNoCache(n.openStart+t),end:s.resolveNoCache(s.content.size-n.openEnd-t)}}class Pn{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],s=e.child(t);return r?e.child(t).cut(r):s}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],s=t==0?0:this.path[t*3-1]+1;for(let i=0;i<e;i++)s+=r.child(i).nodeSize;return s}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return P.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),s=e.maybeChild(t);if(!r){let l=r;r=s,s=l}let i=r.marks;for(var o=0;o<i.length;o++)i[o].type.spec.inclusive===!1&&(!s||!i[o].isInSet(s.marks))&&(i=i[o--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,s=e.parent.maybeChild(e.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!s||!r[i].isInSet(s.marks))&&(r=r[i--].removeFromSet(r));return r}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new Vn(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],s=0,i=t;for(let o=e;;){let{index:l,offset:a}=o.content.findIndex(i),c=i-a;if(r.push(o,l,s+a),!c||(o=o.child(l),o.isText))break;i=c-1,s+=a+1}return new Pn(t,r,i)}static resolveCached(e,t){let r=co.get(e);if(r)for(let i=0;i<r.elts.length;i++){let o=r.elts[i];if(o.pos==t)return o}else co.set(e,r=new ud);let s=r.elts[r.i]=Pn.resolve(e,t);return r.i=(r.i+1)%fd,s}}class ud{constructor(){this.elts=[],this.i=0}}const fd=12,co=new WeakMap;class Vn{constructor(e,t,r){this.$from=e,this.$to=t,this.depth=r}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 hd=Object.create(null);let Te=class Xi{constructor(e,t,r,s=P.none){this.type=e,this.attrs=t,this.marks=s,this.content=r||b.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,r,s=0){this.content.nodesBetween(e,t,r,s,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,r,s){return this.content.textBetween(e,t,r,s)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,r){return this.type==e&&Hn(this.attrs,t||e.defaultAttrs||hd)&&P.sameSet(this.marks,r||P.none)}copy(e=null){return e==this.content?this:new Xi(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Xi(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,r=!1){if(e==t)return x.empty;let s=this.resolve(e),i=this.resolve(t),o=r?0:s.sharedDepth(t),l=s.start(o),c=s.node(o).content.cut(s.pos-l,i.pos-l);return new x(c,s.depth-o,i.depth-o)}replace(e,t,r){return cd(this.resolve(e),this.resolve(t),r)}nodeAt(e){for(let t=this;;){let{index:r,offset:s}=t.content.findIndex(e);if(t=t.maybeChild(r),!t)return null;if(s==e||t.isText)return t;e-=s+1}}childAfter(e){let{index:t,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(t),index:t,offset:r};let s=this.content.child(t-1);return{node:s,index:t-1,offset:r-s.nodeSize}}resolve(e){return Pn.resolveCached(this,e)}resolveNoCache(e){return Pn.resolve(this,e)}rangeHasMark(e,t,r){let s=!1;return t>e&&this.nodesBetween(e,t,i=>(r.isInSet(i.marks)&&(s=!0),!s)),s}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 e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),uo(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=b.empty,s=0,i=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,s,i),l=o&&o.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let a=s;a<i;a++)if(!this.type.allowsMarks(r.child(a).marks))return!1;return!0}canReplaceWith(e,t,r,s){if(s&&!this.type.allowsMarks(s))return!1;let i=this.contentMatchAt(e).matchType(r),o=i&&i.matchFragment(this.content,t);return o?o.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=P.none;for(let t=0;t<this.marks.length;t++){let r=this.marks[t];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!P.sameSet(e,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 e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let s=b.fromJSON(e,t.content),i=e.nodeType(t.type).create(t.attrs,s,r);return i.type.checkAttrs(i.attrs),i}};Te.prototype.text=void 0;class ss extends Te{constructor(e,t,r,s){if(super(e,t,null,s),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):uo(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new ss(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new ss(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function uo(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class Ct{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new pd(e,t);if(r.next==null)return Ct.empty;let s=fo(r);r.next&&r.err("Unexpected trailing text");let i=xd(Sd(s));return Cd(i,r),i}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,r=e.childCount){let s=this;for(let i=t;s&&i<r;i++)s=s.matchType(e.child(i).type);return s}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let r=0;r<e.next.length;r++)if(this.next[t].type==e.next[r].type)return!0;return!1}fillBefore(e,t=!1,r=0){let s=[this];function i(o,l){let a=o.matchFragment(e,r);if(a&&(!t||a.validEnd))return b.from(l.map(c=>c.createAndFill()));for(let c=0;c<o.next.length;c++){let{type:d,next:u}=o.next[c];if(!(d.isText||d.hasRequiredAttrs())&&s.indexOf(u)==-1){s.push(u);let f=i(u,l.concat(d));if(f)return f}}return null}return i(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let s=r.shift(),i=s.match;if(i.matchType(e)){let o=[];for(let l=s;l.type;l=l.via)o.push(l.type);return o.reverse()}for(let o=0;o<i.next.length;o++){let{type:l,next:a}=i.next[o];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in t)&&(!s.type||a.validEnd)&&(r.push({match:l.contentMatch,type:l,via:s}),t[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let s=0;s<r.next.length;s++)e.indexOf(r.next[s].next)==-1&&t(r.next[s].next)}return t(this),e.map((r,s)=>{let i=s+(r.validEnd?"*":" ")+" ";for(let o=0;o<r.next.length;o++)i+=(o?", ":"")+r.next[o].type.name+"->"+e.indexOf(r.next[o].next);return i}).join(`
2
- `)}}Ct.empty=new Ct(!0);class pd{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.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(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function fo(n){let e=[];do e.push(md(n));while(n.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function md(n){let e=[];do e.push(gd(n));while(n.next&&n.next!=")"&&n.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function gd(n){let e=kd(n);for(;;)if(n.eat("+"))e={type:"plus",expr:e};else if(n.eat("*"))e={type:"star",expr:e};else if(n.eat("?"))e={type:"opt",expr:e};else if(n.eat("{"))e=yd(n,e);else break;return e}function ho(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let e=Number(n.next);return n.pos++,e}function yd(n,e){let t=ho(n),r=t;return n.eat(",")&&(n.next!="}"?r=ho(n):r=-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:t,max:r,expr:e}}function bd(n,e){let t=n.nodeTypes,r=t[e];if(r)return[r];let s=[];for(let i in t){let o=t[i];o.isInGroup(e)&&s.push(o)}return s.length==0&&n.err("No node type or group '"+e+"' found"),s}function kd(n){if(n.eat("(")){let e=fo(n);return n.eat(")")||n.err("Missing closing paren"),e}else if(/\W/.test(n.next))n.err("Unexpected token '"+n.next+"'");else{let e=bd(n,n.next).map(t=>(n.inline==null?n.inline=t.isInline:n.inline!=t.isInline&&n.err("Mixing inline and block content"),{type:"name",value:t}));return n.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function Sd(n){let e=[[]];return s(i(n,0),t()),e;function t(){return e.push([])-1}function r(o,l,a){let c={term:a,to:l};return e[o].push(c),c}function s(o,l){o.forEach(a=>a.to=l)}function i(o,l){if(o.type=="choice")return o.exprs.reduce((a,c)=>a.concat(i(c,l)),[]);if(o.type=="seq")for(let a=0;;a++){let c=i(o.exprs[a],l);if(a==o.exprs.length-1)return c;s(c,l=t())}else if(o.type=="star"){let a=t();return r(l,a),s(i(o.expr,a),a),[r(a)]}else if(o.type=="plus"){let a=t();return s(i(o.expr,l),a),s(i(o.expr,a),a),[r(a)]}else{if(o.type=="opt")return[r(l)].concat(i(o.expr,l));if(o.type=="range"){let a=l;for(let c=0;c<o.min;c++){let d=t();s(i(o.expr,a),d),a=d}if(o.max==-1)s(i(o.expr,a),a);else for(let c=o.min;c<o.max;c++){let d=t();r(a,d),s(i(o.expr,a),d),a=d}return[r(a)]}else{if(o.type=="name")return[r(l,void 0,o.value)];throw new Error("Unknown expr type")}}}}function po(n,e){return e-n}function mo(n,e){let t=[];return r(e),t.sort(po);function r(s){let i=n[s];if(i.length==1&&!i[0].term)return r(i[0].to);t.push(s);for(let o=0;o<i.length;o++){let{term:l,to:a}=i[o];!l&&t.indexOf(a)==-1&&r(a)}}}function xd(n){let e=Object.create(null);return t(mo(n,0));function t(r){let s=[];r.forEach(o=>{n[o].forEach(({term:l,to:a})=>{if(!l)return;let c;for(let d=0;d<s.length;d++)s[d][0]==l&&(c=s[d][1]);mo(n,a).forEach(d=>{c||s.push([l,c=[]]),c.indexOf(d)==-1&&c.push(d)})})});let i=e[r.join(",")]=new Ct(r.indexOf(n.length-1)>-1);for(let o=0;o<s.length;o++){let l=s[o][1].sort(po);i.next.push({type:s[o][0],next:e[l.join(",")]||t(l)})}return i}}function Cd(n,e){for(let t=0,r=[n];t<r.length;t++){let s=r[t],i=!s.validEnd,o=[];for(let l=0;l<s.next.length;l++){let{type:a,next:c}=s.next[l];o.push(a.name),i&&!(a.isText||a.hasRequiredAttrs())&&(i=!1),r.indexOf(c)==-1&&r.push(c)}i&&e.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function go(n){let e=Object.create(null);for(let t in n){let r=n[t];if(!r.hasDefault)return null;e[t]=r.default}return e}function yo(n,e){let t=Object.create(null);for(let r in n){let s=e&&e[r];if(s===void 0){let i=n[r];if(i.hasDefault)s=i.default;else throw new RangeError("No value supplied for attribute "+r)}t[r]=s}return t}function bo(n,e,t,r){for(let s in e)if(!(s in n))throw new RangeError(`Unsupported attribute ${s} for ${t} of type ${s}`);for(let s in n){let i=n[s];i.validate&&i.validate(e[s])}}function ko(n,e){let t=Object.create(null);if(e)for(let r in e)t[r]=new Md(n,r,e[r]);return t}let So=class ld{constructor(e,t,r){this.name=e,this.schema=t,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=ko(e,r.attrs),this.defaultAttrs=go(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Ct.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:yo(this.attrs,e)}create(e=null,t,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Te(this,this.computeAttrs(e),b.from(t),P.setFrom(r))}createChecked(e=null,t,r){return t=b.from(t),this.checkContent(t),new Te(this,this.computeAttrs(e),t,P.setFrom(r))}createAndFill(e=null,t,r){if(e=this.computeAttrs(e),t=b.from(t),t.size){let o=this.contentMatch.fillBefore(t);if(!o)return null;t=o.append(t)}let s=this.contentMatch.matchFragment(t),i=s&&s.fillBefore(b.empty,!0);return i?new Te(this,e,t.append(i),P.setFrom(r)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){bo(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let t;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?t&&t.push(e[r]):t||(t=e.slice(0,r));return t?t.length?t:P.none:e}static compile(e,t){let r=Object.create(null);e.forEach((i,o)=>r[i]=new ld(i,t,o));let s=t.spec.topNode||"doc";if(!r[s])throw new RangeError("Schema is missing its top node type ('"+s+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function wd(n,e,t){let r=t.split("|");return s=>{let i=s===null?"null":typeof s;if(r.indexOf(i)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${n}, got ${i}`)}}class Md{constructor(e,t,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?wd(e,t,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class is{constructor(e,t,r,s){this.name=e,this.rank=t,this.schema=r,this.spec=s,this.attrs=ko(e,s.attrs),this.excluded=null;let i=go(this.attrs);this.instance=i?new P(this,i):null}create(e=null){return!e&&this.instance?this.instance:new P(this,yo(this.attrs,e))}static compile(e,t){let r=Object.create(null),s=0;return e.forEach((i,o)=>r[i]=new is(i,s++,t,o)),r}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}checkAttrs(e){bo(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class xo{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let s in e)t[s]=e[s];t.nodes=X.from(e.nodes),t.marks=X.from(e.marks||{}),this.nodes=So.compile(this.spec.nodes,this),this.marks=is.compile(this.spec.marks,this);let r=Object.create(null);for(let s in this.nodes){if(s in this.marks)throw new RangeError(s+" can not be both a node and a mark");let i=this.nodes[s],o=i.spec.content||"",l=i.spec.marks;if(i.contentMatch=r[o]||(r[o]=Ct.parse(o,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!i.isInline||!i.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=i}i.markSet=l=="_"?null:l?Co(this,l.split(" ")):l==""||!i.inlineContent?[]:null}for(let s in this.marks){let i=this.marks[s],o=i.spec.excludes;i.excluded=o==null?[i]:o==""?[]:Co(this,o.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,r,s){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof So){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(t,r,s)}text(e,t){let r=this.nodes.text;return new ss(r,r.defaultAttrs,e,P.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeFromJSON(e){return Te.fromJSON(this,e)}markFromJSON(e){return P.fromJSON(this,e)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function Co(n,e){let t=[];for(let r=0;r<e.length;r++){let s=e[r],i=n.marks[s],o=i;if(i)t.push(i);else for(let l in n.marks){let a=n.marks[l];(s=="_"||a.spec.group&&a.spec.group.split(" ").indexOf(s)>-1)&&t.push(o=a)}if(!o)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return t}function Td(n){return n.tag!=null}function Ad(n){return n.style!=null}class We{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let r=this.matchedStyles=[];t.forEach(s=>{if(Td(s))this.tags.push(s);else if(Ad(s)){let i=/[^=]*/.exec(s.style)[0];r.indexOf(i)<0&&r.push(i),this.styles.push(s)}}),this.normalizeLists=!this.tags.some(s=>{if(!/^(ul|ol)\b/.test(s.tag)||!s.node)return!1;let i=e.nodes[s.node];return i.contentMatch.matchType(i)})}parse(e,t={}){let r=new Ao(this,t,!1);return r.addAll(e,P.none,t.from,t.to),r.finish()}parseSlice(e,t={}){let r=new Ao(this,t,!0);return r.addAll(e,P.none,t.from,t.to),x.maxOpen(r.finish())}matchTag(e,t,r){for(let s=r?this.tags.indexOf(r)+1:0;s<this.tags.length;s++){let i=this.tags[s];if(Nd(e,i.tag)&&(i.namespace===void 0||e.namespaceURI==i.namespace)&&(!i.context||t.matchesContext(i.context))){if(i.getAttrs){let o=i.getAttrs(e);if(o===!1)continue;i.attrs=o||void 0}return i}}}matchStyle(e,t,r,s){for(let i=s?this.styles.indexOf(s)+1:0;i<this.styles.length;i++){let o=this.styles[i],l=o.style;if(!(l.indexOf(e)!=0||o.context&&!r.matchesContext(o.context)||l.length>e.length&&(l.charCodeAt(e.length)!=61||l.slice(e.length+1)!=t))){if(o.getAttrs){let a=o.getAttrs(t);if(a===!1)continue;o.attrs=a||void 0}return o}}}static schemaRules(e){let t=[];function r(s){let i=s.priority==null?50:s.priority,o=0;for(;o<t.length;o++){let l=t[o];if((l.priority==null?50:l.priority)<i)break}t.splice(o,0,s)}for(let s in e.marks){let i=e.marks[s].spec.parseDOM;i&&i.forEach(o=>{r(o=Eo(o)),o.mark||o.ignore||o.clearMark||(o.mark=s)})}for(let s in e.nodes){let i=e.nodes[s].spec.parseDOM;i&&i.forEach(o=>{r(o=Eo(o)),o.node||o.ignore||o.mark||(o.node=s)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new We(e,We.schemaRules(e)))}}const wo={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},Ed={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Mo={ol:!0,ul:!0},Wn=1,jn=2,Kn=4;function To(n,e,t){return e!=null?(e?Wn:0)|(e==="full"?jn:0):n&&n.whitespace=="pre"?Wn|jn:t&-5}class Jn{constructor(e,t,r,s,i,o){this.type=e,this.attrs=t,this.marks=r,this.solid=s,this.options=o,this.content=[],this.activeMarks=P.none,this.match=i||(o&Kn?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(b.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let r=this.type.contentMatch,s;return(s=r.findWrapping(e.type))?(this.match=r,s):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Wn)){let r=this.content[this.content.length-1],s;if(r&&r.isText&&(s=/[ \t\r\n\u000c]+$/.exec(r.text))){let i=r;r.text.length==s[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-s[0].length))}}let t=b.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(b.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!wo.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class Ao{constructor(e,t,r){this.parser=e,this.options=t,this.isOpen=r,this.open=0;let s=t.topNode,i,o=To(null,t.preserveWhitespace,0)|(r?Kn:0);s?i=new Jn(s.type,s.attrs,P.none,!0,t.topMatch||s.type.contentMatch,o):r?i=new Jn(null,null,P.none,!0,null,o):i=new Jn(e.schema.topNodeType,null,P.none,!0,null,o),this.nodes=[i],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){e.nodeType==3?this.addTextNode(e,t):e.nodeType==1&&this.addElement(e,t)}addTextNode(e,t){let r=e.nodeValue,s=this.top;if(s.options&jn||s.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(s.options&Wn)s.options&jn?r=r.replace(/\r\n?/g,`
3
- `):r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let i=s.content[s.content.length-1],o=e.previousSibling;(!i||o&&o.nodeName=="BR"||i.isText&&/[ \t\r\n\u000c]$/.test(i.text))&&(r=r.slice(1))}r&&this.insertNode(this.parser.schema.text(r),t),this.findInText(e)}else this.findInside(e)}addElement(e,t,r){let s=e.nodeName.toLowerCase(),i;Mo.hasOwnProperty(s)&&this.parser.normalizeLists&&Od(e);let o=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(i=this.parser.matchTag(e,this,r));if(o?o.ignore:Ed.hasOwnProperty(s))this.findInside(e),this.ignoreFallback(e,t);else if(!o||o.skip||o.closeParent){o&&o.closeParent?this.open=Math.max(0,this.open-1):o&&o.skip.nodeType&&(e=o.skip);let l,a=this.top,c=this.needsBlock;if(wo.hasOwnProperty(s))a.content.length&&a.content[0].isInline&&this.open&&(this.open--,a=this.top),l=!0,a.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);return}let d=o&&o.skip?t:this.readStyles(e,t);d&&this.addAll(e,d),l&&this.sync(a),this.needsBlock=c}else{let l=this.readStyles(e,t);l&&this.addElementByRule(e,o,l,o.consuming===!1?i:void 0)}}leafFallback(e,t){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
4
- `),t)}ignoreFallback(e,t){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),t)}readStyles(e,t){let r=e.style;if(r&&r.length)for(let s=0;s<this.parser.matchedStyles.length;s++){let i=this.parser.matchedStyles[s],o=r.getPropertyValue(i);if(o)for(let l=void 0;;){let a=this.parser.matchStyle(i,o,this,l);if(!a)break;if(a.ignore)return null;if(a.clearMark?t=t.filter(c=>!a.clearMark(c)):t=t.concat(this.parser.schema.marks[a.mark].create(a.attrs)),a.consuming===!1)l=a;else break}}return t}addElementByRule(e,t,r,s){let i,o;if(t.node)if(o=this.parser.schema.nodes[t.node],o.isLeaf)this.insertNode(o.create(t.attrs),r)||this.leafFallback(e,r);else{let a=this.enter(o,t.attrs||null,r,t.preserveWhitespace);a&&(i=!0,r=a)}else{let a=this.parser.schema.marks[t.mark];r=r.concat(a.create(t.attrs))}let l=this.top;if(o&&o.isLeaf)this.findInside(e);else if(s)this.addElement(e,r,s);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(a=>this.insertNode(a,r));else{let a=e;typeof t.contentElement=="string"?a=e.querySelector(t.contentElement):typeof t.contentElement=="function"?a=t.contentElement(e):t.contentElement&&(a=t.contentElement),this.findAround(e,a,!0),this.addAll(a,r),this.findAround(e,a,!1)}i&&this.sync(l)&&this.open--}addAll(e,t,r,s){let i=r||0;for(let o=r?e.childNodes[r]:e.firstChild,l=s==null?null:e.childNodes[s];o!=l;o=o.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(o,t);this.findAtPoint(e,i)}findPlace(e,t){let r,s;for(let i=this.open;i>=0;i--){let o=this.nodes[i],l=o.findWrapping(e);if(l&&(!r||r.length>l.length)&&(r=l,s=o,!l.length)||o.solid)break}if(!r)return null;this.sync(s);for(let i=0;i<r.length;i++)t=this.enterInner(r[i],null,t,!1);return t}insertNode(e,t){if(e.isInline&&this.needsBlock&&!this.top.type){let s=this.textblockFromContext();s&&(t=this.enterInner(s,null,t))}let r=this.findPlace(e,t);if(r){this.closeExtra();let s=this.top;s.match&&(s.match=s.match.matchType(e.type));let i=P.none;for(let o of r.concat(e.marks))(s.type?s.type.allowsMarkType(o.type):Oo(o.type,e.type))&&(i=o.addToSet(i));return s.content.push(e.mark(i)),!0}return!1}enter(e,t,r,s){let i=this.findPlace(e.create(t),r);return i&&(i=this.enterInner(e,t,r,!0,s)),i}enterInner(e,t,r,s=!1,i){this.closeExtra();let o=this.top;o.match=o.match&&o.match.matchType(e);let l=To(e,i,o.options);o.options&Kn&&o.content.length==0&&(l|=Kn);let a=P.none;return r=r.filter(c=>(o.type?o.type.allowsMarkType(c.type):Oo(c.type,e))?(a=c.addToSet(a),!1):!0),this.nodes.push(new Jn(e,t,a,s,null,l)),this.open++,r}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));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(e){for(let t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let r=this.nodes[t].content;for(let s=r.length-1;s>=0;s--)e+=r[s].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==t&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].pos==null&&e.nodeType==1&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,r){if(e!=t&&this.find)for(let s=0;s<this.find.length;s++)this.find[s].pos==null&&e.nodeType==1&&e.contains(this.find[s].node)&&t.compareDocumentPosition(this.find[s].node)&(r?2:4)&&(this.find[s].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),r=this.options.context,s=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(s?0:1),o=(l,a)=>{for(;l>=0;l--){let c=t[l];if(c==""){if(l==t.length-1||l==0)continue;for(;a>=i;a--)if(o(l-1,a))return!0;return!1}else{let d=a>0||a==0&&s?this.nodes[a].type:r&&a>=i?r.node(a-i).type:null;if(!d||d.name!=c&&!d.isInGroup(c))return!1;a--}}return!0};return o(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let r=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let t in this.parser.schema.nodes){let r=this.parser.schema.nodes[t];if(r.isTextblock&&r.defaultAttrs)return r}}}function Od(n){for(let e=n.firstChild,t=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&Mo.hasOwnProperty(r)&&t?(t.appendChild(e),e=t):r=="li"?t=e:r&&(t=null)}}function Nd(n,e){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,e)}function Eo(n){let e={};for(let t in n)e[t]=n[t];return e}function Oo(n,e){let t=e.schema.nodes;for(let r in t){let s=t[r];if(!s.allowsMarkType(n))continue;let i=[],o=l=>{i.push(l);for(let a=0;a<l.edgeCount;a++){let{type:c,next:d}=l.edge(a);if(c==e||i.indexOf(d)<0&&o(d))return!0}};if(o(s.contentMatch))return!0}}class wt{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},r){r||(r=hs(t).createDocumentFragment());let s=r,i=[];return e.forEach(o=>{if(i.length||o.marks.length){let l=0,a=0;for(;l<i.length&&a<o.marks.length;){let c=o.marks[a];if(!this.marks[c.type.name]){a++;continue}if(!c.eq(i[l][0])||c.type.spec.spanning===!1)break;l++,a++}for(;l<i.length;)s=i.pop()[1];for(;a<o.marks.length;){let c=o.marks[a++],d=this.serializeMark(c,o.isInline,t);d&&(i.push([c,s]),s.appendChild(d.dom),s=d.contentDOM||d.dom)}}s.appendChild(this.serializeNodeInner(o,t))}),r}serializeNodeInner(e,t){let{dom:r,contentDOM:s}=Un(hs(t),this.nodes[e.type.name](e),null,e.attrs);if(s){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,s)}return r}serializeNode(e,t={}){let r=this.serializeNodeInner(e,t);for(let s=e.marks.length-1;s>=0;s--){let i=this.serializeMark(e.marks[s],e.isInline,t);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(e,t,r={}){let s=this.marks[e.type.name];return s&&Un(hs(r),s(e,t),null,e.attrs)}static renderSpec(e,t,r=null,s){return Un(e,t,r,s)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new wt(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=No(e.nodes);return t.text||(t.text=r=>r.text),t}static marksFromSchema(e){return No(e.marks)}}function No(n){let e={};for(let t in n){let r=n[t].spec.toDOM;r&&(e[t]=r)}return e}function hs(n){return n.document||window.document}const Ro=new WeakMap;function Rd(n){let e=Ro.get(n);return e===void 0&&Ro.set(n,e=Dd(n)),e}function Dd(n){let e=null;function t(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let s=0;s<r.length;s++)t(r[s]);else for(let s in r)t(r[s])}return t(n),e}function Un(n,e,t,r){if(typeof e=="string")return{dom:n.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let s=e[0],i;if(typeof s!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(i=Rd(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=s.indexOf(" ");o>0&&(t=s.slice(0,o),s=s.slice(o+1));let l,a=t?n.createElementNS(t,s):n.createElement(s),c=e[1],d=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){d=2;for(let u in c)if(c[u]!=null){let f=u.indexOf(" ");f>0?a.setAttributeNS(u.slice(0,f),u.slice(f+1),c[u]):a.setAttribute(u,c[u])}}for(let u=d;u<e.length;u++){let f=e[u];if(f===0){if(u<e.length-1||u>d)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}else{let{dom:h,contentDOM:p}=Un(n,f,t,r);if(a.appendChild(h),p){if(l)throw new RangeError("Multiple content holes");l=p}}}return{dom:a,contentDOM:l}}const Do=65535,Io=Math.pow(2,16);function Id(n,e){return n+e*Io}function vo(n){return n&Do}function vd(n){return(n-(n&Do))/Io}const Po=1,Lo=2,qn=4,Bo=8;class ps{constructor(e,t,r){this.pos=e,this.delInfo=t,this.recover=r}get deleted(){return(this.delInfo&Bo)>0}get deletedBefore(){return(this.delInfo&(Po|qn))>0}get deletedAfter(){return(this.delInfo&(Lo|qn))>0}get deletedAcross(){return(this.delInfo&qn)>0}}class he{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&he.empty)return he.empty}recover(e){let t=0,r=vo(e);if(!this.inverted)for(let s=0;s<r;s++)t+=this.ranges[s*3+2]-this.ranges[s*3+1];return this.ranges[r*3]+t+vd(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,r){let s=0,i=this.inverted?2:1,o=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?s:0);if(a>e)break;let c=this.ranges[l+i],d=this.ranges[l+o],u=a+c;if(e<=u){let f=c?e==a?-1:e==u?1:t:t,h=a+s+(f<0?0:d);if(r)return h;let p=e==(t<0?a:u)?null:Id(l/3,e-a),m=e==a?Lo:e==u?Po:qn;return(t<0?e!=a:e!=u)&&(m|=Bo),new ps(h,m,p)}s+=d-c}return r?e+s:new ps(e+s,0,null)}touches(e,t){let r=0,s=vo(t),i=this.inverted?2:1,o=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?r:0);if(a>e)break;let c=this.ranges[l+i],d=a+c;if(e<=d&&l==s*3)return!0;r+=this.ranges[l+o]-c}return!1}forEach(e){let t=this.inverted?2:1,r=this.inverted?1:2;for(let s=0,i=0;s<this.ranges.length;s+=3){let o=this.ranges[s],l=o-(this.inverted?i:0),a=o+(this.inverted?0:i),c=this.ranges[s+t],d=this.ranges[s+r];e(l,l+c,a,a+d),i+=d-c}}invert(){return new he(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?he.empty:new he(e<0?[0,-e,0]:[0,0,e])}}he.empty=new he([]);class Jt{constructor(e=[],t,r=0,s=e.length){this.maps=e,this.mirror=t,this.from=r,this.to=s}slice(e=0,t=this.maps.length){return new Jt(this.maps,this.mirror,e,t)}copy(){return new Jt(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(e,t){this.to=this.maps.push(e),t!=null&&this.setMirror(this.maps.length-1,t)}appendMapping(e){for(let t=0,r=this.maps.length;t<e.maps.length;t++){let s=e.getMirror(t);this.appendMap(e.maps[t],s!=null&&s<t?r+s:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,r=this.maps.length+e.maps.length;t>=0;t--){let s=e.getMirror(t);this.appendMap(e.maps[t].invert(),s!=null&&s>t?r-s-1:void 0)}}invert(){let e=new Jt;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let r=this.from;r<this.to;r++)e=this.maps[r].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,r){let s=0;for(let i=this.from;i<this.to;i++){let o=this.maps[i],l=o.mapResult(e,t);if(l.recover!=null){let a=this.getMirror(i);if(a!=null&&a>i&&a<this.to){i=a,e=this.maps[a].recover(l.recover);continue}}s|=l.delInfo,e=l.pos}return r?e:new ps(e,s,null)}}const ms=Object.create(null);class te{getMap(){return he.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=ms[t.stepType];if(!r)throw new RangeError(`No step type ${t.stepType} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in ms)throw new RangeError("Duplicate use of step JSON ID "+e);return ms[e]=t,t.prototype.jsonID=e,t}}class J{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new J(e,null)}static fail(e){return new J(null,e)}static fromReplace(e,t,r,s){try{return J.ok(e.replace(t,r,s))}catch(i){if(i instanceof Fn)return J.fail(i.message);throw i}}}function gs(n,e,t){let r=[];for(let s=0;s<n.childCount;s++){let i=n.child(s);i.content.size&&(i=i.copy(gs(i.content,e,i))),i.isInline&&(i=e(i,t,s)),r.push(i)}return b.fromArray(r)}class ot extends te{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=e.resolve(this.from),s=r.node(r.sharedDepth(this.to)),i=new x(gs(t.content,(o,l)=>!o.isAtom||!l.type.allowsMarkType(this.mark.type)?o:o.mark(this.mark.addToSet(o.marks)),s),t.openStart,t.openEnd);return J.fromReplace(e,this.from,this.to,i)}invert(){return new ve(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new ot(t.pos,r.pos,this.mark)}merge(e){return e instanceof ot&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new ot(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new ot(t.from,t.to,e.markFromJSON(t.mark))}}te.jsonID("addMark",ot);class ve extends te{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=new x(gs(t.content,s=>s.mark(this.mark.removeFromSet(s.marks)),e),t.openStart,t.openEnd);return J.fromReplace(e,this.from,this.to,r)}invert(){return new ot(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new ve(t.pos,r.pos,this.mark)}merge(e){return e instanceof ve&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new ve(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new ve(t.from,t.to,e.markFromJSON(t.mark))}}te.jsonID("removeMark",ve);class lt extends te{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return J.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return J.fromReplace(e,this.pos,this.pos+1,new x(b.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let r=this.mark.addToSet(t.marks);if(r.length==t.marks.length){for(let s=0;s<t.marks.length;s++)if(!t.marks[s].isInSet(r))return new lt(this.pos,t.marks[s]);return new lt(this.pos,this.mark)}}return new Ut(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new lt(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new lt(t.pos,e.markFromJSON(t.mark))}}te.jsonID("addNodeMark",lt);class Ut extends te{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return J.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return J.fromReplace(e,this.pos,this.pos+1,new x(b.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new lt(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Ut(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Ut(t.pos,e.markFromJSON(t.mark))}}te.jsonID("removeNodeMark",Ut);class Y extends te{constructor(e,t,r,s=!1){super(),this.from=e,this.to=t,this.slice=r,this.structure=s}apply(e){return this.structure&&ys(e,this.from,this.to)?J.fail("Structure replace would overwrite content"):J.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new he([this.from,this.to-this.from,this.slice.size])}invert(e){return new Y(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deletedAcross&&r.deletedAcross?null:new Y(t.pos,Math.max(t.pos,r.pos),this.slice)}merge(e){if(!(e instanceof Y)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let t=this.slice.size+e.slice.size==0?x.empty:new x(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new Y(this.from,this.to+(e.to-e.from),t,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let t=this.slice.size+e.slice.size==0?x.empty:new x(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new Y(e.from,this.to,t,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new Y(t.from,t.to,x.fromJSON(e,t.slice),!!t.structure)}}te.jsonID("replace",Y);class G extends te{constructor(e,t,r,s,i,o,l=!1){super(),this.from=e,this.to=t,this.gapFrom=r,this.gapTo=s,this.slice=i,this.insert=o,this.structure=l}apply(e){if(this.structure&&(ys(e,this.from,this.gapFrom)||ys(e,this.gapTo,this.to)))return J.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return J.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,t.content);return r?J.fromReplace(e,this.from,this.to,r):J.fail("Content does not fit in gap")}getMap(){return new he([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new G(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),s=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),i=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return t.deletedAcross&&r.deletedAcross||s<t.pos||i>r.pos?null:new G(t.pos,r.pos,s,i,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new G(t.from,t.to,t.gapFrom,t.gapTo,x.fromJSON(e,t.slice),t.insert,!!t.structure)}}te.jsonID("replaceAround",G);function ys(n,e,t){let r=n.resolve(e),s=t-e,i=r.depth;for(;s>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,s--;if(s>0){let o=r.node(i).maybeChild(r.indexAfter(i));for(;s>0;){if(!o||o.isLeaf)return!0;o=o.firstChild,s--}}return!1}function Pd(n,e,t,r){let s=[],i=[],o,l;n.doc.nodesBetween(e,t,(a,c,d)=>{if(!a.isInline)return;let u=a.marks;if(!r.isInSet(u)&&d.type.allowsMarkType(r.type)){let f=Math.max(c,e),h=Math.min(c+a.nodeSize,t),p=r.addToSet(u);for(let m=0;m<u.length;m++)u[m].isInSet(p)||(o&&o.to==f&&o.mark.eq(u[m])?o.to=h:s.push(o=new ve(f,h,u[m])));l&&l.to==f?l.to=h:i.push(l=new ot(f,h,r))}}),s.forEach(a=>n.step(a)),i.forEach(a=>n.step(a))}function Ld(n,e,t,r){let s=[],i=0;n.doc.nodesBetween(e,t,(o,l)=>{if(!o.isInline)return;i++;let a=null;if(r instanceof is){let c=o.marks,d;for(;d=r.isInSet(c);)(a||(a=[])).push(d),c=d.removeFromSet(c)}else r?r.isInSet(o.marks)&&(a=[r]):a=o.marks;if(a&&a.length){let c=Math.min(l+o.nodeSize,t);for(let d=0;d<a.length;d++){let u=a[d],f;for(let h=0;h<s.length;h++){let p=s[h];p.step==i-1&&u.eq(s[h].style)&&(f=p)}f?(f.to=c,f.step=i):s.push({style:u,from:Math.max(l,e),to:c,step:i})}}}),s.forEach(o=>n.step(new ve(o.from,o.to,o.style)))}function bs(n,e,t,r=t.contentMatch,s=!0){let i=n.doc.nodeAt(e),o=[],l=e+1;for(let a=0;a<i.childCount;a++){let c=i.child(a),d=l+c.nodeSize,u=r.matchType(c.type);if(!u)o.push(new Y(l,d,x.empty));else{r=u;for(let f=0;f<c.marks.length;f++)t.allowsMarkType(c.marks[f].type)||n.step(new ve(l,d,c.marks[f]));if(s&&c.isText&&t.whitespace!="pre"){let f,h=/\r?\n|\r/g,p;for(;f=h.exec(c.text);)p||(p=new x(b.from(t.schema.text(" ",t.allowedMarks(c.marks))),0,0)),o.push(new Y(l+f.index,l+f.index+f[0].length,p))}}l=d}if(!r.validEnd){let a=r.fillBefore(b.empty,!0);n.replace(l,l,new x(a,0,0))}for(let a=o.length-1;a>=0;a--)n.step(o[a])}function Bd(n,e,t){return(e==0||n.canReplace(e,n.childCount))&&(t==n.childCount||n.canReplace(0,t))}function Et(n){let t=n.parent.content.cutByIndex(n.startIndex,n.endIndex);for(let r=n.depth;;--r){let s=n.$from.node(r),i=n.$from.index(r),o=n.$to.indexAfter(r);if(r<n.depth&&s.canReplace(i,o,t))return r;if(r==0||s.type.spec.isolating||!Bd(s,i,o))break}return null}function zd(n,e,t){let{$from:r,$to:s,depth:i}=e,o=r.before(i+1),l=s.after(i+1),a=o,c=l,d=b.empty,u=0;for(let p=i,m=!1;p>t;p--)m||r.index(p)>0?(m=!0,d=b.from(r.node(p).copy(d)),u++):a--;let f=b.empty,h=0;for(let p=i,m=!1;p>t;p--)m||s.after(p+1)<s.end(p)?(m=!0,f=b.from(s.node(p).copy(f)),h++):c++;n.step(new G(a,c,o,l,new x(d.append(f),u,h),d.size-u,!0))}function ks(n,e,t=null,r=n){let s=Hd(n,e),i=s&&Fd(r,e);return i?s.map(zo).concat({type:e,attrs:t}).concat(i.map(zo)):null}function zo(n){return{type:n,attrs:null}}function Hd(n,e){let{parent:t,startIndex:r,endIndex:s}=n,i=t.contentMatchAt(r).findWrapping(e);if(!i)return null;let o=i.length?i[0]:e;return t.canReplaceWith(r,s,o)?i:null}function Fd(n,e){let{parent:t,startIndex:r,endIndex:s}=n,i=t.child(r),o=e.contentMatch.findWrapping(i.type);if(!o)return null;let a=(o.length?o[o.length-1]:e).contentMatch;for(let c=r;a&&c<s;c++)a=a.matchType(t.child(c).type);return!a||!a.validEnd?null:o}function $d(n,e,t){let r=b.empty;for(let o=t.length-1;o>=0;o--){if(r.size){let l=t[o].type.contentMatch.matchFragment(r);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=b.from(t[o].type.create(t[o].attrs,r))}let s=e.start,i=e.end;n.step(new G(s,i,s,i,new x(r,0,0),t.length,!0))}function Vd(n,e,t,r,s){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=n.steps.length;n.doc.nodesBetween(e,t,(o,l)=>{let a=typeof s=="function"?s(o):s;if(o.isTextblock&&!o.hasMarkup(r,a)&&Wd(n.doc,n.mapping.slice(i).map(l),r)){let c=null;if(r.schema.linebreakReplacement){let h=r.whitespace=="pre",p=!!r.contentMatch.matchType(r.schema.linebreakReplacement);h&&!p?c=!1:!h&&p&&(c=!0)}c===!1&&Fo(n,o,l,i),bs(n,n.mapping.slice(i).map(l,1),r,void 0,c===null);let d=n.mapping.slice(i),u=d.map(l,1),f=d.map(l+o.nodeSize,1);return n.step(new G(u,f,u+1,f-1,new x(b.from(r.create(a,null,o.marks)),0,0),1,!0)),c===!0&&Ho(n,o,l,i),!1}})}function Ho(n,e,t,r){e.forEach((s,i)=>{if(s.isText){let o,l=/\r?\n|\r/g;for(;o=l.exec(s.text);){let a=n.mapping.slice(r).map(t+1+i+o.index);n.replaceWith(a,a+1,e.type.schema.linebreakReplacement.create())}}})}function Fo(n,e,t,r){e.forEach((s,i)=>{if(s.type==s.type.schema.linebreakReplacement){let o=n.mapping.slice(r).map(t+1+i);n.replaceWith(o,o+1,e.type.schema.text(`
5
- `))}})}function Wd(n,e,t){let r=n.resolve(e),s=r.index();return r.parent.canReplaceWith(s,s+1,t)}function jd(n,e,t,r,s){let i=n.doc.nodeAt(e);if(!i)throw new RangeError("No node at given position");t||(t=i.type);let o=t.create(r,null,s||i.marks);if(i.isLeaf)return n.replaceWith(e,e+i.nodeSize,o);if(!t.validContent(i.content))throw new RangeError("Invalid content for node type "+t.name);n.step(new G(e,e+i.nodeSize,e+1,e+i.nodeSize-1,new x(b.from(o),0,0),1,!0))}function Ot(n,e,t=1,r){let s=n.resolve(e),i=s.depth-t,o=r&&r[r.length-1]||s.parent;if(i<0||s.parent.type.spec.isolating||!s.parent.canReplace(s.index(),s.parent.childCount)||!o.type.validContent(s.parent.content.cutByIndex(s.index(),s.parent.childCount)))return!1;for(let c=s.depth-1,d=t-2;c>i;c--,d--){let u=s.node(c),f=s.index(c);if(u.type.spec.isolating)return!1;let h=u.content.cutByIndex(f,u.childCount),p=r&&r[d+1];p&&(h=h.replaceChild(0,p.type.create(p.attrs)));let m=r&&r[d]||u;if(!u.canReplace(f+1,u.childCount)||!m.type.validContent(h))return!1}let l=s.indexAfter(i),a=r&&r[0];return s.node(i).canReplaceWith(l,l,a?a.type:s.node(i+1).type)}function Kd(n,e,t=1,r){let s=n.doc.resolve(e),i=b.empty,o=b.empty;for(let l=s.depth,a=s.depth-t,c=t-1;l>a;l--,c--){i=b.from(s.node(l).copy(i));let d=r&&r[c];o=b.from(d?d.type.create(d.attrs,o):s.node(l).copy(o))}n.step(new Y(e,e,new x(i.append(o),t,t),!0))}function je(n,e){let t=n.resolve(e),r=t.index();return $o(t.nodeBefore,t.nodeAfter)&&t.parent.canReplace(r,r+1)}function Jd(n,e){e.content.size||n.type.compatibleContent(e.type);let t=n.contentMatchAt(n.childCount),{linebreakReplacement:r}=n.type.schema;for(let s=0;s<e.childCount;s++){let i=e.child(s),o=i.type==r?n.type.schema.nodes.text:i.type;if(t=t.matchType(o),!t||!n.type.allowsMarks(i.marks))return!1}return t.validEnd}function $o(n,e){return!!(n&&e&&!n.isLeaf&&Jd(n,e))}function _n(n,e,t=-1){let r=n.resolve(e);for(let s=r.depth;;s--){let i,o,l=r.index(s);if(s==r.depth?(i=r.nodeBefore,o=r.nodeAfter):t>0?(i=r.node(s+1),l++,o=r.node(s).maybeChild(l)):(i=r.node(s).maybeChild(l-1),o=r.node(s+1)),i&&!i.isTextblock&&$o(i,o)&&r.node(s).canReplace(l,l+1))return e;if(s==0)break;e=t<0?r.before(s):r.after(s)}}function Ud(n,e,t){let r=null,{linebreakReplacement:s}=n.doc.type.schema,i=n.doc.resolve(e-t),o=i.node().type;if(s&&o.inlineContent){let d=o.whitespace=="pre",u=!!o.contentMatch.matchType(s);d&&!u?r=!1:!d&&u&&(r=!0)}let l=n.steps.length;if(r===!1){let d=n.doc.resolve(e+t);Fo(n,d.node(),d.before(),l)}o.inlineContent&&bs(n,e+t-1,o,i.node().contentMatchAt(i.index()),r==null);let a=n.mapping.slice(l),c=a.map(e-t);if(n.step(new Y(c,a.map(e+t,-1),x.empty,!0)),r===!0){let d=n.doc.resolve(c);Ho(n,d.node(),d.before(),n.steps.length)}return n}function qd(n,e,t){let r=n.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),t))return e;if(r.parentOffset==0)for(let s=r.depth-1;s>=0;s--){let i=r.index(s);if(r.node(s).canReplaceWith(i,i,t))return r.before(s+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(let s=r.depth-1;s>=0;s--){let i=r.indexAfter(s);if(r.node(s).canReplaceWith(i,i,t))return r.after(s+1);if(i<r.node(s).childCount)return null}return null}function Vo(n,e,t){let r=n.resolve(e);if(!t.content.size)return e;let s=t.content;for(let i=0;i<t.openStart;i++)s=s.firstChild.content;for(let i=1;i<=(t.openStart==0&&t.size?2:1);i++)for(let o=r.depth;o>=0;o--){let l=o==r.depth?0:r.pos<=(r.start(o+1)+r.end(o+1))/2?-1:1,a=r.index(o)+(l>0?1:0),c=r.node(o),d=!1;if(i==1)d=c.canReplace(a,a,s);else{let u=c.contentMatchAt(a).findWrapping(s.firstChild.type);d=u&&c.canReplaceWith(a,a,u[0])}if(d)return l==0?r.pos:l<0?r.before(o+1):r.after(o+1)}return null}function Gn(n,e,t=e,r=x.empty){if(e==t&&!r.size)return null;let s=n.resolve(e),i=n.resolve(t);return Wo(s,i,r)?new Y(e,t,r):new _d(s,i,r).fit()}function Wo(n,e,t){return!t.openStart&&!t.openEnd&&n.start()==e.start()&&n.parent.canReplace(n.index(),e.index(),t.content)}class _d{constructor(e,t,r){this.$from=e,this.$to=t,this.unplaced=r,this.frontier=[],this.placed=b.empty;for(let s=0;s<=e.depth;s++){let i=e.node(s);this.frontier.push({type:i.type,match:i.contentMatchAt(e.indexAfter(s))})}for(let s=e.depth;s>0;s--)this.placed=b.from(e.node(s).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,r=this.$from,s=this.close(e<0?this.$to:r.doc.resolve(e));if(!s)return null;let i=this.placed,o=r.depth,l=s.depth;for(;o&&l&&i.childCount==1;)i=i.firstChild.content,o--,l--;let a=new x(i,o,l);return e>-1?new G(r.pos,e,this.$to.pos,this.$to.end(),a,t):a.size||r.pos!=this.$to.pos?new Y(r.pos,s.pos,a):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,r=0,s=this.unplaced.openEnd;r<e;r++){let i=t.firstChild;if(t.childCount>1&&(s=0),i.type.spec.isolating&&s<=r){e=r;break}t=i.content}for(let t=1;t<=2;t++)for(let r=t==1?e:this.unplaced.openStart;r>=0;r--){let s,i=null;r?(i=Ss(this.unplaced.content,r-1).firstChild,s=i.content):s=this.unplaced.content;let o=s.firstChild;for(let l=this.depth;l>=0;l--){let{type:a,match:c}=this.frontier[l],d,u=null;if(t==1&&(o?c.matchType(o.type)||(u=c.fillBefore(b.from(o),!1)):i&&a.compatibleContent(i.type)))return{sliceDepth:r,frontierDepth:l,parent:i,inject:u};if(t==2&&o&&(d=c.findWrapping(o.type)))return{sliceDepth:r,frontierDepth:l,parent:i,wrap:d};if(i&&c.matchType(i.type))break}}}openMore(){let{content:e,openStart:t,openEnd:r}=this.unplaced,s=Ss(e,t);return!s.childCount||s.firstChild.isLeaf?!1:(this.unplaced=new x(e,t+1,Math.max(r,s.size+t>=e.size-r?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:r}=this.unplaced,s=Ss(e,t);if(s.childCount<=1&&t>0){let i=e.size-t<=t+s.size;this.unplaced=new x(Xt(e,t-1,1),t-1,i?t-1:r)}else this.unplaced=new x(Xt(e,t,1),t,r)}placeNodes({sliceDepth:e,frontierDepth:t,parent:r,inject:s,wrap:i}){for(;this.depth>t;)this.closeFrontierNode();if(i)for(let m=0;m<i.length;m++)this.openFrontierNode(i[m]);let o=this.unplaced,l=r?r.content:o.content,a=o.openStart-e,c=0,d=[],{match:u,type:f}=this.frontier[t];if(s){for(let m=0;m<s.childCount;m++)d.push(s.child(m));u=u.matchFragment(s)}let h=l.size+e-(o.content.size-o.openEnd);for(;c<l.childCount;){let m=l.child(c),g=u.matchType(m.type);if(!g)break;c++,(c>1||a==0||m.content.size)&&(u=g,d.push(jo(m.mark(f.allowedMarks(m.marks)),c==1?a:0,c==l.childCount?h:-1)))}let p=c==l.childCount;p||(h=-1),this.placed=Qt(this.placed,t,b.from(d)),this.frontier[t].match=u,p&&h<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,g=l;m<h;m++){let y=g.lastChild;this.frontier.push({type:y.type,match:y.contentMatchAt(y.childCount)}),g=y.content}this.unplaced=p?e==0?x.empty:new x(Xt(o.content,e-1,1),e-1,h<0?o.openEnd:e-1):new x(Xt(o.content,e,c),o.openStart,o.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],t;if(!e.type.isTextblock||!xs(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return-1;let{depth:r}=this.$to,s=this.$to.after(r);for(;r>1&&s==this.$to.end(--r);)++s;return s}findCloseLevel(e){e:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:r,type:s}=this.frontier[t],i=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),o=xs(e,t,s,r,i);if(o){for(let l=t-1;l>=0;l--){let{match:a,type:c}=this.frontier[l],d=xs(e,l,c,a,!0);if(!d||d.childCount)continue e}return{depth:t,fit:o,move:i?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=Qt(this.placed,t.depth,t.fit)),e=t.move;for(let r=t.depth+1;r<=e.depth;r++){let s=e.node(r),i=s.type.contentMatch.fillBefore(s.content,!0,e.index(r));this.openFrontierNode(s.type,s.attrs,i)}return e}openFrontierNode(e,t=null,r){let s=this.frontier[this.depth];s.match=s.match.matchType(e),this.placed=Qt(this.placed,this.depth,b.from(e.create(t,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(b.empty,!0);t.childCount&&(this.placed=Qt(this.placed,this.frontier.length,t))}}function Xt(n,e,t){return e==0?n.cutByIndex(t,n.childCount):n.replaceChild(0,n.firstChild.copy(Xt(n.firstChild.content,e-1,t)))}function Qt(n,e,t){return e==0?n.append(t):n.replaceChild(n.childCount-1,n.lastChild.copy(Qt(n.lastChild.content,e-1,t)))}function Ss(n,e){for(let t=0;t<e;t++)n=n.firstChild.content;return n}function jo(n,e,t){if(e<=0)return n;let r=n.content;return e>1&&(r=r.replaceChild(0,jo(r.firstChild,e-1,r.childCount==1?t-1:0))),e>0&&(r=n.type.contentMatch.fillBefore(r).append(r),t<=0&&(r=r.append(n.type.contentMatch.matchFragment(r).fillBefore(b.empty,!0)))),n.copy(r)}function xs(n,e,t,r,s){let i=n.node(e),o=s?n.indexAfter(e):n.index(e);if(o==i.childCount&&!t.compatibleContent(i.type))return null;let l=r.fillBefore(i.content,!0,o);return l&&!Gd(t,i.content,o)?l:null}function Gd(n,e,t){for(let r=t;r<e.childCount;r++)if(!n.allowsMarks(e.child(r).marks))return!0;return!1}function Yd(n){return n.spec.defining||n.spec.definingForContent}function Xd(n,e,t,r){if(!r.size)return n.deleteRange(e,t);let s=n.doc.resolve(e),i=n.doc.resolve(t);if(Wo(s,i,r))return n.step(new Y(e,t,r));let o=Jo(s,n.doc.resolve(t));o[o.length-1]==0&&o.pop();let l=-(s.depth+1);o.unshift(l);for(let f=s.depth,h=s.pos-1;f>0;f--,h--){let p=s.node(f).type.spec;if(p.defining||p.definingAsContext||p.isolating)break;o.indexOf(f)>-1?l=f:s.before(f)==h&&o.splice(1,0,-f)}let a=o.indexOf(l),c=[],d=r.openStart;for(let f=r.content,h=0;;h++){let p=f.firstChild;if(c.push(p),h==r.openStart)break;f=p.content}for(let f=d-1;f>=0;f--){let h=c[f],p=Yd(h.type);if(p&&!h.sameMarkup(s.node(Math.abs(l)-1)))d=f;else if(p||!h.type.isTextblock)break}for(let f=r.openStart;f>=0;f--){let h=(f+d+1)%(r.openStart+1),p=c[h];if(p)for(let m=0;m<o.length;m++){let g=o[(m+a)%o.length],y=!0;g<0&&(y=!1,g=-g);let k=s.node(g-1),T=s.index(g-1);if(k.canReplaceWith(T,T,p.type,p.marks))return n.replace(s.before(g),y?i.after(g):t,new x(Ko(r.content,0,r.openStart,h),h,r.openEnd))}}let u=n.steps.length;for(let f=o.length-1;f>=0&&(n.replace(e,t,r),!(n.steps.length>u));f--){let h=o[f];h<0||(e=s.before(h),t=i.after(h))}}function Ko(n,e,t,r,s){if(e<t){let i=n.firstChild;n=n.replaceChild(0,i.copy(Ko(i.content,e+1,t,r,i)))}if(e>r){let i=s.contentMatchAt(0),o=i.fillBefore(n).append(n);n=o.append(i.matchFragment(o).fillBefore(b.empty,!0))}return n}function Qd(n,e,t,r){if(!r.isInline&&e==t&&n.doc.resolve(e).parent.content.size){let s=qd(n.doc,e,r.type);s!=null&&(e=t=s)}n.replaceRange(e,t,new x(b.from(r),0,0))}function Zd(n,e,t){let r=n.doc.resolve(e),s=n.doc.resolve(t),i=Jo(r,s);for(let o=0;o<i.length;o++){let l=i[o],a=o==i.length-1;if(a&&l==0||r.node(l).type.contentMatch.validEnd)return n.delete(r.start(l),s.end(l));if(l>0&&(a||r.node(l-1).canReplace(r.index(l-1),s.indexAfter(l-1))))return n.delete(r.before(l),s.after(l))}for(let o=1;o<=r.depth&&o<=s.depth;o++)if(e-r.start(o)==r.depth-o&&t>r.end(o)&&s.end(o)-t!=s.depth-o&&r.start(o-1)==s.start(o-1)&&r.node(o-1).canReplace(r.index(o-1),s.index(o-1)))return n.delete(r.before(o),t);n.delete(e,t)}function Jo(n,e){let t=[],r=Math.min(n.depth,e.depth);for(let s=r;s>=0;s--){let i=n.start(s);if(i<n.pos-(n.depth-s)||e.end(s)>e.pos+(e.depth-s)||n.node(s).type.spec.isolating||e.node(s).type.spec.isolating)break;(i==e.start(s)||s==n.depth&&s==e.depth&&n.parent.inlineContent&&e.parent.inlineContent&&s&&e.start(s-1)==i-1)&&t.push(s)}return t}class qt extends te{constructor(e,t,r){super(),this.pos=e,this.attr=t,this.value=r}apply(e){let t=e.nodeAt(this.pos);if(!t)return J.fail("No node at attribute step's position");let r=Object.create(null);for(let i in t.attrs)r[i]=t.attrs[i];r[this.attr]=this.value;let s=t.type.create(r,null,t.marks);return J.fromReplace(e,this.pos,this.pos+1,new x(b.from(s),0,t.isLeaf?0:1))}getMap(){return he.empty}invert(e){return new qt(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new qt(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.pos!="number"||typeof t.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new qt(t.pos,t.attr,t.value)}}te.jsonID("attr",qt);class Ln extends te{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let s in e.attrs)t[s]=e.attrs[s];t[this.attr]=this.value;let r=e.type.create(t,e.content,e.marks);return J.ok(r)}getMap(){return he.empty}invert(e){return new Ln(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Ln(t.attr,t.value)}}te.jsonID("docAttr",Ln);let Nt=class extends Error{};Nt=function n(e){let t=Error.call(this,e);return t.__proto__=n.prototype,t},Nt.prototype=Object.create(Error.prototype),Nt.prototype.constructor=Nt,Nt.prototype.name="TransformError";class Cs{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Jt}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new Nt(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,r=x.empty){let s=Gn(this.doc,e,t,r);return s&&this.step(s),this}replaceWith(e,t,r){return this.replace(e,t,new x(b.from(r),0,0))}delete(e,t){return this.replace(e,t,x.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,r){return Xd(this,e,t,r),this}replaceRangeWith(e,t,r){return Qd(this,e,t,r),this}deleteRange(e,t){return Zd(this,e,t),this}lift(e,t){return zd(this,e,t),this}join(e,t=1){return Ud(this,e,t),this}wrap(e,t){return $d(this,e,t),this}setBlockType(e,t=e,r,s=null){return Vd(this,e,t,r,s),this}setNodeMarkup(e,t,r=null,s){return jd(this,e,t,r,s),this}setNodeAttribute(e,t,r){return this.step(new qt(e,t,r)),this}setDocAttribute(e,t){return this.step(new Ln(e,t)),this}addNodeMark(e,t){return this.step(new lt(e,t)),this}removeNodeMark(e,t){if(!(t instanceof P)){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(t=t.isInSet(r.marks),!t)return this}return this.step(new Ut(e,t)),this}split(e,t=1,r){return Kd(this,e,t,r),this}addMark(e,t,r){return Pd(this,e,t,r),this}removeMark(e,t,r){return Ld(this,e,t,r),this}clearIncompatible(e,t,r){return bs(this,e,t,r),this}}const ws=Object.create(null);class E{constructor(e,t,r){this.$anchor=e,this.$head=t,this.ranges=r||[new Uo(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=x.empty){let r=t.content.lastChild,s=null;for(let l=0;l<t.openEnd;l++)s=r,r=r.lastChild;let i=e.steps.length,o=this.ranges;for(let l=0;l<o.length;l++){let{$from:a,$to:c}=o[l],d=e.mapping.slice(i);e.replaceRange(d.map(a.pos),d.map(c.pos),l?x.empty:t),l==0&&Go(e,i,(r?r.isInline:s&&s.isTextblock)?-1:1)}}replaceWith(e,t){let r=e.steps.length,s=this.ranges;for(let i=0;i<s.length;i++){let{$from:o,$to:l}=s[i],a=e.mapping.slice(r),c=a.map(o.pos),d=a.map(l.pos);i?e.deleteRange(c,d):(e.replaceRangeWith(c,d,t),Go(e,r,t.isInline?-1:1))}}static findFrom(e,t,r=!1){let s=e.parent.inlineContent?new A(e):Rt(e.node(0),e.parent,e.pos,e.index(),t,r);if(s)return s;for(let i=e.depth-1;i>=0;i--){let o=t<0?Rt(e.node(0),e.node(i),e.before(i+1),e.index(i),t,r):Rt(e.node(0),e.node(i),e.after(i+1),e.index(i)+1,t,r);if(o)return o}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new Se(e.node(0))}static atStart(e){return Rt(e,e,0,0,1)||new Se(e)}static atEnd(e){return Rt(e,e,e.content.size,e.childCount,-1)||new Se(e)}static fromJSON(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=ws[t.type];if(!r)throw new RangeError(`No selection type ${t.type} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in ws)throw new RangeError("Duplicate use of selection JSON ID "+e);return ws[e]=t,t.prototype.jsonID=e,t}getBookmark(){return A.between(this.$anchor,this.$head).getBookmark()}}E.prototype.visible=!0;class Uo{constructor(e,t){this.$from=e,this.$to=t}}let qo=!1;function _o(n){!qo&&!n.parent.inlineContent&&(qo=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+n.parent.type.name+")"))}class A extends E{constructor(e,t=e){_o(e),_o(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let r=e.resolve(t.map(this.head));if(!r.parent.inlineContent)return E.near(r);let s=e.resolve(t.map(this.anchor));return new A(s.parent.inlineContent?s:r,r)}replace(e,t=x.empty){if(super.replace(e,t),t==x.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof A&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new ls(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if(typeof t.anchor!="number"||typeof t.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new A(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,r=t){let s=e.resolve(t);return new this(s,r==t?s:e.resolve(r))}static between(e,t,r){let s=e.pos-t.pos;if((!r||s)&&(r=s>=0?1:-1),!t.parent.inlineContent){let i=E.findFrom(t,r,!0)||E.findFrom(t,-r,!0);if(i)t=i.$head;else return E.near(t,r)}return e.parent.inlineContent||(s==0?e=t:(e=(E.findFrom(e,-r,!0)||E.findFrom(e,r,!0)).$anchor,e.pos<t.pos!=s<0&&(e=t))),new A(e,t)}}E.jsonID("text",A);class ls{constructor(e,t){this.anchor=e,this.head=t}map(e){return new ls(e.map(this.anchor),e.map(this.head))}resolve(e){return A.between(e.resolve(this.anchor),e.resolve(this.head))}}class w extends E{constructor(e){let t=e.nodeAfter,r=e.node(0).resolve(e.pos+t.nodeSize);super(e,r),this.node=t}map(e,t){let{deleted:r,pos:s}=t.mapResult(this.anchor),i=e.resolve(s);return r?E.near(i):new w(i)}content(){return new x(b.from(this.node),0,0)}eq(e){return e instanceof w&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new Qi(this.anchor)}static fromJSON(e,t){if(typeof t.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new w(e.resolve(t.anchor))}static create(e,t){return new w(e.resolve(t))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}w.prototype.visible=!1,E.jsonID("node",w);class Qi{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:r}=e.mapResult(this.anchor);return t?new ls(r,r):new Qi(r)}resolve(e){let t=e.resolve(this.anchor),r=t.nodeAfter;return r&&w.isSelectable(r)?new w(t):E.near(t)}}class Se extends E{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=x.empty){if(t==x.empty){e.delete(0,e.doc.content.size);let r=E.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new Se(e)}map(e){return new Se(e)}eq(e){return e instanceof Se}getBookmark(){return eu}}E.jsonID("all",Se);const eu={map(){return this},resolve(n){return new Se(n)}};function Rt(n,e,t,r,s,i=!1){if(e.inlineContent)return A.create(n,t);for(let o=r-(s>0?0:1);s>0?o<e.childCount:o>=0;o+=s){let l=e.child(o);if(l.isAtom){if(!i&&w.isSelectable(l))return w.create(n,t-(s<0?l.nodeSize:0))}else{let a=Rt(n,l,t+s,s<0?l.childCount:0,s,i);if(a)return a}t+=l.nodeSize*s}return null}function Go(n,e,t){let r=n.steps.length-1;if(r<e)return;let s=n.steps[r];if(!(s instanceof Y||s instanceof G))return;let i=n.mapping.maps[r],o;i.forEach((l,a,c,d)=>{o==null&&(o=d)}),n.setSelection(E.near(n.doc.resolve(o),t))}const Yo=1,Xo=2,Qo=4;class tu extends Cs{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|Yo)&-3,this.storedMarks=null,this}get selectionSet(){return(this.updated&Yo)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=Xo,this}ensureMarks(e){return P.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&Xo)>0}addStep(e,t){super.addStep(e,t),this.updated=this.updated&-3,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let r=this.selection;return t&&(e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||P.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,r){let s=this.doc.type.schema;if(t==null)return e?this.replaceSelectionWith(s.text(e),!0):this.deleteSelection();{if(r==null&&(r=t),r=r??t,!e)return this.deleteRange(t,r);let i=this.storedMarks;if(!i){let o=this.doc.resolve(t);i=r==t?o.marks():o.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(t,r,s.text(e,i)),this.selection.empty||this.setSelection(E.near(this.selection.$to)),this}}setMeta(e,t){return this.meta[typeof e=="string"?e:e.key]=t,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=Qo,this}get scrolledIntoView(){return(this.updated&Qo)>0}}function Zo(n,e){return!e||!n?n:n.bind(e)}class Zt{constructor(e,t,r){this.name=e,this.init=Zo(t.init,r),this.apply=Zo(t.apply,r)}}const nu=[new Zt("doc",{init(n){return n.doc||n.schema.topNodeType.createAndFill()},apply(n){return n.doc}}),new Zt("selection",{init(n,e){return n.selection||E.atStart(e.doc)},apply(n){return n.selection}}),new Zt("storedMarks",{init(n){return n.storedMarks||null},apply(n,e,t,r){return r.selection.$cursor?n.storedMarks:null}}),new Zt("scrollToSelection",{init(){return 0},apply(n,e){return n.scrolledIntoView?e+1:e}})];class Ms{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=nu.slice(),t&&t.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new Zt(r.key,r.spec.state,r))})}}class Kt{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=t){let s=this.config.plugins[r];if(s.spec.filterTransaction&&!s.spec.filterTransaction.call(s,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let t=[e],r=this.applyInner(e),s=null;for(;;){let i=!1;for(let o=0;o<this.config.plugins.length;o++){let l=this.config.plugins[o];if(l.spec.appendTransaction){let a=s?s[o].n:0,c=s?s[o].state:this,d=a<t.length&&l.spec.appendTransaction.call(l,a?t.slice(a):t,c,r);if(d&&r.filterTransaction(d,o)){if(d.setMeta("appendedTransaction",e),!s){s=[];for(let u=0;u<this.config.plugins.length;u++)s.push(u<o?{state:r,n:t.length}:{state:this,n:0})}t.push(d),r=r.applyInner(d),i=!0}s&&(s[o]={state:r,n:t.length})}}if(!i)return{state:r,transactions:t}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let t=new Kt(this.config),r=this.config.fields;for(let s=0;s<r.length;s++){let i=r[s];t[i.name]=i.apply(e,this[i.name],this,t)}return t}get tr(){return new tu(this)}static create(e){let t=new Ms(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new Kt(t);for(let s=0;s<t.fields.length;s++)r[t.fields[s].name]=t.fields[s].init(e,r);return r}reconfigure(e){let t=new Ms(this.schema,e.plugins),r=t.fields,s=new Kt(t);for(let i=0;i<r.length;i++){let o=r[i].name;s[o]=this.hasOwnProperty(o)?this[o]:r[i].init(e,s)}return s}toJSON(e){let t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map(r=>r.toJSON())),e&&typeof e=="object")for(let r in e){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let s=e[r],i=s.spec.state;i&&i.toJSON&&(t[r]=i.toJSON.call(s,this[s.key]))}return t}static fromJSON(e,t,r){if(!t)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let s=new Ms(e.schema,e.plugins),i=new Kt(s);return s.fields.forEach(o=>{if(o.name=="doc")i.doc=Te.fromJSON(e.schema,t.doc);else if(o.name=="selection")i.selection=E.fromJSON(i.doc,t.selection);else if(o.name=="storedMarks")t.storedMarks&&(i.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let l in r){let a=r[l],c=a.spec.state;if(a.key==o.name&&c&&c.fromJSON&&Object.prototype.hasOwnProperty.call(t,l)){i[o.name]=c.fromJSON.call(a,e,t[l],i);return}}i[o.name]=o.init(e,i)}}),i}}function el(n,e,t){for(let r in n){let s=n[r];s instanceof Function?s=s.bind(e):r=="handleDOMEvents"&&(s=el(s,e,{})),t[r]=s}return t}class K{constructor(e){this.spec=e,this.props={},e.props&&el(e.props,this,this.props),this.key=e.key?e.key.key:tl("plugin")}getState(e){return e[this.key]}}const Ts=Object.create(null);function tl(n){return n in Ts?n+"$"+ ++Ts[n]:(Ts[n]=0,n+"$")}class Q{constructor(e="key"){this.key=tl(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const Z=function(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e},en=function(n){let e=n.assignedSlot||n.parentNode;return e&&e.nodeType==11?e.host:e};let As=null;const Pe=function(n,e,t){let r=As||(As=document.createRange());return r.setEnd(n,t??n.nodeValue.length),r.setStart(n,e||0),r},ru=function(){As=null},ut=function(n,e,t,r){return t&&(nl(n,e,t,r,-1)||nl(n,e,t,r,1))},su=/^(img|br|input|textarea|hr)$/i;function nl(n,e,t,r,s){for(;;){if(n==t&&e==r)return!0;if(e==(s<0?0:me(n))){let i=n.parentNode;if(!i||i.nodeType!=1||tn(n)||su.test(n.nodeName)||n.contentEditable=="false")return!1;e=Z(n)+(s<0?0:1),n=i}else if(n.nodeType==1){if(n=n.childNodes[e+(s<0?-1:0)],n.contentEditable=="false")return!1;e=s<0?me(n):0}else return!1}}function me(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function iu(n,e){for(;;){if(n.nodeType==3&&e)return n;if(n.nodeType==1&&e>0){if(n.contentEditable=="false")return null;n=n.childNodes[e-1],e=me(n)}else if(n.parentNode&&!tn(n))e=Z(n),n=n.parentNode;else return null}}function ou(n,e){for(;;){if(n.nodeType==3&&e<n.nodeValue.length)return n;if(n.nodeType==1&&e<n.childNodes.length){if(n.contentEditable=="false")return null;n=n.childNodes[e],e=0}else if(n.parentNode&&!tn(n))e=Z(n)+1,n=n.parentNode;else return null}}function lu(n,e,t){for(let r=e==0,s=e==me(n);r||s;){if(n==t)return!0;let i=Z(n);if(n=n.parentNode,!n)return!1;r=r&&i==0,s=s&&i==me(n)}}function tn(n){let e;for(let t=n;t&&!(e=t.pmViewDesc);t=t.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==n||e.contentDOM==n)}const Yn=function(n){return n.focusNode&&ut(n.focusNode,n.focusOffset,n.anchorNode,n.anchorOffset)};function ft(n,e){let t=document.createEvent("Event");return t.initEvent("keydown",!0,!0),t.keyCode=n,t.key=t.code=e,t}function au(n){let e=n.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function cu(n,e,t){if(n.caretPositionFromPoint)try{let r=n.caretPositionFromPoint(e,t);if(r)return{node:r.offsetNode,offset:Math.min(me(r.offsetNode),r.offset)}}catch{}if(n.caretRangeFromPoint){let r=n.caretRangeFromPoint(e,t);if(r)return{node:r.startContainer,offset:Math.min(me(r.startContainer),r.startOffset)}}}const Ae=typeof navigator<"u"?navigator:null,rl=typeof document<"u"?document:null,Ke=Ae&&Ae.userAgent||"",Es=/Edge\/(\d+)/.exec(Ke),sl=/MSIE \d/.exec(Ke),Os=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ke),ce=!!(sl||Os||Es),Je=sl?document.documentMode:Os?+Os[1]:Es?+Es[1]:0,xe=!ce&&/gecko\/(\d+)/i.test(Ke);xe&&+(/Firefox\/(\d+)/.exec(Ke)||[0,0])[1];const Ns=!ce&&/Chrome\/(\d+)/.exec(Ke),ne=!!Ns,il=Ns?+Ns[1]:0,oe=!ce&&!!Ae&&/Apple Computer/.test(Ae.vendor),Dt=oe&&(/Mobile\/\w+/.test(Ke)||!!Ae&&Ae.maxTouchPoints>2),ge=Dt||(Ae?/Mac/.test(Ae.platform):!1),du=Ae?/Win/.test(Ae.platform):!1,Ce=/Android \d/.test(Ke),nn=!!rl&&"webkitFontSmoothing"in rl.documentElement.style,uu=nn?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function fu(n){let e=n.defaultView&&n.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:n.documentElement.clientWidth,top:0,bottom:n.documentElement.clientHeight}}function Le(n,e){return typeof n=="number"?n:n[e]}function hu(n){let e=n.getBoundingClientRect(),t=e.width/n.offsetWidth||1,r=e.height/n.offsetHeight||1;return{left:e.left,right:e.left+n.clientWidth*t,top:e.top,bottom:e.top+n.clientHeight*r}}function ol(n,e,t){let r=n.someProp("scrollThreshold")||0,s=n.someProp("scrollMargin")||5,i=n.dom.ownerDocument;for(let o=t||n.dom;o;o=en(o)){if(o.nodeType!=1)continue;let l=o,a=l==i.body,c=a?fu(i):hu(l),d=0,u=0;if(e.top<c.top+Le(r,"top")?u=-(c.top-e.top+Le(s,"top")):e.bottom>c.bottom-Le(r,"bottom")&&(u=e.bottom-e.top>c.bottom-c.top?e.top+Le(s,"top")-c.top:e.bottom-c.bottom+Le(s,"bottom")),e.left<c.left+Le(r,"left")?d=-(c.left-e.left+Le(s,"left")):e.right>c.right-Le(r,"right")&&(d=e.right-c.right+Le(s,"right")),d||u)if(a)i.defaultView.scrollBy(d,u);else{let f=l.scrollLeft,h=l.scrollTop;u&&(l.scrollTop+=u),d&&(l.scrollLeft+=d);let p=l.scrollLeft-f,m=l.scrollTop-h;e={left:e.left-p,top:e.top-m,right:e.right-p,bottom:e.bottom-m}}if(a||/^(fixed|sticky)$/.test(getComputedStyle(o).position))break}}function pu(n){let e=n.dom.getBoundingClientRect(),t=Math.max(0,e.top),r,s;for(let i=(e.left+e.right)/2,o=t+1;o<Math.min(innerHeight,e.bottom);o+=5){let l=n.root.elementFromPoint(i,o);if(!l||l==n.dom||!n.dom.contains(l))continue;let a=l.getBoundingClientRect();if(a.top>=t-20){r=l,s=a.top;break}}return{refDOM:r,refTop:s,stack:ll(n.dom)}}function ll(n){let e=[],t=n.ownerDocument;for(let r=n;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),n!=t);r=en(r));return e}function mu({refDOM:n,refTop:e,stack:t}){let r=n?n.getBoundingClientRect().top:0;al(t,r==0?0:r-e)}function al(n,e){for(let t=0;t<n.length;t++){let{dom:r,top:s,left:i}=n[t];r.scrollTop!=s+e&&(r.scrollTop=s+e),r.scrollLeft!=i&&(r.scrollLeft=i)}}let It=null;function gu(n){if(n.setActive)return n.setActive();if(It)return n.focus(It);let e=ll(n);n.focus(It==null?{get preventScroll(){return It={preventScroll:!0},!0}}:void 0),It||(It=!1,al(e,0))}function cl(n,e){let t,r=2e8,s,i=0,o=e.top,l=e.top,a,c;for(let d=n.firstChild,u=0;d;d=d.nextSibling,u++){let f;if(d.nodeType==1)f=d.getClientRects();else if(d.nodeType==3)f=Pe(d).getClientRects();else continue;for(let h=0;h<f.length;h++){let p=f[h];if(p.top<=o&&p.bottom>=l){o=Math.max(p.bottom,o),l=Math.min(p.top,l);let m=p.left>e.left?p.left-e.left:p.right<e.left?e.left-p.right:0;if(m<r){t=d,r=m,s=m&&t.nodeType==3?{left:p.right<e.left?p.right:p.left,top:e.top}:e,d.nodeType==1&&m&&(i=u+(e.left>=(p.left+p.right)/2?1:0));continue}}else p.top>e.top&&!a&&p.left<=e.left&&p.right>=e.left&&(a=d,c={left:Math.max(p.left,Math.min(p.right,e.left)),top:p.top});!t&&(e.left>=p.right&&e.top>=p.top||e.left>=p.left&&e.top>=p.bottom)&&(i=u+1)}}return!t&&a&&(t=a,s=c,r=0),t&&t.nodeType==3?yu(t,s):!t||r&&t.nodeType==1?{node:n,offset:i}:cl(t,s)}function yu(n,e){let t=n.nodeValue.length,r=document.createRange();for(let s=0;s<t;s++){r.setEnd(n,s+1),r.setStart(n,s);let i=Ue(r,1);if(i.top!=i.bottom&&Rs(e,i))return{node:n,offset:s+(e.left>=(i.left+i.right)/2?1:0)}}return{node:n,offset:0}}function Rs(n,e){return n.left>=e.left-1&&n.left<=e.right+1&&n.top>=e.top-1&&n.top<=e.bottom+1}function bu(n,e){let t=n.parentNode;return t&&/^li$/i.test(t.nodeName)&&e.left<n.getBoundingClientRect().left?t:n}function ku(n,e,t){let{node:r,offset:s}=cl(e,t),i=-1;if(r.nodeType==1&&!r.firstChild){let o=r.getBoundingClientRect();i=o.left!=o.right&&t.left>(o.left+o.right)/2?1:-1}return n.docView.posFromDOM(r,s,i)}function Su(n,e,t,r){let s=-1;for(let i=e,o=!1;i!=n.dom;){let l=n.docView.nearestDesc(i,!0);if(!l)return null;if(l.dom.nodeType==1&&(l.node.isBlock&&l.parent||!l.contentDOM)){let a=l.dom.getBoundingClientRect();if(l.node.isBlock&&l.parent&&(!o&&a.left>r.left||a.top>r.top?s=l.posBefore:(!o&&a.right<r.left||a.bottom<r.top)&&(s=l.posAfter),o=!0),!l.contentDOM&&s<0&&!l.node.isText)return(l.node.isBlock?r.top<(a.top+a.bottom)/2:r.left<(a.left+a.right)/2)?l.posBefore:l.posAfter}i=l.dom.parentNode}return s>-1?s:n.docView.posFromDOM(e,t,-1)}function dl(n,e,t){let r=n.childNodes.length;if(r&&t.top<t.bottom)for(let s=Math.max(0,Math.min(r-1,Math.floor(r*(e.top-t.top)/(t.bottom-t.top))-2)),i=s;;){let o=n.childNodes[i];if(o.nodeType==1){let l=o.getClientRects();for(let a=0;a<l.length;a++){let c=l[a];if(Rs(e,c))return dl(o,e,c)}}if((i=(i+1)%r)==s)break}return n}function xu(n,e){let t=n.dom.ownerDocument,r,s=0,i=cu(t,e.left,e.top);i&&({node:r,offset:s}=i);let o=(n.root.elementFromPoint?n.root:t).elementFromPoint(e.left,e.top),l;if(!o||!n.dom.contains(o.nodeType!=1?o.parentNode:o)){let c=n.dom.getBoundingClientRect();if(!Rs(e,c)||(o=dl(n.dom,e,c),!o))return null}if(oe)for(let c=o;r&&c;c=en(c))c.draggable&&(r=void 0);if(o=bu(o,e),r){if(xe&&r.nodeType==1&&(s=Math.min(s,r.childNodes.length),s<r.childNodes.length)){let d=r.childNodes[s],u;d.nodeName=="IMG"&&(u=d.getBoundingClientRect()).right<=e.left&&u.bottom>e.top&&s++}let c;nn&&s&&r.nodeType==1&&(c=r.childNodes[s-1]).nodeType==1&&c.contentEditable=="false"&&c.getBoundingClientRect().top>=e.top&&s--,r==n.dom&&s==r.childNodes.length-1&&r.lastChild.nodeType==1&&e.top>r.lastChild.getBoundingClientRect().bottom?l=n.state.doc.content.size:(s==0||r.nodeType!=1||r.childNodes[s-1].nodeName!="BR")&&(l=Su(n,r,s,e))}l==null&&(l=ku(n,o,e));let a=n.docView.nearestDesc(o,!0);return{pos:l,inside:a?a.posAtStart-a.border:-1}}function ul(n){return n.top<n.bottom||n.left<n.right}function Ue(n,e){let t=n.getClientRects();if(t.length){let r=t[e<0?0:t.length-1];if(ul(r))return r}return Array.prototype.find.call(t,ul)||n.getBoundingClientRect()}const Cu=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function fl(n,e,t){let{node:r,offset:s,atom:i}=n.docView.domFromPos(e,t<0?-1:1),o=nn||xe;if(r.nodeType==3)if(o&&(Cu.test(r.nodeValue)||(t<0?!s:s==r.nodeValue.length))){let a=Ue(Pe(r,s,s),t);if(xe&&s&&/\s/.test(r.nodeValue[s-1])&&s<r.nodeValue.length){let c=Ue(Pe(r,s-1,s-1),-1);if(c.top==a.top){let d=Ue(Pe(r,s,s+1),-1);if(d.top!=a.top)return rn(d,d.left<c.left)}}return a}else{let a=s,c=s,d=t<0?1:-1;return t<0&&!s?(c++,d=-1):t>=0&&s==r.nodeValue.length?(a--,d=1):t<0?a--:c++,rn(Ue(Pe(r,a,c),d),d<0)}if(!n.state.doc.resolve(e-(i||0)).parent.inlineContent){if(i==null&&s&&(t<0||s==me(r))){let a=r.childNodes[s-1];if(a.nodeType==1)return Ds(a.getBoundingClientRect(),!1)}if(i==null&&s<me(r)){let a=r.childNodes[s];if(a.nodeType==1)return Ds(a.getBoundingClientRect(),!0)}return Ds(r.getBoundingClientRect(),t>=0)}if(i==null&&s&&(t<0||s==me(r))){let a=r.childNodes[s-1],c=a.nodeType==3?Pe(a,me(a)-(o?0:1)):a.nodeType==1&&(a.nodeName!="BR"||!a.nextSibling)?a:null;if(c)return rn(Ue(c,1),!1)}if(i==null&&s<me(r)){let a=r.childNodes[s];for(;a.pmViewDesc&&a.pmViewDesc.ignoreForCoords;)a=a.nextSibling;let c=a?a.nodeType==3?Pe(a,0,o?0:1):a.nodeType==1?a:null:null;if(c)return rn(Ue(c,-1),!0)}return rn(Ue(r.nodeType==3?Pe(r):r,-t),t>=0)}function rn(n,e){if(n.width==0)return n;let t=e?n.left:n.right;return{top:n.top,bottom:n.bottom,left:t,right:t}}function Ds(n,e){if(n.height==0)return n;let t=e?n.top:n.bottom;return{top:t,bottom:t,left:n.left,right:n.right}}function hl(n,e,t){let r=n.state,s=n.root.activeElement;r!=e&&n.updateState(e),s!=n.dom&&n.focus();try{return t()}finally{r!=e&&n.updateState(r),s!=n.dom&&s&&s.focus()}}function wu(n,e,t){let r=e.selection,s=t=="up"?r.$from:r.$to;return hl(n,e,()=>{let{node:i}=n.docView.domFromPos(s.pos,t=="up"?-1:1);for(;;){let l=n.docView.nearestDesc(i,!0);if(!l)break;if(l.node.isBlock){i=l.contentDOM||l.dom;break}i=l.dom.parentNode}let o=fl(n,s.pos,1);for(let l=i.firstChild;l;l=l.nextSibling){let a;if(l.nodeType==1)a=l.getClientRects();else if(l.nodeType==3)a=Pe(l,0,l.nodeValue.length).getClientRects();else continue;for(let c=0;c<a.length;c++){let d=a[c];if(d.bottom>d.top+1&&(t=="up"?o.top-d.top>(d.bottom-o.top)*2:d.bottom-o.bottom>(o.bottom-d.top)*2))return!1}}return!0})}const Mu=/[\u0590-\u08ac]/;function Tu(n,e,t){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let s=r.parentOffset,i=!s,o=s==r.parent.content.size,l=n.domSelection();return l?!Mu.test(r.parent.textContent)||!l.modify?t=="left"||t=="backward"?i:o:hl(n,e,()=>{let{focusNode:a,focusOffset:c,anchorNode:d,anchorOffset:u}=n.domSelectionRange(),f=l.caretBidiLevel;l.modify("move",t,"character");let h=r.depth?n.docView.domAfterPos(r.before()):n.dom,{focusNode:p,focusOffset:m}=n.domSelectionRange(),g=p&&!h.contains(p.nodeType==1?p:p.parentNode)||a==p&&c==m;try{l.collapse(d,u),a&&(a!=d||c!=u)&&l.extend&&l.extend(a,c)}catch{}return f!=null&&(l.caretBidiLevel=f),g}):r.pos==r.start()||r.pos==r.end()}let pl=null,ml=null,gl=!1;function Au(n,e,t){return pl==e&&ml==t?gl:(pl=e,ml=t,gl=t=="up"||t=="down"?wu(n,e,t):Tu(n,e,t))}const ye=0,yl=1,ht=2,Ee=3;class sn{constructor(e,t,r,s){this.parent=e,this.children=t,this.dom=r,this.contentDOM=s,this.dirty=ye,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,r){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;t<this.children.length;t++)e+=this.children[t].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let t=0,r=this.posAtStart;;t++){let s=this.children[t];if(s==e)return r;r+=s.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,t,r){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(r<0){let i,o;if(e==this.contentDOM)i=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.previousSibling}for(;i&&!((o=i.pmViewDesc)&&o.parent==this);)i=i.previousSibling;return i?this.posBeforeChild(o)+o.size:this.posAtStart}else{let i,o;if(e==this.contentDOM)i=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.nextSibling}for(;i&&!((o=i.pmViewDesc)&&o.parent==this);)i=i.nextSibling;return i?this.posBeforeChild(o):this.posAtEnd}let s;if(e==this.dom&&this.contentDOM)s=t>Z(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))s=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(t==0)for(let i=e;;i=i.parentNode){if(i==this.dom){s=!1;break}if(i.previousSibling)break}if(s==null&&t==e.childNodes.length)for(let i=e;;i=i.parentNode){if(i==this.dom){s=!0;break}if(i.nextSibling)break}}return s??r>0?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let r=!0,s=e;s;s=s.parentNode){let i=this.getDesc(s),o;if(i&&(!t||i.node))if(r&&(o=i.nodeDOM)&&!(o.nodeType==1?o.contains(e.nodeType==1?e:e.parentNode):o==e))r=!1;else return i}}getDesc(e){let t=e.pmViewDesc;for(let r=t;r;r=r.parent)if(r==this)return t}posFromDOM(e,t,r){for(let s=e;s;s=s.parentNode){let i=this.getDesc(s);if(i)return i.localPosFromDOM(e,t,r)}return-1}descAt(e){for(let t=0,r=0;t<this.children.length;t++){let s=this.children[t],i=r+s.size;if(r==e&&i!=r){for(;!s.border&&s.children.length;)s=s.children[0];return s}if(e<i)return s.descAt(e-r-s.border);r=i}}domFromPos(e,t){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let r=0,s=0;for(let i=0;r<this.children.length;r++){let o=this.children[r],l=i+o.size;if(l>e||o instanceof Sl){s=e-i;break}i=l}if(s)return this.children[r].domFromPos(s-this.children[r].border,t);for(let i;r&&!(i=this.children[r-1]).size&&i instanceof bl&&i.side>=0;r--);if(t<=0){let i,o=!0;for(;i=r?this.children[r-1]:null,!(!i||i.dom.parentNode==this.contentDOM);r--,o=!1);return i&&t&&o&&!i.border&&!i.domAtom?i.domFromPos(i.size,t):{node:this.contentDOM,offset:i?Z(i.dom)+1:0}}else{let i,o=!0;for(;i=r<this.children.length?this.children[r]:null,!(!i||i.dom.parentNode==this.contentDOM);r++,o=!1);return i&&o&&!i.border&&!i.domAtom?i.domFromPos(0,t):{node:this.contentDOM,offset:i?Z(i.dom):this.contentDOM.childNodes.length}}}parseRange(e,t,r=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let s=-1,i=-1;for(let o=r,l=0;;l++){let a=this.children[l],c=o+a.size;if(s==-1&&e<=c){let d=o+a.border;if(e>=d&&t<=c-a.border&&a.node&&a.contentDOM&&this.contentDOM.contains(a.contentDOM))return a.parseRange(e,t,d);e=o;for(let u=l;u>0;u--){let f=this.children[u-1];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(1)){s=Z(f.dom)+1;break}e-=f.size}s==-1&&(s=0)}if(s>-1&&(c>t||l==this.children.length-1)){t=c;for(let d=l+1;d<this.children.length;d++){let u=this.children[d];if(u.size&&u.dom.parentNode==this.contentDOM&&!u.emptyChildAt(-1)){i=Z(u.dom);break}t+=u.size}i==-1&&(i=this.contentDOM.childNodes.length);break}o=c}return{node:this.contentDOM,from:e,to:t,fromOffset:s,toOffset:i}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let t=this.children[e<0?0:this.children.length-1];return t.size==0||t.emptyChildAt(e)}domAfterPos(e){let{node:t,offset:r}=this.domFromPos(e,0);if(t.nodeType!=1||r==t.childNodes.length)throw new RangeError("No node after pos "+e);return t.childNodes[r]}setSelection(e,t,r,s=!1){let i=Math.min(e,t),o=Math.max(e,t);for(let h=0,p=0;h<this.children.length;h++){let m=this.children[h],g=p+m.size;if(i>p&&o<g)return m.setSelection(e-p-m.border,t-p-m.border,r,s);p=g}let l=this.domFromPos(e,e?-1:1),a=t==e?l:this.domFromPos(t,t?-1:1),c=r.root.getSelection(),d=r.domSelectionRange(),u=!1;if((xe||oe)&&e==t){let{node:h,offset:p}=l;if(h.nodeType==3){if(u=!!(p&&h.nodeValue[p-1]==`
6
- `),u&&p==h.nodeValue.length)for(let m=h,g;m;m=m.parentNode){if(g=m.nextSibling){g.nodeName=="BR"&&(l=a={node:g.parentNode,offset:Z(g)+1});break}let y=m.pmViewDesc;if(y&&y.node&&y.node.isBlock)break}}else{let m=h.childNodes[p-1];u=m&&(m.nodeName=="BR"||m.contentEditable=="false")}}if(xe&&d.focusNode&&d.focusNode!=a.node&&d.focusNode.nodeType==1){let h=d.focusNode.childNodes[d.focusOffset];h&&h.contentEditable=="false"&&(s=!0)}if(!(s||u&&oe)&&ut(l.node,l.offset,d.anchorNode,d.anchorOffset)&&ut(a.node,a.offset,d.focusNode,d.focusOffset))return;let f=!1;if((c.extend||e==t)&&!u){c.collapse(l.node,l.offset);try{e!=t&&c.extend(a.node,a.offset),f=!0}catch{}}if(!f){if(e>t){let p=l;l=a,a=p}let h=document.createRange();h.setEnd(a.node,a.offset),h.setStart(l.node,l.offset),c.removeAllRanges(),c.addRange(h)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let r=0,s=0;s<this.children.length;s++){let i=this.children[s],o=r+i.size;if(r==o?e<=o&&t>=r:e<o&&t>r){let l=r+i.border,a=o-i.border;if(e>=l&&t<=a){this.dirty=e==r||t==o?ht:yl,e==l&&t==a&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=Ee:i.markDirty(e-l,t-l);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?ht:Ee}r=o}this.dirty=ht}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let r=e==1?ht:yl;t.dirty<r&&(t.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}isText(e){return!1}}class bl extends sn{constructor(e,t,r,s){let i,o=t.type.toDOM;if(typeof o=="function"&&(o=o(r,()=>{if(!i)return s;if(i.parent)return i.parent.posBeforeChild(i)})),!t.type.spec.raw){if(o.nodeType!=1){let l=document.createElement("span");l.appendChild(o),o=l}o.contentEditable="false",o.classList.add("ProseMirror-widget")}super(e,[],o,null),this.widget=t,this.widget=t,i=this}matchesWidget(e){return this.dirty==ye&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return t?t(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class Eu extends sn{constructor(e,t,r,s){super(e,[],t,null),this.textDOM=r,this.text=s}get size(){return this.text.length}localPosFromDOM(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class Mt extends sn{constructor(e,t,r,s,i){super(e,[],r,s),this.mark=t,this.spec=i}static create(e,t,r,s){let i=s.nodeViews[t.type.name],o=i&&i(t,s,r);return(!o||!o.dom)&&(o=wt.renderSpec(document,t.type.spec.toDOM(t,r),null,t.attrs)),new Mt(e,t,o.dom,o.contentDOM||o.dom,o)}parseRule(){return this.dirty&Ee||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=Ee&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),this.dirty!=ye){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=ye}}slice(e,t,r){let s=Mt.create(this.parent,this.mark,!0,r),i=this.children,o=this.size;t<o&&(i=vs(i,t,o,r)),e>0&&(i=vs(i,0,e,r));for(let l=0;l<i.length;l++)i[l].parent=s;return s.children=i,s}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class nt extends sn{constructor(e,t,r,s,i,o,l,a,c){super(e,[],i,o),this.node=t,this.outerDeco=r,this.innerDeco=s,this.nodeDOM=l}static create(e,t,r,s,i,o){let l=i.nodeViews[t.type.name],a,c=l&&l(t,i,()=>{if(!a)return o;if(a.parent)return a.parent.posBeforeChild(a)},r,s),d=c&&c.dom,u=c&&c.contentDOM;if(t.isText){if(!d)d=document.createTextNode(t.text);else if(d.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else d||({dom:d,contentDOM:u}=wt.renderSpec(document,t.type.spec.toDOM(t),null,t.attrs));!u&&!t.isText&&d.nodeName!="BR"&&(d.hasAttribute("contenteditable")||(d.contentEditable="false"),t.type.spec.draggable&&(d.draggable=!0));let f=d;return d=wl(d,r,t),c?a=new Ou(e,t,r,s,d,u||null,f,c,i,o+1):t.isText?new as(e,t,r,s,d,f,i):new nt(e,t,r,s,d,u||null,f,i,o+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let t=this.children.length-1;t>=0;t--){let r=this.children[t];if(this.dom.contains(r.dom.parentNode)){e.contentElement=r.dom.parentNode;break}}e.contentElement||(e.getContent=()=>b.empty)}return e}matchesNode(e,t,r){return this.dirty==ye&&e.eq(this.node)&&Xn(t,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,t){let r=this.node.inlineContent,s=t,i=e.composing?this.localCompositionInfo(e,t):null,o=i&&i.pos>-1?i:null,l=i&&i.pos<0,a=new Ru(this,o&&o.node,e);vu(this.node,this.innerDeco,(c,d,u)=>{c.spec.marks?a.syncToMarks(c.spec.marks,r,e):c.type.side>=0&&!u&&a.syncToMarks(d==this.node.childCount?P.none:this.node.child(d).marks,r,e),a.placeWidget(c,e,s)},(c,d,u,f)=>{a.syncToMarks(c.marks,r,e);let h;a.findNodeMatch(c,d,u,f)||l&&e.state.selection.from>s&&e.state.selection.to<s+c.nodeSize&&(h=a.findIndexWithChild(i.node))>-1&&a.updateNodeAt(c,d,u,h,e)||a.updateNextNode(c,d,u,e,f,s)||a.addNode(c,d,u,e,s),s+=c.nodeSize}),a.syncToMarks([],r,e),this.node.isTextblock&&a.addTextblockHacks(),a.destroyRest(),(a.changed||this.dirty==ht)&&(o&&this.protectLocalComposition(e,o),xl(this.contentDOM,this.children,e),Dt&&Pu(this.dom))}localCompositionInfo(e,t){let{from:r,to:s}=e.state.selection;if(!(e.state.selection instanceof A)||r<t||s>t+this.node.content.size)return null;let i=e.input.compositionNode;if(!i||!this.dom.contains(i.parentNode))return null;if(this.node.inlineContent){let o=i.nodeValue,l=Lu(this.node.content,o,r-t,s-t);return l<0?null:{node:i,pos:l,text:o}}else return{node:i,pos:-1,text:""}}protectLocalComposition(e,{node:t,pos:r,text:s}){if(this.getDesc(t))return;let i=t;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let o=new Eu(this,i,t,s);e.input.compositionNodes.push(o),this.children=vs(this.children,r,r+s.length,e,o)}update(e,t,r,s){return this.dirty==Ee||!e.sameMarkup(this.node)?!1:(this.updateInner(e,t,r,s),!0)}updateInner(e,t,r,s){this.updateOuterDeco(t),this.node=e,this.innerDeco=r,this.contentDOM&&this.updateChildren(s,this.posAtStart),this.dirty=ye}updateOuterDeco(e){if(Xn(e,this.outerDeco))return;let t=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=Cl(this.dom,this.nodeDOM,Is(this.outerDeco,this.node,t),Is(e,this.node,t)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function kl(n,e,t,r,s){wl(r,e,n);let i=new nt(void 0,n,e,t,r,r,r,s,0);return i.contentDOM&&i.updateChildren(s,0),i}class as extends nt{constructor(e,t,r,s,i,o,l){super(e,t,r,s,i,null,o,l,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,t,r,s){return this.dirty==Ee||this.dirty!=ye&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(t),(this.dirty!=ye||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,s.trackWrites==this.nodeDOM&&(s.trackWrites=null)),this.node=e,this.dirty=ye,!0)}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,r){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,r)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,t,r){let s=this.node.cut(e,t),i=document.createTextNode(s.text);return new as(this.parent,s,this.outerDeco,this.innerDeco,i,i,r)}markDirty(e,t){super.markDirty(e,t),this.dom!=this.nodeDOM&&(e==0||t==this.nodeDOM.nodeValue.length)&&(this.dirty=Ee)}get domAtom(){return!1}isText(e){return this.node.text==e}}class Sl extends sn{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==ye&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class Ou extends nt{constructor(e,t,r,s,i,o,l,a,c,d){super(e,t,r,s,i,o,l,c,d),this.spec=a}update(e,t,r,s){if(this.dirty==Ee)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let i=this.spec.update(e,t,r);return i&&this.updateInner(e,t,r,s),i}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,t,r,s)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,r,s){this.spec.setSelection?this.spec.setSelection(e,t,r.root):super.setSelection(e,t,r,s)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function xl(n,e,t){let r=n.firstChild,s=!1;for(let i=0;i<e.length;i++){let o=e[i],l=o.dom;if(l.parentNode==n){for(;l!=r;)r=Ml(r),s=!0;r=r.nextSibling}else s=!0,n.insertBefore(l,r);if(o instanceof Mt){let a=r?r.previousSibling:n.lastChild;xl(o.contentDOM,o.children,t),r=a?a.nextSibling:n.firstChild}}for(;r;)r=Ml(r),s=!0;s&&t.trackWrites==n&&(t.trackWrites=null)}const on=function(n){n&&(this.nodeName=n)};on.prototype=Object.create(null);const pt=[new on];function Is(n,e,t){if(n.length==0)return pt;let r=t?pt[0]:new on,s=[r];for(let i=0;i<n.length;i++){let o=n[i].type.attrs;if(o){o.nodeName&&s.push(r=new on(o.nodeName));for(let l in o){let a=o[l];a!=null&&(t&&s.length==1&&s.push(r=new on(e.isInline?"span":"div")),l=="class"?r.class=(r.class?r.class+" ":"")+a:l=="style"?r.style=(r.style?r.style+";":"")+a:l!="nodeName"&&(r[l]=a))}}}return s}function Cl(n,e,t,r){if(t==pt&&r==pt)return e;let s=e;for(let i=0;i<r.length;i++){let o=r[i],l=t[i];if(i){let a;l&&l.nodeName==o.nodeName&&s!=n&&(a=s.parentNode)&&a.nodeName.toLowerCase()==o.nodeName||(a=document.createElement(o.nodeName),a.pmIsDeco=!0,a.appendChild(s),l=pt[0]),s=a}Nu(s,l||pt[0],o)}return s}function Nu(n,e,t){for(let r in e)r!="class"&&r!="style"&&r!="nodeName"&&!(r in t)&&n.removeAttribute(r);for(let r in t)r!="class"&&r!="style"&&r!="nodeName"&&t[r]!=e[r]&&n.setAttribute(r,t[r]);if(e.class!=t.class){let r=e.class?e.class.split(" ").filter(Boolean):[],s=t.class?t.class.split(" ").filter(Boolean):[];for(let i=0;i<r.length;i++)s.indexOf(r[i])==-1&&n.classList.remove(r[i]);for(let i=0;i<s.length;i++)r.indexOf(s[i])==-1&&n.classList.add(s[i]);n.classList.length==0&&n.removeAttribute("class")}if(e.style!=t.style){if(e.style){let r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,s;for(;s=r.exec(e.style);)n.style.removeProperty(s[1])}t.style&&(n.style.cssText+=t.style)}}function wl(n,e,t){return Cl(n,n,pt,Is(e,t,n.nodeType!=1))}function Xn(n,e){if(n.length!=e.length)return!1;for(let t=0;t<n.length;t++)if(!n[t].type.eq(e[t].type))return!1;return!0}function Ml(n){let e=n.nextSibling;return n.parentNode.removeChild(n),e}class Ru{constructor(e,t,r){this.lock=t,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=Du(e.node.content,e)}destroyBetween(e,t){if(e!=t){for(let r=e;r<t;r++)this.top.children[r].destroy();this.top.children.splice(e,t-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,t,r){let s=0,i=this.stack.length>>1,o=Math.min(i,e.length);for(;s<o&&(s==i-1?this.top:this.stack[s+1<<1]).matchesMark(e[s])&&e[s].type.spec.spanning!==!1;)s++;for(;s<i;)this.destroyRest(),this.top.dirty=ye,this.index=this.stack.pop(),this.top=this.stack.pop(),i--;for(;i<e.length;){this.stack.push(this.top,this.index+1);let l=-1;for(let a=this.index;a<Math.min(this.index+3,this.top.children.length);a++){let c=this.top.children[a];if(c.matchesMark(e[i])&&!this.isLocked(c.dom)){l=a;break}}if(l>-1)l>this.index&&(this.changed=!0,this.destroyBetween(this.index,l)),this.top=this.top.children[this.index];else{let a=Mt.create(this.top,e[i],t,r);this.top.children.splice(this.index,0,a),this.top=a,this.changed=!0}this.index=0,i++}}findNodeMatch(e,t,r,s){let i=-1,o;if(s>=this.preMatch.index&&(o=this.preMatch.matches[s-this.preMatch.index]).parent==this.top&&o.matchesNode(e,t,r))i=this.top.children.indexOf(o,this.index);else for(let l=this.index,a=Math.min(this.top.children.length,l+5);l<a;l++){let c=this.top.children[l];if(c.matchesNode(e,t,r)&&!this.preMatch.matched.has(c)){i=l;break}}return i<0?!1:(this.destroyBetween(this.index,i),this.index++,!0)}updateNodeAt(e,t,r,s,i){let o=this.top.children[s];return o.dirty==Ee&&o.dom==o.contentDOM&&(o.dirty=ht),o.update(e,t,r,i)?(this.destroyBetween(this.index,s),this.index++,!0):!1}findIndexWithChild(e){for(;;){let t=e.parentNode;if(!t)return-1;if(t==this.top.contentDOM){let r=e.pmViewDesc;if(r){for(let s=this.index;s<this.top.children.length;s++)if(this.top.children[s]==r)return s}return-1}e=t}}updateNextNode(e,t,r,s,i,o){for(let l=this.index;l<this.top.children.length;l++){let a=this.top.children[l];if(a instanceof nt){let c=this.preMatch.matched.get(a);if(c!=null&&c!=i)return!1;let d=a.dom,u,f=this.isLocked(d)&&!(e.isText&&a.node&&a.node.isText&&a.nodeDOM.nodeValue==e.text&&a.dirty!=Ee&&Xn(t,a.outerDeco));if(!f&&a.update(e,t,r,s))return this.destroyBetween(this.index,l),a.dom!=d&&(this.changed=!0),this.index++,!0;if(!f&&(u=this.recreateWrapper(a,e,t,r,s,o)))return this.destroyBetween(this.index,l),this.top.children[this.index]=u,u.contentDOM&&(u.dirty=ht,u.updateChildren(s,o+1),u.dirty=ye),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,t,r,s,i,o){if(e.dirty||t.isAtom||!e.children.length||!e.node.content.eq(t.content)||!Xn(r,e.outerDeco)||!s.eq(e.innerDeco))return null;let l=nt.create(this.top,t,r,s,i,o);if(l.contentDOM){l.children=e.children,e.children=[];for(let a of l.children)a.parent=l}return e.destroy(),l}addNode(e,t,r,s,i){let o=nt.create(this.top,e,t,r,s,i);o.contentDOM&&o.updateChildren(s,i+1),this.top.children.splice(this.index++,0,o),this.changed=!0}placeWidget(e,t,r){let s=this.index<this.top.children.length?this.top.children[this.index]:null;if(s&&s.matchesWidget(e)&&(e==s.widget||!s.widget.type.toDOM.parentNode))this.index++;else{let i=new bl(this.top,e,t,r);this.top.children.splice(this.index++,0,i),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],t=this.top;for(;e instanceof Mt;)t=e,e=t.children[t.children.length-1];(!e||!(e instanceof as)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((oe||ne)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",t),this.addHackNode("BR",this.top))}addHackNode(e,t){if(t==this.top&&this.index<t.children.length&&t.children[this.index].matchesHack(e))this.index++;else{let r=document.createElement(e);e=="IMG"&&(r.className="ProseMirror-separator",r.alt=""),e=="BR"&&(r.className="ProseMirror-trailingBreak");let s=new Sl(this.top,[],r,null);t!=this.top?t.children.push(s):t.children.splice(this.index++,0,s),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function Du(n,e){let t=e,r=t.children.length,s=n.childCount,i=new Map,o=[];e:for(;s>0;){let l;for(;;)if(r){let c=t.children[r-1];if(c instanceof Mt)t=c,r=c.children.length;else{l=c,r--;break}}else{if(t==e)break e;r=t.parent.children.indexOf(t),t=t.parent}let a=l.node;if(a){if(a!=n.child(s-1))break;--s,i.set(l,s),o.push(l)}}return{index:s,matched:i,matches:o.reverse()}}function Iu(n,e){return n.type.side-e.type.side}function vu(n,e,t,r){let s=e.locals(n),i=0;if(s.length==0){for(let c=0;c<n.childCount;c++){let d=n.child(c);r(d,s,e.forChild(i,d),c),i+=d.nodeSize}return}let o=0,l=[],a=null;for(let c=0;;){let d,u;for(;o<s.length&&s[o].to==i;){let g=s[o++];g.widget&&(d?(u||(u=[d])).push(g):d=g)}if(d)if(u){u.sort(Iu);for(let g=0;g<u.length;g++)t(u[g],c,!!a)}else t(d,c,!!a);let f,h;if(a)h=-1,f=a,a=null;else if(c<n.childCount)h=c,f=n.child(c++);else break;for(let g=0;g<l.length;g++)l[g].to<=i&&l.splice(g--,1);for(;o<s.length&&s[o].from<=i&&s[o].to>i;)l.push(s[o++]);let p=i+f.nodeSize;if(f.isText){let g=p;o<s.length&&s[o].from<g&&(g=s[o].from);for(let y=0;y<l.length;y++)l[y].to<g&&(g=l[y].to);g<p&&(a=f.cut(g-i),f=f.cut(0,g-i),p=g,h=-1)}else for(;o<s.length&&s[o].to<p;)o++;let m=f.isInline&&!f.isLeaf?l.filter(g=>!g.inline):l.slice();r(f,m,e.forChild(i,f),h),i=p}}function Pu(n){if(n.nodeName=="UL"||n.nodeName=="OL"){let e=n.style.cssText;n.style.cssText=e+"; list-style: square !important",window.getComputedStyle(n).listStyle,n.style.cssText=e}}function Lu(n,e,t,r){for(let s=0,i=0;s<n.childCount&&i<=r;){let o=n.child(s++),l=i;if(i+=o.nodeSize,!o.isText)continue;let a=o.text;for(;s<n.childCount;){let c=n.child(s++);if(i+=c.nodeSize,!c.isText)break;a+=c.text}if(i>=t){if(i>=r&&a.slice(r-e.length-l,r-l)==e)return r-e.length;let c=l<r?a.lastIndexOf(e,r-l-1):-1;if(c>=0&&c+e.length+l>=t)return l+c;if(t==r&&a.length>=r+e.length-l&&a.slice(r-l,r-l+e.length)==e)return r}}return-1}function vs(n,e,t,r,s){let i=[];for(let o=0,l=0;o<n.length;o++){let a=n[o],c=l,d=l+=a.size;c>=t||d<=e?i.push(a):(c<e&&i.push(a.slice(0,e-c,r)),s&&(i.push(s),s=void 0),d>t&&i.push(a.slice(t-c,a.size,r)))}return i}function Ps(n,e=null){let t=n.domSelectionRange(),r=n.state.doc;if(!t.focusNode)return null;let s=n.docView.nearestDesc(t.focusNode),i=s&&s.size==0,o=n.docView.posFromDOM(t.focusNode,t.focusOffset,1);if(o<0)return null;let l=r.resolve(o),a,c;if(Yn(t)){for(a=o;s&&!s.node;)s=s.parent;let u=s.node;if(s&&u.isAtom&&w.isSelectable(u)&&s.parent&&!(u.isInline&&lu(t.focusNode,t.focusOffset,s.dom))){let f=s.posBefore;c=new w(o==f?l:r.resolve(f))}}else{if(t instanceof n.dom.ownerDocument.defaultView.Selection&&t.rangeCount>1){let u=o,f=o;for(let h=0;h<t.rangeCount;h++){let p=t.getRangeAt(h);u=Math.min(u,n.docView.posFromDOM(p.startContainer,p.startOffset,1)),f=Math.max(f,n.docView.posFromDOM(p.endContainer,p.endOffset,-1))}if(u<0)return null;[a,o]=f==n.state.selection.anchor?[f,u]:[u,f],l=r.resolve(o)}else a=n.docView.posFromDOM(t.anchorNode,t.anchorOffset,1);if(a<0)return null}let d=r.resolve(a);if(!c){let u=e=="pointer"||n.state.selection.head<l.pos&&!i?1:-1;c=Bs(n,d,l,u)}return c}function Tl(n){return n.editable?n.hasFocus():Il(n)&&document.activeElement&&document.activeElement.contains(n.dom)}function Be(n,e=!1){let t=n.state.selection;if(Nl(n,t),!!Tl(n)){if(!e&&n.input.mouseDown&&n.input.mouseDown.allowDefault&&ne){let r=n.domSelectionRange(),s=n.domObserver.currentSelection;if(r.anchorNode&&s.anchorNode&&ut(r.anchorNode,r.anchorOffset,s.anchorNode,s.anchorOffset)){n.input.mouseDown.delayedSelectionSync=!0,n.domObserver.setCurSelection();return}}if(n.domObserver.disconnectSelection(),n.cursorWrapper)zu(n);else{let{anchor:r,head:s}=t,i,o;Al&&!(t instanceof A)&&(t.$from.parent.inlineContent||(i=El(n,t.from)),!t.empty&&!t.$from.parent.inlineContent&&(o=El(n,t.to))),n.docView.setSelection(r,s,n,e),Al&&(i&&Ol(i),o&&Ol(o)),t.visible?n.dom.classList.remove("ProseMirror-hideselection"):(n.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&Bu(n))}n.domObserver.setCurSelection(),n.domObserver.connectSelection()}}const Al=oe||ne&&il<63;function El(n,e){let{node:t,offset:r}=n.docView.domFromPos(e,0),s=r<t.childNodes.length?t.childNodes[r]:null,i=r?t.childNodes[r-1]:null;if(oe&&s&&s.contentEditable=="false")return Ls(s);if((!s||s.contentEditable=="false")&&(!i||i.contentEditable=="false")){if(s)return Ls(s);if(i)return Ls(i)}}function Ls(n){return n.contentEditable="true",oe&&n.draggable&&(n.draggable=!1,n.wasDraggable=!0),n}function Ol(n){n.contentEditable="false",n.wasDraggable&&(n.draggable=!0,n.wasDraggable=null)}function Bu(n){let e=n.dom.ownerDocument;e.removeEventListener("selectionchange",n.input.hideSelectionGuard);let t=n.domSelectionRange(),r=t.anchorNode,s=t.anchorOffset;e.addEventListener("selectionchange",n.input.hideSelectionGuard=()=>{(t.anchorNode!=r||t.anchorOffset!=s)&&(e.removeEventListener("selectionchange",n.input.hideSelectionGuard),setTimeout(()=>{(!Tl(n)||n.state.selection.visible)&&n.dom.classList.remove("ProseMirror-hideselection")},20))})}function zu(n){let e=n.domSelection(),t=document.createRange();if(!e)return;let r=n.cursorWrapper.dom,s=r.nodeName=="IMG";s?t.setStart(r.parentNode,Z(r)+1):t.setStart(r,0),t.collapse(!0),e.removeAllRanges(),e.addRange(t),!s&&!n.state.selection.visible&&ce&&Je<=11&&(r.disabled=!0,r.disabled=!1)}function Nl(n,e){if(e instanceof w){let t=n.docView.descAt(e.from);t!=n.lastSelectedViewDesc&&(Rl(n),t&&t.selectNode(),n.lastSelectedViewDesc=t)}else Rl(n)}function Rl(n){n.lastSelectedViewDesc&&(n.lastSelectedViewDesc.parent&&n.lastSelectedViewDesc.deselectNode(),n.lastSelectedViewDesc=void 0)}function Bs(n,e,t,r){return n.someProp("createSelectionBetween",s=>s(n,e,t))||A.between(e,t,r)}function Dl(n){return n.editable&&!n.hasFocus()?!1:Il(n)}function Il(n){let e=n.domSelectionRange();if(!e.anchorNode)return!1;try{return n.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(n.editable||n.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function Hu(n){let e=n.docView.domFromPos(n.state.selection.anchor,0),t=n.domSelectionRange();return ut(e.node,e.offset,t.anchorNode,t.anchorOffset)}function zs(n,e){let{$anchor:t,$head:r}=n.selection,s=e>0?t.max(r):t.min(r),i=s.parent.inlineContent?s.depth?n.doc.resolve(e>0?s.after():s.before()):null:s;return i&&E.findFrom(i,e)}function qe(n,e){return n.dispatch(n.state.tr.setSelection(e).scrollIntoView()),!0}function vl(n,e,t){let r=n.state.selection;if(r instanceof A)if(t.indexOf("s")>-1){let{$head:s}=r,i=s.textOffset?null:e<0?s.nodeBefore:s.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let o=n.state.doc.resolve(s.pos+i.nodeSize*(e<0?-1:1));return qe(n,new A(r.$anchor,o))}else if(r.empty){if(n.endOfTextblock(e>0?"forward":"backward")){let s=zs(n.state,e);return s&&s instanceof w?qe(n,s):!1}else if(!(ge&&t.indexOf("m")>-1)){let s=r.$head,i=s.textOffset?null:e<0?s.nodeBefore:s.nodeAfter,o;if(!i||i.isText)return!1;let l=e<0?s.pos-i.nodeSize:s.pos;return i.isAtom||(o=n.docView.descAt(l))&&!o.contentDOM?w.isSelectable(i)?qe(n,new w(e<0?n.state.doc.resolve(s.pos-i.nodeSize):s)):nn?qe(n,new A(n.state.doc.resolve(e<0?l:l+i.nodeSize))):!1:!1}}else return!1;else{if(r instanceof w&&r.node.isInline)return qe(n,new A(e>0?r.$to:r.$from));{let s=zs(n.state,e);return s?qe(n,s):!1}}}function Qn(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function ln(n,e){let t=n.pmViewDesc;return t&&t.size==0&&(e<0||n.nextSibling||n.nodeName!="BR")}function vt(n,e){return e<0?Fu(n):$u(n)}function Fu(n){let e=n.domSelectionRange(),t=e.focusNode,r=e.focusOffset;if(!t)return;let s,i,o=!1;for(xe&&t.nodeType==1&&r<Qn(t)&&ln(t.childNodes[r],-1)&&(o=!0);;)if(r>0){if(t.nodeType!=1)break;{let l=t.childNodes[r-1];if(ln(l,-1))s=t,i=--r;else if(l.nodeType==3)t=l,r=t.nodeValue.length;else break}}else{if(Pl(t))break;{let l=t.previousSibling;for(;l&&ln(l,-1);)s=t.parentNode,i=Z(l),l=l.previousSibling;if(l)t=l,r=Qn(t);else{if(t=t.parentNode,t==n.dom)break;r=0}}}o?Hs(n,t,r):s&&Hs(n,s,i)}function $u(n){let e=n.domSelectionRange(),t=e.focusNode,r=e.focusOffset;if(!t)return;let s=Qn(t),i,o;for(;;)if(r<s){if(t.nodeType!=1)break;let l=t.childNodes[r];if(ln(l,1))i=t,o=++r;else break}else{if(Pl(t))break;{let l=t.nextSibling;for(;l&&ln(l,1);)i=l.parentNode,o=Z(l)+1,l=l.nextSibling;if(l)t=l,r=0,s=Qn(t);else{if(t=t.parentNode,t==n.dom)break;r=s=0}}}i&&Hs(n,i,o)}function Pl(n){let e=n.pmViewDesc;return e&&e.node&&e.node.isBlock}function Vu(n,e){for(;n&&e==n.childNodes.length&&!tn(n);)e=Z(n)+1,n=n.parentNode;for(;n&&e<n.childNodes.length;){let t=n.childNodes[e];if(t.nodeType==3)return t;if(t.nodeType==1&&t.contentEditable=="false")break;n=t,e=0}}function Wu(n,e){for(;n&&!e&&!tn(n);)e=Z(n),n=n.parentNode;for(;n&&e;){let t=n.childNodes[e-1];if(t.nodeType==3)return t;if(t.nodeType==1&&t.contentEditable=="false")break;n=t,e=n.childNodes.length}}function Hs(n,e,t){if(e.nodeType!=3){let i,o;(o=Vu(e,t))?(e=o,t=0):(i=Wu(e,t))&&(e=i,t=i.nodeValue.length)}let r=n.domSelection();if(!r)return;if(Yn(r)){let i=document.createRange();i.setEnd(e,t),i.setStart(e,t),r.removeAllRanges(),r.addRange(i)}else r.extend&&r.extend(e,t);n.domObserver.setCurSelection();let{state:s}=n;setTimeout(()=>{n.state==s&&Be(n)},50)}function Ll(n,e){let t=n.state.doc.resolve(e);if(!(ne||du)&&t.parent.inlineContent){let s=n.coordsAtPos(e);if(e>t.start()){let i=n.coordsAtPos(e-1),o=(i.top+i.bottom)/2;if(o>s.top&&o<s.bottom&&Math.abs(i.left-s.left)>1)return i.left<s.left?"ltr":"rtl"}if(e<t.end()){let i=n.coordsAtPos(e+1),o=(i.top+i.bottom)/2;if(o>s.top&&o<s.bottom&&Math.abs(i.left-s.left)>1)return i.left>s.left?"ltr":"rtl"}}return getComputedStyle(n.dom).direction=="rtl"?"rtl":"ltr"}function Bl(n,e,t){let r=n.state.selection;if(r instanceof A&&!r.empty||t.indexOf("s")>-1||ge&&t.indexOf("m")>-1)return!1;let{$from:s,$to:i}=r;if(!s.parent.inlineContent||n.endOfTextblock(e<0?"up":"down")){let o=zs(n.state,e);if(o&&o instanceof w)return qe(n,o)}if(!s.parent.inlineContent){let o=e<0?s:i,l=r instanceof Se?E.near(o,e):E.findFrom(o,e);return l?qe(n,l):!1}return!1}function zl(n,e){if(!(n.state.selection instanceof A))return!0;let{$head:t,$anchor:r,empty:s}=n.state.selection;if(!t.sameParent(r))return!0;if(!s)return!1;if(n.endOfTextblock(e>0?"forward":"backward"))return!0;let i=!t.textOffset&&(e<0?t.nodeBefore:t.nodeAfter);if(i&&!i.isText){let o=n.state.tr;return e<0?o.delete(t.pos-i.nodeSize,t.pos):o.delete(t.pos,t.pos+i.nodeSize),n.dispatch(o),!0}return!1}function Hl(n,e,t){n.domObserver.stop(),e.contentEditable=t,n.domObserver.start()}function ju(n){if(!oe||n.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:t}=n.domSelectionRange();if(e&&e.nodeType==1&&t==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let r=e.firstChild;Hl(n,r,"true"),setTimeout(()=>Hl(n,r,"false"),20)}return!1}function Ku(n){let e="";return n.ctrlKey&&(e+="c"),n.metaKey&&(e+="m"),n.altKey&&(e+="a"),n.shiftKey&&(e+="s"),e}function Ju(n,e){let t=e.keyCode,r=Ku(e);if(t==8||ge&&t==72&&r=="c")return zl(n,-1)||vt(n,-1);if(t==46&&!e.shiftKey||ge&&t==68&&r=="c")return zl(n,1)||vt(n,1);if(t==13||t==27)return!0;if(t==37||ge&&t==66&&r=="c"){let s=t==37?Ll(n,n.state.selection.from)=="ltr"?-1:1:-1;return vl(n,s,r)||vt(n,s)}else if(t==39||ge&&t==70&&r=="c"){let s=t==39?Ll(n,n.state.selection.from)=="ltr"?1:-1:1;return vl(n,s,r)||vt(n,s)}else{if(t==38||ge&&t==80&&r=="c")return Bl(n,-1,r)||vt(n,-1);if(t==40||ge&&t==78&&r=="c")return ju(n)||Bl(n,1,r)||vt(n,1);if(r==(ge?"m":"c")&&(t==66||t==73||t==89||t==90))return!0}return!1}function Fl(n,e){n.someProp("transformCopied",h=>{e=h(e,n)});let t=[],{content:r,openStart:s,openEnd:i}=e;for(;s>1&&i>1&&r.childCount==1&&r.firstChild.childCount==1;){s--,i--;let h=r.firstChild;t.push(h.type.name,h.attrs!=h.type.defaultAttrs?h.attrs:null),r=h.content}let o=n.someProp("clipboardSerializer")||wt.fromSchema(n.state.schema),l=ql(),a=l.createElement("div");a.appendChild(o.serializeFragment(r,{document:l}));let c=a.firstChild,d,u=0;for(;c&&c.nodeType==1&&(d=Jl[c.nodeName.toLowerCase()]);){for(let h=d.length-1;h>=0;h--){let p=l.createElement(d[h]);for(;a.firstChild;)p.appendChild(a.firstChild);a.appendChild(p),u++}c=a.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${s} ${i}${u?` -${u}`:""} ${JSON.stringify(t)}`);let f=n.someProp("clipboardTextSerializer",h=>h(e,n))||e.content.textBetween(0,e.content.size,`
1
+ function Z(n){this.content=n}Z.prototype={constructor:Z,find:function(n){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===n)return e;return-1},get:function(n){var e=this.find(n);return e==-1?void 0:this.content[e+1]},update:function(n,e,t){var r=t&&t!=n?this.remove(t):this,s=r.find(n),i=r.content.slice();return s==-1?i.push(t||n,e):(i[s+1]=e,t&&(i[s]=t)),new Z(i)},remove:function(n){var e=this.find(n);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new Z(t)},addToStart:function(n,e){return new Z([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new Z(t)},addBefore:function(n,e,t){var r=this.remove(e),s=r.content.slice(),i=r.find(n);return s.splice(i==-1?s.length:i,0,e,t),new Z(s)},forEach:function(n){for(var e=0;e<this.content.length;e+=2)n(this.content[e],this.content[e+1])},prepend:function(n){return n=Z.from(n),n.size?new Z(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=Z.from(n),n.size?new Z(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=Z.from(n);for(var t=0;t<n.content.length;t+=2)e=e.remove(n.content[t]);return e},toObject:function(){var n={};return this.forEach(function(e,t){n[e]=t}),n},get size(){return this.content.length>>1}},Z.from=function(n){if(n instanceof Z)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new Z(e)};function uo(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let s=n.child(r),i=e.child(r);if(s==i){t+=s.nodeSize;continue}if(!s.sameMarkup(i))return t;if(s.isText&&s.text!=i.text){for(let o=0;s.text[o]==i.text[o];o++)t++;return t}if(s.content.size||i.content.size){let o=uo(s.content,i.content,t+1);if(o!=null)return o}t+=s.nodeSize}}function fo(n,e,t,r){for(let s=n.childCount,i=e.childCount;;){if(s==0||i==0)return s==i?null:{a:t,b:r};let o=n.child(--s),l=e.child(--i),a=o.nodeSize;if(o==l){t-=a,r-=a;continue}if(!o.sameMarkup(l))return{a:t,b:r};if(o.isText&&o.text!=l.text){let c=0,d=Math.min(o.text.length,l.text.length);for(;c<d&&o.text[o.text.length-c-1]==l.text[l.text.length-c-1];)c++,t--,r--;return{a:t,b:r}}if(o.content.size||l.content.size){let c=fo(o.content,l.content,t-1,r-1);if(c)return c}t-=a,r-=a}}class b{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,t,r,s=0,i){for(let o=0,l=0;l<t;o++){let a=this.content[o],c=l+a.nodeSize;if(c>e&&r(a,s+l,i||null,o)!==!1&&a.content.size){let d=l+1;a.nodesBetween(Math.max(0,e-d),Math.min(a.content.size,t-d),r,s+d)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,s){let i="",o=!0;return this.nodesBetween(e,t,(l,a)=>{let c=l.isText?l.text.slice(Math.max(e,a)-a,t-a):l.isLeaf?s?typeof s=="function"?s(l):s:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&r&&(o?o=!1:i+=r),i+=c},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,s=this.content.slice(),i=0;for(t.isText&&t.sameMarkup(r)&&(s[s.length-1]=t.withText(t.text+r.text),i=1);i<e.content.length;i++)s.push(e.content[i]);return new b(s,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],s=0;if(t>e)for(let i=0,o=0;o<t;i++){let l=this.content[i],a=o+l.nodeSize;a>e&&((o<e||a>t)&&(l.isText?l=l.cut(Math.max(0,e-o),Math.min(l.text.length,t-o)):l=l.cut(Math.max(0,e-o-1),Math.min(l.content.size,t-o-1))),r.push(l),s+=l.nodeSize),o=a}return new b(r,s)}cutByIndex(e,t){return e==t?b.empty:e==0&&t==this.content.length?this:new b(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let s=this.content.slice(),i=this.size+t.nodeSize-r.nodeSize;return s[e]=t,new b(s,i)}addToStart(e){return new b([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new b(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))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(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,r=0;t<this.content.length;t++){let s=this.content[t];e(s,r,t),r+=s.nodeSize}}findDiffStart(e,t=0){return uo(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return fo(this,e,t,r)}findIndex(e,t=-1){if(e==0)return Fn(0,e);if(e==this.size)return Fn(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let r=0,s=0;;r++){let i=this.child(r),o=s+i.nodeSize;if(o>=e)return o==e||t>0?Fn(r+1,o):Fn(r,s);s=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return b.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new b(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return b.empty;let t,r=0;for(let s=0;s<e.length;s++){let i=e[s];r+=i.nodeSize,s&&i.isText&&e[s-1].sameMarkup(i)?(t||(t=e.slice(0,s)),t[t.length-1]=i.withText(t[t.length-1].text+i.text)):t&&t.push(i)}return new b(t||e,r)}static from(e){if(!e)return b.empty;if(e instanceof b)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new b([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}b.empty=new b([],0);const ds={index:0,offset:0};function Fn(n,e){return ds.index=n,ds.offset=e,ds}function $n(n,e){if(n===e)return!0;if(!(n&&typeof n=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(n);if(Array.isArray(e)!=t)return!1;if(t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!$n(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!$n(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let B=class so{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let s=0;s<e.length;s++){let i=e[s];if(this.eq(i))return e;if(this.type.excludes(i.type))t||(t=e.slice(0,s));else{if(i.type.excludes(this.type))return e;!r&&i.type.rank>this.type.rank&&(t||(t=e.slice(0,s)),t.push(this),r=!0),t&&t.push(i)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&$n(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[t.type];if(!r)throw new RangeError(`There is no mark type ${t.type} in this schema`);let s=r.create(t.attrs);return r.checkAttrs(s.attrs),s}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(t[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return so.none;if(e instanceof so)return[e];let t=e.slice();return t.sort((r,s)=>r.type.rank-s.type.rank),t}};B.none=[];class Vn extends Error{}class w{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=po(this.content,e+this.openStart,t);return r&&new w(r,this.openStart,this.openEnd)}removeBetween(e,t){return new w(ho(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return w.empty;let r=t.openStart||0,s=t.openEnd||0;if(typeof r!="number"||typeof s!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new w(b.fromJSON(e,t.content),r,s)}static maxOpen(e,t=!0){let r=0,s=0;for(let i=e.firstChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.lastChild)s++;return new w(e,r,s)}}w.empty=new w(b.empty,0,0);function ho(n,e,t){let{index:r,offset:s}=n.findIndex(e),i=n.maybeChild(r),{index:o,offset:l}=n.findIndex(t);if(s==e||i.isText){if(l!=t&&!n.child(o).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=o)throw new RangeError("Removing non-flat range");return n.replaceChild(r,i.copy(ho(i.content,e-s-1,t-s-1)))}function po(n,e,t,r){let{index:s,offset:i}=n.findIndex(e),o=n.maybeChild(s);if(i==e||o.isText)return n.cut(0,e).append(t).append(n.cut(e));let l=po(o.content,e-i-1,t);return l&&n.replaceChild(s,o.copy(l))}function Od(n,e,t){if(t.openStart>n.depth)throw new Vn("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new Vn("Inconsistent open depths");return mo(n,e,t,0)}function mo(n,e,t,r){let s=n.index(r),i=n.node(r);if(s==e.index(r)&&r<n.depth-t.openStart){let o=mo(n,e,t,r+1);return i.copy(i.content.replaceChild(s,o))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&n.depth==r&&e.depth==r){let o=n.parent,l=o.content;return ut(o,l.cut(0,n.parentOffset).append(t.content).append(l.cut(e.parentOffset)))}else{let{start:o,end:l}=Nd(t,n);return ut(i,yo(n,o,l,e,r))}else return ut(i,Wn(n,e,r))}function go(n,e){if(!e.type.compatibleContent(n.type))throw new Vn("Cannot join "+e.type.name+" onto "+n.type.name)}function us(n,e,t){let r=n.node(t);return go(r,e.node(t)),r}function dt(n,e){let t=e.length-1;t>=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function Xt(n,e,t,r){let s=(e||n).node(t),i=0,o=e?e.index(t):s.childCount;n&&(i=n.index(t),n.depth>t?i++:n.textOffset&&(dt(n.nodeAfter,r),i++));for(let l=i;l<o;l++)dt(s.child(l),r);e&&e.depth==t&&e.textOffset&&dt(e.nodeBefore,r)}function ut(n,e){return n.type.checkContent(e),n.copy(e)}function yo(n,e,t,r,s){let i=n.depth>s&&us(n,e,s+1),o=r.depth>s&&us(t,r,s+1),l=[];return Xt(null,n,s,l),i&&o&&e.index(s)==t.index(s)?(go(i,o),dt(ut(i,yo(n,e,t,r,s+1)),l)):(i&&dt(ut(i,Wn(n,e,s+1)),l),Xt(e,t,s,l),o&&dt(ut(o,Wn(t,r,s+1)),l)),Xt(r,null,s,l),new b(l)}function Wn(n,e,t){let r=[];if(Xt(null,n,t,r),n.depth>t){let s=us(n,e,t+1);dt(ut(s,Wn(n,e,t+1)),r)}return Xt(e,null,t,r),new b(r)}function Nd(n,e){let t=e.depth-n.openStart,s=e.node(t).copy(n.content);for(let i=t-1;i>=0;i--)s=e.node(i).copy(b.from(s));return{start:s.resolveNoCache(n.openStart+t),end:s.resolveNoCache(s.content.size-n.openEnd-t)}}class Bn{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],s=e.child(t);return r?e.child(t).cut(r):s}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],s=t==0?0:this.path[t*3-1]+1;for(let i=0;i<e;i++)s+=r.child(i).nodeSize;return s}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return B.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),s=e.maybeChild(t);if(!r){let l=r;r=s,s=l}let i=r.marks;for(var o=0;o<i.length;o++)i[o].type.spec.inclusive===!1&&(!s||!i[o].isInSet(s.marks))&&(i=i[o--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,s=e.parent.maybeChild(e.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!s||!r[i].isInSet(s.marks))&&(r=r[i--].removeFromSet(r));return r}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new jn(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],s=0,i=t;for(let o=e;;){let{index:l,offset:a}=o.content.findIndex(i),c=i-a;if(r.push(o,l,s+a),!c||(o=o.child(l),o.isText))break;i=c-1,s+=a+1}return new Bn(t,r,i)}static resolveCached(e,t){let r=bo.get(e);if(r)for(let i=0;i<r.elts.length;i++){let o=r.elts[i];if(o.pos==t)return o}else bo.set(e,r=new vd);let s=r.elts[r.i]=Bn.resolve(e,t);return r.i=(r.i+1)%Rd,s}}class vd{constructor(){this.elts=[],this.i=0}}const Rd=12,bo=new WeakMap;class jn{constructor(e,t,r){this.$from=e,this.$to=t,this.depth=r}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 Dd=Object.create(null);let Me=class io{constructor(e,t,r,s=B.none){this.type=e,this.attrs=t,this.marks=s,this.content=r||b.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,r,s=0){this.content.nodesBetween(e,t,r,s,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,r,s){return this.content.textBetween(e,t,r,s)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,r){return this.type==e&&$n(this.attrs,t||e.defaultAttrs||Dd)&&B.sameSet(this.marks,r||B.none)}copy(e=null){return e==this.content?this:new io(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new io(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,r=!1){if(e==t)return w.empty;let s=this.resolve(e),i=this.resolve(t),o=r?0:s.sharedDepth(t),l=s.start(o),c=s.node(o).content.cut(s.pos-l,i.pos-l);return new w(c,s.depth-o,i.depth-o)}replace(e,t,r){return Od(this.resolve(e),this.resolve(t),r)}nodeAt(e){for(let t=this;;){let{index:r,offset:s}=t.content.findIndex(e);if(t=t.maybeChild(r),!t)return null;if(s==e||t.isText)return t;e-=s+1}}childAfter(e){let{index:t,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(t),index:t,offset:r};let s=this.content.child(t-1);return{node:s,index:t-1,offset:r-s.nodeSize}}resolve(e){return Bn.resolveCached(this,e)}resolveNoCache(e){return Bn.resolve(this,e)}rangeHasMark(e,t,r){let s=!1;return t>e&&this.nodesBetween(e,t,i=>(r.isInSet(i.marks)&&(s=!0),!s)),s}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 e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),ko(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=b.empty,s=0,i=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,s,i),l=o&&o.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let a=s;a<i;a++)if(!this.type.allowsMarks(r.child(a).marks))return!1;return!0}canReplaceWith(e,t,r,s){if(s&&!this.type.allowsMarks(s))return!1;let i=this.contentMatchAt(e).matchType(r),o=i&&i.matchFragment(this.content,t);return o?o.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=B.none;for(let t=0;t<this.marks.length;t++){let r=this.marks[t];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!B.sameSet(e,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 e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let s=b.fromJSON(e,t.content),i=e.nodeType(t.type).create(t.attrs,s,r);return i.type.checkAttrs(i.attrs),i}};Me.prototype.text=void 0;class rs extends Me{constructor(e,t,r,s){if(super(e,t,null,s),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):ko(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new rs(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new rs(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function ko(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class xt{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new Id(e,t);if(r.next==null)return xt.empty;let s=So(r);r.next&&r.err("Unexpected trailing text");let i=$d(Fd(s));return Vd(i,r),i}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,r=e.childCount){let s=this;for(let i=t;s&&i<r;i++)s=s.matchType(e.child(i).type);return s}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let r=0;r<e.next.length;r++)if(this.next[t].type==e.next[r].type)return!0;return!1}fillBefore(e,t=!1,r=0){let s=[this];function i(o,l){let a=o.matchFragment(e,r);if(a&&(!t||a.validEnd))return b.from(l.map(c=>c.createAndFill()));for(let c=0;c<o.next.length;c++){let{type:d,next:u}=o.next[c];if(!(d.isText||d.hasRequiredAttrs())&&s.indexOf(u)==-1){s.push(u);let f=i(u,l.concat(d));if(f)return f}}return null}return i(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let s=r.shift(),i=s.match;if(i.matchType(e)){let o=[];for(let l=s;l.type;l=l.via)o.push(l.type);return o.reverse()}for(let o=0;o<i.next.length;o++){let{type:l,next:a}=i.next[o];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in t)&&(!s.type||a.validEnd)&&(r.push({match:l.contentMatch,type:l,via:s}),t[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let s=0;s<r.next.length;s++)e.indexOf(r.next[s].next)==-1&&t(r.next[s].next)}return t(this),e.map((r,s)=>{let i=s+(r.validEnd?"*":" ")+" ";for(let o=0;o<r.next.length;o++)i+=(o?", ":"")+r.next[o].type.name+"->"+e.indexOf(r.next[o].next);return i}).join(`
2
+ `)}}xt.empty=new xt(!0);class Id{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.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(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function So(n){let e=[];do e.push(Ld(n));while(n.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function Ld(n){let e=[];do e.push(Pd(n));while(n.next&&n.next!=")"&&n.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function Pd(n){let e=Hd(n);for(;;)if(n.eat("+"))e={type:"plus",expr:e};else if(n.eat("*"))e={type:"star",expr:e};else if(n.eat("?"))e={type:"opt",expr:e};else if(n.eat("{"))e=Bd(n,e);else break;return e}function wo(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let e=Number(n.next);return n.pos++,e}function Bd(n,e){let t=wo(n),r=t;return n.eat(",")&&(n.next!="}"?r=wo(n):r=-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:t,max:r,expr:e}}function zd(n,e){let t=n.nodeTypes,r=t[e];if(r)return[r];let s=[];for(let i in t){let o=t[i];o.isInGroup(e)&&s.push(o)}return s.length==0&&n.err("No node type or group '"+e+"' found"),s}function Hd(n){if(n.eat("(")){let e=So(n);return n.eat(")")||n.err("Missing closing paren"),e}else if(/\W/.test(n.next))n.err("Unexpected token '"+n.next+"'");else{let e=zd(n,n.next).map(t=>(n.inline==null?n.inline=t.isInline:n.inline!=t.isInline&&n.err("Mixing inline and block content"),{type:"name",value:t}));return n.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function Fd(n){let e=[[]];return s(i(n,0),t()),e;function t(){return e.push([])-1}function r(o,l,a){let c={term:a,to:l};return e[o].push(c),c}function s(o,l){o.forEach(a=>a.to=l)}function i(o,l){if(o.type=="choice")return o.exprs.reduce((a,c)=>a.concat(i(c,l)),[]);if(o.type=="seq")for(let a=0;;a++){let c=i(o.exprs[a],l);if(a==o.exprs.length-1)return c;s(c,l=t())}else if(o.type=="star"){let a=t();return r(l,a),s(i(o.expr,a),a),[r(a)]}else if(o.type=="plus"){let a=t();return s(i(o.expr,l),a),s(i(o.expr,a),a),[r(a)]}else{if(o.type=="opt")return[r(l)].concat(i(o.expr,l));if(o.type=="range"){let a=l;for(let c=0;c<o.min;c++){let d=t();s(i(o.expr,a),d),a=d}if(o.max==-1)s(i(o.expr,a),a);else for(let c=o.min;c<o.max;c++){let d=t();r(a,d),s(i(o.expr,a),d),a=d}return[r(a)]}else{if(o.type=="name")return[r(l,void 0,o.value)];throw new Error("Unknown expr type")}}}}function Co(n,e){return e-n}function xo(n,e){let t=[];return r(e),t.sort(Co);function r(s){let i=n[s];if(i.length==1&&!i[0].term)return r(i[0].to);t.push(s);for(let o=0;o<i.length;o++){let{term:l,to:a}=i[o];!l&&t.indexOf(a)==-1&&r(a)}}}function $d(n){let e=Object.create(null);return t(xo(n,0));function t(r){let s=[];r.forEach(o=>{n[o].forEach(({term:l,to:a})=>{if(!l)return;let c;for(let d=0;d<s.length;d++)s[d][0]==l&&(c=s[d][1]);xo(n,a).forEach(d=>{c||s.push([l,c=[]]),c.indexOf(d)==-1&&c.push(d)})})});let i=e[r.join(",")]=new xt(r.indexOf(n.length-1)>-1);for(let o=0;o<s.length;o++){let l=s[o][1].sort(Co);i.next.push({type:s[o][0],next:e[l.join(",")]||t(l)})}return i}}function Vd(n,e){for(let t=0,r=[n];t<r.length;t++){let s=r[t],i=!s.validEnd,o=[];for(let l=0;l<s.next.length;l++){let{type:a,next:c}=s.next[l];o.push(a.name),i&&!(a.isText||a.hasRequiredAttrs())&&(i=!1),r.indexOf(c)==-1&&r.push(c)}i&&e.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function Mo(n){let e=Object.create(null);for(let t in n){let r=n[t];if(!r.hasDefault)return null;e[t]=r.default}return e}function To(n,e){let t=Object.create(null);for(let r in n){let s=e&&e[r];if(s===void 0){let i=n[r];if(i.hasDefault)s=i.default;else throw new RangeError("No value supplied for attribute "+r)}t[r]=s}return t}function Ao(n,e,t,r){for(let s in e)if(!(s in n))throw new RangeError(`Unsupported attribute ${s} for ${t} of type ${s}`);for(let s in n){let i=n[s];i.validate&&i.validate(e[s])}}function Eo(n,e){let t=Object.create(null);if(e)for(let r in e)t[r]=new jd(n,r,e[r]);return t}let Oo=class Ad{constructor(e,t,r){this.name=e,this.schema=t,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=Eo(e,r.attrs),this.defaultAttrs=Mo(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==xt.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:To(this.attrs,e)}create(e=null,t,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Me(this,this.computeAttrs(e),b.from(t),B.setFrom(r))}createChecked(e=null,t,r){return t=b.from(t),this.checkContent(t),new Me(this,this.computeAttrs(e),t,B.setFrom(r))}createAndFill(e=null,t,r){if(e=this.computeAttrs(e),t=b.from(t),t.size){let o=this.contentMatch.fillBefore(t);if(!o)return null;t=o.append(t)}let s=this.contentMatch.matchFragment(t),i=s&&s.fillBefore(b.empty,!0);return i?new Me(this,e,t.append(i),B.setFrom(r)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){Ao(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let t;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?t&&t.push(e[r]):t||(t=e.slice(0,r));return t?t.length?t:B.none:e}static compile(e,t){let r=Object.create(null);e.forEach((i,o)=>r[i]=new Ad(i,t,o));let s=t.spec.topNode||"doc";if(!r[s])throw new RangeError("Schema is missing its top node type ('"+s+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function Wd(n,e,t){let r=t.split("|");return s=>{let i=s===null?"null":typeof s;if(r.indexOf(i)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${n}, got ${i}`)}}class jd{constructor(e,t,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?Wd(e,t,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class ss{constructor(e,t,r,s){this.name=e,this.rank=t,this.schema=r,this.spec=s,this.attrs=Eo(e,s.attrs),this.excluded=null;let i=Mo(this.attrs);this.instance=i?new B(this,i):null}create(e=null){return!e&&this.instance?this.instance:new B(this,To(this.attrs,e))}static compile(e,t){let r=Object.create(null),s=0;return e.forEach((i,o)=>r[i]=new ss(i,s++,t,o)),r}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}checkAttrs(e){Ao(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class No{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let s in e)t[s]=e[s];t.nodes=Z.from(e.nodes),t.marks=Z.from(e.marks||{}),this.nodes=Oo.compile(this.spec.nodes,this),this.marks=ss.compile(this.spec.marks,this);let r=Object.create(null);for(let s in this.nodes){if(s in this.marks)throw new RangeError(s+" can not be both a node and a mark");let i=this.nodes[s],o=i.spec.content||"",l=i.spec.marks;if(i.contentMatch=r[o]||(r[o]=xt.parse(o,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!i.isInline||!i.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=i}i.markSet=l=="_"?null:l?vo(this,l.split(" ")):l==""||!i.inlineContent?[]:null}for(let s in this.marks){let i=this.marks[s],o=i.spec.excludes;i.excluded=o==null?[i]:o==""?[]:vo(this,o.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,r,s){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof Oo){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(t,r,s)}text(e,t){let r=this.nodes.text;return new rs(r,r.defaultAttrs,e,B.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeFromJSON(e){return Me.fromJSON(this,e)}markFromJSON(e){return B.fromJSON(this,e)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function vo(n,e){let t=[];for(let r=0;r<e.length;r++){let s=e[r],i=n.marks[s],o=i;if(i)t.push(i);else for(let l in n.marks){let a=n.marks[l];(s=="_"||a.spec.group&&a.spec.group.split(" ").indexOf(s)>-1)&&t.push(o=a)}if(!o)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return t}function Kd(n){return n.tag!=null}function Ud(n){return n.style!=null}class je{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let r=this.matchedStyles=[];t.forEach(s=>{if(Kd(s))this.tags.push(s);else if(Ud(s)){let i=/[^=]*/.exec(s.style)[0];r.indexOf(i)<0&&r.push(i),this.styles.push(s)}}),this.normalizeLists=!this.tags.some(s=>{if(!/^(ul|ol)\b/.test(s.tag)||!s.node)return!1;let i=e.nodes[s.node];return i.contentMatch.matchType(i)})}parse(e,t={}){let r=new Lo(this,t,!1);return r.addAll(e,B.none,t.from,t.to),r.finish()}parseSlice(e,t={}){let r=new Lo(this,t,!0);return r.addAll(e,B.none,t.from,t.to),w.maxOpen(r.finish())}matchTag(e,t,r){for(let s=r?this.tags.indexOf(r)+1:0;s<this.tags.length;s++){let i=this.tags[s];if(_d(e,i.tag)&&(i.namespace===void 0||e.namespaceURI==i.namespace)&&(!i.context||t.matchesContext(i.context))){if(i.getAttrs){let o=i.getAttrs(e);if(o===!1)continue;i.attrs=o||void 0}return i}}}matchStyle(e,t,r,s){for(let i=s?this.styles.indexOf(s)+1:0;i<this.styles.length;i++){let o=this.styles[i],l=o.style;if(!(l.indexOf(e)!=0||o.context&&!r.matchesContext(o.context)||l.length>e.length&&(l.charCodeAt(e.length)!=61||l.slice(e.length+1)!=t))){if(o.getAttrs){let a=o.getAttrs(t);if(a===!1)continue;o.attrs=a||void 0}return o}}}static schemaRules(e){let t=[];function r(s){let i=s.priority==null?50:s.priority,o=0;for(;o<t.length;o++){let l=t[o];if((l.priority==null?50:l.priority)<i)break}t.splice(o,0,s)}for(let s in e.marks){let i=e.marks[s].spec.parseDOM;i&&i.forEach(o=>{r(o=Po(o)),o.mark||o.ignore||o.clearMark||(o.mark=s)})}for(let s in e.nodes){let i=e.nodes[s].spec.parseDOM;i&&i.forEach(o=>{r(o=Po(o)),o.node||o.ignore||o.mark||(o.node=s)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new je(e,je.schemaRules(e)))}}const Ro={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},Jd={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Do={ol:!0,ul:!0},Qt=1,fs=2,Kn=4;function Io(n,e,t){return e!=null?(e?Qt:0)|(e==="full"?fs:0):n&&n.whitespace=="pre"?Qt|fs:t&-5}class Un{constructor(e,t,r,s,i,o){this.type=e,this.attrs=t,this.marks=r,this.solid=s,this.options=o,this.content=[],this.activeMarks=B.none,this.match=i||(o&Kn?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(b.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let r=this.type.contentMatch,s;return(s=r.findWrapping(e.type))?(this.match=r,s):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Qt)){let r=this.content[this.content.length-1],s;if(r&&r.isText&&(s=/[ \t\r\n\u000c]+$/.exec(r.text))){let i=r;r.text.length==s[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-s[0].length))}}let t=b.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(b.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!Ro.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class Lo{constructor(e,t,r){this.parser=e,this.options=t,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let s=t.topNode,i,o=Io(null,t.preserveWhitespace,0)|(r?Kn:0);s?i=new Un(s.type,s.attrs,B.none,!0,t.topMatch||s.type.contentMatch,o):r?i=new Un(null,null,B.none,!0,null,o):i=new Un(e.schema.topNodeType,null,B.none,!0,null,o),this.nodes=[i],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){e.nodeType==3?this.addTextNode(e,t):e.nodeType==1&&this.addElement(e,t)}addTextNode(e,t){let r=e.nodeValue,s=this.top,i=s.options&fs?"full":this.localPreserveWS||(s.options&Qt)>0;if(i==="full"||s.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(i)i!=="full"?r=r.replace(/\r?\n|\r/g," "):r=r.replace(/\r\n?/g,`
3
+ `);else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let o=s.content[s.content.length-1],l=e.previousSibling;(!o||l&&l.nodeName=="BR"||o.isText&&/[ \t\r\n\u000c]$/.test(o.text))&&(r=r.slice(1))}r&&this.insertNode(this.parser.schema.text(r),t),this.findInText(e)}else this.findInside(e)}addElement(e,t,r){let s=this.localPreserveWS,i=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let o=e.nodeName.toLowerCase(),l;Do.hasOwnProperty(o)&&this.parser.normalizeLists&&qd(e);let a=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(l=this.parser.matchTag(e,this,r));e:if(a?a.ignore:Jd.hasOwnProperty(o))this.findInside(e),this.ignoreFallback(e,t);else if(!a||a.skip||a.closeParent){a&&a.closeParent?this.open=Math.max(0,this.open-1):a&&a.skip.nodeType&&(e=a.skip);let c,d=this.needsBlock;if(Ro.hasOwnProperty(o))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),c=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break e}let u=a&&a.skip?t:this.readStyles(e,t);u&&this.addAll(e,u),c&&this.sync(i),this.needsBlock=d}else{let c=this.readStyles(e,t);c&&this.addElementByRule(e,a,c,a.consuming===!1?l:void 0)}this.localPreserveWS=s}leafFallback(e,t){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
4
+ `),t)}ignoreFallback(e,t){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),t)}readStyles(e,t){let r=e.style;if(r&&r.length)for(let s=0;s<this.parser.matchedStyles.length;s++){let i=this.parser.matchedStyles[s],o=r.getPropertyValue(i);if(o)for(let l=void 0;;){let a=this.parser.matchStyle(i,o,this,l);if(!a)break;if(a.ignore)return null;if(a.clearMark?t=t.filter(c=>!a.clearMark(c)):t=t.concat(this.parser.schema.marks[a.mark].create(a.attrs)),a.consuming===!1)l=a;else break}}return t}addElementByRule(e,t,r,s){let i,o;if(t.node)if(o=this.parser.schema.nodes[t.node],o.isLeaf)this.insertNode(o.create(t.attrs),r)||this.leafFallback(e,r);else{let a=this.enter(o,t.attrs||null,r,t.preserveWhitespace);a&&(i=!0,r=a)}else{let a=this.parser.schema.marks[t.mark];r=r.concat(a.create(t.attrs))}let l=this.top;if(o&&o.isLeaf)this.findInside(e);else if(s)this.addElement(e,r,s);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(a=>this.insertNode(a,r));else{let a=e;typeof t.contentElement=="string"?a=e.querySelector(t.contentElement):typeof t.contentElement=="function"?a=t.contentElement(e):t.contentElement&&(a=t.contentElement),this.findAround(e,a,!0),this.addAll(a,r),this.findAround(e,a,!1)}i&&this.sync(l)&&this.open--}addAll(e,t,r,s){let i=r||0;for(let o=r?e.childNodes[r]:e.firstChild,l=s==null?null:e.childNodes[s];o!=l;o=o.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(o,t);this.findAtPoint(e,i)}findPlace(e,t){let r,s;for(let i=this.open;i>=0;i--){let o=this.nodes[i],l=o.findWrapping(e);if(l&&(!r||r.length>l.length)&&(r=l,s=o,!l.length)||o.solid)break}if(!r)return null;this.sync(s);for(let i=0;i<r.length;i++)t=this.enterInner(r[i],null,t,!1);return t}insertNode(e,t){if(e.isInline&&this.needsBlock&&!this.top.type){let s=this.textblockFromContext();s&&(t=this.enterInner(s,null,t))}let r=this.findPlace(e,t);if(r){this.closeExtra();let s=this.top;s.match&&(s.match=s.match.matchType(e.type));let i=B.none;for(let o of r.concat(e.marks))(s.type?s.type.allowsMarkType(o.type):Bo(o.type,e.type))&&(i=o.addToSet(i));return s.content.push(e.mark(i)),!0}return!1}enter(e,t,r,s){let i=this.findPlace(e.create(t),r);return i&&(i=this.enterInner(e,t,r,!0,s)),i}enterInner(e,t,r,s=!1,i){this.closeExtra();let o=this.top;o.match=o.match&&o.match.matchType(e);let l=Io(e,i,o.options);o.options&Kn&&o.content.length==0&&(l|=Kn);let a=B.none;return r=r.filter(c=>(o.type?o.type.allowsMarkType(c.type):Bo(c.type,e))?(a=c.addToSet(a),!1):!0),this.nodes.push(new Un(e,t,a,s,null,l)),this.open++,r}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));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(e){for(let t=this.open;t>=0;t--){if(this.nodes[t]==e)return this.open=t,!0;this.localPreserveWS&&(this.nodes[t].options|=Qt)}return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let r=this.nodes[t].content;for(let s=r.length-1;s>=0;s--)e+=r[s].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==t&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].pos==null&&e.nodeType==1&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,r){if(e!=t&&this.find)for(let s=0;s<this.find.length;s++)this.find[s].pos==null&&e.nodeType==1&&e.contains(this.find[s].node)&&t.compareDocumentPosition(this.find[s].node)&(r?2:4)&&(this.find[s].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),r=this.options.context,s=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(s?0:1),o=(l,a)=>{for(;l>=0;l--){let c=t[l];if(c==""){if(l==t.length-1||l==0)continue;for(;a>=i;a--)if(o(l-1,a))return!0;return!1}else{let d=a>0||a==0&&s?this.nodes[a].type:r&&a>=i?r.node(a-i).type:null;if(!d||d.name!=c&&!d.isInGroup(c))return!1;a--}}return!0};return o(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let r=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let t in this.parser.schema.nodes){let r=this.parser.schema.nodes[t];if(r.isTextblock&&r.defaultAttrs)return r}}}function qd(n){for(let e=n.firstChild,t=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&Do.hasOwnProperty(r)&&t?(t.appendChild(e),e=t):r=="li"?t=e:r&&(t=null)}}function _d(n,e){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,e)}function Po(n){let e={};for(let t in n)e[t]=n[t];return e}function Bo(n,e){let t=e.schema.nodes;for(let r in t){let s=t[r];if(!s.allowsMarkType(n))continue;let i=[],o=l=>{i.push(l);for(let a=0;a<l.edgeCount;a++){let{type:c,next:d}=l.edge(a);if(c==e||i.indexOf(d)<0&&o(d))return!0}};if(o(s.contentMatch))return!0}}class Mt{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},r){r||(r=hs(t).createDocumentFragment());let s=r,i=[];return e.forEach(o=>{if(i.length||o.marks.length){let l=0,a=0;for(;l<i.length&&a<o.marks.length;){let c=o.marks[a];if(!this.marks[c.type.name]){a++;continue}if(!c.eq(i[l][0])||c.type.spec.spanning===!1)break;l++,a++}for(;l<i.length;)s=i.pop()[1];for(;a<o.marks.length;){let c=o.marks[a++],d=this.serializeMark(c,o.isInline,t);d&&(i.push([c,s]),s.appendChild(d.dom),s=d.contentDOM||d.dom)}}s.appendChild(this.serializeNodeInner(o,t))}),r}serializeNodeInner(e,t){let{dom:r,contentDOM:s}=Jn(hs(t),this.nodes[e.type.name](e),null,e.attrs);if(s){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,s)}return r}serializeNode(e,t={}){let r=this.serializeNodeInner(e,t);for(let s=e.marks.length-1;s>=0;s--){let i=this.serializeMark(e.marks[s],e.isInline,t);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(e,t,r={}){let s=this.marks[e.type.name];return s&&Jn(hs(r),s(e,t),null,e.attrs)}static renderSpec(e,t,r=null,s){return Jn(e,t,r,s)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Mt(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=zo(e.nodes);return t.text||(t.text=r=>r.text),t}static marksFromSchema(e){return zo(e.marks)}}function zo(n){let e={};for(let t in n){let r=n[t].spec.toDOM;r&&(e[t]=r)}return e}function hs(n){return n.document||window.document}const Ho=new WeakMap;function Gd(n){let e=Ho.get(n);return e===void 0&&Ho.set(n,e=Yd(n)),e}function Yd(n){let e=null;function t(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let s=0;s<r.length;s++)t(r[s]);else for(let s in r)t(r[s])}return t(n),e}function Jn(n,e,t,r){if(typeof e=="string")return{dom:n.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let s=e[0],i;if(typeof s!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(i=Gd(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=s.indexOf(" ");o>0&&(t=s.slice(0,o),s=s.slice(o+1));let l,a=t?n.createElementNS(t,s):n.createElement(s),c=e[1],d=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){d=2;for(let u in c)if(c[u]!=null){let f=u.indexOf(" ");f>0?a.setAttributeNS(u.slice(0,f),u.slice(f+1),c[u]):a.setAttribute(u,c[u])}}for(let u=d;u<e.length;u++){let f=e[u];if(f===0){if(u<e.length-1||u>d)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}else{let{dom:h,contentDOM:p}=Jn(n,f,t,r);if(a.appendChild(h),p){if(l)throw new RangeError("Multiple content holes");l=p}}}return{dom:a,contentDOM:l}}const Fo=65535,$o=Math.pow(2,16);function Xd(n,e){return n+e*$o}function Vo(n){return n&Fo}function Qd(n){return(n-(n&Fo))/$o}const Wo=1,jo=2,qn=4,Ko=8;class ps{constructor(e,t,r){this.pos=e,this.delInfo=t,this.recover=r}get deleted(){return(this.delInfo&Ko)>0}get deletedBefore(){return(this.delInfo&(Wo|qn))>0}get deletedAfter(){return(this.delInfo&(jo|qn))>0}get deletedAcross(){return(this.delInfo&qn)>0}}class pe{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&pe.empty)return pe.empty}recover(e){let t=0,r=Vo(e);if(!this.inverted)for(let s=0;s<r;s++)t+=this.ranges[s*3+2]-this.ranges[s*3+1];return this.ranges[r*3]+t+Qd(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,r){let s=0,i=this.inverted?2:1,o=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?s:0);if(a>e)break;let c=this.ranges[l+i],d=this.ranges[l+o],u=a+c;if(e<=u){let f=c?e==a?-1:e==u?1:t:t,h=a+s+(f<0?0:d);if(r)return h;let p=e==(t<0?a:u)?null:Xd(l/3,e-a),m=e==a?jo:e==u?Wo:qn;return(t<0?e!=a:e!=u)&&(m|=Ko),new ps(h,m,p)}s+=d-c}return r?e+s:new ps(e+s,0,null)}touches(e,t){let r=0,s=Vo(t),i=this.inverted?2:1,o=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?r:0);if(a>e)break;let c=this.ranges[l+i],d=a+c;if(e<=d&&l==s*3)return!0;r+=this.ranges[l+o]-c}return!1}forEach(e){let t=this.inverted?2:1,r=this.inverted?1:2;for(let s=0,i=0;s<this.ranges.length;s+=3){let o=this.ranges[s],l=o-(this.inverted?i:0),a=o+(this.inverted?0:i),c=this.ranges[s+t],d=this.ranges[s+r];e(l,l+c,a,a+d),i+=d-c}}invert(){return new pe(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?pe.empty:new pe(e<0?[0,-e,0]:[0,0,e])}}pe.empty=new pe([]);class Jt{constructor(e=[],t,r=0,s=e.length){this.maps=e,this.mirror=t,this.from=r,this.to=s}slice(e=0,t=this.maps.length){return new Jt(this.maps,this.mirror,e,t)}copy(){return new Jt(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(e,t){this.to=this.maps.push(e),t!=null&&this.setMirror(this.maps.length-1,t)}appendMapping(e){for(let t=0,r=this.maps.length;t<e.maps.length;t++){let s=e.getMirror(t);this.appendMap(e.maps[t],s!=null&&s<t?r+s:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,r=this.maps.length+e.maps.length;t>=0;t--){let s=e.getMirror(t);this.appendMap(e.maps[t].invert(),s!=null&&s>t?r-s-1:void 0)}}invert(){let e=new Jt;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let r=this.from;r<this.to;r++)e=this.maps[r].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,r){let s=0;for(let i=this.from;i<this.to;i++){let o=this.maps[i],l=o.mapResult(e,t);if(l.recover!=null){let a=this.getMirror(i);if(a!=null&&a>i&&a<this.to){i=a,e=this.maps[a].recover(l.recover);continue}}s|=l.delInfo,e=l.pos}return r?e:new ps(e,s,null)}}const ms=Object.create(null);class ne{getMap(){return pe.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=ms[t.stepType];if(!r)throw new RangeError(`No step type ${t.stepType} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in ms)throw new RangeError("Duplicate use of step JSON ID "+e);return ms[e]=t,t.prototype.jsonID=e,t}}class J{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new J(e,null)}static fail(e){return new J(null,e)}static fromReplace(e,t,r,s){try{return J.ok(e.replace(t,r,s))}catch(i){if(i instanceof Vn)return J.fail(i.message);throw i}}}function gs(n,e,t){let r=[];for(let s=0;s<n.childCount;s++){let i=n.child(s);i.content.size&&(i=i.copy(gs(i.content,e,i))),i.isInline&&(i=e(i,t,s)),r.push(i)}return b.fromArray(r)}class lt extends ne{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=e.resolve(this.from),s=r.node(r.sharedDepth(this.to)),i=new w(gs(t.content,(o,l)=>!o.isAtom||!l.type.allowsMarkType(this.mark.type)?o:o.mark(this.mark.addToSet(o.marks)),s),t.openStart,t.openEnd);return J.fromReplace(e,this.from,this.to,i)}invert(){return new De(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new lt(t.pos,r.pos,this.mark)}merge(e){return e instanceof lt&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new lt(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new lt(t.from,t.to,e.markFromJSON(t.mark))}}ne.jsonID("addMark",lt);class De extends ne{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=new w(gs(t.content,s=>s.mark(this.mark.removeFromSet(s.marks)),e),t.openStart,t.openEnd);return J.fromReplace(e,this.from,this.to,r)}invert(){return new lt(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new De(t.pos,r.pos,this.mark)}merge(e){return e instanceof De&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new De(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new De(t.from,t.to,e.markFromJSON(t.mark))}}ne.jsonID("removeMark",De);class at extends ne{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return J.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return J.fromReplace(e,this.pos,this.pos+1,new w(b.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let r=this.mark.addToSet(t.marks);if(r.length==t.marks.length){for(let s=0;s<t.marks.length;s++)if(!t.marks[s].isInSet(r))return new at(this.pos,t.marks[s]);return new at(this.pos,this.mark)}}return new qt(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new at(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new at(t.pos,e.markFromJSON(t.mark))}}ne.jsonID("addNodeMark",at);class qt extends ne{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return J.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return J.fromReplace(e,this.pos,this.pos+1,new w(b.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new at(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new qt(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new qt(t.pos,e.markFromJSON(t.mark))}}ne.jsonID("removeNodeMark",qt);class Q extends ne{constructor(e,t,r,s=!1){super(),this.from=e,this.to=t,this.slice=r,this.structure=s}apply(e){return this.structure&&ys(e,this.from,this.to)?J.fail("Structure replace would overwrite content"):J.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new pe([this.from,this.to-this.from,this.slice.size])}invert(e){return new Q(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deletedAcross&&r.deletedAcross?null:new Q(t.pos,Math.max(t.pos,r.pos),this.slice)}merge(e){if(!(e instanceof Q)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let t=this.slice.size+e.slice.size==0?w.empty:new w(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new Q(this.from,this.to+(e.to-e.from),t,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let t=this.slice.size+e.slice.size==0?w.empty:new w(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new Q(e.from,this.to,t,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new Q(t.from,t.to,w.fromJSON(e,t.slice),!!t.structure)}}ne.jsonID("replace",Q);class Y extends ne{constructor(e,t,r,s,i,o,l=!1){super(),this.from=e,this.to=t,this.gapFrom=r,this.gapTo=s,this.slice=i,this.insert=o,this.structure=l}apply(e){if(this.structure&&(ys(e,this.from,this.gapFrom)||ys(e,this.gapTo,this.to)))return J.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return J.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,t.content);return r?J.fromReplace(e,this.from,this.to,r):J.fail("Content does not fit in gap")}getMap(){return new pe([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new Y(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),s=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),i=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return t.deletedAcross&&r.deletedAcross||s<t.pos||i>r.pos?null:new Y(t.pos,r.pos,s,i,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Y(t.from,t.to,t.gapFrom,t.gapTo,w.fromJSON(e,t.slice),t.insert,!!t.structure)}}ne.jsonID("replaceAround",Y);function ys(n,e,t){let r=n.resolve(e),s=t-e,i=r.depth;for(;s>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,s--;if(s>0){let o=r.node(i).maybeChild(r.indexAfter(i));for(;s>0;){if(!o||o.isLeaf)return!0;o=o.firstChild,s--}}return!1}function Zd(n,e,t,r){let s=[],i=[],o,l;n.doc.nodesBetween(e,t,(a,c,d)=>{if(!a.isInline)return;let u=a.marks;if(!r.isInSet(u)&&d.type.allowsMarkType(r.type)){let f=Math.max(c,e),h=Math.min(c+a.nodeSize,t),p=r.addToSet(u);for(let m=0;m<u.length;m++)u[m].isInSet(p)||(o&&o.to==f&&o.mark.eq(u[m])?o.to=h:s.push(o=new De(f,h,u[m])));l&&l.to==f?l.to=h:i.push(l=new lt(f,h,r))}}),s.forEach(a=>n.step(a)),i.forEach(a=>n.step(a))}function eu(n,e,t,r){let s=[],i=0;n.doc.nodesBetween(e,t,(o,l)=>{if(!o.isInline)return;i++;let a=null;if(r instanceof ss){let c=o.marks,d;for(;d=r.isInSet(c);)(a||(a=[])).push(d),c=d.removeFromSet(c)}else r?r.isInSet(o.marks)&&(a=[r]):a=o.marks;if(a&&a.length){let c=Math.min(l+o.nodeSize,t);for(let d=0;d<a.length;d++){let u=a[d],f;for(let h=0;h<s.length;h++){let p=s[h];p.step==i-1&&u.eq(s[h].style)&&(f=p)}f?(f.to=c,f.step=i):s.push({style:u,from:Math.max(l,e),to:c,step:i})}}}),s.forEach(o=>n.step(new De(o.from,o.to,o.style)))}function bs(n,e,t,r=t.contentMatch,s=!0){let i=n.doc.nodeAt(e),o=[],l=e+1;for(let a=0;a<i.childCount;a++){let c=i.child(a),d=l+c.nodeSize,u=r.matchType(c.type);if(!u)o.push(new Q(l,d,w.empty));else{r=u;for(let f=0;f<c.marks.length;f++)t.allowsMarkType(c.marks[f].type)||n.step(new De(l,d,c.marks[f]));if(s&&c.isText&&t.whitespace!="pre"){let f,h=/\r?\n|\r/g,p;for(;f=h.exec(c.text);)p||(p=new w(b.from(t.schema.text(" ",t.allowedMarks(c.marks))),0,0)),o.push(new Q(l+f.index,l+f.index+f[0].length,p))}}l=d}if(!r.validEnd){let a=r.fillBefore(b.empty,!0);n.replace(l,l,new w(a,0,0))}for(let a=o.length-1;a>=0;a--)n.step(o[a])}function tu(n,e,t){return(e==0||n.canReplace(e,n.childCount))&&(t==n.childCount||n.canReplace(0,t))}function Ot(n){let t=n.parent.content.cutByIndex(n.startIndex,n.endIndex);for(let r=n.depth;;--r){let s=n.$from.node(r),i=n.$from.index(r),o=n.$to.indexAfter(r);if(r<n.depth&&s.canReplace(i,o,t))return r;if(r==0||s.type.spec.isolating||!tu(s,i,o))break}return null}function nu(n,e,t){let{$from:r,$to:s,depth:i}=e,o=r.before(i+1),l=s.after(i+1),a=o,c=l,d=b.empty,u=0;for(let p=i,m=!1;p>t;p--)m||r.index(p)>0?(m=!0,d=b.from(r.node(p).copy(d)),u++):a--;let f=b.empty,h=0;for(let p=i,m=!1;p>t;p--)m||s.after(p+1)<s.end(p)?(m=!0,f=b.from(s.node(p).copy(f)),h++):c++;n.step(new Y(a,c,o,l,new w(d.append(f),u,h),d.size-u,!0))}function ks(n,e,t=null,r=n){let s=ru(n,e),i=s&&su(r,e);return i?s.map(Uo).concat({type:e,attrs:t}).concat(i.map(Uo)):null}function Uo(n){return{type:n,attrs:null}}function ru(n,e){let{parent:t,startIndex:r,endIndex:s}=n,i=t.contentMatchAt(r).findWrapping(e);if(!i)return null;let o=i.length?i[0]:e;return t.canReplaceWith(r,s,o)?i:null}function su(n,e){let{parent:t,startIndex:r,endIndex:s}=n,i=t.child(r),o=e.contentMatch.findWrapping(i.type);if(!o)return null;let a=(o.length?o[o.length-1]:e).contentMatch;for(let c=r;a&&c<s;c++)a=a.matchType(t.child(c).type);return!a||!a.validEnd?null:o}function iu(n,e,t){let r=b.empty;for(let o=t.length-1;o>=0;o--){if(r.size){let l=t[o].type.contentMatch.matchFragment(r);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=b.from(t[o].type.create(t[o].attrs,r))}let s=e.start,i=e.end;n.step(new Y(s,i,s,i,new w(r,0,0),t.length,!0))}function ou(n,e,t,r,s){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=n.steps.length;n.doc.nodesBetween(e,t,(o,l)=>{let a=typeof s=="function"?s(o):s;if(o.isTextblock&&!o.hasMarkup(r,a)&&lu(n.doc,n.mapping.slice(i).map(l),r)){let c=null;if(r.schema.linebreakReplacement){let h=r.whitespace=="pre",p=!!r.contentMatch.matchType(r.schema.linebreakReplacement);h&&!p?c=!1:!h&&p&&(c=!0)}c===!1&&qo(n,o,l,i),bs(n,n.mapping.slice(i).map(l,1),r,void 0,c===null);let d=n.mapping.slice(i),u=d.map(l,1),f=d.map(l+o.nodeSize,1);return n.step(new Y(u,f,u+1,f-1,new w(b.from(r.create(a,null,o.marks)),0,0),1,!0)),c===!0&&Jo(n,o,l,i),!1}})}function Jo(n,e,t,r){e.forEach((s,i)=>{if(s.isText){let o,l=/\r?\n|\r/g;for(;o=l.exec(s.text);){let a=n.mapping.slice(r).map(t+1+i+o.index);n.replaceWith(a,a+1,e.type.schema.linebreakReplacement.create())}}})}function qo(n,e,t,r){e.forEach((s,i)=>{if(s.type==s.type.schema.linebreakReplacement){let o=n.mapping.slice(r).map(t+1+i);n.replaceWith(o,o+1,e.type.schema.text(`
5
+ `))}})}function lu(n,e,t){let r=n.resolve(e),s=r.index();return r.parent.canReplaceWith(s,s+1,t)}function au(n,e,t,r,s){let i=n.doc.nodeAt(e);if(!i)throw new RangeError("No node at given position");t||(t=i.type);let o=t.create(r,null,s||i.marks);if(i.isLeaf)return n.replaceWith(e,e+i.nodeSize,o);if(!t.validContent(i.content))throw new RangeError("Invalid content for node type "+t.name);n.step(new Y(e,e+i.nodeSize,e+1,e+i.nodeSize-1,new w(b.from(o),0,0),1,!0))}function Ie(n,e,t=1,r){let s=n.resolve(e),i=s.depth-t,o=r&&r[r.length-1]||s.parent;if(i<0||s.parent.type.spec.isolating||!s.parent.canReplace(s.index(),s.parent.childCount)||!o.type.validContent(s.parent.content.cutByIndex(s.index(),s.parent.childCount)))return!1;for(let c=s.depth-1,d=t-2;c>i;c--,d--){let u=s.node(c),f=s.index(c);if(u.type.spec.isolating)return!1;let h=u.content.cutByIndex(f,u.childCount),p=r&&r[d+1];p&&(h=h.replaceChild(0,p.type.create(p.attrs)));let m=r&&r[d]||u;if(!u.canReplace(f+1,u.childCount)||!m.type.validContent(h))return!1}let l=s.indexAfter(i),a=r&&r[0];return s.node(i).canReplaceWith(l,l,a?a.type:s.node(i+1).type)}function cu(n,e,t=1,r){let s=n.doc.resolve(e),i=b.empty,o=b.empty;for(let l=s.depth,a=s.depth-t,c=t-1;l>a;l--,c--){i=b.from(s.node(l).copy(i));let d=r&&r[c];o=b.from(d?d.type.create(d.attrs,o):s.node(l).copy(o))}n.step(new Q(e,e,new w(i.append(o),t,t),!0))}function Ke(n,e){let t=n.resolve(e),r=t.index();return _o(t.nodeBefore,t.nodeAfter)&&t.parent.canReplace(r,r+1)}function du(n,e){e.content.size||n.type.compatibleContent(e.type);let t=n.contentMatchAt(n.childCount),{linebreakReplacement:r}=n.type.schema;for(let s=0;s<e.childCount;s++){let i=e.child(s),o=i.type==r?n.type.schema.nodes.text:i.type;if(t=t.matchType(o),!t||!n.type.allowsMarks(i.marks))return!1}return t.validEnd}function _o(n,e){return!!(n&&e&&!n.isLeaf&&du(n,e))}function _n(n,e,t=-1){let r=n.resolve(e);for(let s=r.depth;;s--){let i,o,l=r.index(s);if(s==r.depth?(i=r.nodeBefore,o=r.nodeAfter):t>0?(i=r.node(s+1),l++,o=r.node(s).maybeChild(l)):(i=r.node(s).maybeChild(l-1),o=r.node(s+1)),i&&!i.isTextblock&&_o(i,o)&&r.node(s).canReplace(l,l+1))return e;if(s==0)break;e=t<0?r.before(s):r.after(s)}}function uu(n,e,t){let r=null,{linebreakReplacement:s}=n.doc.type.schema,i=n.doc.resolve(e-t),o=i.node().type;if(s&&o.inlineContent){let d=o.whitespace=="pre",u=!!o.contentMatch.matchType(s);d&&!u?r=!1:!d&&u&&(r=!0)}let l=n.steps.length;if(r===!1){let d=n.doc.resolve(e+t);qo(n,d.node(),d.before(),l)}o.inlineContent&&bs(n,e+t-1,o,i.node().contentMatchAt(i.index()),r==null);let a=n.mapping.slice(l),c=a.map(e-t);if(n.step(new Q(c,a.map(e+t,-1),w.empty,!0)),r===!0){let d=n.doc.resolve(c);Jo(n,d.node(),d.before(),n.steps.length)}return n}function fu(n,e,t){let r=n.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),t))return e;if(r.parentOffset==0)for(let s=r.depth-1;s>=0;s--){let i=r.index(s);if(r.node(s).canReplaceWith(i,i,t))return r.before(s+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(let s=r.depth-1;s>=0;s--){let i=r.indexAfter(s);if(r.node(s).canReplaceWith(i,i,t))return r.after(s+1);if(i<r.node(s).childCount)return null}return null}function Go(n,e,t){let r=n.resolve(e);if(!t.content.size)return e;let s=t.content;for(let i=0;i<t.openStart;i++)s=s.firstChild.content;for(let i=1;i<=(t.openStart==0&&t.size?2:1);i++)for(let o=r.depth;o>=0;o--){let l=o==r.depth?0:r.pos<=(r.start(o+1)+r.end(o+1))/2?-1:1,a=r.index(o)+(l>0?1:0),c=r.node(o),d=!1;if(i==1)d=c.canReplace(a,a,s);else{let u=c.contentMatchAt(a).findWrapping(s.firstChild.type);d=u&&c.canReplaceWith(a,a,u[0])}if(d)return l==0?r.pos:l<0?r.before(o+1):r.after(o+1)}return null}function Gn(n,e,t=e,r=w.empty){if(e==t&&!r.size)return null;let s=n.resolve(e),i=n.resolve(t);return Yo(s,i,r)?new Q(e,t,r):new hu(s,i,r).fit()}function Yo(n,e,t){return!t.openStart&&!t.openEnd&&n.start()==e.start()&&n.parent.canReplace(n.index(),e.index(),t.content)}class hu{constructor(e,t,r){this.$from=e,this.$to=t,this.unplaced=r,this.frontier=[],this.placed=b.empty;for(let s=0;s<=e.depth;s++){let i=e.node(s);this.frontier.push({type:i.type,match:i.contentMatchAt(e.indexAfter(s))})}for(let s=e.depth;s>0;s--)this.placed=b.from(e.node(s).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,r=this.$from,s=this.close(e<0?this.$to:r.doc.resolve(e));if(!s)return null;let i=this.placed,o=r.depth,l=s.depth;for(;o&&l&&i.childCount==1;)i=i.firstChild.content,o--,l--;let a=new w(i,o,l);return e>-1?new Y(r.pos,e,this.$to.pos,this.$to.end(),a,t):a.size||r.pos!=this.$to.pos?new Q(r.pos,s.pos,a):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,r=0,s=this.unplaced.openEnd;r<e;r++){let i=t.firstChild;if(t.childCount>1&&(s=0),i.type.spec.isolating&&s<=r){e=r;break}t=i.content}for(let t=1;t<=2;t++)for(let r=t==1?e:this.unplaced.openStart;r>=0;r--){let s,i=null;r?(i=Ss(this.unplaced.content,r-1).firstChild,s=i.content):s=this.unplaced.content;let o=s.firstChild;for(let l=this.depth;l>=0;l--){let{type:a,match:c}=this.frontier[l],d,u=null;if(t==1&&(o?c.matchType(o.type)||(u=c.fillBefore(b.from(o),!1)):i&&a.compatibleContent(i.type)))return{sliceDepth:r,frontierDepth:l,parent:i,inject:u};if(t==2&&o&&(d=c.findWrapping(o.type)))return{sliceDepth:r,frontierDepth:l,parent:i,wrap:d};if(i&&c.matchType(i.type))break}}}openMore(){let{content:e,openStart:t,openEnd:r}=this.unplaced,s=Ss(e,t);return!s.childCount||s.firstChild.isLeaf?!1:(this.unplaced=new w(e,t+1,Math.max(r,s.size+t>=e.size-r?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:r}=this.unplaced,s=Ss(e,t);if(s.childCount<=1&&t>0){let i=e.size-t<=t+s.size;this.unplaced=new w(Zt(e,t-1,1),t-1,i?t-1:r)}else this.unplaced=new w(Zt(e,t,1),t,r)}placeNodes({sliceDepth:e,frontierDepth:t,parent:r,inject:s,wrap:i}){for(;this.depth>t;)this.closeFrontierNode();if(i)for(let m=0;m<i.length;m++)this.openFrontierNode(i[m]);let o=this.unplaced,l=r?r.content:o.content,a=o.openStart-e,c=0,d=[],{match:u,type:f}=this.frontier[t];if(s){for(let m=0;m<s.childCount;m++)d.push(s.child(m));u=u.matchFragment(s)}let h=l.size+e-(o.content.size-o.openEnd);for(;c<l.childCount;){let m=l.child(c),g=u.matchType(m.type);if(!g)break;c++,(c>1||a==0||m.content.size)&&(u=g,d.push(Xo(m.mark(f.allowedMarks(m.marks)),c==1?a:0,c==l.childCount?h:-1)))}let p=c==l.childCount;p||(h=-1),this.placed=en(this.placed,t,b.from(d)),this.frontier[t].match=u,p&&h<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,g=l;m<h;m++){let y=g.lastChild;this.frontier.push({type:y.type,match:y.contentMatchAt(y.childCount)}),g=y.content}this.unplaced=p?e==0?w.empty:new w(Zt(o.content,e-1,1),e-1,h<0?o.openEnd:e-1):new w(Zt(o.content,e,c),o.openStart,o.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],t;if(!e.type.isTextblock||!ws(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return-1;let{depth:r}=this.$to,s=this.$to.after(r);for(;r>1&&s==this.$to.end(--r);)++s;return s}findCloseLevel(e){e:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:r,type:s}=this.frontier[t],i=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),o=ws(e,t,s,r,i);if(o){for(let l=t-1;l>=0;l--){let{match:a,type:c}=this.frontier[l],d=ws(e,l,c,a,!0);if(!d||d.childCount)continue e}return{depth:t,fit:o,move:i?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=en(this.placed,t.depth,t.fit)),e=t.move;for(let r=t.depth+1;r<=e.depth;r++){let s=e.node(r),i=s.type.contentMatch.fillBefore(s.content,!0,e.index(r));this.openFrontierNode(s.type,s.attrs,i)}return e}openFrontierNode(e,t=null,r){let s=this.frontier[this.depth];s.match=s.match.matchType(e),this.placed=en(this.placed,this.depth,b.from(e.create(t,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(b.empty,!0);t.childCount&&(this.placed=en(this.placed,this.frontier.length,t))}}function Zt(n,e,t){return e==0?n.cutByIndex(t,n.childCount):n.replaceChild(0,n.firstChild.copy(Zt(n.firstChild.content,e-1,t)))}function en(n,e,t){return e==0?n.append(t):n.replaceChild(n.childCount-1,n.lastChild.copy(en(n.lastChild.content,e-1,t)))}function Ss(n,e){for(let t=0;t<e;t++)n=n.firstChild.content;return n}function Xo(n,e,t){if(e<=0)return n;let r=n.content;return e>1&&(r=r.replaceChild(0,Xo(r.firstChild,e-1,r.childCount==1?t-1:0))),e>0&&(r=n.type.contentMatch.fillBefore(r).append(r),t<=0&&(r=r.append(n.type.contentMatch.matchFragment(r).fillBefore(b.empty,!0)))),n.copy(r)}function ws(n,e,t,r,s){let i=n.node(e),o=s?n.indexAfter(e):n.index(e);if(o==i.childCount&&!t.compatibleContent(i.type))return null;let l=r.fillBefore(i.content,!0,o);return l&&!pu(t,i.content,o)?l:null}function pu(n,e,t){for(let r=t;r<e.childCount;r++)if(!n.allowsMarks(e.child(r).marks))return!0;return!1}function mu(n){return n.spec.defining||n.spec.definingForContent}function gu(n,e,t,r){if(!r.size)return n.deleteRange(e,t);let s=n.doc.resolve(e),i=n.doc.resolve(t);if(Yo(s,i,r))return n.step(new Q(e,t,r));let o=Zo(s,n.doc.resolve(t));o[o.length-1]==0&&o.pop();let l=-(s.depth+1);o.unshift(l);for(let f=s.depth,h=s.pos-1;f>0;f--,h--){let p=s.node(f).type.spec;if(p.defining||p.definingAsContext||p.isolating)break;o.indexOf(f)>-1?l=f:s.before(f)==h&&o.splice(1,0,-f)}let a=o.indexOf(l),c=[],d=r.openStart;for(let f=r.content,h=0;;h++){let p=f.firstChild;if(c.push(p),h==r.openStart)break;f=p.content}for(let f=d-1;f>=0;f--){let h=c[f],p=mu(h.type);if(p&&!h.sameMarkup(s.node(Math.abs(l)-1)))d=f;else if(p||!h.type.isTextblock)break}for(let f=r.openStart;f>=0;f--){let h=(f+d+1)%(r.openStart+1),p=c[h];if(p)for(let m=0;m<o.length;m++){let g=o[(m+a)%o.length],y=!0;g<0&&(y=!1,g=-g);let k=s.node(g-1),A=s.index(g-1);if(k.canReplaceWith(A,A,p.type,p.marks))return n.replace(s.before(g),y?i.after(g):t,new w(Qo(r.content,0,r.openStart,h),h,r.openEnd))}}let u=n.steps.length;for(let f=o.length-1;f>=0&&(n.replace(e,t,r),!(n.steps.length>u));f--){let h=o[f];h<0||(e=s.before(h),t=i.after(h))}}function Qo(n,e,t,r,s){if(e<t){let i=n.firstChild;n=n.replaceChild(0,i.copy(Qo(i.content,e+1,t,r,i)))}if(e>r){let i=s.contentMatchAt(0),o=i.fillBefore(n).append(n);n=o.append(i.matchFragment(o).fillBefore(b.empty,!0))}return n}function yu(n,e,t,r){if(!r.isInline&&e==t&&n.doc.resolve(e).parent.content.size){let s=fu(n.doc,e,r.type);s!=null&&(e=t=s)}n.replaceRange(e,t,new w(b.from(r),0,0))}function bu(n,e,t){let r=n.doc.resolve(e),s=n.doc.resolve(t),i=Zo(r,s);for(let o=0;o<i.length;o++){let l=i[o],a=o==i.length-1;if(a&&l==0||r.node(l).type.contentMatch.validEnd)return n.delete(r.start(l),s.end(l));if(l>0&&(a||r.node(l-1).canReplace(r.index(l-1),s.indexAfter(l-1))))return n.delete(r.before(l),s.after(l))}for(let o=1;o<=r.depth&&o<=s.depth;o++)if(e-r.start(o)==r.depth-o&&t>r.end(o)&&s.end(o)-t!=s.depth-o&&r.start(o-1)==s.start(o-1)&&r.node(o-1).canReplace(r.index(o-1),s.index(o-1)))return n.delete(r.before(o),t);n.delete(e,t)}function Zo(n,e){let t=[],r=Math.min(n.depth,e.depth);for(let s=r;s>=0;s--){let i=n.start(s);if(i<n.pos-(n.depth-s)||e.end(s)>e.pos+(e.depth-s)||n.node(s).type.spec.isolating||e.node(s).type.spec.isolating)break;(i==e.start(s)||s==n.depth&&s==e.depth&&n.parent.inlineContent&&e.parent.inlineContent&&s&&e.start(s-1)==i-1)&&t.push(s)}return t}class _t extends ne{constructor(e,t,r){super(),this.pos=e,this.attr=t,this.value=r}apply(e){let t=e.nodeAt(this.pos);if(!t)return J.fail("No node at attribute step's position");let r=Object.create(null);for(let i in t.attrs)r[i]=t.attrs[i];r[this.attr]=this.value;let s=t.type.create(r,null,t.marks);return J.fromReplace(e,this.pos,this.pos+1,new w(b.from(s),0,t.isLeaf?0:1))}getMap(){return pe.empty}invert(e){return new _t(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new _t(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.pos!="number"||typeof t.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new _t(t.pos,t.attr,t.value)}}ne.jsonID("attr",_t);class zn extends ne{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let s in e.attrs)t[s]=e.attrs[s];t[this.attr]=this.value;let r=e.type.create(t,e.content,e.marks);return J.ok(r)}getMap(){return pe.empty}invert(e){return new zn(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new zn(t.attr,t.value)}}ne.jsonID("docAttr",zn);let Nt=class extends Error{};Nt=function n(e){let t=Error.call(this,e);return t.__proto__=n.prototype,t},Nt.prototype=Object.create(Error.prototype),Nt.prototype.constructor=Nt,Nt.prototype.name="TransformError";class Cs{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Jt}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new Nt(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,r=w.empty){let s=Gn(this.doc,e,t,r);return s&&this.step(s),this}replaceWith(e,t,r){return this.replace(e,t,new w(b.from(r),0,0))}delete(e,t){return this.replace(e,t,w.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,r){return gu(this,e,t,r),this}replaceRangeWith(e,t,r){return yu(this,e,t,r),this}deleteRange(e,t){return bu(this,e,t),this}lift(e,t){return nu(this,e,t),this}join(e,t=1){return uu(this,e,t),this}wrap(e,t){return iu(this,e,t),this}setBlockType(e,t=e,r,s=null){return ou(this,e,t,r,s),this}setNodeMarkup(e,t,r=null,s){return au(this,e,t,r,s),this}setNodeAttribute(e,t,r){return this.step(new _t(e,t,r)),this}setDocAttribute(e,t){return this.step(new zn(e,t)),this}addNodeMark(e,t){return this.step(new at(e,t)),this}removeNodeMark(e,t){if(!(t instanceof B)){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(t=t.isInSet(r.marks),!t)return this}return this.step(new qt(e,t)),this}split(e,t=1,r){return cu(this,e,t,r),this}addMark(e,t,r){return Zd(this,e,t,r),this}removeMark(e,t,r){return eu(this,e,t,r),this}clearIncompatible(e,t,r){return bs(this,e,t,r),this}}const xs=Object.create(null);class E{constructor(e,t,r){this.$anchor=e,this.$head=t,this.ranges=r||[new el(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=w.empty){let r=t.content.lastChild,s=null;for(let l=0;l<t.openEnd;l++)s=r,r=r.lastChild;let i=e.steps.length,o=this.ranges;for(let l=0;l<o.length;l++){let{$from:a,$to:c}=o[l],d=e.mapping.slice(i);e.replaceRange(d.map(a.pos),d.map(c.pos),l?w.empty:t),l==0&&rl(e,i,(r?r.isInline:s&&s.isTextblock)?-1:1)}}replaceWith(e,t){let r=e.steps.length,s=this.ranges;for(let i=0;i<s.length;i++){let{$from:o,$to:l}=s[i],a=e.mapping.slice(r),c=a.map(o.pos),d=a.map(l.pos);i?e.deleteRange(c,d):(e.replaceRangeWith(c,d,t),rl(e,r,t.isInline?-1:1))}}static findFrom(e,t,r=!1){let s=e.parent.inlineContent?new T(e):vt(e.node(0),e.parent,e.pos,e.index(),t,r);if(s)return s;for(let i=e.depth-1;i>=0;i--){let o=t<0?vt(e.node(0),e.node(i),e.before(i+1),e.index(i),t,r):vt(e.node(0),e.node(i),e.after(i+1),e.index(i)+1,t,r);if(o)return o}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new he(e.node(0))}static atStart(e){return vt(e,e,0,0,1)||new he(e)}static atEnd(e){return vt(e,e,e.content.size,e.childCount,-1)||new he(e)}static fromJSON(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=xs[t.type];if(!r)throw new RangeError(`No selection type ${t.type} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in xs)throw new RangeError("Duplicate use of selection JSON ID "+e);return xs[e]=t,t.prototype.jsonID=e,t}getBookmark(){return T.between(this.$anchor,this.$head).getBookmark()}}E.prototype.visible=!0;class el{constructor(e,t){this.$from=e,this.$to=t}}let tl=!1;function nl(n){!tl&&!n.parent.inlineContent&&(tl=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+n.parent.type.name+")"))}class T extends E{constructor(e,t=e){nl(e),nl(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let r=e.resolve(t.map(this.head));if(!r.parent.inlineContent)return E.near(r);let s=e.resolve(t.map(this.anchor));return new T(s.parent.inlineContent?s:r,r)}replace(e,t=w.empty){if(super.replace(e,t),t==w.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof T&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new is(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if(typeof t.anchor!="number"||typeof t.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new T(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,r=t){let s=e.resolve(t);return new this(s,r==t?s:e.resolve(r))}static between(e,t,r){let s=e.pos-t.pos;if((!r||s)&&(r=s>=0?1:-1),!t.parent.inlineContent){let i=E.findFrom(t,r,!0)||E.findFrom(t,-r,!0);if(i)t=i.$head;else return E.near(t,r)}return e.parent.inlineContent||(s==0?e=t:(e=(E.findFrom(e,-r,!0)||E.findFrom(e,r,!0)).$anchor,e.pos<t.pos!=s<0&&(e=t))),new T(e,t)}}E.jsonID("text",T);class is{constructor(e,t){this.anchor=e,this.head=t}map(e){return new is(e.map(this.anchor),e.map(this.head))}resolve(e){return T.between(e.resolve(this.anchor),e.resolve(this.head))}}class x extends E{constructor(e){let t=e.nodeAfter,r=e.node(0).resolve(e.pos+t.nodeSize);super(e,r),this.node=t}map(e,t){let{deleted:r,pos:s}=t.mapResult(this.anchor),i=e.resolve(s);return r?E.near(i):new x(i)}content(){return new w(b.from(this.node),0,0)}eq(e){return e instanceof x&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new oo(this.anchor)}static fromJSON(e,t){if(typeof t.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new x(e.resolve(t.anchor))}static create(e,t){return new x(e.resolve(t))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}x.prototype.visible=!1,E.jsonID("node",x);class oo{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:r}=e.mapResult(this.anchor);return t?new is(r,r):new oo(r)}resolve(e){let t=e.resolve(this.anchor),r=t.nodeAfter;return r&&x.isSelectable(r)?new x(t):E.near(t)}}class he extends E{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=w.empty){if(t==w.empty){e.delete(0,e.doc.content.size);let r=E.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new he(e)}map(e){return new he(e)}eq(e){return e instanceof he}getBookmark(){return ku}}E.jsonID("all",he);const ku={map(){return this},resolve(n){return new he(n)}};function vt(n,e,t,r,s,i=!1){if(e.inlineContent)return T.create(n,t);for(let o=r-(s>0?0:1);s>0?o<e.childCount:o>=0;o+=s){let l=e.child(o);if(l.isAtom){if(!i&&x.isSelectable(l))return x.create(n,t-(s<0?l.nodeSize:0))}else{let a=vt(n,l,t+s,s<0?l.childCount:0,s,i);if(a)return a}t+=l.nodeSize*s}return null}function rl(n,e,t){let r=n.steps.length-1;if(r<e)return;let s=n.steps[r];if(!(s instanceof Q||s instanceof Y))return;let i=n.mapping.maps[r],o;i.forEach((l,a,c,d)=>{o==null&&(o=d)}),n.setSelection(E.near(n.doc.resolve(o),t))}const sl=1,il=2,ol=4;class Su extends Cs{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|sl)&-3,this.storedMarks=null,this}get selectionSet(){return(this.updated&sl)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=il,this}ensureMarks(e){return B.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&il)>0}addStep(e,t){super.addStep(e,t),this.updated=this.updated&-3,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let r=this.selection;return t&&(e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||B.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,r){let s=this.doc.type.schema;if(t==null)return e?this.replaceSelectionWith(s.text(e),!0):this.deleteSelection();{if(r==null&&(r=t),r=r??t,!e)return this.deleteRange(t,r);let i=this.storedMarks;if(!i){let o=this.doc.resolve(t);i=r==t?o.marks():o.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(t,r,s.text(e,i)),this.selection.empty||this.setSelection(E.near(this.selection.$to)),this}}setMeta(e,t){return this.meta[typeof e=="string"?e:e.key]=t,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=ol,this}get scrolledIntoView(){return(this.updated&ol)>0}}function ll(n,e){return!e||!n?n:n.bind(e)}class tn{constructor(e,t,r){this.name=e,this.init=ll(t.init,r),this.apply=ll(t.apply,r)}}const wu=[new tn("doc",{init(n){return n.doc||n.schema.topNodeType.createAndFill()},apply(n){return n.doc}}),new tn("selection",{init(n,e){return n.selection||E.atStart(e.doc)},apply(n){return n.selection}}),new tn("storedMarks",{init(n){return n.storedMarks||null},apply(n,e,t,r){return r.selection.$cursor?n.storedMarks:null}}),new tn("scrollToSelection",{init(){return 0},apply(n,e){return n.scrolledIntoView?e+1:e}})];class Ms{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=wu.slice(),t&&t.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new tn(r.key,r.spec.state,r))})}}class Ut{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=t){let s=this.config.plugins[r];if(s.spec.filterTransaction&&!s.spec.filterTransaction.call(s,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let t=[e],r=this.applyInner(e),s=null;for(;;){let i=!1;for(let o=0;o<this.config.plugins.length;o++){let l=this.config.plugins[o];if(l.spec.appendTransaction){let a=s?s[o].n:0,c=s?s[o].state:this,d=a<t.length&&l.spec.appendTransaction.call(l,a?t.slice(a):t,c,r);if(d&&r.filterTransaction(d,o)){if(d.setMeta("appendedTransaction",e),!s){s=[];for(let u=0;u<this.config.plugins.length;u++)s.push(u<o?{state:r,n:t.length}:{state:this,n:0})}t.push(d),r=r.applyInner(d),i=!0}s&&(s[o]={state:r,n:t.length})}}if(!i)return{state:r,transactions:t}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let t=new Ut(this.config),r=this.config.fields;for(let s=0;s<r.length;s++){let i=r[s];t[i.name]=i.apply(e,this[i.name],this,t)}return t}get tr(){return new Su(this)}static create(e){let t=new Ms(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new Ut(t);for(let s=0;s<t.fields.length;s++)r[t.fields[s].name]=t.fields[s].init(e,r);return r}reconfigure(e){let t=new Ms(this.schema,e.plugins),r=t.fields,s=new Ut(t);for(let i=0;i<r.length;i++){let o=r[i].name;s[o]=this.hasOwnProperty(o)?this[o]:r[i].init(e,s)}return s}toJSON(e){let t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map(r=>r.toJSON())),e&&typeof e=="object")for(let r in e){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let s=e[r],i=s.spec.state;i&&i.toJSON&&(t[r]=i.toJSON.call(s,this[s.key]))}return t}static fromJSON(e,t,r){if(!t)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let s=new Ms(e.schema,e.plugins),i=new Ut(s);return s.fields.forEach(o=>{if(o.name=="doc")i.doc=Me.fromJSON(e.schema,t.doc);else if(o.name=="selection")i.selection=E.fromJSON(i.doc,t.selection);else if(o.name=="storedMarks")t.storedMarks&&(i.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let l in r){let a=r[l],c=a.spec.state;if(a.key==o.name&&c&&c.fromJSON&&Object.prototype.hasOwnProperty.call(t,l)){i[o.name]=c.fromJSON.call(a,e,t[l],i);return}}i[o.name]=o.init(e,i)}}),i}}function al(n,e,t){for(let r in n){let s=n[r];s instanceof Function?s=s.bind(e):r=="handleDOMEvents"&&(s=al(s,e,{})),t[r]=s}return t}class V{constructor(e){this.spec=e,this.props={},e.props&&al(e.props,this,this.props),this.key=e.key?e.key.key:cl("plugin")}getState(e){return e[this.key]}}const Ts=Object.create(null);function cl(n){return n in Ts?n+"$"+ ++Ts[n]:(Ts[n]=0,n+"$")}class _{constructor(e="key"){this.key=cl(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const ee=function(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e},nn=function(n){let e=n.assignedSlot||n.parentNode;return e&&e.nodeType==11?e.host:e};let As=null;const Le=function(n,e,t){let r=As||(As=document.createRange());return r.setEnd(n,t??n.nodeValue.length),r.setStart(n,e||0),r},Cu=function(){As=null},ft=function(n,e,t,r){return t&&(dl(n,e,t,r,-1)||dl(n,e,t,r,1))},xu=/^(img|br|input|textarea|hr)$/i;function dl(n,e,t,r,s){for(;;){if(n==t&&e==r)return!0;if(e==(s<0?0:ge(n))){let i=n.parentNode;if(!i||i.nodeType!=1||rn(n)||xu.test(n.nodeName)||n.contentEditable=="false")return!1;e=ee(n)+(s<0?0:1),n=i}else if(n.nodeType==1){if(n=n.childNodes[e+(s<0?-1:0)],n.contentEditable=="false")return!1;e=s<0?ge(n):0}else return!1}}function ge(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function Mu(n,e){for(;;){if(n.nodeType==3&&e)return n;if(n.nodeType==1&&e>0){if(n.contentEditable=="false")return null;n=n.childNodes[e-1],e=ge(n)}else if(n.parentNode&&!rn(n))e=ee(n),n=n.parentNode;else return null}}function Tu(n,e){for(;;){if(n.nodeType==3&&e<n.nodeValue.length)return n;if(n.nodeType==1&&e<n.childNodes.length){if(n.contentEditable=="false")return null;n=n.childNodes[e],e=0}else if(n.parentNode&&!rn(n))e=ee(n)+1,n=n.parentNode;else return null}}function Au(n,e,t){for(let r=e==0,s=e==ge(n);r||s;){if(n==t)return!0;let i=ee(n);if(n=n.parentNode,!n)return!1;r=r&&i==0,s=s&&i==ge(n)}}function rn(n){let e;for(let t=n;t&&!(e=t.pmViewDesc);t=t.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==n||e.contentDOM==n)}const Yn=function(n){return n.focusNode&&ft(n.focusNode,n.focusOffset,n.anchorNode,n.anchorOffset)};function ht(n,e){let t=document.createEvent("Event");return t.initEvent("keydown",!0,!0),t.keyCode=n,t.key=t.code=e,t}function Eu(n){let e=n.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function Ou(n,e,t){if(n.caretPositionFromPoint)try{let r=n.caretPositionFromPoint(e,t);if(r)return{node:r.offsetNode,offset:Math.min(ge(r.offsetNode),r.offset)}}catch{}if(n.caretRangeFromPoint){let r=n.caretRangeFromPoint(e,t);if(r)return{node:r.startContainer,offset:Math.min(ge(r.startContainer),r.startOffset)}}}const Te=typeof navigator<"u"?navigator:null,ul=typeof document<"u"?document:null,Ue=Te&&Te.userAgent||"",Es=/Edge\/(\d+)/.exec(Ue),fl=/MSIE \d/.exec(Ue),Os=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ue),de=!!(fl||Os||Es),Je=fl?document.documentMode:Os?+Os[1]:Es?+Es[1]:0,we=!de&&/gecko\/(\d+)/i.test(Ue);we&&+(/Firefox\/(\d+)/.exec(Ue)||[0,0])[1];const Ns=!de&&/Chrome\/(\d+)/.exec(Ue),re=!!Ns,hl=Ns?+Ns[1]:0,oe=!de&&!!Te&&/Apple Computer/.test(Te.vendor),Rt=oe&&(/Mobile\/\w+/.test(Ue)||!!Te&&Te.maxTouchPoints>2),ye=Rt||(Te?/Mac/.test(Te.platform):!1),Nu=Te?/Win/.test(Te.platform):!1,Pe=/Android \d/.test(Ue),sn=!!ul&&"webkitFontSmoothing"in ul.documentElement.style,vu=sn?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function Ru(n){let e=n.defaultView&&n.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:n.documentElement.clientWidth,top:0,bottom:n.documentElement.clientHeight}}function Be(n,e){return typeof n=="number"?n:n[e]}function Du(n){let e=n.getBoundingClientRect(),t=e.width/n.offsetWidth||1,r=e.height/n.offsetHeight||1;return{left:e.left,right:e.left+n.clientWidth*t,top:e.top,bottom:e.top+n.clientHeight*r}}function pl(n,e,t){let r=n.someProp("scrollThreshold")||0,s=n.someProp("scrollMargin")||5,i=n.dom.ownerDocument;for(let o=t||n.dom;o;o=nn(o)){if(o.nodeType!=1)continue;let l=o,a=l==i.body,c=a?Ru(i):Du(l),d=0,u=0;if(e.top<c.top+Be(r,"top")?u=-(c.top-e.top+Be(s,"top")):e.bottom>c.bottom-Be(r,"bottom")&&(u=e.bottom-e.top>c.bottom-c.top?e.top+Be(s,"top")-c.top:e.bottom-c.bottom+Be(s,"bottom")),e.left<c.left+Be(r,"left")?d=-(c.left-e.left+Be(s,"left")):e.right>c.right-Be(r,"right")&&(d=e.right-c.right+Be(s,"right")),d||u)if(a)i.defaultView.scrollBy(d,u);else{let f=l.scrollLeft,h=l.scrollTop;u&&(l.scrollTop+=u),d&&(l.scrollLeft+=d);let p=l.scrollLeft-f,m=l.scrollTop-h;e={left:e.left-p,top:e.top-m,right:e.right-p,bottom:e.bottom-m}}if(a||/^(fixed|sticky)$/.test(getComputedStyle(o).position))break}}function Iu(n){let e=n.dom.getBoundingClientRect(),t=Math.max(0,e.top),r,s;for(let i=(e.left+e.right)/2,o=t+1;o<Math.min(innerHeight,e.bottom);o+=5){let l=n.root.elementFromPoint(i,o);if(!l||l==n.dom||!n.dom.contains(l))continue;let a=l.getBoundingClientRect();if(a.top>=t-20){r=l,s=a.top;break}}return{refDOM:r,refTop:s,stack:ml(n.dom)}}function ml(n){let e=[],t=n.ownerDocument;for(let r=n;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),n!=t);r=nn(r));return e}function Lu({refDOM:n,refTop:e,stack:t}){let r=n?n.getBoundingClientRect().top:0;gl(t,r==0?0:r-e)}function gl(n,e){for(let t=0;t<n.length;t++){let{dom:r,top:s,left:i}=n[t];r.scrollTop!=s+e&&(r.scrollTop=s+e),r.scrollLeft!=i&&(r.scrollLeft=i)}}let Dt=null;function Pu(n){if(n.setActive)return n.setActive();if(Dt)return n.focus(Dt);let e=ml(n);n.focus(Dt==null?{get preventScroll(){return Dt={preventScroll:!0},!0}}:void 0),Dt||(Dt=!1,gl(e,0))}function yl(n,e){let t,r=2e8,s,i=0,o=e.top,l=e.top,a,c;for(let d=n.firstChild,u=0;d;d=d.nextSibling,u++){let f;if(d.nodeType==1)f=d.getClientRects();else if(d.nodeType==3)f=Le(d).getClientRects();else continue;for(let h=0;h<f.length;h++){let p=f[h];if(p.top<=o&&p.bottom>=l){o=Math.max(p.bottom,o),l=Math.min(p.top,l);let m=p.left>e.left?p.left-e.left:p.right<e.left?e.left-p.right:0;if(m<r){t=d,r=m,s=m&&t.nodeType==3?{left:p.right<e.left?p.right:p.left,top:e.top}:e,d.nodeType==1&&m&&(i=u+(e.left>=(p.left+p.right)/2?1:0));continue}}else p.top>e.top&&!a&&p.left<=e.left&&p.right>=e.left&&(a=d,c={left:Math.max(p.left,Math.min(p.right,e.left)),top:p.top});!t&&(e.left>=p.right&&e.top>=p.top||e.left>=p.left&&e.top>=p.bottom)&&(i=u+1)}}return!t&&a&&(t=a,s=c,r=0),t&&t.nodeType==3?Bu(t,s):!t||r&&t.nodeType==1?{node:n,offset:i}:yl(t,s)}function Bu(n,e){let t=n.nodeValue.length,r=document.createRange();for(let s=0;s<t;s++){r.setEnd(n,s+1),r.setStart(n,s);let i=qe(r,1);if(i.top!=i.bottom&&vs(e,i))return{node:n,offset:s+(e.left>=(i.left+i.right)/2?1:0)}}return{node:n,offset:0}}function vs(n,e){return n.left>=e.left-1&&n.left<=e.right+1&&n.top>=e.top-1&&n.top<=e.bottom+1}function zu(n,e){let t=n.parentNode;return t&&/^li$/i.test(t.nodeName)&&e.left<n.getBoundingClientRect().left?t:n}function Hu(n,e,t){let{node:r,offset:s}=yl(e,t),i=-1;if(r.nodeType==1&&!r.firstChild){let o=r.getBoundingClientRect();i=o.left!=o.right&&t.left>(o.left+o.right)/2?1:-1}return n.docView.posFromDOM(r,s,i)}function Fu(n,e,t,r){let s=-1;for(let i=e,o=!1;i!=n.dom;){let l=n.docView.nearestDesc(i,!0),a;if(!l)return null;if(l.dom.nodeType==1&&(l.node.isBlock&&l.parent||!l.contentDOM)&&((a=l.dom.getBoundingClientRect()).width||a.height)&&(l.node.isBlock&&l.parent&&(!o&&a.left>r.left||a.top>r.top?s=l.posBefore:(!o&&a.right<r.left||a.bottom<r.top)&&(s=l.posAfter),o=!0),!l.contentDOM&&s<0&&!l.node.isText))return(l.node.isBlock?r.top<(a.top+a.bottom)/2:r.left<(a.left+a.right)/2)?l.posBefore:l.posAfter;i=l.dom.parentNode}return s>-1?s:n.docView.posFromDOM(e,t,-1)}function bl(n,e,t){let r=n.childNodes.length;if(r&&t.top<t.bottom)for(let s=Math.max(0,Math.min(r-1,Math.floor(r*(e.top-t.top)/(t.bottom-t.top))-2)),i=s;;){let o=n.childNodes[i];if(o.nodeType==1){let l=o.getClientRects();for(let a=0;a<l.length;a++){let c=l[a];if(vs(e,c))return bl(o,e,c)}}if((i=(i+1)%r)==s)break}return n}function $u(n,e){let t=n.dom.ownerDocument,r,s=0,i=Ou(t,e.left,e.top);i&&({node:r,offset:s}=i);let o=(n.root.elementFromPoint?n.root:t).elementFromPoint(e.left,e.top),l;if(!o||!n.dom.contains(o.nodeType!=1?o.parentNode:o)){let c=n.dom.getBoundingClientRect();if(!vs(e,c)||(o=bl(n.dom,e,c),!o))return null}if(oe)for(let c=o;r&&c;c=nn(c))c.draggable&&(r=void 0);if(o=zu(o,e),r){if(we&&r.nodeType==1&&(s=Math.min(s,r.childNodes.length),s<r.childNodes.length)){let d=r.childNodes[s],u;d.nodeName=="IMG"&&(u=d.getBoundingClientRect()).right<=e.left&&u.bottom>e.top&&s++}let c;sn&&s&&r.nodeType==1&&(c=r.childNodes[s-1]).nodeType==1&&c.contentEditable=="false"&&c.getBoundingClientRect().top>=e.top&&s--,r==n.dom&&s==r.childNodes.length-1&&r.lastChild.nodeType==1&&e.top>r.lastChild.getBoundingClientRect().bottom?l=n.state.doc.content.size:(s==0||r.nodeType!=1||r.childNodes[s-1].nodeName!="BR")&&(l=Fu(n,r,s,e))}l==null&&(l=Hu(n,o,e));let a=n.docView.nearestDesc(o,!0);return{pos:l,inside:a?a.posAtStart-a.border:-1}}function kl(n){return n.top<n.bottom||n.left<n.right}function qe(n,e){let t=n.getClientRects();if(t.length){let r=t[e<0?0:t.length-1];if(kl(r))return r}return Array.prototype.find.call(t,kl)||n.getBoundingClientRect()}const Vu=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Sl(n,e,t){let{node:r,offset:s,atom:i}=n.docView.domFromPos(e,t<0?-1:1),o=sn||we;if(r.nodeType==3)if(o&&(Vu.test(r.nodeValue)||(t<0?!s:s==r.nodeValue.length))){let a=qe(Le(r,s,s),t);if(we&&s&&/\s/.test(r.nodeValue[s-1])&&s<r.nodeValue.length){let c=qe(Le(r,s-1,s-1),-1);if(c.top==a.top){let d=qe(Le(r,s,s+1),-1);if(d.top!=a.top)return on(d,d.left<c.left)}}return a}else{let a=s,c=s,d=t<0?1:-1;return t<0&&!s?(c++,d=-1):t>=0&&s==r.nodeValue.length?(a--,d=1):t<0?a--:c++,on(qe(Le(r,a,c),d),d<0)}if(!n.state.doc.resolve(e-(i||0)).parent.inlineContent){if(i==null&&s&&(t<0||s==ge(r))){let a=r.childNodes[s-1];if(a.nodeType==1)return Rs(a.getBoundingClientRect(),!1)}if(i==null&&s<ge(r)){let a=r.childNodes[s];if(a.nodeType==1)return Rs(a.getBoundingClientRect(),!0)}return Rs(r.getBoundingClientRect(),t>=0)}if(i==null&&s&&(t<0||s==ge(r))){let a=r.childNodes[s-1],c=a.nodeType==3?Le(a,ge(a)-(o?0:1)):a.nodeType==1&&(a.nodeName!="BR"||!a.nextSibling)?a:null;if(c)return on(qe(c,1),!1)}if(i==null&&s<ge(r)){let a=r.childNodes[s];for(;a.pmViewDesc&&a.pmViewDesc.ignoreForCoords;)a=a.nextSibling;let c=a?a.nodeType==3?Le(a,0,o?0:1):a.nodeType==1?a:null:null;if(c)return on(qe(c,-1),!0)}return on(qe(r.nodeType==3?Le(r):r,-t),t>=0)}function on(n,e){if(n.width==0)return n;let t=e?n.left:n.right;return{top:n.top,bottom:n.bottom,left:t,right:t}}function Rs(n,e){if(n.height==0)return n;let t=e?n.top:n.bottom;return{top:t,bottom:t,left:n.left,right:n.right}}function wl(n,e,t){let r=n.state,s=n.root.activeElement;r!=e&&n.updateState(e),s!=n.dom&&n.focus();try{return t()}finally{r!=e&&n.updateState(r),s!=n.dom&&s&&s.focus()}}function Wu(n,e,t){let r=e.selection,s=t=="up"?r.$from:r.$to;return wl(n,e,()=>{let{node:i}=n.docView.domFromPos(s.pos,t=="up"?-1:1);for(;;){let l=n.docView.nearestDesc(i,!0);if(!l)break;if(l.node.isBlock){i=l.contentDOM||l.dom;break}i=l.dom.parentNode}let o=Sl(n,s.pos,1);for(let l=i.firstChild;l;l=l.nextSibling){let a;if(l.nodeType==1)a=l.getClientRects();else if(l.nodeType==3)a=Le(l,0,l.nodeValue.length).getClientRects();else continue;for(let c=0;c<a.length;c++){let d=a[c];if(d.bottom>d.top+1&&(t=="up"?o.top-d.top>(d.bottom-o.top)*2:d.bottom-o.bottom>(o.bottom-d.top)*2))return!1}}return!0})}const ju=/[\u0590-\u08ac]/;function Ku(n,e,t){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let s=r.parentOffset,i=!s,o=s==r.parent.content.size,l=n.domSelection();return l?!ju.test(r.parent.textContent)||!l.modify?t=="left"||t=="backward"?i:o:wl(n,e,()=>{let{focusNode:a,focusOffset:c,anchorNode:d,anchorOffset:u}=n.domSelectionRange(),f=l.caretBidiLevel;l.modify("move",t,"character");let h=r.depth?n.docView.domAfterPos(r.before()):n.dom,{focusNode:p,focusOffset:m}=n.domSelectionRange(),g=p&&!h.contains(p.nodeType==1?p:p.parentNode)||a==p&&c==m;try{l.collapse(d,u),a&&(a!=d||c!=u)&&l.extend&&l.extend(a,c)}catch{}return f!=null&&(l.caretBidiLevel=f),g}):r.pos==r.start()||r.pos==r.end()}let Cl=null,xl=null,Ml=!1;function Uu(n,e,t){return Cl==e&&xl==t?Ml:(Cl=e,xl=t,Ml=t=="up"||t=="down"?Wu(n,e,t):Ku(n,e,t))}const be=0,Tl=1,pt=2,Ae=3;class ln{constructor(e,t,r,s){this.parent=e,this.children=t,this.dom=r,this.contentDOM=s,this.dirty=be,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,r){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;t<this.children.length;t++)e+=this.children[t].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let t=0,r=this.posAtStart;;t++){let s=this.children[t];if(s==e)return r;r+=s.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,t,r){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(r<0){let i,o;if(e==this.contentDOM)i=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.previousSibling}for(;i&&!((o=i.pmViewDesc)&&o.parent==this);)i=i.previousSibling;return i?this.posBeforeChild(o)+o.size:this.posAtStart}else{let i,o;if(e==this.contentDOM)i=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.nextSibling}for(;i&&!((o=i.pmViewDesc)&&o.parent==this);)i=i.nextSibling;return i?this.posBeforeChild(o):this.posAtEnd}let s;if(e==this.dom&&this.contentDOM)s=t>ee(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))s=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(t==0)for(let i=e;;i=i.parentNode){if(i==this.dom){s=!1;break}if(i.previousSibling)break}if(s==null&&t==e.childNodes.length)for(let i=e;;i=i.parentNode){if(i==this.dom){s=!0;break}if(i.nextSibling)break}}return s??r>0?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let r=!0,s=e;s;s=s.parentNode){let i=this.getDesc(s),o;if(i&&(!t||i.node))if(r&&(o=i.nodeDOM)&&!(o.nodeType==1?o.contains(e.nodeType==1?e:e.parentNode):o==e))r=!1;else return i}}getDesc(e){let t=e.pmViewDesc;for(let r=t;r;r=r.parent)if(r==this)return t}posFromDOM(e,t,r){for(let s=e;s;s=s.parentNode){let i=this.getDesc(s);if(i)return i.localPosFromDOM(e,t,r)}return-1}descAt(e){for(let t=0,r=0;t<this.children.length;t++){let s=this.children[t],i=r+s.size;if(r==e&&i!=r){for(;!s.border&&s.children.length;)for(let o=0;o<s.children.length;o++){let l=s.children[o];if(l.size){s=l;break}}return s}if(e<i)return s.descAt(e-r-s.border);r=i}}domFromPos(e,t){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let r=0,s=0;for(let i=0;r<this.children.length;r++){let o=this.children[r],l=i+o.size;if(l>e||o instanceof Ol){s=e-i;break}i=l}if(s)return this.children[r].domFromPos(s-this.children[r].border,t);for(let i;r&&!(i=this.children[r-1]).size&&i instanceof Al&&i.side>=0;r--);if(t<=0){let i,o=!0;for(;i=r?this.children[r-1]:null,!(!i||i.dom.parentNode==this.contentDOM);r--,o=!1);return i&&t&&o&&!i.border&&!i.domAtom?i.domFromPos(i.size,t):{node:this.contentDOM,offset:i?ee(i.dom)+1:0}}else{let i,o=!0;for(;i=r<this.children.length?this.children[r]:null,!(!i||i.dom.parentNode==this.contentDOM);r++,o=!1);return i&&o&&!i.border&&!i.domAtom?i.domFromPos(0,t):{node:this.contentDOM,offset:i?ee(i.dom):this.contentDOM.childNodes.length}}}parseRange(e,t,r=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let s=-1,i=-1;for(let o=r,l=0;;l++){let a=this.children[l],c=o+a.size;if(s==-1&&e<=c){let d=o+a.border;if(e>=d&&t<=c-a.border&&a.node&&a.contentDOM&&this.contentDOM.contains(a.contentDOM))return a.parseRange(e,t,d);e=o;for(let u=l;u>0;u--){let f=this.children[u-1];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(1)){s=ee(f.dom)+1;break}e-=f.size}s==-1&&(s=0)}if(s>-1&&(c>t||l==this.children.length-1)){t=c;for(let d=l+1;d<this.children.length;d++){let u=this.children[d];if(u.size&&u.dom.parentNode==this.contentDOM&&!u.emptyChildAt(-1)){i=ee(u.dom);break}t+=u.size}i==-1&&(i=this.contentDOM.childNodes.length);break}o=c}return{node:this.contentDOM,from:e,to:t,fromOffset:s,toOffset:i}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let t=this.children[e<0?0:this.children.length-1];return t.size==0||t.emptyChildAt(e)}domAfterPos(e){let{node:t,offset:r}=this.domFromPos(e,0);if(t.nodeType!=1||r==t.childNodes.length)throw new RangeError("No node after pos "+e);return t.childNodes[r]}setSelection(e,t,r,s=!1){let i=Math.min(e,t),o=Math.max(e,t);for(let h=0,p=0;h<this.children.length;h++){let m=this.children[h],g=p+m.size;if(i>p&&o<g)return m.setSelection(e-p-m.border,t-p-m.border,r,s);p=g}let l=this.domFromPos(e,e?-1:1),a=t==e?l:this.domFromPos(t,t?-1:1),c=r.root.getSelection(),d=r.domSelectionRange(),u=!1;if((we||oe)&&e==t){let{node:h,offset:p}=l;if(h.nodeType==3){if(u=!!(p&&h.nodeValue[p-1]==`
6
+ `),u&&p==h.nodeValue.length)for(let m=h,g;m;m=m.parentNode){if(g=m.nextSibling){g.nodeName=="BR"&&(l=a={node:g.parentNode,offset:ee(g)+1});break}let y=m.pmViewDesc;if(y&&y.node&&y.node.isBlock)break}}else{let m=h.childNodes[p-1];u=m&&(m.nodeName=="BR"||m.contentEditable=="false")}}if(we&&d.focusNode&&d.focusNode!=a.node&&d.focusNode.nodeType==1){let h=d.focusNode.childNodes[d.focusOffset];h&&h.contentEditable=="false"&&(s=!0)}if(!(s||u&&oe)&&ft(l.node,l.offset,d.anchorNode,d.anchorOffset)&&ft(a.node,a.offset,d.focusNode,d.focusOffset))return;let f=!1;if((c.extend||e==t)&&!u){c.collapse(l.node,l.offset);try{e!=t&&c.extend(a.node,a.offset),f=!0}catch{}}if(!f){if(e>t){let p=l;l=a,a=p}let h=document.createRange();h.setEnd(a.node,a.offset),h.setStart(l.node,l.offset),c.removeAllRanges(),c.addRange(h)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let r=0,s=0;s<this.children.length;s++){let i=this.children[s],o=r+i.size;if(r==o?e<=o&&t>=r:e<o&&t>r){let l=r+i.border,a=o-i.border;if(e>=l&&t<=a){this.dirty=e==r||t==o?pt:Tl,e==l&&t==a&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=Ae:i.markDirty(e-l,t-l);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?pt:Ae}r=o}this.dirty=pt}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let r=e==1?pt:Tl;t.dirty<r&&(t.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}isText(e){return!1}}class Al extends ln{constructor(e,t,r,s){let i,o=t.type.toDOM;if(typeof o=="function"&&(o=o(r,()=>{if(!i)return s;if(i.parent)return i.parent.posBeforeChild(i)})),!t.type.spec.raw){if(o.nodeType!=1){let l=document.createElement("span");l.appendChild(o),o=l}o.contentEditable="false",o.classList.add("ProseMirror-widget")}super(e,[],o,null),this.widget=t,this.widget=t,i=this}matchesWidget(e){return this.dirty==be&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return t?t(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class Ju extends ln{constructor(e,t,r,s){super(e,[],t,null),this.textDOM=r,this.text=s}get size(){return this.text.length}localPosFromDOM(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class Tt extends ln{constructor(e,t,r,s,i){super(e,[],r,s),this.mark=t,this.spec=i}static create(e,t,r,s){let i=s.nodeViews[t.type.name],o=i&&i(t,s,r);return(!o||!o.dom)&&(o=Mt.renderSpec(document,t.type.spec.toDOM(t,r),null,t.attrs)),new Tt(e,t,o.dom,o.contentDOM||o.dom,o)}parseRule(){return this.dirty&Ae||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=Ae&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),this.dirty!=be){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=be}}slice(e,t,r){let s=Tt.create(this.parent,this.mark,!0,r),i=this.children,o=this.size;t<o&&(i=Is(i,t,o,r)),e>0&&(i=Is(i,0,e,r));for(let l=0;l<i.length;l++)i[l].parent=s;return s.children=i,s}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class rt extends ln{constructor(e,t,r,s,i,o,l,a,c){super(e,[],i,o),this.node=t,this.outerDeco=r,this.innerDeco=s,this.nodeDOM=l}static create(e,t,r,s,i,o){let l=i.nodeViews[t.type.name],a,c=l&&l(t,i,()=>{if(!a)return o;if(a.parent)return a.parent.posBeforeChild(a)},r,s),d=c&&c.dom,u=c&&c.contentDOM;if(t.isText){if(!d)d=document.createTextNode(t.text);else if(d.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else d||({dom:d,contentDOM:u}=Mt.renderSpec(document,t.type.spec.toDOM(t),null,t.attrs));!u&&!t.isText&&d.nodeName!="BR"&&(d.hasAttribute("contenteditable")||(d.contentEditable="false"),t.type.spec.draggable&&(d.draggable=!0));let f=d;return d=Rl(d,r,t),c?a=new qu(e,t,r,s,d,u||null,f,c,i,o+1):t.isText?new ls(e,t,r,s,d,f,i):new rt(e,t,r,s,d,u||null,f,i,o+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let t=this.children.length-1;t>=0;t--){let r=this.children[t];if(this.dom.contains(r.dom.parentNode)){e.contentElement=r.dom.parentNode;break}}e.contentElement||(e.getContent=()=>b.empty)}return e}matchesNode(e,t,r){return this.dirty==be&&e.eq(this.node)&&Xn(t,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,t){let r=this.node.inlineContent,s=t,i=e.composing?this.localCompositionInfo(e,t):null,o=i&&i.pos>-1?i:null,l=i&&i.pos<0,a=new Gu(this,o&&o.node,e);Qu(this.node,this.innerDeco,(c,d,u)=>{c.spec.marks?a.syncToMarks(c.spec.marks,r,e):c.type.side>=0&&!u&&a.syncToMarks(d==this.node.childCount?B.none:this.node.child(d).marks,r,e),a.placeWidget(c,e,s)},(c,d,u,f)=>{a.syncToMarks(c.marks,r,e);let h;a.findNodeMatch(c,d,u,f)||l&&e.state.selection.from>s&&e.state.selection.to<s+c.nodeSize&&(h=a.findIndexWithChild(i.node))>-1&&a.updateNodeAt(c,d,u,h,e)||a.updateNextNode(c,d,u,e,f,s)||a.addNode(c,d,u,e,s),s+=c.nodeSize}),a.syncToMarks([],r,e),this.node.isTextblock&&a.addTextblockHacks(),a.destroyRest(),(a.changed||this.dirty==pt)&&(o&&this.protectLocalComposition(e,o),Nl(this.contentDOM,this.children,e),Rt&&Zu(this.dom))}localCompositionInfo(e,t){let{from:r,to:s}=e.state.selection;if(!(e.state.selection instanceof T)||r<t||s>t+this.node.content.size)return null;let i=e.input.compositionNode;if(!i||!this.dom.contains(i.parentNode))return null;if(this.node.inlineContent){let o=i.nodeValue,l=ef(this.node.content,o,r-t,s-t);return l<0?null:{node:i,pos:l,text:o}}else return{node:i,pos:-1,text:""}}protectLocalComposition(e,{node:t,pos:r,text:s}){if(this.getDesc(t))return;let i=t;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let o=new Ju(this,i,t,s);e.input.compositionNodes.push(o),this.children=Is(this.children,r,r+s.length,e,o)}update(e,t,r,s){return this.dirty==Ae||!e.sameMarkup(this.node)?!1:(this.updateInner(e,t,r,s),!0)}updateInner(e,t,r,s){this.updateOuterDeco(t),this.node=e,this.innerDeco=r,this.contentDOM&&this.updateChildren(s,this.posAtStart),this.dirty=be}updateOuterDeco(e){if(Xn(e,this.outerDeco))return;let t=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=vl(this.dom,this.nodeDOM,Ds(this.outerDeco,this.node,t),Ds(e,this.node,t)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function El(n,e,t,r,s){Rl(r,e,n);let i=new rt(void 0,n,e,t,r,r,r,s,0);return i.contentDOM&&i.updateChildren(s,0),i}class ls extends rt{constructor(e,t,r,s,i,o,l){super(e,t,r,s,i,null,o,l,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,t,r,s){return this.dirty==Ae||this.dirty!=be&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(t),(this.dirty!=be||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,s.trackWrites==this.nodeDOM&&(s.trackWrites=null)),this.node=e,this.dirty=be,!0)}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,r){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,r)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,t,r){let s=this.node.cut(e,t),i=document.createTextNode(s.text);return new ls(this.parent,s,this.outerDeco,this.innerDeco,i,i,r)}markDirty(e,t){super.markDirty(e,t),this.dom!=this.nodeDOM&&(e==0||t==this.nodeDOM.nodeValue.length)&&(this.dirty=Ae)}get domAtom(){return!1}isText(e){return this.node.text==e}}class Ol extends ln{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==be&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class qu extends rt{constructor(e,t,r,s,i,o,l,a,c,d){super(e,t,r,s,i,o,l,c,d),this.spec=a}update(e,t,r,s){if(this.dirty==Ae)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let i=this.spec.update(e,t,r);return i&&this.updateInner(e,t,r,s),i}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,t,r,s)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,r,s){this.spec.setSelection?this.spec.setSelection(e,t,r.root):super.setSelection(e,t,r,s)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function Nl(n,e,t){let r=n.firstChild,s=!1;for(let i=0;i<e.length;i++){let o=e[i],l=o.dom;if(l.parentNode==n){for(;l!=r;)r=Dl(r),s=!0;r=r.nextSibling}else s=!0,n.insertBefore(l,r);if(o instanceof Tt){let a=r?r.previousSibling:n.lastChild;Nl(o.contentDOM,o.children,t),r=a?a.nextSibling:n.firstChild}}for(;r;)r=Dl(r),s=!0;s&&t.trackWrites==n&&(t.trackWrites=null)}const an=function(n){n&&(this.nodeName=n)};an.prototype=Object.create(null);const mt=[new an];function Ds(n,e,t){if(n.length==0)return mt;let r=t?mt[0]:new an,s=[r];for(let i=0;i<n.length;i++){let o=n[i].type.attrs;if(o){o.nodeName&&s.push(r=new an(o.nodeName));for(let l in o){let a=o[l];a!=null&&(t&&s.length==1&&s.push(r=new an(e.isInline?"span":"div")),l=="class"?r.class=(r.class?r.class+" ":"")+a:l=="style"?r.style=(r.style?r.style+";":"")+a:l!="nodeName"&&(r[l]=a))}}}return s}function vl(n,e,t,r){if(t==mt&&r==mt)return e;let s=e;for(let i=0;i<r.length;i++){let o=r[i],l=t[i];if(i){let a;l&&l.nodeName==o.nodeName&&s!=n&&(a=s.parentNode)&&a.nodeName.toLowerCase()==o.nodeName||(a=document.createElement(o.nodeName),a.pmIsDeco=!0,a.appendChild(s),l=mt[0]),s=a}_u(s,l||mt[0],o)}return s}function _u(n,e,t){for(let r in e)r!="class"&&r!="style"&&r!="nodeName"&&!(r in t)&&n.removeAttribute(r);for(let r in t)r!="class"&&r!="style"&&r!="nodeName"&&t[r]!=e[r]&&n.setAttribute(r,t[r]);if(e.class!=t.class){let r=e.class?e.class.split(" ").filter(Boolean):[],s=t.class?t.class.split(" ").filter(Boolean):[];for(let i=0;i<r.length;i++)s.indexOf(r[i])==-1&&n.classList.remove(r[i]);for(let i=0;i<s.length;i++)r.indexOf(s[i])==-1&&n.classList.add(s[i]);n.classList.length==0&&n.removeAttribute("class")}if(e.style!=t.style){if(e.style){let r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,s;for(;s=r.exec(e.style);)n.style.removeProperty(s[1])}t.style&&(n.style.cssText+=t.style)}}function Rl(n,e,t){return vl(n,n,mt,Ds(e,t,n.nodeType!=1))}function Xn(n,e){if(n.length!=e.length)return!1;for(let t=0;t<n.length;t++)if(!n[t].type.eq(e[t].type))return!1;return!0}function Dl(n){let e=n.nextSibling;return n.parentNode.removeChild(n),e}class Gu{constructor(e,t,r){this.lock=t,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=Yu(e.node.content,e)}destroyBetween(e,t){if(e!=t){for(let r=e;r<t;r++)this.top.children[r].destroy();this.top.children.splice(e,t-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,t,r){let s=0,i=this.stack.length>>1,o=Math.min(i,e.length);for(;s<o&&(s==i-1?this.top:this.stack[s+1<<1]).matchesMark(e[s])&&e[s].type.spec.spanning!==!1;)s++;for(;s<i;)this.destroyRest(),this.top.dirty=be,this.index=this.stack.pop(),this.top=this.stack.pop(),i--;for(;i<e.length;){this.stack.push(this.top,this.index+1);let l=-1;for(let a=this.index;a<Math.min(this.index+3,this.top.children.length);a++){let c=this.top.children[a];if(c.matchesMark(e[i])&&!this.isLocked(c.dom)){l=a;break}}if(l>-1)l>this.index&&(this.changed=!0,this.destroyBetween(this.index,l)),this.top=this.top.children[this.index];else{let a=Tt.create(this.top,e[i],t,r);this.top.children.splice(this.index,0,a),this.top=a,this.changed=!0}this.index=0,i++}}findNodeMatch(e,t,r,s){let i=-1,o;if(s>=this.preMatch.index&&(o=this.preMatch.matches[s-this.preMatch.index]).parent==this.top&&o.matchesNode(e,t,r))i=this.top.children.indexOf(o,this.index);else for(let l=this.index,a=Math.min(this.top.children.length,l+5);l<a;l++){let c=this.top.children[l];if(c.matchesNode(e,t,r)&&!this.preMatch.matched.has(c)){i=l;break}}return i<0?!1:(this.destroyBetween(this.index,i),this.index++,!0)}updateNodeAt(e,t,r,s,i){let o=this.top.children[s];return o.dirty==Ae&&o.dom==o.contentDOM&&(o.dirty=pt),o.update(e,t,r,i)?(this.destroyBetween(this.index,s),this.index++,!0):!1}findIndexWithChild(e){for(;;){let t=e.parentNode;if(!t)return-1;if(t==this.top.contentDOM){let r=e.pmViewDesc;if(r){for(let s=this.index;s<this.top.children.length;s++)if(this.top.children[s]==r)return s}return-1}e=t}}updateNextNode(e,t,r,s,i,o){for(let l=this.index;l<this.top.children.length;l++){let a=this.top.children[l];if(a instanceof rt){let c=this.preMatch.matched.get(a);if(c!=null&&c!=i)return!1;let d=a.dom,u,f=this.isLocked(d)&&!(e.isText&&a.node&&a.node.isText&&a.nodeDOM.nodeValue==e.text&&a.dirty!=Ae&&Xn(t,a.outerDeco));if(!f&&a.update(e,t,r,s))return this.destroyBetween(this.index,l),a.dom!=d&&(this.changed=!0),this.index++,!0;if(!f&&(u=this.recreateWrapper(a,e,t,r,s,o)))return this.destroyBetween(this.index,l),this.top.children[this.index]=u,u.contentDOM&&(u.dirty=pt,u.updateChildren(s,o+1),u.dirty=be),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,t,r,s,i,o){if(e.dirty||t.isAtom||!e.children.length||!e.node.content.eq(t.content)||!Xn(r,e.outerDeco)||!s.eq(e.innerDeco))return null;let l=rt.create(this.top,t,r,s,i,o);if(l.contentDOM){l.children=e.children,e.children=[];for(let a of l.children)a.parent=l}return e.destroy(),l}addNode(e,t,r,s,i){let o=rt.create(this.top,e,t,r,s,i);o.contentDOM&&o.updateChildren(s,i+1),this.top.children.splice(this.index++,0,o),this.changed=!0}placeWidget(e,t,r){let s=this.index<this.top.children.length?this.top.children[this.index]:null;if(s&&s.matchesWidget(e)&&(e==s.widget||!s.widget.type.toDOM.parentNode))this.index++;else{let i=new Al(this.top,e,t,r);this.top.children.splice(this.index++,0,i),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],t=this.top;for(;e instanceof Tt;)t=e,e=t.children[t.children.length-1];(!e||!(e instanceof ls)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((oe||re)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",t),this.addHackNode("BR",this.top))}addHackNode(e,t){if(t==this.top&&this.index<t.children.length&&t.children[this.index].matchesHack(e))this.index++;else{let r=document.createElement(e);e=="IMG"&&(r.className="ProseMirror-separator",r.alt=""),e=="BR"&&(r.className="ProseMirror-trailingBreak");let s=new Ol(this.top,[],r,null);t!=this.top?t.children.push(s):t.children.splice(this.index++,0,s),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function Yu(n,e){let t=e,r=t.children.length,s=n.childCount,i=new Map,o=[];e:for(;s>0;){let l;for(;;)if(r){let c=t.children[r-1];if(c instanceof Tt)t=c,r=c.children.length;else{l=c,r--;break}}else{if(t==e)break e;r=t.parent.children.indexOf(t),t=t.parent}let a=l.node;if(a){if(a!=n.child(s-1))break;--s,i.set(l,s),o.push(l)}}return{index:s,matched:i,matches:o.reverse()}}function Xu(n,e){return n.type.side-e.type.side}function Qu(n,e,t,r){let s=e.locals(n),i=0;if(s.length==0){for(let c=0;c<n.childCount;c++){let d=n.child(c);r(d,s,e.forChild(i,d),c),i+=d.nodeSize}return}let o=0,l=[],a=null;for(let c=0;;){let d,u;for(;o<s.length&&s[o].to==i;){let g=s[o++];g.widget&&(d?(u||(u=[d])).push(g):d=g)}if(d)if(u){u.sort(Xu);for(let g=0;g<u.length;g++)t(u[g],c,!!a)}else t(d,c,!!a);let f,h;if(a)h=-1,f=a,a=null;else if(c<n.childCount)h=c,f=n.child(c++);else break;for(let g=0;g<l.length;g++)l[g].to<=i&&l.splice(g--,1);for(;o<s.length&&s[o].from<=i&&s[o].to>i;)l.push(s[o++]);let p=i+f.nodeSize;if(f.isText){let g=p;o<s.length&&s[o].from<g&&(g=s[o].from);for(let y=0;y<l.length;y++)l[y].to<g&&(g=l[y].to);g<p&&(a=f.cut(g-i),f=f.cut(0,g-i),p=g,h=-1)}else for(;o<s.length&&s[o].to<p;)o++;let m=f.isInline&&!f.isLeaf?l.filter(g=>!g.inline):l.slice();r(f,m,e.forChild(i,f),h),i=p}}function Zu(n){if(n.nodeName=="UL"||n.nodeName=="OL"){let e=n.style.cssText;n.style.cssText=e+"; list-style: square !important",window.getComputedStyle(n).listStyle,n.style.cssText=e}}function ef(n,e,t,r){for(let s=0,i=0;s<n.childCount&&i<=r;){let o=n.child(s++),l=i;if(i+=o.nodeSize,!o.isText)continue;let a=o.text;for(;s<n.childCount;){let c=n.child(s++);if(i+=c.nodeSize,!c.isText)break;a+=c.text}if(i>=t){if(i>=r&&a.slice(r-e.length-l,r-l)==e)return r-e.length;let c=l<r?a.lastIndexOf(e,r-l-1):-1;if(c>=0&&c+e.length+l>=t)return l+c;if(t==r&&a.length>=r+e.length-l&&a.slice(r-l,r-l+e.length)==e)return r}}return-1}function Is(n,e,t,r,s){let i=[];for(let o=0,l=0;o<n.length;o++){let a=n[o],c=l,d=l+=a.size;c>=t||d<=e?i.push(a):(c<e&&i.push(a.slice(0,e-c,r)),s&&(i.push(s),s=void 0),d>t&&i.push(a.slice(t-c,a.size,r)))}return i}function Ls(n,e=null){let t=n.domSelectionRange(),r=n.state.doc;if(!t.focusNode)return null;let s=n.docView.nearestDesc(t.focusNode),i=s&&s.size==0,o=n.docView.posFromDOM(t.focusNode,t.focusOffset,1);if(o<0)return null;let l=r.resolve(o),a,c;if(Yn(t)){for(a=o;s&&!s.node;)s=s.parent;let u=s.node;if(s&&u.isAtom&&x.isSelectable(u)&&s.parent&&!(u.isInline&&Au(t.focusNode,t.focusOffset,s.dom))){let f=s.posBefore;c=new x(o==f?l:r.resolve(f))}}else{if(t instanceof n.dom.ownerDocument.defaultView.Selection&&t.rangeCount>1){let u=o,f=o;for(let h=0;h<t.rangeCount;h++){let p=t.getRangeAt(h);u=Math.min(u,n.docView.posFromDOM(p.startContainer,p.startOffset,1)),f=Math.max(f,n.docView.posFromDOM(p.endContainer,p.endOffset,-1))}if(u<0)return null;[a,o]=f==n.state.selection.anchor?[f,u]:[u,f],l=r.resolve(o)}else a=n.docView.posFromDOM(t.anchorNode,t.anchorOffset,1);if(a<0)return null}let d=r.resolve(a);if(!c){let u=e=="pointer"||n.state.selection.head<l.pos&&!i?1:-1;c=Bs(n,d,l,u)}return c}function Il(n){return n.editable?n.hasFocus():$l(n)&&document.activeElement&&document.activeElement.contains(n.dom)}function ze(n,e=!1){let t=n.state.selection;if(zl(n,t),!!Il(n)){if(!e&&n.input.mouseDown&&n.input.mouseDown.allowDefault&&re){let r=n.domSelectionRange(),s=n.domObserver.currentSelection;if(r.anchorNode&&s.anchorNode&&ft(r.anchorNode,r.anchorOffset,s.anchorNode,s.anchorOffset)){n.input.mouseDown.delayedSelectionSync=!0,n.domObserver.setCurSelection();return}}if(n.domObserver.disconnectSelection(),n.cursorWrapper)nf(n);else{let{anchor:r,head:s}=t,i,o;Ll&&!(t instanceof T)&&(t.$from.parent.inlineContent||(i=Pl(n,t.from)),!t.empty&&!t.$from.parent.inlineContent&&(o=Pl(n,t.to))),n.docView.setSelection(r,s,n,e),Ll&&(i&&Bl(i),o&&Bl(o)),t.visible?n.dom.classList.remove("ProseMirror-hideselection"):(n.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&tf(n))}n.domObserver.setCurSelection(),n.domObserver.connectSelection()}}const Ll=oe||re&&hl<63;function Pl(n,e){let{node:t,offset:r}=n.docView.domFromPos(e,0),s=r<t.childNodes.length?t.childNodes[r]:null,i=r?t.childNodes[r-1]:null;if(oe&&s&&s.contentEditable=="false")return Ps(s);if((!s||s.contentEditable=="false")&&(!i||i.contentEditable=="false")){if(s)return Ps(s);if(i)return Ps(i)}}function Ps(n){return n.contentEditable="true",oe&&n.draggable&&(n.draggable=!1,n.wasDraggable=!0),n}function Bl(n){n.contentEditable="false",n.wasDraggable&&(n.draggable=!0,n.wasDraggable=null)}function tf(n){let e=n.dom.ownerDocument;e.removeEventListener("selectionchange",n.input.hideSelectionGuard);let t=n.domSelectionRange(),r=t.anchorNode,s=t.anchorOffset;e.addEventListener("selectionchange",n.input.hideSelectionGuard=()=>{(t.anchorNode!=r||t.anchorOffset!=s)&&(e.removeEventListener("selectionchange",n.input.hideSelectionGuard),setTimeout(()=>{(!Il(n)||n.state.selection.visible)&&n.dom.classList.remove("ProseMirror-hideselection")},20))})}function nf(n){let e=n.domSelection(),t=document.createRange();if(!e)return;let r=n.cursorWrapper.dom,s=r.nodeName=="IMG";s?t.setStart(r.parentNode,ee(r)+1):t.setStart(r,0),t.collapse(!0),e.removeAllRanges(),e.addRange(t),!s&&!n.state.selection.visible&&de&&Je<=11&&(r.disabled=!0,r.disabled=!1)}function zl(n,e){if(e instanceof x){let t=n.docView.descAt(e.from);t!=n.lastSelectedViewDesc&&(Hl(n),t&&t.selectNode(),n.lastSelectedViewDesc=t)}else Hl(n)}function Hl(n){n.lastSelectedViewDesc&&(n.lastSelectedViewDesc.parent&&n.lastSelectedViewDesc.deselectNode(),n.lastSelectedViewDesc=void 0)}function Bs(n,e,t,r){return n.someProp("createSelectionBetween",s=>s(n,e,t))||T.between(e,t,r)}function Fl(n){return n.editable&&!n.hasFocus()?!1:$l(n)}function $l(n){let e=n.domSelectionRange();if(!e.anchorNode)return!1;try{return n.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(n.editable||n.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function rf(n){let e=n.docView.domFromPos(n.state.selection.anchor,0),t=n.domSelectionRange();return ft(e.node,e.offset,t.anchorNode,t.anchorOffset)}function zs(n,e){let{$anchor:t,$head:r}=n.selection,s=e>0?t.max(r):t.min(r),i=s.parent.inlineContent?s.depth?n.doc.resolve(e>0?s.after():s.before()):null:s;return i&&E.findFrom(i,e)}function _e(n,e){return n.dispatch(n.state.tr.setSelection(e).scrollIntoView()),!0}function Vl(n,e,t){let r=n.state.selection;if(r instanceof T)if(t.indexOf("s")>-1){let{$head:s}=r,i=s.textOffset?null:e<0?s.nodeBefore:s.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let o=n.state.doc.resolve(s.pos+i.nodeSize*(e<0?-1:1));return _e(n,new T(r.$anchor,o))}else if(r.empty){if(n.endOfTextblock(e>0?"forward":"backward")){let s=zs(n.state,e);return s&&s instanceof x?_e(n,s):!1}else if(!(ye&&t.indexOf("m")>-1)){let s=r.$head,i=s.textOffset?null:e<0?s.nodeBefore:s.nodeAfter,o;if(!i||i.isText)return!1;let l=e<0?s.pos-i.nodeSize:s.pos;return i.isAtom||(o=n.docView.descAt(l))&&!o.contentDOM?x.isSelectable(i)?_e(n,new x(e<0?n.state.doc.resolve(s.pos-i.nodeSize):s)):sn?_e(n,new T(n.state.doc.resolve(e<0?l:l+i.nodeSize))):!1:!1}}else return!1;else{if(r instanceof x&&r.node.isInline)return _e(n,new T(e>0?r.$to:r.$from));{let s=zs(n.state,e);return s?_e(n,s):!1}}}function Qn(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function cn(n,e){let t=n.pmViewDesc;return t&&t.size==0&&(e<0||n.nextSibling||n.nodeName!="BR")}function It(n,e){return e<0?sf(n):of(n)}function sf(n){let e=n.domSelectionRange(),t=e.focusNode,r=e.focusOffset;if(!t)return;let s,i,o=!1;for(we&&t.nodeType==1&&r<Qn(t)&&cn(t.childNodes[r],-1)&&(o=!0);;)if(r>0){if(t.nodeType!=1)break;{let l=t.childNodes[r-1];if(cn(l,-1))s=t,i=--r;else if(l.nodeType==3)t=l,r=t.nodeValue.length;else break}}else{if(Wl(t))break;{let l=t.previousSibling;for(;l&&cn(l,-1);)s=t.parentNode,i=ee(l),l=l.previousSibling;if(l)t=l,r=Qn(t);else{if(t=t.parentNode,t==n.dom)break;r=0}}}o?Hs(n,t,r):s&&Hs(n,s,i)}function of(n){let e=n.domSelectionRange(),t=e.focusNode,r=e.focusOffset;if(!t)return;let s=Qn(t),i,o;for(;;)if(r<s){if(t.nodeType!=1)break;let l=t.childNodes[r];if(cn(l,1))i=t,o=++r;else break}else{if(Wl(t))break;{let l=t.nextSibling;for(;l&&cn(l,1);)i=l.parentNode,o=ee(l)+1,l=l.nextSibling;if(l)t=l,r=0,s=Qn(t);else{if(t=t.parentNode,t==n.dom)break;r=s=0}}}i&&Hs(n,i,o)}function Wl(n){let e=n.pmViewDesc;return e&&e.node&&e.node.isBlock}function lf(n,e){for(;n&&e==n.childNodes.length&&!rn(n);)e=ee(n)+1,n=n.parentNode;for(;n&&e<n.childNodes.length;){let t=n.childNodes[e];if(t.nodeType==3)return t;if(t.nodeType==1&&t.contentEditable=="false")break;n=t,e=0}}function af(n,e){for(;n&&!e&&!rn(n);)e=ee(n),n=n.parentNode;for(;n&&e;){let t=n.childNodes[e-1];if(t.nodeType==3)return t;if(t.nodeType==1&&t.contentEditable=="false")break;n=t,e=n.childNodes.length}}function Hs(n,e,t){if(e.nodeType!=3){let i,o;(o=lf(e,t))?(e=o,t=0):(i=af(e,t))&&(e=i,t=i.nodeValue.length)}let r=n.domSelection();if(!r)return;if(Yn(r)){let i=document.createRange();i.setEnd(e,t),i.setStart(e,t),r.removeAllRanges(),r.addRange(i)}else r.extend&&r.extend(e,t);n.domObserver.setCurSelection();let{state:s}=n;setTimeout(()=>{n.state==s&&ze(n)},50)}function jl(n,e){let t=n.state.doc.resolve(e);if(!(re||Nu)&&t.parent.inlineContent){let s=n.coordsAtPos(e);if(e>t.start()){let i=n.coordsAtPos(e-1),o=(i.top+i.bottom)/2;if(o>s.top&&o<s.bottom&&Math.abs(i.left-s.left)>1)return i.left<s.left?"ltr":"rtl"}if(e<t.end()){let i=n.coordsAtPos(e+1),o=(i.top+i.bottom)/2;if(o>s.top&&o<s.bottom&&Math.abs(i.left-s.left)>1)return i.left>s.left?"ltr":"rtl"}}return getComputedStyle(n.dom).direction=="rtl"?"rtl":"ltr"}function Kl(n,e,t){let r=n.state.selection;if(r instanceof T&&!r.empty||t.indexOf("s")>-1||ye&&t.indexOf("m")>-1)return!1;let{$from:s,$to:i}=r;if(!s.parent.inlineContent||n.endOfTextblock(e<0?"up":"down")){let o=zs(n.state,e);if(o&&o instanceof x)return _e(n,o)}if(!s.parent.inlineContent){let o=e<0?s:i,l=r instanceof he?E.near(o,e):E.findFrom(o,e);return l?_e(n,l):!1}return!1}function Ul(n,e){if(!(n.state.selection instanceof T))return!0;let{$head:t,$anchor:r,empty:s}=n.state.selection;if(!t.sameParent(r))return!0;if(!s)return!1;if(n.endOfTextblock(e>0?"forward":"backward"))return!0;let i=!t.textOffset&&(e<0?t.nodeBefore:t.nodeAfter);if(i&&!i.isText){let o=n.state.tr;return e<0?o.delete(t.pos-i.nodeSize,t.pos):o.delete(t.pos,t.pos+i.nodeSize),n.dispatch(o),!0}return!1}function Jl(n,e,t){n.domObserver.stop(),e.contentEditable=t,n.domObserver.start()}function cf(n){if(!oe||n.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:t}=n.domSelectionRange();if(e&&e.nodeType==1&&t==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let r=e.firstChild;Jl(n,r,"true"),setTimeout(()=>Jl(n,r,"false"),20)}return!1}function df(n){let e="";return n.ctrlKey&&(e+="c"),n.metaKey&&(e+="m"),n.altKey&&(e+="a"),n.shiftKey&&(e+="s"),e}function uf(n,e){let t=e.keyCode,r=df(e);if(t==8||ye&&t==72&&r=="c")return Ul(n,-1)||It(n,-1);if(t==46&&!e.shiftKey||ye&&t==68&&r=="c")return Ul(n,1)||It(n,1);if(t==13||t==27)return!0;if(t==37||ye&&t==66&&r=="c"){let s=t==37?jl(n,n.state.selection.from)=="ltr"?-1:1:-1;return Vl(n,s,r)||It(n,s)}else if(t==39||ye&&t==70&&r=="c"){let s=t==39?jl(n,n.state.selection.from)=="ltr"?1:-1:1;return Vl(n,s,r)||It(n,s)}else{if(t==38||ye&&t==80&&r=="c")return Kl(n,-1,r)||It(n,-1);if(t==40||ye&&t==78&&r=="c")return cf(n)||Kl(n,1,r)||It(n,1);if(r==(ye?"m":"c")&&(t==66||t==73||t==89||t==90))return!0}return!1}function Fs(n,e){n.someProp("transformCopied",h=>{e=h(e,n)});let t=[],{content:r,openStart:s,openEnd:i}=e;for(;s>1&&i>1&&r.childCount==1&&r.firstChild.childCount==1;){s--,i--;let h=r.firstChild;t.push(h.type.name,h.attrs!=h.type.defaultAttrs?h.attrs:null),r=h.content}let o=n.someProp("clipboardSerializer")||Mt.fromSchema(n.state.schema),l=ea(),a=l.createElement("div");a.appendChild(o.serializeFragment(r,{document:l}));let c=a.firstChild,d,u=0;for(;c&&c.nodeType==1&&(d=Ql[c.nodeName.toLowerCase()]);){for(let h=d.length-1;h>=0;h--){let p=l.createElement(d[h]);for(;a.firstChild;)p.appendChild(a.firstChild);a.appendChild(p),u++}c=a.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${s} ${i}${u?` -${u}`:""} ${JSON.stringify(t)}`);let f=n.someProp("clipboardTextSerializer",h=>h(e,n))||e.content.textBetween(0,e.content.size,`
7
7
 
8
- `);return{dom:a,text:f,slice:e}}function $l(n,e,t,r,s){let i=s.parent.type.spec.code,o,l;if(!t&&!e)return null;let a=e&&(r||i||!t);if(a){if(n.someProp("transformPastedText",f=>{e=f(e,i||r,n)}),i)return e?new x(b.from(n.state.schema.text(e.replace(/\r\n?/g,`
9
- `))),0,0):x.empty;let u=n.someProp("clipboardTextParser",f=>f(e,s,r,n));if(u)l=u;else{let f=s.marks(),{schema:h}=n.state,p=wt.fromSchema(h);o=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(m=>{let g=o.appendChild(document.createElement("p"));m&&g.appendChild(p.serializeNode(h.text(m,f)))})}}else n.someProp("transformPastedHTML",u=>{t=u(t,n)}),o=Gu(t),nn&&Yu(o);let c=o&&o.querySelector("[data-pm-slice]"),d=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(d&&d[3])for(let u=+d[3];u>0;u--){let f=o.firstChild;for(;f&&f.nodeType!=1;)f=f.nextSibling;if(!f)break;o=f}if(l||(l=(n.someProp("clipboardParser")||n.someProp("domParser")||We.fromSchema(n.state.schema)).parseSlice(o,{preserveWhitespace:!!(a||d),context:s,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!Uu.test(f.parentNode.nodeName)?{ignore:!0}:null}})),d)l=Xu(Kl(l,+d[1],+d[2]),d[4]);else if(l=x.maxOpen(qu(l.content,s),!0),l.openStart||l.openEnd){let u=0,f=0;for(let h=l.content.firstChild;u<l.openStart&&!h.type.spec.isolating;u++,h=h.firstChild);for(let h=l.content.lastChild;f<l.openEnd&&!h.type.spec.isolating;f++,h=h.lastChild);l=Kl(l,u,f)}return n.someProp("transformPasted",u=>{l=u(l,n)}),l}const Uu=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function qu(n,e){if(n.childCount<2)return n;for(let t=e.depth;t>=0;t--){let s=e.node(t).contentMatchAt(e.index(t)),i,o=[];if(n.forEach(l=>{if(!o)return;let a=s.findWrapping(l.type),c;if(!a)return o=null;if(c=o.length&&i.length&&Wl(a,i,l,o[o.length-1],0))o[o.length-1]=c;else{o.length&&(o[o.length-1]=jl(o[o.length-1],i.length));let d=Vl(l,a);o.push(d),s=s.matchType(d.type),i=a}}),o)return b.from(o)}return n}function Vl(n,e,t=0){for(let r=e.length-1;r>=t;r--)n=e[r].create(null,b.from(n));return n}function Wl(n,e,t,r,s){if(s<n.length&&s<e.length&&n[s]==e[s]){let i=Wl(n,e,t,r.lastChild,s+1);if(i)return r.copy(r.content.replaceChild(r.childCount-1,i));if(r.contentMatchAt(r.childCount).matchType(s==n.length-1?t.type:n[s+1]))return r.copy(r.content.append(b.from(Vl(t,n,s+1))))}}function jl(n,e){if(e==0)return n;let t=n.content.replaceChild(n.childCount-1,jl(n.lastChild,e-1)),r=n.contentMatchAt(n.childCount).fillBefore(b.empty,!0);return n.copy(t.append(r))}function Fs(n,e,t,r,s,i){let o=e<0?n.firstChild:n.lastChild,l=o.content;return n.childCount>1&&(i=0),s<r-1&&(l=Fs(l,e,t,r,s+1,i)),s>=t&&(l=e<0?o.contentMatchAt(0).fillBefore(l,i<=s).append(l):l.append(o.contentMatchAt(o.childCount).fillBefore(b.empty,!0))),n.replaceChild(e<0?0:n.childCount-1,o.copy(l))}function Kl(n,e,t){return e<n.openStart&&(n=new x(Fs(n.content,-1,e,n.openStart,0,n.openEnd),e,n.openEnd)),t<n.openEnd&&(n=new x(Fs(n.content,1,t,n.openEnd,0,0),n.openStart,t)),n}const Jl={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let Ul=null;function ql(){return Ul||(Ul=document.implementation.createHTMLDocument("title"))}let $s=null;function _u(n){let e=window.trustedTypes;return e?($s||($s=e.createPolicy("ProseMirrorClipboard",{createHTML:t=>t})),$s.createHTML(n)):n}function Gu(n){let e=/^(\s*<meta [^>]*>)*/.exec(n);e&&(n=n.slice(e[0].length));let t=ql().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(n),s;if((s=r&&Jl[r[1].toLowerCase()])&&(n=s.map(i=>"<"+i+">").join("")+n+s.map(i=>"</"+i+">").reverse().join("")),t.innerHTML=_u(n),s)for(let i=0;i<s.length;i++)t=t.querySelector(s[i])||t;return t}function Yu(n){let e=n.querySelectorAll(ne?"span:not([class]):not([style])":"span.Apple-converted-space");for(let t=0;t<e.length;t++){let r=e[t];r.childNodes.length==1&&r.textContent=="\xA0"&&r.parentNode&&r.parentNode.replaceChild(n.ownerDocument.createTextNode(" "),r)}}function Xu(n,e){if(!n.size)return n;let t=n.content.firstChild.type.schema,r;try{r=JSON.parse(e)}catch{return n}let{content:s,openStart:i,openEnd:o}=n;for(let l=r.length-2;l>=0;l-=2){let a=t.nodes[r[l]];if(!a||a.hasRequiredAttrs())break;s=b.from(a.create(r[l+1],s)),i++,o++}return new x(s,i,o)}const le={},ae={},Qu={touchstart:!0,touchmove:!0};class Zu{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastAndroidDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function ef(n){for(let e in le){let t=le[e];n.dom.addEventListener(e,n.input.eventHandlers[e]=r=>{nf(n,r)&&!Ws(n,r)&&(n.editable||!(r.type in ae))&&t(n,r)},Qu[e]?{passive:!0}:void 0)}oe&&n.dom.addEventListener("input",()=>null),Vs(n)}function _e(n,e){n.input.lastSelectionOrigin=e,n.input.lastSelectionTime=Date.now()}function tf(n){n.domObserver.stop();for(let e in n.input.eventHandlers)n.dom.removeEventListener(e,n.input.eventHandlers[e]);clearTimeout(n.input.composingTimeout),clearTimeout(n.input.lastIOSEnterFallbackTimeout)}function Vs(n){n.someProp("handleDOMEvents",e=>{for(let t in e)n.input.eventHandlers[t]||n.dom.addEventListener(t,n.input.eventHandlers[t]=r=>Ws(n,r))})}function Ws(n,e){return n.someProp("handleDOMEvents",t=>{let r=t[e.type];return r?r(n,e)||e.defaultPrevented:!1})}function nf(n,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target;t!=n.dom;t=t.parentNode)if(!t||t.nodeType==11||t.pmViewDesc&&t.pmViewDesc.stopEvent(e))return!1;return!0}function rf(n,e){!Ws(n,e)&&le[e.type]&&(n.editable||!(e.type in ae))&&le[e.type](n,e)}ae.keydown=(n,e)=>{let t=e;if(n.input.shiftKey=t.keyCode==16||t.shiftKey,!Gl(n,t)&&(n.input.lastKeyCode=t.keyCode,n.input.lastKeyCodeTime=Date.now(),!(Ce&&ne&&t.keyCode==13)))if(t.keyCode!=229&&n.domObserver.forceFlush(),Dt&&t.keyCode==13&&!t.ctrlKey&&!t.altKey&&!t.metaKey){let r=Date.now();n.input.lastIOSEnter=r,n.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{n.input.lastIOSEnter==r&&(n.someProp("handleKeyDown",s=>s(n,ft(13,"Enter"))),n.input.lastIOSEnter=0)},200)}else n.someProp("handleKeyDown",r=>r(n,t))||Ju(n,t)?t.preventDefault():_e(n,"key")},ae.keyup=(n,e)=>{e.keyCode==16&&(n.input.shiftKey=!1)},ae.keypress=(n,e)=>{let t=e;if(Gl(n,t)||!t.charCode||t.ctrlKey&&!t.altKey||ge&&t.metaKey)return;if(n.someProp("handleKeyPress",s=>s(n,t))){t.preventDefault();return}let r=n.state.selection;if(!(r instanceof A)||!r.$from.sameParent(r.$to)){let s=String.fromCharCode(t.charCode);!/[\r\n]/.test(s)&&!n.someProp("handleTextInput",i=>i(n,r.$from.pos,r.$to.pos,s))&&n.dispatch(n.state.tr.insertText(s).scrollIntoView()),t.preventDefault()}};function Zn(n){return{left:n.clientX,top:n.clientY}}function sf(n,e){let t=e.x-n.clientX,r=e.y-n.clientY;return t*t+r*r<100}function js(n,e,t,r,s){if(r==-1)return!1;let i=n.state.doc.resolve(r);for(let o=i.depth+1;o>0;o--)if(n.someProp(e,l=>o>i.depth?l(n,t,i.nodeAfter,i.before(o),s,!0):l(n,t,i.node(o),i.before(o),s,!1)))return!0;return!1}function Pt(n,e,t){if(n.focused||n.focus(),n.state.selection.eq(e))return;let r=n.state.tr.setSelection(e);r.setMeta("pointer",!0),n.dispatch(r)}function of(n,e){if(e==-1)return!1;let t=n.state.doc.resolve(e),r=t.nodeAfter;return r&&r.isAtom&&w.isSelectable(r)?(Pt(n,new w(t)),!0):!1}function lf(n,e){if(e==-1)return!1;let t=n.state.selection,r,s;t instanceof w&&(r=t.node);let i=n.state.doc.resolve(e);for(let o=i.depth+1;o>0;o--){let l=o>i.depth?i.nodeAfter:i.node(o);if(w.isSelectable(l)){r&&t.$from.depth>0&&o>=t.$from.depth&&i.before(t.$from.depth+1)==t.$from.pos?s=i.before(t.$from.depth):s=i.before(o);break}}return s!=null?(Pt(n,w.create(n.state.doc,s)),!0):!1}function af(n,e,t,r,s){return js(n,"handleClickOn",e,t,r)||n.someProp("handleClick",i=>i(n,e,r))||(s?lf(n,t):of(n,t))}function cf(n,e,t,r){return js(n,"handleDoubleClickOn",e,t,r)||n.someProp("handleDoubleClick",s=>s(n,e,r))}function df(n,e,t,r){return js(n,"handleTripleClickOn",e,t,r)||n.someProp("handleTripleClick",s=>s(n,e,r))||uf(n,t,r)}function uf(n,e,t){if(t.button!=0)return!1;let r=n.state.doc;if(e==-1)return r.inlineContent?(Pt(n,A.create(r,0,r.content.size)),!0):!1;let s=r.resolve(e);for(let i=s.depth+1;i>0;i--){let o=i>s.depth?s.nodeAfter:s.node(i),l=s.before(i);if(o.inlineContent)Pt(n,A.create(r,l+1,l+1+o.content.size));else if(w.isSelectable(o))Pt(n,w.create(r,l));else continue;return!0}}function Ks(n){return er(n)}const _l=ge?"metaKey":"ctrlKey";le.mousedown=(n,e)=>{let t=e;n.input.shiftKey=t.shiftKey;let r=Ks(n),s=Date.now(),i="singleClick";s-n.input.lastClick.time<500&&sf(t,n.input.lastClick)&&!t[_l]&&(n.input.lastClick.type=="singleClick"?i="doubleClick":n.input.lastClick.type=="doubleClick"&&(i="tripleClick")),n.input.lastClick={time:s,x:t.clientX,y:t.clientY,type:i};let o=n.posAtCoords(Zn(t));o&&(i=="singleClick"?(n.input.mouseDown&&n.input.mouseDown.done(),n.input.mouseDown=new ff(n,o,t,!!r)):(i=="doubleClick"?cf:df)(n,o.pos,o.inside,t)?t.preventDefault():_e(n,"pointer"))};class ff{constructor(e,t,r,s){this.view=e,this.pos=t,this.event=r,this.flushed=s,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!r[_l],this.allowDefault=r.shiftKey;let i,o;if(t.inside>-1)i=e.state.doc.nodeAt(t.inside),o=t.inside;else{let d=e.state.doc.resolve(t.pos);i=d.parent,o=d.depth?d.before():0}const l=s?null:r.target,a=l?e.docView.nearestDesc(l,!0):null;this.target=a&&a.dom.nodeType==1?a.dom:null;let{selection:c}=e.state;(r.button==0&&i.type.spec.draggable&&i.type.spec.selectable!==!1||c instanceof w&&c.from<=o&&c.to>o)&&(this.mightDrag={node:i,pos:o,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&xe&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),_e(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>Be(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(Zn(e))),this.updateAllowDefault(e),this.allowDefault||!t?_e(this.view,"pointer"):af(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||oe&&this.mightDrag&&!this.mightDrag.node.isAtom||ne&&!this.view.state.selection.visible&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(Pt(this.view,E.near(this.view.state.doc.resolve(t.pos))),e.preventDefault()):_e(this.view,"pointer")}move(e){this.updateAllowDefault(e),_e(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}le.touchstart=n=>{n.input.lastTouch=Date.now(),Ks(n),_e(n,"pointer")},le.touchmove=n=>{n.input.lastTouch=Date.now(),_e(n,"pointer")},le.contextmenu=n=>Ks(n);function Gl(n,e){return n.composing?!0:oe&&Math.abs(e.timeStamp-n.input.compositionEndedAt)<500?(n.input.compositionEndedAt=-2e8,!0):!1}const hf=Ce?5e3:-1;ae.compositionstart=ae.compositionupdate=n=>{if(!n.composing){n.domObserver.flush();let{state:e}=n,t=e.selection.$to;if(e.selection instanceof A&&(e.storedMarks||!t.textOffset&&t.parentOffset&&t.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)))n.markCursor=n.state.storedMarks||t.marks(),er(n,!0),n.markCursor=null;else if(er(n,!e.selection.empty),xe&&e.selection.empty&&t.parentOffset&&!t.textOffset&&t.nodeBefore.marks.length){let r=n.domSelectionRange();for(let s=r.focusNode,i=r.focusOffset;s&&s.nodeType==1&&i!=0;){let o=i<0?s.lastChild:s.childNodes[i-1];if(!o)break;if(o.nodeType==3){let l=n.domSelection();l&&l.collapse(o,o.nodeValue.length);break}else s=o,i=-1}}n.input.composing=!0}Yl(n,hf)},ae.compositionend=(n,e)=>{n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=e.timeStamp,n.input.compositionPendingChanges=n.domObserver.pendingRecords().length?n.input.compositionID:0,n.input.compositionNode=null,n.input.compositionPendingChanges&&Promise.resolve().then(()=>n.domObserver.flush()),n.input.compositionID++,Yl(n,20))};function Yl(n,e){clearTimeout(n.input.composingTimeout),e>-1&&(n.input.composingTimeout=setTimeout(()=>er(n),e))}function Xl(n){for(n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=mf());n.input.compositionNodes.length>0;)n.input.compositionNodes.pop().markParentsDirty()}function pf(n){let e=n.domSelectionRange();if(!e.focusNode)return null;let t=iu(e.focusNode,e.focusOffset),r=ou(e.focusNode,e.focusOffset);if(t&&r&&t!=r){let s=r.pmViewDesc,i=n.domObserver.lastChangedTextNode;if(t==i||r==i)return i;if(!s||!s.isText(r.nodeValue))return r;if(n.input.compositionNode==r){let o=t.pmViewDesc;if(!(!o||!o.isText(t.nodeValue)))return r}}return t||r}function mf(){let n=document.createEvent("Event");return n.initEvent("event",!0,!0),n.timeStamp}function er(n,e=!1){if(!(Ce&&n.domObserver.flushingSoon>=0)){if(n.domObserver.forceFlush(),Xl(n),e||n.docView&&n.docView.dirty){let t=Ps(n);return t&&!t.eq(n.state.selection)?n.dispatch(n.state.tr.setSelection(t)):(n.markCursor||e)&&!n.state.selection.empty?n.dispatch(n.state.tr.deleteSelection()):n.updateState(n.state),!0}return!1}}function gf(n,e){if(!n.dom.parentNode)return;let t=n.dom.parentNode.appendChild(document.createElement("div"));t.appendChild(e),t.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),s=document.createRange();s.selectNodeContents(e),n.dom.blur(),r.removeAllRanges(),r.addRange(s),setTimeout(()=>{t.parentNode&&t.parentNode.removeChild(t),n.focus()},50)}const an=ce&&Je<15||Dt&&uu<604;le.copy=ae.cut=(n,e)=>{let t=e,r=n.state.selection,s=t.type=="cut";if(r.empty)return;let i=an?null:t.clipboardData,o=r.content(),{dom:l,text:a}=Fl(n,o);i?(t.preventDefault(),i.clearData(),i.setData("text/html",l.innerHTML),i.setData("text/plain",a)):gf(n,l),s&&n.dispatch(n.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function yf(n){return n.openStart==0&&n.openEnd==0&&n.content.childCount==1?n.content.firstChild:null}function bf(n,e){if(!n.dom.parentNode)return;let t=n.input.shiftKey||n.state.selection.$from.parent.type.spec.code,r=n.dom.parentNode.appendChild(document.createElement(t?"textarea":"div"));t||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let s=n.input.shiftKey&&n.input.lastKeyCode!=45;setTimeout(()=>{n.focus(),r.parentNode&&r.parentNode.removeChild(r),t?cn(n,r.value,null,s,e):cn(n,r.textContent,r.innerHTML,s,e)},50)}function cn(n,e,t,r,s){let i=$l(n,e,t,r,n.state.selection.$from);if(n.someProp("handlePaste",a=>a(n,s,i||x.empty)))return!0;if(!i)return!1;let o=yf(i),l=o?n.state.tr.replaceSelectionWith(o,r):n.state.tr.replaceSelection(i);return n.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function Ql(n){let e=n.getData("text/plain")||n.getData("Text");if(e)return e;let t=n.getData("text/uri-list");return t?t.replace(/\r?\n/g," "):""}ae.paste=(n,e)=>{let t=e;if(n.composing&&!Ce)return;let r=an?null:t.clipboardData,s=n.input.shiftKey&&n.input.lastKeyCode!=45;r&&cn(n,Ql(r),r.getData("text/html"),s,t)?t.preventDefault():bf(n,t)};class Zl{constructor(e,t,r){this.slice=e,this.move=t,this.node=r}}const ea=ge?"altKey":"ctrlKey";le.dragstart=(n,e)=>{let t=e,r=n.input.mouseDown;if(r&&r.done(),!t.dataTransfer)return;let s=n.state.selection,i=s.empty?null:n.posAtCoords(Zn(t)),o;if(!(i&&i.pos>=s.from&&i.pos<=(s instanceof w?s.to-1:s.to))){if(r&&r.mightDrag)o=w.create(n.state.doc,r.mightDrag.pos);else if(t.target&&t.target.nodeType==1){let u=n.docView.nearestDesc(t.target,!0);u&&u.node.type.spec.draggable&&u!=n.docView&&(o=w.create(n.state.doc,u.posBefore))}}let l=(o||n.state.selection).content(),{dom:a,text:c,slice:d}=Fl(n,l);(!t.dataTransfer.files.length||!ne||il>120)&&t.dataTransfer.clearData(),t.dataTransfer.setData(an?"Text":"text/html",a.innerHTML),t.dataTransfer.effectAllowed="copyMove",an||t.dataTransfer.setData("text/plain",c),n.dragging=new Zl(d,!t[ea],o)},le.dragend=n=>{let e=n.dragging;window.setTimeout(()=>{n.dragging==e&&(n.dragging=null)},50)},ae.dragover=ae.dragenter=(n,e)=>e.preventDefault(),ae.drop=(n,e)=>{let t=e,r=n.dragging;if(n.dragging=null,!t.dataTransfer)return;let s=n.posAtCoords(Zn(t));if(!s)return;let i=n.state.doc.resolve(s.pos),o=r&&r.slice;o?n.someProp("transformPasted",p=>{o=p(o,n)}):o=$l(n,Ql(t.dataTransfer),an?null:t.dataTransfer.getData("text/html"),!1,i);let l=!!(r&&!t[ea]);if(n.someProp("handleDrop",p=>p(n,t,o||x.empty,l))){t.preventDefault();return}if(!o)return;t.preventDefault();let a=o?Vo(n.state.doc,i.pos,o):i.pos;a==null&&(a=i.pos);let c=n.state.tr;if(l){let{node:p}=r;p?p.replace(c):c.deleteSelection()}let d=c.mapping.map(a),u=o.openStart==0&&o.openEnd==0&&o.content.childCount==1,f=c.doc;if(u?c.replaceRangeWith(d,d,o.content.firstChild):c.replaceRange(d,d,o),c.doc.eq(f))return;let h=c.doc.resolve(d);if(u&&w.isSelectable(o.content.firstChild)&&h.nodeAfter&&h.nodeAfter.sameMarkup(o.content.firstChild))c.setSelection(new w(h));else{let p=c.mapping.map(a);c.mapping.maps[c.mapping.maps.length-1].forEach((m,g,y,k)=>p=k),c.setSelection(Bs(n,h,c.doc.resolve(p)))}n.focus(),n.dispatch(c.setMeta("uiEvent","drop"))},le.focus=n=>{n.input.lastFocus=Date.now(),n.focused||(n.domObserver.stop(),n.dom.classList.add("ProseMirror-focused"),n.domObserver.start(),n.focused=!0,setTimeout(()=>{n.docView&&n.hasFocus()&&!n.domObserver.currentSelection.eq(n.domSelectionRange())&&Be(n)},20))},le.blur=(n,e)=>{let t=e;n.focused&&(n.domObserver.stop(),n.dom.classList.remove("ProseMirror-focused"),n.domObserver.start(),t.relatedTarget&&n.dom.contains(t.relatedTarget)&&n.domObserver.currentSelection.clear(),n.focused=!1)},le.beforeinput=(n,e)=>{if(ne&&Ce&&e.inputType=="deleteContentBackward"){n.domObserver.flushSoon();let{domChangeCount:r}=n.input;setTimeout(()=>{if(n.input.domChangeCount!=r||(n.dom.blur(),n.focus(),n.someProp("handleKeyDown",i=>i(n,ft(8,"Backspace")))))return;let{$cursor:s}=n.state.selection;s&&s.pos>0&&n.dispatch(n.state.tr.delete(s.pos-1,s.pos).scrollIntoView())},50)}};for(let n in ae)le[n]=ae[n];function dn(n,e){if(n==e)return!0;for(let t in n)if(n[t]!==e[t])return!1;for(let t in e)if(!(t in n))return!1;return!0}class cs{constructor(e,t){this.toDOM=e,this.spec=t||mt,this.side=this.spec.side||0}map(e,t,r,s){let{pos:i,deleted:o}=e.mapResult(t.from+s,this.side<0?-1:1);return o?null:new ie(i-r,i-r,this)}valid(){return!0}eq(e){return this==e||e instanceof cs&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&dn(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class rt{constructor(e,t){this.attrs=e,this.spec=t||mt}map(e,t,r,s){let i=e.map(t.from+s,this.spec.inclusiveStart?-1:1)-r,o=e.map(t.to+s,this.spec.inclusiveEnd?1:-1)-r;return i>=o?null:new ie(i,o,this)}valid(e,t){return t.from<t.to}eq(e){return this==e||e instanceof rt&&dn(this.attrs,e.attrs)&&dn(this.spec,e.spec)}static is(e){return e.type instanceof rt}destroy(){}}class Zi{constructor(e,t){this.attrs=e,this.spec=t||mt}map(e,t,r,s){let i=e.mapResult(t.from+s,1);if(i.deleted)return null;let o=e.mapResult(t.to+s,-1);return o.deleted||o.pos<=i.pos?null:new ie(i.pos-r,o.pos-r,this)}valid(e,t){let{index:r,offset:s}=e.content.findIndex(t.from),i;return s==t.from&&!(i=e.child(r)).isText&&s+i.nodeSize==t.to}eq(e){return this==e||e instanceof Zi&&dn(this.attrs,e.attrs)&&dn(this.spec,e.spec)}destroy(){}}class ie{constructor(e,t,r){this.from=e,this.to=t,this.type=r}copy(e,t){return new ie(e,t,this.type)}eq(e,t=0){return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}map(e,t,r){return this.type.map(e,this,t,r)}static widget(e,t,r){return new ie(e,e,new cs(t,r))}static inline(e,t,r,s){return new ie(e,t,new rt(r,s))}static node(e,t,r,s){return new ie(e,t,new Zi(r,s))}get spec(){return this.type.spec}get inline(){return this.type instanceof rt}get widget(){return this.type instanceof cs}}const Lt=[],mt={};class F{constructor(e,t){this.local=e.length?e:Lt,this.children=t.length?t:Lt}static create(e,t){return t.length?tr(t,e,0,mt):re}find(e,t,r){let s=[];return this.findInner(e??0,t??1e9,s,0,r),s}findInner(e,t,r,s,i){for(let o=0;o<this.local.length;o++){let l=this.local[o];l.from<=t&&l.to>=e&&(!i||i(l.spec))&&r.push(l.copy(l.from+s,l.to+s))}for(let o=0;o<this.children.length;o+=3)if(this.children[o]<t&&this.children[o+1]>e){let l=this.children[o]+1;this.children[o+2].findInner(e-l,t-l,r,s+l,i)}}map(e,t,r){return this==re||e.maps.length==0?this:this.mapInner(e,t,0,0,r||mt)}mapInner(e,t,r,s,i){let o;for(let l=0;l<this.local.length;l++){let a=this.local[l].map(e,r,s);a&&a.type.valid(t,a)?(o||(o=[])).push(a):i.onRemove&&i.onRemove(this.local[l].spec)}return this.children.length?kf(this.children,o||[],e,t,r,s,i):o?new F(o.sort(gt),Lt):re}add(e,t){return t.length?this==re?F.create(e,t):this.addInner(e,t,0):this}addInner(e,t,r){let s,i=0;e.forEach((l,a)=>{let c=a+r,d;if(d=na(t,l,c)){for(s||(s=this.children.slice());i<s.length&&s[i]<a;)i+=3;s[i]==a?s[i+2]=s[i+2].addInner(l,d,c+1):s.splice(i,0,a,a+l.nodeSize,tr(d,l,c+1,mt)),i+=3}});let o=ta(i?ra(t):t,-r);for(let l=0;l<o.length;l++)o[l].type.valid(e,o[l])||o.splice(l--,1);return new F(o.length?this.local.concat(o).sort(gt):this.local,s||this.children)}remove(e){return e.length==0||this==re?this:this.removeInner(e,0)}removeInner(e,t){let r=this.children,s=this.local;for(let i=0;i<r.length;i+=3){let o,l=r[i]+t,a=r[i+1]+t;for(let d=0,u;d<e.length;d++)(u=e[d])&&u.from>l&&u.to<a&&(e[d]=null,(o||(o=[])).push(u));if(!o)continue;r==this.children&&(r=this.children.slice());let c=r[i+2].removeInner(o,l+1);c!=re?r[i+2]=c:(r.splice(i,3),i-=3)}if(s.length){for(let i=0,o;i<e.length;i++)if(o=e[i])for(let l=0;l<s.length;l++)s[l].eq(o,t)&&(s==this.local&&(s=this.local.slice()),s.splice(l--,1))}return r==this.children&&s==this.local?this:s.length||r.length?new F(s,r):re}forChild(e,t){if(this==re)return this;if(t.isLeaf)return F.empty;let r,s;for(let l=0;l<this.children.length;l+=3)if(this.children[l]>=e){this.children[l]==e&&(r=this.children[l+2]);break}let i=e+1,o=i+t.content.size;for(let l=0;l<this.local.length;l++){let a=this.local[l];if(a.from<o&&a.to>i&&a.type instanceof rt){let c=Math.max(i,a.from)-i,d=Math.min(o,a.to)-i;c<d&&(s||(s=[])).push(a.copy(c,d))}}if(s){let l=new F(s.sort(gt),Lt);return r?new st([l,r]):l}return r||re}eq(e){if(this==e)return!0;if(!(e instanceof F)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let t=0;t<this.local.length;t++)if(!this.local[t].eq(e.local[t]))return!1;for(let t=0;t<this.children.length;t+=3)if(this.children[t]!=e.children[t]||this.children[t+1]!=e.children[t+1]||!this.children[t+2].eq(e.children[t+2]))return!1;return!0}locals(e){return Js(this.localsInner(e))}localsInner(e){if(this==re)return Lt;if(e.inlineContent||!this.local.some(rt.is))return this.local;let t=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof rt||t.push(this.local[r]);return t}forEachSet(e){e(this)}}F.empty=new F([],[]),F.removeOverlap=Js;const re=F.empty;class st{constructor(e){this.members=e}map(e,t){const r=this.members.map(s=>s.map(e,t,mt));return st.from(r)}forChild(e,t){if(t.isLeaf)return F.empty;let r=[];for(let s=0;s<this.members.length;s++){let i=this.members[s].forChild(e,t);i!=re&&(i instanceof st?r=r.concat(i.members):r.push(i))}return st.from(r)}eq(e){if(!(e instanceof st)||e.members.length!=this.members.length)return!1;for(let t=0;t<this.members.length;t++)if(!this.members[t].eq(e.members[t]))return!1;return!0}locals(e){let t,r=!0;for(let s=0;s<this.members.length;s++){let i=this.members[s].localsInner(e);if(i.length)if(!t)t=i;else{r&&(t=t.slice(),r=!1);for(let o=0;o<i.length;o++)t.push(i[o])}}return t?Js(r?t:t.sort(gt)):Lt}static from(e){switch(e.length){case 0:return re;case 1:return e[0];default:return new st(e.every(t=>t instanceof F)?e:e.reduce((t,r)=>t.concat(r instanceof F?r:r.members),[]))}}forEachSet(e){for(let t=0;t<this.members.length;t++)this.members[t].forEachSet(e)}}function kf(n,e,t,r,s,i,o){let l=n.slice();for(let c=0,d=i;c<t.maps.length;c++){let u=0;t.maps[c].forEach((f,h,p,m)=>{let g=m-p-(h-f);for(let y=0;y<l.length;y+=3){let k=l[y+1];if(k<0||f>k+d-u)continue;let T=l[y]+d-u;h>=T?l[y+1]=f<=T?-2:-1:f>=d&&g&&(l[y]+=g,l[y+1]+=g)}u+=g}),d=t.maps[c].map(d,-1)}let a=!1;for(let c=0;c<l.length;c+=3)if(l[c+1]<0){if(l[c+1]==-2){a=!0,l[c+1]=-1;continue}let d=t.map(n[c]+i),u=d-s;if(u<0||u>=r.content.size){a=!0;continue}let f=t.map(n[c+1]+i,-1),h=f-s,{index:p,offset:m}=r.content.findIndex(u),g=r.maybeChild(p);if(g&&m==u&&m+g.nodeSize==h){let y=l[c+2].mapInner(t,g,d+1,n[c]+i+1,o);y!=re?(l[c]=u,l[c+1]=h,l[c+2]=y):(l[c+1]=-2,a=!0)}else a=!0}if(a){let c=Sf(l,n,e,t,s,i,o),d=tr(c,r,0,o);e=d.local;for(let u=0;u<l.length;u+=3)l[u+1]<0&&(l.splice(u,3),u-=3);for(let u=0,f=0;u<d.children.length;u+=3){let h=d.children[u];for(;f<l.length&&l[f]<h;)f+=3;l.splice(f,0,d.children[u],d.children[u+1],d.children[u+2])}}return new F(e.sort(gt),l)}function ta(n,e){if(!e||!n.length)return n;let t=[];for(let r=0;r<n.length;r++){let s=n[r];t.push(new ie(s.from+e,s.to+e,s.type))}return t}function Sf(n,e,t,r,s,i,o){function l(a,c){for(let d=0;d<a.local.length;d++){let u=a.local[d].map(r,s,c);u?t.push(u):o.onRemove&&o.onRemove(a.local[d].spec)}for(let d=0;d<a.children.length;d+=3)l(a.children[d+2],a.children[d]+c+1)}for(let a=0;a<n.length;a+=3)n[a+1]==-1&&l(n[a+2],e[a]+i+1);return t}function na(n,e,t){if(e.isLeaf)return null;let r=t+e.nodeSize,s=null;for(let i=0,o;i<n.length;i++)(o=n[i])&&o.from>t&&o.to<r&&((s||(s=[])).push(o),n[i]=null);return s}function ra(n){let e=[];for(let t=0;t<n.length;t++)n[t]!=null&&e.push(n[t]);return e}function tr(n,e,t,r){let s=[],i=!1;e.forEach((l,a)=>{let c=na(n,l,a+t);if(c){i=!0;let d=tr(c,l,t+a+1,r);d!=re&&s.push(a,a+l.nodeSize,d)}});let o=ta(i?ra(n):n,-t).sort(gt);for(let l=0;l<o.length;l++)o[l].type.valid(e,o[l])||(r.onRemove&&r.onRemove(o[l].spec),o.splice(l--,1));return o.length||s.length?new F(o,s):re}function gt(n,e){return n.from-e.from||n.to-e.to}function Js(n){let e=n;for(let t=0;t<e.length-1;t++){let r=e[t];if(r.from!=r.to)for(let s=t+1;s<e.length;s++){let i=e[s];if(i.from==r.from){i.to!=r.to&&(e==n&&(e=n.slice()),e[s]=i.copy(i.from,r.to),sa(e,s+1,i.copy(r.to,i.to)));continue}else{i.from<r.to&&(e==n&&(e=n.slice()),e[t]=r.copy(r.from,i.from),sa(e,s,r.copy(i.from,r.to)));break}}}return e}function sa(n,e,t){for(;e<n.length&&gt(t,n[e])>0;)e++;n.splice(e,0,t)}function Us(n){let e=[];return n.someProp("decorations",t=>{let r=t(n.state);r&&r!=re&&e.push(r)}),n.cursorWrapper&&e.push(F.create(n.state.doc,[n.cursorWrapper.deco])),st.from(e)}const xf={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Cf=ce&&Je<=11;class wf{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class Mf{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new wf,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let s=0;s<r.length;s++)this.queue.push(r[s]);ce&&Je<=11&&r.some(s=>s.type=="childList"&&s.removedNodes.length||s.type=="characterData"&&s.oldValue.length>s.target.nodeValue.length)?this.flushSoon():this.flush()}),Cf&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,xf)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let t=0;t<e.length;t++)this.queue.push(e[t]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(Dl(this.view)){if(this.suppressingSelectionUpdates)return Be(this.view);if(ce&&Je<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&ut(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let t=new Set,r;for(let i=e.focusNode;i;i=en(i))t.add(i);for(let i=e.anchorNode;i;i=en(i))if(t.has(i)){r=i;break}let s=r&&this.view.docView.nearestDesc(r);if(s&&s.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let t=this.pendingRecords();t.length&&(this.queue=[]);let r=e.domSelectionRange(),s=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&Dl(e)&&!this.ignoreSelectionChange(r),i=-1,o=-1,l=!1,a=[];if(e.editable)for(let d=0;d<t.length;d++){let u=this.registerMutation(t[d],a);u&&(i=i<0?u.from:Math.min(u.from,i),o=o<0?u.to:Math.max(u.to,o),u.typeOver&&(l=!0))}if(xe&&a.length){let d=a.filter(u=>u.nodeName=="BR");if(d.length==2){let[u,f]=d;u.parentNode&&u.parentNode.parentNode==f.parentNode?f.remove():u.remove()}else{let{focusNode:u}=this.currentSelection;for(let f of d){let h=f.parentNode;h&&h.nodeName=="LI"&&(!u||Ef(e,u)!=h)&&f.remove()}}}let c=null;i<0&&s&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&Yn(r)&&(c=Ps(e))&&c.eq(E.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,Be(e),this.currentSelection.set(r),e.scrollToSelection()):(i>-1||s)&&(i>-1&&(e.docView.markDirty(i,o),Tf(e)),this.handleDOMChange(i,o,l,a),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||Be(e),this.currentSelection.set(r))}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let r=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(r==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!r||r.ignoreMutation(e))return null;if(e.type=="childList"){for(let d=0;d<e.addedNodes.length;d++){let u=e.addedNodes[d];t.push(u),u.nodeType==3&&(this.lastChangedTextNode=u)}if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(e.target))return{from:r.posBefore,to:r.posAfter};let s=e.previousSibling,i=e.nextSibling;if(ce&&Je<=11&&e.addedNodes.length)for(let d=0;d<e.addedNodes.length;d++){let{previousSibling:u,nextSibling:f}=e.addedNodes[d];(!u||Array.prototype.indexOf.call(e.addedNodes,u)<0)&&(s=u),(!f||Array.prototype.indexOf.call(e.addedNodes,f)<0)&&(i=f)}let o=s&&s.parentNode==e.target?Z(s)+1:0,l=r.localPosFromDOM(e.target,o,-1),a=i&&i.parentNode==e.target?Z(i):e.target.childNodes.length,c=r.localPosFromDOM(e.target,a,1);return{from:l,to:c}}else return e.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:(this.lastChangedTextNode=e.target,{from:r.posAtStart,to:r.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let ia=new WeakMap,oa=!1;function Tf(n){if(!ia.has(n)&&(ia.set(n,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(n.dom).whiteSpace)!==-1)){if(n.requiresGeckoHackNode=xe,oa)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),oa=!0}}function la(n,e){let t=e.startContainer,r=e.startOffset,s=e.endContainer,i=e.endOffset,o=n.domAtPos(n.state.selection.anchor);return ut(o.node,o.offset,s,i)&&([t,r,s,i]=[s,i,t,r]),{anchorNode:t,anchorOffset:r,focusNode:s,focusOffset:i}}function Af(n,e){if(e.getComposedRanges){let s=e.getComposedRanges(n.root)[0];if(s)return la(n,s)}let t;function r(s){s.preventDefault(),s.stopImmediatePropagation(),t=s.getTargetRanges()[0]}return n.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),n.dom.removeEventListener("beforeinput",r,!0),t?la(n,t):null}function Ef(n,e){for(let t=e.parentNode;t&&t!=n.dom;t=t.parentNode){let r=n.docView.nearestDesc(t,!0);if(r&&r.node.isBlock)return t}return null}function Of(n,e,t){let{node:r,fromOffset:s,toOffset:i,from:o,to:l}=n.docView.parseRange(e,t),a=n.domSelectionRange(),c,d=a.anchorNode;if(d&&n.dom.contains(d.nodeType==1?d:d.parentNode)&&(c=[{node:d,offset:a.anchorOffset}],Yn(a)||c.push({node:a.focusNode,offset:a.focusOffset})),ne&&n.input.lastKeyCode===8)for(let g=i;g>s;g--){let y=r.childNodes[g-1],k=y.pmViewDesc;if(y.nodeName=="BR"&&!k){i=g;break}if(!k||k.size)break}let u=n.state.doc,f=n.someProp("domParser")||We.fromSchema(n.state.schema),h=u.resolve(o),p=null,m=f.parse(r,{topNode:h.parent,topMatch:h.parent.contentMatchAt(h.index()),topOpen:!0,from:s,to:i,preserveWhitespace:h.parent.type.whitespace=="pre"?"full":!0,findPositions:c,ruleFromNode:Nf,context:h});if(c&&c[0].pos!=null){let g=c[0].pos,y=c[1]&&c[1].pos;y==null&&(y=g),p={anchor:g+o,head:y+o}}return{doc:m,sel:p,from:o,to:l}}function Nf(n){let e=n.pmViewDesc;if(e)return e.parseRule();if(n.nodeName=="BR"&&n.parentNode){if(oe&&/^(ul|ol)$/i.test(n.parentNode.nodeName)){let t=document.createElement("div");return t.appendChild(document.createElement("li")),{skip:t}}else if(n.parentNode.lastChild==n||oe&&/^(tr|table)$/i.test(n.parentNode.nodeName))return{ignore:!0}}else if(n.nodeName=="IMG"&&n.getAttribute("mark-placeholder"))return{ignore:!0};return null}const Rf=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function Df(n,e,t,r,s){let i=n.input.compositionPendingChanges||(n.composing?n.input.compositionID:0);if(n.input.compositionPendingChanges=0,e<0){let I=n.input.lastSelectionTime>Date.now()-50?n.input.lastSelectionOrigin:null,pe=Ps(n,I);if(pe&&!n.state.selection.eq(pe)){if(ne&&Ce&&n.input.lastKeyCode===13&&Date.now()-100<n.input.lastKeyCodeTime&&n.someProp("handleKeyDown",_t=>_t(n,ft(13,"Enter"))))return;let at=n.state.tr.setSelection(pe);I=="pointer"?at.setMeta("pointer",!0):I=="key"&&at.scrollIntoView(),i&&at.setMeta("composition",i),n.dispatch(at)}return}let o=n.state.doc.resolve(e),l=o.sharedDepth(t);e=o.before(l+1),t=n.state.doc.resolve(t).after(l+1);let a=n.state.selection,c=Of(n,e,t),d=n.state.doc,u=d.slice(c.from,c.to),f,h;n.input.lastKeyCode===8&&Date.now()-100<n.input.lastKeyCodeTime?(f=n.state.selection.to,h="end"):(f=n.state.selection.from,h="start"),n.input.lastKeyCode=null;let p=Pf(u.content,c.doc.content,c.from,f,h);if(p&&n.input.domChangeCount++,(Dt&&n.input.lastIOSEnter>Date.now()-225||Ce)&&s.some(I=>I.nodeType==1&&!Rf.test(I.nodeName))&&(!p||p.endA>=p.endB)&&n.someProp("handleKeyDown",I=>I(n,ft(13,"Enter")))){n.input.lastIOSEnter=0;return}if(!p)if(r&&a instanceof A&&!a.empty&&a.$head.sameParent(a.$anchor)&&!n.composing&&!(c.sel&&c.sel.anchor!=c.sel.head))p={start:a.from,endA:a.to,endB:a.to};else{if(c.sel){let I=aa(n,n.state.doc,c.sel);if(I&&!I.eq(n.state.selection)){let pe=n.state.tr.setSelection(I);i&&pe.setMeta("composition",i),n.dispatch(pe)}}return}n.state.selection.from<n.state.selection.to&&p.start==p.endB&&n.state.selection instanceof A&&(p.start>n.state.selection.from&&p.start<=n.state.selection.from+2&&n.state.selection.from>=c.from?p.start=n.state.selection.from:p.endA<n.state.selection.to&&p.endA>=n.state.selection.to-2&&n.state.selection.to<=c.to&&(p.endB+=n.state.selection.to-p.endA,p.endA=n.state.selection.to)),ce&&Je<=11&&p.endB==p.start+1&&p.endA==p.start&&p.start>c.from&&c.doc.textBetween(p.start-c.from-1,p.start-c.from+1)==" \xA0"&&(p.start--,p.endA--,p.endB--);let m=c.doc.resolveNoCache(p.start-c.from),g=c.doc.resolveNoCache(p.endB-c.from),y=d.resolve(p.start),k=m.sameParent(g)&&m.parent.inlineContent&&y.end()>=p.endA,T;if((Dt&&n.input.lastIOSEnter>Date.now()-225&&(!k||s.some(I=>I.nodeName=="DIV"||I.nodeName=="P"))||!k&&m.pos<c.doc.content.size&&!m.sameParent(g)&&(T=E.findFrom(c.doc.resolve(m.pos+1),1,!0))&&T.head==g.pos)&&n.someProp("handleKeyDown",I=>I(n,ft(13,"Enter")))){n.input.lastIOSEnter=0;return}if(n.state.selection.anchor>p.start&&vf(d,p.start,p.endA,m,g)&&n.someProp("handleKeyDown",I=>I(n,ft(8,"Backspace")))){Ce&&ne&&n.domObserver.suppressSelectionUpdates();return}ne&&Ce&&p.endB==p.start&&(n.input.lastAndroidDelete=Date.now()),Ce&&!k&&m.start()!=g.start()&&g.parentOffset==0&&m.depth==g.depth&&c.sel&&c.sel.anchor==c.sel.head&&c.sel.head==p.endA&&(p.endB-=2,g=c.doc.resolveNoCache(p.endB-c.from),setTimeout(()=>{n.someProp("handleKeyDown",function(I){return I(n,ft(13,"Enter"))})},20));let D=p.start,M=p.endA,R,z,j;if(k){if(m.pos==g.pos)ce&&Je<=11&&m.parentOffset==0&&(n.domObserver.suppressSelectionUpdates(),setTimeout(()=>Be(n),20)),R=n.state.tr.delete(D,M),z=d.resolve(p.start).marksAcross(d.resolve(p.endA));else if(p.endA==p.endB&&(j=If(m.parent.content.cut(m.parentOffset,g.parentOffset),y.parent.content.cut(y.parentOffset,p.endA-y.start()))))R=n.state.tr,j.type=="add"?R.addMark(D,M,j.mark):R.removeMark(D,M,j.mark);else if(m.parent.child(m.index()).isText&&m.index()==g.index()-(g.textOffset?0:1)){let I=m.parent.textBetween(m.parentOffset,g.parentOffset);if(n.someProp("handleTextInput",pe=>pe(n,D,M,I)))return;R=n.state.tr.insertText(I,D,M)}}if(R||(R=n.state.tr.replace(D,M,c.doc.slice(p.start-c.from,p.endB-c.from))),c.sel){let I=aa(n,R.doc,c.sel);I&&!(ne&&Ce&&n.composing&&I.empty&&(p.start!=p.endB||n.input.lastAndroidDelete<Date.now()-100)&&(I.head==D||I.head==R.mapping.map(M)-1)||ce&&I.empty&&I.head==D)&&R.setSelection(I)}z&&R.ensureMarks(z),i&&R.setMeta("composition",i),n.dispatch(R.scrollIntoView())}function aa(n,e,t){return Math.max(t.anchor,t.head)>e.content.size?null:Bs(n,e.resolve(t.anchor),e.resolve(t.head))}function If(n,e){let t=n.firstChild.marks,r=e.firstChild.marks,s=t,i=r,o,l,a;for(let d=0;d<r.length;d++)s=r[d].removeFromSet(s);for(let d=0;d<t.length;d++)i=t[d].removeFromSet(i);if(s.length==1&&i.length==0)l=s[0],o="add",a=d=>d.mark(l.addToSet(d.marks));else if(s.length==0&&i.length==1)l=i[0],o="remove",a=d=>d.mark(l.removeFromSet(d.marks));else return null;let c=[];for(let d=0;d<e.childCount;d++)c.push(a(e.child(d)));if(b.from(c).eq(n))return{mark:l,type:o}}function vf(n,e,t,r,s){if(t-e<=s.pos-r.pos||qs(r,!0,!1)<s.pos)return!1;let i=n.resolve(e);if(!r.parent.isTextblock){let l=i.nodeAfter;return l!=null&&t==e+l.nodeSize}if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;let o=n.resolve(qs(i,!0,!0));return!o.parent.isTextblock||o.pos>t||qs(o,!0,!1)<t?!1:r.parent.content.cut(r.parentOffset).eq(o.parent.content)}function qs(n,e,t){let r=n.depth,s=e?n.end():n.pos;for(;r>0&&(e||n.indexAfter(r)==n.node(r).childCount);)r--,s++,e=!1;if(t){let i=n.node(r).maybeChild(n.indexAfter(r));for(;i&&!i.isLeaf;)i=i.firstChild,s++}return s}function Pf(n,e,t,r,s){let i=n.findDiffStart(e,t);if(i==null)return null;let{a:o,b:l}=n.findDiffEnd(e,t+n.size,t+e.size);if(s=="end"){let a=Math.max(0,i-Math.min(o,l));r-=o+a-i}if(o<i&&n.size<e.size){let a=r<=i&&r>=o?i-r:0;i-=a,i&&i<e.size&&ca(e.textBetween(i-1,i+1))&&(i+=a?1:-1),l=i+(l-o),o=i}else if(l<i){let a=r<=i&&r>=l?i-r:0;i-=a,i&&i<n.size&&ca(n.textBetween(i-1,i+1))&&(i+=a?1:-1),o=i+(o-l),l=i}return{start:i,endA:o,endB:l}}function ca(n){if(n.length!=2)return!1;let e=n.charCodeAt(0),t=n.charCodeAt(1);return e>=56320&&e<=57343&&t>=55296&&t<=56319}class Lf{constructor(e,t){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new Zu,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(pa),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=fa(this),ua(this),this.nodeViews=ha(this),this.docView=kl(this.state.doc,da(this),Us(this),this.dom,this),this.domObserver=new Mf(this,(r,s,i,o)=>Df(this,r,s,i,o)),this.domObserver.start(),ef(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&Vs(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(pa),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let r in this._props)t[r]=this._props[r];t.state=this.state;for(let r in e)t[r]=e[r];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){var r;let s=this.state,i=!1,o=!1;e.storedMarks&&this.composing&&(Xl(this),o=!0),this.state=e;let l=s.plugins!=e.plugins||this._props.plugins!=t.plugins;if(l||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let h=ha(this);zf(h,this.nodeViews)&&(this.nodeViews=h,i=!0)}(l||t.handleDOMEvents!=this._props.handleDOMEvents)&&Vs(this),this.editable=fa(this),ua(this);let a=Us(this),c=da(this),d=s.plugins!=e.plugins&&!s.doc.eq(e.doc)?"reset":e.scrollToSelection>s.scrollToSelection?"to selection":"preserve",u=i||!this.docView.matchesNode(e.doc,c,a);(u||!e.selection.eq(s.selection))&&(o=!0);let f=d=="preserve"&&o&&this.dom.style.overflowAnchor==null&&pu(this);if(o){this.domObserver.stop();let h=u&&(ce||ne)&&!this.composing&&!s.selection.empty&&!e.selection.empty&&Bf(s.selection,e.selection);if(u){let p=ne?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=pf(this)),(i||!this.docView.update(e.doc,c,a,this))&&(this.docView.updateOuterDeco(c),this.docView.destroy(),this.docView=kl(e.doc,c,a,this.dom,this)),p&&!this.trackWrites&&(h=!0)}h||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&Hu(this))?Be(this,h):(Nl(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(s),!((r=this.dragging)===null||r===void 0)&&r.node&&!s.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,s),d=="reset"?this.dom.scrollTop=0:d=="to selection"?this.scrollToSelection():f&&mu(f)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!this.someProp("handleScrollToSelection",t=>t(this)))if(this.state.selection instanceof w){let t=this.docView.domAfterPos(this.state.selection.from);t.nodeType==1&&ol(this,t.getBoundingClientRect(),e)}else ol(this,this.coordsAtPos(this.state.selection.head,1),e)}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let t=0;t<this.directPlugins.length;t++){let r=this.directPlugins[t];r.spec.view&&this.pluginViews.push(r.spec.view(this))}for(let t=0;t<this.state.plugins.length;t++){let r=this.state.plugins[t];r.spec.view&&this.pluginViews.push(r.spec.view(this))}}else for(let t=0;t<this.pluginViews.length;t++){let r=this.pluginViews[t];r.update&&r.update(this,e)}}updateDraggedNode(e,t){let r=e.node,s=-1;if(this.state.doc.nodeAt(r.from)==r.node)s=r.from;else{let i=r.from+(this.state.doc.content.size-t.doc.content.size);(i>0&&this.state.doc.nodeAt(i))==r.node&&(s=i)}this.dragging=new Zl(e.slice,e.move,s<0?void 0:w.create(this.state.doc,s))}someProp(e,t){let r=this._props&&this._props[e],s;if(r!=null&&(s=t?t(r):r))return s;for(let o=0;o<this.directPlugins.length;o++){let l=this.directPlugins[o].props[e];if(l!=null&&(s=t?t(l):l))return s}let i=this.state.plugins;if(i)for(let o=0;o<i.length;o++){let l=i[o].props[e];if(l!=null&&(s=t?t(l):l))return s}}hasFocus(){if(ce){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if(e.contentEditable=="false")return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&gu(this.dom),Be(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let t=this.dom.parentNode;t;t=t.parentNode)if(t.nodeType==9||t.nodeType==11&&t.host)return t.getSelection||(Object.getPrototypeOf(t).getSelection=()=>t.ownerDocument.getSelection()),this._root=t}return e||document}updateRoot(){this._root=null}posAtCoords(e){return xu(this,e)}coordsAtPos(e,t=1){return fl(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,r=-1){let s=this.docView.posFromDOM(e,t,r);if(s==null)throw new RangeError("DOM position not inside the editor");return s}endOfTextblock(e,t){return Au(this,t||this.state,e)}pasteHTML(e,t){return cn(this,"",e,!1,t||new ClipboardEvent("paste"))}pasteText(e,t){return cn(this,e,null,!0,t||new ClipboardEvent("paste"))}destroy(){this.docView&&(tf(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Us(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,ru())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return rf(this,e)}dispatch(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))}domSelectionRange(){let e=this.domSelection();return e?oe&&this.root.nodeType===11&&au(this.dom.ownerDocument)==this.dom&&Af(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function da(n){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(n.editable),n.someProp("attributes",t=>{if(typeof t=="function"&&(t=t(n.state)),t)for(let r in t)r=="class"?e.class+=" "+t[r]:r=="style"?e.style=(e.style?e.style+";":"")+t[r]:!e[r]&&r!="contenteditable"&&r!="nodeName"&&(e[r]=String(t[r]))}),e.translate||(e.translate="no"),[ie.node(0,n.state.doc.content.size,e)]}function ua(n){if(n.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),n.cursorWrapper={dom:e,deco:ie.widget(n.state.selection.from,e,{raw:!0,marks:n.markCursor})}}else n.cursorWrapper=null}function fa(n){return!n.someProp("editable",e=>e(n.state)===!1)}function Bf(n,e){let t=Math.min(n.$anchor.sharedDepth(n.head),e.$anchor.sharedDepth(e.head));return n.$anchor.start(t)!=e.$anchor.start(t)}function ha(n){let e=Object.create(null);function t(r){for(let s in r)Object.prototype.hasOwnProperty.call(e,s)||(e[s]=r[s])}return n.someProp("nodeViews",t),n.someProp("markViews",t),e}function zf(n,e){let t=0,r=0;for(let s in n){if(n[s]!=e[s])return!0;t++}for(let s in e)r++;return t!=r}function pa(n){if(n.spec.state||n.spec.filterTransaction||n.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}for(var Ge={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},nr={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Hf=typeof navigator<"u"&&/Mac/.test(navigator.platform),Ff=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),ee=0;ee<10;ee++)Ge[48+ee]=Ge[96+ee]=String(ee);for(var ee=1;ee<=24;ee++)Ge[ee+111]="F"+ee;for(var ee=65;ee<=90;ee++)Ge[ee]=String.fromCharCode(ee+32),nr[ee]=String.fromCharCode(ee);for(var _s in Ge)nr.hasOwnProperty(_s)||(nr[_s]=Ge[_s]);function $f(n){var e=Hf&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||Ff&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?nr:Ge)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}const Vf=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function Wf(n){let e=n.split(/-(?!$)/),t=e[e.length-1];t=="Space"&&(t=" ");let r,s,i,o;for(let l=0;l<e.length-1;l++){let a=e[l];if(/^(cmd|meta|m)$/i.test(a))o=!0;else if(/^a(lt)?$/i.test(a))r=!0;else if(/^(c|ctrl|control)$/i.test(a))s=!0;else if(/^s(hift)?$/i.test(a))i=!0;else if(/^mod$/i.test(a))Vf?o=!0:s=!0;else throw new Error("Unrecognized modifier name: "+a)}return r&&(t="Alt-"+t),s&&(t="Ctrl-"+t),o&&(t="Meta-"+t),i&&(t="Shift-"+t),t}function jf(n){let e=Object.create(null);for(let t in n)e[Wf(t)]=n[t];return e}function Gs(n,e,t=!0){return e.altKey&&(n="Alt-"+n),e.ctrlKey&&(n="Ctrl-"+n),e.metaKey&&(n="Meta-"+n),t&&e.shiftKey&&(n="Shift-"+n),n}function Kf(n){return new K({props:{handleKeyDown:Ys(n)}})}function Ys(n){let e=jf(n);return function(t,r){let s=$f(r),i,o=e[Gs(s,r)];if(o&&o(t.state,t.dispatch,t))return!0;if(s.length==1&&s!=" "){if(r.shiftKey){let l=e[Gs(s,r,!1)];if(l&&l(t.state,t.dispatch,t))return!0}if((r.shiftKey||r.altKey||r.metaKey||s.charCodeAt(0)>127)&&(i=Ge[r.keyCode])&&i!=s){let l=e[Gs(i,r)];if(l&&l(t.state,t.dispatch,t))return!0}}return!1}}const Jf=(n,e)=>n.selection.empty?!1:(e&&e(n.tr.deleteSelection().scrollIntoView()),!0);function ma(n,e){let{$cursor:t}=n.selection;return!t||(e?!e.endOfTextblock("backward",n):t.parentOffset>0)?null:t}const Uf=(n,e,t)=>{let r=ma(n,t);if(!r)return!1;let s=Xs(r);if(!s){let o=r.blockRange(),l=o&&Et(o);return l==null?!1:(e&&e(n.tr.lift(o,l).scrollIntoView()),!0)}let i=s.nodeBefore;if(ka(n,s,e,-1))return!0;if(r.parent.content.size==0&&(Bt(i,"end")||w.isSelectable(i)))for(let o=r.depth;;o--){let l=Gn(n.doc,r.before(o),r.after(o),x.empty);if(l&&l.slice.size<l.to-l.from){if(e){let a=n.tr.step(l);a.setSelection(Bt(i,"end")?E.findFrom(a.doc.resolve(a.mapping.map(s.pos,-1)),-1):w.create(a.doc,s.pos-i.nodeSize)),e(a.scrollIntoView())}return!0}if(o==1||r.node(o-1).childCount>1)break}return i.isAtom&&s.depth==r.depth-1?(e&&e(n.tr.delete(s.pos-i.nodeSize,s.pos).scrollIntoView()),!0):!1},qf=(n,e,t)=>{let r=ma(n,t);if(!r)return!1;let s=Xs(r);return s?ga(n,s,e):!1},_f=(n,e,t)=>{let r=ya(n,t);if(!r)return!1;let s=Qs(r);return s?ga(n,s,e):!1};function ga(n,e,t){let r=e.nodeBefore,s=r,i=e.pos-1;for(;!s.isTextblock;i--){if(s.type.spec.isolating)return!1;let d=s.lastChild;if(!d)return!1;s=d}let o=e.nodeAfter,l=o,a=e.pos+1;for(;!l.isTextblock;a++){if(l.type.spec.isolating)return!1;let d=l.firstChild;if(!d)return!1;l=d}let c=Gn(n.doc,i,a,x.empty);if(!c||c.from!=i||c instanceof Y&&c.slice.size>=a-i)return!1;if(t){let d=n.tr.step(c);d.setSelection(A.create(d.doc,i)),t(d.scrollIntoView())}return!0}function Bt(n,e,t=!1){for(let r=n;r;r=e=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(t&&r.childCount!=1)return!1}return!1}const Gf=(n,e,t)=>{let{$head:r,empty:s}=n.selection,i=r;if(!s)return!1;if(r.parent.isTextblock){if(t?!t.endOfTextblock("backward",n):r.parentOffset>0)return!1;i=Xs(r)}let o=i&&i.nodeBefore;return!o||!w.isSelectable(o)?!1:(e&&e(n.tr.setSelection(w.create(n.doc,i.pos-o.nodeSize)).scrollIntoView()),!0)};function Xs(n){if(!n.parent.type.spec.isolating)for(let e=n.depth-1;e>=0;e--){if(n.index(e)>0)return n.doc.resolve(n.before(e+1));if(n.node(e).type.spec.isolating)break}return null}function ya(n,e){let{$cursor:t}=n.selection;return!t||(e?!e.endOfTextblock("forward",n):t.parentOffset<t.parent.content.size)?null:t}const Yf=(n,e,t)=>{let r=ya(n,t);if(!r)return!1;let s=Qs(r);if(!s)return!1;let i=s.nodeAfter;if(ka(n,s,e,1))return!0;if(r.parent.content.size==0&&(Bt(i,"start")||w.isSelectable(i))){let o=Gn(n.doc,r.before(),r.after(),x.empty);if(o&&o.slice.size<o.to-o.from){if(e){let l=n.tr.step(o);l.setSelection(Bt(i,"start")?E.findFrom(l.doc.resolve(l.mapping.map(s.pos)),1):w.create(l.doc,l.mapping.map(s.pos))),e(l.scrollIntoView())}return!0}}return i.isAtom&&s.depth==r.depth-1?(e&&e(n.tr.delete(s.pos,s.pos+i.nodeSize).scrollIntoView()),!0):!1},Xf=(n,e,t)=>{let{$head:r,empty:s}=n.selection,i=r;if(!s)return!1;if(r.parent.isTextblock){if(t?!t.endOfTextblock("forward",n):r.parentOffset<r.parent.content.size)return!1;i=Qs(r)}let o=i&&i.nodeAfter;return!o||!w.isSelectable(o)?!1:(e&&e(n.tr.setSelection(w.create(n.doc,i.pos)).scrollIntoView()),!0)};function Qs(n){if(!n.parent.type.spec.isolating)for(let e=n.depth-1;e>=0;e--){let t=n.node(e);if(n.index(e)+1<t.childCount)return n.doc.resolve(n.after(e+1));if(t.type.spec.isolating)break}return null}const Qf=(n,e)=>{let t=n.selection,r=t instanceof w,s;if(r){if(t.node.isTextblock||!je(n.doc,t.from))return!1;s=t.from}else if(s=_n(n.doc,t.from,-1),s==null)return!1;if(e){let i=n.tr.join(s);r&&i.setSelection(w.create(i.doc,s-n.doc.resolve(s).nodeBefore.nodeSize)),e(i.scrollIntoView())}return!0},Zf=(n,e)=>{let t=n.selection,r;if(t instanceof w){if(t.node.isTextblock||!je(n.doc,t.to))return!1;r=t.to}else if(r=_n(n.doc,t.to,1),r==null)return!1;return e&&e(n.tr.join(r).scrollIntoView()),!0},eh=(n,e)=>{let{$from:t,$to:r}=n.selection,s=t.blockRange(r),i=s&&Et(s);return i==null?!1:(e&&e(n.tr.lift(s,i).scrollIntoView()),!0)},th=(n,e)=>{let{$head:t,$anchor:r}=n.selection;return!t.parent.type.spec.code||!t.sameParent(r)?!1:(e&&e(n.tr.insertText(`
10
- `).scrollIntoView()),!0)};function ba(n){for(let e=0;e<n.edgeCount;e++){let{type:t}=n.edge(e);if(t.isTextblock&&!t.hasRequiredAttrs())return t}return null}const nh=(n,e)=>{let{$head:t,$anchor:r}=n.selection;if(!t.parent.type.spec.code||!t.sameParent(r))return!1;let s=t.node(-1),i=t.indexAfter(-1),o=ba(s.contentMatchAt(i));if(!o||!s.canReplaceWith(i,i,o))return!1;if(e){let l=t.after(),a=n.tr.replaceWith(l,l,o.createAndFill());a.setSelection(E.near(a.doc.resolve(l),1)),e(a.scrollIntoView())}return!0},rh=(n,e)=>{let t=n.selection,{$from:r,$to:s}=t;if(t instanceof Se||r.parent.inlineContent||s.parent.inlineContent)return!1;let i=ba(s.parent.contentMatchAt(s.indexAfter()));if(!i||!i.isTextblock)return!1;if(e){let o=(!r.parentOffset&&s.index()<s.parent.childCount?r:s).pos,l=n.tr.insert(o,i.createAndFill());l.setSelection(A.create(l.doc,o+1)),e(l.scrollIntoView())}return!0},sh=(n,e)=>{let{$cursor:t}=n.selection;if(!t||t.parent.content.size)return!1;if(t.depth>1&&t.after()!=t.end(-1)){let i=t.before();if(Ot(n.doc,i))return e&&e(n.tr.split(i).scrollIntoView()),!0}let r=t.blockRange(),s=r&&Et(r);return s==null?!1:(e&&e(n.tr.lift(r,s).scrollIntoView()),!0)},ih=(n,e)=>{let{$from:t,to:r}=n.selection,s,i=t.sharedDepth(r);return i==0?!1:(s=t.before(i),e&&e(n.tr.setSelection(w.create(n.doc,s))),!0)};function oh(n,e,t){let r=e.nodeBefore,s=e.nodeAfter,i=e.index();return!r||!s||!r.type.compatibleContent(s.type)?!1:!r.content.size&&e.parent.canReplace(i-1,i)?(t&&t(n.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(i,i+1)||!(s.isTextblock||je(n.doc,e.pos))?!1:(t&&t(n.tr.join(e.pos).scrollIntoView()),!0)}function ka(n,e,t,r){let s=e.nodeBefore,i=e.nodeAfter,o,l,a=s.type.spec.isolating||i.type.spec.isolating;if(!a&&oh(n,e,t))return!0;let c=!a&&e.parent.canReplace(e.index(),e.index()+1);if(c&&(o=(l=s.contentMatchAt(s.childCount)).findWrapping(i.type))&&l.matchType(o[0]||i.type).validEnd){if(t){let h=e.pos+i.nodeSize,p=b.empty;for(let y=o.length-1;y>=0;y--)p=b.from(o[y].create(null,p));p=b.from(s.copy(p));let m=n.tr.step(new G(e.pos-1,h,e.pos,h,new x(p,1,0),o.length,!0)),g=m.doc.resolve(h+2*o.length);g.nodeAfter&&g.nodeAfter.type==s.type&&je(m.doc,g.pos)&&m.join(g.pos),t(m.scrollIntoView())}return!0}let d=i.type.spec.isolating||r>0&&a?null:E.findFrom(e,1),u=d&&d.$from.blockRange(d.$to),f=u&&Et(u);if(f!=null&&f>=e.depth)return t&&t(n.tr.lift(u,f).scrollIntoView()),!0;if(c&&Bt(i,"start",!0)&&Bt(s,"end")){let h=s,p=[];for(;p.push(h),!h.isTextblock;)h=h.lastChild;let m=i,g=1;for(;!m.isTextblock;m=m.firstChild)g++;if(h.canReplace(h.childCount,h.childCount,m.content)){if(t){let y=b.empty;for(let T=p.length-1;T>=0;T--)y=b.from(p[T].copy(y));let k=n.tr.step(new G(e.pos-p.length,e.pos+i.nodeSize,e.pos+g,e.pos+i.nodeSize-g,new x(y,p.length,0),0,!0));t(k.scrollIntoView())}return!0}}return!1}function Sa(n){return function(e,t){let r=e.selection,s=n<0?r.$from:r.$to,i=s.depth;for(;s.node(i).isInline;){if(!i)return!1;i--}return s.node(i).isTextblock?(t&&t(e.tr.setSelection(A.create(e.doc,n<0?s.start(i):s.end(i)))),!0):!1}}const lh=Sa(-1),ah=Sa(1);function ch(n,e=null){return function(t,r){let{$from:s,$to:i}=t.selection,o=s.blockRange(i),l=o&&ks(o,n,e);return l?(r&&r(t.tr.wrap(o,l).scrollIntoView()),!0):!1}}function xa(n,e=null){return function(t,r){let s=!1;for(let i=0;i<t.selection.ranges.length&&!s;i++){let{$from:{pos:o},$to:{pos:l}}=t.selection.ranges[i];t.doc.nodesBetween(o,l,(a,c)=>{if(s)return!1;if(!(!a.isTextblock||a.hasMarkup(n,e)))if(a.type==n)s=!0;else{let d=t.doc.resolve(c),u=d.index();s=d.parent.canReplaceWith(u,u+1,n)}})}if(!s)return!1;if(r){let i=t.tr;for(let o=0;o<t.selection.ranges.length;o++){let{$from:{pos:l},$to:{pos:a}}=t.selection.ranges[o];i.setBlockType(l,a,n,e)}r(i.scrollIntoView())}return!0}}typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function dh(n,e=null){return function(t,r){let{$from:s,$to:i}=t.selection,o=s.blockRange(i),l=!1,a=o;if(!o)return!1;if(o.depth>=2&&s.node(o.depth-1).type.compatibleContent(n)&&o.startIndex==0){if(s.index(o.depth-1)==0)return!1;let d=t.doc.resolve(o.start-2);a=new Vn(d,d,o.depth),o.endIndex<o.parent.childCount&&(o=new Vn(s,t.doc.resolve(i.end(o.depth)),o.depth)),l=!0}let c=ks(a,n,e,o);return c?(r&&r(uh(t.tr,o,c,l,n).scrollIntoView()),!0):!1}}function uh(n,e,t,r,s){let i=b.empty;for(let d=t.length-1;d>=0;d--)i=b.from(t[d].type.create(t[d].attrs,i));n.step(new G(e.start-(r?2:0),e.end,e.start,e.end,new x(i,0,0),t.length,!0));let o=0;for(let d=0;d<t.length;d++)t[d].type==s&&(o=d+1);let l=t.length-o,a=e.start+t.length-(r?2:0),c=e.parent;for(let d=e.startIndex,u=e.endIndex,f=!0;d<u;d++,f=!1)!f&&Ot(n.doc,a,l)&&(n.split(a,l),a+=2*l),a+=c.child(d).nodeSize;return n}function fh(n){return function(e,t){let{$from:r,$to:s}=e.selection,i=r.blockRange(s,o=>o.childCount>0&&o.firstChild.type==n);return i?t?r.node(i.depth-1).type==n?hh(e,t,n,i):ph(e,t,i):!0:!1}}function hh(n,e,t,r){let s=n.tr,i=r.end,o=r.$to.end(r.depth);i<o&&(s.step(new G(i-1,o,i,o,new x(b.from(t.create(null,r.parent.copy())),1,0),1,!0)),r=new Vn(s.doc.resolve(r.$from.pos),s.doc.resolve(o),r.depth));const l=Et(r);if(l==null)return!1;s.lift(r,l);let a=s.mapping.map(i,-1)-1;return je(s.doc,a)&&s.join(a),e(s.scrollIntoView()),!0}function ph(n,e,t){let r=n.tr,s=t.parent;for(let h=t.end,p=t.endIndex-1,m=t.startIndex;p>m;p--)h-=s.child(p).nodeSize,r.delete(h-1,h+1);let i=r.doc.resolve(t.start),o=i.nodeAfter;if(r.mapping.map(t.end)!=t.start+i.nodeAfter.nodeSize)return!1;let l=t.startIndex==0,a=t.endIndex==s.childCount,c=i.node(-1),d=i.index(-1);if(!c.canReplace(d+(l?0:1),d+1,o.content.append(a?b.empty:b.from(s))))return!1;let u=i.pos,f=u+o.nodeSize;return r.step(new G(u-(l?1:0),f+(a?1:0),u+1,f-1,new x((l?b.empty:b.from(s.copy(b.empty))).append(a?b.empty:b.from(s.copy(b.empty))),l?0:1,a?0:1),l?0:1)),e(r.scrollIntoView()),!0}function mh(n){return function(e,t){let{$from:r,$to:s}=e.selection,i=r.blockRange(s,c=>c.childCount>0&&c.firstChild.type==n);if(!i)return!1;let o=i.startIndex;if(o==0)return!1;let l=i.parent,a=l.child(o-1);if(a.type!=n)return!1;if(t){let c=a.lastChild&&a.lastChild.type==l.type,d=b.from(c?n.create():null),u=new x(b.from(n.create(null,b.from(l.type.create(null,d)))),c?3:1,0),f=i.start,h=i.end;t(e.tr.step(new G(f-(c?3:1),h,f,h,u,1,!0)).scrollIntoView())}return!0}}function un(n){const{state:e,transaction:t}=n;let{selection:r}=t,{doc:s}=t,{storedMarks:i}=t;return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return i},get selection(){return r},get doc(){return s},get tr(){return r=t.selection,s=t.doc,i=t.storedMarks,t}}}class fn{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:e,editor:t,state:r}=this,{view:s}=t,{tr:i}=r,o=this.buildProps(i);return Object.fromEntries(Object.entries(e).map(([l,a])=>[l,(...d)=>{const u=a(...d)(o);return!i.getMeta("preventDispatch")&&!this.hasCustomState&&s.dispatch(i),u}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){const{rawCommands:r,editor:s,state:i}=this,{view:o}=s,l=[],a=!!e,c=e||i.tr,d=()=>(!a&&t&&!c.getMeta("preventDispatch")&&!this.hasCustomState&&o.dispatch(c),l.every(f=>f===!0)),u={...Object.fromEntries(Object.entries(r).map(([f,h])=>[f,(...m)=>{const g=this.buildProps(c,t),y=h(...m)(g);return l.push(y),u}])),run:d};return u}createCan(e){const{rawCommands:t,state:r}=this,s=!1,i=e||r.tr,o=this.buildProps(i,s);return{...Object.fromEntries(Object.entries(t).map(([a,c])=>[a,(...d)=>c(...d)({...o,dispatch:void 0})])),chain:()=>this.createChain(i,s)}}buildProps(e,t=!0){const{rawCommands:r,editor:s,state:i}=this,{view:o}=s,l={tr:e,editor:s,view:o,state:un({state:i,transaction:e}),dispatch:t?()=>{}:void 0,chain:()=>this.createChain(e,t),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(r).map(([a,c])=>[a,(...d)=>c(...d)(l)]))}};return l}}class gh{constructor(){this.callbacks={}}on(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}emit(e,...t){const r=this.callbacks[e];return r&&r.forEach(s=>s.apply(this,t)),this}off(e,t){const r=this.callbacks[e];return r&&(t?this.callbacks[e]=r.filter(s=>s!==t):delete this.callbacks[e]),this}once(e,t){const r=(...s)=>{this.off(e,r),t.apply(this,s)};return this.on(e,r)}removeAllListeners(){this.callbacks={}}}function C(n,e,t){return n.config[e]===void 0&&n.parent?C(n.parent,e,t):typeof n.config[e]=="function"?n.config[e].bind({...t,parent:n.parent?C(n.parent,e,t):null}):n.config[e]}function hn(n){const e=n.filter(s=>s.type==="extension"),t=n.filter(s=>s.type==="node"),r=n.filter(s=>s.type==="mark");return{baseExtensions:e,nodeExtensions:t,markExtensions:r}}function Zs(n){const e=[],{nodeExtensions:t,markExtensions:r}=hn(n),s=[...t,...r],i={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return n.forEach(o=>{const l={name:o.name,options:o.options,storage:o.storage,extensions:s},a=C(o,"addGlobalAttributes",l);if(!a)return;a().forEach(d=>{d.types.forEach(u=>{Object.entries(d.attributes).forEach(([f,h])=>{e.push({type:u,name:f,attribute:{...i,...h}})})})})}),s.forEach(o=>{const l={name:o.name,options:o.options,storage:o.storage},a=C(o,"addAttributes",l);if(!a)return;const c=a();Object.entries(c).forEach(([d,u])=>{const f={...i,...u};typeof f?.default=="function"&&(f.default=f.default()),f?.isRequired&&f?.default===void 0&&delete f.default,e.push({type:o.name,name:d,attribute:f})})}),e}function U(n,e){if(typeof n=="string"){if(!e.nodes[n])throw Error(`There is no node type named '${n}'. Maybe you forgot to add the extension?`);return e.nodes[n]}return n}function v(...n){return n.filter(e=>!!e).reduce((e,t)=>{const r={...e};return Object.entries(t).forEach(([s,i])=>{if(!r[s]){r[s]=i;return}if(s==="class"){const l=i?String(i).split(" "):[],a=r[s]?r[s].split(" "):[],c=l.filter(d=>!a.includes(d));r[s]=[...a,...c].join(" ")}else if(s==="style"){const l=i?i.split(";").map(d=>d.trim()).filter(Boolean):[],a=r[s]?r[s].split(";").map(d=>d.trim()).filter(Boolean):[],c=new Map;a.forEach(d=>{const[u,f]=d.split(":").map(h=>h.trim());c.set(u,f)}),l.forEach(d=>{const[u,f]=d.split(":").map(h=>h.trim());c.set(u,f)}),r[s]=Array.from(c.entries()).map(([d,u])=>`${d}: ${u}`).join("; ")}else r[s]=i}),r},{})}function rr(n,e){return e.filter(t=>t.type===n.type.name).filter(t=>t.attribute.rendered).map(t=>t.attribute.renderHTML?t.attribute.renderHTML(n.attrs)||{}:{[t.name]:n.attrs[t.name]}).reduce((t,r)=>v(t,r),{})}function ei(n){return typeof n=="function"}function O(n,e=void 0,...t){return ei(n)?e?n.bind(e)(...t):n(...t):n}function Ca(n={}){return Object.keys(n).length===0&&n.constructor===Object}function wa(n){return typeof n!="string"?n:n.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(n):n==="true"?!0:n==="false"?!1:n}function ti(n,e){return"style"in n?n:{...n,getAttrs:t=>{const r=n.getAttrs?n.getAttrs(t):n.attrs;if(r===!1)return!1;const s=e.reduce((i,o)=>{const l=o.attribute.parseHTML?o.attribute.parseHTML(t):wa(t.getAttribute(o.name));return l==null?i:{...i,[o.name]:l}},{});return{...r,...s}}}}function Ma(n){return Object.fromEntries(Object.entries(n).filter(([e,t])=>e==="attrs"&&Ca(t)?!1:t!=null))}function ni(n,e){var t;const r=Zs(n),{nodeExtensions:s,markExtensions:i}=hn(n),o=(t=s.find(c=>C(c,"topNode")))===null||t===void 0?void 0:t.name,l=Object.fromEntries(s.map(c=>{const d=r.filter(y=>y.type===c.name),u={name:c.name,options:c.options,storage:c.storage,editor:e},f=n.reduce((y,k)=>{const T=C(k,"extendNodeSchema",u);return{...y,...T?T(c):{}}},{}),h=Ma({...f,content:O(C(c,"content",u)),marks:O(C(c,"marks",u)),group:O(C(c,"group",u)),inline:O(C(c,"inline",u)),atom:O(C(c,"atom",u)),selectable:O(C(c,"selectable",u)),draggable:O(C(c,"draggable",u)),code:O(C(c,"code",u)),whitespace:O(C(c,"whitespace",u)),linebreakReplacement:O(C(c,"linebreakReplacement",u)),defining:O(C(c,"defining",u)),isolating:O(C(c,"isolating",u)),attrs:Object.fromEntries(d.map(y=>{var k;return[y.name,{default:(k=y?.attribute)===null||k===void 0?void 0:k.default}]}))}),p=O(C(c,"parseHTML",u));p&&(h.parseDOM=p.map(y=>ti(y,d)));const m=C(c,"renderHTML",u);m&&(h.toDOM=y=>m({node:y,HTMLAttributes:rr(y,d)}));const g=C(c,"renderText",u);return g&&(h.toText=g),[c.name,h]})),a=Object.fromEntries(i.map(c=>{const d=r.filter(g=>g.type===c.name),u={name:c.name,options:c.options,storage:c.storage,editor:e},f=n.reduce((g,y)=>{const k=C(y,"extendMarkSchema",u);return{...g,...k?k(c):{}}},{}),h=Ma({...f,inclusive:O(C(c,"inclusive",u)),excludes:O(C(c,"excludes",u)),group:O(C(c,"group",u)),spanning:O(C(c,"spanning",u)),code:O(C(c,"code",u)),attrs:Object.fromEntries(d.map(g=>{var y;return[g.name,{default:(y=g?.attribute)===null||y===void 0?void 0:y.default}]}))}),p=O(C(c,"parseHTML",u));p&&(h.parseDOM=p.map(g=>ti(g,d)));const m=C(c,"renderHTML",u);return m&&(h.toDOM=g=>m({mark:g,HTMLAttributes:rr(g,d)})),[c.name,h]}));return new xo({topNode:o,nodes:l,marks:a})}function sr(n,e){return e.nodes[n]||e.marks[n]||null}function ri(n,e){return Array.isArray(e)?e.some(t=>(typeof t=="string"?t:t.name)===n.name):e}function pn(n,e){const t=wt.fromSchema(e).serializeFragment(n),s=document.implementation.createHTMLDocument().createElement("div");return s.appendChild(t),s.innerHTML}const Ta=(n,e=500)=>{let t="";const r=n.parentOffset;return n.parent.nodesBetween(Math.max(0,r-e),r,(s,i,o,l)=>{var a,c;const d=((c=(a=s.type.spec).toText)===null||c===void 0?void 0:c.call(a,{node:s,pos:i,parent:o,index:l}))||s.textContent||"%leaf%";t+=s.isAtom&&!s.isText?d:d.slice(0,Math.max(0,r-i))}),t};function ir(n){return Object.prototype.toString.call(n)==="[object RegExp]"}class zt{constructor(e){this.find=e.find,this.handler=e.handler}}const yh=(n,e)=>{if(ir(e))return e.exec(n);const t=e(n);if(!t)return null;const r=[t.text];return r.index=t.index,r.input=n,r.data=t.data,t.replaceWith&&(t.text.includes(t.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(t.replaceWith)),r};function or(n){var e;const{editor:t,from:r,to:s,text:i,rules:o,plugin:l}=n,{view:a}=t;if(a.composing)return!1;const c=a.state.doc.resolve(r);if(c.parent.type.spec.code||!((e=c.nodeBefore||c.nodeAfter)===null||e===void 0)&&e.marks.find(f=>f.type.spec.code))return!1;let d=!1;const u=Ta(c)+i;return o.forEach(f=>{if(d)return;const h=yh(u,f.find);if(!h)return;const p=a.state.tr,m=un({state:a.state,transaction:p}),g={from:r-(h[0].length-i.length),to:s},{commands:y,chain:k,can:T}=new fn({editor:t,state:m});f.handler({state:m,range:g,match:h,commands:y,chain:k,can:T})===null||!p.steps.length||(p.setMeta(l,{transform:p,from:r,to:s,text:i}),a.dispatch(p),d=!0)}),d}function Aa(n){const{editor:e,rules:t}=n,r=new K({state:{init(){return null},apply(s,i,o){const l=s.getMeta(r);if(l)return l;const a=s.getMeta("applyInputRules");return!!a&&setTimeout(()=>{let{text:d}=a;typeof d=="string"?d=d:d=pn(b.from(d),o.schema);const{from:u}=a,f=u+d.length;or({editor:e,from:u,to:f,text:d,rules:t,plugin:r})}),s.selectionSet||s.docChanged?null:i}},props:{handleTextInput(s,i,o,l){return or({editor:e,from:i,to:o,text:l,rules:t,plugin:r})},handleDOMEvents:{compositionend:s=>(setTimeout(()=>{const{$cursor:i}=s.state.selection;i&&or({editor:e,from:i.pos,to:i.pos,text:"",rules:t,plugin:r})}),!1)},handleKeyDown(s,i){if(i.key!=="Enter")return!1;const{$cursor:o}=s.state.selection;return o?or({editor:e,from:o.pos,to:o.pos,text:`
11
- `,rules:t,plugin:r}):!1}},isInputRules:!0});return r}function bh(n){return Object.prototype.toString.call(n).slice(8,-1)}function mn(n){return bh(n)!=="Object"?!1:n.constructor===Object&&Object.getPrototypeOf(n)===Object.prototype}function gn(n,e){const t={...n};return mn(n)&&mn(e)&&Object.keys(e).forEach(r=>{mn(e[r])&&mn(n[r])?t[r]=gn(n[r],e[r]):t[r]=e[r]}),t}class ue{constructor(e={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=O(C(this,"addOptions",{name:this.name}))),this.storage=O(C(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new ue(e)}configure(e={}){const t=this.extend({...this.config,addOptions:()=>gn(this.options,e)});return t.name=this.name,t.parent=this.parent,t}extend(e={}){const t=new ue(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=O(C(t,"addOptions",{name:t.name})),t.storage=O(C(t,"addStorage",{name:t.name,options:t.options})),t}static handleExit({editor:e,mark:t}){const{tr:r}=e.state,s=e.state.selection.$from;if(s.pos===s.end()){const o=s.marks();if(!!!o.find(c=>c?.type.name===t.name))return!1;const a=o.find(c=>c?.type.name===t.name);return a&&r.removeStoredMark(a),r.insertText(" ",s.pos),e.view.dispatch(r),!0}return!1}}function Ea(n){return typeof n=="number"}class lr{constructor(e){this.find=e.find,this.handler=e.handler}}const kh=(n,e,t)=>{if(ir(e))return[...n.matchAll(e)];const r=e(n,t);return r?r.map(s=>{const i=[s.text];return i.index=s.index,i.input=n,i.data=s.data,s.replaceWith&&(s.text.includes(s.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),i.push(s.replaceWith)),i}):[]};function Sh(n){const{editor:e,state:t,from:r,to:s,rule:i,pasteEvent:o,dropEvent:l}=n,{commands:a,chain:c,can:d}=new fn({editor:e,state:t}),u=[];return t.doc.nodesBetween(r,s,(h,p)=>{if(!h.isTextblock||h.type.spec.code)return;const m=Math.max(r,p),g=Math.min(s,p+h.content.size),y=h.textBetween(m-p,g-p,void 0,"\uFFFC");kh(y,i.find,o).forEach(T=>{if(T.index===void 0)return;const D=m+T.index+1,M=D+T[0].length,R={from:t.tr.mapping.map(D),to:t.tr.mapping.map(M)},z=i.handler({state:t,range:R,match:T,commands:a,chain:c,can:d,pasteEvent:o,dropEvent:l});u.push(z)})}),u.every(h=>h!==null)}let ar=null;const xh=n=>{var e;const t=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(e=t.clipboardData)===null||e===void 0||e.setData("text/html",n),t};function Oa(n){const{editor:e,rules:t}=n;let r=null,s=!1,i=!1,o=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,l;try{l=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{l=null}const a=({state:d,from:u,to:f,rule:h,pasteEvt:p})=>{const m=d.tr,g=un({state:d,transaction:m});if(!(!Sh({editor:e,state:g,from:Math.max(u-1,0),to:f.b-1,rule:h,pasteEvent:p,dropEvent:l})||!m.steps.length)){try{l=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{l=null}return o=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,m}};return t.map(d=>new K({view(u){const f=p=>{var m;r=!((m=u.dom.parentElement)===null||m===void 0)&&m.contains(p.target)?u.dom.parentElement:null,r&&(ar=e)},h=()=>{ar&&(ar=null)};return window.addEventListener("dragstart",f),window.addEventListener("dragend",h),{destroy(){window.removeEventListener("dragstart",f),window.removeEventListener("dragend",h)}}},props:{handleDOMEvents:{drop:(u,f)=>{if(i=r===u.dom.parentElement,l=f,!i){const h=ar;h&&setTimeout(()=>{const p=h.state.selection;p&&h.commands.deleteRange({from:p.from,to:p.to})},10)}return!1},paste:(u,f)=>{var h;const p=(h=f.clipboardData)===null||h===void 0?void 0:h.getData("text/html");return o=f,s=!!p?.includes("data-pm-slice"),!1}}},appendTransaction:(u,f,h)=>{const p=u[0],m=p.getMeta("uiEvent")==="paste"&&!s,g=p.getMeta("uiEvent")==="drop"&&!i,y=p.getMeta("applyPasteRules"),k=!!y;if(!m&&!g&&!k)return;if(k){let{text:M}=y;typeof M=="string"?M=M:M=pn(b.from(M),h.schema);const{from:R}=y,z=R+M.length,j=xh(M);return a({rule:d,state:h,from:R,to:{b:z},pasteEvt:j})}const T=f.doc.content.findDiffStart(h.doc.content),D=f.doc.content.findDiffEnd(h.doc.content);if(!(!Ea(T)||!D||T===D.b))return a({rule:d,state:h,from:T,to:D,pasteEvt:o})}}))}function Na(n){const e=n.filter((t,r)=>n.indexOf(t)!==r);return Array.from(new Set(e))}class Tt{constructor(e,t){this.splittableMarks=[],this.editor=t,this.extensions=Tt.resolve(e),this.schema=ni(this.extensions,t),this.setupExtensions()}static resolve(e){const t=Tt.sort(Tt.flatten(e)),r=Na(t.map(s=>s.name));return r.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${r.map(s=>`'${s}'`).join(", ")}]. This can lead to issues.`),t}static flatten(e){return e.map(t=>{const r={name:t.name,options:t.options,storage:t.storage},s=C(t,"addExtensions",r);return s?[t,...this.flatten(s())]:t}).flat(10)}static sort(e){return e.sort((r,s)=>{const i=C(r,"priority")||100,o=C(s,"priority")||100;return i>o?-1:i<o?1:0})}get commands(){return this.extensions.reduce((e,t)=>{const r={name:t.name,options:t.options,storage:t.storage,editor:this.editor,type:sr(t.name,this.schema)},s=C(t,"addCommands",r);return s?{...e,...s()}:e},{})}get plugins(){const{editor:e}=this,t=Tt.sort([...this.extensions].reverse()),r=[],s=[],i=t.map(o=>{const l={name:o.name,options:o.options,storage:o.storage,editor:e,type:sr(o.name,this.schema)},a=[],c=C(o,"addKeyboardShortcuts",l);let d={};if(o.type==="mark"&&C(o,"exitable",l)&&(d.ArrowRight=()=>ue.handleExit({editor:e,mark:o})),c){const m=Object.fromEntries(Object.entries(c()).map(([g,y])=>[g,()=>y({editor:e})]));d={...d,...m}}const u=Kf(d);a.push(u);const f=C(o,"addInputRules",l);ri(o,e.options.enableInputRules)&&f&&r.push(...f());const h=C(o,"addPasteRules",l);ri(o,e.options.enablePasteRules)&&h&&s.push(...h());const p=C(o,"addProseMirrorPlugins",l);if(p){const m=p();a.push(...m)}return a}).flat();return[Aa({editor:e,rules:r}),...Oa({editor:e,rules:s}),...i]}get attributes(){return Zs(this.extensions)}get nodeViews(){const{editor:e}=this,{nodeExtensions:t}=hn(this.extensions);return Object.fromEntries(t.filter(r=>!!C(r,"addNodeView")).map(r=>{const s=this.attributes.filter(a=>a.type===r.name),i={name:r.name,options:r.options,storage:r.storage,editor:e,type:U(r.name,this.schema)},o=C(r,"addNodeView",i);if(!o)return[];const l=(a,c,d,u,f)=>{const h=rr(a,s);return o()({node:a,view:c,getPos:d,decorations:u,innerDecorations:f,editor:e,extension:r,HTMLAttributes:h})};return[r.name,l]}))}setupExtensions(){this.extensions.forEach(e=>{var t;this.editor.extensionStorage[e.name]=e.storage;const r={name:e.name,options:e.options,storage:e.storage,editor:this.editor,type:sr(e.name,this.schema)};e.type==="mark"&&(!((t=O(C(e,"keepOnSplit",r)))!==null&&t!==void 0)||t)&&this.splittableMarks.push(e.name);const s=C(e,"onBeforeCreate",r),i=C(e,"onCreate",r),o=C(e,"onUpdate",r),l=C(e,"onSelectionUpdate",r),a=C(e,"onTransaction",r),c=C(e,"onFocus",r),d=C(e,"onBlur",r),u=C(e,"onDestroy",r);s&&this.editor.on("beforeCreate",s),i&&this.editor.on("create",i),o&&this.editor.on("update",o),l&&this.editor.on("selectionUpdate",l),a&&this.editor.on("transaction",a),c&&this.editor.on("focus",c),d&&this.editor.on("blur",d),u&&this.editor.on("destroy",u)})}}class _{constructor(e={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=O(C(this,"addOptions",{name:this.name}))),this.storage=O(C(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new _(e)}configure(e={}){const t=this.extend({...this.config,addOptions:()=>gn(this.options,e)});return t.name=this.name,t.parent=this.parent,t}extend(e={}){const t=new _({...this.config,...e});return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=O(C(t,"addOptions",{name:t.name})),t.storage=O(C(t,"addStorage",{name:t.name,options:t.options})),t}}function si(n,e,t){const{from:r,to:s}=e,{blockSeparator:i=`
8
+ `);return{dom:a,text:f,slice:e}}function ql(n,e,t,r,s){let i=s.parent.type.spec.code,o,l;if(!t&&!e)return null;let a=e&&(r||i||!t);if(a){if(n.someProp("transformPastedText",f=>{e=f(e,i||r,n)}),i)return e?new w(b.from(n.state.schema.text(e.replace(/\r\n?/g,`
9
+ `))),0,0):w.empty;let u=n.someProp("clipboardTextParser",f=>f(e,s,r,n));if(u)l=u;else{let f=s.marks(),{schema:h}=n.state,p=Mt.fromSchema(h);o=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(m=>{let g=o.appendChild(document.createElement("p"));m&&g.appendChild(p.serializeNode(h.text(m,f)))})}}else n.someProp("transformPastedHTML",u=>{t=u(t,n)}),o=mf(t),sn&&gf(o);let c=o&&o.querySelector("[data-pm-slice]"),d=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(d&&d[3])for(let u=+d[3];u>0;u--){let f=o.firstChild;for(;f&&f.nodeType!=1;)f=f.nextSibling;if(!f)break;o=f}if(l||(l=(n.someProp("clipboardParser")||n.someProp("domParser")||je.fromSchema(n.state.schema)).parseSlice(o,{preserveWhitespace:!!(a||d),context:s,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!ff.test(f.parentNode.nodeName)?{ignore:!0}:null}})),d)l=yf(Xl(l,+d[1],+d[2]),d[4]);else if(l=w.maxOpen(hf(l.content,s),!0),l.openStart||l.openEnd){let u=0,f=0;for(let h=l.content.firstChild;u<l.openStart&&!h.type.spec.isolating;u++,h=h.firstChild);for(let h=l.content.lastChild;f<l.openEnd&&!h.type.spec.isolating;f++,h=h.lastChild);l=Xl(l,u,f)}return n.someProp("transformPasted",u=>{l=u(l,n)}),l}const ff=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function hf(n,e){if(n.childCount<2)return n;for(let t=e.depth;t>=0;t--){let s=e.node(t).contentMatchAt(e.index(t)),i,o=[];if(n.forEach(l=>{if(!o)return;let a=s.findWrapping(l.type),c;if(!a)return o=null;if(c=o.length&&i.length&&Gl(a,i,l,o[o.length-1],0))o[o.length-1]=c;else{o.length&&(o[o.length-1]=Yl(o[o.length-1],i.length));let d=_l(l,a);o.push(d),s=s.matchType(d.type),i=a}}),o)return b.from(o)}return n}function _l(n,e,t=0){for(let r=e.length-1;r>=t;r--)n=e[r].create(null,b.from(n));return n}function Gl(n,e,t,r,s){if(s<n.length&&s<e.length&&n[s]==e[s]){let i=Gl(n,e,t,r.lastChild,s+1);if(i)return r.copy(r.content.replaceChild(r.childCount-1,i));if(r.contentMatchAt(r.childCount).matchType(s==n.length-1?t.type:n[s+1]))return r.copy(r.content.append(b.from(_l(t,n,s+1))))}}function Yl(n,e){if(e==0)return n;let t=n.content.replaceChild(n.childCount-1,Yl(n.lastChild,e-1)),r=n.contentMatchAt(n.childCount).fillBefore(b.empty,!0);return n.copy(t.append(r))}function $s(n,e,t,r,s,i){let o=e<0?n.firstChild:n.lastChild,l=o.content;return n.childCount>1&&(i=0),s<r-1&&(l=$s(l,e,t,r,s+1,i)),s>=t&&(l=e<0?o.contentMatchAt(0).fillBefore(l,i<=s).append(l):l.append(o.contentMatchAt(o.childCount).fillBefore(b.empty,!0))),n.replaceChild(e<0?0:n.childCount-1,o.copy(l))}function Xl(n,e,t){return e<n.openStart&&(n=new w($s(n.content,-1,e,n.openStart,0,n.openEnd),e,n.openEnd)),t<n.openEnd&&(n=new w($s(n.content,1,t,n.openEnd,0,0),n.openStart,t)),n}const Ql={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let Zl=null;function ea(){return Zl||(Zl=document.implementation.createHTMLDocument("title"))}let Vs=null;function pf(n){let e=window.trustedTypes;return e?(Vs||(Vs=e.createPolicy("ProseMirrorClipboard",{createHTML:t=>t})),Vs.createHTML(n)):n}function mf(n){let e=/^(\s*<meta [^>]*>)*/.exec(n);e&&(n=n.slice(e[0].length));let t=ea().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(n),s;if((s=r&&Ql[r[1].toLowerCase()])&&(n=s.map(i=>"<"+i+">").join("")+n+s.map(i=>"</"+i+">").reverse().join("")),t.innerHTML=pf(n),s)for(let i=0;i<s.length;i++)t=t.querySelector(s[i])||t;return t}function gf(n){let e=n.querySelectorAll(re?"span:not([class]):not([style])":"span.Apple-converted-space");for(let t=0;t<e.length;t++){let r=e[t];r.childNodes.length==1&&r.textContent=="\xA0"&&r.parentNode&&r.parentNode.replaceChild(n.ownerDocument.createTextNode(" "),r)}}function yf(n,e){if(!n.size)return n;let t=n.content.firstChild.type.schema,r;try{r=JSON.parse(e)}catch{return n}let{content:s,openStart:i,openEnd:o}=n;for(let l=r.length-2;l>=0;l-=2){let a=t.nodes[r[l]];if(!a||a.hasRequiredAttrs())break;s=b.from(a.create(r[l+1],s)),i++,o++}return new w(s,i,o)}const le={},ae={},bf={touchstart:!0,touchmove:!0};class kf{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function Sf(n){for(let e in le){let t=le[e];n.dom.addEventListener(e,n.input.eventHandlers[e]=r=>{Cf(n,r)&&!js(n,r)&&(n.editable||!(r.type in ae))&&t(n,r)},bf[e]?{passive:!0}:void 0)}oe&&n.dom.addEventListener("input",()=>null),Ws(n)}function Ge(n,e){n.input.lastSelectionOrigin=e,n.input.lastSelectionTime=Date.now()}function wf(n){n.domObserver.stop();for(let e in n.input.eventHandlers)n.dom.removeEventListener(e,n.input.eventHandlers[e]);clearTimeout(n.input.composingTimeout),clearTimeout(n.input.lastIOSEnterFallbackTimeout)}function Ws(n){n.someProp("handleDOMEvents",e=>{for(let t in e)n.input.eventHandlers[t]||n.dom.addEventListener(t,n.input.eventHandlers[t]=r=>js(n,r))})}function js(n,e){return n.someProp("handleDOMEvents",t=>{let r=t[e.type];return r?r(n,e)||e.defaultPrevented:!1})}function Cf(n,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target;t!=n.dom;t=t.parentNode)if(!t||t.nodeType==11||t.pmViewDesc&&t.pmViewDesc.stopEvent(e))return!1;return!0}function xf(n,e){!js(n,e)&&le[e.type]&&(n.editable||!(e.type in ae))&&le[e.type](n,e)}ae.keydown=(n,e)=>{let t=e;if(n.input.shiftKey=t.keyCode==16||t.shiftKey,!na(n,t)&&(n.input.lastKeyCode=t.keyCode,n.input.lastKeyCodeTime=Date.now(),!(Pe&&re&&t.keyCode==13)))if(t.keyCode!=229&&n.domObserver.forceFlush(),Rt&&t.keyCode==13&&!t.ctrlKey&&!t.altKey&&!t.metaKey){let r=Date.now();n.input.lastIOSEnter=r,n.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{n.input.lastIOSEnter==r&&(n.someProp("handleKeyDown",s=>s(n,ht(13,"Enter"))),n.input.lastIOSEnter=0)},200)}else n.someProp("handleKeyDown",r=>r(n,t))||uf(n,t)?t.preventDefault():Ge(n,"key")},ae.keyup=(n,e)=>{e.keyCode==16&&(n.input.shiftKey=!1)},ae.keypress=(n,e)=>{let t=e;if(na(n,t)||!t.charCode||t.ctrlKey&&!t.altKey||ye&&t.metaKey)return;if(n.someProp("handleKeyPress",s=>s(n,t))){t.preventDefault();return}let r=n.state.selection;if(!(r instanceof T)||!r.$from.sameParent(r.$to)){let s=String.fromCharCode(t.charCode);!/[\r\n]/.test(s)&&!n.someProp("handleTextInput",i=>i(n,r.$from.pos,r.$to.pos,s))&&n.dispatch(n.state.tr.insertText(s).scrollIntoView()),t.preventDefault()}};function Zn(n){return{left:n.clientX,top:n.clientY}}function Mf(n,e){let t=e.x-n.clientX,r=e.y-n.clientY;return t*t+r*r<100}function Ks(n,e,t,r,s){if(r==-1)return!1;let i=n.state.doc.resolve(r);for(let o=i.depth+1;o>0;o--)if(n.someProp(e,l=>o>i.depth?l(n,t,i.nodeAfter,i.before(o),s,!0):l(n,t,i.node(o),i.before(o),s,!1)))return!0;return!1}function Lt(n,e,t){if(n.focused||n.focus(),n.state.selection.eq(e))return;let r=n.state.tr.setSelection(e);r.setMeta("pointer",!0),n.dispatch(r)}function Tf(n,e){if(e==-1)return!1;let t=n.state.doc.resolve(e),r=t.nodeAfter;return r&&r.isAtom&&x.isSelectable(r)?(Lt(n,new x(t)),!0):!1}function Af(n,e){if(e==-1)return!1;let t=n.state.selection,r,s;t instanceof x&&(r=t.node);let i=n.state.doc.resolve(e);for(let o=i.depth+1;o>0;o--){let l=o>i.depth?i.nodeAfter:i.node(o);if(x.isSelectable(l)){r&&t.$from.depth>0&&o>=t.$from.depth&&i.before(t.$from.depth+1)==t.$from.pos?s=i.before(t.$from.depth):s=i.before(o);break}}return s!=null?(Lt(n,x.create(n.state.doc,s)),!0):!1}function Ef(n,e,t,r,s){return Ks(n,"handleClickOn",e,t,r)||n.someProp("handleClick",i=>i(n,e,r))||(s?Af(n,t):Tf(n,t))}function Of(n,e,t,r){return Ks(n,"handleDoubleClickOn",e,t,r)||n.someProp("handleDoubleClick",s=>s(n,e,r))}function Nf(n,e,t,r){return Ks(n,"handleTripleClickOn",e,t,r)||n.someProp("handleTripleClick",s=>s(n,e,r))||vf(n,t,r)}function vf(n,e,t){if(t.button!=0)return!1;let r=n.state.doc;if(e==-1)return r.inlineContent?(Lt(n,T.create(r,0,r.content.size)),!0):!1;let s=r.resolve(e);for(let i=s.depth+1;i>0;i--){let o=i>s.depth?s.nodeAfter:s.node(i),l=s.before(i);if(o.inlineContent)Lt(n,T.create(r,l+1,l+1+o.content.size));else if(x.isSelectable(o))Lt(n,x.create(r,l));else continue;return!0}}function Us(n){return er(n)}const ta=ye?"metaKey":"ctrlKey";le.mousedown=(n,e)=>{let t=e;n.input.shiftKey=t.shiftKey;let r=Us(n),s=Date.now(),i="singleClick";s-n.input.lastClick.time<500&&Mf(t,n.input.lastClick)&&!t[ta]&&(n.input.lastClick.type=="singleClick"?i="doubleClick":n.input.lastClick.type=="doubleClick"&&(i="tripleClick")),n.input.lastClick={time:s,x:t.clientX,y:t.clientY,type:i};let o=n.posAtCoords(Zn(t));o&&(i=="singleClick"?(n.input.mouseDown&&n.input.mouseDown.done(),n.input.mouseDown=new Rf(n,o,t,!!r)):(i=="doubleClick"?Of:Nf)(n,o.pos,o.inside,t)?t.preventDefault():Ge(n,"pointer"))};class Rf{constructor(e,t,r,s){this.view=e,this.pos=t,this.event=r,this.flushed=s,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!r[ta],this.allowDefault=r.shiftKey;let i,o;if(t.inside>-1)i=e.state.doc.nodeAt(t.inside),o=t.inside;else{let d=e.state.doc.resolve(t.pos);i=d.parent,o=d.depth?d.before():0}const l=s?null:r.target,a=l?e.docView.nearestDesc(l,!0):null;this.target=a&&a.dom.nodeType==1?a.dom:null;let{selection:c}=e.state;(r.button==0&&i.type.spec.draggable&&i.type.spec.selectable!==!1||c instanceof x&&c.from<=o&&c.to>o)&&(this.mightDrag={node:i,pos:o,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&we&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),Ge(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>ze(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(Zn(e))),this.updateAllowDefault(e),this.allowDefault||!t?Ge(this.view,"pointer"):Ef(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||oe&&this.mightDrag&&!this.mightDrag.node.isAtom||re&&!this.view.state.selection.visible&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(Lt(this.view,E.near(this.view.state.doc.resolve(t.pos))),e.preventDefault()):Ge(this.view,"pointer")}move(e){this.updateAllowDefault(e),Ge(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}le.touchstart=n=>{n.input.lastTouch=Date.now(),Us(n),Ge(n,"pointer")},le.touchmove=n=>{n.input.lastTouch=Date.now(),Ge(n,"pointer")},le.contextmenu=n=>Us(n);function na(n,e){return n.composing?!0:oe&&Math.abs(e.timeStamp-n.input.compositionEndedAt)<500?(n.input.compositionEndedAt=-2e8,!0):!1}const Df=Pe?5e3:-1;ae.compositionstart=ae.compositionupdate=n=>{if(!n.composing){n.domObserver.flush();let{state:e}=n,t=e.selection.$to;if(e.selection instanceof T&&(e.storedMarks||!t.textOffset&&t.parentOffset&&t.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)))n.markCursor=n.state.storedMarks||t.marks(),er(n,!0),n.markCursor=null;else if(er(n,!e.selection.empty),we&&e.selection.empty&&t.parentOffset&&!t.textOffset&&t.nodeBefore.marks.length){let r=n.domSelectionRange();for(let s=r.focusNode,i=r.focusOffset;s&&s.nodeType==1&&i!=0;){let o=i<0?s.lastChild:s.childNodes[i-1];if(!o)break;if(o.nodeType==3){let l=n.domSelection();l&&l.collapse(o,o.nodeValue.length);break}else s=o,i=-1}}n.input.composing=!0}ra(n,Df)},ae.compositionend=(n,e)=>{n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=e.timeStamp,n.input.compositionPendingChanges=n.domObserver.pendingRecords().length?n.input.compositionID:0,n.input.compositionNode=null,n.input.compositionPendingChanges&&Promise.resolve().then(()=>n.domObserver.flush()),n.input.compositionID++,ra(n,20))};function ra(n,e){clearTimeout(n.input.composingTimeout),e>-1&&(n.input.composingTimeout=setTimeout(()=>er(n),e))}function sa(n){for(n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=Lf());n.input.compositionNodes.length>0;)n.input.compositionNodes.pop().markParentsDirty()}function If(n){let e=n.domSelectionRange();if(!e.focusNode)return null;let t=Mu(e.focusNode,e.focusOffset),r=Tu(e.focusNode,e.focusOffset);if(t&&r&&t!=r){let s=r.pmViewDesc,i=n.domObserver.lastChangedTextNode;if(t==i||r==i)return i;if(!s||!s.isText(r.nodeValue))return r;if(n.input.compositionNode==r){let o=t.pmViewDesc;if(!(!o||!o.isText(t.nodeValue)))return r}}return t||r}function Lf(){let n=document.createEvent("Event");return n.initEvent("event",!0,!0),n.timeStamp}function er(n,e=!1){if(!(Pe&&n.domObserver.flushingSoon>=0)){if(n.domObserver.forceFlush(),sa(n),e||n.docView&&n.docView.dirty){let t=Ls(n);return t&&!t.eq(n.state.selection)?n.dispatch(n.state.tr.setSelection(t)):(n.markCursor||e)&&!n.state.selection.empty?n.dispatch(n.state.tr.deleteSelection()):n.updateState(n.state),!0}return!1}}function Pf(n,e){if(!n.dom.parentNode)return;let t=n.dom.parentNode.appendChild(document.createElement("div"));t.appendChild(e),t.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),s=document.createRange();s.selectNodeContents(e),n.dom.blur(),r.removeAllRanges(),r.addRange(s),setTimeout(()=>{t.parentNode&&t.parentNode.removeChild(t),n.focus()},50)}const dn=de&&Je<15||Rt&&vu<604;le.copy=ae.cut=(n,e)=>{let t=e,r=n.state.selection,s=t.type=="cut";if(r.empty)return;let i=dn?null:t.clipboardData,o=r.content(),{dom:l,text:a}=Fs(n,o);i?(t.preventDefault(),i.clearData(),i.setData("text/html",l.innerHTML),i.setData("text/plain",a)):Pf(n,l),s&&n.dispatch(n.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function Bf(n){return n.openStart==0&&n.openEnd==0&&n.content.childCount==1?n.content.firstChild:null}function zf(n,e){if(!n.dom.parentNode)return;let t=n.input.shiftKey||n.state.selection.$from.parent.type.spec.code,r=n.dom.parentNode.appendChild(document.createElement(t?"textarea":"div"));t||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let s=n.input.shiftKey&&n.input.lastKeyCode!=45;setTimeout(()=>{n.focus(),r.parentNode&&r.parentNode.removeChild(r),t?un(n,r.value,null,s,e):un(n,r.textContent,r.innerHTML,s,e)},50)}function un(n,e,t,r,s){let i=ql(n,e,t,r,n.state.selection.$from);if(n.someProp("handlePaste",a=>a(n,s,i||w.empty)))return!0;if(!i)return!1;let o=Bf(i),l=o?n.state.tr.replaceSelectionWith(o,r):n.state.tr.replaceSelection(i);return n.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function ia(n){let e=n.getData("text/plain")||n.getData("Text");if(e)return e;let t=n.getData("text/uri-list");return t?t.replace(/\r?\n/g," "):""}ae.paste=(n,e)=>{let t=e;if(n.composing&&!Pe)return;let r=dn?null:t.clipboardData,s=n.input.shiftKey&&n.input.lastKeyCode!=45;r&&un(n,ia(r),r.getData("text/html"),s,t)?t.preventDefault():zf(n,t)};class oa{constructor(e,t,r){this.slice=e,this.move=t,this.node=r}}const la=ye?"altKey":"ctrlKey";le.dragstart=(n,e)=>{let t=e,r=n.input.mouseDown;if(r&&r.done(),!t.dataTransfer)return;let s=n.state.selection,i=s.empty?null:n.posAtCoords(Zn(t)),o;if(!(i&&i.pos>=s.from&&i.pos<=(s instanceof x?s.to-1:s.to))){if(r&&r.mightDrag)o=x.create(n.state.doc,r.mightDrag.pos);else if(t.target&&t.target.nodeType==1){let u=n.docView.nearestDesc(t.target,!0);u&&u.node.type.spec.draggable&&u!=n.docView&&(o=x.create(n.state.doc,u.posBefore))}}let l=(o||n.state.selection).content(),{dom:a,text:c,slice:d}=Fs(n,l);(!t.dataTransfer.files.length||!re||hl>120)&&t.dataTransfer.clearData(),t.dataTransfer.setData(dn?"Text":"text/html",a.innerHTML),t.dataTransfer.effectAllowed="copyMove",dn||t.dataTransfer.setData("text/plain",c),n.dragging=new oa(d,!t[la],o)},le.dragend=n=>{let e=n.dragging;window.setTimeout(()=>{n.dragging==e&&(n.dragging=null)},50)},ae.dragover=ae.dragenter=(n,e)=>e.preventDefault(),ae.drop=(n,e)=>{let t=e,r=n.dragging;if(n.dragging=null,!t.dataTransfer)return;let s=n.posAtCoords(Zn(t));if(!s)return;let i=n.state.doc.resolve(s.pos),o=r&&r.slice;o?n.someProp("transformPasted",p=>{o=p(o,n)}):o=ql(n,ia(t.dataTransfer),dn?null:t.dataTransfer.getData("text/html"),!1,i);let l=!!(r&&!t[la]);if(n.someProp("handleDrop",p=>p(n,t,o||w.empty,l))){t.preventDefault();return}if(!o)return;t.preventDefault();let a=o?Go(n.state.doc,i.pos,o):i.pos;a==null&&(a=i.pos);let c=n.state.tr;if(l){let{node:p}=r;p?p.replace(c):c.deleteSelection()}let d=c.mapping.map(a),u=o.openStart==0&&o.openEnd==0&&o.content.childCount==1,f=c.doc;if(u?c.replaceRangeWith(d,d,o.content.firstChild):c.replaceRange(d,d,o),c.doc.eq(f))return;let h=c.doc.resolve(d);if(u&&x.isSelectable(o.content.firstChild)&&h.nodeAfter&&h.nodeAfter.sameMarkup(o.content.firstChild))c.setSelection(new x(h));else{let p=c.mapping.map(a);c.mapping.maps[c.mapping.maps.length-1].forEach((m,g,y,k)=>p=k),c.setSelection(Bs(n,h,c.doc.resolve(p)))}n.focus(),n.dispatch(c.setMeta("uiEvent","drop"))},le.focus=n=>{n.input.lastFocus=Date.now(),n.focused||(n.domObserver.stop(),n.dom.classList.add("ProseMirror-focused"),n.domObserver.start(),n.focused=!0,setTimeout(()=>{n.docView&&n.hasFocus()&&!n.domObserver.currentSelection.eq(n.domSelectionRange())&&ze(n)},20))},le.blur=(n,e)=>{let t=e;n.focused&&(n.domObserver.stop(),n.dom.classList.remove("ProseMirror-focused"),n.domObserver.start(),t.relatedTarget&&n.dom.contains(t.relatedTarget)&&n.domObserver.currentSelection.clear(),n.focused=!1)},le.beforeinput=(n,e)=>{if(re&&Pe&&e.inputType=="deleteContentBackward"){n.domObserver.flushSoon();let{domChangeCount:r}=n.input;setTimeout(()=>{if(n.input.domChangeCount!=r||(n.dom.blur(),n.focus(),n.someProp("handleKeyDown",i=>i(n,ht(8,"Backspace")))))return;let{$cursor:s}=n.state.selection;s&&s.pos>0&&n.dispatch(n.state.tr.delete(s.pos-1,s.pos).scrollIntoView())},50)}};for(let n in ae)le[n]=ae[n];function fn(n,e){if(n==e)return!0;for(let t in n)if(n[t]!==e[t])return!1;for(let t in e)if(!(t in n))return!1;return!0}class as{constructor(e,t){this.toDOM=e,this.spec=t||gt,this.side=this.spec.side||0}map(e,t,r,s){let{pos:i,deleted:o}=e.mapResult(t.from+s,this.side<0?-1:1);return o?null:new X(i-r,i-r,this)}valid(){return!0}eq(e){return this==e||e instanceof as&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&fn(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class st{constructor(e,t){this.attrs=e,this.spec=t||gt}map(e,t,r,s){let i=e.map(t.from+s,this.spec.inclusiveStart?-1:1)-r,o=e.map(t.to+s,this.spec.inclusiveEnd?1:-1)-r;return i>=o?null:new X(i,o,this)}valid(e,t){return t.from<t.to}eq(e){return this==e||e instanceof st&&fn(this.attrs,e.attrs)&&fn(this.spec,e.spec)}static is(e){return e.type instanceof st}destroy(){}}class lo{constructor(e,t){this.attrs=e,this.spec=t||gt}map(e,t,r,s){let i=e.mapResult(t.from+s,1);if(i.deleted)return null;let o=e.mapResult(t.to+s,-1);return o.deleted||o.pos<=i.pos?null:new X(i.pos-r,o.pos-r,this)}valid(e,t){let{index:r,offset:s}=e.content.findIndex(t.from),i;return s==t.from&&!(i=e.child(r)).isText&&s+i.nodeSize==t.to}eq(e){return this==e||e instanceof lo&&fn(this.attrs,e.attrs)&&fn(this.spec,e.spec)}destroy(){}}class X{constructor(e,t,r){this.from=e,this.to=t,this.type=r}copy(e,t){return new X(e,t,this.type)}eq(e,t=0){return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}map(e,t,r){return this.type.map(e,this,t,r)}static widget(e,t,r){return new X(e,e,new as(t,r))}static inline(e,t,r,s){return new X(e,t,new st(r,s))}static node(e,t,r,s){return new X(e,t,new lo(r,s))}get spec(){return this.type.spec}get inline(){return this.type instanceof st}get widget(){return this.type instanceof as}}const Pt=[],gt={};class z{constructor(e,t){this.local=e.length?e:Pt,this.children=t.length?t:Pt}static create(e,t){return t.length?tr(t,e,0,gt):se}find(e,t,r){let s=[];return this.findInner(e??0,t??1e9,s,0,r),s}findInner(e,t,r,s,i){for(let o=0;o<this.local.length;o++){let l=this.local[o];l.from<=t&&l.to>=e&&(!i||i(l.spec))&&r.push(l.copy(l.from+s,l.to+s))}for(let o=0;o<this.children.length;o+=3)if(this.children[o]<t&&this.children[o+1]>e){let l=this.children[o]+1;this.children[o+2].findInner(e-l,t-l,r,s+l,i)}}map(e,t,r){return this==se||e.maps.length==0?this:this.mapInner(e,t,0,0,r||gt)}mapInner(e,t,r,s,i){let o;for(let l=0;l<this.local.length;l++){let a=this.local[l].map(e,r,s);a&&a.type.valid(t,a)?(o||(o=[])).push(a):i.onRemove&&i.onRemove(this.local[l].spec)}return this.children.length?Hf(this.children,o||[],e,t,r,s,i):o?new z(o.sort(yt),Pt):se}add(e,t){return t.length?this==se?z.create(e,t):this.addInner(e,t,0):this}addInner(e,t,r){let s,i=0;e.forEach((l,a)=>{let c=a+r,d;if(d=ca(t,l,c)){for(s||(s=this.children.slice());i<s.length&&s[i]<a;)i+=3;s[i]==a?s[i+2]=s[i+2].addInner(l,d,c+1):s.splice(i,0,a,a+l.nodeSize,tr(d,l,c+1,gt)),i+=3}});let o=aa(i?da(t):t,-r);for(let l=0;l<o.length;l++)o[l].type.valid(e,o[l])||o.splice(l--,1);return new z(o.length?this.local.concat(o).sort(yt):this.local,s||this.children)}remove(e){return e.length==0||this==se?this:this.removeInner(e,0)}removeInner(e,t){let r=this.children,s=this.local;for(let i=0;i<r.length;i+=3){let o,l=r[i]+t,a=r[i+1]+t;for(let d=0,u;d<e.length;d++)(u=e[d])&&u.from>l&&u.to<a&&(e[d]=null,(o||(o=[])).push(u));if(!o)continue;r==this.children&&(r=this.children.slice());let c=r[i+2].removeInner(o,l+1);c!=se?r[i+2]=c:(r.splice(i,3),i-=3)}if(s.length){for(let i=0,o;i<e.length;i++)if(o=e[i])for(let l=0;l<s.length;l++)s[l].eq(o,t)&&(s==this.local&&(s=this.local.slice()),s.splice(l--,1))}return r==this.children&&s==this.local?this:s.length||r.length?new z(s,r):se}forChild(e,t){if(this==se)return this;if(t.isLeaf)return z.empty;let r,s;for(let l=0;l<this.children.length;l+=3)if(this.children[l]>=e){this.children[l]==e&&(r=this.children[l+2]);break}let i=e+1,o=i+t.content.size;for(let l=0;l<this.local.length;l++){let a=this.local[l];if(a.from<o&&a.to>i&&a.type instanceof st){let c=Math.max(i,a.from)-i,d=Math.min(o,a.to)-i;c<d&&(s||(s=[])).push(a.copy(c,d))}}if(s){let l=new z(s.sort(yt),Pt);return r?new it([l,r]):l}return r||se}eq(e){if(this==e)return!0;if(!(e instanceof z)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let t=0;t<this.local.length;t++)if(!this.local[t].eq(e.local[t]))return!1;for(let t=0;t<this.children.length;t+=3)if(this.children[t]!=e.children[t]||this.children[t+1]!=e.children[t+1]||!this.children[t+2].eq(e.children[t+2]))return!1;return!0}locals(e){return Js(this.localsInner(e))}localsInner(e){if(this==se)return Pt;if(e.inlineContent||!this.local.some(st.is))return this.local;let t=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof st||t.push(this.local[r]);return t}forEachSet(e){e(this)}}z.empty=new z([],[]),z.removeOverlap=Js;const se=z.empty;class it{constructor(e){this.members=e}map(e,t){const r=this.members.map(s=>s.map(e,t,gt));return it.from(r)}forChild(e,t){if(t.isLeaf)return z.empty;let r=[];for(let s=0;s<this.members.length;s++){let i=this.members[s].forChild(e,t);i!=se&&(i instanceof it?r=r.concat(i.members):r.push(i))}return it.from(r)}eq(e){if(!(e instanceof it)||e.members.length!=this.members.length)return!1;for(let t=0;t<this.members.length;t++)if(!this.members[t].eq(e.members[t]))return!1;return!0}locals(e){let t,r=!0;for(let s=0;s<this.members.length;s++){let i=this.members[s].localsInner(e);if(i.length)if(!t)t=i;else{r&&(t=t.slice(),r=!1);for(let o=0;o<i.length;o++)t.push(i[o])}}return t?Js(r?t:t.sort(yt)):Pt}static from(e){switch(e.length){case 0:return se;case 1:return e[0];default:return new it(e.every(t=>t instanceof z)?e:e.reduce((t,r)=>t.concat(r instanceof z?r:r.members),[]))}}forEachSet(e){for(let t=0;t<this.members.length;t++)this.members[t].forEachSet(e)}}function Hf(n,e,t,r,s,i,o){let l=n.slice();for(let c=0,d=i;c<t.maps.length;c++){let u=0;t.maps[c].forEach((f,h,p,m)=>{let g=m-p-(h-f);for(let y=0;y<l.length;y+=3){let k=l[y+1];if(k<0||f>k+d-u)continue;let A=l[y]+d-u;h>=A?l[y+1]=f<=A?-2:-1:f>=d&&g&&(l[y]+=g,l[y+1]+=g)}u+=g}),d=t.maps[c].map(d,-1)}let a=!1;for(let c=0;c<l.length;c+=3)if(l[c+1]<0){if(l[c+1]==-2){a=!0,l[c+1]=-1;continue}let d=t.map(n[c]+i),u=d-s;if(u<0||u>=r.content.size){a=!0;continue}let f=t.map(n[c+1]+i,-1),h=f-s,{index:p,offset:m}=r.content.findIndex(u),g=r.maybeChild(p);if(g&&m==u&&m+g.nodeSize==h){let y=l[c+2].mapInner(t,g,d+1,n[c]+i+1,o);y!=se?(l[c]=u,l[c+1]=h,l[c+2]=y):(l[c+1]=-2,a=!0)}else a=!0}if(a){let c=Ff(l,n,e,t,s,i,o),d=tr(c,r,0,o);e=d.local;for(let u=0;u<l.length;u+=3)l[u+1]<0&&(l.splice(u,3),u-=3);for(let u=0,f=0;u<d.children.length;u+=3){let h=d.children[u];for(;f<l.length&&l[f]<h;)f+=3;l.splice(f,0,d.children[u],d.children[u+1],d.children[u+2])}}return new z(e.sort(yt),l)}function aa(n,e){if(!e||!n.length)return n;let t=[];for(let r=0;r<n.length;r++){let s=n[r];t.push(new X(s.from+e,s.to+e,s.type))}return t}function Ff(n,e,t,r,s,i,o){function l(a,c){for(let d=0;d<a.local.length;d++){let u=a.local[d].map(r,s,c);u?t.push(u):o.onRemove&&o.onRemove(a.local[d].spec)}for(let d=0;d<a.children.length;d+=3)l(a.children[d+2],a.children[d]+c+1)}for(let a=0;a<n.length;a+=3)n[a+1]==-1&&l(n[a+2],e[a]+i+1);return t}function ca(n,e,t){if(e.isLeaf)return null;let r=t+e.nodeSize,s=null;for(let i=0,o;i<n.length;i++)(o=n[i])&&o.from>t&&o.to<r&&((s||(s=[])).push(o),n[i]=null);return s}function da(n){let e=[];for(let t=0;t<n.length;t++)n[t]!=null&&e.push(n[t]);return e}function tr(n,e,t,r){let s=[],i=!1;e.forEach((l,a)=>{let c=ca(n,l,a+t);if(c){i=!0;let d=tr(c,l,t+a+1,r);d!=se&&s.push(a,a+l.nodeSize,d)}});let o=aa(i?da(n):n,-t).sort(yt);for(let l=0;l<o.length;l++)o[l].type.valid(e,o[l])||(r.onRemove&&r.onRemove(o[l].spec),o.splice(l--,1));return o.length||s.length?new z(o,s):se}function yt(n,e){return n.from-e.from||n.to-e.to}function Js(n){let e=n;for(let t=0;t<e.length-1;t++){let r=e[t];if(r.from!=r.to)for(let s=t+1;s<e.length;s++){let i=e[s];if(i.from==r.from){i.to!=r.to&&(e==n&&(e=n.slice()),e[s]=i.copy(i.from,r.to),ua(e,s+1,i.copy(r.to,i.to)));continue}else{i.from<r.to&&(e==n&&(e=n.slice()),e[t]=r.copy(r.from,i.from),ua(e,s,r.copy(i.from,r.to)));break}}}return e}function ua(n,e,t){for(;e<n.length&&yt(t,n[e])>0;)e++;n.splice(e,0,t)}function qs(n){let e=[];return n.someProp("decorations",t=>{let r=t(n.state);r&&r!=se&&e.push(r)}),n.cursorWrapper&&e.push(z.create(n.state.doc,[n.cursorWrapper.deco])),it.from(e)}const $f={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Vf=de&&Je<=11;class Wf{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class jf{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Wf,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let s=0;s<r.length;s++)this.queue.push(r[s]);de&&Je<=11&&r.some(s=>s.type=="childList"&&s.removedNodes.length||s.type=="characterData"&&s.oldValue.length>s.target.nodeValue.length)?this.flushSoon():this.flush()}),Vf&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,$f)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let t=0;t<e.length;t++)this.queue.push(e[t]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(Fl(this.view)){if(this.suppressingSelectionUpdates)return ze(this.view);if(de&&Je<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&ft(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let t=new Set,r;for(let i=e.focusNode;i;i=nn(i))t.add(i);for(let i=e.anchorNode;i;i=nn(i))if(t.has(i)){r=i;break}let s=r&&this.view.docView.nearestDesc(r);if(s&&s.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let t=this.pendingRecords();t.length&&(this.queue=[]);let r=e.domSelectionRange(),s=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&Fl(e)&&!this.ignoreSelectionChange(r),i=-1,o=-1,l=!1,a=[];if(e.editable)for(let d=0;d<t.length;d++){let u=this.registerMutation(t[d],a);u&&(i=i<0?u.from:Math.min(u.from,i),o=o<0?u.to:Math.max(u.to,o),u.typeOver&&(l=!0))}if(we&&a.length){let d=a.filter(u=>u.nodeName=="BR");if(d.length==2){let[u,f]=d;u.parentNode&&u.parentNode.parentNode==f.parentNode?f.remove():u.remove()}else{let{focusNode:u}=this.currentSelection;for(let f of d){let h=f.parentNode;h&&h.nodeName=="LI"&&(!u||Jf(e,u)!=h)&&f.remove()}}}let c=null;i<0&&s&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&Yn(r)&&(c=Ls(e))&&c.eq(E.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,ze(e),this.currentSelection.set(r)):(i>-1||s)&&(i>-1&&(e.docView.markDirty(i,o),Kf(e)),this.handleDOMChange(i,o,l,a),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||ze(e),this.currentSelection.set(r))}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let r=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(r==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!r||r.ignoreMutation(e))return null;if(e.type=="childList"){for(let d=0;d<e.addedNodes.length;d++){let u=e.addedNodes[d];t.push(u),u.nodeType==3&&(this.lastChangedTextNode=u)}if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(e.target))return{from:r.posBefore,to:r.posAfter};let s=e.previousSibling,i=e.nextSibling;if(de&&Je<=11&&e.addedNodes.length)for(let d=0;d<e.addedNodes.length;d++){let{previousSibling:u,nextSibling:f}=e.addedNodes[d];(!u||Array.prototype.indexOf.call(e.addedNodes,u)<0)&&(s=u),(!f||Array.prototype.indexOf.call(e.addedNodes,f)<0)&&(i=f)}let o=s&&s.parentNode==e.target?ee(s)+1:0,l=r.localPosFromDOM(e.target,o,-1),a=i&&i.parentNode==e.target?ee(i):e.target.childNodes.length,c=r.localPosFromDOM(e.target,a,1);return{from:l,to:c}}else return e.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:(this.lastChangedTextNode=e.target,{from:r.posAtStart,to:r.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let fa=new WeakMap,ha=!1;function Kf(n){if(!fa.has(n)&&(fa.set(n,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(n.dom).whiteSpace)!==-1)){if(n.requiresGeckoHackNode=we,ha)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),ha=!0}}function pa(n,e){let t=e.startContainer,r=e.startOffset,s=e.endContainer,i=e.endOffset,o=n.domAtPos(n.state.selection.anchor);return ft(o.node,o.offset,s,i)&&([t,r,s,i]=[s,i,t,r]),{anchorNode:t,anchorOffset:r,focusNode:s,focusOffset:i}}function Uf(n,e){if(e.getComposedRanges){let s=e.getComposedRanges(n.root)[0];if(s)return pa(n,s)}let t;function r(s){s.preventDefault(),s.stopImmediatePropagation(),t=s.getTargetRanges()[0]}return n.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),n.dom.removeEventListener("beforeinput",r,!0),t?pa(n,t):null}function Jf(n,e){for(let t=e.parentNode;t&&t!=n.dom;t=t.parentNode){let r=n.docView.nearestDesc(t,!0);if(r&&r.node.isBlock)return t}return null}function qf(n,e,t){let{node:r,fromOffset:s,toOffset:i,from:o,to:l}=n.docView.parseRange(e,t),a=n.domSelectionRange(),c,d=a.anchorNode;if(d&&n.dom.contains(d.nodeType==1?d:d.parentNode)&&(c=[{node:d,offset:a.anchorOffset}],Yn(a)||c.push({node:a.focusNode,offset:a.focusOffset})),re&&n.input.lastKeyCode===8)for(let g=i;g>s;g--){let y=r.childNodes[g-1],k=y.pmViewDesc;if(y.nodeName=="BR"&&!k){i=g;break}if(!k||k.size)break}let u=n.state.doc,f=n.someProp("domParser")||je.fromSchema(n.state.schema),h=u.resolve(o),p=null,m=f.parse(r,{topNode:h.parent,topMatch:h.parent.contentMatchAt(h.index()),topOpen:!0,from:s,to:i,preserveWhitespace:h.parent.type.whitespace=="pre"?"full":!0,findPositions:c,ruleFromNode:_f,context:h});if(c&&c[0].pos!=null){let g=c[0].pos,y=c[1]&&c[1].pos;y==null&&(y=g),p={anchor:g+o,head:y+o}}return{doc:m,sel:p,from:o,to:l}}function _f(n){let e=n.pmViewDesc;if(e)return e.parseRule();if(n.nodeName=="BR"&&n.parentNode){if(oe&&/^(ul|ol)$/i.test(n.parentNode.nodeName)){let t=document.createElement("div");return t.appendChild(document.createElement("li")),{skip:t}}else if(n.parentNode.lastChild==n||oe&&/^(tr|table)$/i.test(n.parentNode.nodeName))return{ignore:!0}}else if(n.nodeName=="IMG"&&n.getAttribute("mark-placeholder"))return{ignore:!0};return null}const Gf=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function Yf(n,e,t,r,s){let i=n.input.compositionPendingChanges||(n.composing?n.input.compositionID:0);if(n.input.compositionPendingChanges=0,e<0){let D=n.input.lastSelectionTime>Date.now()-50?n.input.lastSelectionOrigin:null,me=Ls(n,D);if(me&&!n.state.selection.eq(me)){if(re&&Pe&&n.input.lastKeyCode===13&&Date.now()-100<n.input.lastKeyCodeTime&&n.someProp("handleKeyDown",Gt=>Gt(n,ht(13,"Enter"))))return;let ct=n.state.tr.setSelection(me);D=="pointer"?ct.setMeta("pointer",!0):D=="key"&&ct.scrollIntoView(),i&&ct.setMeta("composition",i),n.dispatch(ct)}return}let o=n.state.doc.resolve(e),l=o.sharedDepth(t);e=o.before(l+1),t=n.state.doc.resolve(t).after(l+1);let a=n.state.selection,c=qf(n,e,t),d=n.state.doc,u=d.slice(c.from,c.to),f,h;n.input.lastKeyCode===8&&Date.now()-100<n.input.lastKeyCodeTime?(f=n.state.selection.to,h="end"):(f=n.state.selection.from,h="start"),n.input.lastKeyCode=null;let p=Zf(u.content,c.doc.content,c.from,f,h);if(p&&n.input.domChangeCount++,(Rt&&n.input.lastIOSEnter>Date.now()-225||Pe)&&s.some(D=>D.nodeType==1&&!Gf.test(D.nodeName))&&(!p||p.endA>=p.endB)&&n.someProp("handleKeyDown",D=>D(n,ht(13,"Enter")))){n.input.lastIOSEnter=0;return}if(!p)if(r&&a instanceof T&&!a.empty&&a.$head.sameParent(a.$anchor)&&!n.composing&&!(c.sel&&c.sel.anchor!=c.sel.head))p={start:a.from,endA:a.to,endB:a.to};else{if(c.sel){let D=ma(n,n.state.doc,c.sel);if(D&&!D.eq(n.state.selection)){let me=n.state.tr.setSelection(D);i&&me.setMeta("composition",i),n.dispatch(me)}}return}n.state.selection.from<n.state.selection.to&&p.start==p.endB&&n.state.selection instanceof T&&(p.start>n.state.selection.from&&p.start<=n.state.selection.from+2&&n.state.selection.from>=c.from?p.start=n.state.selection.from:p.endA<n.state.selection.to&&p.endA>=n.state.selection.to-2&&n.state.selection.to<=c.to&&(p.endB+=n.state.selection.to-p.endA,p.endA=n.state.selection.to)),de&&Je<=11&&p.endB==p.start+1&&p.endA==p.start&&p.start>c.from&&c.doc.textBetween(p.start-c.from-1,p.start-c.from+1)==" \xA0"&&(p.start--,p.endA--,p.endB--);let m=c.doc.resolveNoCache(p.start-c.from),g=c.doc.resolveNoCache(p.endB-c.from),y=d.resolve(p.start),k=m.sameParent(g)&&m.parent.inlineContent&&y.end()>=p.endA,A;if((Rt&&n.input.lastIOSEnter>Date.now()-225&&(!k||s.some(D=>D.nodeName=="DIV"||D.nodeName=="P"))||!k&&m.pos<c.doc.content.size&&!m.sameParent(g)&&(A=E.findFrom(c.doc.resolve(m.pos+1),1,!0))&&A.head==g.pos)&&n.someProp("handleKeyDown",D=>D(n,ht(13,"Enter")))){n.input.lastIOSEnter=0;return}if(n.state.selection.anchor>p.start&&Qf(d,p.start,p.endA,m,g)&&n.someProp("handleKeyDown",D=>D(n,ht(8,"Backspace")))){Pe&&re&&n.domObserver.suppressSelectionUpdates();return}re&&p.endB==p.start&&(n.input.lastChromeDelete=Date.now()),Pe&&!k&&m.start()!=g.start()&&g.parentOffset==0&&m.depth==g.depth&&c.sel&&c.sel.anchor==c.sel.head&&c.sel.head==p.endA&&(p.endB-=2,g=c.doc.resolveNoCache(p.endB-c.from),setTimeout(()=>{n.someProp("handleKeyDown",function(D){return D(n,ht(13,"Enter"))})},20));let R=p.start,M=p.endA,v,F,K;if(k){if(m.pos==g.pos)de&&Je<=11&&m.parentOffset==0&&(n.domObserver.suppressSelectionUpdates(),setTimeout(()=>ze(n),20)),v=n.state.tr.delete(R,M),F=d.resolve(p.start).marksAcross(d.resolve(p.endA));else if(p.endA==p.endB&&(K=Xf(m.parent.content.cut(m.parentOffset,g.parentOffset),y.parent.content.cut(y.parentOffset,p.endA-y.start()))))v=n.state.tr,K.type=="add"?v.addMark(R,M,K.mark):v.removeMark(R,M,K.mark);else if(m.parent.child(m.index()).isText&&m.index()==g.index()-(g.textOffset?0:1)){let D=m.parent.textBetween(m.parentOffset,g.parentOffset);if(n.someProp("handleTextInput",me=>me(n,R,M,D)))return;v=n.state.tr.insertText(D,R,M)}}if(v||(v=n.state.tr.replace(R,M,c.doc.slice(p.start-c.from,p.endB-c.from))),c.sel){let D=ma(n,v.doc,c.sel);D&&!(re&&n.composing&&D.empty&&(p.start!=p.endB||n.input.lastChromeDelete<Date.now()-100)&&(D.head==R||D.head==v.mapping.map(M)-1)||de&&D.empty&&D.head==R)&&v.setSelection(D)}F&&v.ensureMarks(F),i&&v.setMeta("composition",i),n.dispatch(v.scrollIntoView())}function ma(n,e,t){return Math.max(t.anchor,t.head)>e.content.size?null:Bs(n,e.resolve(t.anchor),e.resolve(t.head))}function Xf(n,e){let t=n.firstChild.marks,r=e.firstChild.marks,s=t,i=r,o,l,a;for(let d=0;d<r.length;d++)s=r[d].removeFromSet(s);for(let d=0;d<t.length;d++)i=t[d].removeFromSet(i);if(s.length==1&&i.length==0)l=s[0],o="add",a=d=>d.mark(l.addToSet(d.marks));else if(s.length==0&&i.length==1)l=i[0],o="remove",a=d=>d.mark(l.removeFromSet(d.marks));else return null;let c=[];for(let d=0;d<e.childCount;d++)c.push(a(e.child(d)));if(b.from(c).eq(n))return{mark:l,type:o}}function Qf(n,e,t,r,s){if(t-e<=s.pos-r.pos||_s(r,!0,!1)<s.pos)return!1;let i=n.resolve(e);if(!r.parent.isTextblock){let l=i.nodeAfter;return l!=null&&t==e+l.nodeSize}if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;let o=n.resolve(_s(i,!0,!0));return!o.parent.isTextblock||o.pos>t||_s(o,!0,!1)<t?!1:r.parent.content.cut(r.parentOffset).eq(o.parent.content)}function _s(n,e,t){let r=n.depth,s=e?n.end():n.pos;for(;r>0&&(e||n.indexAfter(r)==n.node(r).childCount);)r--,s++,e=!1;if(t){let i=n.node(r).maybeChild(n.indexAfter(r));for(;i&&!i.isLeaf;)i=i.firstChild,s++}return s}function Zf(n,e,t,r,s){let i=n.findDiffStart(e,t);if(i==null)return null;let{a:o,b:l}=n.findDiffEnd(e,t+n.size,t+e.size);if(s=="end"){let a=Math.max(0,i-Math.min(o,l));r-=o+a-i}if(o<i&&n.size<e.size){let a=r<=i&&r>=o?i-r:0;i-=a,i&&i<e.size&&ga(e.textBetween(i-1,i+1))&&(i+=a?1:-1),l=i+(l-o),o=i}else if(l<i){let a=r<=i&&r>=l?i-r:0;i-=a,i&&i<n.size&&ga(n.textBetween(i-1,i+1))&&(i+=a?1:-1),o=i+(o-l),l=i}return{start:i,endA:o,endB:l}}function ga(n){if(n.length!=2)return!1;let e=n.charCodeAt(0),t=n.charCodeAt(1);return e>=56320&&e<=57343&&t>=55296&&t<=56319}class eh{constructor(e,t){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new kf,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(wa),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=ka(this),ba(this),this.nodeViews=Sa(this),this.docView=El(this.state.doc,ya(this),qs(this),this.dom,this),this.domObserver=new jf(this,(r,s,i,o)=>Yf(this,r,s,i,o)),this.domObserver.start(),Sf(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&Ws(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(wa),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let r in this._props)t[r]=this._props[r];t.state=this.state;for(let r in e)t[r]=e[r];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){var r;let s=this.state,i=!1,o=!1;e.storedMarks&&this.composing&&(sa(this),o=!0),this.state=e;let l=s.plugins!=e.plugins||this._props.plugins!=t.plugins;if(l||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let h=Sa(this);nh(h,this.nodeViews)&&(this.nodeViews=h,i=!0)}(l||t.handleDOMEvents!=this._props.handleDOMEvents)&&Ws(this),this.editable=ka(this),ba(this);let a=qs(this),c=ya(this),d=s.plugins!=e.plugins&&!s.doc.eq(e.doc)?"reset":e.scrollToSelection>s.scrollToSelection?"to selection":"preserve",u=i||!this.docView.matchesNode(e.doc,c,a);(u||!e.selection.eq(s.selection))&&(o=!0);let f=d=="preserve"&&o&&this.dom.style.overflowAnchor==null&&Iu(this);if(o){this.domObserver.stop();let h=u&&(de||re)&&!this.composing&&!s.selection.empty&&!e.selection.empty&&th(s.selection,e.selection);if(u){let p=re?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=If(this)),(i||!this.docView.update(e.doc,c,a,this))&&(this.docView.updateOuterDeco(c),this.docView.destroy(),this.docView=El(e.doc,c,a,this.dom,this)),p&&!this.trackWrites&&(h=!0)}h||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&rf(this))?ze(this,h):(zl(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(s),!((r=this.dragging)===null||r===void 0)&&r.node&&!s.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,s),d=="reset"?this.dom.scrollTop=0:d=="to selection"?this.scrollToSelection():f&&Lu(f)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!(!e||!this.dom.contains(e.nodeType==1?e:e.parentNode))){if(!this.someProp("handleScrollToSelection",t=>t(this)))if(this.state.selection instanceof x){let t=this.docView.domAfterPos(this.state.selection.from);t.nodeType==1&&pl(this,t.getBoundingClientRect(),e)}else pl(this,this.coordsAtPos(this.state.selection.head,1),e)}}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let t=0;t<this.directPlugins.length;t++){let r=this.directPlugins[t];r.spec.view&&this.pluginViews.push(r.spec.view(this))}for(let t=0;t<this.state.plugins.length;t++){let r=this.state.plugins[t];r.spec.view&&this.pluginViews.push(r.spec.view(this))}}else for(let t=0;t<this.pluginViews.length;t++){let r=this.pluginViews[t];r.update&&r.update(this,e)}}updateDraggedNode(e,t){let r=e.node,s=-1;if(this.state.doc.nodeAt(r.from)==r.node)s=r.from;else{let i=r.from+(this.state.doc.content.size-t.doc.content.size);(i>0&&this.state.doc.nodeAt(i))==r.node&&(s=i)}this.dragging=new oa(e.slice,e.move,s<0?void 0:x.create(this.state.doc,s))}someProp(e,t){let r=this._props&&this._props[e],s;if(r!=null&&(s=t?t(r):r))return s;for(let o=0;o<this.directPlugins.length;o++){let l=this.directPlugins[o].props[e];if(l!=null&&(s=t?t(l):l))return s}let i=this.state.plugins;if(i)for(let o=0;o<i.length;o++){let l=i[o].props[e];if(l!=null&&(s=t?t(l):l))return s}}hasFocus(){if(de){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if(e.contentEditable=="false")return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&Pu(this.dom),ze(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let t=this.dom.parentNode;t;t=t.parentNode)if(t.nodeType==9||t.nodeType==11&&t.host)return t.getSelection||(Object.getPrototypeOf(t).getSelection=()=>t.ownerDocument.getSelection()),this._root=t}return e||document}updateRoot(){this._root=null}posAtCoords(e){return $u(this,e)}coordsAtPos(e,t=1){return Sl(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,r=-1){let s=this.docView.posFromDOM(e,t,r);if(s==null)throw new RangeError("DOM position not inside the editor");return s}endOfTextblock(e,t){return Uu(this,t||this.state,e)}pasteHTML(e,t){return un(this,"",e,!1,t||new ClipboardEvent("paste"))}pasteText(e,t){return un(this,e,null,!0,t||new ClipboardEvent("paste"))}serializeForClipboard(e){return Fs(this,e)}destroy(){this.docView&&(wf(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],qs(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,Cu())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return xf(this,e)}dispatch(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))}domSelectionRange(){let e=this.domSelection();return e?oe&&this.root.nodeType===11&&Eu(this.dom.ownerDocument)==this.dom&&Uf(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function ya(n){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(n.editable),n.someProp("attributes",t=>{if(typeof t=="function"&&(t=t(n.state)),t)for(let r in t)r=="class"?e.class+=" "+t[r]:r=="style"?e.style=(e.style?e.style+";":"")+t[r]:!e[r]&&r!="contenteditable"&&r!="nodeName"&&(e[r]=String(t[r]))}),e.translate||(e.translate="no"),[X.node(0,n.state.doc.content.size,e)]}function ba(n){if(n.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),n.cursorWrapper={dom:e,deco:X.widget(n.state.selection.from,e,{raw:!0,marks:n.markCursor})}}else n.cursorWrapper=null}function ka(n){return!n.someProp("editable",e=>e(n.state)===!1)}function th(n,e){let t=Math.min(n.$anchor.sharedDepth(n.head),e.$anchor.sharedDepth(e.head));return n.$anchor.start(t)!=e.$anchor.start(t)}function Sa(n){let e=Object.create(null);function t(r){for(let s in r)Object.prototype.hasOwnProperty.call(e,s)||(e[s]=r[s])}return n.someProp("nodeViews",t),n.someProp("markViews",t),e}function nh(n,e){let t=0,r=0;for(let s in n){if(n[s]!=e[s])return!0;t++}for(let s in e)r++;return t!=r}function wa(n){if(n.spec.state||n.spec.filterTransaction||n.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}for(var Ye={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},nr={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},rh=typeof navigator<"u"&&/Mac/.test(navigator.platform),sh=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),te=0;te<10;te++)Ye[48+te]=Ye[96+te]=String(te);for(var te=1;te<=24;te++)Ye[te+111]="F"+te;for(var te=65;te<=90;te++)Ye[te]=String.fromCharCode(te+32),nr[te]=String.fromCharCode(te);for(var Gs in Ye)nr.hasOwnProperty(Gs)||(nr[Gs]=Ye[Gs]);function ih(n){var e=rh&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||sh&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?nr:Ye)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}const oh=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function lh(n){let e=n.split(/-(?!$)/),t=e[e.length-1];t=="Space"&&(t=" ");let r,s,i,o;for(let l=0;l<e.length-1;l++){let a=e[l];if(/^(cmd|meta|m)$/i.test(a))o=!0;else if(/^a(lt)?$/i.test(a))r=!0;else if(/^(c|ctrl|control)$/i.test(a))s=!0;else if(/^s(hift)?$/i.test(a))i=!0;else if(/^mod$/i.test(a))oh?o=!0:s=!0;else throw new Error("Unrecognized modifier name: "+a)}return r&&(t="Alt-"+t),s&&(t="Ctrl-"+t),o&&(t="Meta-"+t),i&&(t="Shift-"+t),t}function ah(n){let e=Object.create(null);for(let t in n)e[lh(t)]=n[t];return e}function Ys(n,e,t=!0){return e.altKey&&(n="Alt-"+n),e.ctrlKey&&(n="Ctrl-"+n),e.metaKey&&(n="Meta-"+n),t&&e.shiftKey&&(n="Shift-"+n),n}function ch(n){return new V({props:{handleKeyDown:Xs(n)}})}function Xs(n){let e=ah(n);return function(t,r){let s=ih(r),i,o=e[Ys(s,r)];if(o&&o(t.state,t.dispatch,t))return!0;if(s.length==1&&s!=" "){if(r.shiftKey){let l=e[Ys(s,r,!1)];if(l&&l(t.state,t.dispatch,t))return!0}if((r.shiftKey||r.altKey||r.metaKey||s.charCodeAt(0)>127)&&(i=Ye[r.keyCode])&&i!=s){let l=e[Ys(i,r)];if(l&&l(t.state,t.dispatch,t))return!0}}return!1}}const Qs=(n,e)=>n.selection.empty?!1:(e&&e(n.tr.deleteSelection().scrollIntoView()),!0);function Ca(n,e){let{$cursor:t}=n.selection;return!t||(e?!e.endOfTextblock("backward",n):t.parentOffset>0)?null:t}const xa=(n,e,t)=>{let r=Ca(n,t);if(!r)return!1;let s=Zs(r);if(!s){let o=r.blockRange(),l=o&&Ot(o);return l==null?!1:(e&&e(n.tr.lift(o,l).scrollIntoView()),!0)}let i=s.nodeBefore;if(Da(n,s,e,-1))return!0;if(r.parent.content.size==0&&(Bt(i,"end")||x.isSelectable(i)))for(let o=r.depth;;o--){let l=Gn(n.doc,r.before(o),r.after(o),w.empty);if(l&&l.slice.size<l.to-l.from){if(e){let a=n.tr.step(l);a.setSelection(Bt(i,"end")?E.findFrom(a.doc.resolve(a.mapping.map(s.pos,-1)),-1):x.create(a.doc,s.pos-i.nodeSize)),e(a.scrollIntoView())}return!0}if(o==1||r.node(o-1).childCount>1)break}return i.isAtom&&s.depth==r.depth-1?(e&&e(n.tr.delete(s.pos-i.nodeSize,s.pos).scrollIntoView()),!0):!1},dh=(n,e,t)=>{let r=Ca(n,t);if(!r)return!1;let s=Zs(r);return s?Ma(n,s,e):!1},uh=(n,e,t)=>{let r=Aa(n,t);if(!r)return!1;let s=ei(r);return s?Ma(n,s,e):!1};function Ma(n,e,t){let r=e.nodeBefore,s=r,i=e.pos-1;for(;!s.isTextblock;i--){if(s.type.spec.isolating)return!1;let d=s.lastChild;if(!d)return!1;s=d}let o=e.nodeAfter,l=o,a=e.pos+1;for(;!l.isTextblock;a++){if(l.type.spec.isolating)return!1;let d=l.firstChild;if(!d)return!1;l=d}let c=Gn(n.doc,i,a,w.empty);if(!c||c.from!=i||c instanceof Q&&c.slice.size>=a-i)return!1;if(t){let d=n.tr.step(c);d.setSelection(T.create(d.doc,i)),t(d.scrollIntoView())}return!0}function Bt(n,e,t=!1){for(let r=n;r;r=e=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(t&&r.childCount!=1)return!1}return!1}const Ta=(n,e,t)=>{let{$head:r,empty:s}=n.selection,i=r;if(!s)return!1;if(r.parent.isTextblock){if(t?!t.endOfTextblock("backward",n):r.parentOffset>0)return!1;i=Zs(r)}let o=i&&i.nodeBefore;return!o||!x.isSelectable(o)?!1:(e&&e(n.tr.setSelection(x.create(n.doc,i.pos-o.nodeSize)).scrollIntoView()),!0)};function Zs(n){if(!n.parent.type.spec.isolating)for(let e=n.depth-1;e>=0;e--){if(n.index(e)>0)return n.doc.resolve(n.before(e+1));if(n.node(e).type.spec.isolating)break}return null}function Aa(n,e){let{$cursor:t}=n.selection;return!t||(e?!e.endOfTextblock("forward",n):t.parentOffset<t.parent.content.size)?null:t}const Ea=(n,e,t)=>{let r=Aa(n,t);if(!r)return!1;let s=ei(r);if(!s)return!1;let i=s.nodeAfter;if(Da(n,s,e,1))return!0;if(r.parent.content.size==0&&(Bt(i,"start")||x.isSelectable(i))){let o=Gn(n.doc,r.before(),r.after(),w.empty);if(o&&o.slice.size<o.to-o.from){if(e){let l=n.tr.step(o);l.setSelection(Bt(i,"start")?E.findFrom(l.doc.resolve(l.mapping.map(s.pos)),1):x.create(l.doc,l.mapping.map(s.pos))),e(l.scrollIntoView())}return!0}}return i.isAtom&&s.depth==r.depth-1?(e&&e(n.tr.delete(s.pos,s.pos+i.nodeSize).scrollIntoView()),!0):!1},Oa=(n,e,t)=>{let{$head:r,empty:s}=n.selection,i=r;if(!s)return!1;if(r.parent.isTextblock){if(t?!t.endOfTextblock("forward",n):r.parentOffset<r.parent.content.size)return!1;i=ei(r)}let o=i&&i.nodeAfter;return!o||!x.isSelectable(o)?!1:(e&&e(n.tr.setSelection(x.create(n.doc,i.pos)).scrollIntoView()),!0)};function ei(n){if(!n.parent.type.spec.isolating)for(let e=n.depth-1;e>=0;e--){let t=n.node(e);if(n.index(e)+1<t.childCount)return n.doc.resolve(n.after(e+1));if(t.type.spec.isolating)break}return null}const fh=(n,e)=>{let t=n.selection,r=t instanceof x,s;if(r){if(t.node.isTextblock||!Ke(n.doc,t.from))return!1;s=t.from}else if(s=_n(n.doc,t.from,-1),s==null)return!1;if(e){let i=n.tr.join(s);r&&i.setSelection(x.create(i.doc,s-n.doc.resolve(s).nodeBefore.nodeSize)),e(i.scrollIntoView())}return!0},hh=(n,e)=>{let t=n.selection,r;if(t instanceof x){if(t.node.isTextblock||!Ke(n.doc,t.to))return!1;r=t.to}else if(r=_n(n.doc,t.to,1),r==null)return!1;return e&&e(n.tr.join(r).scrollIntoView()),!0},ph=(n,e)=>{let{$from:t,$to:r}=n.selection,s=t.blockRange(r),i=s&&Ot(s);return i==null?!1:(e&&e(n.tr.lift(s,i).scrollIntoView()),!0)},Na=(n,e)=>{let{$head:t,$anchor:r}=n.selection;return!t.parent.type.spec.code||!t.sameParent(r)?!1:(e&&e(n.tr.insertText(`
10
+ `).scrollIntoView()),!0)};function ti(n){for(let e=0;e<n.edgeCount;e++){let{type:t}=n.edge(e);if(t.isTextblock&&!t.hasRequiredAttrs())return t}return null}const mh=(n,e)=>{let{$head:t,$anchor:r}=n.selection;if(!t.parent.type.spec.code||!t.sameParent(r))return!1;let s=t.node(-1),i=t.indexAfter(-1),o=ti(s.contentMatchAt(i));if(!o||!s.canReplaceWith(i,i,o))return!1;if(e){let l=t.after(),a=n.tr.replaceWith(l,l,o.createAndFill());a.setSelection(E.near(a.doc.resolve(l),1)),e(a.scrollIntoView())}return!0},va=(n,e)=>{let t=n.selection,{$from:r,$to:s}=t;if(t instanceof he||r.parent.inlineContent||s.parent.inlineContent)return!1;let i=ti(s.parent.contentMatchAt(s.indexAfter()));if(!i||!i.isTextblock)return!1;if(e){let o=(!r.parentOffset&&s.index()<s.parent.childCount?r:s).pos,l=n.tr.insert(o,i.createAndFill());l.setSelection(T.create(l.doc,o+1)),e(l.scrollIntoView())}return!0},Ra=(n,e)=>{let{$cursor:t}=n.selection;if(!t||t.parent.content.size)return!1;if(t.depth>1&&t.after()!=t.end(-1)){let i=t.before();if(Ie(n.doc,i))return e&&e(n.tr.split(i).scrollIntoView()),!0}let r=t.blockRange(),s=r&&Ot(r);return s==null?!1:(e&&e(n.tr.lift(r,s).scrollIntoView()),!0)};function gh(n){return(e,t)=>{let{$from:r,$to:s}=e.selection;if(e.selection instanceof x&&e.selection.node.isBlock)return!r.parentOffset||!Ie(e.doc,r.pos)?!1:(t&&t(e.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let i=[],o,l,a=!1,c=!1;for(let h=r.depth;;h--)if(r.node(h).isBlock){a=r.end(h)==r.pos+(r.depth-h),c=r.start(h)==r.pos-(r.depth-h),l=ti(r.node(h-1).contentMatchAt(r.indexAfter(h-1))),i.unshift(a&&l?{type:l}:null),o=h;break}else{if(h==1)return!1;i.unshift(null)}let d=e.tr;(e.selection instanceof T||e.selection instanceof he)&&d.deleteSelection();let u=d.mapping.map(r.pos),f=Ie(d.doc,u,i.length,i);if(f||(i[0]=l?{type:l}:null,f=Ie(d.doc,u,i.length,i)),d.split(u,i.length,i),!a&&c&&r.node(o).type!=l){let h=d.mapping.map(r.before(o)),p=d.doc.resolve(h);l&&r.node(o-1).canReplaceWith(p.index(),p.index()+1,l)&&d.setNodeMarkup(d.mapping.map(r.before(o)),l)}return t&&t(d.scrollIntoView()),!0}}const yh=gh(),bh=(n,e)=>{let{$from:t,to:r}=n.selection,s,i=t.sharedDepth(r);return i==0?!1:(s=t.before(i),e&&e(n.tr.setSelection(x.create(n.doc,s))),!0)};function kh(n,e,t){let r=e.nodeBefore,s=e.nodeAfter,i=e.index();return!r||!s||!r.type.compatibleContent(s.type)?!1:!r.content.size&&e.parent.canReplace(i-1,i)?(t&&t(n.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(i,i+1)||!(s.isTextblock||Ke(n.doc,e.pos))?!1:(t&&t(n.tr.join(e.pos).scrollIntoView()),!0)}function Da(n,e,t,r){let s=e.nodeBefore,i=e.nodeAfter,o,l,a=s.type.spec.isolating||i.type.spec.isolating;if(!a&&kh(n,e,t))return!0;let c=!a&&e.parent.canReplace(e.index(),e.index()+1);if(c&&(o=(l=s.contentMatchAt(s.childCount)).findWrapping(i.type))&&l.matchType(o[0]||i.type).validEnd){if(t){let h=e.pos+i.nodeSize,p=b.empty;for(let y=o.length-1;y>=0;y--)p=b.from(o[y].create(null,p));p=b.from(s.copy(p));let m=n.tr.step(new Y(e.pos-1,h,e.pos,h,new w(p,1,0),o.length,!0)),g=m.doc.resolve(h+2*o.length);g.nodeAfter&&g.nodeAfter.type==s.type&&Ke(m.doc,g.pos)&&m.join(g.pos),t(m.scrollIntoView())}return!0}let d=i.type.spec.isolating||r>0&&a?null:E.findFrom(e,1),u=d&&d.$from.blockRange(d.$to),f=u&&Ot(u);if(f!=null&&f>=e.depth)return t&&t(n.tr.lift(u,f).scrollIntoView()),!0;if(c&&Bt(i,"start",!0)&&Bt(s,"end")){let h=s,p=[];for(;p.push(h),!h.isTextblock;)h=h.lastChild;let m=i,g=1;for(;!m.isTextblock;m=m.firstChild)g++;if(h.canReplace(h.childCount,h.childCount,m.content)){if(t){let y=b.empty;for(let A=p.length-1;A>=0;A--)y=b.from(p[A].copy(y));let k=n.tr.step(new Y(e.pos-p.length,e.pos+i.nodeSize,e.pos+g,e.pos+i.nodeSize-g,new w(y,p.length,0),0,!0));t(k.scrollIntoView())}return!0}}return!1}function Ia(n){return function(e,t){let r=e.selection,s=n<0?r.$from:r.$to,i=s.depth;for(;s.node(i).isInline;){if(!i)return!1;i--}return s.node(i).isTextblock?(t&&t(e.tr.setSelection(T.create(e.doc,n<0?s.start(i):s.end(i)))),!0):!1}}const Sh=Ia(-1),wh=Ia(1);function Ch(n,e=null){return function(t,r){let{$from:s,$to:i}=t.selection,o=s.blockRange(i),l=o&&ks(o,n,e);return l?(r&&r(t.tr.wrap(o,l).scrollIntoView()),!0):!1}}function La(n,e=null){return function(t,r){let s=!1;for(let i=0;i<t.selection.ranges.length&&!s;i++){let{$from:{pos:o},$to:{pos:l}}=t.selection.ranges[i];t.doc.nodesBetween(o,l,(a,c)=>{if(s)return!1;if(!(!a.isTextblock||a.hasMarkup(n,e)))if(a.type==n)s=!0;else{let d=t.doc.resolve(c),u=d.index();s=d.parent.canReplaceWith(u,u+1,n)}})}if(!s)return!1;if(r){let i=t.tr;for(let o=0;o<t.selection.ranges.length;o++){let{$from:{pos:l},$to:{pos:a}}=t.selection.ranges[o];i.setBlockType(l,a,n,e)}r(i.scrollIntoView())}return!0}}function ni(...n){return function(e,t,r){for(let s=0;s<n.length;s++)if(n[s](e,t,r))return!0;return!1}}ni(Qs,xa,Ta),ni(Qs,Ea,Oa),ni(Na,va,Ra,yh),typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function xh(n,e=null){return function(t,r){let{$from:s,$to:i}=t.selection,o=s.blockRange(i),l=!1,a=o;if(!o)return!1;if(o.depth>=2&&s.node(o.depth-1).type.compatibleContent(n)&&o.startIndex==0){if(s.index(o.depth-1)==0)return!1;let d=t.doc.resolve(o.start-2);a=new jn(d,d,o.depth),o.endIndex<o.parent.childCount&&(o=new jn(s,t.doc.resolve(i.end(o.depth)),o.depth)),l=!0}let c=ks(a,n,e,o);return c?(r&&r(Mh(t.tr,o,c,l,n).scrollIntoView()),!0):!1}}function Mh(n,e,t,r,s){let i=b.empty;for(let d=t.length-1;d>=0;d--)i=b.from(t[d].type.create(t[d].attrs,i));n.step(new Y(e.start-(r?2:0),e.end,e.start,e.end,new w(i,0,0),t.length,!0));let o=0;for(let d=0;d<t.length;d++)t[d].type==s&&(o=d+1);let l=t.length-o,a=e.start+t.length-(r?2:0),c=e.parent;for(let d=e.startIndex,u=e.endIndex,f=!0;d<u;d++,f=!1)!f&&Ie(n.doc,a,l)&&(n.split(a,l),a+=2*l),a+=c.child(d).nodeSize;return n}function Th(n){return function(e,t){let{$from:r,$to:s}=e.selection,i=r.blockRange(s,o=>o.childCount>0&&o.firstChild.type==n);return i?t?r.node(i.depth-1).type==n?Ah(e,t,n,i):Eh(e,t,i):!0:!1}}function Ah(n,e,t,r){let s=n.tr,i=r.end,o=r.$to.end(r.depth);i<o&&(s.step(new Y(i-1,o,i,o,new w(b.from(t.create(null,r.parent.copy())),1,0),1,!0)),r=new jn(s.doc.resolve(r.$from.pos),s.doc.resolve(o),r.depth));const l=Ot(r);if(l==null)return!1;s.lift(r,l);let a=s.mapping.map(i,-1)-1;return Ke(s.doc,a)&&s.join(a),e(s.scrollIntoView()),!0}function Eh(n,e,t){let r=n.tr,s=t.parent;for(let h=t.end,p=t.endIndex-1,m=t.startIndex;p>m;p--)h-=s.child(p).nodeSize,r.delete(h-1,h+1);let i=r.doc.resolve(t.start),o=i.nodeAfter;if(r.mapping.map(t.end)!=t.start+i.nodeAfter.nodeSize)return!1;let l=t.startIndex==0,a=t.endIndex==s.childCount,c=i.node(-1),d=i.index(-1);if(!c.canReplace(d+(l?0:1),d+1,o.content.append(a?b.empty:b.from(s))))return!1;let u=i.pos,f=u+o.nodeSize;return r.step(new Y(u-(l?1:0),f+(a?1:0),u+1,f-1,new w((l?b.empty:b.from(s.copy(b.empty))).append(a?b.empty:b.from(s.copy(b.empty))),l?0:1,a?0:1),l?0:1)),e(r.scrollIntoView()),!0}function Oh(n){return function(e,t){let{$from:r,$to:s}=e.selection,i=r.blockRange(s,c=>c.childCount>0&&c.firstChild.type==n);if(!i)return!1;let o=i.startIndex;if(o==0)return!1;let l=i.parent,a=l.child(o-1);if(a.type!=n)return!1;if(t){let c=a.lastChild&&a.lastChild.type==l.type,d=b.from(c?n.create():null),u=new w(b.from(n.create(null,b.from(l.type.create(null,d)))),c?3:1,0),f=i.start,h=i.end;t(e.tr.step(new Y(f-(c?3:1),h,f,h,u,1,!0)).scrollIntoView())}return!0}}function hn(n){const{state:e,transaction:t}=n;let{selection:r}=t,{doc:s}=t,{storedMarks:i}=t;return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return i},get selection(){return r},get doc(){return s},get tr(){return r=t.selection,s=t.doc,i=t.storedMarks,t}}}class pn{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:e,editor:t,state:r}=this,{view:s}=t,{tr:i}=r,o=this.buildProps(i);return Object.fromEntries(Object.entries(e).map(([l,a])=>[l,(...d)=>{const u=a(...d)(o);return!i.getMeta("preventDispatch")&&!this.hasCustomState&&s.dispatch(i),u}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){const{rawCommands:r,editor:s,state:i}=this,{view:o}=s,l=[],a=!!e,c=e||i.tr,d=()=>(!a&&t&&!c.getMeta("preventDispatch")&&!this.hasCustomState&&o.dispatch(c),l.every(f=>f===!0)),u={...Object.fromEntries(Object.entries(r).map(([f,h])=>[f,(...m)=>{const g=this.buildProps(c,t),y=h(...m)(g);return l.push(y),u}])),run:d};return u}createCan(e){const{rawCommands:t,state:r}=this,s=!1,i=e||r.tr,o=this.buildProps(i,s);return{...Object.fromEntries(Object.entries(t).map(([a,c])=>[a,(...d)=>c(...d)({...o,dispatch:void 0})])),chain:()=>this.createChain(i,s)}}buildProps(e,t=!0){const{rawCommands:r,editor:s,state:i}=this,{view:o}=s,l={tr:e,editor:s,view:o,state:hn({state:i,transaction:e}),dispatch:t?()=>{}:void 0,chain:()=>this.createChain(e,t),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(r).map(([a,c])=>[a,(...d)=>c(...d)(l)]))}};return l}}class Nh{constructor(){this.callbacks={}}on(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}emit(e,...t){const r=this.callbacks[e];return r&&r.forEach(s=>s.apply(this,t)),this}off(e,t){const r=this.callbacks[e];return r&&(t?this.callbacks[e]=r.filter(s=>s!==t):delete this.callbacks[e]),this}once(e,t){const r=(...s)=>{this.off(e,r),t.apply(this,s)};return this.on(e,r)}removeAllListeners(){this.callbacks={}}}function C(n,e,t){return n.config[e]===void 0&&n.parent?C(n.parent,e,t):typeof n.config[e]=="function"?n.config[e].bind({...t,parent:n.parent?C(n.parent,e,t):null}):n.config[e]}function mn(n){const e=n.filter(s=>s.type==="extension"),t=n.filter(s=>s.type==="node"),r=n.filter(s=>s.type==="mark");return{baseExtensions:e,nodeExtensions:t,markExtensions:r}}function ri(n){const e=[],{nodeExtensions:t,markExtensions:r}=mn(n),s=[...t,...r],i={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return n.forEach(o=>{const l={name:o.name,options:o.options,storage:o.storage,extensions:s},a=C(o,"addGlobalAttributes",l);if(!a)return;a().forEach(d=>{d.types.forEach(u=>{Object.entries(d.attributes).forEach(([f,h])=>{e.push({type:u,name:f,attribute:{...i,...h}})})})})}),s.forEach(o=>{const l={name:o.name,options:o.options,storage:o.storage},a=C(o,"addAttributes",l);if(!a)return;const c=a();Object.entries(c).forEach(([d,u])=>{const f={...i,...u};typeof f?.default=="function"&&(f.default=f.default()),f?.isRequired&&f?.default===void 0&&delete f.default,e.push({type:o.name,name:d,attribute:f})})}),e}function q(n,e){if(typeof n=="string"){if(!e.nodes[n])throw Error(`There is no node type named '${n}'. Maybe you forgot to add the extension?`);return e.nodes[n]}return n}function I(...n){return n.filter(e=>!!e).reduce((e,t)=>{const r={...e};return Object.entries(t).forEach(([s,i])=>{if(!r[s]){r[s]=i;return}if(s==="class"){const l=i?String(i).split(" "):[],a=r[s]?r[s].split(" "):[],c=l.filter(d=>!a.includes(d));r[s]=[...a,...c].join(" ")}else if(s==="style"){const l=i?i.split(";").map(d=>d.trim()).filter(Boolean):[],a=r[s]?r[s].split(";").map(d=>d.trim()).filter(Boolean):[],c=new Map;a.forEach(d=>{const[u,f]=d.split(":").map(h=>h.trim());c.set(u,f)}),l.forEach(d=>{const[u,f]=d.split(":").map(h=>h.trim());c.set(u,f)}),r[s]=Array.from(c.entries()).map(([d,u])=>`${d}: ${u}`).join("; ")}else r[s]=i}),r},{})}function rr(n,e){return e.filter(t=>t.type===n.type.name).filter(t=>t.attribute.rendered).map(t=>t.attribute.renderHTML?t.attribute.renderHTML(n.attrs)||{}:{[t.name]:n.attrs[t.name]}).reduce((t,r)=>I(t,r),{})}function si(n){return typeof n=="function"}function O(n,e=void 0,...t){return si(n)?e?n.bind(e)(...t):n(...t):n}function Pa(n={}){return Object.keys(n).length===0&&n.constructor===Object}function Ba(n){return typeof n!="string"?n:n.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(n):n==="true"?!0:n==="false"?!1:n}function ii(n,e){return"style"in n?n:{...n,getAttrs:t=>{const r=n.getAttrs?n.getAttrs(t):n.attrs;if(r===!1)return!1;const s=e.reduce((i,o)=>{const l=o.attribute.parseHTML?o.attribute.parseHTML(t):Ba(t.getAttribute(o.name));return l==null?i:{...i,[o.name]:l}},{});return{...r,...s}}}}function za(n){return Object.fromEntries(Object.entries(n).filter(([e,t])=>e==="attrs"&&Pa(t)?!1:t!=null))}function oi(n,e){var t;const r=ri(n),{nodeExtensions:s,markExtensions:i}=mn(n),o=(t=s.find(c=>C(c,"topNode")))===null||t===void 0?void 0:t.name,l=Object.fromEntries(s.map(c=>{const d=r.filter(y=>y.type===c.name),u={name:c.name,options:c.options,storage:c.storage,editor:e},f=n.reduce((y,k)=>{const A=C(k,"extendNodeSchema",u);return{...y,...A?A(c):{}}},{}),h=za({...f,content:O(C(c,"content",u)),marks:O(C(c,"marks",u)),group:O(C(c,"group",u)),inline:O(C(c,"inline",u)),atom:O(C(c,"atom",u)),selectable:O(C(c,"selectable",u)),draggable:O(C(c,"draggable",u)),code:O(C(c,"code",u)),whitespace:O(C(c,"whitespace",u)),linebreakReplacement:O(C(c,"linebreakReplacement",u)),defining:O(C(c,"defining",u)),isolating:O(C(c,"isolating",u)),attrs:Object.fromEntries(d.map(y=>{var k;return[y.name,{default:(k=y?.attribute)===null||k===void 0?void 0:k.default}]}))}),p=O(C(c,"parseHTML",u));p&&(h.parseDOM=p.map(y=>ii(y,d)));const m=C(c,"renderHTML",u);m&&(h.toDOM=y=>m({node:y,HTMLAttributes:rr(y,d)}));const g=C(c,"renderText",u);return g&&(h.toText=g),[c.name,h]})),a=Object.fromEntries(i.map(c=>{const d=r.filter(g=>g.type===c.name),u={name:c.name,options:c.options,storage:c.storage,editor:e},f=n.reduce((g,y)=>{const k=C(y,"extendMarkSchema",u);return{...g,...k?k(c):{}}},{}),h=za({...f,inclusive:O(C(c,"inclusive",u)),excludes:O(C(c,"excludes",u)),group:O(C(c,"group",u)),spanning:O(C(c,"spanning",u)),code:O(C(c,"code",u)),attrs:Object.fromEntries(d.map(g=>{var y;return[g.name,{default:(y=g?.attribute)===null||y===void 0?void 0:y.default}]}))}),p=O(C(c,"parseHTML",u));p&&(h.parseDOM=p.map(g=>ii(g,d)));const m=C(c,"renderHTML",u);return m&&(h.toDOM=g=>m({mark:g,HTMLAttributes:rr(g,d)})),[c.name,h]}));return new No({topNode:o,nodes:l,marks:a})}function sr(n,e){return e.nodes[n]||e.marks[n]||null}function li(n,e){return Array.isArray(e)?e.some(t=>(typeof t=="string"?t:t.name)===n.name):e}function gn(n,e){const t=Mt.fromSchema(e).serializeFragment(n),s=document.implementation.createHTMLDocument().createElement("div");return s.appendChild(t),s.innerHTML}const Ha=(n,e=500)=>{let t="";const r=n.parentOffset;return n.parent.nodesBetween(Math.max(0,r-e),r,(s,i,o,l)=>{var a,c;const d=((c=(a=s.type.spec).toText)===null||c===void 0?void 0:c.call(a,{node:s,pos:i,parent:o,index:l}))||s.textContent||"%leaf%";t+=s.isAtom&&!s.isText?d:d.slice(0,Math.max(0,r-i))}),t};function ir(n){return Object.prototype.toString.call(n)==="[object RegExp]"}class zt{constructor(e){this.find=e.find,this.handler=e.handler}}const vh=(n,e)=>{if(ir(e))return e.exec(n);const t=e(n);if(!t)return null;const r=[t.text];return r.index=t.index,r.input=n,r.data=t.data,t.replaceWith&&(t.text.includes(t.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(t.replaceWith)),r};function or(n){var e;const{editor:t,from:r,to:s,text:i,rules:o,plugin:l}=n,{view:a}=t;if(a.composing)return!1;const c=a.state.doc.resolve(r);if(c.parent.type.spec.code||!((e=c.nodeBefore||c.nodeAfter)===null||e===void 0)&&e.marks.find(f=>f.type.spec.code))return!1;let d=!1;const u=Ha(c)+i;return o.forEach(f=>{if(d)return;const h=vh(u,f.find);if(!h)return;const p=a.state.tr,m=hn({state:a.state,transaction:p}),g={from:r-(h[0].length-i.length),to:s},{commands:y,chain:k,can:A}=new pn({editor:t,state:m});f.handler({state:m,range:g,match:h,commands:y,chain:k,can:A})===null||!p.steps.length||(p.setMeta(l,{transform:p,from:r,to:s,text:i}),a.dispatch(p),d=!0)}),d}function Fa(n){const{editor:e,rules:t}=n,r=new V({state:{init(){return null},apply(s,i,o){const l=s.getMeta(r);if(l)return l;const a=s.getMeta("applyInputRules");return!!a&&setTimeout(()=>{let{text:d}=a;typeof d=="string"?d=d:d=gn(b.from(d),o.schema);const{from:u}=a,f=u+d.length;or({editor:e,from:u,to:f,text:d,rules:t,plugin:r})}),s.selectionSet||s.docChanged?null:i}},props:{handleTextInput(s,i,o,l){return or({editor:e,from:i,to:o,text:l,rules:t,plugin:r})},handleDOMEvents:{compositionend:s=>(setTimeout(()=>{const{$cursor:i}=s.state.selection;i&&or({editor:e,from:i.pos,to:i.pos,text:"",rules:t,plugin:r})}),!1)},handleKeyDown(s,i){if(i.key!=="Enter")return!1;const{$cursor:o}=s.state.selection;return o?or({editor:e,from:o.pos,to:o.pos,text:`
11
+ `,rules:t,plugin:r}):!1}},isInputRules:!0});return r}function Rh(n){return Object.prototype.toString.call(n).slice(8,-1)}function yn(n){return Rh(n)!=="Object"?!1:n.constructor===Object&&Object.getPrototypeOf(n)===Object.prototype}function bn(n,e){const t={...n};return yn(n)&&yn(e)&&Object.keys(e).forEach(r=>{yn(e[r])&&yn(n[r])?t[r]=bn(n[r],e[r]):t[r]=e[r]}),t}class ce{constructor(e={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=O(C(this,"addOptions",{name:this.name}))),this.storage=O(C(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new ce(e)}configure(e={}){const t=this.extend({...this.config,addOptions:()=>bn(this.options,e)});return t.name=this.name,t.parent=this.parent,t}extend(e={}){const t=new ce(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=O(C(t,"addOptions",{name:t.name})),t.storage=O(C(t,"addStorage",{name:t.name,options:t.options})),t}static handleExit({editor:e,mark:t}){const{tr:r}=e.state,s=e.state.selection.$from;if(s.pos===s.end()){const o=s.marks();if(!!!o.find(c=>c?.type.name===t.name))return!1;const a=o.find(c=>c?.type.name===t.name);return a&&r.removeStoredMark(a),r.insertText(" ",s.pos),e.view.dispatch(r),!0}return!1}}function $a(n){return typeof n=="number"}class lr{constructor(e){this.find=e.find,this.handler=e.handler}}const Dh=(n,e,t)=>{if(ir(e))return[...n.matchAll(e)];const r=e(n,t);return r?r.map(s=>{const i=[s.text];return i.index=s.index,i.input=n,i.data=s.data,s.replaceWith&&(s.text.includes(s.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),i.push(s.replaceWith)),i}):[]};function Ih(n){const{editor:e,state:t,from:r,to:s,rule:i,pasteEvent:o,dropEvent:l}=n,{commands:a,chain:c,can:d}=new pn({editor:e,state:t}),u=[];return t.doc.nodesBetween(r,s,(h,p)=>{if(!h.isTextblock||h.type.spec.code)return;const m=Math.max(r,p),g=Math.min(s,p+h.content.size),y=h.textBetween(m-p,g-p,void 0,"\uFFFC");Dh(y,i.find,o).forEach(A=>{if(A.index===void 0)return;const R=m+A.index+1,M=R+A[0].length,v={from:t.tr.mapping.map(R),to:t.tr.mapping.map(M)},F=i.handler({state:t,range:v,match:A,commands:a,chain:c,can:d,pasteEvent:o,dropEvent:l});u.push(F)})}),u.every(h=>h!==null)}let ar=null;const Lh=n=>{var e;const t=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(e=t.clipboardData)===null||e===void 0||e.setData("text/html",n),t};function Va(n){const{editor:e,rules:t}=n;let r=null,s=!1,i=!1,o=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,l;try{l=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{l=null}const a=({state:d,from:u,to:f,rule:h,pasteEvt:p})=>{const m=d.tr,g=hn({state:d,transaction:m});if(!(!Ih({editor:e,state:g,from:Math.max(u-1,0),to:f.b-1,rule:h,pasteEvent:p,dropEvent:l})||!m.steps.length)){try{l=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{l=null}return o=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,m}};return t.map(d=>new V({view(u){const f=p=>{var m;r=!((m=u.dom.parentElement)===null||m===void 0)&&m.contains(p.target)?u.dom.parentElement:null,r&&(ar=e)},h=()=>{ar&&(ar=null)};return window.addEventListener("dragstart",f),window.addEventListener("dragend",h),{destroy(){window.removeEventListener("dragstart",f),window.removeEventListener("dragend",h)}}},props:{handleDOMEvents:{drop:(u,f)=>{if(i=r===u.dom.parentElement,l=f,!i){const h=ar;h&&setTimeout(()=>{const p=h.state.selection;p&&h.commands.deleteRange({from:p.from,to:p.to})},10)}return!1},paste:(u,f)=>{var h;const p=(h=f.clipboardData)===null||h===void 0?void 0:h.getData("text/html");return o=f,s=!!p?.includes("data-pm-slice"),!1}}},appendTransaction:(u,f,h)=>{const p=u[0],m=p.getMeta("uiEvent")==="paste"&&!s,g=p.getMeta("uiEvent")==="drop"&&!i,y=p.getMeta("applyPasteRules"),k=!!y;if(!m&&!g&&!k)return;if(k){let{text:M}=y;typeof M=="string"?M=M:M=gn(b.from(M),h.schema);const{from:v}=y,F=v+M.length,K=Lh(M);return a({rule:d,state:h,from:v,to:{b:F},pasteEvt:K})}const A=f.doc.content.findDiffStart(h.doc.content),R=f.doc.content.findDiffEnd(h.doc.content);if(!(!$a(A)||!R||A===R.b))return a({rule:d,state:h,from:A,to:R,pasteEvt:o})}}))}function Wa(n){const e=n.filter((t,r)=>n.indexOf(t)!==r);return Array.from(new Set(e))}class At{constructor(e,t){this.splittableMarks=[],this.editor=t,this.extensions=At.resolve(e),this.schema=oi(this.extensions,t),this.setupExtensions()}static resolve(e){const t=At.sort(At.flatten(e)),r=Wa(t.map(s=>s.name));return r.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${r.map(s=>`'${s}'`).join(", ")}]. This can lead to issues.`),t}static flatten(e){return e.map(t=>{const r={name:t.name,options:t.options,storage:t.storage},s=C(t,"addExtensions",r);return s?[t,...this.flatten(s())]:t}).flat(10)}static sort(e){return e.sort((r,s)=>{const i=C(r,"priority")||100,o=C(s,"priority")||100;return i>o?-1:i<o?1:0})}get commands(){return this.extensions.reduce((e,t)=>{const r={name:t.name,options:t.options,storage:t.storage,editor:this.editor,type:sr(t.name,this.schema)},s=C(t,"addCommands",r);return s?{...e,...s()}:e},{})}get plugins(){const{editor:e}=this,t=At.sort([...this.extensions].reverse()),r=[],s=[],i=t.map(o=>{const l={name:o.name,options:o.options,storage:o.storage,editor:e,type:sr(o.name,this.schema)},a=[],c=C(o,"addKeyboardShortcuts",l);let d={};if(o.type==="mark"&&C(o,"exitable",l)&&(d.ArrowRight=()=>ce.handleExit({editor:e,mark:o})),c){const m=Object.fromEntries(Object.entries(c()).map(([g,y])=>[g,()=>y({editor:e})]));d={...d,...m}}const u=ch(d);a.push(u);const f=C(o,"addInputRules",l);li(o,e.options.enableInputRules)&&f&&r.push(...f());const h=C(o,"addPasteRules",l);li(o,e.options.enablePasteRules)&&h&&s.push(...h());const p=C(o,"addProseMirrorPlugins",l);if(p){const m=p();a.push(...m)}return a}).flat();return[Fa({editor:e,rules:r}),...Va({editor:e,rules:s}),...i]}get attributes(){return ri(this.extensions)}get nodeViews(){const{editor:e}=this,{nodeExtensions:t}=mn(this.extensions);return Object.fromEntries(t.filter(r=>!!C(r,"addNodeView")).map(r=>{const s=this.attributes.filter(a=>a.type===r.name),i={name:r.name,options:r.options,storage:r.storage,editor:e,type:q(r.name,this.schema)},o=C(r,"addNodeView",i);if(!o)return[];const l=(a,c,d,u,f)=>{const h=rr(a,s);return o()({node:a,view:c,getPos:d,decorations:u,innerDecorations:f,editor:e,extension:r,HTMLAttributes:h})};return[r.name,l]}))}setupExtensions(){this.extensions.forEach(e=>{var t;this.editor.extensionStorage[e.name]=e.storage;const r={name:e.name,options:e.options,storage:e.storage,editor:this.editor,type:sr(e.name,this.schema)};e.type==="mark"&&(!((t=O(C(e,"keepOnSplit",r)))!==null&&t!==void 0)||t)&&this.splittableMarks.push(e.name);const s=C(e,"onBeforeCreate",r),i=C(e,"onCreate",r),o=C(e,"onUpdate",r),l=C(e,"onSelectionUpdate",r),a=C(e,"onTransaction",r),c=C(e,"onFocus",r),d=C(e,"onBlur",r),u=C(e,"onDestroy",r);s&&this.editor.on("beforeCreate",s),i&&this.editor.on("create",i),o&&this.editor.on("update",o),l&&this.editor.on("selectionUpdate",l),a&&this.editor.on("transaction",a),c&&this.editor.on("focus",c),d&&this.editor.on("blur",d),u&&this.editor.on("destroy",u)})}}class U{constructor(e={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=O(C(this,"addOptions",{name:this.name}))),this.storage=O(C(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new U(e)}configure(e={}){const t=this.extend({...this.config,addOptions:()=>bn(this.options,e)});return t.name=this.name,t.parent=this.parent,t}extend(e={}){const t=new U({...this.config,...e});return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=O(C(t,"addOptions",{name:t.name})),t.storage=O(C(t,"addStorage",{name:t.name,options:t.options})),t}}function ai(n,e,t){const{from:r,to:s}=e,{blockSeparator:i=`
12
12
 
13
- `,textSerializers:o={}}=t||{};let l="";return n.nodesBetween(r,s,(a,c,d,u)=>{var f;a.isBlock&&c>r&&(l+=i);const h=o?.[a.type.name];if(h)return d&&(l+=h({node:a,pos:c,parent:d,index:u,range:e})),!1;a.isText&&(l+=(f=a?.text)===null||f===void 0?void 0:f.slice(Math.max(r,c)-c,s-c))}),l}function cr(n){return Object.fromEntries(Object.entries(n.nodes).filter(([,e])=>e.spec.toText).map(([e,t])=>[e,t.spec.toText]))}const Ra=_.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new K({key:new Q("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:n}=this,{state:e,schema:t}=n,{doc:r,selection:s}=e,{ranges:i}=s,o=Math.min(...i.map(d=>d.$from.pos)),l=Math.max(...i.map(d=>d.$to.pos)),a=cr(t);return si(r,{from:o,to:l},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:a})}}})]}}),Ch=()=>({editor:n,view:e})=>(requestAnimationFrame(()=>{var t;n.isDestroyed||(e.dom.blur(),(t=window?.getSelection())===null||t===void 0||t.removeAllRanges())}),!0),wh=(n=!1)=>({commands:e})=>e.setContent("",n),Mh=()=>({state:n,tr:e,dispatch:t})=>{const{selection:r}=e,{ranges:s}=r;return t&&s.forEach(({$from:i,$to:o})=>{n.doc.nodesBetween(i.pos,o.pos,(l,a)=>{if(l.type.isText)return;const{doc:c,mapping:d}=e,u=c.resolve(d.map(a)),f=c.resolve(d.map(a+l.nodeSize)),h=u.blockRange(f);if(!h)return;const p=Et(h);if(l.type.isTextblock){const{defaultType:m}=u.parent.contentMatchAt(u.index());e.setNodeMarkup(h.start,m)}(p||p===0)&&e.lift(h,p)})}),!0},Th=n=>e=>n(e),Ah=()=>({state:n,dispatch:e})=>rh(n,e),Eh=(n,e)=>({editor:t,tr:r})=>{const{state:s}=t,i=s.doc.slice(n.from,n.to);r.deleteRange(n.from,n.to);const o=r.mapping.map(e);return r.insert(o,i.content),r.setSelection(new A(r.doc.resolve(o-1))),!0},Oh=()=>({tr:n,dispatch:e})=>{const{selection:t}=n,r=t.$anchor.node();if(r.content.size>0)return!1;const s=n.selection.$anchor;for(let i=s.depth;i>0;i-=1)if(s.node(i).type===r.type){if(e){const l=s.before(i),a=s.after(i);n.delete(l,a).scrollIntoView()}return!0}return!1},Nh=n=>({tr:e,state:t,dispatch:r})=>{const s=U(n,t.schema),i=e.selection.$anchor;for(let o=i.depth;o>0;o-=1)if(i.node(o).type===s){if(r){const a=i.before(o),c=i.after(o);e.delete(a,c).scrollIntoView()}return!0}return!1},Rh=n=>({tr:e,dispatch:t})=>{const{from:r,to:s}=n;return t&&e.delete(r,s),!0},Dh=()=>({state:n,dispatch:e})=>Jf(n,e),Ih=()=>({commands:n})=>n.keyboardShortcut("Enter"),vh=()=>({state:n,dispatch:e})=>nh(n,e);function yn(n,e,t={strict:!0}){const r=Object.keys(e);return r.length?r.every(s=>t.strict?e[s]===n[s]:ir(e[s])?e[s].test(n[s]):e[s]===n[s]):!0}function Da(n,e,t={}){return n.find(r=>r.type===e&&yn(Object.fromEntries(Object.keys(t).map(s=>[s,r.attrs[s]])),t))}function Ia(n,e,t={}){return!!Da(n,e,t)}function dr(n,e,t){var r;if(!n||!e)return;let s=n.parent.childAfter(n.parentOffset);if((!s.node||!s.node.marks.some(d=>d.type===e))&&(s=n.parent.childBefore(n.parentOffset)),!s.node||!s.node.marks.some(d=>d.type===e)||(t=t||((r=s.node.marks[0])===null||r===void 0?void 0:r.attrs),!Da([...s.node.marks],e,t)))return;let o=s.index,l=n.start()+s.offset,a=o+1,c=l+s.node.nodeSize;for(;o>0&&Ia([...n.parent.child(o-1).marks],e,t);)o-=1,l-=n.parent.child(o).nodeSize;for(;a<n.parent.childCount&&Ia([...n.parent.child(a).marks],e,t);)c+=n.parent.child(a).nodeSize,a+=1;return{from:l,to:c}}function ze(n,e){if(typeof n=="string"){if(!e.marks[n])throw Error(`There is no mark type named '${n}'. Maybe you forgot to add the extension?`);return e.marks[n]}return n}const Ph=(n,e={})=>({tr:t,state:r,dispatch:s})=>{const i=ze(n,r.schema),{doc:o,selection:l}=t,{$from:a,from:c,to:d}=l;if(s){const u=dr(a,i,e);if(u&&u.from<=c&&u.to>=d){const f=A.create(o,u.from,u.to);t.setSelection(f)}}return!0},Lh=n=>e=>{const t=typeof n=="function"?n(e):n;for(let r=0;r<t.length;r+=1)if(t[r](e))return!0;return!1};function ii(n){return n instanceof A}function Oe(n=0,e=0,t=0){return Math.min(Math.max(n,e),t)}function oi(n,e=null){if(!e)return null;const t=E.atStart(n),r=E.atEnd(n);if(e==="start"||e===!0)return t;if(e==="end")return r;const s=t.from,i=r.to;return e==="all"?A.create(n,Oe(0,s,i),Oe(n.content.size,s,i)):A.create(n,Oe(e,s,i),Oe(e,s,i))}const Bh=(n=null,e={})=>({editor:t,view:r,tr:s,dispatch:i})=>{e={scrollIntoView:!0,...e};const o=()=>{r.dom.focus(),requestAnimationFrame(()=>{t.isDestroyed||(r.focus(),e?.scrollIntoView&&t.commands.scrollIntoView())})};if(r.hasFocus()&&n===null||n===!1)return!0;if(i&&n===null&&!ii(t.state.selection))return o(),!0;const l=oi(s.doc,n)||t.state.selection,a=t.state.selection.eq(l);return i&&(a||s.setSelection(l),a&&s.storedMarks&&s.setStoredMarks(s.storedMarks),o()),!0},zh=(n,e)=>t=>n.every((r,s)=>e(r,{...t,index:s})),Hh=(n,e)=>({tr:t,commands:r})=>r.insertContentAt({from:t.selection.from,to:t.selection.to},n,e),va=n=>{const e=n.childNodes;for(let t=e.length-1;t>=0;t-=1){const r=e[t];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?n.removeChild(r):r.nodeType===1&&va(r)}return n};function Ht(n){const e=`<body>${n}</body>`,t=new window.DOMParser().parseFromString(e,"text/html").body;return va(t)}function bn(n,e,t){if(n instanceof Te||n instanceof b)return n;t={slice:!0,parseOptions:{},...t};const r=typeof n=="object"&&n!==null,s=typeof n=="string";if(r)try{if(Array.isArray(n)&&n.length>0)return b.fromArray(n.map(l=>e.nodeFromJSON(l)));const o=e.nodeFromJSON(n);return t.errorOnInvalidContent&&o.check(),o}catch(i){if(t.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:i});return console.warn("[tiptap warn]: Invalid content.","Passed value:",n,"Error:",i),bn("",e,t)}if(s){if(t.errorOnInvalidContent){let o=!1,l="";const a=new xo({topNode:e.spec.topNode,marks:e.spec.marks,nodes:e.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:c=>(o=!0,l=typeof c=="string"?c:c.outerHTML,null)}]}})});if(t.slice?We.fromSchema(a).parseSlice(Ht(n),t.parseOptions):We.fromSchema(a).parse(Ht(n),t.parseOptions),t.errorOnInvalidContent&&o)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${l}`)})}const i=We.fromSchema(e);return t.slice?i.parseSlice(Ht(n),t.parseOptions).content:i.parse(Ht(n),t.parseOptions)}return bn("",e,t)}function Pa(n,e,t){const r=n.steps.length-1;if(r<e)return;const s=n.steps[r];if(!(s instanceof Y||s instanceof G))return;const i=n.mapping.maps[r];let o=0;i.forEach((l,a,c,d)=>{o===0&&(o=d)}),n.setSelection(E.near(n.doc.resolve(o),t))}const Fh=n=>!("type"in n),$h=(n,e,t)=>({tr:r,dispatch:s,editor:i})=>{var o;if(s){t={parseOptions:i.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...t};let l;try{l=bn(e,i.schema,{parseOptions:{preserveWhitespace:"full",...t.parseOptions},errorOnInvalidContent:(o=t.errorOnInvalidContent)!==null&&o!==void 0?o:i.options.enableContentCheck})}catch(p){return i.emit("contentError",{editor:i,error:p,disableCollaboration:()=>{i.storage.collaboration&&(i.storage.collaboration.isDisabled=!0)}}),!1}let{from:a,to:c}=typeof n=="number"?{from:n,to:n}:{from:n.from,to:n.to},d=!0,u=!0;if((Fh(l)?l:[l]).forEach(p=>{p.check(),d=d?p.isText&&p.marks.length===0:!1,u=u?p.isBlock:!1}),a===c&&u){const{parent:p}=r.doc.resolve(a);p.isTextblock&&!p.type.spec.code&&!p.childCount&&(a-=1,c+=1)}let h;if(d){if(Array.isArray(e))h=e.map(p=>p.text||"").join("");else if(e instanceof b){let p="";e.forEach(m=>{m.text&&(p+=m.text)}),h=p}else typeof e=="object"&&e&&e.text?h=e.text:h=e;r.insertText(h,a,c)}else h=l,r.replaceWith(a,c,h);t.updateSelection&&Pa(r,r.steps.length-1,-1),t.applyInputRules&&r.setMeta("applyInputRules",{from:a,text:h}),t.applyPasteRules&&r.setMeta("applyPasteRules",{from:a,text:h})}return!0},Vh=()=>({state:n,dispatch:e})=>Qf(n,e),Wh=()=>({state:n,dispatch:e})=>Zf(n,e),jh=()=>({state:n,dispatch:e})=>Uf(n,e),Kh=()=>({state:n,dispatch:e})=>Yf(n,e),Jh=()=>({state:n,dispatch:e,tr:t})=>{try{const r=_n(n.doc,n.selection.$from.pos,-1);return r==null?!1:(t.join(r,2),e&&e(t),!0)}catch{return!1}},Uh=()=>({state:n,dispatch:e,tr:t})=>{try{const r=_n(n.doc,n.selection.$from.pos,1);return r==null?!1:(t.join(r,2),e&&e(t),!0)}catch{return!1}},qh=()=>({state:n,dispatch:e})=>qf(n,e),_h=()=>({state:n,dispatch:e})=>_f(n,e);function ur(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function li(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function Gh(n){const e=n.split(/-(?!$)/);let t=e[e.length-1];t==="Space"&&(t=" ");let r,s,i,o;for(let l=0;l<e.length-1;l+=1){const a=e[l];if(/^(cmd|meta|m)$/i.test(a))o=!0;else if(/^a(lt)?$/i.test(a))r=!0;else if(/^(c|ctrl|control)$/i.test(a))s=!0;else if(/^s(hift)?$/i.test(a))i=!0;else if(/^mod$/i.test(a))ur()||li()?o=!0:s=!0;else throw new Error(`Unrecognized modifier name: ${a}`)}return r&&(t=`Alt-${t}`),s&&(t=`Ctrl-${t}`),o&&(t=`Meta-${t}`),i&&(t=`Shift-${t}`),t}const Yh=n=>({editor:e,view:t,tr:r,dispatch:s})=>{const i=Gh(n).split(/-(?!$)/),o=i.find(c=>!["Alt","Ctrl","Meta","Shift"].includes(c)),l=new KeyboardEvent("keydown",{key:o==="Space"?" ":o,altKey:i.includes("Alt"),ctrlKey:i.includes("Ctrl"),metaKey:i.includes("Meta"),shiftKey:i.includes("Shift"),bubbles:!0,cancelable:!0}),a=e.captureTransaction(()=>{t.someProp("handleKeyDown",c=>c(t,l))});return a?.steps.forEach(c=>{const d=c.map(r.mapping);d&&s&&r.maybeStep(d)}),!0};function Ft(n,e,t={}){const{from:r,to:s,empty:i}=n.selection,o=e?U(e,n.schema):null,l=[];n.doc.nodesBetween(r,s,(u,f)=>{if(u.isText)return;const h=Math.max(r,f),p=Math.min(s,f+u.nodeSize);l.push({node:u,from:h,to:p})});const a=s-r,c=l.filter(u=>o?o.name===u.node.type.name:!0).filter(u=>yn(u.node.attrs,t,{strict:!1}));return i?!!c.length:c.reduce((u,f)=>u+f.to-f.from,0)>=a}const Xh=(n,e={})=>({state:t,dispatch:r})=>{const s=U(n,t.schema);return Ft(t,s,e)?eh(t,r):!1},Qh=()=>({state:n,dispatch:e})=>sh(n,e),Zh=n=>({state:e,dispatch:t})=>{const r=U(n,e.schema);return fh(r)(e,t)},ep=()=>({state:n,dispatch:e})=>th(n,e);function kn(n,e){return e.nodes[n]?"node":e.marks[n]?"mark":null}function ai(n,e){const t=typeof e=="string"?[e]:e;return Object.keys(n).reduce((r,s)=>(t.includes(s)||(r[s]=n[s]),r),{})}const tp=(n,e)=>({tr:t,state:r,dispatch:s})=>{let i=null,o=null;const l=kn(typeof n=="string"?n:n.name,r.schema);return l?(l==="node"&&(i=U(n,r.schema)),l==="mark"&&(o=ze(n,r.schema)),s&&t.selection.ranges.forEach(a=>{r.doc.nodesBetween(a.$from.pos,a.$to.pos,(c,d)=>{i&&i===c.type&&t.setNodeMarkup(d,void 0,ai(c.attrs,e)),o&&c.marks.length&&c.marks.forEach(u=>{o===u.type&&t.addMark(d,d+c.nodeSize,o.create(ai(u.attrs,e)))})})}),!0):!1},np=()=>({tr:n,dispatch:e})=>(e&&n.scrollIntoView(),!0),rp=()=>({tr:n,dispatch:e})=>{if(e){const t=new Se(n.doc);n.setSelection(t)}return!0},sp=()=>({state:n,dispatch:e})=>Gf(n,e),ip=()=>({state:n,dispatch:e})=>Xf(n,e),op=()=>({state:n,dispatch:e})=>ih(n,e),lp=()=>({state:n,dispatch:e})=>ah(n,e),ap=()=>({state:n,dispatch:e})=>lh(n,e);function fr(n,e,t={},r={}){return bn(n,e,{slice:!1,parseOptions:t,errorOnInvalidContent:r.errorOnInvalidContent})}const cp=(n,e=!1,t={},r={})=>({editor:s,tr:i,dispatch:o,commands:l})=>{var a,c;const{doc:d}=i;if(t.preserveWhitespace!=="full"){const u=fr(n,s.schema,t,{errorOnInvalidContent:(a=r.errorOnInvalidContent)!==null&&a!==void 0?a:s.options.enableContentCheck});return o&&i.replaceWith(0,d.content.size,u).setMeta("preventUpdate",!e),!0}return o&&i.setMeta("preventUpdate",!e),l.insertContentAt({from:0,to:d.content.size},n,{parseOptions:t,errorOnInvalidContent:(c=r.errorOnInvalidContent)!==null&&c!==void 0?c:s.options.enableContentCheck})};function ci(n,e){const t=ze(e,n.schema),{from:r,to:s,empty:i}=n.selection,o=[];i?(n.storedMarks&&o.push(...n.storedMarks),o.push(...n.selection.$head.marks())):n.doc.nodesBetween(r,s,a=>{o.push(...a.marks)});const l=o.find(a=>a.type.name===t.name);return l?{...l.attrs}:{}}function La(n,e){const t=new Cs(n);return e.forEach(r=>{r.steps.forEach(s=>{t.step(s)})}),t}function Ba(n){for(let e=0;e<n.edgeCount;e+=1){const{type:t}=n.edge(e);if(t.isTextblock&&!t.hasRequiredAttrs())return t}return null}function dp(n,e){const t=[];return n.descendants((r,s)=>{e(r)&&t.push({node:r,pos:s})}),t}function za(n,e,t){const r=[];return n.nodesBetween(e.from,e.to,(s,i)=>{t(s)&&r.push({node:s,pos:i})}),r}function di(n,e){for(let t=n.depth;t>0;t-=1){const r=n.node(t);if(e(r))return{pos:t>0?n.before(t):0,start:n.start(t),depth:t,node:r}}}function Sn(n){return e=>di(e.$from,n)}function hr(n,e){const t=Tt.resolve(n);return ni(t,e)}function up(n,e){const t=hr(e),r=Te.fromJSON(t,n);return pn(r.content,t)}function fp(n,e){const t=hr(e),r=Ht(n);return We.fromSchema(t).parse(r).toJSON()}function ui(n,e){const t={from:0,to:n.content.size};return si(n,t,e)}function hp(n,e,t){const{blockSeparator:r=`
13
+ `,textSerializers:o={}}=t||{};let l="";return n.nodesBetween(r,s,(a,c,d,u)=>{var f;a.isBlock&&c>r&&(l+=i);const h=o?.[a.type.name];if(h)return d&&(l+=h({node:a,pos:c,parent:d,index:u,range:e})),!1;a.isText&&(l+=(f=a?.text)===null||f===void 0?void 0:f.slice(Math.max(r,c)-c,s-c))}),l}function cr(n){return Object.fromEntries(Object.entries(n.nodes).filter(([,e])=>e.spec.toText).map(([e,t])=>[e,t.spec.toText]))}const ja=U.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new V({key:new _("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:n}=this,{state:e,schema:t}=n,{doc:r,selection:s}=e,{ranges:i}=s,o=Math.min(...i.map(d=>d.$from.pos)),l=Math.max(...i.map(d=>d.$to.pos)),a=cr(t);return ai(r,{from:o,to:l},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:a})}}})]}}),Ph=()=>({editor:n,view:e})=>(requestAnimationFrame(()=>{var t;n.isDestroyed||(e.dom.blur(),(t=window?.getSelection())===null||t===void 0||t.removeAllRanges())}),!0),Bh=(n=!1)=>({commands:e})=>e.setContent("",n),zh=()=>({state:n,tr:e,dispatch:t})=>{const{selection:r}=e,{ranges:s}=r;return t&&s.forEach(({$from:i,$to:o})=>{n.doc.nodesBetween(i.pos,o.pos,(l,a)=>{if(l.type.isText)return;const{doc:c,mapping:d}=e,u=c.resolve(d.map(a)),f=c.resolve(d.map(a+l.nodeSize)),h=u.blockRange(f);if(!h)return;const p=Ot(h);if(l.type.isTextblock){const{defaultType:m}=u.parent.contentMatchAt(u.index());e.setNodeMarkup(h.start,m)}(p||p===0)&&e.lift(h,p)})}),!0},Hh=n=>e=>n(e),Fh=()=>({state:n,dispatch:e})=>va(n,e),$h=(n,e)=>({editor:t,tr:r})=>{const{state:s}=t,i=s.doc.slice(n.from,n.to);r.deleteRange(n.from,n.to);const o=r.mapping.map(e);return r.insert(o,i.content),r.setSelection(new T(r.doc.resolve(o-1))),!0},Vh=()=>({tr:n,dispatch:e})=>{const{selection:t}=n,r=t.$anchor.node();if(r.content.size>0)return!1;const s=n.selection.$anchor;for(let i=s.depth;i>0;i-=1)if(s.node(i).type===r.type){if(e){const l=s.before(i),a=s.after(i);n.delete(l,a).scrollIntoView()}return!0}return!1},Wh=n=>({tr:e,state:t,dispatch:r})=>{const s=q(n,t.schema),i=e.selection.$anchor;for(let o=i.depth;o>0;o-=1)if(i.node(o).type===s){if(r){const a=i.before(o),c=i.after(o);e.delete(a,c).scrollIntoView()}return!0}return!1},jh=n=>({tr:e,dispatch:t})=>{const{from:r,to:s}=n;return t&&e.delete(r,s),!0},Kh=()=>({state:n,dispatch:e})=>Qs(n,e),Uh=()=>({commands:n})=>n.keyboardShortcut("Enter"),Jh=()=>({state:n,dispatch:e})=>mh(n,e);function kn(n,e,t={strict:!0}){const r=Object.keys(e);return r.length?r.every(s=>t.strict?e[s]===n[s]:ir(e[s])?e[s].test(n[s]):e[s]===n[s]):!0}function Ka(n,e,t={}){return n.find(r=>r.type===e&&kn(Object.fromEntries(Object.keys(t).map(s=>[s,r.attrs[s]])),t))}function Ua(n,e,t={}){return!!Ka(n,e,t)}function dr(n,e,t){var r;if(!n||!e)return;let s=n.parent.childAfter(n.parentOffset);if((!s.node||!s.node.marks.some(d=>d.type===e))&&(s=n.parent.childBefore(n.parentOffset)),!s.node||!s.node.marks.some(d=>d.type===e)||(t=t||((r=s.node.marks[0])===null||r===void 0?void 0:r.attrs),!Ka([...s.node.marks],e,t)))return;let o=s.index,l=n.start()+s.offset,a=o+1,c=l+s.node.nodeSize;for(;o>0&&Ua([...n.parent.child(o-1).marks],e,t);)o-=1,l-=n.parent.child(o).nodeSize;for(;a<n.parent.childCount&&Ua([...n.parent.child(a).marks],e,t);)c+=n.parent.child(a).nodeSize,a+=1;return{from:l,to:c}}function He(n,e){if(typeof n=="string"){if(!e.marks[n])throw Error(`There is no mark type named '${n}'. Maybe you forgot to add the extension?`);return e.marks[n]}return n}const qh=(n,e={})=>({tr:t,state:r,dispatch:s})=>{const i=He(n,r.schema),{doc:o,selection:l}=t,{$from:a,from:c,to:d}=l;if(s){const u=dr(a,i,e);if(u&&u.from<=c&&u.to>=d){const f=T.create(o,u.from,u.to);t.setSelection(f)}}return!0},_h=n=>e=>{const t=typeof n=="function"?n(e):n;for(let r=0;r<t.length;r+=1)if(t[r](e))return!0;return!1};function ci(n){return n instanceof T}function Ee(n=0,e=0,t=0){return Math.min(Math.max(n,e),t)}function di(n,e=null){if(!e)return null;const t=E.atStart(n),r=E.atEnd(n);if(e==="start"||e===!0)return t;if(e==="end")return r;const s=t.from,i=r.to;return e==="all"?T.create(n,Ee(0,s,i),Ee(n.content.size,s,i)):T.create(n,Ee(e,s,i),Ee(e,s,i))}function Ja(){return navigator.platform==="Android"||/android/i.test(navigator.userAgent)}function Sn(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}const Gh=(n=null,e={})=>({editor:t,view:r,tr:s,dispatch:i})=>{e={scrollIntoView:!0,...e};const o=()=>{(Sn()||Ja())&&r.dom.focus(),requestAnimationFrame(()=>{t.isDestroyed||(r.focus(),e?.scrollIntoView&&t.commands.scrollIntoView())})};if(r.hasFocus()&&n===null||n===!1)return!0;if(i&&n===null&&!ci(t.state.selection))return o(),!0;const l=di(s.doc,n)||t.state.selection,a=t.state.selection.eq(l);return i&&(a||s.setSelection(l),a&&s.storedMarks&&s.setStoredMarks(s.storedMarks),o()),!0},Yh=(n,e)=>t=>n.every((r,s)=>e(r,{...t,index:s})),Xh=(n,e)=>({tr:t,commands:r})=>r.insertContentAt({from:t.selection.from,to:t.selection.to},n,e),qa=n=>{const e=n.childNodes;for(let t=e.length-1;t>=0;t-=1){const r=e[t];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?n.removeChild(r):r.nodeType===1&&qa(r)}return n};function Ht(n){const e=`<body>${n}</body>`,t=new window.DOMParser().parseFromString(e,"text/html").body;return qa(t)}function wn(n,e,t){if(n instanceof Me||n instanceof b)return n;t={slice:!0,parseOptions:{},...t};const r=typeof n=="object"&&n!==null,s=typeof n=="string";if(r)try{if(Array.isArray(n)&&n.length>0)return b.fromArray(n.map(l=>e.nodeFromJSON(l)));const o=e.nodeFromJSON(n);return t.errorOnInvalidContent&&o.check(),o}catch(i){if(t.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:i});return console.warn("[tiptap warn]: Invalid content.","Passed value:",n,"Error:",i),wn("",e,t)}if(s){if(t.errorOnInvalidContent){let o=!1,l="";const a=new No({topNode:e.spec.topNode,marks:e.spec.marks,nodes:e.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:c=>(o=!0,l=typeof c=="string"?c:c.outerHTML,null)}]}})});if(t.slice?je.fromSchema(a).parseSlice(Ht(n),t.parseOptions):je.fromSchema(a).parse(Ht(n),t.parseOptions),t.errorOnInvalidContent&&o)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${l}`)})}const i=je.fromSchema(e);return t.slice?i.parseSlice(Ht(n),t.parseOptions).content:i.parse(Ht(n),t.parseOptions)}return wn("",e,t)}function _a(n,e,t){const r=n.steps.length-1;if(r<e)return;const s=n.steps[r];if(!(s instanceof Q||s instanceof Y))return;const i=n.mapping.maps[r];let o=0;i.forEach((l,a,c,d)=>{o===0&&(o=d)}),n.setSelection(E.near(n.doc.resolve(o),t))}const Qh=n=>!("type"in n),Zh=(n,e,t)=>({tr:r,dispatch:s,editor:i})=>{var o;if(s){t={parseOptions:i.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...t};let l;try{l=wn(e,i.schema,{parseOptions:{preserveWhitespace:"full",...t.parseOptions},errorOnInvalidContent:(o=t.errorOnInvalidContent)!==null&&o!==void 0?o:i.options.enableContentCheck})}catch(p){return i.emit("contentError",{editor:i,error:p,disableCollaboration:()=>{i.storage.collaboration&&(i.storage.collaboration.isDisabled=!0)}}),!1}let{from:a,to:c}=typeof n=="number"?{from:n,to:n}:{from:n.from,to:n.to},d=!0,u=!0;if((Qh(l)?l:[l]).forEach(p=>{p.check(),d=d?p.isText&&p.marks.length===0:!1,u=u?p.isBlock:!1}),a===c&&u){const{parent:p}=r.doc.resolve(a);p.isTextblock&&!p.type.spec.code&&!p.childCount&&(a-=1,c+=1)}let h;if(d){if(Array.isArray(e))h=e.map(p=>p.text||"").join("");else if(e instanceof b){let p="";e.forEach(m=>{m.text&&(p+=m.text)}),h=p}else typeof e=="object"&&e&&e.text?h=e.text:h=e;r.insertText(h,a,c)}else h=l,r.replaceWith(a,c,h);t.updateSelection&&_a(r,r.steps.length-1,-1),t.applyInputRules&&r.setMeta("applyInputRules",{from:a,text:h}),t.applyPasteRules&&r.setMeta("applyPasteRules",{from:a,text:h})}return!0},ep=()=>({state:n,dispatch:e})=>fh(n,e),tp=()=>({state:n,dispatch:e})=>hh(n,e),np=()=>({state:n,dispatch:e})=>xa(n,e),rp=()=>({state:n,dispatch:e})=>Ea(n,e),sp=()=>({state:n,dispatch:e,tr:t})=>{try{const r=_n(n.doc,n.selection.$from.pos,-1);return r==null?!1:(t.join(r,2),e&&e(t),!0)}catch{return!1}},ip=()=>({state:n,dispatch:e,tr:t})=>{try{const r=_n(n.doc,n.selection.$from.pos,1);return r==null?!1:(t.join(r,2),e&&e(t),!0)}catch{return!1}},op=()=>({state:n,dispatch:e})=>dh(n,e),lp=()=>({state:n,dispatch:e})=>uh(n,e);function ui(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function ap(n){const e=n.split(/-(?!$)/);let t=e[e.length-1];t==="Space"&&(t=" ");let r,s,i,o;for(let l=0;l<e.length-1;l+=1){const a=e[l];if(/^(cmd|meta|m)$/i.test(a))o=!0;else if(/^a(lt)?$/i.test(a))r=!0;else if(/^(c|ctrl|control)$/i.test(a))s=!0;else if(/^s(hift)?$/i.test(a))i=!0;else if(/^mod$/i.test(a))Sn()||ui()?o=!0:s=!0;else throw new Error(`Unrecognized modifier name: ${a}`)}return r&&(t=`Alt-${t}`),s&&(t=`Ctrl-${t}`),o&&(t=`Meta-${t}`),i&&(t=`Shift-${t}`),t}const cp=n=>({editor:e,view:t,tr:r,dispatch:s})=>{const i=ap(n).split(/-(?!$)/),o=i.find(c=>!["Alt","Ctrl","Meta","Shift"].includes(c)),l=new KeyboardEvent("keydown",{key:o==="Space"?" ":o,altKey:i.includes("Alt"),ctrlKey:i.includes("Ctrl"),metaKey:i.includes("Meta"),shiftKey:i.includes("Shift"),bubbles:!0,cancelable:!0}),a=e.captureTransaction(()=>{t.someProp("handleKeyDown",c=>c(t,l))});return a?.steps.forEach(c=>{const d=c.map(r.mapping);d&&s&&r.maybeStep(d)}),!0};function Ft(n,e,t={}){const{from:r,to:s,empty:i}=n.selection,o=e?q(e,n.schema):null,l=[];n.doc.nodesBetween(r,s,(u,f)=>{if(u.isText)return;const h=Math.max(r,f),p=Math.min(s,f+u.nodeSize);l.push({node:u,from:h,to:p})});const a=s-r,c=l.filter(u=>o?o.name===u.node.type.name:!0).filter(u=>kn(u.node.attrs,t,{strict:!1}));return i?!!c.length:c.reduce((u,f)=>u+f.to-f.from,0)>=a}const dp=(n,e={})=>({state:t,dispatch:r})=>{const s=q(n,t.schema);return Ft(t,s,e)?ph(t,r):!1},up=()=>({state:n,dispatch:e})=>Ra(n,e),fp=n=>({state:e,dispatch:t})=>{const r=q(n,e.schema);return Th(r)(e,t)},hp=()=>({state:n,dispatch:e})=>Na(n,e);function Cn(n,e){return e.nodes[n]?"node":e.marks[n]?"mark":null}function fi(n,e){const t=typeof e=="string"?[e]:e;return Object.keys(n).reduce((r,s)=>(t.includes(s)||(r[s]=n[s]),r),{})}const pp=(n,e)=>({tr:t,state:r,dispatch:s})=>{let i=null,o=null;const l=Cn(typeof n=="string"?n:n.name,r.schema);return l?(l==="node"&&(i=q(n,r.schema)),l==="mark"&&(o=He(n,r.schema)),s&&t.selection.ranges.forEach(a=>{r.doc.nodesBetween(a.$from.pos,a.$to.pos,(c,d)=>{i&&i===c.type&&t.setNodeMarkup(d,void 0,fi(c.attrs,e)),o&&c.marks.length&&c.marks.forEach(u=>{o===u.type&&t.addMark(d,d+c.nodeSize,o.create(fi(u.attrs,e)))})})}),!0):!1},mp=()=>({tr:n,dispatch:e})=>(e&&n.scrollIntoView(),!0),gp=()=>({tr:n,dispatch:e})=>{if(e){const t=new he(n.doc);n.setSelection(t)}return!0},yp=()=>({state:n,dispatch:e})=>Ta(n,e),bp=()=>({state:n,dispatch:e})=>Oa(n,e),kp=()=>({state:n,dispatch:e})=>bh(n,e),Sp=()=>({state:n,dispatch:e})=>wh(n,e),wp=()=>({state:n,dispatch:e})=>Sh(n,e);function ur(n,e,t={},r={}){return wn(n,e,{slice:!1,parseOptions:t,errorOnInvalidContent:r.errorOnInvalidContent})}const Cp=(n,e=!1,t={},r={})=>({editor:s,tr:i,dispatch:o,commands:l})=>{var a,c;const{doc:d}=i;if(t.preserveWhitespace!=="full"){const u=ur(n,s.schema,t,{errorOnInvalidContent:(a=r.errorOnInvalidContent)!==null&&a!==void 0?a:s.options.enableContentCheck});return o&&i.replaceWith(0,d.content.size,u).setMeta("preventUpdate",!e),!0}return o&&i.setMeta("preventUpdate",!e),l.insertContentAt({from:0,to:d.content.size},n,{parseOptions:t,errorOnInvalidContent:(c=r.errorOnInvalidContent)!==null&&c!==void 0?c:s.options.enableContentCheck})};function hi(n,e){const t=He(e,n.schema),{from:r,to:s,empty:i}=n.selection,o=[];i?(n.storedMarks&&o.push(...n.storedMarks),o.push(...n.selection.$head.marks())):n.doc.nodesBetween(r,s,a=>{o.push(...a.marks)});const l=o.find(a=>a.type.name===t.name);return l?{...l.attrs}:{}}function Ga(n,e){const t=new Cs(n);return e.forEach(r=>{r.steps.forEach(s=>{t.step(s)})}),t}function Ya(n){for(let e=0;e<n.edgeCount;e+=1){const{type:t}=n.edge(e);if(t.isTextblock&&!t.hasRequiredAttrs())return t}return null}function xp(n,e){const t=[];return n.descendants((r,s)=>{e(r)&&t.push({node:r,pos:s})}),t}function Xa(n,e,t){const r=[];return n.nodesBetween(e.from,e.to,(s,i)=>{t(s)&&r.push({node:s,pos:i})}),r}function pi(n,e){for(let t=n.depth;t>0;t-=1){const r=n.node(t);if(e(r))return{pos:t>0?n.before(t):0,start:n.start(t),depth:t,node:r}}}function $t(n){return e=>pi(e.$from,n)}function fr(n,e){const t=At.resolve(n);return oi(t,e)}function Mp(n,e){const t=fr(e),r=Me.fromJSON(t,n);return gn(r.content,t)}function Tp(n,e){const t=fr(e),r=Ht(n);return je.fromSchema(t).parse(r).toJSON()}function mi(n,e){const t={from:0,to:n.content.size};return ai(n,t,e)}function Ap(n,e,t){const{blockSeparator:r=`
14
14
 
15
- `,textSerializers:s={}}=t||{},i=hr(e),o=Te.fromJSON(i,n);return ui(o,{blockSeparator:r,textSerializers:{...cr(i),...s}})}function Ha(n,e){const t=U(e,n.schema),{from:r,to:s}=n.selection,i=[];n.doc.nodesBetween(r,s,l=>{i.push(l)});const o=i.reverse().find(l=>l.type.name===t.name);return o?{...o.attrs}:{}}function fi(n,e){const t=kn(typeof e=="string"?e:e.name,n.schema);return t==="node"?Ha(n,e):t==="mark"?ci(n,e):{}}function Fa(n,e=JSON.stringify){const t={};return n.filter(r=>{const s=e(r);return Object.prototype.hasOwnProperty.call(t,s)?!1:t[s]=!0})}function pp(n){const e=Fa(n);return e.length===1?e:e.filter((t,r)=>!e.filter((i,o)=>o!==r).some(i=>t.oldRange.from>=i.oldRange.from&&t.oldRange.to<=i.oldRange.to&&t.newRange.from>=i.newRange.from&&t.newRange.to<=i.newRange.to))}function $a(n){const{mapping:e,steps:t}=n,r=[];return e.maps.forEach((s,i)=>{const o=[];if(s.ranges.length)s.forEach((l,a)=>{o.push({from:l,to:a})});else{const{from:l,to:a}=t[i];if(l===void 0||a===void 0)return;o.push({from:l,to:a})}o.forEach(({from:l,to:a})=>{const c=e.slice(i).map(l,-1),d=e.slice(i).map(a),u=e.invert().map(c,-1),f=e.invert().map(d);r.push({oldRange:{from:u,to:f},newRange:{from:c,to:d}})})}),pp(r)}function Va(n,e=0){const r=n.type===n.type.schema.topNodeType?0:1,s=e,i=s+n.nodeSize,o=n.marks.map(c=>{const d={type:c.type.name};return Object.keys(c.attrs).length&&(d.attrs={...c.attrs}),d}),l={...n.attrs},a={type:n.type.name,from:s,to:i};return Object.keys(l).length&&(a.attrs=l),o.length&&(a.marks=o),n.content.childCount&&(a.content=[],n.forEach((c,d)=>{var u;(u=a.content)===null||u===void 0||u.push(Va(c,e+d+r))})),n.text&&(a.text=n.text),a}function pr(n,e,t){const r=[];return n===e?t.resolve(n).marks().forEach(s=>{const i=t.resolve(n),o=dr(i,s.type);o&&r.push({mark:s,...o})}):t.nodesBetween(n,e,(s,i)=>{!s||s?.nodeSize===void 0||r.push(...s.marks.map(o=>({from:i,to:i+s.nodeSize,mark:o})))}),r}const mp=(n,e,t,r=20)=>{const s=n.doc.resolve(t);let i=r,o=null;for(;i>0&&o===null;){const l=s.node(i);l?.type.name===e?o=l:i-=1}return[o,i]};function xn(n,e,t){return Object.fromEntries(Object.entries(t).filter(([r])=>{const s=n.find(i=>i.type===e&&i.name===r);return s?s.attribute.keepOnSplit:!1}))}function mr(n,e,t={}){const{empty:r,ranges:s}=n.selection,i=e?ze(e,n.schema):null;if(r)return!!(n.storedMarks||n.selection.$from.marks()).filter(u=>i?i.name===u.type.name:!0).find(u=>yn(u.attrs,t,{strict:!1}));let o=0;const l=[];if(s.forEach(({$from:u,$to:f})=>{const h=u.pos,p=f.pos;n.doc.nodesBetween(h,p,(m,g)=>{if(!m.isText&&!m.marks.length)return;const y=Math.max(h,g),k=Math.min(p,g+m.nodeSize),T=k-y;o+=T,l.push(...m.marks.map(D=>({mark:D,from:y,to:k})))})}),o===0)return!1;const a=l.filter(u=>i?i.name===u.mark.type.name:!0).filter(u=>yn(u.mark.attrs,t,{strict:!1})).reduce((u,f)=>u+f.to-f.from,0),c=l.filter(u=>i?u.mark.type!==i&&u.mark.type.excludes(i):!0).reduce((u,f)=>u+f.to-f.from,0);return(a>0?a+c:a)>=o}function Wa(n,e,t={}){if(!e)return Ft(n,null,t)||mr(n,null,t);const r=kn(e,n.schema);return r==="node"?Ft(n,e,t):r==="mark"?mr(n,e,t):!1}const gp=(n,e)=>{const{$from:t,$to:r,$anchor:s}=n.selection;if(e){const i=Sn(l=>l.type.name===e)(n.selection);if(!i)return!1;const o=n.doc.resolve(i.pos+1);return s.pos+1===o.end()}return!(r.parentOffset<r.parent.nodeSize-2||t.pos!==r.pos)},yp=n=>{const{$from:e,$to:t}=n.selection;return!(e.parentOffset>0||e.pos!==t.pos)};function hi(n,e){const{nodeExtensions:t}=hn(e),r=t.find(o=>o.name===n);if(!r)return!1;const s={name:r.name,options:r.options,storage:r.storage},i=O(C(r,"group",s));return typeof i!="string"?!1:i.split(" ").includes("list")}function Cn(n,{checkChildren:e=!0,ignoreWhitespace:t=!1}={}){var r;if(t){if(n.type.name==="hardBreak")return!0;if(n.isText)return/^\s*$/m.test((r=n.text)!==null&&r!==void 0?r:"")}if(n.isText)return!n.text;if(n.isAtom||n.isLeaf)return!1;if(n.content.childCount===0)return!0;if(e){let s=!0;return n.content.forEach(i=>{s!==!1&&(Cn(i,{ignoreWhitespace:t,checkChildren:e})||(s=!1))}),s}return!1}function ja(n){return n instanceof w}function bp(n,e,t){const s=n.state.doc.content.size,i=Oe(e,0,s),o=Oe(t,0,s),l=n.coordsAtPos(i),a=n.coordsAtPos(o,-1),c=Math.min(l.top,a.top),d=Math.max(l.bottom,a.bottom),u=Math.min(l.left,a.left),f=Math.max(l.right,a.right),h=f-u,p=d-c,y={top:c,bottom:d,left:u,right:f,width:h,height:p,x:u,y:c};return{...y,toJSON:()=>y}}function Ka({json:n,validMarks:e,validNodes:t,options:r,rewrittenContent:s=[]}){return n.marks&&Array.isArray(n.marks)&&(n.marks=n.marks.filter(i=>{const o=typeof i=="string"?i:i.type;return e.has(o)?!0:(s.push({original:JSON.parse(JSON.stringify(i)),unsupported:o}),!1)})),n.content&&Array.isArray(n.content)&&(n.content=n.content.map(i=>Ka({json:i,validMarks:e,validNodes:t,options:r,rewrittenContent:s}).json).filter(i=>i!=null)),n.type&&!t.has(n.type)?(s.push({original:JSON.parse(JSON.stringify(n)),unsupported:n.type}),n.content&&Array.isArray(n.content)&&r?.fallbackToParagraph!==!1?(n.type="paragraph",{json:n,rewrittenContent:s}):{json:null,rewrittenContent:s}):{json:n,rewrittenContent:s}}function kp(n,e,t){return Ka({json:n,validNodes:new Set(Object.keys(e.nodes)),validMarks:new Set(Object.keys(e.marks)),options:t})}function Sp(n,e,t){var r;const{selection:s}=e;let i=null;if(ii(s)&&(i=s.$cursor),i){const l=(r=n.storedMarks)!==null&&r!==void 0?r:i.marks();return!!t.isInSet(l)||!l.some(a=>a.type.excludes(t))}const{ranges:o}=s;return o.some(({$from:l,$to:a})=>{let c=l.depth===0?n.doc.inlineContent&&n.doc.type.allowsMarkType(t):!1;return n.doc.nodesBetween(l.pos,a.pos,(d,u,f)=>{if(c)return!1;if(d.isInline){const h=!f||f.type.allowsMarkType(t),p=!!t.isInSet(d.marks)||!d.marks.some(m=>m.type.excludes(t));c=h&&p}return!c}),c})}const xp=(n,e={})=>({tr:t,state:r,dispatch:s})=>{const{selection:i}=t,{empty:o,ranges:l}=i,a=ze(n,r.schema);if(s)if(o){const c=ci(r,a);t.addStoredMark(a.create({...c,...e}))}else l.forEach(c=>{const d=c.$from.pos,u=c.$to.pos;r.doc.nodesBetween(d,u,(f,h)=>{const p=Math.max(h,d),m=Math.min(h+f.nodeSize,u);f.marks.find(y=>y.type===a)?f.marks.forEach(y=>{a===y.type&&t.addMark(p,m,a.create({...y.attrs,...e}))}):t.addMark(p,m,a.create(e))})});return Sp(r,t,a)},Cp=(n,e)=>({tr:t})=>(t.setMeta(n,e),!0),wp=(n,e={})=>({state:t,dispatch:r,chain:s})=>{const i=U(n,t.schema);let o;return t.selection.$anchor.sameParent(t.selection.$head)&&(o=t.selection.$anchor.parent.attrs),i.isTextblock?s().command(({commands:l})=>xa(i,{...o,...e})(t)?!0:l.clearNodes()).command(({state:l})=>xa(i,{...o,...e})(l,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},Mp=n=>({tr:e,dispatch:t})=>{if(t){const{doc:r}=e,s=Oe(n,0,r.content.size),i=w.create(r,s);e.setSelection(i)}return!0},Tp=n=>({tr:e,dispatch:t})=>{if(t){const{doc:r}=e,{from:s,to:i}=typeof n=="number"?{from:n,to:n}:n,o=A.atStart(r).from,l=A.atEnd(r).to,a=Oe(s,o,l),c=Oe(i,o,l),d=A.create(r,a,c);e.setSelection(d)}return!0},Ap=n=>({state:e,dispatch:t})=>{const r=U(n,e.schema);return mh(r)(e,t)};function Ja(n,e){const t=n.storedMarks||n.selection.$to.parentOffset&&n.selection.$from.marks();if(t){const r=t.filter(s=>e?.includes(s.type.name));n.tr.ensureMarks(r)}}const Ep=({keepMarks:n=!0}={})=>({tr:e,state:t,dispatch:r,editor:s})=>{const{selection:i,doc:o}=e,{$from:l,$to:a}=i,c=s.extensionManager.attributes,d=xn(c,l.node().type.name,l.node().attrs);if(i instanceof w&&i.node.isBlock)return!l.parentOffset||!Ot(o,l.pos)?!1:(r&&(n&&Ja(t,s.extensionManager.splittableMarks),e.split(l.pos).scrollIntoView()),!0);if(!l.parent.isBlock)return!1;const u=a.parentOffset===a.parent.content.size,f=l.depth===0?void 0:Ba(l.node(-1).contentMatchAt(l.indexAfter(-1)));let h=u&&f?[{type:f,attrs:d}]:void 0,p=Ot(e.doc,e.mapping.map(l.pos),1,h);if(!h&&!p&&Ot(e.doc,e.mapping.map(l.pos),1,f?[{type:f}]:void 0)&&(p=!0,h=f?[{type:f,attrs:d}]:void 0),r){if(p&&(i instanceof A&&e.deleteSelection(),e.split(e.mapping.map(l.pos),1,h),f&&!u&&!l.parentOffset&&l.parent.type!==f)){const m=e.mapping.map(l.before()),g=e.doc.resolve(m);l.node(-1).canReplaceWith(g.index(),g.index()+1,f)&&e.setNodeMarkup(e.mapping.map(l.before()),f)}n&&Ja(t,s.extensionManager.splittableMarks),e.scrollIntoView()}return p},Op=(n,e={})=>({tr:t,state:r,dispatch:s,editor:i})=>{var o;const l=U(n,r.schema),{$from:a,$to:c}=r.selection,d=r.selection.node;if(d&&d.isBlock||a.depth<2||!a.sameParent(c))return!1;const u=a.node(-1);if(u.type!==l)return!1;const f=i.extensionManager.attributes;if(a.parent.content.size===0&&a.node(-1).childCount===a.indexAfter(-1)){if(a.depth===2||a.node(-3).type!==l||a.index(-2)!==a.node(-2).childCount-1)return!1;if(s){let y=b.empty;const k=a.index(-1)?1:a.index(-2)?2:3;for(let j=a.depth-k;j>=a.depth-3;j-=1)y=b.from(a.node(j).copy(y));const T=a.indexAfter(-1)<a.node(-2).childCount?1:a.indexAfter(-2)<a.node(-3).childCount?2:3,D={...xn(f,a.node().type.name,a.node().attrs),...e},M=((o=l.contentMatch.defaultType)===null||o===void 0?void 0:o.createAndFill(D))||void 0;y=y.append(b.from(l.createAndFill(null,M)||void 0));const R=a.before(a.depth-(k-1));t.replace(R,a.after(-T),new x(y,4-k,0));let z=-1;t.doc.nodesBetween(R,t.doc.content.size,(j,I)=>{if(z>-1)return!1;j.isTextblock&&j.content.size===0&&(z=I+1)}),z>-1&&t.setSelection(A.near(t.doc.resolve(z))),t.scrollIntoView()}return!0}const h=c.pos===a.end()?u.contentMatchAt(0).defaultType:null,p={...xn(f,u.type.name,u.attrs),...e},m={...xn(f,a.node().type.name,a.node().attrs),...e};t.delete(a.pos,c.pos);const g=h?[{type:l,attrs:p},{type:h,attrs:m}]:[{type:l,attrs:p}];if(!Ot(t.doc,a.pos,2))return!1;if(s){const{selection:y,storedMarks:k}=r,{splittableMarks:T}=i.extensionManager,D=k||y.$to.parentOffset&&y.$from.marks();if(t.split(a.pos,2,g).scrollIntoView(),!D||!s)return!0;const M=D.filter(R=>T.includes(R.type.name));t.ensureMarks(M)}return!0},pi=(n,e)=>{const t=Sn(o=>o.type===e)(n.selection);if(!t)return!0;const r=n.doc.resolve(Math.max(0,t.pos-1)).before(t.depth);if(r===void 0)return!0;const s=n.doc.nodeAt(r);return t.node.type===s?.type&&je(n.doc,t.pos)&&n.join(t.pos),!0},mi=(n,e)=>{const t=Sn(o=>o.type===e)(n.selection);if(!t)return!0;const r=n.doc.resolve(t.start).after(t.depth);if(r===void 0)return!0;const s=n.doc.nodeAt(r);return t.node.type===s?.type&&je(n.doc,r)&&n.join(r),!0},Np=(n,e,t,r={})=>({editor:s,tr:i,state:o,dispatch:l,chain:a,commands:c,can:d})=>{const{extensions:u,splittableMarks:f}=s.extensionManager,h=U(n,o.schema),p=U(e,o.schema),{selection:m,storedMarks:g}=o,{$from:y,$to:k}=m,T=y.blockRange(k),D=g||m.$to.parentOffset&&m.$from.marks();if(!T)return!1;const M=Sn(R=>hi(R.type.name,u))(m);if(T.depth>=1&&M&&T.depth-M.depth<=1){if(M.node.type===h)return c.liftListItem(p);if(hi(M.node.type.name,u)&&h.validContent(M.node.content)&&l)return a().command(()=>(i.setNodeMarkup(M.pos,h),!0)).command(()=>pi(i,h)).command(()=>mi(i,h)).run()}return!t||!D||!l?a().command(()=>d().wrapInList(h,r)?!0:c.clearNodes()).wrapInList(h,r).command(()=>pi(i,h)).command(()=>mi(i,h)).run():a().command(()=>{const R=d().wrapInList(h,r),z=D.filter(j=>f.includes(j.type.name));return i.ensureMarks(z),R?!0:c.clearNodes()}).wrapInList(h,r).command(()=>pi(i,h)).command(()=>mi(i,h)).run()},Rp=(n,e={},t={})=>({state:r,commands:s})=>{const{extendEmptyMarkRange:i=!1}=t,o=ze(n,r.schema);return mr(r,o,e)?s.unsetMark(o,{extendEmptyMarkRange:i}):s.setMark(o,e)},Dp=(n,e,t={})=>({state:r,commands:s})=>{const i=U(n,r.schema),o=U(e,r.schema),l=Ft(r,i,t);let a;return r.selection.$anchor.sameParent(r.selection.$head)&&(a=r.selection.$anchor.parent.attrs),l?s.setNode(o,a):s.setNode(i,{...a,...t})},Ip=(n,e={})=>({state:t,commands:r})=>{const s=U(n,t.schema);return Ft(t,s,e)?r.lift(s):r.wrapIn(s,e)},vp=()=>({state:n,dispatch:e})=>{const t=n.plugins;for(let r=0;r<t.length;r+=1){const s=t[r];let i;if(s.spec.isInputRules&&(i=s.getState(n))){if(e){const o=n.tr,l=i.transform;for(let a=l.steps.length-1;a>=0;a-=1)o.step(l.steps[a].invert(l.docs[a]));if(i.text){const a=o.doc.resolve(i.from).marks();o.replaceWith(i.from,i.to,n.schema.text(i.text,a))}else o.delete(i.from,i.to)}return!0}}return!1},Pp=()=>({tr:n,dispatch:e})=>{const{selection:t}=n,{empty:r,ranges:s}=t;return r||e&&s.forEach(i=>{n.removeMark(i.$from.pos,i.$to.pos)}),!0},Lp=(n,e={})=>({tr:t,state:r,dispatch:s})=>{var i;const{extendEmptyMarkRange:o=!1}=e,{selection:l}=t,a=ze(n,r.schema),{$from:c,empty:d,ranges:u}=l;if(!s)return!0;if(d&&o){let{from:f,to:h}=l;const p=(i=c.marks().find(g=>g.type===a))===null||i===void 0?void 0:i.attrs,m=dr(c,a,p);m&&(f=m.from,h=m.to),t.removeMark(f,h,a)}else u.forEach(f=>{t.removeMark(f.$from.pos,f.$to.pos,a)});return t.removeStoredMark(a),!0},Bp=(n,e={})=>({tr:t,state:r,dispatch:s})=>{let i=null,o=null;const l=kn(typeof n=="string"?n:n.name,r.schema);return l?(l==="node"&&(i=U(n,r.schema)),l==="mark"&&(o=ze(n,r.schema)),s&&t.selection.ranges.forEach(a=>{const c=a.$from.pos,d=a.$to.pos;let u,f,h,p;t.selection.empty?r.doc.nodesBetween(c,d,(m,g)=>{i&&i===m.type&&(h=Math.max(g,c),p=Math.min(g+m.nodeSize,d),u=g,f=m)}):r.doc.nodesBetween(c,d,(m,g)=>{g<c&&i&&i===m.type&&(h=Math.max(g,c),p=Math.min(g+m.nodeSize,d),u=g,f=m),g>=c&&g<=d&&(i&&i===m.type&&t.setNodeMarkup(g,void 0,{...m.attrs,...e}),o&&m.marks.length&&m.marks.forEach(y=>{if(o===y.type){const k=Math.max(g,c),T=Math.min(g+m.nodeSize,d);t.addMark(k,T,o.create({...y.attrs,...e}))}}))}),f&&(u!==void 0&&t.setNodeMarkup(u,void 0,{...f.attrs,...e}),o&&f.marks.length&&f.marks.forEach(m=>{o===m.type&&t.addMark(h,p,o.create({...m.attrs,...e}))}))}),!0):!1},zp=(n,e={})=>({state:t,dispatch:r})=>{const s=U(n,t.schema);return ch(s,e)(t,r)},Hp=(n,e={})=>({state:t,dispatch:r})=>{const s=U(n,t.schema);return dh(s,e)(t,r)};var Fp=Object.freeze({__proto__:null,blur:Ch,clearContent:wh,clearNodes:Mh,command:Th,createParagraphNear:Ah,cut:Eh,deleteCurrentNode:Oh,deleteNode:Nh,deleteRange:Rh,deleteSelection:Dh,enter:Ih,exitCode:vh,extendMarkRange:Ph,first:Lh,focus:Bh,forEach:zh,insertContent:Hh,insertContentAt:$h,joinBackward:jh,joinDown:Wh,joinForward:Kh,joinItemBackward:Jh,joinItemForward:Uh,joinTextblockBackward:qh,joinTextblockForward:_h,joinUp:Vh,keyboardShortcut:Yh,lift:Xh,liftEmptyBlock:Qh,liftListItem:Zh,newlineInCode:ep,resetAttributes:tp,scrollIntoView:np,selectAll:rp,selectNodeBackward:sp,selectNodeForward:ip,selectParentNode:op,selectTextblockEnd:lp,selectTextblockStart:ap,setContent:cp,setMark:xp,setMeta:Cp,setNode:wp,setNodeSelection:Mp,setTextSelection:Tp,sinkListItem:Ap,splitBlock:Ep,splitListItem:Op,toggleList:Np,toggleMark:Rp,toggleNode:Dp,toggleWrap:Ip,undoInputRule:vp,unsetAllMarks:Pp,unsetMark:Lp,updateAttributes:Bp,wrapIn:zp,wrapInList:Hp});const Ua=_.create({name:"commands",addCommands(){return{...Fp}}}),qa=_.create({name:"drop",addProseMirrorPlugins(){return[new K({key:new Q("tiptapDrop"),props:{handleDrop:(n,e,t,r)=>{this.editor.emit("drop",{editor:this.editor,event:e,slice:t,moved:r})}}})]}}),_a=_.create({name:"editable",addProseMirrorPlugins(){return[new K({key:new Q("editable"),props:{editable:()=>this.editor.options.editable}})]}}),Ga=_.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:n}=this;return[new K({key:new Q("focusEvents"),props:{handleDOMEvents:{focus:(e,t)=>{n.isFocused=!0;const r=n.state.tr.setMeta("focus",{event:t}).setMeta("addToHistory",!1);return e.dispatch(r),!1},blur:(e,t)=>{n.isFocused=!1;const r=n.state.tr.setMeta("blur",{event:t}).setMeta("addToHistory",!1);return e.dispatch(r),!1}}}})]}}),Ya=_.create({name:"keymap",addKeyboardShortcuts(){const n=()=>this.editor.commands.first(({commands:o})=>[()=>o.undoInputRule(),()=>o.command(({tr:l})=>{const{selection:a,doc:c}=l,{empty:d,$anchor:u}=a,{pos:f,parent:h}=u,p=u.parent.isTextblock&&f>0?l.doc.resolve(f-1):u,m=p.parent.type.spec.isolating,g=u.pos-u.parentOffset,y=m&&p.parent.childCount===1?g===u.pos:E.atStart(c).from===f;return!d||!h.type.isTextblock||h.textContent.length||!y||y&&u.parent.type.name==="paragraph"?!1:o.clearNodes()}),()=>o.deleteSelection(),()=>o.joinBackward(),()=>o.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:o})=>[()=>o.deleteSelection(),()=>o.deleteCurrentNode(),()=>o.joinForward(),()=>o.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:o})=>[()=>o.newlineInCode(),()=>o.createParagraphNear(),()=>o.liftEmptyBlock(),()=>o.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:n,"Mod-Backspace":n,"Shift-Backspace":n,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},s={...r},i={...r,"Ctrl-h":n,"Alt-Backspace":n,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return ur()||li()?i:s},addProseMirrorPlugins(){return[new K({key:new Q("clearDocument"),appendTransaction:(n,e,t)=>{const r=n.some(m=>m.docChanged)&&!e.doc.eq(t.doc),s=n.some(m=>m.getMeta("preventClearDocument"));if(!r||s)return;const{empty:i,from:o,to:l}=e.selection,a=E.atStart(e.doc).from,c=E.atEnd(e.doc).to;if(i||!(o===a&&l===c)||!Cn(t.doc))return;const f=t.tr,h=un({state:t,transaction:f}),{commands:p}=new fn({editor:this.editor,state:h});if(p.clearNodes(),!!f.steps.length)return f}})]}}),Xa=_.create({name:"paste",addProseMirrorPlugins(){return[new K({key:new Q("tiptapPaste"),props:{handlePaste:(n,e,t)=>{this.editor.emit("paste",{editor:this.editor,event:e,slice:t})}}})]}}),Qa=_.create({name:"tabindex",addProseMirrorPlugins(){return[new K({key:new Q("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}});var $p=Object.freeze({__proto__:null,ClipboardTextSerializer:Ra,Commands:Ua,Drop:qa,Editable:_a,FocusEvents:Ga,Keymap:Ya,Paste:Xa,Tabindex:Qa});class it{get name(){return this.node.type.name}constructor(e,t,r=!1,s=null){this.currentNode=null,this.actualDepth=null,this.isBlock=r,this.resolvedPos=e,this.editor=t,this.currentNode=s}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var e;return(e=this.actualDepth)!==null&&e!==void 0?e:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(e){let t=this.from,r=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can\u2019t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}t=this.from+1,r=this.to-1}this.editor.commands.insertContentAt({from:t,to:r},e)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;const e=this.resolvedPos.start(this.resolvedPos.depth-1),t=this.resolvedPos.doc.resolve(e);return new it(t,this.editor)}get before(){let e=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.from-3)),new it(e,this.editor)}get after(){let e=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.to+3)),new it(e,this.editor)}get children(){const e=[];return this.node.content.forEach((t,r)=>{const s=t.isBlock&&!t.isTextblock,i=t.isAtom&&!t.isText,o=this.pos+r+(i?0:1),l=this.resolvedPos.doc.resolve(o);if(!s&&l.depth<=this.depth)return;const a=new it(l,this.editor,s,s?t:null);s&&(a.actualDepth=this.depth+1),e.push(new it(l,this.editor,s,s?t:null))}),e}get firstChild(){return this.children[0]||null}get lastChild(){const e=this.children;return e[e.length-1]||null}closest(e,t={}){let r=null,s=this.parent;for(;s&&!r;){if(s.node.type.name===e)if(Object.keys(t).length>0){const i=s.node.attrs,o=Object.keys(t);for(let l=0;l<o.length;l+=1){const a=o[l];if(i[a]!==t[a])break}}else r=s;s=s.parent}return r}querySelector(e,t={}){return this.querySelectorAll(e,t,!0)[0]||null}querySelectorAll(e,t={},r=!1){let s=[];if(!this.children||this.children.length===0)return s;const i=Object.keys(t);return this.children.forEach(o=>{r&&s.length>0||(o.node.type.name===e&&i.every(a=>t[a]===o.node.attrs[a])&&s.push(o),!(r&&s.length>0)&&(s=s.concat(o.querySelectorAll(e,t,r))))}),s}setAttribute(e){const{tr:t}=this.editor.state;t.setNodeMarkup(this.from,void 0,{...this.node.attrs,...e}),this.editor.view.dispatch(t)}}const Vp=`.ProseMirror {
15
+ `,textSerializers:s={}}=t||{},i=fr(e),o=Me.fromJSON(i,n);return mi(o,{blockSeparator:r,textSerializers:{...cr(i),...s}})}function Qa(n,e){const t=q(e,n.schema),{from:r,to:s}=n.selection,i=[];n.doc.nodesBetween(r,s,l=>{i.push(l)});const o=i.reverse().find(l=>l.type.name===t.name);return o?{...o.attrs}:{}}function gi(n,e){const t=Cn(typeof e=="string"?e:e.name,n.schema);return t==="node"?Qa(n,e):t==="mark"?hi(n,e):{}}function Za(n,e=JSON.stringify){const t={};return n.filter(r=>{const s=e(r);return Object.prototype.hasOwnProperty.call(t,s)?!1:t[s]=!0})}function Ep(n){const e=Za(n);return e.length===1?e:e.filter((t,r)=>!e.filter((i,o)=>o!==r).some(i=>t.oldRange.from>=i.oldRange.from&&t.oldRange.to<=i.oldRange.to&&t.newRange.from>=i.newRange.from&&t.newRange.to<=i.newRange.to))}function ec(n){const{mapping:e,steps:t}=n,r=[];return e.maps.forEach((s,i)=>{const o=[];if(s.ranges.length)s.forEach((l,a)=>{o.push({from:l,to:a})});else{const{from:l,to:a}=t[i];if(l===void 0||a===void 0)return;o.push({from:l,to:a})}o.forEach(({from:l,to:a})=>{const c=e.slice(i).map(l,-1),d=e.slice(i).map(a),u=e.invert().map(c,-1),f=e.invert().map(d);r.push({oldRange:{from:u,to:f},newRange:{from:c,to:d}})})}),Ep(r)}function tc(n,e=0){const r=n.type===n.type.schema.topNodeType?0:1,s=e,i=s+n.nodeSize,o=n.marks.map(c=>{const d={type:c.type.name};return Object.keys(c.attrs).length&&(d.attrs={...c.attrs}),d}),l={...n.attrs},a={type:n.type.name,from:s,to:i};return Object.keys(l).length&&(a.attrs=l),o.length&&(a.marks=o),n.content.childCount&&(a.content=[],n.forEach((c,d)=>{var u;(u=a.content)===null||u===void 0||u.push(tc(c,e+d+r))})),n.text&&(a.text=n.text),a}function hr(n,e,t){const r=[];return n===e?t.resolve(n).marks().forEach(s=>{const i=t.resolve(n),o=dr(i,s.type);o&&r.push({mark:s,...o})}):t.nodesBetween(n,e,(s,i)=>{!s||s?.nodeSize===void 0||r.push(...s.marks.map(o=>({from:i,to:i+s.nodeSize,mark:o})))}),r}const Op=(n,e,t,r=20)=>{const s=n.doc.resolve(t);let i=r,o=null;for(;i>0&&o===null;){const l=s.node(i);l?.type.name===e?o=l:i-=1}return[o,i]};function xn(n,e,t){return Object.fromEntries(Object.entries(t).filter(([r])=>{const s=n.find(i=>i.type===e&&i.name===r);return s?s.attribute.keepOnSplit:!1}))}function pr(n,e,t={}){const{empty:r,ranges:s}=n.selection,i=e?He(e,n.schema):null;if(r)return!!(n.storedMarks||n.selection.$from.marks()).filter(u=>i?i.name===u.type.name:!0).find(u=>kn(u.attrs,t,{strict:!1}));let o=0;const l=[];if(s.forEach(({$from:u,$to:f})=>{const h=u.pos,p=f.pos;n.doc.nodesBetween(h,p,(m,g)=>{if(!m.isText&&!m.marks.length)return;const y=Math.max(h,g),k=Math.min(p,g+m.nodeSize),A=k-y;o+=A,l.push(...m.marks.map(R=>({mark:R,from:y,to:k})))})}),o===0)return!1;const a=l.filter(u=>i?i.name===u.mark.type.name:!0).filter(u=>kn(u.mark.attrs,t,{strict:!1})).reduce((u,f)=>u+f.to-f.from,0),c=l.filter(u=>i?u.mark.type!==i&&u.mark.type.excludes(i):!0).reduce((u,f)=>u+f.to-f.from,0);return(a>0?a+c:a)>=o}function nc(n,e,t={}){if(!e)return Ft(n,null,t)||pr(n,null,t);const r=Cn(e,n.schema);return r==="node"?Ft(n,e,t):r==="mark"?pr(n,e,t):!1}const Np=(n,e)=>{const{$from:t,$to:r,$anchor:s}=n.selection;if(e){const i=$t(l=>l.type.name===e)(n.selection);if(!i)return!1;const o=n.doc.resolve(i.pos+1);return s.pos+1===o.end()}return!(r.parentOffset<r.parent.nodeSize-2||t.pos!==r.pos)},vp=n=>{const{$from:e,$to:t}=n.selection;return!(e.parentOffset>0||e.pos!==t.pos)};function yi(n,e){const{nodeExtensions:t}=mn(e),r=t.find(o=>o.name===n);if(!r)return!1;const s={name:r.name,options:r.options,storage:r.storage},i=O(C(r,"group",s));return typeof i!="string"?!1:i.split(" ").includes("list")}function Mn(n,{checkChildren:e=!0,ignoreWhitespace:t=!1}={}){var r;if(t){if(n.type.name==="hardBreak")return!0;if(n.isText)return/^\s*$/m.test((r=n.text)!==null&&r!==void 0?r:"")}if(n.isText)return!n.text;if(n.isAtom||n.isLeaf)return!1;if(n.content.childCount===0)return!0;if(e){let s=!0;return n.content.forEach(i=>{s!==!1&&(Mn(i,{ignoreWhitespace:t,checkChildren:e})||(s=!1))}),s}return!1}function rc(n){return n instanceof x}function Rp(n,e,t){const s=n.state.doc.content.size,i=Ee(e,0,s),o=Ee(t,0,s),l=n.coordsAtPos(i),a=n.coordsAtPos(o,-1),c=Math.min(l.top,a.top),d=Math.max(l.bottom,a.bottom),u=Math.min(l.left,a.left),f=Math.max(l.right,a.right),h=f-u,p=d-c,y={top:c,bottom:d,left:u,right:f,width:h,height:p,x:u,y:c};return{...y,toJSON:()=>y}}function sc({json:n,validMarks:e,validNodes:t,options:r,rewrittenContent:s=[]}){return n.marks&&Array.isArray(n.marks)&&(n.marks=n.marks.filter(i=>{const o=typeof i=="string"?i:i.type;return e.has(o)?!0:(s.push({original:JSON.parse(JSON.stringify(i)),unsupported:o}),!1)})),n.content&&Array.isArray(n.content)&&(n.content=n.content.map(i=>sc({json:i,validMarks:e,validNodes:t,options:r,rewrittenContent:s}).json).filter(i=>i!=null)),n.type&&!t.has(n.type)?(s.push({original:JSON.parse(JSON.stringify(n)),unsupported:n.type}),n.content&&Array.isArray(n.content)&&r?.fallbackToParagraph!==!1?(n.type="paragraph",{json:n,rewrittenContent:s}):{json:null,rewrittenContent:s}):{json:n,rewrittenContent:s}}function Dp(n,e,t){return sc({json:n,validNodes:new Set(Object.keys(e.nodes)),validMarks:new Set(Object.keys(e.marks)),options:t})}function Ip(n,e,t){var r;const{selection:s}=e;let i=null;if(ci(s)&&(i=s.$cursor),i){const l=(r=n.storedMarks)!==null&&r!==void 0?r:i.marks();return!!t.isInSet(l)||!l.some(a=>a.type.excludes(t))}const{ranges:o}=s;return o.some(({$from:l,$to:a})=>{let c=l.depth===0?n.doc.inlineContent&&n.doc.type.allowsMarkType(t):!1;return n.doc.nodesBetween(l.pos,a.pos,(d,u,f)=>{if(c)return!1;if(d.isInline){const h=!f||f.type.allowsMarkType(t),p=!!t.isInSet(d.marks)||!d.marks.some(m=>m.type.excludes(t));c=h&&p}return!c}),c})}const Lp=(n,e={})=>({tr:t,state:r,dispatch:s})=>{const{selection:i}=t,{empty:o,ranges:l}=i,a=He(n,r.schema);if(s)if(o){const c=hi(r,a);t.addStoredMark(a.create({...c,...e}))}else l.forEach(c=>{const d=c.$from.pos,u=c.$to.pos;r.doc.nodesBetween(d,u,(f,h)=>{const p=Math.max(h,d),m=Math.min(h+f.nodeSize,u);f.marks.find(y=>y.type===a)?f.marks.forEach(y=>{a===y.type&&t.addMark(p,m,a.create({...y.attrs,...e}))}):t.addMark(p,m,a.create(e))})});return Ip(r,t,a)},Pp=(n,e)=>({tr:t})=>(t.setMeta(n,e),!0),Bp=(n,e={})=>({state:t,dispatch:r,chain:s})=>{const i=q(n,t.schema);let o;return t.selection.$anchor.sameParent(t.selection.$head)&&(o=t.selection.$anchor.parent.attrs),i.isTextblock?s().command(({commands:l})=>La(i,{...o,...e})(t)?!0:l.clearNodes()).command(({state:l})=>La(i,{...o,...e})(l,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},zp=n=>({tr:e,dispatch:t})=>{if(t){const{doc:r}=e,s=Ee(n,0,r.content.size),i=x.create(r,s);e.setSelection(i)}return!0},Hp=n=>({tr:e,dispatch:t})=>{if(t){const{doc:r}=e,{from:s,to:i}=typeof n=="number"?{from:n,to:n}:n,o=T.atStart(r).from,l=T.atEnd(r).to,a=Ee(s,o,l),c=Ee(i,o,l),d=T.create(r,a,c);e.setSelection(d)}return!0},Fp=n=>({state:e,dispatch:t})=>{const r=q(n,e.schema);return Oh(r)(e,t)};function ic(n,e){const t=n.storedMarks||n.selection.$to.parentOffset&&n.selection.$from.marks();if(t){const r=t.filter(s=>e?.includes(s.type.name));n.tr.ensureMarks(r)}}const $p=({keepMarks:n=!0}={})=>({tr:e,state:t,dispatch:r,editor:s})=>{const{selection:i,doc:o}=e,{$from:l,$to:a}=i,c=s.extensionManager.attributes,d=xn(c,l.node().type.name,l.node().attrs);if(i instanceof x&&i.node.isBlock)return!l.parentOffset||!Ie(o,l.pos)?!1:(r&&(n&&ic(t,s.extensionManager.splittableMarks),e.split(l.pos).scrollIntoView()),!0);if(!l.parent.isBlock)return!1;const u=a.parentOffset===a.parent.content.size,f=l.depth===0?void 0:Ya(l.node(-1).contentMatchAt(l.indexAfter(-1)));let h=u&&f?[{type:f,attrs:d}]:void 0,p=Ie(e.doc,e.mapping.map(l.pos),1,h);if(!h&&!p&&Ie(e.doc,e.mapping.map(l.pos),1,f?[{type:f}]:void 0)&&(p=!0,h=f?[{type:f,attrs:d}]:void 0),r){if(p&&(i instanceof T&&e.deleteSelection(),e.split(e.mapping.map(l.pos),1,h),f&&!u&&!l.parentOffset&&l.parent.type!==f)){const m=e.mapping.map(l.before()),g=e.doc.resolve(m);l.node(-1).canReplaceWith(g.index(),g.index()+1,f)&&e.setNodeMarkup(e.mapping.map(l.before()),f)}n&&ic(t,s.extensionManager.splittableMarks),e.scrollIntoView()}return p},Vp=(n,e={})=>({tr:t,state:r,dispatch:s,editor:i})=>{var o;const l=q(n,r.schema),{$from:a,$to:c}=r.selection,d=r.selection.node;if(d&&d.isBlock||a.depth<2||!a.sameParent(c))return!1;const u=a.node(-1);if(u.type!==l)return!1;const f=i.extensionManager.attributes;if(a.parent.content.size===0&&a.node(-1).childCount===a.indexAfter(-1)){if(a.depth===2||a.node(-3).type!==l||a.index(-2)!==a.node(-2).childCount-1)return!1;if(s){let y=b.empty;const k=a.index(-1)?1:a.index(-2)?2:3;for(let K=a.depth-k;K>=a.depth-3;K-=1)y=b.from(a.node(K).copy(y));const A=a.indexAfter(-1)<a.node(-2).childCount?1:a.indexAfter(-2)<a.node(-3).childCount?2:3,R={...xn(f,a.node().type.name,a.node().attrs),...e},M=((o=l.contentMatch.defaultType)===null||o===void 0?void 0:o.createAndFill(R))||void 0;y=y.append(b.from(l.createAndFill(null,M)||void 0));const v=a.before(a.depth-(k-1));t.replace(v,a.after(-A),new w(y,4-k,0));let F=-1;t.doc.nodesBetween(v,t.doc.content.size,(K,D)=>{if(F>-1)return!1;K.isTextblock&&K.content.size===0&&(F=D+1)}),F>-1&&t.setSelection(T.near(t.doc.resolve(F))),t.scrollIntoView()}return!0}const h=c.pos===a.end()?u.contentMatchAt(0).defaultType:null,p={...xn(f,u.type.name,u.attrs),...e},m={...xn(f,a.node().type.name,a.node().attrs),...e};t.delete(a.pos,c.pos);const g=h?[{type:l,attrs:p},{type:h,attrs:m}]:[{type:l,attrs:p}];if(!Ie(t.doc,a.pos,2))return!1;if(s){const{selection:y,storedMarks:k}=r,{splittableMarks:A}=i.extensionManager,R=k||y.$to.parentOffset&&y.$from.marks();if(t.split(a.pos,2,g).scrollIntoView(),!R||!s)return!0;const M=R.filter(v=>A.includes(v.type.name));t.ensureMarks(M)}return!0},bi=(n,e)=>{const t=$t(o=>o.type===e)(n.selection);if(!t)return!0;const r=n.doc.resolve(Math.max(0,t.pos-1)).before(t.depth);if(r===void 0)return!0;const s=n.doc.nodeAt(r);return t.node.type===s?.type&&Ke(n.doc,t.pos)&&n.join(t.pos),!0},ki=(n,e)=>{const t=$t(o=>o.type===e)(n.selection);if(!t)return!0;const r=n.doc.resolve(t.start).after(t.depth);if(r===void 0)return!0;const s=n.doc.nodeAt(r);return t.node.type===s?.type&&Ke(n.doc,r)&&n.join(r),!0},Wp=(n,e,t,r={})=>({editor:s,tr:i,state:o,dispatch:l,chain:a,commands:c,can:d})=>{const{extensions:u,splittableMarks:f}=s.extensionManager,h=q(n,o.schema),p=q(e,o.schema),{selection:m,storedMarks:g}=o,{$from:y,$to:k}=m,A=y.blockRange(k),R=g||m.$to.parentOffset&&m.$from.marks();if(!A)return!1;const M=$t(v=>yi(v.type.name,u))(m);if(A.depth>=1&&M&&A.depth-M.depth<=1){if(M.node.type===h)return c.liftListItem(p);if(yi(M.node.type.name,u)&&h.validContent(M.node.content)&&l)return a().command(()=>(i.setNodeMarkup(M.pos,h),!0)).command(()=>bi(i,h)).command(()=>ki(i,h)).run()}return!t||!R||!l?a().command(()=>d().wrapInList(h,r)?!0:c.clearNodes()).wrapInList(h,r).command(()=>bi(i,h)).command(()=>ki(i,h)).run():a().command(()=>{const v=d().wrapInList(h,r),F=R.filter(K=>f.includes(K.type.name));return i.ensureMarks(F),v?!0:c.clearNodes()}).wrapInList(h,r).command(()=>bi(i,h)).command(()=>ki(i,h)).run()},jp=(n,e={},t={})=>({state:r,commands:s})=>{const{extendEmptyMarkRange:i=!1}=t,o=He(n,r.schema);return pr(r,o,e)?s.unsetMark(o,{extendEmptyMarkRange:i}):s.setMark(o,e)},Kp=(n,e,t={})=>({state:r,commands:s})=>{const i=q(n,r.schema),o=q(e,r.schema),l=Ft(r,i,t);let a;return r.selection.$anchor.sameParent(r.selection.$head)&&(a=r.selection.$anchor.parent.attrs),l?s.setNode(o,a):s.setNode(i,{...a,...t})},Up=(n,e={})=>({state:t,commands:r})=>{const s=q(n,t.schema);return Ft(t,s,e)?r.lift(s):r.wrapIn(s,e)},Jp=()=>({state:n,dispatch:e})=>{const t=n.plugins;for(let r=0;r<t.length;r+=1){const s=t[r];let i;if(s.spec.isInputRules&&(i=s.getState(n))){if(e){const o=n.tr,l=i.transform;for(let a=l.steps.length-1;a>=0;a-=1)o.step(l.steps[a].invert(l.docs[a]));if(i.text){const a=o.doc.resolve(i.from).marks();o.replaceWith(i.from,i.to,n.schema.text(i.text,a))}else o.delete(i.from,i.to)}return!0}}return!1},qp=()=>({tr:n,dispatch:e})=>{const{selection:t}=n,{empty:r,ranges:s}=t;return r||e&&s.forEach(i=>{n.removeMark(i.$from.pos,i.$to.pos)}),!0},_p=(n,e={})=>({tr:t,state:r,dispatch:s})=>{var i;const{extendEmptyMarkRange:o=!1}=e,{selection:l}=t,a=He(n,r.schema),{$from:c,empty:d,ranges:u}=l;if(!s)return!0;if(d&&o){let{from:f,to:h}=l;const p=(i=c.marks().find(g=>g.type===a))===null||i===void 0?void 0:i.attrs,m=dr(c,a,p);m&&(f=m.from,h=m.to),t.removeMark(f,h,a)}else u.forEach(f=>{t.removeMark(f.$from.pos,f.$to.pos,a)});return t.removeStoredMark(a),!0},Gp=(n,e={})=>({tr:t,state:r,dispatch:s})=>{let i=null,o=null;const l=Cn(typeof n=="string"?n:n.name,r.schema);return l?(l==="node"&&(i=q(n,r.schema)),l==="mark"&&(o=He(n,r.schema)),s&&t.selection.ranges.forEach(a=>{const c=a.$from.pos,d=a.$to.pos;let u,f,h,p;t.selection.empty?r.doc.nodesBetween(c,d,(m,g)=>{i&&i===m.type&&(h=Math.max(g,c),p=Math.min(g+m.nodeSize,d),u=g,f=m)}):r.doc.nodesBetween(c,d,(m,g)=>{g<c&&i&&i===m.type&&(h=Math.max(g,c),p=Math.min(g+m.nodeSize,d),u=g,f=m),g>=c&&g<=d&&(i&&i===m.type&&t.setNodeMarkup(g,void 0,{...m.attrs,...e}),o&&m.marks.length&&m.marks.forEach(y=>{if(o===y.type){const k=Math.max(g,c),A=Math.min(g+m.nodeSize,d);t.addMark(k,A,o.create({...y.attrs,...e}))}}))}),f&&(u!==void 0&&t.setNodeMarkup(u,void 0,{...f.attrs,...e}),o&&f.marks.length&&f.marks.forEach(m=>{o===m.type&&t.addMark(h,p,o.create({...m.attrs,...e}))}))}),!0):!1},Yp=(n,e={})=>({state:t,dispatch:r})=>{const s=q(n,t.schema);return Ch(s,e)(t,r)},Xp=(n,e={})=>({state:t,dispatch:r})=>{const s=q(n,t.schema);return xh(s,e)(t,r)};var Qp=Object.freeze({__proto__:null,blur:Ph,clearContent:Bh,clearNodes:zh,command:Hh,createParagraphNear:Fh,cut:$h,deleteCurrentNode:Vh,deleteNode:Wh,deleteRange:jh,deleteSelection:Kh,enter:Uh,exitCode:Jh,extendMarkRange:qh,first:_h,focus:Gh,forEach:Yh,insertContent:Xh,insertContentAt:Zh,joinBackward:np,joinDown:tp,joinForward:rp,joinItemBackward:sp,joinItemForward:ip,joinTextblockBackward:op,joinTextblockForward:lp,joinUp:ep,keyboardShortcut:cp,lift:dp,liftEmptyBlock:up,liftListItem:fp,newlineInCode:hp,resetAttributes:pp,scrollIntoView:mp,selectAll:gp,selectNodeBackward:yp,selectNodeForward:bp,selectParentNode:kp,selectTextblockEnd:Sp,selectTextblockStart:wp,setContent:Cp,setMark:Lp,setMeta:Pp,setNode:Bp,setNodeSelection:zp,setTextSelection:Hp,sinkListItem:Fp,splitBlock:$p,splitListItem:Vp,toggleList:Wp,toggleMark:jp,toggleNode:Kp,toggleWrap:Up,undoInputRule:Jp,unsetAllMarks:qp,unsetMark:_p,updateAttributes:Gp,wrapIn:Yp,wrapInList:Xp});const oc=U.create({name:"commands",addCommands(){return{...Qp}}}),lc=U.create({name:"drop",addProseMirrorPlugins(){return[new V({key:new _("tiptapDrop"),props:{handleDrop:(n,e,t,r)=>{this.editor.emit("drop",{editor:this.editor,event:e,slice:t,moved:r})}}})]}}),ac=U.create({name:"editable",addProseMirrorPlugins(){return[new V({key:new _("editable"),props:{editable:()=>this.editor.options.editable}})]}}),cc=U.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:n}=this;return[new V({key:new _("focusEvents"),props:{handleDOMEvents:{focus:(e,t)=>{n.isFocused=!0;const r=n.state.tr.setMeta("focus",{event:t}).setMeta("addToHistory",!1);return e.dispatch(r),!1},blur:(e,t)=>{n.isFocused=!1;const r=n.state.tr.setMeta("blur",{event:t}).setMeta("addToHistory",!1);return e.dispatch(r),!1}}}})]}}),dc=U.create({name:"keymap",addKeyboardShortcuts(){const n=()=>this.editor.commands.first(({commands:o})=>[()=>o.undoInputRule(),()=>o.command(({tr:l})=>{const{selection:a,doc:c}=l,{empty:d,$anchor:u}=a,{pos:f,parent:h}=u,p=u.parent.isTextblock&&f>0?l.doc.resolve(f-1):u,m=p.parent.type.spec.isolating,g=u.pos-u.parentOffset,y=m&&p.parent.childCount===1?g===u.pos:E.atStart(c).from===f;return!d||!h.type.isTextblock||h.textContent.length||!y||y&&u.parent.type.name==="paragraph"?!1:o.clearNodes()}),()=>o.deleteSelection(),()=>o.joinBackward(),()=>o.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:o})=>[()=>o.deleteSelection(),()=>o.deleteCurrentNode(),()=>o.joinForward(),()=>o.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:o})=>[()=>o.newlineInCode(),()=>o.createParagraphNear(),()=>o.liftEmptyBlock(),()=>o.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:n,"Mod-Backspace":n,"Shift-Backspace":n,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},s={...r},i={...r,"Ctrl-h":n,"Alt-Backspace":n,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return Sn()||ui()?i:s},addProseMirrorPlugins(){return[new V({key:new _("clearDocument"),appendTransaction:(n,e,t)=>{if(n.some(m=>m.getMeta("composition")))return;const r=n.some(m=>m.docChanged)&&!e.doc.eq(t.doc),s=n.some(m=>m.getMeta("preventClearDocument"));if(!r||s)return;const{empty:i,from:o,to:l}=e.selection,a=E.atStart(e.doc).from,c=E.atEnd(e.doc).to;if(i||!(o===a&&l===c)||!Mn(t.doc))return;const f=t.tr,h=hn({state:t,transaction:f}),{commands:p}=new pn({editor:this.editor,state:h});if(p.clearNodes(),!!f.steps.length)return f}})]}}),uc=U.create({name:"paste",addProseMirrorPlugins(){return[new V({key:new _("tiptapPaste"),props:{handlePaste:(n,e,t)=>{this.editor.emit("paste",{editor:this.editor,event:e,slice:t})}}})]}}),fc=U.create({name:"tabindex",addProseMirrorPlugins(){return[new V({key:new _("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}});var Zp=Object.freeze({__proto__:null,ClipboardTextSerializer:ja,Commands:oc,Drop:lc,Editable:ac,FocusEvents:cc,Keymap:dc,Paste:uc,Tabindex:fc});class ot{get name(){return this.node.type.name}constructor(e,t,r=!1,s=null){this.currentNode=null,this.actualDepth=null,this.isBlock=r,this.resolvedPos=e,this.editor=t,this.currentNode=s}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var e;return(e=this.actualDepth)!==null&&e!==void 0?e:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(e){let t=this.from,r=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can\u2019t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}t=this.from+1,r=this.to-1}this.editor.commands.insertContentAt({from:t,to:r},e)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;const e=this.resolvedPos.start(this.resolvedPos.depth-1),t=this.resolvedPos.doc.resolve(e);return new ot(t,this.editor)}get before(){let e=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.from-3)),new ot(e,this.editor)}get after(){let e=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.to+3)),new ot(e,this.editor)}get children(){const e=[];return this.node.content.forEach((t,r)=>{const s=t.isBlock&&!t.isTextblock,i=t.isAtom&&!t.isText,o=this.pos+r+(i?0:1),l=this.resolvedPos.doc.resolve(o);if(!s&&l.depth<=this.depth)return;const a=new ot(l,this.editor,s,s?t:null);s&&(a.actualDepth=this.depth+1),e.push(new ot(l,this.editor,s,s?t:null))}),e}get firstChild(){return this.children[0]||null}get lastChild(){const e=this.children;return e[e.length-1]||null}closest(e,t={}){let r=null,s=this.parent;for(;s&&!r;){if(s.node.type.name===e)if(Object.keys(t).length>0){const i=s.node.attrs,o=Object.keys(t);for(let l=0;l<o.length;l+=1){const a=o[l];if(i[a]!==t[a])break}}else r=s;s=s.parent}return r}querySelector(e,t={}){return this.querySelectorAll(e,t,!0)[0]||null}querySelectorAll(e,t={},r=!1){let s=[];if(!this.children||this.children.length===0)return s;const i=Object.keys(t);return this.children.forEach(o=>{r&&s.length>0||(o.node.type.name===e&&i.every(a=>t[a]===o.node.attrs[a])&&s.push(o),!(r&&s.length>0)&&(s=s.concat(o.querySelectorAll(e,t,r))))}),s}setAttribute(e){const{tr:t}=this.editor.state;t.setNodeMarkup(this.from,void 0,{...this.node.attrs,...e}),this.editor.view.dispatch(t)}}const em=`.ProseMirror {
16
16
  position: relative;
17
17
  }
18
18
 
@@ -86,14 +86,14 @@ img.ProseMirror-separator {
86
86
 
87
87
  .tippy-box[data-animation=fade][data-state=hidden] {
88
88
  opacity: 0
89
- }`;function Za(n,e,t){const r=document.querySelector(`style[data-tiptap-style${t?`-${t}`:""}]`);if(r!==null)return r;const s=document.createElement("style");return e&&s.setAttribute("nonce",e),s.setAttribute(`data-tiptap-style${t?`-${t}`:""}`,""),s.innerHTML=n,document.getElementsByTagName("head")[0].appendChild(s),s}class Wp extends gh{constructor(e={}){super(),this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:t})=>{throw t},onPaste:()=>null,onDrop:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("contentError",this.options.onContentError),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:t,slice:r,moved:s})=>this.options.onDrop(t,r,s)),this.on("paste",({event:t,slice:r})=>this.options.onPaste(t,r)),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=Za(Vp,this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},!(!this.view||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,t=!0){this.setOptions({editable:e}),t&&this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(e,t){const r=ei(t)?t(e,[...this.state.plugins]):[...this.state.plugins,e],s=this.state.reconfigure({plugins:r});return this.view.updateState(s),s}unregisterPlugin(e){if(this.isDestroyed)return;const t=this.state.plugins;let r=t;if([].concat(e).forEach(i=>{const o=typeof i=="string"?`${i}$`:i.key;r=t.filter(l=>!l.key.startsWith(o))}),t.length===r.length)return;const s=this.state.reconfigure({plugins:r});return this.view.updateState(s),s}createExtensionManager(){var e,t;const s=[...this.options.enableCoreExtensions?[_a,Ra.configure({blockSeparator:(t=(e=this.options.coreExtensionOptions)===null||e===void 0?void 0:e.clipboardTextSerializer)===null||t===void 0?void 0:t.blockSeparator}),Ua,Ga,Ya,Qa,qa,Xa].filter(i=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[i.name]!==!1:!0):[],...this.options.extensions].filter(i=>["extension","node","mark"].includes(i?.type));this.extensionManager=new Tt(s,this)}createCommandManager(){this.commandManager=new fn({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){var e;let t;try{t=fr(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(o){if(!(o instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(o.message))throw o;this.emit("contentError",{editor:this,error:o,disableCollaboration:()=>{this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(l=>l.name!=="collaboration"),this.createExtensionManager()}}),t=fr(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}const r=oi(t,this.options.autofocus);this.view=new Lf(this.options.element,{...this.options.editorProps,attributes:{role:"textbox",...(e=this.options.editorProps)===null||e===void 0?void 0:e.attributes},dispatchTransaction:this.dispatchTransaction.bind(this),state:Kt.create({doc:t,selection:r||void 0})});const s=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(s),this.createNodeViews(),this.prependClass();const i=this.view.dom;i.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;const t=this.capturedTransaction;return this.capturedTransaction=null,t}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}e.steps.forEach(o=>{var l;return(l=this.capturedTransaction)===null||l===void 0?void 0:l.step(o)});return}const t=this.state.apply(e),r=!this.state.selection.eq(t.selection);this.emit("beforeTransaction",{editor:this,transaction:e,nextState:t}),this.view.updateState(t),this.emit("transaction",{editor:this,transaction:e}),r&&this.emit("selectionUpdate",{editor:this,transaction:e});const s=e.getMeta("focus"),i=e.getMeta("blur");s&&this.emit("focus",{editor:this,event:s.event,transaction:e}),i&&this.emit("blur",{editor:this,event:i.event,transaction:e}),!(!e.docChanged||e.getMeta("preventUpdate"))&&this.emit("update",{editor:this,transaction:e})}getAttributes(e){return fi(this.state,e)}isActive(e,t){const r=typeof e=="string"?e:null,s=typeof e=="string"?t:e;return Wa(this.state,r,s)}getJSON(){return this.state.doc.toJSON()}getHTML(){return pn(this.state.doc.content,this.schema)}getText(e){const{blockSeparator:t=`
89
+ }`;function hc(n,e,t){const r=document.querySelector(`style[data-tiptap-style${t?`-${t}`:""}]`);if(r!==null)return r;const s=document.createElement("style");return e&&s.setAttribute("nonce",e),s.setAttribute(`data-tiptap-style${t?`-${t}`:""}`,""),s.innerHTML=n,document.getElementsByTagName("head")[0].appendChild(s),s}class tm extends Nh{constructor(e={}){super(),this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:t})=>{throw t},onPaste:()=>null,onDrop:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("contentError",this.options.onContentError),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:t,slice:r,moved:s})=>this.options.onDrop(t,r,s)),this.on("paste",({event:t,slice:r})=>this.options.onPaste(t,r)),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=hc(em,this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},!(!this.view||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,t=!0){this.setOptions({editable:e}),t&&this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(e,t){const r=si(t)?t(e,[...this.state.plugins]):[...this.state.plugins,e],s=this.state.reconfigure({plugins:r});return this.view.updateState(s),s}unregisterPlugin(e){if(this.isDestroyed)return;const t=this.state.plugins;let r=t;if([].concat(e).forEach(i=>{const o=typeof i=="string"?`${i}$`:i.key;r=t.filter(l=>!l.key.startsWith(o))}),t.length===r.length)return;const s=this.state.reconfigure({plugins:r});return this.view.updateState(s),s}createExtensionManager(){var e,t;const s=[...this.options.enableCoreExtensions?[ac,ja.configure({blockSeparator:(t=(e=this.options.coreExtensionOptions)===null||e===void 0?void 0:e.clipboardTextSerializer)===null||t===void 0?void 0:t.blockSeparator}),oc,cc,dc,fc,lc,uc].filter(i=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[i.name]!==!1:!0):[],...this.options.extensions].filter(i=>["extension","node","mark"].includes(i?.type));this.extensionManager=new At(s,this)}createCommandManager(){this.commandManager=new pn({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){var e;let t;try{t=ur(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(o){if(!(o instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(o.message))throw o;this.emit("contentError",{editor:this,error:o,disableCollaboration:()=>{this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(l=>l.name!=="collaboration"),this.createExtensionManager()}}),t=ur(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}const r=di(t,this.options.autofocus);this.view=new eh(this.options.element,{...this.options.editorProps,attributes:{role:"textbox",...(e=this.options.editorProps)===null||e===void 0?void 0:e.attributes},dispatchTransaction:this.dispatchTransaction.bind(this),state:Ut.create({doc:t,selection:r||void 0})});const s=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(s),this.createNodeViews(),this.prependClass();const i=this.view.dom;i.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;const t=this.capturedTransaction;return this.capturedTransaction=null,t}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}e.steps.forEach(o=>{var l;return(l=this.capturedTransaction)===null||l===void 0?void 0:l.step(o)});return}const t=this.state.apply(e),r=!this.state.selection.eq(t.selection);this.emit("beforeTransaction",{editor:this,transaction:e,nextState:t}),this.view.updateState(t),this.emit("transaction",{editor:this,transaction:e}),r&&this.emit("selectionUpdate",{editor:this,transaction:e});const s=e.getMeta("focus"),i=e.getMeta("blur");s&&this.emit("focus",{editor:this,event:s.event,transaction:e}),i&&this.emit("blur",{editor:this,event:i.event,transaction:e}),!(!e.docChanged||e.getMeta("preventUpdate"))&&this.emit("update",{editor:this,transaction:e})}getAttributes(e){return gi(this.state,e)}isActive(e,t){const r=typeof e=="string"?e:null,s=typeof e=="string"?t:e;return nc(this.state,r,s)}getJSON(){return this.state.doc.toJSON()}getHTML(){return gn(this.state.doc.content,this.schema)}getText(e){const{blockSeparator:t=`
90
90
 
91
- `,textSerializers:r={}}=e||{};return ui(this.state.doc,{blockSeparator:t,textSerializers:{...cr(this.schema),...r}})}get isEmpty(){return Cn(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){if(this.emit("destroy"),this.view){const e=this.view.dom;e&&e.editor&&delete e.editor,this.view.destroy()}this.removeAllListeners()}get isDestroyed(){var e;return!(!((e=this.view)===null||e===void 0)&&e.docView)}$node(e,t){var r;return((r=this.$doc)===null||r===void 0?void 0:r.querySelector(e,t))||null}$nodes(e,t){var r;return((r=this.$doc)===null||r===void 0?void 0:r.querySelectorAll(e,t))||null}$pos(e){const t=this.state.doc.resolve(e);return new it(t,this)}get $doc(){return this.$pos(0)}}function yt(n){return new zt({find:n.find,handler:({state:e,range:t,match:r})=>{const s=O(n.getAttributes,void 0,r);if(s===!1||s===null)return null;const{tr:i}=e,o=r[r.length-1],l=r[0];if(o){const a=l.search(/\S/),c=t.from+l.indexOf(o),d=c+o.length;if(pr(t.from,t.to,e.doc).filter(h=>h.mark.type.excluded.find(m=>m===n.type&&m!==h.mark.type)).filter(h=>h.to>c).length)return null;d<t.to&&i.delete(d,t.to),c>t.from&&i.delete(t.from+a,c);const f=t.from+a+o.length;i.addMark(t.from+a,f,n.type.create(s||{})),i.removeStoredMark(n.type)}}})}function gi(n){return new zt({find:n.find,handler:({state:e,range:t,match:r})=>{const s=O(n.getAttributes,void 0,r)||{},{tr:i}=e,o=t.from;let l=t.to;const a=n.type.create(s);if(r[1]){const c=r[0].lastIndexOf(r[1]);let d=o+c;d>l?d=l:l=d+r[1].length;const u=r[0][r[0].length-1];i.insertText(u,o+r[0].length-1),i.replaceWith(d,l,a)}else if(r[0]){const c=n.type.isInline?o:o-1;i.insert(c,n.type.create(s)).delete(i.mapping.map(o),i.mapping.map(l))}i.scrollIntoView()}})}function gr(n){return new zt({find:n.find,handler:({state:e,range:t,match:r})=>{const s=e.doc.resolve(t.from),i=O(n.getAttributes,void 0,r)||{};if(!s.node(-1).canReplaceWith(s.index(-1),s.indexAfter(-1),n.type))return null;e.tr.delete(t.from,t.to).setBlockType(t.from,t.from,n.type,i)}})}function jp(n){return new zt({find:n.find,handler:({state:e,range:t,match:r})=>{let s=n.replace,i=t.from;const o=t.to;if(r[1]){const l=r[0].lastIndexOf(r[1]);s+=r[0].slice(l+r[1].length),i+=l;const a=i-o;a>0&&(s=r[0].slice(l-a,l)+s,i=o)}e.tr.insertText(s,i,o)}})}function $t(n){return new zt({find:n.find,handler:({state:e,range:t,match:r,chain:s})=>{const i=O(n.getAttributes,void 0,r)||{},o=e.tr.delete(t.from,t.to),a=o.doc.resolve(t.from).blockRange(),c=a&&ks(a,n.type,i);if(!c)return null;if(o.wrap(a,c),n.keepMarks&&n.editor){const{selection:u,storedMarks:f}=e,{splittableMarks:h}=n.editor.extensionManager,p=f||u.$to.parentOffset&&u.$from.marks();if(p){const m=p.filter(g=>h.includes(g.type.name));o.ensureMarks(m)}}if(n.keepAttributes){const u=n.type.name==="bulletList"||n.type.name==="orderedList"?"listItem":"taskList";s().updateAttributes(u,i).run()}const d=o.doc.resolve(t.from-1).nodeBefore;d&&d.type===n.type&&je(o.doc,t.from-1)&&(!n.joinPredicate||n.joinPredicate(r,d))&&o.join(t.from-1)}})}class H{constructor(e={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=O(C(this,"addOptions",{name:this.name}))),this.storage=O(C(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new H(e)}configure(e={}){const t=this.extend({...this.config,addOptions:()=>gn(this.options,e)});return t.name=this.name,t.parent=this.parent,t}extend(e={}){const t=new H(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=O(C(t,"addOptions",{name:t.name})),t.storage=O(C(t,"addStorage",{name:t.name,options:t.options})),t}}function Kp(){return navigator.platform==="Android"||/android/i.test(navigator.userAgent)}class Jp{constructor(e,t,r){this.isDragging=!1,this.component=e,this.editor=t.editor,this.options={stopEvent:null,ignoreMutation:null,...r},this.extension=t.extension,this.node=t.node,this.decorations=t.decorations,this.innerDecorations=t.innerDecorations,this.view=t.view,this.HTMLAttributes=t.HTMLAttributes,this.getPos=t.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(e){var t,r,s,i,o,l,a;const{view:c}=this.editor,d=e.target,u=d.nodeType===3?(t=d.parentElement)===null||t===void 0?void 0:t.closest("[data-drag-handle]"):d.closest("[data-drag-handle]");if(!this.dom||!((r=this.contentDOM)===null||r===void 0)&&r.contains(d)||!u)return;let f=0,h=0;if(this.dom!==u){const y=this.dom.getBoundingClientRect(),k=u.getBoundingClientRect(),T=(s=e.offsetX)!==null&&s!==void 0?s:(i=e.nativeEvent)===null||i===void 0?void 0:i.offsetX,D=(o=e.offsetY)!==null&&o!==void 0?o:(l=e.nativeEvent)===null||l===void 0?void 0:l.offsetY;f=k.x-y.x+T,h=k.y-y.y+D}(a=e.dataTransfer)===null||a===void 0||a.setDragImage(this.dom,f,h);const p=this.getPos();if(typeof p!="number")return;const m=w.create(c.state.doc,p),g=c.state.tr.setSelection(m);c.dispatch(g)}stopEvent(e){var t;if(!this.dom)return!1;if(typeof this.options.stopEvent=="function")return this.options.stopEvent({event:e});const r=e.target;if(!(this.dom.contains(r)&&!(!((t=this.contentDOM)===null||t===void 0)&&t.contains(r))))return!1;const i=e.type.startsWith("drag"),o=e.type==="drop";if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(r.tagName)||r.isContentEditable)&&!o&&!i)return!0;const{isEditable:a}=this.editor,{isDragging:c}=this,d=!!this.node.type.spec.draggable,u=w.isSelectable(this.node),f=e.type==="copy",h=e.type==="paste",p=e.type==="cut",m=e.type==="mousedown";if(!d&&u&&i&&e.target===this.dom&&e.preventDefault(),d&&i&&!c&&e.target===this.dom)return e.preventDefault(),!1;if(d&&a&&!c&&m){const g=r.closest("[data-drag-handle]");g&&(this.dom===g||this.dom.contains(g))&&(this.isDragging=!0,document.addEventListener("dragend",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("drop",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("mouseup",()=>{this.isDragging=!1},{once:!0}))}return!(c||o||f||h||p||m&&u)}ignoreMutation(e){return!this.dom||!this.contentDOM?!0:typeof this.options.ignoreMutation=="function"?this.options.ignoreMutation({mutation:e}):this.node.isLeaf||this.node.isAtom?!0:e.type==="selection"||this.dom.contains(e.target)&&e.type==="childList"&&(ur()||Kp())&&this.editor.isFocused&&[...Array.from(e.addedNodes),...Array.from(e.removedNodes)].every(r=>r.isContentEditable)?!1:this.contentDOM===e.target&&e.type==="attributes"?!0:!this.contentDOM.contains(e.target)}updateAttributes(e){this.editor.commands.command(({tr:t})=>{const r=this.getPos();return typeof r!="number"?!1:(t.setNodeMarkup(r,void 0,{...this.node.attrs,...e}),!0)})}deleteNode(){const e=this.getPos();if(typeof e!="number")return;const t=e+this.node.nodeSize;this.editor.commands.deleteRange({from:e,to:t})}}function Ye(n){return new lr({find:n.find,handler:({state:e,range:t,match:r,pasteEvent:s})=>{const i=O(n.getAttributes,void 0,r,s);if(i===!1||i===null)return null;const{tr:o}=e,l=r[r.length-1],a=r[0];let c=t.to;if(l){const d=a.search(/\S/),u=t.from+a.indexOf(l),f=u+l.length;if(pr(t.from,t.to,e.doc).filter(p=>p.mark.type.excluded.find(g=>g===n.type&&g!==p.mark.type)).filter(p=>p.to>u).length)return null;f<t.to&&o.delete(f,t.to),u>t.from&&o.delete(t.from+d,u),c=t.from+d+l.length,o.addMark(t.from+d,c,n.type.create(i||{})),o.removeStoredMark(n.type)}}})}function Up(n){return n.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function qp(n){return typeof n=="string"}function _p(n){return new lr({find:n.find,handler({match:e,chain:t,range:r,pasteEvent:s}){const i=O(n.getAttributes,void 0,e,s),o=O(n.getContent,void 0,i);if(i===!1||i===null)return null;const l={type:n.type.name,attrs:i};o&&(l.content=o),e.input&&t().deleteRange(r).insertContentAt(r.from,l)}})}function Gp(n){return new lr({find:n.find,handler:({state:e,range:t,match:r})=>{let s=n.replace,i=t.from;const o=t.to;if(r[1]){const l=r[0].lastIndexOf(r[1]);s+=r[0].slice(l+r[1].length),i+=l;const a=i-o;a>0&&(s=r[0].slice(l-a,l)+s,i=o)}e.tr.insertText(s,i,o)}})}class Yp{constructor(e){this.transaction=e,this.currentStep=this.transaction.steps.length}map(e){let t=!1;return{position:this.transaction.steps.slice(this.currentStep).reduce((s,i)=>{const o=i.getMap().mapResult(s);return o.deleted&&(t=!0),o.pos},e),deleted:t}}}const Xp=/^\s*>\s$/,ec=H.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:n}){return["blockquote",v(this.options.HTMLAttributes,n),0]},addCommands(){return{setBlockquote:()=>({commands:n})=>n.wrapIn(this.name),toggleBlockquote:()=>({commands:n})=>n.toggleWrap(this.name),unsetBlockquote:()=>({commands:n})=>n.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[$t({find:Xp,type:this.type})]}}),Qp=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,Zp=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,em=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,tm=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,tc=ue.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:n=>n.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:n=>n.type.name===this.name},{style:"font-weight",getAttrs:n=>/^(bold(er)?|[5-9]\d{2,})$/.test(n)&&null}]},renderHTML({HTMLAttributes:n}){return["strong",v(this.options.HTMLAttributes,n),0]},addCommands(){return{setBold:()=>({commands:n})=>n.setMark(this.name),toggleBold:()=>({commands:n})=>n.toggleMark(this.name),unsetBold:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[yt({find:Qp,type:this.type}),yt({find:em,type:this.type})]},addPasteRules(){return[Ye({find:Zp,type:this.type}),Ye({find:tm,type:this.type})]}}),nm="listItem",nc="textStyle",rc=/^\s*([-+*])\s$/,sc=H.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:n}){return["ul",v(this.options.HTMLAttributes,n),0]},addCommands(){return{toggleBulletList:()=>({commands:n,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(nm,this.editor.getAttributes(nc)).run():n.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let n=$t({find:rc,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(n=$t({find:rc,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(nc),editor:this.editor})),[n]}}),rm=/(^|[^`])`([^`]+)`(?!`)/,sm=/(^|[^`])`([^`]+)`(?!`)/g,ic=ue.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:n}){return["code",v(this.options.HTMLAttributes,n),0]},addCommands(){return{setCode:()=>({commands:n})=>n.setMark(this.name),toggleCode:()=>({commands:n})=>n.toggleMark(this.name),unsetCode:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[yt({find:rm,type:this.type})]},addPasteRules(){return[Ye({find:sm,type:this.type})]}}),im=/^```([a-z]+)?[\s\n]$/,om=/^~~~([a-z]+)?[\s\n]$/,oc=H.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:n=>{var e;const{languageClassPrefix:t}=this.options,i=[...((e=n.firstElementChild)===null||e===void 0?void 0:e.classList)||[]].filter(o=>o.startsWith(t)).map(o=>o.replace(t,""))[0];return i||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:n,HTMLAttributes:e}){return["pre",v(this.options.HTMLAttributes,e),["code",{class:n.attrs.language?this.options.languageClassPrefix+n.attrs.language:null},0]]},addCommands(){return{setCodeBlock:n=>({commands:e})=>e.setNode(this.name,n),toggleCodeBlock:n=>({commands:e})=>e.toggleNode(this.name,"paragraph",n)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:n,$anchor:e}=this.editor.state.selection,t=e.pos===1;return!n||e.parent.type.name!==this.name?!1:t||!e.parent.textContent.length?this.editor.commands.clearNodes():!1},Enter:({editor:n})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:e}=n,{selection:t}=e,{$from:r,empty:s}=t;if(!s||r.parent.type!==this.type)return!1;const i=r.parentOffset===r.parent.nodeSize-2,o=r.parent.textContent.endsWith(`
91
+ `,textSerializers:r={}}=e||{};return mi(this.state.doc,{blockSeparator:t,textSerializers:{...cr(this.schema),...r}})}get isEmpty(){return Mn(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){if(this.emit("destroy"),this.view){const e=this.view.dom;e&&e.editor&&delete e.editor,this.view.destroy()}this.removeAllListeners()}get isDestroyed(){var e;return!(!((e=this.view)===null||e===void 0)&&e.docView)}$node(e,t){var r;return((r=this.$doc)===null||r===void 0?void 0:r.querySelector(e,t))||null}$nodes(e,t){var r;return((r=this.$doc)===null||r===void 0?void 0:r.querySelectorAll(e,t))||null}$pos(e){const t=this.state.doc.resolve(e);return new ot(t,this)}get $doc(){return this.$pos(0)}}function bt(n){return new zt({find:n.find,handler:({state:e,range:t,match:r})=>{const s=O(n.getAttributes,void 0,r);if(s===!1||s===null)return null;const{tr:i}=e,o=r[r.length-1],l=r[0];if(o){const a=l.search(/\S/),c=t.from+l.indexOf(o),d=c+o.length;if(hr(t.from,t.to,e.doc).filter(h=>h.mark.type.excluded.find(m=>m===n.type&&m!==h.mark.type)).filter(h=>h.to>c).length)return null;d<t.to&&i.delete(d,t.to),c>t.from&&i.delete(t.from+a,c);const f=t.from+a+o.length;i.addMark(t.from+a,f,n.type.create(s||{})),i.removeStoredMark(n.type)}}})}function Si(n){return new zt({find:n.find,handler:({state:e,range:t,match:r})=>{const s=O(n.getAttributes,void 0,r)||{},{tr:i}=e,o=t.from;let l=t.to;const a=n.type.create(s);if(r[1]){const c=r[0].lastIndexOf(r[1]);let d=o+c;d>l?d=l:l=d+r[1].length;const u=r[0][r[0].length-1];i.insertText(u,o+r[0].length-1),i.replaceWith(d,l,a)}else if(r[0]){const c=n.type.isInline?o:o-1;i.insert(c,n.type.create(s)).delete(i.mapping.map(o),i.mapping.map(l))}i.scrollIntoView()}})}function mr(n){return new zt({find:n.find,handler:({state:e,range:t,match:r})=>{const s=e.doc.resolve(t.from),i=O(n.getAttributes,void 0,r)||{};if(!s.node(-1).canReplaceWith(s.index(-1),s.indexAfter(-1),n.type))return null;e.tr.delete(t.from,t.to).setBlockType(t.from,t.from,n.type,i)}})}function nm(n){return new zt({find:n.find,handler:({state:e,range:t,match:r})=>{let s=n.replace,i=t.from;const o=t.to;if(r[1]){const l=r[0].lastIndexOf(r[1]);s+=r[0].slice(l+r[1].length),i+=l;const a=i-o;a>0&&(s=r[0].slice(l-a,l)+s,i=o)}e.tr.insertText(s,i,o)}})}function Vt(n){return new zt({find:n.find,handler:({state:e,range:t,match:r,chain:s})=>{const i=O(n.getAttributes,void 0,r)||{},o=e.tr.delete(t.from,t.to),a=o.doc.resolve(t.from).blockRange(),c=a&&ks(a,n.type,i);if(!c)return null;if(o.wrap(a,c),n.keepMarks&&n.editor){const{selection:u,storedMarks:f}=e,{splittableMarks:h}=n.editor.extensionManager,p=f||u.$to.parentOffset&&u.$from.marks();if(p){const m=p.filter(g=>h.includes(g.type.name));o.ensureMarks(m)}}if(n.keepAttributes){const u=n.type.name==="bulletList"||n.type.name==="orderedList"?"listItem":"taskList";s().updateAttributes(u,i).run()}const d=o.doc.resolve(t.from-1).nodeBefore;d&&d.type===n.type&&Ke(o.doc,t.from-1)&&(!n.joinPredicate||n.joinPredicate(r,d))&&o.join(t.from-1)}})}class ${constructor(e={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=O(C(this,"addOptions",{name:this.name}))),this.storage=O(C(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new $(e)}configure(e={}){const t=this.extend({...this.config,addOptions:()=>bn(this.options,e)});return t.name=this.name,t.parent=this.parent,t}extend(e={}){const t=new $(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=O(C(t,"addOptions",{name:t.name})),t.storage=O(C(t,"addStorage",{name:t.name,options:t.options})),t}}class rm{constructor(e,t,r){this.isDragging=!1,this.component=e,this.editor=t.editor,this.options={stopEvent:null,ignoreMutation:null,...r},this.extension=t.extension,this.node=t.node,this.decorations=t.decorations,this.innerDecorations=t.innerDecorations,this.view=t.view,this.HTMLAttributes=t.HTMLAttributes,this.getPos=t.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(e){var t,r,s,i,o,l,a;const{view:c}=this.editor,d=e.target,u=d.nodeType===3?(t=d.parentElement)===null||t===void 0?void 0:t.closest("[data-drag-handle]"):d.closest("[data-drag-handle]");if(!this.dom||!((r=this.contentDOM)===null||r===void 0)&&r.contains(d)||!u)return;let f=0,h=0;if(this.dom!==u){const y=this.dom.getBoundingClientRect(),k=u.getBoundingClientRect(),A=(s=e.offsetX)!==null&&s!==void 0?s:(i=e.nativeEvent)===null||i===void 0?void 0:i.offsetX,R=(o=e.offsetY)!==null&&o!==void 0?o:(l=e.nativeEvent)===null||l===void 0?void 0:l.offsetY;f=k.x-y.x+A,h=k.y-y.y+R}(a=e.dataTransfer)===null||a===void 0||a.setDragImage(this.dom,f,h);const p=this.getPos();if(typeof p!="number")return;const m=x.create(c.state.doc,p),g=c.state.tr.setSelection(m);c.dispatch(g)}stopEvent(e){var t;if(!this.dom)return!1;if(typeof this.options.stopEvent=="function")return this.options.stopEvent({event:e});const r=e.target;if(!(this.dom.contains(r)&&!(!((t=this.contentDOM)===null||t===void 0)&&t.contains(r))))return!1;const i=e.type.startsWith("drag"),o=e.type==="drop";if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(r.tagName)||r.isContentEditable)&&!o&&!i)return!0;const{isEditable:a}=this.editor,{isDragging:c}=this,d=!!this.node.type.spec.draggable,u=x.isSelectable(this.node),f=e.type==="copy",h=e.type==="paste",p=e.type==="cut",m=e.type==="mousedown";if(!d&&u&&i&&e.target===this.dom&&e.preventDefault(),d&&i&&!c&&e.target===this.dom)return e.preventDefault(),!1;if(d&&a&&!c&&m){const g=r.closest("[data-drag-handle]");g&&(this.dom===g||this.dom.contains(g))&&(this.isDragging=!0,document.addEventListener("dragend",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("drop",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("mouseup",()=>{this.isDragging=!1},{once:!0}))}return!(c||o||f||h||p||m&&u)}ignoreMutation(e){return!this.dom||!this.contentDOM?!0:typeof this.options.ignoreMutation=="function"?this.options.ignoreMutation({mutation:e}):this.node.isLeaf||this.node.isAtom?!0:e.type==="selection"||this.dom.contains(e.target)&&e.type==="childList"&&(Sn()||Ja())&&this.editor.isFocused&&[...Array.from(e.addedNodes),...Array.from(e.removedNodes)].every(r=>r.isContentEditable)?!1:this.contentDOM===e.target&&e.type==="attributes"?!0:!this.contentDOM.contains(e.target)}updateAttributes(e){this.editor.commands.command(({tr:t})=>{const r=this.getPos();return typeof r!="number"?!1:(t.setNodeMarkup(r,void 0,{...this.node.attrs,...e}),!0)})}deleteNode(){const e=this.getPos();if(typeof e!="number")return;const t=e+this.node.nodeSize;this.editor.commands.deleteRange({from:e,to:t})}}function Xe(n){return new lr({find:n.find,handler:({state:e,range:t,match:r,pasteEvent:s})=>{const i=O(n.getAttributes,void 0,r,s);if(i===!1||i===null)return null;const{tr:o}=e,l=r[r.length-1],a=r[0];let c=t.to;if(l){const d=a.search(/\S/),u=t.from+a.indexOf(l),f=u+l.length;if(hr(t.from,t.to,e.doc).filter(p=>p.mark.type.excluded.find(g=>g===n.type&&g!==p.mark.type)).filter(p=>p.to>u).length)return null;f<t.to&&o.delete(f,t.to),u>t.from&&o.delete(t.from+d,u),c=t.from+d+l.length,o.addMark(t.from+d,c,n.type.create(i||{})),o.removeStoredMark(n.type)}}})}function sm(n){return n.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function im(n){return typeof n=="string"}function om(n){return new lr({find:n.find,handler({match:e,chain:t,range:r,pasteEvent:s}){const i=O(n.getAttributes,void 0,e,s),o=O(n.getContent,void 0,i);if(i===!1||i===null)return null;const l={type:n.type.name,attrs:i};o&&(l.content=o),e.input&&t().deleteRange(r).insertContentAt(r.from,l)}})}function lm(n){return new lr({find:n.find,handler:({state:e,range:t,match:r})=>{let s=n.replace,i=t.from;const o=t.to;if(r[1]){const l=r[0].lastIndexOf(r[1]);s+=r[0].slice(l+r[1].length),i+=l;const a=i-o;a>0&&(s=r[0].slice(l-a,l)+s,i=o)}e.tr.insertText(s,i,o)}})}class am{constructor(e){this.transaction=e,this.currentStep=this.transaction.steps.length}map(e){let t=!1;return{position:this.transaction.steps.slice(this.currentStep).reduce((s,i)=>{const o=i.getMap().mapResult(s);return o.deleted&&(t=!0),o.pos},e),deleted:t}}}const cm=/^\s*>\s$/,pc=$.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:n}){return["blockquote",I(this.options.HTMLAttributes,n),0]},addCommands(){return{setBlockquote:()=>({commands:n})=>n.wrapIn(this.name),toggleBlockquote:()=>({commands:n})=>n.toggleWrap(this.name),unsetBlockquote:()=>({commands:n})=>n.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[Vt({find:cm,type:this.type})]}}),dm=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,um=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,fm=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,hm=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,mc=ce.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:n=>n.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:n=>n.type.name===this.name},{style:"font-weight",getAttrs:n=>/^(bold(er)?|[5-9]\d{2,})$/.test(n)&&null}]},renderHTML({HTMLAttributes:n}){return["strong",I(this.options.HTMLAttributes,n),0]},addCommands(){return{setBold:()=>({commands:n})=>n.setMark(this.name),toggleBold:()=>({commands:n})=>n.toggleMark(this.name),unsetBold:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[bt({find:dm,type:this.type}),bt({find:fm,type:this.type})]},addPasteRules(){return[Xe({find:um,type:this.type}),Xe({find:hm,type:this.type})]}}),pm="listItem",gc="textStyle",yc=/^\s*([-+*])\s$/,bc=$.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:n}){return["ul",I(this.options.HTMLAttributes,n),0]},addCommands(){return{toggleBulletList:()=>({commands:n,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(pm,this.editor.getAttributes(gc)).run():n.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let n=Vt({find:yc,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(n=Vt({find:yc,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(gc),editor:this.editor})),[n]}}),mm=/(^|[^`])`([^`]+)`(?!`)/,gm=/(^|[^`])`([^`]+)`(?!`)/g,kc=ce.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:n}){return["code",I(this.options.HTMLAttributes,n),0]},addCommands(){return{setCode:()=>({commands:n})=>n.setMark(this.name),toggleCode:()=>({commands:n})=>n.toggleMark(this.name),unsetCode:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[bt({find:mm,type:this.type})]},addPasteRules(){return[Xe({find:gm,type:this.type})]}}),ym=/^```([a-z]+)?[\s\n]$/,bm=/^~~~([a-z]+)?[\s\n]$/,Sc=$.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:n=>{var e;const{languageClassPrefix:t}=this.options,i=[...((e=n.firstElementChild)===null||e===void 0?void 0:e.classList)||[]].filter(o=>o.startsWith(t)).map(o=>o.replace(t,""))[0];return i||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:n,HTMLAttributes:e}){return["pre",I(this.options.HTMLAttributes,e),["code",{class:n.attrs.language?this.options.languageClassPrefix+n.attrs.language:null},0]]},addCommands(){return{setCodeBlock:n=>({commands:e})=>e.setNode(this.name,n),toggleCodeBlock:n=>({commands:e})=>e.toggleNode(this.name,"paragraph",n)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:n,$anchor:e}=this.editor.state.selection,t=e.pos===1;return!n||e.parent.type.name!==this.name?!1:t||!e.parent.textContent.length?this.editor.commands.clearNodes():!1},Enter:({editor:n})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:e}=n,{selection:t}=e,{$from:r,empty:s}=t;if(!s||r.parent.type!==this.type)return!1;const i=r.parentOffset===r.parent.nodeSize-2,o=r.parent.textContent.endsWith(`
92
92
 
93
- `);return!i||!o?!1:n.chain().command(({tr:l})=>(l.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:n})=>{if(!this.options.exitOnArrowDown)return!1;const{state:e}=n,{selection:t,doc:r}=e,{$from:s,empty:i}=t;if(!i||s.parent.type!==this.type||!(s.parentOffset===s.parent.nodeSize-2))return!1;const l=s.after();return l===void 0?!1:r.nodeAt(l)?n.commands.command(({tr:c})=>(c.setSelection(E.near(r.resolve(l))),!0)):n.commands.exitCode()}}},addInputRules(){return[gr({find:im,type:this.type,getAttributes:n=>({language:n[1]})}),gr({find:om,type:this.type,getAttributes:n=>({language:n[1]})})]},addProseMirrorPlugins(){return[new K({key:new Q("codeBlockVSCodeHandler"),props:{handlePaste:(n,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;const t=e.clipboardData.getData("text/plain"),r=e.clipboardData.getData("vscode-editor-data"),s=r?JSON.parse(r):void 0,i=s?.mode;if(!t||!i)return!1;const{tr:o,schema:l}=n.state,a=l.text(t.replace(/\r\n?/g,`
94
- `));return o.replaceSelectionWith(this.type.create({language:i},a)),o.selection.$from.parent.type!==this.type&&o.setSelection(A.near(o.doc.resolve(Math.max(0,o.selection.from-2)))),o.setMeta("paste",!0),n.dispatch(o),!0}}})]}}),lm=H.create({name:"doc",topNode:!0,content:"block+"});function am(n={}){return new K({view(e){return new cm(e,n)}})}class cm{constructor(e,t){var r;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=t.width)!==null&&r!==void 0?r:1,this.color=t.color===!1?void 0:t.color||"black",this.class=t.class,this.handlers=["dragover","dragend","drop","dragleave"].map(s=>{let i=o=>{this[s](o)};return e.dom.addEventListener(s,i),{name:s,handler:i}})}destroy(){this.handlers.forEach(({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t))}update(e,t){this.cursorPos!=null&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),t=!e.parent.inlineContent,r;if(t){let l=e.nodeBefore,a=e.nodeAfter;if(l||a){let c=this.editorView.nodeDOM(this.cursorPos-(l?l.nodeSize:0));if(c){let d=c.getBoundingClientRect(),u=l?d.bottom:d.top;l&&a&&(u=(u+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),r={left:d.left,right:d.right,top:u-this.width/2,bottom:u+this.width/2}}}}if(!r){let l=this.editorView.coordsAtPos(this.cursorPos);r={left:l.left-this.width/2,right:l.left+this.width/2,top:l.top,bottom:l.bottom}}let s=this.editorView.dom.offsetParent;this.element||(this.element=s.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",t),this.element.classList.toggle("prosemirror-dropcursor-inline",!t);let i,o;if(!s||s==document.body&&getComputedStyle(s).position=="static")i=-pageXOffset,o=-pageYOffset;else{let l=s.getBoundingClientRect();i=l.left-s.scrollLeft,o=l.top-s.scrollTop}this.element.style.left=r.left-i+"px",this.element.style.top=r.top-o+"px",this.element.style.width=r.right-r.left+"px",this.element.style.height=r.bottom-r.top+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),r=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),s=r&&r.type.spec.disableDropCursor,i=typeof s=="function"?s(this.editorView,t,e):s;if(t&&!i){let o=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let l=Vo(this.editorView.state.doc,o,this.editorView.dragging.slice);l!=null&&(o=l)}this.setCursor(o),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){(e.target==this.editorView.dom||!this.editorView.dom.contains(e.relatedTarget))&&this.setCursor(null)}}const dm=_.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[am(this.options)]}});class W extends E{constructor(e){super(e,e)}map(e,t){let r=e.resolve(t.map(this.head));return W.valid(r)?new W(r):E.near(r)}content(){return x.empty}eq(e){return e instanceof W&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new W(e.resolve(t.pos))}getBookmark(){return new eo(this.anchor)}static valid(e){let t=e.parent;if(t.isTextblock||!um(e)||!fm(e))return!1;let r=t.type.spec.allowGapCursor;if(r!=null)return r;let s=t.contentMatchAt(e.index()).defaultType;return s&&s.isTextblock}static findGapCursorFrom(e,t,r=!1){e:for(;;){if(!r&&W.valid(e))return e;let s=e.pos,i=null;for(let o=e.depth;;o--){let l=e.node(o);if(t>0?e.indexAfter(o)<l.childCount:e.index(o)>0){i=l.child(t>0?e.indexAfter(o):e.index(o)-1);break}else if(o==0)return null;s+=t;let a=e.doc.resolve(s);if(W.valid(a))return a}for(;;){let o=t>0?i.firstChild:i.lastChild;if(!o){if(i.isAtom&&!i.isText&&!w.isSelectable(i)){e=e.doc.resolve(s+i.nodeSize*t),r=!1;continue e}break}i=o,s+=t;let l=e.doc.resolve(s);if(W.valid(l))return l}return null}}}W.prototype.visible=!1,W.findFrom=W.findGapCursorFrom,E.jsonID("gapcursor",W);class eo{constructor(e){this.pos=e}map(e){return new eo(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return W.valid(t)?new W(t):E.near(t)}}function um(n){for(let e=n.depth;e>=0;e--){let t=n.index(e),r=n.node(e);if(t==0){if(r.type.spec.isolating)return!0;continue}for(let s=r.child(t-1);;s=s.lastChild){if(s.childCount==0&&!s.inlineContent||s.isAtom||s.type.spec.isolating)return!0;if(s.inlineContent)return!1}}return!0}function fm(n){for(let e=n.depth;e>=0;e--){let t=n.indexAfter(e),r=n.node(e);if(t==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let s=r.child(t);;s=s.firstChild){if(s.childCount==0&&!s.inlineContent||s.isAtom||s.type.spec.isolating)return!0;if(s.inlineContent)return!1}}return!0}function hm(){return new K({props:{decorations:ym,createSelectionBetween(n,e,t){return e.pos==t.pos&&W.valid(t)?new W(t):null},handleClick:mm,handleKeyDown:pm,handleDOMEvents:{beforeinput:gm}}})}const pm=Ys({ArrowLeft:yr("horiz",-1),ArrowRight:yr("horiz",1),ArrowUp:yr("vert",-1),ArrowDown:yr("vert",1)});function yr(n,e){const t=n=="vert"?e>0?"down":"up":e>0?"right":"left";return function(r,s,i){let o=r.selection,l=e>0?o.$to:o.$from,a=o.empty;if(o instanceof A){if(!i.endOfTextblock(t)||l.depth==0)return!1;a=!1,l=r.doc.resolve(e>0?l.after():l.before())}let c=W.findGapCursorFrom(l,e,a);return c?(s&&s(r.tr.setSelection(new W(c))),!0):!1}}function mm(n,e,t){if(!n||!n.editable)return!1;let r=n.state.doc.resolve(e);if(!W.valid(r))return!1;let s=n.posAtCoords({left:t.clientX,top:t.clientY});return s&&s.inside>-1&&w.isSelectable(n.state.doc.nodeAt(s.inside))?!1:(n.dispatch(n.state.tr.setSelection(new W(r))),!0)}function gm(n,e){if(e.inputType!="insertCompositionText"||!(n.state.selection instanceof W))return!1;let{$from:t}=n.state.selection,r=t.parent.contentMatchAt(t.index()).findWrapping(n.state.schema.nodes.text);if(!r)return!1;let s=b.empty;for(let o=r.length-1;o>=0;o--)s=b.from(r[o].createAndFill(null,s));let i=n.state.tr.replace(t.pos,t.pos,new x(s,0,0));return i.setSelection(A.near(i.doc.resolve(t.pos+1))),n.dispatch(i),!1}function ym(n){if(!(n.selection instanceof W))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",F.create(n.doc,[ie.widget(n.selection.head,e,{key:"gapcursor"})])}const bm=_.create({name:"gapCursor",addProseMirrorPlugins(){return[hm()]},extendNodeSchema(n){var e;const t={name:n.name,options:n.options,storage:n.storage};return{allowGapCursor:(e=O(C(n,"allowGapCursor",t)))!==null&&e!==void 0?e:null}}}),km=H.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:n}){return["br",v(this.options.HTMLAttributes,n)]},renderText(){return`
95
- `},addCommands(){return{setHardBreak:()=>({commands:n,chain:e,state:t,editor:r})=>n.first([()=>n.exitCode(),()=>n.command(()=>{const{selection:s,storedMarks:i}=t;if(s.$from.parent.type.spec.isolating)return!1;const{keepMarks:o}=this.options,{splittableMarks:l}=r.extensionManager,a=i||s.$to.parentOffset&&s.$from.marks();return e().insertContent({type:this.name}).command(({tr:c,dispatch:d})=>{if(d&&a&&o){const u=a.filter(f=>l.includes(f.type.name));c.ensureMarks(u)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),lc=H.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(n=>({tag:`h${n}`,attrs:{level:n}}))},renderHTML({node:n,HTMLAttributes:e}){return[`h${this.options.levels.includes(n.attrs.level)?n.attrs.level:this.options.levels[0]}`,v(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:n=>({commands:e})=>this.options.levels.includes(n.level)?e.setNode(this.name,n):!1,toggleHeading:n=>({commands:e})=>this.options.levels.includes(n.level)?e.toggleNode(this.name,"paragraph",n):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((n,e)=>({...n,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(n=>gr({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${n}})\\s$`),type:this.type,getAttributes:{level:n}}))}});var br=200,q=function(){};q.prototype.append=function(e){return e.length?(e=q.from(e),!this.length&&e||e.length<br&&this.leafAppend(e)||this.length<br&&e.leafPrepend(this)||this.appendInner(e)):this},q.prototype.prepend=function(e){return e.length?q.from(e).append(this):this},q.prototype.appendInner=function(e){return new Sm(this,e)},q.prototype.slice=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.length),e>=t?q.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},q.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},q.prototype.forEach=function(e,t,r){t===void 0&&(t=0),r===void 0&&(r=this.length),t<=r?this.forEachInner(e,t,r,0):this.forEachInvertedInner(e,t,r,0)},q.prototype.map=function(e,t,r){t===void 0&&(t=0),r===void 0&&(r=this.length);var s=[];return this.forEach(function(i,o){return s.push(e(i,o))},t,r),s},q.from=function(e){return e instanceof q?e:e&&e.length?new ac(e):q.empty};var ac=function(n){function e(r){n.call(this),this.values=r}e.__proto__=n,e.prototype=Object.create(n.prototype),e.prototype.constructor=e;var t={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(s,i){return s==0&&i==this.length?this:new e(this.values.slice(s,i))},e.prototype.getInner=function(s){return this.values[s]},e.prototype.forEachInner=function(s,i,o,l){for(var a=i;a<o;a++)if(s(this.values[a],l+a)===!1)return!1},e.prototype.forEachInvertedInner=function(s,i,o,l){for(var a=i-1;a>=o;a--)if(s(this.values[a],l+a)===!1)return!1},e.prototype.leafAppend=function(s){if(this.length+s.length<=br)return new e(this.values.concat(s.flatten()))},e.prototype.leafPrepend=function(s){if(this.length+s.length<=br)return new e(s.flatten().concat(this.values))},t.length.get=function(){return this.values.length},t.depth.get=function(){return 0},Object.defineProperties(e.prototype,t),e}(q);q.empty=new ac([]);var Sm=function(n){function e(t,r){n.call(this),this.left=t,this.right=r,this.length=t.length+r.length,this.depth=Math.max(t.depth,r.depth)+1}return e.__proto__=n,e.prototype=Object.create(n.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},e.prototype.forEachInner=function(r,s,i,o){var l=this.left.length;if(s<l&&this.left.forEachInner(r,s,Math.min(i,l),o)===!1||i>l&&this.right.forEachInner(r,Math.max(s-l,0),Math.min(this.length,i)-l,o+l)===!1)return!1},e.prototype.forEachInvertedInner=function(r,s,i,o){var l=this.left.length;if(s>l&&this.right.forEachInvertedInner(r,s-l,Math.max(i,l)-l,o+l)===!1||i<l&&this.left.forEachInvertedInner(r,Math.min(s,l),i,o)===!1)return!1},e.prototype.sliceInner=function(r,s){if(r==0&&s==this.length)return this;var i=this.left.length;return s<=i?this.left.slice(r,s):r>=i?this.right.slice(r-i,s-i):this.left.slice(r,i).append(this.right.slice(0,s-i))},e.prototype.leafAppend=function(r){var s=this.right.leafAppend(r);if(s)return new e(this.left,s)},e.prototype.leafPrepend=function(r){var s=this.left.leafPrepend(r);if(s)return new e(s,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e}(q);const xm=500;class Me{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let s,i;t&&(s=this.remapping(r,this.items.length),i=s.maps.length);let o=e.tr,l,a,c=[],d=[];return this.items.forEach((u,f)=>{if(!u.step){s||(s=this.remapping(r,f+1),i=s.maps.length),i--,d.push(u);return}if(s){d.push(new Ie(u.map));let h=u.step.map(s.slice(i)),p;h&&o.maybeStep(h).doc&&(p=o.mapping.maps[o.mapping.maps.length-1],c.push(new Ie(p,void 0,void 0,c.length+d.length))),i--,p&&s.appendMap(p,i)}else o.maybeStep(u.step);if(u.selection)return l=s?u.selection.map(s.slice(i)):u.selection,a=new Me(this.items.slice(0,r).append(d.reverse().concat(c)),this.eventCount-1),!1},this.items.length,0),{remaining:a,transform:o,selection:l}}addTransform(e,t,r,s){let i=[],o=this.eventCount,l=this.items,a=!s&&l.length?l.get(l.length-1):null;for(let d=0;d<e.steps.length;d++){let u=e.steps[d].invert(e.docs[d]),f=new Ie(e.mapping.maps[d],u,t),h;(h=a&&a.merge(f))&&(f=h,d?i.pop():l=l.slice(0,l.length-1)),i.push(f),t&&(o++,t=void 0),s||(a=f)}let c=o-r.depth;return c>wm&&(l=Cm(l,c),o-=c),new Me(l.append(i),o)}remapping(e,t){let r=new Jt;return this.items.forEach((s,i)=>{let o=s.mirrorOffset!=null&&i-s.mirrorOffset>=e?r.maps.length-s.mirrorOffset:void 0;r.appendMap(s.map,o)},e,t),r}addMaps(e){return this.eventCount==0?this:new Me(this.items.append(e.map(t=>new Ie(t))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let r=[],s=Math.max(0,this.items.length-t),i=e.mapping,o=e.steps.length,l=this.eventCount;this.items.forEach(f=>{f.selection&&l--},s);let a=t;this.items.forEach(f=>{let h=i.getMirror(--a);if(h==null)return;o=Math.min(o,h);let p=i.maps[h];if(f.step){let m=e.steps[h].invert(e.docs[h]),g=f.selection&&f.selection.map(i.slice(a+1,h));g&&l++,r.push(new Ie(p,m,g))}else r.push(new Ie(p))},s);let c=[];for(let f=t;f<o;f++)c.push(new Ie(i.maps[f]));let d=this.items.slice(0,s).append(c).append(r),u=new Me(d,l);return u.emptyItemCount()>xm&&(u=u.compress(this.items.length-r.length)),u}emptyItemCount(){let e=0;return this.items.forEach(t=>{t.step||e++}),e}compress(e=this.items.length){let t=this.remapping(0,e),r=t.maps.length,s=[],i=0;return this.items.forEach((o,l)=>{if(l>=e)s.push(o),o.selection&&i++;else if(o.step){let a=o.step.map(t.slice(r)),c=a&&a.getMap();if(r--,c&&t.appendMap(c,r),a){let d=o.selection&&o.selection.map(t.slice(r));d&&i++;let u=new Ie(c.invert(),a,d),f,h=s.length-1;(f=s.length&&s[h].merge(u))?s[h]=f:s.push(u)}}else o.map&&r--},this.items.length,0),new Me(q.from(s.reverse()),i)}}Me.empty=new Me(q.empty,0);function Cm(n,e){let t;return n.forEach((r,s)=>{if(r.selection&&e--==0)return t=s,!1}),n.slice(t)}class Ie{constructor(e,t,r,s){this.map=e,this.step=t,this.selection=r,this.mirrorOffset=s}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new Ie(t.getMap().invert(),t,this.selection)}}}class Xe{constructor(e,t,r,s,i){this.done=e,this.undone=t,this.prevRanges=r,this.prevTime=s,this.prevComposition=i}}const wm=20;function Mm(n,e,t,r){let s=t.getMeta(bt),i;if(s)return s.historyState;t.getMeta(Em)&&(n=new Xe(n.done,n.undone,null,0,-1));let o=t.getMeta("appendedTransaction");if(t.steps.length==0)return n;if(o&&o.getMeta(bt))return o.getMeta(bt).redo?new Xe(n.done.addTransform(t,void 0,r,kr(e)),n.undone,cc(t.mapping.maps),n.prevTime,n.prevComposition):new Xe(n.done,n.undone.addTransform(t,void 0,r,kr(e)),null,n.prevTime,n.prevComposition);if(t.getMeta("addToHistory")!==!1&&!(o&&o.getMeta("addToHistory")===!1)){let l=t.getMeta("composition"),a=n.prevTime==0||!o&&n.prevComposition!=l&&(n.prevTime<(t.time||0)-r.newGroupDelay||!Tm(t,n.prevRanges)),c=o?yi(n.prevRanges,t.mapping):cc(t.mapping.maps);return new Xe(n.done.addTransform(t,a?e.selection.getBookmark():void 0,r,kr(e)),Me.empty,c,t.time,l??n.prevComposition)}else return(i=t.getMeta("rebased"))?new Xe(n.done.rebased(t,i),n.undone.rebased(t,i),yi(n.prevRanges,t.mapping),n.prevTime,n.prevComposition):new Xe(n.done.addMaps(t.mapping.maps),n.undone.addMaps(t.mapping.maps),yi(n.prevRanges,t.mapping),n.prevTime,n.prevComposition)}function Tm(n,e){if(!e)return!1;if(!n.docChanged)return!0;let t=!1;return n.mapping.maps[0].forEach((r,s)=>{for(let i=0;i<e.length;i+=2)r<=e[i+1]&&s>=e[i]&&(t=!0)}),t}function cc(n){let e=[];for(let t=n.length-1;t>=0&&e.length==0;t--)n[t].forEach((r,s,i,o)=>e.push(i,o));return e}function yi(n,e){if(!n)return null;let t=[];for(let r=0;r<n.length;r+=2){let s=e.map(n[r],1),i=e.map(n[r+1],-1);s<=i&&t.push(s,i)}return t}function Am(n,e,t){let r=kr(e),s=bt.get(e).spec.config,i=(t?n.undone:n.done).popEvent(e,r);if(!i)return null;let o=i.selection.resolve(i.transform.doc),l=(t?n.done:n.undone).addTransform(i.transform,e.selection.getBookmark(),s,r),a=new Xe(t?l:i.remaining,t?i.remaining:l,null,0,-1);return i.transform.setSelection(o).setMeta(bt,{redo:t,historyState:a})}let bi=!1,dc=null;function kr(n){let e=n.plugins;if(dc!=e){bi=!1,dc=e;for(let t=0;t<e.length;t++)if(e[t].spec.historyPreserveItems){bi=!0;break}}return bi}const bt=new Q("history"),Em=new Q("closeHistory");function Om(n={}){return n={depth:n.depth||100,newGroupDelay:n.newGroupDelay||500},new K({key:bt,state:{init(){return new Xe(Me.empty,Me.empty,null,0,-1)},apply(e,t,r){return Mm(t,r,e,n)}},config:n,props:{handleDOMEvents:{beforeinput(e,t){let r=t.inputType,s=r=="historyUndo"?fc:r=="historyRedo"?hc:null;return s?(t.preventDefault(),s(e.state,e.dispatch)):!1}}}})}function uc(n,e){return(t,r)=>{let s=bt.getState(t);if(!s||(n?s.undone:s.done).eventCount==0)return!1;if(r){let i=Am(s,t,n);i&&r(e?i.scrollIntoView():i)}return!0}}const fc=uc(!1,!0),hc=uc(!0,!0),Nm=_.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:n,dispatch:e})=>fc(n,e),redo:()=>({state:n,dispatch:e})=>hc(n,e)}},addProseMirrorPlugins(){return[Om(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-\u044F":()=>this.editor.commands.undo(),"Shift-Mod-\u044F":()=>this.editor.commands.redo()}}}),pc=H.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:n}){return["hr",v(this.options.HTMLAttributes,n)]},addCommands(){return{setHorizontalRule:()=>({chain:n,state:e})=>{const{selection:t}=e,{$from:r,$to:s}=t,i=n();return r.parentOffset===0?i.insertContentAt({from:Math.max(r.pos-1,0),to:s.pos},{type:this.name}):ja(t)?i.insertContentAt(s.pos,{type:this.name}):i.insertContent({type:this.name}),i.command(({tr:o,dispatch:l})=>{var a;if(l){const{$to:c}=o.selection,d=c.end();if(c.nodeAfter)c.nodeAfter.isTextblock?o.setSelection(A.create(o.doc,c.pos+1)):c.nodeAfter.isBlock?o.setSelection(w.create(o.doc,c.pos)):o.setSelection(A.create(o.doc,c.pos));else{const u=(a=c.parent.type.contentMatch.defaultType)===null||a===void 0?void 0:a.create();u&&(o.insert(d,u),o.setSelection(A.create(o.doc,d+1)))}o.scrollIntoView()}return!0}).run()}}},addInputRules(){return[gi({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),Rm=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,Dm=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,Im=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,vm=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,mc=ue.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:n=>n.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:n=>n.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:n}){return["em",v(this.options.HTMLAttributes,n),0]},addCommands(){return{setItalic:()=>({commands:n})=>n.setMark(this.name),toggleItalic:()=>({commands:n})=>n.toggleMark(this.name),unsetItalic:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[yt({find:Rm,type:this.type}),yt({find:Im,type:this.type})]},addPasteRules(){return[Ye({find:Dm,type:this.type}),Ye({find:vm,type:this.type})]}}),gc=H.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:n}){return["li",v(this.options.HTMLAttributes,n),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),Pm="listItem",yc="textStyle",bc=/^(\d+)\.\s$/,kc=H.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:n=>n.hasAttribute("start")?parseInt(n.getAttribute("start")||"",10):1},type:{default:void 0,parseHTML:n=>n.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:n}){const{start:e,...t}=n;return e===1?["ol",v(this.options.HTMLAttributes,t),0]:["ol",v(this.options.HTMLAttributes,n),0]},addCommands(){return{toggleOrderedList:()=>({commands:n,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(Pm,this.editor.getAttributes(yc)).run():n.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let n=$t({find:bc,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(n=$t({find:bc,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(yc)}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1],editor:this.editor})),[n]}}),Lm=H.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:n}){return["p",v(this.options.HTMLAttributes,n),0]},addCommands(){return{setParagraph:()=>({commands:n})=>n.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),Bm=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,zm=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,Sc=ue.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:n=>n.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["s",v(this.options.HTMLAttributes,n),0]},addCommands(){return{setStrike:()=>({commands:n})=>n.setMark(this.name),toggleStrike:()=>({commands:n})=>n.toggleMark(this.name),unsetStrike:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[yt({find:Bm,type:this.type})]},addPasteRules(){return[Ye({find:zm,type:this.type})]}}),Hm=H.create({name:"text",group:"inline"}),Fm=_.create({name:"starterKit",addExtensions(){var n,e,t,r,s,i,o,l,a,c,d,u,f,h,p,m,g,y;const k=[];return this.options.bold!==!1&&k.push(tc.configure((n=this.options)===null||n===void 0?void 0:n.bold)),this.options.blockquote!==!1&&k.push(ec.configure((e=this.options)===null||e===void 0?void 0:e.blockquote)),this.options.bulletList!==!1&&k.push(sc.configure((t=this.options)===null||t===void 0?void 0:t.bulletList)),this.options.code!==!1&&k.push(ic.configure((r=this.options)===null||r===void 0?void 0:r.code)),this.options.codeBlock!==!1&&k.push(oc.configure((s=this.options)===null||s===void 0?void 0:s.codeBlock)),this.options.document!==!1&&k.push(lm.configure((i=this.options)===null||i===void 0?void 0:i.document)),this.options.dropcursor!==!1&&k.push(dm.configure((o=this.options)===null||o===void 0?void 0:o.dropcursor)),this.options.gapcursor!==!1&&k.push(bm.configure((l=this.options)===null||l===void 0?void 0:l.gapcursor)),this.options.hardBreak!==!1&&k.push(km.configure((a=this.options)===null||a===void 0?void 0:a.hardBreak)),this.options.heading!==!1&&k.push(lc.configure((c=this.options)===null||c===void 0?void 0:c.heading)),this.options.history!==!1&&k.push(Nm.configure((d=this.options)===null||d===void 0?void 0:d.history)),this.options.horizontalRule!==!1&&k.push(pc.configure((u=this.options)===null||u===void 0?void 0:u.horizontalRule)),this.options.italic!==!1&&k.push(mc.configure((f=this.options)===null||f===void 0?void 0:f.italic)),this.options.listItem!==!1&&k.push(gc.configure((h=this.options)===null||h===void 0?void 0:h.listItem)),this.options.orderedList!==!1&&k.push(kc.configure((p=this.options)===null||p===void 0?void 0:p.orderedList)),this.options.paragraph!==!1&&k.push(Lm.configure((m=this.options)===null||m===void 0?void 0:m.paragraph)),this.options.strike!==!1&&k.push(Sc.configure((g=this.options)===null||g===void 0?void 0:g.strike)),this.options.text!==!1&&k.push(Hm.configure((y=this.options)===null||y===void 0?void 0:y.text)),k}}),$m=_.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something \u2026",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new K({key:new Q("placeholder"),props:{decorations:({doc:n,selection:e})=>{const t=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=e,s=[];if(!t)return null;const i=this.editor.isEmpty;return n.descendants((o,l)=>{const a=r>=l&&r<=l+o.nodeSize,c=!o.isLeaf&&Cn(o);if((a||!this.options.showOnlyCurrent)&&c){const d=[this.options.emptyNodeClass];i&&d.push(this.options.emptyEditorClass);const u=ie.node(l,l+o.nodeSize,{class:d.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:o,pos:l,hasAnchor:a}):this.options.placeholder});s.push(u)}return this.options.includeChildren}),F.create(n,s)}}})]}}),Vm=n=>{if(!n.children.length)return;const e=n.querySelectorAll("span");e&&e.forEach(t=>{var r,s;const i=t.getAttribute("style"),o=(s=(r=t.parentElement)===null||r===void 0?void 0:r.closest("span"))===null||s===void 0?void 0:s.getAttribute("style");t.setAttribute("style",`${o};${i}`)})},Wm=ue.create({name:"textStyle",priority:101,addOptions(){return{HTMLAttributes:{},mergeNestedSpanStyles:!1}},parseHTML(){return[{tag:"span",getAttrs:n=>n.hasAttribute("style")?(this.options.mergeNestedSpanStyles&&Vm(n),{}):!1}]},renderHTML({HTMLAttributes:n}){return["span",v(this.options.HTMLAttributes,n),0]},addCommands(){return{removeEmptyTextStyle:()=>({tr:n})=>{const{selection:e}=n;return n.doc.nodesBetween(e.from,e.to,(t,r)=>{if(t.isTextblock)return!0;t.marks.filter(s=>s.type===this.type).some(s=>Object.values(s.attrs).some(i=>!!i))||n.removeMark(r,r+t.nodeSize,this.type)}),!0}}}}),jm=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,xc=H.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{}}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:n}){return["img",v(this.options.HTMLAttributes,n)]},addCommands(){return{setImage:n=>({commands:e})=>e.insertContent({type:this.name,attrs:n})}},addInputRules(){return[gi({find:jm,type:this.type,getAttributes:n=>{const[,,e,t,r]=n;return{src:t,alt:e,title:r}}})]}}),Km="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5m\xF6gensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",Jm="\u03B5\u03BB1\u03C52\u0431\u04331\u0435\u043B3\u0434\u0435\u0442\u04384\u0435\u044E2\u043A\u0430\u0442\u043E\u043B\u0438\u043A6\u043E\u043C3\u043C\u043A\u04342\u043E\u043D1\u0441\u043A\u0432\u04306\u043E\u043D\u043B\u0430\u0439\u043D5\u0440\u04333\u0440\u0443\u04412\u04442\u0441\u0430\u0439\u04423\u0440\u04313\u0443\u043A\u04403\u049B\u0430\u04373\u0570\u0561\u05753\u05D9\u05E9\u05E8\u05D0\u05DC5\u05E7\u05D5\u05DD3\u0627\u0628\u0648\u0638\u0628\u064A5\u0631\u0627\u0645\u0643\u06485\u0644\u0627\u0631\u062F\u06464\u0628\u062D\u0631\u064A\u06465\u062C\u0632\u0627\u0626\u06315\u0633\u0639\u0648\u062F\u064A\u06296\u0639\u0644\u064A\u0627\u06465\u0645\u063A\u0631\u06285\u0645\u0627\u0631\u0627\u062A5\u06CC\u0631\u0627\u06465\u0628\u0627\u0631\u062A2\u0632\u0627\u06314\u064A\u062A\u06433\u06BE\u0627\u0631\u062A5\u062A\u0648\u0646\u06334\u0633\u0648\u062F\u0627\u06463\u0631\u064A\u06295\u0634\u0628\u0643\u06294\u0639\u0631\u0627\u06422\u06282\u0645\u0627\u06464\u0641\u0644\u0633\u0637\u064A\u06466\u0642\u0637\u06313\u0643\u0627\u062B\u0648\u0644\u064A\u06436\u0648\u06453\u0645\u0635\u06312\u0644\u064A\u0633\u064A\u06275\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u06277\u0642\u06394\u0647\u0645\u0631\u0627\u06475\u067E\u0627\u06A9\u0633\u062A\u0627\u06467\u0680\u0627\u0631\u062A4\u0915\u0949\u092E3\u0928\u0947\u091F3\u092D\u093E\u0930\u09240\u092E\u094D3\u094B\u09245\u0938\u0902\u0917\u0920\u09285\u09AC\u09BE\u0982\u09B2\u09BE5\u09AD\u09BE\u09B0\u09A42\u09F0\u09A44\u0A2D\u0A3E\u0A30\u0A244\u0AAD\u0ABE\u0AB0\u0AA44\u0B2D\u0B3E\u0B30\u0B244\u0B87\u0BA8\u0BCD\u0BA4\u0BBF\u0BAF\u0BBE6\u0BB2\u0B99\u0BCD\u0B95\u0BC86\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD11\u0C2D\u0C3E\u0C30\u0C24\u0C4D5\u0CAD\u0CBE\u0CB0\u0CA44\u0D2D\u0D3E\u0D30\u0D24\u0D025\u0DBD\u0D82\u0D9A\u0DCF4\u0E04\u0E2D\u0E213\u0E44\u0E17\u0E223\u0EA5\u0EB2\u0EA73\u10D2\u10D42\u307F\u3093\u306A3\u30A2\u30DE\u30BE\u30F34\u30AF\u30E9\u30A6\u30C94\u30B0\u30FC\u30B0\u30EB4\u30B3\u30E02\u30B9\u30C8\u30A23\u30BB\u30FC\u30EB3\u30D5\u30A1\u30C3\u30B7\u30E7\u30F36\u30DD\u30A4\u30F3\u30C84\u4E16\u754C2\u4E2D\u4FE11\u56FD1\u570B1\u6587\u7F513\u4E9A\u9A6C\u900A3\u4F01\u4E1A2\u4F5B\u5C712\u4FE1\u606F2\u5065\u5EB72\u516B\u53662\u516C\u53F81\u76CA2\u53F0\u6E7E1\u70632\u5546\u57CE1\u5E971\u68072\u5609\u91CC0\u5927\u9152\u5E975\u5728\u7EBF2\u5927\u62FF2\u5929\u4E3B\u65593\u5A31\u4E502\u5BB6\u96FB2\u5E7F\u4E1C2\u5FAE\u535A2\u6148\u55842\u6211\u7231\u4F603\u624B\u673A2\u62DB\u80582\u653F\u52A11\u5E9C2\u65B0\u52A0\u57612\u95FB2\u65F6\u5C1A2\u66F8\u7C4D2\u673A\u67842\u6DE1\u9A6C\u95213\u6E38\u620F2\u6FB3\u95802\u70B9\u770B2\u79FB\u52A82\u7EC4\u7EC7\u673A\u67844\u7F51\u57401\u5E971\u7AD91\u7EDC2\u8054\u901A2\u8C37\u6B4C2\u8D2D\u72692\u901A\u8CA92\u96C6\u56E22\u96FB\u8A0A\u76C8\u79D14\u98DE\u5229\u6D663\u98DF\u54C12\u9910\u53852\u9999\u683C\u91CC\u62C93\u6E2F2\uB2F7\uB1371\uCEF42\uC0BC\uC1312\uD55C\uAD6D2",Vt=(n,e)=>{for(const t in e)n[t]=e[t];return n},ki="numeric",Si="ascii",xi="alpha",wn="asciinumeric",Mn="alphanumeric",Ci="domain",Cc="emoji",Um="scheme",qm="slashscheme",wi="whitespace";function _m(n,e){return n in e||(e[n]=[]),e[n]}function kt(n,e,t){e[ki]&&(e[wn]=!0,e[Mn]=!0),e[Si]&&(e[wn]=!0,e[xi]=!0),e[wn]&&(e[Mn]=!0),e[xi]&&(e[Mn]=!0),e[Mn]&&(e[Ci]=!0),e[Cc]&&(e[Ci]=!0);for(const r in e){const s=_m(r,t);s.indexOf(n)<0&&s.push(n)}}function Gm(n,e){const t={};for(const r in e)e[r].indexOf(n)>=0&&(t[r]=!0);return t}function de(n=null){this.j={},this.jr=[],this.jd=null,this.t=n}de.groups={},de.prototype={accepts(){return!!this.t},go(n){const e=this,t=e.j[n];if(t)return t;for(let r=0;r<e.jr.length;r++){const s=e.jr[r][0],i=e.jr[r][1];if(i&&s.test(n))return i}return e.jd},has(n,e=!1){return e?n in this.j:!!this.go(n)},ta(n,e,t,r){for(let s=0;s<n.length;s++)this.tt(n[s],e,t,r)},tr(n,e,t,r){r=r||de.groups;let s;return e&&e.j?s=e:(s=new de(e),t&&r&&kt(e,t,r)),this.jr.push([n,s]),s},ts(n,e,t,r){let s=this;const i=n.length;if(!i)return s;for(let o=0;o<i-1;o++)s=s.tt(n[o]);return s.tt(n[i-1],e,t,r)},tt(n,e,t,r){r=r||de.groups;const s=this;if(e&&e.j)return s.j[n]=e,e;const i=e;let o,l=s.go(n);if(l?(o=new de,Vt(o.j,l.j),o.jr.push.apply(o.jr,l.jr),o.jd=l.jd,o.t=l.t):o=new de,i){if(r)if(o.t&&typeof o.t=="string"){const a=Vt(Gm(o.t,r),t);kt(i,a,r)}else t&&kt(i,t,r);o.t=i}return s.j[n]=o,o}};const N=(n,e,t,r,s)=>n.ta(e,t,r,s),$=(n,e,t,r,s)=>n.tr(e,t,r,s),wc=(n,e,t,r,s)=>n.ts(e,t,r,s),S=(n,e,t,r,s)=>n.tt(e,t,r,s),He="WORD",Mi="UWORD",Mc="ASCIINUMERICAL",Tc="ALPHANUMERICAL",Tn="LOCALHOST",Ti="TLD",Ai="UTLD",Sr="SCHEME",Wt="SLASH_SCHEME",Ei="NUM",Oi="WS",Ni="NL",An="OPENBRACE",En="CLOSEBRACE",xr="OPENBRACKET",Cr="CLOSEBRACKET",wr="OPENPAREN",Mr="CLOSEPAREN",Tr="OPENANGLEBRACKET",Ar="CLOSEANGLEBRACKET",Er="FULLWIDTHLEFTPAREN",Or="FULLWIDTHRIGHTPAREN",Nr="LEFTCORNERBRACKET",Rr="RIGHTCORNERBRACKET",Dr="LEFTWHITECORNERBRACKET",Ir="RIGHTWHITECORNERBRACKET",vr="FULLWIDTHLESSTHAN",Pr="FULLWIDTHGREATERTHAN",Lr="AMPERSAND",Ri="APOSTROPHE",Br="ASTERISK",Qe="AT",zr="BACKSLASH",Hr="BACKTICK",Fr="CARET",Ze="COLON",Di="COMMA",$r="DOLLAR",Ne="DOT",Vr="EQUALS",Ii="EXCLAMATION",be="HYPHEN",On="PERCENT",Wr="PIPE",jr="PLUS",Kr="POUND",Nn="QUERY",vi="QUOTE",Ac="FULLWIDTHMIDDLEDOT",Pi="SEMI",Re="SLASH",Rn="TILDE",Jr="UNDERSCORE",Ec="EMOJI",Ur="SYM";var Oc=Object.freeze({__proto__:null,WORD:He,UWORD:Mi,ASCIINUMERICAL:Mc,ALPHANUMERICAL:Tc,LOCALHOST:Tn,TLD:Ti,UTLD:Ai,SCHEME:Sr,SLASH_SCHEME:Wt,NUM:Ei,WS:Oi,NL:Ni,OPENBRACE:An,CLOSEBRACE:En,OPENBRACKET:xr,CLOSEBRACKET:Cr,OPENPAREN:wr,CLOSEPAREN:Mr,OPENANGLEBRACKET:Tr,CLOSEANGLEBRACKET:Ar,FULLWIDTHLEFTPAREN:Er,FULLWIDTHRIGHTPAREN:Or,LEFTCORNERBRACKET:Nr,RIGHTCORNERBRACKET:Rr,LEFTWHITECORNERBRACKET:Dr,RIGHTWHITECORNERBRACKET:Ir,FULLWIDTHLESSTHAN:vr,FULLWIDTHGREATERTHAN:Pr,AMPERSAND:Lr,APOSTROPHE:Ri,ASTERISK:Br,AT:Qe,BACKSLASH:zr,BACKTICK:Hr,CARET:Fr,COLON:Ze,COMMA:Di,DOLLAR:$r,DOT:Ne,EQUALS:Vr,EXCLAMATION:Ii,HYPHEN:be,PERCENT:On,PIPE:Wr,PLUS:jr,POUND:Kr,QUERY:Nn,QUOTE:vi,FULLWIDTHMIDDLEDOT:Ac,SEMI:Pi,SLASH:Re,TILDE:Rn,UNDERSCORE:Jr,EMOJI:Ec,SYM:Ur});const Fe=/[a-z]/,Dn=/\p{L}/u,Li=/\p{Emoji}/u,$e=/\d/,Bi=/\s/,Nc="\r",zi=`
96
- `,Ym="\uFE0F",Xm="\u200D",Hi="\uFFFC";let qr=null,_r=null;function Qm(n=[]){const e={};de.groups=e;const t=new de;qr==null&&(qr=Dc(Km)),_r==null&&(_r=Dc(Jm)),S(t,"'",Ri),S(t,"{",An),S(t,"}",En),S(t,"[",xr),S(t,"]",Cr),S(t,"(",wr),S(t,")",Mr),S(t,"<",Tr),S(t,">",Ar),S(t,"\uFF08",Er),S(t,"\uFF09",Or),S(t,"\u300C",Nr),S(t,"\u300D",Rr),S(t,"\u300E",Dr),S(t,"\u300F",Ir),S(t,"\uFF1C",vr),S(t,"\uFF1E",Pr),S(t,"&",Lr),S(t,"*",Br),S(t,"@",Qe),S(t,"`",Hr),S(t,"^",Fr),S(t,":",Ze),S(t,",",Di),S(t,"$",$r),S(t,".",Ne),S(t,"=",Vr),S(t,"!",Ii),S(t,"-",be),S(t,"%",On),S(t,"|",Wr),S(t,"+",jr),S(t,"#",Kr),S(t,"?",Nn),S(t,'"',vi),S(t,"/",Re),S(t,";",Pi),S(t,"~",Rn),S(t,"_",Jr),S(t,"\\",zr),S(t,"\u30FB",Ac);const r=$(t,$e,Ei,{[ki]:!0});$(r,$e,r);const s=$(r,Fe,Mc,{[wn]:!0}),i=$(r,Dn,Tc,{[Mn]:!0}),o=$(t,Fe,He,{[Si]:!0});$(o,$e,s),$(o,Fe,o),$(s,$e,s),$(s,Fe,s);const l=$(t,Dn,Mi,{[xi]:!0});$(l,Fe),$(l,$e,i),$(l,Dn,l),$(i,$e,i),$(i,Fe),$(i,Dn,i);const a=S(t,zi,Ni,{[wi]:!0}),c=S(t,Nc,Oi,{[wi]:!0}),d=$(t,Bi,Oi,{[wi]:!0});S(t,Hi,d),S(c,zi,a),S(c,Hi,d),$(c,Bi,d),S(d,Nc),S(d,zi),$(d,Bi,d),S(d,Hi,d);const u=$(t,Li,Ec,{[Cc]:!0});S(u,"#"),$(u,Li,u),S(u,Ym,u);const f=S(u,Xm);S(f,"#"),$(f,Li,u);const h=[[Fe,o],[$e,s]],p=[[Fe,null],[Dn,l],[$e,i]];for(let m=0;m<qr.length;m++)et(t,qr[m],Ti,He,h);for(let m=0;m<_r.length;m++)et(t,_r[m],Ai,Mi,p);kt(Ti,{tld:!0,ascii:!0},e),kt(Ai,{utld:!0,alpha:!0},e),et(t,"file",Sr,He,h),et(t,"mailto",Sr,He,h),et(t,"http",Wt,He,h),et(t,"https",Wt,He,h),et(t,"ftp",Wt,He,h),et(t,"ftps",Wt,He,h),kt(Sr,{scheme:!0,ascii:!0},e),kt(Wt,{slashscheme:!0,ascii:!0},e),n=n.sort((m,g)=>m[0]>g[0]?1:-1);for(let m=0;m<n.length;m++){const g=n[m][0],k=n[m][1]?{[Um]:!0}:{[qm]:!0};g.indexOf("-")>=0?k[Ci]=!0:Fe.test(g)?$e.test(g)?k[wn]=!0:k[Si]=!0:k[ki]=!0,wc(t,g,g,k)}return wc(t,"localhost",Tn,{ascii:!0}),t.jd=new de(Ur),{start:t,tokens:Vt({groups:e},Oc)}}function Rc(n,e){const t=Zm(e.replace(/[A-Z]/g,l=>l.toLowerCase())),r=t.length,s=[];let i=0,o=0;for(;o<r;){let l=n,a=null,c=0,d=null,u=-1,f=-1;for(;o<r&&(a=l.go(t[o]));)l=a,l.accepts()?(u=0,f=0,d=l):u>=0&&(u+=t[o].length,f++),c+=t[o].length,i+=t[o].length,o++;i-=u,o-=f,c-=u,s.push({t:d.t,v:e.slice(i-c,i),s:i-c,e:i})}return s}function Zm(n){const e=[],t=n.length;let r=0;for(;r<t;){let s=n.charCodeAt(r),i,o=s<55296||s>56319||r+1===t||(i=n.charCodeAt(r+1))<56320||i>57343?n[r]:n.slice(r,r+2);e.push(o),r+=o.length}return e}function et(n,e,t,r,s){let i;const o=e.length;for(let l=0;l<o-1;l++){const a=e[l];n.j[a]?i=n.j[a]:(i=new de(r),i.jr=s.slice(),n.j[a]=i),n=i}return i=new de(t),i.jr=s.slice(),n.j[e[o-1]]=i,i}function Dc(n){const e=[],t=[];let r=0,s="0123456789";for(;r<n.length;){let i=0;for(;s.indexOf(n[r+i])>=0;)i++;if(i>0){e.push(t.join(""));for(let o=parseInt(n.substring(r,r+i),10);o>0;o--)t.pop();r+=i}else t.push(n[r]),r++}return e}const In={defaultProtocol:"http",events:null,format:Ic,formatHref:Ic,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function Fi(n,e=null){let t=Vt({},In);n&&(t=Vt(t,n instanceof Fi?n.o:n));const r=t.ignoreTags,s=[];for(let i=0;i<r.length;i++)s.push(r[i].toUpperCase());this.o=t,e&&(this.defaultRender=e),this.ignoreTags=s}Fi.prototype={o:In,ignoreTags:[],defaultRender(n){return n},check(n){return this.get("validate",n.toString(),n)},get(n,e,t){const r=e!=null;let s=this.o[n];return s&&(typeof s=="object"?(s=t.t in s?s[t.t]:In[n],typeof s=="function"&&r&&(s=s(e,t))):typeof s=="function"&&r&&(s=s(e,t.t,t)),s)},getObj(n,e,t){let r=this.o[n];return typeof r=="function"&&e!=null&&(r=r(e,t.t,t)),r},render(n){const e=n.render(this);return(this.get("render",null,n)||this.defaultRender)(e,n.t,n)}};function Ic(n){return n}function vc(n,e){this.t="token",this.v=n,this.tk=e}vc.prototype={isLink:!1,toString(){return this.v},toHref(n){return this.toString()},toFormattedString(n){const e=this.toString(),t=n.get("truncate",e,this),r=n.get("format",e,this);return t&&r.length>t?r.substring(0,t)+"\u2026":r},toFormattedHref(n){return n.get("formatHref",this.toHref(n.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(n=In.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(n),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(n){return{type:this.t,value:this.toFormattedString(n),isLink:this.isLink,href:this.toFormattedHref(n),start:this.startIndex(),end:this.endIndex()}},validate(n){return n.get("validate",this.toString(),this)},render(n){const e=this,t=this.toHref(n.get("defaultProtocol")),r=n.get("formatHref",t,this),s=n.get("tagName",t,e),i=this.toFormattedString(n),o={},l=n.get("className",t,e),a=n.get("target",t,e),c=n.get("rel",t,e),d=n.getObj("attributes",t,e),u=n.getObj("events",t,e);return o.href=r,l&&(o.class=l),a&&(o.target=a),c&&(o.rel=c),d&&Vt(o,d),{tagName:s,attributes:o,content:i,eventListeners:u}}};function Gr(n,e){class t extends vc{constructor(s,i){super(s,i),this.t=n}}for(const r in e)t.prototype[r]=e[r];return t.t=n,t}const Pc=Gr("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),Lc=Gr("text"),eg=Gr("nl"),Yr=Gr("url",{isLink:!0,toHref(n=In.defaultProtocol){return this.hasProtocol()?this.v:`${n}://${this.v}`},hasProtocol(){const n=this.tk;return n.length>=2&&n[0].t!==Tn&&n[1].t===Ze}}),ke=n=>new de(n);function tg({groups:n}){const e=n.domain.concat([Lr,Br,Qe,zr,Hr,Fr,$r,Vr,be,Ei,On,Wr,jr,Kr,Re,Ur,Rn,Jr]),t=[Ze,Di,Ne,Ii,On,Nn,vi,Pi,Tr,Ar,An,En,Cr,xr,wr,Mr,Er,Or,Nr,Rr,Dr,Ir,vr,Pr],r=[Lr,Ri,Br,zr,Hr,Fr,$r,Vr,be,An,En,On,Wr,jr,Kr,Nn,Re,Ur,Rn,Jr],s=ke(),i=S(s,Rn);N(i,r,i),N(i,n.domain,i);const o=ke(),l=ke(),a=ke();N(s,n.domain,o),N(s,n.scheme,l),N(s,n.slashscheme,a),N(o,r,i),N(o,n.domain,o);const c=S(o,Qe);S(i,Qe,c),S(l,Qe,c),S(a,Qe,c);const d=S(i,Ne);N(d,r,i),N(d,n.domain,i);const u=ke();N(c,n.domain,u),N(u,n.domain,u);const f=S(u,Ne);N(f,n.domain,u);const h=ke(Pc);N(f,n.tld,h),N(f,n.utld,h),S(c,Tn,h);const p=S(u,be);S(p,be,p),N(p,n.domain,u),N(h,n.domain,u),S(h,Ne,f),S(h,be,p);const m=S(h,Ze);N(m,n.numeric,Pc);const g=S(o,be),y=S(o,Ne);S(g,be,g),N(g,n.domain,o),N(y,r,i),N(y,n.domain,o);const k=ke(Yr);N(y,n.tld,k),N(y,n.utld,k),N(k,n.domain,o),N(k,r,i),S(k,Ne,y),S(k,be,g),S(k,Qe,c);const T=S(k,Ze),D=ke(Yr);N(T,n.numeric,D);const M=ke(Yr),R=ke();N(M,e,M),N(M,t,R),N(R,e,M),N(R,t,R),S(k,Re,M),S(D,Re,M);const z=S(l,Ze),j=S(a,Ze),I=S(j,Re),pe=S(I,Re);N(l,n.domain,o),S(l,Ne,y),S(l,be,g),N(a,n.domain,o),S(a,Ne,y),S(a,be,g),N(z,n.domain,M),S(z,Re,M),S(z,Nn,M),N(pe,n.domain,M),N(pe,e,M),S(pe,Re,M);const at=[[An,En],[xr,Cr],[wr,Mr],[Tr,Ar],[Er,Or],[Nr,Rr],[Dr,Ir],[vr,Pr]];for(let _t=0;_t<at.length;_t++){const[to,ds]=at[_t],Bn=S(M,to);S(R,to,Bn),S(Bn,ds,M);const At=ke(Yr);N(Bn,e,At);const Gt=ke();N(Bn,t),N(At,e,At),N(At,t,Gt),N(Gt,e,At),N(Gt,t,Gt),S(At,ds,M),S(Gt,ds,M)}return S(s,Tn,k),S(s,Ni,eg),{start:s,tokens:Oc}}function ng(n,e,t){let r=t.length,s=0,i=[],o=[];for(;s<r;){let l=n,a=null,c=null,d=0,u=null,f=-1;for(;s<r&&!(a=l.go(t[s].t));)o.push(t[s++]);for(;s<r&&(c=a||l.go(t[s].t));)a=null,l=c,l.accepts()?(f=0,u=l):f>=0&&f++,s++,d++;if(f<0)s-=d,s<r&&(o.push(t[s]),s++);else{o.length>0&&(i.push($i(Lc,e,o)),o=[]),s-=f,d-=f;const h=u.t,p=t.slice(s-d,s);i.push($i(h,e,p))}}return o.length>0&&i.push($i(Lc,e,o)),i}function $i(n,e,t){const r=t[0].s,s=t[t.length-1].e,i=e.slice(r,s);return new n(i,t)}const rg=typeof console<"u"&&console&&console.warn||(()=>{}),sg="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",B={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function ig(){return de.groups={},B.scanner=null,B.parser=null,B.tokenQueue=[],B.pluginQueue=[],B.customSchemes=[],B.initialized=!1,B}function Bc(n,e=!1){if(B.initialized&&rg(`linkifyjs: already initialized - will not register custom scheme "${n}" ${sg}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(n))throw new Error(`linkifyjs: incorrect scheme format.
93
+ `);return!i||!o?!1:n.chain().command(({tr:l})=>(l.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:n})=>{if(!this.options.exitOnArrowDown)return!1;const{state:e}=n,{selection:t,doc:r}=e,{$from:s,empty:i}=t;if(!i||s.parent.type!==this.type||!(s.parentOffset===s.parent.nodeSize-2))return!1;const l=s.after();return l===void 0?!1:r.nodeAt(l)?n.commands.command(({tr:c})=>(c.setSelection(E.near(r.resolve(l))),!0)):n.commands.exitCode()}}},addInputRules(){return[mr({find:ym,type:this.type,getAttributes:n=>({language:n[1]})}),mr({find:bm,type:this.type,getAttributes:n=>({language:n[1]})})]},addProseMirrorPlugins(){return[new V({key:new _("codeBlockVSCodeHandler"),props:{handlePaste:(n,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;const t=e.clipboardData.getData("text/plain"),r=e.clipboardData.getData("vscode-editor-data"),s=r?JSON.parse(r):void 0,i=s?.mode;if(!t||!i)return!1;const{tr:o,schema:l}=n.state,a=l.text(t.replace(/\r\n?/g,`
94
+ `));return o.replaceSelectionWith(this.type.create({language:i},a)),o.selection.$from.parent.type!==this.type&&o.setSelection(T.near(o.doc.resolve(Math.max(0,o.selection.from-2)))),o.setMeta("paste",!0),n.dispatch(o),!0}}})]}}),km=$.create({name:"doc",topNode:!0,content:"block+"});function Sm(n={}){return new V({view(e){return new wm(e,n)}})}class wm{constructor(e,t){var r;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=t.width)!==null&&r!==void 0?r:1,this.color=t.color===!1?void 0:t.color||"black",this.class=t.class,this.handlers=["dragover","dragend","drop","dragleave"].map(s=>{let i=o=>{this[s](o)};return e.dom.addEventListener(s,i),{name:s,handler:i}})}destroy(){this.handlers.forEach(({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t))}update(e,t){this.cursorPos!=null&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),t=!e.parent.inlineContent,r;if(t){let l=e.nodeBefore,a=e.nodeAfter;if(l||a){let c=this.editorView.nodeDOM(this.cursorPos-(l?l.nodeSize:0));if(c){let d=c.getBoundingClientRect(),u=l?d.bottom:d.top;l&&a&&(u=(u+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),r={left:d.left,right:d.right,top:u-this.width/2,bottom:u+this.width/2}}}}if(!r){let l=this.editorView.coordsAtPos(this.cursorPos);r={left:l.left-this.width/2,right:l.left+this.width/2,top:l.top,bottom:l.bottom}}let s=this.editorView.dom.offsetParent;this.element||(this.element=s.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",t),this.element.classList.toggle("prosemirror-dropcursor-inline",!t);let i,o;if(!s||s==document.body&&getComputedStyle(s).position=="static")i=-pageXOffset,o=-pageYOffset;else{let l=s.getBoundingClientRect();i=l.left-s.scrollLeft,o=l.top-s.scrollTop}this.element.style.left=r.left-i+"px",this.element.style.top=r.top-o+"px",this.element.style.width=r.right-r.left+"px",this.element.style.height=r.bottom-r.top+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),r=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),s=r&&r.type.spec.disableDropCursor,i=typeof s=="function"?s(this.editorView,t,e):s;if(t&&!i){let o=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let l=Go(this.editorView.state.doc,o,this.editorView.dragging.slice);l!=null&&(o=l)}this.setCursor(o),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){(e.target==this.editorView.dom||!this.editorView.dom.contains(e.relatedTarget))&&this.setCursor(null)}}const Cm=U.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[Sm(this.options)]}});class j extends E{constructor(e){super(e,e)}map(e,t){let r=e.resolve(t.map(this.head));return j.valid(r)?new j(r):E.near(r)}content(){return w.empty}eq(e){return e instanceof j&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new j(e.resolve(t.pos))}getBookmark(){return new ao(this.anchor)}static valid(e){let t=e.parent;if(t.isTextblock||!xm(e)||!Mm(e))return!1;let r=t.type.spec.allowGapCursor;if(r!=null)return r;let s=t.contentMatchAt(e.index()).defaultType;return s&&s.isTextblock}static findGapCursorFrom(e,t,r=!1){e:for(;;){if(!r&&j.valid(e))return e;let s=e.pos,i=null;for(let o=e.depth;;o--){let l=e.node(o);if(t>0?e.indexAfter(o)<l.childCount:e.index(o)>0){i=l.child(t>0?e.indexAfter(o):e.index(o)-1);break}else if(o==0)return null;s+=t;let a=e.doc.resolve(s);if(j.valid(a))return a}for(;;){let o=t>0?i.firstChild:i.lastChild;if(!o){if(i.isAtom&&!i.isText&&!x.isSelectable(i)){e=e.doc.resolve(s+i.nodeSize*t),r=!1;continue e}break}i=o,s+=t;let l=e.doc.resolve(s);if(j.valid(l))return l}return null}}}j.prototype.visible=!1,j.findFrom=j.findGapCursorFrom,E.jsonID("gapcursor",j);class ao{constructor(e){this.pos=e}map(e){return new ao(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return j.valid(t)?new j(t):E.near(t)}}function xm(n){for(let e=n.depth;e>=0;e--){let t=n.index(e),r=n.node(e);if(t==0){if(r.type.spec.isolating)return!0;continue}for(let s=r.child(t-1);;s=s.lastChild){if(s.childCount==0&&!s.inlineContent||s.isAtom||s.type.spec.isolating)return!0;if(s.inlineContent)return!1}}return!0}function Mm(n){for(let e=n.depth;e>=0;e--){let t=n.indexAfter(e),r=n.node(e);if(t==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let s=r.child(t);;s=s.firstChild){if(s.childCount==0&&!s.inlineContent||s.isAtom||s.type.spec.isolating)return!0;if(s.inlineContent)return!1}}return!0}function Tm(){return new V({props:{decorations:Nm,createSelectionBetween(n,e,t){return e.pos==t.pos&&j.valid(t)?new j(t):null},handleClick:Em,handleKeyDown:Am,handleDOMEvents:{beforeinput:Om}}})}const Am=Xs({ArrowLeft:gr("horiz",-1),ArrowRight:gr("horiz",1),ArrowUp:gr("vert",-1),ArrowDown:gr("vert",1)});function gr(n,e){const t=n=="vert"?e>0?"down":"up":e>0?"right":"left";return function(r,s,i){let o=r.selection,l=e>0?o.$to:o.$from,a=o.empty;if(o instanceof T){if(!i.endOfTextblock(t)||l.depth==0)return!1;a=!1,l=r.doc.resolve(e>0?l.after():l.before())}let c=j.findGapCursorFrom(l,e,a);return c?(s&&s(r.tr.setSelection(new j(c))),!0):!1}}function Em(n,e,t){if(!n||!n.editable)return!1;let r=n.state.doc.resolve(e);if(!j.valid(r))return!1;let s=n.posAtCoords({left:t.clientX,top:t.clientY});return s&&s.inside>-1&&x.isSelectable(n.state.doc.nodeAt(s.inside))?!1:(n.dispatch(n.state.tr.setSelection(new j(r))),!0)}function Om(n,e){if(e.inputType!="insertCompositionText"||!(n.state.selection instanceof j))return!1;let{$from:t}=n.state.selection,r=t.parent.contentMatchAt(t.index()).findWrapping(n.state.schema.nodes.text);if(!r)return!1;let s=b.empty;for(let o=r.length-1;o>=0;o--)s=b.from(r[o].createAndFill(null,s));let i=n.state.tr.replace(t.pos,t.pos,new w(s,0,0));return i.setSelection(T.near(i.doc.resolve(t.pos+1))),n.dispatch(i),!1}function Nm(n){if(!(n.selection instanceof j))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",z.create(n.doc,[X.widget(n.selection.head,e,{key:"gapcursor"})])}const vm=U.create({name:"gapCursor",addProseMirrorPlugins(){return[Tm()]},extendNodeSchema(n){var e;const t={name:n.name,options:n.options,storage:n.storage};return{allowGapCursor:(e=O(C(n,"allowGapCursor",t)))!==null&&e!==void 0?e:null}}}),Rm=$.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:n}){return["br",I(this.options.HTMLAttributes,n)]},renderText(){return`
95
+ `},addCommands(){return{setHardBreak:()=>({commands:n,chain:e,state:t,editor:r})=>n.first([()=>n.exitCode(),()=>n.command(()=>{const{selection:s,storedMarks:i}=t;if(s.$from.parent.type.spec.isolating)return!1;const{keepMarks:o}=this.options,{splittableMarks:l}=r.extensionManager,a=i||s.$to.parentOffset&&s.$from.marks();return e().insertContent({type:this.name}).command(({tr:c,dispatch:d})=>{if(d&&a&&o){const u=a.filter(f=>l.includes(f.type.name));c.ensureMarks(u)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),wc=$.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(n=>({tag:`h${n}`,attrs:{level:n}}))},renderHTML({node:n,HTMLAttributes:e}){return[`h${this.options.levels.includes(n.attrs.level)?n.attrs.level:this.options.levels[0]}`,I(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:n=>({commands:e})=>this.options.levels.includes(n.level)?e.setNode(this.name,n):!1,toggleHeading:n=>({commands:e})=>this.options.levels.includes(n.level)?e.toggleNode(this.name,"paragraph",n):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((n,e)=>({...n,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(n=>mr({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${n}})\\s$`),type:this.type,getAttributes:{level:n}}))}});var yr=200,G=function(){};G.prototype.append=function(e){return e.length?(e=G.from(e),!this.length&&e||e.length<yr&&this.leafAppend(e)||this.length<yr&&e.leafPrepend(this)||this.appendInner(e)):this},G.prototype.prepend=function(e){return e.length?G.from(e).append(this):this},G.prototype.appendInner=function(e){return new Dm(this,e)},G.prototype.slice=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.length),e>=t?G.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},G.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},G.prototype.forEach=function(e,t,r){t===void 0&&(t=0),r===void 0&&(r=this.length),t<=r?this.forEachInner(e,t,r,0):this.forEachInvertedInner(e,t,r,0)},G.prototype.map=function(e,t,r){t===void 0&&(t=0),r===void 0&&(r=this.length);var s=[];return this.forEach(function(i,o){return s.push(e(i,o))},t,r),s},G.from=function(e){return e instanceof G?e:e&&e.length?new Cc(e):G.empty};var Cc=function(n){function e(r){n.call(this),this.values=r}n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e;var t={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(s,i){return s==0&&i==this.length?this:new e(this.values.slice(s,i))},e.prototype.getInner=function(s){return this.values[s]},e.prototype.forEachInner=function(s,i,o,l){for(var a=i;a<o;a++)if(s(this.values[a],l+a)===!1)return!1},e.prototype.forEachInvertedInner=function(s,i,o,l){for(var a=i-1;a>=o;a--)if(s(this.values[a],l+a)===!1)return!1},e.prototype.leafAppend=function(s){if(this.length+s.length<=yr)return new e(this.values.concat(s.flatten()))},e.prototype.leafPrepend=function(s){if(this.length+s.length<=yr)return new e(s.flatten().concat(this.values))},t.length.get=function(){return this.values.length},t.depth.get=function(){return 0},Object.defineProperties(e.prototype,t),e}(G);G.empty=new Cc([]);var Dm=function(n){function e(t,r){n.call(this),this.left=t,this.right=r,this.length=t.length+r.length,this.depth=Math.max(t.depth,r.depth)+1}return n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},e.prototype.forEachInner=function(r,s,i,o){var l=this.left.length;if(s<l&&this.left.forEachInner(r,s,Math.min(i,l),o)===!1||i>l&&this.right.forEachInner(r,Math.max(s-l,0),Math.min(this.length,i)-l,o+l)===!1)return!1},e.prototype.forEachInvertedInner=function(r,s,i,o){var l=this.left.length;if(s>l&&this.right.forEachInvertedInner(r,s-l,Math.max(i,l)-l,o+l)===!1||i<l&&this.left.forEachInvertedInner(r,Math.min(s,l),i,o)===!1)return!1},e.prototype.sliceInner=function(r,s){if(r==0&&s==this.length)return this;var i=this.left.length;return s<=i?this.left.slice(r,s):r>=i?this.right.slice(r-i,s-i):this.left.slice(r,i).append(this.right.slice(0,s-i))},e.prototype.leafAppend=function(r){var s=this.right.leafAppend(r);if(s)return new e(this.left,s)},e.prototype.leafPrepend=function(r){var s=this.left.leafPrepend(r);if(s)return new e(s,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e}(G);const Im=500;class xe{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let s,i;t&&(s=this.remapping(r,this.items.length),i=s.maps.length);let o=e.tr,l,a,c=[],d=[];return this.items.forEach((u,f)=>{if(!u.step){s||(s=this.remapping(r,f+1),i=s.maps.length),i--,d.push(u);return}if(s){d.push(new Re(u.map));let h=u.step.map(s.slice(i)),p;h&&o.maybeStep(h).doc&&(p=o.mapping.maps[o.mapping.maps.length-1],c.push(new Re(p,void 0,void 0,c.length+d.length))),i--,p&&s.appendMap(p,i)}else o.maybeStep(u.step);if(u.selection)return l=s?u.selection.map(s.slice(i)):u.selection,a=new xe(this.items.slice(0,r).append(d.reverse().concat(c)),this.eventCount-1),!1},this.items.length,0),{remaining:a,transform:o,selection:l}}addTransform(e,t,r,s){let i=[],o=this.eventCount,l=this.items,a=!s&&l.length?l.get(l.length-1):null;for(let d=0;d<e.steps.length;d++){let u=e.steps[d].invert(e.docs[d]),f=new Re(e.mapping.maps[d],u,t),h;(h=a&&a.merge(f))&&(f=h,d?i.pop():l=l.slice(0,l.length-1)),i.push(f),t&&(o++,t=void 0),s||(a=f)}let c=o-r.depth;return c>Pm&&(l=Lm(l,c),o-=c),new xe(l.append(i),o)}remapping(e,t){let r=new Jt;return this.items.forEach((s,i)=>{let o=s.mirrorOffset!=null&&i-s.mirrorOffset>=e?r.maps.length-s.mirrorOffset:void 0;r.appendMap(s.map,o)},e,t),r}addMaps(e){return this.eventCount==0?this:new xe(this.items.append(e.map(t=>new Re(t))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let r=[],s=Math.max(0,this.items.length-t),i=e.mapping,o=e.steps.length,l=this.eventCount;this.items.forEach(f=>{f.selection&&l--},s);let a=t;this.items.forEach(f=>{let h=i.getMirror(--a);if(h==null)return;o=Math.min(o,h);let p=i.maps[h];if(f.step){let m=e.steps[h].invert(e.docs[h]),g=f.selection&&f.selection.map(i.slice(a+1,h));g&&l++,r.push(new Re(p,m,g))}else r.push(new Re(p))},s);let c=[];for(let f=t;f<o;f++)c.push(new Re(i.maps[f]));let d=this.items.slice(0,s).append(c).append(r),u=new xe(d,l);return u.emptyItemCount()>Im&&(u=u.compress(this.items.length-r.length)),u}emptyItemCount(){let e=0;return this.items.forEach(t=>{t.step||e++}),e}compress(e=this.items.length){let t=this.remapping(0,e),r=t.maps.length,s=[],i=0;return this.items.forEach((o,l)=>{if(l>=e)s.push(o),o.selection&&i++;else if(o.step){let a=o.step.map(t.slice(r)),c=a&&a.getMap();if(r--,c&&t.appendMap(c,r),a){let d=o.selection&&o.selection.map(t.slice(r));d&&i++;let u=new Re(c.invert(),a,d),f,h=s.length-1;(f=s.length&&s[h].merge(u))?s[h]=f:s.push(u)}}else o.map&&r--},this.items.length,0),new xe(G.from(s.reverse()),i)}}xe.empty=new xe(G.empty,0);function Lm(n,e){let t;return n.forEach((r,s)=>{if(r.selection&&e--==0)return t=s,!1}),n.slice(t)}class Re{constructor(e,t,r,s){this.map=e,this.step=t,this.selection=r,this.mirrorOffset=s}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new Re(t.getMap().invert(),t,this.selection)}}}class Qe{constructor(e,t,r,s,i){this.done=e,this.undone=t,this.prevRanges=r,this.prevTime=s,this.prevComposition=i}}const Pm=20;function Bm(n,e,t,r){let s=t.getMeta(kt),i;if(s)return s.historyState;t.getMeta(Fm)&&(n=new Qe(n.done,n.undone,null,0,-1));let o=t.getMeta("appendedTransaction");if(t.steps.length==0)return n;if(o&&o.getMeta(kt))return o.getMeta(kt).redo?new Qe(n.done.addTransform(t,void 0,r,br(e)),n.undone,xc(t.mapping.maps),n.prevTime,n.prevComposition):new Qe(n.done,n.undone.addTransform(t,void 0,r,br(e)),null,n.prevTime,n.prevComposition);if(t.getMeta("addToHistory")!==!1&&!(o&&o.getMeta("addToHistory")===!1)){let l=t.getMeta("composition"),a=n.prevTime==0||!o&&n.prevComposition!=l&&(n.prevTime<(t.time||0)-r.newGroupDelay||!zm(t,n.prevRanges)),c=o?wi(n.prevRanges,t.mapping):xc(t.mapping.maps);return new Qe(n.done.addTransform(t,a?e.selection.getBookmark():void 0,r,br(e)),xe.empty,c,t.time,l??n.prevComposition)}else return(i=t.getMeta("rebased"))?new Qe(n.done.rebased(t,i),n.undone.rebased(t,i),wi(n.prevRanges,t.mapping),n.prevTime,n.prevComposition):new Qe(n.done.addMaps(t.mapping.maps),n.undone.addMaps(t.mapping.maps),wi(n.prevRanges,t.mapping),n.prevTime,n.prevComposition)}function zm(n,e){if(!e)return!1;if(!n.docChanged)return!0;let t=!1;return n.mapping.maps[0].forEach((r,s)=>{for(let i=0;i<e.length;i+=2)r<=e[i+1]&&s>=e[i]&&(t=!0)}),t}function xc(n){let e=[];for(let t=n.length-1;t>=0&&e.length==0;t--)n[t].forEach((r,s,i,o)=>e.push(i,o));return e}function wi(n,e){if(!n)return null;let t=[];for(let r=0;r<n.length;r+=2){let s=e.map(n[r],1),i=e.map(n[r+1],-1);s<=i&&t.push(s,i)}return t}function Hm(n,e,t){let r=br(e),s=kt.get(e).spec.config,i=(t?n.undone:n.done).popEvent(e,r);if(!i)return null;let o=i.selection.resolve(i.transform.doc),l=(t?n.done:n.undone).addTransform(i.transform,e.selection.getBookmark(),s,r),a=new Qe(t?l:i.remaining,t?i.remaining:l,null,0,-1);return i.transform.setSelection(o).setMeta(kt,{redo:t,historyState:a})}let Ci=!1,Mc=null;function br(n){let e=n.plugins;if(Mc!=e){Ci=!1,Mc=e;for(let t=0;t<e.length;t++)if(e[t].spec.historyPreserveItems){Ci=!0;break}}return Ci}const kt=new _("history"),Fm=new _("closeHistory");function $m(n={}){return n={depth:n.depth||100,newGroupDelay:n.newGroupDelay||500},new V({key:kt,state:{init(){return new Qe(xe.empty,xe.empty,null,0,-1)},apply(e,t,r){return Bm(t,r,e,n)}},config:n,props:{handleDOMEvents:{beforeinput(e,t){let r=t.inputType,s=r=="historyUndo"?Ac:r=="historyRedo"?Ec:null;return s?(t.preventDefault(),s(e.state,e.dispatch)):!1}}}})}function Tc(n,e){return(t,r)=>{let s=kt.getState(t);if(!s||(n?s.undone:s.done).eventCount==0)return!1;if(r){let i=Hm(s,t,n);i&&r(e?i.scrollIntoView():i)}return!0}}const Ac=Tc(!1,!0),Ec=Tc(!0,!0),Vm=U.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:n,dispatch:e})=>Ac(n,e),redo:()=>({state:n,dispatch:e})=>Ec(n,e)}},addProseMirrorPlugins(){return[$m(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-\u044F":()=>this.editor.commands.undo(),"Shift-Mod-\u044F":()=>this.editor.commands.redo()}}}),Oc=$.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:n}){return["hr",I(this.options.HTMLAttributes,n)]},addCommands(){return{setHorizontalRule:()=>({chain:n,state:e})=>{const{selection:t}=e,{$from:r,$to:s}=t,i=n();return r.parentOffset===0?i.insertContentAt({from:Math.max(r.pos-1,0),to:s.pos},{type:this.name}):rc(t)?i.insertContentAt(s.pos,{type:this.name}):i.insertContent({type:this.name}),i.command(({tr:o,dispatch:l})=>{var a;if(l){const{$to:c}=o.selection,d=c.end();if(c.nodeAfter)c.nodeAfter.isTextblock?o.setSelection(T.create(o.doc,c.pos+1)):c.nodeAfter.isBlock?o.setSelection(x.create(o.doc,c.pos)):o.setSelection(T.create(o.doc,c.pos));else{const u=(a=c.parent.type.contentMatch.defaultType)===null||a===void 0?void 0:a.create();u&&(o.insert(d,u),o.setSelection(T.create(o.doc,d+1)))}o.scrollIntoView()}return!0}).run()}}},addInputRules(){return[Si({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),Wm=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,jm=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,Km=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,Um=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,Nc=ce.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:n=>n.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:n=>n.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:n}){return["em",I(this.options.HTMLAttributes,n),0]},addCommands(){return{setItalic:()=>({commands:n})=>n.setMark(this.name),toggleItalic:()=>({commands:n})=>n.toggleMark(this.name),unsetItalic:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[bt({find:Wm,type:this.type}),bt({find:Km,type:this.type})]},addPasteRules(){return[Xe({find:jm,type:this.type}),Xe({find:Um,type:this.type})]}}),vc=$.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:n}){return["li",I(this.options.HTMLAttributes,n),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),Jm="listItem",Rc="textStyle",Dc=/^(\d+)\.\s$/,Ic=$.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:n=>n.hasAttribute("start")?parseInt(n.getAttribute("start")||"",10):1},type:{default:void 0,parseHTML:n=>n.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:n}){const{start:e,...t}=n;return e===1?["ol",I(this.options.HTMLAttributes,t),0]:["ol",I(this.options.HTMLAttributes,n),0]},addCommands(){return{toggleOrderedList:()=>({commands:n,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(Jm,this.editor.getAttributes(Rc)).run():n.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let n=Vt({find:Dc,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(n=Vt({find:Dc,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(Rc)}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1],editor:this.editor})),[n]}}),qm=$.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:n}){return["p",I(this.options.HTMLAttributes,n),0]},addCommands(){return{setParagraph:()=>({commands:n})=>n.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),_m=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,Gm=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,Lc=ce.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:n=>n.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["s",I(this.options.HTMLAttributes,n),0]},addCommands(){return{setStrike:()=>({commands:n})=>n.setMark(this.name),toggleStrike:()=>({commands:n})=>n.toggleMark(this.name),unsetStrike:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[bt({find:_m,type:this.type})]},addPasteRules(){return[Xe({find:Gm,type:this.type})]}}),Ym=$.create({name:"text",group:"inline"}),Xm=U.create({name:"starterKit",addExtensions(){var n,e,t,r,s,i,o,l,a,c,d,u,f,h,p,m,g,y;const k=[];return this.options.bold!==!1&&k.push(mc.configure((n=this.options)===null||n===void 0?void 0:n.bold)),this.options.blockquote!==!1&&k.push(pc.configure((e=this.options)===null||e===void 0?void 0:e.blockquote)),this.options.bulletList!==!1&&k.push(bc.configure((t=this.options)===null||t===void 0?void 0:t.bulletList)),this.options.code!==!1&&k.push(kc.configure((r=this.options)===null||r===void 0?void 0:r.code)),this.options.codeBlock!==!1&&k.push(Sc.configure((s=this.options)===null||s===void 0?void 0:s.codeBlock)),this.options.document!==!1&&k.push(km.configure((i=this.options)===null||i===void 0?void 0:i.document)),this.options.dropcursor!==!1&&k.push(Cm.configure((o=this.options)===null||o===void 0?void 0:o.dropcursor)),this.options.gapcursor!==!1&&k.push(vm.configure((l=this.options)===null||l===void 0?void 0:l.gapcursor)),this.options.hardBreak!==!1&&k.push(Rm.configure((a=this.options)===null||a===void 0?void 0:a.hardBreak)),this.options.heading!==!1&&k.push(wc.configure((c=this.options)===null||c===void 0?void 0:c.heading)),this.options.history!==!1&&k.push(Vm.configure((d=this.options)===null||d===void 0?void 0:d.history)),this.options.horizontalRule!==!1&&k.push(Oc.configure((u=this.options)===null||u===void 0?void 0:u.horizontalRule)),this.options.italic!==!1&&k.push(Nc.configure((f=this.options)===null||f===void 0?void 0:f.italic)),this.options.listItem!==!1&&k.push(vc.configure((h=this.options)===null||h===void 0?void 0:h.listItem)),this.options.orderedList!==!1&&k.push(Ic.configure((p=this.options)===null||p===void 0?void 0:p.orderedList)),this.options.paragraph!==!1&&k.push(qm.configure((m=this.options)===null||m===void 0?void 0:m.paragraph)),this.options.strike!==!1&&k.push(Lc.configure((g=this.options)===null||g===void 0?void 0:g.strike)),this.options.text!==!1&&k.push(Ym.configure((y=this.options)===null||y===void 0?void 0:y.text)),k}}),Qm=U.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something \u2026",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new V({key:new _("placeholder"),props:{decorations:({doc:n,selection:e})=>{const t=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=e,s=[];if(!t)return null;const i=this.editor.isEmpty;return n.descendants((o,l)=>{const a=r>=l&&r<=l+o.nodeSize,c=!o.isLeaf&&Mn(o);if((a||!this.options.showOnlyCurrent)&&c){const d=[this.options.emptyNodeClass];i&&d.push(this.options.emptyEditorClass);const u=X.node(l,l+o.nodeSize,{class:d.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:o,pos:l,hasAnchor:a}):this.options.placeholder});s.push(u)}return this.options.includeChildren}),z.create(n,s)}}})]}}),Zm=n=>{if(!n.children.length)return;const e=n.querySelectorAll("span");e&&e.forEach(t=>{var r,s;const i=t.getAttribute("style"),o=(s=(r=t.parentElement)===null||r===void 0?void 0:r.closest("span"))===null||s===void 0?void 0:s.getAttribute("style");t.setAttribute("style",`${o};${i}`)})},eg=ce.create({name:"textStyle",priority:101,addOptions(){return{HTMLAttributes:{},mergeNestedSpanStyles:!1}},parseHTML(){return[{tag:"span",getAttrs:n=>n.hasAttribute("style")?(this.options.mergeNestedSpanStyles&&Zm(n),{}):!1}]},renderHTML({HTMLAttributes:n}){return["span",I(this.options.HTMLAttributes,n),0]},addCommands(){return{removeEmptyTextStyle:()=>({tr:n})=>{const{selection:e}=n;return n.doc.nodesBetween(e.from,e.to,(t,r)=>{if(t.isTextblock)return!0;t.marks.filter(s=>s.type===this.type).some(s=>Object.values(s.attrs).some(i=>!!i))||n.removeMark(r,r+t.nodeSize,this.type)}),!0}}}}),tg=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,Pc=$.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{}}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:n}){return["img",I(this.options.HTMLAttributes,n)]},addCommands(){return{setImage:n=>({commands:e})=>e.insertContent({type:this.name,attrs:n})}},addInputRules(){return[Si({find:tg,type:this.type,getAttributes:n=>{const[,,e,t,r]=n;return{src:t,alt:e,title:r}}})]}}),ng="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5m\xF6gensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",rg="\u03B5\u03BB1\u03C52\u0431\u04331\u0435\u043B3\u0434\u0435\u0442\u04384\u0435\u044E2\u043A\u0430\u0442\u043E\u043B\u0438\u043A6\u043E\u043C3\u043C\u043A\u04342\u043E\u043D1\u0441\u043A\u0432\u04306\u043E\u043D\u043B\u0430\u0439\u043D5\u0440\u04333\u0440\u0443\u04412\u04442\u0441\u0430\u0439\u04423\u0440\u04313\u0443\u043A\u04403\u049B\u0430\u04373\u0570\u0561\u05753\u05D9\u05E9\u05E8\u05D0\u05DC5\u05E7\u05D5\u05DD3\u0627\u0628\u0648\u0638\u0628\u064A5\u0631\u0627\u0645\u0643\u06485\u0644\u0627\u0631\u062F\u06464\u0628\u062D\u0631\u064A\u06465\u062C\u0632\u0627\u0626\u06315\u0633\u0639\u0648\u062F\u064A\u06296\u0639\u0644\u064A\u0627\u06465\u0645\u063A\u0631\u06285\u0645\u0627\u0631\u0627\u062A5\u06CC\u0631\u0627\u06465\u0628\u0627\u0631\u062A2\u0632\u0627\u06314\u064A\u062A\u06433\u06BE\u0627\u0631\u062A5\u062A\u0648\u0646\u06334\u0633\u0648\u062F\u0627\u06463\u0631\u064A\u06295\u0634\u0628\u0643\u06294\u0639\u0631\u0627\u06422\u06282\u0645\u0627\u06464\u0641\u0644\u0633\u0637\u064A\u06466\u0642\u0637\u06313\u0643\u0627\u062B\u0648\u0644\u064A\u06436\u0648\u06453\u0645\u0635\u06312\u0644\u064A\u0633\u064A\u06275\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u06277\u0642\u06394\u0647\u0645\u0631\u0627\u06475\u067E\u0627\u06A9\u0633\u062A\u0627\u06467\u0680\u0627\u0631\u062A4\u0915\u0949\u092E3\u0928\u0947\u091F3\u092D\u093E\u0930\u09240\u092E\u094D3\u094B\u09245\u0938\u0902\u0917\u0920\u09285\u09AC\u09BE\u0982\u09B2\u09BE5\u09AD\u09BE\u09B0\u09A42\u09F0\u09A44\u0A2D\u0A3E\u0A30\u0A244\u0AAD\u0ABE\u0AB0\u0AA44\u0B2D\u0B3E\u0B30\u0B244\u0B87\u0BA8\u0BCD\u0BA4\u0BBF\u0BAF\u0BBE6\u0BB2\u0B99\u0BCD\u0B95\u0BC86\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD11\u0C2D\u0C3E\u0C30\u0C24\u0C4D5\u0CAD\u0CBE\u0CB0\u0CA44\u0D2D\u0D3E\u0D30\u0D24\u0D025\u0DBD\u0D82\u0D9A\u0DCF4\u0E04\u0E2D\u0E213\u0E44\u0E17\u0E223\u0EA5\u0EB2\u0EA73\u10D2\u10D42\u307F\u3093\u306A3\u30A2\u30DE\u30BE\u30F34\u30AF\u30E9\u30A6\u30C94\u30B0\u30FC\u30B0\u30EB4\u30B3\u30E02\u30B9\u30C8\u30A23\u30BB\u30FC\u30EB3\u30D5\u30A1\u30C3\u30B7\u30E7\u30F36\u30DD\u30A4\u30F3\u30C84\u4E16\u754C2\u4E2D\u4FE11\u56FD1\u570B1\u6587\u7F513\u4E9A\u9A6C\u900A3\u4F01\u4E1A2\u4F5B\u5C712\u4FE1\u606F2\u5065\u5EB72\u516B\u53662\u516C\u53F81\u76CA2\u53F0\u6E7E1\u70632\u5546\u57CE1\u5E971\u68072\u5609\u91CC0\u5927\u9152\u5E975\u5728\u7EBF2\u5927\u62FF2\u5929\u4E3B\u65593\u5A31\u4E502\u5BB6\u96FB2\u5E7F\u4E1C2\u5FAE\u535A2\u6148\u55842\u6211\u7231\u4F603\u624B\u673A2\u62DB\u80582\u653F\u52A11\u5E9C2\u65B0\u52A0\u57612\u95FB2\u65F6\u5C1A2\u66F8\u7C4D2\u673A\u67842\u6DE1\u9A6C\u95213\u6E38\u620F2\u6FB3\u95802\u70B9\u770B2\u79FB\u52A82\u7EC4\u7EC7\u673A\u67844\u7F51\u57401\u5E971\u7AD91\u7EDC2\u8054\u901A2\u8C37\u6B4C2\u8D2D\u72692\u901A\u8CA92\u96C6\u56E22\u96FB\u8A0A\u76C8\u79D14\u98DE\u5229\u6D663\u98DF\u54C12\u9910\u53852\u9999\u683C\u91CC\u62C93\u6E2F2\uB2F7\uB1371\uCEF42\uC0BC\uC1312\uD55C\uAD6D2",Wt=(n,e)=>{for(const t in e)n[t]=e[t];return n},xi="numeric",Mi="ascii",Ti="alpha",Tn="asciinumeric",An="alphanumeric",Ai="domain",Bc="emoji",sg="scheme",ig="slashscheme",Ei="whitespace";function og(n,e){return n in e||(e[n]=[]),e[n]}function St(n,e,t){e[xi]&&(e[Tn]=!0,e[An]=!0),e[Mi]&&(e[Tn]=!0,e[Ti]=!0),e[Tn]&&(e[An]=!0),e[Ti]&&(e[An]=!0),e[An]&&(e[Ai]=!0),e[Bc]&&(e[Ai]=!0);for(const r in e){const s=og(r,t);s.indexOf(n)<0&&s.push(n)}}function lg(n,e){const t={};for(const r in e)e[r].indexOf(n)>=0&&(t[r]=!0);return t}function ue(n=null){this.j={},this.jr=[],this.jd=null,this.t=n}ue.groups={},ue.prototype={accepts(){return!!this.t},go(n){const e=this,t=e.j[n];if(t)return t;for(let r=0;r<e.jr.length;r++){const s=e.jr[r][0],i=e.jr[r][1];if(i&&s.test(n))return i}return e.jd},has(n,e=!1){return e?n in this.j:!!this.go(n)},ta(n,e,t,r){for(let s=0;s<n.length;s++)this.tt(n[s],e,t,r)},tr(n,e,t,r){r=r||ue.groups;let s;return e&&e.j?s=e:(s=new ue(e),t&&r&&St(e,t,r)),this.jr.push([n,s]),s},ts(n,e,t,r){let s=this;const i=n.length;if(!i)return s;for(let o=0;o<i-1;o++)s=s.tt(n[o]);return s.tt(n[i-1],e,t,r)},tt(n,e,t,r){r=r||ue.groups;const s=this;if(e&&e.j)return s.j[n]=e,e;const i=e;let o,l=s.go(n);if(l?(o=new ue,Wt(o.j,l.j),o.jr.push.apply(o.jr,l.jr),o.jd=l.jd,o.t=l.t):o=new ue,i){if(r)if(o.t&&typeof o.t=="string"){const a=Wt(lg(o.t,r),t);St(i,a,r)}else t&&St(i,t,r);o.t=i}return s.j[n]=o,o}};const N=(n,e,t,r,s)=>n.ta(e,t,r,s),W=(n,e,t,r,s)=>n.tr(e,t,r,s),zc=(n,e,t,r,s)=>n.ts(e,t,r,s),S=(n,e,t,r,s)=>n.tt(e,t,r,s),Fe="WORD",Oi="UWORD",Hc="ASCIINUMERICAL",Fc="ALPHANUMERICAL",En="LOCALHOST",Ni="TLD",vi="UTLD",kr="SCHEME",jt="SLASH_SCHEME",Ri="NUM",Di="WS",Ii="NL",On="OPENBRACE",Nn="CLOSEBRACE",Sr="OPENBRACKET",wr="CLOSEBRACKET",Cr="OPENPAREN",xr="CLOSEPAREN",Mr="OPENANGLEBRACKET",Tr="CLOSEANGLEBRACKET",Ar="FULLWIDTHLEFTPAREN",Er="FULLWIDTHRIGHTPAREN",Or="LEFTCORNERBRACKET",Nr="RIGHTCORNERBRACKET",vr="LEFTWHITECORNERBRACKET",Rr="RIGHTWHITECORNERBRACKET",Dr="FULLWIDTHLESSTHAN",Ir="FULLWIDTHGREATERTHAN",Lr="AMPERSAND",Li="APOSTROPHE",Pr="ASTERISK",Ze="AT",Br="BACKSLASH",zr="BACKTICK",Hr="CARET",et="COLON",Pi="COMMA",Fr="DOLLAR",Oe="DOT",$r="EQUALS",Bi="EXCLAMATION",ke="HYPHEN",vn="PERCENT",Vr="PIPE",Wr="PLUS",jr="POUND",Rn="QUERY",zi="QUOTE",$c="FULLWIDTHMIDDLEDOT",Hi="SEMI",Ne="SLASH",Dn="TILDE",Kr="UNDERSCORE",Vc="EMOJI",Ur="SYM";var Wc=Object.freeze({__proto__:null,WORD:Fe,UWORD:Oi,ASCIINUMERICAL:Hc,ALPHANUMERICAL:Fc,LOCALHOST:En,TLD:Ni,UTLD:vi,SCHEME:kr,SLASH_SCHEME:jt,NUM:Ri,WS:Di,NL:Ii,OPENBRACE:On,CLOSEBRACE:Nn,OPENBRACKET:Sr,CLOSEBRACKET:wr,OPENPAREN:Cr,CLOSEPAREN:xr,OPENANGLEBRACKET:Mr,CLOSEANGLEBRACKET:Tr,FULLWIDTHLEFTPAREN:Ar,FULLWIDTHRIGHTPAREN:Er,LEFTCORNERBRACKET:Or,RIGHTCORNERBRACKET:Nr,LEFTWHITECORNERBRACKET:vr,RIGHTWHITECORNERBRACKET:Rr,FULLWIDTHLESSTHAN:Dr,FULLWIDTHGREATERTHAN:Ir,AMPERSAND:Lr,APOSTROPHE:Li,ASTERISK:Pr,AT:Ze,BACKSLASH:Br,BACKTICK:zr,CARET:Hr,COLON:et,COMMA:Pi,DOLLAR:Fr,DOT:Oe,EQUALS:$r,EXCLAMATION:Bi,HYPHEN:ke,PERCENT:vn,PIPE:Vr,PLUS:Wr,POUND:jr,QUERY:Rn,QUOTE:zi,FULLWIDTHMIDDLEDOT:$c,SEMI:Hi,SLASH:Ne,TILDE:Dn,UNDERSCORE:Kr,EMOJI:Vc,SYM:Ur});const $e=/[a-z]/,In=/\p{L}/u,Fi=/\p{Emoji}/u,Ve=/\d/,$i=/\s/,jc="\r",Vi=`
96
+ `,ag="\uFE0F",cg="\u200D",Wi="\uFFFC";let Jr=null,qr=null;function dg(n=[]){const e={};ue.groups=e;const t=new ue;Jr==null&&(Jr=Uc(ng)),qr==null&&(qr=Uc(rg)),S(t,"'",Li),S(t,"{",On),S(t,"}",Nn),S(t,"[",Sr),S(t,"]",wr),S(t,"(",Cr),S(t,")",xr),S(t,"<",Mr),S(t,">",Tr),S(t,"\uFF08",Ar),S(t,"\uFF09",Er),S(t,"\u300C",Or),S(t,"\u300D",Nr),S(t,"\u300E",vr),S(t,"\u300F",Rr),S(t,"\uFF1C",Dr),S(t,"\uFF1E",Ir),S(t,"&",Lr),S(t,"*",Pr),S(t,"@",Ze),S(t,"`",zr),S(t,"^",Hr),S(t,":",et),S(t,",",Pi),S(t,"$",Fr),S(t,".",Oe),S(t,"=",$r),S(t,"!",Bi),S(t,"-",ke),S(t,"%",vn),S(t,"|",Vr),S(t,"+",Wr),S(t,"#",jr),S(t,"?",Rn),S(t,'"',zi),S(t,"/",Ne),S(t,";",Hi),S(t,"~",Dn),S(t,"_",Kr),S(t,"\\",Br),S(t,"\u30FB",$c);const r=W(t,Ve,Ri,{[xi]:!0});W(r,Ve,r);const s=W(r,$e,Hc,{[Tn]:!0}),i=W(r,In,Fc,{[An]:!0}),o=W(t,$e,Fe,{[Mi]:!0});W(o,Ve,s),W(o,$e,o),W(s,Ve,s),W(s,$e,s);const l=W(t,In,Oi,{[Ti]:!0});W(l,$e),W(l,Ve,i),W(l,In,l),W(i,Ve,i),W(i,$e),W(i,In,i);const a=S(t,Vi,Ii,{[Ei]:!0}),c=S(t,jc,Di,{[Ei]:!0}),d=W(t,$i,Di,{[Ei]:!0});S(t,Wi,d),S(c,Vi,a),S(c,Wi,d),W(c,$i,d),S(d,jc),S(d,Vi),W(d,$i,d),S(d,Wi,d);const u=W(t,Fi,Vc,{[Bc]:!0});S(u,"#"),W(u,Fi,u),S(u,ag,u);const f=S(u,cg);S(f,"#"),W(f,Fi,u);const h=[[$e,o],[Ve,s]],p=[[$e,null],[In,l],[Ve,i]];for(let m=0;m<Jr.length;m++)tt(t,Jr[m],Ni,Fe,h);for(let m=0;m<qr.length;m++)tt(t,qr[m],vi,Oi,p);St(Ni,{tld:!0,ascii:!0},e),St(vi,{utld:!0,alpha:!0},e),tt(t,"file",kr,Fe,h),tt(t,"mailto",kr,Fe,h),tt(t,"http",jt,Fe,h),tt(t,"https",jt,Fe,h),tt(t,"ftp",jt,Fe,h),tt(t,"ftps",jt,Fe,h),St(kr,{scheme:!0,ascii:!0},e),St(jt,{slashscheme:!0,ascii:!0},e),n=n.sort((m,g)=>m[0]>g[0]?1:-1);for(let m=0;m<n.length;m++){const g=n[m][0],k=n[m][1]?{[sg]:!0}:{[ig]:!0};g.indexOf("-")>=0?k[Ai]=!0:$e.test(g)?Ve.test(g)?k[Tn]=!0:k[Mi]=!0:k[xi]=!0,zc(t,g,g,k)}return zc(t,"localhost",En,{ascii:!0}),t.jd=new ue(Ur),{start:t,tokens:Wt({groups:e},Wc)}}function Kc(n,e){const t=ug(e.replace(/[A-Z]/g,l=>l.toLowerCase())),r=t.length,s=[];let i=0,o=0;for(;o<r;){let l=n,a=null,c=0,d=null,u=-1,f=-1;for(;o<r&&(a=l.go(t[o]));)l=a,l.accepts()?(u=0,f=0,d=l):u>=0&&(u+=t[o].length,f++),c+=t[o].length,i+=t[o].length,o++;i-=u,o-=f,c-=u,s.push({t:d.t,v:e.slice(i-c,i),s:i-c,e:i})}return s}function ug(n){const e=[],t=n.length;let r=0;for(;r<t;){let s=n.charCodeAt(r),i,o=s<55296||s>56319||r+1===t||(i=n.charCodeAt(r+1))<56320||i>57343?n[r]:n.slice(r,r+2);e.push(o),r+=o.length}return e}function tt(n,e,t,r,s){let i;const o=e.length;for(let l=0;l<o-1;l++){const a=e[l];n.j[a]?i=n.j[a]:(i=new ue(r),i.jr=s.slice(),n.j[a]=i),n=i}return i=new ue(t),i.jr=s.slice(),n.j[e[o-1]]=i,i}function Uc(n){const e=[],t=[];let r=0,s="0123456789";for(;r<n.length;){let i=0;for(;s.indexOf(n[r+i])>=0;)i++;if(i>0){e.push(t.join(""));for(let o=parseInt(n.substring(r,r+i),10);o>0;o--)t.pop();r+=i}else t.push(n[r]),r++}return e}const Ln={defaultProtocol:"http",events:null,format:Jc,formatHref:Jc,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function ji(n,e=null){let t=Wt({},Ln);n&&(t=Wt(t,n instanceof ji?n.o:n));const r=t.ignoreTags,s=[];for(let i=0;i<r.length;i++)s.push(r[i].toUpperCase());this.o=t,e&&(this.defaultRender=e),this.ignoreTags=s}ji.prototype={o:Ln,ignoreTags:[],defaultRender(n){return n},check(n){return this.get("validate",n.toString(),n)},get(n,e,t){const r=e!=null;let s=this.o[n];return s&&(typeof s=="object"?(s=t.t in s?s[t.t]:Ln[n],typeof s=="function"&&r&&(s=s(e,t))):typeof s=="function"&&r&&(s=s(e,t.t,t)),s)},getObj(n,e,t){let r=this.o[n];return typeof r=="function"&&e!=null&&(r=r(e,t.t,t)),r},render(n){const e=n.render(this);return(this.get("render",null,n)||this.defaultRender)(e,n.t,n)}};function Jc(n){return n}function qc(n,e){this.t="token",this.v=n,this.tk=e}qc.prototype={isLink:!1,toString(){return this.v},toHref(n){return this.toString()},toFormattedString(n){const e=this.toString(),t=n.get("truncate",e,this),r=n.get("format",e,this);return t&&r.length>t?r.substring(0,t)+"\u2026":r},toFormattedHref(n){return n.get("formatHref",this.toHref(n.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(n=Ln.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(n),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(n){return{type:this.t,value:this.toFormattedString(n),isLink:this.isLink,href:this.toFormattedHref(n),start:this.startIndex(),end:this.endIndex()}},validate(n){return n.get("validate",this.toString(),this)},render(n){const e=this,t=this.toHref(n.get("defaultProtocol")),r=n.get("formatHref",t,this),s=n.get("tagName",t,e),i=this.toFormattedString(n),o={},l=n.get("className",t,e),a=n.get("target",t,e),c=n.get("rel",t,e),d=n.getObj("attributes",t,e),u=n.getObj("events",t,e);return o.href=r,l&&(o.class=l),a&&(o.target=a),c&&(o.rel=c),d&&Wt(o,d),{tagName:s,attributes:o,content:i,eventListeners:u}}};function _r(n,e){class t extends qc{constructor(s,i){super(s,i),this.t=n}}for(const r in e)t.prototype[r]=e[r];return t.t=n,t}const _c=_r("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),Gc=_r("text"),fg=_r("nl"),Gr=_r("url",{isLink:!0,toHref(n=Ln.defaultProtocol){return this.hasProtocol()?this.v:`${n}://${this.v}`},hasProtocol(){const n=this.tk;return n.length>=2&&n[0].t!==En&&n[1].t===et}}),Se=n=>new ue(n);function hg({groups:n}){const e=n.domain.concat([Lr,Pr,Ze,Br,zr,Hr,Fr,$r,ke,Ri,vn,Vr,Wr,jr,Ne,Ur,Dn,Kr]),t=[et,Pi,Oe,Bi,vn,Rn,zi,Hi,Mr,Tr,On,Nn,wr,Sr,Cr,xr,Ar,Er,Or,Nr,vr,Rr,Dr,Ir],r=[Lr,Li,Pr,Br,zr,Hr,Fr,$r,ke,On,Nn,vn,Vr,Wr,jr,Rn,Ne,Ur,Dn,Kr],s=Se(),i=S(s,Dn);N(i,r,i),N(i,n.domain,i);const o=Se(),l=Se(),a=Se();N(s,n.domain,o),N(s,n.scheme,l),N(s,n.slashscheme,a),N(o,r,i),N(o,n.domain,o);const c=S(o,Ze);S(i,Ze,c),S(l,Ze,c),S(a,Ze,c);const d=S(i,Oe);N(d,r,i),N(d,n.domain,i);const u=Se();N(c,n.domain,u),N(u,n.domain,u);const f=S(u,Oe);N(f,n.domain,u);const h=Se(_c);N(f,n.tld,h),N(f,n.utld,h),S(c,En,h);const p=S(u,ke);S(p,ke,p),N(p,n.domain,u),N(h,n.domain,u),S(h,Oe,f),S(h,ke,p);const m=S(h,et);N(m,n.numeric,_c);const g=S(o,ke),y=S(o,Oe);S(g,ke,g),N(g,n.domain,o),N(y,r,i),N(y,n.domain,o);const k=Se(Gr);N(y,n.tld,k),N(y,n.utld,k),N(k,n.domain,o),N(k,r,i),S(k,Oe,y),S(k,ke,g),S(k,Ze,c);const A=S(k,et),R=Se(Gr);N(A,n.numeric,R);const M=Se(Gr),v=Se();N(M,e,M),N(M,t,v),N(v,e,M),N(v,t,v),S(k,Ne,M),S(R,Ne,M);const F=S(l,et),K=S(a,et),D=S(K,Ne),me=S(D,Ne);N(l,n.domain,o),S(l,Oe,y),S(l,ke,g),N(a,n.domain,o),S(a,Oe,y),S(a,ke,g),N(F,n.domain,M),S(F,Ne,M),S(F,Rn,M),N(me,n.domain,M),N(me,e,M),S(me,Ne,M);const ct=[[On,Nn],[Sr,wr],[Cr,xr],[Mr,Tr],[Ar,Er],[Or,Nr],[vr,Rr],[Dr,Ir]];for(let Gt=0;Gt<ct.length;Gt++){const[co,cs]=ct[Gt],Hn=S(M,co);S(v,co,Hn),S(Hn,cs,M);const Et=Se(Gr);N(Hn,e,Et);const Yt=Se();N(Hn,t),N(Et,e,Et),N(Et,t,Yt),N(Yt,e,Et),N(Yt,t,Yt),S(Et,cs,M),S(Yt,cs,M)}return S(s,En,k),S(s,Ii,fg),{start:s,tokens:Wc}}function pg(n,e,t){let r=t.length,s=0,i=[],o=[];for(;s<r;){let l=n,a=null,c=null,d=0,u=null,f=-1;for(;s<r&&!(a=l.go(t[s].t));)o.push(t[s++]);for(;s<r&&(c=a||l.go(t[s].t));)a=null,l=c,l.accepts()?(f=0,u=l):f>=0&&f++,s++,d++;if(f<0)s-=d,s<r&&(o.push(t[s]),s++);else{o.length>0&&(i.push(Ki(Gc,e,o)),o=[]),s-=f,d-=f;const h=u.t,p=t.slice(s-d,s);i.push(Ki(h,e,p))}}return o.length>0&&i.push(Ki(Gc,e,o)),i}function Ki(n,e,t){const r=t[0].s,s=t[t.length-1].e,i=e.slice(r,s);return new n(i,t)}const mg=typeof console<"u"&&console&&console.warn||(()=>{}),gg="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",H={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function yg(){return ue.groups={},H.scanner=null,H.parser=null,H.tokenQueue=[],H.pluginQueue=[],H.customSchemes=[],H.initialized=!1,H}function Yc(n,e=!1){if(H.initialized&&mg(`linkifyjs: already initialized - will not register custom scheme "${n}" ${gg}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(n))throw new Error(`linkifyjs: incorrect scheme format.
97
97
  1. Must only contain digits, lowercase ASCII letters or "-"
98
98
  2. Cannot start or end with "-"
99
- 3. "-" cannot repeat`);B.customSchemes.push([n,e])}function og(){B.scanner=Qm(B.customSchemes);for(let n=0;n<B.tokenQueue.length;n++)B.tokenQueue[n][1]({scanner:B.scanner});B.parser=tg(B.scanner.tokens);for(let n=0;n<B.pluginQueue.length;n++)B.pluginQueue[n][1]({scanner:B.scanner,parser:B.parser});return B.initialized=!0,B}function Vi(n){return B.initialized||og(),ng(B.parser.start,n,Rc(B.scanner.start,n))}Vi.scan=Rc;function zc(n,e=null,t=null){if(e&&typeof e=="object"){if(t)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);t=e,e=null}const r=new Fi(t),s=Vi(n),i=[];for(let o=0;o<s.length;o++){const l=s[o];l.isLink&&(!e||l.t===e)&&r.check(l)&&i.push(l.toFormattedObject(r))}return i}function lg(n){return n.length===1?n[0].isLink:n.length===3&&n[1].isLink?["()","[]"].includes(n[0].value+n[2].value):!1}function ag(n){return new K({key:new Q("autolink"),appendTransaction:(e,t,r)=>{const s=e.some(c=>c.docChanged)&&!t.doc.eq(r.doc),i=e.some(c=>c.getMeta("preventAutolink"));if(!s||i)return;const{tr:o}=r,l=La(t.doc,[...e]);if($a(l).forEach(({newRange:c})=>{const d=za(r.doc,c,h=>h.isTextblock);let u,f;if(d.length>1?(u=d[0],f=r.doc.textBetween(u.pos,u.pos+u.node.nodeSize,void 0," ")):d.length&&r.doc.textBetween(c.from,c.to," "," ").endsWith(" ")&&(u=d[0],f=r.doc.textBetween(u.pos,c.to,void 0," ")),u&&f){const h=f.split(" ").filter(y=>y!=="");if(h.length<=0)return!1;const p=h[h.length-1],m=u.pos+f.lastIndexOf(p);if(!p)return!1;const g=Vi(p).map(y=>y.toObject(n.defaultProtocol));if(!lg(g))return!1;g.filter(y=>y.isLink).map(y=>({...y,from:m+y.start+1,to:m+y.end+1})).filter(y=>r.schema.marks.code?!r.doc.rangeHasMark(y.from,y.to,r.schema.marks.code):!0).filter(y=>n.validate(y.value)).filter(y=>n.shouldAutoLink(y.value)).forEach(y=>{pr(y.from,y.to,r.doc).some(k=>k.mark.type===n.type)||o.addMark(y.from,y.to,n.type.create({href:y.href}))})}}),!!o.steps.length)return o}})}function cg(n){return new K({key:new Q("handleClickLink"),props:{handleClick:(e,t,r)=>{var s,i;if(r.button!==0||!e.editable)return!1;let o=r.target;const l=[];for(;o.nodeName!=="DIV";)l.push(o),o=o.parentNode;if(!l.find(f=>f.nodeName==="A"))return!1;const a=fi(e.state,n.type.name),c=r.target,d=(s=c?.href)!==null&&s!==void 0?s:a.href,u=(i=c?.target)!==null&&i!==void 0?i:a.target;return c&&d?(window.open(d,u),!0):!1}}})}function dg(n){return new K({key:new Q("handlePasteLink"),props:{handlePaste:(e,t,r)=>{const{state:s}=e,{selection:i}=s,{empty:o}=i;if(o)return!1;let l="";r.content.forEach(c=>{l+=c.textContent});const a=zc(l,{defaultProtocol:n.defaultProtocol}).find(c=>c.isLink&&c.value===l);return!l||!a?!1:n.editor.commands.setMark(n.type,{href:a.href})}}})}const ug=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g;function St(n,e){const t=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(r=>{const s=typeof r=="string"?r:r.scheme;s&&t.push(s)}),!n||n.replace(ug,"").match(new RegExp(`^(?:(?:${t.join("|")}):|[^a-z]|[a-z+.-]+(?:[^a-z+.-:]|$))`,"i"))}const Hc=ue.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(n=>{if(typeof n=="string"){Bc(n);return}Bc(n.scheme,n.optionalSlashes)})},onDestroy(){ig()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(n,e)=>!!St(n,e.protocols),validate:n=>!!n,shouldAutoLink:n=>!!n}},addAttributes(){return{href:{default:null,parseHTML(n){return n.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:n=>{const e=n.getAttribute("href");return!e||!this.options.isAllowedUri(e,{defaultValidate:t=>!!St(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:n}){return this.options.isAllowedUri(n.href,{defaultValidate:e=>!!St(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",v(this.options.HTMLAttributes,n),0]:["a",v(this.options.HTMLAttributes,{...n,href:""}),0]},addCommands(){return{setLink:n=>({chain:e})=>{const{href:t}=n;return this.options.isAllowedUri(t,{defaultValidate:r=>!!St(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().setMark(this.name,n).setMeta("preventAutolink",!0).run():!1},toggleLink:n=>({chain:e})=>{const{href:t}=n;return this.options.isAllowedUri(t,{defaultValidate:r=>!!St(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().toggleMark(this.name,n,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run():!1},unsetLink:()=>({chain:n})=>n().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[Ye({find:n=>{const e=[];if(n){const{protocols:t,defaultProtocol:r}=this.options,s=zc(n).filter(i=>i.isLink&&this.options.isAllowedUri(i.value,{defaultValidate:o=>!!St(o,t),protocols:t,defaultProtocol:r}));s.length&&s.forEach(i=>e.push({text:i.value,data:{href:i.href},index:i.start}))}return e},type:this.type,getAttributes:n=>{var e;return{href:(e=n.data)===null||e===void 0?void 0:e.href}}})]},addProseMirrorPlugins(){const n=[],{protocols:e,defaultProtocol:t}=this.options;return this.options.autolink&&n.push(ag({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:s=>!!St(s,e),protocols:e,defaultProtocol:t}),shouldAutoLink:this.options.shouldAutoLink})),this.options.openOnClick===!0&&n.push(cg({type:this.type})),this.options.linkOnPaste&&n.push(dg({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type})),n}}),fg=ue.create({name:"subscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sub"},{style:"vertical-align",getAttrs(n){return n!=="sub"?!1:null}}]},renderHTML({HTMLAttributes:n}){return["sub",v(this.options.HTMLAttributes,n),0]},addCommands(){return{setSubscript:()=>({commands:n})=>n.setMark(this.name),toggleSubscript:()=>({commands:n})=>n.toggleMark(this.name),unsetSubscript:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-,":()=>this.editor.commands.toggleSubscript()}}}),hg=ue.create({name:"superscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sup"},{style:"vertical-align",getAttrs(n){return n!=="super"?!1:null}}]},renderHTML({HTMLAttributes:n}){return["sup",v(this.options.HTMLAttributes,n),0]},addCommands(){return{setSuperscript:()=>({commands:n})=>n.setMark(this.name),toggleSuperscript:()=>({commands:n})=>n.toggleMark(this.name),unsetSuperscript:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-.":()=>this.editor.commands.toggleSuperscript()}}});var Wi,ji;if(typeof WeakMap<"u"){let n=new WeakMap;Wi=e=>n.get(e),ji=(e,t)=>(n.set(e,t),t)}else{const n=[];let t=0;Wi=r=>{for(let s=0;s<n.length;s+=2)if(n[s]==r)return n[s+1]},ji=(r,s)=>(t==10&&(t=0),n[t++]=r,n[t++]=s)}var V=class{constructor(n,e,t,r){this.width=n,this.height=e,this.map=t,this.problems=r}findCell(n){for(let e=0;e<this.map.length;e++){const t=this.map[e];if(t!=n)continue;const r=e%this.width,s=e/this.width|0;let i=r+1,o=s+1;for(let l=1;i<this.width&&this.map[e+l]==t;l++)i++;for(let l=1;o<this.height&&this.map[e+this.width*l]==t;l++)o++;return{left:r,top:s,right:i,bottom:o}}throw new RangeError(`No cell with offset ${n} found`)}colCount(n){for(let e=0;e<this.map.length;e++)if(this.map[e]==n)return e%this.width;throw new RangeError(`No cell with offset ${n} found`)}nextCell(n,e,t){const{left:r,right:s,top:i,bottom:o}=this.findCell(n);return e=="horiz"?(t<0?r==0:s==this.width)?null:this.map[i*this.width+(t<0?r-1:s)]:(t<0?i==0:o==this.height)?null:this.map[r+this.width*(t<0?i-1:o)]}rectBetween(n,e){const{left:t,right:r,top:s,bottom:i}=this.findCell(n),{left:o,right:l,top:a,bottom:c}=this.findCell(e);return{left:Math.min(t,o),top:Math.min(s,a),right:Math.max(r,l),bottom:Math.max(i,c)}}cellsInRect(n){const e=[],t={};for(let r=n.top;r<n.bottom;r++)for(let s=n.left;s<n.right;s++){const i=r*this.width+s,o=this.map[i];t[o]||(t[o]=!0,!(s==n.left&&s&&this.map[i-1]==o||r==n.top&&r&&this.map[i-this.width]==o)&&e.push(o))}return e}positionAt(n,e,t){for(let r=0,s=0;;r++){const i=s+t.child(r).nodeSize;if(r==n){let o=e+n*this.width;const l=(n+1)*this.width;for(;o<l&&this.map[o]<s;)o++;return o==l?i-1:this.map[o]}s=i}}static get(n){return Wi(n)||ji(n,pg(n))}};function pg(n){if(n.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+n.type.name);const e=mg(n),t=n.childCount,r=[];let s=0,i=null;const o=[];for(let c=0,d=e*t;c<d;c++)r[c]=0;for(let c=0,d=0;c<t;c++){const u=n.child(c);d++;for(let p=0;;p++){for(;s<r.length&&r[s]!=0;)s++;if(p==u.childCount)break;const m=u.child(p),{colspan:g,rowspan:y,colwidth:k}=m.attrs;for(let T=0;T<y;T++){if(T+c>=t){(i||(i=[])).push({type:"overlong_rowspan",pos:d,n:y-T});break}const D=s+T*e;for(let M=0;M<g;M++){r[D+M]==0?r[D+M]=d:(i||(i=[])).push({type:"collision",row:c,pos:d,n:g-M});const R=k&&k[M];if(R){const z=(D+M)%e*2,j=o[z];j==null||j!=R&&o[z+1]==1?(o[z]=R,o[z+1]=1):j==R&&o[z+1]++}}}s+=g,d+=m.nodeSize}const f=(c+1)*e;let h=0;for(;s<f;)r[s++]==0&&h++;h&&(i||(i=[])).push({type:"missing",row:c,n:h}),d++}const l=new V(e,t,r,i);let a=!1;for(let c=0;!a&&c<o.length;c+=2)o[c]!=null&&o[c+1]<t&&(a=!0);return a&&gg(l,o,n),l}function mg(n){let e=-1,t=!1;for(let r=0;r<n.childCount;r++){const s=n.child(r);let i=0;if(t)for(let o=0;o<r;o++){const l=n.child(o);for(let a=0;a<l.childCount;a++){const c=l.child(a);o+c.attrs.rowspan>r&&(i+=c.attrs.colspan)}}for(let o=0;o<s.childCount;o++){const l=s.child(o);i+=l.attrs.colspan,l.attrs.rowspan>1&&(t=!0)}e==-1?e=i:e!=i&&(e=Math.max(e,i))}return e}function gg(n,e,t){n.problems||(n.problems=[]);const r={};for(let s=0;s<n.map.length;s++){const i=n.map[s];if(r[i])continue;r[i]=!0;const o=t.nodeAt(i);if(!o)throw new RangeError(`No cell with offset ${i} found`);let l=null;const a=o.attrs;for(let c=0;c<a.colspan;c++){const d=(s+c)%n.width,u=e[d*2];u!=null&&(!a.colwidth||a.colwidth[c]!=u)&&((l||(l=yg(a)))[c]=u)}l&&n.problems.unshift({type:"colwidth mismatch",pos:i,colwidth:l})}}function yg(n){if(n.colwidth)return n.colwidth.slice();const e=[];for(let t=0;t<n.colspan;t++)e.push(0);return e}function se(n){let e=n.cached.tableNodeTypes;if(!e){e=n.cached.tableNodeTypes={};for(const t in n.nodes){const r=n.nodes[t],s=r.spec.tableRole;s&&(e[s]=r)}}return e}var tt=new Q("selectingCells");function jt(n){for(let e=n.depth-1;e>0;e--)if(n.node(e).type.spec.tableRole=="row")return n.node(0).resolve(n.before(e+1));return null}function bg(n){for(let e=n.depth;e>0;e--){const t=n.node(e).type.spec.tableRole;if(t==="cell"||t==="header_cell")return n.node(e)}return null}function we(n){const e=n.selection.$head;for(let t=e.depth;t>0;t--)if(e.node(t).type.spec.tableRole=="row")return!0;return!1}function Xr(n){const e=n.selection;if("$anchorCell"in e&&e.$anchorCell)return e.$anchorCell.pos>e.$headCell.pos?e.$anchorCell:e.$headCell;if("node"in e&&e.node&&e.node.type.spec.tableRole=="cell")return e.$anchor;const t=jt(e.$head)||kg(e.$head);if(t)return t;throw new RangeError(`No cell found around position ${e.head}`)}function kg(n){for(let e=n.nodeAfter,t=n.pos;e;e=e.firstChild,t++){const r=e.type.spec.tableRole;if(r=="cell"||r=="header_cell")return n.doc.resolve(t)}for(let e=n.nodeBefore,t=n.pos;e;e=e.lastChild,t--){const r=e.type.spec.tableRole;if(r=="cell"||r=="header_cell")return n.doc.resolve(t-e.nodeSize)}}function Ki(n){return n.parent.type.spec.tableRole=="row"&&!!n.nodeAfter}function Sg(n){return n.node(0).resolve(n.pos+n.nodeAfter.nodeSize)}function Ji(n,e){return n.depth==e.depth&&n.pos>=e.start(-1)&&n.pos<=e.end(-1)}function Fc(n,e,t){const r=n.node(-1),s=V.get(r),i=n.start(-1),o=s.nextCell(n.pos-i,e,t);return o==null?null:n.node(0).resolve(i+o)}function xt(n,e,t=1){const r={...n,colspan:n.colspan-t};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(e,t),r.colwidth.some(s=>s>0)||(r.colwidth=null)),r}function $c(n,e,t=1){const r={...n,colspan:n.colspan+t};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let s=0;s<t;s++)r.colwidth.splice(e,0,0)}return r}function xg(n,e,t){const r=se(e.type.schema).header_cell;for(let s=0;s<n.height;s++)if(e.nodeAt(n.map[t+s*n.width]).type!=r)return!1;return!0}var L=class Ve extends E{constructor(e,t=e){const r=e.node(-1),s=V.get(r),i=e.start(-1),o=s.rectBetween(e.pos-i,t.pos-i),l=e.node(0),a=s.cellsInRect(o).filter(d=>d!=t.pos-i);a.unshift(t.pos-i);const c=a.map(d=>{const u=r.nodeAt(d);if(!u)throw RangeError(`No cell with offset ${d} found`);const f=i+d+1;return new Uo(l.resolve(f),l.resolve(f+u.content.size))});super(c[0].$from,c[0].$to,c),this.$anchorCell=e,this.$headCell=t}map(e,t){const r=e.resolve(t.map(this.$anchorCell.pos)),s=e.resolve(t.map(this.$headCell.pos));if(Ki(r)&&Ki(s)&&Ji(r,s)){const i=this.$anchorCell.node(-1)!=r.node(-1);return i&&this.isRowSelection()?Ve.rowSelection(r,s):i&&this.isColSelection()?Ve.colSelection(r,s):new Ve(r,s)}return A.between(r,s)}content(){const e=this.$anchorCell.node(-1),t=V.get(e),r=this.$anchorCell.start(-1),s=t.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r),i={},o=[];for(let a=s.top;a<s.bottom;a++){const c=[];for(let d=a*t.width+s.left,u=s.left;u<s.right;u++,d++){const f=t.map[d];if(i[f])continue;i[f]=!0;const h=t.findCell(f);let p=e.nodeAt(f);if(!p)throw RangeError(`No cell with offset ${f} found`);const m=s.left-h.left,g=h.right-s.right;if(m>0||g>0){let y=p.attrs;if(m>0&&(y=xt(y,0,m)),g>0&&(y=xt(y,y.colspan-g,g)),h.left<s.left){if(p=p.type.createAndFill(y),!p)throw RangeError(`Could not create cell with attrs ${JSON.stringify(y)}`)}else p=p.type.create(y,p.content)}if(h.top<s.top||h.bottom>s.bottom){const y={...p.attrs,rowspan:Math.min(h.bottom,s.bottom)-Math.max(h.top,s.top)};h.top<s.top?p=p.type.createAndFill(y):p=p.type.create(y,p.content)}c.push(p)}o.push(e.child(a).copy(b.from(c)))}const l=this.isColSelection()&&this.isRowSelection()?e:o;return new x(b.from(l),1,1)}replace(e,t=x.empty){const r=e.steps.length,s=this.ranges;for(let o=0;o<s.length;o++){const{$from:l,$to:a}=s[o],c=e.mapping.slice(r);e.replace(c.map(l.pos),c.map(a.pos),o?x.empty:t)}const i=E.findFrom(e.doc.resolve(e.mapping.slice(r).map(this.to)),-1);i&&e.setSelection(i)}replaceWith(e,t){this.replace(e,new x(b.from(t),0,0))}forEachCell(e){const t=this.$anchorCell.node(-1),r=V.get(t),s=this.$anchorCell.start(-1),i=r.cellsInRect(r.rectBetween(this.$anchorCell.pos-s,this.$headCell.pos-s));for(let o=0;o<i.length;o++)e(t.nodeAt(i[o]),s+i[o])}isColSelection(){const e=this.$anchorCell.index(-1),t=this.$headCell.index(-1);if(Math.min(e,t)>0)return!1;const r=e+this.$anchorCell.nodeAfter.attrs.rowspan,s=t+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(r,s)==this.$headCell.node(-1).childCount}static colSelection(e,t=e){const r=e.node(-1),s=V.get(r),i=e.start(-1),o=s.findCell(e.pos-i),l=s.findCell(t.pos-i),a=e.node(0);return o.top<=l.top?(o.top>0&&(e=a.resolve(i+s.map[o.left])),l.bottom<s.height&&(t=a.resolve(i+s.map[s.width*(s.height-1)+l.right-1]))):(l.top>0&&(t=a.resolve(i+s.map[l.left])),o.bottom<s.height&&(e=a.resolve(i+s.map[s.width*(s.height-1)+o.right-1]))),new Ve(e,t)}isRowSelection(){const e=this.$anchorCell.node(-1),t=V.get(e),r=this.$anchorCell.start(-1),s=t.colCount(this.$anchorCell.pos-r),i=t.colCount(this.$headCell.pos-r);if(Math.min(s,i)>0)return!1;const o=s+this.$anchorCell.nodeAfter.attrs.colspan,l=i+this.$headCell.nodeAfter.attrs.colspan;return Math.max(o,l)==t.width}eq(e){return e instanceof Ve&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,t=e){const r=e.node(-1),s=V.get(r),i=e.start(-1),o=s.findCell(e.pos-i),l=s.findCell(t.pos-i),a=e.node(0);return o.left<=l.left?(o.left>0&&(e=a.resolve(i+s.map[o.top*s.width])),l.right<s.width&&(t=a.resolve(i+s.map[s.width*(l.top+1)-1]))):(l.left>0&&(t=a.resolve(i+s.map[l.top*s.width])),o.right<s.width&&(e=a.resolve(i+s.map[s.width*(o.top+1)-1]))),new Ve(e,t)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(e,t){return new Ve(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,r=t){return new Ve(e.resolve(t),e.resolve(r))}getBookmark(){return new Cg(this.$anchorCell.pos,this.$headCell.pos)}};L.prototype.visible=!1,E.jsonID("cell",L);var Cg=class ad{constructor(e,t){this.anchor=e,this.head=t}map(e){return new ad(e.map(this.anchor),e.map(this.head))}resolve(e){const t=e.resolve(this.anchor),r=e.resolve(this.head);return t.parent.type.spec.tableRole=="row"&&r.parent.type.spec.tableRole=="row"&&t.index()<t.parent.childCount&&r.index()<r.parent.childCount&&Ji(t,r)?new L(t,r):E.near(r,1)}};function wg(n){if(!(n.selection instanceof L))return null;const e=[];return n.selection.forEachCell((t,r)=>{e.push(ie.node(r,r+t.nodeSize,{class:"selectedCell"}))}),F.create(n.doc,e)}function Mg({$from:n,$to:e}){if(n.pos==e.pos||n.pos<e.pos-6)return!1;let t=n.pos,r=e.pos,s=n.depth;for(;s>=0&&!(n.after(s+1)<n.end(s));s--,t++);for(let i=e.depth;i>=0&&!(e.before(i+1)>e.start(i));i--,r--);return t==r&&/row|table/.test(n.node(s).type.spec.tableRole)}function Tg({$from:n,$to:e}){let t,r;for(let s=n.depth;s>0;s--){const i=n.node(s);if(i.type.spec.tableRole==="cell"||i.type.spec.tableRole==="header_cell"){t=i;break}}for(let s=e.depth;s>0;s--){const i=e.node(s);if(i.type.spec.tableRole==="cell"||i.type.spec.tableRole==="header_cell"){r=i;break}}return t!==r&&e.parentOffset===0}function Ag(n,e,t){const r=(e||n).selection,s=(e||n).doc;let i,o;if(r instanceof w&&(o=r.node.type.spec.tableRole)){if(o=="cell"||o=="header_cell")i=L.create(s,r.from);else if(o=="row"){const l=s.resolve(r.from+1);i=L.rowSelection(l,l)}else if(!t){const l=V.get(r.node),a=r.from+1,c=a+l.map[l.width*l.height-1];i=L.create(s,a+1,c)}}else r instanceof A&&Mg(r)?i=A.create(s,r.from):r instanceof A&&Tg(r)&&(i=A.create(s,r.$from.start(),r.$from.end()));return i&&(e||(e=n.tr)).setSelection(i),e}var Eg=new Q("fix-tables");function Vc(n,e,t,r){const s=n.childCount,i=e.childCount;e:for(let o=0,l=0;o<i;o++){const a=e.child(o);for(let c=l,d=Math.min(s,o+3);c<d;c++)if(n.child(c)==a){l=c+1,t+=a.nodeSize;continue e}r(a,t),l<s&&n.child(l).sameMarkup(a)?Vc(n.child(l),a,t+1,r):a.nodesBetween(0,a.content.size,r,t+1),t+=a.nodeSize}}function Wc(n,e){let t;const r=(s,i)=>{s.type.spec.tableRole=="table"&&(t=Og(n,s,i,t))};return e?e.doc!=n.doc&&Vc(e.doc,n.doc,0,r):n.doc.descendants(r),t}function Og(n,e,t,r){const s=V.get(e);if(!s.problems)return r;r||(r=n.tr);const i=[];for(let a=0;a<s.height;a++)i.push(0);for(let a=0;a<s.problems.length;a++){const c=s.problems[a];if(c.type=="collision"){const d=e.nodeAt(c.pos);if(!d)continue;const u=d.attrs;for(let f=0;f<u.rowspan;f++)i[c.row+f]+=c.n;r.setNodeMarkup(r.mapping.map(t+1+c.pos),null,xt(u,u.colspan-c.n,c.n))}else if(c.type=="missing")i[c.row]+=c.n;else if(c.type=="overlong_rowspan"){const d=e.nodeAt(c.pos);if(!d)continue;r.setNodeMarkup(r.mapping.map(t+1+c.pos),null,{...d.attrs,rowspan:d.attrs.rowspan-c.n})}else if(c.type=="colwidth mismatch"){const d=e.nodeAt(c.pos);if(!d)continue;r.setNodeMarkup(r.mapping.map(t+1+c.pos),null,{...d.attrs,colwidth:c.colwidth})}}let o,l;for(let a=0;a<i.length;a++)i[a]&&(o==null&&(o=a),l=a);for(let a=0,c=t+1;a<s.height;a++){const d=e.child(a),u=c+d.nodeSize,f=i[a];if(f>0){let h="cell";d.firstChild&&(h=d.firstChild.type.spec.tableRole);const p=[];for(let g=0;g<f;g++){const y=se(n.schema)[h].createAndFill();y&&p.push(y)}const m=(a==0||o==a-1)&&l==a?c+1:u-1;r.insert(r.mapping.map(m),p)}c=u}return r.setMeta(Eg,{fixTables:!0})}function De(n){const e=n.selection,t=Xr(n),r=t.node(-1),s=t.start(-1),i=V.get(r);return{...e instanceof L?i.rectBetween(e.$anchorCell.pos-s,e.$headCell.pos-s):i.findCell(t.pos-s),tableStart:s,map:i,table:r}}function jc(n,{map:e,tableStart:t,table:r},s){let i=s>0?-1:0;xg(e,r,s+i)&&(i=s==0||s==e.width?null:0);for(let o=0;o<e.height;o++){const l=o*e.width+s;if(s>0&&s<e.width&&e.map[l-1]==e.map[l]){const a=e.map[l],c=r.nodeAt(a);n.setNodeMarkup(n.mapping.map(t+a),null,$c(c.attrs,s-e.colCount(a))),o+=c.attrs.rowspan-1}else{const a=i==null?se(r.type.schema).cell:r.nodeAt(e.map[l+i]).type,c=e.positionAt(o,s,r);n.insert(n.mapping.map(t+c),a.createAndFill())}}return n}function Ng(n,e){if(!we(n))return!1;if(e){const t=De(n);e(jc(n.tr,t,t.left))}return!0}function Rg(n,e){if(!we(n))return!1;if(e){const t=De(n);e(jc(n.tr,t,t.right))}return!0}function Dg(n,{map:e,table:t,tableStart:r},s){const i=n.mapping.maps.length;for(let o=0;o<e.height;){const l=o*e.width+s,a=e.map[l],c=t.nodeAt(a),d=c.attrs;if(s>0&&e.map[l-1]==a||s<e.width-1&&e.map[l+1]==a)n.setNodeMarkup(n.mapping.slice(i).map(r+a),null,xt(d,s-e.colCount(a)));else{const u=n.mapping.slice(i).map(r+a);n.delete(u,u+c.nodeSize)}o+=d.rowspan}}function Ig(n,e){if(!we(n))return!1;if(e){const t=De(n),r=n.tr;if(t.left==0&&t.right==t.map.width)return!1;for(let s=t.right-1;Dg(r,t,s),s!=t.left;s--){const i=t.tableStart?r.doc.nodeAt(t.tableStart-1):r.doc;if(!i)throw RangeError("No table found");t.table=i,t.map=V.get(i)}e(r)}return!0}function vg(n,e,t){var r;const s=se(e.type.schema).header_cell;for(let i=0;i<n.width;i++)if(((r=e.nodeAt(n.map[i+t*n.width]))==null?void 0:r.type)!=s)return!1;return!0}function Kc(n,{map:e,tableStart:t,table:r},s){var i;let o=t;for(let c=0;c<s;c++)o+=r.child(c).nodeSize;const l=[];let a=s>0?-1:0;vg(e,r,s+a)&&(a=s==0||s==e.height?null:0);for(let c=0,d=e.width*s;c<e.width;c++,d++)if(s>0&&s<e.height&&e.map[d]==e.map[d-e.width]){const u=e.map[d],f=r.nodeAt(u).attrs;n.setNodeMarkup(t+u,null,{...f,rowspan:f.rowspan+1}),c+=f.colspan-1}else{const u=a==null?se(r.type.schema).cell:(i=r.nodeAt(e.map[d+a*e.width]))==null?void 0:i.type,f=u?.createAndFill();f&&l.push(f)}return n.insert(o,se(r.type.schema).row.create(null,l)),n}function Pg(n,e){if(!we(n))return!1;if(e){const t=De(n);e(Kc(n.tr,t,t.top))}return!0}function Lg(n,e){if(!we(n))return!1;if(e){const t=De(n);e(Kc(n.tr,t,t.bottom))}return!0}function Bg(n,{map:e,table:t,tableStart:r},s){let i=0;for(let c=0;c<s;c++)i+=t.child(c).nodeSize;const o=i+t.child(s).nodeSize,l=n.mapping.maps.length;n.delete(i+r,o+r);const a=new Set;for(let c=0,d=s*e.width;c<e.width;c++,d++){const u=e.map[d];if(!a.has(u)){if(a.add(u),s>0&&u==e.map[d-e.width]){const f=t.nodeAt(u).attrs;n.setNodeMarkup(n.mapping.slice(l).map(u+r),null,{...f,rowspan:f.rowspan-1}),c+=f.colspan-1}else if(s<e.height&&u==e.map[d+e.width]){const f=t.nodeAt(u),h=f.attrs,p=f.type.create({...h,rowspan:f.attrs.rowspan-1},f.content),m=e.positionAt(s+1,c,t);n.insert(n.mapping.slice(l).map(r+m),p),c+=h.colspan-1}}}}function zg(n,e){if(!we(n))return!1;if(e){const t=De(n),r=n.tr;if(t.top==0&&t.bottom==t.map.height)return!1;for(let s=t.bottom-1;Bg(r,t,s),s!=t.top;s--){const i=t.tableStart?r.doc.nodeAt(t.tableStart-1):r.doc;if(!i)throw RangeError("No table found");t.table=i,t.map=V.get(t.table)}e(r)}return!0}function Jc(n){const e=n.content;return e.childCount==1&&e.child(0).isTextblock&&e.child(0).childCount==0}function Hg({width:n,height:e,map:t},r){let s=r.top*n+r.left,i=s,o=(r.bottom-1)*n+r.left,l=s+(r.right-r.left-1);for(let a=r.top;a<r.bottom;a++){if(r.left>0&&t[i]==t[i-1]||r.right<n&&t[l]==t[l+1])return!0;i+=n,l+=n}for(let a=r.left;a<r.right;a++){if(r.top>0&&t[s]==t[s-n]||r.bottom<e&&t[o]==t[o+n])return!0;s++,o++}return!1}function Uc(n,e){const t=n.selection;if(!(t instanceof L)||t.$anchorCell.pos==t.$headCell.pos)return!1;const r=De(n),{map:s}=r;if(Hg(s,r))return!1;if(e){const i=n.tr,o={};let l=b.empty,a,c;for(let d=r.top;d<r.bottom;d++)for(let u=r.left;u<r.right;u++){const f=s.map[d*s.width+u],h=r.table.nodeAt(f);if(!(o[f]||!h))if(o[f]=!0,a==null)a=f,c=h;else{Jc(h)||(l=l.append(h.content));const p=i.mapping.map(f+r.tableStart);i.delete(p,p+h.nodeSize)}}if(a==null||c==null)return!0;if(i.setNodeMarkup(a+r.tableStart,null,{...$c(c.attrs,c.attrs.colspan,r.right-r.left-c.attrs.colspan),rowspan:r.bottom-r.top}),l.size){const d=a+1+c.content.size,u=Jc(c)?a+1:d;i.replaceWith(u+r.tableStart,d+r.tableStart,l)}i.setSelection(new L(i.doc.resolve(a+r.tableStart))),e(i)}return!0}function qc(n,e){const t=se(n.schema);return Fg(({node:r})=>t[r.type.spec.tableRole])(n,e)}function Fg(n){return(e,t)=>{var r;const s=e.selection;let i,o;if(s instanceof L){if(s.$anchorCell.pos!=s.$headCell.pos)return!1;i=s.$anchorCell.nodeAfter,o=s.$anchorCell.pos}else{if(i=bg(s.$from),!i)return!1;o=(r=jt(s.$from))==null?void 0:r.pos}if(i==null||o==null||i.attrs.colspan==1&&i.attrs.rowspan==1)return!1;if(t){let l=i.attrs;const a=[],c=l.colwidth;l.rowspan>1&&(l={...l,rowspan:1}),l.colspan>1&&(l={...l,colspan:1});const d=De(e),u=e.tr;for(let h=0;h<d.right-d.left;h++)a.push(c?{...l,colwidth:c&&c[h]?[c[h]]:null}:l);let f;for(let h=d.top;h<d.bottom;h++){let p=d.map.positionAt(h,d.left,d.table);h==d.top&&(p+=i.nodeSize);for(let m=d.left,g=0;m<d.right;m++,g++)m==d.left&&h==d.top||u.insert(f=u.mapping.map(p+d.tableStart,1),n({node:i,row:h,col:m}).createAndFill(a[g]))}u.setNodeMarkup(o,n({node:i,row:d.top,col:d.left}),a[0]),s instanceof L&&u.setSelection(new L(u.doc.resolve(s.$anchorCell.pos),f?u.doc.resolve(f):void 0)),t(u)}return!0}}function $g(n,e){return function(t,r){if(!we(t))return!1;const s=Xr(t);if(s.nodeAfter.attrs[n]===e)return!1;if(r){const i=t.tr;t.selection instanceof L?t.selection.forEachCell((o,l)=>{o.attrs[n]!==e&&i.setNodeMarkup(l,null,{...o.attrs,[n]:e})}):i.setNodeMarkup(s.pos,null,{...s.nodeAfter.attrs,[n]:e}),r(i)}return!0}}function Vg(n){return function(e,t){if(!we(e))return!1;if(t){const r=se(e.schema),s=De(e),i=e.tr,o=s.map.cellsInRect(n=="column"?{left:s.left,top:0,right:s.right,bottom:s.map.height}:n=="row"?{left:0,top:s.top,right:s.map.width,bottom:s.bottom}:s),l=o.map(a=>s.table.nodeAt(a));for(let a=0;a<o.length;a++)l[a].type==r.header_cell&&i.setNodeMarkup(s.tableStart+o[a],r.cell,l[a].attrs);if(i.steps.length==0)for(let a=0;a<o.length;a++)i.setNodeMarkup(s.tableStart+o[a],r.header_cell,l[a].attrs);t(i)}return!0}}function _c(n,e,t){const r=e.map.cellsInRect({left:0,top:0,right:n=="row"?e.map.width:1,bottom:n=="column"?e.map.height:1});for(let s=0;s<r.length;s++){const i=e.table.nodeAt(r[s]);if(i&&i.type!==t.header_cell)return!1}return!0}function vn(n,e){return e=e||{useDeprecatedLogic:!1},e.useDeprecatedLogic?Vg(n):function(t,r){if(!we(t))return!1;if(r){const s=se(t.schema),i=De(t),o=t.tr,l=_c("row",i,s),a=_c("column",i,s),d=(n==="column"?l:n==="row"?a:!1)?1:0,u=n=="column"?{left:0,top:d,right:1,bottom:i.map.height}:n=="row"?{left:d,top:0,right:i.map.width,bottom:1}:i,f=n=="column"?a?s.cell:s.header_cell:n=="row"?l?s.cell:s.header_cell:s.cell;i.map.cellsInRect(u).forEach(h=>{const p=h+i.tableStart,m=o.doc.nodeAt(p);m&&o.setNodeMarkup(p,f,m.attrs)}),r(o)}return!0}}vn("row",{useDeprecatedLogic:!0}),vn("column",{useDeprecatedLogic:!0});var Wg=vn("cell",{useDeprecatedLogic:!0});function jg(n,e){if(e<0){const t=n.nodeBefore;if(t)return n.pos-t.nodeSize;for(let r=n.index(-1)-1,s=n.before();r>=0;r--){const i=n.node(-1).child(r),o=i.lastChild;if(o)return s-1-o.nodeSize;s-=i.nodeSize}}else{if(n.index()<n.parent.childCount-1)return n.pos+n.nodeAfter.nodeSize;const t=n.node(-1);for(let r=n.indexAfter(-1),s=n.after();r<t.childCount;r++){const i=t.child(r);if(i.childCount)return s+1;s+=i.nodeSize}}return null}function Gc(n){return function(e,t){if(!we(e))return!1;const r=jg(Xr(e),n);if(r==null)return!1;if(t){const s=e.doc.resolve(r);t(e.tr.setSelection(A.between(s,Sg(s))).scrollIntoView())}return!0}}function Kg(n,e){const t=n.selection.$anchor;for(let r=t.depth;r>0;r--)if(t.node(r).type.spec.tableRole=="table")return e&&e(n.tr.delete(t.before(r),t.after(r)).scrollIntoView()),!0;return!1}function Qr(n,e){const t=n.selection;if(!(t instanceof L))return!1;if(e){const r=n.tr,s=se(n.schema).cell.createAndFill().content;t.forEachCell((i,o)=>{i.content.eq(s)||r.replace(r.mapping.map(o+1),r.mapping.map(o+i.nodeSize-1),new x(s,0,0))}),r.docChanged&&e(r)}return!0}function Jg(n){if(!n.size)return null;let{content:e,openStart:t,openEnd:r}=n;for(;e.childCount==1&&(t>0&&r>0||e.child(0).type.spec.tableRole=="table");)t--,r--,e=e.child(0).content;const s=e.child(0),i=s.type.spec.tableRole,o=s.type.schema,l=[];if(i=="row")for(let a=0;a<e.childCount;a++){let c=e.child(a).content;const d=a?0:Math.max(0,t-1),u=a<e.childCount-1?0:Math.max(0,r-1);(d||u)&&(c=Ui(se(o).row,new x(c,d,u)).content),l.push(c)}else if(i=="cell"||i=="header_cell")l.push(t||r?Ui(se(o).row,new x(e,t,r)).content:e);else return null;return Ug(o,l)}function Ug(n,e){const t=[];for(let s=0;s<e.length;s++){const i=e[s];for(let o=i.childCount-1;o>=0;o--){const{rowspan:l,colspan:a}=i.child(o).attrs;for(let c=s;c<s+l;c++)t[c]=(t[c]||0)+a}}let r=0;for(let s=0;s<t.length;s++)r=Math.max(r,t[s]);for(let s=0;s<t.length;s++)if(s>=e.length&&e.push(b.empty),t[s]<r){const i=se(n).cell.createAndFill(),o=[];for(let l=t[s];l<r;l++)o.push(i);e[s]=e[s].append(b.from(o))}return{height:e.length,width:r,rows:e}}function Ui(n,e){const t=n.createAndFill();return new Cs(t).replace(0,t.content.size,e).doc}function qg({width:n,height:e,rows:t},r,s){if(n!=r){const i=[],o=[];for(let l=0;l<t.length;l++){const a=t[l],c=[];for(let d=i[l]||0,u=0;d<r;u++){let f=a.child(u%a.childCount);d+f.attrs.colspan>r&&(f=f.type.createChecked(xt(f.attrs,f.attrs.colspan,d+f.attrs.colspan-r),f.content)),c.push(f),d+=f.attrs.colspan;for(let h=1;h<f.attrs.rowspan;h++)i[l+h]=(i[l+h]||0)+f.attrs.colspan}o.push(b.from(c))}t=o,n=r}if(e!=s){const i=[];for(let o=0,l=0;o<s;o++,l++){const a=[],c=t[l%e];for(let d=0;d<c.childCount;d++){let u=c.child(d);o+u.attrs.rowspan>s&&(u=u.type.create({...u.attrs,rowspan:Math.max(1,s-u.attrs.rowspan)},u.content)),a.push(u)}i.push(b.from(a))}t=i,e=s}return{width:n,height:e,rows:t}}function _g(n,e,t,r,s,i,o){const l=n.doc.type.schema,a=se(l);let c,d;if(s>e.width)for(let u=0,f=0;u<e.height;u++){const h=t.child(u);f+=h.nodeSize;const p=[];let m;h.lastChild==null||h.lastChild.type==a.cell?m=c||(c=a.cell.createAndFill()):m=d||(d=a.header_cell.createAndFill());for(let g=e.width;g<s;g++)p.push(m);n.insert(n.mapping.slice(o).map(f-1+r),p)}if(i>e.height){const u=[];for(let p=0,m=(e.height-1)*e.width;p<Math.max(e.width,s);p++){const g=p>=e.width?!1:t.nodeAt(e.map[m+p]).type==a.header_cell;u.push(g?d||(d=a.header_cell.createAndFill()):c||(c=a.cell.createAndFill()))}const f=a.row.create(null,b.from(u)),h=[];for(let p=e.height;p<i;p++)h.push(f);n.insert(n.mapping.slice(o).map(r+t.nodeSize-2),h)}return!!(c||d)}function Yc(n,e,t,r,s,i,o,l){if(o==0||o==e.height)return!1;let a=!1;for(let c=s;c<i;c++){const d=o*e.width+c,u=e.map[d];if(e.map[d-e.width]==u){a=!0;const f=t.nodeAt(u),{top:h,left:p}=e.findCell(u);n.setNodeMarkup(n.mapping.slice(l).map(u+r),null,{...f.attrs,rowspan:o-h}),n.insert(n.mapping.slice(l).map(e.positionAt(o,p,t)),f.type.createAndFill({...f.attrs,rowspan:h+f.attrs.rowspan-o})),c+=f.attrs.colspan-1}}return a}function Xc(n,e,t,r,s,i,o,l){if(o==0||o==e.width)return!1;let a=!1;for(let c=s;c<i;c++){const d=c*e.width+o,u=e.map[d];if(e.map[d-1]==u){a=!0;const f=t.nodeAt(u),h=e.colCount(u),p=n.mapping.slice(l).map(u+r);n.setNodeMarkup(p,null,xt(f.attrs,o-h,f.attrs.colspan-(o-h))),n.insert(p+f.nodeSize,f.type.createAndFill(xt(f.attrs,0,o-h))),c+=f.attrs.rowspan-1}}return a}function Qc(n,e,t,r,s){let i=t?n.doc.nodeAt(t-1):n.doc;if(!i)throw new Error("No table found");let o=V.get(i);const{top:l,left:a}=r,c=a+s.width,d=l+s.height,u=n.tr;let f=0;function h(){if(i=t?u.doc.nodeAt(t-1):u.doc,!i)throw new Error("No table found");o=V.get(i),f=u.mapping.maps.length}_g(u,o,i,t,c,d,f)&&h(),Yc(u,o,i,t,a,c,l,f)&&h(),Yc(u,o,i,t,a,c,d,f)&&h(),Xc(u,o,i,t,l,d,a,f)&&h(),Xc(u,o,i,t,l,d,c,f)&&h();for(let p=l;p<d;p++){const m=o.positionAt(p,a,i),g=o.positionAt(p,c,i);u.replace(u.mapping.slice(f).map(m+t),u.mapping.slice(f).map(g+t),new x(s.rows[p-l],0,0))}h(),u.setSelection(new L(u.doc.resolve(t+o.positionAt(l,a,i)),u.doc.resolve(t+o.positionAt(d-1,c-1,i)))),e(u)}var Gg=Ys({ArrowLeft:es("horiz",-1),ArrowRight:es("horiz",1),ArrowUp:es("vert",-1),ArrowDown:es("vert",1),"Shift-ArrowLeft":ts("horiz",-1),"Shift-ArrowRight":ts("horiz",1),"Shift-ArrowUp":ts("vert",-1),"Shift-ArrowDown":ts("vert",1),Backspace:Qr,"Mod-Backspace":Qr,Delete:Qr,"Mod-Delete":Qr});function Zr(n,e,t){return t.eq(n.selection)?!1:(e&&e(n.tr.setSelection(t).scrollIntoView()),!0)}function es(n,e){return(t,r,s)=>{if(!s)return!1;const i=t.selection;if(i instanceof L)return Zr(t,r,E.near(i.$headCell,e));if(n!="horiz"&&!i.empty)return!1;const o=Zc(s,n,e);if(o==null)return!1;if(n=="horiz")return Zr(t,r,E.near(t.doc.resolve(i.head+e),e));{const l=t.doc.resolve(o),a=Fc(l,n,e);let c;return a?c=E.near(a,1):e<0?c=E.near(t.doc.resolve(l.before(-1)),-1):c=E.near(t.doc.resolve(l.after(-1)),1),Zr(t,r,c)}}}function ts(n,e){return(t,r,s)=>{if(!s)return!1;const i=t.selection;let o;if(i instanceof L)o=i;else{const a=Zc(s,n,e);if(a==null)return!1;o=new L(t.doc.resolve(a))}const l=Fc(o.$headCell,n,e);return l?Zr(t,r,new L(o.$anchorCell,l)):!1}}function Yg(n,e){const t=n.state.doc,r=jt(t.resolve(e));return r?(n.dispatch(n.state.tr.setSelection(new L(r))),!0):!1}function Xg(n,e,t){if(!we(n.state))return!1;let r=Jg(t);const s=n.state.selection;if(s instanceof L){r||(r={width:1,height:1,rows:[b.from(Ui(se(n.state.schema).cell,t))]});const i=s.$anchorCell.node(-1),o=s.$anchorCell.start(-1),l=V.get(i).rectBetween(s.$anchorCell.pos-o,s.$headCell.pos-o);return r=qg(r,l.right-l.left,l.bottom-l.top),Qc(n.state,n.dispatch,o,l,r),!0}else if(r){const i=Xr(n.state),o=i.start(-1);return Qc(n.state,n.dispatch,o,V.get(i.node(-1)).findCell(i.pos-o),r),!0}else return!1}function Qg(n,e){var t;if(e.ctrlKey||e.metaKey)return;const r=ed(n,e.target);let s;if(e.shiftKey&&n.state.selection instanceof L)i(n.state.selection.$anchorCell,e),e.preventDefault();else if(e.shiftKey&&r&&(s=jt(n.state.selection.$anchor))!=null&&((t=qi(n,e))==null?void 0:t.pos)!=s.pos)i(s,e),e.preventDefault();else if(!r)return;function i(a,c){let d=qi(n,c);const u=tt.getState(n.state)==null;if(!d||!Ji(a,d))if(u)d=a;else return;const f=new L(a,d);if(u||!n.state.selection.eq(f)){const h=n.state.tr.setSelection(f);u&&h.setMeta(tt,a.pos),n.dispatch(h)}}function o(){n.root.removeEventListener("mouseup",o),n.root.removeEventListener("dragstart",o),n.root.removeEventListener("mousemove",l),tt.getState(n.state)!=null&&n.dispatch(n.state.tr.setMeta(tt,-1))}function l(a){const c=a,d=tt.getState(n.state);let u;if(d!=null)u=n.state.doc.resolve(d);else if(ed(n,c.target)!=r&&(u=qi(n,e),!u))return o();u&&i(u,c)}n.root.addEventListener("mouseup",o),n.root.addEventListener("dragstart",o),n.root.addEventListener("mousemove",l)}function Zc(n,e,t){if(!(n.state.selection instanceof A))return null;const{$head:r}=n.state.selection;for(let s=r.depth-1;s>=0;s--){const i=r.node(s);if((t<0?r.index(s):r.indexAfter(s))!=(t<0?0:i.childCount))return null;if(i.type.spec.tableRole=="cell"||i.type.spec.tableRole=="header_cell"){const l=r.before(s),a=e=="vert"?t>0?"down":"up":t>0?"right":"left";return n.endOfTextblock(a)?l:null}}return null}function ed(n,e){for(;e&&e!=n.dom;e=e.parentNode)if(e.nodeName=="TD"||e.nodeName=="TH")return e;return null}function qi(n,e){const t=n.posAtCoords({left:e.clientX,top:e.clientY});return t&&t?jt(n.state.doc.resolve(t.pos)):null}var Zg=class{constructor(e,t){this.node=e,this.defaultCellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${t}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),_i(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!=this.node.type?!1:(this.node=e,_i(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return e.type=="attributes"&&(e.target==this.table||this.colgroup.contains(e.target))}};function _i(n,e,t,r,s,i){var o;let l=0,a=!0,c=e.firstChild;const d=n.firstChild;if(d){for(let u=0,f=0;u<d.childCount;u++){const{colspan:h,colwidth:p}=d.child(u).attrs;for(let m=0;m<h;m++,f++){const g=s==f?i:p&&p[m],y=g?g+"px":"";if(l+=g||r,g||(a=!1),c)c.style.width!=y&&(c.style.width=y),c=c.nextSibling;else{const k=document.createElement("col");k.style.width=y,e.appendChild(k)}}}for(;c;){const u=c.nextSibling;(o=c.parentNode)==null||o.removeChild(c),c=u}a?(t.style.width=l+"px",t.style.minWidth=""):(t.style.width="",t.style.minWidth=l+"px")}}var fe=new Q("tableColumnResizing");function ey({handleWidth:n=5,cellMinWidth:e=25,defaultCellMinWidth:t=100,View:r=Zg,lastColumnResizable:s=!0}={}){const i=new K({key:fe,state:{init(o,l){var a,c;const d=(c=(a=i.spec)==null?void 0:a.props)==null?void 0:c.nodeViews,u=se(l.schema).table.name;return r&&d&&(d[u]=(f,h)=>new r(f,t,h)),new ty(-1,!1)},apply(o,l){return l.apply(o)}},props:{attributes:o=>{const l=fe.getState(o);return l&&l.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(o,l)=>{ny(o,l,n,s)},mouseleave:o=>{ry(o)},mousedown:(o,l)=>{sy(o,l,e,t)}},decorations:o=>{const l=fe.getState(o);if(l&&l.activeHandle>-1)return cy(o,l.activeHandle)},nodeViews:{}}});return i}var ty=class rs{constructor(e,t){this.activeHandle=e,this.dragging=t}apply(e){const t=this,r=e.getMeta(fe);if(r&&r.setHandle!=null)return new rs(r.setHandle,!1);if(r&&r.setDragging!==void 0)return new rs(t.activeHandle,r.setDragging);if(t.activeHandle>-1&&e.docChanged){let s=e.mapping.map(t.activeHandle,-1);return Ki(e.doc.resolve(s))||(s=-1),new rs(s,t.dragging)}return t}};function ny(n,e,t,r){const s=fe.getState(n.state);if(s&&!s.dragging){const i=oy(e.target);let o=-1;if(i){const{left:l,right:a}=i.getBoundingClientRect();e.clientX-l<=t?o=td(n,e,"left",t):a-e.clientX<=t&&(o=td(n,e,"right",t))}if(o!=s.activeHandle){if(!r&&o!==-1){const l=n.state.doc.resolve(o),a=l.node(-1),c=V.get(a),d=l.start(-1);if(c.colCount(l.pos-d)+l.nodeAfter.attrs.colspan-1==c.width-1)return}rd(n,o)}}}function ry(n){const e=fe.getState(n.state);e&&e.activeHandle>-1&&!e.dragging&&rd(n,-1)}function sy(n,e,t,r){var s;const i=(s=n.dom.ownerDocument.defaultView)!=null?s:window,o=fe.getState(n.state);if(!o||o.activeHandle==-1||o.dragging)return!1;const l=n.state.doc.nodeAt(o.activeHandle),a=iy(n,o.activeHandle,l.attrs);n.dispatch(n.state.tr.setMeta(fe,{setDragging:{startX:e.clientX,startWidth:a}}));function c(u){i.removeEventListener("mouseup",c),i.removeEventListener("mousemove",d);const f=fe.getState(n.state);f?.dragging&&(ly(n,f.activeHandle,nd(f.dragging,u,t)),n.dispatch(n.state.tr.setMeta(fe,{setDragging:null})))}function d(u){if(!u.which)return c(u);const f=fe.getState(n.state);if(f&&f.dragging){const h=nd(f.dragging,u,t);sd(n,f.activeHandle,h,r)}}return sd(n,o.activeHandle,a,r),i.addEventListener("mouseup",c),i.addEventListener("mousemove",d),e.preventDefault(),!0}function iy(n,e,{colspan:t,colwidth:r}){const s=r&&r[r.length-1];if(s)return s;const i=n.domAtPos(e);let l=i.node.childNodes[i.offset].offsetWidth,a=t;if(r)for(let c=0;c<t;c++)r[c]&&(l-=r[c],a--);return l/a}function oy(n){for(;n&&n.nodeName!="TD"&&n.nodeName!="TH";)n=n.classList&&n.classList.contains("ProseMirror")?null:n.parentNode;return n}function td(n,e,t,r){const s=t=="right"?-r:r,i=n.posAtCoords({left:e.clientX+s,top:e.clientY});if(!i)return-1;const{pos:o}=i,l=jt(n.state.doc.resolve(o));if(!l)return-1;if(t=="right")return l.pos;const a=V.get(l.node(-1)),c=l.start(-1),d=a.map.indexOf(l.pos-c);return d%a.width==0?-1:c+a.map[d-1]}function nd(n,e,t){const r=e.clientX-n.startX;return Math.max(t,n.startWidth+r)}function rd(n,e){n.dispatch(n.state.tr.setMeta(fe,{setHandle:e}))}function ly(n,e,t){const r=n.state.doc.resolve(e),s=r.node(-1),i=V.get(s),o=r.start(-1),l=i.colCount(r.pos-o)+r.nodeAfter.attrs.colspan-1,a=n.state.tr;for(let c=0;c<i.height;c++){const d=c*i.width+l;if(c&&i.map[d]==i.map[d-i.width])continue;const u=i.map[d],f=s.nodeAt(u).attrs,h=f.colspan==1?0:l-i.colCount(u);if(f.colwidth&&f.colwidth[h]==t)continue;const p=f.colwidth?f.colwidth.slice():ay(f.colspan);p[h]=t,a.setNodeMarkup(o+u,null,{...f,colwidth:p})}a.docChanged&&n.dispatch(a)}function sd(n,e,t,r){const s=n.state.doc.resolve(e),i=s.node(-1),o=s.start(-1),l=V.get(i).colCount(s.pos-o)+s.nodeAfter.attrs.colspan-1;let a=n.domAtPos(s.start(-1)).node;for(;a&&a.nodeName!="TABLE";)a=a.parentNode;a&&_i(i,a.firstChild,a,r,l,t)}function ay(n){return Array(n).fill(0)}function cy(n,e){var t;const r=[],s=n.doc.resolve(e),i=s.node(-1);if(!i)return F.empty;const o=V.get(i),l=s.start(-1),a=o.colCount(s.pos-l)+s.nodeAfter.attrs.colspan-1;for(let c=0;c<o.height;c++){const d=a+c*o.width;if((a==o.width-1||o.map[d]!=o.map[d+1])&&(c==0||o.map[d]!=o.map[d-o.width])){const u=o.map[d],f=l+u+i.nodeAt(u).nodeSize-1,h=document.createElement("div");h.className="column-resize-handle",(t=fe.getState(n))!=null&&t.dragging&&r.push(ie.node(l+u,l+u+i.nodeAt(u).nodeSize,{class:"column-resize-dragging"})),r.push(ie.widget(f,h))}}return F.create(n.doc,r)}function dy({allowTableNodeSelection:n=!1}={}){return new K({key:tt,state:{init(){return null},apply(e,t){const r=e.getMeta(tt);if(r!=null)return r==-1?null:r;if(t==null||!e.docChanged)return t;const{deleted:s,pos:i}=e.mapping.mapResult(t);return s?null:i}},props:{decorations:wg,handleDOMEvents:{mousedown:Qg},createSelectionBetween(e){return tt.getState(e.state)!=null?e.state.selection:null},handleTripleClick:Yg,handleKeyDown:Gg,handlePaste:Xg},appendTransaction(e,t,r){return Ag(r,Wc(r,t),n)}})}function Gi(n,e){return e?["width",`${Math.max(e,n)}px`]:["min-width",`${n}px`]}function id(n,e,t,r,s,i){var o;let l=0,a=!0,c=e.firstChild;const d=n.firstChild;if(d!==null)for(let u=0,f=0;u<d.childCount;u+=1){const{colspan:h,colwidth:p}=d.child(u).attrs;for(let m=0;m<h;m+=1,f+=1){const g=s===f?i:p&&p[m],y=g?`${g}px`:"";if(l+=g||r,g||(a=!1),c){if(c.style.width!==y){const[k,T]=Gi(r,g);c.style.setProperty(k,T)}c=c.nextSibling}else{const k=document.createElement("col"),[T,D]=Gi(r,g);k.style.setProperty(T,D),e.appendChild(k)}}}for(;c;){const u=c.nextSibling;(o=c.parentNode)===null||o===void 0||o.removeChild(c),c=u}a?(t.style.width=`${l}px`,t.style.minWidth=""):(t.style.width="",t.style.minWidth=`${l}px`)}class uy{constructor(e,t){this.node=e,this.cellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),id(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!==this.node.type?!1:(this.node=e,id(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){return e.type==="attributes"&&(e.target===this.table||this.colgroup.contains(e.target))}}function fy(n,e,t,r){let s=0,i=!0;const o=[],l=n.firstChild;if(!l)return{};for(let u=0,f=0;u<l.childCount;u+=1){const{colspan:h,colwidth:p}=l.child(u).attrs;for(let m=0;m<h;m+=1,f+=1){const g=t===f?r:p&&p[m];s+=g||e,g||(i=!1);const[y,k]=Gi(e,g);o.push(["col",{style:`${y}: ${k}`}])}}const a=i?`${s}px`:"",c=i?"":`${s}px`;return{colgroup:["colgroup",{},...o],tableWidth:a,tableMinWidth:c}}function od(n,e){return n.createAndFill()}function hy(n){if(n.cached.tableNodeTypes)return n.cached.tableNodeTypes;const e={};return Object.keys(n.nodes).forEach(t=>{const r=n.nodes[t];r.spec.tableRole&&(e[r.spec.tableRole]=r)}),n.cached.tableNodeTypes=e,e}function py(n,e,t,r,s){const i=hy(n),o=[],l=[];for(let c=0;c<t;c+=1){const d=od(i.cell);if(d&&l.push(d),r){const u=od(i.header_cell);u&&o.push(u)}}const a=[];for(let c=0;c<e;c+=1)a.push(i.row.createChecked(null,r&&c===0?o:l));return i.table.createChecked(null,a)}function my(n){return n instanceof L}const ns=({editor:n})=>{const{selection:e}=n.state;if(!my(e))return!1;let t=0;const r=di(e.ranges[0].$from,i=>i.type.name==="table");return r?.node.descendants(i=>{if(i.type.name==="table")return!1;["tableCell","tableHeader"].includes(i.type.name)&&(t+=1)}),t===e.ranges.length?(n.commands.deleteTable(),!0):!1},gy=H.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,handleWidth:5,cellMinWidth:25,View:uy,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML(){return[{tag:"table"}]},renderHTML({node:n,HTMLAttributes:e}){const{colgroup:t,tableWidth:r,tableMinWidth:s}=fy(n,this.options.cellMinWidth);return["table",v(this.options.HTMLAttributes,e,{style:r?`width: ${r}`:`min-width: ${s}`}),t,["tbody",0]]},addCommands(){return{insertTable:({rows:n=3,cols:e=3,withHeaderRow:t=!0}={})=>({tr:r,dispatch:s,editor:i})=>{const o=py(i.schema,n,e,t);if(s){const l=r.selection.from+1;r.replaceSelectionWith(o).scrollIntoView().setSelection(A.near(r.doc.resolve(l)))}return!0},addColumnBefore:()=>({state:n,dispatch:e})=>Ng(n,e),addColumnAfter:()=>({state:n,dispatch:e})=>Rg(n,e),deleteColumn:()=>({state:n,dispatch:e})=>Ig(n,e),addRowBefore:()=>({state:n,dispatch:e})=>Pg(n,e),addRowAfter:()=>({state:n,dispatch:e})=>Lg(n,e),deleteRow:()=>({state:n,dispatch:e})=>zg(n,e),deleteTable:()=>({state:n,dispatch:e})=>Kg(n,e),mergeCells:()=>({state:n,dispatch:e})=>Uc(n,e),splitCell:()=>({state:n,dispatch:e})=>qc(n,e),toggleHeaderColumn:()=>({state:n,dispatch:e})=>vn("column")(n,e),toggleHeaderRow:()=>({state:n,dispatch:e})=>vn("row")(n,e),toggleHeaderCell:()=>({state:n,dispatch:e})=>Wg(n,e),mergeOrSplit:()=>({state:n,dispatch:e})=>Uc(n,e)?!0:qc(n,e),setCellAttribute:(n,e)=>({state:t,dispatch:r})=>$g(n,e)(t,r),goToNextCell:()=>({state:n,dispatch:e})=>Gc(1)(n,e),goToPreviousCell:()=>({state:n,dispatch:e})=>Gc(-1)(n,e),fixTables:()=>({state:n,dispatch:e})=>(e&&Wc(n),!0),setCellSelection:n=>({tr:e,dispatch:t})=>{if(t){const r=L.create(e.doc,n.anchorCell,n.headCell);e.setSelection(r)}return!0}}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.goToNextCell()?!0:this.editor.can().addRowAfter()?this.editor.chain().addRowAfter().goToNextCell().run():!1,"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:ns,"Mod-Backspace":ns,Delete:ns,"Mod-Delete":ns}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[ey({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],dy({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(n){const e={name:n.name,options:n.options,storage:n.storage};return{tableRole:O(C(n,"tableRole",e))}}}),yy=H.create({name:"tableCell",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:n=>{const e=n.getAttribute("colwidth");return e?e.split(",").map(r=>parseInt(r,10)):null}}}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td"}]},renderHTML({HTMLAttributes:n}){return["td",v(this.options.HTMLAttributes,n),0]}}),by=H.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:n=>{const e=n.getAttribute("colwidth");return e?e.split(",").map(r=>parseInt(r,10)):null}}}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th"}]},renderHTML({HTMLAttributes:n}){return["th",v(this.options.HTMLAttributes,n),0]}}),ky=H.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:n}){return["tr",v(this.options.HTMLAttributes,n),0]}}),Sy=_.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:null}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:n=>{const e=n.style.textAlign;return this.options.alignments.includes(e)?e:this.options.defaultAlignment},renderHTML:n=>n.textAlign?{style:`text-align: ${n.textAlign}`}:{}}}}]},addCommands(){return{setTextAlign:n=>({commands:e})=>this.options.alignments.includes(n)?this.options.types.map(t=>e.updateAttributes(t,{textAlign:n})).every(t=>t):!1,unsetTextAlign:()=>({commands:n})=>this.options.types.map(e=>n.resetAttributes(e,"textAlign")).every(e=>e)}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}}),xy=ue.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:n=>n.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["u",v(this.options.HTMLAttributes,n),0]},addCommands(){return{setUnderline:()=>({commands:n})=>n.setMark(this.name),toggleUnderline:()=>({commands:n})=>n.toggleMark(this.name),unsetUnderline:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),Cy=H.create({name:"umbEmbeddedMedia",group(){return this.options.inline?"inline":"block"},inline(){return this.options.inline},atom:!0,marks:"",draggable:!0,selectable:!0,addAttributes(){return{"data-embed-constrain":{default:!1},"data-embed-height":{default:240},"data-embed-url":{default:null},"data-embed-width":{default:360},markup:{default:null}}},parseHTML(){return[{tag:"div",class:"umb-embed-holder",getAttrs:n=>({markup:n.innerHTML})}]},renderHTML({HTMLAttributes:n}){const{markup:e,...t}=n,r=document.createRange().createContextualFragment(e);return["div",v({class:"umb-embed-holder"},t),r]},addCommands(){return{setEmbeddedMedia:n=>({commands:e})=>{const t={markup:n.markup,"data-embed-url":n.url,"data-embed-width":n.width,"data-embed-height":n.height,"data-embed-constrain":n.constrain};return e.insertContent({type:this.name,attrs:t})}}}}),wy=H.create({name:"figcaption",addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",selectable:!1,draggable:!1,parseHTML(){return[{tag:"figcaption"}]},renderHTML({HTMLAttributes:n}){return[this.name,n,0]}}),My=H.create({name:"figure",group:"block",content:"block+",draggable:!0,selectable:!0,isolating:!0,atom:!0,addAttributes(){return{figcaption:{default:""}}},addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"figure",getAttrs:n=>({figcaption:n.querySelector("figcaption")?.textContent||""})}]},renderHTML({HTMLAttributes:n}){return[this.name,v(this.options.HTMLAttributes,n),0]}}),Ty=xc.extend({addAttributes(){return{...this.parent?.(),width:{default:"100%"},height:{default:null},loading:{default:null},srcset:{default:null},sizes:{default:null},"data-tmpimg":{default:null},"data-udi":{default:null}}}}),Ay=Hc.extend({name:"umbLink",addAttributes(){return{...this.parent?.(),"data-anchor":{default:null},title:{default:null},type:{default:"external"}}},addOptions(){return{...this.parent?.(),HTMLAttributes:{target:"","data-router-slot":"disabled"}}},addCommands(){return{setUmbLink:n=>({chain:e})=>e().setMark(this.name,n).setMeta("preventAutolink",!0).run(),unsetUmbLink:()=>({chain:n})=>n().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}}});export{ec as Blockquote,tc as Bold,sc as BulletList,ic as Code,oc as CodeBlock,fn as CommandManager,Wp as Editor,_ as Extension,wy as Figcaption,My as Figure,lc as Heading,pc as HorizontalRule,xc as Image,zt as InputRule,mc as Italic,Hc as Link,gc as ListItem,ue as Mark,H as Node,it as NodePos,Jp as NodeView,kc as OrderedList,lr as PasteRule,$m as Placeholder,Fm as StarterKit,Sc as Strike,fg as Subscript,hg as Superscript,gy as Table,yy as TableCell,by as TableHeader,ky as TableRow,Sy as TextAlign,Wm as TextStyle,Yp as Tracker,Ty as UmbImage,Ay as UmbLink,xy as Underline,O as callOrReturn,La as combineTransactionSteps,un as createChainableState,fr as createDocument,bn as createNodeFromContent,Za as createStyleTag,Ba as defaultBlockAt,ai as deleteProps,Ht as elementFromString,Up as escapeForRegEx,$p as extensions,dp as findChildren,za as findChildrenInRange,Na as findDuplicates,Sn as findParentNode,di as findParentNodeClosestToPos,wa as fromString,up as generateHTML,fp as generateJSON,hp as generateText,fi as getAttributes,Zs as getAttributesFromExtensions,$a as getChangedRanges,Va as getDebugJSON,C as getExtensionField,pn as getHTMLFromFragment,ci as getMarkAttributes,dr as getMarkRange,ze as getMarkType,pr as getMarksBetween,mp as getNodeAtPosition,Ha as getNodeAttributes,U as getNodeType,rr as getRenderedAttributes,hr as getSchema,ni as getSchemaByResolvedExtensions,sr as getSchemaTypeByName,kn as getSchemaTypeNameByName,xn as getSplittedAttributes,ui as getText,si as getTextBetween,Ta as getTextContentFromNodes,cr as getTextSerializersFromSchema,ti as injectExtensionAttributesToParseRule,Aa as inputRulesPlugin,Wa as isActive,gp as isAtEndOfNode,yp as isAtStartOfNode,Ca as isEmptyObject,ri as isExtensionRulesEnabled,ei as isFunction,hi as isList,li as isMacOS,mr as isMarkActive,Ft as isNodeActive,Cn as isNodeEmpty,ja as isNodeSelection,Ea as isNumber,mn as isPlainObject,ir as isRegExp,qp as isString,ii as isTextSelection,ur as isiOS,yt as markInputRule,Ye as markPasteRule,v as mergeAttributes,gn as mergeDeep,Oe as minMax,gi as nodeInputRule,_p as nodePasteRule,yn as objectIncludes,Oa as pasteRulesPlugin,bp as posToDOMRect,Fa as removeDuplicates,oi as resolveFocusPosition,kp as rewriteUnknownContent,Pa as selectionToInsertionEnd,hn as splitExtensions,jp as textInputRule,Gp as textPasteRule,gr as textblockTypeInputRule,Cy as umbEmbeddedMedia,$t as wrappingInputRule};
99
+ 3. "-" cannot repeat`);H.customSchemes.push([n,e])}function bg(){H.scanner=dg(H.customSchemes);for(let n=0;n<H.tokenQueue.length;n++)H.tokenQueue[n][1]({scanner:H.scanner});H.parser=hg(H.scanner.tokens);for(let n=0;n<H.pluginQueue.length;n++)H.pluginQueue[n][1]({scanner:H.scanner,parser:H.parser});return H.initialized=!0,H}function Ui(n){return H.initialized||bg(),pg(H.parser.start,n,Kc(H.scanner.start,n))}Ui.scan=Kc;function Xc(n,e=null,t=null){if(e&&typeof e=="object"){if(t)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);t=e,e=null}const r=new ji(t),s=Ui(n),i=[];for(let o=0;o<s.length;o++){const l=s[o];l.isLink&&(!e||l.t===e)&&r.check(l)&&i.push(l.toFormattedObject(r))}return i}function kg(n){return n.length===1?n[0].isLink:n.length===3&&n[1].isLink?["()","[]"].includes(n[0].value+n[2].value):!1}function Sg(n){return new V({key:new _("autolink"),appendTransaction:(e,t,r)=>{const s=e.some(c=>c.docChanged)&&!t.doc.eq(r.doc),i=e.some(c=>c.getMeta("preventAutolink"));if(!s||i)return;const{tr:o}=r,l=Ga(t.doc,[...e]);if(ec(l).forEach(({newRange:c})=>{const d=Xa(r.doc,c,h=>h.isTextblock);let u,f;if(d.length>1?(u=d[0],f=r.doc.textBetween(u.pos,u.pos+u.node.nodeSize,void 0," ")):d.length&&r.doc.textBetween(c.from,c.to," "," ").endsWith(" ")&&(u=d[0],f=r.doc.textBetween(u.pos,c.to,void 0," ")),u&&f){const h=f.split(" ").filter(y=>y!=="");if(h.length<=0)return!1;const p=h[h.length-1],m=u.pos+f.lastIndexOf(p);if(!p)return!1;const g=Ui(p).map(y=>y.toObject(n.defaultProtocol));if(!kg(g))return!1;g.filter(y=>y.isLink).map(y=>({...y,from:m+y.start+1,to:m+y.end+1})).filter(y=>r.schema.marks.code?!r.doc.rangeHasMark(y.from,y.to,r.schema.marks.code):!0).filter(y=>n.validate(y.value)).filter(y=>n.shouldAutoLink(y.value)).forEach(y=>{hr(y.from,y.to,r.doc).some(k=>k.mark.type===n.type)||o.addMark(y.from,y.to,n.type.create({href:y.href}))})}}),!!o.steps.length)return o}})}function wg(n){return new V({key:new _("handleClickLink"),props:{handleClick:(e,t,r)=>{var s,i;if(r.button!==0||!e.editable)return!1;let o=r.target;const l=[];for(;o.nodeName!=="DIV";)l.push(o),o=o.parentNode;if(!l.find(f=>f.nodeName==="A"))return!1;const a=gi(e.state,n.type.name),c=r.target,d=(s=c?.href)!==null&&s!==void 0?s:a.href,u=(i=c?.target)!==null&&i!==void 0?i:a.target;return c&&d?(window.open(d,u),!0):!1}}})}function Cg(n){return new V({key:new _("handlePasteLink"),props:{handlePaste:(e,t,r)=>{const{state:s}=e,{selection:i}=s,{empty:o}=i;if(o)return!1;let l="";r.content.forEach(c=>{l+=c.textContent});const a=Xc(l,{defaultProtocol:n.defaultProtocol}).find(c=>c.isLink&&c.value===l);return!l||!a?!1:n.editor.commands.setMark(n.type,{href:a.href})}}})}const xg=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g;function wt(n,e){const t=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(r=>{const s=typeof r=="string"?r:r.scheme;s&&t.push(s)}),!n||n.replace(xg,"").match(new RegExp(`^(?:(?:${t.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}const Qc=ce.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(n=>{if(typeof n=="string"){Yc(n);return}Yc(n.scheme,n.optionalSlashes)})},onDestroy(){yg()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(n,e)=>!!wt(n,e.protocols),validate:n=>!!n,shouldAutoLink:n=>!!n}},addAttributes(){return{href:{default:null,parseHTML(n){return n.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:n=>{const e=n.getAttribute("href");return!e||!this.options.isAllowedUri(e,{defaultValidate:t=>!!wt(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:n}){return this.options.isAllowedUri(n.href,{defaultValidate:e=>!!wt(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",I(this.options.HTMLAttributes,n),0]:["a",I(this.options.HTMLAttributes,{...n,href:""}),0]},addCommands(){return{setLink:n=>({chain:e})=>{const{href:t}=n;return this.options.isAllowedUri(t,{defaultValidate:r=>!!wt(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().setMark(this.name,n).setMeta("preventAutolink",!0).run():!1},toggleLink:n=>({chain:e})=>{const{href:t}=n;return this.options.isAllowedUri(t,{defaultValidate:r=>!!wt(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().toggleMark(this.name,n,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run():!1},unsetLink:()=>({chain:n})=>n().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[Xe({find:n=>{const e=[];if(n){const{protocols:t,defaultProtocol:r}=this.options,s=Xc(n).filter(i=>i.isLink&&this.options.isAllowedUri(i.value,{defaultValidate:o=>!!wt(o,t),protocols:t,defaultProtocol:r}));s.length&&s.forEach(i=>e.push({text:i.value,data:{href:i.href},index:i.start}))}return e},type:this.type,getAttributes:n=>{var e;return{href:(e=n.data)===null||e===void 0?void 0:e.href}}})]},addProseMirrorPlugins(){const n=[],{protocols:e,defaultProtocol:t}=this.options;return this.options.autolink&&n.push(Sg({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:s=>!!wt(s,e),protocols:e,defaultProtocol:t}),shouldAutoLink:this.options.shouldAutoLink})),this.options.openOnClick===!0&&n.push(wg({type:this.type})),this.options.linkOnPaste&&n.push(Cg({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type})),n}}),Mg=ce.create({name:"subscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sub"},{style:"vertical-align",getAttrs(n){return n!=="sub"?!1:null}}]},renderHTML({HTMLAttributes:n}){return["sub",I(this.options.HTMLAttributes,n),0]},addCommands(){return{setSubscript:()=>({commands:n})=>n.setMark(this.name),toggleSubscript:()=>({commands:n})=>n.toggleMark(this.name),unsetSubscript:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-,":()=>this.editor.commands.toggleSubscript()}}}),Tg=ce.create({name:"superscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sup"},{style:"vertical-align",getAttrs(n){return n!=="super"?!1:null}}]},renderHTML({HTMLAttributes:n}){return["sup",I(this.options.HTMLAttributes,n),0]},addCommands(){return{setSuperscript:()=>({commands:n})=>n.setMark(this.name),toggleSuperscript:()=>({commands:n})=>n.toggleMark(this.name),unsetSuperscript:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-.":()=>this.editor.commands.toggleSuperscript()}}});var Ji,qi;if(typeof WeakMap<"u"){let n=new WeakMap;Ji=e=>n.get(e),qi=(e,t)=>(n.set(e,t),t)}else{const n=[];let t=0;Ji=r=>{for(let s=0;s<n.length;s+=2)if(n[s]==r)return n[s+1]},qi=(r,s)=>(t==10&&(t=0),n[t++]=r,n[t++]=s)}var L=class{constructor(n,e,t,r){this.width=n,this.height=e,this.map=t,this.problems=r}findCell(n){for(let e=0;e<this.map.length;e++){const t=this.map[e];if(t!=n)continue;const r=e%this.width,s=e/this.width|0;let i=r+1,o=s+1;for(let l=1;i<this.width&&this.map[e+l]==t;l++)i++;for(let l=1;o<this.height&&this.map[e+this.width*l]==t;l++)o++;return{left:r,top:s,right:i,bottom:o}}throw new RangeError(`No cell with offset ${n} found`)}colCount(n){for(let e=0;e<this.map.length;e++)if(this.map[e]==n)return e%this.width;throw new RangeError(`No cell with offset ${n} found`)}nextCell(n,e,t){const{left:r,right:s,top:i,bottom:o}=this.findCell(n);return e=="horiz"?(t<0?r==0:s==this.width)?null:this.map[i*this.width+(t<0?r-1:s)]:(t<0?i==0:o==this.height)?null:this.map[r+this.width*(t<0?i-1:o)]}rectBetween(n,e){const{left:t,right:r,top:s,bottom:i}=this.findCell(n),{left:o,right:l,top:a,bottom:c}=this.findCell(e);return{left:Math.min(t,o),top:Math.min(s,a),right:Math.max(r,l),bottom:Math.max(i,c)}}cellsInRect(n){const e=[],t={};for(let r=n.top;r<n.bottom;r++)for(let s=n.left;s<n.right;s++){const i=r*this.width+s,o=this.map[i];t[o]||(t[o]=!0,!(s==n.left&&s&&this.map[i-1]==o||r==n.top&&r&&this.map[i-this.width]==o)&&e.push(o))}return e}positionAt(n,e,t){for(let r=0,s=0;;r++){const i=s+t.child(r).nodeSize;if(r==n){let o=e+n*this.width;const l=(n+1)*this.width;for(;o<l&&this.map[o]<s;)o++;return o==l?i-1:this.map[o]}s=i}}static get(n){return Ji(n)||qi(n,Ag(n))}};function Ag(n){if(n.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+n.type.name);const e=Eg(n),t=n.childCount,r=[];let s=0,i=null;const o=[];for(let c=0,d=e*t;c<d;c++)r[c]=0;for(let c=0,d=0;c<t;c++){const u=n.child(c);d++;for(let p=0;;p++){for(;s<r.length&&r[s]!=0;)s++;if(p==u.childCount)break;const m=u.child(p),{colspan:g,rowspan:y,colwidth:k}=m.attrs;for(let A=0;A<y;A++){if(A+c>=t){(i||(i=[])).push({type:"overlong_rowspan",pos:d,n:y-A});break}const R=s+A*e;for(let M=0;M<g;M++){r[R+M]==0?r[R+M]=d:(i||(i=[])).push({type:"collision",row:c,pos:d,n:g-M});const v=k&&k[M];if(v){const F=(R+M)%e*2,K=o[F];K==null||K!=v&&o[F+1]==1?(o[F]=v,o[F+1]=1):K==v&&o[F+1]++}}}s+=g,d+=m.nodeSize}const f=(c+1)*e;let h=0;for(;s<f;)r[s++]==0&&h++;h&&(i||(i=[])).push({type:"missing",row:c,n:h}),d++}(e===0||t===0)&&(i||(i=[])).push({type:"zero_sized"});const l=new L(e,t,r,i);let a=!1;for(let c=0;!a&&c<o.length;c+=2)o[c]!=null&&o[c+1]<t&&(a=!0);return a&&Og(l,o,n),l}function Eg(n){let e=-1,t=!1;for(let r=0;r<n.childCount;r++){const s=n.child(r);let i=0;if(t)for(let o=0;o<r;o++){const l=n.child(o);for(let a=0;a<l.childCount;a++){const c=l.child(a);o+c.attrs.rowspan>r&&(i+=c.attrs.colspan)}}for(let o=0;o<s.childCount;o++){const l=s.child(o);i+=l.attrs.colspan,l.attrs.rowspan>1&&(t=!0)}e==-1?e=i:e!=i&&(e=Math.max(e,i))}return e}function Og(n,e,t){n.problems||(n.problems=[]);const r={};for(let s=0;s<n.map.length;s++){const i=n.map[s];if(r[i])continue;r[i]=!0;const o=t.nodeAt(i);if(!o)throw new RangeError(`No cell with offset ${i} found`);let l=null;const a=o.attrs;for(let c=0;c<a.colspan;c++){const d=(s+c)%n.width,u=e[d*2];u!=null&&(!a.colwidth||a.colwidth[c]!=u)&&((l||(l=Ng(a)))[c]=u)}l&&n.problems.unshift({type:"colwidth mismatch",pos:i,colwidth:l})}}function Ng(n){if(n.colwidth)return n.colwidth.slice();const e=[];for(let t=0;t<n.colspan;t++)e.push(0);return e}function ie(n){let e=n.cached.tableNodeTypes;if(!e){e=n.cached.tableNodeTypes={};for(const t in n.nodes){const r=n.nodes[t],s=r.spec.tableRole;s&&(e[s]=r)}}return e}var nt=new _("selectingCells");function Kt(n){for(let e=n.depth-1;e>0;e--)if(n.node(e).type.spec.tableRole=="row")return n.node(0).resolve(n.before(e+1));return null}function vg(n){for(let e=n.depth;e>0;e--){const t=n.node(e).type.spec.tableRole;if(t==="cell"||t==="header_cell")return n.node(e)}return null}function Ce(n){const e=n.selection.$head;for(let t=e.depth;t>0;t--)if(e.node(t).type.spec.tableRole=="row")return!0;return!1}function Yr(n){const e=n.selection;if("$anchorCell"in e&&e.$anchorCell)return e.$anchorCell.pos>e.$headCell.pos?e.$anchorCell:e.$headCell;if("node"in e&&e.node&&e.node.type.spec.tableRole=="cell")return e.$anchor;const t=Kt(e.$head)||Rg(e.$head);if(t)return t;throw new RangeError(`No cell found around position ${e.head}`)}function Rg(n){for(let e=n.nodeAfter,t=n.pos;e;e=e.firstChild,t++){const r=e.type.spec.tableRole;if(r=="cell"||r=="header_cell")return n.doc.resolve(t)}for(let e=n.nodeBefore,t=n.pos;e;e=e.lastChild,t--){const r=e.type.spec.tableRole;if(r=="cell"||r=="header_cell")return n.doc.resolve(t-e.nodeSize)}}function _i(n){return n.parent.type.spec.tableRole=="row"&&!!n.nodeAfter}function Dg(n){return n.node(0).resolve(n.pos+n.nodeAfter.nodeSize)}function Gi(n,e){return n.depth==e.depth&&n.pos>=e.start(-1)&&n.pos<=e.end(-1)}function Zc(n,e,t){const r=n.node(-1),s=L.get(r),i=n.start(-1),o=s.nextCell(n.pos-i,e,t);return o==null?null:n.node(0).resolve(i+o)}function Ct(n,e,t=1){const r={...n,colspan:n.colspan-t};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(e,t),r.colwidth.some(s=>s>0)||(r.colwidth=null)),r}function ed(n,e,t=1){const r={...n,colspan:n.colspan+t};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let s=0;s<t;s++)r.colwidth.splice(e,0,0)}return r}function Ig(n,e,t){const r=ie(e.type.schema).header_cell;for(let s=0;s<n.height;s++)if(e.nodeAt(n.map[t+s*n.width]).type!=r)return!1;return!0}var P=class We extends E{constructor(e,t=e){const r=e.node(-1),s=L.get(r),i=e.start(-1),o=s.rectBetween(e.pos-i,t.pos-i),l=e.node(0),a=s.cellsInRect(o).filter(d=>d!=t.pos-i);a.unshift(t.pos-i);const c=a.map(d=>{const u=r.nodeAt(d);if(!u)throw RangeError(`No cell with offset ${d} found`);const f=i+d+1;return new el(l.resolve(f),l.resolve(f+u.content.size))});super(c[0].$from,c[0].$to,c),this.$anchorCell=e,this.$headCell=t}map(e,t){const r=e.resolve(t.map(this.$anchorCell.pos)),s=e.resolve(t.map(this.$headCell.pos));if(_i(r)&&_i(s)&&Gi(r,s)){const i=this.$anchorCell.node(-1)!=r.node(-1);return i&&this.isRowSelection()?We.rowSelection(r,s):i&&this.isColSelection()?We.colSelection(r,s):new We(r,s)}return T.between(r,s)}content(){const e=this.$anchorCell.node(-1),t=L.get(e),r=this.$anchorCell.start(-1),s=t.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r),i={},o=[];for(let a=s.top;a<s.bottom;a++){const c=[];for(let d=a*t.width+s.left,u=s.left;u<s.right;u++,d++){const f=t.map[d];if(i[f])continue;i[f]=!0;const h=t.findCell(f);let p=e.nodeAt(f);if(!p)throw RangeError(`No cell with offset ${f} found`);const m=s.left-h.left,g=h.right-s.right;if(m>0||g>0){let y=p.attrs;if(m>0&&(y=Ct(y,0,m)),g>0&&(y=Ct(y,y.colspan-g,g)),h.left<s.left){if(p=p.type.createAndFill(y),!p)throw RangeError(`Could not create cell with attrs ${JSON.stringify(y)}`)}else p=p.type.create(y,p.content)}if(h.top<s.top||h.bottom>s.bottom){const y={...p.attrs,rowspan:Math.min(h.bottom,s.bottom)-Math.max(h.top,s.top)};h.top<s.top?p=p.type.createAndFill(y):p=p.type.create(y,p.content)}c.push(p)}o.push(e.child(a).copy(b.from(c)))}const l=this.isColSelection()&&this.isRowSelection()?e:o;return new w(b.from(l),1,1)}replace(e,t=w.empty){const r=e.steps.length,s=this.ranges;for(let o=0;o<s.length;o++){const{$from:l,$to:a}=s[o],c=e.mapping.slice(r);e.replace(c.map(l.pos),c.map(a.pos),o?w.empty:t)}const i=E.findFrom(e.doc.resolve(e.mapping.slice(r).map(this.to)),-1);i&&e.setSelection(i)}replaceWith(e,t){this.replace(e,new w(b.from(t),0,0))}forEachCell(e){const t=this.$anchorCell.node(-1),r=L.get(t),s=this.$anchorCell.start(-1),i=r.cellsInRect(r.rectBetween(this.$anchorCell.pos-s,this.$headCell.pos-s));for(let o=0;o<i.length;o++)e(t.nodeAt(i[o]),s+i[o])}isColSelection(){const e=this.$anchorCell.index(-1),t=this.$headCell.index(-1);if(Math.min(e,t)>0)return!1;const r=e+this.$anchorCell.nodeAfter.attrs.rowspan,s=t+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(r,s)==this.$headCell.node(-1).childCount}static colSelection(e,t=e){const r=e.node(-1),s=L.get(r),i=e.start(-1),o=s.findCell(e.pos-i),l=s.findCell(t.pos-i),a=e.node(0);return o.top<=l.top?(o.top>0&&(e=a.resolve(i+s.map[o.left])),l.bottom<s.height&&(t=a.resolve(i+s.map[s.width*(s.height-1)+l.right-1]))):(l.top>0&&(t=a.resolve(i+s.map[l.left])),o.bottom<s.height&&(e=a.resolve(i+s.map[s.width*(s.height-1)+o.right-1]))),new We(e,t)}isRowSelection(){const e=this.$anchorCell.node(-1),t=L.get(e),r=this.$anchorCell.start(-1),s=t.colCount(this.$anchorCell.pos-r),i=t.colCount(this.$headCell.pos-r);if(Math.min(s,i)>0)return!1;const o=s+this.$anchorCell.nodeAfter.attrs.colspan,l=i+this.$headCell.nodeAfter.attrs.colspan;return Math.max(o,l)==t.width}eq(e){return e instanceof We&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,t=e){const r=e.node(-1),s=L.get(r),i=e.start(-1),o=s.findCell(e.pos-i),l=s.findCell(t.pos-i),a=e.node(0);return o.left<=l.left?(o.left>0&&(e=a.resolve(i+s.map[o.top*s.width])),l.right<s.width&&(t=a.resolve(i+s.map[s.width*(l.top+1)-1]))):(l.left>0&&(t=a.resolve(i+s.map[l.top*s.width])),o.right<s.width&&(e=a.resolve(i+s.map[s.width*(o.top+1)-1]))),new We(e,t)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(e,t){return new We(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,r=t){return new We(e.resolve(t),e.resolve(r))}getBookmark(){return new Lg(this.$anchorCell.pos,this.$headCell.pos)}};P.prototype.visible=!1,E.jsonID("cell",P);var Lg=class Ed{constructor(e,t){this.anchor=e,this.head=t}map(e){return new Ed(e.map(this.anchor),e.map(this.head))}resolve(e){const t=e.resolve(this.anchor),r=e.resolve(this.head);return t.parent.type.spec.tableRole=="row"&&r.parent.type.spec.tableRole=="row"&&t.index()<t.parent.childCount&&r.index()<r.parent.childCount&&Gi(t,r)?new P(t,r):E.near(r,1)}};function Pg(n){if(!(n.selection instanceof P))return null;const e=[];return n.selection.forEachCell((t,r)=>{e.push(X.node(r,r+t.nodeSize,{class:"selectedCell"}))}),z.create(n.doc,e)}function Bg({$from:n,$to:e}){if(n.pos==e.pos||n.pos<e.pos-6)return!1;let t=n.pos,r=e.pos,s=n.depth;for(;s>=0&&!(n.after(s+1)<n.end(s));s--,t++);for(let i=e.depth;i>=0&&!(e.before(i+1)>e.start(i));i--,r--);return t==r&&/row|table/.test(n.node(s).type.spec.tableRole)}function zg({$from:n,$to:e}){let t,r;for(let s=n.depth;s>0;s--){const i=n.node(s);if(i.type.spec.tableRole==="cell"||i.type.spec.tableRole==="header_cell"){t=i;break}}for(let s=e.depth;s>0;s--){const i=e.node(s);if(i.type.spec.tableRole==="cell"||i.type.spec.tableRole==="header_cell"){r=i;break}}return t!==r&&e.parentOffset===0}function Hg(n,e,t){const r=(e||n).selection,s=(e||n).doc;let i,o;if(r instanceof x&&(o=r.node.type.spec.tableRole)){if(o=="cell"||o=="header_cell")i=P.create(s,r.from);else if(o=="row"){const l=s.resolve(r.from+1);i=P.rowSelection(l,l)}else if(!t){const l=L.get(r.node),a=r.from+1,c=a+l.map[l.width*l.height-1];i=P.create(s,a+1,c)}}else r instanceof T&&Bg(r)?i=T.create(s,r.from):r instanceof T&&zg(r)&&(i=T.create(s,r.$from.start(),r.$from.end()));return i&&(e||(e=n.tr)).setSelection(i),e}var Fg=new _("fix-tables");function td(n,e,t,r){const s=n.childCount,i=e.childCount;e:for(let o=0,l=0;o<i;o++){const a=e.child(o);for(let c=l,d=Math.min(s,o+3);c<d;c++)if(n.child(c)==a){l=c+1,t+=a.nodeSize;continue e}r(a,t),l<s&&n.child(l).sameMarkup(a)?td(n.child(l),a,t+1,r):a.nodesBetween(0,a.content.size,r,t+1),t+=a.nodeSize}}function nd(n,e){let t;const r=(s,i)=>{s.type.spec.tableRole=="table"&&(t=$g(n,s,i,t))};return e?e.doc!=n.doc&&td(e.doc,n.doc,0,r):n.doc.descendants(r),t}function $g(n,e,t,r){const s=L.get(e);if(!s.problems)return r;r||(r=n.tr);const i=[];for(let a=0;a<s.height;a++)i.push(0);for(let a=0;a<s.problems.length;a++){const c=s.problems[a];if(c.type=="collision"){const d=e.nodeAt(c.pos);if(!d)continue;const u=d.attrs;for(let f=0;f<u.rowspan;f++)i[c.row+f]+=c.n;r.setNodeMarkup(r.mapping.map(t+1+c.pos),null,Ct(u,u.colspan-c.n,c.n))}else if(c.type=="missing")i[c.row]+=c.n;else if(c.type=="overlong_rowspan"){const d=e.nodeAt(c.pos);if(!d)continue;r.setNodeMarkup(r.mapping.map(t+1+c.pos),null,{...d.attrs,rowspan:d.attrs.rowspan-c.n})}else if(c.type=="colwidth mismatch"){const d=e.nodeAt(c.pos);if(!d)continue;r.setNodeMarkup(r.mapping.map(t+1+c.pos),null,{...d.attrs,colwidth:c.colwidth})}else if(c.type=="zero_sized"){const d=r.mapping.map(t);r.delete(d,d+e.nodeSize)}}let o,l;for(let a=0;a<i.length;a++)i[a]&&(o==null&&(o=a),l=a);for(let a=0,c=t+1;a<s.height;a++){const d=e.child(a),u=c+d.nodeSize,f=i[a];if(f>0){let h="cell";d.firstChild&&(h=d.firstChild.type.spec.tableRole);const p=[];for(let g=0;g<f;g++){const y=ie(n.schema)[h].createAndFill();y&&p.push(y)}const m=(a==0||o==a-1)&&l==a?c+1:u-1;r.insert(r.mapping.map(m),p)}c=u}return r.setMeta(Fg,{fixTables:!0})}function ve(n){const e=n.selection,t=Yr(n),r=t.node(-1),s=t.start(-1),i=L.get(r);return{...e instanceof P?i.rectBetween(e.$anchorCell.pos-s,e.$headCell.pos-s):i.findCell(t.pos-s),tableStart:s,map:i,table:r}}function rd(n,{map:e,tableStart:t,table:r},s){let i=s>0?-1:0;Ig(e,r,s+i)&&(i=s==0||s==e.width?null:0);for(let o=0;o<e.height;o++){const l=o*e.width+s;if(s>0&&s<e.width&&e.map[l-1]==e.map[l]){const a=e.map[l],c=r.nodeAt(a);n.setNodeMarkup(n.mapping.map(t+a),null,ed(c.attrs,s-e.colCount(a))),o+=c.attrs.rowspan-1}else{const a=i==null?ie(r.type.schema).cell:r.nodeAt(e.map[l+i]).type,c=e.positionAt(o,s,r);n.insert(n.mapping.map(t+c),a.createAndFill())}}return n}function Vg(n,e){if(!Ce(n))return!1;if(e){const t=ve(n);e(rd(n.tr,t,t.left))}return!0}function Wg(n,e){if(!Ce(n))return!1;if(e){const t=ve(n);e(rd(n.tr,t,t.right))}return!0}function jg(n,{map:e,table:t,tableStart:r},s){const i=n.mapping.maps.length;for(let o=0;o<e.height;){const l=o*e.width+s,a=e.map[l],c=t.nodeAt(a),d=c.attrs;if(s>0&&e.map[l-1]==a||s<e.width-1&&e.map[l+1]==a)n.setNodeMarkup(n.mapping.slice(i).map(r+a),null,Ct(d,s-e.colCount(a)));else{const u=n.mapping.slice(i).map(r+a);n.delete(u,u+c.nodeSize)}o+=d.rowspan}}function Kg(n,e){if(!Ce(n))return!1;if(e){const t=ve(n),r=n.tr;if(t.left==0&&t.right==t.map.width)return!1;for(let s=t.right-1;jg(r,t,s),s!=t.left;s--){const i=t.tableStart?r.doc.nodeAt(t.tableStart-1):r.doc;if(!i)throw RangeError("No table found");t.table=i,t.map=L.get(i)}e(r)}return!0}function Ug(n,e,t){var r;const s=ie(e.type.schema).header_cell;for(let i=0;i<n.width;i++)if(((r=e.nodeAt(n.map[i+t*n.width]))==null?void 0:r.type)!=s)return!1;return!0}function sd(n,{map:e,tableStart:t,table:r},s){var i;let o=t;for(let c=0;c<s;c++)o+=r.child(c).nodeSize;const l=[];let a=s>0?-1:0;Ug(e,r,s+a)&&(a=s==0||s==e.height?null:0);for(let c=0,d=e.width*s;c<e.width;c++,d++)if(s>0&&s<e.height&&e.map[d]==e.map[d-e.width]){const u=e.map[d],f=r.nodeAt(u).attrs;n.setNodeMarkup(t+u,null,{...f,rowspan:f.rowspan+1}),c+=f.colspan-1}else{const u=a==null?ie(r.type.schema).cell:(i=r.nodeAt(e.map[d+a*e.width]))==null?void 0:i.type,f=u?.createAndFill();f&&l.push(f)}return n.insert(o,ie(r.type.schema).row.create(null,l)),n}function Jg(n,e){if(!Ce(n))return!1;if(e){const t=ve(n);e(sd(n.tr,t,t.top))}return!0}function qg(n,e){if(!Ce(n))return!1;if(e){const t=ve(n);e(sd(n.tr,t,t.bottom))}return!0}function _g(n,{map:e,table:t,tableStart:r},s){let i=0;for(let c=0;c<s;c++)i+=t.child(c).nodeSize;const o=i+t.child(s).nodeSize,l=n.mapping.maps.length;n.delete(i+r,o+r);const a=new Set;for(let c=0,d=s*e.width;c<e.width;c++,d++){const u=e.map[d];if(!a.has(u)){if(a.add(u),s>0&&u==e.map[d-e.width]){const f=t.nodeAt(u).attrs;n.setNodeMarkup(n.mapping.slice(l).map(u+r),null,{...f,rowspan:f.rowspan-1}),c+=f.colspan-1}else if(s<e.height&&u==e.map[d+e.width]){const f=t.nodeAt(u),h=f.attrs,p=f.type.create({...h,rowspan:f.attrs.rowspan-1},f.content),m=e.positionAt(s+1,c,t);n.insert(n.mapping.slice(l).map(r+m),p),c+=h.colspan-1}}}}function Gg(n,e){if(!Ce(n))return!1;if(e){const t=ve(n),r=n.tr;if(t.top==0&&t.bottom==t.map.height)return!1;for(let s=t.bottom-1;_g(r,t,s),s!=t.top;s--){const i=t.tableStart?r.doc.nodeAt(t.tableStart-1):r.doc;if(!i)throw RangeError("No table found");t.table=i,t.map=L.get(t.table)}e(r)}return!0}function id(n){const e=n.content;return e.childCount==1&&e.child(0).isTextblock&&e.child(0).childCount==0}function Yg({width:n,height:e,map:t},r){let s=r.top*n+r.left,i=s,o=(r.bottom-1)*n+r.left,l=s+(r.right-r.left-1);for(let a=r.top;a<r.bottom;a++){if(r.left>0&&t[i]==t[i-1]||r.right<n&&t[l]==t[l+1])return!0;i+=n,l+=n}for(let a=r.left;a<r.right;a++){if(r.top>0&&t[s]==t[s-n]||r.bottom<e&&t[o]==t[o+n])return!0;s++,o++}return!1}function od(n,e){const t=n.selection;if(!(t instanceof P)||t.$anchorCell.pos==t.$headCell.pos)return!1;const r=ve(n),{map:s}=r;if(Yg(s,r))return!1;if(e){const i=n.tr,o={};let l=b.empty,a,c;for(let d=r.top;d<r.bottom;d++)for(let u=r.left;u<r.right;u++){const f=s.map[d*s.width+u],h=r.table.nodeAt(f);if(!(o[f]||!h))if(o[f]=!0,a==null)a=f,c=h;else{id(h)||(l=l.append(h.content));const p=i.mapping.map(f+r.tableStart);i.delete(p,p+h.nodeSize)}}if(a==null||c==null)return!0;if(i.setNodeMarkup(a+r.tableStart,null,{...ed(c.attrs,c.attrs.colspan,r.right-r.left-c.attrs.colspan),rowspan:r.bottom-r.top}),l.size){const d=a+1+c.content.size,u=id(c)?a+1:d;i.replaceWith(u+r.tableStart,d+r.tableStart,l)}i.setSelection(new P(i.doc.resolve(a+r.tableStart))),e(i)}return!0}function ld(n,e){const t=ie(n.schema);return Xg(({node:r})=>t[r.type.spec.tableRole])(n,e)}function Xg(n){return(e,t)=>{var r;const s=e.selection;let i,o;if(s instanceof P){if(s.$anchorCell.pos!=s.$headCell.pos)return!1;i=s.$anchorCell.nodeAfter,o=s.$anchorCell.pos}else{if(i=vg(s.$from),!i)return!1;o=(r=Kt(s.$from))==null?void 0:r.pos}if(i==null||o==null||i.attrs.colspan==1&&i.attrs.rowspan==1)return!1;if(t){let l=i.attrs;const a=[],c=l.colwidth;l.rowspan>1&&(l={...l,rowspan:1}),l.colspan>1&&(l={...l,colspan:1});const d=ve(e),u=e.tr;for(let h=0;h<d.right-d.left;h++)a.push(c?{...l,colwidth:c&&c[h]?[c[h]]:null}:l);let f;for(let h=d.top;h<d.bottom;h++){let p=d.map.positionAt(h,d.left,d.table);h==d.top&&(p+=i.nodeSize);for(let m=d.left,g=0;m<d.right;m++,g++)m==d.left&&h==d.top||u.insert(f=u.mapping.map(p+d.tableStart,1),n({node:i,row:h,col:m}).createAndFill(a[g]))}u.setNodeMarkup(o,n({node:i,row:d.top,col:d.left}),a[0]),s instanceof P&&u.setSelection(new P(u.doc.resolve(s.$anchorCell.pos),f?u.doc.resolve(f):void 0)),t(u)}return!0}}function Qg(n,e){return function(t,r){if(!Ce(t))return!1;const s=Yr(t);if(s.nodeAfter.attrs[n]===e)return!1;if(r){const i=t.tr;t.selection instanceof P?t.selection.forEachCell((o,l)=>{o.attrs[n]!==e&&i.setNodeMarkup(l,null,{...o.attrs,[n]:e})}):i.setNodeMarkup(s.pos,null,{...s.nodeAfter.attrs,[n]:e}),r(i)}return!0}}function Zg(n){return function(e,t){if(!Ce(e))return!1;if(t){const r=ie(e.schema),s=ve(e),i=e.tr,o=s.map.cellsInRect(n=="column"?{left:s.left,top:0,right:s.right,bottom:s.map.height}:n=="row"?{left:0,top:s.top,right:s.map.width,bottom:s.bottom}:s),l=o.map(a=>s.table.nodeAt(a));for(let a=0;a<o.length;a++)l[a].type==r.header_cell&&i.setNodeMarkup(s.tableStart+o[a],r.cell,l[a].attrs);if(i.steps.length==0)for(let a=0;a<o.length;a++)i.setNodeMarkup(s.tableStart+o[a],r.header_cell,l[a].attrs);t(i)}return!0}}function ad(n,e,t){const r=e.map.cellsInRect({left:0,top:0,right:n=="row"?e.map.width:1,bottom:n=="column"?e.map.height:1});for(let s=0;s<r.length;s++){const i=e.table.nodeAt(r[s]);if(i&&i.type!==t.header_cell)return!1}return!0}function Pn(n,e){return e=e||{useDeprecatedLogic:!1},e.useDeprecatedLogic?Zg(n):function(t,r){if(!Ce(t))return!1;if(r){const s=ie(t.schema),i=ve(t),o=t.tr,l=ad("row",i,s),a=ad("column",i,s),d=(n==="column"?l:n==="row"?a:!1)?1:0,u=n=="column"?{left:0,top:d,right:1,bottom:i.map.height}:n=="row"?{left:d,top:0,right:i.map.width,bottom:1}:i,f=n=="column"?a?s.cell:s.header_cell:n=="row"?l?s.cell:s.header_cell:s.cell;i.map.cellsInRect(u).forEach(h=>{const p=h+i.tableStart,m=o.doc.nodeAt(p);m&&o.setNodeMarkup(p,f,m.attrs)}),r(o)}return!0}}Pn("row",{useDeprecatedLogic:!0}),Pn("column",{useDeprecatedLogic:!0});var ey=Pn("cell",{useDeprecatedLogic:!0});function ty(n,e){if(e<0){const t=n.nodeBefore;if(t)return n.pos-t.nodeSize;for(let r=n.index(-1)-1,s=n.before();r>=0;r--){const i=n.node(-1).child(r),o=i.lastChild;if(o)return s-1-o.nodeSize;s-=i.nodeSize}}else{if(n.index()<n.parent.childCount-1)return n.pos+n.nodeAfter.nodeSize;const t=n.node(-1);for(let r=n.indexAfter(-1),s=n.after();r<t.childCount;r++){const i=t.child(r);if(i.childCount)return s+1;s+=i.nodeSize}}return null}function cd(n){return function(e,t){if(!Ce(e))return!1;const r=ty(Yr(e),n);if(r==null)return!1;if(t){const s=e.doc.resolve(r);t(e.tr.setSelection(T.between(s,Dg(s))).scrollIntoView())}return!0}}function ny(n,e){const t=n.selection.$anchor;for(let r=t.depth;r>0;r--)if(t.node(r).type.spec.tableRole=="table")return e&&e(n.tr.delete(t.before(r),t.after(r)).scrollIntoView()),!0;return!1}function Xr(n,e){const t=n.selection;if(!(t instanceof P))return!1;if(e){const r=n.tr,s=ie(n.schema).cell.createAndFill().content;t.forEachCell((i,o)=>{i.content.eq(s)||r.replace(r.mapping.map(o+1),r.mapping.map(o+i.nodeSize-1),new w(s,0,0))}),r.docChanged&&e(r)}return!0}function ry(n){if(!n.size)return null;let{content:e,openStart:t,openEnd:r}=n;for(;e.childCount==1&&(t>0&&r>0||e.child(0).type.spec.tableRole=="table");)t--,r--,e=e.child(0).content;const s=e.child(0),i=s.type.spec.tableRole,o=s.type.schema,l=[];if(i=="row")for(let a=0;a<e.childCount;a++){let c=e.child(a).content;const d=a?0:Math.max(0,t-1),u=a<e.childCount-1?0:Math.max(0,r-1);(d||u)&&(c=Yi(ie(o).row,new w(c,d,u)).content),l.push(c)}else if(i=="cell"||i=="header_cell")l.push(t||r?Yi(ie(o).row,new w(e,t,r)).content:e);else return null;return sy(o,l)}function sy(n,e){const t=[];for(let s=0;s<e.length;s++){const i=e[s];for(let o=i.childCount-1;o>=0;o--){const{rowspan:l,colspan:a}=i.child(o).attrs;for(let c=s;c<s+l;c++)t[c]=(t[c]||0)+a}}let r=0;for(let s=0;s<t.length;s++)r=Math.max(r,t[s]);for(let s=0;s<t.length;s++)if(s>=e.length&&e.push(b.empty),t[s]<r){const i=ie(n).cell.createAndFill(),o=[];for(let l=t[s];l<r;l++)o.push(i);e[s]=e[s].append(b.from(o))}return{height:e.length,width:r,rows:e}}function Yi(n,e){const t=n.createAndFill();return new Cs(t).replace(0,t.content.size,e).doc}function iy({width:n,height:e,rows:t},r,s){if(n!=r){const i=[],o=[];for(let l=0;l<t.length;l++){const a=t[l],c=[];for(let d=i[l]||0,u=0;d<r;u++){let f=a.child(u%a.childCount);d+f.attrs.colspan>r&&(f=f.type.createChecked(Ct(f.attrs,f.attrs.colspan,d+f.attrs.colspan-r),f.content)),c.push(f),d+=f.attrs.colspan;for(let h=1;h<f.attrs.rowspan;h++)i[l+h]=(i[l+h]||0)+f.attrs.colspan}o.push(b.from(c))}t=o,n=r}if(e!=s){const i=[];for(let o=0,l=0;o<s;o++,l++){const a=[],c=t[l%e];for(let d=0;d<c.childCount;d++){let u=c.child(d);o+u.attrs.rowspan>s&&(u=u.type.create({...u.attrs,rowspan:Math.max(1,s-u.attrs.rowspan)},u.content)),a.push(u)}i.push(b.from(a))}t=i,e=s}return{width:n,height:e,rows:t}}function oy(n,e,t,r,s,i,o){const l=n.doc.type.schema,a=ie(l);let c,d;if(s>e.width)for(let u=0,f=0;u<e.height;u++){const h=t.child(u);f+=h.nodeSize;const p=[];let m;h.lastChild==null||h.lastChild.type==a.cell?m=c||(c=a.cell.createAndFill()):m=d||(d=a.header_cell.createAndFill());for(let g=e.width;g<s;g++)p.push(m);n.insert(n.mapping.slice(o).map(f-1+r),p)}if(i>e.height){const u=[];for(let p=0,m=(e.height-1)*e.width;p<Math.max(e.width,s);p++){const g=p>=e.width?!1:t.nodeAt(e.map[m+p]).type==a.header_cell;u.push(g?d||(d=a.header_cell.createAndFill()):c||(c=a.cell.createAndFill()))}const f=a.row.create(null,b.from(u)),h=[];for(let p=e.height;p<i;p++)h.push(f);n.insert(n.mapping.slice(o).map(r+t.nodeSize-2),h)}return!!(c||d)}function dd(n,e,t,r,s,i,o,l){if(o==0||o==e.height)return!1;let a=!1;for(let c=s;c<i;c++){const d=o*e.width+c,u=e.map[d];if(e.map[d-e.width]==u){a=!0;const f=t.nodeAt(u),{top:h,left:p}=e.findCell(u);n.setNodeMarkup(n.mapping.slice(l).map(u+r),null,{...f.attrs,rowspan:o-h}),n.insert(n.mapping.slice(l).map(e.positionAt(o,p,t)),f.type.createAndFill({...f.attrs,rowspan:h+f.attrs.rowspan-o})),c+=f.attrs.colspan-1}}return a}function ud(n,e,t,r,s,i,o,l){if(o==0||o==e.width)return!1;let a=!1;for(let c=s;c<i;c++){const d=c*e.width+o,u=e.map[d];if(e.map[d-1]==u){a=!0;const f=t.nodeAt(u),h=e.colCount(u),p=n.mapping.slice(l).map(u+r);n.setNodeMarkup(p,null,Ct(f.attrs,o-h,f.attrs.colspan-(o-h))),n.insert(p+f.nodeSize,f.type.createAndFill(Ct(f.attrs,0,o-h))),c+=f.attrs.rowspan-1}}return a}function fd(n,e,t,r,s){let i=t?n.doc.nodeAt(t-1):n.doc;if(!i)throw new Error("No table found");let o=L.get(i);const{top:l,left:a}=r,c=a+s.width,d=l+s.height,u=n.tr;let f=0;function h(){if(i=t?u.doc.nodeAt(t-1):u.doc,!i)throw new Error("No table found");o=L.get(i),f=u.mapping.maps.length}oy(u,o,i,t,c,d,f)&&h(),dd(u,o,i,t,a,c,l,f)&&h(),dd(u,o,i,t,a,c,d,f)&&h(),ud(u,o,i,t,l,d,a,f)&&h(),ud(u,o,i,t,l,d,c,f)&&h();for(let p=l;p<d;p++){const m=o.positionAt(p,a,i),g=o.positionAt(p,c,i);u.replace(u.mapping.slice(f).map(m+t),u.mapping.slice(f).map(g+t),new w(s.rows[p-l],0,0))}h(),u.setSelection(new P(u.doc.resolve(t+o.positionAt(l,a,i)),u.doc.resolve(t+o.positionAt(d-1,c-1,i)))),e(u)}var ly=Xs({ArrowLeft:Zr("horiz",-1),ArrowRight:Zr("horiz",1),ArrowUp:Zr("vert",-1),ArrowDown:Zr("vert",1),"Shift-ArrowLeft":es("horiz",-1),"Shift-ArrowRight":es("horiz",1),"Shift-ArrowUp":es("vert",-1),"Shift-ArrowDown":es("vert",1),Backspace:Xr,"Mod-Backspace":Xr,Delete:Xr,"Mod-Delete":Xr});function Qr(n,e,t){return t.eq(n.selection)?!1:(e&&e(n.tr.setSelection(t).scrollIntoView()),!0)}function Zr(n,e){return(t,r,s)=>{if(!s)return!1;const i=t.selection;if(i instanceof P)return Qr(t,r,E.near(i.$headCell,e));if(n!="horiz"&&!i.empty)return!1;const o=hd(s,n,e);if(o==null)return!1;if(n=="horiz")return Qr(t,r,E.near(t.doc.resolve(i.head+e),e));{const l=t.doc.resolve(o),a=Zc(l,n,e);let c;return a?c=E.near(a,1):e<0?c=E.near(t.doc.resolve(l.before(-1)),-1):c=E.near(t.doc.resolve(l.after(-1)),1),Qr(t,r,c)}}}function es(n,e){return(t,r,s)=>{if(!s)return!1;const i=t.selection;let o;if(i instanceof P)o=i;else{const a=hd(s,n,e);if(a==null)return!1;o=new P(t.doc.resolve(a))}const l=Zc(o.$headCell,n,e);return l?Qr(t,r,new P(o.$anchorCell,l)):!1}}function ay(n,e){const t=n.state.doc,r=Kt(t.resolve(e));return r?(n.dispatch(n.state.tr.setSelection(new P(r))),!0):!1}function cy(n,e,t){if(!Ce(n.state))return!1;let r=ry(t);const s=n.state.selection;if(s instanceof P){r||(r={width:1,height:1,rows:[b.from(Yi(ie(n.state.schema).cell,t))]});const i=s.$anchorCell.node(-1),o=s.$anchorCell.start(-1),l=L.get(i).rectBetween(s.$anchorCell.pos-o,s.$headCell.pos-o);return r=iy(r,l.right-l.left,l.bottom-l.top),fd(n.state,n.dispatch,o,l,r),!0}else if(r){const i=Yr(n.state),o=i.start(-1);return fd(n.state,n.dispatch,o,L.get(i.node(-1)).findCell(i.pos-o),r),!0}else return!1}function dy(n,e){var t;if(e.ctrlKey||e.metaKey)return;const r=pd(n,e.target);let s;if(e.shiftKey&&n.state.selection instanceof P)i(n.state.selection.$anchorCell,e),e.preventDefault();else if(e.shiftKey&&r&&(s=Kt(n.state.selection.$anchor))!=null&&((t=Xi(n,e))==null?void 0:t.pos)!=s.pos)i(s,e),e.preventDefault();else if(!r)return;function i(a,c){let d=Xi(n,c);const u=nt.getState(n.state)==null;if(!d||!Gi(a,d))if(u)d=a;else return;const f=new P(a,d);if(u||!n.state.selection.eq(f)){const h=n.state.tr.setSelection(f);u&&h.setMeta(nt,a.pos),n.dispatch(h)}}function o(){n.root.removeEventListener("mouseup",o),n.root.removeEventListener("dragstart",o),n.root.removeEventListener("mousemove",l),nt.getState(n.state)!=null&&n.dispatch(n.state.tr.setMeta(nt,-1))}function l(a){const c=a,d=nt.getState(n.state);let u;if(d!=null)u=n.state.doc.resolve(d);else if(pd(n,c.target)!=r&&(u=Xi(n,e),!u))return o();u&&i(u,c)}n.root.addEventListener("mouseup",o),n.root.addEventListener("dragstart",o),n.root.addEventListener("mousemove",l)}function hd(n,e,t){if(!(n.state.selection instanceof T))return null;const{$head:r}=n.state.selection;for(let s=r.depth-1;s>=0;s--){const i=r.node(s);if((t<0?r.index(s):r.indexAfter(s))!=(t<0?0:i.childCount))return null;if(i.type.spec.tableRole=="cell"||i.type.spec.tableRole=="header_cell"){const l=r.before(s),a=e=="vert"?t>0?"down":"up":t>0?"right":"left";return n.endOfTextblock(a)?l:null}}return null}function pd(n,e){for(;e&&e!=n.dom;e=e.parentNode)if(e.nodeName=="TD"||e.nodeName=="TH")return e;return null}function Xi(n,e){const t=n.posAtCoords({left:e.clientX,top:e.clientY});return t&&t?Kt(n.state.doc.resolve(t.pos)):null}var uy=class{constructor(e,t){this.node=e,this.defaultCellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${t}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),Qi(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!=this.node.type?!1:(this.node=e,Qi(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return e.type=="attributes"&&(e.target==this.table||this.colgroup.contains(e.target))}};function Qi(n,e,t,r,s,i){var o;let l=0,a=!0,c=e.firstChild;const d=n.firstChild;if(d){for(let u=0,f=0;u<d.childCount;u++){const{colspan:h,colwidth:p}=d.child(u).attrs;for(let m=0;m<h;m++,f++){const g=s==f?i:p&&p[m],y=g?g+"px":"";if(l+=g||r,g||(a=!1),c)c.style.width!=y&&(c.style.width=y),c=c.nextSibling;else{const k=document.createElement("col");k.style.width=y,e.appendChild(k)}}}for(;c;){const u=c.nextSibling;(o=c.parentNode)==null||o.removeChild(c),c=u}a?(t.style.width=l+"px",t.style.minWidth=""):(t.style.width="",t.style.minWidth=l+"px")}}var fe=new _("tableColumnResizing");function fy({handleWidth:n=5,cellMinWidth:e=25,defaultCellMinWidth:t=100,View:r=uy,lastColumnResizable:s=!0}={}){const i=new V({key:fe,state:{init(o,l){var a,c;const d=(c=(a=i.spec)==null?void 0:a.props)==null?void 0:c.nodeViews,u=ie(l.schema).table.name;return r&&d&&(d[u]=(f,h)=>new r(f,t,h)),new hy(-1,!1)},apply(o,l){return l.apply(o)}},props:{attributes:o=>{const l=fe.getState(o);return l&&l.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(o,l)=>{py(o,l,n,s)},mouseleave:o=>{my(o)},mousedown:(o,l)=>{gy(o,l,e,t)}},decorations:o=>{const l=fe.getState(o);if(l&&l.activeHandle>-1)return wy(o,l.activeHandle)},nodeViews:{}}});return i}var hy=class ns{constructor(e,t){this.activeHandle=e,this.dragging=t}apply(e){const t=this,r=e.getMeta(fe);if(r&&r.setHandle!=null)return new ns(r.setHandle,!1);if(r&&r.setDragging!==void 0)return new ns(t.activeHandle,r.setDragging);if(t.activeHandle>-1&&e.docChanged){let s=e.mapping.map(t.activeHandle,-1);return _i(e.doc.resolve(s))||(s=-1),new ns(s,t.dragging)}return t}};function py(n,e,t,r){if(!n.editable)return;const s=fe.getState(n.state);if(s&&!s.dragging){const i=by(e.target);let o=-1;if(i){const{left:l,right:a}=i.getBoundingClientRect();e.clientX-l<=t?o=md(n,e,"left",t):a-e.clientX<=t&&(o=md(n,e,"right",t))}if(o!=s.activeHandle){if(!r&&o!==-1){const l=n.state.doc.resolve(o),a=l.node(-1),c=L.get(a),d=l.start(-1);if(c.colCount(l.pos-d)+l.nodeAfter.attrs.colspan-1==c.width-1)return}yd(n,o)}}}function my(n){if(!n.editable)return;const e=fe.getState(n.state);e&&e.activeHandle>-1&&!e.dragging&&yd(n,-1)}function gy(n,e,t,r){var s;if(!n.editable)return!1;const i=(s=n.dom.ownerDocument.defaultView)!=null?s:window,o=fe.getState(n.state);if(!o||o.activeHandle==-1||o.dragging)return!1;const l=n.state.doc.nodeAt(o.activeHandle),a=yy(n,o.activeHandle,l.attrs);n.dispatch(n.state.tr.setMeta(fe,{setDragging:{startX:e.clientX,startWidth:a}}));function c(u){i.removeEventListener("mouseup",c),i.removeEventListener("mousemove",d);const f=fe.getState(n.state);f?.dragging&&(ky(n,f.activeHandle,gd(f.dragging,u,t)),n.dispatch(n.state.tr.setMeta(fe,{setDragging:null})))}function d(u){if(!u.which)return c(u);const f=fe.getState(n.state);if(f&&f.dragging){const h=gd(f.dragging,u,t);bd(n,f.activeHandle,h,r)}}return bd(n,o.activeHandle,a,r),i.addEventListener("mouseup",c),i.addEventListener("mousemove",d),e.preventDefault(),!0}function yy(n,e,{colspan:t,colwidth:r}){const s=r&&r[r.length-1];if(s)return s;const i=n.domAtPos(e);let l=i.node.childNodes[i.offset].offsetWidth,a=t;if(r)for(let c=0;c<t;c++)r[c]&&(l-=r[c],a--);return l/a}function by(n){for(;n&&n.nodeName!="TD"&&n.nodeName!="TH";)n=n.classList&&n.classList.contains("ProseMirror")?null:n.parentNode;return n}function md(n,e,t,r){const s=t=="right"?-r:r,i=n.posAtCoords({left:e.clientX+s,top:e.clientY});if(!i)return-1;const{pos:o}=i,l=Kt(n.state.doc.resolve(o));if(!l)return-1;if(t=="right")return l.pos;const a=L.get(l.node(-1)),c=l.start(-1),d=a.map.indexOf(l.pos-c);return d%a.width==0?-1:c+a.map[d-1]}function gd(n,e,t){const r=e.clientX-n.startX;return Math.max(t,n.startWidth+r)}function yd(n,e){n.dispatch(n.state.tr.setMeta(fe,{setHandle:e}))}function ky(n,e,t){const r=n.state.doc.resolve(e),s=r.node(-1),i=L.get(s),o=r.start(-1),l=i.colCount(r.pos-o)+r.nodeAfter.attrs.colspan-1,a=n.state.tr;for(let c=0;c<i.height;c++){const d=c*i.width+l;if(c&&i.map[d]==i.map[d-i.width])continue;const u=i.map[d],f=s.nodeAt(u).attrs,h=f.colspan==1?0:l-i.colCount(u);if(f.colwidth&&f.colwidth[h]==t)continue;const p=f.colwidth?f.colwidth.slice():Sy(f.colspan);p[h]=t,a.setNodeMarkup(o+u,null,{...f,colwidth:p})}a.docChanged&&n.dispatch(a)}function bd(n,e,t,r){const s=n.state.doc.resolve(e),i=s.node(-1),o=s.start(-1),l=L.get(i).colCount(s.pos-o)+s.nodeAfter.attrs.colspan-1;let a=n.domAtPos(s.start(-1)).node;for(;a&&a.nodeName!="TABLE";)a=a.parentNode;a&&Qi(i,a.firstChild,a,r,l,t)}function Sy(n){return Array(n).fill(0)}function wy(n,e){var t;const r=[],s=n.doc.resolve(e),i=s.node(-1);if(!i)return z.empty;const o=L.get(i),l=s.start(-1),a=o.colCount(s.pos-l)+s.nodeAfter.attrs.colspan-1;for(let c=0;c<o.height;c++){const d=a+c*o.width;if((a==o.width-1||o.map[d]!=o.map[d+1])&&(c==0||o.map[d]!=o.map[d-o.width])){const u=o.map[d],f=l+u+i.nodeAt(u).nodeSize-1,h=document.createElement("div");h.className="column-resize-handle",(t=fe.getState(n))!=null&&t.dragging&&r.push(X.node(l+u,l+u+i.nodeAt(u).nodeSize,{class:"column-resize-dragging"})),r.push(X.widget(f,h))}}return z.create(n.doc,r)}function Cy({allowTableNodeSelection:n=!1}={}){return new V({key:nt,state:{init(){return null},apply(e,t){const r=e.getMeta(nt);if(r!=null)return r==-1?null:r;if(t==null||!e.docChanged)return t;const{deleted:s,pos:i}=e.mapping.mapResult(t);return s?null:i}},props:{decorations:Pg,handleDOMEvents:{mousedown:dy},createSelectionBetween(e){return nt.getState(e.state)!=null?e.state.selection:null},handleTripleClick:ay,handleKeyDown:ly,handlePaste:cy},appendTransaction(e,t,r){return Hg(r,nd(r,t),n)}})}function Zi(n,e){return e?["width",`${Math.max(e,n)}px`]:["min-width",`${n}px`]}function kd(n,e,t,r,s,i){var o;let l=0,a=!0,c=e.firstChild;const d=n.firstChild;if(d!==null)for(let u=0,f=0;u<d.childCount;u+=1){const{colspan:h,colwidth:p}=d.child(u).attrs;for(let m=0;m<h;m+=1,f+=1){const g=s===f?i:p&&p[m],y=g?`${g}px`:"";if(l+=g||r,g||(a=!1),c){if(c.style.width!==y){const[k,A]=Zi(r,g);c.style.setProperty(k,A)}c=c.nextSibling}else{const k=document.createElement("col"),[A,R]=Zi(r,g);k.style.setProperty(A,R),e.appendChild(k)}}}for(;c;){const u=c.nextSibling;(o=c.parentNode)===null||o===void 0||o.removeChild(c),c=u}a?(t.style.width=`${l}px`,t.style.minWidth=""):(t.style.width="",t.style.minWidth=`${l}px`)}class xy{constructor(e,t){this.node=e,this.cellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),kd(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!==this.node.type?!1:(this.node=e,kd(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){return e.type==="attributes"&&(e.target===this.table||this.colgroup.contains(e.target))}}function My(n,e,t,r){let s=0,i=!0;const o=[],l=n.firstChild;if(!l)return{};for(let u=0,f=0;u<l.childCount;u+=1){const{colspan:h,colwidth:p}=l.child(u).attrs;for(let m=0;m<h;m+=1,f+=1){const g=t===f?r:p&&p[m];s+=g||e,g||(i=!1);const[y,k]=Zi(e,g);o.push(["col",{style:`${y}: ${k}`}])}}const a=i?`${s}px`:"",c=i?"":`${s}px`;return{colgroup:["colgroup",{},...o],tableWidth:a,tableMinWidth:c}}function Sd(n,e){return n.createAndFill()}function Ty(n){if(n.cached.tableNodeTypes)return n.cached.tableNodeTypes;const e={};return Object.keys(n.nodes).forEach(t=>{const r=n.nodes[t];r.spec.tableRole&&(e[r.spec.tableRole]=r)}),n.cached.tableNodeTypes=e,e}function Ay(n,e,t,r,s){const i=Ty(n),o=[],l=[];for(let c=0;c<t;c+=1){const d=Sd(i.cell);if(d&&l.push(d),r){const u=Sd(i.header_cell);u&&o.push(u)}}const a=[];for(let c=0;c<e;c+=1)a.push(i.row.createChecked(null,r&&c===0?o:l));return i.table.createChecked(null,a)}function Ey(n){return n instanceof P}const ts=({editor:n})=>{const{selection:e}=n.state;if(!Ey(e))return!1;let t=0;const r=pi(e.ranges[0].$from,i=>i.type.name==="table");return r?.node.descendants(i=>{if(i.type.name==="table")return!1;["tableCell","tableHeader"].includes(i.type.name)&&(t+=1)}),t===e.ranges.length?(n.commands.deleteTable(),!0):!1},eo=$.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,handleWidth:5,cellMinWidth:25,View:xy,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML(){return[{tag:"table"}]},renderHTML({node:n,HTMLAttributes:e}){const{colgroup:t,tableWidth:r,tableMinWidth:s}=My(n,this.options.cellMinWidth);return["table",I(this.options.HTMLAttributes,e,{style:r?`width: ${r}`:`min-width: ${s}`}),t,["tbody",0]]},addCommands(){return{insertTable:({rows:n=3,cols:e=3,withHeaderRow:t=!0}={})=>({tr:r,dispatch:s,editor:i})=>{const o=Ay(i.schema,n,e,t);if(s){const l=r.selection.from+1;r.replaceSelectionWith(o).scrollIntoView().setSelection(T.near(r.doc.resolve(l)))}return!0},addColumnBefore:()=>({state:n,dispatch:e})=>Vg(n,e),addColumnAfter:()=>({state:n,dispatch:e})=>Wg(n,e),deleteColumn:()=>({state:n,dispatch:e})=>Kg(n,e),addRowBefore:()=>({state:n,dispatch:e})=>Jg(n,e),addRowAfter:()=>({state:n,dispatch:e})=>qg(n,e),deleteRow:()=>({state:n,dispatch:e})=>Gg(n,e),deleteTable:()=>({state:n,dispatch:e})=>ny(n,e),mergeCells:()=>({state:n,dispatch:e})=>od(n,e),splitCell:()=>({state:n,dispatch:e})=>ld(n,e),toggleHeaderColumn:()=>({state:n,dispatch:e})=>Pn("column")(n,e),toggleHeaderRow:()=>({state:n,dispatch:e})=>Pn("row")(n,e),toggleHeaderCell:()=>({state:n,dispatch:e})=>ey(n,e),mergeOrSplit:()=>({state:n,dispatch:e})=>od(n,e)?!0:ld(n,e),setCellAttribute:(n,e)=>({state:t,dispatch:r})=>Qg(n,e)(t,r),goToNextCell:()=>({state:n,dispatch:e})=>cd(1)(n,e),goToPreviousCell:()=>({state:n,dispatch:e})=>cd(-1)(n,e),fixTables:()=>({state:n,dispatch:e})=>(e&&nd(n),!0),setCellSelection:n=>({tr:e,dispatch:t})=>{if(t){const r=P.create(e.doc,n.anchorCell,n.headCell);e.setSelection(r)}return!0}}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.goToNextCell()?!0:this.editor.can().addRowAfter()?this.editor.chain().addRowAfter().goToNextCell().run():!1,"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:ts,"Mod-Backspace":ts,Delete:ts,"Mod-Delete":ts}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[fy({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],Cy({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(n){const e={name:n.name,options:n.options,storage:n.storage};return{tableRole:O(C(n,"tableRole",e))}}}),wd=$.create({name:"tableCell",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:n=>{const e=n.getAttribute("colwidth");return e?e.split(",").map(r=>parseInt(r,10)):null}}}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td"}]},renderHTML({HTMLAttributes:n}){return["td",I(this.options.HTMLAttributes,n),0]}}),Cd=$.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:n=>{const e=n.getAttribute("colwidth");return e?e.split(",").map(r=>parseInt(r,10)):null}}}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th"}]},renderHTML({HTMLAttributes:n}){return["th",I(this.options.HTMLAttributes,n),0]}}),xd=$.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:n}){return["tr",I(this.options.HTMLAttributes,n),0]}}),Oy=U.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:null}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:n=>{const e=n.style.textAlign;return this.options.alignments.includes(e)?e:this.options.defaultAlignment},renderHTML:n=>n.textAlign?{style:`text-align: ${n.textAlign}`}:{}}}}]},addCommands(){return{setTextAlign:n=>({commands:e})=>this.options.alignments.includes(n)?this.options.types.map(t=>e.updateAttributes(t,{textAlign:n})).every(t=>t):!1,unsetTextAlign:()=>({commands:n})=>this.options.types.map(e=>n.resetAttributes(e,"textAlign")).every(e=>e)}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}}),Ny=ce.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:n=>n.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["u",I(this.options.HTMLAttributes,n),0]},addCommands(){return{setUnderline:()=>({commands:n})=>n.setMark(this.name),toggleUnderline:()=>({commands:n})=>n.toggleMark(this.name),unsetUnderline:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),vy=$.create({name:"div",priority:50,group:"block",content:"inline*",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"div"}]},renderHTML({HTMLAttributes:n}){return["div",I(this.options.HTMLAttributes,n),0]}}),Ry=$.create({name:"figcaption",addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",selectable:!1,draggable:!1,parseHTML(){return[{tag:"figcaption"}]},renderHTML({HTMLAttributes:n}){return[this.name,n,0]}}),Dy=$.create({name:"figure",group:"block",content:"block+",draggable:!0,selectable:!0,isolating:!0,atom:!0,addAttributes(){return{figcaption:{default:""}}},addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"figure",getAttrs:n=>({figcaption:n.querySelector("figcaption")?.textContent||""})}]},renderHTML({HTMLAttributes:n}){return[this.name,I(this.options.HTMLAttributes,n),0]}}),Iy=ce.create({name:"span",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:this.name}]},renderHTML({HTMLAttributes:n}){return[this.name,I(this.options.HTMLAttributes,n),0]},addCommands(){return{setSpanStyle:n=>({commands:e,editor:t,chain:r})=>{if(!n)return!1;const s=t.getAttributes(this.name)?.style;if(!s&&!t.isActive(this.name))return e.setMark(this.name,{style:n});const i=((s??"")+";"+n).split(";"),o={};i.filter(a=>a).forEach(a=>{if(a.trim()!==""){const[c,d]=a.split(":");o[c.trim()]=d.trim()}});const l=Object.entries(o).map(([a,c])=>`${a}: ${c}`).join(";");return e.updateAttributes(this.name,{style:l})}}}});function Ly(n){return n.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(e,t)=>(t?"-":"")+e.toLowerCase())}const Py=U.create({name:"htmlGlobalAttributes",addOptions(){return{types:[]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{class:{},dataset:{parseHTML:n=>n.dataset,renderHTML:n=>{const e=n.dataset?Object.keys(n.dataset):[];if(!e.length)return{};const t={};return e.forEach(r=>{t["data-"+Ly(r)]=n.dataset[r]}),t}},id:{},style:{parseHTML:n=>n.style.length?n.style.cssText:null}}}]}}),By=U.create({name:"textDirection",addOptions(){return{directions:["ltr","rtl","auto"],types:["heading","paragraph"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textDirection:{parseHTML:n=>n.dir,renderHTML:n=>this.options.directions.includes(n.textDirection)?{dir:n.textDirection}:null}}}]},addCommands(){return{setTextDirection:n=>({commands:e})=>this.options.directions.includes(n)?this.options.types.every(t=>e.updateAttributes(t,{textDirection:n})):!1,unsetTextDirection:()=>({commands:n})=>this.options.types.every(e=>n.resetAttributes(e,"textDirection"))}}});function Md({types:n,node:e}){return Array.isArray(n)&&n.includes(e.type)||e.type===n}const zy=U.create({name:"trailingNode",addOptions(){return{node:"paragraph",notAfter:["paragraph"]}},addProseMirrorPlugins(){const n=new _(this.name),e=Object.entries(this.editor.schema.nodes).map(([,t])=>t).filter(t=>this.options.notAfter.includes(t.name));return[new V({key:n,appendTransaction:(t,r,s)=>{const{doc:i,tr:o,schema:l}=s,a=n.getState(s),c=i.content.size,d=l.nodes[this.options.node];if(a)return o.insert(c,d.create())},state:{init:(t,r)=>{const s=r.tr.doc.lastChild;return!Md({node:s,types:e})},apply:(t,r)=>{if(!t.docChanged)return r;const s=t.doc.lastChild;return!Md({node:s,types:e})}}})]}}),Hy=$.create({name:"umbEmbeddedMedia",group(){return this.options.inline?"inline":"block"},inline(){return this.options.inline},atom:!0,marks:"",draggable:!0,selectable:!0,addAttributes(){return{"data-embed-constrain":{default:!1},"data-embed-height":{default:240},"data-embed-url":{default:null},"data-embed-width":{default:360},markup:{default:null,parseHTML:n=>n.innerHTML}}},parseHTML(){return[{tag:"div",priority:100,getAttrs:n=>n.classList.contains("umb-embed-holder")&&null}]},renderHTML({HTMLAttributes:n}){const{markup:e,...t}=n,r=document.createRange().createContextualFragment(e);return["div",I({class:"umb-embed-holder"},t),r]},addCommands(){return{setEmbeddedMedia:n=>({commands:e})=>{const t={markup:n.markup,"data-embed-url":n.url,"data-embed-width":n.width,"data-embed-height":n.height,"data-embed-constrain":n.constrain};return e.insertContent({type:this.name,attrs:t})}}}}),Fy=Pc.extend({addAttributes(){return{...this.parent?.(),width:{default:null},height:{default:null},loading:{default:null},srcset:{default:null},sizes:{default:null},"data-tmpimg":{default:null},"data-udi":{default:null}}}}),$y=Qc.extend({name:"umbLink",addAttributes(){return{...this.parent?.(),"data-anchor":{default:null},title:{default:null},type:{default:"external"}}},addOptions(){return{...this.parent?.(),HTMLAttributes:{target:"","data-router-slot":"disabled"}}},addCommands(){return{setUmbLink:n=>({chain:e})=>e().setMark(this.name,n).setMeta("preventAutolink",!0).run(),unsetUmbLink:()=>({chain:n})=>n().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}}}),Vy=eo.configure({resizable:!0}),Wy=xd.extend({allowGapCursor:!1}),jy=Cd.extend({addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:n=>{const e=n.getAttribute("colwidth");return e?e.split(",").map(t=>parseInt(t,10)):null}},style:{default:null}}},addProseMirrorPlugins(){return[new V({props:{decorations:n=>{const{isEditable:e}=this.editor;if(!e)return z.empty;const{doc:t,selection:r}=n,s=[],i=Gy(0)(r);return i&&i.forEach(({pos:o},l)=>{s.push(X.widget(o+1,()=>{const a=Uy(l)(r)?"grip-column selected":"grip-column",c=document.createElement("a");return c.appendChild(document.createElement("uui-symbol-more")),c.className=a,c.addEventListener("mousedown",d=>{d.preventDefault(),d.stopImmediatePropagation(),this.editor.view.dispatch(Yy(l)(this.editor.state.tr))}),c}))}),z.create(t,s)}}})]}}),Ky=wd.extend({addAttributes(){return{colspan:{default:1,parseHTML:n=>{const e=n.getAttribute("colspan");return e?parseInt(e,10):1}},rowspan:{default:1,parseHTML:n=>{const e=n.getAttribute("rowspan");return e?parseInt(e,10):1}},colwidth:{default:null,parseHTML:n=>{const e=n.getAttribute("colwidth");return e?[parseInt(e,10)]:null}},style:{default:null}}},addProseMirrorPlugins(){return[new V({props:{decorations:n=>{const{isEditable:e}=this.editor;if(!e)return z.empty;const{doc:t,selection:r}=n,s=[],i=_y(0)(r);return i&&i.forEach(({pos:o},l)=>{s.push(X.widget(o+1,()=>{const a=Jy(l)(r)?"grip-row selected":"grip-row",c=document.createElement("a");return c.appendChild(document.createElement("uui-symbol-more")),c.className=a,c.addEventListener("mousedown",d=>{d.preventDefault(),d.stopImmediatePropagation(),this.editor.view.dispatch(Xy(l)(this.editor.state.tr))}),c}))}),z.create(t,s)}}})]}}),to=n=>e=>{const t=L.get(e.$anchorCell.node(-1)),r=e.$anchorCell.start(-1),s=t.cellsInRect(n),i=t.cellsInRect(t.rectBetween(e.$anchorCell.pos-r,e.$headCell.pos-r));for(let o=0,l=s.length;o<l;o+=1)if(i.indexOf(s[o])===-1)return!1;return!0},no=n=>$t(e=>e.type.spec.tableRole&&e.type.spec.tableRole==="table")(n),ro=n=>n instanceof P,Uy=n=>e=>{if(ro(e)){const t=L.get(e.$anchorCell.node(-1));return to({left:n,right:n+1,top:0,bottom:t.height})(e)}return!1},Jy=n=>e=>{if(ro(e)){const t=L.get(e.$anchorCell.node(-1));return to({left:0,right:t.width,top:n,bottom:n+1})(e)}return!1},qy=n=>{if(ro(n)){const e=L.get(n.$anchorCell.node(-1));return to({left:0,right:e.width,top:0,bottom:e.height})(n)}return!1},_y=n=>e=>{const t=no(e);if(t){const r=L.get(t.node);return(Array.isArray(n)?n:Array.from([n])).reduce((s,i)=>{if(i>=0&&i<=r.width-1){const o=r.cellsInRect({left:i,right:i+1,top:0,bottom:r.height});return s.concat(o.map(l=>{const a=t.node.nodeAt(l),c=l+t.start;return{pos:c,start:c+1,node:a}}))}return s},[])}return null},Gy=n=>e=>{const t=no(e);if(t){const r=L.get(t.node);return(Array.isArray(n)?n:Array.from([n])).reduce((s,i)=>{if(i>=0&&i<=r.height-1){const o=r.cellsInRect({left:0,right:r.width,top:i,bottom:i+1});return s.concat(o.map(l=>{const a=t.node.nodeAt(l),c=l+t.start;return{pos:c,start:c+1,node:a}}))}return s},[])}return null},Td=n=>e=>t=>{const r=no(t.selection),s=n==="row";if(r){const i=L.get(r.node);if(e>=0&&e<(s?i.height:i.width)){const o=s?0:e,l=s?e:0,a=s?i.width:e+1,c=s?e+1:i.height,d=i.cellsInRect({left:o,top:l,right:s?a:o+1,bottom:s?l+1:c}),u=c-l===1?d:i.cellsInRect({left:s?o:a-1,top:s?c-1:l,right:a,bottom:c}),f=r.start+d[0],h=r.start+u[u.length-1],p=t.doc.resolve(f),m=t.doc.resolve(h);return t.setSelection(new P(m,p))}}return t},Yy=Td("column"),Xy=Td("row"),Qy=({editor:n,view:e,state:t,from:r})=>{const s=e.domAtPos(r).node,i=e.nodeDOM(r)||s;if(!n.isActive(eo.name)||!i||qy(t.selection))return!1;let o=i;for(;o&&!["TD","TH"].includes(o.tagName);)o=o.parentElement;return!!(o&&o.querySelector&&o.querySelector("a.grip-row.selected"))};export{pc as Blockquote,mc as Bold,bc as BulletList,kc as Code,Sc as CodeBlock,pn as CommandManager,vy as Div,tm as Editor,U as Extension,Ry as Figcaption,Dy as Figure,wc as Heading,Oc as HorizontalRule,Py as HtmlGlobalAttributes,Pc as Image,zt as InputRule,Nc as Italic,Qc as Link,vc as ListItem,ce as Mark,$ as Node,ot as NodePos,rm as NodeView,Ic as OrderedList,lr as PasteRule,Qm as Placeholder,Iy as Span,Xm as StarterKit,Lc as Strike,Mg as Subscript,Tg as Superscript,eo as Table,wd as TableCell,Cd as TableHeader,xd as TableRow,Oy as TextAlign,By as TextDirection,eg as TextStyle,am as Tracker,zy as TrailingNode,Fy as UmbImage,$y as UmbLink,Vy as UmbTable,Ky as UmbTableCell,jy as UmbTableHeader,Wy as UmbTableRow,Ny as Underline,O as callOrReturn,Ga as combineTransactionSteps,hn as createChainableState,ur as createDocument,wn as createNodeFromContent,hc as createStyleTag,Ya as defaultBlockAt,fi as deleteProps,Ht as elementFromString,sm as escapeForRegEx,Zp as extensions,xp as findChildren,Xa as findChildrenInRange,Wa as findDuplicates,$t as findParentNode,pi as findParentNodeClosestToPos,Ba as fromString,Mp as generateHTML,Tp as generateJSON,Ap as generateText,gi as getAttributes,ri as getAttributesFromExtensions,ec as getChangedRanges,tc as getDebugJSON,C as getExtensionField,gn as getHTMLFromFragment,hi as getMarkAttributes,dr as getMarkRange,He as getMarkType,hr as getMarksBetween,Op as getNodeAtPosition,Qa as getNodeAttributes,q as getNodeType,rr as getRenderedAttributes,fr as getSchema,oi as getSchemaByResolvedExtensions,sr as getSchemaTypeByName,Cn as getSchemaTypeNameByName,xn as getSplittedAttributes,mi as getText,ai as getTextBetween,Ha as getTextContentFromNodes,cr as getTextSerializersFromSchema,ii as injectExtensionAttributesToParseRule,Fa as inputRulesPlugin,nc as isActive,Np as isAtEndOfNode,vp as isAtStartOfNode,Pa as isEmptyObject,li as isExtensionRulesEnabled,si as isFunction,yi as isList,ui as isMacOS,pr as isMarkActive,Ft as isNodeActive,Mn as isNodeEmpty,rc as isNodeSelection,$a as isNumber,yn as isPlainObject,ir as isRegExp,Qy as isRowGripSelected,im as isString,ci as isTextSelection,Sn as isiOS,bt as markInputRule,Xe as markPasteRule,I as mergeAttributes,bn as mergeDeep,Ee as minMax,Si as nodeInputRule,om as nodePasteRule,kn as objectIncludes,Va as pasteRulesPlugin,Rp as posToDOMRect,Za as removeDuplicates,di as resolveFocusPosition,Dp as rewriteUnknownContent,_a as selectionToInsertionEnd,mn as splitExtensions,nm as textInputRule,lm as textPasteRule,mr as textblockTypeInputRule,Hy as umbEmbeddedMedia,Vt as wrappingInputRule};