@templatical/editor 0.24.0 → 0.25.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.
- package/dist/{AiChatSidebar-Nq-jrGaf.js → AiChatSidebar-CIkS8DsO.js} +15 -15
- package/dist/{AiFeatureMenu-tg_zMKMK.js → AiFeatureMenu-Cji1LBJJ.js} +7 -7
- package/dist/{BlockIssueBadge-Bd94kIiw.js → BlockIssueBadge-BQiT0FML.js} +5 -5
- package/dist/{BlockPreviewCanvas-B34aMhHe.js → BlockPreviewCanvas-DAnwZofk.js} +11 -7
- package/dist/{CloudEditor-DjN_9Yso.js → CloudEditor-CXaft6Ej.js} +73 -71
- package/dist/{CollaboratorBar-Bhazzcg-.js → CollaboratorBar-BR-rL2wG.js} +4 -4
- package/dist/{ColorPicker-DXGrcJxJ.js → ColorPicker-B4ArSUhy.js} +7 -9
- package/dist/{CommentsSidebar-ku1kt10u.js → CommentsSidebar-Bm5GLDts.js} +16 -16
- package/dist/{CountdownBlock-CN9Lc23W.js → CountdownBlock-CIVAQDVu.js} +3 -3
- package/dist/{CountdownToolbar-VEsIyKV6.js → CountdownToolbar-DBmb3tlb.js} +4 -4
- package/dist/DesignReferenceSidebar-CnyJ8L-j.js +264 -0
- package/dist/{IssuesPanel-CEfzOpS_.js → IssuesPanel-D3XgmYCt.js} +8 -8
- package/dist/{LoadingTrack-KIcREPlS.js → LoadingTrack-XK_eeUdq.js} +1 -1
- package/dist/{MergeTagModeToggle-C3V2xGAg.js → MergeTagModeToggle-BK0fI3P2.js} +6 -6
- package/dist/{MergeTagSuggestion-Dn8ww9nV.js → MergeTagSuggestion-D0OHRv7L.js} +8 -12
- package/dist/{NumberWithSuffix-BGocZkj9.js → NumberWithSuffix-Cjj9UNIp.js} +2 -2
- package/dist/{ParagraphEditor-D-fz0kUb.js → ParagraphEditor-jGnbJEA2.js} +45 -45
- package/dist/{RichTextEditorContent-DydrqFts.js → RichTextEditorContent-DaaKdzjb.js} +8 -8
- package/dist/{SaveBlockDialog-BDDFbAWF.js → SaveBlockDialog-B3ngEldp.js} +12 -12
- package/dist/{SavedBlocksBrowserModal-Djik_fJh.js → SavedBlocksBrowserModal-DawN3XaB.js} +11 -11
- package/dist/{SavedBlocksPanels-CxemyPxL.js → SavedBlocksPanels-eDC9Y46N.js} +2 -2
- package/dist/{SavedBlocksPickBar-Dlhipmob.js → SavedBlocksPickBar-CQbbXmzj.js} +4 -4
- package/dist/{SnapshotHistory-DPbM4ons.js → SnapshotHistory-COxKtHM-.js} +10 -10
- package/dist/{TemplateScoringPanel-BFYgweDX.js → TemplateScoringPanel-bUuqOO1z.js} +16 -16
- package/dist/{TestEmailModal-IZfwgya-.js → TestEmailModal-CytkbZVQ.js} +89 -58
- package/dist/{TestEmailPanel-QEEx_PkN.js → TestEmailPanel-CHUY7VZn.js} +2 -2
- package/dist/{TitleEditor-BB4YlIBF.js → TitleEditor-aMR1bOyY.js} +13 -13
- package/dist/TplModal-fmYNYdyp.js +49 -0
- package/dist/{blockTypeIcons-Wzd7W_2x.js → blockTypeIcons-C6b9rg88.js} +26 -26
- package/dist/bundle-stats.json +6 -6
- package/dist/{ca-CO4nq6TX.js → ca-8Dvbwo50.js} +5 -0
- package/dist/cdn/chunks/{AiChatSidebar-CN-0DIuA.js → AiChatSidebar-bkBKpNgE.js} +9 -9
- package/dist/cdn/chunks/{AiChatSidebar-CN-0DIuA.js.map → AiChatSidebar-bkBKpNgE.js.map} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-B5pV6Iux.js → AiFeatureMenu-CI4SYTq2.js} +6 -6
- package/dist/cdn/chunks/{AiFeatureMenu-B5pV6Iux.js.map → AiFeatureMenu-CI4SYTq2.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-aanOjeyi.js → BlockIssueBadge-CRnx8Dv9.js} +5 -5
- package/dist/cdn/chunks/{BlockIssueBadge-aanOjeyi.js.map → BlockIssueBadge-CRnx8Dv9.js.map} +1 -1
- package/dist/cdn/chunks/{BlockPreviewCanvas-Dc4F4HzY.js → BlockPreviewCanvas-CXCWhqbp.js} +13 -9
- package/dist/cdn/chunks/BlockPreviewCanvas-CXCWhqbp.js.map +1 -0
- package/dist/cdn/chunks/{CloudEditor-CeKaWWO5.js → CloudEditor-D-t7RyDh.js} +67 -65
- package/dist/cdn/chunks/CloudEditor-D-t7RyDh.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-CEdKr0A2.js → CollaboratorBar-DcXYo47v.js} +5 -5
- package/dist/cdn/chunks/{CollaboratorBar-CEdKr0A2.js.map → CollaboratorBar-DcXYo47v.js.map} +1 -1
- package/dist/cdn/chunks/{ColorPicker-BckwEfcN.js → ColorPicker-_1O7YU2z.js} +8 -10
- package/dist/cdn/chunks/{ColorPicker-BckwEfcN.js.map → ColorPicker-_1O7YU2z.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-6PfpJKh-.js → CommentsSidebar-BEgLBYX-.js} +7 -7
- package/dist/cdn/chunks/{CommentsSidebar-6PfpJKh-.js.map → CommentsSidebar-BEgLBYX-.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-CoBmvQKv.js → CountdownBlock-CPnQA44g.js} +4 -4
- package/dist/cdn/chunks/{CountdownBlock-CoBmvQKv.js.map → CountdownBlock-CPnQA44g.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-CdV8RTQu.js → CountdownToolbar-Cdo-30U4.js} +5 -5
- package/dist/cdn/chunks/{CountdownToolbar-CdV8RTQu.js.map → CountdownToolbar-Cdo-30U4.js.map} +1 -1
- package/dist/cdn/chunks/DesignReferenceSidebar-DPqBr-ut.js +223 -0
- package/dist/cdn/chunks/{DesignReferenceSidebar-BjlaP69l.js.map → DesignReferenceSidebar-DPqBr-ut.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-CkkEnhxZ.js → IssuesPanel-DoQWb23r.js} +5 -5
- package/dist/cdn/chunks/{IssuesPanel-CkkEnhxZ.js.map → IssuesPanel-DoQWb23r.js.map} +1 -1
- package/dist/cdn/chunks/{LoadingTrack-D-CW2tUa.js → LoadingTrack-G2tuXqCJ.js} +2 -2
- package/dist/cdn/chunks/{LoadingTrack-D-CW2tUa.js.map → LoadingTrack-G2tuXqCJ.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-DmtR300G.js → MergeTagModeToggle-CWuVC3MU.js} +6 -6
- package/dist/cdn/chunks/{MergeTagModeToggle-DmtR300G.js.map → MergeTagModeToggle-CWuVC3MU.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagSuggestion-Cvlkw_PM.js → MergeTagSuggestion-Ces5Ua78.js} +3 -3
- package/dist/cdn/chunks/{MergeTagSuggestion-Cvlkw_PM.js.map → MergeTagSuggestion-Ces5Ua78.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-BOcMN26z.js → NumberWithSuffix-DQ4sgvt5.js} +3 -3
- package/dist/cdn/chunks/{NumberWithSuffix-BOcMN26z.js.map → NumberWithSuffix-DQ4sgvt5.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-CX1yks4N.js → ParagraphEditor-Uv5LPF3W.js} +131 -131
- package/dist/cdn/chunks/{ParagraphEditor-CX1yks4N.js.map → ParagraphEditor-Uv5LPF3W.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-z9s7qxs3.js → RichTextEditorContent-Bt3s09qY.js} +7 -7
- package/dist/cdn/chunks/{RichTextEditorContent-z9s7qxs3.js.map → RichTextEditorContent-Bt3s09qY.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-D2CtW4lC.js → SaveBlockDialog-BAew6EFd.js} +10 -10
- package/dist/cdn/chunks/{SaveBlockDialog-D2CtW4lC.js.map → SaveBlockDialog-BAew6EFd.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-DdUKJzzF.js → SavedBlocksBrowserModal-Dn4IJDJW.js} +9 -9
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-DdUKJzzF.js.map → SavedBlocksBrowserModal-Dn4IJDJW.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-1kVbqdpc.js → SavedBlocksPanels-B62U5DYW.js} +3 -3
- package/dist/cdn/chunks/{SavedBlocksPanels-1kVbqdpc.js.map → SavedBlocksPanels-B62U5DYW.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar--noDJIyN.js → SavedBlocksPickBar-CyRKZg2T.js} +5 -5
- package/dist/cdn/chunks/{SavedBlocksPickBar--noDJIyN.js.map → SavedBlocksPickBar-CyRKZg2T.js.map} +1 -1
- package/dist/cdn/chunks/{SnapshotHistory-DFuNJRc9.js → SnapshotHistory-QQt0DKey.js} +7 -7
- package/dist/cdn/chunks/{SnapshotHistory-DFuNJRc9.js.map → SnapshotHistory-QQt0DKey.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateScoringPanel-DG1dAjQk.js → TemplateScoringPanel-BwyCMcit.js} +67 -67
- package/dist/cdn/chunks/{TemplateScoringPanel-DG1dAjQk.js.map → TemplateScoringPanel-BwyCMcit.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-CiPfOn2v.js → TestEmailModal-B5UQkDJp.js} +89 -58
- package/dist/cdn/chunks/TestEmailModal-B5UQkDJp.js.map +1 -0
- package/dist/cdn/chunks/{TestEmailPanel-saOfnpjz.js → TestEmailPanel-CvuBq4RA.js} +3 -3
- package/dist/cdn/chunks/{TestEmailPanel-saOfnpjz.js.map → TestEmailPanel-CvuBq4RA.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-08KM_VzZ.js → TitleEditor-B9W954u9.js} +13 -13
- package/dist/cdn/chunks/{TitleEditor-08KM_VzZ.js.map → TitleEditor-B9W954u9.js.map} +1 -1
- package/dist/cdn/chunks/TplModal-B8UsvWc8.js +50 -0
- package/dist/cdn/chunks/TplModal-B8UsvWc8.js.map +1 -0
- package/dist/cdn/chunks/{blockTypeIcons-DvohkXqi.js → blockTypeIcons-B8s3_ahs.js} +2 -2
- package/dist/cdn/chunks/{blockTypeIcons-DvohkXqi.js.map → blockTypeIcons-B8s3_ahs.js.map} +1 -1
- package/dist/cdn/chunks/{ca-CO4nq6TX.js → ca-8Dvbwo50.js} +6 -1
- package/dist/cdn/chunks/{ca-CO4nq6TX.js.map → ca-8Dvbwo50.js.map} +1 -1
- package/dist/cdn/chunks/{cloud-C2I0P9qj.js → cloud-DOaGUdR0.js} +13 -17
- package/dist/cdn/chunks/{cloud-C2I0P9qj.js.map → cloud-DOaGUdR0.js.map} +1 -1
- package/dist/{de-CUeaFJph.js → cdn/chunks/de-CieSMCUp.js} +7 -0
- package/dist/cdn/chunks/{de-CUeaFJph.js.map → de-CieSMCUp.js.map} +1 -1
- package/dist/cdn/chunks/{dist-CxTt8FRE.js → dist-B8AX9np4.js} +16 -12
- package/dist/cdn/chunks/dist-B8AX9np4.js.map +1 -0
- package/dist/cdn/chunks/{dist-CiBEt0VR.js → dist-lZgXNk4G.js} +36 -20
- package/dist/cdn/chunks/dist-lZgXNk4G.js.map +1 -0
- package/dist/cdn/chunks/{draggable-D840DIZB.js → draggable-JcMTNF3U.js} +14 -15
- package/dist/cdn/chunks/{draggable-D840DIZB.js.map → draggable-JcMTNF3U.js.map} +1 -1
- package/dist/{en-zCYIPAL5.js → cdn/chunks/en-D0t_2Fq_.js} +7 -0
- package/dist/cdn/chunks/{en-zCYIPAL5.js.map → en-D0t_2Fq_.js.map} +1 -1
- package/dist/cdn/chunks/{es-BSiH7YkP.js → es-DwDoNuLM.js} +6 -1
- package/dist/cdn/chunks/{es-BSiH7YkP.js.map → es-DwDoNuLM.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-DBWF_lxx.js → extensions-5jgtarD-.js} +30 -26
- package/dist/cdn/chunks/{extensions-DBWF_lxx.js.map → extensions-5jgtarD-.js.map} +1 -1
- package/dist/{fr-DTVJ3det.js → cdn/chunks/fr-CSEEzv1_.js} +7 -0
- package/dist/cdn/chunks/{fr-DTVJ3det.js.map → fr-CSEEzv1_.js.map} +1 -1
- package/dist/cdn/chunks/{htmlparser-CZa2V5cF.js → htmlparser-CPhs2cYE.js} +3 -5
- package/dist/cdn/chunks/{htmlparser-CZa2V5cF.js.map → htmlparser-CPhs2cYE.js.map} +1 -1
- package/dist/cdn/chunks/{icons-Cqxvwgz7.js → icons-Cp4ZIJw-.js} +31 -31
- package/dist/cdn/chunks/{icons-Cqxvwgz7.js.map → icons-Cp4ZIJw-.js.map} +1 -1
- package/dist/cdn/chunks/keys-BxPCfHBH.js +12 -0
- package/dist/cdn/chunks/keys-BxPCfHBH.js.map +1 -0
- package/dist/cdn/chunks/{liquid.browser-BJOEu6Cg.js → liquid.browser-CZaQe87t.js} +756 -718
- package/dist/cdn/chunks/liquid.browser-CZaQe87t.js.map +1 -0
- package/dist/cdn/chunks/{nl-BqSquFS3.js → nl-xyk1T2mA.js} +6 -1
- package/dist/cdn/chunks/{nl-BqSquFS3.js.map → nl-xyk1T2mA.js.map} +1 -1
- package/dist/{pt-BR-CMljK37h.js → cdn/chunks/pt-BR-yr6uOJgn.js} +7 -0
- package/dist/cdn/chunks/{pt-BR-CMljK37h.js.map → pt-BR-yr6uOJgn.js.map} +1 -1
- package/dist/cdn/chunks/{pusher-R0v5p99W.js → pusher-kUlkqMvR.js} +21 -28
- package/dist/cdn/chunks/{pusher-R0v5p99W.js.map → pusher-kUlkqMvR.js.map} +1 -1
- package/dist/cdn/chunks/{rolldown-runtime-Dqa2HsxW.js → rolldown-runtime-B0aSnxlc.js} +2 -2
- package/dist/cdn/chunks/{src-YVsPFLNJ.js → src-B8W42vT-.js} +153 -153
- package/dist/cdn/chunks/{src-YVsPFLNJ.js.map → src-B8W42vT-.js.map} +1 -1
- package/dist/cdn/chunks/{src-C45kfA2t.js → src-C417zeUg.js} +22 -26
- package/dist/cdn/chunks/{src-C45kfA2t.js.map → src-C417zeUg.js.map} +1 -1
- package/dist/cdn/chunks/{src-BCJna-6p.js → src-CZjSXPYq.js} +9 -4
- package/dist/cdn/chunks/src-CZjSXPYq.js.map +1 -0
- package/dist/cdn/chunks/{src-XQmI_Xs1.js → src-Dpj0x27M.js} +523 -787
- package/dist/cdn/chunks/{src-XQmI_Xs1.js.map → src-Dpj0x27M.js.map} +1 -1
- package/dist/cdn/chunks/{styles-BohMfIBd.js → styles-DANwMzW2.js} +770 -751
- package/dist/cdn/chunks/styles-DANwMzW2.js.map +1 -0
- package/dist/cdn/chunks/timeouts-SsLMC4a3.js +6 -0
- package/dist/cdn/chunks/{timeouts-Bmi_yePw.js.map → timeouts-SsLMC4a3.js.map} +1 -1
- package/dist/cdn/chunks/{tiptap-DRKu__AX.js → tiptap-rsib432n.js} +132 -119
- package/dist/cdn/chunks/tiptap-rsib432n.js.map +1 -0
- package/dist/cdn/chunks/{useAliveFlag-aanU8uqB.js → useAliveFlag-CseYNikC.js} +2 -2
- package/dist/cdn/chunks/{useAliveFlag-aanU8uqB.js.map → useAliveFlag-CseYNikC.js.map} +1 -1
- package/dist/cdn/chunks/{useCloudI18n-Bem8DUjH.js → useCloudI18n-CjVzv11v.js} +3 -3
- package/dist/cdn/chunks/{useCloudI18n-Bem8DUjH.js.map → useCloudI18n-CjVzv11v.js.map} +1 -1
- package/dist/cdn/chunks/{useEditorCore-B_vwuKdI.js → useEditorCore-DfW-thCr.js} +484 -411
- package/dist/cdn/chunks/useEditorCore-DfW-thCr.js.map +1 -0
- package/dist/cdn/chunks/{useI18n-graz19nI.js → useI18n-DniEFeIl.js} +3 -3
- package/dist/cdn/chunks/{useI18n-graz19nI.js.map → useI18n-DniEFeIl.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-rTzAFMlr.js → useMergeTag-Bk9_f5cc.js} +7 -7
- package/dist/cdn/chunks/{useMergeTag-rTzAFMlr.js.map → useMergeTag-Bk9_f5cc.js.map} +1 -1
- package/dist/cdn/chunks/{usePopoverPosition-BaFxLP3w.js → usePopoverPosition-C4xFJCJ2.js} +3 -3
- package/dist/cdn/chunks/{usePopoverPosition-BaFxLP3w.js.map → usePopoverPosition-C4xFJCJ2.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +24 -22
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-BpQDKiPz.js → check-CIhIDh4h.js} +1 -1
- package/dist/{chevron-down-j8GrdTyz.js → chevron-down-CZ0m6G3s.js} +1 -1
- package/dist/{chevron-up-BACyVhyC.js → chevron-up-BH_tJLeb.js} +1 -1
- package/dist/{circle-alert-CgtE46ND.js → circle-alert-DkEXnGPV.js} +1 -1
- package/dist/{clock-BzKLLW5L.js → clock-BDIJZUET.js} +1 -1
- package/dist/{cloud-DsUct4Zq.js → cloud-BZn3jqoL.js} +10 -14
- package/dist/{createLucideIcon-JWHwTI6N.js → createLucideIcon-AEltGIse.js} +3 -3
- package/dist/{cdn/chunks/de-CUeaFJph.js → de-CieSMCUp.js} +5 -2
- package/dist/{dist-BAkGuPYm.js → dist-B6Px6GPj.js} +1 -1
- package/dist/{dist-9uhI32Q4.js → dist-BxbTVeY0.js} +1 -1
- package/dist/{dist-DWu9QWFl.js → dist-CIqhVQ1O.js} +5 -5
- package/dist/{dist-DPHqs0Yh.js → dist-CQ0fVBQ3.js} +8 -3
- package/dist/{dist-CkCVlKj_.js → dist-CRH880TV.js} +1 -1
- package/dist/{dist-ByJVlKWy.js → dist-CcQFPJMF.js} +116 -100
- package/dist/{dist-JXOq1hib.js → dist-CkPvZCld.js} +1 -1
- package/dist/{dist-IGetXrbO.js → dist-DSIgxp0v.js} +1 -1
- package/dist/{dist-DYv_Pttj.js → dist-DT1XnEnj.js} +33 -17
- package/dist/{dist-C_kAE1sC.js → dist-DX4x6mQ1.js} +3 -3
- package/dist/{dist-DFO896yT.js → dist-Dx71pluS.js} +16 -11
- package/dist/{dist-CQiAZlTt.js → dist-DyCHUyRR.js} +1 -1
- package/dist/{dist-BIYm-U9x.js → dist-iCEDH3cC.js} +1 -1
- package/dist/{dist-C5tigvDF.js → dist-nR6mxyqI.js} +1 -1
- package/dist/{cdn/chunks/en-zCYIPAL5.js → en-D0t_2Fq_.js} +5 -2
- package/dist/{es-BSiH7YkP.js → es-DwDoNuLM.js} +5 -0
- package/dist/{extensions-C0DXnYdA.js → extensions-BjvyU9Ea.js} +16 -12
- package/dist/{cdn/chunks/fr-DTVJ3det.js → fr-CSEEzv1_.js} +5 -2
- package/dist/{image-up-CQdtq8ge.js → image-up-8ktdYdaZ.js} +1 -1
- package/dist/index.d.ts +26 -0
- package/dist/{info-BUJBXoE6.js → info-CvrCgTLH.js} +1 -1
- package/dist/keys-BFPiNAIn.js +10 -0
- package/dist/{liquid.browser-DZLtv26k.js → liquid.browser-BECWFL5Z.js} +755 -717
- package/dist/{list-checks-BGHaCSD5.js → list-checks-yzGT93ZL.js} +1 -1
- package/dist/{loader-circle-C-Z6kgI6.js → loader-circle-B6euendB.js} +1 -1
- package/dist/{message-circle-CEm5qckV.js → message-circle-BMldLVcA.js} +1 -1
- package/dist/{nl-BqSquFS3.js → nl-xyk1T2mA.js} +5 -0
- package/dist/{pencil-DdwmkKLb.js → pencil-CkKkSd6N.js} +1 -1
- package/dist/{cdn/chunks/pt-BR-CMljK37h.js → pt-BR-yr6uOJgn.js} +5 -2
- package/dist/{refresh-cw-maKlg0dl.js → refresh-cw-fBPgB97G.js} +1 -1
- package/dist/{runtime-dom.esm-bundler-GdMI8WqG.js → runtime-dom.esm-bundler-CBbDt7sw.js} +2 -2
- package/dist/{scan-line-BFgesTOY.js → scan-line-CRoEOUiK.js} +1 -1
- package/dist/{send-B70aQDrA.js → send-B9Tt2qBi.js} +1 -1
- package/dist/{shield-check-B7x5OKt5.js → shield-check-QfZkYeIo.js} +1 -1
- package/dist/{sparkles-DVlm1Ipp.js → sparkles-8UeMmZb8.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{styles-BTTD0Je4.js → styles-C9GM-bBC.js} +913 -894
- package/dist/templatical-editor.js +96 -94
- package/dist/{text-align-start-Vay3Kvo2.js → text-align-start-Dn8uIheW.js} +1 -1
- package/dist/{trash-2-DE8CmxAG.js → trash-2-DDyvqj0E.js} +1 -1
- package/dist/{triangle-alert-Djg6IG8N.js → triangle-alert-B3PydLzl.js} +1 -1
- package/dist/{upload-BwwE0U6G.js → upload-hE8ItfyG.js} +2 -2
- package/dist/{useAliveFlag-C43EhZFY.js → useAliveFlag-AfoTE_AY.js} +1 -1
- package/dist/{useCloudI18n-DGr3b2SX.js → useCloudI18n-B2lItQ6O.js} +2 -2
- package/dist/{useEditorCore-DOrGex_t.js → useEditorCore-Ck_hBiGA.js} +986 -915
- package/dist/{useI18n-BhAejA-x.js → useI18n-C1KcdX_K.js} +2 -2
- package/dist/{useMergeTag-Ce95YIOO.js → useMergeTag-DHCwRMfH.js} +4 -4
- package/dist/{usePopoverPosition-vjKJaqJf.js → usePopoverPosition-ClnEh_Cp.js} +13 -13
- package/dist/{vue.runtime.esm-bundler-B0xoGkDv.js → vue.runtime.esm-bundler-Xpz-L9Fn.js} +27 -22
- package/dist/{x-CkD6A1iB.js → x-C4lETLDx.js} +1 -1
- package/package.json +12 -12
- package/dist/DesignReferenceSidebar-C4pTMzQE.js +0 -264
- package/dist/TplModal-DPH4vV8M.js +0 -49
- package/dist/cdn/chunks/BlockPreviewCanvas-Dc4F4HzY.js.map +0 -1
- package/dist/cdn/chunks/CloudEditor-CeKaWWO5.js.map +0 -1
- package/dist/cdn/chunks/DesignReferenceSidebar-BjlaP69l.js +0 -223
- package/dist/cdn/chunks/TestEmailModal-CiPfOn2v.js.map +0 -1
- package/dist/cdn/chunks/TplModal-Cu4tBBnF.js +0 -50
- package/dist/cdn/chunks/TplModal-Cu4tBBnF.js.map +0 -1
- package/dist/cdn/chunks/dist-CiBEt0VR.js.map +0 -1
- package/dist/cdn/chunks/dist-CxTt8FRE.js.map +0 -1
- package/dist/cdn/chunks/keys-B5uoP9P7.js +0 -12
- package/dist/cdn/chunks/keys-B5uoP9P7.js.map +0 -1
- package/dist/cdn/chunks/liquid.browser-BJOEu6Cg.js.map +0 -1
- package/dist/cdn/chunks/src-BCJna-6p.js.map +0 -1
- package/dist/cdn/chunks/styles-BohMfIBd.js.map +0 -1
- package/dist/cdn/chunks/timeouts-Bmi_yePw.js +0 -6
- package/dist/cdn/chunks/tiptap-DRKu__AX.js.map +0 -1
- package/dist/cdn/chunks/useEditorCore-B_vwuKdI.js.map +0 -1
- package/dist/keys-BVlG5Ozc.js +0 -10
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { A as e, C as t, D as n, F as r, H as i, I as a, K as o, L as s, M as c, N as l, P as u, T as d, V as f, Z as p, c as m, ct as h, d as g, f as _, g as v, h as y, it as b, l as x, m as S, n as C, o as w, ot as T, p as E, r as D, s as O, st as k, tt as ee, u as A, v as j, x as M, y as N, z as te } from "./draggable-
|
|
2
|
-
import { h as ne } from "./dist-
|
|
3
|
-
import { a as re, n as ie, o as
|
|
4
|
-
import { It as
|
|
1
|
+
import { A as e, C as t, D as n, F as r, H as i, I as a, K as o, L as s, M as c, N as l, P as u, T as d, V as f, Z as p, c as m, ct as h, d as g, f as _, g as v, h as y, it as b, l as x, m as S, n as C, o as w, ot as T, p as E, r as D, s as O, st as k, tt as ee, u as A, v as j, x as M, y as N, z as te } from "./draggable-JcMTNF3U.js";
|
|
2
|
+
import { h as ne } from "./dist-lZgXNk4G.js";
|
|
3
|
+
import { a as re, n as ie, o as ae, r as P, s as F, t as oe } from "./dist-B8AX9np4.js";
|
|
4
|
+
import { It as I, J as se, K as L, N as ce, Nt as le, S as ue, Tt as de, U as fe, at as pe, bt as me, ct as he, d as ge, gt as _e, it as ve, n as ye, s as be, yt as xe, z as Se } from "./icons-Cp4ZIJw-.js";
|
|
5
5
|
import { t as Ce } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
6
|
-
import { S as R, b as we, w as Te, x as z } from "./cloud-
|
|
6
|
+
import { S as R, b as we, w as Te, x as z } from "./cloud-DOaGUdR0.js";
|
|
7
7
|
//#region ../media-library/src/api-client.ts
|
|
8
8
|
var Ee = class {
|
|
9
9
|
authManager;
|
|
@@ -218,7 +218,7 @@ function De(e) {
|
|
|
218
218
|
a.value = "files", i.value = e, o.value = "", h.value = /* @__PURE__ */ new Set(), g.value = null, await k();
|
|
219
219
|
}
|
|
220
220
|
async function te() {
|
|
221
|
-
a.value = "frequently-used", i.value = null, o.value = "", h.value = /* @__PURE__ */ new Set(), g.value = null, await
|
|
221
|
+
a.value = "frequently-used", i.value = null, o.value = "", h.value = /* @__PURE__ */ new Set(), g.value = null, await F();
|
|
222
222
|
}
|
|
223
223
|
async function ne(r) {
|
|
224
224
|
u.value = !0;
|
|
@@ -265,7 +265,7 @@ function De(e) {
|
|
|
265
265
|
e.onError?.(t);
|
|
266
266
|
}
|
|
267
267
|
}
|
|
268
|
-
async function
|
|
268
|
+
async function ae(r, i, a) {
|
|
269
269
|
try {
|
|
270
270
|
let e = await t.updateMedia(r, i, a);
|
|
271
271
|
n.value = n.value.map((t) => t.id === r ? e : t), g.value?.id === r && (g.value = e);
|
|
@@ -273,21 +273,21 @@ function De(e) {
|
|
|
273
273
|
e.onError?.(t);
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
|
-
async function
|
|
276
|
+
async function P() {
|
|
277
277
|
if (h.value.size !== 0) try {
|
|
278
278
|
await t.deleteMedia([...h.value]), n.value = n.value.filter((e) => !h.value.has(e.id)), _.value = _.value.filter((e) => !h.value.has(e.id)), h.value = /* @__PURE__ */ new Set(), g.value = null;
|
|
279
279
|
} catch (t) {
|
|
280
280
|
e.onError?.(t);
|
|
281
281
|
}
|
|
282
282
|
}
|
|
283
|
-
async function
|
|
283
|
+
async function F() {
|
|
284
284
|
try {
|
|
285
285
|
_.value = await t.getFrequentlyUsed();
|
|
286
286
|
} catch (t) {
|
|
287
287
|
e.onError?.(t);
|
|
288
288
|
}
|
|
289
289
|
}
|
|
290
|
-
async function
|
|
290
|
+
async function oe() {
|
|
291
291
|
if (h.value.size === 0) return !1;
|
|
292
292
|
b.value = [...h.value];
|
|
293
293
|
try {
|
|
@@ -299,17 +299,17 @@ function De(e) {
|
|
|
299
299
|
return e.onError?.(t), !1;
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
|
-
async function
|
|
302
|
+
async function I() {
|
|
303
303
|
if (y.value = !1, b.value.length !== 0) try {
|
|
304
304
|
await t.deleteMedia(b.value), n.value = n.value.filter((e) => !b.value.includes(e.id)), _.value = _.value.filter((e) => !b.value.includes(e.id)), h.value = /* @__PURE__ */ new Set(), g.value = null, b.value = [], v.value = {};
|
|
305
305
|
} catch (t) {
|
|
306
306
|
e.onError?.(t);
|
|
307
307
|
}
|
|
308
308
|
}
|
|
309
|
-
function
|
|
309
|
+
function se() {
|
|
310
310
|
y.value = !1, b.value = [], v.value = {};
|
|
311
311
|
}
|
|
312
|
-
async function
|
|
312
|
+
async function L(r) {
|
|
313
313
|
x.value = !0, S.value = null;
|
|
314
314
|
try {
|
|
315
315
|
let e = await t.importFromUrl(r, i.value);
|
|
@@ -429,11 +429,11 @@ function De(e) {
|
|
|
429
429
|
uploadFile: ne,
|
|
430
430
|
uploadFiles: re,
|
|
431
431
|
moveSelected: ie,
|
|
432
|
-
updateFile:
|
|
433
|
-
deleteSelected:
|
|
432
|
+
updateFile: ae,
|
|
433
|
+
deleteSelected: P,
|
|
434
434
|
isImportingFromUrl: x,
|
|
435
435
|
importFromUrlError: S,
|
|
436
|
-
importFromUrl:
|
|
436
|
+
importFromUrl: L,
|
|
437
437
|
toggleSelection: ce,
|
|
438
438
|
clearSelection: le,
|
|
439
439
|
selectItem: ue,
|
|
@@ -442,10 +442,10 @@ function De(e) {
|
|
|
442
442
|
renameFolder: me,
|
|
443
443
|
deleteFolder: he,
|
|
444
444
|
findFolderInTree: pe,
|
|
445
|
-
loadFrequentlyUsed:
|
|
446
|
-
checkUsageBeforeDelete:
|
|
447
|
-
confirmDelete:
|
|
448
|
-
cancelDelete:
|
|
445
|
+
loadFrequentlyUsed: F,
|
|
446
|
+
checkUsageBeforeDelete: oe,
|
|
447
|
+
confirmDelete: I,
|
|
448
|
+
cancelDelete: se,
|
|
449
449
|
isReplacing: C,
|
|
450
450
|
replaceError: w,
|
|
451
451
|
showReplaceWarning: T,
|
|
@@ -764,7 +764,7 @@ function Qe(e) {
|
|
|
764
764
|
function $e(e, t, n) {
|
|
765
765
|
var r = {};
|
|
766
766
|
return Qe(e) ? (Object.keys(t).forEach((function(i) {
|
|
767
|
-
K(e[i]) ?
|
|
767
|
+
r[i] = K(e[i]) ? t[i] : Qe(t[i]) ? Qe(e[i]) ? $e(e[i], t[i], n[i]) : e[i] ? t[i] : n[i] : !0 === t[i] || !1 === t[i] ? !!e[i] : e[i];
|
|
768
768
|
})), r) : e ? t : n;
|
|
769
769
|
}
|
|
770
770
|
function et(e) {
|
|
@@ -2083,64 +2083,7 @@ function mn(e) {
|
|
|
2083
2083
|
return null;
|
|
2084
2084
|
}
|
|
2085
2085
|
}
|
|
2086
|
-
|
|
2087
|
-
name: "PreviewResult",
|
|
2088
|
-
props: {
|
|
2089
|
-
image: { type: Object },
|
|
2090
|
-
transitions: { type: Object },
|
|
2091
|
-
stencilCoordinates: {
|
|
2092
|
-
type: Object,
|
|
2093
|
-
default: function() {
|
|
2094
|
-
return {
|
|
2095
|
-
width: 0,
|
|
2096
|
-
height: 0,
|
|
2097
|
-
left: 0,
|
|
2098
|
-
top: 0
|
|
2099
|
-
};
|
|
2100
|
-
}
|
|
2101
|
-
},
|
|
2102
|
-
imageClass: { type: String }
|
|
2103
|
-
},
|
|
2104
|
-
computed: {
|
|
2105
|
-
classes: function() {
|
|
2106
|
-
return {
|
|
2107
|
-
root: hn(),
|
|
2108
|
-
wrapper: hn("wrapper"),
|
|
2109
|
-
imageWrapper: hn("image-wrapper"),
|
|
2110
|
-
image: U(hn("image"), this.imageClass)
|
|
2111
|
-
};
|
|
2112
|
-
},
|
|
2113
|
-
wrapperStyle: function() {
|
|
2114
|
-
var e = {
|
|
2115
|
-
width: `${this.stencilCoordinates.width}px`,
|
|
2116
|
-
height: `${this.stencilCoordinates.height}px`,
|
|
2117
|
-
left: `calc(50% - ${this.stencilCoordinates.width / 2}px)`,
|
|
2118
|
-
top: `calc(50% - ${this.stencilCoordinates.height / 2}px)`
|
|
2119
|
-
};
|
|
2120
|
-
return this.transitions && this.transitions.enabled && (e.transition = `${this.transitions.time}ms ${this.transitions.timingFunction}`), e;
|
|
2121
|
-
},
|
|
2122
|
-
imageStyle: function() {
|
|
2123
|
-
var e = this.image.transforms, t = Dt({
|
|
2124
|
-
width: this.image.width,
|
|
2125
|
-
height: this.image.height
|
|
2126
|
-
}, e.rotate), n = {
|
|
2127
|
-
width: `${this.image.width}px`,
|
|
2128
|
-
height: `${this.image.height}px`,
|
|
2129
|
-
left: "0px",
|
|
2130
|
-
top: "0px"
|
|
2131
|
-
}, r = {
|
|
2132
|
-
left: (this.image.width - t.width) * e.scaleX / 2,
|
|
2133
|
-
top: (this.image.height - t.height) * e.scaleY / 2
|
|
2134
|
-
}, i = {
|
|
2135
|
-
left: (1 - e.scaleX) * this.image.width / 2,
|
|
2136
|
-
top: (1 - e.scaleY) * this.image.height / 2
|
|
2137
|
-
};
|
|
2138
|
-
return n.transform = `translate(
|
|
2139
|
-
${-this.stencilCoordinates.left - e.translateX - r.left - i.left}px,${-this.stencilCoordinates.top - e.translateY - r.top - i.top}px) ` + pn(e), this.transitions && this.transitions.enabled && (n.transition = `${this.transitions.time}ms ${this.transitions.timingFunction}`), n;
|
|
2140
|
-
}
|
|
2141
|
-
}
|
|
2142
|
-
};
|
|
2143
|
-
function _n(e, t) {
|
|
2086
|
+
function hn(e, t) {
|
|
2144
2087
|
var n = t.getBoundingClientRect(), r = n.left, i = n.top, a = {
|
|
2145
2088
|
left: 0,
|
|
2146
2089
|
top: 0
|
|
@@ -2161,19 +2104,7 @@ function _n(e, t) {
|
|
|
2161
2104
|
count: e.length
|
|
2162
2105
|
};
|
|
2163
2106
|
}
|
|
2164
|
-
gn
|
|
2165
|
-
return c(), S("div", { class: a.classes.root }, [N("div", {
|
|
2166
|
-
ref: "wrapper",
|
|
2167
|
-
class: a.classes.wrapper,
|
|
2168
|
-
style: a.wrapperStyle
|
|
2169
|
-
}, [N("img", {
|
|
2170
|
-
ref: "image",
|
|
2171
|
-
src: n.image.src,
|
|
2172
|
-
class: a.classes.image,
|
|
2173
|
-
style: a.imageStyle
|
|
2174
|
-
}, null, 14, ["src"])], 6)], 2);
|
|
2175
|
-
};
|
|
2176
|
-
var vn = {
|
|
2107
|
+
var gn = {
|
|
2177
2108
|
props: {
|
|
2178
2109
|
touchMove: {
|
|
2179
2110
|
type: Boolean,
|
|
@@ -2213,7 +2144,7 @@ var vn = {
|
|
|
2213
2144
|
top: this.touches[0].clientY - t[0].clientY
|
|
2214
2145
|
}));
|
|
2215
2146
|
else if (this.touches.length > 1 && this.touchResize) {
|
|
2216
|
-
var n =
|
|
2147
|
+
var n = hn(t, this.$refs.container), r = this.oldGeometricProperties;
|
|
2217
2148
|
r.count === n.count && r.count > 1 && this.$emit("resize", new it({
|
|
2218
2149
|
left: r.centerMass.left - n.centerMass.left,
|
|
2219
2150
|
top: r.centerMass.top - n.centerMass.top
|
|
@@ -2239,7 +2170,7 @@ var vn = {
|
|
|
2239
2170
|
var t = this.$refs.container, n = t.getBoundingClientRect(), r = n.left, i = n.top, a = n.bottom, o = n.right;
|
|
2240
2171
|
this.touches = Ve(e.touches).filter((function(e) {
|
|
2241
2172
|
return e.clientX > r && e.clientX < o && e.clientY > i && e.clientY < a;
|
|
2242
|
-
})), this.oldGeometricProperties =
|
|
2173
|
+
})), this.oldGeometricProperties = hn(this.touches, t);
|
|
2243
2174
|
}
|
|
2244
2175
|
},
|
|
2245
2176
|
onTouchEnd: function(e) {
|
|
@@ -2295,7 +2226,7 @@ var vn = {
|
|
|
2295
2226
|
"transform-end"
|
|
2296
2227
|
]
|
|
2297
2228
|
};
|
|
2298
|
-
|
|
2229
|
+
gn.render = function(e, t, n, i, a, o) {
|
|
2299
2230
|
return c(), S("div", {
|
|
2300
2231
|
ref: "container",
|
|
2301
2232
|
onTouchstart: t[1] ||= function() {
|
|
@@ -2309,8 +2240,8 @@ vn.render = function(e, t, n, i, a, o) {
|
|
|
2309
2240
|
}
|
|
2310
2241
|
}, [r(e.$slots, "default")], 544);
|
|
2311
2242
|
};
|
|
2312
|
-
var
|
|
2313
|
-
components: { TransformableImage:
|
|
2243
|
+
var _n = {
|
|
2244
|
+
components: { TransformableImage: gn },
|
|
2314
2245
|
props: {
|
|
2315
2246
|
touchMove: {
|
|
2316
2247
|
type: Boolean,
|
|
@@ -2331,7 +2262,7 @@ var yn = {
|
|
|
2331
2262
|
},
|
|
2332
2263
|
emits: ["resize", "move"]
|
|
2333
2264
|
};
|
|
2334
|
-
|
|
2265
|
+
_n.render = function(e, t, n, i, o, s) {
|
|
2335
2266
|
var l = a("transformable-image");
|
|
2336
2267
|
return c(), S(l, {
|
|
2337
2268
|
"touch-move": n.touchMove,
|
|
@@ -2356,7 +2287,7 @@ yn.render = function(e, t, n, i, o, s) {
|
|
|
2356
2287
|
"wheel-resize"
|
|
2357
2288
|
]);
|
|
2358
2289
|
};
|
|
2359
|
-
var
|
|
2290
|
+
var vn = W("vue-preview"), yn = {
|
|
2360
2291
|
props: {
|
|
2361
2292
|
coordinates: { type: Object },
|
|
2362
2293
|
transitions: { type: Object },
|
|
@@ -2386,10 +2317,10 @@ var bn = W("vue-preview"), xn = {
|
|
|
2386
2317
|
computed: {
|
|
2387
2318
|
classes: function() {
|
|
2388
2319
|
return {
|
|
2389
|
-
root:
|
|
2390
|
-
wrapper:
|
|
2391
|
-
imageWrapper:
|
|
2392
|
-
image: U(
|
|
2320
|
+
root: vn({ fill: this.fill }),
|
|
2321
|
+
wrapper: vn("wrapper"),
|
|
2322
|
+
imageWrapper: vn("image-wrapper"),
|
|
2323
|
+
image: U(vn("image"), this.imageClass)
|
|
2393
2324
|
};
|
|
2394
2325
|
},
|
|
2395
2326
|
style: function() {
|
|
@@ -2480,7 +2411,7 @@ var bn = W("vue-preview"), xn = {
|
|
|
2480
2411
|
}
|
|
2481
2412
|
}
|
|
2482
2413
|
};
|
|
2483
|
-
|
|
2414
|
+
yn.render = function(e, t, n, r, a, o) {
|
|
2484
2415
|
return c(), S("div", {
|
|
2485
2416
|
ref: "root",
|
|
2486
2417
|
class: o.classes.root,
|
|
@@ -2496,18 +2427,18 @@ xn.render = function(e, t, n, r, a, o) {
|
|
|
2496
2427
|
style: o.imageStyle
|
|
2497
2428
|
}, null, 14, ["src"]), [[O, n.image && n.image.src]])], 6)], 6);
|
|
2498
2429
|
};
|
|
2499
|
-
var
|
|
2500
|
-
components: { Preview:
|
|
2430
|
+
var bn = {
|
|
2431
|
+
components: { Preview: yn },
|
|
2501
2432
|
inheritAttrs: !1
|
|
2502
2433
|
};
|
|
2503
|
-
|
|
2434
|
+
bn.render = function(e, t, r, i, o, s) {
|
|
2504
2435
|
var l = a("preview");
|
|
2505
2436
|
return c(), S(l, n(e.$attrs, { fill: !0 }), null, 16);
|
|
2506
2437
|
};
|
|
2507
|
-
var
|
|
2438
|
+
var xn = W("vue-rectangle-stencil"), Sn = {
|
|
2508
2439
|
name: "RectangleStencil",
|
|
2509
2440
|
components: {
|
|
2510
|
-
StencilPreview:
|
|
2441
|
+
StencilPreview: bn,
|
|
2511
2442
|
BoundingBox: cn,
|
|
2512
2443
|
DraggableArea: un
|
|
2513
2444
|
},
|
|
@@ -2579,13 +2510,13 @@ var Cn = W("vue-rectangle-stencil"), wn = {
|
|
|
2579
2510
|
computed: {
|
|
2580
2511
|
classes: function() {
|
|
2581
2512
|
return {
|
|
2582
|
-
stencil: U(
|
|
2513
|
+
stencil: U(xn({
|
|
2583
2514
|
movable: this.movable,
|
|
2584
2515
|
moving: this.moving,
|
|
2585
2516
|
resizing: this.resizing
|
|
2586
2517
|
}), this.moving && this.movingClass, this.resizing && this.resizingClass),
|
|
2587
|
-
preview: U(
|
|
2588
|
-
boundingBox: U(
|
|
2518
|
+
preview: U(xn("preview"), this.previewClass),
|
|
2519
|
+
boundingBox: U(xn("bounding-box"), this.boundingBoxClass)
|
|
2589
2520
|
};
|
|
2590
2521
|
},
|
|
2591
2522
|
style: function() {
|
|
@@ -2624,204 +2555,7 @@ var Cn = W("vue-rectangle-stencil"), wn = {
|
|
|
2624
2555
|
"move-end"
|
|
2625
2556
|
]
|
|
2626
2557
|
};
|
|
2627
|
-
|
|
2628
|
-
var s = a("stencil-preview"), l = a("draggable-area"), u = a("bounding-box");
|
|
2629
|
-
return c(), S("div", {
|
|
2630
|
-
class: o.classes.stencil,
|
|
2631
|
-
style: o.style
|
|
2632
|
-
}, [N(u, {
|
|
2633
|
-
width: n.stencilCoordinates.width,
|
|
2634
|
-
height: n.stencilCoordinates.height,
|
|
2635
|
-
transitions: n.transitions,
|
|
2636
|
-
class: o.classes.boundingBox,
|
|
2637
|
-
handlers: n.handlers,
|
|
2638
|
-
"handlers-component": n.handlersComponent,
|
|
2639
|
-
"handlers-classes": n.handlersClasses,
|
|
2640
|
-
"handlers-wrappers-classes": n.handlersWrappersClasses,
|
|
2641
|
-
lines: n.lines,
|
|
2642
|
-
"lines-component": n.linesComponent,
|
|
2643
|
-
"lines-classes": n.linesClasses,
|
|
2644
|
-
"lines-wrappers-classes": n.linesWrappersClasses,
|
|
2645
|
-
resizable: n.resizable,
|
|
2646
|
-
onResize: o.onResize,
|
|
2647
|
-
onResizeEnd: o.onResizeEnd
|
|
2648
|
-
}, {
|
|
2649
|
-
default: f((function() {
|
|
2650
|
-
return [N(l, {
|
|
2651
|
-
movable: n.movable,
|
|
2652
|
-
onMove: o.onMove,
|
|
2653
|
-
onMoveEnd: o.onMoveEnd
|
|
2654
|
-
}, {
|
|
2655
|
-
default: f((function() {
|
|
2656
|
-
return [N(s, {
|
|
2657
|
-
image: n.image,
|
|
2658
|
-
coordinates: n.coordinates,
|
|
2659
|
-
width: n.stencilCoordinates.width,
|
|
2660
|
-
height: n.stencilCoordinates.height,
|
|
2661
|
-
class: o.classes.preview,
|
|
2662
|
-
transitions: n.transitions
|
|
2663
|
-
}, null, 8, [
|
|
2664
|
-
"image",
|
|
2665
|
-
"coordinates",
|
|
2666
|
-
"width",
|
|
2667
|
-
"height",
|
|
2668
|
-
"class",
|
|
2669
|
-
"transitions"
|
|
2670
|
-
])];
|
|
2671
|
-
})),
|
|
2672
|
-
_: 1
|
|
2673
|
-
}, 8, [
|
|
2674
|
-
"movable",
|
|
2675
|
-
"onMove",
|
|
2676
|
-
"onMoveEnd"
|
|
2677
|
-
])];
|
|
2678
|
-
})),
|
|
2679
|
-
_: 1
|
|
2680
|
-
}, 8, [
|
|
2681
|
-
"width",
|
|
2682
|
-
"height",
|
|
2683
|
-
"transitions",
|
|
2684
|
-
"class",
|
|
2685
|
-
"handlers",
|
|
2686
|
-
"handlers-component",
|
|
2687
|
-
"handlers-classes",
|
|
2688
|
-
"handlers-wrappers-classes",
|
|
2689
|
-
"lines",
|
|
2690
|
-
"lines-component",
|
|
2691
|
-
"lines-classes",
|
|
2692
|
-
"lines-wrappers-classes",
|
|
2693
|
-
"resizable",
|
|
2694
|
-
"onResize",
|
|
2695
|
-
"onResizeEnd"
|
|
2696
|
-
])], 6);
|
|
2697
|
-
};
|
|
2698
|
-
var Tn = W("vue-circle-stencil"), En = {
|
|
2699
|
-
components: {
|
|
2700
|
-
StencilPreview: Sn,
|
|
2701
|
-
BoundingBox: cn,
|
|
2702
|
-
DraggableArea: un
|
|
2703
|
-
},
|
|
2704
|
-
props: {
|
|
2705
|
-
image: { type: Object },
|
|
2706
|
-
coordinates: { type: Object },
|
|
2707
|
-
stencilCoordinates: { type: Object },
|
|
2708
|
-
handlers: {
|
|
2709
|
-
type: Object,
|
|
2710
|
-
default: function() {
|
|
2711
|
-
return {
|
|
2712
|
-
eastNorth: !0,
|
|
2713
|
-
westNorth: !0,
|
|
2714
|
-
westSouth: !0,
|
|
2715
|
-
eastSouth: !0
|
|
2716
|
-
};
|
|
2717
|
-
}
|
|
2718
|
-
},
|
|
2719
|
-
handlersComponent: {
|
|
2720
|
-
type: [Object, String],
|
|
2721
|
-
default: function() {
|
|
2722
|
-
return en;
|
|
2723
|
-
}
|
|
2724
|
-
},
|
|
2725
|
-
handlersClasses: {
|
|
2726
|
-
type: Object,
|
|
2727
|
-
default: function() {
|
|
2728
|
-
return {};
|
|
2729
|
-
}
|
|
2730
|
-
},
|
|
2731
|
-
handlersWrappersClasses: {
|
|
2732
|
-
type: Object,
|
|
2733
|
-
default: function() {
|
|
2734
|
-
return {};
|
|
2735
|
-
}
|
|
2736
|
-
},
|
|
2737
|
-
lines: { type: Object },
|
|
2738
|
-
linesComponent: {
|
|
2739
|
-
type: [Object, String],
|
|
2740
|
-
default: function() {
|
|
2741
|
-
return rn;
|
|
2742
|
-
}
|
|
2743
|
-
},
|
|
2744
|
-
linesClasses: {
|
|
2745
|
-
type: Object,
|
|
2746
|
-
default: function() {
|
|
2747
|
-
return {};
|
|
2748
|
-
}
|
|
2749
|
-
},
|
|
2750
|
-
linesWrappersClasses: {
|
|
2751
|
-
type: Object,
|
|
2752
|
-
default: function() {
|
|
2753
|
-
return {};
|
|
2754
|
-
}
|
|
2755
|
-
},
|
|
2756
|
-
movable: {
|
|
2757
|
-
type: Boolean,
|
|
2758
|
-
default: !0
|
|
2759
|
-
},
|
|
2760
|
-
resizable: {
|
|
2761
|
-
type: Boolean,
|
|
2762
|
-
default: !0
|
|
2763
|
-
},
|
|
2764
|
-
transitions: { type: Object },
|
|
2765
|
-
movingClass: { type: String },
|
|
2766
|
-
resizingClass: { type: String },
|
|
2767
|
-
previewClass: { type: String },
|
|
2768
|
-
boundingBoxClass: { type: String }
|
|
2769
|
-
},
|
|
2770
|
-
data: function() {
|
|
2771
|
-
return {
|
|
2772
|
-
moving: !1,
|
|
2773
|
-
resizing: !1
|
|
2774
|
-
};
|
|
2775
|
-
},
|
|
2776
|
-
computed: {
|
|
2777
|
-
classes: function() {
|
|
2778
|
-
return {
|
|
2779
|
-
stencil: U(Tn({
|
|
2780
|
-
movable: this.movable,
|
|
2781
|
-
moving: this.moving,
|
|
2782
|
-
resizing: this.resizing
|
|
2783
|
-
}), this.moving && this.movingClass, this.resizing && this.resizingClass),
|
|
2784
|
-
preview: U(Tn("preview"), this.previewClass),
|
|
2785
|
-
boundingBox: U(Tn("bounding-box"), this.boundingBoxClass)
|
|
2786
|
-
};
|
|
2787
|
-
},
|
|
2788
|
-
style: function() {
|
|
2789
|
-
var e = this.stencilCoordinates, t = e.height, n = e.width, r = e.left, i = e.top, a = {
|
|
2790
|
-
width: `${n}px`,
|
|
2791
|
-
height: `${t}px`,
|
|
2792
|
-
transform: `translate(${r}px, ${i}px)`
|
|
2793
|
-
};
|
|
2794
|
-
return this.transitions && this.transitions.enabled && (a.transition = `${this.transitions.time}ms ${this.transitions.timingFunction}`), a;
|
|
2795
|
-
}
|
|
2796
|
-
},
|
|
2797
|
-
methods: {
|
|
2798
|
-
onMove: function(e) {
|
|
2799
|
-
this.$emit("move", e), this.moving = !0;
|
|
2800
|
-
},
|
|
2801
|
-
onMoveEnd: function() {
|
|
2802
|
-
this.$emit("move-end"), this.moving = !1;
|
|
2803
|
-
},
|
|
2804
|
-
onResize: function(e) {
|
|
2805
|
-
this.$emit("resize", e), this.resizing = !0;
|
|
2806
|
-
},
|
|
2807
|
-
onResizeEnd: function() {
|
|
2808
|
-
this.$emit("resize-end"), this.resizing = !1;
|
|
2809
|
-
},
|
|
2810
|
-
aspectRatios: function() {
|
|
2811
|
-
return {
|
|
2812
|
-
minimum: 1,
|
|
2813
|
-
maximum: 1
|
|
2814
|
-
};
|
|
2815
|
-
}
|
|
2816
|
-
},
|
|
2817
|
-
emits: [
|
|
2818
|
-
"resize",
|
|
2819
|
-
"resize-end",
|
|
2820
|
-
"move",
|
|
2821
|
-
"move-end"
|
|
2822
|
-
]
|
|
2823
|
-
};
|
|
2824
|
-
En.render = function(e, t, n, r, i, o) {
|
|
2558
|
+
Sn.render = function(e, t, n, r, i, o) {
|
|
2825
2559
|
var s = a("stencil-preview"), l = a("draggable-area"), u = a("bounding-box");
|
|
2826
2560
|
return c(), S("div", {
|
|
2827
2561
|
class: o.classes.stencil,
|
|
@@ -2892,9 +2626,9 @@ En.render = function(e, t, n, r, i, o) {
|
|
|
2892
2626
|
"onResizeEnd"
|
|
2893
2627
|
])], 6);
|
|
2894
2628
|
};
|
|
2895
|
-
var
|
|
2629
|
+
var Cn = ["transitions"], wn = W("vue-advanced-cropper"), Tn = {
|
|
2896
2630
|
name: "Cropper",
|
|
2897
|
-
components: { BackgroundWrapper:
|
|
2631
|
+
components: { BackgroundWrapper: _n },
|
|
2898
2632
|
props: {
|
|
2899
2633
|
src: {
|
|
2900
2634
|
type: String,
|
|
@@ -2903,13 +2637,13 @@ var Dn = ["transitions"], On = W("vue-advanced-cropper"), kn = {
|
|
|
2903
2637
|
stencilComponent: {
|
|
2904
2638
|
type: [Object, String],
|
|
2905
2639
|
default: function() {
|
|
2906
|
-
return
|
|
2640
|
+
return Sn;
|
|
2907
2641
|
}
|
|
2908
2642
|
},
|
|
2909
2643
|
backgroundWrapperComponent: {
|
|
2910
2644
|
type: [Object, String],
|
|
2911
2645
|
default: function() {
|
|
2912
|
-
return
|
|
2646
|
+
return _n;
|
|
2913
2647
|
}
|
|
2914
2648
|
},
|
|
2915
2649
|
stencilProps: {
|
|
@@ -2972,7 +2706,7 @@ var Dn = ["transitions"], On = W("vue-advanced-cropper"), kn = {
|
|
|
2972
2706
|
defaultBoundaries: {
|
|
2973
2707
|
type: [Function, String],
|
|
2974
2708
|
validator: function(e) {
|
|
2975
|
-
return
|
|
2709
|
+
return typeof e != "string" || e === "fill" || e === "fit";
|
|
2976
2710
|
}
|
|
2977
2711
|
},
|
|
2978
2712
|
priority: {
|
|
@@ -3295,15 +3029,15 @@ var Dn = ["transitions"], On = W("vue-advanced-cropper"), kn = {
|
|
|
3295
3029
|
},
|
|
3296
3030
|
classes: function() {
|
|
3297
3031
|
return {
|
|
3298
|
-
cropper:
|
|
3299
|
-
image: U(
|
|
3300
|
-
stencil:
|
|
3301
|
-
boundaries: U(
|
|
3302
|
-
stretcher: U(
|
|
3303
|
-
background: U(
|
|
3304
|
-
foreground: U(
|
|
3305
|
-
imageWrapper: U(
|
|
3306
|
-
cropperWrapper: U(
|
|
3032
|
+
cropper: wn(),
|
|
3033
|
+
image: U(wn("image"), this.imageClass),
|
|
3034
|
+
stencil: wn("stencil"),
|
|
3035
|
+
boundaries: U(wn("boundaries"), this.boundariesClass),
|
|
3036
|
+
stretcher: U(wn("stretcher")),
|
|
3037
|
+
background: U(wn("background"), this.backgroundClass),
|
|
3038
|
+
foreground: U(wn("foreground"), this.foregroundClass),
|
|
3039
|
+
imageWrapper: U(wn("image-wrapper")),
|
|
3040
|
+
cropperWrapper: U(wn("cropper-wrapper"))
|
|
3307
3041
|
};
|
|
3308
3042
|
},
|
|
3309
3043
|
stencilCoordinates: function() {
|
|
@@ -3503,7 +3237,7 @@ var Dn = ["transitions"], On = W("vue-advanced-cropper"), kn = {
|
|
|
3503
3237
|
return V(V({}, a), {}, { changed: !vt(a.visibleArea, t) || !vt(a.coordinates, n) });
|
|
3504
3238
|
},
|
|
3505
3239
|
runAutoZoom: function(e) {
|
|
3506
|
-
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = t.transitions, r = n !== void 0 && n, i = Be(t,
|
|
3240
|
+
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = t.transitions, r = n !== void 0 && n, i = Be(t, Cn), a = this.processAutoZoom(e, this.visibleArea, this.coordinates, i), o = a.visibleArea, s = a.coordinates, c = a.changed;
|
|
3507
3241
|
r && c && this.enableTransitions(), this.visibleArea = o, this.coordinates = s, r && c && this.debouncedDisableTransitions();
|
|
3508
3242
|
},
|
|
3509
3243
|
normalizeEvent: function(e) {
|
|
@@ -3660,13 +3394,13 @@ var Dn = ["transitions"], On = W("vue-advanced-cropper"), kn = {
|
|
|
3660
3394
|
cropper: n,
|
|
3661
3395
|
imageSize: e.imageSize
|
|
3662
3396
|
};
|
|
3663
|
-
if (Ze(e.defaultBoundaries) ? e.
|
|
3397
|
+
if (e.boundaries = Ze(e.defaultBoundaries) ? e.defaultBoundaries(t) : e.defaultBoundaries === "fit" ? function(e) {
|
|
3664
3398
|
var t = e.cropper, n = e.imageSize, r = t.clientHeight, i = t.clientWidth, a = r, o = n.width * r / n.height;
|
|
3665
3399
|
return o > i && (o = i, a = n.height * i / n.width), {
|
|
3666
3400
|
width: o,
|
|
3667
3401
|
height: a
|
|
3668
3402
|
};
|
|
3669
|
-
}(t) :
|
|
3403
|
+
}(t) : function(e) {
|
|
3670
3404
|
var t = e.cropper;
|
|
3671
3405
|
return {
|
|
3672
3406
|
width: t.clientWidth,
|
|
@@ -3790,7 +3524,7 @@ var Dn = ["transitions"], On = W("vue-advanced-cropper"), kn = {
|
|
|
3790
3524
|
t.push(String.fromCharCode.apply(null, Array.from ? Array.from(r) : r.slice())), n = n.subarray(8192);
|
|
3791
3525
|
}
|
|
3792
3526
|
return "data:image/jpeg;base64," + btoa(t.join(""));
|
|
3793
|
-
}(r) : this.imageAttributes.src = n, Ze(this.defaultTransforms) ?
|
|
3527
|
+
}(r) : this.imageAttributes.src = n, this.appliedImageTransforms = Ze(this.defaultTransforms) ? dn(this.defaultTransforms()) : Qe(this.defaultTransforms) ? dn(this.defaultTransforms) : function(e) {
|
|
3794
3528
|
var t = dn({});
|
|
3795
3529
|
if (e) switch (e) {
|
|
3796
3530
|
case 2:
|
|
@@ -4001,16 +3735,16 @@ var Dn = ["transitions"], On = W("vue-advanced-cropper"), kn = {
|
|
|
4001
3735
|
"error",
|
|
4002
3736
|
"ready"
|
|
4003
3737
|
]
|
|
4004
|
-
},
|
|
3738
|
+
}, En = {
|
|
4005
3739
|
key: 0,
|
|
4006
3740
|
ref: "canvas",
|
|
4007
3741
|
style: { display: "none" }
|
|
4008
|
-
},
|
|
3742
|
+
}, Dn = {
|
|
4009
3743
|
key: 1,
|
|
4010
3744
|
ref: "sourceCanvas",
|
|
4011
3745
|
style: { display: "none" }
|
|
4012
3746
|
};
|
|
4013
|
-
|
|
3747
|
+
Tn.render = function(e, t, r, a, o, l) {
|
|
4014
3748
|
return c(), S("div", {
|
|
4015
3749
|
ref: "cropper",
|
|
4016
3750
|
class: l.classes.cropper
|
|
@@ -4068,8 +3802,8 @@ kn.render = function(e, t, r, a, o, l) {
|
|
|
4068
3802
|
"onMove",
|
|
4069
3803
|
"onMoveEnd"
|
|
4070
3804
|
])), [[O, o.imageLoaded]]),
|
|
4071
|
-
r.canvas ? (c(), S("canvas",
|
|
4072
|
-
r.canvas ? (c(), S("canvas",
|
|
3805
|
+
r.canvas ? (c(), S("canvas", En, null, 512)) : y("", !0),
|
|
3806
|
+
r.canvas ? (c(), S("canvas", Dn, null, 512)) : y("", !0)
|
|
4073
3807
|
];
|
|
4074
3808
|
})),
|
|
4075
3809
|
_: 1
|
|
@@ -4085,57 +3819,57 @@ kn.render = function(e, t, r, a, o, l) {
|
|
|
4085
3819
|
};
|
|
4086
3820
|
//#endregion
|
|
4087
3821
|
//#region ../media-library/src/components/media/MediaEditModal.vue?vue&type=script&setup=true&lang.ts
|
|
4088
|
-
var
|
|
3822
|
+
var On = ["data-tpl-theme"], kn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, An = {
|
|
4089
3823
|
class: "tpl:text-sm tpl:font-semibold",
|
|
4090
3824
|
style: { color: "var(--tpl-text)" }
|
|
4091
|
-
},
|
|
3825
|
+
}, jn = { class: "tpl:min-h-0 tpl:flex-1 tpl:overflow-y-auto tpl:px-5" }, Mn = {
|
|
4092
3826
|
key: 0,
|
|
4093
3827
|
class: "tpl:mb-4"
|
|
4094
|
-
},
|
|
3828
|
+
}, Nn = {
|
|
4095
3829
|
class: "tpl:relative tpl:mb-3 tpl:overflow-hidden tpl:rounded-md tpl:border",
|
|
4096
3830
|
style: {
|
|
4097
3831
|
"border-color": "var(--tpl-border)",
|
|
4098
3832
|
height: "300px",
|
|
4099
3833
|
"background-color": "var(--tpl-bg)"
|
|
4100
3834
|
}
|
|
4101
|
-
},
|
|
3835
|
+
}, Pn = { class: "tpl:space-y-3" }, Fn = {
|
|
4102
3836
|
class: "tpl:mb-1.5 tpl:block tpl:text-xs tpl:font-medium",
|
|
4103
3837
|
style: { color: "var(--tpl-text-muted)" }
|
|
4104
|
-
},
|
|
3838
|
+
}, In = { class: "tpl:flex tpl:flex-wrap tpl:gap-1.5" }, Ln = ["onClick"], Rn = { class: "tpl:flex tpl:gap-3" }, zn = { class: "tpl:flex-1" }, Bn = {
|
|
4105
3839
|
class: "tpl:mb-1 tpl:block tpl:text-xs tpl:font-medium",
|
|
4106
3840
|
style: { color: "var(--tpl-text-muted)" }
|
|
4107
|
-
},
|
|
3841
|
+
}, Vn = {
|
|
4108
3842
|
class: "tpl:font-normal",
|
|
4109
3843
|
style: { color: "var(--tpl-text-dim)" }
|
|
4110
|
-
},
|
|
3844
|
+
}, Hn = { class: "tpl:relative" }, Un = ["value", "placeholder"], Wn = {
|
|
4111
3845
|
class: "tpl:absolute tpl:top-1/2 tpl:right-2.5 tpl:-translate-y-1/2 tpl:text-xs",
|
|
4112
3846
|
style: { color: "var(--tpl-text-dim)" }
|
|
4113
|
-
},
|
|
3847
|
+
}, Gn = { class: "tpl:flex-1" }, Kn = {
|
|
4114
3848
|
class: "tpl:mb-1 tpl:block tpl:text-xs tpl:font-medium",
|
|
4115
3849
|
style: { color: "var(--tpl-text-muted)" }
|
|
4116
|
-
},
|
|
3850
|
+
}, qn = {
|
|
4117
3851
|
class: "tpl:font-normal",
|
|
4118
3852
|
style: { color: "var(--tpl-text-dim)" }
|
|
4119
|
-
},
|
|
3853
|
+
}, Jn = { class: "tpl:relative" }, Yn = ["value", "placeholder"], Xn = {
|
|
4120
3854
|
class: "tpl:absolute tpl:top-1/2 tpl:right-2.5 tpl:-translate-y-1/2 tpl:text-xs",
|
|
4121
3855
|
style: { color: "var(--tpl-text-dim)" }
|
|
4122
|
-
},
|
|
3856
|
+
}, Zn = {
|
|
4123
3857
|
key: 0,
|
|
4124
3858
|
class: "tpl:flex tpl:items-center tpl:gap-1 tpl:text-xs",
|
|
4125
3859
|
style: { color: "var(--tpl-text-muted)" }
|
|
4126
|
-
},
|
|
3860
|
+
}, Qn = {
|
|
4127
3861
|
class: "tpl:font-medium",
|
|
4128
3862
|
style: { color: "var(--tpl-text)" }
|
|
4129
|
-
},
|
|
3863
|
+
}, $n = { class: "tpl:mb-3" }, er = {
|
|
4130
3864
|
class: "tpl:mb-1 tpl:block tpl:text-xs tpl:font-medium",
|
|
4131
3865
|
style: { color: "var(--tpl-text-muted)" }
|
|
4132
|
-
},
|
|
3866
|
+
}, tr = ["autofocus"], nr = {
|
|
4133
3867
|
key: 1,
|
|
4134
3868
|
class: "tpl:mb-4"
|
|
4135
|
-
},
|
|
3869
|
+
}, rr = {
|
|
4136
3870
|
class: "tpl:mb-1 tpl:block tpl:text-xs tpl:font-medium",
|
|
4137
3871
|
style: { color: "var(--tpl-text-muted)" }
|
|
4138
|
-
},
|
|
3872
|
+
}, ir = ["placeholder"], ar = { class: "tpl:flex tpl:shrink-0 tpl:justify-end tpl:gap-2 tpl:p-5 tpl:pt-4" }, or = ["disabled"], sr = /*#__PURE__*/ Ce(/* @__PURE__ */ M({
|
|
4139
3873
|
__name: "MediaEditModal",
|
|
4140
3874
|
props: {
|
|
4141
3875
|
visible: { type: Boolean },
|
|
@@ -4143,23 +3877,23 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
|
|
|
4143
3877
|
},
|
|
4144
3878
|
emits: ["save", "close"],
|
|
4145
3879
|
setup(e, { emit: t }) {
|
|
4146
|
-
let n = e, r = t, { t: a } = B(), o = d("tplUiTheme"), s = d(Re, p(null)), l = a.mediaLibrary, { isImageMimeType: m } = Me(), D = p(""), O = p(""), ee = p(null), M = p("free"), ne = p(void 0), re = p(void 0), ie = p(""),
|
|
3880
|
+
let n = e, r = t, { t: a } = B(), o = d("tplUiTheme"), s = d(Re, p(null)), l = a.mediaLibrary, { isImageMimeType: m } = Me(), D = p(""), O = p(""), ee = p(null), M = p("free"), ne = p(void 0), re = p(void 0), ie = p(""), ae = p(""), P = p(void 0), F = p(null), oe = p(!1), I = p(!1), se = p(!1), L = _(() => n.item ? [
|
|
4147
3881
|
"image/jpeg",
|
|
4148
3882
|
"image/png",
|
|
4149
3883
|
"image/webp",
|
|
4150
3884
|
"image/gif"
|
|
4151
|
-
].includes(n.item.mime_type) : !1), ce = _(() => M.value === "original" ?
|
|
3885
|
+
].includes(n.item.mime_type) : !1), ce = _(() => M.value === "original" ? P.value : Ne[M.value]), le = _(() => F.value ? Le(F.value.width, F.value.height, ne.value, re.value) : null);
|
|
4152
3886
|
te(() => n.visible, (e) => {
|
|
4153
|
-
e && n.item && (D.value = n.item.filename, O.value = n.item.alt_text || "", M.value = "free", ne.value = void 0, re.value = void 0, ie.value = "",
|
|
3887
|
+
e && n.item && (D.value = n.item.filename, O.value = n.item.alt_text || "", M.value = "free", ne.value = void 0, re.value = void 0, ie.value = "", ae.value = "", P.value = void 0, F.value = null, oe.value = !1, se.value = !1, n.item.width && n.item.height && (P.value = n.item.width / n.item.height));
|
|
4154
3888
|
});
|
|
4155
3889
|
function ue(e) {
|
|
4156
|
-
e.coordinates && (
|
|
3890
|
+
e.coordinates && (F.value = {
|
|
4157
3891
|
width: Math.round(e.coordinates.width),
|
|
4158
3892
|
height: Math.round(e.coordinates.height)
|
|
4159
|
-
},
|
|
3893
|
+
}, se.value = !0);
|
|
4160
3894
|
}
|
|
4161
3895
|
function de() {
|
|
4162
|
-
|
|
3896
|
+
oe.value = !0, !P.value && n.item?.width && n.item?.height && (P.value = n.item.width / n.item.height);
|
|
4163
3897
|
}
|
|
4164
3898
|
function fe(e) {
|
|
4165
3899
|
let t = e.target.value;
|
|
@@ -4167,14 +3901,14 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
|
|
|
4167
3901
|
}
|
|
4168
3902
|
function pe(e) {
|
|
4169
3903
|
let t = e.target.value;
|
|
4170
|
-
|
|
3904
|
+
ae.value = t, re.value = t && parseInt(t, 10) || void 0;
|
|
4171
3905
|
}
|
|
4172
3906
|
async function me() {
|
|
4173
3907
|
let e = D.value.trim();
|
|
4174
|
-
if (!e || !n.item ||
|
|
3908
|
+
if (!e || !n.item || I.value) return;
|
|
4175
3909
|
let t = m(n.item.mime_type), i;
|
|
4176
|
-
if (
|
|
4177
|
-
|
|
3910
|
+
if (L.value && ee.value && se.value) {
|
|
3911
|
+
I.value = !0;
|
|
4178
3912
|
try {
|
|
4179
3913
|
let { canvas: e } = ee.value.getResult();
|
|
4180
3914
|
if (e) {
|
|
@@ -4182,15 +3916,15 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
|
|
|
4182
3916
|
i = { file: await Ie(t, n.item.filename, r) };
|
|
4183
3917
|
}
|
|
4184
3918
|
} catch {
|
|
4185
|
-
|
|
3919
|
+
I.value = !1;
|
|
4186
3920
|
return;
|
|
4187
3921
|
}
|
|
4188
|
-
|
|
3922
|
+
I.value = !1;
|
|
4189
3923
|
}
|
|
4190
3924
|
r("save", n.item.id, e, t ? O.value : void 0, i), r("close");
|
|
4191
3925
|
}
|
|
4192
3926
|
function he(e) {
|
|
4193
|
-
e.key === "Enter" && !
|
|
3927
|
+
e.key === "Enter" && !I.value && (e.preventDefault(), me()), e.key === "Escape" && r("close");
|
|
4194
3928
|
}
|
|
4195
3929
|
return (t, n) => (c(), S(g, { to: b(s) || "body" }, [N(C, {
|
|
4196
3930
|
"enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
|
|
@@ -4208,12 +3942,12 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
|
|
|
4208
3942
|
onClick: n[3] ||= x((e) => r("close"), ["self"]),
|
|
4209
3943
|
onKeydown: he
|
|
4210
3944
|
}, [E("div", {
|
|
4211
|
-
class: T(["tpl:mx-4 tpl:flex tpl:max-h-[90vh] tpl:w-full tpl:flex-col tpl:overflow-hidden tpl:rounded-lg tpl:shadow-xl",
|
|
3945
|
+
class: T(["tpl:mx-4 tpl:flex tpl:max-h-[90vh] tpl:w-full tpl:flex-col tpl:overflow-hidden tpl:rounded-lg tpl:shadow-xl", L.value ? "tpl:max-w-2xl" : "tpl:max-w-sm"]),
|
|
4212
3946
|
style: { "background-color": "var(--tpl-bg-elevated)" }
|
|
4213
3947
|
}, [
|
|
4214
|
-
E("div",
|
|
4215
|
-
E("div",
|
|
4216
|
-
|
|
3948
|
+
E("div", kn, [E("h3", An, h(b(a).mediaLibrary.editFile), 1)]),
|
|
3949
|
+
E("div", jn, [
|
|
3950
|
+
L.value ? (c(), v("div", Mn, [E("div", Nn, [N(b(Tn), {
|
|
4217
3951
|
ref_key: "cropperRef",
|
|
4218
3952
|
ref: ee,
|
|
4219
3953
|
src: e.item.url,
|
|
@@ -4222,8 +3956,8 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
|
|
|
4222
3956
|
"background-class": "tpl-cropper-background",
|
|
4223
3957
|
onChange: ue,
|
|
4224
3958
|
onReady: de
|
|
4225
|
-
}, null, 8, ["src", "stencil-props"])]), E("div",
|
|
4226
|
-
E("div", null, [E("label",
|
|
3959
|
+
}, null, 8, ["src", "stencil-props"])]), E("div", Pn, [
|
|
3960
|
+
E("div", null, [E("label", Fn, h(b(a).mediaLibrary.cropAspectRatio), 1), E("div", In, [(c(), v(A, null, u([
|
|
4227
3961
|
"free",
|
|
4228
3962
|
"square",
|
|
4229
3963
|
"landscape43",
|
|
@@ -4239,8 +3973,8 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
|
|
|
4239
3973
|
color: M.value === e ? "var(--tpl-primary)" : "var(--tpl-text)"
|
|
4240
3974
|
}),
|
|
4241
3975
|
onClick: (t) => M.value = e
|
|
4242
|
-
}, h(b(l)[`crop${e.charAt(0).toUpperCase()}${e.slice(1)}`]), 13,
|
|
4243
|
-
E("div",
|
|
3976
|
+
}, h(b(l)[`crop${e.charAt(0).toUpperCase()}${e.slice(1)}`]), 13, Ln)), 64))])]),
|
|
3977
|
+
E("div", Rn, [E("div", zn, [E("label", Bn, [j(h(b(a).mediaLibrary.cropMaxWidth) + " ", 1), E("span", Vn, h(b(a).mediaLibrary.cropOptional), 1)]), E("div", Hn, [E("input", {
|
|
4244
3978
|
value: ie.value,
|
|
4245
3979
|
type: "number",
|
|
4246
3980
|
min: "1",
|
|
@@ -4250,10 +3984,10 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
|
|
|
4250
3984
|
"background-color": "var(--tpl-bg)",
|
|
4251
3985
|
color: "var(--tpl-text)"
|
|
4252
3986
|
},
|
|
4253
|
-
placeholder:
|
|
3987
|
+
placeholder: F.value?.width?.toString() || "",
|
|
4254
3988
|
onInput: fe
|
|
4255
|
-
}, null, 40,
|
|
4256
|
-
value:
|
|
3989
|
+
}, null, 40, Un), E("span", Wn, h(b(a).mediaLibrary.cropPixels), 1)])]), E("div", Gn, [E("label", Kn, [j(h(b(a).mediaLibrary.cropMaxHeight) + " ", 1), E("span", qn, h(b(a).mediaLibrary.cropOptional), 1)]), E("div", Jn, [E("input", {
|
|
3990
|
+
value: ae.value,
|
|
4257
3991
|
type: "number",
|
|
4258
3992
|
min: "1",
|
|
4259
3993
|
class: "tpl:w-full tpl:rounded-md tpl:border tpl:py-1.5 tpl:pr-8 tpl:pl-3 tpl:text-xs tpl:outline-none",
|
|
@@ -4262,12 +3996,12 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
|
|
|
4262
3996
|
"background-color": "var(--tpl-bg)",
|
|
4263
3997
|
color: "var(--tpl-text)"
|
|
4264
3998
|
},
|
|
4265
|
-
placeholder:
|
|
3999
|
+
placeholder: F.value?.height?.toString() || "",
|
|
4266
4000
|
onInput: pe
|
|
4267
|
-
}, null, 40,
|
|
4268
|
-
le.value ? (c(), v("div",
|
|
4001
|
+
}, null, 40, Yn), E("span", Xn, h(b(a).mediaLibrary.cropPixels), 1)])])]),
|
|
4002
|
+
le.value ? (c(), v("div", Zn, [E("span", null, h(b(a).mediaLibrary.cropOutputSize) + ": ", 1), E("span", Qn, h(le.value.width) + " x " + h(le.value.height) + " " + h(b(a).mediaLibrary.cropPixels), 1)])) : y("", !0)
|
|
4269
4003
|
])])) : y("", !0),
|
|
4270
|
-
E("div",
|
|
4004
|
+
E("div", $n, [E("label", er, h(b(a).mediaLibrary.fileName), 1), i(E("input", {
|
|
4271
4005
|
"onUpdate:modelValue": n[0] ||= (e) => D.value = e,
|
|
4272
4006
|
type: "text",
|
|
4273
4007
|
class: "tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:outline-none",
|
|
@@ -4276,9 +4010,9 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
|
|
|
4276
4010
|
"background-color": "var(--tpl-bg)",
|
|
4277
4011
|
color: "var(--tpl-text)"
|
|
4278
4012
|
},
|
|
4279
|
-
autofocus: !
|
|
4280
|
-
}, null, 8,
|
|
4281
|
-
b(m)(e.item.mime_type) ? (c(), v("div",
|
|
4013
|
+
autofocus: !L.value
|
|
4014
|
+
}, null, 8, tr), [[w, D.value]])]),
|
|
4015
|
+
b(m)(e.item.mime_type) ? (c(), v("div", nr, [E("label", rr, h(b(a).mediaLibrary.altText), 1), i(E("input", {
|
|
4282
4016
|
"onUpdate:modelValue": n[1] ||= (e) => O.value = e,
|
|
4283
4017
|
type: "text",
|
|
4284
4018
|
class: "tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:outline-none",
|
|
@@ -4288,9 +4022,9 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
|
|
|
4288
4022
|
color: "var(--tpl-text)"
|
|
4289
4023
|
},
|
|
4290
4024
|
placeholder: b(a).mediaLibrary.altTextPlaceholder
|
|
4291
|
-
}, null, 8,
|
|
4025
|
+
}, null, 8, ir), [[w, O.value]])])) : y("", !0)
|
|
4292
4026
|
]),
|
|
4293
|
-
E("div",
|
|
4027
|
+
E("div", ar, [E("button", {
|
|
4294
4028
|
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",
|
|
4295
4029
|
style: {
|
|
4296
4030
|
"border-color": "var(--tpl-border)",
|
|
@@ -4301,23 +4035,23 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
|
|
|
4301
4035
|
}, h(b(a).mediaLibrary.cancel), 1), E("button", {
|
|
4302
4036
|
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",
|
|
4303
4037
|
style: { background: "linear-gradient(\n 135deg,\n var(--tpl-primary),\n var(--tpl-primary-hover)\n )" },
|
|
4304
|
-
disabled:
|
|
4038
|
+
disabled: I.value,
|
|
4305
4039
|
onClick: me
|
|
4306
|
-
}, h(
|
|
4307
|
-
], 2)], 40,
|
|
4040
|
+
}, h(I.value ? b(a).mediaLibrary.saving : b(a).mediaLibrary.saveChanges), 9, or)])
|
|
4041
|
+
], 2)], 40, On)) : y("", !0)]),
|
|
4308
4042
|
_: 1
|
|
4309
4043
|
})], 8, ["to"]));
|
|
4310
4044
|
}
|
|
4311
|
-
}), [["__scopeId", "data-v-1d42dd39"]]),
|
|
4045
|
+
}), [["__scopeId", "data-v-1d42dd39"]]), cr = {
|
|
4312
4046
|
key: 1,
|
|
4313
4047
|
class: "tpl:size-4 tpl:shrink-0"
|
|
4314
|
-
},
|
|
4048
|
+
}, lr = {
|
|
4315
4049
|
key: 0,
|
|
4316
4050
|
class: "tpl:truncate"
|
|
4317
|
-
},
|
|
4051
|
+
}, ur = {
|
|
4318
4052
|
key: 3,
|
|
4319
4053
|
class: "tpl:flex tpl:shrink-0 tpl:items-center tpl:gap-0.5 tpl:opacity-0 tpl:transition-opacity tpl:group-hover:opacity-100"
|
|
4320
|
-
},
|
|
4054
|
+
}, dr = ["title"], fr = ["title"], pr = { key: 0 }, mr = ["placeholder"], hr = /* @__PURE__ */ M({
|
|
4321
4055
|
__name: "MediaFolderTreeNode",
|
|
4322
4056
|
props: {
|
|
4323
4057
|
folder: {},
|
|
@@ -4331,7 +4065,7 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
|
|
|
4331
4065
|
"deleteFolder"
|
|
4332
4066
|
],
|
|
4333
4067
|
setup(e, { emit: t }) {
|
|
4334
|
-
let n = e, r = t, { t: o } = B(), s = p(!1), l = p(!1), d = p(""), f = p(!1), g = p(""), C = _(() => (n.folder.children?.length ?? 0) > 0), D = _(() => n.depth <
|
|
4068
|
+
let n = e, r = t, { t: o } = B(), s = p(!1), l = p(!1), d = p(""), f = p(!1), g = p(""), C = _(() => (n.folder.children?.length ?? 0) > 0), D = _(() => n.depth < 4), O = _(() => n.currentFolderId === n.folder.id), ee = _(() => !n.currentFolderId || !n.folder.children ? !1 : M(n.folder.children, n.currentFolderId)), j = _(() => s.value || ee.value);
|
|
4335
4069
|
function M(e, t) {
|
|
4336
4070
|
for (let n of e) if (n.id === t || n.children && M(n.children, t)) return !0;
|
|
4337
4071
|
return !1;
|
|
@@ -4349,13 +4083,13 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
|
|
|
4349
4083
|
function ie() {
|
|
4350
4084
|
l.value = !1, d.value = "";
|
|
4351
4085
|
}
|
|
4352
|
-
function
|
|
4086
|
+
function ae() {
|
|
4353
4087
|
f.value = !0, g.value = "", s.value = !0;
|
|
4354
4088
|
}
|
|
4355
|
-
function
|
|
4089
|
+
function P() {
|
|
4356
4090
|
g.value.trim() && r("createFolder", g.value.trim(), n.folder.id), f.value = !1, g.value = "";
|
|
4357
4091
|
}
|
|
4358
|
-
function
|
|
4092
|
+
function F() {
|
|
4359
4093
|
f.value = !1, g.value = "";
|
|
4360
4094
|
}
|
|
4361
4095
|
return (t, n) => {
|
|
@@ -4376,7 +4110,7 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
|
|
|
4376
4110
|
class: T(["tpl:transition-transform tpl:duration-150", { "tpl:rotate-90": j.value }]),
|
|
4377
4111
|
size: 10,
|
|
4378
4112
|
"stroke-width": 2
|
|
4379
|
-
}, null, 8, ["class"])])) : (c(), v("span",
|
|
4113
|
+
}, null, 8, ["class"])])) : (c(), v("span", cr)),
|
|
4380
4114
|
E("button", {
|
|
4381
4115
|
class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:items-center tpl:gap-1.5",
|
|
4382
4116
|
onClick: n[0] ||= (t) => r("navigate", e.folder.id)
|
|
@@ -4384,7 +4118,7 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
|
|
|
4384
4118
|
class: "tpl:shrink-0",
|
|
4385
4119
|
size: 14,
|
|
4386
4120
|
"stroke-width": 1.5
|
|
4387
|
-
}), l.value ? y("", !0) : (c(), v("span",
|
|
4121
|
+
}), l.value ? y("", !0) : (c(), v("span", lr, h(e.folder.name), 1))]),
|
|
4388
4122
|
l.value ? i((c(), v("input", {
|
|
4389
4123
|
key: 2,
|
|
4390
4124
|
"onUpdate:modelValue": n[1] ||= (e) => d.value = e,
|
|
@@ -4400,24 +4134,24 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
|
|
|
4400
4134
|
onBlur: re,
|
|
4401
4135
|
onClick: n[2] ||= x(() => {}, ["stop"])
|
|
4402
4136
|
}, null, 544)), [[w, d.value]]) : y("", !0),
|
|
4403
|
-
l.value ? y("", !0) : (c(), v("span",
|
|
4137
|
+
l.value ? y("", !0) : (c(), v("span", ur, [
|
|
4404
4138
|
D.value ? (c(), v("button", {
|
|
4405
4139
|
key: 0,
|
|
4406
4140
|
class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
|
|
4407
4141
|
title: b(o).mediaLibrary.addSubfolder,
|
|
4408
|
-
onClick: x(
|
|
4142
|
+
onClick: x(ae, ["stop"])
|
|
4409
4143
|
}, [N(b(fe), {
|
|
4410
4144
|
size: 12,
|
|
4411
4145
|
"stroke-width": 2
|
|
4412
|
-
})], 8,
|
|
4146
|
+
})], 8, dr)) : y("", !0),
|
|
4413
4147
|
E("button", {
|
|
4414
4148
|
class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
|
|
4415
4149
|
title: b(o).mediaLibrary.renameFolder,
|
|
4416
4150
|
onClick: x(ne, ["stop"])
|
|
4417
|
-
}, [N(b(
|
|
4151
|
+
}, [N(b(L), {
|
|
4418
4152
|
size: 12,
|
|
4419
4153
|
"stroke-width": 2
|
|
4420
|
-
})], 8,
|
|
4154
|
+
})], 8, fr),
|
|
4421
4155
|
E("button", {
|
|
4422
4156
|
class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
|
|
4423
4157
|
onClick: n[3] ||= x((t) => r("deleteFolder", e.folder.id), ["stop"])
|
|
@@ -4427,7 +4161,7 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
|
|
|
4427
4161
|
style: { color: "var(--tpl-danger)" }
|
|
4428
4162
|
})])
|
|
4429
4163
|
]))
|
|
4430
|
-
], 4), j.value ? (c(), v("div",
|
|
4164
|
+
], 4), j.value ? (c(), v("div", pr, [(c(!0), v(A, null, u(e.folder.children, (t) => (c(), S(s, {
|
|
4431
4165
|
key: t.id,
|
|
4432
4166
|
folder: t,
|
|
4433
4167
|
"current-folder-id": e.currentFolderId,
|
|
@@ -4455,15 +4189,15 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
|
|
|
4455
4189
|
},
|
|
4456
4190
|
placeholder: b(o).mediaLibrary.subfolderName,
|
|
4457
4191
|
autofocus: "",
|
|
4458
|
-
onKeydown: [m(
|
|
4459
|
-
onBlur:
|
|
4460
|
-
}, null, 40,
|
|
4192
|
+
onKeydown: [m(P, ["enter"]), m(F, ["escape"])],
|
|
4193
|
+
onBlur: P
|
|
4194
|
+
}, null, 40, mr), [[w, g.value]])], 4)) : y("", !0)])) : y("", !0)]);
|
|
4461
4195
|
};
|
|
4462
4196
|
}
|
|
4463
|
-
}),
|
|
4197
|
+
}), gr = { class: "tpl:flex tpl:h-full tpl:flex-col tpl:overflow-y-auto" }, _r = {
|
|
4464
4198
|
key: 0,
|
|
4465
4199
|
class: "tpl:px-3 tpl:py-2"
|
|
4466
|
-
},
|
|
4200
|
+
}, vr = ["placeholder"], yr = /* @__PURE__ */ M({
|
|
4467
4201
|
__name: "MediaFolderTree",
|
|
4468
4202
|
props: {
|
|
4469
4203
|
folders: {},
|
|
@@ -4489,7 +4223,7 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
|
|
|
4489
4223
|
function d() {
|
|
4490
4224
|
a.value = !1, o.value = "";
|
|
4491
4225
|
}
|
|
4492
|
-
return (t, f) => (c(), v("div",
|
|
4226
|
+
return (t, f) => (c(), v("div", gr, [
|
|
4493
4227
|
E("button", {
|
|
4494
4228
|
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",
|
|
4495
4229
|
style: k({
|
|
@@ -4501,7 +4235,7 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
|
|
|
4501
4235
|
size: 14,
|
|
4502
4236
|
"stroke-width": 1.5
|
|
4503
4237
|
}), j(" " + h(b(r).mediaLibrary.allFiles), 1)], 4),
|
|
4504
|
-
(c(!0), v(A, null, u(e.folders, (t) => (c(), S(
|
|
4238
|
+
(c(!0), v(A, null, u(e.folders, (t) => (c(), S(hr, {
|
|
4505
4239
|
key: t.id,
|
|
4506
4240
|
folder: t,
|
|
4507
4241
|
"current-folder-id": e.currentFolderId,
|
|
@@ -4511,7 +4245,7 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
|
|
|
4511
4245
|
onRenameFolder: f[3] ||= (e, t) => n("renameFolder", e, t),
|
|
4512
4246
|
onDeleteFolder: f[4] ||= (e) => n("deleteFolder", e)
|
|
4513
4247
|
}, null, 8, ["folder", "current-folder-id"]))), 128)),
|
|
4514
|
-
a.value ? (c(), v("div",
|
|
4248
|
+
a.value ? (c(), v("div", _r, [i(E("input", {
|
|
4515
4249
|
"onUpdate:modelValue": f[5] ||= (e) => o.value = e,
|
|
4516
4250
|
type: "text",
|
|
4517
4251
|
class: "tpl:w-full tpl:rounded tpl:border tpl:px-2 tpl:py-1 tpl:text-xs tpl:outline-none",
|
|
@@ -4524,7 +4258,7 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
|
|
|
4524
4258
|
autofocus: "",
|
|
4525
4259
|
onKeydown: [m(l, ["enter"]), m(d, ["escape"])],
|
|
4526
4260
|
onBlur: l
|
|
4527
|
-
}, null, 40,
|
|
4261
|
+
}, null, 40, vr), [[w, o.value]])])) : y("", !0),
|
|
4528
4262
|
a.value ? y("", !0) : (c(), v("button", {
|
|
4529
4263
|
key: 1,
|
|
4530
4264
|
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",
|
|
@@ -4550,7 +4284,7 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
|
|
|
4550
4284
|
}), j(" " + h(b(r).mediaLibrary.frequentlyUsed), 1)], 4)) : y("", !0)
|
|
4551
4285
|
]));
|
|
4552
4286
|
}
|
|
4553
|
-
}),
|
|
4287
|
+
}), br = { class: "tpl:flex tpl:aspect-square tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2" }, xr = /* @__PURE__ */ M({
|
|
4554
4288
|
__name: "MediaFileIcon",
|
|
4555
4289
|
props: { mimeType: {} },
|
|
4556
4290
|
setup(e) {
|
|
@@ -4651,7 +4385,7 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
|
|
|
4651
4385
|
bgColor: "#f9fafb",
|
|
4652
4386
|
icon: "document"
|
|
4653
4387
|
}, i = _(() => n[t.mimeType] ?? r);
|
|
4654
|
-
return (e, t) => (c(), v("div",
|
|
4388
|
+
return (e, t) => (c(), v("div", br, [i.value.icon === "document" ? (c(), v("svg", {
|
|
4655
4389
|
key: 0,
|
|
4656
4390
|
width: "60",
|
|
4657
4391
|
height: "60",
|
|
@@ -4720,48 +4454,48 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
|
|
|
4720
4454
|
style: k({ color: i.value.color })
|
|
4721
4455
|
}, h(i.value.label), 5)]));
|
|
4722
4456
|
}
|
|
4723
|
-
}),
|
|
4457
|
+
}), Sr = { class: "tpl:p-4" }, Cr = {
|
|
4724
4458
|
key: 1,
|
|
4725
4459
|
class: "tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:py-16"
|
|
4726
|
-
},
|
|
4460
|
+
}, wr = {
|
|
4727
4461
|
class: "tpl:text-xs",
|
|
4728
4462
|
style: { color: "var(--tpl-text-muted)" }
|
|
4729
|
-
},
|
|
4463
|
+
}, Tr = {
|
|
4730
4464
|
key: 2,
|
|
4731
4465
|
class: "tpl:grid tpl:grid-cols-4 tpl:gap-3"
|
|
4732
|
-
},
|
|
4466
|
+
}, Er = ["onClick"], Dr = { class: "tpl:aspect-square" }, Or = ["src", "alt"], kr = { class: "tpl:px-2 tpl:py-1.5" }, Ar = {
|
|
4733
4467
|
class: "tpl:truncate tpl:text-[10px] tpl:font-medium",
|
|
4734
4468
|
style: { color: "var(--tpl-text)" }
|
|
4735
|
-
},
|
|
4469
|
+
}, jr = {
|
|
4736
4470
|
class: "tpl:flex tpl:justify-between tpl:text-[9px]",
|
|
4737
4471
|
style: { color: "var(--tpl-text-muted)" }
|
|
4738
|
-
},
|
|
4472
|
+
}, Mr = { key: 0 }, Nr = { 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" }, Pr = ["title", "onClick"], Fr = ["title", "onClick"], Ir = {
|
|
4739
4473
|
key: 0,
|
|
4740
4474
|
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",
|
|
4741
4475
|
style: { "background-color": "var(--tpl-primary)" }
|
|
4742
|
-
},
|
|
4476
|
+
}, Lr = {
|
|
4743
4477
|
key: 3,
|
|
4744
4478
|
class: "tpl:flex tpl:flex-col tpl:gap-1"
|
|
4745
|
-
},
|
|
4479
|
+
}, Rr = ["onClick"], zr = {
|
|
4746
4480
|
class: "tpl:size-10 tpl:shrink-0 tpl:overflow-hidden tpl:rounded",
|
|
4747
4481
|
style: { "background-color": "var(--tpl-bg-hover)" }
|
|
4748
|
-
},
|
|
4482
|
+
}, Br = ["src", "alt"], Vr = {
|
|
4749
4483
|
key: 1,
|
|
4750
4484
|
class: "tpl-list-icon tpl:size-full"
|
|
4751
|
-
},
|
|
4485
|
+
}, Hr = { class: "tpl:min-w-0 tpl:flex-1" }, Ur = {
|
|
4752
4486
|
class: "tpl:truncate tpl:text-xs tpl:font-medium",
|
|
4753
4487
|
style: { color: "var(--tpl-text)" }
|
|
4754
|
-
},
|
|
4488
|
+
}, Wr = {
|
|
4755
4489
|
class: "tpl:text-[10px]",
|
|
4756
4490
|
style: { color: "var(--tpl-text-muted)" }
|
|
4757
|
-
},
|
|
4491
|
+
}, Gr = { class: "tpl:flex tpl:gap-1 tpl:opacity-0 tpl:transition-opacity tpl:duration-150 tpl:group-hover:opacity-100" }, Kr = ["title", "onClick"], qr = ["title", "onClick"], Jr = {
|
|
4758
4492
|
key: 0,
|
|
4759
4493
|
class: "tpl:flex tpl:size-5 tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded-full tpl:text-white",
|
|
4760
4494
|
style: { "background-color": "var(--tpl-primary)" }
|
|
4761
|
-
},
|
|
4495
|
+
}, Yr = {
|
|
4762
4496
|
key: 4,
|
|
4763
4497
|
class: "tpl:flex tpl:justify-center tpl:py-4"
|
|
4764
|
-
},
|
|
4498
|
+
}, Xr = /*#__PURE__*/ Ce(/* @__PURE__ */ M({
|
|
4765
4499
|
__name: "MediaGrid",
|
|
4766
4500
|
props: {
|
|
4767
4501
|
items: {},
|
|
@@ -4787,11 +4521,11 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
|
|
|
4787
4521
|
r("select", e);
|
|
4788
4522
|
}
|
|
4789
4523
|
let { t: l } = B(), d = p(null);
|
|
4790
|
-
|
|
4524
|
+
F(d, ([{ isIntersecting: e }]) => {
|
|
4791
4525
|
e && n.hasMore && !n.isLoading && r("loadMore");
|
|
4792
4526
|
}, { threshold: .1 });
|
|
4793
4527
|
function f(e) {
|
|
4794
|
-
return e < 1024 ? `${e} B` : e <
|
|
4528
|
+
return e < 1024 ? `${e} B` : e < 1048576 ? `${(e / 1024).toFixed(1)} KB` : `${(e / 1048576).toFixed(1)} MB`;
|
|
4795
4529
|
}
|
|
4796
4530
|
function m(e) {
|
|
4797
4531
|
return new Date(e).toLocaleDateString(void 0, {
|
|
@@ -4800,7 +4534,7 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
|
|
|
4800
4534
|
day: "numeric"
|
|
4801
4535
|
});
|
|
4802
4536
|
}
|
|
4803
|
-
return (t, n) => (c(), v("div",
|
|
4537
|
+
return (t, n) => (c(), v("div", Sr, [
|
|
4804
4538
|
e.isLoading && e.items.length === 0 ? (c(), v("div", {
|
|
4805
4539
|
key: 0,
|
|
4806
4540
|
class: T(e.layout === "list" ? "tpl:flex tpl:flex-col tpl:gap-1" : "tpl:grid tpl:grid-cols-4 tpl:gap-3")
|
|
@@ -4808,34 +4542,34 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
|
|
|
4808
4542
|
key: t,
|
|
4809
4543
|
class: T(["tpl-pulse tpl:rounded-lg", e.layout === "list" ? "tpl:h-12" : "tpl:aspect-square"]),
|
|
4810
4544
|
style: { "background-color": "var(--tpl-bg-hover)" }
|
|
4811
|
-
}, null, 2)), 64))], 2)) : e.items.length === 0 ? (c(), v("div",
|
|
4545
|
+
}, null, 2)), 64))], 2)) : e.items.length === 0 ? (c(), v("div", Cr, [N(b(me), {
|
|
4812
4546
|
class: "tpl:mb-3",
|
|
4813
4547
|
size: 40,
|
|
4814
4548
|
"stroke-width": 1,
|
|
4815
4549
|
style: { color: "var(--tpl-text-dim)" }
|
|
4816
|
-
}), E("p",
|
|
4550
|
+
}), E("p", wr, h(b(l).mediaLibrary.noFiles), 1)])) : e.layout === "list" ? (c(), v("div", Lr, [(c(!0), v(A, null, u(e.items, (t) => (c(), v("div", {
|
|
4817
4551
|
key: t.id,
|
|
4818
4552
|
class: T(["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", [!o(t) && !e.selectedIds.has(t.id) ? "tpl:opacity-60" : ""]]),
|
|
4819
4553
|
style: k({ backgroundColor: e.selectedIds.has(t.id) ? "var(--tpl-bg-hover)" : "transparent" }),
|
|
4820
4554
|
onClick: (e) => s(t)
|
|
4821
4555
|
}, [
|
|
4822
|
-
E("div",
|
|
4556
|
+
E("div", zr, [b(a)(t.mime_type) ? (c(), v("img", {
|
|
4823
4557
|
key: 0,
|
|
4824
4558
|
src: t.small_url || t.url,
|
|
4825
4559
|
alt: t.filename,
|
|
4826
4560
|
class: "tpl:size-full tpl:object-cover",
|
|
4827
4561
|
loading: "lazy"
|
|
4828
|
-
}, null, 8,
|
|
4829
|
-
E("div",
|
|
4830
|
-
E("div",
|
|
4562
|
+
}, null, 8, Br)) : (c(), v("div", Vr, [N(xr, { "mime-type": t.mime_type }, null, 8, ["mime-type"])]))]),
|
|
4563
|
+
E("div", Hr, [E("p", Ur, h(t.filename), 1), E("p", Wr, [j(h(f(t.size)) + " · " + h(m(t.created_at)) + " ", 1), b(a)(t.mime_type) && t.width && t.height ? (c(), v(A, { key: 0 }, [j(" · " + h(t.width) + "×" + h(t.height), 1)], 64)) : y("", !0)])]),
|
|
4564
|
+
E("div", Gr, [E("button", {
|
|
4831
4565
|
class: "tpl:flex tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded",
|
|
4832
4566
|
style: { color: "var(--tpl-text-muted)" },
|
|
4833
4567
|
title: b(l).mediaLibrary.editFile,
|
|
4834
4568
|
onClick: x((e) => r("edit", t), ["stop"])
|
|
4835
|
-
}, [N(b(
|
|
4569
|
+
}, [N(b(L), {
|
|
4836
4570
|
size: 12,
|
|
4837
4571
|
"stroke-width": 2
|
|
4838
|
-
})], 8,
|
|
4572
|
+
})], 8, Kr), E("button", {
|
|
4839
4573
|
class: "tpl:flex tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded",
|
|
4840
4574
|
style: { color: "var(--tpl-text-muted)" },
|
|
4841
4575
|
title: b(l).mediaLibrary.replaceFile,
|
|
@@ -4843,12 +4577,12 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
|
|
|
4843
4577
|
}, [N(b(Se), {
|
|
4844
4578
|
size: 12,
|
|
4845
4579
|
"stroke-width": 2
|
|
4846
|
-
})], 8,
|
|
4847
|
-
e.selectedIds.has(t.id) ? (c(), v("div",
|
|
4580
|
+
})], 8, qr)]),
|
|
4581
|
+
e.selectedIds.has(t.id) ? (c(), v("div", Jr, [N(b(I), {
|
|
4848
4582
|
size: 12,
|
|
4849
4583
|
"stroke-width": 3
|
|
4850
4584
|
})])) : y("", !0)
|
|
4851
|
-
], 14,
|
|
4585
|
+
], 14, Rr))), 128))])) : (c(), v("div", Tr, [(c(!0), v(A, null, u(e.items, (t) => (c(), v("div", {
|
|
4852
4586
|
key: t.id,
|
|
4853
4587
|
class: T(["tpl-media-item tpl:group tpl:relative tpl:overflow-hidden tpl:rounded-lg tpl:border-2 tpl:transition-all tpl:duration-150", [
|
|
4854
4588
|
"tpl:cursor-pointer",
|
|
@@ -4861,26 +4595,26 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
|
|
|
4861
4595
|
}),
|
|
4862
4596
|
onClick: (e) => s(t)
|
|
4863
4597
|
}, [
|
|
4864
|
-
E("div",
|
|
4598
|
+
E("div", Dr, [b(a)(t.mime_type) ? (c(), v("img", {
|
|
4865
4599
|
key: 0,
|
|
4866
4600
|
src: t.small_url || t.url,
|
|
4867
4601
|
alt: t.filename,
|
|
4868
4602
|
class: "tpl:size-full tpl:object-cover",
|
|
4869
4603
|
loading: "lazy"
|
|
4870
|
-
}, null, 8,
|
|
4604
|
+
}, null, 8, Or)) : (c(), S(xr, {
|
|
4871
4605
|
key: 1,
|
|
4872
4606
|
"mime-type": t.mime_type
|
|
4873
4607
|
}, null, 8, ["mime-type"]))]),
|
|
4874
|
-
E("div",
|
|
4875
|
-
E("div",
|
|
4608
|
+
E("div", kr, [E("p", Ar, h(t.filename), 1), E("p", jr, [E("span", null, h(f(t.size)), 1), b(a)(t.mime_type) && t.width && t.height ? (c(), v("span", Mr, h(t.width) + "×" + h(t.height), 1)) : y("", !0)])]),
|
|
4609
|
+
E("div", Nr, [E("button", {
|
|
4876
4610
|
class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded-full tpl:text-white",
|
|
4877
4611
|
style: { "background-color": "rgba(0, 0, 0, 0.6)" },
|
|
4878
4612
|
title: b(l).mediaLibrary.editFile,
|
|
4879
4613
|
onClick: x((e) => r("edit", t), ["stop"])
|
|
4880
|
-
}, [N(b(
|
|
4614
|
+
}, [N(b(L), {
|
|
4881
4615
|
size: 11,
|
|
4882
4616
|
"stroke-width": 2
|
|
4883
|
-
})], 8,
|
|
4617
|
+
})], 8, Pr), E("button", {
|
|
4884
4618
|
class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded-full tpl:text-white",
|
|
4885
4619
|
style: { "background-color": "rgba(0, 0, 0, 0.6)" },
|
|
4886
4620
|
title: b(l).mediaLibrary.replaceFile,
|
|
@@ -4888,18 +4622,18 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
|
|
|
4888
4622
|
}, [N(b(Se), {
|
|
4889
4623
|
size: 11,
|
|
4890
4624
|
"stroke-width": 2
|
|
4891
|
-
})], 8,
|
|
4892
|
-
e.selectedIds.has(t.id) ? (c(), v("div",
|
|
4625
|
+
})], 8, Fr)]),
|
|
4626
|
+
e.selectedIds.has(t.id) ? (c(), v("div", Ir, [N(b(I), {
|
|
4893
4627
|
size: 12,
|
|
4894
4628
|
"stroke-width": 3
|
|
4895
4629
|
})])) : y("", !0)
|
|
4896
|
-
], 14,
|
|
4630
|
+
], 14, Er))), 128))])),
|
|
4897
4631
|
E("div", {
|
|
4898
4632
|
ref_key: "sentinelRef",
|
|
4899
4633
|
ref: d,
|
|
4900
4634
|
class: "tpl:h-4"
|
|
4901
4635
|
}, null, 512),
|
|
4902
|
-
e.isLoading && e.items.length > 0 ? (c(), v("div",
|
|
4636
|
+
e.isLoading && e.items.length > 0 ? (c(), v("div", Yr, [N(b(ve), {
|
|
4903
4637
|
class: "tpl-spinner",
|
|
4904
4638
|
size: 20,
|
|
4905
4639
|
"stroke-width": 2,
|
|
@@ -4907,20 +4641,20 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
|
|
|
4907
4641
|
})])) : y("", !0)
|
|
4908
4642
|
]));
|
|
4909
4643
|
}
|
|
4910
|
-
}), [["__scopeId", "data-v-78d7ed75"]]),
|
|
4644
|
+
}), [["__scopeId", "data-v-78d7ed75"]]), Zr = ["data-tpl-theme"], Qr = {
|
|
4911
4645
|
class: "tpl:mx-4 tpl:w-full tpl:max-w-sm tpl:rounded-lg tpl:p-5 tpl:shadow-xl",
|
|
4912
4646
|
style: { "background-color": "var(--tpl-bg-elevated)" }
|
|
4913
|
-
},
|
|
4647
|
+
}, $r = {
|
|
4914
4648
|
class: "tpl:mb-4 tpl:text-sm tpl:font-semibold",
|
|
4915
4649
|
style: { color: "var(--tpl-text)" }
|
|
4916
|
-
},
|
|
4650
|
+
}, ei = { class: "tpl:mb-3" }, ti = ["placeholder", "disabled"], ni = {
|
|
4917
4651
|
key: 0,
|
|
4918
4652
|
class: "tpl:mb-3 tpl:text-xs",
|
|
4919
4653
|
style: { color: "var(--tpl-danger)" }
|
|
4920
|
-
},
|
|
4654
|
+
}, ri = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, ii = ["disabled"], ai = ["disabled"], oi = {
|
|
4921
4655
|
key: 0,
|
|
4922
4656
|
class: "tpl:flex tpl:items-center tpl:gap-1.5"
|
|
4923
|
-
},
|
|
4657
|
+
}, si = { key: 1 }, ci = /* @__PURE__ */ M({
|
|
4924
4658
|
__name: "MediaImportUrlModal",
|
|
4925
4659
|
props: {
|
|
4926
4660
|
visible: { type: Boolean },
|
|
@@ -4958,9 +4692,9 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
|
|
|
4958
4692
|
style: { "background-color": "var(--tpl-overlay)" },
|
|
4959
4693
|
onClick: x(m, ["self"]),
|
|
4960
4694
|
onKeydown: _
|
|
4961
|
-
}, [E("div",
|
|
4962
|
-
E("h3",
|
|
4963
|
-
E("div",
|
|
4695
|
+
}, [E("div", Qr, [
|
|
4696
|
+
E("h3", $r, h(b(a).mediaLibrary.importFromUrl), 1),
|
|
4697
|
+
E("div", ei, [i(E("input", {
|
|
4964
4698
|
"onUpdate:modelValue": n[0] ||= (e) => l.value = e,
|
|
4965
4699
|
type: "url",
|
|
4966
4700
|
class: "tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:outline-none",
|
|
@@ -4972,9 +4706,9 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
|
|
|
4972
4706
|
placeholder: b(a).mediaLibrary.importUrlPlaceholder,
|
|
4973
4707
|
disabled: e.isImporting,
|
|
4974
4708
|
autofocus: ""
|
|
4975
|
-
}, null, 8,
|
|
4976
|
-
e.error ? (c(), v("p",
|
|
4977
|
-
E("div",
|
|
4709
|
+
}, null, 8, ti), [[w, l.value]])]),
|
|
4710
|
+
e.error ? (c(), v("p", ni, h(e.error), 1)) : y("", !0),
|
|
4711
|
+
E("div", ri, [E("button", {
|
|
4978
4712
|
class: T(["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": e.isImporting }]),
|
|
4979
4713
|
style: {
|
|
4980
4714
|
"border-color": "var(--tpl-border)",
|
|
@@ -4983,25 +4717,25 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
|
|
|
4983
4717
|
},
|
|
4984
4718
|
disabled: e.isImporting,
|
|
4985
4719
|
onClick: m
|
|
4986
|
-
}, h(b(a).mediaLibrary.cancel), 11,
|
|
4720
|
+
}, h(b(a).mediaLibrary.cancel), 11, ii), E("button", {
|
|
4987
4721
|
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",
|
|
4988
4722
|
style: { background: "linear-gradient(\n 135deg,\n var(--tpl-primary),\n var(--tpl-primary-hover)\n )" },
|
|
4989
4723
|
disabled: !l.value.trim() || e.isImporting,
|
|
4990
4724
|
onClick: u
|
|
4991
|
-
}, [e.isImporting ? (c(), v("span",
|
|
4725
|
+
}, [e.isImporting ? (c(), v("span", oi, [N(b(ve), {
|
|
4992
4726
|
class: "tpl:animate-spin",
|
|
4993
4727
|
size: 12,
|
|
4994
4728
|
"stroke-width": 2
|
|
4995
|
-
}), j(" " + h(b(a).mediaLibrary.importing), 1)])) : (c(), v("span",
|
|
4996
|
-
])], 40,
|
|
4729
|
+
}), j(" " + h(b(a).mediaLibrary.importing), 1)])) : (c(), v("span", si, h(b(a).mediaLibrary.import), 1))], 8, ai)])
|
|
4730
|
+
])], 40, Zr)) : y("", !0)]),
|
|
4997
4731
|
_: 1
|
|
4998
4732
|
})], 8, ["to"]));
|
|
4999
4733
|
}
|
|
5000
|
-
}),
|
|
4734
|
+
}), li = { class: "tpl:max-h-56 tpl:overflow-y-auto tpl:py-1" }, ui = ["disabled", "onClick"], di = { class: "tpl:truncate" }, fi = {
|
|
5001
4735
|
key: 0,
|
|
5002
4736
|
class: "tpl:shrink-0",
|
|
5003
4737
|
style: { color: "var(--tpl-text-dim)" }
|
|
5004
|
-
},
|
|
4738
|
+
}, pi = /* @__PURE__ */ M({
|
|
5005
4739
|
__name: "MediaMovePicker",
|
|
5006
4740
|
props: {
|
|
5007
4741
|
folders: {},
|
|
@@ -5019,7 +4753,7 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
|
|
|
5019
4753
|
}), r.children?.length && n.push(...a(r.children, t + 1));
|
|
5020
4754
|
return n;
|
|
5021
4755
|
}
|
|
5022
|
-
return
|
|
4756
|
+
return oe(i, () => {
|
|
5023
4757
|
n("close");
|
|
5024
4758
|
}), (t, o) => (c(), v("div", {
|
|
5025
4759
|
ref_key: "pickerRef",
|
|
@@ -5029,7 +4763,7 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
|
|
|
5029
4763
|
"border-color": "var(--tpl-border)",
|
|
5030
4764
|
"background-color": "var(--tpl-bg-elevated)"
|
|
5031
4765
|
}
|
|
5032
|
-
}, [E("div",
|
|
4766
|
+
}, [E("div", li, [e.currentFolderId === null ? y("", !0) : (c(), v("button", {
|
|
5033
4767
|
key: 0,
|
|
5034
4768
|
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",
|
|
5035
4769
|
style: { color: "var(--tpl-text)" },
|
|
@@ -5054,27 +4788,27 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
|
|
|
5054
4788
|
size: 14,
|
|
5055
4789
|
"stroke-width": 1.5
|
|
5056
4790
|
}),
|
|
5057
|
-
E("span",
|
|
5058
|
-
t.id === e.currentFolderId ? (c(), v("span",
|
|
5059
|
-
], 12,
|
|
4791
|
+
E("span", di, h(t.name), 1),
|
|
4792
|
+
t.id === e.currentFolderId ? (c(), v("span", fi, h(b(r).mediaLibrary.currentFolder), 1)) : y("", !0)
|
|
4793
|
+
], 12, ui))), 128))])], 512));
|
|
5060
4794
|
}
|
|
5061
|
-
}),
|
|
4795
|
+
}), mi = { class: "tpl:flex tpl:items-center tpl:gap-3" }, hi = ["src", "alt"], gi = {
|
|
5062
4796
|
key: 1,
|
|
5063
4797
|
class: "tpl:flex tpl:size-10 tpl:shrink-0 tpl:items-center tpl:justify-center tpl:overflow-hidden tpl:rounded",
|
|
5064
4798
|
style: { border: "1px solid var(--tpl-border)" }
|
|
5065
|
-
},
|
|
4799
|
+
}, _i = { class: "tpl:min-w-0 tpl:flex-1" }, vi = {
|
|
5066
4800
|
class: "tpl:truncate tpl:text-xs tpl:font-medium",
|
|
5067
4801
|
style: { color: "var(--tpl-text)" }
|
|
5068
|
-
},
|
|
4802
|
+
}, yi = {
|
|
5069
4803
|
class: "tpl:mt-0.5 tpl:text-[10px]",
|
|
5070
4804
|
style: { color: "var(--tpl-text-muted)" }
|
|
5071
|
-
},
|
|
4805
|
+
}, bi = {
|
|
5072
4806
|
key: 2,
|
|
5073
4807
|
class: "tpl:shrink-0"
|
|
5074
|
-
},
|
|
4808
|
+
}, xi = {
|
|
5075
4809
|
class: "tpl:block tpl:text-[10px]",
|
|
5076
4810
|
style: { color: "var(--tpl-text-muted)" }
|
|
5077
|
-
},
|
|
4811
|
+
}, Si = ["value"], Ci = ["value"], wi = /*#__PURE__*/ Ce(/* @__PURE__ */ M({
|
|
5078
4812
|
__name: "MediaPreviewPanel",
|
|
5079
4813
|
props: {
|
|
5080
4814
|
item: {},
|
|
@@ -5133,7 +4867,7 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
|
|
|
5133
4867
|
return e ? e.join("/") : null;
|
|
5134
4868
|
}), m = _(() => a(n.item.mime_type));
|
|
5135
4869
|
function g(e) {
|
|
5136
|
-
return e < 1024 ? `${e} B` : e <
|
|
4870
|
+
return e < 1024 ? `${e} B` : e < 1048576 ? `${(e / 1024).toFixed(1)} KB` : `${(e / 1048576).toFixed(1)} MB`;
|
|
5137
4871
|
}
|
|
5138
4872
|
function x(e) {
|
|
5139
4873
|
return new Date(e).toLocaleDateString(void 0, {
|
|
@@ -5142,20 +4876,20 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
|
|
|
5142
4876
|
day: "numeric"
|
|
5143
4877
|
});
|
|
5144
4878
|
}
|
|
5145
|
-
return (t, n) => (c(), v("div",
|
|
4879
|
+
return (t, n) => (c(), v("div", mi, [
|
|
5146
4880
|
m.value ? (c(), v("img", {
|
|
5147
4881
|
key: 0,
|
|
5148
4882
|
src: l.value ?? void 0,
|
|
5149
4883
|
alt: e.item.alt_text || e.item.filename,
|
|
5150
4884
|
class: "tpl:size-10 tpl:shrink-0 tpl:rounded tpl:object-cover",
|
|
5151
4885
|
style: { border: "1px solid var(--tpl-border)" }
|
|
5152
|
-
}, null, 8,
|
|
4886
|
+
}, null, 8, hi)) : (c(), v("div", gi, [N(xr, {
|
|
5153
4887
|
"mime-type": e.item.mime_type,
|
|
5154
4888
|
class: "tpl-preview-icon"
|
|
5155
4889
|
}, null, 8, ["mime-type"])])),
|
|
5156
|
-
E("div",
|
|
5157
|
-
E("p",
|
|
5158
|
-
E("p",
|
|
4890
|
+
E("div", _i, [
|
|
4891
|
+
E("p", vi, h(e.item.filename), 1),
|
|
4892
|
+
E("p", yi, [
|
|
5159
4893
|
j(h(g(e.item.size)) + " · " + h(x(e.item.created_at)) + " ", 1),
|
|
5160
4894
|
m.value && e.item.width && e.item.height ? (c(), v(A, { key: 0 }, [j(" · " + h(e.item.width) + "×" + h(e.item.height) + "px ", 1)], 64)) : y("", !0),
|
|
5161
4895
|
p.value ? (c(), v(A, { key: 1 }, [
|
|
@@ -5174,7 +4908,7 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
|
|
|
5174
4908
|
style: { color: "var(--tpl-text-dim)" }
|
|
5175
4909
|
}, h(e.item.alt_text || "\xA0"), 3)) : y("", !0)
|
|
5176
4910
|
]),
|
|
5177
|
-
s.value ? (c(), v("div",
|
|
4911
|
+
s.value ? (c(), v("div", bi, [E("label", xi, h(b(i).mediaLibrary.conversionLabel), 1), E("select", {
|
|
5178
4912
|
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",
|
|
5179
4913
|
style: {
|
|
5180
4914
|
"border-color": "var(--tpl-border)",
|
|
@@ -5186,36 +4920,36 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
|
|
|
5186
4920
|
}, [(c(!0), v(A, null, u(o.value, (e) => (c(), v("option", {
|
|
5187
4921
|
key: e.value,
|
|
5188
4922
|
value: e.value
|
|
5189
|
-
}, h(e.label), 9,
|
|
4923
|
+
}, h(e.label), 9, Ci))), 128))], 40, Si)])) : y("", !0)
|
|
5190
4924
|
]));
|
|
5191
4925
|
}
|
|
5192
|
-
}), [["__scopeId", "data-v-56be5670"]]),
|
|
4926
|
+
}), [["__scopeId", "data-v-56be5670"]]), Ti = ["data-tpl-theme"], Ei = {
|
|
5193
4927
|
class: "tpl:mx-4 tpl:w-full tpl:max-w-sm tpl:rounded-lg tpl:p-5 tpl:shadow-xl",
|
|
5194
4928
|
style: { "background-color": "var(--tpl-bg-elevated)" }
|
|
5195
|
-
},
|
|
4929
|
+
}, Di = {
|
|
5196
4930
|
class: "tpl:mb-2 tpl:text-sm tpl:font-semibold",
|
|
5197
4931
|
style: { color: "var(--tpl-text)" }
|
|
5198
|
-
},
|
|
4932
|
+
}, Oi = {
|
|
5199
4933
|
class: "tpl:mb-2 tpl:text-xs",
|
|
5200
4934
|
style: { color: "var(--tpl-text-muted)" }
|
|
5201
|
-
},
|
|
4935
|
+
}, ki = {
|
|
5202
4936
|
key: 0,
|
|
5203
4937
|
class: "tpl:mb-3 tpl:text-xs",
|
|
5204
4938
|
style: { color: "var(--tpl-warning)" }
|
|
5205
|
-
},
|
|
4939
|
+
}, Ai = {
|
|
5206
4940
|
class: "tpl:mb-3 tpl:rounded tpl:border tpl:p-2",
|
|
5207
4941
|
style: { "border-color": "var(--tpl-border)" }
|
|
5208
|
-
},
|
|
4942
|
+
}, ji = {
|
|
5209
4943
|
class: "tpl:truncate tpl:text-xs tpl:font-medium",
|
|
5210
4944
|
style: { color: "var(--tpl-text)" }
|
|
5211
|
-
},
|
|
4945
|
+
}, Mi = { class: "tpl:mb-4" }, Ni = {
|
|
5212
4946
|
class: "tpl:mb-1 tpl:block tpl:text-xs tpl:font-medium",
|
|
5213
4947
|
style: { color: "var(--tpl-text-muted)" }
|
|
5214
|
-
},
|
|
4948
|
+
}, Pi = ["accept"], Fi = {
|
|
5215
4949
|
key: 1,
|
|
5216
4950
|
class: "tpl:mb-3 tpl:text-xs",
|
|
5217
4951
|
style: { color: "var(--tpl-danger)" }
|
|
5218
|
-
},
|
|
4952
|
+
}, Ii = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, Li = ["disabled"], Ri = ["disabled"], zi = /* @__PURE__ */ M({
|
|
5219
4953
|
__name: "MediaReplaceModal",
|
|
5220
4954
|
props: {
|
|
5221
4955
|
visible: { type: Boolean },
|
|
@@ -5259,12 +4993,12 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
|
|
|
5259
4993
|
style: { "background-color": "var(--tpl-overlay)" },
|
|
5260
4994
|
onClick: n[1] ||= x((e) => r("close"), ["self"]),
|
|
5261
4995
|
onKeydown: O
|
|
5262
|
-
}, [E("div",
|
|
5263
|
-
E("h3",
|
|
5264
|
-
E("p",
|
|
5265
|
-
w.value ? (c(), v("p",
|
|
5266
|
-
E("div",
|
|
5267
|
-
E("div",
|
|
4996
|
+
}, [E("div", Ei, [
|
|
4997
|
+
E("h3", Di, h(b(i).mediaLibrary.replaceWarningTitle), 1),
|
|
4998
|
+
E("p", Oi, h(b(i).mediaLibrary.replaceWarningMessage.replace("{extension}", `.${u.value}`)), 1),
|
|
4999
|
+
w.value ? (c(), v("p", ki, h(b(i).mediaLibrary.replaceWarningUsageNote.replace("{count}", e.usageInfo.template_count.toString())), 1)) : y("", !0),
|
|
5000
|
+
E("div", Ai, [E("p", ji, h(e.item.filename), 1)]),
|
|
5001
|
+
E("div", Mi, [E("label", Ni, h(b(i).mediaLibrary.replaceSelectFile), 1), E("input", {
|
|
5268
5002
|
ref_key: "fileInputRef",
|
|
5269
5003
|
ref: s,
|
|
5270
5004
|
type: "file",
|
|
@@ -5276,9 +5010,9 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
|
|
|
5276
5010
|
color: "var(--tpl-text)"
|
|
5277
5011
|
},
|
|
5278
5012
|
onChange: T
|
|
5279
|
-
}, null, 40,
|
|
5280
|
-
e.error ? (c(), v("p",
|
|
5281
|
-
E("div",
|
|
5013
|
+
}, null, 40, Pi)]),
|
|
5014
|
+
e.error ? (c(), v("p", Fi, h(e.error), 1)) : y("", !0),
|
|
5015
|
+
E("div", Ii, [E("button", {
|
|
5282
5016
|
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",
|
|
5283
5017
|
style: {
|
|
5284
5018
|
"border-color": "var(--tpl-border)",
|
|
@@ -5287,29 +5021,29 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
|
|
|
5287
5021
|
},
|
|
5288
5022
|
disabled: e.isReplacing,
|
|
5289
5023
|
onClick: n[0] ||= (e) => r("close")
|
|
5290
|
-
}, h(b(i).mediaLibrary.cancel), 9,
|
|
5024
|
+
}, h(b(i).mediaLibrary.cancel), 9, Li), E("button", {
|
|
5291
5025
|
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",
|
|
5292
5026
|
style: { background: "linear-gradient(\n 135deg,\n var(--tpl-primary),\n var(--tpl-primary-hover)\n )" },
|
|
5293
5027
|
disabled: !l.value || e.isReplacing,
|
|
5294
5028
|
onClick: D
|
|
5295
|
-
}, h(e.isReplacing ? b(i).mediaLibrary.replacing : b(i).mediaLibrary.replace), 9,
|
|
5296
|
-
])], 40,
|
|
5029
|
+
}, h(e.isReplacing ? b(i).mediaLibrary.replacing : b(i).mediaLibrary.replace), 9, Ri)])
|
|
5030
|
+
])], 40, Ti)) : y("", !0)]),
|
|
5297
5031
|
_: 1
|
|
5298
5032
|
})], 8, ["to"]));
|
|
5299
5033
|
}
|
|
5300
|
-
}),
|
|
5034
|
+
}), Bi = {
|
|
5301
5035
|
key: 0,
|
|
5302
5036
|
class: "tpl:flex tpl:items-center tpl:gap-2"
|
|
5303
|
-
},
|
|
5037
|
+
}, Vi = {
|
|
5304
5038
|
class: "tpl:text-xs",
|
|
5305
5039
|
style: { color: "var(--tpl-text-muted)" }
|
|
5306
|
-
},
|
|
5040
|
+
}, Hi = {
|
|
5307
5041
|
class: "tpl:text-xs",
|
|
5308
5042
|
style: { color: "var(--tpl-text-muted)" }
|
|
5309
|
-
},
|
|
5043
|
+
}, Ui = {
|
|
5310
5044
|
class: "tpl:mt-1 tpl:text-[10px]",
|
|
5311
5045
|
style: { color: "var(--tpl-text-dim)" }
|
|
5312
|
-
},
|
|
5046
|
+
}, Wi = /* @__PURE__ */ M({
|
|
5313
5047
|
__name: "MediaUploadZone",
|
|
5314
5048
|
props: {
|
|
5315
5049
|
isUploading: { type: Boolean },
|
|
@@ -5327,9 +5061,9 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
|
|
|
5327
5061
|
let t = u(e);
|
|
5328
5062
|
t.length && n("upload", t);
|
|
5329
5063
|
}
|
|
5330
|
-
let { isOverDropZone: f } =
|
|
5064
|
+
let { isOverDropZone: f } = P(l, { onDrop: (e) => {
|
|
5331
5065
|
e?.length && d(e);
|
|
5332
|
-
} }), { open: m, onChange: g } =
|
|
5066
|
+
} }), { open: m, onChange: g } = ae({
|
|
5333
5067
|
accept: o.value,
|
|
5334
5068
|
multiple: !0
|
|
5335
5069
|
});
|
|
@@ -5344,12 +5078,12 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
|
|
|
5344
5078
|
"background-color": "var(--tpl-bg)"
|
|
5345
5079
|
},
|
|
5346
5080
|
onClick: n[0] ||= (e) => b(m)()
|
|
5347
|
-
}, [e.isUploading ? (c(), v("div",
|
|
5081
|
+
}, [e.isUploading ? (c(), v("div", Bi, [N(b(ve), {
|
|
5348
5082
|
class: "tpl-spinner",
|
|
5349
5083
|
size: 20,
|
|
5350
5084
|
"stroke-width": 2,
|
|
5351
5085
|
style: { color: "var(--tpl-primary)" }
|
|
5352
|
-
}), E("span",
|
|
5086
|
+
}), E("span", Vi, h(e.uploadProgress && e.uploadProgress.total > 1 ? b(i)(b(r).mediaLibrary.uploadingProgress, {
|
|
5353
5087
|
current: e.uploadProgress.current,
|
|
5354
5088
|
total: e.uploadProgress.total
|
|
5355
5089
|
}) : b(r).mediaLibrary.uploading), 1)])) : (c(), v(A, { key: 1 }, [
|
|
@@ -5359,20 +5093,20 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
|
|
|
5359
5093
|
"stroke-width": 1.5,
|
|
5360
5094
|
style: { color: "var(--tpl-text-dim)" }
|
|
5361
5095
|
}),
|
|
5362
|
-
E("p",
|
|
5363
|
-
E("p",
|
|
5096
|
+
E("p", Hi, h(b(r).mediaLibrary.dropOrClick), 1),
|
|
5097
|
+
E("p", Ui, h(b(r).mediaLibrary.acceptedFormats), 1)
|
|
5364
5098
|
], 64))], 2));
|
|
5365
5099
|
}
|
|
5366
|
-
}),
|
|
5100
|
+
}), Gi = [
|
|
5367
5101
|
"width",
|
|
5368
5102
|
"height",
|
|
5369
5103
|
"viewBox"
|
|
5370
|
-
],
|
|
5104
|
+
], Ki = [
|
|
5371
5105
|
"cx",
|
|
5372
5106
|
"cy",
|
|
5373
5107
|
"r",
|
|
5374
5108
|
"stroke-width"
|
|
5375
|
-
],
|
|
5109
|
+
], qi = [
|
|
5376
5110
|
"cx",
|
|
5377
5111
|
"cy",
|
|
5378
5112
|
"r",
|
|
@@ -5380,14 +5114,14 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
|
|
|
5380
5114
|
"stroke",
|
|
5381
5115
|
"stroke-dasharray",
|
|
5382
5116
|
"stroke-dashoffset"
|
|
5383
|
-
],
|
|
5117
|
+
], Ji = {
|
|
5384
5118
|
key: 0,
|
|
5385
5119
|
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",
|
|
5386
5120
|
style: {
|
|
5387
5121
|
"background-color": "var(--tpl-text)",
|
|
5388
5122
|
color: "var(--tpl-bg-elevated)"
|
|
5389
5123
|
}
|
|
5390
|
-
},
|
|
5124
|
+
}, Yi = /* @__PURE__ */ M({
|
|
5391
5125
|
__name: "StorageProgressRing",
|
|
5392
5126
|
props: {
|
|
5393
5127
|
usedBytes: {},
|
|
@@ -5427,7 +5161,7 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
|
|
|
5427
5161
|
fill: "none",
|
|
5428
5162
|
"stroke-width": o.value,
|
|
5429
5163
|
style: { stroke: "var(--tpl-border)" }
|
|
5430
|
-
}, null, 8,
|
|
5164
|
+
}, null, 8, Ki), E("circle", {
|
|
5431
5165
|
cx: a.value / 2,
|
|
5432
5166
|
cy: a.value / 2,
|
|
5433
5167
|
r: s.value,
|
|
@@ -5438,7 +5172,7 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
|
|
|
5438
5172
|
"stroke-dasharray": l.value,
|
|
5439
5173
|
"stroke-dashoffset": d.value,
|
|
5440
5174
|
class: "tpl:transition-all tpl:duration-300 tpl:ease-out"
|
|
5441
|
-
}, null, 8,
|
|
5175
|
+
}, null, 8, qi)], 8, Gi)), N(C, {
|
|
5442
5176
|
"enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
|
|
5443
5177
|
"enter-from-class": "tpl:opacity-0 tpl:translate-y-1",
|
|
5444
5178
|
"enter-to-class": "tpl:opacity-100 tpl:translate-y-0",
|
|
@@ -5446,7 +5180,7 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
|
|
|
5446
5180
|
"leave-from-class": "tpl:opacity-100 tpl:translate-y-0",
|
|
5447
5181
|
"leave-to-class": "tpl:opacity-0 tpl:translate-y-1"
|
|
5448
5182
|
}, {
|
|
5449
|
-
default: f(() => [i.value ? (c(), v("div",
|
|
5183
|
+
default: f(() => [i.value ? (c(), v("div", Ji, [j(h(T.value) + " ", 1), t[2] ||= E("div", {
|
|
5450
5184
|
class: "tpl:absolute tpl:-top-1 tpl:left-1/2 tpl:size-2 tpl:-translate-x-1/2 tpl:rotate-45",
|
|
5451
5185
|
style: { "background-color": "var(--tpl-text)" }
|
|
5452
5186
|
}, null, -1)])) : y("", !0)]),
|
|
@@ -5456,7 +5190,7 @@ var Mn = ["data-tpl-theme"], Nn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, Pn
|
|
|
5456
5190
|
});
|
|
5457
5191
|
//#endregion
|
|
5458
5192
|
//#region ../media-library/src/composables/useMediaLibraryUI.ts
|
|
5459
|
-
function
|
|
5193
|
+
function Xi(e) {
|
|
5460
5194
|
let { library: t, canUseMediaFolders: n, translations: r } = e;
|
|
5461
5195
|
function i() {
|
|
5462
5196
|
return "value" in r && typeof r.value == "object" ? r.value : r;
|
|
@@ -5530,7 +5264,7 @@ function ta(e) {
|
|
|
5530
5264
|
async function re(e) {
|
|
5531
5265
|
await t.replaceFile(e);
|
|
5532
5266
|
}
|
|
5533
|
-
function
|
|
5267
|
+
function ae() {
|
|
5534
5268
|
t.clearSelection(), t.cancelDelete(), t.cancelReplace(), s.value = "", t.categoryFilter.value = null, t.sortOption.value = "newest", t.viewMode.value = "files", l.value = null, u.value = !1, c.value = "original";
|
|
5535
5269
|
}
|
|
5536
5270
|
return {
|
|
@@ -5561,12 +5295,12 @@ function ta(e) {
|
|
|
5561
5295
|
handleDeleteClick: M,
|
|
5562
5296
|
handleReplaceItem: N,
|
|
5563
5297
|
handleReplaceFile: re,
|
|
5564
|
-
resetUI:
|
|
5298
|
+
resetUI: ae
|
|
5565
5299
|
};
|
|
5566
5300
|
}
|
|
5567
5301
|
//#endregion
|
|
5568
5302
|
//#region ../media-library/src/components/MediaLibraryModal.vue?vue&type=script&setup=true&lang.ts
|
|
5569
|
-
var
|
|
5303
|
+
var Zi = ["data-tpl-theme"], Qi = {
|
|
5570
5304
|
class: "tpl-media-modal tpl-scale-in tpl:flex tpl:flex-col tpl:overflow-hidden tpl:rounded-[var(--tpl-radius-lg)]",
|
|
5571
5305
|
style: {
|
|
5572
5306
|
width: "900px",
|
|
@@ -5577,62 +5311,62 @@ var na = ["data-tpl-theme"], ra = {
|
|
|
5577
5311
|
border: "1px solid var(--tpl-border)",
|
|
5578
5312
|
"box-shadow": "var(--tpl-shadow-xl)"
|
|
5579
5313
|
}
|
|
5580
|
-
},
|
|
5314
|
+
}, $i = {
|
|
5581
5315
|
class: "tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-between tpl:border-b tpl:px-5 tpl:py-3.5",
|
|
5582
5316
|
style: { "border-color": "var(--tpl-border)" }
|
|
5583
|
-
},
|
|
5317
|
+
}, ea = {
|
|
5584
5318
|
class: "tpl:text-sm tpl:font-semibold",
|
|
5585
5319
|
style: { color: "var(--tpl-text)" }
|
|
5586
|
-
},
|
|
5320
|
+
}, ta = { class: "tpl:flex tpl:items-center tpl:gap-3" }, na = { class: "tpl:relative" }, ra = ["value", "placeholder"], ia = { class: "tpl:flex tpl:min-h-0 tpl:flex-1 tpl:overflow-hidden" }, aa = {
|
|
5587
5321
|
key: 0,
|
|
5588
5322
|
class: "tpl:flex tpl:w-48 tpl:shrink-0 tpl:flex-col tpl:border-r",
|
|
5589
5323
|
style: {
|
|
5590
5324
|
"border-color": "var(--tpl-border)",
|
|
5591
5325
|
"background-color": "var(--tpl-bg)"
|
|
5592
5326
|
}
|
|
5593
|
-
},
|
|
5327
|
+
}, oa = { class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:flex-col" }, sa = {
|
|
5594
5328
|
class: "tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-between tpl:border-b tpl:px-4 tpl:py-2.5",
|
|
5595
5329
|
style: { "border-color": "var(--tpl-border)" }
|
|
5596
|
-
},
|
|
5330
|
+
}, ca = { class: "tpl:flex tpl:items-center tpl:gap-2" }, la = ["title"], ua = {
|
|
5597
5331
|
key: 1,
|
|
5598
5332
|
class: "tpl:text-xs tpl:font-medium",
|
|
5599
5333
|
style: { color: "var(--tpl-text)" }
|
|
5600
|
-
},
|
|
5334
|
+
}, da = {
|
|
5601
5335
|
class: "tpl:flex tpl:rounded-md tpl:p-0.5",
|
|
5602
5336
|
style: {
|
|
5603
5337
|
border: "1px solid var(--tpl-border)",
|
|
5604
5338
|
"background-color": "var(--tpl-bg)"
|
|
5605
5339
|
}
|
|
5606
|
-
},
|
|
5340
|
+
}, fa = ["title"], pa = ["title"], ma = { class: "tpl:flex tpl:items-center tpl:gap-2" }, ha = ["value"], ga = { value: "" }, _a = ["value"], va = ["value"], ya = { value: "newest" }, ba = { value: "oldest" }, xa = { value: "name_asc" }, Sa = { value: "name_desc" }, Ca = { value: "size_asc" }, wa = { value: "size_desc" }, Ta = { class: "tpl:min-h-0 tpl:flex-1 tpl:overflow-y-auto" }, Ea = {
|
|
5607
5341
|
key: 0,
|
|
5608
5342
|
class: "tpl:px-4 tpl:pt-3"
|
|
5609
|
-
},
|
|
5343
|
+
}, Da = {
|
|
5610
5344
|
class: "tpl-scale-in tpl:mx-4 tpl:w-full tpl:max-w-sm tpl:rounded-[var(--tpl-radius-lg)] tpl:p-5",
|
|
5611
5345
|
style: {
|
|
5612
5346
|
"background-color": "var(--tpl-bg-elevated)",
|
|
5613
5347
|
"box-shadow": "var(--tpl-shadow-xl)"
|
|
5614
5348
|
}
|
|
5615
|
-
},
|
|
5349
|
+
}, Oa = {
|
|
5616
5350
|
class: "tpl:mb-2 tpl:text-sm tpl:font-semibold",
|
|
5617
5351
|
style: { color: "var(--tpl-text)" }
|
|
5618
|
-
},
|
|
5352
|
+
}, ka = {
|
|
5619
5353
|
key: 0,
|
|
5620
5354
|
class: "tpl:mb-4 tpl:text-xs",
|
|
5621
5355
|
style: { color: "var(--tpl-text-muted)" }
|
|
5622
|
-
},
|
|
5356
|
+
}, Aa = {
|
|
5623
5357
|
key: 1,
|
|
5624
5358
|
class: "tpl:mb-4 tpl:max-h-32 tpl:overflow-y-auto tpl:rounded tpl:border tpl:p-2",
|
|
5625
5359
|
style: { "border-color": "var(--tpl-border)" }
|
|
5626
|
-
},
|
|
5360
|
+
}, ja = { class: "tpl:font-medium" }, Ma = { style: { color: "var(--tpl-text-muted)" } }, Na = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, Pa = {
|
|
5627
5361
|
class: "tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-between tpl:border-t tpl:px-5 tpl:py-3",
|
|
5628
5362
|
style: { "border-color": "var(--tpl-border)" }
|
|
5629
|
-
},
|
|
5363
|
+
}, Fa = { class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:items-center tpl:gap-3" }, Ia = { class: "tpl:flex tpl:items-center tpl:gap-5" }, La = {
|
|
5630
5364
|
key: 0,
|
|
5631
5365
|
class: "tpl:flex tpl:items-center tpl:gap-2"
|
|
5632
|
-
},
|
|
5366
|
+
}, Ra = {
|
|
5633
5367
|
key: 1,
|
|
5634
5368
|
class: "tpl:relative"
|
|
5635
|
-
},
|
|
5369
|
+
}, za = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Ba = ["disabled"], Va = /* @__PURE__ */ M({
|
|
5636
5370
|
__name: "MediaLibraryModal",
|
|
5637
5371
|
props: {
|
|
5638
5372
|
visible: { type: Boolean },
|
|
@@ -5641,28 +5375,28 @@ var na = ["data-tpl-theme"], ra = {
|
|
|
5641
5375
|
},
|
|
5642
5376
|
emits: ["close", "select"],
|
|
5643
5377
|
setup(e, { emit: t }) {
|
|
5644
|
-
let n = e, r = t, { t: i } = B(), a = d("tplUiTheme");
|
|
5645
|
-
l(Re,
|
|
5646
|
-
let
|
|
5647
|
-
projectId:
|
|
5648
|
-
authManager:
|
|
5649
|
-
}), F =
|
|
5378
|
+
let n = e, r = t, { t: i } = B(), a = d("tplUiTheme"), o = ee(() => n.popoverTarget ?? null);
|
|
5379
|
+
l(Re, o);
|
|
5380
|
+
let s = d("authManager"), p = d("projectId"), m = _(() => p.value), w = d("planConfig"), D = _(() => w.hasFeature("media_folders")), O = _(() => w.hasFeature("import_from_url")), M = _(() => w.config.value?.storage.used_bytes ?? 0), ne = _(() => w.config.value?.storage.limit_bytes ?? 0), { isAcceptedMimeType: ie, availableCategories: ae } = Me(), P = De({
|
|
5381
|
+
projectId: m.value,
|
|
5382
|
+
authManager: s
|
|
5383
|
+
}), F = Xi({
|
|
5650
5384
|
library: P,
|
|
5651
|
-
canUseMediaFolders:
|
|
5385
|
+
canUseMediaFolders: D,
|
|
5652
5386
|
translations: i
|
|
5653
5387
|
});
|
|
5654
5388
|
te(() => n.visible, (e) => {
|
|
5655
5389
|
e ? (P.loadItems(), P.loadFrequentlyUsed()) : F.resetUI();
|
|
5656
5390
|
});
|
|
5657
|
-
function
|
|
5391
|
+
function oe(e) {
|
|
5658
5392
|
e.key === "Escape" && r("close");
|
|
5659
5393
|
}
|
|
5660
|
-
re(document, "keydown",
|
|
5661
|
-
function
|
|
5662
|
-
return P.previewItem.value ? !n.accept?.length ||
|
|
5394
|
+
re(document, "keydown", oe);
|
|
5395
|
+
function L() {
|
|
5396
|
+
return P.previewItem.value ? !n.accept?.length || ie(P.previewItem.value.mime_type, n.accept) : !1;
|
|
5663
5397
|
}
|
|
5664
|
-
function
|
|
5665
|
-
if (
|
|
5398
|
+
function le() {
|
|
5399
|
+
if (L()) {
|
|
5666
5400
|
let e = P.previewItem.value;
|
|
5667
5401
|
r("select", {
|
|
5668
5402
|
...e,
|
|
@@ -5683,14 +5417,14 @@ var na = ["data-tpl-theme"], ra = {
|
|
|
5683
5417
|
"data-tpl-theme": b(a),
|
|
5684
5418
|
class: "tpl tpl-media-overlay tpl:fixed tpl:inset-0 tpl:z-[9999]",
|
|
5685
5419
|
onClick: n[18] ||= x((e) => r("close"), ["self"])
|
|
5686
|
-
}, [E("div",
|
|
5687
|
-
E("div",
|
|
5688
|
-
N(
|
|
5689
|
-
"used-bytes":
|
|
5690
|
-
"limit-bytes":
|
|
5420
|
+
}, [E("div", Qi, [
|
|
5421
|
+
E("div", $i, [E("h2", ea, h(b(i).mediaLibrary.title), 1), E("div", ta, [
|
|
5422
|
+
N(Yi, {
|
|
5423
|
+
"used-bytes": M.value,
|
|
5424
|
+
"limit-bytes": ne.value,
|
|
5691
5425
|
size: 22
|
|
5692
5426
|
}, null, 8, ["used-bytes", "limit-bytes"]),
|
|
5693
|
-
E("div",
|
|
5427
|
+
E("div", na, [E("input", {
|
|
5694
5428
|
value: b(F).searchInput.value,
|
|
5695
5429
|
type: "text",
|
|
5696
5430
|
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)]",
|
|
@@ -5701,7 +5435,7 @@ var na = ["data-tpl-theme"], ra = {
|
|
|
5701
5435
|
},
|
|
5702
5436
|
placeholder: b(i).mediaLibrary.searchPlaceholder,
|
|
5703
5437
|
onInput: n[0] ||= (e) => b(F).handleSearchInput(e.target.value)
|
|
5704
|
-
}, null, 40,
|
|
5438
|
+
}, null, 40, ra), N(b(ce), {
|
|
5705
5439
|
class: "tpl:absolute tpl:top-1/2 tpl:left-2.5 tpl:-translate-y-1/2",
|
|
5706
5440
|
size: 13,
|
|
5707
5441
|
"stroke-width": 2,
|
|
@@ -5716,7 +5450,7 @@ var na = ["data-tpl-theme"], ra = {
|
|
|
5716
5450
|
"stroke-width": 2
|
|
5717
5451
|
})])
|
|
5718
5452
|
])]),
|
|
5719
|
-
E("div",
|
|
5453
|
+
E("div", ia, [N(C, {
|
|
5720
5454
|
"enter-active-class": "tpl:transition-all tpl:duration-200 tpl:ease-out",
|
|
5721
5455
|
"enter-from-class": "tpl:-ml-48 tpl:opacity-0",
|
|
5722
5456
|
"enter-to-class": "tpl:ml-0 tpl:opacity-100",
|
|
@@ -5724,7 +5458,7 @@ var na = ["data-tpl-theme"], ra = {
|
|
|
5724
5458
|
"leave-from-class": "tpl:ml-0 tpl:opacity-100",
|
|
5725
5459
|
"leave-to-class": "tpl:-ml-48 tpl:opacity-0"
|
|
5726
5460
|
}, {
|
|
5727
|
-
default: f(() => [
|
|
5461
|
+
default: f(() => [D.value && b(F).showSidebar.value ? (c(), v("div", aa, [N(yr, {
|
|
5728
5462
|
folders: b(P).folders.value,
|
|
5729
5463
|
"current-folder-id": b(P).currentFolderId.value,
|
|
5730
5464
|
"view-mode": b(P).viewMode.value,
|
|
@@ -5746,8 +5480,8 @@ var na = ["data-tpl-theme"], ra = {
|
|
|
5746
5480
|
"onShowFrequentlyUsed"
|
|
5747
5481
|
])])) : y("", !0)]),
|
|
5748
5482
|
_: 1
|
|
5749
|
-
}), E("div",
|
|
5750
|
-
|
|
5483
|
+
}), E("div", oa, [E("div", sa, [E("div", ca, [
|
|
5484
|
+
D.value ? (c(), v("button", {
|
|
5751
5485
|
key: 0,
|
|
5752
5486
|
class: "tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:transition-all tpl:duration-150",
|
|
5753
5487
|
style: k({
|
|
@@ -5757,11 +5491,11 @@ var na = ["data-tpl-theme"], ra = {
|
|
|
5757
5491
|
}),
|
|
5758
5492
|
title: b(F).showSidebar.value ? b(i).mediaLibrary.hideFolders : b(i).mediaLibrary.showFolders,
|
|
5759
5493
|
onClick: n[2] ||= (e) => b(F).showSidebar.value = !b(F).showSidebar.value
|
|
5760
|
-
}, [N(b(
|
|
5494
|
+
}, [N(b(se), {
|
|
5761
5495
|
size: 16,
|
|
5762
5496
|
"stroke-width": 2
|
|
5763
|
-
})], 12,
|
|
5764
|
-
b(P).viewMode.value === "frequently-used" ? (c(), v("span",
|
|
5497
|
+
})], 12, la)) : y("", !0),
|
|
5498
|
+
b(P).viewMode.value === "frequently-used" ? (c(), v("span", ua, h(b(i).mediaLibrary.frequentlyUsed), 1)) : (c(), S(je, {
|
|
5765
5499
|
key: 2,
|
|
5766
5500
|
folders: b(P).folders.value,
|
|
5767
5501
|
"current-folder-id": b(P).currentFolderId.value,
|
|
@@ -5771,7 +5505,7 @@ var na = ["data-tpl-theme"], ra = {
|
|
|
5771
5505
|
"current-folder-id",
|
|
5772
5506
|
"onNavigate"
|
|
5773
5507
|
])),
|
|
5774
|
-
E("div",
|
|
5508
|
+
E("div", da, [E("button", {
|
|
5775
5509
|
class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:transition-all tpl:duration-150",
|
|
5776
5510
|
style: k({
|
|
5777
5511
|
color: b(F).layoutMode.value === "grid" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
@@ -5782,7 +5516,7 @@ var na = ["data-tpl-theme"], ra = {
|
|
|
5782
5516
|
}, [N(b(_e), {
|
|
5783
5517
|
size: 14,
|
|
5784
5518
|
"stroke-width": 2
|
|
5785
|
-
})], 12,
|
|
5519
|
+
})], 12, fa), E("button", {
|
|
5786
5520
|
class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:transition-all tpl:duration-150",
|
|
5787
5521
|
style: k({
|
|
5788
5522
|
color: b(F).layoutMode.value === "list" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
@@ -5793,8 +5527,8 @@ var na = ["data-tpl-theme"], ra = {
|
|
|
5793
5527
|
}, [N(b(pe), {
|
|
5794
5528
|
size: 14,
|
|
5795
5529
|
"stroke-width": 2
|
|
5796
|
-
})], 12,
|
|
5797
|
-
]), E("div",
|
|
5530
|
+
})], 12, pa)])
|
|
5531
|
+
]), E("div", ma, [b(ae).length > 1 ? (c(), v("select", {
|
|
5798
5532
|
key: 0,
|
|
5799
5533
|
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",
|
|
5800
5534
|
style: {
|
|
@@ -5804,10 +5538,10 @@ var na = ["data-tpl-theme"], ra = {
|
|
|
5804
5538
|
},
|
|
5805
5539
|
value: b(P).categoryFilter.value ?? "",
|
|
5806
5540
|
onChange: n[5] ||= (e) => b(P).filterByCategory(e.target.value || null)
|
|
5807
|
-
}, [E("option",
|
|
5541
|
+
}, [E("option", ga, h(b(i).mediaLibrary.filterAll), 1), (c(!0), v(A, null, u(b(ae), (e) => (c(), v("option", {
|
|
5808
5542
|
key: e,
|
|
5809
5543
|
value: e
|
|
5810
|
-
}, h(b(F).getCategoryLabel(e)), 9,
|
|
5544
|
+
}, h(b(F).getCategoryLabel(e)), 9, _a))), 128))], 40, ha)) : y("", !0), E("select", {
|
|
5811
5545
|
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",
|
|
5812
5546
|
style: {
|
|
5813
5547
|
"border-color": "var(--tpl-border)",
|
|
@@ -5817,13 +5551,13 @@ var na = ["data-tpl-theme"], ra = {
|
|
|
5817
5551
|
value: b(P).sortOption.value,
|
|
5818
5552
|
onChange: n[6] ||= (e) => b(P).sortBy(e.target.value)
|
|
5819
5553
|
}, [
|
|
5820
|
-
E("option",
|
|
5821
|
-
E("option",
|
|
5822
|
-
E("option",
|
|
5823
|
-
E("option",
|
|
5824
|
-
E("option",
|
|
5825
|
-
E("option",
|
|
5826
|
-
], 40,
|
|
5554
|
+
E("option", ya, h(b(i).mediaLibrary.sortNewest), 1),
|
|
5555
|
+
E("option", ba, h(b(i).mediaLibrary.sortOldest), 1),
|
|
5556
|
+
E("option", xa, h(b(i).mediaLibrary.sortNameAsc), 1),
|
|
5557
|
+
E("option", Sa, h(b(i).mediaLibrary.sortNameDesc), 1),
|
|
5558
|
+
E("option", Ca, h(b(i).mediaLibrary.sortSizeAsc), 1),
|
|
5559
|
+
E("option", wa, h(b(i).mediaLibrary.sortSizeDesc), 1)
|
|
5560
|
+
], 40, va)])]), E("div", Ta, [b(P).viewMode.value === "files" ? (c(), v("div", Ea, [N(Wi, {
|
|
5827
5561
|
"is-uploading": b(P).isUploading.value,
|
|
5828
5562
|
"upload-progress": b(P).uploadProgress.value,
|
|
5829
5563
|
onUpload: b(F).handleUpload
|
|
@@ -5831,7 +5565,7 @@ var na = ["data-tpl-theme"], ra = {
|
|
|
5831
5565
|
"is-uploading",
|
|
5832
5566
|
"upload-progress",
|
|
5833
5567
|
"onUpload"
|
|
5834
|
-
]),
|
|
5568
|
+
]), O.value ? (c(), v("button", {
|
|
5835
5569
|
key: 0,
|
|
5836
5570
|
class: "tpl:mt-2 tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:border-dashed tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
5837
5571
|
style: {
|
|
@@ -5843,7 +5577,7 @@ var na = ["data-tpl-theme"], ra = {
|
|
|
5843
5577
|
}, [N(b(he), {
|
|
5844
5578
|
size: 14,
|
|
5845
5579
|
"stroke-width": 2
|
|
5846
|
-
}), j(" " + h(b(i).mediaLibrary.importFromUrl), 1)])) : y("", !0)])) : y("", !0), N(
|
|
5580
|
+
}), j(" " + h(b(i).mediaLibrary.importFromUrl), 1)])) : y("", !0)])) : y("", !0), N(Xr, {
|
|
5847
5581
|
items: b(F).displayItems.value,
|
|
5848
5582
|
"selected-ids": b(P).selectedItems.value,
|
|
5849
5583
|
"is-loading": b(P).isLoading.value,
|
|
@@ -5868,7 +5602,7 @@ var na = ["data-tpl-theme"], ra = {
|
|
|
5868
5602
|
"onEdit",
|
|
5869
5603
|
"onReplace"
|
|
5870
5604
|
])])])]),
|
|
5871
|
-
N(
|
|
5605
|
+
N(ci, {
|
|
5872
5606
|
visible: b(F).showImportUrlModal.value,
|
|
5873
5607
|
"is-importing": b(P).isImportingFromUrl.value,
|
|
5874
5608
|
error: b(P).importFromUrlError.value,
|
|
@@ -5880,7 +5614,7 @@ var na = ["data-tpl-theme"], ra = {
|
|
|
5880
5614
|
"error",
|
|
5881
5615
|
"onImport"
|
|
5882
5616
|
]),
|
|
5883
|
-
N(
|
|
5617
|
+
N(sr, {
|
|
5884
5618
|
visible: !!b(F).editingItem.value,
|
|
5885
5619
|
item: b(F).editingItem.value,
|
|
5886
5620
|
onSave: b(F).handleEditSave,
|
|
@@ -5890,7 +5624,7 @@ var na = ["data-tpl-theme"], ra = {
|
|
|
5890
5624
|
"item",
|
|
5891
5625
|
"onSave"
|
|
5892
5626
|
]),
|
|
5893
|
-
N(
|
|
5627
|
+
N(zi, {
|
|
5894
5628
|
visible: b(P).showReplaceWarning.value,
|
|
5895
5629
|
item: b(P).pendingReplaceItem.value,
|
|
5896
5630
|
"usage-info": b(P).replaceUsageInfo.value,
|
|
@@ -5924,19 +5658,19 @@ var na = ["data-tpl-theme"], ra = {
|
|
|
5924
5658
|
"-webkit-backdrop-filter": "blur(8px)"
|
|
5925
5659
|
},
|
|
5926
5660
|
onClick: n[12] ||= x((...e) => b(P).cancelDelete && b(P).cancelDelete(...e), ["self"])
|
|
5927
|
-
}, [E("div",
|
|
5928
|
-
E("h3",
|
|
5661
|
+
}, [E("div", Da, [
|
|
5662
|
+
E("h3", Oa, h(b(i).mediaLibrary.deleteWarningTitle), 1),
|
|
5929
5663
|
E("p", {
|
|
5930
5664
|
class: T(["tpl:text-xs", b(F).hasUsedFiles.value ? "tpl:mb-2" : "tpl:mb-4"]),
|
|
5931
5665
|
style: { color: "var(--tpl-text-muted)" }
|
|
5932
5666
|
}, h(b(i).mediaLibrary.deleteWarningMessage), 3),
|
|
5933
|
-
b(F).hasUsedFiles.value ? (c(), v("p",
|
|
5934
|
-
b(F).hasUsedFiles.value ? (c(), v("div",
|
|
5667
|
+
b(F).hasUsedFiles.value ? (c(), v("p", ka, h(b(i).mediaLibrary.deleteWarningUsageNote), 1)) : y("", !0),
|
|
5668
|
+
b(F).hasUsedFiles.value ? (c(), v("div", Aa, [(c(!0), v(A, null, u(b(P).deleteUsageInfo.value, (e, t) => (c(), v("div", {
|
|
5935
5669
|
key: t,
|
|
5936
5670
|
class: "tpl:text-xs",
|
|
5937
5671
|
style: { color: "var(--tpl-text)" }
|
|
5938
|
-
}, [e.template_count > 0 ? (c(), v(A, { key: 0 }, [E("span",
|
|
5939
|
-
E("div",
|
|
5672
|
+
}, [e.template_count > 0 ? (c(), v(A, { key: 0 }, [E("span", ja, h(b(F).displayItems.value.find((e) => e.id === t)?.filename || t), 1), E("span", Ma, " - " + h(b(i).mediaLibrary.usedInTemplates.replace("{count}", e.template_count.toString())), 1)], 64)) : y("", !0)]))), 128))])) : y("", !0),
|
|
5673
|
+
E("div", Na, [E("button", {
|
|
5940
5674
|
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",
|
|
5941
5675
|
style: {
|
|
5942
5676
|
"border-color": "var(--tpl-border)",
|
|
@@ -5956,7 +5690,7 @@ var na = ["data-tpl-theme"], ra = {
|
|
|
5956
5690
|
])])) : y("", !0)]),
|
|
5957
5691
|
_: 1
|
|
5958
5692
|
}),
|
|
5959
|
-
E("div",
|
|
5693
|
+
E("div", Pa, [E("div", Fa, [b(P).previewItem.value ? (c(), S(wi, {
|
|
5960
5694
|
key: 0,
|
|
5961
5695
|
"selected-conversion": b(F).selectedConversion.value,
|
|
5962
5696
|
"onUpdate:selectedConversion": n[13] ||= (e) => b(F).selectedConversion.value = e,
|
|
@@ -5966,7 +5700,7 @@ var na = ["data-tpl-theme"], ra = {
|
|
|
5966
5700
|
"selected-conversion",
|
|
5967
5701
|
"item",
|
|
5968
5702
|
"folders"
|
|
5969
|
-
])) : y("", !0)]), E("div",
|
|
5703
|
+
])) : y("", !0)]), E("div", Ia, [b(P).selectedItems.value.size > 0 ? (c(), v("div", La, [b(P).previewItem.value ? (c(), v("button", {
|
|
5970
5704
|
key: 0,
|
|
5971
5705
|
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",
|
|
5972
5706
|
style: k({
|
|
@@ -5975,7 +5709,7 @@ var na = ["data-tpl-theme"], ra = {
|
|
|
5975
5709
|
backgroundColor: "var(--tpl-bg)"
|
|
5976
5710
|
}),
|
|
5977
5711
|
onClick: n[14] ||= (e) => b(F).copy(b(F).selectedUrl.value)
|
|
5978
|
-
}, [b(F).copied.value ? (c(), S(b(
|
|
5712
|
+
}, [b(F).copied.value ? (c(), S(b(I), {
|
|
5979
5713
|
key: 1,
|
|
5980
5714
|
size: 12,
|
|
5981
5715
|
"stroke-width": 2
|
|
@@ -5983,7 +5717,7 @@ var na = ["data-tpl-theme"], ra = {
|
|
|
5983
5717
|
key: 0,
|
|
5984
5718
|
size: 12,
|
|
5985
5719
|
"stroke-width": 2
|
|
5986
|
-
})), j(" " + h(b(F).copied.value ? b(i).mediaLibrary.copied : b(i).mediaLibrary.copyUrl), 1)], 4)) : y("", !0),
|
|
5720
|
+
})), j(" " + h(b(F).copied.value ? b(i).mediaLibrary.copied : b(i).mediaLibrary.copyUrl), 1)], 4)) : y("", !0), D.value ? (c(), v("div", Ra, [E("button", {
|
|
5987
5721
|
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",
|
|
5988
5722
|
style: {
|
|
5989
5723
|
"border-color": "var(--tpl-border)",
|
|
@@ -5991,7 +5725,7 @@ var na = ["data-tpl-theme"], ra = {
|
|
|
5991
5725
|
"background-color": "var(--tpl-bg)"
|
|
5992
5726
|
},
|
|
5993
5727
|
onClick: n[15] ||= (e) => b(F).showMovePicker.value = !b(F).showMovePicker.value
|
|
5994
|
-
}, h(b(i).mediaLibrary.moveSelected), 1), b(F).showMovePicker.value ? (c(), S(
|
|
5728
|
+
}, h(b(i).mediaLibrary.moveSelected), 1), b(F).showMovePicker.value ? (c(), S(pi, {
|
|
5995
5729
|
key: 0,
|
|
5996
5730
|
folders: b(P).folders.value,
|
|
5997
5731
|
"current-folder-id": b(P).currentFolderId.value,
|
|
@@ -6001,7 +5735,7 @@ var na = ["data-tpl-theme"], ra = {
|
|
|
6001
5735
|
"folders",
|
|
6002
5736
|
"current-folder-id",
|
|
6003
5737
|
"onSelect"
|
|
6004
|
-
])) : y("", !0)])) : y("", !0)])) : y("", !0), E("div",
|
|
5738
|
+
])) : y("", !0)])) : y("", !0)])) : y("", !0), E("div", za, [b(P).selectedItems.value.size > 0 ? (c(), v("button", {
|
|
6005
5739
|
key: 0,
|
|
6006
5740
|
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",
|
|
6007
5741
|
style: {
|
|
@@ -6016,14 +5750,14 @@ var na = ["data-tpl-theme"], ra = {
|
|
|
6016
5750
|
"background-color": "var(--tpl-primary)",
|
|
6017
5751
|
color: "var(--tpl-bg)"
|
|
6018
5752
|
},
|
|
6019
|
-
disabled: !
|
|
6020
|
-
onClick:
|
|
6021
|
-
}, h(e.accept?.length ? b(i).mediaLibrary.selectImage : b(i).mediaLibrary.selectFile), 9,
|
|
6022
|
-
])], 8,
|
|
5753
|
+
disabled: !L(),
|
|
5754
|
+
onClick: le
|
|
5755
|
+
}, h(e.accept?.length ? b(i).mediaLibrary.selectImage : b(i).mediaLibrary.selectFile), 9, Ba)])])])
|
|
5756
|
+
])], 8, Zi)) : y("", !0)]),
|
|
6023
5757
|
_: 1
|
|
6024
5758
|
})], 8, ["to"]));
|
|
6025
5759
|
}
|
|
6026
|
-
}),
|
|
5760
|
+
}), Ha = {
|
|
6027
5761
|
class: "tpl tpl:flex tpl:flex-col tpl:overflow-hidden tpl:rounded-[var(--tpl-radius-lg)]",
|
|
6028
5762
|
style: {
|
|
6029
5763
|
width: "100%",
|
|
@@ -6031,62 +5765,62 @@ var na = ["data-tpl-theme"], ra = {
|
|
|
6031
5765
|
"background-color": "var(--tpl-bg-elevated)",
|
|
6032
5766
|
border: "1px solid var(--tpl-border)"
|
|
6033
5767
|
}
|
|
6034
|
-
},
|
|
5768
|
+
}, Ua = {
|
|
6035
5769
|
class: "tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-between tpl:border-b tpl:px-5 tpl:py-3.5",
|
|
6036
5770
|
style: { "border-color": "var(--tpl-border)" }
|
|
6037
|
-
},
|
|
5771
|
+
}, Wa = {
|
|
6038
5772
|
class: "tpl:text-sm tpl:font-semibold",
|
|
6039
5773
|
style: { color: "var(--tpl-text)" }
|
|
6040
|
-
},
|
|
5774
|
+
}, Ga = { class: "tpl:flex tpl:items-center tpl:gap-3" }, Ka = { class: "tpl:relative" }, qa = ["value", "placeholder"], Ja = { class: "tpl:flex tpl:min-h-0 tpl:flex-1 tpl:overflow-hidden" }, Ya = {
|
|
6041
5775
|
key: 0,
|
|
6042
5776
|
class: "tpl:flex tpl:w-48 tpl:shrink-0 tpl:flex-col tpl:border-r",
|
|
6043
5777
|
style: {
|
|
6044
5778
|
"border-color": "var(--tpl-border)",
|
|
6045
5779
|
"background-color": "var(--tpl-bg)"
|
|
6046
5780
|
}
|
|
6047
|
-
},
|
|
5781
|
+
}, Xa = { class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:flex-col" }, Za = {
|
|
6048
5782
|
class: "tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-between tpl:border-b tpl:px-4 tpl:py-2.5",
|
|
6049
5783
|
style: { "border-color": "var(--tpl-border)" }
|
|
6050
|
-
},
|
|
5784
|
+
}, Qa = { class: "tpl:flex tpl:items-center tpl:gap-2" }, $a = ["title"], eo = {
|
|
6051
5785
|
key: 1,
|
|
6052
5786
|
class: "tpl:text-xs tpl:font-medium",
|
|
6053
5787
|
style: { color: "var(--tpl-text)" }
|
|
6054
|
-
},
|
|
5788
|
+
}, to = {
|
|
6055
5789
|
class: "tpl:flex tpl:rounded-md tpl:p-0.5",
|
|
6056
5790
|
style: {
|
|
6057
5791
|
border: "1px solid var(--tpl-border)",
|
|
6058
5792
|
"background-color": "var(--tpl-bg)"
|
|
6059
5793
|
}
|
|
6060
|
-
},
|
|
5794
|
+
}, no = ["title"], ro = ["title"], io = { class: "tpl:flex tpl:items-center tpl:gap-2" }, ao = ["value"], oo = { value: "" }, so = ["value"], co = ["value"], lo = { value: "newest" }, uo = { value: "oldest" }, fo = { value: "name_asc" }, po = { value: "name_desc" }, mo = { value: "size_asc" }, ho = { value: "size_desc" }, go = { class: "tpl:min-h-0 tpl:flex-1 tpl:overflow-y-auto" }, _o = {
|
|
6061
5795
|
key: 0,
|
|
6062
5796
|
class: "tpl:px-4 tpl:pt-3"
|
|
6063
|
-
},
|
|
5797
|
+
}, vo = {
|
|
6064
5798
|
class: "tpl-scale-in tpl:mx-4 tpl:w-full tpl:max-w-sm tpl:rounded-[var(--tpl-radius-lg)] tpl:p-5",
|
|
6065
5799
|
style: {
|
|
6066
5800
|
"background-color": "var(--tpl-bg-elevated)",
|
|
6067
5801
|
"box-shadow": "var(--tpl-shadow-xl)"
|
|
6068
5802
|
}
|
|
6069
|
-
},
|
|
5803
|
+
}, yo = {
|
|
6070
5804
|
class: "tpl:mb-2 tpl:text-sm tpl:font-semibold",
|
|
6071
5805
|
style: { color: "var(--tpl-text)" }
|
|
6072
|
-
},
|
|
5806
|
+
}, bo = {
|
|
6073
5807
|
key: 0,
|
|
6074
5808
|
class: "tpl:mb-4 tpl:text-xs",
|
|
6075
5809
|
style: { color: "var(--tpl-text-muted)" }
|
|
6076
|
-
},
|
|
5810
|
+
}, xo = {
|
|
6077
5811
|
key: 1,
|
|
6078
5812
|
class: "tpl:mb-4 tpl:max-h-32 tpl:overflow-y-auto tpl:rounded tpl:border tpl:p-2",
|
|
6079
5813
|
style: { "border-color": "var(--tpl-border)" }
|
|
6080
|
-
},
|
|
5814
|
+
}, So = { class: "tpl:font-medium" }, Co = { style: { color: "var(--tpl-text-muted)" } }, wo = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, To = {
|
|
6081
5815
|
class: "tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-between tpl:border-t tpl:px-5 tpl:py-3",
|
|
6082
5816
|
style: { "border-color": "var(--tpl-border)" }
|
|
6083
|
-
},
|
|
5817
|
+
}, Eo = { class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:items-center tpl:gap-3" }, Do = { class: "tpl:flex tpl:items-center tpl:gap-5" }, Oo = {
|
|
6084
5818
|
key: 0,
|
|
6085
5819
|
class: "tpl:flex tpl:items-center tpl:gap-2"
|
|
6086
|
-
},
|
|
5820
|
+
}, ko = {
|
|
6087
5821
|
key: 1,
|
|
6088
5822
|
class: "tpl:relative"
|
|
6089
|
-
},
|
|
5823
|
+
}, Ao = { class: "tpl:flex tpl:items-center tpl:gap-2" }, jo = ["disabled"], Mo = /* @__PURE__ */ M({
|
|
6090
5824
|
__name: "MediaLibrary",
|
|
6091
5825
|
props: {
|
|
6092
5826
|
authManager: {},
|
|
@@ -6099,39 +5833,41 @@ var na = ["data-tpl-theme"], ra = {
|
|
|
6099
5833
|
emits: ["ready"],
|
|
6100
5834
|
setup(t, { emit: n }) {
|
|
6101
5835
|
let r = t, i = n, a = _(() => r.translations);
|
|
6102
|
-
l("translations", r.translations), l("authManager", r.authManager), l("projectId", _(() => r.projectId))
|
|
6103
|
-
|
|
5836
|
+
l("translations", r.translations), l("authManager", r.authManager), l("projectId", _(() => r.projectId));
|
|
5837
|
+
let o = p(r.planConfig);
|
|
5838
|
+
l("planConfig", {
|
|
5839
|
+
config: o,
|
|
6104
5840
|
isLoading: p(!1),
|
|
6105
5841
|
hasFeature: (e) => r.planConfig.features[e] ?? !1,
|
|
6106
5842
|
features: _(() => r.planConfig.features),
|
|
6107
5843
|
fetchConfig: async () => {}
|
|
6108
5844
|
});
|
|
6109
|
-
let
|
|
5845
|
+
let s = _(() => r.planConfig.features.media_folders ?? !1), d = _(() => r.planConfig.features.import_from_url ?? !1), m = _(() => r.planConfig.storage.used_bytes ?? 0), g = _(() => r.planConfig.storage.limit_bytes ?? 0), { availableCategories: w } = Me(), D = De({
|
|
6110
5846
|
projectId: r.projectId,
|
|
6111
5847
|
authManager: r.authManager,
|
|
6112
5848
|
onError: r.onError
|
|
6113
|
-
}),
|
|
6114
|
-
library:
|
|
6115
|
-
canUseMediaFolders:
|
|
5849
|
+
}), O = Xi({
|
|
5850
|
+
library: D,
|
|
5851
|
+
canUseMediaFolders: s,
|
|
6116
5852
|
translations: a
|
|
6117
5853
|
});
|
|
6118
|
-
function
|
|
6119
|
-
if (!
|
|
6120
|
-
let e =
|
|
5854
|
+
function ee() {
|
|
5855
|
+
if (!D.previewItem.value) return;
|
|
5856
|
+
let e = D.previewItem.value;
|
|
6121
5857
|
r.onSelect?.({
|
|
6122
5858
|
...e,
|
|
6123
|
-
url:
|
|
5859
|
+
url: O.selectedUrl.value || e.url
|
|
6124
5860
|
});
|
|
6125
5861
|
}
|
|
6126
5862
|
return e(() => {
|
|
6127
|
-
|
|
6128
|
-
}), (e, n) => (c(), v("div",
|
|
6129
|
-
E("div",
|
|
6130
|
-
"used-bytes":
|
|
6131
|
-
"limit-bytes":
|
|
5863
|
+
D.loadItems(), D.loadFrequentlyUsed(), i("ready");
|
|
5864
|
+
}), (e, n) => (c(), v("div", Ha, [
|
|
5865
|
+
E("div", Ua, [E("h2", Wa, h(a.value.mediaLibrary.title), 1), E("div", Ga, [N(Yi, {
|
|
5866
|
+
"used-bytes": m.value,
|
|
5867
|
+
"limit-bytes": g.value,
|
|
6132
5868
|
size: 22
|
|
6133
|
-
}, null, 8, ["used-bytes", "limit-bytes"]), E("div",
|
|
6134
|
-
value: b(
|
|
5869
|
+
}, null, 8, ["used-bytes", "limit-bytes"]), E("div", Ka, [E("input", {
|
|
5870
|
+
value: b(O).searchInput.value,
|
|
6135
5871
|
type: "text",
|
|
6136
5872
|
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)]",
|
|
6137
5873
|
style: {
|
|
@@ -6140,14 +5876,14 @@ var na = ["data-tpl-theme"], ra = {
|
|
|
6140
5876
|
color: "var(--tpl-text)"
|
|
6141
5877
|
},
|
|
6142
5878
|
placeholder: a.value.mediaLibrary.searchPlaceholder,
|
|
6143
|
-
onInput: n[0] ||= (e) => b(
|
|
6144
|
-
}, null, 40,
|
|
5879
|
+
onInput: n[0] ||= (e) => b(O).handleSearchInput(e.target.value)
|
|
5880
|
+
}, null, 40, qa), N(b(ce), {
|
|
6145
5881
|
class: "tpl:absolute tpl:top-1/2 tpl:left-2.5 tpl:-translate-y-1/2",
|
|
6146
5882
|
size: 13,
|
|
6147
5883
|
"stroke-width": 2,
|
|
6148
5884
|
style: { color: "var(--tpl-text-dim)" }
|
|
6149
5885
|
})])])]),
|
|
6150
|
-
E("div",
|
|
5886
|
+
E("div", Ja, [N(C, {
|
|
6151
5887
|
"enter-active-class": "tpl:transition-all tpl:duration-200 tpl:ease-out",
|
|
6152
5888
|
"enter-from-class": "tpl:-ml-48 tpl:opacity-0",
|
|
6153
5889
|
"enter-to-class": "tpl:ml-0 tpl:opacity-100",
|
|
@@ -6155,16 +5891,16 @@ var na = ["data-tpl-theme"], ra = {
|
|
|
6155
5891
|
"leave-from-class": "tpl:ml-0 tpl:opacity-100",
|
|
6156
5892
|
"leave-to-class": "tpl:-ml-48 tpl:opacity-0"
|
|
6157
5893
|
}, {
|
|
6158
|
-
default: f(() => [
|
|
6159
|
-
folders: b(
|
|
6160
|
-
"current-folder-id": b(
|
|
6161
|
-
"view-mode": b(
|
|
6162
|
-
"has-frequently-used": b(
|
|
6163
|
-
onNavigate: b(
|
|
6164
|
-
onCreateFolder: b(
|
|
6165
|
-
onRenameFolder: b(
|
|
6166
|
-
onDeleteFolder: b(
|
|
6167
|
-
onShowFrequentlyUsed: b(
|
|
5894
|
+
default: f(() => [s.value && b(O).showSidebar.value ? (c(), v("div", Ya, [N(yr, {
|
|
5895
|
+
folders: b(D).folders.value,
|
|
5896
|
+
"current-folder-id": b(D).currentFolderId.value,
|
|
5897
|
+
"view-mode": b(D).viewMode.value,
|
|
5898
|
+
"has-frequently-used": b(O).hasFrequentlyUsed.value,
|
|
5899
|
+
onNavigate: b(D).navigateToFolder,
|
|
5900
|
+
onCreateFolder: b(O).handleCreateFolder,
|
|
5901
|
+
onRenameFolder: b(O).handleRenameFolder,
|
|
5902
|
+
onDeleteFolder: b(O).handleDeleteFolder,
|
|
5903
|
+
onShowFrequentlyUsed: b(D).showFrequentlyUsed
|
|
6168
5904
|
}, null, 8, [
|
|
6169
5905
|
"folders",
|
|
6170
5906
|
"current-folder-id",
|
|
@@ -6177,55 +5913,55 @@ var na = ["data-tpl-theme"], ra = {
|
|
|
6177
5913
|
"onShowFrequentlyUsed"
|
|
6178
5914
|
])])) : y("", !0)]),
|
|
6179
5915
|
_: 1
|
|
6180
|
-
}), E("div",
|
|
6181
|
-
|
|
5916
|
+
}), E("div", Xa, [E("div", Za, [E("div", Qa, [
|
|
5917
|
+
s.value ? (c(), v("button", {
|
|
6182
5918
|
key: 0,
|
|
6183
5919
|
class: "tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:transition-all tpl:duration-150",
|
|
6184
5920
|
style: k({
|
|
6185
|
-
color: b(
|
|
6186
|
-
backgroundColor: b(
|
|
6187
|
-
border: b(
|
|
5921
|
+
color: b(O).showSidebar.value ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
5922
|
+
backgroundColor: b(O).showSidebar.value ? "var(--tpl-bg)" : "transparent",
|
|
5923
|
+
border: b(O).showSidebar.value ? "1px solid var(--tpl-border)" : "1px solid transparent"
|
|
6188
5924
|
}),
|
|
6189
|
-
title: b(
|
|
6190
|
-
onClick: n[1] ||= (e) => b(
|
|
6191
|
-
}, [N(b(
|
|
5925
|
+
title: b(O).showSidebar.value ? a.value.mediaLibrary.hideFolders : a.value.mediaLibrary.showFolders,
|
|
5926
|
+
onClick: n[1] ||= (e) => b(O).showSidebar.value = !b(O).showSidebar.value
|
|
5927
|
+
}, [N(b(se), {
|
|
6192
5928
|
size: 16,
|
|
6193
5929
|
"stroke-width": 2
|
|
6194
|
-
})], 12,
|
|
6195
|
-
b(
|
|
5930
|
+
})], 12, $a)) : y("", !0),
|
|
5931
|
+
b(D).viewMode.value === "frequently-used" ? (c(), v("span", eo, h(a.value.mediaLibrary.frequentlyUsed), 1)) : (c(), S(je, {
|
|
6196
5932
|
key: 2,
|
|
6197
|
-
folders: b(
|
|
6198
|
-
"current-folder-id": b(
|
|
6199
|
-
onNavigate: b(
|
|
5933
|
+
folders: b(D).folders.value,
|
|
5934
|
+
"current-folder-id": b(D).currentFolderId.value,
|
|
5935
|
+
onNavigate: b(D).navigateToFolder
|
|
6200
5936
|
}, null, 8, [
|
|
6201
5937
|
"folders",
|
|
6202
5938
|
"current-folder-id",
|
|
6203
5939
|
"onNavigate"
|
|
6204
5940
|
])),
|
|
6205
|
-
E("div",
|
|
5941
|
+
E("div", to, [E("button", {
|
|
6206
5942
|
class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:transition-all tpl:duration-150",
|
|
6207
5943
|
style: k({
|
|
6208
|
-
color: b(
|
|
6209
|
-
backgroundColor: b(
|
|
5944
|
+
color: b(O).layoutMode.value === "grid" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
5945
|
+
backgroundColor: b(O).layoutMode.value === "grid" ? "var(--tpl-bg-elevated)" : "transparent"
|
|
6210
5946
|
}),
|
|
6211
5947
|
title: a.value.mediaLibrary.viewGrid,
|
|
6212
|
-
onClick: n[2] ||= (e) => b(
|
|
5948
|
+
onClick: n[2] ||= (e) => b(O).layoutMode.value = "grid"
|
|
6213
5949
|
}, [N(b(_e), {
|
|
6214
5950
|
size: 14,
|
|
6215
5951
|
"stroke-width": 2
|
|
6216
|
-
})], 12,
|
|
5952
|
+
})], 12, no), E("button", {
|
|
6217
5953
|
class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:transition-all tpl:duration-150",
|
|
6218
5954
|
style: k({
|
|
6219
|
-
color: b(
|
|
6220
|
-
backgroundColor: b(
|
|
5955
|
+
color: b(O).layoutMode.value === "list" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
5956
|
+
backgroundColor: b(O).layoutMode.value === "list" ? "var(--tpl-bg-elevated)" : "transparent"
|
|
6221
5957
|
}),
|
|
6222
5958
|
title: a.value.mediaLibrary.viewList,
|
|
6223
|
-
onClick: n[3] ||= (e) => b(
|
|
5959
|
+
onClick: n[3] ||= (e) => b(O).layoutMode.value = "list"
|
|
6224
5960
|
}, [N(b(pe), {
|
|
6225
5961
|
size: 14,
|
|
6226
5962
|
"stroke-width": 2
|
|
6227
|
-
})], 12,
|
|
6228
|
-
]), E("div",
|
|
5963
|
+
})], 12, ro)])
|
|
5964
|
+
]), E("div", io, [b(w).length > 1 ? (c(), v("select", {
|
|
6229
5965
|
key: 0,
|
|
6230
5966
|
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",
|
|
6231
5967
|
style: {
|
|
@@ -6233,36 +5969,36 @@ var na = ["data-tpl-theme"], ra = {
|
|
|
6233
5969
|
"background-color": "var(--tpl-bg)",
|
|
6234
5970
|
color: "var(--tpl-text)"
|
|
6235
5971
|
},
|
|
6236
|
-
value: b(
|
|
6237
|
-
onChange: n[4] ||= (e) => b(
|
|
6238
|
-
}, [E("option",
|
|
5972
|
+
value: b(D).categoryFilter.value ?? "",
|
|
5973
|
+
onChange: n[4] ||= (e) => b(D).filterByCategory(e.target.value || null)
|
|
5974
|
+
}, [E("option", oo, h(a.value.mediaLibrary.filterAll), 1), (c(!0), v(A, null, u(b(w), (e) => (c(), v("option", {
|
|
6239
5975
|
key: e,
|
|
6240
5976
|
value: e
|
|
6241
|
-
}, h(b(
|
|
5977
|
+
}, h(b(O).getCategoryLabel(e)), 9, so))), 128))], 40, ao)) : y("", !0), E("select", {
|
|
6242
5978
|
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",
|
|
6243
5979
|
style: {
|
|
6244
5980
|
"border-color": "var(--tpl-border)",
|
|
6245
5981
|
"background-color": "var(--tpl-bg)",
|
|
6246
5982
|
color: "var(--tpl-text)"
|
|
6247
5983
|
},
|
|
6248
|
-
value: b(
|
|
6249
|
-
onChange: n[5] ||= (e) => b(
|
|
5984
|
+
value: b(D).sortOption.value,
|
|
5985
|
+
onChange: n[5] ||= (e) => b(D).sortBy(e.target.value)
|
|
6250
5986
|
}, [
|
|
6251
|
-
E("option",
|
|
6252
|
-
E("option",
|
|
6253
|
-
E("option",
|
|
6254
|
-
E("option",
|
|
6255
|
-
E("option",
|
|
6256
|
-
E("option",
|
|
6257
|
-
], 40,
|
|
6258
|
-
"is-uploading": b(
|
|
6259
|
-
"upload-progress": b(
|
|
6260
|
-
onUpload: b(
|
|
5987
|
+
E("option", lo, h(a.value.mediaLibrary.sortNewest), 1),
|
|
5988
|
+
E("option", uo, h(a.value.mediaLibrary.sortOldest), 1),
|
|
5989
|
+
E("option", fo, h(a.value.mediaLibrary.sortNameAsc), 1),
|
|
5990
|
+
E("option", po, h(a.value.mediaLibrary.sortNameDesc), 1),
|
|
5991
|
+
E("option", mo, h(a.value.mediaLibrary.sortSizeAsc), 1),
|
|
5992
|
+
E("option", ho, h(a.value.mediaLibrary.sortSizeDesc), 1)
|
|
5993
|
+
], 40, co)])]), E("div", go, [b(D).viewMode.value === "files" ? (c(), v("div", _o, [N(Wi, {
|
|
5994
|
+
"is-uploading": b(D).isUploading.value,
|
|
5995
|
+
"upload-progress": b(D).uploadProgress.value,
|
|
5996
|
+
onUpload: b(O).handleUpload
|
|
6261
5997
|
}, null, 8, [
|
|
6262
5998
|
"is-uploading",
|
|
6263
5999
|
"upload-progress",
|
|
6264
6000
|
"onUpload"
|
|
6265
|
-
]),
|
|
6001
|
+
]), d.value ? (c(), v("button", {
|
|
6266
6002
|
key: 0,
|
|
6267
6003
|
class: "tpl:mt-2 tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:border-dashed tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
6268
6004
|
style: {
|
|
@@ -6270,21 +6006,21 @@ var na = ["data-tpl-theme"], ra = {
|
|
|
6270
6006
|
color: "var(--tpl-text-muted)",
|
|
6271
6007
|
"background-color": "var(--tpl-bg)"
|
|
6272
6008
|
},
|
|
6273
|
-
onClick: n[6] ||= (e) => b(
|
|
6009
|
+
onClick: n[6] ||= (e) => b(O).showImportUrlModal.value = !0
|
|
6274
6010
|
}, [N(b(he), {
|
|
6275
6011
|
size: 14,
|
|
6276
6012
|
"stroke-width": 2
|
|
6277
|
-
}), j(" " + h(a.value.mediaLibrary.importFromUrl), 1)])) : y("", !0)])) : y("", !0), N(
|
|
6278
|
-
items: b(
|
|
6279
|
-
"selected-ids": b(
|
|
6280
|
-
"is-loading": b(
|
|
6281
|
-
"has-more": b(
|
|
6282
|
-
layout: b(
|
|
6283
|
-
onSelect: b(
|
|
6284
|
-
onToggle: b(
|
|
6285
|
-
onLoadMore: b(
|
|
6286
|
-
onEdit: b(
|
|
6287
|
-
onReplace: b(
|
|
6013
|
+
}), j(" " + h(a.value.mediaLibrary.importFromUrl), 1)])) : y("", !0)])) : y("", !0), N(Xr, {
|
|
6014
|
+
items: b(O).displayItems.value,
|
|
6015
|
+
"selected-ids": b(D).selectedItems.value,
|
|
6016
|
+
"is-loading": b(D).isLoading.value,
|
|
6017
|
+
"has-more": b(D).viewMode.value === "files" && b(D).hasMore.value,
|
|
6018
|
+
layout: b(O).layoutMode.value,
|
|
6019
|
+
onSelect: b(O).handleSelect,
|
|
6020
|
+
onToggle: b(D).toggleSelection,
|
|
6021
|
+
onLoadMore: b(D).loadMore,
|
|
6022
|
+
onEdit: b(O).handleEditItem,
|
|
6023
|
+
onReplace: b(O).handleReplaceItem
|
|
6288
6024
|
}, null, 8, [
|
|
6289
6025
|
"items",
|
|
6290
6026
|
"selected-ids",
|
|
@@ -6297,36 +6033,36 @@ var na = ["data-tpl-theme"], ra = {
|
|
|
6297
6033
|
"onEdit",
|
|
6298
6034
|
"onReplace"
|
|
6299
6035
|
])])])]),
|
|
6300
|
-
N(
|
|
6301
|
-
visible: b(
|
|
6302
|
-
"is-importing": b(
|
|
6303
|
-
error: b(
|
|
6304
|
-
onImport: b(
|
|
6305
|
-
onClose: n[7] ||= (e) => b(
|
|
6036
|
+
N(ci, {
|
|
6037
|
+
visible: b(O).showImportUrlModal.value,
|
|
6038
|
+
"is-importing": b(D).isImportingFromUrl.value,
|
|
6039
|
+
error: b(D).importFromUrlError.value,
|
|
6040
|
+
onImport: b(O).handleImportFromUrl,
|
|
6041
|
+
onClose: n[7] ||= (e) => b(O).showImportUrlModal.value = !1
|
|
6306
6042
|
}, null, 8, [
|
|
6307
6043
|
"visible",
|
|
6308
6044
|
"is-importing",
|
|
6309
6045
|
"error",
|
|
6310
6046
|
"onImport"
|
|
6311
6047
|
]),
|
|
6312
|
-
N(
|
|
6313
|
-
visible: !!b(
|
|
6314
|
-
item: b(
|
|
6315
|
-
onSave: b(
|
|
6316
|
-
onClose: n[8] ||= (e) => b(
|
|
6048
|
+
N(sr, {
|
|
6049
|
+
visible: !!b(O).editingItem.value,
|
|
6050
|
+
item: b(O).editingItem.value,
|
|
6051
|
+
onSave: b(O).handleEditSave,
|
|
6052
|
+
onClose: n[8] ||= (e) => b(O).editingItem.value = null
|
|
6317
6053
|
}, null, 8, [
|
|
6318
6054
|
"visible",
|
|
6319
6055
|
"item",
|
|
6320
6056
|
"onSave"
|
|
6321
6057
|
]),
|
|
6322
|
-
N(
|
|
6323
|
-
visible: b(
|
|
6324
|
-
item: b(
|
|
6325
|
-
"usage-info": b(
|
|
6326
|
-
"is-replacing": b(
|
|
6327
|
-
error: b(
|
|
6328
|
-
onReplace: b(
|
|
6329
|
-
onClose: b(
|
|
6058
|
+
N(zi, {
|
|
6059
|
+
visible: b(D).showReplaceWarning.value,
|
|
6060
|
+
item: b(D).pendingReplaceItem.value,
|
|
6061
|
+
"usage-info": b(D).replaceUsageInfo.value,
|
|
6062
|
+
"is-replacing": b(D).isReplacing.value,
|
|
6063
|
+
error: b(D).replaceError.value,
|
|
6064
|
+
onReplace: b(O).handleReplaceFile,
|
|
6065
|
+
onClose: b(D).cancelReplace
|
|
6330
6066
|
}, null, 8, [
|
|
6331
6067
|
"visible",
|
|
6332
6068
|
"item",
|
|
@@ -6344,7 +6080,7 @@ var na = ["data-tpl-theme"], ra = {
|
|
|
6344
6080
|
"leave-from-class": "tpl:opacity-100",
|
|
6345
6081
|
"leave-to-class": "tpl:opacity-0"
|
|
6346
6082
|
}, {
|
|
6347
|
-
default: f(() => [b(
|
|
6083
|
+
default: f(() => [b(D).showDeleteWarning.value ? (c(), v("div", {
|
|
6348
6084
|
key: 0,
|
|
6349
6085
|
class: "tpl:absolute tpl:inset-0 tpl:z-10 tpl:flex tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-lg)]",
|
|
6350
6086
|
style: {
|
|
@@ -6352,27 +6088,27 @@ var na = ["data-tpl-theme"], ra = {
|
|
|
6352
6088
|
"backdrop-filter": "blur(8px)",
|
|
6353
6089
|
"-webkit-backdrop-filter": "blur(8px)"
|
|
6354
6090
|
},
|
|
6355
|
-
onClick: n[11] ||= x((...e) => b(
|
|
6356
|
-
}, [E("div",
|
|
6357
|
-
E("h3",
|
|
6091
|
+
onClick: n[11] ||= x((...e) => b(D).cancelDelete && b(D).cancelDelete(...e), ["self"])
|
|
6092
|
+
}, [E("div", vo, [
|
|
6093
|
+
E("h3", yo, h(a.value.mediaLibrary.deleteWarningTitle), 1),
|
|
6358
6094
|
E("p", {
|
|
6359
|
-
class: T(["tpl:text-xs", b(
|
|
6095
|
+
class: T(["tpl:text-xs", b(O).hasUsedFiles.value ? "tpl:mb-2" : "tpl:mb-4"]),
|
|
6360
6096
|
style: { color: "var(--tpl-text-muted)" }
|
|
6361
6097
|
}, h(a.value.mediaLibrary.deleteWarningMessage), 3),
|
|
6362
|
-
b(
|
|
6363
|
-
b(
|
|
6098
|
+
b(O).hasUsedFiles.value ? (c(), v("p", bo, h(a.value.mediaLibrary.deleteWarningUsageNote), 1)) : y("", !0),
|
|
6099
|
+
b(O).hasUsedFiles.value ? (c(), v("div", xo, [(c(!0), v(A, null, u(b(D).deleteUsageInfo.value, (e, t) => (c(), v("div", {
|
|
6364
6100
|
key: t,
|
|
6365
6101
|
class: "tpl:text-xs",
|
|
6366
6102
|
style: { color: "var(--tpl-text)" }
|
|
6367
|
-
}, [e.template_count > 0 ? (c(), v(A, { key: 0 }, [E("span",
|
|
6368
|
-
E("div",
|
|
6103
|
+
}, [e.template_count > 0 ? (c(), v(A, { key: 0 }, [E("span", So, h(b(O).displayItems.value.find((e) => e.id === t)?.filename || t), 1), E("span", Co, " - " + h(a.value.mediaLibrary.usedInTemplates.replace("{count}", e.template_count.toString())), 1)], 64)) : y("", !0)]))), 128))])) : y("", !0),
|
|
6104
|
+
E("div", wo, [E("button", {
|
|
6369
6105
|
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",
|
|
6370
6106
|
style: {
|
|
6371
6107
|
"border-color": "var(--tpl-border)",
|
|
6372
6108
|
color: "var(--tpl-text)",
|
|
6373
6109
|
"background-color": "var(--tpl-bg)"
|
|
6374
6110
|
},
|
|
6375
|
-
onClick: n[9] ||= (...e) => b(
|
|
6111
|
+
onClick: n[9] ||= (...e) => b(D).cancelDelete && b(D).cancelDelete(...e)
|
|
6376
6112
|
}, h(a.value.mediaLibrary.cancel), 1), E("button", {
|
|
6377
6113
|
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",
|
|
6378
6114
|
style: {
|
|
@@ -6380,31 +6116,31 @@ var na = ["data-tpl-theme"], ra = {
|
|
|
6380
6116
|
color: "var(--tpl-danger)",
|
|
6381
6117
|
"background-color": "var(--tpl-danger-light)"
|
|
6382
6118
|
},
|
|
6383
|
-
onClick: n[10] ||= (...e) => b(
|
|
6384
|
-
}, h(b(
|
|
6119
|
+
onClick: n[10] ||= (...e) => b(D).confirmDelete && b(D).confirmDelete(...e)
|
|
6120
|
+
}, h(b(O).hasUsedFiles.value ? a.value.mediaLibrary.deleteAnyway : a.value.mediaLibrary.confirmDelete), 1)])
|
|
6385
6121
|
])])) : y("", !0)]),
|
|
6386
6122
|
_: 1
|
|
6387
6123
|
}),
|
|
6388
|
-
E("div",
|
|
6124
|
+
E("div", To, [E("div", Eo, [b(D).previewItem.value ? (c(), S(wi, {
|
|
6389
6125
|
key: 0,
|
|
6390
|
-
"selected-conversion": b(
|
|
6391
|
-
"onUpdate:selectedConversion": n[12] ||= (e) => b(
|
|
6392
|
-
item: b(
|
|
6393
|
-
folders: b(
|
|
6126
|
+
"selected-conversion": b(O).selectedConversion.value,
|
|
6127
|
+
"onUpdate:selectedConversion": n[12] ||= (e) => b(O).selectedConversion.value = e,
|
|
6128
|
+
item: b(D).previewItem.value,
|
|
6129
|
+
folders: b(D).folders.value
|
|
6394
6130
|
}, null, 8, [
|
|
6395
6131
|
"selected-conversion",
|
|
6396
6132
|
"item",
|
|
6397
6133
|
"folders"
|
|
6398
|
-
])) : y("", !0)]), E("div",
|
|
6134
|
+
])) : y("", !0)]), E("div", Do, [b(D).selectedItems.value.size > 0 ? (c(), v("div", Oo, [b(D).previewItem.value ? (c(), v("button", {
|
|
6399
6135
|
key: 0,
|
|
6400
6136
|
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",
|
|
6401
6137
|
style: k({
|
|
6402
|
-
borderColor: b(
|
|
6403
|
-
color: b(
|
|
6138
|
+
borderColor: b(O).copied.value ? "var(--tpl-success)" : "var(--tpl-border)",
|
|
6139
|
+
color: b(O).copied.value ? "var(--tpl-success)" : "var(--tpl-text)",
|
|
6404
6140
|
backgroundColor: "var(--tpl-bg)"
|
|
6405
6141
|
}),
|
|
6406
|
-
onClick: n[13] ||= (e) => b(
|
|
6407
|
-
}, [b(
|
|
6142
|
+
onClick: n[13] ||= (e) => b(O).copy(b(O).selectedUrl.value)
|
|
6143
|
+
}, [b(O).copied.value ? (c(), S(b(I), {
|
|
6408
6144
|
key: 1,
|
|
6409
6145
|
size: 12,
|
|
6410
6146
|
"stroke-width": 2
|
|
@@ -6412,25 +6148,25 @@ var na = ["data-tpl-theme"], ra = {
|
|
|
6412
6148
|
key: 0,
|
|
6413
6149
|
size: 12,
|
|
6414
6150
|
"stroke-width": 2
|
|
6415
|
-
})), j(" " + h(b(
|
|
6151
|
+
})), j(" " + h(b(O).copied.value ? a.value.mediaLibrary.copied : a.value.mediaLibrary.copyUrl), 1)], 4)) : y("", !0), s.value ? (c(), v("div", ko, [E("button", {
|
|
6416
6152
|
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",
|
|
6417
6153
|
style: {
|
|
6418
6154
|
"border-color": "var(--tpl-border)",
|
|
6419
6155
|
color: "var(--tpl-text)",
|
|
6420
6156
|
"background-color": "var(--tpl-bg)"
|
|
6421
6157
|
},
|
|
6422
|
-
onClick: n[14] ||= (e) => b(
|
|
6423
|
-
}, h(a.value.mediaLibrary.moveSelected), 1), b(
|
|
6158
|
+
onClick: n[14] ||= (e) => b(O).showMovePicker.value = !b(O).showMovePicker.value
|
|
6159
|
+
}, h(a.value.mediaLibrary.moveSelected), 1), b(O).showMovePicker.value ? (c(), S(pi, {
|
|
6424
6160
|
key: 0,
|
|
6425
|
-
folders: b(
|
|
6426
|
-
"current-folder-id": b(
|
|
6427
|
-
onSelect: b(
|
|
6428
|
-
onClose: n[15] ||= (e) => b(
|
|
6161
|
+
folders: b(D).folders.value,
|
|
6162
|
+
"current-folder-id": b(D).currentFolderId.value,
|
|
6163
|
+
onSelect: b(O).handleMoveToFolder,
|
|
6164
|
+
onClose: n[15] ||= (e) => b(O).showMovePicker.value = !1
|
|
6429
6165
|
}, null, 8, [
|
|
6430
6166
|
"folders",
|
|
6431
6167
|
"current-folder-id",
|
|
6432
6168
|
"onSelect"
|
|
6433
|
-
])) : y("", !0)])) : y("", !0)])) : y("", !0), E("div",
|
|
6169
|
+
])) : y("", !0)])) : y("", !0)])) : y("", !0), E("div", Ao, [b(D).selectedItems.value.size > 0 ? (c(), v("button", {
|
|
6434
6170
|
key: 0,
|
|
6435
6171
|
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",
|
|
6436
6172
|
style: {
|
|
@@ -6438,7 +6174,7 @@ var na = ["data-tpl-theme"], ra = {
|
|
|
6438
6174
|
color: "var(--tpl-danger)",
|
|
6439
6175
|
"background-color": "var(--tpl-danger-light)"
|
|
6440
6176
|
},
|
|
6441
|
-
onClick: n[16] ||= (...e) => b(
|
|
6177
|
+
onClick: n[16] ||= (...e) => b(O).handleDeleteClick && b(O).handleDeleteClick(...e)
|
|
6442
6178
|
}, h(a.value.mediaLibrary.deleteSelected), 1)) : y("", !0), t.onSelect ? (c(), v("button", {
|
|
6443
6179
|
key: 1,
|
|
6444
6180
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:px-4 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:hover:opacity-90 tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50",
|
|
@@ -6446,12 +6182,12 @@ var na = ["data-tpl-theme"], ra = {
|
|
|
6446
6182
|
"background-color": "var(--tpl-primary)",
|
|
6447
6183
|
color: "var(--tpl-bg)"
|
|
6448
6184
|
},
|
|
6449
|
-
disabled: !b(
|
|
6450
|
-
onClick:
|
|
6451
|
-
}, h(a.value.mediaLibrary.selectFile), 9,
|
|
6185
|
+
disabled: !b(D).previewItem.value,
|
|
6186
|
+
onClick: ee
|
|
6187
|
+
}, h(a.value.mediaLibrary.selectFile), 9, jo)) : y("", !0)])])])
|
|
6452
6188
|
]));
|
|
6453
6189
|
}
|
|
6454
|
-
}),
|
|
6190
|
+
}), No = /* #__PURE__ */ Object.assign({
|
|
6455
6191
|
"./locales/ca.ts": () => import("./ca-CNRWAMHI.js"),
|
|
6456
6192
|
"./locales/de.ts": () => import("./de-DFYCT4QU.js"),
|
|
6457
6193
|
"./locales/en.ts": () => import("./en-DE_y1YWU.js"),
|
|
@@ -6460,72 +6196,72 @@ var na = ["data-tpl-theme"], ra = {
|
|
|
6460
6196
|
"./locales/nl.ts": () => import("./nl-CbcPJlrL.js"),
|
|
6461
6197
|
"./locales/pt-BR.ts": () => import("./pt-BR-BibOQm-o.js")
|
|
6462
6198
|
});
|
|
6463
|
-
function
|
|
6199
|
+
function Po(e) {
|
|
6464
6200
|
return Object.keys(e).map((e) => e.match(/\/([^/]+)\.ts$/)?.[1]).filter((e) => !!e);
|
|
6465
6201
|
}
|
|
6466
|
-
var
|
|
6467
|
-
function
|
|
6202
|
+
var Fo = Po(No);
|
|
6203
|
+
function Io(e) {
|
|
6468
6204
|
return e.trim().replace(/_/g, "-").toLowerCase();
|
|
6469
6205
|
}
|
|
6470
|
-
function
|
|
6471
|
-
let t =
|
|
6472
|
-
return
|
|
6206
|
+
function Lo(e) {
|
|
6207
|
+
let t = Io(e);
|
|
6208
|
+
return Fo.find((e) => Io(e) === t);
|
|
6473
6209
|
}
|
|
6474
|
-
function
|
|
6475
|
-
return
|
|
6210
|
+
function Ro(e) {
|
|
6211
|
+
return Io(e).split("-")[0];
|
|
6476
6212
|
}
|
|
6477
|
-
function
|
|
6478
|
-
return
|
|
6213
|
+
function zo(e) {
|
|
6214
|
+
return Lo(e) ?? Lo(Ro(e)) ?? "en";
|
|
6479
6215
|
}
|
|
6480
|
-
async function
|
|
6481
|
-
let t =
|
|
6216
|
+
async function Bo(e) {
|
|
6217
|
+
let t = No[`./locales/${zo(e)}.ts`];
|
|
6482
6218
|
return (await t()).default;
|
|
6483
6219
|
}
|
|
6484
6220
|
//#endregion
|
|
6485
6221
|
//#region ../media-library/src/standalone/visual.ts
|
|
6486
|
-
var
|
|
6487
|
-
async function
|
|
6222
|
+
var Vo = null, Ho = p(null);
|
|
6223
|
+
async function Uo(e) {
|
|
6488
6224
|
let n = typeof e.container == "string" ? document.querySelector(e.container) : e.container;
|
|
6489
6225
|
if (!n) throw Error(`Container element not found: ${e.container}`);
|
|
6490
6226
|
let r = Te(e.auth, e.onError);
|
|
6491
6227
|
await r.initialize();
|
|
6492
|
-
let i = await new we(r).fetchConfig(), a = await
|
|
6493
|
-
return
|
|
6228
|
+
let i = await new we(r).fetchConfig(), a = await Bo(e.locale ?? "en");
|
|
6229
|
+
return Go(n, e.theme), Vo && Wo(), new Promise((o, s) => {
|
|
6494
6230
|
try {
|
|
6495
|
-
|
|
6231
|
+
Vo = D({ setup() {
|
|
6496
6232
|
let s = () => {
|
|
6497
6233
|
o({
|
|
6498
|
-
setTheme: (e) =>
|
|
6499
|
-
unmount:
|
|
6234
|
+
setTheme: (e) => Go(n, e),
|
|
6235
|
+
unmount: Wo
|
|
6500
6236
|
});
|
|
6501
6237
|
};
|
|
6502
|
-
return () => t(
|
|
6238
|
+
return () => t(Mo, {
|
|
6503
6239
|
authManager: r,
|
|
6504
6240
|
projectId: r.projectId,
|
|
6505
6241
|
planConfig: i,
|
|
6506
6242
|
translations: a,
|
|
6507
6243
|
onSelect: e.onSelect,
|
|
6508
6244
|
onError: e.onError,
|
|
6509
|
-
ref:
|
|
6245
|
+
ref: Ho,
|
|
6510
6246
|
onReady: s
|
|
6511
6247
|
});
|
|
6512
|
-
} }),
|
|
6248
|
+
} }), Vo.mount(n);
|
|
6513
6249
|
} catch (e) {
|
|
6514
6250
|
s(e);
|
|
6515
6251
|
}
|
|
6516
6252
|
});
|
|
6517
6253
|
}
|
|
6518
|
-
function
|
|
6519
|
-
|
|
6254
|
+
function Wo() {
|
|
6255
|
+
Vo && (Vo.unmount(), Vo = null, Ho.value = null);
|
|
6520
6256
|
}
|
|
6521
|
-
function
|
|
6257
|
+
function Go(e, t) {
|
|
6522
6258
|
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`)));
|
|
6523
6259
|
}
|
|
6524
6260
|
typeof window < "u" && (window.TemplaticalMedia = {
|
|
6525
|
-
init:
|
|
6526
|
-
unmount:
|
|
6261
|
+
init: Uo,
|
|
6262
|
+
unmount: Wo
|
|
6527
6263
|
});
|
|
6528
6264
|
//#endregion
|
|
6529
|
-
export { Ee as MediaApiClient,
|
|
6265
|
+
export { Ee as MediaApiClient, Va as MediaLibraryModal };
|
|
6530
6266
|
|
|
6531
|
-
//# sourceMappingURL=src-
|
|
6267
|
+
//# sourceMappingURL=src-Dpj0x27M.js.map
|