@wise/dynamic-flow-client 3.14.1 → 3.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/main.js CHANGED
@@ -35,6 +35,9 @@ var __objRest = (source, exclude) => {
35
35
  }
36
36
  return target;
37
37
  };
38
+ var __esm = (fn, res) => function __init() {
39
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
40
+ };
38
41
  var __commonJS = (cb, mod) => function __require() {
39
42
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
40
43
  };
@@ -121,6 +124,158 @@ var require_classnames = __commonJS({
121
124
  }
122
125
  });
123
126
 
127
+ // ../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
128
+ function r(e) {
129
+ var t, f, n = "";
130
+ if ("string" == typeof e || "number" == typeof e)
131
+ n += e;
132
+ else if ("object" == typeof e)
133
+ if (Array.isArray(e)) {
134
+ var o = e.length;
135
+ for (t = 0; t < o; t++)
136
+ e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
137
+ } else
138
+ for (f in e)
139
+ e[f] && (n && (n += " "), n += f);
140
+ return n;
141
+ }
142
+ function clsx() {
143
+ for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++)
144
+ (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
145
+ return n;
146
+ }
147
+ var init_clsx = __esm({
148
+ "../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs"() {
149
+ "use strict";
150
+ }
151
+ });
152
+
153
+ // ../../node_modules/.pnpm/@wise+art@2.14.0_@transferwise+neptune-css@14.12.1_@types+react@18.3.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wise/art/dist/index-93a0c34e.esm.js
154
+ var import_react7, import_jsx_runtime17, unknownFlagName, Flag, Sizes, ImageSizes, imageSizes, Assets, RenderMode;
155
+ var init_index_93a0c34e_esm = __esm({
156
+ "../../node_modules/.pnpm/@wise+art@2.14.0_@transferwise+neptune-css@14.12.1_@types+react@18.3.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wise/art/dist/index-93a0c34e.esm.js"() {
157
+ "use strict";
158
+ init_clsx();
159
+ import_react7 = require("react");
160
+ import_jsx_runtime17 = require("react/jsx-runtime");
161
+ unknownFlagName = "wise";
162
+ Flag = ({
163
+ code,
164
+ intrinsicSize = 64,
165
+ className = void 0
166
+ }) => {
167
+ const [fallback, setFallback] = (0, import_react7.useState)(null);
168
+ (0, import_react7.useEffect)(() => {
169
+ setFallback(null);
170
+ }, [code]);
171
+ const detailed = intrinsicSize >= 150;
172
+ const name = fallback !== "unknown" ? `${code.toLowerCase()}${fallback == null && detailed ? "-detailed" : ""}` : unknownFlagName;
173
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("img", {
174
+ className: clsx(`wds-flag wds-flag-${name}`, className),
175
+ src: `https://wise.com/web-art/assets/flags/${name}.svg`,
176
+ alt: "",
177
+ width: intrinsicSize,
178
+ height: intrinsicSize,
179
+ onError: () => {
180
+ setFallback((prev) => prev == null && detailed ? "simple" : "unknown");
181
+ }
182
+ });
183
+ };
184
+ (function(Sizes2) {
185
+ Sizes2["SMALL"] = "small";
186
+ Sizes2["MEDIUM"] = "medium";
187
+ Sizes2["LARGE"] = "large";
188
+ })(Sizes || (Sizes = {}));
189
+ ImageSizes = {
190
+ [Sizes.SMALL]: 200,
191
+ [Sizes.MEDIUM]: 300,
192
+ [Sizes.LARGE]: 500
193
+ };
194
+ imageSizes = {
195
+ [Sizes.SMALL]: 200,
196
+ [Sizes.MEDIUM]: 300,
197
+ [Sizes.LARGE]: 500
198
+ };
199
+ (function(Assets2) {
200
+ Assets2["BELL"] = "bell";
201
+ Assets2["BRIEFCASE"] = "briefcase";
202
+ Assets2["BUSINESS_CARD"] = "business-card";
203
+ Assets2["CALENDAR"] = "calendar";
204
+ Assets2["CHECK_MARK"] = "check-mark";
205
+ Assets2["CLOSED_WINDOW"] = "closed-window";
206
+ Assets2["COIN_PILE_DOWN"] = "coin-pile-down";
207
+ Assets2["COIN_PILE_UP"] = "coin-pile-up";
208
+ Assets2["CONFETTI"] = "confetti";
209
+ Assets2["CONSTRUCTION_FENCE"] = "construction-fence";
210
+ Assets2["CONVERT"] = "convert";
211
+ Assets2["COOKIE"] = "cookie";
212
+ Assets2["DIGITAL_CARD_2"] = "digital-card-2";
213
+ Assets2["DIGITAL_CARD"] = "digital-card";
214
+ Assets2["DOCUMENTS"] = "documents";
215
+ Assets2["DOOR"] = "door";
216
+ Assets2["ECO_CARD"] = "eco-card";
217
+ Assets2["ELECTRIC_PLUG"] = "electric-plug";
218
+ Assets2["EMAIL_SUCCESS"] = "email-success";
219
+ Assets2["EMAIL"] = "email";
220
+ Assets2["EXCLAMATION_MARK"] = "exclamation-mark";
221
+ Assets2["FLAG"] = "flag";
222
+ Assets2["FLOWER"] = "flower";
223
+ Assets2["GEAR"] = "gear";
224
+ Assets2["GLOBE"] = "globe";
225
+ Assets2["GRAPH"] = "graph";
226
+ Assets2["HEART_2"] = "heart-2";
227
+ Assets2["HEART_3"] = "heart-3";
228
+ Assets2["HEART_4"] = "heart-4";
229
+ Assets2["HEART_5"] = "heart-5";
230
+ Assets2["HEART"] = "heart";
231
+ Assets2["HOUSE"] = "house";
232
+ Assets2["ID_CARD"] = "id-card";
233
+ Assets2["INFINITE"] = "infinite";
234
+ Assets2["INTEREST"] = "interest";
235
+ Assets2["INVITE_LETTER"] = "invite-letter";
236
+ Assets2["JARS"] = "jars";
237
+ Assets2["KEY"] = "key";
238
+ Assets2["LIGHT_BULB"] = "light-bulb";
239
+ Assets2["LOCK_PLATFORM"] = "lock-platform";
240
+ Assets2["LOCK"] = "lock";
241
+ Assets2["MAGNIFYING_GLASS"] = "magnifying-glass";
242
+ Assets2["MAP"] = "map";
243
+ Assets2["MARBLE_CARD_BUSINESS"] = "marble-card-business";
244
+ Assets2["MARBLE_CARD"] = "marble-card";
245
+ Assets2["MARBLE"] = "marble";
246
+ Assets2["MEGAPHONE"] = "megaphone";
247
+ Assets2["MULTI_CURRENCY"] = "multi-currency";
248
+ Assets2["ONE_INVITE_LETTER_OPENED"] = "one-invite-letter-opened";
249
+ Assets2["PALM_TREE"] = "palm-tree";
250
+ Assets2["PERCENTAGE"] = "percentage";
251
+ Assets2["PERSONAL_CARD"] = "personal-card";
252
+ Assets2["PHONES"] = "phones";
253
+ Assets2["PIE_CHART"] = "pie-chart";
254
+ Assets2["PLANE_2"] = "plane-2";
255
+ Assets2["PLANE"] = "plane";
256
+ Assets2["PUZZLE_PIECES"] = "puzzle-pieces";
257
+ Assets2["QUESTION_MARK"] = "question-mark";
258
+ Assets2["RECEIVE"] = "receive";
259
+ Assets2["REMINDER_LETTER"] = "reminder-letter";
260
+ Assets2["SAND_TIMER"] = "sand-timer";
261
+ Assets2["SATELLITE_PLATFORM"] = "satellite-platform";
262
+ Assets2["SHOPPING_BAG"] = "shopping-bag";
263
+ Assets2["SKIP_AUTHENTICATION"] = "skip-authentication";
264
+ Assets2["SPEECH_BUBBLE"] = "speech-bubble";
265
+ Assets2["STOPWATCH_PLATFORM"] = "stopwatch-platform";
266
+ Assets2["TARGET_PLATFORM"] = "target-platform";
267
+ Assets2["TOOL"] = "tool";
268
+ Assets2["TWO_INVITE_LETTERS_OPENED"] = "two-invite-letters-opened";
269
+ Assets2["WALLET"] = "wallet";
270
+ })(Assets || (Assets = {}));
271
+ (function(RenderMode2) {
272
+ RenderMode2[RenderMode2["INIT"] = 0] = "INIT";
273
+ RenderMode2[RenderMode2["FALLBACK"] = 1] = "FALLBACK";
274
+ RenderMode2[RenderMode2["ASSET_3D"] = 2] = "ASSET_3D";
275
+ })(RenderMode || (RenderMode = {}));
276
+ }
277
+ });
278
+
124
279
  // ../../node_modules/.pnpm/screenfull@5.2.0/node_modules/screenfull/dist/screenfull.js
125
280
  var require_screenfull = __commonJS({
126
281
  "../../node_modules/.pnpm/screenfull@5.2.0/node_modules/screenfull/dist/screenfull.js"(exports, module2) {
@@ -1398,8 +1553,9 @@ var dateInputComponentToProps = (component) => __spreadProps(__spreadValues({},
1398
1553
  // src/revamp/renderers/mappers/decisionComponentToProps.ts
1399
1554
  var decisionComponentToProps = ({
1400
1555
  options,
1401
- margin
1402
- }) => ({ type: "decision", options, margin });
1556
+ margin,
1557
+ title
1558
+ }) => ({ type: "decision", options, margin, title });
1403
1559
 
1404
1560
  // src/revamp/renderers/mappers/dividerComponentToProps.ts
1405
1561
  var dividerComponentToProps = ({
@@ -6931,7 +7087,7 @@ var createDecisionComponent = (decisionProps) => __spreadProps(__spreadValues({
6931
7087
  });
6932
7088
 
6933
7089
  // src/revamp/domain/mappers/layout/decisionLayoutToComponent.ts
6934
- var decisionLayoutToComponent = (uid, { control, margin = "md", options }, { onAction, step }) => createDecisionComponent({
7090
+ var decisionLayoutToComponent = (uid, { control, margin = "md", options, title }, { onAction, step }) => createDecisionComponent({
6935
7091
  uid,
6936
7092
  control,
6937
7093
  margin,
@@ -6943,7 +7099,8 @@ var decisionLayoutToComponent = (uid, { control, margin = "md", options }, { onA
6943
7099
  void onAction(action);
6944
7100
  }
6945
7101
  });
6946
- })
7102
+ }),
7103
+ title
6947
7104
  });
6948
7105
 
6949
7106
  // src/revamp/domain/components/DividerComponent.ts
@@ -10665,6 +10822,7 @@ function useDynamicFlowCore(props) {
10665
10822
  // src/revamp/DynamicFlowCore.tsx
10666
10823
  var import_jsx_runtime5 = require("react/jsx-runtime");
10667
10824
  function DynamicFlowCore(props) {
10825
+ var _a, _b;
10668
10826
  const { stepComponentRef } = useDynamicFlowCore(props);
10669
10827
  const { renderers, onEvent, onError } = props;
10670
10828
  const render = (0, import_react4.useMemo)(
@@ -10678,13 +10836,20 @@ function DynamicFlowCore(props) {
10678
10836
  onEvent == null ? void 0 : onEvent("Dynamic Flow - Failed", { error });
10679
10837
  onError == null ? void 0 : onError(error);
10680
10838
  },
10681
- children: stepComponentRef.current ? render(stepComponentRef.current) : null
10839
+ children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
10840
+ "div",
10841
+ {
10842
+ id: (_b = (_a = stepComponentRef.current) == null ? void 0 : _a.step) == null ? void 0 : _b.id,
10843
+ className: "dynamic-flow",
10844
+ children: stepComponentRef.current ? render(stepComponentRef.current) : null
10845
+ }
10846
+ )
10682
10847
  }
10683
10848
  );
10684
10849
  }
10685
10850
 
10686
10851
  // src/revamp/DynamicFlowWise.tsx
10687
- var import_react19 = require("react");
10852
+ var import_react20 = require("react");
10688
10853
 
10689
10854
  // ../renderers/src/contexts/RendererHttpClientContext.tsx
10690
10855
  var import_react5 = require("react");
@@ -11047,124 +11212,26 @@ var DateInputRenderer_default = DateInputRenderer;
11047
11212
  // ../renderers/src/DecisionRenderer.tsx
11048
11213
  var import_components9 = require("@transferwise/components");
11049
11214
 
11050
- // ../../node_modules/.pnpm/@wise+art@2.7.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wise/art/dist/index.esm.js
11051
- var import_react7 = require("react");
11052
- var import_jsx_runtime17 = require("react/jsx-runtime");
11053
- var unknownFlagName = "wise";
11054
- var Flag = ({
11055
- code,
11056
- intrinsicSize = 64
11057
- }) => {
11058
- const [fallback, setFallback] = (0, import_react7.useState)(null);
11059
- (0, import_react7.useEffect)(() => {
11060
- setFallback(null);
11061
- }, [code]);
11062
- const detailed = intrinsicSize >= 150;
11063
- const name = fallback !== "unknown" ? `${code.toLowerCase()}${fallback == null && detailed ? "-detailed" : ""}` : unknownFlagName;
11064
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("img", {
11065
- src: `https://wise.com/web-art/assets/flags/${name}.svg`,
11066
- alt: "",
11067
- width: intrinsicSize,
11068
- height: intrinsicSize,
11069
- onError: () => {
11070
- setFallback((prev) => prev == null && detailed ? "simple" : "unknown");
11071
- }
11072
- });
11073
- };
11074
- var Sizes;
11075
- (function(Sizes2) {
11076
- Sizes2["SMALL"] = "small";
11077
- Sizes2["MEDIUM"] = "medium";
11078
- Sizes2["LARGE"] = "large";
11079
- })(Sizes || (Sizes = {}));
11080
- var imageSizes = {
11081
- [Sizes.SMALL]: 200,
11082
- [Sizes.MEDIUM]: 300,
11083
- [Sizes.LARGE]: 500
11084
- };
11085
- var Assets;
11086
- (function(Assets2) {
11087
- Assets2["BELL"] = "bell";
11088
- Assets2["BRIEFCASE"] = "briefcase";
11089
- Assets2["BUSINESS_CARD"] = "business-card";
11090
- Assets2["CALENDAR"] = "calendar";
11091
- Assets2["CHECK_MARK"] = "check-mark";
11092
- Assets2["CLOSED_WINDOW"] = "closed-window";
11093
- Assets2["COIN_PILE_DOWN"] = "coin-pile-down";
11094
- Assets2["COIN_PILE_UP"] = "coin-pile-up";
11095
- Assets2["CONFETTI"] = "confetti";
11096
- Assets2["CONSTRUCTION_FENCE"] = "construction-fence";
11097
- Assets2["CONVERT"] = "convert";
11098
- Assets2["COOKIE"] = "cookie";
11099
- Assets2["DIGITAL_CARD_2"] = "digital-card-2";
11100
- Assets2["DIGITAL_CARD"] = "digital-card";
11101
- Assets2["DOCUMENTS"] = "documents";
11102
- Assets2["DOOR"] = "door";
11103
- Assets2["ECO_CARD"] = "eco-card";
11104
- Assets2["ELECTRIC_PLUG"] = "electric-plug";
11105
- Assets2["EMAIL_SUCCESS"] = "email-success";
11106
- Assets2["EMAIL"] = "email";
11107
- Assets2["EXCLAMATION_MARK"] = "exclamation-mark";
11108
- Assets2["FLAG"] = "flag";
11109
- Assets2["FLOWER"] = "flower";
11110
- Assets2["GEAR"] = "gear";
11111
- Assets2["GLOBE"] = "globe";
11112
- Assets2["GRAPH"] = "graph";
11113
- Assets2["HEART_2"] = "heart-2";
11114
- Assets2["HEART_3"] = "heart-3";
11115
- Assets2["HEART_4"] = "heart-4";
11116
- Assets2["HEART_5"] = "heart-5";
11117
- Assets2["HEART"] = "heart";
11118
- Assets2["HOUSE"] = "house";
11119
- Assets2["ID_CARD"] = "id-card";
11120
- Assets2["INFINITE"] = "infinite";
11121
- Assets2["INVITE_LETTER"] = "invite-letter";
11122
- Assets2["JARS"] = "jars";
11123
- Assets2["KEY"] = "key";
11124
- Assets2["LIGHT_BULB"] = "light-bulb";
11125
- Assets2["LOCK"] = "lock";
11126
- Assets2["MAGNIFYING_GLASS"] = "magnifying-glass";
11127
- Assets2["MAP"] = "map";
11128
- Assets2["MARBLE_CARD_BUSINESS"] = "marble-card-business";
11129
- Assets2["MARBLE_CARD"] = "marble-card";
11130
- Assets2["MARBLE"] = "marble";
11131
- Assets2["MEGAPHONE"] = "megaphone";
11132
- Assets2["MULTI_CURRENCY"] = "multi-currency";
11133
- Assets2["ONE_INVITE_LETTER_OPENED"] = "one-invite-letter-opened";
11134
- Assets2["PALM_TREE"] = "palm-tree";
11135
- Assets2["PERCENTAGE"] = "percentage";
11136
- Assets2["PERSONAL_CARD"] = "personal-card";
11137
- Assets2["PHONES"] = "phones";
11138
- Assets2["PIE_CHART"] = "pie-chart";
11139
- Assets2["PLANE_2"] = "plane-2";
11140
- Assets2["PLANE"] = "plane";
11141
- Assets2["PUZZLE_PIECES"] = "puzzle-pieces";
11142
- Assets2["QUESTION_MARK"] = "question-mark";
11143
- Assets2["RECEIVE"] = "receive";
11144
- Assets2["REMINDER_LETTER"] = "reminder-letter";
11145
- Assets2["SAND_TIMER"] = "sand-timer";
11146
- Assets2["SHOPPING_BAG"] = "shopping-bag";
11147
- Assets2["SKIP_AUTHENTICATION"] = "skip-authentication";
11148
- Assets2["SPEECH_BUBBLE"] = "speech-bubble";
11149
- Assets2["TOOL"] = "tool";
11150
- Assets2["TWO_INVITE_LETTERS_OPENED"] = "two-invite-letters-opened";
11151
- Assets2["WALLET"] = "wallet";
11152
- })(Assets || (Assets = {}));
11215
+ // ../../node_modules/.pnpm/@wise+art@2.14.0_@transferwise+neptune-css@14.12.1_@types+react@18.3.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@wise/art/dist/index.esm.js
11216
+ init_index_93a0c34e_esm();
11217
+ init_clsx();
11218
+ var import_react8 = require("react");
11219
+ var import_jsx_runtime18 = require("react/jsx-runtime");
11153
11220
 
11154
11221
  // ../renderers/src/components/icon/FlagIcon.tsx
11155
- var import_jsx_runtime18 = require("react/jsx-runtime");
11222
+ var import_jsx_runtime19 = require("react/jsx-runtime");
11156
11223
  var isFlagIcon = (name) => name.startsWith("flag-");
11157
11224
  function FlagIcon({ name }) {
11158
11225
  if (!isFlagIcon(name)) {
11159
11226
  return null;
11160
11227
  }
11161
11228
  const code = name.substring(5);
11162
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Flag, { code });
11229
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Flag, { code });
11163
11230
  }
11164
11231
 
11165
11232
  // ../renderers/src/components/icon/NamedIcon.tsx
11166
11233
  var icons = __toESM(require("@transferwise/icons"));
11167
- var import_jsx_runtime19 = require("react/jsx-runtime");
11234
+ var import_jsx_runtime20 = require("react/jsx-runtime");
11168
11235
  var isNamedIcon = (name) => {
11169
11236
  const iconName = toCapitalisedCamelCase(name);
11170
11237
  return Object.keys(icons).includes(iconName);
@@ -11175,19 +11242,19 @@ function NamedIcon({ name }) {
11175
11242
  }
11176
11243
  const iconName = toCapitalisedCamelCase(name);
11177
11244
  const Icon = icons[iconName];
11178
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Icon, { size: 24 });
11245
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Icon, { size: 24 });
11179
11246
  }
11180
11247
  var toCapitalisedCamelCase = (value) => value.split("-").map(capitaliseFirstChar).join("");
11181
11248
  var capitaliseFirstChar = (value) => `${value[0].toUpperCase()}${value.slice(1)}`;
11182
11249
 
11183
11250
  // ../renderers/src/components/icon/DynamicIcon.tsx
11184
- var import_jsx_runtime20 = require("react/jsx-runtime");
11251
+ var import_jsx_runtime21 = require("react/jsx-runtime");
11185
11252
  function DynamicIcon({ name }) {
11186
11253
  if (isFlagIcon(name)) {
11187
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(FlagIcon, { name });
11254
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(FlagIcon, { name });
11188
11255
  }
11189
11256
  if (isNamedIcon(name)) {
11190
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(NamedIcon, { name });
11257
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(NamedIcon, { name });
11191
11258
  }
11192
11259
  return null;
11193
11260
  }
@@ -11195,78 +11262,81 @@ var DynamicIcon_default = DynamicIcon;
11195
11262
 
11196
11263
  // ../renderers/src/components/icon/NavigationOptionMedia.tsx
11197
11264
  var import_components8 = require("@transferwise/components");
11198
- var import_jsx_runtime21 = require("react/jsx-runtime");
11265
+ var import_jsx_runtime22 = require("react/jsx-runtime");
11199
11266
  function NavigationOptionMedia({ icon, image }) {
11200
11267
  if (!isNullish2(icon)) {
11201
11268
  if ("name" in icon) {
11202
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_components8.Avatar, { type: import_components8.AvatarType.ICON, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DynamicIcon_default, { name: icon.name }) });
11269
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_components8.Avatar, { type: import_components8.AvatarType.ICON, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(DynamicIcon_default, { name: icon.name }) });
11203
11270
  }
11204
11271
  if (icon.text) {
11205
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_components8.Avatar, { type: import_components8.AvatarType.INITIALS, children: icon.text });
11272
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_components8.Avatar, { type: import_components8.AvatarType.INITIALS, children: icon.text });
11206
11273
  }
11207
11274
  }
11208
11275
  if (image == null ? void 0 : image.url) {
11209
11276
  const { url, accessibilityDescription } = image;
11210
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("img", { src: url, alt: accessibilityDescription });
11277
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("img", { src: url, alt: accessibilityDescription });
11211
11278
  }
11212
11279
  return null;
11213
11280
  }
11214
11281
 
11215
11282
  // ../renderers/src/DecisionRenderer.tsx
11216
- var import_jsx_runtime22 = require("react/jsx-runtime");
11283
+ var import_jsx_runtime23 = require("react/jsx-runtime");
11217
11284
  var DecisionRenderer = {
11218
11285
  canRenderType: "decision",
11219
11286
  render: DecisionRendererComponent
11220
11287
  };
11221
11288
  var DecisionRenderer_default = DecisionRenderer;
11222
- function DecisionRendererComponent({ margin, options }) {
11289
+ function DecisionRendererComponent({ margin, options, title }) {
11223
11290
  const { isLoading } = useLoadingContext();
11224
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: getMargin(margin), children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_components9.NavigationOptionsList, { children: options.map(({ description, disabled, icon, image, title, onClick }) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
11225
- import_components9.NavigationOption,
11226
- {
11227
- title,
11228
- content: description,
11229
- disabled: isLoading || disabled,
11230
- media: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(NavigationOptionMedia, { icon, image }),
11231
- showMediaCircle: false,
11232
- showMediaAtAllSizes: true,
11233
- onClick
11234
- },
11235
- JSON.stringify(title)
11236
- )) }) });
11291
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: getMargin(margin), children: [
11292
+ title && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_components9.Header, { as: "h2", title }),
11293
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_components9.NavigationOptionsList, { children: options.map(({ description, disabled, icon, image, title: title2, onClick }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
11294
+ import_components9.NavigationOption,
11295
+ {
11296
+ title: title2,
11297
+ content: description,
11298
+ disabled: isLoading || disabled,
11299
+ media: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(NavigationOptionMedia, { icon, image }),
11300
+ showMediaCircle: false,
11301
+ showMediaAtAllSizes: true,
11302
+ onClick
11303
+ },
11304
+ JSON.stringify(title2)
11305
+ )) })
11306
+ ] });
11237
11307
  }
11238
11308
 
11239
11309
  // ../renderers/src/DividerRenderer.tsx
11240
- var import_jsx_runtime23 = require("react/jsx-runtime");
11310
+ var import_jsx_runtime24 = require("react/jsx-runtime");
11241
11311
  var DividerRenderer = {
11242
11312
  canRenderType: "divider",
11243
- render: ({ margin }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("hr", { className: `m-t-0 ${getMargin(margin)}` })
11313
+ render: ({ margin }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("hr", { className: `m-t-0 ${getMargin(margin)}` })
11244
11314
  };
11245
11315
  var DividerRenderer_default = DividerRenderer;
11246
11316
 
11247
11317
  // ../renderers/src/FormRenderer.tsx
11248
- var import_jsx_runtime24 = require("react/jsx-runtime");
11318
+ var import_jsx_runtime25 = require("react/jsx-runtime");
11249
11319
  var FormRenderer = {
11250
11320
  canRenderType: "form",
11251
- render: ({ children, margin }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: getMargin(margin), children })
11321
+ render: ({ children, margin }) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: getMargin(margin), children })
11252
11322
  };
11253
11323
  var FormRenderer_default = FormRenderer;
11254
11324
 
11255
11325
  // ../renderers/src/FormSectionRenderer.tsx
11256
11326
  var import_components10 = require("@transferwise/components");
11257
- var import_jsx_runtime25 = require("react/jsx-runtime");
11327
+ var import_jsx_runtime26 = require("react/jsx-runtime");
11258
11328
  var FormSectionRenderer = {
11259
11329
  canRenderType: "form-section",
11260
- render: ({ title, description, children }) => /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("fieldset", { children: [
11330
+ render: ({ title, description, children }) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("fieldset", { children: [
11261
11331
  title && // TODO - once section headers support help, we could show help in here
11262
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
11332
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
11263
11333
  import_components10.Header,
11264
11334
  {
11265
11335
  as: "h2",
11266
11336
  title
11267
11337
  }
11268
11338
  ),
11269
- description && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { children: description }),
11339
+ description && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { children: description }),
11270
11340
  children
11271
11341
  ] })
11272
11342
  };
@@ -11274,32 +11344,32 @@ var FormSectionRenderer_default = FormSectionRenderer;
11274
11344
 
11275
11345
  // ../renderers/src/HeadingRenderer.tsx
11276
11346
  var import_components11 = require("@transferwise/components");
11277
- var import_jsx_runtime26 = require("react/jsx-runtime");
11347
+ var import_jsx_runtime27 = require("react/jsx-runtime");
11278
11348
  var HeadingRenderer = {
11279
11349
  canRenderType: "heading",
11280
- render: (props) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Heading, __spreadValues({}, props))
11350
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Heading, __spreadValues({}, props))
11281
11351
  };
11282
11352
  function Heading(props) {
11283
11353
  const { text, size, align, margin, control } = props;
11284
11354
  const className = getTextAlignmentAndMargin({ align, margin });
11285
- return control === "display" ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(DisplayHeading, { size, text, className }) : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(StandardHeading, { size, text, className });
11355
+ return control === "display" ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(DisplayHeading, { size, text, className }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(StandardHeading, { size, text, className });
11286
11356
  }
11287
11357
  function DisplayHeading({ size, text, className }) {
11288
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_components11.Display, { type: getDisplayType(size), className, children: text });
11358
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_components11.Display, { type: getDisplayType(size), className, children: text });
11289
11359
  }
11290
11360
  function StandardHeading({ size, text, className }) {
11291
11361
  switch (size) {
11292
11362
  case "xs":
11293
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("h5", { className, children: text });
11363
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("h5", { className, children: text });
11294
11364
  case "sm":
11295
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("h4", { className, children: text });
11365
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("h4", { className, children: text });
11296
11366
  case "lg":
11297
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("h2", { className, children: text });
11367
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("h2", { className, children: text });
11298
11368
  case "xl":
11299
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("h1", { className, children: text });
11369
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("h1", { className, children: text });
11300
11370
  case "md":
11301
11371
  default:
11302
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("h3", { className, children: text });
11372
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("h3", { className, children: text });
11303
11373
  }
11304
11374
  }
11305
11375
  var getDisplayType = (size) => {
@@ -11319,7 +11389,7 @@ var HeadingRenderer_default = HeadingRenderer;
11319
11389
 
11320
11390
  // ../renderers/src/ImageRenderer.tsx
11321
11391
  var import_components12 = require("@transferwise/components");
11322
- var import_react8 = require("react");
11392
+ var import_react9 = require("react");
11323
11393
 
11324
11394
  // ../renderers/src/utils/api-utils.ts
11325
11395
  function isRelativePath2(url = "") {
@@ -11329,10 +11399,10 @@ function isRelativePath2(url = "") {
11329
11399
  }
11330
11400
 
11331
11401
  // ../renderers/src/ImageRenderer.tsx
11332
- var import_jsx_runtime27 = require("react/jsx-runtime");
11402
+ var import_jsx_runtime28 = require("react/jsx-runtime");
11333
11403
  var ImageRenderer = {
11334
11404
  canRenderType: "image",
11335
- render: (props) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ImageRendererComponent, __spreadValues({}, props))
11405
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ImageRendererComponent, __spreadValues({}, props))
11336
11406
  };
11337
11407
  var ImageRenderer_default = ImageRenderer;
