@pstdio/ui 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chat-ui.js +12 -11
- package/dist/chat-ui.js.map +1 -1
- package/dist/components/attached-panel.d.ts +9 -0
- package/dist/components/attached-panel.utils.d.ts +6 -0
- package/dist/components/bubble-button.d.ts +10 -0
- package/dist/components/bubble-panel.d.ts +18 -0
- package/dist/components/chat-ui/components/chat-panel-sticky-user-message.d.ts +1 -1
- package/dist/components/diff-card.d.ts +3 -0
- package/dist/components/diff-drawer.d.ts +1 -0
- package/dist/components/layout.d.ts +1 -2
- package/dist/components/layout.stories.d.ts +3 -3
- package/dist/components/panel-header.constants.d.ts +1 -0
- package/dist/components/rich-text/markdown-editor/markdown-editor.d.ts +1 -0
- package/dist/components/rich-text/shared/components/content-editable.d.ts +2 -1
- package/dist/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/resolve-block-type.d.ts +17 -0
- package/dist/components/rich-text/shared/transformers/markdown-transformers.d.ts +1 -0
- package/dist/components/searchable-menu.d.ts +35 -2
- package/dist/components/searchable-menu.stories.d.ts +2 -0
- package/dist/components/session-indicator.d.ts +2 -2
- package/dist/components/session-indicator.stories.d.ts +1 -0
- package/dist/components/sidebar/sidebar-footer.d.ts +6 -0
- package/dist/components/sidebar/sidebar-header.d.ts +7 -0
- package/dist/components/sidebar/sidebar-project-menu.d.ts +10 -0
- package/dist/components/sidebar/sidebar.d.ts +2 -0
- package/dist/components/sidebar/sidebar.store.d.ts +47 -0
- package/dist/components/{sidebar-next/sidebar-next.stories.d.ts → sidebar/sidebar.stories.d.ts} +4 -3
- package/dist/components/{sidebar-next/sidebar-next.types.d.ts → sidebar/sidebar.types.d.ts} +3 -2
- package/dist/components/sidebar-tree/sidebar-node-content.d.ts +9 -0
- package/dist/components/sidebar-tree/sidebar-tree.d.ts +1 -1
- package/dist/components/sidebar-tree/sidebar-tree.types.d.ts +10 -2
- package/dist/components/style-guide.stories.d.ts +7 -12
- package/dist/components/tickets/ticket-card.d.ts +2 -7
- package/dist/components/workspace-badge.d.ts +22 -0
- package/dist/components/workspace-badge.stories.d.ts +13 -0
- package/dist/get-file-type-icon-CirIyuE8.js +92 -0
- package/dist/get-file-type-icon-CirIyuE8.js.map +1 -0
- package/dist/index.d.ts +18 -19
- package/dist/index.js +1849 -1743
- package/dist/index.js.map +1 -1
- package/dist/{rich-message-ZT2CEiwt.js → rich-message-Bad4GxH2.js} +520 -503
- package/dist/rich-message-Bad4GxH2.js.map +1 -0
- package/dist/rich-text.js +276 -272
- package/dist/rich-text.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/test-utils/local-storage.d.ts +1 -0
- package/dist/theme/global.d.ts +3 -0
- package/dist/theme/primitives/colors.d.ts +116 -0
- package/dist/theme/recipes/button.d.ts +13 -13
- package/dist/theme/recipes/dialog.d.ts +1 -1
- package/dist/theme/recipes/drawer.d.ts +1 -1
- package/dist/theme/recipes/menu.d.ts +1 -1
- package/dist/theme/recipes/popover.d.ts +1 -1
- package/dist/theme/recipes/tooltip.d.ts +1 -1
- package/dist/theme/tokens/colors.d.ts +162 -8
- package/dist/{theme-BFV2Q048.js → theme-D0VvFB1Y.js} +292 -154
- package/dist/theme-D0VvFB1Y.js.map +1 -0
- package/dist/theme.js +1 -1
- package/package.json +2 -2
- package/dist/components/documentation/docs-changelog.d.ts +0 -20
- package/dist/components/documentation/docs-changelog.stories.d.ts +0 -15
- package/dist/components/documentation/docs-outline.d.ts +0 -13
- package/dist/components/documentation/docs-outline.stories.d.ts +0 -16
- package/dist/components/documentation/docs-pagination.d.ts +0 -10
- package/dist/components/documentation/docs-pagination.stories.d.ts +0 -14
- package/dist/components/documentation/docs-sidebar.d.ts +0 -14
- package/dist/components/documentation/docs-sidebar.stories.d.ts +0 -7
- package/dist/components/panel-menu.d.ts +0 -9
- package/dist/components/panel-menu.stories.d.ts +0 -8
- package/dist/components/sidebar-next/sidebar-next-footer.d.ts +0 -6
- package/dist/components/sidebar-next/sidebar-next-header.d.ts +0 -7
- package/dist/components/sidebar-next/sidebar-next.d.ts +0 -2
- package/dist/components/sidebar-next/sidebar-next.store.d.ts +0 -47
- package/dist/components/sidebar-next/sidebar-next.store.test.d.ts +0 -1
- package/dist/rich-message-ZT2CEiwt.js.map +0 -1
- package/dist/theme-BFV2Q048.js.map +0 -1
- package/dist/tooltip-Dze4WXVl.js +0 -86
- package/dist/tooltip-Dze4WXVl.js.map +0 -1
- /package/dist/components/{chat-ui/components/ai-conversation.test.d.ts → attached-panel.utils.test.d.ts} +0 -0
- /package/dist/components/{chat-ui/components/chat-panel.sticky-user-message.test.d.ts → rich-text/shared/transformers/markdown-transformers.test.d.ts} +0 -0
- /package/dist/components/{searchable-menu.test.d.ts → sidebar/sidebar.store.test.d.ts} +0 -0
|
@@ -1,58 +1,60 @@
|
|
|
1
1
|
import { CodeNode as de } from "@lexical/code";
|
|
2
|
-
import { LinkNode as
|
|
3
|
-
import { ListNode as
|
|
4
|
-
import { TRANSFORMERS as
|
|
5
|
-
import { QuoteNode as
|
|
6
|
-
import { jsx as s, jsxs as
|
|
7
|
-
import { chakra as se, Flex as ne, Text as w, Spacer as
|
|
8
|
-
import { DecoratorNode as G, $applyNodeReplacement as
|
|
2
|
+
import { AutoLinkNode as ue, $createAutoLinkNode as it, $isAutoLinkNode as st, LinkNode as Ce } from "@lexical/link";
|
|
3
|
+
import { ListNode as Oe, ListItemNode as ke } from "@lexical/list";
|
|
4
|
+
import { CHECK_LIST as lt, TRANSFORMERS as $e, $convertFromMarkdownString as Ie, $convertToMarkdownString as ct } from "@lexical/markdown";
|
|
5
|
+
import { QuoteNode as ve, HeadingNode as we } from "@lexical/rich-text";
|
|
6
|
+
import { jsx as s, jsxs as A, Fragment as ge } from "react/jsx-runtime";
|
|
7
|
+
import { chakra as se, Flex as ne, Text as w, Spacer as at, IconButton as dt, Box as P, Table as B, Textarea as ut, Tooltip as Z, Kbd as mt } from "@chakra-ui/react";
|
|
8
|
+
import { DecoratorNode as G, $applyNodeReplacement as ft, ElementNode as Pe, TextNode as ee, $createTextNode as me, $nodesOfType as _t, createCommand as O, isHTMLElement as pt, $createParagraphNode as le, COMMAND_PRIORITY_LOW as Le, $getSelection as ht, $isRangeSelection as gt, $isElementNode as xt, KEY_DOWN_COMMAND as Et, COMMAND_PRIORITY_HIGH as bt, $getRoot as Me } from "lexical";
|
|
9
9
|
import { c as C } from "react/compiler-runtime";
|
|
10
|
-
import { MarkNode as
|
|
11
|
-
import { LexicalComposer as
|
|
12
|
-
import { LexicalErrorBoundary as
|
|
13
|
-
import { HistoryPlugin as
|
|
14
|
-
import { OnChangePlugin as
|
|
15
|
-
import { RichTextPlugin as
|
|
16
|
-
import * as
|
|
17
|
-
import { Suspense as
|
|
18
|
-
import { useLexicalComposerContext as
|
|
19
|
-
import { $setBlocksType as
|
|
20
|
-
import { addClassNamesToElement as
|
|
21
|
-
import { LexicalTypeaheadMenuPlugin as
|
|
22
|
-
import * as
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import {
|
|
31
|
-
|
|
32
|
-
|
|
10
|
+
import { MarkNode as St } from "@lexical/mark";
|
|
11
|
+
import { LexicalComposer as Ae } from "@lexical/react/LexicalComposer";
|
|
12
|
+
import { LexicalErrorBoundary as De } from "@lexical/react/LexicalErrorBoundary";
|
|
13
|
+
import { HistoryPlugin as yt } from "@lexical/react/LexicalHistoryPlugin";
|
|
14
|
+
import { OnChangePlugin as Fe } from "@lexical/react/LexicalOnChangePlugin";
|
|
15
|
+
import { RichTextPlugin as He } from "@lexical/react/LexicalRichTextPlugin";
|
|
16
|
+
import * as Rt from "react";
|
|
17
|
+
import { Suspense as Tt, useEffect as U, useImperativeHandle as Nt, useState as Ct, forwardRef as Ot, useRef as kt } from "react";
|
|
18
|
+
import { useLexicalComposerContext as D } from "@lexical/react/LexicalComposerContext";
|
|
19
|
+
import { $setBlocksType as $t } from "@lexical/selection";
|
|
20
|
+
import { addClassNamesToElement as qe, mergeRegister as fe } from "@lexical/utils";
|
|
21
|
+
import { LexicalTypeaheadMenuPlugin as It } from "@lexical/react/LexicalTypeaheadMenuPlugin";
|
|
22
|
+
import * as vt from "react-dom";
|
|
23
|
+
import { ClickableLinkPlugin as wt } from "@lexical/react/LexicalClickableLinkPlugin";
|
|
24
|
+
import { HorizontalRulePlugin as Pt } from "@lexical/react/LexicalHorizontalRulePlugin";
|
|
25
|
+
import { LinkPlugin as Lt } from "@lexical/react/LexicalLinkPlugin";
|
|
26
|
+
import { ListPlugin as Mt } from "@lexical/react/LexicalListPlugin";
|
|
27
|
+
import { ContentEditable as At } from "@lexical/react/LexicalContentEditable";
|
|
28
|
+
import { S as Dt, g as Ft, T as Ht } from "./get-file-type-icon-CirIyuE8.js";
|
|
29
|
+
import qt from "katex";
|
|
30
|
+
import { TreeView as Bt } from "@lexical/react/LexicalTreeView";
|
|
31
|
+
import { X as Ut } from "lucide-react";
|
|
32
|
+
const Jt = se(At);
|
|
33
|
+
function Be(n) {
|
|
33
34
|
const e = C(11), {
|
|
34
35
|
onRef: t,
|
|
35
36
|
fullWidth: r,
|
|
36
37
|
padding: o,
|
|
37
|
-
isRichMessage: i
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
isRichMessage: i,
|
|
39
|
+
scrollable: l
|
|
40
|
+
} = n, c = r === void 0 ? !1 : r, a = i === void 0 ? !1 : i, _ = l === void 0 ? !0 : l, m = c ? "flex-start" : "center", p = c ? "100%" : "720px";
|
|
41
|
+
let f;
|
|
42
|
+
e[0] !== p ? (f = /* @__PURE__ */ s(Jt, { "data-testid": "content-editable", height: "fit-content", minH: "100%", width: "100%", maxWidth: p, textStyle: "paragraph/M/regular", fontSize: "calc(var(--chakra-font-sizes-md) * var(--rich-text-font-scale))", position: "relative", outline: "none" }), e[0] = p, e[1] = f) : f = e[1];
|
|
43
|
+
let d;
|
|
44
|
+
e[2] !== t || e[3] !== o || e[4] !== m || e[5] !== f ? (d = /* @__PURE__ */ s(ne, { ref: t, width: "100%", minH: "100%", padding: o, justifyContent: m, children: f }), e[2] = t, e[3] = o, e[4] = m, e[5] = f, e[6] = d) : d = e[6];
|
|
45
|
+
const u = d;
|
|
46
|
+
if (!_)
|
|
47
|
+
return u;
|
|
48
|
+
const E = a ? "true" : void 0;
|
|
49
|
+
let g;
|
|
50
|
+
e[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (g = {
|
|
41
51
|
width: "100%",
|
|
42
52
|
minH: "100%"
|
|
43
|
-
}, e[
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
e[1] !== p ? (u = /* @__PURE__ */ s(zt, { "data-testid": "content-editable", height: "fit-content", minH: "100%", width: "100%", maxWidth: p, textStyle: "paragraph/M/regular", fontSize: "calc(var(--chakra-font-sizes-md) * var(--rich-text-font-scale))", position: "relative", outline: "none" }), e[1] = p, e[2] = u) : u = e[2];
|
|
47
|
-
let d;
|
|
48
|
-
e[3] !== t || e[4] !== o || e[5] !== _ || e[6] !== u ? (d = /* @__PURE__ */ s(ne, { ref: t, width: "100%", minH: "100%", padding: o, justifyContent: _, children: u }), e[3] = t, e[4] = o, e[5] = _, e[6] = u, e[7] = d) : d = e[7];
|
|
49
|
-
let f;
|
|
50
|
-
return e[8] !== c || e[9] !== d ? (f = /* @__PURE__ */ s(vt, { className: "rich-text", "data-rich-message": c, height: "100%", minH: "0", position: "relative", contentProps: m, children: d }), e[8] = c, e[9] = d, e[10] = f) : f = e[10], f;
|
|
53
|
+
}, e[7] = g) : g = e[7];
|
|
54
|
+
let h;
|
|
55
|
+
return e[8] !== u || e[9] !== E ? (h = /* @__PURE__ */ s(Dt, { className: "rich-text", "data-rich-message": E, height: "100%", minH: "0", position: "relative", contentProps: g, children: u }), e[8] = u, e[9] = E, e[10] = h) : h = e[10], h;
|
|
51
56
|
}
|
|
52
|
-
const
|
|
53
|
-
const e = n.split(".").pop()?.toLowerCase() ?? "";
|
|
54
|
-
return ["csv", "tsv", "xlsx", "xls", "parquet"].includes(e) ? Mt : ["sql", "py", "js", "ts", "jsx", "tsx", "java", "cpp", "c", "h", "css", "scss", "sass", "php", "rb", "go", "rs", "kt", "swift"].includes(e) ? Dt : ["json", "jsonl", "ndjson"].includes(e) ? n.includes("/visualizations/") ? At : Ft : ["md", "txt", "rst", "org", "pdf", "doc", "docx", "rtf"].includes(e) ? qt : ["yaml", "yml", "toml", "ini", "conf", "config"].includes(e) ? Ht : ["png", "jpg", "jpeg", "gif", "svg", "webp", "ico"].includes(e) ? jt : ["zip", "tar", "gz", "rar", "7z"].includes(e) ? Bt : Ut;
|
|
55
|
-
}, Kt = {
|
|
57
|
+
const jt = {
|
|
56
58
|
sm: {
|
|
57
59
|
container: {
|
|
58
60
|
height: "20px",
|
|
@@ -75,7 +77,7 @@ const Wt = (n) => {
|
|
|
75
77
|
iconSize: 14,
|
|
76
78
|
textStyle: "sm"
|
|
77
79
|
}
|
|
78
|
-
},
|
|
80
|
+
}, zt = {
|
|
79
81
|
neutral: {
|
|
80
82
|
color: "color.primary",
|
|
81
83
|
bg: "bg.muted",
|
|
@@ -90,53 +92,53 @@ const Wt = (n) => {
|
|
|
90
92
|
bg: "var(--schub-accent-subtle)"
|
|
91
93
|
}
|
|
92
94
|
}
|
|
93
|
-
},
|
|
95
|
+
}, Wt = "md", Kt = "neutral", Ue = (n) => {
|
|
94
96
|
const e = C(39);
|
|
95
|
-
let t, r, o, i, l,
|
|
97
|
+
let t, r, o, i, l, c, a;
|
|
96
98
|
e[0] !== n ? ({
|
|
97
99
|
fileName: t,
|
|
98
100
|
onSelect: i,
|
|
99
101
|
onRemove: o,
|
|
100
|
-
size:
|
|
101
|
-
tone:
|
|
102
|
+
size: c,
|
|
103
|
+
tone: a,
|
|
102
104
|
icon: r,
|
|
103
105
|
...l
|
|
104
|
-
} = n, e[0] = n, e[1] = t, e[2] = r, e[3] = o, e[4] = i, e[5] = l, e[6] =
|
|
105
|
-
const
|
|
106
|
+
} = n, e[0] = n, e[1] = t, e[2] = r, e[3] = o, e[4] = i, e[5] = l, e[6] = c, e[7] = a) : (t = e[1], r = e[2], o = e[3], i = e[4], l = e[5], c = e[6], a = e[7]);
|
|
107
|
+
const _ = c === void 0 ? Wt : c, m = a === void 0 ? Kt : a;
|
|
106
108
|
let p;
|
|
107
|
-
e[8] !== t ? (p =
|
|
108
|
-
const
|
|
109
|
-
let
|
|
110
|
-
e[10] !== t || e[11] !== i ? (
|
|
111
|
-
|
|
112
|
-
}, e[10] = t, e[11] = i, e[12] =
|
|
113
|
-
let
|
|
114
|
-
e[13] !==
|
|
115
|
-
let N;
|
|
116
|
-
e[17] !== y ? (N = /* @__PURE__ */ s(se.span, { mr: "xs", display: "inline-flex", children: y }), e[17] = y, e[18] = N) : N = e[18];
|
|
117
|
-
let b;
|
|
118
|
-
e[19] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (b = {
|
|
119
|
-
base: "14rem"
|
|
120
|
-
}, e[19] = b) : b = e[19];
|
|
121
|
-
let T;
|
|
122
|
-
e[20] !== t || e[21] !== d.textStyle ? (T = /* @__PURE__ */ s(w, { maxW: b, textOverflow: "ellipsis", whiteSpace: "nowrap", overflow: "hidden", textStyle: d.textStyle, children: t }), e[20] = t, e[21] = d.textStyle, e[22] = T) : T = e[22];
|
|
123
|
-
let E;
|
|
124
|
-
e[23] !== t || e[24] !== T ? (E = /* @__PURE__ */ s(wt, { content: t, children: T }), e[23] = t, e[24] = T, e[25] = E) : E = e[25];
|
|
109
|
+
e[8] !== t ? (p = Ft(t), e[8] = t, e[9] = p) : p = e[9];
|
|
110
|
+
const f = p, d = jt[_], u = zt[m], E = i ? "pointer" : "default";
|
|
111
|
+
let g;
|
|
112
|
+
e[10] !== t || e[11] !== i ? (g = (k) => {
|
|
113
|
+
k.stopPropagation(), i?.(t);
|
|
114
|
+
}, e[10] = t, e[11] = i, e[12] = g) : g = e[12];
|
|
115
|
+
let h;
|
|
116
|
+
e[13] !== f || e[14] !== r || e[15] !== d.iconSize ? (h = r ?? /* @__PURE__ */ s(f, { size: d.iconSize }), e[13] = f, e[14] = r, e[15] = d.iconSize, e[16] = h) : h = e[16];
|
|
125
117
|
let R;
|
|
126
|
-
e[
|
|
118
|
+
e[17] !== h ? (R = /* @__PURE__ */ s(se.span, { mr: "xs", display: "inline-flex", children: h }), e[17] = h, e[18] = R) : R = e[18];
|
|
127
119
|
let S;
|
|
128
|
-
e[
|
|
120
|
+
e[19] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (S = {
|
|
121
|
+
base: "14rem"
|
|
122
|
+
}, e[19] = S) : S = e[19];
|
|
123
|
+
let T;
|
|
124
|
+
e[20] !== t || e[21] !== d.textStyle ? (T = /* @__PURE__ */ s(w, { maxW: S, textOverflow: "ellipsis", whiteSpace: "nowrap", overflow: "hidden", textStyle: d.textStyle, children: t }), e[20] = t, e[21] = d.textStyle, e[22] = T) : T = e[22];
|
|
125
|
+
let b;
|
|
126
|
+
e[23] !== t || e[24] !== T ? (b = /* @__PURE__ */ s(Ht, { content: t, children: T }), e[23] = t, e[24] = T, e[25] = b) : b = e[25];
|
|
127
|
+
let N;
|
|
128
|
+
e[26] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (N = /* @__PURE__ */ s(at, {}), e[26] = N) : N = e[26];
|
|
129
|
+
let y;
|
|
130
|
+
e[27] !== t || e[28] !== o ? (y = o && /* @__PURE__ */ s(dt, { "aria-label": "Remove reference", size: "2xs", ml: "xs", variant: "ghost", _hover: {
|
|
129
131
|
bg: "transparent"
|
|
130
|
-
}, onClick: (
|
|
131
|
-
|
|
132
|
-
}, children: /* @__PURE__ */ s(
|
|
133
|
-
let
|
|
134
|
-
return e[30] !== l || e[31] !== d.container || e[32] !==
|
|
135
|
-
N,
|
|
136
|
-
E,
|
|
132
|
+
}, onClick: (k) => {
|
|
133
|
+
k.stopPropagation(), o?.(t);
|
|
134
|
+
}, children: /* @__PURE__ */ s(Ut, { size: 12 }) }), e[27] = t, e[28] = o, e[29] = y) : y = e[29];
|
|
135
|
+
let x;
|
|
136
|
+
return e[30] !== l || e[31] !== d.container || e[32] !== y || e[33] !== E || e[34] !== g || e[35] !== R || e[36] !== b || e[37] !== u ? (x = /* @__PURE__ */ A(se.span, { display: "flex", flexDirection: "row", alignItems: "center", borderRadius: "xs", gap: "2xs", cursor: E, ...u, ...d.container, onClick: g, ...l, children: [
|
|
137
137
|
R,
|
|
138
|
-
|
|
139
|
-
|
|
138
|
+
b,
|
|
139
|
+
N,
|
|
140
|
+
y
|
|
141
|
+
] }), e[30] = l, e[31] = d.container, e[32] = y, e[33] = E, e[34] = g, e[35] = R, e[36] = b, e[37] = u, e[38] = x) : x = e[38], x;
|
|
140
142
|
};
|
|
141
143
|
let re = class ce extends G {
|
|
142
144
|
__href;
|
|
@@ -168,46 +170,46 @@ let re = class ce extends G {
|
|
|
168
170
|
};
|
|
169
171
|
}
|
|
170
172
|
static importJSON(e) {
|
|
171
|
-
return
|
|
173
|
+
return Je(e.href, e.label);
|
|
172
174
|
}
|
|
173
175
|
decorate(e, t) {
|
|
174
|
-
const r = this.__href, i = r.split("/").pop() || "unknown", l = /^https?:\/\//i.test(r),
|
|
175
|
-
return /* @__PURE__ */ s(P, { width: "fit-content", display: "inline-block", children: /* @__PURE__ */ s(
|
|
176
|
+
const r = this.__href, i = r.split("/").pop() || "unknown", l = /^https?:\/\//i.test(r), c = /^#?\$PROJECT\//i.test(r);
|
|
177
|
+
return /* @__PURE__ */ s(P, { width: "fit-content", display: "inline-block", children: /* @__PURE__ */ s(Ue, { fileName: i, onSelect: () => {
|
|
176
178
|
if (l)
|
|
177
179
|
window.open(r, "_blank", "noopener,noreferrer");
|
|
178
|
-
else if (
|
|
179
|
-
const
|
|
180
|
-
detail:
|
|
180
|
+
else if (c) {
|
|
181
|
+
const a = r.replace(/^#?\$PROJECT\//i, ""), _ = new CustomEvent("ui:open-project-file", {
|
|
182
|
+
detail: a
|
|
181
183
|
});
|
|
182
|
-
window.dispatchEvent(
|
|
184
|
+
window.dispatchEvent(_);
|
|
183
185
|
} else
|
|
184
186
|
window.location.assign(r);
|
|
185
187
|
} }) });
|
|
186
188
|
}
|
|
187
189
|
};
|
|
188
|
-
function
|
|
190
|
+
function Je(n, e) {
|
|
189
191
|
return new re(n, e);
|
|
190
192
|
}
|
|
191
|
-
function
|
|
193
|
+
function Vt(n) {
|
|
192
194
|
return n instanceof re;
|
|
193
195
|
}
|
|
194
|
-
const
|
|
196
|
+
const xe = /\{\{\s*link\((['"])([^'"\s]+)\1\)\s*\}\}/, Xt = {
|
|
195
197
|
dependencies: [re],
|
|
196
198
|
export: (n) => {
|
|
197
|
-
if (
|
|
199
|
+
if (Vt(n)) {
|
|
198
200
|
const e = n.__href, t = n.__label ?? e;
|
|
199
201
|
return t ? `{{link('${t}')}}` : `{{link('${e}')}}`;
|
|
200
202
|
}
|
|
201
203
|
return null;
|
|
202
204
|
},
|
|
203
|
-
regExp:
|
|
204
|
-
importRegExp:
|
|
205
|
+
regExp: xe,
|
|
206
|
+
importRegExp: xe,
|
|
205
207
|
replace: (n, e) => {
|
|
206
208
|
const t = e[2], o = /^(https?:\/\/|\/)/i.test(t) ? t : `#${t}`, i = t;
|
|
207
|
-
n.replace(
|
|
209
|
+
n.replace(Je(o, i));
|
|
208
210
|
},
|
|
209
211
|
type: "text-match"
|
|
210
|
-
},
|
|
212
|
+
}, _e = {
|
|
211
213
|
code: "rich-text__code",
|
|
212
214
|
codeHighlight: {
|
|
213
215
|
atrule: "rich-text__tokenAttr",
|
|
@@ -281,82 +283,82 @@ const he = /\{\{\s*link\((['"])([^'"\s]+)\1\)\s*\}\}/, Qt = {
|
|
|
281
283
|
row: "rich-text__row",
|
|
282
284
|
content: "rich-text__content"
|
|
283
285
|
}
|
|
284
|
-
}, V = "calc(var(--chakra-font-sizes-sm) * var(--rich-text-font-scale))",
|
|
286
|
+
}, V = "calc(var(--chakra-font-sizes-sm) * var(--rich-text-font-scale))", Gt = (n) => n == null ? "-" : typeof n == "string" ? n.length ? n : "-" : typeof n == "number" || typeof n == "boolean" ? String(n).toUpperCase() : n instanceof Date ? n.toISOString() : JSON.stringify(n), Yt = (n) => {
|
|
285
287
|
const e = C(6), {
|
|
286
288
|
defaultCode: t,
|
|
287
289
|
isEditable: r,
|
|
288
290
|
showLineNumbers: o,
|
|
289
291
|
disableScroll: i
|
|
290
|
-
} = n, l = t === void 0 ? "" : t,
|
|
291
|
-
if (
|
|
292
|
+
} = n, l = t === void 0 ? "" : t, c = r === void 0 ? !1 : r, a = o === void 0 ? !1 : o, _ = i === void 0 ? !1 : i;
|
|
293
|
+
if (c) {
|
|
292
294
|
let p;
|
|
293
|
-
return e[0] !== l ? (p = /* @__PURE__ */ s(
|
|
295
|
+
return e[0] !== l ? (p = /* @__PURE__ */ s(ut, { defaultValue: l, fontFamily: "mono", fontSize: V, resize: "vertical", minHeight: "100%" }), e[0] = l, e[1] = p) : p = e[1], p;
|
|
294
296
|
}
|
|
295
|
-
let
|
|
296
|
-
if (e[2] !== l || e[3] !==
|
|
297
|
-
const p =
|
|
297
|
+
let m;
|
|
298
|
+
if (e[2] !== l || e[3] !== _ || e[4] !== a) {
|
|
299
|
+
const p = a ? l.split(`
|
|
298
300
|
`) : [l];
|
|
299
|
-
|
|
301
|
+
m = /* @__PURE__ */ s(P, { as: "pre", margin: 0, padding: "sm", fontFamily: "mono", fontSize: V, lineHeight: "1.5", overflowY: _ ? "hidden" : "auto", background: "bg.muted", borderRadius: "md", width: "100%", children: a ? /* @__PURE__ */ s(P, { as: "code", display: "grid", gridTemplateColumns: "auto 1fr", columnGap: "sm", children: p.map(Zt) }) : /* @__PURE__ */ s(P, { as: "code", children: l }) }), e[2] = l, e[3] = _, e[4] = a, e[5] = m;
|
|
300
302
|
} else
|
|
301
|
-
|
|
302
|
-
return
|
|
303
|
-
},
|
|
303
|
+
m = e[5];
|
|
304
|
+
return m;
|
|
305
|
+
}, Qt = (n) => {
|
|
304
306
|
const e = C(26), {
|
|
305
307
|
data: t,
|
|
306
308
|
fullWidth: r,
|
|
307
309
|
noBorder: o,
|
|
308
310
|
hiddenColumns: i
|
|
309
|
-
} = n, l = r === void 0 ? !1 : r,
|
|
310
|
-
let
|
|
311
|
-
e[0] !== i ? (
|
|
312
|
-
const
|
|
311
|
+
} = n, l = r === void 0 ? !1 : r, c = o === void 0 ? !1 : o;
|
|
312
|
+
let a;
|
|
313
|
+
e[0] !== i ? (a = i === void 0 ? [] : i, e[0] = i, e[1] = a) : a = e[1];
|
|
314
|
+
const _ = a;
|
|
313
315
|
if (!t.length) {
|
|
314
|
-
const
|
|
315
|
-
let
|
|
316
|
-
e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
317
|
-
let
|
|
318
|
-
return e[3] !==
|
|
316
|
+
const b = c ? "0" : "1px";
|
|
317
|
+
let N;
|
|
318
|
+
e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (N = /* @__PURE__ */ s(w, { textStyle: "label/S/regular", fontSize: V, color: "fg.muted", children: "No data" }), e[2] = N) : N = e[2];
|
|
319
|
+
let y;
|
|
320
|
+
return e[3] !== b ? (y = /* @__PURE__ */ s(P, { padding: "sm", borderWidth: b, borderColor: "border.muted", children: N }), e[3] = b, e[4] = y) : y = e[4], y;
|
|
319
321
|
}
|
|
320
|
-
let
|
|
321
|
-
e[5] !==
|
|
322
|
-
const p =
|
|
323
|
-
let
|
|
324
|
-
e[7] !== t[0] ? (
|
|
322
|
+
let m;
|
|
323
|
+
e[5] !== _ ? (m = new Set(_), e[5] = _, e[6] = m) : m = e[6];
|
|
324
|
+
const p = m;
|
|
325
|
+
let f;
|
|
326
|
+
e[7] !== t[0] ? (f = Object.keys(t[0] ?? {}), e[7] = t[0], e[8] = f) : f = e[8];
|
|
325
327
|
let d;
|
|
326
|
-
e[9] !== p || e[10] !==
|
|
327
|
-
const
|
|
328
|
-
let
|
|
329
|
-
e[12] !==
|
|
330
|
-
let
|
|
331
|
-
if (e[14] !==
|
|
332
|
-
let
|
|
333
|
-
e[17] !==
|
|
328
|
+
e[9] !== p || e[10] !== f ? (d = f.filter((b) => !p.has(b)), e[9] = p, e[10] = f, e[11] = d) : d = e[11];
|
|
329
|
+
const u = d, E = l ? "100%" : "fit-content", g = c ? "0" : "1px";
|
|
330
|
+
let h;
|
|
331
|
+
e[12] !== u ? (h = /* @__PURE__ */ s(B.Header, { children: /* @__PURE__ */ s(B.Row, { background: "bg.muted", children: u.map(en) }) }), e[12] = u, e[13] = h) : h = e[13];
|
|
332
|
+
let R;
|
|
333
|
+
if (e[14] !== u || e[15] !== t) {
|
|
334
|
+
let b;
|
|
335
|
+
e[17] !== u ? (b = (N, y) => /* @__PURE__ */ s(B.Row, { children: u.map((x) => /* @__PURE__ */ s(B.Cell, { paddingX: "xs", paddingY: "2xs", children: /* @__PURE__ */ s(w, { textStyle: "paragraph/S/regular", fontSize: V, children: Gt(N[x]) }) }, `${y}-${x}`)) }, `${y}-${u.join("-")}`), e[17] = u, e[18] = b) : b = e[18], R = t.map(b), e[14] = u, e[15] = t, e[16] = R;
|
|
334
336
|
} else
|
|
335
|
-
|
|
336
|
-
let
|
|
337
|
-
e[19] !==
|
|
337
|
+
R = e[16];
|
|
338
|
+
let S;
|
|
339
|
+
e[19] !== R ? (S = /* @__PURE__ */ s(B.Body, { children: R }), e[19] = R, e[20] = S) : S = e[20];
|
|
338
340
|
let T;
|
|
339
|
-
return e[21] !==
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
] }) }), e[21] =
|
|
341
|
+
return e[21] !== S || e[22] !== E || e[23] !== g || e[24] !== h ? (T = /* @__PURE__ */ s(B.ScrollArea, { overflowX: "auto", maxWidth: "100%", children: /* @__PURE__ */ A(B.Root, { size: "sm", width: E, borderWidth: g, borderColor: "border.muted", children: [
|
|
342
|
+
h,
|
|
343
|
+
S
|
|
344
|
+
] }) }), e[21] = S, e[22] = E, e[23] = g, e[24] = h, e[25] = T) : T = e[25], T;
|
|
343
345
|
};
|
|
344
|
-
function
|
|
345
|
-
return /* @__PURE__ */
|
|
346
|
+
function Zt(n, e) {
|
|
347
|
+
return /* @__PURE__ */ A(P, { as: "span", display: "contents", children: [
|
|
346
348
|
/* @__PURE__ */ s(w, { as: "span", color: "fg.muted", textAlign: "right", fontSize: "inherit", children: e + 1 }),
|
|
347
349
|
/* @__PURE__ */ s(w, { as: "span", fontSize: "inherit", children: n.length ? n : " " })
|
|
348
350
|
] }, `${e}-${n}`);
|
|
349
351
|
}
|
|
350
|
-
function
|
|
351
|
-
return /* @__PURE__ */ s(
|
|
352
|
+
function en(n) {
|
|
353
|
+
return /* @__PURE__ */ s(B.ColumnHeader, { textTransform: "none", paddingX: "xs", paddingY: "2xs", children: /* @__PURE__ */ s(w, { textStyle: "label/S/medium", fontSize: V, children: n }) }, n);
|
|
352
354
|
}
|
|
353
|
-
class
|
|
355
|
+
class j extends G {
|
|
354
356
|
__data;
|
|
355
357
|
static getType() {
|
|
356
358
|
return "data_table";
|
|
357
359
|
}
|
|
358
360
|
static clone(e) {
|
|
359
|
-
return new
|
|
361
|
+
return new j(e.__data, e.__key);
|
|
360
362
|
}
|
|
361
363
|
constructor(e, t) {
|
|
362
364
|
super(t), this.__data = e;
|
|
@@ -371,7 +373,7 @@ class U extends G {
|
|
|
371
373
|
return !1;
|
|
372
374
|
}
|
|
373
375
|
decorate() {
|
|
374
|
-
return /* @__PURE__ */ s(
|
|
376
|
+
return /* @__PURE__ */ s(Qt, { fullWidth: !0, isReadOnly: !0, data: this.__data });
|
|
375
377
|
}
|
|
376
378
|
exportJSON() {
|
|
377
379
|
return {
|
|
@@ -381,7 +383,7 @@ class U extends G {
|
|
|
381
383
|
};
|
|
382
384
|
}
|
|
383
385
|
static importJSON(e) {
|
|
384
|
-
return new
|
|
386
|
+
return new j(e.data);
|
|
385
387
|
}
|
|
386
388
|
getTextContent() {
|
|
387
389
|
if (!this.__data.length) return "";
|
|
@@ -390,11 +392,11 @@ class U extends G {
|
|
|
390
392
|
`);
|
|
391
393
|
}
|
|
392
394
|
}
|
|
393
|
-
function
|
|
394
|
-
return new
|
|
395
|
+
function Ee(n) {
|
|
396
|
+
return new j(n);
|
|
395
397
|
}
|
|
396
|
-
function
|
|
397
|
-
return n instanceof
|
|
398
|
+
function be(n) {
|
|
399
|
+
return n instanceof j;
|
|
398
400
|
}
|
|
399
401
|
class K extends G {
|
|
400
402
|
__language;
|
|
@@ -436,25 +438,25 @@ ${this.__code}
|
|
|
436
438
|
\`\`\``;
|
|
437
439
|
}
|
|
438
440
|
decorate() {
|
|
439
|
-
return /* @__PURE__ */ s(P, { borderRadius: "md", overflow: "hidden", children: /* @__PURE__ */ s(
|
|
441
|
+
return /* @__PURE__ */ s(P, { borderRadius: "md", overflow: "hidden", children: /* @__PURE__ */ s(Yt, { language: this.__language || "plaintext", defaultCode: this.__code, isEditable: !1, showLineNumbers: !0, disableScroll: !0 }) });
|
|
440
442
|
}
|
|
441
443
|
}
|
|
442
|
-
const
|
|
443
|
-
function
|
|
444
|
+
const tn = Rt.lazy(() => import("./EquationComponent-DeDYHvqY.js"));
|
|
445
|
+
function Se(n) {
|
|
444
446
|
let e = n.getAttribute("data-lexical-equation");
|
|
445
447
|
const t = n.getAttribute("data-lexical-inline") === "true";
|
|
446
448
|
return e = atob(e || ""), e ? {
|
|
447
449
|
node: oe(e, t)
|
|
448
450
|
} : null;
|
|
449
451
|
}
|
|
450
|
-
class
|
|
452
|
+
class J extends G {
|
|
451
453
|
__equation;
|
|
452
454
|
__inline;
|
|
453
455
|
static getType() {
|
|
454
456
|
return "equation";
|
|
455
457
|
}
|
|
456
458
|
static clone(e) {
|
|
457
|
-
return new
|
|
459
|
+
return new J(e.__equation, e.__inline, e.__key);
|
|
458
460
|
}
|
|
459
461
|
constructor(e, t, r) {
|
|
460
462
|
super(r), this.__equation = e, this.__inline = t ?? !1;
|
|
@@ -476,7 +478,7 @@ class B extends G {
|
|
|
476
478
|
}
|
|
477
479
|
exportDOM() {
|
|
478
480
|
const e = document.createElement(this.__inline ? "span" : "div"), t = btoa(this.__equation);
|
|
479
|
-
return e.setAttribute("data-lexical-equation", t), e.setAttribute("data-lexical-inline", `${this.__inline}`),
|
|
481
|
+
return e.setAttribute("data-lexical-equation", t), e.setAttribute("data-lexical-inline", `${this.__inline}`), qt.render(this.__equation, e, {
|
|
480
482
|
displayMode: !this.__inline,
|
|
481
483
|
// true === block display //
|
|
482
484
|
errorColor: "#cc0000",
|
|
@@ -491,11 +493,11 @@ class B extends G {
|
|
|
491
493
|
static importDOM() {
|
|
492
494
|
return {
|
|
493
495
|
div: (e) => e.hasAttribute("data-lexical-equation") ? {
|
|
494
|
-
conversion:
|
|
496
|
+
conversion: Se,
|
|
495
497
|
priority: 2
|
|
496
498
|
} : null,
|
|
497
499
|
span: (e) => e.hasAttribute("data-lexical-equation") ? {
|
|
498
|
-
conversion:
|
|
500
|
+
conversion: Se,
|
|
499
501
|
priority: 1
|
|
500
502
|
} : null
|
|
501
503
|
};
|
|
@@ -517,19 +519,19 @@ class B extends G {
|
|
|
517
519
|
return this.__inline;
|
|
518
520
|
}
|
|
519
521
|
decorate() {
|
|
520
|
-
return /* @__PURE__ */ s(
|
|
522
|
+
return /* @__PURE__ */ s(Tt, { fallback: null, children: /* @__PURE__ */ s(tn, { equation: this.__equation, inline: this.__inline }) });
|
|
521
523
|
}
|
|
522
524
|
}
|
|
523
525
|
function oe(n = "", e = !1) {
|
|
524
|
-
const t = new
|
|
525
|
-
return
|
|
526
|
+
const t = new J(n, e);
|
|
527
|
+
return ft(t);
|
|
526
528
|
}
|
|
527
|
-
function
|
|
528
|
-
return n instanceof
|
|
529
|
+
function je(n) {
|
|
530
|
+
return n instanceof J;
|
|
529
531
|
}
|
|
530
|
-
const
|
|
531
|
-
dependencies: [
|
|
532
|
-
export: (n) =>
|
|
532
|
+
const ze = {
|
|
533
|
+
dependencies: [J],
|
|
534
|
+
export: (n) => je(n) && n.isInline() ? `\\( ${n.getEquation().trim()} \\)` : null,
|
|
533
535
|
importRegExp: /\\\((.*?)\\\)/,
|
|
534
536
|
regExp: /\\\((.*?)\\\)/,
|
|
535
537
|
replace: (n, e) => {
|
|
@@ -537,26 +539,26 @@ const Ue = {
|
|
|
537
539
|
n.replace(t);
|
|
538
540
|
},
|
|
539
541
|
type: "text-match"
|
|
540
|
-
},
|
|
541
|
-
dependencies: [
|
|
542
|
+
}, We = {
|
|
543
|
+
dependencies: [J],
|
|
542
544
|
regExpStart: /\\\[/,
|
|
543
545
|
regExpEnd: /\\]/,
|
|
544
|
-
export: (n) =>
|
|
546
|
+
export: (n) => je(n) && !n.isInline() ? `\\[ ${n.getEquation().trim()} \\]` : null,
|
|
545
547
|
replace: (n, e, t, r, o) => o ? (n.append(oe(o.join(" "), !1)), !0) : !1,
|
|
546
548
|
type: "multiline-element"
|
|
547
549
|
};
|
|
548
|
-
function
|
|
550
|
+
function nn() {
|
|
549
551
|
return null;
|
|
550
552
|
}
|
|
551
|
-
class
|
|
553
|
+
class W extends Pe {
|
|
552
554
|
static getType() {
|
|
553
555
|
return "hr";
|
|
554
556
|
}
|
|
555
557
|
static clone(e) {
|
|
556
|
-
return new
|
|
558
|
+
return new W(e?.__key);
|
|
557
559
|
}
|
|
558
560
|
static importJSON(e) {
|
|
559
|
-
return
|
|
561
|
+
return Ke();
|
|
560
562
|
}
|
|
561
563
|
exportJSON() {
|
|
562
564
|
return {
|
|
@@ -574,29 +576,29 @@ class z extends Ie {
|
|
|
574
576
|
return null;
|
|
575
577
|
}
|
|
576
578
|
}
|
|
577
|
-
function
|
|
578
|
-
return new
|
|
579
|
+
function Ke() {
|
|
580
|
+
return new W();
|
|
579
581
|
}
|
|
580
|
-
function
|
|
581
|
-
return n instanceof
|
|
582
|
+
function rn(n) {
|
|
583
|
+
return n instanceof W;
|
|
582
584
|
}
|
|
583
|
-
const
|
|
584
|
-
dependencies: [
|
|
585
|
-
export: (n) =>
|
|
585
|
+
const on = {
|
|
586
|
+
dependencies: [W],
|
|
587
|
+
export: (n) => rn(n) ? "***" : null,
|
|
586
588
|
regExp: /^(---|\*\*\*|___)\s?$/,
|
|
587
589
|
replace: (n) => {
|
|
588
|
-
const e =
|
|
590
|
+
const e = Ke();
|
|
589
591
|
n.replace(e);
|
|
590
592
|
},
|
|
591
593
|
type: "element"
|
|
592
|
-
},
|
|
594
|
+
}, sn = {
|
|
593
595
|
dependencies: [],
|
|
594
596
|
export: (n, e) => {
|
|
595
|
-
if (
|
|
597
|
+
if (be(n)) {
|
|
596
598
|
const t = n.getData();
|
|
597
599
|
if (!t.length) return "";
|
|
598
|
-
const r = Object.keys(t[0]), o = r.join(" | "), i = r.map(() => "---").join(" | "), l = t.map((
|
|
599
|
-
return [`| ${o} |`, `| ${i} |`, ...l.map((
|
|
600
|
+
const r = Object.keys(t[0]), o = r.join(" | "), i = r.map(() => "---").join(" | "), l = t.map((c) => r.map((a) => String(c[a] || "")).join(" | "));
|
|
601
|
+
return [`| ${o} |`, `| ${i} |`, ...l.map((c) => `| ${c} |`)].join(`
|
|
600
602
|
`);
|
|
601
603
|
}
|
|
602
604
|
return null;
|
|
@@ -608,26 +610,26 @@ const cn = {
|
|
|
608
610
|
n.remove();
|
|
609
611
|
return;
|
|
610
612
|
}
|
|
611
|
-
const l = t[0].split("|").slice(1, -1).map((
|
|
612
|
-
if (o?.getType() === "data_table" &&
|
|
613
|
-
const
|
|
614
|
-
l.forEach((d,
|
|
615
|
-
const
|
|
616
|
-
|
|
613
|
+
const l = t[0].split("|").slice(1, -1).map((c) => c.trim());
|
|
614
|
+
if (o?.getType() === "data_table" && be(o)) {
|
|
615
|
+
const c = o.getData(), a = {}, _ = c.length === 1 && Object.values(c[0]).every((d) => d === ""), m = c.length > 0 ? Object.keys(c[0]) : l.map((d, u) => `col_${u}`);
|
|
616
|
+
l.forEach((d, u) => {
|
|
617
|
+
const E = m[u] || `col_${u}`;
|
|
618
|
+
a[E] = d;
|
|
617
619
|
});
|
|
618
|
-
const p =
|
|
619
|
-
o.replace(
|
|
620
|
+
const p = _ ? [a] : [...c, a], f = Ee(p);
|
|
621
|
+
o.replace(f), n.remove();
|
|
620
622
|
} else {
|
|
621
|
-
const
|
|
622
|
-
l.forEach((
|
|
623
|
-
|
|
623
|
+
const c = {};
|
|
624
|
+
l.forEach((_, m) => {
|
|
625
|
+
c[_ || `col_${m}`] = "";
|
|
624
626
|
});
|
|
625
|
-
const
|
|
626
|
-
n.replace(
|
|
627
|
+
const a = Ee([c]);
|
|
628
|
+
n.replace(a);
|
|
627
629
|
}
|
|
628
630
|
},
|
|
629
631
|
type: "element"
|
|
630
|
-
},
|
|
632
|
+
}, ln = {
|
|
631
633
|
dependencies: [ee],
|
|
632
634
|
export: (n, e) => {
|
|
633
635
|
if (n instanceof ee) {
|
|
@@ -647,52 +649,62 @@ const cn = {
|
|
|
647
649
|
regExp: /<ins>(.*)<\/ins>/,
|
|
648
650
|
importRegExp: /<ins>(.*)<\/ins>/,
|
|
649
651
|
replace: (n, e) => {
|
|
650
|
-
const t =
|
|
652
|
+
const t = me(e[1]);
|
|
651
653
|
t.toggleFormat("underline"), n.replace(t);
|
|
652
654
|
},
|
|
653
655
|
type: "text-match"
|
|
654
|
-
},
|
|
656
|
+
}, cn = {
|
|
655
657
|
dependencies: [ee],
|
|
656
658
|
export: (n, e) => null,
|
|
657
659
|
regExp: /<u>(.*)<\/u>/,
|
|
658
660
|
importRegExp: /<u>(.*)<\/u>/,
|
|
659
661
|
replace: (n, e) => {
|
|
660
|
-
const t =
|
|
662
|
+
const t = me(e[1]);
|
|
661
663
|
t.toggleFormat("underline"), n.replace(t);
|
|
662
664
|
},
|
|
663
665
|
type: "text-match"
|
|
664
|
-
},
|
|
665
|
-
|
|
666
|
-
|
|
666
|
+
}, ye = /https?:\/\/[^\s<>"']*[^\s<>"'.,:;"')\]}]/, an = {
|
|
667
|
+
dependencies: [ue],
|
|
668
|
+
export: (n, e) => st(n) ? e(n) : null,
|
|
669
|
+
regExp: ye,
|
|
670
|
+
importRegExp: ye,
|
|
671
|
+
replace: (n, e) => {
|
|
672
|
+
const t = e[0], r = it(t), o = me(t);
|
|
673
|
+
o.setFormat(n.getFormat()), r.append(o), n.replace(r);
|
|
674
|
+
},
|
|
675
|
+
type: "text-match"
|
|
676
|
+
}, Ve = [sn, on, ln, cn, an], Wr = [ve, Ce, ue, j, we, Oe, ke, de, K, J, W, re], Kr = [lt, ...$e, ...Ve, ze, We, Xt], Vr = _e;
|
|
677
|
+
function dn() {
|
|
678
|
+
const n = C(3), [e] = D();
|
|
667
679
|
let t, r;
|
|
668
680
|
return n[0] !== e ? (t = () => {
|
|
669
|
-
e.update(
|
|
670
|
-
}, r = [e], n[0] = e, n[1] = t, n[2] = r) : (t = n[1], r = n[2]),
|
|
681
|
+
e.update(un);
|
|
682
|
+
}, r = [e], n[0] = e, n[1] = t, n[2] = r) : (t = n[1], r = n[2]), U(t, r), null;
|
|
671
683
|
}
|
|
672
|
-
function
|
|
673
|
-
const n =
|
|
684
|
+
function un() {
|
|
685
|
+
const n = _t(de);
|
|
674
686
|
for (const e of n) {
|
|
675
687
|
const t = e.getLanguage() ?? "plaintext", r = e.getTextContent();
|
|
676
688
|
e.replace(new K(t, r));
|
|
677
689
|
}
|
|
678
690
|
}
|
|
679
|
-
function
|
|
691
|
+
function Xe(n) {
|
|
680
692
|
const e = C(4), {
|
|
681
693
|
isEditable: t
|
|
682
|
-
} = n, [r] =
|
|
694
|
+
} = n, [r] = D();
|
|
683
695
|
let o, i;
|
|
684
696
|
return e[0] !== r || e[1] !== t ? (o = () => {
|
|
685
697
|
r.setEditable(t);
|
|
686
|
-
}, i = [t, r], e[0] = r, e[1] = t, e[2] = o, e[3] = i) : (o = e[2], i = e[3]),
|
|
698
|
+
}, i = [t, r], e[0] = r, e[1] = t, e[2] = o, e[3] = i) : (o = e[2], i = e[3]), U(o, i), null;
|
|
687
699
|
}
|
|
688
|
-
function
|
|
689
|
-
const n = C(2), [e] =
|
|
700
|
+
function Ge() {
|
|
701
|
+
const n = C(2), [e] = D();
|
|
690
702
|
let t;
|
|
691
|
-
return n[0] !== e ? (t = /* @__PURE__ */ s(P, { fontSize: "xs", color: "fg.muted", padding: "4", children: /* @__PURE__ */ s(
|
|
703
|
+
return n[0] !== e ? (t = /* @__PURE__ */ s(P, { fontSize: "xs", color: "fg.muted", padding: "4", children: /* @__PURE__ */ s(Bt, { treeTypeButtonClassName: "debug-treetype-button", timeTravelButtonClassName: "debug-timetravel-button", timeTravelPanelButtonClassName: "debug-timetravel-button", timeTravelPanelClassName: "debug-timetravel-panel", timeTravelPanelSliderClassName: "debug-timetravel-slider", viewClassName: "tree-view-output", editor: e }) }), n[0] = e, n[1] = t) : t = n[1], t;
|
|
692
704
|
}
|
|
693
|
-
const
|
|
694
|
-
function
|
|
695
|
-
const e = n.match(
|
|
705
|
+
const mn = /^---\s*\n([\s\S]*?)\n---\s*(?:\n|$)/;
|
|
706
|
+
function fn(n) {
|
|
707
|
+
const e = n.match(mn);
|
|
696
708
|
return e ? {
|
|
697
709
|
frontmatter: e[0],
|
|
698
710
|
body: n.slice(e[0].length)
|
|
@@ -701,29 +713,29 @@ function pn(n) {
|
|
|
701
713
|
body: n
|
|
702
714
|
};
|
|
703
715
|
}
|
|
704
|
-
const
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
const
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
function
|
|
716
|
+
const _n = "UPLOAD_FILE", pn = "OPEN_CONTEXT", hn = "RUN_PROMPT", gn = "UPDATE_FORMAT", xn = "UPDATE_BEHAVIOR", En = "INSERT_PROMPT", bn = "RENAME_PROMPT", Sn = "DUPLICATE_PROMPT", yn = "DELETE_PROMPT", Rn = "DELETE_REFERENCES", Tn = "RENAME_REFERENCES", Nn = "INSERT_REFERENCE", Cn = "INSERT_BLOCK";
|
|
717
|
+
O(_n);
|
|
718
|
+
O(pn);
|
|
719
|
+
O(hn);
|
|
720
|
+
O(gn);
|
|
721
|
+
O(xn);
|
|
722
|
+
O(En);
|
|
723
|
+
O(bn);
|
|
724
|
+
O(Sn);
|
|
725
|
+
O(yn);
|
|
726
|
+
O(Rn);
|
|
727
|
+
O(Tn);
|
|
728
|
+
const Ye = O(Nn), On = O(Cn), kn = "INSERT_NEW_FILE_PLACEHOLDER", $n = "INSERT_NEW_TEXT_PLACEHOLDER", In = "INSERT_PLACEHOLDER_REFERENCE";
|
|
729
|
+
O(kn);
|
|
730
|
+
O($n);
|
|
731
|
+
O(In);
|
|
732
|
+
function vn(n) {
|
|
721
733
|
const e = te();
|
|
722
734
|
return n.style !== null && e.setFormat(n.style.textAlign), {
|
|
723
735
|
node: e
|
|
724
736
|
};
|
|
725
737
|
}
|
|
726
|
-
class Y extends
|
|
738
|
+
class Y extends Pe {
|
|
727
739
|
static getType() {
|
|
728
740
|
return "comment";
|
|
729
741
|
}
|
|
@@ -732,7 +744,7 @@ class Y extends Ie {
|
|
|
732
744
|
}
|
|
733
745
|
createDOM(e) {
|
|
734
746
|
const t = document.createElement("blockquote");
|
|
735
|
-
return
|
|
747
|
+
return qe(t, e.theme.comment), t;
|
|
736
748
|
}
|
|
737
749
|
updateDOM() {
|
|
738
750
|
return !1;
|
|
@@ -740,7 +752,7 @@ class Y extends Ie {
|
|
|
740
752
|
static importDOM() {
|
|
741
753
|
return {
|
|
742
754
|
blockquote: () => ({
|
|
743
|
-
conversion:
|
|
755
|
+
conversion: vn,
|
|
744
756
|
priority: 0
|
|
745
757
|
})
|
|
746
758
|
};
|
|
@@ -749,7 +761,7 @@ class Y extends Ie {
|
|
|
749
761
|
const {
|
|
750
762
|
element: t
|
|
751
763
|
} = super.exportDOM(e);
|
|
752
|
-
if (t &&
|
|
764
|
+
if (t && pt(t)) {
|
|
753
765
|
this.isEmpty() && t.append(document.createElement("br"));
|
|
754
766
|
const r = this.getFormatType();
|
|
755
767
|
t.style.textAlign = r;
|
|
@@ -788,58 +800,58 @@ class Y extends Ie {
|
|
|
788
800
|
function te() {
|
|
789
801
|
return new Y();
|
|
790
802
|
}
|
|
791
|
-
const
|
|
792
|
-
const t =
|
|
803
|
+
const wn = (n, e) => {
|
|
804
|
+
const t = ht(), r = te();
|
|
793
805
|
if (e) {
|
|
794
806
|
e.getParent()?.replace(r, !0), e.remove(), r.selectEnd();
|
|
795
807
|
return;
|
|
796
808
|
}
|
|
797
|
-
|
|
809
|
+
gt(t) && $t(t, te);
|
|
798
810
|
};
|
|
799
|
-
function
|
|
800
|
-
const n = C(3), [e] =
|
|
811
|
+
function Pn() {
|
|
812
|
+
const n = C(3), [e] = D();
|
|
801
813
|
let t, r;
|
|
802
|
-
return n[0] !== e ? (t = () =>
|
|
814
|
+
return n[0] !== e ? (t = () => fe(e.registerCommand(On, Ln, Le)), r = [e], n[0] = e, n[1] = t, n[2] = r) : (t = n[1], r = n[2]), U(t, r), null;
|
|
803
815
|
}
|
|
804
|
-
function
|
|
816
|
+
function Ln(n) {
|
|
805
817
|
const {
|
|
806
818
|
optionId: e,
|
|
807
819
|
nodeToReplace: t
|
|
808
820
|
} = n;
|
|
809
|
-
return
|
|
821
|
+
return wn(e, t), !1;
|
|
810
822
|
}
|
|
811
|
-
const
|
|
812
|
-
const n = C(3), [e] =
|
|
823
|
+
const Mn = () => {
|
|
824
|
+
const n = C(3), [e] = D();
|
|
813
825
|
let t, r;
|
|
814
|
-
n[0] !== e ? (t = () =>
|
|
815
|
-
const l = o.getChildren().filter(
|
|
826
|
+
n[0] !== e ? (t = () => fe(e.registerNodeTransform(Y, (o) => {
|
|
827
|
+
const l = o.getChildren().filter(An);
|
|
816
828
|
l.length > 0 && e.update(() => {
|
|
817
|
-
l.forEach(
|
|
829
|
+
l.forEach(Dn);
|
|
818
830
|
});
|
|
819
|
-
})), r = [e], n[0] = e, n[1] = t, n[2] = r) : (t = n[1], r = n[2]),
|
|
831
|
+
})), r = [e], n[0] = e, n[1] = t, n[2] = r) : (t = n[1], r = n[2]), U(t, r);
|
|
820
832
|
};
|
|
821
|
-
function
|
|
833
|
+
function An(n) {
|
|
822
834
|
return n.getType() === "comment";
|
|
823
835
|
}
|
|
824
|
-
function
|
|
836
|
+
function Dn(n) {
|
|
825
837
|
n.replace(le(), !0);
|
|
826
838
|
}
|
|
827
|
-
function
|
|
828
|
-
return
|
|
839
|
+
function Fn() {
|
|
840
|
+
return Mn(), Pn(), null;
|
|
829
841
|
}
|
|
830
|
-
const
|
|
842
|
+
const Hn = (n) => {
|
|
831
843
|
let e = "";
|
|
832
844
|
const t = n.getChildren(), r = t.length;
|
|
833
845
|
for (let o = 0; o < r; o++) {
|
|
834
846
|
const i = t[o];
|
|
835
|
-
e += i.getTextContent(),
|
|
847
|
+
e += i.getTextContent(), xt(i) && o !== r - 1 && !i.isInline() && (e += `
|
|
836
848
|
`);
|
|
837
849
|
}
|
|
838
850
|
return e;
|
|
839
|
-
},
|
|
851
|
+
}, qn = (n) => n.type !== "reference" ? null : `#${n.name ?? n.referenceId ?? ""}`, Bn = (n) => n.type === "paragraph" && !!n.children?.length, Qe = (n) => {
|
|
840
852
|
if (n.type === "comment")
|
|
841
853
|
return "";
|
|
842
|
-
const e =
|
|
854
|
+
const e = qn(n);
|
|
843
855
|
if (e !== null)
|
|
844
856
|
return e;
|
|
845
857
|
let t = typeof n.text == "string" ? n.text : "";
|
|
@@ -853,18 +865,18 @@ const jn = (n) => {
|
|
|
853
865
|
`);
|
|
854
866
|
continue;
|
|
855
867
|
}
|
|
856
|
-
t +=
|
|
868
|
+
t += Qe(l), Bn(l) && (t += `
|
|
857
869
|
`);
|
|
858
870
|
}
|
|
859
871
|
return t;
|
|
860
|
-
},
|
|
872
|
+
}, Ze = (n) => {
|
|
861
873
|
try {
|
|
862
874
|
const e = JSON.parse(n);
|
|
863
|
-
return
|
|
875
|
+
return Qe(e.root ?? {});
|
|
864
876
|
} catch {
|
|
865
877
|
return "";
|
|
866
878
|
}
|
|
867
|
-
},
|
|
879
|
+
}, Un = {
|
|
868
880
|
root: {
|
|
869
881
|
direction: "ltr",
|
|
870
882
|
format: "",
|
|
@@ -882,7 +894,7 @@ const jn = (n) => {
|
|
|
882
894
|
}]
|
|
883
895
|
}
|
|
884
896
|
};
|
|
885
|
-
function
|
|
897
|
+
function Jn(n = "") {
|
|
886
898
|
return n.trim() ? {
|
|
887
899
|
root: {
|
|
888
900
|
direction: "ltr",
|
|
@@ -908,67 +920,71 @@ function zn(n = "") {
|
|
|
908
920
|
}] : []
|
|
909
921
|
}))
|
|
910
922
|
}
|
|
911
|
-
} : JSON.parse(JSON.stringify(
|
|
923
|
+
} : JSON.parse(JSON.stringify(Un));
|
|
912
924
|
}
|
|
913
|
-
function
|
|
925
|
+
function jn(n) {
|
|
914
926
|
const e = C(4), {
|
|
915
927
|
editorRef: t,
|
|
916
928
|
previousTextRef: r
|
|
917
|
-
} = n, [o] =
|
|
929
|
+
} = n, [o] = D();
|
|
918
930
|
let i, l;
|
|
919
931
|
return e[0] !== o || e[1] !== r ? (i = () => ({
|
|
920
|
-
setEditorValue: (
|
|
921
|
-
const
|
|
922
|
-
o.setEditorState(
|
|
932
|
+
setEditorValue: (c) => {
|
|
933
|
+
const a = o.parseEditorState(JSON.stringify(Jn(c)));
|
|
934
|
+
o.setEditorState(a), r.current = Ze(c), o.focus(void 0, {
|
|
923
935
|
defaultSelection: "rootEnd"
|
|
924
936
|
});
|
|
925
937
|
}
|
|
926
|
-
}), l = [o, r], e[0] = o, e[1] = r, e[2] = i, e[3] = l) : (i = e[2], l = e[3]),
|
|
938
|
+
}), l = [o, r], e[0] = o, e[1] = r, e[2] = i, e[3] = l) : (i = e[2], l = e[3]), Nt(t, i, l), null;
|
|
927
939
|
}
|
|
928
|
-
const
|
|
929
|
-
function
|
|
940
|
+
const zn = (n) => n.key !== "Enter" ? !1 : !n.ctrlKey && !n.metaKey && !n.shiftKey && !n.altKey;
|
|
941
|
+
function Wn(n) {
|
|
930
942
|
const e = C(4), {
|
|
931
943
|
onSubmit: t
|
|
932
|
-
} = n, [r] =
|
|
944
|
+
} = n, [r] = D();
|
|
933
945
|
let o, i;
|
|
934
|
-
return e[0] !== r || e[1] !== t ? (o = () => r.registerCommand(
|
|
946
|
+
return e[0] !== r || e[1] !== t ? (o = () => r.registerCommand(Et, (l) => zn(l) ? (l.preventDefault(), t?.(), !0) : !1, bt), i = [r, t], e[0] = r, e[1] = t, e[2] = o, e[3] = i) : (o = e[2], i = e[3]), U(o, i), null;
|
|
935
947
|
}
|
|
936
|
-
const
|
|
948
|
+
const Re = ["table", "connector"], Kn = (n) => n.sort((r, o) => Re.indexOf(r.group) - Re.indexOf(o.group)).map((r, o) => ({
|
|
937
949
|
...r,
|
|
938
950
|
index: o
|
|
939
951
|
})).reduce((r, o) => {
|
|
940
952
|
const i = r[o.group] ?? [];
|
|
941
953
|
return i.push(o), r[o.group] = i, r;
|
|
942
954
|
}, {});
|
|
943
|
-
function
|
|
944
|
-
const e = C(
|
|
955
|
+
function Te(n) {
|
|
956
|
+
const e = C(22), {
|
|
945
957
|
id: t,
|
|
946
958
|
isSelected: r,
|
|
947
959
|
onClick: o,
|
|
948
960
|
onMouseEnter: i,
|
|
949
961
|
setRefElement: l,
|
|
950
|
-
secondaryLabel:
|
|
951
|
-
primaryLabel:
|
|
952
|
-
tabIndex:
|
|
953
|
-
} = n,
|
|
954
|
-
let u;
|
|
955
|
-
e[0] !== c ? (u = /* @__PURE__ */ s(Z.Trigger, { children: /* @__PURE__ */ s(w, { mt: "1px", lineClamp: 1, textOverflow: "ellipsis", textStyle: "label/M/regular", children: c }) }), e[0] = c, e[1] = u) : u = e[1];
|
|
962
|
+
secondaryLabel: c,
|
|
963
|
+
primaryLabel: a,
|
|
964
|
+
tabIndex: _
|
|
965
|
+
} = n, m = _ === void 0 ? -1 : _, p = r ? "bg.active" : "transparent", f = r ? "bg.active" : "bg.hover";
|
|
956
966
|
let d;
|
|
957
|
-
e[
|
|
958
|
-
|
|
959
|
-
e[
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
967
|
+
e[0] !== f ? (d = {
|
|
968
|
+
bg: f
|
|
969
|
+
}, e[0] = f, e[1] = d) : d = e[1];
|
|
970
|
+
let u;
|
|
971
|
+
e[2] !== a ? (u = /* @__PURE__ */ s(Z.Trigger, { children: /* @__PURE__ */ s(w, { mt: "1px", lineClamp: 1, textOverflow: "ellipsis", textStyle: "label/M/regular", children: a }) }), e[2] = a, e[3] = u) : u = e[3];
|
|
972
|
+
let E;
|
|
973
|
+
e[4] !== a ? (E = /* @__PURE__ */ s(Z.Positioner, { children: /* @__PURE__ */ s(Z.Content, { children: a }) }), e[4] = a, e[5] = E) : E = e[5];
|
|
963
974
|
let g;
|
|
964
|
-
e[7] !==
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
975
|
+
e[6] !== u || e[7] !== E ? (g = /* @__PURE__ */ A(Z.Root, { children: [
|
|
976
|
+
u,
|
|
977
|
+
E
|
|
978
|
+
] }), e[6] = u, e[7] = E, e[8] = g) : g = e[8];
|
|
979
|
+
let h;
|
|
980
|
+
e[9] !== c ? (h = c && /* @__PURE__ */ s(w, { lineClamp: 2, textOverflow: "ellipsis", textStyle: "label/S/regular", color: "fg.muted", children: c }), e[9] = c, e[10] = h) : h = e[10];
|
|
981
|
+
let R;
|
|
982
|
+
return e[11] !== t || e[12] !== r || e[13] !== o || e[14] !== i || e[15] !== l || e[16] !== p || e[17] !== d || e[18] !== g || e[19] !== h || e[20] !== m ? (R = /* @__PURE__ */ A(ne, { direction: "column", cursor: "pointer", gap: "2xs", padding: "2xs", paddingX: "sm", bg: p, _hover: d, tabIndex: m, ref: l, role: "option", "aria-selected": r, id: t, onMouseEnter: i, onClick: o, children: [
|
|
983
|
+
g,
|
|
984
|
+
h
|
|
985
|
+
] }), e[11] = t, e[12] = r, e[13] = o, e[14] = i, e[15] = l, e[16] = p, e[17] = d, e[18] = g, e[19] = h, e[20] = m, e[21] = R) : R = e[21], R;
|
|
970
986
|
}
|
|
971
|
-
const
|
|
987
|
+
const Vn = (n) => {
|
|
972
988
|
const e = C(12), {
|
|
973
989
|
options: t,
|
|
974
990
|
selectedIndex: r,
|
|
@@ -976,38 +992,38 @@ const Gn = (n) => {
|
|
|
976
992
|
onMouseEnterItem: i
|
|
977
993
|
} = n, {
|
|
978
994
|
table: l,
|
|
979
|
-
connector:
|
|
980
|
-
} =
|
|
981
|
-
let p,
|
|
995
|
+
connector: c
|
|
996
|
+
} = Kn(t), a = l === void 0 ? [] : l, _ = c === void 0 ? [] : c, m = [...a, ..._].length;
|
|
997
|
+
let p, f;
|
|
982
998
|
e[0] !== r ? (p = () => {
|
|
983
999
|
document.getElementById(`typeahead-item-${r}`)?.scrollIntoView({
|
|
984
1000
|
behavior: "instant",
|
|
985
1001
|
block: "nearest"
|
|
986
1002
|
});
|
|
987
|
-
},
|
|
988
|
-
const d = P,
|
|
989
|
-
let
|
|
990
|
-
e[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
1003
|
+
}, f = [r], e[0] = r, e[1] = p, e[2] = f) : (p = e[1], f = e[2]), U(p, f);
|
|
1004
|
+
const d = P, u = "1000", E = "absolute", g = "modal", h = "auto", R = "24rem";
|
|
1005
|
+
let S;
|
|
1006
|
+
e[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (S = {
|
|
991
1007
|
base: "100vw",
|
|
992
1008
|
md: "264px"
|
|
993
|
-
}, e[3] =
|
|
1009
|
+
}, e[3] = S) : S = e[3];
|
|
994
1010
|
let T;
|
|
995
|
-
e[4] !==
|
|
996
|
-
const
|
|
1011
|
+
e[4] !== m ? (T = !m && /* @__PURE__ */ s(w, { children: "No results" }), e[4] = m, e[5] = T) : T = e[5];
|
|
1012
|
+
const b = !!a.length && /* @__PURE__ */ A(ge, { children: [
|
|
997
1013
|
/* @__PURE__ */ s(w, { paddingTop: "xs", paddingBottom: "2xs", paddingX: "sm", color: "fg.muted", textStyle: "label/S/medium", children: "Tables" }),
|
|
998
|
-
/* @__PURE__ */ s(P, { children:
|
|
999
|
-
] }),
|
|
1014
|
+
/* @__PURE__ */ s(P, { children: a.map((x) => /* @__PURE__ */ s(Te, { id: `typeahead-item-${x.index}`, isSelected: r === x.index, onClick: () => o(x, x.index), onMouseEnter: () => i(x.index), primaryLabel: x.name, secondaryLabel: x.description, setRefElement: x.setRefElement, tabIndex: -1 }, x.id)) })
|
|
1015
|
+
] }), N = !!_.length && /* @__PURE__ */ A(ge, { children: [
|
|
1000
1016
|
/* @__PURE__ */ s(w, { paddingTop: "xs", paddingBottom: "2xs", paddingX: "sm", color: "fg.muted", textStyle: "label/S/medium", children: "Data Sources" }),
|
|
1001
|
-
/* @__PURE__ */ s(P, { children:
|
|
1017
|
+
/* @__PURE__ */ s(P, { children: _.map((x) => /* @__PURE__ */ s(Te, { id: `typeahead-item-${x.index}`, isSelected: r === x.index, onClick: () => o(x, x.index), onMouseEnter: () => i(x.index), primaryLabel: x.name, secondaryLabel: x.description, setRefElement: x.setRefElement, tabIndex: -1 }, x.id)) })
|
|
1002
1018
|
] });
|
|
1003
|
-
let
|
|
1004
|
-
return e[6] !== d || e[7] !== T || e[8] !==
|
|
1019
|
+
let y;
|
|
1020
|
+
return e[6] !== d || e[7] !== T || e[8] !== b || e[9] !== N || e[10] !== S ? (y = /* @__PURE__ */ A(d, { zIndex: u, position: E, layerStyle: g, overflow: h, maxHeight: R, minWidth: S, children: [
|
|
1005
1021
|
T,
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
] }), e[6] = d, e[7] = T, e[8] =
|
|
1009
|
-
},
|
|
1010
|
-
function
|
|
1022
|
+
b,
|
|
1023
|
+
N
|
|
1024
|
+
] }), e[6] = d, e[7] = T, e[8] = b, e[9] = N, e[10] = S, e[11] = y) : y = e[11], y;
|
|
1025
|
+
}, Xn = (n, e) => n.filter((t) => t.name.replace(/ /g, "_").toLowerCase().includes(e.toLowerCase()));
|
|
1026
|
+
function Gn(n, e = []) {
|
|
1011
1027
|
const t = e.map((r, o) => ({
|
|
1012
1028
|
id: r.resourceId,
|
|
1013
1029
|
key: r.resourceId,
|
|
@@ -1018,12 +1034,12 @@ function Qn(n, e = []) {
|
|
|
1018
1034
|
setRefElement: () => {
|
|
1019
1035
|
}
|
|
1020
1036
|
}));
|
|
1021
|
-
return n == null || n === "" ? t :
|
|
1037
|
+
return n == null || n === "" ? t : Xn(t, n);
|
|
1022
1038
|
}
|
|
1023
|
-
const
|
|
1024
|
-
function
|
|
1025
|
-
let t =
|
|
1026
|
-
if (t === null && (t =
|
|
1039
|
+
const et = "\\.\\-<>_:", pe = ["#"].join(""), tt = `[^${pe}${et}\\s]`, Yn = `(?:[${et}]|)`, nt = 75, Qn = new RegExp(`(^|\\s|\\()([${pe}]((?:${tt}${Yn}){0,${nt}}))$`), Zn = new RegExp(`(^|\\s|\\()([${pe}]((?:${tt}){0,${nt}}))$`);
|
|
1040
|
+
function er(n, e) {
|
|
1041
|
+
let t = Qn.exec(n);
|
|
1042
|
+
if (t === null && (t = Zn.exec(n)), t !== null) {
|
|
1027
1043
|
const r = t[1], o = t[3];
|
|
1028
1044
|
if (o.length >= e)
|
|
1029
1045
|
return {
|
|
@@ -1034,47 +1050,47 @@ function nr(n, e) {
|
|
|
1034
1050
|
}
|
|
1035
1051
|
return null;
|
|
1036
1052
|
}
|
|
1037
|
-
const
|
|
1038
|
-
function
|
|
1053
|
+
const tr = 20;
|
|
1054
|
+
function nr(n) {
|
|
1039
1055
|
const e = C(9), {
|
|
1040
1056
|
items: t
|
|
1041
1057
|
} = n;
|
|
1042
1058
|
let r;
|
|
1043
1059
|
e[0] !== t ? (r = t === void 0 ? [] : t, e[0] = t, e[1] = r) : r = e[1];
|
|
1044
|
-
const o = r, [i, l] =
|
|
1045
|
-
let
|
|
1046
|
-
e[2] !==
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
resourceId:
|
|
1050
|
-
resourceType:
|
|
1051
|
-
name:
|
|
1052
|
-
nodeToReplace:
|
|
1053
|
-
}),
|
|
1060
|
+
const o = r, [i, l] = Ct(null), [c] = D(), a = Gn(i, o);
|
|
1061
|
+
let _;
|
|
1062
|
+
e[2] !== c ? (_ = (E, g, h) => {
|
|
1063
|
+
c.update(() => {
|
|
1064
|
+
g && (c.dispatchCommand(Ye, {
|
|
1065
|
+
resourceId: E.id,
|
|
1066
|
+
resourceType: E.group,
|
|
1067
|
+
name: E.name,
|
|
1068
|
+
nodeToReplace: g
|
|
1069
|
+
}), h());
|
|
1054
1070
|
});
|
|
1055
|
-
}, e[2] =
|
|
1056
|
-
const
|
|
1057
|
-
let u;
|
|
1058
|
-
e[4] !== c ? (u = c.slice(0, rr), e[4] = c, e[5] = u) : u = e[5];
|
|
1059
|
-
const d = u;
|
|
1071
|
+
}, e[2] = c, e[3] = _) : _ = e[3];
|
|
1072
|
+
const m = _, p = or;
|
|
1060
1073
|
let f;
|
|
1061
|
-
|
|
1074
|
+
e[4] !== a ? (f = a.slice(0, tr), e[4] = a, e[5] = f) : f = e[5];
|
|
1075
|
+
const d = f;
|
|
1076
|
+
let u;
|
|
1077
|
+
return e[6] !== d || e[7] !== m ? (u = /* @__PURE__ */ s(It, { onQueryChange: l, onSelectOption: m, triggerFn: p, options: d, menuRenderFn: rr }), e[6] = d, e[7] = m, e[8] = u) : u = e[8], u;
|
|
1062
1078
|
}
|
|
1063
|
-
function
|
|
1079
|
+
function rr(n, e) {
|
|
1064
1080
|
const {
|
|
1065
1081
|
options: t,
|
|
1066
1082
|
selectedIndex: r,
|
|
1067
1083
|
selectOptionAndCleanUp: o,
|
|
1068
1084
|
setHighlightedIndex: i
|
|
1069
1085
|
} = e;
|
|
1070
|
-
return n.current ?
|
|
1071
|
-
i(
|
|
1086
|
+
return n.current ? vt.createPortal(/* @__PURE__ */ s(Vn, { options: t, selectedIndex: r, onSelectItem: (l, c) => {
|
|
1087
|
+
i(c), o(l);
|
|
1072
1088
|
}, onMouseEnterItem: (l) => {
|
|
1073
1089
|
i(l);
|
|
1074
1090
|
} }), n.current) : null;
|
|
1075
1091
|
}
|
|
1076
|
-
function
|
|
1077
|
-
return
|
|
1092
|
+
function or(n) {
|
|
1093
|
+
return er(n, 0);
|
|
1078
1094
|
}
|
|
1079
1095
|
class X extends ee {
|
|
1080
1096
|
__referenceId;
|
|
@@ -1102,7 +1118,7 @@ class X extends ee {
|
|
|
1102
1118
|
}
|
|
1103
1119
|
createDOM(e) {
|
|
1104
1120
|
const t = document.createElement("span");
|
|
1105
|
-
return
|
|
1121
|
+
return qe(t, e.theme.reference), t.setAttribute("data-reference-id", this.__referenceId), t.setAttribute("data-name", this.__name), t.textContent = `#${this.__name}`, t;
|
|
1106
1122
|
}
|
|
1107
1123
|
updateDOM(e, t) {
|
|
1108
1124
|
return (e.__name !== this.__name || e.__referenceId !== this.__referenceId) && (t.setAttribute("data-reference-id", this.__referenceId), t.setAttribute("data-name", this.__name), t.textContent = `#${this.__name}`), !1;
|
|
@@ -1128,136 +1144,136 @@ class X extends ee {
|
|
|
1128
1144
|
return `#${this.__name}`;
|
|
1129
1145
|
}
|
|
1130
1146
|
}
|
|
1131
|
-
function
|
|
1147
|
+
function ir(n, e) {
|
|
1132
1148
|
return new X(n, e);
|
|
1133
1149
|
}
|
|
1134
|
-
const
|
|
1135
|
-
const r =
|
|
1150
|
+
const sr = (n, e, t) => {
|
|
1151
|
+
const r = ir(e, t);
|
|
1136
1152
|
if (n) {
|
|
1137
1153
|
n?.replace(r), n.remove(), r.selectEnd();
|
|
1138
1154
|
return;
|
|
1139
1155
|
}
|
|
1140
1156
|
};
|
|
1141
|
-
function
|
|
1157
|
+
function lr(n) {
|
|
1142
1158
|
const e = C(4), {
|
|
1143
1159
|
onAddReference: t
|
|
1144
|
-
} = n, [r] =
|
|
1160
|
+
} = n, [r] = D();
|
|
1145
1161
|
let o, i;
|
|
1146
|
-
return e[0] !== r || e[1] !== t ? (o = () =>
|
|
1162
|
+
return e[0] !== r || e[1] !== t ? (o = () => fe(r.registerCommand(Ye, (l) => {
|
|
1147
1163
|
const {
|
|
1148
|
-
resourceId:
|
|
1149
|
-
resourceType:
|
|
1150
|
-
name:
|
|
1151
|
-
nodeToReplace:
|
|
1164
|
+
resourceId: c,
|
|
1165
|
+
resourceType: a,
|
|
1166
|
+
name: _,
|
|
1167
|
+
nodeToReplace: m
|
|
1152
1168
|
} = l;
|
|
1153
1169
|
return r.update(() => {
|
|
1154
|
-
|
|
1155
|
-
}), t?.(
|
|
1156
|
-
},
|
|
1170
|
+
sr(m, c, _);
|
|
1171
|
+
}), t?.(c, a), !0;
|
|
1172
|
+
}, Le)), i = [r, t], e[0] = r, e[1] = t, e[2] = o, e[3] = i) : (o = e[2], i = e[3]), U(o, i), null;
|
|
1157
1173
|
}
|
|
1158
|
-
const
|
|
1159
|
-
...
|
|
1174
|
+
const cr = {
|
|
1175
|
+
..._e,
|
|
1160
1176
|
// Override paragraph class to remove margins specifically for prompt input
|
|
1161
1177
|
paragraph: "rich-text__p rich-text__p--no-margin"
|
|
1162
|
-
},
|
|
1178
|
+
}, ar = [Y, St, X], dr = (n, e) => {
|
|
1163
1179
|
const t = C(39), {
|
|
1164
1180
|
defaultState: r,
|
|
1165
1181
|
debug: o,
|
|
1166
1182
|
isEditable: i,
|
|
1167
1183
|
placeholder: l
|
|
1168
|
-
} = n,
|
|
1169
|
-
onChange:
|
|
1170
|
-
onError:
|
|
1184
|
+
} = n, c = o === void 0 ? !1 : o, a = i === void 0 ? !0 : i, {
|
|
1185
|
+
onChange: _,
|
|
1186
|
+
onError: m,
|
|
1171
1187
|
onSubmit: p,
|
|
1172
|
-
references:
|
|
1188
|
+
references: f,
|
|
1173
1189
|
onAddReference: d
|
|
1174
|
-
} = n,
|
|
1175
|
-
let
|
|
1176
|
-
t[0] !==
|
|
1177
|
-
const
|
|
1178
|
-
let
|
|
1179
|
-
t[2] !== r || t[3] !==
|
|
1190
|
+
} = n, u = m === void 0 ? ur : m;
|
|
1191
|
+
let E;
|
|
1192
|
+
t[0] !== f ? (E = f === void 0 ? [] : f, t[0] = f, t[1] = E) : E = t[1];
|
|
1193
|
+
const g = E;
|
|
1194
|
+
let h;
|
|
1195
|
+
t[2] !== r || t[3] !== a || t[4] !== u ? (h = {
|
|
1180
1196
|
namespace: "PROMPT_EDITOR",
|
|
1181
|
-
nodes:
|
|
1197
|
+
nodes: ar,
|
|
1182
1198
|
editorState: r,
|
|
1183
|
-
editable:
|
|
1184
|
-
onError:
|
|
1185
|
-
theme:
|
|
1186
|
-
}, t[2] = r, t[3] =
|
|
1187
|
-
const
|
|
1199
|
+
editable: a,
|
|
1200
|
+
onError: u,
|
|
1201
|
+
theme: cr
|
|
1202
|
+
}, t[2] = r, t[3] = a, t[4] = u, t[5] = h) : h = t[5];
|
|
1203
|
+
const R = h;
|
|
1204
|
+
let S;
|
|
1205
|
+
t[6] !== r ? (S = Ze(r), t[6] = r, t[7] = S) : S = t[7];
|
|
1206
|
+
const T = kt(S);
|
|
1188
1207
|
let b;
|
|
1189
|
-
t[
|
|
1190
|
-
const T = Tt(b);
|
|
1191
|
-
let E;
|
|
1192
|
-
t[8] !== l ? (E = l ?? /* @__PURE__ */ L(w, { textStyle: "label/M/regular", color: "fg.subtle", pointerEvents: "none", position: "absolute", top: "0", children: [
|
|
1208
|
+
t[8] !== l ? (b = l ?? /* @__PURE__ */ A(w, { textStyle: "label/M/regular", color: "fg.subtle", pointerEvents: "none", position: "absolute", top: "0", children: [
|
|
1193
1209
|
"Type your query here or press ",
|
|
1194
|
-
/* @__PURE__ */ s(
|
|
1210
|
+
/* @__PURE__ */ s(mt, { color: "fg.subtle", children: "#" }),
|
|
1195
1211
|
" to add a reference."
|
|
1196
|
-
] }), t[8] = l, t[9] =
|
|
1197
|
-
const
|
|
1198
|
-
let
|
|
1199
|
-
t[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
1200
|
-
let
|
|
1201
|
-
t[11] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
1202
|
-
let
|
|
1203
|
-
t[12] !==
|
|
1212
|
+
] }), t[8] = l, t[9] = b) : b = t[9];
|
|
1213
|
+
const N = b;
|
|
1214
|
+
let y;
|
|
1215
|
+
t[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (y = /* @__PURE__ */ s(yt, {}), t[10] = y) : y = t[10];
|
|
1216
|
+
let x;
|
|
1217
|
+
t[11] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (x = /* @__PURE__ */ s(Be, { fullWidth: !0 }), t[11] = x) : x = t[11];
|
|
1218
|
+
let k;
|
|
1219
|
+
t[12] !== N ? (k = /* @__PURE__ */ s(He, { contentEditable: x, placeholder: N, ErrorBoundary: De }), t[12] = N, t[13] = k) : k = t[13];
|
|
1204
1220
|
let $;
|
|
1205
|
-
t[14] !==
|
|
1206
|
-
|
|
1207
|
-
const
|
|
1208
|
-
ie !== T.current && (T.current = ie,
|
|
1221
|
+
t[14] !== _ ? ($ = /* @__PURE__ */ s(Fe, { ignoreSelectionChange: !0, ignoreHistoryMergeTagChange: !1, onChange: (he) => {
|
|
1222
|
+
he.read(() => {
|
|
1223
|
+
const ot = Me(), ie = Hn(ot);
|
|
1224
|
+
ie !== T.current && (T.current = ie, _?.(ie, he.toJSON()));
|
|
1209
1225
|
});
|
|
1210
|
-
} }), t[14] =
|
|
1226
|
+
} }), t[14] = _, t[15] = $) : $ = t[15];
|
|
1211
1227
|
let I;
|
|
1212
|
-
t[16] !== e ? (I = /* @__PURE__ */ s(
|
|
1228
|
+
t[16] !== e ? (I = /* @__PURE__ */ s(jn, { editorRef: e, previousTextRef: T }), t[16] = e, t[17] = I) : I = t[17];
|
|
1213
1229
|
let v;
|
|
1214
|
-
t[18] !==
|
|
1215
|
-
let
|
|
1216
|
-
t[20] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
1217
|
-
let
|
|
1218
|
-
t[21] !== p ? (
|
|
1230
|
+
t[18] !== a ? (v = /* @__PURE__ */ s(Xe, { isEditable: a }), t[18] = a, t[19] = v) : v = t[19];
|
|
1231
|
+
let L;
|
|
1232
|
+
t[20] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (L = /* @__PURE__ */ s(Fn, {}), t[20] = L) : L = t[20];
|
|
1233
|
+
let M;
|
|
1234
|
+
t[21] !== p ? (M = /* @__PURE__ */ s(Wn, { onSubmit: p }), t[21] = p, t[22] = M) : M = t[22];
|
|
1219
1235
|
let F;
|
|
1220
|
-
t[23] !==
|
|
1236
|
+
t[23] !== g ? (F = /* @__PURE__ */ s(nr, { items: g }), t[23] = g, t[24] = F) : F = t[24];
|
|
1237
|
+
let H;
|
|
1238
|
+
t[25] !== d ? (H = /* @__PURE__ */ s(lr, { onAddReference: d }), t[25] = d, t[26] = H) : H = t[26];
|
|
1221
1239
|
let q;
|
|
1222
|
-
t[
|
|
1223
|
-
let W;
|
|
1224
|
-
t[27] !== a ? (W = a ? /* @__PURE__ */ s(Ve, {}) : "", t[27] = a, t[28] = W) : W = t[28];
|
|
1240
|
+
t[27] !== c ? (q = c ? /* @__PURE__ */ s(Ge, {}) : "", t[27] = c, t[28] = q) : q = t[28];
|
|
1225
1241
|
let Q;
|
|
1226
|
-
return t[29] !==
|
|
1227
|
-
|
|
1228
|
-
|
|
1242
|
+
return t[29] !== R || t[30] !== k || t[31] !== $ || t[32] !== I || t[33] !== v || t[34] !== M || t[35] !== F || t[36] !== H || t[37] !== q ? (Q = /* @__PURE__ */ s(ne, { direction: "column", justifyContent: "space-between", width: "100%", position: "relative", children: /* @__PURE__ */ A(Ae, { initialConfig: R, children: [
|
|
1243
|
+
y,
|
|
1244
|
+
k,
|
|
1229
1245
|
$,
|
|
1230
1246
|
I,
|
|
1231
1247
|
v,
|
|
1232
|
-
|
|
1233
|
-
|
|
1248
|
+
L,
|
|
1249
|
+
M,
|
|
1234
1250
|
F,
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
] }) }), t[29] =
|
|
1238
|
-
},
|
|
1239
|
-
function
|
|
1251
|
+
H,
|
|
1252
|
+
q
|
|
1253
|
+
] }) }), t[29] = R, t[30] = k, t[31] = $, t[32] = I, t[33] = v, t[34] = M, t[35] = F, t[36] = H, t[37] = q, t[38] = Q) : Q = t[38], Q;
|
|
1254
|
+
}, Xr = Ot(dr);
|
|
1255
|
+
function ur() {
|
|
1240
1256
|
}
|
|
1241
|
-
function
|
|
1257
|
+
function mr(n) {
|
|
1242
1258
|
const e = C(5), {
|
|
1243
1259
|
value: t,
|
|
1244
1260
|
onUpdate: r
|
|
1245
|
-
} = n, [o] =
|
|
1261
|
+
} = n, [o] = D();
|
|
1246
1262
|
let i, l;
|
|
1247
1263
|
return e[0] !== o || e[1] !== r || e[2] !== t ? (i = () => {
|
|
1248
1264
|
o && o.update(() => r(t), {
|
|
1249
1265
|
tag: "history-merge"
|
|
1250
1266
|
});
|
|
1251
|
-
}, l = [t, o, r], e[0] = o, e[1] = r, e[2] = t, e[3] = i, e[4] = l) : (i = e[3], l = e[4]),
|
|
1267
|
+
}, l = [t, o, r], e[0] = o, e[1] = r, e[2] = t, e[3] = i, e[4] = l) : (i = e[3], l = e[4]), U(i, l), null;
|
|
1252
1268
|
}
|
|
1253
|
-
class
|
|
1269
|
+
class z extends G {
|
|
1254
1270
|
__href;
|
|
1255
1271
|
__label;
|
|
1256
1272
|
static getType() {
|
|
1257
1273
|
return "reference-link";
|
|
1258
1274
|
}
|
|
1259
1275
|
static clone(e) {
|
|
1260
|
-
return new
|
|
1276
|
+
return new z(e.__href, e.__label, e.__key);
|
|
1261
1277
|
}
|
|
1262
1278
|
constructor(e, t, r) {
|
|
1263
1279
|
super(r), this.__href = e, this.__label = t;
|
|
@@ -1273,134 +1289,135 @@ class J extends G {
|
|
|
1273
1289
|
}
|
|
1274
1290
|
exportJSON() {
|
|
1275
1291
|
return {
|
|
1276
|
-
type:
|
|
1292
|
+
type: z.getType(),
|
|
1277
1293
|
version: 1,
|
|
1278
1294
|
href: this.__href,
|
|
1279
1295
|
label: this.__label
|
|
1280
1296
|
};
|
|
1281
1297
|
}
|
|
1282
1298
|
static importJSON(e) {
|
|
1283
|
-
return
|
|
1299
|
+
return rt(e.href, e.label);
|
|
1284
1300
|
}
|
|
1285
1301
|
decorate(e, t) {
|
|
1286
|
-
const r = this.__href, i = r.split("/").pop() || "unknown", l = /^https?:\/\//i.test(r),
|
|
1287
|
-
return /* @__PURE__ */ s(P, { width: "fit-content", display: "inline-block", children: /* @__PURE__ */ s(
|
|
1302
|
+
const r = this.__href, i = r.split("/").pop() || "unknown", l = /^https?:\/\//i.test(r), c = /^#?\$PROJECT\//i.test(r);
|
|
1303
|
+
return /* @__PURE__ */ s(P, { width: "fit-content", display: "inline-block", children: /* @__PURE__ */ s(Ue, { fileName: i, onSelect: () => {
|
|
1288
1304
|
if (l)
|
|
1289
1305
|
window.open(r, "_blank", "noopener,noreferrer");
|
|
1290
|
-
else if (
|
|
1291
|
-
const
|
|
1292
|
-
detail:
|
|
1306
|
+
else if (c) {
|
|
1307
|
+
const a = r.replace(/^#?\$PROJECT\//i, ""), _ = new CustomEvent("ui:open-project-file", {
|
|
1308
|
+
detail: a
|
|
1293
1309
|
});
|
|
1294
|
-
window.dispatchEvent(
|
|
1310
|
+
window.dispatchEvent(_);
|
|
1295
1311
|
} else
|
|
1296
1312
|
window.location.assign(r);
|
|
1297
1313
|
} }) });
|
|
1298
1314
|
}
|
|
1299
1315
|
}
|
|
1300
|
-
function
|
|
1301
|
-
return new
|
|
1316
|
+
function rt(n, e) {
|
|
1317
|
+
return new z(n, e);
|
|
1302
1318
|
}
|
|
1303
|
-
function
|
|
1304
|
-
return n instanceof
|
|
1319
|
+
function fr(n) {
|
|
1320
|
+
return n instanceof z;
|
|
1305
1321
|
}
|
|
1306
|
-
const
|
|
1307
|
-
dependencies: [
|
|
1322
|
+
const Ne = /\{\{\s*link\((['"])([^'"\s]+)\1\)\s*\}\}/, _r = {
|
|
1323
|
+
dependencies: [z],
|
|
1308
1324
|
export: (n) => {
|
|
1309
|
-
if (
|
|
1325
|
+
if (fr(n)) {
|
|
1310
1326
|
const e = n.__href, t = n.__label ?? e;
|
|
1311
1327
|
return t ? `{{link('${t}')}}` : `{{link('${e}')}}`;
|
|
1312
1328
|
}
|
|
1313
1329
|
return null;
|
|
1314
1330
|
},
|
|
1315
|
-
regExp:
|
|
1316
|
-
importRegExp:
|
|
1331
|
+
regExp: Ne,
|
|
1332
|
+
importRegExp: Ne,
|
|
1317
1333
|
replace: (n, e) => {
|
|
1318
1334
|
const t = e[2], o = /^(https?:\/\/|\/)/i.test(t) ? t : `#${t}`, i = t;
|
|
1319
|
-
n.replace(
|
|
1335
|
+
n.replace(rt(o, i));
|
|
1320
1336
|
},
|
|
1321
1337
|
type: "text-match"
|
|
1322
|
-
}, ae = [
|
|
1323
|
-
function
|
|
1324
|
-
const e = C(
|
|
1338
|
+
}, ae = [...$e, ...Ve, ze, We, _r];
|
|
1339
|
+
function Gr(n) {
|
|
1340
|
+
const e = C(33), {
|
|
1325
1341
|
debug: t,
|
|
1326
1342
|
defaultState: r,
|
|
1327
1343
|
fullWidth: o,
|
|
1328
1344
|
isEditable: i,
|
|
1329
1345
|
onChange: l
|
|
1330
|
-
} = n,
|
|
1346
|
+
} = n, c = t === void 0 ? !1 : t, a = r === void 0 ? "" : r, _ = o === void 0 ? !1 : o, m = i === void 0 ? !1 : i;
|
|
1331
1347
|
let p;
|
|
1332
|
-
e[0] !==
|
|
1348
|
+
e[0] !== a ? (p = fn(a), e[0] = a, e[1] = p) : p = e[1];
|
|
1333
1349
|
const {
|
|
1334
|
-
frontmatter:
|
|
1350
|
+
frontmatter: f,
|
|
1335
1351
|
body: d
|
|
1336
|
-
} = p,
|
|
1352
|
+
} = p, u = m && !!l;
|
|
1353
|
+
let E;
|
|
1354
|
+
e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (E = [ve, Ce, ue, j, we, Oe, ke, de, K, J, W, z], e[2] = E) : E = e[2];
|
|
1337
1355
|
let g;
|
|
1338
|
-
e[
|
|
1339
|
-
let
|
|
1340
|
-
e[
|
|
1341
|
-
let y;
|
|
1342
|
-
e[5] !== _ || e[6] !== x ? (y = {
|
|
1356
|
+
e[3] !== d ? (g = () => Ie(d, ae, void 0, !1), e[3] = d, e[4] = g) : g = e[4];
|
|
1357
|
+
let h;
|
|
1358
|
+
e[5] !== m || e[6] !== g ? (h = {
|
|
1343
1359
|
namespace: "RICH_MESSAGE",
|
|
1344
|
-
nodes:
|
|
1345
|
-
editorState:
|
|
1346
|
-
onError:
|
|
1347
|
-
editable:
|
|
1348
|
-
theme:
|
|
1349
|
-
}, e[5] =
|
|
1350
|
-
const
|
|
1351
|
-
let
|
|
1352
|
-
e[8] !== d ? (
|
|
1353
|
-
let T,
|
|
1354
|
-
e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
1355
|
-
let O;
|
|
1356
|
-
e[15] !== m ? (O = /* @__PURE__ */ s(Ae, { contentEditable: /* @__PURE__ */ s(qe, { fullWidth: m, isRichMessage: !0 }), ErrorBoundary: Me }), e[15] = m, e[16] = O) : O = e[16];
|
|
1360
|
+
nodes: E,
|
|
1361
|
+
editorState: g,
|
|
1362
|
+
onError: hr,
|
|
1363
|
+
editable: m,
|
|
1364
|
+
theme: _e
|
|
1365
|
+
}, e[5] = m, e[6] = g, e[7] = h) : h = e[7];
|
|
1366
|
+
const R = h;
|
|
1367
|
+
let S;
|
|
1368
|
+
e[8] !== d ? (S = /* @__PURE__ */ s(mr, { value: d, onUpdate: pr }), e[8] = d, e[9] = S) : S = e[9];
|
|
1369
|
+
let T, b, N, y, x, k;
|
|
1370
|
+
e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (k = /* @__PURE__ */ s(Lt, {}), T = /* @__PURE__ */ s(wt, { newTab: !0 }), b = /* @__PURE__ */ s(Mt, {}), N = /* @__PURE__ */ s(Pt, {}), y = /* @__PURE__ */ s(dn, {}), x = /* @__PURE__ */ s(nn, {}), e[10] = T, e[11] = b, e[12] = N, e[13] = y, e[14] = x, e[15] = k) : (T = e[10], b = e[11], N = e[12], y = e[13], x = e[14], k = e[15]);
|
|
1357
1371
|
let $;
|
|
1358
|
-
e[
|
|
1359
|
-
A.read(() => {
|
|
1360
|
-
const F = Pe(), q = rt(ae, F);
|
|
1361
|
-
l?.(u + q);
|
|
1362
|
-
});
|
|
1363
|
-
} }) : null, e[17] = u, e[18] = l, e[19] = f, e[20] = $) : $ = e[20];
|
|
1372
|
+
e[16] !== _ ? ($ = /* @__PURE__ */ s(He, { contentEditable: /* @__PURE__ */ s(Be, { fullWidth: _, isRichMessage: !0 }), ErrorBoundary: De }), e[16] = _, e[17] = $) : $ = e[17];
|
|
1364
1373
|
let I;
|
|
1365
|
-
e[
|
|
1374
|
+
e[18] !== f || e[19] !== l || e[20] !== u ? (I = u ? /* @__PURE__ */ s(Fe, { ignoreSelectionChange: !0, ignoreHistoryMergeTagChange: !1, onChange: (F) => {
|
|
1375
|
+
F.read(() => {
|
|
1376
|
+
const H = Me(), q = ct(ae, H);
|
|
1377
|
+
l?.(f + q);
|
|
1378
|
+
});
|
|
1379
|
+
} }) : null, e[18] = f, e[19] = l, e[20] = u, e[21] = I) : I = e[21];
|
|
1366
1380
|
let v;
|
|
1367
|
-
e[
|
|
1368
|
-
let
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
T,
|
|
1373
|
-
E,
|
|
1374
|
-
R,
|
|
1381
|
+
e[22] !== m ? (v = /* @__PURE__ */ s(Xe, { isEditable: m }), e[22] = m, e[23] = v) : v = e[23];
|
|
1382
|
+
let L;
|
|
1383
|
+
e[24] !== c ? (L = c && /* @__PURE__ */ s(Ge, {}), e[24] = c, e[25] = L) : L = e[25];
|
|
1384
|
+
let M;
|
|
1385
|
+
return e[26] !== R || e[27] !== $ || e[28] !== I || e[29] !== v || e[30] !== L || e[31] !== S ? (M = /* @__PURE__ */ s(ne, { className: "rich-text", "data-rich-message": "true", justifyContent: "space-between", width: "100%", maxWidth: "100%", height: "100%", position: "relative", direction: "column", overflow: "hidden", children: /* @__PURE__ */ A(Ae, { initialConfig: R, children: [
|
|
1375
1386
|
S,
|
|
1376
|
-
|
|
1387
|
+
k,
|
|
1388
|
+
T,
|
|
1389
|
+
b,
|
|
1390
|
+
N,
|
|
1391
|
+
y,
|
|
1392
|
+
x,
|
|
1377
1393
|
$,
|
|
1378
1394
|
I,
|
|
1379
|
-
v
|
|
1380
|
-
|
|
1395
|
+
v,
|
|
1396
|
+
L
|
|
1397
|
+
] }) }), e[26] = R, e[27] = $, e[28] = I, e[29] = v, e[30] = L, e[31] = S, e[32] = M) : M = e[32], M;
|
|
1381
1398
|
}
|
|
1382
|
-
function
|
|
1383
|
-
|
|
1399
|
+
function pr(n) {
|
|
1400
|
+
Ie(n, ae, void 0, !1);
|
|
1384
1401
|
}
|
|
1385
|
-
function
|
|
1402
|
+
function hr(n) {
|
|
1386
1403
|
return console.error(n);
|
|
1387
1404
|
}
|
|
1388
1405
|
export {
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1406
|
+
Be as C,
|
|
1407
|
+
Yt as D,
|
|
1408
|
+
nn as E,
|
|
1409
|
+
dn as I,
|
|
1410
|
+
Xr as P,
|
|
1411
|
+
Gr as R,
|
|
1412
|
+
Xe as T,
|
|
1413
|
+
Wr as a,
|
|
1414
|
+
Kr as b,
|
|
1415
|
+
Ge as c,
|
|
1416
|
+
Qt as d,
|
|
1417
|
+
Vr as e,
|
|
1418
|
+
Ze as f,
|
|
1419
|
+
Jn as g,
|
|
1420
|
+
Ue as h,
|
|
1421
|
+
fn as s
|
|
1405
1422
|
};
|
|
1406
|
-
//# sourceMappingURL=rich-message-
|
|
1423
|
+
//# sourceMappingURL=rich-message-Bad4GxH2.js.map
|