@chaibuilder/pages 0.14.4 → 0.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/dist/{2AITGKQY-DWDDkd18.cjs → 2AITGKQY-GcbF_G3s.cjs} +1 -1
  2. package/dist/{2AITGKQY-DtQPkxBe.js → 2AITGKQY-a-BJOrVj.js} +2 -2
  3. package/dist/{NCMVHL6D-CksZXXOw.js → NCMVHL6D-CCFQEIik.js} +4 -4
  4. package/dist/{NCMVHL6D-6CkVnw0a.cjs → NCMVHL6D-fz7uxKMS.cjs} +1 -1
  5. package/dist/{ZDWCUMSJ-BXQ01VPt.js → ZDWCUMSJ-B87y4E-s.js} +1 -1
  6. package/dist/{ZDWCUMSJ-DoM-AA0C.cjs → ZDWCUMSJ-D40Aht5l.cjs} +1 -1
  7. package/dist/{add-new-language-page-D8iXtyLA.js → add-new-language-page-CxNpkd0L.js} +2 -2
  8. package/dist/{add-new-language-page-BA73lQnm.cjs → add-new-language-page-Dyh26P7i.cjs} +1 -1
  9. package/dist/{add-new-page-DESlqvED.js → add-new-page-DGQqN1GO.js} +1 -1
  10. package/dist/{add-new-page-EOMgMSeq.cjs → add-new-page-jWn3_pZ4.cjs} +1 -1
  11. package/dist/{delete-page-ZvnuEow6.cjs → delete-page-Bxl1t_Ue.cjs} +1 -1
  12. package/dist/{delete-page-BP1Df8QL.js → delete-page-WnsCggnJ.js} +1 -1
  13. package/dist/{digital-asset-manager-Bb81T3mS.js → digital-asset-manager-ClyooOJY.js} +135 -135
  14. package/dist/{digital-asset-manager-BxWb1j_y.cjs → digital-asset-manager-DrXotZ_n.cjs} +1 -1
  15. package/dist/{duplicate-page-W5xbmPSC.cjs → duplicate-page-CDtfdgyJ.cjs} +1 -1
  16. package/dist/{duplicate-page-B1j0H7gP.js → duplicate-page-DOloolXy.js} +8 -8
  17. package/dist/{dynamic-page-selector-Crjyco6l.js → dynamic-page-selector-B-8TUdTG.js} +1 -1
  18. package/dist/{dynamic-page-selector-BZKJmSx5.cjs → dynamic-page-selector-CcYIfKlO.cjs} +1 -1
  19. package/dist/index-CffopOpP.cjs +5 -0
  20. package/dist/{index-DFvsMFVH.js → index-CguzNa4U.js} +1710 -1938
  21. package/dist/index.cjs +1 -1
  22. package/dist/index.d.ts +10 -14
  23. package/dist/index.js +12 -13
  24. package/dist/{json-diff-viewer-BGGSLqtx.js → json-diff-viewer-CxFGgqa_.js} +6 -6
  25. package/dist/{json-diff-viewer-DRkE-x_z.cjs → json-diff-viewer-DcR1gbkd.cjs} +1 -1
  26. package/dist/{lang-panel-B3tr2uhr.js → lang-panel-Bi427DLp.js} +2 -2
  27. package/dist/{lang-panel-9T8dIx2p.cjs → lang-panel-XonHaLBn.cjs} +1 -1
  28. package/dist/{mark-as-template-DPVPRgbi.cjs → mark-as-template-BtI1QfuI.cjs} +1 -1
  29. package/dist/{mark-as-template-L9cHzL84.js → mark-as-template-CS68JVP8.js} +1 -1
  30. package/dist/{no-language-page-content-DP7gmy0s.js → no-language-page-content-C5t9cDI4.js} +1 -1
  31. package/dist/{no-language-page-content-Cy_D-3jE.cjs → no-language-page-content-DMqw1cTK.cjs} +1 -1
  32. package/dist/{page-creator-Ctn5ixJE.js → page-creator-BY2w99Ez.js} +2 -2
  33. package/dist/{page-creator-DDaI1HYj.cjs → page-creator-BkKT_Xy1.cjs} +1 -1
  34. package/dist/{page-lock-request-BKrxnEtQ.cjs → page-lock-request-CIRTswpw.cjs} +1 -1
  35. package/dist/{page-lock-request-CjJFJKL2.js → page-lock-request-Z1sTGi6N.js} +10 -10
  36. package/dist/{page-locked-by-dialog-DmsSmAY2.js → page-locked-by-dialog-B2C1M_bK.js} +1 -1
  37. package/dist/{page-locked-by-dialog-b25_rn2m.cjs → page-locked-by-dialog-DpBpQ0oI.cjs} +1 -1
  38. package/dist/{page-manager-new-EsIg6iQn.js → page-manager-new-CSqFLJBd.js} +46 -46
  39. package/dist/{page-manager-new-DiZVY7Me.cjs → page-manager-new-tWV46glN.cjs} +1 -1
  40. package/dist/{page-manager-search-and-filter-Bt4T_dnB.js → page-manager-search-and-filter-B9VZzJQd.js} +2 -2
  41. package/dist/{page-manager-search-and-filter-CgY2qiXU.cjs → page-manager-search-and-filter-CwuukvKn.cjs} +1 -1
  42. package/dist/{page-revisions-content-DtI8CmtR.cjs → page-revisions-content-BWhJz0_7.cjs} +1 -1
  43. package/dist/{page-revisions-content-CsT6aF2I.js → page-revisions-content-WoIu0uan.js} +18 -18
  44. package/dist/{publish-pages-content-DpC7RcTw.cjs → publish-pages-content-BHDTLdGv.cjs} +1 -1
  45. package/dist/{publish-pages-content-KAuhOPv0.js → publish-pages-content-CkWvQGbm.js} +12 -12
  46. package/dist/{save-to-lib-CeWaSQdB.js → save-to-lib-AkbnWUxR.js} +13 -13
  47. package/dist/{save-to-lib-BGpWGHJo.cjs → save-to-lib-C0ZfwiAE.cjs} +1 -1
  48. package/dist/{seo-panel-JDQ_7bOx.cjs → seo-panel-CiKkn5Jp.cjs} +1 -1
  49. package/dist/{seo-panel-Dhhpe_7z.js → seo-panel-Gu3HZveQ.js} +34 -34
  50. package/dist/shared-json-ld-BPaeG1gf.cjs +1 -0
  51. package/dist/shared-json-ld-CsyZjZdT.js +557 -0
  52. package/dist/{slug-input-QxBMijHP.cjs → slug-input-B4w0Ihxn.cjs} +1 -1
  53. package/dist/{slug-input-hJdU8DaF.js → slug-input-BXNj3cZf.js} +1 -1
  54. package/dist/{theme-panel-footer-D2B7iYW2.js → theme-panel-footer-68bQaQeh.js} +1 -1
  55. package/dist/{theme-panel-footer-BZnPvTkM.cjs → theme-panel-footer-DnZs9SzB.cjs} +1 -1
  56. package/dist/{unmark-as-template-Byn2RRAp.cjs → unmark-as-template-DFxmzyx4.cjs} +1 -1
  57. package/dist/{unmark-as-template-Dcpkj7EZ.js → unmark-as-template-MpXMyb0Q.js} +1 -1
  58. package/dist/{unpublish-page-CPLlsfm4.js → unpublish-page-Bzouoco9.js} +1 -1
  59. package/dist/{unpublish-page-5Fi1wKXb.cjs → unpublish-page-CCPyMoaC.cjs} +1 -1
  60. package/dist/use-page-expand-manager-2KjeYfVS.cjs +1 -0
  61. package/dist/use-page-expand-manager-D6T75I11.js +184 -0
  62. package/dist/{web-preview-CVvxe5Ll.cjs → web-preview-B3-o8BoT.cjs} +1 -1
  63. package/dist/{web-preview-YuuoRaZn.js → web-preview-D9PcexXy.js} +1 -1
  64. package/package.json +1 -1
  65. package/dist/index-Qnh8Lkr0.cjs +0 -5
  66. package/dist/shared-json-ld-BYbdMttx.cjs +0 -1
  67. package/dist/shared-json-ld-BliIbNv9.js +0 -337
  68. package/dist/use-page-expand-manager-DkyBiNpx.js +0 -85
  69. package/dist/use-page-expand-manager-To-SsGy3.cjs +0 -1
