@synopackageland/sdk 0.9.9 → 0.10.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.
Files changed (43) hide show
  1. package/README.md +121 -0
  2. package/dist/i18n/bridge/de.json +6 -0
  3. package/dist/i18n/bridge/en.json +6 -0
  4. package/dist/i18n/bridge/es.json +6 -0
  5. package/dist/i18n/bridge/fr.json +6 -0
  6. package/dist/i18n/bridge/it.json +6 -0
  7. package/dist/i18n/bridge/ja.json +6 -0
  8. package/dist/i18n/bridge/ko.json +6 -0
  9. package/dist/i18n/bridge/zh-CN.json +6 -0
  10. package/dist/i18n/bridge/zh-TW.json +6 -0
  11. package/dist/i18n/shell/de.json +5 -1
  12. package/dist/i18n/shell/en.json +5 -1
  13. package/dist/i18n/shell/es.json +5 -1
  14. package/dist/i18n/shell/fr.json +5 -1
  15. package/dist/i18n/shell/it.json +5 -1
  16. package/dist/i18n/shell/ja.json +5 -1
  17. package/dist/i18n/shell/ko.json +5 -1
  18. package/dist/i18n/shell/zh-CN.json +5 -1
  19. package/dist/i18n/shell/zh-TW.json +5 -1
  20. package/dist/index.js +2492 -2338
  21. package/dist/src/bridge/i18n.d.ts +5 -0
  22. package/dist/src/context.d.ts +23 -2
  23. package/dist/src/delegate/root.d.ts +40 -0
  24. package/dist/src/index.d.ts +5 -2
  25. package/dist/src/protocol/v1.d.ts +49 -4
  26. package/dist/src/shell/AppShell.vue.d.ts +31 -10
  27. package/dist/src/shell/app-pages.d.ts +37 -0
  28. package/dist/src/shell/i18n.d.ts +4 -0
  29. package/dist/src/shell/pages.d.ts +7 -2
  30. package/dist/src/shell/slot-content.d.ts +2 -0
  31. package/dist/src/standalone.d.ts +5 -0
  32. package/dist/src/vue.d.ts +1 -0
  33. package/dist/style.css +1 -1
  34. package/dist/vue.js +1639 -1510
  35. package/package.json +4 -4
  36. package/spec/protocol/v1/README.md +154 -3
  37. package/spec/protocol/v1/errors.json +36 -4
  38. package/spec/protocol/v1/schema/root.jobs.get.json +19 -0
  39. package/spec/protocol/v1/schema/root.jobs.list.json +11 -0
  40. package/spec/protocol/v1/schema/root.jobs.stop.json +19 -0
  41. package/spec/protocol/v1/schema/root.run.json +6 -2
  42. package/spec/protocol/v1/schema/root.start.json +23 -0
  43. package/spec/protocol/v1/vectors/files.jsonl +11 -0
