@inkeep/cxkit-primitives 0.5.90 → 0.5.92

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.
@@ -1,43 +1,43 @@
1
1
  "use client";
2
2
  import { jsx as o } from "react/jsx-runtime";
3
3
  import { ikp as t } from "./factory.js";
4
- import { forwardRef as I, useRef as h, useEffect as C } from "react";
5
- import w from "react-textarea-autosize";
6
- import * as u from "@radix-ui/react-select";
7
- import * as R from "@radix-ui/react-checkbox";
4
+ import { forwardRef as v, useRef as f, useEffect as h } from "react";
5
+ import y from "react-textarea-autosize";
6
+ import { Trigger as A, Icon as L, Content as V, Viewport as H, Item as E, ItemText as D, ItemIndicator as N, Root as q, Value as M } from "../atoms/select.js";
7
+ import * as w from "@radix-ui/react-checkbox";
8
8
  import { useIntelligentForm as s } from "./intelligent-form/intelligent-form-provider.js";
9
- import { IntelligentFormProvider as Hi } from "./intelligent-form/intelligent-form-provider.js";
10
- import * as v from "@radix-ui/react-scroll-area";
11
- import { BuiltInIconRenderer as S } from "../atoms/icons/built-in-icon-renderer.js";
12
- import { maybeRender as b, dataAttr as a } from "../utils/misc.js";
13
- import { Controller as L } from "react-hook-form";
14
- import { IntelligentFormFieldProvider as V, useIntelligentFormField as _ } from "../providers/intelligent-form-field-provider.js";
15
- import { CheckboxIcon as H } from "../atoms/icons/checkbox-icon.js";
16
- import { useInkeepConfig as x } from "../providers/config-provider.js";
17
- import { SourceItemProvider as E, useSourceItem as T } from "../providers/source-item-provider.js";
18
- import { LinkWithQueryParams as D } from "../atoms/link.js";
19
- import { Markdown as N } from "../atoms/markdown/index.js";
20
- import { useComposedRefs as P } from "../utils/compose-refs.js";
9
+ import { IntelligentFormProvider as ji } from "./intelligent-form/intelligent-form-provider.js";
10
+ import * as p from "@radix-ui/react-scroll-area";
11
+ import { BuiltInIconRenderer as g } from "../atoms/icons/built-in-icon-renderer.js";
12
+ import { maybeRender as C, dataAttr as a } from "../utils/misc.js";
13
+ import { Controller as z } from "react-hook-form";
14
+ import { IntelligentFormFieldProvider as O, useIntelligentFormField as u } from "../providers/intelligent-form-field-provider.js";
15
+ import { CheckboxIcon as U } from "../atoms/icons/checkbox-icon.js";
16
+ import { useInkeepConfig as R } from "../providers/config-provider.js";
17
+ import { SourceItemProvider as j, useSourceItem as x } from "../providers/source-item-provider.js";
18
+ import { LinkWithQueryParams as Q } from "../atoms/link.js";
19
+ import { Markdown as W } from "../atoms/markdown/index.js";
20
+ import { useComposedRefs as I } from "../utils/compose-refs.js";
21
21
  import { composeEventHandlers as F } from "../utils/compose-event-handlers.js";
