@getcredify/credify-insurance-widget 1.44.1 → 1.46.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/{address-BEVwov8q-DDhbGo15.js → address-BEVwov8q-D41kOVu6.js} +1 -1
- package/dist/api-Cw2AUM88.js +77 -0
- package/dist/{car-B83tx4O2.js → car-CMnEV9_b.js} +3 -3
- package/dist/{check-Bu17NqRV.js → check-BTgVTfcC.js} +1 -1
- package/dist/{copy-applicant-offer-CqzfNhkJ-DLXjbOLT.js → copy-applicant-offer-UApiJBeU-CKq7ImsF.js} +3 -3
- package/dist/{copy-from-record-BNP6CFFR-6SC1msxp.js → copy-from-record-DL503itm-CTS4E7Rf.js} +17 -17
- package/dist/{coverageDerivation-CV2ORogj-De8x_Bpm.js → coverageDerivation-CV2ORogj-jMf2SoK5.js} +1 -1
- package/dist/{fixtures-ijbZ16Zg-9n-90hL2.js → fixtures-ijbZ16Zg-ChdBIfNy.js} +1 -1
- package/dist/{household-prefill-CmtB9R3R-Bw0M1Q50.js → household-prefill-BwSS00qI-BV0ZiWyf.js} +24 -24
- package/dist/{householdPrefill-DLm3pxFH-BQibTi9l.js → householdPrefill-DLm3pxFH-CsBUhGpI.js} +3 -3
- package/dist/iframe/assets/{address-BEVwov8q-BiiIpq2c.js → address-BEVwov8q-WHZXNW9V.js} +1 -1
- package/dist/iframe/assets/api-DAGqvZlL.js +1 -0
- package/dist/iframe/assets/{car-cifgdWXX.js → car-B5QKRfCv.js} +2 -2
- package/dist/iframe/assets/{check-TbHiw7rw.js → check-COpOqcK1.js} +1 -1
- package/dist/iframe/assets/{copy-applicant-offer-CqzfNhkJ-CVahKn8I.js → copy-applicant-offer-UApiJBeU-DzSzRNkI.js} +1 -1
- package/dist/iframe/assets/{copy-from-record-BNP6CFFR-Cn7Nr7XT.js → copy-from-record-DL503itm-uUs1HZ1W.js} +2 -2
- package/dist/iframe/assets/{coverageDerivation-CV2ORogj-B7aNPljp.js → coverageDerivation-CV2ORogj-BRpZ-qnO.js} +1 -1
- package/dist/iframe/assets/{dob-calendar-RIJ5S6YU-CdxMGaLz.js → dob-calendar-RIJ5S6YU-Bc9pcr1S.js} +1 -1
- package/dist/iframe/assets/{fixtures-ijbZ16Zg-NuD06-4v.js → fixtures-ijbZ16Zg-DHtl-XVn.js} +1 -1
- package/dist/iframe/assets/household-prefill-BwSS00qI-DoI-FWTT.js +1 -0
- package/dist/iframe/assets/{householdPrefill-DLm3pxFH-DzyOYQr_.js → householdPrefill-DLm3pxFH-Dh4Zfx2N.js} +1 -1
- package/dist/iframe/assets/iframe-B0t_86Ff.js +107 -0
- package/dist/iframe/assets/{index-BknEWAR5.js → index-Dn7YHcfA.js} +2 -2
- package/dist/iframe/assets/intake-review-panel-CjiYTJXh-RzRGAMUY.js +1 -0
- package/dist/iframe/assets/{mockJump-hNzgzUmO-CQ7eZ354.js → mockJump-DCZoGtRl-COeVYgAv.js} +1 -1
- package/dist/iframe/assets/payload-DurIYSZk-BKyiqX4B.js +1 -0
- package/dist/iframe/assets/{question-list-DFjWa8ZA-DbabOwyP.js → question-list-CjN64tfw-C635WZhw.js} +11 -11
- package/dist/iframe/assets/rates-panel-B1xVYtTQ-7LijnnnG.js +17 -0
- package/dist/iframe/assets/{review-panel-C_WxX33U-CxzpQutt.js → review-panel-DuzWoTKP-ClL_jf1q.js} +2 -2
- package/dist/iframe/assets/stage-CnucLiNn-CeNTIedd.js +1 -0
- package/dist/iframe/assets/validation-Db4WCn17-CWj8NSXn.js +3 -0
- package/dist/iframe/assets/{vehicleCoverage-CBWORI1l-BqOK33e3.js → vehicleCoverage-CDBtkdww-B2U8GTFu.js} +1 -1
- package/dist/iframe/assets/visibility-iwttXt0y-DdU95s24.js +1 -0
- package/dist/iframe/assets/waves-BTFsI5kF.js +16 -0
- package/dist/iframe/iframe.html +1 -1
- package/dist/{index-CY0roJE_.js → index-BWYDsqpp.js} +26 -26
- package/dist/index.es.js +1 -1
- package/dist/index.umd.js +103 -103
- package/dist/{intake-review-panel-D27t8CZO-CxiXytFS.js → intake-review-panel-CjiYTJXh-CEbA61Dc.js} +27 -27
- package/dist/{mockJump-hNzgzUmO-CsTzthio.js → mockJump-DCZoGtRl-Bo7POlsv.js} +1 -1
- package/dist/{payload-DrGFAxms-DmfWvvu_.js → payload-DurIYSZk-DIu_QDwm.js} +26 -26
- package/dist/{question-list-DFjWa8ZA-B8f7Jf6J.js → question-list-CjN64tfw-1IKhM3Qt.js} +51 -51
- package/dist/rates-panel-B1xVYtTQ-zlc6y8FP.js +1338 -0
- package/dist/{review-panel-C_WxX33U-CZu6We48.js → review-panel-DuzWoTKP-fVqE5OXc.js} +59 -59
- package/dist/stage-CnucLiNn-cNOWRm4u.js +197 -0
- package/dist/utils/prefill.d.ts +2 -4
- package/dist/{validation-D42QXxck-BPUVtzkv.js → validation-Db4WCn17-MXpuK34u.js} +341 -343
- package/dist/{vehicleCoverage-CBWORI1l-DZmjvVjU.js → vehicleCoverage-CDBtkdww-PMT13g0U.js} +3 -3
- package/dist/{visibility-CKRGC3Il-_72Koc98.js → visibility-iwttXt0y-DPpMfYyV.js} +6 -6
- package/dist/waves-B32--xu4.js +71 -0
- package/dist/{widget-CP6ApixH.js → widget-D6Yu93a3.js} +2977 -2827
- package/package.json +2 -2
- package/dist/api-CWMwIjKu.js +0 -51
- package/dist/core-CrEw_I-E-CsRUhlZy.js +0 -417
- package/dist/iframe/assets/core-CrEw_I-E-DJNj5Zzo.js +0 -16
- package/dist/iframe/assets/household-prefill-CmtB9R3R-0b9HYzDA.js +0 -1
- package/dist/iframe/assets/iframe-Be9NY0jq.js +0 -107
- package/dist/iframe/assets/intake-review-panel-D27t8CZO-QuAzDm1O.js +0 -1
- package/dist/iframe/assets/payload-DrGFAxms-DIGXNw5l.js +0 -1
- package/dist/iframe/assets/rates-panel-BSFiWEZX-GsRBXu7R.js +0 -17
- package/dist/iframe/assets/stage-knShj71W-CEkRTdvw.js +0 -1
- package/dist/iframe/assets/validation-D42QXxck-DrIBn9be.js +0 -3
- package/dist/iframe/assets/visibility-CKRGC3Il-CLpoN3cd.js +0 -1
- package/dist/rates-panel-BSFiWEZX-DdETQZ83.js +0 -1001
- package/dist/stage-knShj71W-XIJ7bUoN.js +0 -197
|
@@ -2,12 +2,12 @@ var Ce = (n) => {
|
|
|
2
2
|
throw TypeError(n);
|
|
3
3
|
};
|
|
4
4
|
var be = (n, o, e) => o.has(n) || Ce("Cannot " + e);
|
|
5
|
-
var w = (n, o, e) => (be(n, o, "read from private field"), e ? e.call(n) : o.get(n)), xe = (n, o, e) => o.has(n) ? Ce("Cannot add the same private member more than once") : o instanceof WeakSet ? o.add(n) : o.set(n, e),
|
|
6
|
-
import {
|
|
7
|
-
import { o as Ue, n as We, r as
|
|
5
|
+
var w = (n, o, e) => (be(n, o, "read from private field"), e ? e.call(n) : o.get(n)), xe = (n, o, e) => o.has(n) ? Ce("Cannot add the same private member more than once") : o instanceof WeakSet ? o.add(n) : o.set(n, e), Q = (n, o, e, t) => (be(n, o, "write to private field"), t ? t.call(n, e) : o.set(n, e), e);
|
|
6
|
+
import { $ as He, a0 as $, a1 as V, t as Be, K as ye, G as Re, U as Ge, af as Fe, L as te } from "./widget-D6Yu93a3.js";
|
|
7
|
+
import { o as Ue, n as We, r as Ye } from "./stage-CnucLiNn-cNOWRm4u.js";
|
|
8
8
|
import * as l from "react";
|
|
9
|
-
import { jsx as i, jsxs as M, Fragment as
|
|
10
|
-
import {
|
|
9
|
+
import { jsx as i, jsxs as M, Fragment as Je } from "react/jsx-runtime";
|
|
10
|
+
import { a as q, e as oe, f as we, P as z, c as Ne, b as Qe, u as Xe, C as Ze } from "./index-BWYDsqpp.js";
|
|
11
11
|
(function() {
|
|
12
12
|
if (typeof n > "u")
|
|
13
13
|
var n = { env: {} };
|
|
@@ -30,7 +30,7 @@ const et = [
|
|
|
30
30
|
], tt = He("pencil", et);
|
|
31
31
|
var ot = Object.defineProperty, y = (n, o) => ot(n, "name", { value: o, configurable: !0 });
|
|
32
32
|
// @__NO_SIDE_EFFECTS__
|
|
33
|
-
function
|
|
33
|
+
function Pe(n) {
|
|
34
34
|
const o = n + "CollectionProvider", [e, t] = q(o), [s, r] = e(
|
|
35
35
|
o,
|
|
36
36
|
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
@@ -39,17 +39,17 @@ function _e(n) {
|
|
|
39
39
|
return /* @__PURE__ */ i(s, { scope: v, itemMap: u, collectionRef: A, children: I });
|
|
40
40
|
}, "CollectionProvider");
|
|
41
41
|
c.displayName = o;
|
|
42
|
-
const d = n + "CollectionSlot", f =
|
|
42
|
+
const d = n + "CollectionSlot", f = V(d), p = l.forwardRef(
|
|
43
43
|
(b, v) => {
|
|
44
44
|
const { scope: I, children: A } = b, u = r(d, I), m = $(v, u.collectionRef);
|
|
45
45
|
return /* @__PURE__ */ i(f, { ref: m, children: A });
|
|
46
46
|
}
|
|
47
47
|
);
|
|
48
48
|
p.displayName = d;
|
|
49
|
-
const a = n + "CollectionItemSlot", h = "data-radix-collection-item", g =
|
|
49
|
+
const a = n + "CollectionItemSlot", h = "data-radix-collection-item", g = V(a), N = l.forwardRef(
|
|
50
50
|
(b, v) => {
|
|
51
|
-
const { scope: I, children: A, ...u } = b, m = l.useRef(null), E = $(v, m),
|
|
52
|
-
return l.useEffect(() => (
|
|
51
|
+
const { scope: I, children: A, ...u } = b, m = l.useRef(null), E = $(v, m), P = r(a, I);
|
|
52
|
+
return l.useEffect(() => (P.itemMap.set(m, { ref: m, ...u }), () => void P.itemMap.delete(m))), /* @__PURE__ */ i(g, { [h]: "", ref: E, children: A });
|
|
53
53
|
}
|
|
54
54
|
);
|
|
55
55
|
N.displayName = a;
|
|
@@ -60,7 +60,7 @@ function _e(n) {
|
|
|
60
60
|
if (!A) return [];
|
|
61
61
|
const u = Array.from(A.querySelectorAll(`[${h}]`));
|
|
62
62
|
return Array.from(v.itemMap.values()).sort(
|
|
63
|
-
(
|
|
63
|
+
(P, _) => u.indexOf(P.ref.current) - u.indexOf(_.ref.current)
|
|
64
64
|
);
|
|
65
65
|
}, [v.collectionRef, v.itemMap]);
|
|
66
66
|
}
|
|
@@ -70,12 +70,12 @@ function _e(n) {
|
|
|
70
70
|
t
|
|
71
71
|
];
|
|
72
72
|
}
|
|
73
|
-
y(
|
|
74
|
-
var Ie = /* @__PURE__ */ new WeakMap(), x, S,
|
|
73
|
+
y(Pe, "createCollection");
|
|
74
|
+
var Ie = /* @__PURE__ */ new WeakMap(), x, S, X = (S = class extends Map {
|
|
75
75
|
constructor(e) {
|
|
76
76
|
super(e);
|
|
77
77
|
xe(this, x);
|
|
78
|
-
|
|
78
|
+
Q(this, x, [...super.keys()]), Ie.set(this, !0);
|
|
79
79
|
}
|
|
80
80
|
set(e, t) {
|
|
81
81
|
return Ie.get(this) && (this.has(e) ? w(this, x)[w(this, x).indexOf(e)] = e : w(this, x).push(e)), super.set(e, t), this;
|
|
@@ -136,7 +136,7 @@ var Ie = /* @__PURE__ */ new WeakMap(), x, S, J = (S = class extends Map {
|
|
|
136
136
|
return this.entryAt(-1);
|
|
137
137
|
}
|
|
138
138
|
clear() {
|
|
139
|
-
return
|
|
139
|
+
return Q(this, x, []), super.clear();
|
|
140
140
|
}
|
|
141
141
|
delete(e) {
|
|
142
142
|
const t = super.delete(e);
|
|
@@ -147,12 +147,12 @@ var Ie = /* @__PURE__ */ new WeakMap(), x, S, J = (S = class extends Map {
|
|
|
147
147
|
return t !== void 0 ? this.delete(t) : !1;
|
|
148
148
|
}
|
|
149
149
|
at(e) {
|
|
150
|
-
const t =
|
|
150
|
+
const t = K(w(this, x), e);
|
|
151
151
|
if (t !== void 0)
|
|
152
152
|
return this.get(t);
|
|
153
153
|
}
|
|
154
154
|
entryAt(e) {
|
|
155
|
-
const t =
|
|
155
|
+
const t = K(w(this, x), e);
|
|
156
156
|
if (t !== void 0)
|
|
157
157
|
return [t, this.get(t)];
|
|
158
158
|
}
|
|
@@ -160,7 +160,7 @@ var Ie = /* @__PURE__ */ new WeakMap(), x, S, J = (S = class extends Map {
|
|
|
160
160
|
return w(this, x).indexOf(e);
|
|
161
161
|
}
|
|
162
162
|
keyAt(e) {
|
|
163
|
-
return
|
|
163
|
+
return K(w(this, x), e);
|
|
164
164
|
}
|
|
165
165
|
from(e, t) {
|
|
166
166
|
const s = this.indexOf(e);
|
|
@@ -270,18 +270,18 @@ var Ie = /* @__PURE__ */ new WeakMap(), x, S, J = (S = class extends Map {
|
|
|
270
270
|
return !1;
|
|
271
271
|
}
|
|
272
272
|
}, x = new WeakMap(), y(S, "OrderedDict"), S);
|
|
273
|
-
function
|
|
273
|
+
function K(n, o) {
|
|
274
274
|
if ("at" in Array.prototype)
|
|
275
275
|
return Array.prototype.at.call(n, o);
|
|
276
|
-
const e =
|
|
276
|
+
const e = _e(n, o);
|
|
277
277
|
return e === -1 ? void 0 : n[e];
|
|
278
278
|
}
|
|
279
|
-
y(
|
|
280
|
-
function
|
|
279
|
+
y(K, "at");
|
|
280
|
+
function _e(n, o) {
|
|
281
281
|
const e = n.length, t = ne(o), s = t >= 0 ? t : e + t;
|
|
282
282
|
return s < 0 || s >= e ? -1 : s;
|
|
283
283
|
}
|
|
284
|
-
y(
|
|
284
|
+
y(_e, "toSafeIndex");
|
|
285
285
|
function ne(n) {
|
|
286
286
|
return n !== n || n === 0 ? 0 : Math.trunc(n);
|
|
287
287
|
}
|
|
@@ -294,7 +294,7 @@ function nt(n) {
|
|
|
294
294
|
collectionElement: null,
|
|
295
295
|
collectionRef: { current: null },
|
|
296
296
|
collectionRefObject: { current: null },
|
|
297
|
-
itemMap: new
|
|
297
|
+
itemMap: new X(),
|
|
298
298
|
setItemMap: /* @__PURE__ */ y(() => {
|
|
299
299
|
}, "setItemMap")
|
|
300
300
|
}
|
|
@@ -306,9 +306,9 @@ function nt(n) {
|
|
|
306
306
|
}, "CollectionInit");
|
|
307
307
|
d.displayName = o + "Init";
|
|
308
308
|
const f = /* @__PURE__ */ y((u) => {
|
|
309
|
-
const { scope: m, children: E, state:
|
|
309
|
+
const { scope: m, children: E, state: P } = u, _ = l.useRef(null), [k, R] = l.useState(
|
|
310
310
|
null
|
|
311
|
-
), U = $(
|
|
311
|
+
), U = $(_, R), [W, Y] = P;
|
|
312
312
|
return l.useEffect(() => {
|
|
313
313
|
if (!k) return;
|
|
314
314
|
const L = Ee(() => {
|
|
@@ -324,38 +324,38 @@ function nt(n) {
|
|
|
324
324
|
{
|
|
325
325
|
scope: m,
|
|
326
326
|
itemMap: W,
|
|
327
|
-
setItemMap:
|
|
327
|
+
setItemMap: Y,
|
|
328
328
|
collectionRef: U,
|
|
329
|
-
collectionRefObject:
|
|
329
|
+
collectionRefObject: _,
|
|
330
330
|
collectionElement: k,
|
|
331
331
|
children: E
|
|
332
332
|
}
|
|
333
333
|
);
|
|
334
334
|
}, "CollectionProviderImpl");
|
|
335
335
|
f.displayName = o + "Impl";
|
|
336
|
-
const p = n + "CollectionSlot", a =
|
|
336
|
+
const p = n + "CollectionSlot", a = V(p), h = l.forwardRef(
|
|
337
337
|
(u, m) => {
|
|
338
|
-
const { scope: E, children:
|
|
339
|
-
return /* @__PURE__ */ i(a, { ref: k, children:
|
|
338
|
+
const { scope: E, children: P } = u, _ = r(p, E), k = $(m, _.collectionRef);
|
|
339
|
+
return /* @__PURE__ */ i(a, { ref: k, children: P });
|
|
340
340
|
}
|
|
341
341
|
);
|
|
342
342
|
h.displayName = p;
|
|
343
|
-
const g = n + "CollectionItemSlot", N = "data-radix-collection-item", C =
|
|
343
|
+
const g = n + "CollectionItemSlot", N = "data-radix-collection-item", C = V(g), b = l.forwardRef(
|
|
344
344
|
(u, m) => {
|
|
345
|
-
const { scope: E, children:
|
|
346
|
-
Se(
|
|
347
|
-
const ge =
|
|
345
|
+
const { scope: E, children: P, ..._ } = u, k = l.useRef(null), [R, U] = l.useState(null), W = $(m, k, U), Y = r(g, E), { setItemMap: L } = Y, J = l.useRef(_);
|
|
346
|
+
Se(J.current, _) || (J.current = _);
|
|
347
|
+
const ge = J.current;
|
|
348
348
|
return l.useEffect(() => {
|
|
349
349
|
const ve = ge;
|
|
350
350
|
return L((T) => R ? T.has(R) ? T.set(R, { ...ve, element: R }).toSorted(Z) : (T.set(R, { ...ve, element: R }), T.toSorted(Z)) : T), () => {
|
|
351
|
-
L((T) => !R || !T.has(R) ? T : (T.delete(R), new
|
|
351
|
+
L((T) => !R || !T.has(R) ? T : (T.delete(R), new X(T)));
|
|
352
352
|
};
|
|
353
|
-
}, [R, ge, L]), /* @__PURE__ */ i(C, { [N]: "", ref: W, children:
|
|
353
|
+
}, [R, ge, L]), /* @__PURE__ */ i(C, { [N]: "", ref: W, children: P });
|
|
354
354
|
}
|
|
355
355
|
);
|
|
356
356
|
b.displayName = g;
|
|
357
357
|
function v() {
|
|
358
|
-
return l.useState(new
|
|
358
|
+
return l.useState(new X());
|
|
359
359
|
}
|
|
360
360
|
y(v, "useInitCollection");
|
|
361
361
|
function I(u) {
|
|
@@ -464,14 +464,14 @@ var it = Object.defineProperty, j = (n, o) => it(n, "name", { value: o, configur
|
|
|
464
464
|
// blank line to reduce diff noise
|
|
465
465
|
/* @__PURE__ */ j(function(o, e) {
|
|
466
466
|
const { forceMount: t, ...s } = o, r = se(Te, o.__scopeCollapsible);
|
|
467
|
-
return /* @__PURE__ */ i(
|
|
467
|
+
return /* @__PURE__ */ i(Qe, { present: t || r.open, children: ({ present: c }) => /* @__PURE__ */ i(ht, { ...s, ref: e, present: c }) });
|
|
468
468
|
}, "CollapsibleContent")
|
|
469
469
|
), ht = /* @__PURE__ */ l.forwardRef(/* @__PURE__ */ j(function(o, e) {
|
|
470
470
|
const { __scopeCollapsible: t, present: s, children: r, ...c } = o, d = se(Te, t), [f, p] = l.useState(s), a = l.useRef(null), h = $(e, a), g = l.useRef(0), N = g.current, C = l.useRef(0), b = C.current, v = d.open || f, I = l.useRef(v), A = l.useRef(void 0);
|
|
471
471
|
return l.useEffect(() => {
|
|
472
472
|
const u = requestAnimationFrame(() => I.current = !1);
|
|
473
473
|
return () => cancelAnimationFrame(u);
|
|
474
|
-
}, []),
|
|
474
|
+
}, []), Xe(() => {
|
|
475
475
|
const u = a.current;
|
|
476
476
|
if (u) {
|
|
477
477
|
A.current = A.current || {
|
|
@@ -503,7 +503,7 @@ function H(n) {
|
|
|
503
503
|
return n ? "open" : "closed";
|
|
504
504
|
}
|
|
505
505
|
j(H, "getState");
|
|
506
|
-
var mt = dt, gt = ft, vt = pt, Ct = Object.defineProperty, O = (n, o) => Ct(n, "name", { value: o, configurable: !0 }), D = "Accordion", bt = ["Home", "End", "ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight"], [ce, xt, yt] = /* @__PURE__ */
|
|
506
|
+
var mt = dt, gt = ft, vt = pt, Ct = Object.defineProperty, O = (n, o) => Ct(n, "name", { value: o, configurable: !0 }), D = "Accordion", bt = ["Home", "End", "ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight"], [ce, xt, yt] = /* @__PURE__ */ Pe(D), [B, Gt] = q(D, [
|
|
507
507
|
yt,
|
|
508
508
|
ke
|
|
509
509
|
]), ie = ke(), It = /* @__PURE__ */ l.forwardRef(
|
|
@@ -571,7 +571,7 @@ var mt = dt, gt = ft, vt = pt, Ct = Object.defineProperty, O = (n, o) => Ct(n, "
|
|
|
571
571
|
children: /* @__PURE__ */ i($e, { scope: o.__scopeAccordion, collapsible: !0, children: /* @__PURE__ */ i(Le, { ...c, ref: e }) })
|
|
572
572
|
}
|
|
573
573
|
);
|
|
574
|
-
}, "AccordionImplMultiple")), [
|
|
574
|
+
}, "AccordionImplMultiple")), [Pt, G] = B(D), Le = /* @__PURE__ */ l.forwardRef(
|
|
575
575
|
/* @__PURE__ */ O(function(o, e) {
|
|
576
576
|
const { __scopeAccordion: t, disabled: s, dir: r, orientation: c = "vertical", ...d } = o, f = l.useRef(null), p = $(f, e), a = xt(t), g = Me(r) === "ltr", N = Ne(o.onKeyDown, (C) => {
|
|
577
577
|
if (!bt.includes(C.key)) return;
|
|
@@ -579,9 +579,9 @@ var mt = dt, gt = ft, vt = pt, Ct = Object.defineProperty, O = (n, o) => Ct(n, "
|
|
|
579
579
|
if (I === -1) return;
|
|
580
580
|
C.preventDefault();
|
|
581
581
|
let u = I;
|
|
582
|
-
const m = 0, E = A - 1,
|
|
582
|
+
const m = 0, E = A - 1, P = /* @__PURE__ */ O(() => {
|
|
583
583
|
u = I + 1, u > E && (u = m);
|
|
584
|
-
}, "moveNext"),
|
|
584
|
+
}, "moveNext"), _ = /* @__PURE__ */ O(() => {
|
|
585
585
|
u = I - 1, u < m && (u = E);
|
|
586
586
|
}, "movePrev");
|
|
587
587
|
switch (C.key) {
|
|
@@ -592,23 +592,23 @@ var mt = dt, gt = ft, vt = pt, Ct = Object.defineProperty, O = (n, o) => Ct(n, "
|
|
|
592
592
|
u = E;
|
|
593
593
|
break;
|
|
594
594
|
case "ArrowRight":
|
|
595
|
-
c === "horizontal" && (g ?
|
|
595
|
+
c === "horizontal" && (g ? P() : _());
|
|
596
596
|
break;
|
|
597
597
|
case "ArrowDown":
|
|
598
|
-
c === "vertical" &&
|
|
598
|
+
c === "vertical" && P();
|
|
599
599
|
break;
|
|
600
600
|
case "ArrowLeft":
|
|
601
|
-
c === "horizontal" && (g ?
|
|
601
|
+
c === "horizontal" && (g ? _() : P());
|
|
602
602
|
break;
|
|
603
603
|
case "ArrowUp":
|
|
604
|
-
c === "vertical" &&
|
|
604
|
+
c === "vertical" && _();
|
|
605
605
|
break;
|
|
606
606
|
}
|
|
607
607
|
const k = u % A;
|
|
608
608
|
v[k].ref.current?.focus();
|
|
609
609
|
});
|
|
610
610
|
return /* @__PURE__ */ i(
|
|
611
|
-
|
|
611
|
+
Pt,
|
|
612
612
|
{
|
|
613
613
|
scope: t,
|
|
614
614
|
disabled: s,
|
|
@@ -626,11 +626,11 @@ var mt = dt, gt = ft, vt = pt, Ct = Object.defineProperty, O = (n, o) => Ct(n, "
|
|
|
626
626
|
}
|
|
627
627
|
);
|
|
628
628
|
}, "AccordionImpl")
|
|
629
|
-
), ee = "AccordionItem", [
|
|
629
|
+
), ee = "AccordionItem", [_t, le] = B(ee), St = /* @__PURE__ */ l.forwardRef(
|
|
630
630
|
/* @__PURE__ */ O(function(o, e) {
|
|
631
631
|
const { __scopeAccordion: t, value: s, ...r } = o, c = G(ee, t), d = At(ee, t), f = ie(t), p = we(), a = s && d.value.includes(s) || !1, h = c.disabled || o.disabled;
|
|
632
632
|
return /* @__PURE__ */ i(
|
|
633
|
-
|
|
633
|
+
_t,
|
|
634
634
|
{
|
|
635
635
|
scope: t,
|
|
636
636
|
open: a,
|
|
@@ -711,7 +711,7 @@ function ae(n) {
|
|
|
711
711
|
return n ? "open" : "closed";
|
|
712
712
|
}
|
|
713
713
|
O(ae, "getState");
|
|
714
|
-
var Dt = It, $t = St, Lt = Et, ze = Mt, je = Tt,
|
|
714
|
+
var Dt = It, $t = St, Lt = Et, ze = Mt, je = Tt, Ke = Dt, de = l.forwardRef(({ className: n, ...o }, e) => /* @__PURE__ */ i($t, {
|
|
715
715
|
ref: e,
|
|
716
716
|
className: te("cds-border-b cds-border-border", n),
|
|
717
717
|
...o
|
|
@@ -739,7 +739,7 @@ var fe = l.forwardRef(({ className: n, children: o, ...e }, t) => /* @__PURE__ *
|
|
|
739
739
|
fe.displayName = je.displayName;
|
|
740
740
|
var zt = /* @__PURE__ */ Be({
|
|
741
741
|
GroupEntries: () => me,
|
|
742
|
-
ReviewEditButton: () =>
|
|
742
|
+
ReviewEditButton: () => Ve,
|
|
743
743
|
ReviewPanel: () => qe,
|
|
744
744
|
RowList: () => F,
|
|
745
745
|
sectionClass: () => pe,
|
|
@@ -760,7 +760,7 @@ var zt = /* @__PURE__ */ Be({
|
|
|
760
760
|
children: o.value
|
|
761
761
|
})]
|
|
762
762
|
}, o.key))
|
|
763
|
-
}),
|
|
763
|
+
}), Ve = ({ label: n, onClick: o }) => /* @__PURE__ */ M("button", {
|
|
764
764
|
type: "button",
|
|
765
765
|
onClick: o,
|
|
766
766
|
"aria-label": `Edit ${n}`,
|
|
@@ -774,7 +774,7 @@ var zt = /* @__PURE__ */ Be({
|
|
|
774
774
|
let h = o[a] ?? [];
|
|
775
775
|
return {
|
|
776
776
|
stage: a,
|
|
777
|
-
rows:
|
|
777
|
+
rows: Ye({
|
|
778
778
|
questions: h,
|
|
779
779
|
values: e,
|
|
780
780
|
stageKey: a,
|
|
@@ -834,7 +834,7 @@ var zt = /* @__PURE__ */ Be({
|
|
|
834
834
|
children: [/* @__PURE__ */ i("h3", {
|
|
835
835
|
className: he,
|
|
836
836
|
children: h
|
|
837
|
-
}), /* @__PURE__ */ i(
|
|
837
|
+
}), /* @__PURE__ */ i(Ve, {
|
|
838
838
|
label: h,
|
|
839
839
|
onClick: () => c(a.stage)
|
|
840
840
|
})]
|
|
@@ -856,10 +856,10 @@ var zt = /* @__PURE__ */ Be({
|
|
|
856
856
|
})
|
|
857
857
|
]
|
|
858
858
|
});
|
|
859
|
-
}, me = ({ group: n }) => n.entries.length ? /* @__PURE__ */ M(
|
|
859
|
+
}, me = ({ group: n }) => n.entries.length ? /* @__PURE__ */ M(Je, { children: [/* @__PURE__ */ i("p", {
|
|
860
860
|
className: "cds-mb-1 cds-text-sm cds-text-fg-muted",
|
|
861
861
|
children: jt(n)
|
|
862
|
-
}), /* @__PURE__ */ i(
|
|
862
|
+
}), /* @__PURE__ */ i(Ke, {
|
|
863
863
|
type: "multiple",
|
|
864
864
|
children: n.entries.map((o, e) => /* @__PURE__ */ M(de, {
|
|
865
865
|
value: `${n.groupKey}-${e}`,
|
|
@@ -889,7 +889,7 @@ const Ft = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
889
889
|
n: qe,
|
|
890
890
|
o: he,
|
|
891
891
|
r: F,
|
|
892
|
-
s:
|
|
892
|
+
s: Ke,
|
|
893
893
|
t: me,
|
|
894
894
|
u: ue
|
|
895
895
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import { t as O, ag as P, ah as V, ai as x, aj as D } from "./widget-D6Yu93a3.js";
|
|
2
|
+
import { t as q, n as k } from "./types-LUGvo5ic-CiVRcsV9.js";
|
|
3
|
+
import { k as d, j as f, n as F, u as L, c as U, d as R, A as j } from "./visibility-iwttXt0y-DPpMfYyV.js";
|
|
4
|
+
import { A as b } from "./validation-Db4WCn17-MXpuK34u.js";
|
|
5
|
+
import { t as $, l as Y, a as Q, o as M, i as K, f as I, n as W, r as B } from "./vehicleCoverage-CDBtkdww-PMT13g0U.js";
|
|
6
|
+
(function() {
|
|
7
|
+
if (typeof s > "u")
|
|
8
|
+
var s = { env: {} };
|
|
9
|
+
})();
|
|
10
|
+
var C = /* @__PURE__ */ new Set([
|
|
11
|
+
"sale_price_cents",
|
|
12
|
+
"dwelling_replacement_cost",
|
|
13
|
+
"other_structures_coverage",
|
|
14
|
+
"personal_property_coverage",
|
|
15
|
+
"loss_of_use_coverage",
|
|
16
|
+
"custom_equipment_value_cents",
|
|
17
|
+
"cost_new_value_cents",
|
|
18
|
+
"stated_value_amount_cents",
|
|
19
|
+
"property_damage_amount_paid_cents",
|
|
20
|
+
"personal_injury_amount_paid_cents",
|
|
21
|
+
"auto_current_annual_premium_cents",
|
|
22
|
+
"amount_paid_cents"
|
|
23
|
+
]), G = /* @__PURE__ */ new Set([
|
|
24
|
+
"total_area_sq_ft",
|
|
25
|
+
"annual_mileage",
|
|
26
|
+
"miles_to_work",
|
|
27
|
+
"distance_to_coast_miles"
|
|
28
|
+
]), H = (s) => C.has(s), Z = (s) => C.has(s) || G.has(s), z = (s, e) => {
|
|
29
|
+
let i = String(s ?? "").replace(/\D/g, "");
|
|
30
|
+
if (!i) return "";
|
|
31
|
+
let r = Number(i);
|
|
32
|
+
if (!Number.isFinite(r)) return "";
|
|
33
|
+
let n = r.toLocaleString("en-US");
|
|
34
|
+
return e ? `$${n}` : n;
|
|
35
|
+
}, pe = /* @__PURE__ */ O({
|
|
36
|
+
STAGES_BY_PRODUCT: () => D,
|
|
37
|
+
ZIP_FIRST_PAINT_CACHE_KEY: () => x,
|
|
38
|
+
ZIP_FIRST_PAINT_QUESTIONS: () => V,
|
|
39
|
+
itemScope: () => A,
|
|
40
|
+
reviewGroupsForStage: () => le,
|
|
41
|
+
reviewRowsForStage: () => ne,
|
|
42
|
+
stageSlice: () => re,
|
|
43
|
+
validateStage: () => se
|
|
44
|
+
}), J = ["ssn_display"], A = (s, e) => {
|
|
45
|
+
let i = {
|
|
46
|
+
...s,
|
|
47
|
+
...e
|
|
48
|
+
};
|
|
49
|
+
for (let r of J) r in e || delete i[r];
|
|
50
|
+
return i;
|
|
51
|
+
}, X = (s, e, i) => {
|
|
52
|
+
let r = A(s, e);
|
|
53
|
+
for (let n of i) n.key in e ? r[n.key] = e[n.key] : delete r[n.key];
|
|
54
|
+
return r;
|
|
55
|
+
}, ee = {
|
|
56
|
+
vehicles: "Vehicle",
|
|
57
|
+
drivers: "Driver",
|
|
58
|
+
driver_accidents: "Accident",
|
|
59
|
+
driver_violations: "Violation",
|
|
60
|
+
losses: "Loss",
|
|
61
|
+
home_losses: "Loss"
|
|
62
|
+
}, h = (s) => ee[s] ?? "Entry", w = (s, e, i, r) => {
|
|
63
|
+
let n = (l, t) => {
|
|
64
|
+
l.forEach((a) => {
|
|
65
|
+
let u = L(a);
|
|
66
|
+
if (u) {
|
|
67
|
+
let o = U(a) || t[a.key] === u.conditionalValue;
|
|
68
|
+
r(a.key, u.conditionalQuestions ?? [], o);
|
|
69
|
+
}
|
|
70
|
+
R(a, t).forEach((o) => {
|
|
71
|
+
o.conditionalQuestionsAllowMultiple || n(o.conditionalQuestions ?? [], t);
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
n(F(s), e);
|
|
76
|
+
}, se = ({ questions: s, values: e, stageKey: i }) => {
|
|
77
|
+
let r = d(s, e, i), n = b(r, e), l = [], t = [];
|
|
78
|
+
for (let [a, u] of Object.entries(n)) {
|
|
79
|
+
let o = r.find((c) => c.key === a);
|
|
80
|
+
t.push(`${o?.question ?? a}: ${u}`);
|
|
81
|
+
}
|
|
82
|
+
if (w(s, e, i, (a, u, o) => {
|
|
83
|
+
if (!o) return;
|
|
84
|
+
let c = f(e, a);
|
|
85
|
+
if (!c.length) {
|
|
86
|
+
t.push(`Add at least one ${h(a).toLowerCase()}.`), n[k(a)] = `Add at least one ${h(a).toLowerCase()}.`;
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
c.forEach((y, p) => {
|
|
90
|
+
let _ = j(u, y, e, i, p), N = b(_, X(e, y, _)), m = {};
|
|
91
|
+
for (let v of _) {
|
|
92
|
+
let g = N[v.key];
|
|
93
|
+
g && (m[v.key] = g, t.push(`${h(a)} ${p + 1} — ${v.question}: ${g}`));
|
|
94
|
+
}
|
|
95
|
+
Object.keys(m).length && l.push({
|
|
96
|
+
groupKey: a,
|
|
97
|
+
index: p,
|
|
98
|
+
errorsByKey: m
|
|
99
|
+
});
|
|
100
|
+
});
|
|
101
|
+
}), r.some((a) => a.key === "vehicle_policy_selections")) {
|
|
102
|
+
let a = f(e, "vehicles"), u = /* @__PURE__ */ new Map();
|
|
103
|
+
for (let y of Y(a)) u.set(y.index, { ...y.errorsByKey }), t.push(`Vehicle ${y.index + 1} — coverage selections are incomplete.`);
|
|
104
|
+
let o = Q(e), c = f(e, "drivers").length;
|
|
105
|
+
a.forEach((y, p) => {
|
|
106
|
+
let _ = M(o, p, c);
|
|
107
|
+
_ && (u.set(p, {
|
|
108
|
+
...u.get(p) ?? {},
|
|
109
|
+
[$]: _
|
|
110
|
+
}), t.push(`Vehicle ${p + 1} — ${_}`));
|
|
111
|
+
});
|
|
112
|
+
for (let [y, p] of u) l.push({
|
|
113
|
+
groupKey: "vehicles",
|
|
114
|
+
index: y,
|
|
115
|
+
errorsByKey: p
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
return {
|
|
119
|
+
errorsByKey: n,
|
|
120
|
+
itemErrors: l,
|
|
121
|
+
issues: t,
|
|
122
|
+
isValid: Object.keys(n).length === 0 && l.length === 0
|
|
123
|
+
};
|
|
124
|
+
}, E = (s) => Object.values(s).every((e) => e == null || String(e).trim() === ""), re = (s, e, i) => {
|
|
125
|
+
let r = {};
|
|
126
|
+
for (let l of d(s, e, i)) l.key in e && (r[l.key] = e[l.key]);
|
|
127
|
+
w(s, e, i, (l, t, a) => {
|
|
128
|
+
let u = k(l);
|
|
129
|
+
if (!a || !(u in e)) return;
|
|
130
|
+
let o = f(e, l), c = o.filter((y) => !E(y));
|
|
131
|
+
!c.length && o.length || (r[u] = c, r[l] = e[l] ?? "Yes");
|
|
132
|
+
});
|
|
133
|
+
let n = k("vehicles");
|
|
134
|
+
return d(s, e, i).some((l) => l.key === "vehicle_policy_selections") && n in e && !(n in r) && (r[n] = f(e, "vehicles").filter((l) => !E(l)), r.vehicles = e.vehicles ?? "Yes", "driver_vehicle_assignments" in e && (r[$] = e[$])), r;
|
|
135
|
+
}, ie = (s, e) => [s.first_name, s.last_name].map((i) => String(i ?? "").trim()).filter(Boolean).join(" ") || `Driver ${e + 1}`, te = (s, e, i) => s === "vehicles" ? I(e, i) : s === "drivers" ? ie(e, i) : `${h(s)} ${i + 1}`, le = ({ questions: s, values: e, stageKey: i, suppressedKeys: r }) => {
|
|
136
|
+
let n = [];
|
|
137
|
+
return w(s, e, i, (l, t, a) => {
|
|
138
|
+
if (!a) return;
|
|
139
|
+
let u = f(e, l).map((o, c) => {
|
|
140
|
+
let y = A(e, o), p = j(t, o, e, i, c);
|
|
141
|
+
return {
|
|
142
|
+
name: te(l, o, c),
|
|
143
|
+
rows: p.filter((_) => !_.key.endsWith(q)).filter((_) => !r?.has(_.key)).map((_) => ({
|
|
144
|
+
key: `${l}__${c}__${_.key}`,
|
|
145
|
+
label: _.question,
|
|
146
|
+
value: S(_, o[_.key], y)
|
|
147
|
+
}))
|
|
148
|
+
};
|
|
149
|
+
});
|
|
150
|
+
n.push({
|
|
151
|
+
groupKey: l,
|
|
152
|
+
label: l.replace(/_/g, " ").replace(/^./, (o) => o.toUpperCase()),
|
|
153
|
+
entries: u
|
|
154
|
+
});
|
|
155
|
+
}), n;
|
|
156
|
+
}, T = (s) => {
|
|
157
|
+
let e = String(s ?? "").replace(/\D/g, "");
|
|
158
|
+
return e.length >= 4 ? e.slice(-4) : null;
|
|
159
|
+
}, S = (s, e, i) => {
|
|
160
|
+
if (s.key === "social_security_number") {
|
|
161
|
+
let r = T(e) ?? T(i.ssn_display);
|
|
162
|
+
return r ? `•••–••–${r}` : "—";
|
|
163
|
+
}
|
|
164
|
+
return e == null || e === "" ? "—" : e === !0 ? "Yes" : e === !1 ? "No" : Array.isArray(e) ? `${e.length} added` : s.inputType === "select" || s.inputType === "radio" ? P(s.key, String(e)) : s.inputType === "number" && Z(s.key) && z(e, H(s.key)) || String(e);
|
|
165
|
+
}, ae = (s) => ({
|
|
166
|
+
question: B[s],
|
|
167
|
+
key: s,
|
|
168
|
+
required: !0,
|
|
169
|
+
inputType: "select"
|
|
170
|
+
}), ne = ({ questions: s, values: e, stageKey: i, suppressedKeys: r }) => {
|
|
171
|
+
let n = d(s, e, i), l = n.filter((t) => !t.key.endsWith(q)).filter((t) => t.key !== K).filter((t) => !r?.has(t.key)).map((t) => ({
|
|
172
|
+
key: t.key,
|
|
173
|
+
label: t.question,
|
|
174
|
+
value: S(t, e[t.key], e)
|
|
175
|
+
}));
|
|
176
|
+
return n.some((t) => t.key === "vehicle_policy_selections") && f(e, "vehicles").forEach((t, a) => {
|
|
177
|
+
let u = I(t, a);
|
|
178
|
+
for (let o of W) l.push({
|
|
179
|
+
key: `${K}__${a}__${o}`,
|
|
180
|
+
label: `${u} — ${B[o]}`,
|
|
181
|
+
value: S(ae(o), t[o], e)
|
|
182
|
+
});
|
|
183
|
+
}), l;
|
|
184
|
+
};
|
|
185
|
+
export {
|
|
186
|
+
pe as a,
|
|
187
|
+
G as c,
|
|
188
|
+
Z as d,
|
|
189
|
+
re as i,
|
|
190
|
+
z as l,
|
|
191
|
+
le as n,
|
|
192
|
+
se as o,
|
|
193
|
+
ne as r,
|
|
194
|
+
C as s,
|
|
195
|
+
A as t,
|
|
196
|
+
H as u
|
|
197
|
+
};
|
package/dist/utils/prefill.d.ts
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Contact details the host page already collected, passed to `init()`. Module
|
|
3
|
-
* state, like the partner attribution: the flow reads it as it mounts.
|
|
4
|
-
*/
|
|
5
1
|
import type { QuotePrefill } from '@getcredify/credify-insurance-ui-kit/ui';
|
|
6
2
|
export type WidgetPrefill = {
|
|
7
3
|
/** 5-digit ZIP. Anything else is dropped. */
|
|
8
4
|
zip?: string;
|
|
9
5
|
email?: string;
|
|
6
|
+
/** US number, masked or raw, with or without the country code. */
|
|
7
|
+
phone?: string;
|
|
10
8
|
};
|
|
11
9
|
/**
|
|
12
10
|
* Validates the host's `prefill` option. Every rejection path drops the value and
|