@templatical/editor 0.51.1 → 0.52.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (380) hide show
  1. package/THIRD_PARTY_NOTICES.md +208 -0
  2. package/dist/{AiAltTextPopover-BZQ95GXL.js → AiAltTextPopover-DawbUywc.js} +16 -17
  3. package/dist/{AiAltTextReview-DoBEudnE.js → AiAltTextReview-9ySsXOTU.js} +25 -26
  4. package/dist/{AiChatPanel-Bs6sES3b.js → AiChatPanel-CupPhmsN.js} +141 -143
  5. package/dist/{AiPanels-CfN7A-ZA.js → AiPanels-DqT4PgQ0.js} +6 -8
  6. package/dist/{AiRewriteMenu-C3ZfDDYy.js → AiRewriteMenu-28agTycW.js} +66 -67
  7. package/dist/BlockIssueBadge-BxpDy3u-.js +33 -0
  8. package/dist/{BlockPreviewCanvas-BXNLLLYi.js → BlockPreviewCanvas-B-4bmJ3t.js} +26 -27
  9. package/dist/{CloudHeaderExtras-CsJMEiyN.js → CloudHeaderExtras-QI82yF54.js} +4 -5
  10. package/dist/{CloudPanels-B4F5m7vy.js → CloudPanels-BKJaLkUN.js} +52 -53
  11. package/dist/{CollaborationNotices-CNuDp7Y2.js → CollaborationNotices-CTw4JThq.js} +12 -13
  12. package/dist/{CollaboratorBar-BtHPiuHq.js → CollaboratorBar-CXQqN3VP.js} +16 -17
  13. package/dist/{CommentsPanel-CyCM-BvT.js → CommentsPanel-DwwFuh1h.js} +3 -5
  14. package/dist/CommentsSidebar-9ZfiC2DO.js +500 -0
  15. package/dist/{CountdownBlock-DR4Xm2-T.js → CountdownBlock-CU2yTWtF.js} +21 -22
  16. package/dist/{CountdownToolbar-CEIMPojJ.js → CountdownToolbar-BqoYzf_6.js} +55 -56
  17. package/dist/IssuesPanel-4ykrf1ax.js +359 -0
  18. package/dist/{LoadingTrack-B0RKQWq3.js → LoadingTrack-DM4g6j7b.js} +3 -4
  19. package/dist/{LogicTagInsertButton-CqfU52CO.js → LogicTagInsertButton-CfscnwCn.js} +243 -250
  20. package/dist/{MediaEditModal-DHtkZ4OU.js → MediaEditModal-Dy08GEwE.js} +449 -452
  21. package/dist/{MediaPanels-CGcOB2pR.js → MediaPanels-BgEp7iCp.js} +3 -5
  22. package/dist/{MergeTagInput-YnEkorTZ.js → MergeTagInput-B9dtUthD.js} +14 -15
  23. package/dist/{MergeTagModeToggle-Dhb1DAcQ.js → MergeTagModeToggle-DxujhYJ4.js} +30 -31
  24. package/dist/{MergeTagTextarea-e4lnwtqZ.js → MergeTagTextarea-CPFEjJZd.js} +12 -13
  25. package/dist/{ParagraphEditor-B6NK0ytw.js → ParagraphEditor-CWXfurGh.js} +233 -236
  26. package/dist/{RestoreVersionDialog-Bq_IGOLJ.js → RestoreVersionDialog-C4s_JYCx.js} +16 -17
  27. package/dist/{RichTextEditorContent-AOM6fylS.js → RichTextEditorContent-o6HmE8GR.js} +40 -40
  28. package/dist/{SaveBlockDialog-C8GngfQx.js → SaveBlockDialog-CWLrly6l.js} +58 -59
  29. package/dist/SavedBlocksBrowserModal-CE8n4EBS.js +359 -0
  30. package/dist/{SavedBlocksPanels-C2s3q0pJ.js → SavedBlocksPanels-BE1N9rNZ.js} +7 -9
  31. package/dist/{SavedBlocksPickBar-BjcTiV87.js → SavedBlocksPickBar-Dwl94xhP.js} +14 -15
  32. package/dist/{TemplateSettings-BVBWpiDU.js → TemplateSettings-CS0f1Ues.js} +75 -76
  33. package/dist/{TestEmailModal-SyhO9bn3.js → TestEmailModal-DBD0X5nV.js} +54 -56
  34. package/dist/{TestEmailPanel-BDd2Rtav.js → TestEmailPanel-DaFjP9QK.js} +3 -5
  35. package/dist/{TitleEditor-pxD53y_l.js → TitleEditor-DSqtle77.js} +78 -79
  36. package/dist/{ToggleSwitch-D51U9cmR.js → ToggleSwitch-JykPyD_8.js} +5 -6
  37. package/dist/{Toolbar-CZSPZYbj.js → Toolbar-BZPFfKrf.js} +977 -985
  38. package/dist/{TplModal-DCzBzicE.js → TplModal-DLMssVlt.js} +16 -17
  39. package/dist/{VersionHistoryMenu-BQeWPT85.js → VersionHistoryMenu-BkbYUs0Q.js} +37 -38
  40. package/dist/{VersionHistoryPanels-BBm7YbRQ.js → VersionHistoryPanels-DP7HaYWv.js} +5 -7
  41. package/dist/{VersionPreviewBanner-DUGF0tUJ.js → VersionPreviewBanner-DECaBwLq.js} +11 -12
  42. package/dist/WrapperBlock-BsJv_Fiw.js +44 -0
  43. package/dist/{_plugin-vue_export-helper-B3ysoDQm.js → _plugin-vue_export-helper-Djzt4Yr7.js} +1 -2
  44. package/dist/{aiErrors-D5UOoYOt.js → aiErrors-C3QEMB0x.js} +3 -5
  45. package/dist/{aiImageContext-BH4Ss1h3.js → aiImageContext-BQ5mQ6B5.js} +2 -3
  46. package/dist/{aiRewritePreview-DLGM05Ge.js → aiRewritePreview-DlMyx6Si.js} +1 -2
  47. package/dist/{blockTypeIcons-NzaYvAI4.js → blockTypeIcons-BHjlPnPf.js} +23 -23
  48. package/dist/bundle-stats.json +6 -6
  49. package/dist/{ca-C7mTzW1r.js → ca-CD-Kt1qz.js} +1 -2
  50. package/dist/{ca-CYQH3J0b.js → ca-Cc6eL0ZS.js} +1 -2
  51. package/dist/cdn/chunks/{AiAltTextPopover-CQu0Q_ZX.js → AiAltTextPopover-SEEjkd-I.js} +24 -25
  52. package/dist/cdn/chunks/{AiAltTextPopover-CQu0Q_ZX.js.map → AiAltTextPopover-SEEjkd-I.js.map} +1 -1
  53. package/dist/cdn/chunks/{AiAltTextReview-CI2HbWfn.js → AiAltTextReview-BGLLSKLm.js} +43 -44
  54. package/dist/cdn/chunks/{AiAltTextReview-CI2HbWfn.js.map → AiAltTextReview-BGLLSKLm.js.map} +1 -1
  55. package/dist/cdn/chunks/{AiChatPanel-BYqn1bKu.js → AiChatPanel-DKDAaBNi.js} +129 -131
  56. package/dist/cdn/chunks/{AiChatPanel-BYqn1bKu.js.map → AiChatPanel-DKDAaBNi.js.map} +1 -1
  57. package/dist/cdn/chunks/{AiPanels-CIFKQv8Y.js → AiPanels-0wBarZSH.js} +5 -7
  58. package/dist/cdn/chunks/{AiPanels-CIFKQv8Y.js.map → AiPanels-0wBarZSH.js.map} +1 -1
  59. package/dist/cdn/chunks/{AiRewriteMenu-Bhh71zcc.js → AiRewriteMenu-qf-cfEpy.js} +52 -53
  60. package/dist/cdn/chunks/AiRewriteMenu-qf-cfEpy.js.map +1 -0
  61. package/dist/cdn/chunks/BlockIssueBadge-jdf91-nk.js +34 -0
  62. package/dist/cdn/chunks/BlockIssueBadge-jdf91-nk.js.map +1 -0
  63. package/dist/cdn/chunks/{BlockPreviewCanvas-D0--EQkP.js → BlockPreviewCanvas-DGBh6mqe.js} +22 -23
  64. package/dist/cdn/chunks/{BlockPreviewCanvas-D0--EQkP.js.map → BlockPreviewCanvas-DGBh6mqe.js.map} +1 -1
  65. package/dist/cdn/chunks/{CloudHeaderExtras-DaUU8P8R.js → CloudHeaderExtras-BMNK_F9p.js} +4 -5
  66. package/dist/cdn/chunks/{CloudHeaderExtras-DaUU8P8R.js.map → CloudHeaderExtras-BMNK_F9p.js.map} +1 -1
  67. package/dist/cdn/chunks/{CloudPanels-C3jsxo_f.js → CloudPanels-JMWIoVWh.js} +34 -35
  68. package/dist/cdn/chunks/{CloudPanels-C3jsxo_f.js.map → CloudPanels-JMWIoVWh.js.map} +1 -1
  69. package/dist/cdn/chunks/{CollaborationNotices-DjRI8gvs.js → CollaborationNotices-Bsf1rGW9.js} +13 -14
  70. package/dist/cdn/chunks/{CollaborationNotices-DjRI8gvs.js.map → CollaborationNotices-Bsf1rGW9.js.map} +1 -1
  71. package/dist/cdn/chunks/{CollaboratorBar-Dfzm6A9A.js → CollaboratorBar-CXByAoUz.js} +16 -17
  72. package/dist/cdn/chunks/{CollaboratorBar-Dfzm6A9A.js.map → CollaboratorBar-CXByAoUz.js.map} +1 -1
  73. package/dist/cdn/chunks/{CommentsPanel-CSO79OeX.js → CommentsPanel-DoJnKLXI.js} +4 -6
  74. package/dist/cdn/chunks/{CommentsPanel-CSO79OeX.js.map → CommentsPanel-DoJnKLXI.js.map} +1 -1
  75. package/dist/cdn/chunks/{CommentsSidebar-CCvplq1Z.js → CommentsSidebar-CUtgvdBC.js} +110 -110
  76. package/dist/cdn/chunks/CommentsSidebar-CUtgvdBC.js.map +1 -0
  77. package/dist/cdn/chunks/{CountdownBlock-C6USdwk3.js → CountdownBlock-BqRw147R.js} +19 -20
  78. package/dist/cdn/chunks/{CountdownBlock-C6USdwk3.js.map → CountdownBlock-BqRw147R.js.map} +1 -1
  79. package/dist/cdn/chunks/{CountdownToolbar-Cjud2Tos.js → CountdownToolbar-xobieKoU.js} +28 -29
  80. package/dist/cdn/chunks/{CountdownToolbar-Cjud2Tos.js.map → CountdownToolbar-xobieKoU.js.map} +1 -1
  81. package/dist/cdn/chunks/{IssuesPanel-BaWHPDxZ.js → IssuesPanel-C7LfxaAY.js} +76 -77
  82. package/dist/cdn/chunks/{IssuesPanel-BaWHPDxZ.js.map → IssuesPanel-C7LfxaAY.js.map} +1 -1
  83. package/dist/cdn/chunks/LoadingTrack-CZuLTazv.js +11 -0
  84. package/dist/cdn/chunks/{LoadingTrack-BIcL4NiY.js.map → LoadingTrack-CZuLTazv.js.map} +1 -1
  85. package/dist/cdn/chunks/{LogicTagInsertButton-CsL2JDOG.js → LogicTagInsertButton-BIi05UQu.js} +258 -265
  86. package/dist/cdn/chunks/{LogicTagInsertButton-CsL2JDOG.js.map → LogicTagInsertButton-BIi05UQu.js.map} +1 -1
  87. package/dist/cdn/chunks/{MediaEditModal-BuHCiyMu.js → MediaEditModal-Cpcod6_U.js} +152 -155
  88. package/dist/cdn/chunks/{MediaEditModal-BuHCiyMu.js.map → MediaEditModal-Cpcod6_U.js.map} +1 -1
  89. package/dist/cdn/chunks/{MediaPanels-DAgUf_T1.js → MediaPanels-BIdcW_1f.js} +4 -6
  90. package/dist/cdn/chunks/{MediaPanels-DAgUf_T1.js.map → MediaPanels-BIdcW_1f.js.map} +1 -1
  91. package/dist/cdn/chunks/{MergeTagInput-C8U-7LxL.js → MergeTagInput-BvWg8o5E.js} +35 -36
  92. package/dist/cdn/chunks/{MergeTagInput-C8U-7LxL.js.map → MergeTagInput-BvWg8o5E.js.map} +1 -1
  93. package/dist/cdn/chunks/{MergeTagModeToggle-Mm-p0A52.js → MergeTagModeToggle-BgKEVUtV.js} +28 -29
  94. package/dist/cdn/chunks/{MergeTagModeToggle-Mm-p0A52.js.map → MergeTagModeToggle-BgKEVUtV.js.map} +1 -1
  95. package/dist/cdn/chunks/{MergeTagTextarea-DuLScsWM.js → MergeTagTextarea-tBz8McZf.js} +33 -34
  96. package/dist/cdn/chunks/{MergeTagTextarea-DuLScsWM.js.map → MergeTagTextarea-tBz8McZf.js.map} +1 -1
  97. package/dist/cdn/chunks/{ParagraphEditor-CqSj6Ayz.js → ParagraphEditor-B3Rj_cWF.js} +197 -200
  98. package/dist/cdn/chunks/ParagraphEditor-B3Rj_cWF.js.map +1 -0
  99. package/dist/cdn/chunks/{RestoreVersionDialog-CdA5osuA.js → RestoreVersionDialog-CjOdD2xj.js} +21 -22
  100. package/dist/cdn/chunks/{RestoreVersionDialog-CdA5osuA.js.map → RestoreVersionDialog-CjOdD2xj.js.map} +1 -1
  101. package/dist/cdn/chunks/{RichTextEditorContent-Q1d2xqBT.js → RichTextEditorContent-DNjR_sNN.js} +30 -31
  102. package/dist/cdn/chunks/{RichTextEditorContent-Q1d2xqBT.js.map → RichTextEditorContent-DNjR_sNN.js.map} +1 -1
  103. package/dist/cdn/chunks/{SaveBlockDialog-CijargAy.js → SaveBlockDialog-CUhpawq0.js} +77 -78
  104. package/dist/cdn/chunks/{SaveBlockDialog-CijargAy.js.map → SaveBlockDialog-CUhpawq0.js.map} +1 -1
  105. package/dist/cdn/chunks/SavedBlocksBrowserModal-BPYcRoGa.js +356 -0
  106. package/dist/cdn/chunks/{SavedBlocksBrowserModal-DtOz_X5S.js.map → SavedBlocksBrowserModal-BPYcRoGa.js.map} +1 -1
  107. package/dist/cdn/chunks/{SavedBlocksPanels-BowyED5h.js → SavedBlocksPanels-C6--Bc81.js} +4 -6
  108. package/dist/cdn/chunks/{SavedBlocksPanels-BowyED5h.js.map → SavedBlocksPanels-C6--Bc81.js.map} +1 -1
  109. package/dist/cdn/chunks/{SavedBlocksPickBar-BPRaJBv3.js → SavedBlocksPickBar-DUavxpbU.js} +16 -17
  110. package/dist/cdn/chunks/{SavedBlocksPickBar-BPRaJBv3.js.map → SavedBlocksPickBar-DUavxpbU.js.map} +1 -1
  111. package/dist/cdn/chunks/{TemplateSettings-ByZeBO34.js → TemplateSettings-CKtI-dof.js} +72 -73
  112. package/dist/cdn/chunks/{TemplateSettings-ByZeBO34.js.map → TemplateSettings-CKtI-dof.js.map} +1 -1
  113. package/dist/cdn/chunks/{TestEmailModal-BUVTj3Ic.js → TestEmailModal-CDQTgESD.js} +68 -70
  114. package/dist/cdn/chunks/{TestEmailModal-BUVTj3Ic.js.map → TestEmailModal-CDQTgESD.js.map} +1 -1
  115. package/dist/cdn/chunks/{TestEmailPanel-BxutYoWg.js → TestEmailPanel-CcUpEpAn.js} +4 -6
  116. package/dist/cdn/chunks/{TestEmailPanel-BxutYoWg.js.map → TestEmailPanel-CcUpEpAn.js.map} +1 -1
  117. package/dist/cdn/chunks/{TitleEditor-Ccv6uoTz.js → TitleEditor-Cob7RLyK.js} +71 -72
  118. package/dist/cdn/chunks/TitleEditor-Cob7RLyK.js.map +1 -0
  119. package/dist/cdn/chunks/{ToggleSwitch-Ctdmj621.js → ToggleSwitch-J7Vwhvha.js} +6 -7
  120. package/dist/cdn/chunks/{ToggleSwitch-Ctdmj621.js.map → ToggleSwitch-J7Vwhvha.js.map} +1 -1
  121. package/dist/cdn/chunks/{Toolbar-DoprRgTn.js → Toolbar-CdpsvNOR.js} +977 -985
  122. package/dist/cdn/chunks/{Toolbar-DoprRgTn.js.map → Toolbar-CdpsvNOR.js.map} +1 -1
  123. package/dist/cdn/chunks/TplModal-CFPDgbwQ.js +51 -0
  124. package/dist/cdn/chunks/{TplModal-BXQzmsJX.js.map → TplModal-CFPDgbwQ.js.map} +1 -1
  125. package/dist/cdn/chunks/{VersionHistoryMenu-BF2fNCvq.js → VersionHistoryMenu-BYlLRvRJ.js} +34 -35
  126. package/dist/cdn/chunks/{VersionHistoryMenu-BF2fNCvq.js.map → VersionHistoryMenu-BYlLRvRJ.js.map} +1 -1
  127. package/dist/cdn/chunks/{VersionHistoryPanels-Dal0Uk69.js → VersionHistoryPanels-C6SOVoiT.js} +4 -6
  128. package/dist/cdn/chunks/{VersionHistoryPanels-Dal0Uk69.js.map → VersionHistoryPanels-C6SOVoiT.js.map} +1 -1
  129. package/dist/cdn/chunks/{VersionPreviewBanner-BaGcn-b1.js → VersionPreviewBanner-Dvg0ZfAW.js} +12 -13
  130. package/dist/cdn/chunks/{VersionPreviewBanner-BaGcn-b1.js.map → VersionPreviewBanner-Dvg0ZfAW.js.map} +1 -1
  131. package/dist/cdn/chunks/{WrapperBlock-DkQJtLz0.js → WrapperBlock-C7Md56IT.js} +14 -15
  132. package/dist/cdn/chunks/{WrapperBlock-DkQJtLz0.js.map → WrapperBlock-C7Md56IT.js.map} +1 -1
  133. package/dist/cdn/chunks/{_plugin-vue_export-helper-B3ysoDQm.js → _plugin-vue_export-helper-Djzt4Yr7.js} +1 -2
  134. package/dist/cdn/chunks/{aiErrors-D5UOoYOt.js → aiErrors-C3QEMB0x.js} +4 -6
  135. package/dist/cdn/chunks/{aiErrors-D5UOoYOt.js.map → aiErrors-C3QEMB0x.js.map} +1 -1
  136. package/dist/cdn/chunks/{aiImageContext-BH4Ss1h3.js → aiImageContext-BQ5mQ6B5.js} +3 -4
  137. package/dist/cdn/chunks/{aiImageContext-BH4Ss1h3.js.map → aiImageContext-BQ5mQ6B5.js.map} +1 -1
  138. package/dist/cdn/chunks/{aiRewritePreview-DLGM05Ge.js → aiRewritePreview-DlMyx6Si.js} +2 -3
  139. package/dist/cdn/chunks/{aiRewritePreview-DLGM05Ge.js.map → aiRewritePreview-DlMyx6Si.js.map} +1 -1
  140. package/dist/cdn/chunks/blockTypeIcons-D7FW7Ypo.js +21 -0
  141. package/dist/cdn/chunks/blockTypeIcons-D7FW7Ypo.js.map +1 -0
  142. package/dist/cdn/chunks/{ca-C7mTzW1r.js → ca-CD-Kt1qz.js} +2 -3
  143. package/dist/cdn/chunks/{ca-C7mTzW1r.js.map → ca-CD-Kt1qz.js.map} +1 -1
  144. package/dist/cdn/chunks/{ca-CYQH3J0b.js → ca-Cc6eL0ZS.js} +2 -3
  145. package/dist/cdn/chunks/{ca-CYQH3J0b.js.map → ca-Cc6eL0ZS.js.map} +1 -1
  146. package/dist/cdn/chunks/{createCloudRuntime-DpBWhrv3.js → createCloudRuntime-Cth2JCEh.js} +58 -77
  147. package/dist/cdn/chunks/{createCloudRuntime-DpBWhrv3.js.map → createCloudRuntime-Cth2JCEh.js.map} +1 -1
  148. package/dist/cdn/chunks/{de-DBOTcDj2.js → de-6M4JoHoD.js} +2 -3
  149. package/dist/cdn/chunks/{de-DBOTcDj2.js.map → de-6M4JoHoD.js.map} +1 -1
  150. package/dist/cdn/chunks/{de-DNuYQTmS.js → de-CeFJ6wbM.js} +2 -3
  151. package/dist/cdn/chunks/{de-DNuYQTmS.js.map → de-CeFJ6wbM.js.map} +1 -1
  152. package/dist/cdn/chunks/{de-JvCTMJPy.js → de-DtrXVcuY.js} +2 -3
  153. package/dist/cdn/chunks/{de-JvCTMJPy.js.map → de-DtrXVcuY.js.map} +1 -1
  154. package/dist/cdn/chunks/{dist-Bo8Thh8v.js → dist-8ym3y-pH.js} +44 -45
  155. package/dist/cdn/chunks/{dist-Bo8Thh8v.js.map → dist-8ym3y-pH.js.map} +1 -1
  156. package/dist/{dist-DI4_YSnG.js → cdn/chunks/dist-BMzNabtD.js} +107 -109
  157. package/dist/cdn/chunks/{dist-S-rLGqax.js.map → dist-BMzNabtD.js.map} +1 -1
  158. package/dist/cdn/chunks/dompurify-JVtr5-B1.js +872 -0
  159. package/dist/cdn/chunks/dompurify-JVtr5-B1.js.map +1 -0
  160. package/dist/cdn/chunks/{draggable-DZ0gwUJ6.js → draggable-Du8AUMFT.js} +654 -654
  161. package/dist/cdn/chunks/draggable-Du8AUMFT.js.map +1 -0
  162. package/dist/{editor-modal-Bzhl-PgI.js → cdn/chunks/editor-modal-CyCe560f.js} +893 -979
  163. package/dist/cdn/chunks/{editor-modal-CI6EfeMd.js.map → editor-modal-CyCe560f.js.map} +1 -1
  164. package/dist/cdn/chunks/{emojiData-6m0DBh7O.js → emojiData-CBNuCfum.js} +2 -3
  165. package/dist/cdn/chunks/{emojiData-6m0DBh7O.js.map → emojiData-CBNuCfum.js.map} +1 -1
  166. package/dist/cdn/chunks/{en-CW71OK66.js → en-D14i5nFh.js} +2 -3
  167. package/dist/cdn/chunks/{en-CW71OK66.js.map → en-D14i5nFh.js.map} +1 -1
  168. package/dist/cdn/chunks/{en-CDhWRrF_.js → en-FzUuJ8HW.js} +2 -3
  169. package/dist/cdn/chunks/{en-CDhWRrF_.js.map → en-FzUuJ8HW.js.map} +1 -1
  170. package/dist/cdn/chunks/en-TIqv4ag3.js +1 -0
  171. package/dist/cdn/chunks/{es-CAv-Vldw.js → es-Dw_h7Oll.js} +2 -3
  172. package/dist/cdn/chunks/{es-CAv-Vldw.js.map → es-Dw_h7Oll.js.map} +1 -1
  173. package/dist/cdn/chunks/{es-DdK7zQfi.js → es-zDacbMhs.js} +2 -3
  174. package/dist/cdn/chunks/{es-DdK7zQfi.js.map → es-zDacbMhs.js.map} +1 -1
  175. package/dist/cdn/chunks/{extensions-taJTZlLK.js → extensions-CFF2KWy-.js} +60 -65
  176. package/dist/cdn/chunks/{extensions-taJTZlLK.js.map → extensions-CFF2KWy-.js.map} +1 -1
  177. package/dist/cdn/chunks/{formatAbsoluteDateTime-DMmop3C-.js → formatAbsoluteDateTime-Ck2_zXra.js} +2 -3
  178. package/dist/cdn/chunks/{formatAbsoluteDateTime-DMmop3C-.js.map → formatAbsoluteDateTime-Ck2_zXra.js.map} +1 -1
  179. package/dist/cdn/chunks/{formatRelativeTime-CtUU-QZ8.js → formatRelativeTime-BTD8Ktt-.js} +1 -2
  180. package/dist/cdn/chunks/{formatRelativeTime-CtUU-QZ8.js.map → formatRelativeTime-BTD8Ktt-.js.map} +1 -1
  181. package/dist/cdn/chunks/{fr-DVPtxpR6.js → fr-BJaeKu_8.js} +2 -3
  182. package/dist/cdn/chunks/{fr-DVPtxpR6.js.map → fr-BJaeKu_8.js.map} +1 -1
  183. package/dist/cdn/chunks/{fr-Dz5Bgb7-.js → fr-CSgYtjOd.js} +2 -3
  184. package/dist/cdn/chunks/{fr-Dz5Bgb7-.js.map → fr-CSgYtjOd.js.map} +1 -1
  185. package/dist/cdn/chunks/{htmlparser-CDRsn-gn.js → htmlparser-hu3YnNQU.js} +6 -11
  186. package/dist/cdn/chunks/{htmlparser-CDRsn-gn.js.map → htmlparser-hu3YnNQU.js.map} +1 -1
  187. package/dist/cdn/chunks/{icons-DNX6StSs.js → icons-okSPsLOa.js} +111 -114
  188. package/dist/cdn/chunks/icons-okSPsLOa.js.map +1 -0
  189. package/dist/cdn/chunks/{ja-Di-zJiT8.js → ja-B7H3ID8O.js} +2 -3
  190. package/dist/cdn/chunks/{ja-Di-zJiT8.js.map → ja-B7H3ID8O.js.map} +1 -1
  191. package/dist/cdn/chunks/{ja-dcWzjStz.js → ja-Cu2HdYaK.js} +2 -3
  192. package/dist/cdn/chunks/{ja-dcWzjStz.js.map → ja-Cu2HdYaK.js.map} +1 -1
  193. package/dist/cdn/chunks/{keys-BTpmg2Tt.js → keys-CUj6UA38.js} +3 -4
  194. package/dist/cdn/chunks/{keys-BTpmg2Tt.js.map → keys-CUj6UA38.js.map} +1 -1
  195. package/dist/{liquid.browser-Ct2-EezB.js → cdn/chunks/liquid.browser-rubac0VA.js} +993 -937
  196. package/dist/cdn/chunks/liquid.browser-rubac0VA.js.map +1 -0
  197. package/dist/cdn/chunks/{logger-Tj0RPskW.js → logger-CqQTfJGx.js} +2 -3
  198. package/dist/cdn/chunks/{logger-Tj0RPskW.js.map → logger-CqQTfJGx.js.map} +1 -1
  199. package/dist/cdn/chunks/{nl-CvVuHYFL.js → nl-176ySmc5.js} +2 -3
  200. package/dist/cdn/chunks/{nl-CvVuHYFL.js.map → nl-176ySmc5.js.map} +1 -1
  201. package/dist/cdn/chunks/{nl-LZNqQgE4.js → nl-1Ai2NykB.js} +2 -3
  202. package/dist/cdn/chunks/{nl-LZNqQgE4.js.map → nl-1Ai2NykB.js.map} +1 -1
  203. package/dist/cdn/chunks/{normalizeMergeTagMarkup-DyePIGqu.js → normalizeMergeTagMarkup-C_KlfSW4.js} +3 -4
  204. package/dist/cdn/chunks/{normalizeMergeTagMarkup-DyePIGqu.js.map → normalizeMergeTagMarkup-C_KlfSW4.js.map} +1 -1
  205. package/dist/cdn/chunks/{preRenderCustomBlocks-Dc-QLntG.js → preRenderCustomBlocks-BcXIz7oJ.js} +6 -7
  206. package/dist/cdn/chunks/{preRenderCustomBlocks-Dc-QLntG.js.map → preRenderCustomBlocks-BcXIz7oJ.js.map} +1 -1
  207. package/dist/cdn/chunks/{pt-BR-CHM-ZKvE.js → pt-BR-Bp92Fc6J.js} +2 -3
  208. package/dist/cdn/chunks/{pt-BR-CHM-ZKvE.js.map → pt-BR-Bp92Fc6J.js.map} +1 -1
  209. package/dist/cdn/chunks/{pt-BR-D6P_mNwA.js → pt-BR-CIbp__Z7.js} +2 -3
  210. package/dist/cdn/chunks/{pt-BR-D6P_mNwA.js.map → pt-BR-CIbp__Z7.js.map} +1 -1
  211. package/dist/cdn/chunks/{pt-BR-ZhO4vgyq.js → pt-BR-dDlTwX18.js} +2 -3
  212. package/dist/cdn/chunks/{pt-BR-ZhO4vgyq.js.map → pt-BR-dDlTwX18.js.map} +1 -1
  213. package/dist/cdn/chunks/{pusher-Cs4GGEtd.js → pusher-x9rNqzon.js} +3 -4
  214. package/dist/cdn/chunks/{pusher-Cs4GGEtd.js.map → pusher-x9rNqzon.js.map} +1 -1
  215. package/dist/cdn/chunks/{readableTextColor-f8Kykfnh.js → readableTextColor-BfZUGnVj.js} +2 -3
  216. package/dist/cdn/chunks/{readableTextColor-f8Kykfnh.js.map → readableTextColor-BfZUGnVj.js.map} +1 -1
  217. package/dist/cdn/chunks/{rolldown-runtime-Y_bBpyJl.js → rolldown-runtime-QGRDbDUS.js} +1 -2
  218. package/dist/cdn/chunks/sanitizeHtml-CN85EDrO.js +72 -0
  219. package/dist/cdn/chunks/sanitizeHtml-CN85EDrO.js.map +1 -0
  220. package/dist/cdn/chunks/{socialIcons-BBvsTwCV.js → socialIcons-jsTDmkbb.js} +608 -632
  221. package/dist/cdn/chunks/{socialIcons-BBvsTwCV.js.map → socialIcons-jsTDmkbb.js.map} +1 -1
  222. package/dist/cdn/chunks/src-C7bkofBL.js +647 -0
  223. package/dist/cdn/chunks/src-C7bkofBL.js.map +1 -0
  224. package/dist/cdn/chunks/{src-Bs_yxk3h.js → src-DEd87i_U.js} +502 -537
  225. package/dist/cdn/chunks/src-DEd87i_U.js.map +1 -0
  226. package/dist/cdn/chunks/{src-BNFnxfrA.js → src-DwWrYnUj.js} +188 -171
  227. package/dist/cdn/chunks/src-DwWrYnUj.js.map +1 -0
  228. package/dist/cdn/chunks/{styleConstants-v1dNKgJf.js → styleConstants-B8xVRiwX.js} +2 -3
  229. package/dist/cdn/chunks/{styleConstants-v1dNKgJf.js.map → styleConstants-B8xVRiwX.js.map} +1 -1
  230. package/dist/cdn/chunks/{templateSettingsFields-YCFVBVYh.js → templateSettingsFields-cjlP-jdw.js} +2 -3
  231. package/dist/cdn/chunks/{templateSettingsFields-YCFVBVYh.js.map → templateSettingsFields-cjlP-jdw.js.map} +1 -1
  232. package/dist/cdn/chunks/{tiptap-CtVrAViq.js → tiptap-CbiTlECY.js} +3402 -3278
  233. package/dist/cdn/chunks/tiptap-CbiTlECY.js.map +1 -0
  234. package/dist/cdn/chunks/{useCloudI18n-AVXhzbhQ.js → useCloudI18n-DY8_-ETE.js} +4 -5
  235. package/dist/cdn/chunks/{useCloudI18n-AVXhzbhQ.js.map → useCloudI18n-DY8_-ETE.js.map} +1 -1
  236. package/dist/cdn/chunks/useEditorCore-BrY66C2y.js +2582 -0
  237. package/dist/cdn/chunks/useEditorCore-BrY66C2y.js.map +1 -0
  238. package/dist/cdn/chunks/useEditorRoot-vjZJwKrV.js +9 -0
  239. package/dist/cdn/chunks/{useEditorRoot-CR5GjJD6.js.map → useEditorRoot-vjZJwKrV.js.map} +1 -1
  240. package/dist/cdn/chunks/{useI18n-CbVubQhM.js → useI18n-D8pY4LTq.js} +4 -5
  241. package/dist/cdn/chunks/{useI18n-CbVubQhM.js.map → useI18n-D8pY4LTq.js.map} +1 -1
  242. package/dist/{useLogicTag-DKLZ1T9H.js → cdn/chunks/useLogicTag-DBJDtpKA.js} +6 -5
  243. package/dist/cdn/chunks/{useLogicTag-B49Nc53Y.js.map → useLogicTag-DBJDtpKA.js.map} +1 -1
  244. package/dist/{useMergeTag-Bhdx7AKk.js → cdn/chunks/useMergeTag-B-aG--s1.js} +8 -7
  245. package/dist/cdn/chunks/{useMergeTag-B0KryMj8.js.map → useMergeTag-B-aG--s1.js.map} +1 -1
  246. package/dist/{usePopoverPosition-BZea45XK.js → cdn/chunks/usePopoverPosition-DSMtmu2W.js} +8 -10
  247. package/dist/cdn/chunks/{usePopoverPosition-C829ps5i.js.map → usePopoverPosition-DSMtmu2W.js.map} +1 -1
  248. package/dist/cdn/chunks/{useScrollToBlock-CAwvulog.js → useScrollToBlock-vjQ0fe-L.js} +5 -7
  249. package/dist/cdn/chunks/{useScrollToBlock-CAwvulog.js.map → useScrollToBlock-vjQ0fe-L.js.map} +1 -1
  250. package/dist/cdn/chunks/{withCurrentFont-DFPXeVfG.js → withCurrentFont-hZTvYBHO.js} +3 -4
  251. package/dist/cdn/chunks/{withCurrentFont-DFPXeVfG.js.map → withCurrentFont-hZTvYBHO.js.map} +1 -1
  252. package/dist/cdn/editor.css +1 -1
  253. package/dist/cdn/editor.js +1433 -1454
  254. package/dist/cdn/editor.js.map +1 -1
  255. package/dist/{check-yYsp5Xpk.js → check-BZ8o0eet.js} +1 -2
  256. package/dist/{chevron-down-DTmD06_j.js → chevron-down-DfAAfILv.js} +1 -2
  257. package/dist/{chevron-right-BSeYZOxc.js → chevron-right-Bk4mGdr7.js} +1 -2
  258. package/dist/{chevron-up-BOApwrxi.js → chevron-up-MhUf_azW.js} +1 -2
  259. package/dist/{circle-alert-BMszY8im.js → circle-alert-CShJwVFv.js} +1 -2
  260. package/dist/{clock-HADxnl6-.js → clock-CTfD6OCt.js} +1 -2
  261. package/dist/{createCloudRuntime-DVQI_ReU.js → createCloudRuntime-DCgO4A1r.js} +31 -37
  262. package/dist/{createLucideIcon-0lYYH3EW.js → createLucideIcon-CvhTA2KG.js} +6 -11
  263. package/dist/{de-DBOTcDj2.js → de-6M4JoHoD.js} +1 -2
  264. package/dist/{de-DNuYQTmS.js → de-CeFJ6wbM.js} +1 -2
  265. package/dist/{de-JvCTMJPy.js → de-DtrXVcuY.js} +1 -2
  266. package/dist/{dist-BC-ZEYLd.js → dist-BF5zEHop.js} +2 -3
  267. package/dist/{dist-CyBwSiAa.js → dist-BS5uKktL.js} +2 -3
  268. package/dist/{cdn/chunks/dist-S-rLGqax.js → dist-ByCWA2Tv.js} +101 -101
  269. package/dist/{dist-DtOF3bDW.js → dist-CKi_npZM.js} +378 -343
  270. package/dist/{dist-C7EtxNCb.js → dist-CVy-7PHQ.js} +55 -56
  271. package/dist/{dist-Cr7RPxI9.js → dist-CWSG7Kj0.js} +478 -461
  272. package/dist/{dist-DXyGqIDE.js → dist-Cy8I5scI.js} +2 -3
  273. package/dist/{dist-C_dV9QAx.js → dist-D6cMdrfG.js} +133 -133
  274. package/dist/{dist-DVNjPKsH.js → dist-D6fZec6r.js} +3 -4
  275. package/dist/{dist-CuLwJF7H.js → dist-Dd5MU2Ev.js} +23 -14
  276. package/dist/dist-DyFArF_G.js +4 -0
  277. package/dist/{dist-DBxgrOeo.js → dist-V7W1UhVr.js} +1882 -1792
  278. package/dist/{dist-DPcf6XZ8.js → dist-p3wymUDt.js} +2 -3
  279. package/dist/dist-pA3ooG6N.js +4 -0
  280. package/dist/{dist-3HpYixwF.js → dist-txQLT2sF.js} +173 -161
  281. package/dist/{cdn/chunks/editor-modal-CI6EfeMd.js → editor-modal-zaZHcmlO.js} +915 -859
  282. package/dist/{emojiData-6m0DBh7O.js → emojiData-CBNuCfum.js} +1 -2
  283. package/dist/{en-CW71OK66.js → en-D14i5nFh.js} +1 -2
  284. package/dist/en-Db76vJbY.js +1 -0
  285. package/dist/{en-CDhWRrF_.js → en-FzUuJ8HW.js} +1 -2
  286. package/dist/{es-CAv-Vldw.js → es-Dw_h7Oll.js} +1 -2
  287. package/dist/{es-DdK7zQfi.js → es-zDacbMhs.js} +1 -2
  288. package/dist/{extensions-CdyweA50.js → extensions-fo_c-vqf.js} +82 -91
  289. package/dist/{eye-DWkSvYpj.js → eye-7W4t5e0Q.js} +1 -2
  290. package/dist/{formatAbsoluteDateTime-DMmop3C-.js → formatAbsoluteDateTime-Ck2_zXra.js} +1 -2
  291. package/dist/{formatRelativeTime-CtUU-QZ8.js → formatRelativeTime-BTD8Ktt-.js} +0 -1
  292. package/dist/{fr-DVPtxpR6.js → fr-BJaeKu_8.js} +1 -2
  293. package/dist/{fr-Dz5Bgb7-.js → fr-CSgYtjOd.js} +1 -2
  294. package/dist/{image-DesWjcZ4.js → image-BDiRFzSd.js} +1 -2
  295. package/dist/index.d.ts +6 -6
  296. package/dist/{info-ClWJGoZy.js → info-Cxi3-Kh9.js} +1 -2
  297. package/dist/{ja-Di-zJiT8.js → ja-B7H3ID8O.js} +1 -2
  298. package/dist/{ja-dcWzjStz.js → ja-Cu2HdYaK.js} +1 -2
  299. package/dist/{keys-Zd9KWRD1.js → keys-BgRERHzu.js} +2 -3
  300. package/dist/{link-BqRicFTA.js → link-ju_2Cmir.js} +1 -2
  301. package/dist/{cdn/chunks/liquid.browser-Bbt17cVz.js → liquid.browser-DUXEekoN.js} +991 -939
  302. package/dist/{list-bojQr9bn.js → list-DYZJf0aZ.js} +1 -2
  303. package/dist/{loader-circle-B2B8LbUu.js → loader-circle-BZRD0a4I.js} +1 -2
  304. package/dist/{logger-k9Nbj3Cp.js → logger-BOu7oEtk.js} +1 -2
  305. package/dist/{message-circle-BEuiNsyZ.js → message-circle-DuEw4Zfx.js} +1 -2
  306. package/dist/{nl-CvVuHYFL.js → nl-176ySmc5.js} +1 -2
  307. package/dist/{nl-LZNqQgE4.js → nl-1Ai2NykB.js} +1 -2
  308. package/dist/{normalizeMergeTagMarkup-P6SUBuPv.js → normalizeMergeTagMarkup-CELnOlgK.js} +30 -31
  309. package/dist/{package-DCROB4aM.js → package-CePMr2kK.js} +1 -2
  310. package/dist/{pencil-CEotCKbf.js → pencil-D3aFCL7c.js} +1 -2
  311. package/dist/{preRenderCustomBlocks-D8rr61_z.js → preRenderCustomBlocks--_xc0XK3.js} +4 -5
  312. package/dist/{pt-BR-CHM-ZKvE.js → pt-BR-Bp92Fc6J.js} +1 -2
  313. package/dist/{pt-BR-D6P_mNwA.js → pt-BR-CIbp__Z7.js} +1 -2
  314. package/dist/{pt-BR-ZhO4vgyq.js → pt-BR-dDlTwX18.js} +1 -2
  315. package/dist/{readableTextColor-f8Kykfnh.js → readableTextColor-BfZUGnVj.js} +1 -2
  316. package/dist/{refresh-cw-C6M2mHNC.js → refresh-cw-xnro7_Sk.js} +1 -2
  317. package/dist/{rolldown-runtime-Dy4uBu1J.js → rolldown-runtime-CGnMp29N.js} +1 -2
  318. package/dist/{runtime-dom.esm-bundler-B8WCZWUm.js → runtime-dom.esm-bundler-BURR-bj5.js} +121 -122
  319. package/dist/sanitizeHtml-BzfzpYJY.js +942 -0
  320. package/dist/{search-Cy99zPYf.js → search-CDrstRBv.js} +1 -2
  321. package/dist/{send-BDLJFsf3.js → send-DROkPOaX.js} +1 -2
  322. package/dist/{smartphone-CVvQaNA4.js → smartphone-Bx6u_tjn.js} +1 -2
  323. package/dist/{socialIcons-Dd-jRiVe.js → socialIcons-D7MGsg0d.js} +553 -564
  324. package/dist/{sparkles-Ce0Qz0ox.js → sparkles-CdaTtvoz.js} +1 -2
  325. package/dist/{square-BWlolnXe.js → square-BbCROH_f.js} +1 -2
  326. package/dist/style.css +1 -1
  327. package/dist/{styleConstants-v1dNKgJf.js → styleConstants-B8xVRiwX.js} +1 -2
  328. package/dist/{templateSettingsFields-YCFVBVYh.js → templateSettingsFields-cjlP-jdw.js} +1 -2
  329. package/dist/templatical-editor.js +1231 -1251
  330. package/dist/{text-align-start-D1V5gPTy.js → text-align-start-CGacJ9Vw.js} +1 -2
  331. package/dist/{trash-CZfiUFmw.js → trash-DxCd7zIy.js} +1 -2
  332. package/dist/{triangle-alert-CFDzyFC7.js → triangle-alert-7_oaitpf.js} +1 -2
  333. package/dist/{upload-BJfvdIrD.js → upload-DuFEOi_0.js} +1 -2
  334. package/dist/{useCloudI18n-Dcjua65H.js → useCloudI18n-DEMmUKuO.js} +3 -4
  335. package/dist/{useEditorCore-BTLeAVlM.js → useEditorCore-BSo2sSID.js} +1568 -1573
  336. package/dist/useEditorRoot-BMcoCLBx.js +7 -0
  337. package/dist/{useI18n-BdoY7xDE.js → useI18n-BBrHTdu8.js} +3 -4
  338. package/dist/{cdn/chunks/useLogicTag-B49Nc53Y.js → useLogicTag-ZPC39rfH.js} +4 -7
  339. package/dist/{cdn/chunks/useMergeTag-B0KryMj8.js → useMergeTag-BQ4qqWpQ.js} +6 -9
  340. package/dist/{cdn/chunks/usePopoverPosition-C829ps5i.js → usePopoverPosition-DV1PxL66.js} +6 -12
  341. package/dist/{useScrollToBlock-FmNMALM_.js → useScrollToBlock-BSyAV4pk.js} +4 -6
  342. package/dist/{vue.runtime.esm-bundler-DgFJ6GPG.js → vue.runtime.esm-bundler-CnEeTfhs.js} +1001 -1002
  343. package/dist/{withCurrentFont-BATJHNve.js → withCurrentFont-B22FXAF5.js} +2 -3
  344. package/dist/{x-CZ0Js0hA.js → x-BpfG7v9g.js} +1 -2
  345. package/package.json +26 -24
  346. package/dist/BlockIssueBadge-CKwZ1Vgn.js +0 -34
  347. package/dist/CommentsSidebar-Ca3DyFOX.js +0 -500
  348. package/dist/IssuesPanel-C8nMUccy.js +0 -360
  349. package/dist/SavedBlocksBrowserModal-wnkvxpm_.js +0 -360
  350. package/dist/WrapperBlock-BO619LAb.js +0 -45
  351. package/dist/cdn/chunks/AiRewriteMenu-Bhh71zcc.js.map +0 -1
  352. package/dist/cdn/chunks/BlockIssueBadge-DAn2vsMJ.js +0 -35
  353. package/dist/cdn/chunks/BlockIssueBadge-DAn2vsMJ.js.map +0 -1
  354. package/dist/cdn/chunks/CommentsSidebar-CCvplq1Z.js.map +0 -1
  355. package/dist/cdn/chunks/LoadingTrack-BIcL4NiY.js +0 -12
  356. package/dist/cdn/chunks/ParagraphEditor-CqSj6Ayz.js.map +0 -1
  357. package/dist/cdn/chunks/SavedBlocksBrowserModal-DtOz_X5S.js +0 -357
  358. package/dist/cdn/chunks/TitleEditor-Ccv6uoTz.js.map +0 -1
  359. package/dist/cdn/chunks/TplModal-BXQzmsJX.js +0 -52
  360. package/dist/cdn/chunks/blockTypeIcons-ikZAmd6U.js +0 -22
  361. package/dist/cdn/chunks/blockTypeIcons-ikZAmd6U.js.map +0 -1
  362. package/dist/cdn/chunks/draggable-DZ0gwUJ6.js.map +0 -1
  363. package/dist/cdn/chunks/en-ifvu6oPv.js +0 -1
  364. package/dist/cdn/chunks/icons-DNX6StSs.js.map +0 -1
  365. package/dist/cdn/chunks/liquid.browser-Bbt17cVz.js.map +0 -1
  366. package/dist/cdn/chunks/sanitizeRichTextHtml-DeISfLFr.js +0 -62
  367. package/dist/cdn/chunks/sanitizeRichTextHtml-DeISfLFr.js.map +0 -1
  368. package/dist/cdn/chunks/src-BNFnxfrA.js.map +0 -1
  369. package/dist/cdn/chunks/src-Bs_yxk3h.js.map +0 -1
  370. package/dist/cdn/chunks/src-YGkzYyu0.js +0 -649
  371. package/dist/cdn/chunks/src-YGkzYyu0.js.map +0 -1
  372. package/dist/cdn/chunks/tiptap-CtVrAViq.js.map +0 -1
  373. package/dist/cdn/chunks/useEditorCore-CCVFi1YZ.js +0 -2586
  374. package/dist/cdn/chunks/useEditorCore-CCVFi1YZ.js.map +0 -1
  375. package/dist/cdn/chunks/useEditorRoot-CR5GjJD6.js +0 -10
  376. package/dist/dist-BPFcLKTw.js +0 -5
  377. package/dist/dist-D7Yj7E-F.js +0 -5
  378. package/dist/en-DwV15ltA.js +0 -1
  379. package/dist/sanitizeRichTextHtml-DeISfLFr.js +0 -60
  380. package/dist/useEditorRoot-DUy67lJu.js +0 -8