@@ -1,63 +1,63 @@
1
- import { jsxs as a, jsx as e, Fragment as Q } from "react/jsx-runtime";
1
+ import { jsxs as l, jsx as e, Fragment as Q } from "react/jsx-runtime";
2
2
  import { mergeClasses as ce } from "@chaibuilder/sdk";
3
- import { Button as g, Input as oe, Label as _, Textarea as ze, TooltipProvider as B, Tooltip as M, TooltipTrigger as $, TooltipContent as P, Dialog as De, DialogContent as je, DialogHeader as Fe, DialogTitle as Ue, DialogDescription as Le, DialogFooter as Be, Switch as Me } from "@chaibuilder/sdk/ui";
3
+ import { Button as g, Input as oe, Label as _, Textarea as ze, TooltipProvider as M, Tooltip as B, TooltipTrigger as $, TooltipContent as P, Dialog as De, DialogContent as je, DialogHeader as Fe, DialogTitle as Ue, DialogDescription as Le, DialogFooter as Me, Switch as Be } from "@chaibuilder/sdk/ui";
4
4
  import { find as $e, merge as Pe, pick as Oe, first as qe, isEmpty as Ke } from "lodash-es";
5
- import { ChevronLeft as de, ChevronRight as Ge, Loader as O, AlertCircle as Re, Copy as me, Pencil as _e, Link as Qe, Search as We, RefreshCwIcon as Ve, Archive as He, Film as Je, ImageIcon as Xe, Edit as Ze, Trash2 as Ye, Check as et, Upload as tt, AlertTriangle as it } from "lucide-react";
6
- import ue, { createContext as rt, Component as lt, createElement as ae, useState as b, useMemo as he, useEffect as W, useCallback as L, Suspense as at } from "react";
5
+ import { ChevronLeft as de, ChevronRight as Ge, Loader as O, AlertCircle as Re, Copy as me, Pencil as _e, Link as Qe, Search as We, RefreshCwIcon as Ve, Archive as He, Film as Xe, ImageIcon as Ze, Edit as Je, Trash2 as Ye, Check as et, Upload as tt, AlertTriangle as it } from "lucide-react";
6
+ import ue, { createContext as rt, Component as at, createElement as le, useState as b, useMemo as he, useEffect as W, useCallback as L, Suspense as lt } from "react";
7
7
  import { useDropzone as nt } from "react-dropzone";
8
8
  import { toast as A } from "sonner";
9
9
  import { f as st, c as ct } from "./image-compression-DsZ1oqpb.js";
