@wise/dynamic-flow-client-internal 5.24.0-experimental-9265cac → 5.24.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
@@ -145,7 +145,7 @@ var import_dynamic_flow_client4 = require("@wise/dynamic-flow-client");
145
145
  // src/dynamicFlow/telemetry/app-version.ts
146
146
  var appVersion = (
147
147
  // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
148
- typeof process !== "undefined" ? "5.23.0" : "0.0.0"
148
+ typeof process !== "undefined" ? "5.24.0" : "0.0.0"
149
149
  );
150
150
 
151
151
  // src/dynamicFlow/context-menu/useContextMenu.tsx
@@ -209,7 +209,7 @@ var useDFContextMenu = (controller) => {
209
209
  if (!step) {
210
210
  return null;
211
211
  }
212
- const model = await controller.getSubmittableValue();
212
+ const model = controller.getValue();
213
213
  return recursivelyRemoveNullish(__spreadProps(__spreadValues({}, step), { model }));
214
214
  };
215
215
  const getEncodedCurrentStep = () => {
@@ -374,7 +374,7 @@ var AlertRenderer = {
374
374
  render: ({ context, markdown, margin, callToAction }) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
375
375
  import_components.Alert,
376
376
  {
377
- type: context,
377
+ type: mapAlertType(context),
378
378
  className: getMargin(margin),
379
379
  message: markdown,
380
380
  action: mapCtaToAlertAction(callToAction)
@@ -390,6 +390,7 @@ var mapCtaToAlertAction = (callToAction) => {
390
390
  }
391
391
  return void 0;
392
392
  };
393
+ var mapAlertType = (context) => context !== "proposition" ? context : "neutral";
393
394
  var AlertRenderer_default = AlertRenderer;
394
395
 
395
396
  // ../renderers/src/BoxRenderer.tsx
@@ -1122,1384 +1123,18 @@ var getInlineAlertOrValidation = (validationState, inlineAlert) => {
1122
1123
  };
1123
1124
  var CheckboxInputRenderer_default = CheckboxInputRenderer;
1124
1125
 
1125
- // ../renderers/src/CollectionRenderer/CollectionRenderer.tsx
1126
- var import_components19 = require("@transferwise/components");
1127
-
1128
- // ../../node_modules/.pnpm/@tanstack+react-virtual@3.13.24_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@tanstack/react-virtual/dist/esm/index.js
1129
- var React = __toESM(require("react"), 1);
1130
- var import_react_dom = require("react-dom");
1131
-
1132
- // ../../node_modules/.pnpm/@tanstack+virtual-core@3.14.0/node_modules/@tanstack/virtual-core/dist/esm/utils.js
1133
- function memo(getDeps, fn, opts) {
1134
- var _a;
1135
- let deps = (_a = opts.initialDeps) != null ? _a : [];
1136
- let result;
1137
- let isInitial = true;
1138
- function memoizedFunction() {
1139
- var _a2, _b, _c;
1140
- let depTime;
1141
- if (opts.key && ((_a2 = opts.debug) == null ? void 0 : _a2.call(opts))) depTime = Date.now();
1142
- const newDeps = getDeps();
1143
- const depsChanged = newDeps.length !== deps.length || newDeps.some((dep, index) => deps[index] !== dep);
1144
- if (!depsChanged) {
1145
- return result;
1146
- }
1147
- deps = newDeps;
1148
- let resultTime;
1149
- if (opts.key && ((_b = opts.debug) == null ? void 0 : _b.call(opts))) resultTime = Date.now();
1150
- result = fn(...newDeps);
1151
- if (opts.key && ((_c = opts.debug) == null ? void 0 : _c.call(opts))) {
1152
- const depEndTime = Math.round((Date.now() - depTime) * 100) / 100;
1153
- const resultEndTime = Math.round((Date.now() - resultTime) * 100) / 100;
1154
- const resultFpsPercentage = resultEndTime / 16;
1155
- const pad = (str, num) => {
1156
- str = String(str);
1157
- while (str.length < num) {
1158
- str = " " + str;
1159
- }
1160
- return str;
1161
- };
1162
- console.info(
1163
- `%c\u23F1 ${pad(resultEndTime, 5)} /${pad(depEndTime, 5)} ms`,
1164
- `
1165
- font-size: .6rem;
1166
- font-weight: bold;
1167
- color: hsl(${Math.max(
1168
- 0,
1169
- Math.min(120 - 120 * resultFpsPercentage, 120)
1170
- )}deg 100% 31%);`,
1171
- opts == null ? void 0 : opts.key
1172
- );
1173
- }
1174
- if ((opts == null ? void 0 : opts.onChange) && !(isInitial && opts.skipInitialOnChange)) {
1175
- opts.onChange(result);
1176
- }
1177
- isInitial = false;
1178
- return result;
1179
- }
1180
- memoizedFunction.updateDeps = (newDeps) => {
1181
- deps = newDeps;
1182
- };
1183
- return memoizedFunction;
1184
- }
1185
- function notUndefined(value, msg) {
1186
- if (value === void 0) {
1187
- throw new Error(`Unexpected undefined${msg ? `: ${msg}` : ""}`);
1188
- } else {
1189
- return value;
1190
- }
1191
- }
1192
- var approxEqual = (a, b) => Math.abs(a - b) < 1.01;
1193
- var debounce = (targetWindow, fn, ms) => {
1194
- let timeoutId;
1195
- return function(...args) {
1196
- targetWindow.clearTimeout(timeoutId);
1197
- timeoutId = targetWindow.setTimeout(() => fn.apply(this, args), ms);
1198
- };
1199
- };
1200
-
1201
- // ../../node_modules/.pnpm/@tanstack+virtual-core@3.14.0/node_modules/@tanstack/virtual-core/dist/esm/index.js
1202
- var defaultKeyExtractor = (index) => index;
1203
- var defaultRangeExtractor = (range) => {
1204
- const start = Math.max(range.startIndex - range.overscan, 0);
1205
- const end = Math.min(range.endIndex + range.overscan, range.count - 1);
1206
- const arr = [];
1207
- for (let i = start; i <= end; i++) {
1208
- arr.push(i);
1209
- }
1210
- return arr;
1211
- };
1212
- var addEventListenerOptions = {
1213
- passive: true
1214
- };
1215
- var observeWindowRect = (instance, cb) => {
1216
- const element = instance.scrollElement;
1217
- if (!element) {
1218
- return;
1219
- }
1220
- const handler = () => {
1221
- cb({ width: element.innerWidth, height: element.innerHeight });
1222
- };
1223
- handler();
1224
- element.addEventListener("resize", handler, addEventListenerOptions);
1225
- return () => {
1226
- element.removeEventListener("resize", handler);
1227
- };
1228
- };
1229
- var supportsScrollend = typeof window == "undefined" ? true : "onscrollend" in window;
1230
- var observeWindowOffset = (instance, cb) => {
1231
- const element = instance.scrollElement;
1232
- if (!element) {
1233
- return;
1234
- }
1235
- const targetWindow = instance.targetWindow;
1236
- if (!targetWindow) {
1237
- return;
1238
- }
1239
- let offset = 0;
1240
- const fallback = instance.options.useScrollendEvent && supportsScrollend ? () => void 0 : debounce(
1241
- targetWindow,
1242
- () => {
1243
- cb(offset, false);
1244
- },
1245
- instance.options.isScrollingResetDelay
1246
- );
1247
- const createHandler = (isScrolling) => () => {
1248
- offset = element[instance.options.horizontal ? "scrollX" : "scrollY"];
1249
- fallback();
1250
- cb(offset, isScrolling);
1251
- };
1252
- const handler = createHandler(true);
1253
- const endHandler = createHandler(false);
1254
- element.addEventListener("scroll", handler, addEventListenerOptions);
1255
- const registerScrollendEvent = instance.options.useScrollendEvent && supportsScrollend;
1256
- if (registerScrollendEvent) {
1257
- element.addEventListener("scrollend", endHandler, addEventListenerOptions);
1258
- }
1259
- return () => {
1260
- element.removeEventListener("scroll", handler);
1261
- if (registerScrollendEvent) {
1262
- element.removeEventListener("scrollend", endHandler);
1263
- }
1264
- };
1265
- };
1266
- var measureElement = (element, entry, instance) => {
1267
- if (entry == null ? void 0 : entry.borderBoxSize) {
1268
- const box = entry.borderBoxSize[0];
1269
- if (box) {
1270
- const size = Math.round(
1271
- box[instance.options.horizontal ? "inlineSize" : "blockSize"]
1272
- );
1273
- return size;
1274
- }
1275
- }
1276
- return element[instance.options.horizontal ? "offsetWidth" : "offsetHeight"];
1277
- };
1278
- var windowScroll = (offset, {
1279
- adjustments = 0,
1280
- behavior
1281
- }, instance) => {
1282
- var _a, _b;
1283
- const toOffset = offset + adjustments;
1284
- (_b = (_a = instance.scrollElement) == null ? void 0 : _a.scrollTo) == null ? void 0 : _b.call(_a, {
1285
- [instance.options.horizontal ? "left" : "top"]: toOffset,
1286
- behavior
1287
- });
1288
- };
1289
- var Virtualizer = class {
1290
- constructor(opts) {
1291
- this.unsubs = [];
1292
- this.scrollElement = null;
1293
- this.targetWindow = null;
1294
- this.isScrolling = false;
1295
- this.scrollState = null;
1296
- this.measurementsCache = [];
1297
- this.itemSizeCache = /* @__PURE__ */ new Map();
1298
- this.laneAssignments = /* @__PURE__ */ new Map();
1299
- this.pendingMeasuredCacheIndexes = [];
1300
- this.prevLanes = void 0;
1301
- this.lanesChangedFlag = false;
1302
- this.lanesSettling = false;
1303
- this.scrollRect = null;
1304
- this.scrollOffset = null;
1305
- this.scrollDirection = null;
1306
- this.scrollAdjustments = 0;
1307
- this.elementsCache = /* @__PURE__ */ new Map();
1308
- this.now = () => {
1309
- var _a2;
1310
- var _a, _b, _c;
1311
- return (_a2 = (_c = (_b = (_a = this.targetWindow) == null ? void 0 : _a.performance) == null ? void 0 : _b.now) == null ? void 0 : _c.call(_b)) != null ? _a2 : Date.now();
1312
- };
1313
- this.observer = /* @__PURE__ */ (() => {
1314
- let _ro = null;
1315
- const get = () => {
1316
- if (_ro) {
1317
- return _ro;
1318
- }
1319
- if (!this.targetWindow || !this.targetWindow.ResizeObserver) {
1320
- return null;
1321
- }
1322
- return _ro = new this.targetWindow.ResizeObserver((entries) => {
1323
- entries.forEach((entry) => {
1324
- const run = () => {
1325
- const node = entry.target;
1326
- const index = this.indexFromElement(node);
1327
- if (!node.isConnected) {
1328
- this.observer.unobserve(node);
1329
- return;
1330
- }
1331
- if (this.shouldMeasureDuringScroll(index)) {
1332
- this.resizeItem(
1333
- index,
1334
- this.options.measureElement(node, entry, this)
1335
- );
1336
- }
1337
- };
1338
- this.options.useAnimationFrameWithResizeObserver ? requestAnimationFrame(run) : run();
1339
- });
1340
- });
1341
- };
1342
- return {
1343
- disconnect: () => {
1344
- var _a;
1345
- (_a = get()) == null ? void 0 : _a.disconnect();
1346
- _ro = null;
1347
- },
1348
- observe: (target) => {
1349
- var _a;
1350
- return (_a = get()) == null ? void 0 : _a.observe(target, { box: "border-box" });
1351
- },
1352
- unobserve: (target) => {
1353
- var _a;
1354
- return (_a = get()) == null ? void 0 : _a.unobserve(target);
1355
- }
1356
- };
1357
- })();
1358
- this.range = null;
1359
- this.setOptions = (opts2) => {
1360
- Object.entries(opts2).forEach(([key, value]) => {
1361
- if (typeof value === "undefined") delete opts2[key];
1362
- });
1363
- this.options = __spreadValues({
1364
- debug: false,
1365
- initialOffset: 0,
1366
- overscan: 1,
1367
- paddingStart: 0,
1368
- paddingEnd: 0,
1369
- scrollPaddingStart: 0,
1370
- scrollPaddingEnd: 0,
1371
- horizontal: false,
1372
- getItemKey: defaultKeyExtractor,
1373
- rangeExtractor: defaultRangeExtractor,
1374
- onChange: () => {
1375
- },
1376
- measureElement,
1377
- initialRect: { width: 0, height: 0 },
1378
- scrollMargin: 0,
1379
- gap: 0,
1380
- indexAttribute: "data-index",
1381
- initialMeasurementsCache: [],
1382
- lanes: 1,
1383
- isScrollingResetDelay: 150,
1384
- enabled: true,
1385
- isRtl: false,
1386
- useScrollendEvent: false,
1387
- useAnimationFrameWithResizeObserver: false,
1388
- laneAssignmentMode: "estimate"
1389
- }, opts2);
1390
- };
1391
- this.notify = (sync) => {
1392
- var _a, _b;
1393
- (_b = (_a = this.options).onChange) == null ? void 0 : _b.call(_a, this, sync);
1394
- };
1395
- this.maybeNotify = memo(
1396
- () => {
1397
- this.calculateRange();
1398
- return [
1399
- this.isScrolling,
1400
- this.range ? this.range.startIndex : null,
1401
- this.range ? this.range.endIndex : null
1402
- ];
1403
- },
1404
- (isScrolling) => {
1405
- this.notify(isScrolling);
1406
- },
1407
- {
1408
- key: "maybeNotify",
1409
- debug: () => this.options.debug,
1410
- initialDeps: [
1411
- this.isScrolling,
1412
- this.range ? this.range.startIndex : null,
1413
- this.range ? this.range.endIndex : null
1414
- ]
1415
- }
1416
- );
1417
- this.cleanup = () => {
1418
- this.unsubs.filter(Boolean).forEach((d) => d());
1419
- this.unsubs = [];
1420
- this.observer.disconnect();
1421
- if (this.rafId != null && this.targetWindow) {
1422
- this.targetWindow.cancelAnimationFrame(this.rafId);
1423
- this.rafId = null;
1424
- }
1425
- this.scrollState = null;
1426
- this.scrollElement = null;
1427
- this.targetWindow = null;
1428
- };
1429
- this._didMount = () => {
1430
- return () => {
1431
- this.cleanup();
1432
- };
1433
- };
1434
- this._willUpdate = () => {
1435
- var _a2;
1436
- var _a;
1437
- const scrollElement = this.options.enabled ? this.options.getScrollElement() : null;
1438
- if (this.scrollElement !== scrollElement) {
1439
- this.cleanup();
1440
- if (!scrollElement) {
1441
- this.maybeNotify();
1442
- return;
1443
- }
1444
- this.scrollElement = scrollElement;
1445
- if (this.scrollElement && "ownerDocument" in this.scrollElement) {
1446
- this.targetWindow = this.scrollElement.ownerDocument.defaultView;
1447
- } else {
1448
- this.targetWindow = (_a2 = (_a = this.scrollElement) == null ? void 0 : _a.window) != null ? _a2 : null;
1449
- }
1450
- this.elementsCache.forEach((cached) => {
1451
- this.observer.observe(cached);
1452
- });
1453
- this.unsubs.push(
1454
- this.options.observeElementRect(this, (rect) => {
1455
- this.scrollRect = rect;
1456
- this.maybeNotify();
1457
- })
1458
- );
1459
- this.unsubs.push(
1460
- this.options.observeElementOffset(this, (offset, isScrolling) => {
1461
- this.scrollAdjustments = 0;
1462
- this.scrollDirection = isScrolling ? this.getScrollOffset() < offset ? "forward" : "backward" : null;
1463
- this.scrollOffset = offset;
1464
- this.isScrolling = isScrolling;
1465
- if (this.scrollState) {
1466
- this.scheduleScrollReconcile();
1467
- }
1468
- this.maybeNotify();
1469
- })
1470
- );
1471
- this._scrollToOffset(this.getScrollOffset(), {
1472
- adjustments: void 0,
1473
- behavior: void 0
1474
- });
1475
- }
1476
- };
1477
- this.rafId = null;
1478
- this.getSize = () => {
1479
- var _a;
1480
- if (!this.options.enabled) {
1481
- this.scrollRect = null;
1482
- return 0;
1483
- }
1484
- this.scrollRect = (_a = this.scrollRect) != null ? _a : this.options.initialRect;
1485
- return this.scrollRect[this.options.horizontal ? "width" : "height"];
1486
- };
1487
- this.getScrollOffset = () => {
1488
- var _a;
1489
- if (!this.options.enabled) {
1490
- this.scrollOffset = null;
1491
- return 0;
1492
- }
1493
- this.scrollOffset = (_a = this.scrollOffset) != null ? _a : typeof this.options.initialOffset === "function" ? this.options.initialOffset() : this.options.initialOffset;
1494
- return this.scrollOffset;
1495
- };
1496
- this.getFurthestMeasurement = (measurements, index) => {
1497
- const furthestMeasurementsFound = /* @__PURE__ */ new Map();
1498
- const furthestMeasurements = /* @__PURE__ */ new Map();
1499
- for (let m = index - 1; m >= 0; m--) {
1500
- const measurement = measurements[m];
1501
- if (furthestMeasurementsFound.has(measurement.lane)) {
1502
- continue;
1503
- }
1504
- const previousFurthestMeasurement = furthestMeasurements.get(
1505
- measurement.lane
1506
- );
1507
- if (previousFurthestMeasurement == null || measurement.end > previousFurthestMeasurement.end) {
1508
- furthestMeasurements.set(measurement.lane, measurement);
1509
- } else if (measurement.end < previousFurthestMeasurement.end) {
1510
- furthestMeasurementsFound.set(measurement.lane, true);
1511
- }
1512
- if (furthestMeasurementsFound.size === this.options.lanes) {
1513
- break;
1514
- }
1515
- }
1516
- return furthestMeasurements.size === this.options.lanes ? Array.from(furthestMeasurements.values()).sort((a, b) => {
1517
- if (a.end === b.end) {
1518
- return a.index - b.index;
1519
- }
1520
- return a.end - b.end;
1521
- })[0] : void 0;
1522
- };
1523
- this.getMeasurementOptions = memo(
1524
- () => [
1525
- this.options.count,
1526
- this.options.paddingStart,
1527
- this.options.scrollMargin,
1528
- this.options.getItemKey,
1529
- this.options.enabled,
1530
- this.options.lanes,
1531
- this.options.laneAssignmentMode
1532
- ],
1533
- (count, paddingStart, scrollMargin, getItemKey, enabled, lanes, laneAssignmentMode) => {
1534
- const lanesChanged = this.prevLanes !== void 0 && this.prevLanes !== lanes;
1535
- if (lanesChanged) {
1536
- this.lanesChangedFlag = true;
1537
- }
1538
- this.prevLanes = lanes;
1539
- this.pendingMeasuredCacheIndexes = [];
1540
- return {
1541
- count,
1542
- paddingStart,
1543
- scrollMargin,
1544
- getItemKey,
1545
- enabled,
1546
- lanes,
1547
- laneAssignmentMode
1548
- };
1549
- },
1550
- {
1551
- key: false
1552
- }
1553
- );
1554
- this.getMeasurements = memo(
1555
- () => [this.getMeasurementOptions(), this.itemSizeCache],
1556
- ({
1557
- count,
1558
- paddingStart,
1559
- scrollMargin,
1560
- getItemKey,
1561
- enabled,
1562
- lanes,
1563
- laneAssignmentMode
1564
- }, itemSizeCache) => {
1565
- if (!enabled) {
1566
- this.measurementsCache = [];
1567
- this.itemSizeCache.clear();
1568
- this.laneAssignments.clear();
1569
- return [];
1570
- }
1571
- if (this.laneAssignments.size > count) {
1572
- for (const index of this.laneAssignments.keys()) {
1573
- if (index >= count) {
1574
- this.laneAssignments.delete(index);
1575
- }
1576
- }
1577
- }
1578
- if (this.lanesChangedFlag) {
1579
- this.lanesChangedFlag = false;
1580
- this.lanesSettling = true;
1581
- this.measurementsCache = [];
1582
- this.itemSizeCache.clear();
1583
- this.laneAssignments.clear();
1584
- this.pendingMeasuredCacheIndexes = [];
1585
- }
1586
- if (this.measurementsCache.length === 0 && !this.lanesSettling) {
1587
- this.measurementsCache = this.options.initialMeasurementsCache;
1588
- this.measurementsCache.forEach((item) => {
1589
- this.itemSizeCache.set(item.key, item.size);
1590
- });
1591
- }
1592
- const min = this.lanesSettling ? 0 : this.pendingMeasuredCacheIndexes.length > 0 ? Math.min(...this.pendingMeasuredCacheIndexes) : 0;
1593
- this.pendingMeasuredCacheIndexes = [];
1594
- if (this.lanesSettling && this.measurementsCache.length === count) {
1595
- this.lanesSettling = false;
1596
- }
1597
- const measurements = this.measurementsCache.slice(0, min);
1598
- const laneLastIndex = new Array(lanes).fill(
1599
- void 0
1600
- );
1601
- for (let m = 0; m < min; m++) {
1602
- const item = measurements[m];
1603
- if (item) {
1604
- laneLastIndex[item.lane] = m;
1605
- }
1606
- }
1607
- for (let i = min; i < count; i++) {
1608
- const key = getItemKey(i);
1609
- const cachedLane = this.laneAssignments.get(i);
1610
- let lane;
1611
- let start;
1612
- const shouldCacheLane = laneAssignmentMode === "estimate" || itemSizeCache.has(key);
1613
- if (cachedLane !== void 0 && this.options.lanes > 1) {
1614
- lane = cachedLane;
1615
- const prevIndex = laneLastIndex[lane];
1616
- const prevInLane = prevIndex !== void 0 ? measurements[prevIndex] : void 0;
1617
- start = prevInLane ? prevInLane.end + this.options.gap : paddingStart + scrollMargin;
1618
- } else {
1619
- const furthestMeasurement = this.options.lanes === 1 ? measurements[i - 1] : this.getFurthestMeasurement(measurements, i);
1620
- start = furthestMeasurement ? furthestMeasurement.end + this.options.gap : paddingStart + scrollMargin;
1621
- lane = furthestMeasurement ? furthestMeasurement.lane : i % this.options.lanes;
1622
- if (this.options.lanes > 1 && shouldCacheLane) {
1623
- this.laneAssignments.set(i, lane);
1624
- }
1625
- }
1626
- const measuredSize = itemSizeCache.get(key);
1627
- const size = typeof measuredSize === "number" ? measuredSize : this.options.estimateSize(i);
1628
- const end = start + size;
1629
- measurements[i] = {
1630
- index: i,
1631
- start,
1632
- size,
1633
- end,
1634
- key,
1635
- lane
1636
- };
1637
- laneLastIndex[lane] = i;
1638
- }
1639
- this.measurementsCache = measurements;
1640
- return measurements;
1641
- },
1642
- {
1643
- key: "getMeasurements",
1644
- debug: () => this.options.debug
1645
- }
1646
- );
1647
- this.calculateRange = memo(
1648
- () => [
1649
- this.getMeasurements(),
1650
- this.getSize(),
1651
- this.getScrollOffset(),
1652
- this.options.lanes
1653
- ],
1654
- (measurements, outerSize, scrollOffset, lanes) => {
1655
- return this.range = measurements.length > 0 && outerSize > 0 ? calculateRange({
1656
- measurements,
1657
- outerSize,
1658
- scrollOffset,
1659
- lanes
1660
- }) : null;
1661
- },
1662
- {
1663
- key: "calculateRange",
1664
- debug: () => this.options.debug
1665
- }
1666
- );
1667
- this.getVirtualIndexes = memo(
1668
- () => {
1669
- let startIndex = null;
1670
- let endIndex = null;
1671
- const range = this.calculateRange();
1672
- if (range) {
1673
- startIndex = range.startIndex;
1674
- endIndex = range.endIndex;
1675
- }
1676
- this.maybeNotify.updateDeps([this.isScrolling, startIndex, endIndex]);
1677
- return [
1678
- this.options.rangeExtractor,
1679
- this.options.overscan,
1680
- this.options.count,
1681
- startIndex,
1682
- endIndex
1683
- ];
1684
- },
1685
- (rangeExtractor, overscan, count, startIndex, endIndex) => {
1686
- return startIndex === null || endIndex === null ? [] : rangeExtractor({
1687
- startIndex,
1688
- endIndex,
1689
- overscan,
1690
- count
1691
- });
1692
- },
1693
- {
1694
- key: "getVirtualIndexes",
1695
- debug: () => this.options.debug
1696
- }
1697
- );
1698
- this.indexFromElement = (node) => {
1699
- const attributeName = this.options.indexAttribute;
1700
- const indexStr = node.getAttribute(attributeName);
1701
- if (!indexStr) {
1702
- console.warn(
1703
- `Missing attribute name '${attributeName}={index}' on measured element.`
1704
- );
1705
- return -1;
1706
- }
1707
- return parseInt(indexStr, 10);
1708
- };
1709
- this.shouldMeasureDuringScroll = (index) => {
1710
- var _a2;
1711
- var _a;
1712
- if (!this.scrollState || this.scrollState.behavior !== "smooth") {
1713
- return true;
1714
- }
1715
- const scrollIndex = (_a2 = this.scrollState.index) != null ? _a2 : (_a = this.getVirtualItemForOffset(this.scrollState.lastTargetOffset)) == null ? void 0 : _a.index;
1716
- if (scrollIndex !== void 0 && this.range) {
1717
- const bufferSize = Math.max(
1718
- this.options.overscan,
1719
- Math.ceil((this.range.endIndex - this.range.startIndex) / 2)
1720
- );
1721
- const minIndex = Math.max(0, scrollIndex - bufferSize);
1722
- const maxIndex = Math.min(
1723
- this.options.count - 1,
1724
- scrollIndex + bufferSize
1725
- );
1726
- return index >= minIndex && index <= maxIndex;
1727
- }
1728
- return true;
1729
- };
1730
- this.measureElement = (node) => {
1731
- if (!node) {
1732
- this.elementsCache.forEach((cached, key2) => {
1733
- if (!cached.isConnected) {
1734
- this.observer.unobserve(cached);
1735
- this.elementsCache.delete(key2);
1736
- }
1737
- });
1738
- return;
1739
- }
1740
- const index = this.indexFromElement(node);
1741
- const key = this.options.getItemKey(index);
1742
- const prevNode = this.elementsCache.get(key);
1743
- if (prevNode !== node) {
1744
- if (prevNode) {
1745
- this.observer.unobserve(prevNode);
1746
- }
1747
- this.observer.observe(node);
1748
- this.elementsCache.set(key, node);
1749
- }
1750
- if ((!this.isScrolling || this.scrollState) && this.shouldMeasureDuringScroll(index)) {
1751
- this.resizeItem(index, this.options.measureElement(node, void 0, this));
1752
- }
1753
- };
1754
- this.resizeItem = (index, size) => {
1755
- var _a2;
1756
- var _a;
1757
- const item = this.measurementsCache[index];
1758
- if (!item) return;
1759
- const itemSize = (_a2 = this.itemSizeCache.get(item.key)) != null ? _a2 : item.size;
1760
- const delta = size - itemSize;
1761
- if (delta !== 0) {
1762
- if (((_a = this.scrollState) == null ? void 0 : _a.behavior) !== "smooth" && (this.shouldAdjustScrollPositionOnItemSizeChange !== void 0 ? this.shouldAdjustScrollPositionOnItemSizeChange(item, delta, this) : item.start < this.getScrollOffset() + this.scrollAdjustments)) {
1763
- if (this.options.debug) {
1764
- console.info("correction", delta);
1765
- }
1766
- this._scrollToOffset(this.getScrollOffset(), {
1767
- adjustments: this.scrollAdjustments += delta,
1768
- behavior: void 0
1769
- });
1770
- }
1771
- this.pendingMeasuredCacheIndexes.push(item.index);
1772
- this.itemSizeCache = new Map(this.itemSizeCache.set(item.key, size));
1773
- this.notify(false);
1774
- }
1775
- };
1776
- this.getVirtualItems = memo(
1777
- () => [this.getVirtualIndexes(), this.getMeasurements()],
1778
- (indexes, measurements) => {
1779
- const virtualItems = [];
1780
- for (let k = 0, len = indexes.length; k < len; k++) {
1781
- const i = indexes[k];
1782
- const measurement = measurements[i];
1783
- virtualItems.push(measurement);
1784
- }
1785
- return virtualItems;
1786
- },
1787
- {
1788
- key: "getVirtualItems",
1789
- debug: () => this.options.debug
1790
- }
1791
- );
1792
- this.getVirtualItemForOffset = (offset) => {
1793
- const measurements = this.getMeasurements();
1794
- if (measurements.length === 0) {
1795
- return void 0;
1796
- }
1797
- return notUndefined(
1798
- measurements[findNearestBinarySearch(
1799
- 0,
1800
- measurements.length - 1,
1801
- (index) => notUndefined(measurements[index]).start,
1802
- offset
1803
- )]
1804
- );
1805
- };
1806
- this.getMaxScrollOffset = () => {
1807
- if (!this.scrollElement) return 0;
1808
- if ("scrollHeight" in this.scrollElement) {
1809
- return this.options.horizontal ? this.scrollElement.scrollWidth - this.scrollElement.clientWidth : this.scrollElement.scrollHeight - this.scrollElement.clientHeight;
1810
- } else {
1811
- const doc = this.scrollElement.document.documentElement;
1812
- return this.options.horizontal ? doc.scrollWidth - this.scrollElement.innerWidth : doc.scrollHeight - this.scrollElement.innerHeight;
1813
- }
1814
- };
1815
- this.getOffsetForAlignment = (toOffset, align, itemSize = 0) => {
1816
- if (!this.scrollElement) return 0;
1817
- const size = this.getSize();
1818
- const scrollOffset = this.getScrollOffset();
1819
- if (align === "auto") {
1820
- align = toOffset >= scrollOffset + size ? "end" : "start";
1821
- }
1822
- if (align === "center") {
1823
- toOffset += (itemSize - size) / 2;
1824
- } else if (align === "end") {
1825
- toOffset -= size;
1826
- }
1827
- const maxOffset = this.getMaxScrollOffset();
1828
- return Math.max(Math.min(maxOffset, toOffset), 0);
1829
- };
1830
- this.getOffsetForIndex = (index, align = "auto") => {
1831
- index = Math.max(0, Math.min(index, this.options.count - 1));
1832
- const size = this.getSize();
1833
- const scrollOffset = this.getScrollOffset();
1834
- const item = this.measurementsCache[index];
1835
- if (!item) return;
1836
- if (align === "auto") {
1837
- if (item.end >= scrollOffset + size - this.options.scrollPaddingEnd) {
1838
- align = "end";
1839
- } else if (item.start <= scrollOffset + this.options.scrollPaddingStart) {
1840
- align = "start";
1841
- } else {
1842
- return [scrollOffset, align];
1843
- }
1844
- }
1845
- if (align === "end" && index === this.options.count - 1) {
1846
- return [this.getMaxScrollOffset(), align];
1847
- }
1848
- const toOffset = align === "end" ? item.end + this.options.scrollPaddingEnd : item.start - this.options.scrollPaddingStart;
1849
- return [
1850
- this.getOffsetForAlignment(toOffset, align, item.size),
1851
- align
1852
- ];
1853
- };
1854
- this.scrollToOffset = (toOffset, { align = "start", behavior = "auto" } = {}) => {
1855
- const offset = this.getOffsetForAlignment(toOffset, align);
1856
- const now = this.now();
1857
- this.scrollState = {
1858
- index: null,
1859
- align,
1860
- behavior,
1861
- startedAt: now,
1862
- lastTargetOffset: offset,
1863
- stableFrames: 0
1864
- };
1865
- this._scrollToOffset(offset, { adjustments: void 0, behavior });
1866
- this.scheduleScrollReconcile();
1867
- };
1868
- this.scrollToIndex = (index, {
1869
- align: initialAlign = "auto",
1870
- behavior = "auto"
1871
- } = {}) => {
1872
- index = Math.max(0, Math.min(index, this.options.count - 1));
1873
- const offsetInfo = this.getOffsetForIndex(index, initialAlign);
1874
- if (!offsetInfo) {
1875
- return;
1876
- }
1877
- const [offset, align] = offsetInfo;
1878
- const now = this.now();
1879
- this.scrollState = {
1880
- index,
1881
- align,
1882
- behavior,
1883
- startedAt: now,
1884
- lastTargetOffset: offset,
1885
- stableFrames: 0
1886
- };
1887
- this._scrollToOffset(offset, { adjustments: void 0, behavior });
1888
- this.scheduleScrollReconcile();
1889
- };
1890
- this.scrollBy = (delta, { behavior = "auto" } = {}) => {
1891
- const offset = this.getScrollOffset() + delta;
1892
- const now = this.now();
1893
- this.scrollState = {
1894
- index: null,
1895
- align: "start",
1896
- behavior,
1897
- startedAt: now,
1898
- lastTargetOffset: offset,
1899
- stableFrames: 0
1900
- };
1901
- this._scrollToOffset(offset, { adjustments: void 0, behavior });
1902
- this.scheduleScrollReconcile();
1903
- };
1904
- this.getTotalSize = () => {
1905
- var _a2;
1906
- var _a;
1907
- const measurements = this.getMeasurements();
1908
- let end;
1909
- if (measurements.length === 0) {
1910
- end = this.options.paddingStart;
1911
- } else if (this.options.lanes === 1) {
1912
- end = (_a2 = (_a = measurements[measurements.length - 1]) == null ? void 0 : _a.end) != null ? _a2 : 0;
1913
- } else {
1914
- const endByLane = Array(this.options.lanes).fill(null);
1915
- let endIndex = measurements.length - 1;
1916
- while (endIndex >= 0 && endByLane.some((val) => val === null)) {
1917
- const item = measurements[endIndex];
1918
- if (endByLane[item.lane] === null) {
1919
- endByLane[item.lane] = item.end;
1920
- }
1921
- endIndex--;
1922
- }
1923
- end = Math.max(...endByLane.filter((val) => val !== null));
1924
- }
1925
- return Math.max(
1926
- end - this.options.scrollMargin + this.options.paddingEnd,
1927
- 0
1928
- );
1929
- };
1930
- this._scrollToOffset = (offset, {
1931
- adjustments,
1932
- behavior
1933
- }) => {
1934
- this.options.scrollToFn(offset, { behavior, adjustments }, this);
1935
- };
1936
- this.measure = () => {
1937
- this.itemSizeCache = /* @__PURE__ */ new Map();
1938
- this.laneAssignments = /* @__PURE__ */ new Map();
1939
- this.notify(false);
1940
- };
1941
- this.setOptions(opts);
1942
- }
1943
- scheduleScrollReconcile() {
1944
- if (!this.targetWindow) {
1945
- this.scrollState = null;
1946
- return;
1947
- }
1948
- if (this.rafId != null) return;
1949
- this.rafId = this.targetWindow.requestAnimationFrame(() => {
1950
- this.rafId = null;
1951
- this.reconcileScroll();
1952
- });
1953
- }
1954
- reconcileScroll() {
1955
- if (!this.scrollState) return;
1956
- const el = this.scrollElement;
1957
- if (!el) return;
1958
- const MAX_RECONCILE_MS = 5e3;
1959
- if (this.now() - this.scrollState.startedAt > MAX_RECONCILE_MS) {
1960
- this.scrollState = null;
1961
- return;
1962
- }
1963
- const offsetInfo = this.scrollState.index != null ? this.getOffsetForIndex(this.scrollState.index, this.scrollState.align) : void 0;
1964
- const targetOffset = offsetInfo ? offsetInfo[0] : this.scrollState.lastTargetOffset;
1965
- const STABLE_FRAMES = 1;
1966
- const targetChanged = targetOffset !== this.scrollState.lastTargetOffset;
1967
- if (!targetChanged && approxEqual(targetOffset, this.getScrollOffset())) {
1968
- this.scrollState.stableFrames++;
1969
- if (this.scrollState.stableFrames >= STABLE_FRAMES) {
1970
- this.scrollState = null;
1971
- return;
1972
- }
1973
- } else {
1974
- this.scrollState.stableFrames = 0;
1975
- if (targetChanged) {
1976
- this.scrollState.lastTargetOffset = targetOffset;
1977
- this.scrollState.behavior = "auto";
1978
- this._scrollToOffset(targetOffset, {
1979
- adjustments: void 0,
1980
- behavior: "auto"
1981
- });
1982
- }
1983
- }
1984
- this.scheduleScrollReconcile();
1985
- }
1986
- };
1987
- var findNearestBinarySearch = (low, high, getCurrentValue, value) => {
1988
- while (low <= high) {
1989
- const middle = (low + high) / 2 | 0;
1990
- const currentValue = getCurrentValue(middle);
1991
- if (currentValue < value) {
1992
- low = middle + 1;
1993
- } else if (currentValue > value) {
1994
- high = middle - 1;
1995
- } else {
1996
- return middle;
1997
- }
1998
- }
1999
- if (low > 0) {
2000
- return low - 1;
2001
- } else {
2002
- return 0;
2003
- }
2004
- };
2005
- function calculateRange({
2006
- measurements,
2007
- outerSize,
2008
- scrollOffset,
2009
- lanes
2010
- }) {
2011
- const lastIndex = measurements.length - 1;
2012
- const getOffset = (index) => measurements[index].start;
2013
- if (measurements.length <= lanes) {
2014
- return {
2015
- startIndex: 0,
2016
- endIndex: lastIndex
2017
- };
2018
- }
2019
- let startIndex = findNearestBinarySearch(
2020
- 0,
2021
- lastIndex,
2022
- getOffset,
2023
- scrollOffset
2024
- );
2025
- let endIndex = startIndex;
2026
- if (lanes === 1) {
2027
- while (endIndex < lastIndex && measurements[endIndex].end < scrollOffset + outerSize) {
2028
- endIndex++;
2029
- }
2030
- } else if (lanes > 1) {
2031
- const endPerLane = Array(lanes).fill(0);
2032
- while (endIndex < lastIndex && endPerLane.some((pos) => pos < scrollOffset + outerSize)) {
2033
- const item = measurements[endIndex];
2034
- endPerLane[item.lane] = item.end;
2035
- endIndex++;
2036
- }
2037
- const startPerLane = Array(lanes).fill(scrollOffset + outerSize);
2038
- while (startIndex >= 0 && startPerLane.some((pos) => pos >= scrollOffset)) {
2039
- const item = measurements[startIndex];
2040
- startPerLane[item.lane] = item.start;
2041
- startIndex--;
2042
- }
2043
- startIndex = Math.max(0, startIndex - startIndex % lanes);
2044
- endIndex = Math.min(lastIndex, endIndex + (lanes - 1 - endIndex % lanes));
2045
- }
2046
- return { startIndex, endIndex };
2047
- }
2048
-
2049
- // ../../node_modules/.pnpm/@tanstack+react-virtual@3.13.24_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@tanstack/react-virtual/dist/esm/index.js
2050
- var useIsomorphicLayoutEffect = typeof document !== "undefined" ? React.useLayoutEffect : React.useEffect;
2051
- function useVirtualizerBase(_a) {
2052
- var _b = _a, {
2053
- useFlushSync = true
2054
- } = _b, options = __objRest(_b, [
2055
- "useFlushSync"
2056
- ]);
2057
- const rerender = React.useReducer(() => ({}), {})[1];
2058
- const resolvedOptions = __spreadProps(__spreadValues({}, options), {
2059
- onChange: (instance2, sync) => {
2060
- var _a2;
2061
- if (useFlushSync && sync) {
2062
- (0, import_react_dom.flushSync)(rerender);
2063
- } else {
2064
- rerender();
2065
- }
2066
- (_a2 = options.onChange) == null ? void 0 : _a2.call(options, instance2, sync);
2067
- }
2068
- });
2069
- const [instance] = React.useState(
2070
- () => new Virtualizer(resolvedOptions)
2071
- );
2072
- instance.setOptions(resolvedOptions);
2073
- useIsomorphicLayoutEffect(() => {
2074
- return instance._didMount();
2075
- }, []);
2076
- useIsomorphicLayoutEffect(() => {
2077
- return instance._willUpdate();
2078
- });
2079
- return instance;
2080
- }
2081
- function useWindowVirtualizer(options) {
2082
- return useVirtualizerBase(__spreadValues({
2083
- getScrollElement: () => typeof document !== "undefined" ? window : null,
2084
- observeElementRect: observeWindowRect,
2085
- observeElementOffset: observeWindowOffset,
2086
- scrollToFn: windowScroll,
2087
- initialOffset: () => typeof document !== "undefined" ? window.scrollY : 0
2088
- }, options));
2089
- }
2090
-
2091
- // ../renderers/src/CollectionRenderer/components/ContentComponent.tsx
2092
- var import_components13 = require("@transferwise/components");
2093
- var import_react6 = require("react");
2094
-
2095
- // ../renderers/src/step/StepFooter.tsx
2096
- var import_components12 = require("@transferwise/components");
2097
- var import_react5 = require("react");
2098
- var import_react_intl6 = require("react-intl");
2099
-
2100
- // ../renderers/src/messages/step.messages.ts
2101
- var import_react_intl5 = require("react-intl");
2102
- var step_messages_default = (0, import_react_intl5.defineMessages)({
2103
- scrollToBottom: {
2104
- id: "df.wise.step.scrollToBottom",
2105
- defaultMessage: "Scroll to bottom",
2106
- description: "Label for a button that appears when the content of a step is too long and the user needs to scroll to the bottom to see all the content."
2107
- }
2108
- });
2109
-
2110
- // ../renderers/src/step/StepFooter.tsx
2111
- var import_jsx_runtime24 = require("react/jsx-runtime");
2112
- var SCROLL_TO_BOTTOM = "scroll-to-bottom";
2113
- var StepFooter = ({ footer, tags }) => {
2114
- if (tags == null ? void 0 : tags.includes(SCROLL_TO_BOTTOM)) {
2115
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(FooterWithScrollButton, { footer });
2116
- }
2117
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(DefaultFooter, { footer });
2118
- };
2119
- var DefaultFooter = ({ footer }) => {
2120
- const hasFooter = footer && Array.isArray(footer) && footer.length > 0;
2121
- return hasFooter ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "df-step-fixed__footer", children: footer }) : void 0;
2122
- };
2123
- var FooterWithScrollButton = ({ footer }) => {
2124
- const { formatMessage } = (0, import_react_intl6.useIntl)();
2125
- const endOfLayoutRef = (0, import_react5.useRef)(null);
2126
- const isElementVisible = useIsElementVisible(endOfLayoutRef);
2127
- const scrollButton = /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2128
- import_components12.Button,
2129
- {
2130
- className: "m-b-1",
2131
- v2: true,
2132
- block: true,
2133
- priority: "tertiary",
2134
- onClick: () => {
2135
- var _a;
2136
- (_a = endOfLayoutRef.current) == null ? void 0 : _a.scrollIntoView({ behavior: "smooth" });
2137
- },
2138
- children: formatMessage(step_messages_default.scrollToBottom)
2139
- }
2140
- );
2141
- const hasStepFooterContent = footer && Array.isArray(footer) && footer.length > 0;
2142
- if (isElementVisible && !hasStepFooterContent) {
2143
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { ref: endOfLayoutRef, "aria-hidden": "true" });
2144
- }
2145
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
2146
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { ref: endOfLayoutRef, "aria-hidden": "true" }),
2147
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "df-step-fixed__footer", children: [
2148
- !isElementVisible && scrollButton,
2149
- footer
2150
- ] })
2151
- ] });
2152
- };
2153
- var useIsElementVisible = (elementRef) => {
2154
- const [isVisible, setIsVisible] = (0, import_react5.useState)(false);
2155
- (0, import_react5.useEffect)(() => {
2156
- const element = elementRef.current;
2157
- if (!element) return;
2158
- const observer = new IntersectionObserver(([entry]) => {
2159
- setIsVisible(entry.isIntersecting);
2160
- });
2161
- observer.observe(element);
2162
- return () => observer.disconnect();
2163
- }, [elementRef]);
2164
- return isVisible;
2165
- };
2166
-
2167
- // ../renderers/src/CollectionRenderer/components/ContentComponent.tsx
2168
- var import_jsx_runtime25 = require("react/jsx-runtime");
2169
- var ContentComponent = (props) => {
2170
- const { state, status, SectionHeader, Item } = props;
2171
- const endOfContentRef = (0, import_react6.useRef)(null);
2172
- const isBottomVisible = useIsElementVisible(endOfContentRef);
2173
- (0, import_react6.useEffect)(() => {
2174
- var _a;
2175
- console.log("bottom visible", status);
2176
- if (isBottomVisible && status.type === "idle" && status.loadMore) {
2177
- (_a = status.loadMore) == null ? void 0 : _a.call(status);
2178
- }
2179
- }, [isBottomVisible]);
2180
- const stateCount = state.sections.reduce(
2181
- (total, section) => section.items.length + total + (section.title ? 1 : 0),
2182
- 0
2183
- );
2184
- const items = (0, import_react6.useMemo)(() => {
2185
- return state.sections.reduce((acc, section) => {
2186
- return [
2187
- ...acc,
2188
- ...section.title ? [
2189
- {
2190
- type: "header",
2191
- title: section.title,
2192
- items: section.items,
2193
- id: section.id
2194
- }
2195
- ] : [],
2196
- ...section.items.map((item) => ({
2197
- item,
2198
- type: "item"
2199
- }))
2200
- ];
2201
- }, []);
2202
- }, [stateCount]);
2203
- const listRef = (0, import_react6.useRef)(null);
2204
- const listOffsetRef = (0, import_react6.useRef)(0);
2205
- (0, import_react6.useLayoutEffect)(() => {
2206
- var _a, _b;
2207
- listOffsetRef.current = (_b = (_a = listRef.current) == null ? void 0 : _a.offsetTop) != null ? _b : 0;
2208
- });
2209
- const virtualizer = useWindowVirtualizer({
2210
- count: stateCount,
2211
- estimateSize: () => 120,
2212
- // todo, we could be clever here. Is it worth it?
2213
- overscan: 10,
2214
- scrollMargin: listOffsetRef.current
2215
- });
2216
- const showState = status.type === "idle" || status.reason === "pagination";
2217
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { ref: listRef, children: [
2218
- showState && state.beforeSections,
2219
- showState && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2220
- "div",
2221
- {
2222
- style: {
2223
- height: `${virtualizer.getTotalSize()}px`,
2224
- width: "100%",
2225
- position: "relative"
2226
- },
2227
- children: virtualizer.getVirtualItems().map((item) => {
2228
- const i = items[item.index];
2229
- if (!i) {
2230
- return null;
2231
- }
2232
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2233
- "div",
2234
- {
2235
- ref: virtualizer.measureElement,
2236
- "data-index": item.index,
2237
- style: {
2238
- position: "absolute",
2239
- top: 0,
2240
- left: 0,
2241
- width: "100%",
2242
- transform: `translateY(${item.start - virtualizer.options.scrollMargin}px)`
2243
- },
2244
- children: i.type === "header" ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(SectionHeader, __spreadValues({}, i)) : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Item, __spreadValues({}, i.item))
2245
- },
2246
- item.key
2247
- );
2248
- })
2249
- }
2250
- ),
2251
- /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { ref: endOfContentRef, className: "d-flex m-x-auto m-y-2", children: [
2252
- status.type === "idle" && status.loadMore || status.type === "loading" ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_components13.ProcessIndicator, { size: "xs" }) : null,
2253
- status.type === "error" && status.reason === "pagination" ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "d-flex m-x-auto", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_components13.Button, { v2: true, size: "sm", priority: "secondary-neutral", onClick: status.retry, children: "Load more" }) }) : null
2254
- ] }),
2255
- showState && state.afterSections
2256
- ] });
2257
- };
2258
-
2259
- // ../renderers/src/CollectionRenderer/components/SearchComponent.tsx
2260
- var import_components14 = require("@transferwise/components");
2261
- var import_icons = require("@transferwise/icons");
2262
- var import_jsx_runtime26 = require("react/jsx-runtime");
2263
- var SearchComponent = ({ state, features }) => {
2264
- const { search } = state;
2265
- if (!search) {
2266
- return;
2267
- }
2268
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2269
- FieldInput_default,
2270
- {
2271
- id: "search",
2272
- description: "",
2273
- validation: void 0,
2274
- help: "",
2275
- label: search.title,
2276
- features,
2277
- children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_components14.InputGroup, { addonStart: { content: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_icons.Search, { size: 24 }) }, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2278
- import_components14.Input,
2279
- {
2280
- id: "search",
2281
- name: "search",
2282
- shape: "pill",
2283
- placeholder: search.hint,
2284
- type: "text",
2285
- value: search.query,
2286
- onChange: ({ currentTarget: { value } }) => {
2287
- search.onChange(value);
2288
- }
2289
- }
2290
- ) })
2291
- }
2292
- );
2293
- };
2294
-
2295
- // ../renderers/src/CollectionRenderer/components/FilterComponent.tsx
2296
- var import_components15 = require("@transferwise/components");
2297
- var import_jsx_runtime27 = require("react/jsx-runtime");
2298
- var FiltersComponent = ({ state }) => {
2299
- const { filters } = state;
2300
- return filters.map((filter) => {
2301
- var _a;
2302
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(FilterComponent, __spreadValues({}, filter), JSON.stringify((_a = filter.options) == null ? void 0 : _a.map((o) => o.value)));
2303
- });
2304
- };
2305
- var FilterComponent = (filter) => {
2306
- const { multiSelect, options } = filter;
2307
- if (!options) {
2308
- return null;
2309
- }
2310
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2311
- import_components15.Chips,
2312
- {
2313
- className: "m-b-1",
2314
- multiple: multiSelect,
2315
- selected: options.some((option) => option.selected) ? options.filter((option) => option.selected).map((option) => option.value) : multiSelect ? [] : "",
2316
- chips: [
2317
- ...options.map((option) => ({
2318
- value: option.value,
2319
- label: option.title
2320
- }))
2321
- ],
2322
- onChange: (value) => {
2323
- var _a;
2324
- if (value.selectedValue === "") {
2325
- options == null ? void 0 : options.filter((option) => option.selected).map((option) => option == null ? void 0 : option.onSelect());
2326
- return;
2327
- }
2328
- (_a = options == null ? void 0 : options.find((option) => value.selectedValue === option.value)) == null ? void 0 : _a.onSelect();
2329
- }
2330
- },
2331
- JSON.stringify(options)
2332
- );
2333
- };
2334
-
2335
- // ../renderers/src/CollectionRenderer/components/ItemComponent.tsx
2336
- var import_components18 = require("@transferwise/components");
2337
-
2338
- // ../renderers/src/utils/listItem/getAdditionalInfo.tsx
2339
- var import_components16 = require("@transferwise/components");
2340
- var import_jsx_runtime28 = require("react/jsx-runtime");
2341
- var getAdditionalInfo = (additionalInfo) => {
2342
- var _a, _b;
2343
- if (!additionalInfo) {
2344
- return void 0;
2345
- }
2346
- const { href, text, onClick } = additionalInfo;
2347
- if (href || onClick) {
2348
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2349
- import_components16.ListItem.AdditionalInfo,
2350
- {
2351
- action: __spreadValues({
2352
- label: text
2353
- }, (_b = (_a = additionalInfo.getAnchorProps) == null ? void 0 : _a.call(additionalInfo)) != null ? _b : { onClick })
2354
- }
2355
- );
2356
- }
2357
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_components16.ListItem.AdditionalInfo, { children: additionalInfo == null ? void 0 : additionalInfo.text });
2358
- };
2359
-
2360
- // ../renderers/src/utils/listItem/getCTAControl.tsx
2361
- var import_components17 = require("@transferwise/components");
2362
- var import_jsx_runtime29 = require("react/jsx-runtime");
2363
- var getCTAControl = (callToAction, { ctaSecondary, fullyInteractive }) => {
2364
- if (!callToAction) {
2365
- return void 0;
2366
- }
2367
- const { accessibilityDescription, title, context } = callToAction;
2368
- const { priority, sentiment } = getPriorityAndSentiment(ctaSecondary, context);
2369
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2370
- import_components17.ListItem.Button,
2371
- __spreadProps(__spreadValues({}, callToAction.getAnchorProps()), {
2372
- partiallyInteractive: !fullyInteractive,
2373
- priority,
2374
- "aria-description": accessibilityDescription,
2375
- sentiment,
2376
- children: title
2377
- })
2378
- );
2379
- };
2380
- var getPriorityAndSentiment = (ctaSecondary, context) => {
2381
- if (context === "negative") {
2382
- return { priority: "secondary", sentiment: "negative" };
2383
- }
2384
- return { priority: ctaSecondary ? "secondary" : "secondary-neutral", sentiment: "default" };
2385
- };
2386
-
2387
- // ../renderers/src/utils/listItem/shouldUseAvatar.ts
2388
- var shouldUseAvatar = (control, tags) => {
2389
- var _a;
2390
- return control === "with-avatar" || ((_a = tags == null ? void 0 : tags.includes("with-avatar")) != null ? _a : false);
2391
- };
2392
-
2393
- // ../renderers/src/CollectionRenderer/components/ItemComponent.tsx
2394
- var import_jsx_runtime30 = require("react/jsx-runtime");
2395
- var ItemComponent = (props) => {
2396
- var _a, _b;
2397
- const {
2398
- title,
2399
- description,
2400
- supportingValues,
2401
- media,
2402
- additionalInfo,
2403
- inlineAlert,
2404
- href,
2405
- onClick,
2406
- callToAction,
2407
- tags,
2408
- parentTags,
2409
- control
2410
- } = props;
2411
- const controlOptions = {
2412
- ctaSecondary: (_a = tags == null ? void 0 : tags.includes("cta-secondary")) != null ? _a : false,
2413
- fullyInteractive: (_b = (tags == null ? void 0 : tags.includes("fully-interactive")) && (additionalInfo == null ? void 0 : additionalInfo.onClick) == null) != null ? _b : false
2414
- };
2415
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2416
- import_components18.ListItem,
2417
- {
2418
- title,
2419
- subtitle: description,
2420
- valueTitle: supportingValues == null ? void 0 : supportingValues.value,
2421
- valueSubtitle: supportingValues == null ? void 0 : supportingValues.subvalue,
2422
- media: getMedia(media, shouldUseAvatar(control, parentTags)),
2423
- prompt: getInlineAlert(inlineAlert),
2424
- additionalInfo: getAdditionalInfo(additionalInfo),
2425
- control: onClick || href ? getNavigationControl(onClick, href) : getCTAControl(callToAction, controlOptions)
2426
- },
2427
- title
2428
- );
2429
- };
2430
- var getNavigationControl = (onClick, href) => {
2431
- if (href) {
2432
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_components18.ListItem.Navigation, { href });
2433
- }
2434
- if (onClick) {
2435
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_components18.ListItem.Navigation, { onClick });
2436
- }
2437
- return null;
2438
- };
2439
-
2440
- // ../renderers/src/CollectionRenderer/components/SectionHeaderComponent.tsx
2441
- var import_jsx_runtime31 = require("react/jsx-runtime");
2442
- var SectionHeaderComponent = ({
2443
- title,
2444
- callToAction
2445
- }) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Header, { title, callToAction });
2446
-
2447
- // ../renderers/src/CollectionRenderer/createCollectionRenderer.tsx
2448
- var import_jsx_runtime32 = require("react/jsx-runtime");
2449
- var createCollectionRenderer = (canRender, components) => {
2450
- const componeontsWithDefaults = __spreadValues({
2451
- Search: SearchComponent,
2452
- Filters: FiltersComponent,
2453
- Filter: FilterComponent,
2454
- Item: ItemComponent,
2455
- SectionHeader: SectionHeaderComponent,
2456
- Results: ContentComponent
2457
- }, components);
2458
- return {
2459
- canRenderType: "collection",
2460
- canRender,
2461
- render: (props) => {
2462
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(CollectionRendererComponent, __spreadValues(__spreadValues({}, props), componeontsWithDefaults));
2463
- }
2464
- };
2465
- };
2466
-
2467
- // ../renderers/src/CollectionRenderer/CollectionRenderer.tsx
2468
- var import_jsx_runtime33 = require("react/jsx-runtime");
2469
- var CollectionRendererComponent = (props) => {
2470
- const { status, Search: Search4, Filters, Results } = props;
2471
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
2472
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Search4, __spreadValues({}, props)),
2473
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Filters, __spreadValues({}, props)),
2474
- status.type === "idle" || status.type === "loading" ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Results, __spreadValues({}, props)) : void 0,
2475
- status.type === "error" && status.reason === "search" && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_components19.InlinePrompt, { width: "full", sentiment: "negative", children: [
2476
- "Something went wrong,\xA0",
2477
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_components19.Link, { onClick: status.retry, children: "click here to retry" })
2478
- ] })
2479
- ] });
2480
- };
2481
- var CollectionRenderer = createCollectionRenderer(() => true, {
2482
- Search: (props) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(SearchComponent, __spreadValues({}, props)),
2483
- Filters: (props) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(FiltersComponent, __spreadValues({}, props)),
2484
- Filter: (props) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(FilterComponent, __spreadValues({}, props)),
2485
- Item: (props) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ItemComponent, __spreadValues({}, props)),
2486
- SectionHeader: (props) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(SectionHeaderComponent, __spreadValues({}, props)),
2487
- Results: (props) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ContentComponent, __spreadValues({}, props))
2488
- });
2489
- var CollectionRenderer_default = CollectionRenderer;
2490
-
2491
1126
  // ../renderers/src/ColumnsRenderer.tsx
