@templatical/editor 0.30.0 → 0.32.0

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 (257) hide show
  1. package/dist/{AiChatSidebar-Bq99wU01.js → AiChatSidebar-ftdKHSR-.js} +15 -15
  2. package/dist/{AiFeatureMenu-F-C59LAV.js → AiFeatureMenu-aNeCRlil.js} +7 -7
  3. package/dist/{BlockIssueBadge-Dhk7Hv4m.js → BlockIssueBadge-bTDu6W_2.js} +5 -5
  4. package/dist/{BlockPreviewCanvas-CqU1kwmG.js → BlockPreviewCanvas-BsOuOfzB.js} +20 -19
  5. package/dist/{CloudHeaderExtras-vnGV_mLD.js → CloudHeaderExtras-BNpFohqt.js} +5 -5
  6. package/dist/{CloudPanels-Dv-MD1Tc.js → CloudPanels-xoGWwqSH.js} +7 -7
  7. package/dist/{CollaboratorBar-DmssyJoB.js → CollaboratorBar-mEqXkdEi.js} +4 -4
  8. package/dist/{ColorPicker-CXPSbnRD.js → ColorPicker-FL5Vb9bE.js} +7 -7
  9. package/dist/{CommentsPanel-DnWdgQHg.js → CommentsPanel-slfi74ng.js} +2 -2
  10. package/dist/{CommentsSidebar-ZOqmuo4D.js → CommentsSidebar-Dea4spMl.js} +14 -14
  11. package/dist/{CountdownBlock-BgNK7fZY.js → CountdownBlock-DQTwaRxP.js} +3 -3
  12. package/dist/{CountdownToolbar-SwmE7CIk.js → CountdownToolbar-C7xwJoqh.js} +4 -4
  13. package/dist/{DesignReferenceSidebar-9cLTzOqP.js → DesignReferenceSidebar-BtBd7bbz.js} +11 -11
  14. package/dist/{FieldRow-0-UbQR4a.js → FieldRow-BWt7ECqo.js} +1 -1
  15. package/dist/{IssuesPanel-CDk7lUna.js → IssuesPanel-Ci2H36L2.js} +8 -8
  16. package/dist/{LoadingTrack-5KBr5cE8.js → LoadingTrack-SQXoZVf2.js} +1 -1
  17. package/dist/{MergeTagModeToggle-DtD_Xl9w.js → MergeTagModeToggle-Cdi_DmVw.js} +6 -6
  18. package/dist/{MergeTagSuggestion-DPfXtDzP.js → MergeTagSuggestion-CoCuzEmW.js} +4 -4
  19. package/dist/{ParagraphEditor-C0NbqDmV.js → ParagraphEditor-DQEOFc0K.js} +26 -26
  20. package/dist/{RestoreVersionDialog-DCX0rJiV.js → RestoreVersionDialog-CHwngBae.js} +5 -5
  21. package/dist/{RichTextEditorContent-DZ6GiAUi.js → RichTextEditorContent-C_9xi7dD.js} +8 -8
  22. package/dist/{SaveBlockDialog-e5LtQRVk.js → SaveBlockDialog-tZqZzPjW.js} +21 -21
  23. package/dist/SavedBlocksBrowserModal-Bdj3GOD_.js +322 -0
  24. package/dist/{SavedBlocksPanels-pGZWjSmp.js → SavedBlocksPanels-2sBxAH9w.js} +2 -2
  25. package/dist/{SavedBlocksPickBar-OZaOG1Si.js → SavedBlocksPickBar-DTjQBR00.js} +4 -4
  26. package/dist/{TemplateScoringPanel-CDwlSFEe.js → TemplateScoringPanel-B6nHSrBD.js} +15 -15
  27. package/dist/{TestEmailModal-PVa1VL2p.js → TestEmailModal-DuHbzO37.js} +11 -11
  28. package/dist/{TestEmailPanel-RekBdAtO.js → TestEmailPanel-TpwP-eK_.js} +2 -2
  29. package/dist/{TitleEditor-Cs2tELCL.js → TitleEditor-C0JQJu38.js} +12 -12
  30. package/dist/{TplModal-Bw1i8_eE.js → TplModal-BMGmhquu.js} +5 -5
  31. package/dist/VersionHistoryMenu-D2x6MMYx.js +157 -0
  32. package/dist/{VersionHistoryPanels-TqTC4ofA.js → VersionHistoryPanels-aGlUVEGF.js} +2 -2
  33. package/dist/{VersionPreviewBanner-CQlSzQ2B.js → VersionPreviewBanner-61t3_Z-a.js} +3 -3
  34. package/dist/{blockTypeIcons-C7WedEOG.js → blockTypeIcons-BsNup009.js} +2 -2
  35. package/dist/bundle-stats.json +7 -7
  36. package/dist/{ca-DZSrLNXK.js → ca-C0hfqt4U.js} +5 -0
  37. package/dist/cdn/chunks/{AiChatSidebar-DmZ1Nvxo.js → AiChatSidebar-CqWvtRwB.js} +12 -12
  38. package/dist/cdn/chunks/{AiChatSidebar-DmZ1Nvxo.js.map → AiChatSidebar-CqWvtRwB.js.map} +1 -1
  39. package/dist/cdn/chunks/{AiFeatureMenu-D4tax9j3.js → AiFeatureMenu-DoFrLcXJ.js} +6 -6
  40. package/dist/cdn/chunks/{AiFeatureMenu-D4tax9j3.js.map → AiFeatureMenu-DoFrLcXJ.js.map} +1 -1
  41. package/dist/cdn/chunks/{BlockIssueBadge-Bry71Wjz.js → BlockIssueBadge-B_mUH69a.js} +5 -5
  42. package/dist/cdn/chunks/{BlockIssueBadge-Bry71Wjz.js.map → BlockIssueBadge-B_mUH69a.js.map} +1 -1
  43. package/dist/cdn/chunks/{BlockPreviewCanvas-DDOqFJlT.js → BlockPreviewCanvas-CSIxs7hr.js} +21 -20
  44. package/dist/cdn/chunks/BlockPreviewCanvas-CSIxs7hr.js.map +1 -0
  45. package/dist/cdn/chunks/{CloudHeaderExtras-g-_SFPna.js → CloudHeaderExtras-Dgtr7WaE.js} +5 -5
  46. package/dist/cdn/chunks/{CloudHeaderExtras-g-_SFPna.js.map → CloudHeaderExtras-Dgtr7WaE.js.map} +1 -1
  47. package/dist/cdn/chunks/{CloudPanels-Cnh07_2G.js → CloudPanels-B91lUmof.js} +7 -7
  48. package/dist/cdn/chunks/{CloudPanels-Cnh07_2G.js.map → CloudPanels-B91lUmof.js.map} +1 -1
  49. package/dist/cdn/chunks/{CollaboratorBar-CLGB0prG.js → CollaboratorBar-CQwPWoFu.js} +5 -5
  50. package/dist/cdn/chunks/{CollaboratorBar-CLGB0prG.js.map → CollaboratorBar-CQwPWoFu.js.map} +1 -1
  51. package/dist/cdn/chunks/{ColorPicker-Ww4xHHMI.js → ColorPicker-CdrKX48J.js} +7 -7
  52. package/dist/cdn/chunks/{ColorPicker-Ww4xHHMI.js.map → ColorPicker-CdrKX48J.js.map} +1 -1
  53. package/dist/cdn/chunks/{CommentsPanel-DjId-XH-.js → CommentsPanel-BJNgTmAA.js} +3 -3
  54. package/dist/cdn/chunks/{CommentsPanel-DjId-XH-.js.map → CommentsPanel-BJNgTmAA.js.map} +1 -1
  55. package/dist/cdn/chunks/{CommentsSidebar-DXXGWSr4.js → CommentsSidebar-D6VIIPhB.js} +5 -5
  56. package/dist/cdn/chunks/{CommentsSidebar-DXXGWSr4.js.map → CommentsSidebar-D6VIIPhB.js.map} +1 -1
  57. package/dist/cdn/chunks/{CountdownBlock-CWeJBC0L.js → CountdownBlock-BRwXUvGU.js} +4 -4
  58. package/dist/cdn/chunks/{CountdownBlock-CWeJBC0L.js.map → CountdownBlock-BRwXUvGU.js.map} +1 -1
  59. package/dist/cdn/chunks/{CountdownToolbar-CO6xLgYc.js → CountdownToolbar-CVaU5WG6.js} +5 -5
  60. package/dist/cdn/chunks/{CountdownToolbar-CO6xLgYc.js.map → CountdownToolbar-CVaU5WG6.js.map} +1 -1
  61. package/dist/cdn/chunks/{DesignReferenceSidebar-DRGqm33h.js → DesignReferenceSidebar-BvOwE1kg.js} +7 -7
  62. package/dist/cdn/chunks/{DesignReferenceSidebar-DRGqm33h.js.map → DesignReferenceSidebar-BvOwE1kg.js.map} +1 -1
  63. package/dist/cdn/chunks/{FieldRow-CbcpsxZ4.js → FieldRow-D9OJhYeb.js} +2 -2
  64. package/dist/cdn/chunks/{FieldRow-CbcpsxZ4.js.map → FieldRow-D9OJhYeb.js.map} +1 -1
  65. package/dist/cdn/chunks/{IssuesPanel-iC2hgrXx.js → IssuesPanel-MJZxkScz.js} +6 -6
  66. package/dist/cdn/chunks/{IssuesPanel-iC2hgrXx.js.map → IssuesPanel-MJZxkScz.js.map} +1 -1
  67. package/dist/cdn/chunks/{LoadingTrack-Cz1sT0wP.js → LoadingTrack-Cm3TDKb3.js} +2 -2
  68. package/dist/cdn/chunks/{LoadingTrack-Cz1sT0wP.js.map → LoadingTrack-Cm3TDKb3.js.map} +1 -1
  69. package/dist/cdn/chunks/{MergeTagModeToggle-DZtnCj0F.js → MergeTagModeToggle-bNuN6PTV.js} +6 -6
  70. package/dist/cdn/chunks/{MergeTagModeToggle-DZtnCj0F.js.map → MergeTagModeToggle-bNuN6PTV.js.map} +1 -1
  71. package/dist/cdn/chunks/{MergeTagSuggestion-VP_nC-8W.js → MergeTagSuggestion-t8Uj00Er.js} +3 -3
  72. package/dist/cdn/chunks/{MergeTagSuggestion-VP_nC-8W.js.map → MergeTagSuggestion-t8Uj00Er.js.map} +1 -1
  73. package/dist/cdn/chunks/{ParagraphEditor-BalgLjBt.js → ParagraphEditor-BU8tlFbL.js} +28 -28
  74. package/dist/cdn/chunks/{ParagraphEditor-BalgLjBt.js.map → ParagraphEditor-BU8tlFbL.js.map} +1 -1
  75. package/dist/cdn/chunks/{RestoreVersionDialog-DGOXQ0ou.js → RestoreVersionDialog-vdRFfyy0.js} +5 -5
  76. package/dist/cdn/chunks/{RestoreVersionDialog-DGOXQ0ou.js.map → RestoreVersionDialog-vdRFfyy0.js.map} +1 -1
  77. package/dist/cdn/chunks/{RichTextEditorContent-DpvOKKH-.js → RichTextEditorContent-C1-5I8Df.js} +7 -7
  78. package/dist/cdn/chunks/{RichTextEditorContent-DpvOKKH-.js.map → RichTextEditorContent-C1-5I8Df.js.map} +1 -1
  79. package/dist/cdn/chunks/{SaveBlockDialog-Dod3jX9X.js → SaveBlockDialog-DWaeqcM8.js} +9 -9
  80. package/dist/cdn/chunks/{SaveBlockDialog-Dod3jX9X.js.map → SaveBlockDialog-DWaeqcM8.js.map} +1 -1
  81. package/dist/cdn/chunks/{SavedBlocksBrowserModal-BysGB8zb.js → SavedBlocksBrowserModal-qC7UhW74.js} +110 -111
  82. package/dist/cdn/chunks/SavedBlocksBrowserModal-qC7UhW74.js.map +1 -0
  83. package/dist/cdn/chunks/{SavedBlocksPanels-DJ4fceEM.js → SavedBlocksPanels-BvtjtdsY.js} +3 -3
  84. package/dist/cdn/chunks/{SavedBlocksPanels-DJ4fceEM.js.map → SavedBlocksPanels-BvtjtdsY.js.map} +1 -1
  85. package/dist/cdn/chunks/{SavedBlocksPickBar-DGgbqAsb.js → SavedBlocksPickBar-CxXjF3RN.js} +5 -5
  86. package/dist/cdn/chunks/{SavedBlocksPickBar-DGgbqAsb.js.map → SavedBlocksPickBar-CxXjF3RN.js.map} +1 -1
  87. package/dist/cdn/chunks/{TemplateScoringPanel-B0YcaJsR.js → TemplateScoringPanel-CroWaWqy.js} +50 -50
  88. package/dist/cdn/chunks/{TemplateScoringPanel-B0YcaJsR.js.map → TemplateScoringPanel-CroWaWqy.js.map} +1 -1
  89. package/dist/cdn/chunks/{TestEmailModal-DvZFnhWa.js → TestEmailModal-iWxAZRRq.js} +10 -10
  90. package/dist/cdn/chunks/{TestEmailModal-DvZFnhWa.js.map → TestEmailModal-iWxAZRRq.js.map} +1 -1
  91. package/dist/cdn/chunks/{TestEmailPanel-BdxpMiWc.js → TestEmailPanel-CGUtEuwp.js} +3 -3
  92. package/dist/cdn/chunks/{TestEmailPanel-BdxpMiWc.js.map → TestEmailPanel-CGUtEuwp.js.map} +1 -1
  93. package/dist/cdn/chunks/{TitleEditor-CfHWnThg.js → TitleEditor-DvXUW2j-.js} +12 -12
  94. package/dist/cdn/chunks/{TitleEditor-CfHWnThg.js.map → TitleEditor-DvXUW2j-.js.map} +1 -1
  95. package/dist/cdn/chunks/{TplModal-BMTW5bEN.js → TplModal-X-qNoLGZ.js} +5 -5
  96. package/dist/cdn/chunks/{TplModal-BMTW5bEN.js.map → TplModal-X-qNoLGZ.js.map} +1 -1
  97. package/dist/cdn/chunks/VersionHistoryMenu-yKzwxf7n.js +150 -0
  98. package/dist/cdn/chunks/VersionHistoryMenu-yKzwxf7n.js.map +1 -0
  99. package/dist/cdn/chunks/{VersionHistoryPanels-2l_FLtix.js → VersionHistoryPanels--hQaanjH.js} +3 -3
  100. package/dist/cdn/chunks/{VersionHistoryPanels-2l_FLtix.js.map → VersionHistoryPanels--hQaanjH.js.map} +1 -1
  101. package/dist/cdn/chunks/{VersionPreviewBanner-C8pfES5A.js → VersionPreviewBanner-DWU_SqMd.js} +4 -4
  102. package/dist/cdn/chunks/{VersionPreviewBanner-C8pfES5A.js.map → VersionPreviewBanner-DWU_SqMd.js.map} +1 -1
  103. package/dist/cdn/chunks/{blockTypeIcons-JUwZtKaq.js → blockTypeIcons-ZEzEpCti.js} +2 -2
  104. package/dist/cdn/chunks/{blockTypeIcons-JUwZtKaq.js.map → blockTypeIcons-ZEzEpCti.js.map} +1 -1
  105. package/dist/cdn/chunks/{ca-DZSrLNXK.js → ca-C0hfqt4U.js} +6 -1
  106. package/dist/cdn/chunks/ca-C0hfqt4U.js.map +1 -0
  107. package/dist/cdn/chunks/{cloud-CITqEHEc.js → cloud-BP5-6__d.js} +4 -4
  108. package/dist/cdn/chunks/{cloud-CITqEHEc.js.map → cloud-BP5-6__d.js.map} +1 -1
  109. package/dist/cdn/chunks/{createCloudRuntime-jLhuyKds.js → createCloudRuntime-DD6ppb71.js} +10 -10
  110. package/dist/cdn/chunks/{createCloudRuntime-jLhuyKds.js.map → createCloudRuntime-DD6ppb71.js.map} +1 -1
  111. package/dist/{de-DbayqpK-.js → cdn/chunks/de-C6J2Iae8.js} +7 -0
  112. package/dist/cdn/chunks/de-C6J2Iae8.js.map +1 -0
  113. package/dist/cdn/chunks/{dist-CgR3inPR.js → dist-BW6Y49zE.js} +2 -2
  114. package/dist/cdn/chunks/{dist-CgR3inPR.js.map → dist-BW6Y49zE.js.map} +1 -1
  115. package/dist/cdn/chunks/{dist-El3fQnfk.js → dist-CAFTQ6Y2.js} +5 -5
  116. package/dist/cdn/chunks/{dist-El3fQnfk.js.map → dist-CAFTQ6Y2.js.map} +1 -1
  117. package/dist/cdn/chunks/{draggable-D2vo-aQI.js → draggable-kbOhCgnk.js} +12 -13
  118. package/dist/cdn/chunks/{draggable-D2vo-aQI.js.map → draggable-kbOhCgnk.js.map} +1 -1
  119. package/dist/cdn/chunks/{en-l0ib5X0f.js → en-BaUYOQi8.js} +6 -1
  120. package/dist/cdn/chunks/en-BaUYOQi8.js.map +1 -0
  121. package/dist/cdn/chunks/en-mEKGL1PX.js +2 -0
  122. package/dist/cdn/chunks/{es-CMQ-5PJP.js → es-CKDYfJYn.js} +6 -1
  123. package/dist/cdn/chunks/es-CKDYfJYn.js.map +1 -0
  124. package/dist/cdn/chunks/{extensions-D30V0hzj.js → extensions-BUPHNpKD.js} +7 -7
  125. package/dist/cdn/chunks/{extensions-D30V0hzj.js.map → extensions-BUPHNpKD.js.map} +1 -1
  126. package/dist/cdn/chunks/formatAbsoluteDateTime-DMmop3C-.js +15 -0
  127. package/dist/cdn/chunks/formatAbsoluteDateTime-DMmop3C-.js.map +1 -0
  128. package/dist/cdn/chunks/{fr-DNXmZWAq.js → fr-L8DR73mK.js} +6 -1
  129. package/dist/cdn/chunks/fr-L8DR73mK.js.map +1 -0
  130. package/dist/cdn/chunks/{icons-BTdLXRXn.js → icons-SP5Itd-A.js} +16 -16
  131. package/dist/cdn/chunks/icons-SP5Itd-A.js.map +1 -0
  132. package/dist/cdn/chunks/keys-BOn5i9jV.js +12 -0
  133. package/dist/cdn/chunks/keys-BOn5i9jV.js.map +1 -0
  134. package/dist/cdn/chunks/{liquid.browser-BPvKXNfO.js → liquid.browser-BypTT2oc.js} +4 -4
  135. package/dist/cdn/chunks/{liquid.browser-BPvKXNfO.js.map → liquid.browser-BypTT2oc.js.map} +1 -1
  136. package/dist/{nl-BylRRHYJ.js → cdn/chunks/nl-GDWeuX18.js} +7 -0
  137. package/dist/cdn/chunks/nl-GDWeuX18.js.map +1 -0
  138. package/dist/cdn/chunks/{preRenderCustomBlocks-DyCIgmqJ.js → preRenderCustomBlocks-LFB-e-0m.js} +2 -2
  139. package/dist/cdn/chunks/{preRenderCustomBlocks-DyCIgmqJ.js.map → preRenderCustomBlocks-LFB-e-0m.js.map} +1 -1
  140. package/dist/cdn/chunks/{pt-BR-BVoJhpie.js → pt-BR-B1AVVhWj.js} +6 -1
  141. package/dist/cdn/chunks/pt-BR-B1AVVhWj.js.map +1 -0
  142. package/dist/cdn/chunks/{src-6J-yyZoD.js → src-BM3f9I7t.js} +268 -268
  143. package/dist/cdn/chunks/{src-6J-yyZoD.js.map → src-BM3f9I7t.js.map} +1 -1
  144. package/dist/cdn/chunks/{src-BD60gqPW.js → src-CLoCCDfs.js} +26 -26
  145. package/dist/cdn/chunks/{src-BD60gqPW.js.map → src-CLoCCDfs.js.map} +1 -1
  146. package/dist/cdn/chunks/{src-65H3RNcb.js → src-Cxl-9O-L.js} +699 -684
  147. package/dist/cdn/chunks/src-Cxl-9O-L.js.map +1 -0
  148. package/dist/cdn/chunks/{src-CLTXM4PM.js → src-DtnvR_Hl.js} +19 -19
  149. package/dist/cdn/chunks/src-DtnvR_Hl.js.map +1 -0
  150. package/dist/cdn/chunks/{tiptap-Bqy-H6CT.js → tiptap-Epe8m3Vo.js} +2918 -2901
  151. package/dist/cdn/chunks/tiptap-Epe8m3Vo.js.map +1 -0
  152. package/dist/cdn/chunks/{useAliveFlag-DrXxPV8V.js → useAliveFlag-CT9gjvO_.js} +2 -2
  153. package/dist/cdn/chunks/{useAliveFlag-DrXxPV8V.js.map → useAliveFlag-CT9gjvO_.js.map} +1 -1
  154. package/dist/cdn/chunks/{useCloudI18n-D0AoLV0a.js → useCloudI18n-DbsLlCbZ.js} +3 -3
  155. package/dist/cdn/chunks/{useCloudI18n-D0AoLV0a.js.map → useCloudI18n-DbsLlCbZ.js.map} +1 -1
  156. package/dist/cdn/chunks/{useEditorCore-BQeEwEQ9.js → useEditorCore-ChlgO2GN.js} +556 -412
  157. package/dist/cdn/chunks/useEditorCore-ChlgO2GN.js.map +1 -0
  158. package/dist/cdn/chunks/useEditorRoot-BlF1WPeu.js +10 -0
  159. package/dist/cdn/chunks/{useEditorRoot-BFGRBGts.js.map → useEditorRoot-BlF1WPeu.js.map} +1 -1
  160. package/dist/cdn/chunks/{useI18n-DIhawILp.js → useI18n-BdxNNw6j.js} +3 -3
  161. package/dist/cdn/chunks/{useI18n-DIhawILp.js.map → useI18n-BdxNNw6j.js.map} +1 -1
  162. package/dist/cdn/chunks/{useMergeTag-lWo7So18.js → useMergeTag-CI2WUNrR.js} +4 -4
  163. package/dist/cdn/chunks/{useMergeTag-lWo7So18.js.map → useMergeTag-CI2WUNrR.js.map} +1 -1
  164. package/dist/cdn/chunks/{usePopoverPosition-DkiTLnBm.js → usePopoverPosition-Dw1nTSNx.js} +3 -3
  165. package/dist/cdn/chunks/{usePopoverPosition-DkiTLnBm.js.map → usePopoverPosition-Dw1nTSNx.js.map} +1 -1
  166. package/dist/cdn/chunks/{useScrollToBlock-KcSAuXKz.js → useScrollToBlock-BMis3-PR.js} +3 -3
  167. package/dist/cdn/chunks/{useScrollToBlock-KcSAuXKz.js.map → useScrollToBlock-BMis3-PR.js.map} +1 -1
  168. package/dist/cdn/editor.css +1 -1
  169. package/dist/cdn/editor.js +1099 -1143
  170. package/dist/cdn/editor.js.map +1 -1
  171. package/dist/{check-CTe6VejT.js → check-JK8Uacq0.js} +1 -1
  172. package/dist/{chevron-down-BBThVMu-.js → chevron-down-a-fb_Ijn.js} +1 -1
  173. package/dist/{chevron-up-iECwf-Bc.js → chevron-up-x4l0et_Y.js} +1 -1
  174. package/dist/{circle-alert-Z_eeykrO.js → circle-alert-CJDW5LZo.js} +1 -1
  175. package/dist/{clock-CEj1c29j.js → clock-BW6rXk2f.js} +1 -1
  176. package/dist/{cloud-DwJ8ebNl.js → cloud-BMzRKCbk.js} +3 -3
  177. package/dist/{createCloudRuntime-CdXQdl34.js → createCloudRuntime-zNcMjRgb.js} +8 -8
  178. package/dist/{createLucideIcon-DphAT3tw.js → createLucideIcon-Bvw1Zx56.js} +3 -3
  179. package/dist/{cdn/chunks/de-DbayqpK-.js → de-C6J2Iae8.js} +5 -2
  180. package/dist/{dist-gWM8H2hz.js → dist-BxFbxpgW.js} +5 -5
  181. package/dist/{dist-DifptC-U.js → dist-ByT5fgKq.js} +2 -2
  182. package/dist/{dist-BfcqryVg.js → dist-C1tsW_99.js} +2 -2
  183. package/dist/{dist-D2P8U3p6.js → dist-CtF9STPS.js} +2 -2
  184. package/dist/{dist-DSgmnQ-f.js → dist-CtMXAH7a.js} +2 -2
  185. package/dist/dist-D08oVYhr.js +5 -0
  186. package/dist/{dist-BdIwIlKz.js → dist-D7WY8VPq.js} +2 -2
  187. package/dist/{dist-9fjN9cuD.js → dist-DC-3T0ED.js} +2 -2
  188. package/dist/{dist-nmzPlqlz.js → dist-DL9334yz.js} +1429 -1412
  189. package/dist/{dist-DLaIQ5H5.js → dist-DkcA6epL.js} +8 -8
  190. package/dist/dist-DzdeVn-W.js +5 -0
  191. package/dist/{dist-CzVIVbSa.js → dist-PL6vP4SC.js} +61 -61
  192. package/dist/{dist-CuuPnIMy.js → dist-dNiknO7j.js} +4 -4
  193. package/dist/{dist-CaR5TLiM.js → dist-f7HXo6j6.js} +2 -2
  194. package/dist/{dist-BUpBA58N.js → dist-heatwAdo.js} +1 -1
  195. package/dist/{en-l0ib5X0f.js → en-BaUYOQi8.js} +5 -0
  196. package/dist/{es-CMQ-5PJP.js → es-CKDYfJYn.js} +5 -0
  197. package/dist/{extensions-Bjsdx6Vm.js → extensions-kOYwOh72.js} +21 -21
  198. package/dist/formatAbsoluteDateTime-DMmop3C-.js +13 -0
  199. package/dist/{fr-DNXmZWAq.js → fr-L8DR73mK.js} +5 -0
  200. package/dist/{image-up-W1INxCu8.js → image-up-CuzFc1mu.js} +1 -1
  201. package/dist/{info-5t4WYKfh.js → info-DybAwcA3.js} +1 -1
  202. package/dist/keys-BOhFlHsv.js +10 -0
  203. package/dist/{liquid.browser-CJgDDvQz.js → liquid.browser-wPG0n4Cs.js} +3 -3
  204. package/dist/{loader-circle-DJCZ_JMY.js → loader-circle-t-SVgmJ3.js} +1 -1
  205. package/dist/{message-circle-Biu6lHh_.js → message-circle-DtwKrlhN.js} +1 -1
  206. package/dist/{cdn/chunks/nl-BylRRHYJ.js → nl-GDWeuX18.js} +5 -2
  207. package/dist/{pencil-DkPlMca7.js → pencil-2qhC-Y4q.js} +1 -1
  208. package/dist/{preRenderCustomBlocks-2KyBJocY.js → preRenderCustomBlocks-CSIF-HyJ.js} +1 -1
  209. package/dist/{pt-BR-BVoJhpie.js → pt-BR-B1AVVhWj.js} +5 -0
  210. package/dist/{refresh-cw-DHbpkkol.js → refresh-cw-C8SBuPdg.js} +1 -1
  211. package/dist/{runtime-dom.esm-bundler-Co_SPqAz.js → runtime-dom.esm-bundler-BuG03jBM.js} +3 -3
  212. package/dist/{scan-line-DojwGzjU.js → scan-line-E7w4yQyv.js} +1 -1
  213. package/dist/{send-c6ppcE9I.js → send-BoqJliF6.js} +1 -1
  214. package/dist/{shield-check-F9T4ylNK.js → shield-check-D0dMaHtE.js} +1 -1
  215. package/dist/{sparkles-D-0OiTZD.js → sparkles-Dy2BJjiX.js} +1 -1
  216. package/dist/style.css +1 -1
  217. package/dist/templatical-editor.js +1236 -1281
  218. package/dist/{text-align-start-kEEtoRrD.js → text-align-start-DrxjxvIy.js} +1 -1
  219. package/dist/{trash-2-DRQzhY9R.js → trash-rYMzzHZd.js} +2 -2
  220. package/dist/{triangle-alert-Bt4-GU3t.js → triangle-alert-DxnFj4-B.js} +1 -1
  221. package/dist/{upload-D2wtjvH8.js → upload-DZu1adQz.js} +1 -1
  222. package/dist/{useAliveFlag-AFbwfHlJ.js → useAliveFlag-PVmp95MT.js} +1 -1
  223. package/dist/{useCloudI18n-BA69BpQ_.js → useCloudI18n-BlMajbKp.js} +2 -2
  224. package/dist/{useEditorCore-Du9Vx-qr.js → useEditorCore-CwQYCSXO.js} +1212 -1067
  225. package/dist/{useEditorRoot-Cdo8Vhxa.js → useEditorRoot-C92q8uV-.js} +2 -2
  226. package/dist/{useI18n-B135ASaG.js → useI18n-Ce_BRzYv.js} +2 -2
  227. package/dist/{useMergeTag-Cx36rtrt.js → useMergeTag-CrXJ49lr.js} +3 -3
  228. package/dist/{usePopoverPosition-DAOHr_iM.js → usePopoverPosition-CPk7Twye.js} +2 -2
  229. package/dist/{useScrollToBlock-B0Qpjfa4.js → useScrollToBlock-DvpMfWs2.js} +3 -3
  230. package/dist/{vue.runtime.esm-bundler-BhOUdXMi.js → vue.runtime.esm-bundler-D9JUcKrV.js} +4 -4
  231. package/dist/{x-YiG-TUGN.js → x-DJOd1hS4.js} +1 -1
  232. package/package.json +23 -23
  233. package/dist/SavedBlocksBrowserModal-ZQIQoARO.js +0 -323
  234. package/dist/VersionHistoryMenu-B6zAcmAC.js +0 -155
  235. package/dist/cdn/chunks/BlockPreviewCanvas-DDOqFJlT.js.map +0 -1
  236. package/dist/cdn/chunks/SavedBlocksBrowserModal-BysGB8zb.js.map +0 -1
  237. package/dist/cdn/chunks/VersionHistoryMenu-DJGcA_RX.js +0 -148
  238. package/dist/cdn/chunks/VersionHistoryMenu-DJGcA_RX.js.map +0 -1
  239. package/dist/cdn/chunks/ca-DZSrLNXK.js.map +0 -1
  240. package/dist/cdn/chunks/de-DbayqpK-.js.map +0 -1
  241. package/dist/cdn/chunks/en-CwXyUb6-.js +0 -2
  242. package/dist/cdn/chunks/en-l0ib5X0f.js.map +0 -1
  243. package/dist/cdn/chunks/es-CMQ-5PJP.js.map +0 -1
  244. package/dist/cdn/chunks/fr-DNXmZWAq.js.map +0 -1
  245. package/dist/cdn/chunks/icons-BTdLXRXn.js.map +0 -1
  246. package/dist/cdn/chunks/keys-BJ770Mwm.js +0 -12
  247. package/dist/cdn/chunks/keys-BJ770Mwm.js.map +0 -1
  248. package/dist/cdn/chunks/nl-BylRRHYJ.js.map +0 -1
  249. package/dist/cdn/chunks/pt-BR-BVoJhpie.js.map +0 -1
  250. package/dist/cdn/chunks/src-65H3RNcb.js.map +0 -1
  251. package/dist/cdn/chunks/src-CLTXM4PM.js.map +0 -1
  252. package/dist/cdn/chunks/tiptap-Bqy-H6CT.js.map +0 -1
  253. package/dist/cdn/chunks/useEditorCore-BQeEwEQ9.js.map +0 -1
  254. package/dist/cdn/chunks/useEditorRoot-BFGRBGts.js +0 -10
  255. package/dist/dist-CzMzshfS.js +0 -5
  256. package/dist/dist-DTVuNn8M.js +0 -5
  257. package/dist/keys-BJtoezGU.js +0 -10
@@ -1,9 +1,9 @@
1
- import { B as e, E as t, F as n, H as r, I as i, L as a, N as o, O as s, P as c, Q as l, R as u, S as d, U as f, at as p, b as m, c as h, ct as g, d as _, f as v, g as y, h as b, j as x, l as S, lt as C, m as w, n as T, nt as E, o as D, p as O, q as k, r as A, s as j, u as M, ut as N, w as P, y as F } from "./draggable-D2vo-aQI.js";
2
- import { h as ee } from "./dist-CgR3inPR.js";
3
- import { a as te, n as ne, o as re, r as ie, s as I, t as ae } from "./dist-El3fQnfk.js";
4
- import { C as oe, Et as se, J as ce, K as le, Lt as ue, N as de, Pt as fe, U as pe, at as me, bt as he, ct as ge, d as _e, gt as ve, it as ye, n as be, s as xe, yt as Se, z as Ce } from "./icons-BTdLXRXn.js";
1
+ import { B as e, E as t, F as n, H as r, I as i, L as a, N as o, O as s, P as c, Q as l, R as u, S as d, U as f, at as p, b as m, c as h, ct as g, d as _, f as v, g as y, h as b, j as x, l as S, lt as C, m as w, n as T, nt as E, o as D, p as O, q as k, r as A, s as j, u as M, ut as N, w as P, y as F } from "./draggable-kbOhCgnk.js";
2
+ import { h as ee } from "./dist-BW6Y49zE.js";
3
+ import { a as te, n as ne, o as re, r as ie, s as I, t as ae } from "./dist-CAFTQ6Y2.js";
4
+ import { C as oe, Et as se, Ft as ce, J as le, K as ue, Lt as de, N as fe, U as pe, at as me, bt as he, ct as ge, d as _e, gt as ve, it as ye, n as be, s as xe, yt as Se, z as Ce } from "./icons-SP5Itd-A.js";
5
5
  import { t as we } from "./_plugin-vue_export-helper-B3ysoDQm.js";
