@leverege/imaginarium-ui 1.4.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,14 +1,14 @@
1
- import { P as St, N as Pt } from "./PluginTypes-mZ4TjxPV.js";
2
- import { M as Et, u as ye, P as It } from "./MarkdownPageDoc-DR1FmNpF.js";
1
+ import { P as Pt, N as Et } from "./PluginTypes-mZ4TjxPV.js";
2
+ import { M as Kt, u as ye, P as $t } from "./MarkdownPageDoc-DR1FmNpF.js";
3
3
  import { jsx as e, jsxs as n, Fragment as Me } from "react/jsx-runtime";
4
- import { useState as M, useMemo as j, useEffect as je, Fragment as ct } from "react";
5
- import { u as oe, a as se, B as $, C as Se, f as Pe, c as ce } from "./Card-D2LdIJwJ.js";
6
- import { useQueryClient as de, useMutation as U, useQuery as le } from "@tanstack/react-query";
7
- import { X as be, Loader2 as ut, Save as mt, Plus as De, Ban as Fe, RotateCcw as Kt, AlertTriangle as fe, Check as ht, ChevronDown as ge, ChevronRight as xe, Send as $t, Circle as Ot, ArrowLeft as We, RefreshCw as pt, BarChart2 as At, Pencil as Rt, Trash2 as ft, Bot as Mt } from "lucide-react";
4
+ import { useState as A, useMemo as B, useEffect as je, Fragment as ut } from "react";
5
+ import { u as le, a as ne, B as $, C as Se, f as Pe, c as ce } from "./Card-D2LdIJwJ.js";
6
+ import { useQueryClient as oe, useMutation as U, useQuery as re } from "@tanstack/react-query";
7
+ import { X as be, Loader2 as mt, Save as ht, Plus as De, Ban as Fe, RotateCcw as It, AlertTriangle as fe, Check as pt, ChevronDown as ge, ChevronRight as xe, Send as Ot, Circle as Rt, ArrowLeft as We, RefreshCw as ft, BarChart2 as At, Pencil as Mt, Trash2 as gt, Bot as Dt } from "lucide-react";
8
8
  import { Config as ze } from "@leverege/plugin";