2492
1127
  var import_classnames3 = __toESM(require_classnames());
2493
1128
 
2494
1129
  // ../renderers/src/utils/useIsCollapsed.ts
2495
- var import_react7 = require("react");
1130
+ var import_react5 = require("react");
2496
1131
  var COLLAPSE_QUERY = "(max-width: 767.98px)";
2497
1132
  var supportsMatchMedia = () => typeof window !== "undefined" && !!window.matchMedia;
2498
1133
  var useIsCollapsed = () => {
2499
- const [collapsed, setCollapsed] = (0, import_react7.useState)(
1134
+ const [collapsed, setCollapsed] = (0, import_react5.useState)(
2500
1135
  () => supportsMatchMedia() && window.matchMedia(COLLAPSE_QUERY).matches
2501
1136
  );
2502
- (0, import_react7.useEffect)(() => {
1137
+ (0, import_react5.useEffect)(() => {
2503
1138
  if (supportsMatchMedia()) {
2504
1139
  const mql = window.matchMedia(COLLAPSE_QUERY);
2505
1140
  const update = () => setCollapsed(mql.matches);
@@ -2512,7 +1147,7 @@ var useIsCollapsed = () => {
2512
1147
  };
2513
1148
 
2514
1149
  // ../renderers/src/ColumnsRenderer.tsx
2515
- var import_jsx_runtime34 = require("react/jsx-runtime");
1150
+ var import_jsx_runtime24 = require("react/jsx-runtime");
2516
1151
  var RIGHT_FIRST_STACKING = "right-first-stacking";
2517
1152
  var ColumnsRenderer = {
2518
1153
  canRenderType: "columns",
@@ -2528,9 +1163,9 @@ function ColumnsRendererComponent({
2528
1163
  var _a;
2529
1164
  const isCollapsed = useIsCollapsed();
2530
1165
  const reverse = isCollapsed && ((_a = tags == null ? void 0 : tags.includes(RIGHT_FIRST_STACKING)) != null ? _a : false);
2531
- const startColumn = /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "df-columns-renderer-column", children: startChildren });
2532
- const endColumn = /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "df-columns-renderer-column", children: endChildren });
2533
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
1166
+ const startColumn = /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "df-columns-renderer-column", children: startChildren });
1167
+ const endColumn = /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "df-columns-renderer-column", children: endChildren });
1168
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
2534
1169
  "div",
2535
1170
  {
2536
1171
  className: (0, import_classnames3.default)("df-columns-renderer-container", getMargin(margin), {
@@ -2547,7 +1182,7 @@ function ColumnsRendererComponent({
2547
1182
  var ColumnsRenderer_default = ColumnsRenderer;
2548
1183
 
2549
1184
  // ../renderers/src/components/VariableDateInput.tsx
2550
- var import_components20 = require("@transferwise/components");
1185
+ var import_components12 = require("@transferwise/components");
2551
1186
 
2552
1187
  // ../renderers/src/validators/type-validators.ts
2553
1188
  var isNumber = (value) => typeof value === "number" && !Number.isNaN(value);
@@ -2574,7 +1209,7 @@ var dateToDateString = (date) => {
2574
1209
  };
2575
1210
 
2576
1211
  // ../renderers/src/components/VariableDateInput.tsx
2577
- var import_jsx_runtime35 = require("react/jsx-runtime");
1212
+ var import_jsx_runtime25 = require("react/jsx-runtime");
2578
1213
  function VariableDateInput({
2579
1214
  control,
2580
1215
  inputProps
@@ -2590,8 +1225,8 @@ function VariableDateInput({
2590
1225
  onFocus
2591
1226
  } = inputProps;
2592
1227
  if (control === "date-lookup") {
2593
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2594
- import_components20.DateLookup,
1228
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
1229
+ import_components12.DateLookup,
2595
1230
  {
2596
1231
  value: dateStringToDateOrNull(inputProps.value),
2597
1232
  min: dateStringToDateOrNull(minimumDate),
@@ -2606,8 +1241,8 @@ function VariableDateInput({
2606
1241
  }
2607
1242
  );
2608
1243
  }
2609
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2610
- import_components20.DateInput,
1244
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
1245
+ import_components12.DateInput,
2611
1246
  __spreadProps(__spreadValues({}, inputProps), {
2612
1247
  dayAutoComplete: getAutocompleteString(autoComplete, "day"),
2613
1248
  yearAutoComplete: getAutocompleteString(autoComplete, "year")
@@ -2623,7 +1258,7 @@ var getAutocompleteString = (value, suffix) => {
2623
1258
  var VariableDateInput_default = VariableDateInput;
2624
1259
 
2625
1260
  // ../renderers/src/DateInputRenderer.tsx
2626
- var import_jsx_runtime36 = require("react/jsx-runtime");
1261
+ var import_jsx_runtime26 = require("react/jsx-runtime");
2627
1262
  var DateInputRenderer = {
2628
1263
  canRenderType: "input-date",
2629
1264
  render: (props) => {
@@ -2648,7 +1283,7 @@ var DateInputRenderer = {
2648
1283
  ]);
2649
1284
  const value = initialValue != null ? initialValue : "";
2650
1285
  const inputProps = __spreadProps(__spreadValues({}, rest), { value, id });
2651
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
1286
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2652
1287
  FieldInput_default,
2653
1288
  {
2654
1289
  id,
@@ -2659,7 +1294,7 @@ var DateInputRenderer = {
2659
1294
  loadingState: props.fieldLoadingState,
2660
1295
  help,
2661
1296
  features: props.features,
2662
- children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(VariableDateInput_default, { control, inputProps })
1297
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(VariableDateInput_default, { control, inputProps })
2663
1298
  }
2664
1299
  );
2665
1300
  }
@@ -2667,16 +1302,44 @@ var DateInputRenderer = {
2667
1302
  var DateInputRenderer_default = DateInputRenderer;
2668
1303
 
2669
1304
  // ../renderers/src/DecisionRenderer/DecisionRenderer.tsx
2670
- var import_components23 = require("@transferwise/components");
1305
+ var import_components16 = require("@transferwise/components");
1306
+
1307
+ // ../renderers/src/utils/listItem/getAdditionalInfo.tsx
1308
+ var import_components13 = require("@transferwise/components");
1309
+ var import_jsx_runtime27 = require("react/jsx-runtime");
1310
+ var getAdditionalInfo = (additionalInfo) => {
1311
+ var _a, _b;
1312
+ if (!additionalInfo) {
1313
+ return void 0;
1314
+ }
1315
+ const { href, text, onClick } = additionalInfo;
1316
+ if (href || onClick) {
1317
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1318
+ import_components13.ListItem.AdditionalInfo,
1319
+ {
1320
+ action: __spreadValues({
1321
+ label: text
1322
+ }, (_b = (_a = additionalInfo.getAnchorProps) == null ? void 0 : _a.call(additionalInfo)) != null ? _b : { onClick })
1323
+ }
1324
+ );
1325
+ }
1326
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_components13.ListItem.AdditionalInfo, { children: additionalInfo == null ? void 0 : additionalInfo.text });
1327
+ };
1328
+
1329
+ // ../renderers/src/utils/listItem/shouldUseAvatar.ts
1330
+ var shouldUseAvatar = (control, tags) => {
1331
+ var _a;
1332
+ return control === "with-avatar" || ((_a = tags == null ? void 0 : tags.includes("with-avatar")) != null ? _a : false);
1333
+ };
2671
1334
 
2672
1335
  // ../renderers/src/DecisionRenderer/DecisionWrapper.tsx
2673
- var import_components22 = require("@transferwise/components");
2674
- var import_react8 = require("react");
2675
- var import_react_intl10 = require("react-intl");
1336
+ var import_components15 = require("@transferwise/components");
1337
+ var import_react6 = require("react");
1338
+ var import_react_intl8 = require("react-intl");
2676
1339
 
2677
1340
  // ../renderers/src/messages/filter.messages.ts
2678
- var import_react_intl7 = require("react-intl");
2679
- var filter_messages_default = (0, import_react_intl7.defineMessages)({
1341
+ var import_react_intl5 = require("react-intl");
1342
+ var filter_messages_default = (0, import_react_intl5.defineMessages)({
2680
1343
  placeholder: {
2681
1344
  id: "df.wise.filter.placeholder",
2682
1345
  defaultMessage: "Start typing to search",
@@ -2694,10 +1357,10 @@ var filter_messages_default = (0, import_react_intl7.defineMessages)({
2694
1357
  }
2695
1358
  });
2696
1359
 
2697
- // ../renderers/src/DecisionRenderer/filter-and-sort-decision-options.ts
2698
- function filterAndSortDecisionOptions(selectOptions, query) {
1360
+ // ../renderers/src/utils/filter-and-sort-items.ts
1361
+ function filterAndSortItems(options, query) {
2699
1362
  const upperQuery = normalizeAndRemoveAccents(query);
2700
- const filteredItems = selectOptions.filter((option) => {
1363
+ const filteredItems = options.filter((option) => {
2701
1364
  var _a, _b, _c, _d;
2702
1365
  const searchableWords = [
2703
1366
  option.title,
@@ -2742,12 +1405,12 @@ function filterAndSortDecisionOptions(selectOptions, query) {
2742
1405
  var normalizeAndRemoveAccents = (text) => text.trim().toLowerCase().normalize("NFKD").replace(new RegExp("\\p{Diacritic}", "gu"), "");
2743
1406
 
2744
1407
  // ../renderers/src/DecisionRenderer/GroupedDecisionList.tsx
2745
- var import_components21 = require("@transferwise/components");
2746
- var import_react_intl9 = require("react-intl");
1408
+ var import_components14 = require("@transferwise/components");
1409
+ var import_react_intl7 = require("react-intl");
2747
1410
 
2748
1411
  // ../renderers/src/messages/group.messages.ts
2749
- var import_react_intl8 = require("react-intl");
2750
- var group_messages_default = (0, import_react_intl8.defineMessages)({
1412
+ var import_react_intl6 = require("react-intl");
1413
+ var group_messages_default = (0, import_react_intl6.defineMessages)({
2751
1414
  all: {
2752
1415
  id: "df.wise.group.all",
2753
1416
  defaultMessage: "All",
@@ -2781,19 +1444,19 @@ var getGroupsFromTags = (knownTags, items) => {
2781
1444
  };
2782
1445
 
2783
1446
  // ../renderers/src/DecisionRenderer/GroupedDecisionList.tsx
2784
- var import_jsx_runtime37 = require("react/jsx-runtime");
1447
+ var import_jsx_runtime28 = require("react/jsx-runtime");
2785
1448
  var groupingTags = Object.keys(group_messages_default).filter((key) => key !== "all");
2786
1449
  var isGroupedDecision = (options) => {
2787
1450
  return getGroupsFromTags(groupingTags, options).length > 0;
2788
1451
  };
2789
1452
  var GroupedDecisionList = (_a) => {
2790
1453
  var _b = _a, { renderDecisionList: renderDecisionList2 } = _b, rest = __objRest(_b, ["renderDecisionList"]);
2791
- const { formatMessage } = (0, import_react_intl9.useIntl)();
1454
+ const { formatMessage } = (0, import_react_intl7.useIntl)();
2792
1455
  const { options } = rest;
2793
1456
  const itemsByTag = [...getGroupsFromTags(groupingTags, options), { tag: "all", items: options }];
2794
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_jsx_runtime37.Fragment, { children: itemsByTag.map(({ tag, items }) => /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_components21.Section, { children: [
2795
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
2796
- import_components21.Header,
1457
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_jsx_runtime28.Fragment, { children: itemsByTag.map(({ tag, items }) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_components14.Section, { children: [
1458
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
1459
+ import_components14.Header,
2797
1460
  {
2798
1461
  as: "h2",
2799
1462
  title: tag in group_messages_default ? formatMessage(group_messages_default[tag]) : tag
@@ -2804,26 +1467,27 @@ var GroupedDecisionList = (_a) => {
2804
1467
  };
2805
1468
 
2806
1469
  // ../renderers/src/DecisionRenderer/DecisionWrapper.tsx
2807
- var import_jsx_runtime38 = require("react/jsx-runtime");
1470
+ var import_jsx_runtime29 = require("react/jsx-runtime");
2808
1471
  var DecisionWrapper = (props) => {
2809
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: getMargin(props.margin), children: [
2810
- props.title && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_components22.Header, { as: "h2", title: props.title }),
2811
- props.control === "filtered" ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(FilteredDecisionList, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(UnfilteredDecisionList, __spreadValues({}, props))
1472
+ const { title, control, margin } = props;
1473
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: getMargin(margin), children: [
1474
+ title && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_components15.Header, { as: "h2", title }),
1475
+ control === "filtered" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(FilteredDecisionList, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(UnfilteredDecisionList, __spreadValues({}, props))
2812
1476
  ] });
2813
1477
  };
2814
1478
  var UnfilteredDecisionList = (_a) => {
2815
1479
  var _b = _a, { renderDecisionList: renderDecisionList2 } = _b, rest = __objRest(_b, ["renderDecisionList"]);
2816
- return isGroupedDecision(rest.options) ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(GroupedDecisionList, __spreadProps(__spreadValues({}, rest), { renderDecisionList: renderDecisionList2 })) : renderDecisionList2(rest);
1480
+ return isGroupedDecision(rest.options) ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(GroupedDecisionList, __spreadProps(__spreadValues({}, rest), { renderDecisionList: renderDecisionList2 })) : renderDecisionList2(rest);
2817
1481
  };
2818
1482
  var FilteredDecisionList = (props) => {
2819
- const { formatMessage } = (0, import_react_intl10.useIntl)();
2820
- const [query, setQuery] = (0, import_react8.useState)("");
1483
+ const { formatMessage } = (0, import_react_intl8.useIntl)();
1484
+ const [query, setQuery] = (0, import_react6.useState)("");
2821
1485
  const { control, options, renderDecisionList: renderDecisionList2 } = props;
2822
- const filteredOptions = (query == null ? void 0 : query.length) > 0 ? filterAndSortDecisionOptions(options, query) : options;
1486
+ const filteredOptions = (query == null ? void 0 : query.length) > 0 ? filterAndSortItems(options, query) : options;
2823
1487
  const isGrouped = isGroupedDecision(options);
2824
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [
2825
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
2826
- import_components22.SearchInput,
1488
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
1489
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
1490
+ import_components15.SearchInput,
2827
1491
  {
2828
1492
  placeholder: formatMessage(filter_messages_default.placeholder),
2829
1493
  value: query,
@@ -2834,25 +1498,25 @@ var FilteredDecisionList = (props) => {
2834
1498
  }
2835
1499
  }
2836
1500
  ),
2837
- isGrouped && query.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(GroupedDecisionList, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [
2838
- query.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_components22.Header, { as: "h2", title: formatMessage(filter_messages_default.results), className: "m-t-4" }),
1501
+ isGrouped && query.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(GroupedDecisionList, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
1502
+ query.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_components15.Header, { as: "h2", title: formatMessage(filter_messages_default.results), className: "m-t-4" }),
2839
1503
  filteredOptions.length > 0 ? renderDecisionList2({
2840
1504
  control,
2841
1505
  className: query.length === 0 ? "m-t-3" : "",
2842
1506
  options: filteredOptions
2843
- }) : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { children: formatMessage(filter_messages_default.noResults) })
1507
+ }) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { children: formatMessage(filter_messages_default.noResults) })
2844
1508
  ] })
2845
1509
  ] });
2846
1510
  };
2847
1511
 
2848
1512
  // ../renderers/src/DecisionRenderer/DecisionRenderer.tsx
2849
- var import_jsx_runtime39 = require("react/jsx-runtime");
1513
+ var import_jsx_runtime30 = require("react/jsx-runtime");
2850
1514
  var DecisionRenderer = {
2851
1515
  canRenderType: "decision",
2852
- render: (props) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DecisionWrapper, __spreadProps(__spreadValues({}, props), { renderDecisionList }))
1516
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(DecisionWrapper, __spreadProps(__spreadValues({}, props), { renderDecisionList }))
2853
1517
  };
2854
1518
  var renderDecisionList = ({ options, control }) => {
2855
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_jsx_runtime39.Fragment, { children: options.map((_a) => {
1519
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_jsx_runtime30.Fragment, { children: options.map((_a) => {
2856
1520
  var _b = _a, { onClick } = _b, rest = __objRest(_b, ["onClick"]);
2857
1521
  const {
2858
1522
  description,
@@ -2865,8 +1529,8 @@ var renderDecisionList = ({ options, control }) => {
2865
1529
  supportingValues,
2866
1530
  tags
2867
1531
  } = rest;
2868
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
2869
- import_components23.ListItem,
1532
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
1533
+ import_components16.ListItem,
2870
1534
  {
2871
1535
  title: itemTitle,
2872
1536
  subtitle: description,
@@ -2877,7 +1541,7 @@ var renderDecisionList = ({ options, control }) => {
2877
1541
  media: getMedia(media, shouldUseAvatar(control, tags)),
2878
1542
  prompt: getInlineAlert(inlineAlert),
2879
1543
  additionalInfo: additionalText ? getAdditionalInfo({ text: additionalText }) : void 0,
2880
- control: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_components23.ListItem.Navigation, __spreadValues({}, getAnchorProps()))
1544
+ control: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_components16.ListItem.Navigation, __spreadValues({}, getAnchorProps()))
2881
1545
  },
2882
1546
  JSON.stringify(rest)
2883
1547
  );
@@ -2886,8 +1550,8 @@ var renderDecisionList = ({ options, control }) => {
2886
1550
  var DecisionRenderer_default = DecisionRenderer;
2887
1551
 
2888
1552
  // ../renderers/src/DividerRenderer.tsx
2889
- var import_components24 = require("@transferwise/components");
2890
- var import_jsx_runtime40 = require("react/jsx-runtime");
1553
+ var import_components17 = require("@transferwise/components");
1554
+ var import_jsx_runtime31 = require("react/jsx-runtime");
2891
1555
  var mapControlToLevel = (control) => {
2892
1556
  switch (control) {
2893
1557
  case "section":
@@ -2900,16 +1564,16 @@ var mapControlToLevel = (control) => {
2900
1564
  };
2901
1565
  var DividerRenderer = {
2902
1566
  canRenderType: "divider",
2903
- render: ({ margin, control }) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_components24.Divider, { className: `m-t-0 d-block ${getMargin(margin)}`, level: mapControlToLevel(control) })
1567
+ render: ({ margin, control }) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_components17.Divider, { className: `m-t-0 d-block ${getMargin(margin)}`, level: mapControlToLevel(control) })
2904
1568
  };
2905
1569
  var DividerRenderer_default = DividerRenderer;
2906
1570
 
2907
1571
  // ../renderers/src/ExternalConfirmationRenderer.tsx
2908
- var import_components25 = require("@transferwise/components");
1572
+ var import_components18 = require("@transferwise/components");
2909
1573
 
2910
1574
  // ../renderers/src/messages/external-confirmation.messages.ts
2911
- var import_react_intl11 = require("react-intl");
2912
- var external_confirmation_messages_default = (0, import_react_intl11.defineMessages)({
1575
+ var import_react_intl9 = require("react-intl");
1576
+ var external_confirmation_messages_default = (0, import_react_intl9.defineMessages)({
2913
1577
  title: {
2914
1578
  id: "df.wise.ExternalConfirmation.title",
2915
1579
  defaultMessage: "Please confirm",
@@ -2933,9 +1597,9 @@ var external_confirmation_messages_default = (0, import_react_intl11.defineMessa
2933
1597
  });
2934
1598
 
2935
1599
  // ../renderers/src/ExternalConfirmationRenderer.tsx
2936
- var import_react_intl12 = require("react-intl");
2937
- var import_react9 = require("react");
2938
- var import_jsx_runtime41 = require("react/jsx-runtime");
1600
+ var import_react_intl10 = require("react-intl");
1601
+ var import_react7 = require("react");
1602
+ var import_jsx_runtime32 = require("react/jsx-runtime");
2939
1603
  var ExternalConfirmationRenderer = {
2940
1604
  canRenderType: "external-confirmation",
2941
1605
  render: ExternalConfirmationRendererComponent
@@ -2946,20 +1610,20 @@ function ExternalConfirmationRendererComponent({
2946
1610
  open,
2947
1611
  onCancel
2948
1612
  }) {
2949
- const { formatMessage } = (0, import_react_intl12.useIntl)();
2950
- (0, import_react9.useEffect)(() => {
1613
+ const { formatMessage } = (0, import_react_intl10.useIntl)();
1614
+ (0, import_react7.useEffect)(() => {
2951
1615
  open();
2952
1616
  }, []);
2953
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
2954
- import_components25.Modal,
1617
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
1618
+ import_components18.Modal,
2955
1619
  {
2956
1620
  open: visible,
2957
1621
  title: formatMessage(external_confirmation_messages_default.title),
2958
- body: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
2959
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_components25.Markdown, { config: { link: { target: "_blank" } }, className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.description, { origin: getOrigin(url) }) }),
2960
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "df-box-renderer-width-lg", children: [
2961
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
2962
- import_components25.Button,
1622
+ body: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
1623
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_components18.Markdown, { config: { link: { target: "_blank" } }, className: "text-xs-center m-b-5", children: formatMessage(external_confirmation_messages_default.description, { origin: getOrigin(url) }) }),
1624
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "df-box-renderer-fixed-width", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "df-box-renderer-width-lg", children: [
1625
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
1626
+ import_components18.Button,
2963
1627
  {
2964
1628
  v2: true,
2965
1629
  block: true,
@@ -2972,7 +1636,7 @@ function ExternalConfirmationRendererComponent({
2972
1636
  children: formatMessage(external_confirmation_messages_default.open)
2973
1637
  }
2974
1638
  ),
2975
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_components25.Button, { v2: true, block: true, className: "m-b-2", priority: "tertiary", size: "md", onClick: onCancel, children: formatMessage(external_confirmation_messages_default.cancel) })
1639
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_components18.Button, { v2: true, block: true, className: "m-b-2", priority: "tertiary", size: "md", onClick: onCancel, children: formatMessage(external_confirmation_messages_default.cancel) })
2976
1640
  ] }) })
2977
1641
  ] }),
2978
1642
  onClose: onCancel
@@ -2989,46 +1653,46 @@ function getOrigin(url) {
2989
1653
  var ExternalConfirmationRenderer_default = ExternalConfirmationRenderer;
2990
1654
 
2991
1655
  // ../renderers/src/FormRenderer.tsx
2992
- var import_jsx_runtime42 = require("react/jsx-runtime");
1656
+ var import_jsx_runtime33 = require("react/jsx-runtime");
2993
1657
  var FormRenderer = {
2994
1658
  canRenderType: "form",
2995
- render: ({ children, margin }) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: getMargin(margin), children })
1659
+ render: ({ children, margin }) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: getMargin(margin), children })
2996
1660
  };
2997
1661
  var FormRenderer_default = FormRenderer;
2998
1662
 
2999
1663
  // ../renderers/src/FormSectionRenderer.tsx
3000
- var import_components26 = require("@transferwise/components");
3001
- var import_jsx_runtime43 = require("react/jsx-runtime");
1664
+ var import_components19 = require("@transferwise/components");
1665
+ var import_jsx_runtime34 = require("react/jsx-runtime");
3002
1666
  var FormSectionRenderer = {
3003
1667
  canRenderType: "form-section",
3004
- render: ({ title, description, children }) => /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("fieldset", { children: [
3005
- title && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
3006
- import_components26.Header,
1668
+ render: ({ title, description, children }) => /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("fieldset", { children: [
1669
+ title && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
1670
+ import_components19.Header,
3007
1671
  {
3008
1672
  as: "h2",
3009
1673
  title
3010
1674
  }
3011
1675
  ),
3012
- description && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { children: description }),
1676
+ description && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { children: description }),
3013
1677
  children
3014
1678
  ] })
3015
1679
  };
3016
1680
  var FormSectionRenderer_default = FormSectionRenderer;
3017
1681
 
3018
1682
  // ../renderers/src/HeadingRenderer.tsx
3019
- var import_components27 = require("@transferwise/components");
3020
- var import_jsx_runtime44 = require("react/jsx-runtime");
1683
+ var import_components20 = require("@transferwise/components");
1684
+ var import_jsx_runtime35 = require("react/jsx-runtime");
3021
1685
  var HeadingRenderer = {
3022
1686
  canRenderType: "heading",
3023
- render: (props) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Heading, __spreadValues({}, props))
1687
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Heading, __spreadValues({}, props))
3024
1688
  };
3025
1689
  function Heading(props) {
3026
1690
  const { text, size, align, margin, control } = props;
3027
1691
  const className = getTextAlignmentAndMargin({ align, margin });
3028
- return control === "display" ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(DisplayHeading, { size, text, className }) : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(StandardHeading, { size, text, className });
1692
+ return control === "display" ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(DisplayHeading, { size, text, className }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(StandardHeading, { size, text, className });
3029
1693
  }
3030
1694
  function DisplayHeading({ size, text, className }) {
3031
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_components27.Display, { type: getDisplayType(size), className, children: text });
1695
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_components20.Display, { type: getDisplayType(size), className, children: text });
3032
1696
  }
3033
1697
  var getDisplayType = (size) => {
3034
1698
  switch (size) {
@@ -3044,7 +1708,7 @@ var getDisplayType = (size) => {
3044
1708
  }
3045
1709
  };
3046
1710
  function StandardHeading({ size, text, className }) {
3047
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_components27.Title, { type: getTitleTypeBySize(size), className, children: text });
1711
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_components20.Title, { type: getTitleTypeBySize(size), className, children: text });
3048
1712
  }
3049
1713
  var getTitleTypeBySize = (size) => {
3050
1714
  var _a;
@@ -3060,8 +1724,8 @@ var getTitleTypeBySize = (size) => {
3060
1724
  var HeadingRenderer_default = HeadingRenderer;
3061
1725
 
3062
1726
  // ../renderers/src/ImageRenderer/UrlImage.tsx
3063
- var import_components28 = require("@transferwise/components");
3064
- var import_react10 = require("react");
1727
+ var import_components21 = require("@transferwise/components");
1728
+ var import_react8 = require("react");
3065
1729
 
3066
1730
  // ../renderers/src/utils/api-utils.ts
3067
1731
  function isRelativePath(url = "") {
@@ -3071,7 +1735,7 @@ function isRelativePath(url = "") {
3071
1735
  }
3072
1736
 
3073
1737
  // ../renderers/src/ImageRenderer/UrlImage.tsx
3074
- var import_jsx_runtime45 = require("react/jsx-runtime");
1738
+ var import_jsx_runtime36 = require("react/jsx-runtime");
3075
1739
  function UrlImage({
3076
1740
  accessibilityDescription,
3077
1741
  align,
@@ -3080,14 +1744,14 @@ function UrlImage({
3080
1744
  uri,
3081
1745
  httpClient
3082
1746
  }) {
3083
- const [imageSource, setImageSource] = (0, import_react10.useState)("");
3084
- (0, import_react10.useEffect)(() => {
1747
+ const [imageSource, setImageSource] = (0, import_react8.useState)("");
1748
+ (0, import_react8.useEffect)(() => {
3085
1749
  if (!uri.startsWith("urn:")) {
3086
1750
  void getImageSource(httpClient, uri).then(setImageSource);
3087
1751
  }
3088
1752
  }, [uri, httpClient]);
3089
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: `df-image ${align} ${size || "md"} ${getMargin(margin)}`, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
3090
- import_components28.Image,
1753
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: `df-image ${align} ${size || "md"} ${getMargin(margin)}`, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
1754
+ import_components21.Image,
3091
1755
  {
3092
1756
  className: "df-reserve-space",
3093
1757
  alt: accessibilityDescription != null ? accessibilityDescription : "",
@@ -3130,7 +1794,7 @@ var getImageSource = async (httpClient, imageUrl) => {
3130
1794
  };
3131
1795
 
3132
1796
  // ../renderers/src/ImageRenderer/UrnFlagImage.tsx
3133
- var import_jsx_runtime46 = require("react/jsx-runtime");
1797
+ var import_jsx_runtime37 = require("react/jsx-runtime");
3134
1798
  var maxFlagSize = 600;
3135
1799
  function UrnFlagImage({
3136
1800
  accessibilityDescription,
@@ -3139,12 +1803,12 @@ function UrnFlagImage({
3139
1803
  size,
3140
1804
  uri
3141
1805
  }) {
3142
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: `df-image ${align} ${size || "md"} ${getMargin(margin)}`, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(UrnFlag, { size: maxFlagSize, urn: uri, accessibilityDescription }) });
1806
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: `df-image ${align} ${size || "md"} ${getMargin(margin)}`, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(UrnFlag, { size: maxFlagSize, urn: uri, accessibilityDescription }) });
3143
1807
  }
3144
1808
 
3145
1809
  // ../renderers/src/ImageRenderer/UrnIllustration.tsx
3146
1810
  var import_art4 = require("@wise/art");
3147
- var import_react12 = require("react");
1811
+ var import_react10 = require("react");
3148
1812
 
3149
1813
  // ../renderers/src/ImageRenderer/isAnimated.ts
3150
1814
  var isAnimated = (uri) => {
@@ -3154,9 +1818,9 @@ var isAnimated = (uri) => {
3154
1818
 
3155
1819
  // ../renderers/src/ImageRenderer/SafeIllustration3D.tsx
3156
1820
  var import_art3 = require("@wise/art");
3157
- var import_react11 = require("react");
3158
- var import_jsx_runtime47 = require("react/jsx-runtime");
3159
- var Illustration3DErrorBoundary = class extends import_react11.Component {
1821
+ var import_react9 = require("react");
1822
+ var import_jsx_runtime38 = require("react/jsx-runtime");
1823
+ var Illustration3DErrorBoundary = class extends import_react9.Component {
3160
1824
  constructor(props) {
3161
1825
  super(props);
3162
1826
  this.state = { hasError: false };
@@ -3167,7 +1831,7 @@ var Illustration3DErrorBoundary = class extends import_react11.Component {
3167
1831
  componentDidCatch() {
3168
1832
  this.props.onError();
3169
1833
  }
3170
- async render() {
1834
+ render() {
3171
1835
  if (this.state.hasError) {
3172
1836
  return null;
3173
1837
  }
@@ -3179,12 +1843,12 @@ var SafeIllustration3D = ({
3179
1843
  size,
3180
1844
  onError
3181
1845
  }) => {
3182
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Illustration3DErrorBoundary, { onError, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_art3.Illustration3D, { name, size }) });
1846
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Illustration3DErrorBoundary, { onError, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_art3.Illustration3D, { name, size }) });
3183
1847
  };
3184
1848
  var SafeIllustration3D_default = SafeIllustration3D;
3185
1849
 
3186
1850
  // ../renderers/src/ImageRenderer/UrnIllustration.tsx
3187
- var import_jsx_runtime48 = require("react/jsx-runtime");
1851
+ var import_jsx_runtime39 = require("react/jsx-runtime");
3188
1852
  var urnPrefix = "urn:wise:illustrations:";
3189
1853
  var isUrnIllustration = (uri) => uri.startsWith(urnPrefix);
3190
1854
  function UrnIllustration({
@@ -3194,12 +1858,12 @@ function UrnIllustration({
3194
1858
  size,
3195
1859
  uri
3196
1860
  }) {
3197
- const [has3DFailed, setHas3DFailed] = (0, import_react12.useState)(false);
1861
+ const [has3DFailed, setHas3DFailed] = (0, import_react10.useState)(false);
3198
1862
  const illustrationSize = getIllustrationSize(size);
3199
1863
  const illustrationName = getIllustrationName(uri);
3200
1864
  const illustration3DName = getIllustration3DName(uri);
3201
1865
  if (illustration3DName && isAnimated(uri) && !has3DFailed) {
3202
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: `df-image ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
1866
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: `df-image ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
3203
1867
  SafeIllustration3D_default,
3204
1868
  {
3205
1869
  name: illustration3DName,
@@ -3208,7 +1872,7 @@ function UrnIllustration({
3208
1872
  }
3209
1873
  ) });
3210
1874
  }
3211
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: `df-image ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
1875
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: `df-image ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
3212
1876
  import_art4.Illustration,
3213
1877
  {
3214
1878
  className: "df-illustration",
@@ -3228,32 +1892,32 @@ var getIllustration3DName = (uri) => {
3228
1892
  };
3229
1893
 
3230
1894
  // ../renderers/src/ImageRenderer/UrnImage.tsx
3231
- var import_jsx_runtime49 = require("react/jsx-runtime");
1895
+ var import_jsx_runtime40 = require("react/jsx-runtime");
3232
1896
  var isUrnImage = (uri) => uri.startsWith("urn:");
3233
1897
  function UrnImage(props) {
3234
1898
  const { uri } = props;
3235
1899
  if (isUrnIllustration(uri)) {
3236
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(UrnIllustration, __spreadValues({}, props));
1900
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(UrnIllustration, __spreadValues({}, props));
3237
1901
  }
3238
1902
  if (isUrnFlag(uri)) {
3239
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(UrnFlagImage, __spreadValues({}, props));
1903
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(UrnFlagImage, __spreadValues({}, props));
3240
1904
  }
3241
1905
  return null;
3242
1906
  }
3243
1907
 
3244
1908
  // ../renderers/src/ImageRenderer/ImageRenderer.tsx
3245
- var import_jsx_runtime50 = require("react/jsx-runtime");
1909
+ var import_jsx_runtime41 = require("react/jsx-runtime");
3246
1910
  var ImageRenderer = {
3247
1911
  canRenderType: "image",
3248
- render: (props) => isUrnImage(props.uri) ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(UrnImage, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(UrlImage, __spreadValues({}, props))
1912
+ render: (props) => isUrnImage(props.uri) ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(UrnImage, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(UrlImage, __spreadValues({}, props))
3249
1913
  };
3250
1914
 
3251
1915
  // ../renderers/src/ImageRenderer/index.tsx
3252
1916
  var ImageRenderer_default = ImageRenderer;
3253
1917
 
3254
1918
  // ../renderers/src/InstructionsRenderer.tsx
3255
- var import_components29 = require("@transferwise/components");
3256
- var import_jsx_runtime51 = require("react/jsx-runtime");
1919
+ var import_components22 = require("@transferwise/components");
1920
+ var import_jsx_runtime42 = require("react/jsx-runtime");
3257
1921
  var doContext = ["positive", "neutral"];
3258
1922
  var dontContext = ["warning", "negative"];
3259
1923
  var InstructionsRenderer = {
@@ -3261,16 +1925,16 @@ var InstructionsRenderer = {
3261
1925
  render: ({ items, margin, title }) => {
3262
1926
  const dos = items.filter((item) => doContext.includes(item.context)).map(({ text }) => text);
3263
1927
  const donts = items.filter((item) => dontContext.includes(item.context)).map(({ text }) => text);
3264
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: getMargin(margin), children: [
3265
- title ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_components29.Header, { title }) : null,
3266
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_components29.InstructionsList, { dos, donts })
1928
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: getMargin(margin), children: [
1929
+ title ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_components22.Header, { title }) : null,
1930
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_components22.InstructionsList, { dos, donts })
3267
1931
  ] });
3268
1932
  }
3269
1933
  };
3270
1934
  var InstructionsRenderer_default = InstructionsRenderer;
3271
1935
 
3272
1936
  // ../renderers/src/IntegerInputRenderer.tsx
3273
- var import_components30 = require("@transferwise/components");
1937
+ var import_components23 = require("@transferwise/components");
3274
1938
 
3275
1939
  // ../renderers/src/utils/input-utils.ts
3276
1940
  var onWheel = (event) => {
@@ -3295,7 +1959,7 @@ function pick(obj, ...keys) {
3295
1959
  }
3296
1960
 
3297
1961
  // ../renderers/src/IntegerInputRenderer.tsx
3298
- var import_jsx_runtime52 = require("react/jsx-runtime");
1962
+ var import_jsx_runtime43 = require("react/jsx-runtime");
3299
1963
  var IntegerInputRenderer = {
3300
1964
  canRenderType: "input-integer",
3301
1965
  render: (props) => {
@@ -3310,7 +1974,7 @@ var IntegerInputRenderer = {
3310
1974
  "maximum",
3311
1975
  "minimum"
3312
1976
  );
3313
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
1977
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
3314
1978
  FieldInput_default,
3315
1979
  {
3316
1980
  id,
@@ -3321,8 +1985,8 @@ var IntegerInputRenderer = {
3321
1985
  loadingState: props.fieldLoadingState,
3322
1986
  help,
3323
1987
  features: props.features,
3324
- children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_components30.InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
3325
- import_components30.Input,
1988
+ children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_components23.InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
1989
+ import_components23.Input,
3326
1990
  __spreadValues({
3327
1991
  id,
3328
1992
  name: id,
@@ -3344,12 +2008,39 @@ var IntegerInputRenderer = {
3344
2008
  var IntegerInputRenderer_default = IntegerInputRenderer;
3345
2009
 
3346
2010
  // ../renderers/src/ListRenderer.tsx
3347
- var import_components32 = require("@transferwise/components");
2011
+ var import_components26 = require("@transferwise/components");
2012
+
2013
+ // ../renderers/src/utils/listItem/getCTAControl.tsx
2014
+ var import_components24 = require("@transferwise/components");
2015
+ var import_jsx_runtime44 = require("react/jsx-runtime");
2016
+ var getCTAControl = (callToAction, { ctaSecondary, fullyInteractive }) => {
2017
+ if (!callToAction) {
2018
+ return void 0;
2019
+ }
2020
+ const { accessibilityDescription, title, context } = callToAction;
2021
+ const { priority, sentiment } = getPriorityAndSentiment(ctaSecondary, context);
2022
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
2023
+ import_components24.ListItem.Button,
2024
+ __spreadProps(__spreadValues({}, callToAction.getAnchorProps()), {
2025
+ partiallyInteractive: !fullyInteractive,
2026
+ priority,
2027
+ "aria-description": accessibilityDescription,
2028
+ sentiment,
2029
+ children: title
2030
+ })
2031
+ );
2032
+ };
2033
+ var getPriorityAndSentiment = (ctaSecondary, context) => {
2034
+ if (context === "negative") {
2035
+ return { priority: "secondary", sentiment: "negative" };
2036
+ }
2037
+ return { priority: ctaSecondary ? "secondary" : "secondary-neutral", sentiment: "default" };
2038
+ };
3348
2039
 
3349
2040
  // ../renderers/src/components/Header.tsx
3350
- var import_components31 = require("@transferwise/components");
3351
- var import_jsx_runtime53 = require("react/jsx-runtime");
3352
- var Header = ({ title, callToAction }) => (title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_components31.Header, { title: title != null ? title : "", action: getHeaderAction(callToAction) });
2041
+ var import_components25 = require("@transferwise/components");
2042
+ var import_jsx_runtime45 = require("react/jsx-runtime");
2043
+ var Header5 = ({ title, callToAction }) => (title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_components25.Header, { title: title != null ? title : "", action: getHeaderAction(callToAction) });
3353
2044
  var getHeaderAction = (callToAction) => {
3354
2045
  if (!callToAction) {
3355
2046
  return void 0;
@@ -3361,11 +2052,11 @@ var getHeaderAction = (callToAction) => {
3361
2052
  };
3362
2053
 
3363
2054
  // ../renderers/src/ListRenderer.tsx
3364
- var import_jsx_runtime54 = require("react/jsx-runtime");
2055
+ var import_jsx_runtime46 = require("react/jsx-runtime");
3365
2056
  var ListRenderer = {
3366
2057
  canRenderType: "list",
3367
- render: ({ callToAction, control, margin, items, tags, title }) => /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: getMargin(margin), children: [
3368
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Header, { title, callToAction }),
2058
+ render: ({ callToAction, control, margin, items, tags, title }) => /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: getMargin(margin), children: [
2059
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Header5, { title, callToAction }),
3369
2060
  items.map((item) => {
3370
2061
  var _a, _b;
3371
2062
  const {
@@ -3382,8 +2073,8 @@ var ListRenderer = {
3382
2073
  ctaSecondary: (_a = itemTags == null ? void 0 : itemTags.includes("cta-secondary")) != null ? _a : false,
3383
2074
  fullyInteractive: (_b = (tags == null ? void 0 : tags.includes("fully-interactive")) && (additionalInfo == null ? void 0 : additionalInfo.onClick) == null) != null ? _b : false
3384
2075
  };
3385
- return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
3386
- import_components32.ListItem,
2076
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
2077
+ import_components26.ListItem,
3387
2078
  {
3388
2079
  title: itemTitle,
3389
2080
  subtitle: description,
@@ -3402,12 +2093,12 @@ var ListRenderer = {
3402
2093
  var ListRenderer_default = ListRenderer;
3403
2094
 
3404
2095
  // ../renderers/src/LoadingIndicatorRenderer.tsx
3405
- var import_components33 = require("@transferwise/components");
3406
- var import_jsx_runtime55 = require("react/jsx-runtime");
2096
+ var import_components27 = require("@transferwise/components");
2097
+ var import_jsx_runtime47 = require("react/jsx-runtime");
3407
2098
  var LoadingIndicatorRenderer = {
3408
2099
  canRenderType: "loading-indicator",
3409
- render: ({ margin, size }) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
3410
- import_components33.Loader,
2100
+ render: ({ margin, size }) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
2101
+ import_components27.Loader,
3411
2102
  {
3412
2103
  size,
3413
2104
  classNames: { "tw-loader": `tw-loader m-x-auto ${getMargin(margin)}` },
@@ -3418,13 +2109,13 @@ var LoadingIndicatorRenderer = {
3418
2109
  var LoadingIndicatorRenderer_default = LoadingIndicatorRenderer;
3419
2110
 
3420
2111
  // ../renderers/src/MarkdownRenderer.tsx
3421
- var import_components34 = require("@transferwise/components");
2112
+ var import_components28 = require("@transferwise/components");
3422
2113
  var import_classnames4 = __toESM(require_classnames());
3423
- var import_jsx_runtime56 = require("react/jsx-runtime");
2114
+ var import_jsx_runtime48 = require("react/jsx-runtime");
3424
2115
  var MarkdownRenderer = {
3425
2116
  canRenderType: "markdown",
3426
- render: ({ content, align, margin, size }) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: getTextAlignmentAndMargin({ align, margin }), children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
3427
- import_components34.Markdown,
2117
+ render: ({ content, align, margin, size }) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: getTextAlignmentAndMargin({ align, margin }), children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
2118
+ import_components28.Markdown,
3428
2119
  {
3429
2120
  className: (0, import_classnames4.default)(
3430
2121
  "df-markdown",
@@ -3438,16 +2129,16 @@ var MarkdownRenderer = {
3438
2129
  var MarkdownRenderer_default = MarkdownRenderer;
3439
2130
 
3440
2131
  // ../renderers/src/MediaRenderer.tsx
3441
- var import_jsx_runtime57 = require("react/jsx-runtime");
2132
+ var import_jsx_runtime49 = require("react/jsx-runtime");
3442
2133
  var MediaRenderer = {
3443
2134
  canRenderType: "media",
3444
2135
  render: (_a) => {
3445
2136
  var _b = _a, { media } = _b, rest = __objRest(_b, ["media"]);
3446
2137
  switch (media.type) {
3447
2138
  case "avatar":
3448
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(AvatarMediaRendererComponent, __spreadValues({ media }, rest));
2139
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(AvatarMediaRendererComponent, __spreadValues({ media }, rest));
3449
2140
  case "image":
3450
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(ImageMediaRendererComponent, __spreadValues({ media }, rest));
2141
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ImageMediaRendererComponent, __spreadValues({ media }, rest));
3451
2142
  case "legacy":
3452
2143
  return null;
3453
2144
  }
@@ -3459,7 +2150,7 @@ var AvatarMediaRendererComponent = ({
3459
2150
  margin,
3460
2151
  size
3461
2152
  }) => {
3462
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: `df-media-layout-avatar ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Media, { media, size: mapAvatarMediaSize(size) }) });
2153
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: `df-media-layout-avatar ${align} ${getMargin(margin)}`, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Media, { media, size: mapAvatarMediaSize(size) }) });
3463
2154
  };
3464
2155
  var ImageMediaRendererComponent = (_a) => {
3465
2156
  var _b = _a, {
@@ -3467,7 +2158,7 @@ var ImageMediaRendererComponent = (_a) => {
3467
2158
  } = _b, rest = __objRest(_b, [
3468
2159
  "media"
3469
2160
  ]);
3470
- return isUrnImage(media.uri) ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(UrnImage, __spreadValues({ uri: media.uri, accessibilityDescription: media.accessibilityDescription }, rest)) : /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(UrlImage, __spreadValues({ uri: media.uri, accessibilityDescription: media.accessibilityDescription }, rest));
2161
+ return isUrnImage(media.uri) ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(UrnImage, __spreadValues({ uri: media.uri, accessibilityDescription: media.accessibilityDescription }, rest)) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(UrlImage, __spreadValues({ uri: media.uri, accessibilityDescription: media.accessibilityDescription }, rest));
3471
2162
  };
3472
2163
  var mapAvatarMediaSize = (size) => {
3473
2164
  switch (size) {
@@ -3485,21 +2176,21 @@ var mapAvatarMediaSize = (size) => {
3485
2176
  };
3486
2177
 
3487
2178
  // ../renderers/src/ModalLayoutRenderer.tsx
3488
- var import_components35 = require("@transferwise/components");
3489
- var import_react13 = require("react");
3490
- var import_jsx_runtime58 = require("react/jsx-runtime");
2179
+ var import_components29 = require("@transferwise/components");
2180
+ var import_react11 = require("react");
2181
+ var import_jsx_runtime50 = require("react/jsx-runtime");
3491
2182
  var ModalLayoutRenderer = {
3492
2183
  canRenderType: "modal-layout",
3493
- render: (props) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(DFModal, __spreadValues({}, props))
2184
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(DFModal, __spreadValues({}, props))
3494
2185
  };
3495
2186
  var ModalLayoutRenderer_default = ModalLayoutRenderer;
3496
2187
  function DFModal({ content, margin, trigger }) {
3497
- const [visible, setVisible] = (0, import_react13.useState)(false);
2188
+ const [visible, setVisible] = (0, import_react11.useState)(false);
3498
2189
  const { children, title } = content;
3499
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: getMargin(margin), children: [
3500
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_components35.Button, { v2: true, priority: "tertiary", block: true, onClick: () => setVisible(true), children: trigger.title }),
3501
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
3502
- import_components35.Modal,
2190
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: getMargin(margin), children: [
2191
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_components29.Button, { v2: true, priority: "tertiary", block: true, onClick: () => setVisible(true), children: trigger.title }),
2192
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
2193
+ import_components29.Modal,
3503
2194
  {
3504
2195
  scroll: "content",
3505
2196
  open: visible,
@@ -3513,20 +2204,20 @@ function DFModal({ content, margin, trigger }) {
3513
2204
  }
3514
2205
 
3515
2206
  // ../renderers/src/ModalRenderer.tsx
3516
- var import_components36 = require("@transferwise/components");
3517
- var import_jsx_runtime59 = require("react/jsx-runtime");
2207
+ var import_components30 = require("@transferwise/components");
2208
+ var import_jsx_runtime51 = require("react/jsx-runtime");
3518
2209
  var ModalRenderer = {
3519
2210
  canRenderType: "modal",
3520
2211
  render: ({ title, children, open, onClose }) => {
3521
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_components36.Modal, { open, title, body: children, onClose });
2212
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_components30.Modal, { open, title, body: children, onClose });
3522
2213
  }
3523
2214
  };
3524
2215
 
3525
2216
  // ../renderers/src/MoneyInputRenderer.tsx
3526
- var import_components37 = require("@transferwise/components");
3527
- var import_react14 = require("react");
3528
- var import_react_intl13 = require("react-intl");
3529
- var import_jsx_runtime60 = require("react/jsx-runtime");
2217
+ var import_components31 = require("@transferwise/components");
2218
+ var import_react12 = require("react");
2219
+ var import_react_intl11 = require("react-intl");
2220
+ var import_jsx_runtime52 = require("react/jsx-runtime");
3530
2221
  var groupingTags2 = Object.keys(group_messages_default).filter((key) => key !== "all");
3531
2222
  var MoneyInputRenderer = {
3532
2223
  canRenderType: "money-input",
@@ -3547,13 +2238,13 @@ function MoneyInputRendererComponent(props) {
3547
2238
  onAmountChange,
3548
2239
  onCurrencyChange
3549
2240
  } = props;
3550
- (0, import_react14.useEffect)(() => {
2241
+ (0, import_react12.useEffect)(() => {
3551
2242
  if (!isValidIndex(selectedCurrencyIndex, currencies.length)) {
3552
2243
  onCurrencyChange(0);
3553
2244
  }
3554
2245
  }, [selectedCurrencyIndex, onCurrencyChange, currencies.length]);
3555
- const { formatMessage } = (0, import_react_intl13.useIntl)();
3556
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
2246
+ const { formatMessage } = (0, import_react_intl11.useIntl)();
2247
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
3557
2248
  FieldInput_default,
3558
2249
  {
3559
2250
  id: uid,
@@ -3562,8 +2253,8 @@ function MoneyInputRendererComponent(props) {
3562
2253
  validation: validationState,
3563
2254
  help,
3564
2255
  features: props.features,
3565
- children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
3566
- import_components37.MoneyInput,
2256
+ children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
2257
+ import_components31.MoneyInput,
3567
2258
  {
3568
2259
  amount: parseFloatOrNull(amountValue),
3569
2260
  searchPlaceholder: "",
@@ -3624,8 +2315,17 @@ function assertCurrencyCodeIsString(currencyCode) {
3624
2315
  }
3625
2316
 
3626
2317
  // ../renderers/src/MultiSelectInputRenderer/InlineComponent.tsx
3627
- var import_components38 = require("@transferwise/components");
3628
- var import_jsx_runtime61 = require("react/jsx-runtime");
2318
+ var import_components32 = require("@transferwise/components");
2319
+ var import_react13 = require("react");
2320
+ var import_react_intl12 = require("react-intl");
2321
+
2322
+ // ../renderers/src/utils/items-with-index.ts
2323
+ var zipWithIndex = (items) => items.map((item, index) => __spreadProps(__spreadValues({}, item), {
2324
+ index
2325
+ }));
2326
+
2327
+ // ../renderers/src/MultiSelectInputRenderer/InlineComponent.tsx
2328
+ var import_jsx_runtime53 = require("react/jsx-runtime");
3629
2329
  function InlineComponent(props) {
3630
2330
  const {
3631
2331
  id,
@@ -3635,69 +2335,91 @@ function InlineComponent(props) {
3635
2335
  help,
3636
2336
  options,
3637
2337
  selectedIndices,
2338
+ tags,
3638
2339
  title,
3639
2340
  validationState,
3640
2341
  onSelect
3641
2342
  } = props;
3642
- return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
3643
- FieldInput_default,
3644
- {
3645
- id,
3646
- label: title,
3647
- help,
3648
- description,
3649
- validation: validationState,
3650
- features,
3651
- children: options.map((option, index) => {
3652
- var _a;
3653
- const {
3654
- title: itemTitle,
3655
- description: subtitle,
3656
- disabled: optionDisabled,
3657
- media,
3658
- additionalText,
3659
- inlineAlert,
3660
- supportingValues,
3661
- childrenProps
3662
- } = option;
3663
- const key = (_a = childrenProps == null ? void 0 : childrenProps.uid) != null ? _a : index;
3664
- return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
3665
- import_components38.ListItem,
3666
- {
2343
+ const optionsWithIndex = zipWithIndex(options);
2344
+ const [query, setQuery] = (0, import_react13.useState)("");
2345
+ const { formatMessage } = (0, import_react_intl12.useIntl)();
2346
+ const filtered = tags == null ? void 0 : tags.includes("filtered");
2347
+ const filteredOptions = query ? filterAndSortItems(optionsWithIndex, filtered ? query : "") : optionsWithIndex;
2348
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_jsx_runtime53.Fragment, { children: [
2349
+ filtered && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
2350
+ import_components32.SearchInput,
2351
+ {
2352
+ placeholder: formatMessage(filter_messages_default.placeholder),
2353
+ disabled,
2354
+ value: query,
2355
+ className: "m-b-2",
2356
+ onChange: (e) => {
2357
+ var _a;
2358
+ return setQuery((_a = e.target.value) != null ? _a : "");
2359
+ }
2360
+ }
2361
+ ),
2362
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
2363
+ FieldInput_default,
2364
+ {
2365
+ id,
2366
+ label: title,
2367
+ help,
2368
+ description,
2369
+ validation: validationState,
2370
+ features,
2371
+ children: filteredOptions.map((option) => {
2372
+ var _a;
2373
+ const {
3667
2374
  title: itemTitle,
3668
- subtitle,
3669
- valueTitle: supportingValues == null ? void 0 : supportingValues.value,
3670
- valueSubtitle: supportingValues == null ? void 0 : supportingValues.subvalue,
3671
- media: getMedia(media, false),
3672
- prompt: getInlineAlert(inlineAlert),
3673
- additionalInfo: additionalText ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_components38.ListItem.AdditionalInfo, { children: additionalText }) : void 0,
3674
- disabled: disabled || optionDisabled,
3675
- control: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
3676
- import_components38.ListItem.Checkbox,
3677
- {
3678
- checked: selectedIndices.includes(index),
3679
- onChange: (e) => {
3680
- const newSelectedIndices = e.target.checked ? [...selectedIndices, index] : selectedIndices.filter((i) => i !== index);
3681
- onSelect(newSelectedIndices);
2375
+ description: subtitle,
2376
+ disabled: optionDisabled,
2377
+ media,
2378
+ index,
2379
+ additionalText,
2380
+ inlineAlert,
2381
+ supportingValues,
2382
+ childrenProps
2383
+ } = option;
2384
+ const key = (_a = childrenProps == null ? void 0 : childrenProps.uid) != null ? _a : index;
2385
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
2386
+ import_components32.ListItem,
2387
+ {
2388
+ title: itemTitle,
2389
+ subtitle,
2390
+ valueTitle: supportingValues == null ? void 0 : supportingValues.value,
2391
+ valueSubtitle: supportingValues == null ? void 0 : supportingValues.subvalue,
2392
+ media: getMedia(media, false),
2393
+ prompt: getInlineAlert(inlineAlert),
2394
+ additionalInfo: additionalText ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_components32.ListItem.AdditionalInfo, { children: additionalText }) : void 0,
2395
+ disabled: disabled || optionDisabled,
2396
+ control: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
2397
+ import_components32.ListItem.Checkbox,
2398
+ {
2399
+ checked: selectedIndices.includes(index),
2400
+ onChange: (e) => {
2401
+ const newSelectedIndices = e.target.checked ? [...selectedIndices, index] : selectedIndices.filter((i) => i !== index);
2402
+ onSelect(newSelectedIndices);
2403
+ }
3682
2404
  }
3683
- }
3684
- )
3685
- },
3686
- key
3687
- );
3688
- })
3689
- }
3690
- );
2405
+ )
2406
+ },
2407
+ key
2408
+ );
2409
+ })
2410
+ }
2411
+ )
2412
+ ] });
3691
2413
  }
3692
2414
 
3693
2415
  // ../renderers/src/MultiSelectInputRenderer/DefaultComponent.tsx
3694
- var import_components39 = require("@transferwise/components");
3695
- var import_react15 = require("react");
3696
- var import_react_intl15 = require("react-intl");
2416
+ var import_components33 = require("@transferwise/components");
2417
+ var import_react14 = require("react");
2418
+ var import_react_intl14 = require("react-intl");
3697
2419
 
3698
2420
  // ../renderers/src/messages/multi-select.messages.ts
3699
- var import_react_intl14 = require("react-intl");
3700
- var multi_select_messages_default = (0, import_react_intl14.defineMessages)({
2421
+ var import_react_intl13 = require("react-intl");
2422
+ var multi_select_messages_default = (0, import_react_intl13.defineMessages)({
3701
2423
  summary: {
3702
2424
  id: "df.wise.MultiSelect.summary",
3703
2425
  defaultMessage: "{first} and {count} more",
@@ -3706,10 +2428,10 @@ var multi_select_messages_default = (0, import_react_intl14.defineMessages)({
3706
2428
  });
3707
2429
 
3708
2430
  // ../renderers/src/MultiSelectInputRenderer/DefaultComponent.tsx
3709
- var import_jsx_runtime62 = require("react/jsx-runtime");
2431
+ var import_jsx_runtime54 = require("react/jsx-runtime");
3710
2432
  function DefaultComponent(props) {
3711
- const { formatMessage } = (0, import_react_intl15.useIntl)();
3712
- const [stagedIndices, setStagedIndices] = (0, import_react15.useState)();
2433
+ const { formatMessage } = (0, import_react_intl14.useIntl)();
2434
+ const [stagedIndices, setStagedIndices] = (0, import_react14.useState)();
3713
2435
  const {
3714
2436
  id,
3715
2437
  autoComplete,
@@ -3748,12 +2470,12 @@ function DefaultComponent(props) {
3748
2470
  const contentProps = {
3749
2471
  title: option.title,
3750
2472
  description: option.description,
3751
- icon: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(OptionMedia, { media: option.media, preferAvatar: false })
2473
+ icon: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(OptionMedia, { media: option.media, preferAvatar: false })
3752
2474
  };
3753
- return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_components39.SelectInputOptionContent, __spreadValues({}, contentProps));
2475
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_components33.SelectInputOptionContent, __spreadValues({}, contentProps));
3754
2476
  };
3755
2477
  const extraProps = { autoComplete };
3756
- return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
2478
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
3757
2479
  FieldInput_default,
3758
2480
  {
3759
2481
  id,
@@ -3762,8 +2484,8 @@ function DefaultComponent(props) {
3762
2484
  description,
3763
2485
  validation: validationState,
3764
2486
  features,
3765
- children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
3766
- import_components39.SelectInput,
2487
+ children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
2488
+ import_components33.SelectInput,
3767
2489
  __spreadValues({
3768
2490
  id,
3769
2491
  items: options.map((option, index) => {
@@ -3801,8 +2523,8 @@ function DefaultComponent(props) {
3801
2523
  }
3802
2524
 
3803
2525
  // ../renderers/src/MultiSelectInputRenderer/InlineCheckboxComponent.tsx
3804
- var import_components40 = require("@transferwise/components");
3805
- var import_jsx_runtime63 = require("react/jsx-runtime");
2526
+ var import_components34 = require("@transferwise/components");
2527
+ var import_jsx_runtime55 = require("react/jsx-runtime");
3806
2528
  function InlineCheckboxComponent(props) {
3807
2529
  const {
3808
2530
  id,
@@ -3816,7 +2538,7 @@ function InlineCheckboxComponent(props) {
3816
2538
  validationState,
3817
2539
  onSelect
3818
2540
  } = props;
3819
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
2541
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
3820
2542
  FieldInput_default,
3821
2543
  {
3822
2544
  id,
@@ -3845,35 +2567,35 @@ function InlineCheckboxComponent(props) {
3845
2567
  onSelect(newSelectedIndices);
3846
2568
  }
3847
2569
  };
3848
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_components40.Checkbox, __spreadProps(__spreadValues({}, checkboxProps), { className: "m-t-1" }), key);
2570
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_components34.Checkbox, __spreadProps(__spreadValues({}, checkboxProps), { className: "m-t-1" }), key);
3849
2571
  })
3850
2572
  }
3851
2573
  );
3852
2574
  }
3853
2575
 
3854
2576
  // ../renderers/src/MultiSelectInputRenderer/MultiSelectInputRenderer.tsx
3855
- var import_jsx_runtime64 = require("react/jsx-runtime");
2577
+ var import_jsx_runtime56 = require("react/jsx-runtime");
3856
2578
  var MultiSelectInputRenderer = {
3857
2579
  canRenderType: "input-multi-select",
3858
2580
  render: (props) => {
3859
2581
  switch (props.control) {
3860
2582
  case "inline":
3861
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(InlineComponent, __spreadValues({}, props));
2583
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(InlineComponent, __spreadValues({}, props));
3862
2584
  case "inline-checkbox-group":
3863
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(InlineCheckboxComponent, __spreadValues({}, props));
2585
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(InlineCheckboxComponent, __spreadValues({}, props));
3864
2586
  default:
3865
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(DefaultComponent, __spreadValues({}, props));
2587
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(DefaultComponent, __spreadValues({}, props));
3866
2588
  }
3867
2589
  }
3868
2590
  };
3869
2591
 
3870
2592
  // ../renderers/src/MultiUploadInputRenderer.tsx
3871
- var import_components42 = require("@transferwise/components");
2593
+ var import_components36 = require("@transferwise/components");
3872
2594
 
3873
2595
  // ../renderers/src/components/UploadFieldInput.tsx
3874
- var import_components41 = require("@transferwise/components");
2596
+ var import_components35 = require("@transferwise/components");
3875
2597
  var import_classnames5 = __toESM(require_classnames());
3876
- var import_jsx_runtime65 = require("react/jsx-runtime");
2598
+ var import_jsx_runtime57 = require("react/jsx-runtime");
3877
2599
  function UploadFieldInput({
3878
2600
  id,
3879
2601
  children,
@@ -3883,10 +2605,10 @@ function UploadFieldInput({
3883
2605
  validation,
3884
2606
  features
3885
2607
  }) {
3886
- const labelContent = label && help ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(LabelContentWithHelp, { text: label, help }) : label;
2608
+ const labelContent = label && help ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(LabelContentWithHelp, { text: label, help }) : label;
3887
2609
  const descriptionId = description ? `${id}-description` : void 0;
3888
2610
  const { ref } = useScrollToError(validation, features);
3889
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
2611
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
3890
2612
  "div",
3891
2613
  {
3892
2614
  ref,
@@ -3894,9 +2616,9 @@ function UploadFieldInput({
3894
2616
  "has-error": (validation == null ? void 0 : validation.status) === "invalid"
3895
2617
  }),
3896
2618
  children: [
3897
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("label", { htmlFor: id, className: "control-label", children: labelContent }),
2619
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("label", { htmlFor: id, className: "control-label", children: labelContent }),
3898
2620
  children,
3899
- (validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_components41.InlineAlert, { type: "negative", id: descriptionId, children: validation.message })
2621
+ (validation == null ? void 0 : validation.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_components35.InlineAlert, { type: "negative", id: descriptionId, children: validation.message })
3900
2622
  ]
3901
2623
  }
3902
2624
  );
@@ -3931,7 +2653,7 @@ var getSizeLimit = (maxSize) => {
3931
2653
  };
3932
2654
 
3933
2655
  // ../renderers/src/MultiUploadInputRenderer.tsx
3934
- var import_jsx_runtime66 = require("react/jsx-runtime");
2656
+ var import_jsx_runtime58 = require("react/jsx-runtime");
3935
2657
  var MultiUploadInputRenderer = {
3936
2658
  canRenderType: "input-upload-multi",
3937
2659
  render: (props) => {
@@ -3957,7 +2679,7 @@ var MultiUploadInputRenderer = {
3957
2679
  };
3958
2680
  const onDeleteFile = async (fileId) => onRemoveFile(value.findIndex((file) => file.id === fileId));
3959
2681
  const descriptionId = description ? `${id}-description` : void 0;
3960
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
2682
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
3961
2683
  UploadFieldInput_default,
3962
2684
  {
3963
2685
  id,
@@ -3966,8 +2688,8 @@ var MultiUploadInputRenderer = {
3966
2688
  validation: validationState,
3967
2689
  help,
3968
2690
  features,
3969
- children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
3970
- import_components42.UploadInput,
2691
+ children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
2692
+ import_components36.UploadInput,
3971
2693
  {
3972
2694
  id,
3973
2695
  "aria-describedby": descriptionId,
@@ -3976,7 +2698,7 @@ var MultiUploadInputRenderer = {
3976
2698
  files: value.map(({ id: fileId, file, validationState: fileValidationState }) => ({
3977
2699
  id: fileId,
3978
2700
  filename: file.name,
3979
- status: (fileValidationState == null ? void 0 : fileValidationState.status) === "invalid" ? import_components42.Status.FAILED : import_components42.Status.SUCCEEDED
2701
+ status: (fileValidationState == null ? void 0 : fileValidationState.status) === "invalid" ? import_components36.Status.FAILED : import_components36.Status.SUCCEEDED
3980
2702
  })),
3981
2703
  fileTypes: acceptsToFileTypes(accepts),
3982
2704
  maxFiles: maxItems,
@@ -3994,8 +2716,8 @@ var MultiUploadInputRenderer = {
3994
2716
  var MultiUploadInputRenderer_default = MultiUploadInputRenderer;
3995
2717
 
3996
2718
  // ../renderers/src/NumberInputRenderer.tsx
3997
- var import_components43 = require("@transferwise/components");
3998
- var import_jsx_runtime67 = require("react/jsx-runtime");
2719
+ var import_components37 = require("@transferwise/components");
2720
+ var import_jsx_runtime59 = require("react/jsx-runtime");
3999
2721
  var NumberInputRenderer = {
4000
2722
  canRenderType: "input-number",
4001
2723
  render: (props) => {
@@ -4009,7 +2731,7 @@ var NumberInputRenderer = {
4009
2731
  "maximum",
4010
2732
  "minimum"
4011
2733
  );
4012
- return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
2734
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
4013
2735
  FieldInput_default,
4014
2736
  {
4015
2737
  id,
@@ -4020,8 +2742,8 @@ var NumberInputRenderer = {
4020
2742
  loadingState: props.fieldLoadingState,
4021
2743
  help,
4022
2744
  features: props.features,
4023
- children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_components43.InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
4024
- import_components43.Input,
2745
+ children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_components37.InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
2746
+ import_components37.Input,
4025
2747
  __spreadValues({
4026
2748
  id,
4027
2749
  name: id,
@@ -4041,24 +2763,24 @@ var NumberInputRenderer = {
4041
2763
  var NumberInputRenderer_default = NumberInputRenderer;
4042
2764
 
4043
2765
  // ../renderers/src/ParagraphRenderer.tsx
4044
- var import_react_intl17 = require("react-intl");
2766
+ var import_react_intl16 = require("react-intl");
4045
2767
 
4046
2768
  // ../renderers/src/hooks/useSnackBarIfAvailable.ts
4047
- var import_components44 = require("@transferwise/components");
4048
- var import_react16 = require("react");
2769
+ var import_components38 = require("@transferwise/components");
2770
+ var import_react15 = require("react");
4049
2771
  function useSnackBarIfAvailable() {
4050
- const context = (0, import_react16.useContext)(import_components44.SnackbarContext);
2772
+ const context = (0, import_react15.useContext)(import_components38.SnackbarContext);
4051
2773
  return context ? context.createSnackbar : () => {
4052
2774
  };
4053
2775
  }
4054
2776
 
4055
2777
  // ../renderers/src/ParagraphRenderer.tsx
4056
- var import_components45 = require("@transferwise/components");
2778
+ var import_components39 = require("@transferwise/components");
4057
2779
  var import_classnames6 = __toESM(require_classnames());
4058
2780
 
4059
2781
  // ../renderers/src/messages/paragraph.messages.ts
4060
- var import_react_intl16 = require("react-intl");
4061
- var paragraph_messages_default = (0, import_react_intl16.defineMessages)({
2782
+ var import_react_intl15 = require("react-intl");
2783
+ var paragraph_messages_default = (0, import_react_intl15.defineMessages)({
4062
2784
  copy: {
4063
2785
  id: "df.wise.DynamicParagraph.copy",
4064
2786
  defaultMessage: "Copy",
@@ -4072,14 +2794,14 @@ var paragraph_messages_default = (0, import_react_intl16.defineMessages)({
4072
2794
  });
4073
2795
 
4074
2796
  // ../renderers/src/ParagraphRenderer.tsx
4075
- var import_jsx_runtime68 = require("react/jsx-runtime");
2797
+ var import_jsx_runtime60 = require("react/jsx-runtime");
4076
2798
  var ParagraphRenderer = {
4077
2799
  canRenderType: "paragraph",
4078
- render: (props) => /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Paragraph, __spreadValues({}, props))
2800
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Paragraph, __spreadValues({}, props))
4079
2801
  };
4080
2802
  function Paragraph({ align, control, margin, size, text }) {
4081
2803
  const className = getTextAlignmentAndMargin({ align, margin });
4082
- return control === "copyable" ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(CopyableParagraph, { className, align, text }) : /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
2804
+ return control === "copyable" ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(CopyableParagraph, { className, align, text }) : /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
4083
2805
  "p",
4084
2806
  {
4085
2807
  className: `${["xs", "sm"].includes(size) ? "np-text-body-default" : "np-text-body-large"} ${className}`,
@@ -4092,16 +2814,16 @@ function CopyableParagraph({
4092
2814
  align,
4093
2815
  className
4094
2816
  }) {
4095
- const { formatMessage } = (0, import_react_intl17.useIntl)();
2817
+ const { formatMessage } = (0, import_react_intl16.useIntl)();
4096
2818
  const createSnackbar = useSnackBarIfAvailable();
4097
2819
  const copy = () => {
4098
2820
  navigator.clipboard.writeText(text).then(() => createSnackbar({ text: formatMessage(paragraph_messages_default.copied) })).catch(() => {
4099
2821
  });
4100
2822
  };
4101
2823
  const inputAlignmentClasses = getTextAlignmentAndMargin({ align, margin: "sm" });
4102
- return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className, children: [
4103
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
4104
- import_components45.Input,
2824
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className, children: [
2825
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
2826
+ import_components39.Input,
4105
2827
  {
4106
2828
  type: "text",
4107
2829
  value: text,
@@ -4109,23 +2831,23 @@ function CopyableParagraph({
4109
2831
  className: (0, import_classnames6.default)("text-ellipsis", inputAlignmentClasses)
4110
2832
  }
4111
2833
  ),
4112
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_components45.Button, { v2: true, block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
2834
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_components39.Button, { v2: true, block: true, onClick: copy, children: formatMessage(paragraph_messages_default.copy) })
4113
2835
  ] });
4114
2836
  }
4115
2837
  var ParagraphRenderer_default = ParagraphRenderer;
4116
2838
 
4117
2839
  // ../renderers/src/ProgressRenderer.tsx
4118
- var import_components46 = require("@transferwise/components");
4119
- var import_jsx_runtime69 = require("react/jsx-runtime");
2840
+ var import_components40 = require("@transferwise/components");
2841
+ var import_jsx_runtime61 = require("react/jsx-runtime");
4120
2842
  var ProgressRenderer = {
4121
2843
  canRenderType: "progress",
4122
2844
  render: ({ uid, title, help, progress, progressText, margin, description }) => {
4123
- return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
4124
- import_components46.ProgressBar,
2845
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
2846
+ import_components40.ProgressBar,
4125
2847
  {
4126
2848
  id: uid,
4127
2849
  className: getMargin(margin),
4128
- title: title && help ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(LabelContentWithHelp, { text: title, help }) : title,
2850
+ title: title && help ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(LabelContentWithHelp, { text: title, help }) : title,
4129
2851
  description,
4130
2852
  progress: {
4131
2853
  max: 1,
@@ -4138,15 +2860,15 @@ var ProgressRenderer = {
4138
2860
  };
4139
2861
 
4140
2862
  // ../renderers/src/RepeatableRenderer.tsx
4141
- var import_components47 = require("@transferwise/components");
4142
- var import_icons2 = require("@transferwise/icons");
2863
+ var import_components41 = require("@transferwise/components");
2864
+ var import_icons = require("@transferwise/icons");
4143
2865
  var import_classnames7 = __toESM(require_classnames());
4144
- var import_react17 = require("react");
4145
- var import_react_intl19 = require("react-intl");
2866
+ var import_react16 = require("react");
2867
+ var import_react_intl18 = require("react-intl");
4146
2868
 
4147
2869
  // ../renderers/src/messages/repeatable.messages.ts
4148
- var import_react_intl18 = require("react-intl");
4149
- var repeatable_messages_default = (0, import_react_intl18.defineMessages)({
2870
+ var import_react_intl17 = require("react-intl");
2871
+ var repeatable_messages_default = (0, import_react_intl17.defineMessages)({
4150
2872
  addItemTitle: {
4151
2873
  id: "df.wise.ArraySchema.addItemTitle",
4152
2874
  defaultMessage: "Add Item",
@@ -4170,10 +2892,10 @@ var repeatable_messages_default = (0, import_react_intl18.defineMessages)({
4170
2892
  });
4171
2893
 
4172
2894
  // ../renderers/src/RepeatableRenderer.tsx
4173
- var import_jsx_runtime70 = require("react/jsx-runtime");
2895
+ var import_jsx_runtime62 = require("react/jsx-runtime");
4174
2896
  var RepeatableRenderer = {
4175
2897
  canRenderType: "repeatable",
4176
- render: (props) => /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Repeatable, __spreadValues({}, props))
2898
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Repeatable, __spreadValues({}, props))
4177
2899
  };
4178
2900
  function Repeatable(props) {
4179
2901
  const {
@@ -4190,8 +2912,8 @@ function Repeatable(props) {
4190
2912
  onSave,
4191
2913
  onRemove
4192
2914
  } = props;
4193
- const { formatMessage } = (0, import_react_intl19.useIntl)();
4194
- const [openModalType, setOpenModalType] = (0, import_react17.useState)(null);
2915
+ const { formatMessage } = (0, import_react_intl18.useIntl)();
2916
+ const [openModalType, setOpenModalType] = (0, import_react16.useState)(null);
4195
2917
  const { ref } = useScrollToError(validationState, features);
4196
2918
  const onAddItem = () => {
4197
2919
  onAdd();
@@ -4214,43 +2936,43 @@ function Repeatable(props) {
4214
2936
  const onCancelEdit = () => {
4215
2937
  setOpenModalType(null);
4216
2938
  };
4217
- return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(import_jsx_runtime70.Fragment, { children: [
4218
- /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { ref, children: [
4219
- title && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_components47.Header, { title }),
4220
- description && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("p", { children: description }),
4221
- /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(
2939
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, { children: [
2940
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { ref, children: [
2941
+ title && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_components41.Header, { title }),
2942
+ description && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("p", { children: description }),
2943
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
4222
2944
  "div",
4223
2945
  {
4224
2946
  className: (0, import_classnames7.default)("form-group", {
4225
2947
  "has-error": (validationState == null ? void 0 : validationState.status) === "invalid"
4226
2948
  }),
4227
2949
  children: [
4228
- items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(ItemSummaryOption, { item, onClick: () => onEditItem(index) }, item.id)),
4229
- /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
4230
- import_components47.NavigationOption,
2950
+ items == null ? void 0 : items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(ItemSummaryOption, { item, onClick: () => onEditItem(index) }, item.id)),
2951
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
2952
+ import_components41.NavigationOption,
4231
2953
  {
4232
- media: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_icons2.Plus, {}),
2954
+ media: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_icons.Plus, {}),
4233
2955
  title: addItemTitle || formatMessage(repeatable_messages_default.addItemTitle),
4234
2956
  showMediaAtAllSizes: true,
4235
2957
  onClick: () => onAddItem()
4236
2958
  }
4237
2959
  ),
4238
- (validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_components47.InlineAlert, { type: "negative", children: validationState.message })
2960
+ (validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_components41.InlineAlert, { type: "negative", children: validationState.message })
4239
2961
  ]
4240
2962
  }
4241
2963
  )
4242
2964
  ] }),
4243
- /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
4244
- import_components47.Modal,
2965
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
2966
+ import_components41.Modal,
4245
2967
  {
4246
2968
  open: openModalType !== null,
4247
2969
  title: (openModalType === "add" ? addItemTitle : editItemTitle) || formatMessage(repeatable_messages_default.addItemTitle),
4248
- body: /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(import_jsx_runtime70.Fragment, { children: [
4249
- /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: "m-b-2", children: editableItem }),
4250
- /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { children: [
4251
- /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_components47.Button, { priority: "primary", block: true, className: "m-b-2", onClick: () => onSaveItem(), children: formatMessage(repeatable_messages_default.addItem) }),
4252
- /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
4253
- import_components47.Button,
2970
+ body: /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, { children: [
2971
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "m-b-2", children: editableItem }),
2972
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { children: [
2973
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_components41.Button, { priority: "primary", block: true, className: "m-b-2", onClick: () => onSaveItem(), children: formatMessage(repeatable_messages_default.addItem) }),
2974
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
2975
+ import_components41.Button,
4254
2976
  {
4255
2977
  v2: true,
4256
2978
  priority: "secondary",
@@ -4271,10 +2993,10 @@ function ItemSummaryOption({
4271
2993
  item,
4272
2994
  onClick
4273
2995
  }) {
4274
- return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
4275
- import_components47.NavigationOption,
2996
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
2997
+ import_components41.NavigationOption,
4276
2998
  {
4277
- media: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(OptionMedia, { media: item.media, preferAvatar: false }),
2999
+ media: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(OptionMedia, { media: item.media, preferAvatar: false }),
4278
3000
  title: item.title,
4279
3001
  content: item.description,
4280
3002
  showMediaAtAllSizes: true,
@@ -4286,16 +3008,16 @@ function ItemSummaryOption({
4286
3008
  var RepeatableRenderer_default = RepeatableRenderer;
4287
3009
 
4288
3010
  // ../renderers/src/ReviewLegacyRenderer.tsx
4289
- var import_components48 = require("@transferwise/components");
4290
- var import_jsx_runtime71 = require("react/jsx-runtime");
3011
+ var import_components42 = require("@transferwise/components");
3012
+ var import_jsx_runtime63 = require("react/jsx-runtime");
4291
3013
  var ReviewRenderer = {
4292
3014
  canRenderType: "review",
4293
3015
  render: ({ callToAction, control, fields, margin, title, trackEvent }) => {
4294
3016
  const orientation = mapControlToDefinitionListLayout(control);
4295
- return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: getMargin(margin), children: [
4296
- /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Header, { title, callToAction }),
4297
- /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: margin, children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
4298
- import_components48.DefinitionList,
3017
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("div", { className: getMargin(margin), children: [
3018
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Header5, { title, callToAction }),
3019
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: margin, children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
3020
+ import_components42.DefinitionList,
4299
3021
  {
4300
3022
  layout: orientation,
4301
3023
  definitions: fields.map(
@@ -4332,20 +3054,20 @@ var mapControlToDefinitionListLayout = (control) => {
4332
3054
  };
4333
3055
  var getFieldLabel = (label, help, onClick) => {
4334
3056
  if (help) {
4335
- return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(import_jsx_runtime71.Fragment, { children: [
3057
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(import_jsx_runtime63.Fragment, { children: [
4336
3058
  label,
4337
3059
  " ",
4338
- /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Help_default, { help, onClick })
3060
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Help_default, { help, onClick })
4339
3061
  ] });
4340
3062
  }
4341
3063
  return label;
4342
3064
  };
4343
3065
 
4344
3066
  // ../renderers/src/ReviewRenderer.tsx
4345
- var import_components49 = require("@transferwise/components");
4346
- var import_icons3 = require("@transferwise/icons");
4347
- var import_react_intl20 = require("react-intl");
4348
- var import_jsx_runtime72 = require("react/jsx-runtime");
3067
+ var import_components43 = require("@transferwise/components");
3068
+ var import_icons2 = require("@transferwise/icons");
3069
+ var import_react_intl19 = require("react-intl");
3070
+ var import_jsx_runtime64 = require("react/jsx-runtime");
4349
3071
  var IGNORED_CONTROLS = [
4350
3072
  "horizontal",
4351
3073
  "horizontal-end-aligned",
@@ -4355,7 +3077,7 @@ var IGNORED_CONTROLS = [
4355
3077
  var ReviewRenderer2 = {
4356
3078
  canRenderType: "review",
4357
3079
  canRender: ({ control }) => control ? !IGNORED_CONTROLS.includes(control) : true,
4358
- render: (props) => /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Review, __spreadValues({}, props))
3080
+ render: (props) => /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Review, __spreadValues({}, props))
4359
3081
  };
4360
3082
  var Review = ({
4361
3083
  callToAction,
@@ -4366,9 +3088,9 @@ var Review = ({
4366
3088
  title,
4367
3089
  trackEvent
4368
3090
  }) => {
4369
- const intl = (0, import_react_intl20.useIntl)();
4370
- return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: getMargin(margin), children: [
4371
- /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Header, { title, callToAction }),
3091
+ const intl = (0, import_react_intl19.useIntl)();
3092
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: getMargin(margin), children: [
3093
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Header5, { title, callToAction }),
4372
3094
  fields.map((field) => {
4373
3095
  var _a, _b, _c;
4374
3096
  const {
@@ -4386,8 +3108,8 @@ var Review = ({
4386
3108
  ctaSecondary: (_a = itemTags == null ? void 0 : itemTags.includes("cta-secondary")) != null ? _a : false,
4387
3109
  fullyInteractive: (_b = (tags == null ? void 0 : tags.includes("fully-interactive")) && (additionalInfo == null ? void 0 : additionalInfo.onClick) == null) != null ? _b : false
4388
3110
  };
4389
- return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
4390
- import_components49.ListItem,
3111
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
3112
+ import_components43.ListItem,
4391
3113
  {
4392
3114
  title: value,
4393
3115
  subtitle: label,
@@ -4407,18 +3129,18 @@ var Review = ({
4407
3129
  ] });
4408
3130
  };
4409
3131
  var getHelpControl = (help, ariaLabel, onClick) => {
4410
- return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_components49.Popover, { content: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_components49.Markdown, { config: { link: { target: "_blank" } }, children: help }), children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_components49.ListItem.IconButton, { partiallyInteractive: true, "aria-label": ariaLabel, onClick, children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_icons3.QuestionMarkCircle, {}) }) });
3132
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_components43.Popover, { content: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_components43.Markdown, { config: { link: { target: "_blank" } }, children: help }), children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_components43.ListItem.IconButton, { partiallyInteractive: true, "aria-label": ariaLabel, onClick, children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_icons2.QuestionMarkCircle, {}) }) });
4411
3133
  };
4412
3134
  var ReviewRenderer_default = ReviewRenderer2;
4413
3135
 
4414
3136
  // ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
4415
- var import_components51 = require("@transferwise/components");
4416
- var import_react18 = require("react");
4417
- var import_react_intl24 = require("react-intl");
3137
+ var import_components45 = require("@transferwise/components");
3138
+ var import_react17 = require("react");
3139
+ var import_react_intl23 = require("react-intl");
4418
3140
 
4419
3141
  // ../renderers/src/messages/search.messages.ts
4420
- var import_react_intl21 = require("react-intl");
4421
- var search_messages_default = (0, import_react_intl21.defineMessages)({
3142
+ var import_react_intl20 = require("react-intl");
3143
+ var search_messages_default = (0, import_react_intl20.defineMessages)({
4422
3144
  loading: {
4423
3145
  id: "df.wise.SearchLayout.loading",
4424
3146
  defaultMessage: "Loading...",
@@ -4427,11 +3149,11 @@ var search_messages_default = (0, import_react_intl21.defineMessages)({
4427
3149
  });
4428
3150
 
4429
3151
  // ../renderers/src/SearchRenderer/ErrorResult.tsx
4430
- var import_react_intl23 = require("react-intl");
3152
+ var import_react_intl22 = require("react-intl");
4431
3153
 
4432
3154
  // ../renderers/src/messages/generic-error.messages.ts
4433
- var import_react_intl22 = require("react-intl");
4434
- var generic_error_messages_default = (0, import_react_intl22.defineMessages)({
3155
+ var import_react_intl21 = require("react-intl");
3156
+ var generic_error_messages_default = (0, import_react_intl21.defineMessages)({
4435
3157
  genericErrorRetryHint: {
4436
3158
  id: "df.wise.PersistAsyncSchema.genericError",
4437
3159
  defaultMessage: "Something went wrong, please try again.",
@@ -4450,20 +3172,20 @@ var generic_error_messages_default = (0, import_react_intl22.defineMessages)({
4450
3172
  });
4451
3173
 
4452
3174
  // ../renderers/src/SearchRenderer/ErrorResult.tsx
4453
- var import_components50 = require("@transferwise/components");
4454
- var import_jsx_runtime73 = require("react/jsx-runtime");
3175
+ var import_components44 = require("@transferwise/components");
3176
+ var import_jsx_runtime65 = require("react/jsx-runtime");
4455
3177
  function ErrorResult({ state }) {
4456
- const intl = (0, import_react_intl23.useIntl)();
4457
- return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("p", { className: "m-t-2", children: [
3178
+ const intl = (0, import_react_intl22.useIntl)();
3179
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("p", { className: "m-t-2", children: [
4458
3180
  intl.formatMessage(generic_error_messages_default.genericError),
4459
3181
  "\xA0",
4460
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_components50.Link, { onClick: () => state.onRetry(), children: intl.formatMessage(generic_error_messages_default.retry) })
3182
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_components44.Link, { onClick: () => state.onRetry(), children: intl.formatMessage(generic_error_messages_default.retry) })
4461
3183
  ] });
4462
3184
  }
4463
3185
 
4464
3186
  // ../renderers/src/SearchRenderer/BlockSearchRendererComponent.tsx
4465
- var import_icons4 = require("@transferwise/icons");
4466
- var import_jsx_runtime74 = require("react/jsx-runtime");
3187
+ var import_icons3 = require("@transferwise/icons");
3188
+ var import_jsx_runtime66 = require("react/jsx-runtime");
4467
3189
  function BlockSearchRendererComponent({
4468
3190
  id,
4469
3191
  hint,
@@ -4476,10 +3198,10 @@ function BlockSearchRendererComponent({
4476
3198
  trackEvent,
4477
3199
  onChange
4478
3200
  }) {
4479
- const [hasSearched, setHasSearched] = (0, import_react18.useState)(false);
4480
- const { formatMessage } = (0, import_react_intl24.useIntl)();
4481
- return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: getMargin(margin), children: [
4482
- /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
3201
+ const [hasSearched, setHasSearched] = (0, import_react17.useState)(false);
3202
+ const { formatMessage } = (0, import_react_intl23.useIntl)();
3203
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: getMargin(margin), children: [
3204
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
4483
3205
  FieldInput_default,
4484
3206
  {
4485
3207
  id,
@@ -4488,8 +3210,8 @@ function BlockSearchRendererComponent({
4488
3210
  help: "",
4489
3211
  label: title,
4490
3212
  features,
4491
- children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_components51.InputGroup, { addonStart: { content: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_icons4.Search, { size: 24 }) }, children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
4492
- import_components51.Input,
3213
+ children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_components45.InputGroup, { addonStart: { content: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_icons3.Search, { size: 24 }) }, children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
3214
+ import_components45.Input,
4493
3215
  {
4494
3216
  id,
4495
3217
  name: id,
@@ -4508,7 +3230,7 @@ function BlockSearchRendererComponent({
4508
3230
  ) })
4509
3231
  }
4510
3232
  ),
4511
- isLoading ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { children: formatMessage(search_messages_default.loading) }) : /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(SearchResultContent, { state, trackEvent })
3233
+ isLoading ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { children: formatMessage(search_messages_default.loading) }) : /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(SearchResultContent, { state, trackEvent })
4512
3234
  ] });
4513
3235
  }
4514
3236
  function SearchResultContent({
@@ -4517,39 +3239,39 @@ function SearchResultContent({
4517
3239
  }) {
4518
3240
  switch (state.type) {
4519
3241
  case "error":
4520
- return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(ErrorResult, { state });
3242
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(ErrorResult, { state });
4521
3243
  case "results":
4522
- return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(SearchResults, { state, trackEvent });
3244
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(SearchResults, { state, trackEvent });
4523
3245
  case "layout":
4524
- return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(import_jsx_runtime74.Fragment, { children: [
3246
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_jsx_runtime66.Fragment, { children: [
4525
3247
  " ",
4526
3248
  state.layout,
4527
3249
  " "
4528
3250
  ] });
4529
3251
  case "noResults":
4530
- return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(EmptySearchResult, { state });
3252
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(EmptySearchResult, { state });
4531
3253
  case "pending":
4532
3254
  default:
4533
3255
  return null;
4534
3256
  }
4535
3257
  }
4536
3258
  function EmptySearchResult({ state }) {
4537
- return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_components51.Markdown, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
3259
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_components45.Markdown, { className: "m-t-2", config: { link: { target: "_blank" } }, children: state.message });
4538
3260
  }
4539
3261
  function SearchResults({
4540
3262
  state,
4541
3263
  trackEvent
4542
3264
  }) {
4543
- return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_components51.List, { children: state.results.map((result) => {
3265
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_components45.List, { children: state.results.map((result) => {
4544
3266
  const { media } = result;
4545
- return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
4546
- import_components51.ListItem,
3267
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
3268
+ import_components45.ListItem,
4547
3269
  {
4548
3270
  title: result.title,
4549
3271
  subtitle: result.description,
4550
- media: media ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(OptionMedia, { media, preferAvatar: false }) : void 0,
4551
- control: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
4552
- import_components51.ListItem.Navigation,
3272
+ media: media ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(OptionMedia, { media, preferAvatar: false }) : void 0,
3273
+ control: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
3274
+ import_components45.ListItem.Navigation,
4553
3275
  {
4554
3276
  onClick: () => {
4555
3277
  trackEvent("Search Result Selected", __spreadValues({
@@ -4567,11 +3289,11 @@ function SearchResults({
4567
3289
  var BlockSearchRendererComponent_default = BlockSearchRendererComponent;
4568
3290
 
4569
3291
  // ../renderers/src/SearchRenderer/InlineSearchRendererComponent.tsx
4570
- var import_components52 = require("@transferwise/components");
4571
- var import_icons5 = require("@transferwise/icons");
4572
- var import_react19 = require("react");
4573
- var import_react_intl25 = require("react-intl");
4574
- var import_jsx_runtime75 = require("react/jsx-runtime");
3292
+ var import_components46 = require("@transferwise/components");
3293
+ var import_icons4 = require("@transferwise/icons");
3294
+ var import_react18 = require("react");
3295
+ var import_react_intl24 = require("react-intl");
3296
+ var import_jsx_runtime67 = require("react/jsx-runtime");
4575
3297
  function InlineSearchRenderer({
4576
3298
  id,
4577
3299
  hint,
@@ -4583,9 +3305,9 @@ function InlineSearchRenderer({
4583
3305
  onChange,
4584
3306
  trackEvent
4585
3307
  }) {
4586
- const [hasSearched, setHasSearched] = (0, import_react19.useState)(false);
4587
- const intl = (0, import_react_intl25.useIntl)();
4588
- return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: getMargin(margin), children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
3308
+ const [hasSearched, setHasSearched] = (0, import_react18.useState)(false);
3309
+ const intl = (0, import_react_intl24.useIntl)();
3310
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: getMargin(margin), children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
4589
3311
  FieldInput_default,
4590
3312
  {
4591
3313
  id,
@@ -4594,8 +3316,8 @@ function InlineSearchRenderer({
4594
3316
  help: "",
4595
3317
  label: title,
4596
3318
  features,
4597
- children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
4598
- import_components52.Typeahead,
3319
+ children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
3320
+ import_components46.Typeahead,
4599
3321
  {
4600
3322
  id: "typeahead-input-id",
4601
3323
  intl,
@@ -4603,10 +3325,10 @@ function InlineSearchRenderer({
4603
3325
  size: "md",
4604
3326
  placeholder: hint,
4605
3327
  maxHeight: 100,
4606
- footer: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(TypeaheadFooter, { state, isLoading }),
3328
+ footer: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(TypeaheadFooter, { state, isLoading }),
4607
3329
  multiple: false,
4608
3330
  clearable: false,
4609
- addon: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_icons5.Search, { size: 24 }),
3331
+ addon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_icons4.Search, { size: 24 }),
4610
3332
  options: state.type === "results" ? state.results.map(mapResultToTypeaheadOption) : [],
4611
3333
  minQueryLength: 1,
4612
3334
  onChange: (values) => {
@@ -4643,33 +3365,33 @@ function mapResultToTypeaheadOption(result) {
4643
3365
  };
4644
3366
  }
4645
3367
  function TypeaheadFooter({ state, isLoading }) {
4646
- const { formatMessage } = (0, import_react_intl25.useIntl)();
3368
+ const { formatMessage } = (0, import_react_intl24.useIntl)();
4647
3369
  if (state.type === "layout") {
4648
- return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: "m-x-1 m-y-1", children: state.layout });
3370
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "m-x-1 m-y-1", children: state.layout });
4649
3371
  }
4650
3372
  if (state.type === "noResults") {
4651
- return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_components52.Markdown, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
3373
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_components46.Markdown, { className: "m-t-2 m-x-2", config: { link: { target: "_blank" } }, children: state.message });
4652
3374
  }
4653
3375
  if (state.type === "error") {
4654
- return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(ErrorResult, { state }) });
3376
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "m-t-2 m-x-2", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(ErrorResult, { state }) });
4655
3377
  }
4656
3378
  if (state.type === "pending" || isLoading) {
4657
- return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("p", { className: "m-t-2 m-x-2", children: formatMessage(search_messages_default.loading) });
3379
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("p", { className: "m-t-2 m-x-2", children: formatMessage(search_messages_default.loading) });
4658
3380
  }
4659
3381
  return null;
4660
3382
  }
4661
3383
  var InlineSearchRendererComponent_default = InlineSearchRenderer;
4662
3384
 
4663
3385
  // ../renderers/src/SearchRenderer/SearchRenderer.tsx
4664
- var import_jsx_runtime76 = require("react/jsx-runtime");
3386
+ var import_jsx_runtime68 = require("react/jsx-runtime");
4665
3387
  var SearchRenderer = {
4666
3388
  canRenderType: "search",
4667
- render: (props) => props.control === "inline" ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(BlockSearchRendererComponent_default, __spreadValues({}, props))
3389
+ render: (props) => props.control === "inline" ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(InlineSearchRendererComponent_default, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(BlockSearchRendererComponent_default, __spreadValues({}, props))
4668
3390
  };
4669
3391
  var SearchRenderer_default = SearchRenderer;
4670
3392
 
4671
3393
  // ../renderers/src/SectionRenderer.tsx
4672
- var import_components53 = require("@transferwise/components");
3394
+ var import_components47 = require("@transferwise/components");
4673
3395
 
4674
3396
  // ../renderers/src/utils/getHeaderAction.tsx
4675
3397
  var getHeaderAction2 = (callToAction) => {
@@ -4693,12 +3415,12 @@ var getHeaderAction2 = (callToAction) => {
4693
3415
  };
4694
3416
 
4695
3417
  // ../renderers/src/SectionRenderer.tsx
4696
- var import_jsx_runtime77 = require("react/jsx-runtime");
3418
+ var import_jsx_runtime69 = require("react/jsx-runtime");
4697
3419
  var SectionRenderer = {
4698
3420
  canRenderType: "section",
4699
3421
  render: ({ children, callToAction, margin, title }) => {
4700
- return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("section", { className: getMargin(margin), children: [
4701
- (title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_components53.Header, { title: title != null ? title : "", action: getHeaderAction2(callToAction) }),
3422
+ return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("section", { className: getMargin(margin), children: [
3423
+ (title || callToAction) && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_components47.Header, { title: title != null ? title : "", action: getHeaderAction2(callToAction) }),
4702
3424
  children
4703
3425
  ] });
4704
3426
  }
@@ -4706,8 +3428,8 @@ var SectionRenderer = {
4706
3428
  var SectionRenderer_default = SectionRenderer;
4707
3429
 
4708
3430
  // ../renderers/src/SelectInputRenderer/RadioInputRendererComponent.tsx
4709
- var import_components54 = require("@transferwise/components");
4710
- var import_jsx_runtime78 = require("react/jsx-runtime");
3431
+ var import_components48 = require("@transferwise/components");
3432
+ var import_jsx_runtime70 = require("react/jsx-runtime");
4711
3433
  function RadioInputRendererComponent(props) {
4712
3434
  const {
4713
3435
  id,
@@ -4722,8 +3444,8 @@ function RadioInputRendererComponent(props) {
4722
3444
  validationState,
4723
3445
  onSelect
4724
3446
  } = props;
4725
- return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_jsx_runtime78.Fragment, { children: [
4726
- /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
3447
+ return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(import_jsx_runtime70.Fragment, { children: [
3448
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
4727
3449
  FieldInput_default,
4728
3450
  {
4729
3451
  id,
@@ -4732,8 +3454,8 @@ function RadioInputRendererComponent(props) {
4732
3454
  description,
4733
3455
  validation: validationState,
4734
3456
  features,
4735
- children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
4736
- import_components54.RadioGroup,
3457
+ children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
3458
+ import_components48.RadioGroup,
4737
3459
  {
4738
3460
  name: id,
4739
3461
  radios: options.map((option, index) => ({
@@ -4741,7 +3463,7 @@ function RadioInputRendererComponent(props) {
4741
3463
  value: index,
4742
3464
  secondary: option.description,
4743
3465
  disabled: option.disabled || disabled,
4744
- avatar: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(OptionMedia, { media: option.media, preferAvatar: false })
3466
+ avatar: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(OptionMedia, { media: option.media, preferAvatar: false })
4745
3467
  })),
4746
3468
  selectedValue: selectedIndex != null ? selectedIndex : void 0,
4747
3469
  onChange: onSelect
@@ -4755,9 +3477,9 @@ function RadioInputRendererComponent(props) {
4755
3477
  }
4756
3478
 
4757
3479
  // ../renderers/src/SelectInputRenderer/TabInputRendererComponent.tsx
4758
- var import_components55 = require("@transferwise/components");
4759
- var import_react20 = require("react");
4760
- var import_jsx_runtime79 = require("react/jsx-runtime");
3480
+ var import_components49 = require("@transferwise/components");
3481
+ var import_react19 = require("react");
3482
+ var import_jsx_runtime71 = require("react/jsx-runtime");
4761
3483
  function TabInputRendererComponent(props) {
4762
3484
  const {
4763
3485
  id,
@@ -4772,13 +3494,13 @@ function TabInputRendererComponent(props) {
4772
3494
  validationState,
4773
3495
  onSelect
4774
3496
  } = props;
4775
- (0, import_react20.useEffect)(() => {
3497
+ (0, import_react19.useEffect)(() => {
4776
3498
  if (!isValidIndex2(selectedIndex, options.length)) {
4777
3499
  onSelect(0);
4778
3500
  }
4779
3501
  }, [selectedIndex, onSelect, options.length]);
4780
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_jsx_runtime79.Fragment, { children: [
4781
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
3502
+ return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(import_jsx_runtime71.Fragment, { children: [
3503
+ /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
4782
3504
  FieldInput_default,
4783
3505
  {
4784
3506
  id,
@@ -4787,8 +3509,8 @@ function TabInputRendererComponent(props) {
4787
3509
  description,
4788
3510
  validation: validationState,
4789
3511
  features,
4790
- children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
4791
- import_components55.Tabs,
3512
+ children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
3513
+ import_components49.Tabs,
4792
3514
  {
4793
3515
  name: id,
4794
3516
  selected: selectedIndex != null ? selectedIndex : 0,
@@ -4796,7 +3518,7 @@ function TabInputRendererComponent(props) {
4796
3518
  title: option.title,
4797
3519
  // if we pass null, we get some props-types console errors
4798
3520
  // eslint-disable-next-line react/jsx-no-useless-fragment
4799
- content: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_jsx_runtime79.Fragment, {}),
3521
+ content: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_jsx_runtime71.Fragment, {}),
4800
3522
  disabled: option.disabled || disabled
4801
3523
  })),
4802
3524
  onTabSelect: onSelect
@@ -4810,8 +3532,8 @@ function TabInputRendererComponent(props) {
4810
3532
  var isValidIndex2 = (index, options) => index !== null && index >= 0 && index < options;
4811
3533
 
4812
3534
  // ../renderers/src/SelectInputRenderer/SelectInputRendererComponent.tsx
4813
- var import_components56 = require("@transferwise/components");
4814
- var import_jsx_runtime80 = require("react/jsx-runtime");
3535
+ var import_components50 = require("@transferwise/components");
3536
+ var import_jsx_runtime72 = require("react/jsx-runtime");
4815
3537
  function SelectInputRendererComponent(props) {
4816
3538
  const {
4817
3539
  id,
@@ -4852,13 +3574,13 @@ function SelectInputRendererComponent(props) {
4852
3574
  } : {
4853
3575
  title: option.title,
4854
3576
  description: option.description,
4855
- icon: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(OptionMedia, { media: option.media, preferAvatar: false })
3577
+ icon: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(OptionMedia, { media: option.media, preferAvatar: false })
4856
3578
  };
4857
- return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_components56.SelectInputOptionContent, __spreadValues({}, contentProps));
3579
+ return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_components50.SelectInputOptionContent, __spreadValues({}, contentProps));
4858
3580
  };
4859
3581
  const extraProps = { autoComplete };
4860
- return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(import_jsx_runtime80.Fragment, { children: [
4861
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
3582
+ return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(import_jsx_runtime72.Fragment, { children: [
3583
+ /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
4862
3584
  FieldInput_default,
4863
3585
  {
4864
3586
  id,
@@ -4867,8 +3589,8 @@ function SelectInputRendererComponent(props) {
4867
3589
  description,
4868
3590
  validation: validationState,
4869
3591
  features,
4870
- children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
4871
- import_components56.SelectInput,
3592
+ children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
3593
+ import_components50.SelectInput,
4872
3594
  __spreadValues({
4873
3595
  name: id,
4874
3596
  placeholder,
@@ -4888,9 +3610,9 @@ function SelectInputRendererComponent(props) {
4888
3610
  }
4889
3611
 
4890
3612
  // ../renderers/src/SelectInputRenderer/SegmentedInputRendererComponent.tsx
4891
- var import_react21 = require("react");
4892
- var import_components57 = require("@transferwise/components");
4893
- var import_jsx_runtime81 = require("react/jsx-runtime");
3613
+ var import_react20 = require("react");
3614
+ var import_components51 = require("@transferwise/components");
3615
+ var import_jsx_runtime73 = require("react/jsx-runtime");
4894
3616
  function SegmentedInputRendererComponent(props) {
4895
3617
  const {
4896
3618
  id,
@@ -4904,13 +3626,13 @@ function SegmentedInputRendererComponent(props) {
4904
3626
  validationState,
4905
3627
  onSelect
4906
3628
  } = props;
4907
- (0, import_react21.useEffect)(() => {
3629
+ (0, import_react20.useEffect)(() => {
4908
3630
  if (!isValidIndex3(selectedIndex, options.length)) {
4909
3631
  onSelect(0);
4910
3632
  }
4911
3633
  }, [selectedIndex, onSelect, options.length]);
4912
- return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_jsx_runtime81.Fragment, { children: [
4913
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
3634
+ return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(import_jsx_runtime73.Fragment, { children: [
3635
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
4914
3636
  FieldInput_default,
4915
3637
  {
4916
3638
  id,
@@ -4919,8 +3641,8 @@ function SegmentedInputRendererComponent(props) {
4919
3641
  description,
4920
3642
  validation: validationState,
4921
3643
  features,
4922
- children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
4923
- import_components57.SegmentedControl,
3644
+ children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
3645
+ import_components51.SegmentedControl,
4924
3646
  {
4925
3647
  name: `${id}-segmented-control`,
4926
3648
  value: String(selectedIndex),
@@ -4936,14 +3658,14 @@ function SegmentedInputRendererComponent(props) {
4936
3658
  )
4937
3659
  }
4938
3660
  ),
4939
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { id: `${id}-children`, children })
3661
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { id: `${id}-children`, children })
4940
3662
  ] });
4941
3663
  }
4942
3664
  var isValidIndex3 = (index, options) => index !== null && index >= 0 && index < options;
4943
3665
 
4944
3666
  // ../renderers/src/SelectInputRenderer/RadioItemRendererComponent.tsx
4945
- var import_components58 = require("@transferwise/components");
4946
- var import_jsx_runtime82 = require("react/jsx-runtime");
3667
+ var import_components52 = require("@transferwise/components");
3668
+ var import_jsx_runtime74 = require("react/jsx-runtime");
4947
3669
  function RadioItemRendererComponent(props) {
4948
3670
  const {
4949
3671
  id,
@@ -4959,23 +3681,23 @@ function RadioItemRendererComponent(props) {
4959
3681
  onSelect
4960
3682
  } = props;
4961
3683
  const { ref } = useScrollToError(validationState, features);
4962
- return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { ref, children: [
4963
- rootTitle && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
4964
- import_components58.Header,
3684
+ return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { ref, children: [
3685
+ rootTitle && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
3686
+ import_components52.Header,
4965
3687
  {
4966
3688
  as: "h2",
4967
- title: help ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(LabelContentWithHelp, { text: rootTitle, help }) : rootTitle
3689
+ title: help ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(LabelContentWithHelp, { text: rootTitle, help }) : rootTitle
4968
3690
  }
4969
3691
  ),
4970
- rootDescription && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("p", { children: rootDescription }),
4971
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_components58.List, { children: options.map(
4972
- ({ title, description, additionalText, inlineAlert, disabled, media, supportingValues }, index) => /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
4973
- import_components58.ListItem,
3692
+ rootDescription && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("p", { children: rootDescription }),
3693
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_components52.List, { children: options.map(
3694
+ ({ title, description, additionalText, inlineAlert, disabled, media, supportingValues }, index) => /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
3695
+ import_components52.ListItem,
4974
3696
  __spreadValues({
4975
3697
  title,
4976
3698
  subtitle: description,
4977
- control: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
4978
- import_components58.ListItem.Radio,
3699
+ control: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
3700
+ import_components52.ListItem.Radio,
4979
3701
  {
4980
3702
  name: title,
4981
3703
  checked: selectedIndex === index,
@@ -4990,50 +3712,50 @@ function RadioItemRendererComponent(props) {
4990
3712
  title
4991
3713
  )
4992
3714
  ) }, `${id}-${selectedIndex}`),
4993
- (validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_components58.InlineAlert, { type: "negative", children: validationState.message }),
3715
+ (validationState == null ? void 0 : validationState.status) === "invalid" && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_components52.InlineAlert, { type: "negative", children: validationState.message }),
4994
3716
  children
4995
3717
  ] });
4996
3718
  }
4997
3719
 
4998
3720
  // ../renderers/src/SelectInputRenderer/SelectInputRenderer.tsx
4999
- var import_jsx_runtime83 = require("react/jsx-runtime");
3721
+ var import_jsx_runtime75 = require("react/jsx-runtime");
5000
3722
  var SelectInputRenderer = {
5001
3723
  canRenderType: "input-select",
5002
3724
  render: (props) => {
5003
3725
  switch (props.control) {
5004
3726
  case "radio":
5005
- return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(RadioInputRendererComponent, __spreadValues({}, props));
3727
+ return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(RadioInputRendererComponent, __spreadValues({}, props));
5006
3728
  case "radio-item":
5007
- return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(RadioItemRendererComponent, __spreadValues({}, props));
3729
+ return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(RadioItemRendererComponent, __spreadValues({}, props));
5008
3730
  case "tab":
5009
- return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(TabInputRendererComponent, __spreadValues({}, props));
3731
+ return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(TabInputRendererComponent, __spreadValues({}, props));
5010
3732
  case "segmented":
5011
- return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(SegmentedInputRendererComponent, __spreadValues({}, props));
3733
+ return props.options.length > 3 ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(SelectInputRendererComponent, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(SegmentedInputRendererComponent, __spreadValues({}, props));
5012
3734
  case "select":
5013
3735
  default:
5014
- return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(SelectInputRendererComponent, __spreadValues({}, props));
3736
+ return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(SelectInputRendererComponent, __spreadValues({}, props));
5015
3737
  }
5016
3738
  }
5017
3739
  };
5018
3740
  var SelectInputRenderer_default = SelectInputRenderer;
5019
3741
 
5020
3742
  // ../renderers/src/StatusListRenderer.tsx
5021
- var import_components59 = require("@transferwise/components");
5022
- var import_jsx_runtime84 = require("react/jsx-runtime");
3743
+ var import_components53 = require("@transferwise/components");
3744
+ var import_jsx_runtime76 = require("react/jsx-runtime");
5023
3745
  var StatusListRenderer = {
5024
3746
  canRenderType: "status-list",
5025
- render: ({ margin, items, title }) => /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: getMargin(margin), children: [
5026
- title ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_components59.Header, { title }) : null,
3747
+ render: ({ margin, items, title }) => /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: getMargin(margin), children: [
3748
+ title ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_components53.Header, { title }) : null,
5027
3749
  items.map((item) => {
5028
3750
  const { callToAction, description, title: itemTitle } = item;
5029
- return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
5030
- import_components59.ListItem,
3751
+ return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
3752
+ import_components53.ListItem,
5031
3753
  {
5032
3754
  title: itemTitle,
5033
3755
  subtitle: description,
5034
- media: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(StatusListItemMedia, __spreadValues({}, item)),
5035
- additionalInfo: callToAction ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
5036
- import_components59.ListItem.AdditionalInfo,
3756
+ media: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(StatusListItemMedia, __spreadValues({}, item)),
3757
+ additionalInfo: callToAction ? /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
3758
+ import_components53.ListItem.AdditionalInfo,
5037
3759
  {
5038
3760
  action: __spreadValues({
5039
3761
  label: callToAction.title
@@ -5051,10 +3773,10 @@ var StatusListItemMedia = ({ icon, status }) => {
5051
3773
  return void 0;
5052
3774
  }
5053
3775
  if ("name" in icon) {
5054
- return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_components59.AvatarView, { badge: { status: mapStatus(status) }, children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(DynamicIcon_default, { name: icon.name }) });
3776
+ return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_components53.AvatarView, { badge: { status: mapStatus(status) }, children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(DynamicIcon_default, { name: icon.name }) });
5055
3777
  }
5056
3778
  if ("text" in icon) {
5057
- return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_components59.AvatarView, { badge: { status: mapStatus(status) }, children: icon.text });
3779
+ return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(import_components53.AvatarView, { badge: { status: mapStatus(status) }, children: icon.text });
5058
3780
  }
5059
3781
  return void 0;
5060
3782
  };
@@ -5072,12 +3794,12 @@ var StatusListRenderer_default = StatusListRenderer;
5072
3794
 
5073
3795
  // ../renderers/src/utils/useCustomTheme.ts
5074
3796
  var import_components_theming = require("@wise/components-theming");
5075
- var import_react22 = require("react");
3797
+ var import_react21 = require("react");
5076
3798
  var ThemeRequiredEventName = "Theme Required";
5077
3799
  var useCustomTheme = (theme, trackEvent) => {
5078
3800
  const theming = (0, import_components_theming.useTheme)();
5079
- const previousTheme = (0, import_react22.useMemo)(() => theming.theme, []);
5080
- (0, import_react22.useEffect)(() => {
3801
+ const previousTheme = (0, import_react21.useMemo)(() => theming.theme, []);
3802
+ (0, import_react21.useEffect)(() => {
5081
3803
  theming.setTheme(theme);
5082
3804
  trackEvent(ThemeRequiredEventName, { theme });
5083
3805
  return theme !== previousTheme ? () => {
@@ -5088,14 +3810,86 @@ var useCustomTheme = (theme, trackEvent) => {
5088
3810
  }, []);
5089
3811
  };
5090
3812
 
3813
+ // ../renderers/src/step/StepFooter.tsx
3814
+ var import_components54 = require("@transferwise/components");
3815
+ var import_react22 = require("react");
3816
+ var import_react_intl26 = require("react-intl");
3817
+
3818
+ // ../renderers/src/messages/step.messages.ts
3819
+ var import_react_intl25 = require("react-intl");
3820
+ var step_messages_default = (0, import_react_intl25.defineMessages)({
3821
+ scrollToBottom: {
3822
+ id: "df.wise.step.scrollToBottom",
3823
+ defaultMessage: "Scroll to bottom",
3824
+ description: "Label for a button that appears when the content of a step is too long and the user needs to scroll to the bottom to see all the content."
3825
+ }
3826
+ });
3827
+
3828
+ // ../renderers/src/step/StepFooter.tsx
3829
+ var import_jsx_runtime77 = require("react/jsx-runtime");
3830
+ var SCROLL_TO_BOTTOM = "scroll-to-bottom";
3831
+ var StepFooter = ({ footer, tags }) => {
3832
+ if (tags == null ? void 0 : tags.includes(SCROLL_TO_BOTTOM)) {
3833
+ return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(FooterWithScrollButton, { footer });
3834
+ }
3835
+ return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(DefaultFooter, { footer });
3836
+ };
3837
+ var DefaultFooter = ({ footer }) => {
3838
+ const hasFooter = footer && Array.isArray(footer) && footer.length > 0;
3839
+ return hasFooter ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "df-step-fixed__footer", children: footer }) : void 0;
3840
+ };
3841
+ var FooterWithScrollButton = ({ footer }) => {
3842
+ const { formatMessage } = (0, import_react_intl26.useIntl)();
3843
+ const endOfLayoutRef = (0, import_react22.useRef)(null);
3844
+ const isElementVisible = useIsElementVisible(endOfLayoutRef);
3845
+ const scrollButton = /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
3846
+ import_components54.Button,
3847
+ {
3848
+ className: "m-b-1",
3849
+ v2: true,
3850
+ block: true,
3851
+ priority: "tertiary",
3852
+ onClick: () => {
3853
+ var _a;
3854
+ (_a = endOfLayoutRef.current) == null ? void 0 : _a.scrollIntoView({ behavior: "smooth" });
3855
+ },
3856
+ children: formatMessage(step_messages_default.scrollToBottom)
3857
+ }
3858
+ );
3859
+ const hasStepFooterContent = footer && Array.isArray(footer) && footer.length > 0;
3860
+ if (isElementVisible && !hasStepFooterContent) {
3861
+ return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { ref: endOfLayoutRef, "aria-hidden": "true" });
3862
+ }
3863
+ return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_jsx_runtime77.Fragment, { children: [
3864
+ /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { ref: endOfLayoutRef, "aria-hidden": "true" }),
3865
+ /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "df-step-fixed__footer", children: [
3866
+ !isElementVisible && scrollButton,
3867
+ footer
3868
+ ] })
3869
+ ] });
3870
+ };
3871
+ var useIsElementVisible = (elementRef) => {
3872
+ const [isVisible, setIsVisible] = (0, import_react22.useState)(false);
3873
+ (0, import_react22.useEffect)(() => {
3874
+ const element = elementRef.current;
3875
+ if (!element) return;
3876
+ const observer = new IntersectionObserver(([entry]) => {
3877
+ setIsVisible(entry.isIntersecting);
3878
+ });
3879
+ observer.observe(element);
3880
+ return () => observer.disconnect();
3881
+ }, [elementRef]);
3882
+ return isVisible;
3883
+ };
3884
+
5091
3885
  // ../renderers/src/step/StepHeader.tsx
5092
- var import_components60 = require("@transferwise/components");
5093
- var import_jsx_runtime85 = require("react/jsx-runtime");
3886
+ var import_components55 = require("@transferwise/components");
3887
+ var import_jsx_runtime78 = require("react/jsx-runtime");
5094
3888
  var StepHeader = ({ title, description, tags }) => {
5095
3889
  const { titleType, alignmentClassName } = getHeaderStyle(tags);
5096
- return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(import_jsx_runtime85.Fragment, { children: [
5097
- title ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_components60.Title, { as: "h1", type: titleType, className: `${alignmentClassName} m-b-2`, children: title }) : void 0,
5098
- description ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("p", { className: `${alignmentClassName} np-text-body-large`, children: description }) : void 0
3890
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_jsx_runtime78.Fragment, { children: [
3891
+ title ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_components55.Title, { as: "h1", type: titleType, className: `${alignmentClassName} m-b-2`, children: title }) : void 0,
3892
+ description ? /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("p", { className: `${alignmentClassName} np-text-body-large`, children: description }) : void 0
5099
3893
  ] });
5100
3894
  };
5101
3895
  var getHeaderStyle = (tags) => {
@@ -5106,13 +3900,13 @@ var getHeaderStyle = (tags) => {
5106
3900
  };
5107
3901
 
5108
3902
  // ../renderers/src/step/topbar/BackButton.tsx
5109
- var import_components61 = require("@transferwise/components");
5110
- var import_icons6 = require("@transferwise/icons");
5111
- var import_react_intl27 = require("react-intl");
3903
+ var import_components56 = require("@transferwise/components");
3904
+ var import_icons5 = require("@transferwise/icons");
3905
+ var import_react_intl28 = require("react-intl");
5112
3906
 
5113
3907
  // ../renderers/src/messages/back.messages.ts
5114
- var import_react_intl26 = require("react-intl");
5115
- var back_messages_default = (0, import_react_intl26.defineMessages)({
3908
+ var import_react_intl27 = require("react-intl");
3909
+ var back_messages_default = (0, import_react_intl27.defineMessages)({
5116
3910
  back: {
5117
3911
  id: "df.wise.back.label",
5118
3912
  defaultMessage: "Back",
@@ -5121,31 +3915,31 @@ var back_messages_default = (0, import_react_intl26.defineMessages)({
5121
3915
  });
5122
3916
 
5123
3917
  // ../renderers/src/step/topbar/BackButton.tsx
5124
- var import_jsx_runtime86 = require("react/jsx-runtime");
3918
+ var import_jsx_runtime79 = require("react/jsx-runtime");
5125
3919
  function BackButton({ title, onClick }) {
5126
- const { formatMessage } = (0, import_react_intl27.useIntl)();
5127
- return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(import_components61.IconButton, { className: "df-back-button", priority: "tertiary", onClick, children: [
5128
- /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "sr-only", children: title != null ? title : formatMessage(back_messages_default.back) }),
5129
- /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_icons6.ArrowLeft, {})
3920
+ const { formatMessage } = (0, import_react_intl28.useIntl)();
3921
+ return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_components56.IconButton, { className: "df-back-button", priority: "tertiary", onClick, children: [
3922
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "sr-only", children: title != null ? title : formatMessage(back_messages_default.back) }),
3923
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_icons5.ArrowLeft, {})
5130
3924
  ] });
5131
3925
  }
5132
3926
 
5133
3927
  // ../renderers/src/step/topbar/Toolbar.tsx
5134
- var import_components62 = require("@transferwise/components");
5135
- var import_jsx_runtime87 = require("react/jsx-runtime");
3928
+ var import_components57 = require("@transferwise/components");
3929
+ var import_jsx_runtime80 = require("react/jsx-runtime");
5136
3930
  var Toolbar = ({ items }) => {
5137
- return (items == null ? void 0 : items.length) > 0 ? /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "df-toolbar", children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(ToolbarButton, __spreadValues({}, item), `${item.type}-${index}-${item.title}`)) }) : null;
3931
+ return (items == null ? void 0 : items.length) > 0 ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "df-toolbar", children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(ToolbarButton, __spreadValues({}, item), `${item.type}-${index}-${item.title}`)) }) : null;
5138
3932
  };
5139
3933
  function ToolbarButton(props) {
5140
- return prefersMedia(props.control) ? /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(MediaToolbarButton, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(TextToolbarButton, __spreadValues({}, props));
3934
+ return prefersMedia(props.control) ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(MediaToolbarButton, __spreadValues({}, props)) : /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(TextToolbarButton, __spreadValues({}, props));
5141
3935
  }
5142
3936
  function MediaToolbarButton(props) {
5143
3937
  var _a;
5144
3938
  const { context, control, media, accessibilityDescription, disabled, onClick } = props;
5145
3939
  const priority = getIconButtonPriority(control);
5146
3940
  const type = getSentiment2(context);
5147
- return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
5148
- import_components62.IconButton,
3941
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(
3942
+ import_components57.IconButton,
5149
3943
  {
5150
3944
  className: "df-toolbar-button",
5151
3945
  disabled,
@@ -5154,7 +3948,7 @@ function MediaToolbarButton(props) {
5154
3948
  type,
5155
3949
  onClick,
5156
3950
  children: [
5157
- accessibilityDescription ? /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "sr-only", children: accessibilityDescription }) : null,
3951
+ accessibilityDescription ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: "sr-only", children: accessibilityDescription }) : null,
5158
3952
  media ? (_a = getAddonStartMedia(media)) == null ? void 0 : _a.value : null
5159
3953
  ]
5160
3954
  }
@@ -5165,8 +3959,8 @@ function TextToolbarButton(props) {
5165
3959
  const addonStart = media ? getAddonStartMedia(media) : void 0;
5166
3960
  const priority = getPriority2(control);
5167
3961
  const sentiment = getSentiment2(context);
5168
- return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
5169
- import_components62.Button,
3962
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
3963
+ import_components57.Button,
5170
3964
  {
5171
3965
  v2: true,
5172
3966
  size: "sm",
@@ -5195,18 +3989,18 @@ var getIconButtonPriority = (control) => {
5195
3989
  };
5196
3990
 
5197
3991
  // ../renderers/src/step/topbar/TopBar.tsx
5198
- var import_jsx_runtime88 = require("react/jsx-runtime");
3992
+ var import_jsx_runtime81 = require("react/jsx-runtime");
5199
3993
  function TopBar({ back, toolbar, tags }) {
5200
3994
  const isBackAllowed = !(tags == null ? void 0 : tags.includes("non-dismissible"));
5201
3995
  const backCTA = isBackAllowed ? back : void 0;
5202
- return backCTA || toolbar ? /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: "d-flex m-b-2", children: [
5203
- backCTA ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(BackButton, __spreadValues({}, backCTA)) : null,
5204
- toolbar ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Toolbar, __spreadValues({}, toolbar)) : null
3996
+ return backCTA || toolbar ? /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "d-flex m-b-2", children: [
3997
+ backCTA ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(BackButton, __spreadValues({}, backCTA)) : null,
3998
+ toolbar ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Toolbar, __spreadValues({}, toolbar)) : null
5205
3999
  ] }) : null;
5206
4000
  }
5207
4001
 
5208
4002
  // ../renderers/src/step/SplashCelebrationStepRenderer.tsx
5209
- var import_jsx_runtime89 = require("react/jsx-runtime");
4003
+ var import_jsx_runtime82 = require("react/jsx-runtime");
5210
4004
  var SplashCelebrationStepRenderer = {
5211
4005
  canRenderType: "step",
5212
4006
  canRender: ({ control }) => control === "splash-celebration",
@@ -5215,16 +4009,16 @@ var SplashCelebrationStepRenderer = {
5215
4009
  function SplashCelebrationStepRendererComponent(props) {
5216
4010
  const { back, title, description, toolbar, children, footer, tags, trackEvent } = props;
5217
4011
  useCustomTheme("forest-green", trackEvent);
5218
- return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "splash-screen m-t-5", children: [
5219
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(TopBar, { back, toolbar, tags }),
5220
- title || description ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "m-b-4", children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(StepHeader, { title, description, tags }) }) : void 0,
4012
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "splash-screen m-t-5", children: [
4013
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(TopBar, { back, toolbar, tags }),
4014
+ title || description ? /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "m-b-4", children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(StepHeader, { title, description, tags }) }) : void 0,
5221
4015
  children,
5222
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(StepFooter, { footer, tags })
4016
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(StepFooter, { footer, tags })
5223
4017
  ] });
5224
4018
  }
5225
4019
 
5226
4020
  // ../renderers/src/step/SplashStepRenderer.tsx
5227
- var import_jsx_runtime90 = require("react/jsx-runtime");
4021
+ var import_jsx_runtime83 = require("react/jsx-runtime");
5228
4022
  var SplashStepRenderer = {
5229
4023
  canRenderType: "step",
5230
4024
  canRender: ({ control }) => control === "splash",
@@ -5232,63 +4026,63 @@ var SplashStepRenderer = {
5232
4026
  };
5233
4027
  function SplashStepRendererComponent(props) {
5234
4028
  const { back, title, description, toolbar, children, footer, tags } = props;
5235
- return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "splash-screen m-t-5", children: [
5236
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(TopBar, { back, toolbar, tags }),
5237
- title || description ? /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: "m-b-4", children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(StepHeader, { title, description, tags }) }) : void 0,
4029
+ return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "splash-screen m-t-5", children: [
4030
+ /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(TopBar, { back, toolbar, tags }),
4031
+ title || description ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "m-b-4", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(StepHeader, { title, description, tags }) }) : void 0,
5238
4032
  children,
5239
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(StepFooter, { footer, tags })
4033
+ /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(StepFooter, { footer, tags })
5240
4034
  ] });
5241
4035
  }
5242
4036
 
5243
4037
  // ../renderers/src/step/StepRenderer.tsx
5244
- var import_components63 = require("@transferwise/components");
5245
- var import_jsx_runtime91 = require("react/jsx-runtime");
4038
+ var import_components58 = require("@transferwise/components");
4039
+ var import_jsx_runtime84 = require("react/jsx-runtime");
5246
4040
  var StepRenderer = {
5247
4041
  canRenderType: "step",
5248
4042
  render: StepRendererComponent
5249
4043
  };
5250
4044
  function StepRendererComponent(props) {
5251
4045
  const { back, description, error, title, children, toolbar, footer, tags } = props;
5252
- return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { children: [
5253
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(TopBar, { back, toolbar, tags }),
5254
- title || description ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "m-b-4", children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(StepHeader, { title, description, tags }) }) : void 0,
5255
- error ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_components63.Alert, { type: "negative", className: "m-b-2", message: error }) : null,
4046
+ return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { children: [
4047
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(TopBar, { back, toolbar, tags }),
4048
+ title || description ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "m-b-4", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(StepHeader, { title, description, tags }) }) : void 0,
4049
+ error ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(import_components58.Alert, { type: "negative", className: "m-b-2", message: error }) : null,
5256
4050
  children,
5257
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(StepFooter, { footer, tags })
4051
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(StepFooter, { footer, tags })
5258
4052
  ] });
5259
4053
  }
5260
4054
 
5261
4055
  // ../renderers/src/TabsRenderer.tsx
5262
- var import_components64 = require("@transferwise/components");
4056
+ var import_components59 = require("@transferwise/components");
5263
4057
  var import_react23 = require("react");
5264
- var import_jsx_runtime92 = require("react/jsx-runtime");
4058
+ var import_jsx_runtime85 = require("react/jsx-runtime");
5265
4059
  var TabsRenderer = {
5266
4060
  canRenderType: "tabs",
5267
4061
  render: (props) => {
5268
4062
  switch (props.control) {
5269
4063
  case "segmented":
5270
4064
  if (props.tabs.length > 3) {
5271
- return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(TabsRendererComponent, __spreadValues({}, props));
4065
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(TabsRendererComponent, __spreadValues({}, props));
5272
4066
  }
5273
- return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(SegmentedTabsRendererComponent, __spreadValues({}, props));
4067
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(SegmentedTabsRendererComponent, __spreadValues({}, props));
5274
4068
  case "chips":
5275
- return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ChipsTabsRendererComponent, __spreadValues({}, props));
4069
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(ChipsTabsRendererComponent, __spreadValues({}, props));
5276
4070
  default:
5277
- return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(TabsRendererComponent, __spreadValues({}, props));
4071
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(TabsRendererComponent, __spreadValues({}, props));
5278
4072
  }
5279
4073
  }
5280
4074
  };
5281
4075
  function TabsRendererComponent({ uid, margin, tabs }) {
5282
4076
  const [selectedIndex, setSelectedIndex] = (0, import_react23.useState)(0);
5283
- return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: getMargin(margin), children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
5284
- import_components64.Tabs,
4077
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: getMargin(margin), children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
4078
+ import_components59.Tabs,
5285
4079
  {
5286
4080
  name: uid,
5287
4081
  selected: selectedIndex != null ? selectedIndex : 0,
5288
4082
  tabs: tabs.map((option) => ({
5289
4083
  title: option.title,
5290
4084
  disabled: false,
5291
- content: /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "m-t-2", children: [
4085
+ content: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "m-t-2", children: [
5292
4086
  " ",
5293
4087
  option.children,
5294
4088
  " "
@@ -5301,9 +4095,9 @@ function TabsRendererComponent({ uid, margin, tabs }) {
5301
4095
  function SegmentedTabsRendererComponent({ uid, margin, tabs }) {
5302
4096
  var _a;
5303
4097
  const [selectedIndex, setSelectedIndex] = (0, import_react23.useState)(0);
5304
- return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: getMargin(margin), children: [
5305
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
5306
- import_components64.SegmentedControl,
4098
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: getMargin(margin), children: [
4099
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
4100
+ import_components59.SegmentedControl,
5307
4101
  {
5308
4102
  name: uid,
5309
4103
  value: String(selectedIndex),
@@ -5317,31 +4111,31 @@ function SegmentedTabsRendererComponent({ uid, margin, tabs }) {
5317
4111
  onChange: (value) => setSelectedIndex(Number(value))
5318
4112
  }
5319
4113
  ),
5320
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { id: `${uid}-children`, className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
4114
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { id: `${uid}-children`, className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
5321
4115
  ] });
5322
4116
  }
5323
4117
  function ChipsTabsRendererComponent({ margin, tabs }) {
5324
4118
  var _a;
5325
4119
  const [selectedIndex, setSelectedIndex] = (0, import_react23.useState)(0);
5326
- return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: getMargin(margin), children: [
5327
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "chips-container", children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
5328
- import_components64.Chips,
4120
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: getMargin(margin), children: [
4121
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "chips-container", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
4122
+ import_components59.Chips,
5329
4123
  {
5330
4124
  chips: tabs.map((tab, index) => ({ label: tab.title, value: index })),
5331
4125
  selected: selectedIndex,
5332
4126
  onChange: ({ selectedValue }) => setSelectedIndex(Number(selectedValue))
5333
4127
  }
5334
4128
  ) }),
5335
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
4129
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "m-t-2", children: (_a = tabs[selectedIndex]) == null ? void 0 : _a.children })
5336
4130
  ] });
5337
4131
  }
5338
4132
 
5339
4133
  // ../renderers/src/TextInputRenderer.tsx
5340
- var import_components66 = require("@transferwise/components");
4134
+ var import_components61 = require("@transferwise/components");
5341
4135
 
5342
4136
  // ../renderers/src/components/VariableTextInput.tsx
5343
- var import_components65 = require("@transferwise/components");
5344
- var import_jsx_runtime93 = require("react/jsx-runtime");
4137
+ var import_components60 = require("@transferwise/components");
4138
+ var import_jsx_runtime86 = require("react/jsx-runtime");
5345
4139
  var commonKeys = [
5346
4140
  "autoComplete",
5347
4141
  "autoCapitalize",
@@ -5360,12 +4154,12 @@ function VariableTextInput(inputProps) {
5360
4154
  const commonProps = __spreadProps(__spreadValues({}, pick(inputProps, ...commonKeys)), { name: id });
5361
4155
  switch (control) {
5362
4156
  case "email":
5363
- return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "email", onChange }));
4157
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "email", onChange }));
5364
4158
  case "password":
5365
- return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "password", onChange }));
4159
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "password", onChange }));
5366
4160
  case "numeric": {
5367
4161
  const numericProps = __spreadProps(__spreadValues({}, commonProps), { type: "number", onWheel });
5368
- return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
4162
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
5369
4163
  TextInput,
5370
4164
  __spreadProps(__spreadValues({}, numericProps), {
5371
4165
  onChange: (newValue) => {
@@ -5376,21 +4170,21 @@ function VariableTextInput(inputProps) {
5376
4170
  );
5377
4171
  }
5378
4172
  case "phone-number":
5379
- return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_components65.PhoneNumberInput, __spreadProps(__spreadValues({ initialValue: value }, commonProps), { onChange }));
4173
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_components60.PhoneNumberInput, __spreadProps(__spreadValues({ initialValue: value }, commonProps), { onChange }));
5380
4174
  default: {
5381
- return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "text", onChange }));
4175
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(TextInput, __spreadProps(__spreadValues({}, commonProps), { type: "text", onChange }));
5382
4176
  }
5383
4177
  }
5384
4178
  }
5385
4179
  function TextInput(props) {
5386
4180
  const _a = props, { control, displayFormat, onChange } = _a, commonProps = __objRest(_a, ["control", "displayFormat", "onChange"]);
5387
- const InputWithPattern = control === "textarea" ? import_components65.TextareaWithDisplayFormat : import_components65.InputWithDisplayFormat;
5388
- const InputWithoutPattern = control === "textarea" ? import_components65.TextArea : import_components65.Input;
5389
- return displayFormat ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(InputWithPattern, __spreadProps(__spreadValues({ displayPattern: displayFormat }, commonProps), { onChange })) : /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(InputWithoutPattern, __spreadProps(__spreadValues({}, commonProps), { onChange: (e) => onChange(e.target.value) }));
4181
+ const InputWithPattern = control === "textarea" ? import_components60.TextareaWithDisplayFormat : import_components60.InputWithDisplayFormat;
4182
+ const InputWithoutPattern = control === "textarea" ? import_components60.TextArea : import_components60.Input;
4183
+ return displayFormat ? /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(InputWithPattern, __spreadProps(__spreadValues({ displayPattern: displayFormat }, commonProps), { onChange })) : /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(InputWithoutPattern, __spreadProps(__spreadValues({}, commonProps), { onChange: (e) => onChange(e.target.value) }));
5390
4184
  }
5391
4185
 
5392
4186
  // ../renderers/src/TextInputRenderer.tsx
5393
- var import_jsx_runtime94 = require("react/jsx-runtime");
4187
+ var import_jsx_runtime87 = require("react/jsx-runtime");
5394
4188
  var TextInputRenderer = {
5395
4189
  canRenderType: "input-text",
5396
4190
  render: (props) => {
@@ -5423,7 +4217,7 @@ var TextInputRenderer = {
5423
4217
  }
5424
4218
  }
5425
4219
  });
5426
- return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
4220
+ return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
5427
4221
  FieldInput_default,
5428
4222
  {
5429
4223
  id,
@@ -5434,7 +4228,7 @@ var TextInputRenderer = {
5434
4228
  loadingState: props.fieldLoadingState,
5435
4229
  help,
5436
4230
  features: props.features,
5437
- children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_components66.InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(VariableTextInput, __spreadValues({}, inputProps)) })
4231
+ children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_components61.InputGroup, { addonStart: getInputGroupAddonStart(media), children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(VariableTextInput, __spreadValues({}, inputProps)) })
5438
4232
  }
5439
4233
  );
5440
4234
  }
@@ -5442,13 +4236,13 @@ var TextInputRenderer = {
5442
4236
  var TextInputRenderer_default = TextInputRenderer;
5443
4237
 
5444
4238
  // ../renderers/src/UploadInputRenderer.tsx
5445
- var import_components67 = require("@transferwise/components");
4239
+ var import_components62 = require("@transferwise/components");
5446
4240
 
5447
4241
  // ../renderers/src/utils/getRandomId.ts
5448
4242
  var getRandomId = () => Math.random().toString(36).substring(2);
5449
4243
 
5450
4244
  // ../renderers/src/UploadInputRenderer.tsx
5451
- var import_jsx_runtime95 = require("react/jsx-runtime");
4245
+ var import_jsx_runtime88 = require("react/jsx-runtime");
5452
4246
  var UploadInputRenderer = {
5453
4247
  canRenderType: "input-upload",
5454
4248
  render: (props) => {
@@ -5475,7 +4269,7 @@ var UploadInputRenderer = {
5475
4269
  };
5476
4270
  return (
5477
4271
  // We don't pass help here as there is no sensible place to display it
5478
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
4272
+ /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
5479
4273
  UploadFieldInput_default,
5480
4274
  {
5481
4275
  id,
@@ -5483,8 +4277,8 @@ var UploadInputRenderer = {
5483
4277
  description: void 0,
5484
4278
  validation: validationState,
5485
4279
  features,
5486
- children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
5487
- import_components67.UploadInput,
4280
+ children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
4281
+ import_components62.UploadInput,
5488
4282
  {
5489
4283
  id,
5490
4284
  description,
@@ -5494,7 +4288,7 @@ var UploadInputRenderer = {
5494
4288
  {
5495
4289
  id: "my-file",
5496
4290
  filename: value.name,
5497
- status: (validationState == null ? void 0 : validationState.status) === "invalid" ? import_components67.Status.FAILED : import_components67.Status.SUCCEEDED
4291
+ status: (validationState == null ? void 0 : validationState.status) === "invalid" ? import_components62.Status.FAILED : import_components62.Status.SUCCEEDED
5498
4292
  }
5499
4293
  ] : void 0,
5500
4294
  fileTypes: acceptsToFileTypes(accepts),
@@ -5551,7 +4345,7 @@ var LargeUploadRenderer = {
5551
4345
  };
5552
4346
  const filetypes = acceptsToFileTypes(accepts);
5553
4347
  const usAccept = filetypes === "*" ? "*" : filetypes.join(",");
5554
- return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
4348
+ return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
5555
4349
  FieldInput_default,
5556
4350
  {
5557
4351
  id,
@@ -5560,8 +4354,8 @@ var LargeUploadRenderer = {
5560
4354
  validation: validationState,
5561
4355
  help,
5562
4356
  features,
5563
- children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
5564
- import_components67.Upload,
4357
+ children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
4358
+ import_components62.Upload,
5565
4359
  __spreadProps(__spreadValues({}, uploadProps), {
5566
4360
  usAccept,
5567
4361
  usDisabled: disabled,
@@ -5576,9 +4370,9 @@ var LargeUploadRenderer = {
5576
4370
  };
5577
4371
 
5578
4372
  // ../renderers/src/UpsellRenderer.tsx
5579
- var import_components68 = require("@transferwise/components");
4373
+ var import_components63 = require("@transferwise/components");
5580
4374
  var import_react24 = require("react");
5581
- var import_jsx_runtime96 = require("react/jsx-runtime");
4375
+ var import_jsx_runtime89 = require("react/jsx-runtime");
5582
4376
  var UpsellRenderer = {
5583
4377
  canRenderType: "upsell",
5584
4378
  render: UpsellRendererComponent
@@ -5586,8 +4380,8 @@ var UpsellRenderer = {
5586
4380
  function UpsellRendererComponent(props) {
5587
4381
  const { text, callToAction, media, margin, onDismiss } = props;
5588
4382
  const [isVisible, setIsVisible] = (0, import_react24.useState)(true);
5589
- return isVisible ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
5590
- import_components68.Nudge,
4383
+ return isVisible ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
4384
+ import_components63.Nudge,
5591
4385
  {
5592
4386
  className: getMargin(margin),
5593
4387
  mediaName: getMediaName(media),
@@ -5633,9 +4427,9 @@ var supportedMediaNames = [
5633
4427
  ];
5634
4428
 
5635
4429
  // ../renderers/src/ButtonRenderer/CircularButtonRenderer.tsx
5636
- var import_components69 = require("@transferwise/components");
4430
+ var import_components64 = require("@transferwise/components");
5637
4431
  var import_classnames8 = __toESM(require_classnames());
5638
- var import_jsx_runtime97 = require("react/jsx-runtime");
4432
+ var import_jsx_runtime90 = require("react/jsx-runtime");
5639
4433
  var CircularButtonRenderer = {
5640
4434
  canRenderType: "button",
5641
4435
  canRender: ({ control }) => control === "circular",
@@ -5645,8 +4439,8 @@ function CircularButtonComponent(props) {
5645
4439
  var _a;
5646
4440
  const { context, disabled, margin, media, tags, title, onClick } = props;
5647
4441
  const priority = tags == null ? void 0 : tags.find((tag) => tag === "primary" || tag === "secondary");
5648
- return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: (0, import_classnames8.default)(getMargin(margin), "df-button", "circular"), children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
5649
- import_components69.CircularButton,
4442
+ return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: (0, import_classnames8.default)(getMargin(margin), "df-button", "circular"), children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
4443
+ import_components64.CircularButton,
5650
4444
  {
5651
4445
  disabled,
5652
4446
  priority: priority != null ? priority : "secondary",
@@ -5665,7 +4459,6 @@ var getWiseRenderers = () => [
5665
4459
  CheckboxInputRenderer_default,
5666
4460
  CircularButtonRenderer,
5667
4461
  BoxRenderer_default,
5668
- CollectionRenderer_default,
5669
4462
  ButtonRenderer,
5670
4463
  ColumnsRenderer_default,
5671
4464
  DateInputRenderer_default,
@@ -5709,13 +4502,13 @@ var getWiseRenderers = () => [
5709
4502
  ];
5710
4503
 
5711
4504
  // ../renderers/src/InitialLoadingStateRenderer.tsx
5712
- var import_components70 = require("@transferwise/components");
5713
- var import_jsx_runtime98 = require("react/jsx-runtime");
4505
+ var import_components65 = require("@transferwise/components");
4506
+ var import_jsx_runtime91 = require("react/jsx-runtime");
5714
4507
  var InitialLoadingStateRenderer = {
5715
4508
  canRenderType: "loading-state",
5716
4509
  canRender: ({ stepLoadingState }) => stepLoadingState === "initial",
5717
- render: () => /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
5718
- import_components70.Loader,
4510
+ render: () => /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
4511
+ import_components65.Loader,
5719
4512
  {
5720
4513
  size: "md",
5721
4514
  classNames: { "tw-loader": `tw-loader m-x-auto ${getMargin("md")}` },
@@ -5726,25 +4519,25 @@ var InitialLoadingStateRenderer = {
5726
4519
 
5727
4520
  // src/dynamicFlow/DynamicFlowModal.tsx
5728
4521
  var import_dynamic_flow_client = require("@wise/dynamic-flow-client");
5729
- var import_components71 = require("@transferwise/components");
5730
- var import_jsx_runtime99 = require("react/jsx-runtime");
4522
+ var import_components66 = require("@transferwise/components");
4523
+ var import_jsx_runtime92 = require("react/jsx-runtime");
5731
4524
  function DynamicFlowModal(props) {
5732
4525
  const _a = props, { className = "" } = _a, rest = __objRest(_a, ["className"]);
5733
4526
  const dfProps = useWiseToCoreProps(rest);
5734
4527
  const df = (0, import_dynamic_flow_client.useDynamicFlowModal)(dfProps);
5735
- return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
5736
- import_components71.Modal,
4528
+ return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
4529
+ import_components66.Modal,
5737
4530
  __spreadProps(__spreadValues({
5738
4531
  className: `dynamic-flow-modal ${className}`,
5739
4532
  disableDimmerClickToClose: true
5740
4533
  }, df.modal), {
5741
- body: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "dynamic-flow-modal", children: df.modal.body })
4534
+ body: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "dynamic-flow-modal", children: df.modal.body })
5742
4535
  })
5743
4536
  );
5744
4537
  }
5745
4538
 
5746
4539
  // src/dynamicFlow/getMergedRenderers.tsx
5747
- var import_jsx_runtime100 = require("react/jsx-runtime");
4540
+ var import_jsx_runtime93 = require("react/jsx-runtime");
5748
4541
  var wiseRenderers = getWiseRenderers();
5749
4542
  var getMergedRenderers = (props) => {
5750
4543
  var _d, _e;
@@ -5758,7 +4551,7 @@ var getMergedRenderers = (props) => {
5758
4551
  method: initialRequest.method,
5759
4552
  data: initialRequest.body
5760
4553
  };
5761
- return presentation.type === "push" ? /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(DynamicFlow, __spreadProps(__spreadValues(__spreadValues({}, restProps), rest), { features: subflowFeatures, initialAction: action })) : /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
4554
+ return presentation.type === "push" ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(DynamicFlow, __spreadProps(__spreadValues(__spreadValues({}, restProps), rest), { features: subflowFeatures, initialAction: action })) : /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
5762
4555
  DynamicFlowModal,
5763
4556
  __spreadProps(__spreadValues(__spreadValues({}, restProps), rest), {
5764
4557
  features: subflowFeatures,
@@ -5838,11 +4631,11 @@ var customEventsToAnalytics = {
5838
4631
 
5839
4632
  // src/dynamicFlow/useOnCopy.tsx
5840
4633
  var import_react25 = require("react");
5841
- var import_react_intl29 = require("react-intl");
4634
+ var import_react_intl30 = require("react-intl");
5842
4635
 
5843
4636
  // src/dynamicFlow/messages.ts
5844
- var import_react_intl28 = require("react-intl");
5845
- var messages_default = (0, import_react_intl28.defineMessages)({
4637
+ var import_react_intl29 = require("react-intl");
4638
+ var messages_default = (0, import_react_intl29.defineMessages)({
5846
4639
  copied: {
5847
4640
  id: "df.wise.CopyFeedback.copy",
5848
4641
  defaultMessage: "Copied to clipboard",
@@ -5857,7 +4650,7 @@ var messages_default = (0, import_react_intl28.defineMessages)({
5857
4650
 
5858
4651
  // src/dynamicFlow/useOnCopy.tsx
5859
4652
  var useOnCopy = () => {
5860
- const { formatMessage } = (0, import_react_intl29.useIntl)();
4653
+ const { formatMessage } = (0, import_react_intl30.useIntl)();
5861
4654
  const createSnackBar = useSnackBarIfAvailable();
5862
4655
  return (0, import_react25.useCallback)(
5863
4656
  (copiedContent) => {
@@ -5873,9 +4666,9 @@ var useOnCopy = () => {
5873
4666
 
5874
4667
  // src/dynamicFlow/useWiseHttpClient.tsx
5875
4668
  var import_react26 = require("react");
5876
- var import_react_intl30 = require("react-intl");
4669
+ var import_react_intl31 = require("react-intl");
5877
4670
  var useWiseHttpClient = (httpClient) => {
5878
- const { locale } = (0, import_react_intl30.useIntl)();
4671
+ const { locale } = (0, import_react_intl31.useIntl)();
5879
4672
  return (0, import_react26.useCallback)(
5880
4673
  async (input, init = {}) => {
5881
4674
  const headers = new Headers(init.headers);
@@ -5952,13 +4745,13 @@ var openLinkInNewTab = (url) => {
5952
4745
  };
5953
4746
 
5954
4747
  // src/dynamicFlow/DynamicFlow.tsx
5955
- var import_jsx_runtime101 = require("react/jsx-runtime");
4748
+ var import_jsx_runtime94 = require("react/jsx-runtime");
5956
4749
  function DynamicFlow(props) {
5957
4750
  const { className = "" } = props;
5958
4751
  const dfProps = useWiseToCoreProps(props);
5959
4752
  const df = (0, import_dynamic_flow_client4.useDynamicFlow)(dfProps);
5960
4753
  const { onContextMenu, contextMenu } = useDFContextMenu(df.controller);
5961
- return /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className, onContextMenu, children: [
4754
+ return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className, onContextMenu, children: [
5962
4755
  df.view,
5963
4756
  contextMenu
5964
4757
  ] });
@@ -5967,7 +4760,7 @@ function DynamicFlow(props) {
5967
4760
  // src/dynamicFlow/DynamicFlowWithRef.tsx
5968
4761
  var import_react28 = require("react");
5969
4762
  var import_dynamic_flow_client5 = require("@wise/dynamic-flow-client");
5970
- var import_jsx_runtime102 = require("react/jsx-runtime");
4763
+ var import_jsx_runtime95 = require("react/jsx-runtime");
5971
4764
  var DynamicFlowWithRef = (0, import_react28.forwardRef)(function DynamicFlowWithRef2(props, ref) {
5972
4765
  const { className = "" } = props;
5973
4766
  const dfProps = useWiseToCoreProps(props);
@@ -5975,22 +4768,22 @@ var DynamicFlowWithRef = (0, import_react28.forwardRef)(function DynamicFlowWith
5975
4768
  (0, import_react28.useImperativeHandle)(
5976
4769
  ref,
5977
4770
  () => ({
5978
- getValue: async () => {
4771
+ getValue: () => {
5979
4772
  var _a;
5980
- return (_a = await df.controller.getSubmittableValue()) != null ? _a : null;
4773
+ return (_a = df.controller.getValue()) != null ? _a : null;
5981
4774
  },
5982
4775
  validate: () => df.controller.validate()
5983
4776
  }),
5984
4777
  [df]
5985
4778
  );
5986
- return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { className, children: df.view });
4779
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className, children: df.view });
5987
4780
  });
5988
4781
 
5989
4782
  // src/index.ts
5990
4783
  var import_dynamic_flow_client8 = require("@wise/dynamic-flow-client");
5991
4784
 
5992
4785
  // src/dynamicFlow/renderers.tsx
5993
- var Header10 = Header;
4786
+ var Header10 = Header5;
5994
4787
  var Media2 = Media;
5995
4788
  var getMargin2 = getMargin;
5996
4789