@socotra/ec-react-utils 2.2.5-alpha.1 → 2.2.5-alpha.4

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/dist/index.es.js CHANGED
@@ -1,125 +1,125 @@
1
- const X = (n) => {
2
- const { data: e, scope: r, dataTypes: $, rootDisplayName: b, account: g, quote: w, element: h } = n, V = [];
1
+ const q = (t) => {
2
+ const { data: e, scope: a, dataTypes: f, rootDisplayName: b, account: d, quote: g, element: p } = t, M = [];
3
3
  let P = {};
4
- const B = Object.fromEntries(
5
- Object.entries(e ?? {}).filter(([, p]) => {
4
+ const C = Object.fromEntries(
5
+ Object.entries(e ?? {}).filter(([, h]) => {
6
6
  var O;
7
- const l = (O = p.scope) == null ? void 0 : O.split(",").map((L) => L.trim());
8
- return !!(!l || r === "P" && (l != null && l.includes("P")) || l != null && l.includes("Q") || r === "Q" && (l != null && l.includes("Q")));
9
- }).map(([p, l]) => {
10
- var A, R, u, a, t, s, i, c, f, m, v, D, T, S, Q, N, H;
11
- let O = !1, L = !1, z = !1;
12
- const U = l.displayName ?? p, Z = (A = l.type) == null ? void 0 : A.slice(-1), E = l.maxLength, C = l.minLength, k = l.max, _ = l.min, F = l.regex;
13
- let o = l.type ?? "", j;
7
+ const r = (O = h.scope) == null ? void 0 : O.split(",").map((Y) => Y.trim());
8
+ return !!(!r || a === "P" && (r != null && r.includes("P")) || r != null && r.includes("Q") || a === "Q" && (r != null && r.includes("Q")));
9
+ }).map(([h, r]) => {
10
+ var H, z, u, i, n, c, s, o, l, y, D, x, T, S, N, I, A;
11
+ let O = !1, Y = !1, W = !1;
12
+ const R = r.displayName ?? h, Z = (H = r.type) == null ? void 0 : H.slice(-1), V = r.maxLength, B = r.minLength, _ = r.max, j = r.min, F = r.regex;
13
+ let m = r.type ?? "", L;
14
14
  switch (Z) {
15
15
  case "*":
16
- L = !0, O = !0, o = o == null ? void 0 : o.split("*")[0];
16
+ Y = !0, O = !0, m = m == null ? void 0 : m.split("*")[0];
17
17
  break;
18
18
  case "?":
19
- o = o == null ? void 0 : o.split("?")[0], O = !0;
19
+ m = m == null ? void 0 : m.split("?")[0], O = !0;
20
20
  break;
21
21
  case "+":
22
- L = !0, o = o == null ? void 0 : o.split("+")[0];
22
+ Y = !0, m = m == null ? void 0 : m.split("+")[0];
23
23
  break;
24
24
  case "!":
25
- o = o == null ? void 0 : o.split("!")[0];
25
+ m = m == null ? void 0 : m.split("!")[0];
26
26
  break;
27
27
  }
28
- switch (o) {
28
+ switch (m) {
29
29
  case "string":
30
- o = "string";
30
+ m = "string";
31
31
  break;
32
32
  case "int":
33
33
  case "long":
34
- o = "integer";
34
+ m = "integer";
35
35
  break;
36
36
  case "decimal":
37
- o = "number";
37
+ m = "number";
38
38
  break;
39
39
  case "dateTime":
40
40
  case "datetime":
41
- o = "string", j = "date-time";
41
+ m = "string", L = "date-time";
42
42
  break;
43
43
  case "date":
44
- o = "string", j = "date";
44
+ m = "string", L = "date";
45
45
  break;
46
46
  case "boolean":
47
47
  case "bool":
48
- o = "boolean";
48
+ m = "boolean";
49
49
  break;
50
50
  default:
51
- z = !0;
51
+ W = !0;
52
52
  break;
53
53
  }
54
- if (!O && !z && !L && V.push(p), z) {
55
- const x = $ == null ? void 0 : $[o];
56
- if (x) {
57
- let M = L ? [] : {};
58
- const I = X({
59
- data: x.data ?? {},
60
- scope: r,
61
- dataTypes: $,
62
- rootDisplayName: x.displayName ?? p
54
+ if (!O && !W && !Y && M.push(h), W) {
55
+ const k = f == null ? void 0 : f[m];
56
+ if (k) {
57
+ let w = Y ? [] : {};
58
+ const Q = q({
59
+ data: k.data ?? {},
60
+ scope: a,
61
+ dataTypes: f,
62
+ rootDisplayName: k.displayName ?? h
63
63
  });
64
- return w && (u = (R = w.element) == null ? void 0 : R.data) != null && u[p] && (M = (t = (a = w.element) == null ? void 0 : a.data) == null ? void 0 : t[p]), h && (s = h == null ? void 0 : h.data) != null && s[p] && (M = (i = h == null ? void 0 : h.data) == null ? void 0 : i[p]), g && (c = g == null ? void 0 : g.data) != null && c[p] && (M = (f = g == null ? void 0 : g.data) == null ? void 0 : f[p]), P = {
64
+ return g && (u = (z = g.element) == null ? void 0 : z.data) != null && u[h] && (w = (n = (i = g.element) == null ? void 0 : i.data) == null ? void 0 : n[h]), p && (c = p == null ? void 0 : p.data) != null && c[h] && (w = (s = p == null ? void 0 : p.data) == null ? void 0 : s[h]), d && (o = d == null ? void 0 : d.data) != null && o[h] && (w = (l = d == null ? void 0 : d.data) == null ? void 0 : l[h]), P = {
65
65
  ...P,
66
- [`${o}`]: I
67
- }, L ? [
68
- p,
66
+ [`${m}`]: Q
67
+ }, Y ? [
68
+ h,
69
69
  {
70
- title: x.displayName ?? p,
70
+ title: k.displayName ?? h,
71
71
  type: "array",
72
- default: M,
72
+ default: w,
73
73
  items: {
74
- $ref: `#/definitions/${o}`
74
+ $ref: `#/definitions/${m}`
75
75
  },
76
76
  ...!O && { minItems: 1 }
77
77
  }
78
78
  ] : [
79
- p,
79
+ h,
80
80
  {
81
- title: x.displayName ?? p,
82
- default: M,
83
- $ref: `#/definitions/${o}`
81
+ title: k.displayName ?? h,
82
+ default: w,
83
+ $ref: `#/definitions/${m}`
84
84
  }
85
85
  ];
86
86
  }
87
87
  }
88
- let y = "";
89
- if (g) {
90
- const x = (g == null ? void 0 : g.state) === "validated" ? p.charAt(0).toLowerCase() + p.slice(1) : p;
91
- y = (m = g == null ? void 0 : g.data) != null && m[x] ? (v = g == null ? void 0 : g.data) == null ? void 0 : v[x] : o === "boolean" ? !!l.defaultValue : l.defaultValue;
88
+ let v = "";
89
+ if (d) {
90
+ const k = (d == null ? void 0 : d.state) === "validated" ? h.charAt(0).toLowerCase() + h.slice(1) : h;
91
+ v = (y = d == null ? void 0 : d.data) != null && y[k] ? (D = d == null ? void 0 : d.data) == null ? void 0 : D[k] : m === "boolean" ? !!r.defaultValue : r.defaultValue;
92
92
  }
93
- return w && (y = (T = (D = w.element) == null ? void 0 : D.data) != null && T[p] ? (Q = (S = w.element) == null ? void 0 : S.data) == null ? void 0 : Q[p] : o === "boolean" ? !!l.defaultValue : l.defaultValue), h && (y = (N = h == null ? void 0 : h.data) != null && N[p] ? (H = h == null ? void 0 : h.data) == null ? void 0 : H[p] : o === "boolean" ? !!l.defaultValue : l.defaultValue), L ? [
94
- p,
93
+ return g && (v = (T = (x = g.element) == null ? void 0 : x.data) != null && T[h] ? (N = (S = g.element) == null ? void 0 : S.data) == null ? void 0 : N[h] : m === "boolean" ? !!r.defaultValue : r.defaultValue), p && (v = (I = p == null ? void 0 : p.data) != null && I[h] ? (A = p == null ? void 0 : p.data) == null ? void 0 : A[h] : m === "boolean" ? !!r.defaultValue : r.defaultValue), Y ? [
94
+ h,
95
95
  {
96
- title: U,
96
+ title: R,
97
97
  type: "array",
98
- default: y,
98
+ default: v,
99
99
  items: {
100
- type: o,
101
- ...E && { maxLength: E },
102
- ...C && { minLength: C },
103
- ..._ && { min: _ },
104
- ...k && { max: k },
105
- ...j && { format: j },
106
- ...F && { pattern: l.regex }
100
+ type: m,
101
+ ...V && { maxLength: V },
102
+ ...B && { minLength: B },
103
+ ...j && { min: j },
104
+ ..._ && { max: _ },
105
+ ...L && { format: L },
106
+ ...F && { pattern: r.regex }
107
107
  },
108
108
  ...!O && { minItems: 1 }
109
109
  }
110
110
  ] : [
111
- p,
111
+ h,
112
112
  {
113
- title: U,
114
- type: o,
115
- ...y && { default: y },
116
- ...C && { minLength: C },
117
- ...E && { maxLength: E },
118
- ..._ && { minimum: parseInt(_) },
119
- ...k && { maximum: parseInt(k) },
120
- ...j && { format: j },
121
- ...l.options && { enum: l.options },
122
- ...F && { pattern: l.regex }
113
+ title: R,
114
+ type: m,
115
+ ...v && { default: v },
116
+ ...B && { minLength: B },
117
+ ...V && { maxLength: V },
118
+ ...j && { minimum: parseInt(j) },
119
+ ..._ && { maximum: parseInt(_) },
120
+ ...L && { format: L },
121
+ ...r.options && { enum: r.options },
122
+ ...F && { pattern: r.regex }
123
123
  }
124
124
  ];
125
125
  })
@@ -128,396 +128,464 @@ const X = (n) => {
128
128
  title: b,
129
129
  type: "object",
130
130
  definitions: P,
131
- required: V,
132
- properties: B
131
+ required: M,
132
+ properties: C
133
133
  };
134
- }, ae = (n) => {
135
- const e = n.autoValidate, r = n.delinquencyPlanName, $ = n.accountType, b = Object.keys(n).reduce(
136
- (w, h) => (h !== "accountType" && h !== "autoValidate" && h !== "delinquencyPlanName" && (w[h] = n[h]), w),
137
- {}
138
- );
139
- return {
140
- autoValidate: e,
141
- delinquencyPlanName: r,
142
- type: $,
143
- data: b
144
- };
145
- }, se = ({
146
- formData: n,
134
+ }, oe = ({
135
+ formData: t,
147
136
  locator: e
148
137
  }) => ({
149
138
  elements: [{
150
139
  locator: e,
151
- setData: n
140
+ setData: t
152
141
  }]
153
142
  });
154
- var q = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
155
- function ee(n) {
156
- return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
143
+ var ee = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
144
+ function te(t) {
145
+ return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
157
146
  }
158
147
  var K = { exports: {} };
159
- (function(n, e) {
160
- (function(r, $) {
161
- n.exports = $();
162
- })(q, function() {
163
- var r = 1e3, $ = 6e4, b = 36e5, g = "millisecond", w = "second", h = "minute", V = "hour", P = "day", B = "week", Y = "month", p = "quarter", l = "year", O = "date", L = "Invalid Date", z = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, U = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, Z = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(u) {
164
- var a = ["th", "st", "nd", "rd"], t = u % 100;
165
- return "[" + u + (a[(t - 20) % 10] || a[t] || a[0]) + "]";
166
- } }, E = function(u, a, t) {
167
- var s = String(u);
168
- return !s || s.length >= a ? u : "" + Array(a + 1 - s.length).join(t) + u;
169
- }, C = { s: E, z: function(u) {
170
- var a = -u.utcOffset(), t = Math.abs(a), s = Math.floor(t / 60), i = t % 60;
171
- return (a <= 0 ? "+" : "-") + E(s, 2, "0") + ":" + E(i, 2, "0");
172
- }, m: function u(a, t) {
173
- if (a.date() < t.date())
174
- return -u(t, a);
175
- var s = 12 * (t.year() - a.year()) + (t.month() - a.month()), i = a.clone().add(s, Y), c = t - i < 0, f = a.clone().add(s + (c ? -1 : 1), Y);
176
- return +(-(s + (t - i) / (c ? i - f : f - i)) || 0);
148
+ (function(t, e) {
149
+ (function(a, f) {
150
+ t.exports = f();
151
+ })(ee, function() {
152
+ var a = 1e3, f = 6e4, b = 36e5, d = "millisecond", g = "second", p = "minute", M = "hour", P = "day", C = "week", E = "month", h = "quarter", r = "year", O = "date", Y = "Invalid Date", W = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, R = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, Z = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(u) {
153
+ var i = ["th", "st", "nd", "rd"], n = u % 100;
154
+ return "[" + u + (i[(n - 20) % 10] || i[n] || i[0]) + "]";
155
+ } }, V = function(u, i, n) {
156
+ var c = String(u);
157
+ return !c || c.length >= i ? u : "" + Array(i + 1 - c.length).join(n) + u;
158
+ }, B = { s: V, z: function(u) {
159
+ var i = -u.utcOffset(), n = Math.abs(i), c = Math.floor(n / 60), s = n % 60;
160
+ return (i <= 0 ? "+" : "-") + V(c, 2, "0") + ":" + V(s, 2, "0");
161
+ }, m: function u(i, n) {
162
+ if (i.date() < n.date()) return -u(n, i);
163
+ var c = 12 * (n.year() - i.year()) + (n.month() - i.month()), s = i.clone().add(c, E), o = n - s < 0, l = i.clone().add(c + (o ? -1 : 1), E);
164
+ return +(-(c + (n - s) / (o ? s - l : l - s)) || 0);
177
165
  }, a: function(u) {
178
166
  return u < 0 ? Math.ceil(u) || 0 : Math.floor(u);
179
167
  }, p: function(u) {
180
- return { M: Y, y: l, w: B, d: P, D: O, h: V, m: h, s: w, ms: g, Q: p }[u] || String(u || "").toLowerCase().replace(/s$/, "");
168
+ return { M: E, y: r, w: C, d: P, D: O, h: M, m: p, s: g, ms: d, Q: h }[u] || String(u || "").toLowerCase().replace(/s$/, "");
181
169
  }, u: function(u) {
182
170
  return u === void 0;
183
- } }, k = "en", _ = {};
184
- _[k] = Z;
185
- var F = "$isDayjsObject", o = function(u) {
186
- return u instanceof A || !(!u || !u[F]);
187
- }, j = function u(a, t, s) {
188
- var i;
189
- if (!a)
190
- return k;
191
- if (typeof a == "string") {
192
- var c = a.toLowerCase();
193
- _[c] && (i = c), t && (_[c] = t, i = c);
194
- var f = a.split("-");
195
- if (!i && f.length > 1)
196
- return u(f[0]);
171
+ } }, _ = "en", j = {};
172
+ j[_] = Z;
173
+ var F = "$isDayjsObject", m = function(u) {
174
+ return u instanceof H || !(!u || !u[F]);
175
+ }, L = function u(i, n, c) {
176
+ var s;
177
+ if (!i) return _;
178
+ if (typeof i == "string") {
179
+ var o = i.toLowerCase();
180
+ j[o] && (s = o), n && (j[o] = n, s = o);
181
+ var l = i.split("-");
182
+ if (!s && l.length > 1) return u(l[0]);
197
183
  } else {
198
- var m = a.name;
199
- _[m] = a, i = m;
184
+ var y = i.name;
185
+ j[y] = i, s = y;
200
186
  }
201
- return !s && i && (k = i), i || !s && k;
202
- }, y = function(u, a) {
203
- if (o(u))
204
- return u.clone();
205
- var t = typeof a == "object" ? a : {};
206
- return t.date = u, t.args = arguments, new A(t);
207
- }, d = C;
208
- d.l = j, d.i = o, d.w = function(u, a) {
209
- return y(u, { locale: a.$L, utc: a.$u, x: a.$x, $offset: a.$offset });
187
+ return !c && s && (_ = s), s || !c && _;
188
+ }, v = function(u, i) {
189
+ if (m(u)) return u.clone();
190
+ var n = typeof i == "object" ? i : {};
191
+ return n.date = u, n.args = arguments, new H(n);
192
+ }, $ = B;
193
+ $.l = L, $.i = m, $.w = function(u, i) {
194
+ return v(u, { locale: i.$L, utc: i.$u, x: i.$x, $offset: i.$offset });
210
195
  };
211
- var A = function() {
212
- function u(t) {
213
- this.$L = j(t.locale, null, !0), this.parse(t), this.$x = this.$x || t.x || {}, this[F] = !0;
196
+ var H = function() {
197
+ function u(n) {
198
+ this.$L = L(n.locale, null, !0), this.parse(n), this.$x = this.$x || n.x || {}, this[F] = !0;
214
199
  }
215
- var a = u.prototype;
216
- return a.parse = function(t) {
217
- this.$d = function(s) {
218
- var i = s.date, c = s.utc;
219
- if (i === null)
220
- return /* @__PURE__ */ new Date(NaN);
221
- if (d.u(i))
222
- return /* @__PURE__ */ new Date();
223
- if (i instanceof Date)
224
- return new Date(i);
225
- if (typeof i == "string" && !/Z$/i.test(i)) {
226
- var f = i.match(z);
227
- if (f) {
228
- var m = f[2] - 1 || 0, v = (f[7] || "0").substring(0, 3);
229
- return c ? new Date(Date.UTC(f[1], m, f[3] || 1, f[4] || 0, f[5] || 0, f[6] || 0, v)) : new Date(f[1], m, f[3] || 1, f[4] || 0, f[5] || 0, f[6] || 0, v);
200
+ var i = u.prototype;
201
+ return i.parse = function(n) {
202
+ this.$d = function(c) {
203
+ var s = c.date, o = c.utc;
204
+ if (s === null) return /* @__PURE__ */ new Date(NaN);
205
+ if ($.u(s)) return /* @__PURE__ */ new Date();
206
+ if (s instanceof Date) return new Date(s);
207
+ if (typeof s == "string" && !/Z$/i.test(s)) {
208
+ var l = s.match(W);
209
+ if (l) {
210
+ var y = l[2] - 1 || 0, D = (l[7] || "0").substring(0, 3);
211
+ return o ? new Date(Date.UTC(l[1], y, l[3] || 1, l[4] || 0, l[5] || 0, l[6] || 0, D)) : new Date(l[1], y, l[3] || 1, l[4] || 0, l[5] || 0, l[6] || 0, D);
230
212
  }
231
213
  }
232
- return new Date(i);
233
- }(t), this.init();
234
- }, a.init = function() {
235
- var t = this.$d;
236
- this.$y = t.getFullYear(), this.$M = t.getMonth(), this.$D = t.getDate(), this.$W = t.getDay(), this.$H = t.getHours(), this.$m = t.getMinutes(), this.$s = t.getSeconds(), this.$ms = t.getMilliseconds();
237
- }, a.$utils = function() {
238
- return d;
239
- }, a.isValid = function() {
240
- return this.$d.toString() !== L;
241
- }, a.isSame = function(t, s) {
242
- var i = y(t);
243
- return this.startOf(s) <= i && i <= this.endOf(s);
244
- }, a.isAfter = function(t, s) {
245
- return y(t) < this.startOf(s);
246
- }, a.isBefore = function(t, s) {
247
- return this.endOf(s) < y(t);
248
- }, a.$g = function(t, s, i) {
249
- return d.u(t) ? this[s] : this.set(i, t);
250
- }, a.unix = function() {
214
+ return new Date(s);
215
+ }(n), this.init();
216
+ }, i.init = function() {
217
+ var n = this.$d;
218
+ this.$y = n.getFullYear(), this.$M = n.getMonth(), this.$D = n.getDate(), this.$W = n.getDay(), this.$H = n.getHours(), this.$m = n.getMinutes(), this.$s = n.getSeconds(), this.$ms = n.getMilliseconds();
219
+ }, i.$utils = function() {
220
+ return $;
221
+ }, i.isValid = function() {
222
+ return this.$d.toString() !== Y;
223
+ }, i.isSame = function(n, c) {
224
+ var s = v(n);
225
+ return this.startOf(c) <= s && s <= this.endOf(c);
226
+ }, i.isAfter = function(n, c) {
227
+ return v(n) < this.startOf(c);
228
+ }, i.isBefore = function(n, c) {
229
+ return this.endOf(c) < v(n);
230
+ }, i.$g = function(n, c, s) {
231
+ return $.u(n) ? this[c] : this.set(s, n);
232
+ }, i.unix = function() {
251
233
  return Math.floor(this.valueOf() / 1e3);
252
- }, a.valueOf = function() {
234
+ }, i.valueOf = function() {
253
235
  return this.$d.getTime();
254
- }, a.startOf = function(t, s) {
255
- var i = this, c = !!d.u(s) || s, f = d.p(t), m = function(x, M) {
256
- var I = d.w(i.$u ? Date.UTC(i.$y, M, x) : new Date(i.$y, M, x), i);
257
- return c ? I : I.endOf(P);
258
- }, v = function(x, M) {
259
- return d.w(i.toDate()[x].apply(i.toDate("s"), (c ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(M)), i);
260
- }, D = this.$W, T = this.$M, S = this.$D, Q = "set" + (this.$u ? "UTC" : "");
261
- switch (f) {
262
- case l:
263
- return c ? m(1, 0) : m(31, 11);
264
- case Y:
265
- return c ? m(1, T) : m(0, T + 1);
266
- case B:
267
- var N = this.$locale().weekStart || 0, H = (D < N ? D + 7 : D) - N;
268
- return m(c ? S - H : S + (6 - H), T);
236
+ }, i.startOf = function(n, c) {
237
+ var s = this, o = !!$.u(c) || c, l = $.p(n), y = function(k, w) {
238
+ var Q = $.w(s.$u ? Date.UTC(s.$y, w, k) : new Date(s.$y, w, k), s);
239
+ return o ? Q : Q.endOf(P);
240
+ }, D = function(k, w) {
241
+ return $.w(s.toDate()[k].apply(s.toDate("s"), (o ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(w)), s);
242
+ }, x = this.$W, T = this.$M, S = this.$D, N = "set" + (this.$u ? "UTC" : "");
243
+ switch (l) {
244
+ case r:
245
+ return o ? y(1, 0) : y(31, 11);
246
+ case E:
247
+ return o ? y(1, T) : y(0, T + 1);
248
+ case C:
249
+ var I = this.$locale().weekStart || 0, A = (x < I ? x + 7 : x) - I;
250
+ return y(o ? S - A : S + (6 - A), T);
269
251
  case P:
270
252
  case O:
271
- return v(Q + "Hours", 0);
272
- case V:
273
- return v(Q + "Minutes", 1);
274
- case h:
275
- return v(Q + "Seconds", 2);
276
- case w:
277
- return v(Q + "Milliseconds", 3);
253
+ return D(N + "Hours", 0);
254
+ case M:
255
+ return D(N + "Minutes", 1);
256
+ case p:
257
+ return D(N + "Seconds", 2);
258
+ case g:
259
+ return D(N + "Milliseconds", 3);
278
260
  default:
279
261
  return this.clone();
280
262
  }
281
- }, a.endOf = function(t) {
282
- return this.startOf(t, !1);
283
- }, a.$set = function(t, s) {
284
- var i, c = d.p(t), f = "set" + (this.$u ? "UTC" : ""), m = (i = {}, i[P] = f + "Date", i[O] = f + "Date", i[Y] = f + "Month", i[l] = f + "FullYear", i[V] = f + "Hours", i[h] = f + "Minutes", i[w] = f + "Seconds", i[g] = f + "Milliseconds", i)[c], v = c === P ? this.$D + (s - this.$W) : s;
285
- if (c === Y || c === l) {
286
- var D = this.clone().set(O, 1);
287
- D.$d[m](v), D.init(), this.$d = D.set(O, Math.min(this.$D, D.daysInMonth())).$d;
288
- } else
289
- m && this.$d[m](v);
263
+ }, i.endOf = function(n) {
264
+ return this.startOf(n, !1);
265
+ }, i.$set = function(n, c) {
266
+ var s, o = $.p(n), l = "set" + (this.$u ? "UTC" : ""), y = (s = {}, s[P] = l + "Date", s[O] = l + "Date", s[E] = l + "Month", s[r] = l + "FullYear", s[M] = l + "Hours", s[p] = l + "Minutes", s[g] = l + "Seconds", s[d] = l + "Milliseconds", s)[o], D = o === P ? this.$D + (c - this.$W) : c;
267
+ if (o === E || o === r) {
268
+ var x = this.clone().set(O, 1);
269
+ x.$d[y](D), x.init(), this.$d = x.set(O, Math.min(this.$D, x.daysInMonth())).$d;
270
+ } else y && this.$d[y](D);
290
271
  return this.init(), this;
291
- }, a.set = function(t, s) {
292
- return this.clone().$set(t, s);
293
- }, a.get = function(t) {
294
- return this[d.p(t)]();
295
- }, a.add = function(t, s) {
296
- var i, c = this;
297
- t = Number(t);
298
- var f = d.p(s), m = function(T) {
299
- var S = y(c);
300
- return d.w(S.date(S.date() + Math.round(T * t)), c);
272
+ }, i.set = function(n, c) {
273
+ return this.clone().$set(n, c);
274
+ }, i.get = function(n) {
275
+ return this[$.p(n)]();
276
+ }, i.add = function(n, c) {
277
+ var s, o = this;
278
+ n = Number(n);
279
+ var l = $.p(c), y = function(T) {
280
+ var S = v(o);
281
+ return $.w(S.date(S.date() + Math.round(T * n)), o);
301
282
  };
302
- if (f === Y)
303
- return this.set(Y, this.$M + t);
304
- if (f === l)
305
- return this.set(l, this.$y + t);
306
- if (f === P)
307
- return m(1);
308
- if (f === B)
309
- return m(7);
310
- var v = (i = {}, i[h] = $, i[V] = b, i[w] = r, i)[f] || 1, D = this.$d.getTime() + t * v;
311
- return d.w(D, this);
312
- }, a.subtract = function(t, s) {
313
- return this.add(-1 * t, s);
314
- }, a.format = function(t) {
315
- var s = this, i = this.$locale();
316
- if (!this.isValid())
317
- return i.invalidDate || L;
318
- var c = t || "YYYY-MM-DDTHH:mm:ssZ", f = d.z(this), m = this.$H, v = this.$m, D = this.$M, T = i.weekdays, S = i.months, Q = i.meridiem, N = function(M, I, J, G) {
319
- return M && (M[I] || M(s, c)) || J[I].slice(0, G);
320
- }, H = function(M) {
321
- return d.s(m % 12 || 12, M, "0");
322
- }, x = Q || function(M, I, J) {
323
- var G = M < 12 ? "AM" : "PM";
324
- return J ? G.toLowerCase() : G;
283
+ if (l === E) return this.set(E, this.$M + n);
284
+ if (l === r) return this.set(r, this.$y + n);
285
+ if (l === P) return y(1);
286
+ if (l === C) return y(7);
287
+ var D = (s = {}, s[p] = f, s[M] = b, s[g] = a, s)[l] || 1, x = this.$d.getTime() + n * D;
288
+ return $.w(x, this);
289
+ }, i.subtract = function(n, c) {
290
+ return this.add(-1 * n, c);
291
+ }, i.format = function(n) {
292
+ var c = this, s = this.$locale();
293
+ if (!this.isValid()) return s.invalidDate || Y;
294
+ var o = n || "YYYY-MM-DDTHH:mm:ssZ", l = $.z(this), y = this.$H, D = this.$m, x = this.$M, T = s.weekdays, S = s.months, N = s.meridiem, I = function(w, Q, J, U) {
295
+ return w && (w[Q] || w(c, o)) || J[Q].slice(0, U);
296
+ }, A = function(w) {
297
+ return $.s(y % 12 || 12, w, "0");
298
+ }, k = N || function(w, Q, J) {
299
+ var U = w < 12 ? "AM" : "PM";
300
+ return J ? U.toLowerCase() : U;
325
301
  };
326
- return c.replace(U, function(M, I) {
327
- return I || function(J) {
302
+ return o.replace(R, function(w, Q) {
303
+ return Q || function(J) {
328
304
  switch (J) {
329
305
  case "YY":
330
- return String(s.$y).slice(-2);
306
+ return String(c.$y).slice(-2);
331
307
  case "YYYY":
332
- return d.s(s.$y, 4, "0");
308
+ return $.s(c.$y, 4, "0");
333
309
  case "M":
334
- return D + 1;
310
+ return x + 1;
335
311
  case "MM":
336
- return d.s(D + 1, 2, "0");
312
+ return $.s(x + 1, 2, "0");
337
313
  case "MMM":
338
- return N(i.monthsShort, D, S, 3);
314
+ return I(s.monthsShort, x, S, 3);
339
315
  case "MMMM":
340
- return N(S, D);
316
+ return I(S, x);
341
317
  case "D":
342
- return s.$D;
318
+ return c.$D;
343
319
  case "DD":
344
- return d.s(s.$D, 2, "0");
320
+ return $.s(c.$D, 2, "0");
345
321
  case "d":
346
- return String(s.$W);
322
+ return String(c.$W);
347
323
  case "dd":
348
- return N(i.weekdaysMin, s.$W, T, 2);
324
+ return I(s.weekdaysMin, c.$W, T, 2);
349
325
  case "ddd":
350
- return N(i.weekdaysShort, s.$W, T, 3);
326
+ return I(s.weekdaysShort, c.$W, T, 3);
351
327
  case "dddd":
352
- return T[s.$W];
328
+ return T[c.$W];
353
329
  case "H":
354
- return String(m);
330
+ return String(y);
355
331
  case "HH":
356
- return d.s(m, 2, "0");
332
+ return $.s(y, 2, "0");
357
333
  case "h":
358
- return H(1);
334
+ return A(1);
359
335
  case "hh":
360
- return H(2);
336
+ return A(2);
361
337
  case "a":
362
- return x(m, v, !0);
338
+ return k(y, D, !0);
363
339
  case "A":
364
- return x(m, v, !1);
340
+ return k(y, D, !1);
365
341
  case "m":
366
- return String(v);
342
+ return String(D);
367
343
  case "mm":
368
- return d.s(v, 2, "0");
344
+ return $.s(D, 2, "0");
369
345
  case "s":
370
- return String(s.$s);
346
+ return String(c.$s);
371
347
  case "ss":
372
- return d.s(s.$s, 2, "0");
348
+ return $.s(c.$s, 2, "0");
373
349
  case "SSS":
374
- return d.s(s.$ms, 3, "0");
350
+ return $.s(c.$ms, 3, "0");
375
351
  case "Z":
376
- return f;
352
+ return l;
377
353
  }
378
354
  return null;
379
- }(M) || f.replace(":", "");
355
+ }(w) || l.replace(":", "");
380
356
  });
381
- }, a.utcOffset = function() {
357
+ }, i.utcOffset = function() {
382
358
  return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
383
- }, a.diff = function(t, s, i) {
384
- var c, f = this, m = d.p(s), v = y(t), D = (v.utcOffset() - this.utcOffset()) * $, T = this - v, S = function() {
385
- return d.m(f, v);
359
+ }, i.diff = function(n, c, s) {
360
+ var o, l = this, y = $.p(c), D = v(n), x = (D.utcOffset() - this.utcOffset()) * f, T = this - D, S = function() {
361
+ return $.m(l, D);
386
362
  };
387
- switch (m) {
388
- case l:
389
- c = S() / 12;
363
+ switch (y) {
364
+ case r:
365
+ o = S() / 12;
390
366
  break;
391
- case Y:
392
- c = S();
367
+ case E:
368
+ o = S();
393
369
  break;
394
- case p:
395
- c = S() / 3;
370
+ case h:
371
+ o = S() / 3;
396
372
  break;
397
- case B:
398
- c = (T - D) / 6048e5;
373
+ case C:
374
+ o = (T - x) / 6048e5;
399
375
  break;
400
376
  case P:
401
- c = (T - D) / 864e5;
377
+ o = (T - x) / 864e5;
402
378
  break;
403
- case V:
404
- c = T / b;
379
+ case M:
380
+ o = T / b;
405
381
  break;
406
- case h:
407
- c = T / $;
382
+ case p:
383
+ o = T / f;
408
384
  break;
409
- case w:
410
- c = T / r;
385
+ case g:
386
+ o = T / a;
411
387
  break;
412
388
  default:
413
- c = T;
389
+ o = T;
414
390
  }
415
- return i ? c : d.a(c);
416
- }, a.daysInMonth = function() {
417
- return this.endOf(Y).$D;
418
- }, a.$locale = function() {
419
- return _[this.$L];
420
- }, a.locale = function(t, s) {
421
- if (!t)
422
- return this.$L;
423
- var i = this.clone(), c = j(t, s, !0);
424
- return c && (i.$L = c), i;
425
- }, a.clone = function() {
426
- return d.w(this.$d, this);
427
- }, a.toDate = function() {
391
+ return s ? o : $.a(o);
392
+ }, i.daysInMonth = function() {
393
+ return this.endOf(E).$D;
394
+ }, i.$locale = function() {
395
+ return j[this.$L];
396
+ }, i.locale = function(n, c) {
397
+ if (!n) return this.$L;
398
+ var s = this.clone(), o = L(n, c, !0);
399
+ return o && (s.$L = o), s;
400
+ }, i.clone = function() {
401
+ return $.w(this.$d, this);
402
+ }, i.toDate = function() {
428
403
  return new Date(this.valueOf());
429
- }, a.toJSON = function() {
404
+ }, i.toJSON = function() {
430
405
  return this.isValid() ? this.toISOString() : null;
431
- }, a.toISOString = function() {
406
+ }, i.toISOString = function() {
432
407
  return this.$d.toISOString();
433
- }, a.toString = function() {
408
+ }, i.toString = function() {
434
409
  return this.$d.toUTCString();
435
410
  }, u;
436
- }(), R = A.prototype;
437
- return y.prototype = R, [["$ms", g], ["$s", w], ["$m", h], ["$H", V], ["$W", P], ["$M", Y], ["$y", l], ["$D", O]].forEach(function(u) {
438
- R[u[1]] = function(a) {
439
- return this.$g(a, u[0], u[1]);
411
+ }(), z = H.prototype;
412
+ return v.prototype = z, [["$ms", d], ["$s", g], ["$m", p], ["$H", M], ["$W", P], ["$M", E], ["$y", r], ["$D", O]].forEach(function(u) {
413
+ z[u[1]] = function(i) {
414
+ return this.$g(i, u[0], u[1]);
440
415
  };
441
- }), y.extend = function(u, a) {
442
- return u.$i || (u(a, A, y), u.$i = !0), y;
443
- }, y.locale = j, y.isDayjs = o, y.unix = function(u) {
444
- return y(1e3 * u);
445
- }, y.en = _[k], y.Ls = _, y.p = {}, y;
416
+ }), v.extend = function(u, i) {
417
+ return u.$i || (u(i, H, v), u.$i = !0), v;
418
+ }, v.locale = L, v.isDayjs = m, v.unix = function(u) {
419
+ return v(1e3 * u);
420
+ }, v.en = j[_], v.Ls = j, v.p = {}, v;
446
421
  });
447
422
  })(K);
448
- var te = K.exports;
449
- const W = /* @__PURE__ */ ee(te), re = ({ data: n }) => {
450
- const e = {}, r = { ...n };
451
- return r.default && (r.default.startTime && (e.startTime = W(r.default.startTime).format()), r.default.endTime && (e.endTime = W(r.default.endTime).format()), r.default.expirationTime && (e.expirationTime = W(r.default.expirationTime).format())), r.advanced && (r.advanced.currency && (e.currency = r.advanced.currency), r.advanced.timezone && (e.timezone = r.advanced.timezone), r.advanced.billingPlan && (e.billingPlan = r.advanced.billingPlan), r.advanced.defaultTermDuration && (e.defaultTermDuration = r.advanced.defaultTermDuration), r.advanced.installmentPlan && (e.installmentPlan = r.advanced.installmentPlan), r.advanced.durationBasis && (e.durationBasis = r.advanced.durationBasis), r.advanced.delinquencyPlanName && (e.delinquencyPlanName = r.advanced.delinquencyPlanName)), delete r.default, delete r.advanced, e.setData = r, e;
452
- }, ne = (n) => {
453
- const e = /^(.*?)(Quote|QuickQuote|Policy)$/, r = n.match(e);
454
- return r && (r[2] === "Quote" || r[2] === "QuickQuote" || r[2] === "Policy") ? [r[1], r[2]] : [n, null];
423
+ var ne = K.exports;
424
+ const G = /* @__PURE__ */ te(ne), le = ({ data: t }) => {
425
+ const e = {}, a = { ...t };
426
+ return a.default && (a.default.startTime && (e.startTime = G(a.default.startTime).format()), a.default.endTime && (e.endTime = G(a.default.endTime).format()), a.default.expirationTime && (e.expirationTime = G(a.default.expirationTime).format())), a.advanced && (a.advanced.currency && (e.currency = a.advanced.currency), a.advanced.timezone && (e.timezone = a.advanced.timezone), a.advanced.billingPlan && (e.billingPlan = a.advanced.billingPlan), a.advanced.defaultTermDuration && (e.defaultTermDuration = a.advanced.defaultTermDuration), a.advanced.installmentPlan && (e.installmentPlan = a.advanced.installmentPlan), a.advanced.durationBasis && (e.durationBasis = a.advanced.durationBasis), a.advanced.delinquencyPlanName && (e.delinquencyPlanName = a.advanced.delinquencyPlanName)), delete a.default, delete a.advanced, e.setData = a, e;
427
+ }, se = (t) => {
428
+ const e = /^(.*?)(Quote|QuickQuote|Policy)$/, a = t.match(e);
429
+ return a && (a[2] === "Quote" || a[2] === "QuickQuote" || a[2] === "Policy") ? [a[1], a[2]] : [t, null];
455
430
  };
456
- function ie(n, e) {
457
- if (n.locator === e)
458
- return n;
459
- if (n.elements)
460
- for (const r of n.elements) {
461
- const $ = ie(r, e);
462
- if ($)
463
- return $;
431
+ function ie(t, e) {
432
+ if (t.locator === e)
433
+ return t;
434
+ if (t.elements)
435
+ for (const a of t.elements) {
436
+ const f = ie(a, e);
437
+ if (f)
438
+ return f;
464
439
  }
465
440
  }
466
- function ue(n, e) {
467
- const [r] = ne(
468
- n.type ?? ""
441
+ function fe(t, e) {
442
+ const [a] = se(
443
+ t.type ?? ""
469
444
  );
470
- let $ = {};
445
+ let f = {};
471
446
  return e.exposures && Object.keys(e.exposures).forEach((b) => {
472
- b === r && e.exposures && ($ = e.exposures[b]);
447
+ b === a && e.exposures && (f = e.exposures[b]);
473
448
  }), e.coverages && Object.keys(e.coverages).forEach((b) => {
474
- b === r && e.coverages && ($ = e.coverages[b]);
449
+ b === a && e.coverages && (f = e.coverages[b]);
475
450
  }), e.policyLines && Object.keys(e.policyLines).forEach((b) => {
476
- b === r && e.policyLines && ($ = e.policyLines[b]);
451
+ b === a && e.policyLines && (f = e.policyLines[b]);
477
452
  }), e.exposureGroups && Object.keys(e.exposureGroups).forEach((b) => {
478
- b === r && e.exposureGroups && ($ = e.exposureGroups[b]);
479
- }), $;
453
+ b === a && e.exposureGroups && (f = e.exposureGroups[b]);
454
+ }), f;
480
455
  }
481
- function ce(n) {
482
- return n == null ? void 0 : n.map((e) => (e.keyword === "pattern" && (e.message = `Invalid format, must match pattern ${e.params.pattern}`), e.keyword === "format" && (e.message = "Invalid format"), e.keyword === "required" && (e.message = "Required"), e.keyword === "minItems" && (e.message = `Must have at least ${e.params.limit} item${e.params.limit !== 1 ? "s" : ""}`), e.keyword === "maxItems" && (e.message = `Must have at most ${e.params.limit} item${e.params.limit !== 1 ? "s" : ""}`), e.keyword === "type" && (e.message = "Invalid format"), e.keyword === "maxLength" && (e.message = `Must be at most ${e.params.limit} character${e.params.limit !== 1 ? "s" : ""}`), e.keyword === "minLength" && (e.message = `Must be at least ${e.params.limit} character${e.params.limit !== 1 ? "s" : ""}`), e.keyword === "minimum" && (e.message = `Must be greater than or equal to ${e.params.limit}`), e.keyword === "maximum" && (e.message = `Must be less than or equal to ${e.params.limit}`), e.keyword === "enum" && (e.message = "Invalid value"), e));
456
+ function de(t) {
457
+ return t == null ? void 0 : t.map((e) => (e.keyword === "pattern" && (e.message = `Invalid format, must match pattern ${e.params.pattern}`), e.keyword === "format" && (e.message = "Invalid format"), e.keyword === "required" && (e.message = "Required"), e.keyword === "minItems" && (e.message = `Must have at least ${e.params.limit} item${e.params.limit !== 1 ? "s" : ""}`), e.keyword === "maxItems" && (e.message = `Must have at most ${e.params.limit} item${e.params.limit !== 1 ? "s" : ""}`), e.keyword === "type" && (e.message = "Invalid format"), e.keyword === "maxLength" && (e.message = `Must be at most ${e.params.limit} character${e.params.limit !== 1 ? "s" : ""}`), e.keyword === "minLength" && (e.message = `Must be at least ${e.params.limit} character${e.params.limit !== 1 ? "s" : ""}`), e.keyword === "minimum" && (e.message = `Must be greater than or equal to ${e.params.limit}`), e.keyword === "maximum" && (e.message = `Must be less than or equal to ${e.params.limit}`), e.keyword === "enum" && (e.message = "Invalid value"), e));
483
458
  }
484
- const fe = (n) => {
485
- var e, r, $, b, g, w;
459
+ const me = (t) => {
460
+ var e, a, f, b, d, g;
486
461
  return {
487
- ...((e = n == null ? void 0 : n.element) == null ? void 0 : e.data) && {
488
- ...(r = n == null ? void 0 : n.element) == null ? void 0 : r.data
462
+ ...((e = t == null ? void 0 : t.element) == null ? void 0 : e.data) && {
463
+ ...(a = t == null ? void 0 : t.element) == null ? void 0 : a.data
489
464
  },
490
465
  default: {
491
466
  // set date to yyyy-MM-dd format if it exists
492
- ...(n == null ? void 0 : n.startTime) && {
493
- startTime: W(n.startTime).format("YYYY-MM-DD")
467
+ ...(t == null ? void 0 : t.startTime) && {
468
+ startTime: G(t.startTime).format("YYYY-MM-DD")
494
469
  },
495
- ...(n == null ? void 0 : n.endTime) && {
496
- endTime: W(n.endTime).format("YYYY-MM-DD")
470
+ ...(t == null ? void 0 : t.endTime) && {
471
+ endTime: G(t.endTime).format("YYYY-MM-DD")
497
472
  },
498
- ...(n == null ? void 0 : n.expirationTime) && {
499
- expirationTime: W(n.expirationTime).format("YYYY-MM-DD")
473
+ ...(t == null ? void 0 : t.expirationTime) && {
474
+ expirationTime: G(t.expirationTime).format("YYYY-MM-DD")
500
475
  }
501
476
  },
502
477
  advanced: {
503
- currency: (n == null ? void 0 : n.currency) ?? void 0,
504
- timezone: (n == null ? void 0 : n.timezone) ?? void 0,
505
- billingPlan: ((b = ($ = n == null ? void 0 : n.preferences) == null ? void 0 : $.billingPreferences) == null ? void 0 : b.billingPlanName) ?? void 0,
506
- installmentPlan: ((w = (g = n == null ? void 0 : n.preferences) == null ? void 0 : g.installmentPreferences) == null ? void 0 : w.installmentPlanName) ?? void 0,
507
- durationBasis: (n == null ? void 0 : n.durationBasis) ?? void 0,
508
- delinquencyPlanName: (n == null ? void 0 : n.delinquencyPlanName) ?? void 0
478
+ currency: (t == null ? void 0 : t.currency) ?? void 0,
479
+ timezone: (t == null ? void 0 : t.timezone) ?? void 0,
480
+ billingPlan: ((b = (f = t == null ? void 0 : t.preferences) == null ? void 0 : f.billingPreferences) == null ? void 0 : b.billingPlanName) ?? void 0,
481
+ installmentPlan: ((g = (d = t == null ? void 0 : t.preferences) == null ? void 0 : d.installmentPreferences) == null ? void 0 : g.installmentPlanName) ?? void 0,
482
+ durationBasis: (t == null ? void 0 : t.durationBasis) ?? void 0,
483
+ delinquencyPlanName: (t == null ? void 0 : t.delinquencyPlanName) ?? void 0
509
484
  }
510
485
  };
486
+ }, he = (t) => ({
487
+ ...t.data,
488
+ coverageTerms: t.coverageTerms ?? {}
489
+ }), X = (t, e) => {
490
+ for (const a of t) {
491
+ if (a.locator === e)
492
+ return a;
493
+ const f = X(
494
+ a.elements ?? [],
495
+ e
496
+ );
497
+ if (f)
498
+ return f;
499
+ }
500
+ return !1;
501
+ }, ae = (t, e) => {
502
+ var a, f;
503
+ return ((a = t.element) == null ? void 0 : a.locator) === e ? t.element : X(
504
+ ((f = t.element) == null ? void 0 : f.elements) ?? [],
505
+ e
506
+ );
507
+ }, re = ({
508
+ dataModel: t,
509
+ element: { productName: e }
510
+ }) => t.products[e] ?? {}, ce = (t) => {
511
+ var f;
512
+ t = t ?? "";
513
+ const e = t.replace(/\?|\*|!|\+/g, ""), a = (f = t.match(/\?|\*|!|\+/g)) == null ? void 0 : f.pop();
514
+ return {
515
+ name: e,
516
+ quantifier: a ?? ""
517
+ };
518
+ }, ue = ({
519
+ dataModel: t,
520
+ productDataModel: e
521
+ }) => {
522
+ const a = t.exposures ?? {}, f = t.coverages ?? {}, b = t.policyLines ?? {}, d = t.exposureGroups ?? {}, p = (e.contents ?? []).map((r) => {
523
+ const { name: O } = ce(r);
524
+ return O;
525
+ }), M = Object.keys(a).filter(
526
+ (r) => p.includes(r)
527
+ ), P = Object.keys(f).filter(
528
+ (r) => p.includes(r)
529
+ ), C = Object.keys(b).filter(
530
+ (r) => p.includes(r)
531
+ ), E = Object.keys(
532
+ d
533
+ ).filter((r) => p.includes(r)), h = {
534
+ coverages: {},
535
+ exposures: {},
536
+ policyLines: {},
537
+ exposureGroups: {}
538
+ };
539
+ for (const r of M)
540
+ h.exposures[r] = a[r];
541
+ for (const r of P)
542
+ h.coverages[r] = f[r];
543
+ for (const r of C)
544
+ h.policyLines[r] = b[r];
545
+ for (const r of E)
546
+ h.exposureGroups[r] = d[r];
547
+ return h;
548
+ }, pe = ({
549
+ dataModel: t,
550
+ quote: e,
551
+ elementLocator: a
552
+ }) => {
553
+ const f = ae(e, a);
554
+ if (!f)
555
+ return {};
556
+ const b = re({
557
+ element: e,
558
+ dataModel: t
559
+ }), d = ue({
560
+ dataModel: t,
561
+ productDataModel: b
562
+ });
563
+ let g = !1;
564
+ const p = f.type.split("Quote")[0];
565
+ return Object.keys(d.exposures).forEach((M) => {
566
+ M === p && (g = d.exposures[M]);
567
+ }), g || Object.keys(d.coverages).forEach((M) => {
568
+ M === p && (g = d.coverages[M]);
569
+ }), g || Object.keys(d.policyLines).forEach((M) => {
570
+ M === p && (g = d.policyLines[M]);
571
+ }), g || Object.keys(d.exposureGroups).forEach((M) => {
572
+ M === p && (g = d.exposureGroups[M]);
573
+ }), g;
511
574
  };
512
575
  export {
513
- X as dataModelToJSONSchema,
514
- ae as getAccountRequest,
515
- fe as getDefaultValues,
516
- se as getQuoteElementRequest,
517
- re as getQuoteRequest,
518
- ne as parseElementTypeAndScopeByElementType,
519
- ue as retrieveDataModelFromElement,
576
+ q as dataModelToJSONSchema,
577
+ pe as extractElementDataModel,
578
+ ae as extractElementFromQuote,
579
+ re as extractProductDataModel,
580
+ ue as extractProductElements,
581
+ he as getDefaultElementValues,
582
+ me as getDefaultQuoteValues,
583
+ oe as getQuoteElementRequest,
584
+ le as getQuoteRequest,
585
+ se as parseElementTypeAndScopeByElementType,
586
+ fe as retrieveDataModelFromElement,
520
587
  ie as retrieveElementFromQuoteByLocator,
521
- ce as transformErrors
588
+ ce as splitInputAndQuantifier,
589
+ de as transformErrors
522
590
  };
523
591
  //# sourceMappingURL=index.es.js.map