@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.
Files changed (80) hide show
  1. package/dist/chat-ui.js +12 -11
  2. package/dist/chat-ui.js.map +1 -1
  3. package/dist/components/attached-panel.d.ts +9 -0
  4. package/dist/components/attached-panel.utils.d.ts +6 -0
  5. package/dist/components/bubble-button.d.ts +10 -0
  6. package/dist/components/bubble-panel.d.ts +18 -0
  7. package/dist/components/chat-ui/components/chat-panel-sticky-user-message.d.ts +1 -1
  8. package/dist/components/diff-card.d.ts +3 -0
  9. package/dist/components/diff-drawer.d.ts +1 -0
  10. package/dist/components/layout.d.ts +1 -2
  11. package/dist/components/layout.stories.d.ts +3 -3
  12. package/dist/components/panel-header.constants.d.ts +1 -0
  13. package/dist/components/rich-text/markdown-editor/markdown-editor.d.ts +1 -0
  14. package/dist/components/rich-text/shared/components/content-editable.d.ts +2 -1
  15. package/dist/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/resolve-block-type.d.ts +17 -0
  16. package/dist/components/rich-text/shared/transformers/markdown-transformers.d.ts +1 -0
  17. package/dist/components/searchable-menu.d.ts +35 -2
  18. package/dist/components/searchable-menu.stories.d.ts +2 -0
  19. package/dist/components/session-indicator.d.ts +2 -2
  20. package/dist/components/session-indicator.stories.d.ts +1 -0
  21. package/dist/components/sidebar/sidebar-footer.d.ts +6 -0
  22. package/dist/components/sidebar/sidebar-header.d.ts +7 -0
  23. package/dist/components/sidebar/sidebar-project-menu.d.ts +10 -0
  24. package/dist/components/sidebar/sidebar.d.ts +2 -0
  25. package/dist/components/sidebar/sidebar.store.d.ts +47 -0
  26. package/dist/components/{sidebar-next/sidebar-next.stories.d.ts → sidebar/sidebar.stories.d.ts} +4 -3
  27. package/dist/components/{sidebar-next/sidebar-next.types.d.ts → sidebar/sidebar.types.d.ts} +3 -2
  28. package/dist/components/sidebar-tree/sidebar-node-content.d.ts +9 -0
  29. package/dist/components/sidebar-tree/sidebar-tree.d.ts +1 -1
  30. package/dist/components/sidebar-tree/sidebar-tree.types.d.ts +10 -2
  31. package/dist/components/style-guide.stories.d.ts +7 -12
  32. package/dist/components/tickets/ticket-card.d.ts +2 -7
  33. package/dist/components/workspace-badge.d.ts +22 -0
  34. package/dist/components/workspace-badge.stories.d.ts +13 -0
  35. package/dist/get-file-type-icon-CirIyuE8.js +92 -0
  36. package/dist/get-file-type-icon-CirIyuE8.js.map +1 -0
  37. package/dist/index.d.ts +18 -19
  38. package/dist/index.js +1849 -1743
  39. package/dist/index.js.map +1 -1
  40. package/dist/{rich-message-ZT2CEiwt.js → rich-message-Bad4GxH2.js} +520 -503
  41. package/dist/rich-message-Bad4GxH2.js.map +1 -0
  42. package/dist/rich-text.js +276 -272
  43. package/dist/rich-text.js.map +1 -1
  44. package/dist/style.css +1 -1
  45. package/dist/test-utils/local-storage.d.ts +1 -0
  46. package/dist/theme/global.d.ts +3 -0
  47. package/dist/theme/primitives/colors.d.ts +116 -0
  48. package/dist/theme/recipes/button.d.ts +13 -13
  49. package/dist/theme/recipes/dialog.d.ts +1 -1
  50. package/dist/theme/recipes/drawer.d.ts +1 -1
  51. package/dist/theme/recipes/menu.d.ts +1 -1
  52. package/dist/theme/recipes/popover.d.ts +1 -1
  53. package/dist/theme/recipes/tooltip.d.ts +1 -1
  54. package/dist/theme/tokens/colors.d.ts +162 -8
  55. package/dist/{theme-BFV2Q048.js → theme-D0VvFB1Y.js} +292 -154
  56. package/dist/theme-D0VvFB1Y.js.map +1 -0
  57. package/dist/theme.js +1 -1
  58. package/package.json +2 -2
  59. package/dist/components/documentation/docs-changelog.d.ts +0 -20
  60. package/dist/components/documentation/docs-changelog.stories.d.ts +0 -15
  61. package/dist/components/documentation/docs-outline.d.ts +0 -13
  62. package/dist/components/documentation/docs-outline.stories.d.ts +0 -16
  63. package/dist/components/documentation/docs-pagination.d.ts +0 -10
  64. package/dist/components/documentation/docs-pagination.stories.d.ts +0 -14
  65. package/dist/components/documentation/docs-sidebar.d.ts +0 -14
  66. package/dist/components/documentation/docs-sidebar.stories.d.ts +0 -7
  67. package/dist/components/panel-menu.d.ts +0 -9
  68. package/dist/components/panel-menu.stories.d.ts +0 -8
  69. package/dist/components/sidebar-next/sidebar-next-footer.d.ts +0 -6
  70. package/dist/components/sidebar-next/sidebar-next-header.d.ts +0 -7
  71. package/dist/components/sidebar-next/sidebar-next.d.ts +0 -2
  72. package/dist/components/sidebar-next/sidebar-next.store.d.ts +0 -47
  73. package/dist/components/sidebar-next/sidebar-next.store.test.d.ts +0 -1
  74. package/dist/rich-message-ZT2CEiwt.js.map +0 -1
  75. package/dist/theme-BFV2Q048.js.map +0 -1
  76. package/dist/tooltip-Dze4WXVl.js +0 -86
  77. package/dist/tooltip-Dze4WXVl.js.map +0 -1
  78. /package/dist/components/{chat-ui/components/ai-conversation.test.d.ts → attached-panel.utils.test.d.ts} +0 -0
  79. /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
  80. /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 Te } from "@lexical/link";
