@bikdotai/bik-component-library 0.0.866 → 0.0.867

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 (137) hide show
  1. package/dist/cjs/components/agent-builder/AgentBuilder.js +1 -1
  2. package/dist/cjs/components/agent-builder/AgentBuilder.js.map +1 -1
  3. package/dist/cjs/components/agent-builder/AgentBuilder.styled.js +151 -29
  4. package/dist/cjs/components/agent-builder/AgentBuilder.styled.js.map +1 -1
  5. package/dist/cjs/components/agent-builder/components/ChannelSelectModal.js +2 -0
  6. package/dist/cjs/components/agent-builder/components/ChannelSelectModal.js.map +1 -0
  7. package/dist/cjs/components/agent-builder/components/ChannelsSection.js +2 -0
  8. package/dist/cjs/components/agent-builder/components/ChannelsSection.js.map +1 -0
  9. package/dist/cjs/components/agent-builder/components/CreateSubAgentPanel.js +5 -5
  10. package/dist/cjs/components/agent-builder/components/CreateSubAgentPanel.js.map +1 -1
  11. package/dist/cjs/components/agent-builder/components/GoLiveModal.js +1 -1
  12. package/dist/cjs/components/agent-builder/components/GoLiveModal.js.map +1 -1
  13. package/dist/cjs/components/agent-builder/components/MentionEditor.js +2 -2
  14. package/dist/cjs/components/agent-builder/components/MentionEditor.js.map +1 -1
  15. package/dist/cjs/components/agent-builder/components/MentionField.js +1 -1
  16. package/dist/cjs/components/agent-builder/components/MentionField.js.map +1 -1
  17. package/dist/cjs/components/agent-builder/components/MentionPicker.js +13 -13
  18. package/dist/cjs/components/agent-builder/components/MentionPicker.js.map +1 -1
  19. package/dist/cjs/components/agent-builder/components/SelectableListSection.js +3 -3
  20. package/dist/cjs/components/agent-builder/components/SelectableListSection.js.map +1 -1
  21. package/dist/cjs/components/agent-builder/constants/channels.js +2 -0
  22. package/dist/cjs/components/agent-builder/constants/channels.js.map +1 -0
  23. package/dist/cjs/components/agent-builder/constants/steps.js +1 -1
  24. package/dist/cjs/components/agent-builder/constants/steps.js.map +1 -1
  25. package/dist/cjs/components/agent-builder/context/AgentBuilderContext.js +1 -1
  26. package/dist/cjs/components/agent-builder/context/AgentBuilderContext.js.map +1 -1
  27. package/dist/cjs/components/agent-builder/steps/Step1About.js +1 -1
  28. package/dist/cjs/components/agent-builder/steps/Step1About.js.map +1 -1
  29. package/dist/cjs/components/agent-builder/steps/Step2WhenItStepsIn.js +2 -2
  30. package/dist/cjs/components/agent-builder/steps/Step2WhenItStepsIn.js.map +1 -1
  31. package/dist/cjs/components/agent-builder/steps/Step3HowItResponds.js +1 -1
  32. package/dist/cjs/components/agent-builder/steps/Step3HowItResponds.js.map +1 -1
  33. package/dist/cjs/components/agent-builder/steps/Step4HandoverRules.js +1 -1
  34. package/dist/cjs/components/agent-builder/steps/Step4HandoverRules.js.map +1 -1
  35. package/dist/cjs/components/agent-builder/utils/mentionSerialization.js +2 -2
  36. package/dist/cjs/components/agent-builder/utils/mentionSerialization.js.map +1 -1
  37. package/dist/cjs/components/agent-builder/utils/sourceIcons.js +1 -1
  38. package/dist/cjs/components/agent-builder/utils/sourceIcons.js.map +1 -1
  39. package/dist/cjs/icons/Social/Channels/ManifestGlass.js +2 -0
  40. package/dist/cjs/icons/Social/Channels/ManifestGlass.js.map +1 -0
  41. package/dist/cjs/icons/Social/Channels/ShipStation.js +2 -0
  42. package/dist/cjs/icons/Social/Channels/ShipStation.js.map +1 -0
  43. package/dist/cjs/icons/Social/Channels/Skio.js +2 -0
  44. package/dist/cjs/icons/Social/Channels/Skio.js.map +1 -0
  45. package/dist/cjs/icons/index.js +1 -1
  46. package/dist/cjs/index.js +1 -1
  47. package/dist/esm/components/agent-builder/AgentBuilder.js +103 -97
  48. package/dist/esm/components/agent-builder/AgentBuilder.js.map +1 -1
  49. package/dist/esm/components/agent-builder/AgentBuilder.model.d.ts +76 -0
  50. package/dist/esm/components/agent-builder/AgentBuilder.styled.d.ts +68 -0
  51. package/dist/esm/components/agent-builder/AgentBuilder.styled.js +224 -59
  52. package/dist/esm/components/agent-builder/AgentBuilder.styled.js.map +1 -1
  53. package/dist/esm/components/agent-builder/components/ChannelSelectModal.d.ts +26 -0
  54. package/dist/esm/components/agent-builder/components/ChannelSelectModal.js +121 -0
  55. package/dist/esm/components/agent-builder/components/ChannelSelectModal.js.map +1 -0
  56. package/dist/esm/components/agent-builder/components/ChannelsSection.d.ts +10 -0
  57. package/dist/esm/components/agent-builder/components/ChannelsSection.js +183 -0
  58. package/dist/esm/components/agent-builder/components/ChannelsSection.js.map +1 -0
  59. package/dist/esm/components/agent-builder/components/CreateSubAgentPanel.js +135 -132
  60. package/dist/esm/components/agent-builder/components/CreateSubAgentPanel.js.map +1 -1
  61. package/dist/esm/components/agent-builder/components/GoLiveModal.js +12 -12
  62. package/dist/esm/components/agent-builder/components/GoLiveModal.js.map +1 -1
  63. package/dist/esm/components/agent-builder/components/MentionEditor.d.ts +2 -0
  64. package/dist/esm/components/agent-builder/components/MentionEditor.js +47 -45
  65. package/dist/esm/components/agent-builder/components/MentionEditor.js.map +1 -1
  66. package/dist/esm/components/agent-builder/components/MentionField.js +52 -51
  67. package/dist/esm/components/agent-builder/components/MentionField.js.map +1 -1
  68. package/dist/esm/components/agent-builder/components/MentionPicker.d.ts +5 -0
  69. package/dist/esm/components/agent-builder/components/MentionPicker.js +134 -132
  70. package/dist/esm/components/agent-builder/components/MentionPicker.js.map +1 -1
  71. package/dist/esm/components/agent-builder/components/SelectableListSection.d.ts +2 -0
  72. package/dist/esm/components/agent-builder/components/SelectableListSection.js +48 -46
  73. package/dist/esm/components/agent-builder/components/SelectableListSection.js.map +1 -1
  74. package/dist/esm/components/agent-builder/constants/channels.d.ts +56 -0
  75. package/dist/esm/components/agent-builder/constants/channels.js +41 -0
  76. package/dist/esm/components/agent-builder/constants/channels.js.map +1 -0
  77. package/dist/esm/components/agent-builder/constants/steps.d.ts +31 -1
  78. package/dist/esm/components/agent-builder/constants/steps.js +15 -6
  79. package/dist/esm/components/agent-builder/constants/steps.js.map +1 -1
  80. package/dist/esm/components/agent-builder/context/AgentBuilderContext.d.ts +13 -1
  81. package/dist/esm/components/agent-builder/context/AgentBuilderContext.js +157 -148
  82. package/dist/esm/components/agent-builder/context/AgentBuilderContext.js.map +1 -1
  83. package/dist/esm/components/agent-builder/index.d.ts +5 -2
  84. package/dist/esm/components/agent-builder/steps/Step1About.js +15 -13
  85. package/dist/esm/components/agent-builder/steps/Step1About.js.map +1 -1
  86. package/dist/esm/components/agent-builder/steps/Step2WhenItStepsIn.js +55 -48
  87. package/dist/esm/components/agent-builder/steps/Step2WhenItStepsIn.js.map +1 -1
  88. package/dist/esm/components/agent-builder/steps/Step3HowItResponds.js +158 -157
  89. package/dist/esm/components/agent-builder/steps/Step3HowItResponds.js.map +1 -1
  90. package/dist/esm/components/agent-builder/steps/Step4HandoverRules.d.ts +11 -0
  91. package/dist/esm/components/agent-builder/steps/Step4HandoverRules.js +127 -23
  92. package/dist/esm/components/agent-builder/steps/Step4HandoverRules.js.map +1 -1
  93. package/dist/esm/components/agent-builder/utils/mentionSerialization.d.ts +10 -3
  94. package/dist/esm/components/agent-builder/utils/mentionSerialization.js +31 -23
  95. package/dist/esm/components/agent-builder/utils/mentionSerialization.js.map +1 -1
  96. package/dist/esm/components/agent-builder/utils/sourceIcons.d.ts +7 -5
  97. package/dist/esm/components/agent-builder/utils/sourceIcons.js +26 -26
  98. package/dist/esm/components/agent-builder/utils/sourceIcons.js.map +1 -1
  99. package/dist/esm/icons/Social/Channels/ManifestGlass.d.ts +6 -0
  100. package/dist/esm/icons/Social/Channels/ManifestGlass.js +252 -0
  101. package/dist/esm/icons/Social/Channels/ManifestGlass.js.map +1 -0
  102. package/dist/esm/icons/Social/Channels/ShipStation.d.ts +6 -0
  103. package/dist/esm/icons/Social/Channels/ShipStation.js +31 -0
  104. package/dist/esm/icons/Social/Channels/ShipStation.js.map +1 -0
  105. package/dist/esm/icons/Social/Channels/Skio.d.ts +6 -0
  106. package/dist/{cjs/assets/icons/Skio.svg.js → esm/icons/Social/Channels/Skio.js} +31 -2
  107. package/dist/esm/icons/Social/Channels/Skio.js.map +1 -0
  108. package/dist/esm/icons/Social/Channels/index.d.ts +3 -0
  109. package/dist/esm/icons/index.d.ts +25 -25
  110. package/dist/esm/icons/index.js +330 -324
  111. package/dist/esm/icons/index.js.map +1 -1
  112. package/dist/esm/index.js +671 -663
  113. package/dist/esm/index.js.map +1 -1
  114. package/package.json +1 -1
  115. package/dist/cjs/assets/icons/BigCommerce.svg.js +0 -2
  116. package/dist/cjs/assets/icons/BigCommerce.svg.js.map +0 -1
  117. package/dist/cjs/assets/icons/Gorgias.svg.js +0 -2
  118. package/dist/cjs/assets/icons/Gorgias.svg.js.map +0 -1
  119. package/dist/cjs/assets/icons/ManifestGlass.svg.js +0 -2
  120. package/dist/cjs/assets/icons/ManifestGlass.svg.js.map +0 -1
  121. package/dist/cjs/assets/icons/ShipStation.svg.js +0 -2
  122. package/dist/cjs/assets/icons/ShipStation.svg.js.map +0 -1
  123. package/dist/cjs/assets/icons/Shopify.svg.js +0 -2
  124. package/dist/cjs/assets/icons/Shopify.svg.js.map +0 -1
  125. package/dist/cjs/assets/icons/Skio.svg.js.map +0 -1
  126. package/dist/esm/assets/icons/BigCommerce.svg.js +0 -6
  127. package/dist/esm/assets/icons/BigCommerce.svg.js.map +0 -1
  128. package/dist/esm/assets/icons/Gorgias.svg.js +0 -6
  129. package/dist/esm/assets/icons/Gorgias.svg.js.map +0 -1
  130. package/dist/esm/assets/icons/ManifestGlass.svg.js +0 -6
  131. package/dist/esm/assets/icons/ManifestGlass.svg.js.map +0 -1
  132. package/dist/esm/assets/icons/ShipStation.svg.js +0 -6
  133. package/dist/esm/assets/icons/ShipStation.svg.js.map +0 -1
  134. package/dist/esm/assets/icons/Shopify.svg.js +0 -6
  135. package/dist/esm/assets/icons/Shopify.svg.js.map +0 -1
  136. package/dist/esm/assets/icons/Skio.svg.js +0 -6
  137. package/dist/esm/assets/icons/Skio.svg.js.map +0 -1
