@fewangsit/wangsvue-fats 1.0.0-alpha.42 → 1.0.0-alpha.44

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 (284) hide show
  1. package/components/buttonsearchbyscan/ButtonSearchByScan.vue.d.ts +44 -0
  2. package/components/index.d.ts +1 -0
  3. package/components/inlinemessage/InlineMessage.vue.d.ts +167 -0
  4. package/event-bus/index.d.ts +3 -0
  5. package/loading-page-BrQattYE.js +1 -0
  6. package/loading-page-CoC9UhfC.js +4 -0
  7. package/loading-page-DbLuqCHa.js +1 -0
  8. package/loading-page-f8D03l3G.js +4 -0
  9. package/loading-plane-CgfbWppy.js +1 -0
  10. package/loading-plane-CoXtqoc9.js +4 -0
  11. package/loading-table-Bdr9ZhtP.js +1 -0
  12. package/loading-table-ByUoWqUo.js +4 -0
  13. package/loading-table-BygEMzFM.js +4 -0
  14. package/loading-table-BzrSQlA0.js +1 -0
  15. package/loading-table-D9bw9OcI.js +4 -0
  16. package/loading-table-chOgXi94.js +1 -0
  17. package/no-data-CTKux8RI.js +4 -0
  18. package/no-data-Cgze_Rvp.js +1 -0
  19. package/{assets/lottiejs/no-data-DOy8kIGF.es.js → no-data-DLHO1L_u.js} +2 -13
  20. package/no-data-Dep79CBh.js +1 -0
  21. package/no-data-g0dJCy2p.js +4 -0
  22. package/no-data-y1X5WtcQ.js +1 -0
  23. package/package.json +3 -3
  24. package/stats.html +1 -1
  25. package/style.css +1 -1
  26. package/wangsvue-fats.js +51885 -346
  27. package/wangsvue-fats.system.js +312 -1
  28. package/assets/lottiejs/loading-page-B9ooQcfF.system.js +0 -1
  29. package/assets/lottiejs/loading-page-CQ0mKER2.es.js +0 -15
  30. package/assets/lottiejs/loading-table-B4T3FYiI.system.js +0 -1
  31. package/assets/lottiejs/loading-table-BnpbX8Ew.es.js +0 -15
  32. package/assets/lottiejs/no-data-CMWnya_k.system.js +0 -1
  33. package/components/animation/Animation-6756VN9N.system.js +0 -1
  34. package/components/animation/Animation-COWVilAA.es.js +0 -428
  35. package/components/approverinfo/ApproverInfo-BdqBpNjY.system.js +0 -1
  36. package/components/approverinfo/ApproverInfo-C3_ibV8c.es.js +0 -321
  37. package/components/assetinfo/AssetInfo-BBgKToRP.system.js +0 -1
  38. package/components/assetinfo/AssetInfo-CmwgOU74.es.js +0 -298
  39. package/components/backgroundimagecropper/BackgroundImageCropper-DFHtaSyE.system.js +0 -1
  40. package/components/backgroundimagecropper/BackgroundImageCropper-HKzUEXq-.es.js +0 -57
  41. package/components/badge/Badge-CndPv5v9.system.js +0 -1
  42. package/components/badge/Badge-DA-XiE1C.es.js +0 -115
  43. package/components/badgegroup/BadgeGroup-Bj0EjoML.es.js +0 -68
  44. package/components/badgegroup/BadgeGroup-Y-HhiHk8.system.js +0 -1
  45. package/components/basecalendar/BaseCalendar-47ahYXrt.es.js +0 -867
  46. package/components/basecalendar/BaseCalendar-Ce46jOkg.system.js +0 -1
  47. package/components/basetree/BaseTree-DDu1qI7t.system.js +0 -1
  48. package/components/basetree/BaseTree-DLSA5FMh.es.js +0 -167
  49. package/components/breadcrumb/Breadcrumb-B5bAijry.system.js +0 -1
  50. package/components/breadcrumb/Breadcrumb-BWSmLPqn.es.js +0 -46
  51. package/components/button/Button-D-MSv_AS.es.js +0 -120
  52. package/components/button/Button-Okx1_kOu.system.js +0 -1
  53. package/components/buttonbulkaction/ButtonBulkAction-B4RcdWmb.es.js +0 -185
  54. package/components/buttonbulkaction/ButtonBulkAction-DLmvicRL.system.js +0 -1
  55. package/components/buttoncopy/ButtonCopy-BZgQAFOM.es.js +0 -31
  56. package/components/buttoncopy/ButtonCopy-CKi1bBpz.system.js +0 -1
  57. package/components/buttondownload/ButtonDownload-Bw9T3mbW.es.js +0 -92
  58. package/components/buttondownload/ButtonDownload-CpA0ryUT.system.js +0 -1
  59. package/components/buttonfilter/ButtonFilter-BIE-jM2i.es.js +0 -28
  60. package/components/buttonfilter/ButtonFilter-C4WRvUrj.system.js +0 -1
  61. package/components/buttonradio/ButtonRadio-5VUY8o5h.es.js +0 -83
  62. package/components/buttonradio/ButtonRadio-B2wWrgB5.system.js +0 -1
  63. package/components/buttonscan/ButtonScan-BCScT2cx.es.js +0 -421
  64. package/components/buttonscan/ButtonScan-TbyhlW5M.system.js +0 -1
  65. package/components/buttonsearch/ButtonSearch-Clbafqts.es.js +0 -70
  66. package/components/buttonsearch/ButtonSearch-e57pD5r3.system.js +0 -1
  67. package/components/buttonselecttree/ButtonSelectTree-B-_Iw5sB.es.js +0 -218
  68. package/components/buttonselecttree/ButtonSelectTree-Cbq1oeVK.system.js +0 -1
  69. package/components/buttonselectuser/ButtonSelectUser-Ar7Y8tVR.es.js +0 -101
  70. package/components/buttonselectuser/ButtonSelectUser-Cfe6m75Z.system.js +0 -1
  71. package/components/buttonsync/ButtonSync-Bc1GZXT6.es.js +0 -29
  72. package/components/buttonsync/ButtonSync-ClllEdAy.system.js +0 -1
  73. package/components/buttontoggle/ButtonToggle-DIy3M8Pz.es.js +0 -11
  74. package/components/buttontoggle/ButtonToggle-VNp0lbcW.system.js +0 -1
  75. package/components/buttonviewlog/ButtonViewLog-Ct8QwEey.system.js +0 -1
  76. package/components/buttonviewlog/ButtonViewLog-h9uVv5A5.es.js +0 -21
  77. package/components/calendar/Calendar-7yBKZsvj.system.js +0 -1
  78. package/components/calendar/Calendar-Df6CnW-l.es.js +0 -112
  79. package/components/card/Card-BUKU2FcT.system.js +0 -1
  80. package/components/card/Card-CwnxKNdM.es.js +0 -47
  81. package/components/checkbox/Checkbox-CCtItmVW.system.js +0 -1
  82. package/components/checkbox/Checkbox-DdsR222S.es.js +0 -135
  83. package/components/codesnippet/CodeSnippet-Bpps-Iyc.es.js +0 -127
  84. package/components/codesnippet/CodeSnippet-DvTtZ28b.system.js +0 -2
  85. package/components/codesnippetadapter/CodeSnippetAdapter-BtSqWBl1.system.js +0 -1
  86. package/components/codesnippetadapter/CodeSnippetAdapter-jgXoPKzr.es.js +0 -26
  87. package/components/columnlist/ColumnList-Bh3LZlOa.system.js +0 -1
  88. package/components/columnlist/ColumnList-Bp7soiys.es.js +0 -204
  89. package/components/customcolumn/CustomColumn-CVhAbTGn.system.js +0 -1
  90. package/components/customcolumn/CustomColumn-Dblxjw_0.es.js +0 -138
  91. package/components/datatable/DataTable--mHUKNUr.system.js +0 -1
  92. package/components/datatable/DataTable-J1j-OKsW.es.js +0 -983
  93. package/components/dialog/Dialog-Dy93f91f.es.js +0 -121
  94. package/components/dialog/Dialog-WEl66uTI.system.js +0 -1
  95. package/components/dialogconfirm/DialogConfirm-BOFb7rJD.es.js +0 -139
  96. package/components/dialogconfirm/DialogConfirm-o7_v7F31.system.js +0 -1
  97. package/components/dialogform/DialogForm-C15nC1wH.es.js +0 -223
  98. package/components/dialogform/DialogForm-CdpY1_-F.system.js +0 -1
  99. package/components/dialogselecttree/DialogSelectTree-BA8xEqco.es.js +0 -268
  100. package/components/dialogselecttree/DialogSelectTree-DKxWI9Re.system.js +0 -1
  101. package/components/dialogselectuser/DialogSelectUser-BZTSktHZ.system.js +0 -1
  102. package/components/dialogselectuser/DialogSelectUser-Bu5TDAPt.es.js +0 -186
  103. package/components/dialogselectuserfilter/DialogSelectUserFilter-DEl4zFaX.system.js +0 -1
  104. package/components/dialogselectuserfilter/DialogSelectUserFilter-Dz5OxAU-.es.js +0 -40
  105. package/components/dropdown/Dropdown-D4S52rW5.es.js +0 -252
  106. package/components/dropdown/Dropdown-DuvNYyq0.system.js +0 -1
  107. package/components/editor/Editor-DQ7Xdy30.es.js +0 -1036
  108. package/components/editor/Editor-IfYw2Tps.system.js +0 -1
  109. package/components/editorbutton/EditorButton-DDgS2vga.es.js +0 -28
  110. package/components/editorbutton/EditorButton-DmVrr4Bk.system.js +0 -1
  111. package/components/fieldwrapper/FieldWrapper-C6HJ2HnC.es.js +0 -34
  112. package/components/fieldwrapper/FieldWrapper-DFjw9hA8.system.js +0 -1
  113. package/components/fileupload/FileUpload-B6PAucnD.es.js +0 -175
  114. package/components/fileupload/FileUpload-iVAJXujV.system.js +0 -1
  115. package/components/filtercontainer/FilterContainer-CuMaq5Sv.es.js +0 -284
  116. package/components/filtercontainer/FilterContainer-DUeVLHgZ.system.js +0 -1
  117. package/components/form/Form-D-e0VI8V.system.js +0 -1
  118. package/components/form/Form-eSj-nb1y.es.js +0 -181
  119. package/components/hardwaresync/HardwareSync--HomfQuH.system.js +0 -1
  120. package/components/hardwaresync/HardwareSync-DUsVwHx1.es.js +0 -236
  121. package/components/icon/Icon-DUylRmY4.system.js +0 -1
  122. package/components/icon/Icon-mDqG7urn.es.js +0 -82
  123. package/components/image/Image-BZ31CL-y.es.js +0 -169
  124. package/components/image/Image-DX6uB7Ns.system.js +0 -1
  125. package/components/imagecompressor/ImageCompressor-BLeJDvN3.system.js +0 -1
  126. package/components/imagecompressor/ImageCompressor-DaW0ak9c.es.js +0 -501
  127. package/components/imageinputinfo/ImageInputInfo-C5F14hbF.system.js +0 -1
  128. package/components/imageinputinfo/ImageInputInfo-oTtVBxzO.es.js +0 -46
  129. package/components/inlinemessage/InlineMessage-19w6FOcP.system.js +0 -1
  130. package/components/inlinemessage/InlineMessage-CBZT3jWS.es.js +0 -94
  131. package/components/inputbadge/InputBadge-CsdT7M7-.es.js +0 -186
  132. package/components/inputbadge/InputBadge-dgANMV70.system.js +0 -1
  133. package/components/inputcurrency/InputCurrency-B96npK8W.es.js +0 -1208
  134. package/components/inputcurrency/InputCurrency-ChqGX5L8.system.js +0 -1
  135. package/components/inputemail/InputEmail-BMzumenA.es.js +0 -49
  136. package/components/inputemail/InputEmail-CYILS9bp.system.js +0 -1
  137. package/components/inputgroup/InputGroup-G9TEI4vX.system.js +0 -1
  138. package/components/inputgroup/InputGroup-eNDRlJ5R.es.js +0 -56
  139. package/components/inputnumber/InputNumber-Bzk_YzWM.es.js +0 -232
  140. package/components/inputnumber/InputNumber-CRyg8Xw_.system.js +0 -1
  141. package/components/inputpassword/InputPassword-BMHMWLgU.es.js +0 -121
  142. package/components/inputpassword/InputPassword-BjB6FsoL.system.js +0 -1
  143. package/components/inputphonenumber/InputPhoneNumber-CVM2oK5q.es.js +0 -591
  144. package/components/inputphonenumber/InputPhoneNumber-DIbd3upL.system.js +0 -1
  145. package/components/inputrangenumber/InputRangeNumber-B1aAoKVj.es.js +0 -134
  146. package/components/inputrangenumber/InputRangeNumber-C28xgFBY.system.js +0 -1
  147. package/components/inputsearch/InputSearch--KHwTBTm.system.js +0 -1
  148. package/components/inputsearch/InputSearch-cPq3vqhy.es.js +0 -53
  149. package/components/inputtext/InputText-93zDNfC3.system.js +0 -1
  150. package/components/inputtext/InputText-_xEnXysf.es.js +0 -241
  151. package/components/inputurl/InputURL-aqx1PVKL.es.js +0 -61
  152. package/components/inputurl/InputURL-kWIiKGEG.system.js +0 -1
  153. package/components/invisiblefield/InvisibleField-4XbiOrqw.es.js +0 -27
  154. package/components/invisiblefield/InvisibleField-BHudtX2g.system.js +0 -1
  155. package/components/litedropdown/LiteDropdown-3KsCx4wX.system.js +0 -1
  156. package/components/litedropdown/LiteDropdown-DcSzP11l.es.js +0 -102
  157. package/components/loading/Loading-D8M801C9.es.js +0 -24
  158. package/components/loading/Loading-Diwog8dc.system.js +0 -1
  159. package/components/mentionlist/MentionList--7AymnhE.es.js +0 -58
  160. package/components/mentionlist/MentionList-600dsWhX.system.js +0 -1
  161. package/components/mentionsection/MentionSection-C1gWOzH2.system.js +0 -3
  162. package/components/mentionsection/MentionSection-C_c4qbpq.es.js +0 -52
  163. package/components/menu/Menu-BmTMFwBD.es.js +0 -73
  164. package/components/menu/Menu-OR25pAK3.system.js +0 -1
  165. package/components/menuitem/MenuItem-LoZMc0T9.es.js +0 -65
  166. package/components/menuitem/MenuItem-imQ-hYTP.system.js +0 -1
  167. package/components/multirow/MultiRow-ClSMxrEx.es.js +0 -52
  168. package/components/multirow/MultiRow-DKu6uIsI.system.js +0 -1
  169. package/components/multiselect/MultiSelect-DGhS1EyX.es.js +0 -189
  170. package/components/multiselect/MultiSelect-DKFYq47E.system.js +0 -1
  171. package/components/overlaypanel/OverlayPanel-C_WCcNPw.system.js +0 -1
  172. package/components/overlaypanel/OverlayPanel-DXNek7Yb.es.js +0 -49
  173. package/components/tabmenu/TabMenu-CAQqu-ff.system.js +0 -1
  174. package/components/tabmenu/TabMenu-iMeZa8gy.es.js +0 -108
  175. package/components/tagtype/TagType-CX7BVRrE.es.js +0 -49
  176. package/components/tagtype/TagType-IMYg8AJf.system.js +0 -1
  177. package/components/textarea/Textarea-ClnQ2qmf.es.js +0 -108
  178. package/components/textarea/Textarea-DlkzVURV.system.js +0 -1
  179. package/components/timeline/Timeline-BMRdV_mH.es.js +0 -120
  180. package/components/timeline/Timeline-D7SYc3QX.system.js +0 -1
  181. package/components/timelinecontentbytype/TimelineContentByType-BmWsZID0.system.js +0 -1
  182. package/components/timelinecontentbytype/TimelineContentByType-ehFLzTA1.es.js +0 -111
  183. package/components/toast/Toast-DnALWJkx.es.js +0 -74
  184. package/components/toast/Toast-Pc_DOZ5-.system.js +0 -1
  185. package/components/toggleswitch/ToggleSwitch-WHdD3oYL.system.js +0 -1
  186. package/components/toggleswitch/ToggleSwitch-wRjnHRIw.es.js +0 -90
  187. package/components/transactionroles/TransactionRoles-B_67h5wb.es.js +0 -223
  188. package/components/transactionroles/TransactionRoles-DSXBVwPM.system.js +0 -1
  189. package/components/tree/Tree-BoVGYw5N.system.js +0 -1
  190. package/components/tree/Tree-DnaIZZ8S.es.js +0 -268
  191. package/components/treenode/TreeNode-D5aepDIU.system.js +0 -1
  192. package/components/treenode/TreeNode-KJOUvlTH.es.js +0 -499
  193. package/components/treesearchinput/TreeSearchInput-B1PmhE7k.es.js +0 -56
  194. package/components/treesearchinput/TreeSearchInput-C-hXPV61.system.js +0 -1
  195. package/components/username/UserName-CCyPAYG6.system.js +0 -1
  196. package/components/username/UserName-CWs83BX6.es.js +0 -130
  197. package/components/userwithicon/UserWithIcon-CFjQcbAS.system.js +0 -1
  198. package/components/userwithicon/UserWithIcon-Dn3aNKdq.es.js +0 -18
  199. package/components/validatormessage/ValidatorMessage-BtKfBXzO.es.js +0 -19
  200. package/components/validatormessage/ValidatorMessage-VVfyqlRF.system.js +0 -1
  201. package/vendor/@popperjs/core-BDAJHTVh.es.js +0 -905
  202. package/vendor/@popperjs/core-DpNOCyB0.system.js +0 -1
  203. package/vendor/@tiptap/core-BLz8iRA3.es.js +0 -2868
  204. package/vendor/@tiptap/core-bnIgGWIt.system.js +0 -80
  205. package/vendor/@tiptap/extension-bold-BnsTNqIJ.es.js +0 -71
  206. package/vendor/@tiptap/extension-bold-C_KVm_D0.system.js +0 -1
  207. package/vendor/@tiptap/extension-bubble-menu-D421L1EU.system.js +0 -1
  208. package/vendor/@tiptap/extension-bubble-menu-D9Vgq7yO.es.js +0 -128
  209. package/vendor/@tiptap/extension-bullet-list-GNj3sKw9.es.js +0 -53
  210. package/vendor/@tiptap/extension-bullet-list-kXXFF-_p.system.js +0 -1
  211. package/vendor/@tiptap/extension-code-CfQ7g1i2.es.js +0 -51
  212. package/vendor/@tiptap/extension-code-Q8P1EHjz.system.js +0 -1
  213. package/vendor/@tiptap/extension-floating-menu-8rFSweor.system.js +0 -1
  214. package/vendor/@tiptap/extension-floating-menu-CSQuJzDM.es.js +0 -99
  215. package/vendor/@tiptap/extension-heading-BE64-Rg_.system.js +0 -1
  216. package/vendor/@tiptap/extension-heading-ZTlCgdtc.es.js +0 -54
  217. package/vendor/@tiptap/extension-history-GLkLmX-Y.system.js +0 -1
  218. package/vendor/@tiptap/extension-history-eJIThEn-.es.js +0 -35
  219. package/vendor/@tiptap/extension-image-B8NPUVFM.es.js +0 -64
  220. package/vendor/@tiptap/extension-image-rKrdkZpJ.system.js +0 -1
  221. package/vendor/@tiptap/extension-italic-C_CyJubw.es.js +0 -70
  222. package/vendor/@tiptap/extension-italic-Dg0Nosoc.system.js +0 -1
  223. package/vendor/@tiptap/extension-link-Cd8bTMBz.system.js +0 -1
  224. package/vendor/@tiptap/extension-link-D4PFdLvA.es.js +0 -262
  225. package/vendor/@tiptap/extension-list-item-7pIJ7t09.es.js +0 -33
  226. package/vendor/@tiptap/extension-list-item-Mnhfw2gP.system.js +0 -1
  227. package/vendor/@tiptap/extension-mention-DVF3rX_z.system.js +0 -1
  228. package/vendor/@tiptap/extension-mention-Dkg-tbrz.es.js +0 -130
  229. package/vendor/@tiptap/extension-ordered-list-DLI4xDN8.es.js +0 -71
  230. package/vendor/@tiptap/extension-ordered-list-Hl0QU8Zt.system.js +0 -1
  231. package/vendor/@tiptap/extension-placeholder-BeLl2T-f.system.js +0 -1
  232. package/vendor/@tiptap/extension-placeholder-V0iTxU19.es.js +0 -52
  233. package/vendor/@tiptap/extension-underline-BdcAQ4JH.system.js +0 -1
  234. package/vendor/@tiptap/extension-underline-DsGbvz80.es.js +0 -40
  235. package/vendor/@tiptap/suggestion-BpZSO8Lm.system.js +0 -1
  236. package/vendor/@tiptap/suggestion-C4sBhJAD.es.js +0 -131
  237. package/vendor/@tiptap/vue-3-BH1pZykd.system.js +0 -1
  238. package/vendor/@tiptap/vue-3-DceiR7pK.es.js +0 -436
  239. package/vendor/highlight.js-BAruEf1H.system.js +0 -2
  240. package/vendor/highlight.js-DHowhWoU.es.js +0 -2493
  241. package/vendor/linkifyjs-BxsOjwQz.es.js +0 -705
  242. package/vendor/linkifyjs-CMLfIa6I.system.js +0 -5
  243. package/vendor/lodash-DbIT-6qv.es.js +0 -127
  244. package/vendor/lodash-DbvKLWSv.system.js +0 -1
  245. package/vendor/lodash-es-C3G1Cc1m.system.js +0 -1
  246. package/vendor/lodash-es-CJerBxJQ.es.js +0 -766
  247. package/vendor/orderedmap-B3SOk52B.es.js +0 -103
  248. package/vendor/orderedmap-Dwr31MF0.system.js +0 -1
  249. package/vendor/primevue-CadmDhWp.es.js +0 -13928
  250. package/vendor/primevue-u6FsQONA.system.js +0 -193
  251. package/vendor/prosemirror-commands-DLmzIpoS.es.js +0 -383
  252. package/vendor/prosemirror-commands-DgY3QRzI.system.js +0 -2
  253. package/vendor/prosemirror-history-BMpJFORS.es.js +0 -248
  254. package/vendor/prosemirror-history-BrK-FTBv.system.js +0 -1
  255. package/vendor/prosemirror-keymap-COb3Dq2o.system.js +0 -1
  256. package/vendor/prosemirror-keymap-DF8LLxca.es.js +0 -60
  257. package/vendor/prosemirror-model-D2n-Dx_L.es.js +0 -2736
  258. package/vendor/prosemirror-model-DTWK5xnv.system.js +0 -4
  259. package/vendor/prosemirror-schema-list-BPpAP8wR.system.js +0 -1
  260. package/vendor/prosemirror-schema-list-BvrICwYb.es.js +0 -87
  261. package/vendor/prosemirror-state-CwkYUmNs.es.js +0 -820
  262. package/vendor/prosemirror-state-DzPLD-6l.system.js +0 -1
  263. package/vendor/prosemirror-transform-DvAmofec.es.js +0 -1507
  264. package/vendor/prosemirror-transform-VaXuT0NM.system.js +0 -2
  265. package/vendor/prosemirror-view-JTdpiWMD.system.js +0 -5
  266. package/vendor/prosemirror-view-ta7l3rKk.es.js +0 -3742
  267. package/vendor/rope-sequence-4t46C6az.system.js +0 -1
  268. package/vendor/rope-sequence-sEGCUMi8.es.js +0 -100
  269. package/vendor/simplebar-core-71xT5g0m.system.js +0 -1
  270. package/vendor/simplebar-core-Db65-Ath.es.js +0 -333
  271. package/vendor/simplebar-vue-BFEeFUIv.system.js +0 -1
  272. package/vendor/simplebar-vue-DAxqu0eM.es.js +0 -176
  273. package/vendor/tippy.js-CuKTz0UR.system.js +0 -1
  274. package/vendor/tippy.js-DNnwm2RY.es.js +0 -721
  275. package/vendor/uuid-93tp0umt.es.js +0 -9
  276. package/vendor/uuid-Cymn6orr.system.js +0 -1
  277. package/vendor/vee-validate-Cc_B-qII.system.js +0 -5
  278. package/vendor/vee-validate-RE5RuswC.es.js +0 -1309
  279. package/vendor/vue-advanced-cropper-CshlvNaD.es.js +0 -1380
  280. package/vendor/vue-advanced-cropper-NG93jHnU.system.js +0 -20
  281. package/vendor/w3c-keyname-BSD-PgAi.system.js +0 -1
  282. package/vendor/w3c-keyname-CLxH8j-f.es.js +0 -92
  283. /package/{assets/lottiejs/loading-plane-CgfbWppy.system.js → loading-page-CgfbWppy.js} +0 -0
  284. /package/{assets/lottiejs/loading-plane-CoXtqoc9.es.js → loading-page-CoXtqoc9.js} +0 -0