3
- import { ListNode as Re, ListItemNode as Ne } from "@lexical/list";
4
- import { TRANSFORMERS as Ce, $convertFromMarkdownString as Oe, $convertToMarkdownString as rt } from "@lexical/markdown";
5
- import { QuoteNode as ke, HeadingNode as $e } from "@lexical/rich-text";
6
- import { jsx as s, jsxs as L, Fragment as pe } from "react/jsx-runtime";
7
- import { chakra as se, Flex as ne, Text as w, Spacer as ot, IconButton as it, Box as P, Table as H, Textarea as st, Tooltip as Z, Kbd as lt } from "@chakra-ui/react";
8
- import { DecoratorNode as G, $applyNodeReplacement as ct, ElementNode as Ie, TextNode as ee, $createTextNode as ve, $nodesOfType as at, createCommand as k, isHTMLElement as dt, $createParagraphNode as le, COMMAND_PRIORITY_LOW as we, $getSelection as ut, $isRangeSelection as ft, $isElementNode as mt, KEY_DOWN_COMMAND as _t, COMMAND_PRIORITY_HIGH as pt, $getRoot as Pe } from "lexical";
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 ht } from "@lexical/mark";
11
- import { LexicalComposer as Le } from "@lexical/react/LexicalComposer";
12
- import { LexicalErrorBoundary as Me } from "@lexical/react/LexicalErrorBoundary";
13
- import { HistoryPlugin as gt } from "@lexical/react/LexicalHistoryPlugin";
14
- import { OnChangePlugin as De } from "@lexical/react/LexicalOnChangePlugin";
15
- import { RichTextPlugin as Ae } from "@lexical/react/LexicalRichTextPlugin";
16
- import * as xt from "react";
17
- import { Suspense as Et, useEffect as j, useImperativeHandle as bt, useState as St, forwardRef as yt, useRef as Tt } from "react";
18
- import { useLexicalComposerContext as M } from "@lexical/react/LexicalComposerContext";
19
- import { $setBlocksType as Rt } from "@lexical/selection";
20
- import { addClassNamesToElement as Fe, mergeRegister as ue } from "@lexical/utils";
21
- import { LexicalTypeaheadMenuPlugin as Nt } from "@lexical/react/LexicalTypeaheadMenuPlugin";
22
- import * as Ct from "react-dom";
23
- import { HorizontalRulePlugin as Ot } from "@lexical/react/LexicalHorizontalRulePlugin";
24
- import { LinkPlugin as kt } from "@lexical/react/LexicalLinkPlugin";
25
- import { ListPlugin as $t } from "@lexical/react/LexicalListPlugin";
26
- import { ContentEditable as It } from "@lexical/react/LexicalContentEditable";
27
- import { S as vt, T as wt } from "./tooltip-Dze4WXVl.js";
28
- import Pt from "katex";
29
- import { TreeView as Lt } from "@lexical/react/LexicalTreeView";
30
- import { FileSpreadsheet as Mt, FileCode as Dt, FileChartLine as At, FileJson as Ft, FileText as qt, FileCog as Ht, FileImage as jt, FileArchive as Bt, File as Ut, X as Jt } from "lucide-react";
31
- const zt = se(It);
32
- function qe(n) {
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
- } = n, l = r === void 0 ? !1 : r, c = (i === void 0 ? !1 : i) ? "true" : void 0;
39
- let m;
40
- e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (m = {
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[0] = m) : m = e[0];
44
- const _ = l ? "flex-start" : "center", p = l ? "100%" : "720px";
45
- let u;
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 Wt = (n) => {
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
- }, Vt = {
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
- }, Xt = "md", Gt = "neutral", He = (n) => {
95
+ }, Wt = "md", Kt = "neutral", Ue = (n) => {
94
96
  const e = C(39);
95
- let t, r, o, i, l, a, c;
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: a,
101
- tone: c,
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] = a, e[7] = c) : (t = e[1], r = e[2], o = e[3], i = e[4], l = e[5], a = e[6], c = e[7]);
105
- const m = a === void 0 ? Xt : a, _ = c === void 0 ? Gt : c;
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 = Wt(t), e[8] = t, e[9] = p) : p = e[9];
108
- const u = p, d = Kt[m], f = Vt[_], g = i ? "pointer" : "default";
109
- let x;
110
- e[10] !== t || e[11] !== i ? (x = (O) => {
111
- O.stopPropagation(), i?.(t);
112
- }, e[10] = t, e[11] = i, e[12] = x) : x = e[12];
113
- let y;
114
- e[13] !== u || e[14] !== r || e[15] !== d.iconSize ? (y = r ?? /* @__PURE__ */ s(u, { size: d.iconSize }), e[13] = u, e[14] = r, e[15] = d.iconSize, e[16] = y) : y = e[16];
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[26] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (R = /* @__PURE__ */ s(ot, {}), e[26] = R) : R = e[26];
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[27] !== t || e[28] !== o ? (S = o && /* @__PURE__ */ s(it, { "aria-label": "Remove reference", size: "2xs", ml: "xs", variant: "ghost", _hover: {
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: (O) => {
131
- O.stopPropagation(), o?.(t);
132
- }, children: /* @__PURE__ */ s(Jt, { size: 12 }) }), e[27] = t, e[28] = o, e[29] = S) : S = e[29];
133
- let h;
134
- return e[30] !== l || e[31] !== d.container || e[32] !== S || e[33] !== g || e[34] !== x || e[35] !== N || e[36] !== E || e[37] !== f ? (h = /* @__PURE__ */ L(se.span, { display: "flex", flexDirection: "row", alignItems: "center", borderRadius: "xs", gap: "2xs", cursor: g, ...f, ...d.container, onClick: x, ...l, children: [
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
- S
139
- ] }), e[30] = l, e[31] = d.container, e[32] = S, e[33] = g, e[34] = x, e[35] = N, e[36] = E, e[37] = f, e[38] = h) : h = e[38], h;
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 je(e.href, e.label);
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), a = /^#?\$PROJECT\//i.test(r);
175
- return /* @__PURE__ */ s(P, { width: "fit-content", display: "inline-block", children: /* @__PURE__ */ s(He, { fileName: i, onSelect: () => {
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 (a) {
179
- const c = r.replace(/^#?\$PROJECT\//i, ""), m = new CustomEvent("ui:open-project-file", {
180
- detail: c
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(m);
184
+ window.dispatchEvent(_);
183
185
  } else
184
186
  window.location.assign(r);
185
187
  } }) });
186
188
  }
