@templatical/editor 0.38.0 → 0.39.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 (289) hide show
  1. package/README.md +2 -4
  2. package/dist/{AiChatSidebar-tu4eLcf_.js → AiChatSidebar-pOxCZWz9.js} +67 -67
  3. package/dist/{AiFeatureMenu-BF0i0vA4.js → AiFeatureMenu-Bljk6Qjv.js} +7 -7
  4. package/dist/{BlockIssueBadge-DT-FqKeC.js → BlockIssueBadge-D5oGxOQP.js} +5 -5
  5. package/dist/{BlockPreviewCanvas-DDCmMram.js → BlockPreviewCanvas-DXGjUECG.js} +27 -27
  6. package/dist/{CloudHeaderExtras-NPhudovT.js → CloudHeaderExtras-DaocwNmy.js} +5 -5
  7. package/dist/{CloudPanels-Iwnky0iA.js → CloudPanels-CyZAnSJY.js} +7 -7
  8. package/dist/{CollaboratorBar-DAITu0hz.js → CollaboratorBar-C7Zca3g1.js} +4 -4
  9. package/dist/{CommentsPanel-CDvgmWP1.js → CommentsPanel-CNOb7YCm.js} +2 -2
  10. package/dist/{CommentsSidebar-X_xqM3dR.js → CommentsSidebar-VmwjU9va.js} +14 -14
  11. package/dist/{CountdownBlock-ZFJIdbP6.js → CountdownBlock-DSvbf3qU.js} +3 -3
  12. package/dist/{CountdownToolbar-DBFoG3a6.js → CountdownToolbar-C2kfS6Oy.js} +31 -30
  13. package/dist/{DesignReferenceSidebar--QtXjLrw.js → DesignReferenceSidebar-QC4gEUWp.js} +11 -11
  14. package/dist/{IssuesPanel-BLbNFMSX.js → IssuesPanel-DL2Xr14_.js} +8 -8
  15. package/dist/{LoadingTrack-BlTL4zFv.js → LoadingTrack-C2jKCU2d.js} +1 -1
  16. package/dist/LogicTagInsertButton-D8IwH-9Z.js +1071 -0
  17. package/dist/{MediaPanels-CMTAhDXB.js → MediaPanels-Cc4UkfG1.js} +2 -2
  18. package/dist/MergeTagInput-QI-5KG2R.js +81 -0
  19. package/dist/{MergeTagModeToggle-DKN6ihI5.js → MergeTagModeToggle-D793Bj_E.js} +32 -73
  20. package/dist/{ParagraphEditor-1E9yzOfk.js → ParagraphEditor-DkkPSexG.js} +50 -51
  21. package/dist/{RestoreVersionDialog-BMGUkcd8.js → RestoreVersionDialog-BgueZnZr.js} +5 -5
  22. package/dist/{RichTextEditorContent-BnxbQUV9.js → RichTextEditorContent-BC5UTVnb.js} +12 -12
  23. package/dist/{SaveBlockDialog-WKASpCCT.js → SaveBlockDialog-BuTuVlLr.js} +12 -11
  24. package/dist/{SavedBlocksBrowserModal-AYEXTMtQ.js → SavedBlocksBrowserModal-Srhix8BB.js} +17 -16
  25. package/dist/{SavedBlocksPanels-D_CpacTl.js → SavedBlocksPanels-B2iScCS-.js} +2 -2
  26. package/dist/{SavedBlocksPickBar-BHMwg-1G.js → SavedBlocksPickBar-cI7bDQQi.js} +4 -4
  27. package/dist/{TemplateScoringPanel-CSin43YM.js → TemplateScoringPanel-C2Rdlyn6.js} +104 -104
  28. package/dist/TemplateSettings-C_5leDdF.js +245 -0
  29. package/dist/{TestEmailModal-BxizsRCd.js → TestEmailModal-DJ5q_u4N.js} +55 -55
  30. package/dist/{TestEmailPanel-vd2e5HzT.js → TestEmailPanel-CP24UGst.js} +2 -2
  31. package/dist/{TitleEditor-CLJ68Ty4.js → TitleEditor-QBBOXtxx.js} +18 -18
  32. package/dist/ToggleSwitch-JvQ_CmI1.js +102 -0
  33. package/dist/Toolbar-COD2TW20.js +2426 -0
  34. package/dist/{TplModal-Q9fDgS1M.js → TplModal-C8xGjC1l.js} +5 -5
  35. package/dist/{VersionHistoryMenu-eGYVhM4H.js → VersionHistoryMenu-BVQityes.js} +10 -10
  36. package/dist/{VersionHistoryPanels-C7Ntrrfq.js → VersionHistoryPanels-BrK6na4A.js} +2 -2
  37. package/dist/{VersionPreviewBanner-BbQXnR0M.js → VersionPreviewBanner-BaMSgA1O.js} +3 -3
  38. package/dist/{blockTypeIcons-5qD4bB76.js → blockTypeIcons-CdXugKyV.js} +16 -37
  39. package/dist/bundle-stats.json +8 -8
  40. package/dist/{cdn/chunks/ca-D9S-UCfZ.js → ca-YlPDhElv.js} +5 -3
  41. package/dist/cdn/chunks/{AiChatSidebar-dyqqHAcI.js → AiChatSidebar-CjSEoK4x.js} +54 -54
  42. package/dist/cdn/chunks/AiChatSidebar-CjSEoK4x.js.map +1 -0
  43. package/dist/cdn/chunks/{AiFeatureMenu-BjVMwhW8.js → AiFeatureMenu-l0K5TOSn.js} +6 -6
  44. package/dist/cdn/chunks/{AiFeatureMenu-BjVMwhW8.js.map → AiFeatureMenu-l0K5TOSn.js.map} +1 -1
  45. package/dist/cdn/chunks/{BlockIssueBadge-BJ__oEtm.js → BlockIssueBadge-9hHpaXb9.js} +5 -5
  46. package/dist/cdn/chunks/{BlockIssueBadge-BJ__oEtm.js.map → BlockIssueBadge-9hHpaXb9.js.map} +1 -1
  47. package/dist/cdn/chunks/{BlockPreviewCanvas-B5f26eLE.js → BlockPreviewCanvas-lQrAdgG3.js} +30 -30
  48. package/dist/cdn/chunks/{BlockPreviewCanvas-B5f26eLE.js.map → BlockPreviewCanvas-lQrAdgG3.js.map} +1 -1
  49. package/dist/cdn/chunks/{CloudHeaderExtras-D5P5IEKA.js → CloudHeaderExtras-CXNe7Q-4.js} +5 -5
  50. package/dist/cdn/chunks/{CloudHeaderExtras-D5P5IEKA.js.map → CloudHeaderExtras-CXNe7Q-4.js.map} +1 -1
  51. package/dist/cdn/chunks/{CloudPanels-DkmR05nB.js → CloudPanels-bHhh9AUA.js} +6 -6
  52. package/dist/cdn/chunks/{CloudPanels-DkmR05nB.js.map → CloudPanels-bHhh9AUA.js.map} +1 -1
  53. package/dist/cdn/chunks/{CollaboratorBar-Yn7KSpt4.js → CollaboratorBar-DgqcaGGI.js} +5 -5
  54. package/dist/cdn/chunks/{CollaboratorBar-Yn7KSpt4.js.map → CollaboratorBar-DgqcaGGI.js.map} +1 -1
  55. package/dist/cdn/chunks/{CommentsPanel-CntwwocI.js → CommentsPanel-Cy4TlTHC.js} +3 -3
  56. package/dist/cdn/chunks/{CommentsPanel-CntwwocI.js.map → CommentsPanel-Cy4TlTHC.js.map} +1 -1
  57. package/dist/cdn/chunks/{CommentsSidebar-BLDKnKy7.js → CommentsSidebar-C7oAP3Mx.js} +5 -5
  58. package/dist/cdn/chunks/{CommentsSidebar-BLDKnKy7.js.map → CommentsSidebar-C7oAP3Mx.js.map} +1 -1
  59. package/dist/cdn/chunks/{CountdownBlock-B4AfqJwb.js → CountdownBlock-DdC8Lg5F.js} +4 -4
  60. package/dist/cdn/chunks/{CountdownBlock-B4AfqJwb.js.map → CountdownBlock-DdC8Lg5F.js.map} +1 -1
  61. package/dist/cdn/chunks/{CountdownToolbar-CA1dpuOI.js → CountdownToolbar-CN9h4nlC.js} +22 -21
  62. package/dist/cdn/chunks/{CountdownToolbar-CA1dpuOI.js.map → CountdownToolbar-CN9h4nlC.js.map} +1 -1
  63. package/dist/cdn/chunks/{DesignReferenceSidebar-D1Y9Hswe.js → DesignReferenceSidebar-Bjo0M-AY.js} +7 -7
  64. package/dist/cdn/chunks/{DesignReferenceSidebar-D1Y9Hswe.js.map → DesignReferenceSidebar-Bjo0M-AY.js.map} +1 -1
  65. package/dist/cdn/chunks/{IssuesPanel-Q62LTqvd.js → IssuesPanel-DdFk-Blf.js} +6 -6
  66. package/dist/cdn/chunks/{IssuesPanel-Q62LTqvd.js.map → IssuesPanel-DdFk-Blf.js.map} +1 -1
  67. package/dist/cdn/chunks/{LoadingTrack-Cm3TDKb3.js → LoadingTrack-Ba5xh5HD.js} +2 -2
  68. package/dist/cdn/chunks/{LoadingTrack-Cm3TDKb3.js.map → LoadingTrack-Ba5xh5HD.js.map} +1 -1
  69. package/dist/cdn/chunks/LogicTagInsertButton-DpyPozop.js +1035 -0
  70. package/dist/cdn/chunks/LogicTagInsertButton-DpyPozop.js.map +1 -0
  71. package/dist/cdn/chunks/{MediaPanels-D21M6shx.js → MediaPanels-kX9AZQ7K.js} +3 -3
  72. package/dist/cdn/chunks/{MediaPanels-D21M6shx.js.map → MediaPanels-kX9AZQ7K.js.map} +1 -1
  73. package/dist/cdn/chunks/MergeTagInput-ERJr7bP_.js +83 -0
  74. package/dist/cdn/chunks/MergeTagInput-ERJr7bP_.js.map +1 -0
  75. package/dist/cdn/chunks/{MergeTagModeToggle-DYxkAGtA.js → MergeTagModeToggle-n3nvSNeQ.js} +33 -33
  76. package/dist/cdn/chunks/{MergeTagModeToggle-DYxkAGtA.js.map → MergeTagModeToggle-n3nvSNeQ.js.map} +1 -1
  77. package/dist/cdn/chunks/{ParagraphEditor-Bd-GQXee.js → ParagraphEditor-DO4RzP8l.js} +43 -43
  78. package/dist/cdn/chunks/{ParagraphEditor-Bd-GQXee.js.map → ParagraphEditor-DO4RzP8l.js.map} +1 -1
  79. package/dist/cdn/chunks/{RestoreVersionDialog-2X9RpM9A.js → RestoreVersionDialog-CzZ_sFnz.js} +5 -5
  80. package/dist/cdn/chunks/{RestoreVersionDialog-2X9RpM9A.js.map → RestoreVersionDialog-CzZ_sFnz.js.map} +1 -1
  81. package/dist/cdn/chunks/{RichTextEditorContent-D_rb0rmU.js → RichTextEditorContent-Ch5zeyZ7.js} +9 -9
  82. package/dist/cdn/chunks/{RichTextEditorContent-D_rb0rmU.js.map → RichTextEditorContent-Ch5zeyZ7.js.map} +1 -1
  83. package/dist/cdn/chunks/{SaveBlockDialog-CufdTomT.js → SaveBlockDialog-LgxYrXyx.js} +10 -9
  84. package/dist/cdn/chunks/{SaveBlockDialog-CufdTomT.js.map → SaveBlockDialog-LgxYrXyx.js.map} +1 -1
  85. package/dist/cdn/chunks/{SavedBlocksBrowserModal-CqpaNsk7.js → SavedBlocksBrowserModal-CdeSsTpb.js} +9 -9
  86. package/dist/cdn/chunks/{SavedBlocksBrowserModal-CqpaNsk7.js.map → SavedBlocksBrowserModal-CdeSsTpb.js.map} +1 -1
  87. package/dist/cdn/chunks/{SavedBlocksPanels-DpxYxddo.js → SavedBlocksPanels-B5hakNJj.js} +3 -3
  88. package/dist/cdn/chunks/{SavedBlocksPanels-DpxYxddo.js.map → SavedBlocksPanels-B5hakNJj.js.map} +1 -1
  89. package/dist/cdn/chunks/{SavedBlocksPickBar-Drpoav1B.js → SavedBlocksPickBar-Cl6PLwwV.js} +5 -5
  90. package/dist/cdn/chunks/{SavedBlocksPickBar-Drpoav1B.js.map → SavedBlocksPickBar-Cl6PLwwV.js.map} +1 -1
  91. package/dist/cdn/chunks/{TemplateScoringPanel-DBjUNULq.js → TemplateScoringPanel--JxR6CsQ.js} +86 -86
  92. package/dist/cdn/chunks/TemplateScoringPanel--JxR6CsQ.js.map +1 -0
  93. package/dist/cdn/chunks/TemplateSettings-DjXiiiNr.js +207 -0
  94. package/dist/cdn/chunks/TemplateSettings-DjXiiiNr.js.map +1 -0
  95. package/dist/cdn/chunks/{TestEmailModal-BTNlSW6f.js → TestEmailModal-BAuDxJtD.js} +53 -53
  96. package/dist/cdn/chunks/TestEmailModal-BAuDxJtD.js.map +1 -0
  97. package/dist/cdn/chunks/{TestEmailPanel-D0A9Zgxr.js → TestEmailPanel-GUGZisLp.js} +3 -3
  98. package/dist/cdn/chunks/{TestEmailPanel-D0A9Zgxr.js.map → TestEmailPanel-GUGZisLp.js.map} +1 -1
  99. package/dist/cdn/chunks/{TitleEditor-CrnuIq62.js → TitleEditor-uKu33Nwr.js} +16 -16
  100. package/dist/cdn/chunks/TitleEditor-uKu33Nwr.js.map +1 -0
  101. package/dist/cdn/chunks/ToggleSwitch-CDy8OfcB.js +104 -0
  102. package/dist/cdn/chunks/ToggleSwitch-CDy8OfcB.js.map +1 -0
  103. package/dist/cdn/chunks/Toolbar-dxDYwN5E.js +2385 -0
  104. package/dist/cdn/chunks/Toolbar-dxDYwN5E.js.map +1 -0
  105. package/dist/cdn/chunks/{TplModal-DYXrTz42.js → TplModal-DuwS2ifK.js} +5 -5
  106. package/dist/cdn/chunks/{TplModal-DYXrTz42.js.map → TplModal-DuwS2ifK.js.map} +1 -1
  107. package/dist/cdn/chunks/{VersionHistoryMenu-bDGnE4hb.js → VersionHistoryMenu-Dij1pTEb.js} +6 -6
  108. package/dist/cdn/chunks/{VersionHistoryMenu-bDGnE4hb.js.map → VersionHistoryMenu-Dij1pTEb.js.map} +1 -1
  109. package/dist/cdn/chunks/{VersionHistoryPanels-82P0Q0HM.js → VersionHistoryPanels-GeR6MStB.js} +3 -3
  110. package/dist/cdn/chunks/{VersionHistoryPanels-82P0Q0HM.js.map → VersionHistoryPanels-GeR6MStB.js.map} +1 -1
  111. package/dist/cdn/chunks/{VersionPreviewBanner-BJiwKkVC.js → VersionPreviewBanner-Df3FVlig.js} +4 -4
  112. package/dist/cdn/chunks/{VersionPreviewBanner-BJiwKkVC.js.map → VersionPreviewBanner-Df3FVlig.js.map} +1 -1
  113. package/dist/cdn/chunks/{blockTypeIcons-CNjJSFun.js → blockTypeIcons-raBjStuv.js} +2 -2
  114. package/dist/cdn/chunks/{blockTypeIcons-CNjJSFun.js.map → blockTypeIcons-raBjStuv.js.map} +1 -1
  115. package/dist/{ca-D9S-UCfZ.js → cdn/chunks/ca-YlPDhElv.js} +7 -1
  116. package/dist/cdn/chunks/{ca-D9S-UCfZ.js.map → ca-YlPDhElv.js.map} +1 -1
  117. package/dist/cdn/chunks/{cloud-BLgCKP7Z.js → cloud-eaXyxZ8l.js} +2 -2
  118. package/dist/cdn/chunks/{cloud-BLgCKP7Z.js.map → cloud-eaXyxZ8l.js.map} +1 -1
  119. package/dist/cdn/chunks/{createCloudRuntime-U-qCH-dq.js → createCloudRuntime-D5bXzcTe.js} +6 -6
  120. package/dist/cdn/chunks/{createCloudRuntime-U-qCH-dq.js.map → createCloudRuntime-D5bXzcTe.js.map} +1 -1
  121. package/dist/cdn/chunks/{de-BUPszLpi.js → de-CONjnzrF.js} +6 -2
  122. package/dist/cdn/chunks/{de-BUPszLpi.js.map → de-CONjnzrF.js.map} +1 -1
  123. package/dist/cdn/chunks/{dist-BW6Y49zE.js → dist-BRZhN8qJ.js} +4 -4
  124. package/dist/cdn/chunks/dist-BRZhN8qJ.js.map +1 -0
  125. package/dist/cdn/chunks/{dist-CAFTQ6Y2.js → dist-CXB2_kBa.js} +27 -22
  126. package/dist/cdn/chunks/dist-CXB2_kBa.js.map +1 -0
  127. package/dist/cdn/chunks/{draggable-kbOhCgnk.js → draggable-IB4x6w2O.js} +1477 -1470
  128. package/dist/cdn/chunks/draggable-IB4x6w2O.js.map +1 -0
  129. package/dist/cdn/chunks/{editor-modal-MXgtarMl.js → editor-modal-C_xYN_66.js} +7 -7
  130. package/dist/cdn/chunks/{editor-modal-MXgtarMl.js.map → editor-modal-C_xYN_66.js.map} +1 -1
  131. package/dist/cdn/chunks/{en-BbOC5x3w.js → en-BAMooiOF.js} +6 -2
  132. package/dist/cdn/chunks/{en-BbOC5x3w.js.map → en-BAMooiOF.js.map} +1 -1
  133. package/dist/cdn/chunks/en-BwfjKb4M.js +2 -0
  134. package/dist/{es-0bCDcT9p.js → cdn/chunks/es-I47lHs2m.js} +7 -1
  135. package/dist/cdn/chunks/{es-0bCDcT9p.js.map → es-I47lHs2m.js.map} +1 -1
  136. package/dist/cdn/chunks/{extensions-B8_jnIkD.js → extensions-Bhu8UEE5.js} +185 -100
  137. package/dist/cdn/chunks/extensions-Bhu8UEE5.js.map +1 -0
  138. package/dist/cdn/chunks/{fr-Brr8mJ9e.js → fr-B8MIKjT4.js} +6 -2
  139. package/dist/cdn/chunks/{fr-Brr8mJ9e.js.map → fr-B8MIKjT4.js.map} +1 -1
  140. package/dist/cdn/chunks/htmlparser-ClUZ6waR.js +1113 -0
  141. package/dist/cdn/chunks/htmlparser-ClUZ6waR.js.map +1 -0
  142. package/dist/cdn/chunks/{icons-BUlqGSgd.js → icons-BKkJ-5xF.js} +36 -36
  143. package/dist/cdn/chunks/{icons-BUlqGSgd.js.map → icons-BKkJ-5xF.js.map} +1 -1
  144. package/dist/cdn/chunks/keys-dJbD1QPs.js +12 -0
  145. package/dist/cdn/chunks/keys-dJbD1QPs.js.map +1 -0
  146. package/dist/{nl-Co3_RL0M.js → cdn/chunks/nl-CBLxcb-0.js} +7 -1
  147. package/dist/cdn/chunks/{nl-Co3_RL0M.js.map → nl-CBLxcb-0.js.map} +1 -1
  148. package/dist/{pt-BR-BECez5b0.js → cdn/chunks/pt-BR-CMSRfX7t.js} +7 -1
  149. package/dist/cdn/chunks/{pt-BR-BECez5b0.js.map → pt-BR-CMSRfX7t.js.map} +1 -1
  150. package/dist/cdn/chunks/socialIcons-9VrG8X3m.js +1054 -0
  151. package/dist/cdn/chunks/socialIcons-9VrG8X3m.js.map +1 -0
  152. package/dist/cdn/chunks/{src-IGLRmUar.js → src-CZ-W8YBa.js} +4 -4
  153. package/dist/cdn/chunks/{src-IGLRmUar.js.map → src-CZ-W8YBa.js.map} +1 -1
  154. package/dist/cdn/chunks/{src-CUvZWL6Y.js → src-CaNsA_WX.js} +2 -2
  155. package/dist/cdn/chunks/{src-CUvZWL6Y.js.map → src-CaNsA_WX.js.map} +1 -1
  156. package/dist/cdn/chunks/src-Dwgq7hf4.js.map +1 -1
  157. package/dist/cdn/chunks/templateSettingsFields-YCFVBVYh.js +36 -0
  158. package/dist/cdn/chunks/templateSettingsFields-YCFVBVYh.js.map +1 -0
  159. package/dist/cdn/chunks/{tiptap-Epe8m3Vo.js → tiptap-DhLuKyDc.js} +2776 -2773
  160. package/dist/cdn/chunks/tiptap-DhLuKyDc.js.map +1 -0
  161. package/dist/cdn/chunks/{useAliveFlag-CT9gjvO_.js → useAliveFlag-DAlQLbM2.js} +2 -2
  162. package/dist/cdn/chunks/{useAliveFlag-CT9gjvO_.js.map → useAliveFlag-DAlQLbM2.js.map} +1 -1
  163. package/dist/cdn/chunks/{useCloudI18n-DSWSGj-A.js → useCloudI18n-C09JcFS0.js} +3 -3
  164. package/dist/cdn/chunks/{useCloudI18n-DSWSGj-A.js.map → useCloudI18n-C09JcFS0.js.map} +1 -1
  165. package/dist/cdn/chunks/useEditorCore-BHmIp1hW.js +2592 -0
  166. package/dist/cdn/chunks/useEditorCore-BHmIp1hW.js.map +1 -0
  167. package/dist/cdn/chunks/useEditorRoot-DFx2fXJP.js +10 -0
  168. package/dist/cdn/chunks/{useEditorRoot-B0zW2nT4.js.map → useEditorRoot-DFx2fXJP.js.map} +1 -1
  169. package/dist/cdn/chunks/{useI18n-Dlo7R9RA.js → useI18n-DTZ9sIcv.js} +3 -3
  170. package/dist/cdn/chunks/{useI18n-Dlo7R9RA.js.map → useI18n-DTZ9sIcv.js.map} +1 -1
  171. package/dist/cdn/chunks/useLogicTag-E2V0Xdcb.js +38 -0
  172. package/dist/cdn/chunks/useLogicTag-E2V0Xdcb.js.map +1 -0
  173. package/dist/cdn/chunks/useMergeTag-BE8oDoha.js +60 -0
  174. package/dist/cdn/chunks/useMergeTag-BE8oDoha.js.map +1 -0
  175. package/dist/cdn/chunks/{usePopoverPosition-ElP3ABaV.js → usePopoverPosition-gB9q-ql7.js} +3 -3
  176. package/dist/cdn/chunks/{usePopoverPosition-ElP3ABaV.js.map → usePopoverPosition-gB9q-ql7.js.map} +1 -1
  177. package/dist/cdn/chunks/{useScrollToBlock-nTbWkgaU.js → useScrollToBlock-CtTXwmiU.js} +3 -3
  178. package/dist/cdn/chunks/{useScrollToBlock-nTbWkgaU.js.map → useScrollToBlock-CtTXwmiU.js.map} +1 -1
  179. package/dist/cdn/editor.css +1 -1
  180. package/dist/cdn/editor.js +856 -3347
  181. package/dist/cdn/editor.js.map +1 -1
  182. package/dist/{check-DWtkBzBU.js → check-eqb2JhqU.js} +1 -1
  183. package/dist/{chevron-down-C-Fjxcqj.js → chevron-down-Dkr-7Ywl.js} +1 -1
  184. package/dist/{chevron-right-SOkn2d4P.js → chevron-right-Bge4XF_B.js} +1 -1
  185. package/dist/{chevron-up-lntU1ypp.js → chevron-up-CQAyl0kC.js} +1 -1
  186. package/dist/{circle-alert-CjzUTwy3.js → circle-alert-CYgTHKWr.js} +1 -1
  187. package/dist/{clock-pB2QKPsJ.js → clock-BgSJZJP5.js} +1 -1
  188. package/dist/{cloud-DdidMW6f.js → cloud-C9xWZXhg.js} +1 -1
  189. package/dist/{copy-CId1E038.js → copy-mw6PVnOJ.js} +1 -1
  190. package/dist/{createCloudRuntime-x5WZm3p8.js → createCloudRuntime-BGd5--Bq.js} +5 -5
  191. package/dist/{createLucideIcon-Cwf_nTzE.js → createLucideIcon-BxY5yz5u.js} +6 -6
  192. package/dist/{de-BUPszLpi.js → de-CONjnzrF.js} +5 -1
  193. package/dist/{dist-D8i1ixHK.js → dist-8VFzbeu9.js} +3 -3
  194. package/dist/{dist-DBirAJIs.js → dist-BDuPwOyn.js} +26 -21
  195. package/dist/{dist-CtF9STPS.js → dist-BJM3eFyT.js} +1 -1
  196. package/dist/{dist-DkcA6epL.js → dist-BdHF7nyq.js} +3 -3
  197. package/dist/{dist-ByT5fgKq.js → dist-Bl4rxpX9.js} +1 -1
  198. package/dist/{dist-BVqAYoRB.js → dist-BmsLcnrO.js} +4 -4
  199. package/dist/{dist-CtMXAH7a.js → dist-BxVnMgXZ.js} +1 -1
  200. package/dist/{dist-DC-3T0ED.js → dist-CQSVro7b.js} +1 -1
  201. package/dist/{dist-f7HXo6j6.js → dist-DQbOebGW.js} +1 -1
  202. package/dist/{dist-DL9334yz.js → dist-DerFNpDY.js} +3 -3
  203. package/dist/{dist-D08oVYhr.js → dist-Djmzp6wi.js} +1 -1
  204. package/dist/{dist-D7WY8VPq.js → dist-DyrEOKEJ.js} +1 -1
  205. package/dist/{dist-DzdeVn-W.js → dist-EDkj3Ub1.js} +1 -1
  206. package/dist/{dist-C1tsW_99.js → dist-wyXxj3R1.js} +1 -1
  207. package/dist/{editor-modal-B_LaQf0s.js → editor-modal-OPhP71YO.js} +20 -20
  208. package/dist/{en-BbOC5x3w.js → en-BAMooiOF.js} +5 -1
  209. package/dist/en-CjNopehs.js +2 -0
  210. package/dist/{cdn/chunks/es-0bCDcT9p.js → es-I47lHs2m.js} +5 -3
  211. package/dist/extensions-DRN-elXT.js +1645 -0
  212. package/dist/{eye-BuGtFUoJ.js → eye-DphkRtAD.js} +1 -1
  213. package/dist/{fr-Brr8mJ9e.js → fr-B8MIKjT4.js} +5 -1
  214. package/dist/{image-up-gH4JEpU5.js → image-up-Qi2BXD7T.js} +1 -1
  215. package/dist/index.d.ts +15 -0
  216. package/dist/{info-BQ60P82u.js → info-VSyAs02q.js} +1 -1
  217. package/dist/keys-BdoSgsz9.js +10 -0
  218. package/dist/{link-3R8it3J7.js → link-CNuozGqD.js} +1 -1
  219. package/dist/{list-Ccdgj46T.js → list-BA0I5Wmu.js} +1 -1
  220. package/dist/{loader-circle-B_tAD4k6.js → loader-circle-z5eeqasv.js} +1 -1
  221. package/dist/{message-circle-P-KSc6V0.js → message-circle-BsQ9hEup.js} +1 -1
  222. package/dist/{cdn/chunks/nl-Co3_RL0M.js → nl-CBLxcb-0.js} +5 -3
  223. package/dist/package-OkXfuRoO.js +25 -0
  224. package/dist/{pencil-9ZiwqS4r.js → pencil-DFVFA7Dj.js} +1 -1
  225. package/dist/{plus-BwJEzCaO.js → plus-D8bkVjZ7.js} +1 -1
  226. package/dist/{cdn/chunks/pt-BR-BECez5b0.js → pt-BR-CMSRfX7t.js} +5 -3
  227. package/dist/{refresh-cw-DEgfb2FK.js → refresh-cw-DPB7YFuz.js} +1 -1
  228. package/dist/{runtime-dom.esm-bundler-PnoZU512.js → runtime-dom.esm-bundler-BGbPz4-g.js} +2 -2
  229. package/dist/{search-DqQ8Li5E.js → search-C-dCgqIa.js} +1 -1
  230. package/dist/{send-CE6uvqop.js → send-Cm2fy2zm.js} +1 -1
  231. package/dist/{shield-check-DhD1Z3rd.js → shield-check-COgBYFDF.js} +1 -1
  232. package/dist/smartphone-v0u_MOEV.js +46 -0
  233. package/dist/socialIcons-DkGcpEwC.js +1130 -0
  234. package/dist/{sparkles-R0ZQHa6F.js → sparkles-Ds0RF8Iu.js} +1 -1
  235. package/dist/style.css +1 -1
  236. package/dist/templateSettingsFields-YCFVBVYh.js +34 -0
  237. package/dist/templatical-editor.js +945 -3511
  238. package/dist/{text-align-start-DSux2UNn.js → text-align-start-DiavaIm6.js} +1 -1
  239. package/dist/{trash-Cf_SqsER.js → trash-DnOkfu2V.js} +1 -1
  240. package/dist/{triangle-alert-C6tGa6jw.js → triangle-alert-DGLAyXnh.js} +1 -1
  241. package/dist/{upload-DusKjpVr.js → upload-BBDme2cy.js} +1 -1
  242. package/dist/{useAliveFlag-oyByIcjy.js → useAliveFlag-BkKyhkwZ.js} +1 -1
  243. package/dist/{useCloudI18n-BLyh_e2T.js → useCloudI18n-D1iedlP3.js} +2 -2
  244. package/dist/useEditorCore-C5APBjjV.js +4097 -0
  245. package/dist/{useEditorRoot-ds57-l6F.js → useEditorRoot-BOxn5EfP.js} +2 -2
  246. package/dist/{useI18n-BbdxxpOE.js → useI18n-Ds_-druD.js} +2 -2
  247. package/dist/useLogicTag-DoHfc08B.js +36 -0
  248. package/dist/useMergeTag-DXyum3kG.js +58 -0
  249. package/dist/{usePopoverPosition-CprM5p-c.js → usePopoverPosition-Du-Ah8E9.js} +2 -2
  250. package/dist/{useScrollToBlock-BTFw0b9O.js → useScrollToBlock-DXQYPCnJ.js} +3 -3
  251. package/dist/{vue.runtime.esm-bundler-DShF3P6k.js → vue.runtime.esm-bundler-CyqhBwpY.js} +1133 -1126
  252. package/dist/{x-D_-42Ukq.js → x-3BHV3Q6K.js} +1 -1
  253. package/package.json +16 -16
  254. package/dist/ColorPicker-BqlZ_TqG.js +0 -501
  255. package/dist/FieldRow-C8nOknr_.js +0 -128
  256. package/dist/MergeTagInput-BEjzj4Iu.js +0 -457
  257. package/dist/MergeTagSuggestion-DKoLEeoj.js +0 -1329
  258. package/dist/cdn/chunks/AiChatSidebar-dyqqHAcI.js.map +0 -1
  259. package/dist/cdn/chunks/ColorPicker-LcrzgMoW.js +0 -502
  260. package/dist/cdn/chunks/ColorPicker-LcrzgMoW.js.map +0 -1
  261. package/dist/cdn/chunks/FieldRow-D9OJhYeb.js +0 -130
  262. package/dist/cdn/chunks/FieldRow-D9OJhYeb.js.map +0 -1
  263. package/dist/cdn/chunks/MergeTagInput-l7paaAml.js +0 -419
  264. package/dist/cdn/chunks/MergeTagInput-l7paaAml.js.map +0 -1
  265. package/dist/cdn/chunks/MergeTagSuggestion-t8Uj00Er.js +0 -215
  266. package/dist/cdn/chunks/MergeTagSuggestion-t8Uj00Er.js.map +0 -1
  267. package/dist/cdn/chunks/TemplateScoringPanel-DBjUNULq.js.map +0 -1
  268. package/dist/cdn/chunks/TestEmailModal-BTNlSW6f.js.map +0 -1
  269. package/dist/cdn/chunks/TitleEditor-CrnuIq62.js.map +0 -1
  270. package/dist/cdn/chunks/dist-BW6Y49zE.js.map +0 -1
  271. package/dist/cdn/chunks/dist-CAFTQ6Y2.js.map +0 -1
  272. package/dist/cdn/chunks/draggable-kbOhCgnk.js.map +0 -1
  273. package/dist/cdn/chunks/en-C9U7N77n.js +0 -2
  274. package/dist/cdn/chunks/extensions-B8_jnIkD.js.map +0 -1
  275. package/dist/cdn/chunks/htmlparser-DTML8Gvz.js +0 -1007
  276. package/dist/cdn/chunks/htmlparser-DTML8Gvz.js.map +0 -1
  277. package/dist/cdn/chunks/keys-DBFhDFng.js +0 -12
  278. package/dist/cdn/chunks/keys-DBFhDFng.js.map +0 -1
  279. package/dist/cdn/chunks/tiptap-Epe8m3Vo.js.map +0 -1
  280. package/dist/cdn/chunks/useEditorCore-Cs7rYVBo.js +0 -3689
  281. package/dist/cdn/chunks/useEditorCore-Cs7rYVBo.js.map +0 -1
  282. package/dist/cdn/chunks/useEditorRoot-B0zW2nT4.js +0 -10
  283. package/dist/cdn/chunks/useMergeTag-BYAifvh8.js +0 -46
  284. package/dist/cdn/chunks/useMergeTag-BYAifvh8.js.map +0 -1
  285. package/dist/en-DcmpWV53.js +0 -2
  286. package/dist/extensions-CHOBZRab.js +0 -445
  287. package/dist/keys-DQA2i1k1.js +0 -10
  288. package/dist/useEditorCore-DhlKOYwe.js +0 -5273
  289. package/dist/useMergeTag-DlvOBW_B.js +0 -44
