@pstdio/ui 0.8.0 → 0.9.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/{MermaidComponent-D7Baqkwx.js → MermaidComponent-Cz_Iob5U.js} +56 -53
- package/dist/MermaidComponent-Cz_Iob5U.js.map +1 -0
- package/dist/chat-ui.js +117 -117
- package/dist/chat-ui.js.map +1 -1
- package/dist/components/data-renderer/data-renderer-board.d.ts +1 -0
- package/dist/components/data-renderer/data-renderer-card.d.ts +5 -20
- package/dist/components/data-renderer/data-renderer-grouping.d.ts +11 -10
- package/dist/components/data-renderer/data-renderer-helpers.d.ts +63 -15
- package/dist/components/data-renderer/data-renderer-list.d.ts +5 -8
- package/dist/components/data-renderer/data-renderer-toolbar.d.ts +12 -0
- package/dist/components/data-renderer/data-renderer.d.ts +12 -23
- package/dist/components/data-renderer/display-menu.d.ts +9 -8
- package/dist/components/data-renderer/filter-menu.d.ts +5 -4
- package/dist/components/data-renderer/types.d.ts +83 -49
- package/dist/components/data-renderer/use-data-renderer-store.d.ts +15 -11
- package/dist/components/data-renderer/use-resolved-attributes.d.ts +14 -0
- package/dist/components/diff-viewer/diff-card-body.d.ts +10 -0
- package/dist/components/diff-viewer/diff-card-content.d.ts +1 -0
- package/dist/components/diff-viewer/diff-card.d.ts +1 -0
- package/dist/components/diff-viewer/diff-size.d.ts +2 -0
- package/dist/components/icon-color-picker.d.ts +13 -0
- package/dist/components/list-row/list-row-content.d.ts +9 -0
- package/dist/components/list-row/list-row.types.d.ts +1 -0
- package/dist/components/rich-text/shared/lexical-code.d.ts +2 -0
- package/dist/components/rich-text/shared/plugins/CodePlugin/CodeBlockPlugin.d.ts +1 -1
- package/dist/components/rich-text/shared/prism-global.d.ts +2 -0
- package/dist/components/status-option-editor/index.d.ts +2 -0
- package/dist/components/status-option-editor/status-option-editor.d.ts +2 -0
- package/dist/components/status-option-editor/status-option-editor.types.d.ts +39 -0
- package/dist/components/status-option-editor/status-option-row.d.ts +16 -0
- package/dist/components/tab-strip/tab-visibility-filter.d.ts +19 -0
- package/dist/components/tab-strip/tab-visibility.store.d.ts +41 -0
- package/dist/components/tree-list/tree-list-model.d.ts +58 -0
- package/dist/components/tree-list/tree-list-node-row.d.ts +20 -0
- package/dist/components/tree-list/tree-list-order-filter.d.ts +3 -0
- package/dist/components/tree-list/tree-list-order.store.d.ts +42 -0
- package/dist/components/tree-list/tree-list-reorder.d.ts +13 -0
- package/dist/components/tree-list/tree-list-section-header.d.ts +14 -0
- package/dist/components/tree-list/tree-list-sortable.d.ts +22 -0
- package/dist/components/tree-list/tree-list-visibility-filter.d.ts +17 -0
- package/dist/components/tree-list/tree-list-visibility.store.d.ts +45 -0
- package/dist/components/tree-list/tree-list.d.ts +7 -27
- package/dist/components/tree-list/tree-list.types.d.ts +2 -0
- package/dist/components/tree-list/use-tree-list-keyboard-navigation.d.ts +15 -0
- package/dist/get-file-type-icon-ufFb0IkR.js +102 -0
- package/dist/get-file-type-icon-ufFb0IkR.js.map +1 -0
- package/dist/index.d.ts +22 -3
- package/dist/index.js +5171 -3890
- package/dist/index.js.map +1 -1
- package/dist/{rich-message-33DPxuWJ.js → rich-message-CEOSsdR2.js} +428 -421
- package/dist/rich-message-CEOSsdR2.js.map +1 -0
- package/dist/rich-text.js +26 -26
- package/dist/rich-text.js.map +1 -1
- package/dist/theme/custom/index.d.ts +0 -3
- package/dist/theme/index.d.ts +1 -1
- package/dist/theme/recipes/tabs.d.ts +30 -0
- package/dist/theme/tokens/colors.d.ts +6 -0
- package/dist/{theme-D-aCJqTf.js → theme-qP4YOZ2R.js} +197 -148
- package/dist/theme-qP4YOZ2R.js.map +1 -0
- package/dist/theme.js +2 -4
- package/dist/utils/browser-storage.d.ts +7 -0
- package/dist/utils/prism.d.ts +1 -0
- package/package.json +8 -3
- package/dist/MermaidComponent-D7Baqkwx.js.map +0 -1
- package/dist/components/data-renderer/tag-badge.d.ts +0 -10
- package/dist/components/data-renderer/tag-option-icon.d.ts +0 -2
- package/dist/get-file-type-icon-Bwqf1WXA.js +0 -101
- package/dist/get-file-type-icon-Bwqf1WXA.js.map +0 -1
- package/dist/rich-message-33DPxuWJ.js.map +0 -1
- package/dist/theme/custom/monokai.json.d.ts +0 -80
- package/dist/theme-D-aCJqTf.js.map +0 -1
|
@@ -1,51 +1,52 @@
|
|
|
1
|
-
import { DecoratorNode as Z, $applyNodeReplacement as
|
|
2
|
-
import { jsx as l, jsxs as
|
|
1
|
+
import { DecoratorNode as Z, $applyNodeReplacement as mt, ElementNode as Oe, TextNode as re, $createTextNode as X, $nodesOfType as ft, createCommand as k, isHTMLElement as pt, $createParagraphNode as ae, COMMAND_PRIORITY_LOW as Le, $getSelection as ht, $isRangeSelection as _t, $isElementNode as gt, KEY_DOWN_COMMAND as Et, COMMAND_PRIORITY_HIGH as xt, $getRoot as ve } from "lexical";
|
|
2
|
+
import { jsx as l, jsxs as D, Fragment as Te } from "react/jsx-runtime";
|
|
3
3
|
import { c as C } from "react/compiler-runtime";
|
|
4
|
-
import { chakra as
|
|
5
|
-
import { MarkNode as
|
|
6
|
-
import { LexicalComposer as
|
|
7
|
-
import { LexicalErrorBoundary as
|
|
8
|
-
import { HistoryPlugin as
|
|
9
|
-
import { OnChangePlugin as
|
|
10
|
-
import { RichTextPlugin as
|
|
11
|
-
import * as
|
|
12
|
-
import { Suspense as
|
|
4
|
+
import { chakra as de, Box as F, Text as v, Spacer as bt, IconButton as Tt, Table as q, Textarea as St, Tooltip as ne, Flex as pe, Kbd as yt } from "@chakra-ui/react";
|
|
5
|
+
import { MarkNode as Rt } from "@lexical/mark";
|
|
6
|
+
import { LexicalComposer as we } from "@lexical/react/LexicalComposer";
|
|
7
|
+
import { LexicalErrorBoundary as Pe } from "@lexical/react/LexicalErrorBoundary";
|
|
8
|
+
import { HistoryPlugin as Nt } from "@lexical/react/LexicalHistoryPlugin";
|
|
9
|
+
import { OnChangePlugin as Me } from "@lexical/react/LexicalOnChangePlugin";
|
|
10
|
+
import { RichTextPlugin as Ae } from "@lexical/react/LexicalRichTextPlugin";
|
|
11
|
+
import * as Ct from "react";
|
|
12
|
+
import { Suspense as De, lazy as kt, useEffect as z, useImperativeHandle as It, useState as $t, forwardRef as Ot, useRef as Lt } from "react";
|
|
13
13
|
import { useLexicalComposerContext as H } from "@lexical/react/LexicalComposerContext";
|
|
14
|
-
import { $setBlocksType as
|
|
15
|
-
import { addClassNamesToElement as
|
|
16
|
-
import { LexicalTypeaheadMenuPlugin as
|
|
17
|
-
import * as
|
|
18
|
-
import {
|
|
19
|
-
import { LinkNode as _e, AutoLinkNode as ge, $createLinkNode as
|
|
20
|
-
import { ListNode as
|
|
21
|
-
import { CHECK_LIST as
|
|
22
|
-
import { ClickableLinkPlugin as
|
|
23
|
-
import { HorizontalRulePlugin as
|
|
24
|
-
import { LinkPlugin as
|
|
25
|
-
import { ListPlugin as
|
|
26
|
-
import { TabIndentationPlugin as
|
|
14
|
+
import { $setBlocksType as vt } from "@lexical/selection";
|
|
15
|
+
import { addClassNamesToElement as Fe, mergeRegister as he } from "@lexical/utils";
|
|
16
|
+
import { LexicalTypeaheadMenuPlugin as wt } from "@lexical/react/LexicalTypeaheadMenuPlugin";
|
|
17
|
+
import * as Pt from "react-dom";
|
|
18
|
+
import { S as ie, g as Mt, T as At } from "./get-file-type-icon-ufFb0IkR.js";
|
|
19
|
+
import { LinkNode as _e, AutoLinkNode as ge, $createLinkNode as Dt, $isLinkNode as Ft, $isAutoLinkNode as He, $createAutoLinkNode as Ht } from "@lexical/link";
|
|
20
|
+
import { ListNode as ze, ListItemNode as Be } from "@lexical/list";
|
|
21
|
+
import { CHECK_LIST as zt, TRANSFORMERS as Bt, LINK as Ut, $convertFromMarkdownString as Ue, $convertToMarkdownString as qt } from "@lexical/markdown";
|
|
22
|
+
import { ClickableLinkPlugin as Wt } from "@lexical/react/LexicalClickableLinkPlugin";
|
|
23
|
+
import { HorizontalRulePlugin as Jt } from "@lexical/react/LexicalHorizontalRulePlugin";
|
|
24
|
+
import { LinkPlugin as jt } from "@lexical/react/LexicalLinkPlugin";
|
|
25
|
+
import { ListPlugin as Kt } from "@lexical/react/LexicalListPlugin";
|
|
26
|
+
import { TabIndentationPlugin as Gt } from "@lexical/react/LexicalTabIndentationPlugin";
|
|
27
27
|
import { QuoteNode as qe, HeadingNode as We } from "@lexical/rich-text";
|
|
28
|
-
import { ContentEditable as
|
|
29
|
-
import {
|
|
30
|
-
import
|
|
31
|
-
import Qt from "
|
|
32
|
-
import
|
|
33
|
-
|
|
34
|
-
|
|
28
|
+
import { ContentEditable as Vt } from "@lexical/react/LexicalContentEditable";
|
|
29
|
+
import { X as Xt } from "lucide-react";
|
|
30
|
+
import Yt from "prismjs";
|
|
31
|
+
import { CodeNode as Ee, CodeHighlightNode as Je, registerCodeHighlighting as Qt } from "@lexical/code";
|
|
32
|
+
import Zt from "katex";
|
|
33
|
+
import { TreeView as en } from "@lexical/react/LexicalTreeView";
|
|
34
|
+
const tn = de(Vt);
|
|
35
|
+
function je(n) {
|
|
35
36
|
const e = C(11), {
|
|
36
37
|
onRef: t,
|
|
37
38
|
fullWidth: r,
|
|
38
39
|
padding: o,
|
|
39
40
|
isRichMessage: i,
|
|
40
41
|
scrollable: s
|
|
41
|
-
} = n, c = r === void 0 ? !1 : r, a = i === void 0 ? !1 : i,
|
|
42
|
+
} = n, c = r === void 0 ? !1 : r, a = i === void 0 ? !1 : i, f = s === void 0 ? !0 : s, u = c ? "100%" : "720px", h = c ? "0" : "auto";
|
|
42
43
|
let m;
|
|
43
|
-
e[0] !== u || e[1] !== h ? (m = /* @__PURE__ */ l(
|
|
44
|
+
e[0] !== u || e[1] !== h ? (m = /* @__PURE__ */ l(tn, { "data-testid": "content-editable", height: "fit-content", minH: "100%", width: "100%", maxWidth: u, marginInline: h, textStyle: "paragraph/M/regular", fontSize: "calc(var(--chakra-font-sizes-md) * var(--rich-text-font-scale))", position: "relative", outline: "none" }), e[0] = u, e[1] = h, e[2] = m) : m = e[2];
|
|
44
45
|
let d;
|
|
45
|
-
e[3] !== t || e[4] !== o || e[5] !== m ? (d = /* @__PURE__ */ l(
|
|
46
|
-
const
|
|
47
|
-
if (!
|
|
48
|
-
return
|
|
46
|
+
e[3] !== t || e[4] !== o || e[5] !== m ? (d = /* @__PURE__ */ l(F, { ref: t, width: "100%", minH: "100%", padding: o, children: m }), e[3] = t, e[4] = o, e[5] = m, e[6] = d) : d = e[6];
|
|
47
|
+
const p = d;
|
|
48
|
+
if (!f)
|
|
49
|
+
return p;
|
|
49
50
|
const x = a ? "true" : void 0;
|
|
50
51
|
let g;
|
|
51
52
|
e[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (g = {
|
|
@@ -53,9 +54,9 @@ function Je(n) {
|
|
|
53
54
|
minH: "100%"
|
|
54
55
|
}, e[7] = g) : g = e[7];
|
|
55
56
|
let _;
|
|
56
|
-
return e[8] !==
|
|
57
|
+
return e[8] !== p || e[9] !== x ? (_ = /* @__PURE__ */ l(ie, { className: "rich-text", "data-rich-message": x, height: "100%", minH: "0", position: "relative", contentProps: g, children: p }), e[8] = p, e[9] = x, e[10] = _) : _ = e[10], _;
|
|
57
58
|
}
|
|
58
|
-
const
|
|
59
|
+
const nn = {
|
|
59
60
|
sm: {
|
|
60
61
|
container: {
|
|
61
62
|
height: "20px",
|
|
@@ -78,7 +79,7 @@ const tn = {
|
|
|
78
79
|
iconSize: 14,
|
|
79
80
|
textStyle: "sm"
|
|
80
81
|
}
|
|
81
|
-
},
|
|
82
|
+
}, rn = {
|
|
82
83
|
neutral: {
|
|
83
84
|
color: "color.primary",
|
|
84
85
|
bg: "bg.muted",
|
|
@@ -93,7 +94,7 @@ const tn = {
|
|
|
93
94
|
bg: "var(--schub-accent-subtle)"
|
|
94
95
|
}
|
|
95
96
|
}
|
|
96
|
-
},
|
|
97
|
+
}, on = "md", sn = "neutral", Ke = (n) => {
|
|
97
98
|
const e = C(39);
|
|
98
99
|
let t, r, o, i, s, c, a;
|
|
99
100
|
e[0] !== n ? ({
|
|
@@ -105,50 +106,50 @@ const tn = {
|
|
|
105
106
|
icon: r,
|
|
106
107
|
...s
|
|
107
108
|
} = n, e[0] = n, e[1] = t, e[2] = r, e[3] = o, e[4] = i, e[5] = s, e[6] = c, e[7] = a) : (t = e[1], r = e[2], o = e[3], i = e[4], s = e[5], c = e[6], a = e[7]);
|
|
108
|
-
const
|
|
109
|
+
const f = c === void 0 ? on : c, u = a === void 0 ? sn : a;
|
|
109
110
|
let h;
|
|
110
|
-
e[8] !== t ? (h =
|
|
111
|
-
const m = h, d =
|
|
111
|
+
e[8] !== t ? (h = Mt(t), e[8] = t, e[9] = h) : h = e[9];
|
|
112
|
+
const m = h, d = nn[f], p = rn[u], x = i ? "pointer" : "default";
|
|
112
113
|
let g;
|
|
113
|
-
e[10] !== t || e[11] !== i ? (g = (
|
|
114
|
-
|
|
114
|
+
e[10] !== t || e[11] !== i ? (g = (I) => {
|
|
115
|
+
I.stopPropagation(), i?.(t);
|
|
115
116
|
}, e[10] = t, e[11] = i, e[12] = g) : g = e[12];
|
|
116
117
|
let _;
|
|
117
118
|
e[13] !== m || e[14] !== r || e[15] !== d.iconSize ? (_ = r ?? /* @__PURE__ */ l(m, { size: d.iconSize }), e[13] = m, e[14] = r, e[15] = d.iconSize, e[16] = _) : _ = e[16];
|
|
118
119
|
let y;
|
|
119
|
-
e[17] !== _ ? (y = /* @__PURE__ */ l(
|
|
120
|
+
e[17] !== _ ? (y = /* @__PURE__ */ l(de.span, { mr: "xs", display: "inline-flex", children: _ }), e[17] = _, e[18] = y) : y = e[18];
|
|
120
121
|
let S;
|
|
121
122
|
e[19] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (S = {
|
|
122
123
|
base: "14rem"
|
|
123
124
|
}, e[19] = S) : S = e[19];
|
|
124
125
|
let R;
|
|
125
|
-
e[20] !== t || e[21] !== d.textStyle ? (R = /* @__PURE__ */ l(
|
|
126
|
+
e[20] !== t || e[21] !== d.textStyle ? (R = /* @__PURE__ */ l(v, { maxW: S, textOverflow: "ellipsis", whiteSpace: "nowrap", overflow: "hidden", textStyle: d.textStyle, children: t }), e[20] = t, e[21] = d.textStyle, e[22] = R) : R = e[22];
|
|
126
127
|
let b;
|
|
127
|
-
e[23] !== t || e[24] !== R ? (b = /* @__PURE__ */ l(
|
|
128
|
+
e[23] !== t || e[24] !== R ? (b = /* @__PURE__ */ l(At, { content: t, children: R }), e[23] = t, e[24] = R, e[25] = b) : b = e[25];
|
|
128
129
|
let N;
|
|
129
|
-
e[26] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (N = /* @__PURE__ */ l(
|
|
130
|
+
e[26] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (N = /* @__PURE__ */ l(bt, {}), e[26] = N) : N = e[26];
|
|
130
131
|
let T;
|
|
131
|
-
e[27] !== t || e[28] !== o ? (T = o && /* @__PURE__ */ l(
|
|
132
|
+
e[27] !== t || e[28] !== o ? (T = o && /* @__PURE__ */ l(Tt, { "aria-label": "Remove reference", size: "2xs", ml: "xs", variant: "ghost", _hover: {
|
|
132
133
|
bg: "transparent"
|
|
133
|
-
}, onClick: (
|
|
134
|
-
|
|
135
|
-
}, children: /* @__PURE__ */ l(
|
|
134
|
+
}, onClick: (I) => {
|
|
135
|
+
I.stopPropagation(), o?.(t);
|
|
136
|
+
}, children: /* @__PURE__ */ l(Xt, { size: 12 }) }), e[27] = t, e[28] = o, e[29] = T) : T = e[29];
|
|
136
137
|
let E;
|
|
137
|
-
return e[30] !== s || e[31] !== d.container || e[32] !== T || e[33] !== x || e[34] !== g || e[35] !== y || e[36] !== b || e[37] !==
|
|
138
|
+
return e[30] !== s || e[31] !== d.container || e[32] !== T || e[33] !== x || e[34] !== g || e[35] !== y || e[36] !== b || e[37] !== p ? (E = /* @__PURE__ */ D(de.span, { display: "flex", flexDirection: "row", alignItems: "center", borderRadius: "xs", gap: "2xs", cursor: x, ...p, ...d.container, onClick: g, ...s, children: [
|
|
138
139
|
y,
|
|
139
140
|
b,
|
|
140
141
|
N,
|
|
141
142
|
T
|
|
142
|
-
] }), e[30] = s, e[31] = d.container, e[32] = T, e[33] = x, e[34] = g, e[35] = y, e[36] = b, e[37] =
|
|
143
|
+
] }), e[30] = s, e[31] = d.container, e[32] = T, e[33] = x, e[34] = g, e[35] = y, e[36] = b, e[37] = p, e[38] = E) : E = e[38], E;
|
|
143
144
|
};
|
|
144
|
-
let
|
|
145
|
+
let se = class ue extends Z {
|
|
145
146
|
__href;
|
|
146
147
|
__label;
|
|
147
148
|
static getType() {
|
|
148
149
|
return "reference-link";
|
|
149
150
|
}
|
|
150
151
|
static clone(e) {
|
|
151
|
-
return new
|
|
152
|
+
return new ue(e.__href, e.__label, e.__key);
|
|
152
153
|
}
|
|
153
154
|
constructor(e, t, r) {
|
|
154
155
|
super(r), this.__href = e, this.__label = t;
|
|
@@ -164,53 +165,53 @@ let ie = class de extends Z {
|
|
|
164
165
|
}
|
|
165
166
|
exportJSON() {
|
|
166
167
|
return {
|
|
167
|
-
type:
|
|
168
|
+
type: ue.getType(),
|
|
168
169
|
version: 1,
|
|
169
170
|
href: this.__href,
|
|
170
171
|
label: this.__label
|
|
171
172
|
};
|
|
172
173
|
}
|
|
173
174
|
static importJSON(e) {
|
|
174
|
-
return
|
|
175
|
+
return Ge(e.href, e.label);
|
|
175
176
|
}
|
|
176
177
|
decorate(e, t) {
|
|
177
178
|
const r = this.__href, i = r.split("/").pop() || "unknown", s = /^https?:\/\//i.test(r), c = /^#?\$PROJECT\//i.test(r);
|
|
178
|
-
return /* @__PURE__ */ l(
|
|
179
|
+
return /* @__PURE__ */ l(F, { width: "fit-content", display: "inline-block", children: /* @__PURE__ */ l(Ke, { fileName: i, onSelect: () => {
|
|
179
180
|
if (s)
|
|
180
181
|
window.open(r, "_blank", "noopener,noreferrer");
|
|
181
182
|
else if (c) {
|
|
182
|
-
const a = r.replace(/^#?\$PROJECT\//i, ""),
|
|
183
|
+
const a = r.replace(/^#?\$PROJECT\//i, ""), f = new CustomEvent("ui:open-project-file", {
|
|
183
184
|
detail: a
|
|
184
185
|
});
|
|
185
|
-
window.dispatchEvent(
|
|
186
|
+
window.dispatchEvent(f);
|
|
186
187
|
} else
|
|
187
188
|
window.location.assign(r);
|
|
188
189
|
} }) });
|
|
189
190
|
}
|
|
190
191
|
};
|
|
191
|
-
function
|
|
192
|
-
return new
|
|
192
|
+
function Ge(n, e) {
|
|
193
|
+
return new se(n, e);
|
|
193
194
|
}
|
|
194
|
-
function
|
|
195
|
-
return n instanceof
|
|
195
|
+
function ln(n) {
|
|
196
|
+
return n instanceof se;
|
|
196
197
|
}
|
|
197
|
-
const
|
|
198
|
-
dependencies: [
|
|
198
|
+
const Se = /\{\{\s*link\((['"])([^'"\s]+)\1\)\s*\}\}/, cn = {
|
|
199
|
+
dependencies: [se],
|
|
199
200
|
export: (n) => {
|
|
200
|
-
if (
|
|
201
|
+
if (ln(n)) {
|
|
201
202
|
const e = n.__href, t = n.__label ?? e;
|
|
202
203
|
return t ? `{{link('${t}')}}` : `{{link('${e}')}}`;
|
|
203
204
|
}
|
|
204
205
|
return null;
|
|
205
206
|
},
|
|
206
|
-
regExp:
|
|
207
|
-
importRegExp:
|
|
207
|
+
regExp: Se,
|
|
208
|
+
importRegExp: Se,
|
|
208
209
|
replace: (n, e) => {
|
|
209
210
|
const t = e[2], o = /^(https?:\/\/|\/)/i.test(t) ? t : `#${t}`, i = t;
|
|
210
|
-
n.replace(
|
|
211
|
+
n.replace(Ge(o, i));
|
|
211
212
|
},
|
|
212
213
|
type: "text-match"
|
|
213
|
-
},
|
|
214
|
+
}, xe = {
|
|
214
215
|
code: "rich-text__code",
|
|
215
216
|
codeHighlight: {
|
|
216
217
|
atrule: "rich-text__tokenAttr",
|
|
@@ -284,26 +285,32 @@ const Te = /\{\{\s*link\((['"])([^'"\s]+)\1\)\s*\}\}/, ln = {
|
|
|
284
285
|
row: "rich-text__row",
|
|
285
286
|
content: "rich-text__content"
|
|
286
287
|
}
|
|
287
|
-
},
|
|
288
|
-
|
|
288
|
+
}, an = globalThis;
|
|
289
|
+
an.Prism ??= Yt;
|
|
290
|
+
const Y = "calc(var(--chakra-font-sizes-sm) * var(--rich-text-font-scale))", dn = (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), Ro = (n) => {
|
|
291
|
+
const e = C(8), {
|
|
289
292
|
defaultCode: t,
|
|
290
293
|
isEditable: r,
|
|
291
294
|
showLineNumbers: o,
|
|
292
295
|
disableScroll: i
|
|
293
|
-
} = n, s = t === void 0 ? "" : t, c = r === void 0 ? !1 : r, a = o === void 0 ? !1 : o,
|
|
296
|
+
} = n, s = t === void 0 ? "" : t, c = r === void 0 ? !1 : r, a = o === void 0 ? !1 : o, f = i === void 0 ? !1 : i;
|
|
294
297
|
if (c) {
|
|
295
|
-
let
|
|
296
|
-
return e[0] !== s ? (
|
|
298
|
+
let d;
|
|
299
|
+
return e[0] !== s ? (d = /* @__PURE__ */ l(St, { defaultValue: s, fontFamily: "mono", fontSize: Y, resize: "vertical", minHeight: "100%" }), e[0] = s, e[1] = d) : d = e[1], d;
|
|
297
300
|
}
|
|
298
301
|
let u;
|
|
299
|
-
if (e[2] !== s || e[3] !==
|
|
300
|
-
const
|
|
302
|
+
if (e[2] !== s || e[3] !== f || e[4] !== a) {
|
|
303
|
+
const d = a ? s.split(`
|
|
301
304
|
`) : [s];
|
|
302
|
-
u = /* @__PURE__ */ l(
|
|
305
|
+
u = /* @__PURE__ */ l(F, { as: "pre", margin: 0, padding: "sm", fontFamily: "mono", fontSize: Y, lineHeight: "1.5", background: "bg.code", borderRadius: "md", width: "100%", overflowY: f ? "hidden" : void 0, children: a ? /* @__PURE__ */ l(F, { as: "code", display: "grid", gridTemplateColumns: "auto 1fr", columnGap: "sm", children: d.map(mn) }) : /* @__PURE__ */ l(F, { as: "code", children: s }) }), e[2] = s, e[3] = f, e[4] = a, e[5] = u;
|
|
303
306
|
} else
|
|
304
307
|
u = e[5];
|
|
305
|
-
|
|
306
|
-
|
|
308
|
+
const h = u;
|
|
309
|
+
if (f)
|
|
310
|
+
return h;
|
|
311
|
+
let m;
|
|
312
|
+
return e[6] !== h ? (m = /* @__PURE__ */ l(ie, { width: "100%", background: "bg.code", borderRadius: "md", showHorizontalScrollbar: !0, children: h }), e[6] = h, e[7] = m) : m = e[7], m;
|
|
313
|
+
}, un = (n) => {
|
|
307
314
|
const e = C(26), {
|
|
308
315
|
data: t,
|
|
309
316
|
fullWidth: r,
|
|
@@ -312,46 +319,46 @@ const Te = /\{\{\s*link\((['"])([^'"\s]+)\1\)\s*\}\}/, ln = {
|
|
|
312
319
|
} = n, s = r === void 0 ? !1 : r, c = o === void 0 ? !1 : o;
|
|
313
320
|
let a;
|
|
314
321
|
e[0] !== i ? (a = i === void 0 ? [] : i, e[0] = i, e[1] = a) : a = e[1];
|
|
315
|
-
const
|
|
322
|
+
const f = a;
|
|
316
323
|
if (!t.length) {
|
|
317
324
|
const b = c ? "0" : "1px";
|
|
318
325
|
let N;
|
|
319
|
-
e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (N = /* @__PURE__ */ l(
|
|
326
|
+
e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (N = /* @__PURE__ */ l(v, { textStyle: "label/S/regular", fontSize: Y, color: "fg.muted", children: "No data" }), e[2] = N) : N = e[2];
|
|
320
327
|
let T;
|
|
321
|
-
return e[3] !== b ? (T = /* @__PURE__ */ l(
|
|
328
|
+
return e[3] !== b ? (T = /* @__PURE__ */ l(F, { padding: "sm", borderWidth: b, borderColor: "border.muted", children: N }), e[3] = b, e[4] = T) : T = e[4], T;
|
|
322
329
|
}
|
|
323
330
|
let u;
|
|
324
|
-
e[5] !==
|
|
331
|
+
e[5] !== f ? (u = new Set(f), e[5] = f, e[6] = u) : u = e[6];
|
|
325
332
|
const h = u;
|
|
326
333
|
let m;
|
|
327
334
|
e[7] !== t[0] ? (m = Object.keys(t[0] ?? {}), e[7] = t[0], e[8] = m) : m = e[8];
|
|
328
335
|
let d;
|
|
329
336
|
e[9] !== h || e[10] !== m ? (d = m.filter((b) => !h.has(b)), e[9] = h, e[10] = m, e[11] = d) : d = e[11];
|
|
330
|
-
const
|
|
337
|
+
const p = d, x = s ? "100%" : "fit-content", g = c ? "0" : "1px";
|
|
331
338
|
let _;
|
|
332
|
-
e[12] !==
|
|
339
|
+
e[12] !== p ? (_ = /* @__PURE__ */ l(q.Header, { children: /* @__PURE__ */ l(q.Row, { background: "bg.muted", children: p.map(fn) }) }), e[12] = p, e[13] = _) : _ = e[13];
|
|
333
340
|
let y;
|
|
334
|
-
if (e[14] !==
|
|
341
|
+
if (e[14] !== p || e[15] !== t) {
|
|
335
342
|
let b;
|
|
336
|
-
e[17] !==
|
|
343
|
+
e[17] !== p ? (b = (N, T) => /* @__PURE__ */ l(q.Row, { children: p.map((E) => /* @__PURE__ */ l(q.Cell, { paddingX: "xs", paddingY: "2xs", children: /* @__PURE__ */ l(v, { textStyle: "paragraph/S/regular", fontSize: Y, children: dn(N[E]) }) }, `${T}-${E}`)) }, `${T}-${p.join("-")}`), e[17] = p, e[18] = b) : b = e[18], y = t.map(b), e[14] = p, e[15] = t, e[16] = y;
|
|
337
344
|
} else
|
|
338
345
|
y = e[16];
|
|
339
346
|
let S;
|
|
340
|
-
e[19] !== y ? (S = /* @__PURE__ */ l(
|
|
347
|
+
e[19] !== y ? (S = /* @__PURE__ */ l(q.Body, { children: y }), e[19] = y, e[20] = S) : S = e[20];
|
|
341
348
|
let R;
|
|
342
|
-
return e[21] !== S || e[22] !== x || e[23] !== g || e[24] !== _ ? (R = /* @__PURE__ */ l(
|
|
349
|
+
return e[21] !== S || e[22] !== x || e[23] !== g || e[24] !== _ ? (R = /* @__PURE__ */ l(ie, { maxWidth: "100%", showHorizontalScrollbar: !0, showVerticalScrollbar: !1, children: /* @__PURE__ */ D(q.Root, { size: "sm", width: x, borderWidth: g, borderColor: "border.muted", children: [
|
|
343
350
|
_,
|
|
344
351
|
S
|
|
345
352
|
] }) }), e[21] = S, e[22] = x, e[23] = g, e[24] = _, e[25] = R) : R = e[25], R;
|
|
346
353
|
};
|
|
347
|
-
function
|
|
348
|
-
return /* @__PURE__ */ F
|
|
349
|
-
/* @__PURE__ */ l(
|
|
350
|
-
/* @__PURE__ */ l(
|
|
354
|
+
function mn(n, e) {
|
|
355
|
+
return /* @__PURE__ */ D(F, { as: "span", display: "contents", children: [
|
|
356
|
+
/* @__PURE__ */ l(v, { as: "span", color: "fg.muted", textAlign: "right", fontSize: "inherit", children: e + 1 }),
|
|
357
|
+
/* @__PURE__ */ l(v, { as: "span", fontSize: "inherit", children: n.length ? n : " " })
|
|
351
358
|
] }, `${e}-${n}`);
|
|
352
359
|
}
|
|
353
|
-
function
|
|
354
|
-
return /* @__PURE__ */ l(
|
|
360
|
+
function fn(n) {
|
|
361
|
+
return /* @__PURE__ */ l(q.ColumnHeader, { textTransform: "none", paddingX: "xs", paddingY: "2xs", children: /* @__PURE__ */ l(v, { textStyle: "label/S/medium", fontSize: Y, children: n }) }, n);
|
|
355
362
|
}
|
|
356
363
|
class W extends Z {
|
|
357
364
|
__data;
|
|
@@ -374,7 +381,7 @@ class W extends Z {
|
|
|
374
381
|
return !1;
|
|
375
382
|
}
|
|
376
383
|
decorate() {
|
|
377
|
-
return /* @__PURE__ */ l(
|
|
384
|
+
return /* @__PURE__ */ l(un, { fullWidth: !0, isReadOnly: !0, data: this.__data });
|
|
378
385
|
}
|
|
379
386
|
exportJSON() {
|
|
380
387
|
return {
|
|
@@ -393,34 +400,34 @@ class W extends Z {
|
|
|
393
400
|
`);
|
|
394
401
|
}
|
|
395
402
|
}
|
|
396
|
-
function
|
|
403
|
+
function ye(n) {
|
|
397
404
|
return new W(n);
|
|
398
405
|
}
|
|
399
|
-
function
|
|
406
|
+
function Re(n) {
|
|
400
407
|
return n instanceof W;
|
|
401
408
|
}
|
|
402
|
-
const
|
|
403
|
-
function
|
|
409
|
+
const pn = Ct.lazy(() => import("./EquationComponent-DeDYHvqY.js"));
|
|
410
|
+
function Ne(n) {
|
|
404
411
|
let e = n.getAttribute("data-lexical-equation");
|
|
405
412
|
const t = n.getAttribute("data-lexical-inline") === "true";
|
|
406
413
|
return e = atob(e || ""), e ? {
|
|
407
|
-
node:
|
|
414
|
+
node: le(e, t)
|
|
408
415
|
} : null;
|
|
409
416
|
}
|
|
410
|
-
class
|
|
417
|
+
class U extends Z {
|
|
411
418
|
__equation;
|
|
412
419
|
__inline;
|
|
413
420
|
static getType() {
|
|
414
421
|
return "equation";
|
|
415
422
|
}
|
|
416
423
|
static clone(e) {
|
|
417
|
-
return new
|
|
424
|
+
return new U(e.__equation, e.__inline, e.__key);
|
|
418
425
|
}
|
|
419
426
|
constructor(e, t, r) {
|
|
420
427
|
super(r), this.__equation = e, this.__inline = t ?? !1;
|
|
421
428
|
}
|
|
422
429
|
static importJSON(e) {
|
|
423
|
-
return
|
|
430
|
+
return le(e.equation, e.inline);
|
|
424
431
|
}
|
|
425
432
|
exportJSON() {
|
|
426
433
|
return {
|
|
@@ -436,7 +443,7 @@ class q extends Z {
|
|
|
436
443
|
}
|
|
437
444
|
exportDOM() {
|
|
438
445
|
const e = document.createElement(this.__inline ? "span" : "div"), t = btoa(this.__equation);
|
|
439
|
-
return e.setAttribute("data-lexical-equation", t), e.setAttribute("data-lexical-inline", `${this.__inline}`),
|
|
446
|
+
return e.setAttribute("data-lexical-equation", t), e.setAttribute("data-lexical-inline", `${this.__inline}`), Zt.render(this.__equation, e, {
|
|
440
447
|
displayMode: !this.__inline,
|
|
441
448
|
// true === block display //
|
|
442
449
|
errorColor: "#cc0000",
|
|
@@ -451,11 +458,11 @@ class q extends Z {
|
|
|
451
458
|
static importDOM() {
|
|
452
459
|
return {
|
|
453
460
|
div: (e) => e.hasAttribute("data-lexical-equation") ? {
|
|
454
|
-
conversion:
|
|
461
|
+
conversion: Ne,
|
|
455
462
|
priority: 2
|
|
456
463
|
} : null,
|
|
457
464
|
span: (e) => e.hasAttribute("data-lexical-equation") ? {
|
|
458
|
-
conversion:
|
|
465
|
+
conversion: Ne,
|
|
459
466
|
priority: 1
|
|
460
467
|
} : null
|
|
461
468
|
};
|
|
@@ -477,38 +484,38 @@ class q extends Z {
|
|
|
477
484
|
return this.__inline;
|
|
478
485
|
}
|
|
479
486
|
decorate() {
|
|
480
|
-
return /* @__PURE__ */ l(
|
|
487
|
+
return /* @__PURE__ */ l(De, { fallback: null, children: /* @__PURE__ */ l(pn, { equation: this.__equation, inline: this.__inline }) });
|
|
481
488
|
}
|
|
482
489
|
}
|
|
483
|
-
function
|
|
484
|
-
const t = new
|
|
485
|
-
return
|
|
490
|
+
function le(n = "", e = !1) {
|
|
491
|
+
const t = new U(n, e);
|
|
492
|
+
return mt(t);
|
|
486
493
|
}
|
|
487
|
-
function
|
|
488
|
-
return n instanceof
|
|
494
|
+
function Ve(n) {
|
|
495
|
+
return n instanceof U;
|
|
489
496
|
}
|
|
490
|
-
const
|
|
491
|
-
dependencies: [
|
|
492
|
-
export: (n) =>
|
|
497
|
+
const hn = {
|
|
498
|
+
dependencies: [U],
|
|
499
|
+
export: (n) => Ve(n) && n.isInline() ? `\\( ${n.getEquation().trim()} \\)` : null,
|
|
493
500
|
importRegExp: /\\\((.*?)\\\)/,
|
|
494
501
|
regExp: /\\\((.*?)\\\)/,
|
|
495
502
|
replace: (n, e) => {
|
|
496
|
-
const t =
|
|
503
|
+
const t = le(e[1].trim(), !0);
|
|
497
504
|
n.replace(t);
|
|
498
505
|
},
|
|
499
506
|
type: "text-match"
|
|
500
|
-
},
|
|
501
|
-
dependencies: [
|
|
507
|
+
}, _n = {
|
|
508
|
+
dependencies: [U],
|
|
502
509
|
regExpStart: /\\\[/,
|
|
503
510
|
regExpEnd: /\\]/,
|
|
504
|
-
export: (n) =>
|
|
505
|
-
replace: (n, e, t, r, o) => o ? (n.append(
|
|
511
|
+
export: (n) => Ve(n) && !n.isInline() ? `\\[ ${n.getEquation().trim()} \\]` : null,
|
|
512
|
+
replace: (n, e, t, r, o) => o ? (n.append(le(o.join(" "), !1)), !0) : !1,
|
|
506
513
|
type: "multiline-element"
|
|
507
514
|
};
|
|
508
|
-
function
|
|
515
|
+
function gn() {
|
|
509
516
|
return null;
|
|
510
517
|
}
|
|
511
|
-
class K extends
|
|
518
|
+
class K extends Oe {
|
|
512
519
|
static getType() {
|
|
513
520
|
return "hr";
|
|
514
521
|
}
|
|
@@ -516,7 +523,7 @@ class K extends $e {
|
|
|
516
523
|
return new K(e?.__key);
|
|
517
524
|
}
|
|
518
525
|
static importJSON(e) {
|
|
519
|
-
return
|
|
526
|
+
return Xe();
|
|
520
527
|
}
|
|
521
528
|
exportJSON() {
|
|
522
529
|
return {
|
|
@@ -534,13 +541,13 @@ class K extends $e {
|
|
|
534
541
|
return null;
|
|
535
542
|
}
|
|
536
543
|
}
|
|
537
|
-
function
|
|
544
|
+
function Xe() {
|
|
538
545
|
return new K();
|
|
539
546
|
}
|
|
540
|
-
function
|
|
547
|
+
function En(n) {
|
|
541
548
|
return n instanceof K;
|
|
542
549
|
}
|
|
543
|
-
const
|
|
550
|
+
const xn = kt(() => import("./MermaidComponent-Cz_Iob5U.js"));
|
|
544
551
|
class J extends Z {
|
|
545
552
|
__code;
|
|
546
553
|
static getType() {
|
|
@@ -581,25 +588,25 @@ ${this.__code}
|
|
|
581
588
|
t.__code = e;
|
|
582
589
|
}
|
|
583
590
|
decorate() {
|
|
584
|
-
return /* @__PURE__ */ l(
|
|
591
|
+
return /* @__PURE__ */ l(De, { fallback: null, children: /* @__PURE__ */ l(xn, { code: this.__code, nodeKey: this.__key }) });
|
|
585
592
|
}
|
|
586
593
|
}
|
|
587
|
-
function
|
|
594
|
+
function No(n) {
|
|
588
595
|
return n instanceof J;
|
|
589
596
|
}
|
|
590
|
-
const
|
|
597
|
+
const bn = {
|
|
591
598
|
dependencies: [K],
|
|
592
|
-
export: (n) =>
|
|
599
|
+
export: (n) => En(n) ? "***" : null,
|
|
593
600
|
regExp: /^(---|\*\*\*|___)\s?$/,
|
|
594
601
|
replace: (n) => {
|
|
595
|
-
const e =
|
|
602
|
+
const e = Xe();
|
|
596
603
|
n.replace(e);
|
|
597
604
|
},
|
|
598
605
|
type: "element"
|
|
599
|
-
},
|
|
606
|
+
}, Tn = {
|
|
600
607
|
dependencies: [],
|
|
601
608
|
export: (n, e) => {
|
|
602
|
-
if (
|
|
609
|
+
if (Re(n)) {
|
|
603
610
|
const t = n.getData();
|
|
604
611
|
if (!t.length) return "";
|
|
605
612
|
const r = Object.keys(t[0]), o = r.join(" | "), i = r.map(() => "---").join(" | "), s = t.map((c) => r.map((a) => String(c[a] || "")).join(" | "));
|
|
@@ -616,25 +623,25 @@ const En = {
|
|
|
616
623
|
return;
|
|
617
624
|
}
|
|
618
625
|
const s = t[0].split("|").slice(1, -1).map((c) => c.trim());
|
|
619
|
-
if (o?.getType() === "data_table" &&
|
|
620
|
-
const c = o.getData(), a = {},
|
|
621
|
-
s.forEach((d,
|
|
622
|
-
const x = u[
|
|
626
|
+
if (o?.getType() === "data_table" && Re(o)) {
|
|
627
|
+
const c = o.getData(), a = {}, f = c.length === 1 && Object.values(c[0]).every((d) => d === ""), u = c.length > 0 ? Object.keys(c[0]) : s.map((d, p) => `col_${p}`);
|
|
628
|
+
s.forEach((d, p) => {
|
|
629
|
+
const x = u[p] || `col_${p}`;
|
|
623
630
|
a[x] = d;
|
|
624
631
|
});
|
|
625
|
-
const h =
|
|
632
|
+
const h = f ? [a] : [...c, a], m = ye(h);
|
|
626
633
|
o.replace(m), n.remove();
|
|
627
634
|
} else {
|
|
628
635
|
const c = {};
|
|
629
|
-
s.forEach((
|
|
630
|
-
c[
|
|
636
|
+
s.forEach((f, u) => {
|
|
637
|
+
c[f || `col_${u}`] = "";
|
|
631
638
|
});
|
|
632
|
-
const a =
|
|
639
|
+
const a = ye([c]);
|
|
633
640
|
n.replace(a);
|
|
634
641
|
}
|
|
635
642
|
},
|
|
636
643
|
type: "element"
|
|
637
|
-
},
|
|
644
|
+
}, Sn = {
|
|
638
645
|
dependencies: [re],
|
|
639
646
|
export: (n, e) => {
|
|
640
647
|
if (n instanceof re) {
|
|
@@ -658,7 +665,7 @@ const En = {
|
|
|
658
665
|
t.toggleFormat("underline"), n.replace(t);
|
|
659
666
|
},
|
|
660
667
|
type: "text-match"
|
|
661
|
-
},
|
|
668
|
+
}, yn = {
|
|
662
669
|
dependencies: [re],
|
|
663
670
|
export: (n, e) => null,
|
|
664
671
|
regExp: /<u>(.*)<\/u>/,
|
|
@@ -668,146 +675,146 @@ const En = {
|
|
|
668
675
|
t.toggleFormat("underline"), n.replace(t);
|
|
669
676
|
},
|
|
670
677
|
type: "text-match"
|
|
671
|
-
},
|
|
678
|
+
}, Ce = /https?:\/\/[^\s<>"']*[^\s<>"'.,:;"')\]}]/, V = (n) => n.replace(/\\([*_`~\\])/g, "$1"), Rn = (n) => n.replace(/\\/g, "\\\\").replace(/"/g, '\\"'), Nn = (n) => n?.replace(/\\(["\\])/g, "$1"), Ye = (n, e, t) => {
|
|
672
679
|
if (n !== e)
|
|
673
680
|
return t;
|
|
674
681
|
const r = e.replace(/([*_`~\\])/g, "\\$1");
|
|
675
682
|
return t.replace(r, e);
|
|
676
|
-
},
|
|
683
|
+
}, Cn = {
|
|
677
684
|
dependencies: [_e],
|
|
678
685
|
export: (n, e) => {
|
|
679
|
-
if (!
|
|
686
|
+
if (!Ft(n) || He(n))
|
|
680
687
|
return null;
|
|
681
|
-
const t = n.getTitle(), r = V(n.getURL()), o =
|
|
682
|
-
return t != null ? `[${o}](${r} "${
|
|
688
|
+
const t = n.getTitle(), r = V(n.getURL()), o = Ye(n.getTextContent(), r, e(n));
|
|
689
|
+
return t != null ? `[${o}](${r} "${Rn(t)}")` : `[${o}](${r})`;
|
|
683
690
|
},
|
|
684
691
|
importRegExp: /(?:\[(.+?)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))/,
|
|
685
692
|
regExp: /(?:\[(.+?)\])(?:\((?:([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?)\))$/,
|
|
686
693
|
replace: (n, e) => {
|
|
687
|
-
const [, t, r, o] = e, i = V(r), s =
|
|
688
|
-
title:
|
|
694
|
+
const [, t, r, o] = e, i = V(r), s = Dt(i, {
|
|
695
|
+
title: Nn(o)
|
|
689
696
|
}), c = t.split("[").length - 1, a = t.split("]").length - 1;
|
|
690
|
-
let
|
|
697
|
+
let f = t, u = "";
|
|
691
698
|
if (c < a)
|
|
692
699
|
return;
|
|
693
700
|
if (c > a) {
|
|
694
701
|
const d = t.split("[");
|
|
695
|
-
u = `[${d[0]}`,
|
|
702
|
+
u = `[${d[0]}`, f = d.slice(1).join("[");
|
|
696
703
|
}
|
|
697
|
-
const h = V(
|
|
704
|
+
const h = V(f), m = X(h === i ? i : h);
|
|
698
705
|
return m.setFormat(n.getFormat()), s.append(m), n.replace(s), u && s.insertBefore(X(u)), m;
|
|
699
706
|
},
|
|
700
707
|
trigger: ")",
|
|
701
708
|
type: "text-match"
|
|
702
|
-
},
|
|
709
|
+
}, kn = {
|
|
703
710
|
dependencies: [ge],
|
|
704
711
|
export: (n, e) => {
|
|
705
712
|
if (!He(n))
|
|
706
713
|
return null;
|
|
707
714
|
const t = V(n.getURL());
|
|
708
|
-
return
|
|
715
|
+
return Ye(n.getTextContent(), t, e(n));
|
|
709
716
|
},
|
|
710
|
-
regExp:
|
|
711
|
-
importRegExp:
|
|
717
|
+
regExp: Ce,
|
|
718
|
+
importRegExp: Ce,
|
|
712
719
|
replace: (n, e) => {
|
|
713
|
-
const t = V(e[0]), r =
|
|
720
|
+
const t = V(e[0]), r = Ht(t), o = X(t);
|
|
714
721
|
o.setFormat(n.getFormat()), r.append(o), n.replace(r);
|
|
715
722
|
},
|
|
716
723
|
type: "text-match"
|
|
717
|
-
},
|
|
718
|
-
function
|
|
724
|
+
}, In = [Tn, bn, Sn, yn, Cn, kn], Co = [qe, _e, ge, W, We, ze, Be, Ee, Je, J, U, K, se], Qe = [zt, ...Bt.filter((n) => n !== Ut), ...In, hn, _n], ko = [...Qe, cn], Io = xe;
|
|
725
|
+
function $n(n) {
|
|
719
726
|
return n.trim().toLowerCase() === "mermaid";
|
|
720
727
|
}
|
|
721
|
-
function
|
|
728
|
+
function On(n) {
|
|
722
729
|
const e = n.getLanguage() ?? "plaintext";
|
|
723
|
-
return
|
|
730
|
+
return $n(e) ? (n.replace(new J(n.getTextContent())), !0) : !1;
|
|
724
731
|
}
|
|
725
|
-
function
|
|
732
|
+
function Ln() {
|
|
726
733
|
const n = C(3), [e] = H();
|
|
727
734
|
let t, r;
|
|
728
735
|
return n[0] !== e ? (t = () => {
|
|
729
|
-
e.update(
|
|
730
|
-
}, r = [e], n[0] = e, n[1] = t, n[2] = r) : (t = n[1], r = n[2]),
|
|
736
|
+
e.update(vn);
|
|
737
|
+
}, r = [e], n[0] = e, n[1] = t, n[2] = r) : (t = n[1], r = n[2]), z(t, r), null;
|
|
731
738
|
}
|
|
732
|
-
function
|
|
733
|
-
const n =
|
|
739
|
+
function vn() {
|
|
740
|
+
const n = ft(Ee);
|
|
734
741
|
for (const e of n)
|
|
735
|
-
|
|
742
|
+
On(e);
|
|
736
743
|
}
|
|
737
|
-
function
|
|
744
|
+
function wn() {
|
|
738
745
|
const n = C(3), [e] = H();
|
|
739
746
|
let t, r;
|
|
740
|
-
return n[0] !== e ? (t = () =>
|
|
747
|
+
return n[0] !== e ? (t = () => Qt(e), r = [e], n[0] = e, n[1] = t, n[2] = r) : (t = n[1], r = n[2]), z(t, r), null;
|
|
741
748
|
}
|
|
742
|
-
const
|
|
743
|
-
function
|
|
749
|
+
const $o = k("TOGGLE_LINK_EDIT_MODE_COMMAND");
|
|
750
|
+
function Ze(n) {
|
|
744
751
|
const e = C(4), {
|
|
745
752
|
isEditable: t
|
|
746
753
|
} = n, [r] = H();
|
|
747
754
|
let o, i;
|
|
748
755
|
return e[0] !== r || e[1] !== t ? (o = () => {
|
|
749
756
|
r.setEditable(t);
|
|
750
|
-
}, i = [t, r], e[0] = r, e[1] = t, e[2] = o, e[3] = i) : (o = e[2], i = e[3]),
|
|
757
|
+
}, i = [t, r], e[0] = r, e[1] = t, e[2] = o, e[3] = i) : (o = e[2], i = e[3]), z(o, i), null;
|
|
751
758
|
}
|
|
752
|
-
function
|
|
759
|
+
function et() {
|
|
753
760
|
const n = C(2), [e] = H();
|
|
754
761
|
let t;
|
|
755
|
-
return n[0] !== e ? (t = /* @__PURE__ */ l(
|
|
762
|
+
return n[0] !== e ? (t = /* @__PURE__ */ l(F, { fontSize: "xs", color: "fg.muted", padding: "4", children: /* @__PURE__ */ l(en, { 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;
|
|
756
763
|
}
|
|
757
|
-
const
|
|
758
|
-
function
|
|
764
|
+
const Pn = /^---\s*\n([\s\S]*?)\n---\s*(?:\n|$)/, Mn = /^```/, An = /^([ \t]*)((?:[-*+])|(?:\d+\.))\s+/, Dn = /^([ \t]+)/;
|
|
765
|
+
function tt(n) {
|
|
759
766
|
let e = 0;
|
|
760
767
|
for (const t of n)
|
|
761
768
|
e += t === " " ? 4 : 1;
|
|
762
769
|
return e;
|
|
763
770
|
}
|
|
764
|
-
function
|
|
771
|
+
function Fn(n, e) {
|
|
765
772
|
return [...n].reverse().find((t) => t.sourceIndentWidth < e);
|
|
766
773
|
}
|
|
767
|
-
function
|
|
774
|
+
function me(n, e, t) {
|
|
768
775
|
return e === t && !n.includes(" ") ? n : " ".repeat(e);
|
|
769
776
|
}
|
|
770
|
-
function
|
|
771
|
-
const t = n.match(
|
|
777
|
+
function Hn(n, e) {
|
|
778
|
+
const t = n.match(Dn);
|
|
772
779
|
if (!t)
|
|
773
780
|
return n.trim() !== "" && (e.length = 0), n;
|
|
774
|
-
const r =
|
|
781
|
+
const r = tt(t[1]), o = Fn(e, r);
|
|
775
782
|
if (!o) return n;
|
|
776
|
-
const i = r + (o.normalizedIndentWidth - o.sourceIndentWidth), s =
|
|
783
|
+
const i = r + (o.normalizedIndentWidth - o.sourceIndentWidth), s = me(t[1], i, r);
|
|
777
784
|
return s === t[1] ? n : `${s}${n.slice(t[1].length)}`;
|
|
778
785
|
}
|
|
779
|
-
function
|
|
780
|
-
const r =
|
|
786
|
+
function zn(n, e, t) {
|
|
787
|
+
const r = tt(e[1]);
|
|
781
788
|
for (; t.length && t.at(-1).sourceIndentWidth > r; )
|
|
782
789
|
t.pop();
|
|
783
790
|
const o = t.at(-1);
|
|
784
791
|
if (o?.sourceIndentWidth === r)
|
|
785
|
-
return `${
|
|
792
|
+
return `${me(e[1], o.normalizedIndentWidth, r)}${n.slice(e[1].length)}`;
|
|
786
793
|
const i = t.at(-1), s = r - (i?.sourceIndentWidth ?? 0);
|
|
787
794
|
let c = r;
|
|
788
795
|
return i && s === 2 && !e[1].includes(" ") && (c = i.normalizedIndentWidth + 4), t.push({
|
|
789
796
|
normalizedIndentWidth: c,
|
|
790
797
|
sourceIndentWidth: r
|
|
791
|
-
}), `${
|
|
798
|
+
}), `${me(e[1], c, r)}${n.slice(e[1].length)}`;
|
|
792
799
|
}
|
|
793
|
-
function
|
|
794
|
-
if (
|
|
800
|
+
function Bn(n, e) {
|
|
801
|
+
if (Mn.test(n.trimStart()))
|
|
795
802
|
return e.isInCodeFence = !e.isInCodeFence, n;
|
|
796
803
|
if (e.isInCodeFence) return n;
|
|
797
|
-
const t = n.match(
|
|
798
|
-
return t ?
|
|
804
|
+
const t = n.match(An);
|
|
805
|
+
return t ? zn(n, t, e.activeListIndents) : Hn(n, e.activeListIndents);
|
|
799
806
|
}
|
|
800
|
-
function
|
|
807
|
+
function nt(n) {
|
|
801
808
|
const e = n.split(`
|
|
802
809
|
`), t = {
|
|
803
810
|
isInCodeFence: !1,
|
|
804
811
|
activeListIndents: []
|
|
805
812
|
};
|
|
806
|
-
return e.map((r) =>
|
|
813
|
+
return e.map((r) => Bn(r, t)).join(`
|
|
807
814
|
`);
|
|
808
815
|
}
|
|
809
|
-
function
|
|
810
|
-
const e = n.match(
|
|
816
|
+
function Un(n) {
|
|
817
|
+
const e = n.match(Pn);
|
|
811
818
|
return e ? {
|
|
812
819
|
frontmatter: e[0],
|
|
813
820
|
body: n.slice(e[0].length)
|
|
@@ -816,29 +823,29 @@ function Bn(n) {
|
|
|
816
823
|
body: n
|
|
817
824
|
};
|
|
818
825
|
}
|
|
819
|
-
const
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
const
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
function
|
|
826
|
+
const qn = "UPLOAD_FILE", Wn = "OPEN_CONTEXT", Jn = "RUN_PROMPT", jn = "UPDATE_FORMAT", Kn = "UPDATE_BEHAVIOR", Gn = "INSERT_PROMPT", Vn = "RENAME_PROMPT", Xn = "DUPLICATE_PROMPT", Yn = "DELETE_PROMPT", Qn = "DELETE_REFERENCES", Zn = "RENAME_REFERENCES", er = "INSERT_REFERENCE", tr = "INSERT_BLOCK";
|
|
827
|
+
k(qn);
|
|
828
|
+
k(Wn);
|
|
829
|
+
k(Jn);
|
|
830
|
+
k(jn);
|
|
831
|
+
k(Kn);
|
|
832
|
+
k(Gn);
|
|
833
|
+
k(Vn);
|
|
834
|
+
k(Xn);
|
|
835
|
+
k(Yn);
|
|
836
|
+
k(Qn);
|
|
837
|
+
k(Zn);
|
|
838
|
+
const rt = k(er), nr = k(tr), rr = "INSERT_NEW_FILE_PLACEHOLDER", or = "INSERT_NEW_TEXT_PLACEHOLDER", ir = "INSERT_PLACEHOLDER_REFERENCE";
|
|
839
|
+
k(rr);
|
|
840
|
+
k(or);
|
|
841
|
+
k(ir);
|
|
842
|
+
function sr(n) {
|
|
836
843
|
const e = oe();
|
|
837
844
|
return n.style !== null && e.setFormat(n.style.textAlign), {
|
|
838
845
|
node: e
|
|
839
846
|
};
|
|
840
847
|
}
|
|
841
|
-
class ee extends
|
|
848
|
+
class ee extends Oe {
|
|
842
849
|
static getType() {
|
|
843
850
|
return "comment";
|
|
844
851
|
}
|
|
@@ -847,7 +854,7 @@ class ee extends $e {
|
|
|
847
854
|
}
|
|
848
855
|
createDOM(e) {
|
|
849
856
|
const t = document.createElement("blockquote");
|
|
850
|
-
return
|
|
857
|
+
return Fe(t, e.theme.comment), t;
|
|
851
858
|
}
|
|
852
859
|
updateDOM() {
|
|
853
860
|
return !1;
|
|
@@ -855,7 +862,7 @@ class ee extends $e {
|
|
|
855
862
|
static importDOM() {
|
|
856
863
|
return {
|
|
857
864
|
blockquote: () => ({
|
|
858
|
-
conversion:
|
|
865
|
+
conversion: sr,
|
|
859
866
|
priority: 0
|
|
860
867
|
})
|
|
861
868
|
};
|
|
@@ -864,7 +871,7 @@ class ee extends $e {
|
|
|
864
871
|
const {
|
|
865
872
|
element: t
|
|
866
873
|
} = super.exportDOM(e);
|
|
867
|
-
if (t &&
|
|
874
|
+
if (t && pt(t)) {
|
|
868
875
|
this.isEmpty() && t.append(document.createElement("br"));
|
|
869
876
|
const r = this.getFormatType();
|
|
870
877
|
t.style.textAlign = r;
|
|
@@ -890,11 +897,11 @@ class ee extends $e {
|
|
|
890
897
|
}
|
|
891
898
|
// mutation
|
|
892
899
|
insertNewAfter(e, t) {
|
|
893
|
-
const r =
|
|
900
|
+
const r = ae(), o = this.getDirection();
|
|
894
901
|
return r.setDirection(o), this.insertAfter(r, t), r;
|
|
895
902
|
}
|
|
896
903
|
collapseAtStart() {
|
|
897
|
-
const e =
|
|
904
|
+
const e = ae();
|
|
898
905
|
return this.getChildren().forEach((r) => {
|
|
899
906
|
e.append(r);
|
|
900
907
|
}), this.replace(e), !0;
|
|
@@ -903,58 +910,58 @@ class ee extends $e {
|
|
|
903
910
|
function oe() {
|
|
904
911
|
return new ee();
|
|
905
912
|
}
|
|
906
|
-
const
|
|
907
|
-
const t =
|
|
913
|
+
const lr = (n, e) => {
|
|
914
|
+
const t = ht(), r = oe();
|
|
908
915
|
if (e) {
|
|
909
916
|
e.getParent()?.replace(r, !0), e.remove(), r.selectEnd();
|
|
910
917
|
return;
|
|
911
918
|
}
|
|
912
|
-
|
|
919
|
+
_t(t) && vt(t, oe);
|
|
913
920
|
};
|
|
914
|
-
function
|
|
921
|
+
function cr() {
|
|
915
922
|
const n = C(3), [e] = H();
|
|
916
923
|
let t, r;
|
|
917
|
-
return n[0] !== e ? (t = () =>
|
|
924
|
+
return n[0] !== e ? (t = () => he(e.registerCommand(nr, ar, Le)), r = [e], n[0] = e, n[1] = t, n[2] = r) : (t = n[1], r = n[2]), z(t, r), null;
|
|
918
925
|
}
|
|
919
|
-
function
|
|
926
|
+
function ar(n) {
|
|
920
927
|
const {
|
|
921
928
|
optionId: e,
|
|
922
929
|
nodeToReplace: t
|
|
923
930
|
} = n;
|
|
924
|
-
return
|
|
931
|
+
return lr(e, t), !1;
|
|
925
932
|
}
|
|
926
|
-
const
|
|
933
|
+
const dr = () => {
|
|
927
934
|
const n = C(3), [e] = H();
|
|
928
935
|
let t, r;
|
|
929
|
-
n[0] !== e ? (t = () =>
|
|
930
|
-
const s = o.getChildren().filter(
|
|
936
|
+
n[0] !== e ? (t = () => he(e.registerNodeTransform(ee, (o) => {
|
|
937
|
+
const s = o.getChildren().filter(ur);
|
|
931
938
|
s.length > 0 && e.update(() => {
|
|
932
|
-
s.forEach(
|
|
939
|
+
s.forEach(mr);
|
|
933
940
|
});
|
|
934
|
-
})), r = [e], n[0] = e, n[1] = t, n[2] = r) : (t = n[1], r = n[2]),
|
|
941
|
+
})), r = [e], n[0] = e, n[1] = t, n[2] = r) : (t = n[1], r = n[2]), z(t, r);
|
|
935
942
|
};
|
|
936
|
-
function
|
|
943
|
+
function ur(n) {
|
|
937
944
|
return n.getType() === "comment";
|
|
938
945
|
}
|
|
939
|
-
function
|
|
940
|
-
n.replace(
|
|
946
|
+
function mr(n) {
|
|
947
|
+
n.replace(ae(), !0);
|
|
941
948
|
}
|
|
942
|
-
function
|
|
943
|
-
return
|
|
949
|
+
function fr() {
|
|
950
|
+
return dr(), cr(), null;
|
|
944
951
|
}
|
|
945
|
-
const
|
|
952
|
+
const pr = (n) => {
|
|
946
953
|
let e = "";
|
|
947
954
|
const t = n.getChildren(), r = t.length;
|
|
948
955
|
for (let o = 0; o < r; o++) {
|
|
949
956
|
const i = t[o];
|
|
950
|
-
e += i.getTextContent(),
|
|
957
|
+
e += i.getTextContent(), gt(i) && o !== r - 1 && !i.isInline() && (e += `
|
|
951
958
|
`);
|
|
952
959
|
}
|
|
953
960
|
return e;
|
|
954
|
-
},
|
|
961
|
+
}, hr = (n) => n.type !== "reference" ? null : `#${n.name ?? n.referenceId ?? ""}`, _r = (n) => n.type === "paragraph" && !!n.children?.length, ot = (n) => {
|
|
955
962
|
if (n.type === "comment")
|
|
956
963
|
return "";
|
|
957
|
-
const e =
|
|
964
|
+
const e = hr(n);
|
|
958
965
|
if (e !== null)
|
|
959
966
|
return e;
|
|
960
967
|
let t = typeof n.text == "string" ? n.text : "";
|
|
@@ -968,18 +975,18 @@ const mr = (n) => {
|
|
|
968
975
|
`);
|
|
969
976
|
continue;
|
|
970
977
|
}
|
|
971
|
-
t +=
|
|
978
|
+
t += ot(s), _r(s) && (t += `
|
|
972
979
|
`);
|
|
973
980
|
}
|
|
974
981
|
return t;
|
|
975
|
-
},
|
|
982
|
+
}, it = (n) => {
|
|
976
983
|
try {
|
|
977
984
|
const e = JSON.parse(n);
|
|
978
|
-
return
|
|
985
|
+
return ot(e.root ?? {});
|
|
979
986
|
} catch {
|
|
980
987
|
return "";
|
|
981
988
|
}
|
|
982
|
-
},
|
|
989
|
+
}, gr = {
|
|
983
990
|
root: {
|
|
984
991
|
direction: "ltr",
|
|
985
992
|
format: "",
|
|
@@ -997,7 +1004,7 @@ const mr = (n) => {
|
|
|
997
1004
|
}]
|
|
998
1005
|
}
|
|
999
1006
|
};
|
|
1000
|
-
function
|
|
1007
|
+
function Er(n = "") {
|
|
1001
1008
|
return n.trim() ? {
|
|
1002
1009
|
root: {
|
|
1003
1010
|
direction: "ltr",
|
|
@@ -1023,9 +1030,9 @@ function _r(n = "") {
|
|
|
1023
1030
|
}] : []
|
|
1024
1031
|
}))
|
|
1025
1032
|
}
|
|
1026
|
-
} : JSON.parse(JSON.stringify(
|
|
1033
|
+
} : JSON.parse(JSON.stringify(gr));
|
|
1027
1034
|
}
|
|
1028
|
-
function
|
|
1035
|
+
function xr(n) {
|
|
1029
1036
|
const e = C(4), {
|
|
1030
1037
|
editorRef: t,
|
|
1031
1038
|
previousTextRef: r
|
|
@@ -1033,22 +1040,22 @@ function gr(n) {
|
|
|
1033
1040
|
let i, s;
|
|
1034
1041
|
return e[0] !== o || e[1] !== r ? (i = () => ({
|
|
1035
1042
|
setEditorValue: (c) => {
|
|
1036
|
-
const a = o.parseEditorState(JSON.stringify(
|
|
1037
|
-
o.setEditorState(a), r.current =
|
|
1043
|
+
const a = o.parseEditorState(JSON.stringify(Er(c)));
|
|
1044
|
+
o.setEditorState(a), r.current = it(c), o.focus(void 0, {
|
|
1038
1045
|
defaultSelection: "rootEnd"
|
|
1039
1046
|
});
|
|
1040
1047
|
}
|
|
1041
1048
|
}), s = [o, r], e[0] = o, e[1] = r, e[2] = i, e[3] = s) : (i = e[2], s = e[3]), It(t, i, s), null;
|
|
1042
1049
|
}
|
|
1043
|
-
const
|
|
1044
|
-
function
|
|
1050
|
+
const br = (n) => n.key !== "Enter" ? !1 : !n.ctrlKey && !n.metaKey && !n.shiftKey && !n.altKey;
|
|
1051
|
+
function Tr(n) {
|
|
1045
1052
|
const e = C(4), {
|
|
1046
1053
|
onSubmit: t
|
|
1047
1054
|
} = n, [r] = H();
|
|
1048
1055
|
let o, i;
|
|
1049
|
-
return e[0] !== r || e[1] !== t ? (o = () => r.registerCommand(
|
|
1056
|
+
return e[0] !== r || e[1] !== t ? (o = () => r.registerCommand(Et, (s) => br(s) ? (s.preventDefault(), t?.(), !0) : !1, xt), i = [r, t], e[0] = r, e[1] = t, e[2] = o, e[3] = i) : (o = e[2], i = e[3]), z(o, i), null;
|
|
1050
1057
|
}
|
|
1051
|
-
const
|
|
1058
|
+
const ke = ["table", "connector"], Sr = (n) => n.sort((r, o) => ke.indexOf(r.group) - ke.indexOf(o.group)).map((r, o) => ({
|
|
1052
1059
|
...r,
|
|
1053
1060
|
index: o
|
|
1054
1061
|
})).reduce((r, o) => {
|
|
@@ -1064,30 +1071,30 @@ function Ie(n) {
|
|
|
1064
1071
|
setRefElement: s,
|
|
1065
1072
|
secondaryLabel: c,
|
|
1066
1073
|
primaryLabel: a,
|
|
1067
|
-
tabIndex:
|
|
1068
|
-
} = n, u =
|
|
1074
|
+
tabIndex: f
|
|
1075
|
+
} = n, u = f === void 0 ? -1 : f, h = r ? "bg.active" : "transparent", m = r ? "bg.active" : "bg.hover";
|
|
1069
1076
|
let d;
|
|
1070
1077
|
e[0] !== m ? (d = {
|
|
1071
1078
|
bg: m
|
|
1072
1079
|
}, e[0] = m, e[1] = d) : d = e[1];
|
|
1073
|
-
let
|
|
1074
|
-
e[2] !== a ? (
|
|
1080
|
+
let p;
|
|
1081
|
+
e[2] !== a ? (p = /* @__PURE__ */ l(ne.Trigger, { children: /* @__PURE__ */ l(v, { mt: "1px", lineClamp: 1, textOverflow: "ellipsis", textStyle: "label/M/regular", children: a }) }), e[2] = a, e[3] = p) : p = e[3];
|
|
1075
1082
|
let x;
|
|
1076
1083
|
e[4] !== a ? (x = /* @__PURE__ */ l(ne.Positioner, { children: /* @__PURE__ */ l(ne.Content, { children: a }) }), e[4] = a, e[5] = x) : x = e[5];
|
|
1077
1084
|
let g;
|
|
1078
|
-
e[6] !==
|
|
1079
|
-
|
|
1085
|
+
e[6] !== p || e[7] !== x ? (g = /* @__PURE__ */ D(ne.Root, { children: [
|
|
1086
|
+
p,
|
|
1080
1087
|
x
|
|
1081
|
-
] }), e[6] =
|
|
1088
|
+
] }), e[6] = p, e[7] = x, e[8] = g) : g = e[8];
|
|
1082
1089
|
let _;
|
|
1083
|
-
e[9] !== c ? (_ = c && /* @__PURE__ */ l(
|
|
1090
|
+
e[9] !== c ? (_ = c && /* @__PURE__ */ l(v, { lineClamp: 2, textOverflow: "ellipsis", textStyle: "label/S/regular", color: "fg.muted", children: c }), e[9] = c, e[10] = _) : _ = e[10];
|
|
1084
1091
|
let y;
|
|
1085
|
-
return e[11] !== t || e[12] !== r || e[13] !== o || e[14] !== i || e[15] !== s || e[16] !== h || e[17] !== d || e[18] !== g || e[19] !== _ || e[20] !== u ? (y = /* @__PURE__ */
|
|
1092
|
+
return e[11] !== t || e[12] !== r || e[13] !== o || e[14] !== i || e[15] !== s || e[16] !== h || e[17] !== d || e[18] !== g || e[19] !== _ || e[20] !== u ? (y = /* @__PURE__ */ D(pe, { direction: "column", cursor: "pointer", gap: "2xs", padding: "2xs", paddingX: "sm", bg: h, _hover: d, tabIndex: u, ref: s, role: "option", "aria-selected": r, id: t, onMouseEnter: i, onClick: o, children: [
|
|
1086
1093
|
g,
|
|
1087
1094
|
_
|
|
1088
1095
|
] }), e[11] = t, e[12] = r, e[13] = o, e[14] = i, e[15] = s, e[16] = h, e[17] = d, e[18] = g, e[19] = _, e[20] = u, e[21] = y) : y = e[21], y;
|
|
1089
1096
|
}
|
|
1090
|
-
const
|
|
1097
|
+
const yr = (n) => {
|
|
1091
1098
|
const e = C(12), {
|
|
1092
1099
|
options: t,
|
|
1093
1100
|
selectedIndex: r,
|
|
@@ -1096,37 +1103,37 @@ const Tr = (n) => {
|
|
|
1096
1103
|
} = n, {
|
|
1097
1104
|
table: s,
|
|
1098
1105
|
connector: c
|
|
1099
|
-
} =
|
|
1106
|
+
} = Sr(t), a = s === void 0 ? [] : s, f = c === void 0 ? [] : c, u = [...a, ...f].length;
|
|
1100
1107
|
let h, m;
|
|
1101
1108
|
e[0] !== r ? (h = () => {
|
|
1102
1109
|
document.getElementById(`typeahead-item-${r}`)?.scrollIntoView({
|
|
1103
1110
|
behavior: "instant",
|
|
1104
1111
|
block: "nearest"
|
|
1105
1112
|
});
|
|
1106
|
-
}, m = [r], e[0] = r, e[1] = h, e[2] = m) : (h = e[1], m = e[2]),
|
|
1107
|
-
const d =
|
|
1113
|
+
}, m = [r], e[0] = r, e[1] = h, e[2] = m) : (h = e[1], m = e[2]), z(h, m);
|
|
1114
|
+
const d = ie, p = "1000", x = "absolute", g = "modal", _ = "24rem", y = !1;
|
|
1108
1115
|
let S;
|
|
1109
1116
|
e[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (S = {
|
|
1110
1117
|
base: "100vw",
|
|
1111
1118
|
md: "264px"
|
|
1112
1119
|
}, e[3] = S) : S = e[3];
|
|
1113
1120
|
let R;
|
|
1114
|
-
e[4] !== u ? (R = !u && /* @__PURE__ */ l(
|
|
1115
|
-
const b = !!a.length && /* @__PURE__ */
|
|
1116
|
-
/* @__PURE__ */ l(
|
|
1117
|
-
/* @__PURE__ */ l(
|
|
1118
|
-
] }), N = !!
|
|
1119
|
-
/* @__PURE__ */ l(
|
|
1120
|
-
/* @__PURE__ */ l(
|
|
1121
|
+
e[4] !== u ? (R = !u && /* @__PURE__ */ l(v, { children: "No results" }), e[4] = u, e[5] = R) : R = e[5];
|
|
1122
|
+
const b = !!a.length && /* @__PURE__ */ D(Te, { children: [
|
|
1123
|
+
/* @__PURE__ */ l(v, { paddingTop: "xs", paddingBottom: "2xs", paddingX: "sm", color: "fg.muted", textStyle: "label/S/medium", children: "Tables" }),
|
|
1124
|
+
/* @__PURE__ */ l(F, { children: a.map((E) => /* @__PURE__ */ l(Ie, { id: `typeahead-item-${E.index}`, isSelected: r === E.index, onClick: () => o(E, E.index), onMouseEnter: () => i(E.index), primaryLabel: E.name, secondaryLabel: E.description, setRefElement: E.setRefElement, tabIndex: -1 }, E.id)) })
|
|
1125
|
+
] }), N = !!f.length && /* @__PURE__ */ D(Te, { children: [
|
|
1126
|
+
/* @__PURE__ */ l(v, { paddingTop: "xs", paddingBottom: "2xs", paddingX: "sm", color: "fg.muted", textStyle: "label/S/medium", children: "Data Sources" }),
|
|
1127
|
+
/* @__PURE__ */ l(F, { children: f.map((E) => /* @__PURE__ */ l(Ie, { id: `typeahead-item-${E.index}`, isSelected: r === E.index, onClick: () => o(E, E.index), onMouseEnter: () => i(E.index), primaryLabel: E.name, secondaryLabel: E.description, setRefElement: E.setRefElement, tabIndex: -1 }, E.id)) })
|
|
1121
1128
|
] });
|
|
1122
1129
|
let T;
|
|
1123
|
-
return e[6] !== d || e[7] !== R || e[8] !== b || e[9] !== N || e[10] !== S ? (T = /* @__PURE__ */
|
|
1130
|
+
return e[6] !== d || e[7] !== R || e[8] !== b || e[9] !== N || e[10] !== S ? (T = /* @__PURE__ */ D(d, { zIndex: p, position: x, layerStyle: g, maxHeight: _, showHorizontalScrollbar: y, minWidth: S, children: [
|
|
1124
1131
|
R,
|
|
1125
1132
|
b,
|
|
1126
1133
|
N
|
|
1127
1134
|
] }), e[6] = d, e[7] = R, e[8] = b, e[9] = N, e[10] = S, e[11] = T) : T = e[11], T;
|
|
1128
|
-
},
|
|
1129
|
-
function
|
|
1135
|
+
}, Rr = (n, e) => n.filter((t) => t.name.replace(/ /g, "_").toLowerCase().includes(e.toLowerCase()));
|
|
1136
|
+
function Nr(n, e = []) {
|
|
1130
1137
|
const t = e.map((r, o) => ({
|
|
1131
1138
|
id: r.resourceId,
|
|
1132
1139
|
key: r.resourceId,
|
|
@@ -1137,12 +1144,12 @@ function yr(n, e = []) {
|
|
|
1137
1144
|
setRefElement: () => {
|
|
1138
1145
|
}
|
|
1139
1146
|
}));
|
|
1140
|
-
return n == null || n === "" ? t :
|
|
1147
|
+
return n == null || n === "" ? t : Rr(t, n);
|
|
1141
1148
|
}
|
|
1142
|
-
const
|
|
1143
|
-
function
|
|
1144
|
-
let t =
|
|
1145
|
-
if (t === null && (t =
|
|
1149
|
+
const st = "\\.\\-<>_:", be = ["#"].join(""), lt = `[^${be}${st}\\s]`, Cr = `(?:[${st}]|)`, ct = 75, kr = new RegExp(`(^|\\s|\\()([${be}]((?:${lt}${Cr}){0,${ct}}))$`), Ir = new RegExp(`(^|\\s|\\()([${be}]((?:${lt}){0,${ct}}))$`);
|
|
1150
|
+
function $r(n, e) {
|
|
1151
|
+
let t = kr.exec(n);
|
|
1152
|
+
if (t === null && (t = Ir.exec(n)), t !== null) {
|
|
1146
1153
|
const r = t[1], o = t[3];
|
|
1147
1154
|
if (o.length >= e)
|
|
1148
1155
|
return {
|
|
@@ -1153,47 +1160,47 @@ function Ir(n, e) {
|
|
|
1153
1160
|
}
|
|
1154
1161
|
return null;
|
|
1155
1162
|
}
|
|
1156
|
-
const
|
|
1157
|
-
function
|
|
1163
|
+
const Or = 20;
|
|
1164
|
+
function Lr(n) {
|
|
1158
1165
|
const e = C(9), {
|
|
1159
1166
|
items: t
|
|
1160
1167
|
} = n;
|
|
1161
1168
|
let r;
|
|
1162
1169
|
e[0] !== t ? (r = t === void 0 ? [] : t, e[0] = t, e[1] = r) : r = e[1];
|
|
1163
|
-
const o = r, [i, s] =
|
|
1164
|
-
let
|
|
1165
|
-
e[2] !== c ? (
|
|
1170
|
+
const o = r, [i, s] = $t(null), [c] = H(), a = Nr(i, o);
|
|
1171
|
+
let f;
|
|
1172
|
+
e[2] !== c ? (f = (x, g, _) => {
|
|
1166
1173
|
c.update(() => {
|
|
1167
|
-
g && (c.dispatchCommand(
|
|
1174
|
+
g && (c.dispatchCommand(rt, {
|
|
1168
1175
|
resourceId: x.id,
|
|
1169
1176
|
resourceType: x.group,
|
|
1170
1177
|
name: x.name,
|
|
1171
1178
|
nodeToReplace: g
|
|
1172
1179
|
}), _());
|
|
1173
1180
|
});
|
|
1174
|
-
}, e[2] = c, e[3] =
|
|
1175
|
-
const u =
|
|
1181
|
+
}, e[2] = c, e[3] = f) : f = e[3];
|
|
1182
|
+
const u = f, h = wr;
|
|
1176
1183
|
let m;
|
|
1177
|
-
e[4] !== a ? (m = a.slice(0,
|
|
1184
|
+
e[4] !== a ? (m = a.slice(0, Or), e[4] = a, e[5] = m) : m = e[5];
|
|
1178
1185
|
const d = m;
|
|
1179
|
-
let
|
|
1180
|
-
return e[6] !== d || e[7] !== u ? (
|
|
1186
|
+
let p;
|
|
1187
|
+
return e[6] !== d || e[7] !== u ? (p = /* @__PURE__ */ l(wt, { onQueryChange: s, onSelectOption: u, triggerFn: h, options: d, menuRenderFn: vr }), e[6] = d, e[7] = u, e[8] = p) : p = e[8], p;
|
|
1181
1188
|
}
|
|
1182
|
-
function
|
|
1189
|
+
function vr(n, e) {
|
|
1183
1190
|
const {
|
|
1184
1191
|
options: t,
|
|
1185
1192
|
selectedIndex: r,
|
|
1186
1193
|
selectOptionAndCleanUp: o,
|
|
1187
1194
|
setHighlightedIndex: i
|
|
1188
1195
|
} = e;
|
|
1189
|
-
return n.current ?
|
|
1196
|
+
return n.current ? Pt.createPortal(/* @__PURE__ */ l(yr, { options: t, selectedIndex: r, onSelectItem: (s, c) => {
|
|
1190
1197
|
i(c), o(s);
|
|
1191
1198
|
}, onMouseEnterItem: (s) => {
|
|
1192
1199
|
i(s);
|
|
1193
1200
|
} }), n.current) : null;
|
|
1194
1201
|
}
|
|
1195
|
-
function
|
|
1196
|
-
return
|
|
1202
|
+
function wr(n) {
|
|
1203
|
+
return $r(n, 0);
|
|
1197
1204
|
}
|
|
1198
1205
|
class Q extends re {
|
|
1199
1206
|
__referenceId;
|
|
@@ -1221,7 +1228,7 @@ class Q extends re {
|
|
|
1221
1228
|
}
|
|
1222
1229
|
createDOM(e) {
|
|
1223
1230
|
const t = document.createElement("span");
|
|
1224
|
-
return
|
|
1231
|
+
return Fe(t, e.theme.reference), t.setAttribute("data-reference-id", this.__referenceId), t.setAttribute("data-name", this.__name), t.textContent = `#${this.__name}`, t;
|
|
1225
1232
|
}
|
|
1226
1233
|
updateDOM(e, t) {
|
|
1227
1234
|
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;
|
|
@@ -1235,7 +1242,7 @@ class Q extends re {
|
|
|
1235
1242
|
static importDOM() {
|
|
1236
1243
|
return {
|
|
1237
1244
|
span: (e) => !e.hasAttribute("data-reference-id") || !e.hasAttribute("data-name") ? null : {
|
|
1238
|
-
conversion:
|
|
1245
|
+
conversion: Pr,
|
|
1239
1246
|
priority: 1
|
|
1240
1247
|
}
|
|
1241
1248
|
};
|
|
@@ -1255,123 +1262,123 @@ class Q extends re {
|
|
|
1255
1262
|
return `#${this.__name}`;
|
|
1256
1263
|
}
|
|
1257
1264
|
}
|
|
1258
|
-
function
|
|
1265
|
+
function Pr(n) {
|
|
1259
1266
|
const e = n.getAttribute("data-reference-id"), t = n.getAttribute("data-name");
|
|
1260
1267
|
return !e || !t ? null : {
|
|
1261
|
-
node:
|
|
1268
|
+
node: at(e, t)
|
|
1262
1269
|
};
|
|
1263
1270
|
}
|
|
1264
|
-
function
|
|
1271
|
+
function at(n, e) {
|
|
1265
1272
|
return new Q(n, e);
|
|
1266
1273
|
}
|
|
1267
|
-
const
|
|
1268
|
-
const r =
|
|
1274
|
+
const Mr = (n, e, t) => {
|
|
1275
|
+
const r = at(e, t);
|
|
1269
1276
|
if (n) {
|
|
1270
1277
|
n?.replace(r), n.remove(), r.selectEnd();
|
|
1271
1278
|
return;
|
|
1272
1279
|
}
|
|
1273
1280
|
};
|
|
1274
|
-
function
|
|
1281
|
+
function Ar(n) {
|
|
1275
1282
|
const e = C(4), {
|
|
1276
1283
|
onAddReference: t
|
|
1277
1284
|
} = n, [r] = H();
|
|
1278
1285
|
let o, i;
|
|
1279
|
-
return e[0] !== r || e[1] !== t ? (o = () =>
|
|
1286
|
+
return e[0] !== r || e[1] !== t ? (o = () => he(r.registerCommand(rt, (s) => {
|
|
1280
1287
|
const {
|
|
1281
1288
|
resourceId: c,
|
|
1282
1289
|
resourceType: a,
|
|
1283
|
-
name:
|
|
1290
|
+
name: f,
|
|
1284
1291
|
nodeToReplace: u
|
|
1285
1292
|
} = s;
|
|
1286
1293
|
return r.update(() => {
|
|
1287
|
-
|
|
1294
|
+
Mr(u, c, f);
|
|
1288
1295
|
}), t?.(c, a), !0;
|
|
1289
|
-
},
|
|
1296
|
+
}, Le)), i = [r, t], e[0] = r, e[1] = t, e[2] = o, e[3] = i) : (o = e[2], i = e[3]), z(o, i), null;
|
|
1290
1297
|
}
|
|
1291
|
-
const
|
|
1292
|
-
...
|
|
1298
|
+
const Dr = {
|
|
1299
|
+
...xe,
|
|
1293
1300
|
// Override paragraph class to remove margins specifically for prompt input
|
|
1294
1301
|
paragraph: "rich-text__p rich-text__p--no-margin"
|
|
1295
|
-
},
|
|
1302
|
+
}, Fr = [ee, Rt, Q], Hr = (n, e) => {
|
|
1296
1303
|
const t = C(39), {
|
|
1297
1304
|
defaultState: r,
|
|
1298
1305
|
debug: o,
|
|
1299
1306
|
isEditable: i,
|
|
1300
1307
|
placeholder: s
|
|
1301
1308
|
} = n, c = o === void 0 ? !1 : o, a = i === void 0 ? !0 : i, {
|
|
1302
|
-
onChange:
|
|
1309
|
+
onChange: f,
|
|
1303
1310
|
onError: u,
|
|
1304
1311
|
onSubmit: h,
|
|
1305
1312
|
references: m,
|
|
1306
1313
|
onAddReference: d
|
|
1307
|
-
} = n,
|
|
1314
|
+
} = n, p = u === void 0 ? zr : u;
|
|
1308
1315
|
let x;
|
|
1309
1316
|
t[0] !== m ? (x = m === void 0 ? [] : m, t[0] = m, t[1] = x) : x = t[1];
|
|
1310
1317
|
const g = x;
|
|
1311
1318
|
let _;
|
|
1312
|
-
t[2] !== r || t[3] !== a || t[4] !==
|
|
1319
|
+
t[2] !== r || t[3] !== a || t[4] !== p ? (_ = {
|
|
1313
1320
|
namespace: "PROMPT_EDITOR",
|
|
1314
|
-
nodes:
|
|
1321
|
+
nodes: Fr,
|
|
1315
1322
|
editorState: r,
|
|
1316
1323
|
editable: a,
|
|
1317
|
-
onError:
|
|
1318
|
-
theme:
|
|
1319
|
-
}, t[2] = r, t[3] = a, t[4] =
|
|
1324
|
+
onError: p,
|
|
1325
|
+
theme: Dr
|
|
1326
|
+
}, t[2] = r, t[3] = a, t[4] = p, t[5] = _) : _ = t[5];
|
|
1320
1327
|
const y = _;
|
|
1321
1328
|
let S;
|
|
1322
|
-
t[6] !== r ? (S =
|
|
1323
|
-
const R =
|
|
1329
|
+
t[6] !== r ? (S = it(r), t[6] = r, t[7] = S) : S = t[7];
|
|
1330
|
+
const R = Lt(S);
|
|
1324
1331
|
let b;
|
|
1325
|
-
t[8] !== s ? (b = s ?? /* @__PURE__ */
|
|
1332
|
+
t[8] !== s ? (b = s ?? /* @__PURE__ */ D(v, { textStyle: "label/M/regular", color: "fg.subtle", pointerEvents: "none", position: "absolute", top: "0", children: [
|
|
1326
1333
|
"Type your query here or press ",
|
|
1327
|
-
/* @__PURE__ */ l(
|
|
1334
|
+
/* @__PURE__ */ l(yt, { color: "fg.subtle", children: "#" }),
|
|
1328
1335
|
" to add a reference."
|
|
1329
1336
|
] }), t[8] = s, t[9] = b) : b = t[9];
|
|
1330
1337
|
const N = b;
|
|
1331
1338
|
let T;
|
|
1332
|
-
t[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (T = /* @__PURE__ */ l(
|
|
1339
|
+
t[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (T = /* @__PURE__ */ l(Nt, {}), t[10] = T) : T = t[10];
|
|
1333
1340
|
let E;
|
|
1334
|
-
t[11] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (E = /* @__PURE__ */ l(
|
|
1335
|
-
let
|
|
1336
|
-
t[12] !== N ? (
|
|
1337
|
-
let
|
|
1338
|
-
t[14] !==
|
|
1341
|
+
t[11] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (E = /* @__PURE__ */ l(je, { fullWidth: !0 }), t[11] = E) : E = t[11];
|
|
1342
|
+
let I;
|
|
1343
|
+
t[12] !== N ? (I = /* @__PURE__ */ l(Ae, { contentEditable: E, placeholder: N, ErrorBoundary: Pe }), t[12] = N, t[13] = I) : I = t[13];
|
|
1344
|
+
let w;
|
|
1345
|
+
t[14] !== f ? (w = /* @__PURE__ */ l(Me, { ignoreSelectionChange: !0, ignoreHistoryMergeTagChange: !1, onChange: (te) => {
|
|
1339
1346
|
te.read(() => {
|
|
1340
|
-
const
|
|
1341
|
-
|
|
1347
|
+
const ut = ve(), ce = pr(ut);
|
|
1348
|
+
ce !== R.current && (R.current = ce, f?.(ce, te.toJSON()));
|
|
1342
1349
|
});
|
|
1343
|
-
} }), t[14] =
|
|
1344
|
-
let
|
|
1345
|
-
t[16] !== e ? (
|
|
1350
|
+
} }), t[14] = f, t[15] = w) : w = t[15];
|
|
1351
|
+
let P;
|
|
1352
|
+
t[16] !== e ? (P = /* @__PURE__ */ l(xr, { editorRef: e, previousTextRef: R }), t[16] = e, t[17] = P) : P = t[17];
|
|
1346
1353
|
let $;
|
|
1347
|
-
t[18] !== a ? ($ = /* @__PURE__ */ l(
|
|
1348
|
-
let
|
|
1349
|
-
t[20] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
1354
|
+
t[18] !== a ? ($ = /* @__PURE__ */ l(Ze, { isEditable: a }), t[18] = a, t[19] = $) : $ = t[19];
|
|
1355
|
+
let M;
|
|
1356
|
+
t[20] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (M = /* @__PURE__ */ l(fr, {}), t[20] = M) : M = t[20];
|
|
1350
1357
|
let O;
|
|
1351
|
-
t[21] !== h ? (O = /* @__PURE__ */ l(
|
|
1358
|
+
t[21] !== h ? (O = /* @__PURE__ */ l(Tr, { onSubmit: h }), t[21] = h, t[22] = O) : O = t[22];
|
|
1352
1359
|
let L;
|
|
1353
|
-
t[23] !== g ? (L = /* @__PURE__ */ l(
|
|
1354
|
-
let
|
|
1355
|
-
t[25] !== d ? (
|
|
1356
|
-
let
|
|
1357
|
-
t[27] !== c ? (
|
|
1360
|
+
t[23] !== g ? (L = /* @__PURE__ */ l(Lr, { items: g }), t[23] = g, t[24] = L) : L = t[24];
|
|
1361
|
+
let A;
|
|
1362
|
+
t[25] !== d ? (A = /* @__PURE__ */ l(Ar, { onAddReference: d }), t[25] = d, t[26] = A) : A = t[26];
|
|
1363
|
+
let B;
|
|
1364
|
+
t[27] !== c ? (B = c ? /* @__PURE__ */ l(et, {}) : "", t[27] = c, t[28] = B) : B = t[28];
|
|
1358
1365
|
let G;
|
|
1359
|
-
return t[29] !== y || t[30] !==
|
|
1366
|
+
return t[29] !== y || t[30] !== I || t[31] !== w || t[32] !== P || t[33] !== $ || t[34] !== O || t[35] !== L || t[36] !== A || t[37] !== B ? (G = /* @__PURE__ */ l(pe, { direction: "column", justifyContent: "space-between", width: "100%", position: "relative", children: /* @__PURE__ */ D(we, { initialConfig: y, children: [
|
|
1360
1367
|
T,
|
|
1361
|
-
|
|
1368
|
+
I,
|
|
1369
|
+
w,
|
|
1362
1370
|
P,
|
|
1363
|
-
M,
|
|
1364
1371
|
$,
|
|
1365
|
-
|
|
1372
|
+
M,
|
|
1366
1373
|
O,
|
|
1367
1374
|
L,
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
] }) }), t[29] = y, t[30] =
|
|
1371
|
-
},
|
|
1372
|
-
function
|
|
1375
|
+
A,
|
|
1376
|
+
B
|
|
1377
|
+
] }) }), t[29] = y, t[30] = I, t[31] = w, t[32] = P, t[33] = $, t[34] = O, t[35] = L, t[36] = A, t[37] = B, t[38] = G) : G = t[38], G;
|
|
1378
|
+
}, Oo = Ot(Hr);
|
|
1379
|
+
function zr() {
|
|
1373
1380
|
}
|
|
1374
|
-
function
|
|
1381
|
+
function Br(n) {
|
|
1375
1382
|
const e = C(5), {
|
|
1376
1383
|
value: t,
|
|
1377
1384
|
onUpdate: r
|
|
@@ -1381,7 +1388,7 @@ function Hr(n) {
|
|
|
1381
1388
|
o && o.update(() => r(t), {
|
|
1382
1389
|
tag: "history-merge"
|
|
1383
1390
|
});
|
|
1384
|
-
}, s = [t, o, r], e[0] = o, e[1] = r, e[2] = t, e[3] = i, e[4] = s) : (i = e[3], s = e[4]),
|
|
1391
|
+
}, s = [t, o, r], e[0] = o, e[1] = r, e[2] = t, e[3] = i, e[4] = s) : (i = e[3], s = e[4]), z(i, s), null;
|
|
1385
1392
|
}
|
|
1386
1393
|
class j extends Z {
|
|
1387
1394
|
__href;
|
|
@@ -1413,138 +1420,138 @@ class j extends Z {
|
|
|
1413
1420
|
};
|
|
1414
1421
|
}
|
|
1415
1422
|
static importJSON(e) {
|
|
1416
|
-
return
|
|
1423
|
+
return dt(e.href, e.label);
|
|
1417
1424
|
}
|
|
1418
1425
|
decorate(e, t) {
|
|
1419
1426
|
const r = this.__href, i = r.split("/").pop() || "unknown", s = /^https?:\/\//i.test(r), c = /^#?\$PROJECT\//i.test(r);
|
|
1420
|
-
return /* @__PURE__ */ l(
|
|
1427
|
+
return /* @__PURE__ */ l(F, { width: "fit-content", display: "inline-block", children: /* @__PURE__ */ l(Ke, { fileName: i, onSelect: () => {
|
|
1421
1428
|
if (s)
|
|
1422
1429
|
window.open(r, "_blank", "noopener,noreferrer");
|
|
1423
1430
|
else if (c) {
|
|
1424
|
-
const a = r.replace(/^#?\$PROJECT\//i, ""),
|
|
1431
|
+
const a = r.replace(/^#?\$PROJECT\//i, ""), f = new CustomEvent("ui:open-project-file", {
|
|
1425
1432
|
detail: a
|
|
1426
1433
|
});
|
|
1427
|
-
window.dispatchEvent(
|
|
1434
|
+
window.dispatchEvent(f);
|
|
1428
1435
|
} else
|
|
1429
1436
|
window.location.assign(r);
|
|
1430
1437
|
} }) });
|
|
1431
1438
|
}
|
|
1432
1439
|
}
|
|
1433
|
-
function
|
|
1440
|
+
function dt(n, e) {
|
|
1434
1441
|
return new j(n, e);
|
|
1435
1442
|
}
|
|
1436
|
-
function
|
|
1443
|
+
function Ur(n) {
|
|
1437
1444
|
return n instanceof j;
|
|
1438
1445
|
}
|
|
1439
|
-
const
|
|
1446
|
+
const $e = /\{\{\s*link\((['"])([^'"\s]+)\1\)\s*\}\}/, qr = {
|
|
1440
1447
|
dependencies: [j],
|
|
1441
1448
|
export: (n) => {
|
|
1442
|
-
if (
|
|
1449
|
+
if (Ur(n)) {
|
|
1443
1450
|
const e = n.__href, t = n.__label ?? e;
|
|
1444
1451
|
return t ? `{{link('${t}')}}` : `{{link('${e}')}}`;
|
|
1445
1452
|
}
|
|
1446
1453
|
return null;
|
|
1447
1454
|
},
|
|
1448
|
-
regExp:
|
|
1449
|
-
importRegExp:
|
|
1455
|
+
regExp: $e,
|
|
1456
|
+
importRegExp: $e,
|
|
1450
1457
|
replace: (n, e) => {
|
|
1451
1458
|
const t = e[2], o = /^(https?:\/\/|\/)/i.test(t) ? t : `#${t}`, i = t;
|
|
1452
|
-
n.replace(
|
|
1459
|
+
n.replace(dt(o, i));
|
|
1453
1460
|
},
|
|
1454
1461
|
type: "text-match"
|
|
1455
|
-
},
|
|
1456
|
-
function
|
|
1462
|
+
}, fe = [...Qe, qr];
|
|
1463
|
+
function Lo(n) {
|
|
1457
1464
|
const e = C(37), {
|
|
1458
1465
|
debug: t,
|
|
1459
1466
|
defaultState: r,
|
|
1460
1467
|
fullWidth: o,
|
|
1461
1468
|
isEditable: i,
|
|
1462
1469
|
onChange: s
|
|
1463
|
-
} = n, c = t === void 0 ? !1 : t, a = r === void 0 ? "" : r,
|
|
1470
|
+
} = n, c = t === void 0 ? !1 : t, a = r === void 0 ? "" : r, f = o === void 0 ? !1 : o, u = i === void 0 ? !1 : i;
|
|
1464
1471
|
let h;
|
|
1465
|
-
e[0] !== a ? (h =
|
|
1472
|
+
e[0] !== a ? (h = Un(a), e[0] = a, e[1] = h) : h = e[1];
|
|
1466
1473
|
const {
|
|
1467
1474
|
frontmatter: m,
|
|
1468
1475
|
body: d
|
|
1469
|
-
} = h,
|
|
1476
|
+
} = h, p = u && !!s;
|
|
1470
1477
|
let x;
|
|
1471
|
-
e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (x = [qe, _e, ge, W, We,
|
|
1478
|
+
e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (x = [qe, _e, ge, W, We, ze, Be, Ee, Je, J, U, K, j], e[2] = x) : x = e[2];
|
|
1472
1479
|
let g;
|
|
1473
|
-
e[3] !== d ? (g = () =>
|
|
1480
|
+
e[3] !== d ? (g = () => Ue(nt(d), fe, void 0, !1), e[3] = d, e[4] = g) : g = e[4];
|
|
1474
1481
|
let _;
|
|
1475
1482
|
e[5] !== u || e[6] !== g ? (_ = {
|
|
1476
1483
|
namespace: "RICH_MESSAGE",
|
|
1477
1484
|
nodes: x,
|
|
1478
1485
|
editorState: g,
|
|
1479
|
-
onError:
|
|
1486
|
+
onError: Jr,
|
|
1480
1487
|
editable: u,
|
|
1481
|
-
theme:
|
|
1488
|
+
theme: xe
|
|
1482
1489
|
}, e[5] = u, e[6] = g, e[7] = _) : _ = e[7];
|
|
1483
1490
|
const y = _;
|
|
1484
1491
|
let S;
|
|
1485
|
-
e[8] !== d ? (S = /* @__PURE__ */ l(
|
|
1492
|
+
e[8] !== d ? (S = /* @__PURE__ */ l(Br, { value: d, onUpdate: Wr }), e[8] = d, e[9] = S) : S = e[9];
|
|
1486
1493
|
let R, b, N;
|
|
1487
|
-
e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (N = /* @__PURE__ */ l(
|
|
1494
|
+
e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (N = /* @__PURE__ */ l(jt, {}), R = /* @__PURE__ */ l(Wt, { newTab: !0 }), b = /* @__PURE__ */ l(Kt, {}), e[10] = R, e[11] = b, e[12] = N) : (R = e[10], b = e[11], N = e[12]);
|
|
1488
1495
|
let T;
|
|
1489
|
-
e[13] !== u ? (T = u ? /* @__PURE__ */ l(
|
|
1490
|
-
let E,
|
|
1491
|
-
e[15] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (E = /* @__PURE__ */ l(
|
|
1496
|
+
e[13] !== u ? (T = u ? /* @__PURE__ */ l(Gt, { maxIndent: 7 }) : null, e[13] = u, e[14] = T) : T = e[14];
|
|
1497
|
+
let E, I, w, P;
|
|
1498
|
+
e[15] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (E = /* @__PURE__ */ l(Jt, {}), I = /* @__PURE__ */ l(wn, {}), w = /* @__PURE__ */ l(Ln, {}), P = /* @__PURE__ */ l(gn, {}), e[15] = E, e[16] = I, e[17] = w, e[18] = P) : (E = e[15], I = e[16], w = e[17], P = e[18]);
|
|
1492
1499
|
let $;
|
|
1493
|
-
e[19] !==
|
|
1494
|
-
let
|
|
1495
|
-
e[21] !== m || e[22] !== s || e[23] !==
|
|
1496
|
-
|
|
1497
|
-
const G =
|
|
1500
|
+
e[19] !== f ? ($ = /* @__PURE__ */ l(Ae, { contentEditable: /* @__PURE__ */ l(je, { fullWidth: f, isRichMessage: !0 }), ErrorBoundary: Pe }), e[19] = f, e[20] = $) : $ = e[20];
|
|
1501
|
+
let M;
|
|
1502
|
+
e[21] !== m || e[22] !== s || e[23] !== p ? (M = p ? /* @__PURE__ */ l(Me, { ignoreSelectionChange: !0, ignoreHistoryMergeTagChange: !1, onChange: (B) => {
|
|
1503
|
+
B.read(() => {
|
|
1504
|
+
const G = ve(), te = qt(fe, G);
|
|
1498
1505
|
s?.(m + te);
|
|
1499
1506
|
});
|
|
1500
|
-
} }) : null, e[21] = m, e[22] = s, e[23] =
|
|
1507
|
+
} }) : null, e[21] = m, e[22] = s, e[23] = p, e[24] = M) : M = e[24];
|
|
1501
1508
|
let O;
|
|
1502
|
-
e[25] !== u ? (O = /* @__PURE__ */ l(
|
|
1509
|
+
e[25] !== u ? (O = /* @__PURE__ */ l(Ze, { isEditable: u }), e[25] = u, e[26] = O) : O = e[26];
|
|
1503
1510
|
let L;
|
|
1504
|
-
e[27] !== c ? (L = c && /* @__PURE__ */ l(
|
|
1505
|
-
let
|
|
1506
|
-
return e[29] !== y || e[30] !== T || e[31] !== $ || e[32] !==
|
|
1511
|
+
e[27] !== c ? (L = c && /* @__PURE__ */ l(et, {}), e[27] = c, e[28] = L) : L = e[28];
|
|
1512
|
+
let A;
|
|
1513
|
+
return e[29] !== y || e[30] !== T || e[31] !== $ || e[32] !== M || e[33] !== O || e[34] !== L || e[35] !== S ? (A = /* @__PURE__ */ l(pe, { className: "rich-text", "data-rich-message": "true", justifyContent: "space-between", width: "100%", maxWidth: "100%", height: "100%", position: "relative", direction: "column", overflow: "hidden", children: /* @__PURE__ */ D(we, { initialConfig: y, children: [
|
|
1507
1514
|
S,
|
|
1508
1515
|
N,
|
|
1509
1516
|
R,
|
|
1510
1517
|
b,
|
|
1511
1518
|
T,
|
|
1512
1519
|
E,
|
|
1513
|
-
|
|
1520
|
+
I,
|
|
1521
|
+
w,
|
|
1514
1522
|
P,
|
|
1515
|
-
M,
|
|
1516
1523
|
$,
|
|
1517
|
-
|
|
1524
|
+
M,
|
|
1518
1525
|
O,
|
|
1519
1526
|
L
|
|
1520
|
-
] }) }), e[29] = y, e[30] = T, e[31] = $, e[32] =
|
|
1527
|
+
] }) }), e[29] = y, e[30] = T, e[31] = $, e[32] = M, e[33] = O, e[34] = L, e[35] = S, e[36] = A) : A = e[36], A;
|
|
1521
1528
|
}
|
|
1522
|
-
function
|
|
1523
|
-
|
|
1529
|
+
function Wr(n) {
|
|
1530
|
+
Ue(nt(n), fe, void 0, !1);
|
|
1524
1531
|
}
|
|
1525
|
-
function
|
|
1532
|
+
function Jr(n) {
|
|
1526
1533
|
return console.error(n);
|
|
1527
1534
|
}
|
|
1528
1535
|
export {
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1536
|
+
No as $,
|
|
1537
|
+
wn as C,
|
|
1538
|
+
Ro as D,
|
|
1539
|
+
gn as E,
|
|
1540
|
+
Ln as I,
|
|
1541
|
+
Oo as P,
|
|
1542
|
+
Lo as R,
|
|
1543
|
+
$o as T,
|
|
1544
|
+
Co as a,
|
|
1545
|
+
je as b,
|
|
1546
|
+
ko as c,
|
|
1547
|
+
Ze as d,
|
|
1548
|
+
Io as e,
|
|
1549
|
+
et as f,
|
|
1550
|
+
un as g,
|
|
1551
|
+
Er as h,
|
|
1552
|
+
it as i,
|
|
1553
|
+
Ke as j,
|
|
1554
|
+
nt as n,
|
|
1555
|
+
Un as s
|
|
1549
1556
|
};
|
|
1550
|
-
//# sourceMappingURL=rich-message-
|
|
1557
|
+
//# sourceMappingURL=rich-message-CEOSsdR2.js.map
|