187
189
  };
188
- function je(n, e) {
190
+ function Je(n, e) {
189
191
  return new re(n, e);
190
192
  }
191
- function Yt(n) {
193
+ function Vt(n) {
192
194
  return n instanceof re;
193
195
  }
194
- const he = /\{\{\s*link\((['"])([^'"\s]+)\1\)\s*\}\}/, Qt = {
196
+ const xe = /\{\{\s*link\((['"])([^'"\s]+)\1\)\s*\}\}/, Xt = {
195
197
  dependencies: [re],
196
198
  export: (n) => {
197
- if (Yt(n)) {
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: he,
204
- importRegExp: he,
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(je(o, i));
209
+ n.replace(Je(o, i));
208
210
  },
209
211
  type: "text-match"
210
- }, fe = {
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))", Zt = (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), en = (n) => {
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, a = r === void 0 ? !1 : r, c = o === void 0 ? !1 : o, m = i === void 0 ? !1 : i;
291
- if (a) {
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(st, { defaultValue: l, fontFamily: "mono", fontSize: V, resize: "vertical", minHeight: "100%" }), e[0] = l, e[1] = p) : p = e[1], p;
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] !== m || e[4] !== c) {
297
- const p = c ? l.split(`
297
+ let m;
298
+ if (e[2] !== l || e[3] !== _ || e[4] !== a) {
299
+ const p = a ? l.split(`
298
300
  `) : [l];
299
- _ = /* @__PURE__ */ s(P, { as: "pre", margin: 0, padding: "sm", fontFamily: "mono", fontSize: V, lineHeight: "1.5", overflowY: m ? "hidden" : "auto", background: "bg.muted", borderRadius: "md", width: "100%", children: c ? /* @__PURE__ */ s(P, { as: "code", display: "grid", gridTemplateColumns: "auto 1fr", columnGap: "sm", children: p.map(nn) }) : /* @__PURE__ */ s(P, { as: "code", children: l }) }), e[2] = l, e[3] = m, e[4] = c, e[5] = _;
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
- _ = e[5];
302
- return _;
303
- }, tn = (n) => {
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, a = o === void 0 ? !1 : o;
310
- let c;
311
- e[0] !== i ? (c = i === void 0 ? [] : i, e[0] = i, e[1] = c) : c = e[1];
312
- const m = c;
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 E = a ? "0" : "1px";
315
- let R;
316
- e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (R = /* @__PURE__ */ s(w, { textStyle: "label/S/regular", fontSize: V, color: "fg.muted", children: "No data" }), e[2] = R) : R = e[2];
317
- let S;
318
- return e[3] !== E ? (S = /* @__PURE__ */ s(P, { padding: "sm", borderWidth: E, borderColor: "border.muted", children: R }), e[3] = E, e[4] = S) : S = e[4], S;
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] !== m ? (_ = new Set(m), e[5] = m, e[6] = _) : _ = e[6];
322
- const p = _;
323
- let u;
324
- e[7] !== t[0] ? (u = Object.keys(t[0] ?? {}), e[7] = t[0], e[8] = u) : u = e[8];
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] !== u ? (d = u.filter((E) => !p.has(E)), e[9] = p, e[10] = u, e[11] = d) : d = e[11];
327
- const f = d, g = l ? "100%" : "fit-content", x = a ? "0" : "1px";
328
- let y;
329
- e[12] !== f ? (y = /* @__PURE__ */ s(H.Header, { children: /* @__PURE__ */ s(H.Row, { background: "bg.muted", children: f.map(rn) }) }), e[12] = f, e[13] = y) : y = e[13];
330
- let N;
331
- if (e[14] !== f || e[15] !== t) {
332
- let E;
333
- e[17] !== f ? (E = (R, S) => /* @__PURE__ */ s(H.Row, { children: f.map((h) => /* @__PURE__ */ s(H.Cell, { paddingX: "xs", paddingY: "2xs", children: /* @__PURE__ */ s(w, { textStyle: "paragraph/S/regular", fontSize: V, children: Zt(R[h]) }) }, `${S}-${h}`)) }, `${S}-${f.join("-")}`), e[17] = f, e[18] = E) : E = e[18], N = t.map(E), e[14] = f, e[15] = t, e[16] = N;
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
- N = e[16];
336
- let b;
337
- e[19] !== N ? (b = /* @__PURE__ */ s(H.Body, { children: N }), e[19] = N, e[20] = b) : b = e[20];
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] !== b || e[22] !== g || e[23] !== x || e[24] !== y ? (T = /* @__PURE__ */ s(H.ScrollArea, { overflowX: "auto", maxWidth: "100%", children: /* @__PURE__ */ L(H.Root, { size: "sm", width: g, borderWidth: x, borderColor: "border.muted", children: [
340
- y,
341
- b
342
- ] }) }), e[21] = b, e[22] = g, e[23] = x, e[24] = y, e[25] = T) : T = e[25], T;
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 nn(n, e) {
345
- return /* @__PURE__ */ L(P, { as: "span", display: "contents", children: [
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 rn(n) {
351
- return /* @__PURE__ */ s(H.ColumnHeader, { textTransform: "none", paddingX: "xs", paddingY: "2xs", children: /* @__PURE__ */ s(w, { textStyle: "label/S/medium", fontSize: V, children: n }) }, n);
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 U extends G {
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 U(e.__data, e.__key);
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(tn, { fullWidth: !0, isReadOnly: !0, data: this.__data });
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 U(e.data);
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 ge(n) {
394
- return new U(n);
395
+ function Ee(n) {
396
+ return new j(n);
395
397
  }
396
- function xe(n) {
397
- return n instanceof U;
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(en, { language: this.__language || "plaintext", defaultCode: this.__code, isEditable: !1, showLineNumbers: !0, disableScroll: !0 }) });
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 on = xt.lazy(() => import("./EquationComponent-DeDYHvqY.js"));
443
- function Ee(n) {
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 B extends G {
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 B(e.__equation, e.__inline, e.__key);
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}`), Pt.render(this.__equation, e, {
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: Ee,
496
+ conversion: Se,
495
497
  priority: 2
496
498
  } : null,
497
499
  span: (e) => e.hasAttribute("data-lexical-equation") ? {
498
- conversion: Ee,
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(Et, { fallback: null, children: /* @__PURE__ */ s(on, { equation: this.__equation, inline: this.__inline }) });
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 B(n, e);
525
- return ct(t);
526
+ const t = new J(n, e);
527
+ return ft(t);
526
528
  }
527
- function Be(n) {
528
- return n instanceof B;
529
+ function je(n) {
530
+ return n instanceof J;
529
531
  }
530
- const Ue = {
531
- dependencies: [B],
532
- export: (n) => Be(n) && n.isInline() ? `\\( ${n.getEquation().trim()} \\)` : null,
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
- }, Je = {
541
- dependencies: [B],
542
+ }, We = {
543
+ dependencies: [J],
542
544
  regExpStart: /\\\[/,
543
545
  regExpEnd: /\\]/,
544
- export: (n) => Be(n) && !n.isInline() ? `\\[ ${n.getEquation().trim()} \\]` : null,
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 sn() {
550
+ function nn() {
549
551
  return null;
550
552
  }
551
- class z extends Ie {
553
+ class W extends Pe {
552
554
  static getType() {
553
555
  return "hr";
554
556
  }
555
557
  static clone(e) {
556
- return new z(e?.__key);
558
+ return new W(e?.__key);
557
559
  }
558
560
  static importJSON(e) {
559
- return ze();
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 ze() {
578
- return new z();
579
+ function Ke() {
580
+ return new W();
579
581
  }
580
- function ln(n) {
581
- return n instanceof z;
582
+ function rn(n) {
583
+ return n instanceof W;
582
584
  }
583
- const cn = {
584
- dependencies: [z],
585
- export: (n) => ln(n) ? "***" : null,
585
+ const on = {
586
+ dependencies: [W],
587
+ export: (n) => rn(n) ? "***" : null,
586
588
  regExp: /^(---|\*\*\*|___)\s?$/,
587
589
  replace: (n) => {
588
- const e = ze();
590
+ const e = Ke();
589
591
  n.replace(e);
590
592
  },
591
593
  type: "element"
592
- }, an = {
594
+ }, sn = {
593
595
  dependencies: [],
594
596
  export: (n, e) => {
595
- if (xe(n)) {
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((a) => r.map((c) => String(a[c] || "")).join(" | "));
599
- return [`| ${o} |`, `| ${i} |`, ...l.map((a) => `| ${a} |`)].join(`
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((a) => a.trim());
612
- if (o?.getType() === "data_table" && xe(o)) {
613
- const a = o.getData(), c = {}, m = a.length === 1 && Object.values(a[0]).every((d) => d === ""), _ = a.length > 0 ? Object.keys(a[0]) : l.map((d, f) => `col_${f}`);
614
- l.forEach((d, f) => {
615
- const g = _[f] || `col_${f}`;
616
- c[g] = d;
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 = m ? [c] : [...a, c], u = ge(p);
619
- o.replace(u), n.remove();
620
+ const p = _ ? [a] : [...c, a], f = Ee(p);
621
+ o.replace(f), n.remove();
620
622
  } else {
621
- const a = {};
622
- l.forEach((m, _) => {
623
- a[m || `col_${_}`] = "";
623
+ const c = {};
624
+ l.forEach((_, m) => {
625
+ c[_ || `col_${m}`] = "";
624
626
  });
625
- const c = ge([a]);
626
- n.replace(c);
627
+ const a = Ee([c]);
628
+ n.replace(a);
627
629
  }
628
630
  },
629
631
  type: "element"
630
- }, dn = {
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 = ve(e[1]);
652
+ const t = me(e[1]);
651
653
  t.toggleFormat("underline"), n.replace(t);
652
654
  },
653
655
  type: "text-match"
654
- }, un = {
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 = ve(e[1]);
662
+ const t = me(e[1]);
661
663
  t.toggleFormat("underline"), n.replace(t);
662
664
  },
663
665
  type: "text-match"
664
- }, We = [an, cn, dn, un], Kr = [ke, Te, U, $e, Re, Ne, de, K, B, z, re], Vr = [...Ce, ...We, Ue, Je, Qt], Xr = fe;
665
- function fn() {
666
- const n = C(3), [e] = M();
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(mn);
670
- }, r = [e], n[0] = e, n[1] = t, n[2] = r) : (t = n[1], r = n[2]), j(t, r), null;
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 mn() {
673
- const n = at(de);
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 Ke(n) {
691
+ function Xe(n) {
680
692
  const e = C(4), {
681
693
  isEditable: t
682
- } = n, [r] = M();
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]), j(o, i), null;
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 Ve() {
689
- const n = C(2), [e] = M();
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(Lt, { 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;
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 _n = /^---\s*\n([\s\S]*?)\n---\s*(?:\n|$)/;
694
- function pn(n) {
695
- const e = n.match(_n);
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 hn = "UPLOAD_FILE", gn = "OPEN_CONTEXT", xn = "RUN_PROMPT", En = "UPDATE_FORMAT", bn = "UPDATE_BEHAVIOR", Sn = "INSERT_PROMPT", yn = "RENAME_PROMPT", Tn = "DUPLICATE_PROMPT", Rn = "DELETE_PROMPT", Nn = "DELETE_REFERENCES", Cn = "RENAME_REFERENCES", On = "INSERT_REFERENCE", kn = "INSERT_BLOCK";
705
- k(hn);
706
- k(gn);
707
- k(xn);
708
- k(En);
709
- k(bn);
710
- k(Sn);
711
- k(yn);
712
- k(Tn);
713
- k(Rn);
714
- k(Nn);
715
- k(Cn);
716
- const Xe = k(On), $n = k(kn), In = "INSERT_NEW_FILE_PLACEHOLDER", vn = "INSERT_NEW_TEXT_PLACEHOLDER", wn = "INSERT_PLACEHOLDER_REFERENCE";
717
- k(In);
718
- k(vn);
719
- k(wn);
720
- function Pn(n) {
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 Ie {
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 Fe(t, e.theme.comment), t;
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: Pn,
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 && dt(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 Ln = (n, e) => {
792
- const t = ut(), r = te();
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
- ft(t) && Rt(t, te);
809
+ gt(t) && $t(t, te);
798
810
  };
799
- function Mn() {
800
- const n = C(3), [e] = M();
811
+ function Pn() {
812
+ const n = C(3), [e] = D();
801
813
  let t, r;
802
- return n[0] !== e ? (t = () => ue(e.registerCommand($n, Dn, we)), r = [e], n[0] = e, n[1] = t, n[2] = r) : (t = n[1], r = n[2]), j(t, r), null;
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 Dn(n) {
816
+ function Ln(n) {
805
817
  const {
806
818
  optionId: e,
807
819
  nodeToReplace: t
808
820
  } = n;
809
- return Ln(e, t), !1;
821
+ return wn(e, t), !1;
810
822
  }
811
- const An = () => {
812
- const n = C(3), [e] = M();
823
+ const Mn = () => {
824
+ const n = C(3), [e] = D();
813
825
  let t, r;
814
- n[0] !== e ? (t = () => ue(e.registerNodeTransform(Y, (o) => {
815
- const l = o.getChildren().filter(Fn);
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(qn);
829
+ l.forEach(Dn);
818
830
  });
819
- })), r = [e], n[0] = e, n[1] = t, n[2] = r) : (t = n[1], r = n[2]), j(t, r);
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 Fn(n) {
833
+ function An(n) {
822
834
  return n.getType() === "comment";
823
835
  }
824
- function qn(n) {
836
+ function Dn(n) {
825
837
  n.replace(le(), !0);
826
838
  }
827
- function Hn() {
828
- return An(), Mn(), null;
839
+ function Fn() {
840
+ return Mn(), Pn(), null;
829
841
  }
830
- const jn = (n) => {
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(), mt(i) && o !== r - 1 && !i.isInline() && (e += `
847
+ e += i.getTextContent(), xt(i) && o !== r - 1 && !i.isInline() && (e += `
836
848
  `);
837
849
  }
838
850
  return e;
839
- }, Bn = (n) => n.type !== "reference" ? null : `#${n.name ?? n.referenceId ?? ""}`, Un = (n) => n.type === "paragraph" && !!n.children?.length, Ge = (n) => {
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 = Bn(n);
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 += Ge(l), Un(l) && (t += `
868
+ t += Qe(l), Bn(l) && (t += `
857
869
  `);
858
870
  }
859
871
  return t;
860
- }, Ye = (n) => {
872
+ }, Ze = (n) => {
861
873
  try {
862
874
  const e = JSON.parse(n);
863
- return Ge(e.root ?? {});
875
+ return Qe(e.root ?? {});
864
876
  } catch {
865
877
  return "";
866
878
  }
867
- }, Jn = {
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 zn(n = "") {
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(Jn));
923
+ } : JSON.parse(JSON.stringify(Un));
912
924
  }
913
- function Wn(n) {
925
+ function jn(n) {
914
926
  const e = C(4), {
915
927
  editorRef: t,
916
928
  previousTextRef: r
917
- } = n, [o] = M();
929
+ } = n, [o] = D();
918
930
  let i, l;
919
931
  return e[0] !== o || e[1] !== r ? (i = () => ({
920
- setEditorValue: (a) => {
921
- const c = o.parseEditorState(JSON.stringify(zn(a)));
922
- o.setEditorState(c), r.current = Ye(a), o.focus(void 0, {
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]), bt(t, i, l), null;
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 Kn = (n) => n.key !== "Enter" ? !1 : !n.ctrlKey && !n.metaKey && !n.shiftKey && !n.altKey;
929
- function Vn(n) {
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] = M();
944
+ } = n, [r] = D();
933
945
  let o, i;
934
- return e[0] !== r || e[1] !== t ? (o = () => r.registerCommand(_t, (l) => Kn(l) ? (l.preventDefault(), t?.(), !0) : !1, pt), i = [r, t], e[0] = r, e[1] = t, e[2] = o, e[3] = i) : (o = e[2], i = e[3]), j(o, i), null;
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 be = ["table", "connector"], Xn = (n) => n.sort((r, o) => be.indexOf(r.group) - be.indexOf(o.group)).map((r, o) => ({
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 Se(n) {
944
- const e = C(19), {
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: a,
951
- primaryLabel: c,
952
- tabIndex: m
953
- } = n, _ = m === void 0 ? -1 : m, p = r ? "bg.muted" : "transparent";
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[2] !== c ? (d = /* @__PURE__ */ s(Z.Positioner, { children: /* @__PURE__ */ s(Z.Content, { children: c }) }), e[2] = c, e[3] = d) : d = e[3];
958
- let f;
959
- e[4] !== u || e[5] !== d ? (f = /* @__PURE__ */ L(Z.Root, { children: [
960
- u,
961
- d
962
- ] }), e[4] = u, e[5] = d, e[6] = f) : f = e[6];
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] !== a ? (g = a && /* @__PURE__ */ s(w, { lineClamp: 2, textOverflow: "ellipsis", textStyle: "label/S/regular", color: "fg.muted", children: a }), e[7] = a, e[8] = g) : g = e[8];
965
- let x;
966
- return e[9] !== t || e[10] !== r || e[11] !== o || e[12] !== i || e[13] !== l || e[14] !== p || e[15] !== f || e[16] !== g || e[17] !== _ ? (x = /* @__PURE__ */ L(ne, { direction: "column", cursor: "pointer", gap: "2xs", padding: "2xs", paddingX: "sm", bg: p, tabIndex: _, ref: l, role: "option", "aria-selected": r, id: t, onMouseEnter: i, onClick: o, children: [
967
- f,
968
- g
969
- ] }), e[9] = t, e[10] = r, e[11] = o, e[12] = i, e[13] = l, e[14] = p, e[15] = f, e[16] = g, e[17] = _, e[18] = x) : x = e[18], x;
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 Gn = (n) => {
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: a
980
- } = Xn(t), c = l === void 0 ? [] : l, m = a === void 0 ? [] : a, _ = [...c, ...m].length;
981
- let p, u;
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
- }, u = [r], e[0] = r, e[1] = p, e[2] = u) : (p = e[1], u = e[2]), j(p, u);
988
- const d = P, f = "1000", g = "absolute", x = "modal", y = "auto", N = "24rem";
989
- let b;
990
- e[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (b = {
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] = b) : b = e[3];
1009
+ }, e[3] = S) : S = e[3];
994
1010
  let T;
995
- e[4] !== _ ? (T = !_ && /* @__PURE__ */ s(w, { children: "No results" }), e[4] = _, e[5] = T) : T = e[5];
996
- const E = !!c.length && /* @__PURE__ */ L(pe, { children: [
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: c.map((h) => /* @__PURE__ */ s(Se, { id: `typeahead-item-${h.index}`, isSelected: r === h.index, onClick: () => o(h, h.index), onMouseEnter: () => i(h.index), primaryLabel: h.name, secondaryLabel: h.description, setRefElement: h.setRefElement, tabIndex: -1 }, h.id)) })
999
- ] }), R = !!m.length && /* @__PURE__ */ L(pe, { children: [
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: m.map((h) => /* @__PURE__ */ s(Se, { id: `typeahead-item-${h.index}`, isSelected: r === h.index, onClick: () => o(h, h.index), onMouseEnter: () => i(h.index), primaryLabel: h.name, secondaryLabel: h.description, setRefElement: h.setRefElement, tabIndex: -1 }, h.id)) })
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 S;
1004
- return e[6] !== d || e[7] !== T || e[8] !== E || e[9] !== R || e[10] !== b ? (S = /* @__PURE__ */ L(d, { zIndex: f, position: g, layerStyle: x, overflow: y, maxHeight: N, minWidth: b, children: [
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
- E,
1007
- R
1008
- ] }), e[6] = d, e[7] = T, e[8] = E, e[9] = R, e[10] = b, e[11] = S) : S = e[11], S;
1009
- }, Yn = (n, e) => n.filter((t) => t.name.replace(/ /g, "_").toLowerCase().includes(e.toLowerCase()));
1010
- function Qn(n, e = []) {
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 : Yn(t, n);
1037
+ return n == null || n === "" ? t : Xn(t, n);
1022
1038
  }
1023
- const Qe = "\\.\\-<>_:", me = ["#"].join(""), Ze = `[^${me}${Qe}\\s]`, Zn = `(?:[${Qe}]|)`, et = 75, er = new RegExp(`(^|\\s|\\()([${me}]((?:${Ze}${Zn}){0,${et}}))$`), tr = new RegExp(`(^|\\s|\\()([${me}]((?:${Ze}){0,${et}}))$`);
1024
- function nr(n, e) {
1025
- let t = er.exec(n);
1026
- if (t === null && (t = tr.exec(n)), t !== null) {
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 rr = 20;
1038
- function or(n) {
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] = St(null), [a] = M(), c = Qn(i, o);
1045
- let m;
1046
- e[2] !== a ? (m = (g, x, y) => {
1047
- a.update(() => {
1048
- x && (a.dispatchCommand(Xe, {
1049
- resourceId: g.id,
1050
- resourceType: g.group,
1051
- name: g.name,
1052
- nodeToReplace: x
1053
- }), y());
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] = a, e[3] = m) : m = e[3];
1056
- const _ = m, p = sr;
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
- return e[6] !== d || e[7] !== _ ? (f = /* @__PURE__ */ s(Nt, { onQueryChange: l, onSelectOption: _, triggerFn: p, options: d, menuRenderFn: ir }), e[6] = d, e[7] = _, e[8] = f) : f = e[8], f;
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 ir(n, e) {
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 ? Ct.createPortal(/* @__PURE__ */ s(Gn, { options: t, selectedIndex: r, onSelectItem: (l, a) => {
1071
- i(a), o(l);
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 sr(n) {
1077
- return nr(n, 0);
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 Fe(t, e.theme.reference), t.setAttribute("data-reference-id", this.__referenceId), t.setAttribute("data-name", this.__name), t.textContent = `#${this.__name}`, t;
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 lr(n, e) {
1147
+ function ir(n, e) {
1132
1148
  return new X(n, e);
1133
1149
  }
1134
- const cr = (n, e, t) => {
1135
- const r = lr(e, t);
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 ar(n) {
1157
+ function lr(n) {
1142
1158
  const e = C(4), {
1143
1159
  onAddReference: t
1144
- } = n, [r] = M();
1160
+ } = n, [r] = D();
1145
1161
  let o, i;
1146
- return e[0] !== r || e[1] !== t ? (o = () => ue(r.registerCommand(Xe, (l) => {
1162
+ return e[0] !== r || e[1] !== t ? (o = () => fe(r.registerCommand(Ye, (l) => {
1147
1163
  const {
1148
- resourceId: a,
1149
- resourceType: c,
1150
- name: m,
1151
- nodeToReplace: _
1164
+ resourceId: c,
1165
+ resourceType: a,
1166
+ name: _,
1167
+ nodeToReplace: m
1152
1168
  } = l;
1153
1169
  return r.update(() => {
1154
- cr(_, a, m);
1155
- }), t?.(a, c), !0;
1156
- }, we)), i = [r, t], e[0] = r, e[1] = t, e[2] = o, e[3] = i) : (o = e[2], i = e[3]), j(o, i), null;
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 dr = {
1159
- ...fe,
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
- }, ur = [Y, ht, X], fr = (n, e) => {
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, a = o === void 0 ? !1 : o, c = i === void 0 ? !0 : i, {
1169
- onChange: m,
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: u,
1188
+ references: f,
1173
1189
  onAddReference: d
1174
- } = n, f = _ === void 0 ? mr : _;
1175
- let g;
1176
- t[0] !== u ? (g = u === void 0 ? [] : u, t[0] = u, t[1] = g) : g = t[1];
1177
- const x = g;
1178
- let y;
1179
- t[2] !== r || t[3] !== c || t[4] !== f ? (y = {
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: ur,
1197
+ nodes: ar,
1182
1198
  editorState: r,
1183
- editable: c,
1184
- onError: f,
1185
- theme: dr
1186
- }, t[2] = r, t[3] = c, t[4] = f, t[5] = y) : y = t[5];
1187
- const N = y;
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[6] !== r ? (b = Ye(r), t[6] = r, t[7] = b) : b = t[7];
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(lt, { color: "fg.subtle", children: "#" }),
1210
+ /* @__PURE__ */ s(mt, { color: "fg.subtle", children: "#" }),
1195
1211
  " to add a reference."
1196
- ] }), t[8] = l, t[9] = E) : E = t[9];
1197
- const R = E;
1198
- let S;
1199
- t[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (S = /* @__PURE__ */ s(gt, {}), t[10] = S) : S = t[10];
1200
- let h;
1201
- t[11] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ s(qe, { fullWidth: !0 }), t[11] = h) : h = t[11];
1202
- let O;
1203
- t[12] !== R ? (O = /* @__PURE__ */ s(Ae, { contentEditable: h, placeholder: R, ErrorBoundary: Me }), t[12] = R, t[13] = O) : O = t[13];
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] !== m ? ($ = /* @__PURE__ */ s(De, { ignoreSelectionChange: !0, ignoreHistoryMergeTagChange: !1, onChange: (_e) => {
1206
- _e.read(() => {
1207
- const nt = Pe(), ie = jn(nt);
1208
- ie !== T.current && (T.current = ie, m?.(ie, _e.toJSON()));
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] = m, t[15] = $) : $ = t[15];
1226
+ } }), t[14] = _, t[15] = $) : $ = t[15];
1211
1227
  let I;
1212
- t[16] !== e ? (I = /* @__PURE__ */ s(Wn, { editorRef: e, previousTextRef: T }), t[16] = e, t[17] = I) : I = t[17];
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] !== c ? (v = /* @__PURE__ */ s(Ke, { isEditable: c }), t[18] = c, t[19] = v) : v = t[19];
1215
- let D;
1216
- t[20] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (D = /* @__PURE__ */ s(Hn, {}), t[20] = D) : D = t[20];
1217
- let A;
1218
- t[21] !== p ? (A = /* @__PURE__ */ s(Vn, { onSubmit: p }), t[21] = p, t[22] = A) : A = t[22];
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] !== x ? (F = /* @__PURE__ */ s(or, { items: x }), t[23] = x, t[24] = F) : F = t[24];
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[25] !== d ? (q = /* @__PURE__ */ s(ar, { onAddReference: d }), t[25] = d, t[26] = q) : q = t[26];
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] !== N || t[30] !== O || t[31] !== $ || t[32] !== I || t[33] !== v || t[34] !== A || t[35] !== F || t[36] !== q || t[37] !== W ? (Q = /* @__PURE__ */ s(ne, { direction: "column", justifyContent: "space-between", width: "100%", position: "relative", children: /* @__PURE__ */ L(Le, { initialConfig: N, children: [
1227
- S,
1228
- O,
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
- D,
1233
- A,
1248
+ L,
1249
+ M,
1234
1250
  F,
1235
- q,
1236
- W
1237
- ] }) }), t[29] = N, t[30] = O, t[31] = $, t[32] = I, t[33] = v, t[34] = A, t[35] = F, t[36] = q, t[37] = W, t[38] = Q) : Q = t[38], Q;
1238
- }, Gr = yt(fr);
1239
- function mr() {
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 _r(n) {
1257
+ function mr(n) {
1242
1258
  const e = C(5), {
1243
1259
  value: t,
1244
1260
  onUpdate: r
1245
- } = n, [o] = M();
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]), j(i, l), null;
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 J extends G {
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 J(e.__href, e.__label, e.__key);
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: J.getType(),
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 tt(e.href, e.label);
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), a = /^#?\$PROJECT\//i.test(r);
1287
- return /* @__PURE__ */ s(P, { width: "fit-content", display: "inline-block", children: /* @__PURE__ */ s(He, { fileName: i, onSelect: () => {
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 (a) {
1291
- const c = r.replace(/^#?\$PROJECT\//i, ""), m = new CustomEvent("ui:open-project-file", {
1292
- detail: c
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(m);
1310
+ window.dispatchEvent(_);
1295
1311
  } else
1296
1312
  window.location.assign(r);
1297
1313
  } }) });
1298
1314
  }
1299
1315
  }
1300
- function tt(n, e) {
1301
- return new J(n, e);
1316
+ function rt(n, e) {
1317
+ return new z(n, e);
1302
1318
  }
1303
- function pr(n) {
1304
- return n instanceof J;
1319
+ function fr(n) {
1320
+ return n instanceof z;
1305
1321
  }
1306
- const ye = /\{\{\s*link\((['"])([^'"\s]+)\1\)\s*\}\}/, hr = {
1307
- dependencies: [J],
1322
+ const Ne = /\{\{\s*link\((['"])([^'"\s]+)\1\)\s*\}\}/, _r = {
1323
+ dependencies: [z],
1308
1324
  export: (n) => {
1309
- if (pr(n)) {
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: ye,
1316
- importRegExp: ye,
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(tt(o, i));
1335
+ n.replace(rt(o, i));
1320
1336
  },
1321
1337
  type: "text-match"
1322
- }, ae = [...Ce, ...We, Ue, Je, hr];
1323
- function Yr(n) {
1324
- const e = C(32), {
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, a = t === void 0 ? !1 : t, c = r === void 0 ? "" : r, m = o === void 0 ? !1 : o, _ = i === void 0 ? !1 : i;
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] !== c ? (p = pn(c), e[0] = c, e[1] = p) : p = e[1];
1348
+ e[0] !== a ? (p = fn(a), e[0] = a, e[1] = p) : p = e[1];
1333
1349
  const {
1334
- frontmatter: u,
1350
+ frontmatter: f,
1335
1351
  body: d
1336
- } = p, f = _ && !!l;
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[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (g = [ke, Te, U, $e, Re, Ne, de, K, B, z, J], e[2] = g) : g = e[2];
1339
- let x;
1340
- e[3] !== d ? (x = () => Oe(d, ae, void 0, !1), e[3] = d, e[4] = x) : x = e[4];
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: g,
1345
- editorState: x,
1346
- onError: xr,
1347
- editable: _,
1348
- theme: fe
1349
- }, e[5] = _, e[6] = x, e[7] = y) : y = e[7];
1350
- const N = y;
1351
- let b;
1352
- e[8] !== d ? (b = /* @__PURE__ */ s(_r, { value: d, onUpdate: gr }), e[8] = d, e[9] = b) : b = e[9];
1353
- let T, E, R, S, h;
1354
- e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ s(kt, {}), T = /* @__PURE__ */ s($t, {}), E = /* @__PURE__ */ s(Ot, {}), R = /* @__PURE__ */ s(fn, {}), S = /* @__PURE__ */ s(sn, {}), e[10] = T, e[11] = E, e[12] = R, e[13] = S, e[14] = h) : (T = e[10], E = e[11], R = e[12], S = e[13], h = e[14]);
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[17] !== u || e[18] !== l || e[19] !== f ? ($ = f ? /* @__PURE__ */ s(De, { ignoreSelectionChange: !0, ignoreHistoryMergeTagChange: !1, onChange: (A) => {
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[21] !== _ ? (I = /* @__PURE__ */ s(Ke, { isEditable: _ }), e[21] = _, e[22] = I) : I = e[22];
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[23] !== a ? (v = a && /* @__PURE__ */ s(Ve, {}), e[23] = a, e[24] = v) : v = e[24];
1368
- let D;
1369
- return e[25] !== N || e[26] !== O || e[27] !== $ || e[28] !== I || e[29] !== v || e[30] !== b ? (D = /* @__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__ */ L(Le, { initialConfig: N, children: [
1370
- b,
1371
- h,
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
- O,
1387
+ k,
1388
+ T,
1389
+ b,
1390
+ N,
1391
+ y,
1392
+ x,
1377
1393
  $,
1378
1394
  I,
1379
- v
1380
- ] }) }), e[25] = N, e[26] = O, e[27] = $, e[28] = I, e[29] = v, e[30] = b, e[31] = D) : D = e[31], D;
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 gr(n) {
1383
- Oe(n, ae, void 0, !1);
1399
+ function pr(n) {
1400
+ Ie(n, ae, void 0, !1);
1384
1401
  }
1385
- function xr(n) {
1402
+ function hr(n) {
1386
1403
  return console.error(n);
1387
1404
  }
1388
1405
  export {
1389
- qe as C,
1390
- en as D,
1391
- sn as E,
1392
- fn as I,
1393
- Gr as P,
1394
- Yr as R,
1395
- Ke as T,
1396
- Kr as a,
1397
- Vr as b,
1398
- Ve as c,
1399
- tn as d,
1400
- Xr as e,
1401
- Ye as f,
1402
- zn as g,
1403
- He as h,
1404
- pn as s
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-ZT2CEiwt.js.map
1423
+ //# sourceMappingURL=rich-message-Bad4GxH2.js.map