@aswin.dev/editor 0.7.0 → 0.7.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/LICENSE +56 -0
- package/README.md +3 -3
- package/dist/{AccessibilityPanel-CvQGLdu6.js → AccessibilityPanel-EmQ19wiS.js} +37 -37
- package/dist/{AiChatSidebar-B3SJIKG_.js → AiChatSidebar-DeB0w_32.js} +67 -81
- package/dist/{AiFeatureMenu-BLLKoOos.js → AiFeatureMenu-DoLD5Cde.js} +22 -22
- package/dist/{BlockA11yBadge-CXDLqkcJ.js → BlockA11yBadge-DkNbDvJA.js} +12 -12
- package/dist/CloudEditor-zo9PjjvY.js +1214 -0
- package/dist/{CollaboratorBar-DuPYW5iF.js → CollaboratorBar-BsXMY-8e.js} +21 -21
- package/dist/CommentsSidebar-DIWIa4rS.js +436 -0
- package/dist/CountdownBlock-BCi7-DAM.js +92 -0
- package/dist/CountdownToolbar-BuS8p5ju.js +210 -0
- package/dist/{DesignReferenceSidebar-B8V_F2yF.js → DesignReferenceSidebar-RDlnhL-6.js} +58 -58
- package/dist/{LoadingTrack-B0CWFHXQ.js → LoadingTrack-BJ59h9ok.js} +2 -2
- package/dist/ModuleBrowserModal-b7HbpByz.js +206 -0
- package/dist/ModulePreviewCanvas-D__YlOLS.js +108 -0
- package/dist/{NumberWithSuffix-DkXUez9t.js → NumberWithSuffix-Ca3vNY84.js} +87 -87
- package/dist/{ParagraphEditor-D75wl3BX.js → ParagraphEditor-B1aYPO-6.js} +182 -182
- package/dist/{RichTextEditorContent-DYkIauIk.js → RichTextEditorContent-BmEVMrkJ.js} +38 -38
- package/dist/{SaveModuleDialog-FZ9lxY7_.js → SaveModuleDialog-ClovqI6h.js} +28 -28
- package/dist/{SnapshotHistory-BR3eV120.js → SnapshotHistory-DoqtH0cw.js} +45 -50
- package/dist/{TemplateScoringPanel-4GTNHej5.js → TemplateScoringPanel-DQv2ZAiL.js} +75 -75
- package/dist/{TestEmailModal--ue5w9fT.js → TestEmailModal-iIeYJYsj.js} +28 -28
- package/dist/{TitleEditor-fStSADI-.js → TitleEditor-CTDIwRF_.js} +68 -68
- package/dist/{TplModal-BwSfxIHf.js → TplModal-CBq1J1pG.js} +14 -14
- package/dist/{accessibility-e8JYu_zd.js → accessibility-BU09xZrQ.js} +1 -1
- package/dist/{blockTypeIcons-BcTrDjmH.js → blockTypeIcons-QkC6f5UE.js} +19 -5
- package/dist/bundle-stats.json +7 -7
- package/dist/cdn/chunks/{AccessibilityPanel-B6DOjojm.js → AccessibilityPanel-BeU8nz7A.js} +28 -28
- package/dist/cdn/chunks/{AccessibilityPanel-B6DOjojm.js.map → AccessibilityPanel-BeU8nz7A.js.map} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-qEdB2fZJ.js → AiFeatureMenu-B2mhscyP.js} +21 -21
- package/dist/cdn/chunks/AiFeatureMenu-B2mhscyP.js.map +1 -0
- package/dist/cdn/chunks/{BlockA11yBadge-DcEZftf6.js → BlockA11yBadge-C4g77gF0.js} +11 -11
- package/dist/cdn/chunks/{BlockA11yBadge-DcEZftf6.js.map → BlockA11yBadge-C4g77gF0.js.map} +1 -1
- package/dist/{CloudEditor-BCz1ZTYC.js → cdn/chunks/CloudEditor-Btyr0b0_.js} +486 -475
- package/dist/cdn/chunks/CloudEditor-Btyr0b0_.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar--nO7TX6b.js → CollaboratorBar-YBiIjiRh.js} +15 -15
- package/dist/cdn/chunks/CollaboratorBar-YBiIjiRh.js.map +1 -0
- package/dist/cdn/chunks/CountdownBlock-B06UZoWe.js +93 -0
- package/dist/cdn/chunks/CountdownBlock-B06UZoWe.js.map +1 -0
- package/dist/cdn/chunks/CountdownToolbar-C9XZr33O.js +212 -0
- package/dist/cdn/chunks/CountdownToolbar-C9XZr33O.js.map +1 -0
- package/dist/{ModuleBrowserModal-DrUFMTDx.js → cdn/chunks/ModuleBrowserModal-C2CDWKW6.js} +51 -62
- package/dist/cdn/chunks/ModuleBrowserModal-C2CDWKW6.js.map +1 -0
- package/dist/cdn/chunks/ModulePreviewCanvas-Drt8Evai.js +109 -0
- package/dist/cdn/chunks/ModulePreviewCanvas-Drt8Evai.js.map +1 -0
- package/dist/cdn/chunks/{NumberWithSuffix-CE3NrZhH.js → NumberWithSuffix-Ty1bp9vB.js} +64 -64
- package/dist/cdn/chunks/{NumberWithSuffix-CE3NrZhH.js.map → NumberWithSuffix-Ty1bp9vB.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-B6Ygu-Mq.js → ParagraphEditor-BA1WbHI7.js} +188 -188
- package/dist/cdn/chunks/{ParagraphEditor-B6Ygu-Mq.js.map → ParagraphEditor-BA1WbHI7.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-DL_y2SrR.js → RichTextEditorContent-BtWCA_Oc.js} +30 -30
- package/dist/cdn/chunks/{RichTextEditorContent-DL_y2SrR.js.map → RichTextEditorContent-BtWCA_Oc.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-B0TnO_o9.js → SaveModuleDialog-AwL0tkCV.js} +21 -21
- package/dist/cdn/chunks/SaveModuleDialog-AwL0tkCV.js.map +1 -0
- package/dist/cdn/chunks/{TitleEditor-BHpfxvwy.js → TitleEditor-DbSyeixS.js} +65 -65
- package/dist/cdn/chunks/TitleEditor-DbSyeixS.js.map +1 -0
- package/dist/cdn/chunks/blockTypeIcons-pQIkxJzc.js +23 -0
- package/dist/cdn/chunks/blockTypeIcons-pQIkxJzc.js.map +1 -0
- package/dist/cdn/chunks/{de-D8CnZxV9.js → de-_tooy3Q8.js} +250 -2
- package/dist/cdn/chunks/de-_tooy3Q8.js.map +1 -0
- package/dist/cdn/chunks/{draggable-Bcb86AsV.js → draggable-C-1_gch3.js} +2 -2
- package/dist/cdn/chunks/{draggable-Bcb86AsV.js.map → draggable-C-1_gch3.js.map} +1 -1
- package/dist/cdn/chunks/{en-8FHaQv4V.js → en-CNqLoIm9.js} +250 -2
- package/dist/cdn/chunks/en-CNqLoIm9.js.map +1 -0
- package/dist/cdn/chunks/{extensions-DIxF31tA.js → extensions-BVKQw_sp.js} +107 -107
- package/dist/cdn/chunks/extensions-BVKQw_sp.js.map +1 -0
- package/dist/cdn/chunks/{features-DEMb13KS.js → features-DIBEo4xl.js} +3388 -2289
- package/dist/cdn/chunks/features-DIBEo4xl.js.map +1 -0
- package/dist/cdn/chunks/{icons-CsLTcirh.js → icons-C1Gg-ov-.js} +346 -54
- package/dist/cdn/chunks/icons-C1Gg-ov-.js.map +1 -0
- package/dist/cdn/chunks/{media-library-CVaNvhpM.js → media-library-BTF_Ko70.js} +985 -985
- package/dist/cdn/chunks/media-library-BTF_Ko70.js.map +1 -0
- package/dist/cdn/chunks/{quality-BaBfc54_.js → quality-C5AmotmP.js} +312 -312
- package/dist/cdn/chunks/quality-C5AmotmP.js.map +1 -0
- package/dist/cdn/chunks/{renderer-CUxvx7ro.js → renderer-D0L44Vlp.js} +236 -142
- package/dist/cdn/chunks/renderer-D0L44Vlp.js.map +1 -0
- package/dist/cdn/chunks/{src-CRaqN-p8.js → src-RKexlYjA.js} +161 -161
- package/dist/cdn/chunks/src-RKexlYjA.js.map +1 -0
- package/dist/cdn/chunks/styleConstants-PgmvNBzQ.js +57 -0
- package/dist/cdn/chunks/styleConstants-PgmvNBzQ.js.map +1 -0
- package/dist/cdn/chunks/styles-CQR6ed13.js +4976 -0
- package/dist/cdn/chunks/styles-CQR6ed13.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-ZhwKyFp7.js → tiptap-CDzAbF2j.js} +43 -43
- package/dist/cdn/chunks/{tiptap-ZhwKyFp7.js.map → tiptap-CDzAbF2j.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +211 -123
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-Da05j8yl.js → check-DJrpDKO_.js} +1 -1
- package/dist/{chevron-down-R2uY34iD.js → chevron-down-C5oBUhT8.js} +1 -1
- package/dist/chevron-right-BqCptpdp.js +10 -0
- package/dist/{circle-alert-DZuGWPX-.js → circle-alert-ZQQc98HC.js} +1 -1
- package/dist/{clock-CRp2sIub.js → clock-ik2pRJKG.js} +1 -1
- package/dist/{cloud-DEk_b4CR.js → cloud-DJG4tb4_.js} +485 -427
- package/dist/{createLucideIcon-C3pa2siy.js → createLucideIcon-ClREiSx3.js} +6 -6
- package/dist/{de-Brqvgr43.js → de-2LEvILeZ.js} +249 -1
- package/dist/{dist-Cp0zXPAD.js → dist-BHAeXaUY.js} +1 -1
- package/dist/{dist-BaQIYPsn.js → dist-BSJvAvH3.js} +1 -1
- package/dist/{dist-wzMIGj-D.js → dist-BeFnymxK.js} +1 -1
- package/dist/dist-Bmir0gYb.js +1167 -0
- package/dist/{dist-DDJIWTRY.js → dist-BvPgo-UK.js} +1 -1
- package/dist/{dist-BFawx6IS.js → dist-CPVBKMmd.js} +51 -51
- package/dist/dist-CivF9P8b.js +382 -0
- package/dist/{dist-D6uC2xhi.js → dist-Df4ie7vZ.js} +1 -1
- package/dist/{dist-us-RpCWN.js → dist-DxOoemkW.js} +1 -1
- package/dist/{dist-KoBJjK1G.js → dist-HEQ52gTJ.js} +1 -1
- package/dist/{dist-DjviJBCi.js → dist-b-XUqAoF.js} +1 -1
- package/dist/{dist-D90y8dvT.js → dist-kZfaVUpW.js} +3 -3
- package/dist/{dist-aRzjfSRN.js → dist-wfAedlzi.js} +1 -1
- package/dist/{en-WDVp87TE.js → en-D2RU2Poj.js} +249 -1
- package/dist/{extensions-CUcl9Ok4.js → extensions-BQ1xXx3d.js} +103 -103
- package/dist/{image-up-MBZKKg9p.js → image-up-DT7gcJLN.js} +1 -1
- package/dist/index.d.ts +102 -14
- package/dist/{info-CJEC7piy.js → info-BSPGcsSM.js} +1 -1
- package/dist/keys-CvX8D-8C.js +10 -0
- package/dist/{loader-circle-DsY5Yg33.js → loader-circle-Balo8p3d.js} +1 -1
- package/dist/{message-circle-yElBbR2C.js → message-circle-B39qAHxs.js} +1 -1
- package/dist/pencil-BZJPNYWR.js +10 -0
- package/dist/{refresh-cw-CE_AGtn8.js → refresh-cw-DwDqGUM0.js} +1 -1
- package/dist/{scan-line-D0vcUekt.js → scan-line-DlghmhNf.js} +1 -1
- package/dist/{send-DH4oDQqC.js → send-DDdhIRj8.js} +1 -1
- package/dist/{shield-check-CfJgs2Hd.js → shield-check-OSQ-JVTX.js} +1 -1
- package/dist/{sparkles-CvRXGqFs.js → sparkles-BN4a-CoF.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/styleConstants-wWRbcuEK.js +55 -0
- package/dist/styles-CavWjvol.js +5487 -0
- package/dist/templatical-editor.js +211 -119
- package/dist/{text-align-start-BT9VUDxK.js → text-align-start-D1weisjS.js} +1 -1
- package/dist/{trash-2-DbP2Y6t2.js → trash-2-CMWvQ5KX.js} +1 -1
- package/dist/{triangle-alert-aOXceTSe.js → triangle-alert-DyidRNX_.js} +1 -1
- package/dist/undo-2-Cg8I7obC.js +16 -0
- package/dist/{useCloudI18n-BuIwR6OE.js → useCloudI18n-BTTNBk5i.js} +2 -2
- package/dist/{useEditorCore-C6ost42Q.js → useEditorCore-BGnzcT7p.js} +2424 -2249
- package/dist/{useI18n-lb2DHDiu.js → useI18n-C2xQZ6K9.js} +2 -2
- package/dist/{useMergeTag-CBwKnnNB.js → useMergeTag-CfuZq2fF.js} +4 -4
- package/dist/{vue.runtime.esm-bundler-DpvJL-nX.js → vue.runtime.esm-bundler-CjauPXjj.js} +1 -1
- package/dist/{x-u2oVmjN_.js → x-CgIhNcT9.js} +1 -1
- package/package.json +15 -15
- package/dist/CommentsSidebar-B1pvJdqF.js +0 -441
- package/dist/CountdownBlock-BNSj1jvJ.js +0 -92
- package/dist/CountdownToolbar-ClJr2GzL.js +0 -210
- package/dist/ModulePreviewCanvas-CHdOwV_4.js +0 -106
- package/dist/cdn/chunks/AiFeatureMenu-qEdB2fZJ.js.map +0 -1
- package/dist/cdn/chunks/CloudEditor-D2GsEC_n.js +0 -1143
- package/dist/cdn/chunks/CloudEditor-D2GsEC_n.js.map +0 -1
- package/dist/cdn/chunks/CollaboratorBar--nO7TX6b.js.map +0 -1
- package/dist/cdn/chunks/CountdownBlock-5YdT1uUu.js +0 -93
- package/dist/cdn/chunks/CountdownBlock-5YdT1uUu.js.map +0 -1
- package/dist/cdn/chunks/CountdownToolbar-DXPXrbAA.js +0 -212
- package/dist/cdn/chunks/CountdownToolbar-DXPXrbAA.js.map +0 -1
- package/dist/cdn/chunks/ModuleBrowserModal-DxoPp81s.js +0 -195
- package/dist/cdn/chunks/ModuleBrowserModal-DxoPp81s.js.map +0 -1
- package/dist/cdn/chunks/ModulePreviewCanvas-CoLdb4ar.js +0 -107
- package/dist/cdn/chunks/ModulePreviewCanvas-CoLdb4ar.js.map +0 -1
- package/dist/cdn/chunks/SaveModuleDialog-B0TnO_o9.js.map +0 -1
- package/dist/cdn/chunks/TitleEditor-BHpfxvwy.js.map +0 -1
- package/dist/cdn/chunks/blockTypeIcons-BzzY9_kA.js +0 -22
- package/dist/cdn/chunks/blockTypeIcons-BzzY9_kA.js.map +0 -1
- package/dist/cdn/chunks/de-D8CnZxV9.js.map +0 -1
- package/dist/cdn/chunks/en-8FHaQv4V.js.map +0 -1
- package/dist/cdn/chunks/extensions-DIxF31tA.js.map +0 -1
- package/dist/cdn/chunks/features-DEMb13KS.js.map +0 -1
- package/dist/cdn/chunks/icons-CsLTcirh.js.map +0 -1
- package/dist/cdn/chunks/media-library-CVaNvhpM.js.map +0 -1
- package/dist/cdn/chunks/quality-BaBfc54_.js.map +0 -1
- package/dist/cdn/chunks/renderer-CUxvx7ro.js.map +0 -1
- package/dist/cdn/chunks/src-CRaqN-p8.js.map +0 -1
- package/dist/cdn/chunks/styleConstants-DP1VOca8.js +0 -57
- package/dist/cdn/chunks/styleConstants-DP1VOca8.js.map +0 -1
- package/dist/cdn/chunks/styles-BHJULjNR.js +0 -2947
- package/dist/cdn/chunks/styles-BHJULjNR.js.map +0 -1
- package/dist/dist-B1IR0bpH.js +0 -326
- package/dist/dist-DJmnUmW9.js +0 -362
- package/dist/keys-ciNfSSGj.js +0 -10
- package/dist/styleConstants-fWzlIIwN.js +0 -55
- package/dist/styles-DEXEkBvg.js +0 -3176
- /package/dist/{_plugin-vue_export-helper-B0hnzhyu.js → _plugin-vue_export-helper-Bwh4ceeO.js} +0 -0
- /package/dist/{de-DCaaCE5s.js → de-D2npYjrZ.js} +0 -0
- /package/dist/{dist-iLBdeBDR.js → dist-DvHLtWVP.js} +0 -0
- /package/dist/{emojiData-PQyVa4bU.js → emojiData-DvQBBzmO.js} +0 -0
- /package/dist/{en-DXCyK4-X.js → en-ib-4h3_o.js} +0 -0
- /package/dist/{formatRelativeTime-BOEf47hq.js → formatRelativeTime-CFDZnEIs.js} +0 -0
- /package/dist/{liquid.browser-CdMv1BTn.js → liquid.browser-7Rv0QDiO.js} +0 -0
- /package/dist/{readableTextColor-CY3SiRnt.js → readableTextColor-C_9OpzBw.js} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { E as j,
|
|
3
|
-
import {
|
|
1
|
+
import { C as e, D as t, G as n, H as r, I as i, L as a, P as o, R as s, W as c, X as l, _ as u, b as d, c as f, ct as p, d as m, dt as h, f as g, ft as _, g as v, h as y, k as b, l as x, m as S, n as C, p as w, tt as T, u as E, ut as D, v as O, x as k, z as A } from "./draggable-C-1_gch3.js";
|
|
2
|
+
import { E as j, Mt as M, T as N, Tt as P, at as ee, ct as te, dn as ne, gt as F, hn as I, it as L, kt as re, ln as R, mn as ie, mt as ae, nt as oe, pn as se, un as ce, vn as le, yt as ue } from "./features-DIBEo4xl.js";
|
|
3
|
+
import { $ as de, K as fe, M as pe, O as me, W as he, Z as ge, et as _e, h as ve, x as ye } from "./icons-C1Gg-ov-.js";
|
|
4
4
|
//#region ../media-library/src/api-client.ts
|
|
5
5
|
var be = class {
|
|
6
6
|
constructor(e) {
|
|
@@ -36,7 +36,7 @@ var be = class {
|
|
|
36
36
|
async browseMedia(e) {
|
|
37
37
|
let t = new URLSearchParams();
|
|
38
38
|
e.folder_id && t.set("folder_id", e.folder_id), e.search && t.set("search", e.search), e.category && t.set("category", e.category), e.sort && t.set("sort", e.sort), e.cursor && t.set("cursor", e.cursor);
|
|
39
|
-
let n = t.toString(), r = `${j(
|
|
39
|
+
let n = t.toString(), r = `${j(N["media.browse"], this.baseParams)}${n ? `?${n}` : ""}`, i = await this.authManager.authenticatedFetch(r, { headers: { Accept: "application/json" } });
|
|
40
40
|
if (!i.ok) {
|
|
41
41
|
let e = await i.json().catch(() => ({ message: `HTTP error ${i.status}` }));
|
|
42
42
|
throw Error(e.message, { cause: e });
|
|
@@ -46,7 +46,7 @@ var be = class {
|
|
|
46
46
|
async uploadMedia(e, t) {
|
|
47
47
|
let n = new FormData();
|
|
48
48
|
n.append("file", e), t && n.append("folder_id", t);
|
|
49
|
-
let r = j(
|
|
49
|
+
let r = j(N["media.upload"], this.baseParams), i = await this.authManager.authenticatedFetch(r, {
|
|
50
50
|
method: "POST",
|
|
51
51
|
headers: { Accept: "application/json" },
|
|
52
52
|
body: n
|
|
@@ -58,7 +58,7 @@ var be = class {
|
|
|
58
58
|
return (await i.json()).data;
|
|
59
59
|
}
|
|
60
60
|
async updateMedia(e, t, n) {
|
|
61
|
-
return this.request(j(
|
|
61
|
+
return this.request(j(N["media.update"], {
|
|
62
62
|
...this.baseParams,
|
|
63
63
|
media: e
|
|
64
64
|
}), {
|
|
@@ -70,13 +70,13 @@ var be = class {
|
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
72
|
async deleteMedia(e) {
|
|
73
|
-
return this.request(j(
|
|
73
|
+
return this.request(j(N["media.delete"], this.baseParams), {
|
|
74
74
|
method: "POST",
|
|
75
75
|
body: JSON.stringify({ ids: e })
|
|
76
76
|
});
|
|
77
77
|
}
|
|
78
78
|
async moveMedia(e, t) {
|
|
79
|
-
return this.request(j(
|
|
79
|
+
return this.request(j(N["media.move"], this.baseParams), {
|
|
80
80
|
method: "POST",
|
|
81
81
|
body: JSON.stringify({
|
|
82
82
|
ids: e,
|
|
@@ -85,10 +85,10 @@ var be = class {
|
|
|
85
85
|
});
|
|
86
86
|
}
|
|
87
87
|
async getMediaFolders() {
|
|
88
|
-
return this.request(j(
|
|
88
|
+
return this.request(j(N["folders.index"], this.baseParams));
|
|
89
89
|
}
|
|
90
90
|
async createMediaFolder(e, t) {
|
|
91
|
-
return this.request(j(
|
|
91
|
+
return this.request(j(N["folders.store"], this.baseParams), {
|
|
92
92
|
method: "POST",
|
|
93
93
|
body: JSON.stringify({
|
|
94
94
|
name: e,
|
|
@@ -97,7 +97,7 @@ var be = class {
|
|
|
97
97
|
});
|
|
98
98
|
}
|
|
99
99
|
async renameMediaFolder(e, t) {
|
|
100
|
-
return this.request(j(
|
|
100
|
+
return this.request(j(N["folders.update"], {
|
|
101
101
|
...this.baseParams,
|
|
102
102
|
mediaFolder: e
|
|
103
103
|
}), {
|
|
@@ -106,13 +106,13 @@ var be = class {
|
|
|
106
106
|
});
|
|
107
107
|
}
|
|
108
108
|
async deleteMediaFolder(e) {
|
|
109
|
-
return this.request(j(
|
|
109
|
+
return this.request(j(N["folders.destroy"], {
|
|
110
110
|
...this.baseParams,
|
|
111
111
|
mediaFolder: e
|
|
112
112
|
}), { method: "DELETE" });
|
|
113
113
|
}
|
|
114
114
|
async checkMediaUsage(e) {
|
|
115
|
-
let t = await this.authManager.authenticatedFetch(j(
|
|
115
|
+
let t = await this.authManager.authenticatedFetch(j(N["media.checkUsage"], this.baseParams), {
|
|
116
116
|
method: "POST",
|
|
117
117
|
headers: {
|
|
118
118
|
"Content-Type": "application/json",
|
|
@@ -127,10 +127,10 @@ var be = class {
|
|
|
127
127
|
return t.json();
|
|
128
128
|
}
|
|
129
129
|
async getFrequentlyUsed() {
|
|
130
|
-
return this.request(j(
|
|
130
|
+
return this.request(j(N["media.frequentlyUsed"], this.baseParams));
|
|
131
131
|
}
|
|
132
132
|
async importFromUrl(e, t) {
|
|
133
|
-
return this.request(j(
|
|
133
|
+
return this.request(j(N["media.importFromUrl"], this.baseParams), {
|
|
134
134
|
method: "POST",
|
|
135
135
|
body: JSON.stringify({
|
|
136
136
|
url: e,
|
|
@@ -141,7 +141,7 @@ var be = class {
|
|
|
141
141
|
async replaceMedia(e, t) {
|
|
142
142
|
let n = new FormData();
|
|
143
143
|
n.append("file", t);
|
|
144
|
-
let r = j(
|
|
144
|
+
let r = j(N["media.replace"], {
|
|
145
145
|
...this.baseParams,
|
|
146
146
|
media: e
|
|
147
147
|
}), i = await this.authManager.authenticatedFetch(r, {
|
|
@@ -158,186 +158,186 @@ var be = class {
|
|
|
158
158
|
};
|
|
159
159
|
//#endregion
|
|
160
160
|
//#region ../media-library/src/composable.ts
|
|
161
|
-
function xe(
|
|
162
|
-
if (!
|
|
163
|
-
let
|
|
161
|
+
function xe(e) {
|
|
162
|
+
if (!e.projectId) throw Error("projectId is required for useMediaLibrary");
|
|
163
|
+
let t = new be(e.authManager), n = T([]), r = T([]), i = T(null), a = T("files"), o = T(""), s = T(null), c = T("newest"), l = T(!1), u = T(!1), d = T(!1), f = T(null), p = T(null), m = T(/* @__PURE__ */ new Set()), h = T(null), g = T([]), _ = T({}), v = T(!1), y = T([]), b = T(!1), x = T(null), S = T(!1), C = T(null), w = T(!1), E = T(null), D = T(null), O = 0;
|
|
164
164
|
async function k() {
|
|
165
|
-
let
|
|
166
|
-
|
|
165
|
+
let r = ++O;
|
|
166
|
+
l.value = !0;
|
|
167
167
|
try {
|
|
168
|
-
let
|
|
169
|
-
folder_id:
|
|
170
|
-
search:
|
|
171
|
-
category:
|
|
172
|
-
sort:
|
|
168
|
+
let e = await t.browseMedia({
|
|
169
|
+
folder_id: o.value ? void 0 : i.value,
|
|
170
|
+
search: o.value || void 0,
|
|
171
|
+
category: s.value || void 0,
|
|
172
|
+
sort: c.value === "newest" ? void 0 : c.value
|
|
173
173
|
});
|
|
174
|
-
if (
|
|
175
|
-
|
|
176
|
-
} catch (
|
|
177
|
-
if (
|
|
178
|
-
|
|
174
|
+
if (r !== O) return;
|
|
175
|
+
n.value = e.data, f.value = e.meta.next_cursor, d.value = !!e.meta.next_cursor;
|
|
176
|
+
} catch (t) {
|
|
177
|
+
if (r !== O) return;
|
|
178
|
+
e.onError?.(t);
|
|
179
179
|
} finally {
|
|
180
|
-
|
|
180
|
+
r === O && (l.value = !1);
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
183
|
async function A() {
|
|
184
|
-
if (!
|
|
185
|
-
let
|
|
186
|
-
|
|
184
|
+
if (!d.value || !f.value || l.value) return;
|
|
185
|
+
let r = ++O;
|
|
186
|
+
l.value = !0;
|
|
187
187
|
try {
|
|
188
|
-
let
|
|
189
|
-
folder_id:
|
|
190
|
-
search:
|
|
191
|
-
category:
|
|
192
|
-
sort:
|
|
193
|
-
cursor:
|
|
188
|
+
let e = await t.browseMedia({
|
|
189
|
+
folder_id: o.value ? void 0 : i.value,
|
|
190
|
+
search: o.value || void 0,
|
|
191
|
+
category: s.value || void 0,
|
|
192
|
+
sort: c.value === "newest" ? void 0 : c.value,
|
|
193
|
+
cursor: f.value
|
|
194
194
|
});
|
|
195
|
-
if (
|
|
196
|
-
|
|
197
|
-
} catch (
|
|
198
|
-
if (
|
|
199
|
-
|
|
195
|
+
if (r !== O) return;
|
|
196
|
+
n.value = [...n.value, ...e.data], f.value = e.meta.next_cursor, d.value = !!e.meta.next_cursor;
|
|
197
|
+
} catch (t) {
|
|
198
|
+
if (r !== O) return;
|
|
199
|
+
e.onError?.(t);
|
|
200
200
|
} finally {
|
|
201
|
-
|
|
201
|
+
r === O && (l.value = !1);
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
204
|
async function j(e) {
|
|
205
|
-
|
|
205
|
+
o.value = e, await k();
|
|
206
206
|
}
|
|
207
207
|
async function M(e) {
|
|
208
|
-
|
|
209
|
-
}
|
|
210
|
-
async function ee(e) {
|
|
211
|
-
l.value = e, await k();
|
|
208
|
+
s.value = e, await k();
|
|
212
209
|
}
|
|
213
210
|
async function N(e) {
|
|
214
|
-
|
|
211
|
+
c.value = e, await k();
|
|
215
212
|
}
|
|
216
|
-
async function P() {
|
|
217
|
-
|
|
213
|
+
async function P(e) {
|
|
214
|
+
a.value = "files", i.value = e, o.value = "", m.value = /* @__PURE__ */ new Set(), h.value = null, await k();
|
|
218
215
|
}
|
|
219
|
-
async function
|
|
220
|
-
|
|
216
|
+
async function ee() {
|
|
217
|
+
a.value = "frequently-used", i.value = null, o.value = "", m.value = /* @__PURE__ */ new Set(), h.value = null, await re();
|
|
218
|
+
}
|
|
219
|
+
async function te(r) {
|
|
220
|
+
u.value = !0;
|
|
221
221
|
try {
|
|
222
|
-
let
|
|
223
|
-
return
|
|
224
|
-
} catch (
|
|
225
|
-
return
|
|
222
|
+
let e = await t.uploadMedia(r, i.value);
|
|
223
|
+
return n.value = [e, ...n.value], e;
|
|
224
|
+
} catch (t) {
|
|
225
|
+
return e.onError?.(t), null;
|
|
226
226
|
} finally {
|
|
227
|
-
|
|
227
|
+
u.value = !1;
|
|
228
228
|
}
|
|
229
229
|
}
|
|
230
|
-
async function
|
|
231
|
-
|
|
230
|
+
async function ne(r) {
|
|
231
|
+
u.value = !0, p.value = {
|
|
232
232
|
current: 0,
|
|
233
|
-
total:
|
|
233
|
+
total: r.length
|
|
234
234
|
};
|
|
235
235
|
try {
|
|
236
|
-
for (let
|
|
237
|
-
|
|
238
|
-
current:
|
|
239
|
-
total:
|
|
236
|
+
for (let a = 0; a < r.length; a++) {
|
|
237
|
+
p.value = {
|
|
238
|
+
current: a + 1,
|
|
239
|
+
total: r.length
|
|
240
240
|
};
|
|
241
241
|
try {
|
|
242
|
-
|
|
243
|
-
} catch (
|
|
244
|
-
|
|
242
|
+
n.value = [await t.uploadMedia(r[a], i.value), ...n.value];
|
|
243
|
+
} catch (t) {
|
|
244
|
+
e.onError?.(t);
|
|
245
245
|
}
|
|
246
246
|
}
|
|
247
247
|
} finally {
|
|
248
|
-
|
|
248
|
+
u.value = !1, p.value = null;
|
|
249
249
|
}
|
|
250
250
|
}
|
|
251
|
-
async function
|
|
252
|
-
if (
|
|
253
|
-
let
|
|
254
|
-
if (
|
|
255
|
-
let
|
|
256
|
-
|
|
257
|
-
} else
|
|
258
|
-
|
|
259
|
-
} catch (
|
|
260
|
-
|
|
251
|
+
async function F(r) {
|
|
252
|
+
if (m.value.size !== 0) try {
|
|
253
|
+
let e = await t.moveMedia([...m.value], r);
|
|
254
|
+
if (i.value === null) {
|
|
255
|
+
let t = new Map(e.map((e) => [e.id, e]));
|
|
256
|
+
n.value = n.value.map((e) => t.get(e.id) ?? e);
|
|
257
|
+
} else n.value = n.value.filter((e) => !m.value.has(e.id));
|
|
258
|
+
m.value = /* @__PURE__ */ new Set(), h.value = null;
|
|
259
|
+
} catch (t) {
|
|
260
|
+
e.onError?.(t);
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
|
-
async function
|
|
263
|
+
async function I(r, i, a) {
|
|
264
264
|
try {
|
|
265
|
-
let
|
|
266
|
-
|
|
267
|
-
} catch (
|
|
268
|
-
|
|
265
|
+
let e = await t.updateMedia(r, i, a);
|
|
266
|
+
n.value = n.value.map((t) => t.id === r ? e : t), h.value?.id === r && (h.value = e);
|
|
267
|
+
} catch (t) {
|
|
268
|
+
e.onError?.(t);
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
271
|
async function L() {
|
|
272
|
-
if (
|
|
273
|
-
await
|
|
274
|
-
} catch (
|
|
275
|
-
|
|
272
|
+
if (m.value.size !== 0) try {
|
|
273
|
+
await t.deleteMedia([...m.value]), n.value = n.value.filter((e) => !m.value.has(e.id)), g.value = g.value.filter((e) => !m.value.has(e.id)), m.value = /* @__PURE__ */ new Set(), h.value = null;
|
|
274
|
+
} catch (t) {
|
|
275
|
+
e.onError?.(t);
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
278
|
async function re() {
|
|
279
279
|
try {
|
|
280
|
-
|
|
281
|
-
} catch (
|
|
282
|
-
|
|
280
|
+
g.value = await t.getFrequentlyUsed();
|
|
281
|
+
} catch (t) {
|
|
282
|
+
e.onError?.(t);
|
|
283
283
|
}
|
|
284
284
|
}
|
|
285
285
|
async function R() {
|
|
286
|
-
if (
|
|
287
|
-
|
|
286
|
+
if (m.value.size === 0) return !1;
|
|
287
|
+
y.value = [...m.value];
|
|
288
288
|
try {
|
|
289
|
-
let e = await
|
|
290
|
-
|
|
291
|
-
let
|
|
292
|
-
return
|
|
293
|
-
} catch (
|
|
294
|
-
return
|
|
289
|
+
let e = await t.checkMediaUsage(y.value);
|
|
290
|
+
_.value = e.data;
|
|
291
|
+
let n = Object.values(e.data).some((e) => e.template_count > 0);
|
|
292
|
+
return v.value = !0, n;
|
|
293
|
+
} catch (t) {
|
|
294
|
+
return e.onError?.(t), !1;
|
|
295
295
|
}
|
|
296
296
|
}
|
|
297
297
|
async function ie() {
|
|
298
|
-
if (
|
|
299
|
-
await
|
|
300
|
-
} catch (
|
|
301
|
-
|
|
298
|
+
if (v.value = !1, y.value.length !== 0) try {
|
|
299
|
+
await t.deleteMedia(y.value), n.value = n.value.filter((e) => !y.value.includes(e.id)), g.value = g.value.filter((e) => !y.value.includes(e.id)), m.value = /* @__PURE__ */ new Set(), h.value = null, y.value = [], _.value = {};
|
|
300
|
+
} catch (t) {
|
|
301
|
+
e.onError?.(t);
|
|
302
302
|
}
|
|
303
303
|
}
|
|
304
304
|
function ae() {
|
|
305
|
-
|
|
305
|
+
v.value = !1, y.value = [], _.value = {};
|
|
306
306
|
}
|
|
307
|
-
async function oe(
|
|
308
|
-
|
|
307
|
+
async function oe(r) {
|
|
308
|
+
b.value = !0, x.value = null;
|
|
309
309
|
try {
|
|
310
|
-
let
|
|
311
|
-
return
|
|
312
|
-
} catch (
|
|
313
|
-
return
|
|
310
|
+
let e = await t.importFromUrl(r, i.value);
|
|
311
|
+
return n.value = [e, ...n.value], e;
|
|
312
|
+
} catch (t) {
|
|
313
|
+
return x.value = t instanceof Error ? t.message : "Import failed", e.onError?.(t), null;
|
|
314
314
|
} finally {
|
|
315
|
-
|
|
315
|
+
b.value = !1;
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
318
|
function se(e) {
|
|
319
|
-
let t = new Set(
|
|
320
|
-
t.has(e) ? t.delete(e) : t.add(e),
|
|
319
|
+
let t = new Set(m.value);
|
|
320
|
+
t.has(e) ? t.delete(e) : t.add(e), m.value = t;
|
|
321
321
|
}
|
|
322
322
|
function ce() {
|
|
323
|
-
|
|
323
|
+
m.value = /* @__PURE__ */ new Set(), h.value = null;
|
|
324
324
|
}
|
|
325
325
|
function le(e) {
|
|
326
|
-
|
|
326
|
+
h.value = e, m.value = new Set([e.id]);
|
|
327
327
|
}
|
|
328
328
|
async function ue() {
|
|
329
329
|
try {
|
|
330
|
-
|
|
331
|
-
} catch (
|
|
332
|
-
|
|
330
|
+
r.value = await t.getMediaFolders();
|
|
331
|
+
} catch (t) {
|
|
332
|
+
e.onError?.(t);
|
|
333
333
|
}
|
|
334
334
|
}
|
|
335
|
-
async function de(
|
|
335
|
+
async function de(n, r) {
|
|
336
336
|
try {
|
|
337
|
-
let
|
|
338
|
-
return await ue(),
|
|
339
|
-
} catch (
|
|
340
|
-
return
|
|
337
|
+
let e = await t.createMediaFolder(n, r);
|
|
338
|
+
return await ue(), e;
|
|
339
|
+
} catch (t) {
|
|
340
|
+
return e.onError?.(t), null;
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
343
|
function fe(e, t) {
|
|
@@ -350,83 +350,83 @@ function xe(t) {
|
|
|
350
350
|
}
|
|
351
351
|
return null;
|
|
352
352
|
}
|
|
353
|
-
async function pe(
|
|
353
|
+
async function pe(n, r) {
|
|
354
354
|
try {
|
|
355
|
-
await
|
|
356
|
-
} catch (
|
|
357
|
-
|
|
355
|
+
await t.renameMediaFolder(n, r), await ue();
|
|
356
|
+
} catch (t) {
|
|
357
|
+
e.onError?.(t);
|
|
358
358
|
}
|
|
359
359
|
}
|
|
360
|
-
async function me(
|
|
360
|
+
async function me(n) {
|
|
361
361
|
try {
|
|
362
|
-
let
|
|
363
|
-
await
|
|
364
|
-
} catch (
|
|
365
|
-
|
|
362
|
+
let e = fe(r.value, n)?.parent_id ?? null;
|
|
363
|
+
await t.deleteMediaFolder(n), i.value === n && (i.value = e), await ue(), await k();
|
|
364
|
+
} catch (t) {
|
|
365
|
+
e.onError?.(t);
|
|
366
366
|
}
|
|
367
367
|
}
|
|
368
|
-
async function he(
|
|
369
|
-
E.value =
|
|
368
|
+
async function he(n) {
|
|
369
|
+
E.value = n, C.value = null;
|
|
370
370
|
try {
|
|
371
|
-
D.value = (await
|
|
372
|
-
} catch (
|
|
373
|
-
|
|
371
|
+
D.value = (await t.checkMediaUsage([n.id])).data[n.id] ?? null, w.value = !0;
|
|
372
|
+
} catch (t) {
|
|
373
|
+
e.onError?.(t);
|
|
374
374
|
}
|
|
375
375
|
}
|
|
376
376
|
function ge() {
|
|
377
|
-
|
|
377
|
+
w.value = !1, E.value = null, D.value = null, C.value = null;
|
|
378
378
|
}
|
|
379
|
-
async function _e(
|
|
379
|
+
async function _e(r) {
|
|
380
380
|
if (!E.value) return null;
|
|
381
|
-
|
|
381
|
+
S.value = !0, C.value = null;
|
|
382
382
|
try {
|
|
383
|
-
let
|
|
384
|
-
return
|
|
385
|
-
} catch (
|
|
386
|
-
return
|
|
383
|
+
let e = await t.replaceMedia(E.value.id, r);
|
|
384
|
+
return n.value = n.value.map((t) => t.id === e.id ? e : t), g.value = g.value.map((t) => t.id === e.id ? e : t), h.value?.id === e.id && (h.value = e), w.value = !1, E.value = null, D.value = null, e;
|
|
385
|
+
} catch (t) {
|
|
386
|
+
return C.value = t instanceof Error ? t.message : "Replace failed", e.onError?.(t), null;
|
|
387
387
|
} finally {
|
|
388
|
-
|
|
388
|
+
S.value = !1;
|
|
389
389
|
}
|
|
390
390
|
}
|
|
391
|
-
async function ve(
|
|
391
|
+
async function ve(r, i) {
|
|
392
392
|
try {
|
|
393
|
-
let
|
|
394
|
-
return
|
|
395
|
-
} catch (
|
|
396
|
-
return
|
|
393
|
+
let e = await t.replaceMedia(r, i);
|
|
394
|
+
return n.value = n.value.map((t) => t.id === e.id ? e : t), g.value = g.value.map((t) => t.id === e.id ? e : t), h.value?.id === e.id && (h.value = e), e;
|
|
395
|
+
} catch (t) {
|
|
396
|
+
return e.onError?.(t), null;
|
|
397
397
|
}
|
|
398
398
|
}
|
|
399
399
|
return {
|
|
400
|
-
items:
|
|
401
|
-
folders:
|
|
402
|
-
currentFolderId:
|
|
403
|
-
viewMode:
|
|
404
|
-
searchQuery:
|
|
405
|
-
categoryFilter:
|
|
406
|
-
sortOption:
|
|
407
|
-
isLoading:
|
|
408
|
-
isUploading:
|
|
409
|
-
uploadProgress:
|
|
410
|
-
hasMore:
|
|
411
|
-
selectedItems:
|
|
412
|
-
previewItem:
|
|
413
|
-
frequentlyUsedItems:
|
|
414
|
-
deleteUsageInfo:
|
|
415
|
-
showDeleteWarning:
|
|
400
|
+
items: n,
|
|
401
|
+
folders: r,
|
|
402
|
+
currentFolderId: i,
|
|
403
|
+
viewMode: a,
|
|
404
|
+
searchQuery: o,
|
|
405
|
+
categoryFilter: s,
|
|
406
|
+
sortOption: c,
|
|
407
|
+
isLoading: l,
|
|
408
|
+
isUploading: u,
|
|
409
|
+
uploadProgress: p,
|
|
410
|
+
hasMore: d,
|
|
411
|
+
selectedItems: m,
|
|
412
|
+
previewItem: h,
|
|
413
|
+
frequentlyUsedItems: g,
|
|
414
|
+
deleteUsageInfo: _,
|
|
415
|
+
showDeleteWarning: v,
|
|
416
416
|
loadItems: k,
|
|
417
417
|
loadMore: A,
|
|
418
418
|
search: j,
|
|
419
419
|
filterByCategory: M,
|
|
420
|
-
sortBy:
|
|
421
|
-
navigateToFolder:
|
|
422
|
-
showFrequentlyUsed:
|
|
420
|
+
sortBy: N,
|
|
421
|
+
navigateToFolder: P,
|
|
422
|
+
showFrequentlyUsed: ee,
|
|
423
423
|
uploadFile: te,
|
|
424
|
-
uploadFiles:
|
|
425
|
-
moveSelected:
|
|
426
|
-
updateFile:
|
|
424
|
+
uploadFiles: ne,
|
|
425
|
+
moveSelected: F,
|
|
426
|
+
updateFile: I,
|
|
427
427
|
deleteSelected: L,
|
|
428
|
-
isImportingFromUrl:
|
|
429
|
-
importFromUrlError:
|
|
428
|
+
isImportingFromUrl: b,
|
|
429
|
+
importFromUrlError: x,
|
|
430
430
|
importFromUrl: oe,
|
|
431
431
|
toggleSelection: se,
|
|
432
432
|
clearSelection: ce,
|
|
@@ -440,9 +440,9 @@ function xe(t) {
|
|
|
440
440
|
checkUsageBeforeDelete: R,
|
|
441
441
|
confirmDelete: ie,
|
|
442
442
|
cancelDelete: ae,
|
|
443
|
-
isReplacing:
|
|
444
|
-
replaceError:
|
|
445
|
-
showReplaceWarning:
|
|
443
|
+
isReplacing: S,
|
|
444
|
+
replaceError: C,
|
|
445
|
+
showReplaceWarning: w,
|
|
446
446
|
pendingReplaceItem: E,
|
|
447
447
|
replaceUsageInfo: D,
|
|
448
448
|
checkUsageBeforeReplace: he,
|
|
@@ -454,7 +454,7 @@ function xe(t) {
|
|
|
454
454
|
//#endregion
|
|
455
455
|
//#region ../media-library/src/composables/useI18n.ts
|
|
456
456
|
function z(e) {
|
|
457
|
-
let
|
|
457
|
+
let n = e ?? t("translations"), r = l(n) ? n.value : n;
|
|
458
458
|
function i(e, t) {
|
|
459
459
|
return e.replace(/\{(\w+)\}/g, (e, n) => n in t ? String(t[n]) : `{${n}}`);
|
|
460
460
|
}
|
|
@@ -472,7 +472,7 @@ var Se = {
|
|
|
472
472
|
}, Ce = ["onClick"], we = {
|
|
473
473
|
key: 1,
|
|
474
474
|
style: { color: "var(--tpl-text)" }
|
|
475
|
-
}, Te = /* @__PURE__ */
|
|
475
|
+
}, Te = /* @__PURE__ */ e({
|
|
476
476
|
__name: "MediaBreadcrumb",
|
|
477
477
|
props: {
|
|
478
478
|
folders: {},
|
|
@@ -480,37 +480,37 @@ var Se = {
|
|
|
480
480
|
},
|
|
481
481
|
emits: ["navigate"],
|
|
482
482
|
setup(e, { emit: t }) {
|
|
483
|
-
let n = e,
|
|
483
|
+
let n = e, r = t, { t: a } = z(), s = S(() => {
|
|
484
484
|
if (!n.currentFolderId) return [];
|
|
485
485
|
let e = [];
|
|
486
|
-
return
|
|
486
|
+
return c(n.folders, n.currentFolderId, e), e;
|
|
487
487
|
});
|
|
488
|
-
function
|
|
488
|
+
function c(e, t, n) {
|
|
489
489
|
for (let r of e) {
|
|
490
490
|
if (r.id === t) return n.push(r), !0;
|
|
491
|
-
if (r.children &&
|
|
491
|
+
if (r.children && c(r.children, t, n)) return n.unshift(r), !0;
|
|
492
492
|
}
|
|
493
493
|
return !1;
|
|
494
494
|
}
|
|
495
|
-
return (e, t) =>
|
|
495
|
+
return (e, t) => s.value.length > 0 ? (o(), O("div", Se, [y("button", {
|
|
496
496
|
class: "tpl:transition-colors tpl:duration-150 tpl:hover:underline",
|
|
497
497
|
style: { color: "var(--tpl-primary)" },
|
|
498
|
-
onClick: t[0] ||= (e) =>
|
|
499
|
-
},
|
|
498
|
+
onClick: t[0] ||= (e) => r("navigate", null)
|
|
499
|
+
}, _(p(a).mediaLibrary.allFiles), 1), (o(!0), O(g, null, i(s.value, (e, t) => (o(), O(g, { key: e.id }, [k(p(re), {
|
|
500
500
|
size: 12,
|
|
501
501
|
"stroke-width": 2
|
|
502
|
-
}), t <
|
|
502
|
+
}), t < s.value.length - 1 ? (o(), O("button", {
|
|
503
503
|
key: 0,
|
|
504
504
|
class: "tpl:transition-colors tpl:duration-150 tpl:hover:underline",
|
|
505
505
|
style: { color: "var(--tpl-primary)" },
|
|
506
|
-
onClick: (t) =>
|
|
507
|
-
},
|
|
506
|
+
onClick: (t) => r("navigate", e.id)
|
|
507
|
+
}, _(e.name), 9, Ce)) : (o(), O("span", we, _(e.name), 1))], 64))), 128))])) : u("", !0);
|
|
508
508
|
}
|
|
509
509
|
});
|
|
510
510
|
//#endregion
|
|
511
511
|
//#region ../media-library/src/composables/useMediaCategories.ts
|
|
512
512
|
function Ee() {
|
|
513
|
-
let e =
|
|
513
|
+
let e = t("planConfig"), n = S(() => e.config.value?.media ?? null), r = S(() => n.value?.use_media_library ?? !0), i = S(() => n.value?.categories ?? null), a = S(() => i.value ? Object.values(i.value).flatMap((e) => e.mime_types) : []), o = S(() => a.value.join(",")), s = S(() => n.value?.max_file_size ?? 0);
|
|
514
514
|
function c(e, t) {
|
|
515
515
|
return i.value ? !t || t.length === 0 ? a.value.includes(e) : t.some((t) => i.value[t]?.mime_types.includes(e)) : !1;
|
|
516
516
|
}
|
|
@@ -527,7 +527,7 @@ function Ee() {
|
|
|
527
527
|
allAcceptedMimeTypes: a,
|
|
528
528
|
allAcceptedInputString: o,
|
|
529
529
|
maxFileSize: s,
|
|
530
|
-
availableCategories:
|
|
530
|
+
availableCategories: S(() => i.value ? Object.keys(i.value) : []),
|
|
531
531
|
isAcceptedMimeType: c,
|
|
532
532
|
isImageMimeType: l,
|
|
533
533
|
getCategoryForMimeType: u
|
|
@@ -886,21 +886,21 @@ var Ze = function(e, t) {
|
|
|
886
886
|
"enter"
|
|
887
887
|
]
|
|
888
888
|
};
|
|
889
|
-
tt.render = function(e, t, n, r, i,
|
|
890
|
-
return
|
|
889
|
+
tt.render = function(e, t, n, r, i, s) {
|
|
890
|
+
return o(), v("div", {
|
|
891
891
|
ref: "draggable",
|
|
892
892
|
class: n.classname,
|
|
893
893
|
onTouchstart: t[1] ||= function() {
|
|
894
|
-
return
|
|
894
|
+
return s.onTouchStart && s.onTouchStart.apply(s, arguments);
|
|
895
895
|
},
|
|
896
896
|
onMousedown: t[2] ||= function() {
|
|
897
|
-
return
|
|
897
|
+
return s.onMouseDown && s.onMouseDown.apply(s, arguments);
|
|
898
898
|
},
|
|
899
899
|
onMouseover: t[3] ||= function() {
|
|
900
|
-
return
|
|
900
|
+
return s.onMouseOver && s.onMouseOver.apply(s, arguments);
|
|
901
901
|
},
|
|
902
902
|
onMouseleave: t[4] ||= function() {
|
|
903
|
-
return
|
|
903
|
+
return s.onMouseLeave && s.onMouseLeave.apply(s, arguments);
|
|
904
904
|
}
|
|
905
905
|
}, [a(e.$slots, "default")], 34);
|
|
906
906
|
};
|
|
@@ -933,9 +933,9 @@ var nt = U("vue-handler-wrapper"), rt = {
|
|
|
933
933
|
"drag-end"
|
|
934
934
|
]
|
|
935
935
|
};
|
|
936
|
-
rt.render = function(e, t, n, r,
|
|
936
|
+
rt.render = function(e, t, n, r, i, l) {
|
|
937
937
|
var u = s("DraggableElement");
|
|
938
|
-
return
|
|
938
|
+
return o(), v("div", { class: l.classes.root }, [k(u, {
|
|
939
939
|
class: l.classes.draggable,
|
|
940
940
|
onDrag: t[1] ||= function(t) {
|
|
941
941
|
return e.$emit("drag", t);
|
|
@@ -950,7 +950,7 @@ rt.render = function(e, t, n, r, o, l) {
|
|
|
950
950
|
return e.$emit("enter");
|
|
951
951
|
}
|
|
952
952
|
}, {
|
|
953
|
-
default:
|
|
953
|
+
default: c((function() {
|
|
954
954
|
return [a(e.$slots, "default")];
|
|
955
955
|
})),
|
|
956
956
|
_: 3
|
|
@@ -980,9 +980,9 @@ var it = U("vue-line-wrapper"), at = {
|
|
|
980
980
|
"drag-end"
|
|
981
981
|
]
|
|
982
982
|
};
|
|
983
|
-
at.render = function(e, t, n, r,
|
|
983
|
+
at.render = function(e, t, n, r, i, l) {
|
|
984
984
|
var u = s("DraggableElement");
|
|
985
|
-
return
|
|
985
|
+
return o(), v(u, {
|
|
986
986
|
class: l.classname,
|
|
987
987
|
onDrag: t[1] ||= function(t) {
|
|
988
988
|
return e.$emit("drag", t);
|
|
@@ -997,7 +997,7 @@ at.render = function(e, t, n, r, o, l) {
|
|
|
997
997
|
return e.$emit("enter");
|
|
998
998
|
}
|
|
999
999
|
}, {
|
|
1000
|
-
default:
|
|
1000
|
+
default: c((function() {
|
|
1001
1001
|
return [a(e.$slots, "default")];
|
|
1002
1002
|
})),
|
|
1003
1003
|
_: 3
|
|
@@ -1559,20 +1559,20 @@ var Wt = U("vue-simple-handler"), Gt = U("vue-simple-handler-wrapper"), Kt = {
|
|
|
1559
1559
|
},
|
|
1560
1560
|
emits: ["drag", "drag-end"]
|
|
1561
1561
|
};
|
|
1562
|
-
Kt.render = function(e, t, n, r,
|
|
1562
|
+
Kt.render = function(e, t, n, r, i, a) {
|
|
1563
1563
|
var l = s("HandlerWrapper");
|
|
1564
|
-
return
|
|
1565
|
-
class:
|
|
1564
|
+
return o(), v(l, {
|
|
1565
|
+
class: a.classes.wrapper,
|
|
1566
1566
|
"vertical-position": n.verticalPosition,
|
|
1567
1567
|
"horizontal-position": n.horizontalPosition,
|
|
1568
1568
|
disabled: n.disabled,
|
|
1569
|
-
onDrag:
|
|
1570
|
-
onDragEnd:
|
|
1571
|
-
onEnter:
|
|
1572
|
-
onLeave:
|
|
1569
|
+
onDrag: a.onDrag,
|
|
1570
|
+
onDragEnd: a.onDragEnd,
|
|
1571
|
+
onEnter: a.onEnter,
|
|
1572
|
+
onLeave: a.onLeave
|
|
1573
1573
|
}, {
|
|
1574
|
-
default:
|
|
1575
|
-
return [
|
|
1574
|
+
default: c((function() {
|
|
1575
|
+
return [k("div", { class: a.classes.default }, null, 2)];
|
|
1576
1576
|
})),
|
|
1577
1577
|
_: 1
|
|
1578
1578
|
}, 8, [
|
|
@@ -1624,19 +1624,19 @@ var qt = U("vue-simple-line"), Jt = U("vue-simple-line-wrapper"), Yt = {
|
|
|
1624
1624
|
},
|
|
1625
1625
|
emits: ["drag", "drag-end"]
|
|
1626
1626
|
};
|
|
1627
|
-
Yt.render = function(e, t, n, r,
|
|
1627
|
+
Yt.render = function(e, t, n, r, i, a) {
|
|
1628
1628
|
var l = s("LineWrapper");
|
|
1629
|
-
return
|
|
1630
|
-
class:
|
|
1629
|
+
return o(), v(l, {
|
|
1630
|
+
class: a.classes.wrapper,
|
|
1631
1631
|
position: n.position,
|
|
1632
1632
|
disabled: n.disabled,
|
|
1633
|
-
onDrag:
|
|
1634
|
-
onDragEnd:
|
|
1635
|
-
onEnter:
|
|
1636
|
-
onLeave:
|
|
1633
|
+
onDrag: a.onDrag,
|
|
1634
|
+
onDragEnd: a.onDragEnd,
|
|
1635
|
+
onEnter: a.onEnter,
|
|
1636
|
+
onLeave: a.onLeave
|
|
1637
1637
|
}, {
|
|
1638
|
-
default:
|
|
1639
|
-
return [
|
|
1638
|
+
default: c((function() {
|
|
1639
|
+
return [k("div", { class: a.classes.root }, null, 2)];
|
|
1640
1640
|
})),
|
|
1641
1641
|
_: 1
|
|
1642
1642
|
}, 8, [
|
|
@@ -1833,15 +1833,15 @@ var Xt = U("vue-bounding-box"), Zt = [
|
|
|
1833
1833
|
},
|
|
1834
1834
|
emits: ["resize", "resize-end"]
|
|
1835
1835
|
};
|
|
1836
|
-
$t.render = function(e, t, n,
|
|
1837
|
-
return
|
|
1836
|
+
$t.render = function(e, t, n, r, s, c) {
|
|
1837
|
+
return o(), v("div", {
|
|
1838
1838
|
ref: "box",
|
|
1839
|
-
class:
|
|
1840
|
-
style:
|
|
1839
|
+
class: c.classes.root,
|
|
1840
|
+
style: c.style
|
|
1841
1841
|
}, [
|
|
1842
1842
|
a(e.$slots, "default"),
|
|
1843
|
-
|
|
1844
|
-
return
|
|
1843
|
+
k("div", null, [(o(!0), v(g, null, i(c.lineNodes, (function(e) {
|
|
1844
|
+
return o(), v(A(e.component), {
|
|
1845
1845
|
key: e.name,
|
|
1846
1846
|
"default-class": e.class,
|
|
1847
1847
|
"hover-class": e.hoverClass,
|
|
@@ -1849,10 +1849,10 @@ $t.render = function(e, t, n, i, o, s) {
|
|
|
1849
1849
|
position: e.name,
|
|
1850
1850
|
disabled: e.disabled,
|
|
1851
1851
|
onDrag: function(t) {
|
|
1852
|
-
return
|
|
1852
|
+
return c.onHandlerDrag(t, e.horizontalDirection, e.verticalDirection);
|
|
1853
1853
|
},
|
|
1854
1854
|
onDragEnd: t[1] ||= function(e) {
|
|
1855
|
-
return
|
|
1855
|
+
return c.onEnd();
|
|
1856
1856
|
}
|
|
1857
1857
|
}, null, 8, [
|
|
1858
1858
|
"default-class",
|
|
@@ -1863,12 +1863,12 @@ $t.render = function(e, t, n, i, o, s) {
|
|
|
1863
1863
|
"onDrag"
|
|
1864
1864
|
]);
|
|
1865
1865
|
})), 128))]),
|
|
1866
|
-
(
|
|
1867
|
-
return
|
|
1866
|
+
(o(!0), v(g, null, i(c.handlerNodes, (function(e) {
|
|
1867
|
+
return o(), v("div", {
|
|
1868
1868
|
key: e.name,
|
|
1869
1869
|
style: e.wrapperStyle,
|
|
1870
1870
|
class: e.wrapperClass
|
|
1871
|
-
}, [(
|
|
1871
|
+
}, [(o(), v(A(e.component), {
|
|
1872
1872
|
"default-class": e.class,
|
|
1873
1873
|
"hover-class": e.hoverClass,
|
|
1874
1874
|
"wrapper-class": e.wrapperClass,
|
|
@@ -1876,10 +1876,10 @@ $t.render = function(e, t, n, i, o, s) {
|
|
|
1876
1876
|
"vertical-position": e.verticalDirection,
|
|
1877
1877
|
disabled: e.disabled,
|
|
1878
1878
|
onDrag: function(t) {
|
|
1879
|
-
return
|
|
1879
|
+
return c.onHandlerDrag(t, e.horizontalDirection, e.verticalDirection);
|
|
1880
1880
|
},
|
|
1881
1881
|
onDragEnd: t[2] ||= function(e) {
|
|
1882
|
-
return
|
|
1882
|
+
return c.onEnd();
|
|
1883
1883
|
}
|
|
1884
1884
|
}, null, 8, [
|
|
1885
1885
|
"default-class",
|
|
@@ -1982,14 +1982,14 @@ var en = U("vue-draggable-area"), tn = {
|
|
|
1982
1982
|
},
|
|
1983
1983
|
emits: ["move", "move-end"]
|
|
1984
1984
|
};
|
|
1985
|
-
tn.render = function(e, t, n, r, i,
|
|
1986
|
-
return
|
|
1985
|
+
tn.render = function(e, t, n, r, i, s) {
|
|
1986
|
+
return o(), v("div", {
|
|
1987
1987
|
ref: "container",
|
|
1988
1988
|
onTouchstart: t[1] ||= function() {
|
|
1989
|
-
return
|
|
1989
|
+
return s.onTouchStart && s.onTouchStart.apply(s, arguments);
|
|
1990
1990
|
},
|
|
1991
1991
|
onMousedown: t[2] ||= function() {
|
|
1992
|
-
return
|
|
1992
|
+
return s.onMouseDown && s.onMouseDown.apply(s, arguments);
|
|
1993
1993
|
}
|
|
1994
1994
|
}, [a(e.$slots, "default")], 544);
|
|
1995
1995
|
};
|
|
@@ -2149,11 +2149,11 @@ function ln(e, t) {
|
|
|
2149
2149
|
};
|
|
2150
2150
|
}
|
|
2151
2151
|
cn.render = function(e, t, n, r, i, a) {
|
|
2152
|
-
return
|
|
2152
|
+
return o(), v("div", { class: a.classes.root }, [k("div", {
|
|
2153
2153
|
ref: "wrapper",
|
|
2154
2154
|
class: a.classes.wrapper,
|
|
2155
2155
|
style: a.wrapperStyle
|
|
2156
|
-
}, [
|
|
2156
|
+
}, [k("img", {
|
|
2157
2157
|
ref: "image",
|
|
2158
2158
|
src: n.image.src,
|
|
2159
2159
|
class: a.classes.image,
|
|
@@ -2282,17 +2282,17 @@ var un = {
|
|
|
2282
2282
|
"transform-end"
|
|
2283
2283
|
]
|
|
2284
2284
|
};
|
|
2285
|
-
un.render = function(e, t, n, r, i,
|
|
2286
|
-
return
|
|
2285
|
+
un.render = function(e, t, n, r, i, s) {
|
|
2286
|
+
return o(), v("div", {
|
|
2287
2287
|
ref: "container",
|
|
2288
2288
|
onTouchstart: t[1] ||= function() {
|
|
2289
|
-
return
|
|
2289
|
+
return s.onTouchStart && s.onTouchStart.apply(s, arguments);
|
|
2290
2290
|
},
|
|
2291
2291
|
onMousedown: t[2] ||= function() {
|
|
2292
|
-
return
|
|
2292
|
+
return s.onMouseDown && s.onMouseDown.apply(s, arguments);
|
|
2293
2293
|
},
|
|
2294
2294
|
onWheel: t[3] ||= function() {
|
|
2295
|
-
return
|
|
2295
|
+
return s.onWheel && s.onWheel.apply(s, arguments);
|
|
2296
2296
|
}
|
|
2297
2297
|
}, [a(e.$slots, "default")], 544);
|
|
2298
2298
|
};
|
|
@@ -2318,9 +2318,9 @@ var dn = {
|
|
|
2318
2318
|
},
|
|
2319
2319
|
emits: ["resize", "move"]
|
|
2320
2320
|
};
|
|
2321
|
-
dn.render = function(e, t, n, r,
|
|
2321
|
+
dn.render = function(e, t, n, r, i, l) {
|
|
2322
2322
|
var u = s("transformable-image");
|
|
2323
|
-
return
|
|
2323
|
+
return o(), v(u, {
|
|
2324
2324
|
"touch-move": n.touchMove,
|
|
2325
2325
|
"touch-resize": n.touchResize,
|
|
2326
2326
|
"mouse-move": n.mouseMove,
|
|
@@ -2332,7 +2332,7 @@ dn.render = function(e, t, n, r, o, l) {
|
|
|
2332
2332
|
return e.$emit("resize", t);
|
|
2333
2333
|
}
|
|
2334
2334
|
}, {
|
|
2335
|
-
default:
|
|
2335
|
+
default: c((function() {
|
|
2336
2336
|
return [a(e.$slots, "default")];
|
|
2337
2337
|
})),
|
|
2338
2338
|
_: 3
|
|
@@ -2467,29 +2467,29 @@ var fn = U("vue-preview"), pn = {
|
|
|
2467
2467
|
}
|
|
2468
2468
|
}
|
|
2469
2469
|
};
|
|
2470
|
-
pn.render = function(e, t,
|
|
2471
|
-
return
|
|
2470
|
+
pn.render = function(e, t, r, i, a, s) {
|
|
2471
|
+
return o(), v("div", {
|
|
2472
2472
|
ref: "root",
|
|
2473
|
-
class:
|
|
2474
|
-
style:
|
|
2475
|
-
}, [
|
|
2473
|
+
class: s.classes.root,
|
|
2474
|
+
style: s.style
|
|
2475
|
+
}, [k("div", {
|
|
2476
2476
|
ref: "wrapper",
|
|
2477
|
-
class:
|
|
2478
|
-
style:
|
|
2479
|
-
}, [
|
|
2477
|
+
class: s.classes.wrapper,
|
|
2478
|
+
style: s.wrapperStyle
|
|
2479
|
+
}, [n(k("img", {
|
|
2480
2480
|
ref: "image",
|
|
2481
|
-
src:
|
|
2482
|
-
class:
|
|
2483
|
-
style:
|
|
2484
|
-
}, null, 14, ["src"]), [[
|
|
2481
|
+
src: r.image && r.image.src,
|
|
2482
|
+
class: s.classes.image,
|
|
2483
|
+
style: s.imageStyle
|
|
2484
|
+
}, null, 14, ["src"]), [[x, r.image && r.image.src]])], 6)], 6);
|
|
2485
2485
|
};
|
|
2486
2486
|
var mn = {
|
|
2487
2487
|
components: { Preview: pn },
|
|
2488
2488
|
inheritAttrs: !1
|
|
2489
2489
|
};
|
|
2490
2490
|
mn.render = function(e, t, n, r, i, a) {
|
|
2491
|
-
var
|
|
2492
|
-
return
|
|
2491
|
+
var c = s("preview");
|
|
2492
|
+
return o(), v(c, b(e.$attrs, { fill: !0 }), null, 16);
|
|
2493
2493
|
};
|
|
2494
2494
|
var hn = U("vue-rectangle-stencil"), gn = {
|
|
2495
2495
|
name: "RectangleStencil",
|
|
@@ -2611,16 +2611,16 @@ var hn = U("vue-rectangle-stencil"), gn = {
|
|
|
2611
2611
|
"move-end"
|
|
2612
2612
|
]
|
|
2613
2613
|
};
|
|
2614
|
-
gn.render = function(e, t, n, r,
|
|
2614
|
+
gn.render = function(e, t, n, r, i, a) {
|
|
2615
2615
|
var l = s("stencil-preview"), u = s("draggable-area"), d = s("bounding-box");
|
|
2616
|
-
return
|
|
2617
|
-
class:
|
|
2618
|
-
style:
|
|
2619
|
-
}, [
|
|
2616
|
+
return o(), v("div", {
|
|
2617
|
+
class: a.classes.stencil,
|
|
2618
|
+
style: a.style
|
|
2619
|
+
}, [k(d, {
|
|
2620
2620
|
width: n.stencilCoordinates.width,
|
|
2621
2621
|
height: n.stencilCoordinates.height,
|
|
2622
2622
|
transitions: n.transitions,
|
|
2623
|
-
class:
|
|
2623
|
+
class: a.classes.boundingBox,
|
|
2624
2624
|
handlers: n.handlers,
|
|
2625
2625
|
"handlers-component": n.handlersComponent,
|
|
2626
2626
|
"handlers-classes": n.handlersClasses,
|
|
@@ -2630,22 +2630,22 @@ gn.render = function(e, t, n, r, a, o) {
|
|
|
2630
2630
|
"lines-classes": n.linesClasses,
|
|
2631
2631
|
"lines-wrappers-classes": n.linesWrappersClasses,
|
|
2632
2632
|
resizable: n.resizable,
|
|
2633
|
-
onResize:
|
|
2634
|
-
onResizeEnd:
|
|
2633
|
+
onResize: a.onResize,
|
|
2634
|
+
onResizeEnd: a.onResizeEnd
|
|
2635
2635
|
}, {
|
|
2636
|
-
default:
|
|
2637
|
-
return [
|
|
2636
|
+
default: c((function() {
|
|
2637
|
+
return [k(u, {
|
|
2638
2638
|
movable: n.movable,
|
|
2639
|
-
onMove:
|
|
2640
|
-
onMoveEnd:
|
|
2639
|
+
onMove: a.onMove,
|
|
2640
|
+
onMoveEnd: a.onMoveEnd
|
|
2641
2641
|
}, {
|
|
2642
|
-
default:
|
|
2643
|
-
return [
|
|
2642
|
+
default: c((function() {
|
|
2643
|
+
return [k(l, {
|
|
2644
2644
|
image: n.image,
|
|
2645
2645
|
coordinates: n.coordinates,
|
|
2646
2646
|
width: n.stencilCoordinates.width,
|
|
2647
2647
|
height: n.stencilCoordinates.height,
|
|
2648
|
-
class:
|
|
2648
|
+
class: a.classes.preview,
|
|
2649
2649
|
transitions: n.transitions
|
|
2650
2650
|
}, null, 8, [
|
|
2651
2651
|
"image",
|
|
@@ -2808,16 +2808,16 @@ var _n = U("vue-circle-stencil"), vn = {
|
|
|
2808
2808
|
"move-end"
|
|
2809
2809
|
]
|
|
2810
2810
|
};
|
|
2811
|
-
vn.render = function(e, t, n, r,
|
|
2811
|
+
vn.render = function(e, t, n, r, i, a) {
|
|
2812
2812
|
var l = s("stencil-preview"), u = s("draggable-area"), d = s("bounding-box");
|
|
2813
|
-
return
|
|
2814
|
-
class:
|
|
2815
|
-
style:
|
|
2816
|
-
}, [
|
|
2813
|
+
return o(), v("div", {
|
|
2814
|
+
class: a.classes.stencil,
|
|
2815
|
+
style: a.style
|
|
2816
|
+
}, [k(d, {
|
|
2817
2817
|
width: n.stencilCoordinates.width,
|
|
2818
2818
|
height: n.stencilCoordinates.height,
|
|
2819
2819
|
transitions: n.transitions,
|
|
2820
|
-
class:
|
|
2820
|
+
class: a.classes.boundingBox,
|
|
2821
2821
|
handlers: n.handlers,
|
|
2822
2822
|
"handlers-component": n.handlersComponent,
|
|
2823
2823
|
"handlers-classes": n.handlersClasses,
|
|
@@ -2827,22 +2827,22 @@ vn.render = function(e, t, n, r, a, o) {
|
|
|
2827
2827
|
"lines-classes": n.linesClasses,
|
|
2828
2828
|
"lines-wrappers-classes": n.linesWrappersClasses,
|
|
2829
2829
|
resizable: n.resizable,
|
|
2830
|
-
onResize:
|
|
2831
|
-
onResizeEnd:
|
|
2830
|
+
onResize: a.onResize,
|
|
2831
|
+
onResizeEnd: a.onResizeEnd
|
|
2832
2832
|
}, {
|
|
2833
|
-
default:
|
|
2834
|
-
return [
|
|
2833
|
+
default: c((function() {
|
|
2834
|
+
return [k(u, {
|
|
2835
2835
|
movable: n.movable,
|
|
2836
|
-
onMove:
|
|
2837
|
-
onMoveEnd:
|
|
2836
|
+
onMove: a.onMove,
|
|
2837
|
+
onMoveEnd: a.onMoveEnd
|
|
2838
2838
|
}, {
|
|
2839
|
-
default:
|
|
2840
|
-
return [
|
|
2839
|
+
default: c((function() {
|
|
2840
|
+
return [k(l, {
|
|
2841
2841
|
image: n.image,
|
|
2842
2842
|
coordinates: n.coordinates,
|
|
2843
2843
|
width: n.stencilCoordinates.width,
|
|
2844
2844
|
height: n.stencilCoordinates.height,
|
|
2845
|
-
class:
|
|
2845
|
+
class: a.classes.preview,
|
|
2846
2846
|
transitions: n.transitions
|
|
2847
2847
|
}, null, 8, [
|
|
2848
2848
|
"image",
|
|
@@ -3997,54 +3997,54 @@ var yn = ["transitions"], bn = U("vue-advanced-cropper"), xn = {
|
|
|
3997
3997
|
ref: "sourceCanvas",
|
|
3998
3998
|
style: { display: "none" }
|
|
3999
3999
|
};
|
|
4000
|
-
xn.render = function(e, t,
|
|
4001
|
-
return
|
|
4000
|
+
xn.render = function(e, t, r, i, a, s) {
|
|
4001
|
+
return o(), v("div", {
|
|
4002
4002
|
ref: "cropper",
|
|
4003
|
-
class:
|
|
4004
|
-
}, [
|
|
4003
|
+
class: s.classes.cropper
|
|
4004
|
+
}, [k("div", {
|
|
4005
4005
|
ref: "stretcher",
|
|
4006
|
-
class:
|
|
4007
|
-
}, null, 2),
|
|
4008
|
-
class:
|
|
4009
|
-
style:
|
|
4010
|
-
}, [(
|
|
4011
|
-
class:
|
|
4012
|
-
"wheel-resize":
|
|
4013
|
-
"touch-resize":
|
|
4014
|
-
"touch-move":
|
|
4015
|
-
"mouse-move":
|
|
4016
|
-
onMove:
|
|
4017
|
-
onResize:
|
|
4006
|
+
class: s.classes.stretcher
|
|
4007
|
+
}, null, 2), k("div", {
|
|
4008
|
+
class: s.classes.boundaries,
|
|
4009
|
+
style: s.boundariesStyle
|
|
4010
|
+
}, [(o(), v(A(r.backgroundWrapperComponent), {
|
|
4011
|
+
class: s.classes.cropperWrapper,
|
|
4012
|
+
"wheel-resize": s.settings.resizeImage.wheel,
|
|
4013
|
+
"touch-resize": s.settings.resizeImage.touch,
|
|
4014
|
+
"touch-move": s.settings.moveImage.touch,
|
|
4015
|
+
"mouse-move": s.settings.moveImage.mouse,
|
|
4016
|
+
onMove: s.onManipulateImage,
|
|
4017
|
+
onResize: s.onManipulateImage
|
|
4018
4018
|
}, {
|
|
4019
|
-
default:
|
|
4019
|
+
default: c((function() {
|
|
4020
4020
|
return [
|
|
4021
|
-
|
|
4022
|
-
class:
|
|
4023
|
-
style:
|
|
4021
|
+
k("div", {
|
|
4022
|
+
class: s.classes.background,
|
|
4023
|
+
style: s.boundariesStyle
|
|
4024
4024
|
}, null, 6),
|
|
4025
|
-
|
|
4025
|
+
k("div", { class: s.classes.imageWrapper }, [k("img", {
|
|
4026
4026
|
ref: "image",
|
|
4027
4027
|
crossorigin: a.imageAttributes.crossOrigin,
|
|
4028
4028
|
src: a.imageAttributes.src,
|
|
4029
|
-
class:
|
|
4030
|
-
style:
|
|
4031
|
-
onMousedown: t[1] ||=
|
|
4029
|
+
class: s.classes.image,
|
|
4030
|
+
style: s.imageStyle,
|
|
4031
|
+
onMousedown: t[1] ||= m((function() {}), ["prevent"])
|
|
4032
4032
|
}, null, 46, ["crossorigin", "src"])], 2),
|
|
4033
|
-
|
|
4034
|
-
class:
|
|
4035
|
-
style:
|
|
4033
|
+
k("div", {
|
|
4034
|
+
class: s.classes.foreground,
|
|
4035
|
+
style: s.boundariesStyle
|
|
4036
4036
|
}, null, 6),
|
|
4037
|
-
|
|
4037
|
+
n((o(), v(A(r.stencilComponent), b({
|
|
4038
4038
|
ref: "stencil",
|
|
4039
|
-
image:
|
|
4039
|
+
image: s.image,
|
|
4040
4040
|
coordinates: a.coordinates,
|
|
4041
|
-
"stencil-coordinates":
|
|
4042
|
-
transitions:
|
|
4043
|
-
},
|
|
4044
|
-
onResize:
|
|
4045
|
-
onResizeEnd:
|
|
4046
|
-
onMove:
|
|
4047
|
-
onMoveEnd:
|
|
4041
|
+
"stencil-coordinates": s.stencilCoordinates,
|
|
4042
|
+
transitions: s.transitionsOptions
|
|
4043
|
+
}, r.stencilProps, {
|
|
4044
|
+
onResize: s.onResize,
|
|
4045
|
+
onResizeEnd: s.onResizeEnd,
|
|
4046
|
+
onMove: s.onMove,
|
|
4047
|
+
onMoveEnd: s.onMoveEnd
|
|
4048
4048
|
}), null, 16, [
|
|
4049
4049
|
"image",
|
|
4050
4050
|
"coordinates",
|
|
@@ -4054,9 +4054,9 @@ xn.render = function(e, t, n, r, a, o) {
|
|
|
4054
4054
|
"onResizeEnd",
|
|
4055
4055
|
"onMove",
|
|
4056
4056
|
"onMoveEnd"
|
|
4057
|
-
])), [[
|
|
4058
|
-
|
|
4059
|
-
|
|
4057
|
+
])), [[x, a.imageLoaded]]),
|
|
4058
|
+
r.canvas ? (o(), v("canvas", Sn, null, 512)) : u("", !0),
|
|
4059
|
+
r.canvas ? (o(), v("canvas", Cn, null, 512)) : u("", !0)
|
|
4060
4060
|
];
|
|
4061
4061
|
})),
|
|
4062
4062
|
_: 1
|
|
@@ -4122,22 +4122,22 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
|
|
|
4122
4122
|
}, $n = {
|
|
4123
4123
|
class: "tpl:mb-1 tpl:block tpl:text-xs tpl:font-medium",
|
|
4124
4124
|
style: { color: "var(--tpl-text-muted)" }
|
|
4125
|
-
}, er = ["placeholder"], tr = { class: "tpl:flex tpl:shrink-0 tpl:justify-end tpl:gap-2 tpl:p-5 tpl:pt-4" }, nr = ["disabled"], rr = /* @__PURE__ */
|
|
4125
|
+
}, er = ["placeholder"], tr = { class: "tpl:flex tpl:shrink-0 tpl:justify-end tpl:gap-2 tpl:p-5 tpl:pt-4" }, nr = ["disabled"], rr = /* @__PURE__ */ oe(/* @__PURE__ */ e({
|
|
4126
4126
|
__name: "MediaEditModal",
|
|
4127
4127
|
props: {
|
|
4128
4128
|
visible: { type: Boolean },
|
|
4129
4129
|
item: {}
|
|
4130
4130
|
},
|
|
4131
4131
|
emits: ["save", "close"],
|
|
4132
|
-
setup(
|
|
4133
|
-
let s =
|
|
4132
|
+
setup(e, { emit: a }) {
|
|
4133
|
+
let s = e, l = a, { t: b } = z(), x = t("tplUiTheme"), E = b.mediaLibrary, { isImageMimeType: A } = Ee(), j = T(""), M = T(""), N = T(null), P = T("free"), ee = T(void 0), te = T(void 0), ne = T(""), F = T(""), I = T(void 0), L = T(null), re = T(!1), R = T(!1), ie = T(!1), ae = S(() => s.item ? [
|
|
4134
4134
|
"image/jpeg",
|
|
4135
4135
|
"image/png",
|
|
4136
4136
|
"image/webp",
|
|
4137
4137
|
"image/gif"
|
|
4138
|
-
].includes(s.item.mime_type) : !1), oe =
|
|
4139
|
-
|
|
4140
|
-
e && s.item && (j.value = s.item.filename, M.value = s.item.alt_text || "",
|
|
4138
|
+
].includes(s.item.mime_type) : !1), oe = S(() => P.value === "original" ? I.value : De[P.value]), se = S(() => L.value ? je(L.value.width, L.value.height, ee.value, te.value) : null);
|
|
4139
|
+
r(() => s.visible, (e) => {
|
|
4140
|
+
e && s.item && (j.value = s.item.filename, M.value = s.item.alt_text || "", P.value = "free", ee.value = void 0, te.value = void 0, ne.value = "", F.value = "", I.value = void 0, L.value = null, re.value = !1, ie.value = !1, s.item.width && s.item.height && (I.value = s.item.width / s.item.height));
|
|
4141
4141
|
});
|
|
4142
4142
|
function ce(e) {
|
|
4143
4143
|
e.coordinates && (L.value = {
|
|
@@ -4146,26 +4146,26 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
|
|
|
4146
4146
|
}, ie.value = !0);
|
|
4147
4147
|
}
|
|
4148
4148
|
function le() {
|
|
4149
|
-
re.value = !0, !
|
|
4149
|
+
re.value = !0, !I.value && s.item?.width && s.item?.height && (I.value = s.item.width / s.item.height);
|
|
4150
4150
|
}
|
|
4151
4151
|
function ue(e) {
|
|
4152
4152
|
let t = e.target.value;
|
|
4153
|
-
|
|
4153
|
+
ne.value = t, ee.value = t && parseInt(t, 10) || void 0;
|
|
4154
4154
|
}
|
|
4155
4155
|
function de(e) {
|
|
4156
4156
|
let t = e.target.value;
|
|
4157
|
-
|
|
4157
|
+
F.value = t, te.value = t && parseInt(t, 10) || void 0;
|
|
4158
4158
|
}
|
|
4159
4159
|
async function fe() {
|
|
4160
4160
|
let e = j.value.trim();
|
|
4161
4161
|
if (!e || !s.item || R.value) return;
|
|
4162
|
-
let t =
|
|
4163
|
-
if (ae.value &&
|
|
4162
|
+
let t = A(s.item.mime_type), n;
|
|
4163
|
+
if (ae.value && N.value && ie.value) {
|
|
4164
4164
|
R.value = !0;
|
|
4165
4165
|
try {
|
|
4166
|
-
let { canvas: e } =
|
|
4166
|
+
let { canvas: e } = N.value.getResult();
|
|
4167
4167
|
if (e) {
|
|
4168
|
-
let t = ke(e,
|
|
4168
|
+
let t = ke(e, ee.value, te.value), r = Oe(s.item.mime_type);
|
|
4169
4169
|
n = { file: await Ae(t, s.item.filename, r) };
|
|
4170
4170
|
}
|
|
4171
4171
|
} catch {
|
|
@@ -4179,7 +4179,7 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
|
|
|
4179
4179
|
function pe(e) {
|
|
4180
4180
|
e.key === "Enter" && !R.value && (e.preventDefault(), fe()), e.key === "Escape" && l("close");
|
|
4181
4181
|
}
|
|
4182
|
-
return (
|
|
4182
|
+
return (t, r) => (o(), v(w, { to: "body" }, [k(C, {
|
|
4183
4183
|
"enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
|
|
4184
4184
|
"enter-from-class": "tpl:opacity-0",
|
|
4185
4185
|
"enter-to-class": "tpl:opacity-100",
|
|
@@ -4187,48 +4187,48 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
|
|
|
4187
4187
|
"leave-from-class": "tpl:opacity-100",
|
|
4188
4188
|
"leave-to-class": "tpl:opacity-0"
|
|
4189
4189
|
}, {
|
|
4190
|
-
default:
|
|
4190
|
+
default: c(() => [e.visible && e.item ? (o(), O("div", {
|
|
4191
4191
|
key: 0,
|
|
4192
|
-
"data-tpl-theme":
|
|
4192
|
+
"data-tpl-theme": p(x),
|
|
4193
4193
|
class: "tpl tpl:fixed tpl:inset-0 tpl:z-[10000] tpl:flex tpl:items-center tpl:justify-center",
|
|
4194
4194
|
style: { "background-color": "var(--tpl-overlay)" },
|
|
4195
|
-
onClick:
|
|
4195
|
+
onClick: r[3] ||= m((e) => l("close"), ["self"]),
|
|
4196
4196
|
onKeydown: pe
|
|
4197
|
-
}, [
|
|
4198
|
-
class:
|
|
4197
|
+
}, [y("div", {
|
|
4198
|
+
class: D(["tpl:mx-4 tpl:flex tpl:max-h-[90vh] tpl:w-full tpl:flex-col tpl:overflow-hidden tpl:rounded-lg tpl:shadow-xl", ae.value ? "tpl:max-w-2xl" : "tpl:max-w-sm"]),
|
|
4199
4199
|
style: { "background-color": "var(--tpl-bg-elevated)" }
|
|
4200
4200
|
}, [
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
ae.value ? (
|
|
4201
|
+
y("div", Tn, [y("h3", En, _(p(b).mediaLibrary.editFile), 1)]),
|
|
4202
|
+
y("div", Dn, [
|
|
4203
|
+
ae.value ? (o(), O("div", On, [y("div", kn, [k(p(xn), {
|
|
4204
4204
|
ref_key: "cropperRef",
|
|
4205
|
-
ref:
|
|
4206
|
-
src:
|
|
4205
|
+
ref: N,
|
|
4206
|
+
src: e.item.url,
|
|
4207
4207
|
"stencil-props": { aspectRatio: oe.value },
|
|
4208
4208
|
class: "tpl:h-full tpl:w-full",
|
|
4209
4209
|
"background-class": "tpl-cropper-background",
|
|
4210
4210
|
onChange: ce,
|
|
4211
4211
|
onReady: le
|
|
4212
|
-
}, null, 8, ["src", "stencil-props"])]),
|
|
4213
|
-
|
|
4212
|
+
}, null, 8, ["src", "stencil-props"])]), y("div", An, [
|
|
4213
|
+
y("div", null, [y("label", jn, _(p(b).mediaLibrary.cropAspectRatio), 1), y("div", Mn, [(o(), O(g, null, i([
|
|
4214
4214
|
"free",
|
|
4215
4215
|
"square",
|
|
4216
4216
|
"landscape43",
|
|
4217
4217
|
"landscape169",
|
|
4218
4218
|
"original"
|
|
4219
|
-
], (e) =>
|
|
4219
|
+
], (e) => y("button", {
|
|
4220
4220
|
key: e,
|
|
4221
4221
|
type: "button",
|
|
4222
4222
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
4223
|
-
style:
|
|
4224
|
-
borderColor:
|
|
4225
|
-
backgroundColor:
|
|
4226
|
-
color:
|
|
4223
|
+
style: h({
|
|
4224
|
+
borderColor: P.value === e ? "var(--tpl-primary)" : "var(--tpl-border)",
|
|
4225
|
+
backgroundColor: P.value === e ? "var(--tpl-primary-light)" : "var(--tpl-bg)",
|
|
4226
|
+
color: P.value === e ? "var(--tpl-primary)" : "var(--tpl-text)"
|
|
4227
4227
|
}),
|
|
4228
|
-
onClick: (t) =>
|
|
4229
|
-
},
|
|
4230
|
-
|
|
4231
|
-
value:
|
|
4228
|
+
onClick: (t) => P.value = e
|
|
4229
|
+
}, _(p(E)[`crop${e.charAt(0).toUpperCase()}${e.slice(1)}`]), 13, Nn)), 64))])]),
|
|
4230
|
+
y("div", Pn, [y("div", Fn, [y("label", In, [d(_(p(b).mediaLibrary.cropMaxWidth) + " ", 1), y("span", Ln, _(p(b).mediaLibrary.cropOptional), 1)]), y("div", Rn, [y("input", {
|
|
4231
|
+
value: ne.value,
|
|
4232
4232
|
type: "number",
|
|
4233
4233
|
min: "1",
|
|
4234
4234
|
class: "tpl:w-full tpl:rounded-md tpl:border tpl:py-1.5 tpl:pr-8 tpl:pl-3 tpl:text-xs tpl:outline-none",
|
|
@@ -4239,8 +4239,8 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
|
|
|
4239
4239
|
},
|
|
4240
4240
|
placeholder: L.value?.width?.toString() || "",
|
|
4241
4241
|
onInput: ue
|
|
4242
|
-
}, null, 40, zn),
|
|
4243
|
-
value:
|
|
4242
|
+
}, null, 40, zn), y("span", Bn, _(p(b).mediaLibrary.cropPixels), 1)])]), y("div", Vn, [y("label", Hn, [d(_(p(b).mediaLibrary.cropMaxHeight) + " ", 1), y("span", Un, _(p(b).mediaLibrary.cropOptional), 1)]), y("div", Wn, [y("input", {
|
|
4243
|
+
value: F.value,
|
|
4244
4244
|
type: "number",
|
|
4245
4245
|
min: "1",
|
|
4246
4246
|
class: "tpl:w-full tpl:rounded-md tpl:border tpl:py-1.5 tpl:pr-8 tpl:pl-3 tpl:text-xs tpl:outline-none",
|
|
@@ -4251,11 +4251,11 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
|
|
|
4251
4251
|
},
|
|
4252
4252
|
placeholder: L.value?.height?.toString() || "",
|
|
4253
4253
|
onInput: de
|
|
4254
|
-
}, null, 40, Gn),
|
|
4255
|
-
se.value ? (
|
|
4256
|
-
])])) :
|
|
4257
|
-
|
|
4258
|
-
"onUpdate:modelValue":
|
|
4254
|
+
}, null, 40, Gn), y("span", Kn, _(p(b).mediaLibrary.cropPixels), 1)])])]),
|
|
4255
|
+
se.value ? (o(), O("div", qn, [y("span", null, _(p(b).mediaLibrary.cropOutputSize) + ": ", 1), y("span", Jn, _(se.value.width) + " x " + _(se.value.height) + " " + _(p(b).mediaLibrary.cropPixels), 1)])) : u("", !0)
|
|
4256
|
+
])])) : u("", !0),
|
|
4257
|
+
y("div", Yn, [y("label", Xn, _(p(b).mediaLibrary.fileName), 1), n(y("input", {
|
|
4258
|
+
"onUpdate:modelValue": r[0] ||= (e) => j.value = e,
|
|
4259
4259
|
type: "text",
|
|
4260
4260
|
class: "tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:outline-none",
|
|
4261
4261
|
style: {
|
|
@@ -4264,9 +4264,9 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
|
|
|
4264
4264
|
color: "var(--tpl-text)"
|
|
4265
4265
|
},
|
|
4266
4266
|
autofocus: !ae.value
|
|
4267
|
-
}, null, 8, Zn), [[
|
|
4268
|
-
|
|
4269
|
-
"onUpdate:modelValue":
|
|
4267
|
+
}, null, 8, Zn), [[f, j.value]])]),
|
|
4268
|
+
p(A)(e.item.mime_type) ? (o(), O("div", Qn, [y("label", $n, _(p(b).mediaLibrary.altText), 1), n(y("input", {
|
|
4269
|
+
"onUpdate:modelValue": r[1] ||= (e) => M.value = e,
|
|
4270
4270
|
type: "text",
|
|
4271
4271
|
class: "tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:outline-none",
|
|
4272
4272
|
style: {
|
|
@@ -4274,24 +4274,24 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
|
|
|
4274
4274
|
"background-color": "var(--tpl-bg)",
|
|
4275
4275
|
color: "var(--tpl-text)"
|
|
4276
4276
|
},
|
|
4277
|
-
placeholder:
|
|
4278
|
-
}, null, 8, er), [[
|
|
4277
|
+
placeholder: p(b).mediaLibrary.altTextPlaceholder
|
|
4278
|
+
}, null, 8, er), [[f, M.value]])])) : u("", !0)
|
|
4279
4279
|
]),
|
|
4280
|
-
|
|
4280
|
+
y("div", tr, [y("button", {
|
|
4281
4281
|
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",
|
|
4282
4282
|
style: {
|
|
4283
4283
|
"border-color": "var(--tpl-border)",
|
|
4284
4284
|
color: "var(--tpl-text)",
|
|
4285
4285
|
"background-color": "var(--tpl-bg)"
|
|
4286
4286
|
},
|
|
4287
|
-
onClick:
|
|
4288
|
-
},
|
|
4287
|
+
onClick: r[2] ||= (e) => l("close")
|
|
4288
|
+
}, _(p(b).mediaLibrary.cancel), 1), y("button", {
|
|
4289
4289
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:text-white tpl:transition-all tpl:duration-150 tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50",
|
|
4290
4290
|
style: { background: "linear-gradient(\n 135deg,\n var(--tpl-primary),\n var(--tpl-primary-hover)\n )" },
|
|
4291
4291
|
disabled: R.value,
|
|
4292
4292
|
onClick: fe
|
|
4293
|
-
},
|
|
4294
|
-
], 2)], 40, wn)) :
|
|
4293
|
+
}, _(R.value ? p(b).mediaLibrary.saving : p(b).mediaLibrary.saveChanges), 9, nr)])
|
|
4294
|
+
], 2)], 40, wn)) : u("", !0)]),
|
|
4295
4295
|
_: 1
|
|
4296
4296
|
})]));
|
|
4297
4297
|
}
|
|
@@ -4304,7 +4304,7 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
|
|
|
4304
4304
|
}, or = {
|
|
4305
4305
|
key: 3,
|
|
4306
4306
|
class: "tpl:flex tpl:shrink-0 tpl:items-center tpl:gap-0.5 tpl:opacity-0 tpl:transition-opacity tpl:group-hover:opacity-100"
|
|
4307
|
-
}, sr = ["title"], cr = ["title"], lr = { key: 0 }, ur = ["placeholder"], dr = 5, fr = /* @__PURE__ */
|
|
4307
|
+
}, sr = ["title"], cr = ["title"], lr = { key: 0 }, ur = ["placeholder"], dr = 5, fr = /* @__PURE__ */ e({
|
|
4308
4308
|
__name: "MediaFolderTreeNode",
|
|
4309
4309
|
props: {
|
|
4310
4310
|
folder: {},
|
|
@@ -4317,64 +4317,64 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
|
|
|
4317
4317
|
"renameFolder",
|
|
4318
4318
|
"deleteFolder"
|
|
4319
4319
|
],
|
|
4320
|
-
setup(
|
|
4321
|
-
let
|
|
4320
|
+
setup(e, { emit: t }) {
|
|
4321
|
+
let r = e, a = t, { t: c } = z(), l = T(!1), d = T(!1), b = T(""), x = T(!1), C = T(""), w = S(() => (r.folder.children?.length ?? 0) > 0), A = S(() => r.depth < dr - 1), j = S(() => r.currentFolderId === r.folder.id), M = S(() => !r.currentFolderId || !r.folder.children ? !1 : P(r.folder.children, r.currentFolderId)), N = S(() => l.value || M.value);
|
|
4322
4322
|
function P(e, t) {
|
|
4323
4323
|
for (let n of e) if (n.id === t || n.children && P(n.children, t)) return !0;
|
|
4324
4324
|
return !1;
|
|
4325
4325
|
}
|
|
4326
|
-
function
|
|
4326
|
+
function ee() {
|
|
4327
4327
|
l.value = !l.value;
|
|
4328
4328
|
}
|
|
4329
|
-
function
|
|
4330
|
-
|
|
4329
|
+
function ne() {
|
|
4330
|
+
d.value = !0, b.value = r.folder.name;
|
|
4331
4331
|
}
|
|
4332
4332
|
function I() {
|
|
4333
|
-
let e =
|
|
4334
|
-
e && e !==
|
|
4335
|
-
}
|
|
4336
|
-
function ne() {
|
|
4337
|
-
u.value = !1, d.value = "";
|
|
4333
|
+
let e = b.value.trim();
|
|
4334
|
+
e && e !== r.folder.name && a("renameFolder", r.folder.id, e), d.value = !1, b.value = "";
|
|
4338
4335
|
}
|
|
4339
4336
|
function L() {
|
|
4340
|
-
|
|
4341
|
-
}
|
|
4342
|
-
function re() {
|
|
4343
|
-
y.value.trim() && a("createFolder", y.value.trim(), i.folder.id), g.value = !1, y.value = "";
|
|
4337
|
+
d.value = !1, b.value = "";
|
|
4344
4338
|
}
|
|
4345
4339
|
function R() {
|
|
4346
|
-
|
|
4340
|
+
x.value = !0, C.value = "", l.value = !0;
|
|
4347
4341
|
}
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4342
|
+
function ie() {
|
|
4343
|
+
C.value.trim() && a("createFolder", C.value.trim(), r.folder.id), x.value = !1, C.value = "";
|
|
4344
|
+
}
|
|
4345
|
+
function ae() {
|
|
4346
|
+
x.value = !1, C.value = "";
|
|
4347
|
+
}
|
|
4348
|
+
return (t, r) => {
|
|
4349
|
+
let l = s("MediaFolderTreeNode", !0);
|
|
4350
|
+
return o(), O("div", null, [y("div", {
|
|
4351
4351
|
class: "tpl:group tpl:flex tpl:w-full tpl:items-center tpl:gap-1 tpl:py-1.5 tpl:pr-2 tpl:text-left tpl:text-xs tpl:transition-all tpl:duration-150",
|
|
4352
|
-
style:
|
|
4353
|
-
paddingLeft: `${
|
|
4352
|
+
style: h({
|
|
4353
|
+
paddingLeft: `${e.depth * 16 + 8}px`,
|
|
4354
4354
|
backgroundColor: j.value ? "var(--tpl-bg-active)" : "transparent",
|
|
4355
4355
|
color: j.value ? "var(--tpl-primary)" : "var(--tpl-text)"
|
|
4356
4356
|
})
|
|
4357
4357
|
}, [
|
|
4358
|
-
|
|
4358
|
+
w.value || x.value ? (o(), O("button", {
|
|
4359
4359
|
key: 0,
|
|
4360
4360
|
class: "tpl:flex tpl:size-4 tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
|
|
4361
|
-
onClick:
|
|
4362
|
-
}, [
|
|
4363
|
-
class:
|
|
4361
|
+
onClick: m(ee, ["stop"])
|
|
4362
|
+
}, [k(p(re), {
|
|
4363
|
+
class: D(["tpl:transition-transform tpl:duration-150", { "tpl:rotate-90": N.value }]),
|
|
4364
4364
|
size: 10,
|
|
4365
4365
|
"stroke-width": 2
|
|
4366
|
-
}, null, 8, ["class"])])) : (
|
|
4367
|
-
|
|
4366
|
+
}, null, 8, ["class"])])) : (o(), O("span", ir)),
|
|
4367
|
+
y("button", {
|
|
4368
4368
|
class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:items-center tpl:gap-1.5",
|
|
4369
|
-
onClick:
|
|
4370
|
-
}, [
|
|
4369
|
+
onClick: r[0] ||= (t) => a("navigate", e.folder.id)
|
|
4370
|
+
}, [k(p(de), {
|
|
4371
4371
|
class: "tpl:shrink-0",
|
|
4372
4372
|
size: 14,
|
|
4373
4373
|
"stroke-width": 1.5
|
|
4374
|
-
}),
|
|
4375
|
-
|
|
4374
|
+
}), d.value ? u("", !0) : (o(), O("span", ar, _(e.folder.name), 1))]),
|
|
4375
|
+
d.value ? n((o(), O("input", {
|
|
4376
4376
|
key: 2,
|
|
4377
|
-
"onUpdate:modelValue":
|
|
4377
|
+
"onUpdate:modelValue": r[1] ||= (e) => b.value = e,
|
|
4378
4378
|
type: "text",
|
|
4379
4379
|
class: "tpl:min-w-0 tpl:flex-1 tpl:rounded tpl:border tpl:px-1.5 tpl:py-0.5 tpl:text-xs tpl:outline-none",
|
|
4380
4380
|
style: {
|
|
@@ -4383,56 +4383,56 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
|
|
|
4383
4383
|
color: "var(--tpl-text)"
|
|
4384
4384
|
},
|
|
4385
4385
|
autofocus: "",
|
|
4386
|
-
onKeydown: [
|
|
4386
|
+
onKeydown: [E(I, ["enter"]), E(L, ["escape"])],
|
|
4387
4387
|
onBlur: I,
|
|
4388
|
-
onClick:
|
|
4389
|
-
}, null, 544)), [[
|
|
4390
|
-
|
|
4391
|
-
A.value ? (
|
|
4388
|
+
onClick: r[2] ||= m(() => {}, ["stop"])
|
|
4389
|
+
}, null, 544)), [[f, b.value]]) : u("", !0),
|
|
4390
|
+
d.value ? u("", !0) : (o(), O("span", or, [
|
|
4391
|
+
A.value ? (o(), O("button", {
|
|
4392
4392
|
key: 0,
|
|
4393
4393
|
class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
|
|
4394
|
-
title:
|
|
4395
|
-
onClick:
|
|
4396
|
-
}, [
|
|
4394
|
+
title: p(c).mediaLibrary.addSubfolder,
|
|
4395
|
+
onClick: m(R, ["stop"])
|
|
4396
|
+
}, [k(p(me), {
|
|
4397
4397
|
size: 12,
|
|
4398
4398
|
"stroke-width": 2
|
|
4399
|
-
})], 8, sr)) :
|
|
4400
|
-
|
|
4399
|
+
})], 8, sr)) : u("", !0),
|
|
4400
|
+
y("button", {
|
|
4401
4401
|
class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
|
|
4402
|
-
title:
|
|
4403
|
-
onClick:
|
|
4404
|
-
}, [
|
|
4402
|
+
title: p(c).mediaLibrary.renameFolder,
|
|
4403
|
+
onClick: m(ne, ["stop"])
|
|
4404
|
+
}, [k(p(F), {
|
|
4405
4405
|
size: 12,
|
|
4406
4406
|
"stroke-width": 2
|
|
4407
4407
|
})], 8, cr),
|
|
4408
|
-
|
|
4408
|
+
y("button", {
|
|
4409
4409
|
class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
|
|
4410
|
-
onClick:
|
|
4411
|
-
}, [
|
|
4410
|
+
onClick: r[3] ||= m((t) => a("deleteFolder", e.folder.id), ["stop"])
|
|
4411
|
+
}, [k(p(te), {
|
|
4412
4412
|
size: 12,
|
|
4413
4413
|
"stroke-width": 2,
|
|
4414
4414
|
style: { color: "var(--tpl-danger)" }
|
|
4415
4415
|
})])
|
|
4416
4416
|
]))
|
|
4417
|
-
], 4), N.value ? (
|
|
4418
|
-
key:
|
|
4419
|
-
folder:
|
|
4420
|
-
"current-folder-id":
|
|
4421
|
-
depth:
|
|
4422
|
-
onNavigate:
|
|
4423
|
-
onCreateFolder:
|
|
4424
|
-
onRenameFolder:
|
|
4425
|
-
onDeleteFolder:
|
|
4417
|
+
], 4), N.value ? (o(), O("div", lr, [(o(!0), O(g, null, i(e.folder.children, (t) => (o(), v(l, {
|
|
4418
|
+
key: t.id,
|
|
4419
|
+
folder: t,
|
|
4420
|
+
"current-folder-id": e.currentFolderId,
|
|
4421
|
+
depth: e.depth + 1,
|
|
4422
|
+
onNavigate: r[4] ||= (e) => a("navigate", e),
|
|
4423
|
+
onCreateFolder: r[5] ||= (e, t) => a("createFolder", e, t),
|
|
4424
|
+
onRenameFolder: r[6] ||= (e, t) => a("renameFolder", e, t),
|
|
4425
|
+
onDeleteFolder: r[7] ||= (e) => a("deleteFolder", e)
|
|
4426
4426
|
}, null, 8, [
|
|
4427
4427
|
"folder",
|
|
4428
4428
|
"current-folder-id",
|
|
4429
4429
|
"depth"
|
|
4430
|
-
]))), 128)),
|
|
4430
|
+
]))), 128)), x.value ? (o(), O("div", {
|
|
4431
4431
|
key: 0,
|
|
4432
|
-
style:
|
|
4432
|
+
style: h({ paddingLeft: `${(e.depth + 1) * 16 + 8}px` }),
|
|
4433
4433
|
class: "tpl:py-1.5 tpl:pr-2"
|
|
4434
|
-
}, [
|
|
4435
|
-
"onUpdate:modelValue":
|
|
4434
|
+
}, [n(y("input", {
|
|
4435
|
+
"onUpdate:modelValue": r[8] ||= (e) => C.value = e,
|
|
4436
4436
|
type: "text",
|
|
4437
4437
|
class: "tpl:w-full tpl:rounded tpl:border tpl:px-2 tpl:py-1 tpl:text-xs tpl:outline-none",
|
|
4438
4438
|
style: {
|
|
@@ -4440,17 +4440,17 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
|
|
|
4440
4440
|
"background-color": "var(--tpl-bg)",
|
|
4441
4441
|
color: "var(--tpl-text)"
|
|
4442
4442
|
},
|
|
4443
|
-
placeholder:
|
|
4443
|
+
placeholder: p(c).mediaLibrary.subfolderName,
|
|
4444
4444
|
autofocus: "",
|
|
4445
|
-
onKeydown: [
|
|
4446
|
-
onBlur:
|
|
4447
|
-
}, null, 40, ur), [[
|
|
4445
|
+
onKeydown: [E(ie, ["enter"]), E(ae, ["escape"])],
|
|
4446
|
+
onBlur: ie
|
|
4447
|
+
}, null, 40, ur), [[f, C.value]])], 4)) : u("", !0)])) : u("", !0)]);
|
|
4448
4448
|
};
|
|
4449
4449
|
}
|
|
4450
4450
|
}), pr = { class: "tpl:flex tpl:h-full tpl:flex-col tpl:overflow-y-auto" }, mr = {
|
|
4451
4451
|
key: 0,
|
|
4452
4452
|
class: "tpl:px-3 tpl:py-2"
|
|
4453
|
-
}, hr = ["placeholder"], gr = /* @__PURE__ */
|
|
4453
|
+
}, hr = ["placeholder"], gr = /* @__PURE__ */ e({
|
|
4454
4454
|
__name: "MediaFolderTree",
|
|
4455
4455
|
props: {
|
|
4456
4456
|
folders: {},
|
|
@@ -4465,41 +4465,41 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
|
|
|
4465
4465
|
"deleteFolder",
|
|
4466
4466
|
"showFrequentlyUsed"
|
|
4467
4467
|
],
|
|
4468
|
-
setup(
|
|
4469
|
-
let
|
|
4468
|
+
setup(e, { emit: t }) {
|
|
4469
|
+
let r = t, { t: a } = z(), s = T(!1), c = T("");
|
|
4470
4470
|
function l() {
|
|
4471
|
-
|
|
4471
|
+
s.value = !0, c.value = "";
|
|
4472
4472
|
}
|
|
4473
|
-
function
|
|
4474
|
-
|
|
4473
|
+
function m() {
|
|
4474
|
+
c.value.trim() && r("createFolder", c.value.trim()), s.value = !1, c.value = "";
|
|
4475
4475
|
}
|
|
4476
|
-
function
|
|
4477
|
-
|
|
4476
|
+
function b() {
|
|
4477
|
+
s.value = !1, c.value = "";
|
|
4478
4478
|
}
|
|
4479
|
-
return (
|
|
4480
|
-
|
|
4479
|
+
return (t, x) => (o(), O("div", pr, [
|
|
4480
|
+
y("button", {
|
|
4481
4481
|
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",
|
|
4482
|
-
style:
|
|
4483
|
-
backgroundColor:
|
|
4484
|
-
color:
|
|
4482
|
+
style: h({
|
|
4483
|
+
backgroundColor: e.viewMode === "files" && e.currentFolderId === null ? "var(--tpl-bg-active)" : "transparent",
|
|
4484
|
+
color: e.viewMode === "files" && e.currentFolderId === null ? "var(--tpl-primary)" : "var(--tpl-text)"
|
|
4485
4485
|
}),
|
|
4486
|
-
onClick:
|
|
4487
|
-
}, [
|
|
4486
|
+
onClick: x[0] ||= (e) => r("navigate", null)
|
|
4487
|
+
}, [k(p(_e), {
|
|
4488
4488
|
size: 14,
|
|
4489
4489
|
"stroke-width": 1.5
|
|
4490
|
-
}),
|
|
4491
|
-
(
|
|
4492
|
-
key:
|
|
4493
|
-
folder:
|
|
4494
|
-
"current-folder-id":
|
|
4490
|
+
}), d(" " + _(p(a).mediaLibrary.allFiles), 1)], 4),
|
|
4491
|
+
(o(!0), O(g, null, i(e.folders, (t) => (o(), v(fr, {
|
|
4492
|
+
key: t.id,
|
|
4493
|
+
folder: t,
|
|
4494
|
+
"current-folder-id": e.currentFolderId,
|
|
4495
4495
|
depth: 0,
|
|
4496
|
-
onNavigate:
|
|
4497
|
-
onCreateFolder:
|
|
4498
|
-
onRenameFolder:
|
|
4499
|
-
onDeleteFolder:
|
|
4496
|
+
onNavigate: x[1] ||= (e) => r("navigate", e),
|
|
4497
|
+
onCreateFolder: x[2] ||= (e, t) => r("createFolder", e, t),
|
|
4498
|
+
onRenameFolder: x[3] ||= (e, t) => r("renameFolder", e, t),
|
|
4499
|
+
onDeleteFolder: x[4] ||= (e) => r("deleteFolder", e)
|
|
4500
4500
|
}, null, 8, ["folder", "current-folder-id"]))), 128)),
|
|
4501
|
-
|
|
4502
|
-
"onUpdate:modelValue":
|
|
4501
|
+
s.value ? (o(), O("div", mr, [n(y("input", {
|
|
4502
|
+
"onUpdate:modelValue": x[5] ||= (e) => c.value = e,
|
|
4503
4503
|
type: "text",
|
|
4504
4504
|
class: "tpl:w-full tpl:rounded tpl:border tpl:px-2 tpl:py-1 tpl:text-xs tpl:outline-none",
|
|
4505
4505
|
style: {
|
|
@@ -4507,37 +4507,37 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
|
|
|
4507
4507
|
"background-color": "var(--tpl-bg)",
|
|
4508
4508
|
color: "var(--tpl-text)"
|
|
4509
4509
|
},
|
|
4510
|
-
placeholder:
|
|
4510
|
+
placeholder: p(a).mediaLibrary.folderName,
|
|
4511
4511
|
autofocus: "",
|
|
4512
|
-
onKeydown: [
|
|
4513
|
-
onBlur:
|
|
4514
|
-
}, null, 40, hr), [[
|
|
4515
|
-
|
|
4512
|
+
onKeydown: [E(m, ["enter"]), E(b, ["escape"])],
|
|
4513
|
+
onBlur: m
|
|
4514
|
+
}, null, 40, hr), [[f, c.value]])])) : u("", !0),
|
|
4515
|
+
s.value ? u("", !0) : (o(), O("button", {
|
|
4516
4516
|
key: 1,
|
|
4517
4517
|
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",
|
|
4518
4518
|
style: { color: "var(--tpl-text-muted)" },
|
|
4519
4519
|
onClick: l
|
|
4520
|
-
}, [
|
|
4520
|
+
}, [k(p(me), {
|
|
4521
4521
|
size: 14,
|
|
4522
4522
|
"stroke-width": 1.5
|
|
4523
|
-
}),
|
|
4524
|
-
|
|
4525
|
-
|
|
4523
|
+
}), d(" " + _(p(a).mediaLibrary.newFolder), 1)])),
|
|
4524
|
+
x[7] ||= y("div", { class: "tpl:flex-1" }, null, -1),
|
|
4525
|
+
e.hasFrequentlyUsed ? (o(), O("button", {
|
|
4526
4526
|
key: 2,
|
|
4527
4527
|
class: "tpl:flex tpl:w-full tpl:items-center tpl:gap-2 tpl:border-t tpl:px-3 tpl:py-2 tpl:text-left tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
4528
|
-
style:
|
|
4528
|
+
style: h({
|
|
4529
4529
|
borderColor: "var(--tpl-border)",
|
|
4530
|
-
backgroundColor:
|
|
4531
|
-
color:
|
|
4530
|
+
backgroundColor: e.viewMode === "frequently-used" ? "var(--tpl-bg-active)" : "transparent",
|
|
4531
|
+
color: e.viewMode === "frequently-used" ? "var(--tpl-primary)" : "var(--tpl-text)"
|
|
4532
4532
|
}),
|
|
4533
|
-
onClick:
|
|
4534
|
-
}, [
|
|
4533
|
+
onClick: x[6] ||= (e) => r("showFrequentlyUsed")
|
|
4534
|
+
}, [k(p(ve), {
|
|
4535
4535
|
size: 14,
|
|
4536
4536
|
"stroke-width": 1.5
|
|
4537
|
-
}),
|
|
4537
|
+
}), d(" " + _(p(a).mediaLibrary.frequentlyUsed), 1)], 4)) : u("", !0)
|
|
4538
4538
|
]));
|
|
4539
4539
|
}
|
|
4540
|
-
}), _r = { class: "tpl:flex tpl:aspect-square tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2" }, vr = /* @__PURE__ */
|
|
4540
|
+
}), _r = { class: "tpl:flex tpl:aspect-square tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2" }, vr = /* @__PURE__ */ e({
|
|
4541
4541
|
__name: "MediaFileIcon",
|
|
4542
4542
|
props: { mimeType: {} },
|
|
4543
4543
|
setup(e) {
|
|
@@ -4637,8 +4637,8 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
|
|
|
4637
4637
|
color: "#6b7280",
|
|
4638
4638
|
bgColor: "#f9fafb",
|
|
4639
4639
|
icon: "document"
|
|
4640
|
-
}, i =
|
|
4641
|
-
return (e, t) => (
|
|
4640
|
+
}, i = S(() => n[t.mimeType] ?? r);
|
|
4641
|
+
return (e, t) => (o(), O("div", _r, [i.value.icon === "document" ? (o(), O("svg", {
|
|
4642
4642
|
key: 0,
|
|
4643
4643
|
width: "60",
|
|
4644
4644
|
height: "60",
|
|
@@ -4646,23 +4646,23 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
|
|
|
4646
4646
|
fill: "none",
|
|
4647
4647
|
stroke: "currentColor",
|
|
4648
4648
|
"stroke-width": "1.5",
|
|
4649
|
-
style:
|
|
4649
|
+
style: h({ color: i.value.color })
|
|
4650
4650
|
}, [...t[0] ||= [
|
|
4651
|
-
|
|
4652
|
-
|
|
4653
|
-
|
|
4651
|
+
y("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }, null, -1),
|
|
4652
|
+
y("polyline", { points: "14 2 14 8 20 8" }, null, -1),
|
|
4653
|
+
y("line", {
|
|
4654
4654
|
x1: "8",
|
|
4655
4655
|
y1: "13",
|
|
4656
4656
|
x2: "16",
|
|
4657
4657
|
y2: "13"
|
|
4658
4658
|
}, null, -1),
|
|
4659
|
-
|
|
4659
|
+
y("line", {
|
|
4660
4660
|
x1: "8",
|
|
4661
4661
|
y1: "17",
|
|
4662
4662
|
x2: "12",
|
|
4663
4663
|
y2: "17"
|
|
4664
4664
|
}, null, -1)
|
|
4665
|
-
]], 4)) : i.value.icon === "video" ? (
|
|
4665
|
+
]], 4)) : i.value.icon === "video" ? (o(), O("svg", {
|
|
4666
4666
|
key: 1,
|
|
4667
4667
|
width: "40",
|
|
4668
4668
|
height: "40",
|
|
@@ -4670,18 +4670,18 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
|
|
|
4670
4670
|
fill: "none",
|
|
4671
4671
|
stroke: "currentColor",
|
|
4672
4672
|
"stroke-width": "1.5",
|
|
4673
|
-
style:
|
|
4674
|
-
}, [...t[1] ||= [
|
|
4673
|
+
style: h({ color: i.value.color })
|
|
4674
|
+
}, [...t[1] ||= [y("rect", {
|
|
4675
4675
|
x: "2",
|
|
4676
4676
|
y: "4",
|
|
4677
4677
|
width: "20",
|
|
4678
4678
|
height: "16",
|
|
4679
4679
|
rx: "2"
|
|
4680
|
-
}, null, -1),
|
|
4680
|
+
}, null, -1), y("polygon", {
|
|
4681
4681
|
points: "10,8 16,12 10,16",
|
|
4682
4682
|
fill: "currentColor",
|
|
4683
4683
|
stroke: "none"
|
|
4684
|
-
}, null, -1)]], 4)) : (
|
|
4684
|
+
}, null, -1)]], 4)) : (o(), O("svg", {
|
|
4685
4685
|
key: 2,
|
|
4686
4686
|
width: "40",
|
|
4687
4687
|
height: "40",
|
|
@@ -4689,23 +4689,23 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
|
|
|
4689
4689
|
fill: "none",
|
|
4690
4690
|
stroke: "currentColor",
|
|
4691
4691
|
"stroke-width": "1.5",
|
|
4692
|
-
style:
|
|
4692
|
+
style: h({ color: i.value.color })
|
|
4693
4693
|
}, [...t[2] ||= [
|
|
4694
|
-
|
|
4695
|
-
|
|
4694
|
+
y("path", { d: "M9 18V5l12-2v13" }, null, -1),
|
|
4695
|
+
y("circle", {
|
|
4696
4696
|
cx: "6",
|
|
4697
4697
|
cy: "18",
|
|
4698
4698
|
r: "3"
|
|
4699
4699
|
}, null, -1),
|
|
4700
|
-
|
|
4700
|
+
y("circle", {
|
|
4701
4701
|
cx: "18",
|
|
4702
4702
|
cy: "16",
|
|
4703
4703
|
r: "3"
|
|
4704
4704
|
}, null, -1)
|
|
4705
|
-
]], 4)),
|
|
4705
|
+
]], 4)), y("span", {
|
|
4706
4706
|
class: "tpl:text-xs tpl:font-bold tpl:tracking-wider",
|
|
4707
|
-
style:
|
|
4708
|
-
},
|
|
4707
|
+
style: h({ color: i.value.color })
|
|
4708
|
+
}, _(i.value.label), 5)]));
|
|
4709
4709
|
}
|
|
4710
4710
|
}), yr = { class: "tpl:p-4" }, br = {
|
|
4711
4711
|
key: 1,
|
|
@@ -4748,7 +4748,7 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
|
|
|
4748
4748
|
}, Kr = {
|
|
4749
4749
|
key: 4,
|
|
4750
4750
|
class: "tpl:flex tpl:justify-center tpl:py-4"
|
|
4751
|
-
}, qr = /* @__PURE__ */
|
|
4751
|
+
}, qr = /* @__PURE__ */ oe(/* @__PURE__ */ e({
|
|
4752
4752
|
__name: "MediaGrid",
|
|
4753
4753
|
props: {
|
|
4754
4754
|
items: {},
|
|
@@ -4765,133 +4765,133 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
|
|
|
4765
4765
|
"edit",
|
|
4766
4766
|
"replace"
|
|
4767
4767
|
],
|
|
4768
|
-
setup(
|
|
4769
|
-
let
|
|
4770
|
-
function
|
|
4771
|
-
return !
|
|
4768
|
+
setup(e, { emit: t }) {
|
|
4769
|
+
let n = e, r = t, { isAcceptedMimeType: a, isImageMimeType: s } = Ee();
|
|
4770
|
+
function c(e) {
|
|
4771
|
+
return !n.accept || n.accept.length === 0 ? !0 : a(e.mime_type, n.accept);
|
|
4772
4772
|
}
|
|
4773
|
-
function
|
|
4774
|
-
|
|
4773
|
+
function l(e) {
|
|
4774
|
+
r("select", e);
|
|
4775
4775
|
}
|
|
4776
|
-
let { t:
|
|
4777
|
-
|
|
4778
|
-
e &&
|
|
4776
|
+
let { t: f } = z(), b = T(null);
|
|
4777
|
+
I(b, ([{ isIntersecting: e }]) => {
|
|
4778
|
+
e && n.hasMore && !n.isLoading && r("loadMore");
|
|
4779
4779
|
}, { threshold: .1 });
|
|
4780
|
-
function
|
|
4780
|
+
function x(e) {
|
|
4781
4781
|
return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
|
|
4782
4782
|
}
|
|
4783
|
-
function
|
|
4783
|
+
function S(e) {
|
|
4784
4784
|
return new Date(e).toLocaleDateString(void 0, {
|
|
4785
4785
|
year: "numeric",
|
|
4786
4786
|
month: "short",
|
|
4787
4787
|
day: "numeric"
|
|
4788
4788
|
});
|
|
4789
4789
|
}
|
|
4790
|
-
return (
|
|
4791
|
-
|
|
4790
|
+
return (t, n) => (o(), O("div", yr, [
|
|
4791
|
+
e.isLoading && e.items.length === 0 ? (o(), O("div", {
|
|
4792
4792
|
key: 0,
|
|
4793
|
-
class:
|
|
4794
|
-
}, [(
|
|
4795
|
-
key:
|
|
4796
|
-
class:
|
|
4793
|
+
class: D(e.layout === "list" ? "tpl:flex tpl:flex-col tpl:gap-1" : "tpl:grid tpl:grid-cols-4 tpl:gap-3")
|
|
4794
|
+
}, [(o(), O(g, null, i(8, (t) => y("div", {
|
|
4795
|
+
key: t,
|
|
4796
|
+
class: D(["tpl-pulse tpl:rounded-lg", e.layout === "list" ? "tpl:h-12" : "tpl:aspect-square"]),
|
|
4797
4797
|
style: { "background-color": "var(--tpl-bg-hover)" }
|
|
4798
|
-
}, null, 2)), 64))], 2)) :
|
|
4798
|
+
}, null, 2)), 64))], 2)) : e.items.length === 0 ? (o(), O("div", br, [k(p(_e), {
|
|
4799
4799
|
class: "tpl:mb-3",
|
|
4800
4800
|
size: 40,
|
|
4801
4801
|
"stroke-width": 1,
|
|
4802
4802
|
style: { color: "var(--tpl-text-dim)" }
|
|
4803
|
-
}),
|
|
4804
|
-
key:
|
|
4805
|
-
class:
|
|
4806
|
-
style:
|
|
4807
|
-
onClick: (
|
|
4803
|
+
}), y("p", xr, _(p(f).mediaLibrary.noFiles), 1)])) : e.layout === "list" ? (o(), O("div", Pr, [(o(!0), O(g, null, i(e.items, (t) => (o(), O("div", {
|
|
4804
|
+
key: t.id,
|
|
4805
|
+
class: D(["tpl-media-list-item tpl:group tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-3 tpl:rounded-lg tpl:px-3 tpl:py-2 tpl:transition-all tpl:duration-150", [!c(t) && !e.selectedIds.has(t.id) ? "tpl:opacity-60" : ""]]),
|
|
4806
|
+
style: h({ backgroundColor: e.selectedIds.has(t.id) ? "var(--tpl-bg-hover)" : "transparent" }),
|
|
4807
|
+
onClick: (e) => l(t)
|
|
4808
4808
|
}, [
|
|
4809
|
-
|
|
4809
|
+
y("div", Ir, [p(s)(t.mime_type) ? (o(), O("img", {
|
|
4810
4810
|
key: 0,
|
|
4811
|
-
src:
|
|
4812
|
-
alt:
|
|
4811
|
+
src: t.small_url || t.url,
|
|
4812
|
+
alt: t.filename,
|
|
4813
4813
|
class: "tpl:size-full tpl:object-cover",
|
|
4814
4814
|
loading: "lazy"
|
|
4815
|
-
}, null, 8, Lr)) : (
|
|
4816
|
-
|
|
4817
|
-
|
|
4815
|
+
}, null, 8, Lr)) : (o(), O("div", Rr, [k(vr, { "mime-type": t.mime_type }, null, 8, ["mime-type"])]))]),
|
|
4816
|
+
y("div", zr, [y("p", Br, _(t.filename), 1), y("p", Vr, [d(_(x(t.size)) + " · " + _(S(t.created_at)) + " ", 1), p(s)(t.mime_type) && t.width && t.height ? (o(), O(g, { key: 0 }, [d(" · " + _(t.width) + "×" + _(t.height), 1)], 64)) : u("", !0)])]),
|
|
4817
|
+
y("div", Hr, [y("button", {
|
|
4818
4818
|
class: "tpl:flex tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded",
|
|
4819
4819
|
style: { color: "var(--tpl-text-muted)" },
|
|
4820
|
-
title:
|
|
4821
|
-
onClick:
|
|
4822
|
-
}, [
|
|
4820
|
+
title: p(f).mediaLibrary.editFile,
|
|
4821
|
+
onClick: m((e) => r("edit", t), ["stop"])
|
|
4822
|
+
}, [k(p(F), {
|
|
4823
4823
|
size: 12,
|
|
4824
4824
|
"stroke-width": 2
|
|
4825
|
-
})], 8, Ur),
|
|
4825
|
+
})], 8, Ur), y("button", {
|
|
4826
4826
|
class: "tpl:flex tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded",
|
|
4827
4827
|
style: { color: "var(--tpl-text-muted)" },
|
|
4828
|
-
title:
|
|
4829
|
-
onClick:
|
|
4830
|
-
}, [
|
|
4828
|
+
title: p(f).mediaLibrary.replaceFile,
|
|
4829
|
+
onClick: m((e) => r("replace", t), ["stop"])
|
|
4830
|
+
}, [k(p(ae), {
|
|
4831
4831
|
size: 12,
|
|
4832
4832
|
"stroke-width": 2
|
|
4833
4833
|
})], 8, Wr)]),
|
|
4834
|
-
|
|
4834
|
+
e.selectedIds.has(t.id) ? (o(), O("div", Gr, [k(p(M), {
|
|
4835
4835
|
size: 12,
|
|
4836
4836
|
"stroke-width": 3
|
|
4837
|
-
})])) :
|
|
4838
|
-
], 14, Fr))), 128))])) : (
|
|
4839
|
-
key:
|
|
4840
|
-
class:
|
|
4837
|
+
})])) : u("", !0)
|
|
4838
|
+
], 14, Fr))), 128))])) : (o(), O("div", Sr, [(o(!0), O(g, null, i(e.items, (t) => (o(), O("div", {
|
|
4839
|
+
key: t.id,
|
|
4840
|
+
class: D(["tpl-media-item tpl:group tpl:relative tpl:overflow-hidden tpl:rounded-lg tpl:border-2 tpl:transition-all tpl:duration-150", [
|
|
4841
4841
|
"tpl:cursor-pointer",
|
|
4842
|
-
!
|
|
4843
|
-
|
|
4842
|
+
!c(t) && !e.selectedIds.has(t.id) ? "tpl:opacity-60" : "",
|
|
4843
|
+
e.selectedIds.has(t.id) ? "tpl-media-item--selected" : ""
|
|
4844
4844
|
]]),
|
|
4845
|
-
style:
|
|
4846
|
-
borderColor:
|
|
4847
|
-
backgroundColor: !
|
|
4845
|
+
style: h({
|
|
4846
|
+
borderColor: e.selectedIds.has(t.id) ? "var(--tpl-primary)" : "transparent",
|
|
4847
|
+
backgroundColor: !c(t) && !e.selectedIds.has(t.id) ? "var(--tpl-bg)" : "var(--tpl-bg-hover)"
|
|
4848
4848
|
}),
|
|
4849
|
-
onClick: (
|
|
4849
|
+
onClick: (e) => l(t)
|
|
4850
4850
|
}, [
|
|
4851
|
-
|
|
4851
|
+
y("div", wr, [p(s)(t.mime_type) ? (o(), O("img", {
|
|
4852
4852
|
key: 0,
|
|
4853
|
-
src:
|
|
4854
|
-
alt:
|
|
4853
|
+
src: t.small_url || t.url,
|
|
4854
|
+
alt: t.filename,
|
|
4855
4855
|
class: "tpl:size-full tpl:object-cover",
|
|
4856
4856
|
loading: "lazy"
|
|
4857
|
-
}, null, 8, Tr)) : (
|
|
4857
|
+
}, null, 8, Tr)) : (o(), v(vr, {
|
|
4858
4858
|
key: 1,
|
|
4859
|
-
"mime-type":
|
|
4859
|
+
"mime-type": t.mime_type
|
|
4860
4860
|
}, null, 8, ["mime-type"]))]),
|
|
4861
|
-
|
|
4862
|
-
|
|
4861
|
+
y("div", Er, [y("p", Dr, _(t.filename), 1), y("p", Or, [y("span", null, _(x(t.size)), 1), p(s)(t.mime_type) && t.width && t.height ? (o(), O("span", kr, _(t.width) + "×" + _(t.height), 1)) : u("", !0)])]),
|
|
4862
|
+
y("div", Ar, [y("button", {
|
|
4863
4863
|
class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded-full tpl:text-white",
|
|
4864
4864
|
style: { "background-color": "rgba(0, 0, 0, 0.6)" },
|
|
4865
|
-
title:
|
|
4866
|
-
onClick:
|
|
4867
|
-
}, [
|
|
4865
|
+
title: p(f).mediaLibrary.editFile,
|
|
4866
|
+
onClick: m((e) => r("edit", t), ["stop"])
|
|
4867
|
+
}, [k(p(F), {
|
|
4868
4868
|
size: 11,
|
|
4869
4869
|
"stroke-width": 2
|
|
4870
|
-
})], 8, jr),
|
|
4870
|
+
})], 8, jr), y("button", {
|
|
4871
4871
|
class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded-full tpl:text-white",
|
|
4872
4872
|
style: { "background-color": "rgba(0, 0, 0, 0.6)" },
|
|
4873
|
-
title:
|
|
4874
|
-
onClick:
|
|
4875
|
-
}, [
|
|
4873
|
+
title: p(f).mediaLibrary.replaceFile,
|
|
4874
|
+
onClick: m((e) => r("replace", t), ["stop"])
|
|
4875
|
+
}, [k(p(ae), {
|
|
4876
4876
|
size: 11,
|
|
4877
4877
|
"stroke-width": 2
|
|
4878
4878
|
})], 8, Mr)]),
|
|
4879
|
-
|
|
4879
|
+
e.selectedIds.has(t.id) ? (o(), O("div", Nr, [k(p(M), {
|
|
4880
4880
|
size: 12,
|
|
4881
4881
|
"stroke-width": 3
|
|
4882
|
-
})])) :
|
|
4882
|
+
})])) : u("", !0)
|
|
4883
4883
|
], 14, Cr))), 128))])),
|
|
4884
|
-
|
|
4884
|
+
y("div", {
|
|
4885
4885
|
ref_key: "sentinelRef",
|
|
4886
|
-
ref:
|
|
4886
|
+
ref: b,
|
|
4887
4887
|
class: "tpl:h-4"
|
|
4888
4888
|
}, null, 512),
|
|
4889
|
-
|
|
4889
|
+
e.isLoading && e.items.length > 0 ? (o(), O("div", Kr, [k(p(ue), {
|
|
4890
4890
|
class: "tpl-spinner",
|
|
4891
4891
|
size: 20,
|
|
4892
4892
|
"stroke-width": 2,
|
|
4893
4893
|
style: { color: "var(--tpl-primary)" }
|
|
4894
|
-
})])) :
|
|
4894
|
+
})])) : u("", !0)
|
|
4895
4895
|
]));
|
|
4896
4896
|
}
|
|
4897
4897
|
}), [["__scopeId", "data-v-78d7ed75"]]), Jr = ["data-tpl-theme"], Yr = {
|
|
@@ -4907,7 +4907,7 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
|
|
|
4907
4907
|
}, ei = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, ti = ["disabled"], ni = ["disabled"], ri = {
|
|
4908
4908
|
key: 0,
|
|
4909
4909
|
class: "tpl:flex tpl:items-center tpl:gap-1.5"
|
|
4910
|
-
}, ii = { key: 1 }, ai = /* @__PURE__ */
|
|
4910
|
+
}, ii = { key: 1 }, ai = /* @__PURE__ */ e({
|
|
4911
4911
|
__name: "MediaImportUrlModal",
|
|
4912
4912
|
props: {
|
|
4913
4913
|
visible: { type: Boolean },
|
|
@@ -4915,22 +4915,22 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
|
|
|
4915
4915
|
error: {}
|
|
4916
4916
|
},
|
|
4917
4917
|
emits: ["import", "close"],
|
|
4918
|
-
setup(
|
|
4919
|
-
let
|
|
4920
|
-
|
|
4921
|
-
e && (
|
|
4918
|
+
setup(e, { emit: i }) {
|
|
4919
|
+
let a = e, s = i, { t: l } = z(), h = t("tplUiTheme"), g = T("");
|
|
4920
|
+
r(() => a.visible, (e) => {
|
|
4921
|
+
e && (g.value = "");
|
|
4922
4922
|
});
|
|
4923
|
-
function
|
|
4924
|
-
let e =
|
|
4925
|
-
!e ||
|
|
4923
|
+
function b() {
|
|
4924
|
+
let e = g.value.trim();
|
|
4925
|
+
!e || a.isImporting || s("import", e);
|
|
4926
4926
|
}
|
|
4927
|
-
function
|
|
4928
|
-
|
|
4927
|
+
function x() {
|
|
4928
|
+
a.isImporting || s("close");
|
|
4929
4929
|
}
|
|
4930
|
-
function
|
|
4931
|
-
e.key === "Enter" && (e.preventDefault(),
|
|
4930
|
+
function S(e) {
|
|
4931
|
+
e.key === "Enter" && (e.preventDefault(), b()), e.key === "Escape" && x();
|
|
4932
4932
|
}
|
|
4933
|
-
return (
|
|
4933
|
+
return (t, r) => (o(), v(w, { to: "body" }, [k(C, {
|
|
4934
4934
|
"enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
|
|
4935
4935
|
"enter-from-class": "tpl:opacity-0",
|
|
4936
4936
|
"enter-to-class": "tpl:opacity-100",
|
|
@@ -4938,17 +4938,17 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
|
|
|
4938
4938
|
"leave-from-class": "tpl:opacity-100",
|
|
4939
4939
|
"leave-to-class": "tpl:opacity-0"
|
|
4940
4940
|
}, {
|
|
4941
|
-
default:
|
|
4941
|
+
default: c(() => [e.visible ? (o(), O("div", {
|
|
4942
4942
|
key: 0,
|
|
4943
|
-
"data-tpl-theme":
|
|
4943
|
+
"data-tpl-theme": p(h),
|
|
4944
4944
|
class: "tpl tpl:fixed tpl:inset-0 tpl:z-[10000] tpl:flex tpl:items-center tpl:justify-center",
|
|
4945
4945
|
style: { "background-color": "var(--tpl-overlay)" },
|
|
4946
|
-
onClick:
|
|
4947
|
-
onKeydown:
|
|
4948
|
-
}, [
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
"onUpdate:modelValue":
|
|
4946
|
+
onClick: m(x, ["self"]),
|
|
4947
|
+
onKeydown: S
|
|
4948
|
+
}, [y("div", Yr, [
|
|
4949
|
+
y("h3", Xr, _(p(l).mediaLibrary.importFromUrl), 1),
|
|
4950
|
+
y("div", Zr, [n(y("input", {
|
|
4951
|
+
"onUpdate:modelValue": r[0] ||= (e) => g.value = e,
|
|
4952
4952
|
type: "url",
|
|
4953
4953
|
class: "tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:outline-none",
|
|
4954
4954
|
style: {
|
|
@@ -4956,31 +4956,31 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
|
|
|
4956
4956
|
"background-color": "var(--tpl-bg)",
|
|
4957
4957
|
color: "var(--tpl-text)"
|
|
4958
4958
|
},
|
|
4959
|
-
placeholder:
|
|
4960
|
-
disabled:
|
|
4959
|
+
placeholder: p(l).mediaLibrary.importUrlPlaceholder,
|
|
4960
|
+
disabled: e.isImporting,
|
|
4961
4961
|
autofocus: ""
|
|
4962
|
-
}, null, 8, Qr), [[
|
|
4963
|
-
|
|
4964
|
-
|
|
4965
|
-
class:
|
|
4962
|
+
}, null, 8, Qr), [[f, g.value]])]),
|
|
4963
|
+
e.error ? (o(), O("p", $r, _(e.error), 1)) : u("", !0),
|
|
4964
|
+
y("div", ei, [y("button", {
|
|
4965
|
+
class: D(["tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150", { "tpl:cursor-not-allowed tpl:opacity-50": e.isImporting }]),
|
|
4966
4966
|
style: {
|
|
4967
4967
|
"border-color": "var(--tpl-border)",
|
|
4968
4968
|
color: "var(--tpl-text)",
|
|
4969
4969
|
"background-color": "var(--tpl-bg)"
|
|
4970
4970
|
},
|
|
4971
|
-
disabled:
|
|
4972
|
-
onClick:
|
|
4973
|
-
},
|
|
4971
|
+
disabled: e.isImporting,
|
|
4972
|
+
onClick: x
|
|
4973
|
+
}, _(p(l).mediaLibrary.cancel), 11, ti), y("button", {
|
|
4974
4974
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:text-white tpl:transition-all tpl:duration-150 tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50",
|
|
4975
4975
|
style: { background: "linear-gradient(\n 135deg,\n var(--tpl-primary),\n var(--tpl-primary-hover)\n )" },
|
|
4976
|
-
disabled: !
|
|
4977
|
-
onClick:
|
|
4978
|
-
}, [
|
|
4976
|
+
disabled: !g.value.trim() || e.isImporting,
|
|
4977
|
+
onClick: b
|
|
4978
|
+
}, [e.isImporting ? (o(), O("span", ri, [k(p(ue), {
|
|
4979
4979
|
class: "tpl:animate-spin",
|
|
4980
4980
|
size: 12,
|
|
4981
4981
|
"stroke-width": 2
|
|
4982
|
-
}),
|
|
4983
|
-
])], 40, Jr)) :
|
|
4982
|
+
}), d(" " + _(p(l).mediaLibrary.importing), 1)])) : (o(), O("span", ii, _(p(l).mediaLibrary.import), 1))], 8, ni)])
|
|
4983
|
+
])], 40, Jr)) : u("", !0)]),
|
|
4984
4984
|
_: 1
|
|
4985
4985
|
})]));
|
|
4986
4986
|
}
|
|
@@ -4988,15 +4988,15 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
|
|
|
4988
4988
|
key: 0,
|
|
4989
4989
|
class: "tpl:shrink-0",
|
|
4990
4990
|
style: { color: "var(--tpl-text-dim)" }
|
|
4991
|
-
}, ui = /* @__PURE__ */
|
|
4991
|
+
}, ui = /* @__PURE__ */ e({
|
|
4992
4992
|
__name: "MediaMovePicker",
|
|
4993
4993
|
props: {
|
|
4994
4994
|
folders: {},
|
|
4995
4995
|
currentFolderId: {}
|
|
4996
4996
|
},
|
|
4997
4997
|
emits: ["select", "close"],
|
|
4998
|
-
setup(
|
|
4999
|
-
let
|
|
4998
|
+
setup(e, { emit: t }) {
|
|
4999
|
+
let n = t, { t: r } = z(), a = T(null);
|
|
5000
5000
|
function s(e, t = 0) {
|
|
5001
5001
|
let n = [];
|
|
5002
5002
|
for (let r of e) n.push({
|
|
@@ -5006,43 +5006,43 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
|
|
|
5006
5006
|
}), r.children?.length && n.push(...s(r.children, t + 1));
|
|
5007
5007
|
return n;
|
|
5008
5008
|
}
|
|
5009
|
-
return
|
|
5010
|
-
|
|
5011
|
-
}), (
|
|
5009
|
+
return R(a, () => {
|
|
5010
|
+
n("close");
|
|
5011
|
+
}), (t, c) => (o(), O("div", {
|
|
5012
5012
|
ref_key: "pickerRef",
|
|
5013
|
-
ref:
|
|
5013
|
+
ref: a,
|
|
5014
5014
|
class: "tpl:absolute tpl:bottom-full tpl:left-0 tpl:z-10 tpl:mb-2 tpl:w-56 tpl:overflow-hidden tpl:rounded-lg tpl:border tpl:shadow-lg",
|
|
5015
5015
|
style: {
|
|
5016
5016
|
"border-color": "var(--tpl-border)",
|
|
5017
5017
|
"background-color": "var(--tpl-bg-elevated)"
|
|
5018
5018
|
}
|
|
5019
|
-
}, [
|
|
5019
|
+
}, [y("div", oi, [e.currentFolderId === null ? u("", !0) : (o(), O("button", {
|
|
5020
5020
|
key: 0,
|
|
5021
5021
|
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",
|
|
5022
5022
|
style: { color: "var(--tpl-text)" },
|
|
5023
|
-
onClick:
|
|
5024
|
-
}, [
|
|
5023
|
+
onClick: c[0] ||= (e) => n("select", null)
|
|
5024
|
+
}, [k(p(_e), {
|
|
5025
5025
|
class: "tpl:shrink-0",
|
|
5026
5026
|
size: 14,
|
|
5027
5027
|
"stroke-width": 1.5
|
|
5028
|
-
}),
|
|
5029
|
-
key:
|
|
5028
|
+
}), d(" " + _(p(r).mediaLibrary.moveToRoot), 1)])), (o(!0), O(g, null, i(s(e.folders), (t) => (o(), O("button", {
|
|
5029
|
+
key: t.id,
|
|
5030
5030
|
class: "tpl:flex tpl:w-full tpl:items-center tpl:gap-1.5 tpl:py-1.5 tpl:pr-3 tpl:text-left tpl:text-xs tpl:transition-colors tpl:duration-100",
|
|
5031
|
-
style:
|
|
5032
|
-
paddingLeft: `${
|
|
5033
|
-
color:
|
|
5034
|
-
opacity:
|
|
5031
|
+
style: h({
|
|
5032
|
+
paddingLeft: `${t.depth * 16 + 12}px`,
|
|
5033
|
+
color: t.id === e.currentFolderId ? "var(--tpl-text-dim)" : "var(--tpl-text)",
|
|
5034
|
+
opacity: t.id === e.currentFolderId ? .5 : 1
|
|
5035
5035
|
}),
|
|
5036
|
-
disabled:
|
|
5037
|
-
onClick: (
|
|
5036
|
+
disabled: t.id === e.currentFolderId,
|
|
5037
|
+
onClick: (e) => n("select", t.id)
|
|
5038
5038
|
}, [
|
|
5039
|
-
|
|
5039
|
+
k(p(de), {
|
|
5040
5040
|
class: "tpl:shrink-0",
|
|
5041
5041
|
size: 14,
|
|
5042
5042
|
"stroke-width": 1.5
|
|
5043
5043
|
}),
|
|
5044
|
-
|
|
5045
|
-
|
|
5044
|
+
y("span", ci, _(t.name), 1),
|
|
5045
|
+
t.id === e.currentFolderId ? (o(), O("span", li, _(p(r).mediaLibrary.currentFolder), 1)) : u("", !0)
|
|
5046
5046
|
], 12, si))), 128))])], 512));
|
|
5047
5047
|
}
|
|
5048
5048
|
}), di = { class: "tpl:flex tpl:items-center tpl:gap-3" }, fi = ["src", "alt"], pi = {
|
|
@@ -5061,7 +5061,7 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
|
|
|
5061
5061
|
}, vi = {
|
|
5062
5062
|
class: "tpl:block tpl:text-[10px]",
|
|
5063
5063
|
style: { color: "var(--tpl-text-muted)" }
|
|
5064
|
-
}, yi = ["value"], bi = ["value"], xi = /* @__PURE__ */
|
|
5064
|
+
}, yi = ["value"], bi = ["value"], xi = /* @__PURE__ */ oe(/* @__PURE__ */ e({
|
|
5065
5065
|
__name: "MediaPreviewPanel",
|
|
5066
5066
|
props: {
|
|
5067
5067
|
item: {},
|
|
@@ -5070,8 +5070,8 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
|
|
|
5070
5070
|
},
|
|
5071
5071
|
emits: ["update:selectedConversion"],
|
|
5072
5072
|
setup(e, { emit: t }) {
|
|
5073
|
-
let n = e,
|
|
5074
|
-
if (!
|
|
5073
|
+
let n = e, r = t, { t: a } = z(), { isImageMimeType: s } = Ee(), c = S(() => {
|
|
5074
|
+
if (!b.value || !n.item.conversions_generated) return [];
|
|
5075
5075
|
let e = [];
|
|
5076
5076
|
return n.item.small_url && e.push({
|
|
5077
5077
|
value: "small",
|
|
@@ -5090,8 +5090,8 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
|
|
|
5090
5090
|
label: a.mediaLibrary.conversionOriginal,
|
|
5091
5091
|
url: n.item.url
|
|
5092
5092
|
}), e;
|
|
5093
|
-
}), l =
|
|
5094
|
-
if (!
|
|
5093
|
+
}), l = S(() => b.value && c.value.length > 1), f = S(() => {
|
|
5094
|
+
if (!b.value) return null;
|
|
5095
5095
|
switch (n.selectedConversion) {
|
|
5096
5096
|
case "small": return n.item.small_url || n.item.url;
|
|
5097
5097
|
case "medium": return n.item.medium_url || n.item.url;
|
|
@@ -5099,69 +5099,69 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
|
|
|
5099
5099
|
default: return n.item.url;
|
|
5100
5100
|
}
|
|
5101
5101
|
});
|
|
5102
|
-
function
|
|
5102
|
+
function m(e) {
|
|
5103
5103
|
let t = e.target;
|
|
5104
|
-
|
|
5104
|
+
r("update:selectedConversion", t.value);
|
|
5105
5105
|
}
|
|
5106
|
-
function
|
|
5106
|
+
function h(e, t, n = []) {
|
|
5107
5107
|
for (let r of e) {
|
|
5108
5108
|
let e = [...n, r.name];
|
|
5109
5109
|
if (r.id === t) return e;
|
|
5110
5110
|
if (r.children) {
|
|
5111
|
-
let n =
|
|
5111
|
+
let n = h(r.children, t, e);
|
|
5112
5112
|
if (n) return n;
|
|
5113
5113
|
}
|
|
5114
5114
|
}
|
|
5115
5115
|
return null;
|
|
5116
5116
|
}
|
|
5117
|
-
let
|
|
5117
|
+
let v = S(() => {
|
|
5118
5118
|
if (!n.item.folder_id || !n.folders) return null;
|
|
5119
|
-
let e =
|
|
5119
|
+
let e = h(n.folders, n.item.folder_id);
|
|
5120
5120
|
return e ? e.join("/") : null;
|
|
5121
|
-
}),
|
|
5122
|
-
function
|
|
5121
|
+
}), b = S(() => s(n.item.mime_type));
|
|
5122
|
+
function x(e) {
|
|
5123
5123
|
return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
|
|
5124
5124
|
}
|
|
5125
|
-
function
|
|
5125
|
+
function C(e) {
|
|
5126
5126
|
return new Date(e).toLocaleDateString(void 0, {
|
|
5127
5127
|
year: "numeric",
|
|
5128
5128
|
month: "short",
|
|
5129
5129
|
day: "numeric"
|
|
5130
5130
|
});
|
|
5131
5131
|
}
|
|
5132
|
-
return (t, n) => (
|
|
5133
|
-
|
|
5132
|
+
return (t, n) => (o(), O("div", di, [
|
|
5133
|
+
b.value ? (o(), O("img", {
|
|
5134
5134
|
key: 0,
|
|
5135
|
-
src:
|
|
5135
|
+
src: f.value ?? void 0,
|
|
5136
5136
|
alt: e.item.alt_text || e.item.filename,
|
|
5137
5137
|
class: "tpl:size-10 tpl:shrink-0 tpl:rounded tpl:object-cover",
|
|
5138
5138
|
style: { border: "1px solid var(--tpl-border)" }
|
|
5139
|
-
}, null, 8, fi)) : (
|
|
5139
|
+
}, null, 8, fi)) : (o(), O("div", pi, [k(vr, {
|
|
5140
5140
|
"mime-type": e.item.mime_type,
|
|
5141
5141
|
class: "tpl-preview-icon"
|
|
5142
5142
|
}, null, 8, ["mime-type"])])),
|
|
5143
|
-
|
|
5144
|
-
|
|
5145
|
-
|
|
5146
|
-
|
|
5147
|
-
|
|
5148
|
-
|
|
5149
|
-
n[0] ||=
|
|
5150
|
-
|
|
5143
|
+
y("div", mi, [
|
|
5144
|
+
y("p", hi, _(e.item.filename), 1),
|
|
5145
|
+
y("p", gi, [
|
|
5146
|
+
d(_(x(e.item.size)) + " · " + _(C(e.item.created_at)) + " ", 1),
|
|
5147
|
+
b.value && e.item.width && e.item.height ? (o(), O(g, { key: 0 }, [d(" · " + _(e.item.width) + "×" + _(e.item.height) + "px ", 1)], 64)) : u("", !0),
|
|
5148
|
+
v.value ? (o(), O(g, { key: 1 }, [
|
|
5149
|
+
n[0] ||= d(" · ", -1),
|
|
5150
|
+
k(p(de), {
|
|
5151
5151
|
class: "tpl:mb-px tpl:inline",
|
|
5152
5152
|
size: 9,
|
|
5153
5153
|
"stroke-width": 2
|
|
5154
5154
|
}),
|
|
5155
|
-
|
|
5156
|
-
], 64)) :
|
|
5155
|
+
d(" " + _(v.value), 1)
|
|
5156
|
+
], 64)) : u("", !0)
|
|
5157
5157
|
]),
|
|
5158
|
-
|
|
5158
|
+
b.value ? (o(), O("p", {
|
|
5159
5159
|
key: 0,
|
|
5160
|
-
class:
|
|
5160
|
+
class: D(["tpl:mt-0.5 tpl:truncate tpl:text-[10px] tpl:italic", { "tpl:invisible": !e.item.alt_text }]),
|
|
5161
5161
|
style: { color: "var(--tpl-text-dim)" }
|
|
5162
|
-
},
|
|
5162
|
+
}, _(e.item.alt_text || "\xA0"), 3)) : u("", !0)
|
|
5163
5163
|
]),
|
|
5164
|
-
l.value ? (
|
|
5164
|
+
l.value ? (o(), O("div", _i, [y("label", vi, _(p(a).mediaLibrary.conversionLabel), 1), y("select", {
|
|
5165
5165
|
class: "tpl:mt-0.5 tpl:rounded-md tpl:border tpl:py-1 tpl:pr-6 tpl:pl-2 tpl:text-xs tpl:outline-none",
|
|
5166
5166
|
style: {
|
|
5167
5167
|
"border-color": "var(--tpl-border)",
|
|
@@ -5169,11 +5169,11 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
|
|
|
5169
5169
|
color: "var(--tpl-text)"
|
|
5170
5170
|
},
|
|
5171
5171
|
value: e.selectedConversion,
|
|
5172
|
-
onChange:
|
|
5173
|
-
}, [(
|
|
5172
|
+
onChange: m
|
|
5173
|
+
}, [(o(!0), O(g, null, i(c.value, (e) => (o(), O("option", {
|
|
5174
5174
|
key: e.value,
|
|
5175
5175
|
value: e.value
|
|
5176
|
-
},
|
|
5176
|
+
}, _(e.label), 9, bi))), 128))], 40, yi)])) : u("", !0)
|
|
5177
5177
|
]));
|
|
5178
5178
|
}
|
|
5179
5179
|
}), [["__scopeId", "data-v-56be5670"]]), Si = ["data-tpl-theme"], Ci = {
|
|
@@ -5202,7 +5202,7 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
|
|
|
5202
5202
|
key: 1,
|
|
5203
5203
|
class: "tpl:mb-3 tpl:text-xs",
|
|
5204
5204
|
style: { color: "var(--tpl-danger)" }
|
|
5205
|
-
}, Ni = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, Pi = ["disabled"], Fi = ["disabled"], Ii = /* @__PURE__ */
|
|
5205
|
+
}, Ni = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, Pi = ["disabled"], Fi = ["disabled"], Ii = /* @__PURE__ */ e({
|
|
5206
5206
|
__name: "MediaReplaceModal",
|
|
5207
5207
|
props: {
|
|
5208
5208
|
visible: { type: Boolean },
|
|
@@ -5212,26 +5212,26 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
|
|
|
5212
5212
|
error: {}
|
|
5213
5213
|
},
|
|
5214
5214
|
emits: ["replace", "close"],
|
|
5215
|
-
setup(
|
|
5216
|
-
let
|
|
5217
|
-
if (!
|
|
5218
|
-
let e =
|
|
5215
|
+
setup(e, { emit: n }) {
|
|
5216
|
+
let i = e, a = n, { t: s } = z(), l = t("tplUiTheme"), d = T(null), f = T(null), h = S(() => {
|
|
5217
|
+
if (!i.item) return "";
|
|
5218
|
+
let e = i.item.filename.split(".");
|
|
5219
5219
|
return e.length > 1 ? e[e.length - 1].toLowerCase() : "";
|
|
5220
|
-
}),
|
|
5221
|
-
|
|
5220
|
+
}), g = S(() => h.value ? `.${h.value}` : "*"), b = S(() => (i.usageInfo?.template_count ?? 0) > 0);
|
|
5221
|
+
r(() => i.visible, (e) => {
|
|
5222
5222
|
e || (f.value = null, d.value && (d.value.value = ""));
|
|
5223
5223
|
});
|
|
5224
|
-
function
|
|
5224
|
+
function x(e) {
|
|
5225
5225
|
let t = e.target;
|
|
5226
5226
|
t.files && t.files.length > 0 && (f.value = t.files[0]);
|
|
5227
5227
|
}
|
|
5228
|
-
function
|
|
5229
|
-
f.value &&
|
|
5228
|
+
function E() {
|
|
5229
|
+
f.value && a("replace", f.value);
|
|
5230
5230
|
}
|
|
5231
|
-
function
|
|
5232
|
-
e.key === "Escape" &&
|
|
5231
|
+
function D(e) {
|
|
5232
|
+
e.key === "Escape" && a("close");
|
|
5233
5233
|
}
|
|
5234
|
-
return (
|
|
5234
|
+
return (t, n) => (o(), v(w, { to: "body" }, [k(C, {
|
|
5235
5235
|
"enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
|
|
5236
5236
|
"enter-from-class": "tpl:opacity-0",
|
|
5237
5237
|
"enter-to-class": "tpl:opacity-100",
|
|
@@ -5239,48 +5239,48 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
|
|
|
5239
5239
|
"leave-from-class": "tpl:opacity-100",
|
|
5240
5240
|
"leave-to-class": "tpl:opacity-0"
|
|
5241
5241
|
}, {
|
|
5242
|
-
default:
|
|
5242
|
+
default: c(() => [e.visible && e.item ? (o(), O("div", {
|
|
5243
5243
|
key: 0,
|
|
5244
|
-
"data-tpl-theme":
|
|
5244
|
+
"data-tpl-theme": p(l),
|
|
5245
5245
|
class: "tpl tpl:fixed tpl:inset-0 tpl:z-[10000] tpl:flex tpl:items-center tpl:justify-center",
|
|
5246
5246
|
style: { "background-color": "var(--tpl-overlay)" },
|
|
5247
|
-
onClick:
|
|
5248
|
-
onKeydown:
|
|
5249
|
-
}, [
|
|
5250
|
-
|
|
5251
|
-
|
|
5252
|
-
|
|
5253
|
-
|
|
5254
|
-
|
|
5247
|
+
onClick: n[1] ||= m((e) => a("close"), ["self"]),
|
|
5248
|
+
onKeydown: D
|
|
5249
|
+
}, [y("div", Ci, [
|
|
5250
|
+
y("h3", wi, _(p(s).mediaLibrary.replaceWarningTitle), 1),
|
|
5251
|
+
y("p", Ti, _(p(s).mediaLibrary.replaceWarningMessage.replace("{extension}", `.${h.value}`)), 1),
|
|
5252
|
+
b.value ? (o(), O("p", Ei, _(p(s).mediaLibrary.replaceWarningUsageNote.replace("{count}", e.usageInfo.template_count.toString())), 1)) : u("", !0),
|
|
5253
|
+
y("div", Di, [y("p", Oi, _(e.item.filename), 1)]),
|
|
5254
|
+
y("div", ki, [y("label", Ai, _(p(s).mediaLibrary.replaceSelectFile), 1), y("input", {
|
|
5255
5255
|
ref_key: "fileInputRef",
|
|
5256
5256
|
ref: d,
|
|
5257
5257
|
type: "file",
|
|
5258
|
-
accept:
|
|
5258
|
+
accept: g.value,
|
|
5259
5259
|
class: "tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs",
|
|
5260
5260
|
style: {
|
|
5261
5261
|
"border-color": "var(--tpl-border)",
|
|
5262
5262
|
"background-color": "var(--tpl-bg)",
|
|
5263
5263
|
color: "var(--tpl-text)"
|
|
5264
5264
|
},
|
|
5265
|
-
onChange:
|
|
5265
|
+
onChange: x
|
|
5266
5266
|
}, null, 40, ji)]),
|
|
5267
|
-
|
|
5268
|
-
|
|
5267
|
+
e.error ? (o(), O("p", Mi, _(e.error), 1)) : u("", !0),
|
|
5268
|
+
y("div", Ni, [y("button", {
|
|
5269
5269
|
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",
|
|
5270
5270
|
style: {
|
|
5271
5271
|
"border-color": "var(--tpl-border)",
|
|
5272
5272
|
color: "var(--tpl-text)",
|
|
5273
5273
|
"background-color": "var(--tpl-bg)"
|
|
5274
5274
|
},
|
|
5275
|
-
disabled:
|
|
5276
|
-
onClick:
|
|
5277
|
-
},
|
|
5275
|
+
disabled: e.isReplacing,
|
|
5276
|
+
onClick: n[0] ||= (e) => a("close")
|
|
5277
|
+
}, _(p(s).mediaLibrary.cancel), 9, Pi), y("button", {
|
|
5278
5278
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:text-white tpl:transition-all tpl:duration-150 tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50",
|
|
5279
5279
|
style: { background: "linear-gradient(\n 135deg,\n var(--tpl-primary),\n var(--tpl-primary-hover)\n )" },
|
|
5280
|
-
disabled: !f.value ||
|
|
5281
|
-
onClick:
|
|
5282
|
-
},
|
|
5283
|
-
])], 40, Si)) :
|
|
5280
|
+
disabled: !f.value || e.isReplacing,
|
|
5281
|
+
onClick: E
|
|
5282
|
+
}, _(e.isReplacing ? p(s).mediaLibrary.replacing : p(s).mediaLibrary.replace), 9, Fi)])
|
|
5283
|
+
])], 40, Si)) : u("", !0)]),
|
|
5284
5284
|
_: 1
|
|
5285
5285
|
})]));
|
|
5286
5286
|
}
|
|
@@ -5296,58 +5296,58 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
|
|
|
5296
5296
|
}, Bi = {
|
|
5297
5297
|
class: "tpl:mt-1 tpl:text-[10px]",
|
|
5298
5298
|
style: { color: "var(--tpl-text-dim)" }
|
|
5299
|
-
}, Vi = /* @__PURE__ */
|
|
5299
|
+
}, Vi = /* @__PURE__ */ e({
|
|
5300
5300
|
__name: "MediaUploadZone",
|
|
5301
5301
|
props: {
|
|
5302
5302
|
isUploading: { type: Boolean },
|
|
5303
5303
|
uploadProgress: {}
|
|
5304
5304
|
},
|
|
5305
5305
|
emits: ["upload"],
|
|
5306
|
-
setup(
|
|
5307
|
-
let
|
|
5308
|
-
function
|
|
5306
|
+
setup(e, { emit: t }) {
|
|
5307
|
+
let n = t, { t: r, format: i } = z(), { allAcceptedMimeTypes: a, allAcceptedInputString: s, maxFileSize: c } = Ee(), l = T();
|
|
5308
|
+
function u(e) {
|
|
5309
5309
|
let t = [];
|
|
5310
|
-
for (let n of Array.from(e))
|
|
5310
|
+
for (let n of Array.from(e)) a.value.includes(n.type) && n.size <= c.value && t.push(n);
|
|
5311
5311
|
return t;
|
|
5312
5312
|
}
|
|
5313
|
-
function
|
|
5314
|
-
let t =
|
|
5315
|
-
t.length &&
|
|
5313
|
+
function d(e) {
|
|
5314
|
+
let t = u(e);
|
|
5315
|
+
t.length && n("upload", t);
|
|
5316
5316
|
}
|
|
5317
|
-
let { isOverDropZone:
|
|
5318
|
-
e?.length &&
|
|
5319
|
-
} }), { open:
|
|
5317
|
+
let { isOverDropZone: f } = ne(l, { onDrop: (e) => {
|
|
5318
|
+
e?.length && d(e);
|
|
5319
|
+
} }), { open: m, onChange: h } = ie({
|
|
5320
5320
|
accept: s.value,
|
|
5321
5321
|
multiple: !0
|
|
5322
5322
|
});
|
|
5323
|
-
return
|
|
5324
|
-
e?.length &&
|
|
5325
|
-
}), (
|
|
5323
|
+
return h((e) => {
|
|
5324
|
+
e?.length && d(e);
|
|
5325
|
+
}), (t, n) => (o(), O("div", {
|
|
5326
5326
|
ref_key: "dropZoneRef",
|
|
5327
|
-
ref:
|
|
5328
|
-
class:
|
|
5327
|
+
ref: l,
|
|
5328
|
+
class: D(["tpl-upload-zone tpl:flex 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(f) ? "tpl-upload-zone-active" : ""]),
|
|
5329
5329
|
style: {
|
|
5330
5330
|
"border-color": "var(--tpl-border-light)",
|
|
5331
5331
|
"background-color": "var(--tpl-bg)"
|
|
5332
5332
|
},
|
|
5333
|
-
onClick: n[0] ||= (e) => m
|
|
5334
|
-
}, [
|
|
5333
|
+
onClick: n[0] ||= (e) => p(m)()
|
|
5334
|
+
}, [e.isUploading ? (o(), O("div", Li, [k(p(ue), {
|
|
5335
5335
|
class: "tpl-spinner",
|
|
5336
5336
|
size: 20,
|
|
5337
5337
|
"stroke-width": 2,
|
|
5338
5338
|
style: { color: "var(--tpl-primary)" }
|
|
5339
|
-
}),
|
|
5340
|
-
current:
|
|
5341
|
-
total:
|
|
5342
|
-
}) :
|
|
5343
|
-
|
|
5339
|
+
}), y("span", Ri, _(e.uploadProgress && e.uploadProgress.total > 1 ? p(i)(p(r).mediaLibrary.uploadingProgress, {
|
|
5340
|
+
current: e.uploadProgress.current,
|
|
5341
|
+
total: e.uploadProgress.total
|
|
5342
|
+
}) : p(r).mediaLibrary.uploading), 1)])) : (o(), O(g, { key: 1 }, [
|
|
5343
|
+
k(p(ee), {
|
|
5344
5344
|
class: "tpl:mb-2",
|
|
5345
5345
|
size: 24,
|
|
5346
5346
|
"stroke-width": 1.5,
|
|
5347
5347
|
style: { color: "var(--tpl-text-dim)" }
|
|
5348
5348
|
}),
|
|
5349
|
-
|
|
5350
|
-
|
|
5349
|
+
y("p", zi, _(p(r).mediaLibrary.dropOrClick), 1),
|
|
5350
|
+
y("p", Bi, _(p(r).mediaLibrary.acceptedFormats), 1)
|
|
5351
5351
|
], 64))], 2));
|
|
5352
5352
|
}
|
|
5353
5353
|
}), Hi = [
|
|
@@ -5374,16 +5374,16 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
|
|
|
5374
5374
|
"background-color": "var(--tpl-text)",
|
|
5375
5375
|
color: "var(--tpl-bg-elevated)"
|
|
5376
5376
|
}
|
|
5377
|
-
}, Ki = /* @__PURE__ */
|
|
5377
|
+
}, Ki = /* @__PURE__ */ e({
|
|
5378
5378
|
__name: "StorageProgressRing",
|
|
5379
5379
|
props: {
|
|
5380
5380
|
usedBytes: {},
|
|
5381
5381
|
limitBytes: {},
|
|
5382
5382
|
size: {}
|
|
5383
5383
|
},
|
|
5384
|
-
setup(
|
|
5385
|
-
let
|
|
5386
|
-
function
|
|
5384
|
+
setup(e) {
|
|
5385
|
+
let t = e, { t: n, format: r } = z(), i = T(!1), a = S(() => t.size ?? 24), s = S(() => Math.max(2, a.value / 8)), l = S(() => (a.value - s.value) / 2), f = S(() => 2 * Math.PI * l.value), p = S(() => t.limitBytes <= 0 ? 0 : Math.min(100, t.usedBytes / t.limitBytes * 100)), m = S(() => f.value - p.value / 100 * f.value), h = S(() => p.value >= 95 ? "var(--tpl-danger)" : p.value >= 75 ? "var(--tpl-warning, #f59e0b)" : "var(--tpl-primary)");
|
|
5386
|
+
function g(e) {
|
|
5387
5387
|
if (e === 0) return "0 B";
|
|
5388
5388
|
let t = 1024, n = [
|
|
5389
5389
|
"B",
|
|
@@ -5393,39 +5393,39 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
|
|
|
5393
5393
|
], r = Math.floor(Math.log(e) / Math.log(t));
|
|
5394
5394
|
return `${(e / t ** +r).toFixed(+(r >= 2))} ${n[r]}`;
|
|
5395
5395
|
}
|
|
5396
|
-
let v =
|
|
5396
|
+
let v = S(() => g(t.usedBytes)), b = S(() => g(t.limitBytes)), x = S(() => Math.max(0, t.limitBytes - t.usedBytes)), w = S(() => g(x.value)), E = S(() => r(n.mediaLibrary.storageTooltip, {
|
|
5397
5397
|
used: v.value,
|
|
5398
|
-
total:
|
|
5399
|
-
remaining:
|
|
5398
|
+
total: b.value,
|
|
5399
|
+
remaining: w.value
|
|
5400
5400
|
}));
|
|
5401
|
-
return (e, t) => (
|
|
5401
|
+
return (e, t) => (o(), O("div", {
|
|
5402
5402
|
class: "tpl:relative tpl:inline-flex tpl:cursor-help tpl:items-center tpl:justify-center",
|
|
5403
|
-
onMouseenter: t[0] ||= (e) =>
|
|
5404
|
-
onMouseleave: t[1] ||= (e) =>
|
|
5405
|
-
}, [(
|
|
5406
|
-
width:
|
|
5407
|
-
height:
|
|
5403
|
+
onMouseenter: t[0] ||= (e) => i.value = !0,
|
|
5404
|
+
onMouseleave: t[1] ||= (e) => i.value = !1
|
|
5405
|
+
}, [(o(), O("svg", {
|
|
5406
|
+
width: a.value,
|
|
5407
|
+
height: a.value,
|
|
5408
5408
|
class: "tpl:-rotate-90",
|
|
5409
|
-
viewBox: `0 0 ${
|
|
5410
|
-
}, [
|
|
5411
|
-
cx:
|
|
5412
|
-
cy:
|
|
5413
|
-
r:
|
|
5409
|
+
viewBox: `0 0 ${a.value} ${a.value}`
|
|
5410
|
+
}, [y("circle", {
|
|
5411
|
+
cx: a.value / 2,
|
|
5412
|
+
cy: a.value / 2,
|
|
5413
|
+
r: l.value,
|
|
5414
5414
|
fill: "none",
|
|
5415
|
-
"stroke-width":
|
|
5415
|
+
"stroke-width": s.value,
|
|
5416
5416
|
style: { stroke: "var(--tpl-border)" }
|
|
5417
|
-
}, null, 8, Ui),
|
|
5418
|
-
cx:
|
|
5419
|
-
cy:
|
|
5420
|
-
r:
|
|
5417
|
+
}, null, 8, Ui), y("circle", {
|
|
5418
|
+
cx: a.value / 2,
|
|
5419
|
+
cy: a.value / 2,
|
|
5420
|
+
r: l.value,
|
|
5421
5421
|
fill: "none",
|
|
5422
|
-
"stroke-width":
|
|
5423
|
-
stroke:
|
|
5422
|
+
"stroke-width": s.value,
|
|
5423
|
+
stroke: h.value,
|
|
5424
5424
|
"stroke-linecap": "round",
|
|
5425
|
-
"stroke-dasharray":
|
|
5425
|
+
"stroke-dasharray": f.value,
|
|
5426
5426
|
"stroke-dashoffset": m.value,
|
|
5427
5427
|
class: "tpl:transition-all tpl:duration-300 tpl:ease-out"
|
|
5428
|
-
}, null, 8, Wi)], 8, Hi)),
|
|
5428
|
+
}, null, 8, Wi)], 8, Hi)), k(C, {
|
|
5429
5429
|
"enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
|
|
5430
5430
|
"enter-from-class": "tpl:opacity-0 tpl:translate-y-1",
|
|
5431
5431
|
"enter-to-class": "tpl:opacity-100 tpl:translate-y-0",
|
|
@@ -5433,122 +5433,122 @@ var wn = ["data-tpl-theme"], Tn = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, En
|
|
|
5433
5433
|
"leave-from-class": "tpl:opacity-100 tpl:translate-y-0",
|
|
5434
5434
|
"leave-to-class": "tpl:opacity-0 tpl:translate-y-1"
|
|
5435
5435
|
}, {
|
|
5436
|
-
default:
|
|
5436
|
+
default: c(() => [i.value ? (o(), O("div", Gi, [d(_(E.value) + " ", 1), t[2] ||= y("div", {
|
|
5437
5437
|
class: "tpl:absolute tpl:-top-1 tpl:left-1/2 tpl:size-2 tpl:-translate-x-1/2 tpl:rotate-45",
|
|
5438
5438
|
style: { "background-color": "var(--tpl-text)" }
|
|
5439
|
-
}, null, -1)])) :
|
|
5439
|
+
}, null, -1)])) : u("", !0)]),
|
|
5440
5440
|
_: 1
|
|
5441
5441
|
})], 32));
|
|
5442
5442
|
}
|
|
5443
5443
|
});
|
|
5444
5444
|
//#endregion
|
|
5445
5445
|
//#region ../media-library/src/composables/useMediaLibraryUI.ts
|
|
5446
|
-
function qi(
|
|
5447
|
-
let { library:
|
|
5448
|
-
function
|
|
5449
|
-
return "value" in
|
|
5446
|
+
function qi(e) {
|
|
5447
|
+
let { library: t, canUseMediaFolders: n, translations: i } = e;
|
|
5448
|
+
function a() {
|
|
5449
|
+
return "value" in i && typeof i.value == "object" ? i.value : i;
|
|
5450
5450
|
}
|
|
5451
|
-
let
|
|
5452
|
-
let e =
|
|
5451
|
+
let o = T("grid"), s = T(!1), c = T(""), l = T("original"), u = T(null), d = T(!1), f = T(!1), p = S(() => {
|
|
5452
|
+
let e = t.previewItem.value;
|
|
5453
5453
|
if (!e) return null;
|
|
5454
|
-
switch (
|
|
5454
|
+
switch (l.value) {
|
|
5455
5455
|
case "small": return e.small_url || e.url;
|
|
5456
5456
|
case "medium": return e.medium_url || e.url;
|
|
5457
5457
|
case "large": return e.large_url || e.url;
|
|
5458
5458
|
default: return e.url;
|
|
5459
5459
|
}
|
|
5460
|
-
}),
|
|
5461
|
-
images: () =>
|
|
5462
|
-
documents: () =>
|
|
5463
|
-
videos: () =>
|
|
5464
|
-
audio: () =>
|
|
5460
|
+
}), m = S(() => t.frequentlyUsedItems.value.length > 0), h = S(() => t.viewMode.value === "frequently-used" ? t.frequentlyUsedItems.value : t.items.value), g = S(() => Object.values(t.deleteUsageInfo.value).some((e) => e.template_count > 0)), _ = {
|
|
5461
|
+
images: () => a().mediaLibrary.filterImages,
|
|
5462
|
+
documents: () => a().mediaLibrary.filterDocuments,
|
|
5463
|
+
videos: () => a().mediaLibrary.filterVideos,
|
|
5464
|
+
audio: () => a().mediaLibrary.filterAudio
|
|
5465
5465
|
};
|
|
5466
|
-
function
|
|
5467
|
-
return
|
|
5466
|
+
function v(e) {
|
|
5467
|
+
return _[e]?.() ?? e;
|
|
5468
5468
|
}
|
|
5469
|
-
|
|
5470
|
-
e &&
|
|
5471
|
-
}),
|
|
5472
|
-
|
|
5469
|
+
r(s, (e) => {
|
|
5470
|
+
e && n.value && t.loadFolders();
|
|
5471
|
+
}), r(() => t.previewItem.value?.id, () => {
|
|
5472
|
+
l.value = "original";
|
|
5473
5473
|
});
|
|
5474
|
-
let
|
|
5475
|
-
|
|
5474
|
+
let y = le((e) => {
|
|
5475
|
+
t.search(e);
|
|
5476
5476
|
}, 300);
|
|
5477
|
-
function
|
|
5478
|
-
|
|
5477
|
+
function b(e) {
|
|
5478
|
+
c.value = e, y(e);
|
|
5479
5479
|
}
|
|
5480
|
-
let { copy:
|
|
5480
|
+
let { copy: x, copied: C } = ce({
|
|
5481
5481
|
copiedDuring: 2e3,
|
|
5482
5482
|
legacy: !0
|
|
5483
5483
|
});
|
|
5484
5484
|
async function w(e) {
|
|
5485
|
-
await
|
|
5485
|
+
await t.uploadFiles(e);
|
|
5486
5486
|
}
|
|
5487
|
-
function
|
|
5488
|
-
|
|
5487
|
+
function E(e) {
|
|
5488
|
+
t.selectItem(e);
|
|
5489
5489
|
}
|
|
5490
|
-
async function D(e,
|
|
5491
|
-
await
|
|
5490
|
+
async function D(e, n) {
|
|
5491
|
+
await t.createFolder(e, n);
|
|
5492
5492
|
}
|
|
5493
|
-
async function O(e,
|
|
5494
|
-
await
|
|
5493
|
+
async function O(e, n) {
|
|
5494
|
+
await t.renameFolder(e, n);
|
|
5495
5495
|
}
|
|
5496
5496
|
async function k(e) {
|
|
5497
|
-
await
|
|
5497
|
+
await t.deleteFolder(e);
|
|
5498
5498
|
}
|
|
5499
5499
|
function A(e) {
|
|
5500
|
-
|
|
5500
|
+
u.value = e;
|
|
5501
5501
|
}
|
|
5502
|
-
async function j(e,
|
|
5503
|
-
i && await
|
|
5502
|
+
async function j(e, n, r, i) {
|
|
5503
|
+
i && await t.replaceMediaDirectly(e, i.file), await t.updateFile(e, n, r), u.value = null;
|
|
5504
5504
|
}
|
|
5505
5505
|
async function M(e) {
|
|
5506
|
-
await
|
|
5506
|
+
await t.importFromUrl(e) && (d.value = !1);
|
|
5507
5507
|
}
|
|
5508
|
-
async function
|
|
5509
|
-
|
|
5508
|
+
async function N(e) {
|
|
5509
|
+
f.value = !1, await t.moveSelected(e);
|
|
5510
5510
|
}
|
|
5511
|
-
async function
|
|
5512
|
-
await
|
|
5511
|
+
async function P() {
|
|
5512
|
+
await t.checkUsageBeforeDelete();
|
|
5513
5513
|
}
|
|
5514
|
-
function
|
|
5515
|
-
|
|
5514
|
+
function ee(e) {
|
|
5515
|
+
t.checkUsageBeforeReplace(e);
|
|
5516
5516
|
}
|
|
5517
5517
|
async function te(e) {
|
|
5518
|
-
await
|
|
5518
|
+
await t.replaceFile(e);
|
|
5519
5519
|
}
|
|
5520
|
-
function
|
|
5521
|
-
|
|
5520
|
+
function ne() {
|
|
5521
|
+
t.clearSelection(), t.cancelDelete(), t.cancelReplace(), c.value = "", t.categoryFilter.value = null, t.sortOption.value = "newest", t.viewMode.value = "files", u.value = null, d.value = !1, l.value = "original";
|
|
5522
5522
|
}
|
|
5523
5523
|
return {
|
|
5524
|
-
layoutMode:
|
|
5525
|
-
showSidebar:
|
|
5526
|
-
searchInput:
|
|
5527
|
-
selectedConversion:
|
|
5528
|
-
editingItem:
|
|
5529
|
-
showImportUrlModal:
|
|
5530
|
-
showMovePicker:
|
|
5531
|
-
selectedUrl:
|
|
5532
|
-
hasFrequentlyUsed:
|
|
5533
|
-
displayItems:
|
|
5534
|
-
hasUsedFiles:
|
|
5535
|
-
copy:
|
|
5524
|
+
layoutMode: o,
|
|
5525
|
+
showSidebar: s,
|
|
5526
|
+
searchInput: c,
|
|
5527
|
+
selectedConversion: l,
|
|
5528
|
+
editingItem: u,
|
|
5529
|
+
showImportUrlModal: d,
|
|
5530
|
+
showMovePicker: f,
|
|
5531
|
+
selectedUrl: p,
|
|
5532
|
+
hasFrequentlyUsed: m,
|
|
5533
|
+
displayItems: h,
|
|
5534
|
+
hasUsedFiles: g,
|
|
5535
|
+
copy: x,
|
|
5536
5536
|
copied: C,
|
|
5537
|
-
getCategoryLabel:
|
|
5538
|
-
handleSearchInput:
|
|
5537
|
+
getCategoryLabel: v,
|
|
5538
|
+
handleSearchInput: b,
|
|
5539
5539
|
handleUpload: w,
|
|
5540
|
-
handleSelect:
|
|
5540
|
+
handleSelect: E,
|
|
5541
5541
|
handleCreateFolder: D,
|
|
5542
5542
|
handleRenameFolder: O,
|
|
5543
5543
|
handleDeleteFolder: k,
|
|
5544
5544
|
handleEditItem: A,
|
|
5545
5545
|
handleEditSave: j,
|
|
5546
5546
|
handleImportFromUrl: M,
|
|
5547
|
-
handleMoveToFolder:
|
|
5548
|
-
handleDeleteClick:
|
|
5549
|
-
handleReplaceItem:
|
|
5547
|
+
handleMoveToFolder: N,
|
|
5548
|
+
handleDeleteClick: P,
|
|
5549
|
+
handleReplaceItem: ee,
|
|
5550
5550
|
handleReplaceFile: te,
|
|
5551
|
-
resetUI:
|
|
5551
|
+
resetUI: ne
|
|
5552
5552
|
};
|
|
5553
5553
|
}
|
|
5554
5554
|
//#endregion
|
|
@@ -5619,42 +5619,42 @@ var Ji = ["data-tpl-theme"], Yi = {
|
|
|
5619
5619
|
}, Fa = {
|
|
5620
5620
|
key: 1,
|
|
5621
5621
|
class: "tpl:relative"
|
|
5622
|
-
}, Ia = { class: "tpl:flex tpl:items-center tpl:gap-2" }, La = ["disabled"], Ra = /* @__PURE__ */
|
|
5622
|
+
}, Ia = { class: "tpl:flex tpl:items-center tpl:gap-2" }, La = ["disabled"], Ra = /* @__PURE__ */ e({
|
|
5623
5623
|
__name: "MediaLibraryModal",
|
|
5624
5624
|
props: {
|
|
5625
5625
|
visible: { type: Boolean },
|
|
5626
5626
|
accept: {}
|
|
5627
5627
|
},
|
|
5628
5628
|
emits: ["close", "select"],
|
|
5629
|
-
setup(e, { emit:
|
|
5630
|
-
let
|
|
5631
|
-
projectId:
|
|
5632
|
-
authManager:
|
|
5633
|
-
}),
|
|
5634
|
-
library:
|
|
5635
|
-
canUseMediaFolders:
|
|
5629
|
+
setup(e, { emit: n }) {
|
|
5630
|
+
let a = e, s = n, { t: l } = z(), f = t("tplUiTheme"), b = t("authManager"), x = t("projectId"), T = S(() => x.value), E = t("planConfig"), A = S(() => E.hasFeature("media_folders")), j = S(() => E.hasFeature("import_from_url")), N = S(() => E.config.value?.storage.used_bytes ?? 0), ee = S(() => E.config.value?.storage.limit_bytes ?? 0), { isAcceptedMimeType: te, availableCategories: ne } = Ee(), F = xe({
|
|
5631
|
+
projectId: T.value,
|
|
5632
|
+
authManager: b
|
|
5633
|
+
}), I = qi({
|
|
5634
|
+
library: F,
|
|
5635
|
+
canUseMediaFolders: A,
|
|
5636
5636
|
translations: l
|
|
5637
5637
|
});
|
|
5638
|
-
|
|
5639
|
-
e ? (
|
|
5638
|
+
r(() => a.visible, (e) => {
|
|
5639
|
+
e ? (F.loadItems(), F.loadFrequentlyUsed()) : I.resetUI();
|
|
5640
5640
|
});
|
|
5641
5641
|
function re(e) {
|
|
5642
5642
|
e.key === "Escape" && s("close");
|
|
5643
5643
|
}
|
|
5644
|
-
|
|
5644
|
+
se(document, "keydown", re);
|
|
5645
5645
|
function R() {
|
|
5646
|
-
return
|
|
5646
|
+
return F.previewItem.value ? a.accept?.length ? te(F.previewItem.value.mime_type, a.accept) : !0 : !1;
|
|
5647
5647
|
}
|
|
5648
5648
|
function ie() {
|
|
5649
5649
|
if (R()) {
|
|
5650
|
-
let e =
|
|
5650
|
+
let e = F.previewItem.value;
|
|
5651
5651
|
s("select", {
|
|
5652
5652
|
...e,
|
|
5653
|
-
url:
|
|
5653
|
+
url: I.selectedUrl.value || e.url
|
|
5654
5654
|
}), s("close");
|
|
5655
5655
|
}
|
|
5656
5656
|
}
|
|
5657
|
-
return (t, n) => (
|
|
5657
|
+
return (t, n) => (o(), v(w, { to: "body" }, [k(C, {
|
|
5658
5658
|
"enter-active-class": "tpl:transition tpl:duration-200",
|
|
5659
5659
|
"enter-from-class": "tpl:opacity-0",
|
|
5660
5660
|
"enter-to-class": "tpl:opacity-100",
|
|
@@ -5662,20 +5662,20 @@ var Ji = ["data-tpl-theme"], Yi = {
|
|
|
5662
5662
|
"leave-from-class": "tpl:opacity-100",
|
|
5663
5663
|
"leave-to-class": "tpl:opacity-0"
|
|
5664
5664
|
}, {
|
|
5665
|
-
default:
|
|
5665
|
+
default: c(() => [e.visible ? (o(), O("div", {
|
|
5666
5666
|
key: 0,
|
|
5667
|
-
"data-tpl-theme":
|
|
5667
|
+
"data-tpl-theme": p(f),
|
|
5668
5668
|
class: "tpl tpl-media-overlay tpl:fixed tpl:inset-0 tpl:z-[9999]",
|
|
5669
|
-
onClick: n[18] ||=
|
|
5670
|
-
}, [
|
|
5671
|
-
|
|
5672
|
-
|
|
5673
|
-
"used-bytes":
|
|
5674
|
-
"limit-bytes":
|
|
5669
|
+
onClick: n[18] ||= m((e) => s("close"), ["self"])
|
|
5670
|
+
}, [y("div", Yi, [
|
|
5671
|
+
y("div", Xi, [y("h2", Zi, _(p(l).mediaLibrary.title), 1), y("div", Qi, [
|
|
5672
|
+
k(Ki, {
|
|
5673
|
+
"used-bytes": N.value,
|
|
5674
|
+
"limit-bytes": ee.value,
|
|
5675
5675
|
size: 22
|
|
5676
5676
|
}, null, 8, ["used-bytes", "limit-bytes"]),
|
|
5677
|
-
|
|
5678
|
-
value:
|
|
5677
|
+
y("div", $i, [y("input", {
|
|
5678
|
+
value: p(I).searchInput.value,
|
|
5679
5679
|
type: "text",
|
|
5680
5680
|
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)]",
|
|
5681
5681
|
style: {
|
|
@@ -5683,24 +5683,24 @@ var Ji = ["data-tpl-theme"], Yi = {
|
|
|
5683
5683
|
"background-color": "var(--tpl-bg)",
|
|
5684
5684
|
color: "var(--tpl-text)"
|
|
5685
5685
|
},
|
|
5686
|
-
placeholder:
|
|
5687
|
-
onInput: n[0] ||= (e) =>
|
|
5688
|
-
}, null, 40, ea),
|
|
5686
|
+
placeholder: p(l).mediaLibrary.searchPlaceholder,
|
|
5687
|
+
onInput: n[0] ||= (e) => p(I).handleSearchInput(e.target.value)
|
|
5688
|
+
}, null, 40, ea), k(p(ye), {
|
|
5689
5689
|
class: "tpl:absolute tpl:top-1/2 tpl:left-2.5 tpl:-translate-y-1/2",
|
|
5690
5690
|
size: 13,
|
|
5691
5691
|
"stroke-width": 2,
|
|
5692
5692
|
style: { color: "var(--tpl-text-dim)" }
|
|
5693
5693
|
})]),
|
|
5694
|
-
|
|
5694
|
+
y("button", {
|
|
5695
5695
|
class: "tpl:flex tpl:size-7 tpl:items-center tpl:justify-center tpl:rounded-md tpl:transition-all tpl:duration-150",
|
|
5696
5696
|
style: { color: "var(--tpl-text-muted)" },
|
|
5697
5697
|
onClick: n[1] ||= (e) => s("close")
|
|
5698
|
-
}, [
|
|
5698
|
+
}, [k(p(L), {
|
|
5699
5699
|
size: 18,
|
|
5700
5700
|
"stroke-width": 2
|
|
5701
5701
|
})])
|
|
5702
5702
|
])]),
|
|
5703
|
-
|
|
5703
|
+
y("div", ta, [k(C, {
|
|
5704
5704
|
"enter-active-class": "tpl:transition-all tpl:duration-200 tpl:ease-out",
|
|
5705
5705
|
"enter-from-class": "tpl:-ml-48 tpl:opacity-0",
|
|
5706
5706
|
"enter-to-class": "tpl:ml-0 tpl:opacity-100",
|
|
@@ -5708,16 +5708,16 @@ var Ji = ["data-tpl-theme"], Yi = {
|
|
|
5708
5708
|
"leave-from-class": "tpl:ml-0 tpl:opacity-100",
|
|
5709
5709
|
"leave-to-class": "tpl:-ml-48 tpl:opacity-0"
|
|
5710
5710
|
}, {
|
|
5711
|
-
default:
|
|
5712
|
-
folders:
|
|
5713
|
-
"current-folder-id":
|
|
5714
|
-
"view-mode":
|
|
5715
|
-
"has-frequently-used":
|
|
5716
|
-
onNavigate:
|
|
5717
|
-
onCreateFolder:
|
|
5718
|
-
onRenameFolder:
|
|
5719
|
-
onDeleteFolder:
|
|
5720
|
-
onShowFrequentlyUsed:
|
|
5711
|
+
default: c(() => [A.value && p(I).showSidebar.value ? (o(), O("div", na, [k(gr, {
|
|
5712
|
+
folders: p(F).folders.value,
|
|
5713
|
+
"current-folder-id": p(F).currentFolderId.value,
|
|
5714
|
+
"view-mode": p(F).viewMode.value,
|
|
5715
|
+
"has-frequently-used": p(I).hasFrequentlyUsed.value,
|
|
5716
|
+
onNavigate: p(F).navigateToFolder,
|
|
5717
|
+
onCreateFolder: p(I).handleCreateFolder,
|
|
5718
|
+
onRenameFolder: p(I).handleRenameFolder,
|
|
5719
|
+
onDeleteFolder: p(I).handleDeleteFolder,
|
|
5720
|
+
onShowFrequentlyUsed: p(F).showFrequentlyUsed
|
|
5721
5721
|
}, null, 8, [
|
|
5722
5722
|
"folders",
|
|
5723
5723
|
"current-folder-id",
|
|
@@ -5728,57 +5728,57 @@ var Ji = ["data-tpl-theme"], Yi = {
|
|
|
5728
5728
|
"onRenameFolder",
|
|
5729
5729
|
"onDeleteFolder",
|
|
5730
5730
|
"onShowFrequentlyUsed"
|
|
5731
|
-
])])) :
|
|
5731
|
+
])])) : u("", !0)]),
|
|
5732
5732
|
_: 1
|
|
5733
|
-
}),
|
|
5734
|
-
|
|
5733
|
+
}), y("div", ra, [y("div", ia, [y("div", aa, [
|
|
5734
|
+
A.value ? (o(), O("button", {
|
|
5735
5735
|
key: 0,
|
|
5736
5736
|
class: "tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:transition-all tpl:duration-150",
|
|
5737
|
-
style:
|
|
5738
|
-
color:
|
|
5739
|
-
backgroundColor:
|
|
5740
|
-
border:
|
|
5737
|
+
style: h({
|
|
5738
|
+
color: p(I).showSidebar.value ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
5739
|
+
backgroundColor: p(I).showSidebar.value ? "var(--tpl-bg)" : "transparent",
|
|
5740
|
+
border: p(I).showSidebar.value ? "1px solid var(--tpl-border)" : "1px solid transparent"
|
|
5741
5741
|
}),
|
|
5742
|
-
title:
|
|
5743
|
-
onClick: n[2] ||= (e) =>
|
|
5744
|
-
}, [
|
|
5742
|
+
title: p(I).showSidebar.value ? p(l).mediaLibrary.hideFolders : p(l).mediaLibrary.showFolders,
|
|
5743
|
+
onClick: n[2] ||= (e) => p(I).showSidebar.value = !p(I).showSidebar.value
|
|
5744
|
+
}, [k(p(pe), {
|
|
5745
5745
|
size: 16,
|
|
5746
5746
|
"stroke-width": 2
|
|
5747
|
-
})], 12, oa)) :
|
|
5748
|
-
|
|
5747
|
+
})], 12, oa)) : u("", !0),
|
|
5748
|
+
p(F).viewMode.value === "frequently-used" ? (o(), O("span", sa, _(p(l).mediaLibrary.frequentlyUsed), 1)) : (o(), v(Te, {
|
|
5749
5749
|
key: 2,
|
|
5750
|
-
folders:
|
|
5751
|
-
"current-folder-id":
|
|
5752
|
-
onNavigate:
|
|
5750
|
+
folders: p(F).folders.value,
|
|
5751
|
+
"current-folder-id": p(F).currentFolderId.value,
|
|
5752
|
+
onNavigate: p(F).navigateToFolder
|
|
5753
5753
|
}, null, 8, [
|
|
5754
5754
|
"folders",
|
|
5755
5755
|
"current-folder-id",
|
|
5756
5756
|
"onNavigate"
|
|
5757
5757
|
])),
|
|
5758
|
-
|
|
5758
|
+
y("div", ca, [y("button", {
|
|
5759
5759
|
class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:transition-all tpl:duration-150",
|
|
5760
|
-
style:
|
|
5761
|
-
color:
|
|
5762
|
-
backgroundColor:
|
|
5760
|
+
style: h({
|
|
5761
|
+
color: p(I).layoutMode.value === "grid" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
5762
|
+
backgroundColor: p(I).layoutMode.value === "grid" ? "var(--tpl-bg-elevated)" : "transparent"
|
|
5763
5763
|
}),
|
|
5764
|
-
title:
|
|
5765
|
-
onClick: n[3] ||= (e) =>
|
|
5766
|
-
}, [
|
|
5764
|
+
title: p(l).mediaLibrary.viewGrid,
|
|
5765
|
+
onClick: n[3] ||= (e) => p(I).layoutMode.value = "grid"
|
|
5766
|
+
}, [k(p(ge), {
|
|
5767
5767
|
size: 14,
|
|
5768
5768
|
"stroke-width": 2
|
|
5769
|
-
})], 12, la),
|
|
5769
|
+
})], 12, la), y("button", {
|
|
5770
5770
|
class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:transition-all tpl:duration-150",
|
|
5771
|
-
style:
|
|
5772
|
-
color:
|
|
5773
|
-
backgroundColor:
|
|
5771
|
+
style: h({
|
|
5772
|
+
color: p(I).layoutMode.value === "list" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
5773
|
+
backgroundColor: p(I).layoutMode.value === "list" ? "var(--tpl-bg-elevated)" : "transparent"
|
|
5774
5774
|
}),
|
|
5775
|
-
title:
|
|
5776
|
-
onClick: n[4] ||= (e) =>
|
|
5777
|
-
}, [
|
|
5775
|
+
title: p(l).mediaLibrary.viewList,
|
|
5776
|
+
onClick: n[4] ||= (e) => p(I).layoutMode.value = "list"
|
|
5777
|
+
}, [k(p(he), {
|
|
5778
5778
|
size: 14,
|
|
5779
5779
|
"stroke-width": 2
|
|
5780
5780
|
})], 12, ua)])
|
|
5781
|
-
]),
|
|
5781
|
+
]), y("div", da, [p(ne).length > 1 ? (o(), O("select", {
|
|
5782
5782
|
key: 0,
|
|
5783
5783
|
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",
|
|
5784
5784
|
style: {
|
|
@@ -5786,36 +5786,36 @@ var Ji = ["data-tpl-theme"], Yi = {
|
|
|
5786
5786
|
"background-color": "var(--tpl-bg)",
|
|
5787
5787
|
color: "var(--tpl-text)"
|
|
5788
5788
|
},
|
|
5789
|
-
value:
|
|
5790
|
-
onChange: n[5] ||= (e) =>
|
|
5791
|
-
}, [
|
|
5789
|
+
value: p(F).categoryFilter.value ?? "",
|
|
5790
|
+
onChange: n[5] ||= (e) => p(F).filterByCategory(e.target.value || null)
|
|
5791
|
+
}, [y("option", pa, _(p(l).mediaLibrary.filterAll), 1), (o(!0), O(g, null, i(p(ne), (e) => (o(), O("option", {
|
|
5792
5792
|
key: e,
|
|
5793
5793
|
value: e
|
|
5794
|
-
},
|
|
5794
|
+
}, _(p(I).getCategoryLabel(e)), 9, ma))), 128))], 40, fa)) : u("", !0), y("select", {
|
|
5795
5795
|
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",
|
|
5796
5796
|
style: {
|
|
5797
5797
|
"border-color": "var(--tpl-border)",
|
|
5798
5798
|
"background-color": "var(--tpl-bg)",
|
|
5799
5799
|
color: "var(--tpl-text)"
|
|
5800
5800
|
},
|
|
5801
|
-
value:
|
|
5802
|
-
onChange: n[6] ||= (e) =>
|
|
5801
|
+
value: p(F).sortOption.value,
|
|
5802
|
+
onChange: n[6] ||= (e) => p(F).sortBy(e.target.value)
|
|
5803
5803
|
}, [
|
|
5804
|
-
|
|
5805
|
-
|
|
5806
|
-
|
|
5807
|
-
|
|
5808
|
-
|
|
5809
|
-
|
|
5810
|
-
], 40, ha)])]),
|
|
5811
|
-
"is-uploading":
|
|
5812
|
-
"upload-progress":
|
|
5813
|
-
onUpload:
|
|
5804
|
+
y("option", ga, _(p(l).mediaLibrary.sortNewest), 1),
|
|
5805
|
+
y("option", _a, _(p(l).mediaLibrary.sortOldest), 1),
|
|
5806
|
+
y("option", va, _(p(l).mediaLibrary.sortNameAsc), 1),
|
|
5807
|
+
y("option", ya, _(p(l).mediaLibrary.sortNameDesc), 1),
|
|
5808
|
+
y("option", ba, _(p(l).mediaLibrary.sortSizeAsc), 1),
|
|
5809
|
+
y("option", xa, _(p(l).mediaLibrary.sortSizeDesc), 1)
|
|
5810
|
+
], 40, ha)])]), y("div", Sa, [p(F).viewMode.value === "files" ? (o(), O("div", Ca, [k(Vi, {
|
|
5811
|
+
"is-uploading": p(F).isUploading.value,
|
|
5812
|
+
"upload-progress": p(F).uploadProgress.value,
|
|
5813
|
+
onUpload: p(I).handleUpload
|
|
5814
5814
|
}, null, 8, [
|
|
5815
5815
|
"is-uploading",
|
|
5816
5816
|
"upload-progress",
|
|
5817
5817
|
"onUpload"
|
|
5818
|
-
]), j.value ? (
|
|
5818
|
+
]), j.value ? (o(), O("button", {
|
|
5819
5819
|
key: 0,
|
|
5820
5820
|
class: "tpl:mt-2 tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:border-dashed tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
5821
5821
|
style: {
|
|
@@ -5823,22 +5823,22 @@ var Ji = ["data-tpl-theme"], Yi = {
|
|
|
5823
5823
|
color: "var(--tpl-text-muted)",
|
|
5824
5824
|
"background-color": "var(--tpl-bg)"
|
|
5825
5825
|
},
|
|
5826
|
-
onClick: n[7] ||= (e) =>
|
|
5827
|
-
}, [
|
|
5826
|
+
onClick: n[7] ||= (e) => p(I).showImportUrlModal.value = !0
|
|
5827
|
+
}, [k(p(fe), {
|
|
5828
5828
|
size: 14,
|
|
5829
5829
|
"stroke-width": 2
|
|
5830
|
-
}),
|
|
5831
|
-
items:
|
|
5832
|
-
"selected-ids":
|
|
5833
|
-
"is-loading":
|
|
5834
|
-
"has-more":
|
|
5830
|
+
}), d(" " + _(p(l).mediaLibrary.importFromUrl), 1)])) : u("", !0)])) : u("", !0), k(qr, {
|
|
5831
|
+
items: p(I).displayItems.value,
|
|
5832
|
+
"selected-ids": p(F).selectedItems.value,
|
|
5833
|
+
"is-loading": p(F).isLoading.value,
|
|
5834
|
+
"has-more": p(F).viewMode.value === "files" && p(F).hasMore.value,
|
|
5835
5835
|
accept: e.accept,
|
|
5836
|
-
layout:
|
|
5837
|
-
onSelect:
|
|
5838
|
-
onToggle:
|
|
5839
|
-
onLoadMore:
|
|
5840
|
-
onEdit:
|
|
5841
|
-
onReplace:
|
|
5836
|
+
layout: p(I).layoutMode.value,
|
|
5837
|
+
onSelect: p(I).handleSelect,
|
|
5838
|
+
onToggle: p(F).toggleSelection,
|
|
5839
|
+
onLoadMore: p(F).loadMore,
|
|
5840
|
+
onEdit: p(I).handleEditItem,
|
|
5841
|
+
onReplace: p(I).handleReplaceItem
|
|
5842
5842
|
}, null, 8, [
|
|
5843
5843
|
"items",
|
|
5844
5844
|
"selected-ids",
|
|
@@ -5852,36 +5852,36 @@ var Ji = ["data-tpl-theme"], Yi = {
|
|
|
5852
5852
|
"onEdit",
|
|
5853
5853
|
"onReplace"
|
|
5854
5854
|
])])])]),
|
|
5855
|
-
|
|
5856
|
-
visible:
|
|
5857
|
-
"is-importing":
|
|
5858
|
-
error:
|
|
5859
|
-
onImport:
|
|
5860
|
-
onClose: n[8] ||= (e) =>
|
|
5855
|
+
k(ai, {
|
|
5856
|
+
visible: p(I).showImportUrlModal.value,
|
|
5857
|
+
"is-importing": p(F).isImportingFromUrl.value,
|
|
5858
|
+
error: p(F).importFromUrlError.value,
|
|
5859
|
+
onImport: p(I).handleImportFromUrl,
|
|
5860
|
+
onClose: n[8] ||= (e) => p(I).showImportUrlModal.value = !1
|
|
5861
5861
|
}, null, 8, [
|
|
5862
5862
|
"visible",
|
|
5863
5863
|
"is-importing",
|
|
5864
5864
|
"error",
|
|
5865
5865
|
"onImport"
|
|
5866
5866
|
]),
|
|
5867
|
-
|
|
5868
|
-
visible: !!
|
|
5869
|
-
item:
|
|
5870
|
-
onSave:
|
|
5871
|
-
onClose: n[9] ||= (e) =>
|
|
5867
|
+
k(rr, {
|
|
5868
|
+
visible: !!p(I).editingItem.value,
|
|
5869
|
+
item: p(I).editingItem.value,
|
|
5870
|
+
onSave: p(I).handleEditSave,
|
|
5871
|
+
onClose: n[9] ||= (e) => p(I).editingItem.value = null
|
|
5872
5872
|
}, null, 8, [
|
|
5873
5873
|
"visible",
|
|
5874
5874
|
"item",
|
|
5875
5875
|
"onSave"
|
|
5876
5876
|
]),
|
|
5877
|
-
|
|
5878
|
-
visible:
|
|
5879
|
-
item:
|
|
5880
|
-
"usage-info":
|
|
5881
|
-
"is-replacing":
|
|
5882
|
-
error:
|
|
5883
|
-
onReplace:
|
|
5884
|
-
onClose:
|
|
5877
|
+
k(Ii, {
|
|
5878
|
+
visible: p(F).showReplaceWarning.value,
|
|
5879
|
+
item: p(F).pendingReplaceItem.value,
|
|
5880
|
+
"usage-info": p(F).replaceUsageInfo.value,
|
|
5881
|
+
"is-replacing": p(F).isReplacing.value,
|
|
5882
|
+
error: p(F).replaceError.value,
|
|
5883
|
+
onReplace: p(I).handleReplaceFile,
|
|
5884
|
+
onClose: p(F).cancelReplace
|
|
5885
5885
|
}, null, 8, [
|
|
5886
5886
|
"visible",
|
|
5887
5887
|
"item",
|
|
@@ -5891,7 +5891,7 @@ var Ji = ["data-tpl-theme"], Yi = {
|
|
|
5891
5891
|
"onReplace",
|
|
5892
5892
|
"onClose"
|
|
5893
5893
|
]),
|
|
5894
|
-
|
|
5894
|
+
k(C, {
|
|
5895
5895
|
"enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
|
|
5896
5896
|
"enter-from-class": "tpl:opacity-0",
|
|
5897
5897
|
"enter-to-class": "tpl:opacity-100",
|
|
@@ -5899,7 +5899,7 @@ var Ji = ["data-tpl-theme"], Yi = {
|
|
|
5899
5899
|
"leave-from-class": "tpl:opacity-100",
|
|
5900
5900
|
"leave-to-class": "tpl:opacity-0"
|
|
5901
5901
|
}, {
|
|
5902
|
-
default:
|
|
5902
|
+
default: c(() => [p(F).showDeleteWarning.value ? (o(), O("div", {
|
|
5903
5903
|
key: 0,
|
|
5904
5904
|
class: "tpl:absolute tpl:inset-0 tpl:z-10 tpl:flex tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-lg)]",
|
|
5905
5905
|
style: {
|
|
@@ -5907,85 +5907,85 @@ var Ji = ["data-tpl-theme"], Yi = {
|
|
|
5907
5907
|
"backdrop-filter": "blur(8px)",
|
|
5908
5908
|
"-webkit-backdrop-filter": "blur(8px)"
|
|
5909
5909
|
},
|
|
5910
|
-
onClick: n[12] ||=
|
|
5911
|
-
}, [
|
|
5912
|
-
|
|
5913
|
-
|
|
5914
|
-
class:
|
|
5910
|
+
onClick: n[12] ||= m((...e) => p(F).cancelDelete && p(F).cancelDelete(...e), ["self"])
|
|
5911
|
+
}, [y("div", wa, [
|
|
5912
|
+
y("h3", Ta, _(p(l).mediaLibrary.deleteWarningTitle), 1),
|
|
5913
|
+
y("p", {
|
|
5914
|
+
class: D(["tpl:text-xs", p(I).hasUsedFiles.value ? "tpl:mb-2" : "tpl:mb-4"]),
|
|
5915
5915
|
style: { color: "var(--tpl-text-muted)" }
|
|
5916
|
-
},
|
|
5917
|
-
|
|
5918
|
-
|
|
5916
|
+
}, _(p(l).mediaLibrary.deleteWarningMessage), 3),
|
|
5917
|
+
p(I).hasUsedFiles.value ? (o(), O("p", Ea, _(p(l).mediaLibrary.deleteWarningUsageNote), 1)) : u("", !0),
|
|
5918
|
+
p(I).hasUsedFiles.value ? (o(), O("div", Da, [(o(!0), O(g, null, i(p(F).deleteUsageInfo.value, (e, t) => (o(), O("div", {
|
|
5919
5919
|
key: t,
|
|
5920
5920
|
class: "tpl:text-xs",
|
|
5921
5921
|
style: { color: "var(--tpl-text)" }
|
|
5922
|
-
}, [e.template_count > 0 ? (
|
|
5923
|
-
|
|
5922
|
+
}, [e.template_count > 0 ? (o(), O(g, { key: 0 }, [y("span", Oa, _(p(I).displayItems.value.find((e) => e.id === t)?.filename || t), 1), y("span", ka, " - " + _(p(l).mediaLibrary.usedInTemplates.replace("{count}", e.template_count.toString())), 1)], 64)) : u("", !0)]))), 128))])) : u("", !0),
|
|
5923
|
+
y("div", Aa, [y("button", {
|
|
5924
5924
|
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",
|
|
5925
5925
|
style: {
|
|
5926
5926
|
"border-color": "var(--tpl-border)",
|
|
5927
5927
|
color: "var(--tpl-text)",
|
|
5928
5928
|
"background-color": "var(--tpl-bg)"
|
|
5929
5929
|
},
|
|
5930
|
-
onClick: n[10] ||= (...e) =>
|
|
5931
|
-
},
|
|
5930
|
+
onClick: n[10] ||= (...e) => p(F).cancelDelete && p(F).cancelDelete(...e)
|
|
5931
|
+
}, _(p(l).mediaLibrary.cancel), 1), y("button", {
|
|
5932
5932
|
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",
|
|
5933
5933
|
style: {
|
|
5934
5934
|
"border-color": "var(--tpl-danger)",
|
|
5935
5935
|
color: "var(--tpl-danger)",
|
|
5936
5936
|
"background-color": "var(--tpl-danger-light)"
|
|
5937
5937
|
},
|
|
5938
|
-
onClick: n[11] ||= (...e) =>
|
|
5939
|
-
},
|
|
5940
|
-
])])) :
|
|
5938
|
+
onClick: n[11] ||= (...e) => p(F).confirmDelete && p(F).confirmDelete(...e)
|
|
5939
|
+
}, _(p(I).hasUsedFiles.value ? p(l).mediaLibrary.deleteAnyway : p(l).mediaLibrary.confirmDelete), 1)])
|
|
5940
|
+
])])) : u("", !0)]),
|
|
5941
5941
|
_: 1
|
|
5942
5942
|
}),
|
|
5943
|
-
|
|
5943
|
+
y("div", ja, [y("div", Ma, [p(F).previewItem.value ? (o(), v(xi, {
|
|
5944
5944
|
key: 0,
|
|
5945
|
-
"selected-conversion":
|
|
5946
|
-
"onUpdate:selectedConversion": n[13] ||= (e) =>
|
|
5947
|
-
item:
|
|
5948
|
-
folders:
|
|
5945
|
+
"selected-conversion": p(I).selectedConversion.value,
|
|
5946
|
+
"onUpdate:selectedConversion": n[13] ||= (e) => p(I).selectedConversion.value = e,
|
|
5947
|
+
item: p(F).previewItem.value,
|
|
5948
|
+
folders: p(F).folders.value
|
|
5949
5949
|
}, null, 8, [
|
|
5950
5950
|
"selected-conversion",
|
|
5951
5951
|
"item",
|
|
5952
5952
|
"folders"
|
|
5953
|
-
])) :
|
|
5953
|
+
])) : u("", !0)]), y("div", Na, [p(F).selectedItems.value.size > 0 ? (o(), O("div", Pa, [p(F).previewItem.value ? (o(), O("button", {
|
|
5954
5954
|
key: 0,
|
|
5955
5955
|
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",
|
|
5956
|
-
style:
|
|
5957
|
-
borderColor:
|
|
5958
|
-
color:
|
|
5956
|
+
style: h({
|
|
5957
|
+
borderColor: p(I).copied.value ? "var(--tpl-success)" : "var(--tpl-border)",
|
|
5958
|
+
color: p(I).copied.value ? "var(--tpl-success)" : "var(--tpl-text)",
|
|
5959
5959
|
backgroundColor: "var(--tpl-bg)"
|
|
5960
5960
|
}),
|
|
5961
|
-
onClick: n[14] ||= (e) =>
|
|
5962
|
-
}, [
|
|
5961
|
+
onClick: n[14] ||= (e) => p(I).copy(p(I).selectedUrl.value)
|
|
5962
|
+
}, [p(I).copied.value ? (o(), v(p(M), {
|
|
5963
5963
|
key: 1,
|
|
5964
5964
|
size: 12,
|
|
5965
5965
|
"stroke-width": 2
|
|
5966
|
-
})) : (
|
|
5966
|
+
})) : (o(), v(p(P), {
|
|
5967
5967
|
key: 0,
|
|
5968
5968
|
size: 12,
|
|
5969
5969
|
"stroke-width": 2
|
|
5970
|
-
})),
|
|
5970
|
+
})), d(" " + _(p(I).copied.value ? p(l).mediaLibrary.copied : p(l).mediaLibrary.copyUrl), 1)], 4)) : u("", !0), A.value ? (o(), O("div", Fa, [y("button", {
|
|
5971
5971
|
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",
|
|
5972
5972
|
style: {
|
|
5973
5973
|
"border-color": "var(--tpl-border)",
|
|
5974
5974
|
color: "var(--tpl-text)",
|
|
5975
5975
|
"background-color": "var(--tpl-bg)"
|
|
5976
5976
|
},
|
|
5977
|
-
onClick: n[15] ||= (e) =>
|
|
5978
|
-
},
|
|
5977
|
+
onClick: n[15] ||= (e) => p(I).showMovePicker.value = !p(I).showMovePicker.value
|
|
5978
|
+
}, _(p(l).mediaLibrary.moveSelected), 1), p(I).showMovePicker.value ? (o(), v(ui, {
|
|
5979
5979
|
key: 0,
|
|
5980
|
-
folders:
|
|
5981
|
-
"current-folder-id":
|
|
5982
|
-
onSelect:
|
|
5983
|
-
onClose: n[16] ||= (e) =>
|
|
5980
|
+
folders: p(F).folders.value,
|
|
5981
|
+
"current-folder-id": p(F).currentFolderId.value,
|
|
5982
|
+
onSelect: p(I).handleMoveToFolder,
|
|
5983
|
+
onClose: n[16] ||= (e) => p(I).showMovePicker.value = !1
|
|
5984
5984
|
}, null, 8, [
|
|
5985
5985
|
"folders",
|
|
5986
5986
|
"current-folder-id",
|
|
5987
5987
|
"onSelect"
|
|
5988
|
-
])) :
|
|
5988
|
+
])) : u("", !0)])) : u("", !0)])) : u("", !0), y("div", Ia, [p(F).selectedItems.value.size > 0 ? (o(), O("button", {
|
|
5989
5989
|
key: 0,
|
|
5990
5990
|
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",
|
|
5991
5991
|
style: {
|
|
@@ -5993,8 +5993,8 @@ var Ji = ["data-tpl-theme"], Yi = {
|
|
|
5993
5993
|
color: "var(--tpl-danger)",
|
|
5994
5994
|
"background-color": "var(--tpl-danger-light)"
|
|
5995
5995
|
},
|
|
5996
|
-
onClick: n[17] ||= (...e) =>
|
|
5997
|
-
},
|
|
5996
|
+
onClick: n[17] ||= (...e) => p(I).handleDeleteClick && p(I).handleDeleteClick(...e)
|
|
5997
|
+
}, _(p(l).mediaLibrary.deleteSelected), 1)) : u("", !0), y("button", {
|
|
5998
5998
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:px-4 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:hover:opacity-90 tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50",
|
|
5999
5999
|
style: {
|
|
6000
6000
|
"background-color": "var(--tpl-primary)",
|
|
@@ -6002,8 +6002,8 @@ var Ji = ["data-tpl-theme"], Yi = {
|
|
|
6002
6002
|
},
|
|
6003
6003
|
disabled: !R(),
|
|
6004
6004
|
onClick: ie
|
|
6005
|
-
},
|
|
6006
|
-
])], 8, Ji)) :
|
|
6005
|
+
}, _(e.accept?.length ? p(l).mediaLibrary.selectImage : p(l).mediaLibrary.selectFile), 9, La)])])])
|
|
6006
|
+
])], 8, Ji)) : u("", !0)]),
|
|
6007
6007
|
_: 1
|
|
6008
6008
|
})]));
|
|
6009
6009
|
}
|
|
@@ -6011,4 +6011,4 @@ var Ji = ["data-tpl-theme"], Yi = {
|
|
|
6011
6011
|
//#endregion
|
|
6012
6012
|
export { Ii as a, ai as c, rr as d, Ee as f, be as g, xe as h, Vi as i, qr as l, z as m, qi as n, xi as o, Te as p, Ki as r, ui as s, Ra as t, gr as u };
|
|
6013
6013
|
|
|
6014
|
-
//# sourceMappingURL=media-library-
|
|
6014
|
+
//# sourceMappingURL=media-library-BTF_Ko70.js.map
|