10
- import { useQueryClient as Z, useMutation as Y, useQuery as fe } from "@tanstack/react-query";
11
- import { aJ as q, al as K, A as E } from "./index-DFvsMFVH.js";
12
- const ot = rt(null), X = {
10
+ import { useQueryClient as J, useMutation as Y, useQuery as fe } from "@tanstack/react-query";
11
+ import { aM as q, am as K, A as E } from "./index-CguzNa4U.js";
12
+ const ot = rt(null), Z = {
13
13
  didCatch: !1,
14
14
  error: null
15
15
  };
16
- class dt extends lt {
17
- constructor(l) {
18
- super(l), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = X;
16
+ class dt extends at {
17
+ constructor(a) {
18
+ super(a), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = Z;
19
19
  }
20
- static getDerivedStateFromError(l) {
20
+ static getDerivedStateFromError(a) {
21
21
  return {
22
22
  didCatch: !0,
23
- error: l
23
+ error: a
24
24
  };
25
25
  }
26
26
  resetErrorBoundary() {
27
27
  const {
28
- error: l
28
+ error: a
29
29
  } = this.state;
30
- if (l !== null) {
30
+ if (a !== null) {
31
31
  for (var c, i, o = arguments.length, r = new Array(o), d = 0; d < o; d++)
32
32
  r[d] = arguments[d];
33
33
  (c = (i = this.props).onReset) === null || c === void 0 || c.call(i, {
34
34
  args: r,
35
35
  reason: "imperative-api"
36
- }), this.setState(X);
36
+ }), this.setState(Z);
37
37
  }
38
38
  }
39
- componentDidCatch(l, c) {
39
+ componentDidCatch(a, c) {
40
40
  var i, o;
41
- (i = (o = this.props).onError) === null || i === void 0 || i.call(o, l, c);
41
+ (i = (o = this.props).onError) === null || i === void 0 || i.call(o, a, c);
42
42
  }
43
- componentDidUpdate(l, c) {
43
+ componentDidUpdate(a, c) {
44
44
  const {
45
45
  didCatch: i
46
46
  } = this.state, {
47
47
  resetKeys: o
48
48
  } = this.props;
49
- if (i && c.error !== null && mt(l.resetKeys, o)) {
49
+ if (i && c.error !== null && mt(a.resetKeys, o)) {
50
50
  var r, d;
51
51
  (r = (d = this.props).onReset) === null || r === void 0 || r.call(d, {
52
52
  next: o,
53
- prev: l.resetKeys,
53
+ prev: a.resetKeys,
54
54
  reason: "keys"
55
- }), this.setState(X);
55
+ }), this.setState(Z);
56
56
  }
57
57
  }
58
58
  render() {
59
59
  const {
60
- children: l,
60
+ children: a,
61
61
  fallbackRender: c,
62
62
  FallbackComponent: i,
63
63
  fallback: o
@@ -65,7 +65,7 @@ class dt extends lt {
65
65
  didCatch: r,
66
66
  error: d
67
67
  } = this.state;
68
- let v = l;
68
+ let v = a;
69
69
  if (r) {
70
70
  const y = {
71
71
  error: d,
@@ -74,13 +74,13 @@ class dt extends lt {
74
74
  if (typeof c == "function")
75
75
  v = c(y);
76
76
  else if (i)
77
- v = ae(i, y);
77
+ v = le(i, y);
78
78
  else if (o !== void 0)
79
79
  v = o;
80
80
  else
81
81
  throw d;
82
82
  }
83
- return ae(ot.Provider, {
83
+ return le(ot.Provider, {
84
84
  value: {
85
85
  didCatch: r,
86
86
  error: d,
@@ -90,11 +90,11 @@ class dt extends lt {
90
90
  }
91
91
  }
92
92
  function mt() {
93
- let s = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], l = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
94
- return s.length !== l.length || s.some((c, i) => !Object.is(c, l[i]));
93
+ let s = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
94
+ return s.length !== a.length || s.some((c, i) => !Object.is(c, a[i]));
95
95
  }
96
96
  const ut = () => {
97
- const s = q(), l = Z(), c = K();
97
+ const s = q(), a = J(), c = K();
98
98
  return Y({
99
99
  mutationFn: async (i) => {
100
100
  const o = i.map(async (d) => c(s, {
@@ -108,7 +108,7 @@ const ut = () => {
108
108
  if (i != null && i.some((r) => r.error))
109
109
  throw new Error(((o = i == null ? void 0 : i.find((r) => r.error)) == null ? void 0 : o.error) || "Failed to upload asset");
110
110
  {
111
- l.invalidateQueries({
111
+ a.invalidateQueries({
112
112
  queryKey: [E.GET_ASSETS]
113
113
  });
114
114
  const r = i == null ? void 0 : i.length;
@@ -120,7 +120,7 @@ const ut = () => {
120
120
  }
121
121
  });
122
122
  }, ht = () => {
123
- const s = q(), l = Z(), c = K();
123
+ const s = q(), a = J(), c = K();
124
124
  return Y({
125
125
  mutationFn: async (i) => c(s, {
126
126
  action: E.DELETE_ASSET,
@@ -129,7 +129,7 @@ const ut = () => {
129
129
  onSuccess: (i) => {
130
130
  if (i != null && i.error)
131
131
  throw new Error(i == null ? void 0 : i.error);
132
- l.invalidateQueries({
132
+ a.invalidateQueries({
133
133
  queryKey: [E.GET_ASSETS]
134
134
  }), A.success("Asset deleted successfully");
135
135
  },
@@ -138,7 +138,7 @@ const ut = () => {
138
138
  }
139
139
  });
140
140
  }, ft = () => {
141
- const s = q(), l = Z(), c = K();
141
+ const s = q(), a = J(), c = K();
142
142
  return Y({
143
143
  mutationFn: async (i) => c(s, {
144
144
  action: E.UPDATE_ASSET,
@@ -147,7 +147,7 @@ const ut = () => {
147
147
  onSuccess: (i) => {
148
148
  if (i != null && i.error)
149
149
  throw new Error(i == null ? void 0 : i.error);
150
- l.invalidateQueries({
150
+ a.invalidateQueries({
151
151
  queryKey: [E.GET_ASSETS]
152
152
  }), A.success("Asset updated successfully");
153
153
  },
@@ -158,7 +158,7 @@ const ut = () => {
158
158
  };
159
159
  function pt({
160
160
  currentPage: s,
161
- totalPages: l,
161
+ totalPages: a,
162
162
  onPageChange: c,
163
163
  pageRangeDisplayed: i = 3,
164
164
  showPageInput: o = !0,
@@ -166,28 +166,28 @@ function pt({
166
166
  }) {
167
167
  const [d, v] = b(String(s)), y = he(() => {
168
168
  const n = Math.floor(i / 2);
169
- let m = Math.max(1, s - n), h = Math.min(l, s + n);
170
- h - m + 1 < i && (m === 1 ? h = Math.min(l, m + i - 1) : h === l && (m = Math.max(1, h - i + 1)));
169
+ let m = Math.max(1, s - n), h = Math.min(a, s + n);
170
+ h - m + 1 < i && (m === 1 ? h = Math.min(a, m + i - 1) : h === a && (m = Math.max(1, h - i + 1)));
171
171
  const x = [];
172
172
  m > 1 && (x.push(1), m > 2 && x.push("..."));
173
173
  for (let N = m; N <= h; N++)
174
174
  x.push(N);
175
- return h < l && (h < l - 1 && x.push("..."), x.push(l)), x;
176
- }, [s, l, i]), p = (n) => {
177
- n !== s && n >= 1 && n <= l && (c(n), v(String(n)));
175
+ return h < a && (h < a - 1 && x.push("..."), x.push(a)), x;
176
+ }, [s, a, i]), p = (n) => {
177
+ n !== s && n >= 1 && n <= a && (c(n), v(String(n)));
178
178
  }, w = () => {
179
179
  s > 1 && p(s - 1);
180
180
  }, S = () => {
181
- s < l && p(s + 1);
181
+ s < a && p(s + 1);
182
182
  }, C = () => {
183
183
  const n = Number(d);
184
- !isNaN(n) && n >= 1 && n <= l && p(n);
184
+ !isNaN(n) && n >= 1 && n <= a && p(n);
185
185
  }, f = (n) => {
186
186
  n.key === "Enter" && C();
187
187
  };
188
- return l <= 1 ? null : /* @__PURE__ */ a("div", { className: `flex flex-wrap items-center justify-center gap-3 ${r}`, children: [
189
- /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
190
- /* @__PURE__ */ a(
188
+ return a <= 1 ? null : /* @__PURE__ */ l("div", { className: `flex flex-wrap items-center justify-center gap-3 ${r}`, children: [
189
+ /* @__PURE__ */ l("div", { className: "flex items-center gap-2", children: [
190
+ /* @__PURE__ */ l(
191
191
  g,
192
192
  {
193
193
  variant: "outline",
@@ -217,13 +217,13 @@ function pt({
217
217
  h
218
218
  );
219
219
  }) }),
220
- /* @__PURE__ */ a(
220
+ /* @__PURE__ */ l(
221
221
  g,
222
222
  {
223
223
  variant: "outline",
224
224
  size: "sm",
225
225
  onClick: S,
226
- disabled: s === l,
226
+ disabled: s === a,
227
227
  className: "px-2 py-1 text-sm hover:bg-gray-50",
228
228
  children: [
229
229
  "Next",
@@ -232,14 +232,14 @@ function pt({
232
232
  }
233
233
  )
234
234
  ] }),
235
- o && /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
235
+ o && /* @__PURE__ */ l("div", { className: "flex items-center gap-2", children: [
236
236
  /* @__PURE__ */ e("span", { className: "text-sm text-muted-foreground", children: "Go to" }),
237
237
  /* @__PURE__ */ e(
238
238
  oe,
239
239
  {
240
240
  type: "number",
241
241
  min: 1,
242
- max: l,
242
+ max: a,
243
243
  value: d,
244
244
  onChange: (n) => {
245
245
  const m = n.target.value.replace(/[^\d]/g, "");
@@ -255,7 +255,7 @@ function pt({
255
255
  variant: "outline",
256
256
  size: "sm",
257
257
  onClick: C,
258
- disabled: d === "" || Number(d) < 1 || Number(d) > l,
258
+ disabled: d === "" || Number(d) < 1 || Number(d) > a,
259
259
  children: "Go"
260
260
  }
261
261
  )
@@ -263,11 +263,11 @@ function pt({
263
263
  ] });
264
264
  }
265
265
  const gt = (s = {}) => {
266
- const l = q(), c = K(), { search: i, page: o = 1, limit: r = 30 } = s;
266
+ const a = q(), c = K(), { search: i, page: o = 1, limit: r = 30 } = s;
267
267
  return fe({
268
268
  queryKey: [E.GET_ASSETS, i, o, r],
269
269
  queryFn: async () => {
270
- const d = await c(l, {
270
+ const d = await c(a, {
271
271
  action: E.GET_ASSETS,
272
272
  data: {
273
273
  search: i,
@@ -281,10 +281,10 @@ const gt = (s = {}) => {
281
281
  retry: 1
282
282
  });
283
283
  }, vt = (s) => {
284
- const l = q(), c = K();
284
+ const a = q(), c = K();
285
285
  return fe({
286
286
  queryKey: [E.GET_ASSET, s],
287
- queryFn: async () => s ? await c(l, {
287
+ queryFn: async () => s ? await c(a, {
288
288
  action: E.GET_ASSET,
289
289
  data: { id: s }
290
290
  }) : null,
@@ -293,27 +293,27 @@ const gt = (s = {}) => {
293
293
  });
294
294
  };
295
295
  function xt(s) {
296
- const l = isNaN(s) ? 0 : typeof s == "number" ? s : parseInt(s);
297
- return l ? l < 1024 ? `${l.toFixed(2)} B` : l < 1024 * 1024 ? `${(l / 1024).toFixed(2)} KB` : `${(l / (1024 * 1024)).toFixed(2)} MB` : "0 B";
296
+ const a = isNaN(s) ? 0 : typeof s == "number" ? s : parseInt(s);
297
+ return a ? a < 1024 ? `${a.toFixed(2)} B` : a < 1024 * 1024 ? `${(a / 1024).toFixed(2)} KB` : `${(a / (1024 * 1024)).toFixed(2)} MB` : "0 B";
298
298
  }
299
299
  function ne(s) {
300
300
  if (!s) return "N/A";
301
- const l = new Date(s);
301
+ const a = new Date(s);
302
302
  return new Intl.DateTimeFormat("en-US", {
303
303
  month: "short",
304
304
  day: "numeric",
305
305
  year: "numeric",
306
306
  hour: "2-digit",
307
307
  minute: "2-digit"
308
- }).format(l);
308
+ }).format(a);
309
309
  }
310
- function se(s, l) {
311
- let c = s, i = l == null ? void 0 : l.description;
310
+ function se(s, a) {
311
+ let c = s, i = a == null ? void 0 : a.description;
312
312
  return (!i || typeof i != "string") && (i = ""), (!c || typeof c != "string") && (c = ""), c !== i;
313
313
  }
314
314
  const yt = ({
315
315
  assetId: s,
316
- onBack: l,
316
+ onBack: a,
317
317
  onEdit: c,
318
318
  onSave: i,
319
319
  isSaving: o
@@ -330,12 +330,12 @@ const yt = ({
330
330
  };
331
331
  return ue.useEffect(() => {
332
332
  r != null && r.description && p(r.description);
333
- }, [r]), d ? /* @__PURE__ */ e("div", { className: "flex-1 flex items-center justify-center", children: /* @__PURE__ */ e(O, { className: "h-8 w-8 animate-spin" }) }) : v || !(r != null && r.id) ? /* @__PURE__ */ e("div", { className: "flex-1 flex items-center justify-center", children: /* @__PURE__ */ a("div", { className: "text-center max-w-md mx-auto p-6", children: [
333
+ }, [r]), d ? /* @__PURE__ */ e("div", { className: "flex-1 flex items-center justify-center", children: /* @__PURE__ */ e(O, { className: "h-8 w-8 animate-spin" }) }) : v || !(r != null && r.id) ? /* @__PURE__ */ e("div", { className: "flex-1 flex items-center justify-center", children: /* @__PURE__ */ l("div", { className: "text-center max-w-md mx-auto p-6", children: [
334
334
  /* @__PURE__ */ e("div", { className: "flex justify-center mb-4", children: /* @__PURE__ */ e(Re, { className: "h-12 w-12 text-gray-400" }) }),
335
335
  /* @__PURE__ */ e("h3", { className: "text-lg font-medium text-gray-900 mb-2", children: "No Asset Found" }),
336
336
  /* @__PURE__ */ e("p", { className: "text-sm text-gray-500 mb-6", children: v ? "There was an error loading the asset. Please try again later." : "The asset you're looking for doesn't exist or has been removed." }),
337
- /* @__PURE__ */ a("div", { className: "flex justify-center gap-4", children: [
338
- /* @__PURE__ */ e(g, { variant: "outline", onClick: l, children: "Back to Assets" }),
337
+ /* @__PURE__ */ l("div", { className: "flex justify-center gap-4", children: [
338
+ /* @__PURE__ */ e(g, { variant: "outline", onClick: a, children: "Back to Assets" }),
339
339
  v && /* @__PURE__ */ e(
340
340
  g,
341
341
  {
@@ -345,14 +345,14 @@ const yt = ({
345
345
  }
346
346
  )
347
347
  ] })
348
- ] }) }) : /* @__PURE__ */ a("div", { className: "flex-1 flex flex-col gap-y-4 overflow-hidden", children: [
349
- /* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
350
- /* @__PURE__ */ a(
348
+ ] }) }) : /* @__PURE__ */ l("div", { className: "flex-1 flex flex-col gap-y-4 overflow-hidden", children: [
349
+ /* @__PURE__ */ l("div", { className: "flex items-center justify-between", children: [
350
+ /* @__PURE__ */ l(
351
351
  g,
352
352
  {
353
353
  variant: "outline",
354
354
  size: "sm",
355
- onClick: l,
355
+ onClick: a,
356
356
  disabled: o,
357
357
  children: [
358
358
  /* @__PURE__ */ e(de, { className: "h-4 w-4" }),
@@ -360,9 +360,9 @@ const yt = ({
360
360
  ]
361
361
  }
362
362
  ),
363
- /* @__PURE__ */ a("div", { className: "flex gap-2", children: [
364
- /* @__PURE__ */ e(g, { variant: "outline", onClick: l, disabled: o, children: "Cancel" }),
365
- /* @__PURE__ */ a(
363
+ /* @__PURE__ */ l("div", { className: "flex gap-2", children: [
364
+ /* @__PURE__ */ e(g, { variant: "outline", onClick: a, disabled: o, children: "Cancel" }),
365
+ /* @__PURE__ */ l(
366
366
  g,
367
367
  {
368
368
  variant: "outline",
@@ -374,7 +374,7 @@ const yt = ({
374
374
  ]
375
375
  }
376
376
  ),
377
- /* @__PURE__ */ a(
377
+ /* @__PURE__ */ l(
378
378
  g,
379
379
  {
380
380
  variant: "default",
@@ -388,7 +388,7 @@ const yt = ({
388
388
  )
389
389
  ] })
390
390
  ] }),
391
- /* @__PURE__ */ a("div", { className: "grid grid-cols-2 items-start gap-6 flex-1 overflow-hidden", children: [
391
+ /* @__PURE__ */ l("div", { className: "grid grid-cols-2 items-start gap-6 flex-1 overflow-hidden", children: [
392
392
  /* @__PURE__ */ e("div", { className: "relative h-[calc(80vh-200px)] w-full flex items-start justify-center", children: /* @__PURE__ */ e(
393
393
  "img",
394
394
  {
@@ -397,8 +397,8 @@ const yt = ({
397
397
  className: "w-full h-full object-contain rounded-lg max-h-max max-w-max"
398
398
  }
399
399
  ) }),
400
- /* @__PURE__ */ a("div", { className: "space-y-6", children: [
401
- /* @__PURE__ */ a("div", { className: "grid gap-3 border rounded-md pt-2 bg-gray-100", children: [
400
+ /* @__PURE__ */ l("div", { className: "space-y-6", children: [
401
+ /* @__PURE__ */ l("div", { className: "grid gap-3 border rounded-md pt-2 bg-gray-100", children: [
402
402
  /* @__PURE__ */ e(_, { className: "w-full text-center", children: "Details" }),
403
403
  /* @__PURE__ */ e("div", { className: "grid grid-cols-1 gap-2 text-sm border rounded-md p-2 bg-white", children: [
404
404
  { label: "File Name", value: r.name },
@@ -431,10 +431,10 @@ const yt = ({
431
431
  value: r.url,
432
432
  copyable: !0
433
433
  }
434
- ].map((n) => /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
434
+ ].map((n) => /* @__PURE__ */ l("div", { className: "flex items-center gap-2", children: [
435
435
  /* @__PURE__ */ e(_, { className: "w-max text-left px-2 w-1/4 font-normal text-gray-700", children: n.label }),
436
436
  ":",
437
- /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
437
+ /* @__PURE__ */ l("div", { className: "flex items-center gap-2", children: [
438
438
  /* @__PURE__ */ e(
439
439
  "div",
440
440
  {
@@ -455,18 +455,18 @@ const yt = ({
455
455
  ] })
456
456
  ] }, n.label)) })
457
457
  ] }),
458
- r.usedOn && r.usedOn.length > 0 && /* @__PURE__ */ a("div", { className: "grid gap-3", children: [
458
+ r.usedOn && r.usedOn.length > 0 && /* @__PURE__ */ l("div", { className: "grid gap-3", children: [
459
459
  /* @__PURE__ */ e(_, { children: "Used On" }),
460
- /* @__PURE__ */ e("div", { className: "grid grid-cols-1 gap-2 text-sm border rounded-md p-2", children: r.usedOn.map((n, m) => /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
460
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-1 gap-2 text-sm border rounded-md p-2", children: r.usedOn.map((n, m) => /* @__PURE__ */ l("div", { className: "flex items-center gap-2", children: [
461
461
  /* @__PURE__ */ e("div", { className: "w-max text-left font-medium text-gray-900", children: n.name }),
462
- /* @__PURE__ */ a("div", { className: "text-gray-500", children: [
462
+ /* @__PURE__ */ l("div", { className: "text-gray-500", children: [
463
463
  "(",
464
464
  n.slug,
465
465
  ")"
466
466
  ] })
467
467
  ] }, m)) })
468
468
  ] }),
469
- /* @__PURE__ */ a("div", { className: "grid gap-3 border rounded-md pt-2 bg-gray-100 relative", children: [
469
+ /* @__PURE__ */ l("div", { className: "grid gap-3 border rounded-md pt-2 bg-gray-100 relative", children: [
470
470
  /* @__PURE__ */ e(_, { className: "w-full text-center", children: "Description" }),
471
471
  /* @__PURE__ */ e(
472
472
  ze,
@@ -487,7 +487,7 @@ const yt = ({
487
487
  onClick: () => i(y),
488
488
  disabled: o || !se(y, r),
489
489
  className: `py-0 bg-blue-500 text-white px-3 py-0.5 rounded-md text-sm ${o || !se(y, r) ? "opacity-50 cursor-not-allowed" : ""}`,
490
- children: o ? /* @__PURE__ */ a(Q, { children: [
490
+ children: o ? /* @__PURE__ */ l(Q, { children: [
491
491
  /* @__PURE__ */ e(O, { className: "h-4 w-4 mr-2 animate-spin" }),
492
492
  "Saving..."
493
493
  ] }) : "Save"
@@ -497,7 +497,7 @@ const yt = ({
497
497
  ] })
498
498
  ] })
499
499
  ] });
500
- }, Nt = ue.lazy(() => import("./image-editor-CzFST20j.js")), bt = 25 * 1024 * 1024, wt = ({ isUpdatingAsset: s, allowedTypes: l, uploadAssets: c, isUploadingAsset: i, onUploaded: o }) => {
500
+ }, Nt = ue.lazy(() => import("./image-editor-CzFST20j.js")), bt = 25 * 1024 * 1024, wt = ({ isUpdatingAsset: s, allowedTypes: a, uploadAssets: c, isUploadingAsset: i, onUploaded: o }) => {
501
501
  const [r, d] = b(() => {
502
502
  const f = localStorage.getItem("chai_optimize_images");
503
503
  return f !== null ? f === "true" : !0;
@@ -542,7 +542,7 @@ const yt = ({
542
542
  }, { getRootProps: w, getInputProps: S, isDragActive: C } = nt({
543
543
  onDrop: p,
544
544
  accept: {
545
- "image/*": l.includes("image") ? [] : []
545
+ "image/*": a.includes("image") ? [] : []
546
546
  },
547
547
  disabled: s || i,
548
548
  multiple: !0
@@ -551,7 +551,7 @@ const yt = ({
551
551
  "div",
552
552
  {
553
553
  className: `flex h-[60px] w-full flex-col items-center justify-center rounded-lg border-2 border-dashed border-slate-300 p-0 py-2 hover:border-black/50 ${v ? "pointer-events-none bg-gray-100 opacity-90" : "bg-gray-100 hover:border-black/50 hover:bg-gray-100"}`,
554
- children: /* @__PURE__ */ a(
554
+ children: /* @__PURE__ */ l(
555
555
  "div",
556
556
  {
557
557
  ...w(),
@@ -562,18 +562,18 @@ const yt = ({
562
562
  ),
563
563
  children: [
564
564
  /* @__PURE__ */ e("input", { ...S() }),
565
- v ? /* @__PURE__ */ e("div", { className: "flex flex-col items-center px-6", children: /* @__PURE__ */ a("div", { className: "flex items-center justify-center gap-2 leading-tight", children: [
565
+ v ? /* @__PURE__ */ e("div", { className: "flex flex-col items-center px-6", children: /* @__PURE__ */ l("div", { className: "flex items-center justify-center gap-2 leading-tight", children: [
566
566
  /* @__PURE__ */ e("div", { className: "flex items-center justify-center rounded-full bg-indigo-100 p-2", children: /* @__PURE__ */ e(O, { className: "h-4 w-4 animate-spin text-indigo-500" }) }),
567
- /* @__PURE__ */ a("div", { className: "text-left", children: [
567
+ /* @__PURE__ */ l("div", { className: "text-left", children: [
568
568
  /* @__PURE__ */ e("div", { className: "font-medium", children: s ? "Updating file..." : "Uploading file..." }),
569
- /* @__PURE__ */ a("div", { className: "text-xs font-light text-muted-foreground", children: [
569
+ /* @__PURE__ */ l("div", { className: "text-xs font-light text-muted-foreground", children: [
570
570
  "Please wait while we ",
571
571
  s ? "update" : "upload",
572
572
  " your file..."
573
573
  ] })
574
574
  ] })
575
- ] }) }) : /* @__PURE__ */ a("div", { className: "flex w-full items-center justify-between px-6", children: [
576
- /* @__PURE__ */ e("div", { className: "flex flex-col items-center", children: /* @__PURE__ */ a("div", { className: "flex items-center justify-between gap-2 leading-tight", children: [
575
+ ] }) }) : /* @__PURE__ */ l("div", { className: "flex w-full items-center justify-between px-6", children: [
576
+ /* @__PURE__ */ e("div", { className: "flex flex-col items-center", children: /* @__PURE__ */ l("div", { className: "flex items-center justify-between gap-2 leading-tight", children: [
577
577
  /* @__PURE__ */ e(
578
578
  "div",
579
579
  {
@@ -581,27 +581,27 @@ const yt = ({
581
581
  children: /* @__PURE__ */ e(tt, { className: "h-4 w-4 text-indigo-500" })
582
582
  }
583
583
  ),
584
- /* @__PURE__ */ a("div", { className: "text-left", children: [
585
- /* @__PURE__ */ a("div", { className: "font-medium", children: [
584
+ /* @__PURE__ */ l("div", { className: "text-left", children: [
585
+ /* @__PURE__ */ l("div", { className: "font-medium", children: [
586
586
  "Drop your file here or",
587
587
  " ",
588
588
  /* @__PURE__ */ e("span", { className: "cursor-pointer text-indigo-500 hover:underline", children: "browse" })
589
589
  ] }),
590
- /* @__PURE__ */ e("div", { className: "text-xs font-light text-muted-foreground", children: /* @__PURE__ */ a("span", { className: "", children: [
590
+ /* @__PURE__ */ e("div", { className: "text-xs font-light text-muted-foreground", children: /* @__PURE__ */ l("span", { className: "", children: [
591
591
  "Accepted file types: ",
592
- /* @__PURE__ */ e("span", { className: "capitalize text-indigo-400", children: l.join(", ") })
592
+ /* @__PURE__ */ e("span", { className: "capitalize text-indigo-400", children: a.join(", ") })
593
593
  ] }) })
594
594
  ] })
595
595
  ] }) }),
596
- /* @__PURE__ */ a("div", { className: "flex items-center gap-2 text-xs text-muted-foreground", children: [
597
- /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
598
- /* @__PURE__ */ a("span", { className: "text-xs", children: [
596
+ /* @__PURE__ */ l("div", { className: "flex items-center gap-2 text-xs text-muted-foreground", children: [
597
+ /* @__PURE__ */ l("div", { className: "flex items-center gap-2", children: [
598
+ /* @__PURE__ */ l("span", { className: "text-xs", children: [
599
599
  "Optimization:",
600
600
  " ",
601
601
  /* @__PURE__ */ e("span", { className: r ? "text-indigo-600" : "text-gray-400", children: r ? "On" : "Off" })
602
602
  ] }),
603
603
  /* @__PURE__ */ e(
604
- Me,
604
+ Be,
605
605
  {
606
606
  checked: r,
607
607
  onCheckedChange: (f) => {
@@ -614,7 +614,7 @@ const yt = ({
614
614
  }
615
615
  )
616
616
  ] }),
617
- /* @__PURE__ */ e(B, { children: /* @__PURE__ */ a(M, { children: [
617
+ /* @__PURE__ */ e(M, { children: /* @__PURE__ */ l(B, { children: [
618
618
  /* @__PURE__ */ e($, { asChild: !0, children: /* @__PURE__ */ e(
619
619
  "span",
620
620
  {
@@ -622,7 +622,7 @@ const yt = ({
622
622
  children: /* @__PURE__ */ e(it, { className: "mr-1 h-4 w-4" })
623
623
  }
624
624
  ) }),
625
- /* @__PURE__ */ e(P, { side: "top", children: /* @__PURE__ */ a("p", { className: "text-xs text-white", children: [
625
+ /* @__PURE__ */ e(P, { side: "top", children: /* @__PURE__ */ l("p", { className: "text-xs text-white", children: [
626
626
  "Warning: Unoptimized images may affect ",
627
627
  /* @__PURE__ */ e("br", {}),
628
628
  " performance and page load times"
@@ -636,8 +636,8 @@ const yt = ({
636
636
  }
637
637
  );
638
638
  };
639
- function Ut({ close: s, onSelect: l, mode: c = "image", assetId: i }) {
640
- const d = he(() => [c], [c]), [v, y] = b(null), [p, w] = b(null), [S, C] = b(null), [f, n] = b({ show: !1, file: "" }), [m, h] = b(!1), [x, N] = b(i ? "details" : "grid"), [z, V] = b(""), [D, j] = b(""), [G, H] = b(1), [ee] = b(30), [k, J] = b([]);
639
+ function Ut({ close: s, onSelect: a, mode: c = "image", assetId: i }) {
640
+ const d = he(() => [c], [c]), [v, y] = b(null), [p, w] = b(null), [S, C] = b(null), [f, n] = b({ show: !1, file: "" }), [m, h] = b(!1), [x, N] = b(i ? "details" : "grid"), [z, V] = b(""), [D, j] = b(""), [G, H] = b(1), [ee] = b(30), [k, X] = b([]);
641
641
  W(() => {
642
642
  i && (y(i), N("details"));
643
643
  }, [i]), W(() => {
@@ -668,13 +668,13 @@ function Ut({ close: s, onSelect: l, mode: c = "image", assetId: i }) {
668
668
  j(t.target.value);
669
669
  }, we = L(
670
670
  (t) => {
671
- J((u) => $e(u, { id: t.id }) ? [] : [t]);
671
+ X((u) => $e(u, { id: t.id }) ? [] : [t]);
672
672
  },
673
673
  [!1]
674
674
  ), Ce = L(() => {
675
- J([]);
676
- }, []), le = (t) => {
677
- (t == null ? void 0 : t.length) !== 0 && (l(Oe(qe(t || k), ["id", "url", "width", "height", "description"])), s());
675
+ X([]);
676
+ }, []), ae = (t) => {
677
+ (t == null ? void 0 : t.length) !== 0 && (a(Oe(qe(t || k), ["id", "url", "width", "height", "description"])), s());
678
678
  }, Ae = async (t) => {
679
679
  w(t);
680
680
  }, Se = async () => {
@@ -706,17 +706,17 @@ function Ut({ close: s, onSelect: l, mode: c = "image", assetId: i }) {
706
706
  console.error("Error saving edited image:", U);
707
707
  }
708
708
  }, Te = L((t) => {
709
- J([t]);
709
+ X([t]);
710
710
  }, []), Ie = L(
711
711
  (t) => {
712
712
  re(t);
713
713
  },
714
714
  [re]
715
715
  );
716
- return /* @__PURE__ */ a(Q, { children: [
717
- /* @__PURE__ */ a("div", { className: "flex h-[80vh] max-h-[1232px] w-[80vw] max-w-[1232px] flex-col space-y-4", children: [
716
+ return /* @__PURE__ */ l(Q, { children: [
717
+ /* @__PURE__ */ l("div", { className: "flex h-[80vh] max-h-[1232px] w-[80vw] max-w-[1232px] flex-col space-y-4", children: [
718
718
  /* @__PURE__ */ e("h1", { className: "text-lg font-medium", children: "Digital Asset Manager" }),
719
- x === "grid" ? /* @__PURE__ */ a(Q, { children: [
719
+ x === "grid" ? /* @__PURE__ */ l(Q, { children: [
720
720
  /* @__PURE__ */ e(
721
721
  wt,
722
722
  {
@@ -728,9 +728,9 @@ function Ut({ close: s, onSelect: l, mode: c = "image", assetId: i }) {
728
728
  onUploaded: Te
729
729
  }
730
730
  ),
731
- /* @__PURE__ */ a("div", { className: "relative flex flex-1 flex-col gap-y-3 overflow-hidden rounded-lg border p-2", children: [
732
- /* @__PURE__ */ a("div", { className: "flex items-center justify-between gap-3", children: [
733
- /* @__PURE__ */ a("div", { className: "relative w-1/2", children: [
731
+ /* @__PURE__ */ l("div", { className: "relative flex flex-1 flex-col gap-y-3 overflow-hidden rounded-lg border p-2", children: [
732
+ /* @__PURE__ */ l("div", { className: "flex items-center justify-between gap-3", children: [
733
+ /* @__PURE__ */ l("div", { className: "relative w-1/2", children: [
734
734
  /* @__PURE__ */ e(
735
735
  We,
736
736
  {
@@ -748,8 +748,8 @@ function Ut({ close: s, onSelect: l, mode: c = "image", assetId: i }) {
748
748
  }
749
749
  )
750
750
  ] }),
751
- /* @__PURE__ */ a("div", { className: "flex items-center gap-x-2", children: [
752
- k.length > 0 ? /* @__PURE__ */ e("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
751
+ /* @__PURE__ */ l("div", { className: "flex items-center gap-x-2", children: [
752
+ k.length > 0 ? /* @__PURE__ */ e("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ l("div", { className: "flex items-center gap-2", children: [
753
753
  k.length > 0 && /* @__PURE__ */ e(Q, { children: /* @__PURE__ */ e(
754
754
  g,
755
755
  {
@@ -764,7 +764,7 @@ function Ut({ close: s, onSelect: l, mode: c = "image", assetId: i }) {
764
764
  g,
765
765
  {
766
766
  size: "sm",
767
- onClick: () => le(k),
767
+ onClick: () => ae(k),
768
768
  disabled: k.length === 0,
769
769
  children: "Select Asset"
770
770
  }
@@ -773,7 +773,7 @@ function Ut({ close: s, onSelect: l, mode: c = "image", assetId: i }) {
773
773
  /* @__PURE__ */ e(g, { variant: "ghost", size: "icon", onClick: () => pe(), children: /* @__PURE__ */ e(Ve, { className: "h-4 w-4" }) })
774
774
  ] })
775
775
  ] }),
776
- /* @__PURE__ */ e("div", { className: "flex-1 overflow-y-auto pb-[66px]", children: R ? /* @__PURE__ */ a("div", { className: "columns-1 gap-3 space-y-3 sm:columns-3 md:columns-5", children: [
776
+ /* @__PURE__ */ e("div", { className: "flex-1 overflow-y-auto pb-[66px]", children: R ? /* @__PURE__ */ l("div", { className: "columns-1 gap-3 space-y-3 sm:columns-3 md:columns-5", children: [
777
777
  /* @__PURE__ */ e("div", { className: "h-64 w-full animate-pulse rounded bg-gray-200" }),
778
778
  /* @__PURE__ */ e("div", { className: "h-64 w-full animate-pulse rounded bg-gray-200" }),
779
779
  /* @__PURE__ */ e("div", { className: "h-64 w-full animate-pulse rounded bg-gray-200" }),
@@ -784,12 +784,12 @@ function Ut({ close: s, onSelect: l, mode: c = "image", assetId: i }) {
784
784
  /* @__PURE__ */ e("div", { className: "h-64 w-full animate-pulse rounded bg-gray-200" }),
785
785
  /* @__PURE__ */ e("div", { className: "h-64 w-full animate-pulse rounded bg-gray-200" }),
786
786
  /* @__PURE__ */ e("div", { className: "h-64 w-full animate-pulse rounded bg-gray-200" })
787
- ] }) : !R && !ve ? /* @__PURE__ */ a("div", { className: "flex h-full flex-col items-center justify-center rounded-lg border", children: [
787
+ ] }) : !R && !ve ? /* @__PURE__ */ l("div", { className: "flex h-full flex-col items-center justify-center rounded-lg border", children: [
788
788
  /* @__PURE__ */ e("div", { className: "text-muted-foreground", children: /* @__PURE__ */ e(He, { className: "h-9 w-9 text-indigo-500" }) }),
789
789
  /* @__PURE__ */ e("div", { className: "text-lg text-muted-foreground", children: "No assets found" }),
790
790
  /* @__PURE__ */ e("div", { className: "text-sm text-muted-foreground", children: z.length > 0 ? "No assets found for your search: " + z : "Start uploading assets to get started" }),
791
791
  /* @__PURE__ */ e("br", {})
792
- ] }) : /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-3 p-1", children: I == null ? void 0 : I.map((t) => /* @__PURE__ */ a(
792
+ ] }) : /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-3 p-1", children: I == null ? void 0 : I.map((t) => /* @__PURE__ */ l(
793
793
  "div",
794
794
  {
795
795
  className: ce(
@@ -799,9 +799,9 @@ function Ut({ close: s, onSelect: l, mode: c = "image", assetId: i }) {
799
799
  S === t.id ? "pointer-events-none opacity-50" : ""
800
800
  ),
801
801
  onClick: () => we(t),
802
- onDoubleClick: () => le([t]),
802
+ onDoubleClick: () => ae([t]),
803
803
  children: [
804
- /* @__PURE__ */ a("div", { className: "aspect-square relative overflow-hidden", children: [
804
+ /* @__PURE__ */ l("div", { className: "aspect-square relative overflow-hidden", children: [
805
805
  S === t.id ? /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center bg-black/50", children: /* @__PURE__ */ e(O, { className: "h-8 w-8 animate-spin text-white" }) }) : null,
806
806
  t.type === "image" ? /* @__PURE__ */ e(
807
807
  "img",
@@ -810,8 +810,8 @@ function Ut({ close: s, onSelect: l, mode: c = "image", assetId: i }) {
810
810
  alt: t.name,
811
811
  className: `h-full min-h-[80px] w-full object-contain ${k.some((u) => u.id === t.id) ? "" : "group-hover:blur group-hover:contrast-50"}`
812
812
  }
813
- ) : /* @__PURE__ */ a("div", { className: "flex h-full items-center justify-center", children: [
814
- /* @__PURE__ */ e(Je, { className: "h-12 w-12 text-muted-foreground" }),
813
+ ) : /* @__PURE__ */ l("div", { className: "flex h-full items-center justify-center", children: [
814
+ /* @__PURE__ */ e(Xe, { className: "h-12 w-12 text-muted-foreground" }),
815
815
  t.thumbnailUrl && /* @__PURE__ */ e(
816
816
  "img",
817
817
  {
@@ -822,12 +822,12 @@ function Ut({ close: s, onSelect: l, mode: c = "image", assetId: i }) {
822
822
  )
823
823
  ] })
824
824
  ] }),
825
- /* @__PURE__ */ a("div", { className: "flex items-end justify-between border-t-[1px] border-black/10 bg-white px-2 py-1", children: [
825
+ /* @__PURE__ */ l("div", { className: "flex items-end justify-between border-t-[1px] border-black/10 bg-white px-2 py-1", children: [
826
826
  /* @__PURE__ */ e("div", { className: "truncate text-xs leading-tight", title: t.name, children: t.name }),
827
827
  /* @__PURE__ */ e("div", { className: "flex items-center justify-between whitespace-nowrap text-[9px] font-light text-muted-foreground", children: /* @__PURE__ */ e("span", { children: st((t == null ? void 0 : t.size) || 0) }) })
828
828
  ] }),
829
- !k.some((u) => u.id === t.id) && /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center opacity-0 transition-opacity group-hover:opacity-100", children: /* @__PURE__ */ a("div", { className: "grid grid-cols-4 gap-2 p-2", children: [
830
- /* @__PURE__ */ e(B, { children: /* @__PURE__ */ a(M, { children: [
829
+ !k.some((u) => u.id === t.id) && /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center opacity-0 transition-opacity group-hover:opacity-100", children: /* @__PURE__ */ l("div", { className: "grid grid-cols-4 gap-2 p-2", children: [
830
+ /* @__PURE__ */ e(M, { children: /* @__PURE__ */ l(B, { children: [
831
831
  /* @__PURE__ */ e($, { asChild: !0, children: /* @__PURE__ */ e(
832
832
  g,
833
833
  {
@@ -837,12 +837,12 @@ function Ut({ close: s, onSelect: l, mode: c = "image", assetId: i }) {
837
837
  onClick: (u) => {
838
838
  u.stopPropagation(), Ee(t);
839
839
  },
840
- children: /* @__PURE__ */ e(Xe, { className: "h-4 w-4" })
840
+ children: /* @__PURE__ */ e(Ze, { className: "h-4 w-4" })
841
841
  }
842
842
  ) }),
843
843
  /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e("p", { children: "View Details" }) })
844
844
  ] }) }),
845
- /* @__PURE__ */ e(B, { children: /* @__PURE__ */ a(M, { children: [
845
+ /* @__PURE__ */ e(M, { children: /* @__PURE__ */ l(B, { children: [
846
846
  /* @__PURE__ */ e($, { asChild: !0, children: /* @__PURE__ */ e(
847
847
  g,
848
848
  {
@@ -857,7 +857,7 @@ function Ut({ close: s, onSelect: l, mode: c = "image", assetId: i }) {
857
857
  ) }),
858
858
  /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e("p", { children: "Copy URL" }) })
859
859
  ] }) }),
860
- /* @__PURE__ */ e(B, { children: /* @__PURE__ */ a(M, { children: [
860
+ /* @__PURE__ */ e(M, { children: /* @__PURE__ */ l(B, { children: [
861
861
  /* @__PURE__ */ e($, { asChild: !0, children: /* @__PURE__ */ e(
862
862
  g,
863
863
  {
@@ -872,12 +872,12 @@ function Ut({ close: s, onSelect: l, mode: c = "image", assetId: i }) {
872
872
  name: t.name
873
873
  });
874
874
  },
875
- children: /* @__PURE__ */ e(Ze, { className: "h-4 w-4" })
875
+ children: /* @__PURE__ */ e(Je, { className: "h-4 w-4" })
876
876
  }
877
877
  ) }),
878
878
  /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e("p", { children: "Edit Image" }) })
879
879
  ] }) }),
880
- /* @__PURE__ */ e(B, { children: /* @__PURE__ */ a(M, { children: [
880
+ /* @__PURE__ */ e(M, { children: /* @__PURE__ */ l(B, { children: [
881
881
  /* @__PURE__ */ e($, { asChild: !0, children: /* @__PURE__ */ e(
882
882
  g,
883
883
  {
@@ -940,7 +940,7 @@ function Ut({ close: s, onSelect: l, mode: c = "image", assetId: i }) {
940
940
  )
941
941
  ] }),
942
942
  f.show && /* @__PURE__ */ e(
943
- at,
943
+ lt,
944
944
  {
945
945
  fallback: /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ e(O, { className: "h-8 w-8 animate-spin" }) }),
946
946
  children: /* @__PURE__ */ e(
@@ -955,16 +955,16 @@ function Ut({ close: s, onSelect: l, mode: c = "image", assetId: i }) {
955
955
  )
956
956
  }
957
957
  ),
958
- p && /* @__PURE__ */ e(De, { open: !!p, onOpenChange: () => w(null), children: /* @__PURE__ */ a(je, { children: [
959
- /* @__PURE__ */ a(Fe, { children: [
958
+ p && /* @__PURE__ */ e(De, { open: !!p, onOpenChange: () => w(null), children: /* @__PURE__ */ l(je, { children: [
959
+ /* @__PURE__ */ l(Fe, { children: [
960
960
  /* @__PURE__ */ e(Ue, { children: "Delete Asset" }),
961
- /* @__PURE__ */ a(Le, { children: [
961
+ /* @__PURE__ */ l(Le, { children: [
962
962
  'Are you sure you want to delete "',
963
963
  p.name,
964
964
  '"? This action cannot be undone.'
965
965
  ] })
966
966
  ] }),
967
- /* @__PURE__ */ a(Be, { className: "gap-2 sm:gap-0", children: [
967
+ /* @__PURE__ */ l(Me, { className: "gap-2 sm:gap-0", children: [
968
968
  /* @__PURE__ */ e(g, { variant: "outline", onClick: () => w(null), children: "Cancel" }),
969
969
  /* @__PURE__ */ e(g, { variant: "destructive", onClick: Se, children: "Delete" })
970
970
  ] })