@box/box-ai-content-answers 1.19.4 → 1.21.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 (48) hide show
  1. package/dist/chunks/clear-conversation-button.js +15 -16
  2. package/dist/chunks/stopResponseButton.js +19 -23
  3. package/dist/chunks/types.js +8 -8
  4. package/dist/chunks/warning-message.js +15 -16
  5. package/dist/esm/lib/components/answer/answer-content.js +15 -15
  6. package/dist/esm/lib/components/answer/answer.js +107 -109
  7. package/dist/esm/lib/components/answer/citation.js +23 -24
  8. package/dist/esm/lib/components/answer/copy-button.js +3 -3
  9. package/dist/esm/lib/components/answer/embed-the-answer-button.js +44 -44
  10. package/dist/esm/lib/components/answer/feedback-tooltip.js +63 -56
  11. package/dist/esm/lib/components/answer/inline-error.js +1 -1
  12. package/dist/esm/lib/components/answer/loading-indicator.js +15 -18
  13. package/dist/esm/lib/components/answer/references.js +30 -30
  14. package/dist/esm/lib/components/answer/thumb-buttons.js +95 -96
  15. package/dist/esm/lib/components/api-wrapper/hooks/useContentAnswers.js +166 -167
  16. package/dist/esm/lib/components/api-wrapper/reducer.js +1 -1
  17. package/dist/esm/lib/components/api-wrapper/utils/request.js +8 -8
  18. package/dist/esm/lib/components/api-wrapper/utils/stream.js +24 -25
  19. package/dist/esm/lib/components/chat/chat.js +78 -79
  20. package/dist/esm/lib/components/common/focusInputUtils.js +3 -4
  21. package/dist/esm/lib/components/common/markdown-react.js +91 -93
  22. package/dist/esm/lib/components/common/markdown.js +2666 -2696
  23. package/dist/esm/lib/components/content/content.js +38 -39
  24. package/dist/esm/lib/components/footer/footer-actions.js +3 -3
  25. package/dist/esm/lib/components/footer/footer.js +97 -98
  26. package/dist/esm/lib/components/modal/modal.js +121 -122
  27. package/dist/esm/lib/components/sidebar/content.js +95 -101
  28. package/dist/esm/lib/components/sidebar/sidebar.js +82 -83
  29. package/dist/esm/lib/components/suggested-questions/suggested-questions.js +1 -1
  30. package/dist/esm/lib/components/suggested-questions/suggestions.js +30 -30
  31. package/dist/esm/lib/components/welcome-message/contextual-items-message.js +36 -38
  32. package/dist/esm/lib/components/welcome-message/items-dropdown.js +27 -27
  33. package/dist/esm/lib/hooks/usePromptFocus.js +13 -14
  34. package/dist/i18n/en-x-pseudo.js +89 -89
  35. package/dist/i18n/en-x-pseudo.properties +89 -89
  36. package/dist/styles/answer-content.css +1 -1
  37. package/dist/styles/answer.css +1 -1
  38. package/dist/styles/box-ai-content-answers.css +1 -1
  39. package/dist/styles/chat.css +1 -1
  40. package/dist/styles/clear-conversation-button.css +1 -1
  41. package/dist/styles/content.css +1 -1
  42. package/dist/styles/content2.css +1 -1
  43. package/dist/styles/markdown2.css +1 -1
  44. package/dist/styles/question.css +1 -1
  45. package/dist/styles/stopResponseButton.css +1 -1
  46. package/dist/styles/warning-message.css +1 -1
  47. package/dist/types/lib/components/api-wrapper/hooks/useContentAnswers.d.ts +1 -1
  48. package/package.json +11 -11
