@hiai-gg/docsmint 0.3.3 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,18 +1,19 @@
1
1
  import { $t as e, Dt as t, Er as n, Gt as r, Jt as i, Kt as a, O as o, Qt as s, Tr as c, Xt as l, Yt as u, Zt as d, an as f, cn as p, dn as m, en as h, in as g, ln as _, nn as v, on as y, qt as b, rn as x, sn as ee, tn as S, un as te, zt as ne } from "./messages-CTGAsqFu.js";
2
2
  import { t as re } from "./context-DbnW5yib.js";
3
- import { $ as C, A as w, C as ie, D as T, H as E, I as D, L as O, M as k, N as A, R as ae, S as j, T as oe, _t as M, d as se, dt as ce, et as N, ft as le, g as ue, gt as P, h as de, i as F, it as I, j as L, k as R, lt as fe, n as pe, nt as me, ot as z, q as B, t as he, tt as V, z as ge } from "./client-C6QQGb0e.js";
4
- import { i as _e, n as ve, r as ye, t as be } from "./resolve-Bl6xmJl_.js";
5
- import { a as xe, c as Se, i as Ce, n as we, o as Te, r as Ee, s as De, t as Oe } from "./input-ieWIt8I7.js";
3
+ import { $ as C, A as w, C as ie, D as T, H as E, I as D, L as O, M as k, N as A, R as ae, S as j, T as oe, _t as M, d as se, dt as ce, et as N, ft as le, g as ue, gt as P, h as de, i as F, it as I, j as L, k as fe, lt as pe, n as me, nt as he, ot as R, q as z, t as ge, tt as B, z as _e } from "./client-C6QQGb0e.js";
4
+ import { i as ve, n as ye, r as be, t as xe } from "./resolve-Bl6xmJl_.js";
5
+ import { a as Se, c as Ce, i as we, n as Te, o as Ee, r as De, s as Oe, t as V } from "./input-ieWIt8I7.js";
6
6
  import { t as H } from "./client-B9hzI0W8.js";
7
7
  import { i as ke } from "./categories-BE6ZpZl8.js";
8
- import { a as Ae, c as je, o as U, r as Me, s as Ne } from "./settings-PCrOtied.js";
9
- import { t as Pe } from "./theme.svelte-ei0QxXa8.js";
10
- import { onMount as Fe } from "svelte";
11
- import { goto as Ie } from "$app/navigation";
12
- import { page as Le } from "$app/state";
8
+ import { n as Ae, r as je, t as U } from "./search-preferences-B1GdbdUc.js";
9
+ import { a as Me, c as Ne, o as Pe, r as Fe, s as Ie } from "./settings-PCrOtied.js";
10
+ import { t as Le } from "./theme.svelte-ei0QxXa8.js";
11
+ import { onMount as Re } from "svelte";
12
+ import { goto as ze } from "$app/navigation";
13
+ import { page as Be } from "$app/state";
13
14
  //#region ../node_modules/.bun/lucide-svelte@1.0.1+ff5f301bb2db9a0d/node_modules/lucide-svelte/dist/icons/log-out.svelte