6
- import { C as L, S as R, T as Te, x as Ee } from "./cloud-CITqEHEc.js";
6
+ import { C as L, S as R, T as Te, x as Ee } from "./cloud-BP5-6__d.js";
7
7
  //#region ../media-library/src/i18n/locales/en.ts
8
8
  var De = { mediaLibrary: {
9
9
  title: "Media Library",
@@ -542,7 +542,7 @@ function ke(e) {
542
542
  }
543
543
  //#endregion
544
544
  //#region ../media-library/src/keys.ts
545
- var Ae = Symbol("templaticalMediaPlanConfig"), je = Symbol("templaticalMediaPopoverTarget"), Me = Symbol("templaticalMediaTranslations"), Ne = Symbol("templaticalMediaUiTheme");
545
+ var Ae = Symbol("templaticalMediaPlanConfig"), je = Symbol("templaticalMediaPopoverTarget"), Me = Symbol("templaticalMediaTranslations"), Ne = Symbol("templaticalMediaUiTheme"), Pe = Symbol("templaticalMediaUiLocale");
546
546
  //#endregion
547
547
  //#region ../media-library/src/composables/useI18n.ts
548
548
  function z(e) {
@@ -557,14 +557,14 @@ function z(e) {
557
557
  }
558
558
  //#endregion
559
559
  //#region ../media-library/src/components/media/MediaBreadcrumb.vue?vue&type=script&setup=true&lang.ts
560
- var Pe = {
560
+ var Fe = {
561
561
  key: 0,
562
562
  class: "tpl:flex tpl:items-center tpl:gap-1 tpl:text-xs",
563
563
  style: { color: "var(--tpl-text-muted)" }
564
- }, Fe = ["onClick"], Ie = {
564
+ }, Ie = ["onClick"], Le = {
565
565
  key: 1,
566
566
  style: { color: "var(--tpl-text)" }
567
- }, Le = /* @__PURE__ */ d({
567
+ }, Re = /* @__PURE__ */ d({
568
568
  __name: "MediaBreadcrumb",
569
569
  props: {
570
570
  folders: {},
@@ -584,11 +584,11 @@ var Pe = {
584
584
  }
585
585
  return !1;
586
586
  }
587
- return (e, t) => s.value.length > 0 ? (o(), y("div", Pe, [O("button", {
587
+ return (e, t) => s.value.length > 0 ? (o(), y("div", Fe, [O("button", {
588
588
  class: "tpl:transition-colors tpl:duration-150 tpl:hover:underline",
589
589
  style: { color: "var(--tpl-primary)" },
590
590
  onClick: t[0] ||= (e) => i("navigate", null)
591
- }, N(p(a).mediaLibrary.allFiles), 1), (o(!0), y(M, null, n(s.value, (e, t) => (o(), y(M, { key: e.id }, [m(p(fe), {
591
+ }, N(p(a).mediaLibrary.allFiles), 1), (o(!0), y(M, null, n(s.value, (e, t) => (o(), y(M, { key: e.id }, [m(p(ce), {
592
592
  size: 12,
593
593
  "stroke-width": 2
594
594
  }), t < s.value.length - 1 ? (o(), y("button", {
@@ -596,12 +596,12 @@ var Pe = {
596
596
  class: "tpl:transition-colors tpl:duration-150 tpl:hover:underline",
597
597
  style: { color: "var(--tpl-primary)" },
598
598
  onClick: (t) => i("navigate", e.id)
599
- }, N(e.name), 9, Fe)) : (o(), y("span", Ie, N(e.name), 1))], 64))), 128))])) : b("", !0);
599
+ }, N(e.name), 9, Ie)) : (o(), y("span", Le, N(e.name), 1))], 64))), 128))])) : b("", !0);
600
600
  }
601
601
  });
602
602
  //#endregion
603
603
  //#region ../media-library/src/composables/useMediaCategories.ts
604
- function Re(e) {
604
+ function ze(e) {
605
605
  let n = e ?? t(Ae, null);
606
606
  if (!n) throw Error("[Templatical] useMediaCategories() needs a plan config in scope. Render it under <MediaLibraryModal> (pass its `planConfig` prop) or provide PLAN_CONFIG_KEY yourself.");
607
607
  let r = v(() => n.config.value?.media ?? null), i = v(() => r.value?.use_media_library ?? !0), a = v(() => r.value?.categories ?? null), o = v(() => a.value ? Object.values(a.value).flatMap((e) => e.mime_types) : []), s = v(() => o.value.join(",")), c = v(() => r.value?.max_file_size ?? 0);
@@ -629,14 +629,14 @@ function Re(e) {
629
629
  }
630
630
  //#endregion
631
631
  //#region ../media-library/src/composables/useImageCrop.ts
632
- var ze = {
632
+ var Be = {
633
633
  free: void 0,
634
634
  square: 1,
635
635
  landscape43: 4 / 3,
636
636
  landscape169: 16 / 9,
637
637
  original: void 0
638
638
  };
639
- function Be(e) {
639
+ function Ve(e) {
640
640
  return e === "image/png" || e === "image/gif" ? {
641
641
  mimeType: "image/png",
642
642
  quality: 1
@@ -648,7 +648,7 @@ function Be(e) {
648
648
  quality: .92
649
649
  };
650
650
  }
651
- function Ve(e, t, n) {
651
+ function He(e, t, n) {
652
652
  let r = e.width, i = e.height;
653
653
  if (!t && !n) return e;
654
654
  let a = r, o = i;
@@ -662,7 +662,7 @@ function Ve(e, t, n) {
662
662
  let c = s.getContext("2d");
663
663
  return c && (c.imageSmoothingEnabled = !0, c.imageSmoothingQuality = "high", c.drawImage(e, 0, 0, a, o)), s;
664
664
  }
665
- function He(e, t, n) {
665
+ function Ue(e, t, n) {
666
666
  return new Promise((r, i) => {
667
667
  e.toBlob((e) => {
668
668
  if (!e) {
@@ -674,7 +674,7 @@ function He(e, t, n) {
674
674
  }, n.mimeType, n.quality);
675
675
  });
676
676
  }
677
- function Ue(e, t, n, r) {
677
+ function We(e, t, n, r) {
678
678
  let i = e, a = t;
679
679
  if (n && i > n) {
680
680
  let e = n / i;
@@ -691,7 +691,7 @@ function Ue(e, t, n, r) {
691
691
  }
692
692
  //#endregion
693
693
  //#region ../../node_modules/.pnpm/vue-advanced-cropper@2.8.9_vue@3.5.42_typescript@6.0.3_/node_modules/vue-advanced-cropper/dist/index.esm-bundler.js
694
- function We(e, t) {
694
+ function Ge(e, t) {
695
695
  var n = Object.keys(e);
696
696
  if (Object.getOwnPropertySymbols) {
697
697
  var r = Object.getOwnPropertySymbols(e);
@@ -704,9 +704,9 @@ function We(e, t) {
704
704
  function B(e) {
705
705
  for (var t = 1; t < arguments.length; t++) {
706
706
  var n = arguments[t] == null ? {} : arguments[t];
707
- t % 2 ? We(Object(n), !0).forEach((function(t) {
707
+ t % 2 ? Ge(Object(n), !0).forEach((function(t) {
708
708
  V(e, t, n[t]);
709
- })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : We(Object(n)).forEach((function(t) {
709
+ })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Ge(Object(n)).forEach((function(t) {
710
710
  Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
711
711
  }));
712
712
  }
@@ -720,7 +720,7 @@ function V(e, t, n) {
720
720
  writable: !0
721
721
  }) : e[t] = n, e;
722
722
  }
723
- function Ge(e, t) {
723
+ function Ke(e, t) {
724
724
  if (e == null) return {};
725
725
  var n, r, i = function(e, t) {
726
726
  if (e == null) return {};
@@ -734,28 +734,28 @@ function Ge(e, t) {
734
734
  }
735
735
  return i;
736
736
  }
737
- function Ke(e) {
737
+ function qe(e) {
738
738
  return function(e) {
739
- if (Array.isArray(e)) return qe(e);
739
+ if (Array.isArray(e)) return Je(e);
740
740
  }(e) || function(e) {
741
741
  if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
742
742
  }(e) || function(e, t) {
743
743
  if (e) {
744
- if (typeof e == "string") return qe(e, t);
744
+ if (typeof e == "string") return Je(e, t);
745
745
  var n = Object.prototype.toString.call(e).slice(8, -1);
746
746
  if (n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set") return Array.from(e);
747
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return qe(e, t);
747
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Je(e, t);
748
748
  }
749
749
  }(e) || function() {
750
750
  throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
751
751
  }();
752
752
  }
753
- function qe(e, t) {
753
+ function Je(e, t) {
754
754
  (t == null || t > e.length) && (t = e.length);
755
755
  for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
756
756
  return r;
757
757
  }
758
- var Je, Ye, Xe, H = (Je = function(e) {
758
+ var Ye = function(e) {
759
759
  (function() {
760
760
  var t = {}.hasOwnProperty;
761
761
  function n() {
@@ -779,15 +779,15 @@ var Je, Ye, Xe, H = (Je = function(e) {
779
779
  }
780
780
  e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
781
781
  })();
782
- }, Je(Xe = {
783
- path: Ye,
782
+ }, Xe, Ze, H = (Ye(Ze = {
783
+ path: Xe,
784
784
  exports: {},
785
785
  require: function(e, t) {
786
786
  return function() {
787
787
  throw Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs");
788
- }(t == null && Xe.path);
788
+ }(t == null && Ze.path);
789
789
  }
790
- }, Xe.exports), Xe.exports), U = function(e) {
790
+ }, Ze.exports), Ze.exports), U = function(e) {
791
791
  return function(t, n) {
792
792
  if (!t) return e;
793
793
  var r;
@@ -799,7 +799,7 @@ var Je, Ye, Xe, H = (Je = function(e) {
799
799
  }), "") : "");
800
800
  };
801
801
  };
802
- function Ze(e, t, n) {
802
+ function Qe(e, t, n) {
803
803
  var r, i, a, o, s;
804
804
  function c() {
805
805
  var l = Date.now() - o;
@@ -817,65 +817,65 @@ function Ze(e, t, n) {
817
817
  r &&= (s = e.apply(a, i), a = i = null, clearTimeout(r), null);
818
818
  }, l;
819
819
  }
820
- Ze.debounce = Ze;
821
- var Qe = Ze, W = function() {
820
+ Qe.debounce = Qe;
821
+ var $e = Qe, W = function() {
822
822
  return W = Object.assign || function(e) {
823
823
  for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
824
824
  return e;
825
825
  }, W.apply(this, arguments);
826
826
  };
827
- function $e(e, t) {
827
+ function et(e, t) {
828
828
  var n, r;
829
829
  return e && t ? (n = "" + e + t[0].toUpperCase() + t.slice(1), r = e + "-" + t) : (n = e || t, r = e || t), {
830
830
  name: n,
831
831
  classname: r
832
832
  };
833
833
  }
834
- function et(e) {
834
+ function tt(e) {
835
835
  return /^blob:/.test(e);
836
836
  }
837
- function tt(e) {
838
- return et(e) || function(e) {
837
+ function nt(e) {
838
+ return tt(e) || function(e) {
839
839
  return /^data:/.test(e);
840
840
  }(e);
841
841
  }
842
- function nt(e) {
842
+ function rt(e) {
843
843
  return !!(e && e.constructor && e.call && e.apply);
844
844
  }
845
845
  function G(e) {
846
846
  return e === void 0;
847
847
  }
848
- function rt(e) {
848
+ function it(e) {
849
849
  return typeof e == "object" && !!e;
850
850
  }
851
- function it(e, t, n) {
851
+ function at(e, t, n) {
852
852
  var r = {};
853
- return rt(e) ? (Object.keys(t).forEach((function(i) {
854
- r[i] = G(e[i]) ? t[i] : rt(t[i]) ? rt(e[i]) ? it(e[i], t[i], n[i]) : e[i] ? t[i] : n[i] : !0 === t[i] || !1 === t[i] ? !!e[i] : e[i];
853
+ return it(e) ? (Object.keys(t).forEach((function(i) {
854
+ r[i] = G(e[i]) ? t[i] : it(t[i]) ? it(e[i]) ? at(e[i], t[i], n[i]) : e[i] ? t[i] : n[i] : !0 === t[i] || !1 === t[i] ? !!e[i] : e[i];
855
855
  })), r) : e ? t : n;
856
856
  }
857
- function at(e) {
857
+ function ot(e) {
858
858
  var t = Number(e);
859
859
  return Number.isNaN(t) ? e : t;
860
860
  }
861
- function ot(e) {
861
+ function st(e) {
862
862
  return typeof (e == "number" || function(e) {
863
863
  return typeof e == "object" && !!e;
864
- }(e) && toString.call(e) == "[object Number]") && !st(e);
864
+ }(e) && toString.call(e) == "[object Number]") && !ct(e);
865
865
  }
866
- function st(e) {
866
+ function ct(e) {
867
867
  return e != e;
868
868
  }
869
- function ct(e, t) {
869
+ function lt(e, t) {
870
870
  return Math.sqrt((e.x - t.x) ** 2 + (e.y - t.y) ** 2);
871
871
  }
872
- var lt = function(e, t) {
872
+ var ut = function(e, t) {
873
873
  e === void 0 && (e = {}), t === void 0 && (t = {}), this.type = "manipulateImage", this.move = e, this.scale = t;
874
- }, ut = function(e, t) {
874
+ }, dt = function(e, t) {
875
875
  t === void 0 && (t = {}), this.type = "resize", this.directions = e, this.params = t;
876
- }, dt = function(e) {
876
+ }, ft = function(e) {
877
877
  this.type = "move", this.directions = e;
878
- }, ft = function() {
878
+ }, pt = function() {
879
879
  function e(e, t, n, r, i) {
880
880
  this.type = "drag", this.nativeEvent = e, this.position = n, this.previousPosition = r, this.element = t, this.anchor = i;
881
881
  }
@@ -893,7 +893,7 @@ var lt = function(e, t) {
893
893
  top: 0
894
894
  };
895
895
  }, e;
896
- }(), pt = {
896
+ }(), mt = {
897
897
  name: "DraggableElement",
898
898
  props: { classname: { type: String } },
899
899
  beforeMount: function() {
@@ -914,7 +914,7 @@ var lt = function(e, t) {
914
914
  this.hovered && !this.touches.length && (this.hovered = !1, this.$emit("leave"));
915
915
  },
916
916
  onTouchStart: function(e) {
917
- e.cancelable && !this.disabled && e.touches.length === 1 && (this.touches = Ke(e.touches), this.hovered ||= (this.$emit("enter"), !0), e.touches.length && this.initAnchor(this.touches.reduce((function(t, n) {
917
+ e.cancelable && !this.disabled && e.touches.length === 1 && (this.touches = qe(e.touches), this.hovered ||= (this.$emit("enter"), !0), e.touches.length && this.initAnchor(this.touches.reduce((function(t, n) {
918
918
  return {
919
919
  clientX: t.clientX + n.clientX / e.touches.length,
920
920
  clientY: t.clientY + n.clientY / e.touches.length
@@ -960,11 +960,11 @@ var lt = function(e, t) {
960
960
  };
961
961
  },
962
962
  processMove: function(e, t) {
963
- var n = Ke(t);
963
+ var n = qe(t);
964
964
  if (this.touches.length) {
965
965
  if (this.touches.length === 1 && n.length === 1) {
966
966
  var r = this.$refs.draggable;
967
- this.$emit("drag", new ft(e, r, {
967
+ this.$emit("drag", new pt(e, r, {
968
968
  left: n[0].clientX,
969
969
  top: n[0].clientY
970
970
  }, {
@@ -986,7 +986,7 @@ var lt = function(e, t) {
986
986
  "enter"
987
987
  ]
988
988
  };
989
- pt.render = function(e, t, n, r, a, s) {
989
+ mt.render = function(e, t, n, r, a, s) {
990
990
  return o(), w("div", {
991
991
  ref: "draggable",
992
992
  class: n.classname,
@@ -1004,9 +1004,9 @@ pt.render = function(e, t, n, r, a, s) {
1004
1004
  }
1005
1005
  }, [i(e.$slots, "default")], 34);
1006
1006
  };
1007
- var mt = U("vue-handler-wrapper"), ht = {
1007
+ var ht = U("vue-handler-wrapper"), gt = {
1008
1008
  name: "HandlerWrapper",
1009
- components: { DraggableElement: pt },
1009
+ components: { DraggableElement: mt },
1010
1010
  props: {
1011
1011
  horizontalPosition: { type: String },
1012
1012
  verticalPosition: { type: String },
@@ -1018,12 +1018,12 @@ var mt = U("vue-handler-wrapper"), ht = {
1018
1018
  computed: { classes: function() {
1019
1019
  var e;
1020
1020
  if (this.horizontalPosition || this.verticalPosition) {
1021
- var t, n = $e(this.horizontalPosition, this.verticalPosition);
1022
- e = mt((V(t = {}, n.classname, !0), V(t, "disabled", this.disabled), t));
1023
- } else e = mt({ disabled: this.disabled });
1021
+ var t, n = et(this.horizontalPosition, this.verticalPosition);
1022
+ e = ht((V(t = {}, n.classname, !0), V(t, "disabled", this.disabled), t));
1023
+ } else e = ht({ disabled: this.disabled });
1024
1024
  return {
1025
1025
  root: e,
1026
- draggable: mt("draggable")
1026
+ draggable: ht("draggable")
1027
1027
  };
1028
1028
  } },
1029
1029
  emits: [
@@ -1033,7 +1033,7 @@ var mt = U("vue-handler-wrapper"), ht = {
1033
1033
  "drag-end"
1034
1034
  ]
1035
1035
  };
1036
- ht.render = function(e, t, n, s, c, l) {
1036
+ gt.render = function(e, t, n, s, c, l) {
1037
1037
  var u = a("DraggableElement");
1038
1038
  return o(), w("div", { class: l.classes.root }, [m(u, {
1039
1039
  class: l.classes.draggable,
@@ -1056,9 +1056,9 @@ ht.render = function(e, t, n, s, c, l) {
1056
1056
  _: 3
1057
1057
  }, 8, ["class"])], 2);
1058
1058
  };
1059
- var gt = U("vue-line-wrapper"), _t = {
1059
+ var _t = U("vue-line-wrapper"), vt = {
1060
1060
  name: "LineWrapper",
1061
- components: { DraggableElement: pt },
1061
+ components: { DraggableElement: mt },
1062
1062
  props: {
1063
1063
  position: {
1064
1064
  type: String,
@@ -1071,7 +1071,7 @@ var gt = U("vue-line-wrapper"), _t = {
1071
1071
  },
1072
1072
  computed: { classname: function() {
1073
1073
  var e;
1074
- return gt((V(e = {}, this.position, !0), V(e, "disabled", this.disabled), e));
1074
+ return _t((V(e = {}, this.position, !0), V(e, "disabled", this.disabled), e));
1075
1075
  } },
1076
1076
  emits: [
1077
1077
  "leave",
@@ -1080,7 +1080,7 @@ var gt = U("vue-line-wrapper"), _t = {
1080
1080
  "drag-end"
1081
1081
  ]
1082
1082
  };
1083
- _t.render = function(e, t, n, s, c, l) {
1083
+ vt.render = function(e, t, n, s, c, l) {
1084
1084
  var u = a("DraggableElement");
1085
1085
  return o(), w(u, {
1086
1086
  class: l.classname,
@@ -1108,18 +1108,18 @@ var K = [
1108
1108
  "right",
1109
1109
  "top",
1110
1110
  "bottom"
1111
- ], vt = ["left", "right"], yt = ["top", "bottom"], bt = ["left", "top"], xt = [
1111
+ ], yt = ["left", "right"], bt = ["top", "bottom"], xt = ["left", "top"], St = [
1112
1112
  "fill-area",
1113
1113
  "fit-area",
1114
1114
  "stencil",
1115
1115
  "none"
1116
- ], St = {
1116
+ ], Ct = {
1117
1117
  left: 0,
1118
1118
  top: 0,
1119
1119
  width: 0,
1120
1120
  height: 0
1121
1121
  };
1122
- function Ct(e, t, n) {
1122
+ function wt(e, t, n) {
1123
1123
  return !(n ||= [
1124
1124
  "width",
1125
1125
  "height",
@@ -1137,7 +1137,7 @@ function q(e) {
1137
1137
  bottom: e.top + e.height
1138
1138
  };
1139
1139
  }
1140
- function wt(e, t) {
1140
+ function Tt(e, t) {
1141
1141
  return {
1142
1142
  left: e.left - t.left,
1143
1143
  top: e.top - t.top
@@ -1149,7 +1149,7 @@ function J(e) {
1149
1149
  top: e.top + e.height / 2
1150
1150
  };
1151
1151
  }
1152
- function Tt(e, t) {
1152
+ function Et(e, t) {
1153
1153
  var n = {
1154
1154
  left: 0,
1155
1155
  top: 0,
@@ -1169,7 +1169,7 @@ function Y(e, t) {
1169
1169
  height: e.height + t.top + t.bottom
1170
1170
  };
1171
1171
  }
1172
- function Et(e) {
1172
+ function Dt(e) {
1173
1173
  return {
1174
1174
  left: -e.left,
1175
1175
  top: -e.top
@@ -1204,21 +1204,21 @@ function Z(e, t, n, r) {
1204
1204
  function Q(e) {
1205
1205
  return e.width / e.height;
1206
1206
  }
1207
- function Dt(e, t) {
1207
+ function Ot(e, t) {
1208
1208
  return Math.min(t.right !== void 0 && t.left !== void 0 ? (t.right - t.left) / e.width : 1 / 0, t.bottom !== void 0 && t.top !== void 0 ? (t.bottom - t.top) / e.height : 1 / 0);
1209
1209
  }
1210
- function Ot(e, t) {
1210
+ function kt(e, t) {
1211
1211
  var n = {
1212
1212
  left: 0,
1213
1213
  top: 0
1214
- }, r = Tt(e, t);
1214
+ }, r = Et(e, t);
1215
1215
  return r.left && r.left > 0 ? n.left = r.left : r.right && r.right > 0 && (n.left = -r.right), r.top && r.top > 0 ? n.top = r.top : r.bottom && r.bottom > 0 && (n.top = -r.bottom), n;
1216
1216
  }
1217
- function kt(e, t) {
1217
+ function At(e, t) {
1218
1218
  var n;
1219
1219
  return t.minimum && e < t.minimum ? n = t.minimum : t.maximum && e > t.maximum && (n = t.maximum), n;
1220
1220
  }
1221
- function At(e, t) {
1221
+ function jt(e, t) {
1222
1222
  var n = Q(e), r = Q(t);
1223
1223
  return t.width < 1 / 0 && t.height < 1 / 0 ? n > r ? {
1224
1224
  width: t.width,
@@ -1234,36 +1234,36 @@ function At(e, t) {
1234
1234
  height: t.height
1235
1235
  } : e;
1236
1236
  }
1237
- function jt(e, t) {
1237
+ function Mt(e, t) {
1238
1238
  var n = t * Math.PI / 180;
1239
1239
  return {
1240
1240
  width: Math.abs(e.width * Math.cos(n)) + Math.abs(e.height * Math.sin(n)),
1241
1241
  height: Math.abs(e.width * Math.sin(n)) + Math.abs(e.height * Math.cos(n))
1242
1242
  };
1243
1243
  }
1244
- function Mt(e, t) {
1244
+ function Nt(e, t) {
1245
1245
  var n = t * Math.PI / 180;
1246
1246
  return {
1247
1247
  left: e.left * Math.cos(n) - e.top * Math.sin(n),
1248
1248
  top: e.left * Math.sin(n) + e.top * Math.cos(n)
1249
1249
  };
1250
1250
  }
1251
- function Nt(e, t) {
1252
- var n = Tt($(e, t), t);
1253
- return n.left + n.right + n.top + n.bottom ? n.left + n.right > n.top + n.bottom ? Math.min((e.width + n.left + n.right) / e.width, Dt(e, t)) : Math.min((e.height + n.top + n.bottom) / e.height, Dt(e, t)) : 1;
1251
+ function Pt(e, t) {
1252
+ var n = Et($(e, t), t);
1253
+ return n.left + n.right + n.top + n.bottom ? n.left + n.right > n.top + n.bottom ? Math.min((e.width + n.left + n.right) / e.width, Ot(e, t)) : Math.min((e.height + n.top + n.bottom) / e.height, Ot(e, t)) : 1;
1254
1254
  }
1255
1255
  function $(e, t, n) {
1256
1256
  n === void 0 && (n = !1);
1257
- var r = Ot(e, t);
1258
- return X(e, n ? Et(r) : r);
1257
+ var r = kt(e, t);
1258
+ return X(e, n ? Dt(r) : r);
1259
1259
  }
1260
- function Pt(e) {
1260
+ function Ft(e) {
1261
1261
  return {
1262
1262
  width: e.right !== void 0 && e.left !== void 0 ? e.right - e.left : 1 / 0,
1263
1263
  height: e.bottom !== void 0 && e.top !== void 0 ? e.bottom - e.top : 1 / 0
1264
1264
  };
1265
1265
  }
1266
- function Ft(e, t) {
1266
+ function It(e, t) {
1267
1267
  return W(W({}, e), {
1268
1268
  minWidth: Math.min(t.width, e.minWidth),
1269
1269
  minHeight: Math.min(t.height, e.minHeight),
@@ -1271,7 +1271,7 @@ function Ft(e, t) {
1271
1271
  maxHeight: Math.min(t.height, e.maxHeight)
1272
1272
  });
1273
1273
  }
1274
- function It(e, t, n) {
1274
+ function Lt(e, t, n) {
1275
1275
  n === void 0 && (n = !0);
1276
1276
  var r = {};
1277
1277
  return K.forEach((function(i) {
@@ -1279,17 +1279,17 @@ function It(e, t, n) {
1279
1279
  a !== void 0 && o !== void 0 ? r[i] = i === "left" || i === "top" ? n ? Math.max(a, o) : Math.min(a, o) : n ? Math.min(a, o) : Math.max(a, o) : o === void 0 ? a !== void 0 && (r[i] = a) : r[i] = o;
1280
1280
  })), r;
1281
1281
  }
1282
- function Lt(e, t) {
1283
- return It(e, t, !0);
1282
+ function Rt(e, t) {
1283
+ return Lt(e, t, !0);
1284
1284
  }
1285
- function Rt(e) {
1285
+ function zt(e) {
1286
1286
  var t = e.size, n = e.aspectRatio, r = e.ignoreMinimum, i = e.sizeRestrictions;
1287
1287
  return !!((t.correctRatio || Q(t) >= n.minimum && Q(t) <= n.maximum) && t.height <= i.maxHeight && t.width <= i.maxWidth && t.width && t.height && (r || t.height >= i.minHeight && t.width >= i.minWidth));
1288
1288
  }
1289
- function zt(e, t) {
1289
+ function Bt(e, t) {
1290
1290
  return (e.width - t.width) ** 2 + (e.height - t.height) ** 2;
1291
1291
  }
1292
- function Bt(e) {
1292
+ function Vt(e) {
1293
1293
  var t = e.width, n = e.height, r = e.sizeRestrictions, i = {
1294
1294
  minimum: e.aspectRatio && e.aspectRatio.minimum || 0,
1295
1295
  maximum: e.aspectRatio && e.aspectRatio.maximum || 1 / 0
@@ -1299,15 +1299,15 @@ function Bt(e) {
1299
1299
  };
1300
1300
  function o(e, a) {
1301
1301
  return a === void 0 && (a = !1), e.reduce((function(e, o) {
1302
- return Rt({
1302
+ return zt({
1303
1303
  size: o,
1304
1304
  aspectRatio: i,
1305
1305
  sizeRestrictions: r,
1306
1306
  ignoreMinimum: a
1307
- }) && (!e || zt(o, {
1307
+ }) && (!e || Bt(o, {
1308
1308
  width: t,
1309
1309
  height: n
1310
- }) < zt(e, {
1310
+ }) < Bt(e, {
1311
1311
  width: t,
1312
1312
  height: n
1313
1313
  })) ? o : e;
@@ -1324,7 +1324,7 @@ function Bt(e) {
1324
1324
  height: a.height,
1325
1325
  correctRatio: !0
1326
1326
  });
1327
- })), Rt({
1327
+ })), zt({
1328
1328
  size: a,
1329
1329
  aspectRatio: i,
1330
1330
  sizeRestrictions: r
@@ -1335,16 +1335,16 @@ function Bt(e) {
1335
1335
  height: c.height
1336
1336
  };
1337
1337
  }
1338
- function Vt(e) {
1338
+ function Ht(e) {
1339
1339
  var t = e.event, n = e.coordinates, r = e.positionRestrictions, i = r === void 0 ? {} : r, a = X(n, t.directions);
1340
- return X(a, Ot(a, i));
1340
+ return X(a, kt(a, i));
1341
1341
  }
1342
- function Ht(e) {
1342
+ function Ut(e) {
1343
1343
  var t = e.coordinates, n = e.transform, r = e.imageSize, i = e.sizeRestrictions, a = e.positionRestrictions, o = e.aspectRatio, s = e.visibleArea, c = function(e, t) {
1344
- return Vt({
1344
+ return Ht({
1345
1345
  coordinates: e,
1346
1346
  positionRestrictions: a,
1347
- event: new dt({
1347
+ event: new ft({
1348
1348
  left: t.left - e.left,
1349
1349
  top: t.top - e.top
1350
1350
  })
@@ -1357,7 +1357,7 @@ function Ht(e) {
1357
1357
  imageSize: r,
1358
1358
  visibleArea: s
1359
1359
  }) : e).width) && G(t.height) || (l = function(e, t) {
1360
- return c(W(W(W({}, e), Bt({
1360
+ return c(W(W(W({}, e), Vt({
1361
1361
  width: t.width,
1362
1362
  height: t.height,
1363
1363
  sizeRestrictions: i,
@@ -1372,9 +1372,9 @@ function Ht(e) {
1372
1372
  }(l, W(W({}, l), t))), G(t.left) && G(t.top) || (l = c(l, W(W({}, l), t)));
1373
1373
  })), l;
1374
1374
  }
1375
- function Ut(e) {
1375
+ function Wt(e) {
1376
1376
  var t = e.getAreaRestrictions, n = e.boundaries, r = e.coordinates, i = e.visibleArea, a = e.stencilSize, o = e.sizeRestrictions, s = e.positionRestrictions, c, l, u, d = W({}, r), f = W({}, i), p = W({}, a);
1377
- c = Q(p), l = Q(d), u === void 0 && (u = .001), (c === 0 || l === 0 ? Math.abs(l - c) < u : Math.abs(l / c) < 1 + u && Math.abs(l / c) > 1 - u) || (d = W(W({}, d), Bt({
1377
+ c = Q(p), l = Q(d), u === void 0 && (u = .001), (c === 0 || l === 0 ? Math.abs(l - c) < u : Math.abs(l / c) < 1 + u && Math.abs(l / c) > 1 - u) || (d = W(W({}, d), Vt({
1378
1378
  sizeRestrictions: o,
1379
1379
  width: d.width,
1380
1380
  height: d.height,
@@ -1383,19 +1383,19 @@ function Ut(e) {
1383
1383
  maximum: Q(p)
1384
1384
  }
1385
1385
  })));
1386
- var m = Nt(f = Z(f, d.width * n.width / (f.width * p.width)), t({
1386
+ var m = Pt(f = Z(f, d.width * n.width / (f.width * p.width)), t({
1387
1387
  visibleArea: f,
1388
1388
  type: "resize"
1389
1389
  }));
1390
- return m !== 1 && (f = Z(f, m), d = Z(d, m)), f = $(f = X(f, wt(J(d), J(f))), t({
1390
+ return m !== 1 && (f = Z(f, m), d = Z(d, m)), f = $(f = X(f, Tt(J(d), J(f))), t({
1391
1391
  visibleArea: f,
1392
1392
  type: "move"
1393
1393
  })), {
1394
- coordinates: d = $(d, Lt(q(f), s)),
1394
+ coordinates: d = $(d, Rt(q(f), s)),
1395
1395
  visibleArea: f
1396
1396
  };
1397
1397
  }
1398
- function Wt(e) {
1398
+ function Gt(e) {
1399
1399
  var t = e.event, n = e.getAreaRestrictions, r = e.boundaries, i = e.coordinates, a = e.visibleArea, o = e.positionRestrictions, s = W({}, i), c = W({}, a);
1400
1400
  if (i && a && t.type !== "manipulateImage") {
1401
1401
  var l = {
@@ -1403,31 +1403,31 @@ function Wt(e) {
1403
1403
  height: 0
1404
1404
  };
1405
1405
  Q(r) > Q(s) ? (l.height = .8 * r.height, l.width = l.height * Q(s)) : (l.width = .8 * r.width, l.height = l.width * Q(s));
1406
- var u = Nt(c = Z(c, s.width * r.width / (c.width * l.width)), n({
1406
+ var u = Pt(c = Z(c, s.width * r.width / (c.width * l.width)), n({
1407
1407
  visibleArea: c,
1408
1408
  type: "resize"
1409
1409
  }));
1410
- c = Z(c, u), u !== 1 && (l.height /= u, l.width /= u), c = $(c = X(c, wt(J(s), J(c))), n({
1410
+ c = Z(c, u), u !== 1 && (l.height /= u, l.width /= u), c = $(c = X(c, Tt(J(s), J(c))), n({
1411
1411
  visibleArea: c,
1412
1412
  type: "move"
1413
- })), s = $(s, Lt(q(c), o));
1413
+ })), s = $(s, Rt(q(c), o));
1414
1414
  }
1415
1415
  return {
1416
1416
  coordinates: s,
1417
1417
  visibleArea: c
1418
1418
  };
1419
1419
  }
1420
- function Gt(e) {
1420
+ function Kt(e) {
1421
1421
  var t = e.event, n = e.coordinates, r = e.visibleArea, i = e.getAreaRestrictions, a = W({}, r), o = W({}, n);
1422
1422
  if (t.type === "setCoordinates") {
1423
1423
  var s = Math.max(0, o.width - a.width), c = Math.max(0, o.height - a.height);
1424
- s > c ? a = Z(a, Math.min(o.width / a.width, Dt(a, i({
1424
+ s > c ? a = Z(a, Math.min(o.width / a.width, Ot(a, i({
1425
1425
  visibleArea: a,
1426
1426
  type: "resize"
1427
- })))) : c > s && (a = Z(a, Math.min(o.height / a.height, Dt(a, i({
1427
+ })))) : c > s && (a = Z(a, Math.min(o.height / a.height, Ot(a, i({
1428
1428
  visibleArea: a,
1429
1429
  type: "resize"
1430
- }))))), a = $(a = X(a, Et(Ot(o, q(a)))), i({
1430
+ }))))), a = $(a = X(a, Dt(kt(o, q(a)))), i({
1431
1431
  visibleArea: a,
1432
1432
  type: "move"
1433
1433
  }));
@@ -1437,14 +1437,14 @@ function Gt(e) {
1437
1437
  coordinates: o
1438
1438
  };
1439
1439
  }
1440
- function Kt(e) {
1440
+ function qt(e) {
1441
1441
  var t = e.imageSize, n = e.visibleArea, r = e.coordinates, i = n || t;
1442
1442
  return {
1443
1443
  left: (n ? n.left : 0) + i.width / 2 - r.width / 2,
1444
1444
  top: (n ? n.top : 0) + i.height / 2 - r.height / 2
1445
1445
  };
1446
1446
  }
1447
- function qt(e) {
1447
+ function Jt(e) {
1448
1448
  var t = e.imageSize, n = e.visibleArea, r = e.aspectRatio, i = e.sizeRestrictions, a = n || t, o = Math.min(r.maximum || 1 / 0, Math.max(r.minimum || 0, Q(a))), s = a.width < a.height ? {
1449
1449
  width: .8 * a.width,
1450
1450
  height: .8 * a.width / o
@@ -1452,35 +1452,35 @@ function qt(e) {
1452
1452
  height: .8 * a.height,
1453
1453
  width: .8 * a.height * o
1454
1454
  };
1455
- return Bt(W(W({}, s), {
1455
+ return Vt(W(W({}, s), {
1456
1456
  aspectRatio: r,
1457
1457
  sizeRestrictions: i
1458
1458
  }));
1459
1459
  }
1460
- function Jt(e) {
1460
+ function Yt(e) {
1461
1461
  var t, n, r = e.imageSize, i = e.visibleArea, a = e.boundaries, o = e.aspectRatio, s = e.sizeRestrictions, c = e.stencilSize, l = i || r;
1462
- return Q(l) > Q(a) ? n = (t = c.height * l.height / a.height) * Q(c) : t = (n = c.width * l.width / a.width) / Q(c), Bt({
1462
+ return Q(l) > Q(a) ? n = (t = c.height * l.height / a.height) * Q(c) : t = (n = c.width * l.width / a.width) / Q(c), Vt({
1463
1463
  width: n,
1464
1464
  height: t,
1465
1465
  aspectRatio: o,
1466
1466
  sizeRestrictions: s
1467
1467
  });
1468
1468
  }
1469
- function Yt(e) {
1469
+ function Xt(e) {
1470
1470
  var t = e.getAreaRestrictions, n = e.coordinates, r = e.imageSize, i = Q(e.boundaries);
1471
1471
  if (n) {
1472
1472
  var a = {
1473
1473
  height: Math.max(n.height, r.height),
1474
1474
  width: Math.max(n.width, r.width)
1475
- }, o = At({
1475
+ }, o = jt({
1476
1476
  width: Q(a) > i ? a.width : a.height * i,
1477
1477
  height: Q(a) > i ? a.width / i : a.height
1478
- }, Pt(t())), s = {
1478
+ }, Ft(t())), s = {
1479
1479
  left: n.left + n.width / 2 - o.width / 2,
1480
1480
  top: n.top + n.height / 2 - o.height / 2,
1481
1481
  width: o.width,
1482
1482
  height: o.height
1483
- }, c = Tt(n, q(W({
1483
+ }, c = Et(n, q(W({
1484
1484
  left: 0,
1485
1485
  top: 0
1486
1486
  }, r))), l = {};
@@ -1497,10 +1497,10 @@ function Yt(e) {
1497
1497
  height: o.height
1498
1498
  };
1499
1499
  }
1500
- function Xt(e, t) {
1501
- return It(e, q(t));
1500
+ function Zt(e, t) {
1501
+ return Lt(e, q(t));
1502
1502
  }
1503
- function Zt(e) {
1503
+ function Qt(e) {
1504
1504
  var t = e.event, n = e.coordinates, r = e.visibleArea, i = e.sizeRestrictions, a = e.getAreaRestrictions, o = e.positionRestrictions, s = e.adjustStencil, c = t.scale, l = t.move, u = W({}, r), d = W({}, n), f = 1, p = 1, m = c.factor && Math.abs(c.factor - 1) > .001;
1505
1505
  u = X(u, {
1506
1506
  left: l.left || 0,
@@ -1509,16 +1509,16 @@ function Zt(e) {
1509
1509
  var h = {
1510
1510
  stencil: {
1511
1511
  minimum: Math.max(i.minWidth ? i.minWidth / d.width : 0, i.minHeight ? i.minHeight / d.height : 0),
1512
- maximum: Math.min(i.maxWidth ? i.maxWidth / d.width : 1 / 0, i.maxHeight ? i.maxHeight / d.height : 1 / 0, Dt(d, o))
1512
+ maximum: Math.min(i.maxWidth ? i.maxWidth / d.width : 1 / 0, i.maxHeight ? i.maxHeight / d.height : 1 / 0, Ot(d, o))
1513
1513
  },
1514
- area: { maximum: Dt(u, a({
1514
+ area: { maximum: Ot(u, a({
1515
1515
  visibleArea: u,
1516
1516
  type: "resize"
1517
1517
  })) }
1518
1518
  };
1519
1519
  c.factor && m && (c.factor < 1 ? (p = Math.max(c.factor, h.stencil.minimum)) > 1 && (p = 1) : c.factor > 1 && (p = Math.min(c.factor, Math.min(h.area.maximum, h.stencil.maximum))) < 1 && (p = 1)), p && (u = Z(u, p, c.center));
1520
1520
  var g = n.left - r.left, _ = r.width + r.left - (n.width + n.left), v = n.top - r.top, y = r.height + r.top - (n.height + n.top);
1521
- return u = $(u = X(u, Ot(u, {
1521
+ return u = $(u = X(u, kt(u, {
1522
1522
  left: o.left === void 0 ? void 0 : o.left - g * p,
1523
1523
  top: o.top === void 0 ? void 0 : o.top - v * p,
1524
1524
  bottom: o.bottom === void 0 ? void 0 : o.bottom + y * p,
@@ -1526,46 +1526,46 @@ function Zt(e) {
1526
1526
  })), a({
1527
1527
  visibleArea: u,
1528
1528
  type: "move"
1529
- })), d.width *= p, d.height *= p, d.left = u.left + g * p, d.top = u.top + v * p, d = $(d, Lt(q(u), o)), c.factor && m && s && (c.factor > 1 ? f = Math.min(h.area.maximum, c.factor) / p : c.factor < 1 && (f = Math.max(d.height / u.height, d.width / u.width, c.factor / p)), f !== 1 && (u = X(u = $(u = Z(u, f, c.factor > 1 ? c.center : J(d)), a({
1529
+ })), d.width *= p, d.height *= p, d.left = u.left + g * p, d.top = u.top + v * p, d = $(d, Rt(q(u), o)), c.factor && m && s && (c.factor > 1 ? f = Math.min(h.area.maximum, c.factor) / p : c.factor < 1 && (f = Math.max(d.height / u.height, d.width / u.width, c.factor / p)), f !== 1 && (u = X(u = $(u = Z(u, f, c.factor > 1 ? c.center : J(d)), a({
1530
1530
  visibleArea: u,
1531
1531
  type: "move"
1532
- })), Et(Ot(d, q(u)))))), {
1532
+ })), Dt(kt(d, q(u)))))), {
1533
1533
  coordinates: d,
1534
1534
  visibleArea: u
1535
1535
  };
1536
1536
  }
1537
- function Qt(e) {
1538
- var t = e.aspectRatio, n = e.getAreaRestrictions, r = e.coordinates, i = e.visibleArea, a = e.sizeRestrictions, o = e.positionRestrictions, s = e.imageSize, c = e.previousImageSize, l = e.angle, u = W({}, r), d = W({}, i), f = Mt(J(W({
1537
+ function $t(e) {
1538
+ var t = e.aspectRatio, n = e.getAreaRestrictions, r = e.coordinates, i = e.visibleArea, a = e.sizeRestrictions, o = e.positionRestrictions, s = e.imageSize, c = e.previousImageSize, l = e.angle, u = W({}, r), d = W({}, i), f = Nt(J(W({
1539
1539
  left: 0,
1540
1540
  top: 0
1541
1541
  }, c)), l);
1542
- return (u = W(W({}, Bt({
1542
+ return (u = W(W({}, Vt({
1543
1543
  sizeRestrictions: a,
1544
1544
  aspectRatio: t,
1545
1545
  width: u.width,
1546
1546
  height: u.height
1547
- })), Mt(J(u), l))).left -= f.left - s.width / 2 + u.width / 2, u.top -= f.top - s.height / 2 + u.height / 2, d = Z(d, Nt(d, n({
1547
+ })), Nt(J(u), l))).left -= f.left - s.width / 2 + u.width / 2, u.top -= f.top - s.height / 2 + u.height / 2, d = Z(d, Pt(d, n({
1548
1548
  visibleArea: d,
1549
1549
  type: "resize"
1550
1550
  }))), {
1551
1551
  coordinates: u = $(u, o),
1552
- visibleArea: d = $(d = X(d, wt(J(u), J(r))), n({
1552
+ visibleArea: d = $(d = X(d, Tt(J(u), J(r))), n({
1553
1553
  visibleArea: d,
1554
1554
  type: "move"
1555
1555
  }))
1556
1556
  };
1557
1557
  }
1558
- function $t(e) {
1558
+ function en(e) {
1559
1559
  var t = e.flip, n = e.previousFlip, r = e.rotate, i = e.getAreaRestrictions, a = e.coordinates, o = e.visibleArea, s = e.imageSize, c = W({}, a), l = W({}, o), u = n.horizontal !== t.horizontal, d = n.vertical !== t.vertical;
1560
1560
  if (u || d) {
1561
- var f = Mt({
1561
+ var f = Nt({
1562
1562
  left: s.width / 2,
1563
1563
  top: s.height / 2
1564
- }, -r), p = Mt(J(c), -r), m = Mt({
1564
+ }, -r), p = Nt(J(c), -r), m = Nt({
1565
1565
  left: u ? f.left - (p.left - f.left) : p.left,
1566
1566
  top: d ? f.top - (p.top - f.top) : p.top
1567
1567
  }, r);
1568
- c = X(c, wt(m, J(c))), p = Mt(J(l), -r), l = $(l = X(l, wt(m = Mt({
1568
+ c = X(c, Tt(m, J(c))), p = Nt(J(l), -r), l = $(l = X(l, Tt(m = Nt({
1569
1569
  left: u ? f.left - (p.left - f.left) : p.left,
1570
1570
  top: d ? f.top - (p.top - f.top) : p.top
1571
1571
  }, r), J(l))), i({
@@ -1578,11 +1578,11 @@ function $t(e) {
1578
1578
  visibleArea: l
1579
1579
  };
1580
1580
  }
1581
- function en(e) {
1581
+ function tn(e) {
1582
1582
  var t = e.directions, n = e.coordinates, r = e.positionRestrictions, i = r === void 0 ? {} : r, a = e.sizeRestrictions, o = e.preserveRatio, s = e.compensate, c = W({}, t), l = Y(n, c).width, u = Y(n, c).height;
1583
1583
  l < 0 && (c.left < 0 && c.right < 0 ? (c.left = -(n.width - a.minWidth) / (c.left / c.right), c.right = -(n.width - a.minWidth) / (c.right / c.left)) : c.left < 0 ? c.left = -(n.width - a.minWidth) : c.right < 0 && (c.right = -(n.width - a.minWidth))), u < 0 && (c.top < 0 && c.bottom < 0 ? (c.top = -(n.height - a.minHeight) / (c.top / c.bottom), c.bottom = -(n.height - a.minHeight) / (c.bottom / c.top)) : c.top < 0 ? c.top = -(n.height - a.minHeight) : c.bottom < 0 && (c.bottom = -(n.height - a.minHeight)));
1584
- var d = Tt(Y(n, c), i);
1585
- s && (d.left && d.left > 0 && d.right === 0 ? (c.right += d.left, c.left -= d.left) : d.right && d.right > 0 && d.left === 0 && (c.left += d.right, c.right -= d.right), d.top && d.top > 0 && d.bottom === 0 ? (c.bottom += d.top, c.top -= d.top) : d.bottom && d.bottom > 0 && d.top === 0 && (c.top += d.bottom, c.bottom -= d.bottom), d = Tt(Y(n, c), i));
1584
+ var d = Et(Y(n, c), i);
1585
+ s && (d.left && d.left > 0 && d.right === 0 ? (c.right += d.left, c.left -= d.left) : d.right && d.right > 0 && d.left === 0 && (c.left += d.right, c.right -= d.right), d.top && d.top > 0 && d.bottom === 0 ? (c.bottom += d.top, c.top -= d.top) : d.bottom && d.bottom > 0 && d.top === 0 && (c.top += d.bottom, c.bottom -= d.bottom), d = Et(Y(n, c), i));
1586
1586
  var f = {
1587
1587
  width: 1 / 0,
1588
1588
  height: 1 / 0,
@@ -1609,19 +1609,19 @@ function en(e) {
1609
1609
  m !== 1 / 0 && K.forEach((function(e) {
1610
1610
  c[e] *= m;
1611
1611
  }));
1612
- } else f.width !== 1 / 0 && vt.forEach((function(e) {
1612
+ } else f.width !== 1 / 0 && yt.forEach((function(e) {
1613
1613
  c[e] *= f.width;
1614
- })), f.height !== 1 / 0 && yt.forEach((function(e) {
1614
+ })), f.height !== 1 / 0 && bt.forEach((function(e) {
1615
1615
  c[e] *= f.height;
1616
1616
  }));
1617
1617
  return c;
1618
1618
  }
1619
- function tn(e, t, n) {
1619
+ function nn(e, t, n) {
1620
1620
  return t == 0 && n == 0 ? e / 2 : t == 0 ? 0 : n == 0 ? e : e * Math.abs(t / (t + n));
1621
1621
  }
1622
- var nn = U("vue-simple-handler"), rn = U("vue-simple-handler-wrapper"), an = {
1622
+ var rn = U("vue-simple-handler"), an = U("vue-simple-handler-wrapper"), on = {
1623
1623
  name: "SimpleHandler",
1624
- components: { HandlerWrapper: ht },
1624
+ components: { HandlerWrapper: gt },
1625
1625
  props: {
1626
1626
  defaultClass: { type: String },
1627
1627
  hoverClass: { type: String },
@@ -1639,8 +1639,8 @@ var nn = U("vue-simple-handler"), rn = U("vue-simple-handler-wrapper"), an = {
1639
1639
  computed: { classes: function() {
1640
1640
  var e, t = (V(e = {}, this.horizontalPosition, !!this.horizontalPosition), V(e, this.verticalPosition, !!this.verticalPosition), V(e, `${this.horizontalPosition}-${this.verticalPosition}`, !!(this.verticalPosition && this.horizontalPosition)), V(e, "hover", this.hover), e);
1641
1641
  return {
1642
- default: H(nn(t), this.defaultClass, this.hover && this.hoverClass),
1643
- wrapper: H(rn(t), this.wrapperClass)
1642
+ default: H(rn(t), this.defaultClass, this.hover && this.hoverClass),
1643
+ wrapper: H(an(t), this.wrapperClass)
1644
1644
  };
1645
1645
  } },
1646
1646
  methods: {
@@ -1659,7 +1659,7 @@ var nn = U("vue-simple-handler"), rn = U("vue-simple-handler-wrapper"), an = {
1659
1659
  },
1660
1660
  emits: ["drag", "drag-end"]
1661
1661
  };
1662
- an.render = function(e, t, n, i, s, c) {
1662
+ on.render = function(e, t, n, i, s, c) {
1663
1663
  var l = a("HandlerWrapper");
1664
1664
  return o(), w(l, {
1665
1665
  class: c.classes.wrapper,
@@ -1686,9 +1686,9 @@ an.render = function(e, t, n, i, s, c) {
1686
1686
  "onLeave"
1687
1687
  ]);
1688
1688
  };
1689
- var on = U("vue-simple-line"), sn = U("vue-simple-line-wrapper"), cn = {
1689
+ var sn = U("vue-simple-line"), cn = U("vue-simple-line-wrapper"), ln = {
1690
1690
  name: "SimpleLine",
1691
- components: { LineWrapper: _t },
1691
+ components: { LineWrapper: vt },
1692
1692
  props: {
1693
1693
  defaultClass: { type: String },
1694
1694
  hoverClass: { type: String },
@@ -1704,8 +1704,8 @@ var on = U("vue-simple-line"), sn = U("vue-simple-line-wrapper"), cn = {
1704
1704
  },
1705
1705
  computed: { classes: function() {
1706
1706
  return {
1707
- root: H(on(V({}, this.position, !0)), this.defaultClass, this.hover && this.hoverClass),
1708
- wrapper: H(sn(V({}, this.position, !0)), this.wrapperClass)
1707
+ root: H(sn(V({}, this.position, !0)), this.defaultClass, this.hover && this.hoverClass),
1708
+ wrapper: H(cn(V({}, this.position, !0)), this.wrapperClass)
1709
1709
  };
1710
1710
  } },
1711
1711
  methods: {
@@ -1724,7 +1724,7 @@ var on = U("vue-simple-line"), sn = U("vue-simple-line-wrapper"), cn = {
1724
1724
  },
1725
1725
  emits: ["drag", "drag-end"]
1726
1726
  };
1727
- cn.render = function(e, t, n, i, s, c) {
1727
+ ln.render = function(e, t, n, i, s, c) {
1728
1728
  var l = a("LineWrapper");
1729
1729
  return o(), w(l, {
1730
1730
  class: c.classes.wrapper,
@@ -1749,15 +1749,15 @@ cn.render = function(e, t, n, i, s, c) {
1749
1749
  "onLeave"
1750
1750
  ]);
1751
1751
  };
1752
- var ln = U("vue-bounding-box"), un = [
1752
+ var un = U("vue-bounding-box"), dn = [
1753
1753
  "east",
1754
1754
  "west",
1755
1755
  null
1756
- ], dn = [
1756
+ ], fn = [
1757
1757
  "south",
1758
1758
  "north",
1759
1759
  null
1760
- ], fn = {
1760
+ ], pn = {
1761
1761
  name: "BoundingBox",
1762
1762
  props: {
1763
1763
  width: { type: Number },
@@ -1781,7 +1781,7 @@ var ln = U("vue-bounding-box"), un = [
1781
1781
  handlersComponent: {
1782
1782
  type: [Object, String],
1783
1783
  default: function() {
1784
- return an;
1784
+ return on;
1785
1785
  }
1786
1786
  },
1787
1787
  handlersClasses: {
@@ -1810,7 +1810,7 @@ var ln = U("vue-bounding-box"), un = [
1810
1810
  linesComponent: {
1811
1811
  type: [Object, String],
1812
1812
  default: function() {
1813
- return cn;
1813
+ return ln;
1814
1814
  }
1815
1815
  },
1816
1816
  linesClasses: {
@@ -1832,10 +1832,10 @@ var ln = U("vue-bounding-box"), un = [
1832
1832
  },
1833
1833
  data: function() {
1834
1834
  var e = [];
1835
- return un.forEach((function(t) {
1836
- dn.forEach((function(n) {
1835
+ return dn.forEach((function(t) {
1836
+ fn.forEach((function(n) {
1837
1837
  if (t !== n) {
1838
- var r = $e(t, n);
1838
+ var r = et(t, n);
1839
1839
  e.push({
1840
1840
  name: r.name,
1841
1841
  classname: r.classname,
@@ -1854,7 +1854,7 @@ var ln = U("vue-bounding-box"), un = [
1854
1854
  classes: function() {
1855
1855
  var e = this.handlersClasses, t = this.handlersWrappersClasses, n = this.linesClasses, r = this.linesWrappersClasses;
1856
1856
  return {
1857
- root: ln(),
1857
+ root: un(),
1858
1858
  handlers: e,
1859
1859
  handlersWrappers: t,
1860
1860
  lines: n,
@@ -1892,8 +1892,8 @@ var ln = U("vue-bounding-box"), un = [
1892
1892
  };
1893
1893
  if (n && r) {
1894
1894
  var o = i.horizontalDirection, s = i.verticalDirection, c = o === "east" ? n : o === "west" ? 0 : n / 2, l = s === "south" ? r : s === "north" ? 0 : r / 2;
1895
- a.wrapperClass = ln("handler"), a.wrapperStyle = { transform: `translate(${c}px, ${l}px)` }, e.transitions && e.transitions.enabled && (a.wrapperStyle.transition = `${e.transitions.time}ms ${e.transitions.timingFunction}`);
1896
- } else a.wrapperClass = ln("handler", V({}, i.classname, !0));
1895
+ a.wrapperClass = un("handler"), a.wrapperStyle = { transform: `translate(${c}px, ${l}px)` }, e.transitions && e.transitions.enabled && (a.wrapperStyle.transition = `${e.transitions.time}ms ${e.transitions.timingFunction}`);
1896
+ } else a.wrapperClass = un("handler", V({}, i.classname, !0));
1897
1897
  t.push(a);
1898
1898
  }
1899
1899
  })), t;
@@ -1919,7 +1919,7 @@ var ln = U("vue-bounding-box"), un = [
1919
1919
  top: 0,
1920
1920
  bottom: 0
1921
1921
  };
1922
- t === "west" ? s.left -= a : t === "east" && (s.right += a), n === "north" ? s.top -= o : n === "south" && (s.bottom += o), !n && t ? r = "width" : n && !t && (r = "height"), this.resizable && this.$emit("resize", new ut(s, {
1922
+ t === "west" ? s.left -= a : t === "east" && (s.right += a), n === "north" ? s.top -= o : n === "south" && (s.bottom += o), !n && t ? r = "width" : n && !t && (r = "height"), this.resizable && this.$emit("resize", new dt(s, {
1923
1923
  allowedDirections: {
1924
1924
  left: t === "west" || !t,
1925
1925
  right: t === "east" || !t,
@@ -1933,7 +1933,7 @@ var ln = U("vue-bounding-box"), un = [
1933
1933
  },
1934
1934
  emits: ["resize", "resize-end"]
1935
1935
  };
1936
- fn.render = function(e, t, r, a, s, c) {
1936
+ pn.render = function(e, t, r, a, s, c) {
1937
1937
  return o(), w("div", {
1938
1938
  ref: "box",
1939
1939
  class: c.classes.root,
@@ -1993,7 +1993,7 @@ fn.render = function(e, t, r, a, s, c) {
1993
1993
  })), 128))
1994
1994
  ], 6);
1995
1995
  };
1996
- var pn = U("vue-draggable-area"), mn = {
1996
+ var mn = U("vue-draggable-area"), hn = {
1997
1997
  name: "DraggableArea",
1998
1998
  props: {
1999
1999
  movable: {
@@ -2006,7 +2006,7 @@ var pn = U("vue-draggable-area"), mn = {
2006
2006
  }
2007
2007
  },
2008
2008
  computed: { classnames: function() {
2009
- return { default: pn() };
2009
+ return { default: mn() };
2010
2010
  } },
2011
2011
  beforeMount: function() {
2012
2012
  window.addEventListener("mouseup", this.onMouseUp, { passive: !1 }), window.addEventListener("mousemove", this.onMouseMove, { passive: !1 }), window.addEventListener("touchmove", this.onTouchMove, { passive: !1 }), window.addEventListener("touchend", this.onTouchEnd, { passive: !1 });
@@ -2021,14 +2021,14 @@ var pn = U("vue-draggable-area"), mn = {
2021
2021
  onTouchStart: function(e) {
2022
2022
  if (e.cancelable) {
2023
2023
  var t = this.movable && e.touches.length === 1;
2024
- t && (this.touches = Ke(e.touches)), (this.touchStarted || t) && (e.preventDefault(), e.stopPropagation());
2024
+ t && (this.touches = qe(e.touches)), (this.touchStarted || t) && (e.preventDefault(), e.stopPropagation());
2025
2025
  }
2026
2026
  },
2027
2027
  onTouchEnd: function() {
2028
2028
  this.touchStarted = !1, this.processEnd();
2029
2029
  },
2030
2030
  onTouchMove: function(e) {
2031
- this.touches.length >= 1 && (this.touchStarted ? (this.processMove(e, e.touches), e.preventDefault(), e.stopPropagation()) : ct({
2031
+ this.touches.length >= 1 && (this.touchStarted ? (this.processMove(e, e.touches), e.preventDefault(), e.stopPropagation()) : lt({
2032
2032
  x: this.touches[0].clientX,
2033
2033
  y: this.touches[0].clientY
2034
2034
  }, {
@@ -2067,10 +2067,10 @@ var pn = U("vue-draggable-area"), mn = {
2067
2067
  };
2068
2068
  },
2069
2069
  processMove: function(e, t) {
2070
- var n = Ke(t);
2070
+ var n = qe(t);
2071
2071
  if (this.touches.length) {
2072
2072
  var r = this.$refs.container.getBoundingClientRect(), i = r.left, a = r.top;
2073
- this.touches.length === 1 && n.length === 1 && this.$emit("move", new dt({
2073
+ this.touches.length === 1 && n.length === 1 && this.$emit("move", new ft({
2074
2074
  left: n[0].clientX - (i + this.anchor.x),
2075
2075
  top: n[0].clientY - (a + this.anchor.y)
2076
2076
  }));
@@ -2082,7 +2082,7 @@ var pn = U("vue-draggable-area"), mn = {
2082
2082
  },
2083
2083
  emits: ["move", "move-end"]
2084
2084
  };
2085
- mn.render = function(e, t, n, r, a, s) {
2085
+ hn.render = function(e, t, n, r, a, s) {
2086
2086
  return o(), w("div", {
2087
2087
  ref: "container",
2088
2088
  onTouchstart: t[1] ||= function() {
@@ -2093,7 +2093,7 @@ mn.render = function(e, t, n, r, a, s) {
2093
2093
  }
2094
2094
  }, [i(e.$slots, "default")], 544);
2095
2095
  };
2096
- function hn(e) {
2096
+ function gn(e) {
2097
2097
  return {
2098
2098
  rotate: e.rotate || 0,
2099
2099
  flip: {
@@ -2102,7 +2102,7 @@ function hn(e) {
2102
2102
  }
2103
2103
  };
2104
2104
  }
2105
- function gn(e) {
2105
+ function _n(e) {
2106
2106
  return new Promise((function(t, n) {
2107
2107
  try {
2108
2108
  if (e) {
@@ -2135,11 +2135,11 @@ function gn(e) {
2135
2135
  var a, o, s;
2136
2136
  }));
2137
2137
  }
2138
- function _n(e) {
2138
+ function vn(e) {
2139
2139
  var t = e.rotate, n = e.flip, r = e.scaleX, i = e.scaleY, a = "";
2140
2140
  return a += " rotate(" + t + "deg) ", a += " scaleX(" + r * (n.horizontal ? -1 : 1) + ") ", a += " scaleY(" + i * (n.vertical ? -1 : 1) + ") ";
2141
2141
  }
2142
- function vn(e) {
2142
+ function yn(e) {
2143
2143
  try {
2144
2144
  var t, n = new DataView(e), r = void 0, i = void 0, a = void 0, o = void 0;
2145
2145
  if (n.getUint8(0) === 255 && n.getUint8(1) === 216) for (var s = n.byteLength, c = 2; c + 1 < s;) {
@@ -2171,7 +2171,7 @@ function vn(e) {
2171
2171
  return null;
2172
2172
  }
2173
2173
  }
2174
- function yn(e, t) {
2174
+ function bn(e, t) {
2175
2175
  var n = t.getBoundingClientRect(), r = n.left, i = n.top, a = {
2176
2176
  left: 0,
2177
2177
  top: 0
@@ -2179,7 +2179,7 @@ function yn(e, t) {
2179
2179
  return e.forEach((function(t) {
2180
2180
  a.left += (t.clientX - r) / e.length, a.top += (t.clientY - i) / e.length;
2181
2181
  })), e.forEach((function(e) {
2182
- o += ct({
2182
+ o += lt({
2183
2183
  x: a.left,
2184
2184
  y: a.top
2185
2185
  }, {
@@ -2192,7 +2192,7 @@ function yn(e, t) {
2192
2192
  count: e.length
2193
2193
  };
2194
2194
  }
2195
- var bn = {
2195
+ var xn = {
2196
2196
  props: {
2197
2197
  touchMove: {
2198
2198
  type: Boolean,
@@ -2222,18 +2222,18 @@ var bn = {
2222
2222
  window.removeEventListener("mouseup", this.onMouseUp), window.removeEventListener("mousemove", this.onMouseMove), window.removeEventListener("touchmove", this.onTouchMove), window.removeEventListener("touchend", this.onTouchEnd);
2223
2223
  },
2224
2224
  created: function() {
2225
- this.transforming = !1, this.debouncedProcessEnd = Qe(this.processEnd), this.touches = [];
2225
+ this.transforming = !1, this.debouncedProcessEnd = $e(this.processEnd), this.touches = [];
2226
2226
  },
2227
2227
  methods: {
2228
2228
  processMove: function(e, t) {
2229
2229
  if (this.touches.length) {
2230
- if (this.touches.length === 1 && t.length === 1) this.$emit("move", new lt({
2230
+ if (this.touches.length === 1 && t.length === 1) this.$emit("move", new ut({
2231
2231
  left: this.touches[0].clientX - t[0].clientX,
2232
2232
  top: this.touches[0].clientY - t[0].clientY
2233
2233
  }));
2234
2234
  else if (this.touches.length > 1 && this.touchResize) {
2235
- var n = yn(t, this.$refs.container), r = this.oldGeometricProperties;
2236
- r.count === n.count && r.count > 1 && this.$emit("resize", new lt({
2235
+ var n = bn(t, this.$refs.container), r = this.oldGeometricProperties;
2236
+ r.count === n.count && r.count > 1 && this.$emit("resize", new ut({
2237
2237
  left: r.centerMass.left - n.centerMass.left,
2238
2238
  top: r.centerMass.top - n.centerMass.top
2239
2239
  }, {
@@ -2256,9 +2256,9 @@ var bn = {
2256
2256
  onTouchStart: function(e) {
2257
2257
  if (e.cancelable && (this.touchMove || this.touchResize && e.touches.length > 1) && this.processEvent(e)) {
2258
2258
  var t = this.$refs.container, n = t.getBoundingClientRect(), r = n.left, i = n.top, a = n.bottom, o = n.right;
2259
- this.touches = Ke(e.touches).filter((function(e) {
2259
+ this.touches = qe(e.touches).filter((function(e) {
2260
2260
  return e.clientX > r && e.clientX < o && e.clientY > i && e.clientY < a;
2261
- })), this.oldGeometricProperties = yn(this.touches, t);
2261
+ })), this.oldGeometricProperties = bn(this.touches, t);
2262
2262
  }
2263
2263
  },
2264
2264
  onTouchEnd: function(e) {
@@ -2267,7 +2267,7 @@ var bn = {
2267
2267
  onTouchMove: function(e) {
2268
2268
  var t = this;
2269
2269
  if (this.touches.length) {
2270
- var n = Ke(e.touches).filter((function(e) {
2270
+ var n = qe(e.touches).filter((function(e) {
2271
2271
  return !e.identifier || t.touches.find((function(t) {
2272
2272
  return t.identifier === e.identifier;
2273
2273
  }));
@@ -2296,11 +2296,11 @@ var bn = {
2296
2296
  },
2297
2297
  onWheel: function(e) {
2298
2298
  if (this.wheelResize && this.processEvent(e)) {
2299
- var t = this.$refs.container.getBoundingClientRect(), n = t.left, r = t.top, i = 1 + this.wheelResize.ratio * (o = e.deltaY || e.detail || e.wheelDelta, (s = +o) == 0 || st(s) ? s : s > 0 ? 1 : -1), a = {
2299
+ var t = this.$refs.container.getBoundingClientRect(), n = t.left, r = t.top, i = 1 + this.wheelResize.ratio * (o = e.deltaY || e.detail || e.wheelDelta, (s = +o) == 0 || ct(s) ? s : s > 0 ? 1 : -1), a = {
2300
2300
  left: e.clientX - n,
2301
2301
  top: e.clientY - r
2302
2302
  };
2303
- this.$emit("resize", new lt({}, {
2303
+ this.$emit("resize", new ut({}, {
2304
2304
  factor: i,
2305
2305
  center: a
2306
2306
  })), this.touches.length || this.debouncedProcessEnd();
@@ -2314,7 +2314,7 @@ var bn = {
2314
2314
  "transform-end"
2315
2315
  ]
2316
2316
  };
2317
- bn.render = function(e, t, n, r, a, s) {
2317
+ xn.render = function(e, t, n, r, a, s) {
2318
2318
  return o(), w("div", {
2319
2319
  ref: "container",
2320
2320
  onTouchstart: t[1] ||= function() {
@@ -2328,8 +2328,8 @@ bn.render = function(e, t, n, r, a, s) {
2328
2328
  }
2329
2329
  }, [i(e.$slots, "default")], 544);
2330
2330
  };
2331
- var xn = {
2332
- components: { TransformableImage: bn },
2331
+ var Sn = {
2332
+ components: { TransformableImage: xn },
2333
2333
  props: {
2334
2334
  touchMove: {
2335
2335
  type: Boolean,
@@ -2350,7 +2350,7 @@ var xn = {
2350
2350
  },
2351
2351
  emits: ["resize", "move"]
2352
2352
  };
2353
- xn.render = function(e, t, n, s, c, l) {
2353
+ Sn.render = function(e, t, n, s, c, l) {
2354
2354
  var u = a("transformable-image");
2355
2355
  return o(), w(u, {
2356
2356
  "touch-move": n.touchMove,
@@ -2375,7 +2375,7 @@ xn.render = function(e, t, n, s, c, l) {
2375
2375
  "wheel-resize"
2376
2376
  ]);
2377
2377
  };
2378
- var Sn = U("vue-preview"), Cn = {
2378
+ var Cn = U("vue-preview"), wn = {
2379
2379
  props: {
2380
2380
  coordinates: { type: Object },
2381
2381
  transitions: { type: Object },
@@ -2405,10 +2405,10 @@ var Sn = U("vue-preview"), Cn = {
2405
2405
  computed: {
2406
2406
  classes: function() {
2407
2407
  return {
2408
- root: Sn({ fill: this.fill }),
2409
- wrapper: Sn("wrapper"),
2410
- imageWrapper: Sn("image-wrapper"),
2411
- image: H(Sn("image"), this.imageClass)
2408
+ root: Cn({ fill: this.fill }),
2409
+ wrapper: Cn("wrapper"),
2410
+ imageWrapper: Cn("image-wrapper"),
2411
+ image: H(Cn("image"), this.imageClass)
2412
2412
  };
2413
2413
  },
2414
2414
  style: function() {
@@ -2436,7 +2436,7 @@ var Sn = U("vue-preview"), Cn = {
2436
2436
  }, this.image.transforms), {}, {
2437
2437
  scaleX: 1 / e,
2438
2438
  scaleY: 1 / e
2439
- }), n = this.imageSize.width, r = this.imageSize.height, i = jt({
2439
+ }), n = this.imageSize.width, r = this.imageSize.height, i = Mt({
2440
2440
  width: n,
2441
2441
  height: r
2442
2442
  }, t.rotate), a = {
@@ -2455,7 +2455,7 @@ var Sn = U("vue-preview"), Cn = {
2455
2455
  }
2456
2456
  };
2457
2457
  return a.transform = `translate(
2458
- ${-this.coordinates.left / e - o.rotate.left - o.scale.left}px,${-this.coordinates.top / e - o.rotate.top - o.scale.top}px) ` + _n(t), this.transitions && this.transitions.enabled && (a.transition = `${this.transitions.time}ms ${this.transitions.timingFunction}`), a;
2458
+ ${-this.coordinates.left / e - o.rotate.left - o.scale.left}px,${-this.coordinates.top / e - o.rotate.top - o.scale.top}px) ` + vn(t), this.transitions && this.transitions.enabled && (a.transition = `${this.transitions.time}ms ${this.transitions.timingFunction}`), a;
2459
2459
  }
2460
2460
  return {};
2461
2461
  },
@@ -2499,7 +2499,7 @@ var Sn = U("vue-preview"), Cn = {
2499
2499
  }
2500
2500
  }
2501
2501
  };
2502
- Cn.render = function(e, t, n, r, i, a) {
2502
+ wn.render = function(e, t, n, r, i, a) {
2503
2503
  return o(), w("div", {
2504
2504
  ref: "root",
2505
2505
  class: a.classes.root,
@@ -2515,20 +2515,20 @@ Cn.render = function(e, t, n, r, i, a) {
2515
2515
  style: a.imageStyle
2516
2516
  }, null, 14, ["src"]), [[j, n.image && n.image.src]])], 6)], 6);
2517
2517
  };
2518
- var wn = {
2519
- components: { Preview: Cn },
2518
+ var Tn = {
2519
+ components: { Preview: wn },
2520
2520
  inheritAttrs: !1
2521
2521
  };
2522
- wn.render = function(e, t, n, r, i, c) {
2522
+ Tn.render = function(e, t, n, r, i, c) {
2523
2523
  var l = a("preview");
2524
2524
  return o(), w(l, s(e.$attrs, { fill: !0 }), null, 16);
2525
2525
  };
2526
- var Tn = U("vue-rectangle-stencil"), En = {
2526
+ var En = U("vue-rectangle-stencil"), Dn = {
2527
2527
  name: "RectangleStencil",
2528
2528
  components: {
2529
- StencilPreview: wn,
2530
- BoundingBox: fn,
2531
- DraggableArea: mn
2529
+ StencilPreview: Tn,
2530
+ BoundingBox: pn,
2531
+ DraggableArea: hn
2532
2532
  },
2533
2533
  props: {
2534
2534
  image: { type: Object },
@@ -2538,14 +2538,14 @@ var Tn = U("vue-rectangle-stencil"), En = {
2538
2538
  handlersComponent: {
2539
2539
  type: [Object, String],
2540
2540
  default: function() {
2541
- return an;
2541
+ return on;
2542
2542
  }
2543
2543
  },
2544
2544
  lines: { type: Object },
2545
2545
  linesComponent: {
2546
2546
  type: [Object, String],
2547
2547
  default: function() {
2548
- return cn;
2548
+ return ln;
2549
2549
  }
2550
2550
  },
2551
2551
  aspectRatio: { type: [Number, String] },
@@ -2598,13 +2598,13 @@ var Tn = U("vue-rectangle-stencil"), En = {
2598
2598
  computed: {
2599
2599
  classes: function() {
2600
2600
  return {
2601
- stencil: H(Tn({
2601
+ stencil: H(En({
2602
2602
  movable: this.movable,
2603
2603
  moving: this.moving,
2604
2604
  resizing: this.resizing
2605
2605
  }), this.moving && this.movingClass, this.resizing && this.resizingClass),
2606
- preview: H(Tn("preview"), this.previewClass),
2607
- boundingBox: H(Tn("bounding-box"), this.boundingBoxClass)
2606
+ preview: H(En("preview"), this.previewClass),
2607
+ boundingBox: H(En("bounding-box"), this.boundingBoxClass)
2608
2608
  };
2609
2609
  },
2610
2610
  style: function() {
@@ -2643,7 +2643,7 @@ var Tn = U("vue-rectangle-stencil"), En = {
2643
2643
  "move-end"
2644
2644
  ]
2645
2645
  };
2646
- En.render = function(e, t, n, i, s, c) {
2646
+ Dn.render = function(e, t, n, i, s, c) {
2647
2647
  var l = a("stencil-preview"), u = a("draggable-area"), d = a("bounding-box");
2648
2648
  return o(), w("div", {
2649
2649
  class: c.classes.stencil,
@@ -2714,9 +2714,9 @@ En.render = function(e, t, n, i, s, c) {
2714
2714
  "onResizeEnd"
2715
2715
  ])], 6);
2716
2716
  };
2717
- var Dn = ["transitions"], On = U("vue-advanced-cropper"), kn = {
2717
+ var On = ["transitions"], kn = U("vue-advanced-cropper"), An = {
2718
2718
  name: "Cropper",
2719
- components: { BackgroundWrapper: xn },
2719
+ components: { BackgroundWrapper: Sn },
2720
2720
  props: {
2721
2721
  src: {
2722
2722
  type: String,
@@ -2725,13 +2725,13 @@ var Dn = ["transitions"], On = U("vue-advanced-cropper"), kn = {
2725
2725
  stencilComponent: {
2726
2726
  type: [Object, String],
2727
2727
  default: function() {
2728
- return En;
2728
+ return Dn;
2729
2729
  }
2730
2730
  },
2731
2731
  backgroundWrapperComponent: {
2732
2732
  type: [Object, String],
2733
2733
  default: function() {
2734
- return xn;
2734
+ return Sn;
2735
2735
  }
2736
2736
  },
2737
2737
  stencilProps: {
@@ -2780,7 +2780,7 @@ var Dn = ["transitions"], On = U("vue-advanced-cropper"), kn = {
2780
2780
  type: String,
2781
2781
  default: "fit-area",
2782
2782
  validator: function(e) {
2783
- return xt.indexOf(e) !== -1;
2783
+ return St.indexOf(e) !== -1;
2784
2784
  }
2785
2785
  },
2786
2786
  roundResult: {
@@ -2826,28 +2826,28 @@ var Dn = ["transitions"], On = U("vue-advanced-cropper"), kn = {
2826
2826
  a.widthFrozen && (c.left = 0, c.right = 0), a.heightFrozen && (c.top = 0, c.bottom = 0), K.forEach((function(e) {
2827
2827
  l[e] || (c[e] = 0);
2828
2828
  }));
2829
- var u = Y(o, c = en({
2829
+ var u = Y(o, c = tn({
2830
2830
  coordinates: o,
2831
2831
  directions: c,
2832
2832
  sizeRestrictions: a,
2833
2833
  positionRestrictions: i
2834
- })).width, d = Y(o, c).height, f = s.preserveRatio ? Q(o) : kt(u / d, r);
2834
+ })).width, d = Y(o, c).height, f = s.preserveRatio ? Q(o) : At(u / d, r);
2835
2835
  if (f) {
2836
2836
  var p = s.respectDirection;
2837
2837
  if (p ||= o.width >= o.height || f === 1 ? "width" : "height", p === "width") {
2838
2838
  var m = u / f - o.height;
2839
2839
  if (l.top && l.bottom) {
2840
2840
  var h = c.top, g = c.bottom;
2841
- c.bottom = tn(m, g, h), c.top = tn(m, h, g);
2841
+ c.bottom = nn(m, g, h), c.top = nn(m, h, g);
2842
2842
  } else l.bottom ? c.bottom = m : l.top ? c.top = m : l.right ? c.right = 0 : l.left && (c.left = 0);
2843
2843
  } else if (p === "height") {
2844
2844
  var _ = o.width - d * f;
2845
2845
  if (l.left && l.right) {
2846
2846
  var v = c.left, y = c.right;
2847
- c.left = -tn(_, v, y), c.right = -tn(_, y, v);
2847
+ c.left = -nn(_, v, y), c.right = -nn(_, y, v);
2848
2848
  } else l.left ? c.left = -_ : l.right ? c.right = -_ : l.top ? c.top = 0 : l.bottom && (c.bottom = 0);
2849
2849
  }
2850
- c = en({
2850
+ c = tn({
2851
2851
  directions: c,
2852
2852
  coordinates: o,
2853
2853
  sizeRestrictions: a,
@@ -2856,10 +2856,10 @@ var Dn = ["transitions"], On = U("vue-advanced-cropper"), kn = {
2856
2856
  compensate: s.compensate
2857
2857
  });
2858
2858
  }
2859
- return u = Y(o, c).width, d = Y(o, c).height, (f = s.preserveRatio ? Q(o) : kt(u / d, r)) && Math.abs(f - u / d) > .001 && K.forEach((function(e) {
2859
+ return u = Y(o, c).width, d = Y(o, c).height, (f = s.preserveRatio ? Q(o) : At(u / d, r)) && Math.abs(f - u / d) > .001 && K.forEach((function(e) {
2860
2860
  l[e] || (c[e] = 0);
2861
- })), Vt({
2862
- event: new dt({
2861
+ })), Ht({
2862
+ event: new ft({
2863
2863
  left: -c.left,
2864
2864
  top: -c.top
2865
2865
  }),
@@ -2875,7 +2875,7 @@ var Dn = ["transitions"], On = U("vue-advanced-cropper"), kn = {
2875
2875
  },
2876
2876
  moveAlgorithm: {
2877
2877
  type: Function,
2878
- default: Vt
2878
+ default: Ht
2879
2879
  },
2880
2880
  initStretcher: {
2881
2881
  type: Function,
@@ -2887,7 +2887,7 @@ var Dn = ["transitions"], On = U("vue-advanced-cropper"), kn = {
2887
2887
  fitCoordinates: {
2888
2888
  type: Function,
2889
2889
  default: function(e) {
2890
- var t = e.visibleArea, n = e.coordinates, r = e.aspectRatio, i = e.sizeRestrictions, a = e.positionRestrictions, o = W(W({}, n), Bt({
2890
+ var t = e.visibleArea, n = e.coordinates, r = e.aspectRatio, i = e.sizeRestrictions, a = e.positionRestrictions, o = W(W({}, n), Vt({
2891
2891
  width: n.width,
2892
2892
  height: n.height,
2893
2893
  aspectRatio: r,
@@ -2898,7 +2898,7 @@ var Dn = ["transitions"], On = U("vue-advanced-cropper"), kn = {
2898
2898
  minWidth: Math.min(t.width, i.minWidth)
2899
2899
  }
2900
2900
  }));
2901
- return o = $(o = X(o, wt(J(n), J(o))), Lt(q(t), a));
2901
+ return o = $(o = X(o, Tt(J(n), J(o))), Rt(q(t), a));
2902
2902
  }
2903
2903
  },
2904
2904
  fitVisibleArea: {
@@ -2906,7 +2906,7 @@ var Dn = ["transitions"], On = U("vue-advanced-cropper"), kn = {
2906
2906
  default: function(e) {
2907
2907
  var t = e.visibleArea, n = e.boundaries, r = e.getAreaRestrictions, i = e.coordinates, a = W({}, t);
2908
2908
  a.height = a.width / Q(n), a.top += (t.height - a.height) / 2, (i.height - a.height > 0 || i.width - a.width > 0) && (a = Z(a, Math.max(i.height / a.height, i.width / a.width)));
2909
- var o = Et(Ot(i, q(a = Z(a, Nt(a, r({
2909
+ var o = Dt(kt(i, q(a = Z(a, Pt(a, r({
2910
2910
  visibleArea: a,
2911
2911
  type: "resize"
2912
2912
  }))))));
@@ -2987,7 +2987,7 @@ var Dn = ["transitions"], On = U("vue-advanced-cropper"), kn = {
2987
2987
  height: 0
2988
2988
  },
2989
2989
  visibleArea: null,
2990
- coordinates: B({}, St)
2990
+ coordinates: B({}, Ct)
2991
2991
  };
2992
2992
  },
2993
2993
  computed: {
@@ -3025,7 +3025,7 @@ var Dn = ["transitions"], On = U("vue-advanced-cropper"), kn = {
3025
3025
  return !!(this.visibleArea && this.imageLoaded);
3026
3026
  },
3027
3027
  settings: function() {
3028
- var e = it(this.resizeImage, {
3028
+ var e = at(this.resizeImage, {
3029
3029
  touch: !0,
3030
3030
  wheel: { ratio: .1 },
3031
3031
  adjustStencil: !0
@@ -3035,7 +3035,7 @@ var Dn = ["transitions"], On = U("vue-advanced-cropper"), kn = {
3035
3035
  adjustStencil: !1
3036
3036
  });
3037
3037
  return {
3038
- moveImage: it(this.moveImage, {
3038
+ moveImage: at(this.moveImage, {
3039
3039
  touch: !0,
3040
3040
  mouse: !0
3041
3041
  }, {
@@ -3066,10 +3066,10 @@ var Dn = ["transitions"], On = U("vue-advanced-cropper"), kn = {
3066
3066
  if (this.boundaries.width && this.boundaries.height && this.imageSize.width && this.imageSize.height) {
3067
3067
  var e = this.sizeRestrictionsAlgorithm({
3068
3068
  imageSize: this.imageSize,
3069
- minWidth: G(this.minWidth) ? 0 : at(this.minWidth),
3070
- minHeight: G(this.minHeight) ? 0 : at(this.minHeight),
3071
- maxWidth: G(this.maxWidth) ? 1 / 0 : at(this.maxWidth),
3072
- maxHeight: G(this.maxHeight) ? 1 / 0 : at(this.maxHeight)
3069
+ minWidth: G(this.minWidth) ? 0 : ot(this.minWidth),
3070
+ minHeight: G(this.minHeight) ? 0 : ot(this.minHeight),
3071
+ maxWidth: G(this.maxWidth) ? 1 / 0 : ot(this.maxWidth),
3072
+ maxHeight: G(this.maxHeight) ? 1 / 0 : ot(this.maxHeight)
3073
3073
  });
3074
3074
  if (e = function(e) {
3075
3075
  var t = e.areaRestrictions, n = e.sizeRestrictions, r = e.boundaries, i = e.positionRestrictions, a = W(W({}, n), {
@@ -3079,7 +3079,7 @@ var Dn = ["transitions"], On = U("vue-advanced-cropper"), kn = {
3079
3079
  maxHeight: n.maxHeight === void 0 ? 1 / 0 : n.maxHeight
3080
3080
  });
3081
3081
  i.left !== void 0 && i.right !== void 0 && (a.maxWidth = Math.min(a.maxWidth, i.right - i.left)), i.bottom !== void 0 && i.top !== void 0 && (a.maxHeight = Math.min(a.maxHeight, i.bottom - i.top));
3082
- var o = Pt(t), s = At(r, o);
3082
+ var o = Ft(t), s = jt(r, o);
3083
3083
  return o.width < 1 / 0 && (!a.maxWidth || a.maxWidth > s.width) && (a.maxWidth = Math.min(a.maxWidth, s.width)), o.height < 1 / 0 && (!a.maxHeight || a.maxHeight > s.height) && (a.maxHeight = Math.min(a.maxHeight, s.height)), a.minWidth > a.maxWidth && (a.minWidth = a.maxWidth, a.widthFrozen = !0), a.minHeight > a.maxHeight && (a.minHeight = a.maxHeight, a.heightFrozen = !0), a;
3084
3084
  }({
3085
3085
  sizeRestrictions: e,
@@ -3094,7 +3094,7 @@ var Dn = ["transitions"], On = U("vue-advanced-cropper"), kn = {
3094
3094
  visibleArea: this.visibleArea,
3095
3095
  stencilSize: this.getStencilSize()
3096
3096
  }), this.visibleArea && this.stencilSize) {
3097
- var t = this.getStencilSize(), n = Pt(this.getAreaRestrictions({
3097
+ var t = this.getStencilSize(), n = Ft(this.getAreaRestrictions({
3098
3098
  visibleArea: this.visibleArea,
3099
3099
  type: "resize"
3100
3100
  }));
@@ -3117,15 +3117,15 @@ var Dn = ["transitions"], On = U("vue-advanced-cropper"), kn = {
3117
3117
  },
3118
3118
  classes: function() {
3119
3119
  return {
3120
- cropper: On(),
3121
- image: H(On("image"), this.imageClass),
3122
- stencil: On("stencil"),
3123
- boundaries: H(On("boundaries"), this.boundariesClass),
3124
- stretcher: H(On("stretcher")),
3125
- background: H(On("background"), this.backgroundClass),
3126
- foreground: H(On("foreground"), this.foregroundClass),
3127
- imageWrapper: H(On("image-wrapper")),
3128
- cropperWrapper: H(On("cropper-wrapper"))
3120
+ cropper: kn(),
3121
+ image: H(kn("image"), this.imageClass),
3122
+ stencil: kn("stencil"),
3123
+ boundaries: H(kn("boundaries"), this.boundariesClass),
3124
+ stretcher: H(kn("stretcher")),
3125
+ background: H(kn("background"), this.backgroundClass),
3126
+ foreground: H(kn("foreground"), this.foregroundClass),
3127
+ imageWrapper: H(kn("image-wrapper")),
3128
+ cropperWrapper: H(kn("cropper-wrapper"))
3129
3129
  };
3130
3130
  },
3131
3131
  stencilCoordinates: function() {
@@ -3170,7 +3170,7 @@ var Dn = ["transitions"], On = U("vue-advanced-cropper"), kn = {
3170
3170
  height: `${e.height}px`,
3171
3171
  left: "0px",
3172
3172
  top: "0px",
3173
- transform: `translate(${-t.left - n.left - this.imageTransforms.translateX}px, ${-t.top - n.top - this.imageTransforms.translateY}px)` + _n(r)
3173
+ transform: `translate(${-t.left - n.left - this.imageTransforms.translateX}px, ${-t.top - n.top - this.imageTransforms.translateY}px)` + vn(r)
3174
3174
  };
3175
3175
  return this.transitionsOptions.enabled && (i.transition = `${this.transitionsOptions.time}ms ${this.transitionsOptions.timingFunction}`), i;
3176
3176
  }
@@ -3211,7 +3211,7 @@ var Dn = ["transitions"], On = U("vue-advanced-cropper"), kn = {
3211
3211
  }
3212
3212
  },
3213
3213
  created: function() {
3214
- this.debouncedUpdate = Qe(this.update, this.debounce), this.debouncedDisableTransitions = Qe(this.disableTransitions, this.transitionsOptions.time), this.awaiting = !1;
3214
+ this.debouncedUpdate = $e(this.update, this.debounce), this.debouncedDisableTransitions = $e(this.disableTransitions, this.transitionsOptions.time), this.awaiting = !1;
3215
3215
  },
3216
3216
  mounted: function() {
3217
3217
  this.$refs.image.addEventListener("load", this.onSuccessLoadImage), this.$refs.image.addEventListener("error", this.onFailLoadImage), this.onChangeImage(), window.addEventListener("resize", this.refresh), window.addEventListener("orientationchange", this.refresh);
@@ -3247,7 +3247,7 @@ var Dn = ["transitions"], On = U("vue-advanced-cropper"), kn = {
3247
3247
  },
3248
3248
  zoom: function(e, t) {
3249
3249
  var n = (arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}).transitions, r = n === void 0 || n;
3250
- this.onManipulateImage(new lt({}, {
3250
+ this.onManipulateImage(new ut({}, {
3251
3251
  factor: 1 / e,
3252
3252
  center: t
3253
3253
  }), {
@@ -3257,7 +3257,7 @@ var Dn = ["transitions"], On = U("vue-advanced-cropper"), kn = {
3257
3257
  },
3258
3258
  move: function(e, t) {
3259
3259
  var n = (arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}).transitions, r = n === void 0 || n;
3260
- this.onManipulateImage(new lt({
3260
+ this.onManipulateImage(new ut({
3261
3261
  left: e || 0,
3262
3262
  top: t || 0
3263
3263
  }), {
@@ -3301,13 +3301,13 @@ var Dn = ["transitions"], On = U("vue-advanced-cropper"), kn = {
3301
3301
  };
3302
3302
  return i.width > n.maxWidth ? i.width = Math.floor(t.width) : i.width < n.minWidth && (i.width = Math.ceil(t.width)), i.height > n.maxHeight ? i.height = Math.floor(t.height) : i.height < n.minHeight && (i.height = Math.ceil(t.height)), $(i, r);
3303
3303
  }(B(B({}, this.getPublicProperties()), {}, {
3304
- positionRestrictions: Xt(this.positionRestrictions, this.visibleArea),
3304
+ positionRestrictions: Zt(this.positionRestrictions, this.visibleArea),
3305
3305
  coordinates: e
3306
3306
  })) : e;
3307
3307
  },
3308
3308
  processAutoZoom: function(e, t, n, r) {
3309
3309
  var i = this.autoZoomAlgorithm;
3310
- i ||= this.stencilSize ? Ut : this.autoZoom ? Wt : Gt;
3310
+ i ||= this.stencilSize ? Wt : this.autoZoom ? Gt : Kt;
3311
3311
  var a = i({
3312
3312
  event: {
3313
3313
  type: e,
@@ -3322,10 +3322,10 @@ var Dn = ["transitions"], On = U("vue-advanced-cropper"), kn = {
3322
3322
  sizeRestrictions: this.sizeRestrictions,
3323
3323
  stencilSize: this.getStencilSize()
3324
3324
  });
3325
- return B(B({}, a), {}, { changed: !Ct(a.visibleArea, t) || !Ct(a.coordinates, n) });
3325
+ return B(B({}, a), {}, { changed: !wt(a.visibleArea, t) || !wt(a.coordinates, n) });
3326
3326
  },
3327
3327
  runAutoZoom: function(e) {
3328
- var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = t.transitions, r = n !== void 0 && n, i = Ge(t, Dn), a = this.processAutoZoom(e, this.visibleArea, this.coordinates, i), o = a.visibleArea, s = a.coordinates, c = a.changed;
3328
+ var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = t.transitions, r = n !== void 0 && n, i = Ke(t, On), a = this.processAutoZoom(e, this.visibleArea, this.coordinates, i), o = a.visibleArea, s = a.coordinates, c = a.changed;
3329
3329
  r && c && this.enableTransitions(), this.visibleArea = o, this.coordinates = s, r && c && this.debouncedDisableTransitions();
3330
3330
  },
3331
3331
  normalizeEvent: function(e) {
@@ -3352,7 +3352,7 @@ var Dn = ["transitions"], On = U("vue-advanced-cropper"), kn = {
3352
3352
  }
3353
3353
  if (t.type === "move") {
3354
3354
  var a = W(W({}, t), { directions: W({}, t.directions) });
3355
- return bt.forEach((function(e) {
3355
+ return xt.forEach((function(e) {
3356
3356
  a.directions[e] *= r;
3357
3357
  })), a;
3358
3358
  }
@@ -3365,9 +3365,9 @@ var Dn = ["transitions"], On = U("vue-advanced-cropper"), kn = {
3365
3365
  var r = n.rotate, i = n.flip, a = {
3366
3366
  width: t.naturalWidth,
3367
3367
  height: t.naturalHeight
3368
- }, o = jt(a, r), s = e.getContext("2d");
3368
+ }, o = Mt(a, r), s = e.getContext("2d");
3369
3369
  e.height = o.height, e.width = o.width, s.save();
3370
- var c = Mt(J(W({
3370
+ var c = Nt(J(W({
3371
3371
  left: 0,
3372
3372
  top: 0
3373
3373
  }, a)), r);
@@ -3386,7 +3386,7 @@ var Dn = ["transitions"], On = U("vue-advanced-cropper"), kn = {
3386
3386
  return t = e, !Number.isNaN(parseFloat(t)) && isFinite(t);
3387
3387
  var t;
3388
3388
  }));
3389
- }, a = Bt({
3389
+ }, a = Vt({
3390
3390
  sizeRestrictions: {
3391
3391
  minWidth: i([r.width, r.minWidth]) || 0,
3392
3392
  minHeight: i([r.height, r.minHeight]) || 0,
@@ -3420,8 +3420,8 @@ var Dn = ["transitions"], On = U("vue-advanced-cropper"), kn = {
3420
3420
  this.$emit("change", this.getResult());
3421
3421
  },
3422
3422
  applyTransform: function(e) {
3423
- var t = arguments.length > 1 && arguments[1] !== void 0 && arguments[1], n = this.visibleArea && t ? Ft(this.sizeRestrictions, this.visibleArea) : this.sizeRestrictions, r = this.visibleArea && t ? Xt(this.positionRestrictions, this.visibleArea) : this.positionRestrictions;
3424
- return Ht({
3423
+ var t = arguments.length > 1 && arguments[1] !== void 0 && arguments[1], n = this.visibleArea && t ? It(this.sizeRestrictions, this.visibleArea) : this.sizeRestrictions, r = this.visibleArea && t ? Zt(this.positionRestrictions, this.visibleArea) : this.positionRestrictions;
3424
+ return Ut({
3425
3425
  transform: e,
3426
3426
  coordinates: this.coordinates,
3427
3427
  imageSize: this.imageSize,
@@ -3436,23 +3436,23 @@ var Dn = ["transitions"], On = U("vue-advanced-cropper"), kn = {
3436
3436
  if (this.$refs.image) {
3437
3437
  this.$refs.cropper, this.$refs.image;
3438
3438
  var t = this.defaultSize;
3439
- t ||= this.stencilSize ? Jt : qt, this.sizeRestrictions;
3440
- var n = nt(t) ? t({
3439
+ t ||= this.stencilSize ? Yt : Jt, this.sizeRestrictions;
3440
+ var n = rt(t) ? t({
3441
3441
  boundaries: this.boundaries,
3442
3442
  imageSize: this.imageSize,
3443
3443
  aspectRatio: this.getAspectRatio(),
3444
3444
  sizeRestrictions: this.sizeRestrictions,
3445
3445
  stencilSize: this.getStencilSize(),
3446
3446
  visibleArea: this.visibleArea
3447
- }) : t, r = this.defaultPosition || Kt, i = [n, function(t) {
3447
+ }) : t, r = this.defaultPosition || qt, i = [n, function(t) {
3448
3448
  var n = t.coordinates;
3449
- return B({}, nt(r) ? r({
3449
+ return B({}, rt(r) ? r({
3450
3450
  coordinates: n,
3451
3451
  imageSize: e.imageSize,
3452
3452
  visibleArea: e.visibleArea
3453
3453
  }) : e.defaultPosition);
3454
3454
  }];
3455
- this.delayedTransforms && i.push.apply(i, Ke(Array.isArray(this.delayedTransforms) ? this.delayedTransforms : [this.delayedTransforms])), this.coordinates = this.applyTransform(i, !0), this.delayedTransforms = null;
3455
+ this.delayedTransforms && i.push.apply(i, qe(Array.isArray(this.delayedTransforms) ? this.delayedTransforms : [this.delayedTransforms])), this.coordinates = this.applyTransform(i, !0), this.delayedTransforms = null;
3456
3456
  }
3457
3457
  },
3458
3458
  clearImage: function() {
@@ -3482,7 +3482,7 @@ var Dn = ["transitions"], On = U("vue-advanced-cropper"), kn = {
3482
3482
  cropper: n,
3483
3483
  imageSize: e.imageSize
3484
3484
  };
3485
- if (e.boundaries = nt(e.defaultBoundaries) ? e.defaultBoundaries(t) : e.defaultBoundaries === "fit" ? function(e) {
3485
+ if (e.boundaries = rt(e.defaultBoundaries) ? e.defaultBoundaries(t) : e.defaultBoundaries === "fit" ? function(e) {
3486
3486
  var t = e.cropper, n = e.imageSize, r = t.clientHeight, i = t.clientWidth, a = r, o = n.width * r / n.height;
3487
3487
  return o > i && (o = i, a = n.height * i / n.width), {
3488
3488
  width: o,
@@ -3501,8 +3501,8 @@ var Dn = ["transitions"], On = U("vue-advanced-cropper"), kn = {
3501
3501
  var e = this;
3502
3502
  return this.appliedImageTransforms = B(B({}, this.defaultImageTransforms), {}, { flip: B({}, this.defaultImageTransforms.flip) }), this.updateBoundaries().then((function() {
3503
3503
  e.priority !== "visible-area" && (e.visibleArea = null, e.resetCoordinates());
3504
- var t, n, r, i, a, o, s = e.defaultVisibleArea || Yt;
3505
- e.visibleArea = nt(s) ? s({
3504
+ var t, n, r, i, a, o, s = e.defaultVisibleArea || Xt;
3505
+ e.visibleArea = rt(s) ? s({
3506
3506
  imageSize: e.imageSize,
3507
3507
  boundaries: e.boundaries,
3508
3508
  coordinates: e.priority === "visible-area" ? null : e.coordinates,
@@ -3553,7 +3553,7 @@ var Dn = ["transitions"], On = U("vue-advanced-cropper"), kn = {
3553
3553
  var e, t = this;
3554
3554
  if (this.imageLoaded = !1, this.delayedTransforms = null, this.src) {
3555
3555
  if (function(e) {
3556
- if (tt(e)) return !1;
3556
+ if (nt(e)) return !1;
3557
3557
  var t = window.location, n = /(\w+:)?(?:\/\/)([\w.-]+)?(?::(\d+))?\/?/.exec(e) || [], r = {
3558
3558
  protocol: n[1] || "",
3559
3559
  host: n[2] || "",
@@ -3568,8 +3568,8 @@ var Dn = ["transitions"], On = U("vue-advanced-cropper"), kn = {
3568
3568
  }
3569
3569
  if (this.checkOrientation) {
3570
3570
  var r = (e = this.src, new Promise((function(t) {
3571
- gn(e).then((function(n) {
3572
- var r = vn(n);
3571
+ _n(e).then((function(n) {
3572
+ var r = yn(n);
3573
3573
  t(n ? {
3574
3574
  source: e,
3575
3575
  arrayBuffer: n,
@@ -3606,14 +3606,14 @@ var Dn = ["transitions"], On = U("vue-advanced-cropper"), kn = {
3606
3606
  },
3607
3607
  onParseImage: function(e) {
3608
3608
  var t = this, n = e.source, r = e.arrayBuffer, i = e.orientation;
3609
- this.imageAttributes.revoke && this.imageAttributes.src && URL.revokeObjectURL(this.imageAttributes.src), this.imageAttributes.revoke = !1, r && i && i > 1 ? et(n) || !tt(n) ? (this.imageAttributes.src = URL.createObjectURL(new Blob([r])), this.imageAttributes.revoke = !0) : this.imageAttributes.src = function(e) {
3609
+ this.imageAttributes.revoke && this.imageAttributes.src && URL.revokeObjectURL(this.imageAttributes.src), this.imageAttributes.revoke = !1, r && i && i > 1 ? tt(n) || !nt(n) ? (this.imageAttributes.src = URL.createObjectURL(new Blob([r])), this.imageAttributes.revoke = !0) : this.imageAttributes.src = function(e) {
3610
3610
  for (var t = [], n = new Uint8Array(e); n.length > 0;) {
3611
3611
  var r = n.subarray(0, 8192);
3612
3612
  t.push(String.fromCharCode.apply(null, Array.from ? Array.from(r) : r.slice())), n = n.subarray(8192);
3613
3613
  }
3614
3614
  return "data:image/jpeg;base64," + btoa(t.join(""));
3615
- }(r) : this.imageAttributes.src = n, this.appliedImageTransforms = nt(this.defaultTransforms) ? hn(this.defaultTransforms()) : rt(this.defaultTransforms) ? hn(this.defaultTransforms) : function(e) {
3616
- var t = hn({});
3615
+ }(r) : this.imageAttributes.src = n, this.appliedImageTransforms = rt(this.defaultTransforms) ? gn(this.defaultTransforms()) : it(this.defaultTransforms) ? gn(this.defaultTransforms) : function(e) {
3616
+ var t = gn({});
3617
3617
  if (e) switch (e) {
3618
3618
  case 2:
3619
3619
  t.flip.horizontal = !0;
@@ -3653,7 +3653,7 @@ var Dn = ["transitions"], On = U("vue-advanced-cropper"), kn = {
3653
3653
  var t = this;
3654
3654
  this.transitionsOptions.enabled || this.awaitRender((function() {
3655
3655
  t.coordinates = t.moveAlgorithm(B(B({}, t.getPublicProperties()), {}, {
3656
- positionRestrictions: Xt(t.positionRestrictions, t.visibleArea),
3656
+ positionRestrictions: Zt(t.positionRestrictions, t.visibleArea),
3657
3657
  coordinates: t.coordinates,
3658
3658
  event: t.normalizeEvent(e)
3659
3659
  })), t.onChange();
@@ -3664,7 +3664,7 @@ var Dn = ["transitions"], On = U("vue-advanced-cropper"), kn = {
3664
3664
  this.transitionsOptions.enabled || this.stencilSize && !this.autoZoom || this.awaitRender((function() {
3665
3665
  var n = t.sizeRestrictions, r = Math.min(t.coordinates.width, t.coordinates.height, 20 * t.coefficient);
3666
3666
  t.coordinates = t.resizeAlgorithm(B(B({}, t.getPublicProperties()), {}, {
3667
- positionRestrictions: Xt(t.positionRestrictions, t.visibleArea),
3667
+ positionRestrictions: Zt(t.positionRestrictions, t.visibleArea),
3668
3668
  sizeRestrictions: {
3669
3669
  maxWidth: Math.min(n.maxWidth, t.visibleArea.width),
3670
3670
  maxHeight: Math.min(n.maxHeight, t.visibleArea.height),
@@ -3680,7 +3680,7 @@ var Dn = ["transitions"], On = U("vue-advanced-cropper"), kn = {
3680
3680
  if (!this.transitionsOptions.enabled) {
3681
3681
  var n = t.transitions, r = n !== void 0 && n, i = t.normalize, a = i === void 0 || i;
3682
3682
  r && this.enableTransitions();
3683
- var o = Zt(B(B({}, this.getPublicProperties()), {}, {
3683
+ var o = Qt(B(B({}, this.getPublicProperties()), {}, {
3684
3684
  event: a ? this.normalizeEvent(e) : e,
3685
3685
  getAreaRestrictions: this.getAreaRestrictions,
3686
3686
  imageRestriction: this.imageRestriction,
@@ -3710,7 +3710,7 @@ var Dn = ["transitions"], On = U("vue-advanced-cropper"), kn = {
3710
3710
  }
3711
3711
  if (G(t) && (t = G(i) ? a : i), G(n) && (n = G(i) ? o : i), !e && (G(t) || G(n))) {
3712
3712
  var c = this.getStencilSize(), l = c ? Q(c) : null;
3713
- G(t) && (t = ot(l) ? l : void 0), G(n) && (n = ot(l) ? l : void 0);
3713
+ G(t) && (t = st(l) ? l : void 0), G(n) && (n = st(l) ? l : void 0);
3714
3714
  }
3715
3715
  return {
3716
3716
  minimum: t,
@@ -3728,10 +3728,10 @@ var Dn = ["transitions"], On = U("vue-advanced-cropper"), kn = {
3728
3728
  coefficient: this.coefficient,
3729
3729
  coordinates: this.coordinates,
3730
3730
  aspectRatio: this.getAspectRatio(!0)
3731
- }, t = e.boundaries, n = e.stencilSize, r = e.aspectRatio, kt(Q(i = nt(n) ? n({
3731
+ }, t = e.boundaries, n = e.stencilSize, r = e.aspectRatio, At(Q(i = rt(n) ? n({
3732
3732
  boundaries: t,
3733
3733
  aspectRatio: r
3734
- }) : n), r) && (i = Bt({
3734
+ }) : n), r) && (i = Vt({
3735
3735
  sizeRestrictions: {
3736
3736
  maxWidth: t.width,
3737
3737
  maxHeight: t.height,
@@ -3744,7 +3744,7 @@ var Dn = ["transitions"], On = U("vue-advanced-cropper"), kn = {
3744
3744
  minimum: r.minimum,
3745
3745
  maximum: r.maximum
3746
3746
  }
3747
- })), (i.width > t.width || i.height > t.height) && (i = Bt({
3747
+ })), (i.width > t.width || i.height > t.height) && (i = Vt({
3748
3748
  sizeRestrictions: {
3749
3749
  maxWidth: t.width,
3750
3750
  maxHeight: t.height,
@@ -3773,13 +3773,13 @@ var Dn = ["transitions"], On = U("vue-advanced-cropper"), kn = {
3773
3773
  };
3774
3774
  },
3775
3775
  defaultCoordinates: function() {
3776
- return B({}, St);
3776
+ return B({}, Ct);
3777
3777
  },
3778
3778
  flip: function(e, t) {
3779
3779
  var n = (arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}).transitions, r = n === void 0 || n;
3780
3780
  if (!this.transitionsActive) {
3781
3781
  r && this.enableTransitions();
3782
- var i = B({}, this.imageTransforms.flip), a = $t({
3782
+ var i = B({}, this.imageTransforms.flip), a = en({
3783
3783
  flip: {
3784
3784
  horizontal: e ? !i.horizontal : i.horizontal,
3785
3785
  vertical: t ? !i.vertical : i.vertical
@@ -3803,7 +3803,7 @@ var Dn = ["transitions"], On = U("vue-advanced-cropper"), kn = {
3803
3803
  n && this.enableTransitions();
3804
3804
  var r = B({}, this.imageSize);
3805
3805
  this.appliedImageTransforms.rotate += e;
3806
- var i = Qt({
3806
+ var i = $t({
3807
3807
  visibleArea: this.visibleArea,
3808
3808
  coordinates: this.coordinates,
3809
3809
  previousImageSize: r,
@@ -3823,16 +3823,16 @@ var Dn = ["transitions"], On = U("vue-advanced-cropper"), kn = {
3823
3823
  "error",
3824
3824
  "ready"
3825
3825
  ]
3826
- }, An = {
3826
+ }, jn = {
3827
3827
  key: 0,
3828
3828
  ref: "canvas",
3829
3829
  style: { display: "none" }
3830
- }, jn = {
3830
+ }, Mn = {
3831
3831
  key: 1,
3832
3832
  ref: "sourceCanvas",
3833
3833
  style: { display: "none" }
3834
3834
  };
3835
- kn.render = function(e, t, n, i, a, c) {
3835
+ An.render = function(e, t, n, i, a, c) {
3836
3836
  return o(), w("div", {
3837
3837
  ref: "cropper",
3838
3838
  class: c.classes.cropper
@@ -3890,8 +3890,8 @@ kn.render = function(e, t, n, i, a, c) {
3890
3890
  "onMove",
3891
3891
  "onMoveEnd"
3892
3892
  ])), [[j, a.imageLoaded]]),
3893
- n.canvas ? (o(), w("canvas", An, null, 512)) : b("", !0),
3894
- n.canvas ? (o(), w("canvas", jn, null, 512)) : b("", !0)
3893
+ n.canvas ? (o(), w("canvas", jn, null, 512)) : b("", !0),
3894
+ n.canvas ? (o(), w("canvas", Mn, null, 512)) : b("", !0)
3895
3895
  ];
3896
3896
  })),
3897
3897
  _: 1
@@ -3907,57 +3907,57 @@ kn.render = function(e, t, n, i, a, c) {
3907
3907
  };
3908
3908
  //#endregion
3909
3909
  //#region ../media-library/src/components/media/MediaEditModal.vue?vue&type=script&setup=true&lang.ts
3910
- var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn = {
3910
+ var Nn = ["data-tpl-theme"], Pn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Fn = {
3911
3911
  class: "tpl:text-sm tpl:font-semibold",
3912
3912
  style: { color: "var(--tpl-text)" }
3913
- }, Fn = { class: "tpl:min-h-0 tpl:flex-1 tpl:overflow-y-auto tpl:px-5" }, In = {
3913
+ }, In = { class: "tpl:min-h-0 tpl:flex-1 tpl:overflow-y-auto tpl:px-5" }, Ln = {
3914
3914
  key: 0,
3915
3915
  class: "tpl:mb-4"
3916
- }, Ln = {
3916
+ }, Rn = {
3917
3917
  class: "tpl:relative tpl:mb-3 tpl:overflow-hidden tpl:rounded-md tpl:border",
3918
3918
  style: {
3919
3919
  "border-color": "var(--tpl-border)",
3920
3920
  height: "300px",
3921
3921
  "background-color": "var(--tpl-bg)"
3922
3922
  }
3923
- }, Rn = { class: "tpl:space-y-3" }, zn = {
3923
+ }, zn = { class: "tpl:space-y-3" }, Bn = {
3924
3924
  class: "tpl:mb-1.5 tpl:block tpl:text-xs tpl:font-medium",
3925
3925
  style: { color: "var(--tpl-text-muted)" }
3926
- }, Bn = { class: "tpl:flex tpl:flex-wrap tpl:gap-1.5" }, Vn = ["onClick"], Hn = { class: "tpl:flex tpl:gap-3" }, Un = { class: "tpl:flex-1" }, Wn = {
3926
+ }, Vn = { class: "tpl:flex tpl:flex-wrap tpl:gap-1.5" }, Hn = ["onClick"], Un = { class: "tpl:flex tpl:gap-3" }, Wn = { class: "tpl:flex-1" }, Gn = {
3927
3927
  class: "tpl:mb-1 tpl:block tpl:text-xs tpl:font-medium",
3928
3928
  style: { color: "var(--tpl-text-muted)" }
3929
- }, Gn = {
3929
+ }, Kn = {
3930
3930
  class: "tpl:font-normal",
3931
3931
  style: { color: "var(--tpl-text-dim)" }
3932
- }, Kn = { class: "tpl:relative" }, qn = ["value", "placeholder"], Jn = {
3932
+ }, qn = { class: "tpl:relative" }, Jn = ["value", "placeholder"], Yn = {
3933
3933
  class: "tpl:absolute tpl:top-1/2 tpl:right-2.5 tpl:-translate-y-1/2 tpl:text-xs",
3934
3934
  style: { color: "var(--tpl-text-dim)" }
3935
- }, Yn = { class: "tpl:flex-1" }, Xn = {
3935
+ }, Xn = { class: "tpl:flex-1" }, Zn = {
3936
3936
  class: "tpl:mb-1 tpl:block tpl:text-xs tpl:font-medium",
3937
3937
  style: { color: "var(--tpl-text-muted)" }
3938
- }, Zn = {
3938
+ }, Qn = {
3939
3939
  class: "tpl:font-normal",
3940
3940
  style: { color: "var(--tpl-text-dim)" }
3941
- }, Qn = { class: "tpl:relative" }, $n = ["value", "placeholder"], er = {
3941
+ }, $n = { class: "tpl:relative" }, er = ["value", "placeholder"], tr = {
3942
3942
  class: "tpl:absolute tpl:top-1/2 tpl:right-2.5 tpl:-translate-y-1/2 tpl:text-xs",
3943
3943
  style: { color: "var(--tpl-text-dim)" }
3944
- }, tr = {
3944
+ }, nr = {
3945
3945
  key: 0,
3946
3946
  class: "tpl:flex tpl:items-center tpl:gap-1 tpl:text-xs",
3947
3947
  style: { color: "var(--tpl-text-muted)" }
3948
- }, nr = {
3948
+ }, rr = {
3949
3949
  class: "tpl:font-medium",
3950
3950
  style: { color: "var(--tpl-text)" }
3951
- }, rr = { class: "tpl:mb-3" }, ir = {
3951
+ }, ir = { class: "tpl:mb-3" }, ar = {
3952
3952
  class: "tpl:mb-1 tpl:block tpl:text-xs tpl:font-medium",
3953
3953
  style: { color: "var(--tpl-text-muted)" }
3954
- }, ar = ["autofocus"], or = {
3954
+ }, or = ["autofocus"], sr = {
3955
3955
  key: 1,
3956
3956
  class: "tpl:mb-4"
3957
- }, sr = {
3957
+ }, cr = {
3958
3958
  class: "tpl:mb-1 tpl:block tpl:text-xs tpl:font-medium",
3959
3959
  style: { color: "var(--tpl-text-muted)" }
3960
- }, cr = ["placeholder"], lr = { class: "tpl:flex tpl:shrink-0 tpl:justify-end tpl:gap-2 tpl:p-5 tpl:pt-4" }, ur = ["disabled"], dr = /*#__PURE__*/ we(/* @__PURE__ */ d({
3960
+ }, lr = ["placeholder"], ur = { class: "tpl:flex tpl:shrink-0 tpl:justify-end tpl:gap-2 tpl:p-5 tpl:pt-4" }, dr = ["disabled"], fr = /*#__PURE__*/ we(/* @__PURE__ */ d({
3961
3961
  __name: "MediaEditModal",
3962
3962
  props: {
3963
3963
  visible: { type: Boolean },
@@ -3965,12 +3965,12 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
3965
3965
  },
3966
3966
  emits: ["save", "close"],
3967
3967
  setup(i, { emit: a }) {
3968
- let s = i, c = a, { t: u } = z(), d = t(Ne, null), h = t(je, l(null)), x = u.mediaLibrary, { isImageMimeType: E } = Re(), k = l(""), A = l(""), j = l(null), P = l("free"), ee = l(void 0), te = l(void 0), ne = l(""), re = l(""), ie = l(void 0), I = l(null), ae = l(!1), oe = l(!1), se = l(!1), ce = v(() => s.item ? [
3968
+ let s = i, c = a, { t: u } = z(), d = t(Ne, null), h = t(je, l(null)), x = u.mediaLibrary, { isImageMimeType: E } = ze(), k = l(""), A = l(""), j = l(null), P = l("free"), ee = l(void 0), te = l(void 0), ne = l(""), re = l(""), ie = l(void 0), I = l(null), ae = l(!1), oe = l(!1), se = l(!1), ce = v(() => s.item ? [
3969
3969
  "image/jpeg",
3970
3970
  "image/png",
3971
3971
  "image/webp",
3972
3972
  "image/gif"
3973
- ].includes(s.item.mime_type) : !1), le = v(() => P.value === "original" ? ie.value : ze[P.value]), ue = v(() => I.value ? Ue(I.value.width, I.value.height, ee.value, te.value) : null);
3973
+ ].includes(s.item.mime_type) : !1), le = v(() => P.value === "original" ? ie.value : Be[P.value]), ue = v(() => I.value ? We(I.value.width, I.value.height, ee.value, te.value) : null);
3974
3974
  e(() => s.visible, (e) => {
3975
3975
  e && s.item && (k.value = s.item.filename, A.value = s.item.alt_text || "", P.value = "free", ee.value = void 0, te.value = void 0, ne.value = "", re.value = "", ie.value = void 0, I.value = null, ae.value = !1, se.value = !1, s.item.width && s.item.height && (ie.value = s.item.width / s.item.height));
3976
3976
  });
@@ -4000,8 +4000,8 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
4000
4000
  try {
4001
4001
  let { canvas: e } = j.value.getResult();
4002
4002
  if (e) {
4003
- let t = Ve(e, ee.value, te.value), r = Be(s.item.mime_type);
4004
- n = { file: await He(t, s.item.filename, r) };
4003
+ let t = He(e, ee.value, te.value), r = Ve(s.item.mime_type);
4004
+ n = { file: await Ue(t, s.item.filename, r) };
4005
4005
  }
4006
4006
  } catch {
4007
4007
  oe.value = !1;
@@ -4033,9 +4033,9 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
4033
4033
  class: g(["tpl:flex tpl:max-h-[90%] tpl:w-full tpl:flex-col tpl:overflow-hidden tpl:rounded-lg tpl:shadow-xl", ce.value ? "tpl:max-w-2xl" : "tpl:max-w-sm"]),
4034
4034
  style: { "background-color": "var(--tpl-bg-elevated)" }
4035
4035
  }, [
4036
- O("div", Nn, [O("h3", Pn, N(p(u).mediaLibrary.editFile), 1)]),
4037
- O("div", Fn, [
4038
- ce.value ? (o(), y("div", In, [O("div", Ln, [m(p(kn), {
4036
+ O("div", Pn, [O("h3", Fn, N(p(u).mediaLibrary.editFile), 1)]),
4037
+ O("div", In, [
4038
+ ce.value ? (o(), y("div", Ln, [O("div", Rn, [m(p(An), {
4039
4039
  ref_key: "cropperRef",
4040
4040
  ref: j,
4041
4041
  src: i.item.url,
@@ -4044,8 +4044,8 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
4044
4044
  "background-class": "tpl-cropper-background",
4045
4045
  onChange: de,
4046
4046
  onReady: fe
4047
- }, null, 8, ["src", "stencil-props"])]), O("div", Rn, [
4048
- O("div", null, [O("label", zn, N(p(u).mediaLibrary.cropAspectRatio), 1), O("div", Bn, [(o(), y(M, null, n([
4047
+ }, null, 8, ["src", "stencil-props"])]), O("div", zn, [
4048
+ O("div", null, [O("label", Bn, N(p(u).mediaLibrary.cropAspectRatio), 1), O("div", Vn, [(o(), y(M, null, n([
4049
4049
  "free",
4050
4050
  "square",
4051
4051
  "landscape43",
@@ -4061,8 +4061,8 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
4061
4061
  color: P.value === e ? "var(--tpl-primary)" : "var(--tpl-text)"
4062
4062
  }),
4063
4063
  onClick: (t) => P.value = e
4064
- }, N(p(x)[`crop${e.charAt(0).toUpperCase()}${e.slice(1)}`]), 13, Vn)), 64))])]),
4065
- O("div", Hn, [O("div", Un, [O("label", Wn, [F(N(p(u).mediaLibrary.cropMaxWidth) + " ", 1), O("span", Gn, N(p(u).mediaLibrary.cropOptional), 1)]), O("div", Kn, [O("input", {
4064
+ }, N(p(x)[`crop${e.charAt(0).toUpperCase()}${e.slice(1)}`]), 13, Hn)), 64))])]),
4065
+ O("div", Un, [O("div", Wn, [O("label", Gn, [F(N(p(u).mediaLibrary.cropMaxWidth) + " ", 1), O("span", Kn, N(p(u).mediaLibrary.cropOptional), 1)]), O("div", qn, [O("input", {
4066
4066
  value: ne.value,
4067
4067
  type: "number",
4068
4068
  min: "1",
@@ -4074,7 +4074,7 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
4074
4074
  },
4075
4075
  placeholder: I.value?.width?.toString() || "",
4076
4076
  onInput: pe
4077
- }, null, 40, qn), O("span", Jn, N(p(u).mediaLibrary.cropPixels), 1)])]), O("div", Yn, [O("label", Xn, [F(N(p(u).mediaLibrary.cropMaxHeight) + " ", 1), O("span", Zn, N(p(u).mediaLibrary.cropOptional), 1)]), O("div", Qn, [O("input", {
4077
+ }, null, 40, Jn), O("span", Yn, N(p(u).mediaLibrary.cropPixels), 1)])]), O("div", Xn, [O("label", Zn, [F(N(p(u).mediaLibrary.cropMaxHeight) + " ", 1), O("span", Qn, N(p(u).mediaLibrary.cropOptional), 1)]), O("div", $n, [O("input", {
4078
4078
  value: re.value,
4079
4079
  type: "number",
4080
4080
  min: "1",
@@ -4086,10 +4086,10 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
4086
4086
  },
4087
4087
  placeholder: I.value?.height?.toString() || "",
4088
4088
  onInput: me
4089
- }, null, 40, $n), O("span", er, N(p(u).mediaLibrary.cropPixels), 1)])])]),
4090
- ue.value ? (o(), y("div", tr, [O("span", null, N(p(u).mediaLibrary.cropOutputSize) + ": ", 1), O("span", nr, N(ue.value.width) + " x " + N(ue.value.height) + " " + N(p(u).mediaLibrary.cropPixels), 1)])) : b("", !0)
4089
+ }, null, 40, er), O("span", tr, N(p(u).mediaLibrary.cropPixels), 1)])])]),
4090
+ ue.value ? (o(), y("div", nr, [O("span", null, N(p(u).mediaLibrary.cropOutputSize) + ": ", 1), O("span", rr, N(ue.value.width) + " x " + N(ue.value.height) + " " + N(p(u).mediaLibrary.cropPixels), 1)])) : b("", !0)
4091
4091
  ])])) : b("", !0),
4092
- O("div", rr, [O("label", ir, N(p(u).mediaLibrary.fileName), 1), f(O("input", {
4092
+ O("div", ir, [O("label", ar, N(p(u).mediaLibrary.fileName), 1), f(O("input", {
4093
4093
  "onUpdate:modelValue": t[0] ||= (e) => k.value = e,
4094
4094
  type: "text",
4095
4095
  class: "tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:outline-none",
@@ -4099,8 +4099,8 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
4099
4099
  color: "var(--tpl-text)"
4100
4100
  },
4101
4101
  autofocus: !ce.value
4102
- }, null, 8, ar), [[D, k.value]])]),
4103
- p(E)(i.item.mime_type) ? (o(), y("div", or, [O("label", sr, N(p(u).mediaLibrary.altText), 1), f(O("input", {
4102
+ }, null, 8, or), [[D, k.value]])]),
4103
+ p(E)(i.item.mime_type) ? (o(), y("div", sr, [O("label", cr, N(p(u).mediaLibrary.altText), 1), f(O("input", {
4104
4104
  "onUpdate:modelValue": t[1] ||= (e) => A.value = e,
4105
4105
  type: "text",
4106
4106
  class: "tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:outline-none",
@@ -4110,9 +4110,9 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
4110
4110
  color: "var(--tpl-text)"
4111
4111
  },
4112
4112
  placeholder: p(u).mediaLibrary.altTextPlaceholder
4113
- }, null, 8, cr), [[D, A.value]])])) : b("", !0)
4113
+ }, null, 8, lr), [[D, A.value]])])) : b("", !0)
4114
4114
  ]),
4115
- O("div", lr, [O("button", {
4115
+ O("div", ur, [O("button", {
4116
4116
  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",
4117
4117
  style: {
4118
4118
  "border-color": "var(--tpl-border)",
@@ -4125,21 +4125,21 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
4125
4125
  style: { background: "linear-gradient(\n 135deg,\n var(--tpl-primary),\n var(--tpl-primary-hover)\n )" },
4126
4126
  disabled: oe.value,
4127
4127
  onClick: he
4128
- }, N(oe.value ? p(u).mediaLibrary.saving : p(u).mediaLibrary.saveChanges), 9, ur)])
4129
- ], 2)], 40, Mn)) : b("", !0)]),
4128
+ }, N(oe.value ? p(u).mediaLibrary.saving : p(u).mediaLibrary.saveChanges), 9, dr)])
4129
+ ], 2)], 40, Nn)) : b("", !0)]),
4130
4130
  _: 1
4131
4131
  })], 8, ["to"]));
4132
4132
  }
4133
- }), [["__scopeId", "data-v-2013fa0f"]]), fr = {
4133
+ }), [["__scopeId", "data-v-2013fa0f"]]), pr = {
4134
4134
  key: 1,
4135
4135
  class: "tpl:size-4 tpl:shrink-0"
4136
- }, pr = {
4136
+ }, mr = {
4137
4137
  key: 0,
4138
4138
  class: "tpl:truncate"
4139
- }, mr = {
4139
+ }, hr = {
4140
4140
  key: 3,
4141
4141
  class: "tpl:flex tpl:shrink-0 tpl:items-center tpl:gap-0.5 tpl:opacity-0 tpl:transition-opacity tpl:group-hover:opacity-100"
4142
- }, hr = ["title"], gr = ["title"], _r = { key: 0 }, vr = ["placeholder"], yr = /* @__PURE__ */ d({
4142
+ }, gr = ["title"], _r = ["title"], vr = { key: 0 }, yr = ["placeholder"], br = /* @__PURE__ */ d({
4143
4143
  __name: "MediaFolderTreeNode",
4144
4144
  props: {
4145
4145
  folder: {},
@@ -4194,11 +4194,11 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
4194
4194
  key: 0,
4195
4195
  class: "tpl:flex tpl:size-4 tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
4196
4196
  onClick: S(F, ["stop"])
4197
- }, [m(p(fe), {
4197
+ }, [m(p(ce), {
4198
4198
  class: g(["tpl:transition-transform tpl:duration-150", { "tpl:rotate-90": j.value }]),
4199
4199
  size: 10,
4200
4200
  "stroke-width": 2
4201
- }, null, 8, ["class"])])) : (o(), y("span", fr)),
4201
+ }, null, 8, ["class"])])) : (o(), y("span", pr)),
4202
4202
  O("button", {
4203
4203
  class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:items-center tpl:gap-1.5",
4204
4204
  onClick: r[0] ||= (t) => i("navigate", e.folder.id)
@@ -4206,7 +4206,7 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
4206
4206
  class: "tpl:shrink-0",
4207
4207
  size: 14,
4208
4208
  "stroke-width": 1.5
4209
- }), u.value ? b("", !0) : (o(), y("span", pr, N(e.folder.name), 1))]),
4209
+ }), u.value ? b("", !0) : (o(), y("span", mr, N(e.folder.name), 1))]),
4210
4210
  u.value ? f((o(), y("input", {
4211
4211
  key: 2,
4212
4212
  "onUpdate:modelValue": r[1] ||= (e) => d.value = e,
@@ -4222,7 +4222,7 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
4222
4222
  onBlur: te,
4223
4223
  onClick: r[2] ||= S(() => {}, ["stop"])
4224
4224
  }, null, 544)), [[D, d.value]]) : b("", !0),
4225
- u.value ? b("", !0) : (o(), y("span", mr, [
4225
+ u.value ? b("", !0) : (o(), y("span", hr, [
4226
4226
  E.value ? (o(), y("button", {
4227
4227
  key: 0,
4228
4228
  class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
@@ -4231,15 +4231,15 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
4231
4231
  }, [m(p(pe), {
4232
4232
  size: 12,
4233
4233
  "stroke-width": 2
4234
- })], 8, hr)) : b("", !0),
4234
+ })], 8, gr)) : b("", !0),
4235
4235
  O("button", {
4236
4236
  class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
4237
4237
  title: p(s).mediaLibrary.renameFolder,
4238
4238
  onClick: S(ee, ["stop"])
4239
- }, [m(p(le), {
4239
+ }, [m(p(ue), {
4240
4240
  size: 12,
4241
4241
  "stroke-width": 2
4242
- })], 8, gr),
4242
+ })], 8, _r),
4243
4243
  O("button", {
4244
4244
  class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
4245
4245
  onClick: r[3] ||= S((t) => i("deleteFolder", e.folder.id), ["stop"])
@@ -4249,7 +4249,7 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
4249
4249
  style: { color: "var(--tpl-danger)" }
4250
4250
  })])
4251
4251
  ]))
4252
- ], 4), j.value ? (o(), y("div", _r, [(o(!0), y(M, null, n(e.folder.children, (t) => (o(), w(c, {
4252
+ ], 4), j.value ? (o(), y("div", vr, [(o(!0), y(M, null, n(e.folder.children, (t) => (o(), w(c, {
4253
4253
  key: t.id,
4254
4254
  folder: t,
4255
4255
  "current-folder-id": e.currentFolderId,
@@ -4279,13 +4279,13 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
4279
4279
  autofocus: "",
4280
4280
  onKeydown: [h(ie, ["enter"]), h(I, ["escape"])],
4281
4281
  onBlur: ie
4282
- }, null, 40, vr), [[D, x.value]])], 4)) : b("", !0)])) : b("", !0)]);
4282
+ }, null, 40, yr), [[D, x.value]])], 4)) : b("", !0)])) : b("", !0)]);
4283
4283
  };
4284
4284
  }
4285
- }), br = { class: "tpl:flex tpl:h-full tpl:flex-col tpl:overflow-y-auto" }, xr = {
4285
+ }), xr = { class: "tpl:flex tpl:h-full tpl:flex-col tpl:overflow-y-auto" }, Sr = {
4286
4286
  key: 0,
4287
4287
  class: "tpl:px-3 tpl:py-2"
4288
- }, Sr = ["placeholder"], Cr = /* @__PURE__ */ d({
4288
+ }, Cr = ["placeholder"], wr = /* @__PURE__ */ d({
4289
4289
  __name: "MediaFolderTree",
4290
4290
  props: {
4291
4291
  folders: {},
@@ -4311,7 +4311,7 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
4311
4311
  function d() {
4312
4312
  a.value = !1, s.value = "";
4313
4313
  }
4314
- return (t, l) => (o(), y("div", br, [
4314
+ return (t, l) => (o(), y("div", xr, [
4315
4315
  O("button", {
4316
4316
  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",
4317
4317
  style: C({
@@ -4323,7 +4323,7 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
4323
4323
  size: 14,
4324
4324
  "stroke-width": 1.5
4325
4325
  }), F(" " + N(p(i).mediaLibrary.allFiles), 1)], 4),
4326
- (o(!0), y(M, null, n(e.folders, (t) => (o(), w(yr, {
4326
+ (o(!0), y(M, null, n(e.folders, (t) => (o(), w(br, {
4327
4327
  key: t.id,
4328
4328
  folder: t,
4329
4329
  "current-folder-id": e.currentFolderId,
@@ -4333,7 +4333,7 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
4333
4333
  onRenameFolder: l[3] ||= (e, t) => r("renameFolder", e, t),
4334
4334
  onDeleteFolder: l[4] ||= (e) => r("deleteFolder", e)
4335
4335
  }, null, 8, ["folder", "current-folder-id"]))), 128)),
4336
- a.value ? (o(), y("div", xr, [f(O("input", {
4336
+ a.value ? (o(), y("div", Sr, [f(O("input", {
4337
4337
  "onUpdate:modelValue": l[5] ||= (e) => s.value = e,
4338
4338
  type: "text",
4339
4339
  class: "tpl:w-full tpl:rounded tpl:border tpl:px-2 tpl:py-1 tpl:text-xs tpl:outline-none",
@@ -4346,7 +4346,7 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
4346
4346
  autofocus: "",
4347
4347
  onKeydown: [h(u, ["enter"]), h(d, ["escape"])],
4348
4348
  onBlur: u
4349
- }, null, 40, Sr), [[D, s.value]])])) : b("", !0),
4349
+ }, null, 40, Cr), [[D, s.value]])])) : b("", !0),
4350
4350
  a.value ? b("", !0) : (o(), y("button", {
4351
4351
  key: 1,
4352
4352
  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",
@@ -4372,7 +4372,7 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
4372
4372
  }), F(" " + N(p(i).mediaLibrary.frequentlyUsed), 1)], 4)) : b("", !0)
4373
4373
  ]));
4374
4374
  }
4375
- }), wr = { class: "tpl:flex tpl:aspect-square tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2" }, Tr = /* @__PURE__ */ d({
4375
+ }), Tr = { class: "tpl:flex tpl:aspect-square tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2" }, Er = /* @__PURE__ */ d({
4376
4376
  __name: "MediaFileIcon",
4377
4377
  props: { mimeType: {} },
4378
4378
  setup(e) {
@@ -4473,7 +4473,7 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
4473
4473
  bgColor: "#f9fafb",
4474
4474
  icon: "document"
4475
4475
  }, i = v(() => n[t.mimeType] ?? r);
4476
- return (e, t) => (o(), y("div", wr, [i.value.icon === "document" ? (o(), y("svg", {
4476
+ return (e, t) => (o(), y("div", Tr, [i.value.icon === "document" ? (o(), y("svg", {
4477
4477
  key: 0,
4478
4478
  width: "60",
4479
4479
  height: "60",
@@ -4542,48 +4542,63 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
4542
4542
  style: C({ color: i.value.color })
4543
4543
  }, N(i.value.label), 5)]));
4544
4544
  }
4545
- }), Er = { class: "tpl:p-4" }, Dr = {
4545
+ });
4546
+ //#endregion
4547
+ //#region ../media-library/src/utils/formatAbsoluteDate.ts
4548
+ function Dr(e, t, n) {
4549
+ let r = new Date(e);
4550
+ if (Number.isNaN(r.getTime())) return "";
4551
+ let i = t?.trim().replace(/_/g, "-") || void 0;
4552
+ try {
4553
+ return r.toLocaleDateString(i, n);
4554
+ } catch {
4555
+ return r.toLocaleDateString(void 0, n);
4556
+ }
4557
+ }
4558
+ //#endregion
4559
+ //#region ../media-library/src/components/media/MediaGrid.vue?vue&type=script&setup=true&lang.ts
4560
+ var Or = { class: "tpl:p-4" }, kr = {
4546
4561
  key: 1,
4547
4562
  class: "tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:py-16"
4548
- }, Or = {
4563
+ }, Ar = {
4549
4564
  class: "tpl:text-xs",
4550
4565
  style: { color: "var(--tpl-text-muted)" }
4551
- }, kr = {
4566
+ }, jr = {
4552
4567
  key: 2,
4553
4568
  class: "tpl:grid tpl:grid-cols-4 tpl:gap-3"
4554
- }, Ar = ["onClick"], jr = { class: "tpl:aspect-square" }, Mr = ["src", "alt"], Nr = { class: "tpl:px-2 tpl:py-1.5" }, Pr = {
4569
+ }, Mr = ["onClick"], Nr = { class: "tpl:aspect-square" }, Pr = ["src", "alt"], Fr = { class: "tpl:px-2 tpl:py-1.5" }, Ir = {
4555
4570
  class: "tpl:truncate tpl:text-[10px] tpl:font-medium",
4556
4571
  style: { color: "var(--tpl-text)" }
4557
- }, Fr = {
4572
+ }, Lr = {
4558
4573
  class: "tpl:flex tpl:justify-between tpl:text-[9px]",
4559
4574
  style: { color: "var(--tpl-text-muted)" }
4560
- }, Ir = { key: 0 }, Lr = { class: "tpl:absolute tpl:top-1.5 tpl:left-1.5 tpl:flex tpl:gap-1 tpl:opacity-0 tpl:transition-opacity tpl:duration-150 tpl:group-hover:opacity-100" }, Rr = ["title", "onClick"], zr = ["title", "onClick"], Br = {
4575
+ }, Rr = { key: 0 }, zr = { class: "tpl:absolute tpl:top-1.5 tpl:left-1.5 tpl:flex tpl:gap-1 tpl:opacity-0 tpl:transition-opacity tpl:duration-150 tpl:group-hover:opacity-100" }, Br = ["title", "onClick"], Vr = ["title", "onClick"], Hr = {
4561
4576
  key: 0,
4562
4577
  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 tpl:text-white",
4563
4578
  style: { "background-color": "var(--tpl-primary)" }
4564
- }, Vr = {
4579
+ }, Ur = {
4565
4580
  key: 3,
4566
4581
  class: "tpl:flex tpl:flex-col tpl:gap-1"
4567
- }, Hr = ["onClick"], Ur = {
4582
+ }, Wr = ["onClick"], Gr = {
4568
4583
  class: "tpl:size-10 tpl:shrink-0 tpl:overflow-hidden tpl:rounded",
4569
4584
  style: { "background-color": "var(--tpl-bg-hover)" }
4570
- }, Wr = ["src", "alt"], Gr = {
4585
+ }, Kr = ["src", "alt"], qr = {
4571
4586
  key: 1,
4572
4587
  class: "tpl-list-icon tpl:size-full"
4573
- }, Kr = { class: "tpl:min-w-0 tpl:flex-1" }, qr = {
4588
+ }, Jr = { class: "tpl:min-w-0 tpl:flex-1" }, Yr = {
4574
4589
  class: "tpl:truncate tpl:text-xs tpl:font-medium",
4575
4590
  style: { color: "var(--tpl-text)" }
4576
- }, Jr = {
4591
+ }, Xr = {
4577
4592
  class: "tpl:text-[10px]",
4578
4593
  style: { color: "var(--tpl-text-muted)" }
4579
- }, Yr = { class: "tpl:flex tpl:gap-1 tpl:opacity-0 tpl:transition-opacity tpl:duration-150 tpl:group-hover:opacity-100" }, Xr = ["title", "onClick"], Zr = ["title", "onClick"], Qr = {
4594
+ }, Zr = { class: "tpl:flex tpl:gap-1 tpl:opacity-0 tpl:transition-opacity tpl:duration-150 tpl:group-hover:opacity-100" }, Qr = ["title", "onClick"], $r = ["title", "onClick"], ei = {
4580
4595
  key: 0,
4581
4596
  class: "tpl:flex tpl:size-5 tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded-full tpl:text-white",
4582
4597
  style: { "background-color": "var(--tpl-primary)" }
4583
- }, $r = {
4598
+ }, ti = {
4584
4599
  key: 4,
4585
4600
  class: "tpl:flex tpl:justify-center tpl:py-4"
4586
- }, ei = /*#__PURE__*/ we(/* @__PURE__ */ d({
4601
+ }, ni = /*#__PURE__*/ we(/* @__PURE__ */ d({
4587
4602
  __name: "MediaGrid",
4588
4603
  props: {
4589
4604
  items: {},
@@ -4600,29 +4615,29 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
4600
4615
  "edit",
4601
4616
  "replace"
4602
4617
  ],
4603
- setup(e, { emit: t }) {
4604
- let r = e, i = t, { isAcceptedMimeType: a, isImageMimeType: s } = Re();
4605
- function c(e) {
4606
- return !r.accept || r.accept.length === 0 || a(e.mime_type, r.accept);
4607
- }
4618
+ setup(e, { emit: r }) {
4619
+ let i = e, a = r, { isAcceptedMimeType: s, isImageMimeType: c } = ze();
4608
4620
  function u(e) {
4609
- i("select", e);
4621
+ return !i.accept || i.accept.length === 0 || s(e.mime_type, i.accept);
4610
4622
  }
4611
- let { t: d } = z(), f = l(null);
4612
- I(f, ([{ isIntersecting: e }]) => {
4613
- e && r.hasMore && !r.isLoading && i("loadMore");
4623
+ function d(e) {
4624
+ a("select", e);
4625
+ }
4626
+ let { t: f } = z(), h = t(Pe, null), _ = l(null);
4627
+ I(_, ([{ isIntersecting: e }]) => {
4628
+ e && i.hasMore && !i.isLoading && a("loadMore");
4614
4629
  }, { threshold: .1 });
4615
- function h(e) {
4630
+ function v(e) {
4616
4631
  return e < 1024 ? `${e} B` : e < 1048576 ? `${(e / 1024).toFixed(1)} KB` : `${(e / 1048576).toFixed(1)} MB`;
4617
4632
  }
4618
- function _(e) {
4619
- return new Date(e).toLocaleDateString(void 0, {
4633
+ function x(e) {
4634
+ return Dr(e, h?.value, {
4620
4635
  year: "numeric",
4621
4636
  month: "short",
4622
4637
  day: "numeric"
4623
4638
  });
4624
4639
  }
4625
- return (t, r) => (o(), y("div", Er, [
4640
+ return (t, r) => (o(), y("div", Or, [
4626
4641
  e.isLoading && e.items.length === 0 ? (o(), y("div", {
4627
4642
  key: 0,
4628
4643
  class: g(e.layout === "list" ? "tpl:flex tpl:flex-col tpl:gap-1" : "tpl:grid tpl:grid-cols-4 tpl:gap-3")
@@ -4630,98 +4645,98 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
4630
4645
  key: t,
4631
4646
  class: g(["tpl-pulse tpl:rounded-lg", e.layout === "list" ? "tpl:h-12" : "tpl:aspect-square"]),
4632
4647
  style: { "background-color": "var(--tpl-bg-hover)" }
4633
- }, null, 2)), 64))], 2)) : e.items.length === 0 ? (o(), y("div", Dr, [m(p(he), {
4648
+ }, null, 2)), 64))], 2)) : e.items.length === 0 ? (o(), y("div", kr, [m(p(he), {
4634
4649
  class: "tpl:mb-3",
4635
4650
  size: 40,
4636
4651
  "stroke-width": 1,
4637
4652
  style: { color: "var(--tpl-text-dim)" }
4638
- }), O("p", Or, N(p(d).mediaLibrary.noFiles), 1)])) : e.layout === "list" ? (o(), y("div", Vr, [(o(!0), y(M, null, n(e.items, (t) => (o(), y("div", {
4653
+ }), O("p", Ar, N(p(f).mediaLibrary.noFiles), 1)])) : e.layout === "list" ? (o(), y("div", Ur, [(o(!0), y(M, null, n(e.items, (t) => (o(), y("div", {
4639
4654
  key: t.id,
4640
- class: g(["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", [!c(t) && !e.selectedIds.has(t.id) ? "tpl:opacity-60" : ""]]),
4655
+ class: g(["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", [!u(t) && !e.selectedIds.has(t.id) ? "tpl:opacity-60" : ""]]),
4641
4656
  style: C({ backgroundColor: e.selectedIds.has(t.id) ? "var(--tpl-bg-hover)" : "transparent" }),
4642
- onClick: (e) => u(t)
4657
+ onClick: (e) => d(t)
4643
4658
  }, [
4644
- O("div", Ur, [p(s)(t.mime_type) ? (o(), y("img", {
4659
+ O("div", Gr, [p(c)(t.mime_type) ? (o(), y("img", {
4645
4660
  key: 0,
4646
4661
  src: t.small_url || t.url,
4647
4662
  alt: t.filename,
4648
4663
  class: "tpl:size-full tpl:object-cover",
4649
4664
  loading: "lazy"
4650
- }, null, 8, Wr)) : (o(), y("div", Gr, [m(Tr, { "mime-type": t.mime_type }, null, 8, ["mime-type"])]))]),
4651
- O("div", Kr, [O("p", qr, N(t.filename), 1), O("p", Jr, [F(N(h(t.size)) + " · " + N(_(t.created_at)) + " ", 1), p(s)(t.mime_type) && t.width && t.height ? (o(), y(M, { key: 0 }, [F(" · " + N(t.width) + "×" + N(t.height), 1)], 64)) : b("", !0)])]),
4652
- O("div", Yr, [O("button", {
4665
+ }, null, 8, Kr)) : (o(), y("div", qr, [m(Er, { "mime-type": t.mime_type }, null, 8, ["mime-type"])]))]),
4666
+ O("div", Jr, [O("p", Yr, N(t.filename), 1), O("p", Xr, [F(N(v(t.size)) + " · " + N(x(t.created_at)) + " ", 1), p(c)(t.mime_type) && t.width && t.height ? (o(), y(M, { key: 0 }, [F(" · " + N(t.width) + "×" + N(t.height), 1)], 64)) : b("", !0)])]),
4667
+ O("div", Zr, [O("button", {
4653
4668
  class: "tpl:flex tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded",
4654
4669
  style: { color: "var(--tpl-text-muted)" },
4655
- title: p(d).mediaLibrary.editFile,
4656
- onClick: S((e) => i("edit", t), ["stop"])
4657
- }, [m(p(le), {
4670
+ title: p(f).mediaLibrary.editFile,
4671
+ onClick: S((e) => a("edit", t), ["stop"])
4672
+ }, [m(p(ue), {
4658
4673
  size: 12,
4659
4674
  "stroke-width": 2
4660
- })], 8, Xr), O("button", {
4675
+ })], 8, Qr), O("button", {
4661
4676
  class: "tpl:flex tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded",
4662
4677
  style: { color: "var(--tpl-text-muted)" },
4663
- title: p(d).mediaLibrary.replaceFile,
4664
- onClick: S((e) => i("replace", t), ["stop"])
4678
+ title: p(f).mediaLibrary.replaceFile,
4679
+ onClick: S((e) => a("replace", t), ["stop"])
4665
4680
  }, [m(p(Ce), {
4666
4681
  size: 12,
4667
4682
  "stroke-width": 2
4668
- })], 8, Zr)]),
4669
- e.selectedIds.has(t.id) ? (o(), y("div", Qr, [m(p(ue), {
4683
+ })], 8, $r)]),
4684
+ e.selectedIds.has(t.id) ? (o(), y("div", ei, [m(p(de), {
4670
4685
  size: 12,
4671
4686
  "stroke-width": 3
4672
4687
  })])) : b("", !0)
4673
- ], 14, Hr))), 128))])) : (o(), y("div", kr, [(o(!0), y(M, null, n(e.items, (t) => (o(), y("div", {
4688
+ ], 14, Wr))), 128))])) : (o(), y("div", jr, [(o(!0), y(M, null, n(e.items, (t) => (o(), y("div", {
4674
4689
  key: t.id,
4675
4690
  class: g(["tpl-media-item tpl:group tpl:relative tpl:overflow-hidden tpl:rounded-lg tpl:border-2 tpl:transition-all tpl:duration-150", [
4676
4691
  "tpl:cursor-pointer",
4677
- !c(t) && !e.selectedIds.has(t.id) ? "tpl:opacity-60" : "",
4692
+ !u(t) && !e.selectedIds.has(t.id) ? "tpl:opacity-60" : "",
4678
4693
  e.selectedIds.has(t.id) ? "tpl-media-item--selected" : ""
4679
4694
  ]]),
4680
4695
  style: C({
4681
4696
  borderColor: e.selectedIds.has(t.id) ? "var(--tpl-primary)" : "transparent",
4682
- backgroundColor: !c(t) && !e.selectedIds.has(t.id) ? "var(--tpl-bg)" : "var(--tpl-bg-hover)"
4697
+ backgroundColor: !u(t) && !e.selectedIds.has(t.id) ? "var(--tpl-bg)" : "var(--tpl-bg-hover)"
4683
4698
  }),
4684
- onClick: (e) => u(t)
4699
+ onClick: (e) => d(t)
4685
4700
  }, [
4686
- O("div", jr, [p(s)(t.mime_type) ? (o(), y("img", {
4701
+ O("div", Nr, [p(c)(t.mime_type) ? (o(), y("img", {
4687
4702
  key: 0,
4688
4703
  src: t.small_url || t.url,
4689
4704
  alt: t.filename,
4690
4705
  class: "tpl:size-full tpl:object-cover",
4691
4706
  loading: "lazy"
4692
- }, null, 8, Mr)) : (o(), w(Tr, {
4707
+ }, null, 8, Pr)) : (o(), w(Er, {
4693
4708
  key: 1,
4694
4709
  "mime-type": t.mime_type
4695
4710
  }, null, 8, ["mime-type"]))]),
4696
- O("div", Nr, [O("p", Pr, N(t.filename), 1), O("p", Fr, [O("span", null, N(h(t.size)), 1), p(s)(t.mime_type) && t.width && t.height ? (o(), y("span", Ir, N(t.width) + "×" + N(t.height), 1)) : b("", !0)])]),
4697
- O("div", Lr, [O("button", {
4711
+ O("div", Fr, [O("p", Ir, N(t.filename), 1), O("p", Lr, [O("span", null, N(v(t.size)), 1), p(c)(t.mime_type) && t.width && t.height ? (o(), y("span", Rr, N(t.width) + "×" + N(t.height), 1)) : b("", !0)])]),
4712
+ O("div", zr, [O("button", {
4698
4713
  class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded-full tpl:text-white",
4699
4714
  style: { "background-color": "rgba(0, 0, 0, 0.6)" },
4700
- title: p(d).mediaLibrary.editFile,
4701
- onClick: S((e) => i("edit", t), ["stop"])
4702
- }, [m(p(le), {
4715
+ title: p(f).mediaLibrary.editFile,
4716
+ onClick: S((e) => a("edit", t), ["stop"])
4717
+ }, [m(p(ue), {
4703
4718
  size: 11,
4704
4719
  "stroke-width": 2
4705
- })], 8, Rr), O("button", {
4720
+ })], 8, Br), O("button", {
4706
4721
  class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded-full tpl:text-white",
4707
4722
  style: { "background-color": "rgba(0, 0, 0, 0.6)" },
4708
- title: p(d).mediaLibrary.replaceFile,
4709
- onClick: S((e) => i("replace", t), ["stop"])
4723
+ title: p(f).mediaLibrary.replaceFile,
4724
+ onClick: S((e) => a("replace", t), ["stop"])
4710
4725
  }, [m(p(Ce), {
4711
4726
  size: 11,
4712
4727
  "stroke-width": 2
4713
- })], 8, zr)]),
4714
- e.selectedIds.has(t.id) ? (o(), y("div", Br, [m(p(ue), {
4728
+ })], 8, Vr)]),
4729
+ e.selectedIds.has(t.id) ? (o(), y("div", Hr, [m(p(de), {
4715
4730
  size: 12,
4716
4731
  "stroke-width": 3
4717
4732
  })])) : b("", !0)
4718
- ], 14, Ar))), 128))])),
4733
+ ], 14, Mr))), 128))])),
4719
4734
  O("div", {
4720
4735
  ref_key: "sentinelRef",
4721
- ref: f,
4736
+ ref: _,
4722
4737
  class: "tpl:h-4"
4723
4738
  }, null, 512),
4724
- e.isLoading && e.items.length > 0 ? (o(), y("div", $r, [m(p(ye), {
4739
+ e.isLoading && e.items.length > 0 ? (o(), y("div", ti, [m(p(ye), {
4725
4740
  class: "tpl-spinner",
4726
4741
  size: 20,
4727
4742
  "stroke-width": 2,
@@ -4729,20 +4744,20 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
4729
4744
  })])) : b("", !0)
4730
4745
  ]));
4731
4746
  }
4732
- }), [["__scopeId", "data-v-78d7ed75"]]), ti = ["data-tpl-theme"], ni = {
4747
+ }), [["__scopeId", "data-v-ce5c5192"]]), ri = ["data-tpl-theme"], ii = {
4733
4748
  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",
4734
4749
  style: { "background-color": "var(--tpl-bg-elevated)" }
4735
- }, ri = {
4750
+ }, ai = {
4736
4751
  class: "tpl:mb-4 tpl:text-sm tpl:font-semibold",
4737
4752
  style: { color: "var(--tpl-text)" }
4738
- }, ii = { class: "tpl:mb-3" }, ai = ["placeholder", "disabled"], oi = {
4753
+ }, oi = { class: "tpl:mb-3" }, si = ["placeholder", "disabled"], ci = {
4739
4754
  key: 0,
4740
4755
  class: "tpl:mb-3 tpl:text-xs",
4741
4756
  style: { color: "var(--tpl-danger)" }
4742
- }, si = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, ci = ["disabled"], li = ["disabled"], ui = {
4757
+ }, li = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, ui = ["disabled"], di = ["disabled"], fi = {
4743
4758
  key: 0,
4744
4759
  class: "tpl:flex tpl:items-center tpl:gap-1.5"
4745
- }, di = { key: 1 }, fi = /* @__PURE__ */ d({
4760
+ }, pi = { key: 1 }, mi = /* @__PURE__ */ d({
4746
4761
  __name: "MediaImportUrlModal",
4747
4762
  props: {
4748
4763
  visible: { type: Boolean },
@@ -4757,7 +4772,7 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
4757
4772
  });
4758
4773
  function v() {
4759
4774
  let e = h.value.trim();
4760
- !e || a.isImporting || s("import", e);
4775
+ e && !a.isImporting && s("import", e);
4761
4776
  }
4762
4777
  function x() {
4763
4778
  a.isImporting || s("close");
@@ -4780,9 +4795,9 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
4780
4795
  style: { "background-color": "var(--tpl-overlay)" },
4781
4796
  onClick: S(x, ["self"]),
4782
4797
  onKeydown: C
4783
- }, [O("div", ni, [
4784
- O("h3", ri, N(p(c).mediaLibrary.importFromUrl), 1),
4785
- O("div", ii, [f(O("input", {
4798
+ }, [O("div", ii, [
4799
+ O("h3", ai, N(p(c).mediaLibrary.importFromUrl), 1),
4800
+ O("div", oi, [f(O("input", {
4786
4801
  "onUpdate:modelValue": t[0] ||= (e) => h.value = e,
4787
4802
  type: "url",
4788
4803
  class: "tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:outline-none",
@@ -4794,9 +4809,9 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
4794
4809
  placeholder: p(c).mediaLibrary.importUrlPlaceholder,
4795
4810
  disabled: n.isImporting,
4796
4811
  autofocus: ""
4797
- }, null, 8, ai), [[D, h.value]])]),
4798
- n.error ? (o(), y("p", oi, N(n.error), 1)) : b("", !0),
4799
- O("div", si, [O("button", {
4812
+ }, null, 8, si), [[D, h.value]])]),
4813
+ n.error ? (o(), y("p", ci, N(n.error), 1)) : b("", !0),
4814
+ O("div", li, [O("button", {
4800
4815
  class: g(["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 }]),
4801
4816
  style: {
4802
4817
  "border-color": "var(--tpl-border)",
@@ -4805,25 +4820,25 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
4805
4820
  },
4806
4821
  disabled: n.isImporting,
4807
4822
  onClick: x
4808
- }, N(p(c).mediaLibrary.cancel), 11, ci), O("button", {
4823
+ }, N(p(c).mediaLibrary.cancel), 11, ui), O("button", {
4809
4824
  class: "tpl:cursor-pointer tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:text-white tpl:transition-all tpl:duration-150 tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50",
4810
4825
  style: { background: "linear-gradient(\n 135deg,\n var(--tpl-primary),\n var(--tpl-primary-hover)\n )" },
4811
4826
  disabled: !h.value.trim() || n.isImporting,
4812
4827
  onClick: v
4813
- }, [n.isImporting ? (o(), y("span", ui, [m(p(ye), {
4828
+ }, [n.isImporting ? (o(), y("span", fi, [m(p(ye), {
4814
4829
  class: "tpl:animate-spin",
4815
4830
  size: 12,
4816
4831
  "stroke-width": 2
4817
- }), F(" " + N(p(c).mediaLibrary.importing), 1)])) : (o(), y("span", di, N(p(c).mediaLibrary.import), 1))], 8, li)])
4818
- ])], 40, ti)) : b("", !0)]),
4832
+ }), F(" " + N(p(c).mediaLibrary.importing), 1)])) : (o(), y("span", pi, N(p(c).mediaLibrary.import), 1))], 8, di)])
4833
+ ])], 40, ri)) : b("", !0)]),
4819
4834
  _: 1
4820
4835
  })], 8, ["to"]));
4821
4836
  }
4822
- }), pi = { class: "tpl:max-h-56 tpl:overflow-y-auto tpl:py-1" }, mi = ["disabled", "onClick"], hi = { class: "tpl:truncate" }, gi = {
4837
+ }), hi = { class: "tpl:max-h-56 tpl:overflow-y-auto tpl:py-1" }, gi = ["disabled", "onClick"], _i = { class: "tpl:truncate" }, vi = {
4823
4838
  key: 0,
4824
4839
  class: "tpl:shrink-0",
4825
4840
  style: { color: "var(--tpl-text-dim)" }
4826
- }, _i = /* @__PURE__ */ d({
4841
+ }, yi = /* @__PURE__ */ d({
4827
4842
  __name: "MediaMovePicker",
4828
4843
  props: {
4829
4844
  folders: {},
@@ -4851,7 +4866,7 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
4851
4866
  "border-color": "var(--tpl-border)",
4852
4867
  "background-color": "var(--tpl-bg-elevated)"
4853
4868
  }
4854
- }, [O("div", pi, [e.currentFolderId === null ? b("", !0) : (o(), y("button", {
4869
+ }, [O("div", hi, [e.currentFolderId === null ? b("", !0) : (o(), y("button", {
4855
4870
  key: 0,
4856
4871
  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",
4857
4872
  style: { color: "var(--tpl-text)" },
@@ -4876,27 +4891,27 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
4876
4891
  size: 14,
4877
4892
  "stroke-width": 1.5
4878
4893
  }),
4879
- O("span", hi, N(t.name), 1),
4880
- t.id === e.currentFolderId ? (o(), y("span", gi, N(p(i).mediaLibrary.currentFolder), 1)) : b("", !0)
4881
- ], 12, mi))), 128))])], 512));
4894
+ O("span", _i, N(t.name), 1),
4895
+ t.id === e.currentFolderId ? (o(), y("span", vi, N(p(i).mediaLibrary.currentFolder), 1)) : b("", !0)
4896
+ ], 12, gi))), 128))])], 512));
4882
4897
  }
4883
- }), vi = { class: "tpl:flex tpl:items-center tpl:gap-3" }, yi = ["src", "alt"], bi = {
4898
+ }), bi = { class: "tpl:flex tpl:items-center tpl:gap-3" }, xi = ["src", "alt"], Si = {
4884
4899
  key: 1,
4885
4900
  class: "tpl:flex tpl:size-10 tpl:shrink-0 tpl:items-center tpl:justify-center tpl:overflow-hidden tpl:rounded",
4886
4901
  style: { border: "1px solid var(--tpl-border)" }
4887
- }, xi = { class: "tpl:min-w-0 tpl:flex-1" }, Si = {
4902
+ }, Ci = { class: "tpl:min-w-0 tpl:flex-1" }, wi = {
4888
4903
  class: "tpl:truncate tpl:text-xs tpl:font-medium",
4889
4904
  style: { color: "var(--tpl-text)" }
4890
- }, Ci = {
4905
+ }, Ti = {
4891
4906
  class: "tpl:mt-0.5 tpl:text-[10px]",
4892
4907
  style: { color: "var(--tpl-text-muted)" }
4893
- }, wi = {
4908
+ }, Ei = {
4894
4909
  key: 2,
4895
4910
  class: "tpl:shrink-0"
4896
- }, Ti = {
4911
+ }, Di = {
4897
4912
  class: "tpl:block tpl:text-[10px]",
4898
4913
  style: { color: "var(--tpl-text-muted)" }
4899
- }, Ei = ["value"], Di = ["value"], Oi = /*#__PURE__*/ we(/* @__PURE__ */ d({
4914
+ }, Oi = ["value"], ki = ["value"], Ai = /*#__PURE__*/ we(/* @__PURE__ */ d({
4900
4915
  __name: "MediaPreviewPanel",
4901
4916
  props: {
4902
4917
  item: {},
@@ -4904,99 +4919,99 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
4904
4919
  selectedConversion: {}
4905
4920
  },
4906
4921
  emits: ["update:selectedConversion"],
4907
- setup(e, { emit: t }) {
4908
- let r = e, i = t, { t: a } = z(), { isImageMimeType: s } = Re(), c = v(() => {
4909
- if (!_.value || !r.item.conversions_generated) return [];
4922
+ setup(e, { emit: r }) {
4923
+ let i = e, a = r, { t: s } = z(), c = t(Pe, null), { isImageMimeType: l } = ze(), u = v(() => {
4924
+ if (!S.value || !i.item.conversions_generated) return [];
4910
4925
  let e = [];
4911
- return r.item.small_url && e.push({
4926
+ return i.item.small_url && e.push({
4912
4927
  value: "small",
4913
- label: a.mediaLibrary.conversionSmall,
4914
- url: r.item.small_url
4915
- }), r.item.medium_url && e.push({
4928
+ label: s.mediaLibrary.conversionSmall,
4929
+ url: i.item.small_url
4930
+ }), i.item.medium_url && e.push({
4916
4931
  value: "medium",
4917
- label: a.mediaLibrary.conversionMedium,
4918
- url: r.item.medium_url
4919
- }), r.item.large_url && e.push({
4932
+ label: s.mediaLibrary.conversionMedium,
4933
+ url: i.item.medium_url
4934
+ }), i.item.large_url && e.push({
4920
4935
  value: "large",
4921
- label: a.mediaLibrary.conversionLarge,
4922
- url: r.item.large_url
4936
+ label: s.mediaLibrary.conversionLarge,
4937
+ url: i.item.large_url
4923
4938
  }), e.push({
4924
4939
  value: "original",
4925
- label: a.mediaLibrary.conversionOriginal,
4926
- url: r.item.url
4940
+ label: s.mediaLibrary.conversionOriginal,
4941
+ url: i.item.url
4927
4942
  }), e;
4928
- }), l = v(() => _.value && c.value.length > 1), u = v(() => {
4929
- if (!_.value) return null;
4930
- switch (r.selectedConversion) {
4931
- case "small": return r.item.small_url || r.item.url;
4932
- case "medium": return r.item.medium_url || r.item.url;
4933
- case "large": return r.item.large_url || r.item.url;
4934
- default: return r.item.url;
4943
+ }), d = v(() => S.value && u.value.length > 1), f = v(() => {
4944
+ if (!S.value) return null;
4945
+ switch (i.selectedConversion) {
4946
+ case "small": return i.item.small_url || i.item.url;
4947
+ case "medium": return i.item.medium_url || i.item.url;
4948
+ case "large": return i.item.large_url || i.item.url;
4949
+ default: return i.item.url;
4935
4950
  }
4936
4951
  });
4937
- function d(e) {
4952
+ function h(e) {
4938
4953
  let t = e.target;
4939
- i("update:selectedConversion", t.value);
4954
+ a("update:selectedConversion", t.value);
4940
4955
  }
4941
- function f(e, t, n = []) {
4956
+ function _(e, t, n = []) {
4942
4957
  for (let r of e) {
4943
4958
  let e = [...n, r.name];
4944
4959
  if (r.id === t) return e;
4945
4960
  if (r.children) {
4946
- let n = f(r.children, t, e);
4961
+ let n = _(r.children, t, e);
4947
4962
  if (n) return n;
4948
4963
  }
4949
4964
  }
4950
4965
  return null;
4951
4966
  }
4952
- let h = v(() => {
4953
- if (!r.item.folder_id || !r.folders) return null;
4954
- let e = f(r.folders, r.item.folder_id);
4967
+ let x = v(() => {
4968
+ if (!i.item.folder_id || !i.folders) return null;
4969
+ let e = _(i.folders, i.item.folder_id);
4955
4970
  return e ? e.join("/") : null;
4956
- }), _ = v(() => s(r.item.mime_type));
4957
- function x(e) {
4971
+ }), S = v(() => l(i.item.mime_type));
4972
+ function C(e) {
4958
4973
  return e < 1024 ? `${e} B` : e < 1048576 ? `${(e / 1024).toFixed(1)} KB` : `${(e / 1048576).toFixed(1)} MB`;
4959
4974
  }
4960
- function S(e) {
4961
- return new Date(e).toLocaleDateString(void 0, {
4975
+ function w(e) {
4976
+ return Dr(e, c?.value, {
4962
4977
  year: "numeric",
4963
4978
  month: "short",
4964
4979
  day: "numeric"
4965
4980
  });
4966
4981
  }
4967
- return (t, r) => (o(), y("div", vi, [
4968
- _.value ? (o(), y("img", {
4982
+ return (t, r) => (o(), y("div", bi, [
4983
+ S.value ? (o(), y("img", {
4969
4984
  key: 0,
4970
- src: u.value ?? void 0,
4985
+ src: f.value ?? void 0,
4971
4986
  alt: e.item.alt_text || e.item.filename,
4972
4987
  class: "tpl:size-10 tpl:shrink-0 tpl:rounded tpl:object-cover",
4973
4988
  style: { border: "1px solid var(--tpl-border)" }
4974
- }, null, 8, yi)) : (o(), y("div", bi, [m(Tr, {
4989
+ }, null, 8, xi)) : (o(), y("div", Si, [m(Er, {
4975
4990
  "mime-type": e.item.mime_type,
4976
4991
  class: "tpl-preview-icon"
4977
4992
  }, null, 8, ["mime-type"])])),
4978
- O("div", xi, [
4979
- O("p", Si, N(e.item.filename), 1),
4980
- O("p", Ci, [
4981
- F(N(x(e.item.size)) + " · " + N(S(e.item.created_at)) + " ", 1),
4982
- _.value && e.item.width && e.item.height ? (o(), y(M, { key: 0 }, [F(" · " + N(e.item.width) + "×" + N(e.item.height) + "px ", 1)], 64)) : b("", !0),
4983
- h.value ? (o(), y(M, { key: 1 }, [
4993
+ O("div", Ci, [
4994
+ O("p", wi, N(e.item.filename), 1),
4995
+ O("p", Ti, [
4996
+ F(N(C(e.item.size)) + " · " + N(w(e.item.created_at)) + " ", 1),
4997
+ S.value && e.item.width && e.item.height ? (o(), y(M, { key: 0 }, [F(" · " + N(e.item.width) + "×" + N(e.item.height) + "px ", 1)], 64)) : b("", !0),
4998
+ x.value ? (o(), y(M, { key: 1 }, [
4984
4999
  r[0] ||= F(" · ", -1),
4985
5000
  m(p(Se), {
4986
5001
  class: "tpl:mb-px tpl:inline",
4987
5002
  size: 9,
4988
5003
  "stroke-width": 2
4989
5004
  }),
4990
- F(" " + N(h.value), 1)
5005
+ F(" " + N(x.value), 1)
4991
5006
  ], 64)) : b("", !0)
4992
5007
  ]),
4993
- _.value ? (o(), y("p", {
5008
+ S.value ? (o(), y("p", {
4994
5009
  key: 0,
4995
5010
  class: g(["tpl:mt-0.5 tpl:truncate tpl:text-[10px] tpl:italic", { "tpl:invisible": !e.item.alt_text }]),
4996
5011
  style: { color: "var(--tpl-text-dim)" }
4997
5012
  }, N(e.item.alt_text || "\xA0"), 3)) : b("", !0)
4998
5013
  ]),
4999
- l.value ? (o(), y("div", wi, [O("label", Ti, N(p(a).mediaLibrary.conversionLabel), 1), O("select", {
5014
+ d.value ? (o(), y("div", Ei, [O("label", Di, N(p(s).mediaLibrary.conversionLabel), 1), O("select", {
5000
5015
  class: "tpl:mt-0.5 tpl:rounded-md tpl:border tpl:py-1 tpl:pr-6 tpl:pl-2 tpl:text-xs tpl:outline-none",
5001
5016
  style: {
5002
5017
  "border-color": "var(--tpl-border)",
@@ -5004,40 +5019,40 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
5004
5019
  color: "var(--tpl-text)"
5005
5020
  },
5006
5021
  value: e.selectedConversion,
5007
- onChange: d
5008
- }, [(o(!0), y(M, null, n(c.value, (e) => (o(), y("option", {
5022
+ onChange: h
5023
+ }, [(o(!0), y(M, null, n(u.value, (e) => (o(), y("option", {
5009
5024
  key: e.value,
5010
5025
  value: e.value
5011
- }, N(e.label), 9, Di))), 128))], 40, Ei)])) : b("", !0)
5026
+ }, N(e.label), 9, ki))), 128))], 40, Oi)])) : b("", !0)
5012
5027
  ]));
5013
5028
  }
5014
- }), [["__scopeId", "data-v-56be5670"]]), ki = ["data-tpl-theme"], Ai = {
5029
+ }), [["__scopeId", "data-v-ebdc36ef"]]), ji = ["data-tpl-theme"], Mi = {
5015
5030
  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",
5016
5031
  style: { "background-color": "var(--tpl-bg-elevated)" }
5017
- }, ji = {
5032
+ }, Ni = {
5018
5033
  class: "tpl:mb-2 tpl:text-sm tpl:font-semibold",
5019
5034
  style: { color: "var(--tpl-text)" }
5020
- }, Mi = {
5035
+ }, Pi = {
5021
5036
  class: "tpl:mb-2 tpl:text-xs",
5022
5037
  style: { color: "var(--tpl-text-muted)" }
5023
- }, Ni = {
5038
+ }, Fi = {
5024
5039
  key: 0,
5025
5040
  class: "tpl:mb-3 tpl:text-xs",
5026
5041
  style: { color: "var(--tpl-warning)" }
5027
- }, Pi = {
5042
+ }, Ii = {
5028
5043
  class: "tpl:mb-3 tpl:rounded tpl:border tpl:p-2",
5029
5044
  style: { "border-color": "var(--tpl-border)" }
5030
- }, Fi = {
5045
+ }, Li = {
5031
5046
  class: "tpl:truncate tpl:text-xs tpl:font-medium",
5032
5047
  style: { color: "var(--tpl-text)" }
5033
- }, Ii = { class: "tpl:mb-4" }, Li = {
5048
+ }, Ri = { class: "tpl:mb-4" }, zi = {
5034
5049
  class: "tpl:mb-1 tpl:block tpl:text-xs tpl:font-medium",
5035
5050
  style: { color: "var(--tpl-text-muted)" }
5036
- }, Ri = ["accept"], zi = {
5051
+ }, Bi = ["accept"], Vi = {
5037
5052
  key: 1,
5038
5053
  class: "tpl:mb-3 tpl:text-xs",
5039
5054
  style: { color: "var(--tpl-danger)" }
5040
- }, Bi = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, Vi = ["disabled"], Hi = ["disabled"], Ui = /* @__PURE__ */ d({
5055
+ }, Hi = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, Ui = ["disabled"], Wi = ["disabled"], Gi = /* @__PURE__ */ d({
5041
5056
  __name: "MediaReplaceModal",
5042
5057
  props: {
5043
5058
  visible: { type: Boolean },
@@ -5081,12 +5096,12 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
5081
5096
  style: { "background-color": "var(--tpl-overlay)" },
5082
5097
  onClick: t[1] ||= S((e) => s("close"), ["self"]),
5083
5098
  onKeydown: k
5084
- }, [O("div", Ai, [
5085
- O("h3", ji, N(p(c).mediaLibrary.replaceWarningTitle), 1),
5086
- O("p", Mi, N(p(c).mediaLibrary.replaceWarningMessage.replace("{extension}", `.${g.value}`)), 1),
5087
- C.value ? (o(), y("p", Ni, N(p(c).mediaLibrary.replaceWarningUsageNote.replace("{count}", n.usageInfo.template_count.toString())), 1)) : b("", !0),
5088
- O("div", Pi, [O("p", Fi, N(n.item.filename), 1)]),
5089
- O("div", Ii, [O("label", Li, N(p(c).mediaLibrary.replaceSelectFile), 1), O("input", {
5099
+ }, [O("div", Mi, [
5100
+ O("h3", Ni, N(p(c).mediaLibrary.replaceWarningTitle), 1),
5101
+ O("p", Pi, N(p(c).mediaLibrary.replaceWarningMessage.replace("{extension}", `.${g.value}`)), 1),
5102
+ C.value ? (o(), y("p", Fi, N(p(c).mediaLibrary.replaceWarningUsageNote.replace("{count}", n.usageInfo.template_count.toString())), 1)) : b("", !0),
5103
+ O("div", Ii, [O("p", Li, N(n.item.filename), 1)]),
5104
+ O("div", Ri, [O("label", zi, N(p(c).mediaLibrary.replaceSelectFile), 1), O("input", {
5090
5105
  ref_key: "fileInputRef",
5091
5106
  ref: f,
5092
5107
  type: "file",
@@ -5098,9 +5113,9 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
5098
5113
  color: "var(--tpl-text)"
5099
5114
  },
5100
5115
  onChange: E
5101
- }, null, 40, Ri)]),
5102
- n.error ? (o(), y("p", zi, N(n.error), 1)) : b("", !0),
5103
- O("div", Bi, [O("button", {
5116
+ }, null, 40, Bi)]),
5117
+ n.error ? (o(), y("p", Vi, N(n.error), 1)) : b("", !0),
5118
+ O("div", Hi, [O("button", {
5104
5119
  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",
5105
5120
  style: {
5106
5121
  "border-color": "var(--tpl-border)",
@@ -5109,29 +5124,29 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
5109
5124
  },
5110
5125
  disabled: n.isReplacing,
5111
5126
  onClick: t[0] ||= (e) => s("close")
5112
- }, N(p(c).mediaLibrary.cancel), 9, Vi), O("button", {
5127
+ }, N(p(c).mediaLibrary.cancel), 9, Ui), O("button", {
5113
5128
  class: "tpl:cursor-pointer tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:text-white tpl:transition-all tpl:duration-150 tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50",
5114
5129
  style: { background: "linear-gradient(\n 135deg,\n var(--tpl-primary),\n var(--tpl-primary-hover)\n )" },
5115
5130
  disabled: !h.value || n.isReplacing,
5116
5131
  onClick: D
5117
- }, N(n.isReplacing ? p(c).mediaLibrary.replacing : p(c).mediaLibrary.replace), 9, Hi)])
5118
- ])], 40, ki)) : b("", !0)]),
5132
+ }, N(n.isReplacing ? p(c).mediaLibrary.replacing : p(c).mediaLibrary.replace), 9, Wi)])
5133
+ ])], 40, ji)) : b("", !0)]),
5119
5134
  _: 1
5120
5135
  })], 8, ["to"]));
5121
5136
  }
5122
- }), Wi = {
5137
+ }), Ki = {
5123
5138
  key: 0,
5124
5139
  class: "tpl:flex tpl:items-center tpl:gap-2"
5125
- }, Gi = {
5140
+ }, qi = {
5126
5141
  class: "tpl:text-xs",
5127
5142
  style: { color: "var(--tpl-text-muted)" }
5128
- }, Ki = {
5143
+ }, Ji = {
5129
5144
  class: "tpl:text-xs",
5130
5145
  style: { color: "var(--tpl-text-muted)" }
5131
- }, qi = {
5146
+ }, Yi = {
5132
5147
  class: "tpl:mt-1 tpl:text-[10px]",
5133
5148
  style: { color: "var(--tpl-text-dim)" }
5134
- }, Ji = /* @__PURE__ */ d({
5149
+ }, Xi = /* @__PURE__ */ d({
5135
5150
  __name: "MediaUploadZone",
5136
5151
  props: {
5137
5152
  isUploading: { type: Boolean },
@@ -5139,7 +5154,7 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
5139
5154
  },
5140
5155
  emits: ["upload"],
5141
5156
  setup(e, { emit: t }) {
5142
- let n = t, { t: r, format: i } = z(), { allAcceptedMimeTypes: a, allAcceptedInputString: s, maxFileSize: c } = Re(), u = l();
5157
+ let n = t, { t: r, format: i } = z(), { allAcceptedMimeTypes: a, allAcceptedInputString: s, maxFileSize: c } = ze(), u = l();
5143
5158
  function d(e) {
5144
5159
  let t = [];
5145
5160
  for (let n of Array.from(e)) a.value.includes(n.type) && n.size <= c.value && t.push(n);
@@ -5166,12 +5181,12 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
5166
5181
  "background-color": "var(--tpl-bg)"
5167
5182
  },
5168
5183
  onClick: n[0] ||= (e) => p(_)()
5169
- }, [e.isUploading ? (o(), y("div", Wi, [m(p(ye), {
5184
+ }, [e.isUploading ? (o(), y("div", Ki, [m(p(ye), {
5170
5185
  class: "tpl-spinner",
5171
5186
  size: 20,
5172
5187
  "stroke-width": 2,
5173
5188
  style: { color: "var(--tpl-primary)" }
5174
- }), O("span", Gi, N(e.uploadProgress && e.uploadProgress.total > 1 ? p(i)(p(r).mediaLibrary.uploadingProgress, {
5189
+ }), O("span", qi, N(e.uploadProgress && e.uploadProgress.total > 1 ? p(i)(p(r).mediaLibrary.uploadingProgress, {
5175
5190
  current: e.uploadProgress.current,
5176
5191
  total: e.uploadProgress.total
5177
5192
  }) : p(r).mediaLibrary.uploading), 1)])) : (o(), y(M, { key: 1 }, [
@@ -5181,20 +5196,20 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
5181
5196
  "stroke-width": 1.5,
5182
5197
  style: { color: "var(--tpl-text-dim)" }
5183
5198
  }),
5184
- O("p", Ki, N(p(r).mediaLibrary.dropOrClick), 1),
5185
- O("p", qi, N(p(r).mediaLibrary.acceptedFormats), 1)
5199
+ O("p", Ji, N(p(r).mediaLibrary.dropOrClick), 1),
5200
+ O("p", Yi, N(p(r).mediaLibrary.acceptedFormats), 1)
5186
5201
  ], 64))], 2));
5187
5202
  }
5188
- }), Yi = [
5203
+ }), Zi = [
5189
5204
  "width",
5190
5205
  "height",
5191
5206
  "viewBox"
5192
- ], Xi = [
5207
+ ], Qi = [
5193
5208
  "cx",
5194
5209
  "cy",
5195
5210
  "r",
5196
5211
  "stroke-width"
5197
- ], Zi = [
5212
+ ], $i = [
5198
5213
  "cx",
5199
5214
  "cy",
5200
5215
  "r",
@@ -5202,14 +5217,14 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
5202
5217
  "stroke",
5203
5218
  "stroke-dasharray",
5204
5219
  "stroke-dashoffset"
5205
- ], Qi = {
5220
+ ], ea = {
5206
5221
  key: 0,
5207
5222
  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",
5208
5223
  style: {
5209
5224
  "background-color": "var(--tpl-text)",
5210
5225
  color: "var(--tpl-bg-elevated)"
5211
5226
  }
5212
- }, $i = /* @__PURE__ */ d({
5227
+ }, ta = /* @__PURE__ */ d({
5213
5228
  __name: "StorageProgressRing",
5214
5229
  props: {
5215
5230
  usedBytes: {},
@@ -5249,7 +5264,7 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
5249
5264
  fill: "none",
5250
5265
  "stroke-width": c.value,
5251
5266
  style: { stroke: "var(--tpl-border)" }
5252
- }, null, 8, Xi), O("circle", {
5267
+ }, null, 8, Qi), O("circle", {
5253
5268
  cx: s.value / 2,
5254
5269
  cy: s.value / 2,
5255
5270
  r: u.value,
@@ -5260,7 +5275,7 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
5260
5275
  "stroke-dasharray": d.value,
5261
5276
  "stroke-dashoffset": p.value,
5262
5277
  class: "tpl:transition-all tpl:duration-300 tpl:ease-out"
5263
- }, null, 8, Zi)], 8, Yi)), m(T, {
5278
+ }, null, 8, $i)], 8, Zi)), m(T, {
5264
5279
  "enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
5265
5280
  "enter-from-class": "tpl:opacity-0 tpl:translate-y-1",
5266
5281
  "enter-to-class": "tpl:opacity-100 tpl:translate-y-0",
@@ -5268,7 +5283,7 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
5268
5283
  "leave-from-class": "tpl:opacity-100 tpl:translate-y-0",
5269
5284
  "leave-to-class": "tpl:opacity-0 tpl:translate-y-1"
5270
5285
  }, {
5271
- default: r(() => [a.value ? (o(), y("div", Qi, [F(N(w.value) + " ", 1), t[2] ||= O("div", {
5286
+ default: r(() => [a.value ? (o(), y("div", ea, [F(N(w.value) + " ", 1), t[2] ||= O("div", {
5272
5287
  class: "tpl:absolute tpl:-top-1 tpl:left-1/2 tpl:size-2 tpl:-translate-x-1/2 tpl:rotate-45",
5273
5288
  style: { "background-color": "var(--tpl-text)" }
5274
5289
  }, null, -1)])) : b("", !0)]),
@@ -5278,7 +5293,7 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
5278
5293
  });
5279
5294
  //#endregion
5280
5295
  //#region ../media-library/src/composables/useMediaLibraryUI.ts
5281
- function ea(t) {
5296
+ function na(t) {
5282
5297
  let { library: n, translations: r } = t;
5283
5298
  function i() {
5284
5299
  return "value" in r && typeof r.value == "object" ? r.value : r;
@@ -5388,39 +5403,39 @@ function ea(t) {
5388
5403
  }
5389
5404
  //#endregion
5390
5405
  //#region ../media-library/src/i18n/index.ts
5391
- var ta = /* #__PURE__ */ Object.assign({
5406
+ var ra = /* #__PURE__ */ Object.assign({
5392
5407
  "./locales/ca.ts": () => import("./ca-CNRWAMHI.js"),
5393
5408
  "./locales/de.ts": () => import("./de-DFYCT4QU.js"),
5394
- "./locales/en.ts": () => import("./en-CwXyUb6-.js"),
5409
+ "./locales/en.ts": () => import("./en-mEKGL1PX.js"),
5395
5410
  "./locales/es.ts": () => import("./es-OgkdMZGX.js"),
5396
5411
  "./locales/fr.ts": () => import("./fr-Dswns199.js"),
5397
5412
  "./locales/nl.ts": () => import("./nl-CbcPJlrL.js"),
5398
5413
  "./locales/pt-BR.ts": () => import("./pt-BR-BibOQm-o.js")
5399
5414
  });
5400
- function na(e) {
5415
+ function ia(e) {
5401
5416
  return Object.keys(e).map((e) => e.match(/\/([^/]+)\.ts$/)?.[1]).filter((e) => !!e);
5402
5417
  }
5403
- var ra = na(ta);
5404
- function ia(e) {
5418
+ var aa = ia(ra);
5419
+ function oa(e) {
5405
5420
  return e.trim().replace(/_/g, "-").toLowerCase();
5406
5421
  }
5407
- function aa(e) {
5408
- let t = ia(e);
5409
- return ra.find((e) => ia(e) === t);
5422
+ function sa(e) {
5423
+ let t = oa(e);
5424
+ return aa.find((e) => oa(e) === t);
5410
5425
  }
5411
- function oa(e) {
5412
- return ia(e).split("-")[0];
5426
+ function ca(e) {
5427
+ return oa(e).split("-")[0];
5413
5428
  }
5414
- function sa(e) {
5415
- return aa(e) ?? aa(oa(e)) ?? "en";
5429
+ function la(e) {
5430
+ return sa(e) ?? sa(ca(e)) ?? "en";
5416
5431
  }
5417
- async function ca(e) {
5418
- let t = ta[`./locales/${sa(e)}.ts`];
5432
+ async function ua(e) {
5433
+ let t = ra[`./locales/${la(e)}.ts`];
5419
5434
  return (await t()).default;
5420
5435
  }
5421
5436
  //#endregion
5422
5437
  //#region ../media-library/src/components/MediaLibraryModal.vue?vue&type=script&setup=true&lang.ts
5423
- var la = ["data-tpl-theme"], ua = {
5438
+ var da = ["data-tpl-theme"], fa = {
5424
5439
  class: "tpl-media-modal tpl-scale-in tpl:flex tpl:flex-col tpl:overflow-hidden tpl:rounded-[var(--tpl-radius-lg)]",
5425
5440
  style: {
5426
5441
  width: "900px",
@@ -5431,59 +5446,59 @@ var la = ["data-tpl-theme"], ua = {
5431
5446
  border: "1px solid var(--tpl-border)",
5432
5447
  "box-shadow": "var(--tpl-shadow-xl)"
5433
5448
  }
5434
- }, da = {
5449
+ }, pa = {
5435
5450
  class: "tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-between tpl:border-b tpl:px-5 tpl:py-3.5",
5436
5451
  style: { "border-color": "var(--tpl-border)" }
5437
- }, fa = {
5452
+ }, ma = {
5438
5453
  class: "tpl:text-sm tpl:font-semibold",
5439
5454
  style: { color: "var(--tpl-text)" }
5440
- }, pa = { class: "tpl:flex tpl:items-center tpl:gap-3" }, ma = { class: "tpl:relative" }, ha = ["value", "placeholder"], ga = { class: "tpl:flex tpl:min-h-0 tpl:flex-1 tpl:overflow-hidden" }, _a = {
5455
+ }, ha = { class: "tpl:flex tpl:items-center tpl:gap-3" }, ga = { class: "tpl:relative" }, _a = ["value", "placeholder"], va = { class: "tpl:flex tpl:min-h-0 tpl:flex-1 tpl:overflow-hidden" }, ya = {
5441
5456
  key: 0,
5442
5457
  class: "tpl:flex tpl:w-48 tpl:shrink-0 tpl:flex-col tpl:border-r",
5443
5458
  style: {
5444
5459
  "border-color": "var(--tpl-border)",
5445
5460
  "background-color": "var(--tpl-bg)"
5446
5461
  }
5447
- }, va = { class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:flex-col" }, ya = {
5462
+ }, ba = { class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:flex-col" }, xa = {
5448
5463
  class: "tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-between tpl:border-b tpl:px-4 tpl:py-2.5",
5449
5464
  style: { "border-color": "var(--tpl-border)" }
5450
- }, ba = { class: "tpl:flex tpl:items-center tpl:gap-2" }, xa = ["title"], Sa = {
5465
+ }, Sa = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Ca = ["title"], wa = {
5451
5466
  key: 0,
5452
5467
  class: "tpl:text-xs tpl:font-medium",
5453
5468
  style: { color: "var(--tpl-text)" }
5454
- }, Ca = {
5469
+ }, Ta = {
5455
5470
  class: "tpl:flex tpl:rounded-md tpl:p-0.5",
5456
5471
  style: {
5457
5472
  border: "1px solid var(--tpl-border)",
5458
5473
  "background-color": "var(--tpl-bg)"
5459
5474
  }
5460
- }, wa = ["title"], Ta = ["title"], Ea = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Da = ["value"], Oa = { value: "" }, ka = ["value"], Aa = ["value"], ja = { value: "newest" }, Ma = { value: "oldest" }, Na = { value: "name_asc" }, Pa = { value: "name_desc" }, Fa = { value: "size_asc" }, Ia = { value: "size_desc" }, La = { class: "tpl:min-h-0 tpl:flex-1 tpl:overflow-y-auto" }, Ra = {
5475
+ }, Ea = ["title"], Da = ["title"], Oa = { class: "tpl:flex tpl:items-center tpl:gap-2" }, ka = ["value"], Aa = { value: "" }, ja = ["value"], Ma = ["value"], Na = { value: "newest" }, Pa = { value: "oldest" }, Fa = { value: "name_asc" }, Ia = { value: "name_desc" }, La = { value: "size_asc" }, Ra = { value: "size_desc" }, za = { class: "tpl:min-h-0 tpl:flex-1 tpl:overflow-y-auto" }, Ba = {
5461
5476
  key: 0,
5462
5477
  class: "tpl:px-4 tpl:pt-3"
5463
- }, za = {
5478
+ }, Va = {
5464
5479
  class: "tpl-scale-in tpl:mx-4 tpl:w-full tpl:max-w-sm tpl:rounded-[var(--tpl-radius-lg)] tpl:p-5",
5465
5480
  style: {
5466
5481
  "background-color": "var(--tpl-bg-elevated)",
5467
5482
  "box-shadow": "var(--tpl-shadow-xl)"
5468
5483
  }
5469
- }, Ba = {
5484
+ }, Ha = {
5470
5485
  class: "tpl:mb-2 tpl:text-sm tpl:font-semibold",
5471
5486
  style: { color: "var(--tpl-text)" }
5472
- }, Va = {
5487
+ }, Ua = {
5473
5488
  key: 0,
5474
5489
  class: "tpl:mb-4 tpl:text-xs",
5475
5490
  style: { color: "var(--tpl-text-muted)" }
5476
- }, Ha = {
5491
+ }, Wa = {
5477
5492
  key: 1,
5478
5493
  class: "tpl:mb-4 tpl:max-h-32 tpl:overflow-y-auto tpl:rounded tpl:border tpl:p-2",
5479
5494
  style: { "border-color": "var(--tpl-border)" }
5480
- }, Ua = { class: "tpl:font-medium" }, Wa = { style: { color: "var(--tpl-text-muted)" } }, Ga = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, Ka = {
5495
+ }, Ga = { class: "tpl:font-medium" }, Ka = { style: { color: "var(--tpl-text-muted)" } }, qa = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, Ja = {
5481
5496
  class: "tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-between tpl:border-t tpl:px-5 tpl:py-3",
5482
5497
  style: { "border-color": "var(--tpl-border)" }
5483
- }, qa = { class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:items-center tpl:gap-3" }, Ja = { class: "tpl:flex tpl:items-center tpl:gap-5" }, Ya = {
5498
+ }, Ya = { class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:items-center tpl:gap-3" }, Xa = { class: "tpl:flex tpl:items-center tpl:gap-5" }, Za = {
5484
5499
  key: 0,
5485
5500
  class: "tpl:flex tpl:items-center tpl:gap-2"
5486
- }, Xa = { class: "tpl:relative" }, Za = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Qa = ["disabled"], $a = /* @__PURE__ */ d({
5501
+ }, Qa = { class: "tpl:relative" }, $a = { class: "tpl:flex tpl:items-center tpl:gap-2" }, eo = ["disabled"], to = /* @__PURE__ */ d({
5487
5502
  __name: "MediaLibraryModal",
5488
5503
  props: {
5489
5504
  visible: { type: Boolean },
@@ -5499,16 +5514,16 @@ var la = ["data-tpl-theme"], ua = {
5499
5514
  setup(t, { emit: i }) {
5500
5515
  let a = t, s = i, u = l(null);
5501
5516
  e(() => a.locale, async (e) => {
5502
- u.value = await ca(e ?? "en");
5517
+ u.value = await ua(e ?? "en");
5503
5518
  }, { immediate: !0 }), c(Me, u);
5504
5519
  let d = v(() => u.value), f = v(() => a.uiTheme);
5505
5520
  c(Ne, f);
5506
5521
  let h = E(() => a.popoverTarget ?? null);
5507
- c(je, h), c(Ae, a.planConfig);
5508
- let x = v(() => a.planConfig.config.value?.storage.used_bytes ?? 0), D = v(() => a.planConfig.config.value?.storage.limit_bytes ?? 0), { isAcceptedMimeType: k, availableCategories: A } = Re(a.planConfig), j = ke({
5522
+ c(je, h), c(Pe, E(() => a.locale)), c(Ae, a.planConfig);
5523
+ let x = v(() => a.planConfig.config.value?.storage.used_bytes ?? 0), D = v(() => a.planConfig.config.value?.storage.limit_bytes ?? 0), { isAcceptedMimeType: k, availableCategories: A } = ze(a.planConfig), j = ke({
5509
5524
  projectId: a.projectId,
5510
5525
  authManager: a.authManager
5511
- }), P = ea({
5526
+ }), P = na({
5512
5527
  library: j,
5513
5528
  translations: d
5514
5529
  });
@@ -5544,14 +5559,14 @@ var la = ["data-tpl-theme"], ua = {
5544
5559
  "data-tpl-theme": f.value,
5545
5560
  class: "tpl tpl-media-overlay tpl:fixed tpl:inset-0 tpl:z-[9999] tpl:flex tpl:items-center tpl:justify-center tpl:p-4",
5546
5561
  onClick: i[18] ||= S((e) => s("close"), ["self"])
5547
- }, [O("div", ua, [
5548
- O("div", da, [O("h2", fa, N(d.value.mediaLibrary.title), 1), O("div", pa, [
5549
- m($i, {
5562
+ }, [O("div", fa, [
5563
+ O("div", pa, [O("h2", ma, N(d.value.mediaLibrary.title), 1), O("div", ha, [
5564
+ m(ta, {
5550
5565
  "used-bytes": x.value,
5551
5566
  "limit-bytes": D.value,
5552
5567
  size: 22
5553
5568
  }, null, 8, ["used-bytes", "limit-bytes"]),
5554
- O("div", ma, [O("input", {
5569
+ O("div", ga, [O("input", {
5555
5570
  value: p(P).searchInput.value,
5556
5571
  type: "text",
5557
5572
  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)]",
@@ -5562,7 +5577,7 @@ var la = ["data-tpl-theme"], ua = {
5562
5577
  },
5563
5578
  placeholder: d.value.mediaLibrary.searchPlaceholder,
5564
5579
  onInput: i[0] ||= (e) => p(P).handleSearchInput(e.target.value)
5565
- }, null, 40, ha), m(p(de), {
5580
+ }, null, 40, _a), m(p(fe), {
5566
5581
  class: "tpl:absolute tpl:top-1/2 tpl:left-2.5 tpl:-translate-y-1/2",
5567
5582
  size: 13,
5568
5583
  "stroke-width": 2,
@@ -5577,7 +5592,7 @@ var la = ["data-tpl-theme"], ua = {
5577
5592
  "stroke-width": 2
5578
5593
  })])
5579
5594
  ])]),
5580
- O("div", ga, [m(T, {
5595
+ O("div", va, [m(T, {
5581
5596
  "enter-active-class": "tpl:transition-all tpl:duration-200 tpl:ease-out",
5582
5597
  "enter-from-class": "tpl:-ml-48 tpl:opacity-0",
5583
5598
  "enter-to-class": "tpl:ml-0 tpl:opacity-100",
@@ -5585,7 +5600,7 @@ var la = ["data-tpl-theme"], ua = {
5585
5600
  "leave-from-class": "tpl:ml-0 tpl:opacity-100",
5586
5601
  "leave-to-class": "tpl:-ml-48 tpl:opacity-0"
5587
5602
  }, {
5588
- default: r(() => [p(P).showSidebar.value ? (o(), y("div", _a, [m(Cr, {
5603
+ default: r(() => [p(P).showSidebar.value ? (o(), y("div", ya, [m(wr, {
5589
5604
  folders: p(j).folders.value,
5590
5605
  "current-folder-id": p(j).currentFolderId.value,
5591
5606
  "view-mode": p(j).viewMode.value,
@@ -5607,7 +5622,7 @@ var la = ["data-tpl-theme"], ua = {
5607
5622
  "onShowFrequentlyUsed"
5608
5623
  ])])) : b("", !0)]),
5609
5624
  _: 1
5610
- }), O("div", va, [O("div", ya, [O("div", ba, [
5625
+ }), O("div", ba, [O("div", xa, [O("div", Sa, [
5611
5626
  O("button", {
5612
5627
  class: "tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:transition-all tpl:duration-150",
5613
5628
  style: C({
@@ -5617,11 +5632,11 @@ var la = ["data-tpl-theme"], ua = {
5617
5632
  }),
5618
5633
  title: p(P).showSidebar.value ? d.value.mediaLibrary.hideFolders : d.value.mediaLibrary.showFolders,
5619
5634
  onClick: i[2] ||= (e) => p(P).showSidebar.value = !p(P).showSidebar.value
5620
- }, [m(p(ce), {
5635
+ }, [m(p(le), {
5621
5636
  size: 16,
5622
5637
  "stroke-width": 2
5623
- })], 12, xa),
5624
- p(j).viewMode.value === "frequently-used" ? (o(), y("span", Sa, N(d.value.mediaLibrary.frequentlyUsed), 1)) : (o(), w(Le, {
5638
+ })], 12, Ca),
5639
+ p(j).viewMode.value === "frequently-used" ? (o(), y("span", wa, N(d.value.mediaLibrary.frequentlyUsed), 1)) : (o(), w(Re, {
5625
5640
  key: 1,
5626
5641
  folders: p(j).folders.value,
5627
5642
  "current-folder-id": p(j).currentFolderId.value,
@@ -5631,7 +5646,7 @@ var la = ["data-tpl-theme"], ua = {
5631
5646
  "current-folder-id",
5632
5647
  "onNavigate"
5633
5648
  ])),
5634
- O("div", Ca, [O("button", {
5649
+ O("div", Ta, [O("button", {
5635
5650
  class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:transition-all tpl:duration-150",
5636
5651
  style: C({
5637
5652
  color: p(P).layoutMode.value === "grid" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
@@ -5642,7 +5657,7 @@ var la = ["data-tpl-theme"], ua = {
5642
5657
  }, [m(p(ve), {
5643
5658
  size: 14,
5644
5659
  "stroke-width": 2
5645
- })], 12, wa), O("button", {
5660
+ })], 12, Ea), O("button", {
5646
5661
  class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:transition-all tpl:duration-150",
5647
5662
  style: C({
5648
5663
  color: p(P).layoutMode.value === "list" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
@@ -5653,8 +5668,8 @@ var la = ["data-tpl-theme"], ua = {
5653
5668
  }, [m(p(me), {
5654
5669
  size: 14,
5655
5670
  "stroke-width": 2
5656
- })], 12, Ta)])
5657
- ]), O("div", Ea, [p(A).length > 1 ? (o(), y("select", {
5671
+ })], 12, Da)])
5672
+ ]), O("div", Oa, [p(A).length > 1 ? (o(), y("select", {
5658
5673
  key: 0,
5659
5674
  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",
5660
5675
  style: {
@@ -5664,10 +5679,10 @@ var la = ["data-tpl-theme"], ua = {
5664
5679
  },
5665
5680
  value: p(j).categoryFilter.value ?? "",
5666
5681
  onChange: i[5] ||= (e) => p(j).filterByCategory(e.target.value || null)
5667
- }, [O("option", Oa, N(d.value.mediaLibrary.filterAll), 1), (o(!0), y(M, null, n(p(A), (e) => (o(), y("option", {
5682
+ }, [O("option", Aa, N(d.value.mediaLibrary.filterAll), 1), (o(!0), y(M, null, n(p(A), (e) => (o(), y("option", {
5668
5683
  key: e,
5669
5684
  value: e
5670
- }, N(p(P).getCategoryLabel(e)), 9, ka))), 128))], 40, Da)) : b("", !0), O("select", {
5685
+ }, N(p(P).getCategoryLabel(e)), 9, ja))), 128))], 40, ka)) : b("", !0), O("select", {
5671
5686
  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",
5672
5687
  style: {
5673
5688
  "border-color": "var(--tpl-border)",
@@ -5677,13 +5692,13 @@ var la = ["data-tpl-theme"], ua = {
5677
5692
  value: p(j).sortOption.value,
5678
5693
  onChange: i[6] ||= (e) => p(j).sortBy(e.target.value)
5679
5694
  }, [
5680
- O("option", ja, N(d.value.mediaLibrary.sortNewest), 1),
5681
- O("option", Ma, N(d.value.mediaLibrary.sortOldest), 1),
5682
- O("option", Na, N(d.value.mediaLibrary.sortNameAsc), 1),
5683
- O("option", Pa, N(d.value.mediaLibrary.sortNameDesc), 1),
5684
- O("option", Fa, N(d.value.mediaLibrary.sortSizeAsc), 1),
5685
- O("option", Ia, N(d.value.mediaLibrary.sortSizeDesc), 1)
5686
- ], 40, Aa)])]), O("div", La, [p(j).viewMode.value === "files" ? (o(), y("div", Ra, [m(Ji, {
5695
+ O("option", Na, N(d.value.mediaLibrary.sortNewest), 1),
5696
+ O("option", Pa, N(d.value.mediaLibrary.sortOldest), 1),
5697
+ O("option", Fa, N(d.value.mediaLibrary.sortNameAsc), 1),
5698
+ O("option", Ia, N(d.value.mediaLibrary.sortNameDesc), 1),
5699
+ O("option", La, N(d.value.mediaLibrary.sortSizeAsc), 1),
5700
+ O("option", Ra, N(d.value.mediaLibrary.sortSizeDesc), 1)
5701
+ ], 40, Ma)])]), O("div", za, [p(j).viewMode.value === "files" ? (o(), y("div", Ba, [m(Xi, {
5687
5702
  "is-uploading": p(j).isUploading.value,
5688
5703
  "upload-progress": p(j).uploadProgress.value,
5689
5704
  onUpload: p(P).handleUpload
@@ -5702,7 +5717,7 @@ var la = ["data-tpl-theme"], ua = {
5702
5717
  }, [m(p(ge), {
5703
5718
  size: 14,
5704
5719
  "stroke-width": 2
5705
- }), F(" " + N(d.value.mediaLibrary.importFromUrl), 1)])])) : b("", !0), m(ei, {
5720
+ }), F(" " + N(d.value.mediaLibrary.importFromUrl), 1)])])) : b("", !0), m(ni, {
5706
5721
  items: p(P).displayItems.value,
5707
5722
  "selected-ids": p(j).selectedItems.value,
5708
5723
  "is-loading": p(j).isLoading.value,
@@ -5727,7 +5742,7 @@ var la = ["data-tpl-theme"], ua = {
5727
5742
  "onEdit",
5728
5743
  "onReplace"
5729
5744
  ])])])]),
5730
- m(fi, {
5745
+ m(mi, {
5731
5746
  visible: p(P).showImportUrlModal.value,
5732
5747
  "is-importing": p(j).isImportingFromUrl.value,
5733
5748
  error: p(j).importFromUrlError.value,
@@ -5739,7 +5754,7 @@ var la = ["data-tpl-theme"], ua = {
5739
5754
  "error",
5740
5755
  "onImport"
5741
5756
  ]),
5742
- m(dr, {
5757
+ m(fr, {
5743
5758
  visible: !!p(P).editingItem.value,
5744
5759
  item: p(P).editingItem.value,
5745
5760
  onSave: p(P).handleEditSave,
@@ -5749,7 +5764,7 @@ var la = ["data-tpl-theme"], ua = {
5749
5764
  "item",
5750
5765
  "onSave"
5751
5766
  ]),
5752
- m(Ui, {
5767
+ m(Gi, {
5753
5768
  visible: p(j).showReplaceWarning.value,
5754
5769
  item: p(j).pendingReplaceItem.value,
5755
5770
  "usage-info": p(j).replaceUsageInfo.value,
@@ -5783,19 +5798,19 @@ var la = ["data-tpl-theme"], ua = {
5783
5798
  "-webkit-backdrop-filter": "blur(8px)"
5784
5799
  },
5785
5800
  onClick: i[12] ||= S((...e) => p(j).cancelDelete && p(j).cancelDelete(...e), ["self"])
5786
- }, [O("div", za, [
5787
- O("h3", Ba, N(d.value.mediaLibrary.deleteWarningTitle), 1),
5801
+ }, [O("div", Va, [
5802
+ O("h3", Ha, N(d.value.mediaLibrary.deleteWarningTitle), 1),
5788
5803
  O("p", {
5789
5804
  class: g(["tpl:text-xs", p(P).hasUsedFiles.value ? "tpl:mb-2" : "tpl:mb-4"]),
5790
5805
  style: { color: "var(--tpl-text-muted)" }
5791
5806
  }, N(d.value.mediaLibrary.deleteWarningMessage), 3),
5792
- p(P).hasUsedFiles.value ? (o(), y("p", Va, N(d.value.mediaLibrary.deleteWarningUsageNote), 1)) : b("", !0),
5793
- p(P).hasUsedFiles.value ? (o(), y("div", Ha, [(o(!0), y(M, null, n(p(j).deleteUsageInfo.value, (e, t) => (o(), y("div", {
5807
+ p(P).hasUsedFiles.value ? (o(), y("p", Ua, N(d.value.mediaLibrary.deleteWarningUsageNote), 1)) : b("", !0),
5808
+ p(P).hasUsedFiles.value ? (o(), y("div", Wa, [(o(!0), y(M, null, n(p(j).deleteUsageInfo.value, (e, t) => (o(), y("div", {
5794
5809
  key: t,
5795
5810
  class: "tpl:text-xs",
5796
5811
  style: { color: "var(--tpl-text)" }
5797
- }, [e.template_count > 0 ? (o(), y(M, { key: 0 }, [O("span", Ua, N(p(P).displayItems.value.find((e) => e.id === t)?.filename || t), 1), O("span", Wa, " - " + N(d.value.mediaLibrary.usedInTemplates.replace("{count}", e.template_count.toString())), 1)], 64)) : b("", !0)]))), 128))])) : b("", !0),
5798
- O("div", Ga, [O("button", {
5812
+ }, [e.template_count > 0 ? (o(), y(M, { key: 0 }, [O("span", Ga, N(p(P).displayItems.value.find((e) => e.id === t)?.filename || t), 1), O("span", Ka, " - " + N(d.value.mediaLibrary.usedInTemplates.replace("{count}", e.template_count.toString())), 1)], 64)) : b("", !0)]))), 128))])) : b("", !0),
5813
+ O("div", qa, [O("button", {
5799
5814
  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",
5800
5815
  style: {
5801
5816
  "border-color": "var(--tpl-border)",
@@ -5815,7 +5830,7 @@ var la = ["data-tpl-theme"], ua = {
5815
5830
  ])])) : b("", !0)]),
5816
5831
  _: 1
5817
5832
  }),
5818
- O("div", Ka, [O("div", qa, [p(j).previewItem.value ? (o(), w(Oi, {
5833
+ O("div", Ja, [O("div", Ya, [p(j).previewItem.value ? (o(), w(Ai, {
5819
5834
  key: 0,
5820
5835
  "selected-conversion": p(P).selectedConversion.value,
5821
5836
  "onUpdate:selectedConversion": i[13] ||= (e) => p(P).selectedConversion.value = e,
@@ -5825,7 +5840,7 @@ var la = ["data-tpl-theme"], ua = {
5825
5840
  "selected-conversion",
5826
5841
  "item",
5827
5842
  "folders"
5828
- ])) : b("", !0)]), O("div", Ja, [p(j).selectedItems.value.size > 0 ? (o(), y("div", Ya, [p(j).previewItem.value ? (o(), y("button", {
5843
+ ])) : b("", !0)]), O("div", Xa, [p(j).selectedItems.value.size > 0 ? (o(), y("div", Za, [p(j).previewItem.value ? (o(), y("button", {
5829
5844
  key: 0,
5830
5845
  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",
5831
5846
  style: C({
@@ -5834,7 +5849,7 @@ var la = ["data-tpl-theme"], ua = {
5834
5849
  backgroundColor: "var(--tpl-bg)"
5835
5850
  }),
5836
5851
  onClick: i[14] ||= (e) => p(P).copy(p(P).selectedUrl.value)
5837
- }, [p(P).copied.value ? (o(), w(p(ue), {
5852
+ }, [p(P).copied.value ? (o(), w(p(de), {
5838
5853
  key: 1,
5839
5854
  size: 12,
5840
5855
  "stroke-width": 2
@@ -5842,7 +5857,7 @@ var la = ["data-tpl-theme"], ua = {
5842
5857
  key: 0,
5843
5858
  size: 12,
5844
5859
  "stroke-width": 2
5845
- })), F(" " + N(p(P).copied.value ? d.value.mediaLibrary.copied : d.value.mediaLibrary.copyUrl), 1)], 4)) : b("", !0), O("div", Xa, [O("button", {
5860
+ })), F(" " + N(p(P).copied.value ? d.value.mediaLibrary.copied : d.value.mediaLibrary.copyUrl), 1)], 4)) : b("", !0), O("div", Qa, [O("button", {
5846
5861
  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",
5847
5862
  style: {
5848
5863
  "border-color": "var(--tpl-border)",
@@ -5850,7 +5865,7 @@ var la = ["data-tpl-theme"], ua = {
5850
5865
  "background-color": "var(--tpl-bg)"
5851
5866
  },
5852
5867
  onClick: i[15] ||= (e) => p(P).showMovePicker.value = !p(P).showMovePicker.value
5853
- }, N(d.value.mediaLibrary.moveSelected), 1), p(P).showMovePicker.value ? (o(), w(_i, {
5868
+ }, N(d.value.mediaLibrary.moveSelected), 1), p(P).showMovePicker.value ? (o(), w(yi, {
5854
5869
  key: 0,
5855
5870
  folders: p(j).folders.value,
5856
5871
  "current-folder-id": p(j).currentFolderId.value,
@@ -5860,7 +5875,7 @@ var la = ["data-tpl-theme"], ua = {
5860
5875
  "folders",
5861
5876
  "current-folder-id",
5862
5877
  "onSelect"
5863
- ])) : b("", !0)])])) : b("", !0), O("div", Za, [p(j).selectedItems.value.size > 0 ? (o(), y("button", {
5878
+ ])) : b("", !0)])])) : b("", !0), O("div", $a, [p(j).selectedItems.value.size > 0 ? (o(), y("button", {
5864
5879
  key: 0,
5865
5880
  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",
5866
5881
  style: {
@@ -5877,12 +5892,12 @@ var la = ["data-tpl-theme"], ua = {
5877
5892
  },
5878
5893
  disabled: !ne(),
5879
5894
  onClick: re
5880
- }, N(t.accept?.length ? d.value.mediaLibrary.selectImage : d.value.mediaLibrary.selectFile), 9, Qa)])])])
5881
- ])], 8, la)) : b("", !0)]),
5895
+ }, N(t.accept?.length ? d.value.mediaLibrary.selectImage : d.value.mediaLibrary.selectFile), 9, eo)])])])
5896
+ ])], 8, da)) : b("", !0)]),
5882
5897
  _: 1
5883
5898
  })], 8, ["to"]));
5884
5899
  }
5885
- }), eo = {
5900
+ }), no = {
5886
5901
  class: "tpl tpl:flex tpl:flex-col tpl:overflow-hidden tpl:rounded-[var(--tpl-radius-lg)]",
5887
5902
  style: {
5888
5903
  width: "100%",
@@ -5890,59 +5905,59 @@ var la = ["data-tpl-theme"], ua = {
5890
5905
  "background-color": "var(--tpl-bg-elevated)",
5891
5906
  border: "1px solid var(--tpl-border)"
5892
5907
  }
5893
- }, to = {
5908
+ }, ro = {
5894
5909
  class: "tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-between tpl:border-b tpl:px-5 tpl:py-3.5",
5895
5910
  style: { "border-color": "var(--tpl-border)" }
5896
- }, no = {
5911
+ }, io = {
5897
5912
  class: "tpl:text-sm tpl:font-semibold",
5898
5913
  style: { color: "var(--tpl-text)" }
5899
- }, ro = { class: "tpl:flex tpl:items-center tpl:gap-3" }, io = { class: "tpl:relative" }, ao = ["value", "placeholder"], oo = { class: "tpl:flex tpl:min-h-0 tpl:flex-1 tpl:overflow-hidden" }, so = {
5914
+ }, ao = { class: "tpl:flex tpl:items-center tpl:gap-3" }, oo = { class: "tpl:relative" }, so = ["value", "placeholder"], co = { class: "tpl:flex tpl:min-h-0 tpl:flex-1 tpl:overflow-hidden" }, lo = {
5900
5915
  key: 0,
5901
5916
  class: "tpl:flex tpl:w-48 tpl:shrink-0 tpl:flex-col tpl:border-r",
5902
5917
  style: {
5903
5918
  "border-color": "var(--tpl-border)",
5904
5919
  "background-color": "var(--tpl-bg)"
5905
5920
  }
5906
- }, co = { class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:flex-col" }, lo = {
5921
+ }, uo = { class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:flex-col" }, fo = {
5907
5922
  class: "tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-between tpl:border-b tpl:px-4 tpl:py-2.5",
5908
5923
  style: { "border-color": "var(--tpl-border)" }
5909
- }, uo = { class: "tpl:flex tpl:items-center tpl:gap-2" }, fo = ["title"], po = {
5924
+ }, po = { class: "tpl:flex tpl:items-center tpl:gap-2" }, mo = ["title"], ho = {
5910
5925
  key: 0,
5911
5926
  class: "tpl:text-xs tpl:font-medium",
5912
5927
  style: { color: "var(--tpl-text)" }
5913
- }, mo = {
5928
+ }, go = {
5914
5929
  class: "tpl:flex tpl:rounded-md tpl:p-0.5",
5915
5930
  style: {
5916
5931
  border: "1px solid var(--tpl-border)",
5917
5932
  "background-color": "var(--tpl-bg)"
5918
5933
  }
5919
- }, ho = ["title"], go = ["title"], _o = { class: "tpl:flex tpl:items-center tpl:gap-2" }, vo = ["value"], yo = { value: "" }, bo = ["value"], xo = ["value"], So = { value: "newest" }, Co = { value: "oldest" }, wo = { value: "name_asc" }, To = { value: "name_desc" }, Eo = { value: "size_asc" }, Do = { value: "size_desc" }, Oo = { class: "tpl:min-h-0 tpl:flex-1 tpl:overflow-y-auto" }, ko = {
5934
+ }, _o = ["title"], vo = ["title"], yo = { class: "tpl:flex tpl:items-center tpl:gap-2" }, bo = ["value"], xo = { value: "" }, So = ["value"], Co = ["value"], wo = { value: "newest" }, To = { value: "oldest" }, Eo = { value: "name_asc" }, Do = { value: "name_desc" }, Oo = { value: "size_asc" }, ko = { value: "size_desc" }, Ao = { class: "tpl:min-h-0 tpl:flex-1 tpl:overflow-y-auto" }, jo = {
5920
5935
  key: 0,
5921
5936
  class: "tpl:px-4 tpl:pt-3"
5922
- }, Ao = {
5937
+ }, Mo = {
5923
5938
  class: "tpl-scale-in tpl:mx-4 tpl:w-full tpl:max-w-sm tpl:rounded-[var(--tpl-radius-lg)] tpl:p-5",
5924
5939
  style: {
5925
5940
  "background-color": "var(--tpl-bg-elevated)",
5926
5941
  "box-shadow": "var(--tpl-shadow-xl)"
5927
5942
  }
5928
- }, jo = {
5943
+ }, No = {
5929
5944
  class: "tpl:mb-2 tpl:text-sm tpl:font-semibold",
5930
5945
  style: { color: "var(--tpl-text)" }
5931
- }, Mo = {
5946
+ }, Po = {
5932
5947
  key: 0,
5933
5948
  class: "tpl:mb-4 tpl:text-xs",
5934
5949
  style: { color: "var(--tpl-text-muted)" }
5935
- }, No = {
5950
+ }, Fo = {
5936
5951
  key: 1,
5937
5952
  class: "tpl:mb-4 tpl:max-h-32 tpl:overflow-y-auto tpl:rounded tpl:border tpl:p-2",
5938
5953
  style: { "border-color": "var(--tpl-border)" }
5939
- }, Po = { class: "tpl:font-medium" }, Fo = { style: { color: "var(--tpl-text-muted)" } }, Io = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, Lo = {
5954
+ }, Io = { class: "tpl:font-medium" }, Lo = { style: { color: "var(--tpl-text-muted)" } }, Ro = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, zo = {
5940
5955
  class: "tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-between tpl:border-t tpl:px-5 tpl:py-3",
5941
5956
  style: { "border-color": "var(--tpl-border)" }
5942
- }, Ro = { class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:items-center tpl:gap-3" }, zo = { class: "tpl:flex tpl:items-center tpl:gap-5" }, Bo = {
5957
+ }, Bo = { class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:items-center tpl:gap-3" }, Vo = { class: "tpl:flex tpl:items-center tpl:gap-5" }, Ho = {
5943
5958
  key: 0,
5944
5959
  class: "tpl:flex tpl:items-center tpl:gap-2"
5945
- }, Vo = { class: "tpl:relative" }, Ho = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Uo = ["disabled"], Wo = /* @__PURE__ */ d({
5960
+ }, Uo = { class: "tpl:relative" }, Wo = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Go = ["disabled"], Ko = /* @__PURE__ */ d({
5946
5961
  __name: "MediaLibrary",
5947
5962
  props: {
5948
5963
  authManager: {},
@@ -5964,11 +5979,11 @@ var la = ["data-tpl-theme"], ua = {
5964
5979
  fetchConfig: async () => {}
5965
5980
  };
5966
5981
  c(Ae, u);
5967
- let d = v(() => i.planConfig.storage.used_bytes ?? 0), f = v(() => i.planConfig.storage.limit_bytes ?? 0), { availableCategories: h } = Re(u), _ = ke({
5982
+ let d = v(() => i.planConfig.storage.used_bytes ?? 0), f = v(() => i.planConfig.storage.limit_bytes ?? 0), { availableCategories: h } = ze(u), _ = ke({
5968
5983
  projectId: i.projectId,
5969
5984
  authManager: i.authManager,
5970
5985
  onError: i.onError
5971
- }), E = ea({
5986
+ }), E = na({
5972
5987
  library: _,
5973
5988
  translations: s
5974
5989
  });
@@ -5982,12 +5997,12 @@ var la = ["data-tpl-theme"], ua = {
5982
5997
  }
5983
5998
  return x(() => {
5984
5999
  _.loadItems(), _.loadFrequentlyUsed(), a("ready");
5985
- }), (t, i) => (o(), y("div", eo, [
5986
- O("div", to, [O("h2", no, N(s.value.mediaLibrary.title), 1), O("div", ro, [m($i, {
6000
+ }), (t, i) => (o(), y("div", no, [
6001
+ O("div", ro, [O("h2", io, N(s.value.mediaLibrary.title), 1), O("div", ao, [m(ta, {
5987
6002
  "used-bytes": d.value,
5988
6003
  "limit-bytes": f.value,
5989
6004
  size: 22
5990
- }, null, 8, ["used-bytes", "limit-bytes"]), O("div", io, [O("input", {
6005
+ }, null, 8, ["used-bytes", "limit-bytes"]), O("div", oo, [O("input", {
5991
6006
  value: p(E).searchInput.value,
5992
6007
  type: "text",
5993
6008
  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)]",
@@ -5998,13 +6013,13 @@ var la = ["data-tpl-theme"], ua = {
5998
6013
  },
5999
6014
  placeholder: s.value.mediaLibrary.searchPlaceholder,
6000
6015
  onInput: i[0] ||= (e) => p(E).handleSearchInput(e.target.value)
6001
- }, null, 40, ao), m(p(de), {
6016
+ }, null, 40, so), m(p(fe), {
6002
6017
  class: "tpl:absolute tpl:top-1/2 tpl:left-2.5 tpl:-translate-y-1/2",
6003
6018
  size: 13,
6004
6019
  "stroke-width": 2,
6005
6020
  style: { color: "var(--tpl-text-dim)" }
6006
6021
  })])])]),
6007
- O("div", oo, [m(T, {
6022
+ O("div", co, [m(T, {
6008
6023
  "enter-active-class": "tpl:transition-all tpl:duration-200 tpl:ease-out",
6009
6024
  "enter-from-class": "tpl:-ml-48 tpl:opacity-0",
6010
6025
  "enter-to-class": "tpl:ml-0 tpl:opacity-100",
@@ -6012,7 +6027,7 @@ var la = ["data-tpl-theme"], ua = {
6012
6027
  "leave-from-class": "tpl:ml-0 tpl:opacity-100",
6013
6028
  "leave-to-class": "tpl:-ml-48 tpl:opacity-0"
6014
6029
  }, {
6015
- default: r(() => [p(E).showSidebar.value ? (o(), y("div", so, [m(Cr, {
6030
+ default: r(() => [p(E).showSidebar.value ? (o(), y("div", lo, [m(wr, {
6016
6031
  folders: p(_).folders.value,
6017
6032
  "current-folder-id": p(_).currentFolderId.value,
6018
6033
  "view-mode": p(_).viewMode.value,
@@ -6034,7 +6049,7 @@ var la = ["data-tpl-theme"], ua = {
6034
6049
  "onShowFrequentlyUsed"
6035
6050
  ])])) : b("", !0)]),
6036
6051
  _: 1
6037
- }), O("div", co, [O("div", lo, [O("div", uo, [
6052
+ }), O("div", uo, [O("div", fo, [O("div", po, [
6038
6053
  O("button", {
6039
6054
  class: "tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:transition-all tpl:duration-150",
6040
6055
  style: C({
@@ -6044,11 +6059,11 @@ var la = ["data-tpl-theme"], ua = {
6044
6059
  }),
6045
6060
  title: p(E).showSidebar.value ? s.value.mediaLibrary.hideFolders : s.value.mediaLibrary.showFolders,
6046
6061
  onClick: i[1] ||= (e) => p(E).showSidebar.value = !p(E).showSidebar.value
6047
- }, [m(p(ce), {
6062
+ }, [m(p(le), {
6048
6063
  size: 16,
6049
6064
  "stroke-width": 2
6050
- })], 12, fo),
6051
- p(_).viewMode.value === "frequently-used" ? (o(), y("span", po, N(s.value.mediaLibrary.frequentlyUsed), 1)) : (o(), w(Le, {
6065
+ })], 12, mo),
6066
+ p(_).viewMode.value === "frequently-used" ? (o(), y("span", ho, N(s.value.mediaLibrary.frequentlyUsed), 1)) : (o(), w(Re, {
6052
6067
  key: 1,
6053
6068
  folders: p(_).folders.value,
6054
6069
  "current-folder-id": p(_).currentFolderId.value,
@@ -6058,7 +6073,7 @@ var la = ["data-tpl-theme"], ua = {
6058
6073
  "current-folder-id",
6059
6074
  "onNavigate"
6060
6075
  ])),
6061
- O("div", mo, [O("button", {
6076
+ O("div", go, [O("button", {
6062
6077
  class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:transition-all tpl:duration-150",
6063
6078
  style: C({
6064
6079
  color: p(E).layoutMode.value === "grid" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
@@ -6069,7 +6084,7 @@ var la = ["data-tpl-theme"], ua = {
6069
6084
  }, [m(p(ve), {
6070
6085
  size: 14,
6071
6086
  "stroke-width": 2
6072
- })], 12, ho), O("button", {
6087
+ })], 12, _o), O("button", {
6073
6088
  class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:transition-all tpl:duration-150",
6074
6089
  style: C({
6075
6090
  color: p(E).layoutMode.value === "list" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
@@ -6080,8 +6095,8 @@ var la = ["data-tpl-theme"], ua = {
6080
6095
  }, [m(p(me), {
6081
6096
  size: 14,
6082
6097
  "stroke-width": 2
6083
- })], 12, go)])
6084
- ]), O("div", _o, [p(h).length > 1 ? (o(), y("select", {
6098
+ })], 12, vo)])
6099
+ ]), O("div", yo, [p(h).length > 1 ? (o(), y("select", {
6085
6100
  key: 0,
6086
6101
  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",
6087
6102
  style: {
@@ -6091,10 +6106,10 @@ var la = ["data-tpl-theme"], ua = {
6091
6106
  },
6092
6107
  value: p(_).categoryFilter.value ?? "",
6093
6108
  onChange: i[4] ||= (e) => p(_).filterByCategory(e.target.value || null)
6094
- }, [O("option", yo, N(s.value.mediaLibrary.filterAll), 1), (o(!0), y(M, null, n(p(h), (e) => (o(), y("option", {
6109
+ }, [O("option", xo, N(s.value.mediaLibrary.filterAll), 1), (o(!0), y(M, null, n(p(h), (e) => (o(), y("option", {
6095
6110
  key: e,
6096
6111
  value: e
6097
- }, N(p(E).getCategoryLabel(e)), 9, bo))), 128))], 40, vo)) : b("", !0), O("select", {
6112
+ }, N(p(E).getCategoryLabel(e)), 9, So))), 128))], 40, bo)) : b("", !0), O("select", {
6098
6113
  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",
6099
6114
  style: {
6100
6115
  "border-color": "var(--tpl-border)",
@@ -6104,13 +6119,13 @@ var la = ["data-tpl-theme"], ua = {
6104
6119
  value: p(_).sortOption.value,
6105
6120
  onChange: i[5] ||= (e) => p(_).sortBy(e.target.value)
6106
6121
  }, [
6107
- O("option", So, N(s.value.mediaLibrary.sortNewest), 1),
6108
- O("option", Co, N(s.value.mediaLibrary.sortOldest), 1),
6109
- O("option", wo, N(s.value.mediaLibrary.sortNameAsc), 1),
6110
- O("option", To, N(s.value.mediaLibrary.sortNameDesc), 1),
6111
- O("option", Eo, N(s.value.mediaLibrary.sortSizeAsc), 1),
6112
- O("option", Do, N(s.value.mediaLibrary.sortSizeDesc), 1)
6113
- ], 40, xo)])]), O("div", Oo, [p(_).viewMode.value === "files" ? (o(), y("div", ko, [m(Ji, {
6122
+ O("option", wo, N(s.value.mediaLibrary.sortNewest), 1),
6123
+ O("option", To, N(s.value.mediaLibrary.sortOldest), 1),
6124
+ O("option", Eo, N(s.value.mediaLibrary.sortNameAsc), 1),
6125
+ O("option", Do, N(s.value.mediaLibrary.sortNameDesc), 1),
6126
+ O("option", Oo, N(s.value.mediaLibrary.sortSizeAsc), 1),
6127
+ O("option", ko, N(s.value.mediaLibrary.sortSizeDesc), 1)
6128
+ ], 40, Co)])]), O("div", Ao, [p(_).viewMode.value === "files" ? (o(), y("div", jo, [m(Xi, {
6114
6129
  "is-uploading": p(_).isUploading.value,
6115
6130
  "upload-progress": p(_).uploadProgress.value,
6116
6131
  onUpload: p(E).handleUpload
@@ -6129,7 +6144,7 @@ var la = ["data-tpl-theme"], ua = {
6129
6144
  }, [m(p(ge), {
6130
6145
  size: 14,
6131
6146
  "stroke-width": 2
6132
- }), F(" " + N(s.value.mediaLibrary.importFromUrl), 1)])])) : b("", !0), m(ei, {
6147
+ }), F(" " + N(s.value.mediaLibrary.importFromUrl), 1)])])) : b("", !0), m(ni, {
6133
6148
  items: p(E).displayItems.value,
6134
6149
  "selected-ids": p(_).selectedItems.value,
6135
6150
  "is-loading": p(_).isLoading.value,
@@ -6152,7 +6167,7 @@ var la = ["data-tpl-theme"], ua = {
6152
6167
  "onEdit",
6153
6168
  "onReplace"
6154
6169
  ])])])]),
6155
- m(fi, {
6170
+ m(mi, {
6156
6171
  visible: p(E).showImportUrlModal.value,
6157
6172
  "is-importing": p(_).isImportingFromUrl.value,
6158
6173
  error: p(_).importFromUrlError.value,
@@ -6164,7 +6179,7 @@ var la = ["data-tpl-theme"], ua = {
6164
6179
  "error",
6165
6180
  "onImport"
6166
6181
  ]),
6167
- m(dr, {
6182
+ m(fr, {
6168
6183
  visible: !!p(E).editingItem.value,
6169
6184
  item: p(E).editingItem.value,
6170
6185
  onSave: p(E).handleEditSave,
@@ -6174,7 +6189,7 @@ var la = ["data-tpl-theme"], ua = {
6174
6189
  "item",
6175
6190
  "onSave"
6176
6191
  ]),
6177
- m(Ui, {
6192
+ m(Gi, {
6178
6193
  visible: p(_).showReplaceWarning.value,
6179
6194
  item: p(_).pendingReplaceItem.value,
6180
6195
  "usage-info": p(_).replaceUsageInfo.value,
@@ -6208,19 +6223,19 @@ var la = ["data-tpl-theme"], ua = {
6208
6223
  "-webkit-backdrop-filter": "blur(8px)"
6209
6224
  },
6210
6225
  onClick: i[11] ||= S((...e) => p(_).cancelDelete && p(_).cancelDelete(...e), ["self"])
6211
- }, [O("div", Ao, [
6212
- O("h3", jo, N(s.value.mediaLibrary.deleteWarningTitle), 1),
6226
+ }, [O("div", Mo, [
6227
+ O("h3", No, N(s.value.mediaLibrary.deleteWarningTitle), 1),
6213
6228
  O("p", {
6214
6229
  class: g(["tpl:text-xs", p(E).hasUsedFiles.value ? "tpl:mb-2" : "tpl:mb-4"]),
6215
6230
  style: { color: "var(--tpl-text-muted)" }
6216
6231
  }, N(s.value.mediaLibrary.deleteWarningMessage), 3),
6217
- p(E).hasUsedFiles.value ? (o(), y("p", Mo, N(s.value.mediaLibrary.deleteWarningUsageNote), 1)) : b("", !0),
6218
- p(E).hasUsedFiles.value ? (o(), y("div", No, [(o(!0), y(M, null, n(p(_).deleteUsageInfo.value, (e, t) => (o(), y("div", {
6232
+ p(E).hasUsedFiles.value ? (o(), y("p", Po, N(s.value.mediaLibrary.deleteWarningUsageNote), 1)) : b("", !0),
6233
+ p(E).hasUsedFiles.value ? (o(), y("div", Fo, [(o(!0), y(M, null, n(p(_).deleteUsageInfo.value, (e, t) => (o(), y("div", {
6219
6234
  key: t,
6220
6235
  class: "tpl:text-xs",
6221
6236
  style: { color: "var(--tpl-text)" }
6222
- }, [e.template_count > 0 ? (o(), y(M, { key: 0 }, [O("span", Po, N(p(E).displayItems.value.find((e) => e.id === t)?.filename || t), 1), O("span", Fo, " - " + N(s.value.mediaLibrary.usedInTemplates.replace("{count}", e.template_count.toString())), 1)], 64)) : b("", !0)]))), 128))])) : b("", !0),
6223
- O("div", Io, [O("button", {
6237
+ }, [e.template_count > 0 ? (o(), y(M, { key: 0 }, [O("span", Io, N(p(E).displayItems.value.find((e) => e.id === t)?.filename || t), 1), O("span", Lo, " - " + N(s.value.mediaLibrary.usedInTemplates.replace("{count}", e.template_count.toString())), 1)], 64)) : b("", !0)]))), 128))])) : b("", !0),
6238
+ O("div", Ro, [O("button", {
6224
6239
  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",
6225
6240
  style: {
6226
6241
  "border-color": "var(--tpl-border)",
@@ -6240,7 +6255,7 @@ var la = ["data-tpl-theme"], ua = {
6240
6255
  ])])) : b("", !0)]),
6241
6256
  _: 1
6242
6257
  }),
6243
- O("div", Lo, [O("div", Ro, [p(_).previewItem.value ? (o(), w(Oi, {
6258
+ O("div", zo, [O("div", Bo, [p(_).previewItem.value ? (o(), w(Ai, {
6244
6259
  key: 0,
6245
6260
  "selected-conversion": p(E).selectedConversion.value,
6246
6261
  "onUpdate:selectedConversion": i[12] ||= (e) => p(E).selectedConversion.value = e,
@@ -6250,7 +6265,7 @@ var la = ["data-tpl-theme"], ua = {
6250
6265
  "selected-conversion",
6251
6266
  "item",
6252
6267
  "folders"
6253
- ])) : b("", !0)]), O("div", zo, [p(_).selectedItems.value.size > 0 ? (o(), y("div", Bo, [p(_).previewItem.value ? (o(), y("button", {
6268
+ ])) : b("", !0)]), O("div", Vo, [p(_).selectedItems.value.size > 0 ? (o(), y("div", Ho, [p(_).previewItem.value ? (o(), y("button", {
6254
6269
  key: 0,
6255
6270
  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",
6256
6271
  style: C({
@@ -6259,7 +6274,7 @@ var la = ["data-tpl-theme"], ua = {
6259
6274
  backgroundColor: "var(--tpl-bg)"
6260
6275
  }),
6261
6276
  onClick: i[13] ||= (e) => p(E).copy(p(E).selectedUrl.value)
6262
- }, [p(E).copied.value ? (o(), w(p(ue), {
6277
+ }, [p(E).copied.value ? (o(), w(p(de), {
6263
6278
  key: 1,
6264
6279
  size: 12,
6265
6280
  "stroke-width": 2
@@ -6267,7 +6282,7 @@ var la = ["data-tpl-theme"], ua = {
6267
6282
  key: 0,
6268
6283
  size: 12,
6269
6284
  "stroke-width": 2
6270
- })), F(" " + N(p(E).copied.value ? s.value.mediaLibrary.copied : s.value.mediaLibrary.copyUrl), 1)], 4)) : b("", !0), O("div", Vo, [O("button", {
6285
+ })), F(" " + N(p(E).copied.value ? s.value.mediaLibrary.copied : s.value.mediaLibrary.copyUrl), 1)], 4)) : b("", !0), O("div", Uo, [O("button", {
6271
6286
  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",
6272
6287
  style: {
6273
6288
  "border-color": "var(--tpl-border)",
@@ -6275,7 +6290,7 @@ var la = ["data-tpl-theme"], ua = {
6275
6290
  "background-color": "var(--tpl-bg)"
6276
6291
  },
6277
6292
  onClick: i[14] ||= (e) => p(E).showMovePicker.value = !p(E).showMovePicker.value
6278
- }, N(s.value.mediaLibrary.moveSelected), 1), p(E).showMovePicker.value ? (o(), w(_i, {
6293
+ }, N(s.value.mediaLibrary.moveSelected), 1), p(E).showMovePicker.value ? (o(), w(yi, {
6279
6294
  key: 0,
6280
6295
  folders: p(_).folders.value,
6281
6296
  "current-folder-id": p(_).currentFolderId.value,
@@ -6285,7 +6300,7 @@ var la = ["data-tpl-theme"], ua = {
6285
6300
  "folders",
6286
6301
  "current-folder-id",
6287
6302
  "onSelect"
6288
- ])) : b("", !0)])])) : b("", !0), O("div", Ho, [p(_).selectedItems.value.size > 0 ? (o(), y("button", {
6303
+ ])) : b("", !0)])])) : b("", !0), O("div", Wo, [p(_).selectedItems.value.size > 0 ? (o(), y("button", {
6289
6304
  key: 0,
6290
6305
  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",
6291
6306
  style: {
@@ -6303,52 +6318,52 @@ var la = ["data-tpl-theme"], ua = {
6303
6318
  },
6304
6319
  disabled: !p(_).previewItem.value,
6305
6320
  onClick: D
6306
- }, N(s.value.mediaLibrary.selectFile), 9, Uo)) : b("", !0)])])])
6321
+ }, N(s.value.mediaLibrary.selectFile), 9, Go)) : b("", !0)])])])
6307
6322
  ]));
6308
6323
  }
6309
- }), Go = null, Ko = l(null);
6310
- async function qo(e) {
6324
+ }), qo = null, Jo = l(null);
6325
+ async function Yo(e) {
6311
6326
  let t = typeof e.container == "string" ? document.querySelector(e.container) : e.container;
6312
6327
  if (!t) throw Error(`Container element not found: ${e.container}`);
6313
6328
  let n = Te(e.auth, e.onError);
6314
6329
  await n.initialize();
6315
- let r = await new Ee(n).fetchConfig(), i = await ca(e.locale ?? "en");
6316
- return Yo(t, e.theme), Go && Jo(), new Promise((a, o) => {
6330
+ let r = await new Ee(n).fetchConfig(), i = await ua(e.locale ?? "en");
6331
+ return Zo(t, e.theme), qo && Xo(), new Promise((a, o) => {
6317
6332
  try {
6318
- Go = A({ setup() {
6333
+ qo = A({ setup() {
6319
6334
  let o = () => {
6320
6335
  a({
6321
- setTheme: (e) => Yo(t, e),
6322
- unmount: Jo
6336
+ setTheme: (e) => Zo(t, e),
6337
+ unmount: Xo
6323
6338
  });
6324
6339
  };
6325
- return () => P(Wo, {
6340
+ return () => P(Ko, {
6326
6341
  authManager: n,
6327
6342
  projectId: n.projectId,
6328
6343
  planConfig: r,
6329
6344
  translations: i,
6330
6345
  onSelect: e.onSelect,
6331
6346
  onError: e.onError,
6332
- ref: Ko,
6347
+ ref: Jo,
6333
6348
  onReady: o
6334
6349
  });
6335
- } }), Go.mount(t);
6350
+ } }), qo.mount(t);
6336
6351
  } catch (e) {
6337
6352
  o(e);
6338
6353
  }
6339
6354
  });
6340
6355
  }
6341
- function Jo() {
6342
- Go && (Go.unmount(), Go = null, Ko.value = null);
6356
+ function Xo() {
6357
+ qo && (qo.unmount(), qo = null, Jo.value = null);
6343
6358
  }
6344
- function Yo(e, t) {
6359
+ function Zo(e, t) {
6345
6360
  t && (t.primaryColor && e.style.setProperty("--tpl-primary", t.primaryColor), t.borderRadius !== void 0 && (e.style.setProperty("--tpl-radius", `${t.borderRadius}px`), e.style.setProperty("--tpl-radius-sm", `${Math.max(0, t.borderRadius - 3)}px`), e.style.setProperty("--tpl-radius-lg", `${t.borderRadius + 4}px`)));
6346
6361
  }
6347
6362
  typeof window < "u" && (window.TemplaticalMedia = {
6348
- init: qo,
6349
- unmount: Jo
6363
+ init: Yo,
6364
+ unmount: Xo
6350
6365
  });
6351
6366
  //#endregion
6352
- export { Oe as MediaApiClient, $a as MediaLibraryModal, De as t };
6367
+ export { Oe as MediaApiClient, to as MediaLibraryModal, De as t };
6353
6368
 
6354
- //# sourceMappingURL=src-65H3RNcb.js.map
6369
+ //# sourceMappingURL=src-Cxl-9O-L.js.map