@fileverse-dev/ddoc 2.2.9-patch-6 → 2.2.9-tocfix-1
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/README.md
CHANGED
@@ -124,6 +124,14 @@ The `DdocProps` interface is a TypeScript interface that defines the properties
|
|
124
124
|
| `setShowTOC` | `React.Dispatch<SetStateAction<boolean>>` | Function to toggle TOC |
|
125
125
|
| `proExtensions` | `{ TableOfContents: any, [key: string]: any }` | Pro feature extensions |
|
126
126
|
|
127
|
+
## AI Writer Props
|
128
|
+
|
129
|
+
| Property | Type | Description |
|
130
|
+
| ------------------ | --------- | ---------------------------------------------- |
|
131
|
+
| `activeModel` | `CustomModel` | Currently selected AI model for text generation |
|
132
|
+
| `maxTokens` | `number` | Maximum token limit for AI-generated content |
|
133
|
+
| `isAIAgentEnabled` | `boolean` | Toggle for AI agent functionality |
|
134
|
+
|
127
135
|
### Steps to run this example locally
|
128
136
|
|
129
137
|
- `npm i`
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { B as p, g as m, s as w, d as k, i as b, l as L, a as O, c as E, b as x, e as R, H as y, f as M } from "./index-
|
1
|
+
import { B as p, g as m, s as w, d as k, i as b, l as L, a as O, c as E, b as x, e as R, H as y, f as M } from "./index-COanRpp1.mjs";
|
2
2
|
class S extends p {
|
3
3
|
constructor({ callbackSelector: r, cause: a, data: n, extraData: i, sender: f, urls: t }) {
|
4
4
|
var o;
|
@@ -2,7 +2,7 @@ var lie = Object.defineProperty;
|
|
2
2
|
var cie = (e, t, n) => t in e ? lie(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
3
3
|
var bi = (e, t, n) => cie(e, typeof t != "symbol" ? t + "" : t, n);
|
4
4
|
import * as N from "react";
|
5
|
-
import ke, { createContext as hn, useContext as Et, useRef as
|
5
|
+
import ke, { createContext as hn, useContext as Et, useRef as Xe, useState as Re, useDebugValue as xw, useEffect as _e, forwardRef as gn, createElement as Ue, useCallback as Pe, useLayoutEffect as bs, memo as Ld, useMemo as Nt, useId as Nd, Children as Kz, isValidElement as Yz, useInsertionEffect as P3, createRef as Tl, Fragment as z1, Suspense as uie, Component as vw, cloneElement as $z, useImperativeHandle as Jz } from "react";
|
6
6
|
import * as E2 from "react-dom";
|
7
7
|
import kw, { flushSync as die, createPortal as Qz } from "react-dom";
|
8
8
|
var Hr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
@@ -265,14 +265,14 @@ function hie() {
|
|
265
265
|
} catch (pt) {
|
266
266
|
if (pt && We && typeof pt.stack == "string") {
|
267
267
|
for (var it = pt.stack.split(`
|
268
|
-
`),
|
269
|
-
`), ae = it.length - 1, Ne =
|
268
|
+
`), et = We.stack.split(`
|
269
|
+
`), ae = it.length - 1, Ne = et.length - 1; ae >= 1 && Ne >= 0 && it[ae] !== et[Ne]; )
|
270
270
|
Ne--;
|
271
271
|
for (; ae >= 1 && Ne >= 0; ae--, Ne--)
|
272
|
-
if (it[ae] !==
|
272
|
+
if (it[ae] !== et[Ne]) {
|
273
273
|
if (ae !== 1 || Ne !== 1)
|
274
274
|
do
|
275
|
-
if (ae--, Ne--, Ne < 0 || it[ae] !==
|
275
|
+
if (ae--, Ne--, Ne < 0 || it[ae] !== et[Ne]) {
|
276
276
|
var Oe = `
|
277
277
|
` + it[ae].replace(" at new ", " at ");
|
278
278
|
return P.displayName && Oe.includes("<anonymous>") && (Oe = Oe.replace("<anonymous>", P.displayName)), typeof P == "function" && be.set(P, Oe), Oe;
|
@@ -339,8 +339,8 @@ function hie() {
|
|
339
339
|
var it = void 0;
|
340
340
|
try {
|
341
341
|
if (typeof P[at] != "function") {
|
342
|
-
var
|
343
|
-
throw
|
342
|
+
var et = Error((We || "React class") + ": " + Se + " type `" + at + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof P[at] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
343
|
+
throw et.name = "Invariant Violation", et;
|
344
344
|
}
|
345
345
|
it = P[at](ye, at, We, Se, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
346
346
|
} catch (ae) {
|
@@ -452,8 +452,8 @@ function hie() {
|
|
452
452
|
};
|
453
453
|
function Ke(P, ye, Se, We, ft) {
|
454
454
|
{
|
455
|
-
var yt, at = {}, it = null,
|
456
|
-
Se !== void 0 && (pe(Se), it = "" + Se), Qe(ye) && (pe(ye.key), it = "" + ye.key), Le(ye) && (
|
455
|
+
var yt, at = {}, it = null, et = null;
|
456
|
+
Se !== void 0 && (pe(Se), it = "" + Se), Qe(ye) && (pe(ye.key), it = "" + ye.key), Le(ye) && (et = ye.ref, vt(ye, ft));
|
457
457
|
for (yt in ye)
|
458
458
|
$.call(ye, yt) && !xe.hasOwnProperty(yt) && (at[yt] = ye[yt]);
|
459
459
|
if (P && P.defaultProps) {
|
@@ -461,11 +461,11 @@ function hie() {
|
|
461
461
|
for (yt in ae)
|
462
462
|
at[yt] === void 0 && (at[yt] = ae[yt]);
|
463
463
|
}
|
464
|
-
if (it ||
|
464
|
+
if (it || et) {
|
465
465
|
var Ne = typeof P == "function" ? P.displayName || P.name || "Unknown" : P;
|
466
|
-
it && we(at, Ne),
|
466
|
+
it && we(at, Ne), et && He(at, Ne);
|
467
467
|
}
|
468
|
-
return Ee(P, it,
|
468
|
+
return Ee(P, it, et, ft, We, ce.current, at);
|
469
469
|
}
|
470
470
|
}
|
471
471
|
var Je = b.ReactCurrentOwner, Be = b.ReactDebugCurrentFrame;
|
@@ -585,8 +585,8 @@ Check the top-level render call using <` + Se + ">.");
|
|
585
585
|
if (!at) {
|
586
586
|
var it = "";
|
587
587
|
(P === void 0 || typeof P == "object" && P !== null && Object.keys(P).length === 0) && (it += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
588
|
-
var
|
589
|
-
|
588
|
+
var et = Ht();
|
589
|
+
et ? it += et : it += Bt();
|
590
590
|
var ae;
|
591
591
|
P === null ? ae = "null" : B(P) ? ae = "array" : P !== void 0 && P.$$typeof === t ? (ae = "<" + (U(P.type) || "Unknown") + " />", it = " Did you accidentally export a JSX literal instead of a component?") : ae = typeof P, k("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", ae, it);
|
592
592
|
}
|
@@ -15294,7 +15294,7 @@ class Xue {
|
|
15294
15294
|
}
|
15295
15295
|
}
|
15296
15296
|
function iF(e = {}, t = []) {
|
15297
|
-
const n =
|
15297
|
+
const n = Xe(e);
|
15298
15298
|
n.current = e;
|
15299
15299
|
const [r] = Re(() => new Xue(n)), o = rb.useSyncExternalStore(r.subscribe, r.getEditor, r.getServerSnapshot);
|
15300
15300
|
return xw(o), _e(r.onRender(t)), sH({
|
@@ -15838,14 +15838,14 @@ function s0e() {
|
|
15838
15838
|
} catch (pt) {
|
15839
15839
|
if (pt && We && typeof pt.stack == "string") {
|
15840
15840
|
for (var it = pt.stack.split(`
|
15841
|
-
`),
|
15842
|
-
`), ae = it.length - 1, Ne =
|
15841
|
+
`), et = We.stack.split(`
|
15842
|
+
`), ae = it.length - 1, Ne = et.length - 1; ae >= 1 && Ne >= 0 && it[ae] !== et[Ne]; )
|
15843
15843
|
Ne--;
|
15844
15844
|
for (; ae >= 1 && Ne >= 0; ae--, Ne--)
|
15845
|
-
if (it[ae] !==
|
15845
|
+
if (it[ae] !== et[Ne]) {
|
15846
15846
|
if (ae !== 1 || Ne !== 1)
|
15847
15847
|
do
|
15848
|
-
if (ae--, Ne--, Ne < 0 || it[ae] !==
|
15848
|
+
if (ae--, Ne--, Ne < 0 || it[ae] !== et[Ne]) {
|
15849
15849
|
var Oe = `
|
15850
15850
|
` + it[ae].replace(" at new ", " at ");
|
15851
15851
|
return P.displayName && Oe.includes("<anonymous>") && (Oe = Oe.replace("<anonymous>", P.displayName)), typeof P == "function" && be.set(P, Oe), Oe;
|
@@ -15912,8 +15912,8 @@ function s0e() {
|
|
15912
15912
|
var it = void 0;
|
15913
15913
|
try {
|
15914
15914
|
if (typeof P[at] != "function") {
|
15915
|
-
var
|
15916
|
-
throw
|
15915
|
+
var et = Error((We || "React class") + ": " + Se + " type `" + at + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof P[at] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
15916
|
+
throw et.name = "Invariant Violation", et;
|
15917
15917
|
}
|
15918
15918
|
it = P[at](ye, at, We, Se, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
15919
15919
|
} catch (ae) {
|
@@ -16025,8 +16025,8 @@ function s0e() {
|
|
16025
16025
|
};
|
16026
16026
|
function Ke(P, ye, Se, We, ft) {
|
16027
16027
|
{
|
16028
|
-
var yt, at = {}, it = null,
|
16029
|
-
Se !== void 0 && (pe(Se), it = "" + Se), Qe(ye) && (pe(ye.key), it = "" + ye.key), Le(ye) && (
|
16028
|
+
var yt, at = {}, it = null, et = null;
|
16029
|
+
Se !== void 0 && (pe(Se), it = "" + Se), Qe(ye) && (pe(ye.key), it = "" + ye.key), Le(ye) && (et = ye.ref, vt(ye));
|
16030
16030
|
for (yt in ye)
|
16031
16031
|
$.call(ye, yt) && !xe.hasOwnProperty(yt) && (at[yt] = ye[yt]);
|
16032
16032
|
if (P && P.defaultProps) {
|
@@ -16034,11 +16034,11 @@ function s0e() {
|
|
16034
16034
|
for (yt in ae)
|
16035
16035
|
at[yt] === void 0 && (at[yt] = ae[yt]);
|
16036
16036
|
}
|
16037
|
-
if (it ||
|
16037
|
+
if (it || et) {
|
16038
16038
|
var Ne = typeof P == "function" ? P.displayName || P.name || "Unknown" : P;
|
16039
|
-
it && we(at, Ne),
|
16039
|
+
it && we(at, Ne), et && He(at, Ne);
|
16040
16040
|
}
|
16041
|
-
return Ee(P, it,
|
16041
|
+
return Ee(P, it, et, ft, We, ce.current, at);
|
16042
16042
|
}
|
16043
16043
|
}
|
16044
16044
|
var Je = b.ReactCurrentOwner, Be = b.ReactDebugCurrentFrame;
|
@@ -16158,8 +16158,8 @@ Check the top-level render call using <` + Se + ">.");
|
|
16158
16158
|
if (!at) {
|
16159
16159
|
var it = "";
|
16160
16160
|
(P === void 0 || typeof P == "object" && P !== null && Object.keys(P).length === 0) && (it += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
16161
|
-
var
|
16162
|
-
|
16161
|
+
var et = Ht();
|
16162
|
+
et ? it += et : it += Bt();
|
16163
16163
|
var ae;
|
16164
16164
|
P === null ? ae = "null" : B(P) ? ae = "array" : P !== void 0 && P.$$typeof === t ? (ae = "<" + (U(P.type) || "Unknown") + " />", it = " Did you accidentally export a JSX literal instead of a component?") : ae = typeof P, k("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", ae, it);
|
16165
16165
|
}
|
@@ -46087,7 +46087,7 @@ function wlt(e) {
|
|
46087
46087
|
var dq = rq, Flt = oq, Mlt = iq, Clt = aq, Elt = sq, Alt = uq;
|
46088
46088
|
const EF = hn({});
|
46089
46089
|
function AF(e) {
|
46090
|
-
const t =
|
46090
|
+
const t = Xe(null);
|
46091
46091
|
return t.current === null && (t.current = e()), t.current;
|
46092
46092
|
}
|
46093
46093
|
const pb = hn(null), jF = hn({
|
@@ -46114,7 +46114,7 @@ class jlt extends N.Component {
|
|
46114
46114
|
}
|
46115
46115
|
}
|
46116
46116
|
function Dlt({ children: e, isPresent: t }) {
|
46117
|
-
const n = Nd(), r =
|
46117
|
+
const n = Nd(), r = Xe(null), o = Xe({
|
46118
46118
|
width: 0,
|
46119
46119
|
height: 0,
|
46120
46120
|
top: 0,
|
@@ -46190,7 +46190,7 @@ function ES(e) {
|
|
46190
46190
|
}), t;
|
46191
46191
|
}
|
46192
46192
|
const DF = typeof window < "u", hq = DF ? bs : _e, Llt = ({ children: e, custom: t, initial: n = !0, onExitComplete: r, presenceAffectsLayout: o = !0, mode: i = "sync", propagate: a = !1 }) => {
|
46193
|
-
const [s, l] = fq(a), c = Nt(() => ES(e), [e]), u = a && !s ? [] : c.map(Vg), d =
|
46193
|
+
const [s, l] = fq(a), c = Nt(() => ES(e), [e]), u = a && !s ? [] : c.map(Vg), d = Xe(!0), f = Xe(c), h = AF(() => /* @__PURE__ */ new Map()), [p, g] = Re(c), [m, b] = Re(c);
|
46194
46194
|
hq(() => {
|
46195
46195
|
d.current = !1, f.current = c;
|
46196
46196
|
for (let x = 0; x < m.length; x++) {
|
@@ -46471,7 +46471,7 @@ function Ult(e, t, n) {
|
|
46471
46471
|
const NF = (e) => e.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), Wlt = "framerAppearId", bq = "data-" + NF(Wlt), { schedule: IF } = pq(queueMicrotask, !1), xq = hn({});
|
46472
46472
|
function Glt(e, t, n, r, o) {
|
46473
46473
|
var i, a;
|
46474
|
-
const { visualElement: s } = Et(mb), l = Et(gq), c = Et(pb), u = Et(jF).reducedMotion, d =
|
46474
|
+
const { visualElement: s } = Et(mb), l = Et(gq), c = Et(pb), u = Et(jF).reducedMotion, d = Xe(null);
|
46475
46475
|
r = r || l.renderer, !d.current && r && (d.current = r(e, {
|
46476
46476
|
visualState: t,
|
46477
46477
|
parent: s,
|
@@ -46482,11 +46482,11 @@ function Glt(e, t, n, r, o) {
|
|
46482
46482
|
}));
|
46483
46483
|
const f = d.current, h = Et(xq);
|
46484
46484
|
f && !f.projection && o && (f.type === "html" || f.type === "svg") && Zlt(d.current, n, o, h);
|
46485
|
-
const p =
|
46485
|
+
const p = Xe(!1);
|
46486
46486
|
P3(() => {
|
46487
46487
|
f && p.current && f.update(n, c);
|
46488
46488
|
});
|
46489
|
-
const g = n[bq], m =
|
46489
|
+
const g = n[bq], m = Xe(!!g && !(!((i = window.MotionHandoffIsComplete) === null || i === void 0) && i.call(window, g)) && ((a = window.MotionHasOptimisedAnimation) === null || a === void 0 ? void 0 : a.call(window, g)));
|
46490
46490
|
return hq(() => {
|
46491
46491
|
f && (p.current = !0, window.MotionIsMounted = !0, f.updateFeatures(), IF.render(f.render), m.current && f.animationState && f.animationState.animateChanges());
|
46492
46492
|
}), _e(() => {
|
@@ -51058,7 +51058,7 @@ const PV = ({
|
|
51058
51058
|
onAddTag: n,
|
51059
51059
|
isPreviewMode: r
|
51060
51060
|
}) => {
|
51061
|
-
const [o, i] = Re(""), [a, s] = Re(!1), l =
|
51061
|
+
const [o, i] = Re(""), [a, s] = Re(!1), l = Xe(null), c = (h) => {
|
51062
51062
|
i(h), s(!0);
|
51063
51063
|
}, u = (h) => {
|
51064
51064
|
const p = e.find(
|
@@ -57933,7 +57933,7 @@ const U2t = ({
|
|
57933
57933
|
content: i,
|
57934
57934
|
size: a
|
57935
57935
|
}) => {
|
57936
|
-
const s =
|
57936
|
+
const s = Xe(null), l = () => {
|
57937
57937
|
s.current && s.current.click();
|
57938
57938
|
};
|
57939
57939
|
return /* @__PURE__ */ j.jsxs(j.Fragment, { children: [
|
@@ -58018,7 +58018,7 @@ gn(
|
|
58018
58018
|
)
|
58019
58019
|
);
|
58020
58020
|
const W2t = ({ content: e }) => {
|
58021
|
-
const [t, n] = Re(0), r =
|
58021
|
+
const [t, n] = Re(0), r = Xe(null);
|
58022
58022
|
return _e(() => {
|
58023
58023
|
e && r.current ? n(r.current.scrollHeight) : n(0);
|
58024
58024
|
}, [e]), /* @__PURE__ */ j.jsx(
|
@@ -75695,7 +75695,7 @@ function mmt(e) {
|
|
75695
75695
|
}
|
75696
75696
|
function gL(e, t) {
|
75697
75697
|
t === void 0 && (t = 0);
|
75698
|
-
var n = Re(e), r = n[0], o = n[1], i =
|
75698
|
+
var n = Re(e), r = n[0], o = n[1], i = Xe(null);
|
75699
75699
|
function a(s) {
|
75700
75700
|
return new Promise(function(l) {
|
75701
75701
|
var c;
|
@@ -75713,7 +75713,7 @@ function ymt() {
|
|
75713
75713
|
};
|
75714
75714
|
}
|
75715
75715
|
function UZ() {
|
75716
|
-
var e =
|
75716
|
+
var e = Xe({}), t = hmt();
|
75717
75717
|
return Nt(function() {
|
75718
75718
|
var n = parseFloat("" + t);
|
75719
75719
|
return !t || Number.isNaN(n) ? e.current : Wb.reduce(function(r, o) {
|
@@ -75737,7 +75737,7 @@ function vmt(e) {
|
|
75737
75737
|
}, [e]);
|
75738
75738
|
}
|
75739
75739
|
function kmt(e) {
|
75740
|
-
var t = e.children, n = UZ(), r = tmt(), o = fmt(), i =
|
75740
|
+
var t = e.children, n = UZ(), r = tmt(), o = fmt(), i = Xe(bh), a = Xe(!1), s = Xe(!1), l = Xe(n), c = gL(Date.now(), 200), u = gL("", 100), d = Re(!1), f = Re(r), h = Re(null), p = Re(/* @__PURE__ */ new Set()), g = Re(null), m = Re(o), b = Re(!1), k = b[0], v = b[1];
|
75741
75741
|
return vmt(v), Ue(Gi.Provider, {
|
75742
75742
|
value: {
|
75743
75743
|
activeCategoryState: h,
|
@@ -75866,7 +75866,7 @@ function fp() {
|
|
75866
75866
|
return document.activeElement;
|
75867
75867
|
}
|
75868
75868
|
function Mmt(e) {
|
75869
|
-
var t = e.children, n =
|
75869
|
+
var t = e.children, n = Xe(null), r = Xe(null), o = Xe(null), i = Xe(null), a = Xe(null), s = Xe(null), l = Xe(null), c = Xe(null);
|
75870
75870
|
return Ue($Z.Provider, {
|
75871
75871
|
value: {
|
75872
75872
|
AnchoredEmojiRef: r,
|
@@ -76841,7 +76841,7 @@ function CK(e) {
|
|
76841
76841
|
return e.imgUrl !== void 0;
|
76842
76842
|
}
|
76843
76843
|
function EK(e, t) {
|
76844
|
-
var n =
|
76844
|
+
var n = Xe(), r = oK(), o = wmt(), i = Gd(), a = i[1], s = ju(), l = VM(), c = l[0], u = imt(t), d = GZ(), f = d[1], h = Au(), p = Eu(), g = Pe(function(k) {
|
76845
76845
|
if (!o.current) {
|
76846
76846
|
s();
|
76847
76847
|
var v = FL(k), x = v[0], w = v[1];
|
@@ -77315,7 +77315,7 @@ function z4t(e) {
|
|
77315
77315
|
})) : null;
|
77316
77316
|
}
|
77317
77317
|
function _4t() {
|
77318
|
-
var e = PZ(), t =
|
77318
|
+
var e = PZ(), t = Xe(0);
|
77319
77319
|
return Ue("ul", {
|
77320
77320
|
className: en(H4t.emojiList)
|
77321
77321
|
}, e.map(function(n) {
|
@@ -78265,7 +78265,7 @@ function Dyt(e) {
|
|
78265
78265
|
}
|
78266
78266
|
gn(
|
78267
78267
|
({ handleEmojiClick: e, handleAvatarInput: t, onRemove: n, className: r, ...o }, i) => {
|
78268
|
-
const [a, s] = Re("emojiPicker"), l =
|
78268
|
+
const [a, s] = Re("emojiPicker"), l = Xe(null), c = () => {
|
78269
78269
|
l.current && l.current.click();
|
78270
78270
|
};
|
78271
78271
|
return /* @__PURE__ */ j.jsx("div", { ref: i, className: r, ...o, children: /* @__PURE__ */ j.jsxs(
|
@@ -79452,7 +79452,7 @@ var ak = /* @__PURE__ */ ((e) => (e.LIST = "LIST", e.CARD = "CARD", e))(ak || {}
|
|
79452
79452
|
const T3t = ({
|
79453
79453
|
delay: e = 2e3
|
79454
79454
|
}) => {
|
79455
|
-
const [t, n] = Re(!1), [r, o] = Re(!1), i =
|
79455
|
+
const [t, n] = Re(!1), [r, o] = Re(!1), i = Xe(null), a = Pe(() => {
|
79456
79456
|
i.current && clearTimeout(i.current), i.current = setTimeout(() => {
|
79457
79457
|
n(!0), o(!0);
|
79458
79458
|
}, e);
|
@@ -79469,7 +79469,7 @@ const T3t = ({
|
|
79469
79469
|
};
|
79470
79470
|
var ot = /* @__PURE__ */ ((e) => (e[e.NONE = 0] = "NONE", e[e.HEADING = 1] = "HEADING", e[e.TEXT_COLOR = 2] = "TEXT_COLOR", e[e.HIGHLIGHT = 3] = "HIGHLIGHT", e[e.LINK = 4] = "LINK", e[e.FONT_FAMILY = 5] = "FONT_FAMILY", e[e.ALIGNMENT = 6] = "ALIGNMENT", e[e.LIST = 7] = "LIST", e[e.TEXT_FORMATING = 8] = "TEXT_FORMATING", e[e.TEXT_COLOR_PICKER = 9] = "TEXT_COLOR_PICKER", e[e.LINK_POPUP = 10] = "LINK_POPUP", e[e.SCRIPTS = 11] = "SCRIPTS", e[e.FONT_SIZE = 12] = "FONT_SIZE", e))(ot || {});
|
79471
79471
|
function L3t(e) {
|
79472
|
-
const [t, n] = Re(e), r =
|
79472
|
+
const [t, n] = Re(e), r = Xe(null), o = (i) => {
|
79473
79473
|
r && r.current && !r.current.contains(i.target) && n(
|
79474
79474
|
0
|
79475
79475
|
/* NONE */
|
@@ -80969,7 +80969,7 @@ function vy(e, t, n) {
|
|
80969
80969
|
}
|
80970
80970
|
vy.globalOptions = void 0;
|
80971
80971
|
function uC(e = {}, t = []) {
|
80972
|
-
const n =
|
80972
|
+
const n = Xe(e), r = Xe(t), [o, i] = Re(), [a, s] = Re(), l = Pe(() => {
|
80973
80973
|
o && o.reInit(n.current, r.current);
|
80974
80974
|
}, [o]);
|
80975
80975
|
return _e(() => {
|
@@ -81164,7 +81164,7 @@ var jbt = typeof Hr == "object" && Hr && Hr.Object === Object && Hr, Dbt = typeo
|
|
81164
81164
|
jbt || Dbt || Function("return this")();
|
81165
81165
|
var cY = typeof window < "u" ? bs : _e;
|
81166
81166
|
function Sbt(e, t, n, r) {
|
81167
|
-
const o =
|
81167
|
+
const o = Xe(t);
|
81168
81168
|
cY(() => {
|
81169
81169
|
o.current = t;
|
81170
81170
|
}, [t]), _e(() => {
|
@@ -86540,7 +86540,7 @@ async function g6(e, t) {
|
|
86540
86540
|
});
|
86541
86541
|
return Z === "0x" ? { data: void 0 } : { data: Z };
|
86542
86542
|
} catch (W) {
|
86543
|
-
const O = Kxt(W), { offchainLookup: _, offchainLookupSignature: G } = await import("./ccip-
|
86543
|
+
const O = Kxt(W), { offchainLookup: _, offchainLookupSignature: G } = await import("./ccip-B8-HJZ00.mjs");
|
86544
86544
|
if (e.ccipRead !== !1 && (O == null ? void 0 : O.slice(0, 10)) === G && k)
|
86545
86545
|
return { data: await _(e, { data: O, to: k }) };
|
86546
86546
|
throw D && (O == null ? void 0 : O.slice(0, 10)) === "0x101bb98d" ? new ext({ factory: u }) : j$(W, {
|
@@ -91523,7 +91523,7 @@ const MJ = hn(void 0), rkt = ({
|
|
91523
91523
|
onComment: w,
|
91524
91524
|
setCommentDrawerOpen: F
|
91525
91525
|
}) => {
|
91526
|
-
const [A, E] = Re(!0), [D, S] = Re(""), [I, z] = Re(""), [U, q] = Re(null), W =
|
91526
|
+
const [A, E] = Re(!0), [D, S] = Re(""), [I, z] = Re(""), [U, q] = Re(null), W = Xe(null), O = Xe(null), [_, G] = Re(""), [K, Q] = Re(!1), Z = Xe(null), ne = Xe(null), se = Xe(null), le = t.isActive("comment"), fe = t.getAttributes("comment").resolved, [ee, Ce] = Re({
|
91527
91527
|
inlineCommentText: "",
|
91528
91528
|
handleClick: !1
|
91529
91529
|
}), Fe = localStorage.getItem("ensCache"), [Ie, be] = Re(
|
@@ -95111,7 +95111,7 @@ const Rf = {
|
|
95111
95111
|
};
|
95112
95112
|
function eQ() {
|
95113
95113
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : lFt();
|
95114
|
-
const t = (
|
95114
|
+
const t = (et) => eQ(et);
|
95115
95115
|
if (t.version = "3.2.5", t.removed = [], !e || !e.document || e.document.nodeType !== Rf.document || !e.Element)
|
95116
95116
|
return t.isSupported = !1, t;
|
95117
95117
|
let {
|
@@ -95129,8 +95129,8 @@ function eQ() {
|
|
95129
95129
|
trustedTypes: h
|
95130
95130
|
} = e, p = l.prototype, g = If(p, "cloneNode"), m = If(p, "remove"), b = If(p, "nextSibling"), k = If(p, "childNodes"), v = If(p, "parentNode");
|
95131
95131
|
if (typeof a == "function") {
|
95132
|
-
const
|
95133
|
-
|
95132
|
+
const et = n.createElement("template");
|
95133
|
+
et.content && et.content.ownerDocument && (n = et.content.ownerDocument);
|
95134
95134
|
}
|
95135
95135
|
let x, w = "";
|
95136
95136
|
const {
|
@@ -95286,8 +95286,8 @@ function eQ() {
|
|
95286
95286
|
}, ye = function(ae) {
|
95287
95287
|
return typeof s == "function" && ae instanceof s;
|
95288
95288
|
};
|
95289
|
-
function Se(
|
95290
|
-
fm(
|
95289
|
+
function Se(et, ae, Ne) {
|
95290
|
+
fm(et, (Oe) => {
|
95291
95291
|
Oe.call(t, ae, Ne, on);
|
95292
95292
|
});
|
95293
95293
|
}
|
@@ -95405,44 +95405,44 @@ function eQ() {
|
|
95405
95405
|
}
|
95406
95406
|
}
|
95407
95407
|
Se(I.afterSanitizeAttributes, ae, null);
|
95408
|
-
}, it = function
|
95408
|
+
}, it = function et(ae) {
|
95409
95409
|
let Ne = null;
|
95410
95410
|
const Oe = Ki(ae);
|
95411
95411
|
for (Se(I.beforeSanitizeShadowDOM, ae, null); Ne = Oe.nextNode(); )
|
95412
|
-
Se(I.uponSanitizeShadowNode, Ne, null), We(Ne), at(Ne), Ne.content instanceof i &&
|
95412
|
+
Se(I.uponSanitizeShadowNode, Ne, null), We(Ne), at(Ne), Ne.content instanceof i && et(Ne.content);
|
95413
95413
|
Se(I.afterSanitizeShadowDOM, ae, null);
|
95414
95414
|
};
|
95415
|
-
return t.sanitize = function(
|
95415
|
+
return t.sanitize = function(et) {
|
95416
95416
|
let ae = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, Ne = null, Oe = null, ht = null, Rt = null;
|
95417
|
-
if (Ee = !
|
95418
|
-
if (typeof
|
95419
|
-
if (
|
95417
|
+
if (Ee = !et, Ee && (et = "<!-->"), typeof et != "string" && !ye(et))
|
95418
|
+
if (typeof et.toString == "function") {
|
95419
|
+
if (et = et.toString(), typeof et != "string")
|
95420
95420
|
throw Nf("dirty is not a string, aborting");
|
95421
95421
|
} else
|
95422
95422
|
throw Nf("toString is not a function");
|
95423
95423
|
if (!t.isSupported)
|
95424
|
-
return
|
95425
|
-
if (J || Gn(ae), t.removed = [], typeof
|
95426
|
-
if (
|
95427
|
-
const gr = At(
|
95424
|
+
return et;
|
95425
|
+
if (J || Gn(ae), t.removed = [], typeof et == "string" && (de = !1), de) {
|
95426
|
+
if (et.nodeName) {
|
95427
|
+
const gr = At(et.nodeName);
|
95428
95428
|
if (!Z[gr] || ee[gr])
|
95429
95429
|
throw Nf("root node is forbidden and cannot be sanitized in-place");
|
95430
95430
|
}
|
95431
|
-
} else if (
|
95432
|
-
Ne = Sl("<!---->"), Oe = Ne.ownerDocument.importNode(
|
95431
|
+
} else if (et instanceof s)
|
95432
|
+
Ne = Sl("<!---->"), Oe = Ne.ownerDocument.importNode(et, !0), Oe.nodeType === Rf.element && Oe.nodeName === "BODY" || Oe.nodeName === "HTML" ? Ne = Oe : Ne.appendChild(Oe);
|
95433
95433
|
else {
|
95434
95434
|
if (!X && !Te && !te && // eslint-disable-next-line unicorn/prefer-includes
|
95435
|
-
|
95436
|
-
return x && H ? x.createHTML(
|
95437
|
-
if (Ne = Sl(
|
95435
|
+
et.indexOf("<") === -1)
|
95436
|
+
return x && H ? x.createHTML(et) : et;
|
95437
|
+
if (Ne = Sl(et), !Ne)
|
95438
95438
|
return X ? null : H ? w : "";
|
95439
95439
|
}
|
95440
95440
|
Ne && $ && pr(Ne.firstChild);
|
95441
|
-
const pt = Ki(de ?
|
95441
|
+
const pt = Ki(de ? et : Ne);
|
95442
95442
|
for (; ht = pt.nextNode(); )
|
95443
95443
|
We(ht), at(ht), ht.content instanceof i && it(ht.content);
|
95444
95444
|
if (de)
|
95445
|
-
return
|
95445
|
+
return et;
|
95446
95446
|
if (X) {
|
95447
95447
|
if (ue)
|
95448
95448
|
for (Rt = E.call(Ne.ownerDocument); Ne.firstChild; )
|
@@ -95457,24 +95457,24 @@ function eQ() {
|
|
95457
95457
|
xn = Lf(xn, gr, " ");
|
95458
95458
|
}), x && H ? x.createHTML(xn) : xn;
|
95459
95459
|
}, t.setConfig = function() {
|
95460
|
-
let
|
95461
|
-
Gn(
|
95460
|
+
let et = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
95461
|
+
Gn(et), J = !0;
|
95462
95462
|
}, t.clearConfig = function() {
|
95463
95463
|
on = null, J = !1;
|
95464
|
-
}, t.isValidAttribute = function(
|
95464
|
+
}, t.isValidAttribute = function(et, ae, Ne) {
|
95465
95465
|
on || Gn({});
|
95466
|
-
const Oe = At(
|
95466
|
+
const Oe = At(et), ht = At(ae);
|
95467
95467
|
return ft(Oe, ht, Ne);
|
95468
|
-
}, t.addHook = function(
|
95469
|
-
typeof ae == "function" && Tf(I[
|
95470
|
-
}, t.removeHook = function(
|
95468
|
+
}, t.addHook = function(et, ae) {
|
95469
|
+
typeof ae == "function" && Tf(I[et], ae);
|
95470
|
+
}, t.removeHook = function(et, ae) {
|
95471
95471
|
if (ae !== void 0) {
|
95472
|
-
const Ne = Gwt(I[
|
95473
|
-
return Ne === -1 ? void 0 : Zwt(I[
|
95472
|
+
const Ne = Gwt(I[et], ae);
|
95473
|
+
return Ne === -1 ? void 0 : Zwt(I[et], Ne, 1)[0];
|
95474
95474
|
}
|
95475
|
-
return eI(I[
|
95476
|
-
}, t.removeHooks = function(
|
95477
|
-
I[
|
95475
|
+
return eI(I[et]);
|
95476
|
+
}, t.removeHooks = function(et) {
|
95477
|
+
I[et] = [];
|
95478
95478
|
}, t.removeAllHooks = function() {
|
95479
95479
|
I = sI();
|
95480
95480
|
}, t;
|
@@ -99253,7 +99253,7 @@ const mQ = (e) => e && (e.length > 20 ? e.slice(0, 5) + "..." + e.slice(e.length
|
|
99253
99253
|
version: p,
|
99254
99254
|
emptyComment: g
|
99255
99255
|
}) => {
|
99256
|
-
const m =
|
99256
|
+
const m = Xe(null), [b, k] = Re(!1), [v, x] = Re(!1), w = Xe(null), { setOpenReplyId: F } = yl(), { getEnsStatus: A, ensCache: E } = yl(), [D, S] = Re({
|
99257
99257
|
name: e,
|
99258
99258
|
isEns: !1
|
99259
99259
|
});
|
@@ -99518,7 +99518,7 @@ const mQ = (e) => e && (e.length > 20 ? e.slice(0, 5) + "..." + e.slice(e.length
|
|
99518
99518
|
isDisabled: o,
|
99519
99519
|
isCommentOwner: i
|
99520
99520
|
}) => {
|
99521
|
-
const [a, s] = Re(t), [l, c] = Re(""), [u, d] = Re(!0), [f, h] = Re(!!e), p =
|
99521
|
+
const [a, s] = Re(t), [l, c] = Re(""), [u, d] = Re(!0), [f, h] = Re(!!e), p = Xe(null), [g, m] = Re(!1), {
|
99522
99522
|
inlineCommentData: b,
|
99523
99523
|
setInlineCommentData: k,
|
99524
99524
|
addComment: v,
|
@@ -100954,7 +100954,7 @@ const gCt = {
|
|
100954
100954
|
return /* @__PURE__ */ M.jsx(AQ.Provider, { value: r, children: e });
|
100955
100955
|
}, fE = hn({});
|
100956
100956
|
function hE(e) {
|
100957
|
-
const t =
|
100957
|
+
const t = Xe(null);
|
100958
100958
|
return t.current === null && (t.current = e()), t.current;
|
100959
100959
|
}
|
100960
100960
|
const j6 = hn(null), pE = hn({
|
@@ -100981,7 +100981,7 @@ class yCt extends N.Component {
|
|
100981
100981
|
}
|
100982
100982
|
}
|
100983
100983
|
function bCt({ children: e, isPresent: t }) {
|
100984
|
-
const n = Nd(), r =
|
100984
|
+
const n = Nd(), r = Xe(null), o = Xe({
|
100985
100985
|
width: 0,
|
100986
100986
|
height: 0,
|
100987
100987
|
top: 0,
|
@@ -101057,7 +101057,7 @@ function yI(e) {
|
|
101057
101057
|
}), t;
|
101058
101058
|
}
|
101059
101059
|
const gE = typeof window < "u", DQ = gE ? bs : _e, Xd = ({ children: e, custom: t, initial: n = !0, onExitComplete: r, presenceAffectsLayout: o = !0, mode: i = "sync", propagate: a = !1 }) => {
|
101060
|
-
const [s, l] = jQ(a), c = Nt(() => yI(e), [e]), u = a && !s ? [] : c.map(gm), d =
|
101060
|
+
const [s, l] = jQ(a), c = Nt(() => yI(e), [e]), u = a && !s ? [] : c.map(gm), d = Xe(!0), f = Xe(c), h = hE(() => /* @__PURE__ */ new Map()), [p, g] = Re(c), [m, b] = Re(c);
|
101061
101061
|
DQ(() => {
|
101062
101062
|
d.current = !1, f.current = c;
|
101063
101063
|
for (let x = 0; x < m.length; x++) {
|
@@ -101338,7 +101338,7 @@ function LCt(e, t, n) {
|
|
101338
101338
|
const xE = (e) => e.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), NCt = "framerAppearId", IQ = "data-" + xE(NCt), { schedule: vE } = SQ(queueMicrotask, !1), RQ = hn({});
|
101339
101339
|
function ICt(e, t, n, r, o) {
|
101340
101340
|
var i, a;
|
101341
|
-
const { visualElement: s } = Et(S6), l = Et(TQ), c = Et(j6), u = Et(pE).reducedMotion, d =
|
101341
|
+
const { visualElement: s } = Et(S6), l = Et(TQ), c = Et(j6), u = Et(pE).reducedMotion, d = Xe(null);
|
101342
101342
|
r = r || l.renderer, !d.current && r && (d.current = r(e, {
|
101343
101343
|
visualState: t,
|
101344
101344
|
parent: s,
|
@@ -101349,11 +101349,11 @@ function ICt(e, t, n, r, o) {
|
|
101349
101349
|
}));
|
101350
101350
|
const f = d.current, h = Et(RQ);
|
101351
101351
|
f && !f.projection && o && (f.type === "html" || f.type === "svg") && RCt(d.current, n, o, h);
|
101352
|
-
const p =
|
101352
|
+
const p = Xe(!1);
|
101353
101353
|
P3(() => {
|
101354
101354
|
f && p.current && f.update(n, c);
|
101355
101355
|
});
|
101356
|
-
const g = n[IQ], m =
|
101356
|
+
const g = n[IQ], m = Xe(!!g && !(!((i = window.MotionHandoffIsComplete) === null || i === void 0) && i.call(window, g)) && ((a = window.MotionHasOptimisedAnimation) === null || a === void 0 ? void 0 : a.call(window, g)));
|
101357
101357
|
return DQ(() => {
|
101358
101358
|
f && (p.current = !0, window.MotionIsMounted = !0, f.updateFeatures(), vE.render(f.render), m.current && f.animationState && f.animationState.animateChanges());
|
101359
101359
|
}), _e(() => {
|
@@ -119626,7 +119626,7 @@ const Yte = ({
|
|
119626
119626
|
updateAttributes: t,
|
119627
119627
|
deleteNode: n
|
119628
119628
|
}) => {
|
119629
|
-
const { isPreviewMode: r } = mg(), [o, i] = Re(), [a, s] = Re(0), [l, c] = Re(0), [u, d] = Re({}), f =
|
119629
|
+
const { isPreviewMode: r } = mg(), [o, i] = Re(), [a, s] = Re(0), [l, c] = Re(0), [u, d] = Re({}), f = Xe(null), [h, p] = Re(!1), [g, m] = Re(!1), [b, k] = Re(null), v = Xe(null), x = () => {
|
119630
119630
|
const Q = {};
|
119631
119631
|
SO.forEach(({ tooltip: Z, isActive: ne }) => {
|
119632
119632
|
Q[Z] = !!(ne != null && ne(e.attrs));
|
@@ -121334,7 +121334,7 @@ const Uv = ke.use || // This extra generic is to avoid TypeScript mixing up the
|
|
121334
121334
|
}), Wv = {
|
121335
121335
|
dedupe: !0
|
121336
121336
|
}, nzt = (e, t, n) => {
|
121337
|
-
const { cache: r, compare: o, suspense: i, fallbackData: a, revalidateOnMount: s, revalidateIfStale: l, refreshInterval: c, refreshWhenHidden: u, refreshWhenOffline: d, keepPreviousData: f } = n, [h, p, g, m] = Gs.get(r), [b, k] = _A(e), v =
|
121337
|
+
const { cache: r, compare: o, suspense: i, fallbackData: a, revalidateOnMount: s, revalidateIfStale: l, refreshInterval: c, refreshWhenHidden: u, refreshWhenOffline: d, keepPreviousData: f } = n, [h, p, g, m] = Gs.get(r), [b, k] = _A(e), v = Xe(!1), x = Xe(!1), w = Xe(b), F = Xe(t), A = Xe(n), E = () => A.current, D = () => E().isVisible() && E().isOnline(), [S, I, z, U] = sne(r, b), q = Xe({}).current, W = an(a) ? an(n.fallback) ? po : n.fallback[b] : a, O = (je, te) => {
|
121338
121338
|
for (const J in q) {
|
121339
121339
|
const $ = J;
|
121340
121340
|
if ($ === "data") {
|
@@ -121373,7 +121373,7 @@ const Uv = ke.use || // This extra generic is to avoid TypeScript mixing up the
|
|
121373
121373
|
r,
|
121374
121374
|
b
|
121375
121375
|
]
|
121376
|
-
), _[0], _[1]), K = !v.current, Q = h[b] && h[b].length > 0, Z = G.data, ne = an(Z) ? W && ane(W) ? Uv(W) : W : Z, se = G.error, le =
|
121376
|
+
), _[0], _[1]), K = !v.current, Q = h[b] && h[b].length > 0, Z = G.data, ne = an(Z) ? W && ane(W) ? Uv(W) : W : Z, se = G.error, le = Xe(ne), fe = f ? an(Z) ? an(le.current) ? ne : le.current : Z : ne, ee = Q && !an(se) ? !1 : K && !an(s) ? s : E().isPaused() ? !1 : i ? an(ne) ? !1 : l : an(ne) || l, Ce = !!(b && t && K && ee), Fe = an(G.isValidating) ? Ce : G.isValidating, Ie = an(G.isLoading) ? Ce : G.isLoading, be = Pe(
|
121377
121377
|
async (je) => {
|
121378
121378
|
const te = F.current;
|
121379
121379
|
if (!b || !te || x.current || E().isPaused())
|
@@ -121649,7 +121649,7 @@ const dzt = ({
|
|
121649
121649
|
collapsedHeadings: r,
|
121650
121650
|
setCollapsedHeadings: o
|
121651
121651
|
}) => {
|
121652
|
-
const i =
|
121652
|
+
const i = Xe(!1), a = Xe(null), s = Xe(""), l = Pe(() => {
|
121653
121653
|
const { doc: m } = n.state, b = m.content.content.filter(
|
121654
121654
|
(F) => {
|
121655
121655
|
var A, E, D;
|
@@ -121881,7 +121881,7 @@ const dzt = ({
|
|
121881
121881
|
};
|
121882
121882
|
};
|
121883
121883
|
function fzt(e) {
|
121884
|
-
const t =
|
121884
|
+
const t = Xe(!1), n = Xe(e), r = Pe(() => {
|
121885
121885
|
if (!n.current) {
|
121886
121886
|
t.current = !1;
|
121887
121887
|
return;
|
@@ -127504,7 +127504,7 @@ function W_t(e, t) {
|
|
127504
127504
|
}
|
127505
127505
|
var Yv = Lne ? bs : _e;
|
127506
127506
|
function G_t(e) {
|
127507
|
-
var t =
|
127507
|
+
var t = Xe();
|
127508
127508
|
return t.current || (t.current = typeof e == "function" ? e() : e), t.current;
|
127509
127509
|
}
|
127510
127510
|
function gB(e, t, n) {
|
@@ -127768,7 +127768,7 @@ const J_t = [
|
|
127768
127768
|
selected: n,
|
127769
127769
|
editor: r
|
127770
127770
|
}) => {
|
127771
|
-
const [o, i] = Re(!1), { isPreviewMode: a } = mg(), s =
|
127771
|
+
const [o, i] = Re(!1), { isPreviewMode: a } = mg(), s = Xe(null), l = () => {
|
127772
127772
|
const { from: u, to: d } = r.state.selection, f = t(), h = f + e.nodeSize;
|
127773
127773
|
i(f <= u && d <= h);
|
127774
127774
|
};
|
@@ -128241,7 +128241,7 @@ const rPt = Xt.create({
|
|
128241
128241
|
}, [o]), _e(() => {
|
128242
128242
|
t == null || t.chain().focus();
|
128243
128243
|
}, []);
|
128244
|
-
const g =
|
128244
|
+
const g = Xe(null);
|
128245
128245
|
return _e(() => {
|
128246
128246
|
const m = setTimeout(() => {
|
128247
128247
|
var b;
|
@@ -143024,7 +143024,7 @@ const iWt = ({
|
|
143024
143024
|
metadataProxyUrl: t,
|
143025
143025
|
hoverEvent: n
|
143026
143026
|
}) => {
|
143027
|
-
const r = ri("(max-width:768px)"), [o, i] = Re(null), [a, s] = Re(!1), l =
|
143027
|
+
const r = ri("(max-width:768px)"), [o, i] = Re(null), [a, s] = Re(!1), l = Xe(/* @__PURE__ */ new Map()), c = async (u) => {
|
143028
143028
|
if (u) {
|
143029
143029
|
if (l.current.has(u)) {
|
143030
143030
|
i(l.current.get(u)), s(!1);
|
@@ -144482,7 +144482,7 @@ function dGt({
|
|
144482
144482
|
editor: n,
|
144483
144483
|
deleteNode: r
|
144484
144484
|
}) {
|
144485
|
-
const o =
|
144485
|
+
const o = Xe(null), [i, a] = Re("Copy"), s = e.attrs.language || "plaintext", l = !n.isEditable, c = e.attrs.lineNumbers && !l, u = e.attrs.wordWrap && !l, d = e.attrs.tabSize ?? 2, f = e.attrs.shouldFocus, { isMobile: h } = Ms(), p = e.attrs.code || e.textContent || "", g = Nt(() => {
|
144486
144486
|
const k = p.split(`
|
144487
144487
|
`), v = [];
|
144488
144488
|
let x = 0;
|
@@ -219325,7 +219325,7 @@ const OKt = 200, BKt = new nn("emoji"), zKt = _t.create({
|
|
219325
219325
|
}, [i, r, o, f]), _e(() => {
|
219326
219326
|
o(0);
|
219327
219327
|
}, [i]);
|
219328
|
-
const h =
|
219328
|
+
const h = Xe(null);
|
219329
219329
|
return bs(() => {
|
219330
219330
|
const p = h == null ? void 0 : h.current, g = p == null ? void 0 : p.children[r];
|
219331
219331
|
g && p && WKt(p, g);
|
@@ -221046,7 +221046,7 @@ const Pz = () => {
|
|
221046
221046
|
var $;
|
221047
221047
|
const [o, i] = Re(!1), [a, s] = Re(!1), [l, c] = Re(e.attrs.prompt), [u, d] = Re(!!e.attrs.content), [f, h] = Re(""), [p, g] = Re(!1), [m, b] = Re(!1), [k, v] = Re([]), [x, w] = Re(
|
221048
221048
|
!!localStorage.getItem("include-ddoc-context")
|
221049
|
-
), [F, A] = Re(!0), { prompt: E, content: D } = e.attrs, S =
|
221049
|
+
), [F, A] = Re(!0), { prompt: E, content: D } = e.attrs, S = Xe(null), I = Xe(null), z = Xe(null), U = !t.isEditable, { isWindows: q } = Ms(), W = q ? "Ctrl" : "Cmd", O = window.__MODEL_CONTEXT__, _ = Xe(null), [G, K] = Re(
|
221050
221050
|
Pz()
|
221051
221051
|
), Q = iF({
|
221052
221052
|
extensions: [_te, ...One],
|
@@ -221646,7 +221646,7 @@ User prompt: ${l} /no_think` : `${l} /no_think`;
|
|
221646
221646
|
isAIAgentEnabled: S
|
221647
221647
|
}) => {
|
221648
221648
|
var xe, De;
|
221649
|
-
const [I] = Re(new Al()), [z, U] = Re(null), q =
|
221649
|
+
const [I] = Re(new Al()), [z, U] = Re(null), q = Xe(null), W = (me) => {
|
221650
221650
|
if (!q.current) return;
|
221651
221651
|
const Le = q.current.querySelector(`input#${me}`);
|
221652
221652
|
Le && Le.scrollIntoView({
|
@@ -221688,7 +221688,7 @@ User prompt: ${l} /no_think` : `${l} /no_think`;
|
|
221688
221688
|
})
|
221689
221689
|
]);
|
221690
221690
|
}, [e]);
|
221691
|
-
const Q =
|
221691
|
+
const Q = Xe(!1), [Z, ne] = Re(!0), [se, le] = Re([]), fe = (me, Le, Qe) => {
|
221692
221692
|
let vt = !1;
|
221693
221693
|
return me.doc.nodesBetween(Le, Qe, (we) => {
|
221694
221694
|
we.marks && we.marks.some(
|
@@ -221720,7 +221720,7 @@ User prompt: ${l} /no_think` : `${l} /no_think`;
|
|
221720
221720
|
}
|
221721
221721
|
}, Ce = (me, Le, Qe) => {
|
221722
221722
|
ee(me, Qe);
|
221723
|
-
}, Fe = Nt(() => G, [G]), Ie =
|
221723
|
+
}, Fe = Nt(() => G, [G]), Ie = Xe(null), be = iF(
|
221724
221724
|
{
|
221725
221725
|
extensions: Fe,
|
221726
221726
|
editorProps: {
|
@@ -221754,14 +221754,16 @@ User prompt: ${l} /no_think` : `${l} /no_think`;
|
|
221754
221754
|
w.TableOfContents.configure({
|
221755
221755
|
getIndex: w.getHierarchicalIndexes,
|
221756
221756
|
onUpdate: (me, Le) => {
|
221757
|
-
Le ? _(me) : (Ie.current && clearTimeout(Ie.current),
|
221758
|
-
|
221759
|
-
|
221757
|
+
Le ? _(me) : (Ie.current && clearTimeout(Ie.current), requestAnimationFrame(() => {
|
221758
|
+
Ie.current = window.setTimeout(() => {
|
221759
|
+
_(me), Ie.current = null;
|
221760
|
+
}, 100);
|
221761
|
+
}));
|
221760
221762
|
}
|
221761
221763
|
})
|
221762
221764
|
]), () => {
|
221763
221765
|
Ie.current && clearTimeout(Ie.current);
|
221764
|
-
}), [w]), _e(() => {
|
221766
|
+
}), [w, G]), _e(() => {
|
221765
221767
|
const me = E !== void 0 && S;
|
221766
221768
|
E && K([
|
221767
221769
|
...G.filter(
|
@@ -221792,7 +221794,7 @@ User prompt: ${l} /no_think` : `${l} /no_think`;
|
|
221792
221794
|
return () => clearTimeout(me);
|
221793
221795
|
}
|
221794
221796
|
}, [b, Z, t, be == null ? void 0 : be.isEmpty]);
|
221795
|
-
const Me =
|
221797
|
+
const Me = Xe(() => {
|
221796
221798
|
}), Te = (me, Le = !1) => {
|
221797
221799
|
if (!n || !r)
|
221798
221800
|
throw new Error("docId or username is not provided");
|
@@ -221815,11 +221817,11 @@ User prompt: ${l} /no_think` : `${l} /no_think`;
|
|
221815
221817
|
]), Me.current = () => {
|
221816
221818
|
Qe.destroy(), I.destroy();
|
221817
221819
|
}, Me.current;
|
221818
|
-
}, je =
|
221820
|
+
}, je = Xe(null);
|
221819
221821
|
_e(() => {
|
221820
221822
|
be == null || be.setEditable(!e);
|
221821
221823
|
}, [e, be]);
|
221822
|
-
const te =
|
221824
|
+
const te = Xe(null), J = async () => {
|
221823
221825
|
const me = te.current;
|
221824
221826
|
if (me && await me.destroy(), g && p) {
|
221825
221827
|
const Le = new kYt(p, I);
|
@@ -221964,7 +221966,7 @@ User prompt: ${l} /no_think` : `${l} /no_think`;
|
|
221964
221966
|
be.off("paste", me);
|
221965
221967
|
};
|
221966
221968
|
}, [be]);
|
221967
|
-
const pe =
|
221969
|
+
const pe = Xe(localStorage.getItem("theme") !== null), ce = Xe(!1);
|
221968
221970
|
return _e(() => {
|
221969
221971
|
if (!(!be || Z || !pe.current || ce.current))
|
221970
221972
|
if (t) {
|
@@ -222301,7 +222303,7 @@ const t$t = async (e) => {
|
|
222301
222303
|
currentSlide: t,
|
222302
222304
|
setCurrentSlide: n
|
222303
222305
|
}) => {
|
222304
|
-
const r =
|
222306
|
+
const r = Xe({}), o = Xe(null), { isNativeMobile: i } = Ms(), a = ri("(max-width: 1279px)");
|
222305
222307
|
return _e(() => {
|
222306
222308
|
var s;
|
222307
222309
|
!a && r.current[t] && ((s = r.current[t]) == null || s.scrollIntoView({
|
@@ -223645,105 +223647,117 @@ iie.displayName = "ToCItem";
|
|
223645
223647
|
const aie = Ld(() => /* @__PURE__ */ M.jsx("div", { className: "p-4 text-center text-body-sm color-text-secondary select-none", children: /* @__PURE__ */ M.jsx("p", { children: "Start editing your document to see the outline." }) }));
|
223646
223648
|
aie.displayName = "ToCEmptyState";
|
223647
223649
|
const sie = Ld(({ items: e = [], editor: t, setItems: n }) => {
|
223648
|
-
const [r, o] = Re(null), i = ri("(max-width: 1280px)"), a =
|
223649
|
-
...
|
223650
|
-
isActive:
|
223651
|
-
})), [e, r]),
|
223652
|
-
if (t && (!a.current || Date.now() - s.current >
|
223653
|
-
const
|
223654
|
-
t.view.dom.querySelectorAll("[data-toc-id]").forEach((
|
223655
|
-
const
|
223656
|
-
|
223657
|
-
}), a.current =
|
223650
|
+
const [r, o] = Re(null), i = ri("(max-width: 1280px)"), a = Xe(null), s = Xe(0), l = Xe(null), { collapsedHeadings: c, setCollapsedHeadings: u, expandMultipleHeadings: d } = hne(), f = Nt(() => e.map((b) => ({
|
223651
|
+
...b,
|
223652
|
+
isActive: b.id === r
|
223653
|
+
})), [e, r]), h = Pe(() => {
|
223654
|
+
if (t && (!a.current || Date.now() - s.current > 250)) {
|
223655
|
+
const b = /* @__PURE__ */ new Map();
|
223656
|
+
t.view.dom.querySelectorAll("[data-toc-id]").forEach((v) => {
|
223657
|
+
const x = v.getAttribute("data-toc-id");
|
223658
|
+
x && b.set(x, v);
|
223659
|
+
}), a.current = b, s.current = Date.now();
|
223658
223660
|
}
|
223659
223661
|
return a.current;
|
223660
|
-
}, [t])
|
223661
|
-
|
223662
|
-
|
223663
|
-
|
223664
|
-
|
223662
|
+
}, [t]);
|
223663
|
+
_e(() => {
|
223664
|
+
if (!t) return;
|
223665
|
+
const b = () => {
|
223666
|
+
l.current && cancelAnimationFrame(l.current), l.current = requestAnimationFrame(() => {
|
223667
|
+
a.current = null, h();
|
223665
223668
|
});
|
223666
|
-
|
223667
|
-
|
223668
|
-
|
223669
|
-
|
223670
|
-
|
223671
|
-
|
223672
|
-
|
223673
|
-
|
223674
|
-
|
223669
|
+
};
|
223670
|
+
return t.on("update", b), t.on("selectionUpdate", b), () => {
|
223671
|
+
t.off("update", b), t.off("selectionUpdate", b), l.current && cancelAnimationFrame(l.current);
|
223672
|
+
};
|
223673
|
+
}, [t, h]);
|
223674
|
+
const p = Pe(
|
223675
|
+
(b) => {
|
223676
|
+
c.has(b) && u((x) => {
|
223677
|
+
const w = new Set(x);
|
223678
|
+
return w.delete(b), w;
|
223679
|
+
});
|
223680
|
+
const k = e.find((x) => x.id === b);
|
223681
|
+
if (!k) return;
|
223682
|
+
const v = k.level;
|
223683
|
+
if (v === 1) {
|
223684
|
+
let x = !1;
|
223685
|
+
const w = [];
|
223686
|
+
e.forEach((F) => {
|
223687
|
+
if (F.id === b) {
|
223688
|
+
x = !0;
|
223675
223689
|
return;
|
223676
223690
|
}
|
223677
|
-
if (
|
223678
|
-
|
223691
|
+
if (F.level === 1) {
|
223692
|
+
x = !1;
|
223679
223693
|
return;
|
223680
223694
|
}
|
223681
|
-
|
223682
|
-
}),
|
223695
|
+
x && c.has(F.id) && w.push(F.id);
|
223696
|
+
}), w.length > 0 && d(w);
|
223683
223697
|
} else {
|
223684
|
-
const
|
223685
|
-
for (let
|
223686
|
-
const
|
223687
|
-
if (
|
223698
|
+
const x = [];
|
223699
|
+
for (let w = e.findIndex((F) => F.id === b) - 1; w >= 0; w--) {
|
223700
|
+
const F = e[w];
|
223701
|
+
if (F.level < v && c.has(F.id) && (x.push(F.id), F.level === 1))
|
223688
223702
|
break;
|
223689
223703
|
}
|
223690
|
-
|
223704
|
+
x.length > 0 && d(x);
|
223691
223705
|
}
|
223692
223706
|
},
|
223693
|
-
[e,
|
223694
|
-
),
|
223695
|
-
(
|
223696
|
-
if (
|
223697
|
-
|
223698
|
-
const
|
223699
|
-
let
|
223700
|
-
if (
|
223701
|
-
`[data-toc-id="${
|
223702
|
-
),
|
223707
|
+
[e, c, d, u]
|
223708
|
+
), g = Pe(
|
223709
|
+
(b, k) => {
|
223710
|
+
if (b.preventDefault(), b.stopPropagation(), o(k), t) {
|
223711
|
+
p(k);
|
223712
|
+
const v = h();
|
223713
|
+
let x = v == null ? void 0 : v.get(k);
|
223714
|
+
if (x || (x = t.view.dom.querySelector(
|
223715
|
+
`[data-toc-id="${k}"]`
|
223716
|
+
), x && v && v.set(k, x)), !x)
|
223703
223717
|
return;
|
223704
|
-
const
|
223705
|
-
const
|
223706
|
-
|
223707
|
-
const
|
223718
|
+
const w = setTimeout(() => {
|
223719
|
+
const F = t.view.posAtDOM(x, 0), A = t.view.state.tr;
|
223720
|
+
A.setSelection(new ut(A.doc.resolve(F))), t.view.dispatch(A);
|
223721
|
+
const D = [
|
223708
223722
|
document.querySelector(".ProseMirror"),
|
223709
223723
|
document.getElementById("editor-canvas"),
|
223710
|
-
|
223711
|
-
|
223724
|
+
x.closest(".ProseMirror"),
|
223725
|
+
x.closest('[class*="editor"]'),
|
223712
223726
|
t.view.dom.parentElement
|
223713
223727
|
].filter(Boolean).find(
|
223714
|
-
(
|
223728
|
+
(S) => S && (S.scrollHeight > S.clientHeight || window.getComputedStyle(S).overflow === "auto" || window.getComputedStyle(S).overflowY === "auto")
|
223715
223729
|
);
|
223716
|
-
|
223717
|
-
const
|
223718
|
-
|
223719
|
-
top:
|
223730
|
+
D && requestAnimationFrame(() => {
|
223731
|
+
const S = D.getBoundingClientRect(), I = x.getBoundingClientRect(), z = I.top - S.top - S.height / (i ? 5 : 7) + I.height / (i ? 5 : 7);
|
223732
|
+
D.scrollBy({
|
223733
|
+
top: z,
|
223720
223734
|
behavior: "smooth"
|
223721
223735
|
});
|
223722
223736
|
});
|
223723
223737
|
}, 0);
|
223724
|
-
return () => clearTimeout(
|
223738
|
+
return () => clearTimeout(w);
|
223725
223739
|
}
|
223726
223740
|
},
|
223727
|
-
[t,
|
223728
|
-
),
|
223729
|
-
(
|
223730
|
-
|
223731
|
-
var
|
223732
|
-
const
|
223733
|
-
return
|
223741
|
+
[t, p, h, i]
|
223742
|
+
), m = Pe(
|
223743
|
+
(b, k) => {
|
223744
|
+
b.preventDefault(), b.stopPropagation(), n((v) => {
|
223745
|
+
var F;
|
223746
|
+
const x = v.findIndex((A) => A.id === k), w = v.filter((A) => A.id !== k);
|
223747
|
+
return k === r && w.length > 0 ? x === v.length - 1 ? g(b, w[w.length - 1].id) : g(b, (F = w[x]) == null ? void 0 : F.id) : w.length === 0 && o(null), w;
|
223734
223748
|
});
|
223735
223749
|
},
|
223736
|
-
[r,
|
223750
|
+
[r, g, n]
|
223737
223751
|
);
|
223738
|
-
return e.length === 0 ? /* @__PURE__ */ M.jsx(aie, {}) : /* @__PURE__ */ M.jsx("div", { className: "flex flex-col max-[1280px]:gap-2 gap-4 overflow-auto no-scrollbar max-[1280px]:max-h-[168px] max-h-[calc(80vh-40px)] mb-3", children:
|
223752
|
+
return e.length === 0 ? /* @__PURE__ */ M.jsx(aie, {}) : /* @__PURE__ */ M.jsx("div", { className: "flex flex-col max-[1280px]:gap-2 gap-4 overflow-auto no-scrollbar max-[1280px]:max-h-[168px] max-h-[calc(80vh-40px)] mb-3", children: f.map((b, k) => /* @__PURE__ */ M.jsx(
|
223739
223753
|
iie,
|
223740
223754
|
{
|
223741
|
-
onItemClick:
|
223742
|
-
onItemRemove:
|
223743
|
-
item:
|
223744
|
-
index:
|
223755
|
+
onItemClick: g,
|
223756
|
+
onItemRemove: m,
|
223757
|
+
item: b,
|
223758
|
+
index: k + 1
|
223745
223759
|
},
|
223746
|
-
|
223760
|
+
b.id
|
223747
223761
|
)) });
|
223748
223762
|
});
|
223749
223763
|
sie.displayName = "ToC";
|
@@ -223902,7 +223916,7 @@ const Zz = ke.memo(sie), F$t = ({
|
|
223902
223916
|
maxTokens: we,
|
223903
223917
|
isAIAgentEnabled: He
|
223904
223918
|
}, Ee) => {
|
223905
|
-
const [Ke, Je] = Re(!1), [Be, tt] = Re(!1), mt =
|
223919
|
+
const [Ke, Je] = Re(!1), [Be, tt] = Re(!1), mt = Xe(null), dt = ri("(min-width: 1500px)"), Bt = ri("(min-width: 3000px)"), { isNativeMobile: Ht, isIOS: At } = Ms(), [on, bn] = Re(!1), Rn = Xe(null), Gn = (w == null ? void 0 : w.slice(0, 4)) || [], lr = w ? Math.max(0, w.length - 4) : 0;
|
223906
223920
|
dC(Rn, () => {
|
223907
223921
|
bn(!1);
|
223908
223922
|
}), _e(() => {
|
@@ -223993,7 +224007,7 @@ const Zz = ke.memo(sie), F$t = ({
|
|
223993
224007
|
F == null || F(
|
223994
224008
|
(ht) => ht.filter((Rt) => Rt.name !== Oe)
|
223995
224009
|
);
|
223996
|
-
},
|
224010
|
+
}, et = () => {
|
223997
224011
|
O == null || O(!1);
|
223998
224012
|
const Oe = new URL(window.location.href), ht = Oe.hash, [Rt, pt] = ht.split("&");
|
223999
224013
|
pt && pt.startsWith("slides=") && (Oe.hash = Rt, window.history.replaceState({}, "", Oe.toString()));
|
@@ -224060,7 +224074,7 @@ const Zz = ke.memo(sie), F$t = ({
|
|
224060
224074
|
g$t,
|
224061
224075
|
{
|
224062
224076
|
editor: kt,
|
224063
|
-
onClose:
|
224077
|
+
onClose: et,
|
224064
224078
|
isFullscreen: Be,
|
224065
224079
|
setIsFullscreen: tt,
|
224066
224080
|
onError: b,
|
@@ -224413,7 +224427,7 @@ const Zz = ke.memo(sie), F$t = ({
|
|
224413
224427
|
className: k,
|
224414
224428
|
unFocused: v
|
224415
224429
|
}, x) => {
|
224416
|
-
const [w, F] = Re(!1), A =
|
224430
|
+
const [w, F] = Re(!1), A = Xe(null), E = (m == null ? void 0 : m.slice(0, 4)) || [], D = m ? Math.max(0, m.length - 4) : 0;
|
224417
224431
|
dC(A, () => {
|
224418
224432
|
F(!1);
|
224419
224433
|
}), _e(() => {
|
package/dist/index.es.js
CHANGED