14
- function Re(e, t) {
15
- let n = he(t, [
15
+ function Ve(e, t) {
16
+ let n = ge(t, [
16
17
  "children",
17
18
  "$$slots",
18
19
  "$$events",
@@ -22,7 +23,7 @@ function Re(e, t) {
22
23
  ["path", { d: "M21 12H9" }],
23
24
  ["path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" }]
24
25
  ];
25
- ye(e, F({ name: "log-out" }, () => n, {
26
+ be(e, F({ name: "log-out" }, () => n, {
26
27
  get iconNode() {
27
28
  return r;
28
29
  },
@@ -35,8 +36,8 @@ function Re(e, t) {
35
36
  }
36
37
  //#endregion
37
38
  //#region ../node_modules/.bun/lucide-svelte@1.0.1+ff5f301bb2db9a0d/node_modules/lucide-svelte/dist/icons/save.svelte
38
- function ze(e, t) {
39
- let n = he(t, [
39
+ function He(e, t) {
40
+ let n = ge(t, [
40
41
  "children",
41
42
  "$$slots",
42
43
  "$$events",
@@ -46,7 +47,7 @@ function ze(e, t) {
46
47
  ["path", { d: "M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7" }],
47
48
  ["path", { d: "M7 3v4a1 1 0 0 0 1 1h7" }]
48
49
  ];
49
- ye(e, F({ name: "save" }, () => n, {
50
+ be(e, F({ name: "save" }, () => n, {
50
51
  get iconNode() {
51
52
  return r;
52
53
  },
@@ -59,33 +60,33 @@ function ze(e, t) {
59
60
  }
60
61
  //#endregion
61
62
  //#region ../node_modules/.bun/@hiai-gg+hiai-ui@0.0.8+3149ccaa93f654b8/node_modules/@hiai-gg/hiai-ui/dist/components/ui/tabs/tabs.svelte
62
- var Be = A("<div><!></div>");
63
- function Ve(e, t) {
63
+ var W = A("<div><!></div>");
64
+ function G(e, t) {
64
65
  le(t, !0);
65
- let n = pe(t, "value", 15, "");
66
- var r = Be(), i = C(r), a = (e) => {
66
+ let n = me(t, "value", 15, "");
67
+ var r = W(), i = C(r), a = (e) => {
67
68
  var n = k();
68
- R(N(n), () => t.children), L(e, n);
69
+ fe(N(n), () => t.children), L(e, n);
69
70
  };
70
71
  T(i, (e) => {
71
72
  t.children && e(a);
72
- }), M(r), B((e) => {
73
+ }), M(r), z((e) => {
73
74
  de(r, 1, e), se(r, "data-tabs-value", n());
74
- }, [() => ue(_e("w-full", t.class))]), L(e, r), ce();
75
+ }, [() => ue(ve("w-full", t.class))]), L(e, r), ce();
75
76
  }
76
77
  //#endregion
77
78
  //#region ../node_modules/.bun/@hiai-gg+hiai-ui@0.0.8+3149ccaa93f654b8/node_modules/@hiai-gg/hiai-ui/dist/components/ui/tabs/tabs-content.svelte
78
- var He = A("<div role=\"tabpanel\"><!></div>");
79
- function W(e, t) {
79
+ var Ue = A("<div role=\"tabpanel\"><!></div>");
80
+ function We(e, t) {
80
81
  le(t, !0);
81
82
  var n = k(), r = N(n), i = (e) => {
82
- var n = He(), r = C(n), i = (e) => {
83
+ var n = Ue(), r = C(n), i = (e) => {
83
84
  var n = k();
84
- R(N(n), () => t.children), L(e, n);
85
+ fe(N(n), () => t.children), L(e, n);
85
86
  };
86
87
  T(r, (e) => {
87
88
  t.children && e(i);
88
- }), M(n), B((e) => de(n, 1, e), [() => ue(_e("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", t.class))]), L(e, n);
89
+ }), M(n), z((e) => de(n, 1, e), [() => ue(ve("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", t.class))]), L(e, n);
89
90
  };
90
91
  T(r, (e) => {
91
92
  t.currentValue === t.value && e(i);
@@ -93,83 +94,83 @@ function W(e, t) {
93
94
  }
94
95
  //#endregion
95
96
  //#region ../node_modules/.bun/@hiai-gg+hiai-ui@0.0.8+3149ccaa93f654b8/node_modules/@hiai-gg/hiai-ui/dist/components/ui/tabs/tabs-list.svelte
96
- var G = A("<div role=\"tablist\"><!></div>");
97
- function Ue(e, t) {
97
+ var Ge = A("<div role=\"tablist\"><!></div>");
98
+ function Ke(e, t) {
98
99
  le(t, !0);
99
- var n = G(), r = C(n), i = (e) => {
100
+ var n = Ge(), r = C(n), i = (e) => {
100
101
  var n = k();
101
- R(N(n), () => t.children), L(e, n);
102
+ fe(N(n), () => t.children), L(e, n);
102
103
  };
103
104
  T(r, (e) => {
104
105
  t.children && e(i);
105
- }), M(n), B((e) => de(n, 1, e), [() => ue(_e("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground", t.class))]), L(e, n), ce();
106
+ }), M(n), z((e) => de(n, 1, e), [() => ue(ve("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground", t.class))]), L(e, n), ce();
106
107
  }
107
108
  //#endregion
108
109
  //#region ../node_modules/.bun/@hiai-gg+hiai-ui@0.0.8+3149ccaa93f654b8/node_modules/@hiai-gg/hiai-ui/dist/components/ui/tabs/tabs-trigger.svelte
109
- var We = A("<button type=\"button\" role=\"tab\"><!></button>");
110
- function Ge(e, t) {
110
+ var qe = A("<button type=\"button\" role=\"tab\"><!></button>");
111
+ function Je(e, t) {
111
112
  le(t, !0);
112
- let n = pe(t, "selected", 3, !1);
113
+ let n = me(t, "selected", 3, !1);
113
114
  function r() {
114
115
  t.onclick?.(t.value);
115
116
  }
116
- var i = We(), a = C(i), o = (e) => {
117
+ var i = qe(), a = C(i), o = (e) => {
117
118
  var n = k();
118
- R(N(n), () => t.children), L(e, n);
119
+ fe(N(n), () => t.children), L(e, n);
119
120
  };
120
121
  T(a, (e) => {
121
122
  t.children && e(o);
122
- }), M(i), B((e) => {
123
+ }), M(i), z((e) => {
123
124
  se(i, "aria-selected", n()), se(i, "data-state", n() ? "active" : "inactive"), de(i, 1, e);
124
- }, [() => ue(_e("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", n() ? "bg-primary text-primary-foreground shadow" : "text-muted-foreground hover:bg-accent hover:text-accent-foreground", t.class))]), ae("click", i, r), L(e, i), ce();
125
+ }, [() => ue(ve("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", n() ? "bg-primary text-primary-foreground shadow" : "text-muted-foreground hover:bg-accent hover:text-accent-foreground", t.class))]), ae("click", i, r), L(e, i), ce();
125
126
  }
126
127
  O(["click"]);
127
128
  //#endregion
128
129
  //#region src/lib/api/api-keys.ts
129
- function Ke() {
130
+ function Ye() {
130
131
  return H("/api/keys");
131
132
  }
132
- function qe(e) {
133
+ function Xe(e) {
133
134
  return H("/api/keys/global", {
134
135
  method: "POST",
135
136
  body: { name: e }
136
137
  });
137
138
  }
138
- function Je(e, t) {
139
+ function Ze(e, t) {
139
140
  return H(`/api/categories/${encodeURIComponent(e)}/keys`, {
140
141
  method: "POST",
141
142
  body: { name: t }
142
143
  });
143
144
  }
144
- function Ye(e) {
145
+ function Qe(e) {
145
146
  return H(`/api/keys/${encodeURIComponent(e)}`, { method: "DELETE" });
146
147
  }
147
- async function Xe(e) {
148
+ async function $e(e) {
148
149
  return (await H(`/api/keys/${encodeURIComponent(e)}/secret`)).key;
149
150
  }
150
- function Ze(e) {
151
+ function et(e) {
151
152
  for (let t of e) {
152
153
  let e = /^category:([0-9a-f-]{36}):(read|edit|write)$/i.exec(t);
153
154
  if (e?.[1]) return e[1];
154
155
  }
155
156
  return null;
156
157
  }
157
- function Qe(e, t) {
158
+ function tt(e, t) {
158
159
  return t ?? e.prefix;
159
160
  }
160
161
  //#endregion
161
162
  //#region src/lib/components/settings/ApiAccessSettings.svelte
162
- var $e = A("<div class=\"rounded-lg border border-primary/30 bg-primary/10 p-4 text-primary\"><p class=\"text-sm font-medium\">Copy this key now. It will not be shown again.</p> <code class=\"mt-2 block break-all rounded bg-background/80 p-2 text-xs text-foreground\"> </code> <!></div>"), et = A("<p class=\"text-sm text-destructive\" role=\"alert\"> </p>"), tt = A("<p class=\"text-sm text-muted-foreground\">Loading API access…</p>"), nt = A("<div class=\"flex items-center justify-between rounded-md border p-3 text-sm\"><div><div class=\"font-medium\"> </div><div class=\"text-muted-foreground\"> </div></div> <!></div>"), rt = A("<p class=\"text-sm text-muted-foreground\">No global API keys.</p>"), K = A("<div class=\"flex items-center justify-between gap-3 rounded-md border border-dashed p-3 text-sm\"><div><div class=\"font-medium\"> </div><div class=\"text-muted-foreground\"> </div></div> <div class=\"flex shrink-0 gap-2\"><!> <!></div></div>"), it = A("<p class=\"text-sm text-muted-foreground\">No category API keys.</p>"), at = A("<div class=\"max-h-72 space-y-5 overflow-y-auto pr-1\" aria-label=\"API key management list\"><section class=\"space-y-2\"><h3 class=\"text-sm font-semibold\">Global keys</h3> <!></section> <section class=\"space-y-2\"><h3 class=\"text-sm font-semibold\">Category keys</h3> <!></section></div>"), ot = A("<div class=\"space-y-5 rounded-lg border border-border bg-card p-6\"><div><h2 class=\"text-lg font-medium\">API</h2> <p class=\"text-sm text-muted-foreground\">Create a user-wide key or review category-scoped access. Global keys are shown once.</p></div> <div class=\"flex gap-2\"><!> <!></div> <!> <!> <!></div>");
163
- function st(e, t) {
163
+ var nt = A("<div class=\"rounded-lg border border-primary/30 bg-primary/10 p-4 text-primary\"><p class=\"text-sm font-medium\">Copy this key now. It will not be shown again.</p> <code class=\"mt-2 block break-all rounded bg-background/80 p-2 text-xs text-foreground\"> </code> <!></div>"), rt = A("<p class=\"text-sm text-destructive\" role=\"alert\"> </p>"), K = A("<p class=\"text-sm text-muted-foreground\">Loading API access…</p>"), it = A("<div class=\"flex items-center justify-between rounded-md border p-3 text-sm\"><div><div class=\"font-medium\"> </div><div class=\"text-muted-foreground\"> </div></div> <!></div>"), at = A("<p class=\"text-sm text-muted-foreground\">No global API keys.</p>"), ot = A("<div class=\"flex items-center justify-between gap-3 rounded-md border border-dashed p-3 text-sm\"><div><div class=\"font-medium\"> </div><div class=\"text-muted-foreground\"> </div></div> <div class=\"flex shrink-0 gap-2\"><!> <!></div></div>"), st = A("<p class=\"text-sm text-muted-foreground\">No category API keys.</p>"), ct = A("<div class=\"max-h-72 space-y-5 overflow-y-auto pr-1\" aria-label=\"API key management list\"><section class=\"space-y-2\"><h3 class=\"text-sm font-semibold\">Global keys</h3> <!></section> <section class=\"space-y-2\"><h3 class=\"text-sm font-semibold\">Category keys</h3> <!></section></div>"), lt = A("<div class=\"space-y-5 rounded-lg border border-border bg-card p-6\"><div><h2 class=\"text-lg font-medium\">API</h2> <p class=\"text-sm text-muted-foreground\">Create a user-wide key or review category-scoped access. Global keys are shown once.</p></div> <div class=\"flex gap-2\"><!> <!></div> <!> <!> <!></div>");
164
+ function ut(e, t) {
164
165
  le(t, !0);
165
- let n = z(me([])), r = z(me([])), i = z("Global API key"), a = z(me({})), o = z(null), s = z(!0), c = z(!1), l = z(null), u = fe(() => E(o) ? E(a)[E(o)] : void 0), d = fe(() => E(n).filter((e) => e.scopes.includes("global"))), f = fe(() => E(n).filter((e) => Ze(e.scopes) !== null));
166
+ let n = R(he([])), r = R(he([])), i = R("Global API key"), a = R(he({})), o = R(null), s = R(!0), c = R(!1), l = R(null), u = pe(() => E(o) ? E(a)[E(o)] : void 0), d = pe(() => E(n).filter((e) => e.scopes.includes("global"))), f = pe(() => E(n).filter((e) => et(e.scopes) !== null));
166
167
  function p(e) {
167
168
  return E(r).find((t) => t.id === e)?.name ?? "Unknown category";
168
169
  }
169
170
  async function m() {
170
171
  I(s, !0), I(l, null);
171
172
  try {
172
- let [e, t] = await Promise.all([Ke(), ke()]);
173
+ let [e, t] = await Promise.all([Ye(), ke()]);
173
174
  I(n, e.keys, !0), I(r, t, !0);
174
175
  } catch (e) {
175
176
  I(l, e instanceof Error ? e.message : "Failed to load API access", !0);
@@ -177,11 +178,11 @@ function st(e, t) {
177
178
  I(s, !1);
178
179
  }
179
180
  }
180
- Fe(m);
181
+ Re(m);
181
182
  async function h() {
182
183
  I(c, !0), I(l, null);
183
184
  try {
184
- let e = await qe(E(i).trim() || void 0);
185
+ let e = await Xe(E(i).trim() || void 0);
185
186
  I(a, {
186
187
  ...E(a),
187
188
  [e.id]: e.key
@@ -195,7 +196,7 @@ function st(e, t) {
195
196
  async function g(e) {
196
197
  I(c, !0);
197
198
  try {
198
- await Ye(e);
199
+ await Qe(e);
199
200
  let { [e]: t, ...n } = E(a);
200
201
  I(a, n, !0), E(o) === e && I(o, null), await m();
201
202
  } finally {
@@ -203,11 +204,11 @@ function st(e, t) {
203
204
  }
204
205
  }
205
206
  async function _(e) {
206
- let t = E(a)[e.id] ?? await Xe(e.id);
207
- await navigator.clipboard.writeText(Qe(e, t));
207
+ let t = E(a)[e.id] ?? await $e(e.id);
208
+ await navigator.clipboard.writeText(tt(e, t));
208
209
  }
209
- var v = ot(), y = V(C(v), 2), b = C(y);
210
- Oe(b, {
210
+ var v = lt(), y = B(C(v), 2), b = C(y);
211
+ V(b, {
211
212
  "aria-label": "Global API key name",
212
213
  get value() {
213
214
  return E(i);
@@ -215,7 +216,7 @@ function st(e, t) {
215
216
  set value(e) {
216
217
  I(i, e, !0);
217
218
  }
218
- }), Se(V(b, 2), {
219
+ }), Ce(B(b, 2), {
219
220
  onclick: h,
220
221
  get disabled() {
221
222
  return E(c);
@@ -225,9 +226,9 @@ function st(e, t) {
225
226
  },
226
227
  $$slots: { default: !0 }
227
228
  }), M(y);
228
- var x = V(y, 2), ee = (e) => {
229
- var t = $e(), n = V(C(t), 2), r = C(n, !0);
230
- M(n), Se(V(n, 2), {
229
+ var x = B(y, 2), ee = (e) => {
230
+ var t = nt(), n = B(C(t), 2), r = C(n, !0);
231
+ M(n), Ce(B(n, 2), {
231
232
  class: "mt-2",
232
233
  size: "sm",
233
234
  variant: "outline",
@@ -236,27 +237,27 @@ function st(e, t) {
236
237
  P(), L(e, D("Copy key"));
237
238
  },
238
239
  $$slots: { default: !0 }
239
- }), M(t), B(() => w(r, E(u))), L(e, t);
240
+ }), M(t), z(() => w(r, E(u))), L(e, t);
240
241
  };
241
242
  T(x, (e) => {
242
243
  E(u) && e(ee);
243
244
  });
244
- var S = V(x, 2), te = (e) => {
245
- var t = et(), n = C(t, !0);
246
- M(t), B(() => w(n, E(l))), L(e, t);
245
+ var S = B(x, 2), te = (e) => {
246
+ var t = rt(), n = C(t, !0);
247
+ M(t), z(() => w(n, E(l))), L(e, t);
247
248
  };
248
249
  T(S, (e) => {
249
250
  E(l) && e(te);
250
251
  });
251
- var ne = V(S, 2), re = (e) => {
252
- L(e, tt());
252
+ var ne = B(S, 2), re = (e) => {
253
+ L(e, K());
253
254
  }, ie = (e) => {
254
- var t = at(), n = C(t);
255
- oe(V(C(n), 2), 17, () => E(d), (e) => e.id, (e, t) => {
256
- var n = nt(), r = C(n), i = C(r), a = C(i, !0);
255
+ var t = ct(), n = C(t);
256
+ oe(B(C(n), 2), 17, () => E(d), (e) => e.id, (e, t) => {
257
+ var n = it(), r = C(n), i = C(r), a = C(i, !0);
257
258
  M(i);
258
- var o = V(i), s = C(o);
259
- M(o), M(r), Se(V(r, 2), {
259
+ var o = B(i), s = C(o);
260
+ M(o), M(r), Ce(B(r, 2), {
260
261
  size: "sm",
261
262
  variant: "destructive",
262
263
  onclick: () => g(E(t).id),
@@ -267,22 +268,22 @@ function st(e, t) {
267
268
  P(), L(e, D("Revoke"));
268
269
  },
269
270
  $$slots: { default: !0 }
270
- }), M(n), B(() => {
271
+ }), M(n), z(() => {
271
272
  w(a, E(t).name), w(s, `${E(t).prefix ?? ""}…`);
272
273
  }), L(e, n);
273
274
  }, (e) => {
274
- L(e, rt());
275
+ L(e, at());
275
276
  }), M(n);
276
- var r = V(n, 2);
277
- oe(V(C(r), 2), 17, () => E(f), (e) => e.id, (e, t) => {
278
- var n = K(), r = C(n), i = C(r), o = C(i);
277
+ var r = B(n, 2);
278
+ oe(B(C(r), 2), 17, () => E(f), (e) => e.id, (e, t) => {
279
+ var n = ot(), r = C(n), i = C(r), o = C(i);
279
280
  M(i);
280
- var s = V(i), l = C(s);
281
+ var s = B(i), l = C(s);
281
282
  M(s), M(r);
282
- var u = V(r, 2), d = C(u);
283
+ var u = B(r, 2), d = C(u);
283
284
  {
284
- let e = fe(() => !E(t).recoverable && !E(a)[E(t).id]);
285
- Se(d, {
285
+ let e = pe(() => !E(t).recoverable && !E(a)[E(t).id]);
286
+ Ce(d, {
286
287
  size: "sm",
287
288
  variant: "outline",
288
289
  onclick: () => _(E(t)),
@@ -292,12 +293,12 @@ function st(e, t) {
292
293
  children: (e, n) => {
293
294
  P();
294
295
  var r = D();
295
- B(() => w(r, E(t).recoverable || E(a)[E(t).id] ? "Copy key" : "Rotate to enable copy")), L(e, r);
296
+ z(() => w(r, E(t).recoverable || E(a)[E(t).id] ? "Copy key" : "Rotate to enable copy")), L(e, r);
296
297
  },
297
298
  $$slots: { default: !0 }
298
299
  });
299
300
  }
300
- Se(V(d, 2), {
301
+ Ce(B(d, 2), {
301
302
  size: "sm",
302
303
  variant: "destructive",
303
304
  onclick: () => g(E(t).id),
@@ -308,11 +309,11 @@ function st(e, t) {
308
309
  P(), L(e, D("Revoke"));
309
310
  },
310
311
  $$slots: { default: !0 }
311
- }), M(u), M(n), B((e, n) => {
312
+ }), M(u), M(n), z((e, n) => {
312
313
  w(o, `${e ?? ""}: ${E(t).name ?? ""}`), w(l, `${E(t).prefix ?? ""}… · ${n ?? ""}`);
313
- }, [() => p(Ze(E(t).scopes)), () => E(t).scopes.map((e) => e.split(":").at(-1)).join(" / ")]), L(e, n);
314
+ }, [() => p(et(E(t).scopes)), () => E(t).scopes.map((e) => e.split(":").at(-1)).join(" / ")]), L(e, n);
314
315
  }, (e) => {
315
- L(e, it());
316
+ L(e, st());
316
317
  }), M(r), M(t), L(e, t);
317
318
  };
318
319
  T(ne, (e) => {
@@ -321,7 +322,7 @@ function st(e, t) {
321
322
  }
322
323
  //#endregion
323
324
  //#region ../node_modules/.bun/dexie@4.4.4/node_modules/dexie/import-wrapper-prod.mjs
324
- var ct = /* @__PURE__ */ n((/* @__PURE__ */ c(((e, t) => {
325
+ var dt = /* @__PURE__ */ n((/* @__PURE__ */ c(((e, t) => {
325
326
  ((n, r) => {
326
327
  typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n = typeof globalThis < "u" ? globalThis : n || self).Dexie = r();
327
328
  })(e, function() {
@@ -581,36 +582,36 @@ var ct = /* @__PURE__ */ n((/* @__PURE__ */ c(((e, t) => {
581
582
  return t(e(n));
582
583
  };
583
584
  }
584
- function R(e, t) {
585
+ function fe(e, t) {
585
586
  return function() {
586
587
  e.apply(this, arguments), t.apply(this, arguments);
587
588
  };
588
589
  }
589
- function fe(e, t) {
590
+ function pe(e, t) {
590
591
  return e === F ? t : function() {
591
592
  var n = e.apply(this, arguments), r = (n !== void 0 && (arguments[0] = n), this.onsuccess), i = this.onerror, a = (this.onsuccess = null, this.onerror = null, t.apply(this, arguments));
592
- return r && (this.onsuccess = this.onsuccess ? R(r, this.onsuccess) : r), i && (this.onerror = this.onerror ? R(i, this.onerror) : i), a === void 0 ? n : a;
593
+ return r && (this.onsuccess = this.onsuccess ? fe(r, this.onsuccess) : r), i && (this.onerror = this.onerror ? fe(i, this.onerror) : i), a === void 0 ? n : a;
593
594
  };
594
595
  }
595
- function pe(e, t) {
596
+ function me(e, t) {
596
597
  return e === F ? t : function() {
597
598
  e.apply(this, arguments);
598
599
  var n = this.onsuccess, r = this.onerror;
599
- this.onsuccess = this.onerror = null, t.apply(this, arguments), n && (this.onsuccess = this.onsuccess ? R(n, this.onsuccess) : n), r && (this.onerror = this.onerror ? R(r, this.onerror) : r);
600
+ this.onsuccess = this.onerror = null, t.apply(this, arguments), n && (this.onsuccess = this.onsuccess ? fe(n, this.onsuccess) : n), r && (this.onerror = this.onerror ? fe(r, this.onerror) : r);
600
601
  };
601
602
  }
602
- function me(e, t) {
603
+ function he(e, t) {
603
604
  return e === F ? t : function(n) {
604
605
  var r = e.apply(this, arguments), n = (o(n, r), this.onsuccess), i = this.onerror, a = (this.onsuccess = null, this.onerror = null, t.apply(this, arguments));
605
- return n && (this.onsuccess = this.onsuccess ? R(n, this.onsuccess) : n), i && (this.onerror = this.onerror ? R(i, this.onerror) : i), r === void 0 ? a === void 0 ? void 0 : a : o(r, a);
606
+ return n && (this.onsuccess = this.onsuccess ? fe(n, this.onsuccess) : n), i && (this.onerror = this.onerror ? fe(i, this.onerror) : i), r === void 0 ? a === void 0 ? void 0 : a : o(r, a);
606
607
  };
607
608
  }
608
- function z(e, t) {
609
+ function R(e, t) {
609
610
  return e === F ? t : function() {
610
611
  return !1 !== t.apply(this, arguments) && e.apply(this, arguments);
611
612
  };
612
613
  }
613
- function B(e, t) {
614
+ function z(e, t) {
614
615
  return e === F ? t : function() {
615
616
  var n = e.apply(this, arguments);
616
617
  if (n && typeof n.then == "function") {
@@ -623,21 +624,21 @@ var ct = /* @__PURE__ */ n((/* @__PURE__ */ c(((e, t) => {
623
624
  };
624
625
  }
625
626
  ne.ModifyError = ce, ne.DexieError = M, ne.BulkError = N;
626
- var he = typeof location < "u" && /^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);
627
- function V(e) {
628
- he = e;
627
+ var ge = typeof location < "u" && /^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);
628
+ function B(e) {
629
+ ge = e;
629
630
  }
630
- var ge = {}, _e = 100, ve = typeof Promise > "u" ? [] : (j = Promise.resolve(), typeof crypto < "u" && crypto.subtle ? [
631
- ve = crypto.subtle.digest("SHA-512", new Uint8Array([0])),
632
- s(ve),
631
+ var _e = {}, ve = 100, ye = typeof Promise > "u" ? [] : (j = Promise.resolve(), typeof crypto < "u" && crypto.subtle ? [
632
+ ye = crypto.subtle.digest("SHA-512", new Uint8Array([0])),
633
+ s(ye),
633
634
  j
634
635
  ] : [
635
636
  j,
636
637
  s(j),
637
638
  j
638
- ]), j = ve[0], ye = ve[1], ye = ye && ye.then, be = j && j.constructor, xe = !!ve[2], Se = function(e, t) {
639
- ke.push([e, t]), we &&= (queueMicrotask(Re), !1);
640
- }, Ce = !0, we = !0, Te = [], Ee = [], De = I, Oe = {
639
+ ]), j = ye[0], be = ye[1], be = be && be.then, xe = j && j.constructor, Se = !!ye[2], Ce = function(e, t) {
640
+ ke.push([e, t]), Te &&= (queueMicrotask(Re), !1);
641
+ }, we = !0, Te = !0, Ee = [], De = [], Oe = I, V = {
641
642
  id: "global",
642
643
  global: !0,
643
644
  ref: 0,
@@ -646,13 +647,13 @@ var ct = /* @__PURE__ */ n((/* @__PURE__ */ c(((e, t) => {
646
647
  pgp: !1,
647
648
  env: {},
648
649
  finalize: F
649
- }, H = Oe, ke = [], Ae = 0, je = [];
650
+ }, H = V, ke = [], Ae = 0, je = [];
650
651
  function U(e) {
651
652
  if (typeof this != "object") throw TypeError("Promises must be constructed via new");
652
653
  this._listeners = [], this._lib = !1;
653
654
  var t = this._PSD = H;
654
655
  if (typeof e != "function") {
655
- if (e !== ge) throw TypeError("Not a function");
656
+ if (e !== _e) throw TypeError("Not a function");
656
657
  this._state = arguments[1], this._value = arguments[2], !1 === this._state && Pe(this, this._value);
657
658
  } else this._state = null, this._value = null, ++t.ref, function e(t, n) {
658
659
  try {
@@ -679,10 +680,10 @@ var ct = /* @__PURE__ */ n((/* @__PURE__ */ c(((e, t) => {
679
680
  });
680
681
  return this._consoleTask && (s._consoleTask = this._consoleTask), s;
681
682
  }
682
- return n.prototype = ge, n;
683
+ return n.prototype = _e, n;
683
684
  },
684
685
  set: function(e) {
685
- f(this, "then", e && e.prototype === ge ? Me : {
686
+ f(this, "then", e && e.prototype === _e ? Me : {
686
687
  get: function() {
687
688
  return e;
688
689
  },
@@ -695,16 +696,16 @@ var ct = /* @__PURE__ */ n((/* @__PURE__ */ c(((e, t) => {
695
696
  }
696
697
  function Pe(e, t) {
697
698
  var n, r;
698
- Ee.push(t), e._state === null && (n = e._lib && ze(), t = De(t), e._state = !1, e._value = t, r = e, Te.some(function(e) {
699
+ De.push(t), e._state === null && (n = e._lib && ze(), t = Oe(t), e._state = !1, e._value = t, r = e, Ee.some(function(e) {
699
700
  return e._value === r._value;
700
- }) || Te.push(r), Fe(e), n) && Be();
701
+ }) || Ee.push(r), Fe(e), n) && Be();
701
702
  }
702
703
  function Fe(e) {
703
704
  var t = e._listeners;
704
705
  e._listeners = [];
705
706
  for (var n = 0, r = t.length; n < r; ++n) Ie(e, t[n]);
706
707
  var i = e._PSD;
707
- --i.ref || i.finalize(), Ae === 0 && (++Ae, Se(function() {
708
+ --i.ref || i.finalize(), Ae === 0 && (++Ae, Ce(function() {
708
709
  --Ae == 0 && Ve();
709
710
  }, []));
710
711
  }
@@ -713,7 +714,7 @@ var ct = /* @__PURE__ */ n((/* @__PURE__ */ c(((e, t) => {
713
714
  else {
714
715
  var n = e._state ? t.onFulfilled : t.onRejected;
715
716
  if (n === null) return (e._state ? t.resolve : t.reject)(e._value);
716
- ++t.psd.ref, ++Ae, Se(Le, [
717
+ ++t.psd.ref, ++Ae, Ce(Le, [
717
718
  n,
718
719
  e,
719
720
  t
@@ -723,10 +724,10 @@ var ct = /* @__PURE__ */ n((/* @__PURE__ */ c(((e, t) => {
723
724
  function Le(e, t, n) {
724
725
  try {
725
726
  var r, i = t._value;
726
- !t._state && Ee.length && (Ee = []), r = he && t._consoleTask ? t._consoleTask.run(function() {
727
+ !t._state && De.length && (De = []), r = ge && t._consoleTask ? t._consoleTask.run(function() {
727
728
  return e(i);
728
- }) : e(i), t._state || Ee.indexOf(i) !== -1 || ((e) => {
729
- for (var t = Te.length; t;) if (Te[--t]._value === e._value) return Te.splice(t, 1);
729
+ }) : e(i), t._state || De.indexOf(i) !== -1 || ((e) => {
730
+ for (var t = Ee.length; t;) if (Ee[--t]._value === e._value) return Ee.splice(t, 1);
730
731
  })(t), n.resolve(r);
731
732
  } catch (e) {
732
733
  n.reject(e);
@@ -735,13 +736,13 @@ var ct = /* @__PURE__ */ n((/* @__PURE__ */ c(((e, t) => {
735
736
  }
736
737
  }
737
738
  function Re() {
738
- tt(Oe, function() {
739
+ tt(V, function() {
739
740
  ze() && Be();
740
741
  });
741
742
  }
742
743
  function ze() {
743
- var e = Ce;
744
- return we = Ce = !1, e;
744
+ var e = we;
745
+ return Te = we = !1, e;
745
746
  }
746
747
  function Be() {
747
748
  var e, t, n;
@@ -751,15 +752,15 @@ var ct = /* @__PURE__ */ n((/* @__PURE__ */ c(((e, t) => {
751
752
  r[0].apply(null, r[1]);
752
753
  }
753
754
  while (0 < ke.length);
754
- we = Ce = !0;
755
+ Te = we = !0;
755
756
  }
756
757
  function Ve() {
757
- for (var e = Te, t = (Te = [], e.forEach(function(e) {
758
+ for (var e = Ee, t = (Ee = [], e.forEach(function(e) {
758
759
  e._PSD.onunhandled.call(null, e._value, e);
759
760
  }), je.slice(0)), n = t.length; n;) t[--n]();
760
761
  }
761
762
  function He(e) {
762
- return new U(ge, !1, e);
763
+ return new U(_e, !1, e);
763
764
  }
764
765
  function W(e, t) {
765
766
  var n = H;
@@ -807,7 +808,7 @@ var ct = /* @__PURE__ */ n((/* @__PURE__ */ c(((e, t) => {
807
808
  n.then(r, i).finally(clearTimeout.bind(null, a));
808
809
  }) : this;
809
810
  }
810
- }), typeof Symbol < "u" && Symbol.toStringTag && f(U.prototype, Symbol.toStringTag, "Dexie.Promise"), Oe.env = et(), u(U, {
811
+ }), typeof Symbol < "u" && Symbol.toStringTag && f(U.prototype, Symbol.toStringTag, "Dexie.Promise"), V.env = et(), u(U, {
811
812
  all: function() {
812
813
  var e = A.apply(null, arguments).map(Ze);
813
814
  return new U(function(t, n) {
@@ -823,7 +824,7 @@ var ct = /* @__PURE__ */ n((/* @__PURE__ */ c(((e, t) => {
823
824
  resolve: function(e) {
824
825
  return e instanceof U ? e : e && typeof e.then == "function" ? new U(function(t, n) {
825
826
  e.then(t, n);
826
- }) : new U(ge, !0, e);
827
+ }) : new U(_e, !0, e);
827
828
  },
828
829
  reject: He,
829
830
  race: function() {
@@ -849,38 +850,38 @@ var ct = /* @__PURE__ */ n((/* @__PURE__ */ c(((e, t) => {
849
850
  usePSD: tt,
850
851
  scheduler: {
851
852
  get: function() {
852
- return Se;
853
+ return Ce;
853
854
  },
854
855
  set: function(e) {
855
- Se = e;
856
+ Ce = e;
856
857
  }
857
858
  },
858
859
  rejectionMapper: {
859
860
  get: function() {
860
- return De;
861
+ return Oe;
861
862
  },
862
863
  set: function(e) {
863
- De = e;
864
+ Oe = e;
864
865
  }
865
866
  },
866
867
  follow: function(e, t) {
867
868
  return new U(function(n, r) {
868
869
  return Je(function(t, n) {
869
870
  var r = H;
870
- r.unhandleds = [], r.onunhandled = n, r.finalize = R(function() {
871
+ r.unhandleds = [], r.onunhandled = n, r.finalize = fe(function() {
871
872
  var e, r = this;
872
873
  e = function() {
873
874
  r.unhandleds.length === 0 ? t() : n(r.unhandleds[0]);
874
875
  }, je.push(function t() {
875
876
  e(), je.splice(je.indexOf(t), 1);
876
- }), ++Ae, Se(function() {
877
+ }), ++Ae, Ce(function() {
877
878
  --Ae == 0 && Ve();
878
879
  }, []);
879
880
  }, r.finalize), e();
880
881
  }, t, n, r);
881
882
  });
882
883
  }
883
- }), be && (be.allSettled && f(U, "allSettled", function() {
884
+ }), xe && (xe.allSettled && f(U, "allSettled", function() {
884
885
  var e = A.apply(null, arguments).map(Ze);
885
886
  return new U(function(t) {
886
887
  e.length === 0 && t([]);
@@ -901,7 +902,7 @@ var ct = /* @__PURE__ */ n((/* @__PURE__ */ c(((e, t) => {
901
902
  });
902
903
  });
903
904
  });
904
- }), be.any && typeof AggregateError < "u" && f(U, "any", function() {
905
+ }), xe.any && typeof AggregateError < "u" && f(U, "any", function() {
905
906
  var e = A.apply(null, arguments).map(Ze);
906
907
  return new U(function(t, n) {
907
908
  e.length === 0 && n(/* @__PURE__ */ AggregateError([]));
@@ -914,14 +915,14 @@ var ct = /* @__PURE__ */ n((/* @__PURE__ */ c(((e, t) => {
914
915
  });
915
916
  });
916
917
  });
917
- }), be.withResolvers) && (U.withResolvers = be.withResolvers);
918
+ }), xe.withResolvers) && (U.withResolvers = xe.withResolvers);
918
919
  var G = {
919
920
  awaits: 0,
920
921
  echoes: 0,
921
922
  id: 0
922
923
  }, Ue = 0, We = [], Ge = 0, Ke = 0, qe = 0;
923
924
  function Je(e, t, n, r) {
924
- var i = H, a = Object.create(i), t = (a.parent = i, a.ref = 0, a.global = !1, a.id = ++qe, Oe.env, a.env = xe ? {
925
+ var i = H, a = Object.create(i), t = (a.parent = i, a.ref = 0, a.global = !1, a.id = ++qe, V.env, a.env = Se ? {
925
926
  Promise: U,
926
927
  PromiseProp: {
927
928
  value: U,
@@ -940,13 +941,13 @@ var ct = /* @__PURE__ */ n((/* @__PURE__ */ c(((e, t) => {
940
941
  return a.ref === 0 && a.finalize(), t;
941
942
  }
942
943
  function Ye() {
943
- return G.id ||= ++Ue, ++G.awaits, G.echoes += _e, G.id;
944
+ return G.id ||= ++Ue, ++G.awaits, G.echoes += ve, G.id;
944
945
  }
945
946
  function Xe() {
946
- return !!G.awaits && (--G.awaits == 0 && (G.id = 0), G.echoes = G.awaits * _e, !0);
947
+ return !!G.awaits && (--G.awaits == 0 && (G.id = 0), G.echoes = G.awaits * ve, !0);
947
948
  }
948
949
  function Ze(e) {
949
- return G.echoes && e && e.constructor === be ? (Ye(), e.then(function(e) {
950
+ return G.echoes && e && e.constructor === xe ? (Ye(), e.then(function(e) {
950
951
  return Xe(), e;
951
952
  }, function(e) {
952
953
  return Xe(), K(e);
@@ -960,11 +961,11 @@ var ct = /* @__PURE__ */ n((/* @__PURE__ */ c(((e, t) => {
960
961
  var n, i, a = H;
961
962
  (t ? !G.echoes || Ge++ && e === H : !Ge || --Ge && e === H) || queueMicrotask(t ? function(e) {
962
963
  ++Ke, G.echoes && --G.echoes != 0 || (G.echoes = G.awaits = G.id = 0), We.push(H), $e(e, !0);
963
- }.bind(null, e) : Qe), e !== H && (H = e, a === Oe && (Oe.env = et()), xe) && (n = Oe.env.Promise, i = e.env, a.global || e.global) && (Object.defineProperty(r, "Promise", i.PromiseProp), n.all = i.all, n.race = i.race, n.resolve = i.resolve, n.reject = i.reject, i.allSettled && (n.allSettled = i.allSettled), i.any) && (n.any = i.any);
964
+ }.bind(null, e) : Qe), e !== H && (H = e, a === V && (V.env = et()), Se) && (n = V.env.Promise, i = e.env, a.global || e.global) && (Object.defineProperty(r, "Promise", i.PromiseProp), n.all = i.all, n.race = i.race, n.resolve = i.resolve, n.reject = i.reject, i.allSettled && (n.allSettled = i.allSettled), i.any) && (n.any = i.any);
964
965
  }
965
966
  function et() {
966
967
  var e = r.Promise;
967
- return xe ? {
968
+ return Se ? {
968
969
  Promise: e,
969
970
  PromiseProp: Object.getOwnPropertyDescriptor(r, "Promise"),
970
971
  all: e.all,
@@ -995,9 +996,9 @@ var ct = /* @__PURE__ */ n((/* @__PURE__ */ c(((e, t) => {
995
996
  } : e;
996
997
  }
997
998
  function rt(e) {
998
- Promise === be && G.echoes === 0 ? Ge === 0 ? e() : enqueueNativeMicroTask(e) : setTimeout(e, 0);
999
+ Promise === xe && G.echoes === 0 ? Ge === 0 ? e() : enqueueNativeMicroTask(e) : setTimeout(e, 0);
999
1000
  }
1000
- ("" + ye).indexOf("[native code]") === -1 && (Ye = Xe = F);
1001
+ ("" + be).indexOf("[native code]") === -1 && (Ye = Xe = F);
1001
1002
  var K = U.reject, it = "￿", at = "Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.", ot = "String expected.", st = "__dbnames", ct = "readonly", lt = "readwrite";
1002
1003
  function ut(e, t) {
1003
1004
  return e ? t ? function() {
@@ -1099,7 +1100,7 @@ var ct = /* @__PURE__ */ n((/* @__PURE__ */ c(((e, t) => {
1099
1100
  return a;
1100
1101
  }
1101
1102
  J.prototype._trans = function(e, t, n) {
1102
- var r = this._tx || H.trans, i = this.name, a = he && typeof console < "u" && console.createTask && console.createTask(`Dexie: ${e === "readonly" ? "read" : "write"} ${this.name}`);
1103
+ var r = this._tx || H.trans, i = this.name, a = ge && typeof console < "u" && console.createTask && console.createTask(`Dexie: ${e === "readonly" ? "read" : "write"} ${this.name}`);
1103
1104
  function o(e, n, r) {
1104
1105
  if (r.schema[i]) return t(r.idbtrans, r);
1105
1106
  throw new P.NotFound("Table " + i + " not part of transaction");
@@ -1178,7 +1179,7 @@ var ct = /* @__PURE__ */ n((/* @__PURE__ */ c(((e, t) => {
1178
1179
  if (n && this.db._maxKey !== it) return s = n.keyPath.slice(0, t.length), this.where(s).equals(s.map(function(t) {
1179
1180
  return e[t];
1180
1181
  }));
1181
- !n && he && console.warn(`The query ${JSON.stringify(e)} on ${this.name} would benefit from a compound index [${t.join("+")}]`);
1182
+ !n && ge && console.warn(`The query ${JSON.stringify(e)} on ${this.name} would benefit from a compound index [${t.join("+")}]`);
1182
1183
  var r = this.schema.idxByName;
1183
1184
  function o(e, t) {
1184
1185
  return q(e, t) === 0;
@@ -1458,7 +1459,7 @@ var ct = /* @__PURE__ */ n((/* @__PURE__ */ c(((e, t) => {
1458
1459
  return t;
1459
1460
  function s(e, r, o) {
1460
1461
  var c, l;
1461
- if (typeof e != "object") return r ||= z, l = {
1462
+ if (typeof e != "object") return r ||= R, l = {
1462
1463
  subscribers: [],
1463
1464
  fire: o ||= F,
1464
1465
  subscribe: function(e) {
@@ -2076,9 +2077,9 @@ var ct = /* @__PURE__ */ n((/* @__PURE__ */ c(((e, t) => {
2076
2077
  function Vt(e) {
2077
2078
  e.stopPropagation && e.stopPropagation(), e.preventDefault && e.preventDefault();
2078
2079
  }
2079
- var Ht = "storagemutated", Ut = "x-storagemutated-1", Z = xt(null, Ht), Wt = (Gt.prototype._lock = function() {
2080
+ var Ht = "storagemutated", Ut = "x-storagemutated-1", Wt = xt(null, Ht), Gt = (Kt.prototype._lock = function() {
2080
2081
  return v(!H.global), ++this._reculock, this._reculock !== 1 || H.global || (H.lockOwnerFor = this), this;
2081
- }, Gt.prototype._unlock = function() {
2082
+ }, Kt.prototype._unlock = function() {
2082
2083
  if (v(!H.global), --this._reculock == 0) for (H.global || (H.lockOwnerFor = null); 0 < this._blockedFuncs.length && !this._locked();) {
2083
2084
  var e = this._blockedFuncs.shift();
2084
2085
  try {
@@ -2086,9 +2087,9 @@ var ct = /* @__PURE__ */ n((/* @__PURE__ */ c(((e, t) => {
2086
2087
  } catch {}
2087
2088
  }
2088
2089
  return this;
2089
- }, Gt.prototype._locked = function() {
2090
+ }, Kt.prototype._locked = function() {
2090
2091
  return this._reculock && H.lockOwnerFor !== this;
2091
- }, Gt.prototype.create = function(e) {
2092
+ }, Kt.prototype.create = function(e) {
2092
2093
  var t = this;
2093
2094
  if (this.mode) {
2094
2095
  var n = this.db.idbdb, r = this.db._state.dbOpenError;
@@ -2103,11 +2104,11 @@ var ct = /* @__PURE__ */ n((/* @__PURE__ */ c(((e, t) => {
2103
2104
  }), e.onabort = W(function(n) {
2104
2105
  Vt(n), t.active && t._reject(new P.Abort(e.error)), t.active = !1, t.on("abort").fire(n);
2105
2106
  }), e.oncomplete = W(function() {
2106
- t.active = !1, t._resolve(), "mutatedParts" in e && Z.storagemutated.fire(e.mutatedParts);
2107
+ t.active = !1, t._resolve(), "mutatedParts" in e && Wt.storagemutated.fire(e.mutatedParts);
2107
2108
  });
2108
2109
  }
2109
2110
  return this;
2110
- }, Gt.prototype._promise = function(e, t, n) {
2111
+ }, Kt.prototype._promise = function(e, t, n) {
2111
2112
  var r, i = this;
2112
2113
  return e === "readwrite" && this.mode !== "readwrite" ? K(new P.ReadOnly("Transaction is readonly")) : this.active ? this._locked() ? new U(function(r, a) {
2113
2114
  i._blockedFuncs.push([function() {
@@ -2126,9 +2127,9 @@ var ct = /* @__PURE__ */ n((/* @__PURE__ */ c(((e, t) => {
2126
2127
  var r = t(e, n, i);
2127
2128
  r && r.then && r.then(e, n);
2128
2129
  }))._lib = !0, r) : K(new P.TransactionInactive());
2129
- }, Gt.prototype._root = function() {
2130
+ }, Kt.prototype._root = function() {
2130
2131
  return this.parent ? this.parent._root() : this;
2131
- }, Gt.prototype.waitFor = function(e) {
2132
+ }, Kt.prototype.waitFor = function(e) {
2132
2133
  var t, n = this._root(), r = U.resolve(e), i = (n._waitingFor ? n._waitingFor = n._waitingFor.then(function() {
2133
2134
  return r;
2134
2135
  }) : (n._waitingFor = r, n._waitingQueue = [], t = n.idbtrans.objectStore(n.storeNames[0]), function e() {
@@ -2144,17 +2145,17 @@ var ct = /* @__PURE__ */ n((/* @__PURE__ */ c(((e, t) => {
2144
2145
  n._waitingFor === i && (n._waitingFor = null);
2145
2146
  });
2146
2147
  });
2147
- }, Gt.prototype.abort = function() {
2148
+ }, Kt.prototype.abort = function() {
2148
2149
  this.active && (this.active = !1, this.idbtrans && this.idbtrans.abort(), this._reject(new P.Abort()));
2149
- }, Gt.prototype.table = function(e) {
2150
+ }, Kt.prototype.table = function(e) {
2150
2151
  var t = this._memoizedTables ||= {};
2151
2152
  if (l(t, e)) return t[e];
2152
2153
  var n = this.schema[e];
2153
2154
  if (n) return (n = new this.db.Table(e, n, this)).core = this.db.core.table(e), t[e] = n;
2154
2155
  throw new P.NotFound("Table " + e + " not part of transaction");
2155
- }, Gt);
2156
- function Gt() {}
2157
- function Kt(e, t, n, r, i, a, o, s) {
2156
+ }, Kt);
2157
+ function Kt() {}
2158
+ function Z(e, t, n, r, i, a, o, s) {
2158
2159
  return {
2159
2160
  name: e,
2160
2161
  keyPath: t,
@@ -2528,7 +2529,7 @@ var ct = /* @__PURE__ */ n((/* @__PURE__ */ c(((e, t) => {
2528
2529
  if (e.change.length || e.recreate) return console.warn(`Unable to patch indexes of table ${e.name} because it has changes on the type of index or primary key.`), { value: void 0 };
2529
2530
  var n = t.objectStore(e.name);
2530
2531
  e.add.forEach(function(t) {
2531
- he && console.debug(`Dexie upgrade patch: Creating missing index ${e.name}.${t.src}`), fn(n, t);
2532
+ ge && console.debug(`Dexie upgrade patch: Creating missing index ${e.name}.${t.src}`), fn(n, t);
2532
2533
  });
2533
2534
  })(i[r]);
2534
2535
  if (typeof a == "object") return a.value;
@@ -2577,7 +2578,7 @@ var ct = /* @__PURE__ */ n((/* @__PURE__ */ c(((e, t) => {
2577
2578
  }
2578
2579
  function dn(e, t) {
2579
2580
  i(e).forEach(function(n) {
2580
- t.db.objectStoreNames.contains(n) || (he && console.debug("Dexie: Creating missing table", n), un(t, n, e[n].primKey, e[n].indexes));
2581
+ t.db.objectStoreNames.contains(n) || (ge && console.debug("Dexie: Creating missing table", n), un(t, n, e[n].primKey, e[n].indexes));
2581
2582
  });
2582
2583
  }
2583
2584
  function fn(e, t) {
@@ -2589,8 +2590,8 @@ var ct = /* @__PURE__ */ n((/* @__PURE__ */ c(((e, t) => {
2589
2590
  function pn(e, t, n) {
2590
2591
  var r = {};
2591
2592
  return g(t.objectStoreNames, 0).forEach(function(e) {
2592
- for (var t = n.objectStore(e), i = Kt(qt(c = t.keyPath), c || "", !0, !1, !!t.autoIncrement, c && typeof c != "string", !0), a = [], o = 0; o < t.indexNames.length; ++o) {
2593
- var s = t.index(t.indexNames[o]), c = s.keyPath, s = Kt(s.name, c, !!s.unique, !!s.multiEntry, !1, c && typeof c != "string", !1);
2593
+ for (var t = n.objectStore(e), i = Z(qt(c = t.keyPath), c || "", !0, !1, !!t.autoIncrement, c && typeof c != "string", !0), a = [], o = 0; o < t.indexNames.length; ++o) {
2594
+ var s = t.index(t.indexNames[o]), c = s.keyPath, s = Z(s.name, c, !!s.unique, !!s.multiEntry, !1, c && typeof c != "string", !1);
2594
2595
  a.push(s);
2595
2596
  }
2596
2597
  r[e] = Jt(e, i, a);
@@ -2610,7 +2611,7 @@ var ct = /* @__PURE__ */ n((/* @__PURE__ */ c(((e, t) => {
2610
2611
  function hn(e) {
2611
2612
  return e.split(",").map(function(e, t) {
2612
2613
  var n = e.split(":"), r = (r = n[1])?.trim(), n = (e = n[0].trim()).replace(/([&*]|\+\+)/g, ""), i = /^\[/.test(n) ? n.match(/^\[(.*)\]$/)[1].split("+") : n;
2613
- return Kt(n, i || null, /\&/.test(e), /\*/.test(e), /\+\+/.test(e), a(i), t === 0, r);
2614
+ return Z(n, i || null, /\&/.test(e), /\*/.test(e), /\+\+/.test(e), a(i), t === 0, r);
2614
2615
  });
2615
2616
  }
2616
2617
  _n.prototype._createTableSchema = Jt, _n.prototype._parseIndexSyntax = hn, _n.prototype._parseStoresSpec = function(e, t) {
@@ -2641,7 +2642,7 @@ var ct = /* @__PURE__ */ n((/* @__PURE__ */ c(((e, t) => {
2641
2642
  this._cfg.tables
2642
2643
  ], i(r), r), t._storeNames = i(r), this;
2643
2644
  }, _n.prototype.upgrade = function(e) {
2644
- return this._cfg.contentUpgrade = B(this._cfg.contentUpgrade || F, e), this;
2645
+ return this._cfg.contentUpgrade = z(this._cfg.contentUpgrade || F, e), this;
2645
2646
  };
2646
2647
  var gn = _n;
2647
2648
  function _n() {}
@@ -2918,7 +2919,7 @@ var ct = /* @__PURE__ */ n((/* @__PURE__ */ c(((e, t) => {
2918
2919
  return e.on.ready.fire(e.vip);
2919
2920
  })).then(function n() {
2920
2921
  var r;
2921
- if (0 < t.onReadyBeingFired.length) return r = t.onReadyBeingFired.reduce(B, F), t.onReadyBeingFired = [], U.resolve(xn(function() {
2922
+ if (0 < t.onReadyBeingFired.length) return r = t.onReadyBeingFired.reduce(z, F), t.onReadyBeingFired = [], U.resolve(xn(function() {
2922
2923
  return r(e.vip);
2923
2924
  })).then(n);
2924
2925
  });
@@ -2938,7 +2939,7 @@ var ct = /* @__PURE__ */ n((/* @__PURE__ */ c(((e, t) => {
2938
2939
  n.schema.indexes.forEach(function(r) {
2939
2940
  r.name && (t[`idb://${e.name}/${n.name}/${r.name}`] = new Q(-Infinity, [[[]]]));
2940
2941
  }), t[`idb://${e.name}/${n.name}/`] = t[`idb://${e.name}/${n.name}/:dels`] = new Q(-Infinity, [[[]]]);
2941
- }), Z(Ht).fire(t), Fn(t, !0)), e;
2942
+ }), Wt(Ht).fire(t), Fn(t, !0)), e;
2942
2943
  });
2943
2944
  }
2944
2945
  function Rn(e) {
@@ -3580,7 +3581,7 @@ var ct = /* @__PURE__ */ n((/* @__PURE__ */ c(((e, t) => {
3580
3581
  })), this;
3581
3582
  }, $.prototype.open = function() {
3582
3583
  var e = this;
3583
- return tt(Oe, function() {
3584
+ return tt(V, function() {
3584
3585
  return Ln(e);
3585
3586
  });
3586
3587
  }, $.prototype._close = function() {
@@ -3741,7 +3742,7 @@ var ct = /* @__PURE__ */ n((/* @__PURE__ */ c(((e, t) => {
3741
3742
  u.dbReadyResolve = e;
3742
3743
  }), u.openCanceller = new U(function(e, t) {
3743
3744
  u.cancelOpen = t;
3744
- }), this._state = u, this.name = e, this.on = xt(this, "populate", "blocked", "versionchange", "close", { ready: [B, F] }), this.once = function(e, t) {
3745
+ }), this._state = u, this.name = e, this.on = xt(this, "populate", "blocked", "versionchange", "close", { ready: [z, F] }), this.once = function(e, t) {
3745
3746
  var n = function() {
3746
3747
  var r = [...arguments];
3747
3748
  c.on(e).unsubscribe(n), t.apply(c, r);
@@ -3786,12 +3787,12 @@ var ct = /* @__PURE__ */ n((/* @__PURE__ */ c(((e, t) => {
3786
3787
  };
3787
3788
  })), this.Table = (i = this, St(bt.prototype, function(e, t, n) {
3788
3789
  this.db = i, this._tx = n, this.name = e, this.schema = t, this.hook = i._allTables[e] ? i._allTables[e].hook : xt(null, {
3789
- creating: [fe, F],
3790
+ creating: [pe, F],
3790
3791
  reading: [L, I],
3791
- updating: [me, F],
3792
- deleting: [pe, F]
3792
+ updating: [he, F],
3793
+ deleting: [me, F]
3793
3794
  });
3794
- })), this.Transaction = (a = this, St(Wt.prototype, function(e, t, n, r, i) {
3795
+ })), this.Transaction = (a = this, St(Gt.prototype, function(e, t, n, r, i) {
3795
3796
  var o = this;
3796
3797
  e !== "readonly" && t.forEach(function(e) {
3797
3798
  e = (e = n[e])?.yProps, e && (t = t.concat(e.map(function(e) {
@@ -3851,13 +3852,13 @@ var ct = /* @__PURE__ */ n((/* @__PURE__ */ c(((e, t) => {
3851
3852
  return e(c);
3852
3853
  });
3853
3854
  }
3854
- var ir, ye = typeof Symbol < "u" && "observable" in Symbol ? Symbol.observable : "@@observable", ar = (or.prototype.subscribe = function(e, t, n) {
3855
+ var ir, be = typeof Symbol < "u" && "observable" in Symbol ? Symbol.observable : "@@observable", ar = (or.prototype.subscribe = function(e, t, n) {
3855
3856
  return this._subscribe(e && typeof e != "function" ? e : {
3856
3857
  next: e,
3857
3858
  error: t,
3858
3859
  complete: n
3859
3860
  });
3860
- }, or.prototype[ye] = function() {
3861
+ }, or.prototype[be] = function() {
3861
3862
  return this;
3862
3863
  }, or);
3863
3864
  function or(e) {
@@ -3881,7 +3882,7 @@ var ct = /* @__PURE__ */ n((/* @__PURE__ */ c(((e, t) => {
3881
3882
  return o;
3882
3883
  },
3883
3884
  unsubscribe: function() {
3884
- o || (o = !0, a && a.abort(), u && Z.storagemutated.unsubscribe(p));
3885
+ o || (o = !0, a && a.abort(), u && Wt.storagemutated.unsubscribe(p));
3885
3886
  }
3886
3887
  }, u = (r.start && r.start(l), !1), d = function() {
3887
3888
  return rt(m);
@@ -3908,7 +3909,7 @@ var ct = /* @__PURE__ */ n((/* @__PURE__ */ c(((e, t) => {
3908
3909
  requery: d,
3909
3910
  querier: e,
3910
3911
  trans: null
3911
- }), u ||= (Z.storagemutated.subscribe(p), !0), Promise.resolve(h).then(function(e) {
3912
+ }), u ||= (Wt.storagemutated.subscribe(p), !0), Promise.resolve(h).then(function(e) {
3912
3913
  n = !0, t = e, o || m.signal.aborted || (f() || (c = l, f()) ? d() : (s = {}, rt(function() {
3913
3914
  return !o && r.next && r.next(e);
3914
3915
  })));
@@ -3930,7 +3931,7 @@ var ct = /* @__PURE__ */ n((/* @__PURE__ */ c(((e, t) => {
3930
3931
  function lr(e) {
3931
3932
  var t = dr;
3932
3933
  try {
3933
- dr = !0, Z.storagemutated.fire(e), Fn(e, !0);
3934
+ dr = !0, Wt.storagemutated.fire(e), Fn(e, !0);
3934
3935
  } finally {
3935
3936
  dr = t;
3936
3937
  }
@@ -3966,7 +3967,7 @@ var ct = /* @__PURE__ */ n((/* @__PURE__ */ c(((e, t) => {
3966
3967
  };
3967
3968
  },
3968
3969
  ignoreTransaction: function(e) {
3969
- return H.trans ? tt(H.transless || Oe, e) : e();
3970
+ return H.trans ? tt(H.transless || V, e) : e();
3970
3971
  },
3971
3972
  vip: xn,
3972
3973
  async: function(e) {
@@ -3996,10 +3997,10 @@ var ct = /* @__PURE__ */ n((/* @__PURE__ */ c(((e, t) => {
3996
3997
  Promise: U,
3997
3998
  debug: {
3998
3999
  get: function() {
3999
- return he;
4000
+ return ge;
4000
4001
  },
4001
4002
  set: function(e) {
4002
- V(e);
4003
+ B(e);
4003
4004
  }
4004
4005
  },
4005
4006
  derive: p,
@@ -4007,7 +4008,7 @@ var ct = /* @__PURE__ */ n((/* @__PURE__ */ c(((e, t) => {
4007
4008
  props: u,
4008
4009
  override: _,
4009
4010
  Events: xt,
4010
- on: Z,
4011
+ on: Wt,
4011
4012
  liveQuery: sr,
4012
4013
  extendObservabilitySet: kn,
4013
4014
  getByKeyPath: b,
@@ -4034,7 +4035,7 @@ var ct = /* @__PURE__ */ n((/* @__PURE__ */ c(((e, t) => {
4034
4035
  }).reduce(function(e, t, n) {
4035
4036
  return e + t / 10 ** (2 * n);
4036
4037
  })
4037
- })), cr.maxKey = Yt(cr.dependencies.IDBKeyRange), typeof dispatchEvent < "u" && typeof addEventListener < "u" && (Z(Ht, function(e) {
4038
+ })), cr.maxKey = Yt(cr.dependencies.IDBKeyRange), typeof dispatchEvent < "u" && typeof addEventListener < "u" && (Wt(Ht, function(e) {
4038
4039
  dr ||= (e = new CustomEvent(Ut, { detail: e }), dr = !0, dispatchEvent(e), !1);
4039
4040
  }), addEventListener(Ut, function(e) {
4040
4041
  e = e.detail, dr || lr(e);
@@ -4044,20 +4045,20 @@ var ct = /* @__PURE__ */ n((/* @__PURE__ */ c(((e, t) => {
4044
4045
  (ur = new BroadcastChannel(Ut)).onmessage = function(e) {
4045
4046
  return e.data && lr(e.data);
4046
4047
  };
4047
- })(), typeof ur.unref == "function" && ur.unref(), Z(Ht, function(e) {
4048
+ })(), typeof ur.unref == "function" && ur.unref(), Wt(Ht, function(e) {
4048
4049
  dr || ur.postMessage(e);
4049
4050
  })), typeof addEventListener < "u" && (addEventListener("pagehide", function(e) {
4050
4051
  if (!rr.disableBfCache && e.persisted) {
4051
- he && console.debug("Dexie: handling persisted pagehide"), ur?.close();
4052
+ ge && console.debug("Dexie: handling persisted pagehide"), ur?.close();
4052
4053
  for (var t = 0, n = vn.toArray(); t < n.length; t++) n[t].close({ disableAutoOpen: !1 });
4053
4054
  }
4054
4055
  }), addEventListener("pageshow", function(e) {
4055
- !rr.disableBfCache && e.persisted && (he && console.debug("Dexie: handling persisted pageshow"), fr(), lr({ all: new Q(-Infinity, [[]]) }));
4056
+ !rr.disableBfCache && e.persisted && (ge && console.debug("Dexie: handling persisted pageshow"), fr(), lr({ all: new Q(-Infinity, [[]]) }));
4056
4057
  })), U.rejectionMapper = function(e, t) {
4057
4058
  return !e || e instanceof M || e instanceof TypeError || e instanceof SyntaxError || !e.name || !de[e.name] ? e : (t = new de[e.name](t || e.message, e), "stack" in e && f(t, "stack", { get: function() {
4058
4059
  return this.inner.stack;
4059
4060
  } }), t);
4060
- }, V(he), t(rr, Object.freeze({
4061
+ }, B(ge), t(rr, Object.freeze({
4061
4062
  __proto__: null,
4062
4063
  DEFAULT_MAX_CONNECTIONS: 1e3,
4063
4064
  Dexie: rr,
@@ -4080,35 +4081,35 @@ var ct = /* @__PURE__ */ n((/* @__PURE__ */ c(((e, t) => {
4080
4081
  }
4081
4082
  }), { default: rr }), rr;
4082
4083
  });
4083
- })))(), 1), lt = Symbol.for("Dexie"), ut = globalThis[lt] || (globalThis[lt] = ct.default);
4084
- if (ct.default.semVer !== ut.semVer) throw Error(`Two different versions of Dexie loaded in the same app: ${ct.default.semVer} and ${ut.semVer}`);
4085
- var { liveQuery: dt, mergeRanges: ft, rangesOverlap: pt, RangeSet: q, cmp: mt, Entity: ht, PropModification: gt, replacePrefix: _t, add: vt, remove: yt, DexieYProvider: bt } = ut, J = "hiai-docs:offline-owner-id", xt = "hiai-docs:offline-binding", St = "hiai-docs:offline-access-enabled", Ct = 10080 * 60 * 1e3;
4086
- function wt() {
4084
+ })))(), 1), ft = Symbol.for("Dexie"), pt = globalThis[ft] || (globalThis[ft] = dt.default);
4085
+ if (dt.default.semVer !== pt.semVer) throw Error(`Two different versions of Dexie loaded in the same app: ${dt.default.semVer} and ${pt.semVer}`);
4086
+ var { liveQuery: q, mergeRanges: mt, rangesOverlap: ht, RangeSet: gt, cmp: _t, Entity: vt, PropModification: yt, replacePrefix: bt, add: J, remove: xt, DexieYProvider: St } = pt, Ct = "hiai-docs:offline-owner-id", wt = "hiai-docs:offline-binding", Tt = "hiai-docs:offline-access-enabled", Et = 10080 * 60 * 1e3;
4087
+ function Dt() {
4087
4088
  return {
4088
4089
  appId: "hiai-docs",
4089
4090
  deploymentId: "hiai-docs-pwa-local"
4090
4091
  };
4091
4092
  }
4092
- function Tt(e) {
4093
+ function Ot(e) {
4093
4094
  return e instanceof TypeError || typeof navigator < "u" && !navigator.onLine;
4094
4095
  }
4095
- function Et() {
4096
- return typeof localStorage < "u" && localStorage.getItem(St) === "1";
4096
+ function kt() {
4097
+ return typeof localStorage < "u" && localStorage.getItem(Tt) === "1";
4097
4098
  }
4098
- function Dt(e) {
4099
- typeof localStorage > "u" || (localStorage.setItem(St, "1"), localStorage.setItem(xt, JSON.stringify({
4099
+ function At(e) {
4100
+ typeof localStorage > "u" || (localStorage.setItem(Tt, "1"), localStorage.setItem(wt, JSON.stringify({
4100
4101
  identity: e,
4101
4102
  verifiedAt: (/* @__PURE__ */ new Date()).toISOString()
4102
4103
  })));
4103
4104
  }
4104
- function Ot() {
4105
- typeof localStorage > "u" || (localStorage.removeItem(St), localStorage.removeItem(xt), localStorage.removeItem(J));
4105
+ function Y() {
4106
+ typeof localStorage > "u" || (localStorage.removeItem(Tt), localStorage.removeItem(wt), localStorage.removeItem(Ct));
4106
4107
  }
4107
- function kt() {
4108
- if (!Et() || typeof localStorage > "u") return null;
4108
+ function jt() {
4109
+ if (!kt() || typeof localStorage > "u") return null;
4109
4110
  try {
4110
- let e = JSON.parse(localStorage.getItem(xt) ?? "null");
4111
- return !e?.identity?.ownerId || !e.verifiedAt || Date.now() - Date.parse(e.verifiedAt) > Ct ? null : {
4111
+ let e = JSON.parse(localStorage.getItem(wt) ?? "null");
4112
+ return !e?.identity?.ownerId || !e.verifiedAt || Date.now() - Date.parse(e.verifiedAt) > Et ? null : {
4112
4113
  identity: e.identity,
4113
4114
  verifiedAt: e.verifiedAt
4114
4115
  };
@@ -4116,47 +4117,47 @@ function kt() {
4116
4117
  return null;
4117
4118
  }
4118
4119
  }
4119
- function At(e) {
4120
+ function Mt(e) {
4120
4121
  return `hiai-docs-offline::${e.appId}::${e.deploymentId}::${e.ownerId}::${e.tenantId ?? "none"}`;
4121
4122
  }
4122
- async function Y() {
4123
- let { appId: e, deploymentId: t } = wt();
4123
+ async function Nt() {
4124
+ let { appId: e, deploymentId: t } = Dt();
4124
4125
  try {
4125
- let { data: n } = await Ne();
4126
- if (!n?.user?.id) return Ot(), { kind: "verified-unauthenticated" };
4126
+ let { data: n } = await Ie();
4127
+ if (!n?.user?.id) return Y(), { kind: "verified-unauthenticated" };
4127
4128
  let r = {
4128
4129
  appId: e,
4129
4130
  deploymentId: t,
4130
4131
  ownerId: n.user.id,
4131
4132
  tenantId: void 0
4132
4133
  };
4133
- return typeof localStorage < "u" && localStorage.setItem(J, r.ownerId), Et() && Dt(r), {
4134
+ return typeof localStorage < "u" && localStorage.setItem(Ct, r.ownerId), kt() && At(r), {
4134
4135
  kind: "verified-authenticated",
4135
4136
  identity: r
4136
4137
  };
4137
4138
  } catch (e) {
4138
- let t = Tt(e) ? kt() : null;
4139
+ let t = Ot(e) ? jt() : null;
4139
4140
  return t ? {
4140
4141
  kind: "offline-bound",
4141
4142
  ...t
4142
4143
  } : { kind: "unavailable" };
4143
4144
  }
4144
4145
  }
4145
- async function jt() {
4146
- let e = await Y();
4146
+ async function Pt() {
4147
+ let e = await Nt();
4147
4148
  if (e.kind === "verified-authenticated" || e.kind === "offline-bound") return e.identity;
4148
4149
  throw Error("Offline identity unavailable");
4149
4150
  }
4150
4151
  //#endregion
4151
4152
  //#region src/lib/db/index.ts
4152
- var Mt = class extends ut {
4153
+ var Ft = class extends pt {
4153
4154
  documents;
4154
4155
  folders;
4155
4156
  drafts;
4156
4157
  mutationQueue;
4157
4158
  metadata;
4158
4159
  constructor(e) {
4159
- super(At(e)), this.version(1).stores({
4160
+ super(Mt(e)), this.version(1).stores({
4160
4161
  documents: "id, ownerId, tenantId, folderId, updatedAt",
4161
4162
  folders: "id, ownerId, tenantId, parentId, name",
4162
4163
  drafts: "docId, ownerId, tenantId, updatedAt",
@@ -4176,32 +4177,32 @@ var Mt = class extends ut {
4176
4177
  metadata: "key"
4177
4178
  });
4178
4179
  }
4179
- }, Nt = /* @__PURE__ */ new Map();
4180
- function Pt(e) {
4181
- let t = At(e), n = Nt.get(t);
4182
- return n || (n = new Mt(e), Nt.set(t, n)), n;
4180
+ }, It = /* @__PURE__ */ new Map();
4181
+ function Lt(e) {
4182
+ let t = Mt(e), n = It.get(t);
4183
+ return n || (n = new Ft(e), It.set(t, n)), n;
4183
4184
  }
4184
- async function Ft(e) {
4185
- let t = At(e), n = Nt.get(t);
4185
+ async function Rt(e) {
4186
+ let t = Mt(e), n = It.get(t);
4186
4187
  if (n) {
4187
- await n.delete(), Nt.delete(t);
4188
+ await n.delete(), It.delete(t);
4188
4189
  return;
4189
4190
  }
4190
- await ut.delete(t);
4191
+ await pt.delete(t);
4191
4192
  }
4192
4193
  //#endregion
4193
4194
  //#region src/lib/offline/cleanup.ts
4194
- async function It() {
4195
+ async function zt() {
4195
4196
  let e = null;
4196
4197
  try {
4197
- e = await jt();
4198
+ e = await Pt();
4198
4199
  } catch {} finally {
4199
- Ot();
4200
+ Y();
4200
4201
  }
4201
4202
  let t = "hiai-docs::hiai-docs-pwa-local::pwa-v1";
4202
4203
  try {
4203
4204
  if (e) try {
4204
- let t = Pt(e);
4205
+ let t = Lt(e);
4205
4206
  await Promise.allSettled([
4206
4207
  t.documents.clear(),
4207
4208
  t.folders.clear(),
@@ -4210,7 +4211,7 @@ async function It() {
4210
4211
  t.metadata.clear()
4211
4212
  ]);
4212
4213
  } finally {
4213
- await Ft(e).catch(() => void 0);
4214
+ await Rt(e).catch(() => void 0);
4214
4215
  }
4215
4216
  let n = await caches.keys();
4216
4217
  await Promise.all(n.filter((e) => e.startsWith(`${t}::`) || e.startsWith(`${t}-`)).map((e) => caches.delete(e))), "serviceWorker" in navigator && (await navigator.serviceWorker.getRegistration("/"))?.active?.postMessage({
@@ -4221,122 +4222,150 @@ async function It() {
4221
4222
  }
4222
4223
  //#endregion
4223
4224
  //#region src/lib/stores/editor-preferences.ts
4224
- var Lt = {
4225
+ var X = {
4225
4226
  showVisualMode: !0,
4226
4227
  showMarkdownMode: !0,
4227
4228
  minimalToolbar: !1,
4228
4229
  showScrollToTop: !0
4229
4230
  };
4230
- function Rt(e) {
4231
- if (!e || typeof e != "object") return { ...Lt };
4232
- let t = e, n = typeof t.showVisualMode == "boolean" ? t.showVisualMode : Lt.showVisualMode, r = typeof t.showMarkdownMode == "boolean" ? t.showMarkdownMode : Lt.showMarkdownMode;
4231
+ function Bt(e) {
4232
+ if (!e || typeof e != "object") return { ...X };
4233
+ let t = e, n = typeof t.showVisualMode == "boolean" ? t.showVisualMode : X.showVisualMode, r = typeof t.showMarkdownMode == "boolean" ? t.showMarkdownMode : X.showMarkdownMode;
4233
4234
  return {
4234
4235
  showVisualMode: n || !r,
4235
4236
  showMarkdownMode: r,
4236
- minimalToolbar: typeof t.minimalToolbar == "boolean" ? t.minimalToolbar : Lt.minimalToolbar,
4237
- showScrollToTop: typeof t.showScrollToTop == "boolean" ? t.showScrollToTop : Lt.showScrollToTop
4237
+ minimalToolbar: typeof t.minimalToolbar == "boolean" ? t.minimalToolbar : X.minimalToolbar,
4238
+ showScrollToTop: typeof t.showScrollToTop == "boolean" ? t.showScrollToTop : X.showScrollToTop
4238
4239
  };
4239
4240
  }
4240
4241
  //#endregion
4241
4242
  //#region src/lib/stores/editor-preferences.svelte.ts
4242
- var zt = "docsmint-editor-preferences", X = z(me({ ...Lt })), Bt = !1;
4243
- function Vt() {
4243
+ var Vt = "docsmint-editor-preferences", Ht = R(he({ ...X })), Ut = !1;
4244
+ function Wt() {
4244
4245
  return typeof window < "u" && typeof localStorage < "u";
4245
4246
  }
4246
- function Ht() {
4247
- if (!(!Vt() || Bt)) {
4248
- Bt = !0;
4247
+ function Gt() {
4248
+ if (!(!Wt() || Ut)) {
4249
+ Ut = !0;
4249
4250
  try {
4250
- I(X, Rt(JSON.parse(localStorage.getItem(zt) ?? "null")), !0);
4251
+ I(Ht, Bt(JSON.parse(localStorage.getItem(Vt) ?? "null")), !0);
4251
4252
  } catch {
4252
- I(X, { ...Lt }, !0);
4253
+ I(Ht, { ...X }, !0);
4253
4254
  }
4254
4255
  }
4255
4256
  }
4256
- function Ut(e) {
4257
- I(X, Rt({
4258
- ...E(X),
4257
+ function Kt(e) {
4258
+ I(Ht, Bt({
4259
+ ...E(Ht),
4259
4260
  ...e
4260
- }), !0), Vt() && localStorage.setItem(zt, JSON.stringify(E(X)));
4261
+ }), !0), Wt() && localStorage.setItem(Vt, JSON.stringify(E(Ht)));
4261
4262
  }
4262
4263
  var Z = {
4263
4264
  get value() {
4264
- return E(X);
4265
+ return E(Ht);
4265
4266
  },
4266
4267
  get showMarkdownMode() {
4267
- return E(X).showMarkdownMode;
4268
+ return E(Ht).showMarkdownMode;
4268
4269
  },
4269
4270
  get showVisualMode() {
4270
- return E(X).showVisualMode;
4271
+ return E(Ht).showVisualMode;
4271
4272
  },
4272
4273
  get minimalToolbar() {
4273
- return E(X).minimalToolbar;
4274
+ return E(Ht).minimalToolbar;
4274
4275
  },
4275
4276
  get showScrollToTop() {
4276
- return E(X).showScrollToTop;
4277
+ return E(Ht).showScrollToTop;
4278
+ },
4279
+ init: Gt,
4280
+ update: Kt
4281
+ }, qt = !1, Jt = R(he({ ...U }));
4282
+ function Yt() {
4283
+ if (!(typeof localStorage > "u")) try {
4284
+ localStorage.setItem(Ae, JSON.stringify(E(Jt)));
4285
+ } catch {}
4286
+ }
4287
+ function Xt() {
4288
+ if (!(qt || typeof window > "u")) {
4289
+ qt = !0;
4290
+ try {
4291
+ I(Jt, je(JSON.parse(localStorage.getItem("docsmint:search-preferences") ?? "null")), !0);
4292
+ } catch {
4293
+ I(Jt, { ...U }, !0);
4294
+ }
4295
+ }
4296
+ }
4297
+ function Zt(e) {
4298
+ I(Jt, {
4299
+ ...E(Jt),
4300
+ ...e
4301
+ }, !0), Yt();
4302
+ }
4303
+ var Qt = {
4304
+ get graphSearchEnabled() {
4305
+ return E(Jt).graphSearchEnabled;
4277
4306
  },
4278
- init: Ht,
4279
- update: Ut
4280
- }, Wt = A("<!> <!>", 1), Gt = A("<!> <!> <!> <!> <!>", 1), Kt = A("<p class=\"text-xs text-muted-foreground\">Verification is required before the new address becomes active.</p>"), qt = A("<p class=\"text-sm text-destructive\"> </p>"), Jt = A("<!> ", 1), Yt = A("<form class=\"space-y-4\"><div class=\"space-y-2\"><!> <!></div> <div class=\"space-y-2\"><!> <!> <p class=\"text-xs text-muted-foreground\"> </p> <!></div> <!> <!></form>"), Xt = A("<form class=\"space-y-4\"><div class=\"space-y-2\"><!> <!></div> <div class=\"space-y-2\"><!> <!></div> <div class=\"space-y-2\"><!> <!></div> <!> <!></form>"), Zt = A("<button type=\"button\"> </button>"), Qt = A("<div class=\"space-y-6\"><div class=\"space-y-2\"><!> <p class=\"text-xs text-muted-foreground\"> </p></div> <div class=\"grid grid-cols-3 gap-2\"></div> <details class=\"editor-settings border-t pt-5 svelte-1eaqpj\"><summary class=\"flex cursor-pointer items-center justify-between gap-3 rounded-md px-1 py-2 svelte-1eaqpj\"><span><span class=\"block text-sm font-medium\">Editor modes</span> <span class=\"block text-xs text-muted-foreground\">Source views and toolbar layout</span></span> <span class=\"editor-settings-chevron svelte-1eaqpj\" aria-hidden=\"true\">⌄</span></summary> <div class=\"mt-3 space-y-3\"><div class=\"flex items-center justify-between gap-4 rounded-md border p-3\"><span><span class=\"block text-sm font-medium\">Visual editor</span> <span class=\"block text-xs text-muted-foreground\">Show the standard WYSIWYG editor mode.</span></span> <button type=\"button\" role=\"switch\" aria-label=\"Show visual editor\"><span class=\"svelte-1eaqpj\"></span></button></div> <div class=\"flex items-center justify-between gap-4 rounded-md border p-3\"><span><span class=\"block text-sm font-medium\">Raw Markdown</span> <span class=\"block text-xs text-muted-foreground\">Show the Markdown source button in documents.</span></span> <button type=\"button\" role=\"switch\" aria-label=\"Show Raw Markdown\"><span class=\"svelte-1eaqpj\"></span></button></div> <div class=\"flex items-center justify-between gap-4 rounded-md border p-3\"><span><span class=\"block text-sm font-medium\">Minimal toolbar</span> <span class=\"block text-xs text-muted-foreground\">Bold, italic, underline, lists, highlight, and copy.</span></span> <button type=\"button\" role=\"switch\" aria-label=\"Use minimal toolbar\"><span class=\"svelte-1eaqpj\"></span></button></div> <div class=\"flex items-center justify-between gap-4 rounded-md border p-3\"><span><span class=\"block text-sm font-medium\">Scroll to top</span> <span class=\"block text-xs text-muted-foreground\">Show the floating arrow after scrolling down.</span></span> <button type=\"button\" role=\"switch\" aria-label=\"Show scroll to top\"><span class=\"svelte-1eaqpj\"></span></button></div></div></details></div>"), $t = A("<!> <!> <!> <!> <!> <!>", 1), en = A("<!> <!> <!>", 1);
4281
- function tn(n, c) {
4307
+ init: Xt,
4308
+ update: Zt
4309
+ }, $t = A("<!> <!>", 1), en = A("<!> <!> <!> <!> <!>", 1), tn = A("<p class=\"text-xs text-muted-foreground\">Verification is required before the new address becomes active.</p>"), nn = A("<p class=\"text-sm text-destructive\"> </p>"), rn = A("<!> ", 1), an = A("<form class=\"space-y-4\"><div class=\"space-y-2\"><!> <!></div> <div class=\"space-y-2\"><!> <!> <p class=\"text-xs text-muted-foreground\"> </p> <!></div> <div class=\"flex items-center justify-between gap-4 rounded-md border p-3\"><span><span class=\"block text-sm font-medium\">GraphRAG search</span> <span class=\"block text-xs text-muted-foreground\">Use graph expansion for related documents. Disable it for faster standard RAG search.</span></span> <button type=\"button\" role=\"switch\" aria-label=\"Use GraphRAG search\"><span class=\"svelte-1eaqpj\"></span></button></div> <!> <!></form>"), on = A("<form class=\"space-y-4\"><div class=\"space-y-2\"><!> <!></div> <div class=\"space-y-2\"><!> <!></div> <div class=\"space-y-2\"><!> <!></div> <!> <!></form>"), sn = A("<button type=\"button\"> </button>"), cn = A("<div class=\"space-y-6\"><div class=\"space-y-2\"><!> <p class=\"text-xs text-muted-foreground\"> </p></div> <div class=\"grid grid-cols-3 gap-2\"></div> <details class=\"editor-settings border-t pt-5 svelte-1eaqpj\"><summary class=\"flex cursor-pointer items-center justify-between gap-3 rounded-md px-1 py-2 svelte-1eaqpj\"><span><span class=\"block text-sm font-medium\">Editor modes</span> <span class=\"block text-xs text-muted-foreground\">Source views and toolbar layout</span></span> <span class=\"editor-settings-chevron svelte-1eaqpj\" aria-hidden=\"true\">⌄</span></summary> <div class=\"mt-3 space-y-3\"><div class=\"flex items-center justify-between gap-4 rounded-md border p-3\"><span><span class=\"block text-sm font-medium\">Visual editor</span> <span class=\"block text-xs text-muted-foreground\">Show the standard WYSIWYG editor mode.</span></span> <button type=\"button\" role=\"switch\" aria-label=\"Show visual editor\"><span class=\"svelte-1eaqpj\"></span></button></div> <div class=\"flex items-center justify-between gap-4 rounded-md border p-3\"><span><span class=\"block text-sm font-medium\">Raw Markdown</span> <span class=\"block text-xs text-muted-foreground\">Show the Markdown source button in documents.</span></span> <button type=\"button\" role=\"switch\" aria-label=\"Show Raw Markdown\"><span class=\"svelte-1eaqpj\"></span></button></div> <div class=\"flex items-center justify-between gap-4 rounded-md border p-3\"><span><span class=\"block text-sm font-medium\">Minimal toolbar</span> <span class=\"block text-xs text-muted-foreground\">Bold, italic, underline, lists, highlight, and copy.</span></span> <button type=\"button\" role=\"switch\" aria-label=\"Use minimal toolbar\"><span class=\"svelte-1eaqpj\"></span></button></div> <div class=\"flex items-center justify-between gap-4 rounded-md border p-3\"><span><span class=\"block text-sm font-medium\">Scroll to top</span> <span class=\"block text-xs text-muted-foreground\">Show the floating arrow after scrolling down.</span></span> <button type=\"button\" role=\"switch\" aria-label=\"Show scroll to top\"><span class=\"svelte-1eaqpj\"></span></button></div></div></details></div>"), ln = A("<!> <!> <!> <!> <!> <!>", 1), un = A("<!> <!> <!>", 1);
4310
+ function dn(n, c) {
4282
4311
  le(c, !0);
4283
- let ie = pe(c, "open", 15, !1), O = z("profile"), A = re(), F = fe(() => be(A.settingsSections, { pathname: Le.url.pathname })), R = z(""), me = z(""), he = z(""), _e = z(""), ye = z("idle"), H = z(""), ke = z(""), Ne = z(""), Be = z(""), He = z("idle"), G = z("");
4284
- Fe(async () => {
4285
- Z.init();
4312
+ let ie = me(c, "open", 15, !1), O = R("profile"), A = re(), F = pe(() => xe(A.settingsSections, { pathname: Be.url.pathname })), fe = R(""), he = R(""), ge = R(""), ve = R(""), be = R("idle"), H = R(""), ke = R(""), Ae = R(""), je = R(""), U = R("idle"), Ie = R("");
4313
+ Re(async () => {
4314
+ Z.init(), Qt.init();
4286
4315
  try {
4287
- let e = await Me();
4288
- e.name && I(R, e.name, !0), e.email && (I(me, e.email, !0), I(he, e.email, !0));
4316
+ let e = await Fe();
4317
+ e.name && I(fe, e.name, !0), e.email && (I(he, e.email, !0), I(ge, e.email, !0));
4289
4318
  } catch {}
4290
4319
  });
4291
- async function We() {
4292
- I(ye, "saving"), I(H, "");
4320
+ async function W() {
4321
+ I(be, "saving"), I(H, "");
4293
4322
  try {
4294
- if (await Ae({ name: E(R) }), E(me).trim() !== "" && E(me).trim().toLowerCase() !== E(he).toLowerCase()) {
4295
- let { error: e } = await U.changeEmail({
4296
- newEmail: E(me).trim(),
4323
+ if (await Me({ name: E(fe) }), E(he).trim() !== "" && E(he).trim().toLowerCase() !== E(ge).toLowerCase()) {
4324
+ let { error: e } = await Pe.changeEmail({
4325
+ newEmail: E(he).trim(),
4297
4326
  callbackURL: "/"
4298
4327
  });
4299
4328
  if (e) throw Error(e.message ?? r());
4300
- I(_e, E(me).trim(), !0);
4329
+ I(ve, E(he).trim(), !0);
4301
4330
  }
4302
- I(ye, "saved"), setTimeout(() => {
4303
- I(ye, "idle");
4331
+ I(be, "saved"), setTimeout(() => {
4332
+ I(be, "idle");
4304
4333
  }, 2e3);
4305
4334
  } catch (e) {
4306
- I(ye, "error"), I(H, e instanceof Error ? e.message : o(), !0);
4335
+ I(be, "error"), I(H, e instanceof Error ? e.message : o(), !0);
4307
4336
  }
4308
4337
  }
4309
- async function Ke() {
4310
- if (I(G, ""), E(Ne) !== E(Be)) {
4311
- I(He, "error"), I(G, i(), !0);
4338
+ async function Ue() {
4339
+ if (I(Ie, ""), E(Ae) !== E(je)) {
4340
+ I(U, "error"), I(Ie, i(), !0);
4312
4341
  return;
4313
4342
  }
4314
- if (E(Ne).length < 8) {
4315
- I(He, "error"), I(G, b(), !0);
4343
+ if (E(Ae).length < 8) {
4344
+ I(U, "error"), I(Ie, b(), !0);
4316
4345
  return;
4317
4346
  }
4318
- I(He, "saving");
4347
+ I(U, "saving");
4319
4348
  try {
4320
- let { error: e } = await U.changePassword({
4349
+ let { error: e } = await Pe.changePassword({
4321
4350
  currentPassword: E(ke),
4322
- newPassword: E(Ne),
4351
+ newPassword: E(Ae),
4323
4352
  revokeOtherSessions: !0
4324
4353
  });
4325
4354
  if (e) {
4326
- I(He, "error"), I(G, e.message ?? r(), !0);
4355
+ I(U, "error"), I(Ie, e.message ?? r(), !0);
4327
4356
  return;
4328
4357
  }
4329
- I(He, "saved"), I(ke, ""), I(Ne, ""), I(Be, ""), setTimeout(() => {
4330
- I(He, "idle");
4358
+ I(U, "saved"), I(ke, ""), I(Ae, ""), I(je, ""), setTimeout(() => {
4359
+ I(U, "idle");
4331
4360
  }, 2e3);
4332
4361
  } catch (e) {
4333
- I(He, "error"), I(G, e instanceof Error ? e.message : r(), !0);
4362
+ I(U, "error"), I(Ie, e instanceof Error ? e.message : r(), !0);
4334
4363
  }
4335
4364
  }
4336
- function qe(e) {
4337
- Pe.set(e);
4365
+ function Ge(e) {
4366
+ Le.set(e);
4338
4367
  }
4339
- let Je = [
4368
+ let qe = [
4340
4369
  {
4341
4370
  value: "light",
4342
4371
  label: y(),
@@ -4352,11 +4381,11 @@ function tn(n, c) {
4352
4381
  label: g(),
4353
4382
  key: "system"
4354
4383
  }
4355
- ], Ye = z(!1);
4384
+ ], Ye = R(!1);
4356
4385
  async function Xe() {
4357
4386
  I(Ye, !0);
4358
4387
  try {
4359
- await It(), await je(), ie(!1), Ie("/login");
4388
+ await zt(), await Ne(), ie(!1), ze("/login");
4360
4389
  } catch {
4361
4390
  I(Ye, !1);
4362
4391
  }
@@ -4365,7 +4394,7 @@ function tn(n, c) {
4365
4394
  ie(!1);
4366
4395
  }
4367
4396
  var Qe = k();
4368
- j(N(Qe), () => Te, (n, r) => {
4397
+ j(N(Qe), () => Ee, (n, r) => {
4369
4398
  r(n, {
4370
4399
  get open() {
4371
4400
  return ie();
@@ -4374,26 +4403,26 @@ function tn(n, c) {
4374
4403
  ie(e);
4375
4404
  },
4376
4405
  children: (n, r) => {
4377
- var i = en(), o = N(i);
4378
- j(o, () => Ee, (e, t) => {
4406
+ var i = un(), o = N(i);
4407
+ j(o, () => De, (e, t) => {
4379
4408
  t(e, {
4380
4409
  children: (e, t) => {
4381
- var n = Wt(), r = N(n);
4382
- j(r, () => we, (e, t) => {
4410
+ var n = $t(), r = N(n);
4411
+ j(r, () => Te, (e, t) => {
4383
4412
  t(e, {
4384
4413
  children: (e, t) => {
4385
4414
  P();
4386
4415
  var n = D();
4387
- B((e) => w(n, e), [() => m()]), L(e, n);
4416
+ z((e) => w(n, e), [() => m()]), L(e, n);
4388
4417
  },
4389
4418
  $$slots: { default: !0 }
4390
4419
  });
4391
- }), j(V(r, 2), () => xe, (e, t) => {
4420
+ }), j(B(r, 2), () => Se, (e, t) => {
4392
4421
  t(e, {
4393
4422
  children: (e, t) => {
4394
4423
  P();
4395
4424
  var n = D();
4396
- B((e) => w(n, e), [() => _()]), L(e, n);
4425
+ z((e) => w(n, e), [() => _()]), L(e, n);
4397
4426
  },
4398
4427
  $$slots: { default: !0 }
4399
4428
  });
@@ -4402,8 +4431,8 @@ function tn(n, c) {
4402
4431
  $$slots: { default: !0 }
4403
4432
  });
4404
4433
  });
4405
- var c = V(o, 2);
4406
- j(c, () => Ve, (n, r) => {
4434
+ var c = B(o, 2);
4435
+ j(c, () => G, (n, r) => {
4407
4436
  r(n, {
4408
4437
  class: "w-full",
4409
4438
  get value() {
@@ -4413,15 +4442,15 @@ function tn(n, c) {
4413
4442
  I(O, e, !0);
4414
4443
  },
4415
4444
  children: (n, r) => {
4416
- var i = $t(), a = N(i);
4417
- j(a, () => Ue, (t, n) => {
4445
+ var i = ln(), a = N(i);
4446
+ j(a, () => Ke, (t, n) => {
4418
4447
  n(t, {
4419
4448
  class: "grid w-full grid-cols-[repeat(auto-fit,minmax(0,1fr))] gap-1",
4420
4449
  children: (t, n) => {
4421
- var r = Gt(), i = N(r);
4450
+ var r = en(), i = N(r);
4422
4451
  {
4423
- let e = fe(() => E(O) === "profile");
4424
- j(i, () => Ge, (t, n) => {
4452
+ let e = pe(() => E(O) === "profile");
4453
+ j(i, () => Je, (t, n) => {
4425
4454
  n(t, {
4426
4455
  value: "profile",
4427
4456
  get selected() {
@@ -4431,16 +4460,16 @@ function tn(n, c) {
4431
4460
  children: (e, t) => {
4432
4461
  P();
4433
4462
  var n = D();
4434
- B((e) => w(n, e), [() => te()]), L(e, n);
4463
+ z((e) => w(n, e), [() => te()]), L(e, n);
4435
4464
  },
4436
4465
  $$slots: { default: !0 }
4437
4466
  });
4438
4467
  });
4439
4468
  }
4440
- var a = V(i, 2);
4469
+ var a = B(i, 2);
4441
4470
  {
4442
- let t = fe(() => E(O) === "password");
4443
- j(a, () => Ge, (n, r) => {
4471
+ let t = pe(() => E(O) === "password");
4472
+ j(a, () => Je, (n, r) => {
4444
4473
  r(n, {
4445
4474
  value: "password",
4446
4475
  get selected() {
@@ -4450,16 +4479,16 @@ function tn(n, c) {
4450
4479
  children: (t, n) => {
4451
4480
  P();
4452
4481
  var r = D();
4453
- B((e) => w(r, e), [() => e()]), L(t, r);
4482
+ z((e) => w(r, e), [() => e()]), L(t, r);
4454
4483
  },
4455
4484
  $$slots: { default: !0 }
4456
4485
  });
4457
4486
  });
4458
4487
  }
4459
- var o = V(a, 2);
4488
+ var o = B(a, 2);
4460
4489
  {
4461
- let e = fe(() => E(O) === "api");
4462
- j(o, () => Ge, (t, n) => {
4490
+ let e = pe(() => E(O) === "api");
4491
+ j(o, () => Je, (t, n) => {
4463
4492
  n(t, {
4464
4493
  value: "api",
4465
4494
  get selected() {
@@ -4473,10 +4502,10 @@ function tn(n, c) {
4473
4502
  });
4474
4503
  });
4475
4504
  }
4476
- var s = V(o, 2);
4505
+ var s = B(o, 2);
4477
4506
  {
4478
- let e = fe(() => E(O) === "appearance");
4479
- j(s, () => Ge, (t, n) => {
4507
+ let e = pe(() => E(O) === "appearance");
4508
+ j(s, () => Je, (t, n) => {
4480
4509
  n(t, {
4481
4510
  value: "appearance",
4482
4511
  get selected() {
@@ -4490,11 +4519,11 @@ function tn(n, c) {
4490
4519
  });
4491
4520
  });
4492
4521
  }
4493
- oe(V(s, 2), 17, () => E(F), (e) => e.id, (e, t) => {
4522
+ oe(B(s, 2), 17, () => E(F), (e) => e.id, (e, t) => {
4494
4523
  var n = k(), r = N(n);
4495
4524
  {
4496
- let e = fe(() => E(O) === E(t).id);
4497
- j(r, () => Ge, (n, r) => {
4525
+ let e = pe(() => E(O) === E(t).id);
4526
+ j(r, () => Je, (n, r) => {
4498
4527
  r(n, {
4499
4528
  get value() {
4500
4529
  return E(t).id;
@@ -4506,7 +4535,7 @@ function tn(n, c) {
4506
4535
  children: (e, n) => {
4507
4536
  P();
4508
4537
  var r = D();
4509
- B(() => w(r, E(t).label)), L(e, r);
4538
+ z(() => w(r, E(t).label)), L(e, r);
4510
4539
  },
4511
4540
  $$slots: { default: !0 }
4512
4541
  });
@@ -4518,122 +4547,127 @@ function tn(n, c) {
4518
4547
  $$slots: { default: !0 }
4519
4548
  });
4520
4549
  });
4521
- var o = V(a, 2);
4522
- j(o, () => W, (e, n) => {
4550
+ var o = B(a, 2);
4551
+ j(o, () => We, (e, n) => {
4523
4552
  n(e, {
4524
4553
  value: "profile",
4525
4554
  get currentValue() {
4526
4555
  return E(O);
4527
4556
  },
4528
4557
  children: (e, n) => {
4529
- var r = Yt(), i = C(r), a = C(i);
4530
- De(a, {
4558
+ var r = an(), i = C(r), a = C(i);
4559
+ Oe(a, {
4531
4560
  for: "settings-name",
4532
4561
  children: (e, t) => {
4533
4562
  P();
4534
4563
  var n = D();
4535
- B((e) => w(n, e), [() => S()]), L(e, n);
4564
+ z((e) => w(n, e), [() => S()]), L(e, n);
4536
4565
  },
4537
4566
  $$slots: { default: !0 }
4538
- }), Oe(V(a, 2), {
4567
+ }), V(B(a, 2), {
4539
4568
  id: "settings-name",
4540
4569
  type: "text",
4541
4570
  name: "name",
4542
4571
  autocomplete: "name",
4543
4572
  get value() {
4544
- return E(R);
4573
+ return E(fe);
4545
4574
  },
4546
4575
  set value(e) {
4547
- I(R, e, !0);
4576
+ I(fe, e, !0);
4548
4577
  }
4549
4578
  }), M(i);
4550
- var o = V(i, 2), s = C(o);
4551
- De(s, {
4579
+ var o = B(i, 2), s = C(o);
4580
+ Oe(s, {
4552
4581
  for: "settings-email",
4553
4582
  children: (e, t) => {
4554
4583
  P();
4555
4584
  var n = D();
4556
- B((e) => w(n, e), [() => x()]), L(e, n);
4585
+ z((e) => w(n, e), [() => x()]), L(e, n);
4557
4586
  },
4558
4587
  $$slots: { default: !0 }
4559
4588
  });
4560
- var c = V(s, 2);
4561
- Oe(c, {
4589
+ var c = B(s, 2);
4590
+ V(c, {
4562
4591
  id: "settings-email",
4563
4592
  type: "email",
4564
4593
  name: "email",
4565
4594
  autocomplete: "email",
4566
4595
  get value() {
4567
- return E(me);
4596
+ return E(he);
4568
4597
  },
4569
4598
  set value(e) {
4570
- I(me, e, !0);
4599
+ I(he, e, !0);
4571
4600
  }
4572
4601
  });
4573
- var l = V(c, 2), u = C(l, !0);
4602
+ var l = B(c, 2), u = C(l, !0);
4574
4603
  M(l);
4575
- var d = V(l, 2), f = (e) => {
4576
- L(e, Kt());
4604
+ var d = B(l, 2), f = (e) => {
4605
+ L(e, tn());
4577
4606
  };
4578
4607
  T(d, (e) => {
4579
- E(_e) && e(f);
4608
+ E(ve) && e(f);
4580
4609
  }), M(o);
4581
- var p = V(o, 2), m = (e) => {
4582
- var t = qt(), n = C(t, !0);
4583
- M(t), B(() => w(n, E(H))), L(e, t);
4610
+ var p = B(o, 2), m = B(C(p), 2);
4611
+ let g;
4612
+ M(p);
4613
+ var _ = B(p, 2), y = (e) => {
4614
+ var t = nn(), n = C(t, !0);
4615
+ M(t), z(() => w(n, E(H))), L(e, t);
4584
4616
  };
4585
- T(p, (e) => {
4586
- E(H) && e(m);
4617
+ T(_, (e) => {
4618
+ E(H) && e(y);
4587
4619
  });
4588
- var g = V(p, 2);
4620
+ var b = B(_, 2);
4589
4621
  {
4590
- let e = fe(() => E(ye) === "saving");
4591
- Se(g, {
4622
+ let e = pe(() => E(be) === "saving");
4623
+ Ce(b, {
4592
4624
  type: "submit",
4593
4625
  get disabled() {
4594
4626
  return E(e);
4595
4627
  },
4596
4628
  class: "w-full sm:w-auto",
4597
4629
  children: (e, n) => {
4598
- var r = Jt(), i = N(r), a = (e) => {
4599
- ve(e, { class: "mr-2 size-4 animate-spin" });
4630
+ var r = rn(), i = N(r), a = (e) => {
4631
+ ye(e, { class: "mr-2 size-4 animate-spin" });
4600
4632
  }, o = (e) => {
4601
- ze(e, { class: "mr-2 size-4" });
4633
+ He(e, { class: "mr-2 size-4" });
4602
4634
  };
4603
4635
  T(i, (e) => {
4604
- E(ye) === "saving" ? e(a) : e(o, -1);
4636
+ E(be) === "saving" ? e(a) : e(o, -1);
4605
4637
  });
4606
- var s = V(i);
4607
- B((e) => w(s, ` ${e ?? ""}`), [() => E(ye) === "saved" ? t() : h()]), L(e, r);
4638
+ var s = B(i);
4639
+ z((e) => w(s, ` ${e ?? ""}`), [() => E(be) === "saved" ? t() : h()]), L(e, r);
4608
4640
  },
4609
4641
  $$slots: { default: !0 }
4610
4642
  });
4611
4643
  }
4612
- M(r), B((e) => w(u, e), [() => v()]), ge("submit", r, (e) => {
4613
- e.preventDefault(), We();
4614
- }), L(e, r);
4644
+ M(r), z((e) => {
4645
+ w(u, e), g = de(m, 1, "preference-switch svelte-1eaqpj", null, g, { enabled: Qt.graphSearchEnabled }), se(m, "aria-checked", Qt.graphSearchEnabled);
4646
+ }, [() => v()]), _e("submit", r, (e) => {
4647
+ e.preventDefault(), W();
4648
+ }), ae("click", m, () => Qt.update({ graphSearchEnabled: !Qt.graphSearchEnabled })), L(e, r);
4615
4649
  },
4616
4650
  $$slots: { default: !0 }
4617
4651
  });
4618
4652
  });
4619
- var c = V(o, 2);
4620
- j(c, () => W, (e, n) => {
4653
+ var c = B(o, 2);
4654
+ j(c, () => We, (e, n) => {
4621
4655
  n(e, {
4622
4656
  value: "password",
4623
4657
  get currentValue() {
4624
4658
  return E(O);
4625
4659
  },
4626
4660
  children: (e, n) => {
4627
- var r = Xt(), i = C(r), a = C(i);
4628
- De(a, {
4661
+ var r = on(), i = C(r), a = C(i);
4662
+ Oe(a, {
4629
4663
  for: "settings-current-password",
4630
4664
  children: (e, t) => {
4631
4665
  P();
4632
4666
  var n = D();
4633
- B((e) => w(n, e), [() => u()]), L(e, n);
4667
+ z((e) => w(n, e), [() => u()]), L(e, n);
4634
4668
  },
4635
4669
  $$slots: { default: !0 }
4636
- }), Oe(V(a, 2), {
4670
+ }), V(B(a, 2), {
4637
4671
  id: "settings-current-password",
4638
4672
  type: "password",
4639
4673
  name: "current-password",
@@ -4645,143 +4679,143 @@ function tn(n, c) {
4645
4679
  I(ke, e, !0);
4646
4680
  }
4647
4681
  }), M(i);
4648
- var o = V(i, 2), c = C(o);
4649
- De(c, {
4682
+ var o = B(i, 2), c = C(o);
4683
+ Oe(c, {
4650
4684
  for: "settings-new-password",
4651
4685
  children: (e, t) => {
4652
4686
  P();
4653
4687
  var n = D();
4654
- B((e) => w(n, e), [() => s()]), L(e, n);
4688
+ z((e) => w(n, e), [() => s()]), L(e, n);
4655
4689
  },
4656
4690
  $$slots: { default: !0 }
4657
- }), Oe(V(c, 2), {
4691
+ }), V(B(c, 2), {
4658
4692
  id: "settings-new-password",
4659
4693
  type: "password",
4660
4694
  name: "new-password",
4661
4695
  autocomplete: "new-password",
4662
4696
  get value() {
4663
- return E(Ne);
4697
+ return E(Ae);
4664
4698
  },
4665
4699
  set value(e) {
4666
- I(Ne, e, !0);
4700
+ I(Ae, e, !0);
4667
4701
  }
4668
4702
  }), M(o);
4669
- var f = V(o, 2), p = C(f);
4670
- De(p, {
4703
+ var f = B(o, 2), p = C(f);
4704
+ Oe(p, {
4671
4705
  for: "settings-confirm-password",
4672
4706
  children: (e, t) => {
4673
4707
  P();
4674
4708
  var n = D();
4675
- B((e) => w(n, e), [() => d()]), L(e, n);
4709
+ z((e) => w(n, e), [() => d()]), L(e, n);
4676
4710
  },
4677
4711
  $$slots: { default: !0 }
4678
- }), Oe(V(p, 2), {
4712
+ }), V(B(p, 2), {
4679
4713
  id: "settings-confirm-password",
4680
4714
  type: "password",
4681
4715
  name: "confirm-password",
4682
4716
  autocomplete: "new-password",
4683
4717
  get value() {
4684
- return E(Be);
4718
+ return E(je);
4685
4719
  },
4686
4720
  set value(e) {
4687
- I(Be, e, !0);
4721
+ I(je, e, !0);
4688
4722
  }
4689
4723
  }), M(f);
4690
- var m = V(f, 2), h = (e) => {
4691
- var t = qt(), n = C(t, !0);
4692
- M(t), B(() => w(n, E(G))), L(e, t);
4724
+ var m = B(f, 2), h = (e) => {
4725
+ var t = nn(), n = C(t, !0);
4726
+ M(t), z(() => w(n, E(Ie))), L(e, t);
4693
4727
  };
4694
4728
  T(m, (e) => {
4695
- E(G) && e(h);
4729
+ E(Ie) && e(h);
4696
4730
  });
4697
- var g = V(m, 2);
4731
+ var g = B(m, 2);
4698
4732
  {
4699
- let e = fe(() => E(He) === "saving");
4700
- Se(g, {
4733
+ let e = pe(() => E(U) === "saving");
4734
+ Ce(g, {
4701
4735
  type: "submit",
4702
4736
  get disabled() {
4703
4737
  return E(e);
4704
4738
  },
4705
4739
  class: "w-full sm:w-auto",
4706
4740
  children: (e, n) => {
4707
- var r = Jt(), i = N(r), a = (e) => {
4708
- ve(e, { class: "mr-2 size-4 animate-spin" });
4741
+ var r = rn(), i = N(r), a = (e) => {
4742
+ ye(e, { class: "mr-2 size-4 animate-spin" });
4709
4743
  };
4710
4744
  T(i, (e) => {
4711
- E(He) === "saving" && e(a);
4745
+ E(U) === "saving" && e(a);
4712
4746
  });
4713
- var o = V(i);
4714
- B((e) => w(o, ` ${e ?? ""}`), [() => E(He) === "saved" ? t() : l()]), L(e, r);
4747
+ var o = B(i);
4748
+ z((e) => w(o, ` ${e ?? ""}`), [() => E(U) === "saved" ? t() : l()]), L(e, r);
4715
4749
  },
4716
4750
  $$slots: { default: !0 }
4717
4751
  });
4718
4752
  }
4719
- M(r), ge("submit", r, (e) => {
4720
- e.preventDefault(), Ke();
4753
+ M(r), _e("submit", r, (e) => {
4754
+ e.preventDefault(), Ue();
4721
4755
  }), L(e, r);
4722
4756
  },
4723
4757
  $$slots: { default: !0 }
4724
4758
  });
4725
4759
  });
4726
- var f = V(c, 2);
4727
- j(f, () => W, (e, t) => {
4760
+ var f = B(c, 2);
4761
+ j(f, () => We, (e, t) => {
4728
4762
  t(e, {
4729
4763
  value: "appearance",
4730
4764
  get currentValue() {
4731
4765
  return E(O);
4732
4766
  },
4733
4767
  children: (e, t) => {
4734
- var n = Qt(), r = C(n), i = C(r);
4735
- De(i, {
4768
+ var n = cn(), r = C(n), i = C(r);
4769
+ Oe(i, {
4736
4770
  children: (e, t) => {
4737
4771
  P();
4738
4772
  var n = D();
4739
- B((e) => w(n, e), [() => ee()]), L(e, n);
4773
+ z((e) => w(n, e), [() => ee()]), L(e, n);
4740
4774
  },
4741
4775
  $$slots: { default: !0 }
4742
4776
  });
4743
- var a = V(i, 2), o = C(a, !0);
4777
+ var a = B(i, 2), o = C(a, !0);
4744
4778
  M(a), M(r);
4745
- var s = V(r, 2);
4746
- oe(s, 21, () => Je, (e) => e.key, (e, t) => {
4747
- var n = Zt(), r = C(n, !0);
4748
- M(n), B((e) => {
4779
+ var s = B(r, 2);
4780
+ oe(s, 21, () => qe, (e) => e.key, (e, t) => {
4781
+ var n = sn(), r = C(n, !0);
4782
+ M(n), z((e) => {
4749
4783
  de(n, 1, e, "svelte-1eaqpj"), w(r, E(t).label);
4750
- }, [() => ue(["rounded-md border px-3 py-2 text-sm font-medium transition-colors", Pe.value === E(t).value ? "border-primary bg-primary text-primary-foreground" : "border-border text-muted-foreground hover:bg-accent hover:text-accent-foreground"].join(" "))]), ae("click", n, () => qe(E(t).value)), L(e, n);
4784
+ }, [() => ue(["rounded-md border px-3 py-2 text-sm font-medium transition-colors", Le.value === E(t).value ? "border-primary bg-primary text-primary-foreground" : "border-border text-muted-foreground hover:bg-accent hover:text-accent-foreground"].join(" "))]), ae("click", n, () => Ge(E(t).value)), L(e, n);
4751
4785
  }), M(s);
4752
- var c = V(s, 2), l = V(C(c), 2), u = C(l), d = V(C(u), 2);
4786
+ var c = B(s, 2), l = B(C(c), 2), u = C(l), d = B(C(u), 2);
4753
4787
  let f;
4754
4788
  M(u);
4755
- var m = V(u, 2), h = V(C(m), 2);
4789
+ var m = B(u, 2), h = B(C(m), 2);
4756
4790
  let g;
4757
4791
  M(m);
4758
- var _ = V(m, 2), v = V(C(_), 2);
4792
+ var _ = B(m, 2), v = B(C(_), 2);
4759
4793
  let y;
4760
4794
  M(_);
4761
- var b = V(_, 2), x = V(C(b), 2);
4795
+ var b = B(_, 2), x = B(C(b), 2);
4762
4796
  let S;
4763
- M(b), M(l), M(c), M(n), B((e) => {
4797
+ M(b), M(l), M(c), M(n), z((e) => {
4764
4798
  w(o, e), f = de(d, 1, "preference-switch svelte-1eaqpj", null, f, { enabled: Z.showVisualMode }), se(d, "aria-checked", Z.showVisualMode), d.disabled = !Z.showMarkdownMode, g = de(h, 1, "preference-switch svelte-1eaqpj", null, g, { enabled: Z.showMarkdownMode }), se(h, "aria-checked", Z.showMarkdownMode), h.disabled = !Z.showVisualMode, y = de(v, 1, "preference-switch svelte-1eaqpj", null, y, { enabled: Z.minimalToolbar }), se(v, "aria-checked", Z.minimalToolbar), S = de(x, 1, "preference-switch svelte-1eaqpj", null, S, { enabled: Z.showScrollToTop }), se(x, "aria-checked", Z.showScrollToTop);
4765
4799
  }, [() => p()]), ae("click", d, () => Z.update({ showVisualMode: !Z.showVisualMode })), ae("click", h, () => Z.update({ showMarkdownMode: !Z.showMarkdownMode })), ae("click", v, () => Z.update({ minimalToolbar: !Z.minimalToolbar })), ae("click", x, () => Z.update({ showScrollToTop: !Z.showScrollToTop })), L(e, n);
4766
4800
  },
4767
4801
  $$slots: { default: !0 }
4768
4802
  });
4769
4803
  });
4770
- var m = V(f, 2);
4771
- j(m, () => W, (e, t) => {
4804
+ var m = B(f, 2);
4805
+ j(m, () => We, (e, t) => {
4772
4806
  t(e, {
4773
4807
  value: "api",
4774
4808
  get currentValue() {
4775
4809
  return E(O);
4776
4810
  },
4777
4811
  children: (e, t) => {
4778
- st(e, {});
4812
+ ut(e, {});
4779
4813
  },
4780
4814
  $$slots: { default: !0 }
4781
4815
  });
4782
- }), oe(V(m, 2), 17, () => E(F), (e) => e.id, (e, t) => {
4816
+ }), oe(B(m, 2), 17, () => E(F), (e) => e.id, (e, t) => {
4783
4817
  var n = k();
4784
- j(N(n), () => W, (e, n) => {
4818
+ j(N(n), () => We, (e, n) => {
4785
4819
  n(e, {
4786
4820
  get value() {
4787
4821
  return E(t).id;
@@ -4790,7 +4824,7 @@ function tn(n, c) {
4790
4824
  return E(O);
4791
4825
  },
4792
4826
  children: (e, n) => {
4793
- let r = fe(() => E(t).component);
4827
+ let r = pe(() => E(t).component);
4794
4828
  var i = k();
4795
4829
  j(N(i), () => E(r), (e, t) => {
4796
4830
  t(e, {});
@@ -4803,12 +4837,12 @@ function tn(n, c) {
4803
4837
  },
4804
4838
  $$slots: { default: !0 }
4805
4839
  });
4806
- }), j(V(c, 2), () => Ce, (e, t) => {
4840
+ }), j(B(c, 2), () => we, (e, t) => {
4807
4841
  t(e, {
4808
4842
  class: "settings-dialog-footer gap-4 max-sm:flex-col max-sm:items-stretch",
4809
4843
  children: (e, t) => {
4810
- var n = Wt(), r = N(n), i = (e) => {
4811
- Se(e, {
4844
+ var n = $t(), r = N(n), i = (e) => {
4845
+ Ce(e, {
4812
4846
  id: "logout-button",
4813
4847
  variant: "ghost",
4814
4848
  onclick: Xe,
@@ -4817,24 +4851,24 @@ function tn(n, c) {
4817
4851
  },
4818
4852
  class: "mr-auto text-muted-foreground hover:text-destructive max-sm:mr-0",
4819
4853
  children: (e, t) => {
4820
- var n = Jt(), r = N(n);
4821
- Re(r, { class: "mr-2 size-4" });
4822
- var i = V(r);
4823
- B((e) => w(i, ` ${e ?? ""}`), [() => E(Ye) ? "…" : a()]), L(e, n);
4854
+ var n = rn(), r = N(n);
4855
+ Ve(r, { class: "mr-2 size-4" });
4856
+ var i = B(r);
4857
+ z((e) => w(i, ` ${e ?? ""}`), [() => E(Ye) ? "…" : a()]), L(e, n);
4824
4858
  },
4825
4859
  $$slots: { default: !0 }
4826
4860
  });
4827
4861
  };
4828
4862
  T(r, (e) => {
4829
4863
  E(O) === "profile" && e(i);
4830
- }), Se(V(r, 2), {
4864
+ }), Ce(B(r, 2), {
4831
4865
  variant: "outline",
4832
4866
  onclick: Ze,
4833
4867
  class: "w-full sm:w-auto",
4834
4868
  children: (e, t) => {
4835
4869
  P();
4836
4870
  var n = D();
4837
- B((e) => w(n, e), [() => ne()]), L(e, n);
4871
+ z((e) => w(n, e), [() => ne()]), L(e, n);
4838
4872
  },
4839
4873
  $$slots: { default: !0 }
4840
4874
  }), L(e, n);
@@ -4849,4 +4883,4 @@ function tn(n, c) {
4849
4883
  }
4850
4884
  O(["click"]);
4851
4885
  //#endregion
4852
- export { Ke as a, Je as i, Qe as n, Xe as o, Ze as r, Ye as s, tn as t };
4886
+ export { Ye as a, Ze as i, tt as n, $e as o, et as r, Qe as s, dn as t };