@cobaltcore-dev/aurora 2.1.0 → 2.1.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 (54) hide show
  1. package/dist/client/DeleteFlavorModal-C4nAi7gY.mjs +724 -0
  2. package/dist/client/DeleteFlavorModal-C4nAi7gY.mjs.map +1 -0
  3. package/dist/client/_flavorId-BPvssEzn.mjs +277 -0
  4. package/dist/client/_flavorId-BPvssEzn.mjs.map +1 -0
  5. package/dist/client/{_flavorId-CgueqKTs.mjs → _flavorId-CFUBcU-l.mjs} +3 -3
  6. package/dist/client/{_flavorId-CgueqKTs.mjs.map → _flavorId-CFUBcU-l.mjs.map} +1 -1
  7. package/dist/client/{_flavorId-B7fp6Nk8.mjs → _flavorId-CZcIp0Ih.mjs} +2 -2
  8. package/dist/client/{_flavorId-B7fp6Nk8.mjs.map → _flavorId-CZcIp0Ih.mjs.map} +1 -1
  9. package/dist/client/_imageId-BAezmV0Y.mjs +526 -0
  10. package/dist/client/_imageId-BAezmV0Y.mjs.map +1 -0
  11. package/dist/client/{_imageId-Ccv8PedW.mjs → _imageId-D-jqz3e3.mjs} +3 -3
  12. package/dist/client/_imageId-D-jqz3e3.mjs.map +1 -0
  13. package/dist/client/{_imageId-D9LR-02T.mjs → _imageId-gMdrdnVt.mjs} +2 -2
  14. package/dist/client/_imageId-gMdrdnVt.mjs.map +1 -0
  15. package/dist/client/{_projectId-BDARsteX.mjs → _projectId-BYccdAtX.mjs} +3 -3
  16. package/dist/client/{_projectId-BDARsteX.mjs.map → _projectId-BYccdAtX.mjs.map} +1 -1
  17. package/dist/client/{_projectId-ZBk6vka0.mjs → _projectId-CBjZC1tv.mjs} +5 -5
  18. package/dist/client/{_projectId-ZBk6vka0.mjs.map → _projectId-CBjZC1tv.mjs.map} +1 -1
  19. package/dist/client/{_projectId-CtyAHqhH.mjs → _projectId-CLEa1zgw.mjs} +2 -2
  20. package/dist/client/{_projectId-CtyAHqhH.mjs.map → _projectId-CLEa1zgw.mjs.map} +1 -1
  21. package/dist/client/{flavors-Ce3J-cFa.mjs → flavors-CJVSNz6R.mjs} +2 -2
  22. package/dist/client/{flavors-Ce3J-cFa.mjs.map → flavors-CJVSNz6R.mjs.map} +1 -1
  23. package/dist/client/{flavors-D5ThLaXO.mjs → flavors-CflJDIEH.mjs} +25 -24
  24. package/dist/client/{flavors-D5ThLaXO.mjs.map → flavors-CflJDIEH.mjs.map} +1 -1
  25. package/dist/client/imageHelpers-DBhL2ebL.mjs +1272 -0
  26. package/dist/client/imageHelpers-DBhL2ebL.mjs.map +1 -0
  27. package/dist/client/{images-C8M3ysWR.mjs → images-BsylWUiH.mjs} +836 -848
  28. package/dist/client/images-BsylWUiH.mjs.map +1 -0
  29. package/dist/client/{images-Cf5R28NR.mjs → images-zQq1nSVv.mjs} +2 -2
  30. package/dist/client/{images-Cf5R28NR.mjs.map → images-zQq1nSVv.mjs.map} +1 -1
  31. package/dist/client/index.js +10 -9
  32. package/dist/client/index.js.map +1 -1
  33. package/dist/client/{securitygroups-DXrfyuVF.mjs → securitygroups-CSmsBzUb.mjs} +104 -103
  34. package/dist/client/securitygroups-CSmsBzUb.mjs.map +1 -0
  35. package/dist/client/{securitygroups-67fFxiwt.mjs → securitygroups-T7kaNFEp.mjs} +2 -2
  36. package/dist/client/{securitygroups-67fFxiwt.mjs.map → securitygroups-T7kaNFEp.mjs.map} +1 -1
  37. package/dist/client/trpcClient.d.ts +0 -1
  38. package/dist/client/useErrorTranslation-Dc0eE8Zt.mjs +83 -0
  39. package/dist/client/useErrorTranslation-Dc0eE8Zt.mjs.map +1 -0
  40. package/dist/server/index.d.ts +0 -1
  41. package/dist/server/index.js +786 -534
  42. package/package.json +2 -2
  43. package/dist/client/DeleteFlavorModal-Be2GFiB_.mjs +0 -802
  44. package/dist/client/DeleteFlavorModal-Be2GFiB_.mjs.map +0 -1
  45. package/dist/client/ImageToastNotifications-BWfzOUMc.mjs +0 -1135
  46. package/dist/client/ImageToastNotifications-BWfzOUMc.mjs.map +0 -1
  47. package/dist/client/_flavorId-0PioWpEp.mjs +0 -276
  48. package/dist/client/_flavorId-0PioWpEp.mjs.map +0 -1
  49. package/dist/client/_imageId-Ccv8PedW.mjs.map +0 -1
  50. package/dist/client/_imageId-CiqEQB_J.mjs +0 -558
  51. package/dist/client/_imageId-CiqEQB_J.mjs.map +0 -1
  52. package/dist/client/_imageId-D9LR-02T.mjs.map +0 -1
  53. package/dist/client/images-C8M3ysWR.mjs.map +0 -1
  54. package/dist/client/securitygroups-DXrfyuVF.mjs.map +0 -1
@@ -1,48 +1,48 @@
1
1
  import { C as e, D as t, K as n, L as r, O as i, Q as a, R as o, S as s, T as c, U as l, V as u, X as d, a as f, c as p, ft as m, g as h, h as g, i as _, it as v, l as y, m as b, o as x, ot as S, p as C, r as w, rt as T, st as E, t as D, x as O } from "./build-WuxXRAqf.mjs";
2
2
  import { a as k, i as A } from "./trpcClient-D7gpR7YG.mjs";
3
3
  import { t as j } from "./cn-DM4Cy3jv.mjs";
4
- import { t as M } from "./images-Cf5R28NR.mjs";
5
- import { t as N } from "./useProjectId-DBc5lpoU.mjs";
6
- import { t as ee } from "./SortInput-4g7nSTHW.mjs";
4
+ import { t as M } from "./images-zQq1nSVv.mjs";
5
+ import { t as ee } from "./useProjectId-DBc5lpoU.mjs";
6
+ import { t as N } from "./SortInput-4g7nSTHW.mjs";
7
7
  import { t as P } from "./useModalTracking-BYd37pXm.mjs";
8
8
  import { t as F } from "./ContentHeader-fKKZVu-o.mjs";
9
9
  import "./hooks-D0yKIumu.mjs";
10
- import { A as I, C as te, D as ne, E as L, F as re, I as R, M as z, N as B, O as ie, P as V, S as H, T as ae, _ as oe, a as se, b as ce, c as U, d as W, f as le, g as ue, h as G, i as de, j as fe, k as pe, l as me, m as he, n as ge, o as _e, p as ve, r as ye, s as be, t as xe, u as Se, v as Ce, w as we, x as Te, y as Ee } from "./ImageToastNotifications-BWfzOUMc.mjs";
11
- import { n as De, t as Oe } from "./FiltersInput-Becwxo_J.mjs";
10
+ import { A as I, C as L, D as R, E as te, F as z, I as B, L as ne, M as V, N as H, O as re, P as U, R as W, S as ie, T as ae, _ as oe, a as se, b as ce, c as le, d as ue, f as de, g as fe, h as pe, i as me, j as he, k as ge, l as _e, m as ve, n as G, o as ye, p as be, r as xe, s as Se, t as Ce, u as we, v as Te, w as Ee, x as De, y as Oe } from "./imageHelpers-DBhL2ebL.mjs";
11
+ import { n as ke, t as Ae } from "./FiltersInput-Becwxo_J.mjs";
12
12
  import { Fragment as K, jsx as q, jsxs as J } from "react/jsx-runtime";
13
- import { Suspense as ke, startTransition as Ae, use as je, useCallback as Y, useEffect as X, useMemo as Me, useRef as Ne, useState as Z } from "react";
14
- import { useNavigate as Pe, useParams as Fe, useSearch as Ie } from "@tanstack/react-router";
15
- import { TRPCClientError as Le } from "@trpc/client";
13
+ import { Suspense as je, startTransition as Me, use as Ne, useCallback as Pe, useEffect as Y, useMemo as X, useRef as Fe, useState as Z } from "react";
14
+ import { useNavigate as Ie, useParams as Le, useSearch as Re } from "@tanstack/react-router";
15
+ import { TRPCClientError as ze } from "@trpc/client";
16
16
  import { Trans as Q, useLingui as $ } from "@lingui/react";
17
- import { z as Re } from "zod";
18
- import { ErrorBoundary as ze } from "react-error-boundary";
19
- import { useForm as Be, useStore as Ve } from "@tanstack/react-form";
17
+ import { z as Be } from "zod";
18
+ import { ErrorBoundary as Ve } from "react-error-boundary";
19
+ import { useForm as He, useStore as Ue } from "@tanstack/react-form";
20
20
  import "@trpc/server";
21
21
  //#region src/client/routes/_auth/projects/$projectId/compute/images/-components/ImageTableRow.tsx
