@synopackageland/sdk 0.10.0 → 0.10.2

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