@opentiny/tiny-robot 0.4.2-alpha.9 → 0.5.1-alpha.1

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 (275) hide show
  1. package/dist/action-group/ActionGroup.vue.d.ts +26 -0
  2. package/dist/action-group/ActionGroupItem.vue.d.ts +18 -0
  3. package/dist/action-group/index.d.ts +12 -0
  4. package/dist/action-group/index.type.d.ts +17 -0
  5. package/dist/anchor/components/AnchorItem.vue.d.ts +24 -0
  6. package/dist/anchor/components/AnchorList.vue.d.ts +20 -0
  7. package/dist/anchor/components/AnchorOverlay.vue.d.ts +33 -0
  8. package/dist/anchor/components/AnchorSearch.vue.d.ts +7 -0
  9. package/dist/anchor/composables/index.d.ts +5 -0
  10. package/dist/anchor/composables/useActiveSync.d.ts +10 -0
  11. package/dist/anchor/composables/useFloatingOffset.d.ts +6 -0
  12. package/dist/anchor/composables/useNavController.d.ts +12 -0
  13. package/dist/anchor/composables/useOverlayInteractions.d.ts +6 -0
  14. package/dist/anchor/composables/useTargetFeedback.d.ts +5 -0
  15. package/dist/anchor/defaults.d.ts +16 -0
  16. package/dist/anchor/index.d.ts +7 -0
  17. package/dist/anchor/index.type.d.ts +60 -0
  18. package/dist/anchor/index.vue.d.ts +159 -0
  19. package/dist/anchor/internal.type.d.ts +103 -0
  20. package/dist/anchor/utils/scroll.d.ts +7 -0
  21. package/dist/anchor/utils/target.d.ts +6 -0
  22. package/dist/attachments/components/FileCard.vue.d.ts +18 -0
  23. package/dist/attachments/components/ImagePreview.vue.d.ts +17 -0
  24. package/dist/attachments/components/index.d.ts +2 -0
  25. package/dist/attachments/composables/index.d.ts +5 -0
  26. package/dist/attachments/composables/useFileCard.d.ts +15 -0
  27. package/dist/attachments/composables/useFileType.d.ts +20 -0
  28. package/dist/attachments/composables/useImagePreview.d.ts +18 -0
  29. package/dist/attachments/composables/useListType.d.ts +11 -0
  30. package/dist/attachments/index.d.ts +7 -0
  31. package/dist/attachments/index.type.d.ts +70 -0
  32. package/dist/attachments/index.vue.d.ts +27 -0
  33. package/dist/attachments/utils.d.ts +3 -0
  34. package/dist/base-popper/components/Popper.vue.d.ts +28 -0
  35. package/dist/base-popper/index.d.ts +2 -0
  36. package/dist/base-popper/index.vue.d.ts +41 -0
  37. package/dist/bubble/Bubble.vue.d.ts +47 -0
  38. package/dist/bubble/BubbleBoxWrapper.vue.d.ts +22 -0
  39. package/dist/bubble/BubbleContentWrapper.vue.d.ts +22 -0
  40. package/dist/bubble/BubbleItem.vue.d.ts +44 -0
  41. package/dist/bubble/BubbleList.vue.d.ts +43 -0
  42. package/dist/bubble/BubbleProvider.vue.d.ts +18 -0
  43. package/dist/bubble/composables/index.d.ts +11 -0
  44. package/dist/bubble/composables/useBubbleBoxRenderer.d.ts +18 -0
  45. package/dist/bubble/composables/useBubbleContentRenderer.d.ts +18 -0
  46. package/dist/bubble/composables/useBubbleEvent.d.ts +3 -0
  47. package/dist/bubble/composables/useBubbleStateChange.d.ts +1 -0
  48. package/dist/bubble/composables/useBubbleStore.d.ts +16 -0
  49. package/dist/bubble/composables/useContentResolver.d.ts +5 -0
  50. package/dist/bubble/composables/useCopyCleanup.d.ts +6 -0
  51. package/dist/bubble/composables/useMessageContent.d.ts +5 -0
  52. package/dist/bubble/composables/useMessageGroup.d.ts +4 -0
  53. package/dist/bubble/composables/useOmitMessageFields.d.ts +12 -0
  54. package/dist/bubble/composables/useToolCall.d.ts +25 -0
  55. package/dist/bubble/constants.d.ts +42 -0
  56. package/dist/bubble/index.d.ts +19 -0
  57. package/dist/bubble/index.type.d.ts +185 -0
  58. package/dist/bubble/renderers/Box.vue.d.ts +18 -0
  59. package/dist/bubble/renderers/Image.vue.d.ts +4 -0
  60. package/dist/bubble/renderers/Loading.vue.d.ts +4 -0
  61. package/dist/bubble/renderers/Markdown.vue.d.ts +4 -0
  62. package/dist/bubble/renderers/Reasoning.vue.d.ts +9 -0
  63. package/dist/bubble/renderers/Text.vue.d.ts +4 -0
  64. package/dist/bubble/renderers/Tool.vue.d.ts +14 -0
  65. package/dist/bubble/renderers/ToolRole.vue.d.ts +4 -0
  66. package/dist/bubble/renderers/Tools.vue.d.ts +4 -0
  67. package/dist/bubble/renderers/allRenderers.d.ts +93 -0
  68. package/dist/bubble/renderers/defaultRenderers.d.ts +27 -0
  69. package/dist/bubble/utils.d.ts +7 -0
  70. package/dist/chat/components/ChatConversation.vue.d.ts +305 -0
  71. package/dist/chat/components/ChatLauncherButton.vue.d.ts +12 -0
  72. package/dist/chat/components/ChatMcpTrigger.vue.d.ts +30 -0
  73. package/dist/chat/components/ChatThemeToggleButton.vue.d.ts +6 -0
  74. package/dist/chat/components/ChatWelcome.vue.d.ts +14 -0
  75. package/dist/chat/components/icons/IconModelAliyunBailian.vue.d.ts +7 -0
  76. package/dist/chat/components/icons/IconModelDeepseek.vue.d.ts +7 -0
  77. package/dist/chat/components/icons/index.d.ts +5 -0
  78. package/dist/chat/composables/useChatConversation.d.ts +37 -0
  79. package/dist/chat/composables/useChatMcp.d.ts +29 -0
  80. package/dist/chat/composables/useChatModel.d.ts +27 -0
  81. package/dist/chat/index.d.ts +9 -0
  82. package/dist/chat/index.js +13904 -0
  83. package/dist/chat/index.type.d.ts +92 -0
  84. package/dist/chat/index.vue.d.ts +51 -0
  85. package/dist/chat/locale.d.ts +12 -0
  86. package/dist/chat/mcpServers.d.ts +3 -0
  87. package/dist/container/index.d.ts +7 -0
  88. package/dist/container/index.type.d.ts +20 -0
  89. package/dist/container/index.vue.d.ts +32 -0
  90. package/dist/conversations/index.d.ts +7 -0
  91. package/dist/conversations/index.vue.d.ts +2 -0
  92. package/dist/drag-overlay/constants.d.ts +17 -0
  93. package/dist/drag-overlay/directives/vDropzone.d.ts +14 -0
  94. package/dist/drag-overlay/index.d.ts +7 -0
  95. package/dist/drag-overlay/index.type.d.ts +105 -0
  96. package/dist/drag-overlay/index.vue.d.ts +20 -0
  97. package/dist/dropdown-menu/composables/usePopperHover.d.ts +6 -0
  98. package/dist/dropdown-menu/index.d.ts +7 -0
  99. package/dist/dropdown-menu/index.type.d.ts +42 -0
  100. package/dist/dropdown-menu/index.vue.d.ts +217 -0
  101. package/dist/feedback/components/SourceList.vue.d.ts +11 -0
  102. package/dist/feedback/components/index.d.ts +1 -0
  103. package/dist/feedback/index.d.ts +7 -0
  104. package/dist/feedback/index.type.d.ts +25 -0
  105. package/dist/feedback/index.vue.d.ts +13 -0
  106. package/dist/flow-layout-buttons/index.d.ts +7 -0
  107. package/dist/flow-layout-buttons/index.type.d.ts +35 -0
  108. package/dist/flow-layout-buttons/index.vue.d.ts +22 -0
  109. package/dist/history/components/Empty.vue.d.ts +7 -0
  110. package/dist/history/components/MenuList.vue.d.ts +24 -0
  111. package/dist/history/composables/useRenameEditor.d.ts +22 -0
  112. package/dist/history/constants.d.ts +1 -0
  113. package/dist/history/index.d.ts +7 -0
  114. package/dist/history/index.type.d.ts +33 -0
  115. package/dist/history/index.vue.d.ts +18 -0
  116. package/dist/icon-button/index.d.ts +7 -0
  117. package/dist/icon-button/index.type.d.ts +7 -0
  118. package/dist/icon-button/index.vue.d.ts +6 -0
  119. package/dist/index.d.ts +51 -5239
  120. package/dist/index.js +1 -1
  121. package/dist/index2.js +12 -12
  122. package/dist/index7.js +21 -24
  123. package/dist/layout/Layout.vue.d.ts +246 -0
  124. package/dist/layout/LayoutAsideToggle.vue.d.ts +20 -0
  125. package/dist/layout/LayoutProxyScrollbar.vue.d.ts +6 -0
  126. package/dist/layout/components/AsideContent.vue.d.ts +35 -0
  127. package/dist/layout/components/AsideResizeTrigger.vue.d.ts +20 -0
  128. package/dist/layout/components/FloatingDragBar.vue.d.ts +18 -0
  129. package/dist/layout/components/FloatingResizeTrigger.vue.d.ts +17 -0
  130. package/dist/layout/components/FloatingResizeTriggers.vue.d.ts +14 -0
  131. package/dist/layout/components/LayoutSurface.vue.d.ts +41 -0
  132. package/dist/layout/composables/useLayoutAsideStates.d.ts +21 -0
  133. package/dist/layout/composables/useLayoutContext.d.ts +4 -0
  134. package/dist/layout/composables/usePointerDrag.d.ts +19 -0
  135. package/dist/layout/index.d.ts +22 -0
  136. package/dist/layout/index.js +495 -504
  137. package/dist/layout/index.type.d.ts +111 -0
  138. package/dist/layout/internal.type.d.ts +43 -0
  139. package/dist/layout/utils/asideEventEmitters.d.ts +6 -0
  140. package/dist/layout/utils/asidePresets.d.ts +5 -0
  141. package/dist/layout/utils/cssLength.d.ts +2 -0
  142. package/dist/layout/utils/domInteraction.d.ts +1 -0
  143. package/dist/layout/utils/number.d.ts +1 -0
  144. package/dist/layout/utils/surfaceGeometry.d.ts +87 -0
  145. package/dist/layout/utils/surfaceResize.d.ts +10 -0
  146. package/dist/mcp-add-form/components/CodeEditor.vue.d.ts +9 -0
  147. package/dist/mcp-add-form/components/FormEditor.vue.d.ts +10 -0
  148. package/dist/mcp-add-form/components/index.d.ts +2 -0
  149. package/dist/mcp-add-form/index.d.ts +7 -0
  150. package/dist/mcp-add-form/index.type.d.ts +19 -0
  151. package/dist/mcp-add-form/index.vue.d.ts +13 -0
  152. package/dist/mcp-server-picker/components/NoData.vue.d.ts +7 -0
  153. package/dist/mcp-server-picker/components/PluginCard.vue.d.ts +40 -0
  154. package/dist/mcp-server-picker/components/PluginModal.vue.d.ts +15 -0
  155. package/dist/mcp-server-picker/components/index.d.ts +3 -0
  156. package/dist/mcp-server-picker/index.d.ts +7 -0
  157. package/dist/mcp-server-picker/index.type.d.ts +99 -0
  158. package/dist/mcp-server-picker/index.vue.d.ts +71 -0
  159. package/dist/prompts/index.d.ts +12 -0
  160. package/dist/prompts/index.type.d.ts +59 -0
  161. package/dist/prompts/prompt.vue.d.ts +5 -0
  162. package/dist/prompts/prompts.vue.d.ts +20 -0
  163. package/dist/sender/components/editor-content/index.vue.d.ts +4 -0
  164. package/dist/sender/components/footer/index.vue.d.ts +38 -0
  165. package/dist/sender/components/layouts/MultiLineLayout.vue.d.ts +43 -0
  166. package/dist/sender/components/layouts/SingleLineLayout.vue.d.ts +32 -0
  167. package/dist/sender/composables/index.d.ts +7 -0
  168. package/dist/sender/composables/useAutoSize.d.ts +5 -0
  169. package/dist/sender/composables/useEditor.d.ts +13 -0
  170. package/dist/sender/composables/useKeyboardShortcuts.d.ts +7 -0
  171. package/dist/sender/composables/useModeSwitch.d.ts +4 -0
  172. package/dist/sender/composables/useSenderCore.d.ts +31 -0
  173. package/dist/sender/composables/useSlotScope.d.ts +10 -0
  174. package/dist/sender/context/index.d.ts +6 -0
  175. package/dist/sender/context/types.d.ts +7 -0
  176. package/dist/sender/extensions/constants.d.ts +94 -0
  177. package/dist/sender/extensions/index.d.ts +12 -0
  178. package/dist/sender/extensions/mention/commands.d.ts +20 -0
  179. package/dist/sender/extensions/mention/components/mention-list.vue.d.ts +18 -0
  180. package/dist/sender/extensions/mention/components/mention-view.vue.d.ts +19 -0
  181. package/dist/sender/extensions/mention/extension.d.ts +6 -0
  182. package/dist/sender/extensions/mention/index.d.ts +22 -0
  183. package/dist/sender/extensions/mention/plugin.d.ts +16 -0
  184. package/dist/sender/extensions/mention/types.d.ts +126 -0
  185. package/dist/sender/extensions/mention/utils.d.ts +34 -0
  186. package/dist/sender/extensions/suggestion/extension.d.ts +8 -0
  187. package/dist/sender/extensions/suggestion/index.d.ts +20 -0
  188. package/dist/sender/extensions/suggestion/plugin.d.ts +21 -0
  189. package/dist/sender/extensions/suggestion/suggestion-list.vue.d.ts +46 -0
  190. package/dist/sender/extensions/suggestion/types.d.ts +254 -0
  191. package/dist/sender/extensions/suggestion/utils/filter.d.ts +29 -0
  192. package/dist/sender/extensions/suggestion/utils/highlight.d.ts +73 -0
  193. package/dist/sender/extensions/template/block/extension.d.ts +6 -0
  194. package/dist/sender/extensions/template/block/plugins.d.ts +13 -0
  195. package/dist/sender/extensions/template/block/template-block-view.vue.d.ts +14 -0
  196. package/dist/sender/extensions/template/commands.d.ts +31 -0
  197. package/dist/sender/extensions/template/extension.d.ts +6 -0
  198. package/dist/sender/extensions/template/index.d.ts +21 -0
  199. package/dist/sender/extensions/template/select/dropdown-manager.d.ts +23 -0
  200. package/dist/sender/extensions/template/select/extension.d.ts +5 -0
  201. package/dist/sender/extensions/template/select/plugins.d.ts +34 -0
  202. package/dist/sender/extensions/template/select/template-select-view.vue.d.ts +20 -0
  203. package/dist/sender/extensions/template/types.d.ts +100 -0
  204. package/dist/sender/extensions/template/utils.d.ts +20 -0
  205. package/dist/sender/extensions/utils/id-generator.d.ts +16 -0
  206. package/dist/sender/extensions/utils/index.d.ts +7 -0
  207. package/dist/sender/extensions/utils/keyboard.d.ts +49 -0
  208. package/dist/sender/extensions/utils/position.d.ts +25 -0
  209. package/dist/sender/index.d.ts +139 -0
  210. package/dist/sender/index.js +1031 -1053
  211. package/dist/sender/index.type.d.ts +311 -0
  212. package/dist/sender/index.vue.d.ts +93 -0
  213. package/dist/sender/types/base.d.ts +239 -0
  214. package/dist/sender/types/components.d.ts +68 -0
  215. package/dist/sender/types/composables.d.ts +122 -0
  216. package/dist/sender/types/context.d.ts +138 -0
  217. package/dist/sender/types/slots.d.ts +67 -0
  218. package/dist/sender/utils/countGraphemes.d.ts +1 -0
  219. package/dist/sender-actions/action-button/index.vue.d.ts +23 -0
  220. package/dist/sender-actions/clear-button/index.vue.d.ts +2 -0
  221. package/dist/sender-actions/clear-button/useClearButtonState.d.ts +6 -0
  222. package/dist/sender-actions/default-actions/index.vue.d.ts +17 -0
  223. package/dist/sender-actions/index.d.ts +21 -0
  224. package/dist/sender-actions/index.type.d.ts +7 -0
  225. package/dist/sender-actions/submit-button/index.vue.d.ts +2 -0
  226. package/dist/sender-actions/types/common.d.ts +40 -0
  227. package/dist/sender-actions/types/index.d.ts +5 -0
  228. package/dist/sender-actions/types/tooltip.d.ts +7 -0
  229. package/dist/sender-actions/upload-button/index.type.d.ts +57 -0
  230. package/dist/sender-actions/upload-button/index.vue.d.ts +16 -0
  231. package/dist/sender-actions/utils/tooltip.d.ts +8 -0
  232. package/dist/sender-actions/voice-button/index.type.d.ts +78 -0
  233. package/dist/sender-actions/voice-button/index.vue.d.ts +43 -0
  234. package/dist/sender-actions/voice-button/speech.types.d.ts +40 -0
  235. package/dist/sender-actions/voice-button/useSpeechHandler.d.ts +10 -0
  236. package/dist/sender-actions/voice-button/webSpeechHandler.d.ts +40 -0
  237. package/dist/sender-actions/word-counter/index.vue.d.ts +2 -0
  238. package/dist/sender-compat/index.d.ts +7 -0
  239. package/dist/sender-compat/index.js +38 -38
  240. package/dist/sender-compat/index.type.d.ts +91 -0
  241. package/dist/sender-compat/index.vue.d.ts +538 -0
  242. package/dist/shared/composables/createTeleport.d.ts +2 -0
  243. package/dist/shared/composables/index.d.ts +6 -0
  244. package/dist/shared/composables/useAutoScroll.d.ts +25 -0
  245. package/dist/shared/composables/useControllableState.d.ts +20 -0
  246. package/dist/shared/composables/useSlotRefs.d.ts +12 -0
  247. package/dist/shared/composables/useTeleportTarget.d.ts +11 -0
  248. package/dist/shared/composables/useTouchDevice.d.ts +3 -0
  249. package/dist/shared/utils.d.ts +7 -0
  250. package/dist/style.css +1 -1
  251. package/dist/suggestion-pills/components/PillButton.vue.d.ts +16 -0
  252. package/dist/suggestion-pills/components/index.d.ts +1 -0
  253. package/dist/suggestion-pills/index.d.ts +13 -0
  254. package/dist/suggestion-pills/index.type.d.ts +45 -0
  255. package/dist/suggestion-pills/index.vue.d.ts +44 -0
  256. package/dist/suggestion-popover/components/Backdrop.vue.d.ts +5 -0
  257. package/dist/suggestion-popover/components/Header.vue.d.ts +4 -0
  258. package/dist/suggestion-popover/components/Loading.vue.d.ts +17 -0
  259. package/dist/suggestion-popover/components/NoData.vue.d.ts +17 -0
  260. package/dist/suggestion-popover/components/Tooltip.vue.d.ts +19 -0
  261. package/dist/suggestion-popover/index.d.ts +7 -0
  262. package/dist/suggestion-popover/index.js +2 -4
  263. package/dist/suggestion-popover/index.type.d.ts +80 -0
  264. package/dist/suggestion-popover/index.vue.d.ts +262 -0
  265. package/dist/theme-provider/constants.d.ts +6 -0
  266. package/dist/theme-provider/index.d.ts +9 -0
  267. package/dist/theme-provider/index.js +32 -41
  268. package/dist/theme-provider/index.type.d.ts +18 -0
  269. package/dist/theme-provider/index.vue.d.ts +32 -0
  270. package/dist/theme-provider/useTheme.d.ts +11 -0
  271. package/dist/useTheme.js +22 -0
  272. package/dist/welcome/index.d.ts +7 -0
  273. package/dist/welcome/index.type.d.ts +10 -0
  274. package/dist/welcome/index.vue.d.ts +18 -0
  275. package/package.json +22 -3
@@ -1,124 +1,124 @@
1
- import { defineComponent as X, openBlock as k, createBlock as U, unref as L, withCtx as I, createTextVNode as un, toDisplayString as pe, ref as H, watch as j, createElementBlock as M, Fragment as De, renderList as Be, withModifiers as et, normalizeClass as Q, createCommentVNode as W, createElementVNode as B, nextTick as me, isRef as Le, Transition as dn, normalizeStyle as fn, createVNode as oe, toRaw as pn, computed as D, onMounted as mn, onUnmounted as hn, Teleport as gn, toRef as Pe, onBeforeUnmount as xn, provide as yn, renderSlot as R, createSlots as Ie, normalizeProps as he, guardReactiveProps as ge } from "vue";
2
- import { a as bn, u as Me, W as Pt, D as Dt } from "../index2.js";
3
- import { NodeViewWrapper as rt, VueRenderer as Bt, VueNodeViewRenderer as it, NodeViewContent as vn, useEditor as Tn, EditorContent as En } from "@tiptap/vue-3";
4
- import wn from "@tiptap/extension-document";
5
- import An from "@tiptap/extension-paragraph";
6
- import Sn from "@tiptap/extension-text";
7
- import Cn from "@tiptap/extension-history";
8
- import _n from "@tiptap/extension-placeholder";
9
- import Ln from "@tiptap/extension-character-count";
10
- import { h as kn, j as Mn, p as On } from "../index4.js";
11
- import { PluginKey as re, Plugin as ie, TextSelection as O } from "@tiptap/pm/state";
12
- import { DecorationSet as _e, Decoration as It } from "@tiptap/pm/view";
1
+ import { defineComponent as X, openBlock as k, createBlock as V, unref as L, withCtx as $, createTextVNode as ln, toDisplayString as fe, ref as z, watch as N, createElementBlock as M, Fragment as Pe, renderList as De, withModifiers as et, normalizeClass as Z, createCommentVNode as K, createElementVNode as B, nextTick as pe, isRef as _e, Transition as an, normalizeStyle as cn, createVNode as ne, toRaw as un, computed as O, onMounted as dn, onUnmounted as fn, Teleport as pn, toRef as Oe, onBeforeUnmount as mn, provide as hn, renderSlot as P, createSlots as Ie, normalizeProps as me, guardReactiveProps as he } from "vue";
2
+ import { a as gn, u as Me, W as Rt, D as Ot } from "../index2.js";
3
+ import { NodeViewWrapper as rt, VueRenderer as Pt, VueNodeViewRenderer as it, NodeViewContent as xn, useEditor as yn, EditorContent as bn } from "@tiptap/vue-3";
4
+ import vn from "@tiptap/extension-document";
5
+ import Tn from "@tiptap/extension-paragraph";
6
+ import En from "@tiptap/extension-text";
7
+ import wn from "@tiptap/extension-history";
8
+ import An from "@tiptap/extension-placeholder";
9
+ import Cn from "@tiptap/extension-character-count";
10
+ import { h as Sn, j as _n, p as Ln } from "../index4.js";
11
+ import { PluginKey as oe, Plugin as se, TextSelection as R } from "@tiptap/pm/state";
12
+ import { DecorationSet as Se, Decoration as Dt } from "@tiptap/pm/view";
13
13
  import { _ as Y } from "../_plugin-vue_export-helper.js";
