@synopackageland/sdk 0.10.12 → 0.12.0

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