@blade-hq/agent-react 2612.0.0-beta.8 → 2612.0.0-beta.80

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 (177) hide show
  1. package/README.md +47 -0
  2. package/dist/SessionPluginConfigForm-7LJ5SUNY.js +9 -0
  3. package/dist/SessionPluginConfigForm-7LJ5SUNY.js.map +1 -0
  4. package/dist/chat/AgentLoopBlock.d.ts +0 -2
  5. package/dist/chat/AskUserQuestionBlock.d.ts +3 -20
  6. package/dist/chat/AssistantTurnBlock.d.ts +1 -9
  7. package/dist/chat/AttachmentPreviewDialog.d.ts +0 -1
  8. package/dist/chat/ChatLoadingIndicator.d.ts +7 -0
  9. package/dist/chat/ContextAttachmentPills.d.ts +4 -0
  10. package/dist/chat/CurrentPlanPanel.d.ts +0 -3
  11. package/dist/chat/FileDeliveryCards.d.ts +0 -4
  12. package/dist/chat/FinalArtifactCards.d.ts +0 -1
  13. package/dist/chat/ImageLightbox.d.ts +1 -1
  14. package/dist/chat/LiteMessageList.d.ts +5 -3
  15. package/dist/chat/MessageFileAttachmentList.d.ts +0 -5
  16. package/dist/chat/QuestionnaireQuestionBlock.d.ts +11 -0
  17. package/dist/chat/SessionReplayBar.d.ts +0 -1
  18. package/dist/chat/TextAttachmentPills.d.ts +0 -3
  19. package/dist/chat/TurnNavRail.d.ts +1 -7
  20. package/dist/chat/WorkflowRunBlock.d.ts +21 -4
  21. package/dist/chat/ai-elements/shimmer.d.ts +0 -4
  22. package/dist/chat/customization.d.ts +1 -1
  23. package/dist/chat/index.d.ts +3 -2
  24. package/dist/chat/markdown/ExternalAnchor.d.ts +2 -2
  25. package/dist/chat/markdown/MarkdownContent.d.ts +3 -0
  26. package/dist/chat/message-list-blocks.d.ts +0 -1
  27. package/dist/chat/runtime/actions.d.ts +2 -2
  28. package/dist/chat/runtime/background-task-dismissals.d.ts +0 -1
  29. package/dist/chat/runtime/composer-channels.d.ts +0 -3
  30. package/dist/chat/runtime/input-cache-reset.d.ts +0 -5
  31. package/dist/chat/runtime/input-services.d.ts +10 -0
  32. package/dist/chat/runtime/session-source.d.ts +0 -5
  33. package/dist/chat/runtime/use-chat-actions.d.ts +0 -4
  34. package/dist/chat/turn-locate-channel.d.ts +53 -0
  35. package/dist/{chat-OCLOVB3H.css → chat-IHPRU35X.css} +5 -18
  36. package/dist/chat.css +5 -18
  37. package/dist/chunk-66JXSDLB.js +13770 -0
  38. package/dist/chunk-66JXSDLB.js.map +1 -0
  39. package/dist/chunk-C3LBNHVM.js +9482 -0
  40. package/dist/chunk-C3LBNHVM.js.map +1 -0
  41. package/dist/chunk-F4MWGSKX.js +1308 -0
  42. package/dist/chunk-F4MWGSKX.js.map +1 -0
  43. package/dist/chunk-FBGCDXRK.js +607 -0
  44. package/dist/chunk-FBGCDXRK.js.map +1 -0
  45. package/dist/{chunk-67GHJQK5.js → chunk-FDB3J5QF.js} +3889 -26106
  46. package/dist/chunk-FDB3J5QF.js.map +1 -0
  47. package/dist/chunk-FH5HA3GW.js +2416 -0
  48. package/dist/chunk-FH5HA3GW.js.map +1 -0
  49. package/dist/chunk-KHJEIHMJ.js +973 -0
  50. package/dist/chunk-KHJEIHMJ.js.map +1 -0
  51. package/dist/chunk-MWILWSPG.js +9629 -0
  52. package/dist/chunk-MWILWSPG.js.map +1 -0
  53. package/dist/chunk-NRYLAO3X.js +3978 -0
  54. package/dist/chunk-NRYLAO3X.js.map +1 -0
  55. package/dist/{chunk-MERN5XEM.js → chunk-SK43YNRX.js} +4181 -16594
  56. package/dist/chunk-SK43YNRX.js.map +1 -0
  57. package/dist/components/AccountConnectorRules.d.ts +7 -0
  58. package/dist/components/AccountConnectors.d.ts +13 -0
  59. package/dist/components/BrowserConnectionDialog.d.ts +8 -0
  60. package/dist/components/ChatInput.d.ts +1 -15
  61. package/dist/components/ConfigConnection.d.ts +16 -0
  62. package/dist/components/ConnectorAuthorizationProgress.d.ts +6 -0
  63. package/dist/components/ConnectorConnection.d.ts +4 -0
  64. package/dist/components/ConnectorDetail.d.ts +46 -0
  65. package/dist/components/ConnectorPanel.d.ts +3 -1
  66. package/dist/components/ConnectorRulesPanel.d.ts +10 -0
  67. package/dist/components/ConnectorRuntimeDiagnostics.d.ts +5 -0
  68. package/dist/components/DeviceConnection.d.ts +17 -0
  69. package/dist/components/FeishuCapabilitySelection.d.ts +14 -0
  70. package/dist/components/FeishuPermissionStatus.d.ts +7 -0
  71. package/dist/components/LlmAdvancedSettings.d.ts +0 -1
  72. package/dist/components/ManagedConnection.d.ts +12 -0
  73. package/dist/components/McpAppFrame.d.ts +17 -0
  74. package/dist/components/PackEventNotice.d.ts +3 -0
  75. package/dist/components/PlanUpdateBlock.d.ts +0 -1
  76. package/dist/components/SessionPluginConfigForm.d.ts +4 -1
  77. package/dist/components/SessionPluginIcon.d.ts +1 -0
  78. package/dist/components/plugin-connector.d.ts +1 -0
  79. package/dist/connectors.d.ts +6 -0
  80. package/dist/connectors.js +19 -0
  81. package/dist/connectors.js.map +1 -0
  82. package/dist/embed/blade-chat-element.d.ts +0 -8
  83. package/dist/embed/entry.d.ts +13 -19
  84. package/dist/hooks/use-message-pin.d.ts +1 -1
  85. package/dist/hooks/use-turn-navigation.d.ts +19 -0
  86. package/dist/index.d.ts +6 -0
  87. package/dist/index.js +23 -3
  88. package/dist/internal.d.ts +7 -3
  89. package/dist/internal.js +59 -71
  90. package/dist/internal.js.map +1 -1
  91. package/dist/lib/message-shortcuts.d.ts +5 -0
  92. package/dist/questions.d.ts +7 -0
  93. package/dist/questions.js +910 -0
  94. package/dist/questions.js.map +1 -0
  95. package/dist/rich-input/ConnectButton.d.ts +7 -5
  96. package/dist/rich-input/FileCompletionMenu.d.ts +1 -2
  97. package/dist/rich-input/InputActionSubmenu.d.ts +10 -0
  98. package/dist/rich-input/SkillActionMenu.d.ts +10 -0
  99. package/dist/rich-input/SkillStatusBar.d.ts +0 -6
  100. package/dist/rich-input/extensions/skill-mention.d.ts +3 -20
  101. package/dist/rich-input/index.d.ts +3 -2
  102. package/dist/rich-input/lib/composer-content.d.ts +5 -1
  103. package/dist/rich-input/lib/plugin-suggestions.d.ts +5 -5
  104. package/dist/rich-input/lib/reference-candidates.d.ts +0 -1
  105. package/dist/rich-input/lib/skill-suggestions.d.ts +1 -1
  106. package/dist/rich-input/lib/user-home.d.ts +0 -17
  107. package/dist/rich-input/services.d.ts +1 -1
  108. package/dist/rich-input/voice/VoiceWaveform.d.ts +0 -3
  109. package/dist/rich-input.js +793 -1068
  110. package/dist/rich-input.js.map +1 -1
  111. package/dist/style.css +16 -55
  112. package/dist/style.full.css +23 -77
  113. package/dist/tool-details.d.ts +8 -0
  114. package/dist/tool-details.js +25 -0
  115. package/dist/tool-details.js.map +1 -0
  116. package/node_modules/@modelcontextprotocol/ext-apps/LICENSE +216 -0
  117. package/node_modules/@modelcontextprotocol/ext-apps/README.md +284 -0
  118. package/node_modules/@modelcontextprotocol/ext-apps/dist/docs/patterns.d.ts +9 -0
  119. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/app-bridge.d.ts +1348 -0
  120. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/app-bridge.examples.d.ts +9 -0
  121. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/app-bridge.js +39 -0
  122. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/app-bridge.test.d.ts +1 -0
  123. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/app-with-deps.js +82 -0
  124. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/app.d.ts +1214 -0
  125. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/app.examples.d.ts +9 -0
  126. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/app.js +39 -0
  127. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/app.test.d.ts +1 -0
  128. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/constants.d.ts +65 -0
  129. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/events.d.ts +47 -0
  130. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/events.test.d.ts +1 -0
  131. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/generated/schema.d.ts +1047 -0
  132. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/generated/schema.json +6170 -0
  133. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/generated/schema.test.d.ts +41 -0
  134. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/interop-v1.test.d.ts +1 -0
  135. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/legacy-handlers.d.ts +66 -0
  136. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/legacy-handlers.test.d.ts +1 -0
  137. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/message-transport.d.ts +126 -0
  138. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/message-transport.examples.d.ts +9 -0
  139. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/message-transport.test.d.ts +1 -0
  140. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/react/index.d.ts +37 -0
  141. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/react/index.examples.d.ts +6 -0
  142. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/react/index.js +39 -0
  143. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/react/react-with-deps.js +82 -0
  144. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/react/useApp.d.ts +115 -0
  145. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/react/useApp.examples.d.ts +6 -0
  146. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/react/useAutoResize.d.ts +54 -0
  147. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/react/useAutoResize.examples.d.ts +6 -0
  148. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/react/useDocumentTheme.d.ts +44 -0
  149. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/react/useDocumentTheme.examples.d.ts +6 -0
  150. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/react/useHostStyles.d.ts +113 -0
  151. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/react/useHostStyles.examples.d.ts +6 -0
  152. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/server/index.d.ts +381 -0
  153. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/server/index.examples.d.ts +9 -0
  154. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/server/index.js +1 -0
  155. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/server/index.test.d.ts +1 -0
  156. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/spec.types.d.ts +698 -0
  157. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/standard-schema.d.ts +23 -0
  158. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/styles.d.ts +184 -0
  159. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/styles.examples.d.ts +9 -0
  160. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/types.d.ts +33 -0
  161. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/wire-compat.test.d.ts +1 -0
  162. package/node_modules/@modelcontextprotocol/ext-apps/package.json +144 -0
  163. package/node_modules/@standard-schema/spec/LICENSE +21 -0
  164. package/node_modules/@standard-schema/spec/README.md +198 -0
  165. package/node_modules/@standard-schema/spec/dist/index.cjs +18 -0
  166. package/node_modules/@standard-schema/spec/dist/index.d.cts +119 -0
  167. package/node_modules/@standard-schema/spec/dist/index.d.ts +119 -0
  168. package/node_modules/@standard-schema/spec/dist/index.js +0 -0
  169. package/node_modules/@standard-schema/spec/package.json +52 -0
  170. package/package.json +19 -3
  171. package/public-api.md +60 -4
  172. package/dist/chunk-67GHJQK5.js.map +0 -1
  173. package/dist/chunk-DPDXGYGM.js +0 -258
  174. package/dist/chunk-DPDXGYGM.js.map +0 -1
  175. package/dist/chunk-MERN5XEM.js.map +0 -1
  176. package/dist/lib/agent-computer-command.d.ts +0 -32
  177. package/dist/rich-input/extensions/workflow-mention.d.ts +0 -10