14
- import { IconAssociate as Rn, IconArrowDown as Pn } from "@opentiny/tiny-robot-svgs";
15
- import { Node as lt, mergeAttributes as at, Extension as $t } from "@tiptap/core";
16
- const Dn = /* @__PURE__ */ X({
14
+ import { IconAssociate as kn, IconArrowDown as Mn } from "@opentiny/tiny-robot-svgs";
15
+ import { Node as lt, mergeAttributes as at, Extension as It } from "@tiptap/core";
16
+ const Rn = /* @__PURE__ */ X({
17
17
  __name: "mention-view",
18
18
  props: {
19
19
  node: {},
20
20
  extension: {}
21
21
  },
22
22
  setup(e) {
23
- return (t, n) => (k(), U(L(rt), {
23
+ return (t, n) => (k(), V(L(rt), {
24
24
  as: "span",
25
25
  class: "mention",
26
26
  "data-id": e.node.attrs.id,
27
27
  "data-value": e.node.attrs.value
28
28
  }, {
29
- default: I(() => [
30
- un(pe(e.extension.options.char) + pe(e.node.attrs.label), 1)
29
+ default: $(() => [
30
+ ln(fe(e.extension.options.char) + fe(e.node.attrs.label), 1)
31
31
  ]),
32
32
  _: 1
33
33
  }, 8, ["data-id", "data-value"]));
34
34
  }
35
- }), Bn = /* @__PURE__ */ Y(Dn, [["__scopeId", "data-v-b42c4fae"]]), $e = Math.min, fe = Math.max, je = Math.round, Re = Math.floor, G = (e) => ({
35
+ }), On = /* @__PURE__ */ Y(Rn, [["__scopeId", "data-v-b42c4fae"]]), Be = Math.min, de = Math.max, $e = Math.round, Re = Math.floor, J = (e) => ({
36
36
  x: e,
37
37
  y: e
38
- }), In = {
38
+ }), Pn = {
39
39
  left: "right",
40
40
  right: "left",
41
41
  bottom: "top",
42
42
  top: "bottom"
43
43
  };
44
- function vt(e, t, n) {
45
- return fe(e, $e(t, n));
44
+ function Dn(e, t, n) {
45
+ return de(e, Be(t, n));
46
46
  }
47
- function ze(e, t) {
47
+ function He(e, t) {
48
48
  return typeof e == "function" ? e(t) : e;
49
49
  }
50
- function xe(e) {
50
+ function Te(e) {
51
51
  return e.split("-")[0];
52
52
  }
53
- function Fe(e) {
53
+ function ze(e) {
54
54
  return e.split("-")[1];
55
55
  }
56
- function jt(e) {
56
+ function Bt(e) {
57
57
  return e === "x" ? "y" : "x";
58
58
  }
59
- function Nt(e) {
59
+ function $t(e) {
60
60
  return e === "y" ? "height" : "width";
61
61
  }
62
- function ne(e) {
62
+ function te(e) {
63
63
  const t = e[0];
64
64
  return t === "t" || t === "b" ? "y" : "x";
65
65
  }
66
- function Wt(e) {
67
- return jt(ne(e));
66
+ function jt(e) {
67
+ return Bt(te(e));
68
68
  }
69
- function $n(e, t, n) {
69
+ function In(e, t, n) {
70
70
  n === void 0 && (n = !1);
71
- const s = Fe(e), r = Wt(e), o = Nt(r);
71
+ const s = ze(e), r = jt(e), o = $t(r);
72
72
  let l = r === "x" ? s === (n ? "end" : "start") ? "right" : "left" : s === "start" ? "bottom" : "top";
73
- return t.reference[o] > t.floating[o] && (l = Ne(l)), [l, Ne(l)];
73
+ return t.reference[o] > t.floating[o] && (l = je(l)), [l, je(l)];
74
74
  }
75
- function jn(e) {
76
- const t = Ne(e);
75
+ function Bn(e) {
76
+ const t = je(e);
77
77
  return [tt(e), t, tt(t)];
78
78
  }
79
79
  function tt(e) {
80
80
  return e.includes("start") ? e.replace("start", "end") : e.replace("end", "start");
81
81
  }
82
- const Tt = ["left", "right"], Et = ["right", "left"], Nn = ["top", "bottom"], Wn = ["bottom", "top"];
83
- function Kn(e, t, n) {
82
+ const vt = ["left", "right"], Tt = ["right", "left"], $n = ["top", "bottom"], jn = ["bottom", "top"];
83
+ function Nn(e, t, n) {
84
84
  switch (e) {
85
85
  case "top":
86
86
  case "bottom":
87
- return n ? t ? Et : Tt : t ? Tt : Et;
87
+ return n ? t ? Tt : vt : t ? vt : Tt;
88
88
  case "left":
89
89
  case "right":
90
- return t ? Nn : Wn;
90
+ return t ? $n : jn;
91
91
  default:
92
92
  return [];
93
93
  }
94
94
  }
95
- function qn(e, t, n, s) {
96
- const r = Fe(e);
97
- let o = Kn(xe(e), n === "start", s);
95
+ function Wn(e, t, n, s) {
96
+ const r = ze(e);
97
+ let o = Nn(Te(e), n === "start", s);
98
98
  return r && (o = o.map((l) => l + "-" + r), t && (o = o.concat(o.map(tt)))), o;
99
99
  }
100
- function Ne(e) {
101
- const t = xe(e);
102
- return In[t] + e.slice(t.length);
100
+ function je(e) {
101
+ const t = Te(e);
102
+ return Pn[t] + e.slice(t.length);
103
103
  }
104
- function Hn(e) {
104
+ function Kn(e) {
105
+ var t, n, s, r;
105
106
  return {
106
- top: 0,
107
- right: 0,
108
- bottom: 0,
109
- left: 0,
110
- ...e
107
+ top: (t = e.top) != null ? t : 0,
108
+ right: (n = e.right) != null ? n : 0,
109
+ bottom: (s = e.bottom) != null ? s : 0,
110
+ left: (r = e.left) != null ? r : 0
111
111
  };
112
112
  }
113
- function zn(e) {
114
- return typeof e != "number" ? Hn(e) : {
113
+ function qn(e) {
114
+ return typeof e != "number" ? Kn(e) : {
115
115
  top: e,
116
116
  right: e,
117
117
  bottom: e,
118
118
  left: e
119
119
  };
120
120
  }
121
- function We(e) {
121
+ function Ne(e) {
122
122
  const {
123
123
  x: t,
124
124
  y: n,
@@ -136,55 +136,48 @@ function We(e) {
136
136
  y: n
137
137
  };
138
138
  }
139
- function wt(e, t, n) {
139
+ function Et(e, t, n) {
140
140
  let {
141
141
  reference: s,
142
142
  floating: r
143
143
  } = e;
144
- const o = ne(t), l = Wt(t), i = Nt(l), a = xe(t), c = o === "y", d = s.x + s.width / 2 - r.width / 2, u = s.y + s.height / 2 - r.height / 2, y = s[i] / 2 - r[i] / 2;
145
- let h;
144
+ const o = te(t), l = jt(t), i = $t(l), a = Te(t), c = o === "y", d = s.x + s.width / 2 - r.width / 2, u = s.y + s.height / 2 - r.height / 2, x = s[i] / 2 - r[i] / 2;
145
+ let g;
146
146
  switch (a) {
147
147
  case "top":
148
- h = {
148
+ g = {
149
149
  x: d,
150
150
  y: s.y - r.height
151
151
  };
152
152
  break;
153
153
  case "bottom":
154
- h = {
154
+ g = {
155
155
  x: d,
156
156
  y: s.y + s.height
157
157
  };
158
158
  break;
159
159
  case "right":
160
- h = {
160
+ g = {
161
161
  x: s.x + s.width,
162
162
  y: u
163
163
  };
164
164
  break;
165
165
  case "left":
166
- h = {
166
+ g = {
167
167
  x: s.x - r.width,
168
168
  y: u
169
169
  };
170
170
  break;
171
171
  default:
172
- h = {
172
+ g = {
173
173
  x: s.x,
174
174
  y: s.y
175
175
  };
176
176
  }
177
- switch (Fe(t)) {
178
- case "start":
179
- h[l] -= y * (n && c ? -1 : 1);
180
- break;
181
- case "end":
182
- h[l] += y * (n && c ? -1 : 1);
183
- break;
184
- }
185
- return h;
177
+ const E = ze(t);
178
+ return E && (g[l] += x * (E === "end" ? 1 : -1) * (n && c ? -1 : 1)), g;
186
179
  }
187
- async function Fn(e, t) {
180
+ async function Hn(e, t) {
188
181
  var n;
189
182
  t === void 0 && (t = {});
190
183
  const {
@@ -198,9 +191,9 @@ async function Fn(e, t) {
198
191
  boundary: c = "clippingAncestors",
199
192
  rootBoundary: d = "viewport",
200
193
  elementContext: u = "floating",
201
- altBoundary: y = !1,
202
- padding: h = 0
203
- } = ze(t, e), E = zn(h), v = i[y ? u === "floating" ? "reference" : "floating" : u], g = We(await o.getClippingRect({
194
+ altBoundary: x = !1,
195
+ padding: g = 0
196
+ } = He(t, e), E = qn(g), v = i[x ? u === "floating" ? "reference" : "floating" : u], h = Ne(await o.getClippingRect({
204
197
  element: (n = await (o.isElement == null ? void 0 : o.isElement(v))) == null || n ? v : v.contextElement || await (o.getDocumentElement == null ? void 0 : o.getDocumentElement(i.floating)),
205
198
  boundary: c,
206
199
  rootBoundary: d,
@@ -210,26 +203,23 @@ async function Fn(e, t) {
210
203
  y: r,
211
204
  width: l.floating.width,
212
205
  height: l.floating.height
213
- } : l.reference, p = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(i.floating)), f = await (o.isElement == null ? void 0 : o.isElement(p)) ? await (o.getScale == null ? void 0 : o.getScale(p)) || {
214
- x: 1,
215
- y: 1
216
- } : {
206
+ } : l.reference, p = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(i.floating)), f = await (o.isElement == null ? void 0 : o.isElement(p)) && await (o.getScale == null ? void 0 : o.getScale(p)) || {
217
207
  x: 1,
218
208
  y: 1
219
- }, m = We(o.convertOffsetParentRelativeRectToViewportRelativeRect ? await o.convertOffsetParentRelativeRectToViewportRelativeRect({
209
+ }, y = Ne(o.convertOffsetParentRelativeRectToViewportRelativeRect ? await o.convertOffsetParentRelativeRectToViewportRelativeRect({
220
210
  elements: i,
221
211
  rect: b,
222
212
  offsetParent: p,
223
213
  strategy: a
224
214
  }) : b);
225
215
  return {
226
- top: (g.top - m.top + E.top) / f.y,
227
- bottom: (m.bottom - g.bottom + E.bottom) / f.y,
228
- left: (g.left - m.left + E.left) / f.x,
229
- right: (m.right - g.right + E.right) / f.x
216
+ top: (h.top - y.top + E.top) / f.y,
217
+ bottom: (y.bottom - h.bottom + E.bottom) / f.y,
218
+ left: (h.left - y.left + E.left) / f.x,
219
+ right: (y.right - h.right + E.right) / f.x
230
220
  };
231
221
  }
232
- const Vn = 50, Gn = async (e, t, n) => {
222
+ const zn = 50, Fn = async (e, t, n) => {
233
223
  const {
234
224
  placement: s = "bottom",
235
225
  strategy: r = "absolute",
@@ -237,7 +227,7 @@ const Vn = 50, Gn = async (e, t, n) => {
237
227
  platform: l
238
228
  } = n, i = l.detectOverflow ? l : {
239
229
  ...l,
240
- detectOverflow: Fn
230
+ detectOverflow: Hn
241
231
  }, a = await (l.isRTL == null ? void 0 : l.isRTL(t));
242
232
  let c = await l.getElementRects({
243
233
  reference: e,
@@ -246,25 +236,25 @@ const Vn = 50, Gn = async (e, t, n) => {
246
236
  }), {
247
237
  x: d,
248
238
  y: u
249
- } = wt(c, s, a), y = s, h = 0;
239
+ } = Et(c, s, a), x = s, g = 0;
250
240
  const E = {};
251
- for (let w = 0; w < o.length; w++) {
252
- const v = o[w];
241
+ for (let A = 0; A < o.length; A++) {
242
+ const v = o[A];
253
243
  if (!v)
254
244
  continue;
255
245
  const {
256
- name: g,
246
+ name: h,
257
247
  fn: b
258
248
  } = v, {
259
249
  x: p,
260
250
  y: f,
261
- data: m,
262
- reset: x
251
+ data: y,
252
+ reset: m
263
253
  } = await b({
264
254
  x: d,
265
255
  y: u,
266
256
  initialPlacement: s,
267
- placement: y,
257
+ placement: x,
268
258
  strategy: r,
269
259
  middlewareData: E,
270
260
  rects: c,
@@ -274,26 +264,26 @@ const Vn = 50, Gn = async (e, t, n) => {
274
264
  floating: t
275
265
  }
276
266
  });
277
- d = p ?? d, u = f ?? u, E[g] = {
278
- ...E[g],
279
- ...m
280
- }, x && h < Vn && (h++, typeof x == "object" && (x.placement && (y = x.placement), x.rects && (c = x.rects === !0 ? await l.getElementRects({
267
+ d = p ?? d, u = f ?? u, E[h] = {
268
+ ...E[h],
269
+ ...y
270
+ }, m && g < zn && (g++, typeof m == "object" && (m.placement && (x = m.placement), m.rects && (c = m.rects === !0 ? await l.getElementRects({
281
271
  reference: e,
282
272
  floating: t,
283
273
  strategy: r
284
- }) : x.rects), {
274
+ }) : m.rects), {
285
275
  x: d,
286
276
  y: u
287
- } = wt(c, y, a)), w = -1);
277
+ } = Et(c, x, a)), A = -1);
288
278
  }
289
279
  return {
290
280
  x: d,
291
281
  y: u,
292
- placement: y,
282
+ placement: x,
293
283
  strategy: r,
294
284
  middlewareData: E
295
285
  };
296
- }, Un = function(e) {
286
+ }, Vn = function(e) {
297
287
  return e === void 0 && (e = {}), {
298
288
  name: "flip",
299
289
  options: e,
@@ -309,55 +299,55 @@ const Vn = 50, Gn = async (e, t, n) => {
309
299
  } = t, {
310
300
  mainAxis: d = !0,
311
301
  crossAxis: u = !0,
312
- fallbackPlacements: y,
313
- fallbackStrategy: h = "bestFit",
302
+ fallbackPlacements: x,
303
+ fallbackStrategy: g = "bestFit",
314
304
  fallbackAxisSideDirection: E = "none",
315
- flipAlignment: w = !0,
305
+ flipAlignment: A = !0,
316
306
  ...v
317
- } = ze(e, t);
307
+ } = He(e, t);
318
308
  if ((n = o.arrow) != null && n.alignmentOffset)
319
309
  return {};
320
- const g = xe(r), b = ne(i), p = xe(i) === i, f = await (a.isRTL == null ? void 0 : a.isRTL(c.floating)), m = y || (p || !w ? [Ne(i)] : jn(i)), x = E !== "none";
321
- !y && x && m.push(...qn(i, w, E, f));
322
- const T = [i, ...m], _ = await a.detectOverflow(t, v), C = [];
323
- let $ = ((s = o.flip) == null ? void 0 : s.overflows) || [];
324
- if (d && C.push(_[g]), u) {
325
- const ae = $n(r, l, f);
326
- C.push(_[ae[0]], _[ae[1]]);
310
+ const h = Te(r), b = te(i), p = Te(i) === i, f = await (a.isRTL == null ? void 0 : a.isRTL(c.floating)), y = x || (p || !A ? [je(i)] : Bn(i)), m = E !== "none";
311
+ !x && m && y.push(...Wn(i, A, E, f));
312
+ const T = [i, ...y], w = await a.detectOverflow(t, v), _ = [];
313
+ let I = ((s = o.flip) == null ? void 0 : s.overflows) || [];
314
+ if (d && _.push(w[h]), u) {
315
+ const le = In(r, l, f);
316
+ _.push(w[le[0]], w[le[1]]);
327
317
  }
328
- if ($ = [...$, {
318
+ if (I = [...I, {
329
319
  placement: r,
330
- overflows: C
331
- }], !C.every((ae) => ae <= 0)) {
332
- var J, yt;
333
- const ae = (((J = o.flip) == null ? void 0 : J.index) || 0) + 1, Ye = T[ae];
334
- if (Ye && (!(u === "alignment" ? b !== ne(Ye) : !1) || // We leave the current main axis only if every placement on that axis
320
+ overflows: _
321
+ }], !_.every((le) => le <= 0)) {
322
+ var W, yt;
323
+ const le = (((W = o.flip) == null ? void 0 : W.index) || 0) + 1, Ye = T[le];
324
+ if (Ye && (!(u === "alignment" ? b !== te(Ye) : !1) || // We leave the current main axis only if every placement on that axis
335
325
  // overflows the main axis.
336
- $.every((K) => ne(K.placement) === b ? K.overflows[0] > 0 : !0)))
326
+ I.every((q) => te(q.placement) === b ? q.overflows[0] > 0 : !0)))
337
327
  return {
338
328
  data: {
339
- index: ae,
340
- overflows: $
329
+ index: le,
330
+ overflows: I
341
331
  },
342
332
  reset: {
343
333
  placement: Ye
344
334
  }
345
335
  };
346
- let Ce = (yt = $.filter((ce) => ce.overflows[0] <= 0).sort((ce, K) => ce.overflows[1] - K.overflows[1])[0]) == null ? void 0 : yt.placement;
336
+ let Ce = (yt = I.filter((ae) => ae.overflows[0] <= 0).sort((ae, q) => ae.overflows[1] - q.overflows[1])[0]) == null ? void 0 : yt.placement;
347
337
  if (!Ce)
348
- switch (h) {
338
+ switch (g) {
349
339
  case "bestFit": {
350
340
  var bt;
351
- const ce = (bt = $.filter((K) => {
352
- if (x) {
353
- const te = ne(K.placement);
354
- return te === b || // Create a bias to the `y` side axis due to horizontal
341
+ const ae = (bt = I.filter((q) => {
342
+ if (m) {
343
+ const ee = te(q.placement);
344
+ return ee === b || // Create a bias to the `y` side axis due to horizontal
355
345
  // reading directions favoring greater width.
356
- te === "y";
346
+ ee === "y";
357
347
  }
358
348
  return !0;
359
- }).map((K) => [K.placement, K.overflows.filter((te) => te > 0).reduce((te, cn) => te + cn, 0)]).sort((K, te) => K[1] - te[1])[0]) == null ? void 0 : bt[0];
360
- ce && (Ce = ce);
349
+ }).map((q) => [q.placement, q.overflows.filter((ee) => ee > 0).reduce((ee, rn) => ee + rn, 0)]).sort((q, ee) => q[1] - ee[1])[0]) == null ? void 0 : bt[0];
350
+ ae && (Ce = ae);
361
351
  break;
362
352
  }
363
353
  case "initialPlacement":
@@ -374,16 +364,16 @@ const Vn = 50, Gn = async (e, t, n) => {
374
364
  return {};
375
365
  }
376
366
  };
377
- }, Xn = /* @__PURE__ */ new Set(["left", "top"]);
378
- async function Yn(e, t) {
367
+ }, Gn = /* @__PURE__ */ new Set(["left", "top"]);
368
+ async function Un(e, t) {
379
369
  const {
380
370
  placement: n,
381
371
  platform: s,
382
372
  elements: r
383
- } = e, o = await (s.isRTL == null ? void 0 : s.isRTL(r.floating)), l = xe(n), i = Fe(n), a = ne(n) === "y", c = Xn.has(l) ? -1 : 1, d = o && a ? -1 : 1, u = ze(t, e);
373
+ } = e, o = await (s.isRTL == null ? void 0 : s.isRTL(r.floating)), l = Te(n), i = ze(n), a = te(n) === "y", c = Gn.has(l) ? -1 : 1, d = o && a ? -1 : 1, u = He(t, e);
384
374
  let {
385
- mainAxis: y,
386
- crossAxis: h,
375
+ mainAxis: x,
376
+ crossAxis: g,
387
377
  alignmentAxis: E
388
378
  } = typeof u == "number" ? {
389
379
  mainAxis: u,
@@ -394,15 +384,15 @@ async function Yn(e, t) {
394
384
  crossAxis: u.crossAxis || 0,
395
385
  alignmentAxis: u.alignmentAxis
396
386
  };
397
- return i && typeof E == "number" && (h = i === "end" ? E * -1 : E), a ? {
398
- x: h * d,
399
- y: y * c
387
+ return i && typeof E == "number" && (g = i === "end" ? E * -1 : E), a ? {
388
+ x: g * d,
389
+ y: x * c
400
390
  } : {
401
- x: y * c,
402
- y: h * d
391
+ x: x * c,
392
+ y: g * d
403
393
  };
404
394
  }
405
- const Zn = function(e) {
395
+ const Xn = function(e) {
406
396
  return e === void 0 && (e = 0), {
407
397
  name: "offset",
408
398
  options: e,
@@ -413,7 +403,7 @@ const Zn = function(e) {
413
403
  y: o,
414
404
  placement: l,
415
405
  middlewareData: i
416
- } = t, a = await Yn(t, e);
406
+ } = t, a = await Un(t, e);
417
407
  return l === ((n = i.offset) == null ? void 0 : n.placement) && (s = i.arrow) != null && s.alignmentOffset ? {} : {
418
408
  x: r + a.x,
419
409
  y: o + a.y,
@@ -424,7 +414,7 @@ const Zn = function(e) {
424
414
  };
425
415
  }
426
416
  };
427
- }, Jn = function(e) {
417
+ }, Yn = function(e) {
428
418
  return e === void 0 && (e = {}), {
429
419
  name: "shift",
430
420
  options: e,
@@ -438,87 +428,81 @@ const Zn = function(e) {
438
428
  mainAxis: l = !0,
439
429
  crossAxis: i = !1,
440
430
  limiter: a = {
441
- fn: (g) => {
431
+ fn: (b) => {
442
432
  let {
443
- x: b,
444
- y: p
445
- } = g;
433
+ x: p,
434
+ y: f
435
+ } = b;
446
436
  return {
447
- x: b,
448
- y: p
437
+ x: p,
438
+ y: f
449
439
  };
450
440
  }
451
441
  },
452
442
  ...c
453
- } = ze(e, t), d = {
443
+ } = He(e, t), d = {
454
444
  x: n,
455
445
  y: s
456
- }, u = await o.detectOverflow(t, c), y = ne(xe(r)), h = jt(y);
457
- let E = d[h], w = d[y];
458
- if (l) {
459
- const g = h === "y" ? "top" : "left", b = h === "y" ? "bottom" : "right", p = E + u[g], f = E - u[b];
460
- E = vt(p, E, f);
461
- }
462
- if (i) {
463
- const g = y === "y" ? "top" : "left", b = y === "y" ? "bottom" : "right", p = w + u[g], f = w - u[b];
464
- w = vt(p, w, f);
465
- }
466
- const v = a.fn({
446
+ }, u = await o.detectOverflow(t, c), x = te(r), g = Bt(x);
447
+ let E = d[g], A = d[x];
448
+ const v = (b, p) => Dn(p + u[b === "y" ? "top" : "left"], p, p - u[b === "y" ? "bottom" : "right"]);
449
+ l && (E = v(g, E)), i && (A = v(x, A));
450
+ const h = a.fn({
467
451
  ...t,
468
- [h]: E,
469
- [y]: w
452
+ [g]: E,
453
+ [x]: A
470
454
  });
471
455
  return {
472
- ...v,
456
+ ...h,
473
457
  data: {
474
- x: v.x - n,
475
- y: v.y - s,
458
+ x: h.x - n,
459
+ y: h.y - s,
476
460
  enabled: {
477
- [h]: l,
478
- [y]: i
461
+ [g]: l,
462
+ [x]: i
479
463
  }
480
464
  }
481
465
  };
482
466
  }
483
467
  };
484
468
  };
485
- function Ve() {
469
+ function Fe() {
486
470
  return typeof window < "u";
487
471
  }
488
- function Se(e) {
489
- return Kt(e) ? (e.nodeName || "").toLowerCase() : "#document";
472
+ function Ae(e) {
473
+ return Nt(e) ? (e.nodeName || "").toLowerCase() : "#document";
490
474
  }
491
- function N(e) {
475
+ function j(e) {
492
476
  var t;
493
477
  return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
494
478
  }
495
- function Z(e) {
479
+ function Q(e) {
496
480
  var t;
497
- return (t = (Kt(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
481
+ return (t = (Nt(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
498
482
  }
499
- function Kt(e) {
500
- return Ve() ? e instanceof Node || e instanceof N(e).Node : !1;
483
+ function Nt(e) {
484
+ return Fe() ? e instanceof Node || e instanceof j(e).Node : !1;
501
485
  }
502
- function z(e) {
503
- return Ve() ? e instanceof Element || e instanceof N(e).Element : !1;
486
+ function G(e) {
487
+ return Fe() ? e instanceof Element || e instanceof j(e).Element : !1;
504
488
  }
505
- function ee(e) {
506
- return Ve() ? e instanceof HTMLElement || e instanceof N(e).HTMLElement : !1;
489
+ function re(e) {
490
+ return Fe() ? e instanceof HTMLElement || e instanceof j(e).HTMLElement : !1;
507
491
  }
508
- function At(e) {
509
- return !Ve() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof N(e).ShadowRoot;
492
+ function wt(e) {
493
+ return !Fe() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof j(e).ShadowRoot;
510
494
  }
511
- function Oe(e) {
495
+ function Ve(e) {
512
496
  const {
513
497
  overflow: t,
514
498
  overflowX: n,
515
499
  overflowY: s,
516
500
  display: r
517
- } = F(e);
501
+ } = U(e);
518
502
  return /auto|scroll|overlay|hidden|clip/.test(t + s + n) && r !== "inline" && r !== "contents";
519
503
  }
520
- function Qn(e) {
521
- return /^(table|td|th)$/.test(Se(e));
504
+ function Zn(e) {
505
+ return /^(table|td|th)$/.test(Ae(e));
522
506
  }
523
507
  function Ge(e) {
524
508
  try {
@@ -532,34 +516,34 @@ function Ge(e) {
532
516
  return !1;
533
517
  }
534
518
  }
535
- const eo = /transform|translate|scale|rotate|perspective|filter/, to = /paint|layout|strict|content/, ue = (e) => !!e && e !== "none";
519
+ const Jn = /transform|translate|scale|rotate|perspective|filter/, Qn = /paint|layout|strict|content/, ce = (e) => !!e && e !== "none";
536
520
  let Ze;
537
521
  function ct(e) {
538
- const t = z(e) ? F(e) : e;
539
- return ue(t.transform) || ue(t.translate) || ue(t.scale) || ue(t.rotate) || ue(t.perspective) || !ut() && (ue(t.backdropFilter) || ue(t.filter)) || eo.test(t.willChange || "") || to.test(t.contain || "");
522
+ const t = G(e) ? U(e) : e;
523
+ return ce(t.transform) || ce(t.translate) || ce(t.scale) || ce(t.rotate) || ce(t.perspective) || !ut() && (ce(t.backdropFilter) || ce(t.filter)) || Jn.test(t.willChange || "") || Qn.test(t.contain || "");
540
524
  }
541
- function no(e) {
542
- let t = se(e);
543
- for (; ee(t) && !Ee(t); ) {
525
+ function eo(e) {
526
+ let t = ge(e);
527
+ for (; re(t) && !Le(t); ) {
544
528
  if (ct(t))
545
529
  return t;
546
530
  if (Ge(t))
547
531
  return null;
548
- t = se(t);
532
+ t = ge(t);
549
533
  }
550
534
  return null;
551
535
  }
552
536
  function ut() {
553
537
  return Ze == null && (Ze = typeof CSS < "u" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none")), Ze;
554
538
  }
555
- function Ee(e) {
556
- return /^(html|body|#document)$/.test(Se(e));
539
+ function Le(e) {
540
+ return /^(html|body|#document)$/.test(Ae(e));
557
541
  }
558
- function F(e) {
559
- return N(e).getComputedStyle(e);
542
+ function U(e) {
543
+ return j(e).getComputedStyle(e);
560
544
  }
561
545
  function Ue(e) {
562
- return z(e) ? {
546
+ return G(e) ? {
563
547
  scrollLeft: e.scrollLeft,
564
548
  scrollTop: e.scrollTop
565
549
  } : {
@@ -567,39 +551,39 @@ function Ue(e) {
567
551
  scrollTop: e.scrollY
568
552
  };
569
553
  }
570
- function se(e) {
571
- if (Se(e) === "html")
554
+ function ge(e) {
555
+ if (Ae(e) === "html")
572
556
  return e;
573
557
  const t = (
574
558
  // Step into the shadow DOM of the parent of a slotted node.
575
559
  e.assignedSlot || // DOM Element detected.
576
560
  e.parentNode || // ShadowRoot detected.
577
- At(e) && e.host || // Fallback.
578
- Z(e)
561
+ wt(e) && e.host || // Fallback.
562
+ Q(e)
579
563
  );
580
- return At(t) ? t.host : t;
564
+ return wt(t) ? t.host : t;
581
565
  }
582
- function qt(e) {
583
- const t = se(e);
584
- return Ee(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : ee(t) && Oe(t) ? t : qt(t);
566
+ function Wt(e) {
567
+ const t = ge(e);
568
+ return Le(t) ? (e.ownerDocument || e).body : re(t) && Ve(t) ? t : Wt(t);
585
569
  }
586
570
  function ke(e, t, n) {
587
571
  var s;
588
572
  t === void 0 && (t = []), n === void 0 && (n = !0);
589
- const r = qt(e), o = r === ((s = e.ownerDocument) == null ? void 0 : s.body), l = N(r);
573
+ const r = Wt(e), o = r === ((s = e.ownerDocument) == null ? void 0 : s.body), l = j(r);
590
574
  if (o) {
591
575
  const i = nt(l);
592
- return t.concat(l, l.visualViewport || [], Oe(r) ? r : [], i && n ? ke(i) : []);
576
+ return t.concat(l, l.visualViewport || [], Ve(r) ? r : [], i && n ? ke(i) : []);
593
577
  } else
594
578
  return t.concat(r, ke(r, [], n));
595
579
  }
596
580
  function nt(e) {
597
581
  return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
598
582
  }
599
- function Ht(e) {
600
- const t = F(e);
583
+ function Kt(e) {
584
+ const t = U(e);
601
585
  let n = parseFloat(t.width) || 0, s = parseFloat(t.height) || 0;
602
- const r = ee(e), o = r ? e.offsetWidth : n, l = r ? e.offsetHeight : s, i = je(n) !== o || je(s) !== l;
586
+ const r = re(e), o = r ? e.offsetWidth : n, l = r ? e.offsetHeight : s, i = $e(n) !== o || $e(s) !== l;
603
587
  return i && (n = o, s = l), {
604
588
  width: n,
605
589
  height: s,
@@ -607,50 +591,50 @@ function Ht(e) {
607
591
  };
608
592
  }
609
593
  function dt(e) {
610
- return z(e) ? e : e.contextElement;
594
+ return G(e) ? e : e.contextElement;
611
595
  }
612
- function Te(e) {
596
+ function ve(e) {
613
597
  const t = dt(e);
614
- if (!ee(t))
615
- return G(1);
598
+ if (!re(t))
599
+ return J(1);
616
600
  const n = t.getBoundingClientRect(), {
617
601
  width: s,
618
602
  height: r,
619
603
  $: o
620
- } = Ht(t);
621
- let l = (o ? je(n.width) : n.width) / s, i = (o ? je(n.height) : n.height) / r;
604
+ } = Kt(t);
605
+ let l = (o ? $e(n.width) : n.width) / s, i = (o ? $e(n.height) : n.height) / r;
622
606
  return (!l || !Number.isFinite(l)) && (l = 1), (!i || !Number.isFinite(i)) && (i = 1), {
623
607
  x: l,
624
608
  y: i
625
609
  };
626
610
  }
627
- const oo = /* @__PURE__ */ G(0);
628
- function zt(e) {
629
- const t = N(e);
630
- return !ut() || !t.visualViewport ? oo : {
611
+ const to = /* @__PURE__ */ J(0);
612
+ function qt(e) {
613
+ const t = j(e);
614
+ return !ut() || !t.visualViewport ? to : {
631
615
  x: t.visualViewport.offsetLeft,
632
616
  y: t.visualViewport.offsetTop
633
617
  };
634
618
  }
635
- function so(e, t, n) {
636
- return t === void 0 && (t = !1), !n || t && n !== N(e) ? !1 : t;
619
+ function no(e, t, n) {
620
+ return t === void 0 && (t = !1), !!n && t && n === j(e);
637
621
  }
638
- function ye(e, t, n, s) {
622
+ function xe(e, t, n, s) {
639
623
  t === void 0 && (t = !1), n === void 0 && (n = !1);
640
624
  const r = e.getBoundingClientRect(), o = dt(e);
641
- let l = G(1);
642
- t && (s ? z(s) && (l = Te(s)) : l = Te(e));
643
- const i = so(o, n, s) ? zt(o) : G(0);
625
+ let l = J(1);
626
+ t && (s ? G(s) && (l = ve(s)) : l = ve(e));
627
+ const i = no(o, n, s) ? qt(o) : J(0);
644
628
  let a = (r.left + i.x) / l.x, c = (r.top + i.y) / l.y, d = r.width / l.x, u = r.height / l.y;
645
- if (o) {
646
- const y = N(o), h = s && z(s) ? N(s) : s;
647
- let E = y, w = nt(E);
648
- for (; w && s && h !== E; ) {
649
- const v = Te(w), g = w.getBoundingClientRect(), b = F(w), p = g.left + (w.clientLeft + parseFloat(b.paddingLeft)) * v.x, f = g.top + (w.clientTop + parseFloat(b.paddingTop)) * v.y;
650
- a *= v.x, c *= v.y, d *= v.x, u *= v.y, a += p, c += f, E = N(w), w = nt(E);
629
+ if (o && s) {
630
+ const x = j(o), g = G(s) ? j(s) : s;
631
+ let E = x, A = nt(E);
632
+ for (; A && g !== E; ) {
633
+ const v = ve(A), h = A.getBoundingClientRect(), b = U(A), p = h.left + (A.clientLeft + parseFloat(b.paddingLeft)) * v.x, f = h.top + (A.clientTop + parseFloat(b.paddingTop)) * v.y;
634
+ a *= v.x, c *= v.y, d *= v.x, u *= v.y, a += p, c += f, E = j(A), A = nt(E);
651
635
  }
652
636
  }
653
- return We({
637
+ return Ne({
654
638
  width: d,
655
639
  height: u,
656
640
  x: a,
@@ -659,79 +643,78 @@ function ye(e, t, n, s) {
659
643
  }
660
644
  function Xe(e, t) {
661
645
  const n = Ue(e).scrollLeft;
662
- return t ? t.left + n : ye(Z(e)).left + n;
646
+ return t ? t.left + n : xe(Q(e)).left + n;
663
647
  }
664
- function Ft(e, t) {
648
+ function Ht(e, t) {
665
649
  const n = e.getBoundingClientRect(), s = n.left + t.scrollLeft - Xe(e, n), r = n.top + t.scrollTop;
666
650
  return {
667
651
  x: s,
668
652
  y: r
669
653
  };
670
654
  }
671
- function ro(e) {
655
+ function oo(e) {
672
656
  let {
673
657
  elements: t,
674
658
  rect: n,
675
659
  offsetParent: s,
676
660
  strategy: r
677
661
  } = e;
678
- const o = r === "fixed", l = Z(s), i = t ? Ge(t.floating) : !1;
662
+ const o = r === "fixed", l = Q(s), i = t ? Ge(t.floating) : !1;
679
663
  if (s === l || i && o)
680
664
  return n;
681
665
  let a = {
682
666
  scrollLeft: 0,
683
667
  scrollTop: 0
684
- }, c = G(1);
685
- const d = G(0), u = ee(s);
686
- if ((u || !u && !o) && ((Se(s) !== "body" || Oe(l)) && (a = Ue(s)), u)) {
687
- const h = ye(s);
688
- c = Te(s), d.x = h.x + s.clientLeft, d.y = h.y + s.clientTop;
668
+ }, c = J(1);
669
+ const d = J(0), u = re(s);
670
+ if ((u || !o) && ((Ae(s) !== "body" || Ve(l)) && (a = Ue(s)), u)) {
671
+ const g = xe(s);
672
+ c = ve(s), d.x = g.x + s.clientLeft, d.y = g.y + s.clientTop;
689
673
  }
690
- const y = l && !u && !o ? Ft(l, a) : G(0);
674
+ const x = l && !u && !o ? Ht(l, a) : J(0);
691
675
  return {
692
676
  width: n.width * c.x,
693
677
  height: n.height * c.y,
694
- x: n.x * c.x - a.scrollLeft * c.x + d.x + y.x,
695
- y: n.y * c.y - a.scrollTop * c.y + d.y + y.y
678
+ x: n.x * c.x - a.scrollLeft * c.x + d.x + x.x,
679
+ y: n.y * c.y - a.scrollTop * c.y + d.y + x.y
696
680
  };
697
681
  }
698
- function io(e) {
699
- return Array.from(e.getClientRects());
682
+ function so(e) {
683
+ return e.getClientRects ? Array.from(e.getClientRects()) : [];
700
684
  }
701
- function lo(e) {
702
- const t = Z(e), n = Ue(e), s = e.ownerDocument.body, r = fe(t.scrollWidth, t.clientWidth, s.scrollWidth, s.clientWidth), o = fe(t.scrollHeight, t.clientHeight, s.scrollHeight, s.clientHeight);
703
- let l = -n.scrollLeft + Xe(e);
704
- const i = -n.scrollTop;
705
- return F(s).direction === "rtl" && (l += fe(t.clientWidth, s.clientWidth) - r), {
706
- width: r,
707
- height: o,
708
- x: l,
709
- y: i
685
+ function ro(e) {
686
+ const t = Ue(e), n = e.ownerDocument.body, s = de(e.scrollWidth, e.clientWidth, n.scrollWidth, n.clientWidth), r = de(e.scrollHeight, e.clientHeight, n.scrollHeight, n.clientHeight);
687
+ let o = -t.scrollLeft + Xe(e);
688
+ const l = -t.scrollTop;
689
+ return U(n).direction === "rtl" && (o += de(e.clientWidth, n.clientWidth) - s), {
690
+ width: s,
691
+ height: r,
692
+ x: o,
693
+ y: l
710
694
  };
711
695
  }
712
- const St = 25;
713
- function ao(e, t) {
714
- const n = N(e), s = Z(e), r = n.visualViewport;
715
- let o = s.clientWidth, l = s.clientHeight, i = 0, a = 0;
716
- if (r) {
717
- o = r.width, l = r.height;
718
- const d = ut();
719
- (!d || d && t === "fixed") && (i = r.offsetLeft, a = r.offsetTop);
696
+ const io = 25;
697
+ function lo(e, t, n) {
698
+ n === void 0 && (n = "viewport");
699
+ const s = n === "layoutViewport", r = j(e), o = Q(e), l = r.visualViewport;
700
+ let i = o.clientWidth, a = o.clientHeight, c = 0, d = 0;
701
+ if (l) {
702
+ const x = !ut() || t === "fixed";
703
+ s ? x || (c = -l.offsetLeft, d = -l.offsetTop) : (i = l.width, a = l.height, x && (c = l.offsetLeft, d = l.offsetTop));
704
+ }
705
+ if (Xe(o) <= 0) {
706
+ const x = o.ownerDocument, g = x.body, E = getComputedStyle(g), A = x.compatMode === "CSS1Compat" && parseFloat(E.marginLeft) + parseFloat(E.marginRight) || 0, v = Math.abs(o.clientWidth - g.clientWidth - A), h = getComputedStyle(o).scrollbarGutter === "stable both-edges" ? v / 2 : v;
707
+ h <= io && (i -= h);
720
708
  }
721
- const c = Xe(s);
722
- if (c <= 0) {
723
- const d = s.ownerDocument, u = d.body, y = getComputedStyle(u), h = d.compatMode === "CSS1Compat" && parseFloat(y.marginLeft) + parseFloat(y.marginRight) || 0, E = Math.abs(s.clientWidth - u.clientWidth - h);
724
- E <= St && (o -= E);
725
- } else c <= St && (o += c);
726
709
  return {
727
- width: o,
728
- height: l,
729
- x: i,
730
- y: a
710
+ width: i,
711
+ height: a,
712
+ x: c,
713
+ y: d
731
714
  };
732
715
  }
733
- function co(e, t) {
734
- const n = ye(e, !0, t === "fixed"), s = n.top + e.clientTop, r = n.left + e.clientLeft, o = ee(e) ? Te(e) : G(1), l = e.clientWidth * o.x, i = e.clientHeight * o.y, a = r * o.x, c = s * o.y;
716
+ function ao(e, t) {
717
+ const n = xe(e, !0, t === "fixed"), s = n.top + e.clientTop, r = n.left + e.clientLeft, o = ve(e), l = e.clientWidth * o.x, i = e.clientHeight * o.y, a = r * o.x, c = s * o.y;
735
718
  return {
736
719
  width: l,
737
720
  height: i,
@@ -739,16 +722,16 @@ function co(e, t) {
739
722
  y: c
740
723
  };
741
724
  }
742
- function Ct(e, t, n) {
725
+ function At(e, t, n) {
743
726
  let s;
744
- if (t === "viewport")
745
- s = ao(e, n);
727
+ if (t === "viewport" || t === "layoutViewport")
728
+ s = lo(e, n, t);
746
729
  else if (t === "document")
747
- s = lo(Z(e));
748
- else if (z(t))
749
- s = co(t, n);
730
+ s = ro(Q(e));
731
+ else if (G(t))
732
+ s = ao(t, n);
750
733
  else {
751
- const r = zt(e);
734
+ const r = qt(e);
752
735
  s = {
753
736
  x: t.x - r.x,
754
737
  y: t.y - r.y,
@@ -756,37 +739,33 @@ function Ct(e, t, n) {
756
739
  height: t.height
757
740
  };
758
741
  }
759
- return We(s);
742
+ return Ne(s);
760
743
  }
761
- function Vt(e, t) {
762
- const n = se(e);
763
- return n === t || !z(n) || Ee(n) ? !1 : F(n).position === "fixed" || Vt(n, t);
764
- }
765
- function uo(e, t) {
744
+ function co(e, t) {
766
745
  const n = t.get(e);
767
746
  if (n)
768
747
  return n;
769
- let s = ke(e, [], !1).filter((i) => z(i) && Se(i) !== "body"), r = null;
770
- const o = F(e).position === "fixed";
771
- let l = o ? se(e) : e;
772
- for (; z(l) && !Ee(l); ) {
773
- const i = F(l), a = ct(l);
774
- !a && i.position === "fixed" && (r = null), (o ? !a && !r : !a && i.position === "static" && !!r && (r.position === "absolute" || r.position === "fixed") || Oe(l) && !a && Vt(e, l)) ? s = s.filter((d) => d !== l) : r = i, l = se(l);
748
+ let s = ke(e, [], !1).filter((i) => G(i) && Ae(i) !== "body"), r = null;
749
+ const o = U(e).position === "fixed";
750
+ let l = o ? ge(e) : e;
751
+ for (; G(l) && !Le(l); ) {
752
+ const i = U(l), a = ct(l), c = r ? r.position : o ? "fixed" : "";
753
+ !a && (c === "fixed" || c === "absolute" && i.position === "static") ? s = s.filter((u) => u !== l) : r = i, l = ge(l);
775
754
  }
776
755
  return t.set(e, s), s;
777
756
  }
778
- function fo(e) {
757
+ function uo(e) {
779
758
  let {
780
759
  element: t,
781
760
  boundary: n,
782
761
  rootBoundary: s,
783
762
  strategy: r
784
763
  } = e;
785
- const l = [...n === "clippingAncestors" ? Ge(t) ? [] : uo(t, this._c) : [].concat(n), s], i = Ct(t, l[0], r);
764
+ const l = [...n === "clippingAncestors" ? Ge(t) ? [] : co(t, this._c) : [].concat(n), s], i = At(t, l[0], r);
786
765
  let a = i.top, c = i.right, d = i.bottom, u = i.left;
787
- for (let y = 1; y < l.length; y++) {
788
- const h = Ct(t, l[y], r);
789
- a = fe(h.top, a), c = $e(h.right, c), d = $e(h.bottom, d), u = fe(h.left, u);
766
+ for (let x = 1; x < l.length; x++) {
767
+ const g = At(t, l[x], r);
768
+ a = de(g.top, a), c = Be(g.right, c), d = Be(g.bottom, d), u = de(g.left, u);
790
769
  }
791
770
  return {
792
771
  width: c - u,
@@ -795,73 +774,69 @@ function fo(e) {
795
774
  y: a
796
775
  };
797
776
  }
798
- function po(e) {
777
+ function fo(e) {
799
778
  const {
800
779
  width: t,
801
780
  height: n
802
- } = Ht(e);
781
+ } = Kt(e);
803
782
  return {
804
783
  width: t,
805
784
  height: n
806
785
  };
807
786
  }
808
- function mo(e, t, n) {
809
- const s = ee(t), r = Z(t), o = n === "fixed", l = ye(e, !0, o, t);
787
+ function po(e, t, n) {
788
+ const s = re(t), r = Q(t), o = n === "fixed", l = xe(e, !0, o, t);
810
789
  let i = {
811
790
  scrollLeft: 0,
812
791
  scrollTop: 0
813
792
  };
814
- const a = G(0);
815
- function c() {
816
- a.x = Xe(r);
793
+ const a = J(0);
794
+ if ((s || !o) && ((Ae(t) !== "body" || Ve(r)) && (i = Ue(t)), s)) {
795
+ const x = xe(t, !0, o, t);
796
+ a.x = x.x + t.clientLeft, a.y = x.y + t.clientTop;
817
797
  }
818
- if (s || !s && !o)
819
- if ((Se(t) !== "body" || Oe(r)) && (i = Ue(t)), s) {
820
- const h = ye(t, !0, o, t);
821
- a.x = h.x + t.clientLeft, a.y = h.y + t.clientTop;
822
- } else r && c();
823
- o && !s && r && c();
824
- const d = r && !s && !o ? Ft(r, i) : G(0), u = l.left + i.scrollLeft - a.x - d.x, y = l.top + i.scrollTop - a.y - d.y;
798
+ !s && r && (a.x = Xe(r));
799
+ const c = r && !s && !o ? Ht(r, i) : J(0), d = l.left + i.scrollLeft - a.x - c.x, u = l.top + i.scrollTop - a.y - c.y;
825
800
  return {
826
- x: u,
827
- y,
801
+ x: d,
802
+ y: u,
828
803
  width: l.width,
829
804
  height: l.height
830
805
  };
831
806
  }
832
807
  function Je(e) {
833
- return F(e).position === "static";
808
+ return U(e).position === "static";
834
809
  }
835
- function _t(e, t) {
836
- if (!ee(e) || F(e).position === "fixed")
810
+ function Ct(e, t) {
811
+ if (!re(e) || U(e).position === "fixed")
837
812
  return null;
838
813
  if (t)
839
814
  return t(e);
840
815
  let n = e.offsetParent;
841
- return Z(e) === n && (n = n.ownerDocument.body), n;
816
+ return Q(e) === n && (n = n.ownerDocument.body), n;
842
817
  }
843
- function Gt(e, t) {
844
- const n = N(e);
818
+ function zt(e, t) {
819
+ const n = j(e);
845
820
  if (Ge(e))
846
821
  return n;
847
- if (!ee(e)) {
848
- let r = se(e);
849
- for (; r && !Ee(r); ) {
850
- if (z(r) && !Je(r))
822
+ if (!re(e)) {
823
+ let r = ge(e);
824
+ for (; r && !Le(r); ) {
825
+ if (G(r) && !Je(r))
851
826
  return r;
852
- r = se(r);
827
+ r = ge(r);
853
828
  }
854
829
  return n;
855
830
  }
856
- let s = _t(e, t);
857
- for (; s && Qn(s) && Je(s); )
858
- s = _t(s, t);
859
- return s && Ee(s) && Je(s) && !ct(s) ? n : s || no(e) || n;
831
+ let s = Ct(e, t);
832
+ for (; s && Zn(s) && Je(s); )
833
+ s = Ct(s, t);
834
+ return s && Le(s) && Je(s) && !ct(s) ? n : s || eo(e) || n;
860
835
  }
861
- const ho = async function(e) {
862
- const t = this.getOffsetParent || Gt, n = this.getDimensions, s = await n(e.floating);
836
+ const mo = async function(e) {
837
+ const t = this.getOffsetParent || zt, n = this.getDimensions, s = await n(e.floating);
863
838
  return {
864
- reference: mo(e.reference, await t(e.floating), e.strategy),
839
+ reference: po(e.reference, await t(e.floating), e.strategy),
865
840
  floating: {
866
841
  x: 0,
867
842
  y: 0,
@@ -870,69 +845,74 @@ const ho = async function(e) {
870
845
  }
871
846
  };
872
847
  };
873
- function go(e) {
874
- return F(e).direction === "rtl";
875
- }
876
- const xo = {
877
- convertOffsetParentRelativeRectToViewportRelativeRect: ro,
878
- getDocumentElement: Z,
879
- getClippingRect: fo,
880
- getOffsetParent: Gt,
881
- getElementRects: ho,
882
- getClientRects: io,
883
- getDimensions: po,
884
- getScale: Te,
885
- isElement: z,
886
- isRTL: go
848
+ function ho(e) {
849
+ return U(e).direction === "rtl";
850
+ }
851
+ const go = {
852
+ convertOffsetParentRelativeRectToViewportRelativeRect: oo,
853
+ getDocumentElement: Q,
854
+ getClippingRect: uo,
855
+ getOffsetParent: zt,
856
+ getElementRects: mo,
857
+ getClientRects: so,
858
+ getDimensions: fo,
859
+ getScale: ve,
860
+ isElement: G,
861
+ isRTL: ho
887
862
  };
888
- function Ut(e, t) {
863
+ function Ft(e, t) {
889
864
  return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
890
865
  }
891
- function yo(e, t) {
892
- let n = null, s;
893
- const r = Z(e);
894
- function o() {
895
- var i;
896
- clearTimeout(s), (i = n) == null || i.disconnect(), n = null;
866
+ function xo(e, t, n) {
867
+ let s = null, r;
868
+ const o = Q(e);
869
+ function l() {
870
+ var d;
871
+ clearTimeout(r), (d = s) == null || d.disconnect(), s = null;
897
872
  }
898
- function l(i, a) {
899
- i === void 0 && (i = !1), a === void 0 && (a = 1), o();
900
- const c = e.getBoundingClientRect(), {
901
- left: d,
902
- top: u,
903
- width: y,
904
- height: h
905
- } = c;
906
- if (i || t(), !y || !h)
873
+ function i(d, u) {
874
+ d === void 0 && (d = !1), u === void 0 && (u = 1), l();
875
+ const x = e.getBoundingClientRect(), {
876
+ left: g,
877
+ top: E,
878
+ width: A,
879
+ height: v
880
+ } = x;
881
+ if (d || t(), !A || !v)
907
882
  return;
908
- const E = Re(u), w = Re(r.clientWidth - (d + y)), v = Re(r.clientHeight - (u + h)), g = Re(d), p = {
909
- rootMargin: -E + "px " + -w + "px " + -v + "px " + -g + "px",
910
- threshold: fe(0, $e(1, a)) || 1
883
+ const h = Re(E), b = Re(o.clientWidth - (g + A)), p = Re(o.clientHeight - (E + v)), f = Re(g), m = {
884
+ rootMargin: -h + "px " + -b + "px " + -p + "px " + -f + "px",
885
+ threshold: de(0, Be(1, u)) || 1
911
886
  };
912
- let f = !0;
913
- function m(x) {
914
- const T = x[0].intersectionRatio;
915
- if (T !== a) {
916
- if (!f)
917
- return l();
918
- T ? l(!1, T) : s = setTimeout(() => {
919
- l(!1, 1e-7);
887
+ let T = !0;
888
+ function w(_) {
889
+ const I = _[0].intersectionRatio;
890
+ if (!Ft(x, e.getBoundingClientRect()))
891
+ return i();
892
+ if (I !== u) {
893
+ if (!T)
894
+ return i();
895
+ I ? i(!1, I) : r = setTimeout(() => {
896
+ i(!1, 1e-7);
920
897
  }, 1e3);
921
898
  }
922
- T === 1 && !Ut(c, e.getBoundingClientRect()) && l(), f = !1;
899
+ T = !1;
923
900
  }
924
901
  try {
925
- n = new IntersectionObserver(m, {
926
- ...p,
902
+ s = new IntersectionObserver(w, {
903
+ ...m,
927
904
  // Handle <iframe>s
928
- root: r.ownerDocument
905
+ root: o.ownerDocument
929
906
  });
930
907
  } catch {
931
- n = new IntersectionObserver(m, p);
908
+ s = new IntersectionObserver(w, m);
932
909
  }
933
- n.observe(e);
910
+ s.observe(e);
934
911
  }
935
- return l(!0), o;
912
+ const a = j(e), c = () => i(n);
913
+ return a.addEventListener("resize", c), i(!0), () => {
914
+ a.removeEventListener("resize", c), l();
915
+ };
936
916
  }
937
917
  function ft(e, t, n, s) {
938
918
  s === void 0 && (s = {});
@@ -943,50 +923,46 @@ function ft(e, t, n, s) {
943
923
  layoutShift: i = typeof IntersectionObserver == "function",
944
924
  animationFrame: a = !1
945
925
  } = s, c = dt(e), d = r || o ? [...c ? ke(c) : [], ...t ? ke(t) : []] : [];
946
- d.forEach((g) => {
947
- r && g.addEventListener("scroll", n, {
948
- passive: !0
949
- }), o && g.addEventListener("resize", n);
926
+ d.forEach((h) => {
927
+ r && h.addEventListener("scroll", n), o && h.addEventListener("resize", n);
950
928
  });
951
- const u = c && i ? yo(c, n) : null;
952
- let y = -1, h = null;
953
- l && (h = new ResizeObserver((g) => {
954
- let [b] = g;
955
- b && b.target === c && h && t && (h.unobserve(t), cancelAnimationFrame(y), y = requestAnimationFrame(() => {
929
+ const u = c && i ? xo(c, n, o) : null;
930
+ let x = -1, g = null;
931
+ l && (g = new ResizeObserver((h) => {
932
+ let [b] = h;
933
+ b && b.target === c && g && t && (g.unobserve(t), cancelAnimationFrame(x), x = requestAnimationFrame(() => {
956
934
  var p;
957
- (p = h) == null || p.observe(t);
935
+ (p = g) == null || p.observe(t);
958
936
  })), n();
959
- }), c && !a && h.observe(c), t && h.observe(t));
960
- let E, w = a ? ye(e) : null;
937
+ }), c && !a && g.observe(c), t && g.observe(t));
938
+ let E, A = a ? xe(e) : null;
961
939
  a && v();
962
940
  function v() {
963
- const g = ye(e);
964
- w && !Ut(w, g) && n(), w = g, E = requestAnimationFrame(v);
941
+ const h = xe(e);
942
+ A && !Ft(A, h) && n(), A = h, E = requestAnimationFrame(v);
965
943
  }
966
944
  return n(), () => {
967
- var g;
945
+ var h;
968
946
  d.forEach((b) => {
969
947
  r && b.removeEventListener("scroll", n), o && b.removeEventListener("resize", n);
970
- }), u == null || u(), (g = h) == null || g.disconnect(), h = null, a && cancelAnimationFrame(E);
948
+ }), u == null || u(), (h = g) == null || h.disconnect(), g = null, a && cancelAnimationFrame(E);
971
949
  };
972
950
  }
973
- const pt = Zn, mt = Jn, ht = Un, gt = (e, t, n) => {
974
- const s = /* @__PURE__ */ new Map(), r = {
975
- platform: xo,
976
- ...n
977
- }, o = {
951
+ const pt = Xn, mt = Yn, ht = Vn, gt = (e, t, n) => {
952
+ const s = /* @__PURE__ */ new Map(), r = n ?? {}, o = {
953
+ ...go,
978
954
  ...r.platform,
979
955
  _c: s
980
956
  };
981
- return Gn(e, t, {
957
+ return Fn(e, t, {
982
958
  ...r,
983
959
  platform: o
984
960
  });
985
961
  };
986
- function ve(e) {
962
+ function be(e) {
987
963
  return `${e}_${Date.now()}_${Math.random().toString(36).slice(2, 9)}`;
988
964
  }
989
- function bo(e, t, n = !1) {
965
+ function yo(e, t, n = !1) {
990
966
  const { $from: s } = e;
991
967
  if (!e.empty || !s.parent.isTextblock)
992
968
  return null;
@@ -1002,7 +978,7 @@ function bo(e, t, n = !1) {
1002
978
  query: l
1003
979
  };
1004
980
  }
1005
- const be = {
981
+ const ye = {
1006
982
  /** Template 扩展(包含 TemplateBlock 和 TemplateSelect 子扩展) */
1007
983
  TEMPLATE: "template",
1008
984
  /** Mention 扩展 */
@@ -1020,7 +996,7 @@ const be = {
1020
996
  PARAGRAPH: "paragraph",
1021
997
  /** Text 节点类型(ProseMirror 内置) */
1022
998
  TEXT: "text"
1023
- }, le = {
999
+ }, ie = {
1024
1000
  /** Mention 插件 */
1025
1001
  MENTION: "mention",
1026
1002
  /** Suggestion 插件 */
@@ -1037,7 +1013,7 @@ const be = {
1037
1013
  TEMPLATE_BLOCK_KEYBOARD: "templateBlockKeyboard",
1038
1014
  /** Template Block 粘贴处理插件 */
1039
1015
  TEMPLATE_BLOCK_PASTE: "templateBlockPaste"
1040
- }, V = {
1016
+ }, F = {
1041
1017
  /** 文本类型 */
1042
1018
  TEXT: "text",
1043
1019
  /** 模板块类型(对应内部的 TemplateBlock 节点) */
@@ -1046,7 +1022,7 @@ const be = {
1046
1022
  SELECT: "select",
1047
1023
  /** Mention 类型 */
1048
1024
  MENTION: "mention"
1049
- }, Xt = {
1025
+ }, Vt = {
1050
1026
  /** Enter 键 */
1051
1027
  ENTER: "Enter",
1052
1028
  /** Escape 键 */
@@ -1067,31 +1043,31 @@ const be = {
1067
1043
  ARROW_RIGHT: "ArrowRight",
1068
1044
  /** 空格键 */
1069
1045
  SPACE: " "
1070
- }, P = (e, t) => e.key === Xt[t], we = (e, t) => t.some((n) => e.key === Xt[n]), vo = ["onMousedown", "onMouseenter"], To = {
1046
+ }, D = (e, t) => e.key === Vt[t], Ee = (e, t) => t.some((n) => e.key === Vt[n]), bo = ["onMousedown", "onMouseenter"], vo = {
1071
1047
  key: 0,
1072
1048
  class: "mention-icon"
1073
- }, Eo = { class: "mention-label" }, wo = {
1049
+ }, To = { class: "mention-label" }, Eo = {
1074
1050
  key: 0,
1075
1051
  class: "mention-empty"
1076
- }, Ao = /* @__PURE__ */ X({
1052
+ }, wo = /* @__PURE__ */ X({
1077
1053
  __name: "mention-list",
1078
1054
  props: {
1079
1055
  items: {},
1080
1056
  command: { type: Function }
1081
1057
  },
1082
1058
  setup(e, { expose: t }) {
1083
- const n = e, s = H(0), r = H(null);
1084
- j(
1059
+ const n = e, s = z(0), r = z(null);
1060
+ N(
1085
1061
  () => n.items,
1086
1062
  () => {
1087
1063
  s.value = 0;
1088
1064
  }
1089
1065
  );
1090
1066
  function o({ event: c }) {
1091
- return P(c, "ARROW_UP") ? (s.value = Math.max(0, s.value - 1), l(), !0) : P(c, "ARROW_DOWN") ? (s.value = Math.min(n.items.length - 1, s.value + 1), l(), !0) : we(c, ["ENTER", "TAB"]) ? (i(s.value), !0) : !1;
1067
+ return D(c, "ARROW_UP") ? (s.value = Math.max(0, s.value - 1), l(), !0) : D(c, "ARROW_DOWN") ? (s.value = Math.min(n.items.length - 1, s.value + 1), l(), !0) : Ee(c, ["ENTER", "TAB"]) ? (i(s.value), !0) : !1;
1092
1068
  }
1093
1069
  function l() {
1094
- me(() => {
1070
+ pe(() => {
1095
1071
  var d;
1096
1072
  const c = (d = r.value) == null ? void 0 : d.querySelector(".mention-item.is-selected");
1097
1073
  c && c.scrollIntoView({
@@ -1118,22 +1094,22 @@ const be = {
1118
1094
  ref: r,
1119
1095
  class: "mention-list"
1120
1096
  }, [
1121
- (k(!0), M(De, null, Be(e.items, (u, y) => (k(), M("button", {
1097
+ (k(!0), M(Pe, null, De(e.items, (u, x) => (k(), M("button", {
1122
1098
  key: u.id,
1123
1099
  type: "button",
1124
- class: Q(["mention-item", { "is-selected": y === s.value }]),
1125
- onMousedown: et((h) => i(y), ["prevent"]),
1126
- onMouseenter: (h) => a(y)
1100
+ class: Z(["mention-item", { "is-selected": x === s.value }]),
1101
+ onMousedown: et((g) => i(x), ["prevent"]),
1102
+ onMouseenter: (g) => a(x)
1127
1103
  }, [
1128
- u.icon ? (k(), M("span", To, pe(u.icon), 1)) : W("", !0),
1129
- B("span", Eo, pe(u.label), 1)
1130
- ], 42, vo))), 128)),
1131
- e.items.length === 0 ? (k(), M("div", wo, [...d[0] || (d[0] = [
1104
+ u.icon ? (k(), M("span", vo, fe(u.icon), 1)) : K("", !0),
1105
+ B("span", To, fe(u.label), 1)
1106
+ ], 42, bo))), 128)),
1107
+ e.items.length === 0 ? (k(), M("div", Eo, [...d[0] || (d[0] = [
1132
1108
  B("span", null, "未找到匹配的提及项", -1)
1133
- ])])) : W("", !0)
1109
+ ])])) : K("", !0)
1134
1110
  ], 512));
1135
1111
  }
1136
- }), So = /* @__PURE__ */ Y(Ao, [["__scopeId", "data-v-aaa34d1a"]]), de = new re(le.MENTION);
1112
+ }), Ao = /* @__PURE__ */ Y(wo, [["__scopeId", "data-v-aaa34d1a"]]), ue = new oe(ie.MENTION);
1137
1113
  function Co(e, t) {
1138
1114
  if (!t)
1139
1115
  return e;
@@ -1143,11 +1119,11 @@ function Co(e, t) {
1143
1119
  return !!(s.label.toLowerCase().includes(n) || (r = s.value) != null && r.toLowerCase().includes(n));
1144
1120
  });
1145
1121
  }
1146
- function _o(e) {
1122
+ function So(e) {
1147
1123
  const { editor: t, char: n, items: s, allowSpaces: r } = e;
1148
1124
  let o = null, l = null, i = null;
1149
- return new ie({
1150
- key: de,
1125
+ return new se({
1126
+ key: ue,
1151
1127
  state: {
1152
1128
  init() {
1153
1129
  return {
@@ -1158,7 +1134,7 @@ function _o(e) {
1158
1134
  };
1159
1135
  },
1160
1136
  apply(a, c) {
1161
- const d = a.getMeta(de);
1137
+ const d = a.getMeta(ue);
1162
1138
  if (d && d.type === "close")
1163
1139
  return {
1164
1140
  active: !1,
@@ -1168,7 +1144,7 @@ function _o(e) {
1168
1144
  };
1169
1145
  if (!a.docChanged && !a.selectionSet)
1170
1146
  return c;
1171
- const u = bo(a.selection, n, r);
1147
+ const u = yo(a.selection, n, r);
1172
1148
  if (!u)
1173
1149
  return {
1174
1150
  active: !1,
@@ -1176,12 +1152,12 @@ function _o(e) {
1176
1152
  query: "",
1177
1153
  filteredItems: []
1178
1154
  };
1179
- const y = Le(s) ? s.value : s, h = Co(y, u.query);
1155
+ const x = _e(s) ? s.value : s, g = Co(x, u.query);
1180
1156
  return {
1181
- active: h.length > 0,
1157
+ active: g.length > 0,
1182
1158
  range: u.range,
1183
1159
  query: u.query,
1184
- filteredItems: h
1160
+ filteredItems: g
1185
1161
  };
1186
1162
  }
1187
1163
  },
@@ -1190,62 +1166,62 @@ function _o(e) {
1190
1166
  decorations(a) {
1191
1167
  const c = this.getState(a);
1192
1168
  if (!(c != null && c.active) || !c.range)
1193
- return _e.empty;
1194
- const d = It.inline(c.range.from, c.range.to, {
1169
+ return Se.empty;
1170
+ const d = Dt.inline(c.range.from, c.range.to, {
1195
1171
  class: "mention-trigger"
1196
1172
  });
1197
- return _e.create(a.doc, [d]);
1173
+ return Se.create(a.doc, [d]);
1198
1174
  },
1199
1175
  // 键盘处理
1200
1176
  handleKeyDown(a, c) {
1201
- var u, y, h, E;
1202
- const d = de.getState(a.state);
1203
- if (P(c, "BACKSPACE")) {
1204
- const { selection: w } = a.state, { $from: v } = w;
1177
+ var u, x, g, E;
1178
+ const d = ue.getState(a.state);
1179
+ if (D(c, "BACKSPACE")) {
1180
+ const { selection: A } = a.state, { $from: v } = A;
1205
1181
  if (v.nodeBefore && v.nodeBefore.type.name === S.MENTION) {
1206
1182
  c.preventDefault();
1207
- const { tr: g } = a.state, b = v.pos - v.nodeBefore.nodeSize;
1208
- return g.delete(b, v.pos), g.insertText(n, b), g.setSelection(O.create(g.doc, b + 1)), a.dispatch(g), a.focus(), !0;
1183
+ const { tr: h } = a.state, b = v.pos - v.nodeBefore.nodeSize;
1184
+ return h.delete(b, v.pos), h.insertText(n, b), h.setSelection(R.create(h.doc, b + 1)), a.dispatch(h), a.focus(), !0;
1209
1185
  }
1210
1186
  }
1211
1187
  if (!(d != null && d.active))
1212
1188
  return !1;
1213
- if (P(c, "ESCAPE")) {
1189
+ if (D(c, "ESCAPE")) {
1214
1190
  c.preventDefault();
1215
- const w = a.state.tr;
1216
- return w.setMeta(de, {
1191
+ const A = a.state.tr;
1192
+ return A.setMeta(ue, {
1217
1193
  type: "close"
1218
- }), a.dispatch(w), o && (i == null || i(), i = null, o.destroy(), o = null), l && (l.remove(), l = null), !0;
1194
+ }), a.dispatch(A), o && (i == null || i(), i = null, o.destroy(), o = null), l && (l.remove(), l = null), !0;
1219
1195
  }
1220
- if (we(c, ["ENTER", "TAB"])) {
1221
- if (c.preventDefault(), (y = (u = o == null ? void 0 : o.ref) == null ? void 0 : u.onKeyDown) == null ? void 0 : y.call(u, { event: c }))
1196
+ if (Ee(c, ["ENTER", "TAB"])) {
1197
+ if (c.preventDefault(), (x = (u = o == null ? void 0 : o.ref) == null ? void 0 : u.onKeyDown) == null ? void 0 : x.call(u, { event: c }))
1222
1198
  return !0;
1223
1199
  if (d.filteredItems.length > 0 && d.range) {
1224
1200
  const v = d.filteredItems[0];
1225
- return Lt(a, d.range, v), !0;
1201
+ return St(a, d.range, v), !0;
1226
1202
  }
1227
1203
  return !0;
1228
1204
  }
1229
- return we(c, ["ARROW_UP", "ARROW_DOWN"]) && ((E = (h = o == null ? void 0 : o.ref) == null ? void 0 : h.onKeyDown) == null ? void 0 : E.call(h, { event: c })) || !1;
1205
+ return Ee(c, ["ARROW_UP", "ARROW_DOWN"]) && ((E = (g = o == null ? void 0 : o.ref) == null ? void 0 : g.onKeyDown) == null ? void 0 : E.call(g, { event: c })) || !1;
1230
1206
  }
1231
1207
  },
1232
1208
  view() {
1233
1209
  return {
1234
1210
  update(a) {
1235
- const c = de.getState(a.state);
1211
+ const c = ue.getState(a.state);
1236
1212
  if (c != null && c.active && c.filteredItems.length > 0) {
1237
1213
  o ? o.updateProps({
1238
1214
  items: c.filteredItems
1239
- }) : (o = new Bt(So, {
1215
+ }) : (o = new Pt(Ao, {
1240
1216
  props: {
1241
1217
  items: c.filteredItems,
1242
1218
  command: (u) => {
1243
- const y = {
1219
+ const x = {
1244
1220
  id: u.id,
1245
1221
  label: u.label,
1246
1222
  value: u.value || ""
1247
1223
  };
1248
- c.range && Lt(a, c.range, y);
1224
+ c.range && St(a, c.range, x);
1249
1225
  }
1250
1226
  },
1251
1227
  editor: t
@@ -1272,25 +1248,25 @@ function _o(e) {
1272
1248
  }
1273
1249
  });
1274
1250
  }
1275
- function Lt(e, t, n) {
1251
+ function St(e, t, n) {
1276
1252
  e.focus();
1277
1253
  const { state: s, dispatch: r } = e, { tr: o } = s, l = s.schema.nodes.mention.create({
1278
- id: n.id || ve("mention"),
1254
+ id: n.id || be("mention"),
1279
1255
  label: n.label,
1280
1256
  value: n.value || ""
1281
1257
  }), i = s.schema.text(" ");
1282
1258
  o.delete(t.from, t.to), o.insert(t.from, [l, i]);
1283
1259
  const a = t.from + 2;
1284
- o.setSelection(O.create(o.doc, a)), o.scrollIntoView(), r(o);
1260
+ o.setSelection(R.create(o.doc, a)), o.scrollIntoView(), r(o);
1285
1261
  }
1286
- const Lo = {
1262
+ const _o = {
1287
1263
  /**
1288
1264
  * 插入 mention 节点
1289
1265
  */
1290
1266
  insertMention: (e) => ({ commands: t }) => t.insertContent({
1291
1267
  type: S.MENTION,
1292
1268
  attrs: {
1293
- id: e.id || ve("mention"),
1269
+ id: e.id || be("mention"),
1294
1270
  label: e.label || "",
1295
1271
  value: e.value
1296
1272
  }
@@ -1305,8 +1281,8 @@ const Lo = {
1305
1281
  return t.delete(o, o + r.nodeSize), s = !0, !1;
1306
1282
  }), s;
1307
1283
  }
1308
- }, Yt = lt.create({
1309
- name: be.MENTION,
1284
+ }, Gt = lt.create({
1285
+ name: ye.MENTION,
1310
1286
  // 节点配置
1311
1287
  group: "inline",
1312
1288
  inline: !0,
@@ -1363,7 +1339,7 @@ const Lo = {
1363
1339
  },
1364
1340
  // 使用 Vue 组件渲染
1365
1341
  addNodeView() {
1366
- return it(Bn);
1342
+ return it(On);
1367
1343
  },
1368
1344
  // 添加 storage 用于存储实例状态
1369
1345
  addStorage() {
@@ -1373,11 +1349,11 @@ const Lo = {
1373
1349
  },
1374
1350
  onCreate() {
1375
1351
  const { items: e } = this.options;
1376
- Le(e) && (this.storage.watchStopHandle = j(
1352
+ _e(e) && (this.storage.watchStopHandle = N(
1377
1353
  e,
1378
1354
  () => {
1379
1355
  const t = this.editor.state.tr;
1380
- t.setMeta(de, { type: "mention-update" }), this.editor.view.dispatch(t);
1356
+ t.setMeta(ue, { type: "mention-update" }), this.editor.view.dispatch(t);
1381
1357
  },
1382
1358
  { deep: !0 }
1383
1359
  ));
@@ -1388,7 +1364,7 @@ const Lo = {
1388
1364
  // 添加 Suggestion 插件
1389
1365
  addProseMirrorPlugins() {
1390
1366
  return [
1391
- _o({
1367
+ So({
1392
1368
  editor: this.editor,
1393
1369
  char: this.options.char,
1394
1370
  items: this.options.items,
@@ -1405,24 +1381,24 @@ const Lo = {
1405
1381
  },
1406
1382
  // 自定义命令
1407
1383
  addCommands() {
1408
- return Lo;
1384
+ return _o;
1409
1385
  }
1410
1386
  });
1411
- function ko(e) {
1387
+ function Lo(e) {
1412
1388
  var r;
1413
- const t = e.extensionManager.extensions.find((o) => o.name === be.MENTION), n = ((r = t == null ? void 0 : t.options) == null ? void 0 : r.char) || "@";
1389
+ const t = e.extensionManager.extensions.find((o) => o.name === ye.MENTION), n = ((r = t == null ? void 0 : t.options) == null ? void 0 : r.char) || "@";
1414
1390
  let s = "";
1415
1391
  return e.state.doc.descendants((o) => {
1416
1392
  o.type.name === S.MENTION ? s += `${n}${o.attrs.label}` : o.type.name === S.TEXT && (s += o.text || "");
1417
1393
  }), s.trim();
1418
1394
  }
1419
- function Mo(e) {
1395
+ function ko(e) {
1420
1396
  const t = [];
1421
1397
  return e.state.doc.descendants((n, s, r) => {
1422
1398
  if (r && r.type.name === S.PARAGRAPH) {
1423
1399
  if (n.type.name === S.MENTION)
1424
1400
  t.push({
1425
- type: V.MENTION,
1401
+ type: F.MENTION,
1426
1402
  content: n.attrs.label,
1427
1403
  value: n.attrs.value || ""
1428
1404
  });
@@ -1430,8 +1406,8 @@ function Mo(e) {
1430
1406
  const o = n.text || "";
1431
1407
  if (o) {
1432
1408
  const l = t[t.length - 1];
1433
- l && l.type === V.TEXT ? l.content = (l.content || "") + o : t.push({
1434
- type: V.TEXT,
1409
+ l && l.type === F.TEXT ? l.content = (l.content || "") + o : t.push({
1410
+ type: F.TEXT,
1435
1411
  content: o
1436
1412
  });
1437
1413
  }
@@ -1439,14 +1415,14 @@ function Mo(e) {
1439
1415
  }
1440
1416
  }), t;
1441
1417
  }
1442
- function Oo(e, t = "@", n) {
1443
- return Yt.configure({
1418
+ function Mo(e, t = "@", n) {
1419
+ return Gt.configure({
1444
1420
  items: e,
1445
1421
  char: t,
1446
1422
  ...n
1447
1423
  });
1448
1424
  }
1449
- const Zt = (e, t) => {
1425
+ const Ut = (e, t) => {
1450
1426
  if (!t.length)
1451
1427
  return [{ text: e, isMatch: !1 }];
1452
1428
  const n = [];
@@ -1488,10 +1464,10 @@ const Zt = (e, t) => {
1488
1464
  text: e.substring(o),
1489
1465
  isMatch: !1
1490
1466
  }), r;
1491
- }, Ro = (e, t) => !t || !e ? [{ text: e, isMatch: !1 }] : Zt(e, [t]), Po = (e, t) => {
1467
+ }, Ro = (e, t) => !t || !e ? [{ text: e, isMatch: !1 }] : Ut(e, [t]), Oo = (e, t) => {
1492
1468
  const { content: n, highlights: s } = e;
1493
- return typeof s == "function" ? s(n, t) : Array.isArray(s) ? Zt(n, s) : Ro(n, t);
1494
- }, Do = ["onMouseenter", "onClick"], Bo = { class: "suggestion-list__text" }, Io = /* @__PURE__ */ X({
1469
+ return typeof s == "function" ? s(n, t) : Array.isArray(s) ? Ut(n, s) : Ro(n, t);
1470
+ }, Po = ["onMouseenter", "onClick"], Do = { class: "suggestion-list__text" }, Io = /* @__PURE__ */ X({
1495
1471
  __name: "suggestion-list",
1496
1472
  props: {
1497
1473
  show: { type: Boolean },
@@ -1505,7 +1481,7 @@ const Zt = (e, t) => {
1505
1481
  onMouseLeave: { type: Function }
1506
1482
  },
1507
1483
  setup(e) {
1508
- const t = e, n = H(null), s = (i) => i === t.activeKeyboardIndex || i === t.activeMouseIndex, r = (i) => {
1484
+ const t = e, n = z(null), s = (i) => i === t.activeKeyboardIndex || i === t.activeMouseIndex, r = (i) => {
1509
1485
  var a;
1510
1486
  (a = t.onMouseEnter) == null || a.call(t, i);
1511
1487
  }, o = () => {
@@ -1514,9 +1490,9 @@ const Zt = (e, t) => {
1514
1490
  }, l = (i) => {
1515
1491
  var c;
1516
1492
  const a = t.suggestions[i];
1517
- a && ((c = t.onSelect) == null || c.call(t, pn(a)));
1493
+ a && ((c = t.onSelect) == null || c.call(t, un(a)));
1518
1494
  };
1519
- return j(
1495
+ return N(
1520
1496
  () => t.activeKeyboardIndex,
1521
1497
  (i) => {
1522
1498
  if (i !== -1 && n.value) {
@@ -1524,39 +1500,39 @@ const Zt = (e, t) => {
1524
1500
  a && a.scrollIntoView({ block: "nearest" });
1525
1501
  }
1526
1502
  }
1527
- ), (i, a) => (k(), U(dn, { name: "suggestion-slide-up" }, {
1528
- default: I(() => [
1503
+ ), (i, a) => (k(), V(an, { name: "suggestion-slide-up" }, {
1504
+ default: $(() => [
1529
1505
  t.show && t.suggestions.length ? (k(), M("div", {
1530
1506
  key: 0,
1531
1507
  ref_key: "suggestionsListRef",
1532
1508
  ref: n,
1533
1509
  class: "suggestion-list",
1534
- style: fn(t.popupStyle)
1510
+ style: cn(t.popupStyle)
1535
1511
  }, [
1536
- (k(!0), M(De, null, Be(t.suggestions, (c, d) => (k(), M("div", {
1512
+ (k(!0), M(Pe, null, De(t.suggestions, (c, d) => (k(), M("div", {
1537
1513
  key: d,
1538
- class: Q(["suggestion-list__item", { highlighted: s(d) }]),
1514
+ class: Z(["suggestion-list__item", { highlighted: s(d) }]),
1539
1515
  onMouseenter: (u) => r(d),
1540
1516
  onMouseleave: o,
1541
1517
  onClick: (u) => l(d)
1542
1518
  }, [
1543
- oe(L(Rn), { class: "suggestion-list__icon" }),
1544
- B("span", Bo, [
1545
- (k(!0), M(De, null, Be(L(Po)(c, t.inputValue), (u, y) => (k(), M("span", {
1546
- key: y,
1547
- class: Q({
1519
+ ne(L(kn), { class: "suggestion-list__icon" }),
1520
+ B("span", Do, [
1521
+ (k(!0), M(Pe, null, De(L(Oo)(c, t.inputValue), (u, x) => (k(), M("span", {
1522
+ key: x,
1523
+ class: Z({
1548
1524
  "suggestion-list__text--match": u.isMatch,
1549
1525
  "suggestion-list__text--normal": !u.isMatch
1550
1526
  })
1551
- }, pe(u.text), 3))), 128))
1527
+ }, fe(u.text), 3))), 128))
1552
1528
  ])
1553
- ], 42, Do))), 128))
1554
- ], 4)) : W("", !0)
1529
+ ], 42, Po))), 128))
1530
+ ], 4)) : K("", !0)
1555
1531
  ]),
1556
1532
  _: 1
1557
1533
  }));
1558
1534
  }
1559
- }), $o = /* @__PURE__ */ Y(Io, [["__scopeId", "data-v-76a6f35e"]]), jo = (e, t) => {
1535
+ }), Bo = /* @__PURE__ */ Y(Io, [["__scopeId", "data-v-76a6f35e"]]), $o = (e, t) => {
1560
1536
  if (!e || !t)
1561
1537
  return { text: "", show: !1, showTab: !1 };
1562
1538
  const n = e.toLowerCase(), s = t.toLowerCase();
@@ -1568,8 +1544,8 @@ const Zt = (e, t) => {
1568
1544
  show: o,
1569
1545
  showTab: o
1570
1546
  };
1571
- }, q = new re(le.SUGGESTION);
1572
- function No(e) {
1547
+ }, H = new oe(ie.SUGGESTION);
1548
+ function jo(e) {
1573
1549
  const {
1574
1550
  editor: t,
1575
1551
  activeSuggestionKeys: n = ["Enter"],
@@ -1581,49 +1557,49 @@ function No(e) {
1581
1557
  let i = null, a = null, c = null, d = !1;
1582
1558
  function u() {
1583
1559
  const p = t.extensionManager.extensions.find(
1584
- (x) => x.name === be.SUGGESTION
1585
- ), f = p == null ? void 0 : p.options, m = (f == null ? void 0 : f.items) || (f == null ? void 0 : f.suggestions) || [];
1586
- return m && typeof m == "object" && "value" in m ? m.value : m;
1560
+ (m) => m.name === ye.SUGGESTION
1561
+ ), f = p == null ? void 0 : p.options, y = (f == null ? void 0 : f.items) || (f == null ? void 0 : f.suggestions) || [];
1562
+ return y && typeof y == "object" && "value" in y ? y.value : y;
1587
1563
  }
1588
- function y(p) {
1564
+ function x(p) {
1589
1565
  const f = u();
1590
1566
  return o ? o(f, p) : f;
1591
1567
  }
1592
- function h(p) {
1568
+ function g(p) {
1593
1569
  return p;
1594
1570
  }
1595
- function E(p, f, m) {
1596
- if (p === -1 || !m[p])
1571
+ function E(p, f, y) {
1572
+ if (p === -1 || !y[p])
1597
1573
  return { text: "", show: !1, showTab: !1 };
1598
- const x = m[p];
1599
- return jo(x.content, f);
1574
+ const m = y[p];
1575
+ return $o(m.content, f);
1600
1576
  }
1601
- function w(p, f, m) {
1577
+ function A(p, f, y) {
1602
1578
  if (!f) return;
1603
- (l == null ? void 0 : l(m)) !== !1 && t.commands.setContent(m.content), t.commands.focus();
1579
+ (l == null ? void 0 : l(y)) !== !1 && t.commands.setContent(y.content), t.commands.focus();
1604
1580
  }
1605
1581
  function v(p, f) {
1606
- const m = f.filteredSuggestions[f.selectedIndex];
1607
- m && w(p, f.range, m);
1608
- const x = p.state.tr;
1609
- x.setMeta(q, { type: "close" }), p.dispatch(x);
1582
+ const y = f.filteredSuggestions[f.selectedIndex];
1583
+ y && A(p, f.range, y);
1584
+ const m = p.state.tr;
1585
+ m.setMeta(H, { type: "close" }), p.dispatch(m);
1610
1586
  }
1611
- function g(p, f) {
1587
+ function h(p, f) {
1612
1588
  c == null || c();
1613
- const x = p.dom.closest(".tr-sender") || p.dom, T = () => {
1589
+ const m = p.dom.closest(".tr-sender") || p.dom, T = () => {
1614
1590
  if (typeof s == "number")
1615
1591
  return `${s}px`;
1616
1592
  if (typeof s == "string") {
1617
1593
  if (s.endsWith("%")) {
1618
- const _ = parseFloat(s) / 100;
1619
- return `${x.offsetWidth * _}px`;
1594
+ const w = parseFloat(s) / 100;
1595
+ return `${m.offsetWidth * w}px`;
1620
1596
  }
1621
1597
  return s;
1622
1598
  }
1623
1599
  return "400px";
1624
1600
  };
1625
- c = ft(x, f, () => {
1626
- gt(x, f, {
1601
+ c = ft(m, f, () => {
1602
+ gt(m, f, {
1627
1603
  placement: "top-start",
1628
1604
  middleware: [
1629
1605
  pt(8),
@@ -1632,38 +1608,38 @@ function No(e) {
1632
1608
  }),
1633
1609
  mt({ padding: 8 })
1634
1610
  ]
1635
- }).then(({ x: _, y: C }) => {
1636
- f.style.position = "absolute", f.style.left = `${_}px`, f.style.top = `${C}px`, f.style.zIndex = "2000", f.style.width = T();
1611
+ }).then(({ x: w, y: _ }) => {
1612
+ f.style.position = "absolute", f.style.left = `${w}px`, f.style.top = `${_}px`, f.style.zIndex = "2000", f.style.width = T();
1637
1613
  });
1638
1614
  });
1639
1615
  }
1640
1616
  function b(p) {
1641
1617
  if (!r || !p.active || !p.autoCompleteText || !p.range)
1642
- return _e.empty;
1643
- const f = t.state.doc, { selection: m } = t.state, x = m.$head.pos;
1644
- if (!(x >= f.content.size - 1))
1645
- return _e.empty;
1646
- const _ = It.widget(
1647
- x,
1618
+ return Se.empty;
1619
+ const f = t.state.doc, { selection: y } = t.state, m = y.$head.pos;
1620
+ if (!(m >= f.content.size - 1))
1621
+ return Se.empty;
1622
+ const w = Dt.widget(
1623
+ m,
1648
1624
  () => {
1649
- const C = document.createElement("span");
1650
- C.className = "suggestion-autocomplete", C.contentEditable = "false";
1651
- const $ = document.createElement("span");
1652
- if ($.className = "autocomplete-text", $.textContent = p.autoCompleteText, C.appendChild($), p.showTabIndicator) {
1653
- const J = document.createElement("span");
1654
- J.className = "tab-hint", J.textContent = "TAB", C.appendChild(J);
1625
+ const _ = document.createElement("span");
1626
+ _.className = "suggestion-autocomplete", _.contentEditable = "false";
1627
+ const I = document.createElement("span");
1628
+ if (I.className = "autocomplete-text", I.textContent = p.autoCompleteText, _.appendChild(I), p.showTabIndicator) {
1629
+ const W = document.createElement("span");
1630
+ W.className = "tab-hint", W.textContent = "TAB", _.appendChild(W);
1655
1631
  }
1656
- return C;
1632
+ return _;
1657
1633
  },
1658
1634
  {
1659
1635
  side: 1
1660
1636
  // 显示在光标右侧
1661
1637
  }
1662
1638
  );
1663
- return _e.create(f, [_]);
1639
+ return Se.create(f, [w]);
1664
1640
  }
1665
- return new ie({
1666
- key: q,
1641
+ return new se({
1642
+ key: H,
1667
1643
  state: {
1668
1644
  init() {
1669
1645
  return {
@@ -1677,9 +1653,9 @@ function No(e) {
1677
1653
  };
1678
1654
  },
1679
1655
  apply(p, f) {
1680
- const m = p.getMeta(q);
1681
- if (m) {
1682
- if (m.type === "close")
1656
+ const y = p.getMeta(H);
1657
+ if (y) {
1658
+ if (y.type === "close")
1683
1659
  return d = !0, setTimeout(() => {
1684
1660
  d = !1;
1685
1661
  }, 0), {
@@ -1691,19 +1667,19 @@ function No(e) {
1691
1667
  autoCompleteText: "",
1692
1668
  showTabIndicator: !1
1693
1669
  };
1694
- if (m.type === "updateIndex") {
1695
- const $ = { ...f, selectedIndex: m.index }, J = E(m.index, f.query, f.filteredSuggestions);
1670
+ if (y.type === "updateIndex") {
1671
+ const I = { ...f, selectedIndex: y.index }, W = E(y.index, f.query, f.filteredSuggestions);
1696
1672
  return {
1697
- ...$,
1698
- autoCompleteText: J.text,
1699
- showTabIndicator: J.showTab
1673
+ ...I,
1674
+ autoCompleteText: W.text,
1675
+ showTabIndicator: W.showTab
1700
1676
  };
1701
1677
  }
1702
1678
  }
1703
1679
  if (d || !p.docChanged && !p.selectionSet)
1704
1680
  return f;
1705
- const x = p.doc.textContent.trim(), T = x;
1706
- if (!x)
1681
+ const m = p.doc.textContent.trim(), T = m;
1682
+ if (!m)
1707
1683
  return {
1708
1684
  active: !1,
1709
1685
  range: null,
@@ -1713,8 +1689,8 @@ function No(e) {
1713
1689
  autoCompleteText: "",
1714
1690
  showTabIndicator: !1
1715
1691
  };
1716
- const _ = y(T);
1717
- if (_.length === 0)
1692
+ const w = x(T);
1693
+ if (w.length === 0)
1718
1694
  return {
1719
1695
  active: !1,
1720
1696
  range: null,
@@ -1724,15 +1700,15 @@ function No(e) {
1724
1700
  autoCompleteText: "",
1725
1701
  showTabIndicator: !1
1726
1702
  };
1727
- const C = E(0, T, _);
1703
+ const _ = E(0, T, w);
1728
1704
  return {
1729
1705
  active: !0,
1730
1706
  range: { from: 0, to: p.doc.content.size },
1731
1707
  query: T,
1732
- filteredSuggestions: _,
1708
+ filteredSuggestions: w,
1733
1709
  selectedIndex: 0,
1734
- autoCompleteText: C.text,
1735
- showTabIndicator: C.showTab
1710
+ autoCompleteText: _.text,
1711
+ showTabIndicator: _.showTab
1736
1712
  };
1737
1713
  }
1738
1714
  },
@@ -1749,28 +1725,28 @@ function No(e) {
1749
1725
  );
1750
1726
  },
1751
1727
  handleKeyDown(p, f) {
1752
- const m = q.getState(p.state);
1753
- if (!(m != null && m.active))
1728
+ const y = H.getState(p.state);
1729
+ if (!(y != null && y.active))
1754
1730
  return !1;
1755
- if (P(f, "TAB") && m.autoCompleteText)
1756
- return f.preventDefault(), v(p, m), !0;
1757
- if (we(f, ["ARROW_UP", "ARROW_DOWN"])) {
1731
+ if (D(f, "TAB") && y.autoCompleteText)
1732
+ return f.preventDefault(), v(p, y), !0;
1733
+ if (Ee(f, ["ARROW_UP", "ARROW_DOWN"])) {
1758
1734
  f.preventDefault();
1759
- const x = P(f, "ARROW_DOWN") ? 1 : -1, T = m.filteredSuggestions.length;
1760
- let _ = m.selectedIndex + x;
1761
- _ < 0 ? _ = T - 1 : _ >= T && (_ = 0);
1762
- const C = p.state.tr;
1763
- return C.setMeta(q, {
1735
+ const m = D(f, "ARROW_DOWN") ? 1 : -1, T = y.filteredSuggestions.length;
1736
+ let w = y.selectedIndex + m;
1737
+ w < 0 ? w = T - 1 : w >= T && (w = 0);
1738
+ const _ = p.state.tr;
1739
+ return _.setMeta(H, {
1764
1740
  type: "updateIndex",
1765
- index: _
1766
- }), p.dispatch(C), !0;
1741
+ index: w
1742
+ }), p.dispatch(_), !0;
1767
1743
  }
1768
1744
  if (n.includes(f.key))
1769
- return f.preventDefault(), v(p, m), !0;
1770
- if (P(f, "ESCAPE")) {
1745
+ return f.preventDefault(), v(p, y), !0;
1746
+ if (D(f, "ESCAPE")) {
1771
1747
  f.preventDefault();
1772
- const x = p.state.tr;
1773
- return x.setMeta(q, { type: "close" }), p.dispatch(x), !0;
1748
+ const m = p.state.tr;
1749
+ return m.setMeta(H, { type: "close" }), p.dispatch(m), !0;
1774
1750
  }
1775
1751
  return !1;
1776
1752
  }
@@ -1778,7 +1754,7 @@ function No(e) {
1778
1754
  view() {
1779
1755
  return {
1780
1756
  update(p) {
1781
- const f = q.getState(p.state);
1757
+ const f = H.getState(p.state);
1782
1758
  f != null && f.active && f.filteredSuggestions.length > 0 ? (i ? i.updateProps({
1783
1759
  show: f.active && f.filteredSuggestions.length > 0,
1784
1760
  suggestions: f.filteredSuggestions,
@@ -1788,7 +1764,7 @@ function No(e) {
1788
1764
  },
1789
1765
  activeKeyboardIndex: f.selectedIndex,
1790
1766
  inputValue: f.query
1791
- }) : (i = new Bt($o, {
1767
+ }) : (i = new Pt(Bo, {
1792
1768
  props: {
1793
1769
  show: f.active && f.filteredSuggestions.length > 0,
1794
1770
  suggestions: f.filteredSuggestions,
@@ -1799,18 +1775,18 @@ function No(e) {
1799
1775
  activeKeyboardIndex: f.selectedIndex,
1800
1776
  activeMouseIndex: -1,
1801
1777
  inputValue: f.query,
1802
- onSelect: (m) => {
1803
- w(p, f.range, m);
1804
- const x = p.state.tr;
1805
- x.setMeta(q, { type: "close" }), p.dispatch(x);
1778
+ onSelect: (y) => {
1779
+ A(p, f.range, y);
1780
+ const m = p.state.tr;
1781
+ m.setMeta(H, { type: "close" }), p.dispatch(m);
1806
1782
  },
1807
- onMouseEnter: (m) => {
1808
- const x = p.state.tr;
1809
- x.setMeta(q, { type: "updateIndex", index: m }), p.dispatch(x);
1783
+ onMouseEnter: (y) => {
1784
+ const m = p.state.tr;
1785
+ m.setMeta(H, { type: "updateIndex", index: y }), p.dispatch(m);
1810
1786
  }
1811
1787
  },
1812
1788
  editor: t
1813
- }), a = i.element, document.body.appendChild(a)), a && g(p, a)) : (i && (c == null || c(), c = null, i.destroy(), i = null), a && (a.remove(), a = null));
1789
+ }), a = i.element, document.body.appendChild(a)), a && h(p, a)) : (i && (c == null || c(), c = null, i.destroy(), i = null), a && (a.remove(), a = null));
1814
1790
  },
1815
1791
  destroy() {
1816
1792
  c == null || c(), i == null || i.destroy(), a == null || a.remove();
@@ -1819,8 +1795,8 @@ function No(e) {
1819
1795
  }
1820
1796
  });
1821
1797
  }
1822
- const Jt = $t.create({
1823
- name: be.SUGGESTION,
1798
+ const Xt = It.create({
1799
+ name: ye.SUGGESTION,
1824
1800
  addOptions() {
1825
1801
  return {
1826
1802
  items: [],
@@ -1836,11 +1812,11 @@ const Jt = $t.create({
1836
1812
  };
1837
1813
  },
1838
1814
  onCreate() {
1839
- Le(this.options.items) && (this.storage.watchStopHandle = j(
1815
+ _e(this.options.items) && (this.storage.watchStopHandle = N(
1840
1816
  this.options.items,
1841
1817
  () => {
1842
1818
  const e = this.editor.state.tr;
1843
- e.setMeta(q, { type: "update" }), this.editor.view.dispatch(e);
1819
+ e.setMeta(H, { type: "update" }), this.editor.view.dispatch(e);
1844
1820
  },
1845
1821
  { deep: !0 }
1846
1822
  ));
@@ -1850,26 +1826,26 @@ const Jt = $t.create({
1850
1826
  },
1851
1827
  addProseMirrorPlugins() {
1852
1828
  return [
1853
- No({
1829
+ jo({
1854
1830
  editor: this.editor,
1855
1831
  ...this.options
1856
1832
  })
1857
1833
  ];
1858
1834
  }
1859
1835
  });
1860
- function Wo(e, t) {
1861
- return Jt.configure({
1836
+ function No(e, t) {
1837
+ return Xt.configure({
1862
1838
  items: e,
1863
1839
  ...t
1864
1840
  });
1865
1841
  }
1866
- function Ko(e) {
1842
+ function Wo(e) {
1867
1843
  const t = [];
1868
1844
  return e.state.doc.descendants((n, s) => {
1869
1845
  n.type.name === S.TEMPLATE_BLOCK && t.push({ node: n, pos: s });
1870
1846
  }), t;
1871
1847
  }
1872
- const qo = {
1848
+ const Ko = {
1873
1849
  /**
1874
1850
  * 设置模板数据(批量)
1875
1851
  */
@@ -1877,13 +1853,13 @@ const qo = {
1877
1853
  t.clearContent();
1878
1854
  const n = [];
1879
1855
  return e.forEach((s) => {
1880
- s.type === V.TEXT ? s.content && n.push({
1856
+ s.type === F.TEXT ? s.content && n.push({
1881
1857
  type: S.TEXT,
1882
1858
  text: s.content
1883
- }) : s.type === V.BLOCK ? n.push({
1859
+ }) : s.type === F.BLOCK ? n.push({
1884
1860
  type: S.TEMPLATE_BLOCK,
1885
1861
  attrs: {
1886
- id: s.id || ve("template"),
1862
+ id: s.id || be("template"),
1887
1863
  content: s.content
1888
1864
  },
1889
1865
  content: s.content ? [
@@ -1892,10 +1868,10 @@ const qo = {
1892
1868
  text: s.content
1893
1869
  }
1894
1870
  ] : []
1895
- }) : s.type === V.SELECT && n.push({
1871
+ }) : s.type === F.SELECT && n.push({
1896
1872
  type: S.TEMPLATE_SELECT,
1897
1873
  attrs: {
1898
- id: s.id || ve("select"),
1874
+ id: s.id || be("select"),
1899
1875
  placeholder: s.placeholder,
1900
1876
  options: s.options,
1901
1877
  value: s.value || null
@@ -1914,7 +1890,7 @@ const qo = {
1914
1890
  return t.insertContent({
1915
1891
  type: S.TEMPLATE_BLOCK,
1916
1892
  attrs: {
1917
- id: e.id || ve("template"),
1893
+ id: e.id || be("template"),
1918
1894
  content: n
1919
1895
  },
1920
1896
  content: n ? [
@@ -1929,7 +1905,7 @@ const qo = {
1929
1905
  * 聚焦到第一个模板块
1930
1906
  */
1931
1907
  focusFirstTemplate: () => ({ editor: e }) => {
1932
- const t = Ko(e);
1908
+ const t = Wo(e);
1933
1909
  return setTimeout(() => {
1934
1910
  var o;
1935
1911
  const { state: n, view: s } = e, r = n.tr;
@@ -1941,7 +1917,7 @@ const qo = {
1941
1917
  const { node: a, pos: c } = t[0], d = ((o = a.textContent) == null ? void 0 : o.length) || 0;
1942
1918
  l = c + 1 + d;
1943
1919
  }
1944
- const i = O.create(n.doc, l);
1920
+ const i = R.create(n.doc, l);
1945
1921
  r.setSelection(i), s.dispatch(r), s.focus();
1946
1922
  } catch (l) {
1947
1923
  console.error("[focusFirstTemplate] 设置光标失败", l);
@@ -1954,38 +1930,38 @@ const qo = {
1954
1930
  insertTemplateSelect: (e) => ({ commands: t }) => t.insertContent({
1955
1931
  type: S.TEMPLATE_SELECT,
1956
1932
  attrs: {
1957
- id: e.id || ve("select"),
1933
+ id: e.id || be("select"),
1958
1934
  placeholder: e.placeholder || "Please select",
1959
1935
  options: e.options || [],
1960
1936
  value: e.value || null
1961
1937
  }
1962
1938
  })
1963
- }, A = "​";
1939
+ }, C = "​";
1964
1940
  function Qe(e) {
1965
- return Qt(e).map((n) => n.content).join("");
1941
+ return Yt(e).map((n) => n.content).join("");
1966
1942
  }
1967
- function Qt(e) {
1943
+ function Yt(e) {
1968
1944
  const t = [];
1969
1945
  return e.state.doc.descendants((n, s, r) => {
1970
1946
  if (r && r.type.name === S.PARAGRAPH) {
1971
1947
  if (n.type.name === S.TEMPLATE_BLOCK) {
1972
- const o = (n.textContent || "").replace(new RegExp(A, "g"), "");
1948
+ const o = (n.textContent || "").replace(new RegExp(C, "g"), "");
1973
1949
  t.push({
1974
- type: V.BLOCK,
1950
+ type: F.BLOCK,
1975
1951
  content: o
1976
1952
  });
1977
1953
  } else if (n.type.name === S.TEMPLATE_SELECT) {
1978
1954
  const o = n.attrs.options.find((i) => i.value === n.attrs.value), l = (o == null ? void 0 : o.value) || "";
1979
1955
  t.push({
1980
- type: V.SELECT,
1956
+ type: F.SELECT,
1981
1957
  content: l
1982
1958
  });
1983
1959
  } else if (n.type.name === S.TEXT) {
1984
- const o = (n.text || "").replace(new RegExp(A, "g"), "");
1960
+ const o = (n.text || "").replace(new RegExp(C, "g"), "");
1985
1961
  if (o) {
1986
1962
  const l = t[t.length - 1];
1987
- l && l.type === V.TEXT ? l.content += o : t.push({
1988
- type: V.TEXT,
1963
+ l && l.type === F.TEXT ? l.content += o : t.push({
1964
+ type: F.TEXT,
1989
1965
  content: o
1990
1966
  });
1991
1967
  }
@@ -1993,27 +1969,27 @@ function Qt(e) {
1993
1969
  }
1994
1970
  }), t;
1995
1971
  }
1996
- const Ho = /* @__PURE__ */ X({
1972
+ const qo = /* @__PURE__ */ X({
1997
1973
  __name: "template-block-view",
1998
1974
  props: {
1999
1975
  node: {}
2000
1976
  },
2001
1977
  setup(e) {
2002
- const t = e, n = D(() => {
1978
+ const t = e, n = O(() => {
2003
1979
  const s = t.node.textContent || "";
2004
- return s.length === 0 || s === A;
1980
+ return s.length === 0 || s === C;
2005
1981
  });
2006
- return (s, r) => (k(), U(L(rt), {
1982
+ return (s, r) => (k(), V(L(rt), {
2007
1983
  as: "span",
2008
- class: Q(["template-block", { "is-empty": n.value }]),
1984
+ class: Z(["template-block", { "is-empty": n.value }]),
2009
1985
  "data-id": e.node.attrs.id
2010
1986
  }, {
2011
- default: I(() => [
1987
+ default: $(() => [
2012
1988
  r[0] || (r[0] = B("span", {
2013
1989
  contenteditable: "false",
2014
1990
  class: "template-block__prefix"
2015
1991
  }, " ", -1)),
2016
- oe(L(vn), {
1992
+ ne(L(xn), {
2017
1993
  as: "span",
2018
1994
  class: "template-block__content"
2019
1995
  }),
@@ -2025,8 +2001,8 @@ const Ho = /* @__PURE__ */ X({
2025
2001
  _: 1
2026
2002
  }, 8, ["class", "data-id"]));
2027
2003
  }
2028
- }), zo = /* @__PURE__ */ Y(Ho, [["__scopeId", "data-v-aa55b9db"]]);
2029
- function Fo(e) {
2004
+ }), Ho = /* @__PURE__ */ Y(qo, [["__scopeId", "data-v-aa55b9db"]]);
2005
+ function zo(e) {
2030
2006
  const t = [];
2031
2007
  let { tr: n } = e;
2032
2008
  return e.doc.descendants((s, r, o) => {
@@ -2034,9 +2010,9 @@ function Fo(e) {
2034
2010
  const { lastChild: l, firstChild: i } = s;
2035
2011
  if (i && i.type.name === S.TEMPLATE_BLOCK && t.push(r + 1), l && l.type.name === S.TEMPLATE_BLOCK) {
2036
2012
  const a = r + s.nodeSize - 1;
2037
- n.doc.textBetween(a - 1, a, "", "") !== A && t.push(a);
2013
+ n.doc.textBetween(a - 1, a, "", "") !== C && t.push(a);
2038
2014
  }
2039
- l === i && l && l.isText && l.text === A && t.push(["remove", r + 1]);
2015
+ l === i && l && l.isText && l.text === C && t.push(["remove", r + 1]);
2040
2016
  }
2041
2017
  if (s.type.name === S.TEMPLATE_BLOCK && s.content.size === 0 && t.push(r + 1), s.type.name === S.TEMPLATE_BLOCK && o) {
2042
2018
  let l = -1;
@@ -2044,217 +2020,217 @@ function Fo(e) {
2044
2020
  i === s && (l = c);
2045
2021
  }), l > -1 && l < o.childCount - 1 && o.child(l + 1).type.name === S.TEMPLATE_BLOCK) {
2046
2022
  const a = r + s.nodeSize;
2047
- n.doc.textBetween(a, a + 1, "", "") !== A && t.push(a);
2023
+ n.doc.textBetween(a, a + 1, "", "") !== C && t.push(a);
2048
2024
  }
2049
2025
  }
2050
2026
  }), t.length > 0 ? (t.sort((s, r) => {
2051
2027
  const o = Array.isArray(s) ? s[1] : s;
2052
2028
  return (Array.isArray(r) ? r[1] : r) - o;
2053
2029
  }).forEach((s) => {
2054
- Array.isArray(s) && s[0] === "remove" ? n = n.delete(s[1], s[1] + 1) : typeof s == "number" && (n = n.insertText(A, s, s));
2030
+ Array.isArray(s) && s[0] === "remove" ? n = n.delete(s[1], s[1] + 1) : typeof s == "number" && (n = n.insertText(C, s, s));
2055
2031
  }), n) : null;
2056
2032
  }
2057
- function Vo() {
2058
- return new ie({
2059
- key: new re(le.TEMPLATE_BLOCK_ZERO_WIDTH),
2033
+ function Fo() {
2034
+ return new se({
2035
+ key: new oe(ie.TEMPLATE_BLOCK_ZERO_WIDTH),
2060
2036
  appendTransaction(e, t, n) {
2061
- return e.some((r) => r.docChanged) ? Fo(n) : null;
2037
+ return e.some((r) => r.docChanged) ? zo(n) : null;
2062
2038
  }
2063
2039
  });
2064
2040
  }
2065
- function Go() {
2066
- return new ie({
2067
- key: new re(le.TEMPLATE_BLOCK_KEYBOARD),
2041
+ function Vo() {
2042
+ return new se({
2043
+ key: new oe(ie.TEMPLATE_BLOCK_KEYBOARD),
2068
2044
  props: {
2069
2045
  handleKeyDown(e, t) {
2070
- var i, a, c, d, u, y, h, E, w;
2046
+ var i, a, c, d, u, x, g, E, A;
2071
2047
  const { state: n, dispatch: s } = e, { selection: r } = n, { $from: o } = r;
2072
- if (P(t, "ARROW_LEFT") && o.nodeBefore && o.nodeBefore.isText && o.nodeBefore.text && o.nodeBefore.text === A) {
2073
- const v = o.parent, g = o.index();
2074
- if (g >= 2) {
2075
- if (v.child(g - 2).type.name === S.TEMPLATE_BLOCK) {
2048
+ if (D(t, "ARROW_LEFT") && o.nodeBefore && o.nodeBefore.isText && o.nodeBefore.text && o.nodeBefore.text === C) {
2049
+ const v = o.parent, h = o.index();
2050
+ if (h >= 2) {
2051
+ if (v.child(h - 2).type.name === S.TEMPLATE_BLOCK) {
2076
2052
  const p = o.pos - 2;
2077
- return s(n.tr.setSelection(O.create(n.doc, p))), t.preventDefault(), !0;
2053
+ return s(n.tr.setSelection(R.create(n.doc, p))), t.preventDefault(), !0;
2078
2054
  }
2079
- } else if (g === 1 && o.pos !== 0) {
2055
+ } else if (h === 1 && o.pos !== 0) {
2080
2056
  const b = o.before() - 1;
2081
2057
  if (b >= 0)
2082
- return s(n.tr.setSelection(O.create(n.doc, b))), t.preventDefault(), !0;
2058
+ return s(n.tr.setSelection(R.create(n.doc, b))), t.preventDefault(), !0;
2083
2059
  }
2084
2060
  }
2085
- if (P(t, "ARROW_RIGHT") && o.nodeAfter && o.nodeAfter.isText && o.nodeAfter.text === A) {
2086
- const v = o.parent, g = o.index();
2087
- if (g < v.childCount - 1) {
2088
- if (v.child(g + 1).type.name === S.TEMPLATE_BLOCK) {
2061
+ if (D(t, "ARROW_RIGHT") && o.nodeAfter && o.nodeAfter.isText && o.nodeAfter.text === C) {
2062
+ const v = o.parent, h = o.index();
2063
+ if (h < v.childCount - 1) {
2064
+ if (v.child(h + 1).type.name === S.TEMPLATE_BLOCK) {
2089
2065
  const p = o.pos + 2;
2090
- return s(n.tr.setSelection(O.create(n.doc, p))), t.preventDefault(), !0;
2066
+ return s(n.tr.setSelection(R.create(n.doc, p))), t.preventDefault(), !0;
2091
2067
  }
2092
- } else if (g === v.childCount - 1 && n.doc.lastChild !== o.node()) {
2068
+ } else if (h === v.childCount - 1 && n.doc.lastChild !== o.node()) {
2093
2069
  const b = o.after() + 1;
2094
- return s(n.tr.setSelection(O.create(n.doc, b))), t.preventDefault(), !0;
2070
+ return s(n.tr.setSelection(R.create(n.doc, b))), t.preventDefault(), !0;
2095
2071
  }
2096
2072
  }
2097
2073
  const l = o.node();
2098
2074
  if (l.type.name === S.TEMPLATE_BLOCK) {
2099
2075
  const v = l.textContent || "";
2100
- if (v === "" || v === A) {
2101
- if (we(t, ["ARROW_LEFT", "ARROW_RIGHT"])) {
2102
- const g = P(t, "ARROW_LEFT") ? o.before() : o.after();
2103
- if (r.from !== g)
2104
- return s(n.tr.setSelection(O.create(n.doc, g))), t.preventDefault(), !0;
2076
+ if (v === "" || v === C) {
2077
+ if (Ee(t, ["ARROW_LEFT", "ARROW_RIGHT"])) {
2078
+ const h = D(t, "ARROW_LEFT") ? o.before() : o.after();
2079
+ if (r.from !== h)
2080
+ return s(n.tr.setSelection(R.create(n.doc, h))), t.preventDefault(), !0;
2105
2081
  }
2106
2082
  } else {
2107
- if (P(t, "ARROW_LEFT") && o.pos === o.start()) {
2108
- const g = o.before();
2109
- return s(n.tr.setSelection(O.create(n.doc, g))), t.preventDefault(), !0;
2083
+ if (D(t, "ARROW_LEFT") && o.pos === o.start()) {
2084
+ const h = o.before();
2085
+ return s(n.tr.setSelection(R.create(n.doc, h))), t.preventDefault(), !0;
2110
2086
  }
2111
- if (P(t, "ARROW_RIGHT") && o.pos === o.end()) {
2112
- const g = o.after();
2113
- return s(n.tr.setSelection(O.create(n.doc, g))), t.preventDefault(), !0;
2087
+ if (D(t, "ARROW_RIGHT") && o.pos === o.end()) {
2088
+ const h = o.after();
2089
+ return s(n.tr.setSelection(R.create(n.doc, h))), t.preventDefault(), !0;
2114
2090
  }
2115
2091
  }
2116
2092
  }
2117
- if (P(t, "BACKSPACE") && r.empty) {
2118
- const v = o.node(), g = o.nodeBefore;
2093
+ if (D(t, "BACKSPACE") && r.empty) {
2094
+ const v = o.node(), h = o.nodeBefore;
2119
2095
  if (v.type.name === S.TEMPLATE_BLOCK) {
2120
2096
  const b = v.textContent || "";
2121
- if (o.pos === o.end() && b.length === 1 && b !== A) {
2097
+ if (o.pos === o.end() && b.length === 1 && b !== C) {
2122
2098
  const p = o.pos - 1;
2123
- return s(n.tr.insertText(A, p, p + 1)), t.preventDefault(), !0;
2099
+ return s(n.tr.insertText(C, p, p + 1)), t.preventDefault(), !0;
2124
2100
  }
2125
- if (b === A) {
2126
- const p = o.before(), f = n.tr.setSelection(O.create(n.doc, p));
2101
+ if (b === C) {
2102
+ const p = o.before(), f = n.tr.setSelection(R.create(n.doc, p));
2127
2103
  return s(f), t.preventDefault(), !0;
2128
2104
  }
2129
2105
  if (b === "") {
2130
- const p = o.before(), f = n.tr.setSelection(O.create(n.doc, p));
2106
+ const p = o.before(), f = n.tr.setSelection(R.create(n.doc, p));
2131
2107
  return s(f), t.preventDefault(), !0;
2132
2108
  }
2133
- if (o.pos === o.start() && b.length > 0 && b !== A) {
2109
+ if (o.pos === o.start() && b.length > 0 && b !== C) {
2134
2110
  const p = o.before();
2135
- return s(n.tr.setSelection(O.create(n.doc, p))), t.preventDefault(), !0;
2111
+ return s(n.tr.setSelection(R.create(n.doc, p))), t.preventDefault(), !0;
2136
2112
  }
2137
2113
  return !1;
2138
2114
  }
2139
- if (g && g.isText && ((i = g.text) == null ? void 0 : i.length) === 1 && g.text !== A && o.nodeAfter && o.nodeAfter.type.name === S.TEMPLATE_BLOCK) {
2140
- const b = o.pos - g.nodeSize, p = o.pos;
2115
+ if (h && h.isText && ((i = h.text) == null ? void 0 : i.length) === 1 && h.text !== C && o.nodeAfter && o.nodeAfter.type.name === S.TEMPLATE_BLOCK) {
2116
+ const b = o.pos - h.nodeSize, p = o.pos;
2141
2117
  let f = n.tr.delete(b, p);
2142
- return f = f.insertText(A, b, b), s(f), t.preventDefault(), !0;
2118
+ return f = f.insertText(C, b, b), s(f), t.preventDefault(), !0;
2143
2119
  }
2144
- if (g && g.type.name === S.TEMPLATE_BLOCK) {
2145
- const b = g.textContent || "";
2146
- if (b.length === 0 || b === A) {
2147
- const f = o.parent, m = o.index(), x = o.nodeAfter;
2148
- let T = o.pos - g.nodeSize, _ = o.pos;
2149
- if (m > 1) {
2150
- const C = f.child(m - 2);
2151
- C && C.isText && C.text === A && (T = T - 1);
2120
+ if (h && h.type.name === S.TEMPLATE_BLOCK) {
2121
+ const b = h.textContent || "";
2122
+ if (b.length === 0 || b === C) {
2123
+ const f = o.parent, y = o.index(), m = o.nodeAfter;
2124
+ let T = o.pos - h.nodeSize, w = o.pos;
2125
+ if (y > 1) {
2126
+ const _ = f.child(y - 2);
2127
+ _ && _.isText && _.text === C && (T = T - 1);
2152
2128
  }
2153
- return x && x.isText && ((a = x.text) != null && a.startsWith(A)) && (_ = _ + 1), s(n.tr.delete(T, _)), t.preventDefault(), !0;
2129
+ return m && m.isText && ((a = m.text) != null && a.startsWith(C)) && (w = w + 1), s(n.tr.delete(T, w)), t.preventDefault(), !0;
2154
2130
  } else {
2155
2131
  const f = o.pos - 1;
2156
- return s(n.tr.setSelection(O.create(n.doc, f))), t.preventDefault(), !0;
2132
+ return s(n.tr.setSelection(R.create(n.doc, f))), t.preventDefault(), !0;
2157
2133
  }
2158
2134
  }
2159
- if (g && g.isText) {
2135
+ if (h && h.isText) {
2160
2136
  const b = o.parent, p = o.index();
2161
- if (g.text === A) {
2137
+ if (h.text === C) {
2162
2138
  if (p > 1) {
2163
2139
  const f = b.child(p - 2);
2164
2140
  if (f.type.name === S.TEMPLATE_BLOCK) {
2165
- const m = f.textContent || "";
2166
- if (m.length === 0 || m === A) {
2167
- const T = o.pos - g.nodeSize - f.nodeSize, _ = o.nodeAfter;
2168
- let C = o.pos;
2169
- return _ && _.isText && _.text === A && (C = C + 1), s(n.tr.delete(T, C)), t.preventDefault(), !0;
2141
+ const y = f.textContent || "";
2142
+ if (y.length === 0 || y === C) {
2143
+ const T = o.pos - h.nodeSize - f.nodeSize, w = o.nodeAfter;
2144
+ let _ = o.pos;
2145
+ return w && w.isText && w.text === C && (_ = _ + 1), s(n.tr.delete(T, _)), t.preventDefault(), !0;
2170
2146
  } else {
2171
2147
  const T = o.pos - 2;
2172
2148
  if (T >= 0)
2173
- return s(n.tr.setSelection(O.create(n.doc, T))), t.preventDefault(), !0;
2149
+ return s(n.tr.setSelection(R.create(n.doc, T))), t.preventDefault(), !0;
2174
2150
  }
2175
2151
  }
2176
2152
  }
2177
- } else if (p === 1 && o.pos !== 1 && g.text === A) {
2153
+ } else if (p === 1 && o.pos !== 1 && h.text === C) {
2178
2154
  const f = r.from - 1 - 2;
2179
2155
  if (f >= 0)
2180
2156
  return s(n.tr.delete(f, r.to)), t.preventDefault(), !0;
2181
2157
  }
2182
2158
  }
2183
2159
  }
2184
- if (P(t, "BACKSPACE") && !r.empty) {
2185
- let v = r.from, g = r.to;
2160
+ if (D(t, "BACKSPACE") && !r.empty) {
2161
+ let v = r.from, h = r.to;
2186
2162
  const b = o.nodeBefore, p = o.nodeAfter;
2187
- if (b && b.isText && ((c = b.text) != null && c.endsWith(A)) && (v -= 1), p && p.isText && ((d = p.text) != null && d.startsWith(A)) && (g += 1), v !== r.from || g !== r.to) {
2188
- const f = n.tr.delete(v, g);
2163
+ if (b && b.isText && ((c = b.text) != null && c.endsWith(C)) && (v -= 1), p && p.isText && ((d = p.text) != null && d.startsWith(C)) && (h += 1), v !== r.from || h !== r.to) {
2164
+ const f = n.tr.delete(v, h);
2189
2165
  return s(f), t.preventDefault(), !0;
2190
2166
  }
2191
2167
  }
2192
- if (P(t, "DELETE") && r.empty) {
2193
- const v = o.node(), g = o.nodeAfter;
2168
+ if (D(t, "DELETE") && r.empty) {
2169
+ const v = o.node(), h = o.nodeAfter;
2194
2170
  if (v.type.name === S.TEMPLATE_BLOCK) {
2195
2171
  const b = v.textContent || "";
2196
- if (o.pos === o.start() && b.length === 1 && b !== A) {
2172
+ if (o.pos === o.start() && b.length === 1 && b !== C) {
2197
2173
  const p = o.pos;
2198
- return s(n.tr.insertText(A, p, p + 1)), t.preventDefault(), !0;
2174
+ return s(n.tr.insertText(C, p, p + 1)), t.preventDefault(), !0;
2199
2175
  }
2200
- if (b === A) {
2201
- const p = o.after(), f = n.tr.setSelection(O.create(n.doc, p));
2176
+ if (b === C) {
2177
+ const p = o.after(), f = n.tr.setSelection(R.create(n.doc, p));
2202
2178
  return s(f), t.preventDefault(), !0;
2203
2179
  }
2204
2180
  if (b === "") {
2205
- const p = o.after(), f = n.tr.setSelection(O.create(n.doc, p));
2181
+ const p = o.after(), f = n.tr.setSelection(R.create(n.doc, p));
2206
2182
  return s(f), t.preventDefault(), !0;
2207
2183
  }
2208
- if (o.pos === o.end() && b.length > 0 && b !== A) {
2184
+ if (o.pos === o.end() && b.length > 0 && b !== C) {
2209
2185
  const p = o.after();
2210
- return s(n.tr.setSelection(O.create(n.doc, p))), t.preventDefault(), !0;
2186
+ return s(n.tr.setSelection(R.create(n.doc, p))), t.preventDefault(), !0;
2211
2187
  }
2212
2188
  return !1;
2213
2189
  }
2214
- if (g && g.isText && ((u = g.text) == null ? void 0 : u.length) === 1 && g.text !== A && o.nodeBefore && o.nodeBefore.type.name === S.TEMPLATE_BLOCK) {
2215
- const b = o.pos, p = o.pos + g.nodeSize;
2190
+ if (h && h.isText && ((u = h.text) == null ? void 0 : u.length) === 1 && h.text !== C && o.nodeBefore && o.nodeBefore.type.name === S.TEMPLATE_BLOCK) {
2191
+ const b = o.pos, p = o.pos + h.nodeSize;
2216
2192
  let f = n.tr.delete(b, p);
2217
- return f = f.insertText(A, b, b), s(f), t.preventDefault(), !0;
2193
+ return f = f.insertText(C, b, b), s(f), t.preventDefault(), !0;
2218
2194
  }
2219
- if (g && g.type.name === S.TEMPLATE_BLOCK) {
2220
- const b = g.textContent || "";
2221
- if (b.length === 0 || b === A) {
2222
- const f = o.parent, m = o.index(), x = o.nodeBefore;
2223
- let T = o.pos, _ = o.pos + g.nodeSize;
2224
- if (x && x.isText && x.text === A && (T = T - 1), m < f.childCount - 1) {
2225
- const C = f.child(m + 1);
2226
- C && C.isText && C.text === A && (_ = _ + 1);
2195
+ if (h && h.type.name === S.TEMPLATE_BLOCK) {
2196
+ const b = h.textContent || "";
2197
+ if (b.length === 0 || b === C) {
2198
+ const f = o.parent, y = o.index(), m = o.nodeBefore;
2199
+ let T = o.pos, w = o.pos + h.nodeSize;
2200
+ if (m && m.isText && m.text === C && (T = T - 1), y < f.childCount - 1) {
2201
+ const _ = f.child(y + 1);
2202
+ _ && _.isText && _.text === C && (w = w + 1);
2227
2203
  }
2228
- return s(n.tr.delete(T, _)), t.preventDefault(), !0;
2204
+ return s(n.tr.delete(T, w)), t.preventDefault(), !0;
2229
2205
  } else {
2230
2206
  const f = o.pos + 1;
2231
- return s(n.tr.setSelection(O.create(n.doc, f))), t.preventDefault(), !0;
2207
+ return s(n.tr.setSelection(R.create(n.doc, f))), t.preventDefault(), !0;
2232
2208
  }
2233
2209
  }
2234
- if (g && g.isText) {
2210
+ if (h && h.isText) {
2235
2211
  const b = o.parent, p = o.index();
2236
2212
  if (p < b.childCount - 1) {
2237
2213
  const f = b.child(p + 1);
2238
2214
  if (f.type.name === S.TEMPLATE_BLOCK) {
2239
- const m = f.textContent || "";
2240
- if (m.length === 0 || m === A) {
2215
+ const y = f.textContent || "";
2216
+ if (y.length === 0 || y === C) {
2241
2217
  let T = o.pos;
2242
- const _ = o.pos + g.nodeSize + f.nodeSize, C = o.nodeBefore;
2243
- return C && C.isText && ((y = C.text) != null && y.endsWith(A)) && (T = T - 1), s(n.tr.delete(T, _)), t.preventDefault(), !0;
2218
+ const w = o.pos + h.nodeSize + f.nodeSize, _ = o.nodeBefore;
2219
+ return _ && _.isText && ((x = _.text) != null && x.endsWith(C)) && (T = T - 1), s(n.tr.delete(T, w)), t.preventDefault(), !0;
2244
2220
  }
2245
- if (g.text === A || (h = g.text) != null && h.startsWith(A)) {
2221
+ if (h.text === C || (g = h.text) != null && g.startsWith(C)) {
2246
2222
  const T = o.pos + 2;
2247
- return s(n.tr.setSelection(O.create(n.doc, T))), t.preventDefault(), !0;
2223
+ return s(n.tr.setSelection(R.create(n.doc, T))), t.preventDefault(), !0;
2248
2224
  }
2249
2225
  }
2250
2226
  }
2251
2227
  }
2252
2228
  }
2253
- if (P(t, "DELETE") && !r.empty) {
2254
- let v = r.from, g = r.to;
2229
+ if (D(t, "DELETE") && !r.empty) {
2230
+ let v = r.from, h = r.to;
2255
2231
  const b = o.nodeBefore, p = o.nodeAfter;
2256
- if (b && b.isText && ((E = b.text) != null && E.endsWith(A)) && (v -= 1), p && p.isText && ((w = p.text) != null && w.startsWith(A)) && (g += 1), v !== r.from || g !== r.to) {
2257
- const f = n.tr.delete(v, g);
2232
+ if (b && b.isText && ((E = b.text) != null && E.endsWith(C)) && (v -= 1), p && p.isText && ((A = p.text) != null && A.startsWith(C)) && (h += 1), v !== r.from || h !== r.to) {
2233
+ const f = n.tr.delete(v, h);
2258
2234
  return s(f), t.preventDefault(), !0;
2259
2235
  }
2260
2236
  }
@@ -2263,9 +2239,9 @@ function Go() {
2263
2239
  }
2264
2240
  });
2265
2241
  }
2266
- function Uo() {
2267
- return new ie({
2268
- key: new re(le.TEMPLATE_BLOCK_PASTE),
2242
+ function Go() {
2243
+ return new se({
2244
+ key: new oe(ie.TEMPLATE_BLOCK_PASTE),
2269
2245
  props: {
2270
2246
  handlePaste(e, t) {
2271
2247
  var o, l, i;
@@ -2276,29 +2252,29 @@ function Uo() {
2276
2252
  if (r) {
2277
2253
  const { state: a, dispatch: c } = e, d = a.selection.$from;
2278
2254
  let u = a.tr;
2279
- d.nodeBefore && d.nodeBefore.isText && d.nodeBefore.text === A && (u = u.delete(d.pos - d.nodeBefore.nodeSize, d.pos)), d.nodeAfter && d.nodeAfter.isText && d.nodeAfter.text === A && (u = u.delete(d.pos, d.pos + d.nodeAfter.nodeSize));
2280
- const y = r.split(`
2255
+ d.nodeBefore && d.nodeBefore.isText && d.nodeBefore.text === C && (u = u.delete(d.pos - d.nodeBefore.nodeSize, d.pos)), d.nodeAfter && d.nodeAfter.isText && d.nodeAfter.text === C && (u = u.delete(d.pos, d.pos + d.nodeAfter.nodeSize));
2256
+ const x = r.split(`
2281
2257
  `);
2282
- let h;
2283
- if (y.length === 1)
2284
- u = u.insertText(y[0], u.selection.from, u.selection.to), h = u.selection.$to.pos;
2258
+ let g;
2259
+ if (x.length === 1)
2260
+ u = u.insertText(x[0], u.selection.from, u.selection.to), g = u.selection.$to.pos;
2285
2261
  else {
2286
- u = u.insertText(y[0], u.selection.from, u.selection.to);
2262
+ u = u.insertText(x[0], u.selection.from, u.selection.to);
2287
2263
  let E = u.selection.$to.pos;
2288
- for (let w = 1; w < y.length; w++) {
2289
- const v = a.schema.nodes.paragraph.create({}, y[w] ? a.schema.text(y[w]) : null);
2264
+ for (let A = 1; A < x.length; A++) {
2265
+ const v = a.schema.nodes.paragraph.create({}, x[A] ? a.schema.text(x[A]) : null);
2290
2266
  u = u.insert(E, v), E += v.nodeSize;
2291
2267
  }
2292
- h = E;
2268
+ g = E;
2293
2269
  }
2294
- return u = u.setSelection(O.create(u.doc, h)), u = u.scrollIntoView(), c(u), t.preventDefault(), !0;
2270
+ return u = u.setSelection(R.create(u.doc, g)), u = u.scrollIntoView(), c(u), t.preventDefault(), !0;
2295
2271
  }
2296
2272
  return !1;
2297
2273
  }
2298
2274
  }
2299
2275
  });
2300
2276
  }
2301
- const Xo = lt.create({
2277
+ const Uo = lt.create({
2302
2278
  name: S.TEMPLATE_BLOCK,
2303
2279
  // 节点配置
2304
2280
  group: "inline",
@@ -2311,10 +2287,10 @@ const Xo = lt.create({
2311
2287
  draggable: !1,
2312
2288
  onCreate() {
2313
2289
  const { items: e } = this.options;
2314
- e && Le(e) && j(
2290
+ e && _e(e) && N(
2315
2291
  e,
2316
2292
  () => {
2317
- const t = Le(e) ? e.value : e;
2293
+ const t = _e(e) ? e.value : e;
2318
2294
  t != null && (this.editor.commands.setTemplateData(t), this.editor.commands.focusFirstTemplate());
2319
2295
  },
2320
2296
  { deep: !0, immediate: !0 }
@@ -2362,18 +2338,18 @@ const Xo = lt.create({
2362
2338
  },
2363
2339
  // 使用 Vue 组件渲染
2364
2340
  addNodeView() {
2365
- return it(zo);
2341
+ return it(Ho);
2366
2342
  },
2367
2343
  // 添加插件
2368
2344
  addProseMirrorPlugins() {
2369
- return [Vo(), Go(), Uo()];
2345
+ return [Fo(), Vo(), Go()];
2370
2346
  }
2371
- }), Ae = new re(
2372
- le.TEMPLATE_SELECT_DROPDOWN
2347
+ }), we = new oe(
2348
+ ie.TEMPLATE_SELECT_DROPDOWN
2373
2349
  );
2374
- function Yo() {
2375
- return new ie({
2376
- key: Ae,
2350
+ function Xo() {
2351
+ return new se({
2352
+ key: we,
2377
2353
  state: {
2378
2354
  init() {
2379
2355
  return {
@@ -2382,7 +2358,7 @@ function Yo() {
2382
2358
  };
2383
2359
  },
2384
2360
  apply(e, t) {
2385
- const n = e.getMeta(Ae);
2361
+ const n = e.getMeta(we);
2386
2362
  if (n) {
2387
2363
  if (n.type === "open")
2388
2364
  return {
@@ -2400,9 +2376,9 @@ function Yo() {
2400
2376
  }
2401
2377
  });
2402
2378
  }
2403
- function Zo() {
2404
- return new ie({
2405
- key: new re(le.TEMPLATE_SELECT_ZERO_WIDTH),
2379
+ function Yo() {
2380
+ return new se({
2381
+ key: new oe(ie.TEMPLATE_SELECT_ZERO_WIDTH),
2406
2382
  appendTransaction(e, t, n) {
2407
2383
  if (!e.some((l) => l.docChanged)) return null;
2408
2384
  const r = [];
@@ -2410,7 +2386,7 @@ function Zo() {
2410
2386
  return n.doc.descendants((l, i) => {
2411
2387
  if (l.type.name === S.PARAGRAPH && l.childCount > 0) {
2412
2388
  const { lastChild: a, firstChild: c } = l;
2413
- a === c && a && a.isText && a.text === A && r.push(["remove", i + 1]);
2389
+ a === c && a && a.isText && a.text === C && r.push(["remove", i + 1]);
2414
2390
  }
2415
2391
  }), r.length > 0 ? (r.forEach(([, l]) => {
2416
2392
  o = o.delete(l, l + 1);
@@ -2418,52 +2394,52 @@ function Zo() {
2418
2394
  }
2419
2395
  });
2420
2396
  }
2421
- function Jo() {
2422
- return new ie({
2423
- key: new re(le.TEMPLATE_SELECT_KEYBOARD),
2397
+ function Zo() {
2398
+ return new se({
2399
+ key: new oe(ie.TEMPLATE_SELECT_KEYBOARD),
2424
2400
  props: {
2425
2401
  handleKeyDown(e, t) {
2426
- const { state: n, dispatch: s } = e, { selection: r } = n, { $from: o } = r, l = Ae.getState(e.state);
2427
- if (l != null && l.isOpen && we(t, ["ENTER", "ARROW_UP", "ARROW_DOWN", "ESCAPE"]))
2402
+ const { state: n, dispatch: s } = e, { selection: r } = n, { $from: o } = r, l = we.getState(e.state);
2403
+ if (l != null && l.isOpen && Ee(t, ["ENTER", "ARROW_UP", "ARROW_DOWN", "ESCAPE"]))
2428
2404
  return !0;
2429
- if (P(t, "BACKSPACE") && r.empty) {
2405
+ if (D(t, "BACKSPACE") && r.empty) {
2430
2406
  const i = o.nodeBefore, a = o.nodeAfter;
2431
2407
  if ((i == null ? void 0 : i.type.name) === S.TEMPLATE_SELECT)
2432
2408
  return s(n.tr.delete(o.pos - i.nodeSize, o.pos)), t.preventDefault(), !0;
2433
- if (i != null && i.isText && i.text === A) {
2409
+ if (i != null && i.isText && i.text === C) {
2434
2410
  const c = o.pos - 1, u = n.doc.resolve(c).nodeBefore;
2435
2411
  if ((u == null ? void 0 : u.type.name) === S.TEMPLATE_SELECT) {
2436
- const y = c - u.nodeSize, h = o.pos;
2437
- return s(n.tr.delete(y, h)), t.preventDefault(), !0;
2412
+ const x = c - u.nodeSize, g = o.pos;
2413
+ return s(n.tr.delete(x, g)), t.preventDefault(), !0;
2438
2414
  }
2439
2415
  }
2440
2416
  if ((a == null ? void 0 : a.type.name) === S.TEMPLATE_SELECT) {
2441
- if (i != null && i.isText && i.text !== A)
2417
+ if (i != null && i.isText && i.text !== C)
2442
2418
  return s(n.tr.delete(o.pos - 1, o.pos)), t.preventDefault(), !0;
2443
2419
  if ((i == null ? void 0 : i.type.name) === S.TEMPLATE_BLOCK)
2444
2420
  return !1;
2445
2421
  }
2446
- if (!a && (i != null && i.isText) && i.text !== A)
2422
+ if (!a && (i != null && i.isText) && i.text !== C)
2447
2423
  return s(n.tr.delete(o.pos - 1, o.pos)), t.preventDefault(), !0;
2448
2424
  }
2449
- if (P(t, "DELETE") && r.empty) {
2425
+ if (D(t, "DELETE") && r.empty) {
2450
2426
  const i = o.nodeAfter, a = o.nodeBefore;
2451
2427
  if ((i == null ? void 0 : i.type.name) === S.TEMPLATE_SELECT)
2452
2428
  return s(n.tr.delete(o.pos, o.pos + i.nodeSize)), t.preventDefault(), !0;
2453
- if (i != null && i.isText && i.text === A) {
2429
+ if (i != null && i.isText && i.text === C) {
2454
2430
  const c = o.pos + 1, u = n.doc.resolve(c).nodeAfter;
2455
2431
  if ((u == null ? void 0 : u.type.name) === S.TEMPLATE_SELECT) {
2456
- const y = c + u.nodeSize;
2457
- return s(n.tr.delete(o.pos, y)), t.preventDefault(), !0;
2432
+ const x = c + u.nodeSize;
2433
+ return s(n.tr.delete(o.pos, x)), t.preventDefault(), !0;
2458
2434
  }
2459
2435
  }
2460
2436
  if ((a == null ? void 0 : a.type.name) === S.TEMPLATE_SELECT) {
2461
- if (i != null && i.isText && i.text !== A)
2437
+ if (i != null && i.isText && i.text !== C)
2462
2438
  return s(n.tr.delete(o.pos, o.pos + 1)), t.preventDefault(), !0;
2463
2439
  if ((i == null ? void 0 : i.type.name) === S.TEMPLATE_BLOCK)
2464
2440
  return !1;
2465
2441
  }
2466
- if (!a && (i != null && i.isText) && i.text !== A)
2442
+ if (!a && (i != null && i.isText) && i.text !== C)
2467
2443
  return s(n.tr.delete(o.pos, o.pos + 1)), t.preventDefault(), !0;
2468
2444
  }
2469
2445
  return !1;
@@ -2471,7 +2447,7 @@ function Jo() {
2471
2447
  }
2472
2448
  });
2473
2449
  }
2474
- function Qo(e, t, n) {
2450
+ function Jo(e, t, n) {
2475
2451
  const s = (r) => {
2476
2452
  const o = r.target;
2477
2453
  !e.contains(o) && !t.contains(o) && (n(), document.removeEventListener("click", s));
@@ -2482,7 +2458,7 @@ function Qo(e, t, n) {
2482
2458
  document.removeEventListener("click", s);
2483
2459
  };
2484
2460
  }
2485
- const es = { class: "template-select__icon" }, ts = ["onMousedown", "onMouseenter"], ns = /* @__PURE__ */ X({
2461
+ const Qo = { class: "template-select__icon" }, es = ["onMousedown", "onMouseenter"], ts = /* @__PURE__ */ X({
2486
2462
  __name: "template-select-view",
2487
2463
  props: {
2488
2464
  node: {},
@@ -2490,133 +2466,133 @@ const es = { class: "template-select__icon" }, ts = ["onMousedown", "onMouseente
2490
2466
  editor: {}
2491
2467
  },
2492
2468
  setup(e) {
2493
- const t = e, n = H(!1), s = H(-1), r = H(), o = H();
2469
+ const t = e, n = z(!1), s = z(-1), r = z(), o = z();
2494
2470
  let l = null, i = null;
2495
- const a = D(() => t.node.attrs.options.find((m) => m.value === t.node.attrs.value)), c = D(() => {
2496
- var m;
2497
- return ((m = a.value) == null ? void 0 : m.label) || t.node.attrs.placeholder;
2498
- }), d = D(() => !t.node.attrs.value), u = () => {
2499
- n.value ? h() : y();
2500
- }, y = async () => {
2501
- var m;
2502
- if (n.value = !0, (m = t.editor) != null && m.view) {
2503
- const x = t.editor.view, T = x.state.tr;
2504
- T.setMeta(Ae, {
2471
+ const a = O(() => t.node.attrs.options.find((y) => y.value === t.node.attrs.value)), c = O(() => {
2472
+ var y;
2473
+ return ((y = a.value) == null ? void 0 : y.label) || t.node.attrs.placeholder;
2474
+ }), d = O(() => !t.node.attrs.value), u = () => {
2475
+ n.value ? g() : x();
2476
+ }, x = async () => {
2477
+ var y;
2478
+ if (n.value = !0, (y = t.editor) != null && y.view) {
2479
+ const m = t.editor.view, T = m.state.tr;
2480
+ T.setMeta(we, {
2505
2481
  type: "open",
2506
2482
  selectId: t.node.attrs.id
2507
- }), x.dispatch(T);
2483
+ }), m.dispatch(T);
2508
2484
  }
2509
- t.node.attrs.value ? s.value = t.node.attrs.options.findIndex((x) => x.value === t.node.attrs.value) : s.value = -1, await me(), w(), r.value && o.value && (l = Qo(r.value, o.value, h));
2510
- }, h = async () => {
2511
- var m;
2512
- if (n.value = !1, s.value = -1, (m = t.editor) != null && m.view) {
2513
- const x = t.editor.view, T = x.state.tr;
2514
- T.setMeta(Ae, {
2485
+ t.node.attrs.value ? s.value = t.node.attrs.options.findIndex((m) => m.value === t.node.attrs.value) : s.value = -1, await pe(), A(), r.value && o.value && (l = Jo(r.value, o.value, g));
2486
+ }, g = async () => {
2487
+ var y;
2488
+ if (n.value = !1, s.value = -1, (y = t.editor) != null && y.view) {
2489
+ const m = t.editor.view, T = m.state.tr;
2490
+ T.setMeta(we, {
2515
2491
  type: "close"
2516
- }), x.dispatch(T);
2492
+ }), m.dispatch(T);
2517
2493
  }
2518
2494
  l && (l(), l = null), i && (i(), i = null);
2519
- }, E = (m) => {
2520
- t.updateAttributes({ value: m.value }), h();
2521
- }, w = () => {
2495
+ }, E = (y) => {
2496
+ t.updateAttributes({ value: y.value }), g();
2497
+ }, A = () => {
2522
2498
  !r.value || !o.value || (i && (i(), i = null), i = ft(r.value, o.value, () => {
2523
2499
  !r.value || !o.value || gt(r.value, o.value, {
2524
2500
  placement: "bottom-start",
2525
2501
  strategy: "fixed",
2526
2502
  // 使用 fixed 定位策略,相对于视口
2527
2503
  middleware: [pt(4), ht(), mt({ padding: 8 })]
2528
- }).then(({ x: m, y: x }) => {
2504
+ }).then(({ x: y, y: m }) => {
2529
2505
  o.value && Object.assign(o.value.style, {
2530
- left: `${m}px`,
2531
- top: `${x}px`
2506
+ left: `${y}px`,
2507
+ top: `${m}px`
2532
2508
  });
2533
2509
  });
2534
2510
  }));
2535
- }, v = (m) => {
2511
+ }, v = (y) => {
2536
2512
  if (n.value)
2537
- switch (m.key) {
2513
+ switch (y.key) {
2538
2514
  case "ArrowUp":
2539
- m.preventDefault(), g();
2515
+ y.preventDefault(), h();
2540
2516
  break;
2541
2517
  case "ArrowDown":
2542
- m.preventDefault(), b();
2518
+ y.preventDefault(), b();
2543
2519
  break;
2544
2520
  case "Enter":
2545
- m.preventDefault(), f();
2521
+ y.preventDefault(), f();
2546
2522
  break;
2547
2523
  case "Escape":
2548
- m.preventDefault(), h();
2524
+ y.preventDefault(), g();
2549
2525
  break;
2550
2526
  }
2551
- }, g = () => {
2527
+ }, h = () => {
2552
2528
  s.value === -1 || s.value <= 0 ? s.value = t.node.attrs.options.length - 1 : s.value -= 1, p();
2553
2529
  }, b = () => {
2554
2530
  s.value === -1 || s.value >= t.node.attrs.options.length - 1 ? s.value = 0 : s.value += 1, p();
2555
2531
  }, p = () => {
2556
- me(() => {
2532
+ pe(() => {
2557
2533
  if (!o.value) return;
2558
- const m = o.value.querySelector(".template-select__option.is-highlighted");
2559
- m && m.scrollIntoView({
2534
+ const y = o.value.querySelector(".template-select__option.is-highlighted");
2535
+ y && y.scrollIntoView({
2560
2536
  block: "nearest",
2561
2537
  behavior: "smooth"
2562
2538
  });
2563
2539
  });
2564
2540
  }, f = () => {
2565
- s.value >= 0 && s.value < t.node.attrs.options.length ? E(t.node.attrs.options[s.value]) : h();
2541
+ s.value >= 0 && s.value < t.node.attrs.options.length ? E(t.node.attrs.options[s.value]) : g();
2566
2542
  };
2567
- return mn(() => {
2543
+ return dn(() => {
2568
2544
  document.addEventListener("keydown", v);
2569
- }), hn(() => {
2545
+ }), fn(() => {
2570
2546
  document.removeEventListener("keydown", v), l && l(), i && i();
2571
- }), (m, x) => (k(), U(L(rt), {
2547
+ }), (y, m) => (k(), V(L(rt), {
2572
2548
  as: "span",
2573
2549
  class: "template-select"
2574
2550
  }, {
2575
- default: I(() => [
2576
- x[0] || (x[0] = B("span", {
2551
+ default: $(() => [
2552
+ m[0] || (m[0] = B("span", {
2577
2553
  contenteditable: "false",
2578
2554
  class: "template-select__prefix"
2579
2555
  }, "​", -1)),
2580
2556
  B("span", {
2581
2557
  ref_key: "triggerRef",
2582
2558
  ref: r,
2583
- class: Q(["template-select__trigger", { "is-open": n.value }]),
2559
+ class: Z(["template-select__trigger", { "is-open": n.value }]),
2584
2560
  onMousedown: et(u, ["prevent"])
2585
2561
  }, [
2586
2562
  B("span", {
2587
- class: Q(["template-select__text", { "is-placeholder": d.value }])
2588
- }, pe(c.value), 3),
2589
- B("span", es, [
2590
- oe(L(Pn))
2563
+ class: Z(["template-select__text", { "is-placeholder": d.value }])
2564
+ }, fe(c.value), 3),
2565
+ B("span", Qo, [
2566
+ ne(L(Mn))
2591
2567
  ])
2592
2568
  ], 34),
2593
- x[1] || (x[1] = B("span", {
2569
+ m[1] || (m[1] = B("span", {
2594
2570
  contenteditable: "false",
2595
2571
  class: "template-select__suffix"
2596
2572
  }, "​", -1)),
2597
- (k(), U(gn, { to: "body" }, [
2573
+ (k(), V(pn, { to: "body" }, [
2598
2574
  n.value ? (k(), M("div", {
2599
2575
  key: 0,
2600
2576
  ref_key: "dropdownRef",
2601
2577
  ref: o,
2602
2578
  class: "template-select__dropdown"
2603
2579
  }, [
2604
- (k(!0), M(De, null, Be(e.node.attrs.options, (T, _) => (k(), M("div", {
2580
+ (k(!0), M(Pe, null, De(e.node.attrs.options, (T, w) => (k(), M("div", {
2605
2581
  key: T.value,
2606
- class: Q(["template-select__option", {
2607
- "is-highlighted": _ === s.value,
2582
+ class: Z(["template-select__option", {
2583
+ "is-highlighted": w === s.value,
2608
2584
  "is-selected": T.value === e.node.attrs.value
2609
2585
  }]),
2610
- onMousedown: et((C) => E(T), ["prevent"]),
2611
- onMouseenter: (C) => s.value = _
2612
- }, pe(T.label), 43, ts))), 128))
2613
- ], 512)) : W("", !0)
2586
+ onMousedown: et((_) => E(T), ["prevent"]),
2587
+ onMouseenter: (_) => s.value = w
2588
+ }, fe(T.label), 43, es))), 128))
2589
+ ], 512)) : K("", !0)
2614
2590
  ]))
2615
2591
  ]),
2616
2592
  _: 1
2617
2593
  }));
2618
2594
  }
2619
- }), os = /* @__PURE__ */ Y(ns, [["__scopeId", "data-v-dbb18436"]]), ss = lt.create({
2595
+ }), ns = /* @__PURE__ */ Y(ts, [["__scopeId", "data-v-dbb18436"]]), os = lt.create({
2620
2596
  name: S.TEMPLATE_SELECT,
2621
2597
  // 节点配置
2622
2598
  group: "inline",
@@ -2697,29 +2673,29 @@ const es = { class: "template-select__icon" }, ts = ["onMousedown", "onMouseente
2697
2673
  },
2698
2674
  // 使用 Vue 组件渲染
2699
2675
  addNodeView() {
2700
- return it(os);
2676
+ return it(ns);
2701
2677
  },
2702
2678
  // 添加插件
2703
2679
  addProseMirrorPlugins() {
2704
- return [Yo(), Zo(), Jo()];
2680
+ return [Xo(), Yo(), Zo()];
2705
2681
  }
2706
- }), en = $t.create({
2707
- name: be.TEMPLATE,
2682
+ }), Zt = It.create({
2683
+ name: ye.TEMPLATE,
2708
2684
  addExtensions() {
2709
- return [Xo.configure(this.options), ss];
2685
+ return [Uo.configure(this.options), os];
2710
2686
  },
2711
2687
  // 添加命令(统一命令入口)
2712
2688
  addCommands() {
2713
- return qo;
2689
+ return Ko;
2714
2690
  }
2715
2691
  });
2716
- function rs(e, t) {
2717
- return en.configure({
2692
+ function ss(e, t) {
2693
+ return Zt.configure({
2718
2694
  items: e,
2719
2695
  ...t
2720
2696
  });
2721
2697
  }
2722
- function tn(e, t = "") {
2698
+ function Jt(e, t = "") {
2723
2699
  let n = (
2724
2700
  /** @type {Array<CategorizedUnicodeRange<T>>} */
2725
2701
  []
@@ -2733,7 +2709,7 @@ function tn(e, t = "") {
2733
2709
  ]) : r = s[o];
2734
2710
  return n;
2735
2711
  }
2736
- function nn(e, t, n = 0, s = t.length - 1) {
2712
+ function Qt(e, t, n = 0, s = t.length - 1) {
2737
2713
  for (; n <= s; ) {
2738
2714
  let r = n + s >>> 1, o = t[r];
2739
2715
  if (e < o[0]) s = r - 1;
@@ -2742,72 +2718,72 @@ function nn(e, t, n = 0, s = t.length - 1) {
2742
2718
  }
2743
2719
  return -1;
2744
2720
  }
2745
- const ot = tn(
2721
+ const ot = Jt(
2746
2722
  /** @type {UnicodeDataEncoding} */
2747
2723
  ",9,a,,b,1,d,,e,h,3j,w,4p,,4t,,4u,,lc,33,w3,6,13l,18,14v,,14x,1,150,1,153,,16o,5,174,a,17g,,18r,k,19s,,1cm,6,1ct,,1cv,5,1d3,1,1d6,3,1e7,,1e9,,1f4,q,1ie,a,1kb,8,1kt,,1li,3,1ln,8,1lx,2,1m1,4,1nd,2,1ow,1,1p3,8,1qi,n,1r6,,1r7,v,1s3,,1tm,,1tn,,1to,,1tq,2,1tt,7,1u1,3,1u5,,1u6,1,1u9,6,1uq,1,1vl,,1vm,1,1x8,,1xa,,1xb,1,1xd,3,1xj,1,1xn,1,1xp,,1xz,,1ya,1,1z2,,1z5,1,1z7,,20s,,20u,2,20x,1,213,1,217,2,21d,,228,1,22d,,22p,1,22r,,24c,,24e,2,24h,4,24n,1,24p,,24r,1,24t,,25e,1,262,5,269,,26a,1,27w,,27y,1,280,,281,3,287,1,28b,1,28d,,28l,2,28y,1,29u,,2bi,,2bj,,2bk,,2bl,1,2bq,2,2bu,2,2bx,,2c7,,2dc,,2dd,2,2dg,,2f0,,2f2,2,2f5,3,2fa,2,2fe,3,2fp,1,2g2,1,2gx,,2gy,1,2ik,,2im,,2in,1,2ip,,2iq,,2ir,1,2iu,2,2iy,3,2j9,1,2jm,1,2k3,,2kg,1,2ki,1,2m3,1,2m6,,2m7,1,2m9,3,2me,2,2mi,2,2ml,,2mm,,2mv,,2n6,1,2o1,,2o2,1,2q2,,2q7,,2q8,1,2qa,2,2qe,,2qg,6,2qn,,2r6,1,2sx,,2sz,,2t0,6,2tj,7,2wh,,2wj,,2wk,8,2x4,6,2zc,1,305,,307,,309,,30e,1,31t,d,327,,328,4,32e,1,32l,a,32x,z,346,,371,3,375,,376,5,37d,1,37f,1,37h,1,386,1,388,1,38e,2,38x,3,39e,,39g,,39h,1,39p,,3a5,,3cw,2n,3fk,1z,3hk,2f,3tp,2,4k2,3,4ky,2,4lu,1,4mq,1,4ok,1,4om,,4on,6,4ou,7,4p2,,4p3,1,4p5,a,4pp,,4qz,2,4r2,,4r3,,4ud,1,4vd,,4yo,2,4yr,3,4yv,1,4yx,2,4z4,1,4z6,,4z7,5,4zd,2,55j,1,55l,1,55n,,579,,57a,,57b,,57c,6,57k,,57m,,57p,7,57x,5,583,9,58f,,59s,u,5c0,3,5c4,,5dg,9,5dq,3,5du,2,5ez,8,5fk,1,5fm,,5gh,,5gi,3,5gm,1,5go,5,5ie,,5if,,5ig,1,5ii,2,5il,,5im,,5in,4,5k4,7,5kc,7,5kk,1,5km,1,5ow,2,5p0,c,5pd,,5pe,6,5pp,,5pw,,5pz,,5q0,1,5vk,1r,6bv,,6bw,,6bx,,6by,1,6co,6,6d8,,6dl,,6e8,f,6hc,w,6jm,,6k9,,6ms,5,6nd,1,6xm,1,6y0,,70o,,72n,,73d,a,73s,2,79e,,7fu,1,7g6,,7gg,,7i3,3,7i8,5,7if,b,7is,35,7m8,39,7pk,a,7pw,,7py,,7q5,,7q9,,7qg,,7qr,1,7r8,,7rb,,7rg,,7ri,,7rn,2,7rr,,7s3,4,7th,2,7tt,,7u8,,7un,,850,1,8hx,2,8ij,1,8k0,,8k5,,8vj,2,8zj,,928,v,wvj,3,wvo,9,wwu,1,wz4,1,x6q,,x6u,,x6z,,x7n,1,x7p,1,x7r,,x7w,,xa8,1,xbo,f,xc4,1,xcw,h,xdr,,xeu,7,xfr,a,xg2,,xg3,,xgg,s,xhc,2,xhf,,xir,,xis,1,xiu,3,xiy,1,xj0,1,xj2,1,xj4,,xk5,,xm1,5,xm7,1,xm9,1,xmb,1,xmd,1,xmr,,xn0,,xn1,,xoc,,xps,,xpu,2,xpz,1,xq6,1,xq9,,xrf,,xrg,1,xri,1,xrp,,xrq,,xyb,1,xyd,,xye,1,xyg,,xyh,1,xyk,,xyl,,1e68,f,1e74,f,1edb,,1ehq,1,1ek0,b,1eyl,,1f4w,,1f92,4,1gjl,2,1gjp,1,1gjw,3,1gl4,2,1glb,,1gpx,1,1h5w,3,1h7t,4,1hgr,1,1hj0,3,1hl2,a,1hmq,3,1hq8,,1hq9,,1hqa,,1hrs,e,1htc,,1htf,1,1htr,2,1htu,,1hv4,2,1hv7,3,1hvb,1,1hvd,1,1hvh,,1hvm,,1hvx,,1hxc,2,1hyf,4,1hyk,,1hyl,7,1hz9,1,1i0j,,1i0w,1,1i0y,,1i2b,2,1i2e,8,1i2n,,1i2o,,1i2q,1,1i2x,3,1i32,,1i33,,1i5o,2,1i5r,2,1i5u,1,1i5w,3,1i66,,1i69,,1ian,,1iao,2,1iar,7,1ibk,1,1ibm,1,1id7,1,1ida,,1idb,,1idc,,1idd,3,1idj,1,1idn,1,1idp,,1idz,,1iea,1,1iee,6,1ieo,4,1igo,,1igp,1,1igr,5,1igy,,1ih1,,1ih3,2,1ih6,,1ih8,1,1iha,2,1ihd,,1ihe,,1iht,1,1ik5,2,1ik8,7,1ikg,1,1iki,2,1ikl,,1ikm,,1ila,,1ink,,1inl,1,1inn,5,1int,,1inu,,1inv,1,1inx,,1iny,,1inz,1,1io1,,1io2,1,1iun,,1iuo,1,1iuq,3,1iuw,3,1iv0,1,1iv2,,1iv3,1,1ivw,1,1iy8,2,1iyb,7,1iyj,1,1iyl,,1iym,,1iyn,1,1j1n,,1j1o,,1j1p,,1j1q,1,1j1s,7,1j4t,,1j4u,,1j4v,,1j4y,3,1j52,,1j53,4,1jcc,2,1jcf,8,1jco,,1jcp,1,1jjk,,1jjl,4,1jjr,1,1jjv,3,1jjz,,1jk0,,1jk1,,1jk2,,1jk3,,1jo1,2,1jo4,3,1joa,1,1joc,3,1jog,,1jok,,1jpd,9,1jqr,5,1jqx,,1jqy,,1jqz,3,1jrb,,1jrl,5,1jrr,1,1jrt,2,1jt0,5,1jt6,c,1jtj,,1jtk,1,1k4v,,1k4w,6,1k54,5,1k5a,,1k5b,,1k7m,l,1k89,,1k8a,6,1k8h,,1k8i,1,1k8k,,1k8l,1,1kc1,5,1kca,,1kcc,1,1kcf,6,1kcm,,1kcn,,1kei,4,1keo,1,1ker,1,1ket,,1keu,,1kev,,1koj,1,1kol,1,1kow,1,1koy,,1koz,,1kqc,1,1kqe,4,1kqm,1,1kqo,2,1kre,,1ovk,f,1ow0,,1ow7,e,1xr2,b,1xre,2,1xrh,2,1zow,4,1zqo,6,206b,,206f,3,20jz,,20k1,1i,20lr,3,20o4,,20og,1,2ftp,1,2fts,3,2jgg,19,2jhs,m,2jxh,4,2jxp,5,2jxv,7,2jy3,7,2jyd,6,2jze,3,2k3m,2,2lmo,1i,2lob,1d,2lpx,,2lqc,,2lqz,4,2lr5,e,2mtc,6,2mtk,g,2mu3,6,2mub,1,2mue,4,2mxb,,2n1s,6,2nce,,2ne4,3,2nsc,3,2nzi,1,2ok0,6,2on8,6,2pz4,73,2q6l,2,2q7j,,2q98,5,2q9q,1,2qa6,,2qa9,9,2qb1,1k,2qcm,p,2qdd,e,2qe2,,2qen,,2qeq,8,2qf0,3,2qfd,c1,2qrf,4,2qrk,8t,2r0m,7d,2r9c,3j,2rg4,b,2rit,16,2rkc,3,2rm0,7,2rmi,5,2rns,7,2rou,29,2rrg,1a,2rss,9,2rt3,c8,2scg,sd,jny8,v,jnz4,2n,jo1s,3j,jo5c,6n,joc0,2rz",
2748
2724
  "262122424333333393233393339333333333393393b3b3b3b3b333b33b3bb33333b3b3333333b3b33bb3333b33b3bb33333b3bbb333b333b33333b3b3b3b3333b3b33b3bb39333b33b33b3b3b333b333333b3b333333b33b3b3333b3335dc333333b3b3b33323333b3bb3b33b3b3b3333b3333b3b333bb3b33b3b3b3b3b333b333b3323e2244234444444444444444444444444444444444444444443333333333b3b3bb33333b353b3b3b3b333b3b333b333333b3bb3b3b3bb333232333333333333333b3b3333bb3b393933b3b33bb3b393b3b3b3333b33b33b3bbb33b333b3333bb3933b3b3b333b3b3b3b3b33b3b3b33b3b3b33b3b33b33b3b3b33bb39b9b3b33b3b33b9333b393b3b33b33b3b3b3333393b3b3b33b39bb3b332333b333dd3b33332333323333333333333333333333344444444a44444434444444444444423232"
2749
- ), is = tn(
2725
+ ), rs = Jt(
2750
2726
  /** @type {UnicodeDataEncoding} */
2751
2727
  "1sl,10,1ug,7,1vc,7,1w5,j,1wq,6,1wy,,1x2,3,1y4,1,1y7,,1yo,1,239,j,23u,6,242,1,245,4,261,,26t,j,27e,6,27m,1,27p,4,28s,1,28v,,29d,,2dx,j,2ei,f,2fs,2,2l1,11"
2752
- ), kt = 65535;
2753
- function* ls(e) {
2728
+ ), _t = 65535;
2729
+ function* is(e) {
2754
2730
  let t = e.codePointAt(0);
2755
2731
  if (t == null) return;
2756
- let n = t <= kt ? 1 : 2, s = e.length, r = Mt(t), o = 0, l = 0, i = !1, a = !1, c = !1, d = 0, u = r, y = t;
2732
+ let n = t <= _t ? 1 : 2, s = e.length, r = Lt(t), o = 0, l = 0, i = !1, a = !1, c = !1, d = 0, u = r, x = t;
2757
2733
  for (; n < s; ) {
2758
2734
  t = /** @type {number} */
2759
- e.codePointAt(n), o = Mt(t);
2760
- let h = !0;
2761
- r === 1 ? h = o !== 6 : r === 2 || r === 6 || o === 1 || o === 2 || o === 6 ? h = !0 : o === 3 || o === 14 || o === 11 || r === 9 ? h = !1 : r === 14 && o === 4 ? h = !i : r === 10 && o === 10 ? h = l++ % 2 === 1 : r === 5 ? h = !(o === 5 || o === 13 || o === 7 || o === 8) : ((r === 7 || r === 13) && (o === 13 || o === 12) || (r === 8 || r === 12) && o === 12 || o === 0 && a && c && Ot(t)) && (h = !1), h ? (yield {
2735
+ e.codePointAt(n), o = Lt(t);
2736
+ let g = !0;
2737
+ r === 1 ? g = o !== 6 : r === 2 || r === 6 || o === 1 || o === 2 || o === 6 ? g = !0 : o === 3 || o === 14 || o === 11 || r === 9 ? g = !1 : r === 14 && o === 4 ? g = !i : r === 10 && o === 10 ? g = l++ % 2 === 1 : r === 5 ? g = !(o === 5 || o === 13 || o === 7 || o === 8) : ((r === 7 || r === 13) && (o === 13 || o === 12) || (r === 8 || r === 12) && o === 12 || o === 0 && a && c && kt(t)) && (g = !1), g ? (yield {
2762
2738
  segment: e.slice(d, n),
2763
2739
  index: d,
2764
2740
  input: e,
2765
- _hd: y,
2741
+ _hd: x,
2766
2742
  _catBegin: u,
2767
2743
  _catEnd: r
2768
- }, i = !1, l = 0, d = n, u = o, y = t) : o === 14 && (r === 3 || r === 4) ? i = !0 : t >= 2325 && (!a && r === 0 && (a = Ot(y)), a && o === 3 ? c = c || t === 2381 || t === 2509 || t === 2637 || t === 2765 || t === 2893 || t === 3149 || t === 3405 : c = !1), n += t <= kt ? 1 : 2, r = o;
2744
+ }, i = !1, l = 0, d = n, u = o, x = t) : o === 14 && (r === 3 || r === 4) ? i = !0 : t >= 2325 && (!a && r === 0 && (a = kt(x)), a && o === 3 ? c = c || t === 2381 || t === 2509 || t === 2637 || t === 2765 || t === 2893 || t === 3149 || t === 3405 : c = !1), n += t <= _t ? 1 : 2, r = o;
2769
2745
  }
2770
2746
  d < s && (yield {
2771
2747
  segment: e.slice(d),
2772
2748
  index: d,
2773
2749
  input: e,
2774
- _hd: y,
2750
+ _hd: x,
2775
2751
  _catBegin: u,
2776
2752
  _catEnd: r
2777
2753
  });
2778
2754
  }
2779
- function as(e) {
2755
+ function ls(e) {
2780
2756
  let t = 0;
2781
- for (let n of ls(e)) t += 1;
2757
+ for (let n of is(e)) t += 1;
2782
2758
  return t;
2783
2759
  }
2784
- const on = new Uint8Array(6080), Ke = 128, st = 12287, sn = new Uint8Array(1536), qe = 40960, rn = 44031, cs = (() => {
2760
+ const en = new Uint8Array(6080), We = 128, st = 12287, tn = new Uint8Array(1536), Ke = 40960, nn = 44031, as = (() => {
2785
2761
  let e = 0;
2786
2762
  for (; ; ) {
2787
2763
  let [t, n, s] = ot[e];
2788
- if (t > rn) break;
2789
- if (e++, !(n < Ke || t > st && n < qe))
2764
+ if (t > nn) break;
2765
+ if (e++, !(n < We || t > st && n < Ke))
2790
2766
  for (let r = t; r <= n; r++) {
2791
2767
  let o, l = 0;
2792
- r <= st ? (o = on, l = r - Ke >> 1) : (o = sn, l = r - qe >> 1), o[l] = r & 1 ? o[l] & 15 | s << 4 : o[l] & 240 | s;
2768
+ r <= st ? (o = en, l = r - We >> 1) : (o = tn, l = r - Ke >> 1), o[l] = r & 1 ? o[l] & 15 | s << 4 : o[l] & 240 | s;
2793
2769
  }
2794
2770
  }
2795
2771
  return e;
2796
2772
  })();
2797
- function Mt(e) {
2798
- if (e < Ke)
2773
+ function Lt(e) {
2774
+ if (e < We)
2799
2775
  return e >= 32 ? 0 : e === 10 ? 6 : e === 13 ? 1 : 2;
2800
2776
  if (e <= st) {
2801
- let n = on[e - Ke >> 1];
2777
+ let n = en[e - We >> 1];
2802
2778
  return (
2803
2779
  /** @type {GraphemeCategoryNum} */
2804
2780
  e & 1 ? n >> 4 : n & 15
2805
2781
  );
2806
2782
  }
2807
- if (e < qe)
2783
+ if (e < Ke)
2808
2784
  return e < 12336 ? e >= 12330 ? 3 : 0 : e < 12443 ? e === 12336 || e === 12349 ? 4 : e >= 12441 ? 3 : 0 : e === 12951 || e === 12953 ? 4 : 0;
2809
- if (e <= rn) {
2810
- let n = sn[e - qe >> 1];
2785
+ if (e <= nn) {
2786
+ let n = tn[e - Ke >> 1];
2811
2787
  return (
2812
2788
  /** @type {GraphemeCategoryNum} */
2813
2789
  e & 1 ? n >> 4 : n & 15
@@ -2819,42 +2795,42 @@ function Mt(e) {
2819
2795
  return e <= 55238 ? e >= 55216 ? 13 : 0 : e >= 55243 ? 12 : 0;
2820
2796
  if (e < 65024)
2821
2797
  return e === 64286 ? 3 : 0;
2822
- let t = nn(e, ot, cs);
2798
+ let t = Qt(e, ot, as);
2823
2799
  return t < 0 ? 0 : ot[t][2];
2824
2800
  }
2825
- function Ot(e) {
2826
- return nn(e, is) >= 0;
2801
+ function kt(e) {
2802
+ return Qt(e, rs) >= 0;
2827
2803
  }
2828
- const Rt = typeof Intl < "u" && typeof Intl.Segmenter == "function" ? new Intl.Segmenter(void 0, { granularity: "grapheme" }) : null;
2829
- function ln(e) {
2804
+ const Mt = typeof Intl < "u" && typeof Intl.Segmenter == "function" ? new Intl.Segmenter(void 0, { granularity: "grapheme" }) : null;
2805
+ function on(e) {
2830
2806
  if (!e) return 0;
2831
- if (Rt) {
2807
+ if (Mt) {
2832
2808
  let t = 0;
2833
- for (const n of Rt.segment(e))
2809
+ for (const n of Mt.segment(e))
2834
2810
  t++;
2835
2811
  return t;
2836
2812
  }
2837
- return as(e);
2813
+ return ls(e);
2838
2814
  }
2839
- function us(e, t) {
2840
- const n = H(null), s = Pe(e, "placeholder"), r = () => {
2815
+ function cs(e, t) {
2816
+ const n = z(null), s = Oe(e, "placeholder"), r = () => {
2841
2817
  var i;
2842
2818
  const l = [
2819
+ vn,
2820
+ Tn,
2821
+ En,
2843
2822
  wn,
2844
- An,
2845
- Sn,
2846
- Cn,
2847
2823
  // 提供 undo/redo 功能
2848
- _n.configure({
2824
+ An.configure({
2849
2825
  placeholder: () => s.value || "请输入内容..."
2850
2826
  }),
2851
- Ln.configure({
2827
+ Cn.configure({
2852
2828
  mode: "textSize",
2853
- textCounter: ln
2829
+ textCounter: on
2854
2830
  })
2855
2831
  ];
2856
2832
  return (i = e.extensions) != null && i.length && l.push(...e.extensions), l;
2857
- }, o = Tn({
2833
+ }, o = yn({
2858
2834
  content: e.modelValue ?? e.defaultValue ?? "",
2859
2835
  extensions: r(),
2860
2836
  autofocus: e.autofocus ? "end" : !1,
@@ -2865,13 +2841,13 @@ function us(e, t) {
2865
2841
  },
2866
2842
  // 处理粘贴事件 - 只粘贴纯文本
2867
2843
  handlePaste(l, i) {
2868
- var y;
2869
- const a = (y = i.clipboardData) == null ? void 0 : y.getData("text/plain");
2844
+ var x;
2845
+ const a = (x = i.clipboardData) == null ? void 0 : x.getData("text/plain");
2870
2846
  if (!a) return !1;
2871
2847
  const c = e.mode === "single" ? a.replace(/\r?\n/g, " ") : a, { state: d } = l, { tr: u } = d;
2872
- return u.insertText(c), l.dispatch(u), me(() => {
2873
- var h;
2874
- (h = o.value) == null || h.commands.scrollIntoView();
2848
+ return u.insertText(c), l.dispatch(u), pe(() => {
2849
+ var g;
2850
+ (g = o.value) == null || g.commands.scrollIntoView();
2875
2851
  }), !0;
2876
2852
  }
2877
2853
  },
@@ -2886,12 +2862,12 @@ function us(e, t) {
2886
2862
  t("blur", l.event);
2887
2863
  }
2888
2864
  });
2889
- return j(
2865
+ return N(
2890
2866
  () => e.modelValue,
2891
2867
  (l) => {
2892
2868
  o.value && l !== o.value.getText() && o.value.commands.setContent(l ?? "", { emitUpdate: !1 });
2893
2869
  }
2894
- ), j(
2870
+ ), N(
2895
2871
  () => e.placeholder,
2896
2872
  () => {
2897
2873
  if (o.value) {
@@ -2899,7 +2875,7 @@ function us(e, t) {
2899
2875
  o.value.view.dispatch(i);
2900
2876
  }
2901
2877
  }
2902
- ), j(
2878
+ ), N(
2903
2879
  () => e.enterkeyhint,
2904
2880
  (l) => {
2905
2881
  if (o.value) {
@@ -2907,7 +2883,7 @@ function us(e, t) {
2907
2883
  l ? i.setAttribute("enterkeyhint", l) : i.removeAttribute("enterkeyhint");
2908
2884
  }
2909
2885
  }
2910
- ), xn(() => {
2886
+ ), mn(() => {
2911
2887
  var l;
2912
2888
  (l = o.value) == null || l.destroy();
2913
2889
  }), {
@@ -2915,11 +2891,11 @@ function us(e, t) {
2915
2891
  editorRef: n
2916
2892
  };
2917
2893
  }
2918
- function ds(e) {
2894
+ function us(e) {
2919
2895
  const { submitType: t } = e;
2920
2896
  return {
2921
2897
  checkSubmitShortcut: (r) => {
2922
- if (!P(r, "ENTER")) return !1;
2898
+ if (!D(r, "ENTER")) return !1;
2923
2899
  switch (t.value) {
2924
2900
  case "enter":
2925
2901
  return !r.shiftKey && !r.ctrlKey && !r.metaKey;
@@ -2932,7 +2908,7 @@ function ds(e) {
2932
2908
  }
2933
2909
  },
2934
2910
  checkNewlineShortcut: (r) => {
2935
- if (!P(r, "ENTER")) return !1;
2911
+ if (!D(r, "ENTER")) return !1;
2936
2912
  switch (t.value) {
2937
2913
  case "enter":
2938
2914
  return r.shiftKey || r.ctrlKey || r.metaKey;
@@ -2945,32 +2921,32 @@ function ds(e) {
2945
2921
  }
2946
2922
  };
2947
2923
  }
2948
- function fs(e, t, n) {
2949
- const s = H(e.mode || "single"), r = H(!1), o = H(e.mode || "single"), { start: l, stop: i } = kn(
2924
+ function ds(e, t, n) {
2925
+ const s = z(e.mode || "single"), r = z(!1), o = z(e.mode || "single"), { start: l, stop: i } = Sn(
2950
2926
  () => {
2951
2927
  r.value = !1;
2952
2928
  },
2953
2929
  300,
2954
2930
  { immediate: !1 }
2955
- ), a = D(() => {
2931
+ ), a = O(() => {
2956
2932
  var u;
2957
2933
  return (u = n.value) == null ? void 0 : u.closest(".tr-sender-main");
2958
2934
  }), c = () => {
2959
2935
  if (o.value !== "single" || r.value || !t.value || !n.value) return;
2960
2936
  const u = n.value.querySelector(".ProseMirror");
2961
2937
  if (!u) return;
2962
- const y = t.value.getText();
2963
- s.value === "single" ? u.scrollWidth > u.clientWidth && d("multiple") : y.length || d("single");
2938
+ const x = t.value.getText();
2939
+ s.value === "single" ? u.scrollWidth > u.clientWidth && d("multiple") : x.length || d("single");
2964
2940
  }, d = (u) => {
2965
- s.value !== u && (r.value = !0, s.value = u, me(() => {
2941
+ s.value !== u && (r.value = !0, s.value = u, pe(() => {
2966
2942
  t.value && t.value.commands.focus("end"), i(), l();
2967
2943
  }));
2968
2944
  };
2969
- return Mn(a, () => {
2945
+ return _n(a, () => {
2970
2946
  requestAnimationFrame(() => {
2971
2947
  c();
2972
2948
  });
2973
- }), j(
2949
+ }), N(
2974
2950
  () => e.mode,
2975
2951
  (u) => {
2976
2952
  u && u !== s.value && (o.value = u, d(u));
@@ -2982,15 +2958,15 @@ function fs(e, t, n) {
2982
2958
  checkOverflow: c
2983
2959
  };
2984
2960
  }
2985
- function ps(e, t, n) {
2986
- const s = On("--tr-sender-line-height", t), r = D(() => {
2961
+ function fs(e, t, n) {
2962
+ const s = Ln("--tr-sender-line-height", t), r = O(() => {
2987
2963
  const i = s.value;
2988
2964
  if (i) {
2989
2965
  const a = parseFloat(i);
2990
2966
  return isNaN(a) ? 26 : a;
2991
2967
  }
2992
2968
  return 26;
2993
- }), o = D(() => n === !1 || n === void 0 ? null : n === !0 ? {
2969
+ }), o = O(() => n === !1 || n === void 0 ? null : n === !0 ? {
2994
2970
  minRows: 1,
2995
2971
  maxRows: 5
2996
2972
  } : typeof n == "object" ? {
@@ -3010,18 +2986,18 @@ function ps(e, t, n) {
3010
2986
  } else
3011
2987
  i.style.minHeight = "", i.style.maxHeight = "", i.style.overflowY = e.value === "single" ? "hidden" : "auto";
3012
2988
  };
3013
- return j(
2989
+ return N(
3014
2990
  e,
3015
2991
  () => {
3016
- me(() => {
2992
+ pe(() => {
3017
2993
  l();
3018
2994
  });
3019
2995
  },
3020
2996
  { immediate: !0 }
3021
- ), j(
2997
+ ), N(
3022
2998
  o,
3023
2999
  () => {
3024
- me(() => {
3000
+ pe(() => {
3025
3001
  l();
3026
3002
  });
3027
3003
  },
@@ -3030,33 +3006,33 @@ function ps(e, t, n) {
3030
3006
  updateHeight: l
3031
3007
  };
3032
3008
  }
3033
- function ms(e, t) {
3034
- const { editor: n, editorRef: s } = us(e, t), r = D(() => n.value ? Qe(n.value).trim().length > 0 : !1), o = D(() => n.value ? ln(Qe(n.value)) : 0), l = D(() => e.maxLength ? o.value > e.maxLength : !1), i = D(() => {
3035
- var m, x;
3036
- return !e.disabled && !e.loading && r.value && !l.value && !((x = (m = e.defaultActions) == null ? void 0 : m.submit) != null && x.disabled);
3037
- }), a = () => {
3038
- if (!i.value || !n.value) return;
3039
- let m, x = "";
3040
- if (n.value.extensionManager.extensions.some((T) => T.name === be.TEMPLATE)) {
3041
- const T = Qt(n.value);
3042
- T.length > 0 && (m = T), x = Qe(n.value);
3043
- } else if (n.value.extensionManager.extensions.some((T) => T.name === be.MENTION)) {
3044
- const T = Mo(n.value);
3045
- T.length > 0 && (m = T), x = ko(n.value);
3009
+ function ps(e, t) {
3010
+ const { editor: n, editorRef: s } = cs(e, t), r = O(() => n.value ? Qe(n.value).trim().length > 0 : !1), o = O(() => r.value || !!e.hasExternalContent), l = O(() => n.value ? on(Qe(n.value)) : 0), i = O(() => e.maxLength ? l.value > e.maxLength : !1), a = O(() => {
3011
+ var m, T;
3012
+ return !e.disabled && !e.loading && o.value && !i.value && !((T = (m = e.defaultActions) == null ? void 0 : m.submit) != null && T.disabled);
3013
+ }), c = () => {
3014
+ if (!a.value || !n.value) return;
3015
+ let m, T = "";
3016
+ if (n.value.extensionManager.extensions.some((w) => w.name === ye.TEMPLATE)) {
3017
+ const w = Yt(n.value);
3018
+ w.length > 0 && (m = w), T = Qe(n.value);
3019
+ } else if (n.value.extensionManager.extensions.some((w) => w.name === ye.MENTION)) {
3020
+ const w = ko(n.value);
3021
+ w.length > 0 && (m = w), T = Lo(n.value);
3046
3022
  }
3047
- x || (x = n.value.getText()), t("submit", x, m);
3048
- }, { currentMode: c, isAutoSwitching: d, setMode: u, checkOverflow: y } = fs(e, n, s), h = ds({
3049
- submitType: D(() => e.submitType ?? "enter")
3023
+ T || (T = n.value.getText()), t("submit", T, m);
3024
+ }, { currentMode: d, isAutoSwitching: u, setMode: x, checkOverflow: g } = ds(e, n, s), E = us({
3025
+ submitType: O(() => e.submitType ?? "enter")
3050
3026
  });
3051
- j(
3027
+ N(
3052
3028
  n,
3053
3029
  (m) => {
3054
3030
  m && m.setOptions({
3055
3031
  editorProps: {
3056
3032
  ...m.options.editorProps,
3057
- handleKeyDown: (x, T) => {
3058
- const _ = de.getState(x.state), C = q.getState(x.state), $ = Ae.getState(x.state);
3059
- return _ && _.active || C && C.active || $ && $.isOpen ? !1 : h.checkSubmitShortcut(T) ? (T.preventDefault(), a(), !0) : h.checkNewlineShortcut(T) ? (T.preventDefault(), c.value === "single" ? (u("multiple"), setTimeout(() => {
3033
+ handleKeyDown: (T, w) => {
3034
+ const _ = ue.getState(T.state), I = H.getState(T.state), W = we.getState(T.state);
3035
+ return _ && _.active || I && I.active || W && W.isOpen ? !1 : E.checkSubmitShortcut(w) ? (w.preventDefault(), c(), !0) : E.checkNewlineShortcut(w) ? (w.preventDefault(), d.value === "single" ? (x("multiple"), setTimeout(() => {
3060
3036
  m.commands.splitBlock(), m.commands.focus();
3061
3037
  }, 0)) : m.commands.splitBlock(), !0) : !1;
3062
3038
  }
@@ -3064,78 +3040,79 @@ function ms(e, t) {
3064
3040
  });
3065
3041
  },
3066
3042
  { immediate: !0 }
3067
- ), ps(c, s, e.autoSize), j(
3043
+ ), fs(d, s, e.autoSize), N(
3068
3044
  () => {
3069
3045
  var m;
3070
3046
  return (m = n.value) == null ? void 0 : m.state.doc.content;
3071
3047
  },
3072
3048
  () => {
3073
3049
  setTimeout(() => {
3074
- y();
3050
+ g();
3075
3051
  }, 0);
3076
3052
  },
3077
3053
  { deep: !0 }
3078
3054
  );
3079
- const E = () => {
3055
+ const A = () => {
3080
3056
  var m;
3081
3057
  (m = n.value) == null || m.commands.focus();
3082
- }, w = () => {
3083
- var m, x;
3084
- (m = n.value) == null || m.commands.clearContent(), (x = n.value) == null || x.commands.focus(), t("clear");
3085
3058
  }, v = () => {
3059
+ var m, T;
3060
+ (m = n.value) == null || m.commands.clearContent(), (T = n.value) == null || T.commands.focus(), t("clear");
3061
+ }, h = () => {
3086
3062
  t("cancel");
3087
- }, g = () => {
3063
+ }, b = () => {
3088
3064
  var m;
3089
3065
  (m = n.value) == null || m.commands.blur();
3090
- }, b = (m) => {
3091
- var x;
3092
- (x = n.value) == null || x.commands.setContent(m);
3093
- }, p = () => {
3066
+ }, p = (m) => {
3067
+ var T;
3068
+ (T = n.value) == null || T.commands.setContent(m);
3069
+ }, f = () => {
3094
3070
  var m;
3095
3071
  return ((m = n.value) == null ? void 0 : m.getText()) || "";
3096
- }, f = {
3072
+ }, y = {
3097
3073
  editor: n,
3098
3074
  editorRef: s,
3099
- mode: c,
3100
- isAutoSwitching: d,
3101
- loading: D(() => e.loading ?? !1),
3102
- disabled: D(() => e.disabled ?? !1),
3103
- hasContent: r,
3104
- canSubmit: i,
3105
- isOverLimit: l,
3106
- characterCount: o,
3107
- maxLength: Pe(e, "maxLength"),
3108
- size: D(() => e.size ?? "normal"),
3109
- showWordLimit: D(() => e.showWordLimit ?? !1),
3110
- clearable: D(() => e.clearable ?? !1),
3111
- defaultActions: Pe(e, "defaultActions"),
3112
- submitType: D(() => e.submitType ?? "enter"),
3113
- stopText: Pe(e, "stopText"),
3114
- submit: a,
3115
- clear: w,
3116
- cancel: v,
3117
- focus: E,
3118
- blur: g,
3119
- setContent: b,
3120
- getContent: p
3075
+ mode: d,
3076
+ isAutoSwitching: u,
3077
+ loading: O(() => e.loading ?? !1),
3078
+ disabled: O(() => e.disabled ?? !1),
3079
+ hasContent: o,
3080
+ hasEditorContent: r,
3081
+ canSubmit: a,
3082
+ isOverLimit: i,
3083
+ characterCount: l,
3084
+ maxLength: Oe(e, "maxLength"),
3085
+ size: O(() => e.size ?? "normal"),
3086
+ showWordLimit: O(() => e.showWordLimit ?? !1),
3087
+ clearable: O(() => e.clearable ?? !1),
3088
+ defaultActions: Oe(e, "defaultActions"),
3089
+ submitType: O(() => e.submitType ?? "enter"),
3090
+ stopText: Oe(e, "stopText"),
3091
+ submit: c,
3092
+ clear: v,
3093
+ cancel: h,
3094
+ focus: A,
3095
+ blur: b,
3096
+ setContent: p,
3097
+ getContent: f
3121
3098
  };
3122
- return yn(bn, f), {
3123
- context: f,
3099
+ return hn(gn, y), {
3100
+ context: y,
3124
3101
  expose: {
3125
- submit: a,
3126
- clear: w,
3127
- cancel: v,
3128
- focus: E,
3129
- blur: g,
3130
- setContent: b,
3131
- getContent: p,
3102
+ submit: c,
3103
+ clear: v,
3104
+ cancel: h,
3105
+ focus: A,
3106
+ blur: b,
3107
+ setContent: p,
3108
+ getContent: f,
3132
3109
  editor: n
3133
3110
  }
3134
3111
  };
3135
3112
  }
3136
3113
  function xt() {
3137
3114
  const e = Me();
3138
- return D(() => ({
3115
+ return O(() => ({
3139
3116
  // 编辑器实例
3140
3117
  editor: e.editor.value,
3141
3118
  // 基础操作
@@ -3162,7 +3139,7 @@ function xt() {
3162
3139
  hasContent: e.hasContent.value
3163
3140
  }));
3164
3141
  }
3165
- const hs = { class: "tr-sender-editor-scroll" }, gs = /* @__PURE__ */ X({
3142
+ const ms = { class: "tr-sender-editor-scroll" }, hs = /* @__PURE__ */ X({
3166
3143
  __name: "index",
3167
3144
  setup(e) {
3168
3145
  const { editor: t, editorRef: n } = Me();
@@ -3171,49 +3148,49 @@ const hs = { class: "tr-sender-editor-scroll" }, gs = /* @__PURE__ */ X({
3171
3148
  ref: n,
3172
3149
  class: "tr-sender-editor-wrapper"
3173
3150
  }, [
3174
- B("div", hs, [
3175
- L(t) ? (k(), U(L(En), {
3151
+ B("div", ms, [
3152
+ L(t) ? (k(), V(L(bn), {
3176
3153
  key: 0,
3177
3154
  editor: L(t),
3178
3155
  class: "tr-sender-editor-content"
3179
- }, null, 8, ["editor"])) : W("", !0)
3156
+ }, null, 8, ["editor"])) : K("", !0)
3180
3157
  ])
3181
3158
  ], 512));
3182
3159
  }
3183
- }), an = /* @__PURE__ */ Y(gs, [["__scopeId", "data-v-7f5b51aa"]]), xs = { class: "tr-sender-single-layout" }, ys = {
3160
+ }), sn = /* @__PURE__ */ Y(hs, [["__scopeId", "data-v-7f5b51aa"]]), gs = { class: "tr-sender-single-layout" }, xs = {
3184
3161
  key: 0,
3185
3162
  class: "tr-sender-header"
3186
- }, bs = { class: "tr-sender-container" }, vs = { class: "tr-sender-main" }, Ts = {
3163
+ }, ys = { class: "tr-sender-container" }, bs = { class: "tr-sender-main" }, vs = {
3187
3164
  key: 0,
3188
3165
  class: "tr-sender-prefix"
3189
- }, Es = { class: "tr-sender-content" }, ws = /* @__PURE__ */ X({
3166
+ }, Ts = { class: "tr-sender-content" }, Es = /* @__PURE__ */ X({
3190
3167
  __name: "SingleLineLayout",
3191
3168
  setup(e) {
3192
3169
  const { editor: t, hasContent: n, loading: s, showWordLimit: r, maxLength: o } = Me(), l = xt();
3193
- return (i, a) => (k(), M("div", xs, [
3194
- i.$slots.header ? (k(), M("div", ys, [
3195
- R(i.$slots, "header", {}, void 0, !0)
3196
- ])) : W("", !0),
3197
- B("div", bs, [
3198
- B("div", vs, [
3199
- i.$slots.prefix ? (k(), M("div", Ts, [
3200
- R(i.$slots, "prefix", {}, void 0, !0)
3201
- ])) : W("", !0),
3202
- B("div", Es, [
3203
- R(i.$slots, "content", { editor: L(t) }, () => [
3204
- oe(an)
3170
+ return (i, a) => (k(), M("div", gs, [
3171
+ i.$slots.header ? (k(), M("div", xs, [
3172
+ P(i.$slots, "header", {}, void 0, !0)
3173
+ ])) : K("", !0),
3174
+ B("div", ys, [
3175
+ B("div", bs, [
3176
+ i.$slots.prefix ? (k(), M("div", vs, [
3177
+ P(i.$slots, "prefix", {}, void 0, !0)
3178
+ ])) : K("", !0),
3179
+ B("div", Ts, [
3180
+ P(i.$slots, "content", { editor: L(t) }, () => [
3181
+ ne(sn)
3205
3182
  ], !0)
3206
3183
  ])
3207
3184
  ]),
3208
3185
  B("div", {
3209
- class: Q(["tr-sender-actions-inline", { "has-content": L(n) || L(s) }])
3186
+ class: Z(["tr-sender-actions-inline", { "has-content": L(n) || L(s) }])
3210
3187
  }, [
3211
- L(r) && L(o) ? (k(), U(L(Pt), { key: 0 })) : W("", !0),
3212
- oe(L(Dt), null, Ie({ _: 2 }, [
3188
+ L(r) && L(o) ? (k(), V(L(Rt), { key: 0 })) : K("", !0),
3189
+ ne(L(Ot), null, Ie({ _: 2 }, [
3213
3190
  i.$slots["actions-inline"] ? {
3214
3191
  name: "prepend",
3215
- fn: I(() => [
3216
- R(i.$slots, "actions-inline", he(ge(L(l))), void 0, !0)
3192
+ fn: $(() => [
3193
+ P(i.$slots, "actions-inline", me(he(L(l))), void 0, !0)
3217
3194
  ]),
3218
3195
  key: "0"
3219
3196
  } : void 0
@@ -3222,69 +3199,69 @@ const hs = { class: "tr-sender-editor-scroll" }, gs = /* @__PURE__ */ X({
3222
3199
  ])
3223
3200
  ]));
3224
3201
  }
3225
- }), As = /* @__PURE__ */ Y(ws, [["__scopeId", "data-v-7b0a576c"]]), Ss = {
3202
+ }), ws = /* @__PURE__ */ Y(Es, [["__scopeId", "data-v-7b0a576c"]]), As = {
3226
3203
  key: 0,
3227
3204
  class: "tr-sender-footer"
3228
- }, Cs = { class: "tr-sender-footer-left" }, _s = { class: "tr-sender-footer-right" }, Ls = /* @__PURE__ */ X({
3205
+ }, Cs = { class: "tr-sender-footer-left" }, Ss = { class: "tr-sender-footer-right" }, _s = /* @__PURE__ */ X({
3229
3206
  __name: "index",
3230
3207
  setup(e) {
3231
3208
  const { mode: t, showWordLimit: n, maxLength: s } = Me(), r = xt();
3232
- return (o, l) => L(t) === "multiple" ? (k(), M("div", Ss, [
3209
+ return (o, l) => L(t) === "multiple" ? (k(), M("div", As, [
3233
3210
  B("div", Cs, [
3234
- R(o.$slots, "footer", he(ge(L(r))), void 0, !0)
3211
+ P(o.$slots, "footer", me(he(L(r))), void 0, !0)
3235
3212
  ]),
3236
- B("div", _s, [
3237
- L(n) && L(s) ? (k(), U(L(Pt), { key: 0 })) : W("", !0),
3238
- oe(L(Dt), null, Ie({ _: 2 }, [
3213
+ B("div", Ss, [
3214
+ L(n) && L(s) ? (k(), V(L(Rt), { key: 0 })) : K("", !0),
3215
+ ne(L(Ot), null, Ie({ _: 2 }, [
3239
3216
  o.$slots["footer-right"] ? {
3240
3217
  name: "prepend",
3241
- fn: I(() => [
3242
- R(o.$slots, "footer-right", he(ge(L(r))), void 0, !0)
3218
+ fn: $(() => [
3219
+ P(o.$slots, "footer-right", me(he(L(r))), void 0, !0)
3243
3220
  ]),
3244
3221
  key: "0"
3245
3222
  } : void 0
3246
3223
  ]), 1024)
3247
3224
  ])
3248
- ])) : W("", !0);
3225
+ ])) : K("", !0);
3249
3226
  }
3250
- }), ks = /* @__PURE__ */ Y(Ls, [["__scopeId", "data-v-ffcdce27"]]), Ms = { class: "tr-sender-multi-layout" }, Os = {
3227
+ }), Ls = /* @__PURE__ */ Y(_s, [["__scopeId", "data-v-ffcdce27"]]), ks = { class: "tr-sender-multi-layout" }, Ms = {
3251
3228
  key: 0,
3252
3229
  class: "tr-sender-header"
3253
- }, Rs = { class: "tr-sender-main" }, Ps = {
3230
+ }, Rs = { class: "tr-sender-main" }, Os = {
3254
3231
  key: 0,
3255
3232
  class: "tr-sender-prefix"
3256
- }, Ds = { class: "tr-sender-content" }, Bs = /* @__PURE__ */ X({
3233
+ }, Ps = { class: "tr-sender-content" }, Ds = /* @__PURE__ */ X({
3257
3234
  __name: "MultiLineLayout",
3258
3235
  setup(e) {
3259
3236
  const t = Me(), n = xt();
3260
- return (s, r) => (k(), M("div", Ms, [
3261
- s.$slots.header ? (k(), M("div", Os, [
3262
- R(s.$slots, "header", {}, void 0, !0)
3263
- ])) : W("", !0),
3237
+ return (s, r) => (k(), M("div", ks, [
3238
+ s.$slots.header ? (k(), M("div", Ms, [
3239
+ P(s.$slots, "header", {}, void 0, !0)
3240
+ ])) : K("", !0),
3264
3241
  B("div", Rs, [
3265
- s.$slots.prefix ? (k(), M("div", Ps, [
3266
- R(s.$slots, "prefix", {}, void 0, !0)
3267
- ])) : W("", !0),
3268
- B("div", Ds, [
3269
- R(s.$slots, "content", {
3242
+ s.$slots.prefix ? (k(), M("div", Os, [
3243
+ P(s.$slots, "prefix", {}, void 0, !0)
3244
+ ])) : K("", !0),
3245
+ B("div", Ps, [
3246
+ P(s.$slots, "content", {
3270
3247
  editor: L(t).editor
3271
3248
  }, () => [
3272
- oe(an)
3249
+ ne(sn)
3273
3250
  ], !0)
3274
3251
  ])
3275
3252
  ]),
3276
- oe(ks, null, {
3277
- footer: I(() => [
3278
- R(s.$slots, "footer", he(ge(L(n))), void 0, !0)
3253
+ ne(Ls, null, {
3254
+ footer: $(() => [
3255
+ P(s.$slots, "footer", me(he(L(n))), void 0, !0)
3279
3256
  ]),
3280
- "footer-right": I(() => [
3281
- R(s.$slots, "footer-right", he(ge(L(n))), void 0, !0)
3257
+ "footer-right": $(() => [
3258
+ P(s.$slots, "footer-right", me(he(L(n))), void 0, !0)
3282
3259
  ]),
3283
3260
  _: 3
3284
3261
  })
3285
3262
  ]));
3286
3263
  }
3287
- }), Is = /* @__PURE__ */ Y(Bs, [["__scopeId", "data-v-0b507198"]]), $s = /* @__PURE__ */ X({
3264
+ }), Is = /* @__PURE__ */ Y(Ds, [["__scopeId", "data-v-0b507198"]]), Bs = /* @__PURE__ */ X({
3288
3265
  __name: "index",
3289
3266
  props: {
3290
3267
  modelValue: {},
@@ -3299,6 +3276,7 @@ const hs = { class: "tr-sender-editor-scroll" }, gs = /* @__PURE__ */ X({
3299
3276
  maxLength: {},
3300
3277
  showWordLimit: { type: Boolean },
3301
3278
  clearable: { type: Boolean },
3279
+ hasExternalContent: { type: Boolean, default: !1 },
3302
3280
  extensions: { default: () => [] },
3303
3281
  size: { default: "normal" },
3304
3282
  stopText: {},
@@ -3307,9 +3285,9 @@ const hs = { class: "tr-sender-editor-scroll" }, gs = /* @__PURE__ */ X({
3307
3285
  },
3308
3286
  emits: ["update:modelValue", "submit", "focus", "blur", "clear", "cancel", "input"],
3309
3287
  setup(e, { expose: t, emit: n }) {
3310
- const s = e, r = n, { context: o, expose: l } = ms(s, r);
3288
+ const s = e, r = n, { context: o, expose: l } = ps(s, r);
3311
3289
  return t(l), (i, a) => (k(), M("div", {
3312
- class: Q([
3290
+ class: Z([
3313
3291
  "tr-sender",
3314
3292
  `tr-sender--${L(o).mode.value}`,
3315
3293
  `tr-sender--${L(o).size.value}`,
@@ -3319,90 +3297,90 @@ const hs = { class: "tr-sender-editor-scroll" }, gs = /* @__PURE__ */ X({
3319
3297
  }
3320
3298
  ])
3321
3299
  }, [
3322
- L(o).mode.value === "single" ? (k(), U(As, { key: 0 }, Ie({ _: 2 }, [
3300
+ L(o).mode.value === "single" ? (k(), V(ws, { key: 0 }, Ie({ _: 2 }, [
3323
3301
  i.$slots.header ? {
3324
3302
  name: "header",
3325
- fn: I(() => [
3326
- R(i.$slots, "header", {}, void 0, !0)
3303
+ fn: $(() => [
3304
+ P(i.$slots, "header", {}, void 0, !0)
3327
3305
  ]),
3328
3306
  key: "0"
3329
3307
  } : void 0,
3330
3308
  i.$slots.prefix ? {
3331
3309
  name: "prefix",
3332
- fn: I(() => [
3333
- R(i.$slots, "prefix", {}, void 0, !0)
3310
+ fn: $(() => [
3311
+ P(i.$slots, "prefix", {}, void 0, !0)
3334
3312
  ]),
3335
3313
  key: "1"
3336
3314
  } : void 0,
3337
3315
  i.$slots.content ? {
3338
3316
  name: "content",
3339
- fn: I((c) => [
3340
- R(i.$slots, "content", he(ge(c)), void 0, !0)
3317
+ fn: $((c) => [
3318
+ P(i.$slots, "content", me(he(c)), void 0, !0)
3341
3319
  ]),
3342
3320
  key: "2"
3343
3321
  } : void 0,
3344
3322
  i.$slots["actions-inline"] ? {
3345
3323
  name: "actions-inline",
3346
- fn: I(() => [
3347
- R(i.$slots, "actions-inline", {}, void 0, !0)
3324
+ fn: $(() => [
3325
+ P(i.$slots, "actions-inline", {}, void 0, !0)
3348
3326
  ]),
3349
3327
  key: "3"
3350
3328
  } : void 0
3351
- ]), 1024)) : (k(), U(Is, { key: 1 }, Ie({ _: 2 }, [
3329
+ ]), 1024)) : (k(), V(Is, { key: 1 }, Ie({ _: 2 }, [
3352
3330
  i.$slots.header ? {
3353
3331
  name: "header",
3354
- fn: I(() => [
3355
- R(i.$slots, "header", {}, void 0, !0)
3332
+ fn: $(() => [
3333
+ P(i.$slots, "header", {}, void 0, !0)
3356
3334
  ]),
3357
3335
  key: "0"
3358
3336
  } : void 0,
3359
3337
  i.$slots.prefix ? {
3360
3338
  name: "prefix",
3361
- fn: I(() => [
3362
- R(i.$slots, "prefix", {}, void 0, !0)
3339
+ fn: $(() => [
3340
+ P(i.$slots, "prefix", {}, void 0, !0)
3363
3341
  ]),
3364
3342
  key: "1"
3365
3343
  } : void 0,
3366
3344
  i.$slots.content ? {
3367
3345
  name: "content",
3368
- fn: I((c) => [
3369
- R(i.$slots, "content", he(ge(c)), void 0, !0)
3346
+ fn: $((c) => [
3347
+ P(i.$slots, "content", me(he(c)), void 0, !0)
3370
3348
  ]),
3371
3349
  key: "2"
3372
3350
  } : void 0,
3373
3351
  i.$slots.footer ? {
3374
3352
  name: "footer",
3375
- fn: I(() => [
3376
- R(i.$slots, "footer", {}, void 0, !0)
3353
+ fn: $(() => [
3354
+ P(i.$slots, "footer", {}, void 0, !0)
3377
3355
  ]),
3378
3356
  key: "3"
3379
3357
  } : void 0,
3380
3358
  i.$slots["footer-right"] ? {
3381
3359
  name: "footer-right",
3382
- fn: I(() => [
3383
- R(i.$slots, "footer-right", {}, void 0, !0)
3360
+ fn: $(() => [
3361
+ P(i.$slots, "footer-right", {}, void 0, !0)
3384
3362
  ]),
3385
3363
  key: "4"
3386
3364
  } : void 0
3387
3365
  ]), 1024))
3388
3366
  ], 2));
3389
3367
  }
3390
- }), He = /* @__PURE__ */ Y($s, [["__scopeId", "data-v-6c700cc1"]]);
3391
- He.name = "TrSender";
3392
- const js = function(e) {
3393
- e.component(He.name, He);
3394
- }, er = Object.assign(He, {
3395
- install: js,
3368
+ }), qe = /* @__PURE__ */ Y(Bs, [["__scopeId", "data-v-a15c5d11"]]);
3369
+ qe.name = "TrSender";
3370
+ const $s = function(e) {
3371
+ e.component(qe.name, qe);
3372
+ }, Qs = Object.assign(qe, {
3373
+ install: $s,
3396
3374
  // 扩展类(用于继承)
3397
- Mention: Yt,
3398
- Suggestion: Jt,
3399
- Template: en,
3375
+ Mention: Gt,
3376
+ Suggestion: Xt,
3377
+ Template: Zt,
3400
3378
  // 便捷函数(用于简单场景)
3401
- mention: Oo,
3402
- suggestion: Wo,
3403
- template: rs
3379
+ mention: Mo,
3380
+ suggestion: No,
3381
+ template: ss
3404
3382
  });
3405
3383
  export {
3406
- er as default,
3384
+ Qs as default,
3407
3385
  Me as useSenderContext
3408
3386
  };