22
- function He({ image: e, isSelected: r, isPending: i, isAccepted: a, permissions: o, onEditDetails: s, onEditMetadata: l, onDelete: u, onSelect: d, onActivationStatusChange: f, onManageAccess: p, onUpdateVisibility: m, uploadId: g, uploadProgressPercent: _, onMemberStatusChanged: v, showSelectColumn: y = !1 }) {
23
- let { i18n: b, _: x } = $(), { id: C, name: T, status: A, visibility: j, size: M, disk_format: N, created_at: ee, owner: P } = e, F = T || b._({ id: "MEIAzV" }), { projectId: I } = Fe({ from: "/_auth/projects/$projectId/compute/images/" }), te = Pe(), ne = k.useUtils(), L = k.compute.updateImageMember.useMutation({ onSuccess: () => {
24
- ne.compute.listImagesWithPagination.invalidate(), ne.compute.listSharedImagesByMemberStatus.invalidate();
25
- } }), z = async (e) => {
22
+ function We({ image: e, isSelected: r, isPending: i, isAccepted: a, permissions: o, onEditDetails: s, onEditMetadata: l, onDelete: u, onSelect: d, onActivationStatusChange: f, onManageAccess: p, onUpdateVisibility: m, uploadId: g, uploadProgressPercent: _, onMemberStatusChanged: v, showSelectColumn: y = !1 }) {
23
+ let { i18n: b, _: x } = $(), { id: C, name: T, status: A, visibility: j, size: M, disk_format: ee, created_at: N } = e, P = T || b._({ id: "MEIAzV" }), { projectId: F } = Le({ from: "/_auth/projects/$projectId/compute/images/" }), I = Ie(), L = k.useUtils(), R = k.compute.updateImageMember.useMutation({ onSuccess: () => {
24
+ L.compute.listImagesWithPagination.invalidate(), L.compute.listSharedImagesByMemberStatus.invalidate();
25
+ } }), te = async (e) => {
26
26
  try {
27
- await L.mutateAsync({
28
- project_id: I,
27
+ await R.mutateAsync({
28
+ project_id: F,
29
29
  imageId: C,
30
- memberId: I,
30
+ memberId: F,
31
31
  status: e
32
32
  });
33
- let { message: t, ...n } = W(e);
33
+ let { message: t, ...n } = oe(e);
34
34
  S.info(t, n), v?.();
35
35
  } catch (e) {
36
- let t = e?.message, { message: n, ...r } = Se(t);
36
+ let t = e?.message, { message: n, ...r } = fe(t);
37
37
  S.error(n, r);
38
38
  }
39
- }, ie = I === P, H = i || a, ae = L.isPending;
39
+ }, V = i || a, H = e.owner === F, re = R.isPending;
40
40
  return /*#__PURE__*/ J(c, {
41
41
  "data-testid": `image-row-${C}`,
42
- onClick: () => te({
42
+ onClick: () => I({
43
43
  to: "/projects/$projectId/compute/images/$imageId",
44
44
  params: {
45
- projectId: I,
45
+ projectId: F,
46
46
  imageId: C
47
47
  }
48
48
  }),
@@ -55,30 +55,50 @@ function He({ image: e, isSelected: r, isPending: i, isAccepted: a, permissions:
55
55
  })
56
56
  }),
57
57
  /*#__PURE__*/ q(D, { children: A }),
58
- /*#__PURE__*/ q(D, { children: F }),
58
+ /*#__PURE__*/ q(D, { children: P }),
59
59
  /*#__PURE__*/ q(D, { children: j }),
60
60
  /*#__PURE__*/ q(D, { children: e.protected ? b._({ id: "l75CjT" }) : b._({ id: "1UzENP" }) }),
61
- /*#__PURE__*/ q(D, { children: g && g === C ? `${_}%` : /*#__PURE__*/ q(R, { size: M }) }),
62
- /*#__PURE__*/ q(D, { children: N || b._({ id: "fj5byd" }) }),
63
- /*#__PURE__*/ q(D, { children: ee ? new Date(ee).toLocaleDateString() : b._({ id: "fj5byd" }) }),
61
+ /*#__PURE__*/ q(D, { children: g && g === C ? `${_}%` : /*#__PURE__*/ q(W, { size: M }) }),
62
+ /*#__PURE__*/ q(D, { children: ee || b._({ id: "fj5byd" }) }),
63
+ /*#__PURE__*/ q(D, { children: N ? new Date(N).toLocaleDateString() : b._({ id: "fj5byd" }) }),
64
64
  /*#__PURE__*/ q(D, {
65
65
  onClick: (e) => e.stopPropagation(),
66
- children: ae ? /*#__PURE__*/ q(n, {
66
+ children: re ? /*#__PURE__*/ q(n, {
67
67
  variant: "primary",
68
68
  size: "small"
69
69
  }) : /*#__PURE__*/ q(t, { children: /*#__PURE__*/ J(h, { children: [
70
- H && o.canUpdateMember && /*#__PURE__*/ J(K, { children: [i && /*#__PURE__*/ q(O, {
71
- label: b._({ id: "g3UF2V" }),
72
- onClick: () => z(re.ACCEPTED)
73
- }), /*#__PURE__*/ q(O, {
74
- label: b._({ id: "1t/NnN" }),
75
- onClick: () => z(re.REJECTED)
76
- })] }),
77
- !H && o.canUpdate && /*#__PURE__*/ J(K, { children: [
70
+ V && !H && o.canUpdateMember && /*#__PURE__*/ J(K, { children: [
78
71
  /*#__PURE__*/ q(O, {
79
- label: e.status === B.DEACTIVATED ? b._({ id: "FQBaXG" }) : b._({ id: "5y3O+A" }),
80
- onClick: () => f(e)
72
+ label: b._({ id: "v0hPHE" }),
73
+ onClick: () => I({
74
+ to: "/projects/$projectId/compute/images/$imageId",
75
+ params: {
76
+ projectId: F,
77
+ imageId: C
78
+ }
79
+ })
80
+ }),
81
+ /*#__PURE__*/ q(w, {}),
82
+ i && /*#__PURE__*/ q(O, {
83
+ label: b._({ id: "g3UF2V" }),
84
+ onClick: () => te(ne.ACCEPTED)
81
85
  }),
86
+ /*#__PURE__*/ q(O, {
87
+ label: b._({ id: "1t/NnN" }),
88
+ onClick: () => te(ne.REJECTED)
89
+ })
90
+ ] }),
91
+ !V && /*#__PURE__*/ q(O, {
92
+ label: b._({ id: "v0hPHE" }),
93
+ onClick: () => I({
94
+ to: "/projects/$projectId/compute/images/$imageId",
95
+ params: {
96
+ projectId: F,
97
+ imageId: C
98
+ }
99
+ })
100
+ }),
101
+ !V && o.canUpdate && /*#__PURE__*/ J(K, { children: [
82
102
  /*#__PURE__*/ q(O, {
83
103
  label: b._({ id: "Y1YKad" }),
84
104
  onClick: () => s(e)
@@ -87,27 +107,22 @@ function He({ image: e, isSelected: r, isPending: i, isAccepted: a, permissions:
87
107
  label: b._({ id: "SIfYq6" }),
88
108
  onClick: () => l(e)
89
109
  }),
90
- e.visibility === V.SHARED && ie && (o.canCreateMember || o.canDeleteMember) && /*#__PURE__*/ q(O, {
110
+ /*#__PURE__*/ q(w, {}),
111
+ e.visibility === B.SHARED && (o.canCreateMember || o.canDeleteMember) && /*#__PURE__*/ q(O, {
91
112
  label: b._({ id: "cWbW6w" }),
92
113
  onClick: () => p(e)
93
114
  }),
94
- e.visibility === V.PRIVATE && /*#__PURE__*/ q(O, {
115
+ e.visibility === B.PRIVATE && /*#__PURE__*/ q(O, {
95
116
  label: b._({ id: "gMYsdZ" }),
96
- onClick: () => m(e.id, V.SHARED, F)
117
+ onClick: () => m(e.id, B.SHARED, P)
118
+ }),
119
+ /*#__PURE__*/ q(O, {
120
+ label: e.status === z.DEACTIVATED ? b._({ id: "RSFkXF" }) : b._({ id: "hQr1Cr" }),
121
+ onClick: () => f(e)
97
122
  })
98
123
  ] }),
99
- /*#__PURE__*/ q(O, {
100
- label: b._({ id: "v0hPHE" }),
101
- onClick: () => te({
102
- to: "/projects/$projectId/compute/images/$imageId",
103
- params: {
104
- projectId: I,
105
- imageId: C
106
- }
107
- })
108
- }),
109
- !H && o.canDelete && !e.protected && /*#__PURE__*/ J(K, { children: [/*#__PURE__*/ q(w, {}), /*#__PURE__*/ q(O, {
110
- label: b._({ id: "cnGeoo" }),
124
+ !V && o.canDelete && !e.protected && /*#__PURE__*/ J(K, { children: [/*#__PURE__*/ q(w, {}), /*#__PURE__*/ q(O, {
125
+ label: b._({ id: "KWa0gi" }),
111
126
  onClick: () => u(e)
112
127
  })] })
113
128
  ] }) })
@@ -117,7 +132,7 @@ function He({ image: e, isSelected: r, isPending: i, isAccepted: a, permissions:
117
132
  }
118
133
  //#endregion
119
134
  //#region src/server/Compute/helpers/imageHelpers.ts
120
- var Ue = {
135
+ var Ge = {
121
136
  qcow2: [
122
137
  "bare",
123
138
  "ova",
@@ -137,7 +152,7 @@ var Ue = {
137
152
  aki: ["aki"],
138
153
  ari: ["ari"],
139
154
  ploop: ["bare"]
140
- }, We = {
155
+ }, Ke = {
141
156
  qcow2: "bare",
142
157
  raw: "bare",
143
158
  vmdk: "bare",
@@ -150,28 +165,28 @@ var Ue = {
150
165
  ari: "ari",
151
166
  ploop: "bare"
152
167
  };
153
- function Ge(e) {
154
- return Ue[e] || [];
168
+ function qe(e) {
169
+ return Ge[e] || [];
155
170
  }
156
- function Ke(e) {
157
- return We[e] || "";
171
+ function Je(e) {
172
+ return Ke[e] || "";
158
173
  }
159
- function qe(e, t) {
160
- return Ge(e).includes(t);
174
+ function Ye(e, t) {
175
+ return qe(e).includes(t);
161
176
  }
162
177
  //#endregion
163
178
  //#region src/client/routes/_auth/projects/$projectId/compute/images/-components/CreateImageModal.tsx
164
- var Je = {
179
+ var Xe = {
165
180
  name: "",
166
181
  tags: [],
167
- visibility: V.PRIVATE,
182
+ visibility: B.PRIVATE,
168
183
  disk_format: void 0,
169
184
  container_format: void 0,
170
185
  protected: !1,
171
186
  min_disk: 0,
172
187
  min_ram: 0
173
- }, Ye = ({ isOpen: e, onClose: t, onCreate: n, isLoading: i = !1, isUploadPending: s = !1, uploadProgressPercent: c }) => {
174
- let { i18n: u, _: f } = $(), [p, h] = Z({ ...Je }), [y, x] = Z(""), [S, w] = Z(null), [D, O] = Z({}), [k, A] = Z(!1), [M, N] = Z(null), ee = p.name.trim() !== "" && S !== null && p.disk_format !== void 0 && p.disk_format.trim() !== "" && p.container_format !== void 0 && p.container_format.trim() !== "" && p.min_disk >= 0 && p.min_ram >= 0, P = Me(() => p.disk_format ? Ge(p.disk_format) : [], [p.disk_format]), F = [
188
+ }, Ze = ({ isOpen: e, onClose: t, onCreate: n, isLoading: i = !1, isUploadPending: s = !1, uploadProgressPercent: c, onCancelUpload: u }) => {
189
+ let { i18n: f, _: p } = $(), [h, y] = Z({ ...Xe }), [x, S] = Z(""), [w, D] = Z(null), [O, k] = Z({}), [A, M] = Z(!1), [ee, N] = Z(null), P = h.name.trim() !== "" && w !== null && h.disk_format !== void 0 && h.disk_format.trim() !== "" && h.container_format !== void 0 && h.container_format.trim() !== "" && h.min_disk >= 0 && h.min_ram >= 0, F = X(() => h.disk_format ? qe(h.disk_format) : [], [h.disk_format]), I = [
175
190
  ".qcow2",
176
191
  ".raw",
177
192
  ".vmdk",
@@ -184,451 +199,348 @@ var Je = {
184
199
  ".iso",
185
200
  ".ploop",
186
201
  ".img"
187
- ], I = F.join(", "), te = (e) => {
202
+ ], L = I.join(", "), R = (e) => {
188
203
  let { name: t, value: n, type: r, checked: i } = e.target;
189
- h((e) => ({
204
+ y((e) => ({
190
205
  ...e,
191
206
  [t]: r === "checkbox" ? i : n
192
- })), D[t] && O((e) => {
207
+ })), O[t] && k((e) => {
193
208
  let n = { ...e };
194
209
  return delete n[t], n;
195
210
  });
196
- }, ne = (e) => {
211
+ }, te = (e) => {
197
212
  let { name: t, value: n } = e.target;
198
- t === "name" && (!n || n.trim() === "") && O((e) => ({
213
+ t === "name" && (!n || n.trim() === "") && k((e) => ({
199
214
  ...e,
200
- name: u._({ id: "wyIOMP" })
215
+ name: f._({ id: "wyIOMP" })
201
216
  }));
202
- }, L = (e, t) => {
217
+ }, z = (e, t) => {
203
218
  if (e === "disk_format") {
204
- let e = t, n = Ke(e);
205
- h((t) => ({
219
+ let e = t, n = Je(e);
220
+ y((t) => ({
206
221
  ...t,
207
222
  disk_format: e,
208
223
  container_format: n
209
224
  }));
210
- } else h((n) => ({
225
+ } else y((n) => ({
211
226
  ...n,
212
227
  [e]: t
213
228
  }));
214
- D[e] && O((t) => {
229
+ O[e] && k((t) => {
215
230
  let n = { ...t };
216
231
  return delete n[e], n;
217
232
  });
218
- }, re = (e, t) => {
233
+ }, ne = (e, t) => {
219
234
  let n = t === "" ? 0 : parseInt(t, 10);
220
- isNaN(n) || (h((t) => ({
235
+ isNaN(n) || (y((t) => ({
221
236
  ...t,
222
237
  [e]: n
223
- })), D[e] && O((t) => {
238
+ })), O[e] && k((t) => {
224
239
  let n = { ...t };
225
240
  return delete n[e], n;
226
241
  }));
227
- }, R = (e, t) => {
228
- t < 0 && (e === "min_disk" ? O((e) => ({
242
+ }, V = (e, t) => {
243
+ t < 0 && (e === "min_disk" ? k((e) => ({
229
244
  ...e,
230
- min_disk: u._({ id: "K3bUTE" })
231
- })) : e === "min_ram" && O((e) => ({
245
+ min_disk: f._({ id: "K3bUTE" })
246
+ })) : e === "min_ram" && k((e) => ({
232
247
  ...e,
233
- min_ram: u._({ id: "PEGvy+" })
248
+ min_ram: f._({ id: "PEGvy+" })
234
249
  })));
235
- }, B = (e) => {
250
+ }, H = (e) => {
236
251
  let t = e.name.toLowerCase();
237
- F.some((e) => t.endsWith(e)) ? (w(e), D.file && O((e) => {
252
+ I.some((e) => t.endsWith(e)) ? (D(e), O.file && k((e) => {
238
253
  let t = { ...e };
239
254
  return delete t.file, t;
240
- })) : O((e) => ({
255
+ })) : k((e) => ({
241
256
  ...e,
242
- file: u._({
257
+ file: f._({
243
258
  id: "qzIZOL",
244
- values: { supportedFileFormats: I }
259
+ values: { supportedFileFormats: L }
245
260
  })
246
261
  }));
247
- }, ie = (e) => {
262
+ }, re = (e) => {
248
263
  let t = e.target.files?.[0];
249
- t && B(t);
250
- }, H = (e) => {
251
- e.preventDefault(), e.stopPropagation(), A(!0);
264
+ t && H(t);
265
+ }, W = (e) => {
266
+ e.preventDefault(), e.stopPropagation(), M(!0);
267
+ }, ie = (e) => {
268
+ e.preventDefault(), e.stopPropagation(), M(!1);
252
269
  }, ae = (e) => {
253
- e.preventDefault(), e.stopPropagation(), A(!1);
254
- }, oe = (e) => {
255
- e.preventDefault(), e.stopPropagation(), A(!1);
270
+ e.preventDefault(), e.stopPropagation(), M(!1);
256
271
  let t = e.dataTransfer.files;
257
- t && t.length > 0 && B(t[0]);
258
- }, se = (e) => {
259
- x(e.target.value);
260
- }, ce = () => {
261
- let e = y.trim();
272
+ t && t.length > 0 && H(t[0]);
273
+ }, oe = (e) => {
274
+ S(e.target.value);
275
+ }, se = () => {
276
+ let e = x.trim();
262
277
  if (e !== "") {
263
- if (p.tags.includes(e)) {
264
- x("");
278
+ if (h.tags.includes(e)) {
279
+ S("");
265
280
  return;
266
281
  }
267
- h((t) => ({
282
+ y((t) => ({
268
283
  ...t,
269
284
  tags: [...t.tags, e]
270
- })), x("");
285
+ })), S("");
271
286
  }
272
- }, U = (e) => {
273
- e.key === "Enter" && (e.preventDefault(), ce());
274
- }, W = (e) => {
275
- h((t) => ({
287
+ }, ce = (e) => {
288
+ e.key === "Enter" && (e.preventDefault(), se());
289
+ }, le = (e) => {
290
+ y((t) => ({
276
291
  ...t,
277
292
  tags: t.tags.filter((t) => t !== e)
278
293
  }));
279
- }, le = () => {
294
+ }, ue = () => {
280
295
  let e = {};
281
- return (!p.name || p.name.trim() === "") && (e.name = u._({ id: "wyIOMP" })), S || (e.file = u._({ id: "aTqCTq" })), (!p.disk_format || p.disk_format.trim() === "") && (e.disk_format = u._({ id: "LK0pQN" })), (!p.container_format || p.container_format.trim() === "") && (e.container_format = u._({ id: "J4DKSM" })), p.disk_format && p.container_format && (qe(p.disk_format, p.container_format) || (e.container_format = u._({ id: "BgMp/T" }))), p.min_disk < 0 && (e.min_disk = u._({ id: "K3bUTE" })), p.min_ram < 0 && (e.min_ram = u._({ id: "PEGvy+" })), O(e), Object.keys(e).length === 0;
282
- }, ue = async (e) => {
283
- if (e.preventDefault(), N(null), !le()) {
284
- N(u._({ id: "CBFSfX" }));
296
+ return (!h.name || h.name.trim() === "") && (e.name = f._({ id: "wyIOMP" })), w || (e.file = f._({ id: "aTqCTq" })), (!h.disk_format || h.disk_format.trim() === "") && (e.disk_format = f._({ id: "LK0pQN" })), (!h.container_format || h.container_format.trim() === "") && (e.container_format = f._({ id: "J4DKSM" })), h.disk_format && h.container_format && (Ye(h.disk_format, h.container_format) || (e.container_format = f._({ id: "BgMp/T" }))), h.min_disk < 0 && (e.min_disk = f._({ id: "K3bUTE" })), h.min_ram < 0 && (e.min_ram = f._({ id: "PEGvy+" })), k(e), Object.keys(e).length === 0;
297
+ }, de = async (e) => {
298
+ if (e.preventDefault(), N(null), !ue()) {
299
+ N(f._({ id: "CBFSfX" }));
285
300
  return;
286
301
  }
287
302
  try {
288
303
  await n({
289
- name: p.name.trim(),
290
- tags: p.tags,
291
- visibility: p.visibility,
292
- disk_format: p.disk_format,
293
- container_format: p.container_format,
294
- protected: p.protected,
295
- min_disk: p.min_disk,
296
- min_ram: p.min_ram
297
- }, S), G();
304
+ name: h.name.trim(),
305
+ tags: h.tags,
306
+ visibility: h.visibility,
307
+ disk_format: h.disk_format,
308
+ container_format: h.container_format,
309
+ protected: h.protected,
310
+ min_disk: h.min_disk,
311
+ min_ram: h.min_ram
312
+ }, w), fe();
298
313
  } catch (e) {
299
- let t = e instanceof Error ? e.message : u._({ id: "TQn3hH" });
314
+ let t = e instanceof Error ? e.message : f._({ id: "TQn3hH" });
300
315
  N(t);
301
316
  }
302
- }, G = () => {
303
- h({ ...Je }), x(""), w(null), O({}), N(null), t();
304
- };
317
+ }, fe = () => {
318
+ y({ ...Xe }), S(""), D(null), k({}), N(null), t();
319
+ }, pe = i && s, me = i && !s;
305
320
  return /*#__PURE__*/ J(d, {
306
321
  open: e,
307
- onCancel: i ? void 0 : G,
322
+ onCancel: pe ? u : i ? void 0 : fe,
308
323
  size: "large",
309
- title: u._({ id: "xw2UtT" }),
310
- onConfirm: ue,
311
- confirmButtonLabel: u._({ id: "a/nTb8" }),
312
- cancelButtonLabel: u._({ id: "dEgA5A" }),
313
- disableConfirmButton: i || !ee,
314
- closeable: !i,
324
+ title: f._({ id: "xw2UtT" }),
325
+ onConfirm: i ? void 0 : de,
326
+ confirmButtonLabel: i ? void 0 : f._({ id: "a/nTb8" }),
327
+ cancelButtonLabel: pe ? f._({ id: "tsaPT/" }) : f._({ id: "dEgA5A" }),
328
+ disableConfirmButton: i || !P,
329
+ disableCancelButton: me,
330
+ closeable: !0,
331
+ disableCloseButton: i,
315
332
  closeOnEsc: !i,
316
- children: [
317
- i && !c && /*#__PURE__*/ q(T, {
318
- status: "progress",
319
- title: s ? u._({ id: "JGNFec" }) : u._({ id: "T6jnH+" }),
320
- className: "mt-4"
321
- }),
322
- i && !!c && /*#__PURE__*/ q("div", {
323
- className: "bg-neutral-quaternary mt-4 w-full rounded-full",
333
+ children: [i && /*#__PURE__*/ q("div", {
334
+ className: "mt-4",
335
+ children: c ? /*#__PURE__*/ q("div", {
336
+ className: "bg-neutral-quaternary w-full rounded-full",
324
337
  children: /*#__PURE__*/ J("div", {
325
338
  className: "bg-theme-info flex h-4 items-center justify-center rounded-full p-0.5 text-center text-xs leading-none font-medium text-white",
326
339
  style: { width: `${c}%` },
327
340
  children: [c, "%"]
328
341
  })
329
- }),
330
- !i && /*#__PURE__*/ J(m, {
331
- className: "mb-6",
332
- children: [
333
- M && /*#__PURE__*/ q(r, {
334
- variant: "error",
335
- className: "mb-6",
336
- children: M
337
- }),
338
- /*#__PURE__*/ q(C, {
339
- className: "mb-6",
340
- children: /*#__PURE__*/ q(g, { children: /*#__PURE__*/ J("div", {
341
- className: "w-full",
342
- children: [
343
- /*#__PURE__*/ J("label", {
342
+ }) : /*#__PURE__*/ q(T, {
343
+ status: "progress",
344
+ title: s ? f._({ id: "ca4F3Y" }) : f._({ id: "T6jnH+" }),
345
+ className: "mt-0"
346
+ })
347
+ }), !i && /*#__PURE__*/ J(m, {
348
+ className: "mb-6",
349
+ children: [
350
+ ee && /*#__PURE__*/ q(r, {
351
+ variant: "error",
352
+ className: "mb-6",
353
+ children: ee
354
+ }),
355
+ /*#__PURE__*/ q(C, {
356
+ className: "mb-6",
357
+ children: /*#__PURE__*/ q(g, { children: /*#__PURE__*/ J("div", {
358
+ className: "w-full",
359
+ children: [
360
+ /*#__PURE__*/ J("label", {
361
+ htmlFor: "image-file",
362
+ className: "mb-2 block text-sm font-medium text-gray-900",
363
+ children: [f._({ id: "UKwOYH" }), /*#__PURE__*/ q("span", {
364
+ className: "ml-1 text-red-500",
365
+ children: "*"
366
+ })]
367
+ }),
368
+ /*#__PURE__*/ q("div", {
369
+ className: "flex w-full items-center justify-center",
370
+ children: /*#__PURE__*/ J("label", {
344
371
  htmlFor: "image-file",
345
- className: "mb-2 block text-sm font-medium text-gray-900",
346
- children: [u._({ id: "UKwOYH" }), /*#__PURE__*/ q("span", {
347
- className: "ml-1 text-red-500",
348
- children: "*"
349
- })]
350
- }),
351
- /*#__PURE__*/ q("div", {
352
- className: "flex w-full items-center justify-center",
353
- children: /*#__PURE__*/ J("label", {
354
- htmlFor: "image-file",
355
- onDragOver: H,
356
- onDragLeave: ae,
357
- onDrop: oe,
358
- className: j("flex h-24 w-full cursor-pointer flex-col items-center justify-center rounded-lg border-2 border-dashed transition-all", k ? "border-blue-500 bg-blue-50" : "border-gray-300 bg-gray-50 hover:bg-gray-100"),
359
- children: [/*#__PURE__*/ J("div", {
360
- className: "flex flex-col items-center justify-center pt-3 pb-3",
361
- children: [
362
- /*#__PURE__*/ q("svg", {
363
- className: j("mb-1 h-6 w-6 transition-colors", k ? "text-blue-500" : "text-gray-500"),
364
- "aria-hidden": "true",
365
- xmlns: "http://www.w3.org/2000/svg",
366
- fill: "none",
367
- viewBox: "0 0 20 16",
368
- children: /*#__PURE__*/ q("path", {
369
- stroke: "currentColor",
370
- strokeLinecap: "round",
371
- strokeLinejoin: "round",
372
- strokeWidth: "2",
373
- d: "M13 13h3a3 3 0 0 0 0-6h-.025A5.56 5.56 0 0 0 16 5.5 5.5 5.5 0 0 0 5.207 5.021C5.137 5.017 5.071 5 5 5a4 4 0 0 0 0 8h2.167M10 15V6m0 0L8 8m2-2 2 2"
374
- })
375
- }),
376
- /*#__PURE__*/ q("p", {
377
- className: j("text-xs transition-colors", k ? "font-semibold text-blue-600" : "text-gray-500"),
378
- children: k ? /*#__PURE__*/ q("span", { children: u._({ id: "vXmL4D" }) }) : /*#__PURE__*/ J(K, { children: [
379
- /*#__PURE__*/ q("span", {
380
- className: "font-semibold",
381
- children: u._({ id: "gYe+hC" })
382
- }),
383
- " ",
384
- u._({ id: "Np28ib" })
385
- ] })
386
- }),
387
- /*#__PURE__*/ q("p", {
388
- className: "text-xs text-gray-400",
389
- children: u._({ id: "jBIkmi" })
390
- })
391
- ]
392
- }), /*#__PURE__*/ q("input", {
393
- id: "image-file",
394
- type: "file",
395
- className: "hidden",
396
- onChange: ie,
397
- accept: I,
398
- disabled: i
399
- })]
400
- })
401
- }),
402
- S && /*#__PURE__*/ J("div", {
403
- className: "mt-2 flex items-center justify-between rounded-lg border border-green-200 bg-green-50 p-2 text-xs",
372
+ onDragOver: W,
373
+ onDragLeave: ie,
374
+ onDrop: ae,
375
+ className: j("flex h-24 w-full cursor-pointer flex-col items-center justify-center rounded-lg border-2 border-dashed transition-all", A ? "border-blue-500 bg-blue-50" : "border-gray-300 bg-gray-50 hover:bg-gray-100"),
404
376
  children: [/*#__PURE__*/ J("div", {
405
- className: "flex items-center",
406
- children: [/*#__PURE__*/ q("svg", {
407
- className: "mr-2 h-4 w-4 text-green-600",
408
- fill: "currentColor",
409
- viewBox: "0 0 20 20",
410
- children: /*#__PURE__*/ q("path", {
411
- fillRule: "evenodd",
412
- d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",
413
- clipRule: "evenodd"
377
+ className: "flex flex-col items-center justify-center pt-3 pb-3",
378
+ children: [
379
+ /*#__PURE__*/ q("svg", {
380
+ className: j("mb-1 h-6 w-6 transition-colors", A ? "text-blue-500" : "text-gray-500"),
381
+ "aria-hidden": "true",
382
+ xmlns: "http://www.w3.org/2000/svg",
383
+ fill: "none",
384
+ viewBox: "0 0 20 16",
385
+ children: /*#__PURE__*/ q("path", {
386
+ stroke: "currentColor",
387
+ strokeLinecap: "round",
388
+ strokeLinejoin: "round",
389
+ strokeWidth: "2",
390
+ d: "M13 13h3a3 3 0 0 0 0-6h-.025A5.56 5.56 0 0 0 16 5.5 5.5 5.5 0 0 0 5.207 5.021C5.137 5.017 5.071 5 5 5a4 4 0 0 0 0 8h2.167M10 15V6m0 0L8 8m2-2 2 2"
391
+ })
392
+ }),
393
+ /*#__PURE__*/ q("p", {
394
+ className: j("text-xs transition-colors", A ? "font-semibold text-blue-600" : "text-gray-500"),
395
+ children: A ? /*#__PURE__*/ q("span", { children: f._({ id: "vXmL4D" }) }) : /*#__PURE__*/ J(K, { children: [
396
+ /*#__PURE__*/ q("span", {
397
+ className: "font-semibold",
398
+ children: f._({ id: "gYe+hC" })
399
+ }),
400
+ " ",
401
+ f._({ id: "Np28ib" })
402
+ ] })
403
+ }),
404
+ /*#__PURE__*/ q("p", {
405
+ className: "text-xs text-gray-400",
406
+ children: f._({ id: "jBIkmi" })
414
407
  })
415
- }), /*#__PURE__*/ q("span", {
416
- className: "text-gray-700",
417
- children: S.name
418
- })]
419
- }), /*#__PURE__*/ q("button", {
420
- type: "button",
421
- onClick: () => {
422
- w(null), D.file && O((e) => {
423
- let t = { ...e };
424
- return delete t.file, t;
425
- });
426
- },
427
- className: "font-medium text-red-600 hover:text-red-800",
428
- disabled: i,
429
- children: u._({ id: "t/YqKh" })
408
+ ]
409
+ }), /*#__PURE__*/ q("input", {
410
+ id: "image-file",
411
+ type: "file",
412
+ className: "hidden",
413
+ onChange: re,
414
+ accept: L,
415
+ disabled: i
430
416
  })]
431
- }),
432
- D.file && /*#__PURE__*/ q("p", {
433
- className: "text-theme-error mt-1 text-xs text-red-600",
434
- children: D.file
435
- })
436
- ]
437
- }) })
438
- }),
439
- /*#__PURE__*/ J(C, {
440
- className: "mb-6",
441
- children: [
442
- /*#__PURE__*/ q(g, {
443
- className: "mb-6",
444
- children: /*#__PURE__*/ q(b, {
445
- id: "name",
446
- name: "name",
447
- label: u._({ id: "ExLULX" }),
448
- value: p.name,
449
- onChange: te,
450
- onBlur: ne,
451
- required: !0,
452
- errortext: D.name,
453
- placeholder: u._({ id: "ZgyEqj" }),
454
- disabled: i
455
417
  })
456
418
  }),
457
- /*#__PURE__*/ q(g, {
458
- className: "mb-6",
459
- children: /*#__PURE__*/ J("div", {
460
- className: "w-full",
461
- children: [/*#__PURE__*/ J(a, {
462
- gap: "1",
463
- direction: "horizontal",
464
- alignment: "start",
465
- children: [/*#__PURE__*/ q("div", {
466
- className: "flex-1",
467
- children: /*#__PURE__*/ q(b, {
468
- id: "tags",
469
- name: "tags",
470
- label: u._({ id: "OYHzN1" }),
471
- value: y,
472
- onChange: se,
473
- onKeyDown: U,
474
- helptext: u._({ id: "PpMrSG" }),
475
- placeholder: u._({ id: "qzx7aY" }),
476
- disabled: i
477
- })
478
- }), /*#__PURE__*/ q(_, {
479
- variant: "primary",
480
- onClick: ce,
481
- disabled: i || y.trim() === "",
482
- children: /*#__PURE__*/ q(Q, { id: "m16xKo" })
483
- })]
484
- }), p.tags.length > 0 && /*#__PURE__*/ q(a, {
485
- gap: "1",
486
- wrap: !0,
487
- alignment: "center",
488
- className: "mt-1",
489
- children: p.tags.map((e) => /*#__PURE__*/ q(l, {
490
- closeable: !0,
491
- pillKey: "",
492
- pillValue: e,
493
- onClose: () => W(e)
494
- }, e))
419
+ w && /*#__PURE__*/ J("div", {
420
+ className: "mt-2 flex items-center justify-between rounded-lg border border-green-200 bg-green-50 p-2 text-xs",
421
+ children: [/*#__PURE__*/ J("div", {
422
+ className: "flex items-center",
423
+ children: [/*#__PURE__*/ q("svg", {
424
+ className: "mr-2 h-4 w-4 text-green-600",
425
+ fill: "currentColor",
426
+ viewBox: "0 0 20 20",
427
+ children: /*#__PURE__*/ q("path", {
428
+ fillRule: "evenodd",
429
+ d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",
430
+ clipRule: "evenodd"
431
+ })
432
+ }), /*#__PURE__*/ q("span", {
433
+ className: "text-gray-700",
434
+ children: w.name
495
435
  })]
496
- })
497
- }),
498
- /*#__PURE__*/ q(g, {
499
- className: "mb-6",
500
- children: /*#__PURE__*/ J(v, {
501
- id: "visibility",
502
- name: "visibility",
503
- label: u._({ id: "2q/Q7x" }),
504
- value: p.visibility,
505
- onChange: (e) => L("visibility", e),
436
+ }), /*#__PURE__*/ q("button", {
437
+ type: "button",
438
+ onClick: () => {
439
+ D(null), O.file && k((e) => {
440
+ let t = { ...e };
441
+ return delete t.file, t;
442
+ });
443
+ },
444
+ className: "font-medium text-red-600 hover:text-red-800",
506
445
  disabled: i,
507
- loading: i,
508
- children: [
509
- /*#__PURE__*/ q(o, {
510
- value: V.PUBLIC,
511
- label: u._({ id: "7d1a0d" })
512
- }),
513
- /*#__PURE__*/ q(o, {
514
- value: V.PRIVATE,
515
- label: u._({ id: "zwBp5t" })
516
- }),
517
- /*#__PURE__*/ q(o, {
518
- value: V.SHARED,
519
- label: u._({ id: "0Gd0NU" })
520
- }),
521
- /*#__PURE__*/ q(o, {
522
- value: V.COMMUNITY,
523
- label: u._({ id: "chL5IG" })
524
- })
525
- ]
526
- })
446
+ children: f._({ id: "t/YqKh" })
447
+ })]
527
448
  }),
528
- /*#__PURE__*/ q(g, {
529
- className: "mb-6",
530
- children: /*#__PURE__*/ J(a, {
449
+ O.file && /*#__PURE__*/ q("p", {
450
+ className: "text-theme-error mt-1 text-xs text-red-600",
451
+ children: O.file
452
+ })
453
+ ]
454
+ }) })
455
+ }),
456
+ /*#__PURE__*/ J(C, {
457
+ className: "mb-6",
458
+ children: [
459
+ /*#__PURE__*/ q(g, {
460
+ className: "mb-6",
461
+ children: /*#__PURE__*/ q(b, {
462
+ id: "name",
463
+ name: "name",
464
+ label: f._({ id: "ExLULX" }),
465
+ value: h.name,
466
+ onChange: R,
467
+ onBlur: te,
468
+ required: !0,
469
+ errortext: O.name,
470
+ disabled: i
471
+ })
472
+ }),
473
+ /*#__PURE__*/ q(g, {
474
+ className: "mb-6",
475
+ children: /*#__PURE__*/ J("div", {
476
+ className: "w-full",
477
+ children: [/*#__PURE__*/ J(a, {
478
+ gap: "1",
531
479
  direction: "horizontal",
532
- gap: "3",
533
- distribution: "evenly",
534
- className: "w-full",
480
+ alignment: "start",
535
481
  children: [/*#__PURE__*/ q("div", {
536
482
  className: "flex-1",
537
- children: /*#__PURE__*/ J(v, {
538
- id: "disk_format",
539
- name: "disk_format",
540
- label: u._({ id: "NopYGU" }),
541
- value: p.disk_format,
542
- onChange: (e) => L("disk_format", e),
543
- disabled: i,
544
- loading: i,
545
- required: !0,
546
- errortext: D.disk_format,
547
- children: [
548
- /*#__PURE__*/ q(o, {
549
- value: z.QCOW2,
550
- label: "QCOW2 - QEMU Emulator"
551
- }),
552
- /*#__PURE__*/ q(o, {
553
- value: z.RAW,
554
- label: "Raw"
555
- }),
556
- /*#__PURE__*/ q(o, {
557
- value: z.VMDK,
558
- label: "VMDK - Virtual Machine Disk"
559
- }),
560
- /*#__PURE__*/ q(o, {
561
- value: z.VHD,
562
- label: "VHD - Virtual Hard Disk"
563
- }),
564
- /*#__PURE__*/ q(o, {
565
- value: z.VHDX,
566
- label: "VHDX - Virtual Hard Disk Extended"
567
- }),
568
- /*#__PURE__*/ q(o, {
569
- value: z.VDI,
570
- label: "VDI - Virtual Disk Image"
571
- }),
572
- /*#__PURE__*/ q(o, {
573
- value: z.AMI,
574
- label: "AMI - Amazon Machine Image"
575
- }),
576
- /*#__PURE__*/ q(o, {
577
- value: z.ARI,
578
- label: "ARI - Amazon Ramdisk Image"
579
- }),
580
- /*#__PURE__*/ q(o, {
581
- value: z.AKI,
582
- label: "AKI - Amazon Kernel Image"
583
- }),
584
- /*#__PURE__*/ q(o, {
585
- value: z.ISO,
586
- label: "ISO - Optical Disk Image"
587
- }),
588
- /*#__PURE__*/ q(o, {
589
- value: z.PLOOP,
590
- label: "PLOOP - Virtuozzo/Parallels Loopback Disk"
591
- })
592
- ]
593
- })
594
- }), /*#__PURE__*/ q("div", {
595
- className: "flex-1",
596
- children: /*#__PURE__*/ q(v, {
597
- id: "container_format",
598
- name: "container_format",
599
- label: u._({ id: "6/xipy" }),
600
- value: p.container_format,
601
- onChange: (e) => L("container_format", e),
602
- disabled: i || !p.disk_format || !P.length,
603
- required: !0,
604
- errortext: D.container_format,
605
- helptext: !P.length && u._({ id: "A7CVME" }),
606
- children: P.map((e) => /*#__PURE__*/ q(o, {
607
- value: e,
608
- label: e.toUpperCase()
609
- }, e))
483
+ children: /*#__PURE__*/ q(b, {
484
+ id: "tags",
485
+ name: "tags",
486
+ label: f._({ id: "OYHzN1" }),
487
+ value: x,
488
+ onChange: oe,
489
+ onKeyDown: ce,
490
+ helptext: f._({ id: "PpMrSG" }),
491
+ disabled: i
610
492
  })
493
+ }), /*#__PURE__*/ q(_, {
494
+ onClick: se,
495
+ disabled: i || x.trim() === "",
496
+ children: /*#__PURE__*/ q(Q, { id: "m16xKo" })
611
497
  })]
612
- })
613
- }),
614
- /*#__PURE__*/ q(g, {
615
- className: "mb-0",
616
- children: /*#__PURE__*/ q(E, {
617
- id: "protected",
618
- name: "protected",
619
- label: u._({ id: "644xgx" }),
620
- checked: p.protected,
621
- onChange: te,
622
- helptext: u._({ id: "aV6KPH" }),
623
- disabled: i
624
- })
498
+ }), h.tags.length > 0 && /*#__PURE__*/ q(a, {
499
+ gap: "1",
500
+ wrap: !0,
501
+ alignment: "center",
502
+ className: "mt-1",
503
+ children: h.tags.map((e) => /*#__PURE__*/ q(l, {
504
+ closeable: !0,
505
+ pillKey: "",
506
+ pillValue: e,
507
+ onClose: () => le(e)
508
+ }, e))
509
+ })]
625
510
  })
626
- ]
627
- }),
628
- /*#__PURE__*/ q(C, {
629
- className: "mb-6",
630
- children: /*#__PURE__*/ q(g, {
631
- className: "mb-0",
511
+ }),
512
+ /*#__PURE__*/ q(g, {
513
+ className: "mb-6",
514
+ children: /*#__PURE__*/ J(v, {
515
+ id: "visibility",
516
+ name: "visibility",
517
+ label: f._({ id: "2q/Q7x" }),
518
+ value: h.visibility,
519
+ onChange: (e) => z("visibility", e),
520
+ disabled: i,
521
+ loading: i,
522
+ children: [
523
+ /*#__PURE__*/ q(o, {
524
+ value: B.PUBLIC,
525
+ label: f._({ id: "7d1a0d" })
526
+ }),
527
+ /*#__PURE__*/ q(o, {
528
+ value: B.PRIVATE,
529
+ label: f._({ id: "zwBp5t" })
530
+ }),
531
+ /*#__PURE__*/ q(o, {
532
+ value: B.SHARED,
533
+ label: f._({ id: "0Gd0NU" })
534
+ }),
535
+ /*#__PURE__*/ q(o, {
536
+ value: B.COMMUNITY,
537
+ label: f._({ id: "chL5IG" })
538
+ })
539
+ ]
540
+ })
541
+ }),
542
+ /*#__PURE__*/ q(g, {
543
+ className: "mb-6",
632
544
  children: /*#__PURE__*/ J(a, {
633
545
  direction: "horizontal",
634
546
  gap: "3",
@@ -636,55 +548,156 @@ var Je = {
636
548
  className: "w-full",
637
549
  children: [/*#__PURE__*/ q("div", {
638
550
  className: "flex-1",
639
- children: /*#__PURE__*/ q(b, {
640
- id: "min_disk",
641
- name: "min_disk",
642
- label: u._({ id: "NixRmA" }),
643
- type: "number",
644
- value: String(p.min_disk),
645
- onChange: (e) => re("min_disk", e.target.value),
646
- onBlur: () => R("min_disk", p.min_disk),
647
- helptext: u._({ id: "4fh0Wj" }),
648
- errortext: D.min_disk,
649
- disabled: i
551
+ children: /*#__PURE__*/ J(v, {
552
+ id: "disk_format",
553
+ name: "disk_format",
554
+ label: f._({ id: "NopYGU" }),
555
+ value: h.disk_format,
556
+ onChange: (e) => z("disk_format", e),
557
+ disabled: i,
558
+ loading: i,
559
+ required: !0,
560
+ errortext: O.disk_format,
561
+ children: [
562
+ /*#__PURE__*/ q(o, {
563
+ value: U.QCOW2,
564
+ label: "QCOW2 - QEMU Emulator"
565
+ }),
566
+ /*#__PURE__*/ q(o, {
567
+ value: U.RAW,
568
+ label: "Raw"
569
+ }),
570
+ /*#__PURE__*/ q(o, {
571
+ value: U.VMDK,
572
+ label: "VMDK - Virtual Machine Disk"
573
+ }),
574
+ /*#__PURE__*/ q(o, {
575
+ value: U.VHD,
576
+ label: "VHD - Virtual Hard Disk"
577
+ }),
578
+ /*#__PURE__*/ q(o, {
579
+ value: U.VHDX,
580
+ label: "VHDX - Virtual Hard Disk Extended"
581
+ }),
582
+ /*#__PURE__*/ q(o, {
583
+ value: U.VDI,
584
+ label: "VDI - Virtual Disk Image"
585
+ }),
586
+ /*#__PURE__*/ q(o, {
587
+ value: U.AMI,
588
+ label: "AMI - Amazon Machine Image"
589
+ }),
590
+ /*#__PURE__*/ q(o, {
591
+ value: U.ARI,
592
+ label: "ARI - Amazon Ramdisk Image"
593
+ }),
594
+ /*#__PURE__*/ q(o, {
595
+ value: U.AKI,
596
+ label: "AKI - Amazon Kernel Image"
597
+ }),
598
+ /*#__PURE__*/ q(o, {
599
+ value: U.ISO,
600
+ label: "ISO - Optical Disk Image"
601
+ }),
602
+ /*#__PURE__*/ q(o, {
603
+ value: U.PLOOP,
604
+ label: "PLOOP - Virtuozzo/Parallels Loopback Disk"
605
+ })
606
+ ]
650
607
  })
651
608
  }), /*#__PURE__*/ q("div", {
652
609
  className: "flex-1",
653
- children: /*#__PURE__*/ q(b, {
654
- id: "min_ram",
655
- name: "min_ram",
656
- label: u._({ id: "CgZxr7" }),
657
- type: "number",
658
- value: String(p.min_ram),
659
- onChange: (e) => re("min_ram", e.target.value),
660
- onBlur: () => R("min_ram", p.min_ram),
661
- helptext: u._({ id: "KsIM0b" }),
662
- errortext: D.min_ram,
663
- disabled: i
610
+ children: /*#__PURE__*/ q(v, {
611
+ id: "container_format",
612
+ name: "container_format",
613
+ label: f._({ id: "6/xipy" }),
614
+ value: h.container_format,
615
+ onChange: (e) => z("container_format", e),
616
+ disabled: i || !h.disk_format || !F.length,
617
+ required: !0,
618
+ errortext: O.container_format,
619
+ helptext: !F.length && f._({ id: "A7CVME" }),
620
+ children: F.map((e) => /*#__PURE__*/ q(o, {
621
+ value: e,
622
+ label: e.toUpperCase()
623
+ }, e))
664
624
  })
665
625
  })]
666
626
  })
627
+ }),
628
+ /*#__PURE__*/ q(g, {
629
+ className: "mb-0",
630
+ children: /*#__PURE__*/ q(E, {
631
+ id: "protected",
632
+ name: "protected",
633
+ label: f._({ id: "644xgx" }),
634
+ checked: h.protected,
635
+ onChange: R,
636
+ helptext: f._({ id: "aV6KPH" }),
637
+ disabled: i
638
+ })
639
+ })
640
+ ]
641
+ }),
642
+ /*#__PURE__*/ q(C, {
643
+ className: "mb-6",
644
+ children: /*#__PURE__*/ q(g, {
645
+ className: "mb-0",
646
+ children: /*#__PURE__*/ J(a, {
647
+ direction: "horizontal",
648
+ gap: "3",
649
+ distribution: "evenly",
650
+ className: "w-full",
651
+ children: [/*#__PURE__*/ q("div", {
652
+ className: "flex-1",
653
+ children: /*#__PURE__*/ q(b, {
654
+ id: "min_disk",
655
+ name: "min_disk",
656
+ label: f._({ id: "NixRmA" }),
657
+ type: "number",
658
+ value: String(h.min_disk),
659
+ onChange: (e) => ne("min_disk", e.target.value),
660
+ onBlur: () => V("min_disk", h.min_disk),
661
+ helptext: f._({ id: "4fh0Wj" }),
662
+ errortext: O.min_disk,
663
+ disabled: i
664
+ })
665
+ }), /*#__PURE__*/ q("div", {
666
+ className: "flex-1",
667
+ children: /*#__PURE__*/ q(b, {
668
+ id: "min_ram",
669
+ name: "min_ram",
670
+ label: f._({ id: "CgZxr7" }),
671
+ type: "number",
672
+ value: String(h.min_ram),
673
+ onChange: (e) => ne("min_ram", e.target.value),
674
+ onBlur: () => V("min_ram", h.min_ram),
675
+ helptext: f._({ id: "KsIM0b" }),
676
+ errortext: O.min_ram,
677
+ disabled: i
678
+ })
679
+ })]
667
680
  })
668
681
  })
669
- ]
670
- })
671
- ]
682
+ })
683
+ ]
684
+ })]
672
685
  });
673
- }, Xe = 20, Ze = 100, Qe = ({ deletableImages: e, protectedImages: t, isOpen: n, isLoading: r, onClose: i, onDelete: o }) => {
686
+ }, Qe = 20, $e = 100, et = ({ deletableImages: e, protectedImages: t, isOpen: n, isLoading: r, onClose: i, onDelete: o }) => {
674
687
  let { i18n: s, _: c } = $(), [l, u] = Z(null), { trackClose: f, markSubmitted: p, resetTracking: h } = P({
675
688
  isOpen: n,
676
689
  actionPrefix: "compute.images.delete"
677
- }), g = Re.object({ confirm: Re.string().refine((e) => e === "delete", { message: s._({ id: "QytzQr" }) }) }), _ = Be({
690
+ }), g = Be.object({ confirm: Be.string().refine((e) => e === "delete", { message: s._({ id: "QytzQr" }) }) }), _ = He({
678
691
  defaultValues: { confirm: "" },
679
692
  validators: { onSubmit: g },
680
693
  onSubmit: async () => {
681
694
  l === null && !r ? (p(), o(e.map((e) => e.id))) : S();
682
695
  }
683
- }), v = Ve(_.store, (e) => e.isSubmitting || e.values.confirm !== "delete"), y = e.length, x = t.length, S = () => {
696
+ }), v = Ue(_.store, (e) => e.isSubmitting || e.values.confirm !== "delete"), y = e.length, x = t.length, S = () => {
684
697
  f(), u(null), _.reset(), h(), i();
685
698
  };
686
699
  if (l !== null) {
687
- let e = l.errors.slice(0, Ze), t = l.errors.length - e.length;
700
+ let e = l.errors.slice(0, $e), t = l.errors.length - e.length;
688
701
  return /*#__PURE__*/ q(d, {
689
702
  open: n,
690
703
  onCancel: S,
@@ -737,7 +750,7 @@ var Je = {
737
750
  })
738
751
  });
739
752
  }
740
- let w = e.slice(0, Xe), T = e.length - w.length, E = t.slice(0, Xe), D = t.length - E.length, O = r ? s._({ id: "EF2EU9" }) : y === 1 ? s._({ id: "KWa0gi" }) : s._({ id: "JtHgVz" });
753
+ let w = e.slice(0, Qe), T = e.length - w.length, E = t.slice(0, Qe), D = t.length - E.length, O = r ? s._({ id: "EF2EU9" }) : y === 1 ? s._({ id: "KWa0gi" }) : s._({ id: "JtHgVz" });
741
754
  return /*#__PURE__*/ q(d, {
742
755
  open: n,
743
756
  onCancel: S,
@@ -845,7 +858,6 @@ var Je = {
845
858
  onChange: (t) => e.handleChange(t.target.value),
846
859
  invalid: e.state.meta.errors.length > 0,
847
860
  errortext: e.state.meta.errors.map((e) => typeof e == "string" ? e : e?.message).join(", ") || void 0,
848
- placeholder: "delete",
849
861
  autoFocus: !0,
850
862
  disabled: r,
851
863
  required: !0
@@ -855,7 +867,7 @@ var Je = {
855
867
  ]
856
868
  })
857
869
  });
858
- }, $e = ({ activeImages: e, deactivatedImages: t, isOpen: n, isLoading: r, onClose: i, onDeactivate: a }) => {
870
+ }, tt = ({ activeImages: e, deactivatedImages: t, isOpen: n, isLoading: r, onClose: i, onDeactivate: a }) => {
859
871
  let { i18n: o, _: s } = $(), c = e.length, l = t.length, u = (t) => {
860
872
  t.preventDefault(), a(e.map((e) => e.id));
861
873
  };
@@ -947,7 +959,7 @@ var Je = {
947
959
  ] })
948
960
  })
949
961
  });
950
- }, et = ({ deactivatedImages: e, activeImages: t, isOpen: n, isLoading: r, onClose: i, onActivate: a }) => {
962
+ }, nt = ({ deactivatedImages: e, activeImages: t, isOpen: n, isLoading: r, onClose: i, onActivate: a }) => {
951
963
  let { i18n: o, _: s } = $(), c = e.length, l = t.length;
952
964
  return /*#__PURE__*/ q(d, {
953
965
  onCancel: i,
@@ -1037,317 +1049,287 @@ var Je = {
1037
1049
  ] })
1038
1050
  })
1039
1051
  });
1040
- }, tt = ({ isOpen: e, onClose: t, image: n, permissions: { canCreateMember: i, canDeleteMember: a } }) => {
1041
- let { i18n: o, _: s } = $(), c = N(), [l, u] = Z(null), [f, p] = Z(!1), { data: m, isLoading: h } = k.compute.listImageMembers.useQuery({
1042
- project_id: c,
1043
- imageId: n?.id || ""
1044
- }, { enabled: e && !!n?.id }), g = () => {
1045
- u(null), p(!1), t();
1046
- };
1047
- if (!e || !n) return null;
1048
- let _ = n.name || n.id;
1049
- return /*#__PURE__*/ q(d, {
1050
- onCancel: g,
1051
- title: o._({
1052
- id: "UQ7Wyv",
1053
- values: { imageName: _ }
1054
- }),
1055
- open: e,
1056
- size: "xl",
1057
- children: /*#__PURE__*/ J("div", { children: [l && /*#__PURE__*/ q(r, {
1058
- onDismiss: () => u(null),
1059
- text: l.text,
1060
- variant: l.type,
1061
- className: "mb-4"
1062
- }), /*#__PURE__*/ q(I, {
1063
- projectId: c,
1064
- image: n,
1065
- imageMembers: m,
1066
- isMembersLoading: h,
1067
- canAdd: i,
1068
- canRemove: a,
1069
- isAddingMember: f,
1070
- setIsAddingMember: p,
1071
- setMessage: u
1072
- })] })
1073
- });
1074
1052
  };
1075
1053
  //#endregion
1076
1054
  //#region src/client/routes/_auth/projects/$projectId/compute/images/-components/ImageListView.tsx
1077
- function nt({ images: e, suggestedImages: t, acceptedImages: n, permissions: r, isFetching: i, currentPage: a = 1, totalPages: o = 1, onPageChange: l, children: d, selectedImages: f, setSelectedImages: p, deleteAllModalOpen: m, setDeleteAllModalOpen: h, deactivateAllModalOpen: g, setDeactivateAllModalOpen: _, activateAllModalOpen: v, setActivateAllModalOpen: y, createModalOpen: b, setCreateModalOpen: C, deletableImages: w, protectedImages: E, activeImages: O, deactivatedImages: j, onImageUpdated: M, onImageDeleted: ee, onMemberStatusChanged: P, hasAnyBulkAction: F }) {
1078
- let I = N(), [re, R] = Z(!1), [z, V] = Z(!1), [W, fe] = Z(!1), [Se, De] = Z(!1), [Oe, ke] = Z(!1), [Ae, je] = Z(!1), [Y, X] = Z(null), [Me, Ne] = Z(!1), [Pe, Fe] = Z(null), [Ie, Re] = Z(!1), { i18n: ze, _: Be } = $(), Ve = k.useUtils(), Ue = k.compute.deleteImage.useMutation(), We = k.compute.deactivateImage.useMutation({ onSuccess: () => {
1079
- Ve.compute.getImageById.invalidate();
1080
- } }), Ge = k.compute.reactivateImage.useMutation({ onSuccess: () => {
1081
- Ve.compute.getImageById.invalidate();
1082
- } }), Ke = k.compute.deleteImages.useMutation({ onSuccess: () => {
1083
- p([]);
1084
- } }), qe = k.compute.activateImages.useMutation({ onSuccess: () => {
1085
- p([]);
1086
- } }), Je = k.compute.deactivateImages.useMutation({ onSuccess: () => {
1087
- p([]);
1088
- } }), Xe = k.compute.updateImage.useMutation({ onSuccess: (e) => {
1089
- Ve.compute.getImageById.setData({
1090
- project_id: I,
1055
+ function rt({ images: e, permissions: t, isFetching: n, currentPage: r = 1, totalPages: i = 1, onPageChange: a, children: o, selectedImages: l, setSelectedImages: d, deleteAllModalOpen: f, setDeleteAllModalOpen: p, deactivateAllModalOpen: m, setDeactivateAllModalOpen: h, activateAllModalOpen: g, setActivateAllModalOpen: _, createModalOpen: v, setCreateModalOpen: y, deletableImages: b, protectedImages: C, activeImages: w, deactivatedImages: E, onImageUpdated: O, onImageDeleted: j, onMemberStatusChanged: M, hasAnyBulkAction: N, pendingSharedIds: P, acceptedSharedIds: F }) {
1056
+ let B = ee(), [ne, H] = Z(!1), [U, W] = Z(!1), [oe, fe] = Z(!1), [ke, Ae] = Z(!1), [je, Me] = Z(!1), [Ne, Pe] = Z(!1), [Y, X] = Z(null), [Ie, Le] = Z(!1), [Re, Be] = Z(null), [Ve, He] = Z(!1), Ue = Fe(null), Ge = Fe(!1), { i18n: Ke, _: qe } = $(), Je = k.useUtils(), Ye = k.compute.deleteImage.useMutation(), Xe = k.compute.deactivateImage.useMutation({ onSuccess: () => {
1057
+ Je.compute.getImageById.invalidate();
1058
+ } }), Qe = k.compute.reactivateImage.useMutation({ onSuccess: () => {
1059
+ Je.compute.getImageById.invalidate();
1060
+ } }), $e = k.compute.deleteImages.useMutation({ onSuccess: () => {
1061
+ d([]);
1062
+ } }), rt = k.compute.activateImages.useMutation({ onSuccess: () => {
1063
+ d([]);
1064
+ } }), it = k.compute.deactivateImages.useMutation({ onSuccess: () => {
1065
+ d([]);
1066
+ } }), at = k.compute.updateImage.useMutation({ onSuccess: (e) => {
1067
+ Je.compute.getImageById.setData({
1068
+ project_id: B,
1091
1069
  imageId: e.id
1092
1070
  }, e);
1093
- } }), Ze = k.compute.createImage.useMutation(), nt = k.compute.updateImageVisibility.useMutation(), { data: rt } = k.compute.watchUploadProgress.useSubscription({
1094
- project_id: I,
1095
- uploadId: Pe || ""
1096
- }, { enabled: !!Pe && Ie }), it = Ue.isPending || We.isPending || Ge.isPending || Ke.isPending || qe.isPending || Je.isPending || Xe.isPending, at = async (e, t, n) => {
1071
+ } }), ot = k.compute.createImage.useMutation(), st = k.compute.updateImageVisibility.useMutation(), { data: ct } = k.compute.watchUploadProgress.useSubscription({
1072
+ project_id: B,
1073
+ uploadId: Re || ""
1074
+ }, { enabled: !!Re && Ve }), lt = Ye.isPending || Xe.isPending || Qe.isPending || $e.isPending || rt.isPending || it.isPending || at.isPending, ut = async (e, t, n) => {
1097
1075
  try {
1098
- M(await nt.mutateAsync({
1099
- project_id: I,
1076
+ O(await st.mutateAsync({
1077
+ project_id: B,
1100
1078
  imageId: e,
1101
1079
  visibility: t
1102
1080
  }));
1103
- let { message: r, ...i } = we(n, t);
1081
+ let { message: r, ...i } = he(n, t);
1104
1082
  S.success(r, i);
1105
1083
  } catch (e) {
1106
- let r = e?.message || ze._({
1084
+ let r = e?.message || Ke._({
1107
1085
  id: "J9cmxx",
1108
1086
  values: { newVisibility: t }
1109
- }), { message: i, ...a } = te(n, r);
1087
+ }), { message: i, ...a } = I(n, r);
1110
1088
  S.error(i, a);
1111
1089
  }
1112
- }, ot = (e, t) => {
1113
- let n = [];
1114
- return Object.entries(e).forEach(([e, r]) => {
1115
- let i = `/${e}`;
1116
- r == null ? e in t && n.push({
1117
- op: "remove",
1118
- path: i
1119
- }) : e in t ? n.push({
1120
- op: "replace",
1121
- path: i,
1122
- value: r
1123
- }) : n.push({
1124
- op: "add",
1125
- path: i,
1126
- value: r
1127
- });
1128
- }), n;
1129
- }, st = async (e) => {
1090
+ }, dt = async (e) => {
1130
1091
  if (!Y) return !1;
1131
1092
  let t = Y.id, n = e.name || Y.name || t;
1132
1093
  try {
1133
- let r = ot(e, Y), i = await Xe.mutateAsync({
1134
- project_id: I,
1094
+ let r = Ce(e, Y), i = await at.mutateAsync({
1095
+ project_id: B,
1135
1096
  imageId: t,
1136
1097
  operations: r
1137
1098
  });
1138
- R(!1);
1139
- let { message: a, ...o } = H(n);
1140
- return S.success(a, o), X(i), M(i), !0;
1099
+ H(!1);
1100
+ let { message: a, ...o } = re(n);
1101
+ return S.success(a, o), X(i), O(i), !0;
1141
1102
  } catch (e) {
1142
- let t = e?.message ?? "", { message: r, ...i } = Te(n, t);
1103
+ let t = e?.message ?? "", { message: r, ...i } = R(n, t);
1143
1104
  return S.error(r, i), X(null), !1;
1144
1105
  }
1145
- }, ct = async (e, t) => {
1146
- let n = e.name || "Unnamed";
1106
+ }, ft = async (e, t) => {
1107
+ let n = e.name || "Unnamed", r = null;
1147
1108
  try {
1148
- Ne(!0);
1149
- let r = await Ze.mutateAsync({
1150
- project_id: I,
1109
+ Le(!0);
1110
+ let i = await ot.mutateAsync({
1111
+ project_id: B,
1151
1112
  ...e
1152
1113
  });
1153
- Fe(r.id), Re(!0), await A.compute.uploadImage.mutate(t, { context: { headers: {
1154
- "x-project-id": I,
1155
- "x-upload-id": r.id,
1156
- "x-upload-size": String(t.size)
1157
- } } });
1158
- let { message: i, ...a } = G(n);
1159
- S.success(i, a), M(r), P();
1114
+ r = i.id;
1115
+ let a = new AbortController();
1116
+ Ue.current = a, Ge.current = !1, Be(i.id), He(!0), await A.compute.uploadImage.mutate(t, {
1117
+ signal: a.signal,
1118
+ context: { headers: {
1119
+ "x-project-id": B,
1120
+ "x-upload-id": i.id,
1121
+ "x-upload-size": String(t.size)
1122
+ } }
1123
+ });
1124
+ let { message: o, ...s } = De(n);
1125
+ S.success(o, s), O(i), M();
1160
1126
  } catch (e) {
1161
- if (e instanceof Le && e.data?.path === "compute.createImage") {
1162
- let { message: t, ...r } = he(n, e.message);
1127
+ if (Ge.current) {
1128
+ if (r) try {
1129
+ await Ye.mutateAsync({
1130
+ project_id: B,
1131
+ imageId: r
1132
+ }), j(r);
1133
+ } catch (e) {
1134
+ let t = e?.message ?? "", { message: n, ...i } = Ee(r, t);
1135
+ S.error(n, i);
1136
+ }
1137
+ return;
1138
+ }
1139
+ if (e instanceof ze && e.data?.path === "compute.createImage") {
1140
+ let { message: t, ...r } = ce(n, e.message);
1163
1141
  S.error(t, r);
1164
1142
  } else {
1165
- let n = e?.message ?? "", { message: r, ...i } = ce(t.name, n);
1143
+ let n = e?.message ?? "", { message: r, ...i } = te(t.name, n);
1166
1144
  S.error(r, i);
1167
1145
  }
1168
1146
  } finally {
1169
- Ne(!1), C(!1), Re(!1), Fe(null);
1147
+ Ue.current = null, Ge.current = !1, Le(!1), y(!1), He(!1), Be(null);
1170
1148
  }
1171
- }, lt = async (e) => {
1172
- R(!1), V(!1);
1149
+ }, pt = () => {
1150
+ Ge.current = !0, Ue.current?.abort();
1151
+ let { message: e, ...t } = ge();
1152
+ S.info(e, t);
1153
+ }, mt = async (e) => {
1154
+ H(!1), W(!1);
1173
1155
  let t = e.name || e.id, n = e.id;
1174
1156
  try {
1175
- await Ue.mutateAsync({
1176
- project_id: I,
1157
+ await Ye.mutateAsync({
1158
+ project_id: B,
1177
1159
  imageId: n
1178
1160
  });
1179
- let { message: e, ...r } = Ee(t);
1180
- S.success(e, r), ee(n);
1161
+ let { message: e, ...r } = ae(t);
1162
+ S.success(e, r), j(n);
1181
1163
  } catch (e) {
1182
- let t = e?.message ?? "", { message: r, ...i } = Ce(n, t);
1164
+ let t = e?.message ?? "", { message: r, ...i } = Ee(n, t);
1183
1165
  S.error(r, i);
1184
1166
  }
1185
1167
  X(null);
1186
- }, ut = async (e) => {
1187
- e.status === B.DEACTIVATED ? (X(e), ke(!0)) : (X(e), De(!0));
1188
- }, dt = async (e) => {
1168
+ }, ht = async (e) => {
1169
+ e.status === z.DEACTIVATED ? (X(e), Me(!0)) : (X(e), Ae(!0));
1170
+ }, gt = async (e) => {
1189
1171
  let t = e.name || e.id, n = e.id;
1190
1172
  try {
1191
- await Ge.mutateAsync({
1192
- project_id: I,
1173
+ await Qe.mutateAsync({
1174
+ project_id: B,
1193
1175
  imageId: n
1194
- }), M({
1176
+ }), O({
1195
1177
  ...e,
1196
- status: B.ACTIVE
1197
- }), ke(!1), X(null);
1198
- let { message: r, ...i } = le(t);
1178
+ status: z.ACTIVE
1179
+ }), Me(!1), X(null);
1180
+ let { message: r, ...i } = Te(t);
1199
1181
  S.success(r, i);
1200
1182
  } catch (e) {
1201
- let t = e?.message ?? "", { message: r, ...i } = ve(n, t);
1183
+ let t = e?.message ?? "", { message: r, ...i } = Oe(n, t);
1202
1184
  S.error(r, i);
1203
1185
  }
1204
- }, ft = async (e) => {
1186
+ }, _t = async (e) => {
1205
1187
  let t = e.name || e.id, n = e.id;
1206
1188
  try {
1207
- await We.mutateAsync({
1208
- project_id: I,
1189
+ await Xe.mutateAsync({
1190
+ project_id: B,
1209
1191
  imageId: n
1210
- }), M({
1192
+ }), O({
1211
1193
  ...e,
1212
- status: B.DEACTIVATED
1213
- }), De(!1), X(null);
1214
- let { message: r, ...i } = ue(t);
1194
+ status: z.DEACTIVATED
1195
+ }), Ae(!1), X(null);
1196
+ let { message: r, ...i } = ie(t);
1215
1197
  S.success(r, i);
1216
1198
  } catch (e) {
1217
- let t = e?.message ?? "", { message: r, ...i } = oe(n, t);
1199
+ let t = e?.message ?? "", { message: r, ...i } = L(n, t);
1218
1200
  S.error(r, i);
1219
1201
  }
1220
- }, pt = (e) => {
1221
- X(e), R(!0);
1222
- }, mt = (e) => {
1223
- X(e), V(!0);
1224
- }, ht = (e) => {
1202
+ }, vt = (e) => {
1203
+ X(e), H(!0);
1204
+ }, yt = (e) => {
1205
+ X(e), W(!0);
1206
+ }, bt = (e) => {
1225
1207
  X(e), fe(!0);
1226
- }, gt = (e) => {
1227
- X(e), je(!0);
1228
- }, _t = () => {
1229
- X(null), R(!1);
1230
- }, vt = () => {
1231
- X(null), V(!1);
1232
- }, yt = () => {
1233
- X(null), fe(!1);
1234
- }, bt = () => {
1235
- X(null), De(!1);
1236
- }, xt = () => {
1237
- X(null), ke(!1);
1208
+ }, xt = (e) => {
1209
+ X(e), Pe(!0);
1238
1210
  }, St = () => {
1239
- X(null), je(!1);
1240
- }, Ct = async (e) => {
1241
- h(!1);
1211
+ X(null), H(!1);
1212
+ }, Ct = () => {
1213
+ X(null), W(!1), Je.compute.listImagesWithPagination.invalidate();
1214
+ }, wt = () => {
1215
+ X(null), fe(!1);
1216
+ }, Tt = () => {
1217
+ X(null), Ae(!1);
1218
+ }, Et = () => {
1219
+ X(null), Me(!1);
1220
+ }, Dt = () => {
1221
+ X(null), Pe(!1);
1222
+ }, Ot = async (e) => {
1223
+ p(!1);
1242
1224
  try {
1243
- let t = await Ke.mutateAsync({
1244
- project_id: I,
1225
+ let t = await $e.mutateAsync({
1226
+ project_id: B,
1245
1227
  imageIds: e
1246
1228
  }), n = t.successful.length, r = t.failed.length, i = e.length;
1247
1229
  if (r === 0) {
1248
- let { message: e, ...t } = me(n, i);
1230
+ let { message: e, ...t } = pe(n, i);
1249
1231
  S.success(e, t);
1250
1232
  } else if (n === 0) {
1251
1233
  let { message: e, ...t } = be(r, i);
1252
1234
  S.error(e, t);
1253
1235
  } else {
1254
- let { message: e, ...t } = U(n, r);
1236
+ let { message: e, ...t } = ve(n, r);
1255
1237
  S.warning(e, t);
1256
1238
  }
1257
- t.successful.length > 0 && ee(t.successful);
1239
+ t.successful.length > 0 && j(t.successful);
1258
1240
  } catch (t) {
1259
1241
  let n = t?.message ?? "";
1260
1242
  console.log("Bulk delete error: ", n);
1261
1243
  let { message: r, ...i } = be(e.length, e.length);
1262
1244
  S.error(r, i);
1263
1245
  }
1264
- }, wt = async (t) => {
1265
- y(!1);
1246
+ }, kt = async (t) => {
1247
+ _(!1);
1266
1248
  try {
1267
- let n = await qe.mutateAsync({
1268
- project_id: I,
1249
+ let n = await rt.mutateAsync({
1250
+ project_id: B,
1269
1251
  imageIds: t
1270
1252
  }), r = n.successful.length, i = n.failed.length, a = t.length;
1271
1253
  if (n.successful.forEach((t) => {
1272
1254
  let n = e.find((e) => e.id === t);
1273
- n && M({
1255
+ n && O({
1274
1256
  ...n,
1275
- status: B.ACTIVE
1257
+ status: z.ACTIVE
1276
1258
  });
1277
1259
  }), i === 0) {
1278
- let { message: e, ...t } = ye(r, a);
1260
+ let { message: e, ...t } = _e(r, a);
1279
1261
  S.success(e, t);
1280
1262
  } else if (r === 0) {
1281
- let { message: e, ...t } = xe(i, a);
1263
+ let { message: e, ...t } = Se(i, a);
1282
1264
  S.error(e, t);
1283
1265
  } else {
1284
- let { message: e, ...t } = ge(r, i);
1266
+ let { message: e, ...t } = le(r, i);
1285
1267
  S.warning(e, t);
1286
1268
  }
1287
1269
  } catch (e) {
1288
1270
  let n = e?.message ?? "";
1289
1271
  console.log("Bulk activate error: ", n);
1290
- let { message: r, ...i } = xe(t.length, t.length);
1272
+ let { message: r, ...i } = Se(t.length, t.length);
1291
1273
  S.error(r, i);
1292
1274
  }
1293
- }, Tt = async (t) => {
1294
- _(!1);
1275
+ }, At = async (t) => {
1276
+ h(!1);
1295
1277
  try {
1296
- let n = await Je.mutateAsync({
1297
- project_id: I,
1278
+ let n = await it.mutateAsync({
1279
+ project_id: B,
1298
1280
  imageIds: t
1299
1281
  }), r = n.successful.length, i = n.failed.length, a = t.length;
1300
1282
  if (n.successful.forEach((t) => {
1301
1283
  let n = e.find((e) => e.id === t);
1302
- n && M({
1284
+ n && O({
1303
1285
  ...n,
1304
- status: B.DEACTIVATED
1286
+ status: z.DEACTIVATED
1305
1287
  });
1306
1288
  }), i === 0) {
1307
- let { message: e, ...t } = _e(r, a);
1289
+ let { message: e, ...t } = de(r, a);
1308
1290
  S.success(e, t);
1309
1291
  } else if (r === 0) {
1310
- let { message: e, ...t } = de(i, a);
1292
+ let { message: e, ...t } = we(i, a);
1311
1293
  S.error(e, t);
1312
1294
  } else {
1313
- let { message: e, ...t } = se(r, i);
1295
+ let { message: e, ...t } = ue(r, i);
1314
1296
  S.warning(e, t);
1315
1297
  }
1316
1298
  } catch (e) {
1317
1299
  let n = e?.message ?? "";
1318
1300
  console.log("Bulk deactivate error: ", n);
1319
- let { message: r, ...i } = de(t.length, t.length);
1301
+ let { message: r, ...i } = we(t.length, t.length);
1320
1302
  S.error(r, i);
1321
1303
  }
1322
- }, Et = (e) => {
1323
- e >= 1 && e <= o && l?.(e);
1304
+ }, jt = (e) => {
1305
+ e >= 1 && e <= i && a?.(e);
1324
1306
  };
1325
- return it ? /*#__PURE__*/ q("div", {
1307
+ return lt ? /*#__PURE__*/ q("div", {
1326
1308
  "data-testid": "loading",
1327
1309
  children: /*#__PURE__*/ q(c, { children: /*#__PURE__*/ q(D, {
1328
1310
  colSpan: 3,
1329
1311
  children: /*#__PURE__*/ q(T, {
1330
1312
  status: "progress",
1331
- title: ze._({ id: "Z3FXyt" })
1313
+ title: Ke._({ id: "Z3FXyt" })
1332
1314
  })
1333
1315
  }) })
1334
- }) : /*#__PURE__*/ J(K, { children: [/*#__PURE__*/ q(K, { children: d }), /*#__PURE__*/ J("div", {
1316
+ }) : /*#__PURE__*/ J(K, { children: [/*#__PURE__*/ q(K, { children: o }), /*#__PURE__*/ J("div", {
1335
1317
  className: "relative",
1336
1318
  children: [
1337
- i && /*#__PURE__*/ q("div", {
1319
+ n && /*#__PURE__*/ q("div", {
1338
1320
  className: "bg-theme-background-lvl-0/50 absolute inset-0 z-10 flex items-center justify-center backdrop-blur-sm",
1339
1321
  children: /*#__PURE__*/ q(T, {
1340
1322
  status: "progress",
1341
- title: ze._({ id: "HBpi4q" })
1323
+ title: Ke._({ id: "HBpi4q" })
1342
1324
  })
1343
1325
  }),
1344
1326
  /*#__PURE__*/ J(K, { children: [/*#__PURE__*/ J(x, {
1345
- columns: F ? 9 : 8,
1346
- minContentColumns: F ? [0, 8] : [7],
1327
+ columns: N ? 9 : 8,
1328
+ minContentColumns: N ? [0, 8] : [7],
1347
1329
  className: "images",
1348
1330
  "data-testid": "images-table",
1349
1331
  children: [/*#__PURE__*/ J(c, { children: [
1350
- F && /*#__PURE__*/ q(s, {}),
1332
+ N && /*#__PURE__*/ q(s, {}),
1351
1333
  /*#__PURE__*/ q(s, { children: /*#__PURE__*/ q(Q, { id: "uAQUqI" }) }),
1352
1334
  /*#__PURE__*/ q(s, { children: /*#__PURE__*/ q(Q, { id: "ExLULX" }) }),
1353
1335
  /*#__PURE__*/ q(s, { children: /*#__PURE__*/ q(Q, { id: "2q/Q7x" }) }),
@@ -1356,44 +1338,44 @@ function nt({ images: e, suggestedImages: t, acceptedImages: n, permissions: r,
1356
1338
  /*#__PURE__*/ q(s, { children: /*#__PURE__*/ q(Q, { id: "NopYGU" }) }),
1357
1339
  /*#__PURE__*/ q(s, { children: /*#__PURE__*/ q(Q, { id: "d+F6q9" }) }),
1358
1340
  /*#__PURE__*/ q(s, {})
1359
- ] }), e.length > 0 ? e.map((e) => /*#__PURE__*/ q(He, {
1341
+ ] }), e.length > 0 ? e.map((e) => /*#__PURE__*/ q(We, {
1360
1342
  image: e,
1361
- isSelected: f.includes(e.id),
1362
- isPending: !!t.find(({ id: t }) => t === e.id),
1363
- isAccepted: !!n.find(({ id: t }) => t === e.id),
1364
- permissions: r,
1365
- onEditDetails: pt,
1366
- onEditMetadata: mt,
1367
- onDelete: ht,
1368
- onManageAccess: gt,
1369
- showSelectColumn: F,
1343
+ isSelected: l.includes(e.id),
1344
+ isPending: P.has(e.id),
1345
+ isAccepted: F.has(e.id),
1346
+ permissions: t,
1347
+ onEditDetails: vt,
1348
+ onEditMetadata: yt,
1349
+ onDelete: bt,
1350
+ onManageAccess: xt,
1351
+ showSelectColumn: N,
1370
1352
  onSelect: (e) => {
1371
- if (f.includes(e.id)) return p(f.filter((t) => t !== e.id));
1372
- p([...f, e.id]);
1353
+ if (l.includes(e.id)) return d(l.filter((t) => t !== e.id));
1354
+ d([...l, e.id]);
1373
1355
  },
1374
- onActivationStatusChange: ut,
1375
- onUpdateVisibility: at,
1376
- uploadId: Pe,
1377
- uploadProgressPercent: rt?.percent,
1378
- onMemberStatusChanged: P
1356
+ onActivationStatusChange: ht,
1357
+ onUpdateVisibility: ut,
1358
+ uploadId: Re,
1359
+ uploadProgressPercent: ct?.percent,
1360
+ onMemberStatusChanged: M
1379
1361
  }, e.id)) : /*#__PURE__*/ q(c, { children: /*#__PURE__*/ q(D, {
1380
- colSpan: F ? 9 : 8,
1362
+ colSpan: N ? 9 : 8,
1381
1363
  children: /*#__PURE__*/ q(T, {
1382
1364
  status: "empty",
1383
- title: ze._({ id: "eYlnXt" }),
1384
- body: ze._({ id: "qvF2D8" })
1365
+ title: Ke._({ id: "eYlnXt" }),
1366
+ body: Ke._({ id: "qvF2D8" })
1385
1367
  })
1386
1368
  }) })]
1387
- }), o > 1 && /*#__PURE__*/ q("div", {
1369
+ }), i > 1 && /*#__PURE__*/ q("div", {
1388
1370
  className: "flex justify-center py-4",
1389
1371
  children: /*#__PURE__*/ q(u, {
1390
1372
  variant: "input",
1391
- currentPage: a,
1392
- pages: o,
1393
- onPressPrevious: () => Et(Math.max(a - 1, 1)),
1394
- onPressNext: () => Et(Math.min(a + 1, o)),
1373
+ currentPage: r,
1374
+ pages: i,
1375
+ onPressPrevious: () => jt(Math.max(r - 1, 1)),
1376
+ onPressNext: () => jt(Math.min(r + 1, i)),
1395
1377
  onSelectChange: (e) => {
1396
- Et(e);
1378
+ jt(e);
1397
1379
  },
1398
1380
  onInputChange: () => {},
1399
1381
  onKeyDown: (e) => {
@@ -1401,94 +1383,95 @@ function nt({ images: e, suggestedImages: t, acceptedImages: n, permissions: r,
1401
1383
  let t = e.target.value;
1402
1384
  if (t !== "") {
1403
1385
  let e = parseInt(t, 10);
1404
- !isNaN(e) && e >= 1 && e <= o && Et(e);
1386
+ !isNaN(e) && e >= 1 && e <= i && jt(e);
1405
1387
  }
1406
1388
  }
1407
1389
  }
1408
1390
  })
1409
1391
  })] }),
1410
1392
  Y && /*#__PURE__*/ J(K, { children: [
1411
- /*#__PURE__*/ q(pe, {
1412
- isOpen: re,
1413
- onClose: _t,
1393
+ /*#__PURE__*/ q(V, {
1394
+ isOpen: ne,
1395
+ onClose: St,
1414
1396
  image: Y,
1415
- onSave: st,
1416
- isLoading: Xe.isPending
1397
+ onSave: dt,
1398
+ isLoading: at.isPending
1417
1399
  }),
1418
- /*#__PURE__*/ q(ie, {
1419
- isOpen: z,
1420
- onClose: vt,
1400
+ /*#__PURE__*/ q(ye, {
1401
+ client: A,
1402
+ isOpen: U,
1403
+ onClose: Ct,
1421
1404
  image: Y,
1422
- onSave: st,
1423
- isLoading: Xe.isPending
1424
- }),
1425
- /*#__PURE__*/ q(ne, {
1405
+ projectId: B
1406
+ }, "edit-metadata-modal"),
1407
+ /*#__PURE__*/ q(se, {
1426
1408
  image: Y,
1427
- isOpen: W,
1428
- isLoading: it,
1429
- isDisabled: Y.protected || !r.canDelete,
1430
- onClose: yt,
1431
- onDelete: lt
1409
+ isOpen: oe,
1410
+ isLoading: lt,
1411
+ isDisabled: Y.protected || !t.canDelete,
1412
+ onClose: wt,
1413
+ onDelete: mt
1432
1414
  }),
1433
- /*#__PURE__*/ q(ae, {
1415
+ /*#__PURE__*/ q(xe, {
1434
1416
  image: Y,
1435
- isOpen: Se,
1436
- isLoading: We.isPending,
1437
- onClose: bt,
1438
- onDeactivate: ft
1417
+ isOpen: ke,
1418
+ isLoading: Xe.isPending,
1419
+ onClose: Tt,
1420
+ onDeactivate: _t
1439
1421
  }),
1440
- /*#__PURE__*/ q(L, {
1422
+ /*#__PURE__*/ q(me, {
1441
1423
  image: Y,
1442
- isOpen: Oe,
1443
- isLoading: Ge.isPending,
1444
- onClose: xt,
1445
- onActivate: dt
1424
+ isOpen: je,
1425
+ isLoading: Qe.isPending,
1426
+ onClose: Et,
1427
+ onActivate: gt
1446
1428
  }),
1447
- /*#__PURE__*/ q(tt, {
1429
+ /*#__PURE__*/ q(G, {
1448
1430
  image: Y,
1449
- isOpen: Ae,
1450
- onClose: St,
1451
- permissions: r
1431
+ isOpen: Ne,
1432
+ onClose: Dt,
1433
+ permissions: t
1452
1434
  })
1453
1435
  ] }),
1454
- /*#__PURE__*/ q(Qe, {
1436
+ /*#__PURE__*/ q(et, {
1437
+ isOpen: f,
1438
+ deletableImages: b,
1439
+ protectedImages: C,
1440
+ isLoading: lt,
1441
+ onClose: () => p(!1),
1442
+ onDelete: Ot
1443
+ }),
1444
+ /*#__PURE__*/ q(tt, {
1455
1445
  isOpen: m,
1456
- deletableImages: w,
1457
- protectedImages: E,
1458
- isLoading: it,
1446
+ activeImages: w,
1447
+ deactivatedImages: E,
1448
+ isLoading: lt,
1459
1449
  onClose: () => h(!1),
1460
- onDelete: Ct
1450
+ onDeactivate: At
1461
1451
  }),
1462
- /*#__PURE__*/ q($e, {
1452
+ /*#__PURE__*/ q(nt, {
1463
1453
  isOpen: g,
1464
- activeImages: O,
1465
- deactivatedImages: j,
1466
- isLoading: it,
1454
+ deactivatedImages: E,
1455
+ activeImages: w,
1456
+ isLoading: lt,
1467
1457
  onClose: () => _(!1),
1468
- onDeactivate: Tt
1458
+ onActivate: kt
1469
1459
  }),
1470
- /*#__PURE__*/ q(et, {
1460
+ /*#__PURE__*/ q(Ze, {
1471
1461
  isOpen: v,
1472
- deactivatedImages: j,
1473
- activeImages: O,
1474
- isLoading: it,
1475
1462
  onClose: () => y(!1),
1476
- onActivate: wt
1477
- }),
1478
- /*#__PURE__*/ q(Ye, {
1479
- isOpen: b,
1480
- onClose: () => C(!1),
1481
- onCreate: ct,
1482
- isLoading: Ze.isPending || Ie || Me,
1483
- isUploadPending: Ie && !!Pe,
1484
- uploadProgressPercent: rt?.percent
1463
+ onCreate: ft,
1464
+ isLoading: ot.isPending || Ve || Ie,
1465
+ isUploadPending: Ve && !!Re,
1466
+ uploadProgressPercent: ct?.percent,
1467
+ onCancelUpload: pt
1485
1468
  })
1486
1469
  ]
1487
1470
  })] });
1488
1471
  }
1489
1472
  //#endregion
1490
1473
  //#region src/client/routes/_auth/projects/$projectId/compute/images/urlHelpers.ts
1491
- var rt = (e) => {
1474
+ var it = (e) => {
1492
1475
  let t = [];
1493
1476
  return e.status && (e.status.startsWith("in:") ? e.status.replace("in:", "").split(",") : [e.status]).forEach((e) => {
1494
1477
  t.push({
@@ -1512,14 +1495,14 @@ var rt = (e) => {
1512
1495
  name: "protected",
1513
1496
  value: e.protected
1514
1497
  }), t;
1515
- }, it = (e, t) => {
1498
+ }, at = (e, t) => {
1516
1499
  let n = {};
1517
1500
  if (!e?.length) return n;
1518
1501
  let r = e.filter((e) => !e.inactive).reduce((e, t) => (e[t.name] || (e[t.name] = []), e[t.name].push(t.value), e), {});
1519
1502
  return Object.entries(r).forEach(([e, r]) => {
1520
1503
  t.find((t) => t.filterName === e)?.supportsMultiValue && r.length > 1 ? n[e] = `in:${r.join(",")}` : n[e] = r[0];
1521
1504
  }), n;
1522
- }, at = (e, t, n) => e.some((e) => e.name === t.name && e.value === t.value) ? e : n.find((e) => e.filterName === t.name)?.supportsMultiValue ? [...e, t] : [...e.filter((e) => e.name !== t.name), t], ot = (e, t, n) => {
1505
+ }, ot = (e, t, n) => e.some((e) => e.name === t.name && e.value === t.value) ? e : n.find((e) => e.filterName === t.name)?.supportsMultiValue ? [...e, t] : [...e.filter((e) => e.name !== t.name), t], st = (e, t, n) => {
1523
1506
  let r = {
1524
1507
  search: n.search,
1525
1508
  sortBy: n.sortBy,
@@ -1531,13 +1514,13 @@ var rt = (e) => {
1531
1514
  return Object.entries(i).forEach(([e, n]) => {
1532
1515
  t.find((t) => t.filterName === e)?.supportsMultiValue && n.length > 1 ? r[e] = `in:${n.join(",")}` : r[e] = n[0];
1533
1516
  }), r;
1534
- }, st = {
1517
+ }, ct = {
1535
1518
  images: [],
1536
1519
  first: void 0,
1537
1520
  next: void 0,
1538
1521
  schema: "/v2/schemas/images",
1539
1522
  listError: void 0
1540
- }, ct = (e, t, n, r, i, a, o) => a.member_status && a.member_status !== "all" ? e.compute.listSharedImagesByMemberStatus.query({
1523
+ }, lt = (e, t, n, r, i, a, o) => a.member_status && a.member_status !== "all" ? e.compute.listSharedImagesByMemberStatus.query({
1541
1524
  project_id: t,
1542
1525
  memberStatus: a.member_status,
1543
1526
  name: i || void 0,
@@ -1547,11 +1530,11 @@ var rt = (e) => {
1547
1530
  protected: a.protected,
1548
1531
  sort: `${n}:${r}`
1549
1532
  }).then((e) => ({
1550
- ...st,
1533
+ ...ct,
1551
1534
  images: e
1552
1535
  })).catch((e) => {
1553
- if (e instanceof Le && e.data?.code === "FORBIDDEN") return {
1554
- ...st,
1536
+ if (e instanceof ze && e.data?.code === "FORBIDDEN") return {
1537
+ ...ct,
1555
1538
  listError: e.message
1556
1539
  };
1557
1540
  throw e;
@@ -1566,12 +1549,12 @@ var rt = (e) => {
1566
1549
  ...e,
1567
1550
  listError: void 0
1568
1551
  })).catch((e) => {
1569
- if (e instanceof Le && e.data?.code === "FORBIDDEN") return {
1570
- ...st,
1552
+ if (e instanceof ze && e.data?.code === "FORBIDDEN") return {
1553
+ ...ct,
1571
1554
  listError: e.message
1572
1555
  };
1573
1556
  throw e;
1574
- }), lt = (e, t) => e.compute.canUser.query({
1557
+ }), ut = (e, t) => e.compute.canUser.query({
1575
1558
  project_id: t,
1576
1559
  permission: [
1577
1560
  "images:create",
@@ -1591,41 +1574,47 @@ var rt = (e) => {
1591
1574
  }));
1592
1575
  //#endregion
1593
1576
  //#region src/client/routes/_auth/projects/$projectId/compute/images/-components/List.tsx
1594
- function ut(e) {
1577
+ function dt(e) {
1595
1578
  if (e) return e.includes("?") ? new URL(e, "http://dummy.com").searchParams.get("marker") || void 0 : e;
1596
1579
  }
1597
- function dt({ imagesPromise: n, imageOverrides: r, deletedImageIds: o, permissionsPromise: s, searchTerm: c, setSearchTerm: l, sortSettings: u, handleSortChange: d, filterSettings: m, handleFilterChange: g, selectedImages: v, setSelectedImages: b, createModalOpen: x, setCreateModalOpen: S, deleteAllModalOpen: C, setDeleteAllModalOpen: w, deactivateAllModalOpen: T, setDeactivateAllModalOpen: D, activateAllModalOpen: k, setActivateAllModalOpen: A, memberStatusView: j, setMemberStatusView: M, isFetching: N, currentPage: P, onPageChange: F, onImageUpdated: I, onImageDeleted: te, onMemberStatusChanged: ne }) {
1598
- let { i18n: L, _: re } = $(), R = je(n), z = je(s), [ie, V] = Z(c), H = Ne(void 0);
1599
- if (X(() => () => clearTimeout(H.current), []), R.listError) return /*#__PURE__*/ q("p", { children: R.listError });
1600
- let ae = R.images.filter((e) => !o.has(e.id)).map((e) => r.get(e.id) ?? e), oe = !!R.next, se = R.totalCount ?? (oe ? 50 * (P + 1) : ae.length), ce = Math.max(1, Math.ceil(se / 50)), U = Math.min(P, ce);
1601
- X(() => {
1602
- P !== U && F(U);
1580
+ function ft({ imagesPromise: n, imageOverrides: r, deletedImageIds: o, permissionsPromise: s, searchTerm: c, setSearchTerm: l, sortSettings: u, handleSortChange: d, filterSettings: m, handleFilterChange: g, selectedImages: v, setSelectedImages: b, createModalOpen: x, setCreateModalOpen: S, deleteAllModalOpen: C, setDeleteAllModalOpen: T, deactivateAllModalOpen: D, setDeactivateAllModalOpen: A, activateAllModalOpen: j, setActivateAllModalOpen: M, memberStatusView: P, setMemberStatusView: F, isFetching: I, currentPage: L, onPageChange: R, onImageUpdated: te, onImageDeleted: B, onMemberStatusChanged: ne }) {
1581
+ let { i18n: V, _: H } = $(), re = ee(), U = Ne(n), W = Ne(s), [ie, ae] = Z(c), oe = Fe(void 0), se = k.compute.listSharedImagesByMemberStatus.useQuery({
1582
+ project_id: re,
1583
+ memberStatus: "pending"
1584
+ }, { retry: !1 }), ce = k.compute.listSharedImagesByMemberStatus.useQuery({
1585
+ project_id: re,
1586
+ memberStatus: "accepted"
1587
+ }, { retry: !1 }), le = new Set((se.data ?? []).map((e) => e.id)), ue = new Set((ce.data ?? []).map((e) => e.id));
1588
+ if (Y(() => () => clearTimeout(oe.current), []), U.listError) return /*#__PURE__*/ q("p", { children: U.listError });
1589
+ let de = U.images.filter((e) => !o.has(e.id)).map((e) => r.get(e.id) ?? e), fe = !!U.next, pe = U.totalCount ?? (fe ? 50 * (L + 1) : de.length), me = Math.max(1, Math.ceil(pe / 50)), he = Math.min(L, me);
1590
+ Y(() => {
1591
+ L !== he && R(he);
1603
1592
  }, [
1604
- P,
1605
- U,
1606
- F
1593
+ L,
1594
+ he,
1595
+ R
1607
1596
  ]);
1608
- let W = j === "pending" || j === "accepted" ? {
1597
+ let ge = P === "pending" || P === "accepted" ? {
1609
1598
  ...m,
1610
1599
  filters: m.filters.filter((e) => e.filterName !== "visibility"),
1611
1600
  selectedFilters: (m.selectedFilters || []).filter((e) => e.name !== "visibility")
1612
- } : m, le = R.totalCount === void 0 ? ae.slice((U - 1) * 50, U * 50) : ae, ue = new Set(le.map((e) => e.id)), G = v.filter((e) => ue.has(e)), de = le, fe = new Map(le.map((e) => [e.id, e])), pe = G.map((e) => fe.get(e)).filter(Boolean), me = pe.filter((e) => e.protected !== !0), he = pe.filter((e) => e.protected === !0), ge = pe.filter((e) => e.status === B.ACTIVE), _e = pe.filter((e) => e.status === B.DEACTIVATED), ve = !z.canDelete || G.length === 0 || le.filter((e) => G.includes(e.id)).every((e) => e.protected), ye = !z.canUpdate || G.length === 0 || le.filter((e) => G.includes(e.id)).every((e) => e.status === B.DEACTIVATED), be = !z.canUpdate || G.length === 0 || le.filter((e) => G.includes(e.id)).every((e) => e.status === B.ACTIVE), xe = {
1601
+ } : m, _e = U.totalCount === void 0 ? de.slice((he - 1) * 50, he * 50) : de, ve = new Set(_e.map((e) => e.id)), G = v.filter((e) => ve.has(e)), ye = _e, be = new Map(_e.map((e) => [e.id, e])), xe = G.map((e) => be.get(e)).filter(Boolean).filter((e) => e.owner === re), Se = xe.filter((e) => e.protected !== !0), Ce = xe.filter((e) => e.protected === !0), we = xe.filter((e) => e.status === z.ACTIVE), Te = xe.filter((e) => e.status === z.DEACTIVATED), Ee = !W.canDelete || G.length === 0 || _e.filter((e) => G.includes(e.id)).every((e) => e.protected), De = !W.canUpdate || G.length === 0 || _e.filter((e) => G.includes(e.id)).every((e) => e.status === z.DEACTIVATED), Oe = !W.canUpdate || G.length === 0 || _e.filter((e) => G.includes(e.id)).every((e) => e.status === z.ACTIVE), je = {
1613
1602
  items: [
1614
1603
  {
1615
- label: L._({ id: "SFo0kK" }),
1604
+ label: V._({ id: "SFo0kK" }),
1616
1605
  value: "all"
1617
1606
  },
1618
1607
  {
1619
- label: L._({ id: "thHAVL" }),
1608
+ label: V._({ id: "thHAVL" }),
1620
1609
  value: "accepted"
1621
1610
  },
1622
1611
  {
1623
- label: L._({ id: "E4QYe7" }),
1612
+ label: V._({ id: "E4QYe7" }),
1624
1613
  value: "pending"
1625
1614
  }
1626
1615
  ],
1627
- activeItem: j,
1628
- onActiveItemChange: (e) => M(e)
1616
+ activeItem: P,
1617
+ onActiveItemChange: (e) => F(e)
1629
1618
  };
1630
1619
  return /*#__PURE__*/ J(K, { children: [
1631
1620
  /*#__PURE__*/ J(a, {
@@ -1634,16 +1623,16 @@ function dt({ imagesPromise: n, imageOverrides: r, deletedImageIds: o, permissio
1634
1623
  gap: "2",
1635
1624
  className: "pb-2",
1636
1625
  children: [/*#__PURE__*/ q(i, {
1637
- activeItem: j,
1638
- onActiveItemChange: xe.onActiveItemChange,
1639
- children: xe.items.map((e) => /*#__PURE__*/ q(f, {
1626
+ activeItem: P,
1627
+ onActiveItemChange: je.onActiveItemChange,
1628
+ children: je.items.map((e) => /*#__PURE__*/ q(f, {
1640
1629
  label: e.label,
1641
1630
  value: e.value
1642
1631
  }, e.value))
1643
1632
  }), /*#__PURE__*/ J(a, {
1644
1633
  gap: "2",
1645
1634
  alignment: "center",
1646
- children: [/*#__PURE__*/ q(ee, {
1635
+ children: [/*#__PURE__*/ q(N, {
1647
1636
  options: u.options,
1648
1637
  sortBy: u.sortBy,
1649
1638
  sortDirection: u.sortDirection ?? "desc",
@@ -1657,7 +1646,7 @@ function dt({ imagesPromise: n, imageOverrides: r, deletedImageIds: o, permissio
1657
1646
  ...u,
1658
1647
  sortDirection: e
1659
1648
  })
1660
- }), z.canCreate && /*#__PURE__*/ q(_, {
1649
+ }), W.canCreate && /*#__PURE__*/ q(_, {
1661
1650
  onClick: () => S(!0),
1662
1651
  variant: "primary",
1663
1652
  children: /*#__PURE__*/ q(Q, { id: "a/nTb8" })
@@ -1670,34 +1659,33 @@ function dt({ imagesPromise: n, imageOverrides: r, deletedImageIds: o, permissio
1670
1659
  children: [/*#__PURE__*/ J(a, {
1671
1660
  distribution: "between",
1672
1661
  alignment: "center",
1673
- children: [/*#__PURE__*/ q(Oe, {
1674
- filters: W.filters,
1662
+ children: [/*#__PURE__*/ q(Ae, {
1663
+ filters: ge.filters,
1675
1664
  selectClassName: "sm:min-w-40",
1676
1665
  comboboxClassName: "sm:min-w-40",
1677
1666
  onChange: (e) => {
1678
- let t = at(W.selectedFilters || [], e, W.filters);
1679
- t !== (W.selectedFilters || []) && g({
1667
+ let t = ot(ge.selectedFilters || [], e, ge.filters);
1668
+ t !== (ge.selectedFilters || []) && g({
1680
1669
  ...m,
1681
1670
  selectedFilters: t
1682
1671
  });
1683
1672
  }
1684
1673
  }), /*#__PURE__*/ q(e, {
1685
- placeholder: L._({ id: "0cl0a5" }),
1686
1674
  "data-testid": "searchbar",
1687
1675
  value: ie,
1688
1676
  onInput: (e) => {
1689
1677
  let t = e.currentTarget.value;
1690
- V(t), clearTimeout(H.current), H.current = window.setTimeout(() => l(t), 500);
1678
+ ae(t), clearTimeout(oe.current), oe.current = window.setTimeout(() => l(t), 500);
1691
1679
  },
1692
1680
  onSearch: (e) => {
1693
- clearTimeout(H.current), l(typeof e == "string" ? e : "");
1681
+ clearTimeout(oe.current), l(typeof e == "string" ? e : "");
1694
1682
  },
1695
1683
  onClear: () => {
1696
- clearTimeout(H.current), V(""), l("");
1684
+ clearTimeout(oe.current), ae(""), l("");
1697
1685
  }
1698
1686
  })]
1699
- }), W.selectedFilters && W.selectedFilters.length > 0 && /*#__PURE__*/ q(De, {
1700
- selectedFilters: W.selectedFilters,
1687
+ }), ge.selectedFilters && ge.selectedFilters.length > 0 && /*#__PURE__*/ q(ke, {
1688
+ selectedFilters: ge.selectedFilters,
1701
1689
  onDelete: (e) => g({
1702
1690
  ...m,
1703
1691
  selectedFilters: (m.selectedFilters || []).filter((t) => t.name !== e.name || t.value !== e.value)
@@ -1708,17 +1696,17 @@ function dt({ imagesPromise: n, imageOverrides: r, deletedImageIds: o, permissio
1708
1696
  })
1709
1697
  })]
1710
1698
  }) }),
1711
- (z.canDelete || z.canUpdate) && /*#__PURE__*/ q(y, { children: /*#__PURE__*/ q(a, {
1699
+ (W.canDelete || W.canUpdate) && /*#__PURE__*/ q(y, { children: /*#__PURE__*/ q(a, {
1712
1700
  distribution: "between",
1713
1701
  alignment: "center",
1714
1702
  children: /*#__PURE__*/ J(a, {
1715
1703
  gap: "2",
1716
1704
  alignment: "center",
1717
1705
  children: [/*#__PURE__*/ q(E, {
1718
- checked: G.length > 0 && de.every((e) => G.includes(e.id)),
1719
- indeterminate: G.length > 0 && !de.every((e) => G.includes(e.id)),
1706
+ checked: G.length > 0 && ye.every((e) => G.includes(e.id)),
1707
+ indeterminate: G.length > 0 && !ye.every((e) => G.includes(e.id)),
1720
1708
  onChange: () => {
1721
- let e = de.map((e) => e.id);
1709
+ let e = ye.map((e) => e.id);
1722
1710
  e.every((e) => G.includes(e)) ? b(G.filter((t) => !e.includes(t))) : b([.../* @__PURE__ */ new Set([...G, ...e])]);
1723
1711
  }
1724
1712
  }), /*#__PURE__*/ J(t, { children: [/*#__PURE__*/ q(p, {
@@ -1726,59 +1714,59 @@ function dt({ imagesPromise: n, imageOverrides: r, deletedImageIds: o, permissio
1726
1714
  children: /*#__PURE__*/ q(_, {
1727
1715
  size: "small",
1728
1716
  icon: "moreVert",
1729
- label: L._({ id: "7L01XJ" })
1717
+ label: V._({ id: "7L01XJ" })
1730
1718
  })
1731
1719
  }), /*#__PURE__*/ J(h, { children: [
1732
- z.canDelete && /*#__PURE__*/ q(O, {
1733
- disabled: ve,
1734
- label: L._({ id: "c6b6fz" }),
1735
- onClick: () => w(!0)
1720
+ W.canUpdate && /*#__PURE__*/ q(O, {
1721
+ disabled: Oe,
1722
+ label: V._({ id: "d/I0J3" }),
1723
+ onClick: () => M(!0)
1736
1724
  }),
1737
- z.canUpdate && /*#__PURE__*/ q(O, {
1738
- disabled: ye,
1739
- label: L._({ id: "UmQ3/m" }),
1740
- onClick: () => D(!0)
1741
- }),
1742
- z.canUpdate && /*#__PURE__*/ q(O, {
1743
- disabled: be,
1744
- label: L._({ id: "d/I0J3" }),
1725
+ W.canUpdate && /*#__PURE__*/ q(O, {
1726
+ disabled: De,
1727
+ label: V._({ id: "UmQ3/m" }),
1745
1728
  onClick: () => A(!0)
1746
- })
1729
+ }),
1730
+ W.canDelete && /*#__PURE__*/ J(K, { children: [/*#__PURE__*/ q(w, {}), /*#__PURE__*/ q(O, {
1731
+ disabled: Ee,
1732
+ label: V._({ id: "c6b6fz" }),
1733
+ onClick: () => T(!0)
1734
+ })] })
1747
1735
  ] })] })]
1748
1736
  })
1749
1737
  }) }),
1750
- /*#__PURE__*/ q(nt, {
1751
- images: de,
1752
- suggestedImages: j === "pending" ? de : [],
1753
- acceptedImages: j === "accepted" ? de : [],
1754
- permissions: z,
1755
- isFetching: N,
1756
- currentPage: U,
1757
- totalPages: ce,
1758
- onPageChange: F,
1738
+ /*#__PURE__*/ q(rt, {
1739
+ images: ye,
1740
+ permissions: W,
1741
+ isFetching: I,
1742
+ currentPage: he,
1743
+ totalPages: me,
1744
+ onPageChange: R,
1759
1745
  selectedImages: v,
1760
1746
  setSelectedImages: b,
1761
1747
  deleteAllModalOpen: C,
1762
- setDeleteAllModalOpen: w,
1763
- deactivateAllModalOpen: T,
1764
- setDeactivateAllModalOpen: D,
1765
- activateAllModalOpen: k,
1766
- setActivateAllModalOpen: A,
1748
+ setDeleteAllModalOpen: T,
1749
+ deactivateAllModalOpen: D,
1750
+ setDeactivateAllModalOpen: A,
1751
+ activateAllModalOpen: j,
1752
+ setActivateAllModalOpen: M,
1767
1753
  createModalOpen: x,
1768
1754
  setCreateModalOpen: S,
1769
- deletableImages: me,
1770
- protectedImages: he,
1771
- activeImages: ge,
1772
- deactivatedImages: _e,
1773
- onImageUpdated: I,
1774
- onImageDeleted: te,
1755
+ deletableImages: Se,
1756
+ protectedImages: Ce,
1757
+ activeImages: we,
1758
+ deactivatedImages: Te,
1759
+ onImageUpdated: te,
1760
+ onImageDeleted: B,
1775
1761
  onMemberStatusChanged: ne,
1776
- hasAnyBulkAction: z.canDelete || z.canUpdate
1762
+ hasAnyBulkAction: W.canDelete || W.canUpdate,
1763
+ pendingSharedIds: le,
1764
+ acceptedSharedIds: ue
1777
1765
  })
1778
1766
  ] });
1779
1767
  }
1780
- var ft = ({ client: e, project: t }) => {
1781
- let { i18n: n, _: r } = $(), i = Pe(), a = Ie({ strict: !1 }), [o, s] = Z({
1768
+ var pt = ({ client: e, project: t }) => {
1769
+ let { i18n: n, _: r } = $(), i = Ie(), a = Re({ strict: !1 }), [o, s] = Z({
1782
1770
  options: [
1783
1771
  {
1784
1772
  label: n._({ id: "88kg0+" }),
@@ -1804,25 +1792,25 @@ var ft = ({ client: e, project: t }) => {
1804
1792
  {
1805
1793
  displayName: n._({ id: "uAQUqI" }),
1806
1794
  filterName: "status",
1807
- values: Object.values(B),
1795
+ values: Object.values(z),
1808
1796
  supportsMultiValue: !0
1809
1797
  },
1810
1798
  {
1811
1799
  displayName: n._({ id: "2q/Q7x" }),
1812
1800
  filterName: "visibility",
1813
- values: Object.values(V),
1801
+ values: Object.values(B),
1814
1802
  supportsMultiValue: !1
1815
1803
  },
1816
1804
  {
1817
1805
  displayName: n._({ id: "NopYGU" }),
1818
1806
  filterName: "disk_format",
1819
- values: Object.values(z),
1807
+ values: Object.values(U),
1820
1808
  supportsMultiValue: !0
1821
1809
  },
1822
1810
  {
1823
1811
  displayName: n._({ id: "6/xipy" }),
1824
1812
  filterName: "container_format",
1825
- values: Object.values(fe),
1813
+ values: Object.values(H),
1826
1814
  supportsMultiValue: !0
1827
1815
  },
1828
1816
  {
@@ -1832,29 +1820,29 @@ var ft = ({ client: e, project: t }) => {
1832
1820
  supportsMultiValue: !1
1833
1821
  }
1834
1822
  ],
1835
- selectedFilters: rt(a)
1836
- }), [u, d] = Z(a.search || ""), f = a.page ?? 1, [p, m] = Z([]), [h, g] = Z(!1), [_, v] = Z(!1), [y, b] = Z(!1), [x, S] = Z(!1), C = a.memberStatus ?? "all", [w, E] = Z(!0), [D, O] = Z(/* @__PURE__ */ new Map()), [k, A] = Z(/* @__PURE__ */ new Set()), [j, M] = Z(/* @__PURE__ */ new Map([[1, void 0]])), [N, ee] = Z(() => new Promise(() => {})), [P] = Z(() => lt(e, t)), F = Y((e) => {
1823
+ selectedFilters: it(a)
1824
+ }), [u, d] = Z(a.search || ""), f = a.page ?? 1, [p, m] = Z([]), [h, g] = Z(!1), [_, v] = Z(!1), [y, b] = Z(!1), [x, S] = Z(!1), C = a.memberStatus ?? "all", [w, E] = Z(!0), [D, O] = Z(/* @__PURE__ */ new Map()), [k, A] = Z(/* @__PURE__ */ new Set()), [j, M] = Z(/* @__PURE__ */ new Map([[1, void 0]])), [ee, N] = Z(() => new Promise(() => {})), [P] = Z(() => ut(e, t)), F = Pe((e, t) => e === "pending" || e === "accepted" ? (t || []).filter((e) => e.name !== "visibility") : t || [], []), I = Pe((e) => {
1837
1825
  O((t) => new Map(t).set(e.id, e));
1838
- }, []), I = Y((e) => {
1826
+ }, []), L = Pe((e) => {
1839
1827
  A((t) => {
1840
1828
  let n = new Set(t);
1841
1829
  return Array.isArray(e) ? e.forEach((e) => n.add(e)) : n.add(e), n;
1842
1830
  });
1843
- }, []), te = Y(() => {
1831
+ }, []), R = Pe(() => {
1844
1832
  O(/* @__PURE__ */ new Map()), E(!0);
1845
1833
  let n = a.memberStatus ?? "all", r = n === "all" ? void 0 : n;
1846
- Ae(() => {
1847
- let i = n === "pending" || n === "accepted" ? (c.selectedFilters || []).filter((e) => e.name !== "visibility") : c.selectedFilters || [], a = j.get(f), s = ct(e, t, o.sortBy, o.sortDirection, u, {
1848
- ...it(i, c.filters),
1834
+ Me(() => {
1835
+ let i = F(n, c.selectedFilters), a = j.get(f), s = lt(e, t, o.sortBy, o.sortDirection, u, {
1836
+ ...at(i, c.filters),
1849
1837
  member_status: r
1850
1838
  }, a);
1851
1839
  s.then((e) => {
1852
1840
  M((t) => {
1853
1841
  if (!e.next) return t;
1854
1842
  let n = f + 1;
1855
- return t.has(n) ? t : new Map(t).set(n, ut(e.next));
1843
+ return t.has(n) ? t : new Map(t).set(n, dt(e.next));
1856
1844
  });
1857
- }).catch(() => {}).finally(() => E(!1)), ee(s);
1845
+ }).catch(() => {}).finally(() => E(!1)), N(s);
1858
1846
  });
1859
1847
  }, [
1860
1848
  e,
@@ -1865,8 +1853,8 @@ var ft = ({ client: e, project: t }) => {
1865
1853
  f,
1866
1854
  j
1867
1855
  ]);
1868
- X(() => {
1869
- let n = rt(a), r = a.sortBy || "created_at", o = a.sortDirection || "desc", u = a.search || "", f = a.page ?? 1;
1856
+ Y(() => {
1857
+ let n = it(a), r = a.sortBy || "created_at", o = a.sortDirection || "desc", u = a.search || "", f = a.page ?? 1;
1870
1858
  l((e) => ({
1871
1859
  ...e,
1872
1860
  selectedFilters: n
@@ -1876,8 +1864,8 @@ var ft = ({ client: e, project: t }) => {
1876
1864
  sortDirection: o
1877
1865
  })), d(u), m([]), O(/* @__PURE__ */ new Map()), E(!0);
1878
1866
  let p = a.memberStatus ?? "all", h = p === "all" ? void 0 : p;
1879
- Ae(() => {
1880
- let a = p === "pending" || p === "accepted" ? (n || []).filter((e) => e.name !== "visibility") : n || [], s = j.get(f);
1867
+ Me(() => {
1868
+ let a = F(p, n), s = j.get(f);
1881
1869
  if (!s && f > 1) {
1882
1870
  i({ search: (e) => ({
1883
1871
  ...e,
@@ -1885,17 +1873,17 @@ var ft = ({ client: e, project: t }) => {
1885
1873
  }) }), E(!1);
1886
1874
  return;
1887
1875
  }
1888
- let l = ct(e, t, r, o, u, {
1889
- ...it(a, c.filters),
1876
+ let l = lt(e, t, r, o, u, {
1877
+ ...at(a, c.filters),
1890
1878
  member_status: h
1891
1879
  }, s);
1892
1880
  l.then((e) => {
1893
1881
  M((t) => {
1894
1882
  if (!e.next) return t;
1895
1883
  let n = f + 1;
1896
- return t.has(n) ? t : new Map(t).set(n, ut(e.next));
1884
+ return t.has(n) ? t : new Map(t).set(n, dt(e.next));
1897
1885
  });
1898
- }).catch(() => {}).finally(() => E(!1)), ee(l);
1886
+ }).catch(() => {}).finally(() => E(!1)), N(l);
1899
1887
  });
1900
1888
  }, [
1901
1889
  a.status,
@@ -1909,7 +1897,7 @@ var ft = ({ client: e, project: t }) => {
1909
1897
  a.memberStatus,
1910
1898
  a.page
1911
1899
  ]);
1912
- let ne = (e) => {
1900
+ let te = (e) => {
1913
1901
  let t = {
1914
1902
  options: e.options,
1915
1903
  sortBy: e.sortBy?.toString() || "created_at",
@@ -1924,9 +1912,9 @@ var ft = ({ client: e, project: t }) => {
1924
1912
  }),
1925
1913
  replace: !0
1926
1914
  });
1927
- }, L = (e) => {
1915
+ }, ne = (e) => {
1928
1916
  l(e), M(/* @__PURE__ */ new Map([[1, void 0]])), i({
1929
- search: (t) => ot(e.selectedFilters || [], e.filters, {
1917
+ search: (t) => st(e.selectedFilters || [], e.filters, {
1930
1918
  search: t.search,
1931
1919
  sortBy: t.sortBy,
1932
1920
  sortDirection: t.sortDirection,
@@ -1934,7 +1922,7 @@ var ft = ({ client: e, project: t }) => {
1934
1922
  }),
1935
1923
  replace: !0
1936
1924
  });
1937
- }, re = (e) => {
1925
+ }, V = (e) => {
1938
1926
  let t = typeof e == "string" ? e : "";
1939
1927
  d(t), M(/* @__PURE__ */ new Map([[1, void 0]])), i({
1940
1928
  search: (e) => ({
@@ -1944,14 +1932,14 @@ var ft = ({ client: e, project: t }) => {
1944
1932
  }),
1945
1933
  replace: !0
1946
1934
  });
1947
- }, R = (e) => {
1935
+ }, re = (e) => {
1948
1936
  M(/* @__PURE__ */ new Map([[1, void 0]])), i({ search: (t) => ({
1949
1937
  sortBy: t.sortBy,
1950
1938
  sortDirection: t.sortDirection,
1951
1939
  search: t.search,
1952
1940
  memberStatus: e === "all" ? void 0 : e
1953
1941
  }) });
1954
- }, ie = Y((e) => {
1942
+ }, W = Pe((e) => {
1955
1943
  i({ search: (t) => ({
1956
1944
  ...t,
1957
1945
  page: e === 1 ? void 0 : e
@@ -1959,28 +1947,28 @@ var ft = ({ client: e, project: t }) => {
1959
1947
  }, [i]);
1960
1948
  return /*#__PURE__*/ q("div", {
1961
1949
  className: "relative",
1962
- children: /*#__PURE__*/ q(ze, {
1950
+ children: /*#__PURE__*/ q(Ve, {
1963
1951
  fallbackRender: ({ error: e }) => /*#__PURE__*/ q(T, {
1964
1952
  status: "error",
1965
1953
  title: n._({ id: "v2JOoQ" }),
1966
1954
  body: e instanceof Error ? e.message : n._({ id: "6YfMI7" })
1967
1955
  }),
1968
- children: /*#__PURE__*/ q(ke, {
1956
+ children: /*#__PURE__*/ q(je, {
1969
1957
  fallback: /*#__PURE__*/ q(T, {
1970
1958
  status: "progress",
1971
1959
  title: n._({ id: "HBpi4q" })
1972
1960
  }),
1973
- children: /*#__PURE__*/ q(dt, {
1974
- imagesPromise: N,
1961
+ children: /*#__PURE__*/ q(ft, {
1962
+ imagesPromise: ee,
1975
1963
  imageOverrides: D,
1976
1964
  deletedImageIds: k,
1977
1965
  permissionsPromise: P,
1978
1966
  searchTerm: u,
1979
- setSearchTerm: re,
1967
+ setSearchTerm: V,
1980
1968
  sortSettings: o,
1981
- handleSortChange: ne,
1969
+ handleSortChange: te,
1982
1970
  filterSettings: c,
1983
- handleFilterChange: L,
1971
+ handleFilterChange: ne,
1984
1972
  selectedImages: p,
1985
1973
  setSelectedImages: m,
1986
1974
  createModalOpen: h,
@@ -1992,13 +1980,13 @@ var ft = ({ client: e, project: t }) => {
1992
1980
  activateAllModalOpen: x,
1993
1981
  setActivateAllModalOpen: S,
1994
1982
  memberStatusView: C,
1995
- setMemberStatusView: R,
1983
+ setMemberStatusView: re,
1996
1984
  isFetching: w,
1997
1985
  currentPage: f,
1998
- onPageChange: ie,
1999
- onImageUpdated: F,
2000
- onImageDeleted: I,
2001
- onMemberStatusChanged: te
1986
+ onPageChange: W,
1987
+ onImageUpdated: I,
1988
+ onImageDeleted: L,
1989
+ onMemberStatusChanged: R
2002
1990
  })
2003
1991
  })
2004
1992
  })
@@ -2006,18 +1994,18 @@ var ft = ({ client: e, project: t }) => {
2006
1994
  };
2007
1995
  //#endregion
2008
1996
  //#region src/client/routes/_auth/projects/$projectId/compute/images/index.tsx?tsr-split=component
2009
- function pt() {
1997
+ function mt() {
2010
1998
  let { i18n: e, _: t } = $(), { projectId: n } = M.useParams(), { trpcClient: r } = M.useRouteContext();
2011
1999
  if (!r) throw Error("trpcClient is not available in route context");
2012
2000
  return /*#__PURE__*/ J(K, { children: [/*#__PURE__*/ q(F, {
2013
2001
  title: e._({ id: "an5hVd" }),
2014
2002
  projectId: n
2015
- }), /*#__PURE__*/ q(ft, {
2003
+ }), /*#__PURE__*/ q(pt, {
2016
2004
  client: r,
2017
2005
  project: n
2018
2006
  })] });
2019
2007
  }
2020
2008
  //#endregion
2021
- export { pt as component };
2009
+ export { mt as component };
2022
2010
 
2023
- //# sourceMappingURL=images-C8M3ysWR.mjs.map
2011
+ //# sourceMappingURL=images-BsylWUiH.mjs.map