11338
11408
  function ImageRendererComponent({
@@ -11341,12 +11411,12 @@ function ImageRendererComponent({
11341
11411
  size,
11342
11412
  url
11343
11413
  }) {
11344
- const [imageSource, setImageSource] = (0, import_react8.useState)("");
11414
+ const [imageSource, setImageSource] = (0, import_react9.useState)("");
11345
11415
  const httpClient = useRendererHttpClient();
11346
- (0, import_react8.useEffect)(() => {
11416
+ (0, import_react9.useEffect)(() => {
11347
11417
  void getImageSource(httpClient, url).then(setImageSource);
11348
11418
  }, [url, httpClient]);
11349
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: `df-image ${size || "md"}`, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
11419
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: `df-image ${size || "md"}`, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
11350
11420
  import_components12.Image,
11351
11421
  {
11352
11422
  className: `img-responsive ${getMargin(margin)}`,
@@ -11391,7 +11461,7 @@ var getImageSource = async (httpClient, imageUrl) => {
11391
11461
 
11392
11462
  // ../renderers/src/InstructionsRenderer.tsx
11393
11463
  var import_components13 = require("@transferwise/components");
11394
- var import_jsx_runtime28 = require("react/jsx-runtime");
11464
+ var import_jsx_runtime29 = require("react/jsx-runtime");
11395
11465
  var doContext = ["positive", "neutral"];
11396
11466
  var dontContext = ["warning", "negative"];
11397
11467
  var InstructionsRenderer = {
@@ -11399,9 +11469,9 @@ var InstructionsRenderer = {
11399
11469
  render: ({ items, margin, title }) => {
11400
11470
  const dos = items.filter((item) => doContext.includes(item.context)).map(({ text }) => text);
11401
11471
  const donts = items.filter((item) => dontContext.includes(item.context)).map(({ text }) => text);
11402
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: getMargin(margin), children: [
11403
- title ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_components13.Header, { title }) : null,
11404
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_components13.InstructionsList, { dos, donts })
11472
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: getMargin(margin), children: [
11473
+ title ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_components13.Header, { title }) : null,
11474
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_components13.InstructionsList, { dos, donts })
11405
11475
  ] });
11406
11476
  }
11407
11477
  };
@@ -11418,12 +11488,12 @@ var onWheel = (event) => {
11418
11488
  };
11419
11489
 
11420
11490
  // ../renderers/src/IntegerInputRenderer.tsx
11421
- var import_jsx_runtime29 = require("react/jsx-runtime");
11491
+ var import_jsx_runtime30 = require("react/jsx-runtime");
11422
11492
  var IntegerInputRenderer = {
11423
11493
  canRenderType: "input-integer",
11424
11494
  render: (props) => {
11425
11495
  const _a = props, { id, label, error, description, help, type, value, onChange } = _a, rest = __objRest(_a, ["id", "label", "error", "description", "help", "type", "value", "onChange"]);
11426
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(FieldInput_default, { id, label, description, error, help, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
11496
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(FieldInput_default, { id, label, description, error, help, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
11427
11497
  import_components14.Input,
11428
11498
  __spreadValues({
11429
11499
  id,
@@ -11445,10 +11515,10 @@ var IntegerInputRenderer_default = IntegerInputRenderer;
11445
11515
 
11446
11516
  // ../renderers/src/LoadingIndicatorRenderer.tsx
11447
11517
  var import_components15 = require("@transferwise/components");
11448
- var import_jsx_runtime30 = require("react/jsx-runtime");
11518
+ var import_jsx_runtime31 = require("react/jsx-runtime");
11449
11519
  var LoadingIndicatorRenderer = {
11450
11520
  canRenderType: "loading-indicator",
11451
- render: ({ margin, size }) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
11521
+ render: ({ margin, size }) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
11452
11522
  import_components15.Loader,
11453
11523
  {
11454
11524
  size,
@@ -11461,27 +11531,27 @@ var LoadingIndicatorRenderer_default = LoadingIndicatorRenderer;
11461
11531
 
11462
11532
  // ../renderers/src/MarkdownRenderer.tsx
11463
11533
  var import_components16 = require("@transferwise/components");
11464
- var import_jsx_runtime31 = require("react/jsx-runtime");
11534
+ var import_jsx_runtime32 = require("react/jsx-runtime");
11465
11535
  var MarkdownRenderer = {
11466
11536
  canRenderType: "markdown",
11467
- render: ({ content, align, margin }) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: getTextAlignmentAndMargin({ align, margin }), children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_components16.Markdown, { config: { link: { target: "_blank" } }, children: content }) })
11537
+ render: ({ content, align, margin }) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: getTextAlignmentAndMargin({ align, margin }), children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_components16.Markdown, { config: { link: { target: "_blank" } }, children: content }) })
11468
11538
  };
11469
11539
  var MarkdownRenderer_default = MarkdownRenderer;
11470
11540
 
11471
11541
  // ../renderers/src/ModalRenderer.tsx
11472
11542
  var import_components17 = require("@transferwise/components");
11473
- var import_react9 = require("react");
11474
- var import_jsx_runtime32 = require("react/jsx-runtime");
11543
+ var import_react10 = require("react");
11544
+ var import_jsx_runtime33 = require("react/jsx-runtime");
11475
11545
  var ModalRenderer = {
11476
11546
  canRenderType: "modal",
11477
- render: (props) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DFModal, __spreadValues({}, props))
11547
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(DFModal, __spreadValues({}, props))
11478
11548
  };
11479
11549
  var ModalRenderer_default = ModalRenderer;
11480
11550
  function DFModal({ content, margin, trigger }) {
11481
- const [visible, setVisible] = (0, import_react9.useState)(false);
11482
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: getMargin(margin), children: [
11483
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_components17.Button, { priority: "tertiary", block: true, onClick: () => setVisible(true), children: trigger.title }),
11484
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
11551
+ const [visible, setVisible] = (0, import_react10.useState)(false);
11552
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: getMargin(margin), children: [
11553
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_components17.Button, { priority: "tertiary", block: true, onClick: () => setVisible(true), children: trigger.title }),
11554
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
11485
11555
  import_components17.Modal,
11486
11556
  {
11487
11557
  scroll: "content",
@@ -11499,16 +11569,16 @@ var import_components19 = require("@transferwise/components");
11499
11569
 
11500
11570
  // ../renderers/src/SelectInputRenderer/OptionMedia.tsx
11501
11571
  var import_components18 = require("@transferwise/components");
11502
- var import_jsx_runtime33 = require("react/jsx-runtime");
11572
+ var import_jsx_runtime34 = require("react/jsx-runtime");
11503
11573
  function OptionMedia({ icon, image }) {
11504
11574
  if (image == null ? void 0 : image.url) {
11505
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("img", { src: image.url, alt: image.accessibilityDescription || "", width: "64px" });
11575
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("img", { src: image.url, alt: image.accessibilityDescription || "", width: "64px" });
11506
11576
  }
11507
11577
  if (icon && "name" in icon) {
11508
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_components18.Avatar, { type: import_components18.AvatarType.ICON, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(DynamicIcon_default, { name: icon.name }) });
11578
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_components18.Avatar, { type: import_components18.AvatarType.ICON, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(DynamicIcon_default, { name: icon.name }) });
11509
11579
  }
11510
11580
  if (icon && "text" in icon) {
11511
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_components18.Avatar, { type: import_components18.AvatarType.INITIALS, children: icon.text });
11581
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_components18.Avatar, { type: import_components18.AvatarType.INITIALS, children: icon.text });
11512
11582
  }
11513
11583
  return null;
11514
11584
  }
@@ -11527,15 +11597,15 @@ var multi_select_messages_default = (0, import_react_intl9.defineMessages)({
11527
11597
  });
11528
11598
 
11529
11599
  // ../renderers/src/MultiSelectInputRenderer.tsx
11530
- var import_react10 = require("react");
11531
- var import_jsx_runtime34 = require("react/jsx-runtime");
11600
+ var import_react11 = require("react");
11601
+ var import_jsx_runtime35 = require("react/jsx-runtime");
11532
11602
  var MultiSelectInputRenderer = {
11533
11603
  canRenderType: "input-multi-select",
11534
- render: (props) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(MultiSelectInputRendererComponent, __spreadValues({}, props))
11604
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(MultiSelectInputRendererComponent, __spreadValues({}, props))
11535
11605
  };
11536
11606
  function MultiSelectInputRendererComponent(props) {
11537
11607
  const { formatMessage } = (0, import_react_intl10.useIntl)();
11538
- const [stagedIndices, setStagedIndices] = (0, import_react10.useState)();
11608
+ const [stagedIndices, setStagedIndices] = (0, import_react11.useState)();
11539
11609
  const {
11540
11610
  id,
11541
11611
  description,
@@ -11572,11 +11642,11 @@ function MultiSelectInputRendererComponent(props) {
11572
11642
  const contentProps = {
11573
11643
  title: option.title,
11574
11644
  description: option.description,
11575
- icon: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(OptionMedia, { icon: option.icon, image: option.image })
11645
+ icon: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(OptionMedia, { icon: option.icon, image: option.image })
11576
11646
  };
11577
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_components19.SelectInputOptionContent, __spreadValues({}, contentProps));
11647
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_components19.SelectInputOptionContent, __spreadValues({}, contentProps));
11578
11648
  };
11579
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
11649
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
11580
11650
  import_components19.SelectInput,
11581
11651
  {
11582
11652
  id,
@@ -11618,7 +11688,7 @@ var import_components21 = require("@transferwise/components");
11618
11688
  // ../renderers/src/components/UploadFieldInput.tsx
11619
11689
  var import_components20 = require("@transferwise/components");
11620
11690
  var import_classnames3 = __toESM(require_classnames());
11621
- var import_jsx_runtime35 = require("react/jsx-runtime");
11691
+ var import_jsx_runtime36 = require("react/jsx-runtime");
11622
11692
  function UploadFieldInput({
11623
11693
  id,
11624
11694
  children,
@@ -11627,18 +11697,18 @@ function UploadFieldInput({
11627
11697
  error,
11628
11698
  help
11629
11699
  }) {
11630
- const labelContent = label && help ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(LabelContentWithHelp, { text: label, help }) : label;
11700
+ const labelContent = label && help ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(LabelContentWithHelp, { text: label, help }) : label;
11631
11701
  const descriptionId = description ? `${id}-description` : void 0;
11632
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
11702
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
11633
11703
  "div",
11634
11704
  {
11635
11705
  className: (0, import_classnames3.default)("form-group d-block", {
11636
11706
  "has-error": !!error
11637
11707
  }),
11638
11708
  children: [
11639
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("label", { htmlFor: id, className: "control-label", children: labelContent }),
11709
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("label", { htmlFor: id, className: "control-label", children: labelContent }),
11640
11710
  children,
11641
- error && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_components20.InlineAlert, { type: "negative", id: descriptionId, children: error })
11711
+ error && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_components20.InlineAlert, { type: "negative", id: descriptionId, children: error })
11642
11712
  ]
11643
11713
  }
11644
11714
  );
@@ -11670,7 +11740,7 @@ var getFileType = (base64Url) => {
11670
11740
  var getRandomId = () => Math.random().toString(36).substring(2);
11671
11741
 
11672
11742
  // ../renderers/src/MultiUploadInputRenderer.tsx
11673
- var import_jsx_runtime36 = require("react/jsx-runtime");
11743
+ var import_jsx_runtime37 = require("react/jsx-runtime");
11674
11744
  var MultiUploadInputRenderer = {
11675
11745
  canRenderType: "input-upload-multi",
11676
11746
  render: (props) => {
@@ -11697,7 +11767,7 @@ var MultiUploadInputRenderer = {
11697
11767
  };
11698
11768
  const onDeleteFile = async (fileId) => onDelete(String(fileId));
11699
11769
  const descriptionId = description ? `${id}-description` : void 0;
11700
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(UploadFieldInput_default, { id, label, description, error, help, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
11770
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(UploadFieldInput_default, { id, label, description, error, help, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
11701
11771
  import_components21.UploadInput,
11702
11772
  {
11703
11773
  id,
@@ -11720,12 +11790,12 @@ var MultiUploadInputRenderer_default = MultiUploadInputRenderer;
11720
11790
 
11721
11791
  // ../renderers/src/NumberInputRenderer.tsx
11722
11792
  var import_components22 = require("@transferwise/components");
11723
- var import_jsx_runtime37 = require("react/jsx-runtime");
11793
+ var import_jsx_runtime38 = require("react/jsx-runtime");
11724
11794
  var NumberInputRenderer = {
11725
11795
  canRenderType: "input-number",
11726
11796
  render: (props) => {
11727
11797
  const _a = props, { id, label, error, description, help, type, value, onChange } = _a, rest = __objRest(_a, ["id", "label", "error", "description", "help", "type", "value", "onChange"]);
11728
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(FieldInput_default, { id, label, description, error, help, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
11798
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(FieldInput_default, { id, label, description, error, help, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
11729
11799
  import_components22.Input,
11730
11800
  __spreadValues({
11731
11801
  id,
@@ -11748,9 +11818,9 @@ var import_react_intl12 = require("react-intl");
11748
11818
 
11749
11819
  // ../renderers/src/hooks/useSnackBarIfAvailable.ts
11750
11820
  var import_components23 = require("@transferwise/components");
11751
- var import_react11 = require("react");
11821
+ var import_react12 = require("react");
11752
11822
  function useSnackBarIfAvailable() {
11753
- const context = (0, import_react11.useContext)(import_components23.SnackbarContext);
11823
+ const context = (0, import_react12.useContext)(import_components23.SnackbarContext);
11754
11824
  return context ? context.createSnackbar : () => {
11755
11825
  };
11756
11826
  }
@@ -11775,17 +11845,17 @@ var paragraph_messages_default = (0, import_react_intl11.defineMessages)({
11775
11845
  });
11776
11846
 
11777
11847
  // ../renderers/src/ParagraphRenderer.tsx
11778
- var import_jsx_runtime38 = require("react/jsx-runtime");
11848
+ var import_jsx_runtime39 = require("react/jsx-runtime");
11779
11849
  var ParagraphRenderer = {
11780
11850
  canRenderType: "paragraph",
11781
- render: (props) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Paragraph, __spreadValues({}, props))
11851
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Paragraph, __spreadValues({}, props))
11782
11852
  };
11783
11853
  function Paragraph({ align, control, margin, text }) {
11784
11854
  const className = getTextAlignmentAndMargin({ align, margin });
11785
- return control === "copyable" ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(CopyableParagraph, { className, align, text }) : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(StandardParagraph, { className, text });
11855
+ return control === "copyable" ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(CopyableParagraph, { className, align, text }) : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(StandardParagraph, { className, text });
11786
11856
  }
11787
11857
  function StandardParagraph({ text, className }) {
11788
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { className, children: text });
11858
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className, children: text });
11789
11859
  }
11790
11860
  function CopyableParagraph({
11791
11861
  text,
@@ -11799,8 +11869,8 @@ function CopyableParagraph({
11799
11869
  });
11800
11870
  };
11801
11871
  const inputAlignmentClasses = getTextAlignmentAndMargin({ align, margin: "sm" });
11802
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className, children: [
11803
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
11872
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className, children: [
11873
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
11804
11874
  import_components24.Input,
11805
11875
  {
11806
11876
  type: "text",
@@ -11809,14 +11879,14 @@ function CopyableParagraph({
11809
11879
  className: (0, import_classnames4.default)("text-ellipsis", inputAlignmentClasses)
11810
11880
  }
11811
11881
  ),
11812
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_components24.Button, { block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
11882
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_components24.Button, { block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
11813
11883
  ] });
11814
11884
  }
11815
11885
  var ParagraphRenderer_default = ParagraphRenderer;
11816
11886
 
11817
11887
  // ../renderers/src/RepeatableRenderer.tsx
11818
11888
  var import_components25 = require("@transferwise/components");
11819
- var import_react12 = require("react");
11889
+ var import_react13 = require("react");
11820
11890
  var import_icons = require("@transferwise/icons");
11821
11891
  var import_react_intl14 = require("react-intl");
11822
11892
 
@@ -11847,10 +11917,10 @@ var repeatable_messages_default = (0, import_react_intl13.defineMessages)({
11847
11917
 
11848
11918
  // ../renderers/src/RepeatableRenderer.tsx
11849
11919
  var import_classnames5 = __toESM(require_classnames());
11850
- var import_jsx_runtime39 = require("react/jsx-runtime");
11920
+ var import_jsx_runtime40 = require("react/jsx-runtime");
11851
11921
  var RepeatableRenderer = {
11852
11922
  canRenderType: "repeatable",
11853
- render: (props) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Repeatable, __spreadValues({}, props))
11923
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Repeatable, __spreadValues({}, props))
11854
11924
  };
11855
11925
  function Repeatable(props) {
11856
11926
  const {
@@ -11867,7 +11937,7 @@ function Repeatable(props) {
11867
11937
  onRemove
11868
11938
  } = props;
11869
11939
  const { formatMessage } = (0, import_react_intl14.useIntl)();
11870
- const [openModalType, setOpenModalType] = (0, import_react12.useState)(null);
11940
+ const [openModalType, setOpenModalType] = (0, import_react13.useState)(null);
11871
11941
  const onAddItem = () => {
11872
11942
  onAdd();
11873
11943
  setOpenModalType("add");
@@ -11889,40 +11959,40 @@ function Repeatable(props) {
11889
11959
  const onCancelEdit = () => {
11890
11960
  setOpenModalType(null);
11891
11961
  };
11892
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
11893
- title && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_components25.Header, { title }),
11894
- description && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { children: description }),
11895
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
11962
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_jsx_runtime40.Fragment, { children: [
11963
+ title && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_components25.Header, { title }),
11964
+ description && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { children: description }),
11965
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
11896
11966
  "div",
11897
11967
  {
11898
11968
  className: (0, import_classnames5.default)("form-group", {
11899
11969
  "has-error": error
11900
11970
  }),
11901
11971
  children: [
11902
- items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ItemSummaryOption, { item, onClick: () => onEditItem(index) }, item.id)),
11903
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
11972
+ items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(ItemSummaryOption, { item, onClick: () => onEditItem(index) }, item.id)),
11973
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
11904
11974
  import_components25.NavigationOption,
11905
11975
  {
11906
- media: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_icons.Plus, {}),
11976
+ media: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_icons.Plus, {}),
11907
11977
  title: addItemTitle || formatMessage(repeatable_messages_default.addItemTitle),
11908
11978
  showMediaAtAllSizes: true,
11909
11979
  onClick: () => onAddItem()
11910
11980
  }
11911
11981
  ),
11912
- error && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_components25.InlineAlert, { type: "negative", children: error })
11982
+ error && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_components25.InlineAlert, { type: "negative", children: error })
11913
11983
  ]
11914
11984
  }
11915
11985
  ),
11916
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
11986
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
11917
11987
  import_components25.Modal,
11918
11988
  {
11919
11989
  open: openModalType !== null,
11920
11990
  title: (openModalType === "add" ? addItemTitle : editItemTitle) || formatMessage(repeatable_messages_default.addItemTitle),
11921
- body: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
11922
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "m-b-2", children: editableItem }),
11923
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { children: [
11924
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_components25.Button, { priority: "primary", block: true, className: "m-b-2", onClick: () => onSaveItem(), children: formatMessage(repeatable_messages_default.addItem) }),
11925
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_components25.Button, { priority: "secondary", type: "negative", block: true, onClick: () => onRemoveItem(), children: formatMessage(repeatable_messages_default.removeItem) })
11991
+ body: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_jsx_runtime40.Fragment, { children: [
11992
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "m-b-2", children: editableItem }),
11993
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { children: [
11994
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_components25.Button, { priority: "primary", block: true, className: "m-b-2", onClick: () => onSaveItem(), children: formatMessage(repeatable_messages_default.addItem) }),
11995
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_components25.Button, { priority: "secondary", type: "negative", block: true, onClick: () => onRemoveItem(), children: formatMessage(repeatable_messages_default.removeItem) })
11926
11996
  ] })
11927
11997
  ] }),
11928
11998
  onClose: () => onCancelEdit()
@@ -11934,10 +12004,10 @@ function ItemSummaryOption({
11934
12004
  item,
11935
12005
  onClick
11936
12006
  }) {
11937
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
12007
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
11938
12008
  import_components25.NavigationOption,
11939
12009
  {
11940
- media: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(NavigationOptionMedia, __spreadValues({}, item)),
12010
+ media: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(NavigationOptionMedia, __spreadValues({}, item)),
11941
12011
  title: item.title,
11942
12012
  content: item.description,
11943
12013
  showMediaAtAllSizes: true,
@@ -11974,13 +12044,13 @@ var generic_error_messages_default2 = (0, import_react_intl15.defineMessages)({
11974
12044
  });
11975
12045
 
11976
12046
  // ../renderers/src/SearchRenderer/ErrorResult.tsx
11977
- var import_jsx_runtime40 = require("react/jsx-runtime");
12047
+ var import_jsx_runtime41 = require("react/jsx-runtime");
11978
12048
  function ErrorResult({ state }) {
11979
12049
  const intl = (0, import_react_intl16.useIntl)();
11980
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("p", { className: "m-t-2", children: [
12050
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("p", { className: "m-t-2", children: [
11981
12051
  intl.formatMessage(generic_error_messages_default2.genericError),
11982
12052
  "\xA0",
11983
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
12053
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
11984
12054
  "a",
11985
12055
  {
11986
12056
  href: "/",
@@ -11995,8 +12065,8 @@ function ErrorResult({ state }) {
11995
12065
  }
11996
12066
 
11997
12067
  // ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
11998
- var import_react13 = require("react");
11999
- var import_jsx_runtime41 = require("react/jsx-runtime");
12068
+ var import_react14 = require("react");
12069
+ var import_jsx_runtime42 = require("react/jsx-runtime");
12000
12070
  function BlockSearchRendererComponent({
12001
12071
  id,
12002
12072
  isLoading,
@@ -12006,10 +12076,10 @@ function BlockSearchRendererComponent({
12006
12076
  state,
12007
12077
  title
12008
12078
  }) {
12009
- const [hasSearched, setHasSearched] = (0, import_react13.useState)(false);
12079
+ const [hasSearched, setHasSearched] = (0, import_react14.useState)(false);
12010
12080
  const trackEvent = useTrackEvent();
12011
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: getMargin(margin), children: [
12012
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(FieldInput_default, { id, description: "", error: "", help: "", label: title, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
12081
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: getMargin(margin), children: [
12082
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(FieldInput_default, { id, description: "", error: "", help: "", label: title, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
12013
12083
  import_components26.Input,
12014
12084
  {
12015
12085
  id,
@@ -12026,7 +12096,7 @@ function BlockSearchRendererComponent({
12026
12096
  }
12027
12097
  }
12028
12098
  ) }),
12029
- isLoading ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_jsx_runtime41.Fragment, { children: "Loading..." }) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(SearchResultContent, { state, onChange })
12099
+ isLoading ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_jsx_runtime42.Fragment, { children: "Loading..." }) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(SearchResultContent, { state, onChange })
12030
12100
  ] });
12031
12101
  }
12032
12102
  function SearchResultContent({
@@ -12035,29 +12105,29 @@ function SearchResultContent({
12035
12105
  }) {
12036
12106
  switch (state.type) {
12037
12107
  case "error":
12038
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(ErrorResult, { state });
12108
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ErrorResult, { state });
12039
12109
  case "results":
12040
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(SearchResults, { state, onChange });
12110
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(SearchResults, { state, onChange });
12041
12111
  case "noResults":
12042
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(EmptySearchResult, { state });
12112
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(EmptySearchResult, { state });
12043
12113
  case "pending":
12044
12114
  default:
12045
12115
  return null;
12046
12116
  }
12047
12117
  }
12048
12118
  function EmptySearchResult({ state }) {
12049
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_components26.Markdown, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
12119
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_components26.Markdown, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
12050
12120
  }
12051
12121
  function SearchResults({
12052
12122
  state
12053
12123
  }) {
12054
12124
  const trackEvent = useTrackEvent();
12055
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_components26.NavigationOptionsList, { children: state.results.map((result) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
12125
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_components26.NavigationOptionsList, { children: state.results.map((result) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
12056
12126
  import_components26.NavigationOption,
12057
12127
  {
12058
12128
  title: result.title,
12059
12129
  content: result.description,
12060
- media: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(NavigationOptionMedia, __spreadValues({}, result)),
12130
+ media: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(NavigationOptionMedia, __spreadValues({}, result)),
12061
12131
  showMediaCircle: false,
12062
12132
  showMediaAtAllSizes: true,
12063
12133
  onClick: () => {
@@ -12075,8 +12145,8 @@ var BlockSearchRendererComponent_default = BlockSearchRendererComponent;
12075
12145
  // ../renderers/src/SearchRenderer/InlineSearchRendererComponent.tsx
12076
12146
  var import_components27 = require("@transferwise/components");
12077
12147
  var import_icons2 = require("@transferwise/icons");
12078
- var import_react14 = require("react");
12079
- var import_jsx_runtime42 = require("react/jsx-runtime");
12148
+ var import_react15 = require("react");
12149
+ var import_jsx_runtime43 = require("react/jsx-runtime");
12080
12150
  function InlineSearchRenderer({
12081
12151
  id,
12082
12152
  isLoading,
@@ -12085,45 +12155,42 @@ function InlineSearchRenderer({
12085
12155
  state,
12086
12156
  title
12087
12157
  }) {
12088
- const [hasSearched, setHasSearched] = (0, import_react14.useState)(false);
12158
+ const [hasSearched, setHasSearched] = (0, import_react15.useState)(false);
12089
12159
  const trackEvent = useTrackEvent();
12090
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: getMargin(margin), children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(FieldInput_default, { id, description: "", error: "", help: "", label: title, children: [
12091
- id,
12092
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
12093
- import_components27.Typeahead,
12094
- {
12095
- id: "typeahead-input-id",
12096
- name: "typeahead-input-name",
12097
- size: "md",
12098
- maxHeight: 100,
12099
- footer: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(TypeaheadFooter, { state, isLoading }),
12100
- multiple: false,
12101
- clearable: false,
12102
- addon: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_icons2.Search, { size: 24 }),
12103
- options: state.type === "results" ? state.results.map(mapResultToTypeaheadOption) : [],
12104
- minQueryLength: 1,
12105
- onChange: (values) => {
12106
- if (values.length > 0) {
12107
- const [updatedValue] = values;
12108
- const { value: result } = updatedValue;
12109
- if (result) {
12110
- trackEvent("Search Result Selected", __spreadValues({
12111
- type: result.type
12112
- }, result.type === "action" ? { actionId: result.id } : {}));
12113
- result.onClick();
12114
- }
12115
- }
12116
- },
12117
- onInputChange: (query) => {
12118
- if (!hasSearched) {
12119
- setHasSearched(true);
12120
- trackEvent("Search Started");
12160
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: getMargin(margin), children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(FieldInput_default, { id, description: "", error: "", help: "", label: title, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
12161
+ import_components27.Typeahead,
12162
+ {
12163
+ id: "typeahead-input-id",
12164
+ name: "typeahead-input-name",
12165
+ size: "md",
12166
+ maxHeight: 100,
12167
+ footer: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(TypeaheadFooter, { state, isLoading }),
12168
+ multiple: false,
12169
+ clearable: false,
12170
+ addon: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_icons2.Search, { size: 24 }),
12171
+ options: state.type === "results" ? state.results.map(mapResultToTypeaheadOption) : [],
12172
+ minQueryLength: 1,
12173
+ onChange: (values) => {
12174
+ if (values.length > 0) {
12175
+ const [updatedValue] = values;
12176
+ const { value: result } = updatedValue;
12177
+ if (result) {
12178
+ trackEvent("Search Result Selected", __spreadValues({
12179
+ type: result.type
12180
+ }, result.type === "action" ? { actionId: result.id } : {}));
12181
+ result.onClick();
12121
12182
  }
12122
- onChange(query);
12123
12183
  }
12184
+ },
12185
+ onInputChange: (query) => {
12186
+ if (!hasSearched) {
12187
+ setHasSearched(true);
12188
+ trackEvent("Search Started");
12189
+ }
12190
+ onChange(query);
12124
12191
  }
12125
- )
12126
- ] }) });
12192
+ }
12193
+ ) }) });
12127
12194
  }
12128
12195
  function mapResultToTypeaheadOption(result) {
12129
12196
  return {
@@ -12136,29 +12203,29 @@ function mapResultToTypeaheadOption(result) {
12136
12203
  }
12137
12204
  function TypeaheadFooter({ state, isLoading }) {
12138
12205
  if (state.type === "noResults") {
12139
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_components27.Markdown, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
12206
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_components27.Markdown, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
12140
12207
  }
12141
12208
  if (state.type === "error") {
12142
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ErrorResult, { state }) });
12209
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ErrorResult, { state }) });
12143
12210
  }
12144
12211
  if (state.type === "pending" || isLoading) {
12145
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: "m-t-2 m-x-2", children: "Loading..." });
12212
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: "m-t-2 m-x-2", children: "Loading..." });
12146
12213
  }
12147
12214
  return null;
12148
12215
  }
12149
12216
  var InlineSearchRendererComponent_default = InlineSearchRenderer;
12150
12217
 
12151
12218
  // ../renderers/src/SearchRenderer/SearchRenderer.tsx
12152
- var import_jsx_runtime43 = require("react/jsx-runtime");
12219
+ var import_jsx_runtime44 = require("react/jsx-runtime");
12153
12220
  var SearchRenderer = {
12154
12221
  canRenderType: "search",
12155
- render: (props) => props.control === "inline" ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(BlockSearchRendererComponent_default, __spreadValues({}, props))
12222
+ render: (props) => props.control === "inline" ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(BlockSearchRendererComponent_default, __spreadValues({}, props))
12156
12223
  };
12157
12224
  var SearchRenderer_default = SearchRenderer;
12158
12225
 
12159
12226
  // ../renderers/src/SelectInputRenderer/RadioInputRendererComponent.tsx
12160
12227
  var import_components28 = require("@transferwise/components");
12161
- var import_jsx_runtime44 = require("react/jsx-runtime");
12228
+ var import_jsx_runtime45 = require("react/jsx-runtime");
12162
12229
  function RadioInputRendererComponent(props) {
12163
12230
  const {
12164
12231
  id,
@@ -12172,8 +12239,8 @@ function RadioInputRendererComponent(props) {
12172
12239
  selectedIndex,
12173
12240
  onSelect
12174
12241
  } = props;
12175
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_jsx_runtime44.Fragment, { children: [
12176
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
12242
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
12243
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
12177
12244
  import_components28.RadioGroup,
12178
12245
  {
12179
12246
  name: id,
@@ -12182,7 +12249,7 @@ function RadioInputRendererComponent(props) {
12182
12249
  value: index,
12183
12250
  secondary: option.description,
12184
12251
  disabled: option.disabled || disabled,
12185
- avatar: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(OptionMedia, { icon: option.icon, image: option.image })
12252
+ avatar: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(OptionMedia, { icon: option.icon, image: option.image })
12186
12253
  })),
12187
12254
  selectedValue: selectedIndex != null ? selectedIndex : void 0,
12188
12255
  onChange: onSelect
@@ -12195,8 +12262,8 @@ function RadioInputRendererComponent(props) {
12195
12262
 
12196
12263
  // ../renderers/src/SelectInputRenderer/TabInputRendererComponent.tsx
12197
12264
  var import_components29 = require("@transferwise/components");
12198
- var import_react15 = require("react");
12199
- var import_jsx_runtime45 = require("react/jsx-runtime");
12265
+ var import_react16 = require("react");
12266
+ var import_jsx_runtime46 = require("react/jsx-runtime");
12200
12267
  function TabInputRendererComponent(props) {
12201
12268
  const {
12202
12269
  id,
@@ -12210,13 +12277,13 @@ function TabInputRendererComponent(props) {
12210
12277
  selectedIndex,
12211
12278
  onSelect
12212
12279
  } = props;
12213
- (0, import_react15.useEffect)(() => {
12280
+ (0, import_react16.useEffect)(() => {
12214
12281
  if (!isValidIndex(selectedIndex, options.length)) {
12215
12282
  onSelect(0);
12216
12283
  }
12217
12284
  }, [selectedIndex, onSelect, options.length]);
12218
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
12219
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
12285
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
12286
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
12220
12287
  import_components29.Tabs,
12221
12288
  {
12222
12289
  name: id,
@@ -12225,7 +12292,7 @@ function TabInputRendererComponent(props) {
12225
12292
  title: option.title,
12226
12293
  // if we pass null, we get some props-types console errors
12227
12294
  // eslint-disable-next-line react/jsx-no-useless-fragment
12228
- content: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_jsx_runtime45.Fragment, {}),
12295
+ content: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_jsx_runtime46.Fragment, {}),
12229
12296
  disabled: option.disabled || disabled
12230
12297
  })),
12231
12298
  onTabSelect: onSelect
@@ -12241,22 +12308,22 @@ var import_components31 = require("@transferwise/components");
12241
12308
 
12242
12309
  // ../renderers/src/SelectInputRenderer/SelectTriggerMedia.tsx
12243
12310
  var import_components30 = require("@transferwise/components");
12244
- var import_jsx_runtime46 = require("react/jsx-runtime");
12311
+ var import_jsx_runtime47 = require("react/jsx-runtime");
12245
12312
  function SelectTriggerMedia({ icon, image }) {
12246
12313
  if (image == null ? void 0 : image.url) {
12247
12314
  return null;
12248
12315
  }
12249
12316
  if (icon && "name" in icon) {
12250
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_components30.Avatar, { type: import_components30.AvatarType.ICON, size: 24, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(DynamicIcon_default, { name: icon.name }) });
12317
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_components30.Avatar, { type: import_components30.AvatarType.ICON, size: 24, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(DynamicIcon_default, { name: icon.name }) });
12251
12318
  }
12252
12319
  if (icon && "text" in icon) {
12253
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_components30.Avatar, { type: import_components30.AvatarType.ICON, size: 24, children: icon.text });
12320
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_components30.Avatar, { type: import_components30.AvatarType.ICON, size: 24, children: icon.text });
12254
12321
  }
12255
12322
  return null;
12256
12323
  }
12257
12324
 
12258
12325
  // ../renderers/src/SelectInputRenderer/SelectInputRendererComponent.tsx
12259
- var import_jsx_runtime47 = require("react/jsx-runtime");
12326
+ var import_jsx_runtime48 = require("react/jsx-runtime");
12260
12327
  function SelectInputRendererComponent(props) {
12261
12328
  const {
12262
12329
  id,
@@ -12291,16 +12358,16 @@ function SelectInputRendererComponent(props) {
12291
12358
  const contentProps = withinTrigger ? {
12292
12359
  title: option.title,
12293
12360
  note: option.description,
12294
- icon: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(SelectTriggerMedia, { icon: option.icon, image: option.image })
12361
+ icon: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SelectTriggerMedia, { icon: option.icon, image: option.image })
12295
12362
  } : {
12296
12363
  title: option.title,
12297
12364
  description: option.description,
12298
- icon: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(OptionMedia, { icon: option.icon, image: option.image })
12365
+ icon: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(OptionMedia, { icon: option.icon, image: option.image })
12299
12366
  };
12300
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_components31.SelectInputOptionContent, __spreadValues({}, contentProps));
12367
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_components31.SelectInputOptionContent, __spreadValues({}, contentProps));
12301
12368
  };
12302
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
12303
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
12369
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
12370
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
12304
12371
  import_components31.SelectInput,
12305
12372
  {
12306
12373
  name: id,
@@ -12319,18 +12386,18 @@ function SelectInputRendererComponent(props) {
12319
12386
  }
12320
12387
 
12321
12388
  // ../renderers/src/SelectInputRenderer/SegmentedInputRendererComponent.tsx
12322
- var import_react16 = require("react");
12389
+ var import_react17 = require("react");
12323
12390
  var import_components32 = require("@transferwise/components");
12324
- var import_jsx_runtime48 = require("react/jsx-runtime");
12391
+ var import_jsx_runtime49 = require("react/jsx-runtime");
12325
12392
  function SegmentedInputRendererComponent(props) {
12326
12393
  const { id, children, description, error, help, label, options, selectedIndex, onSelect } = props;
12327
- (0, import_react16.useEffect)(() => {
12394
+ (0, import_react17.useEffect)(() => {
12328
12395
  if (!isValidIndex2(selectedIndex, options.length)) {
12329
12396
  onSelect(0);
12330
12397
  }
12331
12398
  }, [selectedIndex, onSelect, options.length]);
12332
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
12333
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
12399
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
12400
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(FieldInput_default, { id, label, help, description, error, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
12334
12401
  import_components32.SegmentedControl,
12335
12402
  {
12336
12403
  name: `${id}-segmented-control`,
@@ -12345,26 +12412,26 @@ function SegmentedInputRendererComponent(props) {
12345
12412
  onChange: (value) => onSelect(Number(value))
12346
12413
  }
12347
12414
  ) }),
12348
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { id: `${id}-children`, children })
12415
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { id: `${id}-children`, children })
12349
12416
  ] });
12350
12417
  }
12351
12418
  var isValidIndex2 = (index, options) => index !== null && index >= 0 && index < options;
12352
12419
 
12353
12420
  // ../renderers/src/SelectInputRenderer/SelectInputRenderer.tsx
12354
- var import_jsx_runtime49 = require("react/jsx-runtime");
12421
+ var import_jsx_runtime50 = require("react/jsx-runtime");
12355
12422
  var SelectInputRenderer = {
12356
12423
  canRenderType: "input-select",
12357
12424
  render: (props) => {
12358
12425
  switch (props.control) {
12359
12426
  case "radio":
12360
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(RadioInputRendererComponent, __spreadValues({}, props));
12427
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(RadioInputRendererComponent, __spreadValues({}, props));
12361
12428
  case "tab":
12362
- return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(TabInputRendererComponent, __spreadValues({}, props));
12429
+ return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(TabInputRendererComponent, __spreadValues({}, props));
12363
12430
  case "segmented":
12364
- return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SegmentedInputRendererComponent, __spreadValues({}, props));
12431
+ return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SegmentedInputRendererComponent, __spreadValues({}, props));
12365
12432
  case "select":
12366
12433
  default:
12367
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SelectInputRendererComponent, __spreadValues({}, props));
12434
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SelectInputRendererComponent, __spreadValues({}, props));
12368
12435
  }
12369
12436
  }
12370
12437
  };
@@ -12372,17 +12439,17 @@ var SelectInputRenderer_default = SelectInputRenderer;
12372
12439
 
12373
12440
  // ../renderers/src/StatusListRenderer.tsx
12374
12441
  var import_components33 = require("@transferwise/components");
12375
- var import_jsx_runtime50 = require("react/jsx-runtime");
12442
+ var import_jsx_runtime51 = require("react/jsx-runtime");
12376
12443
  var StatusListRenderer = {
12377
12444
  canRenderType: "status-list",
12378
- render: ({ margin, items, title }) => /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: getMargin(margin), children: [
12379
- title ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_components33.Header, { title }) : null,
12380
- items.map(({ description, icon, status, title: itemTitle }) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
12445
+ render: ({ margin, items, title }) => /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: getMargin(margin), children: [
12446
+ title ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_components33.Header, { title }) : null,
12447
+ items.map(({ description, icon, status, title: itemTitle }) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
12381
12448
  import_components33.Summary,
12382
12449
  {
12383
12450
  title: itemTitle,
12384
12451
  description,
12385
- icon: icon && "name" in icon ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(DynamicIcon_default, { name: icon.name }) : null,
12452
+ icon: icon && "name" in icon ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(DynamicIcon_default, { name: icon.name }) : null,
12386
12453
  status: mapStatus(status)
12387
12454
  },
12388
12455
  `${title}/${description || ""}`
@@ -12399,31 +12466,31 @@ var mapStatus = (status) => {
12399
12466
 
12400
12467
  // ../renderers/src/components/VariableTextInput.tsx
12401
12468
  var import_components34 = require("@transferwise/components");
12402
- var import_jsx_runtime51 = require("react/jsx-runtime");
12469
+ var import_jsx_runtime52 = require("react/jsx-runtime");
12403
12470
  function VariableTextInput({
12404
12471
  control,
12405
12472
  inputProps
12406
12473
  }) {
12407
12474
  switch (control) {
12408
12475
  case "password":
12409
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(TextInput, __spreadValues({ type: "password" }, inputProps));
12476
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(TextInput, __spreadValues({ type: "password" }, inputProps));
12410
12477
  case "email":
12411
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(TextInput, __spreadValues({ type: "email" }, inputProps));
12478
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(TextInput, __spreadValues({ type: "email" }, inputProps));
12412
12479
  case "textarea":
12413
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(TextAreaInput, __spreadValues({}, inputProps));
12480
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(TextAreaInput, __spreadValues({}, inputProps));
12414
12481
  case "numeric":
12415
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(NumericInput, __spreadValues({ type: "number" }, inputProps));
12482
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(NumericInput, __spreadValues({ type: "number" }, inputProps));
12416
12483
  case "phone-number":
12417
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(PhoneNumberInput, __spreadValues({}, inputProps));
12484
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(PhoneNumberInput, __spreadValues({}, inputProps));
12418
12485
  default:
12419
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(TextInput, __spreadValues({ type: "text" }, inputProps));
12486
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(TextInput, __spreadValues({ type: "text" }, inputProps));
12420
12487
  }
12421
12488
  }
12422
12489
  function TextInput(_a) {
12423
12490
  var _b = _a, { id, displayFormat, onChange } = _b, rest = __objRest(_b, ["id", "displayFormat", "onChange"]);
12424
12491
  if (typeof displayFormat === "string") {
12425
12492
  const inputProps = __spreadValues({ id, name: id, className: "form-control" }, rest);
12426
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
12493
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
12427
12494
  import_components34.InputWithDisplayFormat,
12428
12495
  __spreadValues({
12429
12496
  displayPattern: displayFormat,
@@ -12431,29 +12498,29 @@ function TextInput(_a) {
12431
12498
  }, inputProps)
12432
12499
  );
12433
12500
  }
12434
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_components34.Input, __spreadValues({ id, name: id, onChange: (e) => onChange(e.target.value) }, rest));
12501
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_components34.Input, __spreadValues({ id, name: id, onChange: (e) => onChange(e.target.value) }, rest));
12435
12502
  }
12436
12503
  function TextAreaInput(_a) {
12437
12504
  var _b = _a, { id, displayFormat, onChange } = _b, rest = __objRest(_b, ["id", "displayFormat", "onChange"]);
12438
12505
  const textAreaProps = __spreadValues({ id, name: id }, rest);
12439
- return typeof displayFormat === "string" ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
12506
+ return typeof displayFormat === "string" ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
12440
12507
  import_components34.TextareaWithDisplayFormat,
12441
12508
  __spreadValues({
12442
12509
  displayPattern: displayFormat,
12443
12510
  onChange: (newValue) => onChange(newValue)
12444
12511
  }, textAreaProps)
12445
- ) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_components34.TextArea, __spreadValues({ onChange: (e) => onChange(e.target.value) }, textAreaProps));
12512
+ ) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_components34.TextArea, __spreadValues({ onChange: (e) => onChange(e.target.value) }, textAreaProps));
12446
12513
  }
12447
12514
  function NumericInput(_a) {
12448
12515
  var _b = _a, { id, displayFormat, onChange } = _b, rest = __objRest(_b, ["id", "displayFormat", "onChange"]);
12449
12516
  const numericProps = __spreadValues({ id, name: id, onWheel }, rest);
12450
- return typeof displayFormat === "string" ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
12517
+ return typeof displayFormat === "string" ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
12451
12518
  import_components34.InputWithDisplayFormat,
12452
12519
  __spreadValues({
12453
12520
  displayPattern: displayFormat,
12454
12521
  onChange: (newValue) => onChange(numericValueOrNull(newValue))
12455
12522
  }, numericProps)
12456
- ) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
12523
+ ) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
12457
12524
  import_components34.Input,
12458
12525
  __spreadValues({
12459
12526
  onChange: ({ target: { value: newValue } }) => onChange(numericValueOrNull(newValue))
@@ -12462,12 +12529,12 @@ function NumericInput(_a) {
12462
12529
  }
12463
12530
  function PhoneNumberInput(_a) {
12464
12531
  var _b = _a, { value } = _b, rest = __objRest(_b, ["value"]);
12465
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_components34.PhoneNumberInput, __spreadValues({ initialValue: value }, rest));
12532
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_components34.PhoneNumberInput, __spreadValues({ initialValue: value }, rest));
12466
12533
  }
12467
12534
  var VariableTextInput_default = VariableTextInput;
12468
12535
 
12469
12536
  // ../renderers/src/TextInputRenderer.tsx
12470
- var import_jsx_runtime52 = require("react/jsx-runtime");
12537
+ var import_jsx_runtime53 = require("react/jsx-runtime");
12471
12538
  var TextInputRenderer = {
12472
12539
  canRenderType: "input-text",
12473
12540
  render: (props) => {
@@ -12492,14 +12559,14 @@ var TextInputRenderer = {
12492
12559
  ]);
12493
12560
  const value = initialValue != null ? initialValue : "";
12494
12561
  const inputProps = __spreadProps(__spreadValues({}, rest), { value, id });
12495
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(FieldInput_default, { id, label, description, error, help, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(VariableTextInput_default, { control, inputProps }) });
12562
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(FieldInput_default, { id, label, description, error, help, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(VariableTextInput_default, { control, inputProps }) });
12496
12563
  }
12497
12564
  };
12498
12565
  var TextInputRenderer_default = TextInputRenderer;
12499
12566
 
12500
12567
  // ../renderers/src/UploadInputRenderer.tsx
12501
12568
  var import_components35 = require("@transferwise/components");
12502
- var import_jsx_runtime53 = require("react/jsx-runtime");
12569
+ var import_jsx_runtime54 = require("react/jsx-runtime");
12503
12570
  var UploadInputRenderer = {
12504
12571
  canRenderType: "input-upload",
12505
12572
  render: (props) => {
@@ -12515,7 +12582,7 @@ var UploadInputRenderer = {
12515
12582
  };
12516
12583
  return (
12517
12584
  // We don't pass help here as there is no sensible place to display it
12518
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(UploadFieldInput_default, { id, label: void 0, description: void 0, error, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
12585
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(UploadFieldInput_default, { id, label: void 0, description: void 0, error, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
12519
12586
  import_components35.UploadInput,
12520
12587
  {
12521
12588
  id,
@@ -12570,7 +12637,7 @@ var LargeUploadRenderer = {
12570
12637
  throw e;
12571
12638
  }
12572
12639
  };
12573
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(FieldInput_default, { id, label, description, error, help, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
12640
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(FieldInput_default, { id, label, description, error, help, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
12574
12641
  import_components35.Upload,
12575
12642
  __spreadProps(__spreadValues({}, uploadProps), {
12576
12643
  usAccept: getAcceptsString(accepts),
@@ -12585,7 +12652,7 @@ var LargeUploadRenderer = {
12585
12652
 
12586
12653
  // ../renderers/src/ReviewRenderer.tsx
12587
12654
  var import_components36 = require("@transferwise/components");
12588
- var import_jsx_runtime54 = require("react/jsx-runtime");
12655
+ var import_jsx_runtime55 = require("react/jsx-runtime");
12589
12656
  var ReviewRenderer = {
12590
12657
  canRenderType: "review",
12591
12658
  render: ({ callToAction, control, fields, margin, title }) => {
@@ -12597,9 +12664,9 @@ var ReviewRenderer = {
12597
12664
  callToAction.onClick();
12598
12665
  }
12599
12666
  } : void 0;
12600
- return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: getMargin(margin), children: [
12601
- (title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_components36.Header, { title: title != null ? title : "", action }),
12602
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: margin, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
12667
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: getMargin(margin), children: [
12668
+ (title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_components36.Header, { title: title != null ? title : "", action }),
12669
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: margin, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
12603
12670
  import_components36.DefinitionList,
12604
12671
  {
12605
12672
  layout: orientation,
@@ -12631,21 +12698,21 @@ var mapControlToDefinitionListLayout = (control) => {
12631
12698
  };
12632
12699
  var getFieldValue = (value, help, orientation) => {
12633
12700
  if (help) {
12634
- return orientation === "HORIZONTAL_RIGHT_ALIGNED" ? /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_jsx_runtime54.Fragment, { children: [
12635
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Help_default, { help }),
12701
+ return orientation === "HORIZONTAL_RIGHT_ALIGNED" ? /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
12702
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Help_default, { help }),
12636
12703
  " ",
12637
12704
  value
12638
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(import_jsx_runtime54.Fragment, { children: [
12705
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
12639
12706
  value,
12640
12707
  " ",
12641
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Help_default, { help })
12708
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Help_default, { help })
12642
12709
  ] });
12643
12710
  }
12644
12711
  return value;
12645
12712
  };
12646
12713
 
12647
12714
  // ../renderers/src/step/StepRenderer.tsx
12648
- var import_react18 = require("react");
12715
+ var import_react19 = require("react");
12649
12716
 
12650
12717
  // ../renderers/src/step/ExternalConfirmationDialog.tsx
12651
12718
  var import_react_intl18 = require("react-intl");
@@ -12677,17 +12744,17 @@ var external_confirmation_messages_default = (0, import_react_intl17.defineMessa
12677
12744
 
12678
12745
  // ../renderers/src/step/ExternalConfirmationDialog.tsx
12679
12746
  var import_components37 = require("@transferwise/components");
12680
- var import_jsx_runtime55 = require("react/jsx-runtime");
12747
+ var import_jsx_runtime56 = require("react/jsx-runtime");
12681
12748
  function ExternalConfirmationDialog({
12682
12749
  external,
12683
12750
  onClose
12684
12751
  }) {
12685
12752
  const { formatMessage } = (0, import_react_intl18.useIntl)();
12686
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "df-box-renderer-width-lg", children: [
12687
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("h2", { className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.title) }),
12688
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_components37.Markdown, { config: { link: { target: "_blank" } }, className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.description, { origin: getOrigin(external.url) }) }),
12689
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "df-box-renderer-width-lg", children: [
12690
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
12753
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "df-box-renderer-width-lg", children: [
12754
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("h2", { className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.title) }),
12755
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_components37.Markdown, { config: { link: { target: "_blank" } }, className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.description, { origin: getOrigin(external.url) }) }),
12756
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "df-box-renderer-width-lg", children: [
12757
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
12691
12758
  import_components37.Button,
12692
12759
  {
12693
12760
  block: true,
@@ -12701,7 +12768,7 @@ function ExternalConfirmationDialog({
12701
12768
  children: formatMessage(external_confirmation_messages_default.open)
12702
12769
  }
12703
12770
  ),
12704
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_components37.Button, { block: true, className: "m-b-2", priority: "tertiary", size: "md", onClick: onClose, children: formatMessage(external_confirmation_messages_default.cancel) })
12771
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_components37.Button, { block: true, className: "m-b-2", priority: "tertiary", size: "md", onClick: onClose, children: formatMessage(external_confirmation_messages_default.cancel) })
12705
12772
  ] }) })
12706
12773
  ] }) });
12707
12774
  }
@@ -12714,12 +12781,12 @@ function getOrigin(url) {
12714
12781
  }
12715
12782
 
12716
12783
  // ../renderers/src/step/useExternal.tsx
12717
- var import_react17 = require("react");
12784
+ var import_react18 = require("react");
12718
12785
  function useExternal(url) {
12719
- const [externalWindow, setExternalWindow] = (0, import_react17.useState)(null);
12720
- const [hasDismissed, setHasDismissed] = (0, import_react17.useState)(false);
12786
+ const [externalWindow, setExternalWindow] = (0, import_react18.useState)(null);
12787
+ const [hasDismissed, setHasDismissed] = (0, import_react18.useState)(false);
12721
12788
  const dismissConfirmation = () => setHasDismissed(true);
12722
- (0, import_react17.useEffect)(() => {
12789
+ (0, import_react18.useEffect)(() => {
12723
12790
  if (url) {
12724
12791
  setHasDismissed(false);
12725
12792
  setExternalWindow(window.open(url, "_blank"));
@@ -12732,9 +12799,9 @@ function useExternal(url) {
12732
12799
  // ../renderers/src/step/BackButton.tsx
12733
12800
  var import_components38 = require("@transferwise/components");
12734
12801
  var import_icons3 = require("@transferwise/icons");
12735
- var import_jsx_runtime56 = require("react/jsx-runtime");
12802
+ var import_jsx_runtime57 = require("react/jsx-runtime");
12736
12803
  function BackButton({ title, onClick }) {
12737
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
12804
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
12738
12805
  "a",
12739
12806
  {
12740
12807
  href: "/",
@@ -12745,8 +12812,8 @@ function BackButton({ title, onClick }) {
12745
12812
  onClick();
12746
12813
  },
12747
12814
  children: [
12748
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "sr-only", children: title }),
12749
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_components38.Avatar, { type: "icon", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_icons3.ArrowLeft, { size: "24" }) })
12815
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "sr-only", children: title }),
12816
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_components38.Avatar, { type: "icon", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_icons3.ArrowLeft, { size: "24" }) })
12750
12817
  ]
12751
12818
  }
12752
12819
  );
@@ -12755,23 +12822,23 @@ var BackButton_default = BackButton;
12755
12822
 
12756
12823
  // ../renderers/src/step/StepRenderer.tsx
12757
12824
  var import_components39 = require("@transferwise/components");
12758
- var import_jsx_runtime57 = require("react/jsx-runtime");
12825
+ var import_jsx_runtime58 = require("react/jsx-runtime");
12759
12826
  var StepRenderer = {
12760
12827
  canRenderType: "step",
12761
12828
  render: StepRendererComponent
12762
12829
  };
12763
12830
  function StepRendererComponent(props) {
12764
12831
  const { back, description, error, external, loadingState, title, trackEvent, children } = props;
12765
- const value = (0, import_react18.useMemo)(() => ({ loadingState, trackEvent }), [loadingState, trackEvent]);
12832
+ const value = (0, import_react19.useMemo)(() => ({ loadingState, trackEvent }), [loadingState, trackEvent]);
12766
12833
  const { requiresUserConfirmation, dismissConfirmation } = useExternal(external == null ? void 0 : external.url);
12767
12834
  if ((external == null ? void 0 : external.url) && requiresUserConfirmation) {
12768
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(ExternalConfirmationDialog, { external, onClose: dismissConfirmation });
12835
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(ExternalConfirmationDialog, { external, onClose: dismissConfirmation });
12769
12836
  }
12770
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(StepRendererContextProvider, { value, children: [
12771
- back ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(BackButton_default, __spreadValues({}, back)) : null,
12772
- title ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("h2", { className: "text-xs-center m-b-2", children: title }) : void 0,
12773
- description ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("p", { className: "text-xs-center m-b-2", children: description }) : void 0,
12774
- error ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_components39.Alert, { type: "negative", className: "m-b-2", message: error }) : void 0,
12837
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(StepRendererContextProvider, { value, children: [
12838
+ back ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(BackButton_default, __spreadValues({}, back)) : null,
12839
+ title ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("h2", { className: "text-xs-center m-b-2", children: title }) : void 0,
12840
+ description ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { className: "text-xs-center m-b-2", children: description }) : void 0,
12841
+ error ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_components39.Alert, { type: "negative", className: "m-b-2", message: error }) : void 0,
12775
12842
  children
12776
12843
  ] });
12777
12844
  }
@@ -12811,46 +12878,46 @@ var getWiseRenderers = () => [
12811
12878
  ];
12812
12879
 
12813
12880
  // src/revamp/DynamicFlowWise.tsx
12814
- var import_jsx_runtime58 = require("react/jsx-runtime");
12881
+ var import_jsx_runtime59 = require("react/jsx-runtime");
12815
12882
  var wiseRenderers = getWiseRenderers();
12816
12883
  function DynamicFlowWise(props) {
12817
12884
  const { httpClient, renderers } = props;
12818
- const mergedRenderers = (0, import_react19.useMemo)(() => [...renderers != null ? renderers : [], ...wiseRenderers], [renderers]);
12819
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(RendererHttpClientProvider, { httpClient, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(DynamicFlowCore, __spreadProps(__spreadValues({}, props), { renderers: mergedRenderers })) });
12885
+ const mergedRenderers = (0, import_react20.useMemo)(() => [...renderers != null ? renderers : [], ...wiseRenderers], [renderers]);
12886
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(RendererHttpClientProvider, { httpClient, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(DynamicFlowCore, __spreadProps(__spreadValues({}, props), { renderers: mergedRenderers })) });
12820
12887
  }
12821
12888
  var DynamicFlowWise_default = DynamicFlowWise;
12822
12889
 
12823
12890
  // src/revamp/DynamicFragmentWise.tsx
12824
- var import_react21 = require("react");
12891
+ var import_react22 = require("react");
12825
12892
 
12826
12893
  // src/common/httpClientContext/HttpClientContext.tsx
12827
- var import_react20 = require("react");
12828
- var import_jsx_runtime59 = require("react/jsx-runtime");
12829
- var HttpClientContext2 = (0, import_react20.createContext)(void 0);
12894
+ var import_react21 = require("react");
12895
+ var import_jsx_runtime60 = require("react/jsx-runtime");
12896
+ var HttpClientContext2 = (0, import_react21.createContext)(void 0);
12830
12897
  function HttpClientProvider({ httpClient, children }) {
12831
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(HttpClientContext2.Provider, { value: httpClient, children });
12898
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(HttpClientContext2.Provider, { value: httpClient, children });
12832
12899
  }
12833
12900
  function HttpClientProviderFromBaseUrl({ baseUrl, children }) {
12834
- const httpClient = (0, import_react20.useMemo)(() => makeHttpClient(baseUrl), [baseUrl]);
12835
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(HttpClientContext2.Provider, { value: httpClient, children });
12901
+ const httpClient = (0, import_react21.useMemo)(() => makeHttpClient(baseUrl), [baseUrl]);
12902
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(HttpClientContext2.Provider, { value: httpClient, children });
12836
12903
  }
12837
12904
  var useHttpClient = () => {
12838
- const contextFetch = (0, import_react20.useContext)(HttpClientContext2);
12905
+ const contextFetch = (0, import_react21.useContext)(HttpClientContext2);
12839
12906
  return contextFetch != null ? contextFetch : fetch;
12840
12907
  };
12841
12908
  var useHasHttpClientProvider = () => {
12842
- const context = (0, import_react20.useContext)(HttpClientContext2);
12909
+ const context = (0, import_react21.useContext)(HttpClientContext2);
12843
12910
  return Boolean(context);
12844
12911
  };
12845
12912
 
12846
12913
  // src/revamp/DynamicFragmentWise.tsx
12847
- var import_jsx_runtime60 = require("react/jsx-runtime");
12914
+ var import_jsx_runtime61 = require("react/jsx-runtime");
12848
12915
  var wiseRenderers2 = getWiseRenderers();
12849
- var DynamicFragmentWise = (0, import_react21.forwardRef)(function DynamicFragmentWise2(props, ref) {
12916
+ var DynamicFragmentWise = (0, import_react22.forwardRef)(function DynamicFragmentWise2(props, ref) {
12850
12917
  const { httpClient, onEvent, onError, renderers } = props;
12851
- const mergedRenderers = (0, import_react21.useMemo)(() => [...renderers != null ? renderers : [], ...wiseRenderers2], [renderers]);
12918
+ const mergedRenderers = (0, import_react22.useMemo)(() => [...renderers != null ? renderers : [], ...wiseRenderers2], [renderers]);
12852
12919
  const { stepComponentRef } = useDynamicFlowCore(props);
12853
- (0, import_react21.useImperativeHandle)(
12920
+ (0, import_react22.useImperativeHandle)(
12854
12921
  ref,
12855
12922
  () => ({
12856
12923
  getValue: async () => {
@@ -12865,30 +12932,30 @@ var DynamicFragmentWise = (0, import_react21.forwardRef)(function DynamicFragmen
12865
12932
  // eslint-disable-next-line react-hooks/exhaustive-deps
12866
12933
  []
12867
12934
  );
12868
- const render = (0, import_react21.useMemo)(
12935
+ const render = (0, import_react22.useMemo)(
12869
12936
  () => getRenderFunction([CoreContainerRenderer, ...mergedRenderers, StepRenderer]),
12870
12937
  [mergedRenderers]
12871
12938
  );
12872
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
12939
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
12873
12940
  ErrorBoundary_default,
12874
12941
  {
12875
12942
  onError: (error) => {
12876
12943
  onEvent == null ? void 0 : onEvent("Dynamic Flow - Failed");
12877
12944
  onError(error);
12878
12945
  },
12879
- children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(HttpClientProvider, { httpClient, children: stepComponentRef.current ? render(stepComponentRef.current) : null })
12946
+ children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(HttpClientProvider, { httpClient, children: stepComponentRef.current ? render(stepComponentRef.current) : null })
12880
12947
  }
12881
12948
  );
12882
12949
  });
12883
12950
  var DynamicFragmentWise_default = DynamicFragmentWise;
12884
12951
 
12885
12952
  // src/revamp/DynamicFragmentCore.tsx
12886
- var import_react22 = require("react");
12887
- var import_jsx_runtime61 = require("react/jsx-runtime");
12888
- var DynamicFragmentCore = (0, import_react22.forwardRef)(function DynamicFragmentCore2(props, ref) {
12953
+ var import_react23 = require("react");
12954
+ var import_jsx_runtime62 = require("react/jsx-runtime");
12955
+ var DynamicFragmentCore = (0, import_react23.forwardRef)(function DynamicFragmentCore2(props, ref) {
12889
12956
  const { onEvent, onError, renderers } = props;
12890
12957
  const { stepComponentRef } = useDynamicFlowCore(props);
12891
- (0, import_react22.useImperativeHandle)(
12958
+ (0, import_react23.useImperativeHandle)(
12892
12959
  ref,
12893
12960
  () => ({
12894
12961
  getValue: async () => {
@@ -12903,11 +12970,11 @@ var DynamicFragmentCore = (0, import_react22.forwardRef)(function DynamicFragmen
12903
12970
  // eslint-disable-next-line react-hooks/exhaustive-deps
12904
12971
  []
12905
12972
  );
12906
- const render = (0, import_react22.useMemo)(
12973
+ const render = (0, import_react23.useMemo)(
12907
12974
  () => getRenderFunction([CoreContainerRenderer, ...renderers]),
12908
12975
  [renderers]
12909
12976
  );
12910
- return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
12977
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
12911
12978
  ErrorBoundary_default,
12912
12979
  {
12913
12980
  onError: (error) => {
@@ -13224,17 +13291,17 @@ function isReference(block) {
13224
13291
  }
13225
13292
 
13226
13293
  // src/legacy/dynamicFlow/DynamicFlow.tsx
13227
- var import_react66 = require("react");
13294
+ var import_react67 = require("react");
13228
13295
  var import_react_intl48 = require("react-intl");
13229
13296
 
13230
13297
  // src/legacy/common/contexts/dynamicFlowContexts/DynamicFlowContexts.tsx
13231
- var import_react24 = require("react");
13298
+ var import_react25 = require("react");
13232
13299
 
13233
13300
  // src/legacy/common/contexts/dynamicFlowContexts/usePendingPromiseCounter.ts
13234
- var import_react23 = require("react");
13301
+ var import_react24 = require("react");
13235
13302
  function usePendingPromiseCounter() {
13236
- const [count, setCount] = (0, import_react23.useState)(0);
13237
- const addPendingPromise = (0, import_react23.useCallback)(
13303
+ const [count, setCount] = (0, import_react24.useState)(0);
13304
+ const addPendingPromise = (0, import_react24.useCallback)(
13238
13305
  (promise) => {
13239
13306
  setCount((c) => c + 1);
13240
13307
  promise.catch(noop2).finally(() => delayUntilNextCycle(() => setCount((c) => Math.max(0, c - 1))));
@@ -13248,44 +13315,44 @@ var noop2 = () => {
13248
13315
  };
13249
13316
 
13250
13317
  // src/legacy/common/contexts/dynamicFlowContexts/DynamicFlowContexts.tsx
13251
- var import_jsx_runtime62 = require("react/jsx-runtime");
13318
+ var import_jsx_runtime63 = require("react/jsx-runtime");
13252
13319
  var defaultContextValue = {
13253
13320
  loading: false,
13254
13321
  registerPersistAsyncPromise: (promise) => {
13255
13322
  }
13256
13323
  };
13257
- var DFContext = (0, import_react24.createContext)(defaultContextValue);
13324
+ var DFContext = (0, import_react25.createContext)(defaultContextValue);
13258
13325
  var DynamicFlowProvider = ({ loading, children }) => {
13259
13326
  const { pendingPromises, addPendingPromise } = usePendingPromiseCounter();
13260
- const providerValue = (0, import_react24.useMemo)(() => {
13327
+ const providerValue = (0, import_react25.useMemo)(() => {
13261
13328
  return {
13262
13329
  loading: loading || pendingPromises > 0,
13263
13330
  registerPersistAsyncPromise: addPendingPromise
13264
13331
  };
13265
13332
  }, [loading, pendingPromises, addPendingPromise]);
13266
- return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(DFContext.Provider, { value: providerValue, children });
13333
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(DFContext.Provider, { value: providerValue, children });
13267
13334
  };
13268
13335
  var useDynamicFlow = () => {
13269
- const context = (0, import_react24.useContext)(DFContext);
13336
+ const context = (0, import_react25.useContext)(DFContext);
13270
13337
  return context || defaultContextValue;
13271
13338
  };
13272
13339
 
13273
13340
  // src/legacy/common/contexts/eventsContext/EventsContext.tsx
13274
- var import_react25 = require("react");
13275
- var import_jsx_runtime63 = require("react/jsx-runtime");
13276
- var EventsContext = (0, import_react25.createContext)({
13341
+ var import_react26 = require("react");
13342
+ var import_jsx_runtime64 = require("react/jsx-runtime");
13343
+ var EventsContext = (0, import_react26.createContext)({
13277
13344
  triggerEvent: () => {
13278
13345
  }
13279
13346
  });
13280
13347
  function EventsContextProvider({ metadata, children, onEvent }) {
13281
- const value = (0, import_react25.useMemo)(
13348
+ const value = (0, import_react26.useMemo)(
13282
13349
  () => ({ triggerEvent: getEventDispatcher(onEvent, metadata) }),
13283
13350
  [onEvent, metadata]
13284
13351
  );
13285
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(EventsContext.Provider, { value, children });
13352
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(EventsContext.Provider, { value, children });
13286
13353
  }
13287
13354
  function useEventDispatcher() {
13288
- const { triggerEvent } = (0, import_react25.useContext)(EventsContext);
13355
+ const { triggerEvent } = (0, import_react26.useContext)(EventsContext);
13289
13356
  return triggerEvent;
13290
13357
  }
13291
13358
  var getEventDispatcher = (onEvent, metadata) => (eventName, properties = {}) => {
@@ -13296,8 +13363,8 @@ var getEventDispatcher = (onEvent, metadata) => (eventName, properties = {}) =>
13296
13363
  };
13297
13364
 
13298
13365
  // src/legacy/common/contexts/logContext/LogContext.tsx
13299
- var import_react26 = require("react");
13300
- var import_jsx_runtime64 = require("react/jsx-runtime");
13366
+ var import_react27 = require("react");
13367
+ var import_jsx_runtime65 = require("react/jsx-runtime");
13301
13368
  var getLogger = (level, onLog, flowId = "UNKNOWN-FLOW-ID", stepId = "UNKNOWN-FLOW-ID") => (title, description, extra) => {
13302
13369
  try {
13303
13370
  onLog(level, `Dynamic Flow ${level} - ${title} - ${description}`, __spreadValues({
@@ -13307,9 +13374,9 @@ var getLogger = (level, onLog, flowId = "UNKNOWN-FLOW-ID", stepId = "UNKNOWN-FLO
13307
13374
  } catch (e) {
13308
13375
  }
13309
13376
  };
13310
- var LogContext = (0, import_react26.createContext)(null);
13377
+ var LogContext = (0, import_react27.createContext)(null);
13311
13378
  function LogProvider({ flowId, stepId, children, onLog }) {
13312
- const value = (0, import_react26.useMemo)(
13379
+ const value = (0, import_react27.useMemo)(
13313
13380
  () => ({
13314
13381
  debug: getLogger("debug", onLog, flowId, stepId),
13315
13382
  info: getLogger("info", onLog, flowId, stepId),
@@ -13319,10 +13386,10 @@ function LogProvider({ flowId, stepId, children, onLog }) {
13319
13386
  }),
13320
13387
  [onLog, flowId, stepId]
13321
13388
  );
13322
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(LogContext.Provider, { value, children });
13389
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(LogContext.Provider, { value, children });
13323
13390
  }
13324
13391
  var useLogger = () => {
13325
- const logging = (0, import_react26.useContext)(LogContext);
13392
+ const logging = (0, import_react27.useContext)(LogContext);
13326
13393
  if (logging == null) {
13327
13394
  throw new Error(
13328
13395
  "Logging context not found. Did you forget to wrap your component in a <LogProvider />?"
@@ -13332,11 +13399,11 @@ var useLogger = () => {
13332
13399
  };
13333
13400
 
13334
13401
  // src/legacy/common/contexts/featureContext/FeatureContext.tsx
13335
- var import_react27 = require("react");
13336
- var import_jsx_runtime65 = require("react/jsx-runtime");
13337
- var FeatureContext = (0, import_react27.createContext)([]);
13402
+ var import_react28 = require("react");
13403
+ var import_jsx_runtime66 = require("react/jsx-runtime");
13404
+ var FeatureContext = (0, import_react28.createContext)([]);
13338
13405
  function FeatureContextProvider({ features, children }) {
13339
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(FeatureContext.Provider, { value: features, children });
13406
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(FeatureContext.Provider, { value: features, children });
13340
13407
  }
13341
13408
 
13342
13409
  // src/common/cameraCapture/utils/mobile-utils.ts
@@ -14066,18 +14133,18 @@ var filterHiddenSchemas = (schemas) => schemas.filter((schema) => {
14066
14133
  });
14067
14134
 
14068
14135
  // src/legacy/common/hooks/useDebouncedFunction/useDebouncedFunction.tsx
14069
- var import_react28 = require("react");
14136
+ var import_react29 = require("react");
14070
14137
  function useDebouncedFunction(callback, waitMs) {
14071
- return (0, import_react28.useCallback)(debounce2(callback, waitMs), [callback, waitMs]);
14138
+ return (0, import_react29.useCallback)(debounce2(callback, waitMs), [callback, waitMs]);
14072
14139
  }
14073
14140
 
14074
14141
  // src/legacy/common/hooks/useExternal/useExternal.tsx
14075
- var import_react29 = require("react");
14142
+ var import_react30 = require("react");
14076
14143
  function useExternal2(url) {
14077
- const [externalWindow, setExternalWindow] = (0, import_react29.useState)(null);
14078
- const [hasManuallyTriggered, setHasManuallyTriggered] = (0, import_react29.useState)(false);
14144
+ const [externalWindow, setExternalWindow] = (0, import_react30.useState)(null);
14145
+ const [hasManuallyTriggered, setHasManuallyTriggered] = (0, import_react30.useState)(false);
14079
14146
  const dismissConfirmation = () => setHasManuallyTriggered(true);
14080
- (0, import_react29.useEffect)(() => {
14147
+ (0, import_react30.useEffect)(() => {
14081
14148
  if (url) {
14082
14149
  setHasManuallyTriggered(false);
14083
14150
  setExternalWindow(window.open(url, "_blank"));
@@ -14088,10 +14155,10 @@ function useExternal2(url) {
14088
14155
  }
14089
14156
 
14090
14157
  // src/legacy/common/hooks/useExternalStepPolling/useExternalStepPolling.tsx
14091
- var import_react30 = require("react");
14158
+ var import_react31 = require("react");
14092
14159
  function useExternalStepPolling(polling, onAction) {
14093
14160
  const httpClient = useHttpClient();
14094
- const asyncFn = (0, import_react30.useMemo)(() => {
14161
+ const asyncFn = (0, import_react31.useMemo)(() => {
14095
14162
  if (polling) {
14096
14163
  return () => httpClient(polling.url).then((response) => {
14097
14164
  if (response.ok) {
@@ -14109,7 +14176,7 @@ function useExternalStepPolling(polling, onAction) {
14109
14176
  }
14110
14177
  return void 0;
14111
14178
  }, [polling, httpClient]);
14112
- const onPollingResponse = (0, import_react30.useCallback)(
14179
+ const onPollingResponse = (0, import_react31.useCallback)(
14113
14180
  (pollingResponse) => {
14114
14181
  const responseHandlers = (polling == null ? void 0 : polling.responseHandlers) || [];
14115
14182
  const responseHandler = responseHandlers.find(
@@ -14136,7 +14203,7 @@ function useExternalStepPolling(polling, onAction) {
14136
14203
  maxAttempts: (polling == null ? void 0 : polling.maxAttempts) || 0,
14137
14204
  maxConsecutiveFails: (polling == null ? void 0 : polling.maxConsecutiveFails) || 0,
14138
14205
  onPollingResponse,
14139
- onFailure: (0, import_react30.useCallback)(() => {
14206
+ onFailure: (0, import_react31.useCallback)(() => {
14140
14207
  if (polling) {
14141
14208
  onAction(polling.onError.action);
14142
14209
  }
@@ -14145,11 +14212,11 @@ function useExternalStepPolling(polling, onAction) {
14145
14212
  }
14146
14213
 
14147
14214
  // src/legacy/common/hooks/usePersistAsync/usePersistAsync.ts
14148
- var import_react54 = require("react");
14215
+ var import_react55 = require("react");
14149
14216
  var import_react_intl39 = require("react-intl");
14150
14217
 
14151
14218
  // src/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBasicSchema/PersistAsyncBasicSchema.tsx
14152
- var import_react53 = require("react");
14219
+ var import_react54 = require("react");
14153
14220
  var import_react_intl38 = require("react-intl");
14154
14221
 
14155
14222
  // src/legacy/common/constants/DateMode.ts
@@ -14198,7 +14265,7 @@ var Size = {
14198
14265
 
14199
14266
  // src/legacy/jsonSchemaForm/basicTypeSchema/BasicTypeSchema.tsx
14200
14267
  var import_classnames15 = __toESM(require_classnames());
14201
- var import_react52 = require("react");
14268
+ var import_react53 = require("react");
14202
14269
 
14203
14270
  // src/legacy/layout/alert/DynamicAlert.tsx
14204
14271
  var import_components41 = require("@transferwise/components");
@@ -14207,19 +14274,19 @@ var import_components41 = require("@transferwise/components");
14207
14274
  var import_components40 = require("@transferwise/components");
14208
14275
 
14209
14276
  // src/legacy/layout/icon/FlagIcon.tsx
14210
- var import_jsx_runtime66 = require("react/jsx-runtime");
14277
+ var import_jsx_runtime67 = require("react/jsx-runtime");
14211
14278
  var isFlagIcon2 = (name) => name.startsWith("flag-");
14212
14279
  function FlagIcon2({ name }) {
14213
14280
  if (!isFlagIcon2(name)) {
14214
14281
  return null;
14215
14282
  }
14216
14283
  const code = name.substring(5);
14217
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Flag, { intrinsicSize: 24, code });
14284
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Flag, { intrinsicSize: 24, code });
14218
14285
  }
14219
14286
 
14220
14287
  // src/legacy/layout/icon/NamedIcon.tsx
14221
14288
  var icons2 = __toESM(require("@transferwise/icons"));
14222
- var import_jsx_runtime67 = require("react/jsx-runtime");
14289
+ var import_jsx_runtime68 = require("react/jsx-runtime");
14223
14290
  var isNamedIcon2 = (name) => {
14224
14291
  const iconName = toCapitalisedCamelCase2(name);
14225
14292
  return Object.keys(icons2).includes(iconName);
@@ -14230,19 +14297,19 @@ function NamedIcon2({ name }) {
14230
14297
  }
14231
14298
  const iconName = toCapitalisedCamelCase2(name);
14232
14299
  const Icon = icons2[iconName];
14233
- return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Icon, { size: 24 });
14300
+ return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Icon, { size: 24 });
14234
14301
  }
14235
14302
  var toCapitalisedCamelCase2 = (value) => value.split("-").map(capitaliseFirstChar2).join("");
14236
14303
  var capitaliseFirstChar2 = (value) => `${value[0].toUpperCase()}${value.slice(1)}`;
14237
14304
 
14238
14305
  // src/legacy/layout/icon/DynamicIcon.tsx
14239
- var import_jsx_runtime68 = require("react/jsx-runtime");
14306
+ var import_jsx_runtime69 = require("react/jsx-runtime");
14240
14307
  function DynamicIcon2({ type }) {
14241
14308
  if (isFlagIcon2(type)) {
14242
- return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(FlagIcon2, { name: type });
14309
+ return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(FlagIcon2, { name: type });
14243
14310
  }
14244
14311
  if (isNamedIcon2(type)) {
14245
- return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(NamedIcon2, { name: type });
14312
+ return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(NamedIcon2, { name: type });
14246
14313
  }
14247
14314
  return null;
14248
14315
  }
@@ -14252,17 +14319,17 @@ function isValidIconName(name) {
14252
14319
  var DynamicIcon_default2 = DynamicIcon2;
14253
14320
 
14254
14321
  // src/legacy/layout/utils/getNavigationOptionMedia.tsx
14255
- var import_jsx_runtime69 = require("react/jsx-runtime");
14322
+ var import_jsx_runtime70 = require("react/jsx-runtime");
14256
14323
  var getNavigationOptionMedia = ({ icon, image }) => {
14257
14324
  if (icon == null ? void 0 : icon.name) {
14258
- return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_components40.Avatar, { type: import_components40.AvatarType.ICON, children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(DynamicIcon_default2, { type: icon.name }) });
14325
+ return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_components40.Avatar, { type: import_components40.AvatarType.ICON, children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(DynamicIcon_default2, { type: icon.name }) });
14259
14326
  }
14260
14327
  if (icon == null ? void 0 : icon.text) {
14261
- return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_components40.Avatar, { type: import_components40.AvatarType.INITIALS, children: icon.text });
14328
+ return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_components40.Avatar, { type: import_components40.AvatarType.INITIALS, children: icon.text });
14262
14329
  }
14263
14330
  if (image == null ? void 0 : image.url) {
14264
14331
  const { url, text } = image;
14265
- return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("img", { src: url, alt: text });
14332
+ return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("img", { src: url, alt: text });
14266
14333
  }
14267
14334
  return null;
14268
14335
  };
@@ -14298,10 +14365,10 @@ var getTextAlignment2 = (align) => {
14298
14365
  var getTextAlignmentAndMargin2 = (component) => `${getTextAlignment2(component.align)} ${getMargin2(component.margin)}`;
14299
14366
 
14300
14367
  // src/legacy/layout/alert/DynamicAlert.tsx
14301
- var import_jsx_runtime70 = require("react/jsx-runtime");
14368
+ var import_jsx_runtime71 = require("react/jsx-runtime");
14302
14369
  var DynamicAlert = (props) => {
14303
14370
  const alert = props.component;
14304
- return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
14371
+ return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
14305
14372
  import_components41.Alert,
14306
14373
  {
14307
14374
  type: mapContextToAlertType(legacy_mapContext(alert.context)),
@@ -14334,12 +14401,12 @@ var mapContextToAlertType = (context) => {
14334
14401
  var DynamicAlert_default = DynamicAlert;
14335
14402
 
14336
14403
  // src/legacy/layout/box/DynamicBox.tsx
14337
- var import_jsx_runtime71 = require("react/jsx-runtime");
14404
+ var import_jsx_runtime72 = require("react/jsx-runtime");
14338
14405
  var DynamicBox = (props) => {
14339
14406
  const box = props.component;
14340
14407
  const margin = getMargin2(box.margin || box.border ? "lg" : "xs");
14341
14408
  if (!box.width || box.width === "xl") {
14342
- return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: margin + getBorderClass(box.border), children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
14409
+ return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: margin + getBorderClass(box.border), children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
14343
14410
  DynamicLayout_default,
14344
14411
  {
14345
14412
  components: box.components,
@@ -14352,7 +14419,7 @@ var DynamicBox = (props) => {
14352
14419
  }
14353
14420
  ) });
14354
14421
  }
14355
- return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "row", children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: margin + getBoxWidthClasses(box), children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: getBorderClass(box.border), children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
14422
+ return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "row", children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: margin + getBoxWidthClasses(box), children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: getBorderClass(box.border), children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
14356
14423
  DynamicLayout_default,
14357
14424
  {
14358
14425
  components: box.components,
@@ -14436,7 +14503,7 @@ var getButtonSize = (size) => {
14436
14503
  };
14437
14504
 
14438
14505
  // src/legacy/layout/button/DynamicButton.tsx
14439
- var import_jsx_runtime72 = require("react/jsx-runtime");
14506
+ var import_jsx_runtime73 = require("react/jsx-runtime");
14440
14507
  function DynamicButton(props) {
14441
14508
  var _a;
14442
14509
  const { component, onAction } = props;
@@ -14445,7 +14512,7 @@ function DynamicButton(props) {
14445
14512
  const priority = getButtonPriority(component);
14446
14513
  const { loading } = useDynamicFlow();
14447
14514
  const className = getMargin2(component.margin || "md");
14448
- return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
14515
+ return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
14449
14516
  import_components42.Button,
14450
14517
  {
14451
14518
  size: getButtonSize(component.size),
@@ -14462,12 +14529,12 @@ function DynamicButton(props) {
14462
14529
  var DynamicButton_default = DynamicButton;
14463
14530
 
14464
14531
  // src/legacy/layout/columns/DynamicColumns.tsx
14465
- var import_jsx_runtime73 = require("react/jsx-runtime");
14532
+ var import_jsx_runtime74 = require("react/jsx-runtime");
14466
14533
  var DynamicColumns = (props) => {
14467
14534
  const columns = props.component;
14468
14535
  const { leftWidth, rightWidth } = getWidth(columns.bias);
14469
- return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: `${getMargin2(columns.margin || "xs")} row`, children: [
14470
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: `${leftWidth} m-b-0`, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
14536
+ return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: `${getMargin2(columns.margin || "xs")} row`, children: [
14537
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: `${leftWidth} m-b-0`, children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
14471
14538
  DynamicLayout_default,
14472
14539
  {
14473
14540
  components: columns.left,
@@ -14479,7 +14546,7 @@ var DynamicColumns = (props) => {
14479
14546
  onPersistAsync: props.onPersistAsync
14480
14547
  }
14481
14548
  ) }),
14482
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: `${rightWidth} m-b-0`, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
14549
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: `${rightWidth} m-b-0`, children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
14483
14550
  DynamicLayout_default,
14484
14551
  {
14485
14552
  components: columns.right,
@@ -14515,37 +14582,41 @@ var DynamicColumns_default = DynamicColumns;
14515
14582
 
14516
14583
  // src/legacy/layout/decision/DynamicDecision.tsx
14517
14584
  var import_components43 = require("@transferwise/components");
14518
- var import_jsx_runtime74 = require("react/jsx-runtime");
14585
+ var import_jsx_runtime75 = require("react/jsx-runtime");
14519
14586
  function DynamicDecision({ component, onAction }) {
14520
14587
  const { loading } = useDynamicFlow();
14521
- return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: getMargin2(component.margin), children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_components43.NavigationOptionsList, { children: component.options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
14522
- import_components43.NavigationOption,
14523
- {
14524
- title: option.title,
14525
- content: option.description,
14526
- disabled: loading || option.disabled,
14527
- media: getNavigationOptionMedia(option),
14528
- showMediaCircle: false,
14529
- showMediaAtAllSizes: true,
14530
- onClick: () => onAction(option.action)
14531
- },
14532
- JSON.stringify(option)
14533
- )) }) });
14588
+ const { margin, options, title } = component;
14589
+ return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: getMargin2(margin), children: [
14590
+ title && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_components43.Header, { as: "h2", title }),
14591
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_components43.NavigationOptionsList, { children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
14592
+ import_components43.NavigationOption,
14593
+ {
14594
+ title: option.title,
14595
+ content: option.description,
14596
+ disabled: loading || option.disabled,
14597
+ media: getNavigationOptionMedia(option),
14598
+ showMediaCircle: false,
14599
+ showMediaAtAllSizes: true,
14600
+ onClick: () => onAction(option.action)
14601
+ },
14602
+ JSON.stringify(option)
14603
+ )) })
14604
+ ] });
14534
14605
  }
14535
14606
  var DynamicDecision_default = DynamicDecision;
14536
14607
 
14537
14608
  // src/legacy/layout/divider/DynamicDivider.tsx
14538
- var import_jsx_runtime75 = require("react/jsx-runtime");
14609
+ var import_jsx_runtime76 = require("react/jsx-runtime");
14539
14610
  var DynamicDivider = ({ component }) => {
14540
14611
  const margin = getMargin2(component.margin);
14541
14612
  const className = `m-t-0 ${margin}`;
14542
- return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("hr", { className });
14613
+ return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("hr", { className });
14543
14614
  };
14544
14615
  var DynamicDivider_default = DynamicDivider;
14545
14616
 
14546
14617
  // src/legacy/layout/external/DynamicExternal.tsx
14547
14618
  var import_components44 = require("@transferwise/components");
14548
- var import_react31 = require("react");
14619
+ var import_react32 = require("react");
14549
14620
  var import_react_intl20 = require("react-intl");
14550
14621
 
14551
14622
  // src/legacy/layout/external/DynamicExternal.messages.ts
@@ -14559,37 +14630,37 @@ var DynamicExternal_messages_default = (0, import_react_intl19.defineMessages)({
14559
14630
  });
14560
14631
 
14561
14632
  // src/legacy/layout/external/DynamicExternal.tsx
14562
- var import_jsx_runtime76 = require("react/jsx-runtime");
14633
+ var import_jsx_runtime77 = require("react/jsx-runtime");
14563
14634
  var DynamicExternal = ({ component, onAction }) => {
14564
14635
  const { requestUrl, responseHandlers, polling, retryTitle } = component;
14565
14636
  const intl = (0, import_react_intl20.useIntl)();
14566
- const openExternalUrl = (0, import_react31.useCallback)(
14637
+ const openExternalUrl = (0, import_react32.useCallback)(
14567
14638
  () => window.open(requestUrl, "df-external-window"),
14568
14639
  [requestUrl]
14569
14640
  );
14570
- (0, import_react31.useEffect)(() => {
14641
+ (0, import_react32.useEffect)(() => {
14571
14642
  openExternalUrl();
14572
14643
  }, [openExternalUrl]);
14573
14644
  const pollingConfiguration = polling && responseHandlers ? __spreadProps(__spreadValues({}, polling), {
14574
14645
  responseHandlers
14575
14646
  }) : void 0;
14576
14647
  useExternalStepPolling(pollingConfiguration, onAction);
14577
- return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(import_jsx_runtime76.Fragment, { children: [
14578
- /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_components44.Loader, { size: import_components44.Size.LARGE, classNames: { "tw-loader": "tw-loader m-x-auto" } }),
14579
- /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("br", {}),
14580
- /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_components44.Button, { priority: "tertiary", block: true, onClick: openExternalUrl, children: retryTitle || intl.formatMessage(DynamicExternal_messages_default.retryTitle) })
14648
+ return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_jsx_runtime77.Fragment, { children: [
14649
+ /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_components44.Loader, { size: import_components44.Size.LARGE, classNames: { "tw-loader": "tw-loader m-x-auto" } }),
14650
+ /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("br", {}),
14651
+ /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_components44.Button, { priority: "tertiary", block: true, onClick: openExternalUrl, children: retryTitle || intl.formatMessage(DynamicExternal_messages_default.retryTitle) })
14581
14652
  ] });
14582
14653
  };
14583
14654
  var DynamicExternal_default = DynamicExternal;
14584
14655
 
14585
14656
  // src/legacy/jsonSchemaForm/genericSchema/GenericSchema.tsx
14586
- var import_react45 = require("react");
14657
+ var import_react46 = require("react");
14587
14658
 
14588
14659
  // src/legacy/jsonSchemaForm/allOfSchema/AllOfSchema.tsx
14589
14660
  var import_components45 = require("@transferwise/components");
14590
14661
  var import_classnames6 = __toESM(require_classnames());
14591
- var import_react32 = require("react");
14592
- var import_jsx_runtime77 = require("react/jsx-runtime");
14662
+ var import_react33 = require("react");
14663
+ var import_jsx_runtime78 = require("react/jsx-runtime");
14593
14664
  var splitModel = (model, schemas) => schemas.map((schema) => getValidObjectModelParts(model, schema) || {});
14594
14665
  var combineModels = (models) => models.reduce((current, combined) => __spreadValues(__spreadValues({}, combined), current), {});
14595
14666
  var getSchemaColumnClasses = (width) => ({
@@ -14604,13 +14675,13 @@ function AllOfSchema(props) {
14604
14675
  setModels(models);
14605
14676
  props.onChange(__spreadProps(__spreadValues({}, onChangeProps), { model: combineModels(models) }));
14606
14677
  };
14607
- const [models, setModels] = (0, import_react32.useState)(splitModel(props.model, props.schema.allOf));
14608
- return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_jsx_runtime77.Fragment, { children: [
14609
- props.schema.title && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_components45.Header, { title: props.schema.title }),
14610
- props.schema.description && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("p", { children: props.schema.description }),
14611
- /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "row", children: props.schema.allOf.map((schema, index) => (
14678
+ const [models, setModels] = (0, import_react33.useState)(splitModel(props.model, props.schema.allOf));
14679
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_jsx_runtime78.Fragment, { children: [
14680
+ props.schema.title && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_components45.Header, { title: props.schema.title }),
14681
+ props.schema.description && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("p", { children: props.schema.description }),
14682
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "row", children: props.schema.allOf.map((schema, index) => (
14612
14683
  // eslint-disable-next-line react/no-array-index-key
14613
- /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: (0, import_classnames6.default)(getSchemaColumnClasses(schema.width)), children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
14684
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: (0, import_classnames6.default)(getSchemaColumnClasses(schema.width)), children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
14614
14685
  GenericSchema_default,
14615
14686
  {
14616
14687
  schema,
@@ -14636,13 +14707,13 @@ var AllOfSchema_default = AllOfSchema;
14636
14707
  // src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.tsx
14637
14708
  var import_components47 = require("@transferwise/components");
14638
14709
  var import_classnames7 = __toESM(require_classnames());
14639
- var import_react33 = require("react");
14710
+ var import_react34 = require("react");
14640
14711
 
14641
14712
  // src/legacy/jsonSchemaForm/controlFeedback/ControlFeedback.tsx
14642
14713
  var import_components46 = require("@transferwise/components");
14643
14714
  var import_formatting2 = require("@transferwise/formatting");
14644
14715
  var import_react_intl21 = require("react-intl");
14645
- var import_jsx_runtime78 = require("react/jsx-runtime");
14716
+ var import_jsx_runtime79 = require("react/jsx-runtime");
14646
14717
  function ControlFeedback(props) {
14647
14718
  var _a;
14648
14719
  const defaultValidationMessages = useDefaultValidationMessages(props.schema);
@@ -14651,12 +14722,12 @@ function ControlFeedback(props) {
14651
14722
  const isValidationVisible = !isErrorVisible && (props.submitted || props.changed && props.blurred) && Boolean((_a = props.validations) == null ? void 0 : _a.length);
14652
14723
  const isDescriptionVisible = props.schema.type !== "boolean" && props.schema.description && !isErrorVisible && !isValidationVisible;
14653
14724
  const hasInfoMessage = Boolean(props.infoMessage);
14654
- return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { id: props.id, children: [
14655
- isErrorVisible ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_components46.InlineAlert, { type: "error", children: props.errors }) : null,
14656
- isValidationVisible ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_components46.InlineAlert, { type: "error", children: props.validations.map((validation) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { children: validationMessages[validation] }, validation)) }) : null,
14657
- (isDescriptionVisible || hasInfoMessage) && /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_components46.InlineAlert, { type: "info", children: [
14658
- isDescriptionVisible && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { children: props.schema.description }),
14659
- hasInfoMessage && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { children: props.infoMessage })
14725
+ return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { id: props.id, children: [
14726
+ isErrorVisible ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_components46.InlineAlert, { type: "error", children: props.errors }) : null,
14727
+ isValidationVisible ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_components46.InlineAlert, { type: "error", children: props.validations.map((validation) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { children: validationMessages[validation] }, validation)) }) : null,
14728
+ (isDescriptionVisible || hasInfoMessage) && /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_components46.InlineAlert, { type: "info", children: [
14729
+ isDescriptionVisible && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { children: props.schema.description }),
14730
+ hasInfoMessage && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { children: props.infoMessage })
14660
14731
  ] })
14661
14732
  ] });
14662
14733
  }
@@ -14782,15 +14853,15 @@ function useFormattedDefaultErrorMessages({
14782
14853
  }
14783
14854
 
14784
14855
  // src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multipleFileUploadSchema/MultipleFileUploadSchema.tsx
14785
- var import_jsx_runtime79 = require("react/jsx-runtime");
14856
+ var import_jsx_runtime80 = require("react/jsx-runtime");
14786
14857
  function MultipleFileUploadSchema(props) {
14787
14858
  var _a, _b;
14788
14859
  const { onChange, schema } = props;
14789
14860
  const onEvent = useEventDispatcher();
14790
14861
  const defaultErrorMessages = useFormattedDefaultErrorMessages(schema);
14791
- const uid = (0, import_react33.useMemo)(() => schema.$id || generateRandomId(), [schema.$id]);
14792
- const [inputChanged, setInputChanged] = (0, import_react33.useState)(false);
14793
- const [files, setFiles] = (0, import_react33.useState)(() => convertFileIdsToComponentFileObjects(props.model || []));
14862
+ const uid = (0, import_react34.useMemo)(() => schema.$id || generateRandomId(), [schema.$id]);
14863
+ const [inputChanged, setInputChanged] = (0, import_react34.useState)(false);
14864
+ const [files, setFiles] = (0, import_react34.useState)(() => convertFileIdsToComponentFileObjects(props.model || []));
14794
14865
  const performPersistAsync = usePersistAsync(schema.items.persistAsync);
14795
14866
  const fileSchemaDescriptor = schema.items.persistAsync.schema;
14796
14867
  const isBlob = isBlobSchema2(fileSchemaDescriptor);
@@ -14844,10 +14915,10 @@ function MultipleFileUploadSchema(props) {
14844
14915
  onDeleteFile: () => Promise.resolve()
14845
14916
  });
14846
14917
  const feedbackId = `${uid}-feedback`;
14847
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: (0, import_classnames7.default)("form-group", { "has-error": showError }), children: [
14848
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("label", { className: "d-block control-label", htmlFor: uid, children: props.schema.title }),
14849
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { "aria-describedby": feedbackId, children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_components47.UploadInput, __spreadValues({}, uploadInputProps)) }),
14850
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
14918
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: (0, import_classnames7.default)("form-group", { "has-error": showError }), children: [
14919
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("label", { className: "d-block control-label", htmlFor: uid, children: props.schema.title }),
14920
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { "aria-describedby": feedbackId, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_components47.UploadInput, __spreadValues({}, uploadInputProps)) }),
14921
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
14851
14922
  ControlFeedback_default,
14852
14923
  {
14853
14924
  id: feedbackId,
@@ -14890,12 +14961,12 @@ function getValidationMessages(schema, required, defaultErrorMessages) {
14890
14961
  // src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multiSelectSchema/MultiSelectSchema.tsx
14891
14962
  var import_components49 = require("@transferwise/components");
14892
14963
  var import_classnames8 = __toESM(require_classnames());
14893
- var import_react34 = require("react");
14964
+ var import_react35 = require("react");
14894
14965
  var import_react_intl25 = require("react-intl");
14895
14966
 
14896
14967
  // src/legacy/jsonSchemaForm/schemaFormControl/utils/mapping-utils.tsx
14897
14968
  var import_components48 = require("@transferwise/components");
14898
- var import_jsx_runtime80 = require("react/jsx-runtime");
14969
+ var import_jsx_runtime81 = require("react/jsx-runtime");
14899
14970
  var mapConstSchemaToOption = (schema, controlType) => {
14900
14971
  switch (controlType) {
14901
14972
  case "select":
@@ -14919,7 +14990,7 @@ var mapKeywordsToSearchStrings = (searchStrings) => isArray2(searchStrings) ? {
14919
14990
  var mapImage = (image) => {
14920
14991
  if (image == null ? void 0 : image.url) {
14921
14992
  return {
14922
- icon: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "media", children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "np-option__no-media-circle", children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("img", { src: image.url, alt: image.name || "" }) }) }),
14993
+ icon: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "media", children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "np-option__no-media-circle", children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("img", { src: image.url, alt: image.name || "" }) }) }),
14923
14994
  hideIconInTrigger: true
14924
14995
  };
14925
14996
  }
@@ -14928,17 +14999,17 @@ var mapImage = (image) => {
14928
14999
  var getIconPropertyForSelectOption = (icon) => {
14929
15000
  if ((icon == null ? void 0 : icon.name) && isFlagIcon2(icon.name)) {
14930
15001
  return {
14931
- icon: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Flag, { code: icon.name.substring(5), intrinsicSize: 24 })
15002
+ icon: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Flag, { code: icon.name.substring(5), intrinsicSize: 24 })
14932
15003
  };
14933
15004
  }
14934
15005
  if ((icon == null ? void 0 : icon.name) && isValidIconName(icon.name)) {
14935
15006
  return {
14936
- icon: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(DynamicIcon_default2, { type: icon.name })
15007
+ icon: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(DynamicIcon_default2, { type: icon.name })
14937
15008
  };
14938
15009
  }
14939
15010
  if (icon == null ? void 0 : icon.text) {
14940
15011
  return {
14941
- icon: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { children: icon.text })
15012
+ icon: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { children: icon.text })
14942
15013
  };
14943
15014
  }
14944
15015
  return null;
@@ -14946,17 +15017,17 @@ var getIconPropertyForSelectOption = (icon) => {
14946
15017
  var getAvatarPropertyForRadioOption = ({ image, icon }) => {
14947
15018
  if (image == null ? void 0 : image.url) {
14948
15019
  return {
14949
- avatar: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_components48.Avatar, { type: import_components48.AvatarType.THUMBNAIL, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("img", { src: image.url, alt: "" }) })
15020
+ avatar: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_components48.Avatar, { type: import_components48.AvatarType.THUMBNAIL, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("img", { src: image.url, alt: "" }) })
14950
15021
  };
14951
15022
  }
14952
15023
  if ((icon == null ? void 0 : icon.name) && isValidIconName(icon.name)) {
14953
15024
  return {
14954
- avatar: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_components48.Avatar, { type: import_components48.AvatarType.ICON, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(DynamicIcon_default2, { type: icon.name }) })
15025
+ avatar: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_components48.Avatar, { type: import_components48.AvatarType.ICON, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(DynamicIcon_default2, { type: icon.name }) })
14955
15026
  };
14956
15027
  }
14957
15028
  if (icon == null ? void 0 : icon.text) {
14958
15029
  return {
14959
- avatar: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_components48.Avatar, { type: import_components48.AvatarType.INITIALS, children: icon.text })
15030
+ avatar: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_components48.Avatar, { type: import_components48.AvatarType.INITIALS, children: icon.text })
14960
15031
  };
14961
15032
  }
14962
15033
  return null;
@@ -14995,7 +15066,7 @@ var multi_select_messages_default2 = (0, import_react_intl24.defineMessages)({
14995
15066
  });
14996
15067
 
14997
15068
  // src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/multiSelectSchema/MultiSelectSchema.tsx
14998
- var import_jsx_runtime81 = require("react/jsx-runtime");
15069
+ var import_jsx_runtime82 = require("react/jsx-runtime");
14999
15070
  function MultiSelectSchema({
15000
15071
  schema,
15001
15072
  model,
@@ -15007,10 +15078,10 @@ function MultiSelectSchema({
15007
15078
  const { formatMessage, locale } = (0, import_react_intl25.useIntl)();
15008
15079
  const { disabled, items, validationMessages, placeholder } = schema;
15009
15080
  const options = items.oneOf.map((item) => mapConstSchemaToOption(item, "select"));
15010
- const id = (0, import_react34.useMemo)(() => schema.$id || generateRandomId(), [schema.$id]);
15011
- const [changed, setChanged] = (0, import_react34.useState)(false);
15012
- const [selected, setSelected] = (0, import_react34.useState)(getInitialModelIndices2(model, options));
15013
- (0, import_react34.useEffect)(
15081
+ const id = (0, import_react35.useMemo)(() => schema.$id || generateRandomId(), [schema.$id]);
15082
+ const [changed, setChanged] = (0, import_react35.useState)(false);
15083
+ const [selected, setSelected] = (0, import_react35.useState)(getInitialModelIndices2(model, options));
15084
+ (0, import_react35.useEffect)(
15014
15085
  () => {
15015
15086
  if (selected) {
15016
15087
  broadcastModelChange(selected);
@@ -15047,9 +15118,9 @@ function MultiSelectSchema({
15047
15118
  const formGroupClasses = {
15048
15119
  "has-error": shouldShowInitialError || shouldShowValidationError
15049
15120
  };
15050
- return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: (0, import_classnames8.default)("d-flex flex-column", formGroupClasses), children: [
15051
- schema.title ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("label", { htmlFor: id, children: schema.title }) : void 0,
15052
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
15121
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: (0, import_classnames8.default)("d-flex flex-column", formGroupClasses), children: [
15122
+ schema.title ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("label", { htmlFor: id, children: schema.title }) : void 0,
15123
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
15053
15124
  import_components49.SelectInput,
15054
15125
  {
15055
15126
  id,
@@ -15075,12 +15146,12 @@ function MultiSelectSchema({
15075
15146
  if (withinTrigger) {
15076
15147
  return selected && index === selected[0] ? getFormattedMessage() : void 0;
15077
15148
  }
15078
- return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_components49.SelectInputOptionContent, { title: label, note: note != null ? note : secondary, icon });
15149
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_components49.SelectInputOptionContent, { title: label, note: note != null ? note : secondary, icon });
15079
15150
  },
15080
15151
  onChange: broadcastModelChange
15081
15152
  }
15082
15153
  ),
15083
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
15154
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
15084
15155
  ControlFeedback_default,
15085
15156
  {
15086
15157
  id: `${id}-feedback`,
@@ -15107,14 +15178,14 @@ var getInitialModelIndices2 = (model, options) => {
15107
15178
  // src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/RepeatableSchema.tsx
15108
15179
  var import_components51 = require("@transferwise/components");
15109
15180
  var import_icons4 = require("@transferwise/icons");
15110
- var import_react36 = require("react");
15181
+ var import_react37 = require("react");
15111
15182
  var import_react_intl28 = require("react-intl");
15112
15183
 
15113
15184
  // src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/ItemSummary.tsx
15114
15185
  var import_components50 = require("@transferwise/components");
15115
- var import_jsx_runtime82 = require("react/jsx-runtime");
15186
+ var import_jsx_runtime83 = require("react/jsx-runtime");
15116
15187
  function ItemSummaryOption2({ item, onClick }) {
15117
- return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
15188
+ return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
15118
15189
  import_components50.NavigationOption,
15119
15190
  {
15120
15191
  media: getNavigationOptionMedia(item),
@@ -15152,9 +15223,9 @@ var repeatable_messages_default2 = (0, import_react_intl26.defineMessages)({
15152
15223
  });
15153
15224
 
15154
15225
  // src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/RepeatableSchemaStep.tsx
15155
- var import_react35 = require("react");
15226
+ var import_react36 = require("react");
15156
15227
  var import_react_intl27 = require("react-intl");
15157
- var import_jsx_runtime83 = require("react/jsx-runtime");
15228
+ var import_jsx_runtime84 = require("react/jsx-runtime");
15158
15229
  function RepeatableSchemaStep({
15159
15230
  type,
15160
15231
  schema,
@@ -15165,7 +15236,7 @@ function RepeatableSchemaStep({
15165
15236
  onAction
15166
15237
  }) {
15167
15238
  const { formatMessage } = (0, import_react_intl27.useIntl)();
15168
- const [filename, setFilename] = (0, import_react35.useState)(void 0);
15239
+ const [filename, setFilename] = (0, import_react36.useState)(void 0);
15169
15240
  const step = {
15170
15241
  layout: [
15171
15242
  {
@@ -15202,7 +15273,7 @@ function RepeatableSchemaStep({
15202
15273
  }
15203
15274
  onModelChange(__spreadProps(__spreadValues({}, modelChangeProps), { model: model2 }));
15204
15275
  };
15205
- return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
15276
+ return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
15206
15277
  DynamicFlowStep,
15207
15278
  {
15208
15279
  step,
@@ -15408,7 +15479,7 @@ var schemaSummaryProvides = (summary, providesProp) => (
15408
15479
 
15409
15480
  // src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/repeatableSchema/RepeatableSchema.tsx
15410
15481
  var import_classnames9 = __toESM(require_classnames());
15411
- var import_jsx_runtime84 = require("react/jsx-runtime");
15482
+ var import_jsx_runtime85 = require("react/jsx-runtime");
15412
15483
  function RepeatableSchema({
15413
15484
  schema,
15414
15485
  model,
@@ -15418,9 +15489,9 @@ function RepeatableSchema({
15418
15489
  onChange
15419
15490
  }) {
15420
15491
  var _a;
15421
- const [openModalType, setOpenModalType] = (0, import_react36.useState)(null);
15422
- const [changed, setChanged] = (0, import_react36.useState)(false);
15423
- const [itemSummaries, setItemSummaries] = (0, import_react36.useState)(() => {
15492
+ const [openModalType, setOpenModalType] = (0, import_react37.useState)(null);
15493
+ const [changed, setChanged] = (0, import_react37.useState)(false);
15494
+ const [itemSummaries, setItemSummaries] = (0, import_react37.useState)(() => {
15424
15495
  if (isObject2(model) && !isArray2(model)) {
15425
15496
  throw new Error(
15426
15497
  "RepeatableSchema does not support object models. Ensure your array schema is wrapped inside an object schema."
@@ -15428,8 +15499,8 @@ function RepeatableSchema({
15428
15499
  }
15429
15500
  return model ? model.map((item) => getItemSummaryFromSchema(schema.items, item, schema == null ? void 0 : schema.summary)) : null;
15430
15501
  });
15431
- const [editableItem, setEditableItem] = (0, import_react36.useState)({ item: null, model: null });
15432
- const id = (0, import_react36.useMemo)(() => schema.$id || generateRandomId(), [schema.$id]);
15502
+ const [editableItem, setEditableItem] = (0, import_react37.useState)({ item: null, model: null });
15503
+ const id = (0, import_react37.useMemo)(() => schema.$id || generateRandomId(), [schema.$id]);
15433
15504
  const broadcastModelChange = (updatedItems) => {
15434
15505
  const updatedModel = updatedItems ? updatedItems.map(({ value }) => value) : null;
15435
15506
  onChange({
@@ -15485,9 +15556,9 @@ function RepeatableSchema({
15485
15556
  const formGroupClasses = {
15486
15557
  "has-error": (_a = errors && !isEmpty(errors)) != null ? _a : submitted && validations.length
15487
15558
  };
15488
- return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { id, className: (0, import_classnames9.default)(formGroupClasses), children: [
15489
- schema.title && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_components51.Header, { title: schema.title }),
15490
- itemSummaries == null ? void 0 : itemSummaries.map((itemSummary) => /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
15559
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { id, className: (0, import_classnames9.default)(formGroupClasses), children: [
15560
+ schema.title && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_components51.Header, { title: schema.title }),
15561
+ itemSummaries == null ? void 0 : itemSummaries.map((itemSummary) => /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
15491
15562
  ItemSummaryOption2,
15492
15563
  {
15493
15564
  item: itemSummary,
@@ -15495,21 +15566,21 @@ function RepeatableSchema({
15495
15566
  },
15496
15567
  JSON.stringify(itemSummary)
15497
15568
  )),
15498
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
15569
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
15499
15570
  import_components51.NavigationOption,
15500
15571
  {
15501
- media: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_icons4.Plus, {}),
15572
+ media: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_icons4.Plus, {}),
15502
15573
  title: schema.addItemTitle || formatMessage(repeatable_messages_default2.addItemTitle),
15503
15574
  showMediaAtAllSizes: true,
15504
15575
  onClick: onAddItem
15505
15576
  }
15506
15577
  ),
15507
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
15578
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
15508
15579
  import_components51.Modal,
15509
15580
  {
15510
15581
  open: openModalType !== null,
15511
15582
  title: (openModalType === "add" ? schema.addItemTitle : schema.editItemTitle) || formatMessage(repeatable_messages_default2.addItemTitle),
15512
- body: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
15583
+ body: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
15513
15584
  RepeatableSchemaStep_default,
15514
15585
  {
15515
15586
  type: openModalType != null ? openModalType : "add",
@@ -15524,7 +15595,7 @@ function RepeatableSchema({
15524
15595
  onClose: onCancelEdit
15525
15596
  }
15526
15597
  ),
15527
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
15598
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
15528
15599
  ControlFeedback_default,
15529
15600
  {
15530
15601
  id: `${id}-feedback`,
@@ -15566,17 +15637,17 @@ var getUpdatedItemSummaries = (action, {
15566
15637
  var RepeatableSchema_default = RepeatableSchema;
15567
15638
 
15568
15639
  // src/legacy/jsonSchemaForm/arrayTypeSchema/arrayListSchema/ArrayListSchema.tsx
15569
- var import_jsx_runtime85 = require("react/jsx-runtime");
15640
+ var import_jsx_runtime86 = require("react/jsx-runtime");
15570
15641
  function ArrayListSchema(props) {
15571
15642
  const { schema } = props;
15572
15643
  if (isMultipleFileUploadSchema(schema)) {
15573
- return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(MultipleFileUploadSchema_default, __spreadProps(__spreadValues({}, props), { schema }));
15644
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(MultipleFileUploadSchema_default, __spreadProps(__spreadValues({}, props), { schema }));
15574
15645
  }
15575
15646
  if (isMultiSelectConstSchema(schema)) {
15576
- return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(MultiSelectSchema, __spreadProps(__spreadValues({}, props), { schema }));
15647
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(MultiSelectSchema, __spreadProps(__spreadValues({}, props), { schema }));
15577
15648
  }
15578
15649
  if (isListArraySchema(schema)) {
15579
- return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(RepeatableSchema_default, __spreadProps(__spreadValues({}, props), { schema }));
15650
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(RepeatableSchema_default, __spreadProps(__spreadValues({}, props), { schema }));
15580
15651
  }
15581
15652
  throw new Error("Invalid array list schema");
15582
15653
  }
@@ -15587,11 +15658,11 @@ ArrayListSchema.defaultProps = {
15587
15658
  var ArrayListSchema_default = ArrayListSchema;
15588
15659
 
15589
15660
  // src/legacy/jsonSchemaForm/arrayTypeSchema/ArraySchema.tsx
15590
- var import_jsx_runtime86 = require("react/jsx-runtime");
15661
+ var import_jsx_runtime87 = require("react/jsx-runtime");
15591
15662
  var ArraySchema = (props) => {
15592
15663
  const { schema } = props;
15593
15664
  if (isListArraySchema(schema)) {
15594
- return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(ArrayListSchema_default, __spreadValues({}, props));
15665
+ return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(ArrayListSchema_default, __spreadValues({}, props));
15595
15666
  }
15596
15667
  throw new Error("Not implemented");
15597
15668
  };
@@ -15603,15 +15674,15 @@ var ArraySchema_default = ArraySchema;
15603
15674
  // src/legacy/jsonSchemaForm/objectSchema/ObjectSchema.tsx
15604
15675
  var import_components52 = require("@transferwise/components");
15605
15676
  var import_classnames10 = __toESM(require_classnames());
15606
- var import_react37 = require("react");
15607
- var import_jsx_runtime87 = require("react/jsx-runtime");
15677
+ var import_react38 = require("react");
15678
+ var import_jsx_runtime88 = require("react/jsx-runtime");
15608
15679
  var getSchemaColumnClasses2 = (width) => ({
15609
15680
  "col-xs-12": true,
15610
15681
  "col-sm-6": width === "md",
15611
15682
  "col-sm-4": width === "sm"
15612
15683
  });
15613
15684
  function ObjectSchema(props) {
15614
- const [model, setModel] = (0, import_react37.useState)(() => __spreadValues({}, getValidObjectModelParts(props.model, props.schema)));
15685
+ const [model, setModel] = (0, import_react38.useState)(() => __spreadValues({}, getValidObjectModelParts(props.model, props.schema)));
15615
15686
  const onChangeProperty = (propertyName, onChangeProps) => {
15616
15687
  if (onChangeProps.model !== null) {
15617
15688
  model[propertyName] = onChangeProps.model;
@@ -15622,7 +15693,7 @@ function ObjectSchema(props) {
15622
15693
  props.onChange(__spreadProps(__spreadValues({}, onChangeProps), { model }));
15623
15694
  };
15624
15695
  const isRequired = (propertyName) => props.schema.required && props.schema.required.includes(propertyName);
15625
- (0, import_react37.useEffect)(() => {
15696
+ (0, import_react38.useEffect)(() => {
15626
15697
  const newModel = getValidObjectModelParts(model, props.schema) || {};
15627
15698
  setModel(newModel);
15628
15699
  if (!isEqual(newModel, model)) {
@@ -15640,22 +15711,22 @@ function ObjectSchema(props) {
15640
15711
  const isPropertyDefined = (propertyName) => typeof props.schema.properties[propertyName] !== "undefined";
15641
15712
  const orderedPropertyNames = Array.from(allorderedPropertiesSet).filter(isPropertyDefined);
15642
15713
  const propsErrors = props.errors;
15643
- return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(import_jsx_runtime87.Fragment, { children: [
15644
- props.schema.alert && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(DynamicAlert_default, { component: props.schema.alert }),
15645
- /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("fieldset", { children: [
15646
- props.schema.title && !props.hideTitle && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_components52.Header, { title: props.schema.title, as: "legend" }),
15647
- props.schema.description && !props.hideTitle && /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("p", { children: [
15714
+ return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(import_jsx_runtime88.Fragment, { children: [
15715
+ props.schema.alert && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(DynamicAlert_default, { component: props.schema.alert }),
15716
+ /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("fieldset", { children: [
15717
+ props.schema.title && !props.hideTitle && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_components52.Header, { title: props.schema.title, as: "legend" }),
15718
+ props.schema.description && !props.hideTitle && /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("p", { children: [
15648
15719
  " ",
15649
15720
  props.schema.description,
15650
15721
  " "
15651
15722
  ] }),
15652
- /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "row", children: orderedPropertyNames.map((propertyName) => /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
15723
+ /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "row", children: orderedPropertyNames.map((propertyName) => /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
15653
15724
  "div",
15654
15725
  {
15655
15726
  className: (0, import_classnames10.default)(
15656
15727
  getSchemaColumnClasses2(props.schema.properties[propertyName].width)
15657
15728
  ),
15658
- children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
15729
+ children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
15659
15730
  GenericSchema_default,
15660
15731
  {
15661
15732
  schema: props.schema.properties[propertyName],
@@ -15683,7 +15754,7 @@ var ObjectSchema_default = ObjectSchema;
15683
15754
  // src/legacy/jsonSchemaForm/oneOfSchema/OneOfSchema.tsx
15684
15755
  var import_components55 = require("@transferwise/components");
15685
15756
  var import_classnames11 = __toESM(require_classnames());
15686
- var import_react40 = require("react");
15757
+ var import_react41 = require("react");
15687
15758
 
15688
15759
  // src/legacy/jsonSchemaForm/help/Help.tsx
15689
15760
  var import_components53 = require("@transferwise/components");
@@ -15700,14 +15771,14 @@ var help_messages_default2 = (0, import_react_intl29.defineMessages)({
15700
15771
  });
15701
15772
 
15702
15773
  // src/legacy/jsonSchemaForm/help/Help.tsx
15703
- var import_jsx_runtime88 = require("react/jsx-runtime");
15774
+ var import_jsx_runtime89 = require("react/jsx-runtime");
15704
15775
  function Help2(props) {
15705
15776
  const intl = (0, import_react_intl30.useIntl)();
15706
- return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
15777
+ return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
15707
15778
  import_components53.Info,
15708
15779
  {
15709
15780
  className: "m-l-1",
15710
- content: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_components53.Markdown, { config: { link: { target: "_blank" } }, children: props.help.markdown }),
15781
+ content: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_components53.Markdown, { config: { link: { target: "_blank" } }, children: props.help.markdown }),
15711
15782
  presentation: "POPOVER",
15712
15783
  size: "sm",
15713
15784
  "aria-label": intl.formatMessage(help_messages_default2.helpAria)
@@ -15717,12 +15788,12 @@ function Help2(props) {
15717
15788
  var Help_default2 = Help2;
15718
15789
 
15719
15790
  // src/legacy/jsonSchemaForm/schemaFormControl/SchemaFormControl.tsx
15720
- var import_react39 = require("react");
15791
+ var import_react40 = require("react");
15721
15792
  var import_react_intl31 = require("react-intl");
15722
15793
 
15723
15794
  // src/legacy/formControl/FormControl.tsx
15724
15795
  var import_components54 = require("@transferwise/components");
15725
- var import_react38 = require("react");
15796
+ var import_react39 = require("react");
15726
15797
 
15727
15798
  // src/legacy/formControl/utils/value-utils.ts
15728
15799
  var getSafeStringValue = (value, options = {}) => {
@@ -15908,8 +15979,8 @@ var autocompleteTokenMap2 = {
15908
15979
  };
15909
15980
 
15910
15981
  // src/legacy/formControl/FormControl.tsx
15911
- var import_jsx_runtime89 = require("react/jsx-runtime");
15912
- var _FormControl = class _FormControl extends import_react38.PureComponent {
15982
+ var import_jsx_runtime90 = require("react/jsx-runtime");
15983
+ var _FormControl = class _FormControl extends import_react39.PureComponent {
15913
15984
  constructor(props) {
15914
15985
  super(props);
15915
15986
  this.getAutocompleteValue = ({ prefix = "", suffix = "" } = {}) => {
@@ -15997,7 +16068,7 @@ var _FormControl = class _FormControl extends import_react38.PureComponent {
15997
16068
  } = this.props;
15998
16069
  switch (type) {
15999
16070
  case FormControlType.RADIO:
16000
- return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
16071
+ return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
16001
16072
  import_components54.RadioGroup,
16002
16073
  {
16003
16074
  radios: options.map(this.mapOption),
@@ -16007,7 +16078,7 @@ var _FormControl = class _FormControl extends import_react38.PureComponent {
16007
16078
  }
16008
16079
  );
16009
16080
  case FormControlType.CHECKBOX:
16010
- return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
16081
+ return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
16011
16082
  import_components54.Checkbox,
16012
16083
  {
16013
16084
  checked: getSafeBooleanValue(value, { coerceValue: true }),
@@ -16025,7 +16096,7 @@ var _FormControl = class _FormControl extends import_react38.PureComponent {
16025
16096
  const search = options.length >= 8;
16026
16097
  const items = options;
16027
16098
  const selected = this.getSelectedOption(options);
16028
- return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "d-flex flex-column", children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
16099
+ return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: "d-flex flex-column", children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
16029
16100
  import_components54.SelectInput,
16030
16101
  {
16031
16102
  id,
@@ -16041,7 +16112,7 @@ var _FormControl = class _FormControl extends import_react38.PureComponent {
16041
16112
  disabled: value2.disabled
16042
16113
  })),
16043
16114
  value: selected != null ? selected : null,
16044
- renderValue: ({ hideIconInTrigger, icon, label: label2, note, secondary }, withinTrigger) => /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
16115
+ renderValue: ({ hideIconInTrigger, icon, label: label2, note, secondary }, withinTrigger) => /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
16045
16116
  import_components54.SelectInputOptionContent,
16046
16117
  {
16047
16118
  title: label2,
@@ -16070,13 +16141,13 @@ var _FormControl = class _FormControl extends import_react38.PureComponent {
16070
16141
  ) });
16071
16142
  }
16072
16143
  case FormControlType.TAB:
16073
- return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
16144
+ return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
16074
16145
  import_components54.Tabs,
16075
16146
  {
16076
16147
  selected: ((_a = this.getSelectedOption(options)) == null ? void 0 : _a.value) || 0,
16077
16148
  tabs: options.map((option) => ({
16078
16149
  title: option.label,
16079
- content: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_jsx_runtime89.Fragment, {}),
16150
+ content: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_jsx_runtime90.Fragment, {}),
16080
16151
  disabled: option.disabled || false
16081
16152
  })),
16082
16153
  name: id,
@@ -16091,7 +16162,7 @@ var _FormControl = class _FormControl extends import_react38.PureComponent {
16091
16162
  );
16092
16163
  case FormControlType.NUMERIC:
16093
16164
  case FormControlType.NUMBER: {
16094
- return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
16165
+ return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
16095
16166
  "input",
16096
16167
  {
16097
16168
  autoComplete: this.getAutocompleteValue(),
@@ -16125,7 +16196,7 @@ var _FormControl = class _FormControl extends import_react38.PureComponent {
16125
16196
  );
16126
16197
  }
16127
16198
  case FormControlType.HIDDEN:
16128
- return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
16199
+ return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
16129
16200
  "input",
16130
16201
  {
16131
16202
  type: "hidden",
@@ -16135,7 +16206,7 @@ var _FormControl = class _FormControl extends import_react38.PureComponent {
16135
16206
  }
16136
16207
  );
16137
16208
  case FormControlType.PASSWORD:
16138
- return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
16209
+ return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
16139
16210
  "input",
16140
16211
  {
16141
16212
  autoComplete: this.getAutocompleteValue(),
@@ -16155,7 +16226,7 @@ var _FormControl = class _FormControl extends import_react38.PureComponent {
16155
16226
  );
16156
16227
  case FormControlType.DATE:
16157
16228
  case FormControlType.DATETIME:
16158
- return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
16229
+ return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
16159
16230
  import_components54.DateInput,
16160
16231
  {
16161
16232
  dayAutoComplete: this.getAutocompleteValue({ suffix: "-day" }),
@@ -16171,7 +16242,7 @@ var _FormControl = class _FormControl extends import_react38.PureComponent {
16171
16242
  }
16172
16243
  );
16173
16244
  case FormControlType.DATELOOKUP: {
16174
- return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
16245
+ return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
16175
16246
  import_components54.DateLookup,
16176
16247
  {
16177
16248
  value: getSafeDateStringValue(value),
@@ -16189,7 +16260,7 @@ var _FormControl = class _FormControl extends import_react38.PureComponent {
16189
16260
  );
16190
16261
  }
16191
16262
  case FormControlType.TEL:
16192
- return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
16263
+ return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
16193
16264
  import_components54.PhoneNumberInput,
16194
16265
  {
16195
16266
  disabled,
@@ -16221,7 +16292,7 @@ var _FormControl = class _FormControl extends import_react38.PureComponent {
16221
16292
  autoComplete: this.getAutocompleteValue()
16222
16293
  };
16223
16294
  if (this.props.displayPattern) {
16224
- return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
16295
+ return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
16225
16296
  import_components54.TextareaWithDisplayFormat,
16226
16297
  __spreadProps(__spreadValues({
16227
16298
  displayPattern: this.props.displayPattern
@@ -16230,7 +16301,7 @@ var _FormControl = class _FormControl extends import_react38.PureComponent {
16230
16301
  })
16231
16302
  );
16232
16303
  }
16233
- return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
16304
+ return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
16234
16305
  "textarea",
16235
16306
  __spreadProps(__spreadValues({}, textareaProps), {
16236
16307
  "aria-describedby": describedBy,
@@ -16240,7 +16311,7 @@ var _FormControl = class _FormControl extends import_react38.PureComponent {
16240
16311
  }
16241
16312
  case FormControlType.FILE:
16242
16313
  case FormControlType.UPLOAD: {
16243
- return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
16314
+ return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
16244
16315
  import_components54.Upload,
16245
16316
  __spreadProps(__spreadValues({}, uploadProps), {
16246
16317
  usAccept: uploadProps.usAccept || "*",
@@ -16277,7 +16348,7 @@ var _FormControl = class _FormControl extends import_react38.PureComponent {
16277
16348
  autoComplete: this.getAutocompleteValue()
16278
16349
  };
16279
16350
  if (this.props.displayPattern) {
16280
- return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
16351
+ return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
16281
16352
  import_components54.InputWithDisplayFormat,
16282
16353
  __spreadProps(__spreadValues({
16283
16354
  displayPattern: this.props.displayPattern
@@ -16286,7 +16357,7 @@ var _FormControl = class _FormControl extends import_react38.PureComponent {
16286
16357
  })
16287
16358
  );
16288
16359
  }
16289
- return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
16360
+ return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
16290
16361
  "input",
16291
16362
  __spreadProps(__spreadValues({}, inputProps), {
16292
16363
  "aria-describedby": describedBy,
@@ -16336,7 +16407,7 @@ _FormControl.defaultProps = {
16336
16407
  var FormControl = _FormControl;
16337
16408
 
16338
16409
  // src/legacy/jsonSchemaForm/schemaFormControl/SchemaFormControl.tsx
16339
- var import_jsx_runtime90 = require("react/jsx-runtime");
16410
+ var import_jsx_runtime91 = require("react/jsx-runtime");
16340
16411
  var isNativeInput = (propsSchemaType) => propsSchemaType === "string" || propsSchemaType === "number";
16341
16412
  var getControlType = (schema) => {
16342
16413
  if (isOneOfSchema2(schema)) {
@@ -16417,7 +16488,7 @@ function SchemaFormControl(props) {
16417
16488
  onChange(getValidBasicModelOrNull(value2, schema), type, metadata);
16418
16489
  };
16419
16490
  const controlType = getControlType(schema);
16420
- (0, import_react39.useEffect)(() => {
16491
+ (0, import_react40.useEffect)(() => {
16421
16492
  warnIfInvalidSchema(schema, log, controlType);
16422
16493
  }, [JSON.stringify(schema), log, controlType]);
16423
16494
  const options = schema.values || getOptions(schema, controlType);
@@ -16447,7 +16518,7 @@ function SchemaFormControl(props) {
16447
16518
  describedBy,
16448
16519
  required
16449
16520
  };
16450
- return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { "aria-describedby": describedBy, children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(FormControl, __spreadValues(__spreadValues({ type: controlType, value: safeValue }, events), controlProps)) });
16521
+ return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { "aria-describedby": describedBy, children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(FormControl, __spreadValues(__spreadValues({ type: controlType, value: safeValue }, events), controlProps)) });
16451
16522
  }
16452
16523
  SchemaFormControl.defaultProps = {
16453
16524
  value: null,
@@ -16476,17 +16547,17 @@ var warnIfInvalidSchema = (schema, log, controlType) => {
16476
16547
  var SchemaFormControl_default = SchemaFormControl;
16477
16548
 
16478
16549
  // src/legacy/jsonSchemaForm/oneOfSchema/OneOfSchema.tsx
16479
- var import_jsx_runtime91 = require("react/jsx-runtime");
16550
+ var import_jsx_runtime92 = require("react/jsx-runtime");
16480
16551
  function OneOfSchema(props) {
16481
16552
  const onEvent = useEventDispatcher();
16482
- const [changed, setChanged] = (0, import_react40.useState)(false);
16483
- const [focused, setFocused] = (0, import_react40.useState)(false);
16484
- const [blurred, setBlurred] = (0, import_react40.useState)(false);
16485
- const id = (0, import_react40.useMemo)(() => props.schema.$id || generateRandomId(), [props.schema.$id]);
16486
- const [schemaIndex, setSchemaIndex] = (0, import_react40.useState)(
16553
+ const [changed, setChanged] = (0, import_react41.useState)(false);
16554
+ const [focused, setFocused] = (0, import_react41.useState)(false);
16555
+ const [blurred, setBlurred] = (0, import_react41.useState)(false);
16556
+ const id = (0, import_react41.useMemo)(() => props.schema.$id || generateRandomId(), [props.schema.$id]);
16557
+ const [schemaIndex, setSchemaIndex] = (0, import_react41.useState)(
16487
16558
  getActiveSchemaIndex(props.schema, props.model)
16488
16559
  );
16489
- const [models, setModels] = (0, import_react40.useState)(getModelPartsForSchemas(props.model, props.schema.oneOf));
16560
+ const [models, setModels] = (0, import_react41.useState)(getModelPartsForSchemas(props.model, props.schema.oneOf));
16490
16561
  const debouncedTrackEvent = useDebouncedFunction(onEvent, 200);
16491
16562
  const onSearchChange = (searchValue) => {
16492
16563
  debouncedTrackEvent("Dynamic Flow - OneOf Searched", {
@@ -16494,7 +16565,7 @@ function OneOfSchema(props) {
16494
16565
  searchValueLength: searchValue.length
16495
16566
  });
16496
16567
  };
16497
- (0, import_react40.useEffect)(() => {
16568
+ (0, import_react41.useEffect)(() => {
16498
16569
  const modelIndex = getValidIndexFromValue(props.schema, props.model);
16499
16570
  const defaultIndex = getValidIndexFromValue(props.schema, props.schema.default);
16500
16571
  if (modelIndex === -1 && defaultIndex >= 0) {
@@ -16552,12 +16623,12 @@ function OneOfSchema(props) {
16552
16623
  "has-error": !changed && props.errors && !isEmpty(props.errors) || (props.submitted || changed && blurred) && validations.length
16553
16624
  };
16554
16625
  const feedbackId = `${id}-feedback`;
16555
- return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(import_jsx_runtime91.Fragment, { children: [
16556
- (props.schema.oneOf.length > 1 || isConstSchema2(props.schema.oneOf[0])) && /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(import_jsx_runtime91.Fragment, { children: [
16557
- props.schema.alert && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(DynamicAlert_default, { component: props.schema.alert }),
16558
- /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: (0, import_classnames11.default)(formGroupClasses), children: [
16626
+ return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(import_jsx_runtime92.Fragment, { children: [
16627
+ (props.schema.oneOf.length > 1 || isConstSchema2(props.schema.oneOf[0])) && /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(import_jsx_runtime92.Fragment, { children: [
16628
+ props.schema.alert && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(DynamicAlert_default, { component: props.schema.alert }),
16629
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: (0, import_classnames11.default)(formGroupClasses), children: [
16559
16630
  getTitleAndHelp(props.schema, id),
16560
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
16631
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
16561
16632
  SchemaFormControl_default,
16562
16633
  {
16563
16634
  id,
@@ -16573,7 +16644,7 @@ function OneOfSchema(props) {
16573
16644
  onSearchChange
16574
16645
  }
16575
16646
  ),
16576
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
16647
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
16577
16648
  ControlFeedback_default,
16578
16649
  {
16579
16650
  id: feedbackId,
@@ -16589,7 +16660,7 @@ function OneOfSchema(props) {
16589
16660
  )
16590
16661
  ] })
16591
16662
  ] }),
16592
- isNoNConstSchema(props.schema.oneOf[schemaIndex]) && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
16663
+ isNoNConstSchema(props.schema.oneOf[schemaIndex]) && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
16593
16664
  GenericSchema_default,
16594
16665
  {
16595
16666
  schema: props.schema.oneOf[schemaIndex],
@@ -16606,16 +16677,16 @@ function OneOfSchema(props) {
16606
16677
  }
16607
16678
  function getTitleAndHelp(schema, forId) {
16608
16679
  var _a;
16609
- const helpElement = schema.help ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Help_default2, { help: schema.help }) : null;
16610
- const titleElement = isConstSchema2(schema.oneOf[0]) ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "m-b-1", children: /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("label", { className: "control-label d-inline", htmlFor: forId, children: [
16680
+ const helpElement = schema.help ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Help_default2, { help: schema.help }) : null;
16681
+ const titleElement = isConstSchema2(schema.oneOf[0]) ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "m-b-1", children: /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("label", { className: "control-label d-inline", htmlFor: forId, children: [
16611
16682
  schema.title,
16612
16683
  " ",
16613
16684
  helpElement
16614
- ] }) }) : /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_jsx_runtime91.Fragment, { children: helpElement ? /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("h4", { className: "m-b-2", children: [
16685
+ ] }) }) : /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_jsx_runtime92.Fragment, { children: helpElement ? /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("h4", { className: "m-b-2", children: [
16615
16686
  schema.title,
16616
16687
  " ",
16617
16688
  helpElement
16618
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_components55.Header, { title: (_a = schema.title) != null ? _a : "" }) });
16689
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_components55.Header, { title: (_a = schema.title) != null ? _a : "" }) });
16619
16690
  return schema.title ? titleElement : helpElement;
16620
16691
  }
16621
16692
  function getValidations(props, schemaIndex) {
@@ -16652,13 +16723,13 @@ var OneOfSchema_default = OneOfSchema;
16652
16723
 
16653
16724
  // src/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/PersistAsyncBlobSchema.tsx
16654
16725
  var import_classnames12 = __toESM(require_classnames());
16655
- var import_react42 = require("react");
16726
+ var import_react43 = require("react");
16656
16727
  var import_react_intl32 = require("react-intl");
16657
16728
 
16658
16729
  // src/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/UploadInputAdapter.tsx
16659
16730
  var import_components56 = require("@transferwise/components");
16660
- var import_react41 = require("react");
16661
- var import_jsx_runtime92 = require("react/jsx-runtime");
16731
+ var import_react42 = require("react");
16732
+ var import_jsx_runtime93 = require("react/jsx-runtime");
16662
16733
  function UploadInputAdapter(props) {
16663
16734
  const {
16664
16735
  id,
@@ -16674,7 +16745,7 @@ function UploadInputAdapter(props) {
16674
16745
  onCancel
16675
16746
  } = props;
16676
16747
  const onEvent = useEventDispatcher();
16677
- const files = (0, import_react41.useMemo)(() => fileId ? [{ id: fileId, status: import_components56.Status.SUCCEEDED }] : [], [fileId]);
16748
+ const files = (0, import_react42.useMemo)(() => fileId ? [{ id: fileId, status: import_components56.Status.SUCCEEDED }] : [], [fileId]);
16678
16749
  const uploadFile = (formData) => {
16679
16750
  onEvent("Dynamic Flow - PersistAsync", { status: "pending", schemaId: id });
16680
16751
  return httpClient(String(httpOptions.url), {
@@ -16693,7 +16764,7 @@ function UploadInputAdapter(props) {
16693
16764
  return Promise.reject();
16694
16765
  });
16695
16766
  };
16696
- return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
16767
+ return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
16697
16768
  import_components56.UploadInput,
16698
16769
  {
16699
16770
  id,
@@ -16713,17 +16784,17 @@ function UploadInputAdapter(props) {
16713
16784
  }
16714
16785
 
16715
16786
  // src/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBlobSchema/PersistAsyncBlobSchema.tsx
16716
- var import_jsx_runtime93 = require("react/jsx-runtime");
16787
+ var import_jsx_runtime94 = require("react/jsx-runtime");
16717
16788
  function PersistAsyncBlobSchema(props) {
16718
16789
  const { model, schema, submitted, required, errors, onChange } = props;
16719
- const [persistAsyncValidationMessages, setPersistAsyncValidationMessages] = (0, import_react42.useState)({});
16720
- const [persistAsyncValidations, setPersistAsyncValidations] = (0, import_react42.useState)(null);
16721
- const [validations, setValidations] = (0, import_react42.useState)([]);
16722
- const [changed, setChanged] = (0, import_react42.useState)(false);
16790
+ const [persistAsyncValidationMessages, setPersistAsyncValidationMessages] = (0, import_react43.useState)({});
16791
+ const [persistAsyncValidations, setPersistAsyncValidations] = (0, import_react43.useState)(null);
16792
+ const [validations, setValidations] = (0, import_react43.useState)([]);
16793
+ const [changed, setChanged] = (0, import_react43.useState)(false);
16723
16794
  const intl = (0, import_react_intl32.useIntl)();
16724
16795
  const httpClient = useHttpClient();
16725
16796
  const onEvent = useEventDispatcher();
16726
- (0, import_react42.useEffect)(() => {
16797
+ (0, import_react43.useEffect)(() => {
16727
16798
  if (submitted) {
16728
16799
  setValidations(getValidationFailures(model, schema, Boolean(required)));
16729
16800
  } else {
@@ -16761,8 +16832,8 @@ function PersistAsyncBlobSchema(props) {
16761
16832
  };
16762
16833
  const id = schema.$id || schema.persistAsync.schema.$id || schema.persistAsync.idProperty;
16763
16834
  const feedbackId = `${id}-feedback`;
16764
- return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: (0, import_classnames12.default)(formGroupClasses), children: [
16765
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { "aria-describedby": feedbackId, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
16835
+ return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: (0, import_classnames12.default)(formGroupClasses), children: [
16836
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { "aria-describedby": feedbackId, children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
16766
16837
  UploadInputAdapter,
16767
16838
  __spreadValues({
16768
16839
  id,
@@ -16780,7 +16851,7 @@ function PersistAsyncBlobSchema(props) {
16780
16851
  onCancel
16781
16852
  }, mapSchemaToUploadOptions(schema.persistAsync.schema))
16782
16853
  ) }),
16783
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
16854
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
16784
16855
  ControlFeedback_default,
16785
16856
  {
16786
16857
  id: feedbackId,
@@ -16805,17 +16876,17 @@ PersistAsyncBlobSchema.defaultProps = {
16805
16876
  var PersistAsyncBlobSchema_default = PersistAsyncBlobSchema;
16806
16877
 
16807
16878
  // src/legacy/jsonSchemaForm/persistAsyncSchema/PersistAsyncSchema.tsx
16808
- var import_jsx_runtime94 = require("react/jsx-runtime");
16879
+ var import_jsx_runtime95 = require("react/jsx-runtime");
16809
16880
  function PersistAsyncSchema(props) {
16810
16881
  const { schema } = props;
16811
16882
  const persistAsyncSchemaType = schema.persistAsync.schema.type;
16812
16883
  if (persistAsyncSchemaType === "blob") {
16813
- return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
16884
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
16814
16885
  PersistAsyncBlobSchema_default,
16815
16886
  __spreadValues({}, props)
16816
16887
  );
16817
16888
  }
16818
- return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(PersistAsyncBasicSchema_default, __spreadValues({}, props));
16889
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(PersistAsyncBasicSchema_default, __spreadValues({}, props));
16819
16890
  }
16820
16891
  PersistAsyncSchema.defaultProps = {
16821
16892
  required: false
@@ -16823,7 +16894,7 @@ PersistAsyncSchema.defaultProps = {
16823
16894
  var PersistAsyncSchema_default = PersistAsyncSchema;
16824
16895
 
16825
16896
  // src/legacy/jsonSchemaForm/promotedOneOfSchema/PromotedOneOfSchema.tsx
16826
- var import_react43 = require("react");
16897
+ var import_react44 = require("react");
16827
16898
 
16828
16899
  // src/legacy/jsonSchemaForm/promotedOneOfSchema/promoted-one-of-utils.ts
16829
16900
  var getSelectionFromModel = (schema, model) => {
@@ -16836,7 +16907,7 @@ var getSelectionFromModel = (schema, model) => {
16836
16907
 
16837
16908
  // src/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfCheckboxControl.tsx
16838
16909
  var import_components57 = require("@transferwise/components");
16839
- var import_jsx_runtime95 = require("react/jsx-runtime");
16910
+ var import_jsx_runtime96 = require("react/jsx-runtime");
16840
16911
  var PromotedOneOfCheckboxControl = (props) => {
16841
16912
  const { id, selection, setSelection } = props;
16842
16913
  const { promoted, other, checkedMeans } = props.promotion;
@@ -16847,14 +16918,14 @@ var PromotedOneOfCheckboxControl = (props) => {
16847
16918
  const toggleSelection = () => {
16848
16919
  setSelection(checked ? selectionWhenUnchecked : selectionWhenChecked);
16849
16920
  };
16850
- return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "form-group", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_components57.Checkbox, { id, label: title, checked, onChange: toggleSelection }) });
16921
+ return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "form-group", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_components57.Checkbox, { id, label: title, checked, onChange: toggleSelection }) });
16851
16922
  };
16852
16923
  PromotedOneOfCheckboxControl.defaultProps = {};
16853
16924
  var PromotedOneOfCheckboxControl_default = PromotedOneOfCheckboxControl;
16854
16925
 
16855
16926
  // src/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfRadioControl.tsx
16856
16927
  var import_components58 = require("@transferwise/components");
16857
- var import_jsx_runtime96 = require("react/jsx-runtime");
16928
+ var import_jsx_runtime97 = require("react/jsx-runtime");
16858
16929
  function PromotedOneOfRadioControl(props) {
16859
16930
  var _a, _b;
16860
16931
  const { id, selection, setSelection, promotion, promotedOneOf, title } = props;
@@ -16871,9 +16942,9 @@ function PromotedOneOfRadioControl(props) {
16871
16942
  secondary: promotion.other.description
16872
16943
  }, getAvatarPropertyForRadioOption(promotion.other))
16873
16944
  ];
16874
- return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "form-group", children: [
16875
- title && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("label", { className: "control-label", htmlFor: id, children: title }),
16876
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
16945
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "form-group", children: [
16946
+ title && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("label", { className: "control-label", htmlFor: id, children: title }),
16947
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
16877
16948
  import_components58.RadioGroup,
16878
16949
  {
16879
16950
  name: "promoted-selection",
@@ -16891,16 +16962,16 @@ PromotedOneOfRadioControl.defaultProps = {
16891
16962
  var PromotedOneOfRadioControl_default = PromotedOneOfRadioControl;
16892
16963
 
16893
16964
  // src/legacy/jsonSchemaForm/promotedOneOfSchema/promotedOneOfControl/PromotedOneOfControl.tsx
16894
- var import_jsx_runtime97 = require("react/jsx-runtime");
16965
+ var import_jsx_runtime98 = require("react/jsx-runtime");
16895
16966
  function PromotedOneOfControl(props) {
16896
16967
  const controlType = props.promotion.control || "radio";
16897
16968
  switch (controlType) {
16898
16969
  case "radio":
16899
- return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(PromotedOneOfRadioControl_default, __spreadValues({}, props));
16970
+ return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(PromotedOneOfRadioControl_default, __spreadValues({}, props));
16900
16971
  case "checkbox":
16901
- return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(PromotedOneOfCheckboxControl_default, __spreadValues({}, props));
16972
+ return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(PromotedOneOfCheckboxControl_default, __spreadValues({}, props));
16902
16973
  default:
16903
- return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_jsx_runtime97.Fragment, {});
16974
+ return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_jsx_runtime98.Fragment, {});
16904
16975
  }
16905
16976
  }
16906
16977
  PromotedOneOfControl.defaultProps = {
@@ -16910,20 +16981,20 @@ PromotedOneOfControl.defaultProps = {
16910
16981
  var PromotedOneOfControl_default = PromotedOneOfControl;
16911
16982
 
16912
16983
  // src/legacy/jsonSchemaForm/promotedOneOfSchema/PromotedOneOfSchema.tsx
16913
- var import_jsx_runtime98 = require("react/jsx-runtime");
16984
+ var import_jsx_runtime99 = require("react/jsx-runtime");
16914
16985
  var isPromoted = (schema) => schema.promoted === true;
16915
16986
  var PromotedOneOfSchema = (props) => {
16916
16987
  var _a;
16917
- const [selection, setSelection] = (0, import_react43.useState)(
16988
+ const [selection, setSelection] = (0, import_react44.useState)(
16918
16989
  getSelectionFromModel(props.schema, props.model) || ((_a = props.schema.promotion) == null ? void 0 : _a.default) || "promoted"
16919
16990
  );
16920
16991
  const promotedAlert = props.schema.alert;
16921
16992
  const promotedOneOf = props.schema.oneOf.find(isPromoted);
16922
16993
  const promotedObjectSchema = getPromotedObjectSchema(promotedOneOf);
16923
16994
  const otherOneOf = getOtherOneOf(props.schema);
16924
- return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(import_jsx_runtime98.Fragment, { children: [
16925
- promotedAlert && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(DynamicAlert_default, { component: promotedAlert }),
16926
- /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
16995
+ return /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(import_jsx_runtime99.Fragment, { children: [
16996
+ promotedAlert && /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(DynamicAlert_default, { component: promotedAlert }),
16997
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
16927
16998
  PromotedOneOfControl_default,
16928
16999
  {
16929
17000
  id: props.schema.$id,
@@ -16934,8 +17005,8 @@ var PromotedOneOfSchema = (props) => {
16934
17005
  setSelection
16935
17006
  }
16936
17007
  ),
16937
- selection === "promoted" && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(ObjectSchema_default, __spreadProps(__spreadValues({}, props), { schema: promotedObjectSchema })),
16938
- selection === "other" && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(GenericSchema_default, __spreadProps(__spreadValues({}, props), { schema: otherOneOf }))
17008
+ selection === "promoted" && /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(ObjectSchema_default, __spreadProps(__spreadValues({}, props), { schema: promotedObjectSchema })),
17009
+ selection === "other" && /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(GenericSchema_default, __spreadProps(__spreadValues({}, props), { schema: otherOneOf }))
16939
17010
  ] });
16940
17011
  };
16941
17012
  function getPromotedObjectSchema(promotedSchema) {
@@ -16984,12 +17055,12 @@ var ReadOnlySchema_messages_default = (0, import_react_intl33.defineMessages)({
16984
17055
  });
16985
17056
 
16986
17057
  // src/legacy/jsonSchemaForm/readOnlySchema/ReadOnlySchema.tsx
16987
- var import_jsx_runtime99 = require("react/jsx-runtime");
17058
+ var import_jsx_runtime100 = require("react/jsx-runtime");
16988
17059
  function ReadOnlySchema({ schema, model }) {
16989
17060
  const { title = "" } = schema;
16990
17061
  const { formatMessage } = (0, import_react_intl34.useIntl)();
16991
17062
  const value = getValueForSchema({ schema, model, formatMessage });
16992
- return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_components59.DefinitionList, { layout: import_components59.Layout.VERTICAL_ONE_COLUMN, definitions: [{ title, value, key: "" }] });
17063
+ return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_components59.DefinitionList, { layout: import_components59.Layout.VERTICAL_ONE_COLUMN, definitions: [{ title, value, key: "" }] });
16993
17064
  }
16994
17065
  var ReadOnlySchema_default = ReadOnlySchema;
16995
17066
  function getValueForSchema({
@@ -17022,7 +17093,7 @@ function getSelectedOneOf(schema, model) {
17022
17093
  function getValueFromOption(option) {
17023
17094
  const text = option.title && option.description ? `${option.title} - ${option.description}` : option.title || "";
17024
17095
  const icon = getAvatarPropertyForRadioOption({ icon: option.icon });
17025
- return (icon == null ? void 0 : icon.avatar) ? /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(import_jsx_runtime99.Fragment, { children: [
17096
+ return (icon == null ? void 0 : icon.avatar) ? /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(import_jsx_runtime100.Fragment, { children: [
17026
17097
  icon.avatar,
17027
17098
  " ",
17028
17099
  text
@@ -17030,22 +17101,22 @@ function getValueFromOption(option) {
17030
17101
  }
17031
17102
 
17032
17103
  // src/legacy/jsonSchemaForm/validationAsyncSchema/ValidationAsyncSchema.tsx
17033
- var import_react44 = require("react");
17034
- var import_jsx_runtime100 = require("react/jsx-runtime");
17104
+ var import_react45 = require("react");
17105
+ var import_jsx_runtime101 = require("react/jsx-runtime");
17035
17106
  function ValidationAsyncSchema(props) {
17036
17107
  const { schema, model, required, submitted, errors, onChange } = props;
17037
- const [validationAsyncModel, setValidationAsyncModel] = (0, import_react44.useState)(model);
17038
- const previousRequestedModelReference = (0, import_react44.useRef)(null);
17039
- const [validationAsyncSuccessMessage, setValidationAsyncSuccessMessage] = (0, import_react44.useState)(
17108
+ const [validationAsyncModel, setValidationAsyncModel] = (0, import_react45.useState)(model);
17109
+ const previousRequestedModelReference = (0, import_react45.useRef)(null);
17110
+ const [validationAsyncSuccessMessage, setValidationAsyncSuccessMessage] = (0, import_react45.useState)(
17040
17111
  null
17041
17112
  );
17042
- const [validationAsyncErrors, setValidationAsyncErrors] = (0, import_react44.useState)(null);
17043
- const [fieldSubmitted, setFieldSubmitted] = (0, import_react44.useState)(false);
17044
- const [abortController, setAbortController] = (0, import_react44.useState)(null);
17113
+ const [validationAsyncErrors, setValidationAsyncErrors] = (0, import_react45.useState)(null);
17114
+ const [fieldSubmitted, setFieldSubmitted] = (0, import_react45.useState)(false);
17115
+ const [abortController, setAbortController] = (0, import_react45.useState)(null);
17045
17116
  const httpClient = useHttpClient();
17046
17117
  const onEvent = useEventDispatcher();
17047
17118
  const log = useLogger();
17048
- (0, import_react44.useEffect)(() => {
17119
+ (0, import_react45.useEffect)(() => {
17049
17120
  if (!schema.validationAsync.method) {
17050
17121
  log.warning(
17051
17122
  "Invalid schema or model",
@@ -17115,20 +17186,20 @@ function ValidationAsyncSchema(props) {
17115
17186
  required,
17116
17187
  schema
17117
17188
  };
17118
- return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(BasicTypeSchema_default, __spreadValues({}, basicTypeSchemaProps));
17189
+ return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(BasicTypeSchema_default, __spreadValues({}, basicTypeSchemaProps));
17119
17190
  }
17120
17191
  ValidationAsyncSchema.defaultProps = { required: false };
17121
17192
  var ValidationAsyncSchema_default = ValidationAsyncSchema;
17122
17193
 
17123
17194
  // src/legacy/jsonSchemaForm/genericSchema/GenericSchema.tsx
17124
- var import_jsx_runtime101 = require("react/jsx-runtime");
17125
- var import_react46 = require("react");
17195
+ var import_jsx_runtime102 = require("react/jsx-runtime");
17196
+ var import_react47 = require("react");
17126
17197
  function GenericSchemaForm(props) {
17127
17198
  const { schema, model = null, errors = null, hideTitle = false, disabled = false } = props;
17128
17199
  const schemaProps = __spreadProps(__spreadValues({}, props), { model, errors, hideTitle, disabled });
17129
17200
  const type = getSchemaType(schema);
17130
17201
  const log = useLogger();
17131
- (0, import_react45.useEffect)(() => {
17202
+ (0, import_react46.useEffect)(() => {
17132
17203
  if (!isValidGenericSchema(schema, model, errors)) {
17133
17204
  log.error(
17134
17205
  "Invalid schema or model",
@@ -17138,29 +17209,29 @@ function GenericSchemaForm(props) {
17138
17209
  }, [JSON.stringify(schema), JSON.stringify(model), JSON.stringify(errors), type, log]);
17139
17210
  switch (type) {
17140
17211
  case "readOnly":
17141
- return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(ReadOnlySchema_default, __spreadValues({}, schemaProps));
17212
+ return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(ReadOnlySchema_default, __spreadValues({}, schemaProps));
17142
17213
  case "persistAsync":
17143
- return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(PersistAsyncSchema_default, __spreadValues({}, schemaProps));
17214
+ return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(PersistAsyncSchema_default, __spreadValues({}, schemaProps));
17144
17215
  case "validationAsync":
17145
- return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(ValidationAsyncSchema_default, __spreadValues({}, schemaProps));
17216
+ return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(ValidationAsyncSchema_default, __spreadValues({}, schemaProps));
17146
17217
  case "basic": {
17147
17218
  const basicTypeProps = __spreadValues({
17148
17219
  infoMessage: null
17149
17220
  }, schemaProps);
17150
- return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(BasicTypeSchema_default, __spreadValues({}, basicTypeProps));
17221
+ return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(BasicTypeSchema_default, __spreadValues({}, basicTypeProps));
17151
17222
  }
17152
17223
  case "object":
17153
- return /* @__PURE__ */ (0, import_react46.createElement)(ObjectSchema_default, __spreadProps(__spreadValues({}, schemaProps), { key: JSON.stringify(schema) }));
17224
+ return /* @__PURE__ */ (0, import_react47.createElement)(ObjectSchema_default, __spreadProps(__spreadValues({}, schemaProps), { key: JSON.stringify(schema) }));
17154
17225
  case "array":
17155
- return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(ArraySchema_default, __spreadValues({}, schemaProps));
17226
+ return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(ArraySchema_default, __spreadValues({}, schemaProps));
17156
17227
  case "promotedOneOf":
17157
- return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(PromotedOneOfSchema_default, __spreadValues({}, schemaProps));
17228
+ return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(PromotedOneOfSchema_default, __spreadValues({}, schemaProps));
17158
17229
  case "oneOf":
17159
- return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(OneOfSchema_default, __spreadValues({}, schemaProps));
17230
+ return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(OneOfSchema_default, __spreadValues({}, schemaProps));
17160
17231
  case "allOf":
17161
- return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(AllOfSchema_default, __spreadValues({}, schemaProps));
17232
+ return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(AllOfSchema_default, __spreadValues({}, schemaProps));
17162
17233
  }
17163
- return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_jsx_runtime101.Fragment, {});
17234
+ return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_jsx_runtime102.Fragment, {});
17164
17235
  }
17165
17236
  var GenericSchema_default = GenericSchemaForm;
17166
17237
  var isValidGenericSchema = (schema, model, errors) => {
@@ -17187,7 +17258,7 @@ var isValidGenericSchema = (schema, model, errors) => {
17187
17258
  };
17188
17259
 
17189
17260
  // src/legacy/layout/form/DynamicForm.tsx
17190
- var import_jsx_runtime102 = require("react/jsx-runtime");
17261
+ var import_jsx_runtime103 = require("react/jsx-runtime");
17191
17262
  function DynamicForm({
17192
17263
  component,
17193
17264
  model = null,
@@ -17197,7 +17268,7 @@ function DynamicForm({
17197
17268
  onPersistAsync
17198
17269
  }) {
17199
17270
  const formSchema = component.schema;
17200
- return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { className: getMargin2(component.margin || "md"), children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
17271
+ return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { className: getMargin2(component.margin || "md"), children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
17201
17272
  GenericSchema_default,
17202
17273
  {
17203
17274
  schema: formSchema,
@@ -17216,62 +17287,62 @@ var DynamicForm_default = DynamicForm;
17216
17287
  // src/legacy/layout/heading/DynamicHeading.tsx
17217
17288
  var import_components60 = require("@transferwise/components");
17218
17289
  var import_classnames13 = __toESM(require_classnames());
17219
- var import_jsx_runtime103 = require("react/jsx-runtime");
17290
+ var import_jsx_runtime104 = require("react/jsx-runtime");
17220
17291
  var DynamicHeading = (props) => {
17221
17292
  const { text, size = "md", align = "left", margin = "md", control } = props.component;
17222
17293
  const classes = (0, import_classnames13.default)(getTextAlignmentAndMargin2({ align, margin }));
17223
- return control === "display" ? /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(DisplayHeading2, { size, text, classes }) : /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(StandardHeading2, { size, text, classes });
17294
+ return control === "display" ? /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(DisplayHeading2, { size, text, classes }) : /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(StandardHeading2, { size, text, classes });
17224
17295
  };
17225
17296
  var StandardHeading2 = ({ size, text, classes }) => {
17226
17297
  switch (size) {
17227
17298
  case "xs":
17228
- return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("h5", { className: classes, children: text });
17299
+ return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("h5", { className: classes, children: text });
17229
17300
  case "sm":
17230
- return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("h4", { className: classes, children: text });
17301
+ return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("h4", { className: classes, children: text });
17231
17302
  case "lg":
17232
- return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("h2", { className: classes, children: text });
17303
+ return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("h2", { className: classes, children: text });
17233
17304
  case "xl":
17234
- return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("h1", { className: classes, children: text });
17305
+ return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("h1", { className: classes, children: text });
17235
17306
  case "md":
17236
17307
  default:
17237
- return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("h3", { className: classes, children: text });
17308
+ return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("h3", { className: classes, children: text });
17238
17309
  }
17239
17310
  };
17240
17311
  var DisplayHeading2 = ({ size, text, classes }) => {
17241
17312
  switch (size) {
17242
17313
  case "xs":
17243
17314
  case "sm":
17244
- return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_components60.Display, { type: "display-small", className: classes, children: text });
17315
+ return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_components60.Display, { type: "display-small", className: classes, children: text });
17245
17316
  case "xl":
17246
17317
  case "lg":
17247
- return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_components60.Display, { type: "display-large", className: classes, children: text });
17318
+ return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_components60.Display, { type: "display-large", className: classes, children: text });
17248
17319
  case "md":
17249
17320
  default:
17250
- return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_components60.Display, { type: "display-medium", className: classes, children: text });
17321
+ return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_components60.Display, { type: "display-medium", className: classes, children: text });
17251
17322
  }
17252
17323
  };
17253
17324
  var DynamicHeading_default = DynamicHeading;
17254
17325
 
17255
17326
  // src/legacy/layout/markdown/DynamicMarkdown.tsx
17256
17327
  var import_components61 = require("@transferwise/components");
17257
- var import_jsx_runtime104 = require("react/jsx-runtime");
17328
+ var import_jsx_runtime105 = require("react/jsx-runtime");
17258
17329
  var DynamicMarkdown = ({ component }) => {
17259
17330
  const { content, align, margin } = component;
17260
- return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: getTextAlignmentAndMargin2({ align, margin }), children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_components61.Markdown, { config: { link: { target: "_blank" } }, children: content }) });
17331
+ return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: getTextAlignmentAndMargin2({ align, margin }), children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_components61.Markdown, { config: { link: { target: "_blank" } }, children: content }) });
17261
17332
  };
17262
17333
  var DynamicInfo = ({ component }) => {
17263
- return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: getTextAlignmentAndMargin2(component), children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_components61.Markdown, { config: { link: { target: "_blank" } }, children: component.markdown }) });
17334
+ return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: getTextAlignmentAndMargin2(component), children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_components61.Markdown, { config: { link: { target: "_blank" } }, children: component.markdown }) });
17264
17335
  };
17265
17336
 
17266
17337
  // src/legacy/layout/image/DynamicImage.tsx
17267
17338
  var import_components62 = require("@transferwise/components");
17268
- var import_react47 = require("react");
17269
- var import_jsx_runtime105 = require("react/jsx-runtime");
17339
+ var import_react48 = require("react");
17340
+ var import_jsx_runtime106 = require("react/jsx-runtime");
17270
17341
  function DynamicImage({ component: image }) {
17271
17342
  const { url, size, text, margin, accessibilityDescription } = image;
17272
17343
  const httpClient = useHttpClient();
17273
- const [imageSource, setImageSource] = (0, import_react47.useState)("");
17274
- (0, import_react47.useEffect)(() => {
17344
+ const [imageSource, setImageSource] = (0, import_react48.useState)("");
17345
+ (0, import_react48.useEffect)(() => {
17275
17346
  void getImageSource2(httpClient, url).then(setImageSource);
17276
17347
  }, [url, httpClient]);
17277
17348
  const imageProps = {
@@ -17283,7 +17354,7 @@ function DynamicImage({ component: image }) {
17283
17354
  if (!imageSource) {
17284
17355
  return null;
17285
17356
  }
17286
- return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: `df-image ${size || "md"}`, children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_components62.Image, __spreadValues({ className: `img-responsive ${getMargin2(margin || "md")}` }, imageProps)) });
17357
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: `df-image ${size || "md"}`, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_components62.Image, __spreadValues({ className: `img-responsive ${getMargin2(margin || "md")}` }, imageProps)) });
17287
17358
  }
17288
17359
  var readImageBlobAsDataURL2 = (imageBlob) => (
17289
17360
  // we can safely assume the type of reader.result is string
@@ -17320,47 +17391,47 @@ var DynamicImage_default = DynamicImage;
17320
17391
 
17321
17392
  // src/legacy/layout/instructions/DynamicInstructions.tsx
17322
17393
  var import_components63 = require("@transferwise/components");
17323
- var import_jsx_runtime106 = require("react/jsx-runtime");
17394
+ var import_jsx_runtime107 = require("react/jsx-runtime");
17324
17395
  var doContext2 = ["positive", "neutral"];
17325
17396
  var dontContext2 = ["warning", "negative"];
17326
17397
  var DynamicInstructions = ({ component }) => {
17327
17398
  const { items } = component;
17328
17399
  const dos = items.filter((item) => doContext2.includes(item.context)).map(({ text }) => text);
17329
17400
  const donts = items.filter((item) => dontContext2.includes(item.context)).map(({ text }) => text);
17330
- return /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { className: getMargin2(component.margin || "md"), children: [
17331
- component.title ? /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_components63.Header, { title: component.title }) : null,
17332
- /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_components63.InstructionsList, { dos, donts })
17401
+ return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)("div", { className: getMargin2(component.margin || "md"), children: [
17402
+ component.title ? /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_components63.Header, { title: component.title }) : null,
17403
+ /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_components63.InstructionsList, { dos, donts })
17333
17404
  ] });
17334
17405
  };
17335
17406
  var DynamicInstructions_default = DynamicInstructions;
17336
17407
 
17337
17408
  // src/legacy/layout/DynamicLayout.tsx
17338
- var import_jsx_runtime107 = require("react/jsx-runtime");
17409
+ var import_jsx_runtime108 = require("react/jsx-runtime");
17339
17410
  var getKey = (component) => JSON.stringify(component);
17340
17411
  function DynamicLayout(props) {
17341
17412
  const { components, model, submitted, errors, onModelChange, onAction, onPersistAsync, baseUrl } = props;
17342
17413
  const renderComponent = (component) => {
17343
17414
  switch (component.type) {
17344
17415
  case "heading":
17345
- return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(DynamicHeading_default, { component }, getKey(component));
17416
+ return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(DynamicHeading_default, { component }, getKey(component));
17346
17417
  case "paragraph":
17347
- return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(DynamicParagraph_default, { component }, getKey(component));
17418
+ return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(DynamicParagraph_default, { component }, getKey(component));
17348
17419
  case "image":
17349
- return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(DynamicImage_default, { component }, getKey(component));
17420
+ return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(DynamicImage_default, { component }, getKey(component));
17350
17421
  case "alert":
17351
- return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(DynamicAlert_default, { component }, getKey(component));
17422
+ return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(DynamicAlert_default, { component }, getKey(component));
17352
17423
  case "review":
17353
- return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(DynamicReview_default, { component, onAction }, getKey(component));
17424
+ return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(DynamicReview_default, { component, onAction }, getKey(component));
17354
17425
  case "divider":
17355
- return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(DynamicDivider_default, { component }, getKey(component));
17426
+ return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(DynamicDivider_default, { component }, getKey(component));
17356
17427
  case "info":
17357
- return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(DynamicInfo, { component }, getKey(component));
17428
+ return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(DynamicInfo, { component }, getKey(component));
17358
17429
  case "instructions":
17359
- return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(DynamicInstructions_default, { component }, getKey(component));
17430
+ return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(DynamicInstructions_default, { component }, getKey(component));
17360
17431
  case "markdown":
17361
- return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(DynamicMarkdown, { component }, getKey(component));
17432
+ return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(DynamicMarkdown, { component }, getKey(component));
17362
17433
  case "columns":
17363
- return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
17434
+ return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
17364
17435
  DynamicColumns_default,
17365
17436
  {
17366
17437
  component,
@@ -17374,7 +17445,7 @@ function DynamicLayout(props) {
17374
17445
  getKey(component)
17375
17446
  );
17376
17447
  case "form":
17377
- return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
17448
+ return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
17378
17449
  DynamicForm_default,
17379
17450
  {
17380
17451
  component,
@@ -17387,9 +17458,9 @@ function DynamicLayout(props) {
17387
17458
  getKey(__spreadProps(__spreadValues({}, component), { errors: errors != null ? errors : null }))
17388
17459
  );
17389
17460
  case "button":
17390
- return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(DynamicButton_default, { component, onAction }, getKey(component));
17461
+ return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(DynamicButton_default, { component, onAction }, getKey(component));
17391
17462
  case "box":
17392
- return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
17463
+ return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
17393
17464
  DynamicBox_default,
17394
17465
  {
17395
17466
  component,
@@ -17403,18 +17474,18 @@ function DynamicLayout(props) {
17403
17474
  getKey(component)
17404
17475
  );
17405
17476
  case "decision":
17406
- return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(DynamicDecision_default, { component, onAction }, getKey(component));
17477
+ return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(DynamicDecision_default, { component, onAction }, getKey(component));
17407
17478
  case "external":
17408
- return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(DynamicExternal_default, { component, onAction }, getKey(component));
17479
+ return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(DynamicExternal_default, { component, onAction }, getKey(component));
17409
17480
  case "list":
17410
17481
  case "status-list":
17411
- return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(DynamicStatusList_default, { component, onAction }, getKey(component));
17482
+ return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(DynamicStatusList_default, { component, onAction }, getKey(component));
17412
17483
  case "loading-indicator":
17413
- return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(DynamicLoadingIndicator_default, { component }, getKey(component));
17484
+ return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(DynamicLoadingIndicator_default, { component }, getKey(component));
17414
17485
  case "search":
17415
- return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(DynamicSearch_default, { component, onAction }, getKey(component));
17486
+ return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(DynamicSearch_default, { component, onAction }, getKey(component));
17416
17487
  case "modal":
17417
- return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
17488
+ return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
17418
17489
  DynamicModal_default,
17419
17490
  {
17420
17491
  component,
@@ -17428,22 +17499,22 @@ function DynamicLayout(props) {
17428
17499
  getKey(component)
17429
17500
  );
17430
17501
  default:
17431
- return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("div", {}, getKey(component));
17502
+ return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("div", {}, getKey(component));
17432
17503
  }
17433
17504
  };
17434
17505
  if (useHasHttpClientProvider() || baseUrl == null) {
17435
- return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_jsx_runtime107.Fragment, { children: components.map(renderComponent) });
17506
+ return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(import_jsx_runtime108.Fragment, { children: components.map(renderComponent) });
17436
17507
  }
17437
- return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(HttpClientProviderFromBaseUrl, { baseUrl, children: components.map(renderComponent) });
17508
+ return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(HttpClientProviderFromBaseUrl, { baseUrl, children: components.map(renderComponent) });
17438
17509
  }
17439
17510
  var DynamicLayout_default = DynamicLayout;
17440
17511
 
17441
17512
  // src/legacy/layout/list/DynamicStatusList.tsx
17442
17513
  var import_components64 = require("@transferwise/components");
17443
- var import_jsx_runtime108 = require("react/jsx-runtime");
17514
+ var import_jsx_runtime109 = require("react/jsx-runtime");
17444
17515
  var DynamicStatusList = ({ component }) => {
17445
- return /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("div", { className: getMargin2(component.margin || "md"), children: [
17446
- component.title ? /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(import_components64.Header, { title: component.title }) : null,
17516
+ return /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("div", { className: getMargin2(component.margin || "md"), children: [
17517
+ component.title ? /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_components64.Header, { title: component.title }) : null,
17447
17518
  component.items.map(mapListItemToSummary)
17448
17519
  ] });
17449
17520
  };
@@ -17452,8 +17523,8 @@ var mapListItemToSummary = ({ title, description, icon, status }) => {
17452
17523
  key: `${title}/${description || ""}`,
17453
17524
  title,
17454
17525
  description
17455
- }, (icon == null ? void 0 : icon.name) ? { icon: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(DynamicIcon_default2, { type: icon.name }) } : {}), status ? { status: statusMap[status] } : {});
17456
- return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(import_components64.Summary, __spreadValues({}, props));
17526
+ }, (icon == null ? void 0 : icon.name) ? { icon: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(DynamicIcon_default2, { type: icon.name }) } : {}), status ? { status: statusMap[status] } : {});
17527
+ return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_components64.Summary, __spreadValues({}, props));
17457
17528
  };
17458
17529
  var statusListMap = {
17459
17530
  done: "done",
@@ -17470,10 +17541,10 @@ var DynamicStatusList_default = DynamicStatusList;
17470
17541
 
17471
17542
  // src/legacy/layout/loadingIndicator/DynamicLoadingIndicator.tsx
17472
17543
  var import_components65 = require("@transferwise/components");
17473
- var import_jsx_runtime109 = require("react/jsx-runtime");
17544
+ var import_jsx_runtime110 = require("react/jsx-runtime");
17474
17545
  var DynamicLoadingIndicator = ({ component }) => {
17475
17546
  const { margin = "md", size = "md" } = component;
17476
- return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
17547
+ return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
17477
17548
  import_components65.Loader,
17478
17549
  {
17479
17550
  size,
@@ -17507,21 +17578,21 @@ var paragraph_messages_default2 = (0, import_react_intl35.defineMessages)({
17507
17578
 
17508
17579
  // src/legacy/layout/paragraph/useSnackBarIfAvailable.ts
17509
17580
  var import_components66 = require("@transferwise/components");
17510
- var import_react48 = require("react");
17581
+ var import_react49 = require("react");
17511
17582
  function useSnackBarIfAvailable2() {
17512
- const context = (0, import_react48.useContext)(import_components66.SnackbarContext);
17583
+ const context = (0, import_react49.useContext)(import_components66.SnackbarContext);
17513
17584
  return context ? context.createSnackbar : noop3;
17514
17585
  }
17515
17586
  function noop3() {
17516
17587
  }
17517
17588
 
17518
17589
  // src/legacy/layout/paragraph/DynamicParagraph.tsx
17519
- var import_jsx_runtime110 = require("react/jsx-runtime");
17590
+ var import_jsx_runtime111 = require("react/jsx-runtime");
17520
17591
  function DynamicParagraph({ component }) {
17521
- return component.control === "copyable" ? /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(CopyableDynamicParagraph, { component }) : /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(BasicDynamicParagraph, { component });
17592
+ return component.control === "copyable" ? /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(CopyableDynamicParagraph, { component }) : /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(BasicDynamicParagraph, { component });
17522
17593
  }
17523
17594
  function BasicDynamicParagraph({ component }) {
17524
- return /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("p", { className: getTextAlignmentAndMargin2(component), children: [
17595
+ return /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)("p", { className: getTextAlignmentAndMargin2(component), children: [
17525
17596
  " ",
17526
17597
  component.text,
17527
17598
  " "
@@ -17539,8 +17610,8 @@ function CopyableDynamicParagraph({ component }) {
17539
17610
  align: component.align,
17540
17611
  margin: "sm"
17541
17612
  })} form-control`;
17542
- return /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("div", { className: getTextAlignmentAndMargin2(component), children: [
17543
- /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
17613
+ return /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)("div", { className: getTextAlignmentAndMargin2(component), children: [
17614
+ /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
17544
17615
  "input",
17545
17616
  {
17546
17617
  type: "text",
@@ -17550,7 +17621,7 @@ function CopyableDynamicParagraph({ component }) {
17550
17621
  style: { textOverflow: "ellipsis" }
17551
17622
  }
17552
17623
  ),
17553
- /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_components67.Button, { block: true, onClick: copy, children: formatMessage(paragraph_messages_default2.copy) })
17624
+ /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_components67.Button, { block: true, onClick: copy, children: formatMessage(paragraph_messages_default2.copy) })
17554
17625
  ] });
17555
17626
  }
17556
17627
  function noop4() {
@@ -17559,7 +17630,7 @@ var DynamicParagraph_default = DynamicParagraph;
17559
17630
 
17560
17631
  // src/legacy/layout/review/DynamicReview.tsx
17561
17632
  var import_components68 = require("@transferwise/components");
17562
- var import_jsx_runtime111 = require("react/jsx-runtime");
17633
+ var import_jsx_runtime112 = require("react/jsx-runtime");
17563
17634
  var getDefinitions = (orientation, review) => review.fields.map(({ label, value, help }, index) => ({
17564
17635
  key: String(index),
17565
17636
  title: label,
@@ -17567,14 +17638,14 @@ var getDefinitions = (orientation, review) => review.fields.map(({ label, value,
17567
17638
  }));
17568
17639
  var getFieldValue2 = (value, help, orientation) => {
17569
17640
  if (help) {
17570
- return orientation === "HORIZONTAL_RIGHT_ALIGNED" ? /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(import_jsx_runtime111.Fragment, { children: [
17571
- /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Help_default2, { help }),
17641
+ return orientation === "HORIZONTAL_RIGHT_ALIGNED" ? /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(import_jsx_runtime112.Fragment, { children: [
17642
+ /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(Help_default2, { help }),
17572
17643
  " ",
17573
17644
  value
17574
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(import_jsx_runtime111.Fragment, { children: [
17645
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(import_jsx_runtime112.Fragment, { children: [
17575
17646
  value,
17576
17647
  " ",
17577
- /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Help_default2, { help })
17648
+ /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(Help_default2, { help })
17578
17649
  ] });
17579
17650
  }
17580
17651
  return value;
@@ -17611,24 +17682,24 @@ function DynamicReview(props) {
17611
17682
  const orientation = getDefinitionListLayout(review);
17612
17683
  const callToAction = review.callToAction ? getReviewAction2(review.callToAction.title, review.callToAction.action) : null;
17613
17684
  const legacyCallToAction = !callToAction && review.action ? getReviewAction2(review.action.title || "", review.action) : null;
17614
- return /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)("div", { className: margin, children: [
17615
- review.title && /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_components68.Header, { title: review.title, action: callToAction || legacyCallToAction || void 0 }),
17616
- /* @__PURE__ */ (0, import_jsx_runtime111.jsx)("div", { className: margin, children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_components68.DefinitionList, { layout: orientation, definitions: getDefinitions(orientation, review) }) })
17685
+ return /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)("div", { className: margin, children: [
17686
+ review.title && /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_components68.Header, { title: review.title, action: callToAction || legacyCallToAction || void 0 }),
17687
+ /* @__PURE__ */ (0, import_jsx_runtime112.jsx)("div", { className: margin, children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_components68.DefinitionList, { layout: orientation, definitions: getDefinitions(orientation, review) }) })
17617
17688
  ] });
17618
17689
  }
17619
17690
  var DynamicReview_default = DynamicReview;
17620
17691
 
17621
17692
  // src/legacy/layout/search/DynamicSearch.tsx
17622
- var import_react50 = require("react");
17693
+ var import_react51 = require("react");
17623
17694
  var import_icons5 = require("@transferwise/icons");
17624
17695
 
17625
17696
  // src/legacy/layout/search/SearchInput.tsx
17626
17697
  var import_components69 = require("@transferwise/components");
17627
- var import_jsx_runtime112 = require("react/jsx-runtime");
17698
+ var import_jsx_runtime113 = require("react/jsx-runtime");
17628
17699
  var SearchInput = ({ title, value, onFocus, onChange }) => {
17629
- return /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)("label", { className: "control-label d-inline", children: [
17700
+ return /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)("label", { className: "control-label d-inline", children: [
17630
17701
  title,
17631
- /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
17702
+ /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
17632
17703
  import_components69.Input,
17633
17704
  {
17634
17705
  type: "text",
@@ -17644,12 +17715,12 @@ var SearchInput = ({ title, value, onFocus, onChange }) => {
17644
17715
  // src/legacy/layout/search/SearchResults.tsx
17645
17716
  var import_components70 = require("@transferwise/components");
17646
17717
  var import_react_intl37 = require("react-intl");
17647
- var import_jsx_runtime113 = require("react/jsx-runtime");
17718
+ var import_jsx_runtime114 = require("react/jsx-runtime");
17648
17719
  function SearchResults2({ results, emptyMessage, onSelect }) {
17649
17720
  if (results.length === 0) {
17650
- return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("p", { className: "m-t-2", children: emptyMessage });
17721
+ return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("p", { className: "m-t-2", children: emptyMessage });
17651
17722
  }
17652
- return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(import_components70.NavigationOptionsList, { children: results.map((result) => /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
17723
+ return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_components70.NavigationOptionsList, { children: results.map((result) => /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
17653
17724
  import_components70.NavigationOption,
17654
17725
  {
17655
17726
  title: result.title,
@@ -17664,10 +17735,10 @@ function SearchResults2({ results, emptyMessage, onSelect }) {
17664
17735
  }
17665
17736
  function ErrorResult2({ onRetrySearch }) {
17666
17737
  const intl = (0, import_react_intl37.useIntl)();
17667
- return /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)("p", { className: "m-t-2", children: [
17738
+ return /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)("p", { className: "m-t-2", children: [
17668
17739
  intl.formatMessage(generic_error_messages_default.genericError),
17669
17740
  "\xA0",
17670
- /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
17741
+ /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
17671
17742
  "a",
17672
17743
  {
17673
17744
  href: "/",
@@ -17682,15 +17753,15 @@ function ErrorResult2({ onRetrySearch }) {
17682
17753
  }
17683
17754
 
17684
17755
  // src/legacy/layout/search/useSearch.tsx
17685
- var import_react49 = require("react");
17756
+ var import_react50 = require("react");
17686
17757
  var headers = { "Content-Type": "application/json" };
17687
17758
  var useSearch = (defaultSearchConfig) => {
17688
- const [state, setState] = (0, import_react49.useState)({
17759
+ const [state, setState] = (0, import_react50.useState)({
17689
17760
  status: "idle"
17690
17761
  });
17691
- const abortControllerRef = (0, import_react49.useRef)(null);
17762
+ const abortControllerRef = (0, import_react50.useRef)(null);
17692
17763
  const httpClient = useHttpClient();
17693
- const search = (0, import_react49.useCallback)(
17764
+ const search = (0, import_react50.useCallback)(
17694
17765
  async (query, { url, method, param } = defaultSearchConfig) => {
17695
17766
  var _a;
17696
17767
  (_a = abortControllerRef.current) == null ? void 0 : _a.abort();
@@ -17753,14 +17824,14 @@ var addQueryParameter2 = (url, key, value) => {
17753
17824
  // src/legacy/layout/search/DynamicSearch.tsx
17754
17825
  var import_components71 = require("@transferwise/components");
17755
17826
  var import_classnames14 = __toESM(require_classnames());
17756
- var import_jsx_runtime114 = require("react/jsx-runtime");
17827
+ var import_jsx_runtime115 = require("react/jsx-runtime");
17757
17828
  var DEBOUNCE_TIME2 = 400;
17758
17829
  function DynamicSearch({ component, onAction }) {
17759
- const [query, setQuery] = (0, import_react50.useState)("");
17830
+ const [query, setQuery] = (0, import_react51.useState)("");
17760
17831
  const { control, title, margin, url, method, param, emptyMessage } = component;
17761
17832
  const { status, results, search } = useSearch({ url, method, param });
17762
17833
  const onEvent = useEventDispatcher();
17763
- const debouncedSearch = (0, import_react50.useMemo)(() => debounce2(search, DEBOUNCE_TIME2), [search]);
17834
+ const debouncedSearch = (0, import_react51.useMemo)(() => debounce2(search, DEBOUNCE_TIME2), [search]);
17764
17835
  const onSearchStart = () => {
17765
17836
  onEvent("Dynamic Flow - Search Started", {});
17766
17837
  };
@@ -17789,16 +17860,16 @@ function DynamicSearch({ component, onAction }) {
17789
17860
  void search(query);
17790
17861
  };
17791
17862
  if (control === "inline") {
17792
- return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("div", { className: (0, import_classnames14.default)(getMargin2(margin != null ? margin : "md"), "df-search-typeahead"), children: /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)("label", { className: "control-label d-inline", children: [
17863
+ return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("div", { className: (0, import_classnames14.default)(getMargin2(margin != null ? margin : "md"), "df-search-typeahead"), children: /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)("label", { className: "control-label d-inline", children: [
17793
17864
  title,
17794
- /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("div", { className: "m-t-1", children: /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
17865
+ /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("div", { className: "m-t-1", children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
17795
17866
  import_components71.Typeahead,
17796
17867
  {
17797
17868
  id: "typeahead-input-id",
17798
17869
  name: "typeahead-input-name",
17799
17870
  size: "md",
17800
17871
  maxHeight: 100,
17801
- footer: /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
17872
+ footer: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
17802
17873
  TypeaheadFooter2,
17803
17874
  {
17804
17875
  state: status,
@@ -17809,7 +17880,7 @@ function DynamicSearch({ component, onAction }) {
17809
17880
  ),
17810
17881
  multiple: false,
17811
17882
  clearable: false,
17812
- addon: /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_icons5.Search, { size: 24 }),
17883
+ addon: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_icons5.Search, { size: 24 }),
17813
17884
  options: results.map(mapResultToTypeaheadOption2),
17814
17885
  onChange: (values) => {
17815
17886
  if (values.length > 0) {
@@ -17824,11 +17895,11 @@ function DynamicSearch({ component, onAction }) {
17824
17895
  ) })
17825
17896
  ] }) });
17826
17897
  }
17827
- return /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)("div", { className: getMargin2(margin != null ? margin : "md"), children: [
17828
- /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(SearchInput, { title, value: query, onChange, onFocus: onSearchStart }),
17829
- status === "loading" && /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(DynamicLoadingIndicator_default, { component: { type: "loading-indicator", size: "sm" } }),
17830
- status === "error" && /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(ErrorResult2, { onRetrySearch }),
17831
- status === "success" && /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(SearchResults2, { results, emptyMessage, onSelect: onResultSelected })
17898
+ return /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)("div", { className: getMargin2(margin != null ? margin : "md"), children: [
17899
+ /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(SearchInput, { title, value: query, onChange, onFocus: onSearchStart }),
17900
+ status === "loading" && /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(DynamicLoadingIndicator_default, { component: { type: "loading-indicator", size: "sm" } }),
17901
+ status === "error" && /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(ErrorResult2, { onRetrySearch }),
17902
+ status === "success" && /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(SearchResults2, { results, emptyMessage, onSelect: onResultSelected })
17832
17903
  ] });
17833
17904
  }
17834
17905
  function mapResultToTypeaheadOption2(result) {
@@ -17847,13 +17918,13 @@ function TypeaheadFooter2({
17847
17918
  emptyMessage
17848
17919
  }) {
17849
17920
  if (state === "success" && results.length === 0) {
17850
- return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_components71.Markdown, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: emptyMessage });
17921
+ return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_components71.Markdown, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: emptyMessage });
17851
17922
  }
17852
17923
  if (state === "error" && results.length === 0) {
17853
- return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(ErrorResult2, { onRetrySearch }) });
17924
+ return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(ErrorResult2, { onRetrySearch }) });
17854
17925
  }
17855
17926
  if (state === "loading" || results.length === 0) {
17856
- return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("p", { className: "m-t-2 m-x-2", children: "Loading..." });
17927
+ return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("p", { className: "m-t-2 m-x-2", children: "Loading..." });
17857
17928
  }
17858
17929
  return null;
17859
17930
  }
@@ -17861,21 +17932,21 @@ var DynamicSearch_default = DynamicSearch;
17861
17932
 
17862
17933
  // src/legacy/layout/modal/DynamicModal.tsx
17863
17934
  var import_components72 = require("@transferwise/components");
17864
- var import_react51 = require("react");
17865
- var import_jsx_runtime115 = require("react/jsx-runtime");
17935
+ var import_react52 = require("react");
17936
+ var import_jsx_runtime116 = require("react/jsx-runtime");
17866
17937
  function DynamicModal(props) {
17867
- const [visible, isVisible] = (0, import_react51.useState)(false);
17938
+ const [visible, isVisible] = (0, import_react52.useState)(false);
17868
17939
  const { component, onAction } = props;
17869
17940
  const { margin = "md" } = component;
17870
- return /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)("div", { className: getTextAlignmentAndMargin2({ margin }), children: [
17871
- /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(import_components72.Button, { priority: "tertiary", block: true, onClick: () => isVisible(true), children: component.trigger.title }),
17872
- /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
17941
+ return /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)("div", { className: getTextAlignmentAndMargin2({ margin }), children: [
17942
+ /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_components72.Button, { priority: "tertiary", block: true, onClick: () => isVisible(true), children: component.trigger.title }),
17943
+ /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
17873
17944
  import_components72.Modal,
17874
17945
  {
17875
17946
  scroll: "content",
17876
17947
  open: visible,
17877
17948
  size: "lg",
17878
- body: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
17949
+ body: /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
17879
17950
  DynamicLayout_default,
17880
17951
  __spreadProps(__spreadValues({}, props), {
17881
17952
  components: component.content.components,
@@ -17893,7 +17964,7 @@ function DynamicModal(props) {
17893
17964
  var DynamicModal_default = DynamicModal;
17894
17965
 
17895
17966
  // src/legacy/jsonSchemaForm/basicTypeSchema/BasicTypeSchema.tsx
17896
- var import_jsx_runtime116 = require("react/jsx-runtime");
17967
+ var import_jsx_runtime117 = require("react/jsx-runtime");
17897
17968
  var isNullish3 = (value) => isNull3(value) || isUndefined3(value);
17898
17969
  var getDefaultValue = (schema) => {
17899
17970
  return schema.type === "boolean" && isNullish3(schema.default) ? false : schema.default;
@@ -17931,13 +18002,13 @@ var BasicTypeSchema = (props) => {
17931
18002
  props.onBlur();
17932
18003
  }
17933
18004
  };
17934
- const [model, setModel] = (0, import_react52.useState)((_a = props.model) != null ? _a : null);
17935
- const [lastModel, setLastModel] = (0, import_react52.useState)((_b = props.model) != null ? _b : null);
17936
- const [changed, setChanged] = (0, import_react52.useState)(false);
17937
- const [focused, setFocused] = (0, import_react52.useState)(false);
17938
- const [blurred, setBlurred] = (0, import_react52.useState)(false);
17939
- const [validations, setValidations] = (0, import_react52.useState)([]);
17940
- const id = (0, import_react52.useMemo)(() => props.schema.$id || generateRandomId(), [props.schema.$id]);
18005
+ const [model, setModel] = (0, import_react53.useState)((_a = props.model) != null ? _a : null);
18006
+ const [lastModel, setLastModel] = (0, import_react53.useState)((_b = props.model) != null ? _b : null);
18007
+ const [changed, setChanged] = (0, import_react53.useState)(false);
18008
+ const [focused, setFocused] = (0, import_react53.useState)(false);
18009
+ const [blurred, setBlurred] = (0, import_react53.useState)(false);
18010
+ const [validations, setValidations] = (0, import_react53.useState)([]);
18011
+ const id = (0, import_react53.useMemo)(() => props.schema.$id || generateRandomId(), [props.schema.$id]);
17941
18012
  const onSchemaChange = () => {
17942
18013
  const defaultValue = getDefaultValue(props.schema);
17943
18014
  if (isNullish3(model) && !isNullish3(defaultValue)) {
@@ -17952,9 +18023,9 @@ var BasicTypeSchema = (props) => {
17952
18023
  };
17953
18024
  const isConst = props.schema.const;
17954
18025
  const isHidden = props.schema.hidden || isConst;
17955
- (0, import_react52.useEffect)(refreshValidations, [props.model, props.submitted]);
17956
- (0, import_react52.useEffect)(onSchemaChange, [props.schema]);
17957
- (0, import_react52.useEffect)(() => {
18026
+ (0, import_react53.useEffect)(refreshValidations, [props.model, props.submitted]);
18027
+ (0, import_react53.useEffect)(onSchemaChange, [props.schema]);
18028
+ (0, import_react53.useEffect)(() => {
17958
18029
  var _a2;
17959
18030
  const newModel = (_a2 = props.model) != null ? _a2 : null;
17960
18031
  if (newModel !== model) {
@@ -17969,15 +18040,15 @@ var BasicTypeSchema = (props) => {
17969
18040
  const showLabel = props.schema.format !== "file" && props.schema.type !== "boolean";
17970
18041
  const schemaHelp = props.schema.help;
17971
18042
  const feedbackId = `${id}-feedback`;
17972
- return !isHidden ? /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(import_jsx_runtime116.Fragment, { children: [
17973
- props.schema.alert && /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(DynamicAlert_default, { component: props.schema.alert }),
17974
- /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)("div", { className: (0, import_classnames15.default)(formGroupClasses), children: [
17975
- showLabel && /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)("div", { className: "d-inline-block m-b-1", children: [
17976
- /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("label", { className: "control-label d-inline", htmlFor: id, children: props.schema.title }),
17977
- !!schemaHelp && /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(Help_default2, { help: schemaHelp })
18043
+ return !isHidden ? /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(import_jsx_runtime117.Fragment, { children: [
18044
+ props.schema.alert && /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(DynamicAlert_default, { component: props.schema.alert }),
18045
+ /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)("div", { className: (0, import_classnames15.default)(formGroupClasses), children: [
18046
+ showLabel && /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)("div", { className: "d-inline-block m-b-1", children: [
18047
+ /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("label", { className: "control-label d-inline", htmlFor: id, children: props.schema.title }),
18048
+ !!schemaHelp && /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(Help_default2, { help: schemaHelp })
17978
18049
  ] }),
17979
- !showLabel && !!schemaHelp && /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(Help_default2, { help: schemaHelp }),
17980
- /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
18050
+ !showLabel && !!schemaHelp && /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(Help_default2, { help: schemaHelp }),
18051
+ /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
17981
18052
  SchemaFormControl_default,
17982
18053
  {
17983
18054
  id,
@@ -17990,7 +18061,7 @@ var BasicTypeSchema = (props) => {
17990
18061
  describedBy: feedbackId
17991
18062
  }
17992
18063
  ),
17993
- /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
18064
+ /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
17994
18065
  ControlFeedback_default,
17995
18066
  {
17996
18067
  id: feedbackId,
@@ -18015,7 +18086,7 @@ BasicTypeSchema.defaultProps = {
18015
18086
  var BasicTypeSchema_default = BasicTypeSchema;
18016
18087
 
18017
18088
  // src/legacy/jsonSchemaForm/persistAsyncSchema/persistAsyncBasicSchema/PersistAsyncBasicSchema.tsx
18018
- var import_jsx_runtime117 = require("react/jsx-runtime");
18089
+ var import_jsx_runtime118 = require("react/jsx-runtime");
18019
18090
  var getIdFromResponse = (idProperty, response) => response[idProperty];
18020
18091
  var getErrorFromResponse = (errorProperty, response) => {
18021
18092
  var _a;
@@ -18033,12 +18104,12 @@ function PersistAsyncBasicSchema(props) {
18033
18104
  const intl = (0, import_react_intl38.useIntl)();
18034
18105
  const httpClient = useHttpClient();
18035
18106
  const onEvent = useEventDispatcher();
18036
- const [persistAsyncModel, setPersistAsyncModel] = (0, import_react53.useState)(null);
18107
+ const [persistAsyncModel, setPersistAsyncModel] = (0, import_react54.useState)(null);
18037
18108
  const previousPersistAsyncModel = usePrevious(persistAsyncModel);
18038
- const [persistAsyncError, setPersistAsyncError] = (0, import_react53.useState)(null);
18039
- const [fieldSubmitted, setFieldSubmitted] = (0, import_react53.useState)(false);
18040
- const [abortController, setAbortController] = (0, import_react53.useState)(null);
18041
- (0, import_react53.useEffect)(() => {
18109
+ const [persistAsyncError, setPersistAsyncError] = (0, import_react54.useState)(null);
18110
+ const [fieldSubmitted, setFieldSubmitted] = (0, import_react54.useState)(false);
18111
+ const [abortController, setAbortController] = (0, import_react54.useState)(null);
18112
+ (0, import_react54.useEffect)(() => {
18042
18113
  if (controlTypesWithPersistOnChange.has(
18043
18114
  // TODO: LOW avoid type assertion below -- control type may be nullish. consider ?? ''
18044
18115
  getControlType(schema.persistAsync.schema)
@@ -18105,7 +18176,7 @@ function PersistAsyncBasicSchema(props) {
18105
18176
  setPersistAsyncModel(newPersistAsyncModel);
18106
18177
  }
18107
18178
  };
18108
- return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
18179
+ return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
18109
18180
  BasicTypeSchema_default,
18110
18181
  {
18111
18182
  required,
@@ -18126,7 +18197,7 @@ var PersistAsyncBasicSchema_default = PersistAsyncBasicSchema;
18126
18197
 
18127
18198
  // src/legacy/common/hooks/usePersistAsync/usePersistAsync.ts
18128
18199
  var usePersistAsync = (persistAsync) => {
18129
- const [abortController, setAbortController] = (0, import_react54.useState)(null);
18200
+ const [abortController, setAbortController] = (0, import_react55.useState)(null);
18130
18201
  const httpClient = useHttpClient();
18131
18202
  const intl = (0, import_react_intl39.useIntl)();
18132
18203
  const { schema } = persistAsync;
@@ -18205,7 +18276,7 @@ function hasStringMessage(value) {
18205
18276
  }
18206
18277
 
18207
18278
  // src/legacy/common/hooks/usePolling/usePolling.tsx
18208
- var import_react55 = require("react");
18279
+ var import_react56 = require("react");
18209
18280
  function usePolling({
18210
18281
  asyncFn,
18211
18282
  interval,
@@ -18214,9 +18285,9 @@ function usePolling({
18214
18285
  onPollingResponse,
18215
18286
  onFailure
18216
18287
  }) {
18217
- const onPollingResponseReference = (0, import_react55.useRef)(onPollingResponse);
18218
- const onFailureReference = (0, import_react55.useRef)(onFailure);
18219
- const poll = (0, import_react55.useMemo)(
18288
+ const onPollingResponseReference = (0, import_react56.useRef)(onPollingResponse);
18289
+ const onFailureReference = (0, import_react56.useRef)(onFailure);
18290
+ const poll = (0, import_react56.useMemo)(
18220
18291
  () => createPollingClosure(
18221
18292
  asyncFn,
18222
18293
  maxAttempts,
@@ -18226,7 +18297,7 @@ function usePolling({
18226
18297
  ),
18227
18298
  [asyncFn, maxAttempts, maxConsecutiveFails]
18228
18299
  );
18229
- (0, import_react55.useEffect)(() => {
18300
+ (0, import_react56.useEffect)(() => {
18230
18301
  if (interval > 0) {
18231
18302
  const intervalReference = setInterval(() => {
18232
18303
  poll();
@@ -18234,7 +18305,7 @@ function usePolling({
18234
18305
  return () => clearInterval(intervalReference);
18235
18306
  }
18236
18307
  }, [poll, interval]);
18237
- (0, import_react55.useEffect)(() => {
18308
+ (0, import_react56.useEffect)(() => {
18238
18309
  onPollingResponseReference.current = onPollingResponse;
18239
18310
  onFailureReference.current = onFailure;
18240
18311
  }, [onPollingResponse, onFailure]);
@@ -18265,20 +18336,20 @@ function createPollingClosure(asyncFn, maxAttempts, maxConsecutiveFails, onPolli
18265
18336
  }
18266
18337
 
18267
18338
  // src/legacy/common/hooks/usePrevious/usePrevious.js
18268
- var import_react56 = require("react");
18339
+ var import_react57 = require("react");
18269
18340
  var usePrevious = (value) => {
18270
- const reference = (0, import_react56.useRef)();
18271
- (0, import_react56.useEffect)(() => {
18341
+ const reference = (0, import_react57.useRef)();
18342
+ (0, import_react57.useEffect)(() => {
18272
18343
  reference.current = value;
18273
18344
  }, [value]);
18274
18345
  return reference.current;
18275
18346
  };
18276
18347
 
18277
18348
  // src/legacy/common/hooks/useStepPolling/useStepPolling.tsx
18278
- var import_react57 = require("react");
18349
+ var import_react58 = require("react");
18279
18350
  function useStepPolling(polling, onAction) {
18280
18351
  const httpClient = useHttpClient();
18281
- const asyncFn = (0, import_react57.useMemo)(() => {
18352
+ const asyncFn = (0, import_react58.useMemo)(() => {
18282
18353
  if (polling) {
18283
18354
  return () => httpClient(polling.url).then((response) => {
18284
18355
  if (response.ok) {
@@ -18291,7 +18362,7 @@ function useStepPolling(polling, onAction) {
18291
18362
  }
18292
18363
  return void 0;
18293
18364
  }, [polling, httpClient]);
18294
- const onPollingResponse = (0, import_react57.useCallback)(
18365
+ const onPollingResponse = (0, import_react58.useCallback)(
18295
18366
  (pollingResponse) => {
18296
18367
  if (pollingResponse == null ? void 0 : pollingResponse.action) {
18297
18368
  onAction(pollingResponse.action);
@@ -18307,7 +18378,7 @@ function useStepPolling(polling, onAction) {
18307
18378
  maxAttempts: (polling == null ? void 0 : polling.maxAttempts) || 0,
18308
18379
  maxConsecutiveFails: 1,
18309
18380
  onPollingResponse,
18310
- onFailure: (0, import_react57.useCallback)(() => {
18381
+ onFailure: (0, import_react58.useCallback)(() => {
18311
18382
  if (polling) {
18312
18383
  onAction(polling.onError.action);
18313
18384
  }
@@ -18316,7 +18387,7 @@ function useStepPolling(polling, onAction) {
18316
18387
  }
18317
18388
 
18318
18389
  // src/legacy/step/layoutStep/LayoutStep.tsx
18319
- var import_jsx_runtime118 = require("react/jsx-runtime");
18390
+ var import_jsx_runtime119 = require("react/jsx-runtime");
18320
18391
  var getComponents = (step, options) => {
18321
18392
  var _a;
18322
18393
  if (isEmpty(step)) {
@@ -18339,7 +18410,7 @@ var LayoutStep = (props) => {
18339
18410
  onEvent("Dynamic Flow - onAction supressed", { reason: "LayoutStep - loading state" });
18340
18411
  };
18341
18412
  useStepPolling(stepSpecification.polling, onAction);
18342
- return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
18413
+ return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
18343
18414
  DynamicLayout_default,
18344
18415
  {
18345
18416
  components,
@@ -18355,10 +18426,10 @@ var LayoutStep = (props) => {
18355
18426
  var LayoutStep_default = LayoutStep;
18356
18427
 
18357
18428
  // src/legacy/step/cameraStep/CameraStep.tsx
18358
- var import_react62 = require("react");
18429
+ var import_react63 = require("react");
18359
18430
 
18360
18431
  // src/common/cameraCapture/CameraCapture.tsx
18361
- var import_react61 = require("react");
18432
+ var import_react62 = require("react");
18362
18433
  var import_react_intl44 = require("react-intl");
18363
18434
  var import_react_webcam = __toESM(require("react-webcam"));
18364
18435
 
@@ -18425,15 +18496,15 @@ var CameraCapture_messages_default = (0, import_react_intl40.defineMessages)({
18425
18496
  // src/common/cameraCapture/components/bottomBar/BottomBar.tsx
18426
18497
  var import_components73 = require("@transferwise/components");
18427
18498
  var import_react_intl41 = require("react-intl");
18428
- var import_jsx_runtime119 = require("react/jsx-runtime");
18429
- var CaptureBottomBar = ({ onCapture }) => /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("div", { className: "bottom-bar", children: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(CaptureButton, { onClick: onCapture }) });
18499
+ var import_jsx_runtime120 = require("react/jsx-runtime");
18500
+ var CaptureBottomBar = ({ onCapture }) => /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: "bottom-bar", children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(CaptureButton, { onClick: onCapture }) });
18430
18501
  var ReviewBottomBar = ({
18431
18502
  onSubmit,
18432
18503
  onRetry
18433
18504
  }) => {
18434
18505
  const intl = (0, import_react_intl41.useIntl)();
18435
- return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("div", { className: "bottom-bar p-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("div", { className: "row", children: /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)("div", { className: "col-xs-12 col-md-6 col-md-offset-3", children: [
18436
- /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
18506
+ return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: "bottom-bar p-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: "row", children: /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("div", { className: "col-xs-12 col-md-6 col-md-offset-3", children: [
18507
+ /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
18437
18508
  import_components73.Button,
18438
18509
  {
18439
18510
  className: "m-b-1",
@@ -18444,7 +18515,7 @@ var ReviewBottomBar = ({
18444
18515
  children: intl.formatMessage(CameraCapture_messages_default.reviewSubmit)
18445
18516
  }
18446
18517
  ),
18447
- /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
18518
+ /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
18448
18519
  import_components73.Button,
18449
18520
  {
18450
18521
  className: "m-b-2",
@@ -18458,14 +18529,14 @@ var ReviewBottomBar = ({
18458
18529
  )
18459
18530
  ] }) }) });
18460
18531
  };
18461
- var CaptureButton = ({ onClick }) => /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
18532
+ var CaptureButton = ({ onClick }) => /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
18462
18533
  "button",
18463
18534
  {
18464
18535
  type: "button",
18465
18536
  className: "camera-capture-btn m-b-2",
18466
18537
  "data-testid": "camera-capture-button",
18467
18538
  onClick,
18468
- children: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("span", { className: "camera-capture-btn-inner" })
18539
+ children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("span", { className: "camera-capture-btn-inner" })
18469
18540
  }
18470
18541
  );
18471
18542
 
@@ -18483,11 +18554,11 @@ var OrientationLockOverlay_messages_default = (0, import_react_intl42.defineMess
18483
18554
  });
18484
18555
 
18485
18556
  // src/common/cameraCapture/components/orientationLockOverlay/OrientationLockOverlay.tsx
18486
- var import_jsx_runtime120 = require("react/jsx-runtime");
18557
+ var import_jsx_runtime121 = require("react/jsx-runtime");
18487
18558
  function OrientationLockOverlay() {
18488
18559
  const intl = (0, import_react_intl43.useIntl)();
18489
- return /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("div", { className: "orientation-lock-overlay", children: [
18490
- /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
18560
+ return /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)("div", { className: "orientation-lock-overlay", children: [
18561
+ /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
18491
18562
  "img",
18492
18563
  {
18493
18564
  className: "m-b-3",
@@ -18497,13 +18568,13 @@ function OrientationLockOverlay() {
18497
18568
  alt: ""
18498
18569
  }
18499
18570
  ),
18500
- /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("p", { className: "text-center m-b-0", children: intl.formatMessage(OrientationLockOverlay_messages_default.text) })
18571
+ /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("p", { className: "text-center m-b-0", children: intl.formatMessage(OrientationLockOverlay_messages_default.text) })
18501
18572
  ] });
18502
18573
  }
18503
18574
  var OrientationLockOverlay_default = OrientationLockOverlay;
18504
18575
 
18505
18576
  // src/common/cameraCapture/hooks/useFullScreenOrientationLock.ts
18506
- var import_react58 = require("react");
18577
+ var import_react59 = require("react");
18507
18578
  var import_screenfull = __toESM(require_screenfull());
18508
18579
 
18509
18580
  // src/common/cameraCapture/utils/index.ts
@@ -18582,7 +18653,7 @@ var trackCameraOrientationLocked = (onEvent) => {
18582
18653
 
18583
18654
  // src/common/cameraCapture/hooks/useFullScreenOrientationLock.ts
18584
18655
  var useFullScreenOrientationLock = (shouldLockOrientation, onEvent) => {
18585
- const lockOrientation = (0, import_react58.useCallback)(() => {
18656
+ const lockOrientation = (0, import_react59.useCallback)(() => {
18586
18657
  if (window.screen.orientation && "lock" in window.screen.orientation && typeof window.screen.orientation.lock === "function") {
18587
18658
  const lockPromise = window.screen.orientation.lock("portrait");
18588
18659
  if (lockPromise instanceof Promise) {
@@ -18590,11 +18661,11 @@ var useFullScreenOrientationLock = (shouldLockOrientation, onEvent) => {
18590
18661
  }
18591
18662
  }
18592
18663
  }, [onEvent]);
18593
- const unlockOrientation = (0, import_react58.useCallback)(() => {
18664
+ const unlockOrientation = (0, import_react59.useCallback)(() => {
18594
18665
  var _a, _b, _c;
18595
18666
  return (_c = (_b = (_a = window == null ? void 0 : window.screen) == null ? void 0 : _a.orientation) == null ? void 0 : _b.unlock) == null ? void 0 : _c.call(_b);
18596
18667
  }, []);
18597
- const enterFullScreen = (0, import_react58.useCallback)(() => {
18668
+ const enterFullScreen = (0, import_react59.useCallback)(() => {
18598
18669
  setTimeout(() => {
18599
18670
  if (shouldLockOrientation && !import_screenfull.default.isFullscreen && import_screenfull.default.isEnabled) {
18600
18671
  import_screenfull.default.request(document.documentElement, { navigationUI: "show" }).then(() => {
@@ -18603,13 +18674,13 @@ var useFullScreenOrientationLock = (shouldLockOrientation, onEvent) => {
18603
18674
  }
18604
18675
  }, 100);
18605
18676
  }, [shouldLockOrientation, lockOrientation]);
18606
- const exitFullScreen = (0, import_react58.useCallback)(() => {
18677
+ const exitFullScreen = (0, import_react59.useCallback)(() => {
18607
18678
  if (import_screenfull.default.isFullscreen) {
18608
18679
  import_screenfull.default.exit().catch(noop5);
18609
18680
  }
18610
18681
  unlockOrientation();
18611
18682
  }, [unlockOrientation]);
18612
- const handleOrientationChange = (0, import_react58.useCallback)(
18683
+ const handleOrientationChange = (0, import_react59.useCallback)(
18613
18684
  (event) => {
18614
18685
  var _a, _b;
18615
18686
  if ((_a = event == null ? void 0 : event.target) == null ? void 0 : _a.type.includes("landscape")) {
@@ -18620,7 +18691,7 @@ var useFullScreenOrientationLock = (shouldLockOrientation, onEvent) => {
18620
18691
  },
18621
18692
  [onEvent]
18622
18693
  );
18623
- (0, import_react58.useEffect)(() => {
18694
+ (0, import_react59.useEffect)(() => {
18624
18695
  var _a, _b;
18625
18696
  if (shouldLockOrientation) {
18626
18697
  (_b = (_a = window.screen) == null ? void 0 : _a.orientation) == null ? void 0 : _b.addEventListener(
@@ -18643,10 +18714,10 @@ var noop5 = () => {
18643
18714
  };
18644
18715
 
18645
18716
  // src/common/cameraCapture/hooks/useVideoConstraints.ts
18646
- var import_react59 = require("react");
18717
+ var import_react60 = require("react");
18647
18718
  var useVideoConstraints = (direction) => {
18648
- const [videoConstraints, setVideoConstraints] = (0, import_react59.useState)();
18649
- (0, import_react59.useEffect)(() => {
18719
+ const [videoConstraints, setVideoConstraints] = (0, import_react60.useState)();
18720
+ (0, import_react60.useEffect)(() => {
18650
18721
  void getVideoConstraints(direction).then(setVideoConstraints);
18651
18722
  }, [direction]);
18652
18723
  return { videoConstraints };
@@ -18671,8 +18742,8 @@ var getVideoConstraints = async (dir) => {
18671
18742
  };
18672
18743
 
18673
18744
  // src/common/cameraCapture/overlay/Overlay.tsx
18674
- var import_react60 = require("react");
18675
- var import_jsx_runtime121 = require("react/jsx-runtime");
18745
+ var import_react61 = require("react");
18746
+ var import_jsx_runtime122 = require("react/jsx-runtime");
18676
18747
  var captureButtonHeight = 92;
18677
18748
  var reviewButtonsHeight = 120;
18678
18749
  var imageHeight = 40;
@@ -18681,8 +18752,8 @@ var instructionsHeight = 48;
18681
18752
  var reviewInstructionsHeight = 40;
18682
18753
  var overlayMaxWidth = 800;
18683
18754
  function Overlay({ overlay, outline, imageUrl, title, instructions, reviewInstructions }) {
18684
- const svgReference = (0, import_react60.useRef)(null);
18685
- (0, import_react60.useEffect)(() => {
18755
+ const svgReference = (0, import_react61.useRef)(null);
18756
+ (0, import_react61.useEffect)(() => {
18686
18757
  const listener = debounce2(() => {
18687
18758
  var _a;
18688
18759
  if ((_a = svgReference.current) == null ? void 0 : _a.innerHTML) {
@@ -18694,18 +18765,18 @@ function Overlay({ overlay, outline, imageUrl, title, instructions, reviewInstru
18694
18765
  return () => window.removeEventListener("resize", listener);
18695
18766
  });
18696
18767
  let helperBoxHeight = (imageUrl ? imageHeight : 0) + (title ? titleHeight : 0) + (instructions ? instructionsHeight : 0);
18697
- let helperBox = /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(import_jsx_runtime121.Fragment, { children: [
18698
- imageUrl && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("img", { className: "camera-capture-img", src: imageUrl, alt: "" }),
18699
- title && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("h4", { className: "camera-capture-title", children: title }),
18700
- instructions && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("small", { className: "camera-capture-instructions", children: instructions })
18768
+ let helperBox = /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(import_jsx_runtime122.Fragment, { children: [
18769
+ imageUrl && /* @__PURE__ */ (0, import_jsx_runtime122.jsx)("img", { className: "camera-capture-img", src: imageUrl, alt: "" }),
18770
+ title && /* @__PURE__ */ (0, import_jsx_runtime122.jsx)("h4", { className: "camera-capture-title", children: title }),
18771
+ instructions && /* @__PURE__ */ (0, import_jsx_runtime122.jsx)("small", { className: "camera-capture-instructions", children: instructions })
18701
18772
  ] });
18702
18773
  const frameBottomMargin = captureButtonHeight + helperBoxHeight;
18703
18774
  if (reviewInstructions) {
18704
18775
  helperBoxHeight = frameBottomMargin - reviewButtonsHeight;
18705
- helperBox = /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("small", { className: "camera-capture-instructions", children: reviewInstructions });
18776
+ helperBox = /* @__PURE__ */ (0, import_jsx_runtime122.jsx)("small", { className: "camera-capture-instructions", children: reviewInstructions });
18706
18777
  const frameWithReviewInstructionsMinBottomMargin = reviewButtonsHeight + reviewInstructionsHeight;
18707
18778
  if (frameBottomMargin < frameWithReviewInstructionsMinBottomMargin) {
18708
- helperBox = /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_jsx_runtime121.Fragment, {});
18779
+ helperBox = /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(import_jsx_runtime122.Fragment, {});
18709
18780
  }
18710
18781
  }
18711
18782
  const framePosition = {
@@ -18723,32 +18794,32 @@ function Overlay({ overlay, outline, imageUrl, title, instructions, reviewInstru
18723
18794
  width: "90%"
18724
18795
  }
18725
18796
  };
18726
- return /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)("svg", { ref: svgReference, xmlns: "http://www.w3.org/2000/svg", children: [
18727
- /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)("mask", { id: "mask", children: [
18728
- /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("rect", { width: "100%", height: "100%", fill: "#fff" }),
18729
- /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("image", __spreadValues({ href: overlay }, framePosition))
18797
+ return /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)("svg", { ref: svgReference, xmlns: "http://www.w3.org/2000/svg", children: [
18798
+ /* @__PURE__ */ (0, import_jsx_runtime122.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)("mask", { id: "mask", children: [
18799
+ /* @__PURE__ */ (0, import_jsx_runtime122.jsx)("rect", { width: "100%", height: "100%", fill: "#fff" }),
18800
+ /* @__PURE__ */ (0, import_jsx_runtime122.jsx)("image", __spreadValues({ href: overlay }, framePosition))
18730
18801
  ] }) }),
18731
- overlay && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("rect", { width: "100%", height: "100%", mask: "url(#mask)", fillOpacity: "0.72" }),
18732
- outline && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("image", __spreadValues({ href: outline }, framePosition)),
18733
- /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("foreignObject", { width: "100%", height: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)("div", __spreadProps(__spreadValues({ className: "camera-capture-text-and-image-container" }, helperBoxPosition), { children: helperBox })) })
18802
+ overlay && /* @__PURE__ */ (0, import_jsx_runtime122.jsx)("rect", { width: "100%", height: "100%", mask: "url(#mask)", fillOpacity: "0.72" }),
18803
+ outline && /* @__PURE__ */ (0, import_jsx_runtime122.jsx)("image", __spreadValues({ href: outline }, framePosition)),
18804
+ /* @__PURE__ */ (0, import_jsx_runtime122.jsx)("foreignObject", { width: "100%", height: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)("div", __spreadProps(__spreadValues({ className: "camera-capture-text-and-image-container" }, helperBoxPosition), { children: helperBox })) })
18734
18805
  ] });
18735
18806
  }
18736
18807
  var Overlay_default = Overlay;
18737
18808
 
18738
18809
  // src/common/cameraCapture/screens/cameraErrorScreen/CameraErrorScreen.tsx
18739
18810
  var import_components74 = require("@transferwise/components");
18740
- var import_jsx_runtime122 = require("react/jsx-runtime");
18811
+ var import_jsx_runtime123 = require("react/jsx-runtime");
18741
18812
  function CameraErrorScreen({ title, description, actionButton, onAction }) {
18742
- return /* @__PURE__ */ (0, import_jsx_runtime122.jsx)("div", { className: "container p-t-5", children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)("div", { className: "row", children: /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)("div", { className: "col-md-6 col-md-offset-3", children: [
18743
- /* @__PURE__ */ (0, import_jsx_runtime122.jsx)("h2", { className: "text-xs-center m-b-3", children: title }),
18744
- /* @__PURE__ */ (0, import_jsx_runtime122.jsx)("p", { className: "text-xs-center m-b-5", children: description }),
18745
- onAction && actionButton && /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(import_components74.Button, { block: true, onClick: onAction, children: actionButton })
18813
+ return /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("div", { className: "container p-t-5", children: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("div", { className: "row", children: /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)("div", { className: "col-md-6 col-md-offset-3", children: [
18814
+ /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("h2", { className: "text-xs-center m-b-3", children: title }),
18815
+ /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("p", { className: "text-xs-center m-b-5", children: description }),
18816
+ onAction && actionButton && /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_components74.Button, { block: true, onClick: onAction, children: actionButton })
18746
18817
  ] }) }) });
18747
18818
  }
18748
18819
  var CameraErrorScreen_default = CameraErrorScreen;
18749
18820
 
18750
18821
  // src/common/cameraCapture/CameraCapture.tsx
18751
- var import_jsx_runtime123 = require("react/jsx-runtime");
18822
+ var import_jsx_runtime124 = require("react/jsx-runtime");
18752
18823
  function CameraCapture({
18753
18824
  direction = "back",
18754
18825
  overlay = "",
@@ -18760,14 +18831,14 @@ function CameraCapture({
18760
18831
  onCapture,
18761
18832
  onEvent
18762
18833
  }) {
18763
- const [mode, setMode] = (0, import_react61.useState)("CAPTURE" /* CAPTURE */);
18764
- const [cameraError, setCameraError] = (0, import_react61.useState)();
18765
- const [isVideoMirrored, setIsVideoMirrored] = (0, import_react61.useState)(false);
18766
- const [ready, setReady] = (0, import_react61.useState)(false);
18767
- const [reviewImage, setReviewImage] = (0, import_react61.useState)();
18768
- const webcamReference = (0, import_react61.useRef)(null);
18834
+ const [mode, setMode] = (0, import_react62.useState)("CAPTURE" /* CAPTURE */);
18835
+ const [cameraError, setCameraError] = (0, import_react62.useState)();
18836
+ const [isVideoMirrored, setIsVideoMirrored] = (0, import_react62.useState)(false);
18837
+ const [ready, setReady] = (0, import_react62.useState)(false);
18838
+ const [reviewImage, setReviewImage] = (0, import_react62.useState)();
18839
+ const webcamReference = (0, import_react62.useRef)(null);
18769
18840
  const { videoConstraints } = useVideoConstraints(direction);
18770
- const shouldLockOrientation = (0, import_react61.useMemo)(
18841
+ const shouldLockOrientation = (0, import_react62.useMemo)(
18771
18842
  () => !!(isMobile() && mode === "CAPTURE" /* CAPTURE */),
18772
18843
  [mode]
18773
18844
  );
@@ -18776,7 +18847,7 @@ function CameraCapture({
18776
18847
  onEvent
18777
18848
  );
18778
18849
  const intl = (0, import_react_intl44.useIntl)();
18779
- const handleCapture = (0, import_react61.useCallback)(async () => {
18850
+ const handleCapture = (0, import_react62.useCallback)(async () => {
18780
18851
  var _a, _b, _c, _d, _e, _f;
18781
18852
  if (((_a = webcamReference == null ? void 0 : webcamReference.current) == null ? void 0 : _a.video) && ((_c = (_b = webcamReference == null ? void 0 : webcamReference.current) == null ? void 0 : _b.video) == null ? void 0 : _c.readyState) >= 3) {
18782
18853
  (_e = (_d = webcamReference == null ? void 0 : webcamReference.current) == null ? void 0 : _d.video) == null ? void 0 : _e.pause();
@@ -18798,7 +18869,7 @@ function CameraCapture({
18798
18869
  );
18799
18870
  }
18800
18871
  }, [webcamReference, showReview, setReviewImage, setMode, onCapture, isVideoMirrored]);
18801
- const handleUserMediaError = (0, import_react61.useCallback)(
18872
+ const handleUserMediaError = (0, import_react62.useCallback)(
18802
18873
  (error) => {
18803
18874
  setMode("ERROR" /* ERROR */);
18804
18875
  if (error instanceof DOMException) {
@@ -18834,7 +18905,7 @@ function CameraCapture({
18834
18905
  },
18835
18906
  [intl, onEvent]
18836
18907
  );
18837
- const handleUserMedia = (0, import_react61.useCallback)(
18908
+ const handleUserMedia = (0, import_react62.useCallback)(
18838
18909
  (stream) => {
18839
18910
  enterFullScreen();
18840
18911
  setReady(true);
@@ -18851,13 +18922,13 @@ function CameraCapture({
18851
18922
  setReviewImage(void 0);
18852
18923
  };
18853
18924
  const handleRetryCameraAccess = () => setMode("CAPTURE" /* CAPTURE */);
18854
- (0, import_react61.useEffect)(() => {
18925
+ (0, import_react62.useEffect)(() => {
18855
18926
  if (mode !== "CAPTURE" /* CAPTURE */) {
18856
18927
  exitFullScreen();
18857
18928
  }
18858
18929
  }, [mode, exitFullScreen]);
18859
- const captureScreen = /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)("div", { className: "camera-capture", children: [
18860
- videoConstraints && /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
18930
+ const captureScreen = /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)("div", { className: "camera-capture", children: [
18931
+ videoConstraints && /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
18861
18932
  import_react_webcam.default,
18862
18933
  {
18863
18934
  ref: webcamReference,
@@ -18868,7 +18939,7 @@ function CameraCapture({
18868
18939
  onUserMedia: handleUserMedia
18869
18940
  }
18870
18941
  ),
18871
- /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
18942
+ /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
18872
18943
  Overlay_default,
18873
18944
  {
18874
18945
  overlay,
@@ -18878,8 +18949,8 @@ function CameraCapture({
18878
18949
  instructions
18879
18950
  }
18880
18951
  ),
18881
- shouldLockOrientation && /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(OrientationLockOverlay_default, {}),
18882
- ready && /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
18952
+ shouldLockOrientation && /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(OrientationLockOverlay_default, {}),
18953
+ ready && /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
18883
18954
  CaptureBottomBar,
18884
18955
  {
18885
18956
  onCapture: () => {
@@ -18888,9 +18959,9 @@ function CameraCapture({
18888
18959
  }
18889
18960
  )
18890
18961
  ] });
18891
- const reviewScreen = /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)("div", { className: "camera-capture", children: [
18892
- /* @__PURE__ */ (0, import_jsx_runtime123.jsx)("img", { className: "review-image", src: reviewImage == null ? void 0 : reviewImage.source, alt: "" }),
18893
- /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
18962
+ const reviewScreen = /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)("div", { className: "camera-capture", children: [
18963
+ /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("img", { className: "review-image", src: reviewImage == null ? void 0 : reviewImage.source, alt: "" }),
18964
+ /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
18894
18965
  Overlay_default,
18895
18966
  {
18896
18967
  overlay,
@@ -18900,18 +18971,18 @@ function CameraCapture({
18900
18971
  reviewInstructions: intl.formatMessage(CameraCapture_messages_default.reviewInstructions)
18901
18972
  }
18902
18973
  ),
18903
- /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(ReviewBottomBar, { onSubmit: handleReviewSubmit, onRetry: handleReviewRetry })
18974
+ /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(ReviewBottomBar, { onSubmit: handleReviewSubmit, onRetry: handleReviewRetry })
18904
18975
  ] });
18905
- return /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)("section", { children: [
18976
+ return /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)("section", { children: [
18906
18977
  mode === "CAPTURE" /* CAPTURE */ && captureScreen,
18907
18978
  mode === "REVIEW" /* REVIEW */ && reviewScreen,
18908
- mode === "ERROR" /* ERROR */ && cameraError && /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(CameraErrorScreen_default, __spreadValues({}, cameraError))
18979
+ mode === "ERROR" /* ERROR */ && cameraError && /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(CameraErrorScreen_default, __spreadValues({}, cameraError))
18909
18980
  ] });
18910
18981
  }
18911
18982
  var CameraCapture_default = CameraCapture;
18912
18983
 
18913
18984
  // src/legacy/step/cameraStep/CameraStep.tsx
18914
- var import_jsx_runtime124 = require("react/jsx-runtime");
18985
+ var import_jsx_runtime125 = require("react/jsx-runtime");
18915
18986
  function blobToBase64(blob) {
18916
18987
  return new Promise((resolve, _) => {
18917
18988
  const reader = new FileReader();
@@ -18929,8 +19000,8 @@ function CameraStep(props) {
18929
19000
  const { assets, direction, instructions } = cameraConfig || {};
18930
19001
  const { overlay, outline } = assets || {};
18931
19002
  const { url: imageUrl } = image || {};
18932
- const [captureClicked, setCaptureClicked] = (0, import_react62.useState)(false);
18933
- (0, import_react62.useEffect)(() => {
19003
+ const [captureClicked, setCaptureClicked] = (0, import_react63.useState)(false);
19004
+ (0, import_react63.useEffect)(() => {
18934
19005
  if (captureClicked) {
18935
19006
  onAction(action);
18936
19007
  }
@@ -18949,7 +19020,7 @@ function CameraStep(props) {
18949
19020
  });
18950
19021
  }
18951
19022
  };
18952
- return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
19023
+ return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
18953
19024
  CameraCapture_default,
18954
19025
  {
18955
19026
  overlay,
@@ -19026,12 +19097,12 @@ var external_confirmation_messages_default2 = (0, import_react_intl45.defineMess
19026
19097
  });
19027
19098
 
19028
19099
  // src/legacy/step/externalConfirmationStep/ExternalConfirmationStep.tsx
19029
- var import_jsx_runtime125 = require("react/jsx-runtime");
19100
+ var import_jsx_runtime126 = require("react/jsx-runtime");
19030
19101
  var noop6 = () => {
19031
19102
  };
19032
19103
  function ExternalConfirmationStep({ url, onClose }) {
19033
19104
  const { formatMessage } = (0, import_react_intl46.useIntl)();
19034
- return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
19105
+ return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(
19035
19106
  DynamicLayout_default,
19036
19107
  {
19037
19108
  components: [
@@ -19098,9 +19169,9 @@ function getOrigin2(url) {
19098
19169
  // src/legacy/dynamicFlow/BackButton.tsx
19099
19170
  var import_components76 = require("@transferwise/components");
19100
19171
  var import_icons6 = require("@transferwise/icons");
19101
- var import_jsx_runtime126 = require("react/jsx-runtime");
19172
+ var import_jsx_runtime127 = require("react/jsx-runtime");
19102
19173
  function BackButton2({ title, action, onAction }) {
19103
- return /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)(
19174
+ return /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(
19104
19175
  "a",
19105
19176
  {
19106
19177
  href: "/",
@@ -19111,8 +19182,8 @@ function BackButton2({ title, action, onAction }) {
19111
19182
  onAction(__spreadProps(__spreadValues({}, action), { skipValidation: true }));
19112
19183
  },
19113
19184
  children: [
19114
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)("span", { className: "sr-only", children: title }),
19115
- /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_components76.Avatar, { type: "icon", children: /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_icons6.ArrowLeft, { size: "24" }) })
19185
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)("span", { className: "sr-only", children: title }),
19186
+ /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_components76.Avatar, { type: "icon", children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_icons6.ArrowLeft, { size: "24" }) })
19116
19187
  ]
19117
19188
  }
19118
19189
  );
@@ -19120,7 +19191,7 @@ function BackButton2({ title, action, onAction }) {
19120
19191
  var BackButton_default2 = BackButton2;
19121
19192
 
19122
19193
  // src/legacy/dynamicFlow/DynamicFlowStep.tsx
19123
- var import_jsx_runtime127 = require("react/jsx-runtime");
19194
+ var import_jsx_runtime128 = require("react/jsx-runtime");
19124
19195
  function DynamicFlowStep(props) {
19125
19196
  var _a, _b, _c;
19126
19197
  const { step, globalError, onAction } = props;
@@ -19129,28 +19200,28 @@ function DynamicFlowStep(props) {
19129
19200
  const { requiresManualTrigger, dismissConfirmation } = useExternal2(externalUrl);
19130
19201
  if (step === void 0) {
19131
19202
  if (globalError) {
19132
- return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(DynamicAlert_default, { component: { context: "negative", markdown: globalError, margin: "lg" } });
19203
+ return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(DynamicAlert_default, { component: { context: "negative", markdown: globalError, margin: "lg" } });
19133
19204
  }
19134
19205
  return null;
19135
19206
  }
19136
19207
  if (externalUrl && requiresManualTrigger) {
19137
- return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(ExternalConfirmationStep_default, { url: externalUrl, onClose: dismissConfirmation });
19208
+ return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(ExternalConfirmationStep_default, { url: externalUrl, onClose: dismissConfirmation });
19138
19209
  }
19139
19210
  if (isCameraStep(step)) {
19140
- return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(CameraStep_default, __spreadProps(__spreadValues({}, props), { step }));
19211
+ return /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(CameraStep_default, __spreadProps(__spreadValues({}, props), { step }));
19141
19212
  }
19142
- return /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(import_jsx_runtime127.Fragment, { children: [
19143
- backButton && /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(BackButton_default2, __spreadProps(__spreadValues({}, backButton), { onAction })),
19144
- globalError ? /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(DynamicAlert_default, { component: { context: "negative", markdown: globalError, margin: "lg" } }) : null,
19145
- /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(LayoutStep_default, __spreadProps(__spreadValues({}, props), { stepSpecification: step }))
19213
+ return /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(import_jsx_runtime128.Fragment, { children: [
19214
+ backButton && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(BackButton_default2, __spreadProps(__spreadValues({}, backButton), { onAction })),
19215
+ globalError ? /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(DynamicAlert_default, { component: { context: "negative", markdown: globalError, margin: "lg" } }) : null,
19216
+ /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(LayoutStep_default, __spreadProps(__spreadValues({}, props), { stepSpecification: step }))
19146
19217
  ] });
19147
19218
  }
19148
19219
 
19149
19220
  // src/legacy/dynamicFlow/utils/useDebouncedRefresh/useDebouncedRefresh.ts
19150
- var import_react63 = require("react");
19221
+ var import_react64 = require("react");
19151
19222
  var DEBOUNCE_DELAY = 1e3;
19152
19223
  function useDebouncedRefresh(fetchRefresh) {
19153
- const map = (0, import_react63.useRef)(/* @__PURE__ */ new Map());
19224
+ const map = (0, import_react64.useRef)(/* @__PURE__ */ new Map());
19154
19225
  const retrieveOrCreate = (key) => {
19155
19226
  if (map.current.has(key)) {
19156
19227
  return map.current.get(key);
@@ -19182,12 +19253,12 @@ function useDebouncedRefresh(fetchRefresh) {
19182
19253
  var shouldDebounceSchema = (schema) => getSchemaType(schema) === "basic" && schema.type !== "boolean" && schema.format !== "base64url";
19183
19254
 
19184
19255
  // src/legacy/dynamicFlow/utils/useDynamicFlowState.ts
19185
- var import_react64 = require("react");
19256
+ var import_react65 = require("react");
19186
19257
  var useDynamicFlowState = (initialStep) => {
19187
19258
  var _a, _b;
19188
- const [formErrors, setFormErrors] = (0, import_react64.useState)((_a = initialStep == null ? void 0 : initialStep.errors) == null ? void 0 : _a.validation);
19189
- const [globalError, setGlobalError] = (0, import_react64.useState)((_b = initialStep == null ? void 0 : initialStep.errors) == null ? void 0 : _b.error);
19190
- const [stepAndModels, setStepAndModels] = (0, import_react64.useState)({
19259
+ const [formErrors, setFormErrors] = (0, import_react65.useState)((_a = initialStep == null ? void 0 : initialStep.errors) == null ? void 0 : _a.validation);
19260
+ const [globalError, setGlobalError] = (0, import_react65.useState)((_b = initialStep == null ? void 0 : initialStep.errors) == null ? void 0 : _b.error);
19261
+ const [stepAndModels, setStepAndModels] = (0, import_react65.useState)({
19191
19262
  step: initialStep || void 0,
19192
19263
  models: (initialStep == null ? void 0 : initialStep.model) ? buildInitialModels(initialStep.model, getAllSchemas(initialStep)) : {},
19193
19264
  etag: void 0
@@ -19217,7 +19288,7 @@ var useDynamicFlowState = (initialStep) => {
19217
19288
  return updatedState;
19218
19289
  });
19219
19290
  };
19220
- const modelIsValid = (0, import_react64.useMemo)(
19291
+ const modelIsValid = (0, import_react65.useMemo)(
19221
19292
  () => areModelsValid(models, getAllValidatableSchemas(step)),
19222
19293
  [models, step]
19223
19294
  );
@@ -19290,17 +19361,17 @@ var isInlineSchema = (schema) => schema !== void 0 && typeof schema === "object"
19290
19361
 
19291
19362
  // src/legacy/dynamicFlow/utils/useLoader.tsx
19292
19363
  var import_components77 = require("@transferwise/components");
19293
- var import_react65 = require("react");
19294
- var import_jsx_runtime128 = require("react/jsx-runtime");
19364
+ var import_react66 = require("react");
19365
+ var import_jsx_runtime129 = require("react/jsx-runtime");
19295
19366
  function useLoader(loaderConfig, initialState) {
19296
19367
  const config = __spreadValues({
19297
19368
  size: import_components77.Size.EXTRA_LARGE,
19298
19369
  initial: true,
19299
19370
  submission: false
19300
19371
  }, loaderConfig);
19301
- const [loadingState, setLoadingState] = (0, import_react65.useState)(initialState);
19372
+ const [loadingState, setLoadingState] = (0, import_react66.useState)(initialState);
19302
19373
  const shouldDisplayLoader = config.initial && loadingState === "initial" || config.submission && loadingState === "submission";
19303
- const loader = shouldDisplayLoader ? /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
19374
+ const loader = shouldDisplayLoader ? /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
19304
19375
  import_components77.Loader,
19305
19376
  {
19306
19377
  size: config.size,
@@ -19420,7 +19491,7 @@ var useErrorResponse = () => {
19420
19491
  };
19421
19492
 
19422
19493
  // src/legacy/dynamicFlow/DynamicFlow.tsx
19423
- var import_jsx_runtime129 = require("react/jsx-runtime");
19494
+ var import_jsx_runtime130 = require("react/jsx-runtime");
19424
19495
  var noop7 = () => {
19425
19496
  };
19426
19497
  var DynamicFlowComponent = ({
@@ -19448,7 +19519,7 @@ var DynamicFlowComponent = ({
19448
19519
  setStepAndEtag,
19449
19520
  setSchemaModel
19450
19521
  } = useDynamicFlowState(initialStep);
19451
- const [submitted, setSubmitted] = (0, import_react66.useState)(false);
19522
+ const [submitted, setSubmitted] = (0, import_react67.useState)(false);
19452
19523
  const { locale } = (0, import_react_intl48.useIntl)();
19453
19524
  const { isLoading, loader, setLoadingState } = useLoader(
19454
19525
  loaderConfig,
@@ -19467,18 +19538,18 @@ var DynamicFlowComponent = ({
19467
19538
  );
19468
19539
  }
19469
19540
  };
19470
- const analyticsMetadata = (0, import_react66.useMemo)(
19541
+ const analyticsMetadata = (0, import_react67.useMemo)(
19471
19542
  () => {
19472
19543
  var _a;
19473
19544
  return __spreadValues({ flowId, stepId: (step == null ? void 0 : step.id) || (step == null ? void 0 : step.key) }, (_a = step == null ? void 0 : step.analytics) != null ? _a : {});
19474
19545
  },
19475
19546
  [flowId, step]
19476
19547
  );
19477
- const dispatchEvent = (0, import_react66.useMemo)(
19548
+ const dispatchEvent = (0, import_react67.useMemo)(
19478
19549
  () => getEventDispatcher(onEvent, analyticsMetadata),
19479
19550
  [onEvent, analyticsMetadata]
19480
19551
  );
19481
- const dfHttpClient = (0, import_react66.useCallback)(
19552
+ const dfHttpClient = (0, import_react67.useCallback)(
19482
19553
  ({
19483
19554
  action,
19484
19555
  data,
@@ -19531,17 +19602,17 @@ var DynamicFlowComponent = ({
19531
19602
  dispatchEventAndComplete(__spreadValues(__spreadValues({}, exitResult), actionResult));
19532
19603
  };
19533
19604
  const { debouncedRefresh, isDebouncing, cancelPendingRefreshes } = useDebouncedRefresh(performRefresh);
19534
- const dispatchEventAndComplete = (0, import_react66.useCallback)(
19605
+ const dispatchEventAndComplete = (0, import_react67.useCallback)(
19535
19606
  (result) => {
19536
19607
  dispatchEvent("Dynamic Flow - Flow Finished", { result: "success" });
19537
19608
  onCompletion(result);
19538
19609
  },
19539
19610
  [onCompletion, dispatchEvent]
19540
19611
  );
19541
- (0, import_react66.useEffect)(() => {
19612
+ (0, import_react67.useEffect)(() => {
19542
19613
  dispatchEvent("Dynamic Flow - Flow Started", {});
19543
19614
  }, []);
19544
- (0, import_react66.useEffect)(() => {
19615
+ (0, import_react67.useEffect)(() => {
19545
19616
  if (!initialStep) {
19546
19617
  const action = __spreadValues({
19547
19618
  id: "#initial-step-request",
@@ -19663,7 +19734,7 @@ var DynamicFlowComponent = ({
19663
19734
  await performAction(action);
19664
19735
  }
19665
19736
  };
19666
- return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(LogProvider, { flowId, stepId: (step == null ? void 0 : step.id) || (step == null ? void 0 : step.key), onLog, children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(EventsContextProvider, { metadata: analyticsMetadata, onEvent, children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(DynamicFlowProvider, { loading: isLoading || isDebouncing, children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(HttpClientProvider, { httpClient, children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(FeatureContextProvider, { features, children: loader !== null ? loader : /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
19737
+ return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(LogProvider, { flowId, stepId: (step == null ? void 0 : step.id) || (step == null ? void 0 : step.key), onLog, children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(EventsContextProvider, { metadata: analyticsMetadata, onEvent, children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(DynamicFlowProvider, { loading: isLoading || isDebouncing, children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(HttpClientProvider, { httpClient, children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(FeatureContextProvider, { features, children: loader !== null ? loader : /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { id: (step == null ? void 0 : step.id) || (step == null ? void 0 : step.key), className: "dynamic-flow-legacy", children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
19667
19738
  DynamicFlowStep,
19668
19739
  {
19669
19740
  step,
@@ -19677,10 +19748,10 @@ var DynamicFlowComponent = ({
19677
19748
  },
19678
19749
  onModelChange
19679
19750
  }
19680
- ) }) }) }) }) });
19751
+ ) }) }) }) }) }) });
19681
19752
  };
19682
19753
  function DynamicFlow(props) {
19683
- return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(ErrorBoundary_default, { onError: props.onError, children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(DynamicFlowComponent, __spreadValues({}, props)) });
19754
+ return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(ErrorBoundary_default, { onError: props.onError, children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(DynamicFlowComponent, __spreadValues({}, props)) });
19684
19755
  }
19685
19756
  var DynamicFlow_default = DynamicFlow;
19686
19757
  var combineModels2 = (formModels) => Object.values(formModels).reduce((previous, model) => __spreadValues(__spreadValues({}, previous), model), {});
@@ -19697,19 +19768,19 @@ var shouldTriggerRefresh = (props) => {
19697
19768
  };
19698
19769
 
19699
19770
  // src/legacy/jsonSchemaForm/JsonSchemaForm.tsx
19700
- var import_jsx_runtime130 = require("react/jsx-runtime");
19771
+ var import_jsx_runtime131 = require("react/jsx-runtime");
19701
19772
  function JsonSchemaForm(props) {
19702
19773
  const schemaProps = __spreadValues({
19703
19774
  model: null,
19704
19775
  errors: null
19705
19776
  }, props);
19706
19777
  const { baseUrl = "", onEvent = noop8, onLog = noop8 } = props;
19707
- return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(LogProvider, { flowId: "JsonSchemaForm", stepId: "JsonSchemaForm", onLog, children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
19778
+ return /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(LogProvider, { flowId: "JsonSchemaForm", stepId: "JsonSchemaForm", onLog, children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
19708
19779
  EventsContextProvider,
19709
19780
  {
19710
19781
  metadata: { flowId: "JsonSchemaForm", stepId: "JsonSchemaForm" },
19711
19782
  onEvent,
19712
- children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(HttpClientProviderFromBaseUrl, { baseUrl, children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(GenericSchema_default, __spreadValues({}, schemaProps)) })
19783
+ children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(HttpClientProviderFromBaseUrl, { baseUrl, children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(GenericSchema_default, __spreadValues({}, schemaProps)) })
19713
19784
  }
19714
19785
  ) });
19715
19786
  }