@synopackageland/sdk 0.10.7 → 0.10.9

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