@@ -1,10 +1,82 @@
1
- import { $ as e, C as t, D as n, F as r, I as i, J as a, P as o, R as s, S as c, U as l, V as u, W as d, X as f, _ as p, b as m, c as h, dt as g, f as _, g as v, h as y, it as b, j as x, l as S, lt as C, m as w, n as T, o as E, ot as D, p as O, rt as k, u as A, ut as j, x as M } from "./draggable-DZ0gwUJ6.js";
2
- import { h as N } from "./dist-Bo8Thh8v.js";
3
- import { a as P, n as F, o as I, r as L, s as R, t as z } from "./dist-S-rLGqax.js";
4
- import { Ct as B, G as V, H as ee, It as te, J as ne, M as re, Ot as ie, R as H, St as U, at as ae, f as W, lt as oe, ot as G, s as K, t as se, w as ce, yt as le, zt as ue } from "./icons-DNX6StSs.js";
5
- import { t as q } from "./_plugin-vue_export-helper-B3ysoDQm.js";
6
- //#region ../media-library/src/keys.ts
7
- var de = Symbol("templaticalMediaLimits"), J = Symbol("templaticalMediaPopoverTarget"), fe = Symbol("templaticalMediaTranslations"), Y = Symbol("templaticalMediaUiTheme"), X = Symbol("templaticalMediaUiLocale"), pe = { mediaLibrary: {
1
+ import { $ as e, C as t, F as n, H as r, J as i, M as a, Mt as o, N as s, Nt as c, O as l, U as u, X as d, _ as f, a as p, at as m, c as h, d as g, f as _, g as v, j as y, jt as b, l as x, r as S, rt as C, st as w, u as T, v as E, y as D, z as O } from "./vue.runtime.esm-bundler-CnEeTfhs.js";
2
+ import { a as k, c as A, s as j, t as M } from "./runtime-dom.esm-bundler-BURR-bj5.js";
3
+ import { h as N } from "./dist-CVy-7PHQ.js";
4
+ import { a as P, n as F, o as I, r as L, s as R, t as z } from "./dist-ByCWA2Tv.js";
5
+ import { t as B } from "./createLucideIcon-CvhTA2KG.js";
6
+ import { t as V } from "./check-BZ8o0eet.js";
7
+ import { t as ee } from "./chevron-right-Bk4mGdr7.js";
8
+ import { n as te, t as ne } from "./upload-DuFEOi_0.js";
9
+ import { t as re } from "./link-ju_2Cmir.js";
10
+ import { t as ie } from "./list-DYZJf0aZ.js";
11
+ import { t as H } from "./loader-circle-BZRD0a4I.js";
12
+ import { t as U } from "./pencil-D3aFCL7c.js";
13
+ import { n as W, t as G } from "./refresh-cw-xnro7_Sk.js";
14
+ import { t as ae } from "./search-CDrstRBv.js";
15
+ import { t as oe } from "./trash-DxCd7zIy.js";
16
+ import { t as se } from "./x-BpfG7v9g.js";
17
+ import { t as K } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
18
+ var q = B({
19
+ name: "file",
20
+ size: 24,
21
+ node: [["path", {
22
+ d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
23
+ key: "1oefj6"
24
+ }], ["path", {
25
+ d: "M14 2v5a1 1 0 0 0 1 1h5",
26
+ key: "wfsgrz"
27
+ }]]
28
+ }), J = B({
29
+ name: "folder",
30
+ size: 24,
31
+ node: [["path", {
32
+ d: "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",
33
+ key: "1kt360"
34
+ }]]
35
+ }), ce = B({
36
+ name: "grid-2x2",
37
+ size: 24,
38
+ node: [
39
+ ["path", {
40
+ d: "M12 3v18",
41
+ key: "108xh3"
42
+ }],
43
+ ["path", {
44
+ d: "M3 12h18",
45
+ key: "1i2n21"
46
+ }],
47
+ ["rect", {
48
+ x: "3",
49
+ y: "3",
50
+ width: "18",
51
+ height: "18",
52
+ rx: "2",
53
+ key: "h1oib"
54
+ }]
55
+ ],
56
+ aliases: ["grid-2-x-2"]
57
+ }), Y = B({
58
+ name: "panel-left",
59
+ size: 24,
60
+ node: [["rect", {
61
+ width: "18",
62
+ height: "18",
63
+ x: "3",
64
+ y: "3",
65
+ rx: "2",
66
+ key: "afitv7"
67
+ }], ["path", {
68
+ d: "M9 3v18",
69
+ key: "fh3hqa"
70
+ }]],
71
+ aliases: ["sidebar"]
72
+ }), le = B({
73
+ name: "star",
74
+ size: 24,
75
+ node: [["path", {
76
+ d: "M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",
77
+ key: "r04s7s"
78
+ }]]
79
+ }), ue = Symbol("templaticalMediaLimits"), X = Symbol("templaticalMediaPopoverTarget"), de = Symbol("templaticalMediaTranslations"), fe = Symbol("templaticalMediaUiTheme"), Z = Symbol("templaticalMediaUiLocale"), pe = { mediaLibrary: {
8
80
  title: "Media Library",
9
81
  searchPlaceholder: "Search files...",
10
82
  allFiles: "All Files",
@@ -97,38 +169,36 @@ var de = Symbol("templaticalMediaLimits"), J = Symbol("templaticalMediaPopoverTa
97
169
  deleteFolderConfirm: "Confirm delete",
98
170
  storageTooltip: "{used} of {total} used ({remaining} remaining)"
99
171
  } };
100
- //#endregion
101
- //#region ../media-library/src/composables/useI18n.ts
102
- function Z(e) {
103
- let t = e ?? n(fe, null), r = (a(t) ? t.value : t) ?? pe;
104
- function i(e, t) {
172
+ // ../media-library/src/composables/useI18n.ts
173
+ function Q(e) {
174
+ let n = e ?? t(de, null), r = (i(n) ? n.value : n) ?? pe;
175
+ function a(e, t) {
105
176
  return e.replace(/\{(\w+)\}/g, (e, n) => n in t ? String(t[n]) : `{${n}}`);
106
177
  }
107
178
  return {
108
179
  t: r,
109
- format: i
180
+ format: a
110
181
  };
111
182
  }
112
- //#endregion
113
- //#region ../media-library/src/composables/useMediaCategories.ts
183
+ // ../media-library/src/composables/useMediaCategories.ts
114
184
  var me = [
115
185
  "images",
116
186
  "documents",
117
187
  "videos",
118
188
  "audio"
119
189
  ];
120
- function Q(e) {
121
- let t = e ?? n(de, null);
122
- if (!t) throw Error("[Templatical] useMediaCategories() needs media limits in scope. Render it under <MediaLibraryModal> or provide MEDIA_LIMITS_KEY yourself.");
123
- let r = t, i = O(() => !0), a = O(() => r.maxFileSize ?? Infinity), o = O(() => {
190
+ function he(e) {
191
+ let n = e ?? t(ue, null);
192
+ if (!n) throw Error("[Templatical] useMediaCategories() needs media limits in scope. Render it under <MediaLibraryModal> or provide MEDIA_LIMITS_KEY yourself.");
193
+ let r = n, i = h(() => !0), a = h(() => r.maxFileSize ?? Infinity), o = h(() => {
124
194
  let e = r.accept;
125
195
  if (e && e.length > 0) return e;
126
196
  let t = r.mimeTypes;
127
197
  return t ? Object.keys(t) : me;
128
- }), s = O(() => {
198
+ }), s = h(() => {
129
199
  let e = r.mimeTypes;
130
200
  return e ? o.value.flatMap((t) => e[t] ?? []) : [];
131
- }), c = O(() => s.value.join(",")), l = O(() => r.mimeTypes !== void 0);
201
+ }), c = h(() => s.value.join(",")), l = h(() => r.mimeTypes !== void 0);
132
202
  function u(e, t) {
133
203
  let n = r.mimeTypes;
134
204
  return !n || (t && t.length > 0 ? t : Object.keys(n)).some((t) => n[t]?.includes(e) ?? !1);
@@ -159,10 +229,9 @@ function Q(e) {
159
229
  getCategoryForMimeType: p
160
230
  };
161
231
  }
162
- //#endregion
163
- //#region ../media-library/src/composables/useFocusTrap.ts
164
- var he = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
165
- function ge(e, t) {
232
+ // ../media-library/src/composables/useFocusTrap.ts
233
+ var ge = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
234
+ function _e(e, t) {
166
235
  let n = null, r = null, i = null;
167
236
  function a(e) {
168
237
  if (!e) return document;
@@ -170,7 +239,7 @@ function ge(e, t) {
170
239
  return t && "activeElement" in t ? t : document;
171
240
  }
172
241
  function o() {
173
- return e.value ? Array.from(e.value.querySelectorAll(he)).filter((e) => e.offsetParent !== null) : [];
242
+ return e.value ? Array.from(e.value.querySelectorAll(ge)).filter((e) => e.offsetParent !== null) : [];
174
243
  }
175
244
  function s(t) {
176
245
  if (t.key !== "Tab") return;
@@ -191,23 +260,22 @@ function ge(e, t) {
191
260
  let t = e.restoreFocus !== !1;
192
261
  i !== null && (typeof cancelAnimationFrame < "u" && cancelAnimationFrame(i), i = null), r?.(), r = null, t && n && n.focus && (n.focus(), n = null);
193
262
  }
194
- let d = u([t, e], ([e, t]) => {
263
+ let u = O([t, e], ([e, t]) => {
195
264
  e && t ? c() : l();
196
265
  }, { flush: "post" });
197
- f(() => {
198
- d(), l();
266
+ d(() => {
267
+ u(), l();
199
268
  });
200
269
  }
201
- //#endregion
202
- //#region ../media-library/src/components/media/MediaBreadcrumb.vue?vue&type=script&setup=true&lang.ts
203
- var _e = {
270
+ // ../media-library/src/components/media/MediaBreadcrumb.vue?vue&type=script&setup=true&lang.ts
271
+ var ve = {
204
272
  key: 0,
205
273
  class: "tpl:flex tpl:items-center tpl:gap-1 tpl:text-xs",
206
274
  style: { color: "var(--tpl-text-muted)" }
207
- }, ve = ["onClick"], ye = {
275
+ }, ye = ["onClick"], be = {
208
276
  key: 1,
209
277
  style: { color: "var(--tpl-text)" }
210
- }, be = /* @__PURE__ */ t({
278
+ }, xe = /* @__PURE__ */ D({
211
279
  __name: "MediaBreadcrumb",
212
280
  props: {
213
281
  folders: {},
@@ -215,39 +283,39 @@ var _e = {
215
283
  },
216
284
  emits: ["navigate"],
217
285
  setup(e, { emit: t }) {
218
- let n = e, r = t, { t: a } = Z(), s = O(() => {
286
+ let n = e, r = t, { t: i } = Q(), a = h(() => {
219
287
  if (!n.currentFolderId) return [];
220
288
  let e = [];
221
- return c(n.folders, n.currentFolderId, e), e;
289
+ return o(n.folders, n.currentFolderId, e), e;
222
290
  });
223
- function c(e, t, n) {
291
+ function o(e, t, n) {
224
292
  for (let r of e) {
225
293
  if (r.id === t) return n.push(r), !0;
226
- if (c(r.children, t, n)) return n.unshift(r), !0;
294
+ if (o(r.children, t, n)) return n.unshift(r), !0;
227
295
  }
228
296
  return !1;
229
297
  }
230
- return (e, t) => s.value.length > 0 ? (o(), p("div", _e, [w("button", {
298
+ return (e, t) => a.value.length > 0 ? (y(), _("div", ve, [x("button", {
231
299
  class: "tpl:transition-colors tpl:duration-150 tpl:hover:underline",
232
300
  style: { color: "var(--tpl-primary)" },
233
301
  onClick: t[0] ||= (e) => r("navigate", null)
234
- }, g(D(a).mediaLibrary.allFiles), 1), (o(!0), p(A, null, i(s.value, (e, t) => (o(), p(A, { key: e.id }, [M(D(te), {
302
+ }, c(w(i).mediaLibrary.allFiles), 1), (y(!0), _(S, null, s(a.value, (e, t) => (y(), _(S, { key: e.id }, [f(w(ee), {
235
303
  size: 12,
236
304
  "stroke-width": 2
237
- }), t < s.value.length - 1 ? (o(), p("button", {
305
+ }), t < a.value.length - 1 ? (y(), _("button", {
238
306
  key: 0,
239
307
  class: "tpl:transition-colors tpl:duration-150 tpl:hover:underline",
240
308
  style: { color: "var(--tpl-primary)" },
241
309
  onClick: (t) => r("navigate", e.id)
242
- }, g(e.name), 9, ve)) : (o(), p("span", ye, g(e.name), 1))], 64))), 128))])) : v("", !0);
310
+ }, c(e.name), 9, ye)) : (y(), _("span", be, c(e.name), 1))], 64))), 128))])) : g("", !0);
243
311
  }
244
- }), xe = ["aria-expanded", "aria-label"], Se = {
312
+ }), Se = ["aria-expanded", "aria-label"], Ce = {
245
313
  key: 1,
246
314
  class: "tpl:size-4 tpl:shrink-0"
247
- }, Ce = {
315
+ }, we = {
248
316
  key: 0,
249
317
  class: "tpl:truncate"
250
- }, we = ["onKeydown"], Te = ["title", "aria-label"], Ee = ["title", "aria-label"], De = ["title", "aria-label"], Oe = { key: 0 }, ke = ["placeholder", "onKeydown"], Ae = /* @__PURE__ */ t({
318
+ }, Te = ["onKeydown"], Ee = ["title", "aria-label"], De = ["title", "aria-label"], Oe = ["title", "aria-label"], ke = { key: 0 }, Ae = ["placeholder", "onKeydown"], je = /* @__PURE__ */ D({
251
319
  __name: "MediaFolderTreeNode",
252
320
  props: {
253
321
  folder: {},
@@ -263,76 +331,76 @@ var _e = {
263
331
  "renameFolder",
264
332
  "deleteFolder"
265
333
  ],
266
- setup(t, { emit: n }) {
267
- let r = t, a = n, { t: c } = Z(), l = e(!1), u = e(!1), f = e(""), m = e(!1), _ = e(""), b = e(!1), x = O(() => r.folder.children.length > 0), T = O(() => r.depth < 4), k = O(() => r.currentFolderId === r.folder.id), N = O(() => r.currentFolderId ? F(r.folder.children, r.currentFolderId) : !1), P = O(() => l.value || N.value);
334
+ setup(t, { emit: r }) {
335
+ let i = t, a = r, { t: l } = Q(), d = e(!1), p = e(!1), m = e(""), v = e(!1), C = e(""), E = e(!1), D = h(() => i.folder.children.length > 0), O = h(() => i.depth < 4), M = h(() => i.currentFolderId === i.folder.id), N = h(() => i.currentFolderId ? F(i.folder.children, i.currentFolderId) : !1), P = h(() => d.value || N.value);
268
336
  function F(e, t) {
269
337
  for (let n of e) if (n.id === t || F(n.children, t)) return !0;
270
338
  return !1;
271
339
  }
272
340
  function I() {
273
- l.value = !l.value;
341
+ d.value = !d.value;
274
342
  }
275
343
  function L() {
276
- u.value = !0, f.value = r.folder.name;
344
+ p.value = !0, m.value = i.folder.name;
277
345
  }
278
346
  function R() {
279
- let e = f.value.trim();
280
- e && e !== r.folder.name && a("renameFolder", r.folder.id, e), u.value = !1, f.value = "";
347
+ let e = m.value.trim();
348
+ e && e !== i.folder.name && a("renameFolder", i.folder.id, e), p.value = !1, m.value = "";
281
349
  }
282
350
  function z() {
283
- u.value = !1, f.value = "";
351
+ p.value = !1, m.value = "";
284
352
  }
285
353
  function B() {
286
- m.value = !0, _.value = "", l.value = !0;
354
+ v.value = !0, C.value = "", d.value = !0;
287
355
  }
288
- function ne() {
289
- _.value.trim() && a("createFolder", _.value.trim(), r.folder.id), m.value = !1, _.value = "";
356
+ function V() {
357
+ C.value.trim() && a("createFolder", C.value.trim(), i.folder.id), v.value = !1, C.value = "";
290
358
  }
291
- function re() {
292
- m.value = !1, _.value = "";
359
+ function te() {
360
+ v.value = !1, C.value = "";
293
361
  }
294
- function ie() {
295
- b.value ? (a("deleteFolder", r.folder.id), b.value = !1) : b.value = !0;
362
+ function ne() {
363
+ E.value ? (a("deleteFolder", i.folder.id), E.value = !1) : E.value = !0;
296
364
  }
297
- function H(e) {
365
+ function re(e) {
298
366
  let t = e.relatedTarget;
299
- t && e.currentTarget.contains(t) || (b.value = !1);
367
+ t && e.currentTarget.contains(t) || (E.value = !1);
300
368
  }
301
- return (e, n) => {
302
- let r = s("MediaFolderTreeNode", !0);
303
- return o(), p("div", null, [w("div", {
369
+ return (e, r) => {
370
+ let i = n("MediaFolderTreeNode", !0);
371
+ return y(), _("div", null, [x("div", {
304
372
  class: "tpl:group tpl:flex tpl:w-full tpl:items-center tpl:gap-1 tpl:py-1.5 tpl:pr-2 tpl:text-left tpl:text-xs tpl:transition-all tpl:duration-150",
305
- style: j({
373
+ style: o({
306
374
  paddingLeft: `${t.depth * 16 + 8}px`,
307
- backgroundColor: k.value ? "var(--tpl-bg-active)" : "transparent",
308
- color: k.value ? "var(--tpl-primary)" : "var(--tpl-text)"
375
+ backgroundColor: M.value ? "var(--tpl-bg-active)" : "transparent",
376
+ color: M.value ? "var(--tpl-primary)" : "var(--tpl-text)"
309
377
  }),
310
- onFocusout: H
378
+ onFocusout: re
311
379
  }, [
312
- x.value || m.value ? (o(), p("button", {
380
+ D.value || v.value ? (y(), _("button", {
313
381
  key: 0,
314
382
  type: "button",
315
383
  class: "tpl:flex tpl:size-4 tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
316
384
  "aria-expanded": P.value,
317
- "aria-label": P.value ? D(c).mediaLibrary.collapseFolder : D(c).mediaLibrary.expandFolder,
318
- onClick: S(I, ["stop"])
319
- }, [M(D(te), {
320
- class: C(["tpl:transition-transform tpl:duration-150", { "tpl:rotate-90": P.value }]),
385
+ "aria-label": P.value ? w(l).mediaLibrary.collapseFolder : w(l).mediaLibrary.expandFolder,
386
+ onClick: A(I, ["stop"])
387
+ }, [f(w(ee), {
388
+ class: b(["tpl:transition-transform tpl:duration-150", { "tpl:rotate-90": P.value }]),
321
389
  size: 10,
322
390
  "stroke-width": 2
323
- }, null, 8, ["class"])], 8, xe)) : (o(), p("span", Se)),
324
- w("button", {
391
+ }, null, 8, ["class"])], 8, Se)) : (y(), _("span", Ce)),
392
+ x("button", {
325
393
  type: "button",
326
394
  class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:items-center tpl:gap-1.5",
327
- onClick: n[0] ||= (e) => a("navigate", t.folder.id)
328
- }, [M(D(U), {
395
+ onClick: r[0] ||= (e) => a("navigate", t.folder.id)
396
+ }, [f(w(J), {
329
397
  class: "tpl:shrink-0",
330
398
  size: 14,
331
399
  "stroke-width": 1.5
332
- }), u.value ? v("", !0) : (o(), p("span", Ce, g(t.folder.name), 1))]),
333
- u.value ? d((o(), p("input", {
400
+ }), p.value ? g("", !0) : (y(), _("span", we, c(t.folder.name), 1))]),
401
+ p.value ? u((y(), _("input", {
334
402
  key: 2,
335
- "onUpdate:modelValue": n[1] ||= (e) => f.value = e,
403
+ "onUpdate:modelValue": r[1] ||= (e) => m.value = e,
336
404
  type: "text",
337
405
  class: "tpl:min-w-0 tpl:flex-1 tpl:rounded tpl:border tpl:px-1.5 tpl:py-0.5 tpl:text-xs tpl:outline-none",
338
406
  style: {
@@ -341,51 +409,51 @@ var _e = {
341
409
  color: "var(--tpl-text)"
342
410
  },
343
411
  autofocus: "",
344
- onKeydown: [h(R, ["enter"]), h(S(z, ["stop"]), ["escape"])],
412
+ onKeydown: [j(R, ["enter"]), j(A(z, ["stop"]), ["escape"])],
345
413
  onBlur: R,
346
- onClick: n[2] ||= S(() => {}, ["stop"])
347
- }, null, 40, we)), [[E, f.value]]) : v("", !0),
348
- u.value ? v("", !0) : (o(), p("span", {
414
+ onClick: r[2] ||= A(() => {}, ["stop"])
415
+ }, null, 40, Te)), [[k, m.value]]) : g("", !0),
416
+ p.value ? g("", !0) : (y(), _("span", {
349
417
  key: 3,
350
- class: C(["tpl:flex tpl:shrink-0 tpl:items-center tpl:gap-0.5 tpl:transition-opacity", k.value || b.value ? "tpl:opacity-100" : "tpl:opacity-0 tpl:group-hover:opacity-100 tpl:group-focus-within:opacity-100"])
418
+ class: b(["tpl:flex tpl:shrink-0 tpl:items-center tpl:gap-0.5 tpl:transition-opacity", M.value || E.value ? "tpl:opacity-100" : "tpl:opacity-0 tpl:group-hover:opacity-100 tpl:group-focus-within:opacity-100"])
351
419
  }, [
352
- T.value && t.canCreateFolder ? (o(), p("button", {
420
+ O.value && t.canCreateFolder ? (y(), _("button", {
353
421
  key: 0,
354
422
  type: "button",
355
423
  class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
356
- title: D(c).mediaLibrary.addSubfolder,
357
- "aria-label": D(c).mediaLibrary.addSubfolder,
358
- onClick: S(B, ["stop"])
359
- }, [M(D(ee), {
424
+ title: w(l).mediaLibrary.addSubfolder,
425
+ "aria-label": w(l).mediaLibrary.addSubfolder,
426
+ onClick: A(B, ["stop"])
427
+ }, [f(w(W), {
360
428
  size: 12,
361
429
  "stroke-width": 2
362
- })], 8, Te)) : v("", !0),
363
- t.canRenameFolder ? (o(), p("button", {
430
+ })], 8, Ee)) : g("", !0),
431
+ t.canRenameFolder ? (y(), _("button", {
364
432
  key: 1,
365
433
  type: "button",
366
434
  class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
367
- title: D(c).mediaLibrary.renameFolder,
368
- "aria-label": D(c).mediaLibrary.renameFolder,
369
- onClick: S(L, ["stop"])
370
- }, [M(D(V), {
435
+ title: w(l).mediaLibrary.renameFolder,
436
+ "aria-label": w(l).mediaLibrary.renameFolder,
437
+ onClick: A(L, ["stop"])
438
+ }, [f(w(U), {
371
439
  size: 12,
372
440
  "stroke-width": 2
373
- })], 8, Ee)) : v("", !0),
374
- t.canDeleteFolder ? (o(), p("button", {
441
+ })], 8, De)) : g("", !0),
442
+ t.canDeleteFolder ? (y(), _("button", {
375
443
  key: 2,
376
444
  type: "button",
377
445
  "data-testid": "media-folder-delete",
378
446
  class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
379
- title: b.value ? D(c).mediaLibrary.deleteFolderConfirm : D(c).mediaLibrary.deleteFolder,
380
- "aria-label": b.value ? D(c).mediaLibrary.deleteFolderConfirm : D(c).mediaLibrary.deleteFolder,
381
- onClick: S(ie, ["stop"])
382
- }, [M(D(W), {
447
+ title: E.value ? w(l).mediaLibrary.deleteFolderConfirm : w(l).mediaLibrary.deleteFolder,
448
+ "aria-label": E.value ? w(l).mediaLibrary.deleteFolderConfirm : w(l).mediaLibrary.deleteFolder,
449
+ onClick: A(ne, ["stop"])
450
+ }, [f(w(oe), {
383
451
  size: 12,
384
452
  "stroke-width": 2,
385
453
  style: { color: "var(--tpl-danger)" }
386
- })], 8, De)) : v("", !0)
454
+ })], 8, Oe)) : g("", !0)
387
455
  ], 2))
388
- ], 36), P.value ? (o(), p("div", Oe, [(o(!0), p(A, null, i(t.folder.children, (e) => (o(), y(r, {
456
+ ], 36), P.value ? (y(), _("div", ke, [(y(!0), _(S, null, s(t.folder.children, (e) => (y(), T(i, {
389
457
  key: e.id,
390
458
  folder: e,
391
459
  "current-folder-id": t.currentFolderId,
@@ -393,10 +461,10 @@ var _e = {
393
461
  "can-create-folder": t.canCreateFolder,
394
462
  "can-rename-folder": t.canRenameFolder,
395
463
  "can-delete-folder": t.canDeleteFolder,
396
- onNavigate: n[3] ||= (e) => a("navigate", e),
397
- onCreateFolder: n[4] ||= (e, t) => a("createFolder", e, t),
398
- onRenameFolder: n[5] ||= (e, t) => a("renameFolder", e, t),
399
- onDeleteFolder: n[6] ||= (e) => a("deleteFolder", e)
464
+ onNavigate: r[3] ||= (e) => a("navigate", e),
465
+ onCreateFolder: r[4] ||= (e, t) => a("createFolder", e, t),
466
+ onRenameFolder: r[5] ||= (e, t) => a("renameFolder", e, t),
467
+ onDeleteFolder: r[6] ||= (e) => a("deleteFolder", e)
400
468
  }, null, 8, [
401
469
  "folder",
402
470
  "current-folder-id",
@@ -404,12 +472,12 @@ var _e = {
404
472
  "can-create-folder",
405
473
  "can-rename-folder",
406
474
  "can-delete-folder"
407
- ]))), 128)), m.value ? (o(), p("div", {
475
+ ]))), 128)), v.value ? (y(), _("div", {
408
476
  key: 0,
409
- style: j({ paddingLeft: `${(t.depth + 1) * 16 + 8}px` }),
477
+ style: o({ paddingLeft: `${(t.depth + 1) * 16 + 8}px` }),
410
478
  class: "tpl:py-1.5 tpl:pr-2"
411
- }, [d(w("input", {
412
- "onUpdate:modelValue": n[7] ||= (e) => _.value = e,
479
+ }, [u(x("input", {
480
+ "onUpdate:modelValue": r[7] ||= (e) => C.value = e,
413
481
  type: "text",
414
482
  class: "tpl:w-full tpl:rounded tpl:border tpl:px-2 tpl:py-1 tpl:text-xs tpl:outline-none",
415
483
  style: {
@@ -417,20 +485,20 @@ var _e = {
417
485
  "background-color": "var(--tpl-bg)",
418
486
  color: "var(--tpl-text)"
419
487
  },
420
- placeholder: D(c).mediaLibrary.subfolderName,
488
+ placeholder: w(l).mediaLibrary.subfolderName,
421
489
  autofocus: "",
422
- onKeydown: [h(ne, ["enter"]), h(S(re, ["stop"]), ["escape"])],
423
- onBlur: ne
424
- }, null, 40, ke), [[E, _.value]])], 4)) : v("", !0)])) : v("", !0)]);
490
+ onKeydown: [j(V, ["enter"]), j(A(te, ["stop"]), ["escape"])],
491
+ onBlur: V
492
+ }, null, 40, Ae), [[k, C.value]])], 4)) : g("", !0)])) : g("", !0)]);
425
493
  };
426
494
  }
427
- }), je = {
495
+ }), Me = {
428
496
  "data-testid": "media-folder-tree",
429
497
  class: "tpl:flex tpl:h-full tpl:flex-col tpl:overflow-y-auto"
430
- }, Me = {
498
+ }, Ne = {
431
499
  key: 0,
432
500
  class: "tpl:px-3 tpl:py-2"
433
- }, Ne = ["placeholder", "onKeydown"], Pe = /* @__PURE__ */ t({
501
+ }, Pe = ["placeholder", "onKeydown"], Fe = /* @__PURE__ */ D({
434
502
  __name: "MediaFolderTree",
435
503
  props: {
436
504
  folders: {},
@@ -449,29 +517,29 @@ var _e = {
449
517
  "showFrequentlyUsed"
450
518
  ],
451
519
  setup(t, { emit: n }) {
452
- let r = n, { t: a } = Z(), s = e(!1), c = e("");
453
- function l() {
454
- s.value = !0, c.value = "";
520
+ let r = n, { t: i } = Q(), a = e(!1), l = e("");
521
+ function d() {
522
+ a.value = !0, l.value = "";
455
523
  }
456
- function u() {
457
- c.value.trim() && r("createFolder", c.value.trim()), s.value = !1, c.value = "";
524
+ function p() {
525
+ l.value.trim() && r("createFolder", l.value.trim()), a.value = !1, l.value = "";
458
526
  }
459
- function f() {
460
- s.value = !1, c.value = "";
527
+ function m() {
528
+ a.value = !1, l.value = "";
461
529
  }
462
- return (e, n) => (o(), p("div", je, [
463
- w("button", {
530
+ return (e, n) => (y(), _("div", Me, [
531
+ x("button", {
464
532
  class: "tpl:flex tpl:w-full tpl:items-center tpl:gap-2 tpl:px-3 tpl:py-2 tpl:text-left tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
465
- style: j({
533
+ style: o({
466
534
  backgroundColor: t.viewMode === "files" && t.currentFolderId === null ? "var(--tpl-bg-active)" : "transparent",
467
535
  color: t.viewMode === "files" && t.currentFolderId === null ? "var(--tpl-primary)" : "var(--tpl-text)"
468
536
  }),
469
537
  onClick: n[0] ||= (e) => r("navigate", null)
470
- }, [M(D(B), {
538
+ }, [f(w(q), {
471
539
  size: 14,
472
540
  "stroke-width": 1.5
473
- }), m(" " + g(D(a).mediaLibrary.allFiles), 1)], 4),
474
- (o(!0), p(A, null, i(t.folders, (e) => (o(), y(Ae, {
541
+ }), v(" " + c(w(i).mediaLibrary.allFiles), 1)], 4),
542
+ (y(!0), _(S, null, s(t.folders, (e) => (y(), T(je, {
475
543
  key: e.id,
476
544
  folder: e,
477
545
  "current-folder-id": t.currentFolderId,
@@ -490,8 +558,8 @@ var _e = {
490
558
  "can-rename-folder",
491
559
  "can-delete-folder"
492
560
  ]))), 128)),
493
- s.value ? (o(), p("div", Me, [d(w("input", {
494
- "onUpdate:modelValue": n[5] ||= (e) => c.value = e,
561
+ a.value ? (y(), _("div", Ne, [u(x("input", {
562
+ "onUpdate:modelValue": n[5] ||= (e) => l.value = e,
495
563
  type: "text",
496
564
  class: "tpl:w-full tpl:rounded tpl:border tpl:px-2 tpl:py-1 tpl:text-xs tpl:outline-none",
497
565
  style: {
@@ -499,38 +567,38 @@ var _e = {
499
567
  "background-color": "var(--tpl-bg)",
500
568
  color: "var(--tpl-text)"
501
569
  },
502
- placeholder: D(a).mediaLibrary.folderName,
570
+ placeholder: w(i).mediaLibrary.folderName,
503
571
  autofocus: "",
504
- onKeydown: [h(u, ["enter"]), h(S(f, ["stop"]), ["escape"])],
505
- onBlur: u
506
- }, null, 40, Ne), [[E, c.value]])])) : v("", !0),
507
- !s.value && t.canCreateFolder ? (o(), p("button", {
572
+ onKeydown: [j(p, ["enter"]), j(A(m, ["stop"]), ["escape"])],
573
+ onBlur: p
574
+ }, null, 40, Pe), [[k, l.value]])])) : g("", !0),
575
+ !a.value && t.canCreateFolder ? (y(), _("button", {
508
576
  key: 1,
509
577
  class: "tpl:flex tpl:w-full tpl:items-center tpl:gap-2 tpl:px-3 tpl:py-2 tpl:text-left tpl:text-xs tpl:transition-all tpl:duration-150",
510
578
  style: { color: "var(--tpl-text-muted)" },
511
- onClick: l
512
- }, [M(D(ee), {
579
+ onClick: d
580
+ }, [f(w(W), {
513
581
  size: 14,
514
582
  "stroke-width": 1.5
515
- }), m(" " + g(D(a).mediaLibrary.newFolder), 1)])) : v("", !0),
516
- n[7] ||= w("div", { class: "tpl:flex-1" }, null, -1),
517
- t.hasFrequentlyUsed ? (o(), p("button", {
583
+ }), v(" " + c(w(i).mediaLibrary.newFolder), 1)])) : g("", !0),
584
+ n[7] ||= x("div", { class: "tpl:flex-1" }, null, -1),
585
+ t.hasFrequentlyUsed ? (y(), _("button", {
518
586
  key: 2,
519
587
  "data-testid": "media-frequently-used",
520
588
  class: "tpl:flex tpl:w-full tpl:items-center tpl:gap-2 tpl:border-t tpl:px-3 tpl:py-2 tpl:text-left tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
521
- style: j({
589
+ style: o({
522
590
  borderColor: "var(--tpl-border)",
523
591
  backgroundColor: t.viewMode === "frequently-used" ? "var(--tpl-bg-active)" : "transparent",
524
592
  color: t.viewMode === "frequently-used" ? "var(--tpl-primary)" : "var(--tpl-text)"
525
593
  }),
526
594
  onClick: n[6] ||= (e) => r("showFrequentlyUsed")
527
- }, [M(D(ce), {
595
+ }, [f(w(le), {
528
596
  size: 14,
529
597
  "stroke-width": 1.5
530
- }), m(" " + g(D(a).mediaLibrary.frequentlyUsed), 1)], 4)) : v("", !0)
598
+ }), v(" " + c(w(i).mediaLibrary.frequentlyUsed), 1)], 4)) : g("", !0)
531
599
  ]));
532
600
  }
533
- }), Fe = /* @__PURE__ */ t({
601
+ }), Ie = /* @__PURE__ */ D({
534
602
  __name: "MediaFileIcon",
535
603
  props: { mimeType: {} },
536
604
  setup(e) {
@@ -630,11 +698,11 @@ var _e = {
630
698
  color: "var(--tpl-text-muted)",
631
699
  bgColor: "var(--tpl-bg-hover)",
632
700
  icon: "document"
633
- }, i = O(() => n[t.mimeType] ?? r);
634
- return (e, t) => (o(), p("div", {
701
+ }, i = h(() => n[t.mimeType] ?? r);
702
+ return (e, t) => (y(), _("div", {
635
703
  class: "tpl:flex tpl:aspect-square tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2",
636
- style: j({ backgroundColor: i.value.bgColor })
637
- }, [i.value.icon === "document" ? (o(), p("svg", {
704
+ style: o({ backgroundColor: i.value.bgColor })
705
+ }, [i.value.icon === "document" ? (y(), _("svg", {
638
706
  key: 0,
639
707
  width: "60",
640
708
  height: "60",
@@ -642,23 +710,23 @@ var _e = {
642
710
  fill: "none",
643
711
  stroke: "currentColor",
644
712
  "stroke-width": "1.5",
645
- style: j({ color: i.value.color })
713
+ style: o({ color: i.value.color })
646
714
  }, [...t[0] ||= [
647
- w("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }, null, -1),
648
- w("polyline", { points: "14 2 14 8 20 8" }, null, -1),
649
- w("line", {
715
+ x("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }, null, -1),
716
+ x("polyline", { points: "14 2 14 8 20 8" }, null, -1),
717
+ x("line", {
650
718
  x1: "8",
651
719
  y1: "13",
652
720
  x2: "16",
653
721
  y2: "13"
654
722
  }, null, -1),
655
- w("line", {
723
+ x("line", {
656
724
  x1: "8",
657
725
  y1: "17",
658
726
  x2: "12",
659
727
  y2: "17"
660
728
  }, null, -1)
661
- ]], 4)) : i.value.icon === "video" ? (o(), p("svg", {
729
+ ]], 4)) : i.value.icon === "video" ? (y(), _("svg", {
662
730
  key: 1,
663
731
  width: "40",
664
732
  height: "40",
@@ -666,18 +734,18 @@ var _e = {
666
734
  fill: "none",
667
735
  stroke: "currentColor",
668
736
  "stroke-width": "1.5",
669
- style: j({ color: i.value.color })
670
- }, [...t[1] ||= [w("rect", {
737
+ style: o({ color: i.value.color })
738
+ }, [...t[1] ||= [x("rect", {
671
739
  x: "2",
672
740
  y: "4",
673
741
  width: "20",
674
742
  height: "16",
675
743
  rx: "2"
676
- }, null, -1), w("polygon", {
744
+ }, null, -1), x("polygon", {
677
745
  points: "10,8 16,12 10,16",
678
746
  fill: "currentColor",
679
747
  stroke: "none"
680
- }, null, -1)]], 4)) : (o(), p("svg", {
748
+ }, null, -1)]], 4)) : (y(), _("svg", {
681
749
  key: 2,
682
750
  width: "40",
683
751
  height: "40",
@@ -685,28 +753,27 @@ var _e = {
685
753
  fill: "none",
686
754
  stroke: "currentColor",
687
755
  "stroke-width": "1.5",
688
- style: j({ color: i.value.color })
756
+ style: o({ color: i.value.color })
689
757
  }, [...t[2] ||= [
690
- w("path", { d: "M9 18V5l12-2v13" }, null, -1),
691
- w("circle", {
758
+ x("path", { d: "M9 18V5l12-2v13" }, null, -1),
759
+ x("circle", {
692
760
  cx: "6",
693
761
  cy: "18",
694
762
  r: "3"
695
763
  }, null, -1),
696
- w("circle", {
764
+ x("circle", {
697
765
  cx: "18",
698
766
  cy: "16",
699
767
  r: "3"
700
768
  }, null, -1)
701
- ]], 4)), w("span", {
769
+ ]], 4)), x("span", {
702
770
  class: "tpl:text-xs tpl:font-bold tpl:tracking-wider",
703
- style: j({ color: i.value.color })
704
- }, g(i.value.label), 5)], 4));
771
+ style: o({ color: i.value.color })
772
+ }, c(i.value.label), 5)], 4));
705
773
  }
706
774
  });
707
- //#endregion
708
- //#region ../media-library/src/utils/formatAbsoluteDate.ts
709
- function Ie(e, t, n) {
775
+ // ../media-library/src/utils/formatAbsoluteDate.ts
776
+ function Le(e, t, n) {
710
777
  let r = new Date(e);
711
778
  if (Number.isNaN(r.getTime())) return "";
712
779
  let i = t?.trim().replace(/_/g, "-") || void 0;
@@ -716,9 +783,8 @@ function Ie(e, t, n) {
716
783
  return r.toLocaleDateString(void 0, n);
717
784
  }
718
785
  }
719
- //#endregion
720
- //#region ../media-library/src/utils/formatFileSize.ts
721
- var Le = [
786
+ // ../media-library/src/utils/formatFileSize.ts
787
+ var Re = [
722
788
  "B",
723
789
  "KB",
724
790
  "MB",
@@ -726,39 +792,38 @@ var Le = [
726
792
  ];
727
793
  function $(e) {
728
794
  let t = e, n = 0;
729
- for (; t >= 1024 && n < Le.length - 1;) t /= 1024, n += 1;
730
- return `${Math.round(t * 10) / 10} ${Le[n]}`;
795
+ for (; t >= 1024 && n < Re.length - 1;) t /= 1024, n += 1;
796
+ return `${Math.round(t * 10) / 10} ${Re[n]}`;
731
797
  }
732
- //#endregion
733
- //#region ../media-library/src/components/media/MediaGrid.vue?vue&type=script&setup=true&lang.ts
734
- var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
798
+ // ../media-library/src/components/media/MediaGrid.vue?vue&type=script&setup=true&lang.ts
799
+ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
735
800
  key: 1,
736
801
  class: "tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:py-16"
737
- }, Ve = {
802
+ }, He = {
738
803
  class: "tpl:text-xs",
739
804
  style: { color: "var(--tpl-text-muted)" }
740
- }, He = ["aria-label"], Ue = [
805
+ }, Ue = ["aria-label"], We = [
741
806
  "data-media-id",
742
807
  "aria-selected",
743
808
  "aria-label",
744
809
  "onClick",
745
810
  "onDblclick",
746
811
  "onKeydown"
747
- ], We = { class: "tpl:aspect-square" }, Ge = ["src", "alt"], Ke = { class: "tpl:px-2 tpl:py-1.5" }, qe = {
812
+ ], Ge = { class: "tpl:aspect-square" }, Ke = ["src", "alt"], qe = { class: "tpl:px-2 tpl:py-1.5" }, Je = {
748
813
  class: "tpl:truncate tpl:text-[10px] tpl:font-medium",
749
814
  style: { color: "var(--tpl-text)" }
750
- }, Je = {
815
+ }, Ye = {
751
816
  class: "tpl:flex tpl:justify-between tpl:text-[10px]",
752
817
  style: { color: "var(--tpl-text-muted)" }
753
- }, Ye = { key: 0 }, Xe = { key: 1 }, Ze = [
818
+ }, Xe = { key: 0 }, Ze = { key: 1 }, Qe = [
754
819
  "title",
755
820
  "aria-label",
756
821
  "onClick"
757
- ], Qe = [
822
+ ], $e = [
758
823
  "title",
759
824
  "aria-label",
760
825
  "onClick"
761
- ], $e = {
826
+ ], et = {
762
827
  key: 0,
763
828
  "aria-hidden": "true",
764
829
  class: "tpl:absolute tpl:top-1.5 tpl:right-1.5 tpl:flex tpl:size-5 tpl:items-center tpl:justify-center tpl:rounded-full",
@@ -766,34 +831,34 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
766
831
  "background-color": "var(--tpl-primary)",
767
832
  color: "var(--tpl-on-primary)"
768
833
  }
769
- }, et = ["aria-label"], tt = [
834
+ }, tt = ["aria-label"], nt = [
770
835
  "data-media-id",
771
836
  "aria-selected",
772
837
  "aria-label",
773
838
  "onClick",
774
839
  "onDblclick",
775
840
  "onKeydown"
776
- ], nt = {
841
+ ], rt = {
777
842
  class: "tpl:size-10 tpl:shrink-0 tpl:overflow-hidden tpl:rounded",
778
843
  style: { "background-color": "var(--tpl-bg-hover)" }
779
- }, rt = ["src", "alt"], it = {
844
+ }, it = ["src", "alt"], at = {
780
845
  key: 1,
781
846
  class: "tpl-list-icon tpl:size-full"
782
- }, at = { class: "tpl:min-w-0 tpl:flex-1" }, ot = {
847
+ }, ot = { class: "tpl:min-w-0 tpl:flex-1" }, st = {
783
848
  class: "tpl:truncate tpl:text-xs tpl:font-medium",
784
849
  style: { color: "var(--tpl-text)" }
785
- }, st = {
850
+ }, ct = {
786
851
  class: "tpl:text-[10px]",
787
852
  style: { color: "var(--tpl-text-muted)" }
788
- }, ct = [
853
+ }, lt = [
789
854
  "title",
790
855
  "aria-label",
791
856
  "onClick"
792
- ], lt = [
857
+ ], ut = [
793
858
  "title",
794
859
  "aria-label",
795
860
  "onClick"
796
- ], ut = {
861
+ ], dt = {
797
862
  key: 0,
798
863
  "aria-hidden": "true",
799
864
  class: "tpl:flex tpl:size-5 tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded-full",
@@ -801,10 +866,10 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
801
866
  "background-color": "var(--tpl-primary)",
802
867
  color: "var(--tpl-on-primary)"
803
868
  }
804
- }, dt = {
869
+ }, ft = {
805
870
  key: 4,
806
871
  class: "tpl:flex tpl:justify-center tpl:py-4"
807
- }, ft = /*#__PURE__*/ q(/* @__PURE__ */ t({
872
+ }, pt = /*#__PURE__*/ K(/* @__PURE__ */ D({
808
873
  __name: "MediaGrid",
809
874
  props: {
810
875
  items: {},
@@ -825,166 +890,166 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
825
890
  "replace",
826
891
  "confirm"
827
892
  ],
828
- setup(t, { emit: r }) {
829
- let a = t, s = r, { isAcceptedMimeType: c, isImageMimeType: l } = Q();
830
- function u(e) {
893
+ setup(n, { emit: r }) {
894
+ let i = n, a = r, { isAcceptedMimeType: l, isImageMimeType: u } = he();
895
+ function d(e) {
831
896
  return e.mimeType ?? "";
832
897
  }
833
- function d(e) {
898
+ function p(e) {
834
899
  return e.thumbnailUrl ?? e.url;
835
900
  }
836
- function f(e) {
837
- return !a.accept || a.accept.length === 0 || c(u(e), a.accept);
901
+ function m(e) {
902
+ return !i.accept || i.accept.length === 0 || l(d(e), i.accept);
838
903
  }
839
904
  function h(e) {
840
- return a.canUpdate === !0 && e.canUpdate !== !1;
905
+ return i.canUpdate === !0 && e.canUpdate !== !1;
841
906
  }
842
- function _(e) {
843
- return a.canReplace === !0 && e.canUpdate !== !1;
907
+ function C(e) {
908
+ return i.canReplace === !0 && e.canUpdate !== !1;
844
909
  }
845
- function b(e, t) {
846
- t.metaKey || t.ctrlKey ? s("toggle", e.id) : s("select", e);
910
+ function E(e, t) {
911
+ t.metaKey || t.ctrlKey ? a("toggle", e.id) : a("select", e);
847
912
  }
848
- function x(e) {
849
- f(e) && s("confirm", e);
913
+ function D(e) {
914
+ m(e) && a("confirm", e);
850
915
  }
851
- function T(e, t) {
852
- (t.key === "Enter" || t.key === " ") && (t.preventDefault(), t.stopPropagation(), s("select", e));
916
+ function O(e, t) {
917
+ (t.key === "Enter" || t.key === " ") && (t.preventDefault(), t.stopPropagation(), a("select", e));
853
918
  }
854
- function E(e) {
855
- return a.selectedIds.has(e.id);
919
+ function k(e) {
920
+ return i.selectedIds.has(e.id);
856
921
  }
857
- function O(e) {
858
- return E(e) ? "tpl:opacity-100" : "tpl:opacity-0 tpl:group-hover:opacity-100 tpl:group-focus-within:opacity-100";
922
+ function j(e) {
923
+ return k(e) ? "tpl:opacity-100" : "tpl:opacity-0 tpl:group-hover:opacity-100 tpl:group-focus-within:opacity-100";
859
924
  }
860
- let { t: k } = Z(), N = n(X, null), P = e(null);
925
+ let { t: M } = Q(), N = t(Z, null), P = e(null);
861
926
  R(P, ([{ isIntersecting: e }]) => {
862
- e && a.hasMore && !a.isLoading && s("loadMore");
927
+ e && i.hasMore && !i.isLoading && a("loadMore");
863
928
  }, { threshold: .1 });
864
929
  function F(e) {
865
- return Ie(e, N?.value, {
930
+ return Le(e, N?.value, {
866
931
  year: "numeric",
867
932
  month: "short",
868
933
  day: "numeric"
869
934
  });
870
935
  }
871
- return (e, n) => (o(), p("div", Re, [
872
- t.isLoading && t.items.length === 0 ? (o(), p("div", {
936
+ return (e, t) => (y(), _("div", ze, [
937
+ n.isLoading && n.items.length === 0 ? (y(), _("div", {
873
938
  key: 0,
874
939
  role: "status",
875
940
  "aria-busy": "true",
876
- "aria-label": D(k).mediaLibrary.loading,
877
- class: C(t.layout === "list" ? "tpl:flex tpl:flex-col tpl:gap-1" : "tpl:grid tpl:grid-cols-4 tpl:gap-3")
878
- }, [(o(), p(A, null, i(8, (e) => w("div", {
941
+ "aria-label": w(M).mediaLibrary.loading,
942
+ class: b(n.layout === "list" ? "tpl:flex tpl:flex-col tpl:gap-1" : "tpl:grid tpl:grid-cols-4 tpl:gap-3")
943
+ }, [(y(), _(S, null, s(8, (e) => x("div", {
879
944
  key: e,
880
- class: C(["tpl-pulse tpl:rounded-lg", t.layout === "list" ? "tpl:h-12" : "tpl:aspect-square"]),
945
+ class: b(["tpl-pulse tpl:rounded-lg", n.layout === "list" ? "tpl:h-12" : "tpl:aspect-square"]),
881
946
  style: { "background-color": "var(--tpl-bg-hover)" },
882
947
  "aria-hidden": "true"
883
- }, null, 2)), 64))], 10, ze)) : t.items.length === 0 ? (o(), p("div", Be, [M(D(B), {
948
+ }, null, 2)), 64))], 10, Be)) : n.items.length === 0 ? (y(), _("div", Ve, [f(w(q), {
884
949
  class: "tpl:mb-3",
885
950
  size: 40,
886
951
  "stroke-width": 1,
887
952
  style: { color: "var(--tpl-text-dim)" }
888
- }), w("p", Ve, g(t.searchQuery ? D(k).mediaLibrary.noSearchResults : D(k).mediaLibrary.noFiles), 1)])) : t.layout === "list" ? (o(), p("div", {
953
+ }), x("p", He, c(n.searchQuery ? w(M).mediaLibrary.noSearchResults : w(M).mediaLibrary.noFiles), 1)])) : n.layout === "list" ? (y(), _("div", {
889
954
  key: 3,
890
955
  role: "listbox",
891
- "aria-label": D(k).mediaLibrary.filesListAriaLabel,
956
+ "aria-label": w(M).mediaLibrary.filesListAriaLabel,
892
957
  "aria-multiselectable": "true",
893
958
  class: "tpl:flex tpl:flex-col tpl:gap-1"
894
- }, [(o(!0), p(A, null, i(t.items, (e) => (o(), p("div", {
959
+ }, [(y(!0), _(S, null, s(n.items, (e) => (y(), _("div", {
895
960
  key: e.id,
896
961
  role: "option",
897
962
  tabindex: "0",
898
963
  "data-testid": "media-library-item",
899
- class: C(["tpl-media-list-item tpl:group tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-3 tpl:rounded-lg tpl:px-3 tpl:py-2 tpl:transition-all tpl:duration-150", [!f(e) && !E(e) ? "tpl:opacity-60" : ""]]),
964
+ class: b(["tpl-media-list-item tpl:group tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-3 tpl:rounded-lg tpl:px-3 tpl:py-2 tpl:transition-all tpl:duration-150", [!m(e) && !k(e) ? "tpl:opacity-60" : ""]]),
900
965
  "data-media-id": e.id,
901
- "aria-selected": E(e),
966
+ "aria-selected": k(e),
902
967
  "aria-label": e.filename || e.url,
903
- style: j({ backgroundColor: E(e) ? "var(--tpl-bg-hover)" : "transparent" }),
904
- onClick: (t) => b(e, t),
905
- onDblclick: (t) => x(e),
906
- onKeydown: (t) => T(e, t)
968
+ style: o({ backgroundColor: k(e) ? "var(--tpl-bg-hover)" : "transparent" }),
969
+ onClick: (t) => E(e, t),
970
+ onDblclick: (t) => D(e),
971
+ onKeydown: (t) => O(e, t)
907
972
  }, [
908
- w("div", nt, [D(l)(u(e)) ? (o(), p("img", {
973
+ x("div", rt, [w(u)(d(e)) ? (y(), _("img", {
909
974
  key: 0,
910
- src: d(e),
975
+ src: p(e),
911
976
  alt: e.filename || e.url,
912
977
  class: "tpl:size-full tpl:object-cover",
913
978
  loading: "lazy"
914
- }, null, 8, rt)) : (o(), p("div", it, [M(Fe, { "mime-type": u(e) }, null, 8, ["mime-type"])]))]),
915
- w("div", at, [w("p", ot, g(e.filename || e.url), 1), w("p", st, [
916
- e.size == null ? v("", !0) : (o(), p(A, { key: 0 }, [m(g(D($)(e.size)), 1)], 64)),
917
- e.createdAt ? (o(), p(A, { key: 1 }, [e.size == null ? v("", !0) : (o(), p(A, { key: 0 }, [m(" · ")], 64)), m(" " + g(F(e.createdAt)), 1)], 64)) : v("", !0),
918
- D(l)(u(e)) && e.width && e.height ? (o(), p(A, { key: 2 }, [m(" · " + g(e.width) + "×" + g(e.height), 1)], 64)) : v("", !0)
979
+ }, null, 8, it)) : (y(), _("div", at, [f(Ie, { "mime-type": d(e) }, null, 8, ["mime-type"])]))]),
980
+ x("div", ot, [x("p", st, c(e.filename || e.url), 1), x("p", ct, [
981
+ e.size == null ? g("", !0) : (y(), _(S, { key: 0 }, [v(c(w($)(e.size)), 1)], 64)),
982
+ e.createdAt ? (y(), _(S, { key: 1 }, [e.size == null ? g("", !0) : (y(), _(S, { key: 0 }, [v(" · ")], 64)), v(" " + c(F(e.createdAt)), 1)], 64)) : g("", !0),
983
+ w(u)(d(e)) && e.width && e.height ? (y(), _(S, { key: 2 }, [v(" · " + c(e.width) + "×" + c(e.height), 1)], 64)) : g("", !0)
919
984
  ])]),
920
- w("div", { class: C(["tpl:flex tpl:gap-1 tpl:transition-opacity tpl:duration-150", O(e)]) }, [h(e) ? (o(), p("button", {
985
+ x("div", { class: b(["tpl:flex tpl:gap-1 tpl:transition-opacity tpl:duration-150", j(e)]) }, [h(e) ? (y(), _("button", {
921
986
  key: 0,
922
987
  type: "button",
923
988
  "data-testid": "media-edit",
924
989
  class: "tpl:flex tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded",
925
990
  style: { color: "var(--tpl-text-muted)" },
926
- title: D(k).mediaLibrary.editFile,
927
- "aria-label": D(k).mediaLibrary.editFile,
928
- onClick: S((t) => s("edit", e), ["stop"])
929
- }, [M(D(V), {
991
+ title: w(M).mediaLibrary.editFile,
992
+ "aria-label": w(M).mediaLibrary.editFile,
993
+ onClick: A((t) => a("edit", e), ["stop"])
994
+ }, [f(w(U), {
930
995
  size: 12,
931
996
  "stroke-width": 2
932
- })], 8, ct)) : v("", !0), _(e) ? (o(), p("button", {
997
+ })], 8, lt)) : g("", !0), C(e) ? (y(), _("button", {
933
998
  key: 1,
934
999
  type: "button",
935
1000
  "data-testid": "media-replace",
936
1001
  class: "tpl:flex tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded",
937
1002
  style: { color: "var(--tpl-text-muted)" },
938
- title: D(k).mediaLibrary.replaceFile,
939
- "aria-label": D(k).mediaLibrary.replaceFile,
940
- onClick: S((t) => s("replace", e), ["stop"])
941
- }, [M(D(H), {
1003
+ title: w(M).mediaLibrary.replaceFile,
1004
+ "aria-label": w(M).mediaLibrary.replaceFile,
1005
+ onClick: A((t) => a("replace", e), ["stop"])
1006
+ }, [f(w(G), {
942
1007
  size: 12,
943
1008
  "stroke-width": 2
944
- })], 8, lt)) : v("", !0)], 2),
945
- E(e) ? (o(), p("div", ut, [M(D(ue), {
1009
+ })], 8, ut)) : g("", !0)], 2),
1010
+ k(e) ? (y(), _("div", dt, [f(w(V), {
946
1011
  size: 12,
947
1012
  "stroke-width": 3
948
- })])) : v("", !0)
949
- ], 46, tt))), 128))], 8, et)) : (o(), p("div", {
1013
+ })])) : g("", !0)
1014
+ ], 46, nt))), 128))], 8, tt)) : (y(), _("div", {
950
1015
  key: 2,
951
1016
  role: "listbox",
952
- "aria-label": D(k).mediaLibrary.filesListAriaLabel,
1017
+ "aria-label": w(M).mediaLibrary.filesListAriaLabel,
953
1018
  "aria-multiselectable": "true",
954
1019
  class: "tpl:grid tpl:grid-cols-4 tpl:gap-3"
955
- }, [(o(!0), p(A, null, i(t.items, (e) => (o(), p("div", {
1020
+ }, [(y(!0), _(S, null, s(n.items, (e) => (y(), _("div", {
956
1021
  key: e.id,
957
1022
  role: "option",
958
1023
  tabindex: "0",
959
1024
  "data-testid": "media-library-item",
960
- class: C(["tpl-media-item tpl:group tpl:relative tpl:overflow-hidden tpl:rounded-lg tpl:border-2 tpl:transition-all tpl:duration-150", [
1025
+ class: b(["tpl-media-item tpl:group tpl:relative tpl:overflow-hidden tpl:rounded-lg tpl:border-2 tpl:transition-all tpl:duration-150", [
961
1026
  "tpl:cursor-pointer",
962
- !f(e) && !E(e) ? "tpl:opacity-60" : "",
963
- E(e) ? "tpl-media-item--selected" : ""
1027
+ !m(e) && !k(e) ? "tpl:opacity-60" : "",
1028
+ k(e) ? "tpl-media-item--selected" : ""
964
1029
  ]]),
965
1030
  "data-media-id": e.id,
966
- "aria-selected": E(e),
1031
+ "aria-selected": k(e),
967
1032
  "aria-label": e.filename || e.url,
968
- style: j({
969
- borderColor: E(e) ? "var(--tpl-primary)" : "transparent",
970
- backgroundColor: !f(e) && !E(e) ? "var(--tpl-bg)" : "var(--tpl-bg-hover)"
1033
+ style: o({
1034
+ borderColor: k(e) ? "var(--tpl-primary)" : "transparent",
1035
+ backgroundColor: !m(e) && !k(e) ? "var(--tpl-bg)" : "var(--tpl-bg-hover)"
971
1036
  }),
972
- onClick: (t) => b(e, t),
973
- onDblclick: (t) => x(e),
974
- onKeydown: (t) => T(e, t)
1037
+ onClick: (t) => E(e, t),
1038
+ onDblclick: (t) => D(e),
1039
+ onKeydown: (t) => O(e, t)
975
1040
  }, [
976
- w("div", We, [D(l)(u(e)) ? (o(), p("img", {
1041
+ x("div", Ge, [w(u)(d(e)) ? (y(), _("img", {
977
1042
  key: 0,
978
- src: d(e),
1043
+ src: p(e),
979
1044
  alt: e.filename || e.url,
980
1045
  class: "tpl:size-full tpl:object-cover",
981
1046
  loading: "lazy"
982
- }, null, 8, Ge)) : (o(), y(Fe, {
1047
+ }, null, 8, Ke)) : (y(), T(Ie, {
983
1048
  key: 1,
984
- "mime-type": u(e)
1049
+ "mime-type": d(e)
985
1050
  }, null, 8, ["mime-type"]))]),
986
- w("div", Ke, [w("p", qe, g(e.filename || e.url), 1), w("p", Je, [e.size == null ? v("", !0) : (o(), p("span", Ye, g(D($)(e.size)), 1)), D(l)(u(e)) && e.width && e.height ? (o(), p("span", Xe, g(e.width) + "×" + g(e.height), 1)) : v("", !0)])]),
987
- w("div", { class: C(["tpl:absolute tpl:top-1.5 tpl:left-1.5 tpl:flex tpl:gap-1 tpl:transition-opacity tpl:duration-150", O(e)]) }, [h(e) ? (o(), p("button", {
1051
+ x("div", qe, [x("p", Je, c(e.filename || e.url), 1), x("p", Ye, [e.size == null ? g("", !0) : (y(), _("span", Xe, c(w($)(e.size)), 1)), w(u)(d(e)) && e.width && e.height ? (y(), _("span", Ze, c(e.width) + "×" + c(e.height), 1)) : g("", !0)])]),
1052
+ x("div", { class: b(["tpl:absolute tpl:top-1.5 tpl:left-1.5 tpl:flex tpl:gap-1 tpl:transition-opacity tpl:duration-150", j(e)]) }, [h(e) ? (y(), _("button", {
988
1053
  key: 0,
989
1054
  type: "button",
990
1055
  "data-testid": "media-edit",
@@ -993,13 +1058,13 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
993
1058
  "background-color": "var(--tpl-overlay)",
994
1059
  color: "var(--tpl-on-primary)"
995
1060
  },
996
- title: D(k).mediaLibrary.editFile,
997
- "aria-label": D(k).mediaLibrary.editFile,
998
- onClick: S((t) => s("edit", e), ["stop"])
999
- }, [M(D(V), {
1061
+ title: w(M).mediaLibrary.editFile,
1062
+ "aria-label": w(M).mediaLibrary.editFile,
1063
+ onClick: A((t) => a("edit", e), ["stop"])
1064
+ }, [f(w(U), {
1000
1065
  size: 11,
1001
1066
  "stroke-width": 2
1002
- })], 8, Ze)) : v("", !0), _(e) ? (o(), p("button", {
1067
+ })], 8, Qe)) : g("", !0), C(e) ? (y(), _("button", {
1003
1068
  key: 1,
1004
1069
  type: "button",
1005
1070
  "data-testid": "media-replace",
@@ -1008,51 +1073,51 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
1008
1073
  "background-color": "var(--tpl-overlay)",
1009
1074
  color: "var(--tpl-on-primary)"
1010
1075
  },
1011
- title: D(k).mediaLibrary.replaceFile,
1012
- "aria-label": D(k).mediaLibrary.replaceFile,
1013
- onClick: S((t) => s("replace", e), ["stop"])
1014
- }, [M(D(H), {
1076
+ title: w(M).mediaLibrary.replaceFile,
1077
+ "aria-label": w(M).mediaLibrary.replaceFile,
1078
+ onClick: A((t) => a("replace", e), ["stop"])
1079
+ }, [f(w(G), {
1015
1080
  size: 11,
1016
1081
  "stroke-width": 2
1017
- })], 8, Qe)) : v("", !0)], 2),
1018
- E(e) ? (o(), p("div", $e, [M(D(ue), {
1082
+ })], 8, $e)) : g("", !0)], 2),
1083
+ k(e) ? (y(), _("div", et, [f(w(V), {
1019
1084
  size: 12,
1020
1085
  "stroke-width": 3
1021
- })])) : v("", !0)
1022
- ], 46, Ue))), 128))], 8, He)),
1023
- w("div", {
1086
+ })])) : g("", !0)
1087
+ ], 46, We))), 128))], 8, Ue)),
1088
+ x("div", {
1024
1089
  ref_key: "sentinelRef",
1025
1090
  ref: P,
1026
1091
  class: "tpl:h-4"
1027
1092
  }, null, 512),
1028
- t.isLoading && t.items.length > 0 ? (o(), p("div", dt, [M(D(G), {
1093
+ n.isLoading && n.items.length > 0 ? (y(), _("div", ft, [f(w(H), {
1029
1094
  class: "tpl-spinner",
1030
1095
  size: 20,
1031
1096
  "stroke-width": 2,
1032
1097
  style: { color: "var(--tpl-primary)" }
1033
- })])) : v("", !0)
1098
+ })])) : g("", !0)
1034
1099
  ]));
1035
1100
  }
1036
- }), [["__scopeId", "data-v-57c35946"]]), pt = ["data-tpl-theme"], mt = {
1101
+ }), [["__scopeId", "data-v-57c35946"]]), mt = ["data-tpl-theme"], ht = {
1037
1102
  id: "tpl-media-import-title",
1038
1103
  class: "tpl:mb-4 tpl:text-sm tpl:font-semibold",
1039
1104
  style: { color: "var(--tpl-text)" }
1040
- }, ht = { class: "tpl:mb-3" }, gt = [
1105
+ }, gt = { class: "tpl:mb-3" }, _t = [
1041
1106
  "aria-label",
1042
1107
  "aria-invalid",
1043
1108
  "aria-describedby",
1044
1109
  "placeholder",
1045
1110
  "disabled"
1046
- ], _t = {
1111
+ ], vt = {
1047
1112
  key: 0,
1048
1113
  id: "tpl-media-import-error",
1049
1114
  role: "alert",
1050
1115
  class: "tpl:mb-3 tpl:text-xs",
1051
1116
  style: { color: "var(--tpl-danger)" }
1052
- }, vt = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, yt = ["disabled"], bt = ["disabled"], xt = {
1117
+ }, yt = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, bt = ["disabled"], xt = ["disabled"], St = {
1053
1118
  key: 0,
1054
1119
  class: "tpl:flex tpl:items-center tpl:gap-1.5"
1055
- }, St = { key: 1 }, Ct = /* @__PURE__ */ t({
1120
+ }, Ct = { key: 1 }, wt = /* @__PURE__ */ D({
1056
1121
  __name: "MediaImportUrlModal",
1057
1122
  props: {
1058
1123
  visible: { type: Boolean },
@@ -1060,24 +1125,24 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
1060
1125
  error: {}
1061
1126
  },
1062
1127
  emits: ["import", "close"],
1063
- setup(t, { emit: r }) {
1064
- let i = t, a = r, { t: s } = Z(), c = n(Y, null), f = n(J, e(null)), h = e("");
1065
- u(() => i.visible, (e) => {
1066
- e && (h.value = "");
1128
+ setup(n, { emit: i }) {
1129
+ let a = n, o = i, { t: s } = Q(), l = t(fe, null), d = t(X, e(null)), m = e("");
1130
+ O(() => a.visible, (e) => {
1131
+ e && (m.value = "");
1067
1132
  });
1068
- function b() {
1069
- let e = h.value.trim();
1070
- e && !i.isImporting && a("import", e);
1133
+ function S() {
1134
+ let e = m.value.trim();
1135
+ e && !a.isImporting && o("import", e);
1071
1136
  }
1072
- function x() {
1073
- i.isImporting || a("close");
1137
+ function C() {
1138
+ a.isImporting || o("close");
1074
1139
  }
1075
- let k = e(null);
1076
- ge(k, O(() => i.visible));
1077
- function A(e) {
1078
- e.stopPropagation(), e.key === "Enter" && (e.preventDefault(), b()), e.key === "Escape" && x();
1140
+ let E = e(null);
1141
+ _e(E, h(() => a.visible));
1142
+ function D(e) {
1143
+ e.stopPropagation(), e.key === "Enter" && (e.preventDefault(), S()), e.key === "Escape" && C();
1079
1144
  }
1080
- return (e, n) => (o(), y(_, { to: D(f) || "body" }, [M(T, {
1145
+ return (e, t) => (y(), T(p, { to: w(d) || "body" }, [f(M, {
1081
1146
  "enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
1082
1147
  "enter-from-class": "tpl:opacity-0",
1083
1148
  "enter-to-class": "tpl:opacity-100",
@@ -1085,71 +1150,71 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
1085
1150
  "leave-from-class": "tpl:opacity-100",
1086
1151
  "leave-to-class": "tpl:opacity-0"
1087
1152
  }, {
1088
- default: l(() => [t.visible ? (o(), p("div", {
1153
+ default: r(() => [n.visible ? (y(), _("div", {
1089
1154
  key: 0,
1090
- "data-tpl-theme": D(c),
1091
- class: C([D(f) ? void 0 : "tpl", "tpl:fixed tpl:inset-0 tpl:z-10 tpl:flex tpl:items-center tpl:justify-center tpl:p-4"]),
1155
+ "data-tpl-theme": w(l),
1156
+ class: b([w(d) ? void 0 : "tpl", "tpl:fixed tpl:inset-0 tpl:z-10 tpl:flex tpl:items-center tpl:justify-center tpl:p-4"]),
1092
1157
  style: { "background-color": "var(--tpl-overlay)" },
1093
- onClick: S(x, ["self"]),
1094
- onKeydown: A
1095
- }, [w("div", {
1158
+ onClick: A(C, ["self"]),
1159
+ onKeydown: D
1160
+ }, [x("div", {
1096
1161
  ref_key: "dialogRef",
1097
- ref: k,
1162
+ ref: E,
1098
1163
  role: "dialog",
1099
1164
  "aria-modal": "true",
1100
1165
  "aria-labelledby": "tpl-media-import-title",
1101
1166
  class: "tpl:max-h-[90%] tpl:w-full tpl:max-w-sm tpl:overflow-y-auto tpl:rounded-lg tpl:p-5 tpl:shadow-xl",
1102
1167
  style: { "background-color": "var(--tpl-bg-elevated)" }
1103
1168
  }, [
1104
- w("h3", mt, g(D(s).mediaLibrary.importFromUrl), 1),
1105
- w("div", ht, [d(w("input", {
1106
- "onUpdate:modelValue": n[0] ||= (e) => h.value = e,
1169
+ x("h3", ht, c(w(s).mediaLibrary.importFromUrl), 1),
1170
+ x("div", gt, [u(x("input", {
1171
+ "onUpdate:modelValue": t[0] ||= (e) => m.value = e,
1107
1172
  type: "url",
1108
- "aria-label": D(s).mediaLibrary.importFromUrl,
1109
- "aria-invalid": !!t.error,
1110
- "aria-describedby": t.error ? "tpl-media-import-error" : void 0,
1173
+ "aria-label": w(s).mediaLibrary.importFromUrl,
1174
+ "aria-invalid": !!n.error,
1175
+ "aria-describedby": n.error ? "tpl-media-import-error" : void 0,
1111
1176
  class: "tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:outline-none",
1112
1177
  style: {
1113
1178
  "border-color": "var(--tpl-border)",
1114
1179
  "background-color": "var(--tpl-bg)",
1115
1180
  color: "var(--tpl-text)"
1116
1181
  },
1117
- placeholder: D(s).mediaLibrary.importUrlPlaceholder,
1118
- disabled: t.isImporting,
1182
+ placeholder: w(s).mediaLibrary.importUrlPlaceholder,
1183
+ disabled: n.isImporting,
1119
1184
  autofocus: ""
1120
- }, null, 8, gt), [[E, h.value]])]),
1121
- t.error ? (o(), p("p", _t, g(t.error), 1)) : v("", !0),
1122
- w("div", vt, [w("button", {
1123
- class: C(["tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150", { "tpl:cursor-not-allowed tpl:opacity-50": t.isImporting }]),
1185
+ }, null, 8, _t), [[k, m.value]])]),
1186
+ n.error ? (y(), _("p", vt, c(n.error), 1)) : g("", !0),
1187
+ x("div", yt, [x("button", {
1188
+ class: b(["tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150", { "tpl:cursor-not-allowed tpl:opacity-50": n.isImporting }]),
1124
1189
  style: {
1125
1190
  "border-color": "var(--tpl-border)",
1126
1191
  color: "var(--tpl-text)",
1127
1192
  "background-color": "var(--tpl-bg)"
1128
1193
  },
1129
- disabled: t.isImporting,
1130
- onClick: x
1131
- }, g(D(s).mediaLibrary.cancel), 11, yt), w("button", {
1194
+ disabled: n.isImporting,
1195
+ onClick: C
1196
+ }, c(w(s).mediaLibrary.cancel), 11, bt), x("button", {
1132
1197
  class: "tpl:cursor-pointer tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150 tpl:hover:bg-[var(--tpl-primary-hover)] tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50",
1133
1198
  style: {
1134
1199
  "background-color": "var(--tpl-primary)",
1135
1200
  color: "var(--tpl-on-primary)"
1136
1201
  },
1137
- disabled: !h.value.trim() || t.isImporting,
1138
- onClick: b
1139
- }, [t.isImporting ? (o(), p("span", xt, [M(D(G), {
1202
+ disabled: !m.value.trim() || n.isImporting,
1203
+ onClick: S
1204
+ }, [n.isImporting ? (y(), _("span", St, [f(w(H), {
1140
1205
  class: "tpl:animate-spin",
1141
1206
  size: 12,
1142
1207
  "stroke-width": 2
1143
- }), m(" " + g(D(s).mediaLibrary.importing), 1)])) : (o(), p("span", St, g(D(s).mediaLibrary.import), 1))], 8, bt)])
1144
- ], 512)], 42, pt)) : v("", !0)]),
1208
+ }), v(" " + c(w(s).mediaLibrary.importing), 1)])) : (y(), _("span", Ct, c(w(s).mediaLibrary.import), 1))], 8, xt)])
1209
+ ], 512)], 42, mt)) : g("", !0)]),
1145
1210
  _: 1
1146
1211
  })], 8, ["to"]));
1147
1212
  }
1148
- }), wt = { class: "tpl:max-h-56 tpl:overflow-y-auto tpl:py-1" }, Tt = ["disabled", "onClick"], Et = { class: "tpl:truncate" }, Dt = {
1213
+ }), Tt = { class: "tpl:max-h-56 tpl:overflow-y-auto tpl:py-1" }, Et = ["disabled", "onClick"], Dt = { class: "tpl:truncate" }, Ot = {
1149
1214
  key: 0,
1150
1215
  class: "tpl:shrink-0",
1151
1216
  style: { color: "var(--tpl-text-dim)" }
1152
- }, Ot = /* @__PURE__ */ t({
1217
+ }, kt = /* @__PURE__ */ D({
1153
1218
  __name: "MediaMovePicker",
1154
1219
  props: {
1155
1220
  folders: {},
@@ -1157,40 +1222,40 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
1157
1222
  },
1158
1223
  emits: ["select", "close"],
1159
1224
  setup(t, { emit: n }) {
1160
- let r = n, { t: a } = Z(), s = e(null);
1161
- function c(e, t = 0) {
1225
+ let r = n, { t: i } = Q(), a = e(null);
1226
+ function l(e, t = 0) {
1162
1227
  let n = [];
1163
1228
  for (let r of e) n.push({
1164
1229
  id: r.id,
1165
1230
  name: r.name,
1166
1231
  depth: t
1167
- }), r.children.length && n.push(...c(r.children, t + 1));
1232
+ }), r.children.length && n.push(...l(r.children, t + 1));
1168
1233
  return n;
1169
1234
  }
1170
- return z(s, () => {
1235
+ return z(a, () => {
1171
1236
  r("close");
1172
- }), (e, n) => (o(), p("div", {
1237
+ }), (e, n) => (y(), _("div", {
1173
1238
  ref_key: "pickerRef",
1174
- ref: s,
1239
+ ref: a,
1175
1240
  "data-testid": "media-move-picker",
1176
1241
  class: "tpl:absolute tpl:bottom-full tpl:left-0 tpl:z-10 tpl:mb-2 tpl:w-56 tpl:overflow-hidden tpl:rounded-lg tpl:border tpl:shadow-lg",
1177
1242
  style: {
1178
1243
  "border-color": "var(--tpl-border)",
1179
1244
  "background-color": "var(--tpl-bg-elevated)"
1180
1245
  }
1181
- }, [w("div", wt, [t.currentFolderId === null ? v("", !0) : (o(), p("button", {
1246
+ }, [x("div", Tt, [t.currentFolderId === null ? g("", !0) : (y(), _("button", {
1182
1247
  key: 0,
1183
1248
  class: "tpl:flex tpl:w-full tpl:items-center tpl:gap-1.5 tpl:px-3 tpl:py-1.5 tpl:text-left tpl:text-xs tpl:transition-colors tpl:duration-100",
1184
1249
  style: { color: "var(--tpl-text)" },
1185
1250
  onClick: n[0] ||= (e) => r("select", null)
1186
- }, [M(D(B), {
1251
+ }, [f(w(q), {
1187
1252
  class: "tpl:shrink-0",
1188
1253
  size: 14,
1189
1254
  "stroke-width": 1.5
1190
- }), m(" " + g(D(a).mediaLibrary.moveToRoot), 1)])), (o(!0), p(A, null, i(c(t.folders), (e) => (o(), p("button", {
1255
+ }), v(" " + c(w(i).mediaLibrary.moveToRoot), 1)])), (y(!0), _(S, null, s(l(t.folders), (e) => (y(), _("button", {
1191
1256
  key: e.id,
1192
1257
  class: "tpl:flex tpl:w-full tpl:items-center tpl:gap-1.5 tpl:py-1.5 tpl:pr-3 tpl:text-left tpl:text-xs tpl:transition-colors tpl:duration-100",
1193
- style: j({
1258
+ style: o({
1194
1259
  paddingLeft: `${e.depth * 16 + 12}px`,
1195
1260
  color: e.id === t.currentFolderId ? "var(--tpl-text-dim)" : "var(--tpl-text)",
1196
1261
  opacity: e.id === t.currentFolderId ? .5 : 1
@@ -1198,33 +1263,33 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
1198
1263
  disabled: e.id === t.currentFolderId,
1199
1264
  onClick: (t) => r("select", e.id)
1200
1265
  }, [
1201
- M(D(U), {
1266
+ f(w(J), {
1202
1267
  class: "tpl:shrink-0",
1203
1268
  size: 14,
1204
1269
  "stroke-width": 1.5
1205
1270
  }),
1206
- w("span", Et, g(e.name), 1),
1207
- e.id === t.currentFolderId ? (o(), p("span", Dt, g(D(a).mediaLibrary.currentFolder), 1)) : v("", !0)
1208
- ], 12, Tt))), 128))])], 512));
1271
+ x("span", Dt, c(e.name), 1),
1272
+ e.id === t.currentFolderId ? (y(), _("span", Ot, c(w(i).mediaLibrary.currentFolder), 1)) : g("", !0)
1273
+ ], 12, Et))), 128))])], 512));
1209
1274
  }
1210
- }), kt = { class: "tpl:flex tpl:items-center tpl:gap-3" }, At = ["src", "alt"], jt = {
1275
+ }), At = { class: "tpl:flex tpl:items-center tpl:gap-3" }, jt = ["src", "alt"], Mt = {
1211
1276
  key: 1,
1212
1277
  class: "tpl:flex tpl:size-10 tpl:shrink-0 tpl:items-center tpl:justify-center tpl:overflow-hidden tpl:rounded",
1213
1278
  style: { border: "1px solid var(--tpl-border)" }
1214
- }, Mt = { class: "tpl:min-w-0 tpl:flex-1" }, Nt = {
1279
+ }, Nt = { class: "tpl:min-w-0 tpl:flex-1" }, Pt = {
1215
1280
  class: "tpl:truncate tpl:text-xs tpl:font-medium",
1216
1281
  style: { color: "var(--tpl-text)" }
1217
- }, Pt = {
1282
+ }, Ft = {
1218
1283
  class: "tpl:mt-0.5 tpl:text-[10px]",
1219
1284
  style: { color: "var(--tpl-text-muted)" }
1220
- }, Ft = /*#__PURE__*/ q(/* @__PURE__ */ t({
1285
+ }, It = /*#__PURE__*/ K(/* @__PURE__ */ D({
1221
1286
  __name: "MediaPreviewPanel",
1222
1287
  props: {
1223
1288
  item: {},
1224
1289
  folders: {}
1225
1290
  },
1226
1291
  setup(e) {
1227
- let t = e, r = n(X, null), { isImageMimeType: i } = Q();
1292
+ let n = e, r = t(Z, null), { isImageMimeType: i } = he();
1228
1293
  function a(e, t, n = []) {
1229
1294
  for (let r of e) {
1230
1295
  let e = [...n, r.name];
@@ -1236,82 +1301,82 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
1236
1301
  }
1237
1302
  return null;
1238
1303
  }
1239
- let s = O(() => {
1240
- if (!t.item.folderId || !t.folders) return null;
1241
- let e = a(t.folders, t.item.folderId);
1304
+ let o = h(() => {
1305
+ if (!n.item.folderId || !n.folders) return null;
1306
+ let e = a(n.folders, n.item.folderId);
1242
1307
  return e ? e.join("/") : null;
1243
- }), c = O(() => t.item.mimeType ?? ""), l = O(() => i(c.value));
1308
+ }), s = h(() => n.item.mimeType ?? ""), l = h(() => i(s.value));
1244
1309
  function u(e) {
1245
- return Ie(e, r?.value, {
1310
+ return Le(e, r?.value, {
1246
1311
  year: "numeric",
1247
1312
  month: "short",
1248
1313
  day: "numeric"
1249
1314
  });
1250
1315
  }
1251
- let d = O(() => t.item.filename || t.item.url);
1252
- return (t, n) => (o(), p("div", kt, [l.value ? (o(), p("img", {
1316
+ let d = h(() => n.item.filename || n.item.url);
1317
+ return (t, n) => (y(), _("div", At, [l.value ? (y(), _("img", {
1253
1318
  key: 0,
1254
1319
  src: e.item.url,
1255
1320
  alt: e.item.alt || d.value,
1256
1321
  class: "tpl:size-10 tpl:shrink-0 tpl:rounded tpl:object-cover",
1257
1322
  style: { border: "1px solid var(--tpl-border)" }
1258
- }, null, 8, At)) : (o(), p("div", jt, [M(Fe, {
1259
- "mime-type": c.value,
1323
+ }, null, 8, jt)) : (y(), _("div", Mt, [f(Ie, {
1324
+ "mime-type": s.value,
1260
1325
  class: "tpl-preview-icon"
1261
- }, null, 8, ["mime-type"])])), w("div", Mt, [
1262
- w("p", Nt, g(d.value), 1),
1263
- w("p", Pt, [
1264
- e.item.size == null ? v("", !0) : (o(), p(A, { key: 0 }, [m(g(D($)(e.item.size)), 1)], 64)),
1265
- e.item.createdAt ? (o(), p(A, { key: 1 }, [e.item.size == null ? v("", !0) : (o(), p(A, { key: 0 }, [m(" · ")], 64)), m(" " + g(u(e.item.createdAt)), 1)], 64)) : v("", !0),
1266
- l.value && e.item.width && e.item.height ? (o(), p(A, { key: 2 }, [m(" · " + g(e.item.width) + "×" + g(e.item.height) + "px ", 1)], 64)) : v("", !0),
1267
- s.value ? (o(), p(A, { key: 3 }, [
1268
- n[0] ||= m(" · ", -1),
1269
- M(D(U), {
1326
+ }, null, 8, ["mime-type"])])), x("div", Nt, [
1327
+ x("p", Pt, c(d.value), 1),
1328
+ x("p", Ft, [
1329
+ e.item.size == null ? g("", !0) : (y(), _(S, { key: 0 }, [v(c(w($)(e.item.size)), 1)], 64)),
1330
+ e.item.createdAt ? (y(), _(S, { key: 1 }, [e.item.size == null ? g("", !0) : (y(), _(S, { key: 0 }, [v(" · ")], 64)), v(" " + c(u(e.item.createdAt)), 1)], 64)) : g("", !0),
1331
+ l.value && e.item.width && e.item.height ? (y(), _(S, { key: 2 }, [v(" · " + c(e.item.width) + "×" + c(e.item.height) + "px ", 1)], 64)) : g("", !0),
1332
+ o.value ? (y(), _(S, { key: 3 }, [
1333
+ n[0] ||= v(" · ", -1),
1334
+ f(w(J), {
1270
1335
  class: "tpl:mb-px tpl:inline",
1271
1336
  size: 9,
1272
1337
  "stroke-width": 2
1273
1338
  }),
1274
- m(" " + g(s.value), 1)
1275
- ], 64)) : v("", !0)
1339
+ v(" " + c(o.value), 1)
1340
+ ], 64)) : g("", !0)
1276
1341
  ]),
1277
- l.value ? (o(), p("p", {
1342
+ l.value ? (y(), _("p", {
1278
1343
  key: 0,
1279
- class: C(["tpl:mt-0.5 tpl:truncate tpl:text-[10px] tpl:italic", { "tpl:invisible": !e.item.alt }]),
1344
+ class: b(["tpl:mt-0.5 tpl:truncate tpl:text-[10px] tpl:italic", { "tpl:invisible": !e.item.alt }]),
1280
1345
  style: { color: "var(--tpl-text-dim)" }
1281
- }, g(e.item.alt || "\xA0"), 3)) : v("", !0)
1346
+ }, c(e.item.alt || "\xA0"), 3)) : g("", !0)
1282
1347
  ])]));
1283
1348
  }
1284
- }), [["__scopeId", "data-v-50993988"]]), It = ["data-tpl-theme"], Lt = {
1349
+ }), [["__scopeId", "data-v-50993988"]]), Lt = ["data-tpl-theme"], Rt = {
1285
1350
  id: "tpl-media-replace-title",
1286
1351
  class: "tpl:mb-2 tpl:text-sm tpl:font-semibold",
1287
1352
  style: { color: "var(--tpl-text)" }
1288
- }, Rt = {
1353
+ }, zt = {
1289
1354
  class: "tpl:mb-2 tpl:text-xs",
1290
1355
  style: { color: "var(--tpl-text-muted)" }
1291
- }, zt = {
1356
+ }, Bt = {
1292
1357
  key: 0,
1293
1358
  class: "tpl:mb-3 tpl:text-xs",
1294
1359
  style: { color: "var(--tpl-text-muted)" }
1295
- }, Bt = {
1360
+ }, Vt = {
1296
1361
  class: "tpl:mb-3 tpl:rounded tpl:border tpl:p-2",
1297
1362
  style: { "border-color": "var(--tpl-border)" }
1298
- }, Vt = {
1363
+ }, Ht = {
1299
1364
  class: "tpl:truncate tpl:text-xs tpl:font-medium",
1300
1365
  style: { color: "var(--tpl-text)" }
1301
- }, Ht = { class: "tpl:mb-4" }, Ut = {
1366
+ }, Ut = { class: "tpl:mb-4" }, Wt = {
1302
1367
  class: "tpl:mb-1 tpl:block tpl:text-xs tpl:font-medium",
1303
1368
  style: { color: "var(--tpl-text-muted)" }
1304
- }, Wt = [
1369
+ }, Gt = [
1305
1370
  "accept",
1306
1371
  "aria-invalid",
1307
1372
  "aria-describedby"
1308
- ], Gt = {
1373
+ ], Kt = {
1309
1374
  key: 1,
1310
1375
  id: "tpl-media-replace-error",
1311
1376
  role: "alert",
1312
1377
  class: "tpl:mb-3 tpl:text-xs",
1313
1378
  style: { color: "var(--tpl-danger)" }
1314
- }, Kt = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, qt = ["disabled"], Jt = ["disabled"], Yt = /* @__PURE__ */ t({
1379
+ }, qt = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, Jt = ["disabled"], Yt = ["disabled"], Xt = /* @__PURE__ */ D({
1315
1380
  __name: "MediaReplaceModal",
1316
1381
  props: {
1317
1382
  visible: { type: Boolean },
@@ -1321,28 +1386,28 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
1321
1386
  error: {}
1322
1387
  },
1323
1388
  emits: ["replace", "close"],
1324
- setup(t, { emit: r }) {
1325
- let i = t, a = r, { t: s } = Z(), c = n(Y, null), d = n(J, e(null)), f = e(null), m = e(null), h = O(() => {
1326
- if (!i.item) return "";
1327
- let e = (i.item.filename ?? "").split(".");
1389
+ setup(n, { emit: i }) {
1390
+ let a = n, o = i, { t: s } = Q(), l = t(fe, null), u = t(X, e(null)), d = e(null), m = e(null), v = h(() => {
1391
+ if (!a.item) return "";
1392
+ let e = (a.item.filename ?? "").split(".");
1328
1393
  return e.length > 1 ? e[e.length - 1].toLowerCase() : "";
1329
- }), b = O(() => h.value ? `.${h.value}` : "*"), x = O(() => (i.usageInfo?.templateCount ?? 0) > 0);
1330
- u(() => i.visible, (e) => {
1331
- e || (m.value = null, f.value && (f.value.value = ""));
1394
+ }), S = h(() => v.value ? `.${v.value}` : "*"), C = h(() => (a.usageInfo?.templateCount ?? 0) > 0);
1395
+ O(() => a.visible, (e) => {
1396
+ e || (m.value = null, d.value && (d.value.value = ""));
1332
1397
  });
1333
1398
  function E(e) {
1334
1399
  let t = e.target;
1335
1400
  t.files && t.files.length > 0 && (m.value = t.files[0]);
1336
1401
  }
1337
- function k() {
1338
- m.value && a("replace", m.value);
1402
+ function D() {
1403
+ m.value && o("replace", m.value);
1339
1404
  }
1340
- let A = e(null);
1341
- ge(A, O(() => i.visible && i.item !== null));
1405
+ let k = e(null);
1406
+ _e(k, h(() => a.visible && a.item !== null));
1342
1407
  function j(e) {
1343
- e.stopPropagation(), e.key === "Escape" && a("close");
1408
+ e.stopPropagation(), e.key === "Escape" && o("close");
1344
1409
  }
1345
- return (e, n) => (o(), y(_, { to: D(d) || "body" }, [M(T, {
1410
+ return (e, t) => (y(), T(p, { to: w(u) || "body" }, [f(M, {
1346
1411
  "enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
1347
1412
  "enter-from-class": "tpl:opacity-0",
1348
1413
  "enter-to-class": "tpl:opacity-100",
@@ -1350,33 +1415,33 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
1350
1415
  "leave-from-class": "tpl:opacity-100",
1351
1416
  "leave-to-class": "tpl:opacity-0"
1352
1417
  }, {
1353
- default: l(() => [t.visible && t.item ? (o(), p("div", {
1418
+ default: r(() => [n.visible && n.item ? (y(), _("div", {
1354
1419
  key: 0,
1355
- "data-tpl-theme": D(c),
1356
- class: C([D(d) ? void 0 : "tpl", "tpl:fixed tpl:inset-0 tpl:z-10 tpl:flex tpl:items-center tpl:justify-center tpl:p-4"]),
1420
+ "data-tpl-theme": w(l),
1421
+ class: b([w(u) ? void 0 : "tpl", "tpl:fixed tpl:inset-0 tpl:z-10 tpl:flex tpl:items-center tpl:justify-center tpl:p-4"]),
1357
1422
  style: { "background-color": "var(--tpl-overlay)" },
1358
- onClick: n[1] ||= S((e) => a("close"), ["self"]),
1423
+ onClick: t[1] ||= A((e) => o("close"), ["self"]),
1359
1424
  onKeydown: j
1360
- }, [w("div", {
1425
+ }, [x("div", {
1361
1426
  ref_key: "dialogRef",
1362
- ref: A,
1427
+ ref: k,
1363
1428
  role: "dialog",
1364
1429
  "aria-modal": "true",
1365
1430
  "aria-labelledby": "tpl-media-replace-title",
1366
1431
  class: "tpl:max-h-[90%] tpl:w-full tpl:max-w-sm tpl:overflow-y-auto tpl:rounded-lg tpl:p-5 tpl:shadow-xl",
1367
1432
  style: { "background-color": "var(--tpl-bg-elevated)" }
1368
1433
  }, [
1369
- w("h3", Lt, g(D(s).mediaLibrary.replaceWarningTitle), 1),
1370
- w("p", Rt, g(D(s).mediaLibrary.replaceWarningMessage.replace("{extension}", `.${h.value}`)), 1),
1371
- x.value ? (o(), p("p", zt, g(D(s).mediaLibrary.replaceWarningUsageNote.replace("{count}", t.usageInfo.templateCount.toString())), 1)) : v("", !0),
1372
- w("div", Bt, [w("p", Vt, g(t.item.filename), 1)]),
1373
- w("div", Ht, [w("label", Ut, g(D(s).mediaLibrary.replaceSelectFile), 1), w("input", {
1434
+ x("h3", Rt, c(w(s).mediaLibrary.replaceWarningTitle), 1),
1435
+ x("p", zt, c(w(s).mediaLibrary.replaceWarningMessage.replace("{extension}", `.${v.value}`)), 1),
1436
+ C.value ? (y(), _("p", Bt, c(w(s).mediaLibrary.replaceWarningUsageNote.replace("{count}", n.usageInfo.templateCount.toString())), 1)) : g("", !0),
1437
+ x("div", Vt, [x("p", Ht, c(n.item.filename), 1)]),
1438
+ x("div", Ut, [x("label", Wt, c(w(s).mediaLibrary.replaceSelectFile), 1), x("input", {
1374
1439
  ref_key: "fileInputRef",
1375
- ref: f,
1440
+ ref: d,
1376
1441
  type: "file",
1377
- accept: b.value,
1378
- "aria-invalid": !!t.error,
1379
- "aria-describedby": t.error ? "tpl-media-replace-error" : void 0,
1442
+ accept: S.value,
1443
+ "aria-invalid": !!n.error,
1444
+ "aria-describedby": n.error ? "tpl-media-replace-error" : void 0,
1380
1445
  class: "tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs",
1381
1446
  style: {
1382
1447
  "border-color": "var(--tpl-border)",
@@ -1384,34 +1449,33 @@ var Re = { class: "tpl:p-4" }, ze = ["aria-label"], Be = {
1384
1449
  color: "var(--tpl-text)"
1385
1450
  },
1386
1451
  onChange: E
1387
- }, null, 40, Wt)]),
1388
- t.error ? (o(), p("p", Gt, g(t.error), 1)) : v("", !0),
1389
- w("div", Kt, [w("button", {
1452
+ }, null, 40, Gt)]),
1453
+ n.error ? (y(), _("p", Kt, c(n.error), 1)) : g("", !0),
1454
+ x("div", qt, [x("button", {
1390
1455
  class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
1391
1456
  style: {
1392
1457
  "border-color": "var(--tpl-border)",
1393
1458
  color: "var(--tpl-text)",
1394
1459
  "background-color": "var(--tpl-bg)"
1395
1460
  },
1396
- disabled: t.isReplacing,
1397
- onClick: n[0] ||= (e) => a("close")
1398
- }, g(D(s).mediaLibrary.cancel), 9, qt), w("button", {
1461
+ disabled: n.isReplacing,
1462
+ onClick: t[0] ||= (e) => o("close")
1463
+ }, c(w(s).mediaLibrary.cancel), 9, Jt), x("button", {
1399
1464
  class: "tpl:cursor-pointer tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150 tpl:hover:bg-[var(--tpl-primary-hover)] tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50",
1400
1465
  style: {
1401
1466
  "background-color": "var(--tpl-primary)",
1402
1467
  color: "var(--tpl-on-primary)"
1403
1468
  },
1404
- disabled: !m.value || t.isReplacing,
1405
- onClick: k
1406
- }, g(t.isReplacing ? D(s).mediaLibrary.replacing : D(s).mediaLibrary.replace), 9, Jt)])
1407
- ], 512)], 42, It)) : v("", !0)]),
1469
+ disabled: !m.value || n.isReplacing,
1470
+ onClick: D
1471
+ }, c(n.isReplacing ? w(s).mediaLibrary.replacing : w(s).mediaLibrary.replace), 9, Yt)])
1472
+ ], 512)], 42, Lt)) : g("", !0)]),
1408
1473
  _: 1
1409
1474
  })], 8, ["to"]));
1410
1475
  }
1411
1476
  });
1412
- //#endregion
1413
- //#region ../media-library/src/utils/formatList.ts
1414
- function Xt(e, t) {
1477
+ // ../media-library/src/utils/formatList.ts
1478
+ function Zt(e, t) {
1415
1479
  let n = {
1416
1480
  style: "narrow",
1417
1481
  type: "conjunction"
@@ -1423,108 +1487,107 @@ function Xt(e, t) {
1423
1487
  return new Intl.ListFormat(void 0, n).format(e);
1424
1488
  }
1425
1489
  }
1426
- //#endregion
1427
- //#region ../media-library/src/components/media/MediaUploadZone.vue?vue&type=script&setup=true&lang.ts
1428
- var Zt = [
1490
+ // ../media-library/src/components/media/MediaUploadZone.vue?vue&type=script&setup=true&lang.ts
1491
+ var Qt = [
1429
1492
  "aria-label",
1430
1493
  "aria-describedby",
1431
1494
  "aria-busy"
1432
- ], Qt = {
1495
+ ], $t = {
1433
1496
  key: 0,
1434
1497
  class: "tpl:flex tpl:items-center tpl:gap-2"
1435
- }, $t = {
1436
- class: "tpl:text-xs",
1437
- style: { color: "var(--tpl-text-muted)" }
1438
1498
  }, en = {
1439
1499
  class: "tpl:text-xs",
1440
1500
  style: { color: "var(--tpl-text-muted)" }
1441
1501
  }, tn = {
1502
+ class: "tpl:text-xs",
1503
+ style: { color: "var(--tpl-text-muted)" }
1504
+ }, nn = {
1442
1505
  id: "tpl-media-upload-hint",
1443
1506
  "data-testid": "media-upload-hint",
1444
1507
  class: "tpl:mt-1 tpl:text-[10px]",
1445
1508
  style: { color: "var(--tpl-text-dim)" }
1446
- }, nn = {
1509
+ }, rn = {
1447
1510
  key: 0,
1448
1511
  "data-testid": "media-upload-rejected",
1449
1512
  role: "alert",
1450
1513
  class: "tpl:mt-1.5 tpl:text-xs tpl:break-words",
1451
1514
  style: { color: "var(--tpl-danger)" }
1452
- }, rn = /* @__PURE__ */ t({
1515
+ }, an = /* @__PURE__ */ D({
1453
1516
  __name: "MediaUploadZone",
1454
1517
  props: {
1455
1518
  isUploading: { type: Boolean },
1456
1519
  uploadProgress: {}
1457
1520
  },
1458
1521
  emits: ["upload"],
1459
- setup(t, { emit: r }) {
1460
- let i = r, { t: a, format: s } = Z(), c = n(X, null), { allAcceptedInputString: l, restrictsMimeTypes: u, availableCategories: d, maxFileSize: f, isAcceptedFile: m } = Q(), h = {
1522
+ setup(n, { emit: r }) {
1523
+ let i = r, { t: a, format: o } = Q(), s = t(Z, null), { allAcceptedInputString: l, restrictsMimeTypes: u, availableCategories: d, maxFileSize: p, isAcceptedFile: m } = he(), v = {
1461
1524
  images: "filterImages",
1462
1525
  documents: "filterDocuments",
1463
1526
  videos: "filterVideos",
1464
1527
  audio: "filterAudio"
1465
- }, _ = O(() => {
1466
- let e = a.mediaLibrary, t = u.value ? Xt(d.value.map((t) => e[h[t]]), c?.value) : a.mediaLibrary.acceptedAnyType;
1467
- return Number.isFinite(f.value) ? s(a.mediaLibrary.acceptedFormatsMaxSize, {
1528
+ }, C = h(() => {
1529
+ let e = a.mediaLibrary, t = u.value ? Zt(d.value.map((t) => e[v[t]]), s?.value) : a.mediaLibrary.acceptedAnyType;
1530
+ return Number.isFinite(p.value) ? o(a.mediaLibrary.acceptedFormatsMaxSize, {
1468
1531
  formats: t,
1469
- size: $(f.value)
1532
+ size: $(p.value)
1470
1533
  }) : t;
1471
- }), y = e([]), b = e();
1472
- function x(e) {
1534
+ }), T = e([]), E = e();
1535
+ function D(e) {
1473
1536
  let t = [], n = [];
1474
1537
  for (let r of Array.from(e)) m(r) ? t.push(r) : n.push(r.name);
1475
- y.value = n, t.length && i("upload", t);
1538
+ T.value = n, t.length && i("upload", t);
1476
1539
  }
1477
- let { isOverDropZone: S } = L(b, { onDrop: (e) => {
1478
- e?.length && x(e);
1479
- } }), { open: T, onChange: E } = I({
1540
+ let { isOverDropZone: O } = L(E, { onDrop: (e) => {
1541
+ e?.length && D(e);
1542
+ } }), { open: k, onChange: A } = I({
1480
1543
  accept: l.value,
1481
1544
  multiple: !0
1482
1545
  });
1483
- return E((e) => {
1484
- e?.length && x(e);
1485
- }), (e, n) => (o(), p(A, null, [w("button", {
1546
+ return A((e) => {
1547
+ e?.length && D(e);
1548
+ }), (e, t) => (y(), _(S, null, [x("button", {
1486
1549
  ref_key: "dropZoneRef",
1487
- ref: b,
1550
+ ref: E,
1488
1551
  type: "button",
1489
1552
  "data-testid": "media-upload-zone",
1490
- class: C(["tpl-upload-zone tpl:flex tpl:w-full tpl:cursor-pointer tpl:flex-col tpl:items-center tpl:justify-center tpl:rounded-lg tpl:border-2 tpl:border-dashed tpl:p-5 tpl:text-center tpl:transition-all tpl:duration-150", D(S) ? "tpl-upload-zone-active" : ""]),
1491
- "aria-label": D(a).mediaLibrary.dropOrClick,
1492
- "aria-describedby": t.isUploading ? void 0 : "tpl-media-upload-hint",
1493
- "aria-busy": t.isUploading,
1553
+ class: b(["tpl-upload-zone tpl:flex tpl:w-full tpl:cursor-pointer tpl:flex-col tpl:items-center tpl:justify-center tpl:rounded-lg tpl:border-2 tpl:border-dashed tpl:p-5 tpl:text-center tpl:transition-all tpl:duration-150", w(O) ? "tpl-upload-zone-active" : ""]),
1554
+ "aria-label": w(a).mediaLibrary.dropOrClick,
1555
+ "aria-describedby": n.isUploading ? void 0 : "tpl-media-upload-hint",
1556
+ "aria-busy": n.isUploading,
1494
1557
  style: {
1495
1558
  "border-color": "var(--tpl-border-light)",
1496
1559
  "background-color": "var(--tpl-bg)"
1497
1560
  },
1498
- onClick: n[0] ||= (e) => D(T)()
1499
- }, [t.isUploading ? (o(), p("div", Qt, [M(D(G), {
1561
+ onClick: t[0] ||= (e) => w(k)()
1562
+ }, [n.isUploading ? (y(), _("div", $t, [f(w(H), {
1500
1563
  class: "tpl-spinner",
1501
1564
  size: 20,
1502
1565
  "stroke-width": 2,
1503
1566
  style: { color: "var(--tpl-primary)" }
1504
- }), w("span", $t, g(t.uploadProgress && t.uploadProgress.total > 1 ? D(s)(D(a).mediaLibrary.uploadingProgress, {
1505
- current: t.uploadProgress.current,
1506
- total: t.uploadProgress.total
1507
- }) : D(a).mediaLibrary.uploading), 1)])) : (o(), p(A, { key: 1 }, [
1508
- M(D(K), {
1567
+ }), x("span", en, c(n.uploadProgress && n.uploadProgress.total > 1 ? w(o)(w(a).mediaLibrary.uploadingProgress, {
1568
+ current: n.uploadProgress.current,
1569
+ total: n.uploadProgress.total
1570
+ }) : w(a).mediaLibrary.uploading), 1)])) : (y(), _(S, { key: 1 }, [
1571
+ f(w(ne), {
1509
1572
  class: "tpl:mb-2",
1510
1573
  size: 24,
1511
1574
  "stroke-width": 1.5,
1512
1575
  style: { color: "var(--tpl-text-dim)" }
1513
1576
  }),
1514
- w("p", en, g(D(a).mediaLibrary.dropOrClick), 1),
1515
- w("p", tn, g(_.value), 1)
1516
- ], 64))], 10, Zt), y.value.length ? (o(), p("p", nn, g(D(s)(D(a).mediaLibrary.uploadRejected, { files: y.value.join(", ") })), 1)) : v("", !0)], 64));
1577
+ x("p", tn, c(w(a).mediaLibrary.dropOrClick), 1),
1578
+ x("p", nn, c(C.value), 1)
1579
+ ], 64))], 10, Qt), T.value.length ? (y(), _("p", rn, c(w(o)(w(a).mediaLibrary.uploadRejected, { files: T.value.join(", ") })), 1)) : g("", !0)], 64));
1517
1580
  }
1518
- }), an = ["aria-label"], on = [
1581
+ }), on = ["aria-label"], sn = [
1519
1582
  "width",
1520
1583
  "height",
1521
1584
  "viewBox"
1522
- ], sn = [
1585
+ ], cn = [
1523
1586
  "cx",
1524
1587
  "cy",
1525
1588
  "r",
1526
1589
  "stroke-width"
1527
- ], cn = [
1590
+ ], ln = [
1528
1591
  "cx",
1529
1592
  "cy",
1530
1593
  "r",
@@ -1532,14 +1595,14 @@ var Zt = [
1532
1595
  "stroke",
1533
1596
  "stroke-dasharray",
1534
1597
  "stroke-dashoffset"
1535
- ], ln = {
1598
+ ], un = {
1536
1599
  key: 0,
1537
1600
  class: "tpl:absolute tpl:top-full tpl:left-1/2 tpl:z-50 tpl:mt-2 tpl:-translate-x-1/2 tpl:rounded-md tpl:px-2.5 tpl:py-1.5 tpl:text-xs tpl:whitespace-nowrap tpl:shadow-lg",
1538
1601
  style: {
1539
1602
  "background-color": "var(--tpl-text)",
1540
1603
  color: "var(--tpl-bg-elevated)"
1541
1604
  }
1542
- }, un = /* @__PURE__ */ t({
1605
+ }, dn = /* @__PURE__ */ D({
1543
1606
  __name: "StorageProgressRing",
1544
1607
  props: {
1545
1608
  usedBytes: {},
@@ -1547,44 +1610,44 @@ var Zt = [
1547
1610
  size: {}
1548
1611
  },
1549
1612
  setup(t) {
1550
- let n = t, { t: r, format: i } = Z(), a = e(!1), s = O(() => n.size ?? 24), c = O(() => Math.max(2, s.value / 8)), u = O(() => (s.value - c.value) / 2), d = O(() => 2 * Math.PI * u.value), f = O(() => n.limitBytes <= 0 ? 0 : Math.min(100, n.usedBytes / n.limitBytes * 100)), h = O(() => d.value - f.value / 100 * d.value), _ = O(() => f.value >= 95 ? "var(--tpl-danger)" : f.value >= 75 ? "var(--tpl-warning)" : "var(--tpl-primary)"), y = O(() => $(n.usedBytes)), b = O(() => $(n.limitBytes)), x = O(() => Math.max(0, n.limitBytes - n.usedBytes)), S = O(() => $(x.value)), C = O(() => i(r.mediaLibrary.storageTooltip, {
1551
- used: y.value,
1552
- total: b.value,
1553
- remaining: S.value
1613
+ let n = t, { t: i, format: a } = Q(), o = e(!1), s = h(() => n.size ?? 24), l = h(() => Math.max(2, s.value / 8)), u = h(() => (s.value - l.value) / 2), d = h(() => 2 * Math.PI * u.value), p = h(() => n.limitBytes <= 0 ? 0 : Math.min(100, n.usedBytes / n.limitBytes * 100)), m = h(() => d.value - p.value / 100 * d.value), b = h(() => p.value >= 95 ? "var(--tpl-danger)" : p.value >= 75 ? "var(--tpl-warning)" : "var(--tpl-primary)"), S = h(() => $(n.usedBytes)), C = h(() => $(n.limitBytes)), w = h(() => Math.max(0, n.limitBytes - n.usedBytes)), T = h(() => $(w.value)), E = h(() => a(i.mediaLibrary.storageTooltip, {
1614
+ used: S.value,
1615
+ total: C.value,
1616
+ remaining: T.value
1554
1617
  }));
1555
- return (e, t) => (o(), p("div", {
1618
+ return (e, t) => (y(), _("div", {
1556
1619
  "data-testid": "media-storage-ring",
1557
1620
  class: "tpl:relative tpl:inline-flex tpl:cursor-help tpl:items-center tpl:justify-center",
1558
1621
  tabindex: "0",
1559
- "aria-label": C.value,
1560
- onMouseenter: t[0] ||= (e) => a.value = !0,
1561
- onMouseleave: t[1] ||= (e) => a.value = !1,
1562
- onFocus: t[2] ||= (e) => a.value = !0,
1563
- onBlur: t[3] ||= (e) => a.value = !1
1564
- }, [(o(), p("svg", {
1622
+ "aria-label": E.value,
1623
+ onMouseenter: t[0] ||= (e) => o.value = !0,
1624
+ onMouseleave: t[1] ||= (e) => o.value = !1,
1625
+ onFocus: t[2] ||= (e) => o.value = !0,
1626
+ onBlur: t[3] ||= (e) => o.value = !1
1627
+ }, [(y(), _("svg", {
1565
1628
  width: s.value,
1566
1629
  height: s.value,
1567
1630
  class: "tpl:-rotate-90",
1568
1631
  viewBox: `0 0 ${s.value} ${s.value}`
1569
- }, [w("circle", {
1632
+ }, [x("circle", {
1570
1633
  cx: s.value / 2,
1571
1634
  cy: s.value / 2,
1572
1635
  r: u.value,
1573
1636
  fill: "none",
1574
- "stroke-width": c.value,
1637
+ "stroke-width": l.value,
1575
1638
  style: { stroke: "var(--tpl-border)" }
1576
- }, null, 8, sn), w("circle", {
1639
+ }, null, 8, cn), x("circle", {
1577
1640
  cx: s.value / 2,
1578
1641
  cy: s.value / 2,
1579
1642
  r: u.value,
1580
1643
  fill: "none",
1581
- "stroke-width": c.value,
1582
- stroke: _.value,
1644
+ "stroke-width": l.value,
1645
+ stroke: b.value,
1583
1646
  "stroke-linecap": "round",
1584
1647
  "stroke-dasharray": d.value,
1585
- "stroke-dashoffset": h.value,
1648
+ "stroke-dashoffset": m.value,
1586
1649
  class: "tpl:transition-all tpl:duration-300 tpl:ease-out"
1587
- }, null, 8, cn)], 8, on)), M(T, {
1650
+ }, null, 8, ln)], 8, sn)), f(M, {
1588
1651
  "enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
1589
1652
  "enter-from-class": "tpl:opacity-0 tpl:translate-y-1",
1590
1653
  "enter-to-class": "tpl:opacity-100 tpl:translate-y-0",
@@ -1592,17 +1655,16 @@ var Zt = [
1592
1655
  "leave-from-class": "tpl:opacity-100 tpl:translate-y-0",
1593
1656
  "leave-to-class": "tpl:opacity-0 tpl:translate-y-1"
1594
1657
  }, {
1595
- default: l(() => [a.value ? (o(), p("div", ln, [m(g(C.value) + " ", 1), t[4] ||= w("div", {
1658
+ default: r(() => [o.value ? (y(), _("div", un, [v(c(E.value) + " ", 1), t[4] ||= x("div", {
1596
1659
  class: "tpl:absolute tpl:-top-1 tpl:left-1/2 tpl:size-2 tpl:-translate-x-1/2 tpl:rotate-45",
1597
1660
  style: { "background-color": "var(--tpl-text)" }
1598
- }, null, -1)])) : v("", !0)]),
1661
+ }, null, -1)])) : g("", !0)]),
1599
1662
  _: 1
1600
- })], 40, an));
1663
+ })], 40, on));
1601
1664
  }
1602
1665
  });
1603
- //#endregion
1604
- //#region ../media-library/src/utils/treeFolders.ts
1605
- function dn(e) {
1666
+ // ../media-library/src/utils/treeFolders.ts
1667
+ function fn(e) {
1606
1668
  let t = /* @__PURE__ */ new Map();
1607
1669
  for (let n of e) t.set(n.id, {
1608
1670
  ...n,
@@ -1615,14 +1677,13 @@ function dn(e) {
1615
1677
  }
1616
1678
  return n;
1617
1679
  }
1618
- //#endregion
1619
- //#region ../media-library/src/composables/useMediaLibraryUI.ts
1620
- function fn(t) {
1680
+ // ../media-library/src/composables/useMediaLibraryUI.ts
1681
+ function pn(t) {
1621
1682
  let { library: n, translations: r } = t;
1622
1683
  function i() {
1623
1684
  return "value" in r && typeof r.value == "object" ? r.value : r;
1624
1685
  }
1625
- let a = e("grid"), o = e(!1), s = e(""), c = e(null), l = e(!1), d = e(!1), f = O(() => n.previewItem.value?.url ?? null), p = O(() => n.frequentlyUsedItems.value.length > 0), m = O(() => n.viewMode.value === "frequently-used" ? n.frequentlyUsedItems.value : n.items.value), h = O(() => Object.values(n.deleteUsageInfo.value).some((e) => e.templateCount > 0)), g = O(() => dn(n.folders.value)), _ = {
1686
+ let a = e("grid"), o = e(!1), s = e(""), c = e(null), l = e(!1), u = e(!1), d = h(() => n.previewItem.value?.url ?? null), f = h(() => n.frequentlyUsedItems.value.length > 0), p = h(() => n.viewMode.value === "frequently-used" ? n.frequentlyUsedItems.value : n.items.value), m = h(() => Object.values(n.deleteUsageInfo.value).some((e) => e.templateCount > 0)), g = h(() => fn(n.folders.value)), _ = {
1626
1687
  images: () => i().mediaLibrary.filterImages,
1627
1688
  documents: () => i().mediaLibrary.filterDocuments,
1628
1689
  videos: () => i().mediaLibrary.filterVideos,
@@ -1631,7 +1692,7 @@ function fn(t) {
1631
1692
  function v(e) {
1632
1693
  return _[e]?.() ?? e;
1633
1694
  }
1634
- u(o, (e) => {
1695
+ O(o, (e) => {
1635
1696
  e && n.loadFolders();
1636
1697
  });
1637
1698
  let y = N((e) => {
@@ -1669,7 +1730,7 @@ function fn(t) {
1669
1730
  await n.importFromUrl(e) && (l.value = !1);
1670
1731
  }
1671
1732
  async function M(e) {
1672
- d.value = !1, await n.moveSelected(e);
1733
+ u.value = !1, await n.moveSelected(e);
1673
1734
  }
1674
1735
  async function P() {
1675
1736
  await n.checkUsageBeforeDelete();
@@ -1689,11 +1750,11 @@ function fn(t) {
1689
1750
  searchInput: s,
1690
1751
  editingItem: c,
1691
1752
  showImportUrlModal: l,
1692
- showMovePicker: d,
1693
- selectedUrl: f,
1694
- hasFrequentlyUsed: p,
1695
- displayItems: m,
1696
- hasUsedFiles: h,
1753
+ showMovePicker: u,
1754
+ selectedUrl: d,
1755
+ hasFrequentlyUsed: f,
1756
+ displayItems: p,
1757
+ hasUsedFiles: m,
1697
1758
  folderTree: g,
1698
1759
  copy: x,
1699
1760
  copied: S,
@@ -1714,10 +1775,9 @@ function fn(t) {
1714
1775
  resetUI: R
1715
1776
  };
1716
1777
  }
1717
- //#endregion
1718
- //#region ../media-library/src/composable.ts
1719
- function pn(t) {
1720
- let { provider: n } = t, r = e([]), i = e([]), a = e(null), o = e("files"), s = e(""), c = e(null), l = e("newest"), u = e(!1), d = e(!1), f = e(!1), p = e(null), m = e(null), h = e(/* @__PURE__ */ new Set()), g = e(null), _ = e([]), v = e({}), y = e(!1), x = e([]), S = e(!1), C = e(null), w = e(!1), T = e(null), E = e(!1), D = e(null), O = e(null), k = e(null), A = 0;
1778
+ // ../media-library/src/composable.ts
1779
+ function mn(t) {
1780
+ let { provider: n } = t, r = e([]), i = e([]), a = e(null), o = e("files"), s = e(""), c = e(null), l = e("newest"), u = e(!1), d = e(!1), f = e(!1), p = e(null), h = e(null), g = e(/* @__PURE__ */ new Set()), _ = e(null), v = e([]), y = e({}), b = e(!1), x = e([]), S = e(!1), C = e(null), w = e(!1), T = e(null), E = e(!1), D = e(null), O = e(null), k = e(null), A = 0;
1721
1781
  function j(e) {
1722
1782
  try {
1723
1783
  e();
@@ -1729,7 +1789,7 @@ function pn(t) {
1729
1789
  return n.folders === !1 ? null : n.folders;
1730
1790
  }
1731
1791
  function N() {
1732
- return b(t.templateId);
1792
+ return m(t.templateId);
1733
1793
  }
1734
1794
  function P(e) {
1735
1795
  let t = {};
@@ -1778,10 +1838,10 @@ function pn(t) {
1778
1838
  l.value = e, await F();
1779
1839
  }
1780
1840
  async function B(e) {
1781
- o.value = "files", a.value = e, s.value = "", h.value = /* @__PURE__ */ new Set(), g.value = null, await F();
1841
+ o.value = "files", a.value = e, s.value = "", g.value = /* @__PURE__ */ new Set(), _.value = null, await F();
1782
1842
  }
1783
1843
  async function V() {
1784
- o.value = "frequently-used", a.value = null, s.value = "", h.value = /* @__PURE__ */ new Set(), g.value = null, await ae();
1844
+ o.value = "frequently-used", a.value = null, s.value = "", g.value = /* @__PURE__ */ new Set(), _.value = null, await W();
1785
1845
  }
1786
1846
  async function ee(e) {
1787
1847
  let { create: i } = n;
@@ -1803,13 +1863,13 @@ function pn(t) {
1803
1863
  async function te(e) {
1804
1864
  let { create: i } = n;
1805
1865
  if (typeof i == "function") {
1806
- d.value = !0, m.value = {
1866
+ d.value = !0, h.value = {
1807
1867
  current: 0,
1808
1868
  total: e.length
1809
1869
  };
1810
1870
  try {
1811
1871
  for (let o = 0; o < e.length; o++) {
1812
- m.value = {
1872
+ h.value = {
1813
1873
  current: o + 1,
1814
1874
  total: e.length
1815
1875
  };
@@ -1825,20 +1885,20 @@ function pn(t) {
1825
1885
  }
1826
1886
  }
1827
1887
  } finally {
1828
- d.value = !1, m.value = null;
1888
+ d.value = !1, h.value = null;
1829
1889
  }
1830
1890
  }
1831
1891
  }
1832
1892
  async function ne(e) {
1833
- if (h.value.size === 0) return;
1893
+ if (g.value.size === 0) return;
1834
1894
  let { move: n } = M() ?? { move: !1 };
1835
1895
  if (typeof n == "function") try {
1836
- let t = await n([...h.value], e);
1896
+ let t = await n([...g.value], e);
1837
1897
  if (a.value === null) {
1838
1898
  let e = new Map(t.map((e) => [e.id, e]));
1839
1899
  r.value = r.value.map((t) => e.get(t.id) ?? t);
1840
- } else r.value = r.value.filter((e) => !h.value.has(e.id));
1841
- h.value = /* @__PURE__ */ new Set(), g.value = null;
1900
+ } else r.value = r.value.filter((e) => !g.value.has(e.id));
1901
+ g.value = /* @__PURE__ */ new Set(), _.value = null;
1842
1902
  } catch (e) {
1843
1903
  t.onError?.(e);
1844
1904
  }
@@ -1850,7 +1910,7 @@ function pn(t) {
1850
1910
  let t = { filename: i };
1851
1911
  a !== void 0 && (t.alt = a);
1852
1912
  let s = await o(e, t);
1853
- return r.value = r.value.map((t) => t.id === e ? s : t), g.value?.id === e && (g.value = s), j(() => n.onUpdated?.(s)), !0;
1913
+ return r.value = r.value.map((t) => t.id === e ? s : t), _.value?.id === e && (_.value = s), j(() => n.onUpdated?.(s)), !0;
1854
1914
  } catch (e) {
1855
1915
  return t.onError?.(e), !1;
1856
1916
  }
@@ -1858,17 +1918,17 @@ function pn(t) {
1858
1918
  function ie(e) {
1859
1919
  let t = /* @__PURE__ */ new Map();
1860
1920
  for (let n of r.value) e.includes(n.id) && t.set(n.id, n);
1861
- for (let n of _.value) e.includes(n.id) && !t.has(n.id) && t.set(n.id, n);
1921
+ for (let n of v.value) e.includes(n.id) && !t.has(n.id) && t.set(n.id, n);
1862
1922
  return [...t.values()];
1863
1923
  }
1864
1924
  function H(e) {
1865
- r.value = r.value.filter((t) => !e.includes(t.id)), _.value = _.value.filter((t) => !e.includes(t.id)), h.value = /* @__PURE__ */ new Set(), g.value = null;
1925
+ r.value = r.value.filter((t) => !e.includes(t.id)), v.value = v.value.filter((t) => !e.includes(t.id)), g.value = /* @__PURE__ */ new Set(), _.value = null;
1866
1926
  }
1867
1927
  async function U() {
1868
- if (h.value.size === 0) return;
1928
+ if (g.value.size === 0) return;
1869
1929
  let { delete: e } = n;
1870
1930
  if (typeof e != "function") return;
1871
- let r = [...h.value], i = ie(r);
1931
+ let r = [...g.value], i = ie(r);
1872
1932
  try {
1873
1933
  await e(r), H(r);
1874
1934
  for (let e of i) j(() => n.onDeleted?.(e));
@@ -1876,43 +1936,43 @@ function pn(t) {
1876
1936
  t.onError?.(e);
1877
1937
  }
1878
1938
  }
1879
- async function ae() {
1939
+ async function W() {
1880
1940
  let { frequentlyUsed: e } = n;
1881
1941
  if (typeof e == "function") try {
1882
- _.value = await e();
1942
+ v.value = await e();
1883
1943
  } catch (e) {
1884
1944
  t.onError?.(e);
1885
1945
  }
1886
1946
  }
1887
- async function W() {
1888
- if (h.value.size === 0) return !1;
1889
- x.value = [...h.value];
1947
+ async function G() {
1948
+ if (g.value.size === 0) return !1;
1949
+ x.value = [...g.value];
1890
1950
  let { checkUsage: e } = n;
1891
- if (typeof e != "function") return v.value = {}, y.value = !0, !1;
1951
+ if (typeof e != "function") return y.value = {}, b.value = !0, !1;
1892
1952
  try {
1893
1953
  let t = await e(x.value);
1894
- v.value = t;
1954
+ y.value = t;
1895
1955
  let n = Object.values(t).some((e) => e.templateCount > 0);
1896
- return y.value = !0, n;
1956
+ return b.value = !0, n;
1897
1957
  } catch (e) {
1898
1958
  return t.onError?.(e), !1;
1899
1959
  }
1900
1960
  }
1901
- async function oe() {
1961
+ async function ae() {
1902
1962
  let { delete: e } = n;
1903
- if (typeof e != "function" || (y.value = !1, x.value.length === 0)) return;
1963
+ if (typeof e != "function" || (b.value = !1, x.value.length === 0)) return;
1904
1964
  let r = x.value, i = ie(r);
1905
1965
  try {
1906
- await e(r), H(r), x.value = [], v.value = {};
1966
+ await e(r), H(r), x.value = [], y.value = {};
1907
1967
  for (let e of i) j(() => n.onDeleted?.(e));
1908
1968
  } catch (e) {
1909
1969
  t.onError?.(e);
1910
1970
  }
1911
1971
  }
1912
- function G() {
1913
- y.value = !1, x.value = [], v.value = {};
1972
+ function oe() {
1973
+ b.value = !1, x.value = [], y.value = {};
1914
1974
  }
1915
- async function K(e) {
1975
+ async function se(e) {
1916
1976
  let i = n.importFromUrl;
1917
1977
  if (typeof i != "function") return null;
1918
1978
  S.value = !0, C.value = null;
@@ -1925,17 +1985,17 @@ function pn(t) {
1925
1985
  S.value = !1;
1926
1986
  }
1927
1987
  }
1928
- function se(e) {
1929
- let t = new Set(h.value);
1930
- t.has(e) ? t.delete(e) : t.add(e), h.value = t;
1988
+ function K(e) {
1989
+ let t = new Set(g.value);
1990
+ t.has(e) ? t.delete(e) : t.add(e), g.value = t;
1931
1991
  }
1932
- function ce() {
1933
- h.value = /* @__PURE__ */ new Set(), g.value = null;
1992
+ function q() {
1993
+ g.value = /* @__PURE__ */ new Set(), _.value = null;
1934
1994
  }
1935
- function le(e) {
1936
- g.value = e, h.value = /* @__PURE__ */ new Set([e.id]);
1995
+ function J(e) {
1996
+ _.value = e, g.value = /* @__PURE__ */ new Set([e.id]);
1937
1997
  }
1938
- async function ue() {
1998
+ async function ce() {
1939
1999
  let { storage: e } = n;
1940
2000
  if (typeof e != "function") k.value = null;
1941
2001
  else try {
@@ -1944,7 +2004,7 @@ function pn(t) {
1944
2004
  t.onError?.(e);
1945
2005
  }
1946
2006
  }
1947
- async function q() {
2007
+ async function Y() {
1948
2008
  let e = M();
1949
2009
  if (e) try {
1950
2010
  i.value = await e.list();
@@ -1952,40 +2012,40 @@ function pn(t) {
1952
2012
  t.onError?.(e);
1953
2013
  }
1954
2014
  }
1955
- async function de(e, n) {
2015
+ async function le(e, n) {
1956
2016
  let { create: r } = M() ?? { create: !1 };
1957
2017
  if (typeof r != "function") return null;
1958
2018
  try {
1959
2019
  let t = { name: e };
1960
2020
  n !== void 0 && (t.parentId = n);
1961
2021
  let i = await r(t);
1962
- return await q(), i;
2022
+ return await Y(), i;
1963
2023
  } catch (e) {
1964
2024
  return t.onError?.(e), null;
1965
2025
  }
1966
2026
  }
1967
- function J(e, t) {
2027
+ function ue(e, t) {
1968
2028
  for (let n of e) if (n.id === t) return n;
1969
2029
  return null;
1970
2030
  }
1971
- async function fe(e, n) {
2031
+ async function X(e, n) {
1972
2032
  let { update: r } = M() ?? { update: !1 };
1973
2033
  if (typeof r == "function") try {
1974
- await r(e, { name: n }), await q();
2034
+ await r(e, { name: n }), await Y();
1975
2035
  } catch (e) {
1976
2036
  t.onError?.(e);
1977
2037
  }
1978
2038
  }
1979
- async function Y(e) {
2039
+ async function de(e) {
1980
2040
  let { delete: n } = M() ?? { delete: !1 };
1981
2041
  if (typeof n == "function") try {
1982
- let t = J(i.value, e)?.parentId ?? null;
1983
- await n(e), a.value === e && (a.value = t), await q(), await F();
2042
+ let t = ue(i.value, e)?.parentId ?? null;
2043
+ await n(e), a.value === e && (a.value = t), await Y(), await F();
1984
2044
  } catch (e) {
1985
2045
  t.onError?.(e);
1986
2046
  }
1987
2047
  }
1988
- async function X(e) {
2048
+ async function fe(e) {
1989
2049
  D.value = e, T.value = null;
1990
2050
  let { checkUsage: r } = n;
1991
2051
  if (typeof r != "function") O.value = null, E.value = !0;
@@ -1996,31 +2056,31 @@ function pn(t) {
1996
2056
  t.onError?.(e);
1997
2057
  }
1998
2058
  }
1999
- function pe() {
2059
+ function Z() {
2000
2060
  E.value = !1, D.value = null, O.value = null, T.value = null;
2001
2061
  }
2002
- function Z(e) {
2003
- r.value = r.value.map((t) => t.id === e.id ? e : t), _.value = _.value.map((t) => t.id === e.id ? e : t), g.value?.id === e.id && (g.value = e), j(() => n.onUpdated?.(e));
2062
+ function pe(e) {
2063
+ r.value = r.value.map((t) => t.id === e.id ? e : t), v.value = v.value.map((t) => t.id === e.id ? e : t), _.value?.id === e.id && (_.value = e), j(() => n.onUpdated?.(e));
2004
2064
  }
2005
- async function me(e) {
2065
+ async function Q(e) {
2006
2066
  let { replace: r } = n;
2007
2067
  if (typeof r != "function" || !D.value) return null;
2008
2068
  w.value = !0, T.value = null;
2009
2069
  try {
2010
2070
  let t = await r(D.value.id, e);
2011
- return Z(t), E.value = !1, D.value = null, O.value = null, t;
2071
+ return pe(t), E.value = !1, D.value = null, O.value = null, t;
2012
2072
  } catch (e) {
2013
2073
  return T.value = e instanceof Error ? e.message : "Replace failed", t.onError?.(e), null;
2014
2074
  } finally {
2015
2075
  w.value = !1;
2016
2076
  }
2017
2077
  }
2018
- async function Q(e, r) {
2078
+ async function me(e, r) {
2019
2079
  let { replace: i } = n;
2020
2080
  if (typeof i != "function") return null;
2021
2081
  try {
2022
2082
  let t = await i(e, r);
2023
- return Z(t), t;
2083
+ return pe(t), t;
2024
2084
  } catch (e) {
2025
2085
  return t.onError?.(e), null;
2026
2086
  }
@@ -2035,13 +2095,13 @@ function pn(t) {
2035
2095
  sortOption: l,
2036
2096
  isLoading: u,
2037
2097
  isUploading: d,
2038
- uploadProgress: m,
2098
+ uploadProgress: h,
2039
2099
  hasMore: f,
2040
- selectedItems: h,
2041
- previewItem: g,
2042
- frequentlyUsedItems: _,
2043
- deleteUsageInfo: v,
2044
- showDeleteWarning: y,
2100
+ selectedItems: g,
2101
+ previewItem: _,
2102
+ frequentlyUsedItems: v,
2103
+ deleteUsageInfo: y,
2104
+ showDeleteWarning: b,
2045
2105
  loadItems: F,
2046
2106
  loadMore: I,
2047
2107
  search: L,
@@ -2056,110 +2116,109 @@ function pn(t) {
2056
2116
  deleteSelected: U,
2057
2117
  isImportingFromUrl: S,
2058
2118
  importFromUrlError: C,
2059
- importFromUrl: K,
2060
- toggleSelection: se,
2061
- clearSelection: ce,
2062
- selectItem: le,
2063
- loadFolders: q,
2064
- createFolder: de,
2065
- renameFolder: fe,
2066
- deleteFolder: Y,
2067
- findFolderInTree: J,
2068
- loadFrequentlyUsed: ae,
2069
- checkUsageBeforeDelete: W,
2070
- confirmDelete: oe,
2071
- cancelDelete: G,
2119
+ importFromUrl: se,
2120
+ toggleSelection: K,
2121
+ clearSelection: q,
2122
+ selectItem: J,
2123
+ loadFolders: Y,
2124
+ createFolder: le,
2125
+ renameFolder: X,
2126
+ deleteFolder: de,
2127
+ findFolderInTree: ue,
2128
+ loadFrequentlyUsed: W,
2129
+ checkUsageBeforeDelete: G,
2130
+ confirmDelete: ae,
2131
+ cancelDelete: oe,
2072
2132
  isReplacing: w,
2073
2133
  replaceError: T,
2074
2134
  showReplaceWarning: E,
2075
2135
  pendingReplaceItem: D,
2076
2136
  replaceUsageInfo: O,
2077
- checkUsageBeforeReplace: X,
2078
- cancelReplace: pe,
2079
- replaceFile: me,
2080
- replaceMediaDirectly: Q,
2137
+ checkUsageBeforeReplace: fe,
2138
+ cancelReplace: Z,
2139
+ replaceFile: Q,
2140
+ replaceMediaDirectly: me,
2081
2141
  storageInfo: k,
2082
- loadStorage: ue
2142
+ loadStorage: ce
2083
2143
  };
2084
2144
  }
2085
- //#endregion
2086
- //#region ../media-library/src/components/MediaLibraryChrome.vue?vue&type=script&setup=true&lang.ts
2087
- var mn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl:overflow-hidden" }, hn = {
2145
+ // ../media-library/src/components/MediaLibraryChrome.vue?vue&type=script&setup=true&lang.ts
2146
+ var hn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl:overflow-hidden" }, gn = {
2088
2147
  class: "tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-between tpl:border-b tpl:px-5 tpl:py-3.5",
2089
2148
  style: { "border-color": "var(--tpl-border)" }
2090
- }, gn = {
2149
+ }, _n = {
2091
2150
  id: "tpl-media-library-title",
2092
2151
  class: "tpl:text-sm tpl:font-semibold",
2093
2152
  style: { color: "var(--tpl-text)" }
2094
- }, _n = { class: "tpl:flex tpl:items-center tpl:gap-3" }, vn = { class: "tpl:relative" }, yn = [
2153
+ }, vn = { class: "tpl:flex tpl:items-center tpl:gap-3" }, yn = { class: "tpl:relative" }, bn = [
2095
2154
  "value",
2096
2155
  "disabled",
2097
2156
  "aria-label",
2098
2157
  "placeholder"
2099
- ], bn = ["aria-label"], xn = { class: "tpl:flex tpl:min-h-0 tpl:flex-1 tpl:overflow-hidden" }, Sn = {
2158
+ ], xn = ["aria-label"], Sn = { class: "tpl:flex tpl:min-h-0 tpl:flex-1 tpl:overflow-hidden" }, Cn = {
2100
2159
  key: 0,
2101
2160
  class: "tpl:flex tpl:w-48 tpl:shrink-0 tpl:flex-col tpl:border-r",
2102
2161
  style: {
2103
2162
  "border-color": "var(--tpl-border)",
2104
2163
  "background-color": "var(--tpl-bg)"
2105
2164
  }
2106
- }, Cn = { class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:flex-col" }, wn = {
2165
+ }, wn = { class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:flex-col" }, Tn = {
2107
2166
  class: "tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-between tpl:border-b tpl:px-4 tpl:py-2.5",
2108
2167
  style: { "border-color": "var(--tpl-border)" }
2109
- }, Tn = { class: "tpl:flex tpl:items-center tpl:gap-2" }, En = [
2168
+ }, En = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Dn = [
2110
2169
  "title",
2111
2170
  "aria-label",
2112
2171
  "aria-pressed"
2113
- ], Dn = {
2172
+ ], On = {
2114
2173
  key: 1,
2115
2174
  class: "tpl:text-xs tpl:font-medium",
2116
2175
  style: { color: "var(--tpl-text)" }
2117
- }, On = {
2176
+ }, kn = {
2118
2177
  class: "tpl:flex tpl:rounded-md tpl:p-0.5",
2119
2178
  style: {
2120
2179
  border: "1px solid var(--tpl-border)",
2121
2180
  "background-color": "var(--tpl-bg)"
2122
2181
  }
2123
- }, kn = [
2182
+ }, An = [
2124
2183
  "title",
2125
2184
  "aria-label",
2126
2185
  "aria-pressed"
2127
- ], An = [
2186
+ ], jn = [
2128
2187
  "title",
2129
2188
  "aria-label",
2130
2189
  "aria-pressed"
2131
- ], jn = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Mn = ["aria-label", "value"], Nn = { value: "" }, Pn = ["value"], Fn = { class: "tpl:min-h-0 tpl:flex-1 tpl:overflow-y-auto" }, In = {
2190
+ ], Mn = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Nn = ["aria-label", "value"], Pn = { value: "" }, Fn = ["value"], In = { class: "tpl:min-h-0 tpl:flex-1 tpl:overflow-y-auto" }, Ln = {
2132
2191
  key: 0,
2133
2192
  class: "tpl:px-4 tpl:pt-3"
2134
- }, Ln = {
2193
+ }, Rn = {
2135
2194
  class: "tpl-scale-in tpl:mx-4 tpl:w-full tpl:max-w-sm tpl:rounded-[var(--tpl-radius-lg)] tpl:p-5",
2136
2195
  style: {
2137
2196
  "background-color": "var(--tpl-bg-elevated)",
2138
2197
  "box-shadow": "var(--tpl-shadow-xl)"
2139
2198
  }
2140
- }, Rn = {
2199
+ }, zn = {
2141
2200
  id: "tpl-media-delete-title",
2142
2201
  class: "tpl:mb-2 tpl:text-sm tpl:font-semibold",
2143
2202
  style: { color: "var(--tpl-text)" }
2144
- }, zn = {
2203
+ }, Bn = {
2145
2204
  key: 0,
2146
2205
  "data-testid": "media-delete-usage",
2147
2206
  class: "tpl:mb-4 tpl:text-xs",
2148
2207
  style: { color: "var(--tpl-text-muted)" }
2149
- }, Bn = {
2208
+ }, Vn = {
2150
2209
  key: 1,
2151
2210
  class: "tpl:mb-4 tpl:max-h-32 tpl:overflow-y-auto tpl:rounded tpl:border tpl:p-2",
2152
2211
  style: { "border-color": "var(--tpl-border)" }
2153
- }, Vn = { class: "tpl:font-medium" }, Hn = { style: { color: "var(--tpl-text-muted)" } }, Un = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, Wn = {
2212
+ }, Hn = { class: "tpl:font-medium" }, Un = { style: { color: "var(--tpl-text-muted)" } }, Wn = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, Gn = {
2154
2213
  class: "tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-between tpl:border-t tpl:px-5 tpl:py-3",
2155
2214
  style: { "border-color": "var(--tpl-border)" }
2156
- }, Gn = { class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:items-center tpl:gap-3" }, Kn = { class: "tpl:flex tpl:items-center tpl:gap-5" }, qn = {
2215
+ }, Kn = { class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:items-center tpl:gap-3" }, qn = { class: "tpl:flex tpl:items-center tpl:gap-5" }, Jn = {
2157
2216
  key: 0,
2158
2217
  class: "tpl:flex tpl:items-center tpl:gap-2"
2159
- }, Jn = {
2218
+ }, Yn = {
2160
2219
  key: 1,
2161
2220
  class: "tpl:relative"
2162
- }, Yn = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Xn = ["data-testid", "disabled"], Zn = /* @__PURE__ */ t({
2221
+ }, Xn = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Zn = ["data-testid", "disabled"], Qn = /* @__PURE__ */ D({
2163
2222
  __name: "MediaLibraryChrome",
2164
2223
  props: {
2165
2224
  provider: {},
@@ -2177,109 +2236,110 @@ var mn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2177
2236
  "ready"
2178
2237
  ],
2179
2238
  setup(e, { expose: t, emit: n }) {
2180
- let a = e, s = n, d = c(() => import("./MediaEditModal-BuHCiyMu.js")), f = O(() => a.translations), h = O(() => a.confirmTestId ?? "media-confirm"), _ = {
2239
+ let i = e, u = n, d = E(() => import("./MediaEditModal-Dy08GEwE.js")), p = h(() => i.translations), m = h(() => i.confirmTestId ?? "media-confirm"), C = {
2181
2240
  get maxFileSize() {
2182
- return a.provider.maxFileSize;
2241
+ return i.provider.maxFileSize;
2183
2242
  },
2184
2243
  get mimeTypes() {
2185
- return a.provider.mimeTypes;
2244
+ return i.provider.mimeTypes;
2186
2245
  },
2187
2246
  get accept() {
2188
- return a.accept;
2247
+ return i.accept;
2189
2248
  }
2190
2249
  };
2191
- r(de, _);
2192
- let { isAcceptedMimeType: b, availableCategories: E } = Q(_), k = pn({
2193
- provider: a.provider,
2194
- templateId: () => a.templateId,
2195
- onError: (e) => a.onError?.(e)
2196
- }), N = fn({
2197
- library: k,
2198
- translations: f
2199
- }), P = O(() => typeof a.provider.create == "function"), F = O(() => a.provider.folders !== !1), I = O(() => typeof a.provider.importFromUrl == "function"), L = O(() => typeof a.provider.delete == "function"), R = O(() => typeof a.provider.update == "function"), z = O(() => typeof a.provider.replace == "function"), B = O(() => typeof a.provider.frequentlyUsed == "function"), V = O(() => {
2200
- let e = a.provider.folders;
2250
+ a(ue, C);
2251
+ let { isAcceptedMimeType: D, availableCategories: k } = he(C), j = mn({
2252
+ provider: i.provider,
2253
+ templateId: () => i.templateId,
2254
+ onError: (e) => i.onError?.(e)
2255
+ }), N = pn({
2256
+ library: j,
2257
+ translations: p
2258
+ }), P = h(() => typeof i.provider.create == "function"), F = h(() => i.provider.folders !== !1), I = h(() => typeof i.provider.importFromUrl == "function"), L = h(() => typeof i.provider.delete == "function"), R = h(() => typeof i.provider.update == "function"), z = h(() => typeof i.provider.replace == "function"), B = h(() => typeof i.provider.frequentlyUsed == "function"), ee = h(() => {
2259
+ let e = i.provider.folders;
2201
2260
  return e !== !1 && typeof e.move == "function";
2202
- }), ee = O(() => {
2203
- let e = a.provider.folders;
2261
+ }), ne = h(() => {
2262
+ let e = i.provider.folders;
2204
2263
  return e !== !1 && typeof e.create == "function";
2205
- }), te = O(() => {
2206
- let e = a.provider.folders;
2264
+ }), H = h(() => {
2265
+ let e = i.provider.folders;
2207
2266
  return e !== !1 && typeof e.update == "function";
2208
- }), H = O(() => {
2209
- let e = a.provider.folders;
2267
+ }), U = h(() => {
2268
+ let e = i.provider.folders;
2210
2269
  return e !== !1 && typeof e.delete == "function";
2211
- }), U = O(() => k.isLoading.value && N.displayItems.value.length === 0), W = O(() => {
2212
- let e = k.previewItem.value;
2213
- return e ? !a.accept?.length || b(e.mimeType ?? "", a.accept) : !1;
2214
- }), G = O(() => {
2270
+ }), W = h(() => j.isLoading.value && N.displayItems.value.length === 0), G = h(() => {
2271
+ let e = j.previewItem.value;
2272
+ return e ? !i.accept?.length || D(e.mimeType ?? "", i.accept) : !1;
2273
+ }), oe = h(() => {
2215
2274
  if (!L.value) return 0;
2216
2275
  let e = 0;
2217
- for (let t of k.selectedItems.value) N.displayItems.value.find((e) => e.id === t)?.canDelete !== !1 && (e += 1);
2276
+ for (let t of j.selectedItems.value) N.displayItems.value.find((e) => e.id === t)?.canDelete !== !1 && (e += 1);
2218
2277
  return e;
2219
- }), K = O(() => N.showImportUrlModal.value || N.editingItem.value !== null || k.showReplaceWarning.value);
2220
- function ce() {
2221
- return K.value ? !0 : N.showMovePicker.value ? (N.showMovePicker.value = !1, !0) : k.showDeleteWarning.value ? (k.cancelDelete(), !0) : !1;
2222
- }
2278
+ }), K = h(() => N.showImportUrlModal.value || N.editingItem.value !== null || j.showReplaceWarning.value);
2223
2279
  function q() {
2224
- W.value && k.previewItem.value && s("confirm", k.previewItem.value);
2280
+ return K.value ? !0 : N.showMovePicker.value ? (N.showMovePicker.value = !1, !0) : j.showDeleteWarning.value ? (j.cancelDelete(), !0) : !1;
2225
2281
  }
2226
- function J(e) {
2227
- k.filterByCategory(e.target.value || null);
2282
+ function J() {
2283
+ G.value && j.previewItem.value && u("confirm", j.previewItem.value);
2228
2284
  }
2229
- async function fe() {
2285
+ function le(e) {
2286
+ let t = e.target.value;
2287
+ j.filterByCategory(t || null);
2288
+ }
2289
+ async function X() {
2230
2290
  let e = /* @__PURE__ */ new Set();
2231
- for (let t of k.selectedItems.value) N.displayItems.value.find((e) => e.id === t)?.canDelete !== !1 && e.add(t);
2232
- k.selectedItems.value = e, await N.handleDeleteClick();
2291
+ for (let t of j.selectedItems.value) N.displayItems.value.find((e) => e.id === t)?.canDelete !== !1 && e.add(t);
2292
+ j.selectedItems.value = e, await N.handleDeleteClick();
2233
2293
  }
2234
- return u(() => a.accept, (e) => {
2235
- e?.length === 1 && (k.categoryFilter.value = e[0]);
2236
- }, { immediate: !0 }), k.loadItems(), k.loadFrequentlyUsed(), k.loadStorage(), s("ready"), x(() => {
2294
+ return O(() => i.accept, (e) => {
2295
+ e?.length === 1 && (j.categoryFilter.value = e[0]);
2296
+ }, { immediate: !0 }), j.loadItems(), j.loadFrequentlyUsed(), j.loadStorage(), u("ready"), l(() => {
2237
2297
  N.resetUI();
2238
2298
  }), t({
2239
2299
  nestedDialogOpen: K,
2240
- handleEscape: ce,
2241
- library: k,
2300
+ handleEscape: q,
2301
+ library: j,
2242
2302
  ui: N
2243
- }), (t, n) => (o(), p("div", mn, [
2244
- w("div", hn, [w("h2", gn, g(f.value.mediaLibrary.title), 1), w("div", _n, [
2245
- D(k).storageInfo.value ? (o(), y(un, {
2303
+ }), (t, n) => (y(), _("div", hn, [
2304
+ x("div", gn, [x("h2", _n, c(p.value.mediaLibrary.title), 1), x("div", vn, [
2305
+ w(j).storageInfo.value ? (y(), T(dn, {
2246
2306
  key: 0,
2247
- "used-bytes": D(k).storageInfo.value.usedBytes,
2248
- "limit-bytes": D(k).storageInfo.value.limitBytes,
2307
+ "used-bytes": w(j).storageInfo.value.usedBytes,
2308
+ "limit-bytes": w(j).storageInfo.value.limitBytes,
2249
2309
  size: 22
2250
- }, null, 8, ["used-bytes", "limit-bytes"])) : v("", !0),
2251
- w("div", vn, [w("input", {
2252
- value: D(N).searchInput.value,
2310
+ }, null, 8, ["used-bytes", "limit-bytes"])) : g("", !0),
2311
+ x("div", yn, [x("input", {
2312
+ value: w(N).searchInput.value,
2253
2313
  type: "search",
2254
- disabled: U.value,
2255
- "aria-label": f.value.mediaLibrary.searchAriaLabel,
2314
+ disabled: W.value,
2315
+ "aria-label": p.value.mediaLibrary.searchAriaLabel,
2256
2316
  class: "tpl:w-52 tpl:rounded-md tpl:border tpl:py-1.5 tpl:pr-3 tpl:pl-8 tpl:text-xs tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:outline-none tpl:focus:shadow-[var(--tpl-ring)] tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50",
2257
2317
  style: {
2258
2318
  "border-color": "var(--tpl-border)",
2259
2319
  "background-color": "var(--tpl-bg)",
2260
2320
  color: "var(--tpl-text)"
2261
2321
  },
2262
- placeholder: f.value.mediaLibrary.searchPlaceholder,
2263
- onInput: n[0] ||= (e) => D(N).handleSearchInput(e.target.value)
2264
- }, null, 40, yn), M(D(re), {
2322
+ placeholder: p.value.mediaLibrary.searchPlaceholder,
2323
+ onInput: n[0] ||= (e) => w(N).handleSearchInput(e.target.value)
2324
+ }, null, 40, bn), f(w(ae), {
2265
2325
  class: "tpl:absolute tpl:top-1/2 tpl:left-2.5 tpl:-translate-y-1/2",
2266
2326
  size: 13,
2267
2327
  "stroke-width": 2,
2268
2328
  style: { color: "var(--tpl-text-dim)" }
2269
2329
  })]),
2270
- e.showClose ? (o(), p("button", {
2330
+ e.showClose ? (y(), _("button", {
2271
2331
  key: 1,
2272
2332
  type: "button",
2273
- "aria-label": f.value.mediaLibrary.close,
2333
+ "aria-label": p.value.mediaLibrary.close,
2274
2334
  class: "tpl:flex tpl:size-7 tpl:items-center tpl:justify-center tpl:rounded-md tpl:transition-all tpl:duration-150",
2275
2335
  style: { color: "var(--tpl-text-muted)" },
2276
- onClick: n[1] ||= (e) => s("close")
2277
- }, [M(D(se), {
2336
+ onClick: n[1] ||= (e) => u("close")
2337
+ }, [f(w(se), {
2278
2338
  size: 18,
2279
2339
  "stroke-width": 2
2280
- })], 8, bn)) : v("", !0)
2340
+ })], 8, xn)) : g("", !0)
2281
2341
  ])]),
2282
- w("div", xn, [M(T, {
2342
+ x("div", Sn, [f(M, {
2283
2343
  "enter-active-class": "tpl:transition-all tpl:duration-200 tpl:ease-out",
2284
2344
  "enter-from-class": "tpl:-ml-48 tpl:opacity-0",
2285
2345
  "enter-to-class": "tpl:ml-0 tpl:opacity-100",
@@ -2287,19 +2347,19 @@ var mn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2287
2347
  "leave-from-class": "tpl:ml-0 tpl:opacity-100",
2288
2348
  "leave-to-class": "tpl:-ml-48 tpl:opacity-0"
2289
2349
  }, {
2290
- default: l(() => [F.value && D(N).showSidebar.value ? (o(), p("div", Sn, [M(Pe, {
2291
- folders: D(N).folderTree.value,
2292
- "current-folder-id": D(k).currentFolderId.value,
2293
- "view-mode": D(k).viewMode.value,
2294
- "has-frequently-used": B.value && D(N).hasFrequentlyUsed.value,
2295
- "can-create-folder": ee.value,
2296
- "can-rename-folder": te.value,
2297
- "can-delete-folder": H.value,
2298
- onNavigate: D(k).navigateToFolder,
2299
- onCreateFolder: D(N).handleCreateFolder,
2300
- onRenameFolder: D(N).handleRenameFolder,
2301
- onDeleteFolder: D(N).handleDeleteFolder,
2302
- onShowFrequentlyUsed: D(k).showFrequentlyUsed
2350
+ default: r(() => [F.value && w(N).showSidebar.value ? (y(), _("div", Cn, [f(Fe, {
2351
+ folders: w(N).folderTree.value,
2352
+ "current-folder-id": w(j).currentFolderId.value,
2353
+ "view-mode": w(j).viewMode.value,
2354
+ "has-frequently-used": B.value && w(N).hasFrequentlyUsed.value,
2355
+ "can-create-folder": ne.value,
2356
+ "can-rename-folder": H.value,
2357
+ "can-delete-folder": U.value,
2358
+ onNavigate: w(j).navigateToFolder,
2359
+ onCreateFolder: w(N).handleCreateFolder,
2360
+ onRenameFolder: w(N).handleRenameFolder,
2361
+ onDeleteFolder: w(N).handleDeleteFolder,
2362
+ onShowFrequentlyUsed: w(j).showFrequentlyUsed
2303
2363
  }, null, 8, [
2304
2364
  "folders",
2305
2365
  "current-folder-id",
@@ -2313,90 +2373,90 @@ var mn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2313
2373
  "onRenameFolder",
2314
2374
  "onDeleteFolder",
2315
2375
  "onShowFrequentlyUsed"
2316
- ])])) : v("", !0)]),
2376
+ ])])) : g("", !0)]),
2317
2377
  _: 1
2318
- }), w("div", Cn, [w("div", wn, [w("div", Tn, [
2319
- F.value ? (o(), p("button", {
2378
+ }), x("div", wn, [x("div", Tn, [x("div", En, [
2379
+ F.value ? (y(), _("button", {
2320
2380
  key: 0,
2321
2381
  type: "button",
2322
2382
  "data-testid": "media-folder-toggle",
2323
2383
  class: "tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:transition-all tpl:duration-150",
2324
- style: j({
2325
- color: D(N).showSidebar.value ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
2326
- backgroundColor: D(N).showSidebar.value ? "var(--tpl-bg)" : "transparent",
2327
- border: D(N).showSidebar.value ? "1px solid var(--tpl-border)" : "1px solid transparent"
2384
+ style: o({
2385
+ color: w(N).showSidebar.value ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
2386
+ backgroundColor: w(N).showSidebar.value ? "var(--tpl-bg)" : "transparent",
2387
+ border: w(N).showSidebar.value ? "1px solid var(--tpl-border)" : "1px solid transparent"
2328
2388
  }),
2329
- title: D(N).showSidebar.value ? f.value.mediaLibrary.hideFolders : f.value.mediaLibrary.showFolders,
2330
- "aria-label": D(N).showSidebar.value ? f.value.mediaLibrary.hideFolders : f.value.mediaLibrary.showFolders,
2331
- "aria-pressed": D(N).showSidebar.value,
2332
- onClick: n[2] ||= (e) => D(N).showSidebar.value = !D(N).showSidebar.value
2333
- }, [M(D(ne), {
2389
+ title: w(N).showSidebar.value ? p.value.mediaLibrary.hideFolders : p.value.mediaLibrary.showFolders,
2390
+ "aria-label": w(N).showSidebar.value ? p.value.mediaLibrary.hideFolders : p.value.mediaLibrary.showFolders,
2391
+ "aria-pressed": w(N).showSidebar.value,
2392
+ onClick: n[2] ||= (e) => w(N).showSidebar.value = !w(N).showSidebar.value
2393
+ }, [f(w(Y), {
2334
2394
  size: 16,
2335
2395
  "stroke-width": 2
2336
- })], 12, En)) : v("", !0),
2337
- D(k).viewMode.value === "frequently-used" ? (o(), p("span", Dn, g(f.value.mediaLibrary.frequentlyUsed), 1)) : (o(), y(be, {
2396
+ })], 12, Dn)) : g("", !0),
2397
+ w(j).viewMode.value === "frequently-used" ? (y(), _("span", On, c(p.value.mediaLibrary.frequentlyUsed), 1)) : (y(), T(xe, {
2338
2398
  key: 2,
2339
- folders: D(N).folderTree.value,
2340
- "current-folder-id": D(k).currentFolderId.value,
2341
- onNavigate: D(k).navigateToFolder
2399
+ folders: w(N).folderTree.value,
2400
+ "current-folder-id": w(j).currentFolderId.value,
2401
+ onNavigate: w(j).navigateToFolder
2342
2402
  }, null, 8, [
2343
2403
  "folders",
2344
2404
  "current-folder-id",
2345
2405
  "onNavigate"
2346
2406
  ])),
2347
- w("div", On, [w("button", {
2407
+ x("div", kn, [x("button", {
2348
2408
  type: "button",
2349
2409
  class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:transition-all tpl:duration-150",
2350
- style: j({
2351
- color: D(N).layoutMode.value === "grid" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
2352
- backgroundColor: D(N).layoutMode.value === "grid" ? "var(--tpl-bg-elevated)" : "transparent"
2410
+ style: o({
2411
+ color: w(N).layoutMode.value === "grid" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
2412
+ backgroundColor: w(N).layoutMode.value === "grid" ? "var(--tpl-bg-elevated)" : "transparent"
2353
2413
  }),
2354
- title: f.value.mediaLibrary.viewGrid,
2355
- "aria-label": f.value.mediaLibrary.viewGrid,
2356
- "aria-pressed": D(N).layoutMode.value === "grid",
2357
- onClick: n[3] ||= (e) => D(N).layoutMode.value = "grid"
2358
- }, [M(D(le), {
2414
+ title: p.value.mediaLibrary.viewGrid,
2415
+ "aria-label": p.value.mediaLibrary.viewGrid,
2416
+ "aria-pressed": w(N).layoutMode.value === "grid",
2417
+ onClick: n[3] ||= (e) => w(N).layoutMode.value = "grid"
2418
+ }, [f(w(ce), {
2359
2419
  size: 14,
2360
2420
  "stroke-width": 2
2361
- })], 12, kn), w("button", {
2421
+ })], 12, An), x("button", {
2362
2422
  type: "button",
2363
2423
  class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:transition-all tpl:duration-150",
2364
- style: j({
2365
- color: D(N).layoutMode.value === "list" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
2366
- backgroundColor: D(N).layoutMode.value === "list" ? "var(--tpl-bg-elevated)" : "transparent"
2424
+ style: o({
2425
+ color: w(N).layoutMode.value === "list" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
2426
+ backgroundColor: w(N).layoutMode.value === "list" ? "var(--tpl-bg-elevated)" : "transparent"
2367
2427
  }),
2368
- title: f.value.mediaLibrary.viewList,
2369
- "aria-label": f.value.mediaLibrary.viewList,
2370
- "aria-pressed": D(N).layoutMode.value === "list",
2371
- onClick: n[4] ||= (e) => D(N).layoutMode.value = "list"
2372
- }, [M(D(ae), {
2428
+ title: p.value.mediaLibrary.viewList,
2429
+ "aria-label": p.value.mediaLibrary.viewList,
2430
+ "aria-pressed": w(N).layoutMode.value === "list",
2431
+ onClick: n[4] ||= (e) => w(N).layoutMode.value = "list"
2432
+ }, [f(w(ie), {
2373
2433
  size: 14,
2374
2434
  "stroke-width": 2
2375
- })], 12, An)])
2376
- ]), w("div", jn, [D(E).length > 1 ? (o(), p("select", {
2435
+ })], 12, jn)])
2436
+ ]), x("div", Mn, [w(k).length > 1 ? (y(), _("select", {
2377
2437
  key: 0,
2378
- "aria-label": f.value.mediaLibrary.filterAriaLabel,
2438
+ "aria-label": p.value.mediaLibrary.filterAriaLabel,
2379
2439
  class: "tpl:rounded-md tpl:border tpl:py-1.5 tpl:pr-7 tpl:pl-2.5 tpl:text-xs tpl:transition-all tpl:duration-150 tpl:outline-none",
2380
2440
  style: {
2381
2441
  "border-color": "var(--tpl-border)",
2382
2442
  "background-color": "var(--tpl-bg)",
2383
2443
  color: "var(--tpl-text)"
2384
2444
  },
2385
- value: D(k).categoryFilter.value ?? "",
2386
- onChange: J
2387
- }, [w("option", Nn, g(f.value.mediaLibrary.filterAll), 1), (o(!0), p(A, null, i(D(E), (e) => (o(), p("option", {
2445
+ value: w(j).categoryFilter.value ?? "",
2446
+ onChange: le
2447
+ }, [x("option", Pn, c(p.value.mediaLibrary.filterAll), 1), (y(!0), _(S, null, s(w(k), (e) => (y(), _("option", {
2388
2448
  key: e,
2389
2449
  value: e
2390
- }, g(D(N).getCategoryLabel(e)), 9, Pn))), 128))], 40, Mn)) : v("", !0)])]), w("div", Fn, [D(k).viewMode.value === "files" && (P.value || I.value) ? (o(), p("div", In, [P.value ? (o(), y(rn, {
2450
+ }, c(w(N).getCategoryLabel(e)), 9, Fn))), 128))], 40, Nn)) : g("", !0)])]), x("div", In, [w(j).viewMode.value === "files" && (P.value || I.value) ? (y(), _("div", Ln, [P.value ? (y(), T(an, {
2391
2451
  key: 0,
2392
- "is-uploading": D(k).isUploading.value,
2393
- "upload-progress": D(k).uploadProgress.value,
2394
- onUpload: D(N).handleUpload
2452
+ "is-uploading": w(j).isUploading.value,
2453
+ "upload-progress": w(j).uploadProgress.value,
2454
+ onUpload: w(N).handleUpload
2395
2455
  }, null, 8, [
2396
2456
  "is-uploading",
2397
2457
  "upload-progress",
2398
2458
  "onUpload"
2399
- ])) : v("", !0), I.value ? (o(), p("button", {
2459
+ ])) : g("", !0), I.value ? (y(), _("button", {
2400
2460
  key: 1,
2401
2461
  "data-testid": "media-import-url",
2402
2462
  class: "tpl:mt-2 tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:border-dashed tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
@@ -2405,26 +2465,26 @@ var mn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2405
2465
  color: "var(--tpl-text-muted)",
2406
2466
  "background-color": "var(--tpl-bg)"
2407
2467
  },
2408
- onClick: n[5] ||= (e) => D(N).showImportUrlModal.value = !0
2409
- }, [M(D(oe), {
2468
+ onClick: n[5] ||= (e) => w(N).showImportUrlModal.value = !0
2469
+ }, [f(w(re), {
2410
2470
  size: 14,
2411
2471
  "stroke-width": 2
2412
- }), m(" " + g(f.value.mediaLibrary.importFromUrl), 1)])) : v("", !0)])) : v("", !0), M(ft, {
2413
- items: D(N).displayItems.value,
2414
- "selected-ids": D(k).selectedItems.value,
2415
- "is-loading": D(k).isLoading.value,
2416
- "has-more": D(k).viewMode.value === "files" && D(k).hasMore.value,
2472
+ }), v(" " + c(p.value.mediaLibrary.importFromUrl), 1)])) : g("", !0)])) : g("", !0), f(pt, {
2473
+ items: w(N).displayItems.value,
2474
+ "selected-ids": w(j).selectedItems.value,
2475
+ "is-loading": w(j).isLoading.value,
2476
+ "has-more": w(j).viewMode.value === "files" && w(j).hasMore.value,
2417
2477
  accept: e.accept,
2418
- layout: D(N).layoutMode.value,
2419
- "search-query": D(k).searchQuery.value,
2478
+ layout: w(N).layoutMode.value,
2479
+ "search-query": w(j).searchQuery.value,
2420
2480
  "can-update": R.value,
2421
2481
  "can-replace": z.value,
2422
- onSelect: D(N).handleSelect,
2423
- onToggle: D(k).toggleSelection,
2424
- onLoadMore: D(k).loadMore,
2425
- onEdit: D(N).handleEditItem,
2426
- onReplace: D(N).handleReplaceItem,
2427
- onConfirm: q
2482
+ onSelect: w(N).handleSelect,
2483
+ onToggle: w(j).toggleSelection,
2484
+ onLoadMore: w(j).loadMore,
2485
+ onEdit: w(N).handleEditItem,
2486
+ onReplace: w(N).handleReplaceItem,
2487
+ onConfirm: J
2428
2488
  }, null, 8, [
2429
2489
  "items",
2430
2490
  "selected-ids",
@@ -2441,38 +2501,38 @@ var mn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2441
2501
  "onEdit",
2442
2502
  "onReplace"
2443
2503
  ])])])]),
2444
- M(Ct, {
2445
- visible: D(N).showImportUrlModal.value,
2446
- "is-importing": D(k).isImportingFromUrl.value,
2447
- error: D(k).importFromUrlError.value,
2448
- onImport: D(N).handleImportFromUrl,
2449
- onClose: n[6] ||= (e) => D(N).showImportUrlModal.value = !1
2504
+ f(wt, {
2505
+ visible: w(N).showImportUrlModal.value,
2506
+ "is-importing": w(j).isImportingFromUrl.value,
2507
+ error: w(j).importFromUrlError.value,
2508
+ onImport: w(N).handleImportFromUrl,
2509
+ onClose: n[6] ||= (e) => w(N).showImportUrlModal.value = !1
2450
2510
  }, null, 8, [
2451
2511
  "visible",
2452
2512
  "is-importing",
2453
2513
  "error",
2454
2514
  "onImport"
2455
2515
  ]),
2456
- D(N).editingItem.value ? (o(), y(D(d), {
2516
+ w(N).editingItem.value ? (y(), T(w(d), {
2457
2517
  key: 0,
2458
2518
  visible: !0,
2459
- item: D(N).editingItem.value,
2460
- save: D(N).handleEditSave,
2461
- "can-crop": z.value && D(N).editingItem.value.canUpdate !== !1,
2462
- onClose: n[7] ||= (e) => D(N).editingItem.value = null
2519
+ item: w(N).editingItem.value,
2520
+ save: w(N).handleEditSave,
2521
+ "can-crop": z.value && w(N).editingItem.value.canUpdate !== !1,
2522
+ onClose: n[7] ||= (e) => w(N).editingItem.value = null
2463
2523
  }, null, 8, [
2464
2524
  "item",
2465
2525
  "save",
2466
2526
  "can-crop"
2467
- ])) : v("", !0),
2468
- M(Yt, {
2469
- visible: D(k).showReplaceWarning.value,
2470
- item: D(k).pendingReplaceItem.value,
2471
- "usage-info": D(k).replaceUsageInfo.value,
2472
- "is-replacing": D(k).isReplacing.value,
2473
- error: D(k).replaceError.value,
2474
- onReplace: D(N).handleReplaceFile,
2475
- onClose: D(k).cancelReplace
2527
+ ])) : g("", !0),
2528
+ f(Xt, {
2529
+ visible: w(j).showReplaceWarning.value,
2530
+ item: w(j).pendingReplaceItem.value,
2531
+ "usage-info": w(j).replaceUsageInfo.value,
2532
+ "is-replacing": w(j).isReplacing.value,
2533
+ error: w(j).replaceError.value,
2534
+ onReplace: w(N).handleReplaceFile,
2535
+ onClose: w(j).cancelReplace
2476
2536
  }, null, 8, [
2477
2537
  "visible",
2478
2538
  "item",
@@ -2482,7 +2542,7 @@ var mn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2482
2542
  "onReplace",
2483
2543
  "onClose"
2484
2544
  ]),
2485
- M(T, {
2545
+ f(M, {
2486
2546
  "enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
2487
2547
  "enter-from-class": "tpl:opacity-0",
2488
2548
  "enter-to-class": "tpl:opacity-100",
@@ -2490,7 +2550,7 @@ var mn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2490
2550
  "leave-from-class": "tpl:opacity-100",
2491
2551
  "leave-to-class": "tpl:opacity-0"
2492
2552
  }, {
2493
- default: l(() => [D(k).showDeleteWarning.value ? (o(), p("div", {
2553
+ default: r(() => [w(j).showDeleteWarning.value ? (y(), _("div", {
2494
2554
  key: 0,
2495
2555
  role: "dialog",
2496
2556
  "aria-modal": "true",
@@ -2501,79 +2561,79 @@ var mn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2501
2561
  "backdrop-filter": "blur(8px)",
2502
2562
  "-webkit-backdrop-filter": "blur(8px)"
2503
2563
  },
2504
- onClick: n[10] ||= S((...e) => D(k).cancelDelete && D(k).cancelDelete(...e), ["self"])
2505
- }, [w("div", Ln, [
2506
- w("h3", Rn, g(f.value.mediaLibrary.deleteWarningTitle), 1),
2507
- w("p", {
2508
- class: C(["tpl:text-xs", D(N).hasUsedFiles.value ? "tpl:mb-2" : "tpl:mb-4"]),
2564
+ onClick: n[10] ||= A((...e) => w(j).cancelDelete && w(j).cancelDelete(...e), ["self"])
2565
+ }, [x("div", Rn, [
2566
+ x("h3", zn, c(p.value.mediaLibrary.deleteWarningTitle), 1),
2567
+ x("p", {
2568
+ class: b(["tpl:text-xs", w(N).hasUsedFiles.value ? "tpl:mb-2" : "tpl:mb-4"]),
2509
2569
  style: { color: "var(--tpl-text-muted)" }
2510
- }, g(f.value.mediaLibrary.deleteWarningMessage), 3),
2511
- D(N).hasUsedFiles.value ? (o(), p("p", zn, g(f.value.mediaLibrary.deleteWarningUsageNote), 1)) : v("", !0),
2512
- D(N).hasUsedFiles.value ? (o(), p("div", Bn, [(o(!0), p(A, null, i(D(k).deleteUsageInfo.value, (e, t) => (o(), p("div", {
2570
+ }, c(p.value.mediaLibrary.deleteWarningMessage), 3),
2571
+ w(N).hasUsedFiles.value ? (y(), _("p", Bn, c(p.value.mediaLibrary.deleteWarningUsageNote), 1)) : g("", !0),
2572
+ w(N).hasUsedFiles.value ? (y(), _("div", Vn, [(y(!0), _(S, null, s(w(j).deleteUsageInfo.value, (e, t) => (y(), _("div", {
2513
2573
  key: t,
2514
2574
  class: "tpl:text-xs",
2515
2575
  style: { color: "var(--tpl-text)" }
2516
- }, [e.templateCount > 0 ? (o(), p(A, { key: 0 }, [w("span", Vn, g(D(N).displayItems.value.find((e) => e.id === t)?.filename || t), 1), w("span", Hn, " - " + g(f.value.mediaLibrary.usedInTemplates.replace("{count}", e.templateCount.toString())), 1)], 64)) : v("", !0)]))), 128))])) : v("", !0),
2517
- w("div", Un, [w("button", {
2576
+ }, [e.templateCount > 0 ? (y(), _(S, { key: 0 }, [x("span", Hn, c(w(N).displayItems.value.find((e) => e.id === t)?.filename || t), 1), x("span", Un, " - " + c(p.value.mediaLibrary.usedInTemplates.replace("{count}", e.templateCount.toString())), 1)], 64)) : g("", !0)]))), 128))])) : g("", !0),
2577
+ x("div", Wn, [x("button", {
2518
2578
  class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
2519
2579
  style: {
2520
2580
  "border-color": "var(--tpl-border)",
2521
2581
  color: "var(--tpl-text)",
2522
2582
  "background-color": "var(--tpl-bg)"
2523
2583
  },
2524
- onClick: n[8] ||= (...e) => D(k).cancelDelete && D(k).cancelDelete(...e)
2525
- }, g(f.value.mediaLibrary.cancel), 1), w("button", {
2584
+ onClick: n[8] ||= (...e) => w(j).cancelDelete && w(j).cancelDelete(...e)
2585
+ }, c(p.value.mediaLibrary.cancel), 1), x("button", {
2526
2586
  class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
2527
2587
  style: {
2528
2588
  "border-color": "var(--tpl-danger)",
2529
2589
  color: "var(--tpl-danger)",
2530
2590
  "background-color": "var(--tpl-bg)"
2531
2591
  },
2532
- onClick: n[9] ||= (...e) => D(k).confirmDelete && D(k).confirmDelete(...e)
2533
- }, g(D(N).hasUsedFiles.value ? f.value.mediaLibrary.deleteAnyway : f.value.mediaLibrary.confirmDelete), 1)])
2534
- ])])) : v("", !0)]),
2592
+ onClick: n[9] ||= (...e) => w(j).confirmDelete && w(j).confirmDelete(...e)
2593
+ }, c(w(N).hasUsedFiles.value ? p.value.mediaLibrary.deleteAnyway : p.value.mediaLibrary.confirmDelete), 1)])
2594
+ ])])) : g("", !0)]),
2535
2595
  _: 1
2536
2596
  }),
2537
- w("div", Wn, [w("div", Gn, [D(k).previewItem.value ? (o(), y(Ft, {
2597
+ x("div", Gn, [x("div", Kn, [w(j).previewItem.value ? (y(), T(It, {
2538
2598
  key: 0,
2539
- item: D(k).previewItem.value,
2540
- folders: D(N).folderTree.value
2541
- }, null, 8, ["item", "folders"])) : v("", !0)]), w("div", Kn, [D(k).selectedItems.value.size > 0 ? (o(), p("div", qn, [D(k).previewItem.value ? (o(), p("button", {
2599
+ item: w(j).previewItem.value,
2600
+ folders: w(N).folderTree.value
2601
+ }, null, 8, ["item", "folders"])) : g("", !0)]), x("div", qn, [w(j).selectedItems.value.size > 0 ? (y(), _("div", Jn, [w(j).previewItem.value ? (y(), _("button", {
2542
2602
  key: 0,
2543
2603
  class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-1 tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
2544
- style: j({
2545
- borderColor: D(N).copied.value ? "var(--tpl-success)" : "var(--tpl-border)",
2546
- color: D(N).copied.value ? "var(--tpl-success)" : "var(--tpl-text)",
2604
+ style: o({
2605
+ borderColor: w(N).copied.value ? "var(--tpl-success)" : "var(--tpl-border)",
2606
+ color: w(N).copied.value ? "var(--tpl-success)" : "var(--tpl-text)",
2547
2607
  backgroundColor: "var(--tpl-bg)"
2548
2608
  }),
2549
- onClick: n[11] ||= (e) => D(N).copy(D(N).selectedUrl.value)
2550
- }, [D(N).copied.value ? (o(), y(D(ue), {
2609
+ onClick: n[11] ||= (e) => w(N).copy(w(N).selectedUrl.value)
2610
+ }, [w(N).copied.value ? (y(), T(w(V), {
2551
2611
  key: 1,
2552
2612
  size: 12,
2553
2613
  "stroke-width": 2
2554
- })) : (o(), y(D(ie), {
2614
+ })) : (y(), T(w(te), {
2555
2615
  key: 0,
2556
2616
  size: 12,
2557
2617
  "stroke-width": 2
2558
- })), m(" " + g(D(N).copied.value ? f.value.mediaLibrary.copied : f.value.mediaLibrary.copyUrl), 1)], 4)) : v("", !0), V.value ? (o(), p("div", Jn, [w("button", {
2618
+ })), v(" " + c(w(N).copied.value ? p.value.mediaLibrary.copied : p.value.mediaLibrary.copyUrl), 1)], 4)) : g("", !0), ee.value ? (y(), _("div", Yn, [x("button", {
2559
2619
  class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
2560
2620
  style: {
2561
2621
  "border-color": "var(--tpl-border)",
2562
2622
  color: "var(--tpl-text)",
2563
2623
  "background-color": "var(--tpl-bg)"
2564
2624
  },
2565
- onClick: n[12] ||= (e) => D(N).showMovePicker.value = !D(N).showMovePicker.value
2566
- }, g(f.value.mediaLibrary.moveSelected), 1), D(N).showMovePicker.value ? (o(), y(Ot, {
2625
+ onClick: n[12] ||= (e) => w(N).showMovePicker.value = !w(N).showMovePicker.value
2626
+ }, c(p.value.mediaLibrary.moveSelected), 1), w(N).showMovePicker.value ? (y(), T(kt, {
2567
2627
  key: 0,
2568
- folders: D(N).folderTree.value,
2569
- "current-folder-id": D(k).currentFolderId.value,
2570
- onSelect: D(N).handleMoveToFolder,
2571
- onClose: n[13] ||= (e) => D(N).showMovePicker.value = !1
2628
+ folders: w(N).folderTree.value,
2629
+ "current-folder-id": w(j).currentFolderId.value,
2630
+ onSelect: w(N).handleMoveToFolder,
2631
+ onClose: n[13] ||= (e) => w(N).showMovePicker.value = !1
2572
2632
  }, null, 8, [
2573
2633
  "folders",
2574
2634
  "current-folder-id",
2575
2635
  "onSelect"
2576
- ])) : v("", !0)])) : v("", !0)])) : v("", !0), w("div", Yn, [G.value > 0 ? (o(), p("button", {
2636
+ ])) : g("", !0)])) : g("", !0)])) : g("", !0), x("div", Xn, [oe.value > 0 ? (y(), _("button", {
2577
2637
  key: 0,
2578
2638
  "data-testid": "media-delete",
2579
2639
  class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
@@ -2582,54 +2642,53 @@ var mn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2582
2642
  color: "var(--tpl-danger)",
2583
2643
  "background-color": "var(--tpl-bg)"
2584
2644
  },
2585
- onClick: fe
2586
- }, g(f.value.mediaLibrary.deleteSelected), 1)) : v("", !0), e.showConfirm ? (o(), p("button", {
2645
+ onClick: X
2646
+ }, c(p.value.mediaLibrary.deleteSelected), 1)) : g("", !0), e.showConfirm ? (y(), _("button", {
2587
2647
  key: 1,
2588
- "data-testid": h.value,
2648
+ "data-testid": m.value,
2589
2649
  class: "tpl:cursor-pointer tpl:rounded-md tpl:px-4 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:hover:bg-[var(--tpl-primary-hover)] tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50",
2590
2650
  style: {
2591
2651
  "background-color": "var(--tpl-primary)",
2592
2652
  color: "var(--tpl-on-primary)"
2593
2653
  },
2594
- disabled: !W.value,
2595
- onClick: q
2596
- }, g(e.accept?.length ? f.value.mediaLibrary.selectImage : f.value.mediaLibrary.selectFile), 9, Xn)) : v("", !0)])])])
2654
+ disabled: !G.value,
2655
+ onClick: J
2656
+ }, c(e.accept?.length ? p.value.mediaLibrary.selectImage : p.value.mediaLibrary.selectFile), 9, Zn)) : g("", !0)])])])
2597
2657
  ]));
2598
2658
  }
2599
- }), Qn = /* #__PURE__ */ Object.assign({
2600
- "./locales/ca.ts": () => import("./ca-CYQH3J0b.js"),
2601
- "./locales/de.ts": () => import("./de-JvCTMJPy.js"),
2602
- "./locales/en.ts": () => import("./en-ifvu6oPv.js"),
2603
- "./locales/es.ts": () => import("./es-CAv-Vldw.js"),
2604
- "./locales/fr.ts": () => import("./fr-DVPtxpR6.js"),
2605
- "./locales/ja.ts": () => import("./ja-dcWzjStz.js"),
2606
- "./locales/nl.ts": () => import("./nl-LZNqQgE4.js"),
2607
- "./locales/pt-BR.ts": () => import("./pt-BR-D6P_mNwA.js")
2659
+ }), $n = /* #__PURE__ */ Object.assign({
2660
+ "./locales/ca.ts": () => import("./ca-Cc6eL0ZS.js"),
2661
+ "./locales/de.ts": () => import("./de-DtrXVcuY.js"),
2662
+ "./locales/en.ts": () => import("./en-Db76vJbY.js"),
2663
+ "./locales/es.ts": () => import("./es-Dw_h7Oll.js"),
2664
+ "./locales/fr.ts": () => import("./fr-BJaeKu_8.js"),
2665
+ "./locales/ja.ts": () => import("./ja-Cu2HdYaK.js"),
2666
+ "./locales/nl.ts": () => import("./nl-1Ai2NykB.js"),
2667
+ "./locales/pt-BR.ts": () => import("./pt-BR-CIbp__Z7.js")
2608
2668
  });
2609
- function $n(e) {
2669
+ function er(e) {
2610
2670
  return Object.keys(e).map((e) => e.match(/\/([^/]+)\.ts$/)?.[1]).filter((e) => !!e);
2611
2671
  }
2612
- var er = $n(Qn);
2613
- function tr(e) {
2614
- return e.trim().replace(/_/g, "-").toLowerCase();
2615
- }
2672
+ var tr = er($n);
2616
2673
  function nr(e) {
2617
- let t = tr(e);
2618
- return er.find((e) => tr(e) === t);
2674
+ return e.trim().replace(/_/g, "-").toLowerCase();
2619
2675
  }
2620
2676
  function rr(e) {
2621
- return tr(e).split("-")[0];
2677
+ let t = nr(e);
2678
+ return tr.find((e) => nr(e) === t);
2622
2679
  }
2623
2680
  function ir(e) {
2624
- return nr(e) ?? nr(rr(e)) ?? "en";
2681
+ return nr(e).split("-")[0];
2682
+ }
2683
+ function ar(e) {
2684
+ return rr(e) ?? rr(ir(e)) ?? "en";
2625
2685
  }
2626
- async function ar(e) {
2627
- let t = Qn[`./locales/${ir(e)}.ts`];
2686
+ async function or(e) {
2687
+ let t = $n[`./locales/${ar(e)}.ts`];
2628
2688
  return (await t()).default;
2629
2689
  }
2630
- //#endregion
2631
- //#region ../media-library/src/components/MediaLibraryModal.vue?vue&type=script&setup=true&lang.ts
2632
- var or = ["data-tpl-theme"], sr = /* @__PURE__ */ t({
2690
+ // ../media-library/src/components/MediaLibraryModal.vue?vue&type=script&setup=true&lang.ts
2691
+ var sr = ["data-tpl-theme"], cr = /* @__PURE__ */ D({
2633
2692
  __name: "MediaLibraryModal",
2634
2693
  props: {
2635
2694
  visible: { type: Boolean },
@@ -2643,24 +2702,24 @@ var or = ["data-tpl-theme"], sr = /* @__PURE__ */ t({
2643
2702
  },
2644
2703
  emits: ["close", "select"],
2645
2704
  setup(t, { emit: n }) {
2646
- let i = t, a = n, s = e(null);
2647
- u(() => i.locale, async (e) => {
2648
- s.value = await ar(e ?? "en");
2649
- }, { immediate: !0 }), r(fe, s);
2650
- let c = O(() => i.uiTheme);
2651
- r(Y, c);
2652
- let d = k(() => i.popoverTarget ?? null);
2653
- r(J, d), r(X, k(() => i.locale));
2654
- let f = e(null), m = e(null);
2655
- ge(f, O(() => i.visible && s.value !== null && !m.value?.nestedDialogOpen));
2656
- function h(e) {
2657
- e.key === "Escape" && (m.value?.handleEscape() ? e.preventDefault() : a("close"));
2705
+ let i = t, o = n, s = e(null);
2706
+ O(() => i.locale, async (e) => {
2707
+ s.value = await or(e ?? "en");
2708
+ }, { immediate: !0 }), a(de, s);
2709
+ let c = h(() => i.uiTheme);
2710
+ a(fe, c);
2711
+ let l = C(() => i.popoverTarget ?? null);
2712
+ a(X, l), a(Z, C(() => i.locale));
2713
+ let u = e(null), d = e(null);
2714
+ _e(u, h(() => i.visible && s.value !== null && !d.value?.nestedDialogOpen));
2715
+ function m(e) {
2716
+ e.key === "Escape" && (d.value?.handleEscape() ? e.preventDefault() : o("close"));
2658
2717
  }
2659
- P(document, "keydown", h);
2660
- function g(e) {
2661
- a("select", e), a("close");
2718
+ P(document, "keydown", m);
2719
+ function v(e) {
2720
+ o("select", e), o("close");
2662
2721
  }
2663
- return (e, n) => (o(), y(_, { to: t.popoverTarget || "body" }, [M(T, {
2722
+ return (e, n) => (y(), T(p, { to: t.popoverTarget || "body" }, [f(M, {
2664
2723
  "enter-active-class": "tpl:transition tpl:duration-200",
2665
2724
  "enter-from-class": "tpl:opacity-0",
2666
2725
  "enter-to-class": "tpl:opacity-100",
@@ -2668,20 +2727,20 @@ var or = ["data-tpl-theme"], sr = /* @__PURE__ */ t({
2668
2727
  "leave-from-class": "tpl:opacity-100",
2669
2728
  "leave-to-class": "tpl:opacity-0"
2670
2729
  }, {
2671
- default: l(() => [t.visible && s.value ? (o(), p("div", {
2730
+ default: r(() => [t.visible && s.value ? (y(), _("div", {
2672
2731
  key: 0,
2673
2732
  "data-testid": "media-library-modal",
2674
2733
  "data-tpl-theme": c.value,
2675
- class: C([t.popoverTarget ? void 0 : "tpl", "tpl-media-overlay tpl:fixed tpl:inset-0 tpl:z-10 tpl:flex tpl:items-center tpl:justify-center tpl:p-4"]),
2734
+ class: b([t.popoverTarget ? void 0 : "tpl", "tpl-media-overlay tpl:fixed tpl:inset-0 tpl:z-10 tpl:flex tpl:items-center tpl:justify-center tpl:p-4"]),
2676
2735
  style: {
2677
2736
  "background-color": "var(--tpl-overlay)",
2678
2737
  "backdrop-filter": "blur(8px)",
2679
2738
  "-webkit-backdrop-filter": "blur(8px)"
2680
2739
  },
2681
- onClick: n[1] ||= S((e) => a("close"), ["self"])
2682
- }, [w("div", {
2740
+ onClick: n[1] ||= A((e) => o("close"), ["self"])
2741
+ }, [x("div", {
2683
2742
  ref_key: "dialogRef",
2684
- ref: f,
2743
+ ref: u,
2685
2744
  role: "dialog",
2686
2745
  "aria-modal": "true",
2687
2746
  "aria-labelledby": "tpl-media-library-title",
@@ -2696,9 +2755,9 @@ var or = ["data-tpl-theme"], sr = /* @__PURE__ */ t({
2696
2755
  border: "1px solid var(--tpl-border)",
2697
2756
  "box-shadow": "var(--tpl-shadow-xl)"
2698
2757
  }
2699
- }, [M(Zn, {
2758
+ }, [f(Qn, {
2700
2759
  ref_key: "chromeRef",
2701
- ref: m,
2760
+ ref: d,
2702
2761
  provider: t.provider,
2703
2762
  accept: t.accept,
2704
2763
  "template-id": t.templateId,
@@ -2707,20 +2766,17 @@ var or = ["data-tpl-theme"], sr = /* @__PURE__ */ t({
2707
2766
  "show-close": "",
2708
2767
  "show-confirm": "",
2709
2768
  "confirm-test-id": "media-confirm",
2710
- onClose: n[0] ||= (e) => a("close"),
2711
- onConfirm: g
2769
+ onClose: n[0] ||= (e) => o("close"),
2770
+ onConfirm: v
2712
2771
  }, null, 8, [
2713
2772
  "provider",
2714
2773
  "accept",
2715
2774
  "template-id",
2716
2775
  "on-error",
2717
2776
  "translations"
2718
- ])], 512)], 10, or)) : v("", !0)]),
2777
+ ])], 512)], 10, sr)) : g("", !0)]),
2719
2778
  _: 1
2720
2779
  })], 8, ["to"]));
2721
2780
  }
2722
2781
  });
2723
- //#endregion
2724
- export { sr as MediaLibraryModal, J as a, pe as i, Q as n, Y as o, Z as r, ge as t };
2725
-
2726
- //# sourceMappingURL=editor-modal-CI6EfeMd.js.map
2782
+ export { cr as MediaLibraryModal, X as a, pe as i, he as n, fe as o, Q as r, _e as t };