@edifice.io/wiki 3.6.1 → 3.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index2.js +314 -312
- package/package.json +5 -5
package/lib/index2.js
CHANGED
|
@@ -14,7 +14,7 @@ import { useQueryClient as f2, onlineManager as ft, QueryClient as Rs, QueryCach
|
|
|
14
14
|
import { createPortal as u1 } from "react-dom";
|
|
15
15
|
import { t as Js } from "i18next";
|
|
16
16
|
import { createStore as j0, useStore as d0 } from "zustand";
|
|
17
|
-
import { useTranslation as
|
|
17
|
+
import { useTranslation as N } from "react-i18next";
|
|
18
18
|
import { IconInfoCircle as kt, IconHide as se, IconSee as yt, IconFolderMove as xt, IconForgoing as Mt, IconCopy as bt, IconDelete as vt, IconEdit as St, IconOptions as Rt, IconUndo as ws, IconWand as Lt, IconShare as Os, IconSettings as zs, IconPrint as Pe, IconSave as As, IconViewList as Ts, IconTextPage as It, IconPlus as ge, IconWrite as Zs, IconExercizerAi as Ws, IconAiFill as Jt, IconTeacher as Ns, IconExternalLink as Es, IconUpload as qs, IconThumbUp as Us, IconThumbDown as js, IconQuestion as Ds, IconRafterLeft as wt, IconRafterRight as Ot, IconClock as Hs, IconArrowRight as Fs } from "@edifice.io/react/icons";
|
|
19
19
|
import { InternalLinker as Gs } from "@edifice.io/react/multimedia";
|
|
20
20
|
import { useMediaQuery as zt } from "@uidotdev/usehooks";
|
|
@@ -50,19 +50,19 @@ var Nt = !1, Ps = (e, t) => e === t, ne = /* @__PURE__ */ Symbol("solid-proxy"),
|
|
|
50
50
|
cleanups: null,
|
|
51
51
|
context: null,
|
|
52
52
|
owner: null
|
|
53
|
-
}, we = {}, A = null, Oe = null, Bs = null,
|
|
53
|
+
}, we = {}, A = null, Oe = null, Bs = null, E = null, r2 = null, x2 = null, fe = 0;
|
|
54
54
|
function Z2(e, t) {
|
|
55
|
-
const i =
|
|
55
|
+
const i = E, s = A, n = e.length === 0, a = t === void 0 ? s : t, r = n ? jt : {
|
|
56
56
|
owned: null,
|
|
57
57
|
cleanups: null,
|
|
58
58
|
context: a ? a.context : null,
|
|
59
59
|
owner: a
|
|
60
60
|
}, c = n ? e : () => e(() => a2(() => b0(r)));
|
|
61
|
-
A = r,
|
|
61
|
+
A = r, E = null;
|
|
62
62
|
try {
|
|
63
63
|
return g2(c, !0);
|
|
64
64
|
} finally {
|
|
65
|
-
|
|
65
|
+
E = i, A = s;
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
function H(e, t) {
|
|
@@ -99,19 +99,19 @@ function Vs(e) {
|
|
|
99
99
|
function Ks(e, t, i) {
|
|
100
100
|
let s, n, a;
|
|
101
101
|
s = !0, n = e, a = {};
|
|
102
|
-
let r = null, c = we, l = null, d = !1,
|
|
102
|
+
let r = null, c = we, l = null, d = !1, m = "initialValue" in a, u = typeof s == "function" && e2(s);
|
|
103
103
|
const C = /* @__PURE__ */ new Set(), [p, g] = (a.storage || H)(a.initialValue), [k, y] = H(void 0), [v, R] = H(void 0, {
|
|
104
104
|
equals: !1
|
|
105
|
-
}), [b, f] = H(
|
|
105
|
+
}), [b, f] = H(m ? "ready" : "unresolved");
|
|
106
106
|
I.context && (l = I.getNextContextId(), a.ssrLoadFrom === "initial" ? c = a.initialValue : I.load && I.has(l) && (c = I.load(l)));
|
|
107
107
|
function x(L, M, Y, U) {
|
|
108
|
-
return r === L && (r = null, U !== void 0 && (
|
|
108
|
+
return r === L && (r = null, U !== void 0 && (m = !0), (L === c || M === c) && a.onHydrated && queueMicrotask(() => a.onHydrated(U, {
|
|
109
109
|
value: M
|
|
110
110
|
})), c = we, J(M, Y)), M;
|
|
111
111
|
}
|
|
112
112
|
function J(L, M) {
|
|
113
113
|
g2(() => {
|
|
114
|
-
M === void 0 && g(() => L), f(M !== void 0 ? "errored" :
|
|
114
|
+
M === void 0 && g(() => L), f(M !== void 0 ? "errored" : m ? "ready" : "unresolved"), y(M);
|
|
115
115
|
for (const Y of C.keys()) Y.decrement();
|
|
116
116
|
C.clear();
|
|
117
117
|
}, !1);
|
|
@@ -119,12 +119,12 @@ function Ks(e, t, i) {
|
|
|
119
119
|
function w() {
|
|
120
120
|
const L = en, M = p(), Y = k();
|
|
121
121
|
if (Y !== void 0 && !r) throw Y;
|
|
122
|
-
return
|
|
122
|
+
return E && E.user, M;
|
|
123
123
|
}
|
|
124
124
|
function O(L = !0) {
|
|
125
125
|
if (L !== !1 && d) return;
|
|
126
126
|
d = !1;
|
|
127
|
-
const M =
|
|
127
|
+
const M = u ? u() : s;
|
|
128
128
|
if (M == null || M === !1) {
|
|
129
129
|
x(r, a2(p));
|
|
130
130
|
return;
|
|
@@ -146,7 +146,7 @@ function Ks(e, t, i) {
|
|
|
146
146
|
} else if (!Vs(U))
|
|
147
147
|
return x(r, U, void 0, M), U;
|
|
148
148
|
return r = U, "v" in U ? (U.s === 1 ? x(r, U.v, void 0, M) : x(r, void 0, $0(U.v), M), U) : (d = !0, queueMicrotask(() => d = !1), g2(() => {
|
|
149
|
-
f(
|
|
149
|
+
f(m ? "refreshing" : "pending"), R();
|
|
150
150
|
}, !1), U.then((l2) => x(U, l2, void 0, M), (l2) => x(U, void 0, $0(l2), M)));
|
|
151
151
|
}
|
|
152
152
|
Object.defineProperties(w, {
|
|
@@ -164,7 +164,7 @@ function Ks(e, t, i) {
|
|
|
164
164
|
},
|
|
165
165
|
latest: {
|
|
166
166
|
get() {
|
|
167
|
-
if (!
|
|
167
|
+
if (!m) return w();
|
|
168
168
|
const L = k();
|
|
169
169
|
if (L && !r) throw L;
|
|
170
170
|
return p();
|
|
@@ -172,7 +172,7 @@ function Ks(e, t, i) {
|
|
|
172
172
|
}
|
|
173
173
|
});
|
|
174
174
|
let D = A;
|
|
175
|
-
return
|
|
175
|
+
return u ? Qs(() => (D = A, O(!1))) : O(!1), [w, {
|
|
176
176
|
refetch: (L) => Ht(D, () => O(L)),
|
|
177
177
|
mutate: g
|
|
178
178
|
}];
|
|
@@ -181,13 +181,13 @@ function f3(e) {
|
|
|
181
181
|
return g2(e, !1);
|
|
182
182
|
}
|
|
183
183
|
function a2(e) {
|
|
184
|
-
if (
|
|
185
|
-
const t =
|
|
186
|
-
|
|
184
|
+
if (E === null) return e();
|
|
185
|
+
const t = E;
|
|
186
|
+
E = null;
|
|
187
187
|
try {
|
|
188
188
|
return e();
|
|
189
189
|
} finally {
|
|
190
|
-
|
|
190
|
+
E = t;
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
193
|
function k3(e, t, i) {
|
|
@@ -215,22 +215,22 @@ function w1() {
|
|
|
215
215
|
return A;
|
|
216
216
|
}
|
|
217
217
|
function Ht(e, t) {
|
|
218
|
-
const i = A, s =
|
|
219
|
-
A = e,
|
|
218
|
+
const i = A, s = E;
|
|
219
|
+
A = e, E = null;
|
|
220
220
|
try {
|
|
221
221
|
return g2(t, !0);
|
|
222
222
|
} catch (n) {
|
|
223
223
|
p1(n);
|
|
224
224
|
} finally {
|
|
225
|
-
A = i,
|
|
225
|
+
A = i, E = s;
|
|
226
226
|
}
|
|
227
227
|
}
|
|
228
228
|
function $s(e) {
|
|
229
|
-
const t =
|
|
229
|
+
const t = E, i = A;
|
|
230
230
|
return Promise.resolve().then(() => {
|
|
231
|
-
|
|
231
|
+
E = t, A = i;
|
|
232
232
|
let s;
|
|
233
|
-
return g2(e, !1),
|
|
233
|
+
return g2(e, !1), E = A = null, s ? s.done : void 0;
|
|
234
234
|
});
|
|
235
235
|
}
|
|
236
236
|
var [_s, y3] = /* @__PURE__ */ H(!1);
|
|
@@ -264,9 +264,9 @@ function Gt() {
|
|
|
264
264
|
const e = r2;
|
|
265
265
|
r2 = null, g2(() => le(this), !1), r2 = e;
|
|
266
266
|
}
|
|
267
|
-
if (
|
|
267
|
+
if (E) {
|
|
268
268
|
const e = this.observers ? this.observers.length : 0;
|
|
269
|
-
|
|
269
|
+
E.sources ? (E.sources.push(this), E.sourceSlots.push(e)) : (E.sources = [this], E.sourceSlots = [e]), this.observers ? (this.observers.push(E), this.observerSlots.push(E.sources.length - 1)) : (this.observers = [E], this.observerSlots = [E.sources.length - 1]);
|
|
270
270
|
}
|
|
271
271
|
return this.value;
|
|
272
272
|
}
|
|
@@ -289,14 +289,14 @@ function u0(e) {
|
|
|
289
289
|
}
|
|
290
290
|
function tn(e, t, i) {
|
|
291
291
|
let s;
|
|
292
|
-
const n = A, a =
|
|
293
|
-
|
|
292
|
+
const n = A, a = E;
|
|
293
|
+
E = A = e;
|
|
294
294
|
try {
|
|
295
295
|
s = e.fn(t);
|
|
296
296
|
} catch (r) {
|
|
297
297
|
return e.pure && (e.state = v2, e.owned && e.owned.forEach(b0), e.owned = null), e.updatedAt = i + 1, p1(r);
|
|
298
298
|
} finally {
|
|
299
|
-
|
|
299
|
+
E = a, A = n;
|
|
300
300
|
}
|
|
301
301
|
(!e.updatedAt || e.updatedAt <= i) && (e.updatedAt != null && "observers" in e ? Yt(e, s) : e.value = s, e.updatedAt = i);
|
|
302
302
|
}
|
|
@@ -441,52 +441,52 @@ function ce(e) {
|
|
|
441
441
|
function on(e, t, i = {}) {
|
|
442
442
|
let s = [], n = [], a = [], r = 0, c = t.length > 1 ? [] : null;
|
|
443
443
|
return M0(() => ce(a)), () => {
|
|
444
|
-
let l = e() || [], d = l.length,
|
|
444
|
+
let l = e() || [], d = l.length, m, u;
|
|
445
445
|
return l[qt], a2(() => {
|
|
446
446
|
let p, g, k, y, v, R, b, f, x;
|
|
447
447
|
if (d === 0)
|
|
448
448
|
r !== 0 && (ce(a), a = [], s = [], n = [], r = 0, c && (c = [])), i.fallback && (s = [Qe], n[0] = Z2((J) => (a[0] = J, i.fallback())), r = 1);
|
|
449
449
|
else if (r === 0) {
|
|
450
|
-
for (n = new Array(d),
|
|
451
|
-
s[
|
|
450
|
+
for (n = new Array(d), u = 0; u < d; u++)
|
|
451
|
+
s[u] = l[u], n[u] = Z2(C);
|
|
452
452
|
r = d;
|
|
453
453
|
} else {
|
|
454
454
|
for (k = new Array(d), y = new Array(d), c && (v = new Array(d)), R = 0, b = Math.min(r, d); R < b && s[R] === l[R]; R++) ;
|
|
455
455
|
for (b = r - 1, f = d - 1; b >= R && f >= R && s[b] === l[f]; b--, f--)
|
|
456
456
|
k[f] = n[b], y[f] = a[b], c && (v[f] = c[b]);
|
|
457
|
-
for (p = /* @__PURE__ */ new Map(), g = new Array(f + 1),
|
|
458
|
-
x = l[
|
|
459
|
-
for (
|
|
460
|
-
x = s[
|
|
461
|
-
for (
|
|
462
|
-
|
|
457
|
+
for (p = /* @__PURE__ */ new Map(), g = new Array(f + 1), u = f; u >= R; u--)
|
|
458
|
+
x = l[u], m = p.get(x), g[u] = m === void 0 ? -1 : m, p.set(x, u);
|
|
459
|
+
for (m = R; m <= b; m++)
|
|
460
|
+
x = s[m], u = p.get(x), u !== void 0 && u !== -1 ? (k[u] = n[m], y[u] = a[m], c && (v[u] = c[m]), u = g[u], p.set(x, u)) : a[m]();
|
|
461
|
+
for (u = R; u < d; u++)
|
|
462
|
+
u in k ? (n[u] = k[u], a[u] = y[u], c && (c[u] = v[u], c[u](u))) : n[u] = Z2(C);
|
|
463
463
|
n = n.slice(0, r = d), s = l.slice(0);
|
|
464
464
|
}
|
|
465
465
|
return n;
|
|
466
466
|
});
|
|
467
467
|
function C(p) {
|
|
468
|
-
if (a[
|
|
469
|
-
const [g, k] = H(
|
|
470
|
-
return c[
|
|
468
|
+
if (a[u] = p, c) {
|
|
469
|
+
const [g, k] = H(u);
|
|
470
|
+
return c[u] = k, t(l[u], g);
|
|
471
471
|
}
|
|
472
|
-
return t(l[
|
|
472
|
+
return t(l[u]);
|
|
473
473
|
}
|
|
474
474
|
};
|
|
475
475
|
}
|
|
476
476
|
function rn(e, t, i = {}) {
|
|
477
477
|
let s = [], n = [], a = [], r = [], c = 0, l;
|
|
478
478
|
return M0(() => ce(a)), () => {
|
|
479
|
-
const d = e() || [],
|
|
479
|
+
const d = e() || [], m = d.length;
|
|
480
480
|
return d[qt], a2(() => {
|
|
481
|
-
if (
|
|
481
|
+
if (m === 0)
|
|
482
482
|
return c !== 0 && (ce(a), a = [], s = [], n = [], c = 0, r = []), i.fallback && (s = [Qe], n[0] = Z2((C) => (a[0] = C, i.fallback())), c = 1), n;
|
|
483
|
-
for (s[0] === Qe && (a[0](), a = [], s = [], n = [], c = 0), l = 0; l <
|
|
484
|
-
l < s.length && s[l] !== d[l] ? r[l](() => d[l]) : l >= s.length && (n[l] = Z2(
|
|
483
|
+
for (s[0] === Qe && (a[0](), a = [], s = [], n = [], c = 0), l = 0; l < m; l++)
|
|
484
|
+
l < s.length && s[l] !== d[l] ? r[l](() => d[l]) : l >= s.length && (n[l] = Z2(u));
|
|
485
485
|
for (; l < s.length; l++)
|
|
486
486
|
a[l]();
|
|
487
|
-
return c = r.length = a.length =
|
|
487
|
+
return c = r.length = a.length = m, s = d.slice(0), n = n.slice(0, c);
|
|
488
488
|
});
|
|
489
|
-
function
|
|
489
|
+
function u(C) {
|
|
490
490
|
a[l] = C;
|
|
491
491
|
const [p, g] = H(d[l]);
|
|
492
492
|
return r[l] = g, t(p, l);
|
|
@@ -563,18 +563,18 @@ function Vt(...e) {
|
|
|
563
563
|
if (!c) continue;
|
|
564
564
|
const l = Object.getOwnPropertyNames(c);
|
|
565
565
|
for (let d = l.length - 1; d >= 0; d--) {
|
|
566
|
-
const
|
|
567
|
-
if (
|
|
568
|
-
const
|
|
569
|
-
if (!s[
|
|
570
|
-
s[
|
|
566
|
+
const m = l[d];
|
|
567
|
+
if (m === "__proto__" || m === "constructor") continue;
|
|
568
|
+
const u = Object.getOwnPropertyDescriptor(c, m);
|
|
569
|
+
if (!s[m])
|
|
570
|
+
s[m] = u.get ? {
|
|
571
571
|
enumerable: !0,
|
|
572
572
|
configurable: !0,
|
|
573
|
-
get: ln.bind(i[
|
|
574
|
-
} :
|
|
573
|
+
get: ln.bind(i[m] = [u.get.bind(c)])
|
|
574
|
+
} : u.value !== void 0 ? u : void 0;
|
|
575
575
|
else {
|
|
576
|
-
const C = i[
|
|
577
|
-
C && (
|
|
576
|
+
const C = i[m];
|
|
577
|
+
C && (u.get ? C.push(u.get.bind(c)) : u.value !== void 0 && C.push(() => u.value));
|
|
578
578
|
}
|
|
579
579
|
}
|
|
580
580
|
}
|
|
@@ -683,10 +683,10 @@ function I3(e) {
|
|
|
683
683
|
let a = () => {
|
|
684
684
|
};
|
|
685
685
|
for (let r = 0; r < n.length; r++) {
|
|
686
|
-
const c = r, l = n[r], d = a,
|
|
686
|
+
const c = r, l = n[r], d = a, m = e2(() => d() ? void 0 : l.when, void 0, void 0), u = l.keyed ? m : e2(m, void 0, {
|
|
687
687
|
equals: (C, p) => !C == !p
|
|
688
688
|
});
|
|
689
|
-
a = () => d() || (
|
|
689
|
+
a = () => d() || (u() ? [c, m, l] : void 0);
|
|
690
690
|
}
|
|
691
691
|
return a;
|
|
692
692
|
});
|
|
@@ -832,29 +832,29 @@ function xn(e, t, i) {
|
|
|
832
832
|
for (; t[n - 1] === i[a - 1]; )
|
|
833
833
|
n--, a--;
|
|
834
834
|
if (n === r) {
|
|
835
|
-
const
|
|
836
|
-
for (; c < a; ) e.insertBefore(i[c++],
|
|
835
|
+
const m = a < s ? c ? i[c - 1].nextSibling : i[a - c] : l;
|
|
836
|
+
for (; c < a; ) e.insertBefore(i[c++], m);
|
|
837
837
|
} else if (a === c)
|
|
838
838
|
for (; r < n; )
|
|
839
839
|
(!d || !d.has(t[r])) && t[r].remove(), r++;
|
|
840
840
|
else if (t[r] === i[a - 1] && i[c] === t[n - 1]) {
|
|
841
|
-
const
|
|
842
|
-
e.insertBefore(i[c++], t[r++].nextSibling), e.insertBefore(i[--a],
|
|
841
|
+
const m = t[--n].nextSibling;
|
|
842
|
+
e.insertBefore(i[c++], t[r++].nextSibling), e.insertBefore(i[--a], m), t[n] = i[a];
|
|
843
843
|
} else {
|
|
844
844
|
if (!d) {
|
|
845
845
|
d = /* @__PURE__ */ new Map();
|
|
846
|
-
let
|
|
847
|
-
for (;
|
|
846
|
+
let u = c;
|
|
847
|
+
for (; u < a; ) d.set(i[u], u++);
|
|
848
848
|
}
|
|
849
|
-
const
|
|
850
|
-
if (
|
|
851
|
-
if (c <
|
|
852
|
-
let
|
|
853
|
-
for (; ++
|
|
849
|
+
const m = d.get(t[r]);
|
|
850
|
+
if (m != null)
|
|
851
|
+
if (c < m && m < a) {
|
|
852
|
+
let u = r, C = 1, p;
|
|
853
|
+
for (; ++u < n && u < a && !((p = d.get(t[u])) == null || p !== m + C); )
|
|
854
854
|
C++;
|
|
855
|
-
if (C >
|
|
855
|
+
if (C > m - c) {
|
|
856
856
|
const g = t[r];
|
|
857
|
-
for (; c <
|
|
857
|
+
for (; c < m; ) e.insertBefore(i[c++], g);
|
|
858
858
|
} else e.replaceChild(i[c++], t[r++]);
|
|
859
859
|
} else r++;
|
|
860
860
|
else t[r++].remove();
|
|
@@ -976,7 +976,7 @@ function O1(e, t, i) {
|
|
|
976
976
|
for (let n = 0, a = s.length; n < a; n++) e.classList.toggle(s[n], i);
|
|
977
977
|
}
|
|
978
978
|
function z1(e, t, i, s, n, a, r) {
|
|
979
|
-
let c, l, d,
|
|
979
|
+
let c, l, d, m, u;
|
|
980
980
|
if (t === "style") return In(e, i, s);
|
|
981
981
|
if (t === "classList") return Ln(e, i, s);
|
|
982
982
|
if (i === s) return s;
|
|
@@ -999,11 +999,11 @@ function z1(e, t, i, s, n, a, r) {
|
|
|
999
999
|
Ke(e, t.slice(5), i);
|
|
1000
1000
|
else if (t.slice(0, 5) === "bool:")
|
|
1001
1001
|
vn(e, t.slice(5), i);
|
|
1002
|
-
else if ((
|
|
1003
|
-
if (
|
|
1002
|
+
else if ((u = t.slice(0, 5) === "prop:") || (d = pn.has(t)) || !n && ((m = gn(t, e.tagName)) || (l = mn.has(t))) || (c = e.nodeName.includes("-") || "is" in r)) {
|
|
1003
|
+
if (u)
|
|
1004
1004
|
t = t.slice(5), l = !0;
|
|
1005
1005
|
else if (N2(e)) return i;
|
|
1006
|
-
t === "class" || t === "className" ? Sn(e, i) : c && !l && !d ? e[An(t)] = i : e[
|
|
1006
|
+
t === "class" || t === "className" ? Sn(e, i) : c && !l && !d ? e[An(t)] = i : e[m || t] = i;
|
|
1007
1007
|
} else {
|
|
1008
1008
|
const C = n && t.indexOf(":") > -1 && yn[t.split(":")[0]];
|
|
1009
1009
|
C ? bn(e, C, t, i) : Ke(e, hn[t] || t, i);
|
|
@@ -1052,8 +1052,8 @@ function v0(e, t, i, s, n) {
|
|
|
1052
1052
|
!i && (i = [...e.childNodes]);
|
|
1053
1053
|
let l = [];
|
|
1054
1054
|
for (let d = 0; d < i.length; d++) {
|
|
1055
|
-
const
|
|
1056
|
-
|
|
1055
|
+
const m = i[d];
|
|
1056
|
+
m.nodeType === 8 && m.data.slice(0, 2) === "!$" ? m.remove() : l.push(m);
|
|
1057
1057
|
}
|
|
1058
1058
|
i = l;
|
|
1059
1059
|
}
|
|
@@ -1085,11 +1085,11 @@ function v0(e, t, i, s, n) {
|
|
|
1085
1085
|
if (a) {
|
|
1086
1086
|
if (!l.length) return i;
|
|
1087
1087
|
if (s === void 0) return i = [...e.childNodes];
|
|
1088
|
-
let
|
|
1089
|
-
if (
|
|
1090
|
-
const
|
|
1091
|
-
for (; (
|
|
1092
|
-
return i =
|
|
1088
|
+
let m = l[0];
|
|
1089
|
+
if (m.parentNode !== e) return i;
|
|
1090
|
+
const u = [m];
|
|
1091
|
+
for (; (m = m.nextSibling) !== s; ) u.push(m);
|
|
1092
|
+
return i = u;
|
|
1093
1093
|
}
|
|
1094
1094
|
if (l.length === 0) {
|
|
1095
1095
|
if (i = E2(e, i, s), c) return i;
|
|
@@ -1121,8 +1121,8 @@ function $e(e, t, i, s) {
|
|
|
1121
1121
|
} else
|
|
1122
1122
|
e.push(c), n = !0;
|
|
1123
1123
|
else {
|
|
1124
|
-
const
|
|
1125
|
-
l && l.nodeType === 3 && l.data ===
|
|
1124
|
+
const m = String(c);
|
|
1125
|
+
l && l.nodeType === 3 && l.data === m ? e.push(l) : e.push(document.createTextNode(m));
|
|
1126
1126
|
}
|
|
1127
1127
|
}
|
|
1128
1128
|
return n;
|
|
@@ -1161,8 +1161,8 @@ function A3(e) {
|
|
|
1161
1161
|
r && (w1().user = r = !1), a || (a = Ht(n, () => e2(() => e.children)));
|
|
1162
1162
|
const c = s();
|
|
1163
1163
|
if (c instanceof HTMLHeadElement) {
|
|
1164
|
-
const [l, d] = H(!1),
|
|
1165
|
-
Z2((
|
|
1164
|
+
const [l, d] = H(!1), m = () => d(!0);
|
|
1165
|
+
Z2((u) => Xe(c, () => l() ? u() : a(), null)), M0(m);
|
|
1166
1166
|
} else {
|
|
1167
1167
|
const l = ei(e.isSVG ? "g" : "div", e.isSVG), d = t && l.attachShadow ? l.attachShadow({
|
|
1168
1168
|
mode: "open"
|
|
@@ -1485,13 +1485,13 @@ var sa = (e, t) => {
|
|
|
1485
1485
|
} else if (R0(s)) {
|
|
1486
1486
|
if (a === t.length - 2)
|
|
1487
1487
|
break;
|
|
1488
|
-
const l = +r, d = +t[++a] == 0 ? "key" : "value",
|
|
1488
|
+
const l = +r, d = +t[++a] == 0 ? "key" : "value", m = D2(s, l);
|
|
1489
1489
|
switch (d) {
|
|
1490
1490
|
case "key":
|
|
1491
|
-
s =
|
|
1491
|
+
s = m;
|
|
1492
1492
|
break;
|
|
1493
1493
|
case "value":
|
|
1494
|
-
s = s.get(
|
|
1494
|
+
s = s.get(m);
|
|
1495
1495
|
break;
|
|
1496
1496
|
}
|
|
1497
1497
|
}
|
|
@@ -1589,21 +1589,21 @@ var pi = (e, t, i, s, n = [], a = [], r = /* @__PURE__ */ new Map()) => {
|
|
|
1589
1589
|
return {
|
|
1590
1590
|
transformedValue: null
|
|
1591
1591
|
};
|
|
1592
|
-
const l = W1(e, i), d = (l == null ? void 0 : l.value) ?? e,
|
|
1592
|
+
const l = W1(e, i), d = (l == null ? void 0 : l.value) ?? e, m = O2(d) ? [] : {}, u = {};
|
|
1593
1593
|
r0(d, (p, g) => {
|
|
1594
1594
|
if (g === "__proto__" || g === "constructor" || g === "prototype")
|
|
1595
1595
|
throw new Error(`Detected property ${g}. This is a prototype pollution risk, please remove it from your object.`);
|
|
1596
1596
|
const k = pi(p, t, i, s, [...n, g], [...a, e], r);
|
|
1597
|
-
|
|
1598
|
-
|
|
1597
|
+
m[g] = k.transformedValue, O2(k.annotations) ? u[g] = k.annotations : S0(k.annotations) && r0(k.annotations, (y, v) => {
|
|
1598
|
+
u[ni(g) + "." + v] = y;
|
|
1599
1599
|
});
|
|
1600
1600
|
});
|
|
1601
|
-
const C = _e(
|
|
1602
|
-
transformedValue:
|
|
1601
|
+
const C = _e(u) ? {
|
|
1602
|
+
transformedValue: m,
|
|
1603
1603
|
annotations: l ? [l.type] : void 0
|
|
1604
1604
|
} : {
|
|
1605
|
-
transformedValue:
|
|
1606
|
-
annotations: l ? [l.type,
|
|
1605
|
+
transformedValue: m,
|
|
1606
|
+
annotations: l ? [l.type, u] : u
|
|
1607
1607
|
};
|
|
1608
1608
|
return c || r.set(e, C), C;
|
|
1609
1609
|
};
|
|
@@ -1641,7 +1641,7 @@ function i1(e, t = {}) {
|
|
|
1641
1641
|
return da(n, a, c, e, t.nonenumerable), n;
|
|
1642
1642
|
}, {});
|
|
1643
1643
|
}
|
|
1644
|
-
var
|
|
1644
|
+
var q = class {
|
|
1645
1645
|
/**
|
|
1646
1646
|
* @param dedupeReferentialEqualities If true, SuperJSON will make sure only one instance of referentially equal objects are serialized and the rest are replaced with `null`.
|
|
1647
1647
|
*/
|
|
@@ -1689,16 +1689,16 @@ var E = class {
|
|
|
1689
1689
|
this.allowedErrorProps.push(...e);
|
|
1690
1690
|
}
|
|
1691
1691
|
};
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
var ua =
|
|
1692
|
+
q.defaultInstance = new q();
|
|
1693
|
+
q.serialize = q.defaultInstance.serialize.bind(q.defaultInstance);
|
|
1694
|
+
q.deserialize = q.defaultInstance.deserialize.bind(q.defaultInstance);
|
|
1695
|
+
q.stringify = q.defaultInstance.stringify.bind(q.defaultInstance);
|
|
1696
|
+
q.parse = q.defaultInstance.parse.bind(q.defaultInstance);
|
|
1697
|
+
q.registerClass = q.defaultInstance.registerClass.bind(q.defaultInstance);
|
|
1698
|
+
q.registerSymbol = q.defaultInstance.registerSymbol.bind(q.defaultInstance);
|
|
1699
|
+
q.registerCustom = q.defaultInstance.registerCustom.bind(q.defaultInstance);
|
|
1700
|
+
q.allowErrorProps = q.defaultInstance.allowErrorProps.bind(q.defaultInstance);
|
|
1701
|
+
var ua = q.serialize, Z3 = q.stringify;
|
|
1702
1702
|
function W3(e) {
|
|
1703
1703
|
return e.state.fetchStatus === "fetching" ? "fetching" : e.getObserversCount() ? e.state.fetchStatus === "paused" ? "paused" : e.isStale() ? "stale" : "fresh" : "inactive";
|
|
1704
1704
|
}
|
|
@@ -1834,11 +1834,11 @@ var j3 = (e, t = !1) => {
|
|
|
1834
1834
|
initialIsOpen: c,
|
|
1835
1835
|
errorTypes: l,
|
|
1836
1836
|
styleNonce: d,
|
|
1837
|
-
shadowDOMTarget:
|
|
1838
|
-
hideDisabledQueries:
|
|
1837
|
+
shadowDOMTarget: m,
|
|
1838
|
+
hideDisabledQueries: u,
|
|
1839
1839
|
theme: C
|
|
1840
1840
|
} = e;
|
|
1841
|
-
z(this, G2, H(t)), z(this, J0, i), z(this, w0, s), z(this, I0, n), z(this, O0, d), z(this, Y2,
|
|
1841
|
+
z(this, G2, H(t)), z(this, J0, i), z(this, w0, s), z(this, I0, n), z(this, O0, d), z(this, Y2, m), z(this, P2, H(a)), z(this, B2, H(r)), z(this, Q2, H(c)), z(this, V2, H(l)), z(this, z0, H(u)), z(this, X2, H(C));
|
|
1842
1842
|
}
|
|
1843
1843
|
setButtonPosition(e) {
|
|
1844
1844
|
S(this, P2)[1](e);
|
|
@@ -1863,8 +1863,8 @@ var j3 = (e, t = !1) => {
|
|
|
1863
1863
|
throw new Error("Devtools is already mounted");
|
|
1864
1864
|
const t = $t(() => {
|
|
1865
1865
|
const i = this, [s] = S(this, P2), [n] = S(this, B2), [a] = S(this, Q2), [r] = S(this, V2), [c] = S(this, z0), [l] = S(this, G2), [d] = S(this, X2);
|
|
1866
|
-
let
|
|
1867
|
-
return S(this, K2) ?
|
|
1866
|
+
let m;
|
|
1867
|
+
return S(this, K2) ? m = S(this, K2) : (m = Kt(() => import("./BAGVG3AX.js")), z(this, K2, m)), fi(S(this, O0), S(this, Y2)), Qt(m, Vt({
|
|
1868
1868
|
get queryFlavor() {
|
|
1869
1869
|
return S(i, J0);
|
|
1870
1870
|
},
|
|
@@ -1937,12 +1937,12 @@ var j3 = (e, t = !1) => {
|
|
|
1937
1937
|
initialIsOpen: c,
|
|
1938
1938
|
errorTypes: l,
|
|
1939
1939
|
styleNonce: d,
|
|
1940
|
-
shadowDOMTarget:
|
|
1941
|
-
onClose:
|
|
1940
|
+
shadowDOMTarget: m,
|
|
1941
|
+
onClose: u,
|
|
1942
1942
|
hideDisabledQueries: C,
|
|
1943
1943
|
theme: p
|
|
1944
1944
|
} = e;
|
|
1945
|
-
z(this, $2, H(t)), z(this, Z0, i), z(this, W0, s), z(this, T0, n), z(this, N0, d), z(this, _2,
|
|
1945
|
+
z(this, $2, H(t)), z(this, Z0, i), z(this, W0, s), z(this, T0, n), z(this, N0, d), z(this, _2, m), z(this, e0, H(a)), z(this, t0, H(r)), z(this, i0, H(c)), z(this, s0, H(l)), z(this, E0, H(C)), z(this, n0, H(u)), z(this, o0, H(p));
|
|
1946
1946
|
}
|
|
1947
1947
|
setButtonPosition(e) {
|
|
1948
1948
|
S(this, e0)[1](e);
|
|
@@ -1969,9 +1969,9 @@ var j3 = (e, t = !1) => {
|
|
|
1969
1969
|
if (S(this, T2))
|
|
1970
1970
|
throw new Error("Devtools is already mounted");
|
|
1971
1971
|
const t = $t(() => {
|
|
1972
|
-
const i = this, [s] = S(this, e0), [n] = S(this, t0), [a] = S(this, i0), [r] = S(this, s0), [c] = S(this, E0), [l] = S(this, $2), [d] = S(this, n0), [
|
|
1973
|
-
let
|
|
1974
|
-
return S(this, a0) ?
|
|
1972
|
+
const i = this, [s] = S(this, e0), [n] = S(this, t0), [a] = S(this, i0), [r] = S(this, s0), [c] = S(this, E0), [l] = S(this, $2), [d] = S(this, n0), [m] = S(this, o0);
|
|
1973
|
+
let u;
|
|
1974
|
+
return S(this, a0) ? u = S(this, a0) : (u = Kt(() => import("./KZB72KQG.js")), z(this, a0, u)), fi(S(this, N0), S(this, _2)), Qt(u, Vt({
|
|
1975
1975
|
get queryFlavor() {
|
|
1976
1976
|
return S(i, Z0);
|
|
1977
1977
|
},
|
|
@@ -2007,7 +2007,7 @@ var j3 = (e, t = !1) => {
|
|
|
2007
2007
|
return d();
|
|
2008
2008
|
},
|
|
2009
2009
|
get theme() {
|
|
2010
|
-
return
|
|
2010
|
+
return m();
|
|
2011
2011
|
}
|
|
2012
2012
|
}));
|
|
2013
2013
|
}, e);
|
|
@@ -2029,8 +2029,8 @@ function fa(e) {
|
|
|
2029
2029
|
styleNonce: c,
|
|
2030
2030
|
shadowDOMTarget: l,
|
|
2031
2031
|
hideDisabledQueries: d,
|
|
2032
|
-
theme:
|
|
2033
|
-
} = e, [
|
|
2032
|
+
theme: m
|
|
2033
|
+
} = e, [u] = o2.useState(
|
|
2034
2034
|
new Ca({
|
|
2035
2035
|
client: t,
|
|
2036
2036
|
queryFlavor: "React Query",
|
|
@@ -2043,24 +2043,24 @@ function fa(e) {
|
|
|
2043
2043
|
styleNonce: c,
|
|
2044
2044
|
shadowDOMTarget: l,
|
|
2045
2045
|
hideDisabledQueries: d,
|
|
2046
|
-
theme:
|
|
2046
|
+
theme: m
|
|
2047
2047
|
})
|
|
2048
2048
|
);
|
|
2049
2049
|
return o2.useEffect(() => {
|
|
2050
|
-
|
|
2051
|
-
}, [t,
|
|
2052
|
-
s &&
|
|
2053
|
-
}, [s,
|
|
2054
|
-
n &&
|
|
2055
|
-
}, [n,
|
|
2056
|
-
|
|
2057
|
-
}, [a,
|
|
2058
|
-
|
|
2059
|
-
}, [r,
|
|
2060
|
-
|
|
2061
|
-
}, [
|
|
2062
|
-
|
|
2063
|
-
}), [
|
|
2050
|
+
u.setClient(t);
|
|
2051
|
+
}, [t, u]), o2.useEffect(() => {
|
|
2052
|
+
s && u.setButtonPosition(s);
|
|
2053
|
+
}, [s, u]), o2.useEffect(() => {
|
|
2054
|
+
n && u.setPosition(n);
|
|
2055
|
+
}, [n, u]), o2.useEffect(() => {
|
|
2056
|
+
u.setInitialIsOpen(a || !1);
|
|
2057
|
+
}, [a, u]), o2.useEffect(() => {
|
|
2058
|
+
u.setErrorTypes(r || []);
|
|
2059
|
+
}, [r, u]), o2.useEffect(() => {
|
|
2060
|
+
u.setTheme(m);
|
|
2061
|
+
}, [m, u]), o2.useEffect(() => (i.current && u.mount(i.current), () => {
|
|
2062
|
+
u.unmount();
|
|
2063
|
+
}), [u]), /* @__PURE__ */ o("div", { dir: "ltr", className: "tsqd-parent-container", ref: i });
|
|
2064
2064
|
}
|
|
2065
2065
|
function ka(e) {
|
|
2066
2066
|
const t = f2(e.client), i = o2.useRef(null), {
|
|
@@ -2644,7 +2644,7 @@ const Za = {
|
|
|
2644
2644
|
appCode: s
|
|
2645
2645
|
} = B(), {
|
|
2646
2646
|
t: n
|
|
2647
|
-
} =
|
|
2647
|
+
} = N();
|
|
2648
2648
|
console.error(t);
|
|
2649
2649
|
const a = () => /* @__PURE__ */ h("div", { className: "d-flex flex-column gap-16 align-items-center mt-64", children: [
|
|
2650
2650
|
/* @__PURE__ */ o(l1, { level: "h2", headingStyle: "h2", className: "text-secondary", children: n("oops") }),
|
|
@@ -2674,13 +2674,13 @@ function Ua(e) {
|
|
|
2674
2674
|
}
|
|
2675
2675
|
const u2 = () => Ua(Ea), ja = {}, Da = (e) => {
|
|
2676
2676
|
let t;
|
|
2677
|
-
const i = /* @__PURE__ */ new Set(), s = (
|
|
2678
|
-
const C = typeof
|
|
2677
|
+
const i = /* @__PURE__ */ new Set(), s = (m, u) => {
|
|
2678
|
+
const C = typeof m == "function" ? m(t) : m;
|
|
2679
2679
|
if (!Object.is(C, t)) {
|
|
2680
2680
|
const p = t;
|
|
2681
|
-
t =
|
|
2681
|
+
t = u ?? (typeof C != "object" || C === null) ? C : Object.assign({}, t, C), i.forEach((g) => g(t, p));
|
|
2682
2682
|
}
|
|
2683
|
-
}, n = () => t, l = { setState: s, getState: n, getInitialState: () => d, subscribe: (
|
|
2683
|
+
}, n = () => t, l = { setState: s, getState: n, getInitialState: () => d, subscribe: (m) => (i.add(m), () => i.delete(m)), destroy: () => {
|
|
2684
2684
|
(ja ? "lib" : void 0) !== "production" && console.warn(
|
|
2685
2685
|
"[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."
|
|
2686
2686
|
), i.clear();
|
|
@@ -2760,7 +2760,7 @@ function wi({
|
|
|
2760
2760
|
appCode: i
|
|
2761
2761
|
} = B(), {
|
|
2762
2762
|
t: s
|
|
2763
|
-
} =
|
|
2763
|
+
} = N(i), {
|
|
2764
2764
|
setOpenConfirmVisibilityModal: n
|
|
2765
2765
|
} = y2(), a = g1();
|
|
2766
2766
|
return /* @__PURE__ */ u1(/* @__PURE__ */ h(G, { id: "confirm-visibility-page", isOpen: a, onModalClose: () => n(!1), children: [
|
|
@@ -3374,7 +3374,7 @@ const fo = () => d0(y1, ho), H0 = () => go(Co), ko = () => {
|
|
|
3374
3374
|
function Zi() {
|
|
3375
3375
|
const e = X(), t = ve(), {
|
|
3376
3376
|
t: i
|
|
3377
|
-
} =
|
|
3377
|
+
} = N("wiki"), {
|
|
3378
3378
|
user: s
|
|
3379
3379
|
} = B(), {
|
|
3380
3380
|
setOpenDeleteModal: n
|
|
@@ -3409,7 +3409,7 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3409
3409
|
i([]);
|
|
3410
3410
|
return;
|
|
3411
3411
|
}
|
|
3412
|
-
const c = e.filter((l) => l.rights.some((d) => d === `creator:${a.userId}` || d === `user:${a.userId}:contrib` || d === `user:${a.userId}:manager` || a.groupsIds.some((
|
|
3412
|
+
const c = e.filter((l) => l.rights.some((d) => d === `creator:${a.userId}` || d === `user:${a.userId}:contrib` || d === `user:${a.userId}:manager` || a.groupsIds.some((m) => d === `group:${m}:contrib` || d === `group:${m}:manager`)));
|
|
3413
3413
|
i(c);
|
|
3414
3414
|
} catch (c) {
|
|
3415
3415
|
console.error("Error while filtering wikis:", c), i([]);
|
|
@@ -3429,14 +3429,14 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3429
3429
|
appCode: n
|
|
3430
3430
|
} = B(), {
|
|
3431
3431
|
t: a
|
|
3432
|
-
} =
|
|
3432
|
+
} = N(n), r = no(), {
|
|
3433
3433
|
data: c,
|
|
3434
3434
|
isPending: l
|
|
3435
3435
|
} = Ro(), {
|
|
3436
3436
|
filteredWikis: d,
|
|
3437
|
-
isLoading:
|
|
3437
|
+
isLoading: m
|
|
3438
3438
|
} = Io(c), {
|
|
3439
|
-
data:
|
|
3439
|
+
data: u,
|
|
3440
3440
|
isLoading: C
|
|
3441
3441
|
} = Le({
|
|
3442
3442
|
wikiId: t,
|
|
@@ -3477,8 +3477,8 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3477
3477
|
R(w);
|
|
3478
3478
|
}
|
|
3479
3479
|
}, [R]);
|
|
3480
|
-
if (l ||
|
|
3481
|
-
const x =
|
|
3480
|
+
if (l || m || C) return /* @__PURE__ */ o(p2, {});
|
|
3481
|
+
const x = u == null ? void 0 : u.some((J) => J.parentId === e);
|
|
3482
3482
|
return /* @__PURE__ */ h(G, { id: "duplicate-modal", isOpen: r, onModalClose: () => p(!1), size: "lg", scrollable: !0, children: [
|
|
3483
3483
|
/* @__PURE__ */ o(G.Header, { onModalClose: () => p(!1), children: a("wiki.page.duplicate.modal.title") }),
|
|
3484
3484
|
/* @__PURE__ */ h(G.Body, { children: [
|
|
@@ -3529,8 +3529,8 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3529
3529
|
appCode: l,
|
|
3530
3530
|
user: d
|
|
3531
3531
|
} = B(), {
|
|
3532
|
-
getAvatarURL:
|
|
3533
|
-
getUserbookURL:
|
|
3532
|
+
getAvatarURL: m,
|
|
3533
|
+
getUserbookURL: u
|
|
3534
3534
|
} = ct(), {
|
|
3535
3535
|
setOpenDeleteModal: C,
|
|
3536
3536
|
setOpenRevisionModal: p,
|
|
@@ -3538,7 +3538,7 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3538
3538
|
setOpenMoveModal: k
|
|
3539
3539
|
} = y2(), y = rt(), {
|
|
3540
3540
|
t: v
|
|
3541
|
-
} =
|
|
3541
|
+
} = N(l), R = zt("only screen and (max-width: 1024px)"), {
|
|
3542
3542
|
additionalActions: b
|
|
3543
3543
|
} = Wi(), f = a.contrib, x = a.manager, J = async () => {
|
|
3544
3544
|
const L = new FormData();
|
|
@@ -3597,9 +3597,9 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3597
3597
|
/* @__PURE__ */ h("div", { className: "d-flex flex-column", children: [
|
|
3598
3598
|
/* @__PURE__ */ o("div", { className: "d-flex align-items-center", children: /* @__PURE__ */ o("h2", { className: "text-gray-800", children: e.title }) }),
|
|
3599
3599
|
/* @__PURE__ */ h("div", { className: "d-flex align-items-center gap-12 mb-16 mb-md-24 mt-16", children: [
|
|
3600
|
-
/* @__PURE__ */ o(dt, { alt: v("wiki.read.author.avatar"), size: "sm", src:
|
|
3600
|
+
/* @__PURE__ */ o(dt, { alt: v("wiki.read.author.avatar"), size: "sm", src: m(e.lastContributer ?? e.author, "user"), variant: "circle" }),
|
|
3601
3601
|
/* @__PURE__ */ h("div", { className: "text-gray-700 small d-flex flex-column flex-md-row column-gap-12 align-items-md-center ", children: [
|
|
3602
|
-
/* @__PURE__ */ o("a", { href:
|
|
3602
|
+
/* @__PURE__ */ o("a", { href: u(e.lastContributer ?? e.author, "user"), className: "page-author", children: e.lastContributerName ?? e.authorName }),
|
|
3603
3603
|
!i && /* @__PURE__ */ h(c2, { children: [
|
|
3604
3604
|
/* @__PURE__ */ o("span", { className: "separator d-none d-md-block" }),
|
|
3605
3605
|
/* @__PURE__ */ o("span", { children: v("wiki.read.dated.updated", {
|
|
@@ -3637,24 +3637,24 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3637
3637
|
}, Ie = () => {
|
|
3638
3638
|
const [e, t] = t2(!1), i = d1(), s = f2(), n = i2(), a = X(), r = u2(), c = k1(), l = a.pageId ?? c[0], {
|
|
3639
3639
|
addToastMessage: d
|
|
3640
|
-
} = H0(),
|
|
3640
|
+
} = H0(), m = Re({
|
|
3641
3641
|
wikiId: a.wikiId,
|
|
3642
3642
|
pageId: l
|
|
3643
|
-
}),
|
|
3643
|
+
}), u = vo({
|
|
3644
3644
|
wikiId: a.wikiId,
|
|
3645
3645
|
pageId: l,
|
|
3646
3646
|
revisionId: a.versionId
|
|
3647
3647
|
}), C = () => {
|
|
3648
3648
|
n(`/id/${a.wikiId}/page/${l}`);
|
|
3649
3649
|
}, p = async () => {
|
|
3650
|
-
if (!
|
|
3650
|
+
if (!u.data || !m.data) {
|
|
3651
3651
|
i.error("wiki.version.notfound");
|
|
3652
3652
|
return;
|
|
3653
3653
|
}
|
|
3654
3654
|
await k({
|
|
3655
|
-
title:
|
|
3656
|
-
content:
|
|
3657
|
-
isVisible:
|
|
3655
|
+
title: u.data.title,
|
|
3656
|
+
content: u.data.content,
|
|
3657
|
+
isVisible: m.data.isVisible
|
|
3658
3658
|
});
|
|
3659
3659
|
}, g = async (f) => {
|
|
3660
3660
|
const x = await P.getRevisionPage({
|
|
@@ -3693,8 +3693,8 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3693
3693
|
return {
|
|
3694
3694
|
isRestoring: e,
|
|
3695
3695
|
canRestore: () => r.contrib || r.creator || r.manager,
|
|
3696
|
-
getPageFromRoute: () =>
|
|
3697
|
-
getRevisionFromRoute: () =>
|
|
3696
|
+
getPageFromRoute: () => m,
|
|
3697
|
+
getRevisionFromRoute: () => u,
|
|
3698
3698
|
getPageVersionFromRoute: () => {
|
|
3699
3699
|
var J, w, O, D, L, M, Y, U, l2, j, S2;
|
|
3700
3700
|
const f = !a.versionId;
|
|
@@ -3702,17 +3702,17 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3702
3702
|
isRevision: !!a.versionId,
|
|
3703
3703
|
showComments: f,
|
|
3704
3704
|
data: {
|
|
3705
|
-
...
|
|
3706
|
-
content: ((J =
|
|
3707
|
-
jsonContent: (O =
|
|
3708
|
-
lastContributer: ((D =
|
|
3709
|
-
lastContributerName: ((M =
|
|
3710
|
-
title: ((U =
|
|
3711
|
-
modified: ((j =
|
|
3705
|
+
...m.data,
|
|
3706
|
+
content: ((J = u.data) == null ? void 0 : J.content) ?? ((w = m.data) == null ? void 0 : w.content),
|
|
3707
|
+
jsonContent: (O = u.data) == null ? void 0 : O.jsonContent,
|
|
3708
|
+
lastContributer: ((D = u.data) == null ? void 0 : D.userId) ?? ((L = m.data) == null ? void 0 : L.lastContributer),
|
|
3709
|
+
lastContributerName: ((M = u.data) == null ? void 0 : M.username) ?? ((Y = m.data) == null ? void 0 : Y.lastContributerName),
|
|
3710
|
+
title: ((U = u.data) == null ? void 0 : U.title) ?? ((l2 = m.data) == null ? void 0 : l2.title),
|
|
3711
|
+
modified: ((j = u.data) == null ? void 0 : j.date) ?? ((S2 = m.data) == null ? void 0 : S2.modified)
|
|
3712
3712
|
},
|
|
3713
|
-
isPending:
|
|
3714
|
-
isError:
|
|
3715
|
-
error:
|
|
3713
|
+
isPending: m.isPending || a.versionId && u.isPending,
|
|
3714
|
+
isError: m.isError || u.isError,
|
|
3715
|
+
error: m.error || u.error
|
|
3716
3716
|
};
|
|
3717
3717
|
},
|
|
3718
3718
|
navigateToLatestRevision: C,
|
|
@@ -3732,11 +3732,11 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3732
3732
|
formatDate: c
|
|
3733
3733
|
} = pe(), {
|
|
3734
3734
|
t: l
|
|
3735
|
-
} =
|
|
3735
|
+
} = N("wiki"), {
|
|
3736
3736
|
setOpenRevisionModal: d
|
|
3737
|
-
} = y2(),
|
|
3737
|
+
} = y2(), m = [l("wiki.table.head.author"), l("wiki.table.head.state"), l("wiki.table.head.modificationDate"), l("wiki.table.head.action")], u = t.length === 1 ? e == null ? void 0 : e.find((R) => R._id === t[0]) : void 0, C = t.length === 1 && ((v = e == null ? void 0 : e[0]) == null ? void 0 : v._id) === t[0], p = (u == null ? void 0 : u.isVisible) ?? !1, g = s || t.length !== 1 || !p && !r || C, k = t.length < 2 || t.length > 2;
|
|
3738
3738
|
return {
|
|
3739
|
-
items:
|
|
3739
|
+
items: m,
|
|
3740
3740
|
openVersionsModal: i,
|
|
3741
3741
|
canManage: r,
|
|
3742
3742
|
t: l,
|
|
@@ -3764,8 +3764,8 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3764
3764
|
}), r = s.read && s.contrib && !s.creator && !s.manager, c = r ? n == null ? void 0 : n.filter((x) => x.isVisible) : n, {
|
|
3765
3765
|
selectedItems: l,
|
|
3766
3766
|
allItemsSelected: d,
|
|
3767
|
-
isIndeterminate:
|
|
3768
|
-
handleOnSelectAllItems:
|
|
3767
|
+
isIndeterminate: m,
|
|
3768
|
+
handleOnSelectAllItems: u,
|
|
3769
3769
|
handleOnSelectItem: C
|
|
3770
3770
|
} = Jo(c), {
|
|
3771
3771
|
t: p,
|
|
@@ -3787,7 +3787,7 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3787
3787
|
/* @__PURE__ */ o("div", { className: "mb-24", children: /* @__PURE__ */ o(c0, { type: "info", children: p("wiki.version.modal.alert.invisible") }) }),
|
|
3788
3788
|
n && /* @__PURE__ */ h(d2, { children: [
|
|
3789
3789
|
/* @__PURE__ */ o(d2.Thead, { children: /* @__PURE__ */ h(d2.Tr, { children: [
|
|
3790
|
-
/* @__PURE__ */ o(d2.Th, { children: /* @__PURE__ */ o(I1, { "data-testid": "th-checkbox", className: "m-auto", checked: d, indeterminate:
|
|
3790
|
+
/* @__PURE__ */ o(d2.Th, { children: /* @__PURE__ */ o(I1, { "data-testid": "th-checkbox", className: "m-auto", checked: d, indeterminate: m, onChange: () => u(d) }) }),
|
|
3791
3791
|
g.map((x) => /* @__PURE__ */ o(d2.Th, { children: x }, x))
|
|
3792
3792
|
] }) }),
|
|
3793
3793
|
/* @__PURE__ */ o(d2.Tbody, { children: n == null ? void 0 : n.map((x, J) => {
|
|
@@ -3848,12 +3848,12 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3848
3848
|
findParentNode: e,
|
|
3849
3849
|
find: t
|
|
3850
3850
|
} = zo(), i = (a, r, c, l) => a.map((d) => {
|
|
3851
|
-
const
|
|
3851
|
+
const m = {
|
|
3852
3852
|
...d
|
|
3853
3853
|
};
|
|
3854
|
-
return
|
|
3855
|
-
|
|
3856
|
-
})),
|
|
3854
|
+
return m.children && m.children.length > 0 && (m.children = i(m.children, r, c)), (d.position ?? 0) > (c.position ?? 0) && (m.position = (d.position ?? 0) + 2), d.id === r.id && (m.parentId = l == null ? void 0 : l.id, m.position = (c.position ?? 0) + 1, m.children = r.children, (m.children ?? []).forEach((u, C) => {
|
|
3855
|
+
u.position = (m.position ?? 0) + C;
|
|
3856
|
+
})), m;
|
|
3857
3857
|
});
|
|
3858
3858
|
return {
|
|
3859
3859
|
reorganize: ({
|
|
@@ -3867,29 +3867,29 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3867
3867
|
throw new Error("Current page not found");
|
|
3868
3868
|
if (!d)
|
|
3869
3869
|
throw new Error("Destination page not found");
|
|
3870
|
-
const
|
|
3870
|
+
const m = e(c, r), u = i(c, l, d, m), C = t(u, l.id);
|
|
3871
3871
|
if (C) {
|
|
3872
|
-
const g = e(
|
|
3872
|
+
const g = e(u, l.id);
|
|
3873
3873
|
g && (g.children = (p = g.children) == null ? void 0 : p.filter((y) => y.id !== l.id));
|
|
3874
|
-
const k =
|
|
3875
|
-
if (k !== -1 &&
|
|
3876
|
-
const y = t(
|
|
3874
|
+
const k = u.findIndex((y) => y.id === l.id);
|
|
3875
|
+
if (k !== -1 && u.splice(k, 1), m) {
|
|
3876
|
+
const y = t(u, m == null ? void 0 : m.id);
|
|
3877
3877
|
y && (y.children = [...y.children ?? [], C], C.children && (y.children = y.children.concat(C.children), C.children = []));
|
|
3878
3878
|
} else
|
|
3879
|
-
|
|
3879
|
+
u.push(C);
|
|
3880
3880
|
}
|
|
3881
|
-
return
|
|
3881
|
+
return u;
|
|
3882
3882
|
},
|
|
3883
3883
|
transformToUpdateData: (a) => {
|
|
3884
3884
|
const r = [], c = (l, d) => {
|
|
3885
|
-
var
|
|
3885
|
+
var m;
|
|
3886
3886
|
r.push({
|
|
3887
3887
|
_id: l.id,
|
|
3888
3888
|
// Set parentId to undefined if it is the root (typing need a parentId...)
|
|
3889
3889
|
parentId: (d == null ? void 0 : d.id) ?? void 0,
|
|
3890
3890
|
position: l.position ?? 0,
|
|
3891
3891
|
isVisible: l.isVisible
|
|
3892
|
-
}), (
|
|
3892
|
+
}), (m = l.children) != null && m.length && l.children.forEach((u) => c(u, l));
|
|
3893
3893
|
};
|
|
3894
3894
|
return a.forEach((l) => c(l)), r;
|
|
3895
3895
|
}
|
|
@@ -3936,7 +3936,7 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3936
3936
|
}) => {
|
|
3937
3937
|
const {
|
|
3938
3938
|
t: i
|
|
3939
|
-
} =
|
|
3939
|
+
} = N("wiki"), s = C1(), n = be(), {
|
|
3940
3940
|
data: a,
|
|
3941
3941
|
isLoading: r
|
|
3942
3942
|
} = Re({
|
|
@@ -3950,9 +3950,9 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3950
3950
|
content: !1
|
|
3951
3951
|
}), {
|
|
3952
3952
|
reorganize: d,
|
|
3953
|
-
transformToUpdateData:
|
|
3953
|
+
transformToUpdateData: m
|
|
3954
3954
|
} = Ao(), {
|
|
3955
|
-
handleSortPage:
|
|
3955
|
+
handleSortPage: u
|
|
3956
3956
|
} = ji(e), [C, p] = t2(!1), {
|
|
3957
3957
|
setOpenMoveModal: g
|
|
3958
3958
|
} = y2(), {
|
|
@@ -3965,8 +3965,8 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3965
3965
|
currentPageId: t,
|
|
3966
3966
|
destinationPageId: y,
|
|
3967
3967
|
pages: s
|
|
3968
|
-
}), x =
|
|
3969
|
-
|
|
3968
|
+
}), x = m(f);
|
|
3969
|
+
u(x), g(!1), k({
|
|
3970
3970
|
type: "success",
|
|
3971
3971
|
text: i("wiki.move.success")
|
|
3972
3972
|
});
|
|
@@ -3978,7 +3978,7 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3978
3978
|
} finally {
|
|
3979
3979
|
p(!1);
|
|
3980
3980
|
}
|
|
3981
|
-
}, [y, c, a, s, t, d,
|
|
3981
|
+
}, [y, c, a, s, t, d, m, u, k, i, g]);
|
|
3982
3982
|
return r || l ? /* @__PURE__ */ o(p2, {}) : /* @__PURE__ */ h(G, { id: "duplicate-modal", isOpen: n, size: "lg", onModalClose: () => g(!1), children: [
|
|
3983
3983
|
/* @__PURE__ */ o(G.Header, { onModalClose: () => g(!1), children: i("wiki.move.title", {
|
|
3984
3984
|
name: a == null ? void 0 : a.title
|
|
@@ -4032,8 +4032,8 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4032
4032
|
}), {
|
|
4033
4033
|
theme: d
|
|
4034
4034
|
} = ms(), {
|
|
4035
|
-
t:
|
|
4036
|
-
} =
|
|
4035
|
+
t: m
|
|
4036
|
+
} = N();
|
|
4037
4037
|
return n2(() => {
|
|
4038
4038
|
const C = document.getElementById("theme");
|
|
4039
4039
|
C && (C.href = `${d == null ? void 0 : d.themeUrl}theme.css`);
|
|
@@ -4045,7 +4045,7 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4045
4045
|
minHeight: "100vh",
|
|
4046
4046
|
backgroundColor: "#fff"
|
|
4047
4047
|
}, contentEditable: !1, dangerouslySetInnerHTML: {
|
|
4048
|
-
__html: (l == null ? void 0 : l.content) ??
|
|
4048
|
+
__html: (l == null ? void 0 : l.content) ?? m("wiki.or.page.notfound.or.unauthorized")
|
|
4049
4049
|
} }),
|
|
4050
4050
|
/* @__PURE__ */ h(l0, { fallback: /* @__PURE__ */ o(p2, { position: !1 }), children: [
|
|
4051
4051
|
s && /* @__PURE__ */ o(Zi, {}),
|
|
@@ -4064,7 +4064,7 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4064
4064
|
appCode: i
|
|
4065
4065
|
} = B(), {
|
|
4066
4066
|
t: s
|
|
4067
|
-
} =
|
|
4067
|
+
} = N(i), {
|
|
4068
4068
|
getAvatarURL: n,
|
|
4069
4069
|
getUserbookURL: a
|
|
4070
4070
|
} = ct(), {
|
|
@@ -4101,7 +4101,7 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4101
4101
|
params: i,
|
|
4102
4102
|
request: s
|
|
4103
4103
|
}) => {
|
|
4104
|
-
var
|
|
4104
|
+
var u;
|
|
4105
4105
|
const n = await s.formData(), {
|
|
4106
4106
|
addToastMessage: a
|
|
4107
4107
|
} = D0(), r = J2(n, "isConfirmVisibilityForm"), c = r ? JSON.parse(J2(n, "actionData")) : {
|
|
@@ -4110,7 +4110,7 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4110
4110
|
isHidden: J2(n, "isHidden") === "true"
|
|
4111
4111
|
};
|
|
4112
4112
|
if (!r) {
|
|
4113
|
-
const p = (
|
|
4113
|
+
const p = (u = (await e.ensureQueryData(K.findOne(i.wikiId))).pages) == null ? void 0 : u.find((g) => g._id === i.pageId);
|
|
4114
4114
|
if (p != null && p.children && p.isVisible === c.isHidden)
|
|
4115
4115
|
return ao().setOpenConfirmVisibilityModal(!0), c;
|
|
4116
4116
|
}
|
|
@@ -4136,8 +4136,8 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4136
4136
|
type: "success",
|
|
4137
4137
|
text: "wiki.toast.success.edit.page"
|
|
4138
4138
|
});
|
|
4139
|
-
const d = `/id/${i.wikiId}/page/${i.pageId}`,
|
|
4140
|
-
return te(
|
|
4139
|
+
const d = `/id/${i.wikiId}/page/${i.pageId}`, m = t ? `${d}/${t}` : d;
|
|
4140
|
+
return te(m);
|
|
4141
4141
|
}, No = (e, t) => {
|
|
4142
4142
|
let i = e.pages;
|
|
4143
4143
|
if (t != null && t.beforePageId) {
|
|
@@ -10410,11 +10410,11 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
10410
10410
|
}) : void 0;
|
|
10411
10411
|
return c ? te(`/id/${t.wikiId}/page/${c._id}`) : te(`/id/${t.wikiId}/pages/assistant`);
|
|
10412
10412
|
}, P1 = () => {
|
|
10413
|
-
const [e, t] = t2(!1), i = X(), s = h0(null), n = ve(), a = Se(), r = f1(), c = be(), l = g1(), d = i2(),
|
|
10413
|
+
const [e, t] = t2(!1), i = X(), s = h0(null), n = ve(), a = Se(), r = f1(), c = be(), l = g1(), d = i2(), m = u2(), u = m.comment, C = m.manager || m.creator, {
|
|
10414
10414
|
appCode: p
|
|
10415
10415
|
} = B(), {
|
|
10416
10416
|
t: g
|
|
10417
|
-
} =
|
|
10417
|
+
} = N(p), {
|
|
10418
10418
|
setSelectedNodeId: k
|
|
10419
10419
|
} = xe(), {
|
|
10420
10420
|
getPageVersionFromRoute: y,
|
|
@@ -10497,7 +10497,7 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
10497
10497
|
additionalComments: Oa,
|
|
10498
10498
|
maxReplies: za,
|
|
10499
10499
|
additionalReplies: Aa
|
|
10500
|
-
}, type:
|
|
10500
|
+
}, type: u ? "edit" : "read", rights: m, callbacks: {
|
|
10501
10501
|
post: (s2, z2) => Y(s2, z2),
|
|
10502
10502
|
put: ({
|
|
10503
10503
|
comment: s2,
|
|
@@ -10524,33 +10524,35 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
10524
10524
|
appCode: i
|
|
10525
10525
|
} = B(), {
|
|
10526
10526
|
t: s
|
|
10527
|
-
} =
|
|
10528
|
-
|
|
10529
|
-
|
|
10530
|
-
|
|
10531
|
-
|
|
10527
|
+
} = N(i), {
|
|
10528
|
+
t: n
|
|
10529
|
+
} = N(), {
|
|
10530
|
+
setOpenShareModal: a,
|
|
10531
|
+
setOpenUpdateModal: r,
|
|
10532
|
+
setOpenPrintModal: c
|
|
10533
|
+
} = y2(), l = [{
|
|
10532
10534
|
id: "share",
|
|
10533
|
-
label:
|
|
10535
|
+
label: n("share"),
|
|
10534
10536
|
icon: /* @__PURE__ */ o(Os, {}),
|
|
10535
|
-
action: () =>
|
|
10537
|
+
action: () => a(!0),
|
|
10536
10538
|
visibility: t.manager
|
|
10537
10539
|
}, {
|
|
10538
10540
|
id: "properties",
|
|
10539
|
-
label:
|
|
10541
|
+
label: n("properties"),
|
|
10540
10542
|
icon: /* @__PURE__ */ o(zs, {}),
|
|
10541
|
-
action: () =>
|
|
10543
|
+
action: () => r(!0),
|
|
10542
10544
|
visibility: t.manager
|
|
10543
10545
|
}, {
|
|
10544
10546
|
id: "print",
|
|
10545
|
-
label:
|
|
10547
|
+
label: n("print"),
|
|
10546
10548
|
icon: /* @__PURE__ */ o(Pe, {}),
|
|
10547
|
-
action: () =>
|
|
10549
|
+
action: () => c(!0),
|
|
10548
10550
|
visibility: !0
|
|
10549
10551
|
}];
|
|
10550
|
-
return t.manager ? /* @__PURE__ */ o($, { children: (
|
|
10551
|
-
/* @__PURE__ */ o(Ge, { ...
|
|
10552
|
-
/* @__PURE__ */ o($.Menu, { children: /* @__PURE__ */ o($.MenuGroup, { label: s("wiki.app.actions.dropdown.menugroup.label"), children:
|
|
10553
|
-
] }) }) : e && /* @__PURE__ */ o(Ge, { "data-testid": "print-button", variant: "outline", icon: /* @__PURE__ */ o(Pe, {}), onClick: () =>
|
|
10552
|
+
return t.manager ? /* @__PURE__ */ o($, { children: (m) => /* @__PURE__ */ h("div", { "data-testid": "dropdown", children: [
|
|
10553
|
+
/* @__PURE__ */ o(Ge, { ...m, type: "button", "aria-label": "label", color: "primary", variant: "outline", icon: /* @__PURE__ */ o(Rt, {}) }),
|
|
10554
|
+
/* @__PURE__ */ o($.Menu, { children: /* @__PURE__ */ o($.MenuGroup, { label: s("wiki.app.actions.dropdown.menugroup.label"), children: l.map((u) => /* @__PURE__ */ o(c2, { children: u.type === "divider" ? /* @__PURE__ */ o($.Separator, {}) : u.visibility && /* @__PURE__ */ o($.Item, { icon: u.icon, onClick: () => u.action(null), children: u.label }) }, u.id)) }) })
|
|
10555
|
+
] }) }) : e && /* @__PURE__ */ o(Ge, { "data-testid": "print-button", variant: "outline", icon: /* @__PURE__ */ o(Pe, {}), onClick: () => c(!0) });
|
|
10554
10556
|
}, $o = /* @__PURE__ */ M2(async () => await import("./index3.js")), _o = /* @__PURE__ */ M2(async () => await import("./index4.js")), er = /* @__PURE__ */ M2(async () => await import("./PrintModal.js")), tr = () => {
|
|
10555
10557
|
const e = X(), t = f2(), i = oo(), s = ro(), n = lo(), {
|
|
10556
10558
|
data: a
|
|
@@ -10563,9 +10565,9 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
10563
10565
|
a && (await t.invalidateQueries({
|
|
10564
10566
|
queryKey: K.findOne(a._id).queryKey
|
|
10565
10567
|
}), c(!1));
|
|
10566
|
-
},
|
|
10568
|
+
}, m = !!(a != null && a.pages.some((u) => u.isVisible === !0));
|
|
10567
10569
|
return /* @__PURE__ */ h(c2, { children: [
|
|
10568
|
-
/* @__PURE__ */ o(ps, { render: () => /* @__PURE__ */ o(Xo, { canPrint:
|
|
10570
|
+
/* @__PURE__ */ o(ps, { render: () => /* @__PURE__ */ o(Xo, { canPrint: m }), children: /* @__PURE__ */ o(hs, { app: r, name: a == null ? void 0 : a.title }) }),
|
|
10569
10571
|
/* @__PURE__ */ h(l0, { fallback: /* @__PURE__ */ o(p2, { position: !1 }), children: [
|
|
10570
10572
|
i && a && /* @__PURE__ */ o($o, { mode: "update", isOpen: i, resourceId: a == null ? void 0 : a._id, onCancel: () => c(!1), onSuccess: d }),
|
|
10571
10573
|
s && a && /* @__PURE__ */ o(_o, { isOpen: s, shareOptions: {
|
|
@@ -10595,7 +10597,7 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
10595
10597
|
appCode: n
|
|
10596
10598
|
} = B(), {
|
|
10597
10599
|
t: a
|
|
10598
|
-
} =
|
|
10600
|
+
} = N();
|
|
10599
10601
|
return /* @__PURE__ */ h(G, { id: "CancelModal", onModalClose: t, size: "md", isOpen: e, focusId: "", scrollable: !0, children: [
|
|
10600
10602
|
/* @__PURE__ */ o(G.Header, { onModalClose: t, children: s ? a("wiki.page.create.cancel.title", {
|
|
10601
10603
|
ns: n
|
|
@@ -10634,7 +10636,7 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
10634
10636
|
}, ar = (e) => {
|
|
10635
10637
|
const [t, i] = t2(e == null ? void 0 : e.content), s = ue(), n = X(), a = rt(), {
|
|
10636
10638
|
data: r
|
|
10637
|
-
} = m0(n.wikiId), c = u2(), l = s.pathname.includes("subpage") || !!(e != null && e.parentId), d = !!(e != null && e._id),
|
|
10639
|
+
} = m0(n.wikiId), c = u2(), l = s.pathname.includes("subpage") || !!(e != null && e.parentId), d = !!(e != null && e._id), m = w2(() => {
|
|
10638
10640
|
let D = !1;
|
|
10639
10641
|
if (d)
|
|
10640
10642
|
D = !(e != null && e.isVisible);
|
|
@@ -10645,7 +10647,7 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
10645
10647
|
D = !1;
|
|
10646
10648
|
return D;
|
|
10647
10649
|
}, [e, n, d, l, r]), {
|
|
10648
|
-
control:
|
|
10650
|
+
control: u,
|
|
10649
10651
|
register: C,
|
|
10650
10652
|
setValue: p,
|
|
10651
10653
|
handleSubmit: g,
|
|
@@ -10658,7 +10660,7 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
10658
10660
|
} = m1({
|
|
10659
10661
|
defaultValues: {
|
|
10660
10662
|
title: e == null ? void 0 : e.title,
|
|
10661
|
-
isHidden:
|
|
10663
|
+
isHidden: m(),
|
|
10662
10664
|
content: e == null ? void 0 : e.content
|
|
10663
10665
|
}
|
|
10664
10666
|
});
|
|
@@ -10690,8 +10692,8 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
10690
10692
|
handleSubmit: g,
|
|
10691
10693
|
onSubmit: x,
|
|
10692
10694
|
disableToggle: b,
|
|
10693
|
-
getDefaultHiddenToggleValue:
|
|
10694
|
-
control:
|
|
10695
|
+
getDefaultHiddenToggleValue: m,
|
|
10696
|
+
control: u,
|
|
10695
10697
|
isSubmitting: y,
|
|
10696
10698
|
isDirty: v,
|
|
10697
10699
|
isValid: R,
|
|
@@ -10727,9 +10729,9 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
10727
10729
|
lg: l
|
|
10728
10730
|
} = pt(), {
|
|
10729
10731
|
t: d
|
|
10730
|
-
} =
|
|
10731
|
-
setOpenRevisionModal:
|
|
10732
|
-
setOpenDeleteModal:
|
|
10732
|
+
} = N("wiki"), {
|
|
10733
|
+
setOpenRevisionModal: m,
|
|
10734
|
+
setOpenDeleteModal: u,
|
|
10733
10735
|
setOpenDuplicateModal: C,
|
|
10734
10736
|
setOpenPrintModal: p,
|
|
10735
10737
|
setOpenMoveModal: g
|
|
@@ -10813,7 +10815,7 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
10813
10815
|
leftIcon: /* @__PURE__ */ o(Mt, {}),
|
|
10814
10816
|
children: k.history.desktop,
|
|
10815
10817
|
size: "sm",
|
|
10816
|
-
onClick: () =>
|
|
10818
|
+
onClick: () => m(!0),
|
|
10817
10819
|
disabled: t !== 1,
|
|
10818
10820
|
"aria-label": k.history.responsive
|
|
10819
10821
|
},
|
|
@@ -10845,7 +10847,7 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
10845
10847
|
children: k.delete.desktop,
|
|
10846
10848
|
size: "sm",
|
|
10847
10849
|
disabled: t < 1 || !c,
|
|
10848
|
-
onClick: () =>
|
|
10850
|
+
onClick: () => u(!0),
|
|
10849
10851
|
"aria-label": k.delete.responsive
|
|
10850
10852
|
},
|
|
10851
10853
|
visibility: n ? "hide" : "show",
|
|
@@ -10878,21 +10880,21 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
10878
10880
|
appCode: t
|
|
10879
10881
|
} = B(), {
|
|
10880
10882
|
t: i
|
|
10881
|
-
} =
|
|
10883
|
+
} = N(t), n = is().state === "submitting", {
|
|
10882
10884
|
handleContentChange: a,
|
|
10883
10885
|
register: r,
|
|
10884
10886
|
watch: c,
|
|
10885
10887
|
handleSubmit: l,
|
|
10886
10888
|
onSubmit: d,
|
|
10887
|
-
disableToggle:
|
|
10888
|
-
control:
|
|
10889
|
+
disableToggle: m,
|
|
10890
|
+
control: u,
|
|
10889
10891
|
isDirty: C,
|
|
10890
10892
|
isValid: p,
|
|
10891
10893
|
isManager: g,
|
|
10892
10894
|
PAGE_LABEL: k,
|
|
10893
10895
|
PAGE_PLACEHOLDER: y,
|
|
10894
10896
|
PAGE_SAVE: v
|
|
10895
|
-
} = ar(e), R =
|
|
10897
|
+
} = ar(e), R = m(), {
|
|
10896
10898
|
handleOnButtonCancel: b,
|
|
10897
10899
|
handleClosePage: f,
|
|
10898
10900
|
isBlocked: x,
|
|
@@ -10913,7 +10915,7 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
10913
10915
|
/* @__PURE__ */ o("p", { className: "small text-gray-700 p-2 text-end", children: `${c("title", "").length || 0} / ${Te}` })
|
|
10914
10916
|
] }),
|
|
10915
10917
|
g && /* @__PURE__ */ h(X0, { id: "toggleForm", className: "d-flex mt-24 gap-8", children: [
|
|
10916
|
-
/* @__PURE__ */ o(f0, { control:
|
|
10918
|
+
/* @__PURE__ */ o(f0, { control: u, name: "isHidden", render: ({
|
|
10917
10919
|
field: {
|
|
10918
10920
|
onChange: w,
|
|
10919
10921
|
value: O
|
|
@@ -10943,9 +10945,9 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
10943
10945
|
appCode: n
|
|
10944
10946
|
} = B(), {
|
|
10945
10947
|
t: a
|
|
10946
|
-
} =
|
|
10947
|
-
const
|
|
10948
|
-
return (
|
|
10948
|
+
} = N(n), r = (d = "/") => {
|
|
10949
|
+
const m = ss(d, i.pathname);
|
|
10950
|
+
return (m == null ? void 0 : m.pathname) === i.pathname;
|
|
10949
10951
|
}, c = {
|
|
10950
10952
|
children: a("wiki.pagelist"),
|
|
10951
10953
|
onClick: () => s(`/id/${t.wikiId}/pages`),
|
|
@@ -10970,10 +10972,10 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
10970
10972
|
handleOnMenuClick: l
|
|
10971
10973
|
} = Gi({
|
|
10972
10974
|
onMenuClick: r
|
|
10973
|
-
}), d = (
|
|
10974
|
-
n(`page/${
|
|
10975
|
+
}), d = (m) => {
|
|
10976
|
+
n(`page/${m}/subpage/create`);
|
|
10975
10977
|
};
|
|
10976
|
-
return /* @__PURE__ */ o("div", { className: "dropdown-treeview w-100 mb-16", children: /* @__PURE__ */ o($, { block: !0, children: (
|
|
10978
|
+
return /* @__PURE__ */ o("div", { className: "dropdown-treeview w-100 mb-16", children: /* @__PURE__ */ o($, { block: !0, children: (m, u, C) => /* @__PURE__ */ h(c2, { children: [
|
|
10977
10979
|
/* @__PURE__ */ o($.Trigger, { label: "Pages", icon: /* @__PURE__ */ o(It, {}) }),
|
|
10978
10980
|
/* @__PURE__ */ h($.Menu, { onClick: () => {
|
|
10979
10981
|
C(!1);
|
|
@@ -11005,7 +11007,7 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
11005
11007
|
appCode: i
|
|
11006
11008
|
} = B(), {
|
|
11007
11009
|
t: s
|
|
11008
|
-
} =
|
|
11010
|
+
} = N();
|
|
11009
11011
|
return /* @__PURE__ */ o("div", { className: "d-grid my-16", children: /* @__PURE__ */ o(Z, { variant: "outline", onClick: () => {
|
|
11010
11012
|
e("page/create");
|
|
11011
11013
|
}, leftIcon: /* @__PURE__ */ o(ge, {}), disabled: !!t, children: s("wiki.create.new.page", {
|
|
@@ -11018,7 +11020,7 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
11018
11020
|
appCode: i
|
|
11019
11021
|
} = B(), {
|
|
11020
11022
|
t: s
|
|
11021
|
-
} =
|
|
11023
|
+
} = N(i);
|
|
11022
11024
|
return /* @__PURE__ */ h("div", { className: "d-flex flex-column gap-24 flex-fill align-items-center justify-content-center m-auto", style: e, children: [
|
|
11023
11025
|
/* @__PURE__ */ o(Cs, { imageSrc: dr, imageAlt: "Wiki Image" }),
|
|
11024
11026
|
/* @__PURE__ */ o(l1, { className: "text-secondary mb-16 text-center", level: "h2", children: t ? s("wiki.first.emptyscreen.title.onlyRead", {
|
|
@@ -11041,14 +11043,14 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
11041
11043
|
} = D0(), r = (await e.fetchQuery(Q.findAllFromWiki({
|
|
11042
11044
|
wikiId: t.wikiId,
|
|
11043
11045
|
content: !1
|
|
11044
|
-
})) ?? []).map((C) => C.position ?? 0), c = J2(s, "title"), l = J2(s, "content"), d = J2(s, "isHidden") === "false",
|
|
11046
|
+
})) ?? []).map((C) => C.position ?? 0), c = J2(s, "title"), l = J2(s, "content"), d = J2(s, "isHidden") === "false", m = r.length > 0 ? Math.max(...r) + 1 : 1, u = await P.createPage({
|
|
11045
11047
|
wikiId: t.wikiId,
|
|
11046
11048
|
data: {
|
|
11047
11049
|
title: c,
|
|
11048
11050
|
content: l,
|
|
11049
11051
|
parentId: t.pageId ?? void 0,
|
|
11050
11052
|
isVisible: d,
|
|
11051
|
-
position:
|
|
11053
|
+
position: m
|
|
11052
11054
|
}
|
|
11053
11055
|
});
|
|
11054
11056
|
return await e.invalidateQueries({
|
|
@@ -11058,13 +11060,13 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
11058
11060
|
wikiId: t.wikiId,
|
|
11059
11061
|
content: !1
|
|
11060
11062
|
}).queryKey
|
|
11061
|
-
}),
|
|
11063
|
+
}), u.error ? (n({
|
|
11062
11064
|
type: "error",
|
|
11063
11065
|
text: "wiki.toast.error.save.page"
|
|
11064
11066
|
}), null) : (n({
|
|
11065
11067
|
type: "success",
|
|
11066
11068
|
text: "wiki.toast.success.save.page"
|
|
11067
|
-
}), te(`/id/${t.wikiId}/page/${
|
|
11069
|
+
}), te(`/id/${t.wikiId}/page/${u._id}`));
|
|
11068
11070
|
}, We = () => {
|
|
11069
11071
|
const e = ue();
|
|
11070
11072
|
return /* @__PURE__ */ o(Fi, {}, e.pathname);
|
|
@@ -11091,7 +11093,7 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
11091
11093
|
ids: a
|
|
11092
11094
|
}), e.invalidateQueries();
|
|
11093
11095
|
}, kr = () => {
|
|
11094
|
-
const [e, t] = t2(!1), [i, s] = t2(""), n = X(), a = ue(), r = Hi(), c = Se(), l = ve(), d = f1(),
|
|
11096
|
+
const [e, t] = t2(!1), [i, s] = t2(""), n = X(), a = ue(), r = Hi(), c = Se(), l = ve(), d = f1(), m = be(), u = k1(), C = p0(), {
|
|
11095
11097
|
setSelectedPages: p
|
|
11096
11098
|
} = y2(), {
|
|
11097
11099
|
lg: g
|
|
@@ -11112,10 +11114,10 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
11112
11114
|
pageId: i
|
|
11113
11115
|
}), {
|
|
11114
11116
|
t: f
|
|
11115
|
-
} =
|
|
11117
|
+
} = N("wiki"), {
|
|
11116
11118
|
formatDate: x
|
|
11117
|
-
} = pe(), J = y == null ? void 0 : y.filter((j) => r(j)), w = J ? pr(J) : [], O =
|
|
11118
|
-
selectedPages:
|
|
11119
|
+
} = pe(), J = y == null ? void 0 : y.filter((j) => r(j)), w = J ? pr(J) : [], O = u.length, D = rr({
|
|
11120
|
+
selectedPages: u,
|
|
11119
11121
|
pagesCount: O
|
|
11120
11122
|
});
|
|
11121
11123
|
n2(() => () => {
|
|
@@ -11169,10 +11171,10 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
11169
11171
|
/* @__PURE__ */ h("div", { className: "px-md-16", children: [
|
|
11170
11172
|
/* @__PURE__ */ o(gs, { data: w, items: D, renderNode: g ? U : l2, onSelectedItems: p }),
|
|
11171
11173
|
/* @__PURE__ */ h(l0, { fallback: /* @__PURE__ */ o(p2, { position: !1 }), children: [
|
|
11172
|
-
c && /* @__PURE__ */ o(hr, { pageId:
|
|
11173
|
-
l && /* @__PURE__ */ o(Cr, { selectedPages:
|
|
11174
|
-
d && /* @__PURE__ */ o(x1, { pageId:
|
|
11175
|
-
|
|
11174
|
+
c && /* @__PURE__ */ o(hr, { pageId: u[0] }),
|
|
11175
|
+
l && /* @__PURE__ */ o(Cr, { selectedPages: u }),
|
|
11176
|
+
d && /* @__PURE__ */ o(x1, { pageId: u[0], wikiId: n.wikiId }),
|
|
11177
|
+
m && /* @__PURE__ */ o(M1, { wikiId: n.wikiId, pageId: u[0] }),
|
|
11176
11178
|
e && b && /* @__PURE__ */ o(Tt, { viewsDetails: b, isOpen: e, onModalClose: Y })
|
|
11177
11179
|
] })
|
|
11178
11180
|
] })
|
|
@@ -11189,7 +11191,7 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
11189
11191
|
name: l.title,
|
|
11190
11192
|
isVisible: l.isVisible,
|
|
11191
11193
|
position: l.position,
|
|
11192
|
-
children: ((d = l.children) == null ? void 0 : d.map((
|
|
11194
|
+
children: ((d = l.children) == null ? void 0 : d.map((m) => n(m))) ?? []
|
|
11193
11195
|
};
|
|
11194
11196
|
}, a = fs([n(e)], e._id);
|
|
11195
11197
|
let r = {};
|
|
@@ -11224,7 +11226,7 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
11224
11226
|
} = m0(e.wikiId), {
|
|
11225
11227
|
setTreeData: i
|
|
11226
11228
|
} = xe(), s = Hi(), n = (r) => !r.parentId, a = r1(() => t ? t.pages.filter((r) => n(r) && s(r)).map((r) => {
|
|
11227
|
-
var d,
|
|
11229
|
+
var d, m;
|
|
11228
11230
|
const l = {
|
|
11229
11231
|
id: r._id,
|
|
11230
11232
|
name: r.title,
|
|
@@ -11234,14 +11236,14 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
11234
11236
|
};
|
|
11235
11237
|
if (r.aiMetadata && (l.aiMetadata = {
|
|
11236
11238
|
contentGenerated: ((d = r.aiMetadata) == null ? void 0 : d.contentGenerated) || !1,
|
|
11237
|
-
contentGeneratedDate: ((
|
|
11239
|
+
contentGeneratedDate: ((m = r.aiMetadata) == null ? void 0 : m.contentGeneratedDate) || void 0
|
|
11238
11240
|
}), r.children) {
|
|
11239
|
-
const
|
|
11241
|
+
const u = Yi({
|
|
11240
11242
|
page: r,
|
|
11241
11243
|
filterPage: s,
|
|
11242
11244
|
allPages: t.pages
|
|
11243
11245
|
});
|
|
11244
|
-
delete
|
|
11246
|
+
delete u[r._id], l.children = Object.values(u).slice().sort((C, p) => (C.position ?? 0) - (p.position ?? 0));
|
|
11245
11247
|
}
|
|
11246
11248
|
return l;
|
|
11247
11249
|
}) : [], [t, s]);
|
|
@@ -11302,10 +11304,10 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
11302
11304
|
}, Sr = () => {
|
|
11303
11305
|
var L;
|
|
11304
11306
|
const e = X(), t = i2(), i = C1(), s = Qa(), n = ie("/id/:wikiId"), a = ie("/id/:wikiId/pages/assistant/*"), r = zt("only screen and (max-width: 1024px)"), c = p0(), l = fo(), d = d1(), {
|
|
11305
|
-
handleSortPage:
|
|
11307
|
+
handleSortPage: m
|
|
11306
11308
|
} = ji(e.wikiId), {
|
|
11307
|
-
t:
|
|
11308
|
-
} =
|
|
11309
|
+
t: u
|
|
11310
|
+
} = N("wiki"), {
|
|
11309
11311
|
clearToastMessages: C
|
|
11310
11312
|
} = H0(), {
|
|
11311
11313
|
setSelectedNodeId: p
|
|
@@ -11328,7 +11330,7 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
11328
11330
|
e.pageId ? p(`${e.pageId}`) : p(null);
|
|
11329
11331
|
}, [e.pageId]), n2(() => {
|
|
11330
11332
|
l.forEach((M) => {
|
|
11331
|
-
M.type === "success" ? d.success(
|
|
11333
|
+
M.type === "success" ? d.success(u(M.text)) : M.type === "error" && d.error(u(M.text));
|
|
11332
11334
|
}), l.length > 0 && C();
|
|
11333
11335
|
}, [l, C, d]), n2(() => {
|
|
11334
11336
|
const M = setInterval(() => {
|
|
@@ -11369,7 +11371,7 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
11369
11371
|
U.stopPropagation(), J(M.id);
|
|
11370
11372
|
}, children: /* @__PURE__ */ o(ge, { height: 16, width: 16 }) })
|
|
11371
11373
|
] })
|
|
11372
|
-
] }), onSortable: (M) =>
|
|
11374
|
+
] }), onSortable: (M) => m(M), onTreeItemClick: x, isDisabled: () => c })
|
|
11373
11375
|
] }),
|
|
11374
11376
|
/* @__PURE__ */ h(_.Col, { sm: "4", md: "8", lg: a ? "8" : "6", xl: a ? "12" : "9", className: h2({
|
|
11375
11377
|
"mt-16 mt-lg-0 mx-lg-0": r,
|
|
@@ -11389,7 +11391,7 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
11389
11391
|
appCode: e
|
|
11390
11392
|
} = B(), {
|
|
11391
11393
|
t
|
|
11392
|
-
} =
|
|
11394
|
+
} = N(), i = i2(), s = X(), n = () => {
|
|
11393
11395
|
i(`/id/${s.wikiId}/page/create`);
|
|
11394
11396
|
};
|
|
11395
11397
|
return /* @__PURE__ */ h(F, { children: [
|
|
@@ -11424,7 +11426,7 @@ const Lr = () => {
|
|
|
11424
11426
|
appCode: e
|
|
11425
11427
|
} = B(), {
|
|
11426
11428
|
t
|
|
11427
|
-
} =
|
|
11429
|
+
} = N(), i = i2(), s = () => {
|
|
11428
11430
|
i("ai/step1Form");
|
|
11429
11431
|
};
|
|
11430
11432
|
return /* @__PURE__ */ h(F, { className: "ai-border-gradient", children: [
|
|
@@ -11449,7 +11451,7 @@ const Lr = () => {
|
|
|
11449
11451
|
appCode: e
|
|
11450
11452
|
} = B(), {
|
|
11451
11453
|
t
|
|
11452
|
-
} =
|
|
11454
|
+
} = N(), i = gt(), s = () => {
|
|
11453
11455
|
i && window.open(i, "_blank");
|
|
11454
11456
|
};
|
|
11455
11457
|
return /* @__PURE__ */ h(F, { children: [
|
|
@@ -11503,18 +11505,18 @@ const K1 = "import-pdf", Jr = (e) => ({
|
|
|
11503
11505
|
appCode: n
|
|
11504
11506
|
} = B(), {
|
|
11505
11507
|
t: a
|
|
11506
|
-
} =
|
|
11508
|
+
} = N(), r = d1();
|
|
11507
11509
|
n2(() => {
|
|
11508
|
-
var
|
|
11509
|
-
const
|
|
11510
|
-
t((p) => p ===
|
|
11510
|
+
var u, C;
|
|
11511
|
+
const m = (C = (u = i == null ? void 0 : i.votes) == null ? void 0 : u.find((p) => p.userId === (s == null ? void 0 : s.userId))) == null ? void 0 : C.vote;
|
|
11512
|
+
t((p) => p === m ? p : m);
|
|
11511
11513
|
}, [i, s]);
|
|
11512
|
-
const c = async (
|
|
11514
|
+
const c = async (m) => {
|
|
11513
11515
|
await Pi.submitPollVote(K1, {
|
|
11514
|
-
vote:
|
|
11516
|
+
vote: m
|
|
11515
11517
|
}), r.success(a("wiki.assistant.card.import.voteRecorded", {
|
|
11516
11518
|
ns: n
|
|
11517
|
-
})), t(
|
|
11519
|
+
})), t(m);
|
|
11518
11520
|
}, l = () => {
|
|
11519
11521
|
c(g0.YES);
|
|
11520
11522
|
}, d = () => {
|
|
@@ -11548,7 +11550,7 @@ const K1 = "import-pdf", Jr = (e) => ({
|
|
|
11548
11550
|
appCode: e
|
|
11549
11551
|
} = B(), {
|
|
11550
11552
|
t
|
|
11551
|
-
} =
|
|
11553
|
+
} = N(), i = gt(), s = xs(Za.generate), n = u2();
|
|
11552
11554
|
if (!n.manager && !n.creator && !n.contrib)
|
|
11553
11555
|
throw new Error("Unauthorized access to Pages Assistant");
|
|
11554
11556
|
return /* @__PURE__ */ o(V, { justify: "center", children: /* @__PURE__ */ o("div", { className: "col-12 col-md-10 col-lg-8", children: /* @__PURE__ */ h("div", { className: "pages-assistant-wrapper my-40", children: [
|
|
@@ -11930,13 +11932,13 @@ const v1 = () => b1((e) => e.formValues), Dr = () => b1((e) => e.pagesStructure)
|
|
|
11930
11932
|
image: r,
|
|
11931
11933
|
...c
|
|
11932
11934
|
}, l) => {
|
|
11933
|
-
const d = e === t,
|
|
11935
|
+
const d = e === t, m = r ? "start" : "center", u = (C) => {
|
|
11934
11936
|
if (C.key === "Enter") {
|
|
11935
11937
|
const p = C.currentTarget.querySelector('input[type="radio"]');
|
|
11936
11938
|
p && p.click();
|
|
11937
11939
|
}
|
|
11938
11940
|
};
|
|
11939
|
-
return /* @__PURE__ */ o("label", { ref: l, role: "button", tabIndex: 0, className: h2("simple-radio-card-container", "border border-2 rounded-3", "w-100", d && "selected", d && "border-secondary", d && "bg-blue-200", !d && "border-gray-300", !d && "bg-gray-200", c.className), onKeyDown:
|
|
11941
|
+
return /* @__PURE__ */ o("label", { ref: l, role: "button", tabIndex: 0, className: h2("simple-radio-card-container", "border border-2 rounded-3", "w-100", d && "selected", d && "border-secondary", d && "bg-blue-200", !d && "border-gray-300", !d && "bg-gray-200", c.className), onKeyDown: u, ...c, children: /* @__PURE__ */ h(V, { justify: m, align: "center", gap: "8", className: "p-8 w-100", children: [
|
|
11940
11942
|
r && /* @__PURE__ */ o("img", { src: r, alt: t, style: {
|
|
11941
11943
|
width: "48px",
|
|
11942
11944
|
height: "48px"
|
|
@@ -11962,7 +11964,7 @@ const Vi = (e) => {
|
|
|
11962
11964
|
appCode: e
|
|
11963
11965
|
} = B(), {
|
|
11964
11966
|
t
|
|
11965
|
-
} =
|
|
11967
|
+
} = N(), i = i2(), s = X(), {
|
|
11966
11968
|
collegeLevels: n,
|
|
11967
11969
|
lyceeLevels: a
|
|
11968
11970
|
} = Qi(), r = v1(), {
|
|
@@ -11970,8 +11972,8 @@ const Vi = (e) => {
|
|
|
11970
11972
|
} = Je(), {
|
|
11971
11973
|
handleSubmit: l,
|
|
11972
11974
|
setValue: d,
|
|
11973
|
-
watch:
|
|
11974
|
-
control:
|
|
11975
|
+
watch: m,
|
|
11976
|
+
control: u,
|
|
11975
11977
|
formState: {
|
|
11976
11978
|
isValid: C
|
|
11977
11979
|
}
|
|
@@ -11980,7 +11982,7 @@ const Vi = (e) => {
|
|
|
11980
11982
|
level: r.level || "6ème",
|
|
11981
11983
|
subject: r.subject || ""
|
|
11982
11984
|
}
|
|
11983
|
-
}), p =
|
|
11985
|
+
}), p = m("level"), {
|
|
11984
11986
|
subjects: g
|
|
11985
11987
|
} = Vi(p), k = async (b) => {
|
|
11986
11988
|
c({
|
|
@@ -12015,7 +12017,7 @@ const Vi = (e) => {
|
|
|
12015
12017
|
/* @__PURE__ */ o("p", { className: "fw-bold pb-8", children: t("wiki.assistant.ai.step1.level.college", {
|
|
12016
12018
|
ns: e
|
|
12017
12019
|
}) }),
|
|
12018
|
-
/* @__PURE__ */ o(V, { gap: "8", children: n.map((b, f) => /* @__PURE__ */ o(f0, { name: "level", control:
|
|
12020
|
+
/* @__PURE__ */ o(V, { gap: "8", children: n.map((b, f) => /* @__PURE__ */ o(f0, { name: "level", control: u, rules: {
|
|
12019
12021
|
required: !0
|
|
12020
12022
|
}, render: ({
|
|
12021
12023
|
field: {
|
|
@@ -12030,7 +12032,7 @@ const Vi = (e) => {
|
|
|
12030
12032
|
/* @__PURE__ */ o("p", { className: "fw-bold pb-8", children: t("wiki.assistant.ai.step1.level.lycee", {
|
|
12031
12033
|
ns: e
|
|
12032
12034
|
}) }),
|
|
12033
|
-
/* @__PURE__ */ o(V, { gap: "8", children: a.map((b, f) => /* @__PURE__ */ o(f0, { name: "level", control:
|
|
12035
|
+
/* @__PURE__ */ o(V, { gap: "8", children: a.map((b, f) => /* @__PURE__ */ o(f0, { name: "level", control: u, rules: {
|
|
12034
12036
|
required: !0
|
|
12035
12037
|
}, render: ({
|
|
12036
12038
|
field: {
|
|
@@ -12047,7 +12049,7 @@ const Vi = (e) => {
|
|
|
12047
12049
|
/* @__PURE__ */ o("h3", { className: "mb-12", children: t("wiki.assistant.ai.step1.subject", {
|
|
12048
12050
|
ns: e
|
|
12049
12051
|
}) }),
|
|
12050
|
-
/* @__PURE__ */ o(_, { className: "gap-12", children: g.map((b, f) => /* @__PURE__ */ o(_.Col, { sm: "2", md: "4", lg: "4", xl: "4", children: /* @__PURE__ */ o(f0, { name: "subject", control:
|
|
12052
|
+
/* @__PURE__ */ o(_, { className: "gap-12", children: g.map((b, f) => /* @__PURE__ */ o(_.Col, { sm: "2", md: "4", lg: "4", xl: "4", children: /* @__PURE__ */ o(f0, { name: "subject", control: u, rules: {
|
|
12051
12053
|
required: !0
|
|
12052
12054
|
}, render: ({
|
|
12053
12055
|
field: {
|
|
@@ -12083,21 +12085,21 @@ const Vi = (e) => {
|
|
|
12083
12085
|
appCode: n
|
|
12084
12086
|
} = B(), {
|
|
12085
12087
|
t: a
|
|
12086
|
-
} =
|
|
12088
|
+
} = N(), {
|
|
12087
12089
|
setPagesStructure: r
|
|
12088
12090
|
} = Je(), c = v1();
|
|
12089
12091
|
return n2(() => {
|
|
12090
12092
|
let l = null;
|
|
12091
12093
|
return (async () => {
|
|
12092
12094
|
t(!0);
|
|
12093
|
-
const
|
|
12095
|
+
const m = {
|
|
12094
12096
|
...c,
|
|
12095
12097
|
wikiId: s.wikiId || ""
|
|
12096
12098
|
};
|
|
12097
|
-
await Yr.generate(
|
|
12099
|
+
await Yr.generate(m), l = setInterval(async () => {
|
|
12098
12100
|
var C;
|
|
12099
|
-
const
|
|
12100
|
-
(C =
|
|
12101
|
+
const u = await W.http().get(`/wiki/${s.wikiId}`);
|
|
12102
|
+
(C = u.aiMetadata) != null && C.structureGenerated && (l && clearInterval(l), t(!1), r(u.pages.map((p) => ({
|
|
12101
12103
|
title: p.title
|
|
12102
12104
|
}))), i(`/id/${s.wikiId}/pages/assistant/ai/step4StructureResult`));
|
|
12103
12105
|
}, 3e3);
|
|
@@ -12129,9 +12131,9 @@ const Vi = (e) => {
|
|
|
12129
12131
|
appCode: n
|
|
12130
12132
|
} = B(), {
|
|
12131
12133
|
t: a
|
|
12132
|
-
} =
|
|
12134
|
+
} = N(), r = Dr(), {
|
|
12133
12135
|
setFormValues: c
|
|
12134
|
-
} = Je(), l = X(), d = i2(),
|
|
12136
|
+
} = Je(), l = X(), d = i2(), m = f2();
|
|
12135
12137
|
n2(() => {
|
|
12136
12138
|
const p = setInterval(async () => {
|
|
12137
12139
|
var k;
|
|
@@ -12142,7 +12144,7 @@ const Vi = (e) => {
|
|
|
12142
12144
|
p && clearInterval(p);
|
|
12143
12145
|
};
|
|
12144
12146
|
}, []);
|
|
12145
|
-
const
|
|
12147
|
+
const u = () => {
|
|
12146
12148
|
c({
|
|
12147
12149
|
level: "",
|
|
12148
12150
|
subject: "",
|
|
@@ -12156,9 +12158,9 @@ const Vi = (e) => {
|
|
|
12156
12158
|
subject: "",
|
|
12157
12159
|
sequence: "",
|
|
12158
12160
|
keywords: ""
|
|
12159
|
-
}), await
|
|
12161
|
+
}), await m.invalidateQueries({
|
|
12160
12162
|
queryKey: K.findOne(l.wikiId).queryKey
|
|
12161
|
-
}), await
|
|
12163
|
+
}), await m.fetchQuery(K.findOne(l.wikiId)), (p = i == null ? void 0 : i.pages) != null && p.length ? d(`/id/${l.wikiId}/page/${i.pages[0]._id}`) : d(`/id/${l.wikiId}`));
|
|
12162
12164
|
};
|
|
12163
12165
|
return /* @__PURE__ */ o(V, { justify: "center", children: /* @__PURE__ */ o("div", { className: "col-12 col-md-10 col-lg-8", children: /* @__PURE__ */ h("div", { className: "my-24", children: [
|
|
12164
12166
|
/* @__PURE__ */ o(he, { currentStep: 2, nbSteps: 3 }),
|
|
@@ -12209,7 +12211,7 @@ const Vi = (e) => {
|
|
|
12209
12211
|
}) })
|
|
12210
12212
|
] }),
|
|
12211
12213
|
/* @__PURE__ */ h(V, { justify: "end", align: "center", gap: "16", className: "loading", children: [
|
|
12212
|
-
/* @__PURE__ */ o(Z, { variant: "ghost", color: "tertiary", onClick:
|
|
12214
|
+
/* @__PURE__ */ o(Z, { variant: "ghost", color: "tertiary", onClick: u, children: a("cancel") }),
|
|
12213
12215
|
!e && /* @__PURE__ */ o(de, { leftIcon: /* @__PURE__ */ o(Jt, { color: "#C232AA" }), disabled: !0 }),
|
|
12214
12216
|
e && /* @__PURE__ */ o(de, { onClick: C, rightIcon: /* @__PURE__ */ o(Fs, { color: "#ECBE30" }), children: a("wiki.assistant.ai.step4.structure.result.wait.button.finished", {
|
|
12215
12217
|
ns: n
|
|
@@ -12223,7 +12225,7 @@ const Vi = (e) => {
|
|
|
12223
12225
|
appCode: e
|
|
12224
12226
|
} = B(), {
|
|
12225
12227
|
t
|
|
12226
|
-
} =
|
|
12228
|
+
} = N(), i = i2(), s = X(), n = v1(), {
|
|
12227
12229
|
subjects: a
|
|
12228
12230
|
} = Vi(n.level), {
|
|
12229
12231
|
setFormValues: r
|
|
@@ -12231,9 +12233,9 @@ const Vi = (e) => {
|
|
|
12231
12233
|
watch: c,
|
|
12232
12234
|
handleSubmit: l,
|
|
12233
12235
|
register: d,
|
|
12234
|
-
control:
|
|
12236
|
+
control: m,
|
|
12235
12237
|
formState: {
|
|
12236
|
-
isValid:
|
|
12238
|
+
isValid: u
|
|
12237
12239
|
}
|
|
12238
12240
|
} = m1({
|
|
12239
12241
|
defaultValues: {
|
|
@@ -12270,7 +12272,7 @@ const Vi = (e) => {
|
|
|
12270
12272
|
/* @__PURE__ */ o("h3", { className: "mb-12", children: t("wiki.assistant.ai.step1.sequence", {
|
|
12271
12273
|
ns: e
|
|
12272
12274
|
}) }),
|
|
12273
|
-
/* @__PURE__ */ o(f0, { name: "sequence", control:
|
|
12275
|
+
/* @__PURE__ */ o(f0, { name: "sequence", control: m, rules: {
|
|
12274
12276
|
required: !0
|
|
12275
12277
|
}, render: ({
|
|
12276
12278
|
field: {
|
|
@@ -12311,7 +12313,7 @@ const Vi = (e) => {
|
|
|
12311
12313
|
] }),
|
|
12312
12314
|
/* @__PURE__ */ o("div", { children: /* @__PURE__ */ h(V, { className: "mt-auto", justify: "end", children: [
|
|
12313
12315
|
/* @__PURE__ */ o(Z, { variant: "ghost", color: "tertiary", leftIcon: /* @__PURE__ */ o(wt, {}), onClick: g, children: t("previous") }),
|
|
12314
|
-
/* @__PURE__ */ o(Z, { type: "submit", rightIcon: /* @__PURE__ */ o(Ot, {}), disabled: !
|
|
12316
|
+
/* @__PURE__ */ o(Z, { type: "submit", rightIcon: /* @__PURE__ */ o(Ot, {}), disabled: !u, children: t("next") })
|
|
12315
12317
|
] }) })
|
|
12316
12318
|
] }, "wikiAIForm") })
|
|
12317
12319
|
] }) }) });
|
|
@@ -12389,12 +12391,12 @@ const Vi = (e) => {
|
|
|
12389
12391
|
additionalActions: i,
|
|
12390
12392
|
className: s
|
|
12391
12393
|
}) => {
|
|
12392
|
-
const n = h0(null), a = h0(null), r = h0(null), c = h0(process.env.NODE_ENV === "development"), l = (d,
|
|
12393
|
-
const p =
|
|
12394
|
-
...
|
|
12394
|
+
const n = h0(null), a = h0(null), r = h0(null), c = h0(process.env.NODE_ENV === "development"), l = (d, m = "wiki") => d.map((u, C) => {
|
|
12395
|
+
const p = u.id ?? `${m}-${u.path ?? "root"}-${C}`, g = {
|
|
12396
|
+
...u,
|
|
12395
12397
|
id: p
|
|
12396
12398
|
};
|
|
12397
|
-
return
|
|
12399
|
+
return u.children && (g.children = l(u.children, p)), g;
|
|
12398
12400
|
});
|
|
12399
12401
|
return n2(() => {
|
|
12400
12402
|
if (n.current)
|