@hiai-gg/docsmint 0.7.4 → 0.7.6

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 (246) hide show
  1. package/README.md +2 -2
  2. package/dist/backend/index.js +130026 -129609
  3. package/dist/backend-account-runtime-cleanup.js +2 -0
  4. package/dist/backend-api-key-facade.js +2 -0
  5. package/dist/backend-pipeline-cancellation.js +2 -0
  6. package/dist/frontend/CategoryDialog-D_xFSWGh.js +630 -0
  7. package/dist/frontend/ConfirmDialog-Cfq3D2Di.js +221 -0
  8. package/dist/frontend/{CreateSnapshotDialog-CojnWChs.js → CreateSnapshotDialog-BHODxZWK.js} +53 -52
  9. package/dist/frontend/{DatePicker-7FAbIOGg.js → DatePicker-CZyCnQ1q.js} +62 -64
  10. package/dist/frontend/{DeleteDialog-BIlqRb1u.js → DeleteDialog-DaJOO6SB.js} +17 -17
  11. package/dist/frontend/FolderNode-C_91NlEO.js +307 -0
  12. package/dist/frontend/{FolderTreeSelector-BMB1MS9N.js → FolderTreeSelector-DqO-f0nt.js} +7 -7
  13. package/dist/frontend/HiAiEditor-DtUGbQg6.js +3160 -0
  14. package/dist/frontend/{HiaiDocsExtensionProvider-OSn96BBw.js → HiaiDocsExtensionProvider-Cc3yzW5I.js} +5 -3
  15. package/dist/frontend/{Icon-Db-o32_E.js → Icon-y7xxAIC6.js} +1 -1
  16. package/dist/frontend/{SettingsDialog-DatuxOVX.js → SettingsDialog-BlIZqk2-.js} +169 -158
  17. package/dist/frontend/ShareDialog-CmX-VoJ9.js +273 -0
  18. package/dist/frontend/Sidebar-BVGm5BRR.js +2147 -0
  19. package/dist/frontend/{TagCreateDialog-Ch21yuWV.js → TagCreateDialog-BlGz4O9Z.js} +45 -36
  20. package/dist/frontend/action_cancel-Cuxsznzz.js +5 -0
  21. package/dist/frontend/action_close-BJm_52wm.js +5 -0
  22. package/dist/frontend/action_create-CtBQrRuj.js +5 -0
  23. package/dist/frontend/action_delete-BXBIzvn0.js +5 -0
  24. package/dist/frontend/action_go_to-VmK5jmEk.js +5 -0
  25. package/dist/frontend/action_loading-BLCGJVA9.js +5 -0
  26. package/dist/frontend/action_save-BRN2Z_GP.js +5 -0
  27. package/dist/frontend/api/attachments.js +1 -1
  28. package/dist/frontend/api/categories.js +1 -1
  29. package/dist/frontend/api/folders.js +1 -1
  30. package/dist/frontend/api/settings.js +1 -1
  31. package/dist/frontend/api/share.js +1 -1
  32. package/dist/frontend/api/tags.js +1 -1
  33. package/dist/frontend/app-shell.js +8 -8
  34. package/dist/frontend/{attachments-B2aH3hXF.js → attachments-C225gTA7.js} +2 -2
  35. package/dist/frontend/{auth-client-CnDZwPfp.js → auth-client-DCMne8vd.js} +630 -615
  36. package/dist/frontend/{bundle-mjs-DllmqUxV.js → bundle-mjs-CZ3g1Uzr.js} +35 -42
  37. package/dist/frontend/{camera-CzCxBOpc.js → camera-BI-BtnIm.js} +2 -2
  38. package/dist/frontend/{categories-X7gK8azc.js → categories-Bjcc41We.js} +1 -1
  39. package/dist/frontend/categories_update_error-4aSI8PTr.js +5 -0
  40. package/dist/frontend/{check-BIi-Ghti.js → check-sdTlLwi9.js} +2 -2
  41. package/dist/frontend/{chevron-down-C2ft7XUV.js → chevron-down-DlBnIE7Y.js} +2 -2
  42. package/dist/frontend/{circle-check-BrqfiQH1.js → circle-check-hWC-HeKu.js} +2 -2
  43. package/dist/frontend/{clock-Dz86E4Kz.js → clock-C4FHq-9q.js} +2 -2
  44. package/dist/frontend/collaboration.js +208 -103
  45. package/dist/frontend/components/category-dialog.js +1 -1
  46. package/dist/frontend/components/create-snapshot-dialog.js +1 -1
  47. package/dist/frontend/components/delete-dialog.js +1 -1
  48. package/dist/frontend/components/editor/compact-editor.js +1 -1
  49. package/dist/frontend/components/editor/document-editor.js +1 -1
  50. package/dist/frontend/components/editor/document-title.js +3 -2
  51. package/dist/frontend/components/editor/docx-serializer.js +140 -125
  52. package/dist/frontend/components/editor/extensions.js +1 -1
  53. package/dist/frontend/components/editor/markdown-toggle.js +9 -9
  54. package/dist/frontend/components/editor/markdown.js +1 -1
  55. package/dist/frontend/components/folder-node.js +1 -1
  56. package/dist/frontend/components/folder-tree-selector.js +1 -1
  57. package/dist/frontend/components/save-as-dialog.js +34 -25
  58. package/dist/frontend/components/settings.js +1 -1
  59. package/dist/frontend/components/share-dialog.js +1 -1
  60. package/dist/frontend/components/sidebar.js +1 -1
  61. package/dist/frontend/components/tag-create-dialog.js +1 -1
  62. package/dist/frontend/components/version-history.js +181 -176
  63. package/dist/frontend/{confirm-dialog-8T6vsWL7.js → confirm-dialog-BFTxjLv-.js} +46 -37
  64. package/dist/frontend/{copy-CvCh4ZVt.js → copy-4H99lwAQ.js} +2 -2
  65. package/dist/frontend/dashboard.js +462 -456
  66. package/dist/frontend/{db-Bo1t_76T.js → db-CbFRFAm2.js} +40 -38
  67. package/dist/frontend/{dialog-CiSwD-_v.js → dialog-tHAH3-9M.js} +10 -10
  68. package/dist/frontend/dist-Cg1BpNS7.js +2262 -0
  69. package/dist/frontend/dndzone-BrakBHwm.js +1375 -0
  70. package/dist/frontend/doc_title_label-DS9jSIh2.js +5 -0
  71. package/dist/frontend/doc_title_placeholder-DBQpM1aH.js +5 -0
  72. package/dist/frontend/{document-drop-coordinator-C4xHMjwC.js → document-drop-coordinator-Da7HcXgv.js} +1 -1
  73. package/dist/frontend/document-drop-coordinator.js +1 -1
  74. package/dist/frontend/{dropdown-menu-Bi5Iipwf.js → dropdown-menu-AJYeFPHu.js} +145 -145
  75. package/dist/frontend/{editor-content-sanitizer-CC_A8aaI.js → editor-content-sanitizer-CWjqiz0T.js} +30 -30
  76. package/dist/frontend/{editorExtensions--HusV819.js → editorExtensions-B-mKiWqq.js} +5085 -6220
  77. package/dist/frontend/editor_markdown_placeholder-BIWDUF1E.js +5 -0
  78. package/dist/frontend/error_dismiss-Dx_JbRjs.js +5 -0
  79. package/dist/frontend/error_generic-CzNtmBT4.js +5 -0
  80. package/dist/frontend/extension.js +1 -1
  81. package/dist/frontend/{folder-Cx60MRpi.js → folder-BAX6qBYy.js} +3 -3
  82. package/dist/frontend/{folders-ONG03Dkv.js → folders-CC0UWkZH.js} +3 -3
  83. package/dist/frontend/folders_rename-BJo4Gipq.js +5 -0
  84. package/dist/frontend/i18n.js +1007 -6
  85. package/dist/frontend/{identity-Ynrglr5i.js → identity-O4lAuchv.js} +2 -2
  86. package/dist/frontend/{input-N9dNSOWF.js → input-CrlYAH2S.js} +2 -2
  87. package/dist/frontend/{label-CK72_fw8.js → label-B0syEfns.js} +2 -2
  88. package/dist/frontend/{markdown-H6QB53zu.js → markdown-CMij27Gg.js} +1 -1
  89. package/dist/frontend/offline/identity.js +1 -1
  90. package/dist/frontend/{floating-layer-anchor-BGIndLY-.js → popper-layer-force-mount-BAYjg6Pp.js} +2476 -2564
  91. package/dist/frontend/{rolldown-runtime-CWhphoD1.js → rolldown-runtime-DArdT4gl.js} +2 -2
  92. package/dist/frontend/{rotate-ccw-ta4NosZ0.js → rotate-ccw-DtZDfSK3.js} +2 -2
  93. package/dist/frontend/runtime-CwWSo6c9.js +128 -0
  94. package/dist/frontend/{schemas-DwtKylCJ.js → schemas-CdPhcuru.js} +6 -7
  95. package/dist/frontend/scroll_to_top_aria-CvkNF_Hu.js +5 -0
  96. package/dist/frontend/search.js +237 -265
  97. package/dist/frontend/search_title-DOC0cPlQ.js +5 -0
  98. package/dist/frontend/{select-value-BD1DToYs.js → select-value-D9VqY5n5.js} +575 -572
  99. package/dist/frontend/{settings-BR48ihB4.js → settings-DJW8JkdF.js} +1 -1
  100. package/dist/frontend/{share-D7JtkC85.js → share-D5yo0JOh.js} +2 -1
  101. package/dist/frontend/share_copied-DPxVzfWh.js +5 -0
  102. package/dist/frontend/share_toggle_password-DdxfIjj1.js +5 -0
  103. package/dist/frontend/shared-document.js +1 -1
  104. package/dist/frontend/sidebar_uncategorized-qJ2_Aonf.js +5 -0
  105. package/dist/frontend/sort_relevance-DwYX5MO9.js +5 -0
  106. package/dist/frontend/{tag-DhVFHMcV.js → tag-ChpMfbfa.js} +3 -3
  107. package/dist/frontend/{tags-BdCaMGfj.js → tags-CzPNUoFw.js} +1 -1
  108. package/dist/frontend/tags_load_error-BKjA1pI0.js +5 -0
  109. package/dist/frontend/tags_new-BiNAJ9Bx.js +5 -0
  110. package/dist/frontend/{textarea-pl_fDBre.js → textarea-l_gRXsrH.js} +2 -2
  111. package/dist/frontend/theme.js +1 -1
  112. package/dist/frontend/{theme.svelte-DG3RS7wv.js → theme.svelte-Bzitjfh9.js} +2 -2
  113. package/dist/frontend/theme_system-BBNUhYKh.js +5 -0
  114. package/dist/frontend/utils/dndzone.js +1 -1
  115. package/dist/frontend/utils-B4LKx7VS.js +7 -0
  116. package/dist/frontend/{utils-DrfHTcei.js → utils-BovMJHdA.js} +2 -2
  117. package/dist/frontend/utils.js +1 -1
  118. package/dist/frontend/version_create_snapshot-3bu-0qzH.js +5 -0
  119. package/dist/frontend/version_restored_from-dVRN3Zdk.js +5 -0
  120. package/dist/frontend/version_snapshot_label_placeholder-DrMikux0.js +5 -0
  121. package/dist/frontend/weekday_we-C5H_M-df.js +5 -0
  122. package/dist/frontend/{x-cfdlccjs.js → x-B2ifxSH7.js} +2 -2
  123. package/dist/frontend/{awareness-snQ3RD9f.js → yjs-VUcKqaKW.js} +835 -944
  124. package/dist/frontend-ssr/api/attachments.js +92 -1
  125. package/dist/frontend-ssr/api/categories.js +1 -1
  126. package/dist/frontend-ssr/api/documents.js +1 -1
  127. package/dist/frontend-ssr/api/folders.js +1 -1
  128. package/dist/frontend-ssr/api/settings.js +1 -1
  129. package/dist/frontend-ssr/api/share.js +30 -1
  130. package/dist/frontend-ssr/api/tags.js +1 -1
  131. package/dist/frontend-ssr/app-shell.js +25 -18
  132. package/dist/frontend-ssr/assets/{CategoryDialog-DsXe54EF.js → CategoryDialog-C41IBNWG.js} +26 -35
  133. package/dist/frontend-ssr/assets/ConfirmDialog-CWO0HBaS.js +424 -0
  134. package/dist/frontend-ssr/assets/{CreateSnapshotDialog-D3-PjXVr.js → CreateSnapshotDialog-CECCRK0d.js} +12 -18
  135. package/dist/frontend-ssr/assets/{DatePicker-C9suIA1S.js → DatePicker-TZVeMZ2S.js} +32 -20
  136. package/dist/frontend-ssr/assets/{DeleteDialog-DxtMrS1O.js → DeleteDialog-BVnmzR2e.js} +5 -7
  137. package/dist/frontend-ssr/assets/{FolderNode-ChD10Elp.js → FolderNode-CClgk8BL.js} +7 -7
  138. package/dist/frontend-ssr/assets/{FolderTreeSelector-Bxi8EqMm.js → FolderTreeSelector-DnrKCYtl.js} +17 -20
  139. package/dist/frontend-ssr/assets/{HiAiEditor-2X3Uyg1B.js → HiAiEditor-_-m7MJDd.js} +330 -254
  140. package/dist/frontend-ssr/assets/{Icon-QwirKi9Y.js → Icon-Clqe8D8X.js} +28 -16
  141. package/dist/frontend-ssr/assets/{SettingsDialog-DDy0hN8x.js → SettingsDialog-BdvHRAxF.js} +45 -49
  142. package/dist/frontend-ssr/assets/{ShareDialog-BwW_wF4G.js → ShareDialog-DHPbSHZg.js} +5 -6
  143. package/dist/frontend-ssr/assets/{Sidebar-Dy-5gXOf.js → Sidebar-B3Saqn0O.js} +90 -93
  144. package/dist/frontend-ssr/assets/{TagCreateDialog-BPzgOaX8.js → TagCreateDialog-CPg-nG0D.js} +14 -14
  145. package/dist/frontend-ssr/assets/action_cancel-OVgQDP5Q.js +22 -0
  146. package/dist/frontend-ssr/assets/action_close-DagDyMXk.js +22 -0
  147. package/dist/frontend-ssr/assets/action_create-hqJWjyqh.js +22 -0
  148. package/dist/frontend-ssr/assets/action_delete-B1-16jSo.js +22 -0
  149. package/dist/frontend-ssr/assets/action_go_to-DQScgw7P.js +22 -0
  150. package/dist/frontend-ssr/assets/action_save-Bx7vlLZI.js +22 -0
  151. package/dist/frontend-ssr/assets/{api-keys-DIbclwj5.js → api-keys-CHOrbU-Q.js} +1 -1
  152. package/dist/frontend-ssr/assets/{auth-client-CojKIzqy.js → auth-client-DzkZlSQ8.js} +295 -261
  153. package/dist/frontend-ssr/assets/{camera-D6s20LDi.js → camera-Dwwtgvfn.js} +10 -6
  154. package/dist/frontend-ssr/assets/{categories-av9xjeg5.js → categories-C_dxFoHi.js} +1 -1
  155. package/dist/frontend-ssr/assets/categories_update_error-DkKgsqdD.js +202 -0
  156. package/dist/frontend-ssr/assets/{chevron-down-CvqKATjM.js → chevron-down-C6BTPJFz.js} +10 -6
  157. package/dist/frontend-ssr/assets/{chevron-right-DKD7WXjz.js → chevron-right-CseGE1qd.js} +10 -6
  158. package/dist/frontend-ssr/assets/{circle-check-CPS9dKEo.js → circle-check-BRhWPZo1.js} +10 -6
  159. package/dist/frontend-ssr/assets/{client-DZMkDkDn.js → client-rfwQYYHY.js} +4 -2
  160. package/dist/frontend-ssr/assets/{clock-CzsE58TH.js → clock-DpP_Y7WP.js} +10 -6
  161. package/dist/frontend-ssr/assets/{confirm-dialog-wYC07DPx.js → confirm-dialog-DeOR0SnQ.js} +44 -31
  162. package/dist/frontend-ssr/assets/{copy-DkkCPkBL.js → copy-DRMKiRZ0.js} +10 -6
  163. package/dist/frontend-ssr/assets/{db-BhwJPEkn.js → db-CUkQe9AU.js} +1 -1
  164. package/dist/frontend-ssr/assets/{dialog-ClcuF7nD.js → dialog--tDgDGw9.js} +12 -15
  165. package/dist/frontend-ssr/assets/{dndzone-DMvTO_Jz.js → dndzone-WtNaDxoQ.js} +309 -77
  166. package/dist/frontend-ssr/assets/doc_title_label-Ev_ltlh3.js +22 -0
  167. package/dist/frontend-ssr/assets/doc_title_placeholder-DSHpUb7w.js +22 -0
  168. package/dist/frontend-ssr/assets/{documents-CZ-wQohy.js → documents-CEuA1V6N.js} +1 -1
  169. package/dist/frontend-ssr/assets/{dropdown-menu-BKMGVNLL.js → dropdown-menu-CdEpn_LT.js} +74 -75
  170. package/dist/frontend-ssr/assets/editor_markdown_placeholder-BpezdkOr.js +42 -0
  171. package/dist/frontend-ssr/assets/editor_toolbar_undo-CKJAOqv2.js +562 -0
  172. package/dist/frontend-ssr/assets/error_generic-DTK0kwxT.js +42 -0
  173. package/dist/frontend-ssr/assets/{folder-DYIE-XPP.js → folder-DszunwKc.js} +10 -6
  174. package/dist/frontend-ssr/assets/{folders-BX30gHv6.js → folders-BOXeb9hz.js} +3 -2
  175. package/dist/frontend-ssr/assets/folders_rename-DvciOb6K.js +122 -0
  176. package/dist/frontend-ssr/assets/{identity-DcMMBKWg.js → identity-veXobEfE.js} +2 -2
  177. package/dist/frontend-ssr/assets/{input-DcDR8L8M.js → input-BlAj7LzC.js} +2 -2
  178. package/dist/frontend-ssr/assets/{label-Cz0_svJx.js → label-BRToaMg9.js} +2 -2
  179. package/dist/frontend-ssr/assets/{loader-circle-CIEWGyfP.js → loader-circle-BpRVrMZg.js} +10 -6
  180. package/dist/frontend-ssr/assets/{floating-layer-anchor-BoiiIEiK.js → popper-layer-force-mount-Djnq7l7a.js} +3684 -3674
  181. package/dist/frontend-ssr/assets/{rotate-ccw-dJSqPyTd.js → rotate-ccw-1GOD_yt_.js} +10 -6
  182. package/dist/frontend-ssr/assets/runtime-O78RzRqx.js +559 -0
  183. package/dist/frontend-ssr/assets/scroll_to_top_aria-BN4ZfOnM.js +22 -0
  184. package/dist/frontend-ssr/assets/search_title-CKUsQDT0.js +22 -0
  185. package/dist/frontend-ssr/assets/search_toggle_filters-hS9rvQhC.js +282 -0
  186. package/dist/frontend-ssr/assets/{select-value-CaDktvDW.js → select-value-BCWSsoTd.js} +204 -218
  187. package/dist/frontend-ssr/assets/{settings-Mp8EuFSn.js → settings-DwAcLGM1.js} +2 -2
  188. package/dist/frontend-ssr/assets/share_copied-BxU9rjXG.js +602 -0
  189. package/dist/frontend-ssr/assets/share_toggle_password-C6OmroqR.js +202 -0
  190. package/dist/frontend-ssr/assets/sidebar_uncategorized-Dx-LTd5w.js +102 -0
  191. package/dist/frontend-ssr/assets/{tag-BmiVU_Ej.js → tag-DFh6nF9R.js} +19 -11
  192. package/dist/frontend-ssr/assets/{tag-store.svelte-BM1lUI_P.js → tag-store.svelte-QRysvGKe.js} +1 -1
  193. package/dist/frontend-ssr/assets/{tags-BQsI_6OW.js → tags-BBCoFYro.js} +1 -1
  194. package/dist/frontend-ssr/assets/tags_load_error-CPrc6Gzs.js +362 -0
  195. package/dist/frontend-ssr/assets/tags_new-VmMr9v2V.js +62 -0
  196. package/dist/frontend-ssr/assets/{textarea-BGrjPOgU.js → textarea-BuszTo9i.js} +2 -2
  197. package/dist/frontend-ssr/assets/{theme.svelte-CN3BUhJG.js → theme.svelte-shZrSxz8.js} +1 -1
  198. package/dist/frontend-ssr/assets/theme_system-BucaNntV.js +362 -0
  199. package/dist/frontend-ssr/assets/{utils-Cg_R05dR.js → utils-BK35BJKQ.js} +1 -1
  200. package/dist/frontend-ssr/assets/version_create_snapshot-COHzwjle.js +22 -0
  201. package/dist/frontend-ssr/assets/version_restored_from-CertjFDl.js +242 -0
  202. package/dist/frontend-ssr/assets/version_snapshot_label_placeholder-Cy_rMCij.js +222 -0
  203. package/dist/frontend-ssr/assets/weekday_we-DrI3U230.js +422 -0
  204. package/dist/frontend-ssr/components/category-dialog.js +1 -1
  205. package/dist/frontend-ssr/components/create-snapshot-dialog.js +1 -1
  206. package/dist/frontend-ssr/components/delete-dialog.js +1 -1
  207. package/dist/frontend-ssr/components/editor/compact-editor.js +1 -1
  208. package/dist/frontend-ssr/components/editor/document-editor.js +1 -1
  209. package/dist/frontend-ssr/components/editor/document-title.js +2 -1
  210. package/dist/frontend-ssr/components/editor/markdown-toggle.js +2 -2
  211. package/dist/frontend-ssr/components/folder-node.js +1 -1
  212. package/dist/frontend-ssr/components/folder-tree-selector.js +1 -1
  213. package/dist/frontend-ssr/components/save-as-dialog.js +12 -14
  214. package/dist/frontend-ssr/components/settings.js +1 -1
  215. package/dist/frontend-ssr/components/share-dialog.js +1 -1
  216. package/dist/frontend-ssr/components/sidebar.js +1 -1
  217. package/dist/frontend-ssr/components/tag-create-dialog.js +1 -1
  218. package/dist/frontend-ssr/components/version-history.js +47 -51
  219. package/dist/frontend-ssr/dashboard.js +243 -232
  220. package/dist/frontend-ssr/i18n.js +6698 -1
  221. package/dist/frontend-ssr/offline/identity.js +1 -1
  222. package/dist/frontend-ssr/search.js +28 -31
  223. package/dist/frontend-ssr/shared-document.js +1 -2
  224. package/dist/frontend-ssr/theme.js +1 -1
  225. package/dist/frontend-ssr/utils/dndzone.js +1 -1
  226. package/dist/lifecycle-runtime.js +4437 -2019
  227. package/dist/mcp-cli.js +1 -1
  228. package/dist/mcp-server.js +1 -1
  229. package/package.json +7 -7
  230. package/packages/cli/src/index.ts +1 -1
  231. package/packages/db/src/schema.ts +2 -0
  232. package/server.json +2 -2
  233. package/dist/frontend/CategoryDialog-bQKMpVFD.js +0 -631
  234. package/dist/frontend/ConfirmDialog-DF7kgkyq.js +0 -139
  235. package/dist/frontend/FolderNode-Cf443LBa.js +0 -298
  236. package/dist/frontend/HiAiEditor-CMZ-eL8s.js +0 -2992
  237. package/dist/frontend/ShareDialog-Bwz2y3Le.js +0 -281
  238. package/dist/frontend/Sidebar-C_t5RrOJ.js +0 -2101
  239. package/dist/frontend/dist-DQa_OHOa.js +0 -268
  240. package/dist/frontend/dndzone-BzsOINtP.js +0 -1199
  241. package/dist/frontend/messages-DTRe4U2V.js +0 -1093
  242. package/dist/frontend/utils-CMQRlxbx.js +0 -7
  243. package/dist/frontend-ssr/assets/ConfirmDialog-DrH653ua.js +0 -136
  244. package/dist/frontend-ssr/assets/attachments-BdkOp8ha.js +0 -93
  245. package/dist/frontend-ssr/assets/messages-B1TjVIH8.js +0 -11147
  246. package/dist/frontend-ssr/assets/share-qTqvd6Lu.js +0 -30