@@ -1,20 +1,21 @@
1
1
  import { jsxs as o, jsx as n } from "react/jsx-runtime";
2
- import T from "../../../assets/icons/cross.svg.js";
3
- import _ from "../../../assets/icons/plus.svg.js";
4
- import x from "styled-components";
5
- import { DropdownPopover as w } from "../../dropdown/DropdownPopover/index.js";
6
- import { RadioButton as h } from "../../radioButton/RadioButton.js";
7
- import { TitleSmall as c, BodyCaption as l } from "../../TypographyStyle.js";
8
- import { BASE_COLORS as u, COLORS as r } from "../../../constants/Theme.js";
9
- import { SectionBodyWrap as k, CardRow as A, RadioCard as f, RadioCardText as g, FieldBlock as B, ChipWrap as O } from "../AgentBuilder.styled.js";
10
- import { AiTextArea as R } from "../components/AiTextArea.js";
2
+ import x from "../../../assets/icons/cross.svg.js";
3
+ import w from "../../../assets/icons/plus.svg.js";
4
+ import k from "styled-components";
5
+ import { DropdownPopover as A } from "../../dropdown/DropdownPopover/index.js";
6
+ import { RadioButton as u } from "../../radioButton/RadioButton.js";
7
+ import { TitleSmall as l, BodyCaption as d } from "../../TypographyStyle.js";
8
+ import { BASE_COLORS as g, COLORS as r } from "../../../constants/Theme.js";
9
+ import { SectionBodyWrap as B, CardRow as L, RadioCard as f, RadioCardText as v, FieldBlock as O, ChipWrap as R } from "../AgentBuilder.styled.js";
10
+ import { AiTextArea as E } from "../components/AiTextArea.js";
11
11
  import { StepSectionHeader as D } from "../components/StepSectionHeader.js";