@@ -1,15 +1,15 @@
1
- import w, { FETCH_TIMEOUT as I } from "./stream.js";
2
- const b = (i, e, t) => setTimeout(() => {
3
- w.abortRequest(i), t && t({
1
+ import f, { FETCH_TIMEOUT as p } from "./stream.js";
2
+ const w = (i, e, t) => setTimeout(() => {
3
+ f.abortRequest(i), t && t({
4
4
  eventType: "ai-client-initial-streaming-timeout-error",
5
5
  message: "Initial streaming timeout error",
6
6
  origin: "AIClientErrorLog"
7
7
  });
8
- }, e), A = async (i, e = !1, t, a, s, o, l, u, m, n, T) => {
9
- let r;
10
- const g = (n == null ? void 0 : n.initial) || I.initial, p = b(t, g, T);
11
- return e && u ? r = await u(i, a, s, m, o) : l && (r = await l(i, a, s, o)), clearTimeout(p), r;
8
+ }, e), b = async (i, e = !1, t, o, r, a, s, l, u, m, T) => {
9
+ let n;
10
+ const c = m?.initial || p.initial, g = w(t, c, T);
11
+ return e && l ? n = await l(i, o, r, u, a) : s && (n = await s(i, o, r, a)), clearTimeout(g), n;
12
12
  };
13
13
  export {
14
- A as getAnswerRequest
14
+ b as getAnswerRequest
15
15
  };
@@ -1,22 +1,22 @@
1
- import b from "lodash/camelCase";
2
- import { A as E } from "../../../../../chunks/types.js";
3
- const d = {
1
+ import O from "lodash/camelCase";
2
+ import { A as u } from "../../../../../chunks/types.js";
3
+ const C = {
4
4
  chunk: 15 * 1e3,
5
5
  // fetch timeout for each chunk. We need to abort the fetch if needed.
6
6
  initial: 45 * 1e3
7
7
  // latency p99 (30s) + buffer. Other host integrations can override this value.
8
- }, N = {
9
- RESPONSE_FAILED: E.RESPONSE_FAILED,
10
- RESPONSE_INTERRUPTED: E.RESPONSE_INTERRUPTED,
11
- RESPONSE_STOPPED: E.RESPONSE_STOPPED
12
- }, O = {
8
+ }, E = {
9
+ RESPONSE_FAILED: u.RESPONSE_FAILED,
10
+ RESPONSE_INTERRUPTED: u.RESPONSE_INTERRUPTED,
11
+ RESPONSE_STOPPED: u.RESPONSE_STOPPED
12
+ }, d = {
13
13
  CONTINUE: "continue",
14
14
  DONE: "done",
15
15
  ERROR: "error"
16
16
  };
17
- class f {
17
+ class T {
18
18
  constructor() {
19
- this.abortControllerMap = /* @__PURE__ */ new Map(), this.chunkTimeout = d.chunk;
19
+ this.abortControllerMap = /* @__PURE__ */ new Map(), this.chunkTimeout = C.chunk;
20
20
  }
21
21
  abortRequest(r, e = !1) {
22
22
  const t = this.abortControllerMap.get(r);
@@ -62,9 +62,9 @@ class f {
62
62
  n.forEach((h) => {
63
63
  try {
64
64
  const a = JSON.parse(h);
65
- a[t] && (s += a[t]), a.thinking_answer && (r.thinkingAnswer || (r.thinkingAnswer = ""), r.thinkingAnswer += a.thinking_answer), Object.entries(a).forEach(([u, c]) => {
66
- const C = b(u);
67
- C !== t && C !== "thinkingAnswer" && (r[C] = c);
65
+ a[t] && (s += a[t]), a.thinking_answer && (r.thinkingAnswer || (r.thinkingAnswer = ""), r.thinkingAnswer += a.thinking_answer), Object.entries(a).forEach(([c, f]) => {
66
+ const N = O(c);
67
+ N !== t && N !== "thinkingAnswer" && (r[N] = f);
68
68
  });
69
69
  } catch (a) {
70
70
  console.error("Failed to parse NDJSON line:", a);
@@ -72,9 +72,8 @@ class f {
72
72
  }), r.data += s;
73
73
  }
74
74
  receiveStreamedResponse(r, e, t, o = "answer", i, n) {
75
- var u;
76
- const l = this.initializeStreamedResponseState(), s = (u = e.body) == null ? void 0 : u.getReader();
77
- if (this.chunkTimeout = (i == null ? void 0 : i.chunk) || d.chunk, !s) {
75
+ const l = this.initializeStreamedResponseState(), s = e.body?.getReader();
76
+ if (this.chunkTimeout = i?.chunk || C.chunk, !s) {
78
77
  this.handleNoResponseBody(t, l);
79
78
  return;
80
79
  }
@@ -107,16 +106,16 @@ class f {
107
106
  const {
108
107
  completionReason: l
109
108
  } = i;
110
- i.isCompleted = t.done || l !== null, t.value && this.parseNDJSON(i, t.value, n), i.isCompleted && (this.removeAbortController(o), l !== O.DONE && (i.data ? i.error = l === O.CONTINUE ? N.RESPONSE_INTERRUPTED : N.RESPONSE_FAILED : i.error = E.NO_CONTENT)), e(i);
109
+ i.isCompleted = t.done || l !== null, t.value && this.parseNDJSON(i, t.value, n), i.isCompleted && (this.removeAbortController(o), l !== d.DONE && (i.data ? i.error = l === d.CONTINUE ? E.RESPONSE_INTERRUPTED : E.RESPONSE_FAILED : i.error = u.NO_CONTENT)), e(i);
111
110
  }
112
111
  handleChunkError(r, e, t, o) {
113
- o.error = N.RESPONSE_FAILED;
112
+ o.error = E.RESPONSE_FAILED;
114
113
  const i = this.abortControllerMap.get(t);
115
- i && i.isUserInitiatedAbort && (o.error = N.RESPONSE_STOPPED, o.isAborted = i.isUserInitiatedAbort), o.isCompleted = !0, this.removeAbortController(t), clearTimeout(r), e(o);
114
+ i && i.isUserInitiatedAbort && (o.error = E.RESPONSE_STOPPED, o.isAborted = i.isUserInitiatedAbort), o.isCompleted = !0, this.removeAbortController(t), clearTimeout(r), e(o);
116
115
  }
117
116
  // eslint-disable-next-line class-methods-use-this
118
117
  handleNoResponseBody(r, e) {
119
- e.error = E.NO_CONTENT, e.isCompleted = !0, r(e);
118
+ e.error = u.NO_CONTENT, e.isCompleted = !0, r(e);
120
119
  }
121
120
  removeAbortController(r) {
122
121
  this.abortControllerMap.delete(r);
@@ -131,10 +130,10 @@ class f {
131
130
  }, this.chunkTimeout);
132
131
  }
133
132
  }
134
- const R = new f();
133
+ const A = new T();
135
134
  export {
136
- d as FETCH_TIMEOUT,
137
- O as STREAMING_COMPLETION_REASON,
138
- N as STREAM_ERROR,
139
- R as default
135
+ C as FETCH_TIMEOUT,
136
+ d as STREAMING_COMPLETION_REASON,
137
+ E as STREAM_ERROR,
138
+ A as default
140
139
  };
@@ -1,6 +1,6 @@
1
1
  import { Text as w } from "@box/blueprint-web";
2
2
  import { BoxAiLogo as L } from "@box/blueprint-web-assets/icons/Logo";
3
- import { Size10 as x } from "@box/blueprint-web-assets/tokens/tokens";
3
+ import { Size10 as f } from "@box/blueprint-web-assets/tokens/tokens";
4
4
  import P from "clsx";
5
5
  import * as S from "react";
6
6
  import { useIntl as ee } from "react-intl";
@@ -9,59 +9,58 @@ import { MediaContainer as oe } from "../common/media-container.js";
9
9
  import { Question as ae } from "../question/question.js";
10
10
  import { SuggestedQuestions as ie } from "../suggested-questions/suggested-questions.js";
11
11
  import { ThinkingBubble as re } from "../thinkingBubble/thinkingBubble.js";
12
- import se from "../welcome-message/messages.js";
13
- import { WelcomeMessage as ne } from "../welcome-message/welcome-message.js";
14
- import { jsx as e, jsxs as f } from "react/jsx-runtime";
15
- import '../../../../styles/chat.css';const ce = "_chat_1dqxr_2", le = "_clearChatText_1dqxr_2", me = "_landingPage_1dqxr_8", de = "_askQuestionText_1dqxr_16", pe = "_iconAvatar_1dqxr_24", xe = "_sidebar_1dqxr_40", a = {
16
- chat: ce,
17
- clearChatText: le,
18
- landingPage: me,
19
- askQuestionText: de,
20
- iconAvatar: pe,
21
- sidebar: xe
12
+ import ne from "../welcome-message/messages.js";
13
+ import { WelcomeMessage as se } from "../welcome-message/welcome-message.js";
14
+ import { jsx as e, jsxs as h } from "react/jsx-runtime";
15
+ import '../../../../styles/chat.css';const me = "_chat_15mnd_2", ce = "_clearChatText_15mnd_2", le = "_landingPage_15mnd_8", de = "_iconAvatar_15mnd_24", pe = "_sidebar_15mnd_42", a = {
16
+ chat: me,
17
+ clearChatText: ce,
18
+ landingPage: le,
19
+ iconAvatar: de,
20
+ sidebar: pe
22
21
  }, Ne = ({
23
22
  askSuggestedQuestion: _,
24
- contentType: n,
25
- hasCustomSuggestedQuestions: h,
26
- hasRequestInProgress: T,
27
- isCitationsEnabled: b,
23
+ contentType: s,
24
+ hasCustomSuggestedQuestions: T,
25
+ hasRequestInProgress: b,
26
+ isCitationsEnabled: x,
28
27
  isFeedbackEnabled: C,
29
28
  isFeedbackFormEnabled: g,
30
- isInlineCitationsEnabled: k = !1,
31
- isInlineCitationV2Enabled: u,
32
- isMarkdownEnabled: q,
33
- isSessionLoading: F = !1,
34
- onCitationClick: A,
35
- onAnswerCopy: I,
36
- embedTheAnswerButtonConfig: N,
37
- onFeedbackFormSubmit: O,
38
- onDropdownOpenChange: v,
39
- onSuggestedQuestionInteraction: Q,
40
- questions: j,
41
- recordAction: c,
42
- setAnswerFeedback: y,
43
- setAskSuggestedQuestion: l,
44
- suggestedQuestions: m,
45
- suggestedQuestionsRequestState: B,
46
- shouldFeedbackFormIncludeFeedbackText: M,
47
- shouldFeedbackIncludePromptData: z,
29
+ isInlineCitationsEnabled: F = !1,
30
+ isInlineCitationV2Enabled: k,
31
+ isMarkdownEnabled: u,
32
+ isSessionLoading: A = !1,
33
+ onCitationClick: I,
34
+ onAnswerCopy: N,
35
+ embedTheAnswerButtonConfig: O,
36
+ onFeedbackFormSubmit: v,
37
+ onDropdownOpenChange: j,
38
+ onSuggestedQuestionInteraction: y,
39
+ questions: B,
40
+ recordAction: m,
41
+ setAnswerFeedback: M,
42
+ setAskSuggestedQuestion: c,
43
+ suggestedQuestions: l,
44
+ suggestedQuestionsRequestState: q,
45
+ shouldFeedbackFormIncludeFeedbackText: z,
46
+ shouldFeedbackIncludePromptData: R,
48
47
  shouldShowLandingPage: o,
49
- useAnimation: R,
48
+ useAnimation: W,
50
49
  variant: t = "modal",
51
- hostAppName: W = "",
52
- isReactMarkdownEnabled: D,
53
- welcomeMessageClearText: E,
50
+ hostAppName: D = "",
51
+ isReactMarkdownEnabled: E,
52
+ welcomeMessageClearText: G,
54
53
  ...d
55
54
  }) => {
56
55
  const {
57
- formatMessage: G
58
- } = ee(), [H, J] = S.useState(null), K = (i, r) => {
59
- J(i ? r : null);
56
+ formatMessage: H
57
+ } = ee(), [J, K] = S.useState(null), Q = (i, r) => {
58
+ K(i ? r : null);
60
59
  };
61
60
  return /* @__PURE__ */ e("div", {
62
61
  className: a.chat,
63
62
  "data-testid": "content-answers-chat",
64
- children: /* @__PURE__ */ f("div", {
63
+ children: /* @__PURE__ */ h("div", {
65
64
  className: P({
66
65
  [a.landingPage]: o,
67
66
  [a.sidebar]: t === "sidebar"
@@ -71,87 +70,87 @@ import '../../../../styles/chat.css';const ce = "_chat_1dqxr_2", le = "_clearCha
71
70
  children: /* @__PURE__ */ e("div", {
72
71
  className: a.iconAvatar,
73
72
  children: /* @__PURE__ */ e(L, {
74
- height: x,
73
+ height: f,
75
74
  role: "presentation",
76
- width: x
75
+ width: f
77
76
  })
78
77
  })
79
- }), /* @__PURE__ */ e(ne, {
78
+ }), /* @__PURE__ */ e(se, {
80
79
  contentType: "",
81
80
  shouldShowLandingPage: o,
82
81
  ...d,
83
82
  variant: t
84
- }), o && m !== void 0 && l !== void 0 && /* @__PURE__ */ e(ie, {
83
+ }), o && l !== void 0 && c !== void 0 && /* @__PURE__ */ e(ie, {
85
84
  askSuggestedQuestion: _,
86
- hasCustomSuggestedQuestions: h,
87
- isLoading: T,
88
- onSuggestedQuestionInteraction: Q,
89
- recordAction: c,
90
- setAskSuggestedQuestion: l,
91
- suggestedQuestions: m,
92
- suggestedQuestionsRequestState: B,
85
+ hasCustomSuggestedQuestions: T,
86
+ isLoading: b,
87
+ onSuggestedQuestionInteraction: y,
88
+ recordAction: m,
89
+ setAskSuggestedQuestion: c,
90
+ suggestedQuestions: l,
91
+ suggestedQuestionsRequestState: q,
93
92
  variant: t
94
93
  }), /* @__PURE__ */ e(w, {
95
94
  as: "p",
96
95
  className: a.clearChatText,
97
- children: E || G(se.welcomeClearChatText, {
98
- type: n
96
+ children: G || H(ne.welcomeClearChatText, {
97
+ type: s
99
98
  })
100
99
  }), !o && /* @__PURE__ */ e("ul", {
101
- children: j.map(({
100
+ children: B.map(({
102
101
  answer: i,
103
102
  thinkingAnswer: r,
104
103
  citations: U,
105
- id: s,
104
+ id: n,
106
105
  isCompleted: V,
107
106
  isLoading: X,
108
107
  error: Y,
109
108
  prompt: p,
110
109
  promptType: Z,
111
110
  feedbackValue: $
112
- }) => /* @__PURE__ */ f("li", {
111
+ }) => /* @__PURE__ */ h("li", {
113
112
  children: [/* @__PURE__ */ e(ae, {
114
113
  prompt: p,
115
114
  variant: t
116
115
  }), r && /* @__PURE__ */ e(re, {
117
116
  content: r,
118
117
  isThinkingComplete: !!i,
119
- onDropdownOpenChange: v,
118
+ onDropdownOpenChange: j,
120
119
  variant: t
121
120
  }), /* @__PURE__ */ e(te, {
122
121
  answer: i,
123
122
  citations: U,
124
- contentType: n,
125
- embedTheAnswerButtonConfig: N,
123
+ contentType: s,
124
+ embedTheAnswerButtonConfig: O,
126
125
  error: Y,
127
126
  feedbackValue: $,
128
- hostAppName: W,
129
- isCitationsEnabled: b,
127
+ hostAppName: D,
128
+ isCitationsEnabled: x,
130
129
  isCompleted: V,
131
130
  isFeedbackEnabled: C,
132
131
  isFeedbackFormEnabled: g,
133
- isFeedbackTooltipOpen: H === s,
134
- isInlineCitationsEnabled: k,
135
- isInlineCitationV2Enabled: u,
136
- isLoading: X || F,
137
- isMarkdownEnabled: q,
138
- isReactMarkdownEnabled: D,
132
+ isFeedbackTooltipOpen: J === n,
133
+ isInlineCitationsEnabled: F,
134
+ isInlineCitationV2Enabled: k,
135
+ isLoading: X || A,
136
+ isMarkdownEnabled: u,
137
+ isReactMarkdownEnabled: E,
139
138
  items: d.items,
140
- onAnswerCopy: I,
141
- onCitationClick: A,
142
- onFeedbackFormSubmit: O,
143
- onFeedbackTooltipOpenChange: K,
139
+ onAnswerCopy: N,
140
+ onCitationClick: I,
141
+ onFeedbackFormSubmit: v,
142
+ onFeedbackTooltipOpenChange: Q,
144
143
  prompt: p,
145
144
  promptType: Z,
146
- questionId: s,
147
- recordAction: c,
148
- setAnswerFeedback: y,
149
- shouldFeedbackFormIncludeFeedbackText: M,
150
- shouldFeedbackIncludePromptData: z,
151
- useAnimation: R,
145
+ questionId: n,
146
+ recordAction: m,
147
+ setAnswerFeedback: M,
148
+ shouldFeedbackFormIncludeFeedbackText: z,
149
+ shouldFeedbackIncludePromptData: R,
150
+ useAnimation: W,
152
151
  variant: t
153
152
  })]
154
- }, s))
153
+ }, n))
155
154
  })]
156
155
  })
157
156
  });
@@ -1,8 +1,7 @@
1
1
  import { INPUT_TARGET_ID as t } from "../footer/constants.js";
2
- function e() {
3
- const o = document.querySelector(`[data-target-id="${t}"]`);
4
- o == null || o.focus();
2
+ function n() {
3
+ document.querySelector(`[data-target-id="${t}"]`)?.focus();
5
4
  }
6
5
  export {
7
- e as focusInput
6
+ n as focusInput
8
7
  };
@@ -1,136 +1,134 @@
1
- import { Link as p } from "@box/blueprint-web";
2
- import d from "react-markdown";
1
+ import { Link as d } from "@box/blueprint-web";
2
+ import p from "react-markdown";
3
3
  import f from "remark-gfm";
4
- import { isBoxDomain as N, isBoxCitation as b } from "../../utils/inlineCitationsUtils.js";
5
- import g from "./inline-citation.js";
4
+ import { isBoxDomain as h, isBoxCitation as k } from "../../utils/inlineCitationsUtils.js";
5
+ import N from "./inline-citation.js";
6
6
  import { s as r } from "../../../../chunks/markdown.module.js";
7
- import { jsxs as m, jsx as n } from "react/jsx-runtime";
8
- const k = (t) => (t == null ? void 0 : t.startsWith("#user-content-fn")) ?? !1, h = (t) => t ? b(t) : !1, j = (t) => t ? t.startsWith("http://") || t.startsWith("https://") : !1, x = (t) => t ? N(t) : !1, L = ({
9
- children: t,
10
- className: e
7
+ import { jsx as e, jsxs as c } from "react/jsx-runtime";
8
+ const b = (n) => n?.startsWith("#user-content-fn") ?? !1, g = (n) => n ? k(n) : !1, j = (n) => n ? n.startsWith("http://") || n.startsWith("https://") : !1, x = (n) => n ? h(n) : !1, C = ({
9
+ children: n,
10
+ className: t
11
11
  }) => {
12
- const a = e ? e.replace("language-", "") : "", c = (s) => s.trim().split(/\r?\n/).map((i, l) => /* @__PURE__ */ m("div", {
12
+ const i = t ? t.replace("language-", "") : "", l = (o) => o.trim().split(/\r?\n/).map((a, u) => /* @__PURE__ */ c("div", {
13
13
  className: "hljs-line",
14
- children: [/* @__PURE__ */ n("span", {
14
+ children: [/* @__PURE__ */ e("span", {
15
15
  className: "hljs-line-number",
16
- children: l + 1
17
- }), /* @__PURE__ */ n("span", {
16
+ children: u + 1
17
+ }), /* @__PURE__ */ e("span", {
18
18
  className: "hljs-line-content",
19
- children: i
19
+ children: a
20
20
  })]
21
- }, `line-${i.substring(0, 20)}-${Date.now()}`));
22
- return /* @__PURE__ */ m("div", {
21
+ }, `line-${a.substring(0, 20)}-${Date.now()}`));
22
+ return /* @__PURE__ */ c("div", {
23
23
  className: r.hljs,
24
- children: [/* @__PURE__ */ n("span", {
24
+ children: [/* @__PURE__ */ e("span", {
25
25
  className: r.hljsLanguage,
26
- children: a || "auto"
27
- }), /* @__PURE__ */ n("code", {
28
- children: c(t)
26
+ children: i || "auto"
27
+ }), /* @__PURE__ */ e("code", {
28
+ children: l(n)
29
29
  })]
30
30
  });
31
- }, v = ({
32
- children: t
33
- }) => /* @__PURE__ */ n("div", {
31
+ }, L = ({
32
+ children: n
33
+ }) => /* @__PURE__ */ e("div", {
34
34
  className: r.tableWrapper,
35
- children: /* @__PURE__ */ n("table", {
36
- children: t
35
+ children: /* @__PURE__ */ e("table", {
36
+ children: n
37
37
  })
38
- }), u = ({
39
- children: t,
40
- href: e
41
- }) => !e || e === "" ? null : x(e) ? /* @__PURE__ */ n("a", {
42
- href: e,
38
+ }), m = ({
39
+ children: n,
40
+ href: t
41
+ }) => !t || t === "" ? null : x(t) ? /* @__PURE__ */ e("a", {
42
+ href: t,
43
43
  rel: "noopener noreferrer",
44
44
  target: "_blank",
45
- children: t
46
- }) : /* @__PURE__ */ m("span", {
47
- children: [t, " (", e, ")"]
48
- }), B = ({
49
- children: t
50
- }) => /* @__PURE__ */ n("blockquote", {
45
+ children: n
46
+ }) : /* @__PURE__ */ c("span", {
47
+ children: [n, " (", t, ")"]
48
+ }), v = ({
49
+ children: n
50
+ }) => /* @__PURE__ */ e("blockquote", {
51
51
  className: r.blockquote,
52
- children: t
53
- }), q = ({
54
- children: t
55
- }) => /* @__PURE__ */ n("ol", {
52
+ children: n
53
+ }), B = ({
54
+ children: n
55
+ }) => /* @__PURE__ */ e("ol", {
56
56
  className: r.orderedList,
57
- children: t
58
- }), w = ({
59
- children: t
57
+ children: n
58
+ }), q = ({
59
+ children: n
60
60
  }) => {
61
- var a;
62
- const e = ((a = t == null ? void 0 : t.toString().match(/^(\d+)/)) == null ? void 0 : a[1]) || t;
63
- return /* @__PURE__ */ n("span", {
61
+ const t = n?.toString().match(/^(\d+)/)?.[1] || n;
62
+ return /* @__PURE__ */ e("span", {
64
63
  className: r.footnote,
65
- children: e
64
+ children: t
66
65
  });
67
- }, R = {
68
- code: L,
69
- table: v,
70
- blockquote: B,
71
- ol: q,
72
- sup: w,
66
+ }, w = {
67
+ code: C,
68
+ table: L,
69
+ blockquote: v,
70
+ ol: B,
71
+ sup: q,
73
72
  p: ({
74
- children: t
75
- }) => /* @__PURE__ */ n("div", {
73
+ children: n
74
+ }) => /* @__PURE__ */ e("div", {
76
75
  className: r.inlineParagraph,
77
- children: t
76
+ children: n
78
77
  }),
79
- a: u
78
+ a: m
80
79
  }, M = ({
81
- children: t,
82
- isInlineCitationV2Enabled: e = !1
80
+ children: n,
81
+ isInlineCitationV2Enabled: t = !1
83
82
  }) => {
84
- const a = {
85
- ...R,
86
- a: (c) => {
87
- var i;
83
+ const i = {
84
+ ...w,
85
+ a: (l) => {
88
86
  const {
89
- href: s,
90
- children: o
91
- } = c;
92
- if (k(s)) {
93
- const l = ((i = o == null ? void 0 : o.toString().match(/^(\d+)/)) == null ? void 0 : i[1]) || o;
94
- return /* @__PURE__ */ n(p, {
95
- href: s,
96
- children: /* @__PURE__ */ n("span", {
87
+ href: o,
88
+ children: s
89
+ } = l;
90
+ if (b(o)) {
91
+ const a = s?.toString().match(/^(\d+)/)?.[1] || s;
92
+ return /* @__PURE__ */ e(d, {
93
+ href: o,
94
+ children: /* @__PURE__ */ e("span", {
97
95
  className: r.footnoteReference,
98
- children: l
96
+ children: a
99
97
  })
100
98
  });
101
99
  }
102
- if (h(s)) {
103
- const l = (o == null ? void 0 : o.toString()) || "";
104
- return /* @__PURE__ */ n(g, {
105
- fileName: l,
106
- href: s,
107
- isInlineCitationV2Enabled: e
100
+ if (g(o)) {
101
+ const a = s?.toString() || "";
102
+ return /* @__PURE__ */ e(N, {
103
+ fileName: a,
104
+ href: o,
105
+ isInlineCitationV2Enabled: t
108
106
  });
109
107
  }
110
- return j(s) ? /* @__PURE__ */ n(u, {
111
- href: s,
112
- children: o
113
- }) : /* @__PURE__ */ n(u, {
114
- href: s,
115
- children: o
108
+ return j(o) ? /* @__PURE__ */ e(m, {
109
+ href: o,
110
+ children: s
111
+ }) : /* @__PURE__ */ e(m, {
112
+ href: o,
113
+ children: s
116
114
  });
117
115
  }
118
116
  };
119
- return /* @__PURE__ */ n("div", {
117
+ return /* @__PURE__ */ e("div", {
120
118
  className: r.markdownContent,
121
- children: /* @__PURE__ */ n(d, {
122
- components: a,
119
+ children: /* @__PURE__ */ e(p, {
120
+ components: i,
123
121
  remarkPlugins: [f],
124
- children: t
122
+ children: n
125
123
  })
126
124
  });
127
125
  };
128
126
  export {
129
- B as Blockquote,
130
- L as CodeBlock,
131
- w as Footnote,
132
- u as Link,
133
- q as Ol,
134
- v as Table,
127
+ v as Blockquote,
128
+ C as CodeBlock,
129
+ q as Footnote,
130
+ m as Link,
131
+ B as Ol,
132
+ L as Table,
135
133
  M as default
136
134
  };