@fewangsit/wangsvue-fats 1.0.0-alpha.43 → 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 (375) hide show
  1. package/components/buttoncopy/ButtonCopy.vue.d.ts +4 -6
  2. package/components/buttonsearchbyscan/ButtonSearchByScan.vue.d.ts +44 -0
  3. package/components/index.d.ts +61 -162
  4. package/components/inlinemessage/InlineMessage.vue.d.ts +167 -0
  5. package/event-bus/index.d.ts +3 -0
  6. package/loading-page-BrQattYE.js +1 -0
  7. package/loading-page-CoC9UhfC.js +4 -0
  8. package/loading-page-DbLuqCHa.js +1 -0
  9. package/loading-page-f8D03l3G.js +4 -0
  10. package/loading-plane-CgfbWppy.js +1 -0
  11. package/loading-plane-CoXtqoc9.js +4 -0
  12. package/loading-table-Bdr9ZhtP.js +1 -0
  13. package/loading-table-ByUoWqUo.js +4 -0
  14. package/loading-table-BygEMzFM.js +4 -0
  15. package/loading-table-BzrSQlA0.js +1 -0
  16. package/loading-table-D9bw9OcI.js +4 -0
  17. package/loading-table-chOgXi94.js +1 -0
  18. package/no-data-CTKux8RI.js +4 -0
  19. package/no-data-Cgze_Rvp.js +1 -0
  20. package/{assets/lottie/no-data-DOy8kIGF.es.js → no-data-DLHO1L_u.js} +2 -13
  21. package/no-data-Dep79CBh.js +1 -0
  22. package/no-data-g0dJCy2p.js +4 -0
  23. package/no-data-y1X5WtcQ.js +1 -0
  24. package/package.json +3 -3
  25. package/stats.html +1 -1
  26. package/style.css +1 -1
  27. package/wangsvue-fats.js +52069 -144
  28. package/wangsvue-fats.system.js +312 -1
  29. package/ButtonCopy-C6DSmsOR.es.js +0 -4
  30. package/ButtonCopy-CeBlNyVx.system.js +0 -1
  31. package/ButtonSync-BLyCwwnU.system.js +0 -1
  32. package/ButtonSync-DtUhn-Q-.es.js +0 -4
  33. package/ButtonToggle-B9Fa75pf.es.js +0 -4
  34. package/ButtonToggle-CSxzlLR2.system.js +0 -1
  35. package/ButtonViewLog-B1oa4oFN.es.js +0 -4
  36. package/ButtonViewLog-_J6r7Oz8.system.js +0 -1
  37. package/Card-B19WgA6Y.es.js +0 -4
  38. package/Card-umUgd-nP.system.js +0 -1
  39. package/InputEmail-BZ5Y0wSk.system.js +0 -1
  40. package/InputEmail-DR_E1DsL.es.js +0 -4
  41. package/InputURL-DL6a94kM.system.js +0 -1
  42. package/InputURL-PVF5EUUY.es.js +0 -4
  43. package/Loading-Cq7rP88c.system.js +0 -1
  44. package/Loading-DUHTVct4.es.js +0 -4
  45. package/UserWithIcon-Ddn_GlNu.system.js +0 -1
  46. package/UserWithIcon-hWXf-A2U.es.js +0 -4
  47. package/assets/lottie/loading-page-B9ooQcfF.system.js +0 -1
  48. package/assets/lottie/loading-page-CQ0mKER2.es.js +0 -15
  49. package/assets/lottie/loading-table-B4T3FYiI.system.js +0 -1
  50. package/assets/lottie/loading-table-BnpbX8Ew.es.js +0 -15
  51. package/assets/lottie/no-data-CMWnya_k.system.js +0 -1
  52. package/async-components/index-C8nb7p3T.es.js +0 -70
  53. package/async-components/index-DvjqHrYE.system.js +0 -1
  54. package/components/animation/Animation-CCEnvZ_Z.es.js +0 -48
  55. package/components/animation/Animation-CJb4YIwm.system.js +0 -1
  56. package/components/approverinfo/ApproverInfo-Bruotw1h.es.js +0 -127
  57. package/components/approverinfo/ApproverInfo-CoWywuLZ.system.js +0 -1
  58. package/components/assetinfo/AssetInfo-B8KAsqvC.system.js +0 -1
  59. package/components/assetinfo/AssetInfo-DNsWx4Xv.es.js +0 -201
  60. package/components/badge/Badge-DXAyz4Z8.es.js +0 -99
  61. package/components/badge/Badge-wSExdsOP.system.js +0 -1
  62. package/components/badgegroup/BadgeGroup-CAYL_5-g.system.js +0 -1
  63. package/components/badgegroup/BadgeGroup-Dl2cL80L.es.js +0 -68
  64. package/components/basetree/BaseTree-CmBp0uwr.system.js +0 -1
  65. package/components/basetree/BaseTree-RsvvntBp.es.js +0 -167
  66. package/components/basetree/TreeNode-CUL5_2Rj.es.js +0 -499
  67. package/components/basetree/TreeNode-D-YgXird.system.js +0 -1
  68. package/components/breadcrumb/Breadcrumb-BmuuCYJx.system.js +0 -1
  69. package/components/breadcrumb/Breadcrumb-oqdG9WGT.es.js +0 -46
  70. package/components/button/Button-CgkhMnxo.es.js +0 -124
  71. package/components/button/Button-D892iaxz.system.js +0 -1
  72. package/components/buttonbulkaction/ButtonBulkAction-CAamlaLP.system.js +0 -1
  73. package/components/buttonbulkaction/ButtonBulkAction-Tdf3aVtp.es.js +0 -189
  74. package/components/buttoncopy/ButtonCopy-CUFHlIO-.es.js +0 -31
  75. package/components/buttoncopy/ButtonCopy-CZPTLNHh.system.js +0 -1
  76. package/components/buttondownload/ButtonDownload-BWGTiJnP.es.js +0 -61
  77. package/components/buttondownload/ButtonDownload-CUR6u0AT.system.js +0 -1
  78. package/components/buttonfilter/ButtonFilter-B1F4poKd.system.js +0 -1
  79. package/components/buttonfilter/ButtonFilter-B49leY-q.es.js +0 -28
  80. package/components/buttonradio/ButtonRadio-D6xKhPLg.es.js +0 -83
  81. package/components/buttonradio/ButtonRadio-NBcy0Epa.system.js +0 -1
  82. package/components/buttonscan/ButtonScan-BZzpqBe8.system.js +0 -1
  83. package/components/buttonscan/ButtonScan-mVHAdACL.es.js +0 -387
  84. package/components/buttonscan/workers/scanner.worker-8_0GG6W3.system.js +0 -1
  85. package/components/buttonscan/workers/scanner.worker-D3a72Zyk.es.js +0 -25
  86. package/components/buttonsearch/ButtonSearch-3hnarf3D.system.js +0 -1
  87. package/components/buttonsearch/ButtonSearch-BjcXUDQZ.es.js +0 -70
  88. package/components/buttonselecttree/ButtonSelectTree-D0lT3Exu.es.js +0 -218
  89. package/components/buttonselecttree/ButtonSelectTree-DKmPV8FD.system.js +0 -1
  90. package/components/buttonselectuser/ButtonSelectUser-B7GbLfS-.system.js +0 -1
  91. package/components/buttonselectuser/ButtonSelectUser-OAZRY9OR.es.js +0 -101
  92. package/components/buttonsync/ButtonSync-Brk16H8C.es.js +0 -29
  93. package/components/buttonsync/ButtonSync-D5lXmtHs.system.js +0 -1
  94. package/components/buttontoggle/ButtonToggle-1R5y5DCx.es.js +0 -11
  95. package/components/buttontoggle/ButtonToggle-DLsiXxjK.system.js +0 -1
  96. package/components/buttonviewlog/ButtonViewLog-CGsSkrzf.es.js +0 -21
  97. package/components/buttonviewlog/ButtonViewLog-leLO6F_N.system.js +0 -1
  98. package/components/calendar/BaseCalendar-5EI1UTbl.es.js +0 -867
  99. package/components/calendar/BaseCalendar-C02-gmOQ.system.js +0 -1
  100. package/components/calendar/Calendar-B2z-lfi9.es.js +0 -112
  101. package/components/calendar/Calendar-CWw4R5mN.system.js +0 -1
  102. package/components/card/Card-BccG14LV.es.js +0 -47
  103. package/components/card/Card-BjI-Xi0S.system.js +0 -1
  104. package/components/checkbox/Checkbox-DBU7Ji2C.es.js +0 -135
  105. package/components/checkbox/Checkbox-FZg_wq3C.system.js +0 -1
  106. package/components/codesnippet/CodeSnippet--pMQi4aO.es.js +0 -127
  107. package/components/codesnippet/CodeSnippet-BVwAQPSv.system.js +0 -2
  108. package/components/customcolumn/ColumnList-fdR5JfHj.es.js +0 -159
  109. package/components/customcolumn/ColumnList-yaNVEQFA.system.js +0 -1
  110. package/components/customcolumn/CustomColumn-CfvCLH4v.es.js +0 -139
  111. package/components/customcolumn/CustomColumn-D3u59-Rd.system.js +0 -1
  112. package/components/customcolumn/helpers/setVisibilityColumn.helper-B1vEZDtD.system.js +0 -1
  113. package/components/customcolumn/helpers/setVisibilityColumn.helper-CQ4P_C_9.es.js +0 -16
  114. package/components/datatable/DataTable-BH7Fk88O.es.js +0 -992
  115. package/components/datatable/DataTable-Cko2S6sM.system.js +0 -1
  116. package/components/datatable/MultiRow-B2vMSb7W.es.js +0 -52
  117. package/components/datatable/MultiRow-Sef5icam.system.js +0 -1
  118. package/components/datatable/store/dataTable.store-B4p-hj3w.es.js +0 -37
  119. package/components/datatable/store/dataTable.store-C9376aEJ.system.js +0 -1
  120. package/components/dialog/Dialog-BCcbXSya.es.js +0 -121
  121. package/components/dialog/Dialog-Dv7Jzg4E.system.js +0 -1
  122. package/components/dialogconfirm/DialogConfirm-BU-LRZCo.system.js +0 -1
  123. package/components/dialogconfirm/DialogConfirm-ByIWXisz.es.js +0 -139
  124. package/components/dialogform/DialogForm-DGl_NOEr.system.js +0 -1
  125. package/components/dialogform/DialogForm-tAbix3iC.es.js +0 -222
  126. package/components/dialogselecttree/DialogSelectTree-BrVtt3iG.es.js +0 -268
  127. package/components/dialogselecttree/DialogSelectTree-CT7dKC5N.system.js +0 -1
  128. package/components/dialogselectuser/DialogSelectUser-Bu7z7lUq.es.js +0 -121
  129. package/components/dialogselectuser/DialogSelectUser-DXL_NMJj.system.js +0 -1
  130. package/components/dialogselectuser/DialogSelectUserFilter-BNbIynoa.system.js +0 -1
  131. package/components/dialogselectuser/DialogSelectUserFilter-BgBrQCz1.es.js +0 -44
  132. package/components/dialogselectuser/options/columns-BKDHtwAp.es.js +0 -71
  133. package/components/dialogselectuser/options/columns-DLmJdDTR.system.js +0 -1
  134. package/components/dropdown/Dropdown-BNzT2uLU.system.js +0 -1
  135. package/components/dropdown/Dropdown-Dk4urj-W.es.js +0 -258
  136. package/components/editor/CodeSnippetAdapter-C0f7wytw.es.js +0 -26
  137. package/components/editor/CodeSnippetAdapter-f-VHwbwS.system.js +0 -1
  138. package/components/editor/Editor-RB5MqBs1.es.js +0 -887
  139. package/components/editor/Editor-upU4Z9FH.system.js +0 -1
  140. package/components/editor/EditorButton-CC6U1a_u.system.js +0 -1
  141. package/components/editor/EditorButton-Cfew79JD.es.js +0 -28
  142. package/components/editor/MentionList-BjWKefLh.system.js +0 -1
  143. package/components/editor/MentionList-CdX0_-TK.es.js +0 -58
  144. package/components/editor/MentionSection-5I-FSwew.es.js +0 -52
  145. package/components/editor/MentionSection-CiuaeX4J.system.js +0 -3
  146. package/components/editor/codeSnippetExtension-C-ADHg2S.es.js +0 -40
  147. package/components/editor/codeSnippetExtension-C3uj0fCk.system.js +0 -1
  148. package/components/editor/mentionSectionExtension-DJ6wkX1L.system.js +0 -1
  149. package/components/editor/mentionSectionExtension-rbWufuMT.es.js +0 -46
  150. package/components/editor/suggestion-BcYK0KeI.system.js +0 -1
  151. package/components/editor/suggestion-mkkpQFP-.es.js +0 -41
  152. package/components/fieldwrapper/FieldWrapper-Dc-stQRH.system.js +0 -1
  153. package/components/fieldwrapper/FieldWrapper-DmOogUM5.es.js +0 -35
  154. package/components/fileupload/FileUpload-0EHKlInu.es.js +0 -175
  155. package/components/fileupload/FileUpload-dXrsIAeC.system.js +0 -1
  156. package/components/filtercontainer/FilterContainer-Cd8TpncM.es.js +0 -234
  157. package/components/filtercontainer/FilterContainer-kkw3n3tu.system.js +0 -1
  158. package/components/filtercontainer/helpers/applyFilter.helper-Ci22FrPF.system.js +0 -1
  159. package/components/filtercontainer/helpers/applyFilter.helper-DpVdjYBr.es.js +0 -56
  160. package/components/form/Form-By85t_oI.system.js +0 -1
  161. package/components/form/Form-DhWBpdkq.es.js +0 -181
  162. package/components/hardwaresync/HardwareSync-BckCfIeF.es.js +0 -238
  163. package/components/hardwaresync/HardwareSync-DcgVc0cL.system.js +0 -1
  164. package/components/hardwaresync/store/device.store-DEKXH36R.system.js +0 -1
  165. package/components/hardwaresync/store/device.store-DpVE6Nhl.es.js +0 -20
  166. package/components/icon/Icon-C4kXVcEX.es.js +0 -82
  167. package/components/icon/Icon-D1a666FC.system.js +0 -1
  168. package/components/image/Image-Bf5EaBWP.es.js +0 -170
  169. package/components/image/Image-Cxi0E9gK.system.js +0 -1
  170. package/components/imagecompressor/BackgroundImageCropper-DhrTpgNX.system.js +0 -1
  171. package/components/imagecompressor/BackgroundImageCropper-hiHqCcIy.es.js +0 -52
  172. package/components/imagecompressor/ImageCompressor-C_vnTwmo.system.js +0 -1
  173. package/components/imagecompressor/ImageCompressor-DPo-1Yo8.es.js +0 -509
  174. package/components/imagecompressor/ImageInputInfo-4Ac8cBDM.es.js +0 -46
  175. package/components/imagecompressor/ImageInputInfo-U3hLlbwo.system.js +0 -1
  176. package/components/index-BMti6lK3.es.js +0 -64
  177. package/components/index-DBzSxIov.system.js +0 -1
  178. package/components/inlinemessage/InlineMessage-BPJD82sq.es.js +0 -94
  179. package/components/inlinemessage/InlineMessage-DTyTe5_W.system.js +0 -1
  180. package/components/inputbadge/InputBadge-BUm6Kn-F.system.js +0 -1
  181. package/components/inputbadge/InputBadge-BngtjqHQ.es.js +0 -186
  182. package/components/inputcurrency/InputCurrency-CE4WrJ9k.es.js +0 -1211
  183. package/components/inputcurrency/InputCurrency-DaJuUujH.system.js +0 -1
  184. package/components/inputemail/InputEmail-8E04RVeq.system.js +0 -1
  185. package/components/inputemail/InputEmail-BFeY1l9Z.es.js +0 -49
  186. package/components/inputgroup/InputGroup-CTHxHL8n.system.js +0 -1
  187. package/components/inputgroup/InputGroup-CUxNAtDZ.es.js +0 -56
  188. package/components/inputnumber/InputNumber-BJ8Qm27k.system.js +0 -1
  189. package/components/inputnumber/InputNumber-CQd01PQ5.es.js +0 -232
  190. package/components/inputpassword/InputPassword-D3jaUFfR.system.js +0 -1
  191. package/components/inputpassword/InputPassword-DGWsHAB4.es.js +0 -121
  192. package/components/inputphonenumber/InputPhoneNumber-3To4Ktp9.system.js +0 -1
  193. package/components/inputphonenumber/InputPhoneNumber-DVAOWAj6.es.js +0 -162
  194. package/components/inputphonenumber/helpers/getUserLocation.helper-B0lZav7S.es.js +0 -15
  195. package/components/inputphonenumber/helpers/getUserLocation.helper-CSC5I9tB.system.js +0 -1
  196. package/components/inputphonenumber/helpers/timeZoneCityToCountry.json-CUP9NUYE.es.js +0 -423
  197. package/components/inputphonenumber/helpers/timeZoneCityToCountry.json-DgzOgH_M.system.js +0 -1
  198. package/components/inputrangenumber/InputRangeNumber-Cfea6oM_.es.js +0 -134
  199. package/components/inputrangenumber/InputRangeNumber-iLScQOa6.system.js +0 -1
  200. package/components/inputsearch/InputSearch-CHJP-N57.es.js +0 -53
  201. package/components/inputsearch/InputSearch-DkB4O0Dc.system.js +0 -1
  202. package/components/inputtext/InputText-BEDxrRqK.es.js +0 -242
  203. package/components/inputtext/InputText-BOgH8xpA.system.js +0 -1
  204. package/components/inputurl/InputURL-CNrOkrAC.es.js +0 -61
  205. package/components/inputurl/InputURL-D4QWV9G7.system.js +0 -1
  206. package/components/invisiblefield/InvisibleField-4XbiOrqw.es.js +0 -27
  207. package/components/invisiblefield/InvisibleField-BHudtX2g.system.js +0 -1
  208. package/components/litedropdown/LiteDropdown-BbDUnfnd.es.js +0 -102
  209. package/components/litedropdown/LiteDropdown-DTXwb5JR.system.js +0 -1
  210. package/components/loading/Loading-DIfTUHr7.es.js +0 -24
  211. package/components/loading/Loading-Vb4HctBJ.system.js +0 -1
  212. package/components/menu/Menu-BtzGGhbp.es.js +0 -73
  213. package/components/menu/Menu-CPm5vua_.system.js +0 -1
  214. package/components/menuitem/MenuItem-8yxkFTug.system.js +0 -1
  215. package/components/menuitem/MenuItem-uLVAqgBS.es.js +0 -65
  216. package/components/multiselect/MultiSelect-BoPpQ31j.es.js +0 -189
  217. package/components/multiselect/MultiSelect-D5NEDtGe.system.js +0 -1
  218. package/components/overlaypanel/OverlayPanel-BKCivqTs.system.js +0 -1
  219. package/components/overlaypanel/OverlayPanel-bQbjuUgG.es.js +0 -49
  220. package/components/tabmenu/TabMenu-BBk8EW-C.system.js +0 -1
  221. package/components/tabmenu/TabMenu-ByKBaVsd.es.js +0 -108
  222. package/components/tagtype/TagType-CAXomDiD.es.js +0 -49
  223. package/components/tagtype/TagType-i4RK2JbL.system.js +0 -1
  224. package/components/textarea/Textarea-CnAlgPq5.es.js +0 -108
  225. package/components/textarea/Textarea-qirKOw5z.system.js +0 -1
  226. package/components/timeline/Timeline-CF2qJo4E.es.js +0 -120
  227. package/components/timeline/Timeline-DKfKWZFI.system.js +0 -1
  228. package/components/timeline/TimelineContentByType-_cKGDWAW.es.js +0 -108
  229. package/components/timeline/TimelineContentByType-uxM3NSqd.system.js +0 -1
  230. package/components/toast/Toast-C3D50rGo.system.js +0 -1
  231. package/components/toast/Toast-DRUJCz4I.es.js +0 -74
  232. package/components/toggleswitch/ToggleSwitch-De-_8nQl.es.js +0 -90
  233. package/components/toggleswitch/ToggleSwitch-DuyahX09.system.js +0 -1
  234. package/components/transactionroles/TransactionRoles-WrcXMwBu.es.js +0 -223
  235. package/components/transactionroles/TransactionRoles-iVQyWseb.system.js +0 -1
  236. package/components/tree/Tree-93NvdElH.es.js +0 -267
  237. package/components/tree/Tree-BTTVTAEH.system.js +0 -1
  238. package/components/tree/helpers/filterNodeKeys.helper-CmamKUTa.system.js +0 -1
  239. package/components/tree/helpers/filterNodeKeys.helper-z7SxLuvZ.es.js +0 -10
  240. package/components/treesearchinput/TreeSearchInput-BG2TfunA.system.js +0 -1
  241. package/components/treesearchinput/TreeSearchInput-CNfoc3f6.es.js +0 -56
  242. package/components/username/UserName-A1N6Q7bS.system.js +0 -1
  243. package/components/username/UserName-D5C0qdbu.es.js +0 -132
  244. package/components/userwithicon/UserWithIcon-CHHDfQG0.es.js +0 -18
  245. package/components/userwithicon/UserWithIcon-DnY6loZc.system.js +0 -1
  246. package/components/validatormessage/ValidatorMessage-BtKfBXzO.es.js +0 -19
  247. package/components/validatormessage/ValidatorMessage-VVfyqlRF.system.js +0 -1
  248. package/config/config.esm-BZepf1kR.system.js +0 -1
  249. package/config/config.esm-Drl0fECZ.es.js +0 -212
  250. package/config/defaultProps-B3syHUKt.system.js +0 -1
  251. package/config/defaultProps-BC_lvAG9.es.js +0 -136
  252. package/config/locale-DK6d2rJ3.system.js +0 -1
  253. package/config/locale-pQnRpNZ6.es.js +0 -85
  254. package/event-bus/index-CykcrsqY.system.js +0 -1
  255. package/event-bus/index-PQwO5T6B.es.js +0 -6
  256. package/event-bus/mitt-BjeF6e5j.es.js +0 -53
  257. package/event-bus/mitt-X_X8W9w9.system.js +0 -1
  258. package/plugins/WangsVue-Dl5OiLXF.es.js +0 -332
  259. package/plugins/WangsVue-Dugc3GRS.system.js +0 -1
  260. package/plugins/i18n-BVujDShu.system.js +0 -1
  261. package/plugins/i18n-CIoi8go0.es.js +0 -89
  262. package/utils/addAttachment.util-CPzZEHNG.system.js +0 -1
  263. package/utils/addAttachment.util-D9sYCBjS.es.js +0 -10
  264. package/utils/computeAutoPlacement-Ac2MkS5B.es.js +0 -33
  265. package/utils/computeAutoPlacement-DCaci6j-.system.js +0 -1
  266. package/utils/computeOffsets-Cx9i84Mn.system.js +0 -1
  267. package/utils/computeOffsets-DXWJPq7f.es.js +0 -56
  268. package/utils/date.util-DbjB32co.es.js +0 -198
  269. package/utils/date.util-rX9kq_yC.system.js +0 -1
  270. package/utils/detectOverflow-BrAC_sJF.system.js +0 -1
  271. package/utils/detectOverflow-CETbaen7.es.js +0 -88
  272. package/utils/exportToExcel.util-Bf-PpzHW.system.js +0 -1
  273. package/utils/exportToExcel.util-jz7aU08m.es.js +0 -32
  274. package/utils/genPlaceholder.util-0UuDQpbx.es.js +0 -37
  275. package/utils/genPlaceholder.util-CxMG7LbT.system.js +0 -1
  276. package/utils/mergePropsWithDefaults.util-BKcJzgvs.es.js +0 -9
  277. package/utils/mergePropsWithDefaults.util-CXowvEKY.system.js +0 -1
  278. package/utils/object.util-6veM2gu5.es.js +0 -51
  279. package/utils/object.util-uApor4uP.system.js +0 -1
  280. package/utils/orderModifiers-qXBm1wkD.system.js +0 -1
  281. package/utils/orderModifiers-rOag5Cyh.es.js +0 -31
  282. package/utils/role.util-BdUNoOqf.es.js +0 -67
  283. package/utils/role.util-Co8OMWnc.system.js +0 -1
  284. package/utils/textFormatter.util-BjenkyWf.system.js +0 -1
  285. package/utils/textFormatter.util-CYul3RpH.es.js +0 -21
  286. package/utils/toast.util-C7p3h9XQ.es.js +0 -52
  287. package/utils/toast.util-DPtauJUV.system.js +0 -1
  288. package/utils/utils.esm-iwnsFuDg.system.js +0 -23
  289. package/utils/utils.esm-s_-kLKXf.es.js +0 -1080
  290. package/utils/xlsx.util-FKEpiU2t.system.js +0 -1
  291. package/utils/xlsx.util-LU1upHR3.es.js +0 -8
  292. package/vendor/@popperjs/core-DFLwc7xU.system.js +0 -1
  293. package/vendor/@popperjs/core-DJHUrK4e.es.js +0 -748
  294. package/vendor/@tiptap/core-D4rHEGhs.system.js +0 -80
  295. package/vendor/@tiptap/core-DSbPv8xh.es.js +0 -2868
  296. package/vendor/@tiptap/extension-bold-CvAjR8FR.es.js +0 -71
  297. package/vendor/@tiptap/extension-bold-DI_Zfdzb.system.js +0 -1
  298. package/vendor/@tiptap/extension-bubble-menu-0_0wc2P7.system.js +0 -1
  299. package/vendor/@tiptap/extension-bubble-menu-DY29ulfu.es.js +0 -128
  300. package/vendor/@tiptap/extension-bullet-list-BrkIcd-z.es.js +0 -53
  301. package/vendor/@tiptap/extension-bullet-list-CgIgW9RG.system.js +0 -1
  302. package/vendor/@tiptap/extension-code-BtAtPCQQ.es.js +0 -51
  303. package/vendor/@tiptap/extension-code-SOANT0O3.system.js +0 -1
  304. package/vendor/@tiptap/extension-floating-menu-BTwcx1u8.es.js +0 -99
  305. package/vendor/@tiptap/extension-floating-menu-Dtu9tcTW.system.js +0 -1
  306. package/vendor/@tiptap/extension-heading-B6PMnqvS.es.js +0 -54
  307. package/vendor/@tiptap/extension-heading-BpK6SnFO.system.js +0 -1
  308. package/vendor/@tiptap/extension-history-CTFK6g3n.system.js +0 -1
  309. package/vendor/@tiptap/extension-history-DdPDTH0G.es.js +0 -35
  310. package/vendor/@tiptap/extension-image-BNa6azmK.system.js +0 -1
  311. package/vendor/@tiptap/extension-image-DCo2JDZp.es.js +0 -64
  312. package/vendor/@tiptap/extension-italic-D09oL4ps.es.js +0 -70
  313. package/vendor/@tiptap/extension-italic-w93Lmtg_.system.js +0 -1
  314. package/vendor/@tiptap/extension-link-CV6Fodq9.es.js +0 -262
  315. package/vendor/@tiptap/extension-link-FrdAKaJ2.system.js +0 -1
  316. package/vendor/@tiptap/extension-list-item-BRio_hHs.system.js +0 -1
  317. package/vendor/@tiptap/extension-list-item-D8wSpPxS.es.js +0 -33
  318. package/vendor/@tiptap/extension-mention-cFXQdAs7.es.js +0 -130
  319. package/vendor/@tiptap/extension-mention-y62_tYRn.system.js +0 -1
  320. package/vendor/@tiptap/extension-ordered-list-BZU-Ty3o.es.js +0 -71
  321. package/vendor/@tiptap/extension-ordered-list-CH9LyYR1.system.js +0 -1
  322. package/vendor/@tiptap/extension-placeholder-CsBxoitZ.es.js +0 -52
  323. package/vendor/@tiptap/extension-placeholder-Dqw7HNAJ.system.js +0 -1
  324. package/vendor/@tiptap/extension-underline-DklFOEoR.es.js +0 -40
  325. package/vendor/@tiptap/extension-underline-SGsaBlAL.system.js +0 -1
  326. package/vendor/@tiptap/suggestion-B3Grok9m.system.js +0 -1
  327. package/vendor/@tiptap/suggestion-Dg-vhPtN.es.js +0 -131
  328. package/vendor/@tiptap/vue-3-BOfcUn5G.es.js +0 -436
  329. package/vendor/@tiptap/vue-3-ZMNXXvBd.system.js +0 -1
  330. package/vendor/highlight.js-ClnJXT0q.system.js +0 -2
  331. package/vendor/highlight.js-Czlvg6fB.es.js +0 -2493
  332. package/vendor/linkifyjs-BxsOjwQz.es.js +0 -705
  333. package/vendor/linkifyjs-CMLfIa6I.system.js +0 -5
  334. package/vendor/lodash-B6nNLFd3.es.js +0 -127
  335. package/vendor/lodash-BuO1dYnQ.system.js +0 -1
  336. package/vendor/lodash-es-C3G1Cc1m.system.js +0 -1
  337. package/vendor/lodash-es-CJerBxJQ.es.js +0 -766
  338. package/vendor/orderedmap-B3SOk52B.es.js +0 -103
  339. package/vendor/orderedmap-Dwr31MF0.system.js +0 -1
  340. package/vendor/primevue-C5Z_k4WB.system.js +0 -171
  341. package/vendor/primevue-DkBtKf1Y.es.js +0 -12649
  342. package/vendor/prosemirror-commands-CUjo-x4s.es.js +0 -383
  343. package/vendor/prosemirror-commands-Dn6KNBP0.system.js +0 -2
  344. package/vendor/prosemirror-history-BPOe4I2H.es.js +0 -248
  345. package/vendor/prosemirror-history-BTrzvpc-.system.js +0 -1
  346. package/vendor/prosemirror-keymap-BvIUhswp.es.js +0 -60
  347. package/vendor/prosemirror-keymap-WRY9zVpK.system.js +0 -1
  348. package/vendor/prosemirror-model-D2n-Dx_L.es.js +0 -2736
  349. package/vendor/prosemirror-model-DTWK5xnv.system.js +0 -4
  350. package/vendor/prosemirror-schema-list-BvrICwYb.es.js +0 -87
  351. package/vendor/prosemirror-schema-list-Dv9KV10j.system.js +0 -1
  352. package/vendor/prosemirror-state-BW6XGB3U.es.js +0 -820
  353. package/vendor/prosemirror-state-COJ-aZZ4.system.js +0 -1
  354. package/vendor/prosemirror-transform-BXNgAhmF.system.js +0 -2
  355. package/vendor/prosemirror-transform-DvAmofec.es.js +0 -1507
  356. package/vendor/prosemirror-view-C9ZQp8VZ.es.js +0 -3742
  357. package/vendor/prosemirror-view-DOxSTbB-.system.js +0 -5
  358. package/vendor/rope-sequence-4t46C6az.system.js +0 -1
  359. package/vendor/rope-sequence-sEGCUMi8.es.js +0 -100
  360. package/vendor/simplebar-core-CtWK1-xd.system.js +0 -1
  361. package/vendor/simplebar-core-ofTx4QqK.es.js +0 -333
  362. package/vendor/simplebar-vue-BHVrvuf1.system.js +0 -1
  363. package/vendor/simplebar-vue-dpCx-K7E.es.js +0 -176
  364. package/vendor/tippy.js-6wuFov1j.system.js +0 -1
  365. package/vendor/tippy.js-i1ic-msv.es.js +0 -721
  366. package/vendor/uuid-93tp0umt.es.js +0 -9
  367. package/vendor/uuid-Cymn6orr.system.js +0 -1
  368. package/vendor/vee-validate-Cc_B-qII.system.js +0 -5
  369. package/vendor/vee-validate-RE5RuswC.es.js +0 -1309
  370. package/vendor/vue-advanced-cropper-CshlvNaD.es.js +0 -1380
  371. package/vendor/vue-advanced-cropper-NG93jHnU.system.js +0 -20
  372. package/vendor/w3c-keyname-BSD-PgAi.system.js +0 -1
  373. package/vendor/w3c-keyname-CLxH8j-f.es.js +0 -92
  374. /package/{assets/lottie/loading-plane-CgfbWppy.system.js → loading-page-CgfbWppy.js} +0 -0
  375. /package/{assets/lottie/loading-plane-CoXtqoc9.es.js → loading-page-CoXtqoc9.js} +0 -0
