@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
|
@@ -1,1001 +0,0 @@
|
|
|
1
|
-
import { a4 as de, t as Oe, a6 as ze, U as F, a7 as $, a8 as Z, a9 as H, aa as Me, R as ge, r as y, p as We, _ as Be, ab as be, ac as Ve, ad as Ye, l as Ue, e as xe, h as Ge, F as Ke, f as Qe, ae as Je } from "./widget-CP6ApixH.js";
|
|
2
|
-
import { g as Xe, A as Ze, k as es, j as ss, S as ee, u as x, p as v, y as ts, m as _e, W as ye, H as ds, h as cs, b as as } from "./core-CrEw_I-E-CsRUhlZy.js";
|
|
3
|
-
import { useState as u, useRef as se, useCallback as ve, useEffect as O, useMemo as Ne } from "react";
|
|
4
|
-
import { jsxs as d, jsx as e, Fragment as rs } from "react/jsx-runtime";
|
|
5
|
-
import { C as ls } from "./car-B83tx4O2.js";
|
|
6
|
-
import { C as ns } from "./check-Bu17NqRV.js";
|
|
7
|
-
(function() {
|
|
8
|
-
if (typeof t > "u")
|
|
9
|
-
var t = { env: {} };
|
|
10
|
-
})();
|
|
11
|
-
/**
|
|
12
|
-
* @license lucide-react v0.562.0 - ISC
|
|
13
|
-
*
|
|
14
|
-
* This source code is licensed under the ISC license.
|
|
15
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/
|
|
17
|
-
const is = [
|
|
18
|
-
["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
|
|
19
|
-
["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2", key: "zix9uf" }]
|
|
20
|
-
], os = de("copy", is);
|
|
21
|
-
/**
|
|
22
|
-
* @license lucide-react v0.562.0 - ISC
|
|
23
|
-
*
|
|
24
|
-
* This source code is licensed under the ISC license.
|
|
25
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/
|
|
27
|
-
const ms = [
|
|
28
|
-
["path", { d: "M9 17H7A5 5 0 0 1 7 7h2", key: "8i5ue5" }],
|
|
29
|
-
["path", { d: "M15 7h2a5 5 0 1 1 0 10h-2", key: "1b9ql8" }],
|
|
30
|
-
["line", { x1: "8", x2: "16", y1: "12", y2: "12", key: "1jonct" }]
|
|
31
|
-
], us = de("link-2", ms);
|
|
32
|
-
/**
|
|
33
|
-
* @license lucide-react v0.562.0 - ISC
|
|
34
|
-
*
|
|
35
|
-
* This source code is licensed under the ISC license.
|
|
36
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
37
|
-
*/
|
|
38
|
-
const hs = [
|
|
39
|
-
[
|
|
40
|
-
"path",
|
|
41
|
-
{
|
|
42
|
-
d: "M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",
|
|
43
|
-
key: "9njp5v"
|
|
44
|
-
}
|
|
45
|
-
]
|
|
46
|
-
], we = de("phone", hs);
|
|
47
|
-
var fs = 2500, ps = (t) => {
|
|
48
|
-
if (!t) return null;
|
|
49
|
-
let a = Math.round((Date.parse(t) - Date.now()) / 864e5);
|
|
50
|
-
return !Number.isFinite(a) || a < 1 ? null : a === 1 ? "It works for 1 more day." : `It works for the next ${a} days.`;
|
|
51
|
-
}, gs = ({ quoteId: t }) => {
|
|
52
|
-
let [a, o] = u({ kind: "pending" }), [l, h] = u(!1), C = se(null), n = se(!1);
|
|
53
|
-
O(() => {
|
|
54
|
-
n.current || (n.current = !0, (async () => {
|
|
55
|
-
try {
|
|
56
|
-
let [{ issueResumeLink: m }, { buildResumeUrl: p }] = await Promise.all([import("./api-CWMwIjKu.js"), import("./widget-CP6ApixH.js").then((q) => q.ar).then((q) => q.u)]), { resumeToken: T, expiresAt: z } = await m(t ?? void 0);
|
|
57
|
-
o({
|
|
58
|
-
kind: "ready",
|
|
59
|
-
url: p(T),
|
|
60
|
-
expiresAt: z
|
|
61
|
-
});
|
|
62
|
-
} catch (m) {
|
|
63
|
-
Je() && console.error("Resume link unavailable:", m), o({ kind: "unavailable" });
|
|
64
|
-
}
|
|
65
|
-
})());
|
|
66
|
-
}, [t]), O(() => {
|
|
67
|
-
if (!l) return;
|
|
68
|
-
let m = setTimeout(() => h(!1), fs);
|
|
69
|
-
return () => clearTimeout(m);
|
|
70
|
-
}, [l]);
|
|
71
|
-
let f = ve(async (m) => {
|
|
72
|
-
C.current?.select();
|
|
73
|
-
try {
|
|
74
|
-
await navigator.clipboard.writeText(m), h(!0);
|
|
75
|
-
} catch {
|
|
76
|
-
h(!1);
|
|
77
|
-
}
|
|
78
|
-
}, []);
|
|
79
|
-
if (a.kind !== "ready") return null;
|
|
80
|
-
let w = ps(a.expiresAt);
|
|
81
|
-
return /* @__PURE__ */ e("div", {
|
|
82
|
-
"data-credify-resume-link": !0,
|
|
83
|
-
className: "cds-mt-6 cds-rounded-xl cds-border cds-border-border cds-bg-surface-muted cds-p-4",
|
|
84
|
-
children: /* @__PURE__ */ d("div", {
|
|
85
|
-
className: "cds-flex cds-items-start cds-gap-3",
|
|
86
|
-
children: [/* @__PURE__ */ e(us, {
|
|
87
|
-
"aria-hidden": "true",
|
|
88
|
-
className: "cds-mt-0.5 cds-h-5 cds-w-5 cds-shrink-0 cds-text-fg"
|
|
89
|
-
}), /* @__PURE__ */ d("div", {
|
|
90
|
-
className: "cds-min-w-0 cds-flex-1",
|
|
91
|
-
children: [
|
|
92
|
-
/* @__PURE__ */ e("h3", {
|
|
93
|
-
className: "cds-text-sm cds-font-bold cds-text-fg",
|
|
94
|
-
children: "Want to think it over?"
|
|
95
|
-
}),
|
|
96
|
-
/* @__PURE__ */ d("p", {
|
|
97
|
-
className: "cds-mt-1 cds-text-sm cds-text-fg-muted",
|
|
98
|
-
children: ["Save this link and open it on any device to come back to these quotes.", w ? ` ${w}` : ""]
|
|
99
|
-
}),
|
|
100
|
-
/* @__PURE__ */ d("div", {
|
|
101
|
-
className: "cds-mt-3 cds-flex cds-flex-col cds-gap-2 sm:cds-flex-row",
|
|
102
|
-
children: [/* @__PURE__ */ e("input", {
|
|
103
|
-
ref: C,
|
|
104
|
-
type: "text",
|
|
105
|
-
readOnly: !0,
|
|
106
|
-
value: a.url,
|
|
107
|
-
"aria-label": "Link back to your quotes",
|
|
108
|
-
onFocus: (m) => m.currentTarget.select(),
|
|
109
|
-
className: `cds-min-w-0 cds-flex-1 cds-rounded-lg cds-border cds-border-input cds-bg-surface-elevated cds-px-3 cds-py-2 cds-text-xs cds-text-fg-muted ${y}`
|
|
110
|
-
}), /* @__PURE__ */ d("button", {
|
|
111
|
-
type: "button",
|
|
112
|
-
onClick: () => void f(a.url),
|
|
113
|
-
className: `cds-inline-flex cds-shrink-0 cds-items-center cds-justify-center cds-gap-1.5 cds-rounded-lg cds-border cds-border-primary cds-px-4 cds-py-2 cds-text-sm cds-font-semibold cds-text-fg cds-transition-colors hover:cds-bg-primary hover:cds-text-primary-foreground ${y}`,
|
|
114
|
-
children: [e(l ? ns : os, {
|
|
115
|
-
"aria-hidden": "true",
|
|
116
|
-
className: "cds-h-4 cds-w-4"
|
|
117
|
-
}), l ? "Copied" : "Copy link"]
|
|
118
|
-
})]
|
|
119
|
-
}),
|
|
120
|
-
/* @__PURE__ */ e("p", {
|
|
121
|
-
"aria-live": "polite",
|
|
122
|
-
className: "sr-only",
|
|
123
|
-
children: l ? "Link copied to clipboard" : ""
|
|
124
|
-
}),
|
|
125
|
-
/* @__PURE__ */ e("p", {
|
|
126
|
-
className: "cds-mt-2 cds-text-xs cds-text-fg-muted",
|
|
127
|
-
children: "Anyone with this link can see your quote, so keep it to yourself. You'll still confirm by text message before anything is submitted to a carrier."
|
|
128
|
-
})
|
|
129
|
-
]
|
|
130
|
-
})]
|
|
131
|
-
})
|
|
132
|
-
});
|
|
133
|
-
}, Rs = /* @__PURE__ */ Oe({ RatesPanel: () => $s }), bs = 3e3, xs = 33e4, te = (t) => `$${(t / 100).toLocaleString("en-US", { maximumFractionDigits: 0 })}`, ys = (t) => t.split(/\s+/).filter(Boolean).slice(0, 2).map((a) => a[0]?.toUpperCase() ?? "").join(""), Ns = [
|
|
134
|
-
{
|
|
135
|
-
market: "admitted",
|
|
136
|
-
label: "Admitted"
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
market: "non_admitted",
|
|
140
|
-
label: "Non-admitted"
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
market: "not_quoted",
|
|
144
|
-
label: "Not quoted"
|
|
145
|
-
}
|
|
146
|
-
], D = (t) => ({
|
|
147
|
-
tab: `rates-tab-${t}`,
|
|
148
|
-
panel: `rates-panel-${t}`
|
|
149
|
-
}), qe = ({ rate: t, size: a }) => {
|
|
150
|
-
let o = x(t.carrier_name), l = a === "sm" ? "cds-h-9 cds-w-9" : "cds-h-10 cds-w-10";
|
|
151
|
-
return t.carrier_logo_base64 ? /* @__PURE__ */ e("img", {
|
|
152
|
-
src: `data:image/png;base64,${t.carrier_logo_base64}`,
|
|
153
|
-
alt: o,
|
|
154
|
-
className: `${l} cds-rounded cds-object-contain`
|
|
155
|
-
}) : /* @__PURE__ */ e("span", {
|
|
156
|
-
"aria-hidden": "true",
|
|
157
|
-
className: `cds-flex ${l} cds-shrink-0 cds-items-center cds-justify-center cds-rounded cds-bg-primary/10 cds-text-sm cds-font-bold cds-text-fg`,
|
|
158
|
-
children: ys(o)
|
|
159
|
-
});
|
|
160
|
-
}, ke = {
|
|
161
|
-
PersonalAuto: "Personal Auto",
|
|
162
|
-
PersonalHome: "Homeowners"
|
|
163
|
-
}, ks = {
|
|
164
|
-
PersonalHome: ds,
|
|
165
|
-
PersonalAuto: ls,
|
|
166
|
-
Flood: ye,
|
|
167
|
-
ExcessFlood: ye
|
|
168
|
-
}, E = ({ lob: t, size: a = "md" }) => {
|
|
169
|
-
let o = t && ks[t] || ee, l = a === "sm" ? "cds-h-5 cds-w-5" : "cds-h-7 cds-w-7", h = a === "sm" ? "cds-h-3 cds-w-3" : "cds-h-4 cds-w-4";
|
|
170
|
-
return /* @__PURE__ */ e("span", {
|
|
171
|
-
"aria-hidden": "true",
|
|
172
|
-
className: `cds-inline-flex ${l} cds-shrink-0 cds-items-center cds-justify-center cds-rounded-full cds-bg-accent/15 cds-ring-1 cds-ring-inset cds-ring-ring/25`,
|
|
173
|
-
children: /* @__PURE__ */ e(o, {
|
|
174
|
-
className: `${h} cds-text-accent`,
|
|
175
|
-
strokeWidth: 2.5
|
|
176
|
-
})
|
|
177
|
-
});
|
|
178
|
-
}, _s = ({ rate: t, showLob: a, isSelected: o, isRequested: l, lobLocked: h, onSelect: C }) => {
|
|
179
|
-
let n = x(t.carrier_name), f = as(t), w = a ? v(t.lob) : null, m = t.effective_date && t.policy_end_date ? `${t.effective_date} – ${t.policy_end_date}` : t.effective_date;
|
|
180
|
-
return /* @__PURE__ */ d("div", {
|
|
181
|
-
className: `cds-rounded-xl cds-border cds-bg-surface-elevated cds-p-4 ${l ? "cds-border-accent cds-ring-2 ring-emerald-500/30" : o ? "cds-border-accent cds-ring-2 cds-ring-ring/30" : "cds-border-border"} ${h ? "cds-opacity-60" : ""}`,
|
|
182
|
-
children: [
|
|
183
|
-
w ? /* @__PURE__ */ d("p", {
|
|
184
|
-
className: "cds-mb-2 cds-flex cds-items-center cds-gap-1.5 cds-text-xs cds-font-semibold cds-uppercase cds-tracking-wide cds-text-fg",
|
|
185
|
-
children: [/* @__PURE__ */ e(E, {
|
|
186
|
-
lob: t.lob,
|
|
187
|
-
size: "sm"
|
|
188
|
-
}), w]
|
|
189
|
-
}) : null,
|
|
190
|
-
/* @__PURE__ */ d("div", {
|
|
191
|
-
className: "cds-flex cds-items-center cds-gap-3",
|
|
192
|
-
children: [
|
|
193
|
-
/* @__PURE__ */ e(qe, {
|
|
194
|
-
rate: t,
|
|
195
|
-
size: "md"
|
|
196
|
-
}),
|
|
197
|
-
/* @__PURE__ */ d("div", {
|
|
198
|
-
className: "cds-min-w-0 cds-flex-1",
|
|
199
|
-
children: [
|
|
200
|
-
/* @__PURE__ */ e("p", {
|
|
201
|
-
className: "cds-truncate cds-font-bold cds-text-fg",
|
|
202
|
-
children: n
|
|
203
|
-
}),
|
|
204
|
-
/* @__PURE__ */ d("p", {
|
|
205
|
-
className: "cds-text-xs cds-text-fg-muted",
|
|
206
|
-
children: [
|
|
207
|
-
te(t.premium_cents),
|
|
208
|
-
" for ",
|
|
209
|
-
t.term_months,
|
|
210
|
-
" months"
|
|
211
|
-
]
|
|
212
|
-
}),
|
|
213
|
-
t.admitted_status === "non_admitted" ? /* @__PURE__ */ e("p", {
|
|
214
|
-
className: "cds-mt-1 cds-inline-block cds-rounded cds-bg-warning-surface cds-px-1.5 cds-py-0.5 cds-text-[11px] cds-font-semibold cds-text-warning-foreground",
|
|
215
|
-
children: "Surplus lines"
|
|
216
|
-
}) : null
|
|
217
|
-
]
|
|
218
|
-
}),
|
|
219
|
-
/* @__PURE__ */ d("div", {
|
|
220
|
-
className: "cds-text-right",
|
|
221
|
-
children: [/* @__PURE__ */ e("p", {
|
|
222
|
-
className: "cds-text-xl cds-font-extrabold cds-text-fg",
|
|
223
|
-
children: te(_e(t))
|
|
224
|
-
}), /* @__PURE__ */ e("p", {
|
|
225
|
-
className: "cds-text-xs cds-text-fg-muted",
|
|
226
|
-
children: "/mo"
|
|
227
|
-
})]
|
|
228
|
-
})
|
|
229
|
-
]
|
|
230
|
-
}),
|
|
231
|
-
m ? /* @__PURE__ */ d("p", {
|
|
232
|
-
className: "cds-mt-2 cds-text-xs cds-text-fg-muted",
|
|
233
|
-
children: ["Effective ", m]
|
|
234
|
-
}) : null,
|
|
235
|
-
f.length ? /* @__PURE__ */ e("dl", {
|
|
236
|
-
className: "cds-mt-3 cds-space-y-1 cds-border-t cds-border-border cds-pt-3 cds-text-xs",
|
|
237
|
-
children: f.map((p, T) => /* @__PURE__ */ d("div", {
|
|
238
|
-
className: "cds-flex cds-justify-between cds-gap-2",
|
|
239
|
-
children: [/* @__PURE__ */ e("dt", {
|
|
240
|
-
className: "cds-text-fg-muted",
|
|
241
|
-
children: p.label
|
|
242
|
-
}), /* @__PURE__ */ e("dd", {
|
|
243
|
-
className: "cds-text-right cds-font-semibold cds-text-fg",
|
|
244
|
-
children: p.value
|
|
245
|
-
})]
|
|
246
|
-
}, `${p.label}-${T}`))
|
|
247
|
-
}) : null,
|
|
248
|
-
t.carrier_quote_id ? /* @__PURE__ */ d("p", {
|
|
249
|
-
className: "cds-mt-2 cds-text-xs cds-text-fg-muted",
|
|
250
|
-
children: ["Carrier quote ID: ", t.carrier_quote_id]
|
|
251
|
-
}) : null,
|
|
252
|
-
l ? /* @__PURE__ */ e("p", {
|
|
253
|
-
className: "cds-mt-3 cds-rounded-lg cds-bg-highlight cds-px-4 cds-py-2 cds-text-center cds-text-sm cds-font-bold cds-text-accent",
|
|
254
|
-
children: "Request sent"
|
|
255
|
-
}) : h ? /* @__PURE__ */ d("p", {
|
|
256
|
-
className: "cds-mt-3 cds-text-center cds-text-xs cds-text-fg-muted",
|
|
257
|
-
children: [
|
|
258
|
-
"You already have a request in for ",
|
|
259
|
-
v(t.lob) ?? "this line",
|
|
260
|
-
"."
|
|
261
|
-
]
|
|
262
|
-
}) : /* @__PURE__ */ e("button", {
|
|
263
|
-
type: "button",
|
|
264
|
-
onClick: C,
|
|
265
|
-
className: `cds-mt-3 cds-w-full cds-rounded-lg cds-border cds-border-accent cds-px-4 cds-py-2 cds-text-sm cds-font-bold cds-text-fg hover:cds-bg-highlight ${y}`,
|
|
266
|
-
children: o ? "Selected" : "Continue with this quote"
|
|
267
|
-
})
|
|
268
|
-
]
|
|
269
|
-
});
|
|
270
|
-
}, vs = ({ rate: t }) => {
|
|
271
|
-
let a = (t.decline_reasons ?? []).filter(Boolean), o = t.decline_category?.trim();
|
|
272
|
-
return /* @__PURE__ */ d("div", {
|
|
273
|
-
className: "cds-flex cds-gap-3 cds-rounded-xl cds-border cds-border-border cds-bg-surface-elevated cds-p-4",
|
|
274
|
-
children: [/* @__PURE__ */ e(qe, {
|
|
275
|
-
rate: t,
|
|
276
|
-
size: "sm"
|
|
277
|
-
}), /* @__PURE__ */ d("div", {
|
|
278
|
-
className: "cds-min-w-0 cds-flex-1",
|
|
279
|
-
children: [
|
|
280
|
-
/* @__PURE__ */ e("p", {
|
|
281
|
-
className: "cds-font-bold cds-text-fg",
|
|
282
|
-
children: x(t.carrier_name)
|
|
283
|
-
}),
|
|
284
|
-
o ? /* @__PURE__ */ e("p", {
|
|
285
|
-
className: "cds-mt-0.5 cds-text-xs cds-font-semibold cds-uppercase cds-tracking-wide cds-text-fg-muted",
|
|
286
|
-
children: o
|
|
287
|
-
}) : null,
|
|
288
|
-
a.length ? /* @__PURE__ */ e("ul", {
|
|
289
|
-
className: "cds-mt-2 cds-list-outside cds-list-disc cds-space-y-1 cds-pl-5 cds-text-sm cds-text-fg-muted",
|
|
290
|
-
children: a.map((l, h) => /* @__PURE__ */ e("li", { children: l }, `${l}-${h}`))
|
|
291
|
-
}) : /* @__PURE__ */ e("p", {
|
|
292
|
-
className: "cds-mt-2 cds-text-sm cds-text-fg-muted",
|
|
293
|
-
children: "This carrier did not return a quote."
|
|
294
|
-
})
|
|
295
|
-
]
|
|
296
|
-
})]
|
|
297
|
-
});
|
|
298
|
-
}, R = ({ quoteId: t }) => t ? /* @__PURE__ */ d("div", {
|
|
299
|
-
className: "cds-mt-6 cds-inline-block cds-rounded-lg cds-border cds-border-border cds-bg-surface-muted cds-px-4 cds-py-2.5 cds-text-center",
|
|
300
|
-
children: [/* @__PURE__ */ e("p", {
|
|
301
|
-
className: "cds-text-xs cds-text-fg-muted",
|
|
302
|
-
children: "Reference ID"
|
|
303
|
-
}), /* @__PURE__ */ e("p", {
|
|
304
|
-
className: "cds-mt-0.5 cds-select-all cds-font-mono cds-text-sm cds-font-semibold cds-text-fg",
|
|
305
|
-
children: t
|
|
306
|
-
})]
|
|
307
|
-
}) : null, Q = ({ heading: t, body: a, quoteId: o }) => /* @__PURE__ */ d("div", {
|
|
308
|
-
className: "cds-py-6 cds-text-center",
|
|
309
|
-
children: [
|
|
310
|
-
/* @__PURE__ */ e("h2", {
|
|
311
|
-
className: "cds-mb-2 cds-text-2xl cds-font-bold cds-text-fg",
|
|
312
|
-
children: t
|
|
313
|
-
}),
|
|
314
|
-
/* @__PURE__ */ e("p", {
|
|
315
|
-
className: "cds-mb-6 cds-text-fg-muted",
|
|
316
|
-
children: a
|
|
317
|
-
}),
|
|
318
|
-
/* @__PURE__ */ d("a", {
|
|
319
|
-
href: H,
|
|
320
|
-
onClick: () => Z("phone_call_click", {
|
|
321
|
-
placement: "quote_rates_fallback",
|
|
322
|
-
phone: $
|
|
323
|
-
}),
|
|
324
|
-
className: `cds-inline-flex cds-items-center cds-gap-2 cds-rounded-xl cds-bg-accent cds-px-8 cds-py-3.5 cds-text-base cds-font-bold cds-text-primary-foreground hover:cds-bg-accent ${y}`,
|
|
325
|
-
children: [
|
|
326
|
-
/* @__PURE__ */ e(we, {
|
|
327
|
-
"aria-hidden": "true",
|
|
328
|
-
className: "cds-h-4 cds-w-4"
|
|
329
|
-
}),
|
|
330
|
-
"Call ",
|
|
331
|
-
$
|
|
332
|
-
]
|
|
333
|
-
}),
|
|
334
|
-
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(R, { quoteId: o }) })
|
|
335
|
-
]
|
|
336
|
-
}), ws = {
|
|
337
|
-
Auto: ["PersonalAuto"],
|
|
338
|
-
Home: ["PersonalHome"],
|
|
339
|
-
Bundle: ["PersonalAuto", "PersonalHome"]
|
|
340
|
-
}, I = (t) => t.length <= 1 ? t[0] ?? "" : `${t.slice(0, -1).join(", ")} and ${t[t.length - 1]}`, J = (t) => t.lob ?? "_other", X = (t, a) => {
|
|
341
|
-
let o = new Set(a.map((l) => l.lob));
|
|
342
|
-
return [...new Set(t.filter((l) => cs(l) !== "not_quoted").map((l) => l.lob).filter((l) => !!l))].filter((l) => !o.has(l));
|
|
343
|
-
}, qs = ({ appetites: t, product: a }) => {
|
|
344
|
-
let o = ws[a] ?? Object.keys(t ?? {}), l = [...new Set(o.flatMap((h) => t?.[h] ?? []).map(x))].slice(0, 8);
|
|
345
|
-
return l.length ? /* @__PURE__ */ d("p", {
|
|
346
|
-
className: "cds-mt-4 cds-text-sm cds-text-fg-muted",
|
|
347
|
-
children: [
|
|
348
|
-
"Checking ",
|
|
349
|
-
l.join(", "),
|
|
350
|
-
l.length >= 8 ? " and more" : "",
|
|
351
|
-
"…"
|
|
352
|
-
]
|
|
353
|
-
}) : null;
|
|
354
|
-
}, $s = ({ product: t, quoteId: a, describeField: o, onFixAnswers: l, onRetry: h, onBound: C }) => {
|
|
355
|
-
let [n, f] = u({ kind: "polling" }), [w, m] = u(null), [p, T] = u(), [z, q] = u({}), [N, $e] = u([]), [Ce, Ae] = u(!1), [M, ce] = u(""), [Ie, S] = u(), [W, ae] = u(!1), [P, B] = u(0), [re, le] = u(!1), [V, ne] = u(!1), [Te, ie] = u(), A = se(0), Y = ve(() => {
|
|
356
|
-
A.current += 1;
|
|
357
|
-
let s = A.current, c = Date.now(), r = async () => {
|
|
358
|
-
if (s === A.current) {
|
|
359
|
-
try {
|
|
360
|
-
let { quote: i } = await We(a ?? void 0);
|
|
361
|
-
if (s !== A.current) return;
|
|
362
|
-
T(i);
|
|
363
|
-
let K = i?.rates_status;
|
|
364
|
-
if (K === "completed") {
|
|
365
|
-
let { rates: j } = await Be(a ?? void 0);
|
|
366
|
-
if (s !== A.current) return;
|
|
367
|
-
let L = j ?? [];
|
|
368
|
-
f(L.length ? {
|
|
369
|
-
kind: "ready",
|
|
370
|
-
rates: L
|
|
371
|
-
} : { kind: "no_rates" });
|
|
372
|
-
return;
|
|
373
|
-
}
|
|
374
|
-
if (K === "no_rates") {
|
|
375
|
-
f({ kind: "no_rates" });
|
|
376
|
-
return;
|
|
377
|
-
}
|
|
378
|
-
if (K === "failed") {
|
|
379
|
-
let j = i?.last_validation_errors ?? [];
|
|
380
|
-
if (i?.last_failure_code === "BOLT_VALIDATION" && j.length) {
|
|
381
|
-
f({
|
|
382
|
-
kind: "validation_failed",
|
|
383
|
-
errors: j,
|
|
384
|
-
message: i?.rates_failure_message ?? void 0
|
|
385
|
-
});
|
|
386
|
-
return;
|
|
387
|
-
}
|
|
388
|
-
let L = i?.last_failure_code === "UNHANDLED" || i?.last_failure_code === "DISPATCH" || i?.last_failure_code === "BOLT_RATES";
|
|
389
|
-
f({
|
|
390
|
-
kind: "failed",
|
|
391
|
-
retryable: L,
|
|
392
|
-
message: i?.rates_failure_message ?? void 0
|
|
393
|
-
}), be(Error(i?.rates_failure_message || `Rating failed: ${i?.last_failure_code ?? "unknown"}`), {
|
|
394
|
-
phase: "rates_failed",
|
|
395
|
-
product: t,
|
|
396
|
-
quoteId: a,
|
|
397
|
-
failureCode: i?.last_failure_code
|
|
398
|
-
});
|
|
399
|
-
return;
|
|
400
|
-
}
|
|
401
|
-
} catch (i) {
|
|
402
|
-
Ve("rates poll failed", { status: Ye(i) });
|
|
403
|
-
}
|
|
404
|
-
if (Date.now() - c >= xs) {
|
|
405
|
-
f({
|
|
406
|
-
kind: "failed",
|
|
407
|
-
retryable: !0
|
|
408
|
-
}), be(/* @__PURE__ */ Error("Rating timed out before returning a result"), {
|
|
409
|
-
phase: "rates_timeout",
|
|
410
|
-
product: t,
|
|
411
|
-
quoteId: a
|
|
412
|
-
});
|
|
413
|
-
return;
|
|
414
|
-
}
|
|
415
|
-
setTimeout(() => void r(), bs);
|
|
416
|
-
}
|
|
417
|
-
};
|
|
418
|
-
r();
|
|
419
|
-
}, [a, t]);
|
|
420
|
-
O(() => (Y(), () => {
|
|
421
|
-
A.current += 1;
|
|
422
|
-
}), [Y]), O(() => {
|
|
423
|
-
if (P <= 0) return;
|
|
424
|
-
let s = setTimeout(() => B((c) => c - 1), 1e3);
|
|
425
|
-
return () => clearTimeout(s);
|
|
426
|
-
}, [P]);
|
|
427
|
-
let g = Ne(() => Xe(n.kind === "ready" ? n.rates : []), [n]), oe = (s) => Array.isArray(s) ? s.filter((c) => c && typeof c == "object") : [], Se = Ne(() => n.kind === "validation_failed" ? Ze(n.errors, {
|
|
428
|
-
describeField: o,
|
|
429
|
-
vehicles: oe(p?.vehicles),
|
|
430
|
-
drivers: oe(p?.drivers)
|
|
431
|
-
}) : void 0, [
|
|
432
|
-
n,
|
|
433
|
-
o,
|
|
434
|
-
p
|
|
435
|
-
]), b = w ?? (g.admitted.length ? "admitted" : g.non_admitted.length ? "non_admitted" : g.not_quoted.length ? "not_quoted" : "admitted"), me = async (s, c) => {
|
|
436
|
-
if (!a) return;
|
|
437
|
-
f({
|
|
438
|
-
kind: "verify",
|
|
439
|
-
rate: s,
|
|
440
|
-
rates: c
|
|
441
|
-
}), S(void 0), ce("");
|
|
442
|
-
let r = String(p?.phone ?? "");
|
|
443
|
-
try {
|
|
444
|
-
await Ge(a, r), B(60);
|
|
445
|
-
} catch (i) {
|
|
446
|
-
i instanceof xe && i.statusCode === 429 ? B(i.retryAfterSeconds ?? 60) : S("We could not text your code. Try again in a moment.");
|
|
447
|
-
}
|
|
448
|
-
}, Pe = async (s, c) => {
|
|
449
|
-
if (!(!a || W)) {
|
|
450
|
-
ae(!0), S(void 0);
|
|
451
|
-
try {
|
|
452
|
-
let { isVerified: r } = await Ue(a, M);
|
|
453
|
-
if (!r) {
|
|
454
|
-
S("That code did not match. Check it and try again.");
|
|
455
|
-
return;
|
|
456
|
-
}
|
|
457
|
-
f({
|
|
458
|
-
kind: "ready",
|
|
459
|
-
rates: c.length ? c : [s]
|
|
460
|
-
}), Ae(!0), q((i) => ({
|
|
461
|
-
...i,
|
|
462
|
-
[J(s)]: s.quote_rate_id
|
|
463
|
-
}));
|
|
464
|
-
} catch (r) {
|
|
465
|
-
S(r instanceof xe && r.statusCode === 429 ? "Too many attempts. Request a new code." : "We could not verify that code. Please try again.");
|
|
466
|
-
} finally {
|
|
467
|
-
ae(!1);
|
|
468
|
-
}
|
|
469
|
-
}
|
|
470
|
-
}, ue = (s) => {
|
|
471
|
-
Ke(), f({
|
|
472
|
-
kind: "bound",
|
|
473
|
-
rates: s
|
|
474
|
-
}), C?.(s);
|
|
475
|
-
}, Re = async (s) => {
|
|
476
|
-
if (V || !s.length) return;
|
|
477
|
-
ne(!0), ie(void 0);
|
|
478
|
-
try {
|
|
479
|
-
await Qe(s.map((r) => r.quote_rate_id), !0);
|
|
480
|
-
} catch {
|
|
481
|
-
ie(s.length > 1 ? "We could not submit those requests. Please call us and we will finish them for you." : "We could not submit that request. Please call us and we will finish it for you.");
|
|
482
|
-
return;
|
|
483
|
-
} finally {
|
|
484
|
-
ne(!1);
|
|
485
|
-
}
|
|
486
|
-
let c = [...N, ...s];
|
|
487
|
-
if ($e(c), q({}), X(n.kind === "ready" ? n.rates : [], c).length) {
|
|
488
|
-
le(!1);
|
|
489
|
-
return;
|
|
490
|
-
}
|
|
491
|
-
ue(c);
|
|
492
|
-
};
|
|
493
|
-
if (n.kind === "polling") return /* @__PURE__ */ d("div", {
|
|
494
|
-
className: "cds-py-10 cds-text-center",
|
|
495
|
-
"aria-live": "polite",
|
|
496
|
-
children: [
|
|
497
|
-
/* @__PURE__ */ e("div", {
|
|
498
|
-
className: "cds-mx-auto cds-mb-6 cds-h-10 cds-w-10 cds-animate-spin cds-rounded-full cds-border-4 cds-border-accent cds-border-t-transparent",
|
|
499
|
-
"aria-hidden": "true"
|
|
500
|
-
}),
|
|
501
|
-
/* @__PURE__ */ e("h2", {
|
|
502
|
-
className: "cds-mb-2 cds-text-2xl cds-font-bold cds-text-fg",
|
|
503
|
-
children: "Getting your quotes…"
|
|
504
|
-
}),
|
|
505
|
-
/* @__PURE__ */ e("p", {
|
|
506
|
-
className: "cds-text-fg-muted",
|
|
507
|
-
children: "Please keep this window open while we run your details through our carriers. This usually takes a minute or two."
|
|
508
|
-
}),
|
|
509
|
-
/* @__PURE__ */ e("p", {
|
|
510
|
-
className: "cds-mt-2 cds-text-fg-muted",
|
|
511
|
-
children: "If you get disconnected, your progress is saved in this browser — reopen this page and you'll pick up where you left off. Thanks for your patience."
|
|
512
|
-
}),
|
|
513
|
-
/* @__PURE__ */ e(qs, {
|
|
514
|
-
appetites: p?.appetites,
|
|
515
|
-
product: t
|
|
516
|
-
})
|
|
517
|
-
]
|
|
518
|
-
});
|
|
519
|
-
if (n.kind === "validation_failed") {
|
|
520
|
-
let s = Se;
|
|
521
|
-
return !s || s.isOpaque ? /* @__PURE__ */ e(Q, {
|
|
522
|
-
heading: "Let's finish this one together",
|
|
523
|
-
body: "The carrier needs a couple of details we can't collect online. An agent can sort it out with you in a few minutes.",
|
|
524
|
-
quoteId: a
|
|
525
|
-
}) : /* @__PURE__ */ d("div", {
|
|
526
|
-
className: "cds-py-6",
|
|
527
|
-
children: [
|
|
528
|
-
/* @__PURE__ */ d("div", {
|
|
529
|
-
className: "cds-mb-5 cds-rounded-xl cds-border cds-border-warning cds-bg-warning-surface cds-p-4",
|
|
530
|
-
children: [
|
|
531
|
-
/* @__PURE__ */ d("div", {
|
|
532
|
-
className: "cds-flex cds-items-start cds-gap-3",
|
|
533
|
-
children: [/* @__PURE__ */ e(ze, {
|
|
534
|
-
"aria-hidden": "true",
|
|
535
|
-
className: "cds-mt-0.5 cds-h-5 cds-w-5 cds-shrink-0 cds-text-warning"
|
|
536
|
-
}), /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ e("h2", {
|
|
537
|
-
className: "cds-text-lg cds-font-bold cds-text-fg",
|
|
538
|
-
children: "A few answers need another look"
|
|
539
|
-
}), /* @__PURE__ */ e("p", {
|
|
540
|
-
className: "cds-mt-1 cds-text-sm cds-text-fg-muted",
|
|
541
|
-
children: "The carrier couldn't price your quote until these are sorted. It only takes a minute."
|
|
542
|
-
})] })]
|
|
543
|
-
}),
|
|
544
|
-
/* @__PURE__ */ e("div", {
|
|
545
|
-
className: "cds-mt-4 cds-space-y-4",
|
|
546
|
-
children: s.groups.map((c) => /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ e("p", {
|
|
547
|
-
className: "cds-text-sm cds-font-bold cds-text-fg",
|
|
548
|
-
children: c.heading
|
|
549
|
-
}), c.sharedMessage ? /* @__PURE__ */ d("p", {
|
|
550
|
-
className: "cds-mt-1 cds-text-sm cds-text-fg-muted",
|
|
551
|
-
children: [
|
|
552
|
-
c.sharedMessage,
|
|
553
|
-
" ",
|
|
554
|
-
/* @__PURE__ */ e("span", {
|
|
555
|
-
className: "cds-font-semibold",
|
|
556
|
-
children: es(c.labels)
|
|
557
|
-
}),
|
|
558
|
-
"."
|
|
559
|
-
]
|
|
560
|
-
}) : /* @__PURE__ */ e("ul", {
|
|
561
|
-
className: "cds-mt-1 cds-list-outside cds-list-disc cds-space-y-1 cds-pl-5 cds-text-sm cds-text-fg-muted",
|
|
562
|
-
children: c.issues.map((r) => /* @__PURE__ */ e("li", { children: ss(r) }, `${r.label ?? ""}-${r.message}`))
|
|
563
|
-
})] }, c.id))
|
|
564
|
-
}),
|
|
565
|
-
s.otherCount ? /* @__PURE__ */ d("p", {
|
|
566
|
-
className: "cds-mt-4 cds-text-xs cds-text-fg-muted",
|
|
567
|
-
children: [
|
|
568
|
-
"The carrier flagged ",
|
|
569
|
-
s.otherCount,
|
|
570
|
-
" other ",
|
|
571
|
-
s.otherCount === 1 ? "detail" : "details",
|
|
572
|
-
" we'll check with you if it still won't price."
|
|
573
|
-
]
|
|
574
|
-
}) : null
|
|
575
|
-
]
|
|
576
|
-
}),
|
|
577
|
-
/* @__PURE__ */ e(F, {
|
|
578
|
-
onClick: () => l(n.errors),
|
|
579
|
-
children: "Fix my answers"
|
|
580
|
-
}),
|
|
581
|
-
/* @__PURE__ */ d("p", {
|
|
582
|
-
className: "cds-mt-4 cds-text-center cds-text-sm cds-text-fg-muted",
|
|
583
|
-
children: [
|
|
584
|
-
"Or call",
|
|
585
|
-
" ",
|
|
586
|
-
/* @__PURE__ */ e("a", {
|
|
587
|
-
href: H,
|
|
588
|
-
onClick: () => Z("phone_call_click", {
|
|
589
|
-
placement: "quote_rates_validation",
|
|
590
|
-
phone: $
|
|
591
|
-
}),
|
|
592
|
-
className: "cds-font-semibold cds-text-fg cds-underline",
|
|
593
|
-
children: $
|
|
594
|
-
}),
|
|
595
|
-
" ",
|
|
596
|
-
"and an agent will finish it with you."
|
|
597
|
-
]
|
|
598
|
-
}),
|
|
599
|
-
/* @__PURE__ */ e("div", {
|
|
600
|
-
className: "cds-text-center",
|
|
601
|
-
children: /* @__PURE__ */ e(R, { quoteId: a })
|
|
602
|
-
})
|
|
603
|
-
]
|
|
604
|
-
});
|
|
605
|
-
}
|
|
606
|
-
if (n.kind === "failed") return /* @__PURE__ */ e("div", {
|
|
607
|
-
className: "cds-py-6",
|
|
608
|
-
children: n.retryable ? /* @__PURE__ */ d("div", {
|
|
609
|
-
className: "cds-text-center",
|
|
610
|
-
children: [
|
|
611
|
-
/* @__PURE__ */ e("h2", {
|
|
612
|
-
className: "cds-mb-2 cds-text-2xl cds-font-bold cds-text-fg",
|
|
613
|
-
children: "That took longer than expected"
|
|
614
|
-
}),
|
|
615
|
-
/* @__PURE__ */ e("p", {
|
|
616
|
-
className: "cds-mb-6 cds-text-fg-muted",
|
|
617
|
-
children: n.message ?? "Our carrier connection hiccuped. One more try usually does it."
|
|
618
|
-
}),
|
|
619
|
-
/* @__PURE__ */ e(F, {
|
|
620
|
-
onClick: () => {
|
|
621
|
-
f({ kind: "polling" }), h().then((s) => {
|
|
622
|
-
s && Y();
|
|
623
|
-
});
|
|
624
|
-
},
|
|
625
|
-
children: "Try again"
|
|
626
|
-
}),
|
|
627
|
-
/* @__PURE__ */ d("p", {
|
|
628
|
-
className: "cds-mt-4 cds-text-sm cds-text-fg-muted",
|
|
629
|
-
children: [
|
|
630
|
-
"Or call",
|
|
631
|
-
" ",
|
|
632
|
-
/* @__PURE__ */ e("a", {
|
|
633
|
-
href: H,
|
|
634
|
-
className: "cds-font-semibold cds-text-fg cds-underline",
|
|
635
|
-
children: $
|
|
636
|
-
}),
|
|
637
|
-
" ",
|
|
638
|
-
"and an agent will pull them for you."
|
|
639
|
-
]
|
|
640
|
-
}),
|
|
641
|
-
/* @__PURE__ */ e(R, { quoteId: a })
|
|
642
|
-
]
|
|
643
|
-
}) : /* @__PURE__ */ e(Q, {
|
|
644
|
-
heading: "Let's get your quotes another way",
|
|
645
|
-
body: "A licensed agent can pull your quotes over the phone in a few minutes — no waiting.",
|
|
646
|
-
quoteId: a
|
|
647
|
-
})
|
|
648
|
-
});
|
|
649
|
-
if (n.kind === "no_rates") return /* @__PURE__ */ e(Q, {
|
|
650
|
-
heading: "No online offers for this one",
|
|
651
|
-
body: "That happens with some homes and vehicles. An agent has access to carriers that don't quote online.",
|
|
652
|
-
quoteId: a
|
|
653
|
-
});
|
|
654
|
-
if (n.kind === "verify") {
|
|
655
|
-
let { rate: s, rates: c } = n;
|
|
656
|
-
return /* @__PURE__ */ d("div", {
|
|
657
|
-
className: "cds-py-6",
|
|
658
|
-
children: [
|
|
659
|
-
/* @__PURE__ */ e("h2", {
|
|
660
|
-
className: "cds-mb-2 cds-text-2xl cds-font-bold cds-text-fg",
|
|
661
|
-
children: "Verify your number"
|
|
662
|
-
}),
|
|
663
|
-
/* @__PURE__ */ d("p", {
|
|
664
|
-
className: "cds-mb-6 cds-text-fg-muted",
|
|
665
|
-
children: [
|
|
666
|
-
"We texted a 6-digit code to confirm it's you before we send your ",
|
|
667
|
-
s.carrier_name,
|
|
668
|
-
" request."
|
|
669
|
-
]
|
|
670
|
-
}),
|
|
671
|
-
/* @__PURE__ */ e("label", {
|
|
672
|
-
htmlFor: "sms-code",
|
|
673
|
-
className: "cds-mb-1 cds-block cds-text-sm cds-font-semibold cds-text-fg",
|
|
674
|
-
children: "Verification code"
|
|
675
|
-
}),
|
|
676
|
-
/* @__PURE__ */ e("input", {
|
|
677
|
-
id: "sms-code",
|
|
678
|
-
type: "text",
|
|
679
|
-
inputMode: "numeric",
|
|
680
|
-
autoComplete: "one-time-code",
|
|
681
|
-
maxLength: 6,
|
|
682
|
-
value: M,
|
|
683
|
-
onChange: (r) => ce(r.target.value.replace(/\D/g, "").slice(0, 6)),
|
|
684
|
-
className: `${Me} cds-tracking-[0.4em]`
|
|
685
|
-
}),
|
|
686
|
-
/* @__PURE__ */ e(ge, { message: Ie }),
|
|
687
|
-
/* @__PURE__ */ e(F, {
|
|
688
|
-
disabled: M.length !== 6 || W,
|
|
689
|
-
onClick: () => void Pe(s, c),
|
|
690
|
-
children: W ? "Verifying…" : "Verify and continue"
|
|
691
|
-
}),
|
|
692
|
-
/* @__PURE__ */ e("button", {
|
|
693
|
-
type: "button",
|
|
694
|
-
disabled: P > 0,
|
|
695
|
-
onClick: () => void me(s, c),
|
|
696
|
-
className: `cds-mt-3 cds-w-full cds-rounded-lg cds-px-4 cds-py-2 cds-text-sm cds-font-semibold cds-text-fg cds-underline disabled:cds-no-underline disabled:cds-opacity-60 ${y}`,
|
|
697
|
-
children: P > 0 ? `Resend code in ${P}s` : "Resend code"
|
|
698
|
-
})
|
|
699
|
-
]
|
|
700
|
-
});
|
|
701
|
-
}
|
|
702
|
-
if (n.kind === "bound") {
|
|
703
|
-
let s = n.rates.length === 1 ? n.rates[0] : void 0;
|
|
704
|
-
return /* @__PURE__ */ d("div", {
|
|
705
|
-
className: "cds-py-10 cds-text-center",
|
|
706
|
-
children: [
|
|
707
|
-
/* @__PURE__ */ e(ee, {
|
|
708
|
-
"aria-hidden": "true",
|
|
709
|
-
className: "cds-mx-auto cds-mb-4 cds-h-12 cds-w-12 cds-text-accent"
|
|
710
|
-
}),
|
|
711
|
-
/* @__PURE__ */ e("h2", {
|
|
712
|
-
className: "cds-mb-2 cds-text-2xl cds-font-bold cds-text-fg",
|
|
713
|
-
children: "You're all set"
|
|
714
|
-
}),
|
|
715
|
-
s ? /* @__PURE__ */ d("p", {
|
|
716
|
-
className: "cds-text-fg-muted",
|
|
717
|
-
children: [
|
|
718
|
-
"A licensed agent is finalizing your ",
|
|
719
|
-
x(s.carrier_name),
|
|
720
|
-
" policy and will call you shortly to confirm the details."
|
|
721
|
-
]
|
|
722
|
-
}) : /* @__PURE__ */ d(rs, { children: [/* @__PURE__ */ e("p", {
|
|
723
|
-
className: "cds-mb-4 cds-text-fg-muted",
|
|
724
|
-
children: "A licensed agent is finalizing these policies and will call you shortly to confirm the details."
|
|
725
|
-
}), /* @__PURE__ */ e("ul", {
|
|
726
|
-
className: "cds-mx-auto cds-max-w-sm cds-space-y-2 cds-text-left",
|
|
727
|
-
children: n.rates.map((c) => /* @__PURE__ */ d("li", {
|
|
728
|
-
className: "cds-flex cds-items-center cds-gap-2 cds-rounded-lg cds-border cds-border-border cds-bg-surface-elevated cds-p-3 cds-text-sm",
|
|
729
|
-
children: [/* @__PURE__ */ e(E, { lob: c.lob }), /* @__PURE__ */ d("span", { children: [/* @__PURE__ */ e("span", {
|
|
730
|
-
className: "cds-font-bold cds-text-fg",
|
|
731
|
-
children: x(c.carrier_name)
|
|
732
|
-
}), v(c.lob) ? /* @__PURE__ */ d("span", {
|
|
733
|
-
className: "cds-text-fg-muted",
|
|
734
|
-
children: [" — ", v(c.lob)]
|
|
735
|
-
}) : null] })]
|
|
736
|
-
}, c.quote_rate_id))
|
|
737
|
-
})] }),
|
|
738
|
-
/* @__PURE__ */ e(R, { quoteId: a }),
|
|
739
|
-
/* @__PURE__ */ d("p", {
|
|
740
|
-
className: "cds-mt-2 cds-text-xs cds-text-fg-muted",
|
|
741
|
-
children: [
|
|
742
|
-
"Quote this if you call us about ",
|
|
743
|
-
n.rates.length > 1 ? "these requests" : "this request",
|
|
744
|
-
"."
|
|
745
|
-
]
|
|
746
|
-
})
|
|
747
|
-
]
|
|
748
|
-
});
|
|
749
|
-
}
|
|
750
|
-
let U = new Set(N.map((s) => s.quote_rate_id)), je = new Set(N.map((s) => s.lob)), he = (s) => z[J(s)] === s.quote_rate_id, k = n.rates.filter((s) => he(s) && !U.has(s.quote_rate_id)), Le = Ce, G = X(n.rates, N), Fe = X(n.rates, []).length > 1, fe = G.filter((s) => !k.some((c) => c.lob === s)), _ = Ns.filter((s) => s.market !== "not_quoted" || g.not_quoted.length > 0), De = g.admitted.length + g.non_admitted.length, He = ts(b === "not_quoted" ? g.not_quoted : g[b], { sortBy: b === "not_quoted" ? "carrier" : "premium" }), pe = t === "Bundle" ? [{
|
|
751
|
-
lob: "PersonalAuto",
|
|
752
|
-
label: ke.PersonalAuto
|
|
753
|
-
}, {
|
|
754
|
-
lob: "PersonalHome",
|
|
755
|
-
label: ke.PersonalHome
|
|
756
|
-
}].filter(({ lob: s }) => !n.rates.some((c) => c.lob === s)) : [], Ee = (s) => {
|
|
757
|
-
let c = s.key === "ArrowRight" ? 1 : s.key === "ArrowLeft" ? -1 : 0, r = s.key === "Home" ? _[0] : s.key === "End" ? _[_.length - 1] : c ? _[(_.findIndex((i) => i.market === b) + c + _.length) % _.length] : void 0;
|
|
758
|
-
r && (s.preventDefault(), m(r.market), setTimeout(() => document.getElementById(D(r.market).tab)?.focus(), 0));
|
|
759
|
-
};
|
|
760
|
-
return /* @__PURE__ */ d("div", {
|
|
761
|
-
className: "cds-py-2",
|
|
762
|
-
children: [
|
|
763
|
-
/* @__PURE__ */ e("h2", {
|
|
764
|
-
className: "cds-mb-1 cds-text-2xl cds-font-bold cds-text-fg",
|
|
765
|
-
children: "Your quotes"
|
|
766
|
-
}),
|
|
767
|
-
/* @__PURE__ */ e("p", {
|
|
768
|
-
className: "cds-mb-4 cds-text-sm cds-text-fg-muted",
|
|
769
|
-
children: "Real prices from our carriers, based on the answers you gave."
|
|
770
|
-
}),
|
|
771
|
-
pe.length ? /* @__PURE__ */ e("div", {
|
|
772
|
-
className: "cds-mb-4 cds-space-y-1",
|
|
773
|
-
children: pe.map(({ lob: s, label: c }) => /* @__PURE__ */ d("p", {
|
|
774
|
-
className: "cds-text-sm cds-text-fg-muted",
|
|
775
|
-
children: [
|
|
776
|
-
"Sorry, no rates found for ",
|
|
777
|
-
c,
|
|
778
|
-
"."
|
|
779
|
-
]
|
|
780
|
-
}, s))
|
|
781
|
-
}) : null,
|
|
782
|
-
N.length > 0 && G.length > 0 ? /* @__PURE__ */ d("div", {
|
|
783
|
-
className: "cds-mb-5 cds-rounded-xl cds-border cds-border-accent cds-bg-highlight cds-p-4",
|
|
784
|
-
role: "status",
|
|
785
|
-
"aria-live": "polite",
|
|
786
|
-
children: [/* @__PURE__ */ d("div", {
|
|
787
|
-
className: "cds-flex cds-items-start cds-gap-3",
|
|
788
|
-
children: [/* @__PURE__ */ e(ee, {
|
|
789
|
-
"aria-hidden": "true",
|
|
790
|
-
className: "cds-mt-0.5 cds-h-5 cds-w-5 cds-shrink-0 cds-text-accent"
|
|
791
|
-
}), /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ d("h3", {
|
|
792
|
-
className: "cds-text-sm cds-font-bold cds-text-fg",
|
|
793
|
-
children: [
|
|
794
|
-
"We've sent your ",
|
|
795
|
-
I(N.map((s) => v(s.lob) ?? x(s.carrier_name))),
|
|
796
|
-
" request to",
|
|
797
|
-
" ",
|
|
798
|
-
I(N.map((s) => x(s.carrier_name)))
|
|
799
|
-
]
|
|
800
|
-
}), /* @__PURE__ */ d("p", {
|
|
801
|
-
className: "cds-mt-1 cds-text-sm cds-text-fg-muted",
|
|
802
|
-
children: [
|
|
803
|
-
"You can still add ",
|
|
804
|
-
I(G.map((s) => v(s) ?? s)),
|
|
805
|
-
" — pick a quote above and we'll send that one too. You won't need another verification code."
|
|
806
|
-
]
|
|
807
|
-
})] })]
|
|
808
|
-
}), /* @__PURE__ */ e("button", {
|
|
809
|
-
type: "button",
|
|
810
|
-
onClick: () => ue(N),
|
|
811
|
-
className: `cds-mt-3 cds-text-sm cds-font-semibold cds-text-fg cds-underline ${y}`,
|
|
812
|
-
children: "No thanks, I'm done"
|
|
813
|
-
})]
|
|
814
|
-
}) : null,
|
|
815
|
-
/* @__PURE__ */ e("div", {
|
|
816
|
-
className: "cds-mb-4 -cds-mx-1 cds-overflow-x-auto cds-border-b cds-border-border cds-px-1",
|
|
817
|
-
children: /* @__PURE__ */ e("div", {
|
|
818
|
-
className: "cds-flex cds-items-center cds-gap-4 sm:cds-gap-6",
|
|
819
|
-
role: "tablist",
|
|
820
|
-
"aria-label": "Rate market type",
|
|
821
|
-
children: _.map((s) => {
|
|
822
|
-
let c = s.market === b, r = D(s.market);
|
|
823
|
-
return /* @__PURE__ */ d("button", {
|
|
824
|
-
id: r.tab,
|
|
825
|
-
type: "button",
|
|
826
|
-
role: "tab",
|
|
827
|
-
"aria-selected": c,
|
|
828
|
-
"aria-controls": r.panel,
|
|
829
|
-
tabIndex: c ? 0 : -1,
|
|
830
|
-
onClick: () => m(s.market),
|
|
831
|
-
onKeyDown: Ee,
|
|
832
|
-
className: `cds-whitespace-nowrap cds-border-b-2 cds-px-1 cds-py-2 cds-text-xs cds-font-semibold cds-transition-colors sm:cds-text-sm ${y} ${c ? "cds-border-accent cds-text-fg" : "cds-border-transparent cds-text-fg-muted hover:cds-text-fg"}`,
|
|
833
|
-
children: [
|
|
834
|
-
s.label,
|
|
835
|
-
" (",
|
|
836
|
-
g[s.market].length,
|
|
837
|
-
")"
|
|
838
|
-
]
|
|
839
|
-
}, s.market);
|
|
840
|
-
})
|
|
841
|
-
})
|
|
842
|
-
}),
|
|
843
|
-
/* @__PURE__ */ d("div", {
|
|
844
|
-
id: D(b).panel,
|
|
845
|
-
role: "tabpanel",
|
|
846
|
-
"aria-labelledby": D(b).tab,
|
|
847
|
-
tabIndex: 0,
|
|
848
|
-
className: `cds-mb-6 cds-outline-none ${y}`,
|
|
849
|
-
children: [
|
|
850
|
-
b === "admitted" && !g.admitted.length ? /* @__PURE__ */ e("p", {
|
|
851
|
-
className: "cds-text-sm cds-text-fg-muted",
|
|
852
|
-
children: "No admitted-market carriers priced this quote."
|
|
853
|
-
}) : null,
|
|
854
|
-
b === "non_admitted" && !g.non_admitted.length ? /* @__PURE__ */ e("p", {
|
|
855
|
-
className: "cds-text-sm cds-text-fg-muted",
|
|
856
|
-
children: "No surplus-lines carriers priced this quote."
|
|
857
|
-
}) : null,
|
|
858
|
-
b === "not_quoted" ? /* @__PURE__ */ e("p", {
|
|
859
|
-
className: "cds-mb-3 cds-text-sm cds-text-fg-muted",
|
|
860
|
-
children: "These carriers looked at your details and passed. Their reasons are below."
|
|
861
|
-
}) : null,
|
|
862
|
-
He.map((s, c) => /* @__PURE__ */ d("div", {
|
|
863
|
-
className: "cds-mb-5 last:cds-mb-0",
|
|
864
|
-
children: [
|
|
865
|
-
c ? /* @__PURE__ */ e("div", {
|
|
866
|
-
"aria-hidden": "true",
|
|
867
|
-
className: "cds-mb-5 cds-h-px cds-bg-gradient-to-r cds-from-transparent cds-via-brand-accent/40 cds-to-transparent"
|
|
868
|
-
}) : null,
|
|
869
|
-
s.lob ? /* @__PURE__ */ d("h3", {
|
|
870
|
-
className: "cds-mb-2 cds-flex cds-items-center cds-gap-2 cds-text-sm cds-font-bold cds-uppercase cds-tracking-wide cds-text-fg",
|
|
871
|
-
children: [/* @__PURE__ */ e(E, { lob: s.lob }), s.title]
|
|
872
|
-
}) : null,
|
|
873
|
-
/* @__PURE__ */ e("ul", {
|
|
874
|
-
className: "cds-space-y-3",
|
|
875
|
-
children: s.rates.map((r) => b === "not_quoted" ? /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(vs, { rate: r }) }, r.quote_rate_id) : /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(_s, {
|
|
876
|
-
rate: r,
|
|
877
|
-
showLob: !s.lob,
|
|
878
|
-
isSelected: he(r),
|
|
879
|
-
isRequested: U.has(r.quote_rate_id),
|
|
880
|
-
lobLocked: !U.has(r.quote_rate_id) && je.has(r.lob),
|
|
881
|
-
onSelect: () => Le ? q((i) => ({
|
|
882
|
-
...i,
|
|
883
|
-
[J(r)]: r.quote_rate_id
|
|
884
|
-
})) : void me(r, n.rates)
|
|
885
|
-
}) }, r.quote_rate_id))
|
|
886
|
-
})
|
|
887
|
-
]
|
|
888
|
-
}, s.lob ?? "all"))
|
|
889
|
-
]
|
|
890
|
-
}),
|
|
891
|
-
De ? null : /* @__PURE__ */ d("div", {
|
|
892
|
-
className: "cds-mb-6 cds-rounded-xl cds-border cds-border-border cds-bg-surface-muted cds-p-4 cds-text-center",
|
|
893
|
-
children: [
|
|
894
|
-
/* @__PURE__ */ e("p", {
|
|
895
|
-
className: "cds-mb-3 cds-text-sm cds-text-fg-muted",
|
|
896
|
-
children: "No carrier priced this one online. An agent has access to carriers that don't quote on the web."
|
|
897
|
-
}),
|
|
898
|
-
/* @__PURE__ */ d("a", {
|
|
899
|
-
href: H,
|
|
900
|
-
onClick: () => Z("phone_call_click", {
|
|
901
|
-
placement: "quote_rates_all_declined",
|
|
902
|
-
phone: $
|
|
903
|
-
}),
|
|
904
|
-
className: `cds-inline-flex cds-items-center cds-gap-2 cds-rounded-xl cds-bg-accent cds-px-6 cds-py-3 cds-text-sm cds-font-bold cds-text-primary-foreground hover:cds-bg-accent ${y}`,
|
|
905
|
-
children: [
|
|
906
|
-
/* @__PURE__ */ e(we, {
|
|
907
|
-
"aria-hidden": "true",
|
|
908
|
-
className: "cds-h-4 cds-w-4"
|
|
909
|
-
}),
|
|
910
|
-
"Call ",
|
|
911
|
-
$
|
|
912
|
-
]
|
|
913
|
-
}),
|
|
914
|
-
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(R, { quoteId: a }) })
|
|
915
|
-
]
|
|
916
|
-
}),
|
|
917
|
-
k.length ? /* @__PURE__ */ d("div", {
|
|
918
|
-
className: "cds-rounded-xl cds-border cds-border-border cds-bg-surface-muted cds-p-4",
|
|
919
|
-
children: [
|
|
920
|
-
/* @__PURE__ */ d("h3", {
|
|
921
|
-
className: "cds-mb-2 cds-text-sm cds-font-bold cds-text-fg",
|
|
922
|
-
children: ["Finish with ", I(k.map((s) => x(s.carrier_name)))]
|
|
923
|
-
}),
|
|
924
|
-
Fe ? /* @__PURE__ */ e("ul", {
|
|
925
|
-
className: "cds-mb-3 cds-space-y-1",
|
|
926
|
-
children: k.map((s) => /* @__PURE__ */ d("li", {
|
|
927
|
-
className: "cds-flex cds-justify-between cds-gap-2 cds-text-xs",
|
|
928
|
-
children: [/* @__PURE__ */ d("span", {
|
|
929
|
-
className: "cds-flex cds-items-center cds-gap-1.5 cds-text-fg-muted",
|
|
930
|
-
children: [/* @__PURE__ */ e(E, {
|
|
931
|
-
lob: s.lob,
|
|
932
|
-
size: "sm"
|
|
933
|
-
}), v(s.lob) ?? "Policy"]
|
|
934
|
-
}), /* @__PURE__ */ d("span", {
|
|
935
|
-
className: "cds-text-right cds-font-semibold cds-text-fg",
|
|
936
|
-
children: [
|
|
937
|
-
x(s.carrier_name),
|
|
938
|
-
" · ",
|
|
939
|
-
te(_e(s)),
|
|
940
|
-
"/mo"
|
|
941
|
-
]
|
|
942
|
-
})]
|
|
943
|
-
}, s.quote_rate_id))
|
|
944
|
-
}) : null,
|
|
945
|
-
/* @__PURE__ */ d("label", {
|
|
946
|
-
className: "cds-mb-3 cds-flex cds-cursor-pointer cds-items-start cds-gap-2 cds-text-xs cds-text-fg-muted",
|
|
947
|
-
children: [/* @__PURE__ */ e("input", {
|
|
948
|
-
type: "checkbox",
|
|
949
|
-
checked: re,
|
|
950
|
-
onChange: (s) => le(s.target.checked),
|
|
951
|
-
className: "cds-mt-0.5"
|
|
952
|
-
}), /* @__PURE__ */ d("span", { children: [
|
|
953
|
-
"I acknowledge the",
|
|
954
|
-
" ",
|
|
955
|
-
/* @__PURE__ */ e("a", {
|
|
956
|
-
href: "/privacy-policy",
|
|
957
|
-
className: "cds-font-semibold cds-text-fg cds-underline",
|
|
958
|
-
children: "Privacy Notice"
|
|
959
|
-
}),
|
|
960
|
-
" ",
|
|
961
|
-
"and authorize Credify to share my information with",
|
|
962
|
-
" ",
|
|
963
|
-
/* @__PURE__ */ e("span", {
|
|
964
|
-
className: "cds-font-semibold",
|
|
965
|
-
children: I(k.map((s) => x(s.carrier_name)))
|
|
966
|
-
}),
|
|
967
|
-
" to complete my",
|
|
968
|
-
" ",
|
|
969
|
-
k.length > 1 ? "applications" : "application",
|
|
970
|
-
"."
|
|
971
|
-
] })]
|
|
972
|
-
}),
|
|
973
|
-
fe.length ? /* @__PURE__ */ d("p", {
|
|
974
|
-
className: "cds-mb-3 cds-text-xs cds-text-fg-muted",
|
|
975
|
-
children: [
|
|
976
|
-
"You haven't picked a ",
|
|
977
|
-
I(fe.map((s) => v(s) ?? s)),
|
|
978
|
-
" quote yet — choose one above to request both together, or go ahead and we'll ask about it after."
|
|
979
|
-
]
|
|
980
|
-
}) : null,
|
|
981
|
-
/* @__PURE__ */ e(ge, { message: Te }),
|
|
982
|
-
/* @__PURE__ */ e(F, {
|
|
983
|
-
disabled: !re || V,
|
|
984
|
-
onClick: () => void Re(k),
|
|
985
|
-
children: V ? "Submitting…" : k.length > 1 ? "Request these policies" : "Request this policy"
|
|
986
|
-
})
|
|
987
|
-
]
|
|
988
|
-
}) : null,
|
|
989
|
-
/* @__PURE__ */ e(gs, { quoteId: a }),
|
|
990
|
-
/* @__PURE__ */ e("p", {
|
|
991
|
-
className: "cds-mt-6 cds-text-xs cds-leading-relaxed cds-text-fg-muted",
|
|
992
|
-
children: "Quotes are estimates based on the information provided and are subject to carrier underwriting. Final premiums may differ."
|
|
993
|
-
})
|
|
994
|
-
]
|
|
995
|
-
});
|
|
996
|
-
};
|
|
997
|
-
export {
|
|
998
|
-
Rs as n,
|
|
999
|
-
gs as r,
|
|
1000
|
-
$s as t
|
|
1001
|
-
};
|