9
- import { D as Ie, a as Ke, b as $e, c as Oe, d as Ae, L as re, I as he, e as Re } from "./Label-v0wUXs4O.js";
10
- import { b as Dt, T as Ft, c as qt, a as jt } from "./Tooltip-CIwKmgzA.js";
11
- const zt = Et.create({
9
+ import { D as Ke, a as $e, b as Ie, c as Oe, d as Re, L as ie, I as he, e as Ae } from "./Label-v0wUXs4O.js";
10
+ import { b as Ft, T as qt, c as jt, a as zt } from "./Tooltip-CIwKmgzA.js";
11
+ const Bt = Kt.create({
12
12
  path: "/imp",
13
13
  markdown: `# imp
14
14
 
@@ -123,138 +123,138 @@ Lists all permanently-ignored items for the selected origin cluster. Removing a
123
123
  After removing an ignore, refreshing an existing release draft will bring the item back.
124
124
  `
125
125
  });
126
- function Bt({ open: t, onOpenChange: s, onCreated: a }) {
127
- const r = ze.get("Release", "apiPath", "/releases"), { toast: d } = oe(), { fetchJson: c } = se(), l = de(), { configs: u } = ye(), [p, v] = M(""), [k, o] = M(""), [h, R] = M(""), [F, z] = M([]), Q = ["imaginarium", "releases", r], H = () => {
128
- v(""), o(""), R(""), z([]);
129
- }, B = j(
130
- () => u.filter((x) => x.id !== h),
126
+ function Jt({ open: t, onOpenChange: s, onCreated: a }) {
127
+ const i = ze.get("Release", "apiPath", "/releases"), { toast: l } = le(), { fetchJson: c } = ne(), o = oe(), { configs: u } = ye(), [p, w] = A(""), [v, d] = A(""), [h, E] = A(""), [z, j] = A([]), H = ["imaginarium", "releases", i], _ = () => {
128
+ w(""), d(""), E(""), j([]);
129
+ }, J = B(
130
+ () => u.filter((g) => g.id !== h),
131
131
  [u, h]
132
- ), D = (x) => {
133
- R(x), z((O) => O.filter((J) => J !== x));
134
- }, q = (x) => {
135
- z(
136
- (O) => O.includes(x) ? O.filter((J) => J !== x) : [...O, x]
132
+ ), D = (g) => {
133
+ E(g), j((R) => R.filter((Q) => Q !== g));
134
+ }, L = (g) => {
135
+ j(
136
+ (R) => R.includes(g) ? R.filter((Q) => Q !== g) : [...R, g]
137
137
  );
138
- }, y = U({
138
+ }, x = U({
139
139
  mutationFn: async () => {
140
- const x = await c(r, {
140
+ const g = await c(i, {
141
141
  method: "POST",
142
142
  body: JSON.stringify({
143
143
  name: p.trim(),
144
- description: k.trim() || null,
144
+ description: v.trim() || null,
145
145
  originConfigId: h,
146
- targetConfigIds: F
146
+ targetConfigIds: z
147
147
  })
148
148
  });
149
- return await c(`${r}/${x.id}/snapshot-from-compare`, {
149
+ return await c(`${i}/${g.id}/snapshot-from-compare`, {
150
150
  method: "POST",
151
151
  body: JSON.stringify({})
152
- }), x;
152
+ }), g;
153
153
  },
154
- onSuccess: (x) => {
155
- l.invalidateQueries({ queryKey: Q }), d({ title: "Success", description: "Release created and snapshotted" }), s(!1), H(), a(x.id);
154
+ onSuccess: (g) => {
155
+ o.invalidateQueries({ queryKey: H }), l({ title: "Success", description: "Release created and snapshotted" }), s(!1), _(), a(g.id);
156
156
  },
157
- onError: (x) => {
158
- d({ title: "Error", description: x.message, variant: "destructive" });
157
+ onError: (g) => {
158
+ l({ title: "Error", description: g.message, variant: "destructive" });
159
159
  },
160
160
  // Refetch regardless of outcome: if create succeeds but snapshot fails, the
161
161
  // new release would otherwise be orphaned and missing from the list.
162
162
  onSettled: () => {
163
- l.invalidateQueries({ queryKey: Q });
163
+ o.invalidateQueries({ queryKey: H });
164
164
  }
165
- }), w = (x) => {
166
- x || H(), s(x);
167
- }, C = !!(p.trim() && h && F.length > 0);
168
- return /* @__PURE__ */ e(Ie, { open: t, onOpenChange: w, children: /* @__PURE__ */ n(Ke, { children: [
169
- /* @__PURE__ */ n($e, { children: [
165
+ }), k = (g) => {
166
+ g || _(), s(g);
167
+ }, C = !!(p.trim() && h && z.length > 0);
168
+ return /* @__PURE__ */ e(Ke, { open: t, onOpenChange: k, children: /* @__PURE__ */ n($e, { children: [
169
+ /* @__PURE__ */ n(Ie, { children: [
170
170
  /* @__PURE__ */ e(Oe, { children: "New Release" }),
171
- /* @__PURE__ */ e(Ae, { children: "Create a release from an origin cluster and snapshot the diff against its targets." })
171
+ /* @__PURE__ */ e(Re, { children: "Create a release from an origin cluster and snapshot the diff against its targets." })
172
172
  ] }),
173
173
  /* @__PURE__ */ n("div", { className: "space-y-4 py-4", children: [
174
174
  /* @__PURE__ */ n("div", { className: "space-y-2", children: [
175
- /* @__PURE__ */ e(re, { htmlFor: "release-name", children: "Name" }),
175
+ /* @__PURE__ */ e(ie, { htmlFor: "release-name", children: "Name" }),
176
176
  /* @__PURE__ */ e(
177
177
  he,
178
178
  {
179
179
  id: "release-name",
180
180
  value: p,
181
- onChange: (x) => v(x.target.value),
181
+ onChange: (g) => w(g.target.value),
182
182
  placeholder: "2026.05 Release"
183
183
  }
184
184
  )
185
185
  ] }),
186
186
  /* @__PURE__ */ n("div", { className: "space-y-2", children: [
187
- /* @__PURE__ */ e(re, { htmlFor: "release-description", children: "Description (Optional)" }),
187
+ /* @__PURE__ */ e(ie, { htmlFor: "release-description", children: "Description (Optional)" }),
188
188
  /* @__PURE__ */ e(
189
189
  he,
190
190
  {
191
191
  id: "release-description",
192
- value: k,
193
- onChange: (x) => o(x.target.value),
192
+ value: v,
193
+ onChange: (g) => d(g.target.value),
194
194
  placeholder: "What this release contains"
195
195
  }
196
196
  )
197
197
  ] }),
198
198
  /* @__PURE__ */ n("div", { className: "space-y-2", children: [
199
- /* @__PURE__ */ e(re, { htmlFor: "release-origin", children: "Origin Cluster" }),
199
+ /* @__PURE__ */ e(ie, { htmlFor: "release-origin", children: "Origin Cluster" }),
200
200
  /* @__PURE__ */ n(
201
201
  "select",
202
202
  {
203
203
  id: "release-origin",
204
204
  value: h,
205
- onChange: (x) => D(x.target.value),
205
+ onChange: (g) => D(g.target.value),
206
206
  className: "flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm",
207
207
  children: [
208
208
  /* @__PURE__ */ e("option", { value: "", children: "Select origin…" }),
209
- u.map((x) => /* @__PURE__ */ e("option", { value: x.id, children: x.displayName }, x.id))
209
+ u.map((g) => /* @__PURE__ */ e("option", { value: g.id, children: g.displayName }, g.id))
210
210
  ]
211
211
  }
212
212
  )
213
213
  ] }),
214
214
  /* @__PURE__ */ n("div", { className: "space-y-2", children: [
215
- /* @__PURE__ */ e(re, { children: "Target Clusters" }),
216
- B.length > 0 ? /* @__PURE__ */ e("div", { className: "space-y-1 rounded-md border border-input p-2 max-h-48 overflow-y-auto", children: B.map((x) => /* @__PURE__ */ n("label", { className: "flex items-center gap-2 text-sm cursor-pointer", children: [
215
+ /* @__PURE__ */ e(ie, { children: "Target Clusters" }),
216
+ J.length > 0 ? /* @__PURE__ */ e("div", { className: "space-y-1 rounded-md border border-input p-2 max-h-48 overflow-y-auto", children: J.map((g) => /* @__PURE__ */ n("label", { className: "flex items-center gap-2 text-sm cursor-pointer", children: [
217
217
  /* @__PURE__ */ e(
218
218
  "input",
219
219
  {
220
220
  type: "checkbox",
221
- checked: F.includes(x.id),
222
- onChange: () => q(x.id)
221
+ checked: z.includes(g.id),
222
+ onChange: () => L(g.id)
223
223
  }
224
224
  ),
225
- x.displayName
226
- ] }, x.id)) }) : /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: h ? "No other clusters available as targets." : "Select an origin first." })
225
+ g.displayName
226
+ ] }, g.id)) }) : /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: h ? "No other clusters available as targets." : "Select an origin first." })
227
227
  ] })
228
228
  ] }),
229
- /* @__PURE__ */ n(Re, { children: [
230
- /* @__PURE__ */ n($, { variant: "outline", onClick: () => w(!1), disabled: y.isPending, children: [
229
+ /* @__PURE__ */ n(Ae, { children: [
230
+ /* @__PURE__ */ n($, { variant: "outline", onClick: () => k(!1), disabled: x.isPending, children: [
231
231
  /* @__PURE__ */ e(be, { className: "w-4 h-4 mr-2" }),
232
232
  "Cancel"
233
233
  ] }),
234
- /* @__PURE__ */ e($, { onClick: () => y.mutate(), disabled: !C || y.isPending, children: y.isPending ? /* @__PURE__ */ n(Me, { children: [
235
- /* @__PURE__ */ e(ut, { className: "w-4 h-4 mr-2 animate-spin" }),
234
+ /* @__PURE__ */ e($, { onClick: () => x.mutate(), disabled: !C || x.isPending, children: x.isPending ? /* @__PURE__ */ n(Me, { children: [
235
+ /* @__PURE__ */ e(mt, { className: "w-4 h-4 mr-2 animate-spin" }),
236
236
  "Snapshotting…"
237
237
  ] }) : /* @__PURE__ */ n(Me, { children: [
238
- /* @__PURE__ */ e(mt, { className: "w-4 h-4 mr-2" }),
238
+ /* @__PURE__ */ e(ht, { className: "w-4 h-4 mr-2" }),
239
239
  "Create & snapshot"
240
240
  ] }) })
241
241
  ] })
242
242
  ] }) });
243
243
  }
244
- function gt({ status: t }) {
244
+ function xt({ status: t }) {
245
245
  return /* @__PURE__ */ e("span", { className: `inline-flex items-center rounded px-1.5 py-0.5 text-xs font-medium border ${t === "pushed" ? "bg-emerald-500/15 text-emerald-700 dark:text-emerald-300 border-emerald-500/30" : "bg-muted text-muted-foreground border-border"}`, children: t });
246
246
  }
247
- function Jt({ onOpen: t }) {
248
- const s = ze.get("Release", "apiPath", "/releases"), { fetchJson: a } = se(), { configs: r } = ye(), [d, c] = M(!1), l = ["imaginarium", "releases", s], { data: u, isLoading: p } = le({
249
- queryKey: l,
247
+ function Lt({ onOpen: t }) {
248
+ const s = ze.get("Release", "apiPath", "/releases"), { fetchJson: a } = ne(), { configs: i } = ye(), [l, c] = A(!1), o = ["imaginarium", "releases", s], { data: u, isLoading: p } = re({
249
+ queryKey: o,
250
250
  queryFn: async () => {
251
- const o = await a(s);
252
- return [...Array.isArray(o) ? o : (o == null ? void 0 : o.items) ?? []].sort((R, F) => (F.createdAt ?? "").localeCompare(R.createdAt ?? ""));
251
+ const d = await a(s);
252
+ return [...Array.isArray(d) ? d : (d == null ? void 0 : d.items) ?? []].sort((E, z) => (z.createdAt ?? "").localeCompare(E.createdAt ?? ""));
253
253
  }
254
- }), v = j(() => {
255
- const o = /* @__PURE__ */ new Map();
256
- return r.forEach((h) => o.set(String(h.id), h.displayName)), o;
257
- }, [r]), k = (o) => v.get(o) ?? o;
254
+ }), w = B(() => {
255
+ const d = /* @__PURE__ */ new Map();
256
+ return i.forEach((h) => d.set(String(h.id), h.displayName)), d;
257
+ }, [i]), v = (d) => w.get(d) ?? d;
258
258
  return /* @__PURE__ */ n("div", { className: "space-y-4", children: [
259
259
  /* @__PURE__ */ e("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ n($, { onClick: () => c(!0), children: [
260
260
  /* @__PURE__ */ e(De, { className: "w-4 h-4 mr-2" }),
@@ -270,42 +270,42 @@ function Jt({ onOpen: t }) {
270
270
  /* @__PURE__ */ e("th", { className: "p-3 font-medium", children: "Pushed" }),
271
271
  /* @__PURE__ */ e("th", { className: "p-3 font-medium" })
272
272
  ] }) }),
273
- /* @__PURE__ */ e("tbody", { children: u.map((o) => /* @__PURE__ */ n(
273
+ /* @__PURE__ */ e("tbody", { children: u.map((d) => /* @__PURE__ */ n(
274
274
  "tr",
275
275
  {
276
276
  className: "border-b last:border-0 cursor-pointer hover:bg-muted/50",
277
- onClick: () => t(o.id),
277
+ onClick: () => t(d.id),
278
278
  children: [
279
279
  /* @__PURE__ */ n("td", { className: "p-3", children: [
280
- /* @__PURE__ */ e("div", { className: "font-medium", children: o.name }),
281
- o.description ? /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground", children: o.description }) : null
280
+ /* @__PURE__ */ e("div", { className: "font-medium", children: d.name }),
281
+ d.description ? /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground", children: d.description }) : null
282
282
  ] }),
283
- /* @__PURE__ */ e("td", { className: "p-3", children: k(o.originConfigId) }),
284
- /* @__PURE__ */ e("td", { className: "p-3", children: /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-1", children: (o.targetConfigIds ?? []).map((h) => /* @__PURE__ */ e(
283
+ /* @__PURE__ */ e("td", { className: "p-3", children: v(d.originConfigId) }),
284
+ /* @__PURE__ */ e("td", { className: "p-3", children: /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-1", children: (d.targetConfigIds ?? []).map((h) => /* @__PURE__ */ e(
285
285
  "span",
286
286
  {
287
287
  className: "inline-flex items-center rounded bg-muted px-1.5 py-0.5 text-xs",
288
- children: k(h)
288
+ children: v(h)
289
289
  },
290
290
  h
291
291
  )) }) }),
292
- /* @__PURE__ */ e("td", { className: "p-3", children: /* @__PURE__ */ e(gt, { status: o.status }) }),
293
- /* @__PURE__ */ e("td", { className: "p-3 text-muted-foreground", children: o.snapshotAt ? new Date(o.snapshotAt).toLocaleString() : "—" }),
294
- /* @__PURE__ */ e("td", { className: "p-3 text-muted-foreground", children: o.pushedAt ? new Date(o.pushedAt).toLocaleString() : "—" }),
292
+ /* @__PURE__ */ e("td", { className: "p-3", children: /* @__PURE__ */ e(xt, { status: d.status }) }),
293
+ /* @__PURE__ */ e("td", { className: "p-3 text-muted-foreground", children: d.snapshotAt ? new Date(d.snapshotAt).toLocaleString() : "—" }),
294
+ /* @__PURE__ */ e("td", { className: "p-3 text-muted-foreground", children: d.pushedAt ? new Date(d.pushedAt).toLocaleString() : "—" }),
295
295
  /* @__PURE__ */ e("td", { className: "p-3 text-right", children: /* @__PURE__ */ e(
296
296
  $,
297
297
  {
298
298
  variant: "ghost",
299
299
  size: "sm",
300
300
  onClick: (h) => {
301
- h.stopPropagation(), t(o.id);
301
+ h.stopPropagation(), t(d.id);
302
302
  },
303
303
  children: "Open →"
304
304
  }
305
305
  ) })
306
306
  ]
307
307
  },
308
- o.id
308
+ d.id
309
309
  )) })
310
310
  ] }) }) }) : /* @__PURE__ */ e(Se, { children: /* @__PURE__ */ n(Pe, { className: "py-12 text-center", children: [
311
311
  /* @__PURE__ */ e("p", { className: "text-muted-foreground mb-4", children: "No releases yet" }),
@@ -315,9 +315,9 @@ function Jt({ onOpen: t }) {
315
315
  ] })
316
316
  ] }) }),
317
317
  /* @__PURE__ */ e(
318
- Bt,
318
+ Jt,
319
319
  {
320
- open: d,
320
+ open: l,
321
321
  onOpenChange: c,
322
322
  onCreated: t
323
323
  }
@@ -329,8 +329,8 @@ function Qt({
329
329
  className: s
330
330
  }) {
331
331
  const a = t ? `Skipped in your last release from ${t}.` : "Skipped in your last release.";
332
- return /* @__PURE__ */ e(Dt, { children: /* @__PURE__ */ n(Ft, { children: [
333
- /* @__PURE__ */ e(qt, { asChild: !0, children: /* @__PURE__ */ e(
332
+ return /* @__PURE__ */ e(Ft, { children: /* @__PURE__ */ n(qt, { children: [
333
+ /* @__PURE__ */ e(jt, { asChild: !0, children: /* @__PURE__ */ e(
334
334
  "span",
335
335
  {
336
336
  className: ce(
@@ -341,10 +341,10 @@ function Qt({
341
341
  children: "previously skipped"
342
342
  }
343
343
  ) }),
344
- /* @__PURE__ */ e(jt, { side: "top", children: a })
344
+ /* @__PURE__ */ e(zt, { side: "top", children: a })
345
345
  ] }) });
346
346
  }
347
- function Lt({ className: t }) {
347
+ function Vt({ className: t }) {
348
348
  return /* @__PURE__ */ e(
349
349
  "span",
350
350
  {
@@ -357,63 +357,63 @@ function Lt({ className: t }) {
357
357
  }
358
358
  );
359
359
  }
360
- function Vt({
360
+ function Ut({
361
361
  ignoreRule: t,
362
362
  createPayload: s,
363
363
  apiPath: a = "/release-ignores",
364
- onChange: r,
365
- className: d
364
+ onChange: i,
365
+ className: l
366
366
  }) {
367
- const { toast: c } = oe(), { fetchJson: l } = se(), u = de(), [p, v] = M(!1), k = !!t, o = () => {
368
- u.invalidateQueries({ queryKey: ["imaginarium", "release-ignores"] }), r == null || r();
367
+ const { toast: c } = le(), { fetchJson: o } = ne(), u = oe(), [p, w] = A(!1), v = !!t, d = () => {
368
+ u.invalidateQueries({ queryKey: ["imaginarium", "release-ignores"] }), i == null || i();
369
369
  }, h = U({
370
- mutationFn: () => l(a, {
370
+ mutationFn: () => o(a, {
371
371
  method: "POST",
372
372
  body: JSON.stringify(s)
373
373
  }),
374
374
  onSuccess: () => {
375
- c({ title: "Item ignored", description: "Will be excluded from all future snapshots." }), v(!1), o();
375
+ c({ title: "Item ignored", description: "Will be excluded from all future snapshots." }), w(!1), d();
376
376
  },
377
- onError: (z) => {
378
- c({ title: "Error", description: z.message, variant: "destructive" });
377
+ onError: (j) => {
378
+ c({ title: "Error", description: j.message, variant: "destructive" });
379
379
  }
380
- }), R = U({
381
- mutationFn: () => l(`${a}/${t.id}`, { method: "DELETE" }),
380
+ }), E = U({
381
+ mutationFn: () => o(`${a}/${t.id}`, { method: "DELETE" }),
382
382
  onSuccess: () => {
383
- c({ title: "Item un-ignored", description: "Will appear normally in future snapshots." }), o();
383
+ c({ title: "Item un-ignored", description: "Will appear normally in future snapshots." }), d();
384
384
  },
385
- onError: (z) => {
386
- c({ title: "Error", description: z.message, variant: "destructive" });
385
+ onError: (j) => {
386
+ c({ title: "Error", description: j.message, variant: "destructive" });
387
387
  }
388
- }), F = h.isPending || R.isPending;
388
+ }), z = h.isPending || E.isPending;
389
389
  return /* @__PURE__ */ n(Me, { children: [
390
390
  /* @__PURE__ */ e(
391
391
  $,
392
392
  {
393
393
  variant: "ghost",
394
394
  size: "icon",
395
- title: k ? "Remove from ignore list" : "Ignore this item",
396
- disabled: F,
397
- onClick: () => k ? R.mutate() : v(!0),
398
- className: ce(k && "text-red-500 hover:text-red-500 dark:text-red-400 dark:hover:text-red-400", d),
395
+ title: v ? "Remove from ignore list" : "Ignore this item",
396
+ disabled: z,
397
+ onClick: () => v ? E.mutate() : w(!0),
398
+ className: ce(v && "text-red-500 hover:text-red-500 dark:text-red-400 dark:hover:text-red-400", l),
399
399
  children: /* @__PURE__ */ e(Fe, {})
400
400
  }
401
401
  ),
402
- /* @__PURE__ */ e(Ie, { open: p, onOpenChange: v, children: /* @__PURE__ */ n(Ke, { children: [
403
- /* @__PURE__ */ n($e, { children: [
402
+ /* @__PURE__ */ e(Ke, { open: p, onOpenChange: w, children: /* @__PURE__ */ n($e, { children: [
403
+ /* @__PURE__ */ n(Ie, { children: [
404
404
  /* @__PURE__ */ e(Oe, { children: "Ignore this item?" }),
405
- /* @__PURE__ */ n(Ae, { children: [
405
+ /* @__PURE__ */ n(Re, { children: [
406
406
  "Ignoring excludes this item from ",
407
407
  /* @__PURE__ */ e("strong", { children: "this and all future releases" }),
408
408
  " for this origin cluster — it will never be pushed to any destination. You can un-ignore it later from the Ignored tab."
409
409
  ] })
410
410
  ] }),
411
- /* @__PURE__ */ n(Re, { children: [
411
+ /* @__PURE__ */ n(Ae, { children: [
412
412
  /* @__PURE__ */ e(
413
413
  $,
414
414
  {
415
415
  variant: "outline",
416
- onClick: () => v(!1),
416
+ onClick: () => w(!1),
417
417
  disabled: h.isPending,
418
418
  children: "Cancel"
419
419
  }
@@ -434,23 +434,23 @@ function Vt({
434
434
  ] }) })
435
435
  ] });
436
436
  }
437
- function Ut({
437
+ function Ht({
438
438
  releaseId: t,
439
439
  apiPath: s = "/releases",
440
440
  onReset: a
441
441
  }) {
442
- const { toast: r } = oe(), { fetchJson: d } = se(), c = de(), l = U({
443
- mutationFn: () => d(`${s}/${t}/reset-exclusions`, {
442
+ const { toast: i } = le(), { fetchJson: l } = ne(), c = oe(), o = U({
443
+ mutationFn: () => l(`${s}/${t}/reset-exclusions`, {
444
444
  method: "POST"
445
445
  }),
446
446
  onSuccess: (u) => {
447
- c.invalidateQueries({ queryKey: ["imaginarium", "release-items", t] }), r({
447
+ c.invalidateQueries({ queryKey: ["imaginarium", "release-items", t] }), i({
448
448
  title: "Exclusions reset",
449
449
  description: `${u.reset} item${u.reset === 1 ? "" : "s"} re-enabled.`
450
450
  }), a == null || a(u.reset);
451
451
  },
452
452
  onError: (u) => {
453
- r({ title: "Error", description: u.message, variant: "destructive" });
453
+ i({ title: "Error", description: u.message, variant: "destructive" });
454
454
  }
455
455
  });
456
456
  return /* @__PURE__ */ n(
@@ -458,11 +458,11 @@ function Ut({
458
458
  {
459
459
  variant: "outline",
460
460
  size: "sm",
461
- onClick: () => l.mutate(),
462
- disabled: l.isPending,
461
+ onClick: () => o.mutate(),
462
+ disabled: o.isPending,
463
463
  children: [
464
- /* @__PURE__ */ e(Kt, {}),
465
- l.isPending ? "Resetting…" : "Reset exclusions"
464
+ /* @__PURE__ */ e(It, {}),
465
+ o.isPending ? "Resetting…" : "Reset exclusions"
466
466
  ]
467
467
  }
468
468
  );
@@ -471,15 +471,15 @@ function Ee({ label: t, value: s, highlightLines: a }) {
471
471
  return /* @__PURE__ */ n("div", { className: "flex min-w-0 flex-1 flex-col", children: [
472
472
  /* @__PURE__ */ e("div", { className: "mb-1 text-xs font-medium text-muted-foreground", children: t }),
473
473
  /* @__PURE__ */ e("pre", { className: "flex-1 overflow-auto rounded border bg-muted/30 p-3 text-xs", children: a === void 0 ? s === void 0 ? "null" : JSON.stringify(s, null, 2) : (s === void 0 ? "null" : JSON.stringify(s, null, 2)).split(`
474
- `).map((r, d) => (
474
+ `).map((i, l) => (
475
475
  // eslint-disable-next-line react/no-array-index-key
476
476
  /* @__PURE__ */ e(
477
477
  "div",
478
478
  {
479
- className: a[d] ? "bg-yellow-200/70 text-yellow-950 dark:bg-yellow-400/20 dark:text-yellow-100" : void 0,
480
- children: r === "" ? " " : r
479
+ className: a[l] ? "bg-yellow-200/70 text-yellow-950 dark:bg-yellow-400/20 dark:text-yellow-100" : void 0,
480
+ children: i === "" ? " " : i
481
481
  },
482
- d
482
+ l
483
483
  )
484
484
  )) })
485
485
  ] });
@@ -487,32 +487,32 @@ function Ee({ label: t, value: s, highlightLines: a }) {
487
487
  function Ge(t) {
488
488
  return t === void 0 ? "null" : JSON.stringify(t, null, 2);
489
489
  }
490
- function xt(t, s, a) {
491
- let r = Ge(t);
490
+ function yt(t, s, a) {
491
+ let i = Ge(t);
492
492
  if (a && a.length > 0)
493
- for (const { replace: h, with: R } of a)
494
- h && (r = r.split(h).join(R));
495
- const d = r.split(`
493
+ for (const { replace: h, with: E } of a)
494
+ h && (i = i.split(h).join(E));
495
+ const l = i.split(`
496
496
  `), c = Ge(s).split(`
497
- `), l = d.length, u = c.length, p = Array.from({ length: l + 1 }, () => new Array(u + 1).fill(0));
498
- for (let h = l - 1; h >= 0; h -= 1)
499
- for (let R = u - 1; R >= 0; R -= 1)
500
- p[h][R] = d[h] === c[R] ? p[h + 1][R + 1] + 1 : Math.max(p[h + 1][R], p[h][R + 1]);
501
- const v = new Array(l).fill(!0);
502
- let k = 0, o = 0;
503
- for (; k < l && o < u; )
504
- d[k] === c[o] ? (v[k] = !1, k += 1, o += 1) : p[k + 1][o] >= p[k][o + 1] ? k += 1 : o += 1;
505
- return v;
497
+ `), o = l.length, u = c.length, p = Array.from({ length: o + 1 }, () => new Array(u + 1).fill(0));
498
+ for (let h = o - 1; h >= 0; h -= 1)
499
+ for (let E = u - 1; E >= 0; E -= 1)
500
+ p[h][E] = l[h] === c[E] ? p[h + 1][E + 1] + 1 : Math.max(p[h + 1][E], p[h][E + 1]);
501
+ const w = new Array(o).fill(!0);
502
+ let v = 0, d = 0;
503
+ for (; v < o && d < u; )
504
+ l[v] === c[d] ? (w[v] = !1, v += 1, d += 1) : p[v + 1][d] >= p[v][d + 1] ? v += 1 : d += 1;
505
+ return w;
506
506
  }
507
507
  function Ce({
508
508
  title: t,
509
509
  values: s,
510
510
  excluded: a,
511
- editable: r,
512
- onToggle: d,
511
+ editable: i,
512
+ onToggle: l,
513
513
  formatLabel: c
514
514
  }) {
515
- const [l, u] = M(a.length > 0);
515
+ const [o, u] = A(a.length > 0);
516
516
  return je(() => {
517
517
  a.length > 0 && u(!0);
518
518
  }, [a.length]), /* @__PURE__ */ n("div", { className: "border-b p-2", children: [
@@ -522,21 +522,21 @@ function Ce({
522
522
  type: "button",
523
523
  className: "flex w-full items-center justify-between gap-2",
524
524
  onClick: () => u((p) => !p),
525
- "aria-expanded": l,
525
+ "aria-expanded": o,
526
526
  children: [
527
527
  /* @__PURE__ */ n("span", { className: "flex items-center gap-1 text-xs font-medium text-muted-foreground", children: [
528
- l ? /* @__PURE__ */ e(ge, { size: 12 }) : /* @__PURE__ */ e(xe, { size: 12 }),
528
+ o ? /* @__PURE__ */ e(ge, { size: 12 }) : /* @__PURE__ */ e(xe, { size: 12 }),
529
529
  t,
530
530
  " (",
531
531
  a.length,
532
532
  ")"
533
533
  ] }),
534
- r ? null : /* @__PURE__ */ e("span", { className: "text-[10px] text-muted-foreground", children: "read-only" })
534
+ i ? null : /* @__PURE__ */ e("span", { className: "text-[10px] text-muted-foreground", children: "read-only" })
535
535
  ]
536
536
  }
537
537
  ),
538
- l ? /* @__PURE__ */ e("div", { className: "mt-1 flex flex-col gap-1", children: s.map((p) => {
539
- const v = !a.includes(p);
538
+ o ? /* @__PURE__ */ e("div", { className: "mt-1 flex flex-col gap-1", children: s.map((p) => {
539
+ const w = !a.includes(p);
540
540
  return /* @__PURE__ */ n(
541
541
  "label",
542
542
  {
@@ -547,12 +547,12 @@ function Ce({
547
547
  {
548
548
  type: "checkbox",
549
549
  className: "mt-0.5 shrink-0",
550
- checked: v,
551
- disabled: !r,
552
- onChange: (k) => d == null ? void 0 : d(p, k.target.checked)
550
+ checked: w,
551
+ disabled: !i,
552
+ onChange: (v) => l == null ? void 0 : l(p, v.target.checked)
553
553
  }
554
554
  ),
555
- /* @__PURE__ */ e("span", { className: `min-w-0 break-all font-mono ${v ? "" : "text-muted-foreground line-through"}`, children: c ? c(p) : p })
555
+ /* @__PURE__ */ e("span", { className: `min-w-0 break-all font-mono ${w ? "" : "text-muted-foreground line-through"}`, children: c ? c(p) : p })
556
556
  ]
557
557
  },
558
558
  p
@@ -560,39 +560,39 @@ function Ce({
560
560
  }) }) : null
561
561
  ] });
562
562
  }
563
- function Ht({
563
+ function _t({
564
564
  item: t,
565
565
  targets: s,
566
566
  onClose: a,
567
- unmetDependencyNames: r = [],
568
- tags: d = [],
567
+ unmetDependencyNames: i = [],
568
+ tags: l = [],
569
569
  excludedTags: c = [],
570
- editable: l = !0,
570
+ editable: o = !0,
571
571
  onToggleTag: u,
572
572
  metadataKeys: p = [],
573
- excludedMetadataKeys: v = [],
574
- onToggleMetadataKey: k,
575
- i18nPaths: o = [],
573
+ excludedMetadataKeys: w = [],
574
+ onToggleMetadataKey: v,
575
+ i18nPaths: d = [],
576
576
  excludedI18nPaths: h = [],
577
- onToggleI18nPath: R,
578
- permissionKeys: F = [],
579
- excludedPermissions: z = [],
580
- onTogglePermission: Q,
581
- formatPermissionLabel: H,
582
- replacementMaps: B
577
+ onToggleI18nPath: E,
578
+ permissionKeys: z = [],
579
+ excludedPermissions: j = [],
580
+ onTogglePermission: H,
581
+ formatPermissionLabel: _,
582
+ replacementMaps: J
583
583
  }) {
584
- var Z, G, f, A;
585
- const D = ((Z = s[0]) == null ? void 0 : Z.id) ?? null, [q, y] = M(D);
584
+ var G, f, q, F;
585
+ const D = ((G = s[0]) == null ? void 0 : G.id) ?? null, [L, x] = A(D);
586
586
  je(() => {
587
587
  var I;
588
- y(((I = s[0]) == null ? void 0 : I.id) ?? null);
588
+ x(((I = s[0]) == null ? void 0 : I.id) ?? null);
589
589
  }, [t == null ? void 0 : t.id]);
590
- const w = s.find((I) => I.id === q) ?? s[0] ?? null, C = (G = t == null ? void 0 : t.diff) == null ? void 0 : G.byTarget, x = C != null, O = x ? C[(w == null ? void 0 : w.id) ?? ""] : (f = t == null ? void 0 : t.diff) == null ? void 0 : f.target, J = x && w != null && !(w.id in C), W = j(
590
+ const k = s.find((I) => I.id === L) ?? s[0] ?? null, C = (f = t == null ? void 0 : t.diff) == null ? void 0 : f.byTarget, g = C != null, R = g ? C[(k == null ? void 0 : k.id) ?? ""] : (q = t == null ? void 0 : t.diff) == null ? void 0 : q.target, Q = g && k != null && !(k.id in C), X = B(
591
591
  () => {
592
592
  var I;
593
- return J ? void 0 : xt((I = t == null ? void 0 : t.diff) == null ? void 0 : I.origin, O, B == null ? void 0 : B[(w == null ? void 0 : w.id) ?? ""]);
593
+ return Q ? void 0 : yt((I = t == null ? void 0 : t.diff) == null ? void 0 : I.origin, R, J == null ? void 0 : J[(k == null ? void 0 : k.id) ?? ""]);
594
594
  },
595
- [t, O, J, B, w == null ? void 0 : w.id]
595
+ [t, R, Q, J, k == null ? void 0 : k.id]
596
596
  );
597
597
  return t ? /* @__PURE__ */ n("div", { className: "flex h-full flex-col rounded-md border bg-background", children: [
598
598
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between border-b p-3", children: [
@@ -602,21 +602,21 @@ function Ht({
602
602
  ] }),
603
603
  /* @__PURE__ */ e($, { variant: "ghost", size: "icon", title: "Close", onClick: a, children: /* @__PURE__ */ e(be, {}) })
604
604
  ] }),
605
- r.length > 0 ? /* @__PURE__ */ n("div", { className: "flex items-start gap-2 border-b bg-amber-50 p-2 text-xs text-amber-700 dark:bg-amber-500/10 dark:text-amber-300", children: [
605
+ i.length > 0 ? /* @__PURE__ */ n("div", { className: "flex items-start gap-2 border-b bg-amber-50 p-2 text-xs text-amber-700 dark:bg-amber-500/10 dark:text-amber-300", children: [
606
606
  /* @__PURE__ */ e(fe, { size: 14, className: "mt-0.5 shrink-0 text-amber-600 dark:text-amber-400" }),
607
607
  /* @__PURE__ */ n("span", { children: [
608
608
  "Depends on excluded items: ",
609
- r.join(", "),
609
+ i.join(", "),
610
610
  ". Push will fail for this item until they're included."
611
611
  ] })
612
612
  ] }) : null,
613
- d.length > 0 ? /* @__PURE__ */ e(
613
+ l.length > 0 ? /* @__PURE__ */ e(
614
614
  Ce,
615
615
  {
616
616
  title: "Tag Overrides",
617
- values: d,
617
+ values: l,
618
618
  excluded: c,
619
- editable: l,
619
+ editable: o,
620
620
  onToggle: u
621
621
  }
622
622
  ) : null,
@@ -625,42 +625,42 @@ function Ht({
625
625
  {
626
626
  title: "Metadata Overrides",
627
627
  values: p,
628
- excluded: v,
629
- editable: l,
630
- onToggle: k
628
+ excluded: w,
629
+ editable: o,
630
+ onToggle: v
631
631
  }
632
632
  ) : null,
633
- o.length > 0 ? /* @__PURE__ */ e(
633
+ d.length > 0 ? /* @__PURE__ */ e(
634
634
  Ce,
635
635
  {
636
636
  title: "Translation Overrides",
637
- values: o,
637
+ values: d,
638
638
  excluded: h,
639
- editable: l,
640
- onToggle: R
639
+ editable: o,
640
+ onToggle: E
641
641
  }
642
642
  ) : null,
643
- F.length > 0 ? /* @__PURE__ */ e(
643
+ z.length > 0 ? /* @__PURE__ */ e(
644
644
  Ce,
645
645
  {
646
646
  title: "Permission Overrides",
647
- values: F,
648
- excluded: z,
649
- editable: l,
650
- onToggle: Q,
651
- formatLabel: H
647
+ values: z,
648
+ excluded: j,
649
+ editable: o,
650
+ onToggle: H,
651
+ formatLabel: _
652
652
  }
653
653
  ) : null,
654
654
  s.length > 0 ? /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-1 border-b p-2", children: s.map((I) => {
655
- const L = x && !(I.id in C);
655
+ const V = g && !(I.id in C);
656
656
  return /* @__PURE__ */ n(
657
657
  "button",
658
658
  {
659
659
  type: "button",
660
- onClick: () => y(I.id),
661
- className: `inline-flex items-center gap-1 rounded px-2 py-1 text-xs ${I.id === (w == null ? void 0 : w.id) ? "bg-muted font-medium" : "hover:bg-muted/50"}`,
660
+ onClick: () => x(I.id),
661
+ className: `inline-flex items-center gap-1 rounded px-2 py-1 text-xs ${I.id === (k == null ? void 0 : k.id) ? "bg-muted font-medium" : "hover:bg-muted/50"}`,
662
662
  children: [
663
- L ? /* @__PURE__ */ e(ht, { size: 12, className: "text-green-600" }) : /* @__PURE__ */ e("span", { className: "h-1.5 w-1.5 shrink-0 rounded-full bg-red-500", "aria-hidden": !0 }),
663
+ V ? /* @__PURE__ */ e(pt, { size: 12, className: "text-green-600" }) : /* @__PURE__ */ e("span", { className: "h-1.5 w-1.5 shrink-0 rounded-full bg-red-500", "aria-hidden": !0 }),
664
664
  I.name
665
665
  ]
666
666
  },
@@ -668,25 +668,25 @@ function Ht({
668
668
  );
669
669
  }) }) : null,
670
670
  /* @__PURE__ */ n("div", { className: "flex flex-1 gap-3 overflow-auto p-3", children: [
671
- /* @__PURE__ */ e(Ee, { label: "Origin", value: (A = t.diff) == null ? void 0 : A.origin, highlightLines: W }),
672
- J ? /* @__PURE__ */ n("div", { className: "flex min-w-0 flex-1 items-center justify-center rounded border bg-muted/30 p-3 text-xs text-muted-foreground", children: [
671
+ /* @__PURE__ */ e(Ee, { label: "Origin", value: (F = t.diff) == null ? void 0 : F.origin, highlightLines: X }),
672
+ Q ? /* @__PURE__ */ n("div", { className: "flex min-w-0 flex-1 items-center justify-center rounded border bg-muted/30 p-3 text-xs text-muted-foreground", children: [
673
673
  "Matches ",
674
- w == null ? void 0 : w.name,
674
+ k == null ? void 0 : k.name,
675
675
  " — no differences."
676
- ] }) : /* @__PURE__ */ e(Ee, { label: (w == null ? void 0 : w.name) ?? "Target", value: O })
676
+ ] }) : /* @__PURE__ */ e(Ee, { label: (k == null ? void 0 : k.name) ?? "Target", value: R })
677
677
  ] })
678
678
  ] }) : null;
679
679
  }
680
- function _t({ state: t }) {
680
+ function Yt({ state: t }) {
681
681
  switch (t.status) {
682
682
  case "pushing":
683
683
  return /* @__PURE__ */ n("span", { className: "inline-flex items-center gap-1 text-sm text-muted-foreground", children: [
684
- /* @__PURE__ */ e(ut, { className: "h-4 w-4 animate-spin" }),
684
+ /* @__PURE__ */ e(mt, { className: "h-4 w-4 animate-spin" }),
685
685
  "Pushing…"
686
686
  ] });
687
687
  case "success":
688
688
  return /* @__PURE__ */ n("span", { className: "inline-flex items-center gap-1 text-sm text-emerald-600", children: [
689
- /* @__PURE__ */ e(ht, { className: "h-4 w-4" }),
689
+ /* @__PURE__ */ e(pt, { className: "h-4 w-4" }),
690
690
  "Success"
691
691
  ] });
692
692
  case "partial":
@@ -710,50 +710,50 @@ function _t({ state: t }) {
710
710
  );
711
711
  default:
712
712
  return /* @__PURE__ */ n("span", { className: "inline-flex items-center gap-1 text-sm text-muted-foreground", children: [
713
- /* @__PURE__ */ e(Ot, { className: "h-3 w-3" }),
713
+ /* @__PURE__ */ e(Rt, { className: "h-3 w-3" }),
714
714
  "Pending"
715
715
  ] });
716
716
  }
717
717
  }
718
- function Yt({
718
+ function Wt({
719
719
  open: t,
720
720
  onOpenChange: s,
721
721
  releaseId: a,
722
- targetConfigIds: r,
723
- targetNames: d,
722
+ targetConfigIds: i,
723
+ targetNames: l,
724
724
  apiPath: c = "/releases",
725
- onComplete: l,
725
+ onComplete: o,
726
726
  dependencyWarnings: u = []
727
727
  }) {
728
- const { toast: p } = oe(), { fetchJson: v } = se(), k = de(), [o, h] = M(!1), [R, F] = M({}), [z, Q] = M(!1), H = (y) => (d == null ? void 0 : d[y]) ?? y, B = (y, w) => F((C) => ({ ...C, [y]: w })), D = async () => {
729
- h(!0), Q(!1), F(Object.fromEntries(r.map((C) => [C, { status: "idle" }])));
730
- let y = 0, w = 0;
731
- for (const C of r) {
732
- B(C, { status: "pushing" });
728
+ const { toast: p } = le(), { fetchJson: w } = ne(), v = oe(), [d, h] = A(!1), [E, z] = A({}), [j, H] = A(!1), _ = (x) => (l == null ? void 0 : l[x]) ?? x, J = (x, k) => z((C) => ({ ...C, [x]: k })), D = async () => {
729
+ h(!0), H(!1), z(Object.fromEntries(i.map((C) => [C, { status: "idle" }])));
730
+ let x = 0, k = 0;
731
+ for (const C of i) {
732
+ J(C, { status: "pushing" });
733
733
  try {
734
- const x = await v(`${c}/${a}/push`, {
734
+ const g = await w(`${c}/${a}/push`, {
735
735
  method: "POST",
736
736
  body: JSON.stringify({ destConfigId: C })
737
- }), O = (x.results ?? []).filter((J) => !J.ok);
738
- x.status === "success" ? (y += 1, B(C, { status: "success" })) : x.status === "partial" ? (w += 1, B(C, { status: "partial", failed: O.length, failures: O })) : (w += 1, B(C, { status: "failed", failures: O }));
739
- } catch (x) {
740
- w += 1;
741
- const O = x instanceof Error ? x.message : String(x);
742
- B(C, { status: "failed", error: O });
737
+ }), R = (g.results ?? []).filter((Q) => !Q.ok);
738
+ g.status === "success" ? (x += 1, J(C, { status: "success" })) : g.status === "partial" ? (k += 1, J(C, { status: "partial", failed: R.length, failures: R })) : (k += 1, J(C, { status: "failed", failures: R }));
739
+ } catch (g) {
740
+ k += 1;
741
+ const R = g instanceof Error ? g.message : String(g);
742
+ J(C, { status: "failed", error: R });
743
743
  }
744
744
  }
745
- k.invalidateQueries({ queryKey: ["imaginarium", "releases"] }), k.invalidateQueries({ queryKey: ["imaginarium", "release", a] }), k.invalidateQueries({ queryKey: ["imaginarium", "release-items", a] }), k.invalidateQueries({ queryKey: ["imaginarium", "release-pushes", a] }), p(w === 0 ? { title: "Push complete", description: `Pushed to ${y} target${y === 1 ? "" : "s"}.` } : {
745
+ v.invalidateQueries({ queryKey: ["imaginarium", "releases"] }), v.invalidateQueries({ queryKey: ["imaginarium", "release", a] }), v.invalidateQueries({ queryKey: ["imaginarium", "release-items", a] }), v.invalidateQueries({ queryKey: ["imaginarium", "release-pushes", a] }), p(k === 0 ? { title: "Push complete", description: `Pushed to ${x} target${x === 1 ? "" : "s"}.` } : {
746
746
  title: "Push finished with errors",
747
- description: `${w} target${w === 1 ? "" : "s"} did not fully succeed.`,
747
+ description: `${k} target${k === 1 ? "" : "s"} did not fully succeed.`,
748
748
  variant: "destructive"
749
- }), h(!1), Q(!0), l == null || l();
750
- }, q = (y) => {
751
- o || (y || (F({}), Q(!1)), s(y));
749
+ }), h(!1), H(!0), o == null || o();
750
+ }, L = (x) => {
751
+ d || (x || (z({}), H(!1)), s(x));
752
752
  };
753
- return /* @__PURE__ */ e(Ie, { open: t, onOpenChange: q, children: /* @__PURE__ */ n(Ke, { children: [
754
- /* @__PURE__ */ n($e, { children: [
753
+ return /* @__PURE__ */ e(Ke, { open: t, onOpenChange: L, children: /* @__PURE__ */ n($e, { children: [
754
+ /* @__PURE__ */ n(Ie, { children: [
755
755
  /* @__PURE__ */ e(Oe, { children: "Push release" }),
756
- /* @__PURE__ */ e(Ae, { children: "Pushes the included items to each target cluster, one at a time. Each target re-compares against the latest origin before applying." })
756
+ /* @__PURE__ */ e(Re, { children: "Pushes the included items to each target cluster, one at a time. Each target re-compares against the latest origin before applying." })
757
757
  ] }),
758
758
  u.length > 0 ? /* @__PURE__ */ n("div", { className: "space-y-1 rounded border border-amber-200 bg-amber-50 p-3 text-xs text-amber-700 dark:border-amber-500/30 dark:bg-amber-500/10 dark:text-amber-300", children: [
759
759
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2 font-medium", children: [
@@ -763,56 +763,56 @@ function Yt({
763
763
  u.length === 1 ? "" : "s",
764
764
  " reference excluded dependencies"
765
765
  ] }),
766
- /* @__PURE__ */ e("ul", { className: "list-disc space-y-0.5 pl-8", children: u.map((y) => /* @__PURE__ */ n("li", { children: [
767
- y.itemName,
766
+ /* @__PURE__ */ e("ul", { className: "list-disc space-y-0.5 pl-8", children: u.map((x) => /* @__PURE__ */ n("li", { children: [
767
+ x.itemName,
768
768
  " → ",
769
- y.missing.join(", ")
770
- ] }, y.itemName)) }),
769
+ x.missing.join(", ")
770
+ ] }, x.itemName)) }),
771
771
  /* @__PURE__ */ e("p", { className: "pl-8 text-amber-600", children: "Push may fail for these items. You can proceed anyway." })
772
772
  ] }) : null,
773
- /* @__PURE__ */ e("div", { className: "space-y-2 py-2", children: r.length === 0 ? /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: "This release has no targets." }) : r.map((y) => {
774
- const w = R[y] ?? { status: "idle" }, C = w.failures ?? [];
773
+ /* @__PURE__ */ e("div", { className: "space-y-2 py-2", children: i.length === 0 ? /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: "This release has no targets." }) : i.map((x) => {
774
+ const k = E[x] ?? { status: "idle" }, C = k.failures ?? [];
775
775
  return /* @__PURE__ */ n("div", { className: "rounded border px-3 py-2", children: [
776
776
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
777
- /* @__PURE__ */ e("span", { className: "text-sm font-medium", children: H(y) }),
778
- /* @__PURE__ */ e(_t, { state: w })
777
+ /* @__PURE__ */ e("span", { className: "text-sm font-medium", children: _(x) }),
778
+ /* @__PURE__ */ e(Yt, { state: k })
779
779
  ] }),
780
- C.length > 0 ? /* @__PURE__ */ e("ul", { className: "mt-2 max-h-48 space-y-1 overflow-auto border-t pt-2 text-xs", children: C.map((x, O) => /* @__PURE__ */ n("li", { className: "text-destructive", children: [
780
+ C.length > 0 ? /* @__PURE__ */ e("ul", { className: "mt-2 max-h-48 space-y-1 overflow-auto border-t pt-2 text-xs", children: C.map((g, R) => /* @__PURE__ */ n("li", { className: "text-destructive", children: [
781
781
  /* @__PURE__ */ n("span", { className: "font-mono", children: [
782
- x.action ? `${x.action} ` : "",
783
- x.itemKey ?? "item"
782
+ g.action ? `${g.action} ` : "",
783
+ g.itemKey ?? "item"
784
784
  ] }),
785
- x.error ? /* @__PURE__ */ n("span", { className: "text-muted-foreground", children: [
785
+ g.error ? /* @__PURE__ */ n("span", { className: "text-muted-foreground", children: [
786
786
  " — ",
787
- x.error
787
+ g.error
788
788
  ] }) : null
789
- ] }, `${x.itemKey ?? "item"}-${O}`)) }) : null
790
- ] }, y);
789
+ ] }, `${g.itemKey ?? "item"}-${R}`)) }) : null
790
+ ] }, x);
791
791
  }) }),
792
- /* @__PURE__ */ n(Re, { children: [
793
- /* @__PURE__ */ e($, { variant: "outline", onClick: () => q(!1), disabled: o, children: "Close" }),
792
+ /* @__PURE__ */ n(Ae, { children: [
793
+ /* @__PURE__ */ e($, { variant: "outline", onClick: () => L(!1), disabled: d, children: "Close" }),
794
794
  /* @__PURE__ */ n(
795
795
  $,
796
796
  {
797
797
  variant: "destructive",
798
798
  onClick: D,
799
- disabled: o || z || r.length === 0,
799
+ disabled: d || j || i.length === 0,
800
800
  children: [
801
- /* @__PURE__ */ e($t, { className: "w-4 h-4 mr-2" }),
802
- o ? "Pushing…" : "Confirm push"
801
+ /* @__PURE__ */ e(Ot, { className: "w-4 h-4 mr-2" }),
802
+ d ? "Pushing…" : "Confirm push"
803
803
  ]
804
804
  }
805
805
  )
806
806
  ] })
807
807
  ] }) });
808
808
  }
809
- function Wt(t) {
809
+ function Gt(t) {
810
810
  var s;
811
811
  return (((s = t.diff) == null ? void 0 : s.versions) ?? []).filter((a) => !a.existsOnTarget);
812
812
  }
813
- function Gt({ item: t, disabled: s, onChange: a }) {
814
- var d;
815
- const r = ((d = t.diff) == null ? void 0 : d.versions) ?? [];
813
+ function Xt({ item: t, disabled: s, onChange: a }) {
814
+ var l;
815
+ const i = ((l = t.diff) == null ? void 0 : l.versions) ?? [];
816
816
  return /* @__PURE__ */ n(
817
817
  "select",
818
818
  {
@@ -824,15 +824,15 @@ function Gt({ item: t, disabled: s, onChange: a }) {
824
824
  "aria-label": "Rule version",
825
825
  children: [
826
826
  /* @__PURE__ */ e("option", { value: "", disabled: !0, children: "Select a version" }),
827
- r.map((c) => {
828
- const l = String(c.version), u = c.existsOnTarget ? `v${c.version} — already on target` : `v${c.version}${c.isPublished ? " (published)" : ""}`;
829
- return /* @__PURE__ */ e("option", { value: l, disabled: c.existsOnTarget, children: u }, l);
827
+ i.map((c) => {
828
+ const o = String(c.version), u = c.existsOnTarget ? `v${c.version} — already on target` : `v${c.version}${c.isPublished ? " (published)" : ""}`;
829
+ return /* @__PURE__ */ e("option", { value: o, disabled: c.existsOnTarget, children: u }, o);
830
830
  })
831
831
  ]
832
832
  }
833
833
  );
834
834
  }
835
- const Xt = {
835
+ const Zt = {
836
836
  blueprint: "bg-blue-100 text-blue-700 dark:bg-blue-500/15 dark:text-blue-300",
837
837
  rule: "bg-orange-100 text-orange-700 dark:bg-orange-500/15 dark:text-orange-300",
838
838
  messageRoute: "bg-teal-100 text-teal-700 dark:bg-teal-500/15 dark:text-teal-300",
@@ -852,7 +852,7 @@ const Xt = {
852
852
  project: "bg-fuchsia-50 text-fuchsia-800 dark:bg-fuchsia-500/15 dark:text-fuchsia-300"
853
853
  };
854
854
  function pe({ type: t }) {
855
- const s = Xt[t] ?? "bg-muted text-muted-foreground";
855
+ const s = Zt[t] ?? "bg-muted text-muted-foreground";
856
856
  return /* @__PURE__ */ e("span", { className: `inline-flex items-center rounded px-1.5 py-0.5 text-xs font-semibold ${s}`, children: t });
857
857
  }
858
858
  function Xe({ checked: t, onChange: s, disabled: a = !1 }) {
@@ -868,7 +868,7 @@ function Xe({ checked: t, onChange: s, disabled: a = !1 }) {
868
868
  className: "peer sr-only",
869
869
  checked: t,
870
870
  disabled: a,
871
- onChange: (r) => s(r.target.checked)
871
+ onChange: (i) => s(i.target.checked)
872
872
  }
873
873
  ),
874
874
  /* @__PURE__ */ e("span", { className: "absolute inset-0 rounded-full bg-input transition-colors peer-checked:bg-primary" }),
@@ -877,43 +877,43 @@ function Xe({ checked: t, onChange: s, disabled: a = !1 }) {
877
877
  }
878
878
  );
879
879
  }
880
- function Zt(t) {
880
+ function en(t) {
881
881
  const s = /* @__PURE__ */ new Map();
882
- for (const r of t) {
883
- const d = s.get(r.destConfigId);
884
- (!d || r.createdAt > d.createdAt) && s.set(r.destConfigId, r);
882
+ for (const i of t) {
883
+ const l = s.get(i.destConfigId);
884
+ (!l || i.createdAt > l.createdAt) && s.set(i.destConfigId, i);
885
885
  }
886
886
  const a = /* @__PURE__ */ new Map();
887
- for (const r of s.values())
888
- for (const d of r.results ?? []) {
889
- if (!d.itemKey)
887
+ for (const i of s.values())
888
+ for (const l of i.results ?? []) {
889
+ if (!l.itemKey)
890
890
  continue;
891
- let c = a.get(d.itemKey);
892
- c || (c = /* @__PURE__ */ new Map(), a.set(d.itemKey, c)), c.set(r.destConfigId, { ok: d.ok, error: d.error });
891
+ let c = a.get(l.itemKey);
892
+ c || (c = /* @__PURE__ */ new Map(), a.set(l.itemKey, c)), c.set(i.destConfigId, { ok: l.ok, error: l.error });
893
893
  }
894
894
  return a;
895
895
  }
896
- function en(t, s, a) {
897
- var r;
898
- return (r = t.get(s)) == null ? void 0 : r.get(a);
896
+ function tn(t, s, a) {
897
+ var i;
898
+ return (i = t.get(s)) == null ? void 0 : i.get(a);
899
899
  }
900
- function An(t, s) {
900
+ function Dn(t, s) {
901
901
  return t.filter((a) => !(s.type !== "all" && a.itemType !== s.type || s.included === "enabled" && (!a.included || a.ignored) || s.included === "disabled" && a.included && !a.ignored));
902
902
  }
903
- function tn(t) {
903
+ function nn(t) {
904
904
  const s = {};
905
905
  for (const a of t)
906
906
  s[a.itemType] = (s[a.itemType] ?? 0) + 1;
907
907
  return s;
908
908
  }
909
- function nn(t) {
910
- const s = t.indexOf(":"), a = s >= 0 ? t.slice(0, s) : t, r = s >= 0 ? t.slice(s + 1) : t;
909
+ function sn(t) {
910
+ const s = t.indexOf(":"), a = s >= 0 ? t.slice(0, s) : t, i = s >= 0 ? t.slice(s + 1) : t;
911
911
  return {
912
912
  id: "",
913
913
  releaseId: "",
914
914
  itemKey: t,
915
915
  itemType: a,
916
- itemName: r,
916
+ itemName: i,
917
917
  parentKey: null,
918
918
  selectedVersion: null,
919
919
  status: "updated",
@@ -925,95 +925,95 @@ function nn(t) {
925
925
  updatedAt: ""
926
926
  };
927
927
  }
928
- function sn(t) {
928
+ function an(t) {
929
929
  var c;
930
930
  const s = new Set(
931
- t.filter((l) => !l.parentKey).map((l) => l.itemKey)
932
- ), a = [], r = /* @__PURE__ */ new Map();
933
- for (const l of t) {
934
- if (l.parentKey)
931
+ t.filter((o) => !o.parentKey).map((o) => o.itemKey)
932
+ ), a = [], i = /* @__PURE__ */ new Map();
933
+ for (const o of t) {
934
+ if (o.parentKey)
935
935
  continue;
936
- const u = { item: l, children: [] };
937
- a.push(u), r.set(l.itemKey, u);
936
+ const u = { item: o, children: [] };
937
+ a.push(u), i.set(o.itemKey, u);
938
938
  }
939
- const d = /* @__PURE__ */ new Map();
940
- for (const l of t) {
941
- if (!l.parentKey)
939
+ const l = /* @__PURE__ */ new Map();
940
+ for (const o of t) {
941
+ if (!o.parentKey)
942
942
  continue;
943
- if (s.has(l.parentKey)) {
944
- (c = r.get(l.parentKey)) == null || c.children.push(l);
943
+ if (s.has(o.parentKey)) {
944
+ (c = i.get(o.parentKey)) == null || c.children.push(o);
945
945
  continue;
946
946
  }
947
- let u = d.get(l.parentKey);
948
- u || (u = { item: nn(l.parentKey), children: [], synthetic: !0 }, d.set(l.parentKey, u), a.push(u)), u.children.push(l);
947
+ let u = l.get(o.parentKey);
948
+ u || (u = { item: sn(o.parentKey), children: [], synthetic: !0 }, l.set(o.parentKey, u), a.push(u)), u.children.push(o);
949
949
  }
950
950
  return a;
951
951
  }
952
- function an(t) {
953
- const s = t.indexOf(":"), a = s >= 0 ? t.slice(0, s) : t, r = s >= 0 ? t.slice(s + 1) : t;
954
- return { itemKey: t, itemType: a, itemName: r, parentKey: null, cells: {} };
955
- }
956
952
  function rn(t) {
953
+ const s = t.indexOf(":"), a = s >= 0 ? t.slice(0, s) : t, i = s >= 0 ? t.slice(s + 1) : t;
954
+ return { itemKey: t, itemType: a, itemName: i, parentKey: null, cells: {} };
955
+ }
956
+ function ln(t) {
957
957
  var c;
958
958
  const s = new Set(
959
- t.filter((l) => !l.parentKey).map((l) => l.itemKey)
960
- ), a = [], r = /* @__PURE__ */ new Map();
961
- for (const l of t) {
962
- if (l.parentKey)
959
+ t.filter((o) => !o.parentKey).map((o) => o.itemKey)
960
+ ), a = [], i = /* @__PURE__ */ new Map();
961
+ for (const o of t) {
962
+ if (o.parentKey)
963
963
  continue;
964
- const u = { row: l, children: [] };
965
- a.push(u), r.set(l.itemKey, u);
964
+ const u = { row: o, children: [] };
965
+ a.push(u), i.set(o.itemKey, u);
966
966
  }
967
- const d = /* @__PURE__ */ new Map();
968
- for (const l of t) {
969
- if (!l.parentKey)
967
+ const l = /* @__PURE__ */ new Map();
968
+ for (const o of t) {
969
+ if (!o.parentKey)
970
970
  continue;
971
- if (s.has(l.parentKey)) {
972
- (c = r.get(l.parentKey)) == null || c.children.push(l);
971
+ if (s.has(o.parentKey)) {
972
+ (c = i.get(o.parentKey)) == null || c.children.push(o);
973
973
  continue;
974
974
  }
975
- let u = d.get(l.parentKey);
976
- u || (u = { row: an(l.parentKey), children: [], synthetic: !0 }, d.set(l.parentKey, u), a.push(u)), u.children.push(l);
975
+ let u = l.get(o.parentKey);
976
+ u || (u = { row: rn(o.parentKey), children: [], synthetic: !0 }, l.set(o.parentKey, u), a.push(u)), u.children.push(o);
977
977
  }
978
978
  return a;
979
979
  }
980
- function ln(t) {
980
+ function on(t) {
981
981
  let s = 0;
982
982
  for (const a of t.children)
983
983
  a.included && !a.ignored && (s += 1);
984
984
  return { included: s, total: t.children.length };
985
985
  }
986
- function on(t) {
987
- var r, d;
986
+ function dn(t) {
987
+ var i, l;
988
988
  const s = [];
989
989
  for (const c of t) {
990
990
  if (c.status !== "new")
991
991
  continue;
992
- const l = (r = c.diff) == null ? void 0 : r.origin, u = l == null ? void 0 : l.id;
992
+ const o = (i = c.diff) == null ? void 0 : i.origin, u = o == null ? void 0 : o.id;
993
993
  if (typeof u == "string" && u && s.push({ token: u, depKey: c.itemKey }), c.itemType === "enum") {
994
- const p = l == null ? void 0 : l.type;
994
+ const p = o == null ? void 0 : o.type;
995
995
  typeof p == "string" && p && s.push({ token: p, depKey: c.itemKey });
996
996
  }
997
997
  }
998
998
  const a = /* @__PURE__ */ new Map();
999
999
  for (const c of t) {
1000
- const l = /* @__PURE__ */ new Set(), u = JSON.stringify(((d = c.diff) == null ? void 0 : d.origin) ?? null);
1001
- for (const { token: p, depKey: v } of s)
1002
- v !== c.itemKey && u.includes(p) && l.add(v);
1003
- a.set(c.itemKey, l);
1000
+ const o = /* @__PURE__ */ new Set(), u = JSON.stringify(((l = c.diff) == null ? void 0 : l.origin) ?? null);
1001
+ for (const { token: p, depKey: w } of s)
1002
+ w !== c.itemKey && u.includes(p) && o.add(w);
1003
+ a.set(c.itemKey, o);
1004
1004
  }
1005
1005
  return a;
1006
1006
  }
1007
1007
  function Te(t, s, a) {
1008
- const r = s.get(t.itemKey);
1009
- if (!r || r.size === 0)
1008
+ const i = s.get(t.itemKey);
1009
+ if (!i || i.size === 0)
1010
1010
  return [];
1011
- const d = [];
1012
- for (const c of r) {
1013
- const l = a.get(c);
1014
- l && l.status === "new" && (!l.included || l.ignored) && d.push(l);
1011
+ const l = [];
1012
+ for (const c of i) {
1013
+ const o = a.get(c);
1014
+ o && o.status === "new" && (!o.included || o.ignored) && l.push(o);
1015
1015
  }
1016
- return d;
1016
+ return l;
1017
1017
  }
1018
1018
  const Ze = [
1019
1019
  "blueprint",
@@ -1045,14 +1045,14 @@ function qe(t, s) {
1045
1045
  const a = et(t) - et(s);
1046
1046
  return a !== 0 ? a : t.localeCompare(s);
1047
1047
  }
1048
- function dn(t) {
1048
+ function cn(t) {
1049
1049
  return t.tags + t.metadataKeys + t.i18nPaths + t.permissions;
1050
1050
  }
1051
- function cn(t) {
1051
+ function un(t) {
1052
1052
  const s = [];
1053
1053
  return t.tags > 0 && s.push(`${t.tags} tag${t.tags === 1 ? "" : "s"}`), t.metadataKeys > 0 && s.push(`${t.metadataKeys} metadata key${t.metadataKeys === 1 ? "" : "s"}`), t.i18nPaths > 0 && s.push(`${t.i18nPaths} translation${t.i18nPaths === 1 ? "" : "s"}`), t.permissions > 0 && s.push(`${t.permissions} permission${t.permissions === 1 ? "" : "s"}`), s.length === 0 ? "" : `${s.join(", ")} excluded from push`;
1054
1054
  }
1055
- const un = [
1055
+ const mn = [
1056
1056
  { value: "all", label: "All" },
1057
1057
  { value: "enabled", label: "Enabled" },
1058
1058
  { value: "disabled", label: "Disabled" }
@@ -1063,7 +1063,7 @@ function tt(t, s) {
1063
1063
  function nt({ status: t }) {
1064
1064
  return /* @__PURE__ */ e("span", { className: "inline-flex items-center rounded px-1.5 py-0.5 text-xs font-medium border bg-muted text-muted-foreground border-border", children: t });
1065
1065
  }
1066
- function X(t) {
1066
+ function Z(t) {
1067
1067
  if (Array.isArray(t))
1068
1068
  return t.filter((s) => typeof s == "string");
1069
1069
  if (typeof t == "string" && t.length > 0)
@@ -1077,15 +1077,15 @@ function X(t) {
1077
1077
  }
1078
1078
  function st({ item: t }) {
1079
1079
  const s = {
1080
- tags: X(t.excludedTags).length,
1081
- metadataKeys: X(t.excludedMetadataKeys).length,
1082
- i18nPaths: X(t.excludedI18nPaths).length,
1083
- permissions: X(t.excludedPermissions).length
1084
- }, a = dn(s);
1080
+ tags: Z(t.excludedTags).length,
1081
+ metadataKeys: Z(t.excludedMetadataKeys).length,
1082
+ i18nPaths: Z(t.excludedI18nPaths).length,
1083
+ permissions: Z(t.excludedPermissions).length
1084
+ }, a = cn(s);
1085
1085
  return a <= 0 ? null : /* @__PURE__ */ n(
1086
1086
  "span",
1087
1087
  {
1088
- title: cn(s),
1088
+ title: un(s),
1089
1089
  className: "inline-flex items-center rounded px-1.5 py-0.5 text-xs bg-red-100 text-red-700 dark:bg-red-500/15 dark:text-red-300",
1090
1090
  children: [
1091
1091
  a,
@@ -1099,139 +1099,139 @@ function at({
1099
1099
  item: t,
1100
1100
  targetConfigIds: s,
1101
1101
  results: a,
1102
- pushedDests: r,
1103
- displayName: d
1102
+ pushedDests: i,
1103
+ displayName: l
1104
1104
  }) {
1105
- const c = t.included && !t.ignored, l = s.filter((u) => r.has(u)).map((u) => ({ id: u, result: en(a, t.itemKey, u) })).filter((u) => u.result != null || c);
1106
- return l.length === 0 ? null : /* @__PURE__ */ e("div", { className: "flex flex-wrap justify-end gap-1", children: l.map(({ id: u, result: p }) => {
1107
- const v = p ? p.ok ? "bg-green-100 text-green-700 dark:bg-green-500/15 dark:text-green-300" : "bg-red-100 text-red-700 dark:bg-red-500/15 dark:text-red-300" : "bg-muted text-muted-foreground", k = p ? p.ok ? "✓" : "✗" : "=", o = p ? p.ok ? void 0 : p.error : "No change — already in sync";
1105
+ const c = t.included && !t.ignored, o = s.filter((u) => i.has(u)).map((u) => ({ id: u, result: tn(a, t.itemKey, u) })).filter((u) => u.result != null || c);
1106
+ return o.length === 0 ? null : /* @__PURE__ */ e("div", { className: "flex flex-wrap justify-end gap-1", children: o.map(({ id: u, result: p }) => {
1107
+ const w = p ? p.ok ? "bg-green-100 text-green-700 dark:bg-green-500/15 dark:text-green-300" : "bg-red-100 text-red-700 dark:bg-red-500/15 dark:text-red-300" : "bg-muted text-muted-foreground", v = p ? p.ok ? "✓" : "✗" : "=", d = p ? p.ok ? void 0 : p.error : "No change — already in sync";
1108
1108
  return /* @__PURE__ */ n(
1109
1109
  "span",
1110
1110
  {
1111
- title: o,
1112
- className: `inline-flex items-center gap-1 rounded-full px-1.5 py-0.5 text-[10px] font-semibold ${v}`,
1111
+ title: d,
1112
+ className: `inline-flex items-center gap-1 rounded-full px-1.5 py-0.5 text-[10px] font-semibold ${w}`,
1113
1113
  children: [
1114
- d(u),
1114
+ l(u),
1115
1115
  " ",
1116
- k
1116
+ v
1117
1117
  ]
1118
1118
  },
1119
1119
  u
1120
1120
  );
1121
1121
  }) });
1122
1122
  }
1123
- function mn({ releaseId: t, onBack: s }) {
1124
- var Je, Qe, Le;
1125
- const a = ze.get("Release", "apiPath", "/releases"), { toast: r } = oe(), { fetchJson: d } = se(), { configs: c } = ye(), l = de(), [u, p] = M("all"), [v, k] = M("all"), [o, h] = M(null), [R, F] = M(!1), [z, Q] = M(() => /* @__PURE__ */ new Set()), H = (i) => Q((N) => {
1123
+ function hn({ releaseId: t, onBack: s }) {
1124
+ var Je, Le, Qe;
1125
+ const a = ze.get("Release", "apiPath", "/releases"), { toast: i } = le(), { fetchJson: l } = ne(), { configs: c } = ye(), o = oe(), [u, p] = A("all"), [w, v] = A("all"), [d, h] = A(null), [E, z] = A(!1), [j, H] = A(() => /* @__PURE__ */ new Set()), _ = (r) => H((N) => {
1126
1126
  const m = new Set(N);
1127
- return m.has(i) ? m.delete(i) : m.add(i), m;
1128
- }), B = ["imaginarium", "release", t], D = ["imaginarium", "release-items", t], q = ["imaginarium", "release-pushes", t], { data: y, isLoading: w } = le({
1129
- queryKey: B,
1130
- queryFn: () => d(`${a}/${t}`)
1131
- }), { data: C, isLoading: x } = le({
1127
+ return m.has(r) ? m.delete(r) : m.add(r), m;
1128
+ }), J = ["imaginarium", "release", t], D = ["imaginarium", "release-items", t], L = ["imaginarium", "release-pushes", t], { data: x, isLoading: k } = re({
1129
+ queryKey: J,
1130
+ queryFn: () => l(`${a}/${t}`)
1131
+ }), { data: C, isLoading: g } = re({
1132
1132
  queryKey: D,
1133
1133
  queryFn: async () => {
1134
- const i = await d(`${a}/${t}/items`);
1135
- return Array.isArray(i) ? i : (i == null ? void 0 : i.items) ?? [];
1134
+ const r = await l(`${a}/${t}/items`);
1135
+ return Array.isArray(r) ? r : (r == null ? void 0 : r.items) ?? [];
1136
1136
  }
1137
- }), { data: O } = le({
1138
- queryKey: q,
1137
+ }), { data: R } = re({
1138
+ queryKey: L,
1139
1139
  queryFn: async () => {
1140
- const i = await d(`${a}/${t}/pushes`);
1141
- return Array.isArray(i) ? i : (i == null ? void 0 : i.items) ?? [];
1140
+ const r = await l(`${a}/${t}/pushes`);
1141
+ return Array.isArray(r) ? r : (r == null ? void 0 : r.items) ?? [];
1142
1142
  }
1143
- }), J = j(() => Zt(O ?? []), [O]), W = j(
1144
- () => new Set((O ?? []).map((i) => i.destConfigId)),
1145
- [O]
1146
- ), Z = (O ?? []).length > 0, G = j(() => (y == null ? void 0 : y.targetConfigIds) ?? [], [y]), f = j(() => {
1147
- const i = /* @__PURE__ */ new Map();
1148
- return c.forEach((N) => i.set(String(N.id), N.displayName)), i;
1149
- }, [c]), A = (i) => f.get(i) ?? i, I = j(() => sn(C ?? []), [C]), L = j(() => I.map((i) => i.item), [I]), V = j(() => on(C ?? []), [C]), g = j(
1150
- () => new Map((C ?? []).map((i) => [i.itemKey, i])),
1143
+ }), Q = B(() => en(R ?? []), [R]), X = B(
1144
+ () => new Set((R ?? []).map((r) => r.destConfigId)),
1145
+ [R]
1146
+ ), G = (R ?? []).length > 0, f = B(() => (x == null ? void 0 : x.targetConfigIds) ?? [], [x]), q = B(() => {
1147
+ const r = /* @__PURE__ */ new Map();
1148
+ return c.forEach((N) => r.set(String(N.id), N.displayName)), r;
1149
+ }, [c]), F = (r) => q.get(r) ?? r, I = B(() => an(C ?? []), [C]), V = B(() => I.map((r) => r.item), [I]), M = B(() => dn(C ?? []), [C]), y = B(
1150
+ () => new Map((C ?? []).map((r) => [r.itemKey, r])),
1151
1151
  [C]
1152
- ), E = (i) => {
1152
+ ), O = (r) => {
1153
1153
  var m;
1154
1154
  let N;
1155
- if (i.parentKey) {
1156
- const K = (m = g.get(i.parentKey)) == null ? void 0 : m.itemName, S = i.parentKey.indexOf(":");
1157
- N = K ?? (S >= 0 ? i.parentKey.slice(S + 1) : void 0);
1155
+ if (r.parentKey) {
1156
+ const K = (m = y.get(r.parentKey)) == null ? void 0 : m.itemName, T = r.parentKey.indexOf(":");
1157
+ N = K ?? (T >= 0 ? r.parentKey.slice(T + 1) : void 0);
1158
1158
  }
1159
- return `${N ? N + " " : ""}${i.itemType} "${i.itemName}"`;
1160
- }, T = j(() => {
1159
+ return `${N ? N + " " : ""}${r.itemType} "${r.itemName}"`;
1160
+ }, S = B(() => {
1161
1161
  var N, m;
1162
- const i = /* @__PURE__ */ new Map();
1162
+ const r = /* @__PURE__ */ new Map();
1163
1163
  for (const K of C ?? []) {
1164
- const S = (m = (N = K.diff) == null ? void 0 : N.origin) == null ? void 0 : m.id;
1165
- typeof S == "string" && S && i.set(S, K.itemName);
1164
+ const T = (m = (N = K.diff) == null ? void 0 : N.origin) == null ? void 0 : m.id;
1165
+ typeof T == "string" && T && r.set(T, K.itemName);
1166
1166
  }
1167
- return i;
1168
- }, [C]), ee = j(
1169
- () => (C ?? []).filter((i) => i.included && !i.ignored).map((i) => ({
1170
- itemName: i.itemName,
1171
- missing: Te(i, V, g).map(E)
1172
- })).filter((i) => i.missing.length > 0),
1167
+ return r;
1168
+ }, [C]), de = B(
1169
+ () => (C ?? []).filter((r) => r.included && !r.ignored).map((r) => ({
1170
+ itemName: r.itemName,
1171
+ missing: Te(r, M, y).map(O)
1172
+ })).filter((r) => r.missing.length > 0),
1173
1173
  // eslint-disable-next-line react-hooks/exhaustive-deps
1174
- [C, V, g]
1175
- ), ue = j(() => tn(L), [L]), Ne = j(() => Object.keys(ue).sort(qe), [ue]), _ = j(() => I.filter((i) => u === "all" || i.item.itemType === u).map((i) => {
1176
- const N = v === "all" ? i.children : i.children.filter((m) => tt(m, v));
1177
- return { node: i, renderChildren: N };
1174
+ [C, M, y]
1175
+ ), ue = B(() => nn(V), [V]), Ne = B(() => Object.keys(ue).sort(qe), [ue]), Y = B(() => I.filter((r) => u === "all" || r.item.itemType === u).map((r) => {
1176
+ const N = w === "all" ? r.children : r.children.filter((m) => tt(m, w));
1177
+ return { node: r, renderChildren: N };
1178
1178
  }).filter(
1179
- ({ node: i, renderChildren: N }) => v === "all" || tt(i.item, v) || N.length > 0
1180
- ).sort((i, N) => {
1181
- const m = qe(i.node.item.itemType, N.node.item.itemType);
1182
- return m !== 0 ? m : i.node.item.itemName.localeCompare(N.node.item.itemName);
1183
- }), [I, u, v]), te = U({
1184
- mutationFn: () => d(`${a}/${t}/refresh`, { method: "POST" }),
1179
+ ({ node: r, renderChildren: N }) => w === "all" || tt(r.item, w) || N.length > 0
1180
+ ).sort((r, N) => {
1181
+ const m = qe(r.node.item.itemType, N.node.item.itemType);
1182
+ return m !== 0 ? m : r.node.item.itemName.localeCompare(N.node.item.itemName);
1183
+ }), [I, u, w]), ee = U({
1184
+ mutationFn: () => l(`${a}/${t}/refresh`, { method: "POST" }),
1185
1185
  onSuccess: () => {
1186
- l.invalidateQueries({ queryKey: D }), r({ title: "Snapshot refreshed", description: "Items re-computed from origin." });
1186
+ o.invalidateQueries({ queryKey: D }), i({ title: "Snapshot refreshed", description: "Items re-computed from origin." });
1187
1187
  },
1188
- onError: (i) => {
1189
- r({ title: "Error", description: i.message, variant: "destructive" });
1188
+ onError: (r) => {
1189
+ i({ title: "Error", description: r.message, variant: "destructive" });
1190
1190
  }
1191
1191
  }), ve = U({
1192
- mutationFn: ({ itemId: i, included: N }) => d(`${a}/${t}/items/${i}`, {
1192
+ mutationFn: ({ itemId: r, included: N }) => l(`${a}/${t}/items/${r}`, {
1193
1193
  method: "PATCH",
1194
1194
  body: JSON.stringify({ included: N })
1195
1195
  }),
1196
1196
  onSuccess: () => {
1197
- l.invalidateQueries({ queryKey: D });
1197
+ o.invalidateQueries({ queryKey: D });
1198
1198
  },
1199
- onError: (i) => {
1200
- r({ title: "Error", description: i.message, variant: "destructive" });
1199
+ onError: (r) => {
1200
+ i({ title: "Error", description: r.message, variant: "destructive" });
1201
1201
  }
1202
1202
  }), Be = U({
1203
- mutationFn: ({ itemId: i, selectedVersion: N }) => d(`${a}/${t}/items/${i}`, {
1203
+ mutationFn: ({ itemId: r, selectedVersion: N }) => l(`${a}/${t}/items/${r}`, {
1204
1204
  method: "PATCH",
1205
1205
  body: JSON.stringify({ selectedVersion: N })
1206
1206
  }),
1207
1207
  onSuccess: () => {
1208
- l.invalidateQueries({ queryKey: D });
1208
+ o.invalidateQueries({ queryKey: D });
1209
1209
  },
1210
- onError: (i) => {
1211
- r({ title: "Error", description: i.message, variant: "destructive" });
1210
+ onError: (r) => {
1211
+ i({ title: "Error", description: r.message, variant: "destructive" });
1212
1212
  }
1213
- }), we = (i) => ({
1214
- mutationFn: ({ itemId: N, value: m }) => d(`${a}/${t}/items/${N}`, {
1213
+ }), we = (r) => ({
1214
+ mutationFn: ({ itemId: N, value: m }) => l(`${a}/${t}/items/${N}`, {
1215
1215
  method: "PATCH",
1216
- body: JSON.stringify({ [i]: m })
1216
+ body: JSON.stringify({ [r]: m })
1217
1217
  }),
1218
1218
  onMutate: async ({ itemId: N, value: m }) => {
1219
- await l.cancelQueries({ queryKey: D });
1220
- const K = l.getQueryData(D);
1221
- return l.setQueryData(
1219
+ await o.cancelQueries({ queryKey: D });
1220
+ const K = o.getQueryData(D);
1221
+ return o.setQueryData(
1222
1222
  D,
1223
- (S) => (S ?? []).map((ae) => ae.id === N ? { ...ae, [i]: m } : ae)
1223
+ (T) => (T ?? []).map((se) => se.id === N ? { ...se, [r]: m } : se)
1224
1224
  ), { prev: K };
1225
1225
  },
1226
1226
  onError: (N, m, K) => {
1227
- K != null && K.prev && l.setQueryData(D, K.prev), r({ title: "Error", description: N.message, variant: "destructive" });
1227
+ K != null && K.prev && o.setQueryData(D, K.prev), i({ title: "Error", description: N.message, variant: "destructive" });
1228
1228
  },
1229
1229
  onSettled: () => {
1230
- l.invalidateQueries({ queryKey: D });
1230
+ o.invalidateQueries({ queryKey: D });
1231
1231
  }
1232
- }), yt = U(we("excludedTags")), bt = U(we("excludedMetadataKeys")), Nt = U(we("excludedI18nPaths")), vt = U(we("excludedPermissions")), wt = () => l.invalidateQueries({ queryKey: D }), ne = (y == null ? void 0 : y.status) === "pushed", b = o ? g.get(o.itemKey) ?? o : null;
1233
- return w ? /* @__PURE__ */ e("div", { className: "text-center text-muted-foreground py-8", children: "Loading…" }) : y ? /* @__PURE__ */ n("div", { className: "space-y-4", children: [
1234
- ne && /* @__PURE__ */ e("div", { className: "bg-muted text-muted-foreground rounded-md px-3 py-2 text-sm", children: "This release was pushed and is read-only." }),
1232
+ }), bt = U(we("excludedTags")), Nt = U(we("excludedMetadataKeys")), vt = U(we("excludedI18nPaths")), wt = U(we("excludedPermissions")), kt = () => o.invalidateQueries({ queryKey: D }), te = (x == null ? void 0 : x.status) === "pushed", b = d ? y.get(d.itemKey) ?? d : null;
1233
+ return k ? /* @__PURE__ */ e("div", { className: "text-center text-muted-foreground py-8", children: "Loading…" }) : x ? /* @__PURE__ */ n("div", { className: "space-y-4", children: [
1234
+ te && /* @__PURE__ */ e("div", { className: "bg-muted text-muted-foreground rounded-md px-3 py-2 text-sm", children: "This release was pushed and is read-only." }),
1235
1235
  /* @__PURE__ */ n("div", { className: "space-y-3", children: [
1236
1236
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
1237
1237
  /* @__PURE__ */ n("div", { className: "flex items-center gap-3", children: [
@@ -1239,16 +1239,16 @@ function mn({ releaseId: t, onBack: s }) {
1239
1239
  /* @__PURE__ */ e(We, {}),
1240
1240
  "Back"
1241
1241
  ] }),
1242
- /* @__PURE__ */ e("h3", { className: "text-lg font-semibold", children: y.name }),
1243
- /* @__PURE__ */ e(gt, { status: y.status })
1242
+ /* @__PURE__ */ e("h3", { className: "text-lg font-semibold", children: x.name }),
1243
+ /* @__PURE__ */ e(xt, { status: x.status })
1244
1244
  ] }),
1245
1245
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
1246
- !ne && /* @__PURE__ */ e(
1247
- Ut,
1246
+ !te && /* @__PURE__ */ e(
1247
+ Ht,
1248
1248
  {
1249
1249
  releaseId: t,
1250
1250
  apiPath: a,
1251
- onReset: wt
1251
+ onReset: kt
1252
1252
  }
1253
1253
  ),
1254
1254
  /* @__PURE__ */ n(
@@ -1256,36 +1256,36 @@ function mn({ releaseId: t, onBack: s }) {
1256
1256
  {
1257
1257
  variant: "outline",
1258
1258
  size: "sm",
1259
- onClick: () => te.mutate(),
1260
- disabled: ne || te.isPending,
1259
+ onClick: () => ee.mutate(),
1260
+ disabled: te || ee.isPending,
1261
1261
  children: [
1262
- /* @__PURE__ */ e(pt, {}),
1263
- te.isPending ? "Refreshing…" : "Refresh"
1262
+ /* @__PURE__ */ e(ft, {}),
1263
+ ee.isPending ? "Refreshing…" : "Refresh"
1264
1264
  ]
1265
1265
  }
1266
1266
  ),
1267
- ne ? /* @__PURE__ */ e($, { size: "sm", disabled: !0, children: "Pushed ✓" }) : /* @__PURE__ */ e(
1267
+ te ? /* @__PURE__ */ e($, { size: "sm", disabled: !0, children: "Pushed ✓" }) : /* @__PURE__ */ e(
1268
1268
  $,
1269
1269
  {
1270
1270
  size: "sm",
1271
- onClick: () => F(!0),
1272
- disabled: (y.targetConfigIds ?? []).length === 0,
1271
+ onClick: () => z(!0),
1272
+ disabled: (x.targetConfigIds ?? []).length === 0,
1273
1273
  children: "Push"
1274
1274
  }
1275
1275
  )
1276
1276
  ] })
1277
1277
  ] }),
1278
1278
  /* @__PURE__ */ n("div", { className: "flex flex-wrap items-center gap-2 text-sm text-muted-foreground", children: [
1279
- /* @__PURE__ */ e("span", { className: "inline-flex items-center rounded bg-muted px-1.5 py-0.5 text-xs", children: A(y.originConfigId) }),
1279
+ /* @__PURE__ */ e("span", { className: "inline-flex items-center rounded bg-muted px-1.5 py-0.5 text-xs", children: F(x.originConfigId) }),
1280
1280
  /* @__PURE__ */ e("span", { children: "→" }),
1281
- (y.targetConfigIds ?? []).map((i) => /* @__PURE__ */ e("span", { className: "inline-flex items-center rounded bg-muted px-1.5 py-0.5 text-xs", children: A(i) }, i)),
1281
+ (x.targetConfigIds ?? []).map((r) => /* @__PURE__ */ e("span", { className: "inline-flex items-center rounded bg-muted px-1.5 py-0.5 text-xs", children: F(r) }, r)),
1282
1282
  /* @__PURE__ */ n("span", { className: "ml-2", children: [
1283
1283
  "Snapshot: ",
1284
- y.snapshotAt ? new Date(y.snapshotAt).toLocaleString() : "—"
1284
+ x.snapshotAt ? new Date(x.snapshotAt).toLocaleString() : "—"
1285
1285
  ] }),
1286
1286
  /* @__PURE__ */ n("span", { children: [
1287
1287
  "Pushed: ",
1288
- y.pushedAt ? new Date(y.pushedAt).toLocaleString() : "—"
1288
+ x.pushedAt ? new Date(x.pushedAt).toLocaleString() : "—"
1289
1289
  ] })
1290
1290
  ] })
1291
1291
  ] }),
@@ -1299,40 +1299,40 @@ function mn({ releaseId: t, onBack: s }) {
1299
1299
  onClick: () => p("all"),
1300
1300
  children: [
1301
1301
  "All types (",
1302
- L.length,
1302
+ V.length,
1303
1303
  ")"
1304
1304
  ]
1305
1305
  }
1306
1306
  ),
1307
- Ne.map((i) => /* @__PURE__ */ n(
1307
+ Ne.map((r) => /* @__PURE__ */ n(
1308
1308
  $,
1309
1309
  {
1310
- variant: u === i ? "secondary" : "ghost",
1310
+ variant: u === r ? "secondary" : "ghost",
1311
1311
  size: "sm",
1312
- onClick: () => p(i),
1312
+ onClick: () => p(r),
1313
1313
  children: [
1314
- i,
1314
+ r,
1315
1315
  " (",
1316
- ue[i],
1316
+ ue[r],
1317
1317
  ")"
1318
1318
  ]
1319
1319
  },
1320
- i
1320
+ r
1321
1321
  ))
1322
1322
  ] }),
1323
- /* @__PURE__ */ e("div", { className: "flex flex-wrap items-center gap-1", children: un.map((i) => /* @__PURE__ */ e(
1323
+ /* @__PURE__ */ e("div", { className: "flex flex-wrap items-center gap-1", children: mn.map((r) => /* @__PURE__ */ e(
1324
1324
  $,
1325
1325
  {
1326
- variant: v === i.value ? "secondary" : "outline",
1326
+ variant: w === r.value ? "secondary" : "outline",
1327
1327
  size: "sm",
1328
- onClick: () => k(i.value),
1329
- children: i.label
1328
+ onClick: () => v(r.value),
1329
+ children: r.label
1330
1330
  },
1331
- i.value
1331
+ r.value
1332
1332
  )) })
1333
1333
  ] }),
1334
1334
  /* @__PURE__ */ n("div", { className: "flex gap-4", children: [
1335
- /* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: x ? /* @__PURE__ */ e("div", { className: "text-center text-muted-foreground py-8", children: "Loading items…" }) : _.length === 0 ? /* @__PURE__ */ e(Se, { children: /* @__PURE__ */ e(Pe, { className: "py-12 text-center text-muted-foreground", children: L.length === 0 ? "No items in this release yet." : "No items match the current filters." }) }) : /* @__PURE__ */ e(Se, { children: /* @__PURE__ */ e(Pe, { className: "p-0", children: /* @__PURE__ */ n("table", { className: "w-full text-sm", children: [
1335
+ /* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: g ? /* @__PURE__ */ e("div", { className: "text-center text-muted-foreground py-8", children: "Loading items…" }) : Y.length === 0 ? /* @__PURE__ */ e(Se, { children: /* @__PURE__ */ e(Pe, { className: "py-12 text-center text-muted-foreground", children: V.length === 0 ? "No items in this release yet." : "No items match the current filters." }) }) : /* @__PURE__ */ e(Se, { children: /* @__PURE__ */ e(Pe, { className: "p-0", children: /* @__PURE__ */ n("table", { className: "w-full text-sm", children: [
1336
1336
  /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ n("tr", { className: "border-b text-left text-muted-foreground", children: [
1337
1337
  /* @__PURE__ */ e("th", { className: "p-3 font-medium w-10", children: "Inc." }),
1338
1338
  /* @__PURE__ */ e("th", { className: "p-3 font-medium", children: "Type" }),
@@ -1340,15 +1340,15 @@ function mn({ releaseId: t, onBack: s }) {
1340
1340
  /* @__PURE__ */ e("th", { className: "p-3 font-medium", children: "Status" }),
1341
1341
  /* @__PURE__ */ e("th", { className: "p-3 font-medium" })
1342
1342
  ] }) }),
1343
- /* @__PURE__ */ e("tbody", { children: _.map(({ node: i, renderChildren: N }) => {
1343
+ /* @__PURE__ */ e("tbody", { children: Y.map(({ node: r, renderChildren: N }) => {
1344
1344
  var Ye;
1345
- const m = i.item, K = N.length > 0, S = z.has(m.itemKey) || v !== "all", ae = z.has(m.itemKey), ie = ln(i), Ve = ((Ye = m.diff) == null ? void 0 : Ye.versions) ?? [], me = m.itemType === "rule" && Ve.length > 0, Ue = Ve.some((P) => P.isPublished), kt = me ? Wt(m) : [], He = me && !Ue, _e = me && Ue && kt.length === 0, ke = He || _e, Ct = me && !ke && m.selectedVersion == null;
1346
- return /* @__PURE__ */ n(ct, { children: [
1347
- i.synthetic ? /* @__PURE__ */ n(
1345
+ const m = r.item, K = N.length > 0, T = j.has(m.itemKey) || w !== "all", se = j.has(m.itemKey), ae = on(r), Ve = ((Ye = m.diff) == null ? void 0 : Ye.versions) ?? [], me = m.itemType === "rule" && Ve.length > 0, Ue = Ve.some((P) => P.isPublished), Ct = me ? Gt(m) : [], He = me && !Ue, _e = me && Ue && Ct.length === 0, ke = He || _e, Tt = me && !ke && m.selectedVersion == null;
1346
+ return /* @__PURE__ */ n(ut, { children: [
1347
+ r.synthetic ? /* @__PURE__ */ n(
1348
1348
  "tr",
1349
1349
  {
1350
1350
  className: "border-b last:border-0 cursor-pointer hover:bg-muted/50",
1351
- onClick: () => H(m.itemKey),
1351
+ onClick: () => _(m.itemKey),
1352
1352
  children: [
1353
1353
  /* @__PURE__ */ e("td", { className: "p-3" }),
1354
1354
  /* @__PURE__ */ e("td", { className: "p-3", children: /* @__PURE__ */ e(pe, { type: m.itemType }) }),
@@ -1359,17 +1359,17 @@ function mn({ releaseId: t, onBack: s }) {
1359
1359
  type: "button",
1360
1360
  className: "text-muted-foreground hover:text-foreground",
1361
1361
  onClick: (P) => {
1362
- P.stopPropagation(), H(m.itemKey);
1362
+ P.stopPropagation(), _(m.itemKey);
1363
1363
  },
1364
- "aria-label": ae ? "Collapse" : "Expand",
1365
- children: ae ? /* @__PURE__ */ e(ge, { size: 14 }) : /* @__PURE__ */ e(xe, { size: 14 })
1364
+ "aria-label": se ? "Collapse" : "Expand",
1365
+ children: se ? /* @__PURE__ */ e(ge, { size: 14 }) : /* @__PURE__ */ e(xe, { size: 14 })
1366
1366
  }
1367
1367
  ),
1368
1368
  /* @__PURE__ */ e("span", { className: "font-medium", children: m.itemName }),
1369
- /* @__PURE__ */ n("span", { className: `inline-flex items-center rounded px-1.5 py-0.5 text-xs ${ie.included < ie.total ? "bg-amber-100 text-amber-700 font-medium dark:bg-amber-500/15 dark:text-amber-300" : "bg-muted text-muted-foreground"}`, children: [
1370
- ie.included,
1369
+ /* @__PURE__ */ n("span", { className: `inline-flex items-center rounded px-1.5 py-0.5 text-xs ${ae.included < ae.total ? "bg-amber-100 text-amber-700 font-medium dark:bg-amber-500/15 dark:text-amber-300" : "bg-muted text-muted-foreground"}`, children: [
1370
+ ae.included,
1371
1371
  "/",
1372
- ie.total,
1372
+ ae.total,
1373
1373
  " changes included"
1374
1374
  ] })
1375
1375
  ] }) }),
@@ -1380,14 +1380,14 @@ function mn({ releaseId: t, onBack: s }) {
1380
1380
  ) : /* @__PURE__ */ n(
1381
1381
  "tr",
1382
1382
  {
1383
- className: `border-b last:border-0 cursor-pointer hover:bg-muted/50 ${(o == null ? void 0 : o.id) === m.id ? "bg-muted/50" : ""} ${ke ? "opacity-60" : ""}`,
1383
+ className: `border-b last:border-0 cursor-pointer hover:bg-muted/50 ${(d == null ? void 0 : d.id) === m.id ? "bg-muted/50" : ""} ${ke ? "opacity-60" : ""}`,
1384
1384
  onClick: () => h(m),
1385
1385
  children: [
1386
1386
  /* @__PURE__ */ e("td", { className: "p-3", onClick: (P) => P.stopPropagation(), children: /* @__PURE__ */ e(
1387
1387
  Xe,
1388
1388
  {
1389
1389
  checked: m.included,
1390
- disabled: m.ignored || ve.isPending || ne || ke,
1390
+ disabled: m.ignored || ve.isPending || te || ke,
1391
1391
  onChange: (P) => ve.mutate({ itemId: m.id, included: P })
1392
1392
  }
1393
1393
  ) }),
@@ -1399,66 +1399,66 @@ function mn({ releaseId: t, onBack: s }) {
1399
1399
  type: "button",
1400
1400
  className: "text-muted-foreground hover:text-foreground",
1401
1401
  onClick: (P) => {
1402
- P.stopPropagation(), H(m.itemKey);
1402
+ P.stopPropagation(), _(m.itemKey);
1403
1403
  },
1404
- "aria-label": ae ? "Collapse" : "Expand",
1405
- children: ae ? /* @__PURE__ */ e(ge, { size: 14 }) : /* @__PURE__ */ e(xe, { size: 14 })
1404
+ "aria-label": se ? "Collapse" : "Expand",
1405
+ children: se ? /* @__PURE__ */ e(ge, { size: 14 }) : /* @__PURE__ */ e(xe, { size: 14 })
1406
1406
  }
1407
1407
  ) : null,
1408
1408
  /* @__PURE__ */ e("span", { className: "font-medium", children: m.itemName }),
1409
1409
  (() => {
1410
1410
  if (!m.included || m.ignored)
1411
1411
  return null;
1412
- const P = Te(m, V, g);
1413
- return P.length === 0 ? null : /* @__PURE__ */ e("span", { title: `Depends on excluded: ${P.map((Y) => Y.itemName).join(", ")}`, children: /* @__PURE__ */ e(fe, { size: 14, className: "shrink-0 text-amber-600" }) });
1412
+ const P = Te(m, M, y);
1413
+ return P.length === 0 ? null : /* @__PURE__ */ e("span", { title: `Depends on excluded: ${P.map((W) => W.itemName).join(", ")}`, children: /* @__PURE__ */ e(fe, { size: 14, className: "shrink-0 text-amber-600" }) });
1414
1414
  })(),
1415
1415
  /* @__PURE__ */ e(st, { item: m }),
1416
- K ? /* @__PURE__ */ n("span", { className: `inline-flex items-center rounded px-1.5 py-0.5 text-xs ${ie.included < ie.total ? "bg-amber-100 text-amber-700 font-medium dark:bg-amber-500/15 dark:text-amber-300" : "bg-muted text-muted-foreground"}`, children: [
1417
- ie.included,
1416
+ K ? /* @__PURE__ */ n("span", { className: `inline-flex items-center rounded px-1.5 py-0.5 text-xs ${ae.included < ae.total ? "bg-amber-100 text-amber-700 font-medium dark:bg-amber-500/15 dark:text-amber-300" : "bg-muted text-muted-foreground"}`, children: [
1417
+ ae.included,
1418
1418
  "/",
1419
- ie.total,
1419
+ ae.total,
1420
1420
  " changes included"
1421
1421
  ] }) : null,
1422
- m.carriedOver ? /* @__PURE__ */ e(Qt, { originName: A(y.originConfigId) }) : null,
1423
- m.ignored ? /* @__PURE__ */ e(Lt, {}) : null,
1422
+ m.carriedOver ? /* @__PURE__ */ e(Qt, { originName: F(x.originConfigId) }) : null,
1423
+ m.ignored ? /* @__PURE__ */ e(Vt, {}) : null,
1424
1424
  me && !ke ? /* @__PURE__ */ e("span", { onClick: (P) => P.stopPropagation(), children: /* @__PURE__ */ e(
1425
- Gt,
1425
+ Xt,
1426
1426
  {
1427
1427
  item: m,
1428
- disabled: ne || Be.isPending,
1428
+ disabled: te || Be.isPending,
1429
1429
  onChange: (P) => Be.mutate({ itemId: m.id, selectedVersion: P })
1430
1430
  }
1431
1431
  ) }) : null,
1432
1432
  He ? /* @__PURE__ */ e("span", { className: "text-xs text-muted-foreground", children: "Rules without a published version cannot be pushed" }) : null,
1433
1433
  _e ? /* @__PURE__ */ e("span", { className: "text-xs text-muted-foreground", children: "Nothing to push — all versions exist on target" }) : null,
1434
- Ct ? /* @__PURE__ */ e("span", { className: "text-xs text-amber-600", children: "Pushable version not selected" }) : null
1434
+ Tt ? /* @__PURE__ */ e("span", { className: "text-xs text-amber-600", children: "Pushable version not selected" }) : null
1435
1435
  ] }) }),
1436
1436
  /* @__PURE__ */ e("td", { className: "p-3", children: /* @__PURE__ */ e(nt, { status: m.status }) }),
1437
1437
  /* @__PURE__ */ e("td", { className: "p-3 text-right", onClick: (P) => P.stopPropagation(), children: /* @__PURE__ */ n("div", { className: "flex items-center justify-end gap-2", children: [
1438
- Z ? /* @__PURE__ */ e(
1438
+ G ? /* @__PURE__ */ e(
1439
1439
  at,
1440
1440
  {
1441
1441
  item: m,
1442
- targetConfigIds: G,
1443
- results: J,
1444
- pushedDests: W,
1445
- displayName: A
1442
+ targetConfigIds: f,
1443
+ results: Q,
1444
+ pushedDests: X,
1445
+ displayName: F
1446
1446
  }
1447
1447
  ) : null,
1448
- !m.ignored && !ne && /* @__PURE__ */ e(
1449
- Vt,
1448
+ !m.ignored && !te && /* @__PURE__ */ e(
1449
+ Ut,
1450
1450
  {
1451
1451
  createPayload: {
1452
- originConfigId: y.originConfigId,
1452
+ originConfigId: x.originConfigId,
1453
1453
  itemKey: m.itemKey,
1454
1454
  itemType: m.itemType,
1455
1455
  itemName: m.itemName
1456
1456
  },
1457
1457
  onChange: () => {
1458
- l.setQueryData(
1458
+ o.setQueryData(
1459
1459
  D,
1460
- (P) => (P ?? []).map((Y) => Y.id === m.id ? { ...Y, ignored: !0, included: !1 } : Y)
1461
- ), te.mutate();
1460
+ (P) => (P ?? []).map((W) => W.id === m.id ? { ...W, ignored: !0, included: !1 } : W)
1461
+ ), ee.mutate();
1462
1462
  }
1463
1463
  }
1464
1464
  )
@@ -1466,18 +1466,18 @@ function mn({ releaseId: t, onBack: s }) {
1466
1466
  ]
1467
1467
  }
1468
1468
  ),
1469
- K && S ? N.map((P) => /* @__PURE__ */ n(
1469
+ K && T ? N.map((P) => /* @__PURE__ */ n(
1470
1470
  "tr",
1471
1471
  {
1472
- className: `border-b last:border-0 cursor-pointer hover:bg-muted/50 ${(o == null ? void 0 : o.id) === P.id ? "bg-muted/50" : ""}`,
1472
+ className: `border-b last:border-0 cursor-pointer hover:bg-muted/50 ${(d == null ? void 0 : d.id) === P.id ? "bg-muted/50" : ""}`,
1473
1473
  onClick: () => h(P),
1474
1474
  children: [
1475
- /* @__PURE__ */ e("td", { className: "p-3 pl-8", onClick: (Y) => Y.stopPropagation(), children: /* @__PURE__ */ e(
1475
+ /* @__PURE__ */ e("td", { className: "p-3 pl-8", onClick: (W) => W.stopPropagation(), children: /* @__PURE__ */ e(
1476
1476
  Xe,
1477
1477
  {
1478
1478
  checked: P.included,
1479
- disabled: P.ignored || ve.isPending || ne,
1480
- onChange: (Y) => ve.mutate({ itemId: P.id, included: Y })
1479
+ disabled: P.ignored || ve.isPending || te,
1480
+ onChange: (W) => ve.mutate({ itemId: P.id, included: W })
1481
1481
  }
1482
1482
  ) }),
1483
1483
  /* @__PURE__ */ e("td", { className: "p-3 pl-8", children: /* @__PURE__ */ e(pe, { type: P.itemType }) }),
@@ -1486,109 +1486,109 @@ function mn({ releaseId: t, onBack: s }) {
1486
1486
  (() => {
1487
1487
  if (!P.included || P.ignored)
1488
1488
  return null;
1489
- const Y = Te(P, V, g);
1490
- return Y.length === 0 ? null : /* @__PURE__ */ e("span", { title: `Depends on excluded: ${Y.map((Tt) => Tt.itemName).join(", ")}`, children: /* @__PURE__ */ e(fe, { size: 14, className: "shrink-0 text-amber-600" }) });
1489
+ const W = Te(P, M, y);
1490
+ return W.length === 0 ? null : /* @__PURE__ */ e("span", { title: `Depends on excluded: ${W.map((St) => St.itemName).join(", ")}`, children: /* @__PURE__ */ e(fe, { size: 14, className: "shrink-0 text-amber-600" }) });
1491
1491
  })(),
1492
1492
  /* @__PURE__ */ e(st, { item: P })
1493
1493
  ] }) }),
1494
1494
  /* @__PURE__ */ e("td", { className: "p-3", children: /* @__PURE__ */ e(nt, { status: P.status }) }),
1495
- /* @__PURE__ */ e("td", { className: "p-3 text-right", onClick: (Y) => Y.stopPropagation(), children: Z ? /* @__PURE__ */ e(
1495
+ /* @__PURE__ */ e("td", { className: "p-3 text-right", onClick: (W) => W.stopPropagation(), children: G ? /* @__PURE__ */ e(
1496
1496
  at,
1497
1497
  {
1498
1498
  item: P,
1499
- targetConfigIds: G,
1500
- results: J,
1501
- pushedDests: W,
1502
- displayName: A
1499
+ targetConfigIds: f,
1500
+ results: Q,
1501
+ pushedDests: X,
1502
+ displayName: F
1503
1503
  }
1504
1504
  ) : null })
1505
1505
  ]
1506
1506
  },
1507
1507
  P.id
1508
1508
  )) : null
1509
- ] }, i.synthetic ? m.itemKey : m.id);
1509
+ ] }, r.synthetic ? m.itemKey : m.id);
1510
1510
  }) })
1511
1511
  ] }) }) }) }),
1512
- o ? /* @__PURE__ */ e("div", { className: "w-[28rem] shrink-0 self-start sticky top-4 max-h-[calc(100vh-2rem)] overflow-auto", children: /* @__PURE__ */ e(
1513
- Ht,
1512
+ d ? /* @__PURE__ */ e("div", { className: "w-[28rem] shrink-0 self-start sticky top-4 max-h-[calc(100vh-2rem)] overflow-auto", children: /* @__PURE__ */ e(
1513
+ _t,
1514
1514
  {
1515
1515
  item: b,
1516
- targets: (y.targetConfigIds ?? []).map((i) => ({ id: i, name: A(i) })),
1516
+ targets: (x.targetConfigIds ?? []).map((r) => ({ id: r, name: F(r) })),
1517
1517
  onClose: () => h(null),
1518
- unmetDependencyNames: b && b.included && !b.ignored ? Te(b, V, g).map(E) : [],
1519
- tags: Array.isArray((Qe = (Je = b == null ? void 0 : b.diff) == null ? void 0 : Je.origin) == null ? void 0 : Qe.tags) ? ((Le = b == null ? void 0 : b.diff) == null ? void 0 : Le.origin).tags ?? [] : [],
1520
- excludedTags: X(b == null ? void 0 : b.excludedTags),
1518
+ unmetDependencyNames: b && b.included && !b.ignored ? Te(b, M, y).map(O) : [],
1519
+ tags: Array.isArray((Le = (Je = b == null ? void 0 : b.diff) == null ? void 0 : Je.origin) == null ? void 0 : Le.tags) ? ((Qe = b == null ? void 0 : b.diff) == null ? void 0 : Qe.origin).tags ?? [] : [],
1520
+ excludedTags: Z(b == null ? void 0 : b.excludedTags),
1521
1521
  metadataKeys: (() => {
1522
1522
  var N, m;
1523
- const i = (m = (N = b == null ? void 0 : b.diff) == null ? void 0 : N.origin) == null ? void 0 : m.metadata;
1524
- return i != null && typeof i == "object" && !Array.isArray(i) ? Object.keys(i) : [];
1523
+ const r = (m = (N = b == null ? void 0 : b.diff) == null ? void 0 : N.origin) == null ? void 0 : m.metadata;
1524
+ return r != null && typeof r == "object" && !Array.isArray(r) ? Object.keys(r) : [];
1525
1525
  })(),
1526
- excludedMetadataKeys: X(b == null ? void 0 : b.excludedMetadataKeys),
1526
+ excludedMetadataKeys: Z(b == null ? void 0 : b.excludedMetadataKeys),
1527
1527
  i18nPaths: (() => {
1528
1528
  var m, K;
1529
- const i = (K = (m = b == null ? void 0 : b.diff) == null ? void 0 : m.origin) == null ? void 0 : K.i18n;
1530
- if (!Array.isArray(i))
1529
+ const r = (K = (m = b == null ? void 0 : b.diff) == null ? void 0 : m.origin) == null ? void 0 : K.i18n;
1530
+ if (!Array.isArray(r))
1531
1531
  return [];
1532
- const N = i.map((S) => S == null ? void 0 : S.path).filter((S) => typeof S == "string");
1532
+ const N = r.map((T) => T == null ? void 0 : T.path).filter((T) => typeof T == "string");
1533
1533
  return Array.from(new Set(N));
1534
1534
  })(),
1535
- excludedI18nPaths: X(b == null ? void 0 : b.excludedI18nPaths),
1535
+ excludedI18nPaths: Z(b == null ? void 0 : b.excludedI18nPaths),
1536
1536
  permissionKeys: (() => {
1537
1537
  var m, K;
1538
1538
  if ((b == null ? void 0 : b.itemType) !== "role")
1539
1539
  return [];
1540
- const i = (K = (m = b == null ? void 0 : b.diff) == null ? void 0 : m.origin) == null ? void 0 : K.permissions;
1541
- if (!Array.isArray(i))
1540
+ const r = (K = (m = b == null ? void 0 : b.diff) == null ? void 0 : m.origin) == null ? void 0 : K.permissions;
1541
+ if (!Array.isArray(r))
1542
1542
  return [];
1543
- const N = i.map((S) => `${(S == null ? void 0 : S.module) ?? ""}/${(S == null ? void 0 : S.name) ?? (S == null ? void 0 : S.id) ?? ""}`).filter((S) => S !== "/");
1543
+ const N = r.map((T) => `${(T == null ? void 0 : T.module) ?? ""}/${(T == null ? void 0 : T.name) ?? (T == null ? void 0 : T.id) ?? ""}`).filter((T) => T !== "/");
1544
1544
  return Array.from(new Set(N));
1545
1545
  })(),
1546
- excludedPermissions: X(b == null ? void 0 : b.excludedPermissions),
1547
- formatPermissionLabel: (i) => i.split(/([/.])/).map((N) => {
1546
+ excludedPermissions: Z(b == null ? void 0 : b.excludedPermissions),
1547
+ formatPermissionLabel: (r) => r.split(/([/.])/).map((N) => {
1548
1548
  var m, K;
1549
- return ((K = (m = b == null ? void 0 : b.diff) == null ? void 0 : m.nameMap) == null ? void 0 : K[N]) ?? T.get(N) ?? N;
1549
+ return ((K = (m = b == null ? void 0 : b.diff) == null ? void 0 : m.nameMap) == null ? void 0 : K[N]) ?? S.get(N) ?? N;
1550
1550
  }).join(""),
1551
- replacementMaps: y.replacementMaps ?? void 0,
1552
- editable: !ne,
1553
- onToggleTag: (i, N) => {
1551
+ replacementMaps: x.replacementMaps ?? void 0,
1552
+ editable: !te,
1553
+ onToggleTag: (r, N) => {
1554
1554
  if (!b)
1555
1555
  return;
1556
- const m = X(b.excludedTags), K = N ? m.filter((S) => S !== i) : Array.from(/* @__PURE__ */ new Set([...m, i]));
1557
- yt.mutate({ itemId: b.id, value: K });
1558
- },
1559
- onToggleMetadataKey: (i, N) => {
1560
- if (!b)
1561
- return;
1562
- const m = X(b.excludedMetadataKeys), K = N ? m.filter((S) => S !== i) : Array.from(/* @__PURE__ */ new Set([...m, i]));
1556
+ const m = Z(b.excludedTags), K = N ? m.filter((T) => T !== r) : Array.from(/* @__PURE__ */ new Set([...m, r]));
1563
1557
  bt.mutate({ itemId: b.id, value: K });
1564
1558
  },
1565
- onToggleI18nPath: (i, N) => {
1559
+ onToggleMetadataKey: (r, N) => {
1566
1560
  if (!b)
1567
1561
  return;
1568
- const m = X(b.excludedI18nPaths), K = N ? m.filter((S) => S !== i) : Array.from(/* @__PURE__ */ new Set([...m, i]));
1562
+ const m = Z(b.excludedMetadataKeys), K = N ? m.filter((T) => T !== r) : Array.from(/* @__PURE__ */ new Set([...m, r]));
1569
1563
  Nt.mutate({ itemId: b.id, value: K });
1570
1564
  },
1571
- onTogglePermission: (i, N) => {
1565
+ onToggleI18nPath: (r, N) => {
1572
1566
  if (!b)
1573
1567
  return;
1574
- const m = X(b.excludedPermissions), K = N ? m.filter((S) => S !== i) : Array.from(/* @__PURE__ */ new Set([...m, i]));
1568
+ const m = Z(b.excludedI18nPaths), K = N ? m.filter((T) => T !== r) : Array.from(/* @__PURE__ */ new Set([...m, r]));
1575
1569
  vt.mutate({ itemId: b.id, value: K });
1570
+ },
1571
+ onTogglePermission: (r, N) => {
1572
+ if (!b)
1573
+ return;
1574
+ const m = Z(b.excludedPermissions), K = N ? m.filter((T) => T !== r) : Array.from(/* @__PURE__ */ new Set([...m, r]));
1575
+ wt.mutate({ itemId: b.id, value: K });
1576
1576
  }
1577
1577
  }
1578
1578
  ) }) : null
1579
1579
  ] }),
1580
1580
  /* @__PURE__ */ e(
1581
- Yt,
1581
+ Wt,
1582
1582
  {
1583
- open: R,
1584
- onOpenChange: F,
1583
+ open: E,
1584
+ onOpenChange: z,
1585
1585
  releaseId: t,
1586
1586
  apiPath: a,
1587
- targetConfigIds: y.targetConfigIds ?? [],
1587
+ targetConfigIds: x.targetConfigIds ?? [],
1588
1588
  targetNames: Object.fromEntries(
1589
- (y.targetConfigIds ?? []).map((i) => [i, A(i)])
1589
+ (x.targetConfigIds ?? []).map((r) => [r, F(r)])
1590
1590
  ),
1591
- dependencyWarnings: ee
1591
+ dependencyWarnings: de
1592
1592
  }
1593
1593
  )
1594
1594
  ] }) : /* @__PURE__ */ n("div", { className: "space-y-4", children: [
@@ -1599,14 +1599,14 @@ function mn({ releaseId: t, onBack: s }) {
1599
1599
  /* @__PURE__ */ e("p", { className: "text-muted-foreground", children: "Release not found." })
1600
1600
  ] });
1601
1601
  }
1602
- function it({ value: t, onChange: s, configs: a, label: r }) {
1603
- const d = `cluster-select-${r.toLowerCase().replace(/\s+/g, "-")}`;
1602
+ function it({ value: t, onChange: s, configs: a, label: i }) {
1603
+ const l = `cluster-select-${i.toLowerCase().replace(/\s+/g, "-")}`;
1604
1604
  return /* @__PURE__ */ n("div", { className: "space-y-2", children: [
1605
- /* @__PURE__ */ e(re, { htmlFor: d, children: r }),
1605
+ /* @__PURE__ */ e(ie, { htmlFor: l, children: i }),
1606
1606
  /* @__PURE__ */ n(
1607
1607
  "select",
1608
1608
  {
1609
- id: d,
1609
+ id: l,
1610
1610
  value: t,
1611
1611
  onChange: (c) => s(c.target.value),
1612
1612
  className: "flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm",
@@ -1618,12 +1618,12 @@ function it({ value: t, onChange: s, configs: a, label: r }) {
1618
1618
  )
1619
1619
  ] });
1620
1620
  }
1621
- function hn({ item: t, onClose: s }) {
1622
- var r, d;
1623
- const a = j(
1621
+ function pn({ item: t, onClose: s }) {
1622
+ var i, l;
1623
+ const a = B(
1624
1624
  () => {
1625
- var c, l;
1626
- return xt((c = t == null ? void 0 : t.diff) == null ? void 0 : c.origin, (l = t == null ? void 0 : t.diff) == null ? void 0 : l.target);
1625
+ var c, o;
1626
+ return yt((c = t == null ? void 0 : t.diff) == null ? void 0 : c.origin, (o = t == null ? void 0 : t.diff) == null ? void 0 : o.target);
1627
1627
  },
1628
1628
  [t]
1629
1629
  );
@@ -1636,8 +1636,8 @@ function hn({ item: t, onClose: s }) {
1636
1636
  /* @__PURE__ */ e($, { variant: "ghost", size: "icon", title: "Close", onClick: s, children: /* @__PURE__ */ e(be, {}) })
1637
1637
  ] }),
1638
1638
  /* @__PURE__ */ n("div", { className: "flex flex-1 gap-3 overflow-auto p-3", children: [
1639
- /* @__PURE__ */ e(Ee, { label: "Origin", value: (r = t.diff) == null ? void 0 : r.origin, highlightLines: a }),
1640
- /* @__PURE__ */ e(Ee, { label: "Target", value: (d = t.diff) == null ? void 0 : d.target })
1639
+ /* @__PURE__ */ e(Ee, { label: "Origin", value: (i = t.diff) == null ? void 0 : i.origin, highlightLines: a }),
1640
+ /* @__PURE__ */ e(Ee, { label: "Target", value: (l = t.diff) == null ? void 0 : l.target })
1641
1641
  ] })
1642
1642
  ] }) : null;
1643
1643
  }
@@ -1654,48 +1654,48 @@ function lt({
1654
1654
  onClick: s,
1655
1655
  active: a
1656
1656
  }) {
1657
- const r = rt[t] ?? rt.match, d = t !== "match" && t !== "skip" && !!s;
1657
+ const i = rt[t] ?? rt.match, l = t !== "match" && t !== "skip" && !!s;
1658
1658
  return /* @__PURE__ */ e(
1659
1659
  "button",
1660
1660
  {
1661
1661
  type: "button",
1662
- onClick: d ? s : void 0,
1663
- disabled: !d,
1664
- title: r.label,
1662
+ onClick: l ? s : void 0,
1663
+ disabled: !l,
1664
+ title: i.label,
1665
1665
  className: ce(
1666
1666
  "w-full text-center text-sm py-1 rounded",
1667
- r.className,
1668
- d && "hover:bg-muted cursor-pointer",
1669
- !d && "cursor-default",
1667
+ i.className,
1668
+ l && "hover:bg-muted cursor-pointer",
1669
+ !l && "cursor-default",
1670
1670
  a && "bg-muted ring-1 ring-ring"
1671
1671
  ),
1672
- children: r.symbol
1672
+ children: i.symbol
1673
1673
  }
1674
1674
  );
1675
1675
  }
1676
- function pn({ stats: t, destConfigIds: s }) {
1676
+ function fn({ stats: t, destConfigIds: s }) {
1677
1677
  return /* @__PURE__ */ e("div", { className: "flex gap-6 text-xs text-muted-foreground py-2 px-1", children: s.map((a) => {
1678
- const r = t[a];
1679
- if (!r)
1678
+ const i = t[a];
1679
+ if (!i)
1680
1680
  return null;
1681
- const d = r.match + r.diff + r.missing + r.extra;
1681
+ const l = i.match + i.diff + i.missing + i.extra;
1682
1682
  return /* @__PURE__ */ n("span", { children: [
1683
1683
  /* @__PURE__ */ n("span", { className: "font-mono font-medium", children: [
1684
- r.match,
1684
+ i.match,
1685
1685
  "/",
1686
- d
1686
+ l
1687
1687
  ] }),
1688
1688
  " match",
1689
- r.diff > 0 && /* @__PURE__ */ n("span", { className: "text-destructive ml-2", children: [
1690
- r.diff,
1689
+ i.diff > 0 && /* @__PURE__ */ n("span", { className: "text-destructive ml-2", children: [
1690
+ i.diff,
1691
1691
  " diff"
1692
1692
  ] }),
1693
- r.missing > 0 && /* @__PURE__ */ n("span", { className: "text-destructive ml-2", children: [
1694
- r.missing,
1693
+ i.missing > 0 && /* @__PURE__ */ n("span", { className: "text-destructive ml-2", children: [
1694
+ i.missing,
1695
1695
  " missing"
1696
1696
  ] }),
1697
- r.extra > 0 && /* @__PURE__ */ n("span", { className: "text-amber-600 ml-2", children: [
1698
- r.extra,
1697
+ i.extra > 0 && /* @__PURE__ */ n("span", { className: "text-amber-600 ml-2", children: [
1698
+ i.extra,
1699
1699
  " extra"
1700
1700
  ] })
1701
1701
  ] }, a);
@@ -1704,61 +1704,61 @@ function pn({ stats: t, destConfigIds: s }) {
1704
1704
  function ot(t) {
1705
1705
  return Object.values(t.cells).some((s) => s === "diff" || s === "missing" || s === "extra");
1706
1706
  }
1707
- function fn({
1707
+ function gn({
1708
1708
  originConfigId: t,
1709
1709
  destConfigIds: s,
1710
1710
  apiPath: a = "/release-status"
1711
1711
  }) {
1712
- const { toast: r } = oe(), { fetchJson: d } = se(), { configs: c } = ye(), l = de(), [u, p] = M("issues"), [v, k] = M(!1), [o, h] = M(null), [R, F] = M(/* @__PURE__ */ new Set()), [z, Q] = M(() => /* @__PURE__ */ new Set()), H = (g) => Q((E) => {
1713
- const T = new Set(E);
1714
- return T.has(g) ? T.delete(g) : T.add(g), T;
1715
- }), B = j(() => {
1716
- const g = /* @__PURE__ */ new Map();
1717
- return c.forEach((E) => g.set(E.id, E.displayName)), g;
1718
- }, [c]), D = (g) => B.get(g) ?? g, q = s.filter((g) => !R.has(g)), y = new URLSearchParams();
1719
- y.set("originConfigId", t), q.forEach((g) => y.append("destConfigIds[]", g));
1720
- const w = ["imaginarium", "release-status", t, q], { data: C, isLoading: x, isError: O } = le({
1721
- queryKey: w,
1722
- queryFn: () => d(`${a}?${y.toString()}`),
1723
- enabled: q.length > 0
1724
- }), J = U({
1725
- mutationFn: () => d(`${a}/refresh`, {
1712
+ const { toast: i } = le(), { fetchJson: l } = ne(), { configs: c } = ye(), o = oe(), [u, p] = A("issues"), [w, v] = A(!1), [d, h] = A(null), [E, z] = A(/* @__PURE__ */ new Set()), [j, H] = A(() => /* @__PURE__ */ new Set()), _ = (y) => H((O) => {
1713
+ const S = new Set(O);
1714
+ return S.has(y) ? S.delete(y) : S.add(y), S;
1715
+ }), J = B(() => {
1716
+ const y = /* @__PURE__ */ new Map();
1717
+ return c.forEach((O) => y.set(O.id, O.displayName)), y;
1718
+ }, [c]), D = (y) => J.get(y) ?? y, L = s.filter((y) => !E.has(y)), x = new URLSearchParams();
1719
+ x.set("originConfigId", t), L.forEach((y) => x.append("destConfigIds[]", y));
1720
+ const k = ["imaginarium", "release-status", t, L], { data: C, isLoading: g, isError: R } = re({
1721
+ queryKey: k,
1722
+ queryFn: () => l(`${a}?${x.toString()}`),
1723
+ enabled: L.length > 0
1724
+ }), Q = U({
1725
+ mutationFn: () => l(`${a}/refresh`, {
1726
1726
  method: "POST",
1727
- body: JSON.stringify({ originConfigId: t, destConfigIds: q })
1727
+ body: JSON.stringify({ originConfigId: t, destConfigIds: L })
1728
1728
  }),
1729
1729
  onSuccess: () => {
1730
- l.invalidateQueries({ queryKey: w }), r({ title: "Cache cleared", description: "Refreshing comparison data…" });
1730
+ o.invalidateQueries({ queryKey: k }), i({ title: "Cache cleared", description: "Refreshing comparison data…" });
1731
1731
  },
1732
- onError: (g) => {
1733
- r({ title: "Error", description: g.message, variant: "destructive" });
1732
+ onError: (y) => {
1733
+ i({ title: "Error", description: y.message, variant: "destructive" });
1734
1734
  }
1735
1735
  }), {
1736
- data: W,
1737
- isLoading: Z,
1738
- isError: G
1739
- } = le({
1740
- queryKey: ["imaginarium", "release-status-diff", t, o == null ? void 0 : o.destConfigId, o == null ? void 0 : o.itemKey],
1741
- queryFn: () => d(
1742
- `${a}/diff?originConfigId=${encodeURIComponent(t)}&destConfigId=${encodeURIComponent(o.destConfigId)}&itemKey=${encodeURIComponent(o.itemKey)}`
1736
+ data: X,
1737
+ isLoading: G,
1738
+ isError: f
1739
+ } = re({
1740
+ queryKey: ["imaginarium", "release-status-diff", t, d == null ? void 0 : d.destConfigId, d == null ? void 0 : d.itemKey],
1741
+ queryFn: () => l(
1742
+ `${a}/diff?originConfigId=${encodeURIComponent(t)}&destConfigId=${encodeURIComponent(d.destConfigId)}&itemKey=${encodeURIComponent(d.itemKey)}`
1743
1743
  ),
1744
- enabled: !!o
1745
- }), f = (g) => {
1746
- F((E) => {
1747
- const T = new Set(E);
1748
- return T.has(g) ? T.delete(g) : T.add(g), T;
1744
+ enabled: !!d
1745
+ }), q = (y) => {
1746
+ z((O) => {
1747
+ const S = new Set(O);
1748
+ return S.has(y) ? S.delete(y) : S.add(y), S;
1749
1749
  });
1750
- }, A = (g, E) => {
1750
+ }, F = (y, O) => {
1751
1751
  h(
1752
- (T) => (T == null ? void 0 : T.itemKey) === g && T.destConfigId === E ? null : { itemKey: g, destConfigId: E }
1752
+ (S) => (S == null ? void 0 : S.itemKey) === y && S.destConfigId === O ? null : { itemKey: y, destConfigId: O }
1753
1753
  );
1754
- }, I = (C == null ? void 0 : C.rows) ?? [], L = (C == null ? void 0 : C.stats) ?? {}, V = j(() => rn(I).map((E) => {
1755
- const T = u === "issues" ? E.children.filter(ot) : E.children;
1756
- return { node: E, renderChildren: T };
1754
+ }, I = (C == null ? void 0 : C.rows) ?? [], V = (C == null ? void 0 : C.stats) ?? {}, M = B(() => ln(I).map((O) => {
1755
+ const S = u === "issues" ? O.children.filter(ot) : O.children;
1756
+ return { node: O, renderChildren: S };
1757
1757
  }).filter(
1758
- ({ node: E, renderChildren: T }) => u === "all" || ot(E.row) || T.length > 0
1759
- ).sort((E, T) => {
1760
- const ee = qe(E.node.row.itemType, T.node.row.itemType);
1761
- return ee !== 0 ? ee : E.node.row.itemName.localeCompare(T.node.row.itemName);
1758
+ ({ node: O, renderChildren: S }) => u === "all" || ot(O.row) || S.length > 0
1759
+ ).sort((O, S) => {
1760
+ const de = qe(O.node.row.itemType, S.node.row.itemType);
1761
+ return de !== 0 ? de : O.node.row.itemName.localeCompare(S.node.row.itemName);
1762
1762
  }), [I, u]);
1763
1763
  return /* @__PURE__ */ n("div", { className: "space-y-3", children: [
1764
1764
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2 flex-wrap", children: [
@@ -1780,7 +1780,7 @@ function fn({
1780
1780
  }
1781
1781
  )
1782
1782
  ] }),
1783
- /* @__PURE__ */ n($, { variant: "ghost", size: "sm", onClick: () => k((g) => !g), children: [
1783
+ /* @__PURE__ */ n($, { variant: "ghost", size: "sm", onClick: () => v((y) => !y), children: [
1784
1784
  /* @__PURE__ */ e(At, {}),
1785
1785
  "Stats"
1786
1786
  ] }),
@@ -1789,98 +1789,98 @@ function fn({
1789
1789
  {
1790
1790
  variant: "ghost",
1791
1791
  size: "sm",
1792
- onClick: () => J.mutate(),
1793
- disabled: J.isPending,
1792
+ onClick: () => Q.mutate(),
1793
+ disabled: Q.isPending,
1794
1794
  children: [
1795
- /* @__PURE__ */ e(pt, { className: ce(J.isPending && "animate-spin") }),
1795
+ /* @__PURE__ */ e(ft, { className: ce(Q.isPending && "animate-spin") }),
1796
1796
  "Refresh"
1797
1797
  ]
1798
1798
  }
1799
1799
  ),
1800
- [...R].map((g) => /* @__PURE__ */ n(
1800
+ [...E].map((y) => /* @__PURE__ */ n(
1801
1801
  "button",
1802
1802
  {
1803
- onClick: () => f(g),
1803
+ onClick: () => q(y),
1804
1804
  className: "text-xs border rounded px-2 py-1 text-muted-foreground hover:bg-muted",
1805
1805
  children: [
1806
1806
  "+ ",
1807
- D(g)
1807
+ D(y)
1808
1808
  ]
1809
1809
  },
1810
- g
1810
+ y
1811
1811
  ))
1812
1812
  ] }),
1813
- v && C && /* @__PURE__ */ e(pn, { stats: L, destConfigIds: q }),
1814
- x && /* @__PURE__ */ e("div", { className: "text-center text-muted-foreground py-8", children: "Loading…" }),
1815
- O && /* @__PURE__ */ e("div", { className: "text-center text-destructive py-8", children: "Failed to load comparison data." }),
1816
- !x && !O && /* @__PURE__ */ n("div", { className: "flex gap-4", children: [
1817
- /* @__PURE__ */ e("div", { className: "min-w-0 flex-1 rounded-md border overflow-x-auto", children: /* @__PURE__ */ n("table", { className: "w-full text-sm", children: [
1813
+ w && C && /* @__PURE__ */ e(fn, { stats: V, destConfigIds: L }),
1814
+ g && /* @__PURE__ */ e("div", { className: "text-center text-muted-foreground py-8", children: "Loading…" }),
1815
+ R && /* @__PURE__ */ e("div", { className: "text-center text-destructive py-8", children: "Failed to load comparison data." }),
1816
+ !g && !R && /* @__PURE__ */ n("div", { className: "flex gap-4", children: [
1817
+ /* @__PURE__ */ e("div", { className: "min-w-0 flex-1 rounded-md border overflow-auto max-h-[70vh]", children: /* @__PURE__ */ n("table", { className: "w-full text-sm", children: [
1818
1818
  /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ n("tr", { className: "border-b bg-muted/50", children: [
1819
- /* @__PURE__ */ e("th", { className: "px-4 py-2 text-left font-medium min-w-[200px]", children: "Item" }),
1820
- q.map((g) => /* @__PURE__ */ e("th", { className: "px-2 py-2 text-center font-medium min-w-[80px]", children: /* @__PURE__ */ n("div", { className: "flex items-center justify-center gap-1", children: [
1821
- /* @__PURE__ */ e("span", { className: "truncate max-w-[120px]", title: D(g), children: D(g) }),
1819
+ /* @__PURE__ */ e("th", { className: "sticky top-0 z-10 bg-muted px-4 py-2 text-left font-medium min-w-[200px]", children: "Item" }),
1820
+ L.map((y) => /* @__PURE__ */ e("th", { className: "sticky top-0 z-10 bg-muted px-2 py-2 text-center font-medium min-w-[80px]", children: /* @__PURE__ */ n("div", { className: "flex items-center justify-center gap-1", children: [
1821
+ /* @__PURE__ */ e("span", { className: "truncate max-w-[120px]", title: D(y), children: D(y) }),
1822
1822
  /* @__PURE__ */ e(
1823
1823
  "button",
1824
1824
  {
1825
1825
  className: "text-muted-foreground hover:text-foreground",
1826
- onClick: () => f(g),
1826
+ onClick: () => q(y),
1827
1827
  title: "Hide column",
1828
1828
  children: "×"
1829
1829
  }
1830
1830
  )
1831
- ] }) }, g))
1831
+ ] }) }, y))
1832
1832
  ] }) }),
1833
- /* @__PURE__ */ e("tbody", { children: V.length === 0 ? /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", { colSpan: q.length + 1, className: "text-center text-muted-foreground py-8", children: u === "issues" ? "No issues found — all clusters in sync." : "No items." }) }) : V.map(({ node: g, renderChildren: E }) => {
1834
- const T = g.row, ee = E.length > 0, ue = z.has(T.itemKey) || u === "issues", Ne = z.has(T.itemKey);
1835
- return /* @__PURE__ */ n(ct, { children: [
1833
+ /* @__PURE__ */ e("tbody", { children: M.length === 0 ? /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", { colSpan: L.length + 1, className: "text-center text-muted-foreground py-8", children: u === "issues" ? "No issues found — all clusters in sync." : "No items." }) }) : M.map(({ node: y, renderChildren: O }) => {
1834
+ const S = y.row, de = O.length > 0, ue = j.has(S.itemKey) || u === "issues", Ne = j.has(S.itemKey);
1835
+ return /* @__PURE__ */ n(ut, { children: [
1836
1836
  /* @__PURE__ */ n("tr", { className: "border-b last:border-0 hover:bg-muted/25", children: [
1837
1837
  /* @__PURE__ */ e("td", { className: "px-4 py-1.5", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
1838
- ee ? /* @__PURE__ */ e(
1838
+ de ? /* @__PURE__ */ e(
1839
1839
  "button",
1840
1840
  {
1841
1841
  type: "button",
1842
1842
  className: "text-muted-foreground hover:text-foreground",
1843
- onClick: () => H(T.itemKey),
1843
+ onClick: () => _(S.itemKey),
1844
1844
  "aria-label": Ne ? "Collapse" : "Expand",
1845
1845
  children: Ne ? /* @__PURE__ */ e(ge, { size: 14 }) : /* @__PURE__ */ e(xe, { size: 14 })
1846
1846
  }
1847
1847
  ) : null,
1848
- /* @__PURE__ */ e("span", { className: "inline-flex align-middle", children: /* @__PURE__ */ e(pe, { type: T.itemType }) }),
1849
- /* @__PURE__ */ e("span", { className: "font-medium", children: T.itemName })
1848
+ /* @__PURE__ */ e("span", { className: "inline-flex align-middle", children: /* @__PURE__ */ e(pe, { type: S.itemType }) }),
1849
+ /* @__PURE__ */ e("span", { className: "font-medium", children: S.itemName })
1850
1850
  ] }) }),
1851
- q.map((_) => /* @__PURE__ */ e("td", { className: "px-2 py-1", children: /* @__PURE__ */ e(
1851
+ L.map((Y) => /* @__PURE__ */ e("td", { className: "px-2 py-1", children: /* @__PURE__ */ e(
1852
1852
  lt,
1853
1853
  {
1854
- state: T.cells[_] ?? "match",
1855
- active: (o == null ? void 0 : o.itemKey) === T.itemKey && o.destConfigId === _,
1856
- onClick: () => A(T.itemKey, _)
1854
+ state: S.cells[Y] ?? "match",
1855
+ active: (d == null ? void 0 : d.itemKey) === S.itemKey && d.destConfigId === Y,
1856
+ onClick: () => F(S.itemKey, Y)
1857
1857
  }
1858
- ) }, _))
1858
+ ) }, Y))
1859
1859
  ] }),
1860
- ee && ue ? E.map((_) => /* @__PURE__ */ n("tr", { className: "border-b last:border-0 hover:bg-muted/25", children: [
1860
+ de && ue ? O.map((Y) => /* @__PURE__ */ n("tr", { className: "border-b last:border-0 hover:bg-muted/25", children: [
1861
1861
  /* @__PURE__ */ e("td", { className: "px-4 py-1.5 pl-8", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
1862
- /* @__PURE__ */ e("span", { className: "inline-flex align-middle", children: /* @__PURE__ */ e(pe, { type: _.itemType }) }),
1863
- /* @__PURE__ */ e("span", { className: "font-medium", children: _.itemName })
1862
+ /* @__PURE__ */ e("span", { className: "inline-flex align-middle", children: /* @__PURE__ */ e(pe, { type: Y.itemType }) }),
1863
+ /* @__PURE__ */ e("span", { className: "font-medium", children: Y.itemName })
1864
1864
  ] }) }),
1865
- q.map((te) => /* @__PURE__ */ e("td", { className: "px-2 py-1", children: /* @__PURE__ */ e(
1865
+ L.map((ee) => /* @__PURE__ */ e("td", { className: "px-2 py-1", children: /* @__PURE__ */ e(
1866
1866
  lt,
1867
1867
  {
1868
- state: _.cells[te] ?? "match",
1869
- active: (o == null ? void 0 : o.itemKey) === _.itemKey && o.destConfigId === te,
1870
- onClick: () => A(_.itemKey, te)
1868
+ state: Y.cells[ee] ?? "match",
1869
+ active: (d == null ? void 0 : d.itemKey) === Y.itemKey && d.destConfigId === ee,
1870
+ onClick: () => F(Y.itemKey, ee)
1871
1871
  }
1872
- ) }, te))
1873
- ] }, _.itemKey)) : null
1874
- ] }, T.itemKey);
1872
+ ) }, ee))
1873
+ ] }, Y.itemKey)) : null
1874
+ ] }, S.itemKey);
1875
1875
  }) })
1876
1876
  ] }) }),
1877
- o ? /* @__PURE__ */ e("div", { className: "w-[28rem] shrink-0 self-start sticky top-4 max-h-[calc(100vh-2rem)] overflow-auto", children: Z ? /* @__PURE__ */ e("div", { className: "flex h-full items-center justify-center rounded-md border bg-background p-4 text-sm text-muted-foreground", children: "Loading diff…" }) : G || !W ? /* @__PURE__ */ e("div", { className: "flex h-full items-center justify-center rounded-md border bg-background p-4 text-sm text-muted-foreground", children: "No diff available." }) : /* @__PURE__ */ e(
1878
- hn,
1877
+ d ? /* @__PURE__ */ e("div", { className: "w-[28rem] shrink-0 self-start sticky top-4 max-h-[calc(100vh-2rem)] overflow-auto", children: G ? /* @__PURE__ */ e("div", { className: "flex h-full items-center justify-center rounded-md border bg-background p-4 text-sm text-muted-foreground", children: "Loading diff…" }) : f || !X ? /* @__PURE__ */ e("div", { className: "flex h-full items-center justify-center rounded-md border bg-background p-4 text-sm text-muted-foreground", children: "No diff available." }) : /* @__PURE__ */ e(
1878
+ pn,
1879
1879
  {
1880
1880
  item: {
1881
- itemName: W.itemName,
1882
- itemType: W.itemType,
1883
- diff: { origin: W.origin, target: W.target }
1881
+ itemName: X.itemName,
1882
+ itemType: X.itemType,
1883
+ diff: { origin: X.origin, target: X.target }
1884
1884
  },
1885
1885
  onClose: () => h(null)
1886
1886
  }
@@ -1888,11 +1888,6 @@ function fn({
1888
1888
  ] })
1889
1889
  ] });
1890
1890
  }
1891
- function gn(t, s) {
1892
- return [...t].sort(
1893
- (a, r) => (s[a] ?? a).localeCompare(s[r] ?? r, void 0, { sensitivity: "base" })
1894
- );
1895
- }
1896
1891
  const dt = (t) => ({
1897
1892
  name: "",
1898
1893
  description: "",
@@ -1903,95 +1898,95 @@ function xn({
1903
1898
  clusterNames: s = {},
1904
1899
  apiPath: a = "/release-translations"
1905
1900
  }) {
1906
- const { toast: r } = oe(), { fetchJson: d } = se(), c = de(), l = gn(t, s), [u, p] = M(!1), [v, k] = M(null), [o, h] = M(dt(t)), [R, F] = M(() => /* @__PURE__ */ new Set()), z = (f) => {
1907
- F((A) => {
1908
- const I = new Set(A);
1909
- return I.has(f) ? I.delete(f) : I.add(f), I;
1901
+ const { toast: i } = le(), { fetchJson: l } = ne(), c = oe(), [o, u] = A(!1), [p, w] = A(null), [v, d] = A(dt(t)), [h, E] = A(() => /* @__PURE__ */ new Set()), z = (f) => {
1902
+ E((q) => {
1903
+ const F = new Set(q);
1904
+ return F.has(f) ? F.delete(f) : F.add(f), F;
1910
1905
  });
1911
- }, Q = ["imaginarium", "release-translations"], { data: H, isLoading: B } = le({
1912
- queryKey: Q,
1906
+ }, j = ["imaginarium", "release-translations"], { data: H, isLoading: _ } = re({
1907
+ queryKey: j,
1913
1908
  queryFn: async () => {
1914
- const f = await d(a);
1909
+ const f = await l(a);
1915
1910
  return (f == null ? void 0 : f.items) ?? [];
1916
1911
  }
1917
- }), D = U({
1912
+ }), J = U({
1918
1913
  mutationFn: async (f) => {
1919
- const A = await d(a, {
1914
+ const q = await l(a, {
1920
1915
  method: "POST",
1921
1916
  body: JSON.stringify({ name: f.name.trim(), description: f.description.trim() || null })
1922
1917
  });
1923
- await w(A.id, f.values);
1918
+ await x(q.id, f.values);
1924
1919
  },
1925
1920
  onSuccess: () => {
1926
- c.invalidateQueries({ queryKey: Q }), r({ title: "Translation created" }), O();
1921
+ c.invalidateQueries({ queryKey: j }), i({ title: "Translation created" }), g();
1927
1922
  },
1928
- onError: (f) => r({ title: "Error", description: f.message, variant: "destructive" })
1929
- }), q = U({
1923
+ onError: (f) => i({ title: "Error", description: f.message, variant: "destructive" })
1924
+ }), D = U({
1930
1925
  mutationFn: async (f) => {
1931
- await d(`${a}/${v.id}`, {
1926
+ await l(`${a}/${p.id}`, {
1932
1927
  method: "PATCH",
1933
1928
  body: JSON.stringify({ name: f.name.trim(), description: f.description.trim() || null })
1934
- }), await w(v.id, f.values);
1929
+ }), await x(p.id, f.values);
1935
1930
  },
1936
1931
  onSuccess: () => {
1937
- c.invalidateQueries({ queryKey: Q }), r({ title: "Translation updated" }), O();
1932
+ c.invalidateQueries({ queryKey: j }), i({ title: "Translation updated" }), g();
1938
1933
  },
1939
- onError: (f) => r({ title: "Error", description: f.message, variant: "destructive" })
1940
- }), y = U({
1941
- mutationFn: (f) => d(`${a}/${f}`, { method: "DELETE" }),
1934
+ onError: (f) => i({ title: "Error", description: f.message, variant: "destructive" })
1935
+ }), L = U({
1936
+ mutationFn: (f) => l(`${a}/${f}`, { method: "DELETE" }),
1942
1937
  onSuccess: () => {
1943
- c.invalidateQueries({ queryKey: Q }), r({ title: "Translation deleted" });
1938
+ c.invalidateQueries({ queryKey: j }), i({ title: "Translation deleted" });
1944
1939
  },
1945
- onError: (f) => r({ title: "Error", description: f.message, variant: "destructive" })
1940
+ onError: (f) => i({ title: "Error", description: f.message, variant: "destructive" })
1946
1941
  });
1947
- async function w(f, A) {
1948
- var L;
1949
- const I = (v == null ? void 0 : v.values) ?? [];
1942
+ async function x(f, q) {
1943
+ var I;
1944
+ const F = (p == null ? void 0 : p.values) ?? [];
1950
1945
  for (const V of t) {
1951
- const g = (L = A[V]) == null ? void 0 : L.trim(), E = I.find((ee) => ee.configId === V), T = `${a}/${f}/values`;
1952
- E && g ? await d(`${T}/${E.id}`, {
1946
+ const M = (I = q[V]) == null ? void 0 : I.trim(), y = F.find((S) => S.configId === V), O = `${a}/${f}/values`;
1947
+ y && M ? await l(`${O}/${y.id}`, {
1953
1948
  method: "PATCH",
1954
- body: JSON.stringify({ value: g })
1955
- }) : E && !g ? await d(`${T}/${E.id}`, { method: "DELETE" }) : !E && g && await d(T, {
1949
+ body: JSON.stringify({ value: M })
1950
+ }) : y && !M ? await l(`${O}/${y.id}`, { method: "DELETE" }) : !y && M && await l(O, {
1956
1951
  method: "POST",
1957
- body: JSON.stringify({ translationId: f, configId: V, value: g })
1952
+ body: JSON.stringify({ translationId: f, configId: V, value: M })
1958
1953
  });
1959
1954
  }
1960
1955
  }
1961
- const C = () => {
1962
- k(null), h(dt(t)), p(!0);
1963
- }, x = (f) => {
1964
- k(f);
1965
- const A = f.values ?? [], I = Object.fromEntries(
1966
- t.map((L) => {
1956
+ const k = () => {
1957
+ w(null), d(dt(t)), u(!0);
1958
+ }, C = (f) => {
1959
+ w(f);
1960
+ const q = f.values ?? [], F = Object.fromEntries(
1961
+ t.map((I) => {
1967
1962
  var V;
1968
- return [L, ((V = A.find((g) => g.configId === L)) == null ? void 0 : V.value) ?? ""];
1963
+ return [I, ((V = q.find((M) => M.configId === I)) == null ? void 0 : V.value) ?? ""];
1969
1964
  })
1970
1965
  );
1971
- h({ name: f.name, description: f.description ?? "", values: I }), p(!0);
1972
- }, O = () => {
1973
- p(!1), k(null);
1974
- }, J = () => {
1975
- v ? q.mutate(o) : D.mutate(o);
1976
- }, W = D.isPending || q.isPending, Z = !!o.name.trim();
1977
- if (B)
1966
+ d({ name: f.name, description: f.description ?? "", values: F }), u(!0);
1967
+ }, g = () => {
1968
+ u(!1), w(null);
1969
+ }, R = () => {
1970
+ p ? D.mutate(v) : J.mutate(v);
1971
+ }, Q = J.isPending || D.isPending, X = !!v.name.trim();
1972
+ if (_)
1978
1973
  return /* @__PURE__ */ e("div", { className: "text-center text-muted-foreground py-8", children: "Loading…" });
1979
1974
  const G = [...H ?? []].sort(
1980
- (f, A) => f.name.localeCompare(A.name, void 0, { sensitivity: "base" })
1975
+ (f, q) => f.name.localeCompare(q.name, void 0, { sensitivity: "base" })
1981
1976
  );
1982
1977
  return /* @__PURE__ */ n("div", { className: "space-y-4", children: [
1983
1978
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
1984
1979
  /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: G.length === 0 ? "No translation rules yet." : `${G.length} translation rule${G.length === 1 ? "" : "s"}.` }),
1985
- /* @__PURE__ */ n($, { size: "sm", onClick: C, children: [
1980
+ /* @__PURE__ */ n($, { size: "sm", onClick: k, children: [
1986
1981
  /* @__PURE__ */ e(De, {}),
1987
1982
  "Add translation"
1988
1983
  ] })
1989
1984
  ] }),
1990
1985
  G.length > 0 && /* @__PURE__ */ e("div", { className: "rounded-md border divide-y text-sm", children: G.map((f) => {
1991
- const A = R.has(f.id), I = f.values ?? [], L = (g) => {
1992
- var E;
1993
- return ((E = I.find((T) => T.configId === g)) == null ? void 0 : E.value) ?? "";
1994
- }, V = l.filter((g) => L(g)).length;
1986
+ const q = h.has(f.id), F = f.values ?? [], I = (M) => {
1987
+ var y;
1988
+ return ((y = F.find((O) => O.configId === M)) == null ? void 0 : y.value) ?? "";
1989
+ }, V = t.filter((M) => I(M)).length;
1995
1990
  return /* @__PURE__ */ n("div", { children: [
1996
1991
  /* @__PURE__ */ n("div", { className: "flex items-center gap-3 px-4 py-2 hover:bg-muted/25", children: [
1997
1992
  /* @__PURE__ */ n(
@@ -1999,11 +1994,14 @@ function xn({
1999
1994
  {
2000
1995
  type: "button",
2001
1996
  onClick: () => z(f.id),
2002
- "aria-expanded": A,
1997
+ "aria-expanded": q,
2003
1998
  className: "flex flex-1 min-w-0 items-center gap-3 text-left",
2004
1999
  children: [
2005
- A ? /* @__PURE__ */ e(ge, { className: "size-4 shrink-0 text-muted-foreground" }) : /* @__PURE__ */ e(xe, { className: "size-4 shrink-0 text-muted-foreground" }),
2006
- /* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ e("div", { className: "font-medium", children: f.name }) }),
2000
+ q ? /* @__PURE__ */ e(ge, { className: "size-4 shrink-0 text-muted-foreground" }) : /* @__PURE__ */ e(xe, { className: "size-4 shrink-0 text-muted-foreground" }),
2001
+ /* @__PURE__ */ n("div", { className: "min-w-0 flex-1", children: [
2002
+ /* @__PURE__ */ e("div", { className: "font-medium", children: f.name }),
2003
+ f.description && /* @__PURE__ */ e("div", { className: "truncate text-xs text-muted-foreground", children: f.description })
2004
+ ] }),
2007
2005
  /* @__PURE__ */ n("div", { className: "shrink-0 whitespace-nowrap text-xs text-muted-foreground", children: [
2008
2006
  V,
2009
2007
  " of ",
@@ -2014,71 +2012,68 @@ function xn({
2014
2012
  }
2015
2013
  ),
2016
2014
  /* @__PURE__ */ n("div", { className: "flex shrink-0 gap-1", children: [
2017
- /* @__PURE__ */ e($, { variant: "ghost", size: "icon", onClick: () => x(f), children: /* @__PURE__ */ e(Rt, {}) }),
2015
+ /* @__PURE__ */ e($, { variant: "ghost", size: "icon", onClick: () => C(f), children: /* @__PURE__ */ e(Mt, {}) }),
2018
2016
  /* @__PURE__ */ e(
2019
2017
  $,
2020
2018
  {
2021
2019
  variant: "ghost",
2022
2020
  size: "icon",
2023
2021
  onClick: () => {
2024
- window.confirm(`Delete translation "${f.name}"?`) && y.mutate(f.id);
2022
+ window.confirm(`Delete translation "${f.name}"?`) && L.mutate(f.id);
2025
2023
  },
2026
- children: /* @__PURE__ */ e(ft, {})
2024
+ children: /* @__PURE__ */ e(gt, {})
2027
2025
  }
2028
2026
  )
2029
2027
  ] })
2030
2028
  ] }),
2031
- A && /* @__PURE__ */ n("div", { className: "space-y-1 px-4 pb-3 pl-11", children: [
2032
- f.description && /* @__PURE__ */ e("div", { className: "break-all pb-1 font-mono text-xs", children: f.description }),
2033
- l.map((g) => /* @__PURE__ */ n("div", { className: "grid grid-cols-[10rem_1fr] gap-2 text-xs", children: [
2034
- /* @__PURE__ */ e("span", { className: "text-muted-foreground", children: s[g] ?? g }),
2035
- /* @__PURE__ */ e("span", { className: "break-all font-mono", children: L(g) || /* @__PURE__ */ e("span", { className: "text-muted-foreground", children: "—" }) })
2036
- ] }, g))
2037
- ] })
2029
+ q && /* @__PURE__ */ e("div", { className: "space-y-1 px-4 pb-3 pl-11", children: t.map((M) => /* @__PURE__ */ n("div", { className: "grid grid-cols-[10rem_1fr] gap-2 text-xs", children: [
2030
+ /* @__PURE__ */ e("span", { className: "text-muted-foreground", children: s[M] ?? M }),
2031
+ /* @__PURE__ */ e("span", { className: "break-all font-mono", children: I(M) || /* @__PURE__ */ e("span", { className: "text-muted-foreground", children: "—" }) })
2032
+ ] }, M)) })
2038
2033
  ] }, f.id);
2039
2034
  }) }),
2040
- /* @__PURE__ */ e(Ie, { open: u, onOpenChange: p, children: /* @__PURE__ */ n(Ke, { className: "max-w-lg", children: [
2041
- /* @__PURE__ */ n($e, { children: [
2042
- /* @__PURE__ */ e(Oe, { children: v ? `Edit ${v.name}` : "New Translation Rule" }),
2043
- /* @__PURE__ */ e(Ae, { children: "Set the equivalent values for each cluster. Rules with values on only one side of a pair are silently skipped for that comparison." })
2035
+ /* @__PURE__ */ e(Ke, { open: o, onOpenChange: u, children: /* @__PURE__ */ n($e, { className: "max-w-lg", children: [
2036
+ /* @__PURE__ */ n(Ie, { children: [
2037
+ /* @__PURE__ */ e(Oe, { children: p ? `Edit ${p.name}` : "New Translation Rule" }),
2038
+ /* @__PURE__ */ e(Re, { children: "Set the equivalent values for each cluster. Rules with values on only one side of a pair are silently skipped for that comparison." })
2044
2039
  ] }),
2045
2040
  /* @__PURE__ */ n("div", { className: "space-y-4 py-2", children: [
2046
2041
  /* @__PURE__ */ n("div", { className: "space-y-2", children: [
2047
- /* @__PURE__ */ e(re, { htmlFor: "tr-name", children: "Name" }),
2042
+ /* @__PURE__ */ e(ie, { htmlFor: "tr-name", children: "Name" }),
2048
2043
  /* @__PURE__ */ e(
2049
2044
  he,
2050
2045
  {
2051
2046
  id: "tr-name",
2052
- value: o.name,
2053
- onChange: (f) => h({ ...o, name: f.target.value }),
2047
+ value: v.name,
2048
+ onChange: (f) => d({ ...v, name: f.target.value }),
2054
2049
  placeholder: "key (ex. molten-url)"
2055
2050
  }
2056
2051
  )
2057
2052
  ] }),
2058
2053
  /* @__PURE__ */ n("div", { className: "space-y-2", children: [
2059
- /* @__PURE__ */ e(re, { htmlFor: "tr-desc", children: "Description (optional)" }),
2054
+ /* @__PURE__ */ e(ie, { htmlFor: "tr-desc", children: "Description (optional)" }),
2060
2055
  /* @__PURE__ */ e(
2061
2056
  he,
2062
2057
  {
2063
2058
  id: "tr-desc",
2064
- value: o.description,
2065
- onChange: (f) => h({ ...o, description: f.target.value }),
2059
+ value: v.description,
2060
+ onChange: (f) => d({ ...v, description: f.target.value }),
2066
2061
  placeholder: "Explain what this value represents"
2067
2062
  }
2068
2063
  )
2069
2064
  ] }),
2070
2065
  /* @__PURE__ */ n("div", { className: "space-y-3 pt-1", children: [
2071
2066
  /* @__PURE__ */ e("p", { className: "text-sm font-medium", children: "Values per cluster" }),
2072
- l.map((f) => /* @__PURE__ */ n("div", { className: "space-y-1", children: [
2073
- /* @__PURE__ */ e(re, { htmlFor: `tr-val-${f}`, className: "text-xs text-muted-foreground", children: s[f] ?? f }),
2067
+ t.map((f) => /* @__PURE__ */ n("div", { className: "space-y-1", children: [
2068
+ /* @__PURE__ */ e(ie, { htmlFor: `tr-val-${f}`, className: "text-xs text-muted-foreground", children: s[f] ?? f }),
2074
2069
  /* @__PURE__ */ e(
2075
2070
  he,
2076
2071
  {
2077
2072
  id: `tr-val-${f}`,
2078
- value: o.values[f] ?? "",
2079
- onChange: (A) => h({
2080
- ...o,
2081
- values: { ...o.values, [f]: A.target.value }
2073
+ value: v.values[f] ?? "",
2074
+ onChange: (q) => d({
2075
+ ...v,
2076
+ values: { ...v.values, [f]: q.target.value }
2082
2077
  }),
2083
2078
  placeholder: "Leave blank to remove",
2084
2079
  className: "font-mono text-xs"
@@ -2087,14 +2082,14 @@ function xn({
2087
2082
  ] }, f))
2088
2083
  ] })
2089
2084
  ] }),
2090
- /* @__PURE__ */ n(Re, { children: [
2091
- /* @__PURE__ */ n($, { variant: "outline", onClick: O, children: [
2085
+ /* @__PURE__ */ n(Ae, { children: [
2086
+ /* @__PURE__ */ n($, { variant: "outline", onClick: g, children: [
2092
2087
  /* @__PURE__ */ e(be, {}),
2093
2088
  "Cancel"
2094
2089
  ] }),
2095
- /* @__PURE__ */ n($, { onClick: J, disabled: !Z || W, children: [
2096
- /* @__PURE__ */ e(mt, {}),
2097
- W ? "Saving…" : "Save"
2090
+ /* @__PURE__ */ n($, { onClick: R, disabled: !X || Q, children: [
2091
+ /* @__PURE__ */ e(ht, {}),
2092
+ Q ? "Saving…" : "Save"
2098
2093
  ] })
2099
2094
  ] })
2100
2095
  ] }) })
@@ -2104,63 +2099,63 @@ function yn({
2104
2099
  originConfigId: t,
2105
2100
  apiPath: s = "/release-ignores"
2106
2101
  }) {
2107
- const { toast: a } = oe(), { fetchJson: r } = se(), d = de(), c = ["imaginarium", "release-ignores", t], { data: l, isLoading: u } = le({
2102
+ const { toast: a } = le(), { fetchJson: i } = ne(), l = oe(), c = ["imaginarium", "release-ignores", t], { data: o, isLoading: u } = re({
2108
2103
  queryKey: c,
2109
2104
  queryFn: async () => {
2110
- const h = await r(
2105
+ const h = await i(
2111
2106
  `${s}?where[originConfigId]=${encodeURIComponent(t)}`
2112
2107
  );
2113
2108
  return (h == null ? void 0 : h.items) ?? [];
2114
2109
  }
2115
2110
  }), p = U({
2116
- mutationFn: (h) => r(`${s}/${h}`, { method: "DELETE" }),
2111
+ mutationFn: (h) => i(`${s}/${h}`, { method: "DELETE" }),
2117
2112
  onSuccess: () => {
2118
- d.invalidateQueries({ queryKey: c }), a({ title: "Item removed from ignore list" });
2113
+ l.invalidateQueries({ queryKey: c }), a({ title: "Item removed from ignore list" });
2119
2114
  },
2120
2115
  onError: (h) => {
2121
2116
  a({ title: "Error", description: h.message, variant: "destructive" });
2122
2117
  }
2123
- }), v = U({
2124
- mutationFn: () => r(`${s}?originConfigId=${encodeURIComponent(t)}`, {
2118
+ }), w = U({
2119
+ mutationFn: () => i(`${s}?originConfigId=${encodeURIComponent(t)}`, {
2125
2120
  method: "DELETE"
2126
2121
  }),
2127
2122
  onSuccess: () => {
2128
- d.invalidateQueries({ queryKey: c }), a({ title: "All ignore rules cleared" });
2123
+ l.invalidateQueries({ queryKey: c }), a({ title: "All ignore rules cleared" });
2129
2124
  },
2130
2125
  onError: (h) => {
2131
2126
  a({ title: "Error", description: h.message, variant: "destructive" });
2132
2127
  }
2133
- }), k = () => {
2134
- window.confirm("Remove all ignore rules for this cluster? Items will appear normally in future snapshots.") && v.mutate();
2128
+ }), v = () => {
2129
+ window.confirm("Remove all ignore rules for this cluster? Items will appear normally in future snapshots.") && w.mutate();
2135
2130
  };
2136
2131
  if (u)
2137
2132
  return /* @__PURE__ */ e("div", { className: "text-center text-muted-foreground py-8", children: "Loading…" });
2138
- const o = l ?? [];
2133
+ const d = o ?? [];
2139
2134
  return /* @__PURE__ */ n("div", { className: "space-y-4", children: [
2140
2135
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
2141
- /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: o.length === 0 ? "No items are permanently ignored." : `${o.length} item${o.length === 1 ? "" : "s"} permanently ignored for this cluster.` }),
2142
- o.length > 0 && /* @__PURE__ */ n(
2136
+ /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: d.length === 0 ? "No items are permanently ignored." : `${d.length} item${d.length === 1 ? "" : "s"} permanently ignored for this cluster.` }),
2137
+ d.length > 0 && /* @__PURE__ */ n(
2143
2138
  $,
2144
2139
  {
2145
2140
  variant: "outline",
2146
2141
  size: "sm",
2147
- onClick: k,
2148
- disabled: v.isPending,
2142
+ onClick: v,
2143
+ disabled: w.isPending,
2149
2144
  children: [
2150
2145
  /* @__PURE__ */ e(Fe, {}),
2151
- v.isPending ? "Clearing…" : "Clear all"
2146
+ w.isPending ? "Clearing…" : "Clear all"
2152
2147
  ]
2153
2148
  }
2154
2149
  )
2155
2150
  ] }),
2156
- o.length > 0 && /* @__PURE__ */ e("div", { className: "rounded-md border", children: /* @__PURE__ */ n("table", { className: "w-full text-sm", children: [
2151
+ d.length > 0 && /* @__PURE__ */ e("div", { className: "rounded-md border", children: /* @__PURE__ */ n("table", { className: "w-full text-sm", children: [
2157
2152
  /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ n("tr", { className: "border-b bg-muted/50", children: [
2158
2153
  /* @__PURE__ */ e("th", { className: "px-4 py-2 text-left font-medium", children: "Type" }),
2159
2154
  /* @__PURE__ */ e("th", { className: "px-4 py-2 text-left font-medium", children: "Name" }),
2160
2155
  /* @__PURE__ */ e("th", { className: "px-4 py-2 text-left font-medium", children: "Reason" }),
2161
2156
  /* @__PURE__ */ e("th", { className: "px-4 py-2 text-right font-medium" })
2162
2157
  ] }) }),
2163
- /* @__PURE__ */ e("tbody", { children: o.map((h) => /* @__PURE__ */ n("tr", { className: "border-b last:border-0 hover:bg-muted/25", children: [
2158
+ /* @__PURE__ */ e("tbody", { children: d.map((h) => /* @__PURE__ */ n("tr", { className: "border-b last:border-0 hover:bg-muted/25", children: [
2164
2159
  /* @__PURE__ */ e("td", { className: "px-4 py-2 text-muted-foreground font-mono text-xs", children: h.itemType }),
2165
2160
  /* @__PURE__ */ e("td", { className: "px-4 py-2 font-medium", children: h.itemName }),
2166
2161
  /* @__PURE__ */ e("td", { className: "px-4 py-2 text-muted-foreground", children: h.reason ?? /* @__PURE__ */ e("span", { className: "italic text-xs", children: "—" }) }),
@@ -2172,117 +2167,135 @@ function yn({
2172
2167
  title: "Remove from ignore list",
2173
2168
  onClick: () => p.mutate(h.id),
2174
2169
  disabled: p.isPending,
2175
- children: /* @__PURE__ */ e(ft, {})
2170
+ children: /* @__PURE__ */ e(gt, {})
2176
2171
  }
2177
2172
  ) })
2178
2173
  ] }, h.id)) })
2179
2174
  ] }) })
2180
2175
  ] });
2181
2176
  }
2182
- const bn = [
2177
+ function bn(t, s) {
2178
+ return [...t].sort(
2179
+ (a, i) => (s[a] ?? a).localeCompare(s[i] ?? i, void 0, { sensitivity: "base" })
2180
+ );
2181
+ }
2182
+ const ct = ["dev", "stg", "prd"];
2183
+ function Nn(t) {
2184
+ const s = (t.tags ?? []).map((i) => i.toLowerCase()), a = ct.findIndex((i) => s.includes(i));
2185
+ return a === -1 ? ct.length : a;
2186
+ }
2187
+ function vn(t) {
2188
+ const s = Object.fromEntries(t.map((l) => [l.id, l.displayName])), a = /* @__PURE__ */ new Map();
2189
+ for (const l of t) {
2190
+ const c = Nn(l);
2191
+ a.has(c) || a.set(c, []), a.get(c).push(l.id);
2192
+ }
2193
+ return [...a.keys()].sort((l, c) => l - c).flatMap((l) => bn(a.get(l), s));
2194
+ }
2195
+ const wn = [
2183
2196
  { id: "releases", label: "Releases" },
2184
2197
  { id: "status", label: "Status" },
2185
2198
  { id: "translations", label: "Translations" },
2186
2199
  { id: "ignored", label: "Ignored" }
2187
2200
  ];
2188
- function Nn() {
2189
- var k;
2190
- const [t, s] = M("releases"), [a, r] = M(null), { configs: d } = ye(), [c, l] = M("");
2201
+ function kn() {
2202
+ var d;
2203
+ const [t, s] = A("releases"), [a, i] = A(null), { configs: l } = ye(), [c, o] = A("");
2191
2204
  je(() => {
2192
- !c && d.length > 0 && l(d[0].id);
2193
- }, [c, d]);
2194
- const u = j(() => {
2195
- const o = {};
2196
- return d.forEach((h) => {
2197
- o[h.id] = h.displayName;
2198
- }), o;
2199
- }, [d]), p = c || ((k = d[0]) == null ? void 0 : k.id) || "", v = d.map((o) => o.id).filter((o) => o !== p);
2205
+ !c && l.length > 0 && o(l[0].id);
2206
+ }, [c, l]);
2207
+ const u = B(() => {
2208
+ const h = {};
2209
+ return l.forEach((E) => {
2210
+ h[E.id] = E.displayName;
2211
+ }), h;
2212
+ }, [l]), p = c || ((d = l[0]) == null ? void 0 : d.id) || "", w = B(() => vn(l), [l]), v = w.filter((h) => h !== p);
2200
2213
  return /* @__PURE__ */ n("div", { className: "space-y-6", children: [
2201
2214
  /* @__PURE__ */ n("div", { children: [
2202
2215
  /* @__PURE__ */ e("h2", { className: "text-2xl font-semibold", children: "imp" }),
2203
2216
  /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: "Manage releases across clusters" })
2204
2217
  ] }),
2205
- /* @__PURE__ */ e("div", { className: "flex items-center gap-1 border-b pb-2", children: bn.map(({ id: o, label: h }) => /* @__PURE__ */ e(
2218
+ /* @__PURE__ */ e("div", { className: "flex items-center gap-1 border-b pb-2", children: wn.map(({ id: h, label: E }) => /* @__PURE__ */ e(
2206
2219
  $,
2207
2220
  {
2208
- variant: t === o ? "secondary" : "ghost",
2221
+ variant: t === h ? "secondary" : "ghost",
2209
2222
  size: "sm",
2210
- onClick: () => s(o),
2211
- children: h
2223
+ onClick: () => s(h),
2224
+ children: E
2212
2225
  },
2213
- o
2226
+ h
2214
2227
  )) }),
2215
- t === "releases" && (a == null ? /* @__PURE__ */ e(Jt, { onOpen: r }) : /* @__PURE__ */ e(mn, { releaseId: a, onBack: () => r(null) })),
2216
- t === "status" && (d.length === 0 ? /* @__PURE__ */ e("div", { className: "text-muted-foreground", children: "No clusters configured." }) : /* @__PURE__ */ n("div", { className: "space-y-4", children: [
2228
+ t === "releases" && (a == null ? /* @__PURE__ */ e(Lt, { onOpen: i }) : /* @__PURE__ */ e(hn, { releaseId: a, onBack: () => i(null) })),
2229
+ t === "status" && (l.length === 0 ? /* @__PURE__ */ e("div", { className: "text-muted-foreground", children: "No clusters configured." }) : /* @__PURE__ */ n("div", { className: "space-y-4", children: [
2217
2230
  /* @__PURE__ */ e("div", { className: "max-w-xs", children: /* @__PURE__ */ e(
2218
2231
  it,
2219
2232
  {
2220
2233
  label: "Reference",
2221
2234
  value: p,
2222
- onChange: l,
2223
- configs: d
2235
+ onChange: o,
2236
+ configs: l
2224
2237
  }
2225
2238
  ) }),
2226
- p ? /* @__PURE__ */ e(fn, { originConfigId: p, destConfigIds: v }) : /* @__PURE__ */ e("div", { className: "text-muted-foreground", children: "Select a reference cluster." })
2239
+ p ? /* @__PURE__ */ e(gn, { originConfigId: p, destConfigIds: v }) : /* @__PURE__ */ e("div", { className: "text-muted-foreground", children: "Select a reference cluster." })
2227
2240
  ] })),
2228
- t === "translations" && (d.length === 0 ? /* @__PURE__ */ e("div", { className: "text-muted-foreground", children: "No clusters configured." }) : /* @__PURE__ */ e(xn, { configIds: d.map((o) => o.id), clusterNames: u })),
2229
- t === "ignored" && (d.length === 0 ? /* @__PURE__ */ e("div", { className: "text-muted-foreground", children: "No clusters configured." }) : /* @__PURE__ */ n("div", { className: "space-y-4", children: [
2241
+ t === "translations" && (l.length === 0 ? /* @__PURE__ */ e("div", { className: "text-muted-foreground", children: "No clusters configured." }) : /* @__PURE__ */ e(xn, { configIds: w, clusterNames: u })),
2242
+ t === "ignored" && (l.length === 0 ? /* @__PURE__ */ e("div", { className: "text-muted-foreground", children: "No clusters configured." }) : /* @__PURE__ */ n("div", { className: "space-y-4", children: [
2230
2243
  /* @__PURE__ */ e("div", { className: "max-w-xs", children: /* @__PURE__ */ e(
2231
2244
  it,
2232
2245
  {
2233
2246
  label: "Cluster",
2234
2247
  value: p,
2235
- onChange: l,
2236
- configs: d
2248
+ onChange: o,
2249
+ configs: l
2237
2250
  }
2238
2251
  ) }),
2239
2252
  p ? /* @__PURE__ */ e(yn, { originConfigId: p }) : /* @__PURE__ */ e("div", { className: "text-muted-foreground", children: "Select a cluster." })
2240
2253
  ] }))
2241
2254
  ] });
2242
2255
  }
2243
- const vn = {
2256
+ const Cn = {
2244
2257
  id: "imaginarium.ui.ImpPage",
2245
2258
  path: "/imp",
2246
- element: Nn
2247
- }, wn = {
2259
+ element: kn
2260
+ }, Tn = {
2248
2261
  id: "imaginarium.ui.ImpNavItem",
2249
2262
  path: "/imp",
2250
2263
  label: "imp",
2251
- icon: Mt,
2264
+ icon: Dt,
2252
2265
  sort: 150
2253
- }, Rn = {
2266
+ }, Fn = {
2254
2267
  install(t) {
2255
- t.addPlugin(St, vn), t.addPlugin(Pt, wn), It.register(t, zt);
2268
+ t.addPlugin(Pt, Cn), t.addPlugin(Et, Tn), $t.register(t, Bt);
2256
2269
  }
2257
2270
  };
2258
2271
  export {
2259
2272
  it as C,
2260
- hn as D,
2273
+ pn as D,
2261
2274
  pe as E,
2262
- Vt as I,
2275
+ Ut as I,
2263
2276
  Qt as P,
2264
- mn as R,
2265
- fn as S,
2277
+ hn as R,
2278
+ gn as S,
2266
2279
  Xe as T,
2267
- Bt as a,
2268
- Lt as b,
2280
+ Jt as a,
2281
+ Vt as b,
2269
2282
  yn as c,
2270
- Yt as d,
2271
- Ht as e,
2272
- Jt as f,
2273
- Rn as g,
2274
- gt as h,
2275
- Nn as i,
2276
- Ut as j,
2283
+ Wt as d,
2284
+ _t as e,
2285
+ Lt as f,
2286
+ Fn as g,
2287
+ xt as h,
2288
+ kn as i,
2289
+ Ht as j,
2277
2290
  xn as k,
2278
- sn as l,
2279
- Zt as m,
2280
- on as n,
2281
- An as o,
2282
- rn as p,
2283
- ln as q,
2284
- en as r,
2285
- tn as t,
2291
+ an as l,
2292
+ en as m,
2293
+ dn as n,
2294
+ Dn as o,
2295
+ ln as p,
2296
+ on as q,
2297
+ tn as r,
2298
+ nn as t,
2286
2299
  Te as u
2287
2300
  };
2288
- //# sourceMappingURL=PluginSetup-Bi8huSsp.js.map
2301
+ //# sourceMappingURL=PluginSetup-DK7SSyOS.js.map