package/dist/vue.js CHANGED
@@ -1,11 +1,11 @@
1
- import { shellCopy as aa, nasCopy as be, nasErrorCopy as Le, format as Ae, uiLocale as ta, saveCopy as Ne, saveError as Ie, createNasProvider as Me, identityCopy as la, backgroundCopy as sa, createBackgroundPickerProvider as na, backgroundErrorCopy as ia, requestKey as Be, delegateCopy as Ke, labelSeparator as He, errorCopy as oa, scopedPicker as ua, openFolderInFileStation as ra, authorizationCopy as da } from "./index.js";
2
- import { DEFAULT_REQUEST_TIMEOUT as ts, FILE_STATION_APP as ls, activePage as ss, authorizationCatalogs as ns, backgroundCatalogs as is, catalogs as os, clientTimeout as us, createBackgroundSaveFacade as rs, createFileTransfers as ds, createPortalAccess as vs, decodeResponse as cs, delegateCatalogs as ps, encodeRequest as fs, fileStationPath as ys, identityCatalogs as ms, mergeCatalogs as bs, nasCatalogs as gs, openFileInFileStation as hs, portalCatalogs as ks, portalMessages as _s, protocolCodes as ws, protocolOps as xs, protocolSchemas as Cs, saveCatalogs as $s, shellCatalogs as Ss, shellPages as zs, uiLocales as Ps } from "./index.js";
3
- import { inject as Ge, ref as b, onBeforeUnmount as ye, defineComponent as oe, computed as L, openBlock as s, createBlock as x, unref as e, withCtx as l, createVNode as d, renderSlot as De, createElementVNode as $, markRaw as va, h as ca, onMounted as ge, createElementBlock as V, createTextVNode as g, toDisplayString as t, createCommentVNode as h, watch as Je, Fragment as ne, createSlots as Xe, withModifiers as Se, onUnmounted as Qe, nextTick as pa, renderList as ke, provide as fa } from "vue";
4
- import { AppLayout as ya, PageContent as ma, PageHeader as ba, AppSidebar as ga, FileTypeIcon as Ee, IconButton as Ue, Breadcrumb as ha, FilePicker as ka, Button as U, Callout as X, TreeView as _a, DataGrid as wa, Dialog as qe, SettingsSection as he, PathDisplay as pe, Link as Ye, Form as ze, FormItem as fe, Input as _e, FormActions as Pe, Card as Fe, Badge as $e, Select as Ze, Checkbox as xa, KeyValueRow as Ce, DataTable as Ca, formatFileSize as $a, Pagination as Sa, SettingsRow as za } from "@synopackageland/ui";
5
- import { Timer as Pa, Info as Va, ChevronLeft as Ia, ChevronRight as Ta, RotateCw as Ea, FolderOpen as Ua, ShieldCheck as Aa } from "@lucide/vue";
6
- const Da = /* @__PURE__ */ Symbol("executor-setup");
7
- function We() {
8
- return Ge(Da, {
1
+ import { shellCopy as da, isFullPage as va, uiLocale as Qe, nasCopy as ye, nasErrorCopy as Ye, format as Be, saveCopy as Ze, saveError as Te, createNasProvider as je, identityCopy as ca, backgroundCopy as pa, createBackgroundPickerProvider as fa, backgroundErrorCopy as ma, requestKey as Ne, delegateCopy as ea, labelSeparator as aa, errorCopy as ya, scopedPicker as ba, openFolderInFileStation as ga, authorizationCopy as ha } from "./index.js";
2
+ import { DEFAULT_REQUEST_TIMEOUT as gn, FILE_STATION_APP as hn, activePage as kn, authorizationCatalogs as _n, backgroundCatalogs as wn, bridgeCatalogs as xn, bridgeErrorCopy as Cn, catalogs as $n, clientTimeout as Sn, createBackgroundSaveFacade as zn, createFileTransfers as Pn, createPortalAccess as Vn, createStandaloneContext as In, createStandaloneHost as Tn, decodeResponse as An, delegateCatalogs as En, encodeRequest as Un, fileStationPath as Rn, identityCatalogs as Dn, mergeCatalogs as Bn, nasCatalogs as Fn, openFileInFileStation as qn, portalCatalogs as On, portalMessages as Ln, protocolCodes as Nn, protocolOps as Mn, protocolSchemas as Kn, saveCatalogs as Hn, shellCatalogs as Gn, shellPages as Jn, uiLocales as Wn } from "./index.js";
3
+ import { inject as ta, ref as y, onBeforeUnmount as fe, Comment as ka, Text as _a, Fragment as se, defineComponent as oe, computed as D, useTemplateRef as wa, watch as qe, useSlots as xa, watchEffect as Ca, openBlock as n, createBlock as k, resolveDynamicComponent as Ue, unref as e, normalizeProps as Me, guardReactiveProps as Ke, withCtx as t, createCommentVNode as b, renderSlot as ke, createVNode as c, createElementVNode as S, toDisplayString as l, normalizeClass as He, createSlots as Oe, createElementBlock as R, markRaw as $a, h as Sa, onMounted as ge, createTextVNode as g, withModifiers as ze, onUnmounted as la, nextTick as za, renderList as _e, provide as Pa } from "vue";
4
+ import { ensureDeviceViewport as Va, AppRoot as Ia, ConfigProvider as Ta, PageContent as Ge, PageHeader as Je, Callout as W, AppLayout as Aa, AppSidebar as Ea, AppSidebarUser as Ua, FileTypeIcon as Re, IconButton as De, Breadcrumb as Ra, FilePicker as Da, Button as F, TreeView as Ba, DataGrid as Fa, Dialog as Le, SettingsSection as he, PathDisplay as pe, SettingsRow as Ae, Link as na, Form as Pe, Input as we, FormActions as Ve, FormItem as be, Card as We, Badge as Se, Select as sa, Checkbox as qa, KeyValueRow as $e, DataTable as Oa, formatFileSize as La, Pagination as Na } from "@synopackageland/ui";
5
+ import { Timer as Ma, Info as Ka, ChevronLeft as Ha, ChevronRight as Ga, RotateCw as Ja, FolderOpen as Wa, ShieldCheck as Xa } from "@lucide/vue";
6
+ const Qa = /* @__PURE__ */ Symbol("executor-setup");
7
+ function ia() {
8
+ return ta(Qa, {
9
9
  async status() {
10
10
  return { state: "blocked", reason: "setup-unavailable" };
11
11
  },
@@ -17,174 +17,280 @@ function We() {
17
17
  }
18
18
  });
19
19
  }
20
- function Ml(y) {
21
- const q = b(!1), f = b(!1), a = b(), o = b("");
22
- let m = !1, i = 0, n, u;
23
- function r() {
24
- clearTimeout(n), clearTimeout(u);
20
+ function nn(r) {
21
+ const T = y(!1), o = y(!1), a = y(), u = y("");
22
+ let m = !1, i = 0, s, d;
23
+ function v() {
24
+ clearTimeout(s), clearTimeout(d);
25
25
  }
26
- function v(N = "") {
27
- i++, r(), a.value = void 0, o.value = N;
26
+ function p(I = "") {
27
+ i++, v(), a.value = void 0, u.value = I;
28
28
  }
29
- function k(N) {
29
+ function h(I) {
30
30
  if (m) return;
31
- const K = Date.parse(N.expiresAt) - Date.now();
32
- if (!Number.isFinite(K) || K <= 0) {
33
- v("expired");
31
+ const N = Date.parse(I.expiresAt) - Date.now();
32
+ if (!Number.isFinite(N) || N <= 0) {
33
+ p("expired");
34
34
  return;
35
35
  }
36
- r(), a.value = N, o.value = "", n = setTimeout(() => v("expired"), K);
37
- const O = i;
38
- u = setTimeout(async () => {
36
+ v(), a.value = I, u.value = "", s = setTimeout(() => p("expired"), N);
37
+ const q = i;
38
+ d = setTimeout(async () => {
39
39
  try {
40
- const Z = await y.call("identity.session");
41
- !m && i === O && k(Z);
40
+ const X = await r.call("identity.session");
41
+ !m && i === q && h(X);
42
42
  } catch {
43
- !m && i === O && v("expired");
43
+ !m && i === q && p("expired");
44
44
  }
45
- }, Math.min(6e4, K));
45
+ }, Math.min(6e4, N));
46
46
  }
47
- async function D() {
47
+ async function E() {
48
48
  try {
49
- const N = await y.call("identity.status");
49
+ const I = await r.call("identity.status");
50
50
  if (m) return;
51
- if (q.value = N.enabled === !0, q.value)
51
+ if (T.value = I.enabled === !0, T.value)
52
52
  try {
53
- k(await y.call("identity.session", { bootstrap: !0 }));
53
+ h(await r.call("identity.session", { bootstrap: !0 }));
54
54
  } catch {
55
- m || v();
55
+ m || p();
56
56
  }
57
- } catch (N) {
58
- const K = N?.code;
59
- q.value = !["unknown_method", "admin_required", "app_privilege_denied", "session_required"].includes(K || ""), q.value && (o.value = "unavailable");
57
+ } catch (I) {
58
+ const N = I?.code;
59
+ T.value = !["unknown_method", "admin_required", "app_privilege_denied", "session_required"].includes(N || ""), T.value && (u.value = "unavailable");
60
60
  } finally {
61
- m || (f.value = !0);
61
+ m || (o.value = !0);
62
62
  }
63
63
  }
64
- async function S(N, K) {
65
- const O = i;
64
+ async function z(I, N) {
65
+ const q = i;
66
66
  try {
67
- const Z = await y.call(N, K);
68
- if (m || q.value && O !== i) throw { code: "session_required" };
69
- return Z;
70
- } catch (Z) {
71
- const ae = Z?.code;
72
- throw !m && O === i && q.value && ["session_required", "session_revalidation_required"].includes(ae || "") && v(ae === "session_revalidation_required" ? "revalidate" : "expired"), Z;
67
+ const X = await r.call(I, N);
68
+ if (m || T.value && q !== i) throw { code: "session_required" };
69
+ return X;
70
+ } catch (X) {
71
+ const ae = X?.code;
72
+ throw !m && q === i && T.value && ["session_required", "session_revalidation_required"].includes(ae || "") && p(ae === "session_revalidation_required" ? "revalidate" : "expired"), X;
73
73
  }
74
74
  }
75
- async function c(N, K, O) {
76
- const Z = await y.call("identity.login", { account: N, password: K, otp: O });
77
- m || (i++, k(Z));
75
+ async function _(I, N, q) {
76
+ const X = await r.call("identity.login", { account: I, password: N, otp: q });
77
+ m || (i++, h(X));
78
78
  }
79
- async function w() {
80
- const N = await y.call("identity.session", { bootstrap: !0 });
81
- m || (i++, k(N));
79
+ async function $() {
80
+ const I = await r.call("identity.session", { bootstrap: !0 });
81
+ m || (i++, h(I));
82
82
  }
83
- async function z() {
84
- await y.call("identity.logout"), m || v();
83
+ async function x() {
84
+ await r.call("identity.logout"), m || p();
85
85
  }
86
- function M() {
87
- m = !0, v();
86
+ function V() {
87
+ m = !0, p();
88
88
  }
89
- return { enabled: q, ready: f, subject: a, notice: o, start: D, call: S, login: c, bootstrap: w, logout: z, dispose: M };
89
+ return { enabled: T, ready: o, subject: a, notice: u, start: E, call: z, login: _, bootstrap: $, logout: x, dispose: V };
90
90
  }
91
- function Ra() {
92
- const y = b(!1), q = b();
93
- let f = !1, a = 0, o;
91
+ function Ya() {
92
+ const r = y(!1), T = y();
93
+ let o = !1, a = 0, u;
94
94
  function m() {
95
- a++, o?.abort(), o = void 0, y.value = !1, q.value = void 0;
95
+ a++, u?.abort(), u = void 0, r.value = !1, T.value = void 0;
96
96
  }
97
- async function i(n) {
98
- if (f || y.value) return;
99
- const u = ++a, r = new AbortController();
100
- o = r, y.value = !0, q.value = void 0;
97
+ async function i(s) {
98
+ if (o || r.value) return;
99
+ const d = ++a, v = new AbortController();
100
+ u = v, r.value = !0, T.value = void 0;
101
101
  try {
102
- const v = await n(r.signal);
103
- return !f && u === a ? v : void 0;
104
- } catch (v) {
105
- !f && u === a && (q.value = v);
102
+ const p = await s(v.signal);
103
+ return !o && d === a ? p : void 0;
104
+ } catch (p) {
105
+ !o && d === a && (T.value = p);
106
106
  return;
107
107
  } finally {
108
- !f && u === a && (y.value = !1, o = void 0);
108
+ !o && d === a && (r.value = !1, u = void 0);
109
109
  }
110
110
  }
111
- return ye(() => {
112
- f = !0, m();
113
- }), { busy: y, error: q, run: i, cancel: m };
111
+ return fe(() => {
112
+ o = !0, m();
113
+ }), { busy: r, error: T, run: i, cancel: m };
114
114
  }
115
- const qa = { class: "app-page-content" }, Ba = /* @__PURE__ */ oe({
115
+ function oa(r) {
116
+ return Array.isArray(r) && r.some((T) => {
117
+ const o = T;
118
+ return o.type === ka ? !1 : o.type === _a ? String(o.children).trim() !== "" : o.type === se ? oa(o.children) : !0;
119
+ });
120
+ }
121
+ const Za = { status: Ka, background: Ma };
122
+ function ja(r, T) {
123
+ return r.map((o) => typeof o == "string" ? { id: o, title: T[o], icon: Za[o] } : o);
124
+ }
125
+ function et(r) {
126
+ const T = /* @__PURE__ */ new Map();
127
+ for (const o of r) {
128
+ if (o.hidden) continue;
129
+ let a = T.get(o.group);
130
+ a || T.set(o.group, a = o.group === void 0 ? { items: [] } : { label: o.group, items: [] }), a.items.push({ key: o.id, label: o.title, icon: o.icon, badge: o.badge });
131
+ }
132
+ return [...T.values()];
133
+ }
134
+ const at = { role: "alert" }, tt = {
135
+ key: 1,
136
+ class: "app-notices"
137
+ }, lt = { class: "app-page-content" }, nt = /* @__PURE__ */ oe({
116
138
  __name: "AppShell",
117
139
  props: {
118
140
  locale: {},
119
141
  modelValue: {},
120
142
  pages: {},
121
- description: {}
143
+ description: {},
144
+ ctx: {},
145
+ wideLayout: {},
146
+ sidebarStorageKey: {},
147
+ brandName: {},
148
+ brandIcon: {},
149
+ keepScroll: { type: Boolean },
150
+ pageWidth: {},
151
+ denied: { type: [Boolean, Object] },
152
+ appRoot: { type: Boolean }
122
153
  },
123
154
  emits: ["update:modelValue"],
124
- setup(y, { emit: q }) {
125
- const f = y, a = q, o = L(() => aa(f.locale)), m = { status: Va, background: Pa }, i = L(() => [{
126
- items: f.pages.map((u) => ({ key: u, label: o.value[u], icon: m[u] }))
127
- }]), n = L(() => o.value[f.modelValue] ?? o.value.status);
128
- return (u, r) => (s(), x(e(ya), {
129
- class: "app-shell",
130
- "min-height": "0",
131
- "wide-layout": "window"
132
- }, {
133
- sidebar: l(() => [
134
- d(e(ga), {
135
- "model-value": y.modelValue,
136
- groups: i.value,
137
- "onUpdate:modelValue": r[0] || (r[0] = (v) => a("update:modelValue", v))
138
- }, null, 8, ["model-value", "groups"])
139
- ]),
140
- default: l(() => [
141
- d(e(ma), { class: "app-page" }, {
142
- default: l(() => [
143
- d(e(ba), {
144
- title: n.value,
145
- description: y.description
155
+ setup(r, { emit: T }) {
156
+ const o = r, a = T, u = D(() => da(o.locale)), m = D(() => ja(o.pages, u.value)), i = D(() => et(m.value)), s = D(() => m.value.find((N) => N.id === o.modelValue)), d = D(() => s.value?.title ?? u.value[o.modelValue] ?? u.value.status), v = wa("scroller"), p = D(() => o.pages.some((N) => typeof N != "string"));
157
+ qe(() => o.modelValue, () => {
158
+ p.value && !o.keepScroll && v.value && (v.value.$el.scrollTop = 0);
159
+ }, { flush: "post" });
160
+ const h = xa(), E = D(() => o.denied === !0 ? {} : o.denied || void 0), z = D(() => o.ctx !== void 0 && va(o.ctx)), _ = D(() => z.value ? o.ctx : void 0), $ = (N, { slots: q }) => q.default?.(), x = D(() => o.ctx !== void 0 && !z.value);
161
+ function V() {
162
+ o.ctx?.host?.activateWindow?.();
163
+ }
164
+ const I = D(() => _.value?.user?.name ? _.value.user : void 0);
165
+ return Ca((N) => {
166
+ z.value && N(Va());
167
+ }), (N, q) => (n(), k(Ue(r.appRoot ? e(Ia) : $), Me(Ke(r.appRoot ? { modalScope: "app", dialogBounds: x.value ? "viewport" : "app", style: "height: 100%;", onActivate: V } : {})), {
168
+ default: t(() => [
169
+ (n(), k(Ue(r.appRoot ? e(Ta) : $), Me(Ke(r.appRoot ? { locale: e(Qe)(r.locale) } : {})), {
170
+ default: t(() => [
171
+ E.value ? (n(), k(e(Ge), {
172
+ key: 0,
173
+ class: "app-denied",
174
+ width: r.pageWidth
146
175
  }, {
147
- actions: l(() => [
148
- De(u.$slots, "actions", {}, void 0, !0)
176
+ default: t(() => [
177
+ E.value.header !== !1 ? (n(), k(e(Je), {
178
+ key: 0,
179
+ title: E.value.title ?? u.value.deniedTitle
180
+ }, null, 8, ["title"])) : b("", !0),
181
+ ke(N.$slots, "denied", {}, () => [
182
+ c(e(W), { tone: "danger" }, {
183
+ default: t(() => [
184
+ S("span", at, l(E.value.message ?? u.value.deniedMessage), 1)
185
+ ]),
186
+ _: 1
187
+ })
188
+ ], !0)
149
189
  ]),
150
190
  _: 3
151
- }, 8, ["title", "description"]),
152
- $("div", qa, [
153
- De(u.$slots, "default", {}, void 0, !0)
154
- ])
191
+ }, 8, ["width"])) : (n(), k(e(Aa), {
192
+ key: 1,
193
+ class: He(["app-shell", { "app-shell-fill": s.value?.fill }]),
194
+ "min-height": "0",
195
+ "wide-layout": r.wideLayout ?? (z.value ? "web" : "window"),
196
+ "sidebar-storage-key": r.sidebarStorageKey,
197
+ "brand-name": r.brandName ?? _.value?.displayName,
198
+ "brand-icon": r.brandIcon ?? _.value?.appIcon
199
+ }, Oe({
200
+ sidebar: t(() => [
201
+ c(e(Ea), {
202
+ "model-value": r.modelValue,
203
+ groups: i.value,
204
+ "onUpdate:modelValue": q[0] || (q[0] = (X) => a("update:modelValue", X))
205
+ }, null, 8, ["model-value", "groups"])
206
+ ]),
207
+ default: t(() => [
208
+ c(e(Ge), {
209
+ ref_key: "scroller",
210
+ ref: v,
211
+ class: He(["app-page", { "app-page-fill": s.value?.fill }]),
212
+ width: r.pageWidth
213
+ }, {
214
+ default: t(() => [
215
+ s.value?.header !== !1 ? (n(), k(e(Je), {
216
+ key: 0,
217
+ title: d.value,
218
+ description: s.value?.description ?? r.description
219
+ }, {
220
+ actions: t(() => [
221
+ ke(N.$slots, "actions", { page: r.modelValue }, void 0, !0)
222
+ ]),
223
+ _: 3
224
+ }, 8, ["title", "description"])) : b("", !0),
225
+ e(oa)(h.notices?.({ page: r.modelValue })) ? (n(), R("div", tt, [
226
+ ke(N.$slots, "notices", { page: r.modelValue }, void 0, !0)
227
+ ])) : b("", !0),
228
+ S("div", lt, [
229
+ s.value?.component ? (n(), k(Ue(s.value.component), {
230
+ key: s.value.id
231
+ })) : b("", !0),
232
+ ke(N.$slots, "default", { page: r.modelValue }, void 0, !0)
233
+ ])
234
+ ]),
235
+ _: 3
236
+ }, 8, ["class", "width"])
237
+ ]),
238
+ _: 2
239
+ }, [
240
+ h["sidebar-footer"] || I.value ? {
241
+ name: "sidebar-footer",
242
+ fn: t(() => [
243
+ ke(N.$slots, "sidebar-footer", {}, () => [
244
+ I.value ? (n(), k(e(Ua), {
245
+ key: 0,
246
+ name: I.value.name,
247
+ detail: I.value.isAdmin ? u.value.administrator : u.value.dsmUser
248
+ }, null, 8, ["name", "detail"])) : b("", !0)
249
+ ], !0)
250
+ ]),
251
+ key: "0"
252
+ } : void 0,
253
+ h.toolbar ? {
254
+ name: "toolbar",
255
+ fn: t(() => [
256
+ ke(N.$slots, "toolbar", { page: r.modelValue }, void 0, !0)
257
+ ]),
258
+ key: "1"
259
+ } : void 0
260
+ ]), 1032, ["class", "wide-layout", "sidebar-storage-key", "brand-name", "brand-icon"]))
155
261
  ]),
156
262
  _: 3
157
- })
263
+ }, 16))
158
264
  ]),
159
265
  _: 3
160
- }));
266
+ }, 16));
161
267
  }
162
- }), ue = (y, q) => {
163
- const f = y.__vccOpts || y;
164
- for (const [a, o] of q)
165
- f[a] = o;
166
- return f;
167
- }, Kl = /* @__PURE__ */ ue(Ba, [["__scopeId", "data-v-05f63ca5"]]), Oe = ["B", "KB", "MB", "GB", "TB", "PB"];
168
- function Re(y, q) {
169
- let f = 0, a = y;
170
- for (; a >= 1024 && f < Oe.length - 1; )
171
- a /= 1024, f++;
172
- return `${new Intl.NumberFormat(q, { maximumFractionDigits: f ? 1 : 0 }).format(a)} ${Oe[f]}`;
268
+ }), de = (r, T) => {
269
+ const o = r.__vccOpts || r;
270
+ for (const [a, u] of T)
271
+ o[a] = u;
272
+ return o;
273
+ }, sn = /* @__PURE__ */ de(nt, [["__scopeId", "data-v-60e630d5"]]), Xe = ["B", "KB", "MB", "GB", "TB", "PB"];
274
+ function Fe(r, T) {
275
+ let o = 0, a = r;
276
+ for (; a >= 1024 && o < Xe.length - 1; )
277
+ a /= 1024, o++;
278
+ return `${new Intl.NumberFormat(T, { maximumFractionDigits: o ? 1 : 0 }).format(a)} ${Xe[o]}`;
173
279
  }
174
- const Fa = ["aria-busy", "aria-label"], Oa = { class: "file-toolbar file-location" }, La = ["aria-label"], Na = {
280
+ const st = ["aria-busy", "aria-label"], it = { class: "file-toolbar file-location" }, ot = ["aria-label"], ut = {
175
281
  key: 0,
176
282
  class: "file-toolbar"
177
- }, Ma = {
283
+ }, rt = {
178
284
  key: 1,
179
285
  role: "status"
180
- }, Ka = { role: "alert" }, Ha = {
286
+ }, dt = { role: "alert" }, vt = {
181
287
  key: 4,
182
288
  role: "status"
183
- }, Ga = { class: "file-columns" }, Ja = ["aria-label"], Xa = { class: "file-content" }, Qa = { class: "file-name" }, Ya = { class: "file-empty" }, Za = { class: "file-bytes" }, Wa = {
289
+ }, ct = { class: "file-columns" }, pt = ["aria-label"], ft = { class: "file-content" }, mt = { class: "file-name" }, yt = { class: "file-empty" }, bt = { class: "file-bytes" }, gt = {
184
290
  key: 5,
185
291
  class: "file-selection",
186
292
  role: "status"
187
- }, ja = /* @__PURE__ */ oe({
293
+ }, ht = /* @__PURE__ */ oe({
188
294
  __name: "FileBrowser",
189
295
  props: {
190
296
  provider: {},
@@ -193,310 +299,310 @@ const Fa = ["aria-busy", "aria-label"], Oa = { class: "file-toolbar file-locatio
193
299
  transfers: { type: Boolean, default: !1 }
194
300
  },
195
301
  emits: ["selected"],
196
- setup(y, { emit: q }) {
197
- const f = y, a = q, o = L(() => be(f.locale)), m = Ra(), { busy: i, error: n } = m, u = b([]), r = b([]), v = b([]), k = b(), D = b(), S = b(), c = b([]), w = b(), z = b({ key: "name", direction: "asc" }), M = b(0), N = b([]), K = b(!1);
198
- let O = new AbortController();
199
- async function Z() {
200
- const C = k.value;
201
- !C || C.isDir || !f.provider.download || await m.run(async (P) => (await f.provider.info(C.path, P), f.provider.download(C.path), !0));
302
+ setup(r, { emit: T }) {
303
+ const o = r, a = T, u = D(() => ye(o.locale)), m = Ya(), { busy: i, error: s } = m, d = y([]), v = y([]), p = y([]), h = y(), E = y(), z = y(), _ = y([]), $ = y(), x = y({ key: "name", direction: "asc" }), V = y(0), I = y([]), N = y(!1);
304
+ let q = new AbortController();
305
+ async function X() {
306
+ const C = h.value;
307
+ !C || C.isDir || !o.provider.download || await m.run(async (P) => (await o.provider.info(C.path, P), o.provider.download(C.path), !0));
202
308
  }
203
309
  async function ae() {
204
- const C = v.value.at(-1)?.path, P = N.value[0];
205
- if (!C || !P || !f.provider.upload) return;
206
- K.value = !1, await m.run(async (p) => (await f.provider.upload(C, P, p), !0)) && (N.value = [], await re(v.value), K.value = !0);
310
+ const C = p.value.at(-1)?.path, P = I.value[0];
311
+ if (!C || !P || !o.provider.upload) return;
312
+ N.value = !1, await m.run(async (f) => (await o.provider.upload(C, P, f), !0)) && (I.value = [], await ue(p.value), N.value = !0);
207
313
  }
208
- const W = L(() => [
209
- { key: "name", label: o.value.nameColumn, sortable: !0 },
210
- { key: "kind", label: o.value.kindColumn },
211
- { key: "bytes", label: o.value.sizeColumn, align: "right", sortable: !0 }
212
- ]), H = va((C, { attrs: P }) => ca(Ee, { ...P, kind: "folder" }));
314
+ const Z = D(() => [
315
+ { key: "name", label: u.value.nameColumn, sortable: !0 },
316
+ { key: "kind", label: u.value.kindColumn },
317
+ { key: "bytes", label: u.value.sizeColumn, align: "right", sortable: !0 }
318
+ ]), H = $a((C, { attrs: P }) => Sa(Re, { ...P, kind: "folder" }));
213
319
  function j(C) {
214
320
  return { id: C.path, label: C.name, icon: H, data: C };
215
321
  }
216
322
  function te(C) {
217
- k.value = C, a("selected", C?.path);
323
+ h.value = C, a("selected", C?.path);
218
324
  }
219
- function se(C) {
220
- D.value = C.path, te(f.mode === "folder" ? C.isDir ? C : v.value.at(-1) : C.isDir ? void 0 : C);
325
+ function ne(C) {
326
+ E.value = C.path, te(o.mode === "folder" ? C.isDir ? C : p.value.at(-1) : C.isDir ? void 0 : C);
221
327
  }
222
328
  function Q(C) {
223
- C.isDir ? ve(C) : se(C);
329
+ C.isDir ? ve(C) : ne(C);
224
330
  }
225
- const Y = (C) => u.value.find((P) => P.path === C);
226
- function G(C, P, I = []) {
227
- for (const p of C) {
228
- const B = [...I, p.data];
229
- if (p.id === P) return B;
230
- const _ = G(p.children ?? [], P, B);
231
- if (_) return _;
331
+ const Y = (C) => d.value.find((P) => P.path === C);
332
+ function G(C, P, A = []) {
333
+ for (const f of C) {
334
+ const M = [...A, f.data];
335
+ if (f.id === P) return M;
336
+ const w = G(f.children ?? [], P, M);
337
+ if (w) return w;
232
338
  }
233
339
  }
234
340
  function le(C, P) {
235
- for (const I of C) {
236
- if (I.id === P) return I;
237
- const p = le(I.children ?? [], P);
238
- if (p) return p;
341
+ for (const A of C) {
342
+ if (A.id === P) return A;
343
+ const f = le(A.children ?? [], P);
344
+ if (f) return f;
239
345
  }
240
346
  }
241
- function R(C, P, I) {
242
- return C.map((p) => p.id === P ? { ...p, children: I } : p.children ? { ...p, children: R(p.children, P, I) } : p);
347
+ function L(C, P, A) {
348
+ return C.map((f) => f.id === P ? { ...f, children: A } : f.children ? { ...f, children: L(f.children, P, A) } : f);
243
349
  }
244
- let T = 0;
245
- async function E(C) {
246
- const P = ++T;
247
- for (const I of C.slice(0, -1)) {
248
- const p = le(r.value, I.path);
249
- if (!p) break;
250
- if (p.children === void 0) {
251
- const B = await J(p);
252
- if (P !== T || !B) return;
253
- r.value = R(r.value, p.id, B);
350
+ let U = 0;
351
+ async function B(C) {
352
+ const P = ++U;
353
+ for (const A of C.slice(0, -1)) {
354
+ const f = le(v.value, A.path);
355
+ if (!f) break;
356
+ if (f.children === void 0) {
357
+ const M = await J(f);
358
+ if (P !== U || !M) return;
359
+ v.value = L(v.value, f.id, M);
254
360
  }
255
- c.value.includes(p.id) || (c.value = [...c.value, p.id]);
361
+ _.value.includes(f.id) || (_.value = [..._.value, f.id]);
256
362
  }
257
- w.value = C.at(-1)?.path;
363
+ $.value = C.at(-1)?.path;
258
364
  }
259
365
  async function J(C) {
260
- const P = M.value, I = O.signal;
366
+ const P = V.value, A = q.signal;
261
367
  try {
262
- const p = [];
263
- let B = 0;
264
- for (; B !== void 0; ) {
265
- const _ = await f.provider.list(C.id, { offset: B, sortBy: "name", sortDirection: "ASC" }, I);
266
- if (I.aborted || P !== M.value) return;
267
- p.push(..._.entries.filter((ie) => ie.isDir).map(j)), B = _.nextOffset;
368
+ const f = [];
369
+ let M = 0;
370
+ for (; M !== void 0; ) {
371
+ const w = await o.provider.list(C.id, { offset: M, sortBy: "name", sortDirection: "ASC" }, A);
372
+ if (A.aborted || P !== V.value) return;
373
+ f.push(...w.entries.filter((ie) => ie.isDir).map(j)), M = w.nextOffset;
268
374
  }
269
- return p;
270
- } catch (p) {
271
- !I.aborted && P === M.value && (n.value = p, te());
375
+ return f;
376
+ } catch (f) {
377
+ !A.aborted && P === V.value && (s.value = f, te());
272
378
  return;
273
379
  }
274
380
  }
275
- async function re(C, P = !1) {
381
+ async function ue(C, P = !1) {
276
382
  if (i.value) return;
277
- te(), D.value = void 0, u.value = P ? u.value : [], S.value = P ? S.value : void 0;
278
- const I = P ? S.value ?? 0 : 0, p = C.at(-1)?.path;
279
- v.value = C;
280
- const B = await m.run((_) => p ? f.provider.list(p, { offset: I, sortBy: z.value.key, sortDirection: z.value.direction === "asc" ? "ASC" : "DESC" }, _) : f.provider.shares(I, _));
281
- B && (u.value = P ? [...u.value, ...B.entries] : B.entries, S.value = B.nextOffset, p ? f.mode === "folder" && !P && te(C.at(-1)) : r.value = u.value.filter((_) => _.isDir).map(j), P || E(C));
383
+ te(), E.value = void 0, d.value = P ? d.value : [], z.value = P ? z.value : void 0;
384
+ const A = P ? z.value ?? 0 : 0, f = C.at(-1)?.path;
385
+ p.value = C;
386
+ const M = await m.run((w) => f ? o.provider.list(f, { offset: A, sortBy: x.value.key, sortDirection: x.value.direction === "asc" ? "ASC" : "DESC" }, w) : o.provider.shares(A, w));
387
+ M && (d.value = P ? [...d.value, ...M.entries] : M.entries, z.value = M.nextOffset, f ? o.mode === "folder" && !P && te(C.at(-1)) : v.value = d.value.filter((w) => w.isDir).map(j), P || B(C));
282
388
  }
283
- const we = L(() => [{ id: "", display: o.value.roots }, ...v.value.map((C) => ({ id: C.path, display: C.name }))]);
284
- function xe(C) {
285
- const P = we.value.findIndex((I) => I.id === C.id);
286
- P < v.value.length && me(v.value.slice(0, P));
389
+ const xe = D(() => [{ id: "", display: u.value.roots }, ...p.value.map((C) => ({ id: C.path, display: C.name }))]);
390
+ function Ce(C) {
391
+ const P = xe.value.findIndex((A) => A.id === C.id);
392
+ P < p.value.length && me(p.value.slice(0, P));
287
393
  }
288
394
  function ve(C) {
289
- me([...v.value, C]);
395
+ me([...p.value, C]);
290
396
  }
291
- const ce = b([[]]), de = b(0);
397
+ const ce = y([[]]), re = y(0);
292
398
  function me(C) {
293
- i.value || (C.at(-1)?.path !== v.value.at(-1)?.path && (ce.value = [...ce.value.slice(0, de.value + 1), C], de.value++), re(C));
399
+ i.value || (C.at(-1)?.path !== p.value.at(-1)?.path && (ce.value = [...ce.value.slice(0, re.value + 1), C], re.value++), ue(C));
294
400
  }
295
- function F(C) {
296
- i.value || (de.value += C, re(ce.value[de.value]));
401
+ function K(C) {
402
+ i.value || (re.value += C, ue(ce.value[re.value]));
297
403
  }
298
404
  function ee(C) {
299
- z.value = { key: C?.key === "bytes" ? "size" : "name", direction: C?.direction ?? "asc" }, re(v.value);
405
+ x.value = { key: C?.key === "bytes" ? "size" : "name", direction: C?.direction ?? "asc" }, ue(p.value);
300
406
  }
301
- function A() {
302
- i.value || (M.value++, O.abort(), O = new AbortController(), r.value = [], c.value = [], w.value = void 0, ce.value = [[]], de.value = 0, re([]));
407
+ function O() {
408
+ i.value || (V.value++, q.abort(), q = new AbortController(), v.value = [], _.value = [], $.value = void 0, ce.value = [[]], re.value = 0, ue([]));
303
409
  }
304
410
  return ge(() => {
305
- re([]);
306
- }), ye(() => {
307
- M.value++, O.abort();
308
- }), (C, P) => (s(), V("section", {
411
+ ue([]);
412
+ }), fe(() => {
413
+ V.value++, q.abort();
414
+ }), (C, P) => (n(), R("section", {
309
415
  class: "file-browser",
310
416
  "aria-busy": e(i),
311
- "aria-label": o.value.title
417
+ "aria-label": u.value.title
312
418
  }, [
313
- $("div", Oa, [
314
- d(e(Ue), {
315
- label: o.value.back,
419
+ S("div", it, [
420
+ c(e(De), {
421
+ label: u.value.back,
316
422
  size: "sm",
317
- disabled: e(i) || de.value === 0,
318
- onClick: P[0] || (P[0] = (I) => F(-1))
423
+ disabled: e(i) || re.value === 0,
424
+ onClick: P[0] || (P[0] = (A) => K(-1))
319
425
  }, {
320
- default: l(() => [
321
- d(e(Ia), {
426
+ default: t(() => [
427
+ c(e(Ha), {
322
428
  size: 16,
323
429
  "aria-hidden": "true"
324
430
  })
325
431
  ]),
326
432
  _: 1
327
433
  }, 8, ["label", "disabled"]),
328
- d(e(Ue), {
329
- label: o.value.forward,
434
+ c(e(De), {
435
+ label: u.value.forward,
330
436
  size: "sm",
331
- disabled: e(i) || de.value === ce.value.length - 1,
332
- onClick: P[1] || (P[1] = (I) => F(1))
437
+ disabled: e(i) || re.value === ce.value.length - 1,
438
+ onClick: P[1] || (P[1] = (A) => K(1))
333
439
  }, {
334
- default: l(() => [
335
- d(e(Ta), {
440
+ default: t(() => [
441
+ c(e(Ga), {
336
442
  size: 16,
337
443
  "aria-hidden": "true"
338
444
  })
339
445
  ]),
340
446
  _: 1
341
447
  }, 8, ["label", "disabled"]),
342
- d(e(Ue), {
343
- label: o.value.refresh,
448
+ c(e(De), {
449
+ label: u.value.refresh,
344
450
  size: "sm",
345
451
  disabled: e(i),
346
- onClick: A
452
+ onClick: O
347
453
  }, {
348
- default: l(() => [
349
- d(e(Ea), {
454
+ default: t(() => [
455
+ c(e(Ja), {
350
456
  size: 14,
351
457
  "aria-hidden": "true"
352
458
  })
353
459
  ]),
354
460
  _: 1
355
461
  }, 8, ["label", "disabled"]),
356
- $("nav", {
462
+ S("nav", {
357
463
  class: "file-path",
358
- "aria-label": o.value.location
464
+ "aria-label": u.value.location
359
465
  }, [
360
- d(e(ha), {
361
- items: we.value,
362
- "collapsed-label": o.value.fullPath,
363
- onClickItem: xe
466
+ c(e(Ra), {
467
+ items: xe.value,
468
+ "collapsed-label": u.value.fullPath,
469
+ onClickItem: Ce
364
470
  }, null, 8, ["items", "collapsed-label"])
365
- ], 8, La)
471
+ ], 8, ot)
366
472
  ]),
367
- y.transfers && y.provider.upload && v.value.length ? (s(), V("div", Na, [
368
- d(e(ka), {
369
- modelValue: N.value,
370
- "onUpdate:modelValue": P[2] || (P[2] = (I) => N.value = I),
473
+ r.transfers && r.provider.upload && p.value.length ? (n(), R("div", ut, [
474
+ c(e(Da), {
475
+ modelValue: I.value,
476
+ "onUpdate:modelValue": P[2] || (P[2] = (A) => I.value = A),
371
477
  variant: "compact",
372
478
  disabled: e(i),
373
479
  "max-files": 1,
374
480
  "max-size": 16 * 1024 ** 3,
375
- title: o.value.upload,
376
- onRejected: P[3] || (P[3] = (I) => n.value = { code: "upload_size_required" })
481
+ title: u.value.upload,
482
+ onRejected: P[3] || (P[3] = (A) => s.value = { code: "upload_size_required" })
377
483
  }, null, 8, ["modelValue", "disabled", "title"]),
378
- d(e(U), {
484
+ c(e(F), {
379
485
  variant: "primary",
380
- disabled: e(i) || !N.value.length,
486
+ disabled: e(i) || !I.value.length,
381
487
  onClick: ae
382
488
  }, {
383
- default: l(() => [
384
- g(t(o.value.upload), 1)
489
+ default: t(() => [
490
+ g(l(u.value.upload), 1)
385
491
  ]),
386
492
  _: 1
387
493
  }, 8, ["disabled"])
388
- ])) : h("", !0),
389
- K.value ? (s(), V("p", Ma, t(o.value.uploaded), 1)) : h("", !0),
390
- y.transfers && y.provider.download && k.value && !k.value.isDir && !e(n) ? (s(), x(e(U), {
494
+ ])) : b("", !0),
495
+ N.value ? (n(), R("p", rt, l(u.value.uploaded), 1)) : b("", !0),
496
+ r.transfers && r.provider.download && h.value && !h.value.isDir && !e(s) ? (n(), k(e(F), {
391
497
  key: 2,
392
498
  variant: "secondary",
393
499
  disabled: e(i),
394
- onClick: Z
500
+ onClick: X
395
501
  }, {
396
- default: l(() => [
397
- g(t(o.value.download), 1)
502
+ default: t(() => [
503
+ g(l(u.value.download), 1)
398
504
  ]),
399
505
  _: 1
400
- }, 8, ["disabled"])) : h("", !0),
401
- e(n) ? (s(), x(e(X), {
506
+ }, 8, ["disabled"])) : b("", !0),
507
+ e(s) ? (n(), k(e(W), {
402
508
  key: 3,
403
509
  tone: "danger"
404
510
  }, {
405
- default: l(() => [
406
- $("span", Ka, t(e(Le)(e(n), o.value)), 1)
511
+ default: t(() => [
512
+ S("span", dt, l(e(Ye)(e(s), u.value)), 1)
407
513
  ]),
408
514
  _: 1
409
- })) : h("", !0),
410
- e(i) ? (s(), V("p", Ha, t(o.value.loading), 1)) : h("", !0),
411
- $("div", Ga, [
412
- $("aside", {
515
+ })) : b("", !0),
516
+ e(i) ? (n(), R("p", vt, l(u.value.loading), 1)) : b("", !0),
517
+ S("div", ct, [
518
+ S("aside", {
413
519
  class: "file-tree",
414
- "aria-label": o.value.roots
520
+ "aria-label": u.value.roots
415
521
  }, [
416
- r.value.length ? (s(), x(e(_a), {
417
- key: M.value,
522
+ v.value.length ? (n(), k(e(Ba), {
523
+ key: V.value,
418
524
  "selection-style": "background",
419
- modelValue: w.value,
420
- "onUpdate:modelValue": P[4] || (P[4] = (I) => w.value = I),
421
- nodes: r.value,
422
- "onUpdate:nodes": P[5] || (P[5] = (I) => r.value = I),
423
- expanded: c.value,
424
- "onUpdate:expanded": P[6] || (P[6] = (I) => c.value = I),
525
+ modelValue: $.value,
526
+ "onUpdate:modelValue": P[4] || (P[4] = (A) => $.value = A),
527
+ nodes: v.value,
528
+ "onUpdate:nodes": P[5] || (P[5] = (A) => v.value = A),
529
+ expanded: _.value,
530
+ "onUpdate:expanded": P[6] || (P[6] = (A) => _.value = A),
425
531
  "load-children": J,
426
- "expand-label": (I, p) => e(Ae)(p ? o.value.collapse : o.value.expand, { name: I.label }),
427
- onSelect: P[7] || (P[7] = (I) => me(G(r.value, I.id) ?? [I.data]))
428
- }, null, 8, ["modelValue", "nodes", "expanded", "expand-label"])) : h("", !0)
429
- ], 8, Ja),
430
- $("div", Xa, [
431
- e(n) ? h("", !0) : (s(), x(e(wa), {
532
+ "expand-label": (A, f) => e(Be)(f ? u.value.collapse : u.value.expand, { name: A.label }),
533
+ onSelect: P[7] || (P[7] = (A) => me(G(v.value, A.id) ?? [A.data]))
534
+ }, null, 8, ["modelValue", "nodes", "expanded", "expand-label"])) : b("", !0)
535
+ ], 8, pt),
536
+ S("div", ft, [
537
+ e(s) ? b("", !0) : (n(), k(e(Fa), {
432
538
  key: 0,
433
- columns: W.value,
434
- rows: u.value.map((I) => ({ ...I, kind: I.isDir ? o.value.directoryKind : o.value.fileKind })),
539
+ columns: Z.value,
540
+ rows: d.value.map((A) => ({ ...A, kind: A.isDir ? u.value.directoryKind : u.value.fileKind })),
435
541
  "row-key": "path",
436
542
  footer: !1,
437
543
  resizable: !1,
438
544
  "local-sort": !1,
439
545
  "local-pagination": !1,
440
546
  loading: e(i),
441
- "loading-text": o.value.loading,
442
- sort: { key: z.value.key === "size" ? "bytes" : z.value.key, direction: z.value.direction },
443
- labels: { empty: o.value.emptyFolder },
547
+ "loading-text": u.value.loading,
548
+ sort: { key: x.value.key === "size" ? "bytes" : x.value.key, direction: x.value.direction },
549
+ labels: { empty: u.value.emptyFolder },
444
550
  "single-select": "",
445
- "selected-keys": D.value ? [D.value] : [],
551
+ "selected-keys": E.value ? [E.value] : [],
446
552
  "onUpdate:sort": ee,
447
- "onUpdate:selectedKeys": P[8] || (P[8] = (I) => {
448
- e(i) || se(Y(I[0]));
553
+ "onUpdate:selectedKeys": P[8] || (P[8] = (A) => {
554
+ e(i) || ne(Y(A[0]));
449
555
  }),
450
- onRowActivate: P[9] || (P[9] = (I) => {
451
- e(i) || Q(Y(I.path));
556
+ onRowActivate: P[9] || (P[9] = (A) => {
557
+ e(i) || Q(Y(A.path));
452
558
  }),
453
- onRowDblclick: P[10] || (P[10] = (I) => {
454
- e(i) || Q(Y(I.path));
559
+ onRowDblclick: P[10] || (P[10] = (A) => {
560
+ e(i) || Q(Y(A.path));
455
561
  })
456
562
  }, {
457
- "cell-name": l(({ row: I }) => [
458
- $("span", Qa, [
459
- d(e(Ee), {
460
- kind: I.isDir ? "folder" : "file",
461
- name: I.name
563
+ "cell-name": t(({ row: A }) => [
564
+ S("span", mt, [
565
+ c(e(Re), {
566
+ kind: A.isDir ? "folder" : "file",
567
+ name: A.name
462
568
  }, null, 8, ["kind", "name"]),
463
- g(t(I.name), 1)
569
+ g(l(A.name), 1)
464
570
  ])
465
571
  ]),
466
- empty: l(() => [
467
- $("div", Ya, [
468
- d(e(Ee), {
572
+ empty: t(() => [
573
+ S("div", yt, [
574
+ c(e(Re), {
469
575
  kind: "folder",
470
576
  size: [40, 40]
471
577
  }),
472
- $("span", null, t(o.value.emptyFolder), 1)
578
+ S("span", null, l(u.value.emptyFolder), 1)
473
579
  ])
474
580
  ]),
475
- "cell-bytes": l(({ row: I }) => [
476
- $("span", Za, t(I.isDir || I.bytes === void 0 ? "—" : e(Re)(I.bytes, e(ta)(y.locale))), 1)
581
+ "cell-bytes": t(({ row: A }) => [
582
+ S("span", bt, l(A.isDir || A.bytes === void 0 ? "—" : e(Fe)(A.bytes, e(Qe)(r.locale))), 1)
477
583
  ]),
478
584
  _: 1
479
585
  }, 8, ["columns", "rows", "loading", "loading-text", "sort", "labels", "selected-keys"])),
480
- S.value !== void 0 && !e(n) ? (s(), x(e(U), {
586
+ z.value !== void 0 && !e(s) ? (n(), k(e(F), {
481
587
  key: 1,
482
588
  variant: "secondary",
483
589
  disabled: e(i),
484
- onClick: P[11] || (P[11] = (I) => re(v.value, !0))
590
+ onClick: P[11] || (P[11] = (A) => ue(p.value, !0))
485
591
  }, {
486
- default: l(() => [
487
- g(t(o.value.loadMore), 1)
592
+ default: t(() => [
593
+ g(l(u.value.loadMore), 1)
488
594
  ]),
489
595
  _: 1
490
- }, 8, ["disabled"])) : h("", !0)
596
+ }, 8, ["disabled"])) : b("", !0)
491
597
  ])
492
598
  ]),
493
- k.value && !e(n) ? (s(), V("p", Wa, t(e(Ae)(o.value.selected, { name: k.value.path })), 1)) : h("", !0)
494
- ], 8, Fa));
599
+ h.value && !e(s) ? (n(), R("p", gt, l(e(Be)(u.value.selected, { name: h.value.path })), 1)) : b("", !0)
600
+ ], 8, st));
495
601
  }
496
- }), je = /* @__PURE__ */ ue(ja, [["__scopeId", "data-v-c689761c"]]), et = {
602
+ }), ua = /* @__PURE__ */ de(ht, [["__scopeId", "data-v-c689761c"]]), kt = {
497
603
  key: 0,
498
604
  class: "save-consent"
499
- }, at = ["aria-busy", "inert"], tt = /* @__PURE__ */ oe({
605
+ }, _t = ["aria-busy", "inert"], wt = /* @__PURE__ */ oe({
500
606
  __name: "NasPicker",
501
607
  props: {
502
608
  open: { type: Boolean },
@@ -509,561 +615,579 @@ const Fa = ["aria-busy", "aria-label"], Oa = { class: "file-toolbar file-locatio
509
615
  errorText: { type: Function }
510
616
  },
511
617
  emits: ["update:open", "selected", "authorized", "refused"],
512
- setup(y, { emit: q }) {
513
- const f = y, a = q, o = b(), m = L(() => be(f.locale)), i = L(() => Ne(f.locale)), n = b(!1), u = b();
514
- let r = 0, v = !1;
515
- Je(() => f.open, () => {
516
- r++, o.value = void 0, u.value = void 0;
517
- }), ye(() => {
518
- v = !0, r++;
618
+ setup(r, { emit: T }) {
619
+ const o = r, a = T, u = y(), m = D(() => ye(o.locale)), i = D(() => Ze(o.locale)), s = y(!1), d = y();
620
+ let v = 0, p = !1;
621
+ qe(() => o.open, () => {
622
+ v++, u.value = void 0, d.value = void 0;
623
+ }), fe(() => {
624
+ p = !0, v++;
519
625
  });
520
- function k() {
521
- n.value || (o.value = void 0, a("update:open", !1));
626
+ function h() {
627
+ s.value || (u.value = void 0, a("update:open", !1));
522
628
  }
523
- async function D() {
524
- const S = o.value, c = f.destination, w = r;
525
- if (!(!S || n.value || !f.open || v || c && f.mode !== "folder")) {
526
- if (!c) {
527
- a("selected", S), k();
629
+ async function E() {
630
+ const z = u.value, _ = o.destination, $ = v;
631
+ if (!(!z || s.value || !o.open || p || _ && o.mode !== "folder")) {
632
+ if (!_) {
633
+ a("selected", z), h();
528
634
  return;
529
635
  }
530
- n.value = !0, u.value = void 0;
636
+ s.value = !0, d.value = void 0;
531
637
  try {
532
- const z = await c.selectDestination({ key: c.key, path: S });
533
- if (v || w !== r) return;
534
- if (!z || typeof z.id != "string" || !z.id || typeof z.username != "string" || !z.username || z.path !== S || z.key !== c.key || z.lifetime !== "until-revoked") throw { code: "commit-uncertain" };
535
- a("authorized", z), n.value = !1, k();
536
- } catch (z) {
537
- if (v || w !== r) return;
538
- if (z?.code === "APP_DENIED") {
539
- n.value = !1, a("refused", z), k();
638
+ const x = await _.selectDestination({ key: _.key, path: z });
639
+ if (p || $ !== v) return;
640
+ if (!x || typeof x.id != "string" || !x.id || typeof x.username != "string" || !x.username || x.path !== z || x.key !== _.key || x.lifetime !== "until-revoked") throw { code: "commit-uncertain" };
641
+ a("authorized", x), s.value = !1, h();
642
+ } catch (x) {
643
+ if (p || $ !== v) return;
644
+ if (x?.code === "APP_DENIED") {
645
+ s.value = !1, a("refused", x), h();
540
646
  return;
541
647
  }
542
- u.value = z;
648
+ d.value = x;
543
649
  } finally {
544
- v || (n.value = !1);
650
+ p || (s.value = !1);
545
651
  }
546
652
  }
547
653
  }
548
- return (S, c) => (s(), x(e(qe), {
549
- open: y.open,
550
- title: y.title ?? (y.mode === "folder" ? m.value.choose : m.value.chooseFile),
551
- description: y.description ?? m.value.ownPermissions,
654
+ return (z, _) => (n(), k(e(Le), {
655
+ open: r.open,
656
+ title: r.title ?? (r.mode === "folder" ? m.value.choose : m.value.chooseFile),
657
+ description: r.description ?? m.value.ownPermissions,
552
658
  "close-label": m.value.close,
553
- "show-close": !n.value,
659
+ "show-close": !s.value,
554
660
  width: "800px",
555
- onEscapeKeyDown: c[1] || (c[1] = (w) => {
556
- n.value && w.preventDefault();
661
+ onEscapeKeyDown: _[1] || (_[1] = ($) => {
662
+ s.value && $.preventDefault();
557
663
  }),
558
- onInteractOutside: c[2] || (c[2] = (w) => {
559
- n.value && w.preventDefault();
664
+ onInteractOutside: _[2] || (_[2] = ($) => {
665
+ s.value && $.preventDefault();
560
666
  }),
561
- "onUpdate:open": c[3] || (c[3] = (w) => {
562
- w || k();
667
+ "onUpdate:open": _[3] || (_[3] = ($) => {
668
+ $ || h();
563
669
  })
564
670
  }, {
565
- footer: l(() => [
566
- d(e(U), {
671
+ footer: t(() => [
672
+ c(e(F), {
567
673
  variant: "secondary",
568
- disabled: n.value,
569
- onClick: k
674
+ disabled: s.value,
675
+ onClick: h
570
676
  }, {
571
- default: l(() => [
572
- g(t(m.value.cancel), 1)
677
+ default: t(() => [
678
+ g(l(m.value.cancel), 1)
573
679
  ]),
574
680
  _: 1
575
681
  }, 8, ["disabled"]),
576
- d(e(U), {
682
+ c(e(F), {
577
683
  variant: "primary",
578
- disabled: !o.value || n.value || !!y.destination && y.mode !== "folder",
579
- onClick: D
684
+ disabled: !u.value || s.value || !!r.destination && r.mode !== "folder",
685
+ onClick: E
580
686
  }, {
581
- default: l(() => [
582
- g(t(m.value.confirm), 1)
687
+ default: t(() => [
688
+ g(l(m.value.confirm), 1)
583
689
  ]),
584
690
  _: 1
585
691
  }, 8, ["disabled"])
586
692
  ]),
587
- default: l(() => [
588
- y.destination ? (s(), V("p", et, t(i.value.selection), 1)) : h("", !0),
589
- u.value ? (s(), x(e(X), {
693
+ default: t(() => [
694
+ r.destination ? (n(), R("p", kt, l(i.value.selection), 1)) : b("", !0),
695
+ d.value ? (n(), k(e(W), {
590
696
  key: 1,
591
697
  tone: "danger",
592
698
  role: "alert",
593
699
  class: "save-message"
594
700
  }, {
595
- default: l(() => [
596
- g(t(y.errorText?.(u.value) ?? e(Ie)(u.value, i.value, "select")), 1)
701
+ default: t(() => [
702
+ g(l(r.errorText?.(d.value) ?? e(Te)(d.value, i.value, "select")), 1)
597
703
  ]),
598
704
  _: 1
599
- })) : h("", !0),
600
- $("div", {
705
+ })) : b("", !0),
706
+ S("div", {
601
707
  class: "nas-picker-content",
602
- "aria-busy": n.value,
603
- inert: n.value
708
+ "aria-busy": s.value,
709
+ inert: s.value
604
710
  }, [
605
- y.open ? (s(), x(je, {
711
+ r.open ? (n(), k(ua, {
606
712
  key: 0,
607
- provider: y.provider,
608
- locale: y.locale,
609
- mode: y.mode,
610
- onSelected: c[0] || (c[0] = (w) => o.value = w)
611
- }, null, 8, ["provider", "locale", "mode"])) : h("", !0)
612
- ], 8, at)
713
+ provider: r.provider,
714
+ locale: r.locale,
715
+ mode: r.mode,
716
+ onSelected: _[0] || (_[0] = ($) => u.value = $)
717
+ }, null, 8, ["provider", "locale", "mode"])) : b("", !0)
718
+ ], 8, _t)
613
719
  ]),
614
720
  _: 1
615
721
  }, 8, ["open", "title", "description", "close-label", "show-close"]));
616
722
  }
617
- }), Te = /* @__PURE__ */ ue(tt, [["__scopeId", "data-v-6ed8b8f6"]]), lt = { role: "alert" }, st = { class: "files-actions" }, nt = {
723
+ }), Ee = /* @__PURE__ */ de(wt, [["__scopeId", "data-v-6ed8b8f6"]]), xt = { role: "alert" }, Ct = { class: "files-actions" }, $t = {
618
724
  key: 0,
619
725
  class: "files-path",
620
726
  role: "status"
621
- }, it = /* @__PURE__ */ oe({
727
+ }, St = /* @__PURE__ */ oe({
622
728
  __name: "FilesPage",
623
729
  props: {
624
730
  ctx: {}
625
731
  },
626
- setup(y) {
627
- const q = y, f = b(), a = b(!1), o = b("folder"), m = b(!1), i = b(""), n = b(0), u = Me(q.ctx);
628
- let r = !1, v;
629
- async function k() {
630
- if (!r) {
631
- f.value = void 0, a.value = !1, i.value = "", m.value = !1, n.value++;
732
+ setup(r) {
733
+ const T = r, o = y(), a = y(!1), u = y("folder"), m = y(!1), i = y(""), s = y(0), d = je(T.ctx);
734
+ let v = !1, p;
735
+ async function h() {
736
+ if (!v) {
737
+ o.value = void 0, a.value = !1, i.value = "", m.value = !1, s.value++;
632
738
  try {
633
- await q.ctx.call("nas.session.status"), r || (a.value = !0);
634
- } catch (D) {
635
- !r && D?.code !== "unknown_method" && (f.value = D);
739
+ await T.ctx.call("nas.session.status"), v || (a.value = !0);
740
+ } catch (E) {
741
+ !v && E?.code !== "unknown_method" && (o.value = E);
636
742
  }
637
743
  }
638
744
  }
639
745
  return ge(() => {
640
- v = q.ctx.reopen(() => {
641
- k();
642
- }), k();
643
- }), ye(() => {
644
- r = !0, v?.(), u.dispose();
645
- }), (D, S) => (s(), V(ne, null, [
646
- f.value ? (s(), x(e(X), {
746
+ p = T.ctx.reopen(() => {
747
+ h();
748
+ }), h();
749
+ }), fe(() => {
750
+ v = !0, p?.(), d.dispose();
751
+ }), (E, z) => (n(), R(se, null, [
752
+ o.value ? (n(), k(e(W), {
647
753
  key: 0,
648
754
  tone: "danger"
649
755
  }, {
650
- default: l(() => [
651
- $("span", lt, t(e(Le)(f.value, e(be)(y.ctx.locale))), 1),
652
- d(e(U), {
756
+ default: t(() => [
757
+ S("span", xt, l(e(Ye)(o.value, e(ye)(r.ctx.locale))), 1),
758
+ c(e(F), {
653
759
  variant: "secondary",
654
- onClick: k
760
+ onClick: h
655
761
  }, {
656
- default: l(() => [
657
- g(t(e(be)(y.ctx.locale).refresh), 1)
762
+ default: t(() => [
763
+ g(l(e(ye)(r.ctx.locale).refresh), 1)
658
764
  ]),
659
765
  _: 1
660
766
  })
661
767
  ]),
662
768
  _: 1
663
- })) : h("", !0),
664
- a.value ? (s(), x(e(he), {
769
+ })) : b("", !0),
770
+ a.value ? (n(), k(e(he), {
665
771
  key: 1,
666
- title: e(be)(y.ctx.locale).title,
667
- description: e(be)(y.ctx.locale).ownPermissions,
772
+ title: e(ye)(r.ctx.locale).title,
773
+ description: e(ye)(r.ctx.locale).ownPermissions,
668
774
  collapsible: !1
669
775
  }, {
670
- default: l(() => [
671
- $("div", st, [
672
- d(e(U), {
776
+ default: t(() => [
777
+ S("div", Ct, [
778
+ c(e(F), {
673
779
  variant: "secondary",
674
- onClick: S[0] || (S[0] = (c) => {
675
- o.value = "folder", m.value = !0;
780
+ onClick: z[0] || (z[0] = (_) => {
781
+ u.value = "folder", m.value = !0;
676
782
  })
677
783
  }, {
678
- default: l(() => [
679
- g(t(e(be)(y.ctx.locale).choose), 1)
784
+ default: t(() => [
785
+ g(l(e(ye)(r.ctx.locale).choose), 1)
680
786
  ]),
681
787
  _: 1
682
788
  }),
683
- d(e(U), {
789
+ c(e(F), {
684
790
  variant: "secondary",
685
- onClick: S[1] || (S[1] = (c) => {
686
- o.value = "file", m.value = !0;
791
+ onClick: z[1] || (z[1] = (_) => {
792
+ u.value = "file", m.value = !0;
687
793
  })
688
794
  }, {
689
- default: l(() => [
690
- g(t(e(be)(y.ctx.locale).chooseFile), 1)
795
+ default: t(() => [
796
+ g(l(e(ye)(r.ctx.locale).chooseFile), 1)
691
797
  ]),
692
798
  _: 1
693
799
  })
694
800
  ]),
695
- i.value ? (s(), V("p", nt, [
696
- d(e(pe), { path: i.value }, null, 8, ["path"])
697
- ])) : h("", !0),
698
- (s(), x(je, {
699
- key: n.value,
700
- provider: e(u),
701
- locale: y.ctx.locale,
801
+ i.value ? (n(), R("p", $t, [
802
+ c(e(pe), { path: i.value }, null, 8, ["path"])
803
+ ])) : b("", !0),
804
+ (n(), k(ua, {
805
+ key: s.value,
806
+ provider: e(d),
807
+ locale: r.ctx.locale,
702
808
  transfers: ""
703
809
  }, null, 8, ["provider", "locale"])),
704
- d(Te, {
705
- provider: e(u),
706
- locale: y.ctx.locale,
707
- mode: o.value,
810
+ c(Ee, {
811
+ provider: e(d),
812
+ locale: r.ctx.locale,
813
+ mode: u.value,
708
814
  open: m.value,
709
- "onUpdate:open": S[2] || (S[2] = (c) => m.value = c),
710
- onSelected: S[3] || (S[3] = (c) => i.value = c)
815
+ "onUpdate:open": z[2] || (z[2] = (_) => m.value = _),
816
+ onSelected: z[3] || (z[3] = (_) => i.value = _)
711
817
  }, null, 8, ["provider", "locale", "mode", "open"])
712
818
  ]),
713
819
  _: 1
714
- }, 8, ["title", "description"])) : h("", !0)
820
+ }, 8, ["title", "description"])) : b("", !0)
715
821
  ], 64));
716
822
  }
717
- }), Hl = /* @__PURE__ */ ue(it, [["__scopeId", "data-v-15f9eb8e"]]), ot = { key: 0 }, ut = { key: 1 }, rt = { key: 0 }, dt = { key: 3 }, vt = { role: "alert" }, ct = 5e3, pt = /* @__PURE__ */ oe({
823
+ }), on = /* @__PURE__ */ de(St, [["__scopeId", "data-v-15f9eb8e"]]), zt = { role: "alert" }, Pt = 5e3, un = /* @__PURE__ */ oe({
718
824
  __name: "PortalSettings",
719
825
  props: {
720
826
  portal: {}
721
827
  },
722
- setup(y) {
723
- const q = y, f = We(), a = q.portal.messages, o = b(), m = b(""), i = b(!1), n = b("");
724
- let u = !1;
725
- function r(S) {
726
- u || (o.value = S, m.value = S.alias || S.defaultAlias);
828
+ setup(r) {
829
+ const T = r, o = ia(), a = T.portal.messages, u = y(), m = y(""), i = y(!1), s = y("");
830
+ let d = !1;
831
+ function v(x) {
832
+ d || (u.value = x, m.value = x.alias || x.defaultAlias);
727
833
  }
728
- const v = /* @__PURE__ */ Symbol("late");
729
- async function k(S) {
834
+ const p = /* @__PURE__ */ Symbol("late");
835
+ async function h(x) {
730
836
  if (i.value) return;
731
- i.value = !0, n.value = "";
732
- const c = S();
837
+ i.value = !0, s.value = "";
838
+ const V = x();
733
839
  try {
734
- const w = await Promise.race([c, new Promise((z) => setTimeout(() => z(v), ct))]);
735
- if (w !== v) {
736
- r(w);
840
+ const I = await Promise.race([V, new Promise((N) => setTimeout(() => N(p), Pt))]);
841
+ if (I !== p) {
842
+ v(I);
737
843
  return;
738
844
  }
739
- r(await q.portal.status());
845
+ v(await T.portal.status());
740
846
  try {
741
- await c;
847
+ await V;
742
848
  } finally {
743
- r(await q.portal.status());
849
+ v(await T.portal.status());
744
850
  }
745
- } catch (w) {
746
- u || (n.value = a[w?.code || ""] || a.portal_unavailable);
851
+ } catch (I) {
852
+ d || (s.value = a[I?.code || ""] || a.portal_unavailable);
747
853
  } finally {
748
- u || (i.value = !1);
854
+ d || (i.value = !1);
749
855
  }
750
856
  }
751
- function D() {
752
- i.value || q.portal.status().then(r, () => {
857
+ const E = D(() => !!u.value?.canManage && !!u.value.entry && u.value.entry !== "registered"), z = D(() => {
858
+ const x = u.value;
859
+ if (x) {
860
+ if (E.value) return x.entry === "unregistered" ? a.entryOff : a.cleanupRequired;
861
+ if (x.state !== "active")
862
+ return x.canManage ? a.inactive : x.controlPanel ? void 0 : a.askAdmin;
863
+ }
864
+ }), _ = a.link?.replace(/\s*[::]\s*$/, "");
865
+ function $() {
866
+ i.value || T.portal.status().then(v, () => {
753
867
  });
754
868
  }
755
869
  return ge(() => {
756
- f.subscribe?.(D), D();
757
- }), ye(() => {
758
- u = !0;
759
- }), (S, c) => o.value ? (s(), x(e(he), {
870
+ o.subscribe?.($), $();
871
+ }), fe(() => {
872
+ d = !0;
873
+ }), (x, V) => u.value ? (n(), k(e(he), {
760
874
  key: 0,
761
875
  title: e(a).title,
876
+ description: z.value,
762
877
  collapsible: !1,
763
878
  "aria-busy": i.value
764
- }, Xe({
765
- default: l(() => [
766
- o.value.state === "active" ? (s(), V("p", ot, [
767
- g(t(e(a).link) + " ", 1),
768
- d(e(Ye), {
769
- href: o.value.url,
770
- external: ""
771
- }, {
772
- default: l(() => [
773
- g(t(o.value.url), 1)
774
- ]),
775
- _: 1
776
- }, 8, ["href"])
777
- ])) : h("", !0),
778
- o.value.canManage && o.value.entry && o.value.entry !== "registered" ? (s(), V("p", ut, t(o.value.entry === "unregistered" ? e(a).entryOff : e(a).cleanupRequired), 1)) : o.value.canManage ? (s(), V(ne, { key: 2 }, [
779
- o.value.state !== "active" ? (s(), V("p", rt, t(e(a).inactive), 1)) : h("", !0),
780
- d(e(ze), {
781
- direction: "vertical",
782
- class: "portal-form",
783
- onSubmit: c[4] || (c[4] = Se((w) => k(() => y.portal.apply(m.value)), ["prevent"]))
784
- }, {
785
- default: l(() => [
786
- d(e(fe), {
787
- label: e(a).alias,
788
- "label-for": "portal-alias"
789
- }, {
790
- default: l(() => [
791
- d(e(_e), {
792
- id: "portal-alias",
793
- modelValue: m.value,
794
- "onUpdate:modelValue": c[0] || (c[0] = (w) => m.value = w),
795
- maxlength: "64",
796
- autocomplete: "off",
797
- disabled: i.value
798
- }, null, 8, ["modelValue", "disabled"])
799
- ]),
800
- _: 1
801
- }, 8, ["label"]),
802
- d(e(Pe), null, {
803
- default: l(() => [
804
- d(e(U), {
805
- type: "submit",
806
- variant: "primary",
807
- disabled: i.value
808
- }, {
809
- default: l(() => [
810
- g(t(e(a).apply), 1)
811
- ]),
812
- _: 1
813
- }, 8, ["disabled"]),
814
- o.value.state === "active" ? (s(), x(e(U), {
815
- key: 0,
816
- variant: "secondary",
817
- disabled: i.value,
818
- onClick: c[1] || (c[1] = (w) => k(() => y.portal.disable()))
819
- }, {
820
- default: l(() => [
821
- g(t(e(a).disable), 1)
822
- ]),
823
- _: 1
824
- }, 8, ["disabled"])) : h("", !0),
825
- d(e(U), {
826
- variant: "secondary",
827
- onClick: c[2] || (c[2] = (w) => y.portal.openControlPanel())
828
- }, {
829
- default: l(() => [
830
- g(t(e(a).advanced), 1)
831
- ]),
832
- _: 1
833
- }),
834
- o.value.entry ? (s(), x(e(U), {
835
- key: 1,
836
- variant: "secondary",
837
- disabled: i.value,
838
- onClick: c[3] || (c[3] = (w) => k(() => y.portal.unregister()))
839
- }, {
840
- default: l(() => [
841
- g(t(e(a).unregister), 1)
842
- ]),
843
- _: 1
844
- }, 8, ["disabled"])) : h("", !0)
845
- ]),
846
- _: 1
847
- })
848
- ]),
849
- _: 1
850
- })
851
- ], 64)) : !o.value.controlPanel && o.value.state !== "active" ? (s(), V("p", dt, t(e(a).askAdmin), 1)) : h("", !0),
852
- n.value ? (s(), x(e(X), {
853
- key: 4,
879
+ }, Oe({
880
+ default: t(() => [
881
+ u.value.state === "active" ? (n(), k(e(Ae), {
882
+ key: 0,
883
+ label: e(_)
884
+ }, {
885
+ default: t(() => [
886
+ c(e(na), {
887
+ href: u.value.url,
888
+ external: ""
889
+ }, {
890
+ default: t(() => [
891
+ g(l(u.value.url), 1)
892
+ ]),
893
+ _: 1
894
+ }, 8, ["href"])
895
+ ]),
896
+ _: 1
897
+ }, 8, ["label"])) : b("", !0),
898
+ u.value.canManage && !E.value ? (n(), k(e(Pe), {
899
+ key: 1,
900
+ onSubmit: V[4] || (V[4] = ze((I) => h(() => r.portal.apply(m.value)), ["prevent"]))
901
+ }, {
902
+ default: t(() => [
903
+ c(e(Ae), {
904
+ label: e(a).alias
905
+ }, {
906
+ default: t(() => [
907
+ c(e(we), {
908
+ id: "portal-alias",
909
+ modelValue: m.value,
910
+ "onUpdate:modelValue": V[0] || (V[0] = (I) => m.value = I),
911
+ "aria-label": e(a).alias,
912
+ maxlength: "64",
913
+ autocomplete: "off",
914
+ disabled: i.value
915
+ }, null, 8, ["modelValue", "aria-label", "disabled"])
916
+ ]),
917
+ _: 1
918
+ }, 8, ["label"]),
919
+ c(e(Ae), {
920
+ label: "",
921
+ "field-width": "full"
922
+ }, {
923
+ default: t(() => [
924
+ c(e(Ve), null, {
925
+ default: t(() => [
926
+ c(e(F), {
927
+ type: "submit",
928
+ variant: "primary",
929
+ disabled: i.value
930
+ }, {
931
+ default: t(() => [
932
+ g(l(e(a).apply), 1)
933
+ ]),
934
+ _: 1
935
+ }, 8, ["disabled"]),
936
+ u.value.state === "active" ? (n(), k(e(F), {
937
+ key: 0,
938
+ variant: "secondary",
939
+ disabled: i.value,
940
+ onClick: V[1] || (V[1] = (I) => h(() => r.portal.disable()))
941
+ }, {
942
+ default: t(() => [
943
+ g(l(e(a).disable), 1)
944
+ ]),
945
+ _: 1
946
+ }, 8, ["disabled"])) : b("", !0),
947
+ c(e(F), {
948
+ variant: "secondary",
949
+ onClick: V[2] || (V[2] = (I) => r.portal.openControlPanel())
950
+ }, {
951
+ default: t(() => [
952
+ g(l(e(a).advanced), 1)
953
+ ]),
954
+ _: 1
955
+ }),
956
+ u.value.entry ? (n(), k(e(F), {
957
+ key: 1,
958
+ variant: "secondary",
959
+ disabled: i.value,
960
+ onClick: V[3] || (V[3] = (I) => h(() => r.portal.unregister()))
961
+ }, {
962
+ default: t(() => [
963
+ g(l(e(a).unregister), 1)
964
+ ]),
965
+ _: 1
966
+ }, 8, ["disabled"])) : b("", !0)
967
+ ]),
968
+ _: 1
969
+ })
970
+ ]),
971
+ _: 1
972
+ })
973
+ ]),
974
+ _: 1
975
+ })) : b("", !0),
976
+ s.value ? (n(), k(e(W), {
977
+ key: 2,
854
978
  tone: "danger"
855
979
  }, {
856
- default: l(() => [
857
- $("span", vt, t(n.value), 1)
980
+ default: t(() => [
981
+ S("span", zt, l(s.value), 1)
858
982
  ]),
859
983
  _: 1
860
- })) : h("", !0)
984
+ })) : b("", !0)
861
985
  ]),
862
986
  _: 2
863
987
  }, [
864
- o.value?.canManage && o.value.entry && o.value.entry !== "registered" ? {
988
+ E.value ? {
865
989
  name: "footer",
866
- fn: l(() => [
867
- o.value.entry === "unregistered" ? (s(), x(e(U), {
990
+ fn: t(() => [
991
+ u.value.entry === "unregistered" ? (n(), k(e(F), {
868
992
  key: 0,
869
993
  variant: "primary",
870
994
  disabled: i.value,
871
- onClick: c[5] || (c[5] = (w) => k(() => y.portal.register()))
995
+ onClick: V[5] || (V[5] = (I) => h(() => r.portal.register()))
872
996
  }, {
873
- default: l(() => [
874
- g(t(e(a).register), 1)
997
+ default: t(() => [
998
+ g(l(e(a).register), 1)
875
999
  ]),
876
1000
  _: 1
877
- }, 8, ["disabled"])) : (s(), x(e(U), {
1001
+ }, 8, ["disabled"])) : (n(), k(e(F), {
878
1002
  key: 1,
879
1003
  variant: "primary",
880
1004
  disabled: i.value,
881
- onClick: c[6] || (c[6] = (w) => k(() => y.portal.unregister()))
1005
+ onClick: V[6] || (V[6] = (I) => h(() => r.portal.unregister()))
882
1006
  }, {
883
- default: l(() => [
884
- g(t(e(a).unregister), 1)
1007
+ default: t(() => [
1008
+ g(l(e(a).unregister), 1)
885
1009
  ]),
886
1010
  _: 1
887
1011
  }, 8, ["disabled"]))
888
1012
  ]),
889
1013
  key: "0"
890
- } : o.value && !o.value.canManage && o.value.controlPanel ? {
1014
+ } : !u.value.canManage && u.value.controlPanel ? {
891
1015
  name: "footer",
892
- fn: l(() => [
893
- d(e(U), {
1016
+ fn: t(() => [
1017
+ c(e(F), {
894
1018
  variant: "secondary",
895
- onClick: c[7] || (c[7] = (w) => y.portal.openControlPanel())
1019
+ onClick: V[7] || (V[7] = (I) => r.portal.openControlPanel())
896
1020
  }, {
897
- default: l(() => [
898
- g(t(e(a).controlPanel), 1)
1021
+ default: t(() => [
1022
+ g(l(e(a).controlPanel), 1)
899
1023
  ]),
900
1024
  _: 1
901
1025
  })
902
1026
  ]),
903
1027
  key: "1"
904
1028
  } : void 0
905
- ]), 1032, ["title", "aria-busy"])) : h("", !0);
1029
+ ]), 1032, ["title", "description", "aria-busy"])) : b("", !0);
906
1030
  }
907
- }), Gl = /* @__PURE__ */ ue(pt, [["__scopeId", "data-v-d803ac7c"]]), ft = ["aria-busy"], yt = {
1031
+ }), Vt = ["aria-busy"], It = {
908
1032
  key: 1,
909
1033
  role: "status"
910
- }, mt = { role: "alert" }, bt = { role: "status" }, gt = /* @__PURE__ */ oe({
1034
+ }, Tt = { role: "alert" }, At = { role: "status" }, Et = /* @__PURE__ */ oe({
911
1035
  __name: "LoginPage",
912
1036
  props: {
913
1037
  session: {},
914
1038
  locale: {}
915
1039
  },
916
- setup(y) {
917
- const q = y, f = L(() => la(q.locale)), a = b(""), o = b(""), m = b(""), i = b(!1), n = b(!1), u = b(""), r = b(), v = L(() => window.location.protocol === "https:");
918
- let k = !1;
919
- function D(z) {
920
- const M = z?.code;
921
- return f.value.errors[M || ""] || f.value.errors.failed;
1040
+ setup(r) {
1041
+ const T = r, o = D(() => ca(T.locale)), a = y(""), u = y(""), m = y(""), i = y(!1), s = y(!1), d = y(""), v = y(), p = D(() => window.location.protocol === "https:");
1042
+ let h = !1;
1043
+ function E(x) {
1044
+ const V = x?.code;
1045
+ return o.value.errors[V || ""] || o.value.errors.failed;
922
1046
  }
923
- async function S() {
924
- if (!(n.value || !v.value || !a.value || !o.value || i.value && !m.value)) {
925
- n.value = !0, u.value = "";
1047
+ async function z() {
1048
+ if (!(s.value || !p.value || !a.value || !u.value || i.value && !m.value)) {
1049
+ s.value = !0, d.value = "";
926
1050
  try {
927
- await q.session.login(a.value, o.value, m.value), o.value = "", m.value = "";
928
- } catch (z) {
929
- if (k) return;
930
- m.value = "", z?.code === "otp_required" ? i.value = !0 : (u.value = D(z), o.value = "", i.value = !1);
1051
+ await T.session.login(a.value, u.value, m.value), u.value = "", m.value = "";
1052
+ } catch (x) {
1053
+ if (h) return;
1054
+ m.value = "", x?.code === "otp_required" ? i.value = !0 : (d.value = E(x), u.value = "", i.value = !1);
931
1055
  } finally {
932
- k || (n.value = !1, i.value && (await pa(), k || r.value?.querySelector("input")?.focus()));
1056
+ h || (s.value = !1, i.value && (await za(), h || v.value?.querySelector("input")?.focus()));
933
1057
  }
934
1058
  }
935
1059
  }
936
- async function c() {
937
- if (!n.value) {
938
- n.value = !0, u.value = "";
1060
+ async function _() {
1061
+ if (!s.value) {
1062
+ s.value = !0, d.value = "";
939
1063
  try {
940
- await q.session.bootstrap();
941
- } catch (z) {
942
- k || (u.value = D(z));
1064
+ await T.session.bootstrap();
1065
+ } catch (x) {
1066
+ h || (d.value = E(x));
943
1067
  } finally {
944
- k || (n.value = !1);
1068
+ h || (s.value = !1);
945
1069
  }
946
1070
  }
947
1071
  }
948
- function w() {
949
- o.value = "", m.value = "", i.value = !1, u.value = "";
1072
+ function $() {
1073
+ u.value = "", m.value = "", i.value = !1, d.value = "";
950
1074
  }
951
- return Qe(() => {
952
- k = !0, o.value = "", m.value = "";
953
- }), (z, M) => (s(), V("main", {
1075
+ return la(() => {
1076
+ h = !0, u.value = "", m.value = "";
1077
+ }), (x, V) => (n(), R("main", {
954
1078
  class: "identity-login",
955
- "aria-busy": n.value
1079
+ "aria-busy": s.value
956
1080
  }, [
957
- d(e(he), {
958
- title: f.value.title,
959
- description: f.value.intro,
1081
+ c(e(he), {
1082
+ title: o.value.title,
1083
+ description: o.value.intro,
960
1084
  collapsible: !1
961
1085
  }, {
962
- default: l(() => [
963
- v.value ? h("", !0) : (s(), x(e(X), {
1086
+ default: t(() => [
1087
+ p.value ? b("", !0) : (n(), k(e(W), {
964
1088
  key: 0,
965
1089
  tone: "warning",
966
- title: f.value.httpsTitle
1090
+ title: o.value.httpsTitle
967
1091
  }, {
968
- default: l(() => [
969
- g(t(f.value.errors.https_required), 1)
1092
+ default: t(() => [
1093
+ g(l(o.value.errors.https_required), 1)
970
1094
  ]),
971
1095
  _: 1
972
1096
  }, 8, ["title"])),
973
- y.session.notice.value ? (s(), V("p", yt, t(f.value.notices[y.session.notice.value]), 1)) : h("", !0),
974
- u.value ? (s(), x(e(X), {
1097
+ r.session.notice.value ? (n(), R("p", It, l(o.value.notices[r.session.notice.value]), 1)) : b("", !0),
1098
+ d.value ? (n(), k(e(W), {
975
1099
  key: 2,
976
1100
  tone: "danger",
977
- title: f.value.failedTitle
1101
+ title: o.value.failedTitle
978
1102
  }, {
979
- default: l(() => [
980
- $("span", mt, t(u.value), 1)
1103
+ default: t(() => [
1104
+ S("span", Tt, l(d.value), 1)
981
1105
  ]),
982
1106
  _: 1
983
- }, 8, ["title"])) : h("", !0),
984
- d(e(ze), {
985
- onSubmit: Se(S, ["prevent"])
1107
+ }, 8, ["title"])) : b("", !0),
1108
+ c(e(Pe), {
1109
+ onSubmit: ze(z, ["prevent"])
986
1110
  }, {
987
- default: l(() => [
988
- d(e(fe), {
989
- label: f.value.account
1111
+ default: t(() => [
1112
+ c(e(be), {
1113
+ label: o.value.account
990
1114
  }, {
991
- default: l(() => [
992
- d(e(_e), {
1115
+ default: t(() => [
1116
+ c(e(we), {
993
1117
  modelValue: a.value,
994
- "onUpdate:modelValue": M[0] || (M[0] = (N) => a.value = N),
1118
+ "onUpdate:modelValue": V[0] || (V[0] = (I) => a.value = I),
995
1119
  autocomplete: "username",
996
- disabled: n.value || i.value || !v.value
1120
+ disabled: s.value || i.value || !p.value
997
1121
  }, null, 8, ["modelValue", "disabled"])
998
1122
  ]),
999
1123
  _: 1
1000
1124
  }, 8, ["label"]),
1001
- i.value ? (s(), V(ne, { key: 1 }, [
1002
- $("p", bt, t(f.value.otpPrompt), 1),
1003
- $("div", {
1125
+ i.value ? (n(), R(se, { key: 1 }, [
1126
+ S("p", At, l(o.value.otpPrompt), 1),
1127
+ S("div", {
1004
1128
  ref_key: "otpField",
1005
- ref: r
1129
+ ref: v
1006
1130
  }, [
1007
- d(e(fe), {
1008
- label: f.value.otp
1131
+ c(e(be), {
1132
+ label: o.value.otp
1009
1133
  }, {
1010
- default: l(() => [
1011
- d(e(_e), {
1134
+ default: t(() => [
1135
+ c(e(we), {
1012
1136
  modelValue: m.value,
1013
- "onUpdate:modelValue": M[2] || (M[2] = (N) => m.value = N),
1137
+ "onUpdate:modelValue": V[2] || (V[2] = (I) => m.value = I),
1014
1138
  inputmode: "numeric",
1015
1139
  autocomplete: "one-time-code",
1016
- disabled: n.value
1140
+ disabled: s.value
1017
1141
  }, null, 8, ["modelValue", "disabled"])
1018
1142
  ]),
1019
1143
  _: 1
1020
1144
  }, 8, ["label"])
1021
1145
  ], 512)
1022
- ], 64)) : (s(), x(e(fe), {
1146
+ ], 64)) : (n(), k(e(be), {
1023
1147
  key: 0,
1024
- label: f.value.password
1148
+ label: o.value.password
1025
1149
  }, {
1026
- default: l(() => [
1027
- d(e(_e), {
1028
- modelValue: o.value,
1029
- "onUpdate:modelValue": M[1] || (M[1] = (N) => o.value = N),
1150
+ default: t(() => [
1151
+ c(e(we), {
1152
+ modelValue: u.value,
1153
+ "onUpdate:modelValue": V[1] || (V[1] = (I) => u.value = I),
1030
1154
  type: "password",
1031
1155
  autocomplete: "current-password",
1032
- disabled: n.value || !v.value
1156
+ disabled: s.value || !p.value
1033
1157
  }, null, 8, ["modelValue", "disabled"])
1034
1158
  ]),
1035
1159
  _: 1
1036
1160
  }, 8, ["label"])),
1037
- d(e(Pe), null, {
1038
- default: l(() => [
1039
- d(e(U), {
1161
+ c(e(Ve), null, {
1162
+ default: t(() => [
1163
+ c(e(F), {
1040
1164
  type: "submit",
1041
1165
  variant: "primary",
1042
- disabled: n.value || !v.value || !a.value || !o.value || i.value && !m.value
1166
+ disabled: s.value || !p.value || !a.value || !u.value || i.value && !m.value
1043
1167
  }, {
1044
- default: l(() => [
1045
- g(t(n.value ? f.value.signingIn : i.value ? f.value.verify : f.value.signIn), 1)
1168
+ default: t(() => [
1169
+ g(l(s.value ? o.value.signingIn : i.value ? o.value.verify : o.value.signIn), 1)
1046
1170
  ]),
1047
1171
  _: 1
1048
1172
  }, 8, ["disabled"]),
1049
- i.value ? (s(), x(e(U), {
1173
+ i.value ? (n(), k(e(F), {
1050
1174
  key: 0,
1051
1175
  variant: "secondary",
1052
- disabled: n.value,
1053
- onClick: w
1176
+ disabled: s.value,
1177
+ onClick: $
1054
1178
  }, {
1055
- default: l(() => [
1056
- g(t(f.value.otherAccount), 1)
1179
+ default: t(() => [
1180
+ g(l(o.value.otherAccount), 1)
1057
1181
  ]),
1058
1182
  _: 1
1059
- }, 8, ["disabled"])) : (s(), x(e(U), {
1183
+ }, 8, ["disabled"])) : (n(), k(e(F), {
1060
1184
  key: 1,
1061
1185
  variant: "secondary",
1062
- disabled: n.value || !v.value,
1063
- onClick: c
1186
+ disabled: s.value || !p.value,
1187
+ onClick: _
1064
1188
  }, {
1065
- default: l(() => [
1066
- g(t(f.value.continueDSM), 1)
1189
+ default: t(() => [
1190
+ g(l(o.value.continueDSM), 1)
1067
1191
  ]),
1068
1192
  _: 1
1069
1193
  }, 8, ["disabled"]))
@@ -1076,388 +1200,388 @@ const Fa = ["aria-busy", "aria-label"], Oa = { class: "file-toolbar file-locatio
1076
1200
  ]),
1077
1201
  _: 1
1078
1202
  }, 8, ["title", "description"])
1079
- ], 8, ft));
1203
+ ], 8, Vt));
1080
1204
  }
1081
- }), Jl = /* @__PURE__ */ ue(gt, [["__scopeId", "data-v-1c0358cd"]]), ht = { role: "status" }, kt = { class: "integration-help" }, _t = { class: "integration-help" }, wt = { class: "integration-help" }, xt = { class: "integration-actions" }, Ct = {
1205
+ }), rn = /* @__PURE__ */ de(Et, [["__scopeId", "data-v-1c0358cd"]]), Ut = { role: "status" }, Rt = { class: "integration-help" }, Dt = { class: "integration-help" }, Bt = { class: "integration-help" }, Ft = { class: "integration-actions" }, qt = {
1082
1206
  key: 0,
1083
1207
  role: "status",
1084
1208
  "data-bg-picked": "",
1085
1209
  class: "bg-path"
1086
- }, $t = { class: "integration-actions" }, St = { key: 2 }, zt = {
1210
+ }, Ot = { class: "integration-actions" }, Lt = { key: 2 }, Nt = {
1087
1211
  key: 3,
1088
1212
  class: "bg-cards"
1089
- }, Pt = { class: "bg-card-body" }, Vt = {
1213
+ }, Mt = { class: "bg-card-body" }, Kt = {
1090
1214
  key: 0,
1091
1215
  class: "integration-help"
1092
- }, It = {
1216
+ }, Ht = {
1093
1217
  key: 1,
1094
1218
  class: "integration-help"
1095
- }, Tt = {
1219
+ }, Gt = {
1096
1220
  key: 2,
1097
1221
  class: "integration-help bg-path"
1098
- }, Et = {
1222
+ }, Jt = {
1099
1223
  key: 3,
1100
1224
  class: "integration-help"
1101
- }, Ut = {
1225
+ }, Wt = {
1102
1226
  key: 4,
1103
1227
  class: "integration-help"
1104
- }, At = { class: "integration-actions" }, Dt = ["aria-label"], Rt = { class: "integration-help" }, qt = { key: 1 }, Bt = {
1228
+ }, Xt = { class: "integration-actions" }, Qt = ["aria-label"], Yt = { class: "integration-help" }, Zt = { key: 1 }, jt = {
1105
1229
  key: 2,
1106
1230
  class: "bg-cards"
1107
- }, Ft = { class: "bg-card-body" }, Ot = {
1231
+ }, el = { class: "bg-card-body" }, al = {
1108
1232
  key: 0,
1109
1233
  class: "integration-help"
1110
- }, Lt = {
1234
+ }, tl = {
1111
1235
  key: 1,
1112
1236
  class: "integration-help"
1113
- }, Nt = { class: "integration-help" }, Mt = { class: "integration-actions" }, Kt = { class: "integration-actions" }, Ht = { class: "integration-actions" }, Gt = /* @__PURE__ */ oe({
1237
+ }, ll = { class: "integration-help" }, nl = { class: "integration-actions" }, sl = { class: "integration-actions" }, il = { class: "integration-actions" }, ol = /* @__PURE__ */ oe({
1114
1238
  __name: "BackgroundPanel",
1115
1239
  props: {
1116
1240
  ctx: {}
1117
1241
  },
1118
- setup(y, { expose: q }) {
1119
- const f = y, a = L(() => sa(f.ctx.locale)), o = (p, B) => Ae(p, B, f.ctx.locale), m = b(), i = b([]), n = b(), u = b(!1), r = b(!1), v = b([]), k = b(), D = b(!1), S = b("3600"), c = b(), w = b(), z = b(), M = b(!1), N = b(!1), K = b(), O = b(""), Z = b(""), ae = na(f.ctx);
1120
- let W, H = !1;
1121
- const j = (p) => !["queued", "running"].includes(p.state), te = (p) => j(p) && p.state !== "paused", se = (p) => p.state === "running" && p.pauseRequested, Q = (p) => se(p) ? a.value.pausing : a.value[`state_${p.state}`], Y = (p) => se(p) ? "warning" : { queued: "info", running: "info", paused: "warning", succeeded: "success", failed: "danger", canceled: "neutral", interrupted: "danger" }[p.state];
1122
- async function G(p, B) {
1242
+ setup(r, { expose: T }) {
1243
+ const o = r, a = D(() => pa(o.ctx.locale)), u = (f, M) => Be(f, M, o.ctx.locale), m = y(), i = y([]), s = y(), d = y(!1), v = y(!1), p = y([]), h = y(), E = y(!1), z = y("3600"), _ = y(), $ = y(), x = y(), V = y(!1), I = y(!1), N = y(), q = y(""), X = y(""), ae = fa(o.ctx);
1244
+ let Z, H = !1;
1245
+ const j = (f) => !["queued", "running"].includes(f.state), te = (f) => j(f) && f.state !== "paused", ne = (f) => f.state === "running" && f.pauseRequested, Q = (f) => ne(f) ? a.value.pausing : a.value[`state_${f.state}`], Y = (f) => ne(f) ? "warning" : { queued: "info", running: "info", paused: "warning", succeeded: "success", failed: "danger", canceled: "neutral", interrupted: "danger" }[f.state];
1246
+ async function G(f, M) {
1123
1247
  try {
1124
- return await f.ctx.call(p, B);
1125
- } catch (_) {
1248
+ return await o.ctx.call(f, M);
1249
+ } catch (w) {
1126
1250
  if (H) return;
1127
- _?.code === "unsupported" ? (u.value = !0, i.value = [], v.value = [], k.value = void 0, c.value = void 0, w.value = void 0, m.value = void 0, z.value = void 0, K.value = void 0, O.value && URL.revokeObjectURL(O.value), O.value = "") : H || (n.value = _);
1251
+ w?.code === "unsupported" ? (d.value = !0, i.value = [], p.value = [], h.value = void 0, _.value = void 0, $.value = void 0, m.value = void 0, x.value = void 0, N.value = void 0, q.value && URL.revokeObjectURL(q.value), q.value = "") : H || (s.value = w);
1128
1252
  return;
1129
1253
  }
1130
1254
  }
1131
1255
  async function le() {
1132
- if (!(H || M.value)) {
1133
- M.value = !0;
1256
+ if (!(H || V.value)) {
1257
+ V.value = !0;
1134
1258
  try {
1135
- const p = await G("bg.status");
1136
- if (!p || H) return;
1137
- if (!p.limits || typeof p.admin != "boolean") {
1138
- n.value = { code: "unavailable" };
1259
+ const f = await G("bg.status");
1260
+ if (!f || H) return;
1261
+ if (!f.limits || typeof f.admin != "boolean") {
1262
+ s.value = { code: "unavailable" };
1139
1263
  return;
1140
1264
  }
1141
- u.value = !1, m.value = p;
1142
- const B = await G("bg.jobs.list");
1143
- B && !H && (i.value = B.jobs ?? []);
1144
- const _ = await G("bg.schedules.list");
1145
- _ && !H && (v.value = _.schedules ?? []), !H && i.value.every(j) && v.value.every((ie) => !ie.enabled) && W && (clearInterval(W), W = void 0);
1265
+ d.value = !1, m.value = f;
1266
+ const M = await G("bg.jobs.list");
1267
+ M && !H && (i.value = M.jobs ?? []);
1268
+ const w = await G("bg.schedules.list");
1269
+ w && !H && (p.value = w.schedules ?? []), !H && i.value.every(j) && p.value.every((ie) => !ie.enabled) && Z && (clearInterval(Z), Z = void 0);
1146
1270
  } finally {
1147
- M.value = !1;
1271
+ V.value = !1;
1148
1272
  }
1149
1273
  }
1150
1274
  }
1151
- function R() {
1152
- W || (W = setInterval(() => {
1275
+ function L() {
1276
+ Z || (Z = setInterval(() => {
1153
1277
  le();
1154
1278
  }, 3e3));
1155
1279
  }
1156
- async function T(p) {
1157
- if (!r.value) {
1158
- r.value = !0, n.value = void 0;
1280
+ async function U(f) {
1281
+ if (!v.value) {
1282
+ v.value = !0, s.value = void 0;
1159
1283
  try {
1160
- await p(), await le(), (v.value.some((B) => B.enabled) || i.value.some((B) => !j(B))) && R();
1284
+ await f(), await le(), (p.value.some((M) => M.enabled) || i.value.some((M) => !j(M))) && L();
1161
1285
  } finally {
1162
- H || (r.value = !1);
1286
+ H || (v.value = !1);
1163
1287
  }
1164
1288
  }
1165
1289
  }
1166
- const E = () => T(async () => {
1167
- if (!z.value) return;
1168
- await G("bg.jobs.purge", { owner: z.value }) && (z.value = void 0);
1169
- }), J = L(() => [{ value: "3600", label: a.value.hourly }, { value: "86400", label: a.value.daily }, { value: "604800", label: a.value.weekly }]), re = (p) => {
1170
- k.value = p, D.value = !1, S.value = "3600";
1171
- }, we = () => T(async () => {
1172
- if (!k.value || !D.value) return;
1173
- await G("bg.schedules.create", { key: Be(), jobId: k.value.id, intervalSeconds: Number(S.value), consent: !0 }) && (k.value = void 0);
1174
- }), xe = (p) => T(() => G("bg.schedules.disable", { id: p })), ve = () => T(async () => {
1175
- if (!c.value) return;
1176
- await G("bg.schedules.delete", { id: c.value.id }) && (c.value = void 0);
1177
- }), ce = () => T(async () => {
1178
- if (!w.value) return;
1179
- await G("bg.schedules.enable", { id: w.value.id, consent: !0 }) && (w.value = void 0);
1180
- }), de = (p) => {
1181
- const B = new Date(p);
1182
- return Number.isFinite(B.getTime()) ? B.toLocaleString() : a.value.unknownTime;
1183
- }, me = (p) => p.copyRetained && p.state === "succeeded" && !p.scheduleId && p.submitter?.user === m.value?.owner?.user && p.submitter?.uid === m.value?.owner?.uid, F = (p) => T(() => G("bg.jobs.cancel", { id: p })), ee = (p) => T(() => G("bg.jobs.pause", { id: p })), A = (p) => T(() => G("bg.jobs.resume", { id: p })), C = (p) => {
1184
- const B = p.lastIndexOf("/");
1185
- K.value = { folder: p.slice(0, B), relative: p.slice(B + 1) };
1186
- }, P = () => T(async () => {
1187
- if (!K.value) return;
1188
- await G("bg.jobs.submit", { key: Be(), ...K.value }) && (K.value = void 0);
1290
+ const B = () => U(async () => {
1291
+ if (!x.value) return;
1292
+ await G("bg.jobs.purge", { owner: x.value }) && (x.value = void 0);
1293
+ }), J = D(() => [{ value: "3600", label: a.value.hourly }, { value: "86400", label: a.value.daily }, { value: "604800", label: a.value.weekly }]), ue = (f) => {
1294
+ h.value = f, E.value = !1, z.value = "3600";
1295
+ }, xe = () => U(async () => {
1296
+ if (!h.value || !E.value) return;
1297
+ await G("bg.schedules.create", { key: Ne(), jobId: h.value.id, intervalSeconds: Number(z.value), consent: !0 }) && (h.value = void 0);
1298
+ }), Ce = (f) => U(() => G("bg.schedules.disable", { id: f })), ve = () => U(async () => {
1299
+ if (!_.value) return;
1300
+ await G("bg.schedules.delete", { id: _.value.id }) && (_.value = void 0);
1301
+ }), ce = () => U(async () => {
1302
+ if (!$.value) return;
1303
+ await G("bg.schedules.enable", { id: $.value.id, consent: !0 }) && ($.value = void 0);
1304
+ }), re = (f) => {
1305
+ const M = new Date(f);
1306
+ return Number.isFinite(M.getTime()) ? M.toLocaleString() : a.value.unknownTime;
1307
+ }, me = (f) => f.copyRetained && f.state === "succeeded" && !f.scheduleId && f.submitter?.user === m.value?.owner?.user && f.submitter?.uid === m.value?.owner?.uid, K = (f) => U(() => G("bg.jobs.cancel", { id: f })), ee = (f) => U(() => G("bg.jobs.pause", { id: f })), O = (f) => U(() => G("bg.jobs.resume", { id: f })), C = (f) => {
1308
+ const M = f.lastIndexOf("/");
1309
+ N.value = { folder: f.slice(0, M), relative: f.slice(M + 1) };
1310
+ }, P = () => U(async () => {
1311
+ if (!N.value) return;
1312
+ await G("bg.jobs.submit", { key: Ne(), ...N.value }) && (N.value = void 0);
1189
1313
  });
1190
- async function I(p) {
1191
- const B = await G("bg.jobs.result", { id: p.id });
1192
- !B || H || (O.value && URL.revokeObjectURL(O.value), O.value = URL.createObjectURL(new Blob([JSON.stringify(B.result, null, 2)], { type: "application/json" })), Z.value = `${p.name || p.id}.sha256.json`);
1314
+ async function A(f) {
1315
+ const M = await G("bg.jobs.result", { id: f.id });
1316
+ !M || H || (q.value && URL.revokeObjectURL(q.value), q.value = URL.createObjectURL(new Blob([JSON.stringify(M.result, null, 2)], { type: "application/json" })), X.value = `${f.name || f.id}.sha256.json`);
1193
1317
  }
1194
- return q({ refresh: le }), ge(() => {
1318
+ return T({ refresh: le }), ge(() => {
1195
1319
  le().then(() => {
1196
- (v.value.some((p) => p.enabled) || i.value.some((p) => !j(p))) && R();
1320
+ (p.value.some((f) => f.enabled) || i.value.some((f) => !j(f))) && L();
1197
1321
  });
1198
- }), ye(() => {
1199
- H = !0, ae.dispose(), W && clearInterval(W), O.value && URL.revokeObjectURL(O.value);
1200
- }), (p, B) => (s(), x(e(he), {
1201
- "aria-busy": r.value || M.value,
1322
+ }), fe(() => {
1323
+ H = !0, ae.dispose(), Z && clearInterval(Z), q.value && URL.revokeObjectURL(q.value);
1324
+ }), (f, M) => (n(), k(e(he), {
1325
+ "aria-busy": v.value || V.value,
1202
1326
  title: a.value.title,
1203
- description: u.value ? void 0 : a.value.help,
1204
- loading: !m.value && !n.value && !u.value,
1327
+ description: d.value ? void 0 : a.value.help,
1328
+ loading: !m.value && !s.value && !d.value,
1205
1329
  collapsible: !1,
1206
1330
  "data-background-panel": ""
1207
1331
  }, {
1208
- default: l(() => [
1209
- u.value ? (s(), x(e(X), {
1332
+ default: t(() => [
1333
+ d.value ? (n(), k(e(W), {
1210
1334
  key: 0,
1211
1335
  tone: "warning"
1212
1336
  }, {
1213
- default: l(() => [
1214
- g(t(a.value.unsupported), 1)
1337
+ default: t(() => [
1338
+ g(l(a.value.unsupported), 1)
1215
1339
  ]),
1216
1340
  _: 1
1217
- })) : (s(), V(ne, { key: 1 }, [
1218
- n.value ? (s(), x(e(X), {
1341
+ })) : (n(), R(se, { key: 1 }, [
1342
+ s.value ? (n(), k(e(W), {
1219
1343
  key: 0,
1220
1344
  tone: "danger",
1221
1345
  role: "alert"
1222
1346
  }, {
1223
- default: l(() => [
1224
- g(t(e(ia)(n.value, a.value)), 1)
1347
+ default: t(() => [
1348
+ g(l(e(ma)(s.value, a.value)), 1)
1225
1349
  ]),
1226
1350
  _: 1
1227
- })) : h("", !0),
1228
- m.value ? (s(), V(ne, { key: 1 }, [
1229
- $("p", ht, t(m.value.worker?.alive ? o(a.value.workerRunning, { user: m.value.worker.username }) : a.value.workerStopped), 1),
1230
- $("p", kt, t(o(a.value.limits, { size: m.value.limits.maxInputBytes / 1024, queue: m.value.limits.maxQueued, seconds: m.value.limits.jobTimeoutSeconds })), 1),
1231
- $("p", _t, t(m.value.admin ? a.value.adminScope : a.value.ownerScope), 1),
1232
- $("p", wt, t(o(a.value.ownerLimits, { jobs: m.value.limits.maxOwnerPending, size: m.value.limits.maxOwnerBytes / 1024 })), 1),
1233
- $("div", xt, [
1234
- d(e(U), {
1351
+ })) : b("", !0),
1352
+ m.value ? (n(), R(se, { key: 1 }, [
1353
+ S("p", Ut, l(m.value.worker?.alive ? u(a.value.workerRunning, { user: m.value.worker.username }) : a.value.workerStopped), 1),
1354
+ S("p", Rt, l(u(a.value.limits, { size: m.value.limits.maxInputBytes / 1024, queue: m.value.limits.maxQueued, seconds: m.value.limits.jobTimeoutSeconds })), 1),
1355
+ S("p", Dt, l(m.value.admin ? a.value.adminScope : a.value.ownerScope), 1),
1356
+ S("p", Bt, l(u(a.value.ownerLimits, { jobs: m.value.limits.maxOwnerPending, size: m.value.limits.maxOwnerBytes / 1024 })), 1),
1357
+ S("div", Ft, [
1358
+ c(e(F), {
1235
1359
  variant: "secondary",
1236
- disabled: r.value,
1237
- onClick: B[0] || (B[0] = (_) => N.value = !0)
1360
+ disabled: v.value,
1361
+ onClick: M[0] || (M[0] = (w) => I.value = !0)
1238
1362
  }, {
1239
- default: l(() => [
1240
- g(t(a.value.chooseFile), 1)
1363
+ default: t(() => [
1364
+ g(l(a.value.chooseFile), 1)
1241
1365
  ]),
1242
1366
  _: 1
1243
1367
  }, 8, ["disabled"]),
1244
- d(e(U), {
1368
+ c(e(F), {
1245
1369
  variant: "primary",
1246
- disabled: r.value || !K.value,
1370
+ disabled: v.value || !N.value,
1247
1371
  onClick: P
1248
1372
  }, {
1249
- default: l(() => [
1250
- g(t(a.value.submit), 1)
1373
+ default: t(() => [
1374
+ g(l(a.value.submit), 1)
1251
1375
  ]),
1252
1376
  _: 1
1253
1377
  }, 8, ["disabled"])
1254
1378
  ]),
1255
- K.value ? (s(), V("p", Ct, [
1256
- g(t(o(a.value.chosen, { path: "" }).trim()) + " ", 1),
1257
- d(e(pe), {
1258
- path: `${K.value.folder}/${K.value.relative}`
1379
+ N.value ? (n(), R("p", qt, [
1380
+ g(l(u(a.value.chosen, { path: "" }).trim()) + " ", 1),
1381
+ c(e(pe), {
1382
+ path: `${N.value.folder}/${N.value.relative}`
1259
1383
  }, null, 8, ["path"])
1260
- ])) : h("", !0),
1261
- d(Te, {
1262
- open: N.value,
1263
- "onUpdate:open": B[1] || (B[1] = (_) => N.value = _),
1264
- locale: y.ctx.locale,
1384
+ ])) : b("", !0),
1385
+ c(Ee, {
1386
+ open: I.value,
1387
+ "onUpdate:open": M[1] || (M[1] = (w) => I.value = w),
1388
+ locale: r.ctx.locale,
1265
1389
  provider: e(ae),
1266
1390
  mode: "file",
1267
1391
  title: a.value.pickerTitle,
1268
1392
  description: a.value.pickerConsent,
1269
1393
  onSelected: C
1270
1394
  }, null, 8, ["open", "locale", "provider", "title", "description"]),
1271
- z.value && m.value.admin ? (s(), x(e(X), {
1395
+ x.value && m.value.admin ? (n(), k(e(W), {
1272
1396
  key: 1,
1273
1397
  tone: "warning"
1274
1398
  }, {
1275
- default: l(() => [
1276
- $("p", null, t(o(a.value.purgeConfirm, { user: z.value.user, uid: z.value.uid })), 1),
1277
- $("div", $t, [
1278
- d(e(U), {
1399
+ default: t(() => [
1400
+ S("p", null, l(u(a.value.purgeConfirm, { user: x.value.user, uid: x.value.uid })), 1),
1401
+ S("div", Ot, [
1402
+ c(e(F), {
1279
1403
  variant: "secondary",
1280
- disabled: r.value,
1281
- onClick: E
1404
+ disabled: v.value,
1405
+ onClick: B
1282
1406
  }, {
1283
- default: l(() => [
1284
- g(t(a.value.confirmPurge), 1)
1407
+ default: t(() => [
1408
+ g(l(a.value.confirmPurge), 1)
1285
1409
  ]),
1286
1410
  _: 1
1287
1411
  }, 8, ["disabled"]),
1288
- d(e(U), {
1412
+ c(e(F), {
1289
1413
  variant: "secondary",
1290
- disabled: r.value,
1291
- onClick: B[2] || (B[2] = (_) => z.value = void 0)
1414
+ disabled: v.value,
1415
+ onClick: M[2] || (M[2] = (w) => x.value = void 0)
1292
1416
  }, {
1293
- default: l(() => [
1294
- g(t(a.value.keepJobs), 1)
1417
+ default: t(() => [
1418
+ g(l(a.value.keepJobs), 1)
1295
1419
  ]),
1296
1420
  _: 1
1297
1421
  }, 8, ["disabled"])
1298
1422
  ])
1299
1423
  ]),
1300
1424
  _: 1
1301
- })) : h("", !0),
1302
- i.value.length ? (s(), V("div", zt, [
1303
- (s(!0), V(ne, null, ke(i.value, (_) => (s(), x(e(Fe), {
1304
- key: _.id,
1305
- title: _.name,
1425
+ })) : b("", !0),
1426
+ i.value.length ? (n(), R("div", Nt, [
1427
+ (n(!0), R(se, null, _e(i.value, (w) => (n(), k(e(We), {
1428
+ key: w.id,
1429
+ title: w.name,
1306
1430
  "layout-type": "compact",
1307
- "data-job-state": _.state,
1308
- "data-job-id": _.id
1431
+ "data-job-state": w.state,
1432
+ "data-job-id": w.id
1309
1433
  }, {
1310
- "header-actions": l(() => [
1311
- d(e($e), {
1312
- tone: Y(_),
1434
+ "header-actions": t(() => [
1435
+ c(e(Se), {
1436
+ tone: Y(w),
1313
1437
  "data-bg-state": ""
1314
1438
  }, {
1315
- default: l(() => [
1316
- g(t(Q(_)), 1)
1439
+ default: t(() => [
1440
+ g(l(Q(w)), 1)
1317
1441
  ]),
1318
1442
  _: 2
1319
1443
  }, 1032, ["tone"])
1320
1444
  ]),
1321
- default: l(() => [
1322
- $("div", Pt, [
1323
- _.progress?.total ? (s(), V("span", Vt, t(o(a.value.progressItems, { done: _.progress.done, count: _.progress.total })), 1)) : h("", !0),
1324
- _.progress?.totalBytes ? (s(), V("span", It, t(o(a.value.progressBytes, { done: e(Re)(_.progress.bytes, y.ctx.locale), total: e(Re)(_.progress.totalBytes, y.ctx.locale) })), 1)) : h("", !0),
1325
- _.progress?.item ? (s(), V("span", Tt, [
1326
- g(t(o(a.value.progressItem, { item: "" }).trim()) + " ", 1),
1327
- d(e(pe), {
1328
- path: _.progress.item
1445
+ default: t(() => [
1446
+ S("div", Mt, [
1447
+ w.progress?.total ? (n(), R("span", Kt, l(u(a.value.progressItems, { done: w.progress.done, count: w.progress.total })), 1)) : b("", !0),
1448
+ w.progress?.totalBytes ? (n(), R("span", Ht, l(u(a.value.progressBytes, { done: e(Fe)(w.progress.bytes, r.ctx.locale), total: e(Fe)(w.progress.totalBytes, r.ctx.locale) })), 1)) : b("", !0),
1449
+ w.progress?.item ? (n(), R("span", Gt, [
1450
+ g(l(u(a.value.progressItem, { item: "" }).trim()) + " ", 1),
1451
+ c(e(pe), {
1452
+ path: w.progress.item
1329
1453
  }, null, 8, ["path"])
1330
- ])) : h("", !0),
1331
- m.value.admin && _.submitter ? (s(), V("span", Et, t(o(a.value.owner, { user: _.submitter.user, uid: _.submitter.uid })), 1)) : h("", !0),
1332
- _.scheduleId ? (s(), V("span", Ut, t(a.value.scheduledJob), 1)) : h("", !0),
1333
- $("div", At, [
1334
- m.value.admin && _.submitter ? (s(), x(e(U), {
1454
+ ])) : b("", !0),
1455
+ m.value.admin && w.submitter ? (n(), R("span", Jt, l(u(a.value.owner, { user: w.submitter.user, uid: w.submitter.uid })), 1)) : b("", !0),
1456
+ w.scheduleId ? (n(), R("span", Wt, l(a.value.scheduledJob), 1)) : b("", !0),
1457
+ S("div", Xt, [
1458
+ m.value.admin && w.submitter ? (n(), k(e(F), {
1335
1459
  key: 0,
1336
1460
  variant: "secondary",
1337
- disabled: r.value,
1338
- onClick: (ie) => z.value = _.submitter
1461
+ disabled: v.value,
1462
+ onClick: (ie) => x.value = w.submitter
1339
1463
  }, {
1340
- default: l(() => [
1341
- g(t(a.value.purgeOwner), 1)
1464
+ default: t(() => [
1465
+ g(l(a.value.purgeOwner), 1)
1342
1466
  ]),
1343
1467
  _: 1
1344
- }, 8, ["disabled", "onClick"])) : h("", !0),
1345
- !j(_) && !_.pauseRequested && !_.delegation_id ? (s(), x(e(U), {
1468
+ }, 8, ["disabled", "onClick"])) : b("", !0),
1469
+ !j(w) && !w.pauseRequested && !w.delegation_id ? (n(), k(e(F), {
1346
1470
  key: 1,
1347
1471
  variant: "secondary",
1348
- disabled: r.value,
1349
- onClick: (ie) => ee(_.id)
1472
+ disabled: v.value,
1473
+ onClick: (ie) => ee(w.id)
1350
1474
  }, {
1351
- default: l(() => [
1352
- g(t(a.value.pause), 1)
1475
+ default: t(() => [
1476
+ g(l(a.value.pause), 1)
1353
1477
  ]),
1354
1478
  _: 1
1355
- }, 8, ["disabled", "onClick"])) : h("", !0),
1356
- _.state === "paused" || se(_) ? (s(), x(e(U), {
1479
+ }, 8, ["disabled", "onClick"])) : b("", !0),
1480
+ w.state === "paused" || ne(w) ? (n(), k(e(F), {
1357
1481
  key: 2,
1358
1482
  variant: "secondary",
1359
- disabled: r.value,
1360
- onClick: (ie) => A(_.id)
1483
+ disabled: v.value,
1484
+ onClick: (ie) => O(w.id)
1361
1485
  }, {
1362
- default: l(() => [
1363
- g(t(a.value.resume), 1)
1486
+ default: t(() => [
1487
+ g(l(a.value.resume), 1)
1364
1488
  ]),
1365
1489
  _: 1
1366
- }, 8, ["disabled", "onClick"])) : h("", !0),
1367
- te(_) ? h("", !0) : (s(), x(e(U), {
1490
+ }, 8, ["disabled", "onClick"])) : b("", !0),
1491
+ te(w) ? b("", !0) : (n(), k(e(F), {
1368
1492
  key: 3,
1369
1493
  variant: "secondary",
1370
- disabled: r.value,
1371
- onClick: (ie) => F(_.id)
1494
+ disabled: v.value,
1495
+ onClick: (ie) => K(w.id)
1372
1496
  }, {
1373
- default: l(() => [
1374
- g(t(a.value.cancel), 1)
1497
+ default: t(() => [
1498
+ g(l(a.value.cancel), 1)
1375
1499
  ]),
1376
1500
  _: 1
1377
1501
  }, 8, ["disabled", "onClick"])),
1378
- me(_) ? (s(), x(e(U), {
1502
+ me(w) ? (n(), k(e(F), {
1379
1503
  key: 4,
1380
1504
  variant: "secondary",
1381
- disabled: r.value,
1382
- onClick: (ie) => re(_)
1505
+ disabled: v.value,
1506
+ onClick: (ie) => ue(w)
1383
1507
  }, {
1384
- default: l(() => [
1385
- g(t(a.value.scheduleCopy), 1)
1508
+ default: t(() => [
1509
+ g(l(a.value.scheduleCopy), 1)
1386
1510
  ]),
1387
1511
  _: 1
1388
- }, 8, ["disabled", "onClick"])) : h("", !0),
1389
- _.state === "succeeded" ? (s(), x(e(U), {
1512
+ }, 8, ["disabled", "onClick"])) : b("", !0),
1513
+ w.state === "succeeded" ? (n(), k(e(F), {
1390
1514
  key: 5,
1391
1515
  variant: "secondary",
1392
- disabled: r.value,
1393
- onClick: (ie) => I(_)
1516
+ disabled: v.value,
1517
+ onClick: (ie) => A(w)
1394
1518
  }, {
1395
- default: l(() => [
1396
- g(t(a.value.result), 1)
1519
+ default: t(() => [
1520
+ g(l(a.value.result), 1)
1397
1521
  ]),
1398
1522
  _: 1
1399
- }, 8, ["disabled", "onClick"])) : h("", !0)
1523
+ }, 8, ["disabled", "onClick"])) : b("", !0)
1400
1524
  ])
1401
1525
  ])
1402
1526
  ]),
1403
1527
  _: 2
1404
1528
  }, 1032, ["title", "data-job-state", "data-job-id"]))), 128))
1405
- ])) : (s(), V("p", St, t(a.value.noJobs), 1)),
1406
- $("section", {
1529
+ ])) : (n(), R("p", Lt, l(a.value.noJobs), 1)),
1530
+ S("section", {
1407
1531
  "data-bg-schedules": "",
1408
1532
  class: "bg-schedules",
1409
1533
  "aria-label": a.value.schedulesTitle
1410
1534
  }, [
1411
- $("h3", null, t(a.value.schedulesTitle), 1),
1412
- $("p", Rt, t(a.value.scheduleHelp), 1),
1413
- k.value ? (s(), x(e(ze), {
1535
+ S("h3", null, l(a.value.schedulesTitle), 1),
1536
+ S("p", Yt, l(a.value.scheduleHelp), 1),
1537
+ h.value ? (n(), k(e(Pe), {
1414
1538
  key: 0,
1415
1539
  class: "bg-schedule-form",
1416
- onSubmit: Se(we, ["prevent"])
1540
+ onSubmit: ze(xe, ["prevent"])
1417
1541
  }, {
1418
- default: l(() => [
1419
- $("p", null, t(o(a.value.scheduleSource, { name: k.value.name })), 1),
1420
- d(e(fe), {
1542
+ default: t(() => [
1543
+ S("p", null, l(u(a.value.scheduleSource, { name: h.value.name })), 1),
1544
+ c(e(be), {
1421
1545
  label: a.value.interval
1422
1546
  }, {
1423
- default: l(() => [
1424
- d(e(Ze), {
1425
- modelValue: S.value,
1426
- "onUpdate:modelValue": B[3] || (B[3] = (_) => S.value = _),
1547
+ default: t(() => [
1548
+ c(e(sa), {
1549
+ modelValue: z.value,
1550
+ "onUpdate:modelValue": M[3] || (M[3] = (w) => z.value = w),
1427
1551
  "data-schedule-interval": "",
1428
1552
  options: J.value,
1429
- disabled: r.value
1553
+ disabled: v.value
1430
1554
  }, null, 8, ["modelValue", "options", "disabled"])
1431
1555
  ]),
1432
1556
  _: 1
1433
1557
  }, 8, ["label"]),
1434
- d(e(xa), {
1435
- modelValue: D.value,
1436
- "onUpdate:modelValue": B[4] || (B[4] = (_) => D.value = _),
1558
+ c(e(qa), {
1559
+ modelValue: E.value,
1560
+ "onUpdate:modelValue": M[4] || (M[4] = (w) => E.value = w),
1437
1561
  "data-schedule-consent": "",
1438
- disabled: r.value,
1562
+ disabled: v.value,
1439
1563
  label: a.value.scheduleConsent
1440
1564
  }, null, 8, ["modelValue", "disabled", "label"]),
1441
- d(e(Pe), null, {
1442
- default: l(() => [
1443
- d(e(U), {
1565
+ c(e(Ve), null, {
1566
+ default: t(() => [
1567
+ c(e(F), {
1444
1568
  type: "submit",
1445
1569
  variant: "primary",
1446
- disabled: r.value || !D.value
1570
+ disabled: v.value || !E.value
1447
1571
  }, {
1448
- default: l(() => [
1449
- g(t(a.value.createSchedule), 1)
1572
+ default: t(() => [
1573
+ g(l(a.value.createSchedule), 1)
1450
1574
  ]),
1451
1575
  _: 1
1452
1576
  }, 8, ["disabled"]),
1453
- d(e(U), {
1577
+ c(e(F), {
1454
1578
  type: "button",
1455
1579
  variant: "secondary",
1456
- disabled: r.value,
1457
- onClick: B[5] || (B[5] = (_) => k.value = void 0)
1580
+ disabled: v.value,
1581
+ onClick: M[5] || (M[5] = (w) => h.value = void 0)
1458
1582
  }, {
1459
- default: l(() => [
1460
- g(t(a.value.cancel), 1)
1583
+ default: t(() => [
1584
+ g(l(a.value.cancel), 1)
1461
1585
  ]),
1462
1586
  _: 1
1463
1587
  }, 8, ["disabled"])
@@ -1466,76 +1590,76 @@ const Fa = ["aria-busy", "aria-label"], Oa = { class: "file-toolbar file-locatio
1466
1590
  })
1467
1591
  ]),
1468
1592
  _: 1
1469
- })) : h("", !0),
1470
- v.value.length ? (s(), V("div", Bt, [
1471
- (s(!0), V(ne, null, ke(v.value, (_) => (s(), x(e(Fe), {
1472
- key: _.id,
1473
- title: _.name,
1593
+ })) : b("", !0),
1594
+ p.value.length ? (n(), R("div", jt, [
1595
+ (n(!0), R(se, null, _e(p.value, (w) => (n(), k(e(We), {
1596
+ key: w.id,
1597
+ title: w.name,
1474
1598
  "layout-type": "compact",
1475
- "data-schedule-id": _.id
1599
+ "data-schedule-id": w.id
1476
1600
  }, {
1477
- "header-actions": l(() => [
1478
- d(e($e), {
1479
- tone: _.enabled ? "success" : "neutral",
1601
+ "header-actions": t(() => [
1602
+ c(e(Se), {
1603
+ tone: w.enabled ? "success" : "neutral",
1480
1604
  "data-bg-state": ""
1481
1605
  }, {
1482
- default: l(() => [
1483
- g(t(_.enabled ? a.value.scheduleOn : a.value.scheduleOff), 1)
1606
+ default: t(() => [
1607
+ g(l(w.enabled ? a.value.scheduleOn : a.value.scheduleOff), 1)
1484
1608
  ]),
1485
1609
  _: 2
1486
1610
  }, 1032, ["tone"])
1487
1611
  ]),
1488
- default: l(() => [
1489
- $("div", Ft, [
1490
- m.value.admin ? (s(), V("span", Ot, t(o(a.value.owner, { user: _.owner.user, uid: _.owner.uid })), 1)) : h("", !0),
1491
- _.enabled ? (s(), V("span", Lt, t(o(a.value.nextRun, { time: de(_.nextAt) })), 1)) : h("", !0),
1492
- $("span", Nt, t(o(a.value.missedRuns, { count: _.missed })), 1),
1493
- _.reason === "worker-changed" ? (s(), x(e(X), {
1612
+ default: t(() => [
1613
+ S("div", el, [
1614
+ m.value.admin ? (n(), R("span", al, l(u(a.value.owner, { user: w.owner.user, uid: w.owner.uid })), 1)) : b("", !0),
1615
+ w.enabled ? (n(), R("span", tl, l(u(a.value.nextRun, { time: re(w.nextAt) })), 1)) : b("", !0),
1616
+ S("span", ll, l(u(a.value.missedRuns, { count: w.missed })), 1),
1617
+ w.reason === "worker-changed" ? (n(), k(e(W), {
1494
1618
  key: 2,
1495
1619
  tone: "warning"
1496
1620
  }, {
1497
- default: l(() => [
1498
- g(t(a.value.revisionChanged), 1)
1621
+ default: t(() => [
1622
+ g(l(a.value.revisionChanged), 1)
1499
1623
  ]),
1500
1624
  _: 1
1501
- })) : _.reason === "input-unavailable" ? (s(), x(e(X), {
1625
+ })) : w.reason === "input-unavailable" ? (n(), k(e(W), {
1502
1626
  key: 3,
1503
1627
  tone: "warning"
1504
1628
  }, {
1505
- default: l(() => [
1506
- g(t(a.value.errors["input-unavailable"]), 1)
1629
+ default: t(() => [
1630
+ g(l(a.value.errors["input-unavailable"]), 1)
1507
1631
  ]),
1508
1632
  _: 1
1509
- })) : h("", !0),
1510
- $("div", Mt, [
1511
- _.enabled ? (s(), x(e(U), {
1633
+ })) : b("", !0),
1634
+ S("div", nl, [
1635
+ w.enabled ? (n(), k(e(F), {
1512
1636
  key: 0,
1513
1637
  variant: "secondary",
1514
- disabled: r.value,
1515
- onClick: (ie) => xe(_.id)
1638
+ disabled: v.value,
1639
+ onClick: (ie) => Ce(w.id)
1516
1640
  }, {
1517
- default: l(() => [
1518
- g(t(a.value.disableSchedule), 1)
1641
+ default: t(() => [
1642
+ g(l(a.value.disableSchedule), 1)
1519
1643
  ]),
1520
1644
  _: 1
1521
- }, 8, ["disabled", "onClick"])) : m.value.admin ? (s(), x(e(U), {
1645
+ }, 8, ["disabled", "onClick"])) : m.value.admin ? (n(), k(e(F), {
1522
1646
  key: 1,
1523
1647
  variant: "secondary",
1524
- disabled: r.value,
1525
- onClick: (ie) => w.value = _
1648
+ disabled: v.value,
1649
+ onClick: (ie) => $.value = w
1526
1650
  }, {
1527
- default: l(() => [
1528
- g(t(a.value.enableSchedule), 1)
1651
+ default: t(() => [
1652
+ g(l(a.value.enableSchedule), 1)
1529
1653
  ]),
1530
1654
  _: 1
1531
- }, 8, ["disabled", "onClick"])) : h("", !0),
1532
- d(e(U), {
1655
+ }, 8, ["disabled", "onClick"])) : b("", !0),
1656
+ c(e(F), {
1533
1657
  variant: "secondary",
1534
- disabled: r.value,
1535
- onClick: (ie) => c.value = _
1658
+ disabled: v.value,
1659
+ onClick: (ie) => _.value = w
1536
1660
  }, {
1537
- default: l(() => [
1538
- g(t(a.value.deleteSchedule), 1)
1661
+ default: t(() => [
1662
+ g(l(a.value.deleteSchedule), 1)
1539
1663
  ]),
1540
1664
  _: 1
1541
1665
  }, 8, ["disabled", "onClick"])
@@ -1544,93 +1668,93 @@ const Fa = ["aria-busy", "aria-label"], Oa = { class: "file-toolbar file-locatio
1544
1668
  ]),
1545
1669
  _: 2
1546
1670
  }, 1032, ["title", "data-schedule-id"]))), 128))
1547
- ])) : (s(), V("p", qt, t(a.value.noSchedules), 1)),
1548
- c.value ? (s(), x(e(X), {
1671
+ ])) : (n(), R("p", Zt, l(a.value.noSchedules), 1)),
1672
+ _.value ? (n(), k(e(W), {
1549
1673
  key: 3,
1550
1674
  tone: "warning"
1551
1675
  }, {
1552
- default: l(() => [
1553
- $("p", null, t(o(a.value.deleteScheduleConsent, { name: c.value.name })), 1),
1554
- $("div", Kt, [
1555
- d(e(U), {
1676
+ default: t(() => [
1677
+ S("p", null, l(u(a.value.deleteScheduleConsent, { name: _.value.name })), 1),
1678
+ S("div", sl, [
1679
+ c(e(F), {
1556
1680
  variant: "danger",
1557
- disabled: r.value,
1681
+ disabled: v.value,
1558
1682
  onClick: ve
1559
1683
  }, {
1560
- default: l(() => [
1561
- g(t(a.value.confirmDeleteSchedule), 1)
1684
+ default: t(() => [
1685
+ g(l(a.value.confirmDeleteSchedule), 1)
1562
1686
  ]),
1563
1687
  _: 1
1564
1688
  }, 8, ["disabled"]),
1565
- d(e(U), {
1689
+ c(e(F), {
1566
1690
  variant: "secondary",
1567
- disabled: r.value,
1568
- onClick: B[6] || (B[6] = (_) => c.value = void 0)
1691
+ disabled: v.value,
1692
+ onClick: M[6] || (M[6] = (w) => _.value = void 0)
1569
1693
  }, {
1570
- default: l(() => [
1571
- g(t(a.value.cancel), 1)
1694
+ default: t(() => [
1695
+ g(l(a.value.cancel), 1)
1572
1696
  ]),
1573
1697
  _: 1
1574
1698
  }, 8, ["disabled"])
1575
1699
  ])
1576
1700
  ]),
1577
1701
  _: 1
1578
- })) : h("", !0),
1579
- w.value ? (s(), x(e(X), {
1702
+ })) : b("", !0),
1703
+ $.value ? (n(), k(e(W), {
1580
1704
  key: 4,
1581
1705
  tone: "warning"
1582
1706
  }, {
1583
- default: l(() => [
1584
- $("p", null, t(o(a.value.enableScheduleConsent, { name: w.value.name })), 1),
1585
- $("div", Ht, [
1586
- d(e(U), {
1707
+ default: t(() => [
1708
+ S("p", null, l(u(a.value.enableScheduleConsent, { name: $.value.name })), 1),
1709
+ S("div", il, [
1710
+ c(e(F), {
1587
1711
  variant: "primary",
1588
- disabled: r.value,
1712
+ disabled: v.value,
1589
1713
  onClick: ce
1590
1714
  }, {
1591
- default: l(() => [
1592
- g(t(a.value.confirmEnableSchedule), 1)
1715
+ default: t(() => [
1716
+ g(l(a.value.confirmEnableSchedule), 1)
1593
1717
  ]),
1594
1718
  _: 1
1595
1719
  }, 8, ["disabled"]),
1596
- d(e(U), {
1720
+ c(e(F), {
1597
1721
  variant: "secondary",
1598
- disabled: r.value,
1599
- onClick: B[7] || (B[7] = (_) => w.value = void 0)
1722
+ disabled: v.value,
1723
+ onClick: M[7] || (M[7] = (w) => $.value = void 0)
1600
1724
  }, {
1601
- default: l(() => [
1602
- g(t(a.value.cancel), 1)
1725
+ default: t(() => [
1726
+ g(l(a.value.cancel), 1)
1603
1727
  ]),
1604
1728
  _: 1
1605
1729
  }, 8, ["disabled"])
1606
1730
  ])
1607
1731
  ]),
1608
1732
  _: 1
1609
- })) : h("", !0)
1610
- ], 8, Dt),
1611
- O.value ? (s(), x(e(Ye), {
1733
+ })) : b("", !0)
1734
+ ], 8, Qt),
1735
+ q.value ? (n(), k(e(na), {
1612
1736
  key: 4,
1613
- href: O.value,
1614
- download: Z.value
1737
+ href: q.value,
1738
+ download: X.value
1615
1739
  }, {
1616
- default: l(() => [
1617
- g(t(a.value.download), 1)
1740
+ default: t(() => [
1741
+ g(l(a.value.download), 1)
1618
1742
  ]),
1619
1743
  _: 1
1620
- }, 8, ["href", "download"])) : h("", !0)
1621
- ], 64)) : h("", !0)
1744
+ }, 8, ["href", "download"])) : b("", !0)
1745
+ ], 64)) : b("", !0)
1622
1746
  ], 64))
1623
1747
  ]),
1624
1748
  _: 1
1625
1749
  }, 8, ["aria-busy", "title", "description", "loading"]));
1626
1750
  }
1627
- }), Xl = /* @__PURE__ */ ue(Gt, [["__scopeId", "data-v-fa2b6101"]]), Jt = { class: "executor-alert" }, Xt = {
1751
+ }), dn = /* @__PURE__ */ de(ol, [["__scopeId", "data-v-fa2b6101"]]), ul = { class: "executor-alert" }, rl = {
1628
1752
  key: 1,
1629
1753
  class: "executor-summary"
1630
- }, Qt = ["data-executor-status"], Yt = { class: "executor-help" }, Zt = {
1754
+ }, dl = ["data-executor-status"], vl = { class: "executor-help" }, cl = {
1631
1755
  key: 0,
1632
1756
  class: "executor-hint"
1633
- }, Wt = /* @__PURE__ */ oe({
1757
+ }, pl = /* @__PURE__ */ oe({
1634
1758
  __name: "ExecutorSettings",
1635
1759
  props: {
1636
1760
  admin: { type: Boolean },
@@ -1638,381 +1762,381 @@ const Fa = ["aria-busy", "aria-label"], Oa = { class: "file-toolbar file-locatio
1638
1762
  ctx: {}
1639
1763
  },
1640
1764
  emits: ["confirmed"],
1641
- setup(y, { expose: q, emit: f }) {
1642
- const a = y, o = f, m = We(), i = L(() => Ke(a.locale)), n = b(), u = b(""), r = b(!1), v = b(!1), k = b(!1), D = b(), S = b(""), c = b([]), w = L(() => D.value?.scope_mode === "install-selected"), z = L(() => [{ label: i.value.homeScope, value: "home" }, ...c.value]), M = L(() => !w.value || !!S.value && z.value.some((Q) => Q.value === S.value)), N = L(() => w.value && !D.value?.selection), K = L(() => S.value !== D.value?.selection?.scope);
1643
- let O = !1;
1644
- async function Z(Q) {
1765
+ setup(r, { expose: T, emit: o }) {
1766
+ const a = r, u = o, m = ia(), i = D(() => ea(a.locale)), s = y(), d = y(""), v = y(!1), p = y(!1), h = y(!1), E = y(), z = y(""), _ = y([]), $ = D(() => E.value?.scope_mode === "install-selected"), x = D(() => [{ label: i.value.homeScope, value: "home" }, ..._.value]), V = D(() => !$.value || !!z.value && x.value.some((Q) => Q.value === z.value)), I = D(() => $.value && !E.value?.selection), N = D(() => z.value !== E.value?.selection?.scope);
1767
+ let q = !1;
1768
+ async function X(Q) {
1645
1769
  const Y = Q ?? await m.status();
1646
- if (O || (n.value = Y, !a.ctx)) return;
1770
+ if (q || (s.value = Y, !a.ctx)) return;
1647
1771
  const G = await a.ctx.call("delegate.status");
1648
- if (O || (D.value = G, G.scope_mode !== "install-selected")) return;
1772
+ if (q || (E.value = G, G.scope_mode !== "install-selected")) return;
1649
1773
  const le = [];
1650
- let R = 0;
1651
- for (let T = 0; T < 128; T++) {
1652
- const E = await a.ctx.call("bg.browse", { offset: R });
1653
- if (O) return;
1654
- if (!Array.isArray(E.shares) || !Number.isSafeInteger(E.total) || E.total < 0 || !E.shares.length && R < E.total) throw { code: "EXECUTOR_PROTOCOL" };
1655
- for (const J of E.shares)
1774
+ let L = 0;
1775
+ for (let U = 0; U < 128; U++) {
1776
+ const B = await a.ctx.call("bg.browse", { offset: L });
1777
+ if (q) return;
1778
+ if (!Array.isArray(B.shares) || !Number.isSafeInteger(B.total) || B.total < 0 || !B.shares.length && L < B.total) throw { code: "EXECUTOR_PROTOCOL" };
1779
+ for (const J of B.shares)
1656
1780
  J.isdir && J.path === "/" + J.name && !["home", "homes"].includes(J.name.toLowerCase()) && le.push({ label: J.name, value: "shared:" + J.name });
1657
- if (R += E.shares.length, R >= E.total) break;
1658
- if (T === 127) throw { code: "EXECUTOR_PROTOCOL" };
1781
+ if (L += B.shares.length, L >= B.total) break;
1782
+ if (U === 127) throw { code: "EXECUTOR_PROTOCOL" };
1659
1783
  }
1660
- c.value = le, S.value = G.selection?.scope ?? G.preselection ?? "";
1784
+ _.value = le, z.value = G.selection?.scope ?? G.preselection ?? "";
1661
1785
  }
1662
1786
  async function ae() {
1663
- if (!(!a.admin || r.value)) {
1664
- r.value = !0, k.value = !1;
1787
+ if (!(!a.admin || v.value)) {
1788
+ v.value = !0, h.value = !1;
1665
1789
  try {
1666
- await Z();
1790
+ await X();
1667
1791
  } catch {
1668
- O || (k.value = !0);
1792
+ q || (h.value = !0);
1669
1793
  } finally {
1670
- O || (r.value = !1);
1794
+ q || (v.value = !1);
1671
1795
  }
1672
1796
  }
1673
1797
  }
1674
- async function W() {
1675
- if (!a.admin || r.value || !u.value || !M.value || k.value) return;
1676
- r.value = !0, k.value = !1;
1677
- const Q = u.value;
1678
- u.value = "", v.value = !0;
1798
+ async function Z() {
1799
+ if (!a.admin || v.value || !d.value || !V.value || h.value) return;
1800
+ v.value = !0, h.value = !1;
1801
+ const Q = d.value;
1802
+ d.value = "", p.value = !0;
1679
1803
  try {
1680
- let Y = w.value ? await m.authorize(Q, S.value) : await m.authorize(Q);
1681
- await Z(Y), !O && w.value && Y.state === "ready" && N.value && (Y = await m.authorize(Q, S.value), await Z(Y)), O || o("confirmed");
1804
+ let Y = $.value ? await m.authorize(Q, z.value) : await m.authorize(Q);
1805
+ await X(Y), !q && $.value && Y.state === "ready" && I.value && (Y = await m.authorize(Q, z.value), await X(Y)), q || u("confirmed");
1682
1806
  } catch {
1683
- O || (k.value = !0);
1807
+ q || (h.value = !0);
1684
1808
  } finally {
1685
- O || (r.value = !1, v.value = !1);
1809
+ q || (v.value = !1, p.value = !1);
1686
1810
  }
1687
1811
  }
1688
- const H = L(() => v.value ? "confirming" : n.value ? n.value.state === "ready" ? N.value ? "scope" : "ready" : n.value.state === "needs-admin-approval" ? "needs" : "blocked" : void 0), j = L(() => ({ ready: { tone: "success", text: i.value.statusReady }, scope: { tone: "warning", text: i.value.statusScope }, needs: { tone: "warning", text: i.value.statusNeeds }, blocked: { tone: "danger", text: i.value.statusBlocked }, confirming: { tone: "info", text: i.value.statusConfirming } })[H.value ?? "confirming"]), te = L(() => w.value && !!D.value?.selection && !K.value), se = L(() => r.value || k.value ? "" : te.value ? i.value.hintUnchanged : u.value ? "" : i.value.hintPassword);
1689
- return q({ refresh: ae }), ge(() => {
1812
+ const H = D(() => p.value ? "confirming" : s.value ? s.value.state === "ready" ? I.value ? "scope" : "ready" : s.value.state === "needs-admin-approval" ? "needs" : "blocked" : void 0), j = D(() => ({ ready: { tone: "success", text: i.value.statusReady }, scope: { tone: "warning", text: i.value.statusScope }, needs: { tone: "warning", text: i.value.statusNeeds }, blocked: { tone: "danger", text: i.value.statusBlocked }, confirming: { tone: "info", text: i.value.statusConfirming } })[H.value ?? "confirming"]), te = D(() => $.value && !!E.value?.selection && !N.value), ne = D(() => v.value || h.value ? "" : te.value ? i.value.hintUnchanged : d.value ? "" : i.value.hintPassword);
1813
+ return T({ refresh: ae }), ge(() => {
1690
1814
  m.subscribe?.((Q) => {
1691
- O || (n.value = Q);
1815
+ q || (s.value = Q);
1692
1816
  }), ae();
1693
- }), ye(() => {
1694
- O = !0, u.value = "";
1695
- }), (Q, Y) => y.admin ? (s(), x(e(he), {
1817
+ }), fe(() => {
1818
+ q = !0, d.value = "";
1819
+ }), (Q, Y) => r.admin ? (n(), k(e(he), {
1696
1820
  key: 0,
1697
1821
  title: i.value.setupTitle,
1698
1822
  description: i.value.setupHelp,
1699
- loading: !n.value && !v.value && !k.value,
1823
+ loading: !s.value && !p.value && !h.value,
1700
1824
  collapsible: !1,
1701
- "aria-busy": r.value
1825
+ "aria-busy": v.value
1702
1826
  }, {
1703
- default: l(() => [
1704
- k.value ? (s(), x(e(X), {
1827
+ default: t(() => [
1828
+ h.value ? (n(), k(e(W), {
1705
1829
  key: 0,
1706
1830
  tone: "danger",
1707
1831
  role: "alert"
1708
1832
  }, {
1709
- default: l(() => [
1710
- $("span", Jt, [
1711
- g(t(i.value.setupError), 1),
1712
- d(e(U), {
1833
+ default: t(() => [
1834
+ S("span", ul, [
1835
+ g(l(i.value.setupError), 1),
1836
+ c(e(F), {
1713
1837
  variant: "secondary",
1714
1838
  size: "sm",
1715
- disabled: r.value,
1839
+ disabled: v.value,
1716
1840
  onClick: ae
1717
1841
  }, {
1718
- default: l(() => [
1719
- g(t(i.value.retry), 1)
1842
+ default: t(() => [
1843
+ g(l(i.value.retry), 1)
1720
1844
  ]),
1721
1845
  _: 1
1722
1846
  }, 8, ["disabled"])
1723
1847
  ])
1724
1848
  ]),
1725
1849
  _: 1
1726
- })) : h("", !0),
1727
- n.value || v.value ? (s(), V("div", Xt, [
1728
- d(e(Ce), {
1850
+ })) : b("", !0),
1851
+ s.value || p.value ? (n(), R("div", rl, [
1852
+ c(e($e), {
1729
1853
  label: i.value.status,
1730
1854
  "label-width": "10rem"
1731
1855
  }, {
1732
- default: l(() => [
1733
- $("span", {
1856
+ default: t(() => [
1857
+ S("span", {
1734
1858
  role: "status",
1735
1859
  "data-executor-status": H.value
1736
1860
  }, [
1737
- d(e($e), {
1861
+ c(e(Se), {
1738
1862
  tone: j.value.tone
1739
1863
  }, {
1740
- default: l(() => [
1741
- g(t(j.value.text), 1)
1864
+ default: t(() => [
1865
+ g(l(j.value.text), 1)
1742
1866
  ]),
1743
1867
  _: 1
1744
1868
  }, 8, ["tone"])
1745
- ], 8, Qt)
1869
+ ], 8, dl)
1746
1870
  ]),
1747
1871
  _: 1
1748
1872
  }, 8, ["label"]),
1749
- n.value?.reason && (n.value.state === "blocked" || n.value.state === "unsupported") ? (s(), x(e(Ce), {
1873
+ s.value?.reason && (s.value.state === "blocked" || s.value.state === "unsupported") ? (n(), k(e($e), {
1750
1874
  key: 0,
1751
1875
  label: i.value.details,
1752
1876
  "label-width": "10rem"
1753
1877
  }, {
1754
- default: l(() => [
1755
- g(t(n.value.reason), 1)
1878
+ default: t(() => [
1879
+ g(l(s.value.reason), 1)
1756
1880
  ]),
1757
1881
  _: 1
1758
- }, 8, ["label"])) : h("", !0),
1759
- D.value?.selection ? (s(), x(e(Ce), {
1882
+ }, 8, ["label"])) : b("", !0),
1883
+ E.value?.selection ? (n(), k(e($e), {
1760
1884
  key: 1,
1761
1885
  label: i.value.protectedScope,
1762
1886
  "label-width": "10rem"
1763
1887
  }, {
1764
- default: l(() => [
1765
- d(e(pe), {
1766
- path: D.value.selection.root
1888
+ default: t(() => [
1889
+ c(e(pe), {
1890
+ path: E.value.selection.root
1767
1891
  }, null, 8, ["path"])
1768
1892
  ]),
1769
1893
  _: 1
1770
- }, 8, ["label"])) : h("", !0)
1771
- ])) : h("", !0),
1772
- H.value === "needs" ? (s(), x(e(X), {
1894
+ }, 8, ["label"])) : b("", !0)
1895
+ ])) : b("", !0),
1896
+ H.value === "needs" ? (n(), k(e(W), {
1773
1897
  key: 2,
1774
1898
  tone: "info"
1775
1899
  }, {
1776
- default: l(() => [
1777
- g(t(i.value.needs), 1)
1900
+ default: t(() => [
1901
+ g(l(i.value.needs), 1)
1778
1902
  ]),
1779
1903
  _: 1
1780
- })) : H.value === "scope" ? (s(), x(e(X), {
1904
+ })) : H.value === "scope" ? (n(), k(e(W), {
1781
1905
  key: 3,
1782
1906
  tone: "warning"
1783
1907
  }, {
1784
- default: l(() => [
1785
- g(t(i.value.scopeNeeds), 1)
1908
+ default: t(() => [
1909
+ g(l(i.value.scopeNeeds), 1)
1786
1910
  ]),
1787
1911
  _: 1
1788
- })) : H.value === "blocked" ? (s(), x(e(X), {
1912
+ })) : H.value === "blocked" ? (n(), k(e(W), {
1789
1913
  key: 4,
1790
1914
  tone: "warning"
1791
1915
  }, {
1792
- default: l(() => [
1793
- g(t(i.value.blocked), 1)
1916
+ default: t(() => [
1917
+ g(l(i.value.blocked), 1)
1794
1918
  ]),
1795
1919
  _: 1
1796
- })) : h("", !0),
1797
- D.value?.mismatch ? (s(), x(e(X), {
1920
+ })) : b("", !0),
1921
+ E.value?.mismatch ? (n(), k(e(W), {
1798
1922
  key: 5,
1799
1923
  tone: "warning"
1800
1924
  }, {
1801
- default: l(() => [
1802
- g(t(i.value.scopeMismatch), 1)
1925
+ default: t(() => [
1926
+ g(l(i.value.scopeMismatch), 1)
1803
1927
  ]),
1804
1928
  _: 1
1805
- })) : h("", !0),
1806
- n.value?.state === "needs-admin-approval" || n.value?.retry || w.value && n.value?.state === "ready" ? (s(), x(e(ze), {
1929
+ })) : b("", !0),
1930
+ s.value?.state === "needs-admin-approval" || s.value?.retry || $.value && s.value?.state === "ready" ? (n(), k(e(Pe), {
1807
1931
  key: 6,
1808
1932
  direction: "vertical",
1809
1933
  class: "executor-form",
1810
- onSubmit: Se(W, ["prevent"])
1934
+ onSubmit: ze(Z, ["prevent"])
1811
1935
  }, {
1812
- default: l(() => [
1813
- w.value ? (s(), V(ne, { key: 0 }, [
1814
- $("p", Yt, t(D.value?.selection ? i.value.scopeChangeHelp : i.value.preselectionHelp), 1),
1815
- d(e(fe), {
1936
+ default: t(() => [
1937
+ $.value ? (n(), R(se, { key: 0 }, [
1938
+ S("p", vl, l(E.value?.selection ? i.value.scopeChangeHelp : i.value.preselectionHelp), 1),
1939
+ c(e(be), {
1816
1940
  label: i.value.scopeLabel,
1817
1941
  "label-for": "delegate-scope"
1818
1942
  }, {
1819
- default: l(() => [
1820
- d(e(Ze), {
1943
+ default: t(() => [
1944
+ c(e(sa), {
1821
1945
  id: "delegate-scope",
1822
- modelValue: S.value,
1823
- "onUpdate:modelValue": Y[0] || (Y[0] = (G) => S.value = G),
1824
- options: z.value,
1825
- disabled: r.value || k.value
1946
+ modelValue: z.value,
1947
+ "onUpdate:modelValue": Y[0] || (Y[0] = (G) => z.value = G),
1948
+ options: x.value,
1949
+ disabled: v.value || h.value
1826
1950
  }, null, 8, ["modelValue", "options", "disabled"])
1827
1951
  ]),
1828
1952
  _: 1
1829
1953
  }, 8, ["label"])
1830
- ], 64)) : h("", !0),
1831
- d(e(fe), {
1954
+ ], 64)) : b("", !0),
1955
+ c(e(be), {
1832
1956
  label: i.value.password,
1833
1957
  "label-for": "delegate-password"
1834
1958
  }, {
1835
- default: l(() => [
1836
- d(e(_e), {
1959
+ default: t(() => [
1960
+ c(e(we), {
1837
1961
  id: "delegate-password",
1838
- modelValue: u.value,
1839
- "onUpdate:modelValue": Y[1] || (Y[1] = (G) => u.value = G),
1962
+ modelValue: d.value,
1963
+ "onUpdate:modelValue": Y[1] || (Y[1] = (G) => d.value = G),
1840
1964
  type: "password",
1841
1965
  autocomplete: "current-password",
1842
- disabled: r.value || k.value
1966
+ disabled: v.value || h.value
1843
1967
  }, null, 8, ["modelValue", "disabled"])
1844
1968
  ]),
1845
1969
  _: 1
1846
1970
  }, 8, ["label"]),
1847
- d(e(Pe), null, {
1848
- default: l(() => [
1849
- d(e(U), {
1971
+ c(e(Ve), null, {
1972
+ default: t(() => [
1973
+ c(e(F), {
1850
1974
  type: "submit",
1851
1975
  variant: "primary",
1852
- disabled: r.value || k.value || !u.value || !M.value || te.value
1976
+ disabled: v.value || h.value || !d.value || !V.value || te.value
1853
1977
  }, {
1854
- default: l(() => [
1855
- g(t(w.value ? D.value?.selection ? i.value.confirmScope : i.value.confirmShare : i.value.authorize), 1)
1978
+ default: t(() => [
1979
+ g(l($.value ? E.value?.selection ? i.value.confirmScope : i.value.confirmShare : i.value.authorize), 1)
1856
1980
  ]),
1857
1981
  _: 1
1858
1982
  }, 8, ["disabled"]),
1859
- se.value ? (s(), V("span", Zt, t(se.value), 1)) : h("", !0)
1983
+ ne.value ? (n(), R("span", cl, l(ne.value), 1)) : b("", !0)
1860
1984
  ]),
1861
1985
  _: 1
1862
1986
  })
1863
1987
  ]),
1864
1988
  _: 1
1865
- })) : h("", !0)
1989
+ })) : b("", !0)
1866
1990
  ]),
1867
1991
  _: 1
1868
- }, 8, ["title", "description", "loading", "aria-busy"])) : h("", !0);
1992
+ }, 8, ["title", "description", "loading", "aria-busy"])) : b("", !0);
1869
1993
  }
1870
- }), Ql = /* @__PURE__ */ ue(Wt, [["__scopeId", "data-v-868f9f3a"]]), jt = {
1994
+ }), vn = /* @__PURE__ */ de(pl, [["__scopeId", "data-v-868f9f3a"]]), fl = {
1871
1995
  key: 1,
1872
1996
  role: "status"
1873
- }, el = {
1997
+ }, ml = {
1874
1998
  key: 2,
1875
1999
  role: "status"
1876
- }, al = {
2000
+ }, yl = {
1877
2001
  key: 0,
1878
2002
  role: "status",
1879
2003
  class: "destination"
1880
- }, tl = { key: 3 }, ll = {
2004
+ }, bl = { key: 3 }, gl = {
1881
2005
  key: 4,
1882
2006
  class: "records"
1883
- }, sl = ["data-job-state"], nl = ["role"], il = { key: 5 }, ol = {
2007
+ }, hl = ["data-job-state"], kl = ["role"], _l = { key: 5 }, wl = {
1884
2008
  key: 6,
1885
2009
  class: "records"
1886
- }, ul = /* @__PURE__ */ oe({
2010
+ }, xl = /* @__PURE__ */ oe({
1887
2011
  __name: "DelegatePanel",
1888
2012
  props: {
1889
2013
  ctx: {}
1890
2014
  },
1891
- setup(y, { expose: q }) {
1892
- const f = y, a = L(() => Ke(f.ctx.locale)), o = L(() => He(f.ctx.locale)), m = Me(f.ctx), i = b(), n = b([]), u = b([]), r = b(!1), v = b(), k = b(""), D = b(!1), S = b(""), c = b(""), w = b("");
1893
- let z = !1, M, N;
1894
- Je([c, S, w], () => {
1895
- N = void 0;
2015
+ setup(r, { expose: T }) {
2016
+ const o = r, a = D(() => ea(o.ctx.locale)), u = D(() => aa(o.ctx.locale)), m = je(o.ctx), i = y(), s = y([]), d = y([]), v = y(!1), p = y(), h = y(""), E = y(!1), z = y(""), _ = y(""), $ = y("");
2017
+ let x = !1, V, I;
2018
+ qe([_, z, $], () => {
2019
+ I = void 0;
1896
2020
  }, { flush: "sync" });
1897
- const K = (R) => ["queued", "running", "waiting_executor"].includes(R.state), O = L(() => u.value.some((R) => R.state === "waiting_executor")), Z = ["EXECUTOR_UNAVAILABLE", "EXECUTOR_TIMEOUT"], ae = L(() => O.value && Z.includes(v.value?.code ?? "")), W = L(() => i.value && i.value.state !== "ready" && !(O.value && i.value.state === "needs-admin-approval" && Z.includes(i.value.reason ?? "")));
2021
+ const N = (L) => ["queued", "running", "waiting_executor"].includes(L.state), q = D(() => d.value.some((L) => L.state === "waiting_executor")), X = ["EXECUTOR_UNAVAILABLE", "EXECUTOR_TIMEOUT"], ae = D(() => q.value && X.includes(p.value?.code ?? "")), Z = D(() => i.value && i.value.state !== "ready" && !(q.value && i.value.state === "needs-admin-approval" && X.includes(i.value.reason ?? "")));
1898
2022
  async function H() {
1899
- if (z) return;
1900
- const [R, T, E] = await Promise.allSettled([f.ctx.call("delegate.status"), f.ctx.call("delegate.list"), f.ctx.call("delegate.jobs.list")]);
1901
- if (!z) {
1902
- R.status === "fulfilled" && (i.value = R.value), T.status === "fulfilled" && (n.value = (T.value.delegations ?? []).filter((J) => !J.revoked)), E.status === "fulfilled" && (u.value = E.value.jobs ?? []);
1903
- for (const J of [R, T, E]) if (J.status === "rejected") throw J.reason;
2023
+ if (x) return;
2024
+ const [L, U, B] = await Promise.allSettled([o.ctx.call("delegate.status"), o.ctx.call("delegate.list"), o.ctx.call("delegate.jobs.list")]);
2025
+ if (!x) {
2026
+ L.status === "fulfilled" && (i.value = L.value), U.status === "fulfilled" && (s.value = (U.value.delegations ?? []).filter((J) => !J.revoked)), B.status === "fulfilled" && (d.value = B.value.jobs ?? []);
2027
+ for (const J of [L, U, B]) if (J.status === "rejected") throw J.reason;
1904
2028
  }
1905
2029
  }
1906
- async function j(R) {
1907
- if (!(r.value || z)) {
1908
- r.value = !0, v.value = void 0;
2030
+ async function j(L) {
2031
+ if (!(v.value || x)) {
2032
+ v.value = !0, p.value = void 0;
1909
2033
  try {
1910
- await R();
1911
- } catch (T) {
1912
- z || (v.value = T);
2034
+ await L();
2035
+ } catch (U) {
2036
+ x || (p.value = U);
1913
2037
  } finally {
1914
- z || (r.value = !1);
2038
+ x || (v.value = !1);
1915
2039
  }
1916
2040
  }
1917
2041
  }
1918
- const te = () => j(H), se = (R) => j(async () => {
1919
- await f.ctx.call("delegate.revoke", { delegation_id: R }), await H();
1920
- }), Q = (R) => j(async () => {
1921
- const T = await f.ctx.call("delegate.jobs.cancel", { id: R });
1922
- z || (k.value = T.revocation_pending ? a.value.pending : ""), await H();
1923
- }), Y = L(() => i.value?.state === "ready" && !!S.value && !!c.value && !!w.value), G = () => j(async () => {
1924
- Y.value && (await f.ctx.call("delegate.jobs.submit", { key: N ?? (N = crypto.randomUUID()), url: c.value, dest: S.value, name: w.value }), z || (c.value = "", w.value = "", S.value = ""), await H());
1925
- }), le = (R) => {
1926
- const T = new Date(R);
1927
- return Number.isNaN(T.getTime()) ? "—" : T.toLocaleString(f.ctx.locale);
2042
+ const te = () => j(H), ne = (L) => j(async () => {
2043
+ await o.ctx.call("delegate.revoke", { delegation_id: L }), await H();
2044
+ }), Q = (L) => j(async () => {
2045
+ const U = await o.ctx.call("delegate.jobs.cancel", { id: L });
2046
+ x || (h.value = U.revocation_pending ? a.value.pending : ""), await H();
2047
+ }), Y = D(() => i.value?.state === "ready" && !!z.value && !!_.value && !!$.value), G = () => j(async () => {
2048
+ Y.value && (await o.ctx.call("delegate.jobs.submit", { key: I ?? (I = crypto.randomUUID()), url: _.value, dest: z.value, name: $.value }), x || (_.value = "", $.value = "", z.value = ""), await H());
2049
+ }), le = (L) => {
2050
+ const U = new Date(L);
2051
+ return Number.isNaN(U.getTime()) ? "—" : U.toLocaleString(o.ctx.locale);
1928
2052
  };
1929
- return q({ refresh: te }), ge(() => {
1930
- te(), M = setInterval(() => {
1931
- u.value.some(K) && te();
2053
+ return T({ refresh: te }), ge(() => {
2054
+ te(), V = setInterval(() => {
2055
+ d.value.some(N) && te();
1932
2056
  }, 3e3);
1933
- }), ye(() => {
1934
- z = !0, M && clearInterval(M), m.dispose();
1935
- }), (R, T) => (s(), x(e(he), {
2057
+ }), fe(() => {
2058
+ x = !0, V && clearInterval(V), m.dispose();
2059
+ }), (L, U) => (n(), k(e(he), {
1936
2060
  title: a.value.title,
1937
2061
  description: a.value.help,
1938
- loading: !i.value && r.value,
2062
+ loading: !i.value && v.value,
1939
2063
  collapsible: !1,
1940
- "aria-busy": r.value,
2064
+ "aria-busy": v.value,
1941
2065
  class: "delegate-panel"
1942
2066
  }, {
1943
- default: l(() => [
1944
- v.value && !ae.value ? (s(), x(e(X), {
2067
+ default: t(() => [
2068
+ p.value && !ae.value ? (n(), k(e(W), {
1945
2069
  key: 0,
1946
2070
  tone: "danger",
1947
2071
  role: "alert"
1948
2072
  }, {
1949
- default: l(() => [
1950
- g(t(e(oa)(v.value, a.value)), 1)
2073
+ default: t(() => [
2074
+ g(l(e(ya)(p.value, a.value)), 1)
1951
2075
  ]),
1952
2076
  _: 1
1953
- })) : h("", !0),
1954
- k.value ? (s(), V("p", jt, t(k.value), 1)) : h("", !0),
1955
- W.value ? (s(), V("p", el, t(i.value?.state === "needs-admin-approval" ? a.value.needs : a.value.blocked), 1)) : h("", !0),
1956
- d(e(ze), {
2077
+ })) : b("", !0),
2078
+ h.value ? (n(), R("p", fl, l(h.value), 1)) : b("", !0),
2079
+ Z.value ? (n(), R("p", ml, l(i.value?.state === "needs-admin-approval" ? a.value.needs : a.value.blocked), 1)) : b("", !0),
2080
+ c(e(Pe), {
1957
2081
  direction: "vertical",
1958
- onSubmit: Se(G, ["prevent"])
2082
+ onSubmit: ze(G, ["prevent"])
1959
2083
  }, {
1960
- default: l(() => [
1961
- d(e(fe), {
2084
+ default: t(() => [
2085
+ c(e(be), {
1962
2086
  label: a.value.url,
1963
2087
  "label-for": "delegate-url"
1964
2088
  }, {
1965
- default: l(() => [
1966
- d(e(_e), {
2089
+ default: t(() => [
2090
+ c(e(we), {
1967
2091
  id: "delegate-url",
1968
- modelValue: c.value,
1969
- "onUpdate:modelValue": T[0] || (T[0] = (E) => c.value = E),
2092
+ modelValue: _.value,
2093
+ "onUpdate:modelValue": U[0] || (U[0] = (B) => _.value = B),
1970
2094
  type: "url",
1971
- disabled: r.value || i.value?.state !== "ready"
2095
+ disabled: v.value || i.value?.state !== "ready"
1972
2096
  }, null, 8, ["modelValue", "disabled"])
1973
2097
  ]),
1974
2098
  _: 1
1975
2099
  }, 8, ["label"]),
1976
- d(e(fe), {
2100
+ c(e(be), {
1977
2101
  label: a.value.name,
1978
2102
  "label-for": "delegate-name"
1979
2103
  }, {
1980
- default: l(() => [
1981
- d(e(_e), {
2104
+ default: t(() => [
2105
+ c(e(we), {
1982
2106
  id: "delegate-name",
1983
- modelValue: w.value,
1984
- "onUpdate:modelValue": T[1] || (T[1] = (E) => w.value = E),
2107
+ modelValue: $.value,
2108
+ "onUpdate:modelValue": U[1] || (U[1] = (B) => $.value = B),
1985
2109
  "data-file-name": "",
1986
- disabled: r.value || i.value?.state !== "ready"
2110
+ disabled: v.value || i.value?.state !== "ready"
1987
2111
  }, null, 8, ["modelValue", "disabled"])
1988
2112
  ]),
1989
2113
  _: 1
1990
2114
  }, 8, ["label"]),
1991
- $("p", null, t(a.value.size), 1),
1992
- S.value ? (s(), V("p", al, [
1993
- g(t(a.value.destination) + t(o.value), 1),
1994
- d(e(pe), { path: S.value }, null, 8, ["path"])
1995
- ])) : h("", !0),
1996
- d(e(Pe), null, {
1997
- default: l(() => [
1998
- d(e(U), {
2115
+ S("p", null, l(a.value.size), 1),
2116
+ z.value ? (n(), R("p", yl, [
2117
+ g(l(a.value.destination) + l(u.value), 1),
2118
+ c(e(pe), { path: z.value }, null, 8, ["path"])
2119
+ ])) : b("", !0),
2120
+ c(e(Ve), null, {
2121
+ default: t(() => [
2122
+ c(e(F), {
1999
2123
  type: "button",
2000
2124
  variant: "secondary",
2001
- disabled: r.value || i.value?.state !== "ready",
2002
- onClick: T[2] || (T[2] = (E) => D.value = !0)
2125
+ disabled: v.value || i.value?.state !== "ready",
2126
+ onClick: U[2] || (U[2] = (B) => E.value = !0)
2003
2127
  }, {
2004
- default: l(() => [
2005
- g(t(a.value.choose), 1)
2128
+ default: t(() => [
2129
+ g(l(a.value.choose), 1)
2006
2130
  ]),
2007
2131
  _: 1
2008
2132
  }, 8, ["disabled"]),
2009
- d(e(U), {
2133
+ c(e(F), {
2010
2134
  type: "submit",
2011
2135
  variant: "primary",
2012
- disabled: r.value || !Y.value
2136
+ disabled: v.value || !Y.value
2013
2137
  }, {
2014
- default: l(() => [
2015
- g(t(a.value.submit), 1)
2138
+ default: t(() => [
2139
+ g(l(a.value.submit), 1)
2016
2140
  ]),
2017
2141
  _: 1
2018
2142
  }, 8, ["disabled"])
@@ -2022,54 +2146,54 @@ const Fa = ["aria-busy", "aria-label"], Oa = { class: "file-toolbar file-locatio
2022
2146
  ]),
2023
2147
  _: 1
2024
2148
  }),
2025
- d(Te, {
2026
- open: D.value,
2027
- "onUpdate:open": T[3] || (T[3] = (E) => D.value = E),
2028
- locale: y.ctx.locale,
2149
+ c(Ee, {
2150
+ open: E.value,
2151
+ "onUpdate:open": U[3] || (U[3] = (B) => E.value = B),
2152
+ locale: r.ctx.locale,
2029
2153
  provider: e(m),
2030
2154
  mode: "folder",
2031
- onSelected: T[4] || (T[4] = (E) => S.value = E)
2155
+ onSelected: U[4] || (U[4] = (B) => z.value = B)
2032
2156
  }, null, 8, ["open", "locale", "provider"]),
2033
- $("h3", null, t(a.value.downloads), 1),
2034
- !u.value.length && !v.value ? (s(), V("p", tl, t(a.value.noJobs), 1)) : (s(), V("ul", ll, [
2035
- (s(!0), V(ne, null, ke(u.value, (E) => (s(), V("li", {
2036
- key: E.id,
2037
- "data-job-state": E.state
2157
+ S("h3", null, l(a.value.downloads), 1),
2158
+ !d.value.length && !p.value ? (n(), R("p", bl, l(a.value.noJobs), 1)) : (n(), R("ul", gl, [
2159
+ (n(!0), R(se, null, _e(d.value, (B) => (n(), R("li", {
2160
+ key: B.id,
2161
+ "data-job-state": B.state
2038
2162
  }, [
2039
- $("span", {
2040
- role: E.state === "waiting_executor" ? "status" : void 0
2041
- }, t(E.name) + " · " + t(a.value[E.state]), 9, nl),
2042
- K(E) ? (s(), x(e(U), {
2163
+ S("span", {
2164
+ role: B.state === "waiting_executor" ? "status" : void 0
2165
+ }, l(B.name) + " · " + l(a.value[B.state]), 9, kl),
2166
+ N(B) ? (n(), k(e(F), {
2043
2167
  key: 0,
2044
2168
  variant: "secondary",
2045
- disabled: r.value,
2046
- onClick: (J) => Q(E.id)
2169
+ disabled: v.value,
2170
+ onClick: (J) => Q(B.id)
2047
2171
  }, {
2048
- default: l(() => [
2049
- g(t(a.value.cancel), 1)
2172
+ default: t(() => [
2173
+ g(l(a.value.cancel), 1)
2050
2174
  ]),
2051
2175
  _: 1
2052
- }, 8, ["disabled", "onClick"])) : h("", !0)
2053
- ], 8, sl))), 128))
2176
+ }, 8, ["disabled", "onClick"])) : b("", !0)
2177
+ ], 8, hl))), 128))
2054
2178
  ])),
2055
- $("h3", null, t(a.value.delegations), 1),
2056
- !n.value.length && !v.value ? (s(), V("p", il, t(a.value.noDelegations), 1)) : (s(), V("ul", ol, [
2057
- (s(!0), V(ne, null, ke(n.value, (E) => (s(), V("li", {
2058
- key: E.delegation_id
2179
+ S("h3", null, l(a.value.delegations), 1),
2180
+ !s.value.length && !p.value ? (n(), R("p", _l, l(a.value.noDelegations), 1)) : (n(), R("ul", wl, [
2181
+ (n(!0), R(se, null, _e(s.value, (B) => (n(), R("li", {
2182
+ key: B.delegation_id
2059
2183
  }, [
2060
- $("div", null, [
2061
- d(e(pe), {
2062
- path: E.path
2184
+ S("div", null, [
2185
+ c(e(pe), {
2186
+ path: B.path
2063
2187
  }, null, 8, ["path"]),
2064
- $("p", null, t(a.value.expires) + t(o.value) + t(le(E.expires_at)), 1)
2188
+ S("p", null, l(a.value.expires) + l(u.value) + l(le(B.expires_at)), 1)
2065
2189
  ]),
2066
- d(e(U), {
2190
+ c(e(F), {
2067
2191
  variant: "secondary",
2068
- disabled: r.value,
2069
- onClick: (J) => se(E.delegation_id)
2192
+ disabled: v.value,
2193
+ onClick: (J) => ne(B.delegation_id)
2070
2194
  }, {
2071
- default: l(() => [
2072
- g(t(a.value.revoke), 1)
2195
+ default: t(() => [
2196
+ g(l(a.value.revoke), 1)
2073
2197
  ]),
2074
2198
  _: 1
2075
2199
  }, 8, ["disabled", "onClick"])
@@ -2079,37 +2203,37 @@ const Fa = ["aria-busy", "aria-label"], Oa = { class: "file-toolbar file-locatio
2079
2203
  _: 1
2080
2204
  }, 8, ["title", "description", "loading", "aria-busy"]));
2081
2205
  }
2082
- }), Yl = /* @__PURE__ */ ue(ul, [["__scopeId", "data-v-c590f505"]]), rl = { class: "save-alert" }, dl = { "data-save-error": "" }, vl = {
2206
+ }), cn = /* @__PURE__ */ de(xl, [["__scopeId", "data-v-c590f505"]]), Cl = { class: "save-alert" }, $l = { "data-save-error": "" }, Sl = {
2083
2207
  key: 2,
2084
2208
  class: "save-summary"
2085
- }, cl = ["data-save-status"], pl = {
2209
+ }, zl = ["data-save-status"], Pl = {
2086
2210
  key: 7,
2087
2211
  class: "save-help"
2088
- }, fl = {
2212
+ }, Vl = {
2089
2213
  key: 8,
2090
2214
  class: "save-records"
2091
- }, yl = { class: "save-record" }, ml = { class: "save-note" }, bl = {
2215
+ }, Il = { class: "save-record" }, Tl = { class: "save-note" }, Al = {
2092
2216
  key: 9,
2093
2217
  class: "save-actions"
2094
- }, gl = {
2218
+ }, El = {
2095
2219
  key: 11,
2096
2220
  class: "save-example"
2097
- }, hl = { class: "save-help" }, kl = { class: "save-actions" }, _l = {
2221
+ }, Ul = { class: "save-help" }, Rl = { class: "save-actions" }, Dl = {
2098
2222
  key: 12,
2099
2223
  class: "save-help"
2100
- }, wl = {
2224
+ }, Bl = {
2101
2225
  key: 13,
2102
2226
  "data-save-operations": ""
2103
- }, xl = ["data-save-job", "title"], Cl = {
2227
+ }, Fl = ["data-save-job", "title"], ql = {
2104
2228
  key: 0,
2105
2229
  class: "save-note"
2106
- }, $l = {
2230
+ }, Ol = {
2107
2231
  key: 1,
2108
2232
  class: "save-note"
2109
- }, Sl = ["data-save-state"], zl = { key: 1 }, Pl = {
2233
+ }, Ll = ["data-save-state"], Nl = { key: 1 }, Ml = {
2110
2234
  class: "save-danger",
2111
2235
  "data-save-danger": ""
2112
- }, Ve = 10, Vl = /* @__PURE__ */ oe({
2236
+ }, Ie = 10, Kl = /* @__PURE__ */ oe({
2113
2237
  __name: "BackgroundSavePanel",
2114
2238
  props: {
2115
2239
  sdk: {},
@@ -2120,337 +2244,337 @@ const Fa = ["aria-busy", "aria-label"], Oa = { class: "file-toolbar file-locatio
2120
2244
  sampleSave: { type: Boolean }
2121
2245
  },
2122
2246
  emits: ["authorized"],
2123
- setup(y, { expose: q, emit: f }) {
2124
- const a = y, o = f, m = b(!1), i = b(""), n = L(() => Ne(a.locale)), u = b(), r = b([]), v = b([]), k = b(!1), D = b(), S = b(""), c = b(!1), w = b([]), z = L(() => a.picker && (u.value?.selection ? ua(a.picker.provider, u.value.selection.root) : u.value?.scopeMode === "install-selected" ? void 0 : a.picker.provider));
2125
- let M = !1, N;
2126
- const K = (F) => F.state === "copying" && F.code === "CANCEL_REQUESTED", O = (F) => K(F) ? "canceling" : F.state === "committed" && !F.receipt?.path ? "uncertain" : F.state, Z = (F) => ["queued", "copying"].includes(F.state) && !K(F);
2247
+ setup(r, { expose: T, emit: o }) {
2248
+ const a = r, u = o, m = y(!1), i = y(""), s = D(() => Ze(a.locale)), d = y(), v = y([]), p = y([]), h = y(!1), E = y(), z = y(""), _ = y(!1), $ = y([]), x = D(() => a.picker && (d.value?.selection ? ba(a.picker.provider, d.value.selection.root) : d.value?.scopeMode === "install-selected" ? void 0 : a.picker.provider));
2249
+ let V = !1, I;
2250
+ const N = (K) => K.state === "copying" && K.code === "CANCEL_REQUESTED", q = (K) => N(K) ? "canceling" : K.state === "committed" && !K.receipt?.path ? "uncertain" : K.state, X = (K) => ["queued", "copying"].includes(K.state) && !N(K);
2127
2251
  function ae() {
2128
- u.value = void 0, r.value = [], v.value = [], w.value = [], m.value = !1;
2252
+ d.value = void 0, v.value = [], p.value = [], $.value = [], m.value = !1;
2129
2253
  }
2130
- async function W() {
2131
- const [F, ee, A, C] = await Promise.all([a.sdk.status(), a.sdk.list(), a.sdk.operations(), Promise.all((a.picker?.keys ?? []).map((P) => a.sdk.destination(P)))]);
2132
- if (!M) {
2133
- if (!F || typeof F.disabled != "boolean" || !Array.isArray(ee) || !Array.isArray(A)) throw { code: "unavailable" };
2134
- (u.value?.selection?.generation !== F.selection?.generation || u.value?.selection?.scope !== F.selection?.scope) && (m.value = !1), u.value = F, r.value = C.length ? ee.filter((P) => C.some((I) => I.status === "active" && I.destination?.id === P.id)) : ee, v.value = A, w.value = C;
2254
+ async function Z() {
2255
+ const [K, ee, O, C] = await Promise.all([a.sdk.status(), a.sdk.list(), a.sdk.operations(), Promise.all((a.picker?.keys ?? []).map((P) => a.sdk.destination(P)))]);
2256
+ if (!V) {
2257
+ if (!K || typeof K.disabled != "boolean" || !Array.isArray(ee) || !Array.isArray(O)) throw { code: "unavailable" };
2258
+ (d.value?.selection?.generation !== K.selection?.generation || d.value?.selection?.scope !== K.selection?.scope) && (m.value = !1), d.value = K, v.value = C.length ? ee.filter((P) => C.some((A) => A.status === "active" && A.destination?.id === P.id)) : ee, p.value = O, $.value = C;
2135
2259
  }
2136
2260
  }
2137
- async function H(F) {
2138
- if (!(M || k.value)) {
2139
- k.value = !0, D.value = void 0, S.value = "", c.value = !1;
2261
+ async function H(K) {
2262
+ if (!(V || h.value)) {
2263
+ h.value = !0, E.value = void 0, z.value = "", _.value = !1;
2140
2264
  try {
2141
- await F();
2265
+ await K();
2142
2266
  } catch (ee) {
2143
- M || (ae(), D.value = ee);
2267
+ V || (ae(), E.value = ee);
2144
2268
  } finally {
2145
- M || (k.value = !1);
2269
+ V || (h.value = !1);
2146
2270
  }
2147
2271
  }
2148
2272
  }
2149
- const j = () => H(W);
2150
- function te(F) {
2151
- o("authorized", F), j();
2273
+ const j = () => H(Z);
2274
+ function te(K) {
2275
+ u("authorized", K), j();
2152
2276
  }
2153
- function se(F) {
2154
- M || (S.value = "", D.value = F, c.value = !0);
2277
+ function ne(K) {
2278
+ V || (z.value = "", E.value = K, _.value = !0);
2155
2279
  }
2156
- const Q = L(() => c.value ? a.pickerErrorText?.(D.value) ?? Ie(D.value, n.value, "select") : Ie(D.value, n.value)), Y = (F) => H(async () => {
2157
- if ((await a.sdk.revoke({ delegation_id: F }))?.revoked !== !0) throw { code: "commit-uncertain" };
2158
- await W(), M || (S.value = n.value.revoked);
2159
- }), G = (F) => H(async () => {
2160
- await a.sdk.cancel({ delegation_id: F.delegation_id, job_id: F.job_id }), await W();
2280
+ const Q = D(() => _.value ? a.pickerErrorText?.(E.value) ?? Te(E.value, s.value, "select") : Te(E.value, s.value)), Y = (K) => H(async () => {
2281
+ if ((await a.sdk.revoke({ delegation_id: K }))?.revoked !== !0) throw { code: "commit-uncertain" };
2282
+ await Z(), V || (z.value = s.value.revoked);
2283
+ }), G = (K) => H(async () => {
2284
+ await a.sdk.cancel({ delegation_id: K.delegation_id, job_id: K.job_id }), await Z();
2161
2285
  }), le = () => H(async () => {
2162
- if (!a.admin || !u.value) return;
2163
- const F = u.value.disabled;
2164
- if ((F ? await a.sdk.enable() : await a.sdk.disable())?.disabled !== !F) throw { code: "commit-uncertain" };
2165
- await W();
2166
- }), R = (F) => H(async () => {
2167
- const ee = "example-" + Array.from(crypto.getRandomValues(new Uint8Array(16)), (A) => A.toString(16).padStart(2, "0")).join("");
2168
- await a.sdk.exportExample({ key: F, job_id: ee }), await W();
2169
- }), T = b(1), E = L(() => v.value.slice((T.value - 1) * Ve, T.value * Ve)), J = L(() => [{ key: "name", label: n.value.file }, { key: "state", label: n.value.status, width: "6.5rem" }, { key: "size", label: n.value.size, width: "6rem", align: "right" }, { key: "location", label: n.value.location, width: "30%" }, { key: "actions", label: "", width: "7.5rem" }]), re = (F) => ({ committed: "success", canceled: "neutral", canceling: "neutral", interrupted: "danger", uncertain: "warning" })[O(F)] ?? "info", we = (F) => F.slice(0, F.lastIndexOf("/")) || "/", xe = L(() => u.value?.scopeMode === "install-selected" && !u.value.selection), ve = L(() => u.value ? u.value.disabled ? "disabled" : xe.value ? "needs-scope" : "enabled" : void 0), ce = (F) => a.picker?.labels?.[F] ? `${n.value.choose}${me.value}${a.picker.labels[F]}` : n.value.choose, de = (F) => a.picker?.labels?.[F] ? `${n.value.example}${me.value}${a.picker.labels[F]}` : n.value.example, me = L(() => He(a.locale));
2170
- return q({ refresh: j }), ge(() => {
2171
- j(), N = setInterval(() => {
2172
- v.value.some(Z) && j();
2286
+ if (!a.admin || !d.value) return;
2287
+ const K = d.value.disabled;
2288
+ if ((K ? await a.sdk.enable() : await a.sdk.disable())?.disabled !== !K) throw { code: "commit-uncertain" };
2289
+ await Z();
2290
+ }), L = (K) => H(async () => {
2291
+ const ee = "example-" + Array.from(crypto.getRandomValues(new Uint8Array(16)), (O) => O.toString(16).padStart(2, "0")).join("");
2292
+ await a.sdk.exportExample({ key: K, job_id: ee }), await Z();
2293
+ }), U = y(1), B = D(() => p.value.slice((U.value - 1) * Ie, U.value * Ie)), J = D(() => [{ key: "name", label: s.value.file }, { key: "state", label: s.value.status, width: "6.5rem" }, { key: "size", label: s.value.size, width: "6rem", align: "right" }, { key: "location", label: s.value.location, width: "30%" }, { key: "actions", label: "", width: "7.5rem" }]), ue = (K) => ({ committed: "success", canceled: "neutral", canceling: "neutral", interrupted: "danger", uncertain: "warning" })[q(K)] ?? "info", xe = (K) => K.slice(0, K.lastIndexOf("/")) || "/", Ce = D(() => d.value?.scopeMode === "install-selected" && !d.value.selection), ve = D(() => d.value ? d.value.disabled ? "disabled" : Ce.value ? "needs-scope" : "enabled" : void 0), ce = (K) => a.picker?.labels?.[K] ? `${s.value.choose}${me.value}${a.picker.labels[K]}` : s.value.choose, re = (K) => a.picker?.labels?.[K] ? `${s.value.example}${me.value}${a.picker.labels[K]}` : s.value.example, me = D(() => aa(a.locale));
2294
+ return T({ refresh: j }), ge(() => {
2295
+ j(), I = setInterval(() => {
2296
+ p.value.some(X) && j();
2173
2297
  }, 3e3);
2174
- }), ye(() => {
2175
- M = !0, N && clearInterval(N);
2176
- }), (F, ee) => (s(), x(e(he), {
2177
- title: n.value.title,
2178
- description: n.value.help,
2179
- loading: k.value && !u.value && !D.value,
2298
+ }), fe(() => {
2299
+ V = !0, I && clearInterval(I);
2300
+ }), (K, ee) => (n(), k(e(he), {
2301
+ title: s.value.title,
2302
+ description: s.value.help,
2303
+ loading: h.value && !d.value && !E.value,
2180
2304
  collapsible: !1,
2181
- "aria-busy": k.value,
2305
+ "aria-busy": h.value,
2182
2306
  class: "background-save-panel"
2183
- }, Xe({
2184
- default: l(() => [
2185
- D.value ? (s(), x(e(X), {
2307
+ }, Oe({
2308
+ default: t(() => [
2309
+ E.value ? (n(), k(e(W), {
2186
2310
  key: 0,
2187
2311
  tone: "danger",
2188
2312
  role: "alert",
2189
2313
  class: "save-message"
2190
2314
  }, {
2191
- default: l(() => [
2192
- $("span", rl, [
2193
- $("span", dl, t(Q.value), 1),
2194
- d(e(U), {
2315
+ default: t(() => [
2316
+ S("span", Cl, [
2317
+ S("span", $l, l(Q.value), 1),
2318
+ c(e(F), {
2195
2319
  variant: "secondary",
2196
2320
  size: "sm",
2197
- disabled: k.value,
2321
+ disabled: h.value,
2198
2322
  onClick: j
2199
2323
  }, {
2200
- default: l(() => [
2201
- g(t(n.value.retry), 1)
2324
+ default: t(() => [
2325
+ g(l(s.value.retry), 1)
2202
2326
  ]),
2203
2327
  _: 1
2204
2328
  }, 8, ["disabled"])
2205
2329
  ])
2206
2330
  ]),
2207
2331
  _: 1
2208
- })) : h("", !0),
2209
- S.value ? (s(), x(e(X), {
2332
+ })) : b("", !0),
2333
+ z.value ? (n(), k(e(W), {
2210
2334
  key: 1,
2211
2335
  tone: "success",
2212
2336
  role: "status"
2213
2337
  }, {
2214
- default: l(() => [
2215
- g(t(S.value), 1)
2338
+ default: t(() => [
2339
+ g(l(z.value), 1)
2216
2340
  ]),
2217
2341
  _: 1
2218
- })) : h("", !0),
2219
- u.value ? (s(), V("div", vl, [
2220
- d(e(Ce), {
2221
- label: n.value.status,
2342
+ })) : b("", !0),
2343
+ d.value ? (n(), R("div", Sl, [
2344
+ c(e($e), {
2345
+ label: s.value.status,
2222
2346
  "label-width": "10rem"
2223
2347
  }, {
2224
- default: l(() => [
2225
- $("span", {
2348
+ default: t(() => [
2349
+ S("span", {
2226
2350
  role: "status",
2227
2351
  "data-save-status": ve.value
2228
2352
  }, [
2229
- d(e($e), {
2353
+ c(e(Se), {
2230
2354
  tone: ve.value === "enabled" ? "success" : ve.value === "disabled" ? "neutral" : "warning"
2231
2355
  }, {
2232
- default: l(() => [
2233
- g(t(ve.value === "enabled" ? n.value.statusEnabled : ve.value === "disabled" ? n.value.statusDisabled : n.value.statusNeedsScope), 1)
2356
+ default: t(() => [
2357
+ g(l(ve.value === "enabled" ? s.value.statusEnabled : ve.value === "disabled" ? s.value.statusDisabled : s.value.statusNeedsScope), 1)
2234
2358
  ]),
2235
2359
  _: 1
2236
2360
  }, 8, ["tone"])
2237
- ], 8, cl)
2361
+ ], 8, zl)
2238
2362
  ]),
2239
2363
  _: 1
2240
2364
  }, 8, ["label"]),
2241
- u.value.selection ? (s(), x(e(Ce), {
2365
+ d.value.selection ? (n(), k(e($e), {
2242
2366
  key: 0,
2243
- label: n.value.scope,
2367
+ label: s.value.scope,
2244
2368
  "label-width": "10rem",
2245
2369
  "data-save-scope": ""
2246
2370
  }, {
2247
- default: l(() => [
2248
- d(e(pe), {
2249
- path: u.value.selection.root
2371
+ default: t(() => [
2372
+ c(e(pe), {
2373
+ path: d.value.selection.root
2250
2374
  }, null, 8, ["path"])
2251
2375
  ]),
2252
2376
  _: 1
2253
- }, 8, ["label"])) : h("", !0)
2254
- ])) : h("", !0),
2255
- u.value?.mismatch ? (s(), x(e(X), {
2377
+ }, 8, ["label"])) : b("", !0)
2378
+ ])) : b("", !0),
2379
+ d.value?.mismatch ? (n(), k(e(W), {
2256
2380
  key: 3,
2257
2381
  tone: "warning"
2258
2382
  }, {
2259
- default: l(() => [
2260
- g(t(n.value.scopeMismatch) + " " + t(u.value.preselection) + " → " + t(u.value.selection?.root), 1)
2383
+ default: t(() => [
2384
+ g(l(s.value.scopeMismatch) + " " + l(d.value.preselection) + " → " + l(d.value.selection?.root), 1)
2261
2385
  ]),
2262
2386
  _: 1
2263
- })) : h("", !0),
2264
- xe.value ? (s(), x(e(X), {
2387
+ })) : b("", !0),
2388
+ Ce.value ? (n(), k(e(W), {
2265
2389
  key: 4,
2266
2390
  tone: "warning"
2267
2391
  }, {
2268
- default: l(() => [
2269
- g(t(n.value.scopeNeeds), 1)
2392
+ default: t(() => [
2393
+ g(l(s.value.scopeNeeds), 1)
2270
2394
  ]),
2271
2395
  _: 1
2272
- })) : h("", !0),
2273
- u.value?.disabled ? (s(), x(e(X), {
2396
+ })) : b("", !0),
2397
+ d.value?.disabled ? (n(), k(e(W), {
2274
2398
  key: 5,
2275
2399
  tone: "warning",
2276
2400
  class: "save-message"
2277
2401
  }, {
2278
- default: l(() => [
2279
- g(t(n.value.disabled), 1)
2402
+ default: t(() => [
2403
+ g(l(s.value.disabled), 1)
2280
2404
  ]),
2281
2405
  _: 1
2282
- })) : h("", !0),
2283
- $("h3", null, t(n.value.delegations), 1),
2284
- w.value.some((A) => A.status === "reselection-required") ? (s(), x(e(X), {
2406
+ })) : b("", !0),
2407
+ S("h3", null, l(s.value.delegations), 1),
2408
+ $.value.some((O) => O.status === "reselection-required") ? (n(), k(e(W), {
2285
2409
  key: 6,
2286
2410
  tone: "warning"
2287
2411
  }, {
2288
- default: l(() => [
2289
- g(t(n.value.reselect), 1)
2412
+ default: t(() => [
2413
+ g(l(s.value.reselect), 1)
2290
2414
  ]),
2291
2415
  _: 1
2292
- })) : h("", !0),
2293
- u.value && !r.value.length ? (s(), V("p", pl, t(n.value.empty), 1)) : h("", !0),
2294
- r.value.length ? (s(), V("ul", fl, [
2295
- (s(!0), V(ne, null, ke(r.value, (A) => (s(), V("li", {
2296
- key: A.id
2416
+ })) : b("", !0),
2417
+ d.value && !v.value.length ? (n(), R("p", Pl, l(s.value.empty), 1)) : b("", !0),
2418
+ v.value.length ? (n(), R("ul", Vl, [
2419
+ (n(!0), R(se, null, _e(v.value, (O) => (n(), R("li", {
2420
+ key: O.id
2297
2421
  }, [
2298
- $("div", yl, [
2299
- d(e(pe), {
2300
- path: A.path
2422
+ S("div", Il, [
2423
+ c(e(pe), {
2424
+ path: O.path
2301
2425
  }, null, 8, ["path"]),
2302
- $("span", ml, t(n.value.untilRevoked), 1)
2426
+ S("span", Tl, l(s.value.untilRevoked), 1)
2303
2427
  ]),
2304
- d(e(U), {
2428
+ c(e(F), {
2305
2429
  variant: "secondary",
2306
- disabled: k.value,
2307
- onClick: (C) => Y(A.id)
2430
+ disabled: h.value,
2431
+ onClick: (C) => Y(O.id)
2308
2432
  }, {
2309
- default: l(() => [
2310
- g(t(n.value.revoke), 1)
2433
+ default: t(() => [
2434
+ g(l(s.value.revoke), 1)
2311
2435
  ]),
2312
2436
  _: 1
2313
2437
  }, 8, ["disabled", "onClick"])
2314
2438
  ]))), 128))
2315
- ])) : h("", !0),
2316
- y.picker ? (s(), V("div", bl, [
2317
- (s(!0), V(ne, null, ke(y.picker.keys, (A) => (s(), x(e(U), {
2318
- key: A,
2439
+ ])) : b("", !0),
2440
+ r.picker ? (n(), R("div", Al, [
2441
+ (n(!0), R(se, null, _e(r.picker.keys, (O) => (n(), k(e(F), {
2442
+ key: O,
2319
2443
  variant: "secondary",
2320
- disabled: k.value || !u.value || u.value.disabled || !z.value,
2444
+ disabled: h.value || !d.value || d.value.disabled || !x.value,
2321
2445
  onClick: (C) => {
2322
- i.value = A, m.value = !0;
2446
+ i.value = O, m.value = !0;
2323
2447
  }
2324
2448
  }, {
2325
- default: l(() => [
2326
- g(t(ce(A)), 1)
2449
+ default: t(() => [
2450
+ g(l(ce(O)), 1)
2327
2451
  ]),
2328
2452
  _: 2
2329
2453
  }, 1032, ["disabled", "onClick"]))), 128))
2330
- ])) : h("", !0),
2331
- z.value ? (s(), x(Te, {
2332
- key: u.value?.selection?.scope,
2454
+ ])) : b("", !0),
2455
+ x.value ? (n(), k(Ee, {
2456
+ key: d.value?.selection?.scope,
2333
2457
  open: m.value,
2334
- "onUpdate:open": ee[0] || (ee[0] = (A) => m.value = A),
2335
- provider: z.value,
2336
- locale: y.locale,
2458
+ "onUpdate:open": ee[0] || (ee[0] = (O) => m.value = O),
2459
+ provider: x.value,
2460
+ locale: r.locale,
2337
2461
  mode: "folder",
2338
- destination: { key: i.value, selectDestination: y.sdk.selectDestination },
2462
+ destination: { key: i.value, selectDestination: r.sdk.selectDestination },
2339
2463
  onAuthorized: te,
2340
- onRefused: se,
2341
- "error-text": y.pickerErrorText
2342
- }, null, 8, ["open", "provider", "locale", "destination", "error-text"])) : h("", !0),
2343
- y.sampleSave && w.value.some((A) => A.status === "active") ? (s(), V("div", gl, [
2344
- $("p", hl, t(n.value.exampleHelp), 1),
2345
- $("div", kl, [
2346
- (s(!0), V(ne, null, ke(w.value.filter((A) => A.status === "active"), (A) => (s(), x(e(U), {
2347
- key: A.key,
2464
+ onRefused: ne,
2465
+ "error-text": r.pickerErrorText
2466
+ }, null, 8, ["open", "provider", "locale", "destination", "error-text"])) : b("", !0),
2467
+ r.sampleSave && $.value.some((O) => O.status === "active") ? (n(), R("div", El, [
2468
+ S("p", Ul, l(s.value.exampleHelp), 1),
2469
+ S("div", Rl, [
2470
+ (n(!0), R(se, null, _e($.value.filter((O) => O.status === "active"), (O) => (n(), k(e(F), {
2471
+ key: O.key,
2348
2472
  variant: "secondary",
2349
- disabled: k.value || u.value?.disabled,
2350
- onClick: (C) => R(A.key)
2473
+ disabled: h.value || d.value?.disabled,
2474
+ onClick: (C) => L(O.key)
2351
2475
  }, {
2352
- default: l(() => [
2353
- g(t(de(A.key)), 1)
2476
+ default: t(() => [
2477
+ g(l(re(O.key)), 1)
2354
2478
  ]),
2355
2479
  _: 2
2356
2480
  }, 1032, ["disabled", "onClick"]))), 128))
2357
2481
  ])
2358
- ])) : h("", !0),
2359
- $("h3", null, t(n.value.operations), 1),
2360
- u.value && !v.value.length ? (s(), V("p", _l, t(n.value.noOperations), 1)) : h("", !0),
2361
- v.value.length ? (s(), V("div", wl, [
2362
- d(e(Ca), {
2482
+ ])) : b("", !0),
2483
+ S("h3", null, l(s.value.operations), 1),
2484
+ d.value && !p.value.length ? (n(), R("p", Dl, l(s.value.noOperations), 1)) : b("", !0),
2485
+ p.value.length ? (n(), R("div", Bl, [
2486
+ c(e(Oa), {
2363
2487
  columns: J.value,
2364
- rows: E.value,
2488
+ rows: B.value,
2365
2489
  "row-key": "job_id"
2366
2490
  }, {
2367
- "cell-name": l(({ row: A }) => [
2368
- $("span", {
2491
+ "cell-name": t(({ row: O }) => [
2492
+ S("span", {
2369
2493
  class: "save-name",
2370
- "data-save-job": A.job_id,
2371
- title: A.name
2372
- }, t(A.name), 9, xl),
2373
- O(A) === "uncertain" ? (s(), V("p", Cl, t(n.value.uncertainHelp), 1)) : O(A) === "interrupted" ? (s(), V("p", $l, t(A.code ? e(Ie)({ code: A.code }, n.value) : n.value.interruptedHelp), 1)) : h("", !0)
2494
+ "data-save-job": O.job_id,
2495
+ title: O.name
2496
+ }, l(O.name), 9, Fl),
2497
+ q(O) === "uncertain" ? (n(), R("p", ql, l(s.value.uncertainHelp), 1)) : q(O) === "interrupted" ? (n(), R("p", Ol, l(O.code ? e(Te)({ code: O.code }, s.value) : s.value.interruptedHelp), 1)) : b("", !0)
2374
2498
  ]),
2375
- "cell-state": l(({ row: A }) => [
2376
- $("span", {
2377
- "data-save-state": O(A)
2499
+ "cell-state": t(({ row: O }) => [
2500
+ S("span", {
2501
+ "data-save-state": q(O)
2378
2502
  }, [
2379
- d(e($e), {
2380
- tone: re(A)
2503
+ c(e(Se), {
2504
+ tone: ue(O)
2381
2505
  }, {
2382
- default: l(() => [
2383
- g(t(n.value[O(A)]), 1)
2506
+ default: t(() => [
2507
+ g(l(s.value[q(O)]), 1)
2384
2508
  ]),
2385
2509
  _: 2
2386
2510
  }, 1032, ["tone"])
2387
- ], 8, Sl)
2511
+ ], 8, Ll)
2388
2512
  ]),
2389
- "cell-size": l(({ row: A }) => [
2390
- g(t(A.receipt?.size !== void 0 ? e($a)(A.receipt.size) : "—"), 1)
2513
+ "cell-size": t(({ row: O }) => [
2514
+ g(l(O.receipt?.size !== void 0 ? e(La)(O.receipt.size) : "—"), 1)
2391
2515
  ]),
2392
- "cell-location": l(({ row: A }) => [
2393
- O(A) === "committed" ? (s(), x(e(pe), {
2516
+ "cell-location": t(({ row: O }) => [
2517
+ q(O) === "committed" ? (n(), k(e(pe), {
2394
2518
  key: 0,
2395
- path: A.receipt.path
2396
- }, null, 8, ["path"])) : (s(), V("span", zl, "—"))
2519
+ path: O.receipt.path
2520
+ }, null, 8, ["path"])) : (n(), R("span", Nl, "—"))
2397
2521
  ]),
2398
- "cell-actions": l(({ row: A }) => [
2399
- O(A) === "committed" ? (s(), x(e(U), {
2522
+ "cell-actions": t(({ row: O }) => [
2523
+ q(O) === "committed" ? (n(), k(e(F), {
2400
2524
  key: 0,
2401
2525
  variant: "ghost",
2402
2526
  size: "sm",
2403
- "aria-label": n.value.openFolder,
2404
- title: n.value.openFolder,
2405
- onClick: (C) => e(ra)(we(A.receipt.path))
2527
+ "aria-label": s.value.openFolder,
2528
+ title: s.value.openFolder,
2529
+ onClick: (C) => e(ga)(xe(O.receipt.path))
2406
2530
  }, {
2407
- default: l(() => [
2408
- d(e(Ua), {
2531
+ default: t(() => [
2532
+ c(e(Wa), {
2409
2533
  class: "save-icon",
2410
2534
  "aria-hidden": "true"
2411
2535
  })
2412
2536
  ]),
2413
2537
  _: 1
2414
- }, 8, ["aria-label", "title", "onClick"])) : h("", !0),
2415
- Z(A) ? (s(), x(e(U), {
2538
+ }, 8, ["aria-label", "title", "onClick"])) : b("", !0),
2539
+ X(O) ? (n(), k(e(F), {
2416
2540
  key: 1,
2417
2541
  variant: "secondary",
2418
2542
  size: "sm",
2419
- disabled: k.value,
2420
- onClick: (C) => G(A)
2543
+ disabled: h.value,
2544
+ onClick: (C) => G(O)
2421
2545
  }, {
2422
- default: l(() => [
2423
- g(t(n.value.cancel), 1)
2546
+ default: t(() => [
2547
+ g(l(s.value.cancel), 1)
2424
2548
  ]),
2425
2549
  _: 1
2426
- }, 8, ["disabled", "onClick"])) : h("", !0)
2550
+ }, 8, ["disabled", "onClick"])) : b("", !0)
2427
2551
  ]),
2428
2552
  _: 1
2429
2553
  }, 8, ["columns", "rows"]),
2430
- v.value.length > Ve ? (s(), x(e(Sa), {
2554
+ p.value.length > Ie ? (n(), k(e(Na), {
2431
2555
  key: 0,
2432
- modelValue: T.value,
2433
- "onUpdate:modelValue": ee[1] || (ee[1] = (A) => T.value = A),
2434
- total: v.value.length,
2435
- "page-size": Ve,
2556
+ modelValue: U.value,
2557
+ "onUpdate:modelValue": ee[1] || (ee[1] = (O) => U.value = O),
2558
+ total: p.value.length,
2559
+ "page-size": Ie,
2436
2560
  class: "save-pages"
2437
- }, null, 8, ["modelValue", "total"])) : h("", !0)
2438
- ])) : h("", !0)
2561
+ }, null, 8, ["modelValue", "total"])) : b("", !0)
2562
+ ])) : b("", !0)
2439
2563
  ]),
2440
2564
  _: 2
2441
2565
  }, [
2442
- y.admin && u.value ? {
2566
+ r.admin && d.value ? {
2443
2567
  name: "footer",
2444
- fn: l(() => [
2445
- $("div", Pl, [
2446
- $("p", null, t(n.value.disableHelp), 1),
2447
- d(e(U), {
2448
- variant: u.value.disabled ? "secondary" : "danger",
2449
- disabled: k.value,
2568
+ fn: t(() => [
2569
+ S("div", Ml, [
2570
+ S("p", null, l(s.value.disableHelp), 1),
2571
+ c(e(F), {
2572
+ variant: d.value.disabled ? "secondary" : "danger",
2573
+ disabled: h.value,
2450
2574
  onClick: le
2451
2575
  }, {
2452
- default: l(() => [
2453
- g(t(u.value.disabled ? n.value.enable : n.value.disable), 1)
2576
+ default: t(() => [
2577
+ g(l(d.value.disabled ? s.value.enable : s.value.disable), 1)
2454
2578
  ]),
2455
2579
  _: 1
2456
2580
  }, 8, ["variant", "disabled"])
@@ -2460,187 +2584,187 @@ const Fa = ["aria-busy", "aria-label"], Oa = { class: "file-toolbar file-locatio
2460
2584
  } : void 0
2461
2585
  ]), 1032, ["title", "description", "loading", "aria-busy"]));
2462
2586
  }
2463
- }), Zl = /* @__PURE__ */ ue(Vl, [["__scopeId", "data-v-5ef5e256"]]), ea = /* @__PURE__ */ Symbol("authorization");
2464
- function Il() {
2465
- const y = Ge(ea, void 0);
2466
- if (!y) throw Error("authorization controls must be placed inside AuthorizationGate");
2467
- return y;
2587
+ }), pn = /* @__PURE__ */ de(Kl, [["__scopeId", "data-v-5ef5e256"]]), ra = /* @__PURE__ */ Symbol("authorization");
2588
+ function Hl() {
2589
+ const r = ta(ra, void 0);
2590
+ if (!r) throw Error("authorization controls must be placed inside AuthorizationGate");
2591
+ return r;
2468
2592
  }
2469
- const Tl = { class: "authorization-content" }, El = ["aria-busy", "data-authorization-state"], Ul = { class: "authorization-body" }, Al = /* @__PURE__ */ oe({
2593
+ const Gl = { class: "authorization-content" }, Jl = ["aria-busy", "data-authorization-state"], Wl = { class: "authorization-body" }, Xl = /* @__PURE__ */ oe({
2470
2594
  __name: "AuthorizationGate",
2471
2595
  props: {
2472
2596
  ctx: {},
2473
2597
  name: {}
2474
2598
  },
2475
2599
  emits: ["ready"],
2476
- setup(y, { emit: q }) {
2477
- const f = y, a = q, o = b(), m = b(), i = b(!1), n = b(!1), u = b(!1);
2478
- let r = [], v = !1, k = 0, D = !1, S;
2479
- const c = L(() => da(f.ctx.locale, f.name ?? f.ctx.displayName ?? "")), w = L(() => o.value || m.value), z = L(() => w.value?.state === "authorization_required"), M = L(() => ["helper_untrusted", "cli_untrusted"].includes(w.value?.reason || "")), N = L(() => z.value && !M.value), K = L(() => w.value?.reason === "credential_not_ready" ? "credential" : "unavailable"), O = L(() => w.value ? z.value ? c.value("title") : w.value.state === "ready" ? c.value("ready") : w.value.state === "not_admin" ? c.value("not_admin.title") : w.value.state === "session_expired" ? c.value("session_expired.title") : c.value(K.value + ".title") : c.value("checking")), Z = L(() => z.value ? c.value("purpose") : w.value?.state === "not_admin" ? c.value("not_admin.body") : w.value?.state === "session_expired" ? c.value("session_expired.body") : w.value?.state === "unavailable" ? c.value(K.value + ".body") : c.value("purpose")), ae = ["grant_missing", "upgrade_reapproval", "helper_untrusted", "cli_untrusted", "grant_incompatible", "package_identity_changed", "maintenance_task_missing", "maintenance_task_mismatch", "helper_health_rejected", "capability_missing"], W = L(() => ae.includes(w.value?.reason || "") ? w.value.reason : "unknown"), H = L(() => M.value ? "next.reinstall" : W.value === "grant_missing" ? "next.install" : W.value === "upgrade_reapproval" || W.value === "grant_incompatible" ? "next.update" : "next.repair");
2480
- function j(R) {
2481
- if (!R || R.command !== "authorization" || R.schema_version !== 1 || !["ready", "authorization_required", "not_admin", "session_expired", "unavailable"].includes(R.state) || R.reason === "upgrade_reapproval" && R.state !== "authorization_required") throw Error("invalid status");
2482
- return R;
2600
+ setup(r, { emit: T }) {
2601
+ const o = r, a = T, u = y(), m = y(), i = y(!1), s = y(!1), d = y(!1);
2602
+ let v = [], p = !1, h = 0, E = !1, z;
2603
+ const _ = D(() => ha(o.ctx.locale, o.name ?? o.ctx.displayName ?? "")), $ = D(() => u.value || m.value), x = D(() => $.value?.state === "authorization_required"), V = D(() => ["helper_untrusted", "cli_untrusted"].includes($.value?.reason || "")), I = D(() => x.value && !V.value), N = D(() => $.value?.reason === "credential_not_ready" ? "credential" : "unavailable"), q = D(() => $.value ? x.value ? _.value("title") : $.value.state === "ready" ? _.value("ready") : $.value.state === "not_admin" ? _.value("not_admin.title") : $.value.state === "session_expired" ? _.value("session_expired.title") : _.value(N.value + ".title") : _.value("checking")), X = D(() => x.value ? _.value("purpose") : $.value?.state === "not_admin" ? _.value("not_admin.body") : $.value?.state === "session_expired" ? _.value("session_expired.body") : $.value?.state === "unavailable" ? _.value(N.value + ".body") : _.value("purpose")), ae = ["grant_missing", "upgrade_reapproval", "helper_untrusted", "cli_untrusted", "grant_incompatible", "package_identity_changed", "maintenance_task_missing", "maintenance_task_mismatch", "helper_health_rejected", "capability_missing"], Z = D(() => ae.includes($.value?.reason || "") ? $.value.reason : "unknown"), H = D(() => V.value ? "next.reinstall" : Z.value === "grant_missing" ? "next.install" : Z.value === "upgrade_reapproval" || Z.value === "grant_incompatible" ? "next.update" : "next.repair");
2604
+ function j(L) {
2605
+ if (!L || L.command !== "authorization" || L.schema_version !== 1 || !["ready", "authorization_required", "not_admin", "session_expired", "unavailable"].includes(L.state) || L.reason === "upgrade_reapproval" && L.state !== "authorization_required") throw Error("invalid status");
2606
+ return L;
2483
2607
  }
2484
2608
  const te = [1e3, 3e3];
2485
- async function se(R) {
2486
- const T = R === "status" && !u.value ? te : [];
2487
- for (let E = 0; ; E++) {
2609
+ async function ne(L) {
2610
+ const U = L === "status" && !d.value ? te : [];
2611
+ for (let B = 0; ; B++) {
2488
2612
  try {
2489
- const J = j(await f.ctx.authorization?.[R]());
2490
- if (J.state !== "unavailable" || E >= T.length) return J;
2613
+ const J = j(await o.ctx.authorization?.[L]());
2614
+ if (J.state !== "unavailable" || B >= U.length) return J;
2491
2615
  } catch (J) {
2492
- if (J.code === "session_required" || E >= T.length) throw J;
2616
+ if (J.code === "session_required" || B >= U.length) throw J;
2493
2617
  }
2494
- if (await new Promise((J) => setTimeout(J, T[E])), v) throw Error("disposed");
2618
+ if (await new Promise((J) => setTimeout(J, U[B])), p) throw Error("disposed");
2495
2619
  }
2496
2620
  }
2497
- async function Q(R) {
2498
- if (i.value || v) return;
2499
- const T = ++k;
2500
- m.value = R === "request" && o.value?.state === "authorization_required" ? o.value : void 0, i.value = !0, n.value = !1, o.value = void 0;
2621
+ async function Q(L) {
2622
+ if (i.value || p) return;
2623
+ const U = ++h;
2624
+ m.value = L === "request" && u.value?.state === "authorization_required" ? u.value : void 0, i.value = !0, s.value = !1, u.value = void 0;
2501
2625
  try {
2502
- const E = await se(R);
2503
- if (v || T !== k) return;
2504
- o.value = E, u.value = E.state !== "ready", E.state === "ready" && Y(!0), E.state === "ready" && a("ready");
2505
- } catch (E) {
2506
- !v && T === k && (o.value = E.code === "session_required" ? { command: "authorization", schema_version: 1, state: "session_expired", reason: "session_expired" } : m.value || { command: "authorization", schema_version: 1, state: "unavailable", reason: "service_unavailable" }, n.value = !0, u.value = !0);
2626
+ const B = await ne(L);
2627
+ if (p || U !== h) return;
2628
+ u.value = B, d.value = B.state !== "ready", B.state === "ready" && Y(!0), B.state === "ready" && a("ready");
2629
+ } catch (B) {
2630
+ !p && U === h && (u.value = B.code === "session_required" ? { command: "authorization", schema_version: 1, state: "session_expired", reason: "session_expired" } : m.value || { command: "authorization", schema_version: 1, state: "unavailable", reason: "service_unavailable" }, s.value = !0, d.value = !0);
2507
2631
  } finally {
2508
- !v && T === k && (i.value = !1, m.value = void 0, D && (D = !1, Q("status")));
2632
+ !p && U === h && (i.value = !1, m.value = void 0, E && (E = !1, Q("status")));
2509
2633
  }
2510
2634
  }
2511
- function Y(R) {
2512
- const T = r;
2513
- r = [], T.forEach((E) => E(R));
2635
+ function Y(L) {
2636
+ const U = v;
2637
+ v = [], U.forEach((B) => B(L));
2514
2638
  }
2515
- function G(R) {
2516
- u.value = R, R || Y(!1);
2639
+ function G(L) {
2640
+ d.value = L, L || Y(!1);
2517
2641
  }
2518
2642
  function le() {
2519
- return o.value?.state === "ready" ? Promise.resolve(!0) : (i.value || (u.value = !0), new Promise((R) => r.push(R)));
2643
+ return u.value?.state === "ready" ? Promise.resolve(!0) : (i.value || (d.value = !0), new Promise((L) => v.push(L)));
2520
2644
  }
2521
- return fa(ea, { state: L(() => o.value?.state ?? "checking"), requireAuthorization: le, text: c, busy: i, canManage: () => !!f.ctx.authorization?.canManage?.(), revoke: () => Q("revoke") }), ge(() => {
2522
- S = f.ctx.reopen(() => {
2523
- i.value ? D = !0 : Q("status");
2645
+ return Pa(ra, { state: D(() => u.value?.state ?? "checking"), requireAuthorization: le, text: _, busy: i, canManage: () => !!o.ctx.authorization?.canManage?.(), revoke: () => Q("revoke") }), ge(() => {
2646
+ z = o.ctx.reopen(() => {
2647
+ i.value ? E = !0 : Q("status");
2524
2648
  }), Q("status");
2525
- }), Qe(() => {
2526
- v = !0, k++, Y(!1), typeof S == "function" && S();
2527
- }), (R, T) => (s(), V(ne, null, [
2528
- $("div", Tl, [
2529
- De(R.$slots, "default", {}, void 0, !0)
2649
+ }), la(() => {
2650
+ p = !0, h++, Y(!1), typeof z == "function" && z();
2651
+ }), (L, U) => (n(), R(se, null, [
2652
+ S("div", Gl, [
2653
+ ke(L.$slots, "default", {}, void 0, !0)
2530
2654
  ]),
2531
- d(e(qe), {
2532
- open: u.value,
2533
- title: O.value,
2655
+ c(e(Le), {
2656
+ open: d.value,
2657
+ title: q.value,
2534
2658
  width: "480px",
2535
2659
  "onUpdate:open": G
2536
2660
  }, {
2537
- footer: l(() => [
2538
- N.value ? (s(), x(e(U), {
2661
+ footer: t(() => [
2662
+ I.value ? (n(), k(e(F), {
2539
2663
  key: 0,
2540
2664
  variant: "primary",
2541
2665
  loading: i.value,
2542
2666
  disabled: i.value,
2543
- onClick: T[0] || (T[0] = (E) => Q("request"))
2667
+ onClick: U[0] || (U[0] = (B) => Q("request"))
2544
2668
  }, {
2545
- default: l(() => [
2546
- g(t(i.value ? c.value("authorizing") : c.value("authorize")), 1)
2669
+ default: t(() => [
2670
+ g(l(i.value ? _.value("authorizing") : _.value("authorize")), 1)
2547
2671
  ]),
2548
2672
  _: 1
2549
- }, 8, ["loading", "disabled"])) : (s(), x(e(U), {
2673
+ }, 8, ["loading", "disabled"])) : (n(), k(e(F), {
2550
2674
  key: 1,
2551
2675
  variant: "primary",
2552
2676
  loading: i.value,
2553
2677
  disabled: i.value,
2554
- onClick: T[1] || (T[1] = (E) => Q("status"))
2678
+ onClick: U[1] || (U[1] = (B) => Q("status"))
2555
2679
  }, {
2556
- default: l(() => [
2557
- g(t(i.value ? c.value("checking") : c.value("retry")), 1)
2680
+ default: t(() => [
2681
+ g(l(i.value ? _.value("checking") : _.value("retry")), 1)
2558
2682
  ]),
2559
2683
  _: 1
2560
2684
  }, 8, ["loading", "disabled"]))
2561
2685
  ]),
2562
- default: l(() => [
2563
- $("div", {
2686
+ default: t(() => [
2687
+ S("div", {
2564
2688
  class: "authorization-view",
2565
2689
  "aria-busy": i.value,
2566
- "data-authorization-state": o.value?.state || "checking"
2690
+ "data-authorization-state": u.value?.state || "checking"
2567
2691
  }, [
2568
- $("p", Ul, t(Z.value), 1),
2569
- z.value ? (s(), x(e(X), {
2692
+ S("p", Wl, l(X.value), 1),
2693
+ x.value ? (n(), k(e(W), {
2570
2694
  key: 0,
2571
2695
  class: "authorization-status",
2572
- tone: ["grant_missing", "upgrade_reapproval"].includes(W.value) ? "info" : "warning",
2573
- title: c.value("reason." + W.value)
2696
+ tone: ["grant_missing", "upgrade_reapproval"].includes(Z.value) ? "info" : "warning",
2697
+ title: _.value("reason." + Z.value)
2574
2698
  }, {
2575
- default: l(() => [
2576
- g(t(c.value(H.value)), 1)
2699
+ default: t(() => [
2700
+ g(l(_.value(H.value)), 1)
2577
2701
  ]),
2578
2702
  _: 1
2579
- }, 8, ["tone", "title"])) : h("", !0),
2580
- n.value ? (s(), x(e(X), {
2703
+ }, 8, ["tone", "title"])) : b("", !0),
2704
+ s.value ? (n(), k(e(W), {
2581
2705
  key: 1,
2582
2706
  class: "authorization-failed",
2583
2707
  tone: "warning"
2584
2708
  }, {
2585
- default: l(() => [
2586
- g(t(c.value("failed")), 1)
2709
+ default: t(() => [
2710
+ g(l(_.value("failed")), 1)
2587
2711
  ]),
2588
2712
  _: 1
2589
- })) : h("", !0)
2590
- ], 8, El)
2713
+ })) : b("", !0)
2714
+ ], 8, Jl)
2591
2715
  ]),
2592
2716
  _: 1
2593
2717
  }, 8, ["open", "title"])
2594
2718
  ], 64));
2595
2719
  }
2596
- }), Wl = /* @__PURE__ */ ue(Al, [["__scopeId", "data-v-e16b5f7d"]]), Dl = { class: "authorization-setting" }, Rl = {
2720
+ }), fn = /* @__PURE__ */ de(Xl, [["__scopeId", "data-v-e16b5f7d"]]), Ql = { class: "authorization-setting" }, Yl = {
2597
2721
  class: "authorization-state",
2598
2722
  role: "status"
2599
- }, ql = { class: "authorization-revoke-body" }, Bl = /* @__PURE__ */ oe({
2723
+ }, Zl = { class: "authorization-revoke-body" }, jl = /* @__PURE__ */ oe({
2600
2724
  __name: "AuthorizationSettings",
2601
- setup(y) {
2602
- const { state: q, requireAuthorization: f, text: a, busy: o, canManage: m, revoke: i } = Il(), n = b(!1), u = { checking: "checking", ready: "ready", authorization_required: "state.required", not_admin: "not_admin.title", session_expired: "session_expired.title", unavailable: "state.unavailable" };
2603
- return (r, v) => (s(), V(ne, null, [
2604
- d(e(he), {
2725
+ setup(r) {
2726
+ const { state: T, requireAuthorization: o, text: a, busy: u, canManage: m, revoke: i } = Hl(), s = y(!1), d = { checking: "checking", ready: "ready", authorization_required: "state.required", not_admin: "not_admin.title", session_expired: "session_expired.title", unavailable: "state.unavailable" };
2727
+ return (v, p) => (n(), R(se, null, [
2728
+ c(e(he), {
2605
2729
  title: e(a)("settings.title"),
2606
2730
  collapsible: !1
2607
2731
  }, {
2608
- default: l(() => [
2609
- d(e(za), {
2732
+ default: t(() => [
2733
+ c(e(Ae), {
2610
2734
  label: e(a)("settings.status"),
2611
2735
  description: e(a)("purpose"),
2612
2736
  align: "center"
2613
2737
  }, {
2614
- default: l(() => [
2615
- $("div", Dl, [
2616
- $("span", Rl, [
2617
- e(q) === "ready" ? (s(), x(e(Aa), {
2738
+ default: t(() => [
2739
+ S("div", Ql, [
2740
+ S("span", Yl, [
2741
+ e(T) === "ready" ? (n(), k(e(Xa), {
2618
2742
  key: 0,
2619
2743
  size: 16,
2620
2744
  "aria-hidden": "true"
2621
- })) : h("", !0),
2622
- g(t(e(a)(u[e(q)])), 1)
2745
+ })) : b("", !0),
2746
+ g(l(e(a)(d[e(T)])), 1)
2623
2747
  ]),
2624
- e(q) === "ready" && e(m)() ? (s(), x(e(U), {
2748
+ e(T) === "ready" && e(m)() ? (n(), k(e(F), {
2625
2749
  key: 0,
2626
2750
  variant: "secondary",
2627
- disabled: e(o),
2628
- onClick: v[0] || (v[0] = (k) => n.value = !0)
2751
+ disabled: e(u),
2752
+ onClick: p[0] || (p[0] = (h) => s.value = !0)
2629
2753
  }, {
2630
- default: l(() => [
2631
- g(t(e(a)("revoke")), 1)
2754
+ default: t(() => [
2755
+ g(l(e(a)("revoke")), 1)
2632
2756
  ]),
2633
2757
  _: 1
2634
- }, 8, ["disabled"])) : e(q) !== "ready" && e(q) !== "checking" ? (s(), x(e(U), {
2758
+ }, 8, ["disabled"])) : e(T) !== "ready" && e(T) !== "checking" ? (n(), k(e(F), {
2635
2759
  key: 1,
2636
2760
  variant: "secondary",
2637
- onClick: v[1] || (v[1] = (k) => e(f)())
2761
+ onClick: p[1] || (p[1] = (h) => e(o)())
2638
2762
  }, {
2639
- default: l(() => [
2640
- g(t(e(a)("settings.details")), 1)
2763
+ default: t(() => [
2764
+ g(l(e(a)("settings.details")), 1)
2641
2765
  ]),
2642
2766
  _: 1
2643
- })) : h("", !0)
2767
+ })) : b("", !0)
2644
2768
  ])
2645
2769
  ]),
2646
2770
  _: 1
@@ -2648,105 +2772,110 @@ const Tl = { class: "authorization-content" }, El = ["aria-busy", "data-authoriz
2648
2772
  ]),
2649
2773
  _: 1
2650
2774
  }, 8, ["title"]),
2651
- d(e(qe), {
2652
- open: n.value,
2653
- "onUpdate:open": v[4] || (v[4] = (k) => n.value = k),
2775
+ c(e(Le), {
2776
+ open: s.value,
2777
+ "onUpdate:open": p[4] || (p[4] = (h) => s.value = h),
2654
2778
  title: e(a)("revoke.title"),
2655
2779
  width: "480px"
2656
2780
  }, {
2657
- footer: l(() => [
2658
- d(e(U), {
2781
+ footer: t(() => [
2782
+ c(e(F), {
2659
2783
  variant: "secondary",
2660
- onClick: v[2] || (v[2] = (k) => n.value = !1)
2784
+ onClick: p[2] || (p[2] = (h) => s.value = !1)
2661
2785
  }, {
2662
- default: l(() => [
2663
- g(t(e(a)("cancel")), 1)
2786
+ default: t(() => [
2787
+ g(l(e(a)("cancel")), 1)
2664
2788
  ]),
2665
2789
  _: 1
2666
2790
  }),
2667
- d(e(U), {
2791
+ c(e(F), {
2668
2792
  variant: "danger",
2669
- disabled: e(o),
2670
- onClick: v[3] || (v[3] = (k) => {
2671
- n.value = !1, e(i)();
2793
+ disabled: e(u),
2794
+ onClick: p[3] || (p[3] = (h) => {
2795
+ s.value = !1, e(i)();
2672
2796
  })
2673
2797
  }, {
2674
- default: l(() => [
2675
- g(t(e(a)("revoke")), 1)
2798
+ default: t(() => [
2799
+ g(l(e(a)("revoke")), 1)
2676
2800
  ]),
2677
2801
  _: 1
2678
2802
  }, 8, ["disabled"])
2679
2803
  ]),
2680
- default: l(() => [
2681
- $("p", ql, t(e(a)("revoke.body")), 1)
2804
+ default: t(() => [
2805
+ S("p", Zl, l(e(a)("revoke.body")), 1)
2682
2806
  ]),
2683
2807
  _: 1
2684
2808
  }, 8, ["open", "title"])
2685
2809
  ], 64));
2686
2810
  }
2687
- }), jl = /* @__PURE__ */ ue(Bl, [["__scopeId", "data-v-f031e7c7"]]);
2811
+ }), mn = /* @__PURE__ */ de(jl, [["__scopeId", "data-v-f031e7c7"]]);
2688
2812
  export {
2689
- Kl as AppShell,
2690
- Wl as AuthorizationGate,
2691
- jl as AuthorizationSettings,
2692
- Xl as BackgroundPanel,
2693
- Zl as BackgroundSavePanel,
2694
- ts as DEFAULT_REQUEST_TIMEOUT,
2695
- Yl as DelegatePanel,
2696
- Ql as ExecutorSettings,
2697
- Da as ExecutorSetupKey,
2698
- ls as FILE_STATION_APP,
2699
- je as FileBrowser,
2700
- Hl as FilesPage,
2701
- Jl as LoginPage,
2702
- Te as NasPicker,
2703
- Gl as PortalSettings,
2704
- ss as activePage,
2705
- ns as authorizationCatalogs,
2706
- da as authorizationCopy,
2707
- is as backgroundCatalogs,
2708
- sa as backgroundCopy,
2709
- ia as backgroundErrorCopy,
2710
- os as catalogs,
2711
- us as clientTimeout,
2712
- na as createBackgroundPickerProvider,
2713
- rs as createBackgroundSaveFacade,
2714
- ds as createFileTransfers,
2715
- Me as createNasProvider,
2716
- vs as createPortalAccess,
2717
- Ml as createSession,
2718
- cs as decodeResponse,
2719
- ps as delegateCatalogs,
2720
- Ke as delegateCopy,
2721
- fs as encodeRequest,
2722
- oa as errorCopy,
2723
- ys as fileStationPath,
2724
- Ae as format,
2725
- ms as identityCatalogs,
2726
- la as identityCopy,
2727
- He as labelSeparator,
2728
- bs as mergeCatalogs,
2729
- gs as nasCatalogs,
2730
- be as nasCopy,
2731
- Le as nasErrorCopy,
2732
- hs as openFileInFileStation,
2733
- ra as openFolderInFileStation,
2734
- ks as portalCatalogs,
2735
- _s as portalMessages,
2736
- ws as protocolCodes,
2737
- xs as protocolOps,
2738
- Cs as protocolSchemas,
2739
- Be as requestKey,
2740
- $s as saveCatalogs,
2741
- Ne as saveCopy,
2742
- Ie as saveError,
2743
- ua as scopedPicker,
2744
- Ss as shellCatalogs,
2745
- aa as shellCopy,
2746
- zs as shellPages,
2747
- ta as uiLocale,
2748
- Ps as uiLocales,
2749
- Il as useAuthorization,
2750
- We as useExecutorSetup,
2751
- Ra as useNasRequest
2813
+ sn as AppShell,
2814
+ fn as AuthorizationGate,
2815
+ mn as AuthorizationSettings,
2816
+ dn as BackgroundPanel,
2817
+ pn as BackgroundSavePanel,
2818
+ gn as DEFAULT_REQUEST_TIMEOUT,
2819
+ cn as DelegatePanel,
2820
+ vn as ExecutorSettings,
2821
+ Qa as ExecutorSetupKey,
2822
+ hn as FILE_STATION_APP,
2823
+ ua as FileBrowser,
2824
+ on as FilesPage,
2825
+ rn as LoginPage,
2826
+ Ee as NasPicker,
2827
+ un as PortalSettings,
2828
+ kn as activePage,
2829
+ _n as authorizationCatalogs,
2830
+ ha as authorizationCopy,
2831
+ wn as backgroundCatalogs,
2832
+ pa as backgroundCopy,
2833
+ ma as backgroundErrorCopy,
2834
+ xn as bridgeCatalogs,
2835
+ Cn as bridgeErrorCopy,
2836
+ $n as catalogs,
2837
+ Sn as clientTimeout,
2838
+ fa as createBackgroundPickerProvider,
2839
+ zn as createBackgroundSaveFacade,
2840
+ Pn as createFileTransfers,
2841
+ je as createNasProvider,
2842
+ Vn as createPortalAccess,
2843
+ nn as createSession,
2844
+ In as createStandaloneContext,
2845
+ Tn as createStandaloneHost,
2846
+ An as decodeResponse,
2847
+ En as delegateCatalogs,
2848
+ ea as delegateCopy,
2849
+ Un as encodeRequest,
2850
+ ya as errorCopy,
2851
+ Rn as fileStationPath,
2852
+ Be as format,
2853
+ Dn as identityCatalogs,
2854
+ ca as identityCopy,
2855
+ va as isFullPage,
2856
+ aa as labelSeparator,
2857
+ Bn as mergeCatalogs,
2858
+ Fn as nasCatalogs,
2859
+ ye as nasCopy,
2860
+ Ye as nasErrorCopy,
2861
+ qn as openFileInFileStation,
2862
+ ga as openFolderInFileStation,
2863
+ On as portalCatalogs,
2864
+ Ln as portalMessages,
2865
+ Nn as protocolCodes,
2866
+ Mn as protocolOps,
2867
+ Kn as protocolSchemas,
2868
+ Ne as requestKey,
2869
+ Hn as saveCatalogs,
2870
+ Ze as saveCopy,
2871
+ Te as saveError,
2872
+ ba as scopedPicker,
2873
+ Gn as shellCatalogs,
2874
+ da as shellCopy,
2875
+ Jn as shellPages,
2876
+ Qe as uiLocale,
2877
+ Wn as uiLocales,
2878
+ Hl as useAuthorization,
2879
+ ia as useExecutorSetup,
2880
+ Ya as useNasRequest
2752
2881
  };