22
- import { transformInkeepSource as q } from "../utils/transform-source/index.js";
23
- const M = t("form", {
22
+ import { transformInkeepSource as $ } from "../utils/transform-source/index.js";
23
+ const G = t("form", {
24
24
  _id: "intelligentForm__Root"
25
- }), Ve = (i) => {
25
+ }), Ue = (i) => {
26
26
  const { onSubmit: e, ...n } = i, { handleSubmit: r } = s();
27
- return /* @__PURE__ */ o(M, { onSubmit: F(e, r), ...n });
28
- }, He = t("h2", {
27
+ return /* @__PURE__ */ o(G, { onSubmit: F(e, r), ...n });
28
+ }, je = t("h2", {
29
29
  _id: "intelligentForm__Heading",
30
30
  children: "Contact Support"
31
- }), Ee = t("div", {
31
+ }), Qe = t("div", {
32
32
  _id: "intelligentForm__Content"
33
- }), De = t(v.Root, {
33
+ }), We = t(p.Root, {
34
34
  _id: "intelligentForm__Content__ScrollArea"
35
- }), z = t(v.Viewport, {
35
+ }), J = t(p.Viewport, {
36
36
  _id: "intelligentForm__Content__ScrollAreaViewport"
37
- }), Ne = (i) => {
37
+ }), $e = (i) => {
38
38
  const { children: e, ...n } = i;
39
39
  return /* @__PURE__ */ o(
40
- z,
40
+ J,
41
41
  {
42
42
  children: (
43
43
  /* added this to fix an overflow issue see https://github.com/radix-ui/primitives/issues/926 */
@@ -46,86 +46,86 @@ const M = t("form", {
46
46
  ...n
47
47
  }
48
48
  );
49
- }, qe = t(
50
- v.ScrollAreaScrollbar,
49
+ }, Ge = t(
50
+ p.ScrollAreaScrollbar,
51
51
  {
52
52
  _id: "intelligentForm__Content__ScrollAreaScrollbar"
53
53
  }
54
- ), Me = t(
55
- v.ScrollAreaThumb,
54
+ ), Je = t(
55
+ p.ScrollAreaThumb,
56
56
  {
57
57
  _id: "intelligentForm__Content__ScrollAreaThumb"
58
58
  }
59
- ), ze = t(v.Corner, {
59
+ ), Ke = t(p.Corner, {
60
60
  _id: "intelligentForm__Content__ScrollAreaCorner"
61
- }), O = t("div", {
61
+ }), K = t("div", {
62
62
  _id: "intelligentForm__Success"
63
- }), Oe = (i) => {
63
+ }), Xe = (i) => {
64
64
  const { children: e, ...n } = i, { isSubmitSuccessful: r } = s();
65
- return r ? /* @__PURE__ */ o(O, { ...n, children: e }) : null;
66
- }, U = t(S, {
65
+ return r ? /* @__PURE__ */ o(K, { ...n, children: e }) : null;
66
+ }, X = t(g, {
67
67
  _id: "intelligentForm__SuccessIcon"
68
- }), Ue = (i) => {
68
+ }), Ye = (i) => {
69
69
  const {
70
70
  formSettings: { successView: e }
71
71
  } = s();
72
72
  return /* @__PURE__ */ o(
73
- U,
73
+ X,
74
74
  {
75
75
  iconSettings: e.icon ?? { builtIn: "LuCircleCheck" },
76
76
  ...i
77
77
  }
78
78
  );
79
- }, j = t("h2", {
79
+ }, Y = t("h2", {
80
80
  _id: "intelligentForm__SuccessHeading"
81
- }), je = (i) => {
81
+ }), Ze = (i) => {
82
82
  const {
83
83
  formSettings: { successView: e }
84
84
  } = s();
85
- return /* @__PURE__ */ o(j, { children: e.heading, ...i });
86
- }, Q = t("p", {
85
+ return /* @__PURE__ */ o(Y, { children: e.heading, ...i });
86
+ }, Z = t("p", {
87
87
  _id: "intelligentForm__SuccessMessage"
88
- }), Qe = (i) => {
88
+ }), ei = (i) => {
89
89
  const {
90
90
  formSettings: { successView: e }
91
91
  } = s();
92
- return /* @__PURE__ */ o(Q, { children: e.message, ...i });
93
- }, We = t("div", {
92
+ return /* @__PURE__ */ o(Z, { children: e.message, ...i });
93
+ }, ii = t("div", {
94
94
  _id: "intelligentForm__PrimaryForm"
95
- }), W = t("div", {
95
+ }), ee = t("div", {
96
96
  _id: "intelligentForm__PrimaryFormFields"
97
- }), $ = t("p", {
97
+ }), ie = t("p", {
98
98
  _id: "intelligentForm__PrimaryForm__Description"
99
- }), $e = (i) => {
99
+ }), ti = (i) => {
100
100
  const {
101
101
  formSettings: { primary: e }
102
102
  } = s();
103
- return e.description ? /* @__PURE__ */ o($, { children: e.description, ...i }) : null;
104
- }, Ge = (i) => {
103
+ return e.description ? /* @__PURE__ */ o(ie, { children: e.description, ...i }) : null;
104
+ }, ni = (i) => {
105
105
  const { children: e, ...n } = i, {
106
106
  formSettings: { primary: r }
107
107
  } = s();
108
- return /* @__PURE__ */ o(W, { children: b(e, r.fields), ...n });
109
- }, G = t("button", {
108
+ return /* @__PURE__ */ o(ee, { children: C(e, r.fields), ...n });
109
+ }, te = t("button", {
110
110
  _id: "intelligentForm__PrimaryFormSubmit",
111
111
  type: "button",
112
112
  children: "Next"
113
- }), Je = (i) => {
113
+ }), ri = (i) => {
114
114
  const { onClick: e, ...n } = i, { submittedPrimaryForm: r, handleSubmitPrimaryForm: l } = s();
115
115
  return /* @__PURE__ */ o(
116
- G,
116
+ te,
117
117
  {
118
118
  "data-submitted": a(r),
119
119
  onClick: F(e, l),
120
120
  ...n
121
121
  }
122
122
  );
123
- }, J = t("div", {
123
+ }, ne = t("div", {
124
124
  _id: "intelligentForm__Field"
125
- }), Ke = (i) => {
125
+ }), oi = (i) => {
126
126
  const { field: e, autoFocus: n, ...r } = i, { control: l, errors: c } = s();
127
127
  return /* @__PURE__ */ o(
128
- L,
128
+ z,
129
129
  {
130
130
  name: e.name,
131
131
  control: l,
@@ -135,14 +135,14 @@ const M = t("form", {
135
135
  render: ({ field: m }) => {
136
136
  const d = m.value !== void 0 || e.inputType === "file";
137
137
  return /* @__PURE__ */ o(
138
- V,
138
+ O,
139
139
  {
140
140
  "data-invalid": a(!!c[e.name]),
141
141
  field: e,
142
142
  fieldProps: m,
143
143
  autoFocus: n,
144
144
  children: d && /* @__PURE__ */ o(
145
- J,
145
+ ne,
146
146
  {
147
147
  "data-input-type": e.inputType,
148
148
  "data-hidden": a(e.isHidden),
@@ -154,12 +154,12 @@ const M = t("form", {
154
154
  }
155
155
  }
156
156
  );
157
- }, K = t("label", {
157
+ }, re = t("label", {
158
158
  _id: "intelligentForm__FieldLabel"
159
- }), Xe = (i) => {
160
- const { field: e } = _();
159
+ }), li = (i) => {
160
+ const { field: e } = u();
161
161
  return /* @__PURE__ */ o(
162
- K,
162
+ re,
163
163
  {
164
164
  "data-required": a(e.isRequired),
165
165
  htmlFor: e.name,
@@ -167,10 +167,10 @@ const M = t("form", {
167
167
  ...i
168
168
  }
169
169
  );
170
- }, X = t("input", {
170
+ }, oe = t("input", {
171
171
  _id: "intelligentForm__FieldText",
172
172
  type: "text"
173
- }), k = I((i, e) => {
173
+ }), T = v((i, e) => {
174
174
  const {
175
175
  field: n,
176
176
  error: r,
@@ -180,71 +180,71 @@ const M = t("form", {
180
180
  ref: m,
181
181
  ...d
182
182
  },
183
- autoFocus: p
184
- } = _(), g = P(
183
+ autoFocus: S
184
+ } = u(), _ = I(
185
185
  e,
186
186
  m
187
187
  );
188
188
  return /* @__PURE__ */ o(
189
- X,
189
+ oe,
190
190
  {
191
191
  asChild: n.inputType === "textarea",
192
- ref: g,
192
+ ref: _,
193
193
  id: n.name,
194
- autoFocus: p,
194
+ autoFocus: S,
195
195
  placeholder: "placeholder" in n ? n.placeholder : void 0,
196
196
  "data-invalid": a(!!r),
197
197
  onChange: F(i.onChange, l),
198
198
  onBlur: F(i.onBlur, c),
199
199
  ...d,
200
200
  ...i,
201
- children: n.inputType === "textarea" ? /* @__PURE__ */ o(w, { minRows: 3, maxRows: 10 }) : null
201
+ children: n.inputType === "textarea" ? /* @__PURE__ */ o(y, { minRows: 3, maxRows: 10 }) : null
202
202
  }
203
203
  );
204
- }), Ye = t(k, {
204
+ }), si = t(T, {
205
205
  _id: "intelligentForm__FieldEmail",
206
206
  type: "email"
207
- }), Y = t("input", {
207
+ }), le = t("input", {
208
208
  _id: "intelligentForm__FieldFile",
209
209
  type: "file",
210
210
  multiple: !0
211
- }), Ze = (i) => {
211
+ }), ci = (i) => {
212
212
  const {
213
213
  field: e,
214
214
  error: n,
215
215
  fieldProps: { value: r, onChange: l, onBlur: c, ...m },
216
216
  autoFocus: d
217
- } = _(), { onChange: p, onBlur: g, ...y } = i, f = (B) => {
218
- const A = B.target.files;
219
- l(A);
217
+ } = u(), { onChange: S, onBlur: _, ...b } = i, P = (k) => {
218
+ const B = k.target.files;
219
+ l(B);
220
220
  };
221
221
  return /* @__PURE__ */ o(
222
- Y,
222
+ le,
223
223
  {
224
224
  id: e.name,
225
225
  autoFocus: d,
226
226
  "data-value": r,
227
227
  "data-invalid": a(!!n),
228
- ...y,
228
+ ...b,
229
229
  ...m,
230
- onChange: F(p, f),
231
- onBlur: F(g, c)
230
+ onChange: F(S, P),
231
+ onBlur: F(_, c)
232
232
  }
233
233
  );
234
- }, ei = t(
235
- k,
234
+ }, mi = t(
235
+ T,
236
236
  {
237
237
  _id: "intelligentForm__FieldTextArea",
238
238
  type: "textarea",
239
239
  asChild: !0,
240
- children: /* @__PURE__ */ o(w, { rows: 1, maxRows: 8 })
240
+ children: /* @__PURE__ */ o(y, { rows: 1, maxRows: 8 })
241
241
  }
242
- ), Z = t(R.Root, {
242
+ ), se = t(w.Root, {
243
243
  _id: "intelligentForm__FieldCheckbox"
244
- }), ii = (i) => {
245
- const { field: e, error: n, fieldProps: r, autoFocus: l } = _(), { onCheckedChange: c, ...m } = i;
244
+ }), di = (i) => {
245
+ const { field: e, error: n, fieldProps: r, autoFocus: l } = u(), { onCheckedChange: c, ...m } = i;
246
246
  return /* @__PURE__ */ o(
247
- Z,
247
+ se,
248
248
  {
249
249
  id: e.name,
250
250
  name: e.name,
@@ -255,15 +255,15 @@ const M = t("form", {
255
255
  ...m
256
256
  }
257
257
  );
258
- }, ti = t(R.Indicator, {
258
+ }, ai = t(w.Indicator, {
259
259
  _id: "intelligentForm__FieldCheckboxIndicator",
260
- children: /* @__PURE__ */ o(H, {})
261
- }), ee = t(u.Root, {
260
+ children: /* @__PURE__ */ o(U, {})
261
+ }), ce = t(q, {
262
262
  _id: "intelligentForm__FieldSelect"
263
- }), ni = (i) => {
264
- const { field: e, error: n, fieldProps: r } = _(), { onValueChange: l, ...c } = i;
263
+ }), Fi = (i) => {
264
+ const { field: e, error: n, fieldProps: r } = u(), { onValueChange: l, ...c } = i;
265
265
  return /* @__PURE__ */ o(
266
- ee,
266
+ ce,
267
267
  {
268
268
  name: e.name,
269
269
  "data-invalid": a(!!n),
@@ -272,118 +272,118 @@ const M = t("form", {
272
272
  ...c
273
273
  }
274
274
  );
275
- }, ri = t(u.Trigger, {
275
+ }, ui = t(A, {
276
276
  _id: "intelligentForm__FieldSelect__Trigger"
277
- }), ie = t(u.Value, {
277
+ }), me = t(M, {
278
278
  _id: "intelligentForm__FieldSelect__Value"
279
- }), oi = (i) => {
280
- const { field: e } = _();
279
+ }), _i = (i) => {
280
+ const { field: e } = u();
281
281
  return /* @__PURE__ */ o(
282
- ie,
282
+ me,
283
283
  {
284
284
  placeholder: "placeholder" in e ? e.placeholder : void 0,
285
285
  ...i
286
286
  }
287
287
  );
288
- }, li = t(u.Icon, {
288
+ }, gi = t(L, {
289
289
  _id: "intelligentForm__FieldSelect__Icon",
290
290
  asChild: !0,
291
- children: /* @__PURE__ */ o(S, { iconSettings: { builtIn: "LuChevronDown" } })
292
- }), si = t(u.Content, {
291
+ children: /* @__PURE__ */ o(g, { iconSettings: { builtIn: "LuChevronDown" } })
292
+ }), Si = t(V, {
293
293
  _id: "intelligentForm__FieldSelect__Content",
294
294
  position: "popper"
295
- }), ci = t(u.Viewport, {
295
+ }), pi = t(H, {
296
296
  _id: "intelligentForm__FieldSelect__Viewport"
297
- }), mi = t(u.Item, {
297
+ }), vi = t(E, {
298
298
  _id: "intelligentForm__FieldSelect__Item"
299
- }), di = t(u.ItemText, {
299
+ }), Ii = t(D, {
300
300
  _id: "intelligentForm__FieldSelect__ItemText"
301
- }), ai = t(
302
- u.ItemIndicator,
301
+ }), Pi = t(
302
+ N,
303
303
  {
304
304
  _id: "intelligentForm__FieldSelect__ItemIndicator",
305
305
  asChild: !0,
306
- children: /* @__PURE__ */ o(S, { iconSettings: { builtIn: "LuCheck" } })
306
+ children: /* @__PURE__ */ o(g, { iconSettings: { builtIn: "LuCheck" } })
307
307
  }
308
- ), te = t("span", {
308
+ ), de = t("span", {
309
309
  _id: "intelligentForm__FieldError"
310
- }), Fi = (i) => {
311
- const { error: e } = _();
312
- return e ? /* @__PURE__ */ o(te, { children: e.message?.toString(), ...i }) : null;
313
- }, ui = t("div", {
310
+ }), fi = (i) => {
311
+ const { error: e } = u();
312
+ return e ? /* @__PURE__ */ o(de, { children: e.message?.toString(), ...i }) : null;
313
+ }, hi = t("div", {
314
314
  _id: "intelligentForm__BotHeading"
315
- }), _i = t(S, {
315
+ }), Ci = t(g, {
316
316
  _id: "intelligentForm__BotHeading__Icon",
317
317
  iconSettings: { builtIn: "LuSparkles" }
318
- }), ne = t("div", {
318
+ }), ae = t("div", {
319
319
  _id: "intelligentForm__BotHeading__Name"
320
- }), gi = (i) => {
321
- const { baseSettings: e } = x(), { organizationDisplayName: n } = e ?? {}, {
320
+ }), bi = (i) => {
321
+ const { baseSettings: e } = R(), { organizationDisplayName: n } = e ?? {}, {
322
322
  formSettings: { aiAssistantName: r }
323
323
  } = s();
324
- return /* @__PURE__ */ o(ne, { children: r ?? n, ...i });
325
- }, re = t("div", {
324
+ return /* @__PURE__ */ o(ae, { children: r ?? n, ...i });
325
+ }, Fe = t("div", {
326
326
  _id: "intelligentForm__Loading"
327
- }), Si = I(({ ...i }, e) => {
328
- const { loading: n } = s(), r = h(null), l = P(e, r);
329
- return C(() => {
327
+ }), yi = v(({ ...i }, e) => {
328
+ const { loading: n } = s(), r = f(null), l = I(e, r);
329
+ return h(() => {
330
330
  n && r.current && r.current.scrollIntoView({
331
331
  behavior: "smooth",
332
332
  block: "nearest",
333
333
  inline: "nearest"
334
334
  });
335
- }, [n]), n ? /* @__PURE__ */ o(re, { ref: l, ...i }) : null;
336
- }), oe = t("div", {
335
+ }, [n]), n ? /* @__PURE__ */ o(Fe, { ref: l, ...i }) : null;
336
+ }), ue = t("div", {
337
337
  _id: "intelligentForm__ConfidentResponse"
338
- }), pi = I(({ ...i }, e) => {
339
- const { aiResponse: n, loading: r } = s(), l = h(null), c = P(e, l);
340
- return C(() => {
338
+ }), wi = v(({ ...i }, e) => {
339
+ const { aiResponse: n, loading: r } = s(), l = f(null), c = I(e, l);
340
+ return h(() => {
341
341
  !r && n.answerConfidence && l.current && l.current.scrollIntoView({
342
342
  behavior: "smooth",
343
343
  block: "nearest",
344
344
  inline: "nearest"
345
345
  });
346
- }, [r, n.answerConfidence]), n.answerConfidence ? /* @__PURE__ */ o(oe, { ref: c, ...i }) : null;
347
- }), le = t(N, {
346
+ }, [r, n.answerConfidence]), n.answerConfidence ? /* @__PURE__ */ o(ue, { ref: c, ...i }) : null;
347
+ }), _e = t(W, {
348
348
  _id: "intelligentForm__ConfidentAnswer"
349
- }), vi = (i) => {
349
+ }), Ri = (i) => {
350
350
  const { aiResponse: e } = s();
351
- return /* @__PURE__ */ o(le, { shouldOpenLinksInNewTab: !0, children: e.answer, ...i });
352
- }, se = t("button", {
351
+ return /* @__PURE__ */ o(_e, { shouldOpenLinksInNewTab: !0, children: e.answer, ...i });
352
+ }, ge = t("button", {
353
353
  _id: "intelligentForm__ConfidentResponseButton",
354
354
  type: "button"
355
- }), Ii = (i) => {
355
+ }), xi = (i) => {
356
356
  const { onClick: e, ...n } = i, { showSecondaryFields: r, setShowSecondaryFields: l } = s(), c = () => {
357
357
  l(!0);
358
358
  };
359
359
  return /* @__PURE__ */ o(
360
- se,
360
+ ge,
361
361
  {
362
362
  "data-escalated": a(r),
363
363
  onClick: F(e, c),
364
364
  ...n
365
365
  }
366
366
  );
367
- }, Pi = t(S, {
367
+ }, Ti = t(g, {
368
368
  _id: "intelligentForm__ConfidentResponseButton__Icon",
369
369
  iconSettings: { builtIn: "LuUser" }
370
- }), fi = t("span", {
370
+ }), ki = t("span", {
371
371
  _id: "intelligentForm__ConfidentResponseButton__Label",
372
372
  children: "Escalate to human"
373
- }), ce = t("div", {
373
+ }), Se = t("div", {
374
374
  _id: "intelligentForm__SecondaryForm"
375
- }), hi = I(({ ...i }, e) => {
376
- const { showSecondaryFields: n } = s(), r = h(null), l = P(e, r);
377
- return C(() => {
375
+ }), Bi = v(({ ...i }, e) => {
376
+ const { showSecondaryFields: n } = s(), r = f(null), l = I(e, r);
377
+ return h(() => {
378
378
  n && r.current && r.current.scrollIntoView({
379
379
  behavior: "smooth",
380
380
  block: "nearest",
381
381
  inline: "nearest"
382
382
  });
383
- }, [n]), n ? /* @__PURE__ */ o(ce, { ref: l, ...i }) : null;
384
- }), me = t("p", {
383
+ }, [n]), n ? /* @__PURE__ */ o(Se, { ref: l, ...i }) : null;
384
+ }), pe = t("p", {
385
385
  _id: "intelligentForm__SecondaryForm__Description"
386
- }), Ci = (i) => {
386
+ }), Ai = (i) => {
387
387
  const {
388
388
  formSettings: { secondary: e },
389
389
  aiResponse: { answerConfidence: n }
@@ -393,54 +393,54 @@ const M = t("form", {
393
393
  // If description is an object, use the confident description if the answer is confident
394
394
  n ? e.description.confident : e.description.default
395
395
  );
396
- return /* @__PURE__ */ o(me, { children: r, ...i });
397
- }, de = t("div", {
396
+ return /* @__PURE__ */ o(pe, { children: r, ...i });
397
+ }, ve = t("div", {
398
398
  _id: "intelligentForm__SecondaryFormFields"
399
- }), bi = (i) => {
399
+ }), Li = (i) => {
400
400
  const { children: e, ...n } = i, {
401
401
  formSettings: { secondary: r }
402
402
  } = s();
403
- return /* @__PURE__ */ o(de, { children: b(e, r.fields), ...n });
404
- }, ae = t("button", {
403
+ return /* @__PURE__ */ o(ve, { children: C(e, r.fields), ...n });
404
+ }, Ie = t("button", {
405
405
  _id: "intelligentForm__SecondaryFormSubmit",
406
406
  type: "submit",
407
407
  children: "Submit"
408
- }), yi = (i) => {
408
+ }), Vi = (i) => {
409
409
  const { formSettings: e } = s(), { label: n } = e.buttons.submit;
410
- return /* @__PURE__ */ o(ae, { children: n ?? "Submit", ...i });
411
- }, Fe = t("span", {
410
+ return /* @__PURE__ */ o(Ie, { children: n ?? "Submit", ...i });
411
+ }, Pe = t("span", {
412
412
  _id: "intelligentForm__Error"
413
- }), wi = (i) => {
413
+ }), Hi = (i) => {
414
414
  const { formError: e } = s();
415
- return e ? /* @__PURE__ */ o(Fe, { children: e.message, ...i }) : null;
416
- }, Ri = t("div", {
415
+ return e ? /* @__PURE__ */ o(Pe, { children: e.message, ...i }) : null;
416
+ }, Ei = t("div", {
417
417
  _id: "intelligentForm__Sources"
418
- }), xi = t("p", {
418
+ }), Di = t("p", {
419
419
  _id: "intelligentForm__SourcesCaption",
420
420
  children: "Here are the sources I considered:"
421
- }), ue = t("div", {
421
+ }), fe = t("div", {
422
422
  _id: "intelligentForm__SourcesList"
423
- }), Ti = (i) => {
423
+ }), Ni = (i) => {
424
424
  const { children: e, ...n } = i, {
425
425
  baseSettings: { transformSource: r, organizationDisplayName: l }
426
- } = x(), {
426
+ } = R(), {
427
427
  aiResponse: { recordsConsidered: c }
428
428
  } = s();
429
429
  if (!c) return null;
430
- const m = c.reduce((d, p) => {
431
- const g = q(p, "intelligentFormSource", {
430
+ const m = c.reduce((d, S) => {
431
+ const _ = $(S, "intelligentFormSource", {
432
432
  organizationDisplayName: l,
433
433
  transformSource: r
434
434
  });
435
- return d.some((f) => f.url === g.url) || d.push(g), d;
435
+ return d.some((P) => P.url === _.url) || d.push(_), d;
436
436
  }, []);
437
- return /* @__PURE__ */ o(ue, { children: b(e, m), ...n });
438
- }, _e = t(D, {
437
+ return /* @__PURE__ */ o(fe, { children: C(e, m), ...n });
438
+ }, he = t(Q, {
439
439
  _id: "intelligentForm__Source"
440
- }), ki = (i) => {
440
+ }), qi = (i) => {
441
441
  const { source: e, ...n } = i;
442
- return /* @__PURE__ */ o(E, { source: { ...e, isExternal: !!e.shouldOpenInNewTab }, children: /* @__PURE__ */ o(
443
- _e,
442
+ return /* @__PURE__ */ o(j, { source: { ...e, isExternal: !!e.shouldOpenInNewTab }, children: /* @__PURE__ */ o(
443
+ he,
444
444
  {
445
445
  "data-type": e.type,
446
446
  appendToUrl: e.appendToUrl,
@@ -449,125 +449,125 @@ const M = t("form", {
449
449
  ...n
450
450
  }
451
451
  ) });
452
- }, ge = t(S, {
452
+ }, Ce = t(g, {
453
453
  _id: "intelligentForm__SourceIcon"
454
- }), Bi = (i) => {
455
- const { source: e } = T();
456
- return /* @__PURE__ */ o(ge, { iconSettings: e.icon, "data-type": e.type, ...i });
457
- }, Se = t("span", {
454
+ }), Mi = (i) => {
455
+ const { source: e } = x();
456
+ return /* @__PURE__ */ o(Ce, { iconSettings: e.icon, "data-type": e.type, ...i });
457
+ }, be = t("span", {
458
458
  _id: "intelligentForm__SourceTitle"
459
- }), Ai = (i) => {
460
- const { source: e } = T();
461
- return /* @__PURE__ */ o(Se, { "data-type": e.type, children: e.title, ...i });
459
+ }), zi = (i) => {
460
+ const { source: e } = x();
461
+ return /* @__PURE__ */ o(be, { "data-type": e.type, children: e.title, ...i });
462
462
  };
463
463
  export {
464
- ui as BotHeading,
465
- _i as BotHeadingIcon,
466
- gi as BotHeadingName,
467
- vi as ConfidentAnswer,
468
- pi as ConfidentResponse,
469
- Ii as ConfidentResponseButton,
470
- Pi as ConfidentResponseButtonIcon,
471
- fi as ConfidentResponseButtonLabel,
472
- Ee as Content,
473
- De as ContentScrollArea,
474
- ze as ContentScrollAreaCorner,
475
- qe as ContentScrollAreaScrollbar,
476
- Me as ContentScrollAreaThumb,
477
- Ne as ContentScrollAreaViewport,
478
- wi as Error,
479
- Ke as FormField,
480
- ii as FormFieldCheckbox,
481
- ti as FormFieldCheckboxIndicator,
482
- Ye as FormFieldEmail,
483
- Fi as FormFieldError,
484
- Ze as FormFieldFile,
485
- Xe as FormFieldLabel,
486
- ni as FormFieldSelect,
487
- si as FormFieldSelectContent,
488
- li as FormFieldSelectIcon,
489
- mi as FormFieldSelectItem,
490
- ai as FormFieldSelectItemIndicator,
491
- di as FormFieldSelectItemText,
492
- ri as FormFieldSelectTrigger,
493
- oi as FormFieldSelectValue,
494
- ci as FormFieldSelectViewport,
495
- k as FormFieldText,
496
- ei as FormFieldTextArea,
497
- He as Heading,
498
- ui as IntelligentFormPrimitiveBotHeading,
499
- _i as IntelligentFormPrimitiveBotHeadingIcon,
500
- gi as IntelligentFormPrimitiveBotHeadingName,
501
- vi as IntelligentFormPrimitiveConfidentAnswer,
502
- pi as IntelligentFormPrimitiveConfidentResponse,
503
- Ii as IntelligentFormPrimitiveConfidentResponseButton,
504
- Pi as IntelligentFormPrimitiveConfidentResponseButtonIcon,
505
- fi as IntelligentFormPrimitiveConfidentResponseButtonLabel,
506
- Ee as IntelligentFormPrimitiveContent,
507
- De as IntelligentFormPrimitiveContentScrollArea,
508
- ze as IntelligentFormPrimitiveContentScrollAreaCorner,
509
- qe as IntelligentFormPrimitiveContentScrollAreaScrollbar,
510
- Me as IntelligentFormPrimitiveContentScrollAreaThumb,
511
- Ne as IntelligentFormPrimitiveContentScrollAreaViewport,
512
- wi as IntelligentFormPrimitiveFormError,
513
- Ke as IntelligentFormPrimitiveFormField,
514
- ii as IntelligentFormPrimitiveFormFieldCheckbox,
515
- ti as IntelligentFormPrimitiveFormFieldCheckboxIndicator,
516
- Ye as IntelligentFormPrimitiveFormFieldEmail,
517
- Fi as IntelligentFormPrimitiveFormFieldError,
518
- Ze as IntelligentFormPrimitiveFormFieldFile,
519
- Xe as IntelligentFormPrimitiveFormFieldLabel,
520
- ni as IntelligentFormPrimitiveFormFieldSelect,
521
- si as IntelligentFormPrimitiveFormFieldSelectContent,
522
- li as IntelligentFormPrimitiveFormFieldSelectIcon,
523
- mi as IntelligentFormPrimitiveFormFieldSelectItem,
524
- ai as IntelligentFormPrimitiveFormFieldSelectItemIndicator,
525
- di as IntelligentFormPrimitiveFormFieldSelectItemText,
526
- ri as IntelligentFormPrimitiveFormFieldSelectTrigger,
527
- oi as IntelligentFormPrimitiveFormFieldSelectValue,
528
- ci as IntelligentFormPrimitiveFormFieldSelectViewport,
529
- k as IntelligentFormPrimitiveFormFieldText,
530
- ei as IntelligentFormPrimitiveFormFieldTextArea,
531
- He as IntelligentFormPrimitiveHeading,
532
- Si as IntelligentFormPrimitiveLoading,
533
- We as IntelligentFormPrimitivePrimaryForm,
534
- $e as IntelligentFormPrimitivePrimaryFormDescription,
535
- Ge as IntelligentFormPrimitivePrimaryFormFields,
536
- Je as IntelligentFormPrimitivePrimaryFormSubmit,
537
- Ve as IntelligentFormPrimitiveRoot,
538
- hi as IntelligentFormPrimitiveSecondaryForm,
539
- Ci as IntelligentFormPrimitiveSecondaryFormDescription,
540
- bi as IntelligentFormPrimitiveSecondaryFormFields,
541
- yi as IntelligentFormPrimitiveSecondaryFormSubmit,
542
- ki as IntelligentFormPrimitiveSource,
543
- Bi as IntelligentFormPrimitiveSourceIcon,
544
- Ai as IntelligentFormPrimitiveSourceTitle,
545
- Ri as IntelligentFormPrimitiveSources,
546
- xi as IntelligentFormPrimitiveSourcesCaption,
547
- Ti as IntelligentFormPrimitiveSourcesList,
548
- Oe as IntelligentFormPrimitiveSuccess,
549
- je as IntelligentFormPrimitiveSuccessHeading,
550
- Ue as IntelligentFormPrimitiveSuccessIcon,
551
- Qe as IntelligentFormPrimitiveSuccessMessage,
552
- Si as Loading,
553
- We as PrimaryForm,
554
- $e as PrimaryFormDescription,
555
- Ge as PrimaryFormFields,
556
- Je as PrimaryFormSubmit,
557
- Hi as Provider,
558
- Ve as Root,
559
- hi as SecondaryForm,
560
- Ci as SecondaryFormDescription,
561
- bi as SecondaryFormFields,
562
- yi as SecondaryFormSubmit,
563
- ki as Source,
564
- Bi as SourceIcon,
565
- Ai as SourceTitle,
566
- Ri as Sources,
567
- xi as SourcesCaption,
568
- Ti as SourcesList,
569
- Oe as Success,
570
- je as SuccessHeading,
571
- Ue as SuccessIcon,
572
- Qe as SuccessMessage
464
+ hi as BotHeading,
465
+ Ci as BotHeadingIcon,
466
+ bi as BotHeadingName,
467
+ Ri as ConfidentAnswer,
468
+ wi as ConfidentResponse,
469
+ xi as ConfidentResponseButton,
470
+ Ti as ConfidentResponseButtonIcon,
471
+ ki as ConfidentResponseButtonLabel,
472
+ Qe as Content,
473
+ We as ContentScrollArea,
474
+ Ke as ContentScrollAreaCorner,
475
+ Ge as ContentScrollAreaScrollbar,
476
+ Je as ContentScrollAreaThumb,
477
+ $e as ContentScrollAreaViewport,
478
+ Hi as Error,
479
+ oi as FormField,
480
+ di as FormFieldCheckbox,
481
+ ai as FormFieldCheckboxIndicator,
482
+ si as FormFieldEmail,
483
+ fi as FormFieldError,
484
+ ci as FormFieldFile,
485
+ li as FormFieldLabel,
486
+ Fi as FormFieldSelect,
487
+ Si as FormFieldSelectContent,
488
+ gi as FormFieldSelectIcon,
489
+ vi as FormFieldSelectItem,
490
+ Pi as FormFieldSelectItemIndicator,
491
+ Ii as FormFieldSelectItemText,
492
+ ui as FormFieldSelectTrigger,
493
+ _i as FormFieldSelectValue,
494
+ pi as FormFieldSelectViewport,
495
+ T as FormFieldText,
496
+ mi as FormFieldTextArea,
497
+ je as Heading,
498
+ hi as IntelligentFormPrimitiveBotHeading,
499
+ Ci as IntelligentFormPrimitiveBotHeadingIcon,
500
+ bi as IntelligentFormPrimitiveBotHeadingName,
501
+ Ri as IntelligentFormPrimitiveConfidentAnswer,
502
+ wi as IntelligentFormPrimitiveConfidentResponse,
503
+ xi as IntelligentFormPrimitiveConfidentResponseButton,
504
+ Ti as IntelligentFormPrimitiveConfidentResponseButtonIcon,
505
+ ki as IntelligentFormPrimitiveConfidentResponseButtonLabel,
506
+ Qe as IntelligentFormPrimitiveContent,
507
+ We as IntelligentFormPrimitiveContentScrollArea,
508
+ Ke as IntelligentFormPrimitiveContentScrollAreaCorner,
509
+ Ge as IntelligentFormPrimitiveContentScrollAreaScrollbar,
510
+ Je as IntelligentFormPrimitiveContentScrollAreaThumb,
511
+ $e as IntelligentFormPrimitiveContentScrollAreaViewport,
512
+ Hi as IntelligentFormPrimitiveFormError,
513
+ oi as IntelligentFormPrimitiveFormField,
514
+ di as IntelligentFormPrimitiveFormFieldCheckbox,
515
+ ai as IntelligentFormPrimitiveFormFieldCheckboxIndicator,
516
+ si as IntelligentFormPrimitiveFormFieldEmail,
517
+ fi as IntelligentFormPrimitiveFormFieldError,
518
+ ci as IntelligentFormPrimitiveFormFieldFile,
519
+ li as IntelligentFormPrimitiveFormFieldLabel,
520
+ Fi as IntelligentFormPrimitiveFormFieldSelect,
521
+ Si as IntelligentFormPrimitiveFormFieldSelectContent,
522
+ gi as IntelligentFormPrimitiveFormFieldSelectIcon,
523
+ vi as IntelligentFormPrimitiveFormFieldSelectItem,
524
+ Pi as IntelligentFormPrimitiveFormFieldSelectItemIndicator,
525
+ Ii as IntelligentFormPrimitiveFormFieldSelectItemText,
526
+ ui as IntelligentFormPrimitiveFormFieldSelectTrigger,
527
+ _i as IntelligentFormPrimitiveFormFieldSelectValue,
528
+ pi as IntelligentFormPrimitiveFormFieldSelectViewport,
529
+ T as IntelligentFormPrimitiveFormFieldText,
530
+ mi as IntelligentFormPrimitiveFormFieldTextArea,
531
+ je as IntelligentFormPrimitiveHeading,
532
+ yi as IntelligentFormPrimitiveLoading,
533
+ ii as IntelligentFormPrimitivePrimaryForm,
534
+ ti as IntelligentFormPrimitivePrimaryFormDescription,
535
+ ni as IntelligentFormPrimitivePrimaryFormFields,
536
+ ri as IntelligentFormPrimitivePrimaryFormSubmit,
537
+ Ue as IntelligentFormPrimitiveRoot,
538
+ Bi as IntelligentFormPrimitiveSecondaryForm,
539
+ Ai as IntelligentFormPrimitiveSecondaryFormDescription,
540
+ Li as IntelligentFormPrimitiveSecondaryFormFields,
541
+ Vi as IntelligentFormPrimitiveSecondaryFormSubmit,
542
+ qi as IntelligentFormPrimitiveSource,
543
+ Mi as IntelligentFormPrimitiveSourceIcon,
544
+ zi as IntelligentFormPrimitiveSourceTitle,
545
+ Ei as IntelligentFormPrimitiveSources,
546
+ Di as IntelligentFormPrimitiveSourcesCaption,
547
+ Ni as IntelligentFormPrimitiveSourcesList,
548
+ Xe as IntelligentFormPrimitiveSuccess,
549
+ Ze as IntelligentFormPrimitiveSuccessHeading,
550
+ Ye as IntelligentFormPrimitiveSuccessIcon,
551
+ ei as IntelligentFormPrimitiveSuccessMessage,
552
+ yi as Loading,
553
+ ii as PrimaryForm,
554
+ ti as PrimaryFormDescription,
555
+ ni as PrimaryFormFields,
556
+ ri as PrimaryFormSubmit,
557
+ ji as Provider,
558
+ Ue as Root,
559
+ Bi as SecondaryForm,
560
+ Ai as SecondaryFormDescription,
561
+ Li as SecondaryFormFields,
562
+ Vi as SecondaryFormSubmit,
563
+ qi as Source,
564
+ Mi as SourceIcon,
565
+ zi as SourceTitle,
566
+ Ei as Sources,
567
+ Di as SourcesCaption,
568
+ Ni as SourcesList,
569
+ Xe as Success,
570
+ Ze as SuccessHeading,
571
+ Ye as SuccessIcon,
572
+ ei as SuccessMessage
573
573
  };