@hiai-gg/docsmint 0.3.7 → 0.3.8
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/backend/src/lib/logger.ts +45 -15
- package/dist/backend/index.js +238 -150
- package/dist/frontend/CategoryDialog-DphkZqIB.js +611 -0
- package/dist/frontend/ConfirmDialog-BLF3x_hr.js +214 -0
- package/dist/frontend/CreateSnapshotDialog-D5vPvFTL.js +216 -0
- package/dist/frontend/DatePicker-CLNTdvTk.js +259 -0
- package/dist/frontend/DeleteDialog-DxYFJivN.js +174 -0
- package/dist/frontend/FolderDialog-CRVZM2Oi.js +250 -0
- package/dist/frontend/FolderNode-C2zG7uii.js +298 -0
- package/dist/frontend/FolderTreeSelector-CyB8y2Sm.js +103 -0
- package/dist/frontend/Icon-CooFj4Ee.js +64 -0
- package/dist/frontend/SettingsDialog-DCM4-N6_.js +1016 -0
- package/dist/frontend/ShareDialog-DYu3RKQu.js +165 -0
- package/dist/frontend/TagCreateDialog-DXQs2bL9.js +260 -0
- package/dist/frontend/camera-iKXDOOWT.js +29 -0
- package/dist/frontend/check-D-UuvBuh.js +25 -0
- package/dist/frontend/chevron-down-CiPtYyFh.js +25 -0
- package/dist/frontend/circle-check-tSPE1V6t.js +29 -0
- package/dist/frontend/clock-DJHbHZb8.js +29 -0
- package/dist/frontend/{bundle-mjs-CP6Owz-8.js → clsx-C7bIvsDS.js} +16 -1
- package/dist/frontend/components/category-dialog.js +1 -1
- package/dist/frontend/components/create-snapshot-dialog.js +1 -1
- package/dist/frontend/components/delete-dialog.js +1 -1
- package/dist/frontend/components/editor/document-editor.js +1364 -1353
- package/dist/frontend/components/editor/document-title.js +25 -25
- package/dist/frontend/components/editor/markdown-toggle.js +45 -45
- package/dist/frontend/components/folder-node.js +1 -1
- package/dist/frontend/components/folder-tree-selector.js +1 -1
- package/dist/frontend/components/save-as-dialog.js +169 -151
- package/dist/frontend/components/settings.js +1 -1
- package/dist/frontend/components/share-dialog.js +1 -1
- package/dist/frontend/components/sidebar.js +1161 -1153
- package/dist/frontend/components/tag-create-dialog.js +1 -1
- package/dist/frontend/components/version-history.js +188 -187
- package/dist/frontend/copy-GppwRMjX.js +32 -0
- package/dist/frontend/dashboard.js +1188 -1156
- package/dist/frontend/dialog-D6NxYVmy.js +213 -0
- package/dist/frontend/doc-tabs.js +2 -2
- package/dist/frontend/ellipsis-vertical-P9MHvCps.js +530 -0
- package/dist/frontend/extension.js +8 -8
- package/dist/frontend/{floating-layer-anchor-C51M4l6v.js → floating-layer-anchor-CPwucTfd.js} +1414 -1412
- package/dist/frontend/folder-DeWhnD7O.js +45 -0
- package/dist/frontend/folder-refresh.js +1 -1
- package/dist/frontend/input-B5Rak-5G.js +23 -0
- package/dist/frontend/keyboard.js +1 -1
- package/dist/frontend/{keyboard.svelte-D7H8DihC.js → keyboard.svelte-CApmX0vl.js} +53 -53
- package/dist/frontend/label-CW9rxoAb.js +30 -0
- package/dist/frontend/{loader-circle-Bk-WFz9g.js → loader-circle-BA6aLO71.js} +86 -85
- package/dist/frontend/rotate-ccw-B4Q7brmV.js +25 -0
- package/dist/frontend/search.js +680 -654
- package/dist/frontend/select-value-sF86Geyh.js +1446 -0
- package/dist/frontend/shared-document.js +94 -94
- package/dist/frontend/subfolders-refresh-store.svelte-B2dKVmgz.js +65 -0
- package/dist/frontend/tag-HxRazVN_.js +54 -0
- package/dist/frontend/tag-store.svelte-CqrUXo0o.js +29 -0
- package/dist/frontend/textarea-i1720bE7.js +23 -0
- package/dist/frontend/theme.js +1 -1
- package/dist/frontend/theme.svelte-DKfCy12k.js +49 -0
- package/dist/frontend/{utils-C0OW2678.js → utils-CffiyuTo.js} +2 -3
- package/dist/frontend/{utils-D8kmM3ub.js → utils-hzdMVeCv.js} +2 -3
- package/dist/frontend/utils.js +1 -1
- package/dist/frontend/x-CzBsnJ2x.js +25 -0
- package/dist/frontend-ssr/api/attachments.js +2 -0
- package/dist/frontend-ssr/api/categories.js +2 -0
- package/dist/frontend-ssr/api/documents.js +2 -0
- package/dist/frontend-ssr/api/folders.js +2 -0
- package/dist/frontend-ssr/api/settings.js +2 -0
- package/dist/frontend-ssr/api/share.js +2 -0
- package/dist/frontend-ssr/api/tags.js +2 -0
- package/dist/frontend-ssr/assets/CategoryDialog-C2xaZKHq.js +584 -0
- package/dist/frontend-ssr/assets/ConfirmDialog-DjMFKc0V.js +420 -0
- package/dist/frontend-ssr/assets/CreateSnapshotDialog-BRw1xJW1.js +214 -0
- package/dist/frontend-ssr/assets/DatePicker-DnXniwlZ.js +312 -0
- package/dist/frontend-ssr/assets/DeleteDialog-BCfZy3Zn.js +154 -0
- package/dist/frontend-ssr/assets/FolderDialog-Dq7I2cKZ.js +429 -0
- package/dist/frontend-ssr/assets/FolderNode-DRfBfpft.js +171 -0
- package/dist/frontend-ssr/assets/FolderTreeSelector-DZNZ2oI6.js +147 -0
- package/dist/frontend-ssr/assets/Icon-B0Zqppjo.js +231 -0
- package/dist/frontend-ssr/assets/SettingsDialog-CX8Noa8A.js +1107 -0
- package/dist/frontend-ssr/assets/ShareDialog-Cge49ZdJ.js +54 -0
- package/dist/frontend-ssr/assets/TagCreateDialog-EAChgBF-.js +264 -0
- package/dist/frontend-ssr/assets/api-keys-DFqX39MT.js +35 -0
- package/dist/frontend-ssr/assets/attachments-CWBxE3Vz.js +85 -0
- package/dist/frontend-ssr/assets/auth-client-x26kqY8Z.js +1286 -0
- package/dist/frontend-ssr/assets/camera-CdxscTw-.js +84 -0
- package/dist/frontend-ssr/assets/categories-AOqgcsn4.js +75 -0
- package/dist/frontend-ssr/assets/chevron-down-CSSNGNh_.js +80 -0
- package/dist/frontend-ssr/assets/chevron-right-B4p7Sk6X.js +80 -0
- package/dist/frontend-ssr/assets/circle-check-CI1v4vYh.js +84 -0
- package/dist/frontend-ssr/assets/client-DZMkDkDn.js +129 -0
- package/dist/frontend-ssr/assets/clipboard-CXOaoz2W.js +30 -0
- package/dist/frontend-ssr/assets/clock-IL-eX2di.js +84 -0
- package/dist/frontend-ssr/assets/context-jz1GGEUi.js +45 -0
- package/dist/frontend-ssr/assets/copy-CjV57nGQ.js +87 -0
- package/dist/frontend-ssr/assets/db-CnxeO66n.js +65 -0
- package/dist/frontend-ssr/assets/dialog-BOV1u6zP.js +157 -0
- package/dist/frontend-ssr/assets/dndzone-DMvTO_Jz.js +2114 -0
- package/dist/frontend-ssr/assets/document-drop-coordinator-CEaYACsC.js +109 -0
- package/dist/frontend-ssr/assets/documents-BnOTRdTY.js +108 -0
- package/dist/frontend-ssr/assets/editorExtensions-DUzwndMy.js +186 -0
- package/dist/frontend-ssr/assets/ellipsis-vertical-C-0hgkZn.js +555 -0
- package/dist/frontend-ssr/assets/floating-layer-anchor-uzw9K8qN.js +6114 -0
- package/dist/frontend-ssr/assets/folder-DChhG7qN.js +80 -0
- package/dist/frontend-ssr/assets/folders-CTfbS24J.js +127 -0
- package/dist/frontend-ssr/assets/identity-B3uHoDtf.js +99 -0
- package/dist/frontend-ssr/assets/input-DezGsU3y.js +19 -0
- package/dist/frontend-ssr/assets/keyboard.svelte-BgF47N3L.js +174 -0
- package/dist/frontend-ssr/assets/label-Bj8-TfFN.js +21 -0
- package/dist/frontend-ssr/assets/loader-circle-DZsrZ-er.js +80 -0
- package/dist/frontend-ssr/assets/markdown-CjqvGi5W.js +20 -0
- package/dist/frontend-ssr/assets/messages-DhXqlcJI.js +11125 -0
- package/dist/frontend-ssr/assets/resolve-BqHozBXl.js +32 -0
- package/dist/frontend-ssr/assets/rotate-ccw-BlgWwaiq.js +80 -0
- package/dist/frontend-ssr/assets/select-value-DngdSmLI.js +1526 -0
- package/dist/frontend-ssr/assets/settings-E6qSAWM2.js +64 -0
- package/dist/frontend-ssr/assets/share-BTBJelxA.js +30 -0
- package/dist/frontend-ssr/assets/subfolders-refresh-store.svelte-DAh4gT16.js +77 -0
- package/dist/frontend-ssr/assets/tag-GZEuGWk1.js +166 -0
- package/dist/frontend-ssr/assets/tag-store.svelte-DPodKj6Z.js +21 -0
- package/dist/frontend-ssr/assets/tags-BId2wdYd.js +49 -0
- package/dist/frontend-ssr/assets/textarea-Dev-qSEc.js +21 -0
- package/dist/frontend-ssr/assets/theme.svelte-Co0-ssaD.js +67 -0
- package/dist/frontend-ssr/assets/utils-DtlPPXpJ.js +9 -0
- package/dist/frontend-ssr/assets/utils-DvZnctjz.js +23 -0
- package/dist/frontend-ssr/collaboration.js +39 -0
- package/dist/frontend-ssr/components/category-dialog.js +2 -0
- package/dist/frontend-ssr/components/create-snapshot-dialog.js +2 -0
- package/dist/frontend-ssr/components/delete-dialog.js +2 -0
- package/dist/frontend-ssr/components/editor/document-editor.js +2499 -0
- package/dist/frontend-ssr/components/editor/document-title.js +11 -0
- package/dist/frontend-ssr/components/editor/docx-serializer.js +186 -0
- package/dist/frontend-ssr/components/editor/extensions.js +2 -0
- package/dist/frontend-ssr/components/editor/markdown-toggle.js +20 -0
- package/dist/frontend-ssr/components/editor/markdown.js +2 -0
- package/dist/frontend-ssr/components/folder-node.js +2 -0
- package/dist/frontend-ssr/components/folder-tree-selector.js +2 -0
- package/dist/frontend-ssr/components/save-as-dialog.js +280 -0
- package/dist/frontend-ssr/components/settings.js +2 -0
- package/dist/frontend-ssr/components/share-dialog.js +2 -0
- package/dist/frontend-ssr/components/sidebar.js +2033 -0
- package/dist/frontend-ssr/components/tag-create-dialog.js +2 -0
- package/dist/frontend-ssr/components/version-history.js +370 -0
- package/dist/frontend-ssr/dashboard.js +2542 -0
- package/dist/frontend-ssr/doc-tabs.js +23 -0
- package/dist/frontend-ssr/document-drop-coordinator.js +2 -0
- package/dist/frontend-ssr/extension.js +13 -0
- package/dist/frontend-ssr/folder-refresh.js +2 -0
- package/dist/frontend-ssr/i18n.js +10 -0
- package/dist/frontend-ssr/keyboard.js +2 -0
- package/dist/frontend-ssr/offline/identity.js +2 -0
- package/dist/frontend-ssr/search.js +332 -0
- package/dist/frontend-ssr/shared-document.js +273 -0
- package/dist/frontend-ssr/theme.js +9 -0
- package/dist/frontend-ssr/types.js +1 -0
- package/dist/frontend-ssr/utils/clipboard.js +2 -0
- package/dist/frontend-ssr/utils/dndzone.js +2 -0
- package/dist/frontend-ssr/utils.js +2 -0
- package/package.json +22 -1
- package/packages/cli/src/index.ts +1 -1
- package/packages/db/src/schema.ts +3 -0
- package/packages/mcp-server/src/index.ts +1 -1
- package/dist/frontend/CategoryDialog--rIE7FrH.js +0 -580
- package/dist/frontend/ConfirmDialog-Cpzyb55f.js +0 -212
- package/dist/frontend/CreateSnapshotDialog-CmkV-n2A.js +0 -216
- package/dist/frontend/DatePicker-Byynca7V.js +0 -257
- package/dist/frontend/DeleteDialog-ap6nOywZ.js +0 -174
- package/dist/frontend/FolderDialog-DmN_trV0.js +0 -247
- package/dist/frontend/FolderNode-C4B8a2fd.js +0 -317
- package/dist/frontend/FolderTreeSelector-D6ijiZTA.js +0 -100
- package/dist/frontend/Icon-DtNo0N1U.js +0 -64
- package/dist/frontend/SettingsDialog-2kTaTXAs.js +0 -992
- package/dist/frontend/ShareDialog-BBDGNF5n.js +0 -165
- package/dist/frontend/TagCreateDialog-DiLZnJo4.js +0 -258
- package/dist/frontend/camera-B7dAOd4s.js +0 -28
- package/dist/frontend/check-CDwRlG9T.js +0 -24
- package/dist/frontend/chevron-down-B7ZrjUmT.js +0 -24
- package/dist/frontend/circle-check-CDqeMB2d.js +0 -28
- package/dist/frontend/client-Bc5Fzx40.js +0 -2785
- package/dist/frontend/clock-Ck5Sn-Zl.js +0 -28
- package/dist/frontend/clsx-nmtDPO_P.js +0 -16
- package/dist/frontend/copy-CMAA6GP0.js +0 -31
- package/dist/frontend/dialog-BDkiG42a.js +0 -213
- package/dist/frontend/disclose-version-5I57E3LD.js +0 -3
- package/dist/frontend/ellipsis-vertical-BBuPldbW.js +0 -519
- package/dist/frontend/folder-TQjKY4yn.js +0 -44
- package/dist/frontend/index-client-jobkrWVL.js +0 -86
- package/dist/frontend/input-CBI6p4Xl.js +0 -23
- package/dist/frontend/label-C-GkhEp4.js +0 -30
- package/dist/frontend/rotate-ccw-CleZtJ5D.js +0 -24
- package/dist/frontend/select-value-CvrWRkXW.js +0 -1436
- package/dist/frontend/subfolders-refresh-store.svelte-BsheoQma.js +0 -65
- package/dist/frontend/tag-Dx3SmucJ.js +0 -53
- package/dist/frontend/tag-store.svelte-CIaF4sdZ.js +0 -29
- package/dist/frontend/textarea-Dfp78XlL.js +0 -23
- package/dist/frontend/theme.svelte-CROg1Hi5.js +0 -49
- package/dist/frontend/x-DaTdeDXv.js +0 -24
|
@@ -0,0 +1,1016 @@
|
|
|
1
|
+
import { t as e } from "./loader-circle-BA6aLO71.js";
|
|
2
|
+
import { t } from "./utils-hzdMVeCv.js";
|
|
3
|
+
import { a as n, i as r, n as i, o as a, r as o, t as s } from "./dialog-D6NxYVmy.js";
|
|
4
|
+
import { t as c } from "./label-CW9rxoAb.js";
|
|
5
|
+
import { t as l } from "./Icon-CooFj4Ee.js";
|
|
6
|
+
import { Cr as u, R as d, Rt as f, Sr as p, Zn as m, _r as h, ar as g, br as _, cr as v, dr as y, fr as b, gr as x, hr as S, ir as C, lr as w, mr as ee, or as te, pr as T, sr as ne, ur as re, vr as ie, wr as ae, xr as oe, yr as se } from "./messages-BpYaLbzE.js";
|
|
7
|
+
import { i as E } from "./categories-izQovv2w.js";
|
|
8
|
+
import { t as D } from "./input-B5Rak-5G.js";
|
|
9
|
+
import { t as ce } from "./context-BMD6XTPe.js";
|
|
10
|
+
import { t as le } from "./resolve-BG4HgzpN.js";
|
|
11
|
+
import { n as O, r as ue, t as k } from "./search-preferences-B1GdbdUc.js";
|
|
12
|
+
import { r as de, t as fe } from "./auth-client-Cygmp1I2.js";
|
|
13
|
+
import { a as pe, r as me } from "./settings-blyobazp.js";
|
|
14
|
+
import { a as A, i as j, n as M, o as N, s as P, t as F } from "./api-keys-CpkrA8rD.js";
|
|
15
|
+
import { a as I, t as L } from "./identity-DyWeNzu_.js";
|
|
16
|
+
import { n as R, t as z } from "./db-ByrlYfaI.js";
|
|
17
|
+
import { t as B } from "./theme.svelte-DKfCy12k.js";
|
|
18
|
+
import "svelte/internal/disclose-version";
|
|
19
|
+
import * as V from "svelte/internal/client";
|
|
20
|
+
import { onMount as he } from "svelte";
|
|
21
|
+
import "svelte/internal/flags/legacy";
|
|
22
|
+
import { goto as ge } from "$app/navigation";
|
|
23
|
+
import { page as _e } from "$app/state";
|
|
24
|
+
//#region ../node_modules/.bun/lucide-svelte@1.0.1+ff5f301bb2db9a0d/node_modules/lucide-svelte/dist/icons/log-out.svelte
|
|
25
|
+
function ve(e, t) {
|
|
26
|
+
let n = V.legacy_rest_props(t, [
|
|
27
|
+
"children",
|
|
28
|
+
"$$slots",
|
|
29
|
+
"$$events",
|
|
30
|
+
"$$legacy"
|
|
31
|
+
]), r = [
|
|
32
|
+
["path", { d: "m16 17 5-5-5-5" }],
|
|
33
|
+
["path", { d: "M21 12H9" }],
|
|
34
|
+
["path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" }]
|
|
35
|
+
];
|
|
36
|
+
l(e, V.spread_props({ name: "log-out" }, () => n, {
|
|
37
|
+
get iconNode() {
|
|
38
|
+
return r;
|
|
39
|
+
},
|
|
40
|
+
children: (e, n) => {
|
|
41
|
+
var r = V.comment(), i = V.first_child(r);
|
|
42
|
+
V.slot(i, t, "default", {}, null), V.append(e, r);
|
|
43
|
+
},
|
|
44
|
+
$$slots: { default: !0 }
|
|
45
|
+
}));
|
|
46
|
+
}
|
|
47
|
+
//#endregion
|
|
48
|
+
//#region ../node_modules/.bun/lucide-svelte@1.0.1+ff5f301bb2db9a0d/node_modules/lucide-svelte/dist/icons/save.svelte
|
|
49
|
+
function ye(e, t) {
|
|
50
|
+
let n = V.legacy_rest_props(t, [
|
|
51
|
+
"children",
|
|
52
|
+
"$$slots",
|
|
53
|
+
"$$events",
|
|
54
|
+
"$$legacy"
|
|
55
|
+
]), r = [
|
|
56
|
+
["path", { d: "M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z" }],
|
|
57
|
+
["path", { d: "M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7" }],
|
|
58
|
+
["path", { d: "M7 3v4a1 1 0 0 0 1 1h7" }]
|
|
59
|
+
];
|
|
60
|
+
l(e, V.spread_props({ name: "save" }, () => n, {
|
|
61
|
+
get iconNode() {
|
|
62
|
+
return r;
|
|
63
|
+
},
|
|
64
|
+
children: (e, n) => {
|
|
65
|
+
var r = V.comment(), i = V.first_child(r);
|
|
66
|
+
V.slot(i, t, "default", {}, null), V.append(e, r);
|
|
67
|
+
},
|
|
68
|
+
$$slots: { default: !0 }
|
|
69
|
+
}));
|
|
70
|
+
}
|
|
71
|
+
//#endregion
|
|
72
|
+
//#region ../node_modules/.bun/@hiai-gg+hiai-ui@0.0.8+3149ccaa93f654b8/node_modules/@hiai-gg/hiai-ui/dist/components/ui/tabs/tabs.svelte
|
|
73
|
+
var H = V.from_html("<div><!></div>");
|
|
74
|
+
function be(e, n) {
|
|
75
|
+
V.push(n, !0);
|
|
76
|
+
let r = V.prop(n, "value", 15, "");
|
|
77
|
+
var i = H(), a = V.child(i), o = (e) => {
|
|
78
|
+
var t = V.comment(), r = V.first_child(t);
|
|
79
|
+
V.snippet(r, () => n.children), V.append(e, t);
|
|
80
|
+
};
|
|
81
|
+
V.if(a, (e) => {
|
|
82
|
+
n.children && e(o);
|
|
83
|
+
}), V.reset(i), V.template_effect((e) => {
|
|
84
|
+
V.set_class(i, 1, e), V.set_attribute(i, "data-tabs-value", r());
|
|
85
|
+
}, [() => V.clsx(t("w-full", n.class))]), V.append(e, i), V.pop();
|
|
86
|
+
}
|
|
87
|
+
//#endregion
|
|
88
|
+
//#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
|
|
89
|
+
var xe = V.from_html("<div role=\"tabpanel\"><!></div>");
|
|
90
|
+
function U(e, n) {
|
|
91
|
+
V.push(n, !0);
|
|
92
|
+
var r = V.comment(), i = V.first_child(r), a = (e) => {
|
|
93
|
+
var r = xe(), i = V.child(r), a = (e) => {
|
|
94
|
+
var t = V.comment(), r = V.first_child(t);
|
|
95
|
+
V.snippet(r, () => n.children), V.append(e, t);
|
|
96
|
+
};
|
|
97
|
+
V.if(i, (e) => {
|
|
98
|
+
n.children && e(a);
|
|
99
|
+
}), V.reset(r), V.template_effect((e) => V.set_class(r, 1, e), [() => V.clsx(t("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", n.class))]), V.append(e, r);
|
|
100
|
+
};
|
|
101
|
+
V.if(i, (e) => {
|
|
102
|
+
n.currentValue === n.value && e(a);
|
|
103
|
+
}), V.append(e, r), V.pop();
|
|
104
|
+
}
|
|
105
|
+
//#endregion
|
|
106
|
+
//#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
|
|
107
|
+
var Se = V.from_html("<div role=\"tablist\"><!></div>");
|
|
108
|
+
function Ce(e, n) {
|
|
109
|
+
V.push(n, !0);
|
|
110
|
+
var r = Se(), i = V.child(r), a = (e) => {
|
|
111
|
+
var t = V.comment(), r = V.first_child(t);
|
|
112
|
+
V.snippet(r, () => n.children), V.append(e, t);
|
|
113
|
+
};
|
|
114
|
+
V.if(i, (e) => {
|
|
115
|
+
n.children && e(a);
|
|
116
|
+
}), V.reset(r), V.template_effect((e) => V.set_class(r, 1, e), [() => V.clsx(t("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground", n.class))]), V.append(e, r), V.pop();
|
|
117
|
+
}
|
|
118
|
+
//#endregion
|
|
119
|
+
//#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
|
|
120
|
+
var we = V.from_html("<button type=\"button\" role=\"tab\"><!></button>");
|
|
121
|
+
function W(e, n) {
|
|
122
|
+
V.push(n, !0);
|
|
123
|
+
let r = V.prop(n, "selected", 3, !1);
|
|
124
|
+
function i() {
|
|
125
|
+
n.onclick?.(n.value);
|
|
126
|
+
}
|
|
127
|
+
var a = we(), o = V.child(a), s = (e) => {
|
|
128
|
+
var t = V.comment(), r = V.first_child(t);
|
|
129
|
+
V.snippet(r, () => n.children), V.append(e, t);
|
|
130
|
+
};
|
|
131
|
+
V.if(o, (e) => {
|
|
132
|
+
n.children && e(s);
|
|
133
|
+
}), V.reset(a), V.template_effect((e) => {
|
|
134
|
+
V.set_attribute(a, "aria-selected", r()), V.set_attribute(a, "data-state", r() ? "active" : "inactive"), V.set_class(a, 1, e);
|
|
135
|
+
}, [() => V.clsx(t("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", r() ? "bg-primary text-primary-foreground shadow" : "text-muted-foreground hover:bg-accent hover:text-accent-foreground", n.class))]), V.delegated("click", a, i), V.append(e, a), V.pop();
|
|
136
|
+
}
|
|
137
|
+
V.delegate(["click"]);
|
|
138
|
+
//#endregion
|
|
139
|
+
//#region src/lib/components/settings/ApiAccessSettings.svelte
|
|
140
|
+
var G = V.from_html("<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>"), K = V.from_html("<p class=\"text-sm text-destructive\" role=\"alert\"> </p>"), Te = V.from_html("<p class=\"text-sm text-muted-foreground\">Loading API access…</p>"), Ee = V.from_html("<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>"), q = V.from_html("<p class=\"text-sm text-muted-foreground\">No global API keys.</p>"), De = V.from_html("<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>"), Oe = V.from_html("<p class=\"text-sm text-muted-foreground\">No category API keys.</p>"), ke = V.from_html("<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>"), Ae = V.from_html("<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>");
|
|
141
|
+
function je(e, t) {
|
|
142
|
+
V.push(t, !0);
|
|
143
|
+
let n = V.state(V.proxy([])), r = V.state(V.proxy([])), i = V.state("Global API key"), o = V.state(V.proxy({})), s = V.state(null), c = V.state(!0), l = V.state(!1), u = V.state(null), d = V.derived(() => V.get(s) ? V.get(o)[V.get(s)] : void 0), f = V.derived(() => V.get(n).filter((e) => e.scopes.includes("global"))), p = V.derived(() => V.get(n).filter((e) => M(e.scopes) !== null));
|
|
144
|
+
function m(e) {
|
|
145
|
+
return V.get(r).find((t) => t.id === e)?.name ?? "Unknown category";
|
|
146
|
+
}
|
|
147
|
+
async function h() {
|
|
148
|
+
V.set(c, !0), V.set(u, null);
|
|
149
|
+
try {
|
|
150
|
+
let [e, t] = await Promise.all([A(), E()]);
|
|
151
|
+
V.set(n, e.keys, !0), V.set(r, t, !0);
|
|
152
|
+
} catch (e) {
|
|
153
|
+
V.set(u, e instanceof Error ? e.message : "Failed to load API access", !0);
|
|
154
|
+
} finally {
|
|
155
|
+
V.set(c, !1);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
he(h);
|
|
159
|
+
async function g() {
|
|
160
|
+
V.set(l, !0), V.set(u, null);
|
|
161
|
+
try {
|
|
162
|
+
let e = await j(V.get(i).trim() || void 0);
|
|
163
|
+
V.set(o, {
|
|
164
|
+
...V.get(o),
|
|
165
|
+
[e.id]: e.key
|
|
166
|
+
}, !0), V.set(s, e.id, !0), await h();
|
|
167
|
+
} catch (e) {
|
|
168
|
+
V.set(u, e instanceof Error ? e.message : "Failed to create API key", !0);
|
|
169
|
+
} finally {
|
|
170
|
+
V.set(l, !1);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
async function _(e) {
|
|
174
|
+
V.set(l, !0);
|
|
175
|
+
try {
|
|
176
|
+
await P(e);
|
|
177
|
+
let { [e]: t, ...n } = V.get(o);
|
|
178
|
+
V.set(o, n, !0), V.get(s) === e && V.set(s, null), await h();
|
|
179
|
+
} finally {
|
|
180
|
+
V.set(l, !1);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
async function v(e) {
|
|
184
|
+
let t = V.get(o)[e.id] ?? await N(e.id);
|
|
185
|
+
await navigator.clipboard.writeText(F(e, t));
|
|
186
|
+
}
|
|
187
|
+
var y = Ae(), b = V.sibling(V.child(y), 2), x = V.child(b);
|
|
188
|
+
D(x, {
|
|
189
|
+
"aria-label": "Global API key name",
|
|
190
|
+
get value() {
|
|
191
|
+
return V.get(i);
|
|
192
|
+
},
|
|
193
|
+
set value(e) {
|
|
194
|
+
V.set(i, e, !0);
|
|
195
|
+
}
|
|
196
|
+
}), a(V.sibling(x, 2), {
|
|
197
|
+
onclick: g,
|
|
198
|
+
get disabled() {
|
|
199
|
+
return V.get(l);
|
|
200
|
+
},
|
|
201
|
+
children: (e, t) => {
|
|
202
|
+
V.next();
|
|
203
|
+
var n = V.text("Create global key");
|
|
204
|
+
V.append(e, n);
|
|
205
|
+
},
|
|
206
|
+
$$slots: { default: !0 }
|
|
207
|
+
}), V.reset(b);
|
|
208
|
+
var S = V.sibling(b, 2), C = (e) => {
|
|
209
|
+
var t = G(), n = V.sibling(V.child(t), 2), r = V.child(n, !0);
|
|
210
|
+
V.reset(n), a(V.sibling(n, 2), {
|
|
211
|
+
class: "mt-2",
|
|
212
|
+
size: "sm",
|
|
213
|
+
variant: "outline",
|
|
214
|
+
onclick: () => navigator.clipboard.writeText(V.get(d)),
|
|
215
|
+
children: (e, t) => {
|
|
216
|
+
V.next();
|
|
217
|
+
var n = V.text("Copy key");
|
|
218
|
+
V.append(e, n);
|
|
219
|
+
},
|
|
220
|
+
$$slots: { default: !0 }
|
|
221
|
+
}), V.reset(t), V.template_effect(() => V.set_text(r, V.get(d))), V.append(e, t);
|
|
222
|
+
};
|
|
223
|
+
V.if(S, (e) => {
|
|
224
|
+
V.get(d) && e(C);
|
|
225
|
+
});
|
|
226
|
+
var w = V.sibling(S, 2), ee = (e) => {
|
|
227
|
+
var t = K(), n = V.child(t, !0);
|
|
228
|
+
V.reset(t), V.template_effect(() => V.set_text(n, V.get(u))), V.append(e, t);
|
|
229
|
+
};
|
|
230
|
+
V.if(w, (e) => {
|
|
231
|
+
V.get(u) && e(ee);
|
|
232
|
+
});
|
|
233
|
+
var te = V.sibling(w, 2), T = (e) => {
|
|
234
|
+
var t = Te();
|
|
235
|
+
V.append(e, t);
|
|
236
|
+
}, ne = (e) => {
|
|
237
|
+
var t = ke(), n = V.child(t), r = V.sibling(V.child(n), 2);
|
|
238
|
+
V.each(r, 17, () => V.get(f), (e) => e.id, (e, t) => {
|
|
239
|
+
var n = Ee(), r = V.child(n), i = V.child(r), o = V.child(i, !0);
|
|
240
|
+
V.reset(i);
|
|
241
|
+
var s = V.sibling(i), c = V.child(s);
|
|
242
|
+
V.reset(s), V.reset(r), a(V.sibling(r, 2), {
|
|
243
|
+
size: "sm",
|
|
244
|
+
variant: "destructive",
|
|
245
|
+
onclick: () => _(V.get(t).id),
|
|
246
|
+
get disabled() {
|
|
247
|
+
return V.get(l);
|
|
248
|
+
},
|
|
249
|
+
children: (e, t) => {
|
|
250
|
+
V.next();
|
|
251
|
+
var n = V.text("Revoke");
|
|
252
|
+
V.append(e, n);
|
|
253
|
+
},
|
|
254
|
+
$$slots: { default: !0 }
|
|
255
|
+
}), V.reset(n), V.template_effect(() => {
|
|
256
|
+
V.set_text(o, V.get(t).name), V.set_text(c, `${V.get(t).prefix ?? ""}…`);
|
|
257
|
+
}), V.append(e, n);
|
|
258
|
+
}, (e) => {
|
|
259
|
+
var t = q();
|
|
260
|
+
V.append(e, t);
|
|
261
|
+
}), V.reset(n);
|
|
262
|
+
var i = V.sibling(n, 2), s = V.sibling(V.child(i), 2);
|
|
263
|
+
V.each(s, 17, () => V.get(p), (e) => e.id, (e, t) => {
|
|
264
|
+
var n = De(), r = V.child(n), i = V.child(r), s = V.child(i);
|
|
265
|
+
V.reset(i);
|
|
266
|
+
var c = V.sibling(i), u = V.child(c);
|
|
267
|
+
V.reset(c), V.reset(r);
|
|
268
|
+
var d = V.sibling(r, 2), f = V.child(d);
|
|
269
|
+
{
|
|
270
|
+
let e = V.derived(() => !V.get(t).recoverable && !V.get(o)[V.get(t).id]);
|
|
271
|
+
a(f, {
|
|
272
|
+
size: "sm",
|
|
273
|
+
variant: "outline",
|
|
274
|
+
onclick: () => v(V.get(t)),
|
|
275
|
+
get disabled() {
|
|
276
|
+
return V.get(e);
|
|
277
|
+
},
|
|
278
|
+
children: (e, n) => {
|
|
279
|
+
V.next();
|
|
280
|
+
var r = V.text();
|
|
281
|
+
V.template_effect(() => V.set_text(r, V.get(t).recoverable || V.get(o)[V.get(t).id] ? "Copy key" : "Rotate to enable copy")), V.append(e, r);
|
|
282
|
+
},
|
|
283
|
+
$$slots: { default: !0 }
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
a(V.sibling(f, 2), {
|
|
287
|
+
size: "sm",
|
|
288
|
+
variant: "destructive",
|
|
289
|
+
onclick: () => _(V.get(t).id),
|
|
290
|
+
get disabled() {
|
|
291
|
+
return V.get(l);
|
|
292
|
+
},
|
|
293
|
+
children: (e, t) => {
|
|
294
|
+
V.next();
|
|
295
|
+
var n = V.text("Revoke");
|
|
296
|
+
V.append(e, n);
|
|
297
|
+
},
|
|
298
|
+
$$slots: { default: !0 }
|
|
299
|
+
}), V.reset(d), V.reset(n), V.template_effect((e, n) => {
|
|
300
|
+
V.set_text(s, `${e ?? ""}: ${V.get(t).name ?? ""}`), V.set_text(u, `${V.get(t).prefix ?? ""}… · ${n ?? ""}`);
|
|
301
|
+
}, [() => m(M(V.get(t).scopes)), () => V.get(t).scopes.map((e) => e.split(":").at(-1)).join(" / ")]), V.append(e, n);
|
|
302
|
+
}, (e) => {
|
|
303
|
+
var t = Oe();
|
|
304
|
+
V.append(e, t);
|
|
305
|
+
}), V.reset(i), V.reset(t), V.append(e, t);
|
|
306
|
+
};
|
|
307
|
+
V.if(te, (e) => {
|
|
308
|
+
V.get(c) ? e(T) : e(ne, -1);
|
|
309
|
+
}), V.reset(y), V.append(e, y), V.pop();
|
|
310
|
+
}
|
|
311
|
+
//#endregion
|
|
312
|
+
//#region src/lib/offline/cleanup.ts
|
|
313
|
+
async function Me() {
|
|
314
|
+
let e = null;
|
|
315
|
+
try {
|
|
316
|
+
e = await I();
|
|
317
|
+
} catch {} finally {
|
|
318
|
+
L();
|
|
319
|
+
}
|
|
320
|
+
let t = "hiai-docs::hiai-docs-pwa-local::pwa-v1";
|
|
321
|
+
try {
|
|
322
|
+
if (e) try {
|
|
323
|
+
let t = R(e);
|
|
324
|
+
await Promise.allSettled([
|
|
325
|
+
t.documents.clear(),
|
|
326
|
+
t.folders.clear(),
|
|
327
|
+
t.drafts.clear(),
|
|
328
|
+
t.mutationQueue?.clear(),
|
|
329
|
+
t.metadata.clear()
|
|
330
|
+
]);
|
|
331
|
+
} finally {
|
|
332
|
+
await z(e).catch(() => void 0);
|
|
333
|
+
}
|
|
334
|
+
let n = await caches.keys();
|
|
335
|
+
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({
|
|
336
|
+
type: "CLEAR_HOST_CACHES",
|
|
337
|
+
cachePrefix: t
|
|
338
|
+
});
|
|
339
|
+
} catch {}
|
|
340
|
+
}
|
|
341
|
+
//#endregion
|
|
342
|
+
//#region src/lib/stores/editor-preferences.ts
|
|
343
|
+
var J = {
|
|
344
|
+
showVisualMode: !0,
|
|
345
|
+
showMarkdownMode: !0,
|
|
346
|
+
minimalToolbar: !1,
|
|
347
|
+
showScrollToTop: !0
|
|
348
|
+
};
|
|
349
|
+
function Ne(e) {
|
|
350
|
+
if (!e || typeof e != "object") return { ...J };
|
|
351
|
+
let t = e, n = typeof t.showVisualMode == "boolean" ? t.showVisualMode : J.showVisualMode, r = typeof t.showMarkdownMode == "boolean" ? t.showMarkdownMode : J.showMarkdownMode;
|
|
352
|
+
return {
|
|
353
|
+
showVisualMode: n || !r,
|
|
354
|
+
showMarkdownMode: r,
|
|
355
|
+
minimalToolbar: typeof t.minimalToolbar == "boolean" ? t.minimalToolbar : J.minimalToolbar,
|
|
356
|
+
showScrollToTop: typeof t.showScrollToTop == "boolean" ? t.showScrollToTop : J.showScrollToTop
|
|
357
|
+
};
|
|
358
|
+
}
|
|
359
|
+
//#endregion
|
|
360
|
+
//#region src/lib/stores/editor-preferences.svelte.ts
|
|
361
|
+
var Pe = "docsmint-editor-preferences", Y = V.state(V.proxy({ ...J })), Fe = !1;
|
|
362
|
+
function Ie() {
|
|
363
|
+
return typeof window < "u" && typeof localStorage < "u";
|
|
364
|
+
}
|
|
365
|
+
function Le() {
|
|
366
|
+
if (!(!Ie() || Fe)) {
|
|
367
|
+
Fe = !0;
|
|
368
|
+
try {
|
|
369
|
+
V.set(Y, Ne(JSON.parse(localStorage.getItem(Pe) ?? "null")), !0);
|
|
370
|
+
} catch {
|
|
371
|
+
V.set(Y, { ...J }, !0);
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
function Re(e) {
|
|
376
|
+
V.set(Y, Ne({
|
|
377
|
+
...V.get(Y),
|
|
378
|
+
...e
|
|
379
|
+
}), !0), Ie() && localStorage.setItem(Pe, JSON.stringify(V.get(Y)));
|
|
380
|
+
}
|
|
381
|
+
var X = {
|
|
382
|
+
get value() {
|
|
383
|
+
return V.get(Y);
|
|
384
|
+
},
|
|
385
|
+
get showMarkdownMode() {
|
|
386
|
+
return V.get(Y).showMarkdownMode;
|
|
387
|
+
},
|
|
388
|
+
get showVisualMode() {
|
|
389
|
+
return V.get(Y).showVisualMode;
|
|
390
|
+
},
|
|
391
|
+
get minimalToolbar() {
|
|
392
|
+
return V.get(Y).minimalToolbar;
|
|
393
|
+
},
|
|
394
|
+
get showScrollToTop() {
|
|
395
|
+
return V.get(Y).showScrollToTop;
|
|
396
|
+
},
|
|
397
|
+
init: Le,
|
|
398
|
+
update: Re
|
|
399
|
+
}, ze = !1, Z = V.state(V.proxy({ ...k }));
|
|
400
|
+
function Be() {
|
|
401
|
+
if (!(typeof localStorage > "u")) try {
|
|
402
|
+
localStorage.setItem(O, JSON.stringify(V.get(Z)));
|
|
403
|
+
} catch {}
|
|
404
|
+
}
|
|
405
|
+
function Ve() {
|
|
406
|
+
if (!(ze || typeof window > "u")) {
|
|
407
|
+
ze = !0;
|
|
408
|
+
try {
|
|
409
|
+
V.set(Z, ue(JSON.parse(localStorage.getItem("docsmint:search-preferences") ?? "null")), !0);
|
|
410
|
+
} catch {
|
|
411
|
+
V.set(Z, { ...k }, !0);
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
function He(e) {
|
|
416
|
+
V.set(Z, {
|
|
417
|
+
...V.get(Z),
|
|
418
|
+
...e
|
|
419
|
+
}, !0), Be();
|
|
420
|
+
}
|
|
421
|
+
var Q = {
|
|
422
|
+
get graphSearchEnabled() {
|
|
423
|
+
return V.get(Z).graphSearchEnabled;
|
|
424
|
+
},
|
|
425
|
+
init: Ve,
|
|
426
|
+
update: He
|
|
427
|
+
}, Ue = V.from_html("<!> <!>", 1), We = V.from_html("<!> <!> <!> <!> <!>", 1), Ge = V.from_html("<p class=\"text-xs text-muted-foreground\">Verification is required before the new address becomes active.</p>"), Ke = V.from_html("<p class=\"text-sm text-destructive\"> </p>"), $ = V.from_html("<!> ", 1), qe = V.from_html("<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>"), Je = V.from_html("<form class=\"space-y-4\"><div class=\"space-y-2\"><!> <!></div> <div class=\"space-y-2\"><!> <!></div> <div class=\"space-y-2\"><!> <!></div> <!> <!></form>"), Ye = V.from_html("<button type=\"button\"> </button>"), Xe = V.from_html("<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>"), Ze = V.from_html("<!> <!> <!> <!> <!> <!>", 1), Qe = V.from_html("<!> <!> <!>", 1);
|
|
428
|
+
function $e(t, l) {
|
|
429
|
+
V.push(l, !0);
|
|
430
|
+
let E = V.prop(l, "open", 15, !1), O = V.state("profile"), ue = ce(), k = V.derived(() => le(ue.settingsSections, { pathname: _e.url.pathname })), A = V.state(""), j = V.state(""), M = V.state(""), N = V.state(""), P = V.state("idle"), F = V.state(""), I = V.state(""), L = V.state(""), R = V.state(""), z = V.state("idle"), H = V.state("");
|
|
431
|
+
he(async () => {
|
|
432
|
+
X.init(), Q.init();
|
|
433
|
+
try {
|
|
434
|
+
let e = await me();
|
|
435
|
+
e.name && V.set(A, e.name, !0), e.email && (V.set(j, e.email, !0), V.set(M, e.email, !0));
|
|
436
|
+
} catch {}
|
|
437
|
+
});
|
|
438
|
+
async function xe() {
|
|
439
|
+
V.set(P, "saving"), V.set(F, "");
|
|
440
|
+
try {
|
|
441
|
+
if (await pe({ name: V.get(A) }), V.get(j).trim() !== "" && V.get(j).trim().toLowerCase() !== V.get(M).toLowerCase()) {
|
|
442
|
+
let { error: e } = await fe.changeEmail({
|
|
443
|
+
newEmail: V.get(j).trim(),
|
|
444
|
+
callbackURL: "/"
|
|
445
|
+
});
|
|
446
|
+
if (e) throw Error(e.message ?? C());
|
|
447
|
+
V.set(N, V.get(j).trim(), !0);
|
|
448
|
+
}
|
|
449
|
+
V.set(P, "saved"), setTimeout(() => {
|
|
450
|
+
V.set(P, "idle");
|
|
451
|
+
}, 2e3);
|
|
452
|
+
} catch (e) {
|
|
453
|
+
V.set(P, "error"), V.set(F, e instanceof Error ? e.message : d(), !0);
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
async function Se() {
|
|
457
|
+
if (V.set(H, ""), V.get(L) !== V.get(R)) {
|
|
458
|
+
V.set(z, "error"), V.set(H, ne(), !0);
|
|
459
|
+
return;
|
|
460
|
+
}
|
|
461
|
+
if (V.get(L).length < 8) {
|
|
462
|
+
V.set(z, "error"), V.set(H, te(), !0);
|
|
463
|
+
return;
|
|
464
|
+
}
|
|
465
|
+
V.set(z, "saving");
|
|
466
|
+
try {
|
|
467
|
+
let { error: e } = await fe.changePassword({
|
|
468
|
+
currentPassword: V.get(I),
|
|
469
|
+
newPassword: V.get(L),
|
|
470
|
+
revokeOtherSessions: !0
|
|
471
|
+
});
|
|
472
|
+
if (e) {
|
|
473
|
+
V.set(z, "error"), V.set(H, e.message ?? C(), !0);
|
|
474
|
+
return;
|
|
475
|
+
}
|
|
476
|
+
V.set(z, "saved"), V.set(I, ""), V.set(L, ""), V.set(R, ""), setTimeout(() => {
|
|
477
|
+
V.set(z, "idle");
|
|
478
|
+
}, 2e3);
|
|
479
|
+
} catch (e) {
|
|
480
|
+
V.set(z, "error"), V.set(H, e instanceof Error ? e.message : C(), !0);
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
function we(e) {
|
|
484
|
+
B.set(e);
|
|
485
|
+
}
|
|
486
|
+
let G = [
|
|
487
|
+
{
|
|
488
|
+
value: "light",
|
|
489
|
+
label: se(),
|
|
490
|
+
key: "light"
|
|
491
|
+
},
|
|
492
|
+
{
|
|
493
|
+
value: "dark",
|
|
494
|
+
label: ie(),
|
|
495
|
+
key: "dark"
|
|
496
|
+
},
|
|
497
|
+
{
|
|
498
|
+
value: "system",
|
|
499
|
+
label: h(),
|
|
500
|
+
key: "system"
|
|
501
|
+
}
|
|
502
|
+
], K = V.state(!1);
|
|
503
|
+
async function Te() {
|
|
504
|
+
V.set(K, !0);
|
|
505
|
+
try {
|
|
506
|
+
await Me(), await de(), E(!1), ge("/login");
|
|
507
|
+
} catch {
|
|
508
|
+
V.set(K, !1);
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
function Ee() {
|
|
512
|
+
E(!1);
|
|
513
|
+
}
|
|
514
|
+
var q = V.comment(), De = V.first_child(q);
|
|
515
|
+
V.component(De, () => n, (t, n) => {
|
|
516
|
+
n(t, {
|
|
517
|
+
get open() {
|
|
518
|
+
return E();
|
|
519
|
+
},
|
|
520
|
+
set open(e) {
|
|
521
|
+
E(e);
|
|
522
|
+
},
|
|
523
|
+
children: (t, n) => {
|
|
524
|
+
var l = Qe(), d = V.first_child(l);
|
|
525
|
+
V.component(d, () => i, (e, t) => {
|
|
526
|
+
t(e, {
|
|
527
|
+
children: (e, t) => {
|
|
528
|
+
var n = Ue(), i = V.first_child(n);
|
|
529
|
+
V.component(i, () => s, (e, t) => {
|
|
530
|
+
t(e, {
|
|
531
|
+
children: (e, t) => {
|
|
532
|
+
V.next();
|
|
533
|
+
var n = V.text();
|
|
534
|
+
V.template_effect((e) => V.set_text(n, e), [() => ae()]), V.append(e, n);
|
|
535
|
+
},
|
|
536
|
+
$$slots: { default: !0 }
|
|
537
|
+
});
|
|
538
|
+
});
|
|
539
|
+
var a = V.sibling(i, 2);
|
|
540
|
+
V.component(a, () => r, (e, t) => {
|
|
541
|
+
t(e, {
|
|
542
|
+
children: (e, t) => {
|
|
543
|
+
V.next();
|
|
544
|
+
var n = V.text();
|
|
545
|
+
V.template_effect((e) => V.set_text(n, e), [() => p()]), V.append(e, n);
|
|
546
|
+
},
|
|
547
|
+
$$slots: { default: !0 }
|
|
548
|
+
});
|
|
549
|
+
}), V.append(e, n);
|
|
550
|
+
},
|
|
551
|
+
$$slots: { default: !0 }
|
|
552
|
+
});
|
|
553
|
+
});
|
|
554
|
+
var h = V.sibling(d, 2);
|
|
555
|
+
V.component(h, () => be, (t, n) => {
|
|
556
|
+
n(t, {
|
|
557
|
+
class: "w-full",
|
|
558
|
+
get value() {
|
|
559
|
+
return V.get(O);
|
|
560
|
+
},
|
|
561
|
+
set value(e) {
|
|
562
|
+
V.set(O, e, !0);
|
|
563
|
+
},
|
|
564
|
+
children: (t, n) => {
|
|
565
|
+
var r = Ze(), i = V.first_child(r);
|
|
566
|
+
V.component(i, () => Ce, (e, t) => {
|
|
567
|
+
t(e, {
|
|
568
|
+
class: "grid w-full grid-cols-[repeat(auto-fit,minmax(0,1fr))] gap-1",
|
|
569
|
+
children: (e, t) => {
|
|
570
|
+
var n = We(), r = V.first_child(n);
|
|
571
|
+
{
|
|
572
|
+
let e = V.derived(() => V.get(O) === "profile");
|
|
573
|
+
V.component(r, () => W, (t, n) => {
|
|
574
|
+
n(t, {
|
|
575
|
+
value: "profile",
|
|
576
|
+
get selected() {
|
|
577
|
+
return V.get(e);
|
|
578
|
+
},
|
|
579
|
+
onclick: (e) => V.set(O, e, !0),
|
|
580
|
+
children: (e, t) => {
|
|
581
|
+
V.next();
|
|
582
|
+
var n = V.text();
|
|
583
|
+
V.template_effect((e) => V.set_text(n, e), [() => u()]), V.append(e, n);
|
|
584
|
+
},
|
|
585
|
+
$$slots: { default: !0 }
|
|
586
|
+
});
|
|
587
|
+
});
|
|
588
|
+
}
|
|
589
|
+
var i = V.sibling(r, 2);
|
|
590
|
+
{
|
|
591
|
+
let e = V.derived(() => V.get(O) === "password");
|
|
592
|
+
V.component(i, () => W, (t, n) => {
|
|
593
|
+
n(t, {
|
|
594
|
+
value: "password",
|
|
595
|
+
get selected() {
|
|
596
|
+
return V.get(e);
|
|
597
|
+
},
|
|
598
|
+
onclick: (e) => V.set(O, e, !0),
|
|
599
|
+
children: (e, t) => {
|
|
600
|
+
V.next();
|
|
601
|
+
var n = V.text();
|
|
602
|
+
V.template_effect((e) => V.set_text(n, e), [() => b()]), V.append(e, n);
|
|
603
|
+
},
|
|
604
|
+
$$slots: { default: !0 }
|
|
605
|
+
});
|
|
606
|
+
});
|
|
607
|
+
}
|
|
608
|
+
var a = V.sibling(i, 2);
|
|
609
|
+
{
|
|
610
|
+
let e = V.derived(() => V.get(O) === "api");
|
|
611
|
+
V.component(a, () => W, (t, n) => {
|
|
612
|
+
n(t, {
|
|
613
|
+
value: "api",
|
|
614
|
+
get selected() {
|
|
615
|
+
return V.get(e);
|
|
616
|
+
},
|
|
617
|
+
onclick: (e) => V.set(O, e, !0),
|
|
618
|
+
children: (e, t) => {
|
|
619
|
+
V.next();
|
|
620
|
+
var n = V.text("API");
|
|
621
|
+
V.append(e, n);
|
|
622
|
+
},
|
|
623
|
+
$$slots: { default: !0 }
|
|
624
|
+
});
|
|
625
|
+
});
|
|
626
|
+
}
|
|
627
|
+
var o = V.sibling(a, 2);
|
|
628
|
+
{
|
|
629
|
+
let e = V.derived(() => V.get(O) === "appearance");
|
|
630
|
+
V.component(o, () => W, (t, n) => {
|
|
631
|
+
n(t, {
|
|
632
|
+
value: "appearance",
|
|
633
|
+
get selected() {
|
|
634
|
+
return V.get(e);
|
|
635
|
+
},
|
|
636
|
+
onclick: (e) => V.set(O, e, !0),
|
|
637
|
+
children: (e, t) => {
|
|
638
|
+
V.next();
|
|
639
|
+
var n = V.text("Style");
|
|
640
|
+
V.append(e, n);
|
|
641
|
+
},
|
|
642
|
+
$$slots: { default: !0 }
|
|
643
|
+
});
|
|
644
|
+
});
|
|
645
|
+
}
|
|
646
|
+
var s = V.sibling(o, 2);
|
|
647
|
+
V.each(s, 17, () => V.get(k), (e) => e.id, (e, t) => {
|
|
648
|
+
var n = V.comment(), r = V.first_child(n);
|
|
649
|
+
{
|
|
650
|
+
let e = V.derived(() => V.get(O) === V.get(t).id);
|
|
651
|
+
V.component(r, () => W, (n, r) => {
|
|
652
|
+
r(n, {
|
|
653
|
+
get value() {
|
|
654
|
+
return V.get(t).id;
|
|
655
|
+
},
|
|
656
|
+
get selected() {
|
|
657
|
+
return V.get(e);
|
|
658
|
+
},
|
|
659
|
+
onclick: (e) => V.set(O, e, !0),
|
|
660
|
+
children: (e, n) => {
|
|
661
|
+
V.next();
|
|
662
|
+
var r = V.text();
|
|
663
|
+
V.template_effect(() => V.set_text(r, V.get(t).label)), V.append(e, r);
|
|
664
|
+
},
|
|
665
|
+
$$slots: { default: !0 }
|
|
666
|
+
});
|
|
667
|
+
});
|
|
668
|
+
}
|
|
669
|
+
V.append(e, n);
|
|
670
|
+
}), V.append(e, n);
|
|
671
|
+
},
|
|
672
|
+
$$slots: { default: !0 }
|
|
673
|
+
});
|
|
674
|
+
});
|
|
675
|
+
var o = V.sibling(i, 2);
|
|
676
|
+
V.component(o, () => U, (t, n) => {
|
|
677
|
+
n(t, {
|
|
678
|
+
value: "profile",
|
|
679
|
+
get currentValue() {
|
|
680
|
+
return V.get(O);
|
|
681
|
+
},
|
|
682
|
+
children: (t, n) => {
|
|
683
|
+
var r = qe(), i = V.child(r), o = V.child(i);
|
|
684
|
+
c(o, {
|
|
685
|
+
for: "settings-name",
|
|
686
|
+
children: (e, t) => {
|
|
687
|
+
V.next();
|
|
688
|
+
var n = V.text();
|
|
689
|
+
V.template_effect((e) => V.set_text(n, e), [() => ee()]), V.append(e, n);
|
|
690
|
+
},
|
|
691
|
+
$$slots: { default: !0 }
|
|
692
|
+
}), D(V.sibling(o, 2), {
|
|
693
|
+
id: "settings-name",
|
|
694
|
+
type: "text",
|
|
695
|
+
name: "name",
|
|
696
|
+
autocomplete: "name",
|
|
697
|
+
get value() {
|
|
698
|
+
return V.get(A);
|
|
699
|
+
},
|
|
700
|
+
set value(e) {
|
|
701
|
+
V.set(A, e, !0);
|
|
702
|
+
}
|
|
703
|
+
}), V.reset(i);
|
|
704
|
+
var s = V.sibling(i, 2), l = V.child(s);
|
|
705
|
+
c(l, {
|
|
706
|
+
for: "settings-email",
|
|
707
|
+
children: (e, t) => {
|
|
708
|
+
V.next();
|
|
709
|
+
var n = V.text();
|
|
710
|
+
V.template_effect((e) => V.set_text(n, e), [() => x()]), V.append(e, n);
|
|
711
|
+
},
|
|
712
|
+
$$slots: { default: !0 }
|
|
713
|
+
});
|
|
714
|
+
var u = V.sibling(l, 2);
|
|
715
|
+
D(u, {
|
|
716
|
+
id: "settings-email",
|
|
717
|
+
type: "email",
|
|
718
|
+
name: "email",
|
|
719
|
+
autocomplete: "email",
|
|
720
|
+
get value() {
|
|
721
|
+
return V.get(j);
|
|
722
|
+
},
|
|
723
|
+
set value(e) {
|
|
724
|
+
V.set(j, e, !0);
|
|
725
|
+
}
|
|
726
|
+
});
|
|
727
|
+
var d = V.sibling(u, 2), p = V.child(d, !0);
|
|
728
|
+
V.reset(d);
|
|
729
|
+
var m = V.sibling(d, 2), h = (e) => {
|
|
730
|
+
var t = Ge();
|
|
731
|
+
V.append(e, t);
|
|
732
|
+
};
|
|
733
|
+
V.if(m, (e) => {
|
|
734
|
+
V.get(N) && e(h);
|
|
735
|
+
}), V.reset(s);
|
|
736
|
+
var g = V.sibling(s, 2), _ = V.sibling(V.child(g), 2);
|
|
737
|
+
let v;
|
|
738
|
+
V.reset(g);
|
|
739
|
+
var y = V.sibling(g, 2), b = (e) => {
|
|
740
|
+
var t = Ke(), n = V.child(t, !0);
|
|
741
|
+
V.reset(t), V.template_effect(() => V.set_text(n, V.get(F))), V.append(e, t);
|
|
742
|
+
};
|
|
743
|
+
V.if(y, (e) => {
|
|
744
|
+
V.get(F) && e(b);
|
|
745
|
+
});
|
|
746
|
+
var C = V.sibling(y, 2);
|
|
747
|
+
{
|
|
748
|
+
let t = V.derived(() => V.get(P) === "saving");
|
|
749
|
+
a(C, {
|
|
750
|
+
type: "submit",
|
|
751
|
+
get disabled() {
|
|
752
|
+
return V.get(t);
|
|
753
|
+
},
|
|
754
|
+
class: "w-full sm:w-auto",
|
|
755
|
+
children: (t, n) => {
|
|
756
|
+
var r = $(), i = V.first_child(r), a = (t) => {
|
|
757
|
+
e(t, { class: "mr-2 size-4 animate-spin" });
|
|
758
|
+
}, o = (e) => {
|
|
759
|
+
ye(e, { class: "mr-2 size-4" });
|
|
760
|
+
};
|
|
761
|
+
V.if(i, (e) => {
|
|
762
|
+
V.get(P) === "saving" ? e(a) : e(o, -1);
|
|
763
|
+
});
|
|
764
|
+
var s = V.sibling(i);
|
|
765
|
+
V.template_effect((e) => V.set_text(s, ` ${e ?? ""}`), [() => V.get(P) === "saved" ? f() : T()]), V.append(t, r);
|
|
766
|
+
},
|
|
767
|
+
$$slots: { default: !0 }
|
|
768
|
+
});
|
|
769
|
+
}
|
|
770
|
+
V.reset(r), V.template_effect((e) => {
|
|
771
|
+
V.set_text(p, e), v = V.set_class(_, 1, "preference-switch svelte-1eaqpj", null, v, { enabled: Q.graphSearchEnabled }), V.set_attribute(_, "aria-checked", Q.graphSearchEnabled);
|
|
772
|
+
}, [() => S()]), V.event("submit", r, (e) => {
|
|
773
|
+
e.preventDefault(), xe();
|
|
774
|
+
}), V.delegated("click", _, () => Q.update({ graphSearchEnabled: !Q.graphSearchEnabled })), V.append(t, r);
|
|
775
|
+
},
|
|
776
|
+
$$slots: { default: !0 }
|
|
777
|
+
});
|
|
778
|
+
});
|
|
779
|
+
var s = V.sibling(o, 2);
|
|
780
|
+
V.component(s, () => U, (t, n) => {
|
|
781
|
+
n(t, {
|
|
782
|
+
value: "password",
|
|
783
|
+
get currentValue() {
|
|
784
|
+
return V.get(O);
|
|
785
|
+
},
|
|
786
|
+
children: (t, n) => {
|
|
787
|
+
var r = Je(), i = V.child(r), o = V.child(i);
|
|
788
|
+
c(o, {
|
|
789
|
+
for: "settings-current-password",
|
|
790
|
+
children: (e, t) => {
|
|
791
|
+
V.next();
|
|
792
|
+
var n = V.text();
|
|
793
|
+
V.template_effect((e) => V.set_text(n, e), [() => v()]), V.append(e, n);
|
|
794
|
+
},
|
|
795
|
+
$$slots: { default: !0 }
|
|
796
|
+
}), D(V.sibling(o, 2), {
|
|
797
|
+
id: "settings-current-password",
|
|
798
|
+
type: "password",
|
|
799
|
+
name: "current-password",
|
|
800
|
+
autocomplete: "current-password",
|
|
801
|
+
get value() {
|
|
802
|
+
return V.get(I);
|
|
803
|
+
},
|
|
804
|
+
set value(e) {
|
|
805
|
+
V.set(I, e, !0);
|
|
806
|
+
}
|
|
807
|
+
}), V.reset(i);
|
|
808
|
+
var s = V.sibling(i, 2), l = V.child(s);
|
|
809
|
+
c(l, {
|
|
810
|
+
for: "settings-new-password",
|
|
811
|
+
children: (e, t) => {
|
|
812
|
+
V.next();
|
|
813
|
+
var n = V.text();
|
|
814
|
+
V.template_effect((e) => V.set_text(n, e), [() => y()]), V.append(e, n);
|
|
815
|
+
},
|
|
816
|
+
$$slots: { default: !0 }
|
|
817
|
+
}), D(V.sibling(l, 2), {
|
|
818
|
+
id: "settings-new-password",
|
|
819
|
+
type: "password",
|
|
820
|
+
name: "new-password",
|
|
821
|
+
autocomplete: "new-password",
|
|
822
|
+
get value() {
|
|
823
|
+
return V.get(L);
|
|
824
|
+
},
|
|
825
|
+
set value(e) {
|
|
826
|
+
V.set(L, e, !0);
|
|
827
|
+
}
|
|
828
|
+
}), V.reset(s);
|
|
829
|
+
var u = V.sibling(s, 2), d = V.child(u);
|
|
830
|
+
c(d, {
|
|
831
|
+
for: "settings-confirm-password",
|
|
832
|
+
children: (e, t) => {
|
|
833
|
+
V.next();
|
|
834
|
+
var n = V.text();
|
|
835
|
+
V.template_effect((e) => V.set_text(n, e), [() => re()]), V.append(e, n);
|
|
836
|
+
},
|
|
837
|
+
$$slots: { default: !0 }
|
|
838
|
+
}), D(V.sibling(d, 2), {
|
|
839
|
+
id: "settings-confirm-password",
|
|
840
|
+
type: "password",
|
|
841
|
+
name: "confirm-password",
|
|
842
|
+
autocomplete: "new-password",
|
|
843
|
+
get value() {
|
|
844
|
+
return V.get(R);
|
|
845
|
+
},
|
|
846
|
+
set value(e) {
|
|
847
|
+
V.set(R, e, !0);
|
|
848
|
+
}
|
|
849
|
+
}), V.reset(u);
|
|
850
|
+
var p = V.sibling(u, 2), m = (e) => {
|
|
851
|
+
var t = Ke(), n = V.child(t, !0);
|
|
852
|
+
V.reset(t), V.template_effect(() => V.set_text(n, V.get(H))), V.append(e, t);
|
|
853
|
+
};
|
|
854
|
+
V.if(p, (e) => {
|
|
855
|
+
V.get(H) && e(m);
|
|
856
|
+
});
|
|
857
|
+
var h = V.sibling(p, 2);
|
|
858
|
+
{
|
|
859
|
+
let t = V.derived(() => V.get(z) === "saving");
|
|
860
|
+
a(h, {
|
|
861
|
+
type: "submit",
|
|
862
|
+
get disabled() {
|
|
863
|
+
return V.get(t);
|
|
864
|
+
},
|
|
865
|
+
class: "w-full sm:w-auto",
|
|
866
|
+
children: (t, n) => {
|
|
867
|
+
var r = $(), i = V.first_child(r), a = (t) => {
|
|
868
|
+
e(t, { class: "mr-2 size-4 animate-spin" });
|
|
869
|
+
};
|
|
870
|
+
V.if(i, (e) => {
|
|
871
|
+
V.get(z) === "saving" && e(a);
|
|
872
|
+
});
|
|
873
|
+
var o = V.sibling(i);
|
|
874
|
+
V.template_effect((e) => V.set_text(o, ` ${e ?? ""}`), [() => V.get(z) === "saved" ? f() : w()]), V.append(t, r);
|
|
875
|
+
},
|
|
876
|
+
$$slots: { default: !0 }
|
|
877
|
+
});
|
|
878
|
+
}
|
|
879
|
+
V.reset(r), V.event("submit", r, (e) => {
|
|
880
|
+
e.preventDefault(), Se();
|
|
881
|
+
}), V.append(t, r);
|
|
882
|
+
},
|
|
883
|
+
$$slots: { default: !0 }
|
|
884
|
+
});
|
|
885
|
+
});
|
|
886
|
+
var l = V.sibling(s, 2);
|
|
887
|
+
V.component(l, () => U, (e, t) => {
|
|
888
|
+
t(e, {
|
|
889
|
+
value: "appearance",
|
|
890
|
+
get currentValue() {
|
|
891
|
+
return V.get(O);
|
|
892
|
+
},
|
|
893
|
+
children: (e, t) => {
|
|
894
|
+
var n = Xe(), r = V.child(n), i = V.child(r);
|
|
895
|
+
c(i, {
|
|
896
|
+
children: (e, t) => {
|
|
897
|
+
V.next();
|
|
898
|
+
var n = V.text();
|
|
899
|
+
V.template_effect((e) => V.set_text(n, e), [() => _()]), V.append(e, n);
|
|
900
|
+
},
|
|
901
|
+
$$slots: { default: !0 }
|
|
902
|
+
});
|
|
903
|
+
var a = V.sibling(i, 2), o = V.child(a, !0);
|
|
904
|
+
V.reset(a), V.reset(r);
|
|
905
|
+
var s = V.sibling(r, 2);
|
|
906
|
+
V.each(s, 21, () => G, (e) => e.key, (e, t) => {
|
|
907
|
+
var n = Ye(), r = V.child(n, !0);
|
|
908
|
+
V.reset(n), V.template_effect((e) => {
|
|
909
|
+
V.set_class(n, 1, e, "svelte-1eaqpj"), V.set_text(r, V.get(t).label);
|
|
910
|
+
}, [() => V.clsx(["rounded-md border px-3 py-2 text-sm font-medium transition-colors", B.value === V.get(t).value ? "border-primary bg-primary text-primary-foreground" : "border-border text-muted-foreground hover:bg-accent hover:text-accent-foreground"].join(" "))]), V.delegated("click", n, () => we(V.get(t).value)), V.append(e, n);
|
|
911
|
+
}), V.reset(s);
|
|
912
|
+
var l = V.sibling(s, 2), u = V.sibling(V.child(l), 2), d = V.child(u), f = V.sibling(V.child(d), 2);
|
|
913
|
+
let p;
|
|
914
|
+
V.reset(d);
|
|
915
|
+
var m = V.sibling(d, 2), h = V.sibling(V.child(m), 2);
|
|
916
|
+
let g;
|
|
917
|
+
V.reset(m);
|
|
918
|
+
var v = V.sibling(m, 2), y = V.sibling(V.child(v), 2);
|
|
919
|
+
let b;
|
|
920
|
+
V.reset(v);
|
|
921
|
+
var x = V.sibling(v, 2), S = V.sibling(V.child(x), 2);
|
|
922
|
+
let C;
|
|
923
|
+
V.reset(x), V.reset(u), V.reset(l), V.reset(n), V.template_effect((e) => {
|
|
924
|
+
V.set_text(o, e), p = V.set_class(f, 1, "preference-switch svelte-1eaqpj", null, p, { enabled: X.showVisualMode }), V.set_attribute(f, "aria-checked", X.showVisualMode), f.disabled = !X.showMarkdownMode, g = V.set_class(h, 1, "preference-switch svelte-1eaqpj", null, g, { enabled: X.showMarkdownMode }), V.set_attribute(h, "aria-checked", X.showMarkdownMode), h.disabled = !X.showVisualMode, b = V.set_class(y, 1, "preference-switch svelte-1eaqpj", null, b, { enabled: X.minimalToolbar }), V.set_attribute(y, "aria-checked", X.minimalToolbar), C = V.set_class(S, 1, "preference-switch svelte-1eaqpj", null, C, { enabled: X.showScrollToTop }), V.set_attribute(S, "aria-checked", X.showScrollToTop);
|
|
925
|
+
}, [() => oe()]), V.delegated("click", f, () => X.update({ showVisualMode: !X.showVisualMode })), V.delegated("click", h, () => X.update({ showMarkdownMode: !X.showMarkdownMode })), V.delegated("click", y, () => X.update({ minimalToolbar: !X.minimalToolbar })), V.delegated("click", S, () => X.update({ showScrollToTop: !X.showScrollToTop })), V.append(e, n);
|
|
926
|
+
},
|
|
927
|
+
$$slots: { default: !0 }
|
|
928
|
+
});
|
|
929
|
+
});
|
|
930
|
+
var d = V.sibling(l, 2);
|
|
931
|
+
V.component(d, () => U, (e, t) => {
|
|
932
|
+
t(e, {
|
|
933
|
+
value: "api",
|
|
934
|
+
get currentValue() {
|
|
935
|
+
return V.get(O);
|
|
936
|
+
},
|
|
937
|
+
children: (e, t) => {
|
|
938
|
+
je(e, {});
|
|
939
|
+
},
|
|
940
|
+
$$slots: { default: !0 }
|
|
941
|
+
});
|
|
942
|
+
});
|
|
943
|
+
var p = V.sibling(d, 2);
|
|
944
|
+
V.each(p, 17, () => V.get(k), (e) => e.id, (e, t) => {
|
|
945
|
+
var n = V.comment(), r = V.first_child(n);
|
|
946
|
+
V.component(r, () => U, (e, n) => {
|
|
947
|
+
n(e, {
|
|
948
|
+
get value() {
|
|
949
|
+
return V.get(t).id;
|
|
950
|
+
},
|
|
951
|
+
get currentValue() {
|
|
952
|
+
return V.get(O);
|
|
953
|
+
},
|
|
954
|
+
children: (e, n) => {
|
|
955
|
+
let r = V.derived(() => V.get(t).component);
|
|
956
|
+
var i = V.comment(), a = V.first_child(i);
|
|
957
|
+
V.component(a, () => V.get(r), (e, t) => {
|
|
958
|
+
t(e, {});
|
|
959
|
+
}), V.append(e, i);
|
|
960
|
+
},
|
|
961
|
+
$$slots: { default: !0 }
|
|
962
|
+
});
|
|
963
|
+
}), V.append(e, n);
|
|
964
|
+
}), V.append(t, r);
|
|
965
|
+
},
|
|
966
|
+
$$slots: { default: !0 }
|
|
967
|
+
});
|
|
968
|
+
});
|
|
969
|
+
var C = V.sibling(h, 2);
|
|
970
|
+
V.component(C, () => o, (e, t) => {
|
|
971
|
+
t(e, {
|
|
972
|
+
class: "settings-dialog-footer gap-4 max-sm:flex-col max-sm:items-stretch",
|
|
973
|
+
children: (e, t) => {
|
|
974
|
+
var n = Ue(), r = V.first_child(n), i = (e) => {
|
|
975
|
+
a(e, {
|
|
976
|
+
id: "logout-button",
|
|
977
|
+
variant: "ghost",
|
|
978
|
+
onclick: Te,
|
|
979
|
+
get disabled() {
|
|
980
|
+
return V.get(K);
|
|
981
|
+
},
|
|
982
|
+
class: "mr-auto text-muted-foreground hover:text-destructive max-sm:mr-0",
|
|
983
|
+
children: (e, t) => {
|
|
984
|
+
var n = $(), r = V.first_child(n);
|
|
985
|
+
ve(r, { class: "mr-2 size-4" });
|
|
986
|
+
var i = V.sibling(r);
|
|
987
|
+
V.template_effect((e) => V.set_text(i, ` ${e ?? ""}`), [() => V.get(K) ? "…" : g()]), V.append(e, n);
|
|
988
|
+
},
|
|
989
|
+
$$slots: { default: !0 }
|
|
990
|
+
});
|
|
991
|
+
};
|
|
992
|
+
V.if(r, (e) => {
|
|
993
|
+
V.get(O) === "profile" && e(i);
|
|
994
|
+
}), a(V.sibling(r, 2), {
|
|
995
|
+
variant: "outline",
|
|
996
|
+
onclick: Ee,
|
|
997
|
+
class: "w-full sm:w-auto",
|
|
998
|
+
children: (e, t) => {
|
|
999
|
+
V.next();
|
|
1000
|
+
var n = V.text();
|
|
1001
|
+
V.template_effect((e) => V.set_text(n, e), [() => m()]), V.append(e, n);
|
|
1002
|
+
},
|
|
1003
|
+
$$slots: { default: !0 }
|
|
1004
|
+
}), V.append(e, n);
|
|
1005
|
+
},
|
|
1006
|
+
$$slots: { default: !0 }
|
|
1007
|
+
});
|
|
1008
|
+
}), V.append(t, l);
|
|
1009
|
+
},
|
|
1010
|
+
$$slots: { default: !0 }
|
|
1011
|
+
});
|
|
1012
|
+
}), V.append(t, q), V.pop();
|
|
1013
|
+
}
|
|
1014
|
+
V.delegate(["click"]);
|
|
1015
|
+
//#endregion
|
|
1016
|
+
export { $e as t };
|