@@ -0,0 +1,910 @@
1
+ import {
2
+ MarkdownContent
3
+ } from "./chunk-C3LBNHVM.js";
4
+ import "./chunk-NRYLAO3X.js";
5
+ import {
6
+ buttonVariants,
7
+ cn
8
+ } from "./chunk-MWILWSPG.js";
9
+ import {
10
+ Check,
11
+ LoaderCircle,
12
+ MessageSquareMore
13
+ } from "./chunk-KHJEIHMJ.js";
14
+ import "./chunk-PR4QN5HX.js";
15
+
16
+ // src/chat/QuestionnaireQuestionBlock.tsx
17
+ import { formatAskUserAnswer } from "@blade-hq/agent-client";
18
+ import { useEffect, useMemo as useMemo2, useState as useState2 } from "react";
19
+
20
+ // ../../node_modules/.pnpm/@shadcn+react@0.3.1_@types+react@19.2.14_react@19.2.4/node_modules/@shadcn/react/dist/chunk-HBS6WEDP.js
21
+ import * as i from "react";
22
+ function S({ defaultTagName: a, props: r, render: t, state: n = {}, stateAttributesMapping: e }) {
23
+ let o = d(R(n, e), r);
24
+ if (!t) return i.createElement(a, o);
25
+ if (typeof t == "function") return t(o, n);
26
+ if (!i.isValidElement(t)) return null;
27
+ let s = t.props, u = { ...d(o, s), ref: f(o.ref, s.ref) };
28
+ return i.cloneElement(t, u);
29
+ }
30
+ function d(...a) {
31
+ let r = {};
32
+ for (let t of a) {
33
+ if (!t) continue;
34
+ let n = t;
35
+ for (let e of Object.keys(n)) {
36
+ let o = n[e];
37
+ if (o === void 0) continue;
38
+ let s = r[e];
39
+ e === "className" ? r[e] = [s, o].filter(Boolean).join(" ") : e === "style" ? r[e] = { ...s, ...o } : e === "ref" ? r[e] = f(s, o) : l(e) && typeof s == "function" && typeof o == "function" ? r[e] = p(o, s) : r[e] = o;
40
+ }
41
+ }
42
+ return r;
43
+ }
44
+ function R(a, r) {
45
+ let t = {};
46
+ for (let n of Object.keys(a)) {
47
+ let e = a[n], o = r?.[n]?.(e);
48
+ if (o) {
49
+ Object.assign(t, o);
50
+ continue;
51
+ }
52
+ if (n === "slot") {
53
+ t["data-slot"] = e;
54
+ continue;
55
+ }
56
+ let s = `data-${String(n).replace(/[A-Z]/g, (c) => `-${c.toLowerCase()}`)}`;
57
+ typeof e == "boolean" ? t[s] = e ? "" : void 0 : e != null && (t[s] = String(e));
58
+ }
59
+ return t;
60
+ }
61
+ function p(a, r) {
62
+ return function(n) {
63
+ a(n), n.defaultPrevented || r(n);
64
+ };
65
+ }
66
+ function l(a) {
67
+ return /^on[A-Z]/.test(a);
68
+ }
69
+ function f(...a) {
70
+ let r = a.filter(Boolean);
71
+ if (r.length !== 0) return (t) => {
72
+ for (let n of r) typeof n == "function" ? n(t) : n && (n.current = t);
73
+ };
74
+ }
75
+
76
+ // ../../node_modules/.pnpm/@shadcn+react@0.3.1_@types+react@19.2.14_react@19.2.4/node_modules/@shadcn/react/dist/questionnaire/index.js
77
+ import * as p2 from "react";
78
+ import { jsx } from "react/jsx-runtime";
79
+ var Pe = p2.createContext(null);
80
+ var ve = p2.createContext(null);
81
+ var Ee = p2.createContext(null);
82
+ function ne(e) {
83
+ let t = p2.useContext(ve);
84
+ if (!t) throw new Error(`${e} must be used within a Questionnaire.Root component.`);
85
+ return t;
86
+ }
87
+ function be(e) {
88
+ let t = p2.useContext(Pe);
89
+ if (!t) throw new Error(`${e} must be used within a Questionnaire.Choice component.`);
90
+ return t;
91
+ }
92
+ function Z(e) {
93
+ let t = p2.useContext(Ee);
94
+ if (!t) throw new Error(`${e} must be used within a Questionnaire.Item component.`);
95
+ return t;
96
+ }
97
+ function ce(e) {
98
+ return Array.isArray(e) ? e.some((t) => String(t).trim().length > 0) : e != null && String(e).trim().length > 0;
99
+ }
100
+ function me(e) {
101
+ return e === "letters" ? Array.from({ length: 26 }, (t, i2) => String.fromCharCode(65 + i2)) : e === "numbers" ? Array.from({ length: 9 }, (t, i2) => String(i2 + 1)) : [];
102
+ }
103
+ function He(e, t) {
104
+ let i2 = t === "letters" ? e.toUpperCase() : e;
105
+ return me(t).includes(i2) ? i2 : null;
106
+ }
107
+ function Ie(e, t) {
108
+ return [e, t ? "Enter" : null].filter(Boolean).join(" ") || void 0;
109
+ }
110
+ function pe(e) {
111
+ return e.type === "choice" ? e.element.checked : e.element.hasAttribute("name") && ce(e.element.value);
112
+ }
113
+ function $e(e) {
114
+ return e?.type === "input" && ["email", "password", "search", "tel", "text", "url"].includes(e.element.type) && !ce(e.element.value);
115
+ }
116
+ function he(e) {
117
+ return e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement ? true : e instanceof HTMLInputElement ? !["button", "checkbox", "radio", "reset", "submit"].includes(e.type) : e instanceof HTMLElement && e.isContentEditable;
118
+ }
119
+ function le(e) {
120
+ return e instanceof HTMLInputElement && e.type === "radio";
121
+ }
122
+ function Ke(e, t) {
123
+ if (e.element === t.element) return 0;
124
+ let i2 = e.element.compareDocumentPosition(t.element);
125
+ return i2 & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : i2 & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
126
+ }
127
+ function Ue(e, t) {
128
+ if (e.element === t.element) return 0;
129
+ let i2 = e.element.compareDocumentPosition(t.element);
130
+ return i2 & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : i2 & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
131
+ }
132
+ function qe({ checked: e, defaultChecked: t = false, disabled: i2 = false, onChange: a, value: s }) {
133
+ let { disabled: o, hasInputAnswer: u, invalid: f2, multiple: g, name: d2, registerAnswerControl: c, registerAnswerSelection: S2, required: B, resetVersion: Q, selectedAnswerIds: x, setAnswerDefault: U, setAnswerSelectionFromInteraction: P, shortcutByAnswerId: A, shortcutByChoiceValue: G, status: v, syncControlledAnswerSelection: C } = Z("Questionnaire.Choice"), E = p2.useId(), [O, V] = p2.useState(null), L = p2.useRef(t), N = e !== void 0, D = o || i2, M = x.includes(E), y = N ? v === "skipped" ? false : e : M, R2 = g ? "checkbox" : "radio", w = G?.get(s) ?? A.get(E) ?? null;
134
+ p2.useLayoutEffect(() => S2(E, L.current), [E, S2]), p2.useLayoutEffect(() => U(E, t), [E, t, U]), p2.useLayoutEffect(() => {
135
+ if (O) return c({ disabled: D, element: O, id: E, ownDisabled: i2, type: "choice", value: s });
136
+ }, [E, i2, D, O, c, s]), p2.useLayoutEffect(() => {
137
+ N && C(E, e);
138
+ }, [E, N, e, Q, C]), p2.useLayoutEffect(() => {
139
+ O && (O.defaultChecked = N ? e : t, Q > 0 && (O.checked = y));
140
+ }, [y, N, e, t, O, Q]);
141
+ function X(T) {
142
+ if (a?.(T), !T.defaultPrevented) {
143
+ if (!N) {
144
+ P(E, T.target.checked);
145
+ return;
146
+ }
147
+ v === "skipped" && e === T.target.checked && P(E, e);
148
+ }
149
+ }
150
+ let ie = { checked: y, disabled: D, invalid: f2, shortcut: w, type: R2 };
151
+ return { inputProps: { ref: V, "aria-invalid": f2 || void 0, "aria-keyshortcuts": Ie(w, !D && y), checked: y, disabled: D, id: E, name: v === "skipped" ? void 0 : d2, onChange: X, required: B && !g && !u, type: R2, value: s }, state: ie };
152
+ }
153
+ function _e({ defaultValue: e, disabled: t = false, onChange: i2, ref: a, type: s = "text", value: o }) {
154
+ let { disabled: u, invalid: f2, name: g, registerAnswerControl: d2, registerAnswerSelection: c$1, resetVersion: S2, selectedAnswerIds: B, setAnswerDefault: Q, setAnswerSelectionFromInteraction: x, syncControlledAnswerSelection: U } = Z("Questionnaire.Input"), P = p2.useId(), A = p2.useRef(null), G = p2.useRef(ce(e)), v = o !== void 0, C = ce(e), E = ce(o), [O, V] = p2.useState(C), L = u || t, N = v ? E : O, D = B.includes(P);
155
+ p2.useLayoutEffect(() => c$1(P, G.current), [P, c$1]), p2.useLayoutEffect(() => Q(P, C), [C, P, Q]), p2.useLayoutEffect(() => {
156
+ let w = A.current;
157
+ if (w) return d2({ disabled: L, element: w, id: P, type: "input" });
158
+ }, [L, P, d2]), p2.useLayoutEffect(() => {
159
+ if (v) {
160
+ U(P, E);
161
+ return;
162
+ }
163
+ S2 > 0 && V(C);
164
+ }, [v, E, o, C, P, S2, U]), p2.useLayoutEffect(() => {
165
+ let w = A.current;
166
+ !w || !v || (w.defaultValue = String(o));
167
+ }, [v, o]);
168
+ function M(w) {
169
+ if (i2?.(w), w.defaultPrevented) return;
170
+ let X = w.target.value.trim().length > 0;
171
+ v || (V(X), x(P, X));
172
+ }
173
+ let y = { disabled: L, filled: N, invalid: f2 }, R2 = p2.useCallback((w) => {
174
+ A.current = w, f(a)?.(w);
175
+ }, [a]);
176
+ return { inputProps: { "aria-invalid": f2 || void 0, "aria-keyshortcuts": Ie(null, !L && N && D), defaultValue: v ? void 0 : e, disabled: L, form: D ? void 0 : "", id: P, name: D ? g : void 0, onChange: M, ref: R2, type: s, value: v ? o : void 0 }, state: y };
177
+ }
178
+ function We(e) {
179
+ return e === void 0 ? null : { enabledItems: e.filter((t) => !t.disabled), itemByName: new Map(e.map((t) => [t.name, t])), items: e };
180
+ }
181
+ function we(e, t) {
182
+ if (!e) return t ?? null;
183
+ let i2 = t ? e.itemByName.get(t) : void 0;
184
+ return i2 && !i2.disabled ? i2.name : e.enabledItems[0]?.name ?? null;
185
+ }
186
+ function Ge(e, t) {
187
+ let i2 = /* @__PURE__ */ new Map();
188
+ if (!e || !t) return i2;
189
+ let a = me(t), s = 0;
190
+ for (let o of e.choices ?? []) {
191
+ if (o.disabled) continue;
192
+ let u = a[s];
193
+ if (!u) break;
194
+ i2.set(o.value, u), s += 1;
195
+ }
196
+ return i2;
197
+ }
198
+ function je(e, t) {
199
+ let i2 = [], a = /* @__PURE__ */ new Set();
200
+ for (let s of e.items) {
201
+ a.has(s.name) && i2.push(`Item name "${s.name}" is defined more than once.`), a.add(s.name);
202
+ let o = /* @__PURE__ */ new Set();
203
+ for (let u of s.choices ?? []) o.has(u.value) && i2.push(`Choice value "${u.value}" is defined more than once in item "${s.name}".`), o.add(u.value);
204
+ }
205
+ if (t) {
206
+ let s = e.itemByName.get(t);
207
+ (!s || s.disabled) && i2.push(`defaultItem "${t}" does not identify an enabled item. The first enabled item will be used instead.`);
208
+ }
209
+ return i2;
210
+ }
211
+ function ze(e, t, i2) {
212
+ let a = [], s = new Map(t.map((o) => [o.name, o]));
213
+ for (let o of e.items) {
214
+ let u = s.get(o.name);
215
+ if (!u) {
216
+ o.disabled || a.push(`Item "${o.name}" is defined but has no rendered Questionnaire.Item.`);
217
+ continue;
218
+ }
219
+ u.disabled !== !!o.disabled && a.push(`Item "${o.name}" has different disabled values in Root.items and Questionnaire.Item.`), u.required !== !!o.required && a.push(`Item "${o.name}" has different required values in Root.items and Questionnaire.Item.`);
220
+ let f2 = o.choices ?? [], g = new Map(f2.map((c) => [c.value, c])), d2 = new Map(u.choices.map((c) => [c.value, c]));
221
+ for (let c of f2) {
222
+ let S2 = d2.get(c.value);
223
+ if (!S2) {
224
+ a.push(`Choice "${c.value}" is defined for item "${o.name}" but has no rendered Questionnaire.Choice.`);
225
+ continue;
226
+ }
227
+ S2.disabled !== !!c.disabled && a.push(`Choice "${c.value}" in item "${o.name}" has different disabled values in Root.items and Questionnaire.Choice.`);
228
+ }
229
+ if (i2) {
230
+ for (let Q of u.choices) g.has(Q.value) || a.push(`Rendered choice "${Q.value}" in item "${o.name}" is missing from Root.items and will not receive a shortcut.`);
231
+ let c = f2.filter((Q) => !Q.disabled).map((Q) => Q.value), S2 = u.choices.filter((Q) => !Q.disabled).map((Q) => Q.value);
232
+ c.length > 0 && c.length === S2.length && c.every((Q) => S2.includes(Q)) && c.some((Q, x) => Q !== S2[x]) && a.push(`Choice order for item "${o.name}" differs between Root.items and the rendered Questionnaire.Choice elements.`);
233
+ }
234
+ }
235
+ for (let o of t) !o.disabled && !e.itemByName.has(o.name) && a.push(`Rendered item "${o.name}" is missing from Root.items and is excluded from the questionnaire collection.`);
236
+ return a;
237
+ }
238
+ function Je({ "aria-describedby": e, "aria-keyshortcuts": t, disabled: i2 = false, invalid: a = false, multiple: s = false, name: o, onStatusChange: u, ref: f2, required: g = false }) {
239
+ let { activeItemName: d2, domVersion: c$1, first: S2, itemDefinitionByName: B, last: Q, nativeValidation: x, registerItem: U, shortcuts: P } = ne("Questionnaire.Item"), [A, G] = p2.useState(null), [v, C] = p2.useState([]), [E, O] = p2.useState(false), [V, L] = p2.useState([]), [N, D] = p2.useState(false), [M, y] = p2.useState(0), [R2, w] = p2.useState([]), [X, ie] = p2.useState([]), T = p2.useRef([]), q = p2.useRef(s), de = p2.useRef(s);
240
+ q.current = s;
241
+ let _ = !i2 && d2 === o, j = p2.useMemo(() => [...v].sort(Ue), [v, c$1]), h = p2.useMemo(() => j.filter((r) => !r.disabled), [j]), ge = h.some((r) => V.includes(r.id)), F = N ? "skipped" : ge ? "answered" : "unanswered", re = F === "skipped" && !g, se = i2 || re || !a && F === "answered", ee = !i2 && !re && (a || E && !se), Re = h.some((r) => r.type === "input"), Qe = p2.useRef(F), Ce = B?.get(o), J = p2.useMemo(() => B ? Ge(Ce, P) : null, [Ce, B, P]), ae = p2.useMemo(() => {
242
+ if (J) return /* @__PURE__ */ new Map();
243
+ let r = me(P), m = h.filter((l2) => l2.type === "choice");
244
+ return new Map(m.slice(0, r.length).map((l2, $) => [l2.id, r[$]]));
245
+ }, [h, J, P]), ye = p2.useCallback((r) => (C((m) => [...m.filter((l2) => l2.element !== r.element && l2.id !== r.id), r]), () => {
246
+ C((m) => m.filter((l2) => l2 !== r));
247
+ }), []);
248
+ p2.useLayoutEffect(() => {
249
+ Qe.current !== F && (Qe.current = F, u?.(F));
250
+ }, [u, F]);
251
+ let n = p2.useCallback((r, m) => {
252
+ L((l2) => m ? s ? l2.includes(r) ? l2 : [...l2, r] : [r] : l2.filter(($) => $ !== r));
253
+ }, [s]), b = p2.useCallback((r, m) => {
254
+ D(false), n(r, m);
255
+ }, [n]), k = p2.useCallback((r, m) => {
256
+ m && D(false), n(r, m);
257
+ }, [n]), Y = p2.useCallback((r, m) => (m && (T.current = [...T.current.filter((l2) => l2 !== r), r], L((l2) => q.current ? l2.includes(r) ? l2 : [...l2, r] : l2.length ? l2 : [r])), () => {
258
+ T.current = T.current.filter((l2) => l2 !== r), L((l2) => l2.filter(($) => $ !== r));
259
+ }), []), xe = p2.useCallback((r, m) => {
260
+ if (m) {
261
+ T.current = T.current.includes(r) ? T.current : [...T.current, r];
262
+ return;
263
+ }
264
+ T.current = T.current.filter((l2) => l2 !== r);
265
+ }, []), Me = p2.useCallback((r) => (w((m) => m.includes(r) ? m : [...m, r]), () => {
266
+ w((m) => m.filter((l2) => l2 !== r));
267
+ }), []), Ae = p2.useCallback((r) => (ie((m) => m.includes(r) ? m : [...m, r]), () => {
268
+ ie((m) => m.filter((l2) => l2 !== r));
269
+ }), []), Ne = p2.useCallback(() => {
270
+ if (O(true), !se) return false;
271
+ if (!x) return true;
272
+ let r = h.find((m) => pe(m) && m.element.willValidate && !m.element.validity.valid);
273
+ return r ? (r.element.focus(), r.element.reportValidity(), false) : true;
274
+ }, [h, x, se]), Te = p2.useCallback(() => {
275
+ A?.focus();
276
+ }, [A]), Le = p2.useCallback(() => {
277
+ let r = A?.querySelector("input[data-filled][name]:not(:disabled)"), m = A?.querySelector("input:not([type=hidden]):not(:disabled), textarea:not(:disabled)");
278
+ (r ?? m ?? A)?.focus();
279
+ }, [A]), De = p2.useCallback(() => {
280
+ O(false), D(false), L(s ? [...T.current] : T.current.slice(0, 1)), y((r) => r + 1);
281
+ }, [s]), Be = p2.useCallback(() => {
282
+ g || (L([]), D(true));
283
+ }, [g]);
284
+ p2.useLayoutEffect(() => {
285
+ let r = de.current;
286
+ de.current = s, !(!r || s) && L((m) => {
287
+ let l2 = h.find(($) => m.includes($.id));
288
+ return l2 ? [l2.id] : [];
289
+ });
290
+ }, [h, s]);
291
+ let Fe = p2.useCallback((r) => h.find((m) => m.element === r) ?? null, [h]), Ve = p2.useCallback((r) => {
292
+ if (J) {
293
+ let l2 = Array.from(J.entries()).find(([, $]) => $ === r)?.[0];
294
+ return h.find(($) => $.type === "choice" && $.value === l2) ?? null;
295
+ }
296
+ let m = Array.from(ae.entries()).find(([, l2]) => l2 === r)?.[0];
297
+ return h.find((l2) => l2.id === m) ?? null;
298
+ }, [h, ae, J]), Oe = p2.useCallback((r, m) => {
299
+ let l2 = h.findIndex((Qt) => Qt.element === r), $ = l2 < 0 ? null : h[l2] ?? null;
300
+ if (!h.length || he(r) && !$e($) || l2 < 0 && r !== A) return false;
301
+ let oe = l2 < 0 ? h.find(pe) ?? (m === "next" ? h[0] : h[h.length - 1]) : h[(l2 + (m === "next" ? 1 : -1) + h.length) % h.length];
302
+ return !oe || oe.element === r || l2 >= 0 && le(r) && le(oe.element) ? false : (oe.element.focus(), oe.type === "choice" && le(oe.element) && oe.element.click(), true);
303
+ }, [h, A]);
304
+ p2.useLayoutEffect(() => {
305
+ if (A) return U({ choices: j.flatMap((r) => r.type === "choice" ? [{ disabled: r.ownDisabled, value: r.value }] : []), disabled: i2, element: A, focus: Te, focusInvalid: Le, getAnswerByElement: Fe, getAnswerByShortcut: Ve, moveAnswerFocus: Oe, name: o, required: g, reset: De, skip: Be, status: F, validate: Ne });
306
+ }, [j, i2, A, Te, Le, Fe, Ve, Oe, o, U, g, De, Be, F, Ne]);
307
+ let pt = p2.useMemo(() => ({ active: _, disabled: i2, hasInputAnswer: Re, invalid: ee, multiple: s, name: o, registerAnswerControl: ye, registerAnswerSelection: Y, registerDescription: Me, registerError: Ae, required: g, resetVersion: M, selectedAnswerIds: V, setAnswerDefault: xe, setAnswerSelectionFromInteraction: b, shortcutByAnswerId: ae, shortcutByChoiceValue: J, shortcuts: P, status: F, syncControlledAnswerSelection: k }), [_, i2, Re, ee, s, o, ye, Y, Me, Ae, g, M, V, xe, b, ae, J, P, F, k]), ht = p2.useCallback((r) => {
308
+ G(r), f(f2)?.(r);
309
+ }, [f2]), gt = [...R2, ...ee ? X : [], e].filter(Boolean).join(" ") || void 0, Rt = [t, _ ? "Meta+Enter Control+Enter" : void 0, _ && h.length ? "ArrowUp ArrowDown" : void 0, _ && !S2 ? "ArrowLeft" : void 0, _ && !Q && F !== "unanswered" ? "ArrowRight" : void 0].filter(Boolean).join(" ") || void 0;
310
+ return { context: pt, itemProps: { "aria-describedby": gt, "aria-invalid": ee || void 0, "aria-keyshortcuts": Rt, disabled: i2, hidden: !_, inert: !_, ref: ht, tabIndex: -1 }, state: { active: _, disabled: i2, invalid: ee, multiple: s, required: g, status: F } };
311
+ }
312
+ function Xe({ defaultItem: e, item: t, items: i2, noValidate: a, onItemChange: s, onReset: o, onSubmit: u, ref: f2, shortcuts: g }) {
313
+ let d2 = p2.useMemo(() => We(i2), [i2]), [c$1, S2] = p2.useState([]), [B, Q] = p2.useState(() => we(d2, e)), [x, U] = p2.useState(null), [P, A] = p2.useState(0), G = p2.useRef(null), v = t !== void 0, C = v ? t : B, E = p2.useRef(C), O = a === false, V = g ?? null, L = p2.useRef(/* @__PURE__ */ new Set());
314
+ p2.useLayoutEffect(() => {
315
+ if (false) return;
316
+ if (!d2 || !x) {
317
+ L.current.clear();
318
+ return;
319
+ }
320
+ let n = false;
321
+ return queueMicrotask(() => {
322
+ if (n) return;
323
+ let b = [...je(d2, e), ...ze(d2, c$1, V)], k = new Set(b);
324
+ k.forEach((Y) => {
325
+ L.current.has(Y) || console.warn(`[Questionnaire] ${Y}`);
326
+ }), L.current = k;
327
+ }), () => {
328
+ n = true;
329
+ };
330
+ }, [d2, e, c$1, x, V]), p2.useLayoutEffect(() => {
331
+ if (!x || typeof MutationObserver > "u") return;
332
+ let n = new MutationObserver(() => {
333
+ A((b) => b + 1);
334
+ });
335
+ return n.observe(x, { childList: true, subtree: true }), () => n.disconnect();
336
+ }, [x]);
337
+ let N = p2.useMemo(() => c$1.filter((n) => !n.disabled).sort(Ke), [P, c$1]), D = p2.useMemo(() => new Map(N.map((n) => [n.name, n])), [N]), M = d2?.enabledItems ?? N, y = M.findIndex((n) => n.name === C), R2 = y < 0 || !C ? null : D.get(C) ?? null, w = C ? d2?.itemByName.get(C) : void 0, X = y < 0 ? null : w ? !!w.required : R2?.required ?? false, ie = y < 0 ? null : R2?.status ?? (C ? "unanswered" : null), T = p2.useMemo(() => d2 ? d2.enabledItems.flatMap((n) => {
338
+ let b = D.get(n.name);
339
+ return b ? [b] : [];
340
+ }) : N, [d2, D, N]), q = M.length, de = y < 0 ? 0 : y + 1, _ = q > 0 && y === 0, j = q > 0 && y === q - 1, h = p2.useCallback((n, b = "item") => {
341
+ n !== C && (G.current = { name: n, target: b }, v || Q(n), s?.(n));
342
+ }, [C, v, s]);
343
+ p2.useLayoutEffect(() => {
344
+ if (q === 0) return;
345
+ if (y < 0) {
346
+ if (!v && C === null) {
347
+ Q(M[0].name);
348
+ return;
349
+ }
350
+ h(M[0].name);
351
+ return;
352
+ }
353
+ let n = G.current, b = E.current !== C;
354
+ if (E.current = C, !n || n.name !== C) {
355
+ v && b && (G.current = null, R2?.focus());
356
+ return;
357
+ }
358
+ n.target === "invalid" ? R2?.focusInvalid() : R2?.focus(), G.current = null;
359
+ }, [R2, C, v, y, M, h, q]);
360
+ let ge = p2.useCallback((n) => (S2((b) => [...b.filter((k) => k.element !== n.element && k.name !== n.name), n]), () => {
361
+ S2((b) => b.filter((k) => k !== n));
362
+ }), []), F = p2.useCallback(() => {
363
+ y <= 0 || h(M[y - 1].name);
364
+ }, [y, M, h]), re = p2.useCallback(() => {
365
+ if (!(!R2 || y >= q - 1)) {
366
+ if (!R2.validate()) {
367
+ R2.focusInvalid();
368
+ return;
369
+ }
370
+ h(M[y + 1].name);
371
+ }
372
+ }, [R2, y, M, h, q]), se = p2.useCallback(() => {
373
+ if (R2) {
374
+ if (!R2.validate()) {
375
+ R2.focusInvalid();
376
+ return;
377
+ }
378
+ if (j) {
379
+ x?.requestSubmit();
380
+ return;
381
+ }
382
+ h(M[y + 1].name);
383
+ }
384
+ }, [R2, y, j, M, x, h]), ee = p2.useCallback(() => {
385
+ if (!(!R2 || R2.required)) {
386
+ if (R2.skip(), !j) {
387
+ h(M[y + 1].name);
388
+ return;
389
+ }
390
+ queueMicrotask(() => {
391
+ x?.requestSubmit();
392
+ });
393
+ }
394
+ }, [R2, y, j, M, x, h]);
395
+ function Re(n) {
396
+ if (o?.(n), n.defaultPrevented) return;
397
+ for (let k of c$1) k.reset();
398
+ let b = d2 ? we(d2, e) : N.find((k) => k.name === e)?.name ?? N[0]?.name;
399
+ b && h(b);
400
+ }
401
+ function Qe(n) {
402
+ let b = T.find((k) => !k.validate());
403
+ if (b) {
404
+ n.preventDefault(), h(b.name, "invalid"), b.name === C && (b.focusInvalid(), G.current = null);
405
+ return;
406
+ }
407
+ u?.(n);
408
+ }
409
+ function Ce(n) {
410
+ if (n.defaultPrevented || n.nativeEvent.isComposing || n.keyCode === 229 || !R2 || !(n.target instanceof Element)) return;
411
+ if (n.key === "Enter" && (n.metaKey || n.ctrlKey) && !n.altKey && !n.shiftKey) {
412
+ n.preventDefault(), n.repeat || se();
413
+ return;
414
+ }
415
+ if (n.metaKey || n.ctrlKey || n.altKey) return;
416
+ if ((n.key === "ArrowUp" || n.key === "ArrowDown") && R2.moveAnswerFocus(n.target, n.key === "ArrowDown" ? "next" : "previous")) {
417
+ n.preventDefault();
418
+ return;
419
+ }
420
+ if ((n.key === "ArrowLeft" || n.key === "ArrowRight") && !he(n.target) && !le(n.target)) {
421
+ if (n.preventDefault(), n.repeat) return;
422
+ n.key === "ArrowLeft" ? F() : R2.status !== "unanswered" && re();
423
+ return;
424
+ }
425
+ if (n.key === "Enter") {
426
+ let Y = R2.getAnswerByElement(n.target);
427
+ if (!Y) return;
428
+ n.preventDefault(), !n.repeat && pe(Y) && se();
429
+ return;
430
+ }
431
+ if (!V || he(n.target)) return;
432
+ let b = He(n.key, V), k = b ? R2.getAnswerByShortcut(b) : null;
433
+ k && (n.preventDefault(), !n.repeat && (k.element.focus(), k.type === "choice" && k.element.click()));
434
+ }
435
+ let J = { current: de, first: _, last: j, total: q }, ae = p2.useMemo(() => ({ ...J, activeItem: R2, activeItemName: C, activeItemRequired: X, activeItemStatus: ie, domVersion: P, goNext: re, goPrevious: F, itemDefinitionByName: d2?.itemByName ?? null, nativeValidation: O, registerItem: ge, shortcuts: V, skipCurrent: ee }), [R2, C, X, ie, d2, de, P, _, re, F, j, O, ge, V, ee, q]), ye = p2.useCallback((n) => {
436
+ U(n), f(f2)?.(n);
437
+ }, [f2]);
438
+ return { context: ae, rootProps: { "data-shortcuts": V ?? void 0, onKeyDown: Ce, onReset: Re, onSubmit: Qe, ref: ye }, state: J };
439
+ }
440
+ function Ye({ defaultItem: e, item: t, items: i2, noValidate: a$1 = true, onItemChange: s, onReset: o, onSubmit: u, ref: f2, shortcuts: g, ...d2 }) {
441
+ let { context: c, rootProps: S2, state: B } = Xe({ defaultItem: e, item: t, items: i2, noValidate: a$1, onItemChange: s, onReset: o, onSubmit: u, ref: f2, shortcuts: g }), Q = S({ defaultTagName: "form", props: d({ ...S2, noValidate: a$1 }, d2), state: B });
442
+ return jsx(ve.Provider, { value: c, children: Q });
443
+ }
444
+ function Ze({ children: e, render: t, ...i2 }) {
445
+ let { current: a$1, first: s, last: o, total: u } = ne("Questionnaire.Progress"), f2 = u ? `Question ${a$1} of ${u}` : void 0;
446
+ return S({ defaultTagName: "div", props: d({ "aria-label": "Questionnaire progress", "aria-live": "polite", "aria-valuemax": u || void 0, "aria-valuemin": u ? 1 : void 0, "aria-valuenow": u ? a$1 : void 0, "aria-valuetext": f2, children: e ?? f2, role: "progressbar" }, i2), render: t, state: { current: a$1, first: s, last: o, total: u } });
447
+ }
448
+ function et({ "aria-describedby": e, "aria-keyshortcuts": t, children: i2, disabled: a$1 = false, invalid: s = false, multiple: o = false, name: u, onStatusChange: f2, ref: g, required: d2 = false, ...c }) {
449
+ let { context: S2, itemProps: B, state: Q } = Je({ "aria-describedby": e, "aria-keyshortcuts": t, disabled: a$1, invalid: s, multiple: o, name: u, onStatusChange: f2, ref: g, required: d2 }), x = S({ defaultTagName: "fieldset", props: d({ ...B, children: i2 }, c), state: Q, stateAttributesMapping: { active: (U) => ({ "data-active": U ? "" : void 0 }) } });
450
+ return jsx(Ee.Provider, { value: S2, children: x });
451
+ }
452
+ function tt({ render: e, ...t }) {
453
+ return Z("Questionnaire.Title"), S({ defaultTagName: "legend", props: t, render: e });
454
+ }
455
+ function nt({ id: e, render: t, ...i2 }) {
456
+ let { registerDescription: a$1 } = Z("Questionnaire.Description"), s = p2.useId(), o = e ?? s;
457
+ return p2.useLayoutEffect(() => a$1(o), [o, a$1]), S({ defaultTagName: "p", props: d({ id: o }, i2), render: t });
458
+ }
459
+ function it({ render: e, ...t }) {
460
+ let { shortcuts: i2 } = Z("Questionnaire.Choices");
461
+ return S({ defaultTagName: "div", props: t, render: e, state: { shortcuts: i2 } });
462
+ }
463
+ function ot({ checked: e, children: t, defaultChecked: i2 = false, disabled: a$1 = false, onChange: s, render: o, value: u, ...f2 }) {
464
+ let { inputProps: g, state: d2 } = qe({ checked: e, defaultChecked: i2, disabled: a$1, onChange: s, value: u }), c = S({ defaultTagName: "label", props: d({ children: t }, f2), render: o, state: d2, stateAttributesMapping: { checked: (S2) => ({ "data-checked": S2 ? "" : void 0, "data-unchecked": S2 ? void 0 : "" }) } });
465
+ return jsx(Pe.Provider, { value: { inputProps: g, state: d2 }, children: c });
466
+ }
467
+ function rt({ render: e, ...t }) {
468
+ let { inputProps: i2, state: a$1 } = be("Questionnaire.ChoiceInput");
469
+ return S({ defaultTagName: "input", props: d(i2, t), render: e, state: a$1, stateAttributesMapping: { checked: (s) => ({ "data-checked": s ? "" : void 0, "data-unchecked": s ? void 0 : "" }) } });
470
+ }
471
+ function st({ render: e, ...t }) {
472
+ return be("Questionnaire.ChoiceLabel"), S({ defaultTagName: "span", props: t, render: e });
473
+ }
474
+ function at({ children: e, render: t, ...i2 }) {
475
+ let { state: a$1 } = be("Questionnaire.ChoiceShortcut"), s = { shortcut: a$1.shortcut };
476
+ return S({ defaultTagName: "span", props: d({ "aria-hidden": true, children: e ?? a$1.shortcut, hidden: a$1.shortcut === null }, i2), render: t, state: s });
477
+ }
478
+ function ut({ defaultValue: e, disabled: t = false, onChange: i2, ref: a$1, render: s, type: o = "text", value: u, ...f2 }) {
479
+ let { inputProps: g, state: d2 } = _e({ defaultValue: e, disabled: t, onChange: i2, ref: a$1, type: o, value: u });
480
+ return S({ defaultTagName: "input", props: d(g, f2), render: s, state: d2, stateAttributesMapping: { filled: (c) => ({ "data-empty": c ? void 0 : "", "data-filled": c ? "" : void 0 }) } });
481
+ }
482
+ function ct({ children: e, id: t, render: i2, ...a$1 }) {
483
+ let { invalid: s, registerError: o, required: u } = Z("Questionnaire.Error"), f2 = p2.useId(), g = t ?? f2;
484
+ return p2.useLayoutEffect(() => o(g), [g, o]), S({ defaultTagName: "p", props: d({ children: e ?? (u ? "Choose an answer to continue." : "Choose an answer or skip this question."), hidden: !s, id: g, role: s ? "alert" : void 0 }, a$1), render: i2, state: { invalid: s } });
485
+ }
486
+ function lt({ children: e, disabled: t = false, onClick: i2, render: a, tabIndex: s, type: o = "button", ...u }) {
487
+ let f2 = ne("Questionnaire.Previous"), g = f2.total > 1 && !f2.first;
488
+ function d2(c) {
489
+ i2?.(c), c.defaultPrevented || f2.goPrevious();
490
+ }
491
+ return Se({ children: e ?? "Previous", disabled: t, onClick: d2, props: u, render: a, status: f2.activeItemStatus, tabIndex: s, type: o, visible: g });
492
+ }
493
+ function ft({ children: e, disabled: t = false, onClick: i2, render: a, tabIndex: s, type: o = "button", ...u }) {
494
+ let f2 = ne("Questionnaire.Skip"), g = f2.activeItemRequired === false;
495
+ function d2(c) {
496
+ i2?.(c), c.defaultPrevented || f2.skipCurrent();
497
+ }
498
+ return Se({ children: e ?? "Skip", disabled: t, onClick: d2, props: u, render: a, status: f2.activeItemStatus, tabIndex: s, type: o, visible: g });
499
+ }
500
+ function dt({ children: e, disabled: t = false, onClick: i2, render: a, tabIndex: s, type: o = "button", ...u }) {
501
+ let f2 = ne("Questionnaire.Next"), g = f2.total > 1 && !f2.last;
502
+ function d2(c) {
503
+ i2?.(c), c.defaultPrevented || f2.goNext();
504
+ }
505
+ return Se({ children: e ?? "Next", disabled: t, onClick: d2, props: u, render: a, shortcut: "Enter", status: f2.activeItemStatus, tabIndex: s, type: o, visible: g });
506
+ }
507
+ function mt({ children: e, disabled: t = false, render: i2, tabIndex: a, type: s = "submit", ...o }) {
508
+ let u = ne("Questionnaire.Submit"), f2 = u.total > 0 && u.last;
509
+ return Se({ children: e ?? "Submit", disabled: t, props: o, render: i2, shortcut: "Enter", status: u.activeItemStatus, tabIndex: a, type: s, visible: f2 });
510
+ }
511
+ function Se({ children: e, disabled: t, onClick: i2, props: a$1, render: s, shortcut: o, status: u, tabIndex: f2, type: g, visible: d2 }) {
512
+ let c = d2 && !t ? o ?? null : null, S2 = { disabled: t, shortcut: c, status: u, visible: d2 };
513
+ return S({ defaultTagName: "button", props: d({ "aria-hidden": !d2 || void 0, "aria-keyshortcuts": c ?? void 0, children: e, disabled: t, hidden: !d2, inert: !d2, onClick: i2, tabIndex: d2 ? f2 : -1, type: g }, a$1), render: s, state: S2, stateAttributesMapping: { visible: (B) => ({ "data-hidden": B ? void 0 : "", "data-visible": B ? "" : void 0 }) } });
514
+ }
515
+ var zt = { Root: Ye, Progress: Ze, Item: et, Title: tt, Description: nt, Choices: it, Choice: ot, ChoiceInput: rt, ChoiceLabel: st, ChoiceShortcut: at, Input: ut, Error: ct, Previous: lt, Skip: ft, Next: dt, Submit: mt };
516
+
517
+ // ../ui/src/components/questionnaire.tsx
518
+ import { jsx as jsx2, jsxs } from "react/jsx-runtime";
519
+ function Questionnaire({
520
+ className,
521
+ ...props
522
+ }) {
523
+ return /* @__PURE__ */ jsx2(
524
+ zt.Root,
525
+ {
526
+ "data-slot": "questionnaire",
527
+ className: cn("flex w-full min-w-0 flex-col gap-4", className),
528
+ ...props
529
+ }
530
+ );
531
+ }
532
+ function QuestionnaireProgress({
533
+ className,
534
+ ...props
535
+ }) {
536
+ return /* @__PURE__ */ jsx2(
537
+ zt.Progress,
538
+ {
539
+ "data-slot": "questionnaire-progress",
540
+ className: cn(
541
+ "min-h-[1lh] w-fit min-w-[14ch] text-xs font-medium text-muted-foreground tabular-nums",
542
+ className
543
+ ),
544
+ ...props
545
+ }
546
+ );
547
+ }
548
+ function QuestionnaireItem({
549
+ className,
550
+ ...props
551
+ }) {
552
+ return /* @__PURE__ */ jsx2(
553
+ zt.Item,
554
+ {
555
+ "data-slot": "questionnaire-item",
556
+ className: cn(
557
+ "flex min-w-0 flex-col gap-4 border-0 p-0 outline-none",
558
+ className
559
+ ),
560
+ ...props
561
+ }
562
+ );
563
+ }
564
+ function QuestionnaireTitle({
565
+ className,
566
+ ...props
567
+ }) {
568
+ return /* @__PURE__ */ jsx2(
569
+ zt.Title,
570
+ {
571
+ "data-slot": "questionnaire-title",
572
+ className: cn(
573
+ "cn-font-heading text-base leading-snug font-medium text-pretty [&:not(:has(~[data-slot=questionnaire-description]))]:mb-4",
574
+ className
575
+ ),
576
+ ...props
577
+ }
578
+ );
579
+ }
580
+ function QuestionnaireChoices({
581
+ className,
582
+ ...props
583
+ }) {
584
+ return /* @__PURE__ */ jsx2(
585
+ zt.Choices,
586
+ {
587
+ "data-slot": "questionnaire-choices",
588
+ className: cn(
589
+ "group/questionnaire-choices grid min-w-0 gap-2",
590
+ className
591
+ ),
592
+ ...props
593
+ }
594
+ );
595
+ }
596
+ function QuestionnaireChoice({
597
+ children,
598
+ className,
599
+ ...props
600
+ }) {
601
+ return /* @__PURE__ */ jsxs(
602
+ zt.Choice,
603
+ {
604
+ "data-slot": "questionnaire-choice",
605
+ className: cn(
606
+ "group/questionnaire-choice relative flex min-h-11 cursor-pointer items-start gap-2.5 rounded-lg border border-input bg-transparent px-3 py-2.5 text-start text-sm transition-colors outline-none select-none hover:bg-muted/50 has-[>input:focus-visible]:border-ring has-[>input:focus-visible]:ring-3 has-[>input:focus-visible]:ring-ring/50 data-invalid:border-destructive dark:bg-input/20 data-checked:border-primary/40 data-checked:bg-muted dark:data-checked:bg-muted",
607
+ "data-disabled:pointer-events-none data-disabled:cursor-not-allowed data-disabled:opacity-50",
608
+ className
609
+ ),
610
+ ...props,
611
+ children: [
612
+ /* @__PURE__ */ jsx2(
613
+ zt.ChoiceInput,
614
+ {
615
+ "data-slot": "questionnaire-choice-input",
616
+ className: "absolute inset-0 z-10 size-full cursor-pointer opacity-0"
617
+ }
618
+ ),
619
+ /* @__PURE__ */ jsxs(
620
+ "span",
621
+ {
622
+ "aria-hidden": "true",
623
+ "data-slot": "questionnaire-choice-indicator",
624
+ className: "pointer-events-none relative flex size-4 shrink-0 translate-y-[--spacing(0.45)] items-center justify-center rounded-[4px] border border-input group-has-data-[slot=questionnaire-choice-description]/questionnaire-choice:translate-y-0.5 group-data-[type=radio]/questionnaire-choice:rounded-full group-data-checked/questionnaire-choice:border-primary group-data-checked/questionnaire-choice:bg-primary group-data-checked/questionnaire-choice:text-primary-foreground dark:bg-input/30 dark:group-data-checked/questionnaire-choice:bg-primary",
625
+ children: [
626
+ /* @__PURE__ */ jsx2(
627
+ "span",
628
+ {
629
+ "data-slot": "questionnaire-choice-indicator-dot",
630
+ className: "hidden size-2 rounded-full bg-primary-foreground group-data-[type=checkbox]/questionnaire-choice:hidden group-data-checked/questionnaire-choice:block"
631
+ }
632
+ ),
633
+ /* @__PURE__ */ jsx2(Check, { "data-slot": "questionnaire-choice-indicator-check", className: "hidden size-3.5 group-data-[type=radio]/questionnaire-choice:hidden group-data-checked/questionnaire-choice:block" })
634
+ ]
635
+ }
636
+ ),
637
+ /* @__PURE__ */ jsx2(
638
+ zt.ChoiceLabel,
639
+ {
640
+ "data-slot": "questionnaire-choice-label",
641
+ className: "flex min-w-0 flex-1 flex-col gap-0.5 leading-snug",
642
+ children
643
+ }
644
+ ),
645
+ /* @__PURE__ */ jsx2(
646
+ zt.ChoiceShortcut,
647
+ {
648
+ "data-slot": "questionnaire-choice-shortcut",
649
+ className: "pointer-events-none ms-auto hidden size-5 shrink-0 translate-y-[--spacing(0.45)] items-center justify-center rounded-md border border-input bg-background font-mono text-[0.625rem] leading-none font-medium text-muted-foreground group-has-data-[slot=questionnaire-choice-description]/questionnaire-choice:translate-y-0.5 group-data-[shortcut]/questionnaire-choice:inline-flex"
650
+ }
651
+ )
652
+ ]
653
+ }
654
+ );
655
+ }
656
+ function QuestionnaireChoiceDescription({
657
+ className,
658
+ ...props
659
+ }) {
660
+ return /* @__PURE__ */ jsx2(
661
+ "span",
662
+ {
663
+ "data-slot": "questionnaire-choice-description",
664
+ className: cn("text-muted-foreground", className),
665
+ ...props
666
+ }
667
+ );
668
+ }
669
+ function QuestionnaireInput({
670
+ className,
671
+ ...props
672
+ }) {
673
+ return /* @__PURE__ */ jsx2(
674
+ "div",
675
+ {
676
+ "data-slot": "questionnaire-input-wrapper",
677
+ className: "group/questionnaire-input relative w-full min-w-0",
678
+ children: /* @__PURE__ */ jsx2(
679
+ zt.Input,
680
+ {
681
+ "data-slot": "questionnaire-input",
682
+ className: cn(
683
+ "h-8 min-h-11 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-[color,box-shadow,background-color] outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 sm:min-h-0 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
684
+ "selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground",
685
+ className
686
+ ),
687
+ ...props
688
+ }
689
+ )
690
+ }
691
+ );
692
+ }
693
+ function QuestionnaireError({
694
+ className,
695
+ ...props
696
+ }) {
697
+ return /* @__PURE__ */ jsx2(
698
+ zt.Error,
699
+ {
700
+ "data-slot": "questionnaire-error",
701
+ className: cn("mt-2 text-sm text-destructive", className),
702
+ ...props
703
+ }
704
+ );
705
+ }
706
+ function QuestionnaireActions({
707
+ className,
708
+ ...props
709
+ }) {
710
+ return /* @__PURE__ */ jsx2(
711
+ "div",
712
+ {
713
+ "data-slot": "questionnaire-actions",
714
+ className: cn(
715
+ "grid min-h-11 w-full grid-cols-[minmax(0,1fr)_auto_auto] items-center gap-2 sm:min-h-8",
716
+ className
717
+ ),
718
+ ...props
719
+ }
720
+ );
721
+ }
722
+ function QuestionnairePrevious({
723
+ children,
724
+ className,
725
+ size = "default",
726
+ variant = "outline",
727
+ ...props
728
+ }) {
729
+ return /* @__PURE__ */ jsx2(
730
+ zt.Previous,
731
+ {
732
+ "data-slot": "questionnaire-previous",
733
+ "data-size": size,
734
+ "data-variant": variant,
735
+ className: cn(
736
+ buttonVariants({ size, variant }),
737
+ "col-start-1 row-start-1 min-h-11 justify-self-start sm:min-h-0",
738
+ className
739
+ ),
740
+ ...props,
741
+ children: children ?? "Previous"
742
+ }
743
+ );
744
+ }
745
+ function QuestionnaireNext({
746
+ children,
747
+ className,
748
+ size = "default",
749
+ variant = "default",
750
+ ...props
751
+ }) {
752
+ return /* @__PURE__ */ jsx2(
753
+ zt.Next,
754
+ {
755
+ "data-slot": "questionnaire-next",
756
+ "data-size": size,
757
+ "data-variant": variant,
758
+ className: cn(
759
+ buttonVariants({ size, variant }),
760
+ "col-start-3 row-start-1 min-h-11 justify-self-end sm:min-h-0",
761
+ className
762
+ ),
763
+ ...props,
764
+ children: children ?? "Next"
765
+ }
766
+ );
767
+ }
768
+ function QuestionnaireSubmit({
769
+ children,
770
+ className,
771
+ size = "default",
772
+ variant = "default",
773
+ ...props
774
+ }) {
775
+ return /* @__PURE__ */ jsx2(
776
+ zt.Submit,
777
+ {
778
+ "data-slot": "questionnaire-submit",
779
+ "data-size": size,
780
+ "data-variant": variant,
781
+ className: cn(
782
+ buttonVariants({ size, variant }),
783
+ "col-start-3 row-start-1 min-h-11 justify-self-end sm:min-h-0",
784
+ className
785
+ ),
786
+ ...props,
787
+ children: children ?? "Submit"
788
+ }
789
+ );
790
+ }
791
+
792
+ // src/chat/QuestionnaireQuestionBlock.tsx
793
+ import { Fragment, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
794
+ function QuestionnaireQuestionBlock({ data, answered, toolCallId, sessionStatus, answerData, onAnswer }) {
795
+ const [submitted, setSubmitted] = useState2(false);
796
+ const [draftAnswer, setDraftAnswer] = useState2();
797
+ const [note, setNote] = useState2("");
798
+ const [item, setItem] = useState2("0");
799
+ const items = useMemo2(() => data.questions.map((question, index) => ({
800
+ name: String(index),
801
+ required: true,
802
+ choices: question.options.map((_, optionIndex) => ({ value: String(optionIndex) }))
803
+ })), [data.questions]);
804
+ useEffect(() => {
805
+ if (sessionStatus === "failed" || sessionStatus === "interrupted") setSubmitted(false);
806
+ }, [sessionStatus]);
807
+ function handleSubmit(event) {
808
+ event.preventDefault();
809
+ if (answered || submitted || !onAnswer) return;
810
+ const form = event.currentTarget;
811
+ const next = { selections: {}, custom: {}, ...note.trim() ? { note: note.trim() } : {} };
812
+ for (const [index] of data.questions.entries()) {
813
+ const fieldset = form.querySelector(`[data-question-index="${index}"]`);
814
+ const custom = fieldset?.querySelector('[data-slot="questionnaire-input"]');
815
+ if (custom?.name && custom.value.trim()) next.custom[index] = custom.value.trim();
816
+ else {
817
+ const selected = [...fieldset?.querySelectorAll('input[data-slot="questionnaire-choice-input"]:checked') ?? []].map((input) => Number(input.value)).sort((a, b) => a - b);
818
+ if (selected.length) next.selections[index] = selected;
819
+ }
820
+ }
821
+ setDraftAnswer(next);
822
+ setSubmitted(true);
823
+ onAnswer(formatAskUserAnswer(data, next), toolCallId, next);
824
+ }
825
+ if (answered) {
826
+ const saved = answerData ?? draftAnswer;
827
+ return /* @__PURE__ */ jsxs2("div", { part: "ask-card", className: "ask-user-question blade-chat-ask-card ask-user-question-summary ml-4 max-w-2xl rounded-xl border border-[hsl(var(--border))] bg-[hsl(var(--card))] p-4 text-sm", children: [
828
+ /* @__PURE__ */ jsx3("dl", { className: "space-y-3", children: data.questions.map((question, index) => {
829
+ const selected = saved?.custom[index] ?? saved?.selections[index]?.map((option) => question.options[option]?.label).filter(Boolean).join("\u3001");
830
+ return /* @__PURE__ */ jsxs2("div", { className: "space-y-1", children: [
831
+ /* @__PURE__ */ jsx3("dt", { className: "text-xs text-[hsl(var(--muted-foreground))]", children: question.question }),
832
+ /* @__PURE__ */ jsx3("dd", { className: "m-0 whitespace-pre-wrap font-medium text-[hsl(var(--foreground))]", children: selected || "\u672A\u4F5C\u7B54" })
833
+ ] }, `${toolCallId}:${index}`);
834
+ }) }),
835
+ saved?.note && /* @__PURE__ */ jsx3("p", { "aria-label": "\u8865\u5145\u8BF4\u660E", className: "mt-3 whitespace-pre-wrap border-t border-[hsl(var(--border))] pt-3 text-xs text-[hsl(var(--muted-foreground))]", children: saved.note })
836
+ ] });
837
+ }
838
+ return /* @__PURE__ */ jsxs2("div", { part: "ask-card", className: "ask-user-question blade-chat-ask-card ml-4 max-w-lg rounded-2xl border border-[hsl(var(--border))] bg-[hsl(var(--card))] p-4 text-sm", children: [
839
+ data.source_loop?.description && /* @__PURE__ */ jsxs2("p", { className: "mb-4 text-xs text-[hsl(var(--muted-foreground))]", children: [
840
+ data.source_loop.description,
841
+ " \u60F3\u548C\u4F60\u786E\u8BA4\u4E00\u4EF6\u4E8B"
842
+ ] }),
843
+ /* @__PURE__ */ jsx3("fieldset", { disabled: submitted || !onAnswer, className: "m-0 min-w-0 border-0 p-0", children: /* @__PURE__ */ jsxs2(Questionnaire, { items, item, onItemChange: setItem, onSubmit: handleSubmit, children: [
844
+ /* @__PURE__ */ jsx3(QuestionnaireProgress, { "aria-label": "\u95EE\u9898\u8FDB\u5EA6", render: (props, state) => /* @__PURE__ */ jsxs2("div", { ...props, "aria-valuetext": `\u7B2C ${state.current} \u9898\uFF0C\u5171 ${state.total} \u9898`, children: [
845
+ "\u7B2C ",
846
+ state.current,
847
+ " / ",
848
+ state.total,
849
+ " \u9898"
850
+ ] }) }),
851
+ data.questions.map((question, index) => /* @__PURE__ */ jsxs2(QuestionnaireItem, { "data-question-index": index, name: String(index), multiple: question.multiSelect, required: true, children: [
852
+ /* @__PURE__ */ jsxs2(QuestionnaireTitle, { className: "mb-0 flex items-start gap-2 text-[hsl(var(--foreground))]", children: [
853
+ /* @__PURE__ */ jsx3(MessageSquareMore, { size: 16, className: "mt-0.5 shrink-0 text-[hsl(var(--primary))]", "aria-hidden": "true" }),
854
+ /* @__PURE__ */ jsx3(MarkdownContent, { className: "min-w-0 flex-1 [&_p]:my-0", controls: { code: true }, children: question.question })
855
+ ] }),
856
+ /* @__PURE__ */ jsxs2(QuestionnaireChoices, { children: [
857
+ question.options.map((option, optionIndex) => /* @__PURE__ */ jsxs2(QuestionnaireChoice, { value: String(optionIndex), className: "blade-chat-ask-option", children: [
858
+ /* @__PURE__ */ jsx3("span", { className: "font-medium", children: option.label }),
859
+ option.description && /* @__PURE__ */ jsx3(QuestionnaireChoiceDescription, { children: option.description })
860
+ ] }, optionIndex)),
861
+ /* @__PURE__ */ jsx3(QuestionnaireInput, { "aria-label": "\u81EA\u5B9A\u4E49\u56DE\u7B54", placeholder: "\u5176\u4ED6\u60F3\u6CD5\uFF1F\u5728\u8FD9\u91CC\u8865\u5145", render: /* @__PURE__ */ jsx3("textarea", { rows: 2 }), className: "h-auto min-h-16 resize-y py-2.5 leading-6" })
862
+ ] }),
863
+ /* @__PURE__ */ jsx3(QuestionnaireError, { children: "\u8BF7\u9009\u62E9\u4E00\u4E2A\u9009\u9879\uFF0C\u6216\u586B\u5199\u81EA\u5DF1\u7684\u56DE\u7B54\u3002" })
864
+ ] }, `${toolCallId}:${index}`)),
865
+ /* @__PURE__ */ jsxs2("label", { hidden: item !== String(data.questions.length - 1), className: "block space-y-2 text-xs text-[hsl(var(--muted-foreground))]", children: [
866
+ /* @__PURE__ */ jsx3("span", { children: "\u8865\u5145\u8BF4\u660E\uFF08\u53EF\u9009\uFF09" }),
867
+ /* @__PURE__ */ jsx3("textarea", { "aria-label": "\u8865\u5145\u8BF4\u660E", rows: 2, value: note, onChange: (event) => setNote(event.target.value), placeholder: "\u8FD8\u6709\u9700\u8981\u52A9\u624B\u6CE8\u610F\u7684\u5417\uFF1F", className: "w-full resize-y rounded-lg border border-[hsl(var(--border))] bg-transparent px-3 py-2 text-sm text-[hsl(var(--foreground))] outline-none focus-visible:ring-2 focus-visible:ring-[hsl(var(--ring)/0.35)]" })
868
+ ] }),
869
+ /* @__PURE__ */ jsxs2(QuestionnaireActions, { children: [
870
+ /* @__PURE__ */ jsx3(QuestionnairePrevious, { children: "\u4E0A\u4E00\u9898" }),
871
+ /* @__PURE__ */ jsx3(QuestionnaireNext, { render: (props, state) => /* @__PURE__ */ jsx3("button", { ...props, disabled: state.status !== "answered", children: "\u4E0B\u4E00\u9898" }) }),
872
+ /* @__PURE__ */ jsx3(QuestionnaireSubmit, { render: (props, state) => /* @__PURE__ */ jsx3("button", { ...props, disabled: submitted || state.status !== "answered", children: submitted ? /* @__PURE__ */ jsxs2(Fragment, { children: [
873
+ /* @__PURE__ */ jsx3(LoaderCircle, { size: 14, className: "animate-spin", "aria-hidden": "true" }),
874
+ "\u6B63\u5728\u63D0\u4EA4\u2026"
875
+ ] }) : "\u786E\u8BA4\u63D0\u4EA4" }) })
876
+ ] })
877
+ ] }) })
878
+ ] });
879
+ }
880
+ export {
881
+ QuestionnaireQuestionBlock as AskUserQuestionBlock,
882
+ QuestionnaireQuestionBlock
883
+ };
884
+ /*!
885
+ * Adapted from shadcn/ui Questionnaire (radix-nova).
886
+ * Source: https://ui.shadcn.com/r/styles/radix-nova/questionnaire.json
887
+ *
888
+ * MIT License
889
+ *
890
+ * Copyright (c) 2023 shadcn
891
+ *
892
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
893
+ * of this software and associated documentation files (the "Software"), to deal
894
+ * in the Software without restriction, including without limitation the rights
895
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
896
+ * copies of the Software, and to permit persons to whom the Software is
897
+ * furnished to do so, subject to the following conditions:
898
+ *
899
+ * The above copyright notice and this permission notice shall be included in all
900
+ * copies or substantial portions of the Software.
901
+ *
902
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
903
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
904
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
905
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
906
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
907
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
908
+ * SOFTWARE.
909
+ */
910
+ //# sourceMappingURL=questions.js.map