@@ -1,5 +0,0 @@
1
- System.register(["./prosemirror-state-COJ-aZZ4.system.js","./prosemirror-model-DTWK5xnv.system.js","./prosemirror-transform-BXNgAhmF.system.js"],function(ze,ai){"use strict";var N,ee,C,ct,q,me,z,Le,dt,ft;return{setters:[D=>{N=D.N,ee=D.S,C=D.T,ct=D.A},D=>{q=D.b,me=D.D,z=D.F,Le=D.a,dt=D.M},D=>{ft=D.d}],execute:function(){const D=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},ce=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let $e=null;const K=function(t,e,n){let o=$e||($e=document.createRange());return o.setEnd(t,n??t.nodeValue.length),o.setStart(t,e||0),o},xn=function(){$e=null},te=function(t,e,n,o){return n&&(ht(t,e,n,o,-1)||ht(t,e,n,o,1))},kn=/^(img|br|input|textarea|hr)$/i;function ht(t,e,n,o,i){for(;;){if(t==n&&e==o)return!0;if(e==(i<0?0:V(t))){let s=t.parentNode;if(!s||s.nodeType!=1||ge(t)||kn.test(t.nodeName)||t.contentEditable=="false")return!1;e=D(t)+(i<0?0:1),t=s}else if(t.nodeType==1){if(t=t.childNodes[e+(i<0?-1:0)],t.contentEditable=="false")return!1;e=i<0?V(t):0}else return!1}}function V(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Tn(t,e){for(;;){if(t.nodeType==3&&e)return t;if(t.nodeType==1&&e>0){if(t.contentEditable=="false")return null;t=t.childNodes[e-1],e=V(t)}else if(t.parentNode&&!ge(t))e=D(t),t=t.parentNode;else return null}}function An(t,e){for(;;){if(t.nodeType==3&&e<t.nodeValue.length)return t;if(t.nodeType==1&&e<t.childNodes.length){if(t.contentEditable=="false")return null;t=t.childNodes[e],e=0}else if(t.parentNode&&!ge(t))e=D(t)+1,t=t.parentNode;else return null}}function En(t,e,n){for(let o=e==0,i=e==V(t);o||i;){if(t==n)return!0;let s=D(t);if(t=t.parentNode,!t)return!1;o=o&&s==0,i=i&&s==V(t)}}function ge(t){let e;for(let n=t;n&&!(e=n.pmViewDesc);n=n.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}const ke=function(t){return t.focusNode&&te(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function ne(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function Pn(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function Vn(t,e,n){if(t.caretPositionFromPoint)try{let o=t.caretPositionFromPoint(e,n);if(o)return{node:o.offsetNode,offset:Math.min(V(o.offsetNode),o.offset)}}catch{}if(t.caretRangeFromPoint){let o=t.caretRangeFromPoint(e,n);if(o)return{node:o.startContainer,offset:Math.min(V(o.startContainer),o.startOffset)}}}const L=typeof navigator<"u"?navigator:null,ut=typeof document<"u"?document:null,j=L&&L.userAgent||"",qe=/Edge\/(\d+)/.exec(j),pt=/MSIE \d/.exec(j),Ke=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(j),A=!!(pt||Ke||qe),U=pt?document.documentMode:Ke?+Ke[1]:qe?+qe[1]:0,F=!A&&/gecko\/(\d+)/i.test(j);F&&+(/Firefox\/(\d+)/.exec(j)||[0,0])[1];const He=!A&&/Chrome\/(\d+)/.exec(j),O=!!He,mt=He?+He[1]:0,x=!A&&!!L&&/Apple Computer/.test(L.vendor),de=x&&(/Mobile\/\w+/.test(j)||!!L&&L.maxTouchPoints>2),R=de||(L?/Mac/.test(L.platform):!1),Rn=L?/Win/.test(L.platform):!1,H=/Android \d/.test(j),ye=!!ut&&"webkitFontSmoothing"in ut.documentElement.style,Bn=ye?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function In(t){let e=t.defaultView&&t.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function W(t,e){return typeof t=="number"?t:t[e]}function Fn(t){let e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,o=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*n,top:e.top,bottom:e.top+t.clientHeight*o}}function gt(t,e,n){let o=t.someProp("scrollThreshold")||0,i=t.someProp("scrollMargin")||5,s=t.dom.ownerDocument;for(let r=n||t.dom;r;){if(r.nodeType!=1){r=ce(r);continue}let l=r,a=l==s.body,c=a?In(s):Fn(l),d=0,f=0;if(e.top<c.top+W(o,"top")?f=-(c.top-e.top+W(i,"top")):e.bottom>c.bottom-W(o,"bottom")&&(f=e.bottom-e.top>c.bottom-c.top?e.top+W(i,"top")-c.top:e.bottom-c.bottom+W(i,"bottom")),e.left<c.left+W(o,"left")?d=-(c.left-e.left+W(i,"left")):e.right>c.right-W(o,"right")&&(d=e.right-c.right+W(i,"right")),d||f)if(a)s.defaultView.scrollBy(d,f);else{let p=l.scrollLeft,h=l.scrollTop;f&&(l.scrollTop+=f),d&&(l.scrollLeft+=d);let g=l.scrollLeft-p,m=l.scrollTop-h;e={left:e.left-g,top:e.top-m,right:e.right-g,bottom:e.bottom-m}}let u=a?"fixed":getComputedStyle(r).position;if(/^(fixed|sticky)$/.test(u))break;r=u=="absolute"?r.offsetParent:ce(r)}}function zn(t){let e=t.dom.getBoundingClientRect(),n=Math.max(0,e.top),o,i;for(let s=(e.left+e.right)/2,r=n+1;r<Math.min(innerHeight,e.bottom);r+=5){let l=t.root.elementFromPoint(s,r);if(!l||l==t.dom||!t.dom.contains(l))continue;let a=l.getBoundingClientRect();if(a.top>=n-20){o=l,i=a.top;break}}return{refDOM:o,refTop:i,stack:yt(t.dom)}}function yt(t){let e=[],n=t.ownerDocument;for(let o=t;o&&(e.push({dom:o,top:o.scrollTop,left:o.scrollLeft}),t!=n);o=ce(o));return e}function Ln({refDOM:t,refTop:e,stack:n}){let o=t?t.getBoundingClientRect().top:0;bt(n,o==0?0:o-e)}function bt(t,e){for(let n=0;n<t.length;n++){let{dom:o,top:i,left:s}=t[n];o.scrollTop!=i+e&&(o.scrollTop=i+e),o.scrollLeft!=s&&(o.scrollLeft=s)}}let fe=null;function $n(t){if(t.setActive)return t.setActive();if(fe)return t.focus(fe);let e=yt(t);t.focus(fe==null?{get preventScroll(){return fe={preventScroll:!0},!0}}:void 0),fe||(fe=!1,bt(e,0))}function Dt(t,e){let n,o=2e8,i,s=0,r=e.top,l=e.top,a,c;for(let d=t.firstChild,f=0;d;d=d.nextSibling,f++){let u;if(d.nodeType==1)u=d.getClientRects();else if(d.nodeType==3)u=K(d).getClientRects();else continue;for(let p=0;p<u.length;p++){let h=u[p];if(h.top<=r&&h.bottom>=l){r=Math.max(h.bottom,r),l=Math.min(h.top,l);let g=h.left>e.left?h.left-e.left:h.right<e.left?e.left-h.right:0;if(g<o){n=d,o=g,i=g&&n.nodeType==3?{left:h.right<e.left?h.right:h.left,top:e.top}:e,d.nodeType==1&&g&&(s=f+(e.left>=(h.left+h.right)/2?1:0));continue}}else h.top>e.top&&!a&&h.left<=e.left&&h.right>=e.left&&(a=d,c={left:Math.max(h.left,Math.min(h.right,e.left)),top:h.top});!n&&(e.left>=h.right&&e.top>=h.top||e.left>=h.left&&e.top>=h.bottom)&&(s=f+1)}}return!n&&a&&(n=a,i=c,o=0),n&&n.nodeType==3?qn(n,i):!n||o&&n.nodeType==1?{node:t,offset:s}:Dt(n,i)}function qn(t,e){let n=t.nodeValue.length,o=document.createRange();for(let i=0;i<n;i++){o.setEnd(t,i+1),o.setStart(t,i);let s=Y(o,1);if(s.top!=s.bottom&&We(e,s))return{node:t,offset:i+(e.left>=(s.left+s.right)/2?1:0)}}return{node:t,offset:0}}function We(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function Kn(t,e){let n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left<t.getBoundingClientRect().left?n:t}function Hn(t,e,n){let{node:o,offset:i}=Dt(e,n),s=-1;if(o.nodeType==1&&!o.firstChild){let r=o.getBoundingClientRect();s=r.left!=r.right&&n.left>(r.left+r.right)/2?1:-1}return t.docView.posFromDOM(o,i,s)}function Wn(t,e,n,o){let i=-1;for(let s=e,r=!1;s!=t.dom;){let l=t.docView.nearestDesc(s,!0),a;if(!l)return null;if(l.dom.nodeType==1&&(l.node.isBlock&&l.parent||!l.contentDOM)&&((a=l.dom.getBoundingClientRect()).width||a.height)&&(l.node.isBlock&&l.parent&&(!r&&a.left>o.left||a.top>o.top?i=l.posBefore:(!r&&a.right<o.left||a.bottom<o.top)&&(i=l.posAfter),r=!0),!l.contentDOM&&i<0&&!l.node.isText))return(l.node.isBlock?o.top<(a.top+a.bottom)/2:o.left<(a.left+a.right)/2)?l.posBefore:l.posAfter;s=l.dom.parentNode}return i>-1?i:t.docView.posFromDOM(e,n,-1)}function Nt(t,e,n){let o=t.childNodes.length;if(o&&n.top<n.bottom)for(let i=Math.max(0,Math.min(o-1,Math.floor(o*(e.top-n.top)/(n.bottom-n.top))-2)),s=i;;){let r=t.childNodes[s];if(r.nodeType==1){let l=r.getClientRects();for(let a=0;a<l.length;a++){let c=l[a];if(We(e,c))return Nt(r,e,c)}}if((s=(s+1)%o)==i)break}return t}function _n(t,e){let n=t.dom.ownerDocument,o,i=0,s=Vn(n,e.left,e.top);s&&({node:o,offset:i}=s);let r=(t.root.elementFromPoint?t.root:n).elementFromPoint(e.left,e.top),l;if(!r||!t.dom.contains(r.nodeType!=1?r.parentNode:r)){let c=t.dom.getBoundingClientRect();if(!We(e,c)||(r=Nt(t.dom,e,c),!r))return null}if(x)for(let c=r;o&&c;c=ce(c))c.draggable&&(o=void 0);if(r=Kn(r,e),o){if(F&&o.nodeType==1&&(i=Math.min(i,o.childNodes.length),i<o.childNodes.length)){let d=o.childNodes[i],f;d.nodeName=="IMG"&&(f=d.getBoundingClientRect()).right<=e.left&&f.bottom>e.top&&i++}let c;ye&&i&&o.nodeType==1&&(c=o.childNodes[i-1]).nodeType==1&&c.contentEditable=="false"&&c.getBoundingClientRect().top>=e.top&&i--,o==t.dom&&i==o.childNodes.length-1&&o.lastChild.nodeType==1&&e.top>o.lastChild.getBoundingClientRect().bottom?l=t.state.doc.content.size:(i==0||o.nodeType!=1||o.childNodes[i-1].nodeName!="BR")&&(l=Wn(t,o,i,e))}l==null&&(l=Hn(t,r,e));let a=t.docView.nearestDesc(r,!0);return{pos:l,inside:a?a.posAtStart-a.border:-1}}function St(t){return t.top<t.bottom||t.left<t.right}function Y(t,e){let n=t.getClientRects();if(n.length){let o=n[e<0?0:n.length-1];if(St(o))return o}return Array.prototype.find.call(n,St)||t.getBoundingClientRect()}const jn=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Ct(t,e,n){let{node:o,offset:i,atom:s}=t.docView.domFromPos(e,n<0?-1:1),r=ye||F;if(o.nodeType==3)if(r&&(jn.test(o.nodeValue)||(n<0?!i:i==o.nodeValue.length))){let a=Y(K(o,i,i),n);if(F&&i&&/\s/.test(o.nodeValue[i-1])&&i<o.nodeValue.length){let c=Y(K(o,i-1,i-1),-1);if(c.top==a.top){let d=Y(K(o,i,i+1),-1);if(d.top!=a.top)return be(d,d.left<c.left)}}return a}else{let a=i,c=i,d=n<0?1:-1;return n<0&&!i?(c++,d=-1):n>=0&&i==o.nodeValue.length?(a--,d=1):n<0?a--:c++,be(Y(K(o,a,c),d),d<0)}if(!t.state.doc.resolve(e-(s||0)).parent.inlineContent){if(s==null&&i&&(n<0||i==V(o))){let a=o.childNodes[i-1];if(a.nodeType==1)return _e(a.getBoundingClientRect(),!1)}if(s==null&&i<V(o)){let a=o.childNodes[i];if(a.nodeType==1)return _e(a.getBoundingClientRect(),!0)}return _e(o.getBoundingClientRect(),n>=0)}if(s==null&&i&&(n<0||i==V(o))){let a=o.childNodes[i-1],c=a.nodeType==3?K(a,V(a)-(r?0:1)):a.nodeType==1&&(a.nodeName!="BR"||!a.nextSibling)?a:null;if(c)return be(Y(c,1),!1)}if(s==null&&i<V(o)){let a=o.childNodes[i];for(;a.pmViewDesc&&a.pmViewDesc.ignoreForCoords;)a=a.nextSibling;let c=a?a.nodeType==3?K(a,0,r?0:1):a.nodeType==1?a:null:null;if(c)return be(Y(c,-1),!0)}return be(Y(o.nodeType==3?K(o):o,-n),n>=0)}function be(t,e){if(t.width==0)return t;let n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function _e(t,e){if(t.height==0)return t;let n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function Ot(t,e,n){let o=t.state,i=t.root.activeElement;o!=e&&t.updateState(e),i!=t.dom&&t.focus();try{return n()}finally{o!=e&&t.updateState(o),i!=t.dom&&i&&i.focus()}}function Un(t,e,n){let o=e.selection,i=n=="up"?o.$from:o.$to;return Ot(t,e,()=>{let{node:s}=t.docView.domFromPos(i.pos,n=="up"?-1:1);for(;;){let l=t.docView.nearestDesc(s,!0);if(!l)break;if(l.node.isBlock){s=l.contentDOM||l.dom;break}s=l.dom.parentNode}let r=Ct(t,i.pos,1);for(let l=s.firstChild;l;l=l.nextSibling){let a;if(l.nodeType==1)a=l.getClientRects();else if(l.nodeType==3)a=K(l,0,l.nodeValue.length).getClientRects();else continue;for(let c=0;c<a.length;c++){let d=a[c];if(d.bottom>d.top+1&&(n=="up"?r.top-d.top>(d.bottom-r.top)*2:d.bottom-r.bottom>(r.bottom-d.top)*2))return!1}}return!0})}const Yn=/[\u0590-\u08ac]/;function Gn(t,e,n){let{$head:o}=e.selection;if(!o.parent.isTextblock)return!1;let i=o.parentOffset,s=!i,r=i==o.parent.content.size,l=t.domSelection();return l?!Yn.test(o.parent.textContent)||!l.modify?n=="left"||n=="backward"?s:r:Ot(t,e,()=>{let{focusNode:a,focusOffset:c,anchorNode:d,anchorOffset:f}=t.domSelectionRange(),u=l.caretBidiLevel;l.modify("move",n,"character");let p=o.depth?t.docView.domAfterPos(o.before()):t.dom,{focusNode:h,focusOffset:g}=t.domSelectionRange(),m=h&&!p.contains(h.nodeType==1?h:h.parentNode)||a==h&&c==g;try{l.collapse(d,f),a&&(a!=d||c!=f)&&l.extend&&l.extend(a,c)}catch{}return u!=null&&(l.caretBidiLevel=u),m}):o.pos==o.start()||o.pos==o.end()}let Mt=null,xt=null,kt=!1;function Xn(t,e,n){return Mt==e&&xt==n?kt:(Mt=e,xt=n,kt=n=="up"||n=="down"?Un(t,e,n):Gn(t,e,n))}const B=0,Tt=1,oe=2,$=3;class De{constructor(e,n,o,i){this.parent=e,this.children=n,this.dom=o,this.contentDOM=i,this.dirty=B,o.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,n,o){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let n=0;n<this.children.length;n++)e+=this.children[n].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let n=0,o=this.posAtStart;;n++){let i=this.children[n];if(i==e)return o;o+=i.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,n,o){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(o<0){let s,r;if(e==this.contentDOM)s=e.childNodes[n-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;s=e.previousSibling}for(;s&&!((r=s.pmViewDesc)&&r.parent==this);)s=s.previousSibling;return s?this.posBeforeChild(r)+r.size:this.posAtStart}else{let s,r;if(e==this.contentDOM)s=e.childNodes[n];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;s=e.nextSibling}for(;s&&!((r=s.pmViewDesc)&&r.parent==this);)s=s.nextSibling;return s?this.posBeforeChild(r):this.posAtEnd}let i;if(e==this.dom&&this.contentDOM)i=n>D(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))i=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let s=e;;s=s.parentNode){if(s==this.dom){i=!1;break}if(s.previousSibling)break}if(i==null&&n==e.childNodes.length)for(let s=e;;s=s.parentNode){if(s==this.dom){i=!0;break}if(s.nextSibling)break}}return i??o>0?this.posAtEnd:this.posAtStart}nearestDesc(e,n=!1){for(let o=!0,i=e;i;i=i.parentNode){let s=this.getDesc(i),r;if(s&&(!n||s.node))if(o&&(r=s.nodeDOM)&&!(r.nodeType==1?r.contains(e.nodeType==1?e:e.parentNode):r==e))o=!1;else return s}}getDesc(e){let n=e.pmViewDesc;for(let o=n;o;o=o.parent)if(o==this)return n}posFromDOM(e,n,o){for(let i=e;i;i=i.parentNode){let s=this.getDesc(i);if(s)return s.localPosFromDOM(e,n,o)}return-1}descAt(e){for(let n=0,o=0;n<this.children.length;n++){let i=this.children[n],s=o+i.size;if(o==e&&s!=o){for(;!i.border&&i.children.length;)for(let r=0;r<i.children.length;r++){let l=i.children[r];if(l.size){i=l;break}}return i}if(e<s)return i.descAt(e-o-i.border);o=s}}domFromPos(e,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let o=0,i=0;for(let s=0;o<this.children.length;o++){let r=this.children[o],l=s+r.size;if(l>e||r instanceof Pt){i=e-s;break}s=l}if(i)return this.children[o].domFromPos(i-this.children[o].border,n);for(let s;o&&!(s=this.children[o-1]).size&&s instanceof At&&s.side>=0;o--);if(n<=0){let s,r=!0;for(;s=o?this.children[o-1]:null,!(!s||s.dom.parentNode==this.contentDOM);o--,r=!1);return s&&n&&r&&!s.border&&!s.domAtom?s.domFromPos(s.size,n):{node:this.contentDOM,offset:s?D(s.dom)+1:0}}else{let s,r=!0;for(;s=o<this.children.length?this.children[o]:null,!(!s||s.dom.parentNode==this.contentDOM);o++,r=!1);return s&&r&&!s.border&&!s.domAtom?s.domFromPos(0,n):{node:this.contentDOM,offset:s?D(s.dom):this.contentDOM.childNodes.length}}}parseRange(e,n,o=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let i=-1,s=-1;for(let r=o,l=0;;l++){let a=this.children[l],c=r+a.size;if(i==-1&&e<=c){let d=r+a.border;if(e>=d&&n<=c-a.border&&a.node&&a.contentDOM&&this.contentDOM.contains(a.contentDOM))return a.parseRange(e,n,d);e=r;for(let f=l;f>0;f--){let u=this.children[f-1];if(u.size&&u.dom.parentNode==this.contentDOM&&!u.emptyChildAt(1)){i=D(u.dom)+1;break}e-=u.size}i==-1&&(i=0)}if(i>-1&&(c>n||l==this.children.length-1)){n=c;for(let d=l+1;d<this.children.length;d++){let f=this.children[d];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(-1)){s=D(f.dom);break}n+=f.size}s==-1&&(s=this.contentDOM.childNodes.length);break}r=c}return{node:this.contentDOM,from:e,to:n,fromOffset:i,toOffset:s}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let n=this.children[e<0?0:this.children.length-1];return n.size==0||n.emptyChildAt(e)}domAfterPos(e){let{node:n,offset:o}=this.domFromPos(e,0);if(n.nodeType!=1||o==n.childNodes.length)throw new RangeError("No node after pos "+e);return n.childNodes[o]}setSelection(e,n,o,i=!1){let s=Math.min(e,n),r=Math.max(e,n);for(let p=0,h=0;p<this.children.length;p++){let g=this.children[p],m=h+g.size;if(s>h&&r<m)return g.setSelection(e-h-g.border,n-h-g.border,o,i);h=m}let l=this.domFromPos(e,e?-1:1),a=n==e?l:this.domFromPos(n,n?-1:1),c=o.root.getSelection(),d=o.domSelectionRange(),f=!1;if((F||x)&&e==n){let{node:p,offset:h}=l;if(p.nodeType==3){if(f=!!(h&&p.nodeValue[h-1]==`
2
- `),f&&h==p.nodeValue.length)for(let g=p,m;g;g=g.parentNode){if(m=g.nextSibling){m.nodeName=="BR"&&(l=a={node:m.parentNode,offset:D(m)+1});break}let y=g.pmViewDesc;if(y&&y.node&&y.node.isBlock)break}}else{let g=p.childNodes[h-1];f=g&&(g.nodeName=="BR"||g.contentEditable=="false")}}if(F&&d.focusNode&&d.focusNode!=a.node&&d.focusNode.nodeType==1){let p=d.focusNode.childNodes[d.focusOffset];p&&p.contentEditable=="false"&&(i=!0)}if(!(i||f&&x)&&te(l.node,l.offset,d.anchorNode,d.anchorOffset)&&te(a.node,a.offset,d.focusNode,d.focusOffset))return;let u=!1;if((c.extend||e==n)&&!f){c.collapse(l.node,l.offset);try{e!=n&&c.extend(a.node,a.offset),u=!0}catch{}}if(!u){if(e>n){let h=l;l=a,a=h}let p=document.createRange();p.setEnd(a.node,a.offset),p.setStart(l.node,l.offset),c.removeAllRanges(),c.addRange(p)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,n){for(let o=0,i=0;i<this.children.length;i++){let s=this.children[i],r=o+s.size;if(o==r?e<=r&&n>=o:e<r&&n>o){let l=o+s.border,a=r-s.border;if(e>=l&&n<=a){this.dirty=e==o||n==r?oe:Tt,e==l&&n==a&&(s.contentLost||s.dom.parentNode!=this.contentDOM)?s.dirty=$:s.markDirty(e-l,n-l);return}else s.dirty=s.dom==s.contentDOM&&s.dom.parentNode==this.contentDOM&&!s.children.length?oe:$}o=r}this.dirty=oe}markParentsDirty(){let e=1;for(let n=this.parent;n;n=n.parent,e++){let o=e==1?oe:Tt;n.dirty<o&&(n.dirty=o)}}get domAtom(){return!1}get ignoreForCoords(){return!1}isText(e){return!1}}class At extends De{constructor(e,n,o,i){let s,r=n.type.toDOM;if(typeof r=="function"&&(r=r(o,()=>{if(!s)return i;if(s.parent)return s.parent.posBeforeChild(s)})),!n.type.spec.raw){if(r.nodeType!=1){let l=document.createElement("span");l.appendChild(r),r=l}r.contentEditable="false",r.classList.add("ProseMirror-widget")}super(e,[],r,null),this.widget=n,this.widget=n,s=this}matchesWidget(e){return this.dirty==B&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let n=this.widget.spec.stopEvent;return n?n(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class Jn extends De{constructor(e,n,o,i){super(e,[],n,null),this.textDOM=o,this.text=i}get size(){return this.text.length}localPosFromDOM(e,n){return e!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class ie extends De{constructor(e,n,o,i,s){super(e,[],o,i),this.mark=n,this.spec=s}static create(e,n,o,i){let s=i.nodeViews[n.type.name],r=s&&s(n,i,o);return(!r||!r.dom)&&(r=me.renderSpec(document,n.type.spec.toDOM(n,o),null,n.attrs)),new ie(e,n,r.dom,r.contentDOM||r.dom,r)}parseRule(){return this.dirty&$||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=$&&this.mark.eq(e)}markDirty(e,n){if(super.markDirty(e,n),this.dirty!=B){let o=this.parent;for(;!o.node;)o=o.parent;o.dirty<this.dirty&&(o.dirty=this.dirty),this.dirty=B}}slice(e,n,o){let i=ie.create(this.parent,this.mark,!0,o),s=this.children,r=this.size;n<r&&(s=Ue(s,n,r,o)),e>0&&(s=Ue(s,0,e,o));for(let l=0;l<s.length;l++)s[l].parent=i;return i.children=s,i}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class G extends De{constructor(e,n,o,i,s,r,l,a,c){super(e,[],s,r),this.node=n,this.outerDeco=o,this.innerDeco=i,this.nodeDOM=l}static create(e,n,o,i,s,r){let l=s.nodeViews[n.type.name],a,c=l&&l(n,s,()=>{if(!a)return r;if(a.parent)return a.parent.posBeforeChild(a)},o,i),d=c&&c.dom,f=c&&c.contentDOM;if(n.isText){if(!d)d=document.createTextNode(n.text);else if(d.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else d||({dom:d,contentDOM:f}=me.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!f&&!n.isText&&d.nodeName!="BR"&&(d.hasAttribute("contenteditable")||(d.contentEditable="false"),n.type.spec.draggable&&(d.draggable=!0));let u=d;return d=Bt(d,o,n),c?a=new Zn(e,n,o,i,d,f||null,u,c,s,r+1):n.isText?new Te(e,n,o,i,d,u,s):new G(e,n,o,i,d,f||null,u,s,r+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let o=this.children[n];if(this.dom.contains(o.dom.parentNode)){e.contentElement=o.dom.parentNode;break}}e.contentElement||(e.getContent=()=>z.empty)}return e}matchesNode(e,n,o){return this.dirty==B&&e.eq(this.node)&&Ae(n,this.outerDeco)&&o.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,n){let o=this.node.inlineContent,i=n,s=e.composing?this.localCompositionInfo(e,n):null,r=s&&s.pos>-1?s:null,l=s&&s.pos<0,a=new wn(this,r&&r.node,e);to(this.node,this.innerDeco,(c,d,f)=>{c.spec.marks?a.syncToMarks(c.spec.marks,o,e):c.type.side>=0&&!f&&a.syncToMarks(d==this.node.childCount?dt.none:this.node.child(d).marks,o,e),a.placeWidget(c,e,i)},(c,d,f,u)=>{a.syncToMarks(c.marks,o,e);let p;a.findNodeMatch(c,d,f,u)||l&&e.state.selection.from>i&&e.state.selection.to<i+c.nodeSize&&(p=a.findIndexWithChild(s.node))>-1&&a.updateNodeAt(c,d,f,p,e)||a.updateNextNode(c,d,f,e,u,i)||a.addNode(c,d,f,e,i),i+=c.nodeSize}),a.syncToMarks([],o,e),this.node.isTextblock&&a.addTextblockHacks(),a.destroyRest(),(a.changed||this.dirty==oe)&&(r&&this.protectLocalComposition(e,r),Vt(this.contentDOM,this.children,e),de&&no(this.dom))}localCompositionInfo(e,n){let{from:o,to:i}=e.state.selection;if(!(e.state.selection instanceof C)||o<n||i>n+this.node.content.size)return null;let s=e.input.compositionNode;if(!s||!this.dom.contains(s.parentNode))return null;if(this.node.inlineContent){let r=s.nodeValue,l=oo(this.node.content,r,o-n,i-n);return l<0?null:{node:s,pos:l,text:r}}else return{node:s,pos:-1,text:""}}protectLocalComposition(e,{node:n,pos:o,text:i}){if(this.getDesc(n))return;let s=n;for(;s.parentNode!=this.contentDOM;s=s.parentNode){for(;s.previousSibling;)s.parentNode.removeChild(s.previousSibling);for(;s.nextSibling;)s.parentNode.removeChild(s.nextSibling);s.pmViewDesc&&(s.pmViewDesc=void 0)}let r=new Jn(this,s,n,i);e.input.compositionNodes.push(r),this.children=Ue(this.children,o,o+i.length,e,r)}update(e,n,o,i){return this.dirty==$||!e.sameMarkup(this.node)?!1:(this.updateInner(e,n,o,i),!0)}updateInner(e,n,o,i){this.updateOuterDeco(n),this.node=e,this.innerDeco=o,this.contentDOM&&this.updateChildren(i,this.posAtStart),this.dirty=B}updateOuterDeco(e){if(Ae(e,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,o=this.dom;this.dom=Rt(this.dom,this.nodeDOM,je(this.outerDeco,this.node,n),je(e,this.node,n)),this.dom!=o&&(o.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function Et(t,e,n,o,i){Bt(o,e,t);let s=new G(void 0,t,e,n,o,o,o,i,0);return s.contentDOM&&s.updateChildren(i,0),s}class Te extends G{constructor(e,n,o,i,s,r,l){super(e,n,o,i,s,null,r,l,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,n,o,i){return this.dirty==$||this.dirty!=B&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=B||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,i.trackWrites==this.nodeDOM&&(i.trackWrites=null)),this.node=e,this.dirty=B,!0)}inParent(){let e=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,n,o){return e==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(e,n,o)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,n,o){let i=this.node.cut(e,n),s=document.createTextNode(i.text);return new Te(this.parent,i,this.outerDeco,this.innerDeco,s,s,o)}markDirty(e,n){super.markDirty(e,n),this.dom!=this.nodeDOM&&(e==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=$)}get domAtom(){return!1}isText(e){return this.node.text==e}}class Pt extends De{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==B&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class Zn extends G{constructor(e,n,o,i,s,r,l,a,c,d){super(e,n,o,i,s,r,l,c,d),this.spec=a}update(e,n,o,i){if(this.dirty==$)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let s=this.spec.update(e,n,o);return s&&this.updateInner(e,n,o,i),s}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,n,o,i)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,n,o,i){this.spec.setSelection?this.spec.setSelection(e,n,o.root):super.setSelection(e,n,o,i)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function Vt(t,e,n){let o=t.firstChild,i=!1;for(let s=0;s<e.length;s++){let r=e[s],l=r.dom;if(l.parentNode==t){for(;l!=o;)o=It(o),i=!0;o=o.nextSibling}else i=!0,t.insertBefore(l,o);if(r instanceof ie){let a=o?o.previousSibling:t.lastChild;Vt(r.contentDOM,r.children,n),o=a?a.nextSibling:t.firstChild}}for(;o;)o=It(o),i=!0;i&&n.trackWrites==t&&(n.trackWrites=null)}const Ne=function(t){t&&(this.nodeName=t)};Ne.prototype=Object.create(null);const se=[new Ne];function je(t,e,n){if(t.length==0)return se;let o=n?se[0]:new Ne,i=[o];for(let s=0;s<t.length;s++){let r=t[s].type.attrs;if(r){r.nodeName&&i.push(o=new Ne(r.nodeName));for(let l in r){let a=r[l];a!=null&&(n&&i.length==1&&i.push(o=new Ne(e.isInline?"span":"div")),l=="class"?o.class=(o.class?o.class+" ":"")+a:l=="style"?o.style=(o.style?o.style+";":"")+a:l!="nodeName"&&(o[l]=a))}}}return i}function Rt(t,e,n,o){if(n==se&&o==se)return e;let i=e;for(let s=0;s<o.length;s++){let r=o[s],l=n[s];if(s){let a;l&&l.nodeName==r.nodeName&&i!=t&&(a=i.parentNode)&&a.nodeName.toLowerCase()==r.nodeName||(a=document.createElement(r.nodeName),a.pmIsDeco=!0,a.appendChild(i),l=se[0]),i=a}Qn(i,l||se[0],r)}return i}function Qn(t,e,n){for(let o in e)o!="class"&&o!="style"&&o!="nodeName"&&!(o in n)&&t.removeAttribute(o);for(let o in n)o!="class"&&o!="style"&&o!="nodeName"&&n[o]!=e[o]&&t.setAttribute(o,n[o]);if(e.class!=n.class){let o=e.class?e.class.split(" ").filter(Boolean):[],i=n.class?n.class.split(" ").filter(Boolean):[];for(let s=0;s<o.length;s++)i.indexOf(o[s])==-1&&t.classList.remove(o[s]);for(let s=0;s<i.length;s++)o.indexOf(i[s])==-1&&t.classList.add(i[s]);t.classList.length==0&&t.removeAttribute("class")}if(e.style!=n.style){if(e.style){let o=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,i;for(;i=o.exec(e.style);)t.style.removeProperty(i[1])}n.style&&(t.style.cssText+=n.style)}}function Bt(t,e,n){return Rt(t,t,se,je(e,n,t.nodeType!=1))}function Ae(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].type.eq(e[n].type))return!1;return!0}function It(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class wn{constructor(e,n,o){this.lock=n,this.view=o,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=vn(e.node.content,e)}destroyBetween(e,n){if(e!=n){for(let o=e;o<n;o++)this.top.children[o].destroy();this.top.children.splice(e,n-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,n,o){let i=0,s=this.stack.length>>1,r=Math.min(s,e.length);for(;i<r&&(i==s-1?this.top:this.stack[i+1<<1]).matchesMark(e[i])&&e[i].type.spec.spanning!==!1;)i++;for(;i<s;)this.destroyRest(),this.top.dirty=B,this.index=this.stack.pop(),this.top=this.stack.pop(),s--;for(;s<e.length;){this.stack.push(this.top,this.index+1);let l=-1;for(let a=this.index;a<Math.min(this.index+3,this.top.children.length);a++){let c=this.top.children[a];if(c.matchesMark(e[s])&&!this.isLocked(c.dom)){l=a;break}}if(l>-1)l>this.index&&(this.changed=!0,this.destroyBetween(this.index,l)),this.top=this.top.children[this.index];else{let a=ie.create(this.top,e[s],n,o);this.top.children.splice(this.index,0,a),this.top=a,this.changed=!0}this.index=0,s++}}findNodeMatch(e,n,o,i){let s=-1,r;if(i>=this.preMatch.index&&(r=this.preMatch.matches[i-this.preMatch.index]).parent==this.top&&r.matchesNode(e,n,o))s=this.top.children.indexOf(r,this.index);else for(let l=this.index,a=Math.min(this.top.children.length,l+5);l<a;l++){let c=this.top.children[l];if(c.matchesNode(e,n,o)&&!this.preMatch.matched.has(c)){s=l;break}}return s<0?!1:(this.destroyBetween(this.index,s),this.index++,!0)}updateNodeAt(e,n,o,i,s){let r=this.top.children[i];return r.dirty==$&&r.dom==r.contentDOM&&(r.dirty=oe),r.update(e,n,o,s)?(this.destroyBetween(this.index,i),this.index++,!0):!1}findIndexWithChild(e){for(;;){let n=e.parentNode;if(!n)return-1;if(n==this.top.contentDOM){let o=e.pmViewDesc;if(o){for(let i=this.index;i<this.top.children.length;i++)if(this.top.children[i]==o)return i}return-1}e=n}}updateNextNode(e,n,o,i,s,r){for(let l=this.index;l<this.top.children.length;l++){let a=this.top.children[l];if(a instanceof G){let c=this.preMatch.matched.get(a);if(c!=null&&c!=s)return!1;let d=a.dom,f,u=this.isLocked(d)&&!(e.isText&&a.node&&a.node.isText&&a.nodeDOM.nodeValue==e.text&&a.dirty!=$&&Ae(n,a.outerDeco));if(!u&&a.update(e,n,o,i))return this.destroyBetween(this.index,l),a.dom!=d&&(this.changed=!0),this.index++,!0;if(!u&&(f=this.recreateWrapper(a,e,n,o,i,r)))return this.destroyBetween(this.index,l),this.top.children[this.index]=f,f.contentDOM&&(f.dirty=oe,f.updateChildren(i,r+1),f.dirty=B),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,n,o,i,s,r){if(e.dirty||n.isAtom||!e.children.length||!e.node.content.eq(n.content)||!Ae(o,e.outerDeco)||!i.eq(e.innerDeco))return null;let l=G.create(this.top,n,o,i,s,r);if(l.contentDOM){l.children=e.children,e.children=[];for(let a of l.children)a.parent=l}return e.destroy(),l}addNode(e,n,o,i,s){let r=G.create(this.top,e,n,o,i,s);r.contentDOM&&r.updateChildren(i,s+1),this.top.children.splice(this.index++,0,r),this.changed=!0}placeWidget(e,n,o){let i=this.index<this.top.children.length?this.top.children[this.index]:null;if(i&&i.matchesWidget(e)&&(e==i.widget||!i.widget.type.toDOM.parentNode))this.index++;else{let s=new At(this.top,e,n,o);this.top.children.splice(this.index++,0,s),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],n=this.top;for(;e instanceof ie;)n=e,e=n.children[n.children.length-1];(!e||!(e instanceof Te)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((x||O)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",n),this.addHackNode("BR",this.top))}addHackNode(e,n){if(n==this.top&&this.index<n.children.length&&n.children[this.index].matchesHack(e))this.index++;else{let o=document.createElement(e);e=="IMG"&&(o.className="ProseMirror-separator",o.alt=""),e=="BR"&&(o.className="ProseMirror-trailingBreak");let i=new Pt(this.top,[],o,null);n!=this.top?n.children.push(i):n.children.splice(this.index++,0,i),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function vn(t,e){let n=e,o=n.children.length,i=t.childCount,s=new Map,r=[];e:for(;i>0;){let l;for(;;)if(o){let c=n.children[o-1];if(c instanceof ie)n=c,o=c.children.length;else{l=c,o--;break}}else{if(n==e)break e;o=n.parent.children.indexOf(n),n=n.parent}let a=l.node;if(a){if(a!=t.child(i-1))break;--i,s.set(l,i),r.push(l)}}return{index:i,matched:s,matches:r.reverse()}}function eo(t,e){return t.type.side-e.type.side}function to(t,e,n,o){let i=e.locals(t),s=0;if(i.length==0){for(let c=0;c<t.childCount;c++){let d=t.child(c);o(d,i,e.forChild(s,d),c),s+=d.nodeSize}return}let r=0,l=[],a=null;for(let c=0;;){let d,f;for(;r<i.length&&i[r].to==s;){let m=i[r++];m.widget&&(d?(f||(f=[d])).push(m):d=m)}if(d)if(f){f.sort(eo);for(let m=0;m<f.length;m++)n(f[m],c,!!a)}else n(d,c,!!a);let u,p;if(a)p=-1,u=a,a=null;else if(c<t.childCount)p=c,u=t.child(c++);else break;for(let m=0;m<l.length;m++)l[m].to<=s&&l.splice(m--,1);for(;r<i.length&&i[r].from<=s&&i[r].to>s;)l.push(i[r++]);let h=s+u.nodeSize;if(u.isText){let m=h;r<i.length&&i[r].from<m&&(m=i[r].from);for(let y=0;y<l.length;y++)l[y].to<m&&(m=l[y].to);m<h&&(a=u.cut(m-s),u=u.cut(0,m-s),h=m,p=-1)}else for(;r<i.length&&i[r].to<h;)r++;let g=u.isInline&&!u.isLeaf?l.filter(m=>!m.inline):l.slice();o(u,g,e.forChild(s,u),p),s=h}}function no(t){if(t.nodeName=="UL"||t.nodeName=="OL"){let e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}function oo(t,e,n,o){for(let i=0,s=0;i<t.childCount&&s<=o;){let r=t.child(i++),l=s;if(s+=r.nodeSize,!r.isText)continue;let a=r.text;for(;i<t.childCount;){let c=t.child(i++);if(s+=c.nodeSize,!c.isText)break;a+=c.text}if(s>=n){if(s>=o&&a.slice(o-e.length-l,o-l)==e)return o-e.length;let c=l<o?a.lastIndexOf(e,o-l-1):-1;if(c>=0&&c+e.length+l>=n)return l+c;if(n==o&&a.length>=o+e.length-l&&a.slice(o-l,o-l+e.length)==e)return o}}return-1}function Ue(t,e,n,o,i){let s=[];for(let r=0,l=0;r<t.length;r++){let a=t[r],c=l,d=l+=a.size;c>=n||d<=e?s.push(a):(c<e&&s.push(a.slice(0,e-c,o)),i&&(s.push(i),i=void 0),d>n&&s.push(a.slice(n-c,a.size,o)))}return s}function Ye(t,e=null){let n=t.domSelectionRange(),o=t.state.doc;if(!n.focusNode)return null;let i=t.docView.nearestDesc(n.focusNode),s=i&&i.size==0,r=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(r<0)return null;let l=o.resolve(r),a,c;if(ke(n)){for(a=r;i&&!i.node;)i=i.parent;let f=i.node;if(i&&f.isAtom&&N.isSelectable(f)&&i.parent&&!(f.isInline&&En(n.focusNode,n.focusOffset,i.dom))){let u=i.posBefore;c=new N(r==u?l:o.resolve(u))}}else{if(n instanceof t.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let f=r,u=r;for(let p=0;p<n.rangeCount;p++){let h=n.getRangeAt(p);f=Math.min(f,t.docView.posFromDOM(h.startContainer,h.startOffset,1)),u=Math.max(u,t.docView.posFromDOM(h.endContainer,h.endOffset,-1))}if(f<0)return null;[a,r]=u==t.state.selection.anchor?[u,f]:[f,u],l=o.resolve(r)}else a=t.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(a<0)return null}let d=o.resolve(a);if(!c){let f=e=="pointer"||t.state.selection.head<l.pos&&!s?1:-1;c=Xe(t,d,l,f)}return c}function Ft(t){return t.editable?t.hasFocus():Wt(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function _(t,e=!1){let n=t.state.selection;if(qt(t,n),!!Ft(t)){if(!e&&t.input.mouseDown&&t.input.mouseDown.allowDefault&&O){let o=t.domSelectionRange(),i=t.domObserver.currentSelection;if(o.anchorNode&&i.anchorNode&&te(o.anchorNode,o.anchorOffset,i.anchorNode,i.anchorOffset)){t.input.mouseDown.delayedSelectionSync=!0,t.domObserver.setCurSelection();return}}if(t.domObserver.disconnectSelection(),t.cursorWrapper)so(t);else{let{anchor:o,head:i}=n,s,r;zt&&!(n instanceof C)&&(n.$from.parent.inlineContent||(s=Lt(t,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(r=Lt(t,n.to))),t.docView.setSelection(o,i,t,e),zt&&(s&&$t(s),r&&$t(r)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&io(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const zt=x||O&&mt<63;function Lt(t,e){let{node:n,offset:o}=t.docView.domFromPos(e,0),i=o<n.childNodes.length?n.childNodes[o]:null,s=o?n.childNodes[o-1]:null;if(x&&i&&i.contentEditable=="false")return Ge(i);if((!i||i.contentEditable=="false")&&(!s||s.contentEditable=="false")){if(i)return Ge(i);if(s)return Ge(s)}}function Ge(t){return t.contentEditable="true",x&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function $t(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function io(t){let e=t.dom.ownerDocument;e.removeEventListener("selectionchange",t.input.hideSelectionGuard);let n=t.domSelectionRange(),o=n.anchorNode,i=n.anchorOffset;e.addEventListener("selectionchange",t.input.hideSelectionGuard=()=>{(n.anchorNode!=o||n.anchorOffset!=i)&&(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout(()=>{(!Ft(t)||t.state.selection.visible)&&t.dom.classList.remove("ProseMirror-hideselection")},20))})}function so(t){let e=t.domSelection(),n=document.createRange();if(!e)return;let o=t.cursorWrapper.dom,i=o.nodeName=="IMG";i?n.setStart(o.parentNode,D(o)+1):n.setStart(o,0),n.collapse(!0),e.removeAllRanges(),e.addRange(n),!i&&!t.state.selection.visible&&A&&U<=11&&(o.disabled=!0,o.disabled=!1)}function qt(t,e){if(e instanceof N){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(Kt(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else Kt(t)}function Kt(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function Xe(t,e,n,o){return t.someProp("createSelectionBetween",i=>i(t,e,n))||C.between(e,n,o)}function Ht(t){return t.editable&&!t.hasFocus()?!1:Wt(t)}function Wt(t){let e=t.domSelectionRange();if(!e.anchorNode)return!1;try{return t.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function ro(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelectionRange();return te(e.node,e.offset,n.anchorNode,n.anchorOffset)}function Je(t,e){let{$anchor:n,$head:o}=t.selection,i=e>0?n.max(o):n.min(o),s=i.parent.inlineContent?i.depth?t.doc.resolve(e>0?i.after():i.before()):null:i;return s&&ee.findFrom(s,e)}function X(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function _t(t,e,n){let o=t.state.selection;if(o instanceof C)if(n.indexOf("s")>-1){let{$head:i}=o,s=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter;if(!s||s.isText||!s.isLeaf)return!1;let r=t.state.doc.resolve(i.pos+s.nodeSize*(e<0?-1:1));return X(t,new C(o.$anchor,r))}else if(o.empty){if(t.endOfTextblock(e>0?"forward":"backward")){let i=Je(t.state,e);return i&&i instanceof N?X(t,i):!1}else if(!(R&&n.indexOf("m")>-1)){let i=o.$head,s=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter,r;if(!s||s.isText)return!1;let l=e<0?i.pos-s.nodeSize:i.pos;return s.isAtom||(r=t.docView.descAt(l))&&!r.contentDOM?N.isSelectable(s)?X(t,new N(e<0?t.state.doc.resolve(i.pos-s.nodeSize):i)):ye?X(t,new C(t.state.doc.resolve(e<0?l:l+s.nodeSize))):!1:!1}}else return!1;else{if(o instanceof N&&o.node.isInline)return X(t,new C(e>0?o.$to:o.$from));{let i=Je(t.state,e);return i?X(t,i):!1}}}function Ee(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Se(t,e){let n=t.pmViewDesc;return n&&n.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function he(t,e){return e<0?lo(t):ao(t)}function lo(t){let e=t.domSelectionRange(),n=e.focusNode,o=e.focusOffset;if(!n)return;let i,s,r=!1;for(F&&n.nodeType==1&&o<Ee(n)&&Se(n.childNodes[o],-1)&&(r=!0);;)if(o>0){if(n.nodeType!=1)break;{let l=n.childNodes[o-1];if(Se(l,-1))i=n,s=--o;else if(l.nodeType==3)n=l,o=n.nodeValue.length;else break}}else{if(jt(n))break;{let l=n.previousSibling;for(;l&&Se(l,-1);)i=n.parentNode,s=D(l),l=l.previousSibling;if(l)n=l,o=Ee(n);else{if(n=n.parentNode,n==t.dom)break;o=0}}}r?Ze(t,n,o):i&&Ze(t,i,s)}function ao(t){let e=t.domSelectionRange(),n=e.focusNode,o=e.focusOffset;if(!n)return;let i=Ee(n),s,r;for(;;)if(o<i){if(n.nodeType!=1)break;let l=n.childNodes[o];if(Se(l,1))s=n,r=++o;else break}else{if(jt(n))break;{let l=n.nextSibling;for(;l&&Se(l,1);)s=l.parentNode,r=D(l)+1,l=l.nextSibling;if(l)n=l,o=0,i=Ee(n);else{if(n=n.parentNode,n==t.dom)break;o=i=0}}}s&&Ze(t,s,r)}function jt(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function co(t,e){for(;t&&e==t.childNodes.length&&!ge(t);)e=D(t)+1,t=t.parentNode;for(;t&&e<t.childNodes.length;){let n=t.childNodes[e];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=0}}function fo(t,e){for(;t&&!e&&!ge(t);)e=D(t),t=t.parentNode;for(;t&&e;){let n=t.childNodes[e-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=t.childNodes.length}}function Ze(t,e,n){if(e.nodeType!=3){let s,r;(r=co(e,n))?(e=r,n=0):(s=fo(e,n))&&(e=s,n=s.nodeValue.length)}let o=t.domSelection();if(!o)return;if(ke(o)){let s=document.createRange();s.setEnd(e,n),s.setStart(e,n),o.removeAllRanges(),o.addRange(s)}else o.extend&&o.extend(e,n);t.domObserver.setCurSelection();let{state:i}=t;setTimeout(()=>{t.state==i&&_(t)},50)}function Ut(t,e){let n=t.state.doc.resolve(e);if(!(O||Rn)&&n.parent.inlineContent){let i=t.coordsAtPos(e);if(e>n.start()){let s=t.coordsAtPos(e-1),r=(s.top+s.bottom)/2;if(r>i.top&&r<i.bottom&&Math.abs(s.left-i.left)>1)return s.left<i.left?"ltr":"rtl"}if(e<n.end()){let s=t.coordsAtPos(e+1),r=(s.top+s.bottom)/2;if(r>i.top&&r<i.bottom&&Math.abs(s.left-i.left)>1)return s.left>i.left?"ltr":"rtl"}}return getComputedStyle(t.dom).direction=="rtl"?"rtl":"ltr"}function Yt(t,e,n){let o=t.state.selection;if(o instanceof C&&!o.empty||n.indexOf("s")>-1||R&&n.indexOf("m")>-1)return!1;let{$from:i,$to:s}=o;if(!i.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let r=Je(t.state,e);if(r&&r instanceof N)return X(t,r)}if(!i.parent.inlineContent){let r=e<0?i:s,l=o instanceof ct?ee.near(r,e):ee.findFrom(r,e);return l?X(t,l):!1}return!1}function Gt(t,e){if(!(t.state.selection instanceof C))return!0;let{$head:n,$anchor:o,empty:i}=t.state.selection;if(!n.sameParent(o))return!0;if(!i)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let s=!n.textOffset&&(e<0?n.nodeBefore:n.nodeAfter);if(s&&!s.isText){let r=t.state.tr;return e<0?r.delete(n.pos-s.nodeSize,n.pos):r.delete(n.pos,n.pos+s.nodeSize),t.dispatch(r),!0}return!1}function Xt(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function ho(t){if(!x||t.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(e&&e.nodeType==1&&n==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let o=e.firstChild;Xt(t,o,"true"),setTimeout(()=>Xt(t,o,"false"),20)}return!1}function uo(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function po(t,e){let n=e.keyCode,o=uo(e);if(n==8||R&&n==72&&o=="c")return Gt(t,-1)||he(t,-1);if(n==46&&!e.shiftKey||R&&n==68&&o=="c")return Gt(t,1)||he(t,1);if(n==13||n==27)return!0;if(n==37||R&&n==66&&o=="c"){let i=n==37?Ut(t,t.state.selection.from)=="ltr"?-1:1:-1;return _t(t,i,o)||he(t,i)}else if(n==39||R&&n==70&&o=="c"){let i=n==39?Ut(t,t.state.selection.from)=="ltr"?1:-1:1;return _t(t,i,o)||he(t,i)}else{if(n==38||R&&n==80&&o=="c")return Yt(t,-1,o)||he(t,-1);if(n==40||R&&n==78&&o=="c")return ho(t)||Yt(t,1,o)||he(t,1);if(o==(R?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function Qe(t,e){t.someProp("transformCopied",p=>{e=p(e,t)});let n=[],{content:o,openStart:i,openEnd:s}=e;for(;i>1&&s>1&&o.childCount==1&&o.firstChild.childCount==1;){i--,s--;let p=o.firstChild;n.push(p.type.name,p.attrs!=p.type.defaultAttrs?p.attrs:null),o=p.content}let r=t.someProp("clipboardSerializer")||me.fromSchema(t.state.schema),l=nn(),a=l.createElement("div");a.appendChild(r.serializeFragment(o,{document:l}));let c=a.firstChild,d,f=0;for(;c&&c.nodeType==1&&(d=en[c.nodeName.toLowerCase()]);){for(let p=d.length-1;p>=0;p--){let h=l.createElement(d[p]);for(;a.firstChild;)h.appendChild(a.firstChild);a.appendChild(h),f++}c=a.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${i} ${s}${f?` -${f}`:""} ${JSON.stringify(n)}`);let u=t.someProp("clipboardTextSerializer",p=>p(e,t))||e.content.textBetween(0,e.content.size,`
3
-
4
- `);return{dom:a,text:u,slice:e}}function Jt(t,e,n,o,i){let s=i.parent.type.spec.code,r,l;if(!n&&!e)return null;let a=e&&(o||s||!n);if(a){if(t.someProp("transformPastedText",u=>{e=u(e,s||o,t)}),s)return e?new q(z.from(t.state.schema.text(e.replace(/\r\n?/g,`
5
- `))),0,0):q.empty;let f=t.someProp("clipboardTextParser",u=>u(e,i,o,t));if(f)l=f;else{let u=i.marks(),{schema:p}=t.state,h=me.fromSchema(p);r=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(g=>{let m=r.appendChild(document.createElement("p"));g&&m.appendChild(h.serializeNode(p.text(g,u)))})}}else t.someProp("transformPastedHTML",f=>{n=f(n,t)}),r=bo(n),ye&&Do(r);let c=r&&r.querySelector("[data-pm-slice]"),d=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(d&&d[3])for(let f=+d[3];f>0;f--){let u=r.firstChild;for(;u&&u.nodeType!=1;)u=u.nextSibling;if(!u)break;r=u}if(l||(l=(t.someProp("clipboardParser")||t.someProp("domParser")||Le.fromSchema(t.state.schema)).parseSlice(r,{preserveWhitespace:!!(a||d),context:i,ruleFromNode(u){return u.nodeName=="BR"&&!u.nextSibling&&u.parentNode&&!mo.test(u.parentNode.nodeName)?{ignore:!0}:null}})),d)l=No(vt(l,+d[1],+d[2]),d[4]);else if(l=q.maxOpen(go(l.content,i),!0),l.openStart||l.openEnd){let f=0,u=0;for(let p=l.content.firstChild;f<l.openStart&&!p.type.spec.isolating;f++,p=p.firstChild);for(let p=l.content.lastChild;u<l.openEnd&&!p.type.spec.isolating;u++,p=p.lastChild);l=vt(l,f,u)}return t.someProp("transformPasted",f=>{l=f(l,t)}),l}const mo=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function go(t,e){if(t.childCount<2)return t;for(let n=e.depth;n>=0;n--){let i=e.node(n).contentMatchAt(e.index(n)),s,r=[];if(t.forEach(l=>{if(!r)return;let a=i.findWrapping(l.type),c;if(!a)return r=null;if(c=r.length&&s.length&&Qt(a,s,l,r[r.length-1],0))r[r.length-1]=c;else{r.length&&(r[r.length-1]=wt(r[r.length-1],s.length));let d=Zt(l,a);r.push(d),i=i.matchType(d.type),s=a}}),r)return z.from(r)}return t}function Zt(t,e,n=0){for(let o=e.length-1;o>=n;o--)t=e[o].create(null,z.from(t));return t}function Qt(t,e,n,o,i){if(i<t.length&&i<e.length&&t[i]==e[i]){let s=Qt(t,e,n,o.lastChild,i+1);if(s)return o.copy(o.content.replaceChild(o.childCount-1,s));if(o.contentMatchAt(o.childCount).matchType(i==t.length-1?n.type:t[i+1]))return o.copy(o.content.append(z.from(Zt(n,t,i+1))))}}function wt(t,e){if(e==0)return t;let n=t.content.replaceChild(t.childCount-1,wt(t.lastChild,e-1)),o=t.contentMatchAt(t.childCount).fillBefore(z.empty,!0);return t.copy(n.append(o))}function we(t,e,n,o,i,s){let r=e<0?t.firstChild:t.lastChild,l=r.content;return t.childCount>1&&(s=0),i<o-1&&(l=we(l,e,n,o,i+1,s)),i>=n&&(l=e<0?r.contentMatchAt(0).fillBefore(l,s<=i).append(l):l.append(r.contentMatchAt(r.childCount).fillBefore(z.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,r.copy(l))}function vt(t,e,n){return e<t.openStart&&(t=new q(we(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new q(we(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}const en={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let tn=null;function nn(){return tn||(tn=document.implementation.createHTMLDocument("title"))}let ve=null;function yo(t){let e=window.trustedTypes;return e?(ve||(ve=e.defaultPolicy||e.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})),ve.createHTML(t)):t}function bo(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n=nn().createElement("div"),o=/<([a-z][^>\s]+)/i.exec(t),i;if((i=o&&en[o[1].toLowerCase()])&&(t=i.map(s=>"<"+s+">").join("")+t+i.map(s=>"</"+s+">").reverse().join("")),n.innerHTML=yo(t),i)for(let s=0;s<i.length;s++)n=n.querySelector(i[s])||n;return n}function Do(t){let e=t.querySelectorAll(O?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<e.length;n++){let o=e[n];o.childNodes.length==1&&o.textContent==" "&&o.parentNode&&o.parentNode.replaceChild(t.ownerDocument.createTextNode(" "),o)}}function No(t,e){if(!t.size)return t;let n=t.content.firstChild.type.schema,o;try{o=JSON.parse(e)}catch{return t}let{content:i,openStart:s,openEnd:r}=t;for(let l=o.length-2;l>=0;l-=2){let a=n.nodes[o[l]];if(!a||a.hasRequiredAttrs())break;i=z.from(a.create(o[l+1],i)),s++,r++}return new q(i,s,r)}const k={},T={},So={touchstart:!0,touchmove:!0};class Co{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function Oo(t){for(let e in k){let n=k[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=o=>{xo(t,o)&&!tt(t,o)&&(t.editable||!(o.type in T))&&n(t,o)},So[e]?{passive:!0}:void 0)}x&&t.dom.addEventListener("input",()=>null),et(t)}function J(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function Mo(t){t.domObserver.stop();for(let e in t.input.eventHandlers)t.dom.removeEventListener(e,t.input.eventHandlers[e]);clearTimeout(t.input.composingTimeout),clearTimeout(t.input.lastIOSEnterFallbackTimeout)}function et(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=o=>tt(t,o))})}function tt(t,e){return t.someProp("handleDOMEvents",n=>{let o=n[e.type];return o?o(t,e)||e.defaultPrevented:!1})}function xo(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target;n!=t.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(e))return!1;return!0}function ko(t,e){!tt(t,e)&&k[e.type]&&(t.editable||!(e.type in T))&&k[e.type](t,e)}T.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=n.keyCode==16||n.shiftKey,!sn(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!(H&&O&&n.keyCode==13)))if(n.keyCode!=229&&t.domObserver.forceFlush(),de&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let o=Date.now();t.input.lastIOSEnter=o,t.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{t.input.lastIOSEnter==o&&(t.someProp("handleKeyDown",i=>i(t,ne(13,"Enter"))),t.input.lastIOSEnter=0)},200)}else t.someProp("handleKeyDown",o=>o(t,n))||po(t,n)?n.preventDefault():J(t,"key")},T.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)},T.keypress=(t,e)=>{let n=e;if(sn(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||R&&n.metaKey)return;if(t.someProp("handleKeyPress",i=>i(t,n))){n.preventDefault();return}let o=t.state.selection;if(!(o instanceof C)||!o.$from.sameParent(o.$to)){let i=String.fromCharCode(n.charCode);!/[\r\n]/.test(i)&&!t.someProp("handleTextInput",s=>s(t,o.$from.pos,o.$to.pos,i))&&t.dispatch(t.state.tr.insertText(i).scrollIntoView()),n.preventDefault()}};function Pe(t){return{left:t.clientX,top:t.clientY}}function To(t,e){let n=e.x-t.clientX,o=e.y-t.clientY;return n*n+o*o<100}function nt(t,e,n,o,i){if(o==-1)return!1;let s=t.state.doc.resolve(o);for(let r=s.depth+1;r>0;r--)if(t.someProp(e,l=>r>s.depth?l(t,n,s.nodeAfter,s.before(r),i,!0):l(t,n,s.node(r),s.before(r),i,!1)))return!0;return!1}function ue(t,e,n){if(t.focused||t.focus(),t.state.selection.eq(e))return;let o=t.state.tr.setSelection(e);o.setMeta("pointer",!0),t.dispatch(o)}function Ao(t,e){if(e==-1)return!1;let n=t.state.doc.resolve(e),o=n.nodeAfter;return o&&o.isAtom&&N.isSelectable(o)?(ue(t,new N(n)),!0):!1}function Eo(t,e){if(e==-1)return!1;let n=t.state.selection,o,i;n instanceof N&&(o=n.node);let s=t.state.doc.resolve(e);for(let r=s.depth+1;r>0;r--){let l=r>s.depth?s.nodeAfter:s.node(r);if(N.isSelectable(l)){o&&n.$from.depth>0&&r>=n.$from.depth&&s.before(n.$from.depth+1)==n.$from.pos?i=s.before(n.$from.depth):i=s.before(r);break}}return i!=null?(ue(t,N.create(t.state.doc,i)),!0):!1}function Po(t,e,n,o,i){return nt(t,"handleClickOn",e,n,o)||t.someProp("handleClick",s=>s(t,e,o))||(i?Eo(t,n):Ao(t,n))}function Vo(t,e,n,o){return nt(t,"handleDoubleClickOn",e,n,o)||t.someProp("handleDoubleClick",i=>i(t,e,o))}function Ro(t,e,n,o){return nt(t,"handleTripleClickOn",e,n,o)||t.someProp("handleTripleClick",i=>i(t,e,o))||Bo(t,n,o)}function Bo(t,e,n){if(n.button!=0)return!1;let o=t.state.doc;if(e==-1)return o.inlineContent?(ue(t,C.create(o,0,o.content.size)),!0):!1;let i=o.resolve(e);for(let s=i.depth+1;s>0;s--){let r=s>i.depth?i.nodeAfter:i.node(s),l=i.before(s);if(r.inlineContent)ue(t,C.create(o,l+1,l+1+r.content.size));else if(N.isSelectable(r))ue(t,N.create(o,l));else continue;return!0}}function ot(t){return Ve(t)}const on=R?"metaKey":"ctrlKey";k.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let o=ot(t),i=Date.now(),s="singleClick";i-t.input.lastClick.time<500&&To(n,t.input.lastClick)&&!n[on]&&(t.input.lastClick.type=="singleClick"?s="doubleClick":t.input.lastClick.type=="doubleClick"&&(s="tripleClick")),t.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:s};let r=t.posAtCoords(Pe(n));r&&(s=="singleClick"?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new Io(t,r,n,!!o)):(s=="doubleClick"?Vo:Ro)(t,r.pos,r.inside,n)?n.preventDefault():J(t,"pointer"))};class Io{constructor(e,n,o,i){this.view=e,this.pos=n,this.event=o,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!o[on],this.allowDefault=o.shiftKey;let s,r;if(n.inside>-1)s=e.state.doc.nodeAt(n.inside),r=n.inside;else{let d=e.state.doc.resolve(n.pos);s=d.parent,r=d.depth?d.before():0}const l=i?null:o.target,a=l?e.docView.nearestDesc(l,!0):null;this.target=a&&a.dom.nodeType==1?a.dom:null;let{selection:c}=e.state;(o.button==0&&s.type.spec.draggable&&s.type.spec.selectable!==!1||c instanceof N&&c.from<=r&&c.to>r)&&(this.mightDrag={node:s,pos:r,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&F&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),J(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>_(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(Pe(e))),this.updateAllowDefault(e),this.allowDefault||!n?J(this.view,"pointer"):Po(this.view,n.pos,n.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||x&&this.mightDrag&&!this.mightDrag.node.isAtom||O&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(ue(this.view,ee.near(this.view.state.doc.resolve(n.pos))),e.preventDefault()):J(this.view,"pointer")}move(e){this.updateAllowDefault(e),J(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}k.touchstart=t=>{t.input.lastTouch=Date.now(),ot(t),J(t,"pointer")},k.touchmove=t=>{t.input.lastTouch=Date.now(),J(t,"pointer")},k.contextmenu=t=>ot(t);function sn(t,e){return t.composing?!0:x&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500?(t.input.compositionEndedAt=-2e8,!0):!1}const Fo=H?5e3:-1;T.compositionstart=T.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$to;if(e.selection instanceof C&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(o=>o.type.spec.inclusive===!1)))t.markCursor=t.state.storedMarks||n.marks(),Ve(t,!0),t.markCursor=null;else if(Ve(t,!e.selection.empty),F&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let o=t.domSelectionRange();for(let i=o.focusNode,s=o.focusOffset;i&&i.nodeType==1&&s!=0;){let r=s<0?i.lastChild:i.childNodes[s-1];if(!r)break;if(r.nodeType==3){let l=t.domSelection();l&&l.collapse(r,r.nodeValue.length);break}else i=r,s=-1}}t.input.composing=!0}rn(t,Fo)},T.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=e.timeStamp,t.input.compositionPendingChanges=t.domObserver.pendingRecords().length?t.input.compositionID:0,t.input.compositionNode=null,t.input.compositionPendingChanges&&Promise.resolve().then(()=>t.domObserver.flush()),t.input.compositionID++,rn(t,20))};function rn(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>Ve(t),e))}function ln(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=Lo());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function zo(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let n=Tn(e.focusNode,e.focusOffset),o=An(e.focusNode,e.focusOffset);if(n&&o&&n!=o){let i=o.pmViewDesc,s=t.domObserver.lastChangedTextNode;if(n==s||o==s)return s;if(!i||!i.isText(o.nodeValue))return o;if(t.input.compositionNode==o){let r=n.pmViewDesc;if(!(!r||!r.isText(n.nodeValue)))return o}}return n||o}function Lo(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}function Ve(t,e=!1){if(!(H&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),ln(t),e||t.docView&&t.docView.dirty){let n=Ye(t);return n&&!n.eq(t.state.selection)?t.dispatch(t.state.tr.setSelection(n)):(t.markCursor||e)&&!t.state.selection.empty?t.dispatch(t.state.tr.deleteSelection()):t.updateState(t.state),!0}return!1}}function $o(t,e){if(!t.dom.parentNode)return;let n=t.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(e),n.style.cssText="position: fixed; left: -10000px; top: 10px";let o=getSelection(),i=document.createRange();i.selectNodeContents(e),t.dom.blur(),o.removeAllRanges(),o.addRange(i),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),t.focus()},50)}const Ce=A&&U<15||de&&Bn<604;k.copy=T.cut=(t,e)=>{let n=e,o=t.state.selection,i=n.type=="cut";if(o.empty)return;let s=Ce?null:n.clipboardData,r=o.content(),{dom:l,text:a}=Qe(t,r);s?(n.preventDefault(),s.clearData(),s.setData("text/html",l.innerHTML),s.setData("text/plain",a)):$o(t,l),i&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function qo(t){return t.openStart==0&&t.openEnd==0&&t.content.childCount==1?t.content.firstChild:null}function Ko(t,e){if(!t.dom.parentNode)return;let n=t.input.shiftKey||t.state.selection.$from.parent.type.spec.code,o=t.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(o.contentEditable="true"),o.style.cssText="position: fixed; left: -10000px; top: 10px",o.focus();let i=t.input.shiftKey&&t.input.lastKeyCode!=45;setTimeout(()=>{t.focus(),o.parentNode&&o.parentNode.removeChild(o),n?Oe(t,o.value,null,i,e):Oe(t,o.textContent,o.innerHTML,i,e)},50)}function Oe(t,e,n,o,i){let s=Jt(t,e,n,o,t.state.selection.$from);if(t.someProp("handlePaste",a=>a(t,i,s||q.empty)))return!0;if(!s)return!1;let r=qo(s),l=r?t.state.tr.replaceSelectionWith(r,o):t.state.tr.replaceSelection(s);return t.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function an(t){let e=t.getData("text/plain")||t.getData("Text");if(e)return e;let n=t.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}T.paste=(t,e)=>{let n=e;if(t.composing&&!H)return;let o=Ce?null:n.clipboardData,i=t.input.shiftKey&&t.input.lastKeyCode!=45;o&&Oe(t,an(o),o.getData("text/html"),i,n)?n.preventDefault():Ko(t,n)};class cn{constructor(e,n,o){this.slice=e,this.move=n,this.node=o}}const Ho=R?"altKey":"ctrlKey";function dn(t,e){let n=t.someProp("dragCopies",o=>!o(e));return n??!e[Ho]}k.dragstart=(t,e)=>{let n=e,o=t.input.mouseDown;if(o&&o.done(),!n.dataTransfer)return;let i=t.state.selection,s=i.empty?null:t.posAtCoords(Pe(n)),r;if(!(s&&s.pos>=i.from&&s.pos<=(i instanceof N?i.to-1:i.to))){if(o&&o.mightDrag)r=N.create(t.state.doc,o.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let f=t.docView.nearestDesc(n.target,!0);f&&f.node.type.spec.draggable&&f!=t.docView&&(r=N.create(t.state.doc,f.posBefore))}}let l=(r||t.state.selection).content(),{dom:a,text:c,slice:d}=Qe(t,l);(!n.dataTransfer.files.length||!O||mt>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(Ce?"Text":"text/html",a.innerHTML),n.dataTransfer.effectAllowed="copyMove",Ce||n.dataTransfer.setData("text/plain",c),t.dragging=new cn(d,dn(t,n),r)},k.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)},T.dragover=T.dragenter=(t,e)=>e.preventDefault(),T.drop=(t,e)=>{let n=e,o=t.dragging;if(t.dragging=null,!n.dataTransfer)return;let i=t.posAtCoords(Pe(n));if(!i)return;let s=t.state.doc.resolve(i.pos),r=o&&o.slice;r?t.someProp("transformPasted",h=>{r=h(r,t)}):r=Jt(t,an(n.dataTransfer),Ce?null:n.dataTransfer.getData("text/html"),!1,s);let l=!!(o&&dn(t,n));if(t.someProp("handleDrop",h=>h(t,n,r||q.empty,l))){n.preventDefault();return}if(!r)return;n.preventDefault();let a=r?ft(t.state.doc,s.pos,r):s.pos;a==null&&(a=s.pos);let c=t.state.tr;if(l){let{node:h}=o;h?h.replace(c):c.deleteSelection()}let d=c.mapping.map(a),f=r.openStart==0&&r.openEnd==0&&r.content.childCount==1,u=c.doc;if(f?c.replaceRangeWith(d,d,r.content.firstChild):c.replaceRange(d,d,r),c.doc.eq(u))return;let p=c.doc.resolve(d);if(f&&N.isSelectable(r.content.firstChild)&&p.nodeAfter&&p.nodeAfter.sameMarkup(r.content.firstChild))c.setSelection(new N(p));else{let h=c.mapping.map(a);c.mapping.maps[c.mapping.maps.length-1].forEach((g,m,y,E)=>h=E),c.setSelection(Xe(t,p,c.doc.resolve(h)))}t.focus(),t.dispatch(c.setMeta("uiEvent","drop"))},k.focus=t=>{t.input.lastFocus=Date.now(),t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout(()=>{t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.domSelectionRange())&&_(t)},20))},k.blur=(t,e)=>{let n=e;t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),n.relatedTarget&&t.dom.contains(n.relatedTarget)&&t.domObserver.currentSelection.clear(),t.focused=!1)},k.beforeinput=(t,e)=>{if(O&&H&&e.inputType=="deleteContentBackward"){t.domObserver.flushSoon();let{domChangeCount:o}=t.input;setTimeout(()=>{if(t.input.domChangeCount!=o||(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",s=>s(t,ne(8,"Backspace")))))return;let{$cursor:i}=t.state.selection;i&&i.pos>0&&t.dispatch(t.state.tr.delete(i.pos-1,i.pos).scrollIntoView())},50)}};for(let t in T)k[t]=T[t];function Me(t,e){if(t==e)return!0;for(let n in t)if(t[n]!==e[n])return!1;for(let n in e)if(!(n in t))return!1;return!0}class Re{constructor(e,n){this.toDOM=e,this.spec=n||re,this.side=this.spec.side||0}map(e,n,o,i){let{pos:s,deleted:r}=e.mapResult(n.from+i,this.side<0?-1:1);return r?null:new I(s-o,s-o,this)}valid(){return!0}eq(e){return this==e||e instanceof Re&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Me(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Z{constructor(e,n){this.attrs=e,this.spec=n||re}map(e,n,o,i){let s=e.map(n.from+i,this.spec.inclusiveStart?-1:1)-o,r=e.map(n.to+i,this.spec.inclusiveEnd?1:-1)-o;return s>=r?null:new I(s,r,this)}valid(e,n){return n.from<n.to}eq(e){return this==e||e instanceof Z&&Me(this.attrs,e.attrs)&&Me(this.spec,e.spec)}static is(e){return e.type instanceof Z}destroy(){}}class it{constructor(e,n){this.attrs=e,this.spec=n||re}map(e,n,o,i){let s=e.mapResult(n.from+i,1);if(s.deleted)return null;let r=e.mapResult(n.to+i,-1);return r.deleted||r.pos<=s.pos?null:new I(s.pos-o,r.pos-o,this)}valid(e,n){let{index:o,offset:i}=e.content.findIndex(n.from),s;return i==n.from&&!(s=e.child(o)).isText&&i+s.nodeSize==n.to}eq(e){return this==e||e instanceof it&&Me(this.attrs,e.attrs)&&Me(this.spec,e.spec)}destroy(){}}class I{constructor(e,n,o){this.from=e,this.to=n,this.type=o}copy(e,n){return new I(e,n,this.type)}eq(e,n=0){return this.type.eq(e.type)&&this.from+n==e.from&&this.to+n==e.to}map(e,n,o){return this.type.map(e,this,n,o)}static widget(e,n,o){return new I(e,e,new Re(n,o))}static inline(e,n,o,i){return new I(e,n,new Z(o,i))}static node(e,n,o,i){return new I(e,n,new it(o,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof Z}get widget(){return this.type instanceof Re}}ze("D",I);const pe=[],re={};class S{constructor(e,n){this.local=e.length?e:pe,this.children=n.length?n:pe}static create(e,n){return n.length?Be(n,e,0,re):M}find(e,n,o){let i=[];return this.findInner(e??0,n??1e9,i,0,o),i}findInner(e,n,o,i,s){for(let r=0;r<this.local.length;r++){let l=this.local[r];l.from<=n&&l.to>=e&&(!s||s(l.spec))&&o.push(l.copy(l.from+i,l.to+i))}for(let r=0;r<this.children.length;r+=3)if(this.children[r]<n&&this.children[r+1]>e){let l=this.children[r]+1;this.children[r+2].findInner(e-l,n-l,o,i+l,s)}}map(e,n,o){return this==M||e.maps.length==0?this:this.mapInner(e,n,0,0,o||re)}mapInner(e,n,o,i,s){let r;for(let l=0;l<this.local.length;l++){let a=this.local[l].map(e,o,i);a&&a.type.valid(n,a)?(r||(r=[])).push(a):s.onRemove&&s.onRemove(this.local[l].spec)}return this.children.length?Wo(this.children,r||[],e,n,o,i,s):r?new S(r.sort(le),pe):M}add(e,n){return n.length?this==M?S.create(e,n):this.addInner(e,n,0):this}addInner(e,n,o){let i,s=0;e.forEach((l,a)=>{let c=a+o,d;if(d=hn(n,l,c)){for(i||(i=this.children.slice());s<i.length&&i[s]<a;)s+=3;i[s]==a?i[s+2]=i[s+2].addInner(l,d,c+1):i.splice(s,0,a,a+l.nodeSize,Be(d,l,c+1,re)),s+=3}});let r=fn(s?un(n):n,-o);for(let l=0;l<r.length;l++)r[l].type.valid(e,r[l])||r.splice(l--,1);return new S(r.length?this.local.concat(r).sort(le):this.local,i||this.children)}remove(e){return e.length==0||this==M?this:this.removeInner(e,0)}removeInner(e,n){let o=this.children,i=this.local;for(let s=0;s<o.length;s+=3){let r,l=o[s]+n,a=o[s+1]+n;for(let d=0,f;d<e.length;d++)(f=e[d])&&f.from>l&&f.to<a&&(e[d]=null,(r||(r=[])).push(f));if(!r)continue;o==this.children&&(o=this.children.slice());let c=o[s+2].removeInner(r,l+1);c!=M?o[s+2]=c:(o.splice(s,3),s-=3)}if(i.length){for(let s=0,r;s<e.length;s++)if(r=e[s])for(let l=0;l<i.length;l++)i[l].eq(r,n)&&(i==this.local&&(i=this.local.slice()),i.splice(l--,1))}return o==this.children&&i==this.local?this:i.length||o.length?new S(i,o):M}forChild(e,n){if(this==M)return this;if(n.isLeaf)return S.empty;let o,i;for(let l=0;l<this.children.length;l+=3)if(this.children[l]>=e){this.children[l]==e&&(o=this.children[l+2]);break}let s=e+1,r=s+n.content.size;for(let l=0;l<this.local.length;l++){let a=this.local[l];if(a.from<r&&a.to>s&&a.type instanceof Z){let c=Math.max(s,a.from)-s,d=Math.min(r,a.to)-s;c<d&&(i||(i=[])).push(a.copy(c,d))}}if(i){let l=new S(i.sort(le),pe);return o?new Q([l,o]):l}return o||M}eq(e){if(this==e)return!0;if(!(e instanceof S)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(e.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=e.children[n]||this.children[n+1]!=e.children[n+1]||!this.children[n+2].eq(e.children[n+2]))return!1;return!0}locals(e){return st(this.localsInner(e))}localsInner(e){if(this==M)return pe;if(e.inlineContent||!this.local.some(Z.is))return this.local;let n=[];for(let o=0;o<this.local.length;o++)this.local[o].type instanceof Z||n.push(this.local[o]);return n}forEachSet(e){e(this)}}ze("a",S),S.empty=new S([],[]),S.removeOverlap=st;const M=S.empty;class Q{constructor(e){this.members=e}map(e,n){const o=this.members.map(i=>i.map(e,n,re));return Q.from(o)}forChild(e,n){if(n.isLeaf)return S.empty;let o=[];for(let i=0;i<this.members.length;i++){let s=this.members[i].forChild(e,n);s!=M&&(s instanceof Q?o=o.concat(s.members):o.push(s))}return Q.from(o)}eq(e){if(!(e instanceof Q)||e.members.length!=this.members.length)return!1;for(let n=0;n<this.members.length;n++)if(!this.members[n].eq(e.members[n]))return!1;return!0}locals(e){let n,o=!0;for(let i=0;i<this.members.length;i++){let s=this.members[i].localsInner(e);if(s.length)if(!n)n=s;else{o&&(n=n.slice(),o=!1);for(let r=0;r<s.length;r++)n.push(s[r])}}return n?st(o?n:n.sort(le)):pe}static from(e){switch(e.length){case 0:return M;case 1:return e[0];default:return new Q(e.every(n=>n instanceof S)?e:e.reduce((n,o)=>n.concat(o instanceof S?o:o.members),[]))}}forEachSet(e){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(e)}}function Wo(t,e,n,o,i,s,r){let l=t.slice();for(let c=0,d=s;c<n.maps.length;c++){let f=0;n.maps[c].forEach((u,p,h,g)=>{let m=g-h-(p-u);for(let y=0;y<l.length;y+=3){let E=l[y+1];if(E<0||u>E+d-f)continue;let xe=l[y]+d-f;p>=xe?l[y+1]=u<=xe?-2:-1:u>=d&&m&&(l[y]+=m,l[y+1]+=m)}f+=m}),d=n.maps[c].map(d,-1)}let a=!1;for(let c=0;c<l.length;c+=3)if(l[c+1]<0){if(l[c+1]==-2){a=!0,l[c+1]=-1;continue}let d=n.map(t[c]+s),f=d-i;if(f<0||f>=o.content.size){a=!0;continue}let u=n.map(t[c+1]+s,-1),p=u-i,{index:h,offset:g}=o.content.findIndex(f),m=o.maybeChild(h);if(m&&g==f&&g+m.nodeSize==p){let y=l[c+2].mapInner(n,m,d+1,t[c]+s+1,r);y!=M?(l[c]=f,l[c+1]=p,l[c+2]=y):(l[c+1]=-2,a=!0)}else a=!0}if(a){let c=_o(l,t,e,n,i,s,r),d=Be(c,o,0,r);e=d.local;for(let f=0;f<l.length;f+=3)l[f+1]<0&&(l.splice(f,3),f-=3);for(let f=0,u=0;f<d.children.length;f+=3){let p=d.children[f];for(;u<l.length&&l[u]<p;)u+=3;l.splice(u,0,d.children[f],d.children[f+1],d.children[f+2])}}return new S(e.sort(le),l)}function fn(t,e){if(!e||!t.length)return t;let n=[];for(let o=0;o<t.length;o++){let i=t[o];n.push(new I(i.from+e,i.to+e,i.type))}return n}function _o(t,e,n,o,i,s,r){function l(a,c){for(let d=0;d<a.local.length;d++){let f=a.local[d].map(o,i,c);f?n.push(f):r.onRemove&&r.onRemove(a.local[d].spec)}for(let d=0;d<a.children.length;d+=3)l(a.children[d+2],a.children[d]+c+1)}for(let a=0;a<t.length;a+=3)t[a+1]==-1&&l(t[a+2],e[a]+s+1);return n}function hn(t,e,n){if(e.isLeaf)return null;let o=n+e.nodeSize,i=null;for(let s=0,r;s<t.length;s++)(r=t[s])&&r.from>n&&r.to<o&&((i||(i=[])).push(r),t[s]=null);return i}function un(t){let e=[];for(let n=0;n<t.length;n++)t[n]!=null&&e.push(t[n]);return e}function Be(t,e,n,o){let i=[],s=!1;e.forEach((l,a)=>{let c=hn(t,l,a+n);if(c){s=!0;let d=Be(c,l,n+a+1,o);d!=M&&i.push(a,a+l.nodeSize,d)}});let r=fn(s?un(t):t,-n).sort(le);for(let l=0;l<r.length;l++)r[l].type.valid(e,r[l])||(o.onRemove&&o.onRemove(r[l].spec),r.splice(l--,1));return r.length||i.length?new S(r,i):M}function le(t,e){return t.from-e.from||t.to-e.to}function st(t){let e=t;for(let n=0;n<e.length-1;n++){let o=e[n];if(o.from!=o.to)for(let i=n+1;i<e.length;i++){let s=e[i];if(s.from==o.from){s.to!=o.to&&(e==t&&(e=t.slice()),e[i]=s.copy(s.from,o.to),pn(e,i+1,s.copy(o.to,s.to)));continue}else{s.from<o.to&&(e==t&&(e=t.slice()),e[n]=o.copy(o.from,s.from),pn(e,i,o.copy(s.from,o.to)));break}}}return e}function pn(t,e,n){for(;e<t.length&&le(n,t[e])>0;)e++;t.splice(e,0,n)}function rt(t){let e=[];return t.someProp("decorations",n=>{let o=n(t.state);o&&o!=M&&e.push(o)}),t.cursorWrapper&&e.push(S.create(t.state.doc,[t.cursorWrapper.deco])),Q.from(e)}const jo={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Uo=A&&U<=11;class Yo{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class Go{constructor(e,n){this.view=e,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Yo,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(o=>{for(let i=0;i<o.length;i++)this.queue.push(o[i]);A&&U<=11&&o.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),Uo&&(this.onCharData=o=>{this.queue.push({target:o.target,type:"characterData",oldValue:o.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,jo)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let n=0;n<e.length;n++)this.queue.push(e[n]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(Ht(this.view)){if(this.suppressingSelectionUpdates)return _(this.view);if(A&&U<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&te(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let n=new Set,o;for(let s=e.focusNode;s;s=ce(s))n.add(s);for(let s=e.anchorNode;s;s=ce(s))if(n.has(s)){o=s;break}let i=o&&this.view.docView.nearestDesc(o);if(i&&i.ignoreMutation({type:"selection",target:o.nodeType==3?o.parentNode:o}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let o=e.domSelectionRange(),i=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(o)&&Ht(e)&&!this.ignoreSelectionChange(o),s=-1,r=-1,l=!1,a=[];if(e.editable)for(let d=0;d<n.length;d++){let f=this.registerMutation(n[d],a);f&&(s=s<0?f.from:Math.min(f.from,s),r=r<0?f.to:Math.max(f.to,r),f.typeOver&&(l=!0))}if(F&&a.length){let d=a.filter(f=>f.nodeName=="BR");if(d.length==2){let[f,u]=d;f.parentNode&&f.parentNode.parentNode==u.parentNode?u.remove():f.remove()}else{let{focusNode:f}=this.currentSelection;for(let u of d){let p=u.parentNode;p&&p.nodeName=="LI"&&(!f||Zo(e,f)!=p)&&u.remove()}}}let c=null;s<0&&i&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&ke(o)&&(c=Ye(e))&&c.eq(ee.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,_(e),this.currentSelection.set(o),e.scrollToSelection()):(s>-1||i)&&(s>-1&&(e.docView.markDirty(s,r),Xo(e)),this.handleDOMChange(s,r,l,a),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(o)||_(e),this.currentSelection.set(o))}registerMutation(e,n){if(n.indexOf(e.target)>-1)return null;let o=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(o==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!o||o.ignoreMutation(e))return null;if(e.type=="childList"){for(let d=0;d<e.addedNodes.length;d++){let f=e.addedNodes[d];n.push(f),f.nodeType==3&&(this.lastChangedTextNode=f)}if(o.contentDOM&&o.contentDOM!=o.dom&&!o.contentDOM.contains(e.target))return{from:o.posBefore,to:o.posAfter};let i=e.previousSibling,s=e.nextSibling;if(A&&U<=11&&e.addedNodes.length)for(let d=0;d<e.addedNodes.length;d++){let{previousSibling:f,nextSibling:u}=e.addedNodes[d];(!f||Array.prototype.indexOf.call(e.addedNodes,f)<0)&&(i=f),(!u||Array.prototype.indexOf.call(e.addedNodes,u)<0)&&(s=u)}let r=i&&i.parentNode==e.target?D(i)+1:0,l=o.localPosFromDOM(e.target,r,-1),a=s&&s.parentNode==e.target?D(s):e.target.childNodes.length,c=o.localPosFromDOM(e.target,a,1);return{from:l,to:c}}else return e.type=="attributes"?{from:o.posAtStart-o.border,to:o.posAtEnd+o.border}:(this.lastChangedTextNode=e.target,{from:o.posAtStart,to:o.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let mn=new WeakMap,gn=!1;function Xo(t){if(!mn.has(t)&&(mn.set(t,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace)!==-1)){if(t.requiresGeckoHackNode=F,gn)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),gn=!0}}function yn(t,e){let n=e.startContainer,o=e.startOffset,i=e.endContainer,s=e.endOffset,r=t.domAtPos(t.state.selection.anchor);return te(r.node,r.offset,i,s)&&([n,o,i,s]=[i,s,n,o]),{anchorNode:n,anchorOffset:o,focusNode:i,focusOffset:s}}function Jo(t,e){if(e.getComposedRanges){let i=e.getComposedRanges(t.root)[0];if(i)return yn(t,i)}let n;function o(i){i.preventDefault(),i.stopImmediatePropagation(),n=i.getTargetRanges()[0]}return t.dom.addEventListener("beforeinput",o,!0),document.execCommand("indent"),t.dom.removeEventListener("beforeinput",o,!0),n?yn(t,n):null}function Zo(t,e){for(let n=e.parentNode;n&&n!=t.dom;n=n.parentNode){let o=t.docView.nearestDesc(n,!0);if(o&&o.node.isBlock)return n}return null}function Qo(t,e,n){let{node:o,fromOffset:i,toOffset:s,from:r,to:l}=t.docView.parseRange(e,n),a=t.domSelectionRange(),c,d=a.anchorNode;if(d&&t.dom.contains(d.nodeType==1?d:d.parentNode)&&(c=[{node:d,offset:a.anchorOffset}],ke(a)||c.push({node:a.focusNode,offset:a.focusOffset})),O&&t.input.lastKeyCode===8)for(let m=s;m>i;m--){let y=o.childNodes[m-1],E=y.pmViewDesc;if(y.nodeName=="BR"&&!E){s=m;break}if(!E||E.size)break}let f=t.state.doc,u=t.someProp("domParser")||Le.fromSchema(t.state.schema),p=f.resolve(r),h=null,g=u.parse(o,{topNode:p.parent,topMatch:p.parent.contentMatchAt(p.index()),topOpen:!0,from:i,to:s,preserveWhitespace:p.parent.type.whitespace=="pre"?"full":!0,findPositions:c,ruleFromNode:wo,context:p});if(c&&c[0].pos!=null){let m=c[0].pos,y=c[1]&&c[1].pos;y==null&&(y=m),h={anchor:m+r,head:y+r}}return{doc:g,sel:h,from:r,to:l}}function wo(t){let e=t.pmViewDesc;if(e)return e.parseRule();if(t.nodeName=="BR"&&t.parentNode){if(x&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(t.parentNode.lastChild==t||x&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if(t.nodeName=="IMG"&&t.getAttribute("mark-placeholder"))return{ignore:!0};return null}const vo=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function ei(t,e,n,o,i){let s=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let b=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,v=Ye(t,b);if(v&&!t.state.selection.eq(v)){if(O&&H&&t.input.lastKeyCode===13&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",li=>li(t,ne(13,"Enter"))))return;let Fe=t.state.tr.setSelection(v);b=="pointer"?Fe.setMeta("pointer",!0):b=="key"&&Fe.scrollIntoView(),s&&Fe.setMeta("composition",s),t.dispatch(Fe)}return}let r=t.state.doc.resolve(e),l=r.sharedDepth(n);e=r.before(l+1),n=t.state.doc.resolve(n).after(l+1);let a=t.state.selection,c=Qo(t,e,n),d=t.state.doc,f=d.slice(c.from,c.to),u,p;t.input.lastKeyCode===8&&Date.now()-100<t.input.lastKeyCodeTime?(u=t.state.selection.to,p="end"):(u=t.state.selection.from,p="start"),t.input.lastKeyCode=null;let h=oi(f.content,c.doc.content,c.from,u,p);if(h&&t.input.domChangeCount++,(de&&t.input.lastIOSEnter>Date.now()-225||H)&&i.some(b=>b.nodeType==1&&!vo.test(b.nodeName))&&(!h||h.endA>=h.endB)&&t.someProp("handleKeyDown",b=>b(t,ne(13,"Enter")))){t.input.lastIOSEnter=0;return}if(!h)if(o&&a instanceof C&&!a.empty&&a.$head.sameParent(a.$anchor)&&!t.composing&&!(c.sel&&c.sel.anchor!=c.sel.head))h={start:a.from,endA:a.to,endB:a.to};else{if(c.sel){let b=bn(t,t.state.doc,c.sel);if(b&&!b.eq(t.state.selection)){let v=t.state.tr.setSelection(b);s&&v.setMeta("composition",s),t.dispatch(v)}}return}t.state.selection.from<t.state.selection.to&&h.start==h.endB&&t.state.selection instanceof C&&(h.start>t.state.selection.from&&h.start<=t.state.selection.from+2&&t.state.selection.from>=c.from?h.start=t.state.selection.from:h.endA<t.state.selection.to&&h.endA>=t.state.selection.to-2&&t.state.selection.to<=c.to&&(h.endB+=t.state.selection.to-h.endA,h.endA=t.state.selection.to)),A&&U<=11&&h.endB==h.start+1&&h.endA==h.start&&h.start>c.from&&c.doc.textBetween(h.start-c.from-1,h.start-c.from+1)=="  "&&(h.start--,h.endA--,h.endB--);let g=c.doc.resolveNoCache(h.start-c.from),m=c.doc.resolveNoCache(h.endB-c.from),y=d.resolve(h.start),E=g.sameParent(m)&&g.parent.inlineContent&&y.end()>=h.endA,xe;if((de&&t.input.lastIOSEnter>Date.now()-225&&(!E||i.some(b=>b.nodeName=="DIV"||b.nodeName=="P"))||!E&&g.pos<c.doc.content.size&&(!g.sameParent(m)||!g.parent.inlineContent)&&!/\S/.test(c.doc.textBetween(g.pos,m.pos,"",""))&&(xe=ee.findFrom(c.doc.resolve(g.pos+1),1,!0))&&xe.head>g.pos)&&t.someProp("handleKeyDown",b=>b(t,ne(13,"Enter")))){t.input.lastIOSEnter=0;return}if(t.state.selection.anchor>h.start&&ni(d,h.start,h.endA,g,m)&&t.someProp("handleKeyDown",b=>b(t,ne(8,"Backspace")))){H&&O&&t.domObserver.suppressSelectionUpdates();return}O&&h.endB==h.start&&(t.input.lastChromeDelete=Date.now()),H&&!E&&g.start()!=m.start()&&m.parentOffset==0&&g.depth==m.depth&&c.sel&&c.sel.anchor==c.sel.head&&c.sel.head==h.endA&&(h.endB-=2,m=c.doc.resolveNoCache(h.endB-c.from),setTimeout(()=>{t.someProp("handleKeyDown",function(b){return b(t,ne(13,"Enter"))})},20));let w=h.start,ae=h.endA,P,at,Ie;if(E){if(g.pos==m.pos)A&&U<=11&&g.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>_(t),20)),P=t.state.tr.delete(w,ae),at=d.resolve(h.start).marksAcross(d.resolve(h.endA));else if(h.endA==h.endB&&(Ie=ti(g.parent.content.cut(g.parentOffset,m.parentOffset),y.parent.content.cut(y.parentOffset,h.endA-y.start()))))P=t.state.tr,Ie.type=="add"?P.addMark(w,ae,Ie.mark):P.removeMark(w,ae,Ie.mark);else if(g.parent.child(g.index()).isText&&g.index()==m.index()-(m.textOffset?0:1)){let b=g.parent.textBetween(g.parentOffset,m.parentOffset);if(t.someProp("handleTextInput",v=>v(t,w,ae,b)))return;P=t.state.tr.insertText(b,w,ae)}}if(P||(P=t.state.tr.replace(w,ae,c.doc.slice(h.start-c.from,h.endB-c.from))),c.sel){let b=bn(t,P.doc,c.sel);b&&!(O&&t.composing&&b.empty&&(h.start!=h.endB||t.input.lastChromeDelete<Date.now()-100)&&(b.head==w||b.head==P.mapping.map(ae)-1)||A&&b.empty&&b.head==w)&&P.setSelection(b)}at&&P.ensureMarks(at),s&&P.setMeta("composition",s),t.dispatch(P.scrollIntoView())}function bn(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:Xe(t,e.resolve(n.anchor),e.resolve(n.head))}function ti(t,e){let n=t.firstChild.marks,o=e.firstChild.marks,i=n,s=o,r,l,a;for(let d=0;d<o.length;d++)i=o[d].removeFromSet(i);for(let d=0;d<n.length;d++)s=n[d].removeFromSet(s);if(i.length==1&&s.length==0)l=i[0],r="add",a=d=>d.mark(l.addToSet(d.marks));else if(i.length==0&&s.length==1)l=s[0],r="remove",a=d=>d.mark(l.removeFromSet(d.marks));else return null;let c=[];for(let d=0;d<e.childCount;d++)c.push(a(e.child(d)));if(z.from(c).eq(t))return{mark:l,type:r}}function ni(t,e,n,o,i){if(n-e<=i.pos-o.pos||lt(o,!0,!1)<i.pos)return!1;let s=t.resolve(e);if(!o.parent.isTextblock){let l=s.nodeAfter;return l!=null&&n==e+l.nodeSize}if(s.parentOffset<s.parent.content.size||!s.parent.isTextblock)return!1;let r=t.resolve(lt(s,!0,!0));return!r.parent.isTextblock||r.pos>n||lt(r,!0,!1)<n?!1:o.parent.content.cut(o.parentOffset).eq(r.parent.content)}function lt(t,e,n){let o=t.depth,i=e?t.end():t.pos;for(;o>0&&(e||t.indexAfter(o)==t.node(o).childCount);)o--,i++,e=!1;if(n){let s=t.node(o).maybeChild(t.indexAfter(o));for(;s&&!s.isLeaf;)s=s.firstChild,i++}return i}function oi(t,e,n,o,i){let s=t.findDiffStart(e,n);if(s==null)return null;let{a:r,b:l}=t.findDiffEnd(e,n+t.size,n+e.size);if(i=="end"){let a=Math.max(0,s-Math.min(r,l));o-=r+a-s}if(r<s&&t.size<e.size){let a=o<=s&&o>=r?s-o:0;s-=a,s&&s<e.size&&Dn(e.textBetween(s-1,s+1))&&(s+=a?1:-1),l=s+(l-r),r=s}else if(l<s){let a=o<=s&&o>=l?s-o:0;s-=a,s&&s<t.size&&Dn(t.textBetween(s-1,s+1))&&(s+=a?1:-1),r=s+(r-l),l=s}return{start:s,endA:r,endB:l}}function Dn(t){if(t.length!=2)return!1;let e=t.charCodeAt(0),n=t.charCodeAt(1);return e>=56320&&e<=57343&&n>=55296&&n<=56319}class ii{constructor(e,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new Co,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(Mn),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=Cn(this),Sn(this),this.nodeViews=On(this),this.docView=Et(this.state.doc,Nn(this),rt(this),this.dom,this),this.domObserver=new Go(this,(o,i,s,r)=>ei(this,o,i,s,r)),this.domObserver.start(),Oo(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let n in e)this._props[n]=e[n];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&et(this);let n=this._props;this._props=e,e.plugins&&(e.plugins.forEach(Mn),this.directPlugins=e.plugins),this.updateStateInner(e.state,n)}setProps(e){let n={};for(let o in this._props)n[o]=this._props[o];n.state=this.state;for(let o in e)n[o]=e[o];this.update(n)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,n){var o;let i=this.state,s=!1,r=!1;e.storedMarks&&this.composing&&(ln(this),r=!0),this.state=e;let l=i.plugins!=e.plugins||this._props.plugins!=n.plugins;if(l||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let p=On(this);ri(p,this.nodeViews)&&(this.nodeViews=p,s=!0)}(l||n.handleDOMEvents!=this._props.handleDOMEvents)&&et(this),this.editable=Cn(this),Sn(this);let a=rt(this),c=Nn(this),d=i.plugins!=e.plugins&&!i.doc.eq(e.doc)?"reset":e.scrollToSelection>i.scrollToSelection?"to selection":"preserve",f=s||!this.docView.matchesNode(e.doc,c,a);(f||!e.selection.eq(i.selection))&&(r=!0);let u=d=="preserve"&&r&&this.dom.style.overflowAnchor==null&&zn(this);if(r){this.domObserver.stop();let p=f&&(A||O)&&!this.composing&&!i.selection.empty&&!e.selection.empty&&si(i.selection,e.selection);if(f){let h=O?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=zo(this)),(s||!this.docView.update(e.doc,c,a,this))&&(this.docView.updateOuterDeco(c),this.docView.destroy(),this.docView=Et(e.doc,c,a,this.dom,this)),h&&!this.trackWrites&&(p=!0)}p||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&ro(this))?_(this,p):(qt(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(i),!((o=this.dragging)===null||o===void 0)&&o.node&&!i.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,i),d=="reset"?this.dom.scrollTop=0:d=="to selection"?this.scrollToSelection():u&&Ln(u)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!(!e||!this.dom.contains(e.nodeType==1?e:e.parentNode))){if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof N){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&gt(this,n.getBoundingClientRect(),e)}else gt(this,this.coordsAtPos(this.state.selection.head,1),e)}}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n<this.directPlugins.length;n++){let o=this.directPlugins[n];o.spec.view&&this.pluginViews.push(o.spec.view(this))}for(let n=0;n<this.state.plugins.length;n++){let o=this.state.plugins[n];o.spec.view&&this.pluginViews.push(o.spec.view(this))}}else for(let n=0;n<this.pluginViews.length;n++){let o=this.pluginViews[n];o.update&&o.update(this,e)}}updateDraggedNode(e,n){let o=e.node,i=-1;if(this.state.doc.nodeAt(o.from)==o.node)i=o.from;else{let s=o.from+(this.state.doc.content.size-n.doc.content.size);(s>0&&this.state.doc.nodeAt(s))==o.node&&(i=s)}this.dragging=new cn(e.slice,e.move,i<0?void 0:N.create(this.state.doc,i))}someProp(e,n){let o=this._props&&this._props[e],i;if(o!=null&&(i=n?n(o):o))return i;for(let r=0;r<this.directPlugins.length;r++){let l=this.directPlugins[r].props[e];if(l!=null&&(i=n?n(l):l))return i}let s=this.state.plugins;if(s)for(let r=0;r<s.length;r++){let l=s[r].props[e];if(l!=null&&(i=n?n(l):l))return i}}hasFocus(){if(A){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if(e.contentEditable=="false")return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&$n(this.dom),_(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let n=this.dom.parentNode;n;n=n.parentNode)if(n.nodeType==9||n.nodeType==11&&n.host)return n.getSelection||(Object.getPrototypeOf(n).getSelection=()=>n.ownerDocument.getSelection()),this._root=n}return e||document}updateRoot(){this._root=null}posAtCoords(e){return _n(this,e)}coordsAtPos(e,n=1){return Ct(this,e,n)}domAtPos(e,n=0){return this.docView.domFromPos(e,n)}nodeDOM(e){let n=this.docView.descAt(e);return n?n.nodeDOM:null}posAtDOM(e,n,o=-1){let i=this.docView.posFromDOM(e,n,o);if(i==null)throw new RangeError("DOM position not inside the editor");return i}endOfTextblock(e,n){return Xn(this,n||this.state,e)}pasteHTML(e,n){return Oe(this,"",e,!1,n||new ClipboardEvent("paste"))}pasteText(e,n){return Oe(this,e,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(e){return Qe(this,e)}destroy(){this.docView&&(Mo(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],rt(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,xn())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return ko(this,e)}dispatch(e){let n=this._props.dispatchTransaction;n?n.call(this,e):this.updateState(this.state.apply(e))}domSelectionRange(){let e=this.domSelection();return e?x&&this.root.nodeType===11&&Pn(this.dom.ownerDocument)==this.dom&&Jo(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}ze("E",ii);function Nn(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(t.state)),n)for(let o in n)o=="class"?e.class+=" "+n[o]:o=="style"?e.style=(e.style?e.style+";":"")+n[o]:!e[o]&&o!="contenteditable"&&o!="nodeName"&&(e[o]=String(n[o]))}),e.translate||(e.translate="no"),[I.node(0,t.state.doc.content.size,e)]}function Sn(t){if(t.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),t.cursorWrapper={dom:e,deco:I.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function Cn(t){return!t.someProp("editable",e=>e(t.state)===!1)}function si(t,e){let n=Math.min(t.$anchor.sharedDepth(t.head),e.$anchor.sharedDepth(e.head));return t.$anchor.start(n)!=e.$anchor.start(n)}function On(t){let e=Object.create(null);function n(o){for(let i in o)Object.prototype.hasOwnProperty.call(e,i)||(e[i]=o[i])}return t.someProp("nodeViews",n),t.someProp("markViews",n),e}function ri(t,e){let n=0,o=0;for(let i in t){if(t[i]!=e[i])return!0;n++}for(let i in e)o++;return n!=o}function Mn(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}}}});
@@ -1 +0,0 @@
1
- System.register([],function(u,g){"use strict";return{execute:function(){var a=200,p=u("R",function(){});p.prototype.append=function(t){return t.length?(t=p.from(t),!this.length&&t||t.length<a&&this.leafAppend(t)||this.length<a&&t.leafPrepend(this)||this.appendInner(t)):this},p.prototype.prepend=function(t){return t.length?p.from(t).append(this):this},p.prototype.appendInner=function(t){return new c(this,t)},p.prototype.slice=function(t,r){return t===void 0&&(t=0),r===void 0&&(r=this.length),t>=r?p.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,r))},p.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)},p.prototype.forEach=function(t,r,e){r===void 0&&(r=0),e===void 0&&(e=this.length),r<=e?this.forEachInner(t,r,e,0):this.forEachInvertedInner(t,r,e,0)},p.prototype.map=function(t,r,e){r===void 0&&(r=0),e===void 0&&(e=this.length);var n=[];return this.forEach(function(i,s){return n.push(t(i,s))},r,e),n},p.from=function(t){return t instanceof p?t:t&&t.length?new o(t):p.empty};var o=function(h){function t(e){h.call(this),this.values=e}h&&(t.__proto__=h),t.prototype=Object.create(h&&h.prototype),t.prototype.constructor=t;var r={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(n,i){return n==0&&i==this.length?this:new t(this.values.slice(n,i))},t.prototype.getInner=function(n){return this.values[n]},t.prototype.forEachInner=function(n,i,s,f){for(var l=i;l<s;l++)if(n(this.values[l],f+l)===!1)return!1},t.prototype.forEachInvertedInner=function(n,i,s,f){for(var l=i-1;l>=s;l--)if(n(this.values[l],f+l)===!1)return!1},t.prototype.leafAppend=function(n){if(this.length+n.length<=a)return new t(this.values.concat(n.flatten()))},t.prototype.leafPrepend=function(n){if(this.length+n.length<=a)return new t(n.flatten().concat(this.values))},r.length.get=function(){return this.values.length},r.depth.get=function(){return 0},Object.defineProperties(t.prototype,r),t}(p);p.empty=new o([]);var c=function(h){function t(r,e){h.call(this),this.left=r,this.right=e,this.length=r.length+e.length,this.depth=Math.max(r.depth,e.depth)+1}return h&&(t.__proto__=h),t.prototype=Object.create(h&&h.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,n,i,s){var f=this.left.length;if(n<f&&this.left.forEachInner(e,n,Math.min(i,f),s)===!1||i>f&&this.right.forEachInner(e,Math.max(n-f,0),Math.min(this.length,i)-f,s+f)===!1)return!1},t.prototype.forEachInvertedInner=function(e,n,i,s){var f=this.left.length;if(n>f&&this.right.forEachInvertedInner(e,n-f,Math.max(i,f)-f,s+f)===!1||i<f&&this.left.forEachInvertedInner(e,Math.min(n,f),i,s)===!1)return!1},t.prototype.sliceInner=function(e,n){if(e==0&&n==this.length)return this;var i=this.left.length;return n<=i?this.left.slice(e,n):e>=i?this.right.slice(e-i,n-i):this.left.slice(e,i).append(this.right.slice(0,n-i))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(p)}}});
@@ -1,100 +0,0 @@
1
- var l = 200, p = function() {
2
- };
3
- p.prototype.append = function(t) {
4
- return t.length ? (t = p.from(t), !this.length && t || t.length < l && this.leafAppend(t) || this.length < l && t.leafPrepend(this) || this.appendInner(t)) : this;
5
- };
6
- p.prototype.prepend = function(t) {
7
- return t.length ? p.from(t).append(this) : this;
8
- };
9
- p.prototype.appendInner = function(t) {
10
- return new u(this, t);
11
- };
12
- p.prototype.slice = function(t, r) {
13
- return t === void 0 && (t = 0), r === void 0 && (r = this.length), t >= r ? p.empty : this.sliceInner(Math.max(0, t), Math.min(this.length, r));
14
- };
15
- p.prototype.get = function(t) {
16
- if (!(t < 0 || t >= this.length))
17
- return this.getInner(t);
18
- };
19
- p.prototype.forEach = function(t, r, e) {
20
- r === void 0 && (r = 0), e === void 0 && (e = this.length), r <= e ? this.forEachInner(t, r, e, 0) : this.forEachInvertedInner(t, r, e, 0);
21
- };
22
- p.prototype.map = function(t, r, e) {
23
- r === void 0 && (r = 0), e === void 0 && (e = this.length);
24
- var n = [];
25
- return this.forEach(function(i, s) {
26
- return n.push(t(i, s));
27
- }, r, e), n;
28
- };
29
- p.from = function(t) {
30
- return t instanceof p ? t : t && t.length ? new o(t) : p.empty;
31
- };
32
- var o = /* @__PURE__ */ function(h) {
33
- function t(e) {
34
- h.call(this), this.values = e;
35
- }
36
- h && (t.__proto__ = h), t.prototype = Object.create(h && h.prototype), t.prototype.constructor = t;
37
- var r = { length: { configurable: !0 }, depth: { configurable: !0 } };
38
- return t.prototype.flatten = function() {
39
- return this.values;
40
- }, t.prototype.sliceInner = function(n, i) {
41
- return n == 0 && i == this.length ? this : new t(this.values.slice(n, i));
42
- }, t.prototype.getInner = function(n) {
43
- return this.values[n];
44
- }, t.prototype.forEachInner = function(n, i, s, f) {
45
- for (var a = i; a < s; a++)
46
- if (n(this.values[a], f + a) === !1)
47
- return !1;
48
- }, t.prototype.forEachInvertedInner = function(n, i, s, f) {
49
- for (var a = i - 1; a >= s; a--)
50
- if (n(this.values[a], f + a) === !1)
51
- return !1;
52
- }, t.prototype.leafAppend = function(n) {
53
- if (this.length + n.length <= l)
54
- return new t(this.values.concat(n.flatten()));
55
- }, t.prototype.leafPrepend = function(n) {
56
- if (this.length + n.length <= l)
57
- return new t(n.flatten().concat(this.values));
58
- }, r.length.get = function() {
59
- return this.values.length;
60
- }, r.depth.get = function() {
61
- return 0;
62
- }, Object.defineProperties(t.prototype, r), t;
63
- }(p);
64
- p.empty = new o([]);
65
- var u = /* @__PURE__ */ function(h) {
66
- function t(r, e) {
67
- h.call(this), this.left = r, this.right = e, this.length = r.length + e.length, this.depth = Math.max(r.depth, e.depth) + 1;
68
- }
69
- return h && (t.__proto__ = h), t.prototype = Object.create(h && h.prototype), t.prototype.constructor = t, t.prototype.flatten = function() {
70
- return this.left.flatten().concat(this.right.flatten());
71
- }, t.prototype.getInner = function(e) {
72
- return e < this.left.length ? this.left.get(e) : this.right.get(e - this.left.length);
73
- }, t.prototype.forEachInner = function(e, n, i, s) {
74
- var f = this.left.length;
75
- if (n < f && this.left.forEachInner(e, n, Math.min(i, f), s) === !1 || i > f && this.right.forEachInner(e, Math.max(n - f, 0), Math.min(this.length, i) - f, s + f) === !1)
76
- return !1;
77
- }, t.prototype.forEachInvertedInner = function(e, n, i, s) {
78
- var f = this.left.length;
79
- if (n > f && this.right.forEachInvertedInner(e, n - f, Math.max(i, f) - f, s + f) === !1 || i < f && this.left.forEachInvertedInner(e, Math.min(n, f), i, s) === !1)
80
- return !1;
81
- }, t.prototype.sliceInner = function(e, n) {
82
- if (e == 0 && n == this.length)
83
- return this;
84
- var i = this.left.length;
85
- return n <= i ? this.left.slice(e, n) : e >= i ? this.right.slice(e - i, n - i) : this.left.slice(e, i).append(this.right.slice(0, n - i));
86
- }, t.prototype.leafAppend = function(e) {
87
- var n = this.right.leafAppend(e);
88
- if (n)
89
- return new t(this.left, n);
90
- }, t.prototype.leafPrepend = function(e) {
91
- var n = this.left.leafPrepend(e);
92
- if (n)
93
- return new t(n, this.right);
94
- }, t.prototype.appendInner = function(e) {
95
- return this.left.depth >= Math.max(this.right.depth, e.depth) + 1 ? new t(this.left, new t(this.right, e)) : new t(this, e);
96
- }, t;
97
- }(p);
98
- export {
99
- p as R
100
- };
@@ -1 +0,0 @@
1
- System.register(["./lodash-BuO1dYnQ.system.js"],function(P,j){"use strict";var N,W;return{setters:[v=>{N=v.t,W=v.d}],execute:function(){var v=function(){return v=Object.assign||function(t){for(var i,e=1,r=arguments.length;e<r;e++){i=arguments[e];for(var l in i)Object.prototype.hasOwnProperty.call(i,l)&&(t[l]=i[l])}return t},v.apply(this,arguments)};function C(s){return!s||!s.ownerDocument||!s.ownerDocument.defaultView?window:s.ownerDocument.defaultView}function L(s){return!s||!s.ownerDocument?document:s.ownerDocument}var _=function(s){var t={},i=Array.prototype.reduce.call(s,function(e,r){var l=r.name.match(/data-simplebar-(.+)/);if(l){var o=l[1].replace(/\W+(.)/g,function(n,h){return h.toUpperCase()});switch(r.value){case"true":e[o]=!0;break;case"false":e[o]=!1;break;case void 0:e[o]=!0;break;default:e[o]=r.value}}return e},t);return i};function R(s,t){var i;s&&(i=s.classList).add.apply(i,t.split(" "))}function D(s,t){s&&t.split(" ").forEach(function(i){s.classList.remove(i)})}function T(s){return".".concat(s.split(" ").join("."))}var z=!!(typeof window<"u"&&window.document&&window.document.createElement),X=Object.freeze({__proto__:null,addClasses:R,canUseDOM:z,classNamesToQuery:T,getElementDocument:L,getElementWindow:C,getOptions:_,removeClasses:D}),y=null,V=null;z&&window.addEventListener("resize",function(){V!==window.devicePixelRatio&&(V=window.devicePixelRatio,y=null)});function H(){if(y===null){if(typeof document>"u")return y=0,y;var s=document.body,t=document.createElement("div");t.classList.add("simplebar-hide-scrollbar"),s.appendChild(t);var i=t.getBoundingClientRect().right;s.removeChild(t),y=i}return y}var p=C,M=L,Y=_,g=R,m=D,c=T,$=P("S",function(){function s(t,i){i===void 0&&(i={});var e=this;if(this.removePreventClickId=null,this.minScrollbarWidth=20,this.stopScrollDelay=175,this.isScrolling=!1,this.isMouseEntering=!1,this.isDragging=!1,this.scrollXTicking=!1,this.scrollYTicking=!1,this.wrapperEl=null,this.contentWrapperEl=null,this.contentEl=null,this.offsetEl=null,this.maskEl=null,this.placeholderEl=null,this.heightAutoObserverWrapperEl=null,this.heightAutoObserverEl=null,this.rtlHelpers=null,this.scrollbarWidth=0,this.resizeObserver=null,this.mutationObserver=null,this.elStyles=null,this.isRtl=null,this.mouseX=0,this.mouseY=0,this.onMouseMove=function(){},this.onWindowResize=function(){},this.onStopScrolling=function(){},this.onMouseEntered=function(){},this.onScroll=function(){var r=p(e.el);e.scrollXTicking||(r.requestAnimationFrame(e.scrollX),e.scrollXTicking=!0),e.scrollYTicking||(r.requestAnimationFrame(e.scrollY),e.scrollYTicking=!0),e.isScrolling||(e.isScrolling=!0,g(e.el,e.classNames.scrolling)),e.showScrollbar("x"),e.showScrollbar("y"),e.onStopScrolling()},this.scrollX=function(){e.axis.x.isOverflowing&&e.positionScrollbar("x"),e.scrollXTicking=!1},this.scrollY=function(){e.axis.y.isOverflowing&&e.positionScrollbar("y"),e.scrollYTicking=!1},this._onStopScrolling=function(){m(e.el,e.classNames.scrolling),e.options.autoHide&&(e.hideScrollbar("x"),e.hideScrollbar("y")),e.isScrolling=!1},this.onMouseEnter=function(){e.isMouseEntering||(g(e.el,e.classNames.mouseEntered),e.showScrollbar("x"),e.showScrollbar("y"),e.isMouseEntering=!0),e.onMouseEntered()},this._onMouseEntered=function(){m(e.el,e.classNames.mouseEntered),e.options.autoHide&&(e.hideScrollbar("x"),e.hideScrollbar("y")),e.isMouseEntering=!1},this._onMouseMove=function(r){e.mouseX=r.clientX,e.mouseY=r.clientY,(e.axis.x.isOverflowing||e.axis.x.forceVisible)&&e.onMouseMoveForAxis("x"),(e.axis.y.isOverflowing||e.axis.y.forceVisible)&&e.onMouseMoveForAxis("y")},this.onMouseLeave=function(){e.onMouseMove.cancel(),(e.axis.x.isOverflowing||e.axis.x.forceVisible)&&e.onMouseLeaveForAxis("x"),(e.axis.y.isOverflowing||e.axis.y.forceVisible)&&e.onMouseLeaveForAxis("y"),e.mouseX=-1,e.mouseY=-1},this._onWindowResize=function(){e.scrollbarWidth=e.getScrollbarWidth(),e.hideNativeScrollbar()},this.onPointerEvent=function(r){if(!(!e.axis.x.track.el||!e.axis.y.track.el||!e.axis.x.scrollbar.el||!e.axis.y.scrollbar.el)){var l,o;e.axis.x.track.rect=e.axis.x.track.el.getBoundingClientRect(),e.axis.y.track.rect=e.axis.y.track.el.getBoundingClientRect(),(e.axis.x.isOverflowing||e.axis.x.forceVisible)&&(l=e.isWithinBounds(e.axis.x.track.rect)),(e.axis.y.isOverflowing||e.axis.y.forceVisible)&&(o=e.isWithinBounds(e.axis.y.track.rect)),(l||o)&&(r.stopPropagation(),r.type==="pointerdown"&&r.pointerType!=="touch"&&(l&&(e.axis.x.scrollbar.rect=e.axis.x.scrollbar.el.getBoundingClientRect(),e.isWithinBounds(e.axis.x.scrollbar.rect)?e.onDragStart(r,"x"):e.onTrackClick(r,"x")),o&&(e.axis.y.scrollbar.rect=e.axis.y.scrollbar.el.getBoundingClientRect(),e.isWithinBounds(e.axis.y.scrollbar.rect)?e.onDragStart(r,"y"):e.onTrackClick(r,"y"))))}},this.drag=function(r){var l,o,n,h,a,d,u,b,f,w,x;if(!(!e.draggedAxis||!e.contentWrapperEl)){var E,S=e.axis[e.draggedAxis].track,O=(o=(l=S.rect)===null||l===void 0?void 0:l[e.axis[e.draggedAxis].sizeAttr])!==null&&o!==void 0?o:0,B=e.axis[e.draggedAxis].scrollbar,q=(h=(n=e.contentWrapperEl)===null||n===void 0?void 0:n[e.axis[e.draggedAxis].scrollSizeAttr])!==null&&h!==void 0?h:0,F=parseInt((d=(a=e.elStyles)===null||a===void 0?void 0:a[e.axis[e.draggedAxis].sizeAttr])!==null&&d!==void 0?d:"0px",10);r.preventDefault(),r.stopPropagation(),e.draggedAxis==="y"?E=r.pageY:E=r.pageX;var k=E-((b=(u=S.rect)===null||u===void 0?void 0:u[e.axis[e.draggedAxis].offsetAttr])!==null&&b!==void 0?b:0)-e.axis[e.draggedAxis].dragOffset;k=e.draggedAxis==="x"&&e.isRtl?((w=(f=S.rect)===null||f===void 0?void 0:f[e.axis[e.draggedAxis].sizeAttr])!==null&&w!==void 0?w:0)-B.size-k:k;var I=k/(O-B.size),A=I*(q-F);e.draggedAxis==="x"&&e.isRtl&&(A=!((x=s.getRtlHelpers())===null||x===void 0)&&x.isScrollingToNegative?-A:A),e.contentWrapperEl[e.axis[e.draggedAxis].scrollOffsetAttr]=A}},this.onEndDrag=function(r){e.isDragging=!1;var l=M(e.el),o=p(e.el);r.preventDefault(),r.stopPropagation(),m(e.el,e.classNames.dragging),e.onStopScrolling(),l.removeEventListener("mousemove",e.drag,!0),l.removeEventListener("mouseup",e.onEndDrag,!0),e.removePreventClickId=o.setTimeout(function(){l.removeEventListener("click",e.preventClick,!0),l.removeEventListener("dblclick",e.preventClick,!0),e.removePreventClickId=null})},this.preventClick=function(r){r.preventDefault(),r.stopPropagation()},this.el=t,this.options=v(v({},s.defaultOptions),i),this.classNames=v(v({},s.defaultOptions.classNames),i.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}}},typeof this.el!="object"||!this.el.nodeName)throw new Error("Argument passed to SimpleBar must be an HTML element instead of ".concat(this.el));this.onMouseMove=N(this._onMouseMove,64),this.onWindowResize=W(this._onWindowResize,64,{leading:!0}),this.onStopScrolling=W(this._onStopScrolling,this.stopScrollDelay),this.onMouseEntered=W(this._onMouseEntered,this.stopScrollDelay),this.init()}return s.getRtlHelpers=function(){if(s.rtlHelpers)return s.rtlHelpers;var t=document.createElement("div");t.innerHTML='<div class="simplebar-dummy-scrollbar-size"><div></div></div>';var i=t.firstElementChild,e=i==null?void 0:i.firstElementChild;if(!e)return null;document.body.appendChild(i),i.scrollLeft=0;var r=s.getOffset(i),l=s.getOffset(e);i.scrollLeft=-999;var o=s.getOffset(e);return document.body.removeChild(i),s.rtlHelpers={isScrollOriginAtZero:r.left!==l.left,isScrollingToNegative:l.left!==o.left},s.rtlHelpers},s.prototype.getScrollbarWidth=function(){try{return this.contentWrapperEl&&getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display==="none"||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:H()}catch{return H()}},s.getOffset=function(t){var i=t.getBoundingClientRect(),e=M(t),r=p(t);return{top:i.top+(r.pageYOffset||e.documentElement.scrollTop),left:i.left+(r.pageXOffset||e.documentElement.scrollLeft)}},s.prototype.init=function(){z&&(this.initDOM(),this.rtlHelpers=s.getRtlHelpers(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},s.prototype.initDOM=function(){var t,i;this.wrapperEl=this.el.querySelector(c(this.classNames.wrapper)),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector(c(this.classNames.contentWrapper)),this.contentEl=this.options.contentNode||this.el.querySelector(c(this.classNames.contentEl)),this.offsetEl=this.el.querySelector(c(this.classNames.offset)),this.maskEl=this.el.querySelector(c(this.classNames.mask)),this.placeholderEl=this.findChild(this.wrapperEl,c(this.classNames.placeholder)),this.heightAutoObserverWrapperEl=this.el.querySelector(c(this.classNames.heightAutoObserverWrapperEl)),this.heightAutoObserverEl=this.el.querySelector(c(this.classNames.heightAutoObserverEl)),this.axis.x.track.el=this.findChild(this.el,"".concat(c(this.classNames.track)).concat(c(this.classNames.horizontal))),this.axis.y.track.el=this.findChild(this.el,"".concat(c(this.classNames.track)).concat(c(this.classNames.vertical))),this.axis.x.scrollbar.el=((t=this.axis.x.track.el)===null||t===void 0?void 0:t.querySelector(c(this.classNames.scrollbar)))||null,this.axis.y.scrollbar.el=((i=this.axis.y.track.el)===null||i===void 0?void 0:i.querySelector(c(this.classNames.scrollbar)))||null,this.options.autoHide||(g(this.axis.x.scrollbar.el,this.classNames.visible),g(this.axis.y.scrollbar.el,this.classNames.visible))},s.prototype.initListeners=function(){var t=this,i,e=p(this.el);if(this.el.addEventListener("mouseenter",this.onMouseEnter),this.el.addEventListener("pointerdown",this.onPointerEvent,!0),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),(i=this.contentWrapperEl)===null||i===void 0||i.addEventListener("scroll",this.onScroll),e.addEventListener("resize",this.onWindowResize),!!this.contentEl){if(window.ResizeObserver){var r=!1,l=e.ResizeObserver||ResizeObserver;this.resizeObserver=new l(function(){r&&e.requestAnimationFrame(function(){t.recalculate()})}),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),e.requestAnimationFrame(function(){r=!0})}this.mutationObserver=new e.MutationObserver(function(){e.requestAnimationFrame(function(){t.recalculate()})}),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})}},s.prototype.recalculate=function(){if(!(!this.heightAutoObserverEl||!this.contentEl||!this.contentWrapperEl||!this.wrapperEl||!this.placeholderEl)){var t=p(this.el);this.elStyles=t.getComputedStyle(this.el),this.isRtl=this.elStyles.direction==="rtl";var i=this.contentEl.offsetWidth,e=this.heightAutoObserverEl.offsetHeight<=1,r=this.heightAutoObserverEl.offsetWidth<=1||i>0,l=this.contentWrapperEl.offsetWidth,o=this.elStyles.overflowX,n=this.elStyles.overflowY;this.contentEl.style.padding="".concat(this.elStyles.paddingTop," ").concat(this.elStyles.paddingRight," ").concat(this.elStyles.paddingBottom," ").concat(this.elStyles.paddingLeft),this.wrapperEl.style.margin="-".concat(this.elStyles.paddingTop," -").concat(this.elStyles.paddingRight," -").concat(this.elStyles.paddingBottom," -").concat(this.elStyles.paddingLeft);var h=this.contentEl.scrollHeight,a=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=e?"auto":"100%",this.placeholderEl.style.width=r?"".concat(i||a,"px"):"auto",this.placeholderEl.style.height="".concat(h,"px");var d=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=i!==0&&a>i,this.axis.y.isOverflowing=h>d,this.axis.x.isOverflowing=o==="hidden"?!1:this.axis.x.isOverflowing,this.axis.y.isOverflowing=n==="hidden"?!1:this.axis.y.isOverflowing,this.axis.x.forceVisible=this.options.forceVisible==="x"||this.options.forceVisible===!0,this.axis.y.forceVisible=this.options.forceVisible==="y"||this.options.forceVisible===!0,this.hideNativeScrollbar();var u=this.axis.x.isOverflowing?this.scrollbarWidth:0,b=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&a>l-b,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&h>d-u,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el&&(this.axis.x.scrollbar.el.style.width="".concat(this.axis.x.scrollbar.size,"px")),this.axis.y.scrollbar.el&&(this.axis.y.scrollbar.el.style.height="".concat(this.axis.y.scrollbar.size,"px")),this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")}},s.prototype.getScrollbarSize=function(t){var i,e;if(t===void 0&&(t="y"),!this.axis[t].isOverflowing||!this.contentEl)return 0;var r=this.contentEl[this.axis[t].scrollSizeAttr],l=(e=(i=this.axis[t].track.el)===null||i===void 0?void 0:i[this.axis[t].offsetSizeAttr])!==null&&e!==void 0?e:0,o=l/r,n;return n=Math.max(~~(o*l),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(n=Math.min(n,this.options.scrollbarMaxSize)),n},s.prototype.positionScrollbar=function(t){var i,e,r;t===void 0&&(t="y");var l=this.axis[t].scrollbar;if(!(!this.axis[t].isOverflowing||!this.contentWrapperEl||!l.el||!this.elStyles)){var o=this.contentWrapperEl[this.axis[t].scrollSizeAttr],n=((i=this.axis[t].track.el)===null||i===void 0?void 0:i[this.axis[t].offsetSizeAttr])||0,h=parseInt(this.elStyles[this.axis[t].sizeAttr],10),a=this.contentWrapperEl[this.axis[t].scrollOffsetAttr];a=t==="x"&&this.isRtl&&(!((e=s.getRtlHelpers())===null||e===void 0)&&e.isScrollOriginAtZero)?-a:a,t==="x"&&this.isRtl&&(a=!((r=s.getRtlHelpers())===null||r===void 0)&&r.isScrollingToNegative?a:-a);var d=a/(o-h),u=~~((n-l.size)*d);u=t==="x"&&this.isRtl?-u+(n-l.size):u,l.el.style.transform=t==="x"?"translate3d(".concat(u,"px, 0, 0)"):"translate3d(0, ".concat(u,"px, 0)")}},s.prototype.toggleTrackVisibility=function(t){t===void 0&&(t="y");var i=this.axis[t].track.el,e=this.axis[t].scrollbar.el;!i||!e||!this.contentWrapperEl||(this.axis[t].isOverflowing||this.axis[t].forceVisible?(i.style.visibility="visible",this.contentWrapperEl.style[this.axis[t].overflowAttr]="scroll",this.el.classList.add("".concat(this.classNames.scrollable,"-").concat(t))):(i.style.visibility="hidden",this.contentWrapperEl.style[this.axis[t].overflowAttr]="hidden",this.el.classList.remove("".concat(this.classNames.scrollable,"-").concat(t))),this.axis[t].isOverflowing?e.style.display="block":e.style.display="none")},s.prototype.showScrollbar=function(t){t===void 0&&(t="y"),this.axis[t].isOverflowing&&!this.axis[t].scrollbar.isVisible&&(g(this.axis[t].scrollbar.el,this.classNames.visible),this.axis[t].scrollbar.isVisible=!0)},s.prototype.hideScrollbar=function(t){t===void 0&&(t="y"),!this.isDragging&&this.axis[t].isOverflowing&&this.axis[t].scrollbar.isVisible&&(m(this.axis[t].scrollbar.el,this.classNames.visible),this.axis[t].scrollbar.isVisible=!1)},s.prototype.hideNativeScrollbar=function(){this.offsetEl&&(this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px",this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px")},s.prototype.onMouseMoveForAxis=function(t){t===void 0&&(t="y");var i=this.axis[t];!i.track.el||!i.scrollbar.el||(i.track.rect=i.track.el.getBoundingClientRect(),i.scrollbar.rect=i.scrollbar.el.getBoundingClientRect(),this.isWithinBounds(i.track.rect)?(this.showScrollbar(t),g(i.track.el,this.classNames.hover),this.isWithinBounds(i.scrollbar.rect)?g(i.scrollbar.el,this.classNames.hover):m(i.scrollbar.el,this.classNames.hover)):(m(i.track.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(t)))},s.prototype.onMouseLeaveForAxis=function(t){t===void 0&&(t="y"),m(this.axis[t].track.el,this.classNames.hover),m(this.axis[t].scrollbar.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(t)},s.prototype.onDragStart=function(t,i){var e;i===void 0&&(i="y"),this.isDragging=!0;var r=M(this.el),l=p(this.el),o=this.axis[i].scrollbar,n=i==="y"?t.pageY:t.pageX;this.axis[i].dragOffset=n-(((e=o.rect)===null||e===void 0?void 0:e[this.axis[i].offsetAttr])||0),this.draggedAxis=i,g(this.el,this.classNames.dragging),r.addEventListener("mousemove",this.drag,!0),r.addEventListener("mouseup",this.onEndDrag,!0),this.removePreventClickId===null?(r.addEventListener("click",this.preventClick,!0),r.addEventListener("dblclick",this.preventClick,!0)):(l.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},s.prototype.onTrackClick=function(t,i){var e=this,r,l,o,n;i===void 0&&(i="y");var h=this.axis[i];if(!(!this.options.clickOnTrack||!h.scrollbar.el||!this.contentWrapperEl)){t.preventDefault();var a=p(this.el);this.axis[i].scrollbar.rect=h.scrollbar.el.getBoundingClientRect();var d=this.axis[i].scrollbar,u=(l=(r=d.rect)===null||r===void 0?void 0:r[this.axis[i].offsetAttr])!==null&&l!==void 0?l:0,b=parseInt((n=(o=this.elStyles)===null||o===void 0?void 0:o[this.axis[i].sizeAttr])!==null&&n!==void 0?n:"0px",10),f=this.contentWrapperEl[this.axis[i].scrollOffsetAttr],w=i==="y"?this.mouseY-u:this.mouseX-u,x=w<0?-1:1,E=x===-1?f-b:f+b,S=40,O=function(){e.contentWrapperEl&&(x===-1?f>E&&(f-=S,e.contentWrapperEl[e.axis[i].scrollOffsetAttr]=f,a.requestAnimationFrame(O)):f<E&&(f+=S,e.contentWrapperEl[e.axis[i].scrollOffsetAttr]=f,a.requestAnimationFrame(O)))};O()}},s.prototype.getContentElement=function(){return this.contentEl},s.prototype.getScrollElement=function(){return this.contentWrapperEl},s.prototype.removeListeners=function(){var t=p(this.el);this.el.removeEventListener("mouseenter",this.onMouseEnter),this.el.removeEventListener("pointerdown",this.onPointerEvent,!0),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.onMouseMove.cancel(),this.onWindowResize.cancel(),this.onStopScrolling.cancel(),this.onMouseEntered.cancel()},s.prototype.unMount=function(){this.removeListeners()},s.prototype.isWithinBounds=function(t){return this.mouseX>=t.left&&this.mouseX<=t.left+t.width&&this.mouseY>=t.top&&this.mouseY<=t.top+t.height},s.prototype.findChild=function(t,i){var e=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector;return Array.prototype.filter.call(t.children,function(r){return e.call(r,i)})[0]},s.rtlHelpers=null,s.defaultOptions={forceVisible:!1,clickOnTrack:!0,scrollbarMinSize:25,scrollbarMaxSize:0,ariaLabel:"scrollable content",tabIndex:0,classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging",scrolling:"simplebar-scrolling",scrollable:"simplebar-scrollable",mouseEntered:"simplebar-mouse-entered"},scrollableNode:null,contentNode:null,autoHide:!0},s.getOptions=Y,s.helpers=X,s}())}}});