12
- import { STEP_DEFINITIONS as L } from "../constants/steps.js";
13
- import { useAgentBuilderContext as E } from "../context/AgentBuilderContext.js";
14
- import { Button as v } from "../../button/Button.js";
15
- import { unwrapDropdownValue as P } from "../../dropdown/utils.js";
16
- const y = L[1], Y = () => {
17
- const { value: b, patch: a, availableIntents: d, charLimits: C } = E(), { trigger: e } = b, s = (t) => a({ trigger: { ...e, mode: t } }), S = (t) => {
12
+ import { STEP_DEFINITION_TEMPLATES as P, resolveAppToken as $ } from "../constants/steps.js";
13
+ import { useAgentBuilderContext as F } from "../context/AgentBuilderContext.js";
14
+ import { appTypeLabel as W } from "../utils/mentionSerialization.js";
15
+ import { Button as y } from "../../button/Button.js";
16
+ import { unwrapDropdownValue as j } from "../../dropdown/utils.js";
17
+ const b = P[1], ot = () => {
18
+ const { value: T, patch: a, availableIntents: m, charLimits: C, applicationType: S } = F(), { trigger: e } = T, c = W(S), s = (t) => a({ trigger: { ...e, mode: t } }), _ = (t) => {
18
19
  e.intents.includes(t) || a({
19
20
  trigger: { ...e, intents: [...e.intents, t] }
20
21
  });
@@ -23,11 +24,17 @@ const y = L[1], Y = () => {
23
24
  ...e,
24
25
  intents: e.intents.filter((i) => i !== t)
25
26
  }
26
- }), m = (t) => d.find((i) => i.value === t)?.label ?? t, p = d.filter((t) => !e.intents.includes(t.value)).map((t) => ({ label: t.label, value: t.value }));
27
+ }), p = (t) => m.find((i) => i.value === t)?.label ?? t, h = m.filter((t) => !e.intents.includes(t.value)).map((t) => ({ label: t.label, value: t.value }));
27
28
  return /* @__PURE__ */ o("div", { children: [
28
- /* @__PURE__ */ n(D, { title: y.title, helper: y.helper }),
29
- /* @__PURE__ */ o(k, { children: [
30
- /* @__PURE__ */ o(A, { children: [
29
+ /* @__PURE__ */ n(
30
+ D,
31
+ {
32
+ title: b.title,
33
+ helper: $(b.helper, c)
34
+ }
35
+ ),
36
+ /* @__PURE__ */ o(B, { children: [
37
+ /* @__PURE__ */ o(L, { children: [
31
38
  /* @__PURE__ */ o(
32
39
  f,
33
40
  {
@@ -36,17 +43,17 @@ const y = L[1], Y = () => {
36
43
  onClick: () => s("manifest_intent"),
37
44
  children: [
38
45
  /* @__PURE__ */ n(
39
- h,
46
+ u,
40
47
  {
41
48
  isActive: e.mode === "manifest_intent",
42
49
  onValueChange: () => s("manifest_intent"),
43
50
  skipSelectingOff: !0,
44
- activeColor: u.brand[800]
51
+ activeColor: g.brand[800]
45
52
  }
46
53
  ),
47
- /* @__PURE__ */ o(g, { children: [
48
- /* @__PURE__ */ n(c, { color: r.content.primary, children: "Manifest intent" }),
49
- /* @__PURE__ */ n(l, { color: r.content.secondary, children: "Manifest's AI classifier routes conversations automatically — no keywords needed." })
54
+ /* @__PURE__ */ o(v, { children: [
55
+ /* @__PURE__ */ n(l, { color: r.content.primary, children: `${c} intent` }),
56
+ /* @__PURE__ */ n(d, { color: r.content.secondary, children: `${c}'s AI classifier routes conversations automatically — no keywords needed.` })
50
57
  ] })
51
58
  ]
52
59
  }
@@ -59,67 +66,67 @@ const y = L[1], Y = () => {
59
66
  onClick: () => s("custom_intent"),
60
67
  children: [
61
68
  /* @__PURE__ */ n(
62
- h,
69
+ u,
63
70
  {
64
71
  isActive: e.mode === "custom_intent",
65
72
  onValueChange: () => s("custom_intent"),
66
73
  skipSelectingOff: !0,
67
- activeColor: u.brand[800]
74
+ activeColor: g.brand[800]
68
75
  }
69
76
  ),
70
- /* @__PURE__ */ o(g, { children: [
71
- /* @__PURE__ */ n(c, { color: r.content.primary, children: "Custom intent" }),
72
- /* @__PURE__ */ n(l, { color: r.content.secondary, children: "Define your own trigger — use exact phrases or describe the customer's intent." })
77
+ /* @__PURE__ */ o(v, { children: [
78
+ /* @__PURE__ */ n(l, { color: r.content.primary, children: "Custom intent" }),
79
+ /* @__PURE__ */ n(d, { color: r.content.secondary, children: "Define your own trigger — use exact phrases or describe the customer's intent." })
73
80
  ] })
74
81
  ]
75
82
  }
76
83
  )
77
84
  ] }),
78
- e.mode === "manifest_intent" ? /* @__PURE__ */ o(B, { children: [
79
- /* @__PURE__ */ n(c, { color: r.content.primary, children: "If customer talks about" }),
80
- e.intents.length > 0 && /* @__PURE__ */ n(O, { children: e.intents.map((t) => /* @__PURE__ */ n(
81
- v,
85
+ e.mode === "manifest_intent" ? /* @__PURE__ */ o(O, { children: [
86
+ /* @__PURE__ */ n(l, { color: r.content.primary, children: "If customer talks about" }),
87
+ e.intents.length > 0 && /* @__PURE__ */ n(R, { children: e.intents.map((t) => /* @__PURE__ */ n(
88
+ y,
82
89
  {
83
90
  "data-test": `intent-chip-${t}`,
84
91
  size: "chip",
85
92
  buttonType: "tertiaryGray",
86
- buttonText: m(t),
87
- TrailingIcon: T,
88
- "aria-label": `Remove ${m(t)}`,
93
+ buttonText: p(t),
94
+ TrailingIcon: x,
95
+ "aria-label": `Remove ${p(t)}`,
89
96
  onClick: () => I(t)
90
97
  },
91
98
  t
92
99
  )) }),
93
- p.length > 0 && // Dashed "+ Intent" button on its own row under the chips;
100
+ h.length > 0 && // Dashed "+ Intent" button on its own row under the chips;
94
101
  // clicking it opens the intent list directly — no intermediate
95
102
  // select input.
96
- /* @__PURE__ */ n(F, { children: /* @__PURE__ */ n(
97
- w,
103
+ /* @__PURE__ */ n(z, { children: /* @__PURE__ */ n(
104
+ A,
98
105
  {
99
106
  "data-test": "intent-add-dropdown",
100
107
  isSearchable: !0,
101
108
  width: "200px",
102
109
  placement: "bottom-start",
103
- options: p,
110
+ options: h,
104
111
  onSelect: (t) => {
105
- const i = P(t);
106
- i && S(i);
112
+ const i = j(t);
113
+ i && _(i);
107
114
  },
108
115
  children: /* @__PURE__ */ n(
109
- v,
116
+ y,
110
117
  {
111
118
  "data-test": "intent-add-button",
112
119
  buttonType: "dashBold",
113
120
  size: "medium",
114
- LeadingIcon: _,
121
+ LeadingIcon: w,
115
122
  buttonText: "Intent"
116
123
  }
117
124
  )
118
125
  }
119
126
  ) }),
120
- /* @__PURE__ */ n(l, { color: r.content.secondary, children: "This agent takes over from your main assistant when this intent is detected. The changeover is automatic when you go live." })
127
+ /* @__PURE__ */ n(d, { color: r.content.secondary, children: "This agent takes over from your main assistant when this intent is detected. The changeover is automatic when you go live." })
121
128
  ] }) : /* @__PURE__ */ n(
122
- R,
129
+ E,
123
130
  {
124
131
  "data-test": "custom-intent",
125
132
  label: "Describe the trigger",
@@ -132,10 +139,10 @@ const y = L[1], Y = () => {
132
139
  )
133
140
  ] })
134
141
  ] });
135
- }, F = x.div`
142
+ }, z = k.div`
136
143
  display: flex;
137
144
  `;
138
145
  export {
139
- Y as Step2WhenItStepsIn
146
+ ot as Step2WhenItStepsIn
140
147
  };
141
148
  //# sourceMappingURL=Step2WhenItStepsIn.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Step2WhenItStepsIn.js","sources":["../../../../../src/components/agent-builder/steps/Step2WhenItStepsIn.tsx"],"sourcesContent":["import CrossIcon from '@src/assets/icons/cross.svg';\nimport PlusIcon from '@src/assets/icons/plus.svg';\nimport React from 'react';\nimport styled from 'styled-components';\nimport { Button } from '@src/components/button';\nimport { unwrapDropdownValue } from '@src/components/dropdown';\nimport { DropdownPopover } from '@src/components/dropdown/DropdownPopover';\nimport { SingleOption } from '@src/components/dropdown/type';\nimport { RadioButton } from '@src/components/radioButton/RadioButton';\nimport { BodyCaption, TitleSmall } from '@src/components/TypographyStyle';\nimport { BASE_COLORS, COLORS } from '@src/constants/Theme';\nimport { TriggerMode } from '../AgentBuilder.model';\nimport {\n\tCardRow,\n\tChipWrap,\n\tFieldBlock,\n\tRadioCard,\n\tRadioCardText,\n\tSectionBodyWrap,\n} from '../AgentBuilder.styled';\nimport { AiTextArea } from '../components/AiTextArea';\nimport { StepSectionHeader } from '../components/StepSectionHeader';\nimport { STEP_DEFINITIONS } from '../constants/steps';\nimport { useAgentBuilderContext } from '../context/AgentBuilderContext';\n\nconst STEP = STEP_DEFINITIONS[1];\n\nexport const Step2WhenItStepsIn: React.FC = () => {\n\tconst { value, patch, availableIntents, charLimits } =\n\t\tuseAgentBuilderContext();\n\tconst { trigger } = value;\n\n\t// Only the mode changes here. The modes are mutually exclusive on save, but the\n\t// unselected one's data is kept until the merchant leaves this step (see\n\t// `triggerForSelectedMode` in AgentBuilderContext) — so toggling the radio to\n\t// compare the two options doesn't delete what they already picked or typed.\n\tconst setMode = (mode: TriggerMode) =>\n\t\tpatch({ trigger: { ...trigger, mode } });\n\n\tconst addIntent = (intentValue: string) => {\n\t\tif (!trigger.intents.includes(intentValue)) {\n\t\t\tpatch({\n\t\t\t\ttrigger: { ...trigger, intents: [...trigger.intents, intentValue] },\n\t\t\t});\n\t\t}\n\t};\n\n\tconst removeIntent = (intentValue: string) =>\n\t\tpatch({\n\t\t\ttrigger: {\n\t\t\t\t...trigger,\n\t\t\t\tintents: trigger.intents.filter((i) => i !== intentValue),\n\t\t\t},\n\t\t});\n\n\tconst labelFor = (v: string) =>\n\t\tavailableIntents.find((o) => o.value === v)?.label ?? v;\n\n\tconst remainingOptions: SingleOption[] = availableIntents\n\t\t.filter((o) => !trigger.intents.includes(o.value))\n\t\t.map((o) => ({ label: o.label, value: o.value }));\n\n\treturn (\n\t\t<div>\n\t\t\t<StepSectionHeader title={STEP.title} helper={STEP.helper} />\n\t\t\t<SectionBodyWrap>\n\t\t\t\t<CardRow>\n\t\t\t\t\t<RadioCard\n\t\t\t\t\t\tdata-test=\"trigger-mode-manifest\"\n\t\t\t\t\t\tselected={trigger.mode === 'manifest_intent'}\n\t\t\t\t\t\tonClick={() => setMode('manifest_intent')}\n\t\t\t\t\t>\n\t\t\t\t\t\t<RadioButton\n\t\t\t\t\t\t\tisActive={trigger.mode === 'manifest_intent'}\n\t\t\t\t\t\t\tonValueChange={() => setMode('manifest_intent')}\n\t\t\t\t\t\t\tskipSelectingOff\n\t\t\t\t\t\t\tactiveColor={BASE_COLORS.brand['800']}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<RadioCardText>\n\t\t\t\t\t\t\t<TitleSmall color={COLORS.content.primary}>\n\t\t\t\t\t\t\t\tManifest intent\n\t\t\t\t\t\t\t</TitleSmall>\n\t\t\t\t\t\t\t<BodyCaption color={COLORS.content.secondary}>\n\t\t\t\t\t\t\t\tManifest&apos;s AI classifier routes conversations automatically\n\t\t\t\t\t\t\t\t— no keywords needed.\n\t\t\t\t\t\t\t</BodyCaption>\n\t\t\t\t\t\t</RadioCardText>\n\t\t\t\t\t</RadioCard>\n\n\t\t\t\t\t<RadioCard\n\t\t\t\t\t\tdata-test=\"trigger-mode-custom\"\n\t\t\t\t\t\tselected={trigger.mode === 'custom_intent'}\n\t\t\t\t\t\tonClick={() => setMode('custom_intent')}\n\t\t\t\t\t>\n\t\t\t\t\t\t<RadioButton\n\t\t\t\t\t\t\tisActive={trigger.mode === 'custom_intent'}\n\t\t\t\t\t\t\tonValueChange={() => setMode('custom_intent')}\n\t\t\t\t\t\t\tskipSelectingOff\n\t\t\t\t\t\t\tactiveColor={BASE_COLORS.brand['800']}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<RadioCardText>\n\t\t\t\t\t\t\t<TitleSmall color={COLORS.content.primary}>\n\t\t\t\t\t\t\t\tCustom intent\n\t\t\t\t\t\t\t</TitleSmall>\n\t\t\t\t\t\t\t<BodyCaption color={COLORS.content.secondary}>\n\t\t\t\t\t\t\t\tDefine your own trigger — use exact phrases or describe the\n\t\t\t\t\t\t\t\tcustomer&apos;s intent.\n\t\t\t\t\t\t\t</BodyCaption>\n\t\t\t\t\t\t</RadioCardText>\n\t\t\t\t\t</RadioCard>\n\t\t\t\t</CardRow>\n\n\t\t\t\t{trigger.mode === 'manifest_intent' ? (\n\t\t\t\t\t<FieldBlock>\n\t\t\t\t\t\t<TitleSmall color={COLORS.content.primary}>\n\t\t\t\t\t\t\tIf customer talks about\n\t\t\t\t\t\t</TitleSmall>\n\t\t\t\t\t\t{trigger.intents.length > 0 && (\n\t\t\t\t\t\t\t<ChipWrap>\n\t\t\t\t\t\t\t\t{trigger.intents.map((intent) => (\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tkey={intent}\n\t\t\t\t\t\t\t\t\t\tdata-test={`intent-chip-${intent}`}\n\t\t\t\t\t\t\t\t\t\tsize=\"chip\"\n\t\t\t\t\t\t\t\t\t\tbuttonType=\"tertiaryGray\"\n\t\t\t\t\t\t\t\t\t\tbuttonText={labelFor(intent)}\n\t\t\t\t\t\t\t\t\t\tTrailingIcon={CrossIcon}\n\t\t\t\t\t\t\t\t\t\taria-label={`Remove ${labelFor(intent)}`}\n\t\t\t\t\t\t\t\t\t\tonClick={() => removeIntent(intent)}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</ChipWrap>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{remainingOptions.length > 0 && (\n\t\t\t\t\t\t\t// Dashed \"+ Intent\" button on its own row under the chips;\n\t\t\t\t\t\t\t// clicking it opens the intent list directly — no intermediate\n\t\t\t\t\t\t\t// select input.\n\t\t\t\t\t\t\t<AddIntentRow>\n\t\t\t\t\t\t\t\t<DropdownPopover\n\t\t\t\t\t\t\t\t\tdata-test=\"intent-add-dropdown\"\n\t\t\t\t\t\t\t\t\tisSearchable\n\t\t\t\t\t\t\t\t\twidth=\"200px\"\n\t\t\t\t\t\t\t\t\tplacement=\"bottom-start\"\n\t\t\t\t\t\t\t\t\toptions={remainingOptions}\n\t\t\t\t\t\t\t\t\tonSelect={(opt) => {\n\t\t\t\t\t\t\t\t\t\tconst v = unwrapDropdownValue(opt);\n\t\t\t\t\t\t\t\t\t\tif (v) {\n\t\t\t\t\t\t\t\t\t\t\taddIntent(v);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tdata-test=\"intent-add-button\"\n\t\t\t\t\t\t\t\t\t\tbuttonType=\"dashBold\"\n\t\t\t\t\t\t\t\t\t\tsize=\"medium\"\n\t\t\t\t\t\t\t\t\t\tLeadingIcon={PlusIcon}\n\t\t\t\t\t\t\t\t\t\tbuttonText=\"Intent\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</DropdownPopover>\n\t\t\t\t\t\t\t</AddIntentRow>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<BodyCaption color={COLORS.content.secondary}>\n\t\t\t\t\t\t\tThis agent takes over from your main assistant when this intent is\n\t\t\t\t\t\t\tdetected. The changeover is automatic when you go live.\n\t\t\t\t\t\t</BodyCaption>\n\t\t\t\t\t</FieldBlock>\n\t\t\t\t) : (\n\t\t\t\t\t<AiTextArea\n\t\t\t\t\t\tdata-test=\"custom-intent\"\n\t\t\t\t\t\tlabel=\"Describe the trigger\"\n\t\t\t\t\t\tvalue={trigger.custom_intent ?? ''}\n\t\t\t\t\t\tonChange={(text) =>\n\t\t\t\t\t\t\tpatch({ trigger: { ...trigger, custom_intent: text } })\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmaxLength={charLimits.custom_intent}\n\t\t\t\t\t\tplaceholder=\"e.g. The customer wants to cancel an order they placed.\"\n\t\t\t\t\t\tminHeight=\"120px\"\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</SectionBodyWrap>\n\t\t</div>\n\t);\n};\n\n// Keeps the dashed \"+ Intent\" button at its natural width on its own row.\nconst AddIntentRow = styled.div`\n\tdisplay: flex;\n`;\n"],"names":["STEP","STEP_DEFINITIONS","Step2WhenItStepsIn","value","patch","availableIntents","charLimits","useAgentBuilderContext","trigger","setMode","mode","addIntent","intentValue","removeIntent","labelFor","v","o","remainingOptions","jsx","StepSectionHeader","SectionBodyWrap","jsxs","CardRow","RadioCard","RadioButton","BASE_COLORS","RadioCardText","TitleSmall","COLORS","BodyCaption","FieldBlock","ChipWrap","intent","Button","CrossIcon","AddIntentRow","DropdownPopover","opt","unwrapDropdownValue","PlusIcon","AiTextArea","text","styled"],"mappings":";;;;;;;;;;;;;;;AAyBA,MAAMA,IAAOC,EAAiB,CAAC,GAElBC,IAA+B,MAAM;AACjD,QAAM,EAAE,OAAAC,GAAO,OAAAC,GAAO,kBAAAC,GAAkB,YAAAC,EAAA,IACvCC,EAAA,GACK,EAAE,SAAAC,MAAYL,GAMdM,IAAU,CAACC,MAChBN,EAAM,EAAE,SAAS,EAAE,GAAGI,GAAS,MAAAE,EAAA,GAAQ,GAElCC,IAAY,CAACC,MAAwB;AAC1C,IAAKJ,EAAQ,QAAQ,SAASI,CAAW,KACxCR,EAAM;AAAA,MACL,SAAS,EAAE,GAAGI,GAAS,SAAS,CAAC,GAAGA,EAAQ,SAASI,CAAW,EAAA;A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UAACkB;AAAA,UAAA;AAAA,YACA,aAAU;AAAA,YACV,cAAY;AAAA,YACZ,OAAM;AAAA,YACN,WAAU;AAAA,YACV,SAASnB;AAAA,YACT,UAAU,CAACoB,MAAQ;AAClB,oBAAMtB,IAAIuB,EAAoBD,CAAG;AACjC,cAAItB,KACHJ,EAAUI,CAAC;AAAA,YAEb;AAAA,YAEA,UAAA,gBAAAG;AAAA,cAACe;AAAA,cAAA;AAAA,gBACA,aAAU;AAAA,gBACV,YAAW;AAAA,gBACX,MAAK;AAAA,gBACL,aAAaM;AAAAA,gBACb,YAAW;AAAA,cAAA;AAAA,YAAA;AAAA,UACZ;AAAA,QAAA,GAEF;AAAA,0BAEAV,GAAA,EAAY,OAAOD,EAAO,QAAQ,WAAW,UAAA,6HAAA,CAG9C;AAAA,MAAA,EAAA,CACD,IAEA,gBAAAV;AAAA,QAACsB;AAAA,QAAA;AAAA,UACA,aAAU;AAAA,UACV,OAAM;AAAA,UACN,OAAOhC,EAAQ,iBAAiB;AAAA,UAChC,UAAU,CAACiC,MACVrC,EAAM,EAAE,SAAS,EAAE,GAAGI,GAAS,eAAeiC,EAAA,GAAQ;AAAA,UAEvD,WAAWnC,EAAW;AAAA,UACtB,aAAY;AAAA,UACZ,WAAU;AAAA,QAAA;AAAA,MAAA;AAAA,IACX,EAAA,CAEF;AAAA,EAAA,GACD;AAEF,GAGM6B,IAAeO,EAAO;AAAA;AAAA;"}
1
+ {"version":3,"file":"Step2WhenItStepsIn.js","sources":["../../../../../src/components/agent-builder/steps/Step2WhenItStepsIn.tsx"],"sourcesContent":["import CrossIcon from '@src/assets/icons/cross.svg';\nimport PlusIcon from '@src/assets/icons/plus.svg';\nimport React from 'react';\nimport styled from 'styled-components';\nimport { Button } from '@src/components/button';\nimport { unwrapDropdownValue } from '@src/components/dropdown';\nimport { DropdownPopover } from '@src/components/dropdown/DropdownPopover';\nimport { SingleOption } from '@src/components/dropdown/type';\nimport { RadioButton } from '@src/components/radioButton/RadioButton';\nimport { BodyCaption, TitleSmall } from '@src/components/TypographyStyle';\nimport { BASE_COLORS, COLORS } from '@src/constants/Theme';\nimport { TriggerMode } from '../AgentBuilder.model';\nimport {\n\tCardRow,\n\tChipWrap,\n\tFieldBlock,\n\tRadioCard,\n\tRadioCardText,\n\tSectionBodyWrap,\n} from '../AgentBuilder.styled';\nimport { AiTextArea } from '../components/AiTextArea';\nimport { StepSectionHeader } from '../components/StepSectionHeader';\nimport { resolveAppToken, STEP_DEFINITION_TEMPLATES } from '../constants/steps';\nimport { useAgentBuilderContext } from '../context/AgentBuilderContext';\nimport { appTypeLabel } from '../utils/mentionSerialization';\n\nconst STEP = STEP_DEFINITION_TEMPLATES[1];\n\nexport const Step2WhenItStepsIn: React.FC = () => {\n\tconst { value, patch, availableIntents, charLimits, applicationType } =\n\t\tuseAgentBuilderContext();\n\tconst { trigger } = value;\n\n\t// The first trigger mode is the host product's own intent classifier, so it's\n\t// named after whichever product the merchant is in — \"Manifest intent\" in\n\t// Manifest, \"BIK intent\" in BIK. `trigger.mode` stays `'manifest_intent'`:\n\t// it's a bik-models TriggerMode the backend keys off, not a label.\n\tconst appLabel = appTypeLabel(applicationType);\n\n\t// Only the mode changes here. The modes are mutually exclusive on save, but the\n\t// unselected one's data is kept until the merchant leaves this step (see\n\t// `triggerForSelectedMode` in AgentBuilderContext) — so toggling the radio to\n\t// compare the two options doesn't delete what they already picked or typed.\n\tconst setMode = (mode: TriggerMode) =>\n\t\tpatch({ trigger: { ...trigger, mode } });\n\n\tconst addIntent = (intentValue: string) => {\n\t\tif (!trigger.intents.includes(intentValue)) {\n\t\t\tpatch({\n\t\t\t\ttrigger: { ...trigger, intents: [...trigger.intents, intentValue] },\n\t\t\t});\n\t\t}\n\t};\n\n\tconst removeIntent = (intentValue: string) =>\n\t\tpatch({\n\t\t\ttrigger: {\n\t\t\t\t...trigger,\n\t\t\t\tintents: trigger.intents.filter((i) => i !== intentValue),\n\t\t\t},\n\t\t});\n\n\tconst labelFor = (v: string) =>\n\t\tavailableIntents.find((o) => o.value === v)?.label ?? v;\n\n\tconst remainingOptions: SingleOption[] = availableIntents\n\t\t.filter((o) => !trigger.intents.includes(o.value))\n\t\t.map((o) => ({ label: o.label, value: o.value }));\n\n\treturn (\n\t\t<div>\n\t\t\t<StepSectionHeader\n\t\t\t\ttitle={STEP.title}\n\t\t\t\thelper={resolveAppToken(STEP.helper, appLabel)}\n\t\t\t/>\n\t\t\t<SectionBodyWrap>\n\t\t\t\t<CardRow>\n\t\t\t\t\t<RadioCard\n\t\t\t\t\t\tdata-test=\"trigger-mode-manifest\"\n\t\t\t\t\t\tselected={trigger.mode === 'manifest_intent'}\n\t\t\t\t\t\tonClick={() => setMode('manifest_intent')}\n\t\t\t\t\t>\n\t\t\t\t\t\t<RadioButton\n\t\t\t\t\t\t\tisActive={trigger.mode === 'manifest_intent'}\n\t\t\t\t\t\t\tonValueChange={() => setMode('manifest_intent')}\n\t\t\t\t\t\t\tskipSelectingOff\n\t\t\t\t\t\t\tactiveColor={BASE_COLORS.brand['800']}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<RadioCardText>\n\t\t\t\t\t\t\t<TitleSmall color={COLORS.content.primary}>\n\t\t\t\t\t\t\t\t{`${appLabel} intent`}\n\t\t\t\t\t\t\t</TitleSmall>\n\t\t\t\t\t\t\t<BodyCaption color={COLORS.content.secondary}>\n\t\t\t\t\t\t\t\t{`${appLabel}'s AI classifier routes conversations automatically — no keywords needed.`}\n\t\t\t\t\t\t\t</BodyCaption>\n\t\t\t\t\t\t</RadioCardText>\n\t\t\t\t\t</RadioCard>\n\n\t\t\t\t\t<RadioCard\n\t\t\t\t\t\tdata-test=\"trigger-mode-custom\"\n\t\t\t\t\t\tselected={trigger.mode === 'custom_intent'}\n\t\t\t\t\t\tonClick={() => setMode('custom_intent')}\n\t\t\t\t\t>\n\t\t\t\t\t\t<RadioButton\n\t\t\t\t\t\t\tisActive={trigger.mode === 'custom_intent'}\n\t\t\t\t\t\t\tonValueChange={() => setMode('custom_intent')}\n\t\t\t\t\t\t\tskipSelectingOff\n\t\t\t\t\t\t\tactiveColor={BASE_COLORS.brand['800']}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<RadioCardText>\n\t\t\t\t\t\t\t<TitleSmall color={COLORS.content.primary}>\n\t\t\t\t\t\t\t\tCustom intent\n\t\t\t\t\t\t\t</TitleSmall>\n\t\t\t\t\t\t\t<BodyCaption color={COLORS.content.secondary}>\n\t\t\t\t\t\t\t\tDefine your own trigger — use exact phrases or describe the\n\t\t\t\t\t\t\t\tcustomer&apos;s intent.\n\t\t\t\t\t\t\t</BodyCaption>\n\t\t\t\t\t\t</RadioCardText>\n\t\t\t\t\t</RadioCard>\n\t\t\t\t</CardRow>\n\n\t\t\t\t{trigger.mode === 'manifest_intent' ? (\n\t\t\t\t\t<FieldBlock>\n\t\t\t\t\t\t<TitleSmall color={COLORS.content.primary}>\n\t\t\t\t\t\t\tIf customer talks about\n\t\t\t\t\t\t</TitleSmall>\n\t\t\t\t\t\t{trigger.intents.length > 0 && (\n\t\t\t\t\t\t\t<ChipWrap>\n\t\t\t\t\t\t\t\t{trigger.intents.map((intent) => (\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tkey={intent}\n\t\t\t\t\t\t\t\t\t\tdata-test={`intent-chip-${intent}`}\n\t\t\t\t\t\t\t\t\t\tsize=\"chip\"\n\t\t\t\t\t\t\t\t\t\tbuttonType=\"tertiaryGray\"\n\t\t\t\t\t\t\t\t\t\tbuttonText={labelFor(intent)}\n\t\t\t\t\t\t\t\t\t\tTrailingIcon={CrossIcon}\n\t\t\t\t\t\t\t\t\t\taria-label={`Remove ${labelFor(intent)}`}\n\t\t\t\t\t\t\t\t\t\tonClick={() => removeIntent(intent)}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</ChipWrap>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{remainingOptions.length > 0 && (\n\t\t\t\t\t\t\t// Dashed \"+ Intent\" button on its own row under the chips;\n\t\t\t\t\t\t\t// clicking it opens the intent list directly — no intermediate\n\t\t\t\t\t\t\t// select input.\n\t\t\t\t\t\t\t<AddIntentRow>\n\t\t\t\t\t\t\t\t<DropdownPopover\n\t\t\t\t\t\t\t\t\tdata-test=\"intent-add-dropdown\"\n\t\t\t\t\t\t\t\t\tisSearchable\n\t\t\t\t\t\t\t\t\twidth=\"200px\"\n\t\t\t\t\t\t\t\t\tplacement=\"bottom-start\"\n\t\t\t\t\t\t\t\t\toptions={remainingOptions}\n\t\t\t\t\t\t\t\t\tonSelect={(opt) => {\n\t\t\t\t\t\t\t\t\t\tconst v = unwrapDropdownValue(opt);\n\t\t\t\t\t\t\t\t\t\tif (v) {\n\t\t\t\t\t\t\t\t\t\t\taddIntent(v);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tdata-test=\"intent-add-button\"\n\t\t\t\t\t\t\t\t\t\tbuttonType=\"dashBold\"\n\t\t\t\t\t\t\t\t\t\tsize=\"medium\"\n\t\t\t\t\t\t\t\t\t\tLeadingIcon={PlusIcon}\n\t\t\t\t\t\t\t\t\t\tbuttonText=\"Intent\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</DropdownPopover>\n\t\t\t\t\t\t\t</AddIntentRow>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<BodyCaption color={COLORS.content.secondary}>\n\t\t\t\t\t\t\tThis agent takes over from your main assistant when this intent is\n\t\t\t\t\t\t\tdetected. The changeover is automatic when you go live.\n\t\t\t\t\t\t</BodyCaption>\n\t\t\t\t\t</FieldBlock>\n\t\t\t\t) : (\n\t\t\t\t\t<AiTextArea\n\t\t\t\t\t\tdata-test=\"custom-intent\"\n\t\t\t\t\t\tlabel=\"Describe the trigger\"\n\t\t\t\t\t\tvalue={trigger.custom_intent ?? ''}\n\t\t\t\t\t\tonChange={(text) =>\n\t\t\t\t\t\t\tpatch({ trigger: { ...trigger, custom_intent: text } })\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmaxLength={charLimits.custom_intent}\n\t\t\t\t\t\tplaceholder=\"e.g. The customer wants to cancel an order they placed.\"\n\t\t\t\t\t\tminHeight=\"120px\"\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</SectionBodyWrap>\n\t\t</div>\n\t);\n};\n\n// Keeps the dashed \"+ Intent\" button at its natural width on its own row.\nconst AddIntentRow = styled.div`\n\tdisplay: flex;\n`;\n"],"names":["STEP","STEP_DEFINITION_TEMPLATES","Step2WhenItStepsIn","value","patch","availableIntents","charLimits","applicationType","useAgentBuilderContext","trigger","appLabel","appTypeLabel","setMode","mode","addIntent","intentValue","removeIntent","labelFor","v","o","remainingOptions","jsx","StepSectionHeader","resolveAppToken","SectionBodyWrap","jsxs","CardRow","RadioCard","RadioButton","BASE_COLORS","RadioCardText","TitleSmall","COLORS","BodyCaption","FieldBlock","ChipWrap","intent","Button","CrossIcon","AddIntentRow","DropdownPopover","opt","unwrapDropdownValue","PlusIcon","AiTextArea","text","styled"],"mappings":";;;;;;;;;;;;;;;;AA0BA,MAAMA,IAAOC,EAA0B,CAAC,GAE3BC,KAA+B,MAAM;AACjD,QAAM,EAAE,OAAAC,GAAO,OAAAC,GAAO,kBAAAC,GAAkB,YAAAC,GAAY,iBAAAC,EAAA,IACnDC,EAAA,GACK,EAAE,SAAAC,MAAYN,GAMdO,IAAWC,EAAaJ,CAAe,GAMvCK,IAAU,CAACC,MAChBT,EAAM,EAAE,SAAS,EAAE,GAAGK,GAAS,MAAAI,EAAA,GAAQ,GAElCC,IAAY,CAACC,MAAwB;AAC1C,IAAKN,EAAQ,QAAQ,SAASM,CAAW,KACxCX,EAAM;AAAA,MACL,SAAS,EAAE,GAAGK,GAAS,SAAS,CAAC,GAAGA,EAAQ,SAASM,CAA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