@templatical/editor 0.43.1 → 0.43.2
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-DOCvzGBe.js → AiChatSidebar-DTtMEXNR.js} +7 -7
- package/dist/{AiFeatureMenu-xCJeD07B.js → AiFeatureMenu-DFj-_S9b.js} +4 -4
- package/dist/{BlockIssueBadge-BJ3A6mqh.js → BlockIssueBadge-CyLmqjLl.js} +2 -2
- package/dist/{BlockPreviewCanvas-BQXfqhzu.js → BlockPreviewCanvas-C6F66f3k.js} +2 -2
- package/dist/{CloudHeaderExtras-TFmBJ0Ry.js → CloudHeaderExtras-Z4K6OMn0.js} +2 -2
- package/dist/{CloudPanels-BnSBbYnw.js → CloudPanels-DOJ2Vske.js} +4 -4
- package/dist/{CollaboratorBar-7ry8EdUh.js → CollaboratorBar-BCkl3dKY.js} +2 -2
- package/dist/{CommentsPanel-CGEhbjx0.js → CommentsPanel-DPMi6-rb.js} +1 -1
- package/dist/{CommentsSidebar-CUpst9ou.js → CommentsSidebar-C1mQcyh3.js} +10 -10
- package/dist/{CountdownToolbar-B1a_UIuB.js → CountdownToolbar-DKmzpk__.js} +3 -3
- package/dist/{DesignReferenceSidebar-DkAmsBgM.js → DesignReferenceSidebar-CGRzOOb8.js} +5 -5
- package/dist/{IssuesPanel-lTpsCV4a.js → IssuesPanel-CsdxjjRm.js} +5 -5
- package/dist/{LogicTagInsertButton-B5YymR4U.js → LogicTagInsertButton-BX4jOUQy.js} +3 -3
- package/dist/{MediaEditModal-B1X8qtJb.js → MediaEditModal-Bm8uOKBx.js} +270 -230
- package/dist/{MediaPanels-DO30L1KS.js → MediaPanels-BNWtEntu.js} +1 -1
- package/dist/{MergeTagInput-B0M_-X0K.js → MergeTagInput-Mj8CFfX1.js} +1 -1
- package/dist/{MergeTagModeToggle-B-8W1tK7.js → MergeTagModeToggle-CinojvpV.js} +3 -3
- package/dist/{ParagraphEditor-DVGeU0Am.js → ParagraphEditor-DdOteRjD.js} +9 -9
- package/dist/{RestoreVersionDialog-DOhgYkiA.js → RestoreVersionDialog-B-i0wPjh.js} +3 -3
- package/dist/{RichTextEditorContent-AaLAArA0.js → RichTextEditorContent-CDtKOWsh.js} +4 -4
- package/dist/{SaveBlockDialog-36MzPD2S.js → SaveBlockDialog-DTcGPDMT.js} +8 -8
- package/dist/{SavedBlocksBrowserModal-B5nFKszf.js → SavedBlocksBrowserModal-BA5yXQi0.js} +9 -9
- package/dist/{SavedBlocksPanels-BZkbP7eB.js → SavedBlocksPanels-mfSALJqB.js} +1 -1
- package/dist/{SavedBlocksPickBar-ChoCMdu7.js → SavedBlocksPickBar-BOjduGI4.js} +2 -2
- package/dist/{TemplateScoringPanel-C6ellAcs.js → TemplateScoringPanel-Byz-ajjf.js} +11 -11
- package/dist/{TemplateSettings-C_0qK-zs.js → TemplateSettings-Bf5rfsU8.js} +5 -5
- package/dist/{TestEmailModal-CKW-VArm.js → TestEmailModal-DJo2yFLh.js} +6 -6
- package/dist/{TestEmailPanel-BylYzjyM.js → TestEmailPanel-CXIFWfDm.js} +1 -1
- package/dist/{TitleEditor-DoQ286_n.js → TitleEditor-BDtokkQF.js} +6 -6
- package/dist/{ToggleSwitch-CtZ6adlX.js → ToggleSwitch-BCYZvP1e.js} +1 -1
- package/dist/{Toolbar-B6dG5_IP.js → Toolbar-XOtJ_N58.js} +20 -20
- package/dist/{TplModal-DHwQXySQ.js → TplModal-C3mzMXof.js} +1 -1
- package/dist/{VersionHistoryMenu-DdspCRSA.js → VersionHistoryMenu-DRoFz15y.js} +5 -5
- package/dist/{VersionHistoryPanels-C6QxmRUH.js → VersionHistoryPanels-CeF0JnXI.js} +1 -1
- package/dist/{VersionPreviewBanner-XUuLe36h.js → VersionPreviewBanner-DQvIEKUU.js} +1 -1
- package/dist/{WrapperBlock-BumDudbj.js → WrapperBlock-DZwp4G7P.js} +1 -1
- package/dist/{blockTypeIcons-Sg8SY1NQ.js → blockTypeIcons-CAPoy6X7.js} +2 -2
- package/dist/bundle-stats.json +6 -6
- package/dist/{ca-BTf1Zbqb.js → ca-CYQH3J0b.js} +6 -2
- package/dist/cdn/chunks/{AiChatSidebar-DiG-EQ-E.js → AiChatSidebar-DW1uRkKE.js} +2 -2
- package/dist/cdn/chunks/{AiChatSidebar-DiG-EQ-E.js.map → AiChatSidebar-DW1uRkKE.js.map} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-4TgzmLb3.js → AiFeatureMenu-CHsgD78N.js} +3 -3
- package/dist/cdn/chunks/{AiFeatureMenu-4TgzmLb3.js.map → AiFeatureMenu-CHsgD78N.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-ChQ0mPf5.js → BlockIssueBadge-CIqu8JnG.js} +2 -2
- package/dist/cdn/chunks/{BlockIssueBadge-ChQ0mPf5.js.map → BlockIssueBadge-CIqu8JnG.js.map} +1 -1
- package/dist/cdn/chunks/{BlockPreviewCanvas-BpvK3Sh9.js → BlockPreviewCanvas-Dtea66SI.js} +3 -3
- package/dist/cdn/chunks/{BlockPreviewCanvas-BpvK3Sh9.js.map → BlockPreviewCanvas-Dtea66SI.js.map} +1 -1
- package/dist/cdn/chunks/{CloudHeaderExtras-DqgOaWym.js → CloudHeaderExtras-Kjj78__m.js} +3 -3
- package/dist/cdn/chunks/{CloudHeaderExtras-DqgOaWym.js.map → CloudHeaderExtras-Kjj78__m.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-INOiwkET.js → CloudPanels-DARXXD0q.js} +4 -4
- package/dist/cdn/chunks/{CloudPanels-INOiwkET.js.map → CloudPanels-DARXXD0q.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-CQ9EpYKQ.js → CollaboratorBar-C7O9mQJ_.js} +3 -3
- package/dist/cdn/chunks/{CollaboratorBar-CQ9EpYKQ.js.map → CollaboratorBar-C7O9mQJ_.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsPanel-CjhxGMjL.js → CommentsPanel-KH5_JS7_.js} +2 -2
- package/dist/cdn/chunks/{CommentsPanel-CjhxGMjL.js.map → CommentsPanel-KH5_JS7_.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-D9bqMnlt.js → CommentsSidebar-ucrNvgAQ.js} +2 -2
- package/dist/cdn/chunks/{CommentsSidebar-D9bqMnlt.js.map → CommentsSidebar-ucrNvgAQ.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-CIRx5w1U.js → CountdownToolbar-DVInzkj9.js} +4 -4
- package/dist/cdn/chunks/{CountdownToolbar-CIRx5w1U.js.map → CountdownToolbar-DVInzkj9.js.map} +1 -1
- package/dist/cdn/chunks/{DesignReferenceSidebar-C1-SbE_R.js → DesignReferenceSidebar-pleljkEJ.js} +2 -2
- package/dist/cdn/chunks/{DesignReferenceSidebar-C1-SbE_R.js.map → DesignReferenceSidebar-pleljkEJ.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-qKY6UDd-.js → IssuesPanel-CPcQIUni.js} +2 -2
- package/dist/cdn/chunks/{IssuesPanel-qKY6UDd-.js.map → IssuesPanel-CPcQIUni.js.map} +1 -1
- package/dist/cdn/chunks/{LogicTagInsertButton-CItDS_U1.js → LogicTagInsertButton-DSrW9v0x.js} +2 -2
- package/dist/cdn/chunks/{LogicTagInsertButton-CItDS_U1.js.map → LogicTagInsertButton-DSrW9v0x.js.map} +1 -1
- package/dist/cdn/chunks/{MediaEditModal-CzUtXkpk.js → MediaEditModal-BHp7euCZ.js} +272 -232
- package/dist/cdn/chunks/MediaEditModal-BHp7euCZ.js.map +1 -0
- package/dist/cdn/chunks/{MediaPanels-DOLsh7WC.js → MediaPanels-CGIRlO48.js} +2 -2
- package/dist/cdn/chunks/{MediaPanels-DOLsh7WC.js.map → MediaPanels-CGIRlO48.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagInput-B33u3nxj.js → MergeTagInput-BSFofWuc.js} +2 -2
- package/dist/cdn/chunks/{MergeTagInput-B33u3nxj.js.map → MergeTagInput-BSFofWuc.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-Bz1CH3NT.js → MergeTagModeToggle-D7KlTFZV.js} +2 -2
- package/dist/cdn/chunks/{MergeTagModeToggle-Bz1CH3NT.js.map → MergeTagModeToggle-D7KlTFZV.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-B6A4yQ0A.js → ParagraphEditor-CokXagL1.js} +6 -6
- package/dist/cdn/chunks/{ParagraphEditor-B6A4yQ0A.js.map → ParagraphEditor-CokXagL1.js.map} +1 -1
- package/dist/cdn/chunks/{RestoreVersionDialog-B9rujl9w.js → RestoreVersionDialog-C-XEncAM.js} +3 -3
- package/dist/cdn/chunks/{RestoreVersionDialog-B9rujl9w.js.map → RestoreVersionDialog-C-XEncAM.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-dOg1xFqv.js → RichTextEditorContent-DS_2UsJX.js} +4 -4
- package/dist/cdn/chunks/{RichTextEditorContent-dOg1xFqv.js.map → RichTextEditorContent-DS_2UsJX.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-BNAeb6--.js → SaveBlockDialog-D8OAKF_k.js} +6 -6
- package/dist/cdn/chunks/{SaveBlockDialog-BNAeb6--.js.map → SaveBlockDialog-D8OAKF_k.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal--FoVqEnT.js → SavedBlocksBrowserModal-B6GN_llD.js} +6 -6
- package/dist/cdn/chunks/{SavedBlocksBrowserModal--FoVqEnT.js.map → SavedBlocksBrowserModal-B6GN_llD.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-qKyPnVgk.js → SavedBlocksPanels-hRCREVxS.js} +2 -2
- package/dist/cdn/chunks/{SavedBlocksPanels-qKyPnVgk.js.map → SavedBlocksPanels-hRCREVxS.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-BvLwca4B.js → SavedBlocksPickBar-C5YrK0iB.js} +3 -3
- package/dist/cdn/chunks/{SavedBlocksPickBar-BvLwca4B.js.map → SavedBlocksPickBar-C5YrK0iB.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateScoringPanel-ebsrVge3.js → TemplateScoringPanel-DXyQjcdU.js} +2 -2
- package/dist/cdn/chunks/{TemplateScoringPanel-ebsrVge3.js.map → TemplateScoringPanel-DXyQjcdU.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateSettings-BaEVdUTM.js → TemplateSettings-da14bXlk.js} +4 -4
- package/dist/cdn/chunks/{TemplateSettings-BaEVdUTM.js.map → TemplateSettings-da14bXlk.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-DpYirvEL.js → TestEmailModal-Dl_cAyj-.js} +6 -6
- package/dist/cdn/chunks/{TestEmailModal-DpYirvEL.js.map → TestEmailModal-Dl_cAyj-.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailPanel-PAT70a2g.js → TestEmailPanel-CVZGOKaQ.js} +2 -2
- package/dist/cdn/chunks/{TestEmailPanel-PAT70a2g.js.map → TestEmailPanel-CVZGOKaQ.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-Dc7YB6Uy.js → TitleEditor-DO8OdG_w.js} +5 -5
- package/dist/cdn/chunks/{TitleEditor-Dc7YB6Uy.js.map → TitleEditor-DO8OdG_w.js.map} +1 -1
- package/dist/cdn/chunks/{ToggleSwitch-D-8dCEbI.js → ToggleSwitch-D5Wi6Env.js} +2 -2
- package/dist/cdn/chunks/{ToggleSwitch-D-8dCEbI.js.map → ToggleSwitch-D5Wi6Env.js.map} +1 -1
- package/dist/cdn/chunks/{Toolbar-BDzhrmGV.js → Toolbar-CXDE8xM-.js} +7 -7
- package/dist/cdn/chunks/{Toolbar-BDzhrmGV.js.map → Toolbar-CXDE8xM-.js.map} +1 -1
- package/dist/cdn/chunks/{TplModal-BbHRUc1Y.js → TplModal-CFi-Psf7.js} +2 -2
- package/dist/cdn/chunks/{TplModal-BbHRUc1Y.js.map → TplModal-CFi-Psf7.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryMenu-C_bBKOYU.js → VersionHistoryMenu-1bfCr14E.js} +2 -2
- package/dist/cdn/chunks/{VersionHistoryMenu-C_bBKOYU.js.map → VersionHistoryMenu-1bfCr14E.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-BoJsPIKa.js → VersionHistoryPanels-DbgbyAdW.js} +2 -2
- package/dist/cdn/chunks/{VersionHistoryPanels-BoJsPIKa.js.map → VersionHistoryPanels-DbgbyAdW.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-CKyrcgxJ.js → VersionPreviewBanner-BaOTRIrm.js} +2 -2
- package/dist/cdn/chunks/{VersionPreviewBanner-CKyrcgxJ.js.map → VersionPreviewBanner-BaOTRIrm.js.map} +1 -1
- package/dist/cdn/chunks/{WrapperBlock-CGg6rBnx.js → WrapperBlock-BYNfYvl3.js} +2 -2
- package/dist/cdn/chunks/{WrapperBlock-CGg6rBnx.js.map → WrapperBlock-BYNfYvl3.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-CdfCfqHE.js → blockTypeIcons-B_IAjnTD.js} +2 -2
- package/dist/cdn/chunks/{blockTypeIcons-CdfCfqHE.js.map → blockTypeIcons-B_IAjnTD.js.map} +1 -1
- package/dist/cdn/chunks/{ca-BTf1Zbqb.js → ca-CYQH3J0b.js} +7 -3
- package/dist/cdn/chunks/ca-CYQH3J0b.js.map +1 -0
- package/dist/cdn/chunks/{de-xzrh9PA3.js → de-JvCTMJPy.js} +7 -3
- package/dist/cdn/chunks/de-JvCTMJPy.js.map +1 -0
- package/dist/cdn/chunks/{editor-modal-CZQArGNj.js → editor-modal-BDOfw3l0.js} +472 -428
- package/dist/cdn/chunks/editor-modal-BDOfw3l0.js.map +1 -0
- package/dist/cdn/chunks/en-DxpXHoxJ.js +2 -0
- package/dist/cdn/chunks/{es-BT4LSpE2.js → es-CAv-Vldw.js} +7 -3
- package/dist/cdn/chunks/es-CAv-Vldw.js.map +1 -0
- package/dist/cdn/chunks/{extensions-Dy251lPd.js → extensions-1hJBHnGv.js} +2 -2
- package/dist/cdn/chunks/{extensions-Dy251lPd.js.map → extensions-1hJBHnGv.js.map} +1 -1
- package/dist/{fr-CI7OJoql.js → cdn/chunks/fr-DVPtxpR6.js} +8 -2
- package/dist/cdn/chunks/fr-DVPtxpR6.js.map +1 -0
- package/dist/cdn/chunks/{icons-CQnjugjy.js → icons-BrAyaJ0T.js} +6 -6
- package/dist/cdn/chunks/{icons-CQnjugjy.js.map → icons-BrAyaJ0T.js.map} +1 -1
- package/dist/{ja-DhlWUfke.js → cdn/chunks/ja-dcWzjStz.js} +8 -2
- package/dist/cdn/chunks/ja-dcWzjStz.js.map +1 -0
- package/dist/{nl-D8y5OWGB.js → cdn/chunks/nl-LZNqQgE4.js} +8 -2
- package/dist/cdn/chunks/nl-LZNqQgE4.js.map +1 -0
- package/dist/cdn/chunks/{pt-BR-DMCbUBvJ.js → pt-BR-D6P_mNwA.js} +7 -3
- package/dist/cdn/chunks/pt-BR-D6P_mNwA.js.map +1 -0
- package/dist/cdn/chunks/{src-BwsQ27UT.js → src-D5ceT_Y4.js} +2 -2
- package/dist/cdn/chunks/{src-BwsQ27UT.js.map → src-D5ceT_Y4.js.map} +1 -1
- package/dist/cdn/chunks/{useEditorCore-DoX2RgTl.js → useEditorCore-BTKqlRIg.js} +5 -5
- package/dist/cdn/chunks/{useEditorCore-DoX2RgTl.js.map → useEditorCore-BTKqlRIg.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +14 -14
- package/dist/{check-BMx_TLAS.js → check-CA6fvSIp.js} +1 -1
- package/dist/{chevron-down-KZf5mh9_.js → chevron-down-DYGJgpqJ.js} +1 -1
- package/dist/{chevron-right-BLZ60Vxw.js → chevron-right-Dm5_X4j6.js} +1 -1
- package/dist/{chevron-up-B9ynB8eU.js → chevron-up-Ds9ormyq.js} +1 -1
- package/dist/{circle-alert-pjvFFDrF.js → circle-alert-BYXE0olE.js} +1 -1
- package/dist/{clock-CiiTBfF3.js → clock-Ch1-h0sb.js} +1 -1
- package/dist/{copy-BF0_pQjH.js → copy-DLNyaPza.js} +1 -1
- package/dist/{createLucideIcon-C2YOVVWx.js → createLucideIcon-BrPnbRQT.js} +5 -5
- package/dist/{de-xzrh9PA3.js → de-JvCTMJPy.js} +6 -2
- package/dist/{editor-modal-99FB40dl.js → editor-modal-Cl5GFWTQ.js} +484 -440
- package/dist/en-CdCFaV2V.js +2 -0
- package/dist/{es-BT4LSpE2.js → es-CAv-Vldw.js} +6 -2
- package/dist/{extensions-DqQXxrvP.js → extensions-AKHJ0lax.js} +1 -1
- package/dist/{eye-RdXYgrQZ.js → eye-_7xKFxQh.js} +1 -1
- package/dist/{cdn/chunks/fr-CI7OJoql.js → fr-DVPtxpR6.js} +6 -4
- package/dist/{image-up-BwdoReQt.js → image-up-Ck-xPOGS.js} +1 -1
- package/dist/{info-zFMSGrL1.js → info-CBBNLK_i.js} +1 -1
- package/dist/{cdn/chunks/ja-DhlWUfke.js → ja-dcWzjStz.js} +6 -4
- package/dist/{link-D7orqFBT.js → link-BA_V9Nns.js} +1 -1
- package/dist/{list-BGt4Pgxc.js → list-BTujzSSo.js} +1 -1
- package/dist/{loader-circle-BVBgkRGz.js → loader-circle-B5OQFRUF.js} +1 -1
- package/dist/{message-circle-D8YLsarv.js → message-circle-DWXr27lZ.js} +1 -1
- package/dist/{cdn/chunks/nl-D8y5OWGB.js → nl-LZNqQgE4.js} +6 -4
- package/dist/{package-CuFvk0L5.js → package-DXW9QTU3.js} +1 -1
- package/dist/{pencil-DRYbmZW7.js → pencil-QmONZtjF.js} +1 -1
- package/dist/{plus-Dv0b3kh0.js → plus-XxHKE_GT.js} +1 -1
- package/dist/{pt-BR-DMCbUBvJ.js → pt-BR-D6P_mNwA.js} +6 -2
- package/dist/{refresh-cw-gYTIS5bJ.js → refresh-cw-DhXU8dCo.js} +1 -1
- package/dist/{search-D84_Ki_a.js → search-CpFaMrnL.js} +1 -1
- package/dist/{send-Cn-8_H_U.js → send-CFK3e6tQ.js} +1 -1
- package/dist/{shield-check-BOoVWJtD.js → shield-check-ndwpOTik.js} +1 -1
- package/dist/{smartphone-4Ej3PBw5.js → smartphone-DndMh9W6.js} +1 -1
- package/dist/{socialIcons-CzRJskEk.js → socialIcons-D43BLoTu.js} +1 -1
- package/dist/{sparkles-D3vnNe7O.js → sparkles-c1M5lwAQ.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/templatical-editor.js +28 -28
- package/dist/{text-align-start-Ci2h_Xly.js → text-align-start-DOtBufPq.js} +1 -1
- package/dist/{trash-wmi4UKvv.js → trash-DmaPdiUk.js} +1 -1
- package/dist/{triangle-alert-DJ0r2wmQ.js → triangle-alert-DqvxsSNL.js} +1 -1
- package/dist/{upload-XMde-TXf.js → upload-CO_hogFv.js} +1 -1
- package/dist/{useEditorCore-CAhRAya8.js → useEditorCore-0K8joh4X.js} +11 -11
- package/dist/{useScrollToBlock-B4F7KCrf.js → useScrollToBlock-BU5A9eS9.js} +1 -1
- package/dist/{x-BWrtpVl-.js → x-BCop_VsL.js} +1 -1
- package/package.json +8 -8
- package/dist/cdn/chunks/MediaEditModal-CzUtXkpk.js.map +0 -1
- package/dist/cdn/chunks/ca-BTf1Zbqb.js.map +0 -1
- package/dist/cdn/chunks/de-xzrh9PA3.js.map +0 -1
- package/dist/cdn/chunks/editor-modal-CZQArGNj.js.map +0 -1
- package/dist/cdn/chunks/en-9unxBjV8.js +0 -2
- package/dist/cdn/chunks/es-BT4LSpE2.js.map +0 -1
- package/dist/cdn/chunks/fr-CI7OJoql.js.map +0 -1
- package/dist/cdn/chunks/ja-DhlWUfke.js.map +0 -1
- package/dist/cdn/chunks/nl-D8y5OWGB.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-DMCbUBvJ.js.map +0 -1
- package/dist/en-BvOjRLiw.js +0 -2
|
@@ -2,22 +2,22 @@ import { A as e, At as t, B as n, D as r, J as i, K as a, M as o, P as s, R as c
|
|
|
2
2
|
import { a as k, c as A, s as j, t as M } from "./runtime-dom.esm-bundler-BGbPz4-g.js";
|
|
3
3
|
import { h as N } from "./dist-8VFzbeu9.js";
|
|
4
4
|
import { a as P, n as F, o as I, r as L, s as R, t as ee } from "./dist-BDuPwOyn.js";
|
|
5
|
-
import { t as z } from "./createLucideIcon-
|
|
6
|
-
import { t as B } from "./check-
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as
|
|
9
|
-
import { t as
|
|
10
|
-
import { t as
|
|
11
|
-
import { t as
|
|
12
|
-
import { t as
|
|
13
|
-
import { t as
|
|
14
|
-
import { t as
|
|
15
|
-
import { t as
|
|
16
|
-
import { t as
|
|
17
|
-
import { t as
|
|
18
|
-
import { t as
|
|
19
|
-
import { t as
|
|
20
|
-
var
|
|
5
|
+
import { t as z } from "./createLucideIcon-BrPnbRQT.js";
|
|
6
|
+
import { t as B } from "./check-CA6fvSIp.js";
|
|
7
|
+
import { t as te } from "./chevron-right-Dm5_X4j6.js";
|
|
8
|
+
import { t as ne } from "./copy-DLNyaPza.js";
|
|
9
|
+
import { t as re } from "./link-BA_V9Nns.js";
|
|
10
|
+
import { t as ie } from "./list-BTujzSSo.js";
|
|
11
|
+
import { t as V } from "./loader-circle-B5OQFRUF.js";
|
|
12
|
+
import { t as H } from "./pencil-QmONZtjF.js";
|
|
13
|
+
import { t as ae } from "./plus-XxHKE_GT.js";
|
|
14
|
+
import { t as U } from "./refresh-cw-DhXU8dCo.js";
|
|
15
|
+
import { t as oe } from "./search-CpFaMrnL.js";
|
|
16
|
+
import { t as se } from "./trash-DmaPdiUk.js";
|
|
17
|
+
import { t as ce } from "./upload-CO_hogFv.js";
|
|
18
|
+
import { t as le } from "./x-BCop_VsL.js";
|
|
19
|
+
import { t as W } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
20
|
+
var G = z({
|
|
21
21
|
name: "file",
|
|
22
22
|
size: 24,
|
|
23
23
|
node: [["path", {
|
|
@@ -27,14 +27,14 @@ var q = z({
|
|
|
27
27
|
d: "M14 2v5a1 1 0 0 0 1 1h5",
|
|
28
28
|
key: "wfsgrz"
|
|
29
29
|
}]]
|
|
30
|
-
}),
|
|
30
|
+
}), K = z({
|
|
31
31
|
name: "folder",
|
|
32
32
|
size: 24,
|
|
33
33
|
node: [["path", {
|
|
34
34
|
d: "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",
|
|
35
35
|
key: "1kt360"
|
|
36
36
|
}]]
|
|
37
|
-
}),
|
|
37
|
+
}), ue = z({
|
|
38
38
|
name: "grid-2x2",
|
|
39
39
|
size: 24,
|
|
40
40
|
node: [
|
|
@@ -56,7 +56,7 @@ var q = z({
|
|
|
56
56
|
}]
|
|
57
57
|
],
|
|
58
58
|
aliases: ["grid-2-x-2"]
|
|
59
|
-
}),
|
|
59
|
+
}), q = z({
|
|
60
60
|
name: "panel-left",
|
|
61
61
|
size: 24,
|
|
62
62
|
node: [["rect", {
|
|
@@ -71,14 +71,14 @@ var q = z({
|
|
|
71
71
|
key: "fh3hqa"
|
|
72
72
|
}]],
|
|
73
73
|
aliases: ["sidebar"]
|
|
74
|
-
}),
|
|
74
|
+
}), de = z({
|
|
75
75
|
name: "star",
|
|
76
76
|
size: 24,
|
|
77
77
|
node: [["path", {
|
|
78
78
|
d: "M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",
|
|
79
79
|
key: "r04s7s"
|
|
80
80
|
}]]
|
|
81
|
-
}),
|
|
81
|
+
}), fe = Symbol("templaticalMediaLimits"), J = Symbol("templaticalMediaPopoverTarget"), pe = Symbol("templaticalMediaTranslations"), Y = Symbol("templaticalMediaUiTheme"), X = Symbol("templaticalMediaUiLocale"), me = { mediaLibrary: {
|
|
82
82
|
title: "Media Library",
|
|
83
83
|
searchPlaceholder: "Search files...",
|
|
84
84
|
allFiles: "All Files",
|
|
@@ -92,7 +92,9 @@ var q = z({
|
|
|
92
92
|
noFiles: "No files found",
|
|
93
93
|
noSearchResults: "No files match your search",
|
|
94
94
|
dropOrClick: "Drop files here or click to upload",
|
|
95
|
-
|
|
95
|
+
acceptedAnyType: "Any file type",
|
|
96
|
+
acceptedFormatsMaxSize: "{formats} (max {size})",
|
|
97
|
+
uploadRejected: "Not uploaded, type or size not accepted: {files}",
|
|
96
98
|
uploading: "Uploading...",
|
|
97
99
|
uploadingProgress: "Uploading {current} of {total}...",
|
|
98
100
|
selectImage: "Select Image",
|
|
@@ -139,12 +141,14 @@ var q = z({
|
|
|
139
141
|
replaceFile: "Replace File",
|
|
140
142
|
replaceWarningTitle: "Replace File",
|
|
141
143
|
replaceWarningMessage: "You are about to replace this file. The replacement must have the same file extension ({extension}).",
|
|
142
|
-
replaceWarningUsageNote: "This file is used in {count} template(s).
|
|
144
|
+
replaceWarningUsageNote: "This file is used in {count} template(s). Check them after replacing it.",
|
|
143
145
|
replaceSelectFile: "Select replacement file",
|
|
144
146
|
replace: "Replace",
|
|
145
147
|
replacing: "Replacing...",
|
|
146
148
|
replaceError: "Failed to replace file",
|
|
147
149
|
saving: "Saving...",
|
|
150
|
+
editSaveError: "Couldn't save your changes. Try again.",
|
|
151
|
+
editCropError: "Couldn't process the edited image. Try again.",
|
|
148
152
|
cropAspectRatio: "Aspect Ratio",
|
|
149
153
|
cropFree: "Free",
|
|
150
154
|
cropSquare: "1:1",
|
|
@@ -169,8 +173,8 @@ var q = z({
|
|
|
169
173
|
} };
|
|
170
174
|
//#endregion
|
|
171
175
|
//#region ../media-library/src/composables/useI18n.ts
|
|
172
|
-
function
|
|
173
|
-
let t = e ?? l(
|
|
176
|
+
function Z(e) {
|
|
177
|
+
let t = e ?? l(pe, null), n = (a(t) ? t.value : t) ?? me;
|
|
174
178
|
function r(e, t) {
|
|
175
179
|
return e.replace(/\{(\w+)\}/g, (e, n) => n in t ? String(t[n]) : `{${n}}`);
|
|
176
180
|
}
|
|
@@ -181,36 +185,36 @@ function Q(e) {
|
|
|
181
185
|
}
|
|
182
186
|
//#endregion
|
|
183
187
|
//#region ../media-library/src/composables/useMediaCategories.ts
|
|
184
|
-
var
|
|
188
|
+
var he = [
|
|
185
189
|
"images",
|
|
186
190
|
"documents",
|
|
187
191
|
"videos",
|
|
188
192
|
"audio"
|
|
189
193
|
];
|
|
190
|
-
function
|
|
191
|
-
let t = e ?? l(
|
|
194
|
+
function Q(e) {
|
|
195
|
+
let t = e ?? l(fe, null);
|
|
192
196
|
if (!t) throw Error("[Templatical] useMediaCategories() needs media limits in scope. Render it under <MediaLibraryModal> or provide MEDIA_LIMITS_KEY yourself.");
|
|
193
197
|
let n = t, r = T(() => !0), i = T(() => n.maxFileSize ?? Infinity), a = T(() => {
|
|
194
198
|
let e = n.accept;
|
|
195
199
|
if (e && e.length > 0) return e;
|
|
196
200
|
let t = n.mimeTypes;
|
|
197
|
-
return t ? Object.keys(t) :
|
|
201
|
+
return t ? Object.keys(t) : he;
|
|
198
202
|
}), o = T(() => {
|
|
199
203
|
let e = n.mimeTypes;
|
|
200
204
|
return e ? a.value.flatMap((t) => e[t] ?? []) : [];
|
|
201
|
-
}), s = T(() => o.value.join(","));
|
|
202
|
-
function
|
|
205
|
+
}), s = T(() => o.value.join(",")), c = T(() => n.mimeTypes !== void 0);
|
|
206
|
+
function u(e, t) {
|
|
203
207
|
let r = n.mimeTypes;
|
|
204
208
|
return !r || (t && t.length > 0 ? t : Object.keys(r)).some((t) => r[t]?.includes(e) ?? !1);
|
|
205
209
|
}
|
|
206
|
-
function u(e) {
|
|
207
|
-
return c(e.type) && e.size <= i.value;
|
|
208
|
-
}
|
|
209
210
|
function d(e) {
|
|
211
|
+
return u(e.type) && e.size <= i.value;
|
|
212
|
+
}
|
|
213
|
+
function f(e) {
|
|
210
214
|
let t = n.mimeTypes;
|
|
211
215
|
return t ? t.images?.includes(e) ?? !1 : e.startsWith("image/");
|
|
212
216
|
}
|
|
213
|
-
function
|
|
217
|
+
function p(e) {
|
|
214
218
|
let t = n.mimeTypes;
|
|
215
219
|
if (!t) return null;
|
|
216
220
|
for (let [n, r] of Object.entries(t)) if (r?.includes(e)) return n;
|
|
@@ -220,18 +224,19 @@ function $(e) {
|
|
|
220
224
|
isMediaLibraryEnabled: r,
|
|
221
225
|
allAcceptedMimeTypes: o,
|
|
222
226
|
allAcceptedInputString: s,
|
|
227
|
+
restrictsMimeTypes: c,
|
|
223
228
|
maxFileSize: i,
|
|
224
229
|
availableCategories: a,
|
|
225
|
-
isAcceptedMimeType:
|
|
226
|
-
isAcceptedFile:
|
|
227
|
-
isImageMimeType:
|
|
228
|
-
getCategoryForMimeType:
|
|
230
|
+
isAcceptedMimeType: u,
|
|
231
|
+
isAcceptedFile: d,
|
|
232
|
+
isImageMimeType: f,
|
|
233
|
+
getCategoryForMimeType: p
|
|
229
234
|
};
|
|
230
235
|
}
|
|
231
236
|
//#endregion
|
|
232
237
|
//#region ../media-library/src/composables/useFocusTrap.ts
|
|
233
|
-
var
|
|
234
|
-
function
|
|
238
|
+
var ge = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
239
|
+
function _e(e, t) {
|
|
235
240
|
let n = null, r = null, a = null;
|
|
236
241
|
function o(e) {
|
|
237
242
|
if (!e) return document;
|
|
@@ -239,7 +244,7 @@ function ge(e, t) {
|
|
|
239
244
|
return t && "activeElement" in t ? t : document;
|
|
240
245
|
}
|
|
241
246
|
function s() {
|
|
242
|
-
return e.value ? Array.from(e.value.querySelectorAll(
|
|
247
|
+
return e.value ? Array.from(e.value.querySelectorAll(ge)).filter((e) => e.offsetParent !== null) : [];
|
|
243
248
|
}
|
|
244
249
|
function l(t) {
|
|
245
250
|
if (t.key !== "Tab") return;
|
|
@@ -269,14 +274,14 @@ function ge(e, t) {
|
|
|
269
274
|
}
|
|
270
275
|
//#endregion
|
|
271
276
|
//#region ../media-library/src/components/media/MediaBreadcrumb.vue?vue&type=script&setup=true&lang.ts
|
|
272
|
-
var
|
|
277
|
+
var ve = {
|
|
273
278
|
key: 0,
|
|
274
279
|
class: "tpl:flex tpl:items-center tpl:gap-1 tpl:text-xs",
|
|
275
280
|
style: { color: "var(--tpl-text-muted)" }
|
|
276
|
-
},
|
|
281
|
+
}, ye = ["onClick"], be = {
|
|
277
282
|
key: 1,
|
|
278
283
|
style: { color: "var(--tpl-text)" }
|
|
279
|
-
},
|
|
284
|
+
}, xe = /* @__PURE__ */ O({
|
|
280
285
|
__name: "MediaBreadcrumb",
|
|
281
286
|
props: {
|
|
282
287
|
folders: {},
|
|
@@ -284,7 +289,7 @@ var _e = {
|
|
|
284
289
|
},
|
|
285
290
|
emits: ["navigate"],
|
|
286
291
|
setup(t, { emit: n }) {
|
|
287
|
-
let r = t, i = n, { t: a } =
|
|
292
|
+
let r = t, i = n, { t: a } = Z(), s = T(() => {
|
|
288
293
|
if (!r.currentFolderId) return [];
|
|
289
294
|
let e = [];
|
|
290
295
|
return c(r.folders, r.currentFolderId, e), e;
|
|
@@ -296,11 +301,11 @@ var _e = {
|
|
|
296
301
|
}
|
|
297
302
|
return !1;
|
|
298
303
|
}
|
|
299
|
-
return (t, n) => s.value.length > 0 ? (e(), h("div",
|
|
304
|
+
return (t, n) => s.value.length > 0 ? (e(), h("div", ve, [m("button", {
|
|
300
305
|
class: "tpl:transition-colors tpl:duration-150 tpl:hover:underline",
|
|
301
306
|
style: { color: "var(--tpl-primary)" },
|
|
302
307
|
onClick: n[0] ||= (e) => i("navigate", null)
|
|
303
|
-
}, b(p(a).mediaLibrary.allFiles), 1), (e(!0), h(C, null, o(s.value, (t, n) => (e(), h(C, { key: t.id }, [g(p(
|
|
308
|
+
}, b(p(a).mediaLibrary.allFiles), 1), (e(!0), h(C, null, o(s.value, (t, n) => (e(), h(C, { key: t.id }, [g(p(te), {
|
|
304
309
|
size: 12,
|
|
305
310
|
"stroke-width": 2
|
|
306
311
|
}), n < s.value.length - 1 ? (e(), h("button", {
|
|
@@ -308,15 +313,15 @@ var _e = {
|
|
|
308
313
|
class: "tpl:transition-colors tpl:duration-150 tpl:hover:underline",
|
|
309
314
|
style: { color: "var(--tpl-primary)" },
|
|
310
315
|
onClick: (e) => i("navigate", t.id)
|
|
311
|
-
}, b(t.name), 9,
|
|
316
|
+
}, b(t.name), 9, ye)) : (e(), h("span", be, b(t.name), 1))], 64))), 128))])) : D("", !0);
|
|
312
317
|
}
|
|
313
|
-
}),
|
|
318
|
+
}), Se = ["aria-expanded", "aria-label"], Ce = {
|
|
314
319
|
key: 1,
|
|
315
320
|
class: "tpl:size-4 tpl:shrink-0"
|
|
316
|
-
},
|
|
321
|
+
}, we = {
|
|
317
322
|
key: 0,
|
|
318
323
|
class: "tpl:truncate"
|
|
319
|
-
},
|
|
324
|
+
}, Te = ["onKeydown"], Ee = ["title", "aria-label"], De = ["title", "aria-label"], Oe = ["title", "aria-label"], ke = { key: 0 }, Ae = ["placeholder", "onKeydown"], je = /* @__PURE__ */ O({
|
|
320
325
|
__name: "MediaFolderTreeNode",
|
|
321
326
|
props: {
|
|
322
327
|
folder: {},
|
|
@@ -333,7 +338,7 @@ var _e = {
|
|
|
333
338
|
"deleteFolder"
|
|
334
339
|
],
|
|
335
340
|
setup(n, { emit: r }) {
|
|
336
|
-
let i = n, a = r, { t: c } =
|
|
341
|
+
let i = n, a = r, { t: c } = Z(), l = d(!1), f = d(!1), _ = d(""), v = d(!1), y = d(""), w = d(!1), E = T(() => i.folder.children.length > 0), O = T(() => i.depth < 4), M = T(() => i.currentFolderId === i.folder.id), N = T(() => i.currentFolderId ? F(i.folder.children, i.currentFolderId) : !1), P = T(() => l.value || N.value);
|
|
337
342
|
function F(e, t) {
|
|
338
343
|
for (let n of e) if (n.id === t || F(n.children, t)) return !0;
|
|
339
344
|
return !1;
|
|
@@ -357,17 +362,17 @@ var _e = {
|
|
|
357
362
|
function B() {
|
|
358
363
|
y.value.trim() && a("createFolder", y.value.trim(), i.folder.id), v.value = !1, y.value = "";
|
|
359
364
|
}
|
|
360
|
-
function
|
|
365
|
+
function ne() {
|
|
361
366
|
v.value = !1, y.value = "";
|
|
362
367
|
}
|
|
363
|
-
function
|
|
368
|
+
function re() {
|
|
364
369
|
if (w.value) {
|
|
365
370
|
a("deleteFolder", i.folder.id), w.value = !1;
|
|
366
371
|
return;
|
|
367
372
|
}
|
|
368
373
|
w.value = !0;
|
|
369
374
|
}
|
|
370
|
-
function
|
|
375
|
+
function ie(e) {
|
|
371
376
|
let t = e.relatedTarget;
|
|
372
377
|
t && e.currentTarget.contains(t) || (w.value = !1);
|
|
373
378
|
}
|
|
@@ -380,7 +385,7 @@ var _e = {
|
|
|
380
385
|
backgroundColor: M.value ? "var(--tpl-bg-active)" : "transparent",
|
|
381
386
|
color: M.value ? "var(--tpl-primary)" : "var(--tpl-text)"
|
|
382
387
|
}),
|
|
383
|
-
onFocusout:
|
|
388
|
+
onFocusout: ie
|
|
384
389
|
}, [
|
|
385
390
|
E.value || v.value ? (e(), h("button", {
|
|
386
391
|
key: 0,
|
|
@@ -389,20 +394,20 @@ var _e = {
|
|
|
389
394
|
"aria-expanded": P.value,
|
|
390
395
|
"aria-label": P.value ? p(c).mediaLibrary.collapseFolder : p(c).mediaLibrary.expandFolder,
|
|
391
396
|
onClick: A(I, ["stop"])
|
|
392
|
-
}, [g(p(
|
|
397
|
+
}, [g(p(te), {
|
|
393
398
|
class: x(["tpl:transition-transform tpl:duration-150", { "tpl:rotate-90": P.value }]),
|
|
394
399
|
size: 10,
|
|
395
400
|
"stroke-width": 2
|
|
396
|
-
}, null, 8, ["class"])], 8,
|
|
401
|
+
}, null, 8, ["class"])], 8, Se)) : (e(), h("span", Ce)),
|
|
397
402
|
m("button", {
|
|
398
403
|
type: "button",
|
|
399
404
|
class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:items-center tpl:gap-1.5",
|
|
400
405
|
onClick: i[0] ||= (e) => a("navigate", n.folder.id)
|
|
401
|
-
}, [g(p(
|
|
406
|
+
}, [g(p(K), {
|
|
402
407
|
class: "tpl:shrink-0",
|
|
403
408
|
size: 14,
|
|
404
409
|
"stroke-width": 1.5
|
|
405
|
-
}), f.value ? D("", !0) : (e(), h("span",
|
|
410
|
+
}), f.value ? D("", !0) : (e(), h("span", we, b(n.folder.name), 1))]),
|
|
406
411
|
f.value ? u((e(), h("input", {
|
|
407
412
|
key: 2,
|
|
408
413
|
"onUpdate:modelValue": i[1] ||= (e) => _.value = e,
|
|
@@ -417,7 +422,7 @@ var _e = {
|
|
|
417
422
|
onKeydown: [j(R, ["enter"]), j(A(ee, ["stop"]), ["escape"])],
|
|
418
423
|
onBlur: R,
|
|
419
424
|
onClick: i[2] ||= A(() => {}, ["stop"])
|
|
420
|
-
}, null, 40,
|
|
425
|
+
}, null, 40, Te)), [[k, _.value]]) : D("", !0),
|
|
421
426
|
f.value ? D("", !0) : (e(), h("span", {
|
|
422
427
|
key: 3,
|
|
423
428
|
class: x(["tpl:flex tpl:shrink-0 tpl:items-center tpl:gap-0.5 tpl:transition-opacity", M.value || w.value ? "tpl:opacity-100" : "tpl:opacity-0 tpl:group-hover:opacity-100 tpl:group-focus-within:opacity-100"])
|
|
@@ -429,10 +434,10 @@ var _e = {
|
|
|
429
434
|
title: p(c).mediaLibrary.addSubfolder,
|
|
430
435
|
"aria-label": p(c).mediaLibrary.addSubfolder,
|
|
431
436
|
onClick: A(z, ["stop"])
|
|
432
|
-
}, [g(p(
|
|
437
|
+
}, [g(p(ae), {
|
|
433
438
|
size: 12,
|
|
434
439
|
"stroke-width": 2
|
|
435
|
-
})], 8,
|
|
440
|
+
})], 8, Ee)) : D("", !0),
|
|
436
441
|
n.canRenameFolder ? (e(), h("button", {
|
|
437
442
|
key: 1,
|
|
438
443
|
type: "button",
|
|
@@ -440,10 +445,10 @@ var _e = {
|
|
|
440
445
|
title: p(c).mediaLibrary.renameFolder,
|
|
441
446
|
"aria-label": p(c).mediaLibrary.renameFolder,
|
|
442
447
|
onClick: A(L, ["stop"])
|
|
443
|
-
}, [g(p(
|
|
448
|
+
}, [g(p(H), {
|
|
444
449
|
size: 12,
|
|
445
450
|
"stroke-width": 2
|
|
446
|
-
})], 8,
|
|
451
|
+
})], 8, De)) : D("", !0),
|
|
447
452
|
n.canDeleteFolder ? (e(), h("button", {
|
|
448
453
|
key: 2,
|
|
449
454
|
type: "button",
|
|
@@ -451,14 +456,14 @@ var _e = {
|
|
|
451
456
|
class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
|
|
452
457
|
title: w.value ? p(c).mediaLibrary.deleteFolderConfirm : p(c).mediaLibrary.deleteFolder,
|
|
453
458
|
"aria-label": w.value ? p(c).mediaLibrary.deleteFolderConfirm : p(c).mediaLibrary.deleteFolder,
|
|
454
|
-
onClick: A(
|
|
455
|
-
}, [g(p(
|
|
459
|
+
onClick: A(re, ["stop"])
|
|
460
|
+
}, [g(p(se), {
|
|
456
461
|
size: 12,
|
|
457
462
|
"stroke-width": 2,
|
|
458
463
|
style: { color: "var(--tpl-danger)" }
|
|
459
|
-
})], 8,
|
|
464
|
+
})], 8, Oe)) : D("", !0)
|
|
460
465
|
], 2))
|
|
461
|
-
], 36), P.value ? (e(), h("div",
|
|
466
|
+
], 36), P.value ? (e(), h("div", ke, [(e(!0), h(C, null, o(n.folder.children, (t) => (e(), S(l, {
|
|
462
467
|
key: t.id,
|
|
463
468
|
folder: t,
|
|
464
469
|
"current-folder-id": n.currentFolderId,
|
|
@@ -492,18 +497,18 @@ var _e = {
|
|
|
492
497
|
},
|
|
493
498
|
placeholder: p(c).mediaLibrary.subfolderName,
|
|
494
499
|
autofocus: "",
|
|
495
|
-
onKeydown: [j(B, ["enter"]), j(A(
|
|
500
|
+
onKeydown: [j(B, ["enter"]), j(A(ne, ["stop"]), ["escape"])],
|
|
496
501
|
onBlur: B
|
|
497
|
-
}, null, 40,
|
|
502
|
+
}, null, 40, Ae), [[k, y.value]])], 4)) : D("", !0)])) : D("", !0)]);
|
|
498
503
|
};
|
|
499
504
|
}
|
|
500
|
-
}),
|
|
505
|
+
}), Me = {
|
|
501
506
|
"data-testid": "media-folder-tree",
|
|
502
507
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:overflow-y-auto"
|
|
503
|
-
},
|
|
508
|
+
}, Ne = {
|
|
504
509
|
key: 0,
|
|
505
510
|
class: "tpl:px-3 tpl:py-2"
|
|
506
|
-
},
|
|
511
|
+
}, Pe = ["placeholder", "onKeydown"], Fe = /* @__PURE__ */ O({
|
|
507
512
|
__name: "MediaFolderTree",
|
|
508
513
|
props: {
|
|
509
514
|
folders: {},
|
|
@@ -522,7 +527,7 @@ var _e = {
|
|
|
522
527
|
"showFrequentlyUsed"
|
|
523
528
|
],
|
|
524
529
|
setup(n, { emit: r }) {
|
|
525
|
-
let i = r, { t: a } =
|
|
530
|
+
let i = r, { t: a } = Z(), s = d(!1), c = d("");
|
|
526
531
|
function l() {
|
|
527
532
|
s.value = !0, c.value = "";
|
|
528
533
|
}
|
|
@@ -532,7 +537,7 @@ var _e = {
|
|
|
532
537
|
function v() {
|
|
533
538
|
s.value = !1, c.value = "";
|
|
534
539
|
}
|
|
535
|
-
return (r, d) => (e(), h("div",
|
|
540
|
+
return (r, d) => (e(), h("div", Me, [
|
|
536
541
|
m("button", {
|
|
537
542
|
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",
|
|
538
543
|
style: t({
|
|
@@ -540,11 +545,11 @@ var _e = {
|
|
|
540
545
|
color: n.viewMode === "files" && n.currentFolderId === null ? "var(--tpl-primary)" : "var(--tpl-text)"
|
|
541
546
|
}),
|
|
542
547
|
onClick: d[0] ||= (e) => i("navigate", null)
|
|
543
|
-
}, [g(p(
|
|
548
|
+
}, [g(p(G), {
|
|
544
549
|
size: 14,
|
|
545
550
|
"stroke-width": 1.5
|
|
546
551
|
}), _(" " + b(p(a).mediaLibrary.allFiles), 1)], 4),
|
|
547
|
-
(e(!0), h(C, null, o(n.folders, (t) => (e(), S(
|
|
552
|
+
(e(!0), h(C, null, o(n.folders, (t) => (e(), S(je, {
|
|
548
553
|
key: t.id,
|
|
549
554
|
folder: t,
|
|
550
555
|
"current-folder-id": n.currentFolderId,
|
|
@@ -563,7 +568,7 @@ var _e = {
|
|
|
563
568
|
"can-rename-folder",
|
|
564
569
|
"can-delete-folder"
|
|
565
570
|
]))), 128)),
|
|
566
|
-
s.value ? (e(), h("div",
|
|
571
|
+
s.value ? (e(), h("div", Ne, [u(m("input", {
|
|
567
572
|
"onUpdate:modelValue": d[5] ||= (e) => c.value = e,
|
|
568
573
|
type: "text",
|
|
569
574
|
class: "tpl:w-full tpl:rounded tpl:border tpl:px-2 tpl:py-1 tpl:text-xs tpl:outline-none",
|
|
@@ -576,13 +581,13 @@ var _e = {
|
|
|
576
581
|
autofocus: "",
|
|
577
582
|
onKeydown: [j(f, ["enter"]), j(A(v, ["stop"]), ["escape"])],
|
|
578
583
|
onBlur: f
|
|
579
|
-
}, null, 40,
|
|
584
|
+
}, null, 40, Pe), [[k, c.value]])])) : D("", !0),
|
|
580
585
|
!s.value && n.canCreateFolder ? (e(), h("button", {
|
|
581
586
|
key: 1,
|
|
582
587
|
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",
|
|
583
588
|
style: { color: "var(--tpl-text-muted)" },
|
|
584
589
|
onClick: l
|
|
585
|
-
}, [g(p(
|
|
590
|
+
}, [g(p(ae), {
|
|
586
591
|
size: 14,
|
|
587
592
|
"stroke-width": 1.5
|
|
588
593
|
}), _(" " + b(p(a).mediaLibrary.newFolder), 1)])) : D("", !0),
|
|
@@ -597,13 +602,13 @@ var _e = {
|
|
|
597
602
|
color: n.viewMode === "frequently-used" ? "var(--tpl-primary)" : "var(--tpl-text)"
|
|
598
603
|
}),
|
|
599
604
|
onClick: d[6] ||= (e) => i("showFrequentlyUsed")
|
|
600
|
-
}, [g(p(
|
|
605
|
+
}, [g(p(de), {
|
|
601
606
|
size: 14,
|
|
602
607
|
"stroke-width": 1.5
|
|
603
608
|
}), _(" " + b(p(a).mediaLibrary.frequentlyUsed), 1)], 4)) : D("", !0)
|
|
604
609
|
]));
|
|
605
610
|
}
|
|
606
|
-
}),
|
|
611
|
+
}), Ie = /* @__PURE__ */ O({
|
|
607
612
|
__name: "MediaFileIcon",
|
|
608
613
|
props: { mimeType: {} },
|
|
609
614
|
setup(n) {
|
|
@@ -779,7 +784,7 @@ var _e = {
|
|
|
779
784
|
});
|
|
780
785
|
//#endregion
|
|
781
786
|
//#region ../media-library/src/utils/formatAbsoluteDate.ts
|
|
782
|
-
function
|
|
787
|
+
function Le(e, t, n) {
|
|
783
788
|
let r = new Date(e);
|
|
784
789
|
if (Number.isNaN(r.getTime())) return "";
|
|
785
790
|
let i = t?.trim().replace(/_/g, "-") || void 0;
|
|
@@ -790,35 +795,48 @@ function Ie(e, t, n) {
|
|
|
790
795
|
}
|
|
791
796
|
}
|
|
792
797
|
//#endregion
|
|
798
|
+
//#region ../media-library/src/utils/formatFileSize.ts
|
|
799
|
+
var Re = [
|
|
800
|
+
"B",
|
|
801
|
+
"KB",
|
|
802
|
+
"MB",
|
|
803
|
+
"GB"
|
|
804
|
+
];
|
|
805
|
+
function $(e) {
|
|
806
|
+
let t = e, n = 0;
|
|
807
|
+
for (; t >= 1024 && n < Re.length - 1;) t /= 1024, n += 1;
|
|
808
|
+
return `${Math.round(t * 10) / 10} ${Re[n]}`;
|
|
809
|
+
}
|
|
810
|
+
//#endregion
|
|
793
811
|
//#region ../media-library/src/components/media/MediaGrid.vue?vue&type=script&setup=true&lang.ts
|
|
794
|
-
var
|
|
812
|
+
var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
|
|
795
813
|
key: 1,
|
|
796
814
|
class: "tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:py-16"
|
|
797
|
-
},
|
|
815
|
+
}, He = {
|
|
798
816
|
class: "tpl:text-xs",
|
|
799
817
|
style: { color: "var(--tpl-text-muted)" }
|
|
800
|
-
},
|
|
818
|
+
}, Ue = ["aria-label"], We = [
|
|
801
819
|
"data-media-id",
|
|
802
820
|
"aria-selected",
|
|
803
821
|
"aria-label",
|
|
804
822
|
"onClick",
|
|
805
823
|
"onDblclick",
|
|
806
824
|
"onKeydown"
|
|
807
|
-
],
|
|
825
|
+
], Ge = { class: "tpl:aspect-square" }, Ke = ["src", "alt"], qe = { class: "tpl:px-2 tpl:py-1.5" }, Je = {
|
|
808
826
|
class: "tpl:truncate tpl:text-[10px] tpl:font-medium",
|
|
809
827
|
style: { color: "var(--tpl-text)" }
|
|
810
|
-
},
|
|
828
|
+
}, Ye = {
|
|
811
829
|
class: "tpl:flex tpl:justify-between tpl:text-[10px]",
|
|
812
830
|
style: { color: "var(--tpl-text-muted)" }
|
|
813
|
-
},
|
|
831
|
+
}, Xe = { key: 0 }, Ze = { key: 1 }, Qe = [
|
|
814
832
|
"title",
|
|
815
833
|
"aria-label",
|
|
816
834
|
"onClick"
|
|
817
|
-
],
|
|
835
|
+
], $e = [
|
|
818
836
|
"title",
|
|
819
837
|
"aria-label",
|
|
820
838
|
"onClick"
|
|
821
|
-
],
|
|
839
|
+
], et = {
|
|
822
840
|
key: 0,
|
|
823
841
|
"aria-hidden": "true",
|
|
824
842
|
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",
|
|
@@ -826,34 +844,34 @@ var Le = { class: "tpl:p-4" }, Re = ["aria-label"], ze = {
|
|
|
826
844
|
"background-color": "var(--tpl-primary)",
|
|
827
845
|
color: "var(--tpl-on-primary)"
|
|
828
846
|
}
|
|
829
|
-
},
|
|
847
|
+
}, tt = ["aria-label"], nt = [
|
|
830
848
|
"data-media-id",
|
|
831
849
|
"aria-selected",
|
|
832
850
|
"aria-label",
|
|
833
851
|
"onClick",
|
|
834
852
|
"onDblclick",
|
|
835
853
|
"onKeydown"
|
|
836
|
-
],
|
|
854
|
+
], rt = {
|
|
837
855
|
class: "tpl:size-10 tpl:shrink-0 tpl:overflow-hidden tpl:rounded",
|
|
838
856
|
style: { "background-color": "var(--tpl-bg-hover)" }
|
|
839
|
-
},
|
|
857
|
+
}, it = ["src", "alt"], at = {
|
|
840
858
|
key: 1,
|
|
841
859
|
class: "tpl-list-icon tpl:size-full"
|
|
842
|
-
},
|
|
860
|
+
}, ot = { class: "tpl:min-w-0 tpl:flex-1" }, st = {
|
|
843
861
|
class: "tpl:truncate tpl:text-xs tpl:font-medium",
|
|
844
862
|
style: { color: "var(--tpl-text)" }
|
|
845
|
-
},
|
|
863
|
+
}, ct = {
|
|
846
864
|
class: "tpl:text-[10px]",
|
|
847
865
|
style: { color: "var(--tpl-text-muted)" }
|
|
848
|
-
},
|
|
866
|
+
}, lt = [
|
|
849
867
|
"title",
|
|
850
868
|
"aria-label",
|
|
851
869
|
"onClick"
|
|
852
|
-
],
|
|
870
|
+
], ut = [
|
|
853
871
|
"title",
|
|
854
872
|
"aria-label",
|
|
855
873
|
"onClick"
|
|
856
|
-
],
|
|
874
|
+
], dt = {
|
|
857
875
|
key: 0,
|
|
858
876
|
"aria-hidden": "true",
|
|
859
877
|
class: "tpl:flex tpl:size-5 tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded-full",
|
|
@@ -861,10 +879,10 @@ var Le = { class: "tpl:p-4" }, Re = ["aria-label"], ze = {
|
|
|
861
879
|
"background-color": "var(--tpl-primary)",
|
|
862
880
|
color: "var(--tpl-on-primary)"
|
|
863
881
|
}
|
|
864
|
-
},
|
|
882
|
+
}, ft = {
|
|
865
883
|
key: 4,
|
|
866
884
|
class: "tpl:flex tpl:justify-center tpl:py-4"
|
|
867
|
-
},
|
|
885
|
+
}, pt = /*#__PURE__*/ W(/* @__PURE__ */ O({
|
|
868
886
|
__name: "MediaGrid",
|
|
869
887
|
props: {
|
|
870
888
|
items: {},
|
|
@@ -886,7 +904,7 @@ var Le = { class: "tpl:p-4" }, Re = ["aria-label"], ze = {
|
|
|
886
904
|
"confirm"
|
|
887
905
|
],
|
|
888
906
|
setup(n, { emit: r }) {
|
|
889
|
-
let i = n, a = r, { isAcceptedMimeType: s, isImageMimeType: c } =
|
|
907
|
+
let i = n, a = r, { isAcceptedMimeType: s, isImageMimeType: c } = Q();
|
|
890
908
|
function u(e) {
|
|
891
909
|
return e.mimeType ?? "";
|
|
892
910
|
}
|
|
@@ -921,21 +939,18 @@ var Le = { class: "tpl:p-4" }, Re = ["aria-label"], ze = {
|
|
|
921
939
|
function j(e) {
|
|
922
940
|
return k(e) ? "tpl:opacity-100" : "tpl:opacity-0 tpl:group-hover:opacity-100 tpl:group-focus-within:opacity-100";
|
|
923
941
|
}
|
|
924
|
-
let { t: M } =
|
|
942
|
+
let { t: M } = Z(), N = l(X, null), P = d(null);
|
|
925
943
|
R(P, ([{ isIntersecting: e }]) => {
|
|
926
944
|
e && i.hasMore && !i.isLoading && a("loadMore");
|
|
927
945
|
}, { threshold: .1 });
|
|
928
946
|
function F(e) {
|
|
929
|
-
return
|
|
930
|
-
}
|
|
931
|
-
function I(e) {
|
|
932
|
-
return Ie(e, N?.value, {
|
|
947
|
+
return Le(e, N?.value, {
|
|
933
948
|
year: "numeric",
|
|
934
949
|
month: "short",
|
|
935
950
|
day: "numeric"
|
|
936
951
|
});
|
|
937
952
|
}
|
|
938
|
-
return (r, i) => (e(), h("div",
|
|
953
|
+
return (r, i) => (e(), h("div", ze, [
|
|
939
954
|
n.isLoading && n.items.length === 0 ? (e(), h("div", {
|
|
940
955
|
key: 0,
|
|
941
956
|
role: "status",
|
|
@@ -947,12 +962,12 @@ var Le = { class: "tpl:p-4" }, Re = ["aria-label"], ze = {
|
|
|
947
962
|
class: x(["tpl-pulse tpl:rounded-lg", n.layout === "list" ? "tpl:h-12" : "tpl:aspect-square"]),
|
|
948
963
|
style: { "background-color": "var(--tpl-bg-hover)" },
|
|
949
964
|
"aria-hidden": "true"
|
|
950
|
-
}, null, 2)), 64))], 10,
|
|
965
|
+
}, null, 2)), 64))], 10, Be)) : n.items.length === 0 ? (e(), h("div", Ve, [g(p(G), {
|
|
951
966
|
class: "tpl:mb-3",
|
|
952
967
|
size: 40,
|
|
953
968
|
"stroke-width": 1,
|
|
954
969
|
style: { color: "var(--tpl-text-dim)" }
|
|
955
|
-
}), m("p",
|
|
970
|
+
}), m("p", He, b(n.searchQuery ? p(M).mediaLibrary.noSearchResults : p(M).mediaLibrary.noFiles), 1)])) : n.layout === "list" ? (e(), h("div", {
|
|
956
971
|
key: 3,
|
|
957
972
|
role: "listbox",
|
|
958
973
|
"aria-label": p(M).mediaLibrary.filesListAriaLabel,
|
|
@@ -972,16 +987,16 @@ var Le = { class: "tpl:p-4" }, Re = ["aria-label"], ze = {
|
|
|
972
987
|
onDblclick: (e) => E(n),
|
|
973
988
|
onKeydown: (e) => O(n, e)
|
|
974
989
|
}, [
|
|
975
|
-
m("div",
|
|
990
|
+
m("div", rt, [p(c)(u(n)) ? (e(), h("img", {
|
|
976
991
|
key: 0,
|
|
977
992
|
src: f(n),
|
|
978
993
|
alt: n.filename || n.url,
|
|
979
994
|
class: "tpl:size-full tpl:object-cover",
|
|
980
995
|
loading: "lazy"
|
|
981
|
-
}, null, 8,
|
|
982
|
-
m("div",
|
|
983
|
-
n.size == null ? D("", !0) : (e(), h(C, { key: 0 }, [_(b(
|
|
984
|
-
n.createdAt ? (e(), h(C, { key: 1 }, [n.size == null ? D("", !0) : (e(), h(C, { key: 0 }, [_(" · ")], 64)), _(" " + b(
|
|
996
|
+
}, null, 8, it)) : (e(), h("div", at, [g(Ie, { "mime-type": u(n) }, null, 8, ["mime-type"])]))]),
|
|
997
|
+
m("div", ot, [m("p", st, b(n.filename || n.url), 1), m("p", ct, [
|
|
998
|
+
n.size == null ? D("", !0) : (e(), h(C, { key: 0 }, [_(b(p($)(n.size)), 1)], 64)),
|
|
999
|
+
n.createdAt ? (e(), h(C, { key: 1 }, [n.size == null ? D("", !0) : (e(), h(C, { key: 0 }, [_(" · ")], 64)), _(" " + b(F(n.createdAt)), 1)], 64)) : D("", !0),
|
|
985
1000
|
p(c)(u(n)) && n.width && n.height ? (e(), h(C, { key: 2 }, [_(" · " + b(n.width) + "×" + b(n.height), 1)], 64)) : D("", !0)
|
|
986
1001
|
])]),
|
|
987
1002
|
m("div", { class: x(["tpl:flex tpl:gap-1 tpl:transition-opacity tpl:duration-150", j(n)]) }, [y(n) ? (e(), h("button", {
|
|
@@ -993,10 +1008,10 @@ var Le = { class: "tpl:p-4" }, Re = ["aria-label"], ze = {
|
|
|
993
1008
|
title: p(M).mediaLibrary.editFile,
|
|
994
1009
|
"aria-label": p(M).mediaLibrary.editFile,
|
|
995
1010
|
onClick: A((e) => a("edit", n), ["stop"])
|
|
996
|
-
}, [g(p(
|
|
1011
|
+
}, [g(p(H), {
|
|
997
1012
|
size: 12,
|
|
998
1013
|
"stroke-width": 2
|
|
999
|
-
})], 8,
|
|
1014
|
+
})], 8, lt)) : D("", !0), w(n) ? (e(), h("button", {
|
|
1000
1015
|
key: 1,
|
|
1001
1016
|
type: "button",
|
|
1002
1017
|
"data-testid": "media-replace",
|
|
@@ -1005,15 +1020,15 @@ var Le = { class: "tpl:p-4" }, Re = ["aria-label"], ze = {
|
|
|
1005
1020
|
title: p(M).mediaLibrary.replaceFile,
|
|
1006
1021
|
"aria-label": p(M).mediaLibrary.replaceFile,
|
|
1007
1022
|
onClick: A((e) => a("replace", n), ["stop"])
|
|
1008
|
-
}, [g(p(
|
|
1023
|
+
}, [g(p(U), {
|
|
1009
1024
|
size: 12,
|
|
1010
1025
|
"stroke-width": 2
|
|
1011
|
-
})], 8,
|
|
1012
|
-
k(n) ? (e(), h("div",
|
|
1026
|
+
})], 8, ut)) : D("", !0)], 2),
|
|
1027
|
+
k(n) ? (e(), h("div", dt, [g(p(B), {
|
|
1013
1028
|
size: 12,
|
|
1014
1029
|
"stroke-width": 3
|
|
1015
1030
|
})])) : D("", !0)
|
|
1016
|
-
], 46,
|
|
1031
|
+
], 46, nt))), 128))], 8, tt)) : (e(), h("div", {
|
|
1017
1032
|
key: 2,
|
|
1018
1033
|
role: "listbox",
|
|
1019
1034
|
"aria-label": p(M).mediaLibrary.filesListAriaLabel,
|
|
@@ -1040,17 +1055,17 @@ var Le = { class: "tpl:p-4" }, Re = ["aria-label"], ze = {
|
|
|
1040
1055
|
onDblclick: (e) => E(n),
|
|
1041
1056
|
onKeydown: (e) => O(n, e)
|
|
1042
1057
|
}, [
|
|
1043
|
-
m("div",
|
|
1058
|
+
m("div", Ge, [p(c)(u(n)) ? (e(), h("img", {
|
|
1044
1059
|
key: 0,
|
|
1045
1060
|
src: f(n),
|
|
1046
1061
|
alt: n.filename || n.url,
|
|
1047
1062
|
class: "tpl:size-full tpl:object-cover",
|
|
1048
1063
|
loading: "lazy"
|
|
1049
|
-
}, null, 8,
|
|
1064
|
+
}, null, 8, Ke)) : (e(), S(Ie, {
|
|
1050
1065
|
key: 1,
|
|
1051
1066
|
"mime-type": u(n)
|
|
1052
1067
|
}, null, 8, ["mime-type"]))]),
|
|
1053
|
-
m("div",
|
|
1068
|
+
m("div", qe, [m("p", Je, b(n.filename || n.url), 1), m("p", Ye, [n.size == null ? D("", !0) : (e(), h("span", Xe, b(p($)(n.size)), 1)), p(c)(u(n)) && n.width && n.height ? (e(), h("span", Ze, b(n.width) + "×" + b(n.height), 1)) : D("", !0)])]),
|
|
1054
1069
|
m("div", { class: x(["tpl:absolute tpl:top-1.5 tpl:left-1.5 tpl:flex tpl:gap-1 tpl:transition-opacity tpl:duration-150", j(n)]) }, [y(n) ? (e(), h("button", {
|
|
1055
1070
|
key: 0,
|
|
1056
1071
|
type: "button",
|
|
@@ -1063,10 +1078,10 @@ var Le = { class: "tpl:p-4" }, Re = ["aria-label"], ze = {
|
|
|
1063
1078
|
title: p(M).mediaLibrary.editFile,
|
|
1064
1079
|
"aria-label": p(M).mediaLibrary.editFile,
|
|
1065
1080
|
onClick: A((e) => a("edit", n), ["stop"])
|
|
1066
|
-
}, [g(p(
|
|
1081
|
+
}, [g(p(H), {
|
|
1067
1082
|
size: 11,
|
|
1068
1083
|
"stroke-width": 2
|
|
1069
|
-
})], 8,
|
|
1084
|
+
})], 8, Qe)) : D("", !0), w(n) ? (e(), h("button", {
|
|
1070
1085
|
key: 1,
|
|
1071
1086
|
type: "button",
|
|
1072
1087
|
"data-testid": "media-replace",
|
|
@@ -1078,21 +1093,21 @@ var Le = { class: "tpl:p-4" }, Re = ["aria-label"], ze = {
|
|
|
1078
1093
|
title: p(M).mediaLibrary.replaceFile,
|
|
1079
1094
|
"aria-label": p(M).mediaLibrary.replaceFile,
|
|
1080
1095
|
onClick: A((e) => a("replace", n), ["stop"])
|
|
1081
|
-
}, [g(p(
|
|
1096
|
+
}, [g(p(U), {
|
|
1082
1097
|
size: 11,
|
|
1083
1098
|
"stroke-width": 2
|
|
1084
|
-
})], 8,
|
|
1085
|
-
k(n) ? (e(), h("div",
|
|
1099
|
+
})], 8, $e)) : D("", !0)], 2),
|
|
1100
|
+
k(n) ? (e(), h("div", et, [g(p(B), {
|
|
1086
1101
|
size: 12,
|
|
1087
1102
|
"stroke-width": 3
|
|
1088
1103
|
})])) : D("", !0)
|
|
1089
|
-
], 46,
|
|
1104
|
+
], 46, We))), 128))], 8, Ue)),
|
|
1090
1105
|
m("div", {
|
|
1091
1106
|
ref_key: "sentinelRef",
|
|
1092
1107
|
ref: P,
|
|
1093
1108
|
class: "tpl:h-4"
|
|
1094
1109
|
}, null, 512),
|
|
1095
|
-
n.isLoading && n.items.length > 0 ? (e(), h("div",
|
|
1110
|
+
n.isLoading && n.items.length > 0 ? (e(), h("div", ft, [g(p(V), {
|
|
1096
1111
|
class: "tpl-spinner",
|
|
1097
1112
|
size: 20,
|
|
1098
1113
|
"stroke-width": 2,
|
|
@@ -1100,26 +1115,26 @@ var Le = { class: "tpl:p-4" }, Re = ["aria-label"], ze = {
|
|
|
1100
1115
|
})])) : D("", !0)
|
|
1101
1116
|
]));
|
|
1102
1117
|
}
|
|
1103
|
-
}), [["__scopeId", "data-v-
|
|
1118
|
+
}), [["__scopeId", "data-v-57c35946"]]), mt = ["data-tpl-theme"], ht = {
|
|
1104
1119
|
id: "tpl-media-import-title",
|
|
1105
1120
|
class: "tpl:mb-4 tpl:text-sm tpl:font-semibold",
|
|
1106
1121
|
style: { color: "var(--tpl-text)" }
|
|
1107
|
-
},
|
|
1122
|
+
}, gt = { class: "tpl:mb-3" }, _t = [
|
|
1108
1123
|
"aria-label",
|
|
1109
1124
|
"aria-invalid",
|
|
1110
1125
|
"aria-describedby",
|
|
1111
1126
|
"placeholder",
|
|
1112
1127
|
"disabled"
|
|
1113
|
-
],
|
|
1128
|
+
], vt = {
|
|
1114
1129
|
key: 0,
|
|
1115
1130
|
id: "tpl-media-import-error",
|
|
1116
1131
|
role: "alert",
|
|
1117
1132
|
class: "tpl:mb-3 tpl:text-xs",
|
|
1118
1133
|
style: { color: "var(--tpl-danger)" }
|
|
1119
|
-
},
|
|
1134
|
+
}, yt = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, bt = ["disabled"], xt = ["disabled"], St = {
|
|
1120
1135
|
key: 0,
|
|
1121
1136
|
class: "tpl:flex tpl:items-center tpl:gap-1.5"
|
|
1122
|
-
},
|
|
1137
|
+
}, Ct = { key: 1 }, wt = /* @__PURE__ */ O({
|
|
1123
1138
|
__name: "MediaImportUrlModal",
|
|
1124
1139
|
props: {
|
|
1125
1140
|
visible: { type: Boolean },
|
|
@@ -1128,7 +1143,7 @@ var Le = { class: "tpl:p-4" }, Re = ["aria-label"], ze = {
|
|
|
1128
1143
|
},
|
|
1129
1144
|
emits: ["import", "close"],
|
|
1130
1145
|
setup(t, { emit: r }) {
|
|
1131
|
-
let i = t, a = r, { t: o } =
|
|
1146
|
+
let i = t, a = r, { t: o } = Z(), s = l(Y, null), f = l(J, d(null)), y = d("");
|
|
1132
1147
|
c(() => i.visible, (e) => {
|
|
1133
1148
|
e && (y.value = "");
|
|
1134
1149
|
});
|
|
@@ -1140,7 +1155,7 @@ var Le = { class: "tpl:p-4" }, Re = ["aria-label"], ze = {
|
|
|
1140
1155
|
i.isImporting || a("close");
|
|
1141
1156
|
}
|
|
1142
1157
|
let E = d(null);
|
|
1143
|
-
|
|
1158
|
+
_e(E, T(() => i.visible));
|
|
1144
1159
|
function O(e) {
|
|
1145
1160
|
e.stopPropagation(), e.key === "Enter" && (e.preventDefault(), C()), e.key === "Escape" && w();
|
|
1146
1161
|
}
|
|
@@ -1168,8 +1183,8 @@ var Le = { class: "tpl:p-4" }, Re = ["aria-label"], ze = {
|
|
|
1168
1183
|
class: "tpl:max-h-[90%] tpl:w-full tpl:max-w-sm tpl:overflow-y-auto tpl:rounded-lg tpl:p-5 tpl:shadow-xl",
|
|
1169
1184
|
style: { "background-color": "var(--tpl-bg-elevated)" }
|
|
1170
1185
|
}, [
|
|
1171
|
-
m("h3",
|
|
1172
|
-
m("div",
|
|
1186
|
+
m("h3", ht, b(p(o).mediaLibrary.importFromUrl), 1),
|
|
1187
|
+
m("div", gt, [u(m("input", {
|
|
1173
1188
|
"onUpdate:modelValue": i[0] ||= (e) => y.value = e,
|
|
1174
1189
|
type: "url",
|
|
1175
1190
|
"aria-label": p(o).mediaLibrary.importFromUrl,
|
|
@@ -1184,9 +1199,9 @@ var Le = { class: "tpl:p-4" }, Re = ["aria-label"], ze = {
|
|
|
1184
1199
|
placeholder: p(o).mediaLibrary.importUrlPlaceholder,
|
|
1185
1200
|
disabled: t.isImporting,
|
|
1186
1201
|
autofocus: ""
|
|
1187
|
-
}, null, 8,
|
|
1188
|
-
t.error ? (e(), h("p",
|
|
1189
|
-
m("div",
|
|
1202
|
+
}, null, 8, _t), [[k, y.value]])]),
|
|
1203
|
+
t.error ? (e(), h("p", vt, b(t.error), 1)) : D("", !0),
|
|
1204
|
+
m("div", yt, [m("button", {
|
|
1190
1205
|
class: x(["tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150", { "tpl:cursor-not-allowed tpl:opacity-50": t.isImporting }]),
|
|
1191
1206
|
style: {
|
|
1192
1207
|
"border-color": "var(--tpl-border)",
|
|
@@ -1195,7 +1210,7 @@ var Le = { class: "tpl:p-4" }, Re = ["aria-label"], ze = {
|
|
|
1195
1210
|
},
|
|
1196
1211
|
disabled: t.isImporting,
|
|
1197
1212
|
onClick: w
|
|
1198
|
-
}, b(p(o).mediaLibrary.cancel), 11,
|
|
1213
|
+
}, b(p(o).mediaLibrary.cancel), 11, bt), m("button", {
|
|
1199
1214
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150 tpl:hover:bg-[var(--tpl-primary-hover)] tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50",
|
|
1200
1215
|
style: {
|
|
1201
1216
|
"background-color": "var(--tpl-primary)",
|
|
@@ -1203,20 +1218,20 @@ var Le = { class: "tpl:p-4" }, Re = ["aria-label"], ze = {
|
|
|
1203
1218
|
},
|
|
1204
1219
|
disabled: !y.value.trim() || t.isImporting,
|
|
1205
1220
|
onClick: C
|
|
1206
|
-
}, [t.isImporting ? (e(), h("span",
|
|
1221
|
+
}, [t.isImporting ? (e(), h("span", St, [g(p(V), {
|
|
1207
1222
|
class: "tpl:animate-spin",
|
|
1208
1223
|
size: 12,
|
|
1209
1224
|
"stroke-width": 2
|
|
1210
|
-
}), _(" " + b(p(o).mediaLibrary.importing), 1)])) : (e(), h("span",
|
|
1211
|
-
], 512)], 42,
|
|
1225
|
+
}), _(" " + b(p(o).mediaLibrary.importing), 1)])) : (e(), h("span", Ct, b(p(o).mediaLibrary.import), 1))], 8, xt)])
|
|
1226
|
+
], 512)], 42, mt)) : D("", !0)]),
|
|
1212
1227
|
_: 1
|
|
1213
1228
|
})], 8, ["to"]));
|
|
1214
1229
|
}
|
|
1215
|
-
}),
|
|
1230
|
+
}), Tt = { class: "tpl:max-h-56 tpl:overflow-y-auto tpl:py-1" }, Et = ["disabled", "onClick"], Dt = { class: "tpl:truncate" }, Ot = {
|
|
1216
1231
|
key: 0,
|
|
1217
1232
|
class: "tpl:shrink-0",
|
|
1218
1233
|
style: { color: "var(--tpl-text-dim)" }
|
|
1219
|
-
},
|
|
1234
|
+
}, kt = /* @__PURE__ */ O({
|
|
1220
1235
|
__name: "MediaMovePicker",
|
|
1221
1236
|
props: {
|
|
1222
1237
|
folders: {},
|
|
@@ -1224,7 +1239,7 @@ var Le = { class: "tpl:p-4" }, Re = ["aria-label"], ze = {
|
|
|
1224
1239
|
},
|
|
1225
1240
|
emits: ["select", "close"],
|
|
1226
1241
|
setup(n, { emit: r }) {
|
|
1227
|
-
let i = r, { t: a } =
|
|
1242
|
+
let i = r, { t: a } = Z(), s = d(null);
|
|
1228
1243
|
function c(e, t = 0) {
|
|
1229
1244
|
let n = [];
|
|
1230
1245
|
for (let r of e) n.push({
|
|
@@ -1245,12 +1260,12 @@ var Le = { class: "tpl:p-4" }, Re = ["aria-label"], ze = {
|
|
|
1245
1260
|
"border-color": "var(--tpl-border)",
|
|
1246
1261
|
"background-color": "var(--tpl-bg-elevated)"
|
|
1247
1262
|
}
|
|
1248
|
-
}, [m("div",
|
|
1263
|
+
}, [m("div", Tt, [n.currentFolderId === null ? D("", !0) : (e(), h("button", {
|
|
1249
1264
|
key: 0,
|
|
1250
1265
|
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",
|
|
1251
1266
|
style: { color: "var(--tpl-text)" },
|
|
1252
1267
|
onClick: l[0] ||= (e) => i("select", null)
|
|
1253
|
-
}, [g(p(
|
|
1268
|
+
}, [g(p(G), {
|
|
1254
1269
|
class: "tpl:shrink-0",
|
|
1255
1270
|
size: 14,
|
|
1256
1271
|
"stroke-width": 1.5
|
|
@@ -1265,33 +1280,33 @@ var Le = { class: "tpl:p-4" }, Re = ["aria-label"], ze = {
|
|
|
1265
1280
|
disabled: r.id === n.currentFolderId,
|
|
1266
1281
|
onClick: (e) => i("select", r.id)
|
|
1267
1282
|
}, [
|
|
1268
|
-
g(p(
|
|
1283
|
+
g(p(K), {
|
|
1269
1284
|
class: "tpl:shrink-0",
|
|
1270
1285
|
size: 14,
|
|
1271
1286
|
"stroke-width": 1.5
|
|
1272
1287
|
}),
|
|
1273
|
-
m("span",
|
|
1274
|
-
r.id === n.currentFolderId ? (e(), h("span",
|
|
1275
|
-
], 12,
|
|
1288
|
+
m("span", Dt, b(r.name), 1),
|
|
1289
|
+
r.id === n.currentFolderId ? (e(), h("span", Ot, b(p(a).mediaLibrary.currentFolder), 1)) : D("", !0)
|
|
1290
|
+
], 12, Et))), 128))])], 512));
|
|
1276
1291
|
}
|
|
1277
|
-
}),
|
|
1292
|
+
}), At = { class: "tpl:flex tpl:items-center tpl:gap-3" }, jt = ["src", "alt"], Mt = {
|
|
1278
1293
|
key: 1,
|
|
1279
1294
|
class: "tpl:flex tpl:size-10 tpl:shrink-0 tpl:items-center tpl:justify-center tpl:overflow-hidden tpl:rounded",
|
|
1280
1295
|
style: { border: "1px solid var(--tpl-border)" }
|
|
1281
|
-
},
|
|
1296
|
+
}, Nt = { class: "tpl:min-w-0 tpl:flex-1" }, Pt = {
|
|
1282
1297
|
class: "tpl:truncate tpl:text-xs tpl:font-medium",
|
|
1283
1298
|
style: { color: "var(--tpl-text)" }
|
|
1284
|
-
},
|
|
1299
|
+
}, Ft = {
|
|
1285
1300
|
class: "tpl:mt-0.5 tpl:text-[10px]",
|
|
1286
1301
|
style: { color: "var(--tpl-text-muted)" }
|
|
1287
|
-
},
|
|
1302
|
+
}, It = /*#__PURE__*/ W(/* @__PURE__ */ O({
|
|
1288
1303
|
__name: "MediaPreviewPanel",
|
|
1289
1304
|
props: {
|
|
1290
1305
|
item: {},
|
|
1291
1306
|
folders: {}
|
|
1292
1307
|
},
|
|
1293
1308
|
setup(t) {
|
|
1294
|
-
let n = t, r = l(
|
|
1309
|
+
let n = t, r = l(X, null), { isImageMimeType: i } = Q();
|
|
1295
1310
|
function a(e, t, n = []) {
|
|
1296
1311
|
for (let r of e) {
|
|
1297
1312
|
let e = [...n, r.name];
|
|
@@ -1309,34 +1324,31 @@ var Le = { class: "tpl:p-4" }, Re = ["aria-label"], ze = {
|
|
|
1309
1324
|
return e ? e.join("/") : null;
|
|
1310
1325
|
}), s = T(() => n.item.mimeType ?? ""), c = T(() => i(s.value));
|
|
1311
1326
|
function u(e) {
|
|
1312
|
-
return
|
|
1313
|
-
}
|
|
1314
|
-
function d(e) {
|
|
1315
|
-
return Ie(e, r?.value, {
|
|
1327
|
+
return Le(e, r?.value, {
|
|
1316
1328
|
year: "numeric",
|
|
1317
1329
|
month: "short",
|
|
1318
1330
|
day: "numeric"
|
|
1319
1331
|
});
|
|
1320
1332
|
}
|
|
1321
|
-
let
|
|
1322
|
-
return (n, r) => (e(), h("div",
|
|
1333
|
+
let d = T(() => n.item.filename || n.item.url);
|
|
1334
|
+
return (n, r) => (e(), h("div", At, [c.value ? (e(), h("img", {
|
|
1323
1335
|
key: 0,
|
|
1324
1336
|
src: t.item.url,
|
|
1325
|
-
alt: t.item.alt ||
|
|
1337
|
+
alt: t.item.alt || d.value,
|
|
1326
1338
|
class: "tpl:size-10 tpl:shrink-0 tpl:rounded tpl:object-cover",
|
|
1327
1339
|
style: { border: "1px solid var(--tpl-border)" }
|
|
1328
|
-
}, null, 8,
|
|
1340
|
+
}, null, 8, jt)) : (e(), h("div", Mt, [g(Ie, {
|
|
1329
1341
|
"mime-type": s.value,
|
|
1330
1342
|
class: "tpl-preview-icon"
|
|
1331
|
-
}, null, 8, ["mime-type"])])), m("div",
|
|
1332
|
-
m("p",
|
|
1333
|
-
m("p",
|
|
1334
|
-
t.item.size == null ? D("", !0) : (e(), h(C, { key: 0 }, [_(b(
|
|
1335
|
-
t.item.createdAt ? (e(), h(C, { key: 1 }, [t.item.size == null ? D("", !0) : (e(), h(C, { key: 0 }, [_(" · ")], 64)), _(" " + b(
|
|
1343
|
+
}, null, 8, ["mime-type"])])), m("div", Nt, [
|
|
1344
|
+
m("p", Pt, b(d.value), 1),
|
|
1345
|
+
m("p", Ft, [
|
|
1346
|
+
t.item.size == null ? D("", !0) : (e(), h(C, { key: 0 }, [_(b(p($)(t.item.size)), 1)], 64)),
|
|
1347
|
+
t.item.createdAt ? (e(), h(C, { key: 1 }, [t.item.size == null ? D("", !0) : (e(), h(C, { key: 0 }, [_(" · ")], 64)), _(" " + b(u(t.item.createdAt)), 1)], 64)) : D("", !0),
|
|
1336
1348
|
c.value && t.item.width && t.item.height ? (e(), h(C, { key: 2 }, [_(" · " + b(t.item.width) + "×" + b(t.item.height) + "px ", 1)], 64)) : D("", !0),
|
|
1337
1349
|
o.value ? (e(), h(C, { key: 3 }, [
|
|
1338
1350
|
r[0] ||= _(" · ", -1),
|
|
1339
|
-
g(p(
|
|
1351
|
+
g(p(K), {
|
|
1340
1352
|
class: "tpl:mb-px tpl:inline",
|
|
1341
1353
|
size: 9,
|
|
1342
1354
|
"stroke-width": 2
|
|
@@ -1351,37 +1363,37 @@ var Le = { class: "tpl:p-4" }, Re = ["aria-label"], ze = {
|
|
|
1351
1363
|
}, b(t.item.alt || "\xA0"), 3)) : D("", !0)
|
|
1352
1364
|
])]));
|
|
1353
1365
|
}
|
|
1354
|
-
}), [["__scopeId", "data-v-
|
|
1366
|
+
}), [["__scopeId", "data-v-50993988"]]), Lt = ["data-tpl-theme"], Rt = {
|
|
1355
1367
|
id: "tpl-media-replace-title",
|
|
1356
1368
|
class: "tpl:mb-2 tpl:text-sm tpl:font-semibold",
|
|
1357
1369
|
style: { color: "var(--tpl-text)" }
|
|
1358
|
-
},
|
|
1370
|
+
}, zt = {
|
|
1359
1371
|
class: "tpl:mb-2 tpl:text-xs",
|
|
1360
1372
|
style: { color: "var(--tpl-text-muted)" }
|
|
1361
|
-
},
|
|
1373
|
+
}, Bt = {
|
|
1362
1374
|
key: 0,
|
|
1363
1375
|
class: "tpl:mb-3 tpl:text-xs",
|
|
1364
1376
|
style: { color: "var(--tpl-text-muted)" }
|
|
1365
|
-
},
|
|
1377
|
+
}, Vt = {
|
|
1366
1378
|
class: "tpl:mb-3 tpl:rounded tpl:border tpl:p-2",
|
|
1367
1379
|
style: { "border-color": "var(--tpl-border)" }
|
|
1368
|
-
},
|
|
1380
|
+
}, Ht = {
|
|
1369
1381
|
class: "tpl:truncate tpl:text-xs tpl:font-medium",
|
|
1370
1382
|
style: { color: "var(--tpl-text)" }
|
|
1371
|
-
},
|
|
1383
|
+
}, Ut = { class: "tpl:mb-4" }, Wt = {
|
|
1372
1384
|
class: "tpl:mb-1 tpl:block tpl:text-xs tpl:font-medium",
|
|
1373
1385
|
style: { color: "var(--tpl-text-muted)" }
|
|
1374
|
-
},
|
|
1386
|
+
}, Gt = [
|
|
1375
1387
|
"accept",
|
|
1376
1388
|
"aria-invalid",
|
|
1377
1389
|
"aria-describedby"
|
|
1378
|
-
],
|
|
1390
|
+
], Kt = {
|
|
1379
1391
|
key: 1,
|
|
1380
1392
|
id: "tpl-media-replace-error",
|
|
1381
1393
|
role: "alert",
|
|
1382
1394
|
class: "tpl:mb-3 tpl:text-xs",
|
|
1383
1395
|
style: { color: "var(--tpl-danger)" }
|
|
1384
|
-
},
|
|
1396
|
+
}, qt = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, Jt = ["disabled"], Yt = ["disabled"], Xt = /* @__PURE__ */ O({
|
|
1385
1397
|
__name: "MediaReplaceModal",
|
|
1386
1398
|
props: {
|
|
1387
1399
|
visible: { type: Boolean },
|
|
@@ -1392,7 +1404,7 @@ var Le = { class: "tpl:p-4" }, Re = ["aria-label"], ze = {
|
|
|
1392
1404
|
},
|
|
1393
1405
|
emits: ["replace", "close"],
|
|
1394
1406
|
setup(t, { emit: r }) {
|
|
1395
|
-
let i = t, a = r, { t: o } =
|
|
1407
|
+
let i = t, a = r, { t: o } = Z(), s = l(Y, null), u = l(J, d(null)), f = d(null), _ = d(null), y = T(() => {
|
|
1396
1408
|
if (!i.item) return "";
|
|
1397
1409
|
let e = (i.item.filename ?? "").split(".");
|
|
1398
1410
|
return e.length > 1 ? e[e.length - 1].toLowerCase() : "";
|
|
@@ -1408,7 +1420,7 @@ var Le = { class: "tpl:p-4" }, Re = ["aria-label"], ze = {
|
|
|
1408
1420
|
_.value && a("replace", _.value);
|
|
1409
1421
|
}
|
|
1410
1422
|
let k = d(null);
|
|
1411
|
-
|
|
1423
|
+
_e(k, T(() => i.visible && i.item !== null));
|
|
1412
1424
|
function j(e) {
|
|
1413
1425
|
e.stopPropagation(), e.key === "Escape" && a("close");
|
|
1414
1426
|
}
|
|
@@ -1436,11 +1448,11 @@ var Le = { class: "tpl:p-4" }, Re = ["aria-label"], ze = {
|
|
|
1436
1448
|
class: "tpl:max-h-[90%] tpl:w-full tpl:max-w-sm tpl:overflow-y-auto tpl:rounded-lg tpl:p-5 tpl:shadow-xl",
|
|
1437
1449
|
style: { "background-color": "var(--tpl-bg-elevated)" }
|
|
1438
1450
|
}, [
|
|
1439
|
-
m("h3",
|
|
1440
|
-
m("p",
|
|
1441
|
-
w.value ? (e(), h("p",
|
|
1442
|
-
m("div",
|
|
1443
|
-
m("div",
|
|
1451
|
+
m("h3", Rt, b(p(o).mediaLibrary.replaceWarningTitle), 1),
|
|
1452
|
+
m("p", zt, b(p(o).mediaLibrary.replaceWarningMessage.replace("{extension}", `.${y.value}`)), 1),
|
|
1453
|
+
w.value ? (e(), h("p", Bt, b(p(o).mediaLibrary.replaceWarningUsageNote.replace("{count}", t.usageInfo.templateCount.toString())), 1)) : D("", !0),
|
|
1454
|
+
m("div", Vt, [m("p", Ht, b(t.item.filename), 1)]),
|
|
1455
|
+
m("div", Ut, [m("label", Wt, b(p(o).mediaLibrary.replaceSelectFile), 1), m("input", {
|
|
1444
1456
|
ref_key: "fileInputRef",
|
|
1445
1457
|
ref: f,
|
|
1446
1458
|
type: "file",
|
|
@@ -1454,9 +1466,9 @@ var Le = { class: "tpl:p-4" }, Re = ["aria-label"], ze = {
|
|
|
1454
1466
|
color: "var(--tpl-text)"
|
|
1455
1467
|
},
|
|
1456
1468
|
onChange: E
|
|
1457
|
-
}, null, 40,
|
|
1458
|
-
t.error ? (e(), h("p",
|
|
1459
|
-
m("div",
|
|
1469
|
+
}, null, 40, Gt)]),
|
|
1470
|
+
t.error ? (e(), h("p", Kt, b(t.error), 1)) : D("", !0),
|
|
1471
|
+
m("div", qt, [m("button", {
|
|
1460
1472
|
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",
|
|
1461
1473
|
style: {
|
|
1462
1474
|
"border-color": "var(--tpl-border)",
|
|
@@ -1465,7 +1477,7 @@ var Le = { class: "tpl:p-4" }, Re = ["aria-label"], ze = {
|
|
|
1465
1477
|
},
|
|
1466
1478
|
disabled: t.isReplacing,
|
|
1467
1479
|
onClick: i[0] ||= (e) => a("close")
|
|
1468
|
-
}, b(p(o).mediaLibrary.cancel), 9,
|
|
1480
|
+
}, b(p(o).mediaLibrary.cancel), 9, Jt), m("button", {
|
|
1469
1481
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150 tpl:hover:bg-[var(--tpl-primary-hover)] tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50",
|
|
1470
1482
|
style: {
|
|
1471
1483
|
"background-color": "var(--tpl-primary)",
|
|
@@ -1473,24 +1485,53 @@ var Le = { class: "tpl:p-4" }, Re = ["aria-label"], ze = {
|
|
|
1473
1485
|
},
|
|
1474
1486
|
disabled: !_.value || t.isReplacing,
|
|
1475
1487
|
onClick: O
|
|
1476
|
-
}, b(t.isReplacing ? p(o).mediaLibrary.replacing : p(o).mediaLibrary.replace), 9,
|
|
1477
|
-
], 512)], 42,
|
|
1488
|
+
}, b(t.isReplacing ? p(o).mediaLibrary.replacing : p(o).mediaLibrary.replace), 9, Yt)])
|
|
1489
|
+
], 512)], 42, Lt)) : D("", !0)]),
|
|
1478
1490
|
_: 1
|
|
1479
1491
|
})], 8, ["to"]));
|
|
1480
1492
|
}
|
|
1481
|
-
})
|
|
1493
|
+
});
|
|
1494
|
+
//#endregion
|
|
1495
|
+
//#region ../media-library/src/utils/formatList.ts
|
|
1496
|
+
function Zt(e, t) {
|
|
1497
|
+
let n = {
|
|
1498
|
+
style: "narrow",
|
|
1499
|
+
type: "conjunction"
|
|
1500
|
+
};
|
|
1501
|
+
try {
|
|
1502
|
+
return new Intl.ListFormat(t, n).format(e);
|
|
1503
|
+
} catch (t) {
|
|
1504
|
+
if (!(t instanceof RangeError)) throw t;
|
|
1505
|
+
return new Intl.ListFormat(void 0, n).format(e);
|
|
1506
|
+
}
|
|
1507
|
+
}
|
|
1508
|
+
//#endregion
|
|
1509
|
+
//#region ../media-library/src/components/media/MediaUploadZone.vue?vue&type=script&setup=true&lang.ts
|
|
1510
|
+
var Qt = [
|
|
1511
|
+
"aria-label",
|
|
1512
|
+
"aria-describedby",
|
|
1513
|
+
"aria-busy"
|
|
1514
|
+
], $t = {
|
|
1482
1515
|
key: 0,
|
|
1483
1516
|
class: "tpl:flex tpl:items-center tpl:gap-2"
|
|
1484
|
-
},
|
|
1517
|
+
}, en = {
|
|
1485
1518
|
class: "tpl:text-xs",
|
|
1486
1519
|
style: { color: "var(--tpl-text-muted)" }
|
|
1487
|
-
},
|
|
1520
|
+
}, tn = {
|
|
1488
1521
|
class: "tpl:text-xs",
|
|
1489
1522
|
style: { color: "var(--tpl-text-muted)" }
|
|
1490
|
-
},
|
|
1523
|
+
}, nn = {
|
|
1524
|
+
id: "tpl-media-upload-hint",
|
|
1525
|
+
"data-testid": "media-upload-hint",
|
|
1491
1526
|
class: "tpl:mt-1 tpl:text-[10px]",
|
|
1492
1527
|
style: { color: "var(--tpl-text-dim)" }
|
|
1493
|
-
},
|
|
1528
|
+
}, rn = {
|
|
1529
|
+
key: 0,
|
|
1530
|
+
"data-testid": "media-upload-rejected",
|
|
1531
|
+
role: "alert",
|
|
1532
|
+
class: "tpl:mt-1.5 tpl:text-xs tpl:break-words",
|
|
1533
|
+
style: { color: "var(--tpl-danger)" }
|
|
1534
|
+
}, an = /* @__PURE__ */ O({
|
|
1494
1535
|
__name: "MediaUploadZone",
|
|
1495
1536
|
props: {
|
|
1496
1537
|
isUploading: { type: Boolean },
|
|
@@ -1498,66 +1539,74 @@ var Le = { class: "tpl:p-4" }, Re = ["aria-label"], ze = {
|
|
|
1498
1539
|
},
|
|
1499
1540
|
emits: ["upload"],
|
|
1500
1541
|
setup(t, { emit: n }) {
|
|
1501
|
-
let r = n, { t: i, format: a } =
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
}
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1542
|
+
let r = n, { t: i, format: a } = Z(), o = l(X, null), { allAcceptedInputString: s, restrictsMimeTypes: c, availableCategories: u, maxFileSize: f, isAcceptedFile: _ } = Q(), v = {
|
|
1543
|
+
images: "filterImages",
|
|
1544
|
+
documents: "filterDocuments",
|
|
1545
|
+
videos: "filterVideos",
|
|
1546
|
+
audio: "filterAudio"
|
|
1547
|
+
}, y = T(() => {
|
|
1548
|
+
let e = i.mediaLibrary, t = c.value ? Zt(u.value.map((t) => e[v[t]]), o?.value) : i.mediaLibrary.acceptedAnyType;
|
|
1549
|
+
return Number.isFinite(f.value) ? a(i.mediaLibrary.acceptedFormatsMaxSize, {
|
|
1550
|
+
formats: t,
|
|
1551
|
+
size: $(f.value)
|
|
1552
|
+
}) : t;
|
|
1553
|
+
}), S = d([]), w = d();
|
|
1554
|
+
function E(e) {
|
|
1555
|
+
let t = [], n = [];
|
|
1556
|
+
for (let r of Array.from(e)) _(r) ? t.push(r) : n.push(r.name);
|
|
1557
|
+
S.value = n, t.length && r("upload", t);
|
|
1558
|
+
}
|
|
1559
|
+
let { isOverDropZone: O } = L(w, { onDrop: (e) => {
|
|
1560
|
+
e?.length && E(e);
|
|
1561
|
+
} }), { open: k, onChange: A } = I({
|
|
1562
|
+
accept: s.value,
|
|
1515
1563
|
multiple: !0
|
|
1516
1564
|
});
|
|
1517
|
-
return
|
|
1518
|
-
e?.length &&
|
|
1519
|
-
}), (n, r) => (e(), h("button", {
|
|
1565
|
+
return A((e) => {
|
|
1566
|
+
e?.length && E(e);
|
|
1567
|
+
}), (n, r) => (e(), h(C, null, [m("button", {
|
|
1520
1568
|
ref_key: "dropZoneRef",
|
|
1521
|
-
ref:
|
|
1569
|
+
ref: w,
|
|
1522
1570
|
type: "button",
|
|
1523
1571
|
"data-testid": "media-upload-zone",
|
|
1524
|
-
class: x(["tpl-upload-zone tpl:flex tpl:w-full tpl:cursor-pointer tpl:flex-col tpl:items-center tpl:justify-center tpl:rounded-lg tpl:border-2 tpl:border-dashed tpl:p-5 tpl:text-center tpl:transition-all tpl:duration-150", p(
|
|
1572
|
+
class: x(["tpl-upload-zone tpl:flex tpl:w-full tpl:cursor-pointer tpl:flex-col tpl:items-center tpl:justify-center tpl:rounded-lg tpl:border-2 tpl:border-dashed tpl:p-5 tpl:text-center tpl:transition-all tpl:duration-150", p(O) ? "tpl-upload-zone-active" : ""]),
|
|
1525
1573
|
"aria-label": p(i).mediaLibrary.dropOrClick,
|
|
1574
|
+
"aria-describedby": t.isUploading ? void 0 : "tpl-media-upload-hint",
|
|
1526
1575
|
"aria-busy": t.isUploading,
|
|
1527
1576
|
style: {
|
|
1528
1577
|
"border-color": "var(--tpl-border-light)",
|
|
1529
1578
|
"background-color": "var(--tpl-bg)"
|
|
1530
1579
|
},
|
|
1531
|
-
onClick: r[0] ||= (e) => p(
|
|
1532
|
-
}, [t.isUploading ? (e(), h("div",
|
|
1580
|
+
onClick: r[0] ||= (e) => p(k)()
|
|
1581
|
+
}, [t.isUploading ? (e(), h("div", $t, [g(p(V), {
|
|
1533
1582
|
class: "tpl-spinner",
|
|
1534
1583
|
size: 20,
|
|
1535
1584
|
"stroke-width": 2,
|
|
1536
1585
|
style: { color: "var(--tpl-primary)" }
|
|
1537
|
-
}), m("span",
|
|
1586
|
+
}), m("span", en, b(t.uploadProgress && t.uploadProgress.total > 1 ? p(a)(p(i).mediaLibrary.uploadingProgress, {
|
|
1538
1587
|
current: t.uploadProgress.current,
|
|
1539
1588
|
total: t.uploadProgress.total
|
|
1540
1589
|
}) : p(i).mediaLibrary.uploading), 1)])) : (e(), h(C, { key: 1 }, [
|
|
1541
|
-
g(p(
|
|
1590
|
+
g(p(ce), {
|
|
1542
1591
|
class: "tpl:mb-2",
|
|
1543
1592
|
size: 24,
|
|
1544
1593
|
"stroke-width": 1.5,
|
|
1545
1594
|
style: { color: "var(--tpl-text-dim)" }
|
|
1546
1595
|
}),
|
|
1547
|
-
m("p",
|
|
1548
|
-
m("p",
|
|
1549
|
-
], 64))], 10,
|
|
1596
|
+
m("p", tn, b(p(i).mediaLibrary.dropOrClick), 1),
|
|
1597
|
+
m("p", nn, b(y.value), 1)
|
|
1598
|
+
], 64))], 10, Qt), S.value.length ? (e(), h("p", rn, b(p(a)(p(i).mediaLibrary.uploadRejected, { files: S.value.join(", ") })), 1)) : D("", !0)], 64));
|
|
1550
1599
|
}
|
|
1551
|
-
}),
|
|
1600
|
+
}), on = ["aria-label"], sn = [
|
|
1552
1601
|
"width",
|
|
1553
1602
|
"height",
|
|
1554
1603
|
"viewBox"
|
|
1555
|
-
],
|
|
1604
|
+
], cn = [
|
|
1556
1605
|
"cx",
|
|
1557
1606
|
"cy",
|
|
1558
1607
|
"r",
|
|
1559
1608
|
"stroke-width"
|
|
1560
|
-
],
|
|
1609
|
+
], ln = [
|
|
1561
1610
|
"cx",
|
|
1562
1611
|
"cy",
|
|
1563
1612
|
"r",
|
|
@@ -1565,14 +1614,14 @@ var Le = { class: "tpl:p-4" }, Re = ["aria-label"], ze = {
|
|
|
1565
1614
|
"stroke",
|
|
1566
1615
|
"stroke-dasharray",
|
|
1567
1616
|
"stroke-dashoffset"
|
|
1568
|
-
],
|
|
1617
|
+
], un = {
|
|
1569
1618
|
key: 0,
|
|
1570
1619
|
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",
|
|
1571
1620
|
style: {
|
|
1572
1621
|
"background-color": "var(--tpl-text)",
|
|
1573
1622
|
color: "var(--tpl-bg-elevated)"
|
|
1574
1623
|
}
|
|
1575
|
-
},
|
|
1624
|
+
}, dn = /* @__PURE__ */ O({
|
|
1576
1625
|
__name: "StorageProgressRing",
|
|
1577
1626
|
props: {
|
|
1578
1627
|
usedBytes: {},
|
|
@@ -1580,27 +1629,16 @@ var Le = { class: "tpl:p-4" }, Re = ["aria-label"], ze = {
|
|
|
1580
1629
|
size: {}
|
|
1581
1630
|
},
|
|
1582
1631
|
setup(t) {
|
|
1583
|
-
let r = t, { t: i, format: a } =
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
"B",
|
|
1588
|
-
"KB",
|
|
1589
|
-
"MB",
|
|
1590
|
-
"GB"
|
|
1591
|
-
], r = Math.floor(Math.log(e) / Math.log(t)), i = e / t ** r, a = +(r >= 2);
|
|
1592
|
-
return `${i.toFixed(a)} ${n[r]}`;
|
|
1593
|
-
}
|
|
1594
|
-
let x = T(() => y(r.usedBytes)), S = T(() => y(r.limitBytes)), C = T(() => Math.max(0, r.limitBytes - r.usedBytes)), w = T(() => y(C.value)), E = T(() => a(i.mediaLibrary.storageTooltip, {
|
|
1595
|
-
used: x.value,
|
|
1596
|
-
total: S.value,
|
|
1597
|
-
remaining: w.value
|
|
1632
|
+
let r = t, { t: i, format: a } = Z(), o = d(!1), s = T(() => r.size ?? 24), c = T(() => Math.max(2, s.value / 8)), l = T(() => (s.value - c.value) / 2), u = T(() => 2 * Math.PI * l.value), f = T(() => r.limitBytes <= 0 ? 0 : Math.min(100, r.usedBytes / r.limitBytes * 100)), p = T(() => u.value - f.value / 100 * u.value), v = T(() => f.value >= 95 ? "var(--tpl-danger)" : f.value >= 75 ? "var(--tpl-warning)" : "var(--tpl-primary)"), y = T(() => $(r.usedBytes)), x = T(() => $(r.limitBytes)), S = T(() => Math.max(0, r.limitBytes - r.usedBytes)), C = T(() => $(S.value)), w = T(() => a(i.mediaLibrary.storageTooltip, {
|
|
1633
|
+
used: y.value,
|
|
1634
|
+
total: x.value,
|
|
1635
|
+
remaining: C.value
|
|
1598
1636
|
}));
|
|
1599
1637
|
return (t, r) => (e(), h("div", {
|
|
1600
1638
|
"data-testid": "media-storage-ring",
|
|
1601
1639
|
class: "tpl:relative tpl:inline-flex tpl:cursor-help tpl:items-center tpl:justify-center",
|
|
1602
1640
|
tabindex: "0",
|
|
1603
|
-
"aria-label":
|
|
1641
|
+
"aria-label": w.value,
|
|
1604
1642
|
onMouseenter: r[0] ||= (e) => o.value = !0,
|
|
1605
1643
|
onMouseleave: r[1] ||= (e) => o.value = !1,
|
|
1606
1644
|
onFocus: r[2] ||= (e) => o.value = !0,
|
|
@@ -1617,7 +1655,7 @@ var Le = { class: "tpl:p-4" }, Re = ["aria-label"], ze = {
|
|
|
1617
1655
|
fill: "none",
|
|
1618
1656
|
"stroke-width": c.value,
|
|
1619
1657
|
style: { stroke: "var(--tpl-border)" }
|
|
1620
|
-
}, null, 8,
|
|
1658
|
+
}, null, 8, cn), m("circle", {
|
|
1621
1659
|
cx: s.value / 2,
|
|
1622
1660
|
cy: s.value / 2,
|
|
1623
1661
|
r: l.value,
|
|
@@ -1628,7 +1666,7 @@ var Le = { class: "tpl:p-4" }, Re = ["aria-label"], ze = {
|
|
|
1628
1666
|
"stroke-dasharray": u.value,
|
|
1629
1667
|
"stroke-dashoffset": p.value,
|
|
1630
1668
|
class: "tpl:transition-all tpl:duration-300 tpl:ease-out"
|
|
1631
|
-
}, null, 8,
|
|
1669
|
+
}, null, 8, ln)], 8, sn)), g(M, {
|
|
1632
1670
|
"enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
|
|
1633
1671
|
"enter-from-class": "tpl:opacity-0 tpl:translate-y-1",
|
|
1634
1672
|
"enter-to-class": "tpl:opacity-100 tpl:translate-y-0",
|
|
@@ -1636,17 +1674,17 @@ var Le = { class: "tpl:p-4" }, Re = ["aria-label"], ze = {
|
|
|
1636
1674
|
"leave-from-class": "tpl:opacity-100 tpl:translate-y-0",
|
|
1637
1675
|
"leave-to-class": "tpl:opacity-0 tpl:translate-y-1"
|
|
1638
1676
|
}, {
|
|
1639
|
-
default: n(() => [o.value ? (e(), h("div",
|
|
1677
|
+
default: n(() => [o.value ? (e(), h("div", un, [_(b(w.value) + " ", 1), r[4] ||= m("div", {
|
|
1640
1678
|
class: "tpl:absolute tpl:-top-1 tpl:left-1/2 tpl:size-2 tpl:-translate-x-1/2 tpl:rotate-45",
|
|
1641
1679
|
style: { "background-color": "var(--tpl-text)" }
|
|
1642
1680
|
}, null, -1)])) : D("", !0)]),
|
|
1643
1681
|
_: 1
|
|
1644
|
-
})], 40,
|
|
1682
|
+
})], 40, on));
|
|
1645
1683
|
}
|
|
1646
1684
|
});
|
|
1647
1685
|
//#endregion
|
|
1648
1686
|
//#region ../media-library/src/utils/treeFolders.ts
|
|
1649
|
-
function
|
|
1687
|
+
function fn(e) {
|
|
1650
1688
|
let t = /* @__PURE__ */ new Map();
|
|
1651
1689
|
for (let n of e) t.set(n.id, {
|
|
1652
1690
|
...n,
|
|
@@ -1661,12 +1699,12 @@ function cn(e) {
|
|
|
1661
1699
|
}
|
|
1662
1700
|
//#endregion
|
|
1663
1701
|
//#region ../media-library/src/composables/useMediaLibraryUI.ts
|
|
1664
|
-
function
|
|
1702
|
+
function pn(e) {
|
|
1665
1703
|
let { library: t, translations: n } = e;
|
|
1666
1704
|
function r() {
|
|
1667
1705
|
return "value" in n && typeof n.value == "object" ? n.value : n;
|
|
1668
1706
|
}
|
|
1669
|
-
let i = d("grid"), a = d(!1), o = d(""), s = d(null), l = d(!1), u = d(!1), f = T(() => t.previewItem.value?.url ?? null), p = T(() => t.frequentlyUsedItems.value.length > 0), m = T(() => t.viewMode.value === "frequently-used" ? t.frequentlyUsedItems.value : t.items.value), h = T(() => Object.values(t.deleteUsageInfo.value).some((e) => e.templateCount > 0)), g = T(() =>
|
|
1707
|
+
let i = d("grid"), a = d(!1), o = d(""), s = d(null), l = d(!1), u = d(!1), f = T(() => t.previewItem.value?.url ?? null), p = T(() => t.frequentlyUsedItems.value.length > 0), m = T(() => t.viewMode.value === "frequently-used" ? t.frequentlyUsedItems.value : t.items.value), h = T(() => Object.values(t.deleteUsageInfo.value).some((e) => e.templateCount > 0)), g = T(() => fn(t.folders.value)), _ = {
|
|
1670
1708
|
images: () => r().mediaLibrary.filterImages,
|
|
1671
1709
|
documents: () => r().mediaLibrary.filterDocuments,
|
|
1672
1710
|
videos: () => r().mediaLibrary.filterVideos,
|
|
@@ -1707,7 +1745,7 @@ function ln(e) {
|
|
|
1707
1745
|
s.value = e;
|
|
1708
1746
|
}
|
|
1709
1747
|
async function A(e, n, r, i) {
|
|
1710
|
-
i && await t.replaceMediaDirectly(e, i.file)
|
|
1748
|
+
return i && !await t.replaceMediaDirectly(e, i.file) ? "failed" : await t.updateFile(e, n, r) ? (s.value = null, "saved") : i ? "replaced" : "failed";
|
|
1711
1749
|
}
|
|
1712
1750
|
async function j(e) {
|
|
1713
1751
|
await t.importFromUrl(e) && (l.value = !1);
|
|
@@ -1760,7 +1798,7 @@ function ln(e) {
|
|
|
1760
1798
|
}
|
|
1761
1799
|
//#endregion
|
|
1762
1800
|
//#region ../media-library/src/composable.ts
|
|
1763
|
-
function
|
|
1801
|
+
function mn(e) {
|
|
1764
1802
|
let { provider: t } = e, n = d([]), r = d([]), i = d(null), a = d("files"), o = d(""), s = d(null), c = d("newest"), l = d(!1), u = d(!1), f = d(!1), p = d(null), m = d(null), h = d(/* @__PURE__ */ new Set()), g = d(null), _ = d([]), v = d({}), y = d(!1), b = d([]), x = d(!1), S = d(null), C = d(!1), T = d(null), E = d(!1), D = d(null), O = d(null), k = d(null), A = 0;
|
|
1765
1803
|
function j(t) {
|
|
1766
1804
|
try {
|
|
@@ -1825,9 +1863,9 @@ function un(e) {
|
|
|
1825
1863
|
a.value = "files", i.value = e, o.value = "", h.value = /* @__PURE__ */ new Set(), g.value = null, await F();
|
|
1826
1864
|
}
|
|
1827
1865
|
async function B() {
|
|
1828
|
-
a.value = "frequently-used", i.value = null, o.value = "", h.value = /* @__PURE__ */ new Set(), g.value = null, await
|
|
1866
|
+
a.value = "frequently-used", i.value = null, o.value = "", h.value = /* @__PURE__ */ new Set(), g.value = null, await U();
|
|
1829
1867
|
}
|
|
1830
|
-
async function
|
|
1868
|
+
async function te(r) {
|
|
1831
1869
|
let { create: a } = t;
|
|
1832
1870
|
if (typeof a != "function") return null;
|
|
1833
1871
|
u.value = !0;
|
|
@@ -1844,7 +1882,7 @@ function un(e) {
|
|
|
1844
1882
|
u.value = !1;
|
|
1845
1883
|
}
|
|
1846
1884
|
}
|
|
1847
|
-
async function
|
|
1885
|
+
async function ne(r) {
|
|
1848
1886
|
let { create: a } = t;
|
|
1849
1887
|
if (typeof a == "function") {
|
|
1850
1888
|
u.value = !0, m.value = {
|
|
@@ -1873,7 +1911,7 @@ function un(e) {
|
|
|
1873
1911
|
}
|
|
1874
1912
|
}
|
|
1875
1913
|
}
|
|
1876
|
-
async function
|
|
1914
|
+
async function re(t) {
|
|
1877
1915
|
if (h.value.size === 0) return;
|
|
1878
1916
|
let { move: r } = M() ?? { move: !1 };
|
|
1879
1917
|
if (typeof r == "function") try {
|
|
@@ -1887,39 +1925,40 @@ function un(e) {
|
|
|
1887
1925
|
e.onError?.(t);
|
|
1888
1926
|
}
|
|
1889
1927
|
}
|
|
1890
|
-
async function
|
|
1928
|
+
async function ie(r, i, a) {
|
|
1891
1929
|
let { update: o } = t;
|
|
1892
|
-
if (typeof o
|
|
1930
|
+
if (typeof o != "function") return !1;
|
|
1931
|
+
try {
|
|
1893
1932
|
let e = { filename: i };
|
|
1894
1933
|
a !== void 0 && (e.alt = a);
|
|
1895
1934
|
let s = await o(r, e);
|
|
1896
|
-
n.value = n.value.map((e) => e.id === r ? s : e), g.value?.id === r && (g.value = s), j(() => t.onUpdated?.(s));
|
|
1935
|
+
return n.value = n.value.map((e) => e.id === r ? s : e), g.value?.id === r && (g.value = s), j(() => t.onUpdated?.(s)), !0;
|
|
1897
1936
|
} catch (t) {
|
|
1898
|
-
e.onError?.(t);
|
|
1937
|
+
return e.onError?.(t), !1;
|
|
1899
1938
|
}
|
|
1900
1939
|
}
|
|
1901
|
-
function
|
|
1940
|
+
function V(e) {
|
|
1902
1941
|
let t = /* @__PURE__ */ new Map();
|
|
1903
1942
|
for (let r of n.value) e.includes(r.id) && t.set(r.id, r);
|
|
1904
1943
|
for (let n of _.value) e.includes(n.id) && !t.has(n.id) && t.set(n.id, n);
|
|
1905
1944
|
return [...t.values()];
|
|
1906
1945
|
}
|
|
1907
|
-
function
|
|
1946
|
+
function H(e) {
|
|
1908
1947
|
n.value = n.value.filter((t) => !e.includes(t.id)), _.value = _.value.filter((t) => !e.includes(t.id)), h.value = /* @__PURE__ */ new Set(), g.value = null;
|
|
1909
1948
|
}
|
|
1910
|
-
async function
|
|
1949
|
+
async function ae() {
|
|
1911
1950
|
if (h.value.size === 0) return;
|
|
1912
1951
|
let { delete: n } = t;
|
|
1913
1952
|
if (typeof n != "function") return;
|
|
1914
|
-
let r = [...h.value], i =
|
|
1953
|
+
let r = [...h.value], i = V(r);
|
|
1915
1954
|
try {
|
|
1916
|
-
await n(r),
|
|
1955
|
+
await n(r), H(r);
|
|
1917
1956
|
for (let e of i) j(() => t.onDeleted?.(e));
|
|
1918
1957
|
} catch (t) {
|
|
1919
1958
|
e.onError?.(t);
|
|
1920
1959
|
}
|
|
1921
1960
|
}
|
|
1922
|
-
async function
|
|
1961
|
+
async function U() {
|
|
1923
1962
|
let { frequentlyUsed: n } = t;
|
|
1924
1963
|
if (typeof n == "function") try {
|
|
1925
1964
|
_.value = await n();
|
|
@@ -1927,7 +1966,7 @@ function un(e) {
|
|
|
1927
1966
|
e.onError?.(t);
|
|
1928
1967
|
}
|
|
1929
1968
|
}
|
|
1930
|
-
async function
|
|
1969
|
+
async function oe() {
|
|
1931
1970
|
if (h.value.size === 0) return !1;
|
|
1932
1971
|
b.value = [...h.value];
|
|
1933
1972
|
let { checkUsage: n } = t;
|
|
@@ -1941,21 +1980,21 @@ function un(e) {
|
|
|
1941
1980
|
return e.onError?.(t), !1;
|
|
1942
1981
|
}
|
|
1943
1982
|
}
|
|
1944
|
-
async function
|
|
1983
|
+
async function se() {
|
|
1945
1984
|
let { delete: n } = t;
|
|
1946
1985
|
if (typeof n != "function" || (y.value = !1, b.value.length === 0)) return;
|
|
1947
|
-
let r = b.value, i =
|
|
1986
|
+
let r = b.value, i = V(r);
|
|
1948
1987
|
try {
|
|
1949
|
-
await n(r),
|
|
1988
|
+
await n(r), H(r), b.value = [], v.value = {};
|
|
1950
1989
|
for (let e of i) j(() => t.onDeleted?.(e));
|
|
1951
1990
|
} catch (t) {
|
|
1952
1991
|
e.onError?.(t);
|
|
1953
1992
|
}
|
|
1954
1993
|
}
|
|
1955
|
-
function
|
|
1994
|
+
function ce() {
|
|
1956
1995
|
y.value = !1, b.value = [], v.value = {};
|
|
1957
1996
|
}
|
|
1958
|
-
async function
|
|
1997
|
+
async function le(r) {
|
|
1959
1998
|
let a = t.importFromUrl;
|
|
1960
1999
|
if (typeof a != "function") return null;
|
|
1961
2000
|
x.value = !0, S.value = null;
|
|
@@ -1968,17 +2007,17 @@ function un(e) {
|
|
|
1968
2007
|
x.value = !1;
|
|
1969
2008
|
}
|
|
1970
2009
|
}
|
|
1971
|
-
function
|
|
2010
|
+
function W(e) {
|
|
1972
2011
|
let t = new Set(h.value);
|
|
1973
2012
|
t.has(e) ? t.delete(e) : t.add(e), h.value = t;
|
|
1974
2013
|
}
|
|
1975
|
-
function
|
|
2014
|
+
function G() {
|
|
1976
2015
|
h.value = /* @__PURE__ */ new Set(), g.value = null;
|
|
1977
2016
|
}
|
|
1978
|
-
function
|
|
2017
|
+
function K(e) {
|
|
1979
2018
|
g.value = e, h.value = /* @__PURE__ */ new Set([e.id]);
|
|
1980
2019
|
}
|
|
1981
|
-
async function
|
|
2020
|
+
async function ue() {
|
|
1982
2021
|
let { storage: n } = t;
|
|
1983
2022
|
if (typeof n != "function") {
|
|
1984
2023
|
k.value = null;
|
|
@@ -1990,7 +2029,7 @@ function un(e) {
|
|
|
1990
2029
|
e.onError?.(t);
|
|
1991
2030
|
}
|
|
1992
2031
|
}
|
|
1993
|
-
async function
|
|
2032
|
+
async function q() {
|
|
1994
2033
|
let t = M();
|
|
1995
2034
|
if (t) try {
|
|
1996
2035
|
r.value = await t.list();
|
|
@@ -1998,40 +2037,40 @@ function un(e) {
|
|
|
1998
2037
|
e.onError?.(t);
|
|
1999
2038
|
}
|
|
2000
2039
|
}
|
|
2001
|
-
async function
|
|
2040
|
+
async function de(t, n) {
|
|
2002
2041
|
let { create: r } = M() ?? { create: !1 };
|
|
2003
2042
|
if (typeof r != "function") return null;
|
|
2004
2043
|
try {
|
|
2005
2044
|
let e = { name: t };
|
|
2006
2045
|
n !== void 0 && (e.parentId = n);
|
|
2007
2046
|
let i = await r(e);
|
|
2008
|
-
return await
|
|
2047
|
+
return await q(), i;
|
|
2009
2048
|
} catch (t) {
|
|
2010
2049
|
return e.onError?.(t), null;
|
|
2011
2050
|
}
|
|
2012
2051
|
}
|
|
2013
|
-
function
|
|
2052
|
+
function fe(e, t) {
|
|
2014
2053
|
for (let n of e) if (n.id === t) return n;
|
|
2015
2054
|
return null;
|
|
2016
2055
|
}
|
|
2017
|
-
async function
|
|
2056
|
+
async function J(t, n) {
|
|
2018
2057
|
let { update: r } = M() ?? { update: !1 };
|
|
2019
2058
|
if (typeof r == "function") try {
|
|
2020
|
-
await r(t, { name: n }), await
|
|
2059
|
+
await r(t, { name: n }), await q();
|
|
2021
2060
|
} catch (t) {
|
|
2022
2061
|
e.onError?.(t);
|
|
2023
2062
|
}
|
|
2024
2063
|
}
|
|
2025
|
-
async function
|
|
2064
|
+
async function pe(t) {
|
|
2026
2065
|
let { delete: n } = M() ?? { delete: !1 };
|
|
2027
2066
|
if (typeof n == "function") try {
|
|
2028
|
-
let e =
|
|
2029
|
-
await n(t), i.value === t && (i.value = e), await
|
|
2067
|
+
let e = fe(r.value, t)?.parentId ?? null;
|
|
2068
|
+
await n(t), i.value === t && (i.value = e), await q(), await F();
|
|
2030
2069
|
} catch (t) {
|
|
2031
2070
|
e.onError?.(t);
|
|
2032
2071
|
}
|
|
2033
2072
|
}
|
|
2034
|
-
async function
|
|
2073
|
+
async function Y(n) {
|
|
2035
2074
|
D.value = n, T.value = null;
|
|
2036
2075
|
let { checkUsage: r } = t;
|
|
2037
2076
|
if (typeof r != "function") {
|
|
@@ -2045,31 +2084,31 @@ function un(e) {
|
|
|
2045
2084
|
e.onError?.(t);
|
|
2046
2085
|
}
|
|
2047
2086
|
}
|
|
2048
|
-
function
|
|
2087
|
+
function X() {
|
|
2049
2088
|
E.value = !1, D.value = null, O.value = null, T.value = null;
|
|
2050
2089
|
}
|
|
2051
|
-
function
|
|
2090
|
+
function me(e) {
|
|
2052
2091
|
n.value = n.value.map((t) => t.id === e.id ? e : t), _.value = _.value.map((t) => t.id === e.id ? e : t), g.value?.id === e.id && (g.value = e), j(() => t.onUpdated?.(e));
|
|
2053
2092
|
}
|
|
2054
|
-
async function
|
|
2093
|
+
async function Z(n) {
|
|
2055
2094
|
let { replace: r } = t;
|
|
2056
2095
|
if (typeof r != "function" || !D.value) return null;
|
|
2057
2096
|
C.value = !0, T.value = null;
|
|
2058
2097
|
try {
|
|
2059
2098
|
let e = await r(D.value.id, n);
|
|
2060
|
-
return
|
|
2099
|
+
return me(e), E.value = !1, D.value = null, O.value = null, e;
|
|
2061
2100
|
} catch (t) {
|
|
2062
2101
|
return T.value = t instanceof Error ? t.message : "Replace failed", e.onError?.(t), null;
|
|
2063
2102
|
} finally {
|
|
2064
2103
|
C.value = !1;
|
|
2065
2104
|
}
|
|
2066
2105
|
}
|
|
2067
|
-
async function
|
|
2106
|
+
async function he(n, r) {
|
|
2068
2107
|
let { replace: i } = t;
|
|
2069
2108
|
if (typeof i != "function") return null;
|
|
2070
2109
|
try {
|
|
2071
2110
|
let e = await i(n, r);
|
|
2072
|
-
return
|
|
2111
|
+
return me(e), e;
|
|
2073
2112
|
} catch (t) {
|
|
2074
2113
|
return e.onError?.(t), null;
|
|
2075
2114
|
}
|
|
@@ -2098,117 +2137,117 @@ function un(e) {
|
|
|
2098
2137
|
sortBy: ee,
|
|
2099
2138
|
navigateToFolder: z,
|
|
2100
2139
|
showFrequentlyUsed: B,
|
|
2101
|
-
uploadFile:
|
|
2102
|
-
uploadFiles:
|
|
2103
|
-
moveSelected:
|
|
2104
|
-
updateFile:
|
|
2105
|
-
deleteSelected:
|
|
2140
|
+
uploadFile: te,
|
|
2141
|
+
uploadFiles: ne,
|
|
2142
|
+
moveSelected: re,
|
|
2143
|
+
updateFile: ie,
|
|
2144
|
+
deleteSelected: ae,
|
|
2106
2145
|
isImportingFromUrl: x,
|
|
2107
2146
|
importFromUrlError: S,
|
|
2108
|
-
importFromUrl:
|
|
2109
|
-
toggleSelection:
|
|
2110
|
-
clearSelection:
|
|
2111
|
-
selectItem:
|
|
2112
|
-
loadFolders:
|
|
2113
|
-
createFolder:
|
|
2114
|
-
renameFolder:
|
|
2115
|
-
deleteFolder:
|
|
2116
|
-
findFolderInTree:
|
|
2117
|
-
loadFrequentlyUsed:
|
|
2118
|
-
checkUsageBeforeDelete:
|
|
2119
|
-
confirmDelete:
|
|
2120
|
-
cancelDelete:
|
|
2147
|
+
importFromUrl: le,
|
|
2148
|
+
toggleSelection: W,
|
|
2149
|
+
clearSelection: G,
|
|
2150
|
+
selectItem: K,
|
|
2151
|
+
loadFolders: q,
|
|
2152
|
+
createFolder: de,
|
|
2153
|
+
renameFolder: J,
|
|
2154
|
+
deleteFolder: pe,
|
|
2155
|
+
findFolderInTree: fe,
|
|
2156
|
+
loadFrequentlyUsed: U,
|
|
2157
|
+
checkUsageBeforeDelete: oe,
|
|
2158
|
+
confirmDelete: se,
|
|
2159
|
+
cancelDelete: ce,
|
|
2121
2160
|
isReplacing: C,
|
|
2122
2161
|
replaceError: T,
|
|
2123
2162
|
showReplaceWarning: E,
|
|
2124
2163
|
pendingReplaceItem: D,
|
|
2125
2164
|
replaceUsageInfo: O,
|
|
2126
|
-
checkUsageBeforeReplace:
|
|
2127
|
-
cancelReplace:
|
|
2128
|
-
replaceFile:
|
|
2129
|
-
replaceMediaDirectly:
|
|
2165
|
+
checkUsageBeforeReplace: Y,
|
|
2166
|
+
cancelReplace: X,
|
|
2167
|
+
replaceFile: Z,
|
|
2168
|
+
replaceMediaDirectly: he,
|
|
2130
2169
|
storageInfo: k,
|
|
2131
|
-
loadStorage:
|
|
2170
|
+
loadStorage: ue
|
|
2132
2171
|
};
|
|
2133
2172
|
}
|
|
2134
2173
|
//#endregion
|
|
2135
2174
|
//#region ../media-library/src/components/MediaLibraryChrome.vue?vue&type=script&setup=true&lang.ts
|
|
2136
|
-
var
|
|
2175
|
+
var hn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl:overflow-hidden" }, gn = {
|
|
2137
2176
|
class: "tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-between tpl:border-b tpl:px-5 tpl:py-3.5",
|
|
2138
2177
|
style: { "border-color": "var(--tpl-border)" }
|
|
2139
|
-
},
|
|
2178
|
+
}, _n = {
|
|
2140
2179
|
id: "tpl-media-library-title",
|
|
2141
2180
|
class: "tpl:text-sm tpl:font-semibold",
|
|
2142
2181
|
style: { color: "var(--tpl-text)" }
|
|
2143
|
-
},
|
|
2182
|
+
}, vn = { class: "tpl:flex tpl:items-center tpl:gap-3" }, yn = { class: "tpl:relative" }, bn = [
|
|
2144
2183
|
"value",
|
|
2145
2184
|
"disabled",
|
|
2146
2185
|
"aria-label",
|
|
2147
2186
|
"placeholder"
|
|
2148
|
-
],
|
|
2187
|
+
], xn = ["aria-label"], Sn = { class: "tpl:flex tpl:min-h-0 tpl:flex-1 tpl:overflow-hidden" }, Cn = {
|
|
2149
2188
|
key: 0,
|
|
2150
2189
|
class: "tpl:flex tpl:w-48 tpl:shrink-0 tpl:flex-col tpl:border-r",
|
|
2151
2190
|
style: {
|
|
2152
2191
|
"border-color": "var(--tpl-border)",
|
|
2153
2192
|
"background-color": "var(--tpl-bg)"
|
|
2154
2193
|
}
|
|
2155
|
-
},
|
|
2194
|
+
}, wn = { class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:flex-col" }, Tn = {
|
|
2156
2195
|
class: "tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-between tpl:border-b tpl:px-4 tpl:py-2.5",
|
|
2157
2196
|
style: { "border-color": "var(--tpl-border)" }
|
|
2158
|
-
},
|
|
2197
|
+
}, En = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Dn = [
|
|
2159
2198
|
"title",
|
|
2160
2199
|
"aria-label",
|
|
2161
2200
|
"aria-pressed"
|
|
2162
|
-
],
|
|
2201
|
+
], On = {
|
|
2163
2202
|
key: 1,
|
|
2164
2203
|
class: "tpl:text-xs tpl:font-medium",
|
|
2165
2204
|
style: { color: "var(--tpl-text)" }
|
|
2166
|
-
},
|
|
2205
|
+
}, kn = {
|
|
2167
2206
|
class: "tpl:flex tpl:rounded-md tpl:p-0.5",
|
|
2168
2207
|
style: {
|
|
2169
2208
|
border: "1px solid var(--tpl-border)",
|
|
2170
2209
|
"background-color": "var(--tpl-bg)"
|
|
2171
2210
|
}
|
|
2172
|
-
},
|
|
2211
|
+
}, An = [
|
|
2173
2212
|
"title",
|
|
2174
2213
|
"aria-label",
|
|
2175
2214
|
"aria-pressed"
|
|
2176
|
-
],
|
|
2215
|
+
], jn = [
|
|
2177
2216
|
"title",
|
|
2178
2217
|
"aria-label",
|
|
2179
2218
|
"aria-pressed"
|
|
2180
|
-
],
|
|
2219
|
+
], Mn = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Nn = ["aria-label", "value"], Pn = { value: "" }, Fn = ["value"], In = { class: "tpl:min-h-0 tpl:flex-1 tpl:overflow-y-auto" }, Ln = {
|
|
2181
2220
|
key: 0,
|
|
2182
2221
|
class: "tpl:px-4 tpl:pt-3"
|
|
2183
|
-
},
|
|
2222
|
+
}, Rn = {
|
|
2184
2223
|
class: "tpl-scale-in tpl:mx-4 tpl:w-full tpl:max-w-sm tpl:rounded-[var(--tpl-radius-lg)] tpl:p-5",
|
|
2185
2224
|
style: {
|
|
2186
2225
|
"background-color": "var(--tpl-bg-elevated)",
|
|
2187
2226
|
"box-shadow": "var(--tpl-shadow-xl)"
|
|
2188
2227
|
}
|
|
2189
|
-
},
|
|
2228
|
+
}, zn = {
|
|
2190
2229
|
id: "tpl-media-delete-title",
|
|
2191
2230
|
class: "tpl:mb-2 tpl:text-sm tpl:font-semibold",
|
|
2192
2231
|
style: { color: "var(--tpl-text)" }
|
|
2193
|
-
},
|
|
2232
|
+
}, Bn = {
|
|
2194
2233
|
key: 0,
|
|
2195
2234
|
"data-testid": "media-delete-usage",
|
|
2196
2235
|
class: "tpl:mb-4 tpl:text-xs",
|
|
2197
2236
|
style: { color: "var(--tpl-text-muted)" }
|
|
2198
|
-
},
|
|
2237
|
+
}, Vn = {
|
|
2199
2238
|
key: 1,
|
|
2200
2239
|
class: "tpl:mb-4 tpl:max-h-32 tpl:overflow-y-auto tpl:rounded tpl:border tpl:p-2",
|
|
2201
2240
|
style: { "border-color": "var(--tpl-border)" }
|
|
2202
|
-
},
|
|
2241
|
+
}, Hn = { class: "tpl:font-medium" }, Un = { style: { color: "var(--tpl-text-muted)" } }, Wn = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, Gn = {
|
|
2203
2242
|
class: "tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-between tpl:border-t tpl:px-5 tpl:py-3",
|
|
2204
2243
|
style: { "border-color": "var(--tpl-border)" }
|
|
2205
|
-
},
|
|
2244
|
+
}, Kn = { class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:items-center tpl:gap-3" }, qn = { class: "tpl:flex tpl:items-center tpl:gap-5" }, Jn = {
|
|
2206
2245
|
key: 0,
|
|
2207
2246
|
class: "tpl:flex tpl:items-center tpl:gap-2"
|
|
2208
|
-
},
|
|
2247
|
+
}, Yn = {
|
|
2209
2248
|
key: 1,
|
|
2210
2249
|
class: "tpl:relative"
|
|
2211
|
-
},
|
|
2250
|
+
}, Xn = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Zn = ["data-testid", "disabled"], Qn = /* @__PURE__ */ O({
|
|
2212
2251
|
__name: "MediaLibraryChrome",
|
|
2213
2252
|
props: {
|
|
2214
2253
|
provider: {},
|
|
@@ -2226,7 +2265,7 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2226
2265
|
"ready"
|
|
2227
2266
|
],
|
|
2228
2267
|
setup(i, { expose: a, emit: s }) {
|
|
2229
|
-
let l = i, u = s, d = f(() => import("./MediaEditModal-
|
|
2268
|
+
let l = i, u = s, d = f(() => import("./MediaEditModal-Bm8uOKBx.js")), v = T(() => l.translations), w = T(() => l.confirmTestId ?? "media-confirm"), E = {
|
|
2230
2269
|
get maxFileSize() {
|
|
2231
2270
|
return l.provider.maxFileSize;
|
|
2232
2271
|
},
|
|
@@ -2237,46 +2276,46 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2237
2276
|
return l.accept;
|
|
2238
2277
|
}
|
|
2239
2278
|
};
|
|
2240
|
-
y(
|
|
2241
|
-
let { isAcceptedMimeType: O, availableCategories: k } =
|
|
2279
|
+
y(fe, E);
|
|
2280
|
+
let { isAcceptedMimeType: O, availableCategories: k } = Q(E), j = mn({
|
|
2242
2281
|
provider: l.provider,
|
|
2243
2282
|
templateId: () => l.templateId,
|
|
2244
2283
|
onError: (e) => l.onError?.(e)
|
|
2245
|
-
}), N =
|
|
2284
|
+
}), N = pn({
|
|
2246
2285
|
library: j,
|
|
2247
2286
|
translations: v
|
|
2248
|
-
}), P = T(() => typeof l.provider.create == "function"), F = T(() => l.provider.folders !== !1), I = T(() => typeof l.provider.importFromUrl == "function"), L = T(() => typeof l.provider.delete == "function"), R = T(() => typeof l.provider.update == "function"), ee = T(() => typeof l.provider.replace == "function"), z = T(() => typeof l.provider.frequentlyUsed == "function"),
|
|
2287
|
+
}), P = T(() => typeof l.provider.create == "function"), F = T(() => l.provider.folders !== !1), I = T(() => typeof l.provider.importFromUrl == "function"), L = T(() => typeof l.provider.delete == "function"), R = T(() => typeof l.provider.update == "function"), ee = T(() => typeof l.provider.replace == "function"), z = T(() => typeof l.provider.frequentlyUsed == "function"), te = T(() => {
|
|
2249
2288
|
let e = l.provider.folders;
|
|
2250
2289
|
return e !== !1 && typeof e.move == "function";
|
|
2251
|
-
}),
|
|
2290
|
+
}), V = T(() => {
|
|
2252
2291
|
let e = l.provider.folders;
|
|
2253
2292
|
return e !== !1 && typeof e.create == "function";
|
|
2254
|
-
}),
|
|
2293
|
+
}), H = T(() => {
|
|
2255
2294
|
let e = l.provider.folders;
|
|
2256
2295
|
return e !== !1 && typeof e.update == "function";
|
|
2257
|
-
}),
|
|
2296
|
+
}), ae = T(() => {
|
|
2258
2297
|
let e = l.provider.folders;
|
|
2259
2298
|
return e !== !1 && typeof e.delete == "function";
|
|
2260
|
-
}),
|
|
2299
|
+
}), U = T(() => j.isLoading.value && N.displayItems.value.length === 0), se = T(() => {
|
|
2261
2300
|
let e = j.previewItem.value;
|
|
2262
2301
|
return e ? !l.accept?.length || O(e.mimeType ?? "", l.accept) : !1;
|
|
2263
|
-
}),
|
|
2302
|
+
}), ce = T(() => {
|
|
2264
2303
|
if (!L.value) return 0;
|
|
2265
2304
|
let e = 0;
|
|
2266
2305
|
for (let t of j.selectedItems.value) N.displayItems.value.find((e) => e.id === t)?.canDelete !== !1 && (e += 1);
|
|
2267
2306
|
return e;
|
|
2268
|
-
}),
|
|
2269
|
-
function
|
|
2270
|
-
return
|
|
2307
|
+
}), W = T(() => N.showImportUrlModal.value || N.editingItem.value !== null || j.showReplaceWarning.value);
|
|
2308
|
+
function G() {
|
|
2309
|
+
return W.value ? !0 : N.showMovePicker.value ? (N.showMovePicker.value = !1, !0) : j.showDeleteWarning.value ? (j.cancelDelete(), !0) : !1;
|
|
2271
2310
|
}
|
|
2272
|
-
function
|
|
2273
|
-
|
|
2311
|
+
function K() {
|
|
2312
|
+
se.value && j.previewItem.value && u("confirm", j.previewItem.value);
|
|
2274
2313
|
}
|
|
2275
|
-
function
|
|
2314
|
+
function de(e) {
|
|
2276
2315
|
let t = e.target.value;
|
|
2277
2316
|
j.filterByCategory(t || null);
|
|
2278
2317
|
}
|
|
2279
|
-
async function
|
|
2318
|
+
async function J() {
|
|
2280
2319
|
let e = /* @__PURE__ */ new Set();
|
|
2281
2320
|
for (let t of j.selectedItems.value) N.displayItems.value.find((e) => e.id === t)?.canDelete !== !1 && e.add(t);
|
|
2282
2321
|
j.selectedItems.value = e, await N.handleDeleteClick();
|
|
@@ -2286,22 +2325,22 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2286
2325
|
}, { immediate: !0 }), j.loadItems(), j.loadFrequentlyUsed(), j.loadStorage(), u("ready"), r(() => {
|
|
2287
2326
|
N.resetUI();
|
|
2288
2327
|
}), a({
|
|
2289
|
-
nestedDialogOpen:
|
|
2290
|
-
handleEscape:
|
|
2328
|
+
nestedDialogOpen: W,
|
|
2329
|
+
handleEscape: G,
|
|
2291
2330
|
library: j,
|
|
2292
2331
|
ui: N
|
|
2293
|
-
}), (r, a) => (e(), h("div",
|
|
2294
|
-
m("div",
|
|
2295
|
-
p(j).storageInfo.value ? (e(), S(
|
|
2332
|
+
}), (r, a) => (e(), h("div", hn, [
|
|
2333
|
+
m("div", gn, [m("h2", _n, b(v.value.mediaLibrary.title), 1), m("div", vn, [
|
|
2334
|
+
p(j).storageInfo.value ? (e(), S(dn, {
|
|
2296
2335
|
key: 0,
|
|
2297
2336
|
"used-bytes": p(j).storageInfo.value.usedBytes,
|
|
2298
2337
|
"limit-bytes": p(j).storageInfo.value.limitBytes,
|
|
2299
2338
|
size: 22
|
|
2300
2339
|
}, null, 8, ["used-bytes", "limit-bytes"])) : D("", !0),
|
|
2301
|
-
m("div",
|
|
2340
|
+
m("div", yn, [m("input", {
|
|
2302
2341
|
value: p(N).searchInput.value,
|
|
2303
2342
|
type: "search",
|
|
2304
|
-
disabled:
|
|
2343
|
+
disabled: U.value,
|
|
2305
2344
|
"aria-label": v.value.mediaLibrary.searchAriaLabel,
|
|
2306
2345
|
class: "tpl:w-52 tpl:rounded-md tpl:border tpl:py-1.5 tpl:pr-3 tpl:pl-8 tpl:text-xs tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:outline-none tpl:focus:shadow-[var(--tpl-ring)] tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50",
|
|
2307
2346
|
style: {
|
|
@@ -2311,7 +2350,7 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2311
2350
|
},
|
|
2312
2351
|
placeholder: v.value.mediaLibrary.searchPlaceholder,
|
|
2313
2352
|
onInput: a[0] ||= (e) => p(N).handleSearchInput(e.target.value)
|
|
2314
|
-
}, null, 40,
|
|
2353
|
+
}, null, 40, bn), g(p(oe), {
|
|
2315
2354
|
class: "tpl:absolute tpl:top-1/2 tpl:left-2.5 tpl:-translate-y-1/2",
|
|
2316
2355
|
size: 13,
|
|
2317
2356
|
"stroke-width": 2,
|
|
@@ -2324,12 +2363,12 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2324
2363
|
class: "tpl:flex tpl:size-7 tpl:items-center tpl:justify-center tpl:rounded-md tpl:transition-all tpl:duration-150",
|
|
2325
2364
|
style: { color: "var(--tpl-text-muted)" },
|
|
2326
2365
|
onClick: a[1] ||= (e) => u("close")
|
|
2327
|
-
}, [g(p(
|
|
2366
|
+
}, [g(p(le), {
|
|
2328
2367
|
size: 18,
|
|
2329
2368
|
"stroke-width": 2
|
|
2330
|
-
})], 8,
|
|
2369
|
+
})], 8, xn)) : D("", !0)
|
|
2331
2370
|
])]),
|
|
2332
|
-
m("div",
|
|
2371
|
+
m("div", Sn, [g(M, {
|
|
2333
2372
|
"enter-active-class": "tpl:transition-all tpl:duration-200 tpl:ease-out",
|
|
2334
2373
|
"enter-from-class": "tpl:-ml-48 tpl:opacity-0",
|
|
2335
2374
|
"enter-to-class": "tpl:ml-0 tpl:opacity-100",
|
|
@@ -2337,14 +2376,14 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2337
2376
|
"leave-from-class": "tpl:ml-0 tpl:opacity-100",
|
|
2338
2377
|
"leave-to-class": "tpl:-ml-48 tpl:opacity-0"
|
|
2339
2378
|
}, {
|
|
2340
|
-
default: n(() => [F.value && p(N).showSidebar.value ? (e(), h("div",
|
|
2379
|
+
default: n(() => [F.value && p(N).showSidebar.value ? (e(), h("div", Cn, [g(Fe, {
|
|
2341
2380
|
folders: p(N).folderTree.value,
|
|
2342
2381
|
"current-folder-id": p(j).currentFolderId.value,
|
|
2343
2382
|
"view-mode": p(j).viewMode.value,
|
|
2344
2383
|
"has-frequently-used": z.value && p(N).hasFrequentlyUsed.value,
|
|
2345
|
-
"can-create-folder":
|
|
2346
|
-
"can-rename-folder":
|
|
2347
|
-
"can-delete-folder":
|
|
2384
|
+
"can-create-folder": V.value,
|
|
2385
|
+
"can-rename-folder": H.value,
|
|
2386
|
+
"can-delete-folder": ae.value,
|
|
2348
2387
|
onNavigate: p(j).navigateToFolder,
|
|
2349
2388
|
onCreateFolder: p(N).handleCreateFolder,
|
|
2350
2389
|
onRenameFolder: p(N).handleRenameFolder,
|
|
@@ -2365,7 +2404,7 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2365
2404
|
"onShowFrequentlyUsed"
|
|
2366
2405
|
])])) : D("", !0)]),
|
|
2367
2406
|
_: 1
|
|
2368
|
-
}), m("div",
|
|
2407
|
+
}), m("div", wn, [m("div", Tn, [m("div", En, [
|
|
2369
2408
|
F.value ? (e(), h("button", {
|
|
2370
2409
|
key: 0,
|
|
2371
2410
|
type: "button",
|
|
@@ -2380,11 +2419,11 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2380
2419
|
"aria-label": p(N).showSidebar.value ? v.value.mediaLibrary.hideFolders : v.value.mediaLibrary.showFolders,
|
|
2381
2420
|
"aria-pressed": p(N).showSidebar.value,
|
|
2382
2421
|
onClick: a[2] ||= (e) => p(N).showSidebar.value = !p(N).showSidebar.value
|
|
2383
|
-
}, [g(p(
|
|
2422
|
+
}, [g(p(q), {
|
|
2384
2423
|
size: 16,
|
|
2385
2424
|
"stroke-width": 2
|
|
2386
|
-
})], 12,
|
|
2387
|
-
p(j).viewMode.value === "frequently-used" ? (e(), h("span",
|
|
2425
|
+
})], 12, Dn)) : D("", !0),
|
|
2426
|
+
p(j).viewMode.value === "frequently-used" ? (e(), h("span", On, b(v.value.mediaLibrary.frequentlyUsed), 1)) : (e(), S(xe, {
|
|
2388
2427
|
key: 2,
|
|
2389
2428
|
folders: p(N).folderTree.value,
|
|
2390
2429
|
"current-folder-id": p(j).currentFolderId.value,
|
|
@@ -2394,7 +2433,7 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2394
2433
|
"current-folder-id",
|
|
2395
2434
|
"onNavigate"
|
|
2396
2435
|
])),
|
|
2397
|
-
m("div",
|
|
2436
|
+
m("div", kn, [m("button", {
|
|
2398
2437
|
type: "button",
|
|
2399
2438
|
class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:transition-all tpl:duration-150",
|
|
2400
2439
|
style: t({
|
|
@@ -2405,10 +2444,10 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2405
2444
|
"aria-label": v.value.mediaLibrary.viewGrid,
|
|
2406
2445
|
"aria-pressed": p(N).layoutMode.value === "grid",
|
|
2407
2446
|
onClick: a[3] ||= (e) => p(N).layoutMode.value = "grid"
|
|
2408
|
-
}, [g(p(
|
|
2447
|
+
}, [g(p(ue), {
|
|
2409
2448
|
size: 14,
|
|
2410
2449
|
"stroke-width": 2
|
|
2411
|
-
})], 12,
|
|
2450
|
+
})], 12, An), m("button", {
|
|
2412
2451
|
type: "button",
|
|
2413
2452
|
class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:transition-all tpl:duration-150",
|
|
2414
2453
|
style: t({
|
|
@@ -2419,11 +2458,11 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2419
2458
|
"aria-label": v.value.mediaLibrary.viewList,
|
|
2420
2459
|
"aria-pressed": p(N).layoutMode.value === "list",
|
|
2421
2460
|
onClick: a[4] ||= (e) => p(N).layoutMode.value = "list"
|
|
2422
|
-
}, [g(p(
|
|
2461
|
+
}, [g(p(ie), {
|
|
2423
2462
|
size: 14,
|
|
2424
2463
|
"stroke-width": 2
|
|
2425
|
-
})], 12,
|
|
2426
|
-
]), m("div",
|
|
2464
|
+
})], 12, jn)])
|
|
2465
|
+
]), m("div", Mn, [p(k).length > 1 ? (e(), h("select", {
|
|
2427
2466
|
key: 0,
|
|
2428
2467
|
"aria-label": v.value.mediaLibrary.filterAriaLabel,
|
|
2429
2468
|
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",
|
|
@@ -2433,11 +2472,11 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2433
2472
|
color: "var(--tpl-text)"
|
|
2434
2473
|
},
|
|
2435
2474
|
value: p(j).categoryFilter.value ?? "",
|
|
2436
|
-
onChange:
|
|
2437
|
-
}, [m("option",
|
|
2475
|
+
onChange: de
|
|
2476
|
+
}, [m("option", Pn, b(v.value.mediaLibrary.filterAll), 1), (e(!0), h(C, null, o(p(k), (t) => (e(), h("option", {
|
|
2438
2477
|
key: t,
|
|
2439
2478
|
value: t
|
|
2440
|
-
}, b(p(N).getCategoryLabel(t)), 9,
|
|
2479
|
+
}, b(p(N).getCategoryLabel(t)), 9, Fn))), 128))], 40, Nn)) : D("", !0)])]), m("div", In, [p(j).viewMode.value === "files" && (P.value || I.value) ? (e(), h("div", Ln, [P.value ? (e(), S(an, {
|
|
2441
2480
|
key: 0,
|
|
2442
2481
|
"is-uploading": p(j).isUploading.value,
|
|
2443
2482
|
"upload-progress": p(j).uploadProgress.value,
|
|
@@ -2456,10 +2495,10 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2456
2495
|
"background-color": "var(--tpl-bg)"
|
|
2457
2496
|
},
|
|
2458
2497
|
onClick: a[5] ||= (e) => p(N).showImportUrlModal.value = !0
|
|
2459
|
-
}, [g(p(
|
|
2498
|
+
}, [g(p(re), {
|
|
2460
2499
|
size: 14,
|
|
2461
2500
|
"stroke-width": 2
|
|
2462
|
-
}), _(" " + b(v.value.mediaLibrary.importFromUrl), 1)])) : D("", !0)])) : D("", !0), g(
|
|
2501
|
+
}), _(" " + b(v.value.mediaLibrary.importFromUrl), 1)])) : D("", !0)])) : D("", !0), g(pt, {
|
|
2463
2502
|
items: p(N).displayItems.value,
|
|
2464
2503
|
"selected-ids": p(j).selectedItems.value,
|
|
2465
2504
|
"is-loading": p(j).isLoading.value,
|
|
@@ -2474,7 +2513,7 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2474
2513
|
onLoadMore: p(j).loadMore,
|
|
2475
2514
|
onEdit: p(N).handleEditItem,
|
|
2476
2515
|
onReplace: p(N).handleReplaceItem,
|
|
2477
|
-
onConfirm:
|
|
2516
|
+
onConfirm: K
|
|
2478
2517
|
}, null, 8, [
|
|
2479
2518
|
"items",
|
|
2480
2519
|
"selected-ids",
|
|
@@ -2491,7 +2530,7 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2491
2530
|
"onEdit",
|
|
2492
2531
|
"onReplace"
|
|
2493
2532
|
])])])]),
|
|
2494
|
-
g(
|
|
2533
|
+
g(wt, {
|
|
2495
2534
|
visible: p(N).showImportUrlModal.value,
|
|
2496
2535
|
"is-importing": p(j).isImportingFromUrl.value,
|
|
2497
2536
|
error: p(j).importFromUrlError.value,
|
|
@@ -2507,10 +2546,15 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2507
2546
|
key: 0,
|
|
2508
2547
|
visible: !0,
|
|
2509
2548
|
item: p(N).editingItem.value,
|
|
2510
|
-
|
|
2549
|
+
save: p(N).handleEditSave,
|
|
2550
|
+
"can-crop": ee.value && p(N).editingItem.value.canUpdate !== !1,
|
|
2511
2551
|
onClose: a[7] ||= (e) => p(N).editingItem.value = null
|
|
2512
|
-
}, null, 8, [
|
|
2513
|
-
|
|
2552
|
+
}, null, 8, [
|
|
2553
|
+
"item",
|
|
2554
|
+
"save",
|
|
2555
|
+
"can-crop"
|
|
2556
|
+
])) : D("", !0),
|
|
2557
|
+
g(Xt, {
|
|
2514
2558
|
visible: p(j).showReplaceWarning.value,
|
|
2515
2559
|
item: p(j).pendingReplaceItem.value,
|
|
2516
2560
|
"usage-info": p(j).replaceUsageInfo.value,
|
|
@@ -2547,19 +2591,19 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2547
2591
|
"-webkit-backdrop-filter": "blur(8px)"
|
|
2548
2592
|
},
|
|
2549
2593
|
onClick: a[10] ||= A((...e) => p(j).cancelDelete && p(j).cancelDelete(...e), ["self"])
|
|
2550
|
-
}, [m("div",
|
|
2551
|
-
m("h3",
|
|
2594
|
+
}, [m("div", Rn, [
|
|
2595
|
+
m("h3", zn, b(v.value.mediaLibrary.deleteWarningTitle), 1),
|
|
2552
2596
|
m("p", {
|
|
2553
2597
|
class: x(["tpl:text-xs", p(N).hasUsedFiles.value ? "tpl:mb-2" : "tpl:mb-4"]),
|
|
2554
2598
|
style: { color: "var(--tpl-text-muted)" }
|
|
2555
2599
|
}, b(v.value.mediaLibrary.deleteWarningMessage), 3),
|
|
2556
|
-
p(N).hasUsedFiles.value ? (e(), h("p",
|
|
2557
|
-
p(N).hasUsedFiles.value ? (e(), h("div",
|
|
2600
|
+
p(N).hasUsedFiles.value ? (e(), h("p", Bn, b(v.value.mediaLibrary.deleteWarningUsageNote), 1)) : D("", !0),
|
|
2601
|
+
p(N).hasUsedFiles.value ? (e(), h("div", Vn, [(e(!0), h(C, null, o(p(j).deleteUsageInfo.value, (t, n) => (e(), h("div", {
|
|
2558
2602
|
key: n,
|
|
2559
2603
|
class: "tpl:text-xs",
|
|
2560
2604
|
style: { color: "var(--tpl-text)" }
|
|
2561
|
-
}, [t.templateCount > 0 ? (e(), h(C, { key: 0 }, [m("span",
|
|
2562
|
-
m("div",
|
|
2605
|
+
}, [t.templateCount > 0 ? (e(), h(C, { key: 0 }, [m("span", Hn, b(p(N).displayItems.value.find((e) => e.id === n)?.filename || n), 1), m("span", Un, " - " + b(v.value.mediaLibrary.usedInTemplates.replace("{count}", t.templateCount.toString())), 1)], 64)) : D("", !0)]))), 128))])) : D("", !0),
|
|
2606
|
+
m("div", Wn, [m("button", {
|
|
2563
2607
|
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",
|
|
2564
2608
|
style: {
|
|
2565
2609
|
"border-color": "var(--tpl-border)",
|
|
@@ -2579,11 +2623,11 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2579
2623
|
])])) : D("", !0)]),
|
|
2580
2624
|
_: 1
|
|
2581
2625
|
}),
|
|
2582
|
-
m("div",
|
|
2626
|
+
m("div", Gn, [m("div", Kn, [p(j).previewItem.value ? (e(), S(It, {
|
|
2583
2627
|
key: 0,
|
|
2584
2628
|
item: p(j).previewItem.value,
|
|
2585
2629
|
folders: p(N).folderTree.value
|
|
2586
|
-
}, null, 8, ["item", "folders"])) : D("", !0)]), m("div",
|
|
2630
|
+
}, null, 8, ["item", "folders"])) : D("", !0)]), m("div", qn, [p(j).selectedItems.value.size > 0 ? (e(), h("div", Jn, [p(j).previewItem.value ? (e(), h("button", {
|
|
2587
2631
|
key: 0,
|
|
2588
2632
|
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",
|
|
2589
2633
|
style: t({
|
|
@@ -2596,11 +2640,11 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2596
2640
|
key: 1,
|
|
2597
2641
|
size: 12,
|
|
2598
2642
|
"stroke-width": 2
|
|
2599
|
-
})) : (e(), S(p(
|
|
2643
|
+
})) : (e(), S(p(ne), {
|
|
2600
2644
|
key: 0,
|
|
2601
2645
|
size: 12,
|
|
2602
2646
|
"stroke-width": 2
|
|
2603
|
-
})), _(" " + b(p(N).copied.value ? v.value.mediaLibrary.copied : v.value.mediaLibrary.copyUrl), 1)], 4)) : D("", !0),
|
|
2647
|
+
})), _(" " + b(p(N).copied.value ? v.value.mediaLibrary.copied : v.value.mediaLibrary.copyUrl), 1)], 4)) : D("", !0), te.value ? (e(), h("div", Yn, [m("button", {
|
|
2604
2648
|
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",
|
|
2605
2649
|
style: {
|
|
2606
2650
|
"border-color": "var(--tpl-border)",
|
|
@@ -2608,7 +2652,7 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2608
2652
|
"background-color": "var(--tpl-bg)"
|
|
2609
2653
|
},
|
|
2610
2654
|
onClick: a[12] ||= (e) => p(N).showMovePicker.value = !p(N).showMovePicker.value
|
|
2611
|
-
}, b(v.value.mediaLibrary.moveSelected), 1), p(N).showMovePicker.value ? (e(), S(
|
|
2655
|
+
}, b(v.value.mediaLibrary.moveSelected), 1), p(N).showMovePicker.value ? (e(), S(kt, {
|
|
2612
2656
|
key: 0,
|
|
2613
2657
|
folders: p(N).folderTree.value,
|
|
2614
2658
|
"current-folder-id": p(j).currentFolderId.value,
|
|
@@ -2618,7 +2662,7 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2618
2662
|
"folders",
|
|
2619
2663
|
"current-folder-id",
|
|
2620
2664
|
"onSelect"
|
|
2621
|
-
])) : D("", !0)])) : D("", !0)])) : D("", !0), m("div",
|
|
2665
|
+
])) : D("", !0)])) : D("", !0)])) : D("", !0), m("div", Xn, [ce.value > 0 ? (e(), h("button", {
|
|
2622
2666
|
key: 0,
|
|
2623
2667
|
"data-testid": "media-delete",
|
|
2624
2668
|
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",
|
|
@@ -2627,7 +2671,7 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2627
2671
|
color: "var(--tpl-danger)",
|
|
2628
2672
|
"background-color": "var(--tpl-bg)"
|
|
2629
2673
|
},
|
|
2630
|
-
onClick:
|
|
2674
|
+
onClick: J
|
|
2631
2675
|
}, b(v.value.mediaLibrary.deleteSelected), 1)) : D("", !0), i.showConfirm ? (e(), h("button", {
|
|
2632
2676
|
key: 1,
|
|
2633
2677
|
"data-testid": w.value,
|
|
@@ -2636,45 +2680,45 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2636
2680
|
"background-color": "var(--tpl-primary)",
|
|
2637
2681
|
color: "var(--tpl-on-primary)"
|
|
2638
2682
|
},
|
|
2639
|
-
disabled: !
|
|
2640
|
-
onClick:
|
|
2641
|
-
}, b(i.accept?.length ? v.value.mediaLibrary.selectImage : v.value.mediaLibrary.selectFile), 9,
|
|
2683
|
+
disabled: !se.value,
|
|
2684
|
+
onClick: K
|
|
2685
|
+
}, b(i.accept?.length ? v.value.mediaLibrary.selectImage : v.value.mediaLibrary.selectFile), 9, Zn)) : D("", !0)])])])
|
|
2642
2686
|
]));
|
|
2643
2687
|
}
|
|
2644
|
-
}),
|
|
2645
|
-
"./locales/ca.ts": () => import("./ca-
|
|
2646
|
-
"./locales/de.ts": () => import("./de-
|
|
2647
|
-
"./locales/en.ts": () => import("./en-
|
|
2648
|
-
"./locales/es.ts": () => import("./es-
|
|
2649
|
-
"./locales/fr.ts": () => import("./fr-
|
|
2650
|
-
"./locales/ja.ts": () => import("./ja-
|
|
2651
|
-
"./locales/nl.ts": () => import("./nl-
|
|
2652
|
-
"./locales/pt-BR.ts": () => import("./pt-BR-
|
|
2688
|
+
}), $n = /* #__PURE__ */ Object.assign({
|
|
2689
|
+
"./locales/ca.ts": () => import("./ca-CYQH3J0b.js"),
|
|
2690
|
+
"./locales/de.ts": () => import("./de-JvCTMJPy.js"),
|
|
2691
|
+
"./locales/en.ts": () => import("./en-CdCFaV2V.js"),
|
|
2692
|
+
"./locales/es.ts": () => import("./es-CAv-Vldw.js"),
|
|
2693
|
+
"./locales/fr.ts": () => import("./fr-DVPtxpR6.js"),
|
|
2694
|
+
"./locales/ja.ts": () => import("./ja-dcWzjStz.js"),
|
|
2695
|
+
"./locales/nl.ts": () => import("./nl-LZNqQgE4.js"),
|
|
2696
|
+
"./locales/pt-BR.ts": () => import("./pt-BR-D6P_mNwA.js")
|
|
2653
2697
|
});
|
|
2654
|
-
function
|
|
2698
|
+
function er(e) {
|
|
2655
2699
|
return Object.keys(e).map((e) => e.match(/\/([^/]+)\.ts$/)?.[1]).filter((e) => !!e);
|
|
2656
2700
|
}
|
|
2657
|
-
var
|
|
2658
|
-
function
|
|
2701
|
+
var tr = er($n);
|
|
2702
|
+
function nr(e) {
|
|
2659
2703
|
return e.trim().replace(/_/g, "-").toLowerCase();
|
|
2660
2704
|
}
|
|
2661
|
-
function
|
|
2662
|
-
let t =
|
|
2663
|
-
return
|
|
2705
|
+
function rr(e) {
|
|
2706
|
+
let t = nr(e);
|
|
2707
|
+
return tr.find((e) => nr(e) === t);
|
|
2664
2708
|
}
|
|
2665
|
-
function
|
|
2666
|
-
return
|
|
2709
|
+
function ir(e) {
|
|
2710
|
+
return nr(e).split("-")[0];
|
|
2667
2711
|
}
|
|
2668
|
-
function
|
|
2669
|
-
return
|
|
2712
|
+
function ar(e) {
|
|
2713
|
+
return rr(e) ?? rr(ir(e)) ?? "en";
|
|
2670
2714
|
}
|
|
2671
|
-
async function
|
|
2672
|
-
let t =
|
|
2715
|
+
async function or(e) {
|
|
2716
|
+
let t = $n[`./locales/${ar(e)}.ts`];
|
|
2673
2717
|
return (await t()).default;
|
|
2674
2718
|
}
|
|
2675
2719
|
//#endregion
|
|
2676
2720
|
//#region ../media-library/src/components/MediaLibraryModal.vue?vue&type=script&setup=true&lang.ts
|
|
2677
|
-
var
|
|
2721
|
+
var sr = ["data-tpl-theme"], cr = /* @__PURE__ */ O({
|
|
2678
2722
|
__name: "MediaLibraryModal",
|
|
2679
2723
|
props: {
|
|
2680
2724
|
visible: { type: Boolean },
|
|
@@ -2690,14 +2734,14 @@ var rr = ["data-tpl-theme"], ir = /* @__PURE__ */ O({
|
|
|
2690
2734
|
setup(t, { emit: r }) {
|
|
2691
2735
|
let i = t, a = r, o = d(null);
|
|
2692
2736
|
c(() => i.locale, async (e) => {
|
|
2693
|
-
o.value = await
|
|
2694
|
-
}, { immediate: !0 }), y(
|
|
2737
|
+
o.value = await or(e ?? "en");
|
|
2738
|
+
}, { immediate: !0 }), y(pe, o);
|
|
2695
2739
|
let s = T(() => i.uiTheme);
|
|
2696
|
-
y(
|
|
2740
|
+
y(Y, s);
|
|
2697
2741
|
let l = E(() => i.popoverTarget ?? null);
|
|
2698
|
-
y(
|
|
2742
|
+
y(J, l), y(X, E(() => i.locale));
|
|
2699
2743
|
let u = d(null), f = d(null);
|
|
2700
|
-
|
|
2744
|
+
_e(u, T(() => i.visible && o.value !== null && !f.value?.nestedDialogOpen));
|
|
2701
2745
|
function p(e) {
|
|
2702
2746
|
if (e.key === "Escape") {
|
|
2703
2747
|
if (f.value?.handleEscape()) {
|
|
@@ -2747,7 +2791,7 @@ var rr = ["data-tpl-theme"], ir = /* @__PURE__ */ O({
|
|
|
2747
2791
|
border: "1px solid var(--tpl-border)",
|
|
2748
2792
|
"box-shadow": "var(--tpl-shadow-xl)"
|
|
2749
2793
|
}
|
|
2750
|
-
}, [g(
|
|
2794
|
+
}, [g(Qn, {
|
|
2751
2795
|
ref_key: "chromeRef",
|
|
2752
2796
|
ref: f,
|
|
2753
2797
|
provider: t.provider,
|
|
@@ -2766,10 +2810,10 @@ var rr = ["data-tpl-theme"], ir = /* @__PURE__ */ O({
|
|
|
2766
2810
|
"template-id",
|
|
2767
2811
|
"on-error",
|
|
2768
2812
|
"translations"
|
|
2769
|
-
])], 512)], 10,
|
|
2813
|
+
])], 512)], 10, sr)) : D("", !0)]),
|
|
2770
2814
|
_: 1
|
|
2771
2815
|
})], 8, ["to"]));
|
|
2772
2816
|
}
|
|
2773
2817
|
});
|
|
2774
2818
|
//#endregion
|
|
2775
|
-
export {
|
|
2819
|
+
export { cr as MediaLibraryModal, J as a, me as i, Q as n, Y as o, Z as r, _e as t };
|