@templatical/media-library 0.47.0 → 0.49.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
- import { A as e, B as t, C as n, D as r, E as i, F as a, H as o, J as s, K as c, L as l, M as u, N as d, O as f, P as p, R as m, T as h, U as g, W as _, X as v, Z as y, _ as b, a as x, b as S, c as C, ct as w, d as T, dt as E, f as D, g as O, h as k, i as A, j, k as M, l as N, lt as P, m as F, n as I, nt as L, o as R, ot as z, p as ee, r as B, s as te, st as ne, t as re, u as ie, ut as V, v as H, w as U, x as W, y as G } from "./chunks/icons-DguitJC3.js";
2
- import { a as ae, c as oe, d as se, f as K, h as q, i as ce, l as J, m as Y, n as le, o as X, p as ue, r as de, s as fe, t as pe, u as Z } from "./chunks/useFocusTrap-BUSIXuO2.js";
1
+ import { A as e, B as t, C as n, D as r, E as i, F as a, H as o, J as s, K as c, L as l, M as u, N as d, O as f, P as p, R as m, T as h, U as g, W as _, X as v, Z as y, _ as b, a as x, b as S, c as C, ct as w, d as T, dt as E, f as D, g as O, h as k, i as A, j, k as M, l as N, lt as P, m as F, n as I, nt as L, o as R, ot as ee, p as te, r as ne, s as z, st as re, t as ie, u as B, ut as V, v as H, w as U, x as W, y as G } from "./chunks/icons-DLCuxwU3.js";
2
+ import { a as ae, c as oe, d as se, f as K, h as q, i as ce, l as J, m as Y, n as le, o as X, p as ue, r as de, s as fe, t as pe, u as Z } from "./chunks/useFocusTrap-CgCf46Fo.js";
3
3
  //#region src/components/media/MediaBreadcrumb.vue?vue&type=script&setup=true&lang.ts
4
4
  var me = {
5
5
  key: 0,
@@ -80,19 +80,19 @@ var me = {
80
80
  let e = m.value.trim();
81
81
  e && e !== a.folder.name && s("renameFolder", a.folder.id, e), p.value = !1, m.value = "";
82
82
  }
83
- function z() {
83
+ function ee() {
84
84
  p.value = !1, m.value = "";
85
85
  }
86
- function ee() {
86
+ function te() {
87
87
  g.value = !0, v.value = "", u.value = !0;
88
88
  }
89
- function ne() {
89
+ function re() {
90
90
  v.value.trim() && s("createFolder", v.value.trim(), a.folder.id), g.value = !1, v.value = "";
91
91
  }
92
- function re() {
92
+ function ie() {
93
93
  g.value = !1, v.value = "";
94
94
  }
95
- function ie() {
95
+ function B() {
96
96
  x.value ? (s("deleteFolder", a.folder.id), x.value = !1) : x.value = !0;
97
97
  }
98
98
  function H(e) {
@@ -142,7 +142,7 @@ var me = {
142
142
  color: "var(--tpl-text)"
143
143
  },
144
144
  autofocus: "",
145
- onKeydown: [n(R, ["enter"]), n(U(z, ["stop"]), ["escape"])],
145
+ onKeydown: [n(R, ["enter"]), n(U(ee, ["stop"]), ["escape"])],
146
146
  onBlur: R,
147
147
  onClick: i[2] ||= U(() => {}, ["stop"])
148
148
  }, null, 40, xe)), [[W, m.value]]) : e("", !0),
@@ -156,8 +156,8 @@ var me = {
156
156
  class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
157
157
  title: w(l).mediaLibrary.addSubfolder,
158
158
  "aria-label": w(l).mediaLibrary.addSubfolder,
159
- onClick: U(ee, ["stop"])
160
- }, [d(w(te), {
159
+ onClick: U(te, ["stop"])
160
+ }, [d(w(z), {
161
161
  size: 12,
162
162
  "stroke-width": 2
163
163
  })], 8, Se)) : e("", !0),
@@ -179,8 +179,8 @@ var me = {
179
179
  class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
180
180
  title: x.value ? w(l).mediaLibrary.deleteFolderConfirm : w(l).mediaLibrary.deleteFolder,
181
181
  "aria-label": x.value ? w(l).mediaLibrary.deleteFolderConfirm : w(l).mediaLibrary.deleteFolder,
182
- onClick: U(ie, ["stop"])
183
- }, [d(w(B), {
182
+ onClick: U(B, ["stop"])
183
+ }, [d(w(ne), {
184
184
  size: 12,
185
185
  "stroke-width": 2,
186
186
  style: { color: "var(--tpl-danger)" }
@@ -220,8 +220,8 @@ var me = {
220
220
  },
221
221
  placeholder: w(l).mediaLibrary.subfolderName,
222
222
  autofocus: "",
223
- onKeydown: [n(ne, ["enter"]), n(U(re, ["stop"]), ["escape"])],
224
- onBlur: ne
223
+ onKeydown: [n(re, ["enter"]), n(U(ie, ["stop"]), ["escape"])],
224
+ onBlur: re
225
225
  }, null, 40, Ee), [[W, v.value]])], 4)) : e("", !0)])) : e("", !0)]);
226
226
  };
227
227
  }
@@ -310,7 +310,7 @@ var me = {
310
310
  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",
311
311
  style: { color: "var(--tpl-text-muted)" },
312
312
  onClick: l
313
- }, [d(w(te), {
313
+ }, [d(w(z), {
314
314
  size: 14,
315
315
  "stroke-width": 1.5
316
316
  }), u(" " + E(w(a).mediaLibrary.newFolder), 1)])) : e("", !0),
