@wise/dynamic-flow-client-internal 2.9.1 → 2.9.3

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
@@ -93,7 +93,7 @@ var require_main_min = __commonJS({
93
93
  };
94
94
  var Ee = (e, t, r) => (r = e != null ? Hm(_m(e)) : {}, ln(t || !e || !e.__esModule ? Zt(r, "default", { value: e, enumerable: true }) : r, e));
95
95
  var Jm = (e) => ln(Zt({}, "__esModule", { value: true }), e);
96
- var Xe = ka((uf, qr) => {
96
+ var Xe = ka((pf, qr) => {
97
97
  "use strict";
98
98
  (function() {
99
99
  "use strict";
@@ -168,90 +168,90 @@ var require_main_min = __commonJS({
168
168
  "use strict";
169
169
  a.r(r);
170
170
  var o = a("react"), n = a.n(o), i = /* @__PURE__ */ function() {
171
- var h = function(y, d) {
172
- return h = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(l, f) {
173
- l.__proto__ = f;
174
- } || function(l, f) {
171
+ var h = function(y, m) {
172
+ return h = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, f) {
173
+ d.__proto__ = f;
174
+ } || function(d, f) {
175
175
  for (var g in f)
176
- f.hasOwnProperty(g) && (l[g] = f[g]);
177
- }, h(y, d);
176
+ f.hasOwnProperty(g) && (d[g] = f[g]);
177
+ }, h(y, m);
178
178
  };
179
- return function(y, d) {
180
- h(y, d);
181
- function l() {
179
+ return function(y, m) {
180
+ h(y, m);
181
+ function d() {
182
182
  this.constructor = y;
183
183
  }
184
- y.prototype = d === null ? Object.create(d) : (l.prototype = d.prototype, new l());
184
+ y.prototype = m === null ? Object.create(m) : (d.prototype = m.prototype, new d());
185
185
  };
186
186
  }(), c = function() {
187
187
  return c = Object.assign || function(h) {
188
- for (var y, d = 1, l = arguments.length; d < l; d++) {
189
- y = arguments[d];
188
+ for (var y, m = 1, d = arguments.length; m < d; m++) {
189
+ y = arguments[m];
190
190
  for (var f in y)
191
191
  Object.prototype.hasOwnProperty.call(y, f) && (h[f] = y[f]);
192
192
  }
193
193
  return h;
194
194
  }, c.apply(this, arguments);
195
195
  }, u = function(h, y) {
196
- var d = {};
197
- for (var l in h)
198
- Object.prototype.hasOwnProperty.call(h, l) && y.indexOf(l) < 0 && (d[l] = h[l]);
196
+ var m = {};
197
+ for (var d in h)
198
+ Object.prototype.hasOwnProperty.call(h, d) && y.indexOf(d) < 0 && (m[d] = h[d]);
199
199
  if (h != null && typeof Object.getOwnPropertySymbols == "function")
200
- for (var f = 0, l = Object.getOwnPropertySymbols(h); f < l.length; f++)
201
- y.indexOf(l[f]) < 0 && Object.prototype.propertyIsEnumerable.call(h, l[f]) && (d[l[f]] = h[l[f]]);
202
- return d;
200
+ for (var f = 0, d = Object.getOwnPropertySymbols(h); f < d.length; f++)
201
+ y.indexOf(d[f]) < 0 && Object.prototype.propertyIsEnumerable.call(h, d[f]) && (m[d[f]] = h[d[f]]);
202
+ return m;
203
203
  };
204
204
  (function() {
205
205
  typeof window != "undefined" && (navigator.mediaDevices === void 0 && (navigator.mediaDevices = {}), navigator.mediaDevices.getUserMedia === void 0 && (navigator.mediaDevices.getUserMedia = function(y) {
206
- var d = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia;
207
- return d ? new Promise(function(l, f) {
208
- d.call(navigator, y, l, f);
206
+ var m = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia;
207
+ return m ? new Promise(function(d, f) {
208
+ m.call(navigator, y, d, f);
209
209
  }) : Promise.reject(new Error("getUserMedia is not implemented in this browser"));
210
210
  }));
211
211
  })();
212
- function m() {
212
+ function l() {
213
213
  return !!(navigator.mediaDevices && navigator.mediaDevices.getUserMedia);
214
214
  }
215
215
  var p = function(h) {
216
216
  i(y, h);
217
- function y(d) {
218
- var l = h.call(this, d) || this;
219
- return l.canvas = null, l.ctx = null, l.requestUserMediaId = 0, l.unmounted = false, l.state = { hasUserMedia: false }, l;
217
+ function y(m) {
218
+ var d = h.call(this, m) || this;
219
+ return d.canvas = null, d.ctx = null, d.requestUserMediaId = 0, d.unmounted = false, d.state = { hasUserMedia: false }, d;
220
220
  }
221
221
  return y.prototype.componentDidMount = function() {
222
- var d = this, l = d.state, f = d.props;
223
- if (this.unmounted = false, !m()) {
222
+ var m = this, d = m.state, f = m.props;
223
+ if (this.unmounted = false, !l()) {
224
224
  f.onUserMediaError("getUserMedia not supported");
225
225
  return;
226
226
  }
227
- l.hasUserMedia || this.requestUserMedia(), f.children && typeof f.children != "function" && console.warn("children must be a function");
228
- }, y.prototype.componentDidUpdate = function(d) {
229
- var l = this.props;
230
- if (!m()) {
231
- l.onUserMediaError("getUserMedia not supported");
227
+ d.hasUserMedia || this.requestUserMedia(), f.children && typeof f.children != "function" && console.warn("children must be a function");
228
+ }, y.prototype.componentDidUpdate = function(m) {
229
+ var d = this.props;
230
+ if (!l()) {
231
+ d.onUserMediaError("getUserMedia not supported");
232
232
  return;
233
233
  }
234
- var f = JSON.stringify(d.audioConstraints) !== JSON.stringify(l.audioConstraints), g = JSON.stringify(d.videoConstraints) !== JSON.stringify(l.videoConstraints), S = d.minScreenshotWidth !== l.minScreenshotWidth, F = d.minScreenshotHeight !== l.minScreenshotHeight;
234
+ var f = JSON.stringify(m.audioConstraints) !== JSON.stringify(d.audioConstraints), g = JSON.stringify(m.videoConstraints) !== JSON.stringify(d.videoConstraints), S = m.minScreenshotWidth !== d.minScreenshotWidth, F = m.minScreenshotHeight !== d.minScreenshotHeight;
235
235
  (g || S || F) && (this.canvas = null, this.ctx = null), (f || g) && (this.stopAndCleanup(), this.requestUserMedia());
236
236
  }, y.prototype.componentWillUnmount = function() {
237
237
  this.unmounted = true, this.stopAndCleanup();
238
- }, y.stopMediaStream = function(d) {
239
- d && (d.getVideoTracks && d.getAudioTracks ? (d.getVideoTracks().map(function(l) {
240
- d.removeTrack(l), l.stop();
241
- }), d.getAudioTracks().map(function(l) {
242
- d.removeTrack(l), l.stop();
243
- })) : d.stop());
238
+ }, y.stopMediaStream = function(m) {
239
+ m && (m.getVideoTracks && m.getAudioTracks ? (m.getVideoTracks().map(function(d) {
240
+ m.removeTrack(d), d.stop();
241
+ }), m.getAudioTracks().map(function(d) {
242
+ m.removeTrack(d), d.stop();
243
+ })) : m.stop());
244
244
  }, y.prototype.stopAndCleanup = function() {
245
- var d = this.state;
246
- d.hasUserMedia && (y.stopMediaStream(this.stream), d.src && window.URL.revokeObjectURL(d.src));
247
- }, y.prototype.getScreenshot = function(d) {
248
- var l = this, f = l.state, g = l.props;
245
+ var m = this.state;
246
+ m.hasUserMedia && (y.stopMediaStream(this.stream), m.src && window.URL.revokeObjectURL(m.src));
247
+ }, y.prototype.getScreenshot = function(m) {
248
+ var d = this, f = d.state, g = d.props;
249
249
  if (!f.hasUserMedia)
250
250
  return null;
251
- var S = this.getCanvas(d);
251
+ var S = this.getCanvas(m);
252
252
  return S && S.toDataURL(g.screenshotFormat, g.screenshotQuality);
253
- }, y.prototype.getCanvas = function(d) {
254
- var l = this, f = l.state, g = l.props;
253
+ }, y.prototype.getCanvas = function(m) {
254
+ var d = this, f = d.state, g = d.props;
255
255
  if (!this.video || !f.hasUserMedia || !this.video.videoHeight)
256
256
  return null;
257
257
  if (!this.ctx) {
@@ -260,23 +260,23 @@ var require_main_min = __commonJS({
260
260
  var w = S / F;
261
261
  S = g.minScreenshotWidth || this.video.clientWidth, F = S / w, g.minScreenshotHeight && F < g.minScreenshotHeight && (F = g.minScreenshotHeight, S = F * w);
262
262
  }
263
- this.canvas = document.createElement("canvas"), this.canvas.width = (d == null ? void 0 : d.width) || S, this.canvas.height = (d == null ? void 0 : d.height) || F, this.ctx = this.canvas.getContext("2d");
263
+ this.canvas = document.createElement("canvas"), this.canvas.width = (m == null ? void 0 : m.width) || S, this.canvas.height = (m == null ? void 0 : m.height) || F, this.ctx = this.canvas.getContext("2d");
264
264
  }
265
265
  var v = this, P = v.ctx, x = v.canvas;
266
- return P && x && (x.width = (d == null ? void 0 : d.width) || x.width, x.height = (d == null ? void 0 : d.height) || x.height, g.mirrored && (P.translate(x.width, 0), P.scale(-1, 1)), P.imageSmoothingEnabled = g.imageSmoothing, P.drawImage(this.video, 0, 0, (d == null ? void 0 : d.width) || x.width, (d == null ? void 0 : d.height) || x.height), g.mirrored && (P.scale(-1, 1), P.translate(-x.width, 0))), x;
266
+ return P && x && (x.width = (m == null ? void 0 : m.width) || x.width, x.height = (m == null ? void 0 : m.height) || x.height, g.mirrored && (P.translate(x.width, 0), P.scale(-1, 1)), P.imageSmoothingEnabled = g.imageSmoothing, P.drawImage(this.video, 0, 0, (m == null ? void 0 : m.width) || x.width, (m == null ? void 0 : m.height) || x.height), g.mirrored && (P.scale(-1, 1), P.translate(-x.width, 0))), x;
267
267
  }, y.prototype.requestUserMedia = function() {
268
- var d = this, l = this.props, f = function(F, w) {
268
+ var m = this, d = this.props, f = function(F, w) {
269
269
  var v = { video: typeof w != "undefined" ? w : true };
270
- l.audio && (v.audio = typeof F != "undefined" ? F : true), d.requestUserMediaId++;
271
- var P = d.requestUserMediaId;
270
+ d.audio && (v.audio = typeof F != "undefined" ? F : true), m.requestUserMediaId++;
271
+ var P = m.requestUserMediaId;
272
272
  navigator.mediaDevices.getUserMedia(v).then(function(x) {
273
- d.unmounted || P !== d.requestUserMediaId ? y.stopMediaStream(x) : d.handleUserMedia(null, x);
273
+ m.unmounted || P !== m.requestUserMediaId ? y.stopMediaStream(x) : m.handleUserMedia(null, x);
274
274
  }).catch(function(x) {
275
- d.handleUserMedia(x);
275
+ m.handleUserMedia(x);
276
276
  });
277
277
  };
278
278
  if ("mediaDevices" in navigator)
279
- f(l.audioConstraints, l.videoConstraints);
279
+ f(d.audioConstraints, d.videoConstraints);
280
280
  else {
281
281
  var g = function(F) {
282
282
  return { optional: [{ sourceId: F }] };
@@ -289,29 +289,29 @@ var require_main_min = __commonJS({
289
289
  F.forEach(function(k) {
290
290
  k.kind === "audio" ? w = k.id : k.kind === "video" && (v = k.id);
291
291
  });
292
- var P = S(l.audioConstraints);
292
+ var P = S(d.audioConstraints);
293
293
  P && (w = P);
294
- var x = S(l.videoConstraints);
294
+ var x = S(d.videoConstraints);
295
295
  x && (v = x), f(g(w), g(v));
296
296
  });
297
297
  }
298
- }, y.prototype.handleUserMedia = function(d, l) {
298
+ }, y.prototype.handleUserMedia = function(m, d) {
299
299
  var f = this.props;
300
- if (d || !l) {
301
- this.setState({ hasUserMedia: false }), f.onUserMediaError(d);
300
+ if (m || !d) {
301
+ this.setState({ hasUserMedia: false }), f.onUserMediaError(m);
302
302
  return;
303
303
  }
304
- this.stream = l;
304
+ this.stream = d;
305
305
  try {
306
- this.video && (this.video.srcObject = l), this.setState({ hasUserMedia: true });
306
+ this.video && (this.video.srcObject = d), this.setState({ hasUserMedia: true });
307
307
  } catch (g) {
308
- this.setState({ hasUserMedia: true, src: window.URL.createObjectURL(l) });
308
+ this.setState({ hasUserMedia: true, src: window.URL.createObjectURL(d) });
309
309
  }
310
- f.onUserMedia(l);
310
+ f.onUserMedia(d);
311
311
  }, y.prototype.render = function() {
312
- var d = this, l = this, f = l.state, g = l.props, S = g.audio, F = g.forceScreenshotSourceSize, w = g.disablePictureInPicture, v = g.onUserMedia, P = g.onUserMediaError, x = g.screenshotFormat, k = g.screenshotQuality, I = g.minScreenshotWidth, M = g.minScreenshotHeight, O = g.audioConstraints, B = g.videoConstraints, _ = g.imageSmoothing, A = g.mirrored, z = g.style, E = z === void 0 ? {} : z, ne = g.children, G = u(g, ["audio", "forceScreenshotSourceSize", "disablePictureInPicture", "onUserMedia", "onUserMediaError", "screenshotFormat", "screenshotQuality", "minScreenshotWidth", "minScreenshotHeight", "audioConstraints", "videoConstraints", "imageSmoothing", "mirrored", "style", "children"]), re = A ? c(c({}, E), { transform: (E.transform || "") + " scaleX(-1)" }) : E, ie = { getScreenshot: this.getScreenshot.bind(this) };
312
+ var m = this, d = this, f = d.state, g = d.props, S = g.audio, F = g.forceScreenshotSourceSize, w = g.disablePictureInPicture, v = g.onUserMedia, P = g.onUserMediaError, x = g.screenshotFormat, k = g.screenshotQuality, I = g.minScreenshotWidth, M = g.minScreenshotHeight, O = g.audioConstraints, B = g.videoConstraints, _ = g.imageSmoothing, A = g.mirrored, z = g.style, E = z === void 0 ? {} : z, ne = g.children, G = u(g, ["audio", "forceScreenshotSourceSize", "disablePictureInPicture", "onUserMedia", "onUserMediaError", "screenshotFormat", "screenshotQuality", "minScreenshotWidth", "minScreenshotHeight", "audioConstraints", "videoConstraints", "imageSmoothing", "mirrored", "style", "children"]), re = A ? c(c({}, E), { transform: (E.transform || "") + " scaleX(-1)" }) : E, ie = { getScreenshot: this.getScreenshot.bind(this) };
313
313
  return o.createElement(o.Fragment, null, o.createElement("video", c({ autoPlay: true, disablePictureInPicture: w, src: f.src, muted: !S, playsInline: true, ref: function(nt) {
314
- d.video = nt;
314
+ m.video = nt;
315
315
  }, style: re }, G)), ne && ne(ie));
316
316
  }, y.defaultProps = { audio: false, disablePictureInPicture: false, forceScreenshotSourceSize: false, imageSmoothing: true, mirrored: false, onUserMedia: function() {
317
317
  }, onUserMediaError: function() {
@@ -323,26 +323,26 @@ var require_main_min = __commonJS({
323
323
  } }).default;
324
324
  });
325
325
  });
326
- var Dc = ka((WF, wr) => {
326
+ var Dc = ka((_F, wr) => {
327
327
  "use strict";
328
328
  (function() {
329
329
  "use strict";
330
330
  var e = typeof window != "undefined" && typeof window.document != "undefined" ? window.document : {}, t = typeof wr != "undefined" && wr.exports, r = function() {
331
- for (var n, i = [["requestFullscreen", "exitFullscreen", "fullscreenElement", "fullscreenEnabled", "fullscreenchange", "fullscreenerror"], ["webkitRequestFullscreen", "webkitExitFullscreen", "webkitFullscreenElement", "webkitFullscreenEnabled", "webkitfullscreenchange", "webkitfullscreenerror"], ["webkitRequestFullScreen", "webkitCancelFullScreen", "webkitCurrentFullScreenElement", "webkitCancelFullScreen", "webkitfullscreenchange", "webkitfullscreenerror"], ["mozRequestFullScreen", "mozCancelFullScreen", "mozFullScreenElement", "mozFullScreenEnabled", "mozfullscreenchange", "mozfullscreenerror"], ["msRequestFullscreen", "msExitFullscreen", "msFullscreenElement", "msFullscreenEnabled", "MSFullscreenChange", "MSFullscreenError"]], c = 0, u = i.length, m = {}; c < u; c++)
331
+ for (var n, i = [["requestFullscreen", "exitFullscreen", "fullscreenElement", "fullscreenEnabled", "fullscreenchange", "fullscreenerror"], ["webkitRequestFullscreen", "webkitExitFullscreen", "webkitFullscreenElement", "webkitFullscreenEnabled", "webkitfullscreenchange", "webkitfullscreenerror"], ["webkitRequestFullScreen", "webkitCancelFullScreen", "webkitCurrentFullScreenElement", "webkitCancelFullScreen", "webkitfullscreenchange", "webkitfullscreenerror"], ["mozRequestFullScreen", "mozCancelFullScreen", "mozFullScreenElement", "mozFullScreenEnabled", "mozfullscreenchange", "mozfullscreenerror"], ["msRequestFullscreen", "msExitFullscreen", "msFullscreenElement", "msFullscreenEnabled", "MSFullscreenChange", "MSFullscreenError"]], c = 0, u = i.length, l = {}; c < u; c++)
332
332
  if (n = i[c], n && n[1] in e) {
333
333
  for (c = 0; c < n.length; c++)
334
- m[i[0][c]] = n[c];
335
- return m;
334
+ l[i[0][c]] = n[c];
335
+ return l;
336
336
  }
337
337
  return false;
338
338
  }(), a = { change: r.fullscreenchange, error: r.fullscreenerror }, o = { request: function(n, i) {
339
339
  return new Promise(function(c, u) {
340
- var m = function() {
341
- this.off("change", m), c();
340
+ var l = function() {
341
+ this.off("change", l), c();
342
342
  }.bind(this);
343
- this.on("change", m), n = n || e.documentElement;
343
+ this.on("change", l), n = n || e.documentElement;
344
344
  var p = n[r.requestFullscreen](i);
345
- p instanceof Promise && p.then(m).catch(u);
345
+ p instanceof Promise && p.then(l).catch(u);
346
346
  }.bind(this));
347
347
  }, exit: function() {
348
348
  return new Promise(function(n, i) {
@@ -383,9 +383,9 @@ var require_main_min = __commonJS({
383
383
  } } }), t ? wr.exports = o : window.screenfull = o;
384
384
  })();
385
385
  });
386
- var Bp = {};
387
- Km(Bp, { DynamicFlow: () => an, JsonSchemaForm: () => on, Layout: () => se, convertStepToLayout: () => Qt, inlineReferences: () => ze, isValidSchema: () => $, makeHttpClient: () => jr, translations: () => Vm });
388
- module2.exports = Jm(Bp);
386
+ var zp = {};
387
+ Km(zp, { DynamicFlow: () => an, JsonSchemaForm: () => on, Layout: () => se, convertStepToLayout: () => Qt, inlineReferences: () => ze, isValidSchema: () => $, makeHttpClient: () => jr, translations: () => Vm });
388
+ module2.exports = Jm(zp);
389
389
  function Qt(e, { displayStepTitle: t = true } = {}) {
390
390
  if (e.layout)
391
391
  return ml(e, t);
@@ -991,11 +991,12 @@ var require_main_min = __commonJS({
991
991
  return !["https://", "http://", "data:"].some((t) => e.startsWith(t) && e.length > t.length);
992
992
  }
993
993
  var jr = (e, t) => (r, a) => {
994
- let o = ql(r, e || ""), n = Gl(a == null ? void 0 : a.headers, t);
995
- return fetch(o, C(s({}, a != null ? a : {}), { headers: n }));
994
+ let o = ql(r, e || "");
995
+ return fetch(o, Gl(a != null ? a : {}, { headers: t }));
996
996
  };
997
997
  var ql = (e, t) => typeof e == "string" && zr(e) ? t + e : e;
998
- var Gl = (e, t) => {
998
+ var Gl = (e, t) => C(s(s({}, e), t), { headers: $l(e == null ? void 0 : e.headers, t == null ? void 0 : t.headers) });
999
+ var $l = (e, t) => {
999
1000
  if (!e && !t)
1000
1001
  return {};
1001
1002
  let r = new Headers(e);
@@ -1037,11 +1038,11 @@ var require_main_min = __commonJS({
1037
1038
  if (c != null && c.action) {
1038
1039
  let { action: u } = c;
1039
1040
  if (u.exit) {
1040
- let m = s(s({}, u.result || {}), n.data || {});
1041
- t(C(s({}, u), { result: m }));
1041
+ let l = s(s({}, u.result || {}), n.data || {});
1042
+ t(C(s({}, u), { result: l }));
1042
1043
  } else {
1043
- let m = s(s({}, u.data || {}), n.data || {});
1044
- t(C(s({}, u), { data: m }));
1044
+ let l = s(s({}, u.data || {}), n.data || {});
1045
+ t(C(s({}, u), { data: l }));
1045
1046
  }
1046
1047
  return false;
1047
1048
  }
@@ -1066,17 +1067,17 @@ var require_main_min = __commonJS({
1066
1067
  var fi = require("@transferwise/components");
1067
1068
  var Tt = require("@transferwise/components");
1068
1069
  var li = require("react/jsx-runtime");
1069
- var Lt = (e) => $l(e) || Wl(e);
1070
- var $l = (e) => _l.some((t) => e === `flag-${t}`);
1070
+ var Lt = (e) => Wl(e) || _l(e);
1071
1071
  var Wl = (e) => Kl.some((t) => e === `flag-${t}`);
1072
+ var _l = (e) => Jl.some((t) => e === `flag-${t}`);
1072
1073
  function mi({ name: e }) {
1073
1074
  if (!Lt(e))
1074
1075
  return null;
1075
1076
  let t = e.substring(5);
1076
1077
  return (0, li.jsx)("img", { src: `https://wise.com/web-art/assets/flags/${t}.svg`, alt: "", "data-testid": `img-flag-${t}`, width: "24px" });
1077
1078
  }
1078
- var _l = ["aed", "ars", "aud", "bdt", "bgn", "bhd", "bnd", "brl", "bwp", "cad", "chf", "clp", "cny", "cop", "crc", "czk", "dkk", "egp", "eur", "fjd", "gbp", "gel", "ghs", "gtq", "hkd", "hrk", "huf", "idr", "ils", "imp", "inr", "isk", "jmd", "jpy", "kes", "krw", "kwd", "lak", "lkr", "lsl", "mad", "mur", "mxn", "myr", "mzn", "nad", "ngn", "nok", "npr", "nzd", "omr", "pab", "pen", "php", "pkr", "pln", "qar", "ron", "rub", "sar", "sek", "sgd", "thb", "tmt", "try", "twd", "tzs", "uah", "ugx", "usd", "uyu", "vnd", "xof", "zar", "zmw"];
1079
- var Kl = ["ad", "ae", "ar", "at", "au", "bd", "be", "bg", "bh", "bn", "br", "bw", "ca", "ch", "cl", "cn", "co", "cr", "cy", "cz", "de", "dk", "ee", "eg", "es", "eu", "fi", "fj", "fr", "gb", "ge", "gg", "gh", "gp", "gr", "gt", "hk", "hr", "hu", "id", "ie", "il", "im", "in", "is", "it", "je", "jm", "jp", "ke", "kr", "kw", "la", "li", "lk", "ls", "lt", "lu", "lv", "ma", "mc", "mt", "mu", "mx", "my", "mz", "na", "ng", "nl", "no", "np", "nz", "om", "pa", "pe", "ph", "pk", "pl", "pt", "qa", "ro", "ru", "sa", "se", "sg", "si", "sk", "sm", "th", "tm", "tr", "tw", "tz", "ua", "ug", "us", "uy", "va", "vn", "wi", "xo", "za", "zm"];
1079
+ var Kl = ["aed", "ars", "aud", "bdt", "bgn", "bhd", "bnd", "brl", "bwp", "cad", "chf", "clp", "cny", "cop", "crc", "czk", "dkk", "egp", "eur", "fjd", "gbp", "gel", "ghs", "gtq", "hkd", "hrk", "huf", "idr", "ils", "imp", "inr", "isk", "jmd", "jpy", "kes", "krw", "kwd", "lak", "lkr", "lsl", "mad", "mur", "mxn", "myr", "mzn", "nad", "ngn", "nok", "npr", "nzd", "omr", "pab", "pen", "php", "pkr", "pln", "qar", "ron", "rub", "sar", "sek", "sgd", "thb", "tmt", "try", "twd", "tzs", "uah", "ugx", "usd", "uyu", "vnd", "xof", "zar", "zmw"];
1080
+ var Jl = ["ad", "ae", "ar", "at", "au", "bd", "be", "bg", "bh", "bn", "br", "bw", "ca", "ch", "cl", "cn", "co", "cr", "cy", "cz", "de", "dk", "ee", "eg", "es", "eu", "fi", "fj", "fr", "gb", "ge", "gg", "gh", "gp", "gr", "gt", "hk", "hr", "hu", "id", "ie", "il", "im", "in", "is", "it", "je", "jm", "jp", "ke", "kr", "kw", "la", "li", "lk", "ls", "lt", "lu", "lv", "ma", "mc", "mt", "mu", "mx", "my", "mz", "na", "ng", "nl", "no", "np", "nz", "om", "pa", "pe", "ph", "pk", "pl", "pt", "qa", "ro", "ru", "sa", "se", "sg", "si", "sk", "sm", "th", "tm", "tr", "tw", "tz", "ua", "ug", "us", "uy", "va", "vn", "wi", "xo", "za", "zm"];
1080
1081
  var di = Ee(require("@transferwise/icons"));
1081
1082
  var yi = require("react/jsx-runtime");
1082
1083
  var Gr = (e) => {
@@ -1089,16 +1090,16 @@ var require_main_min = __commonJS({
1089
1090
  let t = pi(e), r = di[t];
1090
1091
  return (0, yi.jsx)(r, { size: 24 });
1091
1092
  }
1092
- var pi = (e) => e.split("-").map(Jl).join("");
1093
- var Jl = (e) => `${e[0].toUpperCase()}${e.slice(1)}`;
1093
+ var pi = (e) => e.split("-").map(Xl).join("");
1094
+ var Xl = (e) => `${e[0].toUpperCase()}${e.slice(1)}`;
1094
1095
  var Ja = require("react/jsx-runtime");
1095
- function Xl({ type: e }) {
1096
+ function Yl({ type: e }) {
1096
1097
  return Lt(e) ? (0, Ja.jsx)(mi, { name: e }) : Gr(e) ? (0, Ja.jsx)(ui, { name: e }) : null;
1097
1098
  }
1098
1099
  function Xa(e) {
1099
1100
  return Gr(e) || Lt(e);
1100
1101
  }
1101
- var Ye = Xl;
1102
+ var Ye = Yl;
1102
1103
  var ir = require("react/jsx-runtime");
1103
1104
  var ut = ({ icon: e, image: t }) => {
1104
1105
  if (e != null && e.name)
@@ -1127,7 +1128,7 @@ var require_main_min = __commonJS({
1127
1128
  return "";
1128
1129
  }
1129
1130
  };
1130
- var Yl = (e) => {
1131
+ var Zl = (e) => {
1131
1132
  switch (e) {
1132
1133
  case "right":
1133
1134
  return "text-xs-right";
@@ -1138,13 +1139,13 @@ var require_main_min = __commonJS({
1138
1139
  return "";
1139
1140
  }
1140
1141
  };
1141
- var Se = (e) => `${Yl(e.align)} ${U(e.margin)}`;
1142
+ var Se = (e) => `${Zl(e.align)} ${U(e.margin)}`;
1142
1143
  var hi = require("react/jsx-runtime");
1143
- var Zl = (e) => {
1144
+ var Ql = (e) => {
1144
1145
  let t = e.component;
1145
- return (0, hi.jsx)(fi.Alert, { type: ed(Ql(t.context)), className: U(t.margin), message: t.markdown });
1146
+ return (0, hi.jsx)(fi.Alert, { type: td(ed(t.context)), className: U(t.margin), message: t.markdown });
1146
1147
  };
1147
- var Ql = (e) => {
1148
+ var ed = (e) => {
1148
1149
  switch (e) {
1149
1150
  case "success":
1150
1151
  return "positive";
@@ -1159,15 +1160,15 @@ var require_main_min = __commonJS({
1159
1160
  return e;
1160
1161
  }
1161
1162
  };
1162
- var ed = (e) => !e || !["neutral", "warning", "negative", "positive"].includes(e) ? "neutral" : e;
1163
- var ce = Zl;
1163
+ var td = (e) => !e || !["neutral", "warning", "negative", "positive"].includes(e) ? "neutral" : e;
1164
+ var ce = Ql;
1164
1165
  var pt = require("react/jsx-runtime");
1165
- var td = (e) => {
1166
+ var rd = (e) => {
1166
1167
  let t = e.component, r = U(t.margin || t.border ? "lg" : "xs");
1167
- return !t.width || t.width === "xl" ? (0, pt.jsx)("div", { className: r + gi(t.border), children: (0, pt.jsx)(se, { components: t.components, model: e.model, submitted: e.submitted, errors: e.errors, onModelChange: e.onModelChange, onAction: e.onAction, onPersistAsync: e.onPersistAsync }) }) : (0, pt.jsx)("div", { className: "row", children: (0, pt.jsx)("div", { className: r + rd(t), children: (0, pt.jsx)("div", { className: gi(t.border), children: (0, pt.jsx)(se, { components: t.components, model: e.model, submitted: e.submitted, errors: e.errors, onModelChange: e.onModelChange, onAction: e.onAction, onPersistAsync: e.onPersistAsync }) }) }) });
1168
+ return !t.width || t.width === "xl" ? (0, pt.jsx)("div", { className: r + gi(t.border), children: (0, pt.jsx)(se, { components: t.components, model: e.model, submitted: e.submitted, errors: e.errors, onModelChange: e.onModelChange, onAction: e.onAction, onPersistAsync: e.onPersistAsync }) }) : (0, pt.jsx)("div", { className: "row", children: (0, pt.jsx)("div", { className: r + ad(t), children: (0, pt.jsx)("div", { className: gi(t.border), children: (0, pt.jsx)(se, { components: t.components, model: e.model, submitted: e.submitted, errors: e.errors, onModelChange: e.onModelChange, onAction: e.onAction, onPersistAsync: e.onPersistAsync }) }) }) });
1168
1169
  };
1169
1170
  var gi = (e) => e ? " well p-b-0" : "";
1170
- var rd = (e) => {
1171
+ var ad = (e) => {
1171
1172
  switch (e.width) {
1172
1173
  case "xs":
1173
1174
  return " col-md-4 col-md-offset-4";
@@ -1182,21 +1183,21 @@ var require_main_min = __commonJS({
1182
1183
  return " col-xs-12";
1183
1184
  }
1184
1185
  };
1185
- var Ya = td;
1186
+ var Ya = rd;
1186
1187
  var Fi = require("@transferwise/components");
1187
- var ad = { primary: "primary", secondary: "secondary", link: "tertiary", positive: "primary", negative: "primary" };
1188
+ var od = { primary: "primary", secondary: "secondary", link: "tertiary", positive: "primary", negative: "primary" };
1188
1189
  var wi = (e) => {
1189
1190
  var r;
1190
1191
  let t = e.action.type;
1191
- return (r = e.control) != null ? r : t ? ad[t] : "secondary";
1192
+ return (r = e.control) != null ? r : t ? od[t] : "secondary";
1192
1193
  };
1193
- var od = { positive: "positive", negative: "negative", neutral: "accent", warning: "accent" };
1194
- var nd = { primary: "accent", secondary: "accent", link: "accent", positive: "positive", negative: "negative" };
1194
+ var nd = { positive: "positive", negative: "negative", neutral: "accent", warning: "accent" };
1195
+ var id = { primary: "accent", secondary: "accent", link: "accent", positive: "positive", negative: "negative" };
1195
1196
  var Ci = (e) => {
1196
1197
  if (e.context)
1197
- return od[e.context];
1198
+ return nd[e.context];
1198
1199
  let t = e.action.type;
1199
- return t ? nd[t] : "accent";
1200
+ return t ? id[t] : "accent";
1200
1201
  };
1201
1202
  var Si = (e) => {
1202
1203
  switch (e) {
@@ -1212,39 +1213,39 @@ var require_main_min = __commonJS({
1212
1213
  }
1213
1214
  };
1214
1215
  var bi = require("react/jsx-runtime");
1215
- function id(e) {
1216
+ function sd(e) {
1216
1217
  var u;
1217
1218
  let { component: t, onAction: r } = e, a = t.action, o = Ci(t), n = wi(t), { loading: i } = At(), c = U(t.margin || "md");
1218
1219
  return (0, bi.jsx)(Fi.Button, { size: Si(t.size), type: n === "tertiary" ? void 0 : o, priority: n, block: true, className: c, disabled: i || t.disabled || a.disabled, onClick: () => r(a), children: (u = t.title) != null ? u : a.title });
1219
1220
  }
1220
- var Za = id;
1221
+ var Za = sd;
1221
1222
  var yt = require("react/jsx-runtime");
1222
- var sd = (e) => {
1223
- let t = e.component, { leftWidth: r, rightWidth: a } = cd(t.bias);
1223
+ var cd = (e) => {
1224
+ let t = e.component, { leftWidth: r, rightWidth: a } = md(t.bias);
1224
1225
  return (0, yt.jsxs)("div", { className: `${U(t.margin || "xs")} row`, children: [(0, yt.jsx)("div", { className: `${r} m-b-0`, children: (0, yt.jsx)(se, { components: t.left, model: e.model, submitted: e.submitted, errors: e.errors, onModelChange: e.onModelChange, onAction: e.onAction, onPersistAsync: e.onPersistAsync }) }), (0, yt.jsx)("div", { className: `${a} m-b-0`, children: (0, yt.jsx)(se, { components: t.right, model: e.model, submitted: e.submitted, errors: e.errors, onModelChange: e.onModelChange, onAction: e.onAction, onPersistAsync: e.onPersistAsync }) })] });
1225
1226
  };
1226
- var cd = (e) => e === "left" ? { leftWidth: "col-md-8", rightWidth: "col-md-4" } : e === "right" ? { leftWidth: "col-md-4", rightWidth: "col-md-8" } : { leftWidth: "col-md-6", rightWidth: "col-md-6" };
1227
- var Qa = sd;
1227
+ var md = (e) => e === "left" ? { leftWidth: "col-md-8", rightWidth: "col-md-4" } : e === "right" ? { leftWidth: "col-md-4", rightWidth: "col-md-8" } : { leftWidth: "col-md-6", rightWidth: "col-md-6" };
1228
+ var Qa = cd;
1228
1229
  var Wr = require("@transferwise/components");
1229
1230
  var $r = require("react/jsx-runtime");
1230
- function md({ component: e, onAction: t }) {
1231
+ function ld({ component: e, onAction: t }) {
1231
1232
  let { loading: r } = At();
1232
1233
  return (0, $r.jsx)("div", { className: U(e.margin), children: (0, $r.jsx)(Wr.NavigationOptionsList, { children: e.options.map((a) => (0, $r.jsx)(Wr.NavigationOption, { title: a.title, content: a.description, disabled: r || a.disabled, media: ut(a), showMediaCircle: false, showMediaAtAllSizes: true, onClick: () => t(a.action) }, JSON.stringify(a))) }) });
1233
1234
  }
1234
- var eo = md;
1235
+ var eo = ld;
1235
1236
  var xi = require("react/jsx-runtime");
1236
- var ld = ({ component: e }) => {
1237
+ var dd = ({ component: e }) => {
1237
1238
  let r = `m-t-0 ${U(e.margin)}`;
1238
1239
  return (0, xi.jsx)("hr", { className: r });
1239
1240
  };
1240
- var to = ld;
1241
+ var to = dd;
1241
1242
  var Rt = require("@transferwise/components");
1242
1243
  var _r = require("react");
1243
1244
  var Oi = require("react-intl");
1244
1245
  var vi = require("react-intl");
1245
1246
  var Ai = (0, vi.defineMessages)({ retryTitle: { id: "dynamicFlows.DynamicExternal.retryTitle", defaultMessage: "Reopen window", description: "" } });
1246
1247
  var Ze = require("react/jsx-runtime");
1247
- var dd = ({ component: e, onAction: t }) => {
1248
+ var ud = ({ component: e, onAction: t }) => {
1248
1249
  let { requestUrl: r, responseHandlers: a, polling: o, retryTitle: n } = e, i = (0, Oi.useIntl)(), c = (0, _r.useCallback)(() => window.open(r, "df-external-window"), [r]);
1249
1250
  (0, _r.useEffect)(() => {
1250
1251
  c();
@@ -1252,21 +1253,21 @@ var require_main_min = __commonJS({
1252
1253
  let u = o && a ? C(s({}, o), { responseHandlers: a }) : void 0;
1253
1254
  return oi(u, t), (0, Ze.jsxs)(Ze.Fragment, { children: [(0, Ze.jsx)(Rt.Loader, { size: Rt.Size.LARGE, classNames: { "tw-loader": "tw-loader m-x-auto" } }), (0, Ze.jsx)("br", {}), (0, Ze.jsx)(Rt.Button, { priority: "tertiary", block: true, onClick: c, children: n || i.formatMessage(Ai.retryTitle) })] });
1254
1255
  };
1255
- var ro = dd;
1256
+ var ro = ud;
1256
1257
  var _s = require("react");
1257
1258
  var Pi = require("@transferwise/components");
1258
1259
  var Mi = Ee(Xe());
1259
1260
  var ki = require("react");
1260
1261
  var Re = require("react/jsx-runtime");
1261
- var ud = (e, t) => t.map((r) => me(e, r) || {});
1262
- var pd = (e) => e.reduce((t, r) => s(s({}, r), t), {});
1263
- var yd = (e) => ({ "col-xs-12": true, "col-sm-6": e === "md", "col-sm-4": e === "sm" });
1262
+ var pd = (e, t) => t.map((r) => me(e, r) || {});
1263
+ var yd = (e) => e.reduce((t, r) => s(s({}, r), t), {});
1264
+ var fd = (e) => ({ "col-xs-12": true, "col-sm-6": e === "md", "col-sm-4": e === "sm" });
1264
1265
  function Ei(e) {
1265
1266
  let t = (o, n) => {
1266
1267
  let i = e.schema.allOf[o];
1267
- r[o] = me(n.model, i) || {}, a(r), e.onChange(C(s({}, n), { model: pd(r) }));
1268
- }, [r, a] = (0, ki.useState)(ud(e.model, e.schema.allOf));
1269
- return (0, Re.jsxs)(Re.Fragment, { children: [e.schema.title && (0, Re.jsx)(Pi.Header, { title: e.schema.title }), e.schema.description && (0, Re.jsx)("p", { children: e.schema.description }), (0, Re.jsx)("div", { className: "row", children: e.schema.allOf.map((o, n) => (0, Re.jsx)("div", { className: (0, Mi.default)(yd(o.width)), children: (0, Re.jsx)(le, { schema: o, model: r[n], errors: e.errors, submitted: e.submitted, disabled: e.disabled, onChange: (i) => t(n, C(s({}, i), { model: i.model })), onPersistAsync: e.onPersistAsync }) }, n)) })] });
1268
+ r[o] = me(n.model, i) || {}, a(r), e.onChange(C(s({}, n), { model: yd(r) }));
1269
+ }, [r, a] = (0, ki.useState)(pd(e.model, e.schema.allOf));
1270
+ return (0, Re.jsxs)(Re.Fragment, { children: [e.schema.title && (0, Re.jsx)(Pi.Header, { title: e.schema.title }), e.schema.description && (0, Re.jsx)("p", { children: e.schema.description }), (0, Re.jsx)("div", { className: "row", children: e.schema.allOf.map((o, n) => (0, Re.jsx)("div", { className: (0, Mi.default)(fd(o.width)), children: (0, Re.jsx)(le, { schema: o, model: r[n], errors: e.errors, submitted: e.submitted, disabled: e.disabled, onChange: (i) => t(n, C(s({}, i), { model: i.model })), onPersistAsync: e.onPersistAsync }) }, n)) })] });
1270
1271
  }
1271
1272
  Ei.defaultProps = { disabled: false };
1272
1273
  var ao = Ei;
@@ -1281,11 +1282,11 @@ var require_main_min = __commonJS({
1281
1282
  var Ue = require("react/jsx-runtime");
1282
1283
  function Li(e) {
1283
1284
  var c;
1284
- let t = fd(e.schema), r = s(s(s({}, t), e.validationMessages), e.schema.validationMessages), a = (e.submitted || !e.changed) && !!e.errors, o = !a && (e.submitted || e.changed && e.blurred) && !!((c = e.validations) != null && c.length), n = e.schema.description && !a && !o, i = !!e.infoMessage;
1285
+ let t = hd(e.schema), r = s(s(s({}, t), e.validationMessages), e.schema.validationMessages), a = (e.submitted || !e.changed) && !!e.errors, o = !a && (e.submitted || e.changed && e.blurred) && !!((c = e.validations) != null && c.length), n = e.schema.description && !a && !o, i = !!e.infoMessage;
1285
1286
  return (0, Ue.jsxs)("div", { id: e.id, children: [a ? (0, Ue.jsx)(Kr.InlineAlert, { type: "error", children: e.errors }) : null, o ? (0, Ue.jsx)(Kr.InlineAlert, { type: "error", children: e.validations.map((u) => (0, Ue.jsx)("div", { children: r[u] }, u)) }) : null, (n || i) && (0, Ue.jsxs)(Kr.InlineAlert, { type: "info", children: [n && (0, Ue.jsx)("div", { children: e.schema.description }), i && (0, Ue.jsx)("div", { children: e.infoMessage })] })] });
1286
1287
  }
1287
1288
  Li.defaultProps = { errors: "", validations: [], validationMessages: {}, validationAsyncSuccessMessage: null };
1288
- function fd(e) {
1289
+ function hd(e) {
1289
1290
  let { formatMessage: t, locale: r } = (0, Di.useIntl)(), a = { type: t(Fe.type), minimum: t(Fe.minimum, { minimum: e.minimum }), maximum: t(Fe.maximum, { maximum: e.maximum }), minLength: t(Fe.minLength, { minLength: e.minLength }), maxLength: t(Fe.maxLength, { maxLength: e.maxLength }), pattern: t(Fe.pattern), required: t(Fe.required) };
1290
1291
  if (e.format === "date") {
1291
1292
  let o = { pattern: t(Fe.patternDate), minimum: e.minimum ? t(Fe.minimumDate, { minimum: (0, oo.formatDate)(new Date(e.minimum), r, { timeZone: "UTC", dateStyle: "long" }) }) : void 0, maximum: e.maximum ? t(Fe.maximumDate, { maximum: (0, oo.formatDate)(new Date(e.maximum), r, { timeZone: "UTC", dateStyle: "long" }) }) : void 0 };
@@ -1327,7 +1328,7 @@ var require_main_min = __commonJS({
1327
1328
  var ft = require("react/jsx-runtime");
1328
1329
  function $i(e) {
1329
1330
  var k, I;
1330
- let { onChange: t, schema: r } = e, a = te(), o = Hi(r), n = (0, sr.useMemo)(() => r.$id || Te(), [r.$id]), [i, c] = (0, sr.useState)(false), [u, m] = (0, sr.useState)(() => hd(e.model || [])), p = Wi(r.items.persistAsync), h = r.items.persistAsync.schema, y = Dt(h), d = async (M) => {
1331
+ let { onChange: t, schema: r } = e, a = te(), o = Hi(r), n = (0, sr.useMemo)(() => r.$id || Te(), [r.$id]), [i, c] = (0, sr.useState)(false), [u, l] = (0, sr.useState)(() => gd(e.model || [])), p = Wi(r.items.persistAsync), h = r.items.persistAsync.schema, y = Dt(h), m = async (M) => {
1331
1332
  c(true);
1332
1333
  try {
1333
1334
  let O = await Ti(M, y);
@@ -1338,28 +1339,28 @@ var require_main_min = __commonJS({
1338
1339
  return a("Dynamic Flow - PersistAsync", { status: "failure", schemaId: r.$id }), Promise.reject(Ni(O));
1339
1340
  }
1340
1341
  };
1341
- function l(M) {
1342
+ function d(M) {
1342
1343
  if (_n(M, u))
1343
1344
  return;
1344
- m(M);
1345
+ l(M);
1345
1346
  let B = qi(M).map((_) => _.id);
1346
1347
  t({ model: B, triggerSchema: r, triggerModel: B });
1347
1348
  }
1348
- let g = qi(u).map((M) => M.id), S = It(g, r, e.required), F = !!e.errors || (i || e.submitted) && !!S.length, w = "accepts" in h && h.accepts, v = "maxSize" in h && h.maxSize, P = C(s(s({ multiple: true, className: "form-control", files: u, fileInputName: n, id: n }, w ? { fileTypes: w } : void 0), v ? { sizeLimit: Tr(v) } : void 0), { sizeLimitErrorMessage: ((k = h.validationMessages) == null ? void 0 : k.maxSize) || o.maxFileSizeErrorMessage, maxFiles: e.schema.maxItems, maxFilesErrorMessage: ((I = e.schema.validationMessages) == null ? void 0 : I.maxItems) || o.maxItemsErrorMessage, uploadButtonTitle: h.title, description: h.description, disabled: e.disabled, onUploadFile: (M) => d(M.get(n)), onFilesChange: l, onDeleteFile: () => Promise.resolve() }), x = `${n}-feedback`;
1349
- return (0, ft.jsxs)("div", { className: (0, Gi.default)("form-group", { "has-error": F }), children: [(0, ft.jsx)("label", { className: "d-block control-label", htmlFor: n, children: e.schema.title }), (0, ft.jsx)("div", { "aria-describedby": x, children: (0, ft.jsx)(Jr.UploadInput, s({}, P)) }), (0, ft.jsx)(He, { id: x, changed: i, submitted: e.submitted, errors: e.errors, schema: e.schema, validations: S, validationMessages: wd(r, !!e.required, o), infoMessage: null, focused: false, blurred: true })] });
1349
+ let g = qi(u).map((M) => M.id), S = It(g, r, e.required), F = !!e.errors || (i || e.submitted) && !!S.length, w = "accepts" in h && h.accepts, v = "maxSize" in h && h.maxSize, P = C(s(s({ multiple: true, className: "form-control", files: u, fileInputName: n, id: n }, w ? { fileTypes: w } : void 0), v ? { sizeLimit: Tr(v) } : void 0), { sizeLimitErrorMessage: ((k = h.validationMessages) == null ? void 0 : k.maxSize) || o.maxFileSizeErrorMessage, maxFiles: e.schema.maxItems, maxFilesErrorMessage: ((I = e.schema.validationMessages) == null ? void 0 : I.maxItems) || o.maxItemsErrorMessage, uploadButtonTitle: h.title, description: h.description, disabled: e.disabled, onUploadFile: (M) => m(M.get(n)), onFilesChange: d, onDeleteFile: () => Promise.resolve() }), x = `${n}-feedback`;
1350
+ return (0, ft.jsxs)("div", { className: (0, Gi.default)("form-group", { "has-error": F }), children: [(0, ft.jsx)("label", { className: "d-block control-label", htmlFor: n, children: e.schema.title }), (0, ft.jsx)("div", { "aria-describedby": x, children: (0, ft.jsx)(Jr.UploadInput, s({}, P)) }), (0, ft.jsx)(He, { id: x, changed: i, submitted: e.submitted, errors: e.errors, schema: e.schema, validations: S, validationMessages: Cd(r, !!e.required, o), infoMessage: null, focused: false, blurred: true })] });
1350
1351
  }
1351
1352
  $i.defaultProps = { errors: null, required: false };
1352
1353
  var no = $i;
1353
1354
  function qi(e) {
1354
1355
  return e.filter((t) => !t.error && t.status === "succeeded");
1355
1356
  }
1356
- function hd(e) {
1357
- return e.map((t) => gd(t) ? { id: t, status: Jr.Status.SUCCEEDED } : null).filter((t) => t !== null);
1358
- }
1359
1357
  function gd(e) {
1358
+ return e.map((t) => wd(t) ? { id: t, status: Jr.Status.SUCCEEDED } : null).filter((t) => t !== null);
1359
+ }
1360
+ function wd(e) {
1360
1361
  return j(e) || L(e);
1361
1362
  }
1362
- function wd(e, t, r) {
1363
+ function Cd(e, t, r) {
1363
1364
  let { minItems: a, maxItems: o } = e;
1364
1365
  return s(s(s({}, t && { required: r.requiredMessage }), a && { minItems: r.minItemsErrorMessage }), o && { maxItems: r.maxItemsErrorMessage });
1365
1366
  }
@@ -1369,22 +1370,24 @@ var require_main_min = __commonJS({
1369
1370
  var as = require("react-intl");
1370
1371
  var _i = require("@transferwise/components");
1371
1372
  var Ji = require("react/jsx-runtime");
1372
- var Ki = ({ item: e, onClick: t }) => (0, Ji.jsx)(_i.NavigationOption, { onClick: t, media: ut(e), title: e.title, content: e.description, showMediaAtAllSizes: true });
1373
+ function Ki({ item: e, onClick: t }) {
1374
+ return (0, Ji.jsx)(_i.NavigationOption, { media: ut(e), title: e.title, content: e.description, showMediaAtAllSizes: true, onClick: t });
1375
+ }
1373
1376
  var Xi = require("react-intl");
1374
1377
  var ht = (0, Xi.defineMessages)({ addItemTitle: { id: "dynamicFlows.ArraySchema.addItemTitle", defaultMessage: "Add Item", description: "Label on the button used to open a form to add an item" }, addItem: { id: "dynamicFlows.ArraySchema.addItem", defaultMessage: "Save", description: "Label on the add button used to submit a form that adds an item" }, editItem: { id: "dynamicFlows.ArraySchema.editItem", defaultMessage: "Save", description: "Label on the edit button used to submit a form that edits an item" }, removeItem: { id: "dynamicFlows.ArraySchema.removeItem", defaultMessage: "Remove", description: "Label on the remove button used to confirm deletion of an item" } });
1375
1378
  var Yi = require("react");
1376
1379
  var Zi = require("react-intl");
1377
1380
  var es = require("react/jsx-runtime");
1378
- function Cd({ type: e, schema: t, model: r, errors: a, submitted: o, onModelChange: n, onAction: i }) {
1379
- let { formatMessage: c } = (0, Zi.useIntl)(), [u, m] = (0, Yi.useState)(void 0), p = { layout: [{ type: "form", schema: t.items }, { type: "button", control: "primary", action: { url: e, title: c(e === "add" ? ht.addItem : ht.editItem) } }, ...e === "edit" ? [{ type: "button", context: "negative", action: { url: "remove", title: c(ht.removeItem) } }] : []], title: "", actions: [], schemas: [] };
1381
+ function Sd({ type: e, schema: t, model: r, errors: a, submitted: o, onModelChange: n, onAction: i }) {
1382
+ let { formatMessage: c } = (0, Zi.useIntl)(), [u, l] = (0, Yi.useState)(void 0), p = { layout: [{ type: "form", schema: t.items }, { type: "button", control: "primary", action: { url: e, title: c(e === "add" ? ht.addItem : ht.editItem) } }, ...e === "edit" ? [{ type: "button", context: "negative", action: { url: "remove", title: c(ht.removeItem) } }] : []], title: "", actions: [], schemas: [] };
1380
1383
  return (0, es.jsx)(Xr, { step: p, model: r, stepLayoutOptions: { displayStepTitle: false }, submitted: o, formErrors: a, globalError: null, onAction: (y) => {
1381
- i(y.url, u), m(void 0);
1384
+ i(y.url, u), l(void 0);
1382
1385
  }, onModelChange: (y) => {
1383
- let g = y, { metadata: d, model: l } = g, f = mn(g, ["metadata", "model"]);
1384
- t.items.format === "base64url" && typeof l == "string" && typeof (d == null ? void 0 : d.filename) == "string" && m(d.filename), n(C(s({}, f), { model: l }));
1386
+ let g = y, { metadata: m, model: d } = g, f = mn(g, ["metadata", "model"]);
1387
+ t.items.format === "base64url" && typeof d == "string" && typeof (m == null ? void 0 : m.filename) == "string" && l(m.filename), n(C(s({}, f), { model: d }));
1385
1388
  } });
1386
1389
  }
1387
- var Qi = Cd;
1390
+ var Qi = Sd;
1388
1391
  var Yr = (e, t) => {
1389
1392
  let r = cr(e, t);
1390
1393
  if (r >= 0)
@@ -1405,38 +1408,38 @@ var require_main_min = __commonJS({
1405
1408
  function Nt(e, t) {
1406
1409
  if (t == null)
1407
1410
  return null;
1408
- let r = e.oneOf.map((a) => Sd(a).reduce((o, [n, i]) => Ce(i) && i.const === t[n] ? o + 2 : tr(i) && typeof t[n] != "undefined" ? o + 1 : o, 0));
1411
+ let r = e.oneOf.map((a) => Fd(a).reduce((o, [n, i]) => Ce(i) && i.const === t[n] ? o + 2 : tr(i) && typeof t[n] != "undefined" ? o + 1 : o, 0));
1409
1412
  return r.every((a) => a === r[0]) ? null : r.indexOf(Math.max(...r));
1410
1413
  }
1411
- function Sd(e) {
1414
+ function Fd(e) {
1412
1415
  return e.properties !== null && typeof e.properties == "object" ? Object.entries(e.properties) : [];
1413
1416
  }
1414
- var io = (e, t, r = {}) => {
1415
- let { defaultTitle: a = "", defaultDescription: o = "", defaultIcon: n, defaultImage: i } = r, c = Qe({ schema: e, model: t, providesProp: "providesTitle", getValueFromSchema: ts }), u = Qe({ schema: e, model: t, providesProp: "providesDescription", getValueFromSchema: ts }), m = Qe({ schema: e, model: t, providesProp: "providesIcon", getValueFromSchema: (h) => {
1416
- var y;
1417
- return (y = h.icon) != null ? y : null;
1418
- } }), p = Qe({ schema: e, model: t, providesProp: "providesImage", getValueFromSchema: (h) => {
1419
- var y;
1420
- return (y = h.image) != null ? y : null;
1417
+ var io = (e, t, r = {}, a) => {
1418
+ let { defaultTitle: o = "", defaultDescription: n = "", defaultIcon: i, defaultImage: c } = r, u = Qe({ schema: e, model: t, providesProp: "providesTitle", getValueFromSchema: (y, m) => a != null ? a : ts(y, m) }), l = Qe({ schema: e, model: t, providesProp: "providesDescription", getValueFromSchema: (y, m) => a != null ? a : ts(y, m) }), p = Qe({ schema: e, model: t, providesProp: "providesIcon", getValueFromSchema: (y) => {
1419
+ var m;
1420
+ return (m = y.icon) != null ? m : null;
1421
+ } }), h = Qe({ schema: e, model: t, providesProp: "providesImage", getValueFromSchema: (y) => {
1422
+ var m;
1423
+ return (m = y.image) != null ? m : null;
1421
1424
  } });
1422
- return { value: t, title: c || a, description: u || o, icon: m || n, image: p || i };
1425
+ return { value: t, title: u || o, description: l || n, icon: p || i, image: h || c };
1423
1426
  };
1424
1427
  var Qe = (e) => {
1425
- let { schema: t, model: r, providesProp: a, getValueFromSchema: o } = e;
1426
- if (vd(t.summary, a))
1428
+ let { schema: t, model: r, providesProp: a, getValueFromSchema: o } = e, n = lt(t);
1429
+ if (Ad(t.summary, a))
1427
1430
  return o(t, r);
1428
- switch (lt(t)) {
1431
+ switch (n) {
1429
1432
  case "object":
1430
- return Fd(e);
1431
- case "oneOf":
1432
1433
  return bd(e);
1433
- case "allOf":
1434
+ case "oneOf":
1434
1435
  return xd(e);
1436
+ case "allOf":
1437
+ return vd(e);
1435
1438
  default:
1436
1439
  return null;
1437
1440
  }
1438
1441
  };
1439
- var Fd = (e) => {
1442
+ var bd = (e) => {
1440
1443
  let { schema: t, model: r } = e, a = t;
1441
1444
  for (let o in a.properties) {
1442
1445
  let n = a.properties[o], i = W(r) && o in r ? r[o] : null, c = Qe(C(s({}, e), { schema: n, model: i }));
@@ -1445,7 +1448,7 @@ var require_main_min = __commonJS({
1445
1448
  }
1446
1449
  return null;
1447
1450
  };
1448
- var bd = (e) => {
1451
+ var xd = (e) => {
1449
1452
  let { schema: t, model: r } = e;
1450
1453
  if (mt(t)) {
1451
1454
  if (!W(r))
@@ -1459,7 +1462,7 @@ var require_main_min = __commonJS({
1459
1462
  let a = t, o = Yr(a, r);
1460
1463
  return o === null || o < 0 ? null : Qe(C(s({}, e), { schema: a.oneOf[o] }));
1461
1464
  };
1462
- var xd = (e) => {
1465
+ var vd = (e) => {
1463
1466
  let { schema: t } = e, r = t;
1464
1467
  for (let a of r.allOf) {
1465
1468
  let o = Qe(C(s({}, e), { schema: a }));
@@ -1469,33 +1472,33 @@ var require_main_min = __commonJS({
1469
1472
  return null;
1470
1473
  };
1471
1474
  var ts = (e, t) => Ce(e) ? e.title ? e.title : L(e.const) ? e.const : null : Br(t) ? t : null;
1472
- var vd = (e, t) => !!e && Object.hasOwnProperty.call(e, t) && !!e[t];
1475
+ var Ad = (e, t) => !!e && Object.hasOwnProperty.call(e, t) && !!e[t];
1473
1476
  var be = require("react/jsx-runtime");
1474
- function Ad({ schema: e, model: t, errors: r, submitted: a, onChange: o }) {
1477
+ function Od({ schema: e, model: t, errors: r, submitted: a, onChange: o }) {
1475
1478
  let [n, i] = (0, Zr.useState)(null), [c, u] = (0, Zr.useState)(() => {
1476
1479
  if (R(t) && !V(t))
1477
1480
  throw new Error("RepeatableSchema does not support object models. Ensure your array schema is wrapped inside an object schema.");
1478
1481
  return t ? t.map((S) => io(e.items, S, e == null ? void 0 : e.summary)) : null;
1479
- }), [m, p] = (0, Zr.useState)({ item: null, model: null }), h = (S) => {
1482
+ }), [l, p] = (0, Zr.useState)({ item: null, model: null }), h = (S) => {
1480
1483
  let F = S ? S.map(({ value: w }) => w) : null;
1481
1484
  o({ model: F, triggerSchema: e.items, triggerModel: F });
1482
1485
  }, y = () => {
1483
1486
  i("add");
1484
- }, d = (S) => {
1487
+ }, m = (S) => {
1485
1488
  p({ item: S, model: S.value }), i("edit");
1486
- }, l = (S, F) => {
1489
+ }, d = (S, F) => {
1487
1490
  var P;
1488
- let w = S === "remove" ? null : io(e.items, F != null ? F : m.model, e.summary);
1491
+ let w = S === "remove" ? null : io(e.items, l.model, e.summary, F);
1489
1492
  if (S !== "remove" && !$((P = w == null ? void 0 : w.value) != null ? P : null, e.items))
1490
1493
  return;
1491
- let v = Od(S, { originalItem: m.item, updatedItem: w, itemSummaries: c });
1494
+ let v = Pd(S, { originalItem: l.item, updatedItem: w, itemSummaries: c });
1492
1495
  u(v), h(v), p({ item: null, model: null }), i(null);
1493
1496
  }, f = () => {
1494
1497
  p({ item: null, model: null }), i(null);
1495
1498
  }, { formatMessage: g } = (0, as.useIntl)();
1496
- return (0, be.jsxs)(be.Fragment, { children: [e.title && (0, be.jsx)(Bt.Header, { title: e.title }), c && c.map((S) => (0, be.jsx)(Ki, { item: S, onClick: () => d(S) }, JSON.stringify(S))), (0, be.jsx)(Bt.NavigationOption, { media: (0, be.jsx)(rs.Plus, {}), title: e.addItemTitle || g(ht.addItemTitle), showMediaAtAllSizes: true, onClick: y }), (0, be.jsx)(Bt.Modal, { open: n !== null, title: (n === "add" ? e.addItemTitle : e.editItemTitle) || g(ht.addItemTitle), body: (0, be.jsx)(Qi, { type: n != null ? n : "add", schema: e, model: m.model, errors: r, submitted: a, onAction: l, onModelChange: ({ model: S }) => p(C(s({}, m), { model: S })) }), onClose: f })] });
1499
+ return (0, be.jsxs)(be.Fragment, { children: [e.title && (0, be.jsx)(Bt.Header, { title: e.title }), c == null ? void 0 : c.map((S) => (0, be.jsx)(Ki, { item: S, onClick: () => m(S) }, JSON.stringify(S))), (0, be.jsx)(Bt.NavigationOption, { media: (0, be.jsx)(rs.Plus, {}), title: e.addItemTitle || g(ht.addItemTitle), showMediaAtAllSizes: true, onClick: y }), (0, be.jsx)(Bt.Modal, { open: n !== null, title: (n === "add" ? e.addItemTitle : e.editItemTitle) || g(ht.addItemTitle), body: (0, be.jsx)(Qi, { type: n != null ? n : "add", schema: e, model: l.model, errors: r, submitted: a, onAction: d, onModelChange: ({ model: S }) => p(C(s({}, l), { model: S })) }), onClose: f })] });
1497
1500
  }
1498
- var Od = (e, { originalItem: t, updatedItem: r, itemSummaries: a }) => {
1501
+ var Pd = (e, { originalItem: t, updatedItem: r, itemSummaries: a }) => {
1499
1502
  if (e === "remove")
1500
1503
  return (a || []).filter((o) => o !== t);
1501
1504
  if (!r)
@@ -1509,7 +1512,7 @@ var require_main_min = __commonJS({
1509
1512
  return null;
1510
1513
  }
1511
1514
  };
1512
- var os = Ad;
1515
+ var os = Od;
1513
1516
  var so = require("react/jsx-runtime");
1514
1517
  var ns = (e) => {
1515
1518
  let { schema: t } = e;
@@ -1534,17 +1537,17 @@ var require_main_min = __commonJS({
1534
1537
  var ms = Ee(Xe());
1535
1538
  var ea = require("react");
1536
1539
  var de = require("react/jsx-runtime");
1537
- var Pd = (e) => ({ "col-xs-12": true, "col-sm-6": e === "md", "col-sm-4": e === "sm" });
1540
+ var Md = (e) => ({ "col-xs-12": true, "col-sm-6": e === "md", "col-sm-4": e === "sm" });
1538
1541
  function ls(e) {
1539
- let [t, r] = (0, ea.useState)(() => s({}, me(e.model, e.schema))), a = (m, p) => {
1540
- p.model !== null ? t[m] = p.model : delete t[m], r(t), e.onChange(C(s({}, p), { model: t }));
1541
- }, o = (m) => e.schema.required && e.schema.required.includes(m);
1542
+ let [t, r] = (0, ea.useState)(() => s({}, me(e.model, e.schema))), a = (l, p) => {
1543
+ p.model !== null ? t[l] = p.model : delete t[l], r(t), e.onChange(C(s({}, p), { model: t }));
1544
+ }, o = (l) => e.schema.required && e.schema.required.includes(l);
1542
1545
  (0, ea.useEffect)(() => {
1543
- let m = me(t, e.schema) || {};
1544
- r(m), Je(m, t) || e.onChange({ model: m, triggerSchema: e.schema, triggerModel: m });
1546
+ let l = me(t, e.schema) || {};
1547
+ r(l), Je(l, t) || e.onChange({ model: l, triggerSchema: e.schema, triggerModel: l });
1545
1548
  }, [e.schema]);
1546
- let n = /* @__PURE__ */ new Set([...e.schema.displayOrder || [], ...Object.keys(e.schema.properties)]), i = (m) => typeof e.schema.properties[m] != "undefined", c = Array.from(n).filter(i), u = e.errors;
1547
- return (0, de.jsxs)(de.Fragment, { children: [e.schema.alert && (0, de.jsx)(ce, { component: e.schema.alert }), (0, de.jsxs)("fieldset", { children: [e.schema.title && !e.hideTitle && (0, de.jsx)(Qr.Section, { children: (0, de.jsx)(Qr.Header, { title: e.schema.title }) }), e.schema.description && !e.hideTitle && (0, de.jsxs)("p", { children: [" ", e.schema.description, " "] }), (0, de.jsx)("div", { className: "row", children: c.map((m) => (0, de.jsx)("div", { className: (0, ms.default)(Pd(e.schema.properties[m].width)), children: (0, de.jsx)(le, { schema: e.schema.properties[m], model: e.model && e.model[m], errors: u == null ? void 0 : u[m], submitted: e.submitted, required: o(m), disabled: e.disabled, onChange: (p) => a(m, p), onPersistAsync: e.onPersistAsync }) }, m)) })] })] });
1549
+ let n = /* @__PURE__ */ new Set([...e.schema.displayOrder || [], ...Object.keys(e.schema.properties)]), i = (l) => typeof e.schema.properties[l] != "undefined", c = Array.from(n).filter(i), u = e.errors;
1550
+ return (0, de.jsxs)(de.Fragment, { children: [e.schema.alert && (0, de.jsx)(ce, { component: e.schema.alert }), (0, de.jsxs)("fieldset", { children: [e.schema.title && !e.hideTitle && (0, de.jsx)(Qr.Section, { children: (0, de.jsx)(Qr.Header, { title: e.schema.title }) }), e.schema.description && !e.hideTitle && (0, de.jsxs)("p", { children: [" ", e.schema.description, " "] }), (0, de.jsx)("div", { className: "row", children: c.map((l) => (0, de.jsx)("div", { className: (0, ms.default)(Md(e.schema.properties[l].width)), children: (0, de.jsx)(le, { schema: e.schema.properties[l], model: e.model && e.model[l], errors: u == null ? void 0 : u[l], submitted: e.submitted, required: o(l), disabled: e.disabled, onChange: (p) => a(l, p), onPersistAsync: e.onPersistAsync }) }, l)) })] })] });
1548
1551
  }
1549
1552
  ls.defaultProps = { hideTitle: false, disabled: false };
1550
1553
  var mr = ls;
@@ -1556,11 +1559,11 @@ var require_main_min = __commonJS({
1556
1559
  var ds = require("react-intl");
1557
1560
  var us = (0, ds.defineMessages)({ helpAria: { id: "dynamicFlows.Help.ariaLabel", defaultMessage: "Click here for more info.", description: "Aria label for help." } });
1558
1561
  var mo = require("react/jsx-runtime");
1559
- function Md(e) {
1562
+ function kd(e) {
1560
1563
  let t = (0, ps.useIntl)();
1561
1564
  return (0, mo.jsx)(ta.Info, { className: "m-l-1", content: (0, mo.jsx)(ta.Markdown, { config: { link: { target: "_blank" } }, children: e.help.markdown }), presentation: "POPOVER", size: "sm", "aria-label": t.formatMessage(us.helpAria) });
1562
1565
  }
1563
- var qe = Md;
1566
+ var qe = kd;
1564
1567
  var Fs = require("react");
1565
1568
  var K = require("@transferwise/components");
1566
1569
  var ws = require("react");
@@ -1678,12 +1681,12 @@ var require_main_min = __commonJS({
1678
1681
  }
1679
1682
  render() {
1680
1683
  var _;
1681
- let { name: r, placeholder: a, step: o, countryCode: n, type: i, options: c, disabled: u, readOnly: m, required: p, minLength: h, maxLength: y, min: d, max: l, searchPlaceholder: f, searchValue: g, onSearchChange: S, size: F, uploadProps: w, label: v, monthFormat: P, id: x, minDate: k, maxDate: I, value: M, mode: O, describedBy: B } = this.props;
1684
+ let { name: r, placeholder: a, step: o, countryCode: n, type: i, options: c, disabled: u, readOnly: l, required: p, minLength: h, maxLength: y, min: m, max: d, searchPlaceholder: f, searchValue: g, onSearchChange: S, size: F, uploadProps: w, label: v, monthFormat: P, id: x, minDate: k, maxDate: I, value: M, mode: O, describedBy: B } = this.props;
1682
1685
  switch (i) {
1683
1686
  case N.RADIO:
1684
1687
  return (0, Z.jsx)(K.RadioGroup, { radios: c.map(this.mapOption), name: r, selectedValue: lo(M, { coerceValue: true }), onChange: this.handleOnChange });
1685
1688
  case N.CHECKBOX:
1686
- return (0, Z.jsx)(K.Checkbox, { checked: ys(M, { coerceValue: true }), disabled: u, label: v, required: p, readOnly: m, onChange: this.handleOnChange, onBlur: this.handleOnBlur, onFocus: this.handleOnFocus });
1689
+ return (0, Z.jsx)(K.Checkbox, { checked: ys(M, { coerceValue: true }), disabled: u, label: v, required: p, readOnly: l, onChange: this.handleOnChange, onBlur: this.handleOnBlur, onFocus: this.handleOnFocus });
1687
1690
  case N.SELECT: {
1688
1691
  let A = c.length >= 20;
1689
1692
  return (0, Z.jsx)(K.Select, { id: x, selected: this.getSelectedOption(c), options: c, search: A, required: p, disabled: u, placeholder: a, searchPlaceholder: f, searchValue: g, onChange: (z) => {
@@ -1698,7 +1701,7 @@ var require_main_min = __commonJS({
1698
1701
  } });
1699
1702
  case N.NUMERIC:
1700
1703
  case N.NUMBER:
1701
- return (0, Z.jsx)("input", { autoComplete: this.getAutocompleteValue(), className: "form-control", disabled: u, id: x, max: l, min: d, placeholder: a, readOnly: m, required: p, step: o, type: "number", value: lo(M, { coerceValue: true }), onBlur: this.handleOnBlur, onChange: (A) => {
1704
+ return (0, Z.jsx)("input", { autoComplete: this.getAutocompleteValue(), className: "form-control", disabled: u, id: x, max: d, min: m, placeholder: a, readOnly: l, required: p, step: o, type: "number", value: lo(M, { coerceValue: true }), onBlur: this.handleOnBlur, onChange: (A) => {
1702
1705
  i === N.NUMERIC ? this.props.onChange(A.target.value) : this.props.onChange(parseFloat(A.target.value));
1703
1706
  }, onFocus: this.handleOnFocus, onWheel: (A) => {
1704
1707
  A.target instanceof HTMLElement && A.target.blur();
@@ -1706,7 +1709,7 @@ var require_main_min = __commonJS({
1706
1709
  case N.HIDDEN:
1707
1710
  return (0, Z.jsx)("input", { type: "hidden", name: r, value: zt(M, { coerceValue: true }), id: x });
1708
1711
  case N.PASSWORD:
1709
- return (0, Z.jsx)("input", { autoComplete: this.getAutocompleteValue(), className: "form-control", disabled: u, id: x, placeholder: a, readOnly: m, required: p, type: "password", value: zt(M, { coerceValue: true }), onBlur: this.handleOnBlur, onChange: this.handleInputOnChange, onFocus: this.handleOnFocus, "aria-describedby": B });
1712
+ return (0, Z.jsx)("input", { autoComplete: this.getAutocompleteValue(), className: "form-control", disabled: u, id: x, placeholder: a, readOnly: l, required: p, type: "password", value: zt(M, { coerceValue: true }), onBlur: this.handleOnBlur, onChange: this.handleInputOnChange, onFocus: this.handleOnFocus, "aria-describedby": B });
1710
1713
  case N.DATE:
1711
1714
  case N.DATETIME:
1712
1715
  return (0, Z.jsx)(K.DateInput, { disabled: u, size: F, value: fs(M), mode: O, monthFormat: P, onBlur: this.handleOnBlur, onChange: this.handleOnChange, onFocus: this.handleOnFocus });
@@ -1717,7 +1720,7 @@ var require_main_min = __commonJS({
1717
1720
  case N.TEL:
1718
1721
  return (0, Z.jsx)(K.PhoneNumberInput, { disabled: u, countryCode: n, placeholder: a, required: p, searchPlaceholder: f, size: F, initialValue: zt(M), onBlur: this.handleOnBlur, onChange: this.handleOnChange, onFocus: this.handleOnFocus });
1719
1722
  case N.TEXTAREA: {
1720
- let A = { className: "form-control tw-form-control", id: x, name: r, placeholder: a, value: zt(M, { coerceValue: true }), readOnly: m, required: p, minLength: h, maxLength: y, onFocus: this.handleOnFocus, onBlur: this.handleOnBlur, disabled: u, autoComplete: this.getAutocompleteValue() };
1723
+ let A = { className: "form-control tw-form-control", id: x, name: r, placeholder: a, value: zt(M, { coerceValue: true }), readOnly: l, required: p, minLength: h, maxLength: y, onFocus: this.handleOnFocus, onBlur: this.handleOnBlur, disabled: u, autoComplete: this.getAutocompleteValue() };
1721
1724
  return this.props.displayPattern ? (0, Z.jsx)(K.TextareaWithDisplayFormat, C(s({ displayPattern: this.props.displayPattern }, A), { onChange: this.handleOnChange })) : (0, Z.jsx)("textarea", C(s({}, A), { onChange: this.handleInputOnChange, "aria-describedby": B }));
1722
1725
  }
1723
1726
  case N.FILE:
@@ -1732,7 +1735,7 @@ var require_main_min = __commonJS({
1732
1735
  case N.TEXT:
1733
1736
  case N.EMAIL:
1734
1737
  default: {
1735
- let A = { type: i === N.EMAIL ? "email" : "text", className: "form-control", id: x, name: r, placeholder: a, value: zt(M, { coerceValue: true }), readOnly: m, required: p, minLength: h, maxLength: y, onFocus: this.handleOnFocus, onBlur: this.handleOnBlur, disabled: u, autoComplete: this.getAutocompleteValue() };
1738
+ let A = { type: i === N.EMAIL ? "email" : "text", className: "form-control", id: x, name: r, placeholder: a, value: zt(M, { coerceValue: true }), readOnly: l, required: p, minLength: h, maxLength: y, onFocus: this.handleOnFocus, onBlur: this.handleOnBlur, disabled: u, autoComplete: this.getAutocompleteValue() };
1736
1739
  return this.props.displayPattern ? (0, Z.jsx)(K.InputWithDisplayFormat, C(s({ displayPattern: this.props.displayPattern }, A), { onChange: this.handleOnChange })) : (0, Z.jsx)("input", C(s({}, A), { onChange: this.handleInputOnChange, "aria-describedby": B }));
1737
1740
  }
1738
1741
  }
@@ -1745,24 +1748,24 @@ var require_main_min = __commonJS({
1745
1748
  var Cs = (e, t) => {
1746
1749
  switch (t) {
1747
1750
  case "select":
1748
- return Ed(e);
1751
+ return Id(e);
1749
1752
  case "radio":
1750
1753
  default:
1751
- return kd(e);
1754
+ return Ed(e);
1752
1755
  }
1753
1756
  };
1754
- var kd = (e) => s(s(s({ label: e.title, value: e.const }, Rd(e.title, e.description)), Vt(e)), Ss(e.disabled));
1755
- var Ed = (e) => s(s(s(s(s({ label: e.title, value: e.const }, Td(e.title, e.description)), Ld(e.icon)), Dd(e.image)), Ss(e.disabled)), Id(e.keywords));
1756
- var Id = (e) => V(e) ? { searchStrings: e } : {};
1757
- var Dd = (e) => e != null && e.url ? { icon: (0, ve.jsx)("div", { className: "media", children: (0, ve.jsx)("div", { className: "np-option__no-media-circle", children: (0, ve.jsx)("img", { src: e.url, alt: e.name || "" }) }) }) } : null;
1758
- var Ld = (e) => e != null && e.name && Lt(e.name) ? { currency: e.name.substring(5) } : e != null && e.name && Xa(e.name) ? { icon: (0, ve.jsx)(Ye, { type: e.name }) } : e != null && e.text ? { icon: (0, ve.jsx)("span", { children: e.text }) } : null;
1757
+ var Ed = (e) => s(s(s({ label: e.title, value: e.const }, Nd(e.title, e.description)), Vt(e)), Ss(e.disabled));
1758
+ var Id = (e) => s(s(s(s(s({ label: e.title, value: e.const }, Rd(e.title, e.description)), Td(e.icon)), Ld(e.image)), Ss(e.disabled)), Dd(e.keywords));
1759
+ var Dd = (e) => V(e) ? { searchStrings: e } : {};
1760
+ var Ld = (e) => e != null && e.url ? { icon: (0, ve.jsx)("div", { className: "media", children: (0, ve.jsx)("div", { className: "np-option__no-media-circle", children: (0, ve.jsx)("img", { src: e.url, alt: e.name || "" }) }) }) } : null;
1761
+ var Td = (e) => e != null && e.name && Lt(e.name) ? { currency: e.name.substring(5) } : e != null && e.name && Xa(e.name) ? { icon: (0, ve.jsx)(Ye, { type: e.name }) } : e != null && e.text ? { icon: (0, ve.jsx)("span", { children: e.text }) } : null;
1759
1762
  var Vt = ({ image: e, icon: t }) => e != null && e.url ? { avatar: (0, ve.jsx)(et.Avatar, { type: et.AvatarType.THUMBNAIL, children: (0, ve.jsx)("img", { src: e.url, alt: "" }) }) } : t != null && t.name && Xa(t.name) ? { avatar: (0, ve.jsx)(et.Avatar, { type: et.AvatarType.ICON, children: (0, ve.jsx)(Ye, { type: t.name }) }) } : t != null && t.text ? { avatar: (0, ve.jsx)(et.Avatar, { type: et.AvatarType.INITIALS, children: t.text }) } : null;
1760
1763
  var ra = ({ accepts: e }) => s({}, V(e) && { usAccept: e.join(",") });
1761
- var Td = (e, t) => {
1764
+ var Rd = (e, t) => {
1762
1765
  if (e && t)
1763
1766
  return { [(e + t).length > 50 ? "secondary" : "note"]: t };
1764
1767
  };
1765
- var Rd = (e, t) => {
1768
+ var Nd = (e, t) => {
1766
1769
  if (e && t)
1767
1770
  return { note: t };
1768
1771
  };
@@ -1771,31 +1774,31 @@ var require_main_min = __commonJS({
1771
1774
  return { disabled: e };
1772
1775
  };
1773
1776
  var yo = require("react/jsx-runtime");
1774
- var Nd = (e) => e === "string" || e === "number";
1775
- var fo = (e) => we(e) ? e.control === N.TAB && e.oneOf.length > 3 ? N.SELECT : e.oneOf.length === 2 && !e.control ? N.RADIO : e.control || N.SELECT : Lr(e) ? Bd(e) : "control" in e && e.control ? e.control : e.type === "boolean" ? "checkbox" : e.type === "integer" ? "number" : e.type;
1776
- var Bd = ({ format: e, control: t }) => t ? zd[t] || t : e && jd[e] || "text";
1777
- var zd = { "date-lookup": "date-lookup", password: "password", textarea: "textarea", email: "email", numeric: "numeric", "phone-number": "tel" };
1778
- var jd = { date: "date", email: "email", base64url: "file", password: "password", "phone-number": "tel" };
1779
- var Vd = (e, t) => e.oneOf ? e.oneOf.map((r) => Cs(r, t)) : null;
1777
+ var Bd = (e) => e === "string" || e === "number";
1778
+ var fo = (e) => we(e) ? e.control === N.TAB && e.oneOf.length > 3 ? N.SELECT : e.oneOf.length === 2 && !e.control ? N.RADIO : e.control || N.SELECT : Lr(e) ? zd(e) : "control" in e && e.control ? e.control : e.type === "boolean" ? "checkbox" : e.type === "integer" ? "number" : e.type;
1779
+ var zd = ({ format: e, control: t }) => t ? jd[t] || t : e && Vd[e] || "text";
1780
+ var jd = { "date-lookup": "date-lookup", password: "password", textarea: "textarea", email: "email", numeric: "numeric", "phone-number": "tel" };
1781
+ var Vd = { date: "date", email: "email", base64url: "file", password: "password", "phone-number": "tel" };
1782
+ var Ud = (e, t) => e.oneOf ? e.oneOf.map((r) => Cs(r, t)) : null;
1780
1783
  function bs(e) {
1781
- let { id: t, schema: r, value: a, disabled: o, onChange: n, onFocus: i, onBlur: c, onSearchChange: u, describedBy: m } = e, p = Mt(), h = (F) => Nd(r.type) && (D(F) || Y(F)) ? "" : F, y = (F, w, v) => {
1784
+ let { id: t, schema: r, value: a, disabled: o, onChange: n, onFocus: i, onBlur: c, onSearchChange: u, describedBy: l } = e, p = Mt(), h = (F) => Bd(r.type) && (D(F) || Y(F)) ? "" : F, y = (F, w, v) => {
1782
1785
  n(We(F, r), w, v);
1783
- }, d = fo(r);
1786
+ }, m = fo(r);
1784
1787
  (0, Fs.useEffect)(() => {
1785
- Ud(r, p, d);
1786
- }, [JSON.stringify(r), p, d]);
1787
- let l = r.values || Vd(r, d), f = { onFocus: i, onBlur: c, onSearchChange: u, onChange: y }, g = h(a), S = { id: t, name: t, label: r.title, options: l || [], placeholder: r.placeholder, autoComplete: !r.help, autocompleteHint: r.autocompleteHint, disabled: o || r.disabled, displayPattern: r.displayFormat, uploadProps: ra(r), describedBy: m };
1788
- return (0, yo.jsx)("div", { "aria-describedby": m, children: (0, yo.jsx)(jt, s(s({ type: d, value: g }, f), S)) });
1788
+ Hd(r, p, m);
1789
+ }, [JSON.stringify(r), p, m]);
1790
+ let d = r.values || Ud(r, m), f = { onFocus: i, onBlur: c, onSearchChange: u, onChange: y }, g = h(a), S = { id: t, name: t, label: r.title, options: d || [], placeholder: r.placeholder, autoComplete: !r.help, autocompleteHint: r.autocompleteHint, disabled: o || r.disabled, displayPattern: r.displayFormat, uploadProps: ra(r), describedBy: l };
1791
+ return (0, yo.jsx)("div", { "aria-describedby": l, children: (0, yo.jsx)(jt, s(s({ type: m, value: g }, f), S)) });
1789
1792
  }
1790
1793
  bs.defaultProps = { value: null, onFocus: null, onBlur: null, onSearchChange: null, disabled: false };
1791
- var Ud = (e, t, r) => {
1794
+ var Hd = (e, t, r) => {
1792
1795
  we(e) && e.oneOf.length === 2 && !e.control && t.warning("Deprecation warning", 'A oneOf schema with 2 options and no control type currently renders as a "radio" but will be changed to render as a "select". Please specify control radio to retain the existing behaviour.'), r === "file" && t.warning("Deprecation warning", "Please use a persist-async blob schema instead of string with base64url for file uploads. The base64url does not perform well on low end devices. Support for this schema will be removed in a later release."), e.values && t.warning("Deprecated schema", "Schema.values is a legacy approach. Please use oneOf.");
1793
1796
  };
1794
1797
  var lr = bs;
1795
1798
  var Q = require("react/jsx-runtime");
1796
1799
  function As(e) {
1797
- let t = te(), [r, a] = (0, Ne.useState)(false), [o, n] = (0, Ne.useState)(false), [i, c] = (0, Ne.useState)(false), u = (0, Ne.useMemo)(() => e.schema.$id || Te(), [e.schema.$id]), [m, p] = (0, Ne.useState)(Yr(e.schema, e.model)), [h, y] = (0, Ne.useState)($d(e.model, e.schema.oneOf)), d = ei(t, 200), l = (k) => {
1798
- d("Dynamic Flow - OneOf Searched", { oneOfId: e.schema.analyticsId, searchValueLength: k.length });
1800
+ let t = te(), [r, a] = (0, Ne.useState)(false), [o, n] = (0, Ne.useState)(false), [i, c] = (0, Ne.useState)(false), u = (0, Ne.useMemo)(() => e.schema.$id || Te(), [e.schema.$id]), [l, p] = (0, Ne.useState)(Yr(e.schema, e.model)), [h, y] = (0, Ne.useState)(Wd(e.model, e.schema.oneOf)), m = ei(t, 200), d = (k) => {
1801
+ m("Dynamic Flow - OneOf Searched", { oneOfId: e.schema.analyticsId, searchValueLength: k.length });
1799
1802
  };
1800
1803
  if ((0, Ne.useEffect)(() => {
1801
1804
  let k = cr(e.schema, e.model), I = cr(e.schema, e.schema.default);
@@ -1817,28 +1820,28 @@ var require_main_min = __commonJS({
1817
1820
  } else
1818
1821
  e.onChange({ model: h[k], triggerSchema: O, triggerModel: h[k], type: I, metadata: M });
1819
1822
  I !== "init" && e.schema.analyticsId && t("Dynamic Flow - OneOf Selected", { oneOfId: e.schema.analyticsId, schemaId: O == null ? void 0 : O.analyticsId });
1820
- }, w = Wd(e.schema), v = qd(e, m), P = { "form-group": true, "has-error": !r && e.errors && !kt(e.errors) || (e.submitted || r && i) && v.length }, x = `${u}-feedback`;
1821
- return (0, Q.jsxs)(Q.Fragment, { children: [(e.schema.oneOf.length > 1 || Ce(e.schema.oneOf[0])) && (0, Q.jsxs)(Q.Fragment, { children: [e.schema.alert && (0, Q.jsx)(ce, { component: e.schema.alert }), (0, Q.jsxs)("div", { className: (0, vs.default)(P), children: [Hd(e.schema, u), (0, Q.jsx)(lr, { id: u, schema: w, value: m, disabled: e.disabled, describedBy: x, onChange: F, onFocus: g, onBlur: S, onSearchChange: l }), (0, Q.jsx)(He, { id: x, changed: r, focused: o, blurred: i, submitted: e.submitted, errors: Gd(e.errors), schema: e.schema, validations: v, infoMessage: null })] })] }), tr(e.schema.oneOf[m]) && (0, Q.jsx)(le, { schema: e.schema.oneOf[m], model: h[m], errors: e.errors, submitted: e.submitted, hideTitle: true, disabled: e.disabled, onChange: (k) => f(m, k), onPersistAsync: e.onPersistAsync })] });
1823
+ }, w = _d(e.schema), v = Gd(e, l), P = { "form-group": true, "has-error": !r && e.errors && !kt(e.errors) || (e.submitted || r && i) && v.length }, x = `${u}-feedback`;
1824
+ return (0, Q.jsxs)(Q.Fragment, { children: [(e.schema.oneOf.length > 1 || Ce(e.schema.oneOf[0])) && (0, Q.jsxs)(Q.Fragment, { children: [e.schema.alert && (0, Q.jsx)(ce, { component: e.schema.alert }), (0, Q.jsxs)("div", { className: (0, vs.default)(P), children: [qd(e.schema, u), (0, Q.jsx)(lr, { id: u, schema: w, value: l, disabled: e.disabled, describedBy: x, onChange: F, onFocus: g, onBlur: S, onSearchChange: d }), (0, Q.jsx)(He, { id: x, changed: r, focused: o, blurred: i, submitted: e.submitted, errors: $d(e.errors), schema: e.schema, validations: v, infoMessage: null })] })] }), tr(e.schema.oneOf[l]) && (0, Q.jsx)(le, { schema: e.schema.oneOf[l], model: h[l], errors: e.errors, submitted: e.submitted, hideTitle: true, disabled: e.disabled, onChange: (k) => f(l, k), onPersistAsync: e.onPersistAsync })] });
1822
1825
  }
1823
- function Hd(e, t) {
1826
+ function qd(e, t) {
1824
1827
  var o;
1825
1828
  let r = e.help ? (0, Q.jsx)(qe, { help: e.help }) : null, a = Ce(e.oneOf[0]) ? (0, Q.jsx)("div", { className: "m-b-1", children: (0, Q.jsxs)("label", { className: "control-label d-inline", htmlFor: t, children: [e.title, " ", r] }) }) : (0, Q.jsx)(Q.Fragment, { children: r ? (0, Q.jsxs)("h4", { className: "m-b-2", children: [e.title, " ", r] }) : (0, Q.jsx)(xs.Header, { title: (o = e.title) != null ? o : "" }) });
1826
1829
  return e.title ? a : r;
1827
1830
  }
1828
- function qd(e, t) {
1831
+ function Gd(e, t) {
1829
1832
  let r = e.schema.oneOf[t != null ? t : -1];
1830
1833
  return Ce(r) ? _e(r.const, e.schema, !!e.required) : t === null || t < 0 ? _e(null, e.schema, !!e.required) : [];
1831
1834
  }
1832
- function Gd(e) {
1835
+ function $d(e) {
1833
1836
  return typeof e == "string" ? e : null;
1834
1837
  }
1835
- function $d(e, t) {
1838
+ function Wd(e, t) {
1836
1839
  return t.map((r) => Et(e, r));
1837
1840
  }
1838
- function Wd(e) {
1839
- return C(s({}, e), { oneOf: e.oneOf.map(_d) });
1841
+ function _d(e) {
1842
+ return C(s({}, e), { oneOf: e.oneOf.map(Kd) });
1840
1843
  }
1841
- function _d(e, t) {
1844
+ function Kd(e, t) {
1842
1845
  let { title: r, description: a, disabled: o = false, icon: n, image: i, keywords: c } = e;
1843
1846
  return { title: r, description: a, disabled: o, icon: n, image: i, const: t, keywords: c };
1844
1847
  }
@@ -1850,28 +1853,28 @@ var require_main_min = __commonJS({
1850
1853
  var Os = require("react");
1851
1854
  var Ms = require("react/jsx-runtime");
1852
1855
  function Ps(e) {
1853
- let { id: t, httpClient: r = fetch, httpOptions: a, fileId: o, idProperty: n, usAccept: i, maxSize: c, usPlaceholder: u, onSuccess: m, onFailure: p, onCancel: h } = e, y = te(), d = (0, Os.useMemo)(() => o ? [{ id: o, status: aa.Status.SUCCEEDED }] : [], [o]), l = (f) => (y("Dynamic Flow - PersistAsync", { status: "pending", schemaId: t }), r(String(a.url), { method: a.method || "POST", body: f }).then((g) => g.ok ? (m == null || m(g.clone()), g.json().then((S) => ({ id: S[n] }))) : (p == null || p({ response: g }), Promise.reject())));
1854
- return (0, Ms.jsx)(aa.UploadInput, { id: t, fileInputName: a.fileInputName, files: d, uploadButtonTitle: e.usLabel, sizeLimit: c ? Tr(c) : void 0, fileTypes: i, description: u, onUploadFile: l, onDeleteFile: (f) => (h == null || h(), Promise.resolve()) });
1856
+ let { id: t, httpClient: r = fetch, httpOptions: a, fileId: o, idProperty: n, usAccept: i, maxSize: c, usPlaceholder: u, onSuccess: l, onFailure: p, onCancel: h } = e, y = te(), m = (0, Os.useMemo)(() => o ? [{ id: o, status: aa.Status.SUCCEEDED }] : [], [o]), d = (f) => (y("Dynamic Flow - PersistAsync", { status: "pending", schemaId: t }), r(String(a.url), { method: a.method || "POST", body: f }).then((g) => g.ok ? (l == null || l(g.clone()), g.json().then((S) => ({ id: S[n] }))) : (p == null || p({ response: g }), Promise.reject())));
1857
+ return (0, Ms.jsx)(aa.UploadInput, { id: t, fileInputName: a.fileInputName, files: m, uploadButtonTitle: e.usLabel, sizeLimit: c ? Tr(c) : void 0, fileTypes: i, description: u, onUploadFile: d, onDeleteFile: (f) => (h == null || h(), Promise.resolve()) });
1855
1858
  }
1856
1859
  var Ut = require("react/jsx-runtime");
1857
1860
  function Es(e) {
1858
- let { model: t, schema: r, submitted: a, required: o, errors: n, onChange: i } = e, [c, u] = (0, wt.useState)({}), [m, p] = (0, wt.useState)(null), [h, y] = (0, wt.useState)([]), [d, l] = (0, wt.useState)(false), f = ae(), g = te();
1861
+ let { model: t, schema: r, submitted: a, required: o, errors: n, onChange: i } = e, [c, u] = (0, wt.useState)({}), [l, p] = (0, wt.useState)(null), [h, y] = (0, wt.useState)([]), [m, d] = (0, wt.useState)(false), f = ae(), g = te();
1859
1862
  (0, wt.useEffect)(() => {
1860
1863
  y(a ? _e(t, r, !!o) : []);
1861
1864
  }, [t, r, a, o]);
1862
1865
  let S = async (O, B) => {
1863
1866
  let _ = await O.json(), A = Co(r.persistAsync.idProperty, _);
1864
- i({ model: A, triggerSchema: r, triggerModel: A }), l(true), g("Dynamic Flow - PersistAsync", { status: "success", schemaId: r.$id });
1867
+ i({ model: A, triggerSchema: r, triggerModel: A }), d(true), g("Dynamic Flow - PersistAsync", { status: "success", schemaId: r.$id });
1865
1868
  }, F = async (O) => {
1866
1869
  if (O.response && Ir(O.response.status)) {
1867
1870
  let B = await O.response.json();
1868
1871
  u(B.validation || {}), p([r.persistAsync.param]);
1869
1872
  }
1870
- i({ model: null, triggerSchema: r, triggerModel: null }), l(true), g("Dynamic Flow - PersistAsync", { status: "failure", schemaId: r.$id });
1873
+ i({ model: null, triggerSchema: r, triggerModel: null }), d(true), g("Dynamic Flow - PersistAsync", { status: "failure", schemaId: r.$id });
1871
1874
  }, w = () => {
1872
- p(null), i({ model: null, triggerSchema: r, triggerModel: null }), l(true);
1873
- }, { url: v, method: P } = r.persistAsync, x = m || h, k = { "form-group": true, "has-error": (a || d) && !!x.length }, I = r.$id || r.persistAsync.schema.$id || r.persistAsync.idProperty, M = `${I}-feedback`;
1874
- return (0, Ut.jsxs)("div", { className: (0, ks.default)(k), children: [(0, Ut.jsx)("div", { "aria-describedby": M, children: (0, Ut.jsx)(Ps, s({ id: I, fileId: t, idProperty: r.persistAsync.idProperty, animationDelay: 0, maxSize: r.persistAsync.schema.maxSize, usLabel: r.title || r.persistAsync.schema.title, usPlaceholder: r.description || r.persistAsync.schema.description, httpOptions: { url: v, method: P, fileInputName: r.persistAsync.param }, httpClient: f, onSuccess: S, onFailure: F, onCancel: w }, ra(r.persistAsync.schema))) }), (0, Ut.jsx)(He, { id: M, blurred: true, focused: false, changed: d, submitted: a, errors: n, schema: r, validations: x, validationMessages: s({ required: "Value is required..." }, c), infoMessage: null })] });
1875
+ p(null), i({ model: null, triggerSchema: r, triggerModel: null }), d(true);
1876
+ }, { url: v, method: P } = r.persistAsync, x = l || h, k = { "form-group": true, "has-error": (a || m) && !!x.length }, I = r.$id || r.persistAsync.schema.$id || r.persistAsync.idProperty, M = `${I}-feedback`;
1877
+ return (0, Ut.jsxs)("div", { className: (0, ks.default)(k), children: [(0, Ut.jsx)("div", { "aria-describedby": M, children: (0, Ut.jsx)(Ps, s({ id: I, fileId: t, idProperty: r.persistAsync.idProperty, animationDelay: 0, maxSize: r.persistAsync.schema.maxSize, usLabel: r.title || r.persistAsync.schema.title, usPlaceholder: r.description || r.persistAsync.schema.description, httpOptions: { url: v, method: P, fileInputName: r.persistAsync.param }, httpClient: f, onSuccess: S, onFailure: F, onCancel: w }, ra(r.persistAsync.schema))) }), (0, Ut.jsx)(He, { id: M, blurred: true, focused: false, changed: m, submitted: a, errors: n, schema: r, validations: x, validationMessages: s({ required: "Value is required..." }, c), infoMessage: null })] });
1875
1878
  }
1876
1879
  Es.defaultProps = { required: false };
1877
1880
  var wo = Es;
@@ -1890,9 +1893,9 @@ var require_main_min = __commonJS({
1890
1893
  var Ls = require("@transferwise/components");
1891
1894
  var bo = require("react/jsx-runtime");
1892
1895
  var Ts = (e) => {
1893
- let { id: t, selection: r, setSelection: a } = e, { promoted: o, other: n, checkedMeans: i } = e.promotion, c = i === "other" ? n.title : (o == null ? void 0 : o.title) || e.promotedOneOf.title, u = i === "other" ? "other" : "promoted", m = i === "other" ? "promoted" : "other", p = r === u;
1896
+ let { id: t, selection: r, setSelection: a } = e, { promoted: o, other: n, checkedMeans: i } = e.promotion, c = i === "other" ? n.title : (o == null ? void 0 : o.title) || e.promotedOneOf.title, u = i === "other" ? "other" : "promoted", l = i === "other" ? "promoted" : "other", p = r === u;
1894
1897
  return (0, bo.jsx)("div", { className: "form-group", children: (0, bo.jsx)(Ls.Checkbox, { id: t, label: c, checked: p, onChange: () => {
1895
- a(p ? m : u);
1898
+ a(p ? l : u);
1896
1899
  } }) });
1897
1900
  };
1898
1901
  Ts.defaultProps = {};
@@ -1900,8 +1903,8 @@ var require_main_min = __commonJS({
1900
1903
  var Ns = require("@transferwise/components");
1901
1904
  var dr = require("react/jsx-runtime");
1902
1905
  function Bs(e) {
1903
- var u, m;
1904
- let { id: t, selection: r, setSelection: a, promotion: o, promotedOneOf: n, title: i } = e, c = [s({ value: "promoted", label: ((u = o.promoted) == null ? void 0 : u.title) || n.title, secondary: ((m = o.promoted) == null ? void 0 : m.description) || n.description }, Vt(n)), s({ value: "other", label: o.other.title, secondary: o.other.description }, Vt(o.other))];
1906
+ var u, l;
1907
+ let { id: t, selection: r, setSelection: a, promotion: o, promotedOneOf: n, title: i } = e, c = [s({ value: "promoted", label: ((u = o.promoted) == null ? void 0 : u.title) || n.title, secondary: ((l = o.promoted) == null ? void 0 : l.description) || n.description }, Vt(n)), s({ value: "other", label: o.other.title, secondary: o.other.description }, Vt(o.other))];
1905
1908
  return (0, dr.jsxs)("div", { className: "form-group", children: [i && (0, dr.jsx)("label", { className: "control-label", htmlFor: t, children: i }), (0, dr.jsx)(Ns.RadioGroup, { name: "promoted-selection", selectedValue: r, radios: c, id: t, onChange: a })] });
1906
1909
  }
1907
1910
  Bs.defaultProps = { title: void 0 };
@@ -1921,60 +1924,60 @@ var require_main_min = __commonJS({
1921
1924
  var Vs = js;
1922
1925
  var Ge = require("react/jsx-runtime");
1923
1926
  var Hs = (e) => e.promoted === true;
1924
- var Kd = (e) => {
1927
+ var Jd = (e) => {
1925
1928
  var c;
1926
- let [t, r] = (0, Us.useState)(Ds(e.schema, e.model) || ((c = e.schema.promotion) == null ? void 0 : c.default) || "promoted"), a = e.schema.alert, o = e.schema.oneOf.find(Hs), n = Jd(o), i = Xd(e.schema);
1929
+ let [t, r] = (0, Us.useState)(Ds(e.schema, e.model) || ((c = e.schema.promotion) == null ? void 0 : c.default) || "promoted"), a = e.schema.alert, o = e.schema.oneOf.find(Hs), n = Xd(o), i = Yd(e.schema);
1927
1930
  return (0, Ge.jsxs)(Ge.Fragment, { children: [a && (0, Ge.jsx)(ce, { component: a }), (0, Ge.jsx)(Vs, { id: e.schema.$id, title: e.schema.title, promotedOneOf: o, promotion: e.schema.promotion, selection: t, setSelection: r }), t === "promoted" && (0, Ge.jsx)(mr, C(s({}, e), { schema: n })), t === "other" && (0, Ge.jsx)(le, C(s({}, e), { schema: i }))] });
1928
1931
  };
1929
- function Jd(e) {
1932
+ function Xd(e) {
1930
1933
  return C(s({}, e), { title: void 0, description: void 0 });
1931
1934
  }
1932
- function Xd(e) {
1935
+ function Yd(e) {
1933
1936
  var a, o, n;
1934
1937
  let t = (a = e.promotion) != null && a.displayTwice ? [...e.oneOf] : e.oneOf.filter((i) => !Hs(i)), r = (n = (o = e.promotion) == null ? void 0 : o.other.heading) == null ? void 0 : n.text;
1935
1938
  return t.length === 1 ? C(s({}, t[0]), { title: r }) : t.length > 1 ? { title: r, oneOf: t, control: e.control } : null;
1936
1939
  }
1937
- var xo = Kd;
1940
+ var xo = Jd;
1938
1941
  var oa = require("@transferwise/components");
1939
1942
  var Gs = require("react-intl");
1940
1943
  var qs = require("react-intl");
1941
1944
  var vo = (0, qs.defineMessages)({ yes: { id: "dynamicFlows.ReadOnlySchema.yes", defaultMessage: "Yes", description: "Yes, used for boolean schemas with a value of true." }, no: { id: "dynamicFlows.ReadOnlySchema.no", defaultMessage: "No", description: "No: used for boolean schemas with a value of false." } });
1942
1945
  var qt = require("react/jsx-runtime");
1943
- function Yd({ schema: e, model: t }) {
1944
- let { title: r = "" } = e, { formatMessage: a } = (0, Gs.useIntl)(), o = Zd({ schema: e, model: t, formatMessage: a });
1946
+ function Zd({ schema: e, model: t }) {
1947
+ let { title: r = "" } = e, { formatMessage: a } = (0, Gs.useIntl)(), o = Qd({ schema: e, model: t, formatMessage: a });
1945
1948
  return (0, qt.jsx)(oa.DefinitionList, { layout: oa.Layout.VERTICAL_ONE_COLUMN, definitions: [{ title: r, value: o, key: "" }] });
1946
1949
  }
1947
- var Ao = Yd;
1948
- function Zd({ schema: e, model: t, formatMessage: r }) {
1949
- return Ve(e) ? we(e) ? Qd(e, t) : e.type === "boolean" && Ie(t) ? r(t ? vo.yes : vo.no) : t && t.toString() || "" : "";
1950
- }
1951
- function Qd(e, t) {
1952
- let r = eu(e, t);
1953
- return r ? tu(r) : t;
1950
+ var Ao = Zd;
1951
+ function Qd({ schema: e, model: t, formatMessage: r }) {
1952
+ return Ve(e) ? we(e) ? eu(e, t) : e.type === "boolean" && Ie(t) ? r(t ? vo.yes : vo.no) : t && t.toString() || "" : "";
1954
1953
  }
1955
1954
  function eu(e, t) {
1955
+ let r = tu(e, t);
1956
+ return r ? ru(r) : t;
1957
+ }
1958
+ function tu(e, t) {
1956
1959
  return e.oneOf.find((r) => "const" in r ? t === r.const : false);
1957
1960
  }
1958
- function tu(e) {
1961
+ function ru(e) {
1959
1962
  let t = e.title && e.description ? `${e.title} - ${e.description}` : e.title || "", r = Vt({ icon: e.icon });
1960
1963
  return r != null && r.avatar ? (0, qt.jsxs)(qt.Fragment, { children: [r.avatar, " ", t] }) : t;
1961
1964
  }
1962
1965
  var Be = require("react");
1963
1966
  var Ws = require("react/jsx-runtime");
1964
1967
  function $s(e) {
1965
- let { schema: t, model: r, required: a, submitted: o, errors: n, onChange: i } = e, [c, u] = (0, Be.useState)(r), m = (0, Be.useRef)(null), [p, h] = (0, Be.useState)(null), [y, d] = (0, Be.useState)(null), [l, f] = (0, Be.useState)(false), [g, S] = (0, Be.useState)(null), F = ae(), w = te(), v = Mt();
1968
+ let { schema: t, model: r, required: a, submitted: o, errors: n, onChange: i } = e, [c, u] = (0, Be.useState)(r), l = (0, Be.useRef)(null), [p, h] = (0, Be.useState)(null), [y, m] = (0, Be.useState)(null), [d, f] = (0, Be.useState)(false), [g, S] = (0, Be.useState)(null), F = ae(), w = te(), v = Mt();
1966
1969
  (0, Be.useEffect)(() => {
1967
1970
  t.validationAsync.method || v.warning("Invalid schema or model", 'ValidationAsyncSchema without a "method" property would have defaulted to "GET" in previous versions. Now defaults to "POST".', {});
1968
1971
  }, [v, t.validationAsync.method]);
1969
1972
  let P = async (O, B) => {
1970
1973
  let _ = x(), A = { [B.param]: O };
1971
- m.current = O, f(true), w("Dynamic Flow - ValidationAsync", { status: "pending" });
1974
+ l.current = O, f(true), w("Dynamic Flow - ValidationAsync", { status: "pending" });
1972
1975
  let z = await F(B.url, { method: B.method || "POST", headers: { "Content-Type": "application/json" }, body: B.method === "GET" ? void 0 : JSON.stringify(A), signal: _ });
1973
1976
  try {
1974
1977
  let E = await z.json();
1975
1978
  if (!R(E))
1976
1979
  throw new Error("Response body is not an object");
1977
- w("Dynamic Flow - ValidationAsync", { status: "success" }), z.status === 200 ? h(L(E.message) ? E.message : null) : z.status === 422 && d(L(E.message) ? E.message : null);
1980
+ w("Dynamic Flow - ValidationAsync", { status: "success" }), z.status === 200 ? h(L(E.message) ? E.message : null) : z.status === 422 && m(L(E.message) ? E.message : null);
1978
1981
  } catch (E) {
1979
1982
  w("Dynamic Flow - ValidationAsync", { status: "failure" });
1980
1983
  }
@@ -1983,20 +1986,20 @@ var require_main_min = __commonJS({
1983
1986
  let O = new AbortController();
1984
1987
  return S(O), O.signal;
1985
1988
  };
1986
- return (0, Ws.jsx)(Ct, s({}, { submitted: o || l, model: c, errors: y || n, infoMessage: p, onChange: (O) => {
1987
- i(C(s({}, O), { triggerSchema: t, triggerModel: O.model })), d(null), h(null), u(O.model);
1989
+ return (0, Ws.jsx)(Ct, s({}, { submitted: o || d, model: c, errors: y || n, infoMessage: p, onChange: (O) => {
1990
+ i(C(s({}, O), { triggerSchema: t, triggerModel: O.model })), m(null), h(null), u(O.model);
1988
1991
  }, onBlur: () => {
1989
- !D(c) && !Je(c, m.current) && $(c, t) && P(c, t.validationAsync);
1992
+ !D(c) && !Je(c, l.current) && $(c, t) && P(c, t.validationAsync);
1990
1993
  }, required: a, schema: t }));
1991
1994
  }
1992
1995
  $s.defaultProps = { required: false };
1993
1996
  var Oo = $s;
1994
1997
  var ge = require("react/jsx-runtime");
1995
1998
  var Ks = require("react");
1996
- function ru(e) {
1999
+ function au(e) {
1997
2000
  let { schema: t, model: r = null, errors: a = null, hideTitle: o = false, disabled: n = false } = e, i = C(s({}, e), { model: r, errors: a, hideTitle: o, disabled: n }), c = lt(t), u = Mt();
1998
2001
  switch ((0, _s.useEffect)(() => {
1999
- au(t, r, a) || u.error("Invalid schema or model", `Schema of type ${c || "undefined"} requested, but schema did not pass validation.`);
2002
+ ou(t, r, a) || u.error("Invalid schema or model", `Schema of type ${c || "undefined"} requested, but schema did not pass validation.`);
2000
2003
  }, [JSON.stringify(t), JSON.stringify(r), JSON.stringify(a), c, u]), c) {
2001
2004
  case "readOnly":
2002
2005
  return (0, ge.jsx)(Ao, s({}, i));
@@ -2005,8 +2008,8 @@ var require_main_min = __commonJS({
2005
2008
  case "validationAsync":
2006
2009
  return (0, ge.jsx)(Oo, s({}, i));
2007
2010
  case "basic": {
2008
- let m = s({ infoMessage: null }, i);
2009
- return (0, ge.jsx)(Ct, s({}, m));
2011
+ let l = s({ infoMessage: null }, i);
2012
+ return (0, ge.jsx)(Ct, s({}, l));
2010
2013
  }
2011
2014
  case "object":
2012
2015
  return (0, Ks.createElement)(mr, C(s({}, i), { key: JSON.stringify(t) }));
@@ -2021,8 +2024,8 @@ var require_main_min = __commonJS({
2021
2024
  }
2022
2025
  return (0, ge.jsx)(ge.Fragment, {});
2023
2026
  }
2024
- var le = ru;
2025
- var au = (e, t, r) => {
2027
+ var le = au;
2028
+ var ou = (e, t, r) => {
2026
2029
  switch (lt(e)) {
2027
2030
  case "persistAsync":
2028
2031
  return Rr(e) && Br(t) && rr(r);
@@ -2044,21 +2047,21 @@ var require_main_min = __commonJS({
2044
2047
  return false;
2045
2048
  };
2046
2049
  var Po = require("react/jsx-runtime");
2047
- function ou({ component: e, model: t = null, errors: r = null, submitted: a, onModelChange: o, onPersistAsync: n }) {
2050
+ function nu({ component: e, model: t = null, errors: r = null, submitted: a, onModelChange: o, onPersistAsync: n }) {
2048
2051
  let i = e.schema;
2049
2052
  return (0, Po.jsx)("div", { className: U(e.margin || "md"), children: (0, Po.jsx)(le, { schema: i, model: t, errors: r, submitted: a, onChange: (c) => {
2050
2053
  o(s({ formSchema: i }, c));
2051
2054
  }, onPersistAsync: n }) });
2052
2055
  }
2053
- var Mo = ou;
2056
+ var Mo = nu;
2054
2057
  var na = require("@transferwise/components");
2055
2058
  var Js = Ee(Xe());
2056
2059
  var Ae = require("react/jsx-runtime");
2057
- var nu = (e) => {
2060
+ var iu = (e) => {
2058
2061
  let { text: t, size: r = "md", align: a = "left", margin: o = "md", control: n } = e.component, i = (0, Js.default)(Se({ align: a, margin: o }));
2059
- return n === "display" ? (0, Ae.jsx)(su, { size: r, text: t, classes: i }) : (0, Ae.jsx)(iu, { size: r, text: t, classes: i });
2062
+ return n === "display" ? (0, Ae.jsx)(cu, { size: r, text: t, classes: i }) : (0, Ae.jsx)(su, { size: r, text: t, classes: i });
2060
2063
  };
2061
- var iu = ({ size: e, text: t, classes: r }) => {
2064
+ var su = ({ size: e, text: t, classes: r }) => {
2062
2065
  switch (e) {
2063
2066
  case "xs":
2064
2067
  return (0, Ae.jsx)("h5", { className: r, children: t });
@@ -2073,7 +2076,7 @@ var require_main_min = __commonJS({
2073
2076
  return (0, Ae.jsx)("h3", { className: r, children: t });
2074
2077
  }
2075
2078
  };
2076
- var su = ({ size: e, text: t, classes: r }) => {
2079
+ var cu = ({ size: e, text: t, classes: r }) => {
2077
2080
  switch (e) {
2078
2081
  case "xs":
2079
2082
  case "sm":
@@ -2086,7 +2089,7 @@ var require_main_min = __commonJS({
2086
2089
  return (0, Ae.jsx)(na.Display, { type: "display-medium", className: r, children: t });
2087
2090
  }
2088
2091
  };
2089
- var ko = nu;
2092
+ var ko = iu;
2090
2093
  var Eo = require("@transferwise/components");
2091
2094
  var ur = require("react/jsx-runtime");
2092
2095
  var Io = ({ component: e }) => {
@@ -2097,44 +2100,44 @@ var require_main_min = __commonJS({
2097
2100
  var Xs = require("@transferwise/components");
2098
2101
  var ia = require("react");
2099
2102
  var Lo = require("react/jsx-runtime");
2100
- function cu({ component: e }) {
2103
+ function mu({ component: e }) {
2101
2104
  let { url: t, size: r, text: a, margin: o, accessibilityDescription: n } = e, i = ae(), [c, u] = (0, ia.useState)("");
2102
2105
  (0, ia.useEffect)(() => {
2103
- lu(i, t).then(u);
2106
+ du(i, t).then(u);
2104
2107
  }, [t, i]);
2105
- let m = { alt: n || a || "", src: c, stretch: true, shrink: true };
2106
- return c ? (0, Lo.jsx)("div", { className: `df-image ${r || "md"}`, children: (0, Lo.jsx)(Xs.Image, s({ className: `img-responsive ${U(o || "md")}` }, m)) }) : null;
2108
+ let l = { alt: n || a || "", src: c, stretch: true, shrink: true };
2109
+ return c ? (0, Lo.jsx)("div", { className: `df-image ${r || "md"}`, children: (0, Lo.jsx)(Xs.Image, s({ className: `img-responsive ${U(o || "md")}` }, l)) }) : null;
2107
2110
  }
2108
- var mu = (e) => new Promise((t, r) => {
2111
+ var lu = (e) => new Promise((t, r) => {
2109
2112
  let a = new FileReader();
2110
2113
  a.addEventListener("loadend", () => t(a.result)), a.addEventListener("error", (o) => r(o)), a.readAsDataURL(e);
2111
2114
  });
2112
- var lu = async (e, t) => {
2115
+ var du = async (e, t) => {
2113
2116
  var r;
2114
2117
  try {
2115
2118
  return zr(t) || t != null && t.startsWith(`${(r = window == null ? void 0 : window.location) == null ? void 0 : r.origin}/`) ? e(t, { method: "GET", headers: { "Content-Type": "image/image" }, credentials: "same-origin" }).then((a) => {
2116
2119
  if (a.ok)
2117
2120
  return a.blob();
2118
2121
  throw new Error("Image fetching failed");
2119
- }).then(mu).catch(() => t) : t;
2122
+ }).then(lu).catch(() => t) : t;
2120
2123
  } catch (a) {
2121
2124
  return t;
2122
2125
  }
2123
2126
  };
2124
- var To = cu;
2127
+ var To = mu;
2125
2128
  var sa = require("@transferwise/components");
2126
2129
  var pr = require("react/jsx-runtime");
2127
- var du = ["positive", "neutral"];
2128
- var uu = ["warning", "negative"];
2129
- var pu = ({ component: e }) => {
2130
- let { items: t } = e, r = t.filter((o) => du.includes(o.context)).map(({ text: o }) => o), a = t.filter((o) => uu.includes(o.context)).map(({ text: o }) => o);
2130
+ var uu = ["positive", "neutral"];
2131
+ var pu = ["warning", "negative"];
2132
+ var yu = ({ component: e }) => {
2133
+ let { items: t } = e, r = t.filter((o) => uu.includes(o.context)).map(({ text: o }) => o), a = t.filter((o) => pu.includes(o.context)).map(({ text: o }) => o);
2131
2134
  return (0, pr.jsxs)("div", { className: U(e.margin || "md"), children: [e.title ? (0, pr.jsx)(sa.Header, { title: e.title }) : null, (0, pr.jsx)(sa.InstructionsList, { dos: r, donts: a })] });
2132
2135
  };
2133
- var Ro = pu;
2136
+ var Ro = yu;
2134
2137
  var H = require("react/jsx-runtime");
2135
2138
  var J = (e) => JSON.stringify(e);
2136
- function yu(e) {
2137
- let { components: t, model: r, submitted: a, errors: o, onModelChange: n, onAction: i, onPersistAsync: c, baseUrl: u } = e, m = (p) => {
2139
+ function fu(e) {
2140
+ let { components: t, model: r, submitted: a, errors: o, onModelChange: n, onAction: i, onPersistAsync: c, baseUrl: u } = e, l = (p) => {
2138
2141
  switch (p.type) {
2139
2142
  case "heading":
2140
2143
  return (0, H.jsx)(ko, { component: p }, J(p));
@@ -2179,27 +2182,27 @@ var require_main_min = __commonJS({
2179
2182
  return (0, H.jsx)("div", {}, J(p));
2180
2183
  }
2181
2184
  };
2182
- return ai() || u == null ? (0, H.jsx)(H.Fragment, { children: t.map(m) }) : (0, H.jsx)(Ur, { baseUrl: u, children: t.map(m) });
2185
+ return ai() || u == null ? (0, H.jsx)(H.Fragment, { children: t.map(l) }) : (0, H.jsx)(Ur, { baseUrl: u, children: t.map(l) });
2183
2186
  }
2184
- var se = yu;
2187
+ var se = fu;
2185
2188
  var ca = require("@transferwise/components");
2186
2189
  var Gt = require("react/jsx-runtime");
2187
- var fu = ({ component: e }) => (0, Gt.jsxs)("div", { className: U(e.margin || "md"), children: [e.title ? (0, Gt.jsx)(ca.Header, { title: e.title }) : null, e.items.map(hu)] });
2188
- var hu = ({ title: e, description: t, icon: r, status: a }) => {
2189
- let o = s(s({ key: `${e}/${t || ""}`, title: e, description: t }, r != null && r.name ? { icon: (0, Gt.jsx)(Ye, { type: r.name }) } : {}), a ? { status: Cu[a] } : {});
2190
+ var hu = ({ component: e }) => (0, Gt.jsxs)("div", { className: U(e.margin || "md"), children: [e.title ? (0, Gt.jsx)(ca.Header, { title: e.title }) : null, e.items.map(gu)] });
2191
+ var gu = ({ title: e, description: t, icon: r, status: a }) => {
2192
+ let o = s(s({ key: `${e}/${t || ""}`, title: e, description: t }, r != null && r.name ? { icon: (0, Gt.jsx)(Ye, { type: r.name }) } : {}), a ? { status: Su[a] } : {});
2190
2193
  return (0, Gt.jsx)(ca.Summary, s({}, o));
2191
2194
  };
2192
- var gu = { done: "done", pending: "pending", "not-done": "notDone" };
2193
- var wu = { positive: "done", warning: "pending", neutral: "notDone" };
2194
- var Cu = s(s({}, gu), wu);
2195
- var No = fu;
2195
+ var wu = { done: "done", pending: "pending", "not-done": "notDone" };
2196
+ var Cu = { positive: "done", warning: "pending", neutral: "notDone" };
2197
+ var Su = s(s({}, wu), Cu);
2198
+ var No = hu;
2196
2199
  var Ys = require("@transferwise/components");
2197
2200
  var Zs = require("react/jsx-runtime");
2198
- var Su = ({ component: e }) => {
2201
+ var Fu = ({ component: e }) => {
2199
2202
  let { margin: t = "md", size: r = "md" } = e;
2200
2203
  return (0, Zs.jsx)(Ys.Loader, { size: r, classNames: { "tw-loader": `tw-loader m-x-auto ${U(t)}` }, "data-testid": "loading-indicator" });
2201
2204
  };
2202
- var yr = Su;
2205
+ var yr = Fu;
2203
2206
  var ac = require("@transferwise/components");
2204
2207
  var oc = require("react-intl");
2205
2208
  var Qs = require("react-intl");
@@ -2208,39 +2211,39 @@ var require_main_min = __commonJS({
2208
2211
  var tc = require("react");
2209
2212
  function rc() {
2210
2213
  let e = (0, tc.useContext)(ec.SnackbarContext);
2211
- return e ? e.createSnackbar : Fu;
2214
+ return e ? e.createSnackbar : bu;
2212
2215
  }
2213
- function Fu() {
2216
+ function bu() {
2214
2217
  }
2215
2218
  var tt = require("react/jsx-runtime");
2216
- function bu({ component: e }) {
2217
- return e.control === "copyable" ? (0, tt.jsx)(vu, { component: e }) : (0, tt.jsx)(xu, { component: e });
2218
- }
2219
2219
  function xu({ component: e }) {
2220
- return (0, tt.jsxs)("p", { className: Se(e), children: [" ", e.text, " "] });
2220
+ return e.control === "copyable" ? (0, tt.jsx)(Au, { component: e }) : (0, tt.jsx)(vu, { component: e });
2221
2221
  }
2222
2222
  function vu({ component: e }) {
2223
+ return (0, tt.jsxs)("p", { className: Se(e), children: [" ", e.text, " "] });
2224
+ }
2225
+ function Au({ component: e }) {
2223
2226
  let { formatMessage: t } = (0, oc.useIntl)(), r = rc(), { text: a } = e, o = () => {
2224
2227
  var i;
2225
- (i = navigator.clipboard) == null || i.writeText(a).then(() => r({ text: t(Uo.copied) })).catch(Au);
2228
+ (i = navigator.clipboard) == null || i.writeText(a).then(() => r({ text: t(Uo.copied) })).catch(Ou);
2226
2229
  }, n = `${Se({ align: e.align, margin: "sm" })} form-control`;
2227
2230
  return (0, tt.jsxs)("div", { className: Se(e), children: [(0, tt.jsx)("input", { type: "text", className: n, value: a, readOnly: true, style: { textOverflow: "ellipsis" } }), (0, tt.jsx)(ac.Button, { block: true, onClick: o, children: t(Uo.copy) })] });
2228
2231
  }
2229
- function Au() {
2232
+ function Ou() {
2230
2233
  }
2231
- var Bo = bu;
2234
+ var Bo = xu;
2232
2235
  var ma = require("@transferwise/components");
2233
2236
  var ue = require("react/jsx-runtime");
2234
- var Ou = (e, t) => t.fields.map(({ label: r, value: a, help: o }, n) => ({ key: String(n), title: r, value: Pu(a, o, e) }));
2235
- var Pu = (e, t, r) => t ? r === "HORIZONTAL_RIGHT_ALIGNED" ? (0, ue.jsxs)(ue.Fragment, { children: [(0, ue.jsx)(qe, { help: t }), " ", e] }) : (0, ue.jsxs)(ue.Fragment, { children: [e, " ", (0, ue.jsx)(qe, { help: t })] }) : e;
2236
- var Mu = (e) => (e.control || e.orientation) === "horizontal" ? "HORIZONTAL_RIGHT_ALIGNED" : "VERTICAL_ONE_COLUMN";
2237
- function ku(e) {
2238
- let t = e.component, r = U(t.margin || "xs"), a = (c, u) => ({ text: c != null ? c : "", href: u.url, onClick: (m) => {
2239
- m.preventDefault(), u && e.onAction(u);
2240
- } }), o = Mu(t), n = t.callToAction ? a(t.callToAction.title, t.callToAction.action) : null, i = !n && t.action ? a(t.action.title || "", t.action) : null;
2241
- return (0, ue.jsxs)("div", { className: r, children: [t.title && (0, ue.jsx)(ma.Header, { title: t.title, action: n || i || void 0 }), (0, ue.jsx)("div", { className: r, children: (0, ue.jsx)(ma.DefinitionList, { layout: o, definitions: Ou(o, t) }) })] });
2242
- }
2243
- var zo = ku;
2237
+ var Pu = (e, t) => t.fields.map(({ label: r, value: a, help: o }, n) => ({ key: String(n), title: r, value: Mu(a, o, e) }));
2238
+ var Mu = (e, t, r) => t ? r === "HORIZONTAL_RIGHT_ALIGNED" ? (0, ue.jsxs)(ue.Fragment, { children: [(0, ue.jsx)(qe, { help: t }), " ", e] }) : (0, ue.jsxs)(ue.Fragment, { children: [e, " ", (0, ue.jsx)(qe, { help: t })] }) : e;
2239
+ var ku = (e) => (e.control || e.orientation) === "horizontal" ? "HORIZONTAL_RIGHT_ALIGNED" : "VERTICAL_ONE_COLUMN";
2240
+ function Eu(e) {
2241
+ let t = e.component, r = U(t.margin || "xs"), a = (c, u) => ({ text: c != null ? c : "", href: u.url, onClick: (l) => {
2242
+ l.preventDefault(), u && e.onAction(u);
2243
+ } }), o = ku(t), n = t.callToAction ? a(t.callToAction.title, t.callToAction.action) : null, i = !n && t.action ? a(t.action.title || "", t.action) : null;
2244
+ return (0, ue.jsxs)("div", { className: r, children: [t.title && (0, ue.jsx)(ma.Header, { title: t.title, action: n || i || void 0 }), (0, ue.jsx)("div", { className: r, children: (0, ue.jsx)(ma.DefinitionList, { layout: o, definitions: Pu(o, t) }) })] });
2245
+ }
2246
+ var zo = Eu;
2244
2247
  var ua = require("react");
2245
2248
  var nc = require("@transferwise/components");
2246
2249
  var la = require("react/jsx-runtime");
@@ -2250,81 +2253,83 @@ var require_main_min = __commonJS({
2250
2253
  var sc = require("react-intl");
2251
2254
  var $t = (0, sc.defineMessages)({ errorAlert: { id: "dynamicFlows.ErrorBoundary.errorAlert", defaultMessage: "Oops. Something went wrong...", description: "Generic error message for when something has gone wrong." }, retry: { id: "dynamicFlows.ErrorBoundary.retry", defaultMessage: "Retry", description: "Usually this follows the generic error and contains a link." } });
2252
2255
  var St = require("react/jsx-runtime");
2253
- var mc = ({ results: e, emptyMessage: t, onSelect: r }) => e.length === 0 ? (0, St.jsx)("p", { className: "m-t-2", children: t }) : (0, St.jsx)(da.NavigationOptionsList, { children: e.map((a) => (0, St.jsx)(da.NavigationOption, { title: a.title, content: a.description, media: ut(a), showMediaCircle: false, showMediaAtAllSizes: true, onClick: () => r(a) }, JSON.stringify(a))) });
2254
- var lc = ({ onRetrySearch: e }) => {
2256
+ function mc({ results: e, emptyMessage: t, onSelect: r }) {
2257
+ return e.length === 0 ? (0, St.jsx)("p", { className: "m-t-2", children: t }) : (0, St.jsx)(da.NavigationOptionsList, { children: e.map((a) => (0, St.jsx)(da.NavigationOption, { title: a.title, content: a.description, media: ut(a), showMediaCircle: false, showMediaAtAllSizes: true, onClick: () => r(a) }, JSON.stringify(a))) });
2258
+ }
2259
+ function lc({ onRetrySearch: e }) {
2255
2260
  let t = (0, cc.useIntl)();
2256
2261
  return (0, St.jsxs)("p", { className: "m-t-2", children: [t.formatMessage($t.errorAlert), "\xA0", (0, St.jsx)("a", { href: "/", onClick: (r) => {
2257
2262
  r.preventDefault(), e();
2258
2263
  }, children: t.formatMessage($t.retry) })] });
2259
- };
2264
+ }
2260
2265
  var Wt = require("react");
2261
2266
  var dc = { "Content-Type": "application/json" };
2262
2267
  var uc = (e) => {
2263
- let [t, r] = (0, Wt.useState)({ status: "idle" }), a = (0, Wt.useRef)(null), o = ae(), n = (0, Wt.useCallback)(async (m, { url: p, method: h, param: y } = e) => {
2264
- var l;
2265
- if ((l = a.current) == null || l.abort(), !m) {
2268
+ let [t, r] = (0, Wt.useState)({ status: "idle" }), a = (0, Wt.useRef)(null), o = ae(), n = (0, Wt.useCallback)(async (l, { url: p, method: h, param: y } = e) => {
2269
+ var d;
2270
+ if ((d = a.current) == null || d.abort(), !l) {
2266
2271
  r({ status: "idle" });
2267
2272
  return;
2268
2273
  }
2269
2274
  a.current = new AbortController();
2270
- let { signal: d } = a.current;
2275
+ let { signal: m } = a.current;
2271
2276
  r({ status: "loading" });
2272
2277
  try {
2273
- let g = await (h === "GET" ? o(Du(p, y, m), { method: h, signal: d, headers: dc }) : o(p, { method: h, signal: d, headers: dc, body: JSON.stringify({ [y]: m }) }));
2274
- i(g, m);
2278
+ let g = await (h === "GET" ? o(Lu(p, y, l), { method: h, signal: m, headers: dc }) : o(p, { method: h, signal: m, headers: dc, body: JSON.stringify({ [y]: l }) }));
2279
+ i(g, l);
2275
2280
  } catch (f) {
2276
- c(f, m);
2281
+ c(f, l);
2277
2282
  }
2278
- }, [o, JSON.stringify(e)]), i = async (m, p) => {
2279
- if (m.ok) {
2280
- let h = await m.json().catch(() => null);
2281
- if (Eu(h)) {
2283
+ }, [o, JSON.stringify(e)]), i = async (l, p) => {
2284
+ if (l.ok) {
2285
+ let h = await l.json().catch(() => null);
2286
+ if (Iu(h)) {
2282
2287
  r({ status: "success", results: h.results });
2283
2288
  return;
2284
2289
  }
2285
2290
  }
2286
2291
  r({ status: "error" });
2287
- }, c = (m, p) => {
2288
- Iu(m) || r({ status: "error" });
2292
+ }, c = (l, p) => {
2293
+ Du(l) || r({ status: "error" });
2289
2294
  }, u = t.status === "success" ? t.results : [];
2290
2295
  return { status: t.status, results: u, search: n };
2291
2296
  };
2292
- var Eu = (e) => R(e) && "results" in e && V(e.results) && e.results.every((t) => R(t) && "title" in t && "type" in t && "value" in t);
2293
- var Iu = (e) => e instanceof DOMException && e.name === "AbortError";
2294
- var Du = (e, t, r) => {
2297
+ var Iu = (e) => R(e) && "results" in e && V(e.results) && e.results.every((t) => R(t) && "title" in t && "type" in t && "value" in t);
2298
+ var Du = (e) => e instanceof DOMException && e.name === "AbortError";
2299
+ var Lu = (e, t, r) => {
2295
2300
  let [a, o] = e.split("?"), n = new URLSearchParams(o);
2296
2301
  return n.set(t, r), `${a}?${n.toString()}`;
2297
2302
  };
2298
2303
  var Ft = require("react/jsx-runtime");
2299
- var Lu = 400;
2300
- function Tu({ component: e, onAction: t }) {
2301
- let [r, a] = (0, ua.useState)(""), { title: o, margin: n, url: i, method: c, param: u, emptyMessage: m } = e, { status: p, results: h, search: y } = uc({ url: i, method: c, param: u }), d = te(), l = (0, ua.useMemo)(() => Ke(y, Lu), [y]), f = () => {
2302
- d("Dynamic Flow - Search Started", {});
2304
+ var Tu = 400;
2305
+ function Ru({ component: e, onAction: t }) {
2306
+ let [r, a] = (0, ua.useState)(""), { title: o, margin: n, url: i, method: c, param: u, emptyMessage: l } = e, { status: p, results: h, search: y } = uc({ url: i, method: c, param: u }), m = te(), d = (0, ua.useMemo)(() => Ke(y, Tu), [y]), f = () => {
2307
+ m("Dynamic Flow - Search Started", {});
2303
2308
  }, g = (w) => {
2304
- a(w), l(w);
2309
+ a(w), d(w);
2305
2310
  }, S = ({ type: w, value: v }) => {
2306
- if (w === "action" && (d("Dynamic Flow - Search Result Selected", { type: "action", actionId: v.id || v.$id }), t(v)), w === "search") {
2311
+ if (w === "action" && (m("Dynamic Flow - Search Result Selected", { type: "action", actionId: v.id || v.$id }), t(v)), w === "search") {
2307
2312
  a(v.query);
2308
2313
  let { url: P, method: x, param: k, query: I } = v;
2309
- d("Dynamic Flow - Search Result Selected", { type: "search" }), y(I, { url: P, method: x, param: k });
2314
+ m("Dynamic Flow - Search Result Selected", { type: "search" }), y(I, { url: P, method: x, param: k });
2310
2315
  }
2311
2316
  }, F = () => {
2312
2317
  a(r), y(r);
2313
2318
  };
2314
- return (0, Ft.jsxs)("div", { className: U(n || "md"), children: [(0, Ft.jsx)(ic, { title: o, value: r, onChange: g, onFocus: f }), p === "loading" && (0, Ft.jsx)(yr, { component: { type: "loading-indicator", size: "sm" } }), p === "error" && (0, Ft.jsx)(lc, { onRetrySearch: F }), p === "success" && (0, Ft.jsx)(mc, { results: h, emptyMessage: m, onSelect: S })] });
2319
+ return (0, Ft.jsxs)("div", { className: U(n || "md"), children: [(0, Ft.jsx)(ic, { title: o, value: r, onChange: g, onFocus: f }), p === "loading" && (0, Ft.jsx)(yr, { component: { type: "loading-indicator", size: "sm" } }), p === "error" && (0, Ft.jsx)(lc, { onRetrySearch: F }), p === "success" && (0, Ft.jsx)(mc, { results: h, emptyMessage: l, onSelect: S })] });
2315
2320
  }
2316
- var jo = Tu;
2321
+ var jo = Ru;
2317
2322
  var pa = require("@transferwise/components");
2318
2323
  var pc = require("react");
2319
2324
  var _t = require("react/jsx-runtime");
2320
- var Ru = (e) => {
2325
+ var Nu = (e) => {
2321
2326
  let [t, r] = (0, pc.useState)(false), { component: a, onAction: o } = e, { margin: n = "md" } = a;
2322
2327
  return (0, _t.jsxs)("div", { className: Se({ margin: n }), children: [(0, _t.jsx)(pa.Button, { priority: "tertiary", block: true, onClick: () => r(true), children: a.trigger.title }), (0, _t.jsx)(pa.Modal, { scroll: "content", onClose: () => r(false), open: t, size: "lg", body: (0, _t.jsx)(se, C(s({}, e), { components: a.content.components, onAction: o })) })] });
2323
2328
  };
2324
- var Vo = Ru;
2329
+ var Vo = Nu;
2325
2330
  var ye = require("react/jsx-runtime");
2326
2331
  var Ho = (e) => D(e) || Y(e);
2327
- var Nu = (e) => e.type === "boolean" && Ho(e.default) ? false : e.default;
2332
+ var Bu = (e) => e.type === "boolean" && Ho(e.default) ? false : e.default;
2328
2333
  var fc = (e) => {
2329
2334
  var _, A, z;
2330
2335
  let t = (E, ne, G) => {
@@ -2334,11 +2339,11 @@ var require_main_min = __commonJS({
2334
2339
  let re = r(E);
2335
2340
  F(re);
2336
2341
  let ie = E;
2337
- p(ie), ie !== m && e.onChange({ model: ie, triggerSchema: e.schema, triggerModel: ie, lastTriggerModel: m, type: ne, metadata: G });
2338
- }, o = (E) => We(E, e.schema), n = () => l(true), i = () => {
2339
- l(false), g(true), e.onBlur && e.onBlur();
2340
- }, [c, u] = (0, pe.useState)((_ = e.model) != null ? _ : null), [m, p] = (0, pe.useState)((A = e.model) != null ? A : null), [h, y] = (0, pe.useState)(false), [d, l] = (0, pe.useState)(false), [f, g] = (0, pe.useState)(false), [S, F] = (0, pe.useState)([]), w = (0, pe.useMemo)(() => e.schema.$id || Te(), [e.schema.$id]), v = () => {
2341
- let E = Nu(e.schema);
2342
+ p(ie), ie !== l && e.onChange({ model: ie, triggerSchema: e.schema, triggerModel: ie, lastTriggerModel: l, type: ne, metadata: G });
2343
+ }, o = (E) => We(E, e.schema), n = () => d(true), i = () => {
2344
+ d(false), g(true), e.onBlur && e.onBlur();
2345
+ }, [c, u] = (0, pe.useState)((_ = e.model) != null ? _ : null), [l, p] = (0, pe.useState)((A = e.model) != null ? A : null), [h, y] = (0, pe.useState)(false), [m, d] = (0, pe.useState)(false), [f, g] = (0, pe.useState)(false), [S, F] = (0, pe.useState)([]), w = (0, pe.useMemo)(() => e.schema.$id || Te(), [e.schema.$id]), v = () => {
2346
+ let E = Bu(e.schema);
2342
2347
  Ho(c) && !Ho(E) && a(E, "init"), e.schema.const && a(e.schema.const, "init");
2343
2348
  }, P = () => {
2344
2349
  F(r(c));
@@ -2349,7 +2354,7 @@ var require_main_min = __commonJS({
2349
2354
  E !== c && u(E);
2350
2355
  }, [e.model]);
2351
2356
  let I = { "form-group": true, "has-error": (e.submitted || !h) && !!e.errors || (e.submitted || h && f) && !!S.length, "has-info": !!e.schema.description || !!e.infoMessage }, M = e.schema.format !== "file" && e.schema.type !== "boolean", O = e.schema.help, B = `${w}-feedback`;
2352
- return k ? null : (0, ye.jsxs)(ye.Fragment, { children: [e.schema.alert && (0, ye.jsx)(ce, { component: e.schema.alert }), (0, ye.jsxs)("div", { className: (0, yc.default)(I), children: [M && (0, ye.jsxs)("div", { className: "d-inline-block m-b-1", children: [(0, ye.jsx)("label", { className: "control-label d-inline", htmlFor: w, children: e.schema.title }), !!O && (0, ye.jsx)(qe, { help: O })] }), !M && !!O && (0, ye.jsx)(qe, { help: O }), (0, ye.jsx)(lr, { id: w, schema: e.schema, value: c, disabled: !!e.disabled, onChange: t, onFocus: n, onBlur: i, describedBy: B }), (0, ye.jsx)(He, { id: B, changed: h, focused: d, blurred: f, submitted: e.submitted, errors: (z = e.errors) != null ? z : null, schema: e.schema, validations: S, infoMessage: e.infoMessage })] })] });
2357
+ return k ? null : (0, ye.jsxs)(ye.Fragment, { children: [e.schema.alert && (0, ye.jsx)(ce, { component: e.schema.alert }), (0, ye.jsxs)("div", { className: (0, yc.default)(I), children: [M && (0, ye.jsxs)("div", { className: "d-inline-block m-b-1", children: [(0, ye.jsx)("label", { className: "control-label d-inline", htmlFor: w, children: e.schema.title }), !!O && (0, ye.jsx)(qe, { help: O })] }), !M && !!O && (0, ye.jsx)(qe, { help: O }), (0, ye.jsx)(lr, { id: w, schema: e.schema, value: c, disabled: !!e.disabled, onChange: t, onFocus: n, onBlur: i, describedBy: B }), (0, ye.jsx)(He, { id: B, changed: h, focused: m, blurred: f, submitted: e.submitted, errors: (z = e.errors) != null ? z : null, schema: e.schema, validations: S, infoMessage: e.infoMessage })] })] });
2353
2358
  };
2354
2359
  fc.defaultProps = { required: false, disabled: false, onBlur: null };
2355
2360
  var Ct = fc;
@@ -2359,17 +2364,17 @@ var require_main_min = __commonJS({
2359
2364
  var r;
2360
2365
  return (r = t.validation) == null ? void 0 : r[e];
2361
2366
  };
2362
- var Bu = /* @__PURE__ */ new Set([N.RADIO, N.SELECT, N.DATELOOKUP, N.FILE, N.UPLOAD]);
2367
+ var zu = /* @__PURE__ */ new Set([N.RADIO, N.SELECT, N.DATELOOKUP, N.FILE, N.UPLOAD]);
2363
2368
  function wc(e) {
2364
- let { schema: t, required: r, submitted: a, errors: o, onChange: n, onPersistAsync: i } = e, c = (0, hc.useIntl)(), u = ae(), m = te(), [p, h] = (0, bt.useState)(null), y = Sc(p), [d, l] = (0, bt.useState)(null), [f, g] = (0, bt.useState)(false), [S, F] = (0, bt.useState)(null);
2369
+ let { schema: t, required: r, submitted: a, errors: o, onChange: n, onPersistAsync: i } = e, c = (0, hc.useIntl)(), u = ae(), l = te(), [p, h] = (0, bt.useState)(null), y = Sc(p), [m, d] = (0, bt.useState)(null), [f, g] = (0, bt.useState)(false), [S, F] = (0, bt.useState)(null);
2365
2370
  (0, bt.useEffect)(() => {
2366
- Bu.has(fo(t.persistAsync.schema)) && x();
2371
+ zu.has(fo(t.persistAsync.schema)) && x();
2367
2372
  }, [p]);
2368
- let w = () => l(c.formatMessage(nr.genericError)), v = async (M, O) => {
2373
+ let w = () => d(c.formatMessage(nr.genericError)), v = async (M, O) => {
2369
2374
  let B = P(), _ = { [O.param]: M };
2370
2375
  g(true);
2371
2376
  try {
2372
- m("Dynamic Flow - PersistAsync", { status: "pending", schemaId: t.$id });
2377
+ l("Dynamic Flow - PersistAsync", { status: "pending", schemaId: t.$id });
2373
2378
  let A = u(O.url, { method: O.method, headers: { "Content-Type": "application/json" }, body: JSON.stringify(_), signal: B });
2374
2379
  i(A);
2375
2380
  let z = await A, E = await z.json();
@@ -2381,12 +2386,12 @@ var require_main_min = __commonJS({
2381
2386
  n({ model: re, triggerSchema: t, triggerModel: re });
2382
2387
  } else if (Ir(z.status)) {
2383
2388
  let { validation: re } = E, ie = R(re) && (re == null ? void 0 : re[G]) || null;
2384
- l(ie), n({ model: null, triggerSchema: t, triggerModel: null });
2389
+ d(ie), n({ model: null, triggerSchema: t, triggerModel: null });
2385
2390
  } else
2386
2391
  w();
2387
- m("Dynamic Flow - PersistAsync", { status: "success", schemaId: t.$id });
2392
+ l("Dynamic Flow - PersistAsync", { status: "success", schemaId: t.$id });
2388
2393
  } catch (A) {
2389
- m("Dynamic Flow - PersistAsync", { status: "failure", schemaId: t.$id }), w();
2394
+ l("Dynamic Flow - PersistAsync", { status: "failure", schemaId: t.$id }), w();
2390
2395
  }
2391
2396
  }, P = () => {
2392
2397
  S && S.abort();
@@ -2397,17 +2402,17 @@ var require_main_min = __commonJS({
2397
2402
  }, k = () => {
2398
2403
  x();
2399
2404
  }, I = ({ model: M }) => {
2400
- l(null), $(M, t.persistAsync.schema) && h(M);
2405
+ d(null), $(M, t.persistAsync.schema) && h(M);
2401
2406
  };
2402
- return (0, Cc.jsx)(Ct, { required: r, submitted: a || f, schema: t.persistAsync.schema, errors: d || o, model: null, infoMessage: null, onChange: I, onBlur: k });
2407
+ return (0, Cc.jsx)(Ct, { required: r, submitted: a || f, schema: t.persistAsync.schema, errors: m || o, model: null, infoMessage: null, onChange: I, onBlur: k });
2403
2408
  }
2404
2409
  wc.defaultProps = { required: false };
2405
2410
  var go = wc;
2406
2411
  var Wi = (e) => {
2407
2412
  let [t, r] = (0, Fc.useState)(null), a = ae(), o = (0, bc.useIntl)(), { schema: n } = e;
2408
2413
  async function i(y) {
2409
- let d = y instanceof Blob ? !Dt(n) : !$(y, n);
2410
- return (D(y) || d) && h(), await m(y);
2414
+ let m = y instanceof Blob ? !Dt(n) : !$(y, n);
2415
+ return (D(y) || m) && h(), await l(y);
2411
2416
  }
2412
2417
  let c = () => {
2413
2418
  t && t.abort();
@@ -2415,64 +2420,64 @@ var require_main_min = __commonJS({
2415
2420
  return r(y), y.signal;
2416
2421
  };
2417
2422
  function u(y) {
2418
- let d = Dt(n), l = c(), f = e.param, g = d ? zu(f, y) : JSON.stringify({ [f]: y });
2419
- return { method: e.method, headers: s({}, !d && { "Content-Type": "application/json" }), body: g, signal: l };
2423
+ let m = Dt(n), d = c(), f = e.param, g = m ? ju(f, y) : JSON.stringify({ [f]: y });
2424
+ return { method: e.method, headers: s({}, !m && { "Content-Type": "application/json" }), body: g, signal: d };
2420
2425
  }
2421
- async function m(y) {
2426
+ async function l(y) {
2422
2427
  try {
2423
- let d = await a(e.url, u(y));
2424
- if (!d.ok)
2425
- return p(d);
2426
- let l = await d.json();
2427
- if (R(l)) {
2428
- let f = l[e.idProperty];
2428
+ let m = await a(e.url, u(y));
2429
+ if (!m.ok)
2430
+ return p(m);
2431
+ let d = await m.json();
2432
+ if (R(d)) {
2433
+ let f = d[e.idProperty];
2429
2434
  if (L(f) || j(f))
2430
2435
  return { data: f };
2431
2436
  }
2432
2437
  return h();
2433
- } catch (d) {
2434
- return h(d);
2438
+ } catch (m) {
2439
+ return h(m);
2435
2440
  }
2436
2441
  }
2437
2442
  async function p(y) {
2438
2443
  if (y.status === 422) {
2439
- let d = await y.json();
2440
- if (R(d)) {
2441
- let l = gc(e.param, d);
2442
- if (L(l))
2443
- throw new Error(l);
2444
+ let m = await y.json();
2445
+ if (R(m)) {
2446
+ let d = gc(e.param, m);
2447
+ if (L(d))
2448
+ throw new Error(d);
2444
2449
  }
2445
2450
  }
2446
2451
  throw new Error(o.formatMessage(nr.genericError));
2447
2452
  }
2448
2453
  let h = (y) => {
2449
- let d = ju(y) ? y.message : o.formatMessage(nr.genericError);
2450
- throw new Error(d);
2454
+ let m = Vu(y) ? y.message : o.formatMessage(nr.genericError);
2455
+ throw new Error(m);
2451
2456
  };
2452
2457
  return i;
2453
2458
  };
2454
- function zu(e, t) {
2459
+ function ju(e, t) {
2455
2460
  let r = new FormData();
2456
2461
  return t !== null && r.append(e, t), r;
2457
2462
  }
2458
- function ju(e) {
2463
+ function Vu(e) {
2459
2464
  return R(e) && "message" in e && typeof e.message == "string";
2460
2465
  }
2461
2466
  var rt = require("react");
2462
2467
  function Hr({ asyncFn: e, interval: t, maxAttempts: r, maxConsecutiveFails: a, onPollingResponse: o, onFailure: n }) {
2463
- let i = (0, rt.useRef)(o), c = (0, rt.useRef)(n), u = (0, rt.useMemo)(() => Vu(e, r, a, (m) => i.current(m), () => c.current()), [e, r, a]);
2468
+ let i = (0, rt.useRef)(o), c = (0, rt.useRef)(n), u = (0, rt.useMemo)(() => Uu(e, r, a, (l) => i.current(l), () => c.current()), [e, r, a]);
2464
2469
  (0, rt.useEffect)(() => {
2465
2470
  if (t > 0) {
2466
- let m = setInterval(() => {
2471
+ let l = setInterval(() => {
2467
2472
  u();
2468
2473
  }, t);
2469
- return () => clearInterval(m);
2474
+ return () => clearInterval(l);
2470
2475
  }
2471
2476
  }, [u, t]), (0, rt.useEffect)(() => {
2472
2477
  i.current = o, c.current = n;
2473
2478
  }, [o, n]);
2474
2479
  }
2475
- function Vu(e, t, r, a, o) {
2480
+ function Uu(e, t, r, a, o) {
2476
2481
  let n = true, i = 0, c = 0;
2477
2482
  return e ? () => {
2478
2483
  n && (c++, e().then((u) => {
@@ -2509,20 +2514,20 @@ var require_main_min = __commonJS({
2509
2514
  }, [t, e]) });
2510
2515
  }
2511
2516
  var vc = require("react/jsx-runtime");
2512
- var Uu = (e, t) => {
2517
+ var Hu = (e, t) => {
2513
2518
  var a;
2514
2519
  if (kt(e))
2515
2520
  return [];
2516
2521
  let r = Qt(e, t);
2517
2522
  return ze({ layout: r, schemas: e.schemas || [], actions: e.actions || [], model: (a = e.model) != null ? a : null });
2518
2523
  };
2519
- var Hu = (e) => {
2520
- let { stepSpecification: t, stepLayoutOptions: r, submitted: a, model: o, formErrors: n, onModelChange: i } = e, c = Uu(t, r), { loading: u, registerPersistAsyncPromise: m } = At(), p = te(), h = u ? () => {
2524
+ var qu = (e) => {
2525
+ let { stepSpecification: t, stepLayoutOptions: r, submitted: a, model: o, formErrors: n, onModelChange: i } = e, c = Hu(t, r), { loading: u, registerPersistAsyncPromise: l } = At(), p = te(), h = u ? () => {
2521
2526
  p("Dynamic Flow - onAction supressed", { reason: "LayoutStep - loading state" });
2522
2527
  } : e.onAction;
2523
- return xc(t.polling, h), (0, vc.jsx)(se, { components: c, submitted: a, model: o, errors: n, onAction: h, onModelChange: i, onPersistAsync: m });
2528
+ return xc(t.polling, h), (0, vc.jsx)(se, { components: c, submitted: a, model: o, errors: n, onAction: h, onModelChange: i, onPersistAsync: l });
2524
2529
  };
2525
- var fa = Hu;
2530
+ var fa = qu;
2526
2531
  var Sa = require("react");
2527
2532
  var oe = require("react");
2528
2533
  var Wc = require("react-intl");
@@ -2532,27 +2537,27 @@ var require_main_min = __commonJS({
2532
2537
  var Pe = require("@transferwise/components");
2533
2538
  var Pc = require("react-intl");
2534
2539
  var Oe = require("react/jsx-runtime");
2535
- var Go = ({ onCapture: e }) => (0, Oe.jsx)("div", { className: "bottom-bar", children: (0, Oe.jsx)(qu, { onClick: e }) });
2540
+ var Go = ({ onCapture: e }) => (0, Oe.jsx)("div", { className: "bottom-bar", children: (0, Oe.jsx)(Gu, { onClick: e }) });
2536
2541
  var $o = ({ onSubmit: e, onRetry: t }) => {
2537
2542
  let r = (0, Pc.useIntl)();
2538
2543
  return (0, Oe.jsx)("div", { className: "bottom-bar p-x-2", children: (0, Oe.jsx)("div", { className: "row", children: (0, Oe.jsxs)("div", { className: "col-xs-12 col-md-6 col-md-offset-3", children: [(0, Oe.jsx)(Pe.Button, { className: "m-b-1", block: true, size: Pe.Size.MEDIUM, type: Pe.ControlType.ACCENT, onClick: e, children: r.formatMessage(fe.reviewSubmit) }), (0, Oe.jsx)(Pe.Button, { className: "m-b-2", block: true, size: Pe.Size.MEDIUM, type: Pe.ControlType.ACCENT, priority: Pe.Priority.SECONDARY, onClick: t, children: r.formatMessage(fe.reviewRetry) })] }) }) });
2539
2544
  };
2540
- var qu = ({ onClick: e }) => (0, Oe.jsx)("button", { type: "button", className: "camera-capture-btn m-b-2", "data-testid": "camera-capture-button", onClick: e, children: (0, Oe.jsx)("span", { className: "camera-capture-btn-inner" }) });
2545
+ var Gu = ({ onClick: e }) => (0, Oe.jsx)("button", { type: "button", className: "camera-capture-btn m-b-2", "data-testid": "camera-capture-button", onClick: e, children: (0, Oe.jsx)("span", { className: "camera-capture-btn-inner" }) });
2541
2546
  var Ec = require("react-intl");
2542
2547
  var Mc = require("react-intl");
2543
2548
  var kc = (0, Mc.defineMessages)({ text: { id: "dynamicFlows.CameraCapture.rotatePhone.text", defaultMessage: "Rotate your phone to portrait view to take a photo", description: "Prompt the user to rotate their phone from landscape to portrait mode when attempting to take a photo" } });
2544
2549
  var gr = require("react/jsx-runtime");
2545
- function Gu() {
2550
+ function $u() {
2546
2551
  let e = (0, Ec.useIntl)();
2547
2552
  return (0, gr.jsxs)("div", { className: "orientation-lock-overlay", children: [(0, gr.jsx)("img", { className: "m-b-3", src: "https://wise.com/public-resources/assets/camera-guidelines/icon-rotate-phone.svg", width: "96", height: "96", alt: "" }), (0, gr.jsx)("p", { className: "text-center m-b-0", children: e.formatMessage(kc.text) })] });
2548
2553
  }
2549
- var Wo = Gu;
2554
+ var Wo = $u;
2550
2555
  var Ic = require("@transferwise/components");
2551
2556
  var at = require("react/jsx-runtime");
2552
- function $u({ title: e, description: t, actionButton: r, onAction: a }) {
2557
+ function Wu({ title: e, description: t, actionButton: r, onAction: a }) {
2553
2558
  return (0, at.jsx)("div", { className: "container p-t-5", children: (0, at.jsx)("div", { className: "row", children: (0, at.jsxs)("div", { className: "col-md-6 col-md-offset-3", children: [(0, at.jsx)("h2", { className: "text-xs-center m-b-3", children: e }), (0, at.jsx)("p", { className: "text-xs-center m-b-5", children: t }), a && r && (0, at.jsx)(Ic.Button, { block: true, onClick: a, children: r })] }) }) });
2554
2559
  }
2555
- var _o = $u;
2560
+ var _o = Wu;
2556
2561
  var ot = require("react");
2557
2562
  var Kt = Ee(Dc());
2558
2563
  var Lc = (e) => {
@@ -2593,10 +2598,10 @@ var require_main_min = __commonJS({
2593
2598
  var t, r;
2594
2599
  return (r = (t = ha(e)) == null ? void 0 : t.getCapabilities) == null ? void 0 : r.call(t);
2595
2600
  };
2596
- var ga = (e, t, r) => t == null ? void 0 : t(e, { Error: Wu(r) });
2597
- var Wu = (e) => e instanceof DOMException ? JSON.stringify({ name: e == null ? void 0 : e.name, message: e == null ? void 0 : e.message }) : e;
2598
- var jc = async (e, t, r) => e == null ? void 0 : e("Dynamic Flow - Camera Feed Started", await _u(t, r));
2599
- var _u = async (e, t) => {
2601
+ var ga = (e, t, r) => t == null ? void 0 : t(e, { Error: _u(r) });
2602
+ var _u = (e) => e instanceof DOMException ? JSON.stringify({ name: e == null ? void 0 : e.name, message: e == null ? void 0 : e.message }) : e;
2603
+ var jc = async (e, t, r) => e == null ? void 0 : e("Dynamic Flow - Camera Feed Started", await Ku(t, r));
2604
+ var Ku = async (e, t) => {
2600
2605
  var n;
2601
2606
  let r = ha(t), a = Ko(t), o = (n = r == null ? void 0 : r.getSettings) == null ? void 0 : n.call(r);
2602
2607
  return C(s({}, r && { "Available Video Devices (by label)": await Bc(), "Active Video Device (by label)": await zc(t), "Camera Capabilities": a, "Camera Settings": o }), { "Camera Direction (Asked)": e == null ? void 0 : e.direction });
@@ -2611,8 +2616,8 @@ var require_main_min = __commonJS({
2611
2616
  let r = (0, ot.useCallback)(() => {
2612
2617
  window.screen.orientation && "lock" in window.screen.orientation && typeof window.screen.orientation.lock == "function" && window.screen.orientation.lock("portrait").then(() => Uc(t)).catch(Jo);
2613
2618
  }, [t]), a = (0, ot.useCallback)(() => {
2614
- var c, u, m;
2615
- return (m = (u = (c = window == null ? void 0 : window.screen) == null ? void 0 : c.orientation) == null ? void 0 : u.unlock) == null ? void 0 : m.call(u);
2619
+ var c, u, l;
2620
+ return (l = (u = (c = window == null ? void 0 : window.screen) == null ? void 0 : c.orientation) == null ? void 0 : u.unlock) == null ? void 0 : l.call(u);
2616
2621
  }, []), o = (0, ot.useCallback)(() => {
2617
2622
  setTimeout(() => {
2618
2623
  e && !Kt.default.isFullscreen && Kt.default.isEnabled && Kt.default.request(document.documentElement, { navigationUI: "show" }).then(() => {
@@ -2622,14 +2627,14 @@ var require_main_min = __commonJS({
2622
2627
  }, [e, r]), n = (0, ot.useCallback)(() => {
2623
2628
  Kt.default.isFullscreen && Kt.default.exit().catch(Jo), a();
2624
2629
  }, [a]), i = (0, ot.useCallback)((c) => {
2625
- var u, m;
2626
- (u = c == null ? void 0 : c.target) != null && u.type.includes("landscape") && (m = window.screen) != null && m.orientation && Vc(t);
2630
+ var u, l;
2631
+ (u = c == null ? void 0 : c.target) != null && u.type.includes("landscape") && (l = window.screen) != null && l.orientation && Vc(t);
2627
2632
  }, [t]);
2628
2633
  return (0, ot.useEffect)(() => {
2629
2634
  var c, u;
2630
- return e && ((u = (c = window.screen) == null ? void 0 : c.orientation) == null || u.addEventListener("change", (m) => i(m))), () => {
2631
- var m, p;
2632
- (p = (m = window.screen) == null ? void 0 : m.orientation) == null || p.removeEventListener("change", i), n();
2635
+ return e && ((u = (c = window.screen) == null ? void 0 : c.orientation) == null || u.addEventListener("change", (l) => i(l))), () => {
2636
+ var l, p;
2637
+ (p = (l = window.screen) == null ? void 0 : l.orientation) == null || p.removeEventListener("change", i), n();
2633
2638
  };
2634
2639
  }, [n, i, e]), { enterFullScreen: o, exitFullScreen: n };
2635
2640
  };
@@ -2653,38 +2658,38 @@ var require_main_min = __commonJS({
2653
2658
  };
2654
2659
  var Ca = require("react");
2655
2660
  var X = require("react/jsx-runtime");
2656
- var Ku = 92;
2661
+ var Ju = 92;
2657
2662
  var Gc = 120;
2658
- var Ju = 40;
2659
- var Xu = 32;
2660
- var Yu = 48;
2661
- var Zu = 40;
2663
+ var Xu = 40;
2664
+ var Yu = 32;
2665
+ var Zu = 48;
2666
+ var Qu = 40;
2662
2667
  var $c = 800;
2663
- function Qu({ overlay: e, outline: t, imageUrl: r, title: a, instructions: o, reviewInstructions: n }) {
2668
+ function ep({ overlay: e, outline: t, imageUrl: r, title: a, instructions: o, reviewInstructions: n }) {
2664
2669
  let i = (0, Ca.useRef)(null);
2665
2670
  (0, Ca.useEffect)(() => {
2666
2671
  let y = Ke(() => {
2667
- var d;
2668
- if ((d = i.current) != null && d.innerHTML) {
2669
- let l = i.current;
2670
- l.innerHTML = String(l.innerHTML);
2672
+ var m;
2673
+ if ((m = i.current) != null && m.innerHTML) {
2674
+ let d = i.current;
2675
+ d.innerHTML = String(d.innerHTML);
2671
2676
  }
2672
2677
  }, 100);
2673
2678
  return window.addEventListener("resize", y), () => window.removeEventListener("resize", y);
2674
2679
  });
2675
- let c = (r ? Ju : 0) + (a ? Xu : 0) + (o ? Yu : 0), u = (0, X.jsxs)(X.Fragment, { children: [r && (0, X.jsx)("img", { className: "camera-capture-img", src: r, alt: "" }), a && (0, X.jsx)("h4", { className: "camera-capture-title", children: a }), o && (0, X.jsx)("small", { className: "camera-capture-instructions", children: o })] }), m = Ku + c;
2680
+ let c = (r ? Xu : 0) + (a ? Yu : 0) + (o ? Zu : 0), u = (0, X.jsxs)(X.Fragment, { children: [r && (0, X.jsx)("img", { className: "camera-capture-img", src: r, alt: "" }), a && (0, X.jsx)("h4", { className: "camera-capture-title", children: a }), o && (0, X.jsx)("small", { className: "camera-capture-instructions", children: o })] }), l = Ju + c;
2676
2681
  if (n) {
2677
- c = m - Gc, u = (0, X.jsx)("small", { className: "camera-capture-instructions", children: n });
2678
- let y = Gc + Zu;
2679
- m < y && (u = (0, X.jsx)(X.Fragment, {}));
2682
+ c = l - Gc, u = (0, X.jsx)("small", { className: "camera-capture-instructions", children: n });
2683
+ let y = Gc + Qu;
2684
+ l < y && (u = (0, X.jsx)(X.Fragment, {}));
2680
2685
  }
2681
- let p = { x: "50%", y: "5%", width: `min(90%, ${$c}px)`, height: `calc(90% - ${m}px)`, style: { transform: `translateX(max(-45%, -${$c / 2}px))` } }, h = { style: { left: "5%", top: `calc(100% - ${m}px - 5%)`, height: `calc(${c}px + 5%)`, width: "90%" } };
2686
+ let p = { x: "50%", y: "5%", width: `min(90%, ${$c}px)`, height: `calc(90% - ${l}px)`, style: { transform: `translateX(max(-45%, -${$c / 2}px))` } }, h = { style: { left: "5%", top: `calc(100% - ${l}px - 5%)`, height: `calc(${c}px + 5%)`, width: "90%" } };
2682
2687
  return (0, X.jsxs)("svg", { ref: i, xmlns: "http://www.w3.org/2000/svg", children: [(0, X.jsx)("defs", { children: (0, X.jsxs)("mask", { id: "mask", children: [(0, X.jsx)("rect", { width: "100%", height: "100%", fill: "#fff" }), (0, X.jsx)("image", s({ href: e }, p))] }) }), e && (0, X.jsx)("rect", { width: "100%", height: "100%", mask: "url(#mask)", fillOpacity: "0.72" }), t && (0, X.jsx)("image", s({ href: t }, p)), (0, X.jsx)("foreignObject", { width: "100%", height: "100%", children: (0, X.jsx)("div", C(s({ className: "camera-capture-text-and-image-container" }, h), { children: u })) })] });
2683
2688
  }
2684
- var Xo = Qu;
2689
+ var Xo = ep;
2685
2690
  var he = require("react/jsx-runtime");
2686
- function ep({ direction: e = "back", overlay: t = "", outline: r = "", imageUrl: a = "", title: o = "", instructions: n = "", showReview: i = false, onCapture: c, onEvent: u }) {
2687
- let [m, p] = (0, oe.useState)("CAPTURE"), [h, y] = (0, oe.useState)(), [d, l] = (0, oe.useState)(false), [f, g] = (0, oe.useState)(false), [S, F] = (0, oe.useState)(), w = (0, oe.useRef)(null), { videoConstraints: v } = qc(e), P = (0, oe.useMemo)(() => !!(Zn() && m === "CAPTURE"), [m]), { enterFullScreen: x, exitFullScreen: k } = Hc(P, u), I = (0, Wc.useIntl)(), M = (0, oe.useCallback)(async () => {
2691
+ function tp({ direction: e = "back", overlay: t = "", outline: r = "", imageUrl: a = "", title: o = "", instructions: n = "", showReview: i = false, onCapture: c, onEvent: u }) {
2692
+ let [l, p] = (0, oe.useState)("CAPTURE"), [h, y] = (0, oe.useState)(), [m, d] = (0, oe.useState)(false), [f, g] = (0, oe.useState)(false), [S, F] = (0, oe.useState)(), w = (0, oe.useRef)(null), { videoConstraints: v } = qc(e), P = (0, oe.useMemo)(() => !!(Zn() && l === "CAPTURE"), [l]), { enterFullScreen: x, exitFullScreen: k } = Hc(P, u), I = (0, Wc.useIntl)(), M = (0, oe.useCallback)(async () => {
2688
2693
  var G, re, ie, nt, br, xr;
2689
2694
  if ((G = w == null ? void 0 : w.current) != null && G.video && ((ie = (re = w == null ? void 0 : w.current) == null ? void 0 : re.video) == null ? void 0 : ie.readyState) >= 3) {
2690
2695
  (br = (nt = w == null ? void 0 : w.current) == null ? void 0 : nt.video) == null || br.pause();
@@ -2698,7 +2703,7 @@ var require_main_min = __commonJS({
2698
2703
  c(xt);
2699
2704
  }, "image/jpeg", 0.92);
2700
2705
  }
2701
- }, [w, i, F, p, c, d]), O = (0, oe.useCallback)((G) => {
2706
+ }, [w, i, F, p, c, m]), O = (0, oe.useCallback)((G) => {
2702
2707
  if (p("ERROR"), G instanceof DOMException)
2703
2708
  switch (G == null ? void 0 : G.name) {
2704
2709
  case "NotAllowedError":
@@ -2713,58 +2718,58 @@ var require_main_min = __commonJS({
2713
2718
  }
2714
2719
  y({ title: I.formatMessage(fe.cameraNotSupportedTitle), description: I.formatMessage(fe.cameraNotSupportedParagraph) }), ga("Dynamic Flow - Camera Not Supported", u, G);
2715
2720
  }, [I, u]), B = (0, oe.useCallback)((G) => {
2716
- x(), g(true), l(Lc(G)), jc(u, { direction: e }, G);
2717
- }, [l, u, e, x]), _ = () => {
2721
+ x(), g(true), d(Lc(G)), jc(u, { direction: e }, G);
2722
+ }, [d, u, e, x]), _ = () => {
2718
2723
  c((S == null ? void 0 : S.blob) || null);
2719
2724
  }, A = () => {
2720
2725
  p("CAPTURE"), F(void 0);
2721
2726
  }, z = () => p("CAPTURE");
2722
2727
  (0, oe.useEffect)(() => {
2723
- m !== "CAPTURE" && k();
2724
- }, [m, k]);
2725
- let E = (0, he.jsxs)("div", { className: "camera-capture", children: [v && (0, he.jsx)(_c.default, { ref: w, audio: false, videoConstraints: v, mirrored: d, onUserMediaError: O, onUserMedia: B }), (0, he.jsx)(Xo, { overlay: t, outline: r, imageUrl: a, title: o, instructions: n }), P && (0, he.jsx)(Wo, {}), f && (0, he.jsx)(Go, { onCapture: () => {
2728
+ l !== "CAPTURE" && k();
2729
+ }, [l, k]);
2730
+ let E = (0, he.jsxs)("div", { className: "camera-capture", children: [v && (0, he.jsx)(_c.default, { ref: w, audio: false, videoConstraints: v, mirrored: m, onUserMediaError: O, onUserMedia: B }), (0, he.jsx)(Xo, { overlay: t, outline: r, imageUrl: a, title: o, instructions: n }), P && (0, he.jsx)(Wo, {}), f && (0, he.jsx)(Go, { onCapture: () => {
2726
2731
  M();
2727
2732
  } })] }), ne = (0, he.jsxs)("div", { className: "camera-capture", children: [(0, he.jsx)("img", { className: "review-image", src: S == null ? void 0 : S.source, alt: "" }), (0, he.jsx)(Xo, { overlay: t, imageUrl: a, title: o, instructions: n, reviewInstructions: I.formatMessage(fe.reviewInstructions) }), (0, he.jsx)($o, { onSubmit: _, onRetry: A })] });
2728
- return (0, he.jsxs)("section", { children: [m === "CAPTURE" && E, m === "REVIEW" && ne, m === "ERROR" && h && (0, he.jsx)(_o, s({}, h))] });
2733
+ return (0, he.jsxs)("section", { children: [l === "CAPTURE" && E, l === "REVIEW" && ne, l === "ERROR" && h && (0, he.jsx)(_o, s({}, h))] });
2729
2734
  }
2730
- var Yo = ep;
2735
+ var Yo = tp;
2731
2736
  var Jc = require("react/jsx-runtime");
2732
- function tp(e) {
2737
+ function rp(e) {
2733
2738
  return new Promise((t, r) => {
2734
2739
  let a = new FileReader();
2735
2740
  a.onloadend = () => t(a.result), a.readAsDataURL(e);
2736
2741
  });
2737
2742
  }
2738
- function rp(e) {
2739
- let { step: t, model: r, onModelChange: a, onAction: o } = e, n = te(), i = Kc(t), c = ap(t), u = op(t), { title: m, image: p, cameraConfig: h } = c, { assets: y, direction: d, instructions: l } = h || {}, { overlay: f, outline: g } = y || {}, { url: S } = p || {}, [F, w] = (0, Sa.useState)(false);
2743
+ function ap(e) {
2744
+ let { step: t, model: r, onModelChange: a, onAction: o } = e, n = te(), i = Kc(t), c = op(t), u = np(t), { title: l, image: p, cameraConfig: h } = c, { assets: y, direction: m, instructions: d } = h || {}, { overlay: f, outline: g } = y || {}, { url: S } = p || {}, [F, w] = (0, Sa.useState)(false);
2740
2745
  (0, Sa.useEffect)(() => {
2741
2746
  F && o(u);
2742
2747
  }, [r]);
2743
2748
  let v = async (P) => {
2744
2749
  let { $id: x } = c;
2745
2750
  if (P) {
2746
- let k = await tp(P), I = { [x || ""]: k };
2751
+ let k = await rp(P), I = { [x || ""]: k };
2747
2752
  w(true), a({ model: I, formSchema: i, triggerModel: k, triggerSchema: c });
2748
2753
  }
2749
2754
  };
2750
- return (0, Jc.jsx)(Yo, { overlay: f, outline: g, title: m, imageUrl: S, instructions: l, direction: d, onEvent: n, onCapture: (P) => {
2755
+ return (0, Jc.jsx)(Yo, { overlay: f, outline: g, title: l, imageUrl: S, instructions: d, direction: m, onEvent: n, onCapture: (P) => {
2751
2756
  v(P);
2752
2757
  } });
2753
2758
  }
2754
- var Fa = rp;
2759
+ var Fa = ap;
2755
2760
  function Kc(e) {
2756
2761
  let r = Nr(e.schemas || [])[0];
2757
2762
  if (!r || !Le(r))
2758
2763
  throw new Error("The first schema in a camera step is expected to be of type object and have at least one property with a schema...");
2759
2764
  return r;
2760
2765
  }
2761
- function ap(e) {
2766
+ function op(e) {
2762
2767
  let t = Kc(e), r = Object.values(t.properties)[0];
2763
2768
  if (!r)
2764
2769
  throw new Error("The first schema in a camera step is expected to be of type object and have at least one property with a schema...");
2765
2770
  return r;
2766
2771
  }
2767
- function op(e) {
2772
+ function np(e) {
2768
2773
  var t, r;
2769
2774
  if (!e.schemas || ((t = Nr(e.schemas)) == null ? void 0 : t.length) !== 1)
2770
2775
  throw new Error("camera step expects 1 non-hidden object schema");
@@ -2778,14 +2783,14 @@ var require_main_min = __commonJS({
2778
2783
  var Qc = require("react/jsx-runtime");
2779
2784
  var Yc = () => {
2780
2785
  };
2781
- var np = ({ url: e, onClose: t }) => {
2786
+ var ip = ({ url: e, onClose: t }) => {
2782
2787
  let { formatMessage: r } = (0, Zc.useIntl)();
2783
- return (0, Qc.jsx)(se, { components: [{ type: "box", width: "lg", components: [{ type: "heading", text: r(Cr.title), size: "lg", align: "center", margin: "xl" }, { type: "info", markdown: r(Cr.description, { origin: ip(e) }), align: "center", margin: "xl" }, { type: "box", width: "md", components: [{ type: "button", action: { title: r(Cr.open), type: "primary", url: e, exit: true } }, { type: "button", action: { title: r(Cr.cancel), type: "link", url: "", exit: true } }] }] }], submitted: false, onAction: (a) => {
2788
+ return (0, Qc.jsx)(se, { components: [{ type: "box", width: "lg", components: [{ type: "heading", text: r(Cr.title), size: "lg", align: "center", margin: "xl" }, { type: "info", markdown: r(Cr.description, { origin: sp(e) }), align: "center", margin: "xl" }, { type: "box", width: "md", components: [{ type: "button", action: { title: r(Cr.open), type: "primary", url: e, exit: true } }, { type: "button", action: { title: r(Cr.cancel), type: "link", url: "", exit: true } }] }] }], submitted: false, onAction: (a) => {
2784
2789
  a.url && window.open(a.url, "_blank"), t();
2785
2790
  }, onModelChange: Yc, onPersistAsync: Yc });
2786
2791
  };
2787
- var ba = np;
2788
- function ip(e) {
2792
+ var ba = ip;
2793
+ function sp(e) {
2789
2794
  try {
2790
2795
  return new URL(e).origin;
2791
2796
  } catch (t) {
@@ -2795,37 +2800,37 @@ var require_main_min = __commonJS({
2795
2800
  var em = require("@transferwise/components");
2796
2801
  var tm = require("@transferwise/icons");
2797
2802
  var Jt = require("react/jsx-runtime");
2798
- function sp({ title: e, action: t, onAction: r }) {
2803
+ function cp({ title: e, action: t, onAction: r }) {
2799
2804
  return (0, Jt.jsxs)("a", { href: "/", className: "df-back-btn", "aria-label": e, onClick: (a) => {
2800
2805
  a.preventDefault(), r(C(s({}, t), { skipValidation: true }));
2801
2806
  }, children: [(0, Jt.jsx)("span", { className: "sr-only", children: e }), (0, Jt.jsx)(em.Avatar, { type: "icon", children: (0, Jt.jsx)(tm.ArrowLeft, { size: "24" }) })] });
2802
2807
  }
2803
- var rm = sp;
2808
+ var rm = cp;
2804
2809
  var Me = require("react/jsx-runtime");
2805
2810
  function Xr(e) {
2806
- var u, m, p;
2807
- let { step: t, globalError: r, onAction: a } = e, o = (u = t == null ? void 0 : t.external) == null ? void 0 : u.url, n = ((m = t == null ? void 0 : t.navigation) == null ? void 0 : m.back) || ((p = t == null ? void 0 : t.navigation) == null ? void 0 : p.backButton), { requiresManualTrigger: i, dismissConfirmation: c } = ti(o);
2811
+ var u, l, p;
2812
+ let { step: t, globalError: r, onAction: a } = e, o = (u = t == null ? void 0 : t.external) == null ? void 0 : u.url, n = ((l = t == null ? void 0 : t.navigation) == null ? void 0 : l.back) || ((p = t == null ? void 0 : t.navigation) == null ? void 0 : p.backButton), { requiresManualTrigger: i, dismissConfirmation: c } = ti(o);
2808
2813
  return t === void 0 ? r ? (0, Me.jsx)(ce, { component: { context: "negative", markdown: r, margin: "lg" } }) : null : o && i ? (0, Me.jsx)(ba, { url: o, onClose: c }) : Xn(t) ? (0, Me.jsx)(Fa, C(s({}, e), { step: t })) : (0, Me.jsxs)(Me.Fragment, { children: [n && (0, Me.jsx)(rm, C(s({}, n), { onAction: a })), r ? (0, Me.jsx)(ce, { component: { context: "negative", markdown: r, margin: "lg" } }) : null, (0, Me.jsx)(fa, C(s({}, e), { stepSpecification: t }))] });
2809
2814
  }
2810
2815
  var am = require("react");
2811
- var cp = 1e3;
2816
+ var mp = 1e3;
2812
2817
  function om(e) {
2813
2818
  let t = (0, am.useRef)(/* @__PURE__ */ new Map()), r = (a) => {
2814
2819
  if (t.current.has(a))
2815
2820
  return t.current.get(a);
2816
- let o = Ke((n, i, c) => e(n, i, c), cp);
2821
+ let o = Ke((n, i, c) => e(n, i, c), mp);
2817
2822
  return t.current.set(a, o), o;
2818
2823
  };
2819
2824
  return function(a, o, n, i) {
2820
2825
  let c = r(a);
2821
- c(a, o, n), (!i || !mp(i)) && c.flush();
2826
+ c(a, o, n), (!i || !lp(i)) && c.flush();
2822
2827
  };
2823
2828
  }
2824
- var mp = (e) => lt(e) === "basic" && e.type !== "boolean" && e.format !== "base64url";
2829
+ var lp = (e) => lt(e) === "basic" && e.type !== "boolean" && e.format !== "base64url";
2825
2830
  var Xt = require("react");
2826
2831
  var sm = (e) => {
2827
- var d, l;
2828
- let [t, r] = (0, Xt.useState)((d = e == null ? void 0 : e.errors) == null ? void 0 : d.validation), [a, o] = (0, Xt.useState)((l = e == null ? void 0 : e.errors) == null ? void 0 : l.error), [n, i] = (0, Xt.useState)({ step: e || void 0, models: e != null && e.model ? nm(e.model, im(e)) : {}, etag: void 0 }), { step: c, models: u, etag: m } = n, p = (f, g) => {
2832
+ var m, d;
2833
+ let [t, r] = (0, Xt.useState)((m = e == null ? void 0 : e.errors) == null ? void 0 : m.validation), [a, o] = (0, Xt.useState)((d = e == null ? void 0 : e.errors) == null ? void 0 : d.error), [n, i] = (0, Xt.useState)({ step: e || void 0, models: e != null && e.model ? nm(e.model, im(e)) : {}, etag: void 0 }), { step: c, models: u, etag: l } = n, p = (f, g) => {
2829
2834
  var S, F, w, v;
2830
2835
  i((P) => ({ step: f, models: f.model ? nm(f.model, im(f)) : P.models, etag: g })), r((F = (S = f == null ? void 0 : f.errors) == null ? void 0 : S.validation) != null ? F : null), o((v = (w = f == null ? void 0 : f.errors) == null ? void 0 : w.error) != null ? v : null);
2831
2836
  }, h = (f, g, S) => {
@@ -2833,8 +2838,8 @@ var require_main_min = __commonJS({
2833
2838
  let w = C(s({}, F.models), { [f]: g }), v = { step: F.step, models: w, etag: F.etag };
2834
2839
  return S(w), v;
2835
2840
  });
2836
- }, y = (0, Xt.useMemo)(() => dp(u, lp(c)), [u, c]);
2837
- return { formErrors: t, globalError: a, step: c, models: u, etag: m, modelIsValid: y, setFormErrors: r, setGlobalError: o, setStepAndEtag: p, setSchemaModel: h };
2841
+ }, y = (0, Xt.useMemo)(() => up(u, dp(c)), [u, c]);
2842
+ return { formErrors: t, globalError: a, step: c, models: u, etag: l, modelIsValid: y, setFormErrors: r, setGlobalError: o, setStepAndEtag: p, setSchemaModel: h };
2838
2843
  };
2839
2844
  var nm = (e, t = []) => t.reduce((r, a) => (a.$id || console.warn("Schema without $id property found."), C(s({}, r), { [a.$id || ""]: me(e, a) || {} })), {});
2840
2845
  var im = (e) => [...xa((e == null ? void 0 : e.layout) || []), ...(e == null ? void 0 : e.schemas) || []];
@@ -2850,7 +2855,7 @@ var require_main_min = __commonJS({
2850
2855
  return [];
2851
2856
  }
2852
2857
  });
2853
- var lp = (e) => [...Zo((e == null ? void 0 : e.layout) || []).map((t) => ((e == null ? void 0 : e.schemas) || []).find((r) => r.$id === t)).filter(Boolean), ...xa((e == null ? void 0 : e.layout) || [])];
2858
+ var dp = (e) => [...Zo((e == null ? void 0 : e.layout) || []).map((t) => ((e == null ? void 0 : e.schemas) || []).find((r) => r.$id === t)).filter(Boolean), ...xa((e == null ? void 0 : e.layout) || [])];
2854
2859
  var Zo = (e) => e.flatMap((t) => {
2855
2860
  switch (t.type) {
2856
2861
  case "columns":
@@ -2858,13 +2863,13 @@ var require_main_min = __commonJS({
2858
2863
  case "box":
2859
2864
  return Zo(t.components);
2860
2865
  case "form":
2861
- return [up(t)];
2866
+ return [pp(t)];
2862
2867
  default:
2863
2868
  return [];
2864
2869
  }
2865
2870
  }).filter(Boolean);
2866
- var dp = (e, t = []) => !(t != null && t.some((r) => (r.$id || console.warn("Schema without $id property found."), !$(e[r.$id || ""] || {}, r))));
2867
- var up = (e) => e.schema && !cm(e.schema) ? e.schema.$ref : e.schemaId;
2871
+ var up = (e, t = []) => !(t != null && t.some((r) => (r.$id || console.warn("Schema without $id property found."), !$(e[r.$id || ""] || {}, r))));
2872
+ var pp = (e) => e.schema && !cm(e.schema) ? e.schema.$ref : e.schemaId;
2868
2873
  var cm = (e) => e !== void 0 && typeof e == "object" && !Object.hasOwnProperty.call(e, "$ref");
2869
2874
  var va = require("@transferwise/components");
2870
2875
  var mm = require("react");
@@ -2882,7 +2887,7 @@ var require_main_min = __commonJS({
2882
2887
  return (0, ym.jsx)(Aa.Alert, { action: { text: t($t.retry), href: window.location.href }, message: t($t.errorAlert), type: Aa.Sentiment.NEGATIVE, className: "m-b-3", onDismiss: e });
2883
2888
  }
2884
2889
  var Yt = require("react/jsx-runtime");
2885
- var pp = () => {
2890
+ var yp = () => {
2886
2891
  };
2887
2892
  var Qo = class extends fm.Component {
2888
2893
  constructor(r) {
@@ -2896,7 +2901,7 @@ var require_main_min = __commonJS({
2896
2901
  return { hasError: true, isFatalError: true };
2897
2902
  }
2898
2903
  componentDidCatch(r) {
2899
- let { onError: a = pp } = this.props;
2904
+ let { onError: a = yp } = this.props;
2900
2905
  a(r);
2901
2906
  }
2902
2907
  render() {
@@ -2971,24 +2976,24 @@ var require_main_min = __commonJS({
2971
2976
  }
2972
2977
  };
2973
2978
  var rn = (e) => {
2974
- if (!yp(e))
2979
+ if (!fp(e))
2975
2980
  throw new Error("Incorrect type of response from fetch. Expected object of type Response.");
2976
2981
  if (e.bodyUsed)
2977
2982
  throw new Error("The body of the provided Response object has already been used. Every request must respond with a new Response object.");
2978
2983
  };
2979
- var yp = (e) => typeof e == "object" && e !== null && "clone" in e && "bodyUsed" in e;
2984
+ var fp = (e) => typeof e == "object" && e !== null && "clone" in e && "bodyUsed" in e;
2980
2985
  var $e = require("react/jsx-runtime");
2981
2986
  var bm = () => {
2982
2987
  };
2983
- var fp = ({ flowId: e, httpClient: t, initialAction: r, initialStep: a, loaderConfig: o, displayStepTitle: n = true, features: i, onCompletion: c, onError: u, onEvent: m = bm, onLog: p = bm }) => {
2984
- let { locale: h } = (0, xm.useIntl)(), { formErrors: y, globalError: d, step: l, models: f, etag: g, modelIsValid: S, setFormErrors: F, setGlobalError: w, setStepAndEtag: v, setSchemaModel: P } = sm(a), [x, k] = (0, ke.useState)(false), { isLoading: I, loader: M, setLoadingState: O } = lm(o, a ? "idle" : "initial"), B = ct("critical", p, e, (l == null ? void 0 : l.id) || (l == null ? void 0 : l.key)), _ = (0, ke.useMemo)(() => {
2988
+ var hp = ({ flowId: e, httpClient: t, initialAction: r, initialStep: a, loaderConfig: o, displayStepTitle: n = true, features: i, onCompletion: c, onError: u, onEvent: l = bm, onLog: p = bm }) => {
2989
+ let { locale: h } = (0, xm.useIntl)(), { formErrors: y, globalError: m, step: d, models: f, etag: g, modelIsValid: S, setFormErrors: F, setGlobalError: w, setStepAndEtag: v, setSchemaModel: P } = sm(a), [x, k] = (0, ke.useState)(false), { isLoading: I, loader: M, setLoadingState: O } = lm(o, a ? "idle" : "initial"), B = ct("critical", p, e, (d == null ? void 0 : d.id) || (d == null ? void 0 : d.key)), _ = (0, ke.useMemo)(() => {
2985
2990
  var b;
2986
- return s({ flowId: e, stepId: (l == null ? void 0 : l.id) || (l == null ? void 0 : l.key) }, (b = l == null ? void 0 : l.analytics) != null ? b : {});
2987
- }, [e, l]), A = (0, ke.useMemo)(() => Ta(m, _), [m, _]), z = (0, ke.useCallback)(({ action: b, data: q, etag: T }) => {
2991
+ return s({ flowId: e, stepId: (d == null ? void 0 : d.id) || (d == null ? void 0 : d.key) }, (b = d == null ? void 0 : d.analytics) != null ? b : {});
2992
+ }, [e, d]), A = (0, ke.useMemo)(() => Ta(l, _), [l, _]), z = (0, ke.useCallback)(({ action: b, data: q, etag: T }) => {
2988
2993
  let { url: ee, method: st = "POST" } = b;
2989
2994
  return t(ee != null ? ee : "", { method: st, headers: s({ "accept-language": h, "Content-Type": "application/json" }, T ? { "If-None-Match": T } : {}), credentials: "include", body: st === "GET" ? void 0 : JSON.stringify(q) });
2990
2995
  }, [t, h]), E = async (b, q = {}) => {
2991
- O(l ? "submission" : "initial"), A("Dynamic Flow - Step Submitted", { actionId: b.id || b.$id });
2996
+ O(d ? "submission" : "initial"), A("Dynamic Flow - Step Submitted", { actionId: b.id || b.$id });
2992
2997
  try {
2993
2998
  let T = await z({ action: b, data: q });
2994
2999
  if (b.exit && T.ok) {
@@ -3051,8 +3056,8 @@ var require_main_min = __commonJS({
3051
3056
  });
3052
3057
  }, Pa = (b, q) => {
3053
3058
  let { triggerSchema: T } = b;
3054
- if (wp(b)) {
3055
- let ee = T.refreshUrl || T.refreshFormUrl, st = (l == null ? void 0 : l.refreshUrl) || (l == null ? void 0 : l.refreshFormUrl), vr = ee || st;
3059
+ if (Cp(b)) {
3060
+ let ee = T.refreshUrl || T.refreshFormUrl, st = (d == null ? void 0 : d.refreshUrl) || (d == null ? void 0 : d.refreshFormUrl), vr = ee || st;
3056
3061
  vr && re(vr, Oa(q), g, T);
3057
3062
  }
3058
3063
  }, Um = async (b) => {
@@ -3063,28 +3068,28 @@ var require_main_min = __commonJS({
3063
3068
  return;
3064
3069
  }
3065
3070
  let { data: q, method: T, skipValidation: ee } = b, st = s(s({}, Oa(f)), q);
3066
- gp(T) ? (F(null), ee || k(true), (S || ee) && await E(b, st)) : await E(b);
3071
+ wp(T) ? (F(null), ee || k(true), (S || ee) && await E(b, st)) : await E(b);
3067
3072
  };
3068
- return (0, $e.jsx)(Er, { flowId: e, stepId: (l == null ? void 0 : l.id) || (l == null ? void 0 : l.key), onLog: p, children: (0, $e.jsx)(kr, { metadata: _, onEvent: m, children: (0, $e.jsx)(gn, { loading: I, children: (0, $e.jsx)(ri, { httpClient: t, children: (0, $e.jsx)(xn, { features: i, children: M !== null ? M : (0, $e.jsx)(Xr, { step: l, model: Oa(f), submitted: x, globalError: d, formErrors: y, stepLayoutOptions: { displayStepTitle: n }, onAction: (b) => {
3073
+ return (0, $e.jsx)(Er, { flowId: e, stepId: (d == null ? void 0 : d.id) || (d == null ? void 0 : d.key), onLog: p, children: (0, $e.jsx)(kr, { metadata: _, onEvent: l, children: (0, $e.jsx)(gn, { loading: I, children: (0, $e.jsx)(ri, { httpClient: t, children: (0, $e.jsx)(xn, { features: i, children: M !== null ? M : (0, $e.jsx)(Xr, { step: d, model: Oa(f), submitted: x, globalError: m, formErrors: y, stepLayoutOptions: { displayStepTitle: n }, onAction: (b) => {
3069
3074
  Um(b);
3070
3075
  }, onModelChange: xt }) }) }) }) }) });
3071
3076
  };
3072
- function hp(e) {
3073
- return (0, $e.jsx)(en, { onError: e.onError, children: (0, $e.jsx)(fp, s({}, e)) });
3077
+ function gp(e) {
3078
+ return (0, $e.jsx)(en, { onError: e.onError, children: (0, $e.jsx)(hp, s({}, e)) });
3074
3079
  }
3075
- var an = hp;
3080
+ var an = gp;
3076
3081
  var Oa = (e) => Object.values(e).reduce((t, r) => s(s({}, t), r), {});
3077
- var gp = (e = "POST") => ["POST", "PUT", "PATCH"].includes(e.toUpperCase());
3078
- var wp = (e) => {
3082
+ var wp = (e = "POST") => ["POST", "PUT", "PATCH"].includes(e.toUpperCase());
3083
+ var Cp = (e) => {
3079
3084
  let { type: t, triggerSchema: r, triggerModel: a, lastTriggerModel: o = null } = e, n = () => $(a, r), i = () => $(o, r), c = (r == null ? void 0 : r.refreshStepOnChange) || (r == null ? void 0 : r.refreshFormOnChange);
3080
3085
  return t !== "init" && c && (n() || i());
3081
3086
  };
3082
3087
  var Fr = require("react/jsx-runtime");
3083
- function Cp(e) {
3088
+ function Sp(e) {
3084
3089
  let t = s({ model: null, errors: null }, e), { baseUrl: r = "", onEvent: a = vm, onLog: o = vm } = e;
3085
3090
  return (0, Fr.jsx)(Er, { flowId: "JsonSchemaForm", stepId: "JsonSchemaForm", onLog: o, children: (0, Fr.jsx)(kr, { metadata: { flowId: "JsonSchemaForm", stepId: "JsonSchemaForm" }, onEvent: a, children: (0, Fr.jsx)(Ur, { baseUrl: r, children: (0, Fr.jsx)(le, s({}, t)) }) }) });
3086
3091
  }
3087
- var on = Cp;
3092
+ var on = Sp;
3088
3093
  var vm = () => {
3089
3094
  };
3090
3095
  var Am = { "dynamicFlows.ArraySchema.addItem": "Speichern", "dynamicFlows.ArraySchema.addItemTitle": "Artikel hinzuf\xFCgen", "dynamicFlows.ArraySchema.editItem": "Speichern", "dynamicFlows.ArraySchema.maxItemsError": "Bitte f\xFCge {maxItems} oder weniger hinzu.", "dynamicFlows.ArraySchema.minItemsError": "Bitte f\xFCge mindestens {minItems} hinzu.", "dynamicFlows.ArraySchema.removeItem": "Entfernen", "dynamicFlows.CameraCapture.CameraConnectionIssue.action": "Erneut versuchen", "dynamicFlows.CameraCapture.CameraConnectionIssue.paragraph": "Bitte pr\xFCfe, ob deine Kamera verbunden ist, und versuche es dann erneut.", "dynamicFlows.CameraCapture.CameraConnectionIssue.title": "Wir k\xF6nnen nicht auf deine Kamera zugreifen", "dynamicFlows.CameraCapture.CameraNotSupported.paragraph": "Der von dir verwendete Browser unterst\xFCtzt keine Kameras. Bitte verwende einen anderen Browser oder ein anderes Ger\xE4t, oder lade unsere App herunter", "dynamicFlows.CameraCapture.CameraNotSupported.title": "Kamera wird nicht unterst\xFCtzt", "dynamicFlows.CameraCapture.NoCameraAccess.action": "Kamerazugriff genehmigen", "dynamicFlows.CameraCapture.NoCameraAccess.paragraph": "Aktiviere den Kamerazugriff in den Einstellungen deines Browsers, um weitermachen zu k\xF6nnen.", "dynamicFlows.CameraCapture.NoCameraAccess.title": "Wir k\xF6nnen nicht auf deine Kamera zugreifen", "dynamicFlows.CameraCapture.reviewInstructions": "Ist das aufgenommene Bild deutlich erkennbar und vollst\xE4ndig?", "dynamicFlows.CameraCapture.reviewRetry": "Nein, erneut versuchen", "dynamicFlows.CameraCapture.reviewSubmit": "Ja, senden", "dynamicFlows.CameraCapture.rotatePhone.text": "Drehe dein Ger\xE4t in die Hochformatansicht, um ein Foto aufzunehmen", "dynamicFlows.ControlFeedback.maxLength": "Bitte gib nicht mehr als {maxLength} Zeichen ein.", "dynamicFlows.ControlFeedback.maximum": "Bitte gib eine Zahl ein, die {maximum} oder weniger betr\xE4gt.", "dynamicFlows.ControlFeedback.maximumDate": "Bitte gib ein Datum ein, das am oder vor dem {maximum} liegt.", "dynamicFlows.ControlFeedback.minLength": "Bitte gib mindestens {minLength} Zeichen ein.", "dynamicFlows.ControlFeedback.minimum": "Bitte gib eine Zahl ein, die {minimum} oder mehr betr\xE4gt.", "dynamicFlows.ControlFeedback.minimumDate": "Bitte gib ein Datum ein, das am oder nach dem {minimum} liegt.", "dynamicFlows.ControlFeedback.pattern": "Bitte gib die Angabe im richtigen Format ein.", "dynamicFlows.ControlFeedback.patternDate": "Bitte gib ein Datum im richtigen Format ein.", "dynamicFlows.ControlFeedback.required": "Bitte f\xFClle dieses Feld aus.", "dynamicFlows.ControlFeedback.type": "Falscher Typ", "dynamicFlows.DefaultErrorMessages.required": "Bitte f\xFClle dieses Feld aus.", "dynamicFlows.DynamicExternal.retryTitle": "Fenster erneut \xF6ffnen", "dynamicFlows.DynamicParagraph.copied": "In Zwischenablage kopiert", "dynamicFlows.DynamicParagraph.copy": "Kopieren", "dynamicFlows.ErrorBoundary.errorAlert": "Hoppla \u2013 da ist was schiefgelaufen...", "dynamicFlows.ErrorBoundary.retry": "Erneut versuchen", "dynamicFlows.ExternalConfirmation.cancel": "Abbrechen", "dynamicFlows.ExternalConfirmation.description": "Bitte best\xE4tige, dass du **{origin}** in einem neuen Browser-Tab \xF6ffnen m\xF6chtest.", "dynamicFlows.ExternalConfirmation.open": "In neuem Tab \xF6ffnen", "dynamicFlows.ExternalConfirmation.title": "Bitte best\xE4tigen", "dynamicFlows.Help.ariaLabel": "Klicke hier f\xFCr mehr Informationen.", "dynamicFlows.MultipleFileUploadSchema.maxFileSizeError": "Diese Datei ist leider zu gro\xDF. Bitte lade eine kleinere Datei hoch.", "dynamicFlows.MultipleFileUploadSchema.maxItemsError": "Bitte lade {maxItems} oder weniger Dateien hoch.", "dynamicFlows.MultipleFileUploadSchema.minItemsError": "Bitte lade mindestens {minItems} Datei(en) hoch.", "dynamicFlows.PersistAsyncSchema.genericError": "Da ist etwas schiefgelaufen. Probiere es bitte sp\xE4ter noch einmal.", "dynamicFlows.ReadOnlySchema.no": "Nein", "dynamicFlows.ReadOnlySchema.yes": "Ja" };
@@ -3103,8 +3108,8 @@ var require_main_min = __commonJS({
3103
3108
  var zm = { "dynamicFlows.ArraySchema.addItem": "Kaydet", "dynamicFlows.ArraySchema.addItemTitle": "\xD6\u011Fe ekle", "dynamicFlows.ArraySchema.editItem": "Kaydet", "dynamicFlows.ArraySchema.maxItemsError": "L\xFCtfen {maxItems} veya daha az ekleme yap\u0131n", "dynamicFlows.ArraySchema.minItemsError": "L\xFCtfen en az {minItems} ekleme yap\u0131n.", "dynamicFlows.ArraySchema.removeItem": "Kald\u0131r", "dynamicFlows.CameraCapture.CameraConnectionIssue.action": "Tekrar deneyin", "dynamicFlows.CameraCapture.CameraConnectionIssue.paragraph": "L\xFCtfen ba\u011Fl\u0131 olup olmad\u0131\u011F\u0131n\u0131 kontrol edip tekrar deneyin.", "dynamicFlows.CameraCapture.CameraConnectionIssue.title": "Kameran\u0131za eri\u015Femiyoruz", "dynamicFlows.CameraCapture.CameraNotSupported.paragraph": "Kulland\u0131\u011F\u0131n\u0131z taray\u0131c\u0131da kamera deste\u011Fi yok. Farkl\u0131 bir taray\u0131c\u0131 / cihaz deneyin veya mobil uygulamam\u0131z\u0131 indirin.", "dynamicFlows.CameraCapture.CameraNotSupported.title": "Kamera desteklenmiyor", "dynamicFlows.CameraCapture.NoCameraAccess.action": "Kamera eri\u015Fimi verin", "dynamicFlows.CameraCapture.NoCameraAccess.paragraph": "Tekrar ba\u015Flamak i\xE7in taray\u0131c\u0131n\u0131z\u0131n ayarlar\u0131nda kamera eri\u015Fimini etkinle\u015Ftirin.", "dynamicFlows.CameraCapture.NoCameraAccess.title": "Kameran\u0131za eri\u015Femiyoruz", "dynamicFlows.CameraCapture.reviewInstructions": "Foto\u011Fraf\u0131n\u0131z net, okunakl\u0131 ve eksiksiz mi?", "dynamicFlows.CameraCapture.reviewRetry": "Hay\u0131r, tekrar dene", "dynamicFlows.CameraCapture.reviewSubmit": "Evet, g\xF6nder", "dynamicFlows.CameraCapture.rotatePhone.text": "Foto\u011Fraf \xE7ekmek i\xE7in telefonunuzu dik pozisyonda tutun", "dynamicFlows.ControlFeedback.maxLength": "L\xFCtfen {maxLength} veya daha az karakter girin.", "dynamicFlows.ControlFeedback.maximum": "L\xFCtfen {maximum} veya daha d\xFC\u015F\xFCk bir say\u0131 girin.", "dynamicFlows.ControlFeedback.maximumDate": "L\xFCtfen {maximum} veya daha erken bir tarih girin.", "dynamicFlows.ControlFeedback.minLength": "En az {minLength} karakter girebilirsiniz.", "dynamicFlows.ControlFeedback.minimum": "L\xFCtfen {minimum} veya daha y\xFCksek bir say\u0131 girin.", "dynamicFlows.ControlFeedback.minimumDate": "L\xFCtfen {minimum} veya daha ge\xE7 bir tarih girin.", "dynamicFlows.ControlFeedback.pattern": "Yanl\u0131\u015F bi\xE7im", "dynamicFlows.ControlFeedback.patternDate": "L\xFCtfen tarihi do\u011Fru bi\xE7imde girin.", "dynamicFlows.ControlFeedback.required": "L\xFCtfen bu alan\u0131 doldurun.", "dynamicFlows.ControlFeedback.type": "Ge\xE7ersiz se\xE7im", "dynamicFlows.DefaultErrorMessages.required": "L\xFCtfen bu alan\u0131 doldurun.", "dynamicFlows.DynamicExternal.retryTitle": "Pencereyi yeniden a\xE7", "dynamicFlows.DynamicParagraph.copied": "Panoya kopyaland\u0131", "dynamicFlows.DynamicParagraph.copy": "Kopyala", "dynamicFlows.ErrorBoundary.errorAlert": "Aman\u0131n! Bir \u015Feyler ters gitti...", "dynamicFlows.ErrorBoundary.retry": "Tekrar dene", "dynamicFlows.ExternalConfirmation.cancel": "\u0130ptal edin", "dynamicFlows.ExternalConfirmation.description": "L\xFCtfen yeni bir taray\u0131c\u0131 sekmesinde **{origin}** a\xE7mak istedi\u011Finizi onaylay\u0131n.", "dynamicFlows.ExternalConfirmation.open": "Yeni sekmede a\xE7", "dynamicFlows.ExternalConfirmation.title": "L\xFCtfen onaylay\u0131n", "dynamicFlows.Help.ariaLabel": "Ayr\u0131nt\u0131lar i\xE7in t\u0131klay\u0131n.", "dynamicFlows.MultipleFileUploadSchema.maxFileSizeError": "\xDCzg\xFCn\xFCz, bu dosya \xE7ok b\xFCy\xFCk. L\xFCtfen daha k\xFC\xE7\xFCk bir dosya y\xFCkleyin.", "dynamicFlows.MultipleFileUploadSchema.maxItemsError": "L\xFCtfen {maxItems} veya daha az dosya y\xFCkleyin.", "dynamicFlows.MultipleFileUploadSchema.minItemsError": "L\xFCtfen en az {minItems} dosya y\xFCkleyin.", "dynamicFlows.PersistAsyncSchema.genericError": "Bir \u015Feyler ters gitti, l\xFCtfen tekrar deneyin", "dynamicFlows.ReadOnlySchema.no": "Hay\u0131r", "dynamicFlows.ReadOnlySchema.yes": "Evet" };
3104
3109
  var nn = { "dynamicFlows.ArraySchema.addItem": "\u4FDD\u5B58", "dynamicFlows.ArraySchema.addItemTitle": "\u6DFB\u52A0\u9879\u76EE", "dynamicFlows.ArraySchema.editItem": "\u4FDD\u5B58", "dynamicFlows.ArraySchema.maxItemsError": "\u8BF7\u6DFB\u52A0\u4E0D\u8D85\u8FC7 {maxItems} \u9879\u3002", "dynamicFlows.ArraySchema.minItemsError": "\u8BF7\u81F3\u5C11\u6DFB\u52A0 {minItems} \u9879\u3002", "dynamicFlows.ArraySchema.removeItem": "\u79FB\u9664", "dynamicFlows.CameraCapture.CameraConnectionIssue.action": "\u91CD\u8BD5", "dynamicFlows.CameraCapture.CameraConnectionIssue.paragraph": "\u8BF7\u68C0\u67E5\u662F\u5426\u8FDE\u63A5\uFF0C\u7136\u540E\u91CD\u8BD5\u3002", "dynamicFlows.CameraCapture.CameraConnectionIssue.title": "\u6211\u4EEC\u65E0\u6CD5\u8BBF\u95EE\u60A8\u7684\u6444\u50CF\u5934", "dynamicFlows.CameraCapture.CameraNotSupported.paragraph": "\u60A8\u76EE\u524D\u4F7F\u7528\u7684\u6D4F\u89C8\u5668\u4E0D\u652F\u6301\u6444\u50CF\u5934\u3002\u8BF7\u5C1D\u8BD5\u5176\u4ED6\u6D4F\u89C8\u5668\u3001\u8BBE\u5907\u6216\u4E0B\u8F7D\u6211\u4EEC\u7684\u5E94\u7528\u3002", "dynamicFlows.CameraCapture.CameraNotSupported.title": "\u4E0D\u652F\u6301\u6444\u50CF\u5934", "dynamicFlows.CameraCapture.NoCameraAccess.action": "\u5141\u8BB8\u8BBF\u95EE\u6444\u50CF\u5934", "dynamicFlows.CameraCapture.NoCameraAccess.paragraph": "\u5728\u6D4F\u89C8\u5668\u8BBE\u7F6E\u4E2D\u542F\u7528\u76F8\u673A\u8BBF\u95EE\u6743\u9650\uFF0C\u518D\u91CD\u65B0\u5C1D\u8BD5\u3002", "dynamicFlows.CameraCapture.NoCameraAccess.title": "\u6211\u4EEC\u65E0\u6CD5\u8BBF\u95EE\u60A8\u7684\u6444\u50CF\u5934", "dynamicFlows.CameraCapture.reviewInstructions": "\u60A8\u7684\u56FE\u7247\u662F\u5426\u6E05\u6670\u3001\u53EF\u8BFB\u548C\u5B8C\u6574\uFF1F", "dynamicFlows.CameraCapture.reviewRetry": "\u5426\uFF0C\u518D\u8BD5\u4E00\u6B21", "dynamicFlows.CameraCapture.reviewSubmit": "\u662F\uFF0C\u63D0\u4EA4", "dynamicFlows.CameraCapture.rotatePhone.text": "\u5C06\u624B\u673A\u65CB\u8F6C\u5230\u7EB5\u5411\u89C6\u56FE\u4EE5\u62CD\u7167", "dynamicFlows.ControlFeedback.maxLength": "\u8BF7\u8F93\u5165\u4E0D\u8D85\u8FC7 {maxLength} \u4E2A\u5B57\u7B26\u3002", "dynamicFlows.ControlFeedback.maximum": "\u8BF7\u8F93\u5165\u4E00\u4E2A\u5C0F\u4E8E\u6216\u7B49\u4E8E {maximum} \u7684\u6570\u5B57\u3002", "dynamicFlows.ControlFeedback.maximumDate": "\u8BF7\u8F93\u5165 {maximum} \u6216\u4E4B\u524D\u7684\u65E5\u671F", "dynamicFlows.ControlFeedback.minLength": "\u8BF7\u81F3\u5C11\u8F93\u5165 {minLength} \u4E2A\u5B57\u7B26", "dynamicFlows.ControlFeedback.minimum": "\u8BF7\u8F93\u5165\u4E00\u4E2A\u5927\u4E8E\u6216\u7B49\u4E8E {minimum} \u7684\u6570\u5B57", "dynamicFlows.ControlFeedback.minimumDate": "\u8BF7\u8F93\u5165 {minimum} \u6216\u4E4B\u540E\u7684\u65E5\u671F", "dynamicFlows.ControlFeedback.pattern": "\u8BF7\u4EE5\u6B63\u786E\u7684\u683C\u5F0F\u8F93\u5165", "dynamicFlows.ControlFeedback.patternDate": "\u8BF7\u4EE5\u6B63\u786E\u7684\u683C\u5F0F\u8F93\u5165\u65E5\u671F", "dynamicFlows.ControlFeedback.required": "\u8BF7\u586B\u5199\u6B64\u5B57\u6BB5\u3002", "dynamicFlows.ControlFeedback.type": "\u7C7B\u578B\u9519\u8BEF", "dynamicFlows.DefaultErrorMessages.required": "\u8BF7\u586B\u5199\u6B64\u5B57\u6BB5\u3002", "dynamicFlows.DynamicExternal.retryTitle": "\u91CD\u65B0\u6253\u5F00\u7A97\u53E3", "dynamicFlows.DynamicParagraph.copied": "\u5DF2\u590D\u5236\u5230\u526A\u8D34\u677F", "dynamicFlows.DynamicParagraph.copy": "\u590D\u5236", "dynamicFlows.ErrorBoundary.errorAlert": "\u7CDF\u7CD5\u3002\u51FA\u9519\u4E86\u2026", "dynamicFlows.ErrorBoundary.retry": "\u91CD\u8BD5", "dynamicFlows.ExternalConfirmation.cancel": "\u53D6\u6D88", "dynamicFlows.ExternalConfirmation.description": "\u8BF7\u786E\u8BA4\u60A8\u662F\u5426\u8981\u5728\u65B0\u6807\u7B7E\u9875\u4E2D\u6253\u5F00**{origin}**\u3002", "dynamicFlows.ExternalConfirmation.open": "\u5728\u65B0\u6807\u7B7E\u9875\u4E2D\u6253\u5F00", "dynamicFlows.ExternalConfirmation.title": "\u8BF7\u786E\u8BA4", "dynamicFlows.Help.ariaLabel": "\u70B9\u51FB\u6B64\u5904\u83B7\u53D6\u66F4\u591A\u4FE1\u606F\u3002", "dynamicFlows.MultipleFileUploadSchema.maxFileSizeError": "\u62B1\u6B49\uFF0C\u8BE5\u6587\u4EF6\u592A\u5927\u3002\u8BF7\u4E0A\u4F20\u4E00\u4E2A\u66F4\u5C0F\u7684\u6587\u4EF6\u3002", "dynamicFlows.MultipleFileUploadSchema.maxItemsError": "\u8BF7\u4E0A\u4F20\u4E0D\u8D85\u8FC7 {maxItems} \u4E2A\u6587\u4EF6\u3002", "dynamicFlows.MultipleFileUploadSchema.minItemsError": "\u8BF7\u4E0A\u4F20\u81F3\u5C11 {minItems} \u4E2A\u6587\u4EF6\u3002", "dynamicFlows.PersistAsyncSchema.genericError": "\u51FA\u9519\u4E86\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5\uFF01", "dynamicFlows.ReadOnlySchema.no": "\u5426", "dynamicFlows.ReadOnlySchema.yes": "\u662F" };
3105
3110
  var jm = { "dynamicFlows.ArraySchema.addItem": "\u5132\u5B58", "dynamicFlows.ArraySchema.addItemTitle": "\u6DFB\u52A0\u9805\u76EE", "dynamicFlows.ArraySchema.editItem": "\u5132\u5B58", "dynamicFlows.ArraySchema.maxItemsError": "\u8ACB\u6DFB\u52A0\u4E0D\u8D85\u904E{maxItems}\u9805\u3002", "dynamicFlows.ArraySchema.minItemsError": "\u8ACB\u81F3\u5C11\u6DFB\u52A0{minItems}\u9805\u3002", "dynamicFlows.ArraySchema.removeItem": "\u79FB\u9664", "dynamicFlows.CameraCapture.CameraConnectionIssue.action": "\u518D\u8A66\u4E00\u6B21", "dynamicFlows.CameraCapture.CameraConnectionIssue.paragraph": "\u8ACB\u6AA2\u67E5\u9023\u7DDA\u72C0\u614B\uFF0C\u7136\u5F8C\u518D\u8A66\u4E00\u6B21\u3002", "dynamicFlows.CameraCapture.CameraConnectionIssue.title": "\u6211\u5011\u7121\u6CD5\u53D6\u7528\u4F60\u7684\u76F8\u6A5F", "dynamicFlows.CameraCapture.CameraNotSupported.paragraph": "\u4F60\u76EE\u524D\u4F7F\u7528\u7684\u700F\u89BD\u5668\u4E0D\u652F\u6301\u76F8\u6A5F\u3002\u8ACB\u5617\u8A66\u4F7F\u7528\u5176\u4ED6\u700F\u89BD\u5668\u6216\u5176\u4ED6\u88DD\u7F6E\uFF0C\u6216\u8005\u4F60\u53EF\u4EE5\u4E0B\u8F09\u6211\u5011\u7684\u61C9\u7528\u7A0B\u5F0F\u3002", "dynamicFlows.CameraCapture.CameraNotSupported.title": "\u4E0D\u652F\u6301\u76F8\u6A5F", "dynamicFlows.CameraCapture.NoCameraAccess.action": "\u5141\u8A31\u53D6\u7528\u76F8\u6A5F", "dynamicFlows.CameraCapture.NoCameraAccess.paragraph": "\u4F60\u53EF\u4EE5\u5728\u700F\u89BD\u5668\u7684\u8A2D\u5B9A\u4E2D\u958B\u555F\u76F8\u6A5F\u5B58\u53D6\u6B0A\u9650\u3002", "dynamicFlows.CameraCapture.NoCameraAccess.title": "\u6211\u5011\u7121\u6CD5\u53D6\u7528\u4F60\u7684\u76F8\u6A5F", "dynamicFlows.CameraCapture.reviewInstructions": "\u4F60\u7684\u7167\u7247\u662F\u5426\u5B8C\u6574\u3001\u6E05\u6670\u53CA\u53EF\u8B80\uFF1F", "dynamicFlows.CameraCapture.reviewRetry": "\u5426\uFF0C\u518D\u8A66\u4E00\u6B21", "dynamicFlows.CameraCapture.reviewSubmit": "\u662F\uFF0C\u63D0\u4EA4", "dynamicFlows.CameraCapture.rotatePhone.text": "\u5C07\u624B\u6A5F\u65CB\u8F49\u81F3\u5782\u76F4\u756B\u9762\u4EE5\u62CD\u7167", "dynamicFlows.ControlFeedback.maxLength": "\u8ACB\u8F38\u5165\u6700\u591A{maxLength}\u500B\u5B57\u5143\u3002", "dynamicFlows.ControlFeedback.maximum": "\u8ACB\u8F38\u5165\u4E00\u500B\u5C0F\u65BC\u6216\u7B49\u65BC{maximum}\u7684\u6578\u5B57\u3002", "dynamicFlows.ControlFeedback.maximumDate": "\u8ACB\u8F38\u5165{maximum}\u6216\u4E4B\u524D\u7684\u65E5\u671F\u3002", "dynamicFlows.ControlFeedback.minLength": "\u8ACB\u8F38\u5165\u81F3\u5C11{minLength}\u500B\u5B57\u5143\u3002", "dynamicFlows.ControlFeedback.minimum": "\u8ACB\u8F38\u5165\u4E00\u500B\u5927\u65BC\u6216\u7B49\u65BC{minimum}\u7684\u6578\u5B57\u3002", "dynamicFlows.ControlFeedback.minimumDate": "\u8ACB\u8F38\u5165{minimum}\u6216\u4E4B\u5F8C\u7684\u65E5\u671F\u3002", "dynamicFlows.ControlFeedback.pattern": "\u8ACB\u4EE5\u6B63\u78BA\u683C\u5F0F\u8F38\u5165\u5185\u5BB9\u3002", "dynamicFlows.ControlFeedback.patternDate": "\u8ACB\u4EE5\u6B63\u78BA\u683C\u5F0F\u8F38\u5165\u65E5\u671F\u3002", "dynamicFlows.ControlFeedback.required": "\u8ACB\u586B\u5BEB\u6B64\u6B04\u4F4D\u3002", "dynamicFlows.ControlFeedback.type": "\u932F\u8AA4\u7684\u985E\u578B", "dynamicFlows.DefaultErrorMessages.required": "\u8ACB\u586B\u5BEB\u6B64\u6B04\u4F4D\u3002", "dynamicFlows.DynamicExternal.retryTitle": "\u91CD\u65B0\u6253\u958B\u8996\u7A97", "dynamicFlows.DynamicParagraph.copied": "\u8907\u88FD\u5230\u526A\u8CBC\u677F", "dynamicFlows.DynamicParagraph.copy": "\u8907\u88FD", "dynamicFlows.ErrorBoundary.errorAlert": "\u5662\uFF01\u51FA\u4E86\u4E9B\u554F\u984C...", "dynamicFlows.ErrorBoundary.retry": "\u91CD\u8A66", "dynamicFlows.ExternalConfirmation.cancel": "\u53D6\u6D88", "dynamicFlows.ExternalConfirmation.description": "\u8ACB\u78BA\u8A8D\u4F60\u662F\u5426\u8981\u5728\u700F\u89BD\u5668\u7684\u65B0\u5206\u9801\u6253\u958B**{origin}**\u3002", "dynamicFlows.ExternalConfirmation.open": "\u5728\u65B0\u5206\u9801\u4E2D\u958B\u555F", "dynamicFlows.ExternalConfirmation.title": "\u8ACB\u78BA\u8A8D", "dynamicFlows.Help.ariaLabel": "\u6309\u6B64\u67E5\u770B\u8A73\u60C5\u3002", "dynamicFlows.MultipleFileUploadSchema.maxFileSizeError": "\u62B1\u6B49\uFF0C\u8A72\u6A94\u6848\u592A\u5927\u3002\u8ACB\u4E0A\u8F09\u4E00\u500B\u8F03\u5C0F\u7684\u6A94\u6848\u3002", "dynamicFlows.MultipleFileUploadSchema.maxItemsError": "\u8ACB\u4E0D\u8981\u4E0A\u8F09\u8D85\u904E{maxItems}\u500B\u6A94\u6848\u3002", "dynamicFlows.MultipleFileUploadSchema.minItemsError": "\u8ACB\u4E0A\u8F09\u81F3\u5C11{minItems}\u500B\u6A94\u6848\u3002", "dynamicFlows.PersistAsyncSchema.genericError": "\u51FA\u4E86\u4E9B\u554F\u984C\uFF0C\u8ACB\u7A0D\u5F8C\u518D\u8A66\u3002", "dynamicFlows.ReadOnlySchema.no": "\u5426", "dynamicFlows.ReadOnlySchema.yes": "\u662F" };
3106
- var Np = { en: Om, de: Am, es: Pm, fr: Mm, hu: km, id: Em, it: Im, ja: Dm, pl: Lm, pt: Tm, ro: Rm, ru: Nm, th: Bm, tr: zm, zh: nn, "zh-CN": nn, "zh-HK": jm };
3107
- var Vm = Np;
3111
+ var Bp = { en: Om, de: Am, es: Pm, fr: Mm, hu: km, id: Em, it: Im, ja: Dm, pl: Lm, pt: Tm, ro: Rm, ru: Nm, th: Bm, tr: zm, zh: nn, "zh-CN": nn, "zh-HK": jm };
3112
+ var Vm = Bp;
3108
3113
  }
3109
3114
  });
3110
3115