@@ -1,1329 +0,0 @@
1
- import { A as e, M as t, Z as n, b as r, c as i, d as a, jt as o, kt as s, r as c, u as l, v as u } from "./vue.runtime.esm-bundler-DShF3P6k.js";
2
- import { c as d, n as f } from "./runtime-dom.esm-bundler-PnoZU512.js";
3
- import { Gn as p, H as m, Hn as h, Vn as g, Wn as _, s as v } from "./dist-DL9334yz.js";
4
- //#region ../../node_modules/.pnpm/@floating-ui+utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
5
- var y = Math.min, b = Math.max, x = Math.round, S = Math.floor, C = (e) => ({
6
- x: e,
7
- y: e
8
- }), w = {
9
- left: "right",
10
- right: "left",
11
- bottom: "top",
12
- top: "bottom"
13
- };
14
- function T(e, t) {
15
- return typeof e == "function" ? e(t) : e;
16
- }
17
- function E(e) {
18
- return e.split("-")[0];
19
- }
20
- function D(e) {
21
- return e.split("-")[1];
22
- }
23
- function O(e) {
24
- return e === "x" ? "y" : "x";
25
- }
26
- function k(e) {
27
- return e === "y" ? "height" : "width";
28
- }
29
- function A(e) {
30
- let t = e[0];
31
- return t === "t" || t === "b" ? "y" : "x";
32
- }
33
- function j(e) {
34
- return O(A(e));
35
- }
36
- function M(e, t, n) {
37
- n === void 0 && (n = !1);
38
- let r = D(e), i = j(e), a = k(i), o = i === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
39
- return t.reference[a] > t.floating[a] && (o = N(o)), [o, N(o)];
40
- }
41
- function ee(e) {
42
- let t = N(e);
43
- return [
44
- te(e),
45
- t,
46
- te(t)
47
- ];
48
- }
49
- function te(e) {
50
- return e.includes("start") ? e.replace("start", "end") : e.replace("end", "start");
51
- }
52
- var ne = ["left", "right"], re = ["right", "left"], ie = ["top", "bottom"], ae = ["bottom", "top"];
53
- function oe(e, t, n) {
54
- switch (e) {
55
- case "top":
56
- case "bottom": return n ? t ? re : ne : t ? ne : re;
57
- case "left":
58
- case "right": return t ? ie : ae;
59
- default: return [];
60
- }
61
- }
62
- function se(e, t, n, r) {
63
- let i = D(e), a = oe(E(e), n === "start", r);
64
- return i && (a = a.map((e) => e + "-" + i), t && (a = a.concat(a.map(te)))), a;
65
- }
66
- function N(e) {
67
- let t = E(e);
68
- return w[t] + e.slice(t.length);
69
- }
70
- function ce(e) {
71
- return {
72
- top: e.top ?? 0,
73
- right: e.right ?? 0,
74
- bottom: e.bottom ?? 0,
75
- left: e.left ?? 0
76
- };
77
- }
78
- function le(e) {
79
- return typeof e == "number" ? {
80
- top: e,
81
- right: e,
82
- bottom: e,
83
- left: e
84
- } : ce(e);
85
- }
86
- function P(e) {
87
- let { x: t, y: n, width: r, height: i } = e;
88
- return {
89
- width: r,
90
- height: i,
91
- top: n,
92
- left: t,
93
- right: t + r,
94
- bottom: n + i,
95
- x: t,
96
- y: n
97
- };
98
- }
99
- //#endregion
100
- //#region ../../node_modules/.pnpm/@floating-ui+core@1.8.0/node_modules/@floating-ui/core/dist/floating-ui.core.mjs
101
- function ue(e, t, n) {
102
- let { reference: r, floating: i } = e, a = A(t), o = j(t), s = k(o), c = E(t), l = a === "y", u = r.x + r.width / 2 - i.width / 2, d = r.y + r.height / 2 - i.height / 2, f = r[s] / 2 - i[s] / 2, p;
103
- switch (c) {
104
- case "top":
105
- p = {
106
- x: u,
107
- y: r.y - i.height
108
- };
109
- break;
110
- case "bottom":
111
- p = {
112
- x: u,
113
- y: r.y + r.height
114
- };
115
- break;
116
- case "right":
117
- p = {
118
- x: r.x + r.width,
119
- y: d
120
- };
121
- break;
122
- case "left":
123
- p = {
124
- x: r.x - i.width,
125
- y: d
126
- };
127
- break;
128
- default: p = {
129
- x: r.x,
130
- y: r.y
131
- };
132
- }
133
- let m = D(t);
134
- return m && (p[o] += f * (m === "end" ? 1 : -1) * (n && l ? -1 : 1)), p;
135
- }
136
- async function de(e, t) {
137
- t === void 0 && (t = {});
138
- let { x: n, y: r, platform: i, rects: a, elements: o, strategy: s } = e, { boundary: c = "clippingAncestors", rootBoundary: l = "viewport", elementContext: u = "floating", altBoundary: d = !1, padding: f = 0 } = T(t, e), p = le(f), m = o[d ? u === "floating" ? "reference" : "floating" : u], h = P(await i.getClippingRect({
139
- element: await (i.isElement == null ? void 0 : i.isElement(m)) ?? !0 ? m : m.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(o.floating)),
140
- boundary: c,
141
- rootBoundary: l,
142
- strategy: s
143
- })), g = u === "floating" ? {
144
- x: n,
145
- y: r,
146
- width: a.floating.width,
147
- height: a.floating.height
148
- } : a.reference, _ = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(o.floating)), v = await (i.isElement == null ? void 0 : i.isElement(_)) && await (i.getScale == null ? void 0 : i.getScale(_)) || {
149
- x: 1,
150
- y: 1
151
- }, y = P(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
152
- elements: o,
153
- rect: g,
154
- offsetParent: _,
155
- strategy: s
156
- }) : g);
157
- return {
158
- top: (h.top - y.top + p.top) / v.y,
159
- bottom: (y.bottom - h.bottom + p.bottom) / v.y,
160
- left: (h.left - y.left + p.left) / v.x,
161
- right: (y.right - h.right + p.right) / v.x
162
- };
163
- }
164
- var fe = 50, pe = async (e, t, n) => {
165
- let { placement: r = "bottom", strategy: i = "absolute", middleware: a = [], platform: o } = n, s = o.detectOverflow ? o : {
166
- ...o,
167
- detectOverflow: de
168
- }, c = await (o.isRTL == null ? void 0 : o.isRTL(t)), l = await o.getElementRects({
169
- reference: e,
170
- floating: t,
171
- strategy: i
172
- }), { x: u, y: d } = ue(l, r, c), f = r, p = 0, m = {};
173
- for (let n = 0; n < a.length; n++) {
174
- let h = a[n];
175
- if (!h) continue;
176
- let { name: g, fn: _ } = h, { x: v, y, data: b, reset: x } = await _({
177
- x: u,
178
- y: d,
179
- initialPlacement: r,
180
- placement: f,
181
- strategy: i,
182
- middlewareData: m,
183
- rects: l,
184
- platform: s,
185
- elements: {
186
- reference: e,
187
- floating: t
188
- }
189
- });
190
- u = v ?? u, d = y ?? d, m[g] = {
191
- ...m[g],
192
- ...b
193
- }, x && p < fe && (p++, typeof x == "object" && (x.placement && (f = x.placement), x.rects && (l = x.rects === !0 ? await o.getElementRects({
194
- reference: e,
195
- floating: t,
196
- strategy: i
197
- }) : x.rects), {x: u, y: d} = ue(l, f, c)), n = -1);
198
- }
199
- return {
200
- x: u,
201
- y: d,
202
- placement: f,
203
- strategy: i,
204
- middlewareData: m
205
- };
206
- }, me = function(e) {
207
- return e === void 0 && (e = {}), {
208
- name: "flip",
209
- options: e,
210
- async fn(t) {
211
- var n;
212
- let { placement: r, middlewareData: i, rects: a, initialPlacement: o, platform: s, elements: c } = t, { mainAxis: l = !0, crossAxis: u = !0, fallbackPlacements: d, fallbackStrategy: f = "bestFit", fallbackAxisSideDirection: p = "none", flipAlignment: m = !0, ...h } = T(e, t);
213
- if ((n = i.arrow) != null && n.alignmentOffset) return {};
214
- let g = E(r), _ = A(o), v = E(o) === o, y = await (s.isRTL == null ? void 0 : s.isRTL(c.floating)), b = d || (v || !m ? [N(o)] : ee(o)), x = p !== "none";
215
- !d && x && b.push(...se(o, m, p, y));
216
- let S = [o, ...b], C = await s.detectOverflow(t, h), w = [], D = i.flip?.overflows || [];
217
- if (l && w.push(C[g]), u) {
218
- let e = M(r, a, y);
219
- w.push(C[e[0]], C[e[1]]);
220
- }
221
- if (D = [...D, {
222
- placement: r,
223
- overflows: w
224
- }], !w.every((e) => e <= 0)) {
225
- let e = (i.flip?.index || 0) + 1, t = S[e];
226
- if (t && (u !== "alignment" || _ === A(t) || D.every((e) => A(e.placement) !== _ || e.overflows[0] > 0))) return {
227
- data: {
228
- index: e,
229
- overflows: D
230
- },
231
- reset: { placement: t }
232
- };
233
- let n = D.filter((e) => e.overflows[0] <= 0).sort((e, t) => e.overflows[1] - t.overflows[1])[0]?.placement;
234
- if (!n) switch (f) {
235
- case "bestFit": {
236
- let e = D.filter((e) => {
237
- if (x) {
238
- let t = A(e.placement);
239
- return t === _ || t === "y";
240
- }
241
- return !0;
242
- }).map((e) => [e.placement, e.overflows.filter((e) => e > 0).reduce((e, t) => e + t, 0)]).sort((e, t) => e[1] - t[1])[0]?.[0];
243
- e && (n = e);
244
- break;
245
- }
246
- case "initialPlacement": n = o;
247
- }
248
- if (r !== n) return { reset: { placement: n } };
249
- }
250
- return {};
251
- }
252
- };
253
- }, he = /*#__PURE__*/ new Set(["left", "top"]);
254
- async function ge(e, t) {
255
- let { placement: n, platform: r, elements: i } = e, a = await (r.isRTL == null ? void 0 : r.isRTL(i.floating)), o = E(n), s = D(n), c = A(n) === "y", l = he.has(o) ? -1 : 1, u = a && c ? -1 : 1, d = T(t, e), { mainAxis: f, crossAxis: p, alignmentAxis: m } = typeof d == "number" ? {
256
- mainAxis: d,
257
- crossAxis: 0,
258
- alignmentAxis: null
259
- } : {
260
- mainAxis: d.mainAxis || 0,
261
- crossAxis: d.crossAxis || 0,
262
- alignmentAxis: d.alignmentAxis
263
- };
264
- return s && typeof m == "number" && (p = s === "end" ? m * -1 : m), c ? {
265
- x: p * u,
266
- y: f * l
267
- } : {
268
- x: f * l,
269
- y: p * u
270
- };
271
- }
272
- var _e = function(e) {
273
- return e === void 0 && (e = 0), {
274
- name: "offset",
275
- options: e,
276
- async fn(t) {
277
- var n;
278
- let { x: r, y: i, placement: a, middlewareData: o } = t, s = await ge(t, e);
279
- return a === o.offset?.placement && (n = o.arrow) != null && n.alignmentOffset ? {} : {
280
- x: r + s.x,
281
- y: i + s.y,
282
- data: {
283
- ...s,
284
- placement: a
285
- }
286
- };
287
- }
288
- };
289
- };
290
- //#endregion
291
- //#region ../../node_modules/.pnpm/@floating-ui+utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
292
- function F() {
293
- return typeof window < "u";
294
- }
295
- function I(e) {
296
- return ve(e) ? (e.nodeName || "").toLowerCase() : "#document";
297
- }
298
- function L(e) {
299
- var t;
300
- return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
301
- }
302
- function R(e) {
303
- return ((ve(e) ? e.ownerDocument : e.document) || window.document)?.documentElement;
304
- }
305
- function ve(e) {
306
- return F() ? e instanceof Node || e instanceof L(e).Node : !1;
307
- }
308
- function z(e) {
309
- return F() ? e instanceof Element || e instanceof L(e).Element : !1;
310
- }
311
- function B(e) {
312
- return F() ? e instanceof HTMLElement || e instanceof L(e).HTMLElement : !1;
313
- }
314
- function ye(e) {
315
- return !F() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof L(e).ShadowRoot;
316
- }
317
- function V(e) {
318
- let { overflow: t, overflowX: n, overflowY: r, display: i } = K(e);
319
- return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && i !== "inline" && i !== "contents";
320
- }
321
- function be(e) {
322
- return /^(table|td|th)$/.test(I(e));
323
- }
324
- function H(e) {
325
- try {
326
- if (e.matches(":popover-open")) return !0;
327
- } catch {}
328
- try {
329
- return e.matches(":modal");
330
- } catch {
331
- return !1;
332
- }
333
- }
334
- var xe = /transform|translate|scale|rotate|perspective|filter/, Se = /paint|layout|strict|content/, U = (e) => !!e && e !== "none", Ce;
335
- function W(e) {
336
- let t = z(e) ? K(e) : e;
337
- return U(t.transform) || U(t.translate) || U(t.scale) || U(t.rotate) || U(t.perspective) || !Te() && (U(t.backdropFilter) || U(t.filter)) || xe.test(t.willChange || "") || Se.test(t.contain || "");
338
- }
339
- function we(e) {
340
- let t = J(e);
341
- for (; B(t) && !G(t);) {
342
- if (W(t)) return t;
343
- if (H(t)) return null;
344
- t = J(t);
345
- }
346
- return null;
347
- }
348
- function Te() {
349
- return Ce ??= typeof CSS < "u" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none"), Ce;
350
- }
351
- function G(e) {
352
- return /^(html|body|#document)$/.test(I(e));
353
- }
354
- function K(e) {
355
- return L(e).getComputedStyle(e);
356
- }
357
- function q(e) {
358
- return z(e) ? {
359
- scrollLeft: e.scrollLeft,
360
- scrollTop: e.scrollTop
361
- } : {
362
- scrollLeft: e.scrollX,
363
- scrollTop: e.scrollY
364
- };
365
- }
366
- function J(e) {
367
- if (I(e) === "html") return e;
368
- let t = e.assignedSlot || e.parentNode || ye(e) && e.host || R(e);
369
- return ye(t) ? t.host : t;
370
- }
371
- function Ee(e) {
372
- let t = J(e);
373
- return G(t) ? (e.ownerDocument || e).body : B(t) && V(t) ? t : Ee(t);
374
- }
375
- function Y(e, t, n) {
376
- t === void 0 && (t = []), n === void 0 && (n = !0);
377
- let r = Ee(e), i = r === e.ownerDocument?.body, a = L(r);
378
- if (i) {
379
- let e = De(a);
380
- return t.concat(a, a.visualViewport || [], V(r) ? r : [], e && n ? Y(e) : []);
381
- }
382
- return t.concat(r, Y(r, [], n));
383
- }
384
- function De(e) {
385
- return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
386
- }
387
- //#endregion
388
- //#region ../../node_modules/.pnpm/@floating-ui+dom@1.8.0/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
389
- function Oe(e) {
390
- let t = K(e), n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0, i = B(e), a = i ? e.offsetWidth : n, o = i ? e.offsetHeight : r, s = x(n) !== a || x(r) !== o;
391
- return s && (n = a, r = o), {
392
- width: n,
393
- height: r,
394
- $: s
395
- };
396
- }
397
- function ke(e) {
398
- return z(e) ? e : e.contextElement;
399
- }
400
- function X(e) {
401
- let t = ke(e);
402
- if (!B(t)) return C(1);
403
- let n = t.getBoundingClientRect(), { width: r, height: i, $: a } = Oe(t), o = (a ? x(n.width) : n.width) / r, s = (a ? x(n.height) : n.height) / i;
404
- return (!o || !Number.isFinite(o)) && (o = 1), (!s || !Number.isFinite(s)) && (s = 1), {
405
- x: o,
406
- y: s
407
- };
408
- }
409
- var Ae = /*#__PURE__*/ C(0);
410
- function je(e) {
411
- let t = L(e);
412
- return !Te() || !t.visualViewport ? Ae : {
413
- x: t.visualViewport.offsetLeft,
414
- y: t.visualViewport.offsetTop
415
- };
416
- }
417
- function Me(e, t, n) {
418
- return t === void 0 && (t = !1), !!n && t && n === L(e);
419
- }
420
- function Z(e, t, n, r) {
421
- t === void 0 && (t = !1), n === void 0 && (n = !1);
422
- let i = e.getBoundingClientRect(), a = ke(e), o = C(1);
423
- t && (r ? z(r) && (o = X(r)) : o = X(e));
424
- let s = Me(a, n, r) ? je(a) : C(0), c = (i.left + s.x) / o.x, l = (i.top + s.y) / o.y, u = i.width / o.x, d = i.height / o.y;
425
- if (a && r) {
426
- let e = L(a), t = z(r) ? L(r) : r, n = e, i = De(n);
427
- for (; i && t !== n;) {
428
- let e = X(i), t = i.getBoundingClientRect(), r = K(i), a = t.left + (i.clientLeft + parseFloat(r.paddingLeft)) * e.x, o = t.top + (i.clientTop + parseFloat(r.paddingTop)) * e.y;
429
- c *= e.x, l *= e.y, u *= e.x, d *= e.y, c += a, l += o, n = L(i), i = De(n);
430
- }
431
- }
432
- return P({
433
- width: u,
434
- height: d,
435
- x: c,
436
- y: l
437
- });
438
- }
439
- function Q(e, t) {
440
- let n = q(e).scrollLeft;
441
- return t ? t.left + n : Z(R(e)).left + n;
442
- }
443
- function Ne(e, t) {
444
- let n = e.getBoundingClientRect();
445
- return {
446
- x: n.left + t.scrollLeft - Q(e, n),
447
- y: n.top + t.scrollTop
448
- };
449
- }
450
- function Pe(e) {
451
- let { elements: t, rect: n, offsetParent: r, strategy: i } = e, a = i === "fixed", o = R(r), s = t ? H(t.floating) : !1;
452
- if (r === o || s && a) return n;
453
- let c = {
454
- scrollLeft: 0,
455
- scrollTop: 0
456
- }, l = C(1), u = C(0), d = B(r);
457
- if ((d || !a) && ((I(r) !== "body" || V(o)) && (c = q(r)), d)) {
458
- let e = Z(r);
459
- l = X(r), u.x = e.x + r.clientLeft, u.y = e.y + r.clientTop;
460
- }
461
- let f = o && !d && !a ? Ne(o, c) : C(0);
462
- return {
463
- width: n.width * l.x,
464
- height: n.height * l.y,
465
- x: n.x * l.x - c.scrollLeft * l.x + u.x + f.x,
466
- y: n.y * l.y - c.scrollTop * l.y + u.y + f.y
467
- };
468
- }
469
- function Fe(e) {
470
- return e.getClientRects ? Array.from(e.getClientRects()) : [];
471
- }
472
- function Ie(e) {
473
- let t = q(e), n = e.ownerDocument.body, r = b(e.scrollWidth, e.clientWidth, n.scrollWidth, n.clientWidth), i = b(e.scrollHeight, e.clientHeight, n.scrollHeight, n.clientHeight), a = -t.scrollLeft + Q(e), o = -t.scrollTop;
474
- return K(n).direction === "rtl" && (a += b(e.clientWidth, n.clientWidth) - r), {
475
- width: r,
476
- height: i,
477
- x: a,
478
- y: o
479
- };
480
- }
481
- var Le = 25;
482
- function Re(e, t, n) {
483
- n === void 0 && (n = "viewport");
484
- let r = n === "layoutViewport", i = L(e), a = R(e), o = i.visualViewport, s = a.clientWidth, c = a.clientHeight, l = 0, u = 0;
485
- if (o) {
486
- let e = !Te() || t === "fixed";
487
- r ? e || (l = -o.offsetLeft, u = -o.offsetTop) : (s = o.width, c = o.height, e && (l = o.offsetLeft, u = o.offsetTop));
488
- }
489
- if (Q(a) <= 0) {
490
- let e = a.ownerDocument, t = e.body, n = getComputedStyle(t), r = e.compatMode === "CSS1Compat" && parseFloat(n.marginLeft) + parseFloat(n.marginRight) || 0, i = Math.abs(a.clientWidth - t.clientWidth - r), o = getComputedStyle(a).scrollbarGutter === "stable both-edges" ? i / 2 : i;
491
- o <= Le && (s -= o);
492
- }
493
- return {
494
- width: s,
495
- height: c,
496
- x: l,
497
- y: u
498
- };
499
- }
500
- function ze(e, t) {
501
- let n = Z(e, !0, t === "fixed"), r = n.top + e.clientTop, i = n.left + e.clientLeft, a = X(e);
502
- return {
503
- width: e.clientWidth * a.x,
504
- height: e.clientHeight * a.y,
505
- x: i * a.x,
506
- y: r * a.y
507
- };
508
- }
509
- function Be(e, t, n) {
510
- let r;
511
- if (t === "viewport" || t === "layoutViewport") r = Re(e, n, t);
512
- else if (t === "document") r = Ie(R(e));
513
- else if (z(t)) r = ze(t, n);
514
- else {
515
- let n = je(e);
516
- r = {
517
- x: t.x - n.x,
518
- y: t.y - n.y,
519
- width: t.width,
520
- height: t.height
521
- };
522
- }
523
- return P(r);
524
- }
525
- function Ve(e, t) {
526
- let n = t.get(e);
527
- if (n) return n;
528
- let r = Y(e, [], !1).filter((e) => z(e) && I(e) !== "body"), i = null, a = K(e).position === "fixed", o = a ? J(e) : e;
529
- for (; z(o) && !G(o);) {
530
- let e = K(o), t = W(o), n = i ? i.position : a ? "fixed" : "";
531
- !t && (n === "fixed" || n === "absolute" && e.position === "static") ? r = r.filter((e) => e !== o) : i = e, o = J(o);
532
- }
533
- return t.set(e, r), r;
534
- }
535
- function He(e) {
536
- let { element: t, boundary: n, rootBoundary: r, strategy: i } = e, a = [...n === "clippingAncestors" ? H(t) ? [] : Ve(t, this._c) : [].concat(n), r], o = Be(t, a[0], i), s = o.top, c = o.right, l = o.bottom, u = o.left;
537
- for (let e = 1; e < a.length; e++) {
538
- let n = Be(t, a[e], i);
539
- s = b(n.top, s), c = y(n.right, c), l = y(n.bottom, l), u = b(n.left, u);
540
- }
541
- return {
542
- width: c - u,
543
- height: l - s,
544
- x: u,
545
- y: s
546
- };
547
- }
548
- function Ue(e) {
549
- let { width: t, height: n } = Oe(e);
550
- return {
551
- width: t,
552
- height: n
553
- };
554
- }
555
- function We(e, t, n) {
556
- let r = B(t), i = R(t), a = n === "fixed", o = Z(e, !0, a, t), s = {
557
- scrollLeft: 0,
558
- scrollTop: 0
559
- }, c = C(0);
560
- if ((r || !a) && ((I(t) !== "body" || V(i)) && (s = q(t)), r)) {
561
- let e = Z(t, !0, a, t);
562
- c.x = e.x + t.clientLeft, c.y = e.y + t.clientTop;
563
- }
564
- !r && i && (c.x = Q(i));
565
- let l = i && !r && !a ? Ne(i, s) : C(0);
566
- return {
567
- x: o.left + s.scrollLeft - c.x - l.x,
568
- y: o.top + s.scrollTop - c.y - l.y,
569
- width: o.width,
570
- height: o.height
571
- };
572
- }
573
- function $(e) {
574
- return K(e).position === "static";
575
- }
576
- function Ge(e, t) {
577
- if (!B(e) || K(e).position === "fixed") return null;
578
- if (t) return t(e);
579
- let n = e.offsetParent;
580
- return R(e) === n && (n = n.ownerDocument.body), n;
581
- }
582
- function Ke(e, t) {
583
- let n = L(e);
584
- if (H(e)) return n;
585
- if (!B(e)) {
586
- let t = J(e);
587
- for (; t && !G(t);) {
588
- if (z(t) && !$(t)) return t;
589
- t = J(t);
590
- }
591
- return n;
592
- }
593
- let r = Ge(e, t);
594
- for (; r && be(r) && $(r);) r = Ge(r, t);
595
- return r && G(r) && $(r) && !W(r) ? n : r || we(e) || n;
596
- }
597
- var qe = async function(e) {
598
- let t = this.getOffsetParent || Ke, n = this.getDimensions, r = await n(e.floating);
599
- return {
600
- reference: We(e.reference, await t(e.floating), e.strategy),
601
- floating: {
602
- x: 0,
603
- y: 0,
604
- width: r.width,
605
- height: r.height
606
- }
607
- };
608
- };
609
- function Je(e) {
610
- return K(e).direction === "rtl";
611
- }
612
- var Ye = {
613
- convertOffsetParentRelativeRectToViewportRelativeRect: Pe,
614
- getDocumentElement: R,
615
- getClippingRect: He,
616
- getOffsetParent: Ke,
617
- getElementRects: qe,
618
- getClientRects: Fe,
619
- getDimensions: Ue,
620
- getScale: X,
621
- isElement: z,
622
- isRTL: Je
623
- };
624
- function Xe(e, t) {
625
- return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
626
- }
627
- function Ze(e, t, n) {
628
- let r = null, i, a = R(e);
629
- function o() {
630
- var e;
631
- clearTimeout(i), (e = r) == null || e.disconnect(), r = null;
632
- }
633
- function s(n, c) {
634
- n === void 0 && (n = !1), c === void 0 && (c = 1), o();
635
- let l = e.getBoundingClientRect(), { left: u, top: d, width: f, height: p } = l;
636
- if (n || t(), !f || !p) return;
637
- let m = S(d), h = S(a.clientWidth - (u + f)), g = S(a.clientHeight - (d + p)), _ = S(u), v = {
638
- rootMargin: -m + "px " + -h + "px " + -g + "px " + -_ + "px",
639
- threshold: b(0, y(1, c)) || 1
640
- }, x = !0;
641
- function C(t) {
642
- let n = t[0].intersectionRatio;
643
- if (!Xe(l, e.getBoundingClientRect())) return s();
644
- if (n !== c) {
645
- if (!x) return s();
646
- n ? s(!1, n) : i = setTimeout(() => {
647
- s(!1, 1e-7);
648
- }, 1e3);
649
- }
650
- x = !1;
651
- }
652
- try {
653
- r = new IntersectionObserver(C, {
654
- ...v,
655
- root: a.ownerDocument
656
- });
657
- } catch {
658
- r = new IntersectionObserver(C, v);
659
- }
660
- r.observe(e);
661
- }
662
- let c = L(e), l = () => s(n);
663
- return c.addEventListener("resize", l), s(!0), () => {
664
- c.removeEventListener("resize", l), o();
665
- };
666
- }
667
- function Qe(e, t, n, r) {
668
- r === void 0 && (r = {});
669
- let { ancestorScroll: i = !0, ancestorResize: a = !0, elementResize: o = typeof ResizeObserver == "function", layoutShift: s = typeof IntersectionObserver == "function", animationFrame: c = !1 } = r, l = ke(e), u = i || a ? [...l ? Y(l) : [], ...t ? Y(t) : []] : [];
670
- u.forEach((e) => {
671
- i && e.addEventListener("scroll", n), a && e.addEventListener("resize", n);
672
- });
673
- let d = l && s ? Ze(l, n, a) : null, f = -1, p = null;
674
- o && (p = new ResizeObserver((e) => {
675
- let [r] = e;
676
- r && r.target === l && p && t && (p.unobserve(t), cancelAnimationFrame(f), f = requestAnimationFrame(() => {
677
- var e;
678
- (e = p) == null || e.observe(t);
679
- })), n();
680
- }), l && !c && p.observe(l), t && p.observe(t));
681
- let m, h = c ? Z(e) : null;
682
- c && g();
683
- function g() {
684
- let t = Z(e);
685
- h && !Xe(h, t) && n(), h = t, m = requestAnimationFrame(g);
686
- }
687
- return n(), () => {
688
- var e;
689
- u.forEach((e) => {
690
- i && e.removeEventListener("scroll", n), a && e.removeEventListener("resize", n);
691
- }), d?.(), (e = p) == null || e.disconnect(), p = null, c && cancelAnimationFrame(m);
692
- };
693
- }
694
- var $e = _e, et = me, tt = (e, t, n) => {
695
- let r = /* @__PURE__ */ new Map(), i = n ?? {}, a = {
696
- ...Ye,
697
- ...i.platform,
698
- _c: r
699
- };
700
- return pe(e, t, {
701
- ...i,
702
- platform: a
703
- });
704
- };
705
- //#endregion
706
- //#region ../../node_modules/.pnpm/@tiptap+suggestion@3.31.3_@floating-ui+dom@1.8.0_@tiptap+core@3.31.3_@tiptap+pm@3.31.3__@tiptap+pm@3.31.3/node_modules/@tiptap/suggestion/dist/index.js
707
- function nt(e) {
708
- let { char: t, allowSpaces: n, allowToIncludeChar: r, allowedPrefixes: i, startOfLine: a, $position: o } = e, s = n && !r, c = m(t), l = RegExp(`\\s${c}$`), u = a ? "^" : "", d = r ? "" : c, f = RegExp(s ? `${u}${c}.*?(?=\\s${d}|$)` : `${u}(?:^)?${c}[^\\s${d}]*`, "gm"), p = o.nodeBefore?.isText && o.nodeBefore.text;
709
- if (!p) return null;
710
- let h = o.pos - p.length, g = Array.from(p.matchAll(f)).pop();
711
- if (!g || g.input === void 0 || g.index === void 0) return null;
712
- let _ = g.input.slice(Math.max(0, g.index - 1), g.index), v = RegExp(`^[${i?.join("")}\0]?$`).test(_);
713
- if (i !== null && !v) return null;
714
- let y = h + g.index, b = y + g[0].length;
715
- return s && l.test(p.slice(b - 1, b + 1)) && (g[0] += " ", b += 1), y < o.pos && b >= o.pos ? {
716
- range: {
717
- from: y,
718
- to: b
719
- },
720
- query: g[0].slice(t.length),
721
- text: g[0]
722
- } : null;
723
- }
724
- function rt(e) {
725
- return e.docChanged ? e.steps.some((e) => {
726
- let t = e.slice;
727
- if (!t?.content) return !1;
728
- let n = t.content.textBetween(0, t.content.size, "\n");
729
- return /\s/.test(n);
730
- }) : !1;
731
- }
732
- function it(e) {
733
- return () => {
734
- let t = e.state.selection.$anchor.pos, { top: n, right: r, bottom: i, left: a } = e.view.coordsAtPos(t);
735
- try {
736
- return new DOMRect(a, n, r - a, i - n);
737
- } catch {
738
- return null;
739
- }
740
- };
741
- }
742
- function at(e, t, n, r) {
743
- return n ? () => {
744
- let n = r.getState(e.state)?.decorationId;
745
- return t.dom.querySelector(`[data-decoration-id="${n}"]`)?.getBoundingClientRect() || null;
746
- } : it(e);
747
- }
748
- function ot({ match: e, dismissedRange: t, state: n, transaction: r, editor: i, shouldResetDismissed: a, effectiveAllowSpaces: o }) {
749
- return a?.({
750
- editor: i,
751
- state: n,
752
- range: t,
753
- match: e,
754
- transaction: r,
755
- allowSpaces: o
756
- }) ? !1 : o ? e.range.from === t.from : e.range.from === t.from && !rt(r);
757
- }
758
- function st({ view: e, pluginKeyRef: t }) {
759
- let n = e.state.tr.setMeta(t, { exit: !0 });
760
- e.dispatch(n);
761
- }
762
- function ct({ pluginKey: e, decorationTag: t, decorationClass: n, decorationContent: r, decorationEmptyClass: i, renderer: a, dispatchExit: o }) {
763
- return {
764
- handleKeyDown(t, n) {
765
- var r;
766
- let i = e.getState(t.state);
767
- if (!i.active) return !1;
768
- if (n.key === "Escape" || n.key === "Esc") {
769
- var s;
770
- return a == null || (s = a.onKeyDown) == null || s.call(a, {
771
- view: t,
772
- event: n,
773
- range: i.range
774
- }), o(t), !0;
775
- }
776
- return (a == null || (r = a.onKeyDown) == null ? void 0 : r.call(a, {
777
- view: t,
778
- event: n,
779
- range: i.range
780
- })) || !1;
781
- },
782
- decorations(a) {
783
- let { active: o, range: s, decorationId: c, query: l } = e.getState(a);
784
- if (!o) return null;
785
- let u = !l?.length, d = [n];
786
- return u && d.push(i), h.create(a.doc, [g.inline(s.from, s.to, {
787
- nodeName: t,
788
- class: d.join(" "),
789
- "data-decoration-id": c || void 0,
790
- "data-decoration-content": r
791
- })]);
792
- }
793
- };
794
- }
795
- function lt({ editor: e, char: t, effectiveAllowSpaces: n, allowToIncludeChar: r, allowedPrefixes: i, startOfLine: a, findSuggestionMatch: o, allow: s, shouldShow: c, shouldKeepDismissed: l, pluginKey: u }) {
796
- return {
797
- init() {
798
- return {
799
- active: !1,
800
- range: {
801
- from: 0,
802
- to: 0
803
- },
804
- query: null,
805
- text: null,
806
- composing: !1,
807
- dismissedRange: null
808
- };
809
- },
810
- apply(d, f, p, m) {
811
- let { isEditable: h } = e, { composing: g } = e.view, { selection: _ } = d, { empty: v, from: y } = _, b = { ...f }, x = d.getMeta(u);
812
- if (x && x.exit) return b.active = !1, b.decorationId = null, b.range = {
813
- from: 0,
814
- to: 0
815
- }, b.query = null, b.text = null, b.dismissedRange = f.active ? { ...f.range } : f.dismissedRange, b;
816
- if (b.composing = g, d.docChanged && b.dismissedRange !== null && (b.dismissedRange = {
817
- from: d.mapping.map(b.dismissedRange.from),
818
- to: d.mapping.map(b.dismissedRange.to)
819
- }), h && (v || e.view.composing)) {
820
- (y < f.range.from || y > f.range.to) && !g && !f.composing && (b.active = !1);
821
- let u = o({
822
- char: t,
823
- allowSpaces: n,
824
- allowToIncludeChar: r,
825
- allowedPrefixes: i,
826
- startOfLine: a,
827
- $position: _.$from
828
- }), p = `id_${Math.floor(Math.random() * 4294967295)}`;
829
- u && s({
830
- editor: e,
831
- state: m,
832
- range: u.range,
833
- isActive: f.active
834
- }) && (!c || c({
835
- editor: e,
836
- range: u.range,
837
- query: u.query,
838
- text: u.text,
839
- transaction: d
840
- })) ? (b.dismissedRange !== null && !l({
841
- match: u,
842
- dismissedRange: b.dismissedRange,
843
- state: m,
844
- transaction: d
845
- }) && (b.dismissedRange = null), b.dismissedRange === null ? (b.active = !0, b.decorationId = f.decorationId || p, b.range = u.range, b.query = u.query, b.text = u.text) : b.active = !1) : (u || (b.dismissedRange = null), b.active = !1);
846
- } else b.active = !1;
847
- return b.active || (b.decorationId = null, b.range = {
848
- from: 0,
849
- to: 0
850
- }, b.query = null, b.text = null), b;
851
- }
852
- };
853
- }
854
- function ut({ editor: e, items: t }) {
855
- let n = null, r = null, i = null, a = () => {
856
- r !== null && (clearTimeout(r), r = null), i?.(), i = null;
857
- }, o = (e) => new Promise((t) => {
858
- i = t, r = setTimeout(() => {
859
- r = null;
860
- let e = i;
861
- i = null, e?.();
862
- }, e);
863
- }), s = () => {
864
- n?.abort(), a(), n = null;
865
- };
866
- return {
867
- abort: s,
868
- fetch: async (r, i) => {
869
- s(), n = new AbortController();
870
- let a = n;
871
- if (i > 0 && await o(i), n !== a || a.signal.aborted) return { status: "aborted" };
872
- try {
873
- let i = await t({
874
- editor: e,
875
- query: r,
876
- signal: a.signal
877
- });
878
- return n !== a || a.signal.aborted ? { status: "aborted" } : {
879
- status: "resolved",
880
- items: i
881
- };
882
- } catch {
883
- return n !== a || a.signal.aborted ? { status: "aborted" } : { status: "error" };
884
- }
885
- }
886
- };
887
- }
888
- function dt({ placement: e, offset: t, flip: n, floatingUi: r }) {
889
- var i;
890
- let a = [$e({
891
- mainAxis: t.mainAxis ?? 4,
892
- crossAxis: t.crossAxis ?? 0
893
- })];
894
- return n && a.push(et()), r != null && (i = r.middleware) != null && i.length && a.push(...r.middleware), {
895
- placement: e,
896
- strategy: r?.strategy ?? "absolute",
897
- middleware: a
898
- };
899
- }
900
- function ft(e) {
901
- if (e instanceof HTMLElement) return e;
902
- if (typeof e == "string") try {
903
- let t = document.querySelector(e);
904
- if (t) return t;
905
- } catch {
906
- return document.body;
907
- }
908
- return document.body;
909
- }
910
- function pt({ getReferenceRect: e, contextElement: t, config: n, container: r, dismissOnOutsideClick: i, dismiss: a }) {
911
- return (o, s = {}) => {
912
- let c = {
913
- getBoundingClientRect: () => e() ?? new DOMRect(),
914
- contextElement: t
915
- }, l = !1, u = !o.isConnected;
916
- u && ft(r).appendChild(o), s.onPosition || (o.style.visibility = "hidden", o.style.width = "max-content");
917
- let d = Qe(c, o, () => {
918
- tt(c, o, {
919
- placement: n.placement,
920
- strategy: n.strategy,
921
- middleware: n.middleware
922
- }).then(({ x: e, y: t, placement: n, strategy: r }) => {
923
- if (s.onPosition) {
924
- s.onPosition({
925
- x: e,
926
- y: t,
927
- placement: n,
928
- strategy: r
929
- });
930
- return;
931
- }
932
- Object.assign(o.style, {
933
- position: r,
934
- left: `${e}px`,
935
- top: `${t}px`
936
- }), l || (l = !0, o.style.visibility = "");
937
- });
938
- }, s.autoUpdate), f;
939
- return i && (f = (e) => {
940
- let n = e.target;
941
- !(n instanceof Node) || o.contains(n) || t.contains(n) || a();
942
- }, document.addEventListener("pointerdown", f, !0)), () => {
943
- d(), f && document.removeEventListener("pointerdown", f, !0), u && o.remove();
944
- };
945
- };
946
- }
947
- function mt({ editor: e, pluginKey: t, items: n, renderer: r, minQueryLength: i, debounce: a, initialItems: o, placement: s, offset: c, container: l, flip: u, floatingUi: d, dismissOnOutsideClick: f, command: p, clientRectFor: m, dispatchExit: h }) {
948
- let g, _ = ut({
949
- editor: e,
950
- items: n
951
- }), v = dt({
952
- placement: s,
953
- offset: c,
954
- flip: u,
955
- floatingUi: d
956
- });
957
- function y(e, t) {
958
- switch (e) {
959
- case "started":
960
- var n;
961
- r == null || (n = r.onStart) == null || n.call(r, t);
962
- break;
963
- case "updated":
964
- var i;
965
- r == null || (i = r.onUpdate) == null || i.call(r, t);
966
- break;
967
- case "stopped":
968
- var a;
969
- r == null || (a = r.onExit) == null || a.call(r, t);
970
- }
971
- }
972
- return {
973
- update: async (n, d) => {
974
- let b = t.getState(d), x = t.getState(n.state);
975
- if (!b || !x) return;
976
- let S = null, C = b.query !== x.query, w = b.text !== x.text, T = b.range.from !== x.range.from || b.range.to !== x.range.to, E = C || w || T;
977
- if (!b.active && x.active) S = "started";
978
- else if (b.active && !x.active) S = "stopped";
979
- else if (x.active && E) S = "updated";
980
- else return;
981
- let D = S === "stopped" ? b : x, O = n.dom.querySelector(`[data-decoration-id="${D.decorationId}"]`), k = m(n, O), A = i === 0 || (D.query ? D.query.length >= i : !1), j = (S === "started" || S === "updated") && A;
982
- if (g = {
983
- editor: e,
984
- range: D.range,
985
- query: D.query || "",
986
- text: D.text || "",
987
- items: o ?? [],
988
- command: (t) => p({
989
- editor: e,
990
- range: D.range,
991
- props: t
992
- }),
993
- decorationNode: O,
994
- clientRect: k,
995
- loading: j,
996
- placement: s,
997
- offset: {
998
- mainAxis: c.mainAxis ?? 4,
999
- crossAxis: c.crossAxis ?? 0
1000
- },
1001
- container: l,
1002
- flip: u,
1003
- floatingUi: v,
1004
- mount: pt({
1005
- getReferenceRect: k,
1006
- contextElement: n.dom,
1007
- config: v,
1008
- container: l,
1009
- dismissOnOutsideClick: f,
1010
- dismiss: () => h(e.view)
1011
- })
1012
- }, S === "started") {
1013
- var M;
1014
- r == null || (M = r.onBeforeStart) == null || M.call(r, g);
1015
- }
1016
- if (S === "updated") {
1017
- var ee;
1018
- r == null || (ee = r.onBeforeUpdate) == null || ee.call(r, g);
1019
- }
1020
- if (S === "started" && y(S, g), S === "started" || S === "updated") {
1021
- if (!j) _.abort(), g = {
1022
- ...g,
1023
- items: o ?? [],
1024
- loading: !1
1025
- };
1026
- else {
1027
- g = {
1028
- ...g,
1029
- items: o ?? [],
1030
- loading: !0
1031
- }, S = "updated", y(S, g);
1032
- let e = await _.fetch(D.query || "", a);
1033
- if (e.status === "aborted") return;
1034
- if (!t.getState(n.state)?.active) {
1035
- _.abort();
1036
- return;
1037
- }
1038
- g = e.status === "resolved" ? {
1039
- ...g,
1040
- items: e.items,
1041
- loading: !1
1042
- } : {
1043
- ...g,
1044
- loading: !1
1045
- };
1046
- }
1047
- }
1048
- if (S === "stopped") {
1049
- _.abort(), y(S, g), g = void 0;
1050
- return;
1051
- }
1052
- S === "updated" && y(S, g);
1053
- },
1054
- destroy: () => {
1055
- var e;
1056
- _.abort(), g && (r == null || (e = r.onExit) == null || e.call(r, g));
1057
- }
1058
- };
1059
- }
1060
- var ht = new p("suggestion");
1061
- function gt({ pluginKey: e = ht, editor: t, char: n = "@", allowSpaces: r = !1, allowToIncludeChar: i = !1, allowedPrefixes: a = [" "], startOfLine: o = !1, decorationTag: s = "span", decorationClass: c = "suggestion", decorationContent: l = "", decorationEmptyClass: u = "is-empty", command: d = () => null, items: f = () => [], minQueryLength: p = 0, debounce: m = 0, initialItems: h, placement: g = "bottom-start", offset: v = {}, container: y, flip: b = !0, floatingUi: x, dismissOnOutsideClick: S = !0, render: C = () => ({}), allow: w = () => !0, findSuggestionMatch: T = nt, shouldShow: E, shouldResetDismissed: D }) {
1062
- let O = C?.(), k = r && !i, A = (n, r) => at(t, n, r, e);
1063
- function j(e) {
1064
- return ot({
1065
- ...e,
1066
- editor: t,
1067
- shouldResetDismissed: D,
1068
- effectiveAllowSpaces: k
1069
- });
1070
- }
1071
- let M = (t) => st({
1072
- view: t,
1073
- pluginKeyRef: e
1074
- });
1075
- return new _({
1076
- key: e,
1077
- view: () => mt({
1078
- editor: t,
1079
- pluginKey: e,
1080
- items: f,
1081
- renderer: O,
1082
- minQueryLength: p,
1083
- debounce: m,
1084
- initialItems: h,
1085
- placement: g,
1086
- offset: v,
1087
- container: y,
1088
- flip: b,
1089
- floatingUi: x,
1090
- dismissOnOutsideClick: S,
1091
- command: d,
1092
- clientRectFor: A,
1093
- dispatchExit: M
1094
- }),
1095
- state: lt({
1096
- editor: t,
1097
- char: n,
1098
- effectiveAllowSpaces: k,
1099
- allowToIncludeChar: i,
1100
- allowedPrefixes: a,
1101
- startOfLine: o,
1102
- findSuggestionMatch: T,
1103
- allow: w,
1104
- shouldShow: E,
1105
- shouldKeepDismissed: j,
1106
- pluginKey: e
1107
- }),
1108
- props: ct({
1109
- pluginKey: e,
1110
- decorationTag: s,
1111
- decorationClass: c,
1112
- decorationContent: l,
1113
- decorationEmptyClass: u,
1114
- renderer: O,
1115
- dispatchExit: M
1116
- })
1117
- });
1118
- }
1119
- var _t = gt, vt = ["id"], yt = {
1120
- key: 0,
1121
- class: "tpl:px-3 tpl:py-2 tpl:text-xs tpl:text-[var(--tpl-text-dim)]",
1122
- "data-testid": "merge-tag-suggestion-empty"
1123
- }, bt = [
1124
- "id",
1125
- "aria-selected",
1126
- "data-selected",
1127
- "data-merge-tag-value",
1128
- "onMousedown",
1129
- "onMousemove"
1130
- ], xt = { class: "tpl:font-medium" }, St = { class: "tpl:text-[var(--tpl-text-dim)] tpl:font-mono" }, Ct = /* @__PURE__ */ u({
1131
- __name: "MergeTagSuggestionList",
1132
- props: {
1133
- items: {},
1134
- selectedIndex: {},
1135
- emptyText: {},
1136
- listId: {}
1137
- },
1138
- emits: ["select", "hover"],
1139
- setup(n) {
1140
- let r = n;
1141
- function u(e) {
1142
- return r.listId ? `${r.listId}-opt-${e}` : void 0;
1143
- }
1144
- return (r, f) => (e(), a("div", {
1145
- id: n.listId,
1146
- class: "tpl:min-w-[200px] tpl:max-w-[320px] tpl:max-h-[50vh] tpl:overflow-y-auto tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:py-1 tpl:shadow-[var(--tpl-shadow-lg)]",
1147
- role: "listbox",
1148
- "data-testid": "merge-tag-suggestion-list"
1149
- }, [n.items.length === 0 ? (e(), a("div", yt, o(n.emptyText), 1)) : l("", !0), (e(!0), a(c, null, t(n.items, (t, c) => (e(), a("button", {
1150
- key: t.value,
1151
- id: u(c),
1152
- type: "button",
1153
- role: "option",
1154
- "aria-selected": c === n.selectedIndex,
1155
- "data-selected": c === n.selectedIndex ? "true" : "false",
1156
- "data-merge-tag-value": t.value,
1157
- class: s(["tpl:flex tpl:w-full tpl:flex-col tpl:items-start tpl:gap-0.5 tpl:px-3 tpl:py-1.5 tpl:text-left tpl:text-xs tpl:transition-colors", c === n.selectedIndex ? "tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary)]" : "tpl:text-[var(--tpl-text)] tpl:hover:bg-[var(--tpl-bg-hover)]"]),
1158
- onMousedown: d((e) => r.$emit("select", t), ["prevent", "stop"]),
1159
- onMousemove: (e) => c !== n.selectedIndex && r.$emit("hover", c)
1160
- }, [i("span", xt, o(t.label), 1), i("span", St, o(t.value), 1)], 42, bt))), 128))], 8, vt));
1161
- }
1162
- }), wt = 10, Tt = 0;
1163
- function Et(e, t) {
1164
- let n = t.trim().toLowerCase();
1165
- return n === "" ? e.slice(0, wt) : e.filter((e) => {
1166
- let t = e.label.toLowerCase(), r = e.value.toLowerCase();
1167
- return t.includes(n) || r.includes(n);
1168
- }).slice(0, wt);
1169
- }
1170
- function Dt(e, t, n, r) {
1171
- return t.length === 0 ? e.key === "Enter" || e.key === "Tab" : e.key === "ArrowDown" ? (n.value = (n.value + 1) % t.length, !0) : e.key === "ArrowUp" ? (n.value = (n.value - 1 + t.length) % t.length, !0) : e.key === "Enter" || e.key === "Tab" ? (r(t[n.value]), !0) : !1;
1172
- }
1173
- function Ot(e, t) {
1174
- let i = null, a = null, o = null, s = n([]), c = n(0), l = null, u = `tpl-merge-tag-suggestion-${++Tt}`, d = null, p = [], m = null;
1175
- function h() {
1176
- b(d?.() ?? null);
1177
- }
1178
- function g() {
1179
- h(), m !== null && cancelAnimationFrame(m), m = requestAnimationFrame(() => {
1180
- m = null, h();
1181
- });
1182
- }
1183
- function _(e) {
1184
- let t = [], n = e?.parentElement ?? null;
1185
- for (; n && n !== document.body && n !== document.documentElement;) {
1186
- let e = window.getComputedStyle(n), r = e.overflow + e.overflowX + e.overflowY;
1187
- /(auto|scroll|overlay)/.test(r) && t.push(n), n = n.parentElement;
1188
- }
1189
- return t;
1190
- }
1191
- function v(e) {
1192
- p = [window, ..._(e)];
1193
- for (let e of p) e.addEventListener("scroll", h, {
1194
- passive: !0,
1195
- capture: !0
1196
- });
1197
- window.addEventListener("resize", h, { passive: !0 });
1198
- }
1199
- function y() {
1200
- for (let e of p) e.removeEventListener("scroll", h, { capture: !0 });
1201
- window.removeEventListener("resize", h), p = [];
1202
- }
1203
- function b(e) {
1204
- if (!a || !e || e.bottom < 0 || e.top > window.innerHeight) return;
1205
- a.style.position = "absolute", a.style.zIndex = "9999";
1206
- let t = a.offsetParent?.getBoundingClientRect(), n = t?.top ?? 0, r = t?.left ?? 0;
1207
- a.style.left = `${e.left - r}px`, a.style.top = `${e.bottom - n}px`;
1208
- let i = a.offsetHeight;
1209
- if (i !== 0 && window.innerHeight - e.bottom < i) {
1210
- let t = Math.max(0, e.top - i);
1211
- a.style.top = `${t - n}px`;
1212
- }
1213
- }
1214
- function x(e, t) {
1215
- let n = t?.closest("[data-tpl-theme]");
1216
- if (!n) return;
1217
- let r = n.getAttribute("data-tpl-theme");
1218
- r && e.setAttribute("data-tpl-theme", r);
1219
- let i = window.getComputedStyle(n);
1220
- for (let t = 0; t < i.length; t++) {
1221
- let n = i[t];
1222
- n.startsWith("--tpl-") && e.style.setProperty(n, i.getPropertyValue(n));
1223
- }
1224
- e.style.fontFamily = i.fontFamily, e.style.fontSize = i.fontSize, e.style.lineHeight = i.lineHeight;
1225
- }
1226
- function S(e) {
1227
- o && (e ? (o.setAttribute("role", "combobox"), o.setAttribute("aria-haspopup", "listbox"), o.setAttribute("aria-expanded", "true"), o.setAttribute("aria-controls", u)) : (o.removeAttribute("aria-expanded"), o.removeAttribute("aria-controls"), o.removeAttribute("aria-activedescendant"), o.removeAttribute("aria-haspopup"), o.removeAttribute("role")));
1228
- }
1229
- function C() {
1230
- if (o) {
1231
- if (s.value.length === 0) {
1232
- o.removeAttribute("aria-activedescendant");
1233
- return;
1234
- }
1235
- o.setAttribute("aria-activedescendant", `${u}-opt-${c.value}`);
1236
- }
1237
- }
1238
- function w(e) {
1239
- l?.(e);
1240
- }
1241
- return {
1242
- open: ({ items: n, getRect: p, anchorEl: m, onCommand: h }) => {
1243
- s.value = n, c.value = 0, l = h, a = document.createElement("div"), a.setAttribute("data-testid", "merge-tag-suggestion-popup"), o = m, x(a, m), (t?.value ?? document.body).appendChild(a), i = f({ render() {
1244
- return r(Ct, {
1245
- items: s.value,
1246
- selectedIndex: c.value,
1247
- emptyText: e,
1248
- listId: u,
1249
- onSelect: (e) => w(e),
1250
- onHover: (e) => {
1251
- c.value = e, C();
1252
- }
1253
- });
1254
- } }), i.mount(a), S(!0), C(), d = p, g(), v(m);
1255
- },
1256
- update: ({ items: e, getRect: t, onCommand: n }) => {
1257
- s.value = e, c.value >= e.length && (c.value = 0), l = n, C(), d = t, g();
1258
- },
1259
- handleKeyDown: (e) => {
1260
- let t = Dt(e, s.value, c, w);
1261
- return t && C(), t;
1262
- },
1263
- close: () => {
1264
- a !== null && (m !== null && (cancelAnimationFrame(m), m = null), y(), S(!1), i?.unmount(), a.remove(), i = null, a = null, o = null, l = null, d = null);
1265
- },
1266
- isOpen: () => a !== null
1267
- };
1268
- }
1269
- function kt(e, t) {
1270
- return () => {
1271
- let n = Ot(e, t);
1272
- return {
1273
- onStart: (e) => {
1274
- let t = e.editor.view?.dom;
1275
- n.open({
1276
- items: e.items,
1277
- getRect: e.clientRect ?? null,
1278
- anchorEl: t ?? null,
1279
- onCommand: (t) => e.command(t)
1280
- });
1281
- },
1282
- onUpdate: (e) => {
1283
- n.update({
1284
- items: e.items,
1285
- getRect: e.clientRect ?? null,
1286
- onCommand: (t) => e.command(t)
1287
- });
1288
- },
1289
- onKeyDown: (e) => e.event.key === "Escape" || n.handleKeyDown(e.event),
1290
- onExit: () => n.close()
1291
- };
1292
- };
1293
- }
1294
- var At = v.create({
1295
- name: "mergeTagSuggestion",
1296
- addOptions() {
1297
- return {
1298
- mergeTags: [],
1299
- char: "{{",
1300
- emptyText: "No matching merge tags",
1301
- popoverRoot: null
1302
- };
1303
- },
1304
- addProseMirrorPlugins() {
1305
- let e = this.options.mergeTags, t = this.options.emptyText, n = this.options.popoverRoot, r = {
1306
- char: this.options.char,
1307
- allowSpaces: !1,
1308
- startOfLine: !1,
1309
- allowedPrefixes: null,
1310
- items: ({ query: t }) => Et(e, t),
1311
- command: ({ editor: e, range: t, props: n }) => {
1312
- e.chain().focus().insertContentAt(t, {
1313
- type: "mergeTagNode",
1314
- attrs: {
1315
- label: n.label,
1316
- value: n.value
1317
- }
1318
- }).run();
1319
- },
1320
- render: kt(t, n)
1321
- };
1322
- return [_t({
1323
- editor: this.editor,
1324
- ...r
1325
- })];
1326
- }
1327
- });
1328
- //#endregion
1329
- export { Dt as i, Ot as n, Et as r, At as t };