@@ -1,80 +0,0 @@
1
- System.register(["../prosemirror-state-DzPLD-6l.system.js","../prosemirror-view-JTdpiWMD.system.js","../prosemirror-keymap-COb3Dq2o.system.js","../prosemirror-model-DTWK5xnv.system.js","../prosemirror-transform-VaXuT0NM.system.js","../prosemirror-commands-DgY3QRzI.system.js","../prosemirror-schema-list-BPpAP8wR.system.js"],function(F,fr){"use strict";var L,Et,P,B,D,A,St,xt,Tt,Ct,at,$,At,W,Pt,Ot,K,It,_,ct,$t,Nt,Bt,jt,lt,Dt,Rt,Ft,Lt,zt,_t,Ht,Vt,Wt,Kt,Ut,qt,Gt,Jt,Xt,Yt,Qt,Zt,te,ee;return{setters:[k=>{L=k.N,Et=k.E,P=k.P,B=k.a,D=k.S,A=k.T,St=k.A},k=>{xt=k.E},k=>{Tt=k.k},k=>{Ct=k.D,at=k.S,$=k.F,At=k.N,W=k.a,Pt=k.b},k=>{Ot=k.f,K=k.c,It=k.T,_=k.a,ct=k.j,$t=k.l,Nt=k.R,Bt=k.b},k=>{jt=k.w,lt=k.s,Dt=k.a,Rt=k.b,Ft=k.c,Lt=k.d,zt=k.e,_t=k.n,Ht=k.l,Vt=k.f,Wt=k.j,Kt=k.g,Ut=k.h,qt=k.i,Gt=k.k,Jt=k.m,Xt=k.o,Yt=k.p,Qt=k.q},k=>{Zt=k.w,te=k.s,ee=k.l}],execute:function(){F({a:lr,b:sr,c:Dn,d:ht,e:Cn,f:Bn,g:ye,h:Pn,i:gt,j:kt,k:be,l:ot,m:re,n:or,o:dr,p:Rn,t:ir,w:ar});function k(n){const{state:t,transaction:e}=n;let{selection:r}=e,{doc:s}=e,{storedMarks:o}=e;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return o},get selection(){return r},get doc(){return s},get tr(){return r=e.selection,s=e.doc,o=e.storedMarks,e}}}class U{constructor(t){this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:t,editor:e,state:r}=this,{view:s}=e,{tr:o}=r,i=this.buildProps(o);return Object.fromEntries(Object.entries(t).map(([c,a])=>[c,(...u)=>{const d=a(...u)(i);return!o.getMeta("preventDispatch")&&!this.hasCustomState&&s.dispatch(o),d}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(t,e=!0){const{rawCommands:r,editor:s,state:o}=this,{view:i}=s,c=[],a=!!t,l=t||o.tr,u=()=>(!a&&e&&!l.getMeta("preventDispatch")&&!this.hasCustomState&&i.dispatch(l),c.every(f=>f===!0)),d={...Object.fromEntries(Object.entries(r).map(([f,p])=>[f,(...m)=>{const g=this.buildProps(l,e),y=p(...m)(g);return c.push(y),d}])),run:u};return d}createCan(t){const{rawCommands:e,state:r}=this,s=!1,o=t||r.tr,i=this.buildProps(o,s);return{...Object.fromEntries(Object.entries(e).map(([a,l])=>[a,(...u)=>l(...u)({...i,dispatch:void 0})])),chain:()=>this.createChain(o,s)}}buildProps(t,e=!0){const{rawCommands:r,editor:s,state:o}=this,{view:i}=s,c={tr:t,editor:s,view:i,state:k({state:o,transaction:t}),dispatch:e?()=>{}:void 0,chain:()=>this.createChain(t,e),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(r).map(([a,l])=>[a,(...u)=>l(...u)(c)]))}};return c}}class we{constructor(){this.callbacks={}}on(t,e){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(e),this}emit(t,...e){const r=this.callbacks[t];return r&&r.forEach(s=>s.apply(this,e)),this}off(t,e){const r=this.callbacks[t];return r&&(e?this.callbacks[t]=r.filter(s=>s!==e):delete this.callbacks[t]),this}once(t,e){const r=(...s)=>{this.off(t,r),e.apply(this,s)};return this.on(t,r)}removeAllListeners(){this.callbacks={}}}function b(n,t,e){return n.config[t]===void 0&&n.parent?b(n.parent,t,e):typeof n.config[t]=="function"?n.config[t].bind({...e,parent:n.parent?b(n.parent,t,e):null}):n.config[t]}function q(n){const t=n.filter(s=>s.type==="extension"),e=n.filter(s=>s.type==="node"),r=n.filter(s=>s.type==="mark");return{baseExtensions:t,nodeExtensions:e,markExtensions:r}}function ne(n){const t=[],{nodeExtensions:e,markExtensions:r}=q(n),s=[...e,...r],o={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return n.forEach(i=>{const c={name:i.name,options:i.options,storage:i.storage,extensions:s},a=b(i,"addGlobalAttributes",c);if(!a)return;a().forEach(u=>{u.types.forEach(d=>{Object.entries(u.attributes).forEach(([f,p])=>{t.push({type:d,name:f,attribute:{...o,...p}})})})})}),s.forEach(i=>{const c={name:i.name,options:i.options,storage:i.storage},a=b(i,"addAttributes",c);if(!a)return;const l=a();Object.entries(l).forEach(([u,d])=>{const f={...o,...d};typeof(f==null?void 0:f.default)=="function"&&(f.default=f.default()),f!=null&&f.isRequired&&(f==null?void 0:f.default)===void 0&&delete f.default,t.push({type:i.name,name:u,attribute:f})})}),t}function x(n,t){if(typeof n=="string"){if(!t.nodes[n])throw Error(`There is no node type named '${n}'. Maybe you forgot to add the extension?`);return t.nodes[n]}return n}function re(...n){return n.filter(t=>!!t).reduce((t,e)=>{const r={...t};return Object.entries(e).forEach(([s,o])=>{if(!r[s]){r[s]=o;return}if(s==="class"){const c=o?String(o).split(" "):[],a=r[s]?r[s].split(" "):[],l=c.filter(u=>!a.includes(u));r[s]=[...a,...l].join(" ")}else if(s==="style"){const c=o?o.split(";").map(u=>u.trim()).filter(Boolean):[],a=r[s]?r[s].split(";").map(u=>u.trim()).filter(Boolean):[],l=new Map;a.forEach(u=>{const[d,f]=u.split(":").map(p=>p.trim());l.set(d,f)}),c.forEach(u=>{const[d,f]=u.split(":").map(p=>p.trim());l.set(d,f)}),r[s]=Array.from(l.entries()).map(([u,d])=>`${u}: ${d}`).join("; ")}else r[s]=o}),r},{})}function dt(n,t){return t.filter(e=>e.type===n.type.name).filter(e=>e.attribute.rendered).map(e=>e.attribute.renderHTML?e.attribute.renderHTML(n.attrs)||{}:{[e.name]:n.attrs[e.name]}).reduce((e,r)=>re(e,r),{})}function se(n){return typeof n=="function"}function v(n,t=void 0,...e){return se(n)?t?n.bind(t)(...e):n(...e):n}function Me(n={}){return Object.keys(n).length===0&&n.constructor===Object}function Ee(n){return typeof n!="string"?n:n.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(n):n==="true"?!0:n==="false"?!1:n}function oe(n,t){return"style"in n?n:{...n,getAttrs:e=>{const r=n.getAttrs?n.getAttrs(e):n.attrs;if(r===!1)return!1;const s=t.reduce((o,i)=>{const c=i.attribute.parseHTML?i.attribute.parseHTML(e):Ee(e.getAttribute(i.name));return c==null?o:{...o,[i.name]:c}},{});return{...r,...s}}}}function ie(n){return Object.fromEntries(Object.entries(n).filter(([t,e])=>t==="attrs"&&Me(e)?!1:e!=null))}function Se(n,t){var e;const r=ne(n),{nodeExtensions:s,markExtensions:o}=q(n),i=(e=s.find(l=>b(l,"topNode")))===null||e===void 0?void 0:e.name,c=Object.fromEntries(s.map(l=>{const u=r.filter(y=>y.type===l.name),d={name:l.name,options:l.options,storage:l.storage,editor:t},f=n.reduce((y,w)=>{const M=b(w,"extendNodeSchema",d);return{...y,...M?M(l):{}}},{}),p=ie({...f,content:v(b(l,"content",d)),marks:v(b(l,"marks",d)),group:v(b(l,"group",d)),inline:v(b(l,"inline",d)),atom:v(b(l,"atom",d)),selectable:v(b(l,"selectable",d)),draggable:v(b(l,"draggable",d)),code:v(b(l,"code",d)),whitespace:v(b(l,"whitespace",d)),linebreakReplacement:v(b(l,"linebreakReplacement",d)),defining:v(b(l,"defining",d)),isolating:v(b(l,"isolating",d)),attrs:Object.fromEntries(u.map(y=>{var w;return[y.name,{default:(w=y==null?void 0:y.attribute)===null||w===void 0?void 0:w.default}]}))}),h=v(b(l,"parseHTML",d));h&&(p.parseDOM=h.map(y=>oe(y,u)));const m=b(l,"renderHTML",d);m&&(p.toDOM=y=>m({node:y,HTMLAttributes:dt(y,u)}));const g=b(l,"renderText",d);return g&&(p.toText=g),[l.name,p]})),a=Object.fromEntries(o.map(l=>{const u=r.filter(g=>g.type===l.name),d={name:l.name,options:l.options,storage:l.storage,editor:t},f=n.reduce((g,y)=>{const w=b(y,"extendMarkSchema",d);return{...g,...w?w(l):{}}},{}),p=ie({...f,inclusive:v(b(l,"inclusive",d)),excludes:v(b(l,"excludes",d)),group:v(b(l,"group",d)),spanning:v(b(l,"spanning",d)),code:v(b(l,"code",d)),attrs:Object.fromEntries(u.map(g=>{var y;return[g.name,{default:(y=g==null?void 0:g.attribute)===null||y===void 0?void 0:y.default}]}))}),h=v(b(l,"parseHTML",d));h&&(p.parseDOM=h.map(g=>oe(g,u)));const m=b(l,"renderHTML",d);return m&&(p.toDOM=g=>m({mark:g,HTMLAttributes:dt(g,u)})),[l.name,p]}));return new at({topNode:i,nodes:c,marks:a})}function ut(n,t){return t.nodes[n]||t.marks[n]||null}function ae(n,t){return Array.isArray(t)?t.some(e=>(typeof e=="string"?e:e.name)===n.name):t}function ft(n,t){const e=Ct.fromSchema(t).serializeFragment(n),s=document.implementation.createHTMLDocument().createElement("div");return s.appendChild(e),s.innerHTML}const xe=(n,t=500)=>{let e="";const r=n.parentOffset;return n.parent.nodesBetween(Math.max(0,r-t),r,(s,o,i,c)=>{var a,l;const u=((l=(a=s.type.spec).toText)===null||l===void 0?void 0:l.call(a,{node:s,pos:o,parent:i,index:c}))||s.textContent||"%leaf%";e+=s.isAtom&&!s.isText?u:u.slice(0,Math.max(0,r-o))}),e};function pt(n){return Object.prototype.toString.call(n)==="[object RegExp]"}class G{constructor(t){this.find=t.find,this.handler=t.handler}}const Te=(n,t)=>{if(pt(t))return t.exec(n);const e=t(n);if(!e)return null;const r=[e.text];return r.index=e.index,r.input=n,r.data=e.data,e.replaceWith&&(e.text.includes(e.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(e.replaceWith)),r};function J(n){var t;const{editor:e,from:r,to:s,text:o,rules:i,plugin:c}=n,{view:a}=e;if(a.composing)return!1;const l=a.state.doc.resolve(r);if(l.parent.type.spec.code||!((t=l.nodeBefore||l.nodeAfter)===null||t===void 0)&&t.marks.find(f=>f.type.spec.code))return!1;let u=!1;const d=xe(l)+o;return i.forEach(f=>{if(u)return;const p=Te(d,f.find);if(!p)return;const h=a.state.tr,m=k({state:a.state,transaction:h}),g={from:r-(p[0].length-o.length),to:s},{commands:y,chain:w,can:M}=new U({editor:e,state:m});f.handler({state:m,range:g,match:p,commands:y,chain:w,can:M})===null||!h.steps.length||(h.setMeta(c,{transform:h,from:r,to:s,text:o}),a.dispatch(h),u=!0)}),u}function Ce(n){const{editor:t,rules:e}=n,r=new P({state:{init(){return null},apply(s,o,i){const c=s.getMeta(r);if(c)return c;const a=s.getMeta("applyInputRules");return!!a&&setTimeout(()=>{let{text:u}=a;typeof u=="string"?u=u:u=ft($.from(u),i.schema);const{from:d}=a,f=d+u.length;J({editor:t,from:d,to:f,text:u,rules:e,plugin:r})}),s.selectionSet||s.docChanged?null:o}},props:{handleTextInput(s,o,i,c){return J({editor:t,from:o,to:i,text:c,rules:e,plugin:r})},handleDOMEvents:{compositionend:s=>(setTimeout(()=>{const{$cursor:o}=s.state.selection;o&&J({editor:t,from:o.pos,to:o.pos,text:"",rules:e,plugin:r})}),!1)},handleKeyDown(s,o){if(o.key!=="Enter")return!1;const{$cursor:i}=s.state.selection;return i?J({editor:t,from:i.pos,to:i.pos,text:`
2
- `,rules:e,plugin:r}):!1}},isInputRules:!0});return r}function Ae(n){return Object.prototype.toString.call(n).slice(8,-1)}function X(n){return Ae(n)!=="Object"?!1:n.constructor===Object&&Object.getPrototypeOf(n)===Object.prototype}function Y(n,t){const e={...n};return X(n)&&X(t)&&Object.keys(t).forEach(r=>{X(t[r])&&X(n[r])?e[r]=Y(n[r],t[r]):e[r]=t[r]}),e}class H{constructor(t={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=v(b(this,"addOptions",{name:this.name}))),this.storage=v(b(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new H(t)}configure(t={}){const e=this.extend({...this.config,addOptions:()=>Y(this.options,t)});return e.name=this.name,e.parent=this.parent,e}extend(t={}){const e=new H(t);return e.parent=this,this.child=e,e.name=t.name?t.name:e.parent.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${e.name}".`),e.options=v(b(e,"addOptions",{name:e.name})),e.storage=v(b(e,"addStorage",{name:e.name,options:e.options})),e}static handleExit({editor:t,mark:e}){const{tr:r}=t.state,s=t.state.selection.$from;if(s.pos===s.end()){const i=s.marks();if(!!!i.find(l=>(l==null?void 0:l.type.name)===e.name))return!1;const a=i.find(l=>(l==null?void 0:l.type.name)===e.name);return a&&r.removeStoredMark(a),r.insertText(" ",s.pos),t.view.dispatch(r),!0}return!1}}F("M",H);function Pe(n){return typeof n=="number"}class Oe{constructor(t){this.find=t.find,this.handler=t.handler}}const Ie=(n,t,e)=>{if(pt(t))return[...n.matchAll(t)];const r=t(n,e);return r?r.map(s=>{const o=[s.text];return o.index=s.index,o.input=n,o.data=s.data,s.replaceWith&&(s.text.includes(s.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),o.push(s.replaceWith)),o}):[]};function $e(n){const{editor:t,state:e,from:r,to:s,rule:o,pasteEvent:i,dropEvent:c}=n,{commands:a,chain:l,can:u}=new U({editor:t,state:e}),d=[];return e.doc.nodesBetween(r,s,(p,h)=>{if(!p.isTextblock||p.type.spec.code)return;const m=Math.max(r,h),g=Math.min(s,h+p.content.size),y=p.textBetween(m-h,g-h,void 0,"");Ie(y,o.find,i).forEach(M=>{if(M.index===void 0)return;const S=m+M.index+1,E=S+M[0].length,T={from:e.tr.mapping.map(S),to:e.tr.mapping.map(E)},O=o.handler({state:e,range:T,match:M,commands:a,chain:l,can:u,pasteEvent:i,dropEvent:c});d.push(O)})}),d.every(p=>p!==null)}let Q=null;const Ne=n=>{var t;const e=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(t=e.clipboardData)===null||t===void 0||t.setData("text/html",n),e};function Be(n){const{editor:t,rules:e}=n;let r=null,s=!1,o=!1,i=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,c;try{c=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{c=null}const a=({state:u,from:d,to:f,rule:p,pasteEvt:h})=>{const m=u.tr,g=k({state:u,transaction:m});if(!(!$e({editor:t,state:g,from:Math.max(d-1,0),to:f.b-1,rule:p,pasteEvent:h,dropEvent:c})||!m.steps.length)){try{c=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{c=null}return i=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,m}};return e.map(u=>new P({view(d){const f=h=>{var m;r=!((m=d.dom.parentElement)===null||m===void 0)&&m.contains(h.target)?d.dom.parentElement:null,r&&(Q=t)},p=()=>{Q&&(Q=null)};return window.addEventListener("dragstart",f),window.addEventListener("dragend",p),{destroy(){window.removeEventListener("dragstart",f),window.removeEventListener("dragend",p)}}},props:{handleDOMEvents:{drop:(d,f)=>{if(o=r===d.dom.parentElement,c=f,!o){const p=Q;p&&setTimeout(()=>{const h=p.state.selection;h&&p.commands.deleteRange({from:h.from,to:h.to})},10)}return!1},paste:(d,f)=>{var p;const h=(p=f.clipboardData)===null||p===void 0?void 0:p.getData("text/html");return i=f,s=!!(h!=null&&h.includes("data-pm-slice")),!1}}},appendTransaction:(d,f,p)=>{const h=d[0],m=h.getMeta("uiEvent")==="paste"&&!s,g=h.getMeta("uiEvent")==="drop"&&!o,y=h.getMeta("applyPasteRules"),w=!!y;if(!m&&!g&&!w)return;if(w){let{text:E}=y;typeof E=="string"?E=E:E=ft($.from(E),p.schema);const{from:T}=y,O=T+E.length,I=Ne(E);return a({rule:u,state:p,from:T,to:{b:O},pasteEvt:I})}const M=f.doc.content.findDiffStart(p.doc.content),S=f.doc.content.findDiffEnd(p.doc.content);if(!(!Pe(M)||!S||M===S.b))return a({rule:u,state:p,from:M,to:S,pasteEvt:i})}}))}function je(n){const t=n.filter((e,r)=>n.indexOf(e)!==r);return Array.from(new Set(t))}class z{constructor(t,e){this.splittableMarks=[],this.editor=e,this.extensions=z.resolve(t),this.schema=Se(this.extensions,e),this.setupExtensions()}static resolve(t){const e=z.sort(z.flatten(t)),r=je(e.map(s=>s.name));return r.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${r.map(s=>`'${s}'`).join(", ")}]. This can lead to issues.`),e}static flatten(t){return t.map(e=>{const r={name:e.name,options:e.options,storage:e.storage},s=b(e,"addExtensions",r);return s?[e,...this.flatten(s())]:e}).flat(10)}static sort(t){return t.sort((r,s)=>{const o=b(r,"priority")||100,i=b(s,"priority")||100;return o>i?-1:o<i?1:0})}get commands(){return this.extensions.reduce((t,e)=>{const r={name:e.name,options:e.options,storage:e.storage,editor:this.editor,type:ut(e.name,this.schema)},s=b(e,"addCommands",r);return s?{...t,...s()}:t},{})}get plugins(){const{editor:t}=this,e=z.sort([...this.extensions].reverse()),r=[],s=[],o=e.map(i=>{const c={name:i.name,options:i.options,storage:i.storage,editor:t,type:ut(i.name,this.schema)},a=[],l=b(i,"addKeyboardShortcuts",c);let u={};if(i.type==="mark"&&b(i,"exitable",c)&&(u.ArrowRight=()=>H.handleExit({editor:t,mark:i})),l){const m=Object.fromEntries(Object.entries(l()).map(([g,y])=>[g,()=>y({editor:t})]));u={...u,...m}}const d=Tt(u);a.push(d);const f=b(i,"addInputRules",c);ae(i,t.options.enableInputRules)&&f&&r.push(...f());const p=b(i,"addPasteRules",c);ae(i,t.options.enablePasteRules)&&p&&s.push(...p());const h=b(i,"addProseMirrorPlugins",c);if(h){const m=h();a.push(...m)}return a}).flat();return[Ce({editor:t,rules:r}),...Be({editor:t,rules:s}),...o]}get attributes(){return ne(this.extensions)}get nodeViews(){const{editor:t}=this,{nodeExtensions:e}=q(this.extensions);return Object.fromEntries(e.filter(r=>!!b(r,"addNodeView")).map(r=>{const s=this.attributes.filter(a=>a.type===r.name),o={name:r.name,options:r.options,storage:r.storage,editor:t,type:x(r.name,this.schema)},i=b(r,"addNodeView",o);if(!i)return[];const c=(a,l,u,d,f)=>{const p=dt(a,s);return i()({node:a,view:l,getPos:u,decorations:d,innerDecorations:f,editor:t,extension:r,HTMLAttributes:p})};return[r.name,c]}))}setupExtensions(){this.extensions.forEach(t=>{var e;this.editor.extensionStorage[t.name]=t.storage;const r={name:t.name,options:t.options,storage:t.storage,editor:this.editor,type:ut(t.name,this.schema)};t.type==="mark"&&(!((e=v(b(t,"keepOnSplit",r)))!==null&&e!==void 0)||e)&&this.splittableMarks.push(t.name);const s=b(t,"onBeforeCreate",r),o=b(t,"onCreate",r),i=b(t,"onUpdate",r),c=b(t,"onSelectionUpdate",r),a=b(t,"onTransaction",r),l=b(t,"onFocus",r),u=b(t,"onBlur",r),d=b(t,"onDestroy",r);s&&this.editor.on("beforeCreate",s),o&&this.editor.on("create",o),i&&this.editor.on("update",i),c&&this.editor.on("selectionUpdate",c),a&&this.editor.on("transaction",a),l&&this.editor.on("focus",l),u&&this.editor.on("blur",u),d&&this.editor.on("destroy",d)})}}class C{constructor(t={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=v(b(this,"addOptions",{name:this.name}))),this.storage=v(b(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new C(t)}configure(t={}){const e=this.extend({...this.config,addOptions:()=>Y(this.options,t)});return e.name=this.name,e.parent=this.parent,e}extend(t={}){const e=new C({...this.config,...t});return e.parent=this,this.child=e,e.name=t.name?t.name:e.parent.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${e.name}".`),e.options=v(b(e,"addOptions",{name:e.name})),e.storage=v(b(e,"addStorage",{name:e.name,options:e.options})),e}}F("E",C);function ce(n,t,e){const{from:r,to:s}=t,{blockSeparator:o=`
3
-
4
- `,textSerializers:i={}}=e||{};let c="";return n.nodesBetween(r,s,(a,l,u,d)=>{var f;a.isBlock&&l>r&&(c+=o);const p=i==null?void 0:i[a.type.name];if(p)return u&&(c+=p({node:a,pos:l,parent:u,index:d,range:t})),!1;a.isText&&(c+=(f=a==null?void 0:a.text)===null||f===void 0?void 0:f.slice(Math.max(r,l)-l,s-l))}),c}function ht(n){return Object.fromEntries(Object.entries(n.nodes).filter(([,t])=>t.spec.toText).map(([t,e])=>[t,e.spec.toText]))}const De=C.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new P({key:new B("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:n}=this,{state:t,schema:e}=n,{doc:r,selection:s}=t,{ranges:o}=s,i=Math.min(...o.map(u=>u.$from.pos)),c=Math.max(...o.map(u=>u.$to.pos)),a=ht(e);return ce(r,{from:i,to:c},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:a})}}})]}}),Re=()=>({editor:n,view:t})=>(requestAnimationFrame(()=>{var e;n.isDestroyed||(t.dom.blur(),(e=window==null?void 0:window.getSelection())===null||e===void 0||e.removeAllRanges())}),!0),Fe=(n=!1)=>({commands:t})=>t.setContent("",n),Le=()=>({state:n,tr:t,dispatch:e})=>{const{selection:r}=t,{ranges:s}=r;return e&&s.forEach(({$from:o,$to:i})=>{n.doc.nodesBetween(o.pos,i.pos,(c,a)=>{if(c.type.isText)return;const{doc:l,mapping:u}=t,d=l.resolve(u.map(a)),f=l.resolve(u.map(a+c.nodeSize)),p=d.blockRange(f);if(!p)return;const h=$t(p);if(c.type.isTextblock){const{defaultType:m}=d.parent.contentMatchAt(d.index());t.setNodeMarkup(p.start,m)}(h||h===0)&&t.lift(p,h)})}),!0},ze=n=>t=>n(t),_e=()=>({state:n,dispatch:t})=>Qt(n,t),He=(n,t)=>({editor:e,tr:r})=>{const{state:s}=e,o=s.doc.slice(n.from,n.to);r.deleteRange(n.from,n.to);const i=r.mapping.map(t);return r.insert(i,o.content),r.setSelection(new A(r.doc.resolve(i-1))),!0},Ve=()=>({tr:n,dispatch:t})=>{const{selection:e}=n,r=e.$anchor.node();if(r.content.size>0)return!1;const s=n.selection.$anchor;for(let o=s.depth;o>0;o-=1)if(s.node(o).type===r.type){if(t){const c=s.before(o),a=s.after(o);n.delete(c,a).scrollIntoView()}return!0}return!1},We=n=>({tr:t,state:e,dispatch:r})=>{const s=x(n,e.schema),o=t.selection.$anchor;for(let i=o.depth;i>0;i-=1)if(o.node(i).type===s){if(r){const a=o.before(i),l=o.after(i);t.delete(a,l).scrollIntoView()}return!0}return!1},Ke=n=>({tr:t,dispatch:e})=>{const{from:r,to:s}=n;return e&&t.delete(r,s),!0},Ue=()=>({state:n,dispatch:t})=>Yt(n,t),qe=()=>({commands:n})=>n.keyboardShortcut("Enter"),Ge=()=>({state:n,dispatch:t})=>Xt(n,t);function Z(n,t,e={strict:!0}){const r=Object.keys(t);return r.length?r.every(s=>e.strict?t[s]===n[s]:pt(t[s])?t[s].test(n[s]):t[s]===n[s]):!0}function le(n,t,e={}){return n.find(r=>r.type===t&&Z(Object.fromEntries(Object.keys(e).map(s=>[s,r.attrs[s]])),e))}function de(n,t,e={}){return!!le(n,t,e)}function mt(n,t,e){var r;if(!n||!t)return;let s=n.parent.childAfter(n.parentOffset);if((!s.node||!s.node.marks.some(u=>u.type===t))&&(s=n.parent.childBefore(n.parentOffset)),!s.node||!s.node.marks.some(u=>u.type===t)||(e=e||((r=s.node.marks[0])===null||r===void 0?void 0:r.attrs),!le([...s.node.marks],t,e)))return;let i=s.index,c=n.start()+s.offset,a=i+1,l=c+s.node.nodeSize;for(;i>0&&de([...n.parent.child(i-1).marks],t,e);)i-=1,c-=n.parent.child(i).nodeSize;for(;a<n.parent.childCount&&de([...n.parent.child(a).marks],t,e);)l+=n.parent.child(a).nodeSize,a+=1;return{from:c,to:l}}function j(n,t){if(typeof n=="string"){if(!t.marks[n])throw Error(`There is no mark type named '${n}'. Maybe you forgot to add the extension?`);return t.marks[n]}return n}const Je=(n,t={})=>({tr:e,state:r,dispatch:s})=>{const o=j(n,r.schema),{doc:i,selection:c}=e,{$from:a,from:l,to:u}=c;if(s){const d=mt(a,o,t);if(d&&d.from<=l&&d.to>=u){const f=A.create(i,d.from,d.to);e.setSelection(f)}}return!0},Xe=n=>t=>{const e=typeof n=="function"?n(t):n;for(let r=0;r<e.length;r+=1)if(e[r](t))return!0;return!1};function gt(n){return n instanceof A}function N(n=0,t=0,e=0){return Math.min(Math.max(n,t),e)}function ue(n,t=null){if(!t)return null;const e=D.atStart(n),r=D.atEnd(n);if(t==="start"||t===!0)return e;if(t==="end")return r;const s=e.from,o=r.to;return t==="all"?A.create(n,N(0,s,o),N(n.content.size,s,o)):A.create(n,N(t,s,o),N(t,s,o))}function fe(){return navigator.platform==="Android"||/android/i.test(navigator.userAgent)}function tt(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}const Ye=(n=null,t={})=>({editor:e,view:r,tr:s,dispatch:o})=>{t={scrollIntoView:!0,...t};const i=()=>{(tt()||fe())&&r.dom.focus(),requestAnimationFrame(()=>{e.isDestroyed||(r.focus(),t!=null&&t.scrollIntoView&&e.commands.scrollIntoView())})};if(r.hasFocus()&&n===null||n===!1)return!0;if(o&&n===null&&!gt(e.state.selection))return i(),!0;const c=ue(s.doc,n)||e.state.selection,a=e.state.selection.eq(c);return o&&(a||s.setSelection(c),a&&s.storedMarks&&s.setStoredMarks(s.storedMarks),i()),!0},Qe=(n,t)=>e=>n.every((r,s)=>t(r,{...e,index:s})),Ze=(n,t)=>({tr:e,commands:r})=>r.insertContentAt({from:e.selection.from,to:e.selection.to},n,t),pe=n=>{const t=n.childNodes;for(let e=t.length-1;e>=0;e-=1){const r=t[e];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?n.removeChild(r):r.nodeType===1&&pe(r)}return n};function et(n){const t=`<body>${n}</body>`,e=new window.DOMParser().parseFromString(t,"text/html").body;return pe(e)}function nt(n,t,e){if(n instanceof At||n instanceof $)return n;e={slice:!0,parseOptions:{},...e};const r=typeof n=="object"&&n!==null,s=typeof n=="string";if(r)try{if(Array.isArray(n)&&n.length>0)return $.fromArray(n.map(c=>t.nodeFromJSON(c)));const i=t.nodeFromJSON(n);return e.errorOnInvalidContent&&i.check(),i}catch(o){if(e.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:o});return console.warn("[tiptap warn]: Invalid content.","Passed value:",n,"Error:",o),nt("",t,e)}if(s){if(e.errorOnInvalidContent){let i=!1,c="";const a=new at({topNode:t.spec.topNode,marks:t.spec.marks,nodes:t.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:l=>(i=!0,c=typeof l=="string"?l:l.outerHTML,null)}]}})});if(e.slice?W.fromSchema(a).parseSlice(et(n),e.parseOptions):W.fromSchema(a).parse(et(n),e.parseOptions),e.errorOnInvalidContent&&i)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${c}`)})}const o=W.fromSchema(t);return e.slice?o.parseSlice(et(n),e.parseOptions).content:o.parse(et(n),e.parseOptions)}return nt("",t,e)}function tn(n,t,e){const r=n.steps.length-1;if(r<t)return;const s=n.steps[r];if(!(s instanceof Nt||s instanceof Bt))return;const o=n.mapping.maps[r];let i=0;o.forEach((c,a,l,u)=>{i===0&&(i=u)}),n.setSelection(D.near(n.doc.resolve(i),e))}const en=n=>!("type"in n),nn=(n,t,e)=>({tr:r,dispatch:s,editor:o})=>{var i;if(s){e={parseOptions:o.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...e};let c;try{c=nt(t,o.schema,{parseOptions:{preserveWhitespace:"full",...e.parseOptions},errorOnInvalidContent:(i=e.errorOnInvalidContent)!==null&&i!==void 0?i:o.options.enableContentCheck})}catch(h){return o.emit("contentError",{editor:o,error:h,disableCollaboration:()=>{o.storage.collaboration&&(o.storage.collaboration.isDisabled=!0)}}),!1}let{from:a,to:l}=typeof n=="number"?{from:n,to:n}:{from:n.from,to:n.to},u=!0,d=!0;if((en(c)?c:[c]).forEach(h=>{h.check(),u=u?h.isText&&h.marks.length===0:!1,d=d?h.isBlock:!1}),a===l&&d){const{parent:h}=r.doc.resolve(a);h.isTextblock&&!h.type.spec.code&&!h.childCount&&(a-=1,l+=1)}let p;if(u){if(Array.isArray(t))p=t.map(h=>h.text||"").join("");else if(t instanceof $){let h="";t.forEach(m=>{m.text&&(h+=m.text)}),p=h}else typeof t=="object"&&t&&t.text?p=t.text:p=t;r.insertText(p,a,l)}else p=c,r.replaceWith(a,l,p);e.updateSelection&&tn(r,r.steps.length-1,-1),e.applyInputRules&&r.setMeta("applyInputRules",{from:a,text:p}),e.applyPasteRules&&r.setMeta("applyPasteRules",{from:a,text:p})}return!0},rn=()=>({state:n,dispatch:t})=>Wt(n,t),sn=()=>({state:n,dispatch:t})=>Gt(n,t),on=()=>({state:n,dispatch:t})=>Jt(n,t),an=()=>({state:n,dispatch:t})=>qt(n,t),cn=()=>({state:n,dispatch:t,tr:e})=>{try{const r=ct(n.doc,n.selection.$from.pos,-1);return r==null?!1:(e.join(r,2),t&&t(e),!0)}catch{return!1}},ln=()=>({state:n,dispatch:t,tr:e})=>{try{const r=ct(n.doc,n.selection.$from.pos,1);return r==null?!1:(e.join(r,2),t&&t(e),!0)}catch{return!1}},dn=()=>({state:n,dispatch:t})=>Ut(n,t),un=()=>({state:n,dispatch:t})=>Kt(n,t);function he(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function fn(n){const t=n.split(/-(?!$)/);let e=t[t.length-1];e==="Space"&&(e=" ");let r,s,o,i;for(let c=0;c<t.length-1;c+=1){const a=t[c];if(/^(cmd|meta|m)$/i.test(a))i=!0;else if(/^a(lt)?$/i.test(a))r=!0;else if(/^(c|ctrl|control)$/i.test(a))s=!0;else if(/^s(hift)?$/i.test(a))o=!0;else if(/^mod$/i.test(a))tt()||he()?i=!0:s=!0;else throw new Error(`Unrecognized modifier name: ${a}`)}return r&&(e=`Alt-${e}`),s&&(e=`Ctrl-${e}`),i&&(e=`Meta-${e}`),o&&(e=`Shift-${e}`),e}const pn=n=>({editor:t,view:e,tr:r,dispatch:s})=>{const o=fn(n).split(/-(?!$)/),i=o.find(l=>!["Alt","Ctrl","Meta","Shift"].includes(l)),c=new KeyboardEvent("keydown",{key:i==="Space"?" ":i,altKey:o.includes("Alt"),ctrlKey:o.includes("Ctrl"),metaKey:o.includes("Meta"),shiftKey:o.includes("Shift"),bubbles:!0,cancelable:!0}),a=t.captureTransaction(()=>{e.someProp("handleKeyDown",l=>l(e,c))});return a==null||a.steps.forEach(l=>{const u=l.map(r.mapping);u&&s&&r.maybeStep(u)}),!0};function V(n,t,e={}){const{from:r,to:s,empty:o}=n.selection,i=t?x(t,n.schema):null,c=[];n.doc.nodesBetween(r,s,(d,f)=>{if(d.isText)return;const p=Math.max(r,f),h=Math.min(s,f+d.nodeSize);c.push({node:d,from:p,to:h})});const a=s-r,l=c.filter(d=>i?i.name===d.node.type.name:!0).filter(d=>Z(d.node.attrs,e,{strict:!1}));return o?!!l.length:l.reduce((d,f)=>d+f.to-f.from,0)>=a}const hn=(n,t={})=>({state:e,dispatch:r})=>{const s=x(n,e.schema);return V(e,s,t)?Vt(e,r):!1},mn=()=>({state:n,dispatch:t})=>Ht(n,t),gn=n=>({state:t,dispatch:e})=>{const r=x(n,t.schema);return ee(r)(t,e)},yn=()=>({state:n,dispatch:t})=>_t(n,t);function rt(n,t){return t.nodes[n]?"node":t.marks[n]?"mark":null}function me(n,t){const e=typeof t=="string"?[t]:t;return Object.keys(n).reduce((r,s)=>(e.includes(s)||(r[s]=n[s]),r),{})}const bn=(n,t)=>({tr:e,state:r,dispatch:s})=>{let o=null,i=null;const c=rt(typeof n=="string"?n:n.name,r.schema);return c?(c==="node"&&(o=x(n,r.schema)),c==="mark"&&(i=j(n,r.schema)),s&&e.selection.ranges.forEach(a=>{r.doc.nodesBetween(a.$from.pos,a.$to.pos,(l,u)=>{o&&o===l.type&&e.setNodeMarkup(u,void 0,me(l.attrs,t)),i&&l.marks.length&&l.marks.forEach(d=>{i===d.type&&e.addMark(u,u+l.nodeSize,i.create(me(d.attrs,t)))})})}),!0):!1},kn=()=>({tr:n,dispatch:t})=>(t&&n.scrollIntoView(),!0),vn=()=>({tr:n,dispatch:t})=>{if(t){const e=new St(n.doc);n.setSelection(e)}return!0},wn=()=>({state:n,dispatch:t})=>zt(n,t),Mn=()=>({state:n,dispatch:t})=>Lt(n,t),En=()=>({state:n,dispatch:t})=>Ft(n,t),Sn=()=>({state:n,dispatch:t})=>Rt(n,t),xn=()=>({state:n,dispatch:t})=>Dt(n,t);function yt(n,t,e={},r={}){return nt(n,t,{slice:!1,parseOptions:e,errorOnInvalidContent:r.errorOnInvalidContent})}const Tn=(n,t=!1,e={},r={})=>({editor:s,tr:o,dispatch:i,commands:c})=>{var a,l;const{doc:u}=o;if(e.preserveWhitespace!=="full"){const d=yt(n,s.schema,e,{errorOnInvalidContent:(a=r.errorOnInvalidContent)!==null&&a!==void 0?a:s.options.enableContentCheck});return i&&o.replaceWith(0,u.content.size,d).setMeta("preventUpdate",!t),!0}return i&&o.setMeta("preventUpdate",!t),c.insertContentAt({from:0,to:u.content.size},n,{parseOptions:e,errorOnInvalidContent:(l=r.errorOnInvalidContent)!==null&&l!==void 0?l:s.options.enableContentCheck})};function ge(n,t){const e=j(t,n.schema),{from:r,to:s,empty:o}=n.selection,i=[];o?(n.storedMarks&&i.push(...n.storedMarks),i.push(...n.selection.$head.marks())):n.doc.nodesBetween(r,s,a=>{i.push(...a.marks)});const c=i.find(a=>a.type.name===e.name);return c?{...c.attrs}:{}}function Cn(n,t){const e=new It(n);return t.forEach(r=>{r.steps.forEach(s=>{e.step(s)})}),e}function An(n){for(let t=0;t<n.edgeCount;t+=1){const{type:e}=n.edge(t);if(e.isTextblock&&!e.hasRequiredAttrs())return e}return null}function Pn(n,t,e){const r=[];return n.nodesBetween(t.from,t.to,(s,o)=>{e(s)&&r.push({node:s,pos:o})}),r}function On(n,t){for(let e=n.depth;e>0;e-=1){const r=n.node(e);if(t(r))return{pos:e>0?n.before(e):0,start:n.start(e),depth:e,node:r}}}function bt(n){return t=>On(t.$from,n)}function ye(n,t){const e={from:0,to:n.content.size};return ce(n,e,t)}function In(n,t){const e=x(t,n.schema),{from:r,to:s}=n.selection,o=[];n.doc.nodesBetween(r,s,c=>{o.push(c)});const i=o.reverse().find(c=>c.type.name===e.name);return i?{...i.attrs}:{}}function be(n,t){const e=rt(typeof t=="string"?t:t.name,n.schema);return e==="node"?In(n,t):e==="mark"?ge(n,t):{}}function $n(n,t=JSON.stringify){const e={};return n.filter(r=>{const s=t(r);return Object.prototype.hasOwnProperty.call(e,s)?!1:e[s]=!0})}function Nn(n){const t=$n(n);return t.length===1?t:t.filter((e,r)=>!t.filter((o,i)=>i!==r).some(o=>e.oldRange.from>=o.oldRange.from&&e.oldRange.to<=o.oldRange.to&&e.newRange.from>=o.newRange.from&&e.newRange.to<=o.newRange.to))}function Bn(n){const{mapping:t,steps:e}=n,r=[];return t.maps.forEach((s,o)=>{const i=[];if(s.ranges.length)s.forEach((c,a)=>{i.push({from:c,to:a})});else{const{from:c,to:a}=e[o];if(c===void 0||a===void 0)return;i.push({from:c,to:a})}i.forEach(({from:c,to:a})=>{const l=t.slice(o).map(c,-1),u=t.slice(o).map(a),d=t.invert().map(l,-1),f=t.invert().map(u);r.push({oldRange:{from:d,to:f},newRange:{from:l,to:u}})})}),Nn(r)}function kt(n,t,e){const r=[];return n===t?e.resolve(n).marks().forEach(s=>{const o=e.resolve(n),i=mt(o,s.type);i&&r.push({mark:s,...i})}):e.nodesBetween(n,t,(s,o)=>{!s||(s==null?void 0:s.nodeSize)===void 0||r.push(...s.marks.map(i=>({from:o,to:o+s.nodeSize,mark:i})))}),r}function st(n,t,e){return Object.fromEntries(Object.entries(e).filter(([r])=>{const s=n.find(o=>o.type===t&&o.name===r);return s?s.attribute.keepOnSplit:!1}))}function vt(n,t,e={}){const{empty:r,ranges:s}=n.selection,o=t?j(t,n.schema):null;if(r)return!!(n.storedMarks||n.selection.$from.marks()).filter(d=>o?o.name===d.type.name:!0).find(d=>Z(d.attrs,e,{strict:!1}));let i=0;const c=[];if(s.forEach(({$from:d,$to:f})=>{const p=d.pos,h=f.pos;n.doc.nodesBetween(p,h,(m,g)=>{if(!m.isText&&!m.marks.length)return;const y=Math.max(p,g),w=Math.min(h,g+m.nodeSize),M=w-y;i+=M,c.push(...m.marks.map(S=>({mark:S,from:y,to:w})))})}),i===0)return!1;const a=c.filter(d=>o?o.name===d.mark.type.name:!0).filter(d=>Z(d.mark.attrs,e,{strict:!1})).reduce((d,f)=>d+f.to-f.from,0),l=c.filter(d=>o?d.mark.type!==o&&d.mark.type.excludes(o):!0).reduce((d,f)=>d+f.to-f.from,0);return(a>0?a+l:a)>=i}function jn(n,t,e={}){if(!t)return V(n,null,e)||vt(n,null,e);const r=rt(t,n.schema);return r==="node"?V(n,t,e):r==="mark"?vt(n,t,e):!1}function ke(n,t){const{nodeExtensions:e}=q(t),r=e.find(i=>i.name===n);if(!r)return!1;const s={name:r.name,options:r.options,storage:r.storage},o=v(b(r,"group",s));return typeof o!="string"?!1:o.split(" ").includes("list")}function ot(n,{checkChildren:t=!0,ignoreWhitespace:e=!1}={}){var r;if(e){if(n.type.name==="hardBreak")return!0;if(n.isText)return/^\s*$/m.test((r=n.text)!==null&&r!==void 0?r:"")}if(n.isText)return!n.text;if(n.isAtom||n.isLeaf)return!1;if(n.content.childCount===0)return!0;if(t){let s=!0;return n.content.forEach(o=>{s!==!1&&(ot(o,{ignoreWhitespace:e,checkChildren:t})||(s=!1))}),s}return!1}function Dn(n){return n instanceof L}function Rn(n,t,e){const s=n.state.doc.content.size,o=N(t,0,s),i=N(e,0,s),c=n.coordsAtPos(o),a=n.coordsAtPos(i,-1),l=Math.min(c.top,a.top),u=Math.max(c.bottom,a.bottom),d=Math.min(c.left,a.left),f=Math.max(c.right,a.right),p=f-d,h=u-l,y={top:l,bottom:u,left:d,right:f,width:p,height:h,x:d,y:l};return{...y,toJSON:()=>y}}function Fn(n,t,e){var r;const{selection:s}=t;let o=null;if(gt(s)&&(o=s.$cursor),o){const c=(r=n.storedMarks)!==null&&r!==void 0?r:o.marks();return!!e.isInSet(c)||!c.some(a=>a.type.excludes(e))}const{ranges:i}=s;return i.some(({$from:c,$to:a})=>{let l=c.depth===0?n.doc.inlineContent&&n.doc.type.allowsMarkType(e):!1;return n.doc.nodesBetween(c.pos,a.pos,(u,d,f)=>{if(l)return!1;if(u.isInline){const p=!f||f.type.allowsMarkType(e),h=!!e.isInSet(u.marks)||!u.marks.some(m=>m.type.excludes(e));l=p&&h}return!l}),l})}const Ln=(n,t={})=>({tr:e,state:r,dispatch:s})=>{const{selection:o}=e,{empty:i,ranges:c}=o,a=j(n,r.schema);if(s)if(i){const l=ge(r,a);e.addStoredMark(a.create({...l,...t}))}else c.forEach(l=>{const u=l.$from.pos,d=l.$to.pos;r.doc.nodesBetween(u,d,(f,p)=>{const h=Math.max(p,u),m=Math.min(p+f.nodeSize,d);f.marks.find(y=>y.type===a)?f.marks.forEach(y=>{a===y.type&&e.addMark(h,m,a.create({...y.attrs,...t}))}):e.addMark(h,m,a.create(t))})});return Fn(r,e,a)},zn=(n,t)=>({tr:e})=>(e.setMeta(n,t),!0),_n=(n,t={})=>({state:e,dispatch:r,chain:s})=>{const o=x(n,e.schema);let i;return e.selection.$anchor.sameParent(e.selection.$head)&&(i=e.selection.$anchor.parent.attrs),o.isTextblock?s().command(({commands:c})=>lt(o,{...i,...t})(e)?!0:c.clearNodes()).command(({state:c})=>lt(o,{...i,...t})(c,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},Hn=n=>({tr:t,dispatch:e})=>{if(e){const{doc:r}=t,s=N(n,0,r.content.size),o=L.create(r,s);t.setSelection(o)}return!0},Vn=n=>({tr:t,dispatch:e})=>{if(e){const{doc:r}=t,{from:s,to:o}=typeof n=="number"?{from:n,to:n}:n,i=A.atStart(r).from,c=A.atEnd(r).to,a=N(s,i,c),l=N(o,i,c),u=A.create(r,a,l);t.setSelection(u)}return!0},Wn=n=>({state:t,dispatch:e})=>{const r=x(n,t.schema);return te(r)(t,e)};function ve(n,t){const e=n.storedMarks||n.selection.$to.parentOffset&&n.selection.$from.marks();if(e){const r=e.filter(s=>t==null?void 0:t.includes(s.type.name));n.tr.ensureMarks(r)}}const Kn=({keepMarks:n=!0}={})=>({tr:t,state:e,dispatch:r,editor:s})=>{const{selection:o,doc:i}=t,{$from:c,$to:a}=o,l=s.extensionManager.attributes,u=st(l,c.node().type.name,c.node().attrs);if(o instanceof L&&o.node.isBlock)return!c.parentOffset||!_(i,c.pos)?!1:(r&&(n&&ve(e,s.extensionManager.splittableMarks),t.split(c.pos).scrollIntoView()),!0);if(!c.parent.isBlock)return!1;const d=a.parentOffset===a.parent.content.size,f=c.depth===0?void 0:An(c.node(-1).contentMatchAt(c.indexAfter(-1)));let p=d&&f?[{type:f,attrs:u}]:void 0,h=_(t.doc,t.mapping.map(c.pos),1,p);if(!p&&!h&&_(t.doc,t.mapping.map(c.pos),1,f?[{type:f}]:void 0)&&(h=!0,p=f?[{type:f,attrs:u}]:void 0),r){if(h&&(o instanceof A&&t.deleteSelection(),t.split(t.mapping.map(c.pos),1,p),f&&!d&&!c.parentOffset&&c.parent.type!==f)){const m=t.mapping.map(c.before()),g=t.doc.resolve(m);c.node(-1).canReplaceWith(g.index(),g.index()+1,f)&&t.setNodeMarkup(t.mapping.map(c.before()),f)}n&&ve(e,s.extensionManager.splittableMarks),t.scrollIntoView()}return h},Un=(n,t={})=>({tr:e,state:r,dispatch:s,editor:o})=>{var i;const c=x(n,r.schema),{$from:a,$to:l}=r.selection,u=r.selection.node;if(u&&u.isBlock||a.depth<2||!a.sameParent(l))return!1;const d=a.node(-1);if(d.type!==c)return!1;const f=o.extensionManager.attributes;if(a.parent.content.size===0&&a.node(-1).childCount===a.indexAfter(-1)){if(a.depth===2||a.node(-3).type!==c||a.index(-2)!==a.node(-2).childCount-1)return!1;if(s){let y=$.empty;const w=a.index(-1)?1:a.index(-2)?2:3;for(let I=a.depth-w;I>=a.depth-3;I-=1)y=$.from(a.node(I).copy(y));const M=a.indexAfter(-1)<a.node(-2).childCount?1:a.indexAfter(-2)<a.node(-3).childCount?2:3,S={...st(f,a.node().type.name,a.node().attrs),...t},E=((i=c.contentMatch.defaultType)===null||i===void 0?void 0:i.createAndFill(S))||void 0;y=y.append($.from(c.createAndFill(null,E)||void 0));const T=a.before(a.depth-(w-1));e.replace(T,a.after(-M),new Pt(y,4-w,0));let O=-1;e.doc.nodesBetween(T,e.doc.content.size,(I,ur)=>{if(O>-1)return!1;I.isTextblock&&I.content.size===0&&(O=ur+1)}),O>-1&&e.setSelection(A.near(e.doc.resolve(O))),e.scrollIntoView()}return!0}const p=l.pos===a.end()?d.contentMatchAt(0).defaultType:null,h={...st(f,d.type.name,d.attrs),...t},m={...st(f,a.node().type.name,a.node().attrs),...t};e.delete(a.pos,l.pos);const g=p?[{type:c,attrs:h},{type:p,attrs:m}]:[{type:c,attrs:h}];if(!_(e.doc,a.pos,2))return!1;if(s){const{selection:y,storedMarks:w}=r,{splittableMarks:M}=o.extensionManager,S=w||y.$to.parentOffset&&y.$from.marks();if(e.split(a.pos,2,g).scrollIntoView(),!S||!s)return!0;const E=S.filter(T=>M.includes(T.type.name));e.ensureMarks(E)}return!0},wt=(n,t)=>{const e=bt(i=>i.type===t)(n.selection);if(!e)return!0;const r=n.doc.resolve(Math.max(0,e.pos-1)).before(e.depth);if(r===void 0)return!0;const s=n.doc.nodeAt(r);return e.node.type===(s==null?void 0:s.type)&&K(n.doc,e.pos)&&n.join(e.pos),!0},Mt=(n,t)=>{const e=bt(i=>i.type===t)(n.selection);if(!e)return!0;const r=n.doc.resolve(e.start).after(e.depth);if(r===void 0)return!0;const s=n.doc.nodeAt(r);return e.node.type===(s==null?void 0:s.type)&&K(n.doc,r)&&n.join(r),!0};var qn=Object.freeze({__proto__:null,blur:Re,clearContent:Fe,clearNodes:Le,command:ze,createParagraphNear:_e,cut:He,deleteCurrentNode:Ve,deleteNode:We,deleteRange:Ke,deleteSelection:Ue,enter:qe,exitCode:Ge,extendMarkRange:Je,first:Xe,focus:Ye,forEach:Qe,insertContent:Ze,insertContentAt:nn,joinBackward:on,joinDown:sn,joinForward:an,joinItemBackward:cn,joinItemForward:ln,joinTextblockBackward:dn,joinTextblockForward:un,joinUp:rn,keyboardShortcut:pn,lift:hn,liftEmptyBlock:mn,liftListItem:gn,newlineInCode:yn,resetAttributes:bn,scrollIntoView:kn,selectAll:vn,selectNodeBackward:wn,selectNodeForward:Mn,selectParentNode:En,selectTextblockEnd:Sn,selectTextblockStart:xn,setContent:Tn,setMark:Ln,setMeta:zn,setNode:_n,setNodeSelection:Hn,setTextSelection:Vn,sinkListItem:Wn,splitBlock:Kn,splitListItem:Un,toggleList:(n,t,e,r={})=>({editor:s,tr:o,state:i,dispatch:c,chain:a,commands:l,can:u})=>{const{extensions:d,splittableMarks:f}=s.extensionManager,p=x(n,i.schema),h=x(t,i.schema),{selection:m,storedMarks:g}=i,{$from:y,$to:w}=m,M=y.blockRange(w),S=g||m.$to.parentOffset&&m.$from.marks();if(!M)return!1;const E=bt(T=>ke(T.type.name,d))(m);if(M.depth>=1&&E&&M.depth-E.depth<=1){if(E.node.type===p)return l.liftListItem(h);if(ke(E.node.type.name,d)&&p.validContent(E.node.content)&&c)return a().command(()=>(o.setNodeMarkup(E.pos,p),!0)).command(()=>wt(o,p)).command(()=>Mt(o,p)).run()}return!e||!S||!c?a().command(()=>u().wrapInList(p,r)?!0:l.clearNodes()).wrapInList(p,r).command(()=>wt(o,p)).command(()=>Mt(o,p)).run():a().command(()=>{const T=u().wrapInList(p,r),O=S.filter(I=>f.includes(I.type.name));return o.ensureMarks(O),T?!0:l.clearNodes()}).wrapInList(p,r).command(()=>wt(o,p)).command(()=>Mt(o,p)).run()},toggleMark:(n,t={},e={})=>({state:r,commands:s})=>{const{extendEmptyMarkRange:o=!1}=e,i=j(n,r.schema);return vt(r,i,t)?s.unsetMark(i,{extendEmptyMarkRange:o}):s.setMark(i,t)},toggleNode:(n,t,e={})=>({state:r,commands:s})=>{const o=x(n,r.schema),i=x(t,r.schema),c=V(r,o,e);let a;return r.selection.$anchor.sameParent(r.selection.$head)&&(a=r.selection.$anchor.parent.attrs),c?s.setNode(i,a):s.setNode(o,{...a,...e})},toggleWrap:(n,t={})=>({state:e,commands:r})=>{const s=x(n,e.schema);return V(e,s,t)?r.lift(s):r.wrapIn(s,t)},undoInputRule:()=>({state:n,dispatch:t})=>{const e=n.plugins;for(let r=0;r<e.length;r+=1){const s=e[r];let o;if(s.spec.isInputRules&&(o=s.getState(n))){if(t){const i=n.tr,c=o.transform;for(let a=c.steps.length-1;a>=0;a-=1)i.step(c.steps[a].invert(c.docs[a]));if(o.text){const a=i.doc.resolve(o.from).marks();i.replaceWith(o.from,o.to,n.schema.text(o.text,a))}else i.delete(o.from,o.to)}return!0}}return!1},unsetAllMarks:()=>({tr:n,dispatch:t})=>{const{selection:e}=n,{empty:r,ranges:s}=e;return r||t&&s.forEach(o=>{n.removeMark(o.$from.pos,o.$to.pos)}),!0},unsetMark:(n,t={})=>({tr:e,state:r,dispatch:s})=>{var o;const{extendEmptyMarkRange:i=!1}=t,{selection:c}=e,a=j(n,r.schema),{$from:l,empty:u,ranges:d}=c;if(!s)return!0;if(u&&i){let{from:f,to:p}=c;const h=(o=l.marks().find(g=>g.type===a))===null||o===void 0?void 0:o.attrs,m=mt(l,a,h);m&&(f=m.from,p=m.to),e.removeMark(f,p,a)}else d.forEach(f=>{e.removeMark(f.$from.pos,f.$to.pos,a)});return e.removeStoredMark(a),!0},updateAttributes:(n,t={})=>({tr:e,state:r,dispatch:s})=>{let o=null,i=null;const c=rt(typeof n=="string"?n:n.name,r.schema);return c?(c==="node"&&(o=x(n,r.schema)),c==="mark"&&(i=j(n,r.schema)),s&&e.selection.ranges.forEach(a=>{const l=a.$from.pos,u=a.$to.pos;let d,f,p,h;e.selection.empty?r.doc.nodesBetween(l,u,(m,g)=>{o&&o===m.type&&(p=Math.max(g,l),h=Math.min(g+m.nodeSize,u),d=g,f=m)}):r.doc.nodesBetween(l,u,(m,g)=>{g<l&&o&&o===m.type&&(p=Math.max(g,l),h=Math.min(g+m.nodeSize,u),d=g,f=m),g>=l&&g<=u&&(o&&o===m.type&&e.setNodeMarkup(g,void 0,{...m.attrs,...t}),i&&m.marks.length&&m.marks.forEach(y=>{if(i===y.type){const w=Math.max(g,l),M=Math.min(g+m.nodeSize,u);e.addMark(w,M,i.create({...y.attrs,...t}))}}))}),f&&(d!==void 0&&e.setNodeMarkup(d,void 0,{...f.attrs,...t}),i&&f.marks.length&&f.marks.forEach(m=>{i===m.type&&e.addMark(p,h,i.create({...m.attrs,...t}))}))}),!0):!1},wrapIn:(n,t={})=>({state:e,dispatch:r})=>{const s=x(n,e.schema);return jt(s,t)(e,r)},wrapInList:(n,t={})=>({state:e,dispatch:r})=>{const s=x(n,e.schema);return Zt(s,t)(e,r)}});const Gn=C.create({name:"commands",addCommands(){return{...qn}}}),Jn=C.create({name:"drop",addProseMirrorPlugins(){return[new P({key:new B("tiptapDrop"),props:{handleDrop:(n,t,e,r)=>{this.editor.emit("drop",{editor:this.editor,event:t,slice:e,moved:r})}}})]}}),Xn=C.create({name:"editable",addProseMirrorPlugins(){return[new P({key:new B("editable"),props:{editable:()=>this.editor.options.editable}})]}}),Yn=new B("focusEvents"),Qn=C.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:n}=this;return[new P({key:Yn,props:{handleDOMEvents:{focus:(t,e)=>{n.isFocused=!0;const r=n.state.tr.setMeta("focus",{event:e}).setMeta("addToHistory",!1);return t.dispatch(r),!1},blur:(t,e)=>{n.isFocused=!1;const r=n.state.tr.setMeta("blur",{event:e}).setMeta("addToHistory",!1);return t.dispatch(r),!1}}}})]}}),Zn=C.create({name:"keymap",addKeyboardShortcuts(){const n=()=>this.editor.commands.first(({commands:i})=>[()=>i.undoInputRule(),()=>i.command(({tr:c})=>{const{selection:a,doc:l}=c,{empty:u,$anchor:d}=a,{pos:f,parent:p}=d,h=d.parent.isTextblock&&f>0?c.doc.resolve(f-1):d,m=h.parent.type.spec.isolating,g=d.pos-d.parentOffset,y=m&&h.parent.childCount===1?g===d.pos:D.atStart(l).from===f;return!u||!p.type.isTextblock||p.textContent.length||!y||y&&d.parent.type.name==="paragraph"?!1:i.clearNodes()}),()=>i.deleteSelection(),()=>i.joinBackward(),()=>i.selectNodeBackward()]),t=()=>this.editor.commands.first(({commands:i})=>[()=>i.deleteSelection(),()=>i.deleteCurrentNode(),()=>i.joinForward(),()=>i.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:i})=>[()=>i.newlineInCode(),()=>i.createParagraphNear(),()=>i.liftEmptyBlock(),()=>i.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:n,"Mod-Backspace":n,"Shift-Backspace":n,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},s={...r},o={...r,"Ctrl-h":n,"Alt-Backspace":n,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return tt()||he()?o:s},addProseMirrorPlugins(){return[new P({key:new B("clearDocument"),appendTransaction:(n,t,e)=>{if(n.some(m=>m.getMeta("composition")))return;const r=n.some(m=>m.docChanged)&&!t.doc.eq(e.doc),s=n.some(m=>m.getMeta("preventClearDocument"));if(!r||s)return;const{empty:o,from:i,to:c}=t.selection,a=D.atStart(t.doc).from,l=D.atEnd(t.doc).to;if(o||!(i===a&&c===l)||!ot(e.doc))return;const f=e.tr,p=k({state:e,transaction:f}),{commands:h}=new U({editor:this.editor,state:p});if(h.clearNodes(),!!f.steps.length)return f}})]}}),tr=C.create({name:"paste",addProseMirrorPlugins(){return[new P({key:new B("tiptapPaste"),props:{handlePaste:(n,t,e)=>{this.editor.emit("paste",{editor:this.editor,event:t,slice:e})}}})]}}),er=C.create({name:"tabindex",addProseMirrorPlugins(){return[new P({key:new B("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}});class R{get name(){return this.node.type.name}constructor(t,e,r=!1,s=null){this.currentNode=null,this.actualDepth=null,this.isBlock=r,this.resolvedPos=t,this.editor=e,this.currentNode=s}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var t;return(t=this.actualDepth)!==null&&t!==void 0?t:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(t){let e=this.from,r=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}e=this.from+1,r=this.to-1}this.editor.commands.insertContentAt({from:e,to:r},t)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;const t=this.resolvedPos.start(this.resolvedPos.depth-1),e=this.resolvedPos.doc.resolve(t);return new R(e,this.editor)}get before(){let t=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.from-3)),new R(t,this.editor)}get after(){let t=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.to+3)),new R(t,this.editor)}get children(){const t=[];return this.node.content.forEach((e,r)=>{const s=e.isBlock&&!e.isTextblock,o=e.isAtom&&!e.isText,i=this.pos+r+(o?0:1),c=this.resolvedPos.doc.resolve(i);if(!s&&c.depth<=this.depth)return;const a=new R(c,this.editor,s,s?e:null);s&&(a.actualDepth=this.depth+1),t.push(new R(c,this.editor,s,s?e:null))}),t}get firstChild(){return this.children[0]||null}get lastChild(){const t=this.children;return t[t.length-1]||null}closest(t,e={}){let r=null,s=this.parent;for(;s&&!r;){if(s.node.type.name===t)if(Object.keys(e).length>0){const o=s.node.attrs,i=Object.keys(e);for(let c=0;c<i.length;c+=1){const a=i[c];if(o[a]!==e[a])break}}else r=s;s=s.parent}return r}querySelector(t,e={}){return this.querySelectorAll(t,e,!0)[0]||null}querySelectorAll(t,e={},r=!1){let s=[];if(!this.children||this.children.length===0)return s;const o=Object.keys(e);return this.children.forEach(i=>{r&&s.length>0||(i.node.type.name===t&&o.every(a=>e[a]===i.node.attrs[a])&&s.push(i),!(r&&s.length>0)&&(s=s.concat(i.querySelectorAll(t,e,r))))}),s}setAttribute(t){const{tr:e}=this.editor.state;e.setNodeMarkup(this.from,void 0,{...this.node.attrs,...t}),this.editor.view.dispatch(e)}}const nr=`.ProseMirror {
5
- position: relative;
6
- }
7
-
8
- .ProseMirror {
9
- word-wrap: break-word;
10
- white-space: pre-wrap;
11
- white-space: break-spaces;
12
- -webkit-font-variant-ligatures: none;
13
- font-variant-ligatures: none;
14
- font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
15
- }
16
-
17
- .ProseMirror [contenteditable="false"] {
18
- white-space: normal;
19
- }
20
-
21
- .ProseMirror [contenteditable="false"] [contenteditable="true"] {
22
- white-space: pre-wrap;
23
- }
24
-
25
- .ProseMirror pre {
26
- white-space: pre-wrap;
27
- }
28
-
29
- img.ProseMirror-separator {
30
- display: inline !important;
31
- border: none !important;
32
- margin: 0 !important;
33
- width: 0 !important;
34
- height: 0 !important;
35
- }
36
-
37
- .ProseMirror-gapcursor {
38
- display: none;
39
- pointer-events: none;
40
- position: absolute;
41
- margin: 0;
42
- }
43
-
44
- .ProseMirror-gapcursor:after {
45
- content: "";
46
- display: block;
47
- position: absolute;
48
- top: -2px;
49
- width: 20px;
50
- border-top: 1px solid black;
51
- animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
52
- }
53
-
54
- @keyframes ProseMirror-cursor-blink {
55
- to {
56
- visibility: hidden;
57
- }
58
- }
59
-
60
- .ProseMirror-hideselection *::selection {
61
- background: transparent;
62
- }
63
-
64
- .ProseMirror-hideselection *::-moz-selection {
65
- background: transparent;
66
- }
67
-
68
- .ProseMirror-hideselection * {
69
- caret-color: transparent;
70
- }
71
-
72
- .ProseMirror-focused .ProseMirror-gapcursor {
73
- display: block;
74
- }
75
-
76
- .tippy-box[data-animation=fade][data-state=hidden] {
77
- opacity: 0
78
- }`;function rr(n,t,e){const r=document.querySelector("style[data-tiptap-style]");if(r!==null)return r;const s=document.createElement("style");return t&&s.setAttribute("nonce",t),s.setAttribute("data-tiptap-style",""),s.innerHTML=n,document.getElementsByTagName("head")[0].appendChild(s),s}F("r",class extends we{constructor(t={}){super(),this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:e})=>{throw e},onPaste:()=>null,onDrop:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(t),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("contentError",this.options.onContentError),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:e,slice:r,moved:s})=>this.options.onDrop(e,r,s)),this.on("paste",({event:e,slice:r})=>this.options.onPaste(e,r)),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=rr(nr,this.options.injectNonce))}setOptions(t={}){this.options={...this.options,...t},!(!this.view||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(t,e=!0){this.setOptions({editable:t}),e&&this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(t,e){const r=se(e)?e(t,[...this.state.plugins]):[...this.state.plugins,t],s=this.state.reconfigure({plugins:r});return this.view.updateState(s),s}unregisterPlugin(t){if(this.isDestroyed)return;const e=this.state.plugins;let r=e;if([].concat(t).forEach(o=>{const i=typeof o=="string"?`${o}$`:o.key;r=r.filter(c=>!c.key.startsWith(i))}),e.length===r.length)return;const s=this.state.reconfigure({plugins:r});return this.view.updateState(s),s}createExtensionManager(){var t,e;const s=[...this.options.enableCoreExtensions?[Xn,De.configure({blockSeparator:(e=(t=this.options.coreExtensionOptions)===null||t===void 0?void 0:t.clipboardTextSerializer)===null||e===void 0?void 0:e.blockSeparator}),Gn,Qn,Zn,er,Jn,tr].filter(o=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[o.name]!==!1:!0):[],...this.options.extensions].filter(o=>["extension","node","mark"].includes(o==null?void 0:o.type));this.extensionManager=new z(s,this)}createCommandManager(){this.commandManager=new U({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){var t;let e;try{e=yt(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(i){if(!(i instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(i.message))throw i;this.emit("contentError",{editor:this,error:i,disableCollaboration:()=>{this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(c=>c.name!=="collaboration"),this.createExtensionManager()}}),e=yt(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}const r=ue(e,this.options.autofocus);this.view=new xt(this.options.element,{...this.options.editorProps,attributes:{role:"textbox",...(t=this.options.editorProps)===null||t===void 0?void 0:t.attributes},dispatchTransaction:this.dispatchTransaction.bind(this),state:Et.create({doc:e,selection:r||void 0})});const s=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(s),this.createNodeViews(),this.prependClass();const o=this.view.dom;o.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction(t){this.isCapturingTransaction=!0,t(),this.isCapturingTransaction=!1;const e=this.capturedTransaction;return this.capturedTransaction=null,e}dispatchTransaction(t){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=t;return}t.steps.forEach(i=>{var c;return(c=this.capturedTransaction)===null||c===void 0?void 0:c.step(i)});return}const e=this.state.apply(t),r=!this.state.selection.eq(e.selection);this.emit("beforeTransaction",{editor:this,transaction:t,nextState:e}),this.view.updateState(e),this.emit("transaction",{editor:this,transaction:t}),r&&this.emit("selectionUpdate",{editor:this,transaction:t});const s=t.getMeta("focus"),o=t.getMeta("blur");s&&this.emit("focus",{editor:this,event:s.event,transaction:t}),o&&this.emit("blur",{editor:this,event:o.event,transaction:t}),!(!t.docChanged||t.getMeta("preventUpdate"))&&this.emit("update",{editor:this,transaction:t})}getAttributes(t){return be(this.state,t)}isActive(t,e){const r=typeof t=="string"?t:null,s=typeof t=="string"?e:t;return jn(this.state,r,s)}getJSON(){return this.state.doc.toJSON()}getHTML(){return ft(this.state.doc.content,this.schema)}getText(t){const{blockSeparator:e=`
79
-
80
- `,textSerializers:r={}}=t||{};return ye(this.state.doc,{blockSeparator:e,textSerializers:{...ht(this.schema),...r}})}get isEmpty(){return ot(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){if(this.emit("destroy"),this.view){const t=this.view.dom;t&&t.editor&&delete t.editor,this.view.destroy()}this.removeAllListeners()}get isDestroyed(){var t;return!(!((t=this.view)===null||t===void 0)&&t.docView)}$node(t,e){var r;return((r=this.$doc)===null||r===void 0?void 0:r.querySelector(t,e))||null}$nodes(t,e){var r;return((r=this.$doc)===null||r===void 0?void 0:r.querySelectorAll(t,e))||null}$pos(t){const e=this.state.doc.resolve(t);return new R(e,this)}get $doc(){return this.$pos(0)}});function sr(n){return new G({find:n.find,handler:({state:t,range:e,match:r})=>{const s=v(n.getAttributes,void 0,r);if(s===!1||s===null)return null;const{tr:o}=t,i=r[r.length-1],c=r[0];if(i){const a=c.search(/\S/),l=e.from+c.indexOf(i),u=l+i.length;if(kt(e.from,e.to,t.doc).filter(p=>p.mark.type.excluded.find(m=>m===n.type&&m!==p.mark.type)).filter(p=>p.to>l).length)return null;u<e.to&&o.delete(u,e.to),l>e.from&&o.delete(e.from+a,l);const f=e.from+a+i.length;o.addMark(e.from+a,f,n.type.create(s||{})),o.removeStoredMark(n.type)}}})}function or(n){return new G({find:n.find,handler:({state:t,range:e,match:r})=>{const s=v(n.getAttributes,void 0,r)||{},{tr:o}=t,i=e.from;let c=e.to;const a=n.type.create(s);if(r[1]){const l=r[0].lastIndexOf(r[1]);let u=i+l;u>c?u=c:c=u+r[1].length;const d=r[0][r[0].length-1];o.insertText(d,i+r[0].length-1),o.replaceWith(u,c,a)}else if(r[0]){const l=n.type.isInline?i:i-1;o.insert(l,n.type.create(s)).delete(o.mapping.map(i),o.mapping.map(c))}o.scrollIntoView()}})}function ir(n){return new G({find:n.find,handler:({state:t,range:e,match:r})=>{const s=t.doc.resolve(e.from),o=v(n.getAttributes,void 0,r)||{};if(!s.node(-1).canReplaceWith(s.index(-1),s.indexAfter(-1),n.type))return null;t.tr.delete(e.from,e.to).setBlockType(e.from,e.from,n.type,o)}})}function ar(n){return new G({find:n.find,handler:({state:t,range:e,match:r,chain:s})=>{const o=v(n.getAttributes,void 0,r)||{},i=t.tr.delete(e.from,e.to),a=i.doc.resolve(e.from).blockRange(),l=a&&Ot(a,n.type,o);if(!l)return null;if(i.wrap(a,l),n.keepMarks&&n.editor){const{selection:d,storedMarks:f}=t,{splittableMarks:p}=n.editor.extensionManager,h=f||d.$to.parentOffset&&d.$from.marks();if(h){const m=h.filter(g=>p.includes(g.type.name));i.ensureMarks(m)}}if(n.keepAttributes){const d=n.type.name==="bulletList"||n.type.name==="orderedList"?"listItem":"taskList";s().updateAttributes(d,o).run()}const u=i.doc.resolve(e.from-1).nodeBefore;u&&u.type===n.type&&K(i.doc,e.from-1)&&(!n.joinPredicate||n.joinPredicate(r,u))&&i.join(e.from-1)}})}class it{constructor(t={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=v(b(this,"addOptions",{name:this.name}))),this.storage=v(b(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new it(t)}configure(t={}){const e=this.extend({...this.config,addOptions:()=>Y(this.options,t)});return e.name=this.name,e.parent=this.parent,e}extend(t={}){const e=new it(t);return e.parent=this,this.child=e,e.name=t.name?t.name:e.parent.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${e.name}".`),e.options=v(b(e,"addOptions",{name:e.name})),e.storage=v(b(e,"addStorage",{name:e.name,options:e.options})),e}}F("N",it);class cr{constructor(t,e,r){this.isDragging=!1,this.component=t,this.editor=e.editor,this.options={stopEvent:null,ignoreMutation:null,...r},this.extension=e.extension,this.node=e.node,this.decorations=e.decorations,this.innerDecorations=e.innerDecorations,this.view=e.view,this.HTMLAttributes=e.HTMLAttributes,this.getPos=e.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(t){var e,r,s,o,i,c,a;const{view:l}=this.editor,u=t.target,d=u.nodeType===3?(e=u.parentElement)===null||e===void 0?void 0:e.closest("[data-drag-handle]"):u.closest("[data-drag-handle]");if(!this.dom||!((r=this.contentDOM)===null||r===void 0)&&r.contains(u)||!d)return;let f=0,p=0;if(this.dom!==d){const w=this.dom.getBoundingClientRect(),M=d.getBoundingClientRect(),S=(s=t.offsetX)!==null&&s!==void 0?s:(o=t.nativeEvent)===null||o===void 0?void 0:o.offsetX,E=(i=t.offsetY)!==null&&i!==void 0?i:(c=t.nativeEvent)===null||c===void 0?void 0:c.offsetY;f=M.x-w.x+S,p=M.y-w.y+E}const h=this.dom.cloneNode(!0);(a=t.dataTransfer)===null||a===void 0||a.setDragImage(h,f,p);const m=this.getPos();if(typeof m!="number")return;const g=L.create(l.state.doc,m),y=l.state.tr.setSelection(g);l.dispatch(y)}stopEvent(t){var e;if(!this.dom)return!1;if(typeof this.options.stopEvent=="function")return this.options.stopEvent({event:t});const r=t.target;if(!(this.dom.contains(r)&&!(!((e=this.contentDOM)===null||e===void 0)&&e.contains(r))))return!1;const o=t.type.startsWith("drag"),i=t.type==="drop";if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(r.tagName)||r.isContentEditable)&&!i&&!o)return!0;const{isEditable:a}=this.editor,{isDragging:l}=this,u=!!this.node.type.spec.draggable,d=L.isSelectable(this.node),f=t.type==="copy",p=t.type==="paste",h=t.type==="cut",m=t.type==="mousedown";if(!u&&d&&o&&t.target===this.dom&&t.preventDefault(),u&&o&&!l&&t.target===this.dom)return t.preventDefault(),!1;if(u&&a&&!l&&m){const g=r.closest("[data-drag-handle]");g&&(this.dom===g||this.dom.contains(g))&&(this.isDragging=!0,document.addEventListener("dragend",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("drop",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("mouseup",()=>{this.isDragging=!1},{once:!0}))}return!(l||i||f||p||h||m&&d)}ignoreMutation(t){return!this.dom||!this.contentDOM?!0:typeof this.options.ignoreMutation=="function"?this.options.ignoreMutation({mutation:t}):this.node.isLeaf||this.node.isAtom?!0:t.type==="selection"||this.dom.contains(t.target)&&t.type==="childList"&&(tt()||fe())&&this.editor.isFocused&&[...Array.from(t.addedNodes),...Array.from(t.removedNodes)].every(r=>r.isContentEditable)?!1:this.contentDOM===t.target&&t.type==="attributes"?!0:!this.contentDOM.contains(t.target)}updateAttributes(t){this.editor.commands.command(({tr:e})=>{const r=this.getPos();return typeof r!="number"?!1:(e.setNodeMarkup(r,void 0,{...this.node.attrs,...t}),!0)})}deleteNode(){const t=this.getPos();if(typeof t!="number")return;const e=t+this.node.nodeSize;this.editor.commands.deleteRange({from:t,to:e})}}F("q",cr);function lr(n){return new Oe({find:n.find,handler:({state:t,range:e,match:r,pasteEvent:s})=>{const o=v(n.getAttributes,void 0,r,s);if(o===!1||o===null)return null;const{tr:i}=t,c=r[r.length-1],a=r[0];let l=e.to;if(c){const u=a.search(/\S/),d=e.from+a.indexOf(c),f=d+c.length;if(kt(e.from,e.to,t.doc).filter(h=>h.mark.type.excluded.find(g=>g===n.type&&g!==h.mark.type)).filter(h=>h.to>d).length)return null;f<e.to&&i.delete(f,e.to),d>e.from&&i.delete(e.from+u,d),l=e.from+u+c.length,i.addMark(e.from+u,l,n.type.create(o||{})),i.removeStoredMark(n.type)}}})}function dr(n){return n.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}}}});
@@ -1,71 +0,0 @@
1
- import { M as r, a as e, b as s, m as n } from "./core-BLz8iRA3.es.js";
2
- const a = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, o = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g, d = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/, u = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g, l = r.create({
3
- name: "bold",
4
- addOptions() {
5
- return {
6
- HTMLAttributes: {}
7
- };
8
- },
9
- parseHTML() {
10
- return [
11
- {
12
- tag: "strong"
13
- },
14
- {
15
- tag: "b",
16
- getAttrs: (t) => t.style.fontWeight !== "normal" && null
17
- },
18
- {
19
- style: "font-weight=400",
20
- clearMark: (t) => t.type.name === this.name
21
- },
22
- {
23
- style: "font-weight",
24
- getAttrs: (t) => /^(bold(er)?|[5-9]\d{2,})$/.test(t) && null
25
- }
26
- ];
27
- },
28
- renderHTML({ HTMLAttributes: t }) {
29
- return ["strong", n(this.options.HTMLAttributes, t), 0];
30
- },
31
- addCommands() {
32
- return {
33
- setBold: () => ({ commands: t }) => t.setMark(this.name),
34
- toggleBold: () => ({ commands: t }) => t.toggleMark(this.name),
35
- unsetBold: () => ({ commands: t }) => t.unsetMark(this.name)
36
- };
37
- },
38
- addKeyboardShortcuts() {
39
- return {
40
- "Mod-b": () => this.editor.commands.toggleBold(),
41
- "Mod-B": () => this.editor.commands.toggleBold()
42
- };
43
- },
44
- addInputRules() {
45
- return [
46
- s({
47
- find: a,
48
- type: this.type
49
- }),
50
- s({
51
- find: d,
52
- type: this.type
53
- })
54
- ];
55
- },
56
- addPasteRules() {
57
- return [
58
- e({
59
- find: o,
60
- type: this.type
61
- }),
62
- e({
63
- find: u,
64
- type: this.type
65
- })
66
- ];
67
- }
68
- });
69
- export {
70
- l as B
71
- };
@@ -1 +0,0 @@
1
- System.register(["./core-bnIgGWIt.system.js"],function(a,g){"use strict";var n,s,r,o;return{setters:[e=>{n=e.M,s=e.a,r=e.b,o=e.m}],execute:function(){const e=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,d=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,u=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,i=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,l=a("B",n.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:t=>t.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:t=>t.type.name===this.name},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}]},renderHTML({HTMLAttributes:t}){return["strong",o(this.options.HTMLAttributes,t),0]},addCommands(){return{setBold:()=>({commands:t})=>t.setMark(this.name),toggleBold:()=>({commands:t})=>t.toggleMark(this.name),unsetBold:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[r({find:e,type:this.type}),r({find:u,type:this.type})]},addPasteRules(){return[s({find:d,type:this.type}),s({find:i,type:this.type})]}}))}}});
@@ -1 +0,0 @@
1
- System.register(["./core-bnIgGWIt.system.js","../prosemirror-state-DzPLD-6l.system.js","../tippy.js-CuKTz0UR.system.js"],function(_,P){"use strict";var b,w,H,C,E,T,D;return{setters:[n=>{b=n.i,w=n.c,H=n.p,C=n.E},n=>{E=n.P,T=n.a},n=>{D=n.t}],execute:function(){class n{constructor({editor:e,element:i,view:c,tippyOptions:y={},updateDelay:f=250,shouldShow:m}){this.preventHide=!1,this.shouldShow=({view:t,state:s,from:r,to:d})=>{const{doc:h,selection:u}=s,{empty:a}=u,p=!h.textBetween(r,d).length&&b(s.selection),v=this.element.contains(document.activeElement);return!(!(t.hasFocus()||v)||a||p||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:t})=>{var s;if(this.preventHide){this.preventHide=!1;return}t!=null&&t.relatedTarget&&(!((s=this.element.parentNode)===null||s===void 0)&&s.contains(t.relatedTarget))||(t==null?void 0:t.relatedTarget)!==this.editor.view.dom&&this.hide()},this.tippyBlurHandler=t=>{this.blurHandler({event:t})},this.handleDebouncedUpdate=(t,s)=>{const r=!(s!=null&&s.selection.eq(t.state.selection)),d=!(s!=null&&s.doc.eq(t.state.doc));!r&&!d||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(t,r,d,s)},this.updateDelay))},this.updateHandler=(t,s,r,d)=>{var h,u,a;const{state:p,composing:v}=t,{selection:O}=p;if(v||!s&&!r)return;this.createTooltip();const{ranges:M}=O,g=Math.min(...M.map(o=>o.$from.pos)),B=Math.max(...M.map(o=>o.$to.pos));if(!((h=this.shouldShow)===null||h===void 0?void 0:h.call(this,{editor:this.editor,element:this.element,view:t,state:p,oldState:d,from:g,to:B}))){this.hide();return}(u=this.tippy)===null||u===void 0||u.setProps({getReferenceClientRect:((a=this.tippyOptions)===null||a===void 0?void 0:a.getReferenceClientRect)||(()=>{if(w(p.selection)){let o=t.nodeDOM(g);if(o){const R=o.dataset.nodeViewWrapper?o:o.querySelector("[data-node-view-wrapper]");if(R&&(o=R.firstChild),o)return o.getBoundingClientRect()}}return H(t,g,B)})}),this.show()},this.editor=e,this.element=i,this.view=c,this.updateDelay=f,m&&(this.shouldShow=m),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=y,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:e}=this.editor.options,i=!!e.parentElement;this.tippy||!i||(this.tippy=D(e,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"top",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(e,i){const{state:c}=e,y=c.selection.from!==c.selection.to;if(this.updateDelay>0&&y){this.handleDebouncedUpdate(e,i);return}const f=!(i!=null&&i.selection.eq(e.state.selection)),m=!(i!=null&&i.doc.eq(e.state.doc));this.updateHandler(e,f,m,i)}show(){var e;(e=this.tippy)===null||e===void 0||e.show()}hide(){var e;(e=this.tippy)===null||e===void 0||e.hide()}destroy(){var e,i;!((e=this.tippy)===null||e===void 0)&&e.popper.firstChild&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),(i=this.tippy)===null||i===void 0||i.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const K=_("B",l=>new E({key:typeof l.pluginKey=="string"?new T(l.pluginKey):l.pluginKey,view:e=>new n({view:e,...l})}));C.create({name:"bubbleMenu",addOptions(){return{element:null,tippyOptions:{},pluginKey:"bubbleMenu",updateDelay:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[K({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,updateDelay:this.options.updateDelay,shouldShow:this.options.shouldShow})]:[]}})}}});
@@ -1,128 +0,0 @@
1
- import { i as C, c as E, p as T, E as D } from "./core-BLz8iRA3.es.js";
2
- import { P as O, a as M } from "../prosemirror-state-CwkYUmNs.es.js";
3
- import { t as B } from "../tippy.js-DNnwm2RY.es.js";
4
- class R {
5
- constructor({ editor: e, element: i, view: p, tippyOptions: m = {}, updateDelay: f = 250, shouldShow: c }) {
6
- this.preventHide = !1, this.shouldShow = ({ view: t, state: s, from: o, to: r }) => {
7
- const { doc: l, selection: h } = s, { empty: a } = h, u = !l.textBetween(o, r).length && C(s.selection), v = this.element.contains(document.activeElement);
8
- return !(!(t.hasFocus() || v) || a || u || !this.editor.isEditable);
9
- }, this.mousedownHandler = () => {
10
- this.preventHide = !0;
11
- }, this.dragstartHandler = () => {
12
- this.hide();
13
- }, this.focusHandler = () => {
14
- setTimeout(() => this.update(this.editor.view));
15
- }, this.blurHandler = ({ event: t }) => {
16
- var s;
17
- if (this.preventHide) {
18
- this.preventHide = !1;
19
- return;
20
- }
21
- t != null && t.relatedTarget && (!((s = this.element.parentNode) === null || s === void 0) && s.contains(t.relatedTarget)) || (t == null ? void 0 : t.relatedTarget) !== this.editor.view.dom && this.hide();
22
- }, this.tippyBlurHandler = (t) => {
23
- this.blurHandler({ event: t });
24
- }, this.handleDebouncedUpdate = (t, s) => {
25
- const o = !(s != null && s.selection.eq(t.state.selection)), r = !(s != null && s.doc.eq(t.state.doc));
26
- !o && !r || (this.updateDebounceTimer && clearTimeout(this.updateDebounceTimer), this.updateDebounceTimer = window.setTimeout(() => {
27
- this.updateHandler(t, o, r, s);
28
- }, this.updateDelay));
29
- }, this.updateHandler = (t, s, o, r) => {
30
- var l, h, a;
31
- const { state: u, composing: v } = t, { selection: g } = u;
32
- if (v || !s && !o)
33
- return;
34
- this.createTooltip();
35
- const { ranges: b } = g, y = Math.min(...b.map((n) => n.$from.pos)), w = Math.max(...b.map((n) => n.$to.pos));
36
- if (!((l = this.shouldShow) === null || l === void 0 ? void 0 : l.call(this, {
37
- editor: this.editor,
38
- element: this.element,
39
- view: t,
40
- state: u,
41
- oldState: r,
42
- from: y,
43
- to: w
44
- }))) {
45
- this.hide();
46
- return;
47
- }
48
- (h = this.tippy) === null || h === void 0 || h.setProps({
49
- getReferenceClientRect: ((a = this.tippyOptions) === null || a === void 0 ? void 0 : a.getReferenceClientRect) || (() => {
50
- if (E(u.selection)) {
51
- let n = t.nodeDOM(y);
52
- if (n) {
53
- const H = n.dataset.nodeViewWrapper ? n : n.querySelector("[data-node-view-wrapper]");
54
- if (H && (n = H.firstChild), n)
55
- return n.getBoundingClientRect();
56
- }
57
- }
58
- return T(t, y, w);
59
- })
60
- }), this.show();
61
- }, this.editor = e, this.element = i, this.view = p, this.updateDelay = f, c && (this.shouldShow = c), this.element.addEventListener("mousedown", this.mousedownHandler, { capture: !0 }), this.view.dom.addEventListener("dragstart", this.dragstartHandler), this.editor.on("focus", this.focusHandler), this.editor.on("blur", this.blurHandler), this.tippyOptions = m, this.element.remove(), this.element.style.visibility = "visible";
62
- }
63
- createTooltip() {
64
- const { element: e } = this.editor.options, i = !!e.parentElement;
65
- this.tippy || !i || (this.tippy = B(e, {
66
- duration: 0,
67
- getReferenceClientRect: null,
68
- content: this.element,
69
- interactive: !0,
70
- trigger: "manual",
71
- placement: "top",
72
- hideOnClick: "toggle",
73
- ...this.tippyOptions
74
- }), this.tippy.popper.firstChild && this.tippy.popper.firstChild.addEventListener("blur", this.tippyBlurHandler));
75
- }
76
- update(e, i) {
77
- const { state: p } = e, m = p.selection.from !== p.selection.to;
78
- if (this.updateDelay > 0 && m) {
79
- this.handleDebouncedUpdate(e, i);
80
- return;
81
- }
82
- const f = !(i != null && i.selection.eq(e.state.selection)), c = !(i != null && i.doc.eq(e.state.doc));
83
- this.updateHandler(e, f, c, i);
84
- }
85
- show() {
86
- var e;
87
- (e = this.tippy) === null || e === void 0 || e.show();
88
- }
89
- hide() {
90
- var e;
91
- (e = this.tippy) === null || e === void 0 || e.hide();
92
- }
93
- destroy() {
94
- var e, i;
95
- !((e = this.tippy) === null || e === void 0) && e.popper.firstChild && this.tippy.popper.firstChild.removeEventListener("blur", this.tippyBlurHandler), (i = this.tippy) === null || i === void 0 || i.destroy(), this.element.removeEventListener("mousedown", this.mousedownHandler, { capture: !0 }), this.view.dom.removeEventListener("dragstart", this.dragstartHandler), this.editor.off("focus", this.focusHandler), this.editor.off("blur", this.blurHandler);
96
- }
97
- }
98
- const _ = (d) => new O({
99
- key: typeof d.pluginKey == "string" ? new M(d.pluginKey) : d.pluginKey,
100
- view: (e) => new R({ view: e, ...d })
101
- });
102
- D.create({
103
- name: "bubbleMenu",
104
- addOptions() {
105
- return {
106
- element: null,
107
- tippyOptions: {},
108
- pluginKey: "bubbleMenu",
109
- updateDelay: void 0,
110
- shouldShow: null
111
- };
112
- },
113
- addProseMirrorPlugins() {
114
- return this.options.element ? [
115
- _({
116
- pluginKey: this.options.pluginKey,
117
- editor: this.editor,
118
- element: this.options.element,
119
- tippyOptions: this.options.tippyOptions,
120
- updateDelay: this.options.updateDelay,
121
- shouldShow: this.options.shouldShow
122
- })
123
- ] : [];
124
- }
125
- });
126
- export {
127
- _ as B
128
- };
@@ -1,53 +0,0 @@
1
- import { N as o, w as e, m as n } from "./core-BLz8iRA3.es.js";
2
- const p = "listItem", s = "textStyle", i = /^\s*([-+*])\s$/, a = o.create({
3
- name: "bulletList",
4
- addOptions() {
5
- return {
6
- itemTypeName: "listItem",
7
- HTMLAttributes: {},
8
- keepMarks: !1,
9
- keepAttributes: !1
10
- };
11
- },
12
- group: "block list",
13
- content() {
14
- return `${this.options.itemTypeName}+`;
15
- },
16
- parseHTML() {
17
- return [
18
- { tag: "ul" }
19
- ];
20
- },
21
- renderHTML({ HTMLAttributes: t }) {
22
- return ["ul", n(this.options.HTMLAttributes, t), 0];
23
- },
24
- addCommands() {
25
- return {
26
- toggleBulletList: () => ({ commands: t, chain: r }) => this.options.keepAttributes ? r().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(p, this.editor.getAttributes(s)).run() : t.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)
27
- };
28
- },
29
- addKeyboardShortcuts() {
30
- return {
31
- "Mod-Shift-8": () => this.editor.commands.toggleBulletList()
32
- };
33
- },
34
- addInputRules() {
35
- let t = e({
36
- find: i,
37
- type: this.type
38
- });
39
- return (this.options.keepMarks || this.options.keepAttributes) && (t = e({
40
- find: i,
41
- type: this.type,
42
- keepMarks: this.options.keepMarks,
43
- keepAttributes: this.options.keepAttributes,
44
- getAttributes: () => this.editor.getAttributes(s),
45
- editor: this.editor
46
- })), [
47
- t
48
- ];
49
- }
50
- });
51
- export {
52
- a as B
53
- };
@@ -1 +0,0 @@
1
- System.register(["./core-bnIgGWIt.system.js"],function(u,a){"use strict";var i,s,r;return{setters:[e=>{i=e.N,s=e.w,r=e.m}],execute:function(){const e="listItem",n="textStyle",o=/^\s*([-+*])\s$/,l=u("B",i.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:t}){return["ul",r(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleBulletList:()=>({commands:t,chain:p})=>this.options.keepAttributes?p().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(e,this.editor.getAttributes(n)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let t=s({find:o,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=s({find:o,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(n),editor:this.editor})),[t]}}))}}});
@@ -1,51 +0,0 @@
1
- import { M as t, a as r, b as s, m as a } from "./core-BLz8iRA3.es.js";
2
- const n = /(^|[^`])`([^`]+)`(?!`)/, d = /(^|[^`])`([^`]+)`(?!`)/g, u = t.create({
3
- name: "code",
4
- addOptions() {
5
- return {
6
- HTMLAttributes: {}
7
- };
8
- },
9
- excludes: "_",
10
- code: !0,
11
- exitable: !0,
12
- parseHTML() {
13
- return [
14
- { tag: "code" }
15
- ];
16
- },
17
- renderHTML({ HTMLAttributes: e }) {
18
- return ["code", a(this.options.HTMLAttributes, e), 0];
19
- },
20
- addCommands() {
21
- return {
22
- setCode: () => ({ commands: e }) => e.setMark(this.name),
23
- toggleCode: () => ({ commands: e }) => e.toggleMark(this.name),
24
- unsetCode: () => ({ commands: e }) => e.unsetMark(this.name)
25
- };
26
- },
27
- addKeyboardShortcuts() {
28
- return {
29
- "Mod-e": () => this.editor.commands.toggleCode()
30
- };
31
- },
32
- addInputRules() {
33
- return [
34
- s({
35
- find: n,
36
- type: this.type
37
- })
38
- ];
39
- },
40
- addPasteRules() {
41
- return [
42
- r({
43
- find: d,
44
- type: this.type
45
- })
46
- ];
47
- }
48
- });
49
- export {
50
- u as C
51
- };
@@ -1 +0,0 @@
1
- System.register(["./core-bnIgGWIt.system.js"],function(a,o){"use strict";var r,s,n,u;return{setters:[t=>{r=t.M,s=t.a,n=t.b,u=t.m}],execute:function(){const t=/(^|[^`])`([^`]+)`(?!`)/,d=/(^|[^`])`([^`]+)`(?!`)/g,i=a("C",r.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:e}){return["code",u(this.options.HTMLAttributes,e),0]},addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[n({find:t,type:this.type})]},addPasteRules(){return[s({find:d,type:this.type})]}}))}}});
@@ -1 +0,0 @@
1
- System.register(["./core-bnIgGWIt.system.js","../prosemirror-state-DzPLD-6l.system.js","../tippy.js-CuKTz0UR.system.js"],function(a,C){"use strict";var c,y,m,f,v,g,w;return{setters:[s=>{c=s.E,y=s.g,m=s.d,f=s.p},s=>{v=s.P,g=s.a},s=>{w=s.t}],execute:function(){class s{getTextContent(t){return y(t,{textSerializers:m(this.editor.schema)})}constructor({editor:t,element:i,view:h,tippyOptions:p={},shouldShow:r}){this.preventHide=!1,this.shouldShow=({view:e,state:o})=>{const{selection:d}=o,{$anchor:n,empty:u}=d,H=n.depth===1,b=n.parent.isTextblock&&!n.parent.type.spec.code&&!n.parent.textContent&&n.parent.childCount===0&&!this.getTextContent(n.parent);return!(!e.hasFocus()||!u||!H||!b||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:e})=>{var o;if(this.preventHide){this.preventHide=!1;return}e!=null&&e.relatedTarget&&(!((o=this.element.parentNode)===null||o===void 0)&&o.contains(e.relatedTarget))||(e==null?void 0:e.relatedTarget)!==this.editor.view.dom&&this.hide()},this.tippyBlurHandler=e=>{this.blurHandler({event:e})},this.editor=t,this.element=i,this.view=h,r&&(this.shouldShow=r),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=p,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:t}=this.editor.options,i=!!t.parentElement;this.tippy||!i||(this.tippy=w(t,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"right",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(t,i){var h,p,r;const{state:e}=t,{doc:o,selection:d}=e,{from:n,to:u}=d;if(i&&i.doc.eq(o)&&i.selection.eq(d))return;if(this.createTooltip(),!((h=this.shouldShow)===null||h===void 0?void 0:h.call(this,{editor:this.editor,view:t,state:e,oldState:i}))){this.hide();return}(p=this.tippy)===null||p===void 0||p.setProps({getReferenceClientRect:((r=this.tippyOptions)===null||r===void 0?void 0:r.getReferenceClientRect)||(()=>f(t,n,u))}),this.show()}show(){var t;(t=this.tippy)===null||t===void 0||t.show()}hide(){var t;(t=this.tippy)===null||t===void 0||t.hide()}destroy(){var t,i;!((t=this.tippy)===null||t===void 0)&&t.popper.firstChild&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),(i=this.tippy)===null||i===void 0||i.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const T=a("a",l=>new v({key:typeof l.pluginKey=="string"?new g(l.pluginKey):l.pluginKey,view:t=>new s({view:t,...l})})),E=a("F",c.create({name:"floatingMenu",addOptions(){return{element:null,tippyOptions:{},pluginKey:"floatingMenu",shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[T({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow})]:[]}}))}}});