@@ -1,1199 +0,0 @@
1
- //#region ../node_modules/.bun/svelte-dnd-action@0.9.70+ff5f301bb2db9a0d/node_modules/svelte-dnd-action/dist/index.mjs
2
- function e(e, t) {
3
- var n = Object.keys(e);
4
- if (Object.getOwnPropertySymbols) {
5
- var r = Object.getOwnPropertySymbols(e);
6
- t && (r = r.filter(function(t) {
7
- return Object.getOwnPropertyDescriptor(e, t).enumerable;
8
- })), n.push.apply(n, r);
9
- }
10
- return n;
11
- }
12
- function t(t) {
13
- for (var n = 1; n < arguments.length; n++) {
14
- var i = arguments[n] == null ? {} : arguments[n];
15
- n % 2 ? e(Object(i), !0).forEach(function(e) {
16
- r(t, e, i[e]);
17
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(i)) : e(Object(i)).forEach(function(e) {
18
- Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(i, e));
19
- });
20
- }
21
- return t;
22
- }
23
- function n(e) {
24
- "@babel/helpers - typeof";
25
- return n = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
26
- return typeof e;
27
- } : function(e) {
28
- return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
29
- }, n(e);
30
- }
31
- function r(e, t, n) {
32
- return t in e ? Object.defineProperty(e, t, {
33
- value: n,
34
- enumerable: !0,
35
- configurable: !0,
36
- writable: !0
37
- }) : e[t] = n, e;
38
- }
39
- function i(e, t) {
40
- if (e == null) return {};
41
- var n = {}, r = Object.keys(e), i, a;
42
- for (a = 0; a < r.length; a++) i = r[a], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
43
- return n;
44
- }
45
- function a(e, t) {
46
- if (e == null) return {};
47
- var n = i(e, t), r, a;
48
- if (Object.getOwnPropertySymbols) {
49
- var o = Object.getOwnPropertySymbols(e);
50
- for (a = 0; a < o.length; a++) r = o[a], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
51
- }
52
- return n;
53
- }
54
- function o(e, t) {
55
- return l(e) || d(e, t) || f(e, t) || h();
56
- }
57
- function s(e) {
58
- return c(e) || u(e) || f(e) || m();
59
- }
60
- function c(e) {
61
- if (Array.isArray(e)) return p(e);
62
- }
63
- function l(e) {
64
- if (Array.isArray(e)) return e;
65
- }
66
- function u(e) {
67
- if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
68
- }
69
- function d(e, t) {
70
- var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
71
- if (n != null) {
72
- var r = [], i = !0, a = !1, o, s;
73
- try {
74
- for (n = n.call(e); !(i = (o = n.next()).done) && (r.push(o.value), !(t && r.length === t)); i = !0);
75
- } catch (e) {
76
- a = !0, s = e;
77
- } finally {
78
- try {
79
- !i && n.return != null && n.return();
80
- } finally {
81
- if (a) throw s;
82
- }
83
- }
84
- return r;
85
- }
86
- }
87
- function f(e, t) {
88
- if (e) {
89
- if (typeof e == "string") return p(e, t);
90
- var n = Object.prototype.toString.call(e).slice(8, -1);
91
- if (n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set") return Array.from(e);
92
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return p(e, t);
93
- }
94
- }
95
- function p(e, t) {
96
- (t == null || t > e.length) && (t = e.length);
97
- for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
98
- return r;
99
- }
100
- function m() {
101
- throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
102
- }
103
- function h() {
104
- throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
105
- }
106
- function g(e, t) {
107
- var n = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
108
- if (!n) {
109
- if (Array.isArray(e) || (n = f(e)) || t && e && typeof e.length == "number") {
110
- n && (e = n);
111
- var r = 0, i = function() {};
112
- return {
113
- s: i,
114
- n: function() {
115
- return r >= e.length ? { done: !0 } : {
116
- done: !1,
117
- value: e[r++]
118
- };
119
- },
120
- e: function(e) {
121
- throw e;
122
- },
123
- f: i
124
- };
125
- }
126
- throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
127
- }
128
- var a = !0, o = !1, s;
129
- return {
130
- s: function() {
131
- n = n.call(e);
132
- },
133
- n: function() {
134
- var e = n.next();
135
- return a = e.done, e;
136
- },
137
- e: function(e) {
138
- o = !0, s = e;
139
- },
140
- f: function() {
141
- try {
142
- !a && n.return != null && n.return();
143
- } finally {
144
- if (o) throw s;
145
- }
146
- }
147
- };
148
- }
149
- function _(e, t, n) {
150
- e.dispatchEvent(new CustomEvent("finalize", { detail: {
151
- items: t,
152
- info: n
153
- } }));
154
- }
155
- function v(e, t, n) {
156
- e.dispatchEvent(new CustomEvent("consider", { detail: {
157
- items: t,
158
- info: n
159
- } }));
160
- }
161
- var y = "draggedEntered", b = "draggedLeft", x = "draggedOverIndex", S = "draggedLeftDocument", C = {
162
- LEFT_FOR_ANOTHER: "leftForAnother",
163
- OUTSIDE_OF_ANY: "outsideOfAny"
164
- };
165
- function ee(e, t, n) {
166
- e.dispatchEvent(new CustomEvent(y, { detail: {
167
- indexObj: t,
168
- draggedEl: n
169
- } }));
170
- }
171
- function w(e, t, n) {
172
- e.dispatchEvent(new CustomEvent(b, { detail: {
173
- draggedEl: t,
174
- type: C.LEFT_FOR_ANOTHER,
175
- theOtherDz: n
176
- } }));
177
- }
178
- function te(e, t) {
179
- e.dispatchEvent(new CustomEvent(b, { detail: {
180
- draggedEl: t,
181
- type: C.OUTSIDE_OF_ANY
182
- } }));
183
- }
184
- function ne(e, t, n) {
185
- e.dispatchEvent(new CustomEvent(x, { detail: {
186
- indexObj: t,
187
- draggedEl: n
188
- } }));
189
- }
190
- function re(e) {
191
- window.dispatchEvent(new CustomEvent(S, { detail: { draggedEl: e } }));
192
- }
193
- var T = {
194
- DRAG_STARTED: "dragStarted",
195
- DRAGGED_ENTERED: y,
196
- DRAGGED_ENTERED_ANOTHER: "dragEnteredAnother",
197
- DRAGGED_OVER_INDEX: x,
198
- DRAGGED_LEFT: b,
199
- DRAGGED_LEFT_ALL: "draggedLeftAll",
200
- DROPPED_INTO_ZONE: "droppedIntoZone",
201
- DROPPED_INTO_ANOTHER: "droppedIntoAnother",
202
- DROPPED_OUTSIDE_OF_ANY: "droppedOutsideOfAny",
203
- DRAG_STOPPED: "dragStopped"
204
- }, E = {
205
- POINTER: "pointer",
206
- KEYBOARD: "keyboard"
207
- }, D = "isDndShadowItem", O = "data-is-dnd-shadow-item-internal", ie = "data-is-dnd-shadow-item-hint", ae = "id:dnd-shadow-placeholder-0000", oe = "dnd-action-dragged-el", k = "id", A = 0;
208
- function se() {
209
- A++;
210
- }
211
- function ce() {
212
- if (A === 0) throw Error("Bug! trying to decrement when there are no dropzones");
213
- A--;
214
- }
215
- var le = typeof window > "u";
216
- function ue(e) {
217
- var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, n, r = t ? ye(e) : e.getBoundingClientRect(), i = getComputedStyle(e), a = i.transform;
218
- if (a) {
219
- var o, s, c, l;
220
- if (a.startsWith("matrix3d(")) n = a.slice(9, -1).split(/, /), o = +n[0], s = +n[5], c = +n[12], l = +n[13];
221
- else if (a.startsWith("matrix(")) n = a.slice(7, -1).split(/, /), o = +n[0], s = +n[3], c = +n[4], l = +n[5];
222
- else return r;
223
- var u = i.transformOrigin, d = r.x - c - (1 - o) * parseFloat(u), f = r.y - l - (1 - s) * parseFloat(u.slice(u.indexOf(" ") + 1)), p = o ? r.width / o : e.offsetWidth, m = s ? r.height / s : e.offsetHeight;
224
- return {
225
- x: d,
226
- y: f,
227
- width: p,
228
- height: m,
229
- top: f,
230
- right: d + p,
231
- bottom: f + m,
232
- left: d
233
- };
234
- } else return r;
235
- }
236
- function de(e) {
237
- var t = ue(e);
238
- return {
239
- top: t.top + window.scrollY,
240
- bottom: t.bottom + window.scrollY,
241
- left: t.left + window.scrollX,
242
- right: t.right + window.scrollX
243
- };
244
- }
245
- function fe(e) {
246
- var t = e.getBoundingClientRect();
247
- return {
248
- top: t.top + window.scrollY,
249
- bottom: t.bottom + window.scrollY,
250
- left: t.left + window.scrollX,
251
- right: t.right + window.scrollX
252
- };
253
- }
254
- function pe(e) {
255
- return {
256
- x: (e.left + e.right) / 2,
257
- y: (e.top + e.bottom) / 2
258
- };
259
- }
260
- function me(e, t) {
261
- return Math.sqrt((e.x - t.x) ** 2 + (e.y - t.y) ** 2);
262
- }
263
- function he(e, t) {
264
- return e.y <= t.bottom && e.y >= t.top && e.x >= t.left && e.x <= t.right;
265
- }
266
- function ge(e) {
267
- return pe(fe(e));
268
- }
269
- function _e(e, t) {
270
- return me(e, ge(t));
271
- }
272
- function ve(e) {
273
- var t = fe(e);
274
- return t.right < 0 || t.left > document.documentElement.scrollWidth || t.bottom < 0 || t.top > document.documentElement.scrollHeight;
275
- }
276
- function ye(e) {
277
- for (var t = e.getBoundingClientRect(), n = {
278
- top: t.top,
279
- bottom: t.bottom,
280
- left: t.left,
281
- right: t.right
282
- }, r = !1, i = !1, a = e.parentElement; a && a !== document.body;) {
283
- var o = window.getComputedStyle(a), s = o.overflowY, c = o.overflowX, l = s === "scroll" || s === "auto", u = c === "scroll" || c === "auto";
284
- if (l || u) {
285
- var d = a.getBoundingClientRect();
286
- if (l) {
287
- var f = Math.max(n.top, d.top), p = Math.min(n.bottom, d.bottom);
288
- (f !== n.top || p !== n.bottom) && (r = !0), n.top = f, n.bottom = p;
289
- }
290
- if (u) {
291
- var m = Math.max(n.left, d.left), h = Math.min(n.right, d.right);
292
- (m !== n.left || h !== n.right) && (i = !0), n.left = m, n.right = h;
293
- }
294
- }
295
- a = a.parentElement;
296
- }
297
- return r || i ? {
298
- top: n.top,
299
- bottom: n.bottom,
300
- left: n.left,
301
- right: n.right,
302
- width: Math.max(0, n.right - n.left),
303
- height: Math.max(0, n.bottom - n.top)
304
- } : {
305
- top: t.top,
306
- bottom: t.bottom,
307
- left: t.left,
308
- right: t.right,
309
- width: Math.max(0, t.right - t.left),
310
- height: Math.max(0, t.bottom - t.top)
311
- };
312
- }
313
- var j;
314
- function be() {
315
- j = /* @__PURE__ */ new Map();
316
- }
317
- be();
318
- function xe(e) {
319
- var t = Array.from(e.children).findIndex(function(e) {
320
- return e.getAttribute(O);
321
- });
322
- if (t >= 0) return j.has(e) || j.set(e, /* @__PURE__ */ new Map()), j.get(e).set(t, de(e.children[t])), t;
323
- }
324
- function Se(e, t) {
325
- if (!he(e, de(t))) return null;
326
- var n = t.children;
327
- if (n.length === 0) return {
328
- index: 0,
329
- isProximityBased: !0
330
- };
331
- for (var r = xe(t), i = 0; i < n.length; i++) if (he(e, de(n[i]))) {
332
- var a = j.has(t) && j.get(t).get(i);
333
- return a && !he(e, a) ? {
334
- index: r,
335
- isProximityBased: !1
336
- } : {
337
- index: i,
338
- isProximityBased: !1
339
- };
340
- }
341
- for (var o = Number.MAX_VALUE, s = void 0, c = 0; c < n.length; c++) {
342
- var l = _e(e, n[c]);
343
- l < o && (o = l, s = c);
344
- }
345
- if (n.length > 0) {
346
- var u = n.length, d = n[u - 1].cloneNode(!1);
347
- d.style.visibility = "hidden", d.style.pointerEvents = "none", t.appendChild(d), _e(e, d) < o && (s = u), t.removeChild(d);
348
- }
349
- return {
350
- index: s,
351
- isProximityBased: !0
352
- };
353
- }
354
- function Ce(e) {
355
- return JSON.stringify(e, null, 2);
356
- }
357
- function we(e) {
358
- if (!e) throw Error("cannot get depth of a falsy node");
359
- return Te(e, 0);
360
- }
361
- function Te(e) {
362
- var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
363
- return e.parentElement ? Te(e.parentElement, t + 1) : t - 1;
364
- }
365
- function Ee(e, t) {
366
- if (Object.keys(e).length !== Object.keys(t).length) return !1;
367
- for (var n in e) if (!{}.hasOwnProperty.call(t, n) || t[n] !== e[n]) return !1;
368
- return !0;
369
- }
370
- function De(e, t) {
371
- if (e.length !== t.length) return !1;
372
- for (var n = 0; n < e.length; n++) if (e[n] !== t[n]) return !1;
373
- return !0;
374
- }
375
- var Oe = 200, ke = 10, Ae;
376
- function je(e, t) {
377
- var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Oe, r = arguments.length > 3 ? arguments[3] : void 0, i = arguments.length > 4 ? arguments[4] : void 0, a, o, s = !1, c, l = Array.from(t).sort(function(e, t) {
378
- return we(t) - we(e);
379
- });
380
- function u() {
381
- var t = i(), d = r.multiScrollIfNeeded();
382
- if (!d && c && Math.abs(c.x - t.x) < ke && Math.abs(c.y - t.y) < ke) {
383
- Ae = window.setTimeout(u, n);
384
- return;
385
- }
386
- if (ve(e)) {
387
- re(e);
388
- return;
389
- }
390
- c = t;
391
- var f = !1, p = g(l), m;
392
- try {
393
- for (p.s(); !(m = p.n()).done;) {
394
- var h = m.value;
395
- d && be();
396
- var _ = Se(t, h);
397
- if (_ !== null) {
398
- var v = _.index;
399
- f = !0, h === a ? v !== o && (ne(h, _, e), o = v) : (a && w(a, e, h), ee(h, _, e), a = h);
400
- break;
401
- }
402
- }
403
- } catch (e) {
404
- p.e(e);
405
- } finally {
406
- p.f();
407
- }
408
- !f && s && a ? (te(a, e), a = void 0, o = void 0, s = !1) : s = !0, Ae = window.setTimeout(u, n);
409
- }
410
- u();
411
- }
412
- function Me() {
413
- clearTimeout(Ae), be();
414
- }
415
- var Ne = 30;
416
- function Pe() {
417
- var e;
418
- function t() {
419
- e = {
420
- directionObj: void 0,
421
- stepPx: 0
422
- };
423
- }
424
- t();
425
- function n(t) {
426
- var r = e, i = r.directionObj, a = r.stepPx;
427
- i && (t.scrollBy(i.x * a, i.y * a), window.requestAnimationFrame(function() {
428
- return n(t);
429
- }));
430
- }
431
- function r(e) {
432
- return Ne - e;
433
- }
434
- function i(i, a) {
435
- if (!a) return !1;
436
- var o = Fe(i, a), s = !!e.directionObj;
437
- if (o === null) return s && t(), !1;
438
- var c = !1, l = !1;
439
- return a.scrollHeight > a.clientHeight && (o.bottom < Ne ? (c = !0, e.directionObj = {
440
- x: 0,
441
- y: 1
442
- }, e.stepPx = r(o.bottom)) : o.top < Ne && (c = !0, e.directionObj = {
443
- x: 0,
444
- y: -1
445
- }, e.stepPx = r(o.top)), !s && c) || a.scrollWidth > a.clientWidth && (o.right < Ne ? (l = !0, e.directionObj = {
446
- x: 1,
447
- y: 0
448
- }, e.stepPx = r(o.right)) : o.left < Ne && (l = !0, e.directionObj = {
449
- x: -1,
450
- y: 0
451
- }, e.stepPx = r(o.left)), !s && l) ? (n(a), !0) : (t(), !1);
452
- }
453
- return {
454
- scrollIfNeeded: i,
455
- resetScrolling: t
456
- };
457
- }
458
- function Fe(e, t) {
459
- var n = t === document.scrollingElement ? {
460
- top: 0,
461
- bottom: window.innerHeight,
462
- left: 0,
463
- right: window.innerWidth
464
- } : t.getBoundingClientRect();
465
- return he(e, n) ? {
466
- top: e.y - n.top,
467
- bottom: n.bottom - e.y,
468
- left: e.x - n.left,
469
- right: n.right - e.x
470
- } : null;
471
- }
472
- function Ie() {
473
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], t = arguments.length > 1 ? arguments[1] : void 0, n = Re(e), r = Array.from(n).sort(function(e, t) {
474
- return we(t) - we(e);
475
- }), i = Pe(), a = i.scrollIfNeeded, o = i.resetScrolling;
476
- function s() {
477
- var e = t();
478
- if (!e || !r) return !1;
479
- for (var n = r.filter(function(t) {
480
- return he(e, t.getBoundingClientRect()) || t === document.scrollingElement;
481
- }), i = 0; i < n.length; i++) if (a(e, n[i])) return !0;
482
- return !1;
483
- }
484
- return {
485
- multiScrollIfNeeded: n.size > 0 ? s : function() {
486
- return !1;
487
- },
488
- destroy: function() {
489
- return o();
490
- }
491
- };
492
- }
493
- function Le(e) {
494
- if (!e) return [];
495
- for (var t = [], n = e; n;) window.getComputedStyle(n).overflow.split(" ").some(function(e) {
496
- return e.includes("auto") || e.includes("scroll");
497
- }) && t.push(n), n = n.parentElement;
498
- return t;
499
- }
500
- function Re(e) {
501
- var t = /* @__PURE__ */ new Set(), n = g(e), r;
502
- try {
503
- for (n.s(); !(r = n.n()).done;) {
504
- var i = r.value;
505
- Le(i).forEach(function(e) {
506
- return t.add(e);
507
- });
508
- }
509
- } catch (e) {
510
- n.e(e);
511
- } finally {
512
- n.f();
513
- }
514
- return (document.scrollingElement.scrollHeight > document.scrollingElement.clientHeight || document.scrollingElement.scrollWidth > document.scrollingElement.clientHeight) && t.add(document.scrollingElement), t;
515
- }
516
- function ze(e) {
517
- var t = e.cloneNode(!0), n = [], r = e.tagName === "SELECT", i = r ? [e] : s(e.querySelectorAll("select")), a = g(i), o;
518
- try {
519
- for (a.s(); !(o = a.n()).done;) {
520
- var c = o.value;
521
- n.push(c.value);
522
- }
523
- } catch (e) {
524
- a.e(e);
525
- } finally {
526
- a.f();
527
- }
528
- if (i.length > 0) for (var l = r ? [t] : s(t.querySelectorAll("select")), u = 0; u < l.length; u++) {
529
- var d = l[u], f = n[u], p = d.querySelector(`option[value="${f}"`);
530
- p && p.setAttribute("selected", !0);
531
- }
532
- var m = e.tagName === "CANVAS", h = m ? [e] : s(e.querySelectorAll("canvas"));
533
- if (h.length > 0) for (var _ = m ? [t] : s(t.querySelectorAll("canvas")), v = 0; v < _.length; v++) {
534
- var y = h[v], b = _[v];
535
- b.width = y.width, b.height = y.height, y.width > 0 && y.height > 0 && b.getContext("2d").drawImage(y, 0, 0);
536
- }
537
- return t;
538
- }
539
- var Be = Object.freeze({ USE_COMPUTED_STYLE_INSTEAD_OF_BOUNDING_RECT: "USE_COMPUTED_STYLE_INSTEAD_OF_BOUNDING_RECT" }), Ve = r({}, Be.USE_COMPUTED_STYLE_INSTEAD_OF_BOUNDING_RECT, !1);
540
- function He(e) {
541
- if (!Be[e]) throw Error(`Can't get non existing feature flag ${e}! Supported flags: ${Object.keys(Be)}`);
542
- return Ve[e];
543
- }
544
- var Ue = .2;
545
- function M(e) {
546
- return `${e} ${Ue}s ease`;
547
- }
548
- function We(e, t) {
549
- var n = e.getBoundingClientRect(), r = ze(e);
550
- qe(e, r), r.id = oe, r.style.position = "fixed";
551
- var i = n.top, a = n.left;
552
- if (r.style.top = `${i}px`, r.style.left = `${a}px`, t) {
553
- var o = pe(n);
554
- i -= o.y - t.y, a -= o.x - t.x, window.setTimeout(function() {
555
- r.style.top = `${i}px`, r.style.left = `${a}px`;
556
- }, 0);
557
- }
558
- return r.style.margin = "0", r.style.boxSizing = "border-box", r.style.height = `${n.height}px`, r.style.width = `${n.width}px`, r.style.transition = `${M("top")}, ${M("left")}, ${M("background-color")}, ${M("opacity")}, ${M("color")} `, window.setTimeout(function() {
559
- return r.style.transition += `, ${M("width")}, ${M("height")}`;
560
- }, 0), r.style.zIndex = "9999", r.style.cursor = "grabbing", r;
561
- }
562
- function Ge(e) {
563
- e.style.cursor = "grab";
564
- }
565
- function Ke(e, t, n, r) {
566
- qe(t, e);
567
- var i = t.getBoundingClientRect(), a = e.getBoundingClientRect(), o = i.width - a.width, s = i.height - a.height;
568
- if (o || s) {
569
- var c = {
570
- left: (n - a.left) / a.width,
571
- top: (r - a.top) / a.height
572
- };
573
- He(Be.USE_COMPUTED_STYLE_INSTEAD_OF_BOUNDING_RECT) || (e.style.height = `${i.height}px`, e.style.width = `${i.width}px`), e.style.left = `${parseFloat(e.style.left) - c.left * o}px`, e.style.top = `${parseFloat(e.style.top) - c.top * s}px`;
574
- }
575
- }
576
- function qe(e, t) {
577
- var n = window.getComputedStyle(e);
578
- Array.from(n).filter(function(e) {
579
- return e.startsWith("background") || e.startsWith("padding") || e.startsWith("font") || e.startsWith("text") || e.startsWith("align") || e.startsWith("justify") || e.startsWith("display") || e.startsWith("flex") || e.startsWith("border") || e === "opacity" || e === "color" || e === "list-style-type" || He(Be.USE_COMPUTED_STYLE_INSTEAD_OF_BOUNDING_RECT) && (e === "width" || e === "height");
580
- }).forEach(function(e) {
581
- return t.style.setProperty(e, n.getPropertyValue(e), n.getPropertyPriority(e));
582
- });
583
- }
584
- function Je(e, t) {
585
- e.draggable = !1, e.ondragstart = function() {
586
- return !1;
587
- }, t ? (e.style.userSelect = "", e.style.WebkitUserSelect = "", e.style.cursor = "") : (e.style.userSelect = "none", e.style.WebkitUserSelect = "none", e.style.cursor = "grab");
588
- }
589
- function Ye(e) {
590
- e.style.display = "none", e.style.position = "fixed", e.style.zIndex = "-5";
591
- }
592
- function Xe(e) {
593
- e.style.visibility = "hidden", e.setAttribute(O, "true");
594
- }
595
- function Ze(e) {
596
- e.style.visibility = "", e.removeAttribute(O);
597
- }
598
- function Qe(e) {
599
- var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : function() {}, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : function() {
600
- return [];
601
- };
602
- e.forEach(function(e) {
603
- var r = t(e);
604
- Object.keys(r).forEach(function(t) {
605
- e.style[t] = r[t];
606
- }), n(e).forEach(function(t) {
607
- return e.classList.add(t);
608
- });
609
- });
610
- }
611
- function $e(e) {
612
- var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : function() {}, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : function() {
613
- return [];
614
- };
615
- e.forEach(function(e) {
616
- var r = t(e);
617
- Object.keys(r).forEach(function(t) {
618
- e.style[t] = "";
619
- }), n(e).forEach(function(t) {
620
- return e.classList.contains(t) && e.classList.remove(t);
621
- });
622
- });
623
- }
624
- function et(e) {
625
- var t = e.style.minHeight;
626
- e.style.minHeight = window.getComputedStyle(e).getPropertyValue("height");
627
- var n = e.style.minWidth;
628
- return e.style.minWidth = window.getComputedStyle(e).getPropertyValue("width"), function() {
629
- e.style.minHeight = t, e.style.minWidth = n;
630
- };
631
- }
632
- var tt = "--any--", nt = 100, rt = 20, it = 3, at = 80, ot = { outline: "rgba(255, 255, 102, 0.7) solid 2px" }, st = "data-is-dnd-original-dragged-item", N, P, F, ct, I, lt, L, R, z, B, V = !1, ut = !1, dt, ft = !1, pt = [], mt, H, ht = !1, gt = !1, U = /* @__PURE__ */ new Map(), W = /* @__PURE__ */ new Map(), _t = /* @__PURE__ */ new WeakMap();
633
- function vt(e, t) {
634
- U.has(t) || U.set(t, /* @__PURE__ */ new Set()), U.get(t).has(e) || (U.get(t).add(e), se());
635
- }
636
- function yt(e, t) {
637
- U.get(t).delete(e), ce(), U.get(t).size === 0 && U.delete(t);
638
- }
639
- function bt() {
640
- var e = U.get(ct), t = g(e), n;
641
- try {
642
- for (t.s(); !(n = t.n()).done;) {
643
- var r = n.value;
644
- r.addEventListener(y, wt), r.addEventListener(b, Tt), r.addEventListener(x, Et);
645
- }
646
- } catch (e) {
647
- t.e(e);
648
- } finally {
649
- t.f();
650
- }
651
- window.addEventListener(S, Ot);
652
- var i = Math.max.apply(Math, s(Array.from(e.keys()).map(function(e) {
653
- return W.get(e).dropAnimationDurationMs;
654
- }))), a = i === 0 ? rt : Math.max(i, nt);
655
- mt = Ie(e, function() {
656
- return B;
657
- });
658
- var o = gt ? function() {
659
- return {
660
- x: B.x + window.scrollX,
661
- y: B.y + window.scrollY
662
- };
663
- } : function() {
664
- return ge(P);
665
- };
666
- je(P, e, a * 1.07, mt, o);
667
- }
668
- function xt() {
669
- var e = g(U.get(ct)), t;
670
- try {
671
- for (e.s(); !(t = e.n()).done;) {
672
- var n = t.value;
673
- n.removeEventListener(y, wt), n.removeEventListener(b, Tt), n.removeEventListener(x, Et);
674
- }
675
- } catch (t) {
676
- e.e(t);
677
- } finally {
678
- e.f();
679
- }
680
- window.removeEventListener(S, Ot), mt &&= (mt.destroy(), void 0), Me();
681
- }
682
- function St(e) {
683
- return e.findIndex(function(e) {
684
- return !!e[D];
685
- });
686
- }
687
- function Ct(e) {
688
- var n;
689
- return t(t({}, e), {}, (n = {}, r(n, D, !0), r(n, k, ae), n));
690
- }
691
- function wt(e) {
692
- var t = W.get(e.currentTarget), n = t.items;
693
- if (!(t.dropFromOthersDisabled && e.currentTarget !== I)) {
694
- if (ft = !1, n = n.filter(function(e) {
695
- return e[k] !== L[k] && e[k] !== "id:dnd-shadow-placeholder-0000";
696
- }), I !== e.currentTarget) {
697
- var r = W.get(I).items.filter(function(e) {
698
- return !e[D];
699
- });
700
- v(I, r, {
701
- trigger: T.DRAGGED_ENTERED_ANOTHER,
702
- id: F[k],
703
- source: E.POINTER
704
- });
705
- }
706
- var i = e.detail.indexObj.index;
707
- R = e.currentTarget, n.splice(i, 0, L), v(e.currentTarget, n, {
708
- trigger: T.DRAGGED_ENTERED,
709
- id: F[k],
710
- source: E.POINTER
711
- });
712
- }
713
- }
714
- function Tt(e) {
715
- if (V) {
716
- var t = W.get(e.currentTarget), n = t.items;
717
- if (!(t.dropFromOthersDisabled && e.currentTarget !== I && e.currentTarget !== R)) {
718
- var r = s(n), i = St(r);
719
- i !== -1 && r.splice(i, 1);
720
- var a = R;
721
- R = void 0;
722
- var o = e.detail, c = o.type, l = o.theOtherDz;
723
- if (c === C.OUTSIDE_OF_ANY || c === C.LEFT_FOR_ANOTHER && l !== I && W.get(l).dropFromOthersDisabled) {
724
- ft = !0, R = I;
725
- var u = a === I ? r : s(W.get(I).items);
726
- u.splice(lt, 0, L), v(I, u, {
727
- trigger: T.DRAGGED_LEFT_ALL,
728
- id: F[k],
729
- source: E.POINTER
730
- });
731
- }
732
- v(e.currentTarget, r, {
733
- trigger: T.DRAGGED_LEFT,
734
- id: F[k],
735
- source: E.POINTER
736
- });
737
- }
738
- }
739
- }
740
- function Et(e) {
741
- var t = W.get(e.currentTarget), n = t.items;
742
- if (!(t.dropFromOthersDisabled && e.currentTarget !== I)) {
743
- var r = s(n);
744
- ft = !1;
745
- var i = e.detail.indexObj.index, a = St(r);
746
- a !== -1 && r.splice(a, 1), r.splice(i, 0, L), v(e.currentTarget, r, {
747
- trigger: T.DRAGGED_OVER_INDEX,
748
- id: F[k],
749
- source: E.POINTER
750
- });
751
- }
752
- }
753
- function Dt(e) {
754
- e.preventDefault();
755
- var t = e.touches ? e.touches[0] : e;
756
- B = {
757
- x: t.clientX,
758
- y: t.clientY
759
- }, P.style.transform = `translate3d(${B.x - z.x}px, ${B.y - z.y}px, 0)`;
760
- }
761
- function Ot() {
762
- ut = !0, window.removeEventListener("mousemove", Dt), window.removeEventListener("touchmove", Dt), window.removeEventListener("mouseup", Ot), window.removeEventListener("touchend", Ot), xt(), Ge(P), R ||= I;
763
- var e = W.get(R), t = e.items, n = e.type;
764
- $e(U.get(n), function(e) {
765
- return W.get(e).dropTargetStyle;
766
- }, function(e) {
767
- return W.get(e).dropTargetClasses;
768
- });
769
- var r = St(t);
770
- r === -1 && R === I && (r = lt), t = t.map(function(e) {
771
- return e.isDndShadowItem ? F : e;
772
- });
773
- function i() {
774
- dt(), _(R, t, {
775
- trigger: ft ? T.DROPPED_OUTSIDE_OF_ANY : T.DROPPED_INTO_ZONE,
776
- id: F[k],
777
- source: E.POINTER
778
- }), R !== I && _(I, W.get(I).items, {
779
- trigger: T.DROPPED_INTO_ANOTHER,
780
- id: F[k],
781
- source: E.POINTER
782
- });
783
- var e = Array.from(R.children).find(function(e) {
784
- return e.getAttribute(O);
785
- });
786
- e && Ze(e), jt();
787
- }
788
- W.get(R).dropAnimationDisabled ? i() : kt(r, i);
789
- }
790
- function kt(e, t) {
791
- var n = ue(e > -1 ? R.children[e] : R, !1), r = {
792
- x: n.left - parseFloat(P.style.left),
793
- y: n.top - parseFloat(P.style.top)
794
- }, i = W.get(R).dropAnimationDurationMs, a = `transform ${i}ms ease`;
795
- P.style.transition = P.style.transition ? P.style.transition + "," + a : a, P.style.transform = `translate3d(${r.x}px, ${r.y}px, 0)`, window.setTimeout(t, i);
796
- }
797
- function At(e, t) {
798
- pt.push({
799
- dz: e,
800
- destroy: t
801
- }), window.requestAnimationFrame(function() {
802
- Ye(e), document.body.appendChild(e);
803
- });
804
- }
805
- function jt() {
806
- P && P.remove && P.remove(), N && N.remove && N.remove(), P = void 0, N = void 0, F = void 0, ct = void 0, I = void 0, lt = void 0, L = void 0, R = void 0, z = void 0, B = void 0, V = !1, ut = !1, dt = void 0, ft = !1, H && clearTimeout(H), H = void 0, ht = !1, gt = !1, pt.length && (pt.forEach(function(e) {
807
- var t = e.dz, n = e.destroy;
808
- n(), t.remove();
809
- }), pt = []);
810
- }
811
- function Mt(e, n) {
812
- var r = !1, i = {
813
- items: void 0,
814
- type: void 0,
815
- flipDurationMs: 0,
816
- dragDisabled: !1,
817
- morphDisabled: !1,
818
- dropFromOthersDisabled: !1,
819
- dropTargetStyle: ot,
820
- dropTargetClasses: [],
821
- transformDraggedElement: function() {},
822
- centreDraggedOnCursor: !1,
823
- useCursorForDetection: !1,
824
- dropAnimationDisabled: !1,
825
- delayTouchStartMs: 0
826
- }, a = /* @__PURE__ */ new Map();
827
- function o() {
828
- window.addEventListener("mousemove", u, { passive: !1 }), window.addEventListener("touchmove", u, {
829
- passive: !1,
830
- capture: !1
831
- }), window.addEventListener("mouseup", l, { passive: !1 }), window.addEventListener("touchend", l, { passive: !1 });
832
- }
833
- function c() {
834
- window.removeEventListener("mousemove", u), window.removeEventListener("touchmove", u), window.removeEventListener("mouseup", l), window.removeEventListener("touchend", l), H && (clearTimeout(H), H = void 0, ht = !1);
835
- }
836
- function l(e) {
837
- if (c(), N = void 0, z = void 0, B = void 0, e.type === "touchend") {
838
- var t = new Event("click", {
839
- bubbles: !0,
840
- cancelable: !0
841
- });
842
- e.target.dispatchEvent(t);
843
- }
844
- }
845
- function u(e) {
846
- var t = !!e.touches, n = t ? e.touches[0] : e;
847
- if (t && i.delayTouchStartMs > 0 && !ht) {
848
- B = {
849
- x: n.clientX,
850
- y: n.clientY
851
- }, (Math.abs(B.x - z.x) >= it || Math.abs(B.y - z.y) >= it) && (H &&= (clearTimeout(H), void 0), l(e));
852
- return;
853
- }
854
- e.preventDefault(), B = {
855
- x: n.clientX,
856
- y: n.clientY
857
- }, (Math.abs(B.x - z.x) >= it || Math.abs(B.y - z.y) >= it) && (c(), f());
858
- }
859
- function d(e) {
860
- if (!(e.target !== e.currentTarget && (e.target.value !== void 0 || e.target.isContentEditable)) && !e.button && !V) {
861
- var n = !!e.touches, r = n && i.delayTouchStartMs > 0;
862
- r || e.preventDefault(), e.stopPropagation();
863
- var a = n ? e.touches[0] : e;
864
- z = {
865
- x: a.clientX,
866
- y: a.clientY
867
- }, B = t({}, z), N = e.currentTarget, r && (ht = !1, H = window.setTimeout(function() {
868
- N && (ht = !0, c(), f());
869
- }, i.delayTouchStartMs)), o();
870
- }
871
- }
872
- function f() {
873
- V = !0;
874
- var e = a.get(N);
875
- lt = e, I = N.parentElement;
876
- var t = I.closest("dialog") || I.closest("[popover]") || I.getRootNode(), n = t.body || t, r = i.items, o = i.type, c = i.centreDraggedOnCursor, l = i.useCursorForDetection, u = s(r);
877
- F = u[e], ct = o, L = Ct(F), gt = l, P = We(N, c && B), n.appendChild(P);
878
- function d() {
879
- P && (N.parentElement ? window.requestAnimationFrame(d) : (N.setAttribute(st, !0), n.appendChild(N), bt(), Ye(N), L[k] = F[k], P.focus()));
880
- }
881
- window.requestAnimationFrame(d), Qe(Array.from(U.get(i.type)).filter(function(e) {
882
- return e === I || !W.get(e).dropFromOthersDisabled;
883
- }), function(e) {
884
- return W.get(e).dropTargetStyle;
885
- }, function(e) {
886
- return W.get(e).dropTargetClasses;
887
- }), u.splice(e, 1, L), dt = et(I), v(I, u, {
888
- trigger: T.DRAG_STARTED,
889
- id: F[k],
890
- source: E.POINTER
891
- }), window.addEventListener("mousemove", Dt, { passive: !1 }), window.addEventListener("touchmove", Dt, {
892
- passive: !1,
893
- capture: !1
894
- }), window.addEventListener("mouseup", Ot, { passive: !1 }), window.addEventListener("touchend", Ot, { passive: !1 });
895
- }
896
- function p(t) {
897
- var n = t.items, o = n === void 0 ? void 0 : n, c = t.flipDurationMs, l = c === void 0 ? 0 : c, u = t.type, f = u === void 0 ? tt : u, p = t.dragDisabled, m = p === void 0 ? !1 : p, h = t.morphDisabled, g = h === void 0 ? !1 : h, _ = t.dropFromOthersDisabled, v = _ === void 0 ? !1 : _, y = t.dropTargetStyle, b = y === void 0 ? ot : y, x = t.dropTargetClasses, S = x === void 0 ? [] : x, C = t.transformDraggedElement, ee = C === void 0 ? function() {} : C, w = t.centreDraggedOnCursor, te = w === void 0 ? !1 : w, ne = t.useCursorForDetection, re = ne === void 0 ? !1 : ne, T = t.dropAnimationDisabled, E = T === void 0 ? !1 : T, D = t.delayTouchStart, O = D === void 0 ? !1 : D;
898
- i.dropAnimationDurationMs = l;
899
- var ie = 0;
900
- O === !0 ? ie = at : typeof O == "number" && isFinite(O) && O >= 0 && (ie = O), i.delayTouchStartMs = ie, i.type && f !== i.type && yt(e, i.type), i.type = f, i.items = s(o), i.dragDisabled = m, i.morphDisabled = g, i.transformDraggedElement = ee, i.centreDraggedOnCursor = te, i.useCursorForDetection = re, i.dropAnimationDisabled = E, r && V && !ut && (!Ee(b, i.dropTargetStyle) || !De(S, i.dropTargetClasses)) && ($e([e], function() {
901
- return i.dropTargetStyle;
902
- }, function() {
903
- return S;
904
- }), Qe([e], function() {
905
- return b;
906
- }, function() {
907
- return S;
908
- })), i.dropTargetStyle = b, i.dropTargetClasses = s(S);
909
- function ae(e, t) {
910
- return W.get(e) ? W.get(e)[t] : i[t];
911
- }
912
- r && V && i.dropFromOthersDisabled !== v && (v ? $e([e], function(e) {
913
- return ae(e, "dropTargetStyle");
914
- }, function(e) {
915
- return ae(e, "dropTargetClasses");
916
- }) : Qe([e], function(e) {
917
- return ae(e, "dropTargetStyle");
918
- }, function(e) {
919
- return ae(e, "dropTargetClasses");
920
- })), i.dropFromOthersDisabled = v, W.set(e, i), vt(e, f);
921
- for (var oe = V ? St(i.items) : -1, k = 0; k < e.children.length; k++) {
922
- var A = e.children[k];
923
- if (Je(A, m), k === oe) {
924
- g || Ke(P, A, B.x, B.y), i.transformDraggedElement(P, F, k), Xe(A);
925
- continue;
926
- }
927
- A.removeEventListener("mousedown", _t.get(A)), A.removeEventListener("touchstart", _t.get(A)), m || (A.addEventListener("mousedown", d), A.addEventListener("touchstart", d), _t.set(A, d)), a.set(A, k), r ||= !0;
928
- }
929
- }
930
- return p(n), {
931
- update: function(e) {
932
- p(e);
933
- },
934
- destroy: function() {
935
- function t() {
936
- yt(e, W.get(e).type), W.delete(e);
937
- }
938
- V && !e.closest(`[${st}]`) ? At(e, t) : t();
939
- }
940
- };
941
- }
942
- var Nt, Pt = {
943
- DND_ZONE_ACTIVE: "dnd-zone-active",
944
- DND_ZONE_DRAG_DISABLED: "dnd-zone-drag-disabled"
945
- }, Ft = (Nt = {}, r(Nt, Pt.DND_ZONE_ACTIVE, "Tab to one the items and press space-bar or enter to start dragging it"), r(Nt, Pt.DND_ZONE_DRAG_DISABLED, "This is a disabled drag and drop list"), Nt), It = "dnd-action-aria-alert", G;
946
- function Lt() {
947
- G || (G = document.createElement("div"), (function() {
948
- G.id = It, G.style.position = "fixed", G.style.bottom = "0", G.style.left = "0", G.style.zIndex = "-5", G.style.opacity = "0", G.style.height = "0", G.style.width = "0", G.setAttribute("role", "alert");
949
- })(), document.body.prepend(G), Object.entries(Ft).forEach(function(e) {
950
- var t = o(e, 2), n = t[0], r = t[1];
951
- return document.body.prepend(Bt(n, r));
952
- }));
953
- }
954
- function Rt() {
955
- return le ? null : (document.readyState === "complete" ? Lt() : window.addEventListener("DOMContentLoaded", Lt), t({}, Pt));
956
- }
957
- function zt() {
958
- le || !G || (Object.keys(Ft).forEach(function(e) {
959
- return document.getElementById(e)?.remove();
960
- }), G.remove(), G = void 0);
961
- }
962
- function Bt(e, t) {
963
- var n = document.createElement("div");
964
- return n.id = e, n.innerHTML = `<p>${t}</p>`, n.style.display = "none", n.style.position = "fixed", n.style.zIndex = "-5", n;
965
- }
966
- function Vt(e) {
967
- if (!le) {
968
- G || Lt(), G.innerHTML = "";
969
- var t = document.createTextNode(e);
970
- G.appendChild(t), G.style.display = "none", G.style.display = "inline";
971
- }
972
- }
973
- var Ht = "--any--", Ut = { outline: "rgba(255, 255, 102, 0.7) solid 2px" }, K = !1, Wt, q, J = "", Y, X, Z = "", Gt = /* @__PURE__ */ new WeakSet(), Kt = /* @__PURE__ */ new WeakMap(), qt = /* @__PURE__ */ new WeakMap(), Jt = /* @__PURE__ */ new Map(), Q = /* @__PURE__ */ new Map(), $ = /* @__PURE__ */ new Map(), Yt;
974
- function Xt(e, t) {
975
- $.size === 0 && (Yt = Rt(), window.addEventListener("keydown", Qt), window.addEventListener("click", $t)), $.has(t) || $.set(t, /* @__PURE__ */ new Set()), $.get(t).has(e) || ($.get(t).add(e), se());
976
- }
977
- function Zt(e, t) {
978
- q === e && nn(), $.get(t).delete(e), ce(), $.get(t).size === 0 && $.delete(t), $.size === 0 && (window.removeEventListener("keydown", Qt), window.removeEventListener("click", $t), Yt = void 0, zt());
979
- }
980
- function Qt(e) {
981
- if (K) switch (e.key) {
982
- case "Escape":
983
- nn();
984
- break;
985
- }
986
- }
987
- function $t() {
988
- K && (Gt.has(document.activeElement) || nn());
989
- }
990
- function en(e) {
991
- if (K) {
992
- var t = e.currentTarget;
993
- if (t !== q) {
994
- J = t.getAttribute("aria-label") || "";
995
- var n = Q.get(q).items, r = n.find(function(e) {
996
- return e[k] === X;
997
- }), i = n.indexOf(r), a = n.splice(i, 1)[0], o = Q.get(t), s = o.items, c = o.autoAriaDisabled;
998
- t.getBoundingClientRect().top < q.getBoundingClientRect().top || t.getBoundingClientRect().left < q.getBoundingClientRect().left ? (s.push(a), c || Vt(`Moved item ${Z} to the end of the list ${J}`)) : (s.unshift(a), c || Vt(`Moved item ${Z} to the beginning of the list ${J}`)), _(q, n, {
999
- trigger: T.DROPPED_INTO_ANOTHER,
1000
- id: X,
1001
- source: E.KEYBOARD
1002
- }), _(t, s, {
1003
- trigger: T.DROPPED_INTO_ZONE,
1004
- id: X,
1005
- source: E.KEYBOARD
1006
- }), q = t;
1007
- }
1008
- }
1009
- }
1010
- function tn() {
1011
- Jt.forEach(function(e, t) {
1012
- var n = e.update;
1013
- return n(Q.get(t));
1014
- });
1015
- }
1016
- function nn() {
1017
- var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0;
1018
- Q.get(q).autoAriaDisabled || Vt(`Stopped dragging item ${Z}`), Gt.has(document.activeElement) && document.activeElement.blur(), e && v(q, Q.get(q).items, {
1019
- trigger: T.DRAG_STOPPED,
1020
- id: X,
1021
- source: E.KEYBOARD
1022
- }), $e($.get(Wt), function(e) {
1023
- return Q.get(e).dropTargetStyle;
1024
- }, function(e) {
1025
- return Q.get(e).dropTargetClasses;
1026
- }), Y = null, X = null, Z = "", Wt = null, q = null, J = "", K = !1, tn();
1027
- }
1028
- function rn(e, t) {
1029
- var n = {
1030
- items: void 0,
1031
- type: void 0,
1032
- dragDisabled: !1,
1033
- zoneTabIndex: 0,
1034
- zoneItemTabIndex: 0,
1035
- dropFromOthersDisabled: !1,
1036
- dropTargetStyle: Ut,
1037
- dropTargetClasses: [],
1038
- autoAriaDisabled: !1
1039
- };
1040
- function r(e, t, n) {
1041
- e.length <= 1 || e.splice(n, 1, e.splice(t, 1, e[n])[0]);
1042
- }
1043
- function i(t) {
1044
- switch (t.key) {
1045
- case "Enter":
1046
- case " ":
1047
- if ((t.target.disabled !== void 0 || t.target.href || t.target.isContentEditable) && !Gt.has(t.target)) return;
1048
- t.preventDefault(), t.stopPropagation(), K ? nn() : a(t);
1049
- break;
1050
- case "ArrowDown":
1051
- case "ArrowRight":
1052
- if (!K) return;
1053
- t.preventDefault(), t.stopPropagation();
1054
- var i = Q.get(e).items, o = Array.from(e.children), s = o.indexOf(t.currentTarget);
1055
- s < o.length - 1 && (n.autoAriaDisabled || Vt(`Moved item ${Z} to position ${s + 2} in the list ${J}`), r(i, s, s + 1), _(e, i, {
1056
- trigger: T.DROPPED_INTO_ZONE,
1057
- id: X,
1058
- source: E.KEYBOARD
1059
- }));
1060
- break;
1061
- case "ArrowUp":
1062
- case "ArrowLeft":
1063
- if (!K) return;
1064
- t.preventDefault(), t.stopPropagation();
1065
- var c = Q.get(e).items, l = Array.from(e.children).indexOf(t.currentTarget);
1066
- l > 0 && (n.autoAriaDisabled || Vt(`Moved item ${Z} to position ${l} in the list ${J}`), r(c, l, l - 1), _(e, c, {
1067
- trigger: T.DROPPED_INTO_ZONE,
1068
- id: X,
1069
- source: E.KEYBOARD
1070
- }));
1071
- break;
1072
- }
1073
- }
1074
- function a(t) {
1075
- c(t.currentTarget), q = e, Wt = n.type, K = !0;
1076
- var r = Array.from($.get(n.type)).filter(function(e) {
1077
- return e === q || !Q.get(e).dropFromOthersDisabled;
1078
- });
1079
- if (Qe(r, function(e) {
1080
- return Q.get(e).dropTargetStyle;
1081
- }, function(e) {
1082
- return Q.get(e).dropTargetClasses;
1083
- }), !n.autoAriaDisabled) {
1084
- var i = `Started dragging item ${Z}. Use the arrow keys to move it within its list ${J}`;
1085
- r.length > 1 && (i += ", or tab to another list in order to move the item into it"), Vt(i);
1086
- }
1087
- v(e, Q.get(e).items, {
1088
- trigger: T.DRAG_STARTED,
1089
- id: X,
1090
- source: E.KEYBOARD
1091
- }), tn();
1092
- }
1093
- function o(e) {
1094
- K && e.currentTarget !== Y && (e.stopPropagation(), nn(!1), a(e));
1095
- }
1096
- function c(t) {
1097
- var r = Q.get(e).items, i = Array.from(e.children), a = i.indexOf(t);
1098
- Y = t, Y.tabIndex = n.zoneItemTabIndex, X = r[a][k], Z = i[a].getAttribute("aria-label") || "";
1099
- }
1100
- function l(t) {
1101
- var r = t.items, a = r === void 0 ? [] : r, c = t.type, l = c === void 0 ? Ht : c, u = t.dragDisabled, d = u === void 0 ? !1 : u, f = t.zoneTabIndex, p = f === void 0 ? 0 : f, m = t.zoneItemTabIndex, h = m === void 0 ? 0 : m, g = t.dropFromOthersDisabled, _ = g === void 0 ? !1 : g, v = t.dropTargetStyle, y = v === void 0 ? Ut : v, b = t.dropTargetClasses, x = b === void 0 ? [] : b, S = t.autoAriaDisabled, C = S === void 0 ? !1 : S;
1102
- n.items = s(a), n.dragDisabled = d, n.dropFromOthersDisabled = _, n.zoneTabIndex = p, n.zoneItemTabIndex = h, n.dropTargetStyle = y, n.dropTargetClasses = x, n.autoAriaDisabled = C, n.type && l !== n.type && Zt(e, n.type), n.type = l, Xt(e, l), C || (e.setAttribute("role", "list"), e.setAttribute("aria-describedby", d ? Yt.DND_ZONE_DRAG_DISABLED : Yt.DND_ZONE_ACTIVE)), Q.set(e, n), K ? e.tabIndex = e === q || Y.contains(e) || n.dropFromOthersDisabled || q && n.type !== Q.get(q).type ? -1 : 0 : e.tabIndex = n.zoneTabIndex, e.addEventListener("focus", en);
1103
- for (var ee = function(t) {
1104
- var r = e.children[t];
1105
- Gt.add(r), r.tabIndex = K ? -1 : n.zoneItemTabIndex, C || r.setAttribute("role", "listitem"), r.removeEventListener("keydown", Kt.get(r)), r.removeEventListener("click", qt.get(r)), d || (r.addEventListener("keydown", i), Kt.set(r, i), r.addEventListener("click", o), qt.set(r, o)), K && n.items[t][k] === X && (Y = r, Y.tabIndex = n.zoneItemTabIndex, r.focus());
1106
- }, w = 0; w < e.children.length; w++) ee(w);
1107
- }
1108
- l(t);
1109
- var u = {
1110
- update: function(e) {
1111
- l(e);
1112
- },
1113
- destroy: function() {
1114
- Zt(e, n.type), Q.delete(e), Jt.delete(e);
1115
- }
1116
- };
1117
- return Jt.set(e, u), u;
1118
- }
1119
- var an = [
1120
- "items",
1121
- "flipDurationMs",
1122
- "type",
1123
- "dragDisabled",
1124
- "morphDisabled",
1125
- "dropFromOthersDisabled",
1126
- "zoneTabIndex",
1127
- "zoneItemTabIndex",
1128
- "dropTargetStyle",
1129
- "dropTargetClasses",
1130
- "transformDraggedElement",
1131
- "autoAriaDisabled",
1132
- "centreDraggedOnCursor",
1133
- "useCursorForDetection",
1134
- "delayTouchStart",
1135
- "dropAnimationDisabled"
1136
- ];
1137
- function on(e, t) {
1138
- if (sn(e)) return {
1139
- update: function() {},
1140
- destroy: function() {}
1141
- };
1142
- cn(t);
1143
- var n = Mt(e, t), r = rn(e, t);
1144
- return {
1145
- update: function(e) {
1146
- cn(e), n.update(e), r.update(e);
1147
- },
1148
- destroy: function() {
1149
- n.destroy(), r.destroy();
1150
- }
1151
- };
1152
- }
1153
- function sn(e) {
1154
- return !!e.closest(`[${ie}="true"]`);
1155
- }
1156
- function cn(e) {
1157
- var t = e.items;
1158
- e.flipDurationMs, e.type, e.dragDisabled, e.morphDisabled, e.dropFromOthersDisabled;
1159
- var r = e.zoneTabIndex, i = e.zoneItemTabIndex;
1160
- e.dropTargetStyle;
1161
- var o = e.dropTargetClasses;
1162
- e.transformDraggedElement, e.autoAriaDisabled, e.centreDraggedOnCursor, e.useCursorForDetection;
1163
- var s = e.delayTouchStart;
1164
- e.dropAnimationDisabled;
1165
- var c = a(e, an);
1166
- if (Object.keys(c).length > 0 && console.warn("dndzone will ignore unknown options", c), !t) throw Error("no 'items' key provided to dndzone");
1167
- var l = t.find(function(e) {
1168
- return !{}.hasOwnProperty.call(e, k);
1169
- });
1170
- if (l) throw Error(`missing '${k}' property for item ${Ce(l)}`);
1171
- if (o && !Array.isArray(o)) throw Error(`dropTargetClasses should be an array but instead it is a ${n(o)}, ${Ce(o)}`);
1172
- if (r && !ln(r)) throw Error(`zoneTabIndex should be a number but instead it is a ${n(r)}, ${Ce(r)}`);
1173
- if (i && !ln(i)) throw Error(`zoneItemTabIndex should be a number but instead it is a ${n(i)}, ${Ce(i)}`);
1174
- if (s !== void 0 && s !== !1 && s !== !0 && !(typeof s == "number" && isFinite(s) && s >= 0)) throw Error(`delayTouchStart should be a boolean (true/false) or a non-negative number but instead it is a ${n(s)}, ${Ce(s)}`);
1175
- }
1176
- function ln(e) {
1177
- return !isNaN(e) && function(e) {
1178
- return (e | 0) === e;
1179
- }(parseFloat(e));
1180
- }
1181
- //#endregion
1182
- //#region src/lib/utils/dndzone.ts
1183
- function un(e, t) {
1184
- let n = t, r = null, i = null, a = !1, o = !1, s = () => {
1185
- o || (o = !0, (typeof queueMicrotask == "function" ? queueMicrotask : (e) => Promise.resolve().then(e))(c));
1186
- }, c = () => {
1187
- a || (r = on(e, n), i &&= (r.update(i), null));
1188
- };
1189
- return s(), {
1190
- update(e) {
1191
- r ? r.update(e) : (i = e, s());
1192
- },
1193
- destroy() {
1194
- r ? (r.destroy(), r = null) : a = !0;
1195
- }
1196
- };
1197
- }
1198
- //#endregion
1199
- export { D as n, un as t };