@@ -655,15 +655,15 @@ var Fe = { class: "tpl:p-4" }, Ie = ["aria-label"], Le = {
655
655
  function S(e) {
656
656
  return r.selectedIds.has(e.id);
657
657
  }
658
- function D(e) {
658
+ function T(e) {
659
659
  return S(e) ? "tpl:opacity-100" : "tpl:opacity-0 tpl:group-hover:opacity-100 tpl:group-focus-within:opacity-100";
660
660
  }
661
- let { t: O } = Z(), A = m(Y, null), N = L(null);
662
- fe(N, ([{ isIntersecting: e }]) => {
661
+ let { t: D } = Z(), O = m(Y, null), A = L(null);
662
+ fe(A, ([{ isIntersecting: e }]) => {
663
663
  e && r.hasMore && !r.isLoading && i("loadMore");
664
664
  }, { threshold: .1 });
665
- function F(e) {
666
- return Ne(e, A?.value, {
665
+ function N(e) {
666
+ return Ne(e, O?.value, {
667
667
  year: "numeric",
668
668
  month: "short",
669
669
  day: "numeric"
@@ -674,7 +674,7 @@ var Fe = { class: "tpl:p-4" }, Ie = ["aria-label"], Le = {
674
674
  key: 0,
675
675
  role: "status",
676
676
  "aria-busy": "true",
677
- "aria-label": w(O).mediaLibrary.loading,
677
+ "aria-label": w(D).mediaLibrary.loading,
678
678
  class: P(t.layout === "list" ? "tpl:flex tpl:flex-col tpl:gap-1" : "tpl:grid tpl:grid-cols-4 tpl:gap-3")
679
679
  }, [(o(), j(h, null, _(8, (e) => f("div", {
680
680
  key: e,
@@ -686,10 +686,10 @@ var Fe = { class: "tpl:p-4" }, Ie = ["aria-label"], Le = {
686
686
  size: 40,
687
687
  "stroke-width": 1,
688
688
  style: { color: "var(--tpl-text-dim)" }
689
- }), f("p", Re, E(t.searchQuery ? w(O).mediaLibrary.noSearchResults : w(O).mediaLibrary.noFiles), 1)])) : t.layout === "list" ? (o(), j("div", {
689
+ }), f("p", Re, E(t.searchQuery ? w(D).mediaLibrary.noSearchResults : w(D).mediaLibrary.noFiles), 1)])) : t.layout === "list" ? (o(), j("div", {
690
690
  key: 3,
691
691
  role: "listbox",
692
- "aria-label": w(O).mediaLibrary.filesListAriaLabel,
692
+ "aria-label": w(D).mediaLibrary.filesListAriaLabel,
693
693
  "aria-multiselectable": "true",
694
694
  class: "tpl:flex tpl:flex-col tpl:gap-1"
695
695
  }, [(o(!0), j(h, null, _(t.items, (t) => (o(), j("div", {
@@ -715,17 +715,17 @@ var Fe = { class: "tpl:p-4" }, Ie = ["aria-label"], Le = {
715
715
  }, null, 8, et)) : (o(), j("div", tt, [d(Me, { "mime-type": c(t) }, null, 8, ["mime-type"])]))]),
716
716
  f("div", nt, [f("p", rt, E(t.filename || t.url), 1), f("p", it, [
717
717
  t.size == null ? e("", !0) : (o(), j(h, { key: 0 }, [u(E(w(Q)(t.size)), 1)], 64)),
718
- t.createdAt ? (o(), j(h, { key: 1 }, [t.size == null ? e("", !0) : (o(), j(h, { key: 0 }, [u(" · ")], 64)), u(" " + E(F(t.createdAt)), 1)], 64)) : e("", !0),
718
+ t.createdAt ? (o(), j(h, { key: 1 }, [t.size == null ? e("", !0) : (o(), j(h, { key: 0 }, [u(" · ")], 64)), u(" " + E(N(t.createdAt)), 1)], 64)) : e("", !0),
719
719
  w(s)(c(t)) && t.width && t.height ? (o(), j(h, { key: 2 }, [u(" · " + E(t.width) + "×" + E(t.height), 1)], 64)) : e("", !0)
720
720
  ])]),
721
- f("div", { class: P(["tpl:flex tpl:gap-1 tpl:transition-opacity tpl:duration-150", D(t)]) }, [g(t) ? (o(), j("button", {
721
+ f("div", { class: P(["tpl:flex tpl:gap-1 tpl:transition-opacity tpl:duration-150", T(t)]) }, [g(t) ? (o(), j("button", {
722
722
  key: 0,
723
723
  type: "button",
724
724
  "data-testid": "media-edit",
725
725
  class: "tpl:flex tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded",
726
726
  style: { color: "var(--tpl-text-muted)" },
727
- title: w(O).mediaLibrary.editFile,
728
- "aria-label": w(O).mediaLibrary.editFile,
727
+ title: w(D).mediaLibrary.editFile,
728
+ "aria-label": w(D).mediaLibrary.editFile,
729
729
  onClick: U((e) => i("edit", t), ["stop"])
730
730
  }, [d(w(C), {
731
731
  size: 12,
@@ -736,8 +736,8 @@ var Fe = { class: "tpl:p-4" }, Ie = ["aria-label"], Le = {
736
736
  "data-testid": "media-replace",
737
737
  class: "tpl:flex tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded",
738
738
  style: { color: "var(--tpl-text-muted)" },
739
- title: w(O).mediaLibrary.replaceFile,
740
- "aria-label": w(O).mediaLibrary.replaceFile,
739
+ title: w(D).mediaLibrary.replaceFile,
740
+ "aria-label": w(D).mediaLibrary.replaceFile,
741
741
  onClick: U((e) => i("replace", t), ["stop"])
742
742
  }, [d(w(R), {
743
743
  size: 12,
@@ -750,7 +750,7 @@ var Fe = { class: "tpl:p-4" }, Ie = ["aria-label"], Le = {
750
750
  ], 46, Qe))), 128))], 8, Ze)) : (o(), j("div", {
751
751
  key: 2,
752
752
  role: "listbox",
753
- "aria-label": w(O).mediaLibrary.filesListAriaLabel,
753
+ "aria-label": w(D).mediaLibrary.filesListAriaLabel,
754
754
  "aria-multiselectable": "true",
755
755
  class: "tpl:grid tpl:grid-cols-4 tpl:gap-3"
756
756
  }, [(o(!0), j(h, null, _(t.items, (t) => (o(), j("div", {
@@ -785,7 +785,7 @@ var Fe = { class: "tpl:p-4" }, Ie = ["aria-label"], Le = {
785
785
  "mime-type": c(t)
786
786
  }, null, 8, ["mime-type"]))]),
787
787
  f("div", Ue, [f("p", We, E(t.filename || t.url), 1), f("p", Ge, [t.size == null ? e("", !0) : (o(), j("span", Ke, E(w(Q)(t.size)), 1)), w(s)(c(t)) && t.width && t.height ? (o(), j("span", qe, E(t.width) + "×" + E(t.height), 1)) : e("", !0)])]),
788
- f("div", { class: P(["tpl:absolute tpl:top-1.5 tpl:left-1.5 tpl:flex tpl:gap-1 tpl:transition-opacity tpl:duration-150", D(t)]) }, [g(t) ? (o(), j("button", {
788
+ f("div", { class: P(["tpl:absolute tpl:top-1.5 tpl:left-1.5 tpl:flex tpl:gap-1 tpl:transition-opacity tpl:duration-150", T(t)]) }, [g(t) ? (o(), j("button", {
789
789
  key: 0,
790
790
  type: "button",
791
791
  "data-testid": "media-edit",
@@ -794,8 +794,8 @@ var Fe = { class: "tpl:p-4" }, Ie = ["aria-label"], Le = {
794
794
  "background-color": "var(--tpl-overlay)",
795
795
  color: "var(--tpl-on-primary)"
796
796
  },
797
- title: w(O).mediaLibrary.editFile,
798
- "aria-label": w(O).mediaLibrary.editFile,
797
+ title: w(D).mediaLibrary.editFile,
798
+ "aria-label": w(D).mediaLibrary.editFile,
799
799
  onClick: U((e) => i("edit", t), ["stop"])
800
800
  }, [d(w(C), {
801
801
  size: 11,
@@ -809,8 +809,8 @@ var Fe = { class: "tpl:p-4" }, Ie = ["aria-label"], Le = {
809
809
  "background-color": "var(--tpl-overlay)",
810
810
  color: "var(--tpl-on-primary)"
811
811
  },
812
- title: w(O).mediaLibrary.replaceFile,
813
- "aria-label": w(O).mediaLibrary.replaceFile,
812
+ title: w(D).mediaLibrary.replaceFile,
813
+ "aria-label": w(D).mediaLibrary.replaceFile,
814
814
  onClick: U((e) => i("replace", t), ["stop"])
815
815
  }, [d(w(R), {
816
816
  size: 11,
@@ -823,10 +823,10 @@ var Fe = { class: "tpl:p-4" }, Ie = ["aria-label"], Le = {
823
823
  ], 46, Be))), 128))], 8, ze)),
824
824
  f("div", {
825
825
  ref_key: "sentinelRef",
826
- ref: N,
826
+ ref: A,
827
827
  class: "tpl:h-4"
828
828
  }, null, 512),
829
- t.isLoading && t.items.length > 0 ? (o(), j("div", ct, [d(w(T), {
829
+ t.isLoading && t.items.length > 0 ? (o(), j("div", ct, [d(w(B), {
830
830
  class: "tpl-spinner",
831
831
  size: 20,
832
832
  "stroke-width": 2,
@@ -937,7 +937,7 @@ var Fe = { class: "tpl:p-4" }, Ie = ["aria-label"], Le = {
937
937
  },
938
938
  disabled: !g.value.trim() || t.isImporting,
939
939
  onClick: _
940
- }, [t.isImporting ? (o(), j("span", vt, [d(w(T), {
940
+ }, [t.isImporting ? (o(), j("span", vt, [d(w(B), {
941
941
  class: "tpl:animate-spin",
942
942
  size: 12,
943
943
  "stroke-width": 2
@@ -1277,11 +1277,11 @@ var Jt = [
1277
1277
  }
1278
1278
  let { isOverDropZone: C } = ae(x, { onDrop: (e) => {
1279
1279
  e?.length && S(e);
1280
- } }), { open: D, onChange: O } = X({
1280
+ } }), { open: T, onChange: D } = X({
1281
1281
  accept: l.value,
1282
1282
  multiple: !0
1283
1283
  });
1284
- return O((e) => {
1284
+ return D((e) => {
1285
1285
  e?.length && S(e);
1286
1286
  }), (n, r) => (o(), j(h, null, [f("button", {
1287
1287
  ref_key: "dropZoneRef",
@@ -1296,8 +1296,8 @@ var Jt = [
1296
1296
  "border-color": "var(--tpl-border-light)",
1297
1297
  "background-color": "var(--tpl-bg)"
1298
1298
  },
1299
- onClick: r[0] ||= (e) => w(D)()
1300
- }, [t.isUploading ? (o(), j("div", Yt, [d(w(T), {
1299
+ onClick: r[0] ||= (e) => w(T)()
1300
+ }, [t.isUploading ? (o(), j("div", Yt, [d(w(B), {
1301
1301
  class: "tpl-spinner",
1302
1302
  size: 20,
1303
1303
  "stroke-width": 2,
@@ -1530,7 +1530,7 @@ function un(e) {
1530
1530
  return t.folders === !1 ? null : t.folders;
1531
1531
  }
1532
1532
  function j() {
1533
- return ne(e.templateId);
1533
+ return re(e.templateId);
1534
1534
  }
1535
1535
  function M(e) {
1536
1536
  let t = {};
@@ -1578,13 +1578,13 @@ function un(e) {
1578
1578
  async function R(e) {
1579
1579
  c.value = e, await N();
1580
1580
  }
1581
- async function z(e) {
1581
+ async function ee(e) {
1582
1582
  a.value = "files", i.value = e, o.value = "", m.value = /* @__PURE__ */ new Set(), h.value = null, await N();
1583
1583
  }
1584
- async function ee() {
1584
+ async function te() {
1585
1585
  a.value = "frequently-used", i.value = null, o.value = "", m.value = /* @__PURE__ */ new Set(), h.value = null, await W();
1586
1586
  }
1587
- async function B(r) {
1587
+ async function ne(r) {
1588
1588
  let { create: a } = t;
1589
1589
  if (typeof a != "function") return null;
1590
1590
  u.value = !0;
@@ -1601,7 +1601,7 @@ function un(e) {
1601
1601
  u.value = !1;
1602
1602
  }
1603
1603
  }
1604
- async function te(r) {
1604
+ async function z(r) {
1605
1605
  let { create: a } = t;
1606
1606
  if (typeof a == "function") {
1607
1607
  u.value = !0, p.value = {
@@ -1630,7 +1630,7 @@ function un(e) {
1630
1630
  }
1631
1631
  }
1632
1632
  }
1633
- async function re(t) {
1633
+ async function ie(t) {
1634
1634
  if (m.value.size === 0) return;
1635
1635
  let { move: r } = A() ?? { move: !1 };
1636
1636
  if (typeof r == "function") try {
@@ -1644,7 +1644,7 @@ function un(e) {
1644
1644
  e.onError?.(t);
1645
1645
  }
1646
1646
  }
1647
- async function ie(r, i, a) {
1647
+ async function B(r, i, a) {
1648
1648
  let { update: o } = t;
1649
1649
  if (typeof o != "function") return !1;
1650
1650
  try {
@@ -1848,12 +1848,12 @@ function un(e) {
1848
1848
  search: F,
1849
1849
  filterByCategory: I,
1850
1850
  sortBy: R,
1851
- navigateToFolder: z,
1852
- showFrequentlyUsed: ee,
1853
- uploadFile: B,
1854
- uploadFiles: te,
1855
- moveSelected: re,
1856
- updateFile: ie,
1851
+ navigateToFolder: ee,
1852
+ showFrequentlyUsed: te,
1853
+ uploadFile: ne,
1854
+ uploadFiles: z,
1855
+ moveSelected: ie,
1856
+ updateFile: B,
1857
1857
  deleteSelected: U,
1858
1858
  isImportingFromUrl: b,
1859
1859
  importFromUrlError: x,
@@ -1978,7 +1978,7 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
1978
1978
  "ready"
1979
1979
  ],
1980
1980
  setup(n, { expose: i, emit: a }) {
1981
- let c = n, l = a, m = p(() => import("./chunks/MediaEditModal-D1CSgHzw.js")), y = r(() => c.translations), b = r(() => c.confirmTestId ?? "media-confirm"), S = {
1981
+ let c = n, l = a, m = p(() => import("./chunks/MediaEditModal-YS0krk_E.js")), y = r(() => c.translations), b = r(() => c.confirmTestId ?? "media-confirm"), S = {
1982
1982
  get maxFileSize() {
1983
1983
  return c.provider.maxFileSize;
1984
1984
  },
@@ -1990,14 +1990,14 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
1990
1990
  }
1991
1991
  };
1992
1992
  g(se, S);
1993
- let { isAcceptedMimeType: C, availableCategories: T } = J(S), k = un({
1993
+ let { isAcceptedMimeType: C, availableCategories: k } = J(S), A = un({
1994
1994
  provider: c.provider,
1995
1995
  templateId: () => c.templateId,
1996
1996
  onError: (e) => c.onError?.(e)
1997
- }), A = ln({
1998
- library: k,
1997
+ }), F = ln({
1998
+ library: A,
1999
1999
  translations: y
2000
- }), F = r(() => typeof c.provider.create == "function"), I = r(() => c.provider.folders !== !1), L = r(() => typeof c.provider.importFromUrl == "function"), R = r(() => typeof c.provider.delete == "function"), z = r(() => typeof c.provider.update == "function"), B = r(() => typeof c.provider.replace == "function"), te = r(() => typeof c.provider.frequentlyUsed == "function"), ne = r(() => {
2000
+ }), I = r(() => typeof c.provider.create == "function"), L = r(() => c.provider.folders !== !1), R = r(() => typeof c.provider.importFromUrl == "function"), ee = r(() => typeof c.provider.delete == "function"), ne = r(() => typeof c.provider.update == "function"), z = r(() => typeof c.provider.replace == "function"), re = r(() => typeof c.provider.frequentlyUsed == "function"), B = r(() => {
2001
2001
  let e = c.provider.folders;
2002
2002
  return e !== !1 && typeof e.move == "function";
2003
2003
  }), W = r(() => {
@@ -2009,48 +2009,48 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2009
2009
  }), oe = r(() => {
2010
2010
  let e = c.provider.folders;
2011
2011
  return e !== !1 && typeof e.delete == "function";
2012
- }), K = r(() => k.isLoading.value && A.displayItems.value.length === 0), q = r(() => {
2013
- let e = k.previewItem.value;
2012
+ }), K = r(() => A.isLoading.value && F.displayItems.value.length === 0), q = r(() => {
2013
+ let e = A.previewItem.value;
2014
2014
  return e ? !c.accept?.length || C(e.mimeType ?? "", c.accept) : !1;
2015
2015
  }), ce = r(() => {
2016
- if (!R.value) return 0;
2016
+ if (!ee.value) return 0;
2017
2017
  let e = 0;
2018
- for (let t of k.selectedItems.value) A.displayItems.value.find((e) => e.id === t)?.canDelete !== !1 && (e += 1);
2018
+ for (let t of A.selectedItems.value) F.displayItems.value.find((e) => e.id === t)?.canDelete !== !1 && (e += 1);
2019
2019
  return e;
2020
- }), Y = r(() => A.showImportUrlModal.value || A.editingItem.value !== null || k.showReplaceWarning.value);
2020
+ }), Y = r(() => F.showImportUrlModal.value || F.editingItem.value !== null || A.showReplaceWarning.value);
2021
2021
  function le() {
2022
- return Y.value ? !0 : A.showMovePicker.value ? (A.showMovePicker.value = !1, !0) : k.showDeleteWarning.value ? (k.cancelDelete(), !0) : !1;
2022
+ return Y.value ? !0 : F.showMovePicker.value ? (F.showMovePicker.value = !1, !0) : A.showDeleteWarning.value ? (A.cancelDelete(), !0) : !1;
2023
2023
  }
2024
2024
  function X() {
2025
- q.value && k.previewItem.value && l("confirm", k.previewItem.value);
2025
+ q.value && A.previewItem.value && l("confirm", A.previewItem.value);
2026
2026
  }
2027
2027
  function ue(e) {
2028
- k.filterByCategory(e.target.value || null);
2028
+ A.filterByCategory(e.target.value || null);
2029
2029
  }
2030
2030
  async function de() {
2031
2031
  let e = /* @__PURE__ */ new Set();
2032
- for (let t of k.selectedItems.value) A.displayItems.value.find((e) => e.id === t)?.canDelete !== !1 && e.add(t);
2033
- k.selectedItems.value = e, await A.handleDeleteClick();
2032
+ for (let t of A.selectedItems.value) F.displayItems.value.find((e) => e.id === t)?.canDelete !== !1 && e.add(t);
2033
+ A.selectedItems.value = e, await F.handleDeleteClick();
2034
2034
  }
2035
2035
  return s(() => c.accept, (e) => {
2036
- e?.length === 1 && (k.categoryFilter.value = e[0]);
2037
- }, { immediate: !0 }), k.loadItems(), k.loadFrequentlyUsed(), k.loadStorage(), l("ready"), t(() => {
2038
- A.resetUI();
2036
+ e?.length === 1 && (A.categoryFilter.value = e[0]);
2037
+ }, { immediate: !0 }), A.loadItems(), A.loadFrequentlyUsed(), A.loadStorage(), l("ready"), t(() => {
2038
+ F.resetUI();
2039
2039
  }), i({
2040
2040
  nestedDialogOpen: Y,
2041
2041
  handleEscape: le,
2042
- library: k,
2043
- ui: A
2042
+ library: A,
2043
+ ui: F
2044
2044
  }), (t, r) => (o(), j("div", dn, [
2045
2045
  f("div", fn, [f("h2", pn, E(y.value.mediaLibrary.title), 1), f("div", mn, [
2046
- w(k).storageInfo.value ? (o(), M(sn, {
2046
+ w(A).storageInfo.value ? (o(), M(sn, {
2047
2047
  key: 0,
2048
- "used-bytes": w(k).storageInfo.value.usedBytes,
2049
- "limit-bytes": w(k).storageInfo.value.limitBytes,
2048
+ "used-bytes": w(A).storageInfo.value.usedBytes,
2049
+ "limit-bytes": w(A).storageInfo.value.limitBytes,
2050
2050
  size: 22
2051
2051
  }, null, 8, ["used-bytes", "limit-bytes"])) : e("", !0),
2052
2052
  f("div", hn, [f("input", {
2053
- value: w(A).searchInput.value,
2053
+ value: w(F).searchInput.value,
2054
2054
  type: "search",
2055
2055
  disabled: K.value,
2056
2056
  "aria-label": y.value.mediaLibrary.searchAriaLabel,
@@ -2061,7 +2061,7 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2061
2061
  color: "var(--tpl-text)"
2062
2062
  },
2063
2063
  placeholder: y.value.mediaLibrary.searchPlaceholder,
2064
- onInput: r[0] ||= (e) => w(A).handleSearchInput(e.target.value)
2064
+ onInput: r[0] ||= (e) => w(F).handleSearchInput(e.target.value)
2065
2065
  }, null, 40, gn), d(w(x), {
2066
2066
  class: "tpl:absolute tpl:top-1/2 tpl:left-2.5 tpl:-translate-y-1/2",
2067
2067
  size: 13,
@@ -2075,7 +2075,7 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2075
2075
  class: "tpl:flex tpl:size-7 tpl:items-center tpl:justify-center tpl:rounded-md tpl:transition-all tpl:duration-150",
2076
2076
  style: { color: "var(--tpl-text-muted)" },
2077
2077
  onClick: r[1] ||= (e) => l("close")
2078
- }, [d(w(re), {
2078
+ }, [d(w(ie), {
2079
2079
  size: 18,
2080
2080
  "stroke-width": 2
2081
2081
  })], 8, _n)) : e("", !0)
@@ -2088,19 +2088,19 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2088
2088
  "leave-from-class": "tpl:ml-0 tpl:opacity-100",
2089
2089
  "leave-to-class": "tpl:-ml-48 tpl:opacity-0"
2090
2090
  }, {
2091
- default: v(() => [I.value && w(A).showSidebar.value ? (o(), j("div", yn, [d(je, {
2092
- folders: w(A).folderTree.value,
2093
- "current-folder-id": w(k).currentFolderId.value,
2094
- "view-mode": w(k).viewMode.value,
2095
- "has-frequently-used": te.value && w(A).hasFrequentlyUsed.value,
2091
+ default: v(() => [L.value && w(F).showSidebar.value ? (o(), j("div", yn, [d(je, {
2092
+ folders: w(F).folderTree.value,
2093
+ "current-folder-id": w(A).currentFolderId.value,
2094
+ "view-mode": w(A).viewMode.value,
2095
+ "has-frequently-used": re.value && w(F).hasFrequentlyUsed.value,
2096
2096
  "can-create-folder": W.value,
2097
2097
  "can-rename-folder": ae.value,
2098
2098
  "can-delete-folder": oe.value,
2099
- onNavigate: w(k).navigateToFolder,
2100
- onCreateFolder: w(A).handleCreateFolder,
2101
- onRenameFolder: w(A).handleRenameFolder,
2102
- onDeleteFolder: w(A).handleDeleteFolder,
2103
- onShowFrequentlyUsed: w(k).showFrequentlyUsed
2099
+ onNavigate: w(A).navigateToFolder,
2100
+ onCreateFolder: w(F).handleCreateFolder,
2101
+ onRenameFolder: w(F).handleRenameFolder,
2102
+ onDeleteFolder: w(F).handleDeleteFolder,
2103
+ onShowFrequentlyUsed: w(A).showFrequentlyUsed
2104
2104
  }, null, 8, [
2105
2105
  "folders",
2106
2106
  "current-folder-id",
@@ -2117,29 +2117,29 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2117
2117
  ])])) : e("", !0)]),
2118
2118
  _: 1
2119
2119
  }), f("div", bn, [f("div", xn, [f("div", Sn, [
2120
- I.value ? (o(), j("button", {
2120
+ L.value ? (o(), j("button", {
2121
2121
  key: 0,
2122
2122
  type: "button",
2123
2123
  "data-testid": "media-folder-toggle",
2124
2124
  class: "tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:transition-all tpl:duration-150",
2125
2125
  style: V({
2126
- color: w(A).showSidebar.value ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
2127
- backgroundColor: w(A).showSidebar.value ? "var(--tpl-bg)" : "transparent",
2128
- border: w(A).showSidebar.value ? "1px solid var(--tpl-border)" : "1px solid transparent"
2126
+ color: w(F).showSidebar.value ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
2127
+ backgroundColor: w(F).showSidebar.value ? "var(--tpl-bg)" : "transparent",
2128
+ border: w(F).showSidebar.value ? "1px solid var(--tpl-border)" : "1px solid transparent"
2129
2129
  }),
2130
- title: w(A).showSidebar.value ? y.value.mediaLibrary.hideFolders : y.value.mediaLibrary.showFolders,
2131
- "aria-label": w(A).showSidebar.value ? y.value.mediaLibrary.hideFolders : y.value.mediaLibrary.showFolders,
2132
- "aria-pressed": w(A).showSidebar.value,
2133
- onClick: r[2] ||= (e) => w(A).showSidebar.value = !w(A).showSidebar.value
2130
+ title: w(F).showSidebar.value ? y.value.mediaLibrary.hideFolders : y.value.mediaLibrary.showFolders,
2131
+ "aria-label": w(F).showSidebar.value ? y.value.mediaLibrary.hideFolders : y.value.mediaLibrary.showFolders,
2132
+ "aria-pressed": w(F).showSidebar.value,
2133
+ onClick: r[2] ||= (e) => w(F).showSidebar.value = !w(F).showSidebar.value
2134
2134
  }, [d(w(N), {
2135
2135
  size: 16,
2136
2136
  "stroke-width": 2
2137
2137
  })], 12, Cn)) : e("", !0),
2138
- w(k).viewMode.value === "frequently-used" ? (o(), j("span", wn, E(y.value.mediaLibrary.frequentlyUsed), 1)) : (o(), M(_e, {
2138
+ w(A).viewMode.value === "frequently-used" ? (o(), j("span", wn, E(y.value.mediaLibrary.frequentlyUsed), 1)) : (o(), M(_e, {
2139
2139
  key: 2,
2140
- folders: w(A).folderTree.value,
2141
- "current-folder-id": w(k).currentFolderId.value,
2142
- onNavigate: w(k).navigateToFolder
2140
+ folders: w(F).folderTree.value,
2141
+ "current-folder-id": w(A).currentFolderId.value,
2142
+ onNavigate: w(A).navigateToFolder
2143
2143
  }, null, 8, [
2144
2144
  "folders",
2145
2145
  "current-folder-id",
@@ -2149,32 +2149,32 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2149
2149
  type: "button",
2150
2150
  class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:transition-all tpl:duration-150",
2151
2151
  style: V({
2152
- color: w(A).layoutMode.value === "grid" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
2153
- backgroundColor: w(A).layoutMode.value === "grid" ? "var(--tpl-bg-elevated)" : "transparent"
2152
+ color: w(F).layoutMode.value === "grid" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
2153
+ backgroundColor: w(F).layoutMode.value === "grid" ? "var(--tpl-bg-elevated)" : "transparent"
2154
2154
  }),
2155
2155
  title: y.value.mediaLibrary.viewGrid,
2156
2156
  "aria-label": y.value.mediaLibrary.viewGrid,
2157
- "aria-pressed": w(A).layoutMode.value === "grid",
2158
- onClick: r[3] ||= (e) => w(A).layoutMode.value = "grid"
2159
- }, [d(w(ee), {
2157
+ "aria-pressed": w(F).layoutMode.value === "grid",
2158
+ onClick: r[3] ||= (e) => w(F).layoutMode.value = "grid"
2159
+ }, [d(w(te), {
2160
2160
  size: 14,
2161
2161
  "stroke-width": 2
2162
2162
  })], 12, En), f("button", {
2163
2163
  type: "button",
2164
2164
  class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:transition-all tpl:duration-150",
2165
2165
  style: V({
2166
- color: w(A).layoutMode.value === "list" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
2167
- backgroundColor: w(A).layoutMode.value === "list" ? "var(--tpl-bg-elevated)" : "transparent"
2166
+ color: w(F).layoutMode.value === "list" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
2167
+ backgroundColor: w(F).layoutMode.value === "list" ? "var(--tpl-bg-elevated)" : "transparent"
2168
2168
  }),
2169
2169
  title: y.value.mediaLibrary.viewList,
2170
2170
  "aria-label": y.value.mediaLibrary.viewList,
2171
- "aria-pressed": w(A).layoutMode.value === "list",
2172
- onClick: r[4] ||= (e) => w(A).layoutMode.value = "list"
2173
- }, [d(w(ie), {
2171
+ "aria-pressed": w(F).layoutMode.value === "list",
2172
+ onClick: r[4] ||= (e) => w(F).layoutMode.value = "list"
2173
+ }, [d(w(T), {
2174
2174
  size: 14,
2175
2175
  "stroke-width": 2
2176
2176
  })], 12, Dn)])
2177
- ]), f("div", On, [w(T).length > 1 ? (o(), j("select", {
2177
+ ]), f("div", On, [w(k).length > 1 ? (o(), j("select", {
2178
2178
  key: 0,
2179
2179
  "aria-label": y.value.mediaLibrary.filterAriaLabel,
2180
2180
  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",
@@ -2183,21 +2183,21 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2183
2183
  "background-color": "var(--tpl-bg)",
2184
2184
  color: "var(--tpl-text)"
2185
2185
  },
2186
- value: w(k).categoryFilter.value ?? "",
2186
+ value: w(A).categoryFilter.value ?? "",
2187
2187
  onChange: ue
2188
- }, [f("option", An, E(y.value.mediaLibrary.filterAll), 1), (o(!0), j(h, null, _(w(T), (e) => (o(), j("option", {
2188
+ }, [f("option", An, E(y.value.mediaLibrary.filterAll), 1), (o(!0), j(h, null, _(w(k), (e) => (o(), j("option", {
2189
2189
  key: e,
2190
2190
  value: e
2191
- }, E(w(A).getCategoryLabel(e)), 9, jn))), 128))], 40, kn)) : e("", !0)])]), f("div", Mn, [w(k).viewMode.value === "files" && (F.value || L.value) ? (o(), j("div", Nn, [F.value ? (o(), M(en, {
2191
+ }, E(w(F).getCategoryLabel(e)), 9, jn))), 128))], 40, kn)) : e("", !0)])]), f("div", Mn, [w(A).viewMode.value === "files" && (I.value || R.value) ? (o(), j("div", Nn, [I.value ? (o(), M(en, {
2192
2192
  key: 0,
2193
- "is-uploading": w(k).isUploading.value,
2194
- "upload-progress": w(k).uploadProgress.value,
2195
- onUpload: w(A).handleUpload
2193
+ "is-uploading": w(A).isUploading.value,
2194
+ "upload-progress": w(A).uploadProgress.value,
2195
+ onUpload: w(F).handleUpload
2196
2196
  }, null, 8, [
2197
2197
  "is-uploading",
2198
2198
  "upload-progress",
2199
2199
  "onUpload"
2200
- ])) : e("", !0), L.value ? (o(), j("button", {
2200
+ ])) : e("", !0), R.value ? (o(), j("button", {
2201
2201
  key: 1,
2202
2202
  "data-testid": "media-import-url",
2203
2203
  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",
@@ -2206,25 +2206,25 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2206
2206
  color: "var(--tpl-text-muted)",
2207
2207
  "background-color": "var(--tpl-bg)"
2208
2208
  },
2209
- onClick: r[5] ||= (e) => w(A).showImportUrlModal.value = !0
2209
+ onClick: r[5] ||= (e) => w(F).showImportUrlModal.value = !0
2210
2210
  }, [d(w(D), {
2211
2211
  size: 14,
2212
2212
  "stroke-width": 2
2213
2213
  }), u(" " + E(y.value.mediaLibrary.importFromUrl), 1)])) : e("", !0)])) : e("", !0), d(lt, {
2214
- items: w(A).displayItems.value,
2215
- "selected-ids": w(k).selectedItems.value,
2216
- "is-loading": w(k).isLoading.value,
2217
- "has-more": w(k).viewMode.value === "files" && w(k).hasMore.value,
2214
+ items: w(F).displayItems.value,
2215
+ "selected-ids": w(A).selectedItems.value,
2216
+ "is-loading": w(A).isLoading.value,
2217
+ "has-more": w(A).viewMode.value === "files" && w(A).hasMore.value,
2218
2218
  accept: n.accept,
2219
- layout: w(A).layoutMode.value,
2220
- "search-query": w(k).searchQuery.value,
2221
- "can-update": z.value,
2222
- "can-replace": B.value,
2223
- onSelect: w(A).handleSelect,
2224
- onToggle: w(k).toggleSelection,
2225
- onLoadMore: w(k).loadMore,
2226
- onEdit: w(A).handleEditItem,
2227
- onReplace: w(A).handleReplaceItem,
2219
+ layout: w(F).layoutMode.value,
2220
+ "search-query": w(A).searchQuery.value,
2221
+ "can-update": ne.value,
2222
+ "can-replace": z.value,
2223
+ onSelect: w(F).handleSelect,
2224
+ onToggle: w(A).toggleSelection,
2225
+ onLoadMore: w(A).loadMore,
2226
+ onEdit: w(F).handleEditItem,
2227
+ onReplace: w(F).handleReplaceItem,
2228
2228
  onConfirm: X
2229
2229
  }, null, 8, [
2230
2230
  "items",
@@ -2243,37 +2243,37 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2243
2243
  "onReplace"
2244
2244
  ])])])]),
2245
2245
  d(bt, {
2246
- visible: w(A).showImportUrlModal.value,
2247
- "is-importing": w(k).isImportingFromUrl.value,
2248
- error: w(k).importFromUrlError.value,
2249
- onImport: w(A).handleImportFromUrl,
2250
- onClose: r[6] ||= (e) => w(A).showImportUrlModal.value = !1
2246
+ visible: w(F).showImportUrlModal.value,
2247
+ "is-importing": w(A).isImportingFromUrl.value,
2248
+ error: w(A).importFromUrlError.value,
2249
+ onImport: w(F).handleImportFromUrl,
2250
+ onClose: r[6] ||= (e) => w(F).showImportUrlModal.value = !1
2251
2251
  }, null, 8, [
2252
2252
  "visible",
2253
2253
  "is-importing",
2254
2254
  "error",
2255
2255
  "onImport"
2256
2256
  ]),
2257
- w(A).editingItem.value ? (o(), M(w(m), {
2257
+ w(F).editingItem.value ? (o(), M(w(m), {
2258
2258
  key: 0,
2259
2259
  visible: !0,
2260
- item: w(A).editingItem.value,
2261
- save: w(A).handleEditSave,
2262
- "can-crop": B.value && w(A).editingItem.value.canUpdate !== !1,
2263
- onClose: r[7] ||= (e) => w(A).editingItem.value = null
2260
+ item: w(F).editingItem.value,
2261
+ save: w(F).handleEditSave,
2262
+ "can-crop": z.value && w(F).editingItem.value.canUpdate !== !1,
2263
+ onClose: r[7] ||= (e) => w(F).editingItem.value = null
2264
2264
  }, null, 8, [
2265
2265
  "item",
2266
2266
  "save",
2267
2267
  "can-crop"
2268
2268
  ])) : e("", !0),
2269
2269
  d(Kt, {
2270
- visible: w(k).showReplaceWarning.value,
2271
- item: w(k).pendingReplaceItem.value,
2272
- "usage-info": w(k).replaceUsageInfo.value,
2273
- "is-replacing": w(k).isReplacing.value,
2274
- error: w(k).replaceError.value,
2275
- onReplace: w(A).handleReplaceFile,
2276
- onClose: w(k).cancelReplace
2270
+ visible: w(A).showReplaceWarning.value,
2271
+ item: w(A).pendingReplaceItem.value,
2272
+ "usage-info": w(A).replaceUsageInfo.value,
2273
+ "is-replacing": w(A).isReplacing.value,
2274
+ error: w(A).replaceError.value,
2275
+ onReplace: w(F).handleReplaceFile,
2276
+ onClose: w(A).cancelReplace
2277
2277
  }, null, 8, [
2278
2278
  "visible",
2279
2279
  "item",
@@ -2291,7 +2291,7 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2291
2291
  "leave-from-class": "tpl:opacity-100",
2292
2292
  "leave-to-class": "tpl:opacity-0"
2293
2293
  }, {
2294
- default: v(() => [w(k).showDeleteWarning.value ? (o(), j("div", {
2294
+ default: v(() => [w(A).showDeleteWarning.value ? (o(), j("div", {
2295
2295
  key: 0,
2296
2296
  role: "dialog",
2297
2297
  "aria-modal": "true",
@@ -2302,19 +2302,19 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2302
2302
  "backdrop-filter": "blur(8px)",
2303
2303
  "-webkit-backdrop-filter": "blur(8px)"
2304
2304
  },
2305
- onClick: r[10] ||= U((...e) => w(k).cancelDelete && w(k).cancelDelete(...e), ["self"])
2305
+ onClick: r[10] ||= U((...e) => w(A).cancelDelete && w(A).cancelDelete(...e), ["self"])
2306
2306
  }, [f("div", Pn, [
2307
2307
  f("h3", Fn, E(y.value.mediaLibrary.deleteWarningTitle), 1),
2308
2308
  f("p", {
2309
- class: P(["tpl:text-xs", w(A).hasUsedFiles.value ? "tpl:mb-2" : "tpl:mb-4"]),
2309
+ class: P(["tpl:text-xs", w(F).hasUsedFiles.value ? "tpl:mb-2" : "tpl:mb-4"]),
2310
2310
  style: { color: "var(--tpl-text-muted)" }
2311
2311
  }, E(y.value.mediaLibrary.deleteWarningMessage), 3),
2312
- w(A).hasUsedFiles.value ? (o(), j("p", In, E(y.value.mediaLibrary.deleteWarningUsageNote), 1)) : e("", !0),
2313
- w(A).hasUsedFiles.value ? (o(), j("div", Ln, [(o(!0), j(h, null, _(w(k).deleteUsageInfo.value, (t, n) => (o(), j("div", {
2312
+ w(F).hasUsedFiles.value ? (o(), j("p", In, E(y.value.mediaLibrary.deleteWarningUsageNote), 1)) : e("", !0),
2313
+ w(F).hasUsedFiles.value ? (o(), j("div", Ln, [(o(!0), j(h, null, _(w(A).deleteUsageInfo.value, (t, n) => (o(), j("div", {
2314
2314
  key: n,
2315
2315
  class: "tpl:text-xs",
2316
2316
  style: { color: "var(--tpl-text)" }
2317
- }, [t.templateCount > 0 ? (o(), j(h, { key: 0 }, [f("span", Rn, E(w(A).displayItems.value.find((e) => e.id === n)?.filename || n), 1), f("span", zn, " - " + E(y.value.mediaLibrary.usedInTemplates.replace("{count}", t.templateCount.toString())), 1)], 64)) : e("", !0)]))), 128))])) : e("", !0),
2317
+ }, [t.templateCount > 0 ? (o(), j(h, { key: 0 }, [f("span", Rn, E(w(F).displayItems.value.find((e) => e.id === n)?.filename || n), 1), f("span", zn, " - " + E(y.value.mediaLibrary.usedInTemplates.replace("{count}", t.templateCount.toString())), 1)], 64)) : e("", !0)]))), 128))])) : e("", !0),
2318
2318
  f("div", Bn, [f("button", {
2319
2319
  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",
2320
2320
  style: {
@@ -2322,7 +2322,7 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2322
2322
  color: "var(--tpl-text)",
2323
2323
  "background-color": "var(--tpl-bg)"
2324
2324
  },
2325
- onClick: r[8] ||= (...e) => w(k).cancelDelete && w(k).cancelDelete(...e)
2325
+ onClick: r[8] ||= (...e) => w(A).cancelDelete && w(A).cancelDelete(...e)
2326
2326
  }, E(y.value.mediaLibrary.cancel), 1), f("button", {
2327
2327
  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",
2328
2328
  style: {
@@ -2330,25 +2330,25 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2330
2330
  color: "var(--tpl-danger)",
2331
2331
  "background-color": "var(--tpl-bg)"
2332
2332
  },
2333
- onClick: r[9] ||= (...e) => w(k).confirmDelete && w(k).confirmDelete(...e)
2334
- }, E(w(A).hasUsedFiles.value ? y.value.mediaLibrary.deleteAnyway : y.value.mediaLibrary.confirmDelete), 1)])
2333
+ onClick: r[9] ||= (...e) => w(A).confirmDelete && w(A).confirmDelete(...e)
2334
+ }, E(w(F).hasUsedFiles.value ? y.value.mediaLibrary.deleteAnyway : y.value.mediaLibrary.confirmDelete), 1)])
2335
2335
  ])])) : e("", !0)]),
2336
2336
  _: 1
2337
2337
  }),
2338
- f("div", Vn, [f("div", Hn, [w(k).previewItem.value ? (o(), M(Mt, {
2338
+ f("div", Vn, [f("div", Hn, [w(A).previewItem.value ? (o(), M(Mt, {
2339
2339
  key: 0,
2340
- item: w(k).previewItem.value,
2341
- folders: w(A).folderTree.value
2342
- }, null, 8, ["item", "folders"])) : e("", !0)]), f("div", Un, [w(k).selectedItems.value.size > 0 ? (o(), j("div", Wn, [w(k).previewItem.value ? (o(), j("button", {
2340
+ item: w(A).previewItem.value,
2341
+ folders: w(F).folderTree.value
2342
+ }, null, 8, ["item", "folders"])) : e("", !0)]), f("div", Un, [w(A).selectedItems.value.size > 0 ? (o(), j("div", Wn, [w(A).previewItem.value ? (o(), j("button", {
2343
2343
  key: 0,
2344
2344
  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",
2345
2345
  style: V({
2346
- borderColor: w(A).copied.value ? "var(--tpl-success)" : "var(--tpl-border)",
2347
- color: w(A).copied.value ? "var(--tpl-success)" : "var(--tpl-text)",
2346
+ borderColor: w(F).copied.value ? "var(--tpl-success)" : "var(--tpl-border)",
2347
+ color: w(F).copied.value ? "var(--tpl-success)" : "var(--tpl-text)",
2348
2348
  backgroundColor: "var(--tpl-bg)"
2349
2349
  }),
2350
- onClick: r[11] ||= (e) => w(A).copy(w(A).selectedUrl.value)
2351
- }, [w(A).copied.value ? (o(), M(w(H), {
2350
+ onClick: r[11] ||= (e) => w(F).copy(w(F).selectedUrl.value)
2351
+ }, [w(F).copied.value ? (o(), M(w(H), {
2352
2352
  key: 1,
2353
2353
  size: 12,
2354
2354
  "stroke-width": 2
@@ -2356,20 +2356,20 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2356
2356
  key: 0,
2357
2357
  size: 12,
2358
2358
  "stroke-width": 2
2359
- })), u(" " + E(w(A).copied.value ? y.value.mediaLibrary.copied : y.value.mediaLibrary.copyUrl), 1)], 4)) : e("", !0), ne.value ? (o(), j("div", Gn, [f("button", {
2359
+ })), u(" " + E(w(F).copied.value ? y.value.mediaLibrary.copied : y.value.mediaLibrary.copyUrl), 1)], 4)) : e("", !0), B.value ? (o(), j("div", Gn, [f("button", {
2360
2360
  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",
2361
2361
  style: {
2362
2362
  "border-color": "var(--tpl-border)",
2363
2363
  color: "var(--tpl-text)",
2364
2364
  "background-color": "var(--tpl-bg)"
2365
2365
  },
2366
- onClick: r[12] ||= (e) => w(A).showMovePicker.value = !w(A).showMovePicker.value
2367
- }, E(y.value.mediaLibrary.moveSelected), 1), w(A).showMovePicker.value ? (o(), M(Tt, {
2366
+ onClick: r[12] ||= (e) => w(F).showMovePicker.value = !w(F).showMovePicker.value
2367
+ }, E(y.value.mediaLibrary.moveSelected), 1), w(F).showMovePicker.value ? (o(), M(Tt, {
2368
2368
  key: 0,
2369
- folders: w(A).folderTree.value,
2370
- "current-folder-id": w(k).currentFolderId.value,
2371
- onSelect: w(A).handleMoveToFolder,
2372
- onClose: r[13] ||= (e) => w(A).showMovePicker.value = !1
2369
+ folders: w(F).folderTree.value,
2370
+ "current-folder-id": w(A).currentFolderId.value,
2371
+ onSelect: w(F).handleMoveToFolder,
2372
+ onClose: r[13] ||= (e) => w(F).showMovePicker.value = !1
2373
2373
  }, null, 8, [
2374
2374
  "folders",
2375
2375
  "current-folder-id",
@@ -2409,7 +2409,7 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2409
2409
  emits: ["ready"],
2410
2410
  setup(e, { emit: t }) {
2411
2411
  let n = e, i = t, a = r(() => n.translations);
2412
- g(ue, L(n.translations)), g(Y, z(() => n.locale));
2412
+ g(ue, L(n.translations)), g(Y, ee(() => n.locale));
2413
2413
  let s = L(null);
2414
2414
  g(K, s);
2415
2415
  function c(e) {
@@ -2418,7 +2418,7 @@ var dn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
2418
2418
  return (t, n) => (o(), j("div", {
2419
2419
  ref_key: "popoverRoot",
2420
2420
  ref: s,
2421
- class: "tpl tpl:flex tpl:flex-col tpl:overflow-hidden tpl:rounded-[var(--tpl-radius-lg)]",
2421
+ class: "tpl tpl:box-border tpl:flex tpl:flex-col tpl:overflow-hidden tpl:rounded-[var(--tpl-radius-lg)]",
2422
2422
  style: {
2423
2423
  width: "100%",
2424
2424
  height: "100%",