@opendoor/partner-sdk-client-vue 1.3.3-beta.113.1 → 1.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +50 -0
- package/dist/index.js +1254 -1228
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
import { defineComponent as F, computed as w, provide as
|
|
1
|
+
import { defineComponent as F, computed as w, provide as de, ref as I, watch as ee, onUnmounted as le, renderSlot as ce, inject as x, openBlock as c, createElementBlock as p, normalizeClass as e, createElementVNode as t, onMounted as ve, normalizeStyle as X, createCommentVNode as E, Fragment as j, toDisplayString as _, renderList as Q, withKeys as Se, withModifiers as De, createBlock as K, unref as B, withDirectives as Ee, vModelText as qe, resolveDynamicComponent as Pe, createTextVNode as be, Teleport as Ge, createVNode as ue, useSlots as Oe, withCtx as He } from "vue";
|
|
2
2
|
import { NOOP_TRACKING as Ie, TrackingClient as je } from "@opendoor/partner-sdk-client-js-core/internal/tracking";
|
|
3
3
|
import { resolveAppearance as Ve } from "@opendoor/partner-sdk-client-js-core";
|
|
4
|
-
import { DTC_ONBOARDING_PAGE_IDS as ar, OpendoorClient as
|
|
4
|
+
import { DTC_ONBOARDING_PAGE_IDS as ar, OpendoorClient as or, THEMES as lr, resolveAppearance as rr } from "@opendoor/partner-sdk-client-js-core";
|
|
5
5
|
import { createDtcOnboardingFlow as Me } from "@opendoor/partner-sdk-client-js-core/internal/questionnaire";
|
|
6
|
-
const
|
|
6
|
+
const Ql = /* @__PURE__ */ F({
|
|
7
7
|
__name: "OpendoorProvider",
|
|
8
8
|
props: {
|
|
9
9
|
client: {}
|
|
10
10
|
},
|
|
11
|
-
setup(
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
const
|
|
15
|
-
return
|
|
16
|
-
() =>
|
|
11
|
+
setup(n) {
|
|
12
|
+
const s = n, l = w(() => s.client);
|
|
13
|
+
de("opendoor-client", l);
|
|
14
|
+
const o = I(Ie);
|
|
15
|
+
return de("opendoor-tracking", o), ee(
|
|
16
|
+
() => s.client,
|
|
17
17
|
() => {
|
|
18
|
-
|
|
19
|
-
const
|
|
20
|
-
|
|
18
|
+
o.value !== Ie && o.value.destroy();
|
|
19
|
+
const u = new je(s.client.environment);
|
|
20
|
+
o.value = u;
|
|
21
21
|
},
|
|
22
22
|
{ immediate: !0 }
|
|
23
|
-
),
|
|
24
|
-
|
|
25
|
-
}), (
|
|
23
|
+
), le(() => {
|
|
24
|
+
o.value !== Ie && o.value.destroy();
|
|
25
|
+
}), (u, r) => ce(u.$slots, "default");
|
|
26
26
|
}
|
|
27
27
|
});
|
|
28
|
-
function
|
|
29
|
-
const
|
|
30
|
-
if (!
|
|
28
|
+
function Be() {
|
|
29
|
+
const n = x("opendoor-client");
|
|
30
|
+
if (!n)
|
|
31
31
|
throw new Error(
|
|
32
32
|
"useOpendoorClient must be used within an <OpendoorProvider>"
|
|
33
33
|
);
|
|
34
|
-
return
|
|
34
|
+
return n;
|
|
35
35
|
}
|
|
36
|
-
function
|
|
37
|
-
const
|
|
38
|
-
for (const [
|
|
39
|
-
const
|
|
40
|
-
|
|
36
|
+
function ye(n) {
|
|
37
|
+
const s = Ve(n), l = {};
|
|
38
|
+
for (const [o, u] of Object.entries(s)) {
|
|
39
|
+
const r = o.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
40
|
+
l[`--od-${r}`] = u;
|
|
41
41
|
}
|
|
42
|
-
return
|
|
42
|
+
return l;
|
|
43
43
|
}
|
|
44
44
|
const xe = /* @__PURE__ */ F({
|
|
45
45
|
__name: "PoweredByOpendoor",
|
|
46
|
-
setup(
|
|
47
|
-
return (
|
|
48
|
-
class: e(
|
|
46
|
+
setup(n) {
|
|
47
|
+
return (s, l) => (c(), p("div", {
|
|
48
|
+
class: e(s.$style.attribution),
|
|
49
49
|
"data-testid": "od-attribution"
|
|
50
50
|
}, [
|
|
51
51
|
t("span", {
|
|
52
|
-
class: e(
|
|
52
|
+
class: e(s.$style.text)
|
|
53
53
|
}, "Powered by", 2),
|
|
54
|
-
|
|
54
|
+
l[0] || (l[0] = t("svg", {
|
|
55
55
|
width: "75",
|
|
56
56
|
height: "16",
|
|
57
57
|
viewBox: "0 0 112.574 24.0002",
|
|
@@ -70,14 +70,14 @@ const xe = /* @__PURE__ */ F({
|
|
|
70
70
|
}), Ue = "_attribution_18rgp_8", Ze = "_text_18rgp_17", ze = {
|
|
71
71
|
attribution: Ue,
|
|
72
72
|
text: Ze
|
|
73
|
-
}, V = (
|
|
74
|
-
const
|
|
75
|
-
for (const [
|
|
76
|
-
|
|
77
|
-
return
|
|
73
|
+
}, V = (n, s) => {
|
|
74
|
+
const l = n.__vccOpts || n;
|
|
75
|
+
for (const [o, u] of s)
|
|
76
|
+
l[o] = u;
|
|
77
|
+
return l;
|
|
78
78
|
}, We = {
|
|
79
79
|
$style: ze
|
|
80
|
-
}, Ke = /* @__PURE__ */ V(xe, [["__cssModules", We]]), Qe = ["value", "placeholder", "disabled", "aria-controls", "aria-expanded"], Ye = ["disabled", "aria-label"], Xe = ["id", "role", "aria-live"], Je = ["onClick", "onKeydown"], et = ["for"], tt = ["id", "value", "disabled"],
|
|
80
|
+
}, Ke = /* @__PURE__ */ V(xe, [["__cssModules", We]]), Qe = ["value", "placeholder", "disabled", "aria-controls", "aria-expanded"], Ye = ["disabled", "aria-label"], Xe = ["id", "role", "aria-live"], Je = ["onClick", "onKeydown"], et = ["for"], tt = ["id", "value", "disabled"], nt = ["for"], st = ["id", "value", "disabled"], at = ["for"], ot = ["id", "value", "disabled"], lt = ["for"], rt = ["id", "value", "disabled"], it = ["for"], ut = ["id", "value", "disabled"], ct = ["disabled"], dt = /* @__PURE__ */ F({
|
|
81
81
|
__name: "AddressEntry",
|
|
82
82
|
props: {
|
|
83
83
|
enableAddressSuggestions: { type: Boolean, default: !0 },
|
|
@@ -91,61 +91,61 @@ const xe = /* @__PURE__ */ F({
|
|
|
91
91
|
appearance: {}
|
|
92
92
|
},
|
|
93
93
|
emits: ["address-select", "ready", "change", "validation-error", "address-suggestions-start", "address-suggestions-complete", "error"],
|
|
94
|
-
setup(
|
|
95
|
-
let
|
|
96
|
-
const
|
|
94
|
+
setup(n, { emit: s }) {
|
|
95
|
+
let l = 0;
|
|
96
|
+
const o = n, u = s, r = Be(), d = `ae-${++l}`, v = I(""), i = I([]), f = I(!1), h = I(!1), m = I(null), b = I(!1), L = I(!1), M = I(null), q = I(null), O = I(null), T = I({
|
|
97
97
|
street1: "",
|
|
98
98
|
street2: "",
|
|
99
99
|
city: "",
|
|
100
100
|
state: "",
|
|
101
101
|
postalCode: ""
|
|
102
|
-
}), R = w(() =>
|
|
103
|
-
() => f.value &&
|
|
102
|
+
}), R = w(() => ye(o.appearance)), Z = w(
|
|
103
|
+
() => f.value && !h.value && v.value.trim().length >= 3 && i.value.length === 0 && !b.value
|
|
104
104
|
);
|
|
105
105
|
let N = null, D = 0;
|
|
106
|
-
ee(
|
|
107
|
-
if (
|
|
108
|
-
if (
|
|
109
|
-
D += 1,
|
|
106
|
+
ee(v, ($) => {
|
|
107
|
+
if (L.value) return;
|
|
108
|
+
if (u("change", { street1: $ }), N && clearTimeout(N), !o.enableAddressSuggestions || $.trim().length < 3) {
|
|
109
|
+
D += 1, i.value = [], f.value = !1, m.value = null, h.value = !1;
|
|
110
110
|
return;
|
|
111
111
|
}
|
|
112
|
-
|
|
113
|
-
const
|
|
112
|
+
h.value = !0, m.value = null;
|
|
113
|
+
const y = $.trim(), k = ++D;
|
|
114
114
|
N = setTimeout(async () => {
|
|
115
|
-
|
|
115
|
+
u("address-suggestions-start", y);
|
|
116
116
|
try {
|
|
117
|
-
const S = await
|
|
117
|
+
const S = await r.value.getAddressSuggestions(y);
|
|
118
118
|
if (k !== D) return;
|
|
119
|
-
|
|
119
|
+
i.value = S.addresses, f.value = !0, u("address-suggestions-complete", S.addresses);
|
|
120
120
|
} catch (S) {
|
|
121
121
|
if (k !== D) return;
|
|
122
|
-
const
|
|
123
|
-
|
|
122
|
+
const A = S instanceof Error ? S : new Error("Failed to fetch address suggestions");
|
|
123
|
+
m.value = A.message, i.value = [], f.value = !0, u("error", A);
|
|
124
124
|
} finally {
|
|
125
|
-
k === D && (
|
|
125
|
+
k === D && (h.value = !1);
|
|
126
126
|
}
|
|
127
|
-
},
|
|
127
|
+
}, o.debounceMs);
|
|
128
128
|
});
|
|
129
|
-
function
|
|
130
|
-
const
|
|
131
|
-
return
|
|
129
|
+
function U($) {
|
|
130
|
+
const y = [$.street1];
|
|
131
|
+
return $.street2 && (y[0] += ` ${$.street2}`), y.push(`${$.city}, ${$.state} ${$.postalCode}`), y.join(", ");
|
|
132
132
|
}
|
|
133
|
-
async function Y(
|
|
134
|
-
|
|
133
|
+
async function Y($) {
|
|
134
|
+
L.value = !0, v.value = U($), i.value = [], f.value = !1, m.value = null, u("change", $);
|
|
135
135
|
try {
|
|
136
|
-
|
|
137
|
-
} catch (
|
|
138
|
-
const k =
|
|
139
|
-
|
|
136
|
+
u("address-select", $);
|
|
137
|
+
} catch (y) {
|
|
138
|
+
const k = y instanceof Error ? y : new Error("Failed to process address");
|
|
139
|
+
m.value = k.message, u("error", k), v.value = "", L.value = !1;
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
142
|
function re() {
|
|
143
|
-
|
|
143
|
+
b.value = !0, f.value = !1;
|
|
144
144
|
}
|
|
145
|
-
function J(
|
|
146
|
-
|
|
147
|
-
const k =
|
|
148
|
-
|
|
145
|
+
function J($, y) {
|
|
146
|
+
T.value[$] = y;
|
|
147
|
+
const k = T.value;
|
|
148
|
+
u("change", {
|
|
149
149
|
street1: k.street1,
|
|
150
150
|
...k.street2 ? { street2: k.street2 } : {},
|
|
151
151
|
city: k.city,
|
|
@@ -154,160 +154,160 @@ const xe = /* @__PURE__ */ F({
|
|
|
154
154
|
});
|
|
155
155
|
}
|
|
156
156
|
async function z() {
|
|
157
|
-
const
|
|
158
|
-
if (
|
|
157
|
+
const $ = T.value.street1.trim(), y = T.value.city.trim(), k = T.value.state.trim(), S = T.value.postalCode.trim(), A = T.value.street2.trim();
|
|
158
|
+
if (!$ || !y || !k || !S) {
|
|
159
159
|
const P = "Please fill in all required fields";
|
|
160
|
-
|
|
160
|
+
m.value = P, u("validation-error", P);
|
|
161
161
|
return;
|
|
162
162
|
}
|
|
163
|
-
|
|
163
|
+
h.value = !0, m.value = null;
|
|
164
164
|
try {
|
|
165
|
-
|
|
166
|
-
street1:
|
|
167
|
-
street2:
|
|
168
|
-
city:
|
|
165
|
+
u("address-select", {
|
|
166
|
+
street1: $,
|
|
167
|
+
street2: A || void 0,
|
|
168
|
+
city: y,
|
|
169
169
|
state: k,
|
|
170
170
|
postalCode: S
|
|
171
171
|
});
|
|
172
172
|
} catch (P) {
|
|
173
173
|
const W = P instanceof Error ? P : new Error("Failed to submit address");
|
|
174
|
-
|
|
174
|
+
m.value = W.message, u("error", W);
|
|
175
175
|
} finally {
|
|
176
|
-
|
|
176
|
+
h.value = !1;
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
179
|
function ae() {
|
|
180
|
-
|
|
180
|
+
i.value.length > 0 && Y(i.value[0]);
|
|
181
181
|
}
|
|
182
182
|
function te() {
|
|
183
|
-
|
|
183
|
+
i.value.length > 0 && v.value.length > 0 && (f.value = !0);
|
|
184
184
|
}
|
|
185
|
-
function ie(
|
|
186
|
-
const
|
|
187
|
-
|
|
185
|
+
function ie($) {
|
|
186
|
+
const y = $.target.value;
|
|
187
|
+
v.value = y, L.value = !1;
|
|
188
188
|
}
|
|
189
|
-
function
|
|
190
|
-
q.value && !q.value.contains(
|
|
189
|
+
function ne($) {
|
|
190
|
+
q.value && !q.value.contains($.target) && O.value && !O.value.contains($.target) && (f.value = !1);
|
|
191
191
|
}
|
|
192
|
-
return
|
|
193
|
-
document.addEventListener("mousedown",
|
|
194
|
-
}),
|
|
195
|
-
document.removeEventListener("mousedown",
|
|
196
|
-
}), (
|
|
192
|
+
return ve(() => {
|
|
193
|
+
document.addEventListener("mousedown", ne), u("ready");
|
|
194
|
+
}), le(() => {
|
|
195
|
+
document.removeEventListener("mousedown", ne), N && clearTimeout(N), D += 1;
|
|
196
|
+
}), ($, y) => (c(), p("div", {
|
|
197
197
|
ref_key: "containerRef",
|
|
198
|
-
ref:
|
|
199
|
-
class: e(
|
|
198
|
+
ref: M,
|
|
199
|
+
class: e($.$style.container),
|
|
200
200
|
style: X(R.value)
|
|
201
201
|
}, [
|
|
202
|
-
|
|
202
|
+
b.value ? (c(), p("div", {
|
|
203
203
|
key: 1,
|
|
204
|
-
class: e(
|
|
204
|
+
class: e($.$style.manualForm)
|
|
205
205
|
}, [
|
|
206
206
|
t("div", {
|
|
207
|
-
class: e(
|
|
207
|
+
class: e($.$style.manualFormField)
|
|
208
208
|
}, [
|
|
209
209
|
t("label", {
|
|
210
|
-
class: e(
|
|
211
|
-
for: `${
|
|
210
|
+
class: e($.$style.manualFormLabel),
|
|
211
|
+
for: `${d}-street1`
|
|
212
212
|
}, "Street Address *", 10, et),
|
|
213
213
|
t("input", {
|
|
214
|
-
id: `${
|
|
215
|
-
class: e(
|
|
214
|
+
id: `${d}-street1`,
|
|
215
|
+
class: e($.$style.manualFormInput),
|
|
216
216
|
type: "text",
|
|
217
|
-
value:
|
|
218
|
-
disabled:
|
|
217
|
+
value: T.value.street1,
|
|
218
|
+
disabled: n.disabled,
|
|
219
219
|
placeholder: "123 Main St",
|
|
220
|
-
onInput:
|
|
220
|
+
onInput: y[0] || (y[0] = (k) => J("street1", k.target.value))
|
|
221
221
|
}, null, 42, tt)
|
|
222
222
|
], 2),
|
|
223
223
|
t("div", {
|
|
224
|
-
class: e(
|
|
224
|
+
class: e($.$style.manualFormField)
|
|
225
225
|
}, [
|
|
226
226
|
t("label", {
|
|
227
|
-
class: e(
|
|
228
|
-
for: `${
|
|
229
|
-
}, "Unit / Apt (optional)", 10,
|
|
227
|
+
class: e($.$style.manualFormLabel),
|
|
228
|
+
for: `${d}-street2`
|
|
229
|
+
}, "Unit / Apt (optional)", 10, nt),
|
|
230
230
|
t("input", {
|
|
231
|
-
id: `${
|
|
232
|
-
class: e(
|
|
231
|
+
id: `${d}-street2`,
|
|
232
|
+
class: e($.$style.manualFormInput),
|
|
233
233
|
type: "text",
|
|
234
|
-
value:
|
|
235
|
-
disabled:
|
|
234
|
+
value: T.value.street2,
|
|
235
|
+
disabled: n.disabled,
|
|
236
236
|
placeholder: "Apt 4B",
|
|
237
|
-
onInput:
|
|
238
|
-
}, null, 42,
|
|
237
|
+
onInput: y[1] || (y[1] = (k) => J("street2", k.target.value))
|
|
238
|
+
}, null, 42, st)
|
|
239
239
|
], 2),
|
|
240
240
|
t("div", {
|
|
241
|
-
class: e(
|
|
241
|
+
class: e($.$style.manualFormField)
|
|
242
242
|
}, [
|
|
243
243
|
t("label", {
|
|
244
|
-
class: e(
|
|
245
|
-
for: `${
|
|
244
|
+
class: e($.$style.manualFormLabel),
|
|
245
|
+
for: `${d}-city`
|
|
246
246
|
}, "City *", 10, at),
|
|
247
247
|
t("input", {
|
|
248
|
-
id: `${
|
|
249
|
-
class: e(
|
|
248
|
+
id: `${d}-city`,
|
|
249
|
+
class: e($.$style.manualFormInput),
|
|
250
250
|
type: "text",
|
|
251
|
-
value:
|
|
252
|
-
disabled:
|
|
251
|
+
value: T.value.city,
|
|
252
|
+
disabled: n.disabled,
|
|
253
253
|
placeholder: "Austin",
|
|
254
|
-
onInput:
|
|
255
|
-
}, null, 42,
|
|
254
|
+
onInput: y[2] || (y[2] = (k) => J("city", k.target.value))
|
|
255
|
+
}, null, 42, ot)
|
|
256
256
|
], 2),
|
|
257
257
|
t("div", {
|
|
258
|
-
class: e(
|
|
258
|
+
class: e($.$style.formRow)
|
|
259
259
|
}, [
|
|
260
260
|
t("div", {
|
|
261
|
-
class: e(
|
|
261
|
+
class: e($.$style.manualFormField)
|
|
262
262
|
}, [
|
|
263
263
|
t("label", {
|
|
264
|
-
class: e(
|
|
265
|
-
for: `${
|
|
266
|
-
}, "State *", 10,
|
|
264
|
+
class: e($.$style.manualFormLabel),
|
|
265
|
+
for: `${d}-state`
|
|
266
|
+
}, "State *", 10, lt),
|
|
267
267
|
t("input", {
|
|
268
|
-
id: `${
|
|
269
|
-
class: e(
|
|
268
|
+
id: `${d}-state`,
|
|
269
|
+
class: e($.$style.manualFormInput),
|
|
270
270
|
type: "text",
|
|
271
|
-
value:
|
|
272
|
-
disabled:
|
|
271
|
+
value: T.value.state,
|
|
272
|
+
disabled: n.disabled,
|
|
273
273
|
placeholder: "TX",
|
|
274
274
|
maxlength: "2",
|
|
275
|
-
onInput:
|
|
275
|
+
onInput: y[3] || (y[3] = (k) => J("state", k.target.value))
|
|
276
276
|
}, null, 42, rt)
|
|
277
277
|
], 2),
|
|
278
278
|
t("div", {
|
|
279
|
-
class: e(
|
|
279
|
+
class: e($.$style.manualFormField)
|
|
280
280
|
}, [
|
|
281
281
|
t("label", {
|
|
282
|
-
class: e(
|
|
283
|
-
for: `${
|
|
282
|
+
class: e($.$style.manualFormLabel),
|
|
283
|
+
for: `${d}-postalCode`
|
|
284
284
|
}, "ZIP Code *", 10, it),
|
|
285
285
|
t("input", {
|
|
286
|
-
id: `${
|
|
287
|
-
class: e(
|
|
286
|
+
id: `${d}-postalCode`,
|
|
287
|
+
class: e($.$style.manualFormInput),
|
|
288
288
|
type: "text",
|
|
289
|
-
value:
|
|
290
|
-
disabled:
|
|
289
|
+
value: T.value.postalCode,
|
|
290
|
+
disabled: n.disabled,
|
|
291
291
|
placeholder: "78701",
|
|
292
292
|
maxlength: "5",
|
|
293
|
-
onInput:
|
|
293
|
+
onInput: y[4] || (y[4] = (k) => J("postalCode", k.target.value))
|
|
294
294
|
}, null, 42, ut)
|
|
295
295
|
], 2)
|
|
296
296
|
], 2),
|
|
297
|
-
|
|
297
|
+
m.value ? (c(), p("div", {
|
|
298
298
|
key: 0,
|
|
299
|
-
class: e(
|
|
299
|
+
class: e($.$style.error),
|
|
300
300
|
role: "alert"
|
|
301
|
-
}, _(
|
|
301
|
+
}, _(m.value), 3)) : E("", !0),
|
|
302
302
|
t("button", {
|
|
303
|
-
class: e(
|
|
303
|
+
class: e($.$style.submitButton),
|
|
304
304
|
type: "button",
|
|
305
|
-
disabled:
|
|
305
|
+
disabled: n.disabled,
|
|
306
306
|
onClick: z
|
|
307
307
|
}, [
|
|
308
|
-
t("span", null, _(
|
|
309
|
-
|
|
310
|
-
|
|
308
|
+
t("span", null, _(n.buttonText), 1),
|
|
309
|
+
ce($.$slots, "button-icon", {}, () => [
|
|
310
|
+
y[8] || (y[8] = t("svg", {
|
|
311
311
|
width: "20",
|
|
312
312
|
height: "20",
|
|
313
313
|
viewBox: "0 0 24 24",
|
|
@@ -323,54 +323,54 @@ const xe = /* @__PURE__ */ F({
|
|
|
323
323
|
})
|
|
324
324
|
], -1))
|
|
325
325
|
])
|
|
326
|
-
], 10,
|
|
327
|
-
], 2)) : (
|
|
326
|
+
], 10, ct)
|
|
327
|
+
], 2)) : (c(), p("div", {
|
|
328
328
|
key: 0,
|
|
329
|
-
class: e(
|
|
329
|
+
class: e($.$style.inputSection)
|
|
330
330
|
}, [
|
|
331
331
|
t("div", {
|
|
332
|
-
class: e([
|
|
332
|
+
class: e([$.$style.inputWrapper, m.value ? $.$style.errorBorder : ""])
|
|
333
333
|
}, [
|
|
334
334
|
t("input", {
|
|
335
335
|
ref_key: "inputRef",
|
|
336
336
|
ref: O,
|
|
337
|
-
value:
|
|
338
|
-
class: e(
|
|
339
|
-
placeholder:
|
|
340
|
-
disabled:
|
|
337
|
+
value: v.value,
|
|
338
|
+
class: e($.$style.input),
|
|
339
|
+
placeholder: n.placeholderText,
|
|
340
|
+
disabled: n.disabled,
|
|
341
341
|
type: "text",
|
|
342
342
|
autocomplete: "off",
|
|
343
343
|
"aria-label": "Address input",
|
|
344
344
|
"aria-autocomplete": "list",
|
|
345
|
-
"aria-controls": `${
|
|
345
|
+
"aria-controls": `${d}-suggestions`,
|
|
346
346
|
"aria-expanded": f.value,
|
|
347
347
|
onInput: ie,
|
|
348
348
|
onFocus: te
|
|
349
349
|
}, null, 42, Qe),
|
|
350
|
-
|
|
350
|
+
$.$slots["input-icon"] ? (c(), p("div", {
|
|
351
351
|
key: 0,
|
|
352
|
-
class: e(
|
|
352
|
+
class: e($.$style.inputIcon)
|
|
353
353
|
}, [
|
|
354
|
-
|
|
354
|
+
ce($.$slots, "input-icon")
|
|
355
355
|
], 2)) : E("", !0),
|
|
356
|
-
|
|
356
|
+
n.showButton ? (c(), p("button", {
|
|
357
357
|
key: 1,
|
|
358
|
-
class: e(
|
|
359
|
-
disabled:
|
|
360
|
-
"aria-label":
|
|
358
|
+
class: e($.$style.button),
|
|
359
|
+
disabled: n.disabled,
|
|
360
|
+
"aria-label": n.buttonText,
|
|
361
361
|
type: "button",
|
|
362
362
|
onClick: ae
|
|
363
363
|
}, [
|
|
364
|
-
|
|
365
|
-
t("span", null, _(
|
|
366
|
-
(
|
|
367
|
-
class: e(
|
|
364
|
+
h.value ? (c(), p(j, { key: 0 }, [
|
|
365
|
+
t("span", null, _(n.buttonText), 1),
|
|
366
|
+
(c(), p("svg", {
|
|
367
|
+
class: e($.$style.spinner),
|
|
368
368
|
width: "20",
|
|
369
369
|
height: "20",
|
|
370
370
|
viewBox: "0 0 24 24",
|
|
371
371
|
fill: "none",
|
|
372
372
|
xmlns: "http://www.w3.org/2000/svg"
|
|
373
|
-
}, [...
|
|
373
|
+
}, [...y[5] || (y[5] = [
|
|
374
374
|
t("circle", {
|
|
375
375
|
cx: "12",
|
|
376
376
|
cy: "12",
|
|
@@ -386,10 +386,10 @@ const xe = /* @__PURE__ */ F({
|
|
|
386
386
|
"stroke-linecap": "round"
|
|
387
387
|
}, null, -1)
|
|
388
388
|
])], 2))
|
|
389
|
-
], 64)) : (
|
|
390
|
-
t("span", null, _(
|
|
391
|
-
|
|
392
|
-
|
|
389
|
+
], 64)) : (c(), p(j, { key: 1 }, [
|
|
390
|
+
t("span", null, _(n.buttonText), 1),
|
|
391
|
+
ce($.$slots, "button-icon", {}, () => [
|
|
392
|
+
y[6] || (y[6] = t("svg", {
|
|
393
393
|
width: "20",
|
|
394
394
|
height: "20",
|
|
395
395
|
viewBox: "0 0 24 24",
|
|
@@ -408,22 +408,22 @@ const xe = /* @__PURE__ */ F({
|
|
|
408
408
|
], 64))
|
|
409
409
|
], 10, Ye)) : E("", !0)
|
|
410
410
|
], 2),
|
|
411
|
-
f.value ||
|
|
411
|
+
f.value || m.value ? (c(), p("div", {
|
|
412
412
|
key: 0,
|
|
413
413
|
ref_key: "suggestionsRef",
|
|
414
414
|
ref: q,
|
|
415
|
-
class: e([
|
|
416
|
-
id: `${
|
|
417
|
-
role:
|
|
418
|
-
"aria-live":
|
|
415
|
+
class: e([$.$style.suggestions, m.value ? $.$style.errorState : ""]),
|
|
416
|
+
id: `${d}-suggestions`,
|
|
417
|
+
role: m.value ? "alert" : "listbox",
|
|
418
|
+
"aria-live": m.value ? "polite" : void 0
|
|
419
419
|
}, [
|
|
420
|
-
|
|
420
|
+
m.value ? (c(), p(j, { key: 0 }, [
|
|
421
421
|
t("div", {
|
|
422
|
-
class: e(
|
|
422
|
+
class: e($.$style.error)
|
|
423
423
|
}, [
|
|
424
424
|
t("div", {
|
|
425
|
-
class: e(
|
|
426
|
-
}, [...
|
|
425
|
+
class: e($.$style.errorIcon)
|
|
426
|
+
}, [...y[7] || (y[7] = [
|
|
427
427
|
t("svg", {
|
|
428
428
|
width: "20",
|
|
429
429
|
height: "20",
|
|
@@ -445,41 +445,41 @@ const xe = /* @__PURE__ */ F({
|
|
|
445
445
|
})
|
|
446
446
|
], -1)
|
|
447
447
|
])], 2),
|
|
448
|
-
t("div", null, _(
|
|
448
|
+
t("div", null, _(m.value), 1)
|
|
449
449
|
], 2),
|
|
450
|
-
|
|
450
|
+
b.value ? E("", !0) : (c(), p("button", {
|
|
451
451
|
key: 0,
|
|
452
452
|
type: "button",
|
|
453
|
-
class: e(
|
|
453
|
+
class: e($.$style.manualLink),
|
|
454
454
|
onClick: re
|
|
455
|
-
}, _(
|
|
456
|
-
], 64)) :
|
|
455
|
+
}, _(n.manualEntryText), 3))
|
|
456
|
+
], 64)) : i.value.length > 0 ? (c(!0), p(j, { key: 1 }, Q(i.value, (k, S) => (c(), p("div", {
|
|
457
457
|
key: `${k.street1}-${k.city}-${k.postalCode}-${S}`,
|
|
458
|
-
class: e(
|
|
458
|
+
class: e($.$style.suggestion),
|
|
459
459
|
role: "option",
|
|
460
460
|
"aria-selected": !1,
|
|
461
461
|
tabindex: "0",
|
|
462
|
-
onClick: (
|
|
462
|
+
onClick: (A) => Y(k),
|
|
463
463
|
onKeydown: [
|
|
464
|
-
Se(De((
|
|
465
|
-
Se(De((
|
|
464
|
+
Se(De((A) => Y(k), ["prevent"]), ["enter"]),
|
|
465
|
+
Se(De((A) => Y(k), ["prevent"]), ["space"])
|
|
466
466
|
]
|
|
467
|
-
}, _(
|
|
467
|
+
}, _(U(k)), 43, Je))), 128)) : Z.value ? (c(), p("button", {
|
|
468
468
|
key: 2,
|
|
469
469
|
type: "button",
|
|
470
|
-
class: e(
|
|
470
|
+
class: e($.$style.manualLink),
|
|
471
471
|
onClick: re
|
|
472
|
-
}, _(
|
|
472
|
+
}, _(n.manualEntryText), 3)) : E("", !0)
|
|
473
473
|
], 10, Xe)) : E("", !0)
|
|
474
474
|
], 2)),
|
|
475
|
-
|
|
475
|
+
n.showAttribution ? (c(), K(Ke, { key: 2 })) : E("", !0)
|
|
476
476
|
], 6));
|
|
477
477
|
}
|
|
478
|
-
}), vt = "_container_1r0nf_9", yt = "_inputSection_1r0nf_17",
|
|
478
|
+
}), vt = "_container_1r0nf_9", yt = "_inputSection_1r0nf_17", ft = "_inputWrapper_1r0nf_23", pt = "_input_1r0nf_17", ht = "_inputIcon_1r0nf_64", mt = "_button_1r0nf_81", gt = "_spinner_1r0nf_122", bt = "_spin_1r0nf_122", $t = "_suggestions_1r0nf_137", Ct = "_errorState_1r0nf_151", kt = "_suggestion_1r0nf_137", _t = "_error_1r0nf_151", wt = "_errorIcon_1r0nf_200", Lt = "_errorBorder_1r0nf_214", It = "_manualLink_1r0nf_224", St = "_manualForm_1r0nf_246", Dt = "_slideIn_1r0nf_1", Et = "_manualFormField_1r0nf_261", qt = "_manualFormLabel_1r0nf_265", Mt = "_manualFormInput_1r0nf_274", At = "_formRow_1r0nf_295", Tt = "_submitButton_1r0nf_303", Pt = {
|
|
479
479
|
container: vt,
|
|
480
480
|
inputSection: yt,
|
|
481
|
-
inputWrapper:
|
|
482
|
-
input:
|
|
481
|
+
inputWrapper: ft,
|
|
482
|
+
input: pt,
|
|
483
483
|
inputIcon: ht,
|
|
484
484
|
button: mt,
|
|
485
485
|
spinner: gt,
|
|
@@ -498,57 +498,57 @@ const xe = /* @__PURE__ */ F({
|
|
|
498
498
|
manualFormInput: Mt,
|
|
499
499
|
formRow: At,
|
|
500
500
|
submitButton: Tt
|
|
501
|
-
},
|
|
502
|
-
$style:
|
|
503
|
-
},
|
|
504
|
-
function Ot(
|
|
505
|
-
return
|
|
501
|
+
}, Bt = {
|
|
502
|
+
$style: Pt
|
|
503
|
+
}, Yl = /* @__PURE__ */ V(dt, [["__cssModules", Bt]]), Ft = "https://api.mapbox.com/geocoding/v5/mapbox.places", Rt = "https://api.mapbox.com/styles/v1/mapbox/light-v11/static", Nt = "pk.eyJ1Ijoib3BlbmRvb3IiLCJhIjoiWXJ2bTJiRSJ9.lsnjT9yTNyyVzKRIzqxnqg", Gt = "https://images.opendoor.com/source/s3/imgdrop-production/2026-02-1771546296495-06570.png?service=partner-sdk";
|
|
504
|
+
function Ot(n, s, l) {
|
|
505
|
+
return n.startsWith("http://") || n.startsWith("https://") ? `url-${encodeURIComponent(n)}(${s},${l})` : `${n}(${s},${l})`;
|
|
506
506
|
}
|
|
507
|
-
function Ht(
|
|
508
|
-
const
|
|
507
|
+
function Ht(n, s) {
|
|
508
|
+
const l = (s == null ? void 0 : s.mapboxAccessToken) ?? Nt, o = (s == null ? void 0 : s.mapPinMarker) ?? Gt, u = (s == null ? void 0 : s.width) ?? 640, r = (s == null ? void 0 : s.height) ?? 320, d = (s == null ? void 0 : s.zoom) ?? 14, v = I(void 0), i = I("loading");
|
|
509
509
|
let f = null;
|
|
510
510
|
return ee(
|
|
511
511
|
() => [
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
512
|
+
n.value.street1,
|
|
513
|
+
n.value.city,
|
|
514
|
+
n.value.state,
|
|
515
|
+
n.value.postalCode
|
|
516
516
|
],
|
|
517
517
|
async () => {
|
|
518
|
-
var
|
|
518
|
+
var L, M;
|
|
519
519
|
f && f.abort();
|
|
520
|
-
const
|
|
521
|
-
f =
|
|
522
|
-
const
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
520
|
+
const h = new AbortController();
|
|
521
|
+
f = h, i.value = "loading";
|
|
522
|
+
const m = n.value, b = [
|
|
523
|
+
m.street1,
|
|
524
|
+
m.city,
|
|
525
|
+
m.state,
|
|
526
|
+
m.postalCode
|
|
527
527
|
].join(" ");
|
|
528
528
|
try {
|
|
529
|
-
const q = `${Ft}/${encodeURIComponent(
|
|
529
|
+
const q = `${Ft}/${encodeURIComponent(b)}.json?access_token=${l}&limit=1`, O = await fetch(q, { signal: h.signal });
|
|
530
530
|
if (!O.ok) {
|
|
531
|
-
|
|
531
|
+
h.signal.aborted || (i.value = "error");
|
|
532
532
|
return;
|
|
533
533
|
}
|
|
534
|
-
const
|
|
535
|
-
if (
|
|
536
|
-
const R = (
|
|
534
|
+
const T = await O.json();
|
|
535
|
+
if (h.signal.aborted) return;
|
|
536
|
+
const R = (M = (L = T.features) == null ? void 0 : L[0]) == null ? void 0 : M.center;
|
|
537
537
|
if (!R) {
|
|
538
|
-
|
|
538
|
+
i.value = "error";
|
|
539
539
|
return;
|
|
540
540
|
}
|
|
541
|
-
const [
|
|
542
|
-
|
|
541
|
+
const [Z, N] = R, D = Ot(o, Z, N);
|
|
542
|
+
v.value = `${Rt}/${D}/${Z},${N},${d}/${u}x${r}@2x?access_token=${l}&attribution=false&logo=false`, i.value = "loaded";
|
|
543
543
|
} catch (q) {
|
|
544
544
|
if (q instanceof DOMException && q.name === "AbortError") return;
|
|
545
|
-
|
|
545
|
+
h.signal.aborted || (i.value = "error");
|
|
546
546
|
}
|
|
547
547
|
},
|
|
548
548
|
{ immediate: !0 }
|
|
549
|
-
),
|
|
549
|
+
), le(() => {
|
|
550
550
|
f && f.abort();
|
|
551
|
-
}), { url:
|
|
551
|
+
}), { url: v, status: i };
|
|
552
552
|
}
|
|
553
553
|
const jt = ["src"], Vt = /* @__PURE__ */ F({
|
|
554
554
|
__name: "AddressMap",
|
|
@@ -563,36 +563,36 @@ const jt = ["src"], Vt = /* @__PURE__ */ F({
|
|
|
563
563
|
borderRadius: {}
|
|
564
564
|
},
|
|
565
565
|
emits: ["load", "error"],
|
|
566
|
-
setup(
|
|
567
|
-
const
|
|
568
|
-
const f =
|
|
569
|
-
return
|
|
570
|
-
}), { url:
|
|
571
|
-
w(() =>
|
|
566
|
+
setup(n, { emit: s }) {
|
|
567
|
+
const l = n, o = s, u = w(() => {
|
|
568
|
+
const f = ye(l.appearance);
|
|
569
|
+
return l.borderRadius && (f["border-radius"] = l.borderRadius), f;
|
|
570
|
+
}), { url: r, status: d } = Ht(
|
|
571
|
+
w(() => l.address),
|
|
572
572
|
{
|
|
573
|
-
mapboxAccessToken:
|
|
574
|
-
mapPinMarker:
|
|
575
|
-
width:
|
|
576
|
-
height:
|
|
577
|
-
zoom:
|
|
573
|
+
mapboxAccessToken: l.mapboxAccessToken,
|
|
574
|
+
mapPinMarker: l.mapPinMarker,
|
|
575
|
+
width: l.width,
|
|
576
|
+
height: l.height,
|
|
577
|
+
zoom: l.zoom
|
|
578
578
|
}
|
|
579
|
-
),
|
|
580
|
-
ee(
|
|
581
|
-
f === "loading" && (
|
|
579
|
+
), v = I(!1);
|
|
580
|
+
ee(d, (f) => {
|
|
581
|
+
f === "loading" && (v.value = !1), f === "error" && o("error", new Error("Failed to load map for address"));
|
|
582
582
|
});
|
|
583
|
-
function
|
|
584
|
-
|
|
583
|
+
function i() {
|
|
584
|
+
v.value = !0, o("load");
|
|
585
585
|
}
|
|
586
|
-
return (f,
|
|
586
|
+
return (f, h) => (c(), p("div", {
|
|
587
587
|
class: e(f.$style.container),
|
|
588
|
-
style: X(
|
|
588
|
+
style: X(u.value)
|
|
589
589
|
}, [
|
|
590
|
-
|
|
590
|
+
B(r) ? (c(), p("img", {
|
|
591
591
|
key: 0,
|
|
592
|
-
src:
|
|
592
|
+
src: B(r),
|
|
593
593
|
alt: "Map",
|
|
594
|
-
class: e([f.$style.mapImage,
|
|
595
|
-
onLoad:
|
|
594
|
+
class: e([f.$style.mapImage, v.value ? f.$style.mapImageLoaded : ""]),
|
|
595
|
+
onLoad: i
|
|
596
596
|
}, null, 42, jt)) : E("", !0)
|
|
597
597
|
], 6));
|
|
598
598
|
}
|
|
@@ -602,211 +602,211 @@ const jt = ["src"], Vt = /* @__PURE__ */ F({
|
|
|
602
602
|
mapImageLoaded: Zt
|
|
603
603
|
}, Wt = {
|
|
604
604
|
$style: zt
|
|
605
|
-
},
|
|
605
|
+
}, Xl = /* @__PURE__ */ V(Vt, [["__cssModules", Wt]]), Kt = ["disabled", "aria-invalid", "aria-describedby"], Qt = ["checked"], Yt = /* @__PURE__ */ F({
|
|
606
606
|
__name: "AddressUnitConfirmation",
|
|
607
607
|
props: {
|
|
608
608
|
address: {},
|
|
609
609
|
appearance: {}
|
|
610
610
|
},
|
|
611
611
|
emits: ["confirm", "edit", "ready", "error"],
|
|
612
|
-
setup(
|
|
613
|
-
const
|
|
614
|
-
const
|
|
615
|
-
return `${
|
|
612
|
+
setup(n, { emit: s }) {
|
|
613
|
+
const l = n, o = s, u = I(""), r = I(!1), d = I(null), v = w(() => ye(l.appearance)), i = w(() => {
|
|
614
|
+
const b = l.address;
|
|
615
|
+
return `${b.street1 + (b.street2 ? ` ${b.street2}` : "")}, ${b.city}, ${b.state} ${b.postalCode}`;
|
|
616
616
|
});
|
|
617
617
|
function f() {
|
|
618
|
-
if (!
|
|
619
|
-
const
|
|
620
|
-
|
|
618
|
+
if (!r.value && !u.value.trim()) {
|
|
619
|
+
const b = "Please enter a unit number or select 'No unit number'";
|
|
620
|
+
d.value = b, o("error", new Error(b));
|
|
621
621
|
return;
|
|
622
622
|
}
|
|
623
|
-
if (
|
|
624
|
-
const { street2:
|
|
625
|
-
|
|
623
|
+
if (d.value = null, r.value) {
|
|
624
|
+
const { street2: b, ...L } = l.address;
|
|
625
|
+
o("confirm", L);
|
|
626
626
|
} else
|
|
627
|
-
|
|
627
|
+
o("confirm", { ...l.address, street2: u.value.trim() });
|
|
628
628
|
}
|
|
629
|
-
function
|
|
630
|
-
|
|
629
|
+
function h() {
|
|
630
|
+
r.value = !r.value, r.value && (u.value = "", d.value = null);
|
|
631
631
|
}
|
|
632
|
-
function
|
|
633
|
-
|
|
632
|
+
function m() {
|
|
633
|
+
d.value && (d.value = null);
|
|
634
634
|
}
|
|
635
|
-
return
|
|
636
|
-
|
|
637
|
-
}), (
|
|
638
|
-
class: e(
|
|
639
|
-
style: X(
|
|
635
|
+
return ve(() => {
|
|
636
|
+
o("ready");
|
|
637
|
+
}), (b, L) => (c(), p("div", {
|
|
638
|
+
class: e(b.$style.container),
|
|
639
|
+
style: X(v.value)
|
|
640
640
|
}, [
|
|
641
641
|
t("h2", {
|
|
642
|
-
class: e(
|
|
642
|
+
class: e(b.$style.title)
|
|
643
643
|
}, "Confirm your home address", 2),
|
|
644
644
|
t("div", {
|
|
645
|
-
class: e(
|
|
645
|
+
class: e(b.$style.addressCard)
|
|
646
646
|
}, [
|
|
647
647
|
t("span", {
|
|
648
|
-
class: e(
|
|
649
|
-
}, _(
|
|
648
|
+
class: e(b.$style.addressText)
|
|
649
|
+
}, _(i.value), 3),
|
|
650
650
|
t("button", {
|
|
651
|
-
class: e(
|
|
651
|
+
class: e(b.$style.editLink),
|
|
652
652
|
type: "button",
|
|
653
|
-
onClick:
|
|
653
|
+
onClick: L[0] || (L[0] = (M) => o("edit"))
|
|
654
654
|
}, " Edit ", 2)
|
|
655
655
|
], 2),
|
|
656
656
|
t("div", {
|
|
657
|
-
class: e(
|
|
657
|
+
class: e(b.$style.fieldGroup)
|
|
658
658
|
}, [
|
|
659
659
|
t("label", {
|
|
660
|
-
class: e(
|
|
660
|
+
class: e(b.$style.fieldLabel),
|
|
661
661
|
for: "od-unit-number"
|
|
662
662
|
}, " Unit number, apt, or floor* ", 2),
|
|
663
663
|
Ee(t("input", {
|
|
664
664
|
id: "od-unit-number",
|
|
665
|
-
"onUpdate:modelValue":
|
|
666
|
-
class: e(
|
|
665
|
+
"onUpdate:modelValue": L[1] || (L[1] = (M) => u.value = M),
|
|
666
|
+
class: e(b.$style.input),
|
|
667
667
|
type: "text",
|
|
668
668
|
placeholder: "#1234",
|
|
669
|
-
disabled:
|
|
670
|
-
"aria-invalid":
|
|
671
|
-
"aria-describedby":
|
|
672
|
-
onInput:
|
|
669
|
+
disabled: r.value,
|
|
670
|
+
"aria-invalid": d.value ? !0 : void 0,
|
|
671
|
+
"aria-describedby": d.value ? "od-unit-error" : void 0,
|
|
672
|
+
onInput: m,
|
|
673
673
|
onKeydown: Se(f, ["enter"])
|
|
674
674
|
}, null, 42, Kt), [
|
|
675
|
-
[qe,
|
|
675
|
+
[qe, u.value]
|
|
676
676
|
])
|
|
677
677
|
], 2),
|
|
678
678
|
t("label", {
|
|
679
|
-
class: e(
|
|
679
|
+
class: e(b.$style.checkboxRow)
|
|
680
680
|
}, [
|
|
681
681
|
t("input", {
|
|
682
682
|
type: "checkbox",
|
|
683
|
-
class: e(
|
|
684
|
-
checked:
|
|
685
|
-
onChange:
|
|
683
|
+
class: e(b.$style.checkbox),
|
|
684
|
+
checked: r.value,
|
|
685
|
+
onChange: h
|
|
686
686
|
}, null, 42, Qt),
|
|
687
687
|
t("span", {
|
|
688
|
-
class: e(
|
|
688
|
+
class: e(b.$style.checkboxLabel)
|
|
689
689
|
}, "No unit number", 2)
|
|
690
690
|
], 2),
|
|
691
|
-
|
|
691
|
+
d.value ? (c(), p("p", {
|
|
692
692
|
key: 0,
|
|
693
693
|
id: "od-unit-error",
|
|
694
|
-
class: e(
|
|
694
|
+
class: e(b.$style.error),
|
|
695
695
|
role: "alert"
|
|
696
|
-
}, _(
|
|
696
|
+
}, _(d.value), 3)) : E("", !0),
|
|
697
697
|
t("div", {
|
|
698
|
-
class: e(
|
|
698
|
+
class: e(b.$style.actions)
|
|
699
699
|
}, [
|
|
700
700
|
t("button", {
|
|
701
|
-
class: e(
|
|
701
|
+
class: e(b.$style.confirmButton),
|
|
702
702
|
type: "button",
|
|
703
703
|
onClick: f
|
|
704
704
|
}, " Confirm address ", 2)
|
|
705
705
|
], 2)
|
|
706
706
|
], 6));
|
|
707
707
|
}
|
|
708
|
-
}), Xt = "_container_1hik1_4", Jt = "_title_1hik1_8",
|
|
708
|
+
}), Xt = "_container_1hik1_4", Jt = "_title_1hik1_8", en = "_addressCard_1hik1_17", tn = "_addressText_1hik1_27", nn = "_editLink_1hik1_35", sn = "_fieldGroup_1hik1_48", an = "_fieldLabel_1hik1_52", on = "_input_1hik1_61", ln = "_checkboxRow_1hik1_85", rn = "_checkbox_1hik1_85", un = "_checkboxLabel_1hik1_102", cn = "_error_1hik1_109", dn = "_actions_1hik1_116", vn = "_confirmButton_1hik1_121", yn = {
|
|
709
709
|
container: Xt,
|
|
710
710
|
title: Jt,
|
|
711
|
-
addressCard:
|
|
712
|
-
addressText:
|
|
713
|
-
editLink:
|
|
714
|
-
fieldGroup:
|
|
715
|
-
fieldLabel:
|
|
716
|
-
input:
|
|
717
|
-
checkboxRow:
|
|
718
|
-
checkbox:
|
|
719
|
-
checkboxLabel:
|
|
720
|
-
error:
|
|
721
|
-
actions:
|
|
722
|
-
confirmButton:
|
|
723
|
-
},
|
|
724
|
-
$style:
|
|
725
|
-
},
|
|
726
|
-
function Ae(
|
|
727
|
-
const
|
|
728
|
-
|
|
729
|
-
var
|
|
730
|
-
|
|
711
|
+
addressCard: en,
|
|
712
|
+
addressText: tn,
|
|
713
|
+
editLink: nn,
|
|
714
|
+
fieldGroup: sn,
|
|
715
|
+
fieldLabel: an,
|
|
716
|
+
input: on,
|
|
717
|
+
checkboxRow: ln,
|
|
718
|
+
checkbox: rn,
|
|
719
|
+
checkboxLabel: un,
|
|
720
|
+
error: cn,
|
|
721
|
+
actions: dn,
|
|
722
|
+
confirmButton: vn
|
|
723
|
+
}, fn = {
|
|
724
|
+
$style: yn
|
|
725
|
+
}, Jl = /* @__PURE__ */ V(Yt, [["__cssModules", fn]]);
|
|
726
|
+
function Ae(n, s, l, o, u, r) {
|
|
727
|
+
const d = [
|
|
728
|
+
n.on("answerChange", (v) => {
|
|
729
|
+
var i;
|
|
730
|
+
s.value = n.answers, u.value = [...n.visiblePages], v.type === "answerChange" && ((i = r.onAnswerChange) == null || i.call(r, v.key, v.value));
|
|
731
731
|
}),
|
|
732
|
-
|
|
733
|
-
var
|
|
734
|
-
|
|
732
|
+
n.on("pageChange", (v) => {
|
|
733
|
+
var i;
|
|
734
|
+
v.type === "pageChange" && (l.value = v.pageId, u.value = [...n.visiblePages], o.value = {}, (i = r.onPageChange) == null || i.call(r, v.pageIndex, v.pageId));
|
|
735
735
|
}),
|
|
736
|
-
|
|
737
|
-
|
|
736
|
+
n.on("validationError", (v) => {
|
|
737
|
+
v.type === "validationError" && (o.value = v.errors);
|
|
738
738
|
}),
|
|
739
|
-
|
|
740
|
-
|
|
739
|
+
n.on("submit", (v) => {
|
|
740
|
+
v.type === "submit" && r.onSubmit(v.answers);
|
|
741
741
|
})
|
|
742
742
|
];
|
|
743
|
-
return () =>
|
|
743
|
+
return () => d.forEach((v) => v());
|
|
744
744
|
}
|
|
745
|
-
function
|
|
746
|
-
var R,
|
|
747
|
-
let
|
|
748
|
-
initialAnswers:
|
|
749
|
-
skipPages: (R =
|
|
745
|
+
function pn(n) {
|
|
746
|
+
var R, Z, N;
|
|
747
|
+
let s = Me({
|
|
748
|
+
initialAnswers: n.getInitialAnswers(),
|
|
749
|
+
skipPages: (R = n.getSkipPages) == null ? void 0 : R.call(n)
|
|
750
750
|
});
|
|
751
|
-
const
|
|
752
|
-
let
|
|
753
|
-
|
|
754
|
-
r,
|
|
755
|
-
i,
|
|
751
|
+
const l = I(s.answers), o = I(((Z = s.currentPage) == null ? void 0 : Z.id) ?? ""), u = I({}), r = I(s.visiblePages);
|
|
752
|
+
let d = Ae(
|
|
753
|
+
s,
|
|
756
754
|
l,
|
|
757
755
|
o,
|
|
758
|
-
|
|
756
|
+
u,
|
|
757
|
+
r,
|
|
758
|
+
n
|
|
759
759
|
);
|
|
760
|
-
(N =
|
|
760
|
+
(N = n.onReady) == null || N.call(n), ee(
|
|
761
761
|
() => {
|
|
762
762
|
var D;
|
|
763
|
-
return (((D =
|
|
763
|
+
return (((D = n.getSkipPages) == null ? void 0 : D.call(n)) ?? []).join("|");
|
|
764
764
|
},
|
|
765
765
|
() => {
|
|
766
|
-
var D,
|
|
767
|
-
|
|
768
|
-
initialAnswers:
|
|
769
|
-
skipPages: (D =
|
|
770
|
-
}),
|
|
771
|
-
|
|
772
|
-
r,
|
|
773
|
-
i,
|
|
766
|
+
var D, U;
|
|
767
|
+
d(), s.destroy(), s = Me({
|
|
768
|
+
initialAnswers: n.getInitialAnswers(),
|
|
769
|
+
skipPages: (D = n.getSkipPages) == null ? void 0 : D.call(n)
|
|
770
|
+
}), l.value = s.answers, o.value = ((U = s.currentPage) == null ? void 0 : U.id) ?? "", u.value = {}, r.value = s.visiblePages, d = Ae(
|
|
771
|
+
s,
|
|
774
772
|
l,
|
|
775
773
|
o,
|
|
776
|
-
|
|
774
|
+
u,
|
|
775
|
+
r,
|
|
776
|
+
n
|
|
777
777
|
);
|
|
778
778
|
}
|
|
779
779
|
);
|
|
780
|
-
let
|
|
781
|
-
ee(
|
|
782
|
-
D && D !==
|
|
780
|
+
let v = n.getInitialAnswers();
|
|
781
|
+
ee(n.getInitialAnswers, (D) => {
|
|
782
|
+
D && D !== v && (v = D, s.setAnswers(D));
|
|
783
783
|
});
|
|
784
|
-
const
|
|
785
|
-
const D =
|
|
786
|
-
(
|
|
784
|
+
const i = w(() => {
|
|
785
|
+
const D = r.value.findIndex(
|
|
786
|
+
(U) => U.id === o.value
|
|
787
787
|
);
|
|
788
788
|
return D >= 0 ? D : 0;
|
|
789
789
|
}), f = w(
|
|
790
|
-
() =>
|
|
791
|
-
),
|
|
790
|
+
() => r.value[i.value]
|
|
791
|
+
), h = w(() => o.value ? (l.value, s.getVisibleQuestionsForCurrentPage()) : []), m = w(() => r.value.length <= 1 ? 0 : Math.min(
|
|
792
792
|
1,
|
|
793
|
-
Math.max(0,
|
|
794
|
-
)),
|
|
795
|
-
() =>
|
|
793
|
+
Math.max(0, i.value / (r.value.length - 1))
|
|
794
|
+
)), b = w(() => i.value === 0), L = w(
|
|
795
|
+
() => r.value.length > 0 && i.value === r.value.length - 1
|
|
796
796
|
);
|
|
797
|
-
function
|
|
798
|
-
|
|
797
|
+
function M(D, U) {
|
|
798
|
+
s.setAnswer(D, U);
|
|
799
799
|
}
|
|
800
800
|
function q(D) {
|
|
801
|
-
return
|
|
801
|
+
return l.value[D];
|
|
802
802
|
}
|
|
803
803
|
function O() {
|
|
804
|
-
var
|
|
805
|
-
const D =
|
|
804
|
+
var U;
|
|
805
|
+
const D = s.goToNext();
|
|
806
806
|
if (!D.valid)
|
|
807
807
|
try {
|
|
808
|
-
(
|
|
809
|
-
|
|
808
|
+
(U = n.onError) == null || U.call(
|
|
809
|
+
n,
|
|
810
810
|
new Error(
|
|
811
811
|
`Validation failed: ${Object.values(D.errors).join(", ")}`
|
|
812
812
|
)
|
|
@@ -815,29 +815,29 @@ function ps(s) {
|
|
|
815
815
|
console.error("[DtcOnboardingFlow] onError callback threw:", Y);
|
|
816
816
|
}
|
|
817
817
|
}
|
|
818
|
-
function
|
|
819
|
-
|
|
818
|
+
function T() {
|
|
819
|
+
s.goToPrev();
|
|
820
820
|
}
|
|
821
|
-
return
|
|
822
|
-
|
|
821
|
+
return le(() => {
|
|
822
|
+
d(), s.destroy();
|
|
823
823
|
}), {
|
|
824
|
-
engine:
|
|
824
|
+
engine: s,
|
|
825
825
|
currentPage: f,
|
|
826
|
-
currentPageIndex:
|
|
827
|
-
visiblePages:
|
|
828
|
-
visibleQuestions:
|
|
829
|
-
answers:
|
|
830
|
-
validationErrors:
|
|
831
|
-
progress:
|
|
832
|
-
isFirstPage:
|
|
833
|
-
isLastPage:
|
|
834
|
-
setAnswer:
|
|
826
|
+
currentPageIndex: i,
|
|
827
|
+
visiblePages: r,
|
|
828
|
+
visibleQuestions: h,
|
|
829
|
+
answers: l,
|
|
830
|
+
validationErrors: u,
|
|
831
|
+
progress: m,
|
|
832
|
+
isFirstPage: b,
|
|
833
|
+
isLastPage: L,
|
|
834
|
+
setAnswer: M,
|
|
835
835
|
getAnswer: q,
|
|
836
836
|
goToNext: O,
|
|
837
|
-
goToPrev:
|
|
837
|
+
goToPrev: T
|
|
838
838
|
};
|
|
839
839
|
}
|
|
840
|
-
const
|
|
840
|
+
const hn = /* @__PURE__ */ F({
|
|
841
841
|
__name: "DtcProvider",
|
|
842
842
|
props: {
|
|
843
843
|
initialAnswers: {},
|
|
@@ -848,52 +848,52 @@ const fs = /* @__PURE__ */ F({
|
|
|
848
848
|
onReady: { type: Function },
|
|
849
849
|
onError: { type: Function }
|
|
850
850
|
},
|
|
851
|
-
setup(
|
|
852
|
-
const
|
|
853
|
-
getInitialAnswers: () =>
|
|
854
|
-
getSkipPages: () =>
|
|
855
|
-
onSubmit: (
|
|
856
|
-
onPageChange: (
|
|
857
|
-
var
|
|
858
|
-
return (
|
|
851
|
+
setup(n) {
|
|
852
|
+
const s = n, l = pn({
|
|
853
|
+
getInitialAnswers: () => s.initialAnswers,
|
|
854
|
+
getSkipPages: () => s.skipPages,
|
|
855
|
+
onSubmit: (o) => s.onSubmit(o),
|
|
856
|
+
onPageChange: (o, u) => {
|
|
857
|
+
var r;
|
|
858
|
+
return (r = s.onPageChange) == null ? void 0 : r.call(s, o, u);
|
|
859
859
|
},
|
|
860
|
-
onAnswerChange: (
|
|
861
|
-
var
|
|
862
|
-
return (
|
|
860
|
+
onAnswerChange: (o, u) => {
|
|
861
|
+
var r;
|
|
862
|
+
return (r = s.onAnswerChange) == null ? void 0 : r.call(s, o, u);
|
|
863
863
|
},
|
|
864
864
|
onReady: () => {
|
|
865
|
-
var
|
|
866
|
-
return (
|
|
865
|
+
var o;
|
|
866
|
+
return (o = s.onReady) == null ? void 0 : o.call(s);
|
|
867
867
|
},
|
|
868
|
-
onError: (
|
|
869
|
-
var
|
|
870
|
-
return (
|
|
868
|
+
onError: (o) => {
|
|
869
|
+
var u;
|
|
870
|
+
return (u = s.onError) == null ? void 0 : u.call(s, o);
|
|
871
871
|
}
|
|
872
872
|
});
|
|
873
|
-
return
|
|
873
|
+
return de("dtc-onboarding", l), (o, u) => ce(o.$slots, "default");
|
|
874
874
|
}
|
|
875
|
-
}),
|
|
875
|
+
}), mn = ["src"], gn = /* @__PURE__ */ F({
|
|
876
876
|
__name: "DtcHeader",
|
|
877
877
|
props: {
|
|
878
878
|
partnerLogoUrl: {},
|
|
879
879
|
showCloseButton: { type: Boolean }
|
|
880
880
|
},
|
|
881
881
|
emits: ["close"],
|
|
882
|
-
setup(
|
|
883
|
-
const
|
|
884
|
-
return (
|
|
885
|
-
class: e(
|
|
882
|
+
setup(n, { emit: s }) {
|
|
883
|
+
const l = s;
|
|
884
|
+
return (o, u) => (c(), p("header", {
|
|
885
|
+
class: e(o.$style.header)
|
|
886
886
|
}, [
|
|
887
887
|
t("div", {
|
|
888
|
-
class: e(
|
|
888
|
+
class: e(o.$style.headerLogos)
|
|
889
889
|
}, [
|
|
890
|
-
|
|
890
|
+
n.partnerLogoUrl ? (c(), p("img", {
|
|
891
891
|
key: 0,
|
|
892
|
-
src:
|
|
892
|
+
src: n.partnerLogoUrl,
|
|
893
893
|
alt: "Partner",
|
|
894
|
-
class: e(
|
|
895
|
-
}, null, 10,
|
|
896
|
-
(
|
|
894
|
+
class: e(o.$style.headerPartnerLogo)
|
|
895
|
+
}, null, 10, mn)) : E("", !0),
|
|
896
|
+
(c(), p("svg", {
|
|
897
897
|
width: "90",
|
|
898
898
|
height: "18",
|
|
899
899
|
viewBox: "0 0 112.574 24.0002",
|
|
@@ -901,21 +901,21 @@ const fs = /* @__PURE__ */ F({
|
|
|
901
901
|
xmlns: "http://www.w3.org/2000/svg",
|
|
902
902
|
"aria-label": "Opendoor",
|
|
903
903
|
role: "img",
|
|
904
|
-
class: e(
|
|
905
|
-
}, [...
|
|
904
|
+
class: e(o.$style.headerOpendoorLogo)
|
|
905
|
+
}, [...u[1] || (u[1] = [
|
|
906
906
|
t("path", {
|
|
907
907
|
d: "M21.8975 5.53219C22.0296 5.51725 22.144 5.62372 22.1396 5.7568L22.0928 7.21773H22.2148C23.2408 6.33834 24.6088 5.53316 26.3184 5.53316C28.6383 5.53337 31.1045 7.07197 31.1045 11.542C31.1044 16.6229 28.1252 18.8456 24.0469 18.8457C23.5341 18.8457 22.7277 18.748 22.1904 18.6015C22.1904 18.6015 22.2148 19.2369 22.2148 20.0918V23.4072C22.2148 23.5083 22.1393 23.593 22.0391 23.6045L18.5527 23.999C18.4349 24.0122 18.332 23.9191 18.332 23.8007V6.11324C18.332 6.01204 18.4082 5.92743 18.5088 5.91597L21.8975 5.53219ZM8.35254 1.33101C12.5528 1.33111 16.5088 3.8474 16.5088 9.90523C16.5088 16.3784 12.0884 18.8457 8.15625 18.8457C3.95617 18.8455 0 16.1584 0 10.2959C9.43202e-05 3.87138 4.42045 1.33101 8.35254 1.33101ZM38.9141 5.53219C42.245 5.53219 44.3351 7.17875 44.4541 11.4853C44.4565 11.5689 44.3887 11.6395 44.3047 11.6396H36.5518C36.4679 11.6398 36.4004 11.7102 36.4023 11.7939C36.5116 15.6741 38.0191 16.7451 40.502 16.7451C41.7135 16.745 42.6903 16.4632 43.5078 16.1005C43.5679 16.0738 43.6377 16.0896 43.6807 16.1396L44.0059 16.5214C44.0548 16.579 44.0546 16.6649 44.0029 16.7197C43.1121 17.6594 41.298 18.8457 38.9141 18.8457C34.6647 18.8457 32.54 16.3051 32.54 12.1523C32.5401 7.90199 35.6904 5.53219 38.9141 5.53219ZM71.8682 0.000935719C72.0069 -0.0114562 72.1257 0.100879 72.1191 0.240194C72.0964 0.716622 72.0527 1.87639 72.0527 3.13863V18.2412C72.0527 18.3558 71.9689 18.4538 71.8555 18.4697L68.5049 18.8437C68.3628 18.8638 68.2375 18.75 68.2432 18.6064L68.292 17.2578H68.1943C67.1441 18.1614 65.7768 18.8456 64.0674 18.8457C61.6496 18.8457 59.2804 17.087 59.2803 12.6416C59.2803 7.56051 62.5533 5.53219 66.3633 5.53219C67.0224 5.5322 67.706 5.65511 68.2188 5.80172C68.2188 5.80172 68.1699 4.89765 68.1699 4.01851V0.598592C68.1699 0.495514 68.2491 0.40955 68.3516 0.40035L71.8682 0.000935719ZM80.29 5.53219C83.831 5.53235 86.9325 7.65789 86.9326 12.1035C86.9326 16.7934 83.66 18.8455 80.29 18.8457C76.7489 18.8457 73.6719 16.6956 73.6719 12.2255C73.672 7.53545 76.993 5.53219 80.29 5.53219ZM94.8555 5.53219C98.3966 5.53219 101.498 7.65772 101.498 12.1035C101.498 16.7936 98.2258 18.8457 94.8555 18.8457C91.3146 18.8456 88.2373 16.6956 88.2373 12.2255C88.2375 7.53549 91.5587 5.53222 94.8555 5.53219ZM49.54 5.52828C49.6571 5.51515 49.7585 5.60852 49.7549 5.72652L49.707 7.26656H49.8047C51.0989 6.33849 52.7115 5.53219 54.4941 5.53219C56.5697 5.53235 57.6932 6.6075 57.6934 8.80562V18.3593C57.6931 18.4662 57.6057 18.5527 57.499 18.5527H53.9795C53.8728 18.5527 53.7854 18.4662 53.7852 18.3593V9.75875C53.7852 8.26873 53.2482 7.80466 52.1006 7.80465C51.2456 7.80465 50.3663 7.9998 49.8291 8.12203V18.3593C49.8289 18.4661 49.7423 18.5526 49.6357 18.5527H46.1396C46.033 18.5527 45.9465 18.4662 45.9463 18.3593V6.11324C45.9463 6.01204 46.0226 5.92724 46.123 5.91597L49.54 5.52828ZM110.574 5.53219C111.746 5.53219 112.574 6.1674 112.574 7.36422C112.574 8.53675 111.722 9.29195 110.77 9.29195C109.721 9.29192 109.354 8.85463 108.89 8.09762C108.743 7.82894 108.596 7.78023 108.376 7.78023C107.937 7.78032 107.375 8.09738 107.033 8.415V18.3222C107.033 18.4491 106.93 18.5527 106.803 18.5527H103.38C103.253 18.5527 103.15 18.4491 103.15 18.3222V6.11324C103.15 6.01203 103.226 5.92743 103.326 5.91597L106.703 5.53707C106.842 5.52148 106.963 5.63273 106.959 5.77242L106.911 7.41305H107.009C107.766 6.60703 109.158 5.53219 110.574 5.53219ZM80.2158 6.48531C78.6774 6.48551 77.7744 7.60933 77.7744 11.8105C77.7744 16.818 78.5799 17.8924 80.3623 17.8925C81.8279 17.8925 82.8291 17.0378 82.8291 12.3476C82.8291 7.41346 81.8766 6.48531 80.2158 6.48531ZM94.7822 6.48531C93.2437 6.48537 92.3399 7.60905 92.3398 11.8105C92.3398 16.8181 93.1462 17.8924 94.9287 17.8925C96.3942 17.8925 97.3955 17.0378 97.3955 12.3476C97.3955 7.41346 96.443 6.48531 94.7822 6.48531ZM24.1934 7.65816C23.2165 7.65816 22.6057 7.95117 22.2148 8.09762V16.9892C22.6546 17.5022 23.3141 17.8691 24.1445 17.8691C26.0737 17.8691 27.0996 16.8424 27.0996 12.372C27.0996 8.8791 26.0493 7.65823 24.1934 7.65816ZM8.20605 2.35738C5.83698 2.35738 4.63965 4.01812 4.63965 9.78316C4.63965 15.4746 5.56842 17.8203 8.30371 17.8203C10.7211 17.8201 11.8691 16.1825 11.8691 10.4423C11.8691 4.72668 10.8919 2.35759 8.20605 2.35738ZM66.2656 6.50972C64.5074 6.50972 63.2861 7.80421 63.2861 11.8349C63.2861 15.67 64.2631 16.916 66.1191 16.916C67.1198 16.9159 67.7791 16.5256 68.1699 16.3789V7.53512C67.7548 7.02239 67.1689 6.50989 66.2656 6.50972ZM38.7188 6.4609C37.4732 6.46096 36.4961 7.63335 36.3984 10.7109L40.5752 10.4912C40.5752 7.53568 40.1842 6.4609 38.7188 6.4609Z",
|
|
908
908
|
fill: "#235ca3"
|
|
909
909
|
}, null, -1)
|
|
910
910
|
])], 2))
|
|
911
911
|
], 2),
|
|
912
|
-
|
|
912
|
+
n.showCloseButton ? (c(), p("button", {
|
|
913
913
|
key: 0,
|
|
914
914
|
type: "button",
|
|
915
|
-
class: e(
|
|
915
|
+
class: e(o.$style.headerCloseButton),
|
|
916
916
|
"aria-label": "Close",
|
|
917
|
-
onClick:
|
|
918
|
-
}, [...
|
|
917
|
+
onClick: u[0] || (u[0] = (r) => l("close"))
|
|
918
|
+
}, [...u[2] || (u[2] = [
|
|
919
919
|
t("svg", {
|
|
920
920
|
width: "24",
|
|
921
921
|
height: "24",
|
|
@@ -942,85 +942,85 @@ const fs = /* @__PURE__ */ F({
|
|
|
942
942
|
])], 2)) : E("", !0)
|
|
943
943
|
], 2));
|
|
944
944
|
}
|
|
945
|
-
}),
|
|
946
|
-
header:
|
|
947
|
-
headerLogos:
|
|
948
|
-
headerPartnerLogo:
|
|
949
|
-
headerOpendoorLogo:
|
|
950
|
-
headerCloseButton:
|
|
951
|
-
},
|
|
952
|
-
$style:
|
|
953
|
-
},
|
|
945
|
+
}), bn = "_header_uo1uz_2", $n = "_headerLogos_uo1uz_12", Cn = "_headerPartnerLogo_uo1uz_18", kn = "_headerOpendoorLogo_uo1uz_24", _n = "_headerCloseButton_uo1uz_28", wn = {
|
|
946
|
+
header: bn,
|
|
947
|
+
headerLogos: $n,
|
|
948
|
+
headerPartnerLogo: Cn,
|
|
949
|
+
headerOpendoorLogo: kn,
|
|
950
|
+
headerCloseButton: _n
|
|
951
|
+
}, Ln = {
|
|
952
|
+
$style: wn
|
|
953
|
+
}, In = /* @__PURE__ */ V(gn, [["__cssModules", Ln]]), Sn = ["aria-label"], Dn = ["aria-checked", "tabindex", "onClick", "onKeydown"], En = /* @__PURE__ */ F({
|
|
954
954
|
__name: "RadioCardInput",
|
|
955
955
|
props: {
|
|
956
956
|
question: {}
|
|
957
957
|
},
|
|
958
|
-
setup(
|
|
959
|
-
const
|
|
960
|
-
let
|
|
961
|
-
|
|
962
|
-
|
|
958
|
+
setup(n) {
|
|
959
|
+
const s = x("dtc-onboarding");
|
|
960
|
+
let l = null;
|
|
961
|
+
le(() => {
|
|
962
|
+
l && clearTimeout(l);
|
|
963
963
|
});
|
|
964
|
-
function
|
|
965
|
-
|
|
964
|
+
function o(r, d) {
|
|
965
|
+
s.setAnswer(r.key, d), r.autoAdvance && (l && clearTimeout(l), l = setTimeout(() => s.goToNext(), 150));
|
|
966
966
|
}
|
|
967
|
-
function
|
|
968
|
-
var
|
|
969
|
-
const
|
|
970
|
-
if (!
|
|
967
|
+
function u(r, d, v) {
|
|
968
|
+
var h, m;
|
|
969
|
+
const i = v.options;
|
|
970
|
+
if (!i) return;
|
|
971
971
|
let f = null;
|
|
972
|
-
if (
|
|
973
|
-
const
|
|
974
|
-
(
|
|
972
|
+
if (r.key === "ArrowDown" || r.key === "ArrowRight" ? (r.preventDefault(), f = (d + 1) % i.length) : (r.key === "ArrowUp" || r.key === "ArrowLeft") && (r.preventDefault(), f = (d - 1 + i.length) % i.length), f !== null) {
|
|
973
|
+
const b = (h = r.currentTarget.closest('[role="radiogroup"]')) == null ? void 0 : h.querySelectorAll('[role="radio"]');
|
|
974
|
+
(m = b == null ? void 0 : b[f]) == null || m.focus(), o(v, i[f].value);
|
|
975
975
|
}
|
|
976
976
|
}
|
|
977
|
-
return (
|
|
978
|
-
class: e(
|
|
977
|
+
return (r, d) => (c(), p("div", {
|
|
978
|
+
class: e(r.$style.radioCardGroup),
|
|
979
979
|
role: "radiogroup",
|
|
980
|
-
"aria-label":
|
|
980
|
+
"aria-label": n.question.label
|
|
981
981
|
}, [
|
|
982
|
-
(
|
|
983
|
-
key: String(
|
|
982
|
+
(c(!0), p(j, null, Q(n.question.options, (v, i) => (c(), p("button", {
|
|
983
|
+
key: String(v.value),
|
|
984
984
|
type: "button",
|
|
985
985
|
role: "radio",
|
|
986
|
-
"aria-checked":
|
|
987
|
-
tabindex:
|
|
986
|
+
"aria-checked": B(s).getAnswer(n.question.key) === v.value,
|
|
987
|
+
tabindex: B(s).getAnswer(n.question.key) === v.value || i === 0 && B(s).getAnswer(n.question.key) === void 0 ? 0 : -1,
|
|
988
988
|
class: e([
|
|
989
|
-
|
|
990
|
-
|
|
989
|
+
r.$style.radioCard,
|
|
990
|
+
B(s).getAnswer(n.question.key) === v.value ? r.$style.radioCardSelected : ""
|
|
991
991
|
]),
|
|
992
|
-
onClick: (f) =>
|
|
993
|
-
onKeydown: (f) =>
|
|
992
|
+
onClick: (f) => o(n.question, v.value),
|
|
993
|
+
onKeydown: (f) => u(f, i, n.question)
|
|
994
994
|
}, [
|
|
995
995
|
t("span", {
|
|
996
|
-
class: e(
|
|
997
|
-
}, _(
|
|
998
|
-
|
|
996
|
+
class: e(r.$style.radioCardLabel)
|
|
997
|
+
}, _(v.label), 3),
|
|
998
|
+
v.description ? (c(), p("span", {
|
|
999
999
|
key: 0,
|
|
1000
|
-
class: e(
|
|
1001
|
-
}, _(
|
|
1002
|
-
], 42,
|
|
1003
|
-
|
|
1000
|
+
class: e(r.$style.radioCardDescription)
|
|
1001
|
+
}, _(v.description), 3)) : E("", !0)
|
|
1002
|
+
], 42, Dn))), 128)),
|
|
1003
|
+
B(s).validationErrors.value[n.question.key] ? (c(), p("p", {
|
|
1004
1004
|
key: 0,
|
|
1005
|
-
class: e(
|
|
1005
|
+
class: e(r.$style.fieldError),
|
|
1006
1006
|
role: "alert"
|
|
1007
|
-
}, _(
|
|
1008
|
-
], 10,
|
|
1007
|
+
}, _(B(s).validationErrors.value[n.question.key]), 3)) : E("", !0)
|
|
1008
|
+
], 10, Sn));
|
|
1009
1009
|
}
|
|
1010
|
-
}),
|
|
1011
|
-
radioCardGroup:
|
|
1012
|
-
radioCard:
|
|
1013
|
-
radioCardSelected:
|
|
1014
|
-
radioCardLabel:
|
|
1015
|
-
radioCardDescription:
|
|
1016
|
-
fieldError:
|
|
1017
|
-
},
|
|
1018
|
-
$style:
|
|
1019
|
-
},
|
|
1020
|
-
function H(
|
|
1021
|
-
return `${
|
|
1010
|
+
}), qn = "_radioCardGroup_11rwj_2", Mn = "_radioCard_11rwj_2", An = "_radioCardSelected_11rwj_34", Tn = "_radioCardLabel_11rwj_39", Pn = "_radioCardDescription_11rwj_45", Bn = "_fieldError_11rwj_50", Fn = {
|
|
1011
|
+
radioCardGroup: qn,
|
|
1012
|
+
radioCard: Mn,
|
|
1013
|
+
radioCardSelected: An,
|
|
1014
|
+
radioCardLabel: Tn,
|
|
1015
|
+
radioCardDescription: Pn,
|
|
1016
|
+
fieldError: Bn
|
|
1017
|
+
}, Rn = {
|
|
1018
|
+
$style: Fn
|
|
1019
|
+
}, Nn = /* @__PURE__ */ V(En, [["__cssModules", Rn]]), Gn = "https://images.opendoor.com/source/s3/imgdrop-production", On = "service=reception-fe&dpr=2&fit=scale-down";
|
|
1020
|
+
function H(n, s = "3:2-sm") {
|
|
1021
|
+
return `${Gn}/${n}?${On}&preset=${s}`;
|
|
1022
1022
|
}
|
|
1023
|
-
const
|
|
1023
|
+
const Hn = {
|
|
1024
1024
|
// Kitchen
|
|
1025
1025
|
"kitchen-fixer_upper": H("2023-04-1681772974083-61414.png"),
|
|
1026
1026
|
"kitchen-dated": H("2023-04-1681772974089-39460.png"),
|
|
@@ -1045,141 +1045,141 @@ const Os = {
|
|
|
1045
1045
|
"exterior-standard": H("2023-04-1681773220498-64940.png"),
|
|
1046
1046
|
"exterior-high_end": H("2023-04-1682103085417-24272.jpeg", "3:2-md"),
|
|
1047
1047
|
"exterior-luxury": H("2023-04-1681773220487-59852.png")
|
|
1048
|
-
},
|
|
1048
|
+
}, jn = ["aria-label"], Vn = ["aria-checked", "onClick"], xn = ["src", "alt"], Un = /* @__PURE__ */ F({
|
|
1049
1049
|
__name: "ImageCardInput",
|
|
1050
1050
|
props: {
|
|
1051
1051
|
question: {}
|
|
1052
1052
|
},
|
|
1053
|
-
setup(
|
|
1054
|
-
const
|
|
1055
|
-
let
|
|
1056
|
-
|
|
1057
|
-
|
|
1053
|
+
setup(n) {
|
|
1054
|
+
const s = x("dtc-onboarding");
|
|
1055
|
+
let l = null;
|
|
1056
|
+
le(() => {
|
|
1057
|
+
l && clearTimeout(l);
|
|
1058
1058
|
});
|
|
1059
|
-
function
|
|
1060
|
-
|
|
1059
|
+
function o(r, d) {
|
|
1060
|
+
s.setAnswer(r.key, d), r.autoAdvance && (l && clearTimeout(l), l = setTimeout(() => s.goToNext(), 300));
|
|
1061
1061
|
}
|
|
1062
|
-
function
|
|
1063
|
-
return
|
|
1062
|
+
function u(r) {
|
|
1063
|
+
return r ? Hn[r] : void 0;
|
|
1064
1064
|
}
|
|
1065
|
-
return (
|
|
1066
|
-
class: e(
|
|
1065
|
+
return (r, d) => (c(), p("div", {
|
|
1066
|
+
class: e(r.$style.imageCardGroup),
|
|
1067
1067
|
role: "radiogroup",
|
|
1068
|
-
"aria-label":
|
|
1068
|
+
"aria-label": n.question.label
|
|
1069
1069
|
}, [
|
|
1070
|
-
(
|
|
1071
|
-
key: String(
|
|
1070
|
+
(c(!0), p(j, null, Q(n.question.options, (v) => (c(), p("button", {
|
|
1071
|
+
key: String(v.value),
|
|
1072
1072
|
type: "button",
|
|
1073
1073
|
role: "radio",
|
|
1074
|
-
"aria-checked":
|
|
1074
|
+
"aria-checked": B(s).getAnswer(n.question.key) === v.value,
|
|
1075
1075
|
class: e([
|
|
1076
|
-
|
|
1077
|
-
|
|
1076
|
+
r.$style.imageCard,
|
|
1077
|
+
B(s).getAnswer(n.question.key) === v.value ? r.$style.imageCardSelected : ""
|
|
1078
1078
|
]),
|
|
1079
|
-
onClick: (
|
|
1079
|
+
onClick: (i) => o(n.question, v.value)
|
|
1080
1080
|
}, [
|
|
1081
|
-
|
|
1081
|
+
u(v.imageId) ? (c(), p("img", {
|
|
1082
1082
|
key: 0,
|
|
1083
|
-
src:
|
|
1084
|
-
alt:
|
|
1085
|
-
class: e(
|
|
1083
|
+
src: u(v.imageId),
|
|
1084
|
+
alt: v.label,
|
|
1085
|
+
class: e(r.$style.imageCardPhoto),
|
|
1086
1086
|
loading: "lazy"
|
|
1087
|
-
}, null, 10,
|
|
1087
|
+
}, null, 10, xn)) : E("", !0),
|
|
1088
1088
|
t("span", {
|
|
1089
|
-
class: e(
|
|
1090
|
-
}, _(
|
|
1091
|
-
|
|
1089
|
+
class: e(r.$style.imageCardLabel)
|
|
1090
|
+
}, _(v.label), 3),
|
|
1091
|
+
v.description ? (c(), p("span", {
|
|
1092
1092
|
key: 1,
|
|
1093
|
-
class: e(
|
|
1094
|
-
}, _(
|
|
1095
|
-
], 10,
|
|
1096
|
-
|
|
1093
|
+
class: e(r.$style.imageCardDescription)
|
|
1094
|
+
}, _(v.description), 3)) : E("", !0)
|
|
1095
|
+
], 10, Vn))), 128)),
|
|
1096
|
+
B(s).validationErrors.value[n.question.key] ? (c(), p("p", {
|
|
1097
1097
|
key: 0,
|
|
1098
|
-
class: e(
|
|
1098
|
+
class: e(r.$style.fieldError),
|
|
1099
1099
|
role: "alert"
|
|
1100
|
-
}, _(
|
|
1101
|
-
], 10,
|
|
1100
|
+
}, _(B(s).validationErrors.value[n.question.key]), 3)) : E("", !0)
|
|
1101
|
+
], 10, jn));
|
|
1102
1102
|
}
|
|
1103
|
-
}),
|
|
1104
|
-
imageCardGroup:
|
|
1105
|
-
imageCard:
|
|
1106
|
-
imageCardSelected:
|
|
1107
|
-
imageCardPhoto:
|
|
1108
|
-
imageCardLabel:
|
|
1109
|
-
imageCardDescription:
|
|
1110
|
-
fieldError:
|
|
1111
|
-
},
|
|
1112
|
-
$style:
|
|
1113
|
-
},
|
|
1103
|
+
}), Zn = "_imageCardGroup_1vc6c_2", zn = "_imageCard_1vc6c_2", Wn = "_imageCardSelected_1vc6c_34", Kn = "_imageCardPhoto_1vc6c_39", Qn = "_imageCardLabel_1vc6c_46", Yn = "_imageCardDescription_1vc6c_53", Xn = "_fieldError_1vc6c_60", Jn = {
|
|
1104
|
+
imageCardGroup: Zn,
|
|
1105
|
+
imageCard: zn,
|
|
1106
|
+
imageCardSelected: Wn,
|
|
1107
|
+
imageCardPhoto: Kn,
|
|
1108
|
+
imageCardLabel: Qn,
|
|
1109
|
+
imageCardDescription: Yn,
|
|
1110
|
+
fieldError: Xn
|
|
1111
|
+
}, es = {
|
|
1112
|
+
$style: Jn
|
|
1113
|
+
}, ts = /* @__PURE__ */ V(Un, [["__cssModules", es]]), ns = ["aria-label"], ss = ["aria-checked", "onClick"], as = {
|
|
1114
1114
|
key: 0,
|
|
1115
1115
|
width: "12",
|
|
1116
1116
|
height: "12",
|
|
1117
1117
|
viewBox: "0 0 12 12",
|
|
1118
1118
|
fill: "none"
|
|
1119
|
-
},
|
|
1119
|
+
}, os = /* @__PURE__ */ F({
|
|
1120
1120
|
__name: "CheckboxCardInput",
|
|
1121
1121
|
props: {
|
|
1122
1122
|
question: {}
|
|
1123
1123
|
},
|
|
1124
|
-
setup(
|
|
1125
|
-
const
|
|
1126
|
-
() =>
|
|
1127
|
-
),
|
|
1128
|
-
() =>
|
|
1124
|
+
setup(n) {
|
|
1125
|
+
const s = n, l = x("dtc-onboarding"), o = w(
|
|
1126
|
+
() => l.getAnswer(s.question.key) ?? []
|
|
1127
|
+
), u = w(
|
|
1128
|
+
() => l.validationErrors.value[s.question.key]
|
|
1129
1129
|
);
|
|
1130
|
-
function
|
|
1130
|
+
function r(d) {
|
|
1131
1131
|
var f;
|
|
1132
|
-
const
|
|
1133
|
-
if (
|
|
1134
|
-
|
|
1132
|
+
const v = (f = s.question.options) == null ? void 0 : f.find((h) => h.value === d);
|
|
1133
|
+
if (v != null && v.exclusive) {
|
|
1134
|
+
l.setAnswer(s.question.key, [d]);
|
|
1135
1135
|
return;
|
|
1136
1136
|
}
|
|
1137
|
-
const
|
|
1138
|
-
(
|
|
1139
|
-
var
|
|
1140
|
-
return !((
|
|
1137
|
+
const i = o.value.filter(
|
|
1138
|
+
(h) => {
|
|
1139
|
+
var m, b;
|
|
1140
|
+
return !((b = (m = s.question.options) == null ? void 0 : m.find((L) => L.value === h)) != null && b.exclusive);
|
|
1141
1141
|
}
|
|
1142
1142
|
);
|
|
1143
|
-
if (
|
|
1144
|
-
const
|
|
1145
|
-
|
|
1143
|
+
if (i.includes(d)) {
|
|
1144
|
+
const h = i.filter((m) => m !== d);
|
|
1145
|
+
l.setAnswer(s.question.key, h.length > 0 ? h : void 0);
|
|
1146
1146
|
} else
|
|
1147
|
-
|
|
1147
|
+
l.setAnswer(s.question.key, [...i, d]);
|
|
1148
1148
|
}
|
|
1149
|
-
return (
|
|
1150
|
-
class: e(
|
|
1149
|
+
return (d, v) => (c(), p("div", {
|
|
1150
|
+
class: e(d.$style.checkboxCardGroup),
|
|
1151
1151
|
role: "group",
|
|
1152
|
-
"aria-label":
|
|
1152
|
+
"aria-label": n.question.label
|
|
1153
1153
|
}, [
|
|
1154
|
-
(
|
|
1155
|
-
key: String(
|
|
1154
|
+
(c(!0), p(j, null, Q(n.question.options, (i) => (c(), p("button", {
|
|
1155
|
+
key: String(i.value),
|
|
1156
1156
|
type: "button",
|
|
1157
1157
|
role: "checkbox",
|
|
1158
|
-
"aria-checked":
|
|
1158
|
+
"aria-checked": o.value.includes(String(i.value)),
|
|
1159
1159
|
class: e([
|
|
1160
|
-
|
|
1161
|
-
|
|
1160
|
+
d.$style.checkboxCard,
|
|
1161
|
+
o.value.includes(String(i.value)) ? d.$style.checkboxCardSelected : ""
|
|
1162
1162
|
]),
|
|
1163
|
-
onClick: (f) =>
|
|
1163
|
+
onClick: (f) => r(String(i.value))
|
|
1164
1164
|
}, [
|
|
1165
1165
|
t("span", {
|
|
1166
|
-
class: e(
|
|
1166
|
+
class: e(d.$style.checkboxCardContent)
|
|
1167
1167
|
}, [
|
|
1168
1168
|
t("span", {
|
|
1169
|
-
class: e(
|
|
1170
|
-
}, _(
|
|
1171
|
-
|
|
1169
|
+
class: e(d.$style.checkboxCardLabel)
|
|
1170
|
+
}, _(i.label), 3),
|
|
1171
|
+
i.helperText ? (c(), p("span", {
|
|
1172
1172
|
key: 0,
|
|
1173
|
-
class: e(
|
|
1174
|
-
}, _(
|
|
1173
|
+
class: e(d.$style.checkboxCardHelper)
|
|
1174
|
+
}, _(i.helperText), 3)) : E("", !0)
|
|
1175
1175
|
], 2),
|
|
1176
1176
|
t("span", {
|
|
1177
1177
|
class: e([
|
|
1178
|
-
|
|
1179
|
-
|
|
1178
|
+
d.$style.checkboxIndicator,
|
|
1179
|
+
o.value.includes(String(i.value)) ? d.$style.checkboxIndicatorChecked : ""
|
|
1180
1180
|
])
|
|
1181
1181
|
}, [
|
|
1182
|
-
|
|
1182
|
+
o.value.includes(String(i.value)) ? (c(), p("svg", as, [...v[0] || (v[0] = [
|
|
1183
1183
|
t("path", {
|
|
1184
1184
|
d: "M2 6l3 3 5-5",
|
|
1185
1185
|
stroke: "currentColor",
|
|
@@ -1189,179 +1189,179 @@ const Os = {
|
|
|
1189
1189
|
}, null, -1)
|
|
1190
1190
|
])])) : E("", !0)
|
|
1191
1191
|
], 2)
|
|
1192
|
-
], 10,
|
|
1193
|
-
|
|
1192
|
+
], 10, ss))), 128)),
|
|
1193
|
+
u.value ? (c(), p("p", {
|
|
1194
1194
|
key: 0,
|
|
1195
|
-
class: e(
|
|
1195
|
+
class: e(d.$style.fieldError),
|
|
1196
1196
|
role: "alert"
|
|
1197
|
-
}, _(
|
|
1198
|
-
], 10,
|
|
1197
|
+
}, _(u.value), 3)) : E("", !0)
|
|
1198
|
+
], 10, ns));
|
|
1199
1199
|
}
|
|
1200
|
-
}),
|
|
1201
|
-
checkboxCardGroup:
|
|
1202
|
-
checkboxCard:
|
|
1203
|
-
checkboxCardSelected:
|
|
1204
|
-
checkboxCardContent:
|
|
1205
|
-
checkboxCardLabel:
|
|
1206
|
-
checkboxCardHelper:
|
|
1207
|
-
checkboxIndicator:
|
|
1208
|
-
checkboxIndicatorChecked:
|
|
1209
|
-
fieldError:
|
|
1210
|
-
},
|
|
1211
|
-
$style:
|
|
1212
|
-
},
|
|
1200
|
+
}), ls = "_checkboxCardGroup_uqwpe_2", rs = "_checkboxCard_uqwpe_2", is = "_checkboxCardSelected_uqwpe_34", us = "_checkboxCardContent_uqwpe_39", cs = "_checkboxCardLabel_uqwpe_46", ds = "_checkboxCardHelper_uqwpe_52", vs = "_checkboxIndicator_uqwpe_57", ys = "_checkboxIndicatorChecked_uqwpe_69", fs = "_fieldError_uqwpe_75", ps = {
|
|
1201
|
+
checkboxCardGroup: ls,
|
|
1202
|
+
checkboxCard: rs,
|
|
1203
|
+
checkboxCardSelected: is,
|
|
1204
|
+
checkboxCardContent: us,
|
|
1205
|
+
checkboxCardLabel: cs,
|
|
1206
|
+
checkboxCardHelper: ds,
|
|
1207
|
+
checkboxIndicator: vs,
|
|
1208
|
+
checkboxIndicatorChecked: ys,
|
|
1209
|
+
fieldError: fs
|
|
1210
|
+
}, hs = {
|
|
1211
|
+
$style: ps
|
|
1212
|
+
}, ms = /* @__PURE__ */ V(os, [["__cssModules", hs]]), gs = ["for"], bs = ["id", "value", "aria-invalid", "aria-describedby"], $s = { value: "" }, Cs = ["value"], ks = ["id"], _s = /* @__PURE__ */ F({
|
|
1213
1213
|
__name: "DropdownInput",
|
|
1214
1214
|
props: {
|
|
1215
1215
|
question: {}
|
|
1216
1216
|
},
|
|
1217
|
-
setup(
|
|
1218
|
-
let
|
|
1219
|
-
const
|
|
1220
|
-
() =>
|
|
1217
|
+
setup(n) {
|
|
1218
|
+
let s = 0;
|
|
1219
|
+
const l = n, o = x("dtc-onboarding"), u = `dd-${++s}`, r = w(() => o.getAnswer(l.question.key)), d = w(
|
|
1220
|
+
() => o.validationErrors.value[l.question.key]
|
|
1221
1221
|
);
|
|
1222
|
-
function
|
|
1223
|
-
const f =
|
|
1224
|
-
|
|
1222
|
+
function v(i) {
|
|
1223
|
+
const f = i.target.value;
|
|
1224
|
+
l.question.type === "number" && f !== "" ? o.setAnswer(l.question.key, Number(f)) : o.setAnswer(l.question.key, f || void 0);
|
|
1225
1225
|
}
|
|
1226
|
-
return (
|
|
1227
|
-
class: e(
|
|
1226
|
+
return (i, f) => (c(), p("div", {
|
|
1227
|
+
class: e(i.$style.fieldGroup)
|
|
1228
1228
|
}, [
|
|
1229
1229
|
t("label", {
|
|
1230
|
-
class: e(
|
|
1231
|
-
for: `${
|
|
1232
|
-
}, _(
|
|
1233
|
-
|
|
1230
|
+
class: e(i.$style.fieldLabel),
|
|
1231
|
+
for: `${u}-${n.question.key}`
|
|
1232
|
+
}, _(n.question.label), 11, gs),
|
|
1233
|
+
n.question.description ? (c(), p("p", {
|
|
1234
1234
|
key: 0,
|
|
1235
|
-
class: e(
|
|
1236
|
-
}, _(
|
|
1235
|
+
class: e(i.$style.fieldDescription)
|
|
1236
|
+
}, _(n.question.description), 3)) : E("", !0),
|
|
1237
1237
|
t("select", {
|
|
1238
|
-
id: `${
|
|
1239
|
-
class: e([
|
|
1240
|
-
value:
|
|
1241
|
-
"aria-invalid":
|
|
1242
|
-
"aria-describedby":
|
|
1243
|
-
onChange:
|
|
1238
|
+
id: `${u}-${n.question.key}`,
|
|
1239
|
+
class: e([i.$style.fieldSelect, d.value ? i.$style.fieldSelectError : ""]),
|
|
1240
|
+
value: r.value !== void 0 ? String(r.value) : "",
|
|
1241
|
+
"aria-invalid": d.value ? "true" : void 0,
|
|
1242
|
+
"aria-describedby": d.value ? `${u}-${n.question.key}-error` : void 0,
|
|
1243
|
+
onChange: v
|
|
1244
1244
|
}, [
|
|
1245
|
-
t("option", $
|
|
1246
|
-
(
|
|
1247
|
-
key: String(
|
|
1248
|
-
value: String(
|
|
1249
|
-
}, _(
|
|
1250
|
-
], 42,
|
|
1251
|
-
|
|
1245
|
+
t("option", $s, _(n.question.placeholder || "Select..."), 1),
|
|
1246
|
+
(c(!0), p(j, null, Q(n.question.options, (h) => (c(), p("option", {
|
|
1247
|
+
key: String(h.value),
|
|
1248
|
+
value: String(h.value)
|
|
1249
|
+
}, _(h.label), 9, Cs))), 128))
|
|
1250
|
+
], 42, bs),
|
|
1251
|
+
d.value ? (c(), p("p", {
|
|
1252
1252
|
key: 1,
|
|
1253
|
-
id: `${
|
|
1254
|
-
class: e(
|
|
1253
|
+
id: `${u}-${n.question.key}-error`,
|
|
1254
|
+
class: e(i.$style.fieldError),
|
|
1255
1255
|
role: "alert"
|
|
1256
|
-
}, _(
|
|
1256
|
+
}, _(d.value), 11, ks)) : E("", !0)
|
|
1257
1257
|
], 2));
|
|
1258
1258
|
}
|
|
1259
|
-
}),
|
|
1260
|
-
fieldGroup:
|
|
1261
|
-
fieldLabel:
|
|
1262
|
-
fieldDescription:
|
|
1263
|
-
fieldSelect:
|
|
1264
|
-
fieldSelectError:
|
|
1265
|
-
fieldError:
|
|
1266
|
-
},
|
|
1267
|
-
$style:
|
|
1268
|
-
},
|
|
1259
|
+
}), ws = "_fieldGroup_qcbne_2", Ls = "_fieldLabel_qcbne_8", Is = "_fieldDescription_qcbne_15", Ss = "_fieldSelect_qcbne_22", Ds = "_fieldSelectError_qcbne_47", Es = "_fieldError_qcbne_51", qs = {
|
|
1260
|
+
fieldGroup: ws,
|
|
1261
|
+
fieldLabel: Ls,
|
|
1262
|
+
fieldDescription: Is,
|
|
1263
|
+
fieldSelect: Ss,
|
|
1264
|
+
fieldSelectError: Ds,
|
|
1265
|
+
fieldError: Es
|
|
1266
|
+
}, Ms = {
|
|
1267
|
+
$style: qs
|
|
1268
|
+
}, As = /* @__PURE__ */ V(_s, [["__cssModules", Ms]]), Ts = ["for"], Ps = ["id", "type", "inputmode", "value", "placeholder", "aria-invalid", "aria-describedby"], Bs = ["id"], Fs = /* @__PURE__ */ F({
|
|
1269
1269
|
__name: "TextInput",
|
|
1270
1270
|
props: {
|
|
1271
1271
|
question: {}
|
|
1272
1272
|
},
|
|
1273
|
-
setup(
|
|
1274
|
-
let
|
|
1275
|
-
const
|
|
1276
|
-
() =>
|
|
1277
|
-
),
|
|
1278
|
-
() =>
|
|
1279
|
-
),
|
|
1280
|
-
() =>
|
|
1273
|
+
setup(n) {
|
|
1274
|
+
let s = 0;
|
|
1275
|
+
const l = n, o = x("dtc-onboarding"), u = `ti-${++s}`, r = w(() => o.getAnswer(l.question.key)), d = w(
|
|
1276
|
+
() => o.validationErrors.value[l.question.key]
|
|
1277
|
+
), v = w(
|
|
1278
|
+
() => r.value !== void 0 && r.value !== null ? String(r.value) : ""
|
|
1279
|
+
), i = w(() => l.question.type === "number" ? "text" : l.question.style === "email" ? "email" : "text"), f = w(
|
|
1280
|
+
() => l.question.type === "number" ? "numeric" : void 0
|
|
1281
1281
|
);
|
|
1282
|
-
function
|
|
1283
|
-
const
|
|
1284
|
-
if (
|
|
1285
|
-
const
|
|
1286
|
-
|
|
1282
|
+
function h(m) {
|
|
1283
|
+
const b = m.target.value;
|
|
1284
|
+
if (l.question.type === "number") {
|
|
1285
|
+
const L = b.replace(/[^0-9.]/g, ""), M = L === "" ? void 0 : Number(L), q = M !== void 0 && isNaN(M) ? void 0 : M;
|
|
1286
|
+
o.setAnswer(l.question.key, q);
|
|
1287
1287
|
} else
|
|
1288
|
-
|
|
1288
|
+
o.setAnswer(l.question.key, b || void 0);
|
|
1289
1289
|
}
|
|
1290
|
-
return (
|
|
1291
|
-
class: e(
|
|
1290
|
+
return (m, b) => (c(), p("div", {
|
|
1291
|
+
class: e(m.$style.fieldGroup)
|
|
1292
1292
|
}, [
|
|
1293
1293
|
t("label", {
|
|
1294
|
-
class: e(
|
|
1295
|
-
for: `${
|
|
1296
|
-
}, _(
|
|
1297
|
-
|
|
1294
|
+
class: e(m.$style.fieldLabel),
|
|
1295
|
+
for: `${u}-${n.question.key}`
|
|
1296
|
+
}, _(n.question.label), 11, Ts),
|
|
1297
|
+
n.question.description ? (c(), p("p", {
|
|
1298
1298
|
key: 0,
|
|
1299
|
-
class: e(
|
|
1300
|
-
}, _(
|
|
1299
|
+
class: e(m.$style.fieldDescription)
|
|
1300
|
+
}, _(n.question.description), 3)) : E("", !0),
|
|
1301
1301
|
t("div", {
|
|
1302
|
-
class: e(
|
|
1302
|
+
class: e(m.$style.fieldInputWrapper)
|
|
1303
1303
|
}, [
|
|
1304
1304
|
t("input", {
|
|
1305
|
-
id: `${
|
|
1306
|
-
type:
|
|
1305
|
+
id: `${u}-${n.question.key}`,
|
|
1306
|
+
type: i.value,
|
|
1307
1307
|
inputmode: f.value,
|
|
1308
|
-
class: e([
|
|
1309
|
-
value:
|
|
1310
|
-
placeholder:
|
|
1311
|
-
"aria-invalid":
|
|
1312
|
-
"aria-describedby":
|
|
1313
|
-
onInput:
|
|
1314
|
-
}, null, 42,
|
|
1315
|
-
|
|
1308
|
+
class: e([m.$style.fieldInput, d.value ? m.$style.fieldInputError : ""]),
|
|
1309
|
+
value: v.value,
|
|
1310
|
+
placeholder: n.question.placeholder,
|
|
1311
|
+
"aria-invalid": d.value ? "true" : void 0,
|
|
1312
|
+
"aria-describedby": d.value ? `${u}-${n.question.key}-error` : void 0,
|
|
1313
|
+
onInput: h
|
|
1314
|
+
}, null, 42, Ps),
|
|
1315
|
+
n.question.suffix ? (c(), p("span", {
|
|
1316
1316
|
key: 0,
|
|
1317
|
-
class: e(
|
|
1318
|
-
}, _(
|
|
1317
|
+
class: e(m.$style.fieldSuffix)
|
|
1318
|
+
}, _(n.question.suffix), 3)) : E("", !0)
|
|
1319
1319
|
], 2),
|
|
1320
|
-
|
|
1320
|
+
d.value ? (c(), p("p", {
|
|
1321
1321
|
key: 1,
|
|
1322
|
-
id: `${
|
|
1323
|
-
class: e(
|
|
1322
|
+
id: `${u}-${n.question.key}-error`,
|
|
1323
|
+
class: e(m.$style.fieldError),
|
|
1324
1324
|
role: "alert"
|
|
1325
|
-
}, _(
|
|
1325
|
+
}, _(d.value), 11, Bs)) : E("", !0)
|
|
1326
1326
|
], 2));
|
|
1327
1327
|
}
|
|
1328
|
-
}),
|
|
1329
|
-
fieldGroup:
|
|
1330
|
-
fieldLabel:
|
|
1331
|
-
fieldDescription:
|
|
1332
|
-
fieldInputWrapper:
|
|
1333
|
-
fieldInput:
|
|
1334
|
-
fieldInputError:
|
|
1335
|
-
fieldSuffix:
|
|
1336
|
-
fieldError:
|
|
1337
|
-
},
|
|
1338
|
-
$style:
|
|
1339
|
-
},
|
|
1328
|
+
}), Rs = "_fieldGroup_1jlim_2", Ns = "_fieldLabel_1jlim_8", Gs = "_fieldDescription_1jlim_15", Os = "_fieldInputWrapper_1jlim_22", Hs = "_fieldInput_1jlim_22", js = "_fieldInputError_1jlim_60", Vs = "_fieldSuffix_1jlim_64", xs = "_fieldError_1jlim_73", Us = {
|
|
1329
|
+
fieldGroup: Rs,
|
|
1330
|
+
fieldLabel: Ns,
|
|
1331
|
+
fieldDescription: Gs,
|
|
1332
|
+
fieldInputWrapper: Os,
|
|
1333
|
+
fieldInput: Hs,
|
|
1334
|
+
fieldInputError: js,
|
|
1335
|
+
fieldSuffix: Vs,
|
|
1336
|
+
fieldError: xs
|
|
1337
|
+
}, Zs = {
|
|
1338
|
+
$style: Us
|
|
1339
|
+
}, zs = /* @__PURE__ */ V(Fs, [["__cssModules", Zs]]), Ws = ["for"], Ks = ["id", "value", "placeholder", "aria-invalid", "aria-describedby"], Qs = ["id"], Ys = /* @__PURE__ */ F({
|
|
1340
1340
|
__name: "CurrencyInput",
|
|
1341
1341
|
props: {
|
|
1342
1342
|
question: {}
|
|
1343
1343
|
},
|
|
1344
|
-
setup(
|
|
1345
|
-
let
|
|
1346
|
-
const
|
|
1347
|
-
() =>
|
|
1348
|
-
),
|
|
1349
|
-
() =>
|
|
1344
|
+
setup(n) {
|
|
1345
|
+
let s = 0;
|
|
1346
|
+
const l = n, o = x("dtc-onboarding"), u = `ci-${++s}`, r = w(() => o.getAnswer(l.question.key)), d = w(
|
|
1347
|
+
() => o.validationErrors.value[l.question.key]
|
|
1348
|
+
), v = w(
|
|
1349
|
+
() => r.value !== void 0 && r.value !== null ? String(r.value) : ""
|
|
1350
1350
|
);
|
|
1351
|
-
function
|
|
1352
|
-
const
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1351
|
+
function i(f) {
|
|
1352
|
+
const h = f.target.value.replace(/[^0-9]/g, ""), m = h === "" ? void 0 : Number(h);
|
|
1353
|
+
o.setAnswer(
|
|
1354
|
+
l.question.key,
|
|
1355
|
+
m !== void 0 && isNaN(m) ? void 0 : m
|
|
1356
1356
|
);
|
|
1357
1357
|
}
|
|
1358
|
-
return (f,
|
|
1358
|
+
return (f, h) => (c(), p("div", {
|
|
1359
1359
|
class: e(f.$style.fieldGroup)
|
|
1360
1360
|
}, [
|
|
1361
1361
|
t("label", {
|
|
1362
1362
|
class: e(f.$style.fieldLabel),
|
|
1363
|
-
for: `${
|
|
1364
|
-
}, _(
|
|
1363
|
+
for: `${u}-${n.question.key}`
|
|
1364
|
+
}, _(n.question.label), 11, Ws),
|
|
1365
1365
|
t("div", {
|
|
1366
1366
|
class: e(f.$style.currencyWrapper)
|
|
1367
1367
|
}, [
|
|
@@ -1369,125 +1369,125 @@ const Os = {
|
|
|
1369
1369
|
class: e(f.$style.currencyPrefix)
|
|
1370
1370
|
}, "$", 2),
|
|
1371
1371
|
t("input", {
|
|
1372
|
-
id: `${
|
|
1372
|
+
id: `${u}-${n.question.key}`,
|
|
1373
1373
|
type: "text",
|
|
1374
1374
|
inputmode: "numeric",
|
|
1375
|
-
class: e([f.$style.currencyInput,
|
|
1376
|
-
value:
|
|
1377
|
-
placeholder:
|
|
1378
|
-
"aria-invalid":
|
|
1379
|
-
"aria-describedby":
|
|
1380
|
-
onInput:
|
|
1381
|
-
}, null, 42,
|
|
1375
|
+
class: e([f.$style.currencyInput, d.value ? f.$style.fieldInputError : ""]),
|
|
1376
|
+
value: v.value,
|
|
1377
|
+
placeholder: n.question.placeholder,
|
|
1378
|
+
"aria-invalid": d.value ? "true" : void 0,
|
|
1379
|
+
"aria-describedby": d.value ? `${u}-${n.question.key}-error` : void 0,
|
|
1380
|
+
onInput: i
|
|
1381
|
+
}, null, 42, Ks)
|
|
1382
1382
|
], 2),
|
|
1383
|
-
|
|
1383
|
+
d.value ? (c(), p("p", {
|
|
1384
1384
|
key: 0,
|
|
1385
|
-
id: `${
|
|
1385
|
+
id: `${u}-${n.question.key}-error`,
|
|
1386
1386
|
class: e(f.$style.fieldError),
|
|
1387
1387
|
role: "alert"
|
|
1388
|
-
}, _(
|
|
1388
|
+
}, _(d.value), 11, Qs)) : E("", !0)
|
|
1389
1389
|
], 2));
|
|
1390
1390
|
}
|
|
1391
|
-
}),
|
|
1392
|
-
fieldGroup:
|
|
1393
|
-
fieldLabel:
|
|
1391
|
+
}), Xs = "_fieldGroup_10ms9_2", Js = "_fieldLabel_10ms9_8", ea = "_currencyWrapper_10ms9_15", ta = "_currencyPrefix_10ms9_21", na = "_currencyInput_10ms9_30", sa = "_fieldInputError_10ms9_48", aa = "_fieldError_10ms9_52", oa = {
|
|
1392
|
+
fieldGroup: Xs,
|
|
1393
|
+
fieldLabel: Js,
|
|
1394
1394
|
currencyWrapper: ea,
|
|
1395
1395
|
currencyPrefix: ta,
|
|
1396
|
-
currencyInput:
|
|
1397
|
-
fieldInputError:
|
|
1396
|
+
currencyInput: na,
|
|
1397
|
+
fieldInputError: sa,
|
|
1398
1398
|
fieldError: aa
|
|
1399
|
-
},
|
|
1400
|
-
$style:
|
|
1401
|
-
}, ra = /* @__PURE__ */ V(
|
|
1399
|
+
}, la = {
|
|
1400
|
+
$style: oa
|
|
1401
|
+
}, ra = /* @__PURE__ */ V(Ys, [["__cssModules", la]]), ia = ["for"], ua = ["id", "value", "placeholder", "aria-invalid", "aria-describedby"], ca = ["id"], da = /* @__PURE__ */ F({
|
|
1402
1402
|
__name: "PhoneInput",
|
|
1403
1403
|
props: {
|
|
1404
1404
|
question: {}
|
|
1405
1405
|
},
|
|
1406
|
-
setup(
|
|
1407
|
-
let
|
|
1408
|
-
const
|
|
1409
|
-
() =>
|
|
1410
|
-
),
|
|
1411
|
-
() =>
|
|
1406
|
+
setup(n) {
|
|
1407
|
+
let s = 0;
|
|
1408
|
+
const l = n, o = x("dtc-onboarding"), u = `pi-${++s}`, r = w(
|
|
1409
|
+
() => o.getAnswer(l.question.key) ?? ""
|
|
1410
|
+
), d = w(
|
|
1411
|
+
() => o.validationErrors.value[l.question.key]
|
|
1412
1412
|
);
|
|
1413
|
-
function
|
|
1414
|
-
const
|
|
1415
|
-
return
|
|
1413
|
+
function v(f) {
|
|
1414
|
+
const h = f.replace(/\D/g, "").slice(0, 10);
|
|
1415
|
+
return h.length <= 3 ? h : h.length <= 6 ? `(${h.slice(0, 3)}) ${h.slice(3)}` : `(${h.slice(0, 3)}) ${h.slice(3, 6)}-${h.slice(6)}`;
|
|
1416
1416
|
}
|
|
1417
|
-
function
|
|
1418
|
-
const
|
|
1419
|
-
|
|
1417
|
+
function i(f) {
|
|
1418
|
+
const m = f.target.value.replace(/\D/g, "").slice(0, 10);
|
|
1419
|
+
o.setAnswer(l.question.key, m || void 0);
|
|
1420
1420
|
}
|
|
1421
|
-
return (f,
|
|
1421
|
+
return (f, h) => (c(), p("div", {
|
|
1422
1422
|
class: e(f.$style.fieldGroup)
|
|
1423
1423
|
}, [
|
|
1424
1424
|
t("label", {
|
|
1425
1425
|
class: e(f.$style.fieldLabel),
|
|
1426
|
-
for: `${
|
|
1427
|
-
}, _(
|
|
1426
|
+
for: `${u}-${n.question.key}`
|
|
1427
|
+
}, _(n.question.label), 11, ia),
|
|
1428
1428
|
t("input", {
|
|
1429
|
-
id: `${
|
|
1429
|
+
id: `${u}-${n.question.key}`,
|
|
1430
1430
|
type: "tel",
|
|
1431
|
-
class: e([f.$style.fieldInput,
|
|
1432
|
-
value:
|
|
1433
|
-
placeholder:
|
|
1434
|
-
"aria-invalid":
|
|
1435
|
-
"aria-describedby":
|
|
1436
|
-
onInput:
|
|
1431
|
+
class: e([f.$style.fieldInput, d.value ? f.$style.fieldInputError : ""]),
|
|
1432
|
+
value: v(r.value),
|
|
1433
|
+
placeholder: n.question.placeholder || "(555) 555-5555",
|
|
1434
|
+
"aria-invalid": d.value ? "true" : void 0,
|
|
1435
|
+
"aria-describedby": d.value ? `${u}-${n.question.key}-error` : void 0,
|
|
1436
|
+
onInput: i
|
|
1437
1437
|
}, null, 42, ua),
|
|
1438
|
-
|
|
1438
|
+
d.value ? (c(), p("p", {
|
|
1439
1439
|
key: 0,
|
|
1440
|
-
id: `${
|
|
1440
|
+
id: `${u}-${n.question.key}-error`,
|
|
1441
1441
|
class: e(f.$style.fieldError),
|
|
1442
1442
|
role: "alert"
|
|
1443
|
-
}, _(
|
|
1443
|
+
}, _(d.value), 11, ca)) : E("", !0)
|
|
1444
1444
|
], 2));
|
|
1445
1445
|
}
|
|
1446
|
-
}), va = "_fieldGroup_p6z3v_2", ya = "_fieldLabel_p6z3v_8",
|
|
1446
|
+
}), va = "_fieldGroup_p6z3v_2", ya = "_fieldLabel_p6z3v_8", fa = "_fieldInput_p6z3v_15", pa = "_fieldInputError_p6z3v_37", ha = "_fieldError_p6z3v_41", ma = {
|
|
1447
1447
|
fieldGroup: va,
|
|
1448
1448
|
fieldLabel: ya,
|
|
1449
|
-
fieldInput:
|
|
1450
|
-
fieldInputError:
|
|
1449
|
+
fieldInput: fa,
|
|
1450
|
+
fieldInputError: pa,
|
|
1451
1451
|
fieldError: ha
|
|
1452
1452
|
}, ga = {
|
|
1453
1453
|
$style: ma
|
|
1454
|
-
}, ba = /* @__PURE__ */ V(
|
|
1454
|
+
}, ba = /* @__PURE__ */ V(da, [["__cssModules", ga]]), $a = ["checked"], Ca = /* @__PURE__ */ F({
|
|
1455
1455
|
__name: "ToggleInput",
|
|
1456
1456
|
props: {
|
|
1457
1457
|
question: {}
|
|
1458
1458
|
},
|
|
1459
|
-
setup(
|
|
1460
|
-
const
|
|
1461
|
-
() =>
|
|
1462
|
-
),
|
|
1463
|
-
() =>
|
|
1459
|
+
setup(n) {
|
|
1460
|
+
const s = n, l = x("dtc-onboarding"), o = x("dtc-consent-slots", {}), u = w(
|
|
1461
|
+
() => l.getAnswer(s.question.key)
|
|
1462
|
+
), r = w(() => s.question.label), d = w(
|
|
1463
|
+
() => s.question.key === "seller.sms_opt_in" && !!o["sms-consent-text"]
|
|
1464
1464
|
);
|
|
1465
|
-
function
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1465
|
+
function v(i) {
|
|
1466
|
+
l.setAnswer(
|
|
1467
|
+
s.question.key,
|
|
1468
|
+
i.target.checked
|
|
1469
1469
|
);
|
|
1470
1470
|
}
|
|
1471
|
-
return (
|
|
1472
|
-
class: e(
|
|
1471
|
+
return (i, f) => (c(), p("div", {
|
|
1472
|
+
class: e(i.$style.toggleGroup)
|
|
1473
1473
|
}, [
|
|
1474
1474
|
t("label", {
|
|
1475
|
-
class: e(
|
|
1475
|
+
class: e(i.$style.toggleLabel)
|
|
1476
1476
|
}, [
|
|
1477
1477
|
t("input", {
|
|
1478
1478
|
type: "checkbox",
|
|
1479
|
-
class: e(
|
|
1480
|
-
checked:
|
|
1481
|
-
onChange:
|
|
1479
|
+
class: e(i.$style.toggleCheckbox),
|
|
1480
|
+
checked: u.value === !0,
|
|
1481
|
+
onChange: v
|
|
1482
1482
|
}, null, 42, $a),
|
|
1483
1483
|
t("span", {
|
|
1484
|
-
class: e(
|
|
1484
|
+
class: e(i.$style.toggleText)
|
|
1485
1485
|
}, [
|
|
1486
|
-
|
|
1487
|
-
var
|
|
1488
|
-
return (
|
|
1489
|
-
}), { key: 0 })) : (
|
|
1490
|
-
|
|
1486
|
+
d.value ? (c(), K(Pe(() => {
|
|
1487
|
+
var h, m;
|
|
1488
|
+
return (m = (h = B(o))["sms-consent-text"]) == null ? void 0 : m.call(h);
|
|
1489
|
+
}), { key: 0 })) : (c(), p(j, { key: 1 }, [
|
|
1490
|
+
be(_(r.value), 1)
|
|
1491
1491
|
], 64))
|
|
1492
1492
|
], 2)
|
|
1493
1493
|
], 2)
|
|
@@ -1500,174 +1500,174 @@ const Os = {
|
|
|
1500
1500
|
toggleText: La
|
|
1501
1501
|
}, Sa = {
|
|
1502
1502
|
$style: Ia
|
|
1503
|
-
}, Da = /* @__PURE__ */ V(Ca, [["__cssModules", Sa]]), Ea = ["value", "placeholder", "aria-label", "aria-expanded", "aria-invalid", "aria-describedby", "aria-controls", "aria-activedescendant"], qa = ["id", "aria-selected", "onClick"], Ma = ["id"], Te = 4,
|
|
1503
|
+
}, Da = /* @__PURE__ */ V(Ca, [["__cssModules", Sa]]), Ea = ["value", "placeholder", "aria-label", "aria-expanded", "aria-invalid", "aria-describedby", "aria-controls", "aria-activedescendant"], qa = ["id", "aria-selected", "onClick"], Ma = ["id"], Te = 4, ge = 8, Aa = 240, Ta = 80, Pa = /* @__PURE__ */ F({
|
|
1504
1504
|
__name: "SearchableDropdownInput",
|
|
1505
1505
|
props: {
|
|
1506
1506
|
question: {}
|
|
1507
1507
|
},
|
|
1508
|
-
setup(
|
|
1509
|
-
let
|
|
1510
|
-
function
|
|
1508
|
+
setup(n) {
|
|
1509
|
+
let s = 0;
|
|
1510
|
+
function l(y) {
|
|
1511
1511
|
const k = {};
|
|
1512
|
-
for (let S =
|
|
1513
|
-
const
|
|
1514
|
-
for (let P = 0; P <
|
|
1515
|
-
const W =
|
|
1516
|
-
W.startsWith("--od-") && !(W in k) && (k[W] =
|
|
1512
|
+
for (let S = y; S; S = S.parentElement) {
|
|
1513
|
+
const A = S.style;
|
|
1514
|
+
for (let P = 0; P < A.length; P++) {
|
|
1515
|
+
const W = A[P];
|
|
1516
|
+
W.startsWith("--od-") && !(W in k) && (k[W] = A.getPropertyValue(W));
|
|
1517
1517
|
}
|
|
1518
1518
|
}
|
|
1519
1519
|
return k;
|
|
1520
1520
|
}
|
|
1521
|
-
const
|
|
1521
|
+
const o = n, u = x("dtc-onboarding"), r = x(
|
|
1522
1522
|
"opendoor-client",
|
|
1523
1523
|
void 0
|
|
1524
|
-
),
|
|
1525
|
-
() =>
|
|
1526
|
-
),
|
|
1527
|
-
() =>
|
|
1528
|
-
),
|
|
1524
|
+
), d = `sd-${++s}`, v = `${d}-${o.question.key}-listbox`, i = `${d}-${o.question.key}-combobox`, f = w(
|
|
1525
|
+
() => u.getAnswer(o.question.key)
|
|
1526
|
+
), h = w(
|
|
1527
|
+
() => u.validationErrors.value[o.question.key]
|
|
1528
|
+
), m = I(""), b = I(!1), L = I([]), M = I(!1), q = I(-1), O = I(null), T = I(null), R = I(null), Z = I(null), N = I({});
|
|
1529
1529
|
ee(
|
|
1530
|
-
[() =>
|
|
1531
|
-
(
|
|
1532
|
-
let
|
|
1530
|
+
[() => o.question.dataSource, () => o.question.options, () => r == null ? void 0 : r.value],
|
|
1531
|
+
(y, k, S) => {
|
|
1532
|
+
let A = !1;
|
|
1533
1533
|
S(() => {
|
|
1534
|
-
|
|
1535
|
-
}),
|
|
1536
|
-
|
|
1534
|
+
A = !0;
|
|
1535
|
+
}), o.question.dataSource === "homebuilders" && (r != null && r.value) ? (M.value = !0, r.value.getHomebuilders().then((P) => {
|
|
1536
|
+
A || (L.value = P.homebuilders.map((W) => ({
|
|
1537
1537
|
label: W.displayName,
|
|
1538
1538
|
value: W.identifier
|
|
1539
1539
|
})));
|
|
1540
1540
|
}).catch(() => {
|
|
1541
|
-
|
|
1541
|
+
A || (o.question.options ? L.value = o.question.options.map((P) => ({
|
|
1542
1542
|
label: P.label,
|
|
1543
1543
|
value: String(P.value)
|
|
1544
|
-
})) :
|
|
1544
|
+
})) : L.value = []);
|
|
1545
1545
|
}).finally(() => {
|
|
1546
|
-
|
|
1547
|
-
})) :
|
|
1546
|
+
A || (M.value = !1);
|
|
1547
|
+
})) : o.question.options ? L.value = o.question.options.map((P) => ({
|
|
1548
1548
|
label: P.label,
|
|
1549
1549
|
value: String(P.value)
|
|
1550
|
-
})) :
|
|
1550
|
+
})) : L.value = [];
|
|
1551
1551
|
},
|
|
1552
1552
|
{ immediate: !0 }
|
|
1553
1553
|
);
|
|
1554
1554
|
const D = w(
|
|
1555
|
-
() =>
|
|
1556
|
-
(
|
|
1557
|
-
) :
|
|
1558
|
-
),
|
|
1555
|
+
() => m.value ? L.value.filter(
|
|
1556
|
+
(y) => y.label.toLowerCase().includes(m.value.toLowerCase())
|
|
1557
|
+
) : L.value
|
|
1558
|
+
), U = w(
|
|
1559
1559
|
() => {
|
|
1560
|
-
var
|
|
1561
|
-
return (
|
|
1560
|
+
var y;
|
|
1561
|
+
return (y = L.value.find((k) => k.value === f.value)) == null ? void 0 : y.label;
|
|
1562
1562
|
}
|
|
1563
1563
|
);
|
|
1564
|
-
function Y(
|
|
1565
|
-
|
|
1564
|
+
function Y(y) {
|
|
1565
|
+
u.setAnswer(o.question.key, y), b.value = !1, m.value = "", q.value = -1;
|
|
1566
1566
|
}
|
|
1567
|
-
function re(
|
|
1568
|
-
|
|
1567
|
+
function re(y) {
|
|
1568
|
+
m.value = y.target.value, q.value = -1, b.value || (b.value = !0);
|
|
1569
1569
|
}
|
|
1570
|
-
function J(
|
|
1571
|
-
if (!
|
|
1572
|
-
(
|
|
1570
|
+
function J(y) {
|
|
1571
|
+
if (!b.value) {
|
|
1572
|
+
(y.key === "ArrowDown" || y.key === "Enter") && (y.preventDefault(), b.value = !0);
|
|
1573
1573
|
return;
|
|
1574
1574
|
}
|
|
1575
|
-
switch (
|
|
1575
|
+
switch (y.key) {
|
|
1576
1576
|
case "ArrowDown":
|
|
1577
|
-
|
|
1577
|
+
y.preventDefault(), D.value.length > 0 && (q.value = q.value < D.value.length - 1 ? q.value + 1 : 0);
|
|
1578
1578
|
break;
|
|
1579
1579
|
case "ArrowUp":
|
|
1580
|
-
|
|
1580
|
+
y.preventDefault(), D.value.length > 0 && (q.value = q.value > 0 ? q.value - 1 : D.value.length - 1);
|
|
1581
1581
|
break;
|
|
1582
1582
|
case "Enter":
|
|
1583
|
-
|
|
1583
|
+
y.preventDefault(), q.value >= 0 && q.value < D.value.length && Y(D.value[q.value].value);
|
|
1584
1584
|
break;
|
|
1585
1585
|
case "Escape":
|
|
1586
|
-
|
|
1586
|
+
y.preventDefault(), b.value = !1, q.value = -1;
|
|
1587
1587
|
break;
|
|
1588
1588
|
}
|
|
1589
1589
|
}
|
|
1590
1590
|
function z() {
|
|
1591
|
-
const
|
|
1592
|
-
if (!
|
|
1593
|
-
const k =
|
|
1591
|
+
const y = T.value;
|
|
1592
|
+
if (!y) return;
|
|
1593
|
+
const k = y.getBoundingClientRect(), S = window.visualViewport, A = (S == null ? void 0 : S.height) ?? window.innerHeight, P = (S == null ? void 0 : S.width) ?? window.innerWidth, W = (S == null ? void 0 : S.offsetTop) ?? 0, fe = (S == null ? void 0 : S.offsetLeft) ?? 0, pe = W + A - k.bottom - Te - ge, Ce = Math.max(
|
|
1594
1594
|
Ta,
|
|
1595
1595
|
Math.min(Aa, pe)
|
|
1596
|
-
),
|
|
1597
|
-
|
|
1596
|
+
), he = Math.min(k.width, P - ge * 2), ke = fe + ge, _e = fe + P - he - ge, we = Math.max(ke, Math.min(k.left, _e));
|
|
1597
|
+
Z.value = {
|
|
1598
1598
|
top: k.bottom + window.scrollY + Te,
|
|
1599
1599
|
left: we + window.scrollX,
|
|
1600
|
-
width:
|
|
1600
|
+
width: he,
|
|
1601
1601
|
maxHeight: Ce
|
|
1602
1602
|
};
|
|
1603
1603
|
}
|
|
1604
1604
|
const ae = w(() => {
|
|
1605
|
-
const
|
|
1606
|
-
return
|
|
1605
|
+
const y = Z.value;
|
|
1606
|
+
return y ? {
|
|
1607
1607
|
position: "absolute",
|
|
1608
|
-
top: `${
|
|
1609
|
-
left: `${
|
|
1608
|
+
top: `${y.top}px`,
|
|
1609
|
+
left: `${y.left}px`,
|
|
1610
1610
|
right: "auto",
|
|
1611
|
-
width: `${
|
|
1612
|
-
maxHeight: `${
|
|
1611
|
+
width: `${y.width}px`,
|
|
1612
|
+
maxHeight: `${y.maxHeight}px`,
|
|
1613
1613
|
...N.value
|
|
1614
1614
|
} : { display: "none" };
|
|
1615
1615
|
});
|
|
1616
1616
|
let te = null;
|
|
1617
1617
|
function ie() {
|
|
1618
|
-
const
|
|
1619
|
-
window.addEventListener("scroll", z, !0), window.addEventListener("resize", z),
|
|
1618
|
+
const y = window.visualViewport;
|
|
1619
|
+
window.addEventListener("scroll", z, !0), window.addEventListener("resize", z), y == null || y.addEventListener("resize", z), y == null || y.addEventListener("scroll", z);
|
|
1620
1620
|
}
|
|
1621
|
-
function
|
|
1622
|
-
const
|
|
1623
|
-
window.removeEventListener("scroll", z, !0), window.removeEventListener("resize", z),
|
|
1621
|
+
function ne() {
|
|
1622
|
+
const y = window.visualViewport;
|
|
1623
|
+
window.removeEventListener("scroll", z, !0), window.removeEventListener("resize", z), y == null || y.removeEventListener("resize", z), y == null || y.removeEventListener("scroll", z), te !== null && (window.clearTimeout(te), te = null);
|
|
1624
1624
|
}
|
|
1625
|
-
ee(
|
|
1626
|
-
|
|
1625
|
+
ee(b, (y) => {
|
|
1626
|
+
y ? (T.value && (N.value = l(T.value)), z(), ie(), te = window.setTimeout(z, 300)) : (Z.value = null, ne());
|
|
1627
1627
|
});
|
|
1628
|
-
function
|
|
1629
|
-
var S,
|
|
1630
|
-
const k =
|
|
1631
|
-
(S = O.value) != null && S.contains(k) || (
|
|
1628
|
+
function $(y) {
|
|
1629
|
+
var S, A;
|
|
1630
|
+
const k = y.target;
|
|
1631
|
+
(S = O.value) != null && S.contains(k) || (A = R.value) != null && A.contains(k) || (b.value = !1);
|
|
1632
1632
|
}
|
|
1633
|
-
return
|
|
1634
|
-
document.addEventListener("mousedown",
|
|
1635
|
-
}),
|
|
1636
|
-
document.removeEventListener("mousedown",
|
|
1637
|
-
}), (
|
|
1633
|
+
return ve(() => {
|
|
1634
|
+
document.addEventListener("mousedown", $);
|
|
1635
|
+
}), le(() => {
|
|
1636
|
+
document.removeEventListener("mousedown", $), ne();
|
|
1637
|
+
}), (y, k) => (c(), p("div", {
|
|
1638
1638
|
ref_key: "containerRef",
|
|
1639
1639
|
ref: O,
|
|
1640
|
-
class: e(
|
|
1640
|
+
class: e(y.$style.fieldGroup)
|
|
1641
1641
|
}, [
|
|
1642
1642
|
t("div", {
|
|
1643
1643
|
ref_key: "anchorRef",
|
|
1644
|
-
ref:
|
|
1645
|
-
class: e(
|
|
1644
|
+
ref: T,
|
|
1645
|
+
class: e(y.$style.searchableDropdown)
|
|
1646
1646
|
}, [
|
|
1647
1647
|
t("input", {
|
|
1648
|
-
id:
|
|
1648
|
+
id: i,
|
|
1649
1649
|
type: "text",
|
|
1650
|
-
class: e(
|
|
1651
|
-
value:
|
|
1652
|
-
placeholder:
|
|
1653
|
-
"aria-label":
|
|
1654
|
-
"aria-expanded":
|
|
1655
|
-
"aria-invalid":
|
|
1656
|
-
"aria-describedby":
|
|
1650
|
+
class: e(y.$style.fieldInput),
|
|
1651
|
+
value: b.value ? m.value : U.value ?? "",
|
|
1652
|
+
placeholder: n.question.placeholder || "Select or search...",
|
|
1653
|
+
"aria-label": n.question.label,
|
|
1654
|
+
"aria-expanded": b.value,
|
|
1655
|
+
"aria-invalid": h.value ? "true" : void 0,
|
|
1656
|
+
"aria-describedby": h.value ? `${d}-${n.question.key}-error` : void 0,
|
|
1657
1657
|
role: "combobox",
|
|
1658
1658
|
"aria-haspopup": "listbox",
|
|
1659
|
-
"aria-controls":
|
|
1660
|
-
"aria-activedescendant":
|
|
1659
|
+
"aria-controls": b.value ? v : void 0,
|
|
1660
|
+
"aria-activedescendant": b.value && q.value >= 0 ? `${v}-option-${q.value}` : void 0,
|
|
1661
1661
|
onInput: re,
|
|
1662
|
-
onFocus: k[0] || (k[0] = (S) =>
|
|
1662
|
+
onFocus: k[0] || (k[0] = (S) => b.value = !0),
|
|
1663
1663
|
onKeydown: J
|
|
1664
1664
|
}, null, 42, Ea),
|
|
1665
1665
|
t("button", {
|
|
1666
1666
|
type: "button",
|
|
1667
|
-
class: e(
|
|
1667
|
+
class: e(y.$style.searchableDropdownToggle),
|
|
1668
1668
|
"aria-label": "Toggle dropdown",
|
|
1669
1669
|
tabindex: "-1",
|
|
1670
|
-
onClick: k[1] || (k[1] = (S) =>
|
|
1670
|
+
onClick: k[1] || (k[1] = (S) => b.value = !b.value)
|
|
1671
1671
|
}, [...k[3] || (k[3] = [
|
|
1672
1672
|
t("svg", {
|
|
1673
1673
|
width: "12",
|
|
@@ -1685,34 +1685,34 @@ const Os = {
|
|
|
1685
1685
|
], -1)
|
|
1686
1686
|
])], 2)
|
|
1687
1687
|
], 2),
|
|
1688
|
-
|
|
1688
|
+
b.value ? (c(), K(Ge, {
|
|
1689
1689
|
key: 0,
|
|
1690
1690
|
to: "body"
|
|
1691
1691
|
}, [
|
|
1692
1692
|
t("div", {
|
|
1693
1693
|
ref_key: "portalRef",
|
|
1694
1694
|
ref: R,
|
|
1695
|
-
class: e(
|
|
1695
|
+
class: e(y.$style.searchableDropdownList),
|
|
1696
1696
|
role: "listbox",
|
|
1697
|
-
id:
|
|
1697
|
+
id: v,
|
|
1698
1698
|
style: X(ae.value)
|
|
1699
1699
|
}, [
|
|
1700
|
-
|
|
1700
|
+
M.value ? (c(), p("div", {
|
|
1701
1701
|
key: 0,
|
|
1702
|
-
class: e(
|
|
1703
|
-
}, " Loading... ", 2)) : D.value.length === 0 ? (
|
|
1702
|
+
class: e(y.$style.searchableDropdownEmpty)
|
|
1703
|
+
}, " Loading... ", 2)) : D.value.length === 0 ? (c(), p("div", {
|
|
1704
1704
|
key: 1,
|
|
1705
|
-
class: e(
|
|
1706
|
-
}, " No results found ", 2)) : (
|
|
1705
|
+
class: e(y.$style.searchableDropdownEmpty)
|
|
1706
|
+
}, " No results found ", 2)) : (c(!0), p(j, { key: 2 }, Q(D.value, (S, A) => (c(), p("button", {
|
|
1707
1707
|
key: S.value,
|
|
1708
|
-
id: `${
|
|
1708
|
+
id: `${v}-option-${A}`,
|
|
1709
1709
|
type: "button",
|
|
1710
1710
|
role: "option",
|
|
1711
1711
|
"aria-selected": S.value === f.value,
|
|
1712
1712
|
class: e([
|
|
1713
|
-
|
|
1714
|
-
S.value === f.value ?
|
|
1715
|
-
|
|
1713
|
+
y.$style.searchableDropdownOption,
|
|
1714
|
+
S.value === f.value ? y.$style.searchableDropdownOptionSelected : "",
|
|
1715
|
+
A === q.value ? y.$style.searchableDropdownOptionHighlighted : ""
|
|
1716
1716
|
]),
|
|
1717
1717
|
onMousedown: k[2] || (k[2] = De(() => {
|
|
1718
1718
|
}, ["prevent"])),
|
|
@@ -1720,16 +1720,16 @@ const Os = {
|
|
|
1720
1720
|
}, _(S.label), 43, qa))), 128))
|
|
1721
1721
|
], 6)
|
|
1722
1722
|
])) : E("", !0),
|
|
1723
|
-
|
|
1723
|
+
h.value ? (c(), p("p", {
|
|
1724
1724
|
key: 1,
|
|
1725
|
-
id: `${
|
|
1726
|
-
class: e(
|
|
1725
|
+
id: `${d}-${n.question.key}-error`,
|
|
1726
|
+
class: e(y.$style.fieldError),
|
|
1727
1727
|
role: "alert"
|
|
1728
|
-
}, _(
|
|
1728
|
+
}, _(h.value), 11, Ma)) : E("", !0)
|
|
1729
1729
|
], 2));
|
|
1730
1730
|
}
|
|
1731
|
-
}),
|
|
1732
|
-
fieldGroup:
|
|
1731
|
+
}), Ba = "_fieldGroup_1adip_2", Fa = "_searchableDropdown_1adip_8", Ra = "_fieldInput_1adip_14", Na = "_searchableDropdownToggle_1adip_40", Ga = "_searchableDropdownList_1adip_53", Oa = "_searchableDropdownOption_1adip_62", Ha = "_searchableDropdownOptionSelected_1adip_80", ja = "_searchableDropdownOptionHighlighted_1adip_85", Va = "_searchableDropdownEmpty_1adip_89", xa = "_fieldError_1adip_95", Ua = {
|
|
1732
|
+
fieldGroup: Ba,
|
|
1733
1733
|
searchableDropdown: Fa,
|
|
1734
1734
|
fieldInput: Ra,
|
|
1735
1735
|
searchableDropdownToggle: Na,
|
|
@@ -1741,161 +1741,167 @@ const Os = {
|
|
|
1741
1741
|
fieldError: xa
|
|
1742
1742
|
}, Za = {
|
|
1743
1743
|
$style: Ua
|
|
1744
|
-
}, za = /* @__PURE__ */ V(
|
|
1744
|
+
}, za = /* @__PURE__ */ V(Pa, [["__cssModules", Za]]), Wa = ["aria-label"], Ka = /* @__PURE__ */ F({
|
|
1745
1745
|
__name: "DtcPage",
|
|
1746
|
-
setup(
|
|
1747
|
-
const
|
|
1746
|
+
setup(n) {
|
|
1747
|
+
const s = x("dtc-onboarding"), l = x("dtc-consent-slots", {}), o = x("dtc-overrides"), u = w(() => {
|
|
1748
|
+
var f, h;
|
|
1749
|
+
return (((f = s.currentPage.value) == null ? void 0 : f.id) === "contact-info" ? o == null ? void 0 : o.value.submitLabel : void 0) ?? ((h = s.currentPage.value) == null ? void 0 : h.submitLabel) ?? "Next";
|
|
1750
|
+
}), r = w(() => {
|
|
1751
|
+
var i, f;
|
|
1752
|
+
return ((i = s.currentPage.value) == null ? void 0 : i.id) === "contact-info" && (o == null ? void 0 : o.value.contactPageTitle) !== void 0 ? o.value.contactPageTitle : (f = s.currentPage.value) == null ? void 0 : f.title;
|
|
1753
|
+
}), d = I(null);
|
|
1748
1754
|
return ee(
|
|
1749
1755
|
() => {
|
|
1750
|
-
var
|
|
1751
|
-
return (
|
|
1756
|
+
var v;
|
|
1757
|
+
return (v = s.currentPage.value) == null ? void 0 : v.id;
|
|
1752
1758
|
},
|
|
1753
1759
|
() => {
|
|
1754
|
-
var
|
|
1755
|
-
(
|
|
1760
|
+
var v, i, f;
|
|
1761
|
+
(i = (v = d.value) == null ? void 0 : v.scrollTo) == null || i.call(v, { top: 0, behavior: "smooth" }), (f = d.value) == null || f.focus();
|
|
1756
1762
|
}
|
|
1757
|
-
), (
|
|
1758
|
-
var
|
|
1759
|
-
return
|
|
1763
|
+
), (v, i) => {
|
|
1764
|
+
var f;
|
|
1765
|
+
return B(s).currentPage.value ? (c(), p("div", {
|
|
1760
1766
|
key: 0,
|
|
1761
1767
|
ref_key: "containerRef",
|
|
1762
|
-
ref:
|
|
1763
|
-
class: e(
|
|
1768
|
+
ref: d,
|
|
1769
|
+
class: e(v.$style.pageContent),
|
|
1764
1770
|
tabindex: "-1",
|
|
1765
1771
|
role: "region",
|
|
1766
|
-
"aria-label":
|
|
1772
|
+
"aria-label": r.value
|
|
1767
1773
|
}, [
|
|
1768
|
-
(
|
|
1769
|
-
key:
|
|
1774
|
+
(c(!0), p(j, null, Q(B(s).visibleQuestions.value, (h) => (c(), p(j, {
|
|
1775
|
+
key: h.key
|
|
1770
1776
|
}, [
|
|
1771
|
-
|
|
1777
|
+
h.style === "radio-card" ? (c(), K(Nn, {
|
|
1772
1778
|
key: 0,
|
|
1773
|
-
question:
|
|
1774
|
-
}, null, 8, ["question"])) :
|
|
1779
|
+
question: h
|
|
1780
|
+
}, null, 8, ["question"])) : h.style === "image-card" ? (c(), K(ts, {
|
|
1775
1781
|
key: 1,
|
|
1776
|
-
question:
|
|
1777
|
-
}, null, 8, ["question"])) :
|
|
1782
|
+
question: h
|
|
1783
|
+
}, null, 8, ["question"])) : h.style === "checkbox-card" ? (c(), K(ms, {
|
|
1778
1784
|
key: 2,
|
|
1779
|
-
question:
|
|
1780
|
-
}, null, 8, ["question"])) :
|
|
1785
|
+
question: h
|
|
1786
|
+
}, null, 8, ["question"])) : h.style === "dropdown" ? (c(), K(As, {
|
|
1781
1787
|
key: 3,
|
|
1782
|
-
question:
|
|
1783
|
-
}, null, 8, ["question"])) :
|
|
1788
|
+
question: h
|
|
1789
|
+
}, null, 8, ["question"])) : h.style === "input" || h.style === "email" ? (c(), K(zs, {
|
|
1784
1790
|
key: 4,
|
|
1785
|
-
question:
|
|
1786
|
-
}, null, 8, ["question"])) :
|
|
1791
|
+
question: h
|
|
1792
|
+
}, null, 8, ["question"])) : h.style === "currency" ? (c(), K(ra, {
|
|
1787
1793
|
key: 5,
|
|
1788
|
-
question:
|
|
1789
|
-
}, null, 8, ["question"])) :
|
|
1794
|
+
question: h
|
|
1795
|
+
}, null, 8, ["question"])) : h.style === "phone" ? (c(), K(ba, {
|
|
1790
1796
|
key: 6,
|
|
1791
|
-
question:
|
|
1792
|
-
}, null, 8, ["question"])) :
|
|
1797
|
+
question: h
|
|
1798
|
+
}, null, 8, ["question"])) : h.style === "toggle" ? (c(), K(Da, {
|
|
1793
1799
|
key: 7,
|
|
1794
|
-
question:
|
|
1795
|
-
}, null, 8, ["question"])) :
|
|
1800
|
+
question: h
|
|
1801
|
+
}, null, 8, ["question"])) : h.style === "searchable-dropdown" ? (c(), K(za, {
|
|
1796
1802
|
key: 8,
|
|
1797
|
-
question:
|
|
1803
|
+
question: h
|
|
1798
1804
|
}, null, 8, ["question"])) : E("", !0)
|
|
1799
1805
|
], 64))), 128)),
|
|
1800
|
-
((
|
|
1806
|
+
((f = B(s).currentPage.value) == null ? void 0 : f.id) === "contact-info" ? (c(), p(j, { key: 0 }, [
|
|
1801
1807
|
t("button", {
|
|
1802
1808
|
type: "button",
|
|
1803
|
-
class: e(
|
|
1804
|
-
onClick:
|
|
1805
|
-
}, _(
|
|
1806
|
-
|
|
1807
|
-
var
|
|
1808
|
-
return (
|
|
1809
|
-
}), { key: 0 })) : (
|
|
1809
|
+
class: e(v.$style.ctaButton),
|
|
1810
|
+
onClick: i[0] || (i[0] = (h) => B(s).goToNext())
|
|
1811
|
+
}, _(u.value), 3),
|
|
1812
|
+
B(l)["contact-consent-text"] ? (c(), K(Pe(() => {
|
|
1813
|
+
var h, m;
|
|
1814
|
+
return (m = (h = B(l))["contact-consent-text"]) == null ? void 0 : m.call(h);
|
|
1815
|
+
}), { key: 0 })) : (c(), p("p", {
|
|
1810
1816
|
key: 1,
|
|
1811
|
-
class: e(
|
|
1817
|
+
class: e(v.$style.consentText)
|
|
1812
1818
|
}, [
|
|
1813
|
-
|
|
1819
|
+
be(" By pressing “" + _(u.value) + ",” I agree to Opendoor’s ", 1),
|
|
1814
1820
|
t("a", {
|
|
1815
1821
|
href: "https://www.opendoor.com/terms",
|
|
1816
1822
|
target: "_blank",
|
|
1817
1823
|
rel: "noopener noreferrer",
|
|
1818
|
-
class: e(
|
|
1824
|
+
class: e(v.$style.consentLink)
|
|
1819
1825
|
}, "Terms of Service", 2),
|
|
1820
|
-
|
|
1826
|
+
i[1] || (i[1] = be(" and ", -1)),
|
|
1821
1827
|
t("a", {
|
|
1822
1828
|
href: "https://www.opendoor.com/privacy",
|
|
1823
1829
|
target: "_blank",
|
|
1824
1830
|
rel: "noopener noreferrer",
|
|
1825
|
-
class: e(
|
|
1831
|
+
class: e(v.$style.consentLink)
|
|
1826
1832
|
}, "Privacy Policy", 2),
|
|
1827
|
-
|
|
1833
|
+
i[2] || (i[2] = be(". ", -1))
|
|
1828
1834
|
], 2))
|
|
1829
1835
|
], 64)) : E("", !0)
|
|
1830
1836
|
], 10, Wa)) : E("", !0);
|
|
1831
1837
|
};
|
|
1832
1838
|
}
|
|
1833
|
-
}), Qa = "_pageContent_1jpin_2", Ya = "_consentText_1jpin_13", Xa = "_consentLink_1jpin_21", Ja = "_ctaButton_1jpin_26",
|
|
1839
|
+
}), Qa = "_pageContent_1jpin_2", Ya = "_consentText_1jpin_13", Xa = "_consentLink_1jpin_21", Ja = "_ctaButton_1jpin_26", eo = {
|
|
1834
1840
|
pageContent: Qa,
|
|
1835
1841
|
consentText: Ya,
|
|
1836
1842
|
consentLink: Xa,
|
|
1837
1843
|
ctaButton: Ja
|
|
1838
|
-
},
|
|
1839
|
-
$style:
|
|
1840
|
-
},
|
|
1844
|
+
}, to = {
|
|
1845
|
+
$style: eo
|
|
1846
|
+
}, no = /* @__PURE__ */ V(Ka, [["__cssModules", to]]), so = ["aria-valuenow"], ao = /* @__PURE__ */ F({
|
|
1841
1847
|
__name: "DtcProgressBar",
|
|
1842
1848
|
props: {
|
|
1843
1849
|
progress: {}
|
|
1844
1850
|
},
|
|
1845
|
-
setup(
|
|
1846
|
-
const
|
|
1847
|
-
() => Math.min(100, Math.max(0,
|
|
1851
|
+
setup(n) {
|
|
1852
|
+
const s = n, l = w(
|
|
1853
|
+
() => Math.min(100, Math.max(0, s.progress * 100))
|
|
1848
1854
|
);
|
|
1849
|
-
return (
|
|
1850
|
-
class: e(
|
|
1855
|
+
return (o, u) => (c(), p("div", {
|
|
1856
|
+
class: e(o.$style.progressBar),
|
|
1851
1857
|
role: "progressbar",
|
|
1852
|
-
"aria-valuenow":
|
|
1858
|
+
"aria-valuenow": l.value,
|
|
1853
1859
|
"aria-valuemin": 0,
|
|
1854
1860
|
"aria-valuemax": 100
|
|
1855
1861
|
}, [
|
|
1856
1862
|
t("div", {
|
|
1857
|
-
class: e(
|
|
1858
|
-
style: X({ width: `${
|
|
1863
|
+
class: e(o.$style.progressBarFill),
|
|
1864
|
+
style: X({ width: `${l.value}%` })
|
|
1859
1865
|
}, null, 6)
|
|
1860
|
-
], 10,
|
|
1866
|
+
], 10, so));
|
|
1861
1867
|
}
|
|
1862
|
-
}),
|
|
1863
|
-
progressBar:
|
|
1864
|
-
progressBarFill:
|
|
1865
|
-
},
|
|
1866
|
-
$style:
|
|
1867
|
-
},
|
|
1868
|
+
}), oo = "_progressBar_y1k9k_2", lo = "_progressBarFill_y1k9k_9", ro = {
|
|
1869
|
+
progressBar: oo,
|
|
1870
|
+
progressBarFill: lo
|
|
1871
|
+
}, io = {
|
|
1872
|
+
$style: ro
|
|
1873
|
+
}, uo = /* @__PURE__ */ V(ao, [["__cssModules", io]]), co = { key: 1 }, vo = /* @__PURE__ */ F({
|
|
1868
1874
|
__name: "DtcNavigation",
|
|
1869
|
-
setup(
|
|
1870
|
-
const
|
|
1875
|
+
setup(n) {
|
|
1876
|
+
const s = x("dtc-onboarding"), l = w(
|
|
1871
1877
|
() => {
|
|
1872
|
-
var
|
|
1873
|
-
return ((
|
|
1878
|
+
var u;
|
|
1879
|
+
return ((u = s.currentPage.value) == null ? void 0 : u.submitLabel) ?? "Next";
|
|
1874
1880
|
}
|
|
1875
|
-
),
|
|
1881
|
+
), o = w(
|
|
1876
1882
|
() => {
|
|
1877
|
-
var
|
|
1878
|
-
return ((
|
|
1883
|
+
var u;
|
|
1884
|
+
return ((u = s.currentPage.value) == null ? void 0 : u.id) === "contact-info";
|
|
1879
1885
|
}
|
|
1880
1886
|
);
|
|
1881
|
-
return (
|
|
1887
|
+
return (u, r) => o.value ? E("", !0) : (c(), p("nav", {
|
|
1882
1888
|
key: 0,
|
|
1883
|
-
class: e(
|
|
1889
|
+
class: e(u.$style.navigation),
|
|
1884
1890
|
"aria-label": "Page navigation"
|
|
1885
1891
|
}, [
|
|
1886
|
-
ue(
|
|
1887
|
-
progress:
|
|
1892
|
+
ue(uo, {
|
|
1893
|
+
progress: B(s).progress.value
|
|
1888
1894
|
}, null, 8, ["progress"]),
|
|
1889
1895
|
t("div", {
|
|
1890
|
-
class: e(
|
|
1896
|
+
class: e(u.$style.navigationButtons)
|
|
1891
1897
|
}, [
|
|
1892
|
-
|
|
1898
|
+
B(s).isFirstPage.value ? (c(), p("div", co)) : (c(), p("button", {
|
|
1893
1899
|
key: 0,
|
|
1894
1900
|
type: "button",
|
|
1895
|
-
class: e(
|
|
1901
|
+
class: e(u.$style.backButton),
|
|
1896
1902
|
"aria-label": "Go back",
|
|
1897
|
-
onClick:
|
|
1898
|
-
}, [...
|
|
1903
|
+
onClick: r[0] || (r[0] = (d) => B(s).goToPrev())
|
|
1904
|
+
}, [...r[2] || (r[2] = [
|
|
1899
1905
|
t("svg", {
|
|
1900
1906
|
width: "24",
|
|
1901
1907
|
height: "24",
|
|
@@ -1911,53 +1917,64 @@ const Os = {
|
|
|
1911
1917
|
])], 2)),
|
|
1912
1918
|
t("button", {
|
|
1913
1919
|
type: "button",
|
|
1914
|
-
class: e(
|
|
1915
|
-
onClick:
|
|
1916
|
-
}, _(
|
|
1920
|
+
class: e(u.$style.nextButton),
|
|
1921
|
+
onClick: r[1] || (r[1] = (d) => B(s).goToNext())
|
|
1922
|
+
}, _(l.value), 3)
|
|
1917
1923
|
], 2)
|
|
1918
1924
|
], 2));
|
|
1919
1925
|
}
|
|
1920
|
-
}),
|
|
1921
|
-
navigation:
|
|
1922
|
-
navigationButtons:
|
|
1923
|
-
backButton:
|
|
1924
|
-
nextButton:
|
|
1925
|
-
},
|
|
1926
|
-
$style:
|
|
1927
|
-
},
|
|
1926
|
+
}), yo = "_navigation_14jpi_2", fo = "_navigationButtons_14jpi_16", po = "_backButton_14jpi_22", ho = "_nextButton_14jpi_45", mo = {
|
|
1927
|
+
navigation: yo,
|
|
1928
|
+
navigationButtons: fo,
|
|
1929
|
+
backButton: po,
|
|
1930
|
+
nextButton: ho
|
|
1931
|
+
}, go = {
|
|
1932
|
+
$style: mo
|
|
1933
|
+
}, bo = /* @__PURE__ */ V(vo, [["__cssModules", go]]), $o = /* @__PURE__ */ F({
|
|
1928
1934
|
__name: "DtcLayout",
|
|
1929
1935
|
props: {
|
|
1930
1936
|
address: {}
|
|
1931
1937
|
},
|
|
1932
|
-
setup(
|
|
1933
|
-
const
|
|
1938
|
+
setup(n) {
|
|
1939
|
+
const s = n, l = x("dtc-onboarding"), o = x("dtc-overrides"), u = w(
|
|
1940
|
+
() => {
|
|
1941
|
+
var i;
|
|
1942
|
+
return ((i = l.currentPage.value) == null ? void 0 : i.id) === "contact-info";
|
|
1943
|
+
}
|
|
1944
|
+
), r = w(() => {
|
|
1945
|
+
var i;
|
|
1946
|
+
return u.value && (o == null ? void 0 : o.value.contactPageTitle) !== void 0 ? o.value.contactPageTitle : (i = l.currentPage.value) == null ? void 0 : i.title;
|
|
1947
|
+
}), d = w(() => {
|
|
1948
|
+
var i;
|
|
1949
|
+
return u.value && (o == null ? void 0 : o.value.contactPageSubtitle) !== void 0 ? o.value.contactPageSubtitle : (i = l.currentPage.value) == null ? void 0 : i.subtitle;
|
|
1950
|
+
}), v = w(
|
|
1934
1951
|
() => [
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1952
|
+
s.address.street1,
|
|
1953
|
+
s.address.street2,
|
|
1954
|
+
s.address.city,
|
|
1955
|
+
s.address.state,
|
|
1956
|
+
s.address.postalCode
|
|
1940
1957
|
].filter(Boolean).join(", ")
|
|
1941
1958
|
);
|
|
1942
|
-
return (
|
|
1959
|
+
return (i, f) => B(l).currentPage.value ? (c(), p("div", {
|
|
1943
1960
|
key: 0,
|
|
1944
|
-
class: e(
|
|
1961
|
+
class: e(i.$style.layout)
|
|
1945
1962
|
}, [
|
|
1946
1963
|
t("div", {
|
|
1947
|
-
class: e(
|
|
1964
|
+
class: e(i.$style.layoutScrollable)
|
|
1948
1965
|
}, [
|
|
1949
1966
|
t("div", {
|
|
1950
|
-
class: e(
|
|
1967
|
+
class: e(i.$style.addressBar)
|
|
1951
1968
|
}, [
|
|
1952
|
-
(
|
|
1969
|
+
(c(), p("svg", {
|
|
1953
1970
|
width: "16",
|
|
1954
1971
|
height: "16",
|
|
1955
1972
|
viewBox: "0 0 24 24",
|
|
1956
1973
|
fill: "none",
|
|
1957
1974
|
stroke: "currentColor",
|
|
1958
1975
|
"stroke-width": "2",
|
|
1959
|
-
class: e(
|
|
1960
|
-
}, [...
|
|
1976
|
+
class: e(i.$style.addressIcon)
|
|
1977
|
+
}, [...f[0] || (f[0] = [
|
|
1961
1978
|
t("circle", {
|
|
1962
1979
|
cx: "12",
|
|
1963
1980
|
cy: "10",
|
|
@@ -1966,47 +1983,47 @@ const Os = {
|
|
|
1966
1983
|
t("path", { d: "M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7z" }, null, -1)
|
|
1967
1984
|
])], 2)),
|
|
1968
1985
|
t("span", {
|
|
1969
|
-
class: e(
|
|
1970
|
-
}, _(
|
|
1986
|
+
class: e(i.$style.addressText)
|
|
1987
|
+
}, _(v.value), 3)
|
|
1971
1988
|
], 2),
|
|
1972
1989
|
t("div", {
|
|
1973
|
-
class: e(
|
|
1990
|
+
class: e(i.$style.contentSplit)
|
|
1974
1991
|
}, [
|
|
1975
1992
|
t("div", {
|
|
1976
|
-
class: e(
|
|
1993
|
+
class: e(i.$style.contentLeft)
|
|
1977
1994
|
}, [
|
|
1978
1995
|
t("h1", {
|
|
1979
|
-
class: e(
|
|
1980
|
-
}, _(
|
|
1981
|
-
|
|
1996
|
+
class: e(i.$style.pageTitle)
|
|
1997
|
+
}, _(r.value), 3),
|
|
1998
|
+
d.value ? (c(), p("p", {
|
|
1982
1999
|
key: 0,
|
|
1983
|
-
class: e(
|
|
1984
|
-
}, _(
|
|
2000
|
+
class: e(i.$style.pageSubtitle)
|
|
2001
|
+
}, _(d.value), 3)) : E("", !0)
|
|
1985
2002
|
], 2),
|
|
1986
2003
|
t("div", {
|
|
1987
|
-
class: e(
|
|
2004
|
+
class: e(i.$style.contentRight)
|
|
1988
2005
|
}, [
|
|
1989
|
-
ue(
|
|
2006
|
+
ue(no)
|
|
1990
2007
|
], 2)
|
|
1991
2008
|
], 2)
|
|
1992
2009
|
], 2),
|
|
1993
|
-
ue(
|
|
2010
|
+
ue(bo)
|
|
1994
2011
|
], 2)) : E("", !0);
|
|
1995
2012
|
}
|
|
1996
|
-
}),
|
|
1997
|
-
layout:
|
|
1998
|
-
layoutScrollable:
|
|
1999
|
-
addressBar:
|
|
2000
|
-
addressIcon:
|
|
2001
|
-
addressText:
|
|
2002
|
-
contentSplit:
|
|
2003
|
-
contentLeft:
|
|
2004
|
-
contentRight:
|
|
2005
|
-
pageTitle:
|
|
2006
|
-
pageSubtitle:
|
|
2007
|
-
},
|
|
2008
|
-
$style:
|
|
2009
|
-
},
|
|
2013
|
+
}), Co = "_layout_1as8w_2", ko = "_layoutScrollable_1as8w_9", _o = "_addressBar_1as8w_25", wo = "_addressIcon_1as8w_33", Lo = "_addressText_1as8w_37", Io = "_contentSplit_1as8w_43", So = "_contentLeft_1as8w_57", Do = "_contentRight_1as8w_63", Eo = "_pageTitle_1as8w_79", qo = "_pageSubtitle_1as8w_87", Mo = {
|
|
2014
|
+
layout: Co,
|
|
2015
|
+
layoutScrollable: ko,
|
|
2016
|
+
addressBar: _o,
|
|
2017
|
+
addressIcon: wo,
|
|
2018
|
+
addressText: Lo,
|
|
2019
|
+
contentSplit: Io,
|
|
2020
|
+
contentLeft: So,
|
|
2021
|
+
contentRight: Do,
|
|
2022
|
+
pageTitle: Eo,
|
|
2023
|
+
pageSubtitle: qo
|
|
2024
|
+
}, Ao = {
|
|
2025
|
+
$style: Mo
|
|
2026
|
+
}, To = /* @__PURE__ */ V($o, [["__cssModules", Ao]]), Po = /* @__PURE__ */ F({
|
|
2010
2027
|
__name: "DtcOnboardingFlow",
|
|
2011
2028
|
props: {
|
|
2012
2029
|
address: {},
|
|
@@ -2014,62 +2031,71 @@ const Os = {
|
|
|
2014
2031
|
appearance: { default: () => ({ theme: "minimal" }) },
|
|
2015
2032
|
initialAnswers: {},
|
|
2016
2033
|
skipPages: {},
|
|
2034
|
+
submitLabel: {},
|
|
2035
|
+
contactPageTitle: {},
|
|
2036
|
+
contactPageSubtitle: {},
|
|
2017
2037
|
onClose: {}
|
|
2018
2038
|
},
|
|
2019
2039
|
emits: ["submit", "page-change", "answer-change", "ready", "error"],
|
|
2020
|
-
setup(
|
|
2021
|
-
const
|
|
2022
|
-
|
|
2023
|
-
const
|
|
2024
|
-
|
|
2025
|
-
l
|
|
2040
|
+
setup(n, { emit: s }) {
|
|
2041
|
+
const l = n, o = Oe();
|
|
2042
|
+
de("dtc-consent-slots", o);
|
|
2043
|
+
const u = w(() => ({
|
|
2044
|
+
submitLabel: l.submitLabel,
|
|
2045
|
+
contactPageTitle: l.contactPageTitle,
|
|
2046
|
+
contactPageSubtitle: l.contactPageSubtitle
|
|
2047
|
+
}));
|
|
2048
|
+
de("dtc-overrides", u);
|
|
2049
|
+
const r = s, d = w(() => ye(l.appearance));
|
|
2050
|
+
function v(L) {
|
|
2051
|
+
r("submit", L);
|
|
2026
2052
|
}
|
|
2027
|
-
function
|
|
2028
|
-
|
|
2053
|
+
function i(L, M) {
|
|
2054
|
+
r("page-change", L, M);
|
|
2029
2055
|
}
|
|
2030
|
-
function
|
|
2031
|
-
|
|
2056
|
+
function f(L, M) {
|
|
2057
|
+
r("answer-change", L, M);
|
|
2032
2058
|
}
|
|
2033
|
-
function
|
|
2034
|
-
|
|
2059
|
+
function h() {
|
|
2060
|
+
r("ready");
|
|
2035
2061
|
}
|
|
2036
|
-
function
|
|
2037
|
-
|
|
2062
|
+
function m(L) {
|
|
2063
|
+
r("error", L);
|
|
2038
2064
|
}
|
|
2039
|
-
function
|
|
2040
|
-
var
|
|
2041
|
-
(
|
|
2065
|
+
function b() {
|
|
2066
|
+
var L;
|
|
2067
|
+
(L = l.onClose) == null || L.call(l);
|
|
2042
2068
|
}
|
|
2043
|
-
return (
|
|
2044
|
-
class: e(
|
|
2045
|
-
style: X(
|
|
2069
|
+
return (L, M) => (c(), p("div", {
|
|
2070
|
+
class: e(L.$style.container),
|
|
2071
|
+
style: X(d.value)
|
|
2046
2072
|
}, [
|
|
2047
|
-
ue(
|
|
2048
|
-
"initial-answers":
|
|
2049
|
-
"skip-pages":
|
|
2050
|
-
"on-submit":
|
|
2051
|
-
"on-page-change":
|
|
2052
|
-
"on-answer-change":
|
|
2053
|
-
"on-ready":
|
|
2054
|
-
"on-error":
|
|
2073
|
+
ue(hn, {
|
|
2074
|
+
"initial-answers": n.initialAnswers,
|
|
2075
|
+
"skip-pages": n.skipPages,
|
|
2076
|
+
"on-submit": v,
|
|
2077
|
+
"on-page-change": i,
|
|
2078
|
+
"on-answer-change": f,
|
|
2079
|
+
"on-ready": h,
|
|
2080
|
+
"on-error": m
|
|
2055
2081
|
}, {
|
|
2056
2082
|
default: He(() => [
|
|
2057
|
-
ue(
|
|
2058
|
-
"partner-logo-url":
|
|
2059
|
-
"show-close-button": !!
|
|
2060
|
-
onClose:
|
|
2083
|
+
ue(In, {
|
|
2084
|
+
"partner-logo-url": n.partnerLogoUrl,
|
|
2085
|
+
"show-close-button": !!n.onClose,
|
|
2086
|
+
onClose: b
|
|
2061
2087
|
}, null, 8, ["partner-logo-url", "show-close-button"]),
|
|
2062
|
-
ue(
|
|
2088
|
+
ue(To, { address: n.address }, null, 8, ["address"])
|
|
2063
2089
|
]),
|
|
2064
2090
|
_: 1
|
|
2065
2091
|
}, 8, ["initial-answers", "skip-pages"])
|
|
2066
2092
|
], 6));
|
|
2067
2093
|
}
|
|
2068
|
-
}),
|
|
2069
|
-
container:
|
|
2070
|
-
},
|
|
2071
|
-
$style:
|
|
2072
|
-
}, er = /* @__PURE__ */ V(
|
|
2094
|
+
}), Bo = "_container_kjhh7_2", Fo = {
|
|
2095
|
+
container: Bo
|
|
2096
|
+
}, Ro = {
|
|
2097
|
+
$style: Fo
|
|
2098
|
+
}, er = /* @__PURE__ */ V(Po, [["__cssModules", Ro]]), No = ["disabled"], Go = ["value", "disabled"], Oo = ["checked", "disabled"], Ho = ["checked", "disabled"], jo = ["disabled"], Vo = ["disabled"], xo = ["disabled"], Uo = ["disabled"], Zo = ["disabled"], zo = ["disabled", "aria-pressed", "onClick"], Wo = ["onClick"], Ko = ["disabled"], Qo = /* @__PURE__ */ F({
|
|
2073
2099
|
__name: "ScheduleAssessmentFlow",
|
|
2074
2100
|
props: {
|
|
2075
2101
|
offerId: {},
|
|
@@ -2079,93 +2105,93 @@ const Os = {
|
|
|
2079
2105
|
appearance: {}
|
|
2080
2106
|
},
|
|
2081
2107
|
emits: ["scheduled", "done", "ready", "error"],
|
|
2082
|
-
setup(
|
|
2083
|
-
const
|
|
2084
|
-
|
|
2085
|
-
if (!(
|
|
2108
|
+
setup(n, { emit: s }) {
|
|
2109
|
+
const l = n, o = s, u = Be(), r = w(() => ye(l.appearance)), d = I("select"), v = I(!0), i = I(null), f = I([]), h = I("UTC"), m = I(null), b = I(null), L = I(null), M = I(l.customerName ?? ""), q = I(S(l.customerPhone ?? "")), O = I(null), T = I(""), R = I(!1), Z = I(null);
|
|
2110
|
+
ve(async () => {
|
|
2111
|
+
if (!(l.customerName && l.customerPhone))
|
|
2086
2112
|
try {
|
|
2087
|
-
const a = await
|
|
2088
|
-
opendoorOfferRequestId:
|
|
2113
|
+
const a = await u.value.getCustomerContact({
|
|
2114
|
+
opendoorOfferRequestId: l.offerId
|
|
2089
2115
|
});
|
|
2090
|
-
!
|
|
2116
|
+
!l.customerName && !M.value && a.fullName && (M.value = a.fullName), !l.customerPhone && !q.value && a.phoneNumber && (q.value = S(a.phoneNumber));
|
|
2091
2117
|
} catch {
|
|
2092
2118
|
}
|
|
2093
|
-
}),
|
|
2119
|
+
}), ve(async () => {
|
|
2094
2120
|
try {
|
|
2095
|
-
const a = await
|
|
2096
|
-
offerId:
|
|
2121
|
+
const a = await u.value.getAssessmentSlots({
|
|
2122
|
+
offerId: l.offerId
|
|
2097
2123
|
});
|
|
2098
|
-
if (f.value = a.availableSlots,
|
|
2099
|
-
|
|
2100
|
-
|
|
2124
|
+
if (f.value = a.availableSlots, h.value = a.timezone, a.availableSlots.length > 0)
|
|
2125
|
+
m.value = P(
|
|
2126
|
+
A(a.availableSlots[0], a.timezone)
|
|
2101
2127
|
);
|
|
2102
2128
|
else {
|
|
2103
|
-
const
|
|
2104
|
-
|
|
2129
|
+
const g = /* @__PURE__ */ new Date();
|
|
2130
|
+
m.value = { year: g.getFullYear(), month: g.getMonth() };
|
|
2105
2131
|
}
|
|
2106
|
-
|
|
2132
|
+
v.value = !1, o("ready");
|
|
2107
2133
|
} catch (a) {
|
|
2108
|
-
const
|
|
2109
|
-
|
|
2134
|
+
const g = a instanceof Error ? a : new Error(String(a));
|
|
2135
|
+
i.value = g;
|
|
2110
2136
|
const C = /* @__PURE__ */ new Date();
|
|
2111
|
-
|
|
2137
|
+
m.value = { year: C.getFullYear(), month: C.getMonth() }, v.value = !1, o("error", g);
|
|
2112
2138
|
}
|
|
2113
2139
|
});
|
|
2114
2140
|
const N = w(() => {
|
|
2115
2141
|
const a = /* @__PURE__ */ new Map();
|
|
2116
|
-
for (const
|
|
2117
|
-
const C =
|
|
2118
|
-
G.push(
|
|
2142
|
+
for (const g of f.value) {
|
|
2143
|
+
const C = A(g, h.value), G = a.get(C) ?? [];
|
|
2144
|
+
G.push(g), a.set(C, G);
|
|
2119
2145
|
}
|
|
2120
2146
|
return a;
|
|
2121
|
-
}), D = w(() =>
|
|
2122
|
-
() =>
|
|
2147
|
+
}), D = w(() => m.value ? Ce(m.value) : []), U = w(
|
|
2148
|
+
() => m.value ? fe(m.value) : ""
|
|
2123
2149
|
), Y = w(
|
|
2124
|
-
() =>
|
|
2150
|
+
() => m.value ? he(m.value, N.value) : !1
|
|
2125
2151
|
), re = w(
|
|
2126
|
-
() =>
|
|
2152
|
+
() => m.value ? ke(m.value, N.value) : !1
|
|
2127
2153
|
), J = w(
|
|
2128
|
-
() =>
|
|
2154
|
+
() => b.value ? N.value.get(b.value) ?? [] : []
|
|
2129
2155
|
), z = w(() => {
|
|
2130
2156
|
const a = J.value[0];
|
|
2131
|
-
return a ? $e(new Date(a),
|
|
2157
|
+
return a ? $e(new Date(a), h.value) : null;
|
|
2132
2158
|
}), ae = w(
|
|
2133
|
-
() =>
|
|
2159
|
+
() => L.value ? new Date(L.value) : null
|
|
2134
2160
|
);
|
|
2135
2161
|
function te(a) {
|
|
2136
|
-
a && N.value.has(a.key) && (
|
|
2162
|
+
a && N.value.has(a.key) && (b.value = a.key, L.value = null);
|
|
2137
2163
|
}
|
|
2138
2164
|
function ie(a) {
|
|
2139
|
-
|
|
2165
|
+
m.value && (m.value = W(m.value, a));
|
|
2140
2166
|
}
|
|
2141
|
-
const
|
|
2167
|
+
const ne = w(() => {
|
|
2142
2168
|
const a = q.value.replace(/\D/g, "");
|
|
2143
|
-
return !R.value &&
|
|
2169
|
+
return !R.value && M.value.trim().length > 0 && a.length >= 10 && O.value !== null && (!O.value || T.value.trim().length > 0);
|
|
2144
2170
|
});
|
|
2145
|
-
function
|
|
2146
|
-
const
|
|
2147
|
-
q.value = S(
|
|
2171
|
+
function $(a) {
|
|
2172
|
+
const g = a.target;
|
|
2173
|
+
q.value = S(g.value), g.value = q.value;
|
|
2148
2174
|
}
|
|
2149
|
-
async function
|
|
2150
|
-
if (!(!
|
|
2151
|
-
R.value = !0,
|
|
2175
|
+
async function y() {
|
|
2176
|
+
if (!(!ne.value || !L.value)) {
|
|
2177
|
+
R.value = !0, Z.value = null;
|
|
2152
2178
|
try {
|
|
2153
|
-
const a = O.value ? `Customer: ${
|
|
2154
|
-
offerId:
|
|
2155
|
-
selectedInspectionTime:
|
|
2179
|
+
const a = O.value ? `Customer: ${M.value.trim()}. Access instructions: ${T.value.trim()}` : `Customer: ${M.value.trim()}. No gate code or entry restrictions.`, g = await u.value.scheduleAssessment({
|
|
2180
|
+
offerId: l.offerId,
|
|
2181
|
+
selectedInspectionTime: L.value,
|
|
2156
2182
|
reminderPhone: q.value.replace(/\D/g, ""),
|
|
2157
2183
|
notes: a
|
|
2158
2184
|
});
|
|
2159
|
-
|
|
2185
|
+
d.value = "success";
|
|
2160
2186
|
try {
|
|
2161
|
-
|
|
2187
|
+
o("scheduled", g.visitId);
|
|
2162
2188
|
} catch (C) {
|
|
2163
2189
|
const G = C instanceof Error ? C : new Error(String(C));
|
|
2164
|
-
|
|
2190
|
+
o("error", G);
|
|
2165
2191
|
}
|
|
2166
2192
|
} catch (a) {
|
|
2167
|
-
const
|
|
2168
|
-
|
|
2193
|
+
const g = a instanceof Error ? a : new Error(String(a));
|
|
2194
|
+
Z.value = g.message, o("error", g);
|
|
2169
2195
|
} finally {
|
|
2170
2196
|
R.value = !1;
|
|
2171
2197
|
}
|
|
@@ -2175,71 +2201,71 @@ const Os = {
|
|
|
2175
2201
|
return a.trim().split(/\s+/)[0] ?? "";
|
|
2176
2202
|
}
|
|
2177
2203
|
function S(a) {
|
|
2178
|
-
const
|
|
2179
|
-
return
|
|
2204
|
+
const g = a.replace(/\D/g, "").slice(0, 10);
|
|
2205
|
+
return g.length === 0 ? "" : g.length <= 3 ? `(${g}` : g.length <= 6 ? `(${g.slice(0, 3)}) ${g.slice(3)}` : `(${g.slice(0, 3)}) ${g.slice(3, 6)}-${g.slice(6)}`;
|
|
2180
2206
|
}
|
|
2181
|
-
function
|
|
2207
|
+
function A(a, g) {
|
|
2182
2208
|
return new Intl.DateTimeFormat("en-CA", {
|
|
2183
|
-
timeZone:
|
|
2209
|
+
timeZone: g,
|
|
2184
2210
|
year: "numeric",
|
|
2185
2211
|
month: "2-digit",
|
|
2186
2212
|
day: "2-digit"
|
|
2187
2213
|
}).format(new Date(a));
|
|
2188
2214
|
}
|
|
2189
2215
|
function P(a) {
|
|
2190
|
-
const [
|
|
2191
|
-
return { year:
|
|
2216
|
+
const [g, C] = a.split("-").map((G) => parseInt(G, 10));
|
|
2217
|
+
return { year: g, month: C - 1 };
|
|
2192
2218
|
}
|
|
2193
|
-
function W(a,
|
|
2194
|
-
const C = a.year * 12 + a.month +
|
|
2195
|
-
return { year: G, month:
|
|
2219
|
+
function W(a, g) {
|
|
2220
|
+
const C = a.year * 12 + a.month + g, G = Math.floor(C / 12), se = C - G * 12;
|
|
2221
|
+
return { year: G, month: se };
|
|
2196
2222
|
}
|
|
2197
|
-
function
|
|
2198
|
-
return new Date(Date.UTC(a,
|
|
2223
|
+
function fe({ year: a, month: g }) {
|
|
2224
|
+
return new Date(Date.UTC(a, g, 1)).toLocaleString(void 0, {
|
|
2199
2225
|
timeZone: "UTC",
|
|
2200
2226
|
month: "long",
|
|
2201
2227
|
year: "numeric"
|
|
2202
2228
|
});
|
|
2203
2229
|
}
|
|
2204
|
-
function $e(a,
|
|
2230
|
+
function $e(a, g) {
|
|
2205
2231
|
return new Intl.DateTimeFormat(void 0, {
|
|
2206
|
-
timeZone:
|
|
2232
|
+
timeZone: g,
|
|
2207
2233
|
weekday: "long",
|
|
2208
2234
|
month: "long",
|
|
2209
2235
|
day: "numeric"
|
|
2210
2236
|
}).format(a);
|
|
2211
2237
|
}
|
|
2212
|
-
function pe(a,
|
|
2238
|
+
function pe(a, g) {
|
|
2213
2239
|
return new Intl.DateTimeFormat(void 0, {
|
|
2214
|
-
timeZone:
|
|
2240
|
+
timeZone: g,
|
|
2215
2241
|
hour: "numeric",
|
|
2216
2242
|
minute: "2-digit",
|
|
2217
2243
|
hour12: !0
|
|
2218
2244
|
}).format(a);
|
|
2219
2245
|
}
|
|
2220
|
-
function Ce({ year: a, month:
|
|
2221
|
-
const C = new Date(Date.UTC(a,
|
|
2222
|
-
for (let Le = 0; Le <
|
|
2223
|
-
const
|
|
2224
|
-
|
|
2225
|
-
key: `${Re}-${Ne}-${String(
|
|
2226
|
-
day:
|
|
2246
|
+
function Ce({ year: a, month: g }) {
|
|
2247
|
+
const C = new Date(Date.UTC(a, g, 1)).getUTCDay(), G = new Date(Date.UTC(a, g + 1, 0)).getUTCDate(), se = Math.ceil((C + G) / 7) * 7, oe = [], Re = String(a).padStart(4, "0"), Ne = String(g + 1).padStart(2, "0");
|
|
2248
|
+
for (let Le = 0; Le < se; Le++) {
|
|
2249
|
+
const me = Le - C + 1;
|
|
2250
|
+
me < 1 || me > G ? oe.push(null) : oe.push({
|
|
2251
|
+
key: `${Re}-${Ne}-${String(me).padStart(2, "0")}`,
|
|
2252
|
+
day: me
|
|
2227
2253
|
});
|
|
2228
2254
|
}
|
|
2229
|
-
return
|
|
2255
|
+
return oe;
|
|
2230
2256
|
}
|
|
2231
|
-
function
|
|
2232
|
-
for (const C of
|
|
2233
|
-
const [G,
|
|
2234
|
-
if (G < a.year || G === a.year &&
|
|
2257
|
+
function he(a, g) {
|
|
2258
|
+
for (const C of g.keys()) {
|
|
2259
|
+
const [G, se] = C.split("-").map((oe) => parseInt(oe, 10));
|
|
2260
|
+
if (G < a.year || G === a.year && se - 1 < a.month)
|
|
2235
2261
|
return !0;
|
|
2236
2262
|
}
|
|
2237
2263
|
return !1;
|
|
2238
2264
|
}
|
|
2239
|
-
function ke(a,
|
|
2240
|
-
for (const C of
|
|
2241
|
-
const [G,
|
|
2242
|
-
if (G > a.year || G === a.year &&
|
|
2265
|
+
function ke(a, g) {
|
|
2266
|
+
for (const C of g.keys()) {
|
|
2267
|
+
const [G, se] = C.split("-").map((oe) => parseInt(oe, 10));
|
|
2268
|
+
if (G > a.year || G === a.year && se - 1 > a.month)
|
|
2243
2269
|
return !0;
|
|
2244
2270
|
}
|
|
2245
2271
|
return !1;
|
|
@@ -2271,10 +2297,10 @@ const Os = {
|
|
|
2271
2297
|
body: "Once we're done with the home assessment, it typically takes a few days to email your final offer. You'll be able to see your final offer price along with the service charge, any repair cost, and your estimated closing costs."
|
|
2272
2298
|
}
|
|
2273
2299
|
];
|
|
2274
|
-
return (a,
|
|
2300
|
+
return (a, g) => v.value ? (c(), p("div", {
|
|
2275
2301
|
key: 0,
|
|
2276
2302
|
class: e(a.$style.root),
|
|
2277
|
-
style: X(
|
|
2303
|
+
style: X(r.value),
|
|
2278
2304
|
"data-testid": "schedule-assessment-loading"
|
|
2279
2305
|
}, [
|
|
2280
2306
|
t("div", {
|
|
@@ -2284,10 +2310,10 @@ const Os = {
|
|
|
2284
2310
|
class: e(a.$style.subtitle)
|
|
2285
2311
|
}, "Loading available times…", 2)
|
|
2286
2312
|
], 2)
|
|
2287
|
-
], 6)) :
|
|
2313
|
+
], 6)) : i.value ? (c(), p("div", {
|
|
2288
2314
|
key: 1,
|
|
2289
2315
|
class: e(a.$style.root),
|
|
2290
|
-
style: X(
|
|
2316
|
+
style: X(r.value),
|
|
2291
2317
|
"data-testid": "schedule-assessment-error"
|
|
2292
2318
|
}, [
|
|
2293
2319
|
t("div", {
|
|
@@ -2297,10 +2323,10 @@ const Os = {
|
|
|
2297
2323
|
class: e(a.$style.subtitle)
|
|
2298
2324
|
}, " We couldn't load available times. Please try again in a few minutes. ", 2)
|
|
2299
2325
|
], 2)
|
|
2300
|
-
], 6)) :
|
|
2326
|
+
], 6)) : d.value === "success" ? (c(), p("div", {
|
|
2301
2327
|
key: 2,
|
|
2302
2328
|
class: e(a.$style.root),
|
|
2303
|
-
style: X(
|
|
2329
|
+
style: X(r.value),
|
|
2304
2330
|
"data-testid": "schedule-assessment-success"
|
|
2305
2331
|
}, [
|
|
2306
2332
|
t("div", {
|
|
@@ -2309,7 +2335,7 @@ const Os = {
|
|
|
2309
2335
|
t("div", {
|
|
2310
2336
|
class: e(a.$style.successCheckCircle),
|
|
2311
2337
|
"aria-hidden": "true"
|
|
2312
|
-
}, [...
|
|
2338
|
+
}, [...g[9] || (g[9] = [
|
|
2313
2339
|
t("svg", {
|
|
2314
2340
|
width: "20",
|
|
2315
2341
|
height: "20",
|
|
@@ -2327,18 +2353,18 @@ const Os = {
|
|
|
2327
2353
|
])], 2),
|
|
2328
2354
|
t("h2", {
|
|
2329
2355
|
class: e(a.$style.title)
|
|
2330
|
-
}, _(
|
|
2356
|
+
}, _(M.value ? `${k(M.value)}, your assessment is scheduled!` : "Your assessment is scheduled!"), 3),
|
|
2331
2357
|
t("p", {
|
|
2332
2358
|
class: e(a.$style.subtitle)
|
|
2333
2359
|
}, " A calendar invite has been sent to your email address. ", 2),
|
|
2334
2360
|
t("div", {
|
|
2335
2361
|
class: e(a.$style.summaryCard)
|
|
2336
2362
|
}, [
|
|
2337
|
-
ae.value ? (
|
|
2363
|
+
ae.value ? (c(), p(j, { key: 0 }, [
|
|
2338
2364
|
t("div", {
|
|
2339
2365
|
class: e(a.$style.summaryRow)
|
|
2340
2366
|
}, [
|
|
2341
|
-
(
|
|
2367
|
+
(c(), p("svg", {
|
|
2342
2368
|
class: e(a.$style.summaryIcon),
|
|
2343
2369
|
width: "16",
|
|
2344
2370
|
height: "16",
|
|
@@ -2349,7 +2375,7 @@ const Os = {
|
|
|
2349
2375
|
"stroke-linecap": "round",
|
|
2350
2376
|
"stroke-linejoin": "round",
|
|
2351
2377
|
"aria-hidden": "true"
|
|
2352
|
-
}, [...
|
|
2378
|
+
}, [...g[10] || (g[10] = [
|
|
2353
2379
|
t("rect", {
|
|
2354
2380
|
x: "2",
|
|
2355
2381
|
y: "3.5",
|
|
@@ -2359,12 +2385,12 @@ const Os = {
|
|
|
2359
2385
|
}, null, -1),
|
|
2360
2386
|
t("path", { d: "M2 6.5h12M5.5 2v3M10.5 2v3" }, null, -1)
|
|
2361
2387
|
])], 2)),
|
|
2362
|
-
t("span", null, _($e(ae.value,
|
|
2388
|
+
t("span", null, _($e(ae.value, h.value)), 1)
|
|
2363
2389
|
], 2),
|
|
2364
2390
|
t("div", {
|
|
2365
2391
|
class: e(a.$style.summaryRow)
|
|
2366
2392
|
}, [
|
|
2367
|
-
(
|
|
2393
|
+
(c(), p("svg", {
|
|
2368
2394
|
class: e(a.$style.summaryIcon),
|
|
2369
2395
|
width: "16",
|
|
2370
2396
|
height: "16",
|
|
@@ -2375,7 +2401,7 @@ const Os = {
|
|
|
2375
2401
|
"stroke-linecap": "round",
|
|
2376
2402
|
"stroke-linejoin": "round",
|
|
2377
2403
|
"aria-hidden": "true"
|
|
2378
|
-
}, [...
|
|
2404
|
+
}, [...g[11] || (g[11] = [
|
|
2379
2405
|
t("circle", {
|
|
2380
2406
|
cx: "8",
|
|
2381
2407
|
cy: "8",
|
|
@@ -2383,14 +2409,14 @@ const Os = {
|
|
|
2383
2409
|
}, null, -1),
|
|
2384
2410
|
t("path", { d: "M8 4.5V8l2.5 1.5" }, null, -1)
|
|
2385
2411
|
])], 2)),
|
|
2386
|
-
t("span", null, _(pe(ae.value,
|
|
2412
|
+
t("span", null, _(pe(ae.value, h.value)), 1)
|
|
2387
2413
|
], 2)
|
|
2388
2414
|
], 64)) : E("", !0),
|
|
2389
|
-
|
|
2415
|
+
n.address ? (c(), p("div", {
|
|
2390
2416
|
key: 1,
|
|
2391
2417
|
class: e(a.$style.summaryRow)
|
|
2392
2418
|
}, [
|
|
2393
|
-
(
|
|
2419
|
+
(c(), p("svg", {
|
|
2394
2420
|
class: e(a.$style.summaryIcon),
|
|
2395
2421
|
width: "16",
|
|
2396
2422
|
height: "16",
|
|
@@ -2401,7 +2427,7 @@ const Os = {
|
|
|
2401
2427
|
"stroke-linecap": "round",
|
|
2402
2428
|
"stroke-linejoin": "round",
|
|
2403
2429
|
"aria-hidden": "true"
|
|
2404
|
-
}, [...
|
|
2430
|
+
}, [...g[12] || (g[12] = [
|
|
2405
2431
|
t("path", { d: "M8 14s-4.5-4-4.5-7.5a4.5 4.5 0 1 1 9 0C12.5 10 8 14 8 14z" }, null, -1),
|
|
2406
2432
|
t("circle", {
|
|
2407
2433
|
cx: "8",
|
|
@@ -2409,19 +2435,19 @@ const Os = {
|
|
|
2409
2435
|
r: "1.5"
|
|
2410
2436
|
}, null, -1)
|
|
2411
2437
|
])], 2)),
|
|
2412
|
-
t("span", null, _(
|
|
2438
|
+
t("span", null, _(n.address), 1)
|
|
2413
2439
|
], 2)) : E("", !0)
|
|
2414
2440
|
], 2),
|
|
2415
2441
|
t("button", {
|
|
2416
2442
|
type: "button",
|
|
2417
2443
|
class: e(a.$style.primaryButton),
|
|
2418
|
-
onClick:
|
|
2444
|
+
onClick: g[0] || (g[0] = (C) => o("done"))
|
|
2419
2445
|
}, " Done ", 2)
|
|
2420
2446
|
], 2)
|
|
2421
|
-
], 6)) :
|
|
2447
|
+
], 6)) : d.value === "confirm" ? (c(), p("div", {
|
|
2422
2448
|
key: 3,
|
|
2423
2449
|
class: e(a.$style.root),
|
|
2424
|
-
style: X(
|
|
2450
|
+
style: X(r.value),
|
|
2425
2451
|
"data-testid": "schedule-assessment-confirm"
|
|
2426
2452
|
}, [
|
|
2427
2453
|
t("div", {
|
|
@@ -2439,10 +2465,10 @@ const Os = {
|
|
|
2439
2465
|
Ee(t("input", {
|
|
2440
2466
|
class: e(a.$style.input),
|
|
2441
2467
|
type: "text",
|
|
2442
|
-
"onUpdate:modelValue":
|
|
2468
|
+
"onUpdate:modelValue": g[1] || (g[1] = (C) => M.value = C),
|
|
2443
2469
|
disabled: R.value
|
|
2444
|
-
}, null, 10,
|
|
2445
|
-
[qe,
|
|
2470
|
+
}, null, 10, No), [
|
|
2471
|
+
[qe, M.value]
|
|
2446
2472
|
])
|
|
2447
2473
|
], 2),
|
|
2448
2474
|
t("label", {
|
|
@@ -2459,8 +2485,8 @@ const Os = {
|
|
|
2459
2485
|
placeholder: "(555) 555-5555",
|
|
2460
2486
|
value: q.value,
|
|
2461
2487
|
disabled: R.value,
|
|
2462
|
-
onInput:
|
|
2463
|
-
}, null, 42,
|
|
2488
|
+
onInput: $
|
|
2489
|
+
}, null, 42, Go)
|
|
2464
2490
|
], 2),
|
|
2465
2491
|
t("fieldset", {
|
|
2466
2492
|
class: e(a.$style.fieldset)
|
|
@@ -2479,9 +2505,9 @@ const Os = {
|
|
|
2479
2505
|
name: "gate-code",
|
|
2480
2506
|
checked: O.value === !0,
|
|
2481
2507
|
disabled: R.value,
|
|
2482
|
-
onChange:
|
|
2483
|
-
}, null, 40,
|
|
2484
|
-
|
|
2508
|
+
onChange: g[2] || (g[2] = (C) => O.value = !0)
|
|
2509
|
+
}, null, 40, Oo),
|
|
2510
|
+
g[13] || (g[13] = t("span", null, "Yes", -1))
|
|
2485
2511
|
], 2),
|
|
2486
2512
|
t("label", {
|
|
2487
2513
|
class: e(a.$style.radioOption)
|
|
@@ -2491,13 +2517,13 @@ const Os = {
|
|
|
2491
2517
|
name: "gate-code",
|
|
2492
2518
|
checked: O.value === !1,
|
|
2493
2519
|
disabled: R.value,
|
|
2494
|
-
onChange:
|
|
2495
|
-
}, null, 40,
|
|
2496
|
-
|
|
2520
|
+
onChange: g[3] || (g[3] = (C) => O.value = !1)
|
|
2521
|
+
}, null, 40, Ho),
|
|
2522
|
+
g[14] || (g[14] = t("span", null, "No", -1))
|
|
2497
2523
|
], 2)
|
|
2498
2524
|
], 2)
|
|
2499
2525
|
], 2),
|
|
2500
|
-
O.value ? (
|
|
2526
|
+
O.value ? (c(), p("label", {
|
|
2501
2527
|
key: 0,
|
|
2502
2528
|
class: e(a.$style.field)
|
|
2503
2529
|
}, [
|
|
@@ -2508,16 +2534,16 @@ const Os = {
|
|
|
2508
2534
|
class: e(a.$style.input),
|
|
2509
2535
|
type: "text",
|
|
2510
2536
|
placeholder: "Gate code, directions, etc.",
|
|
2511
|
-
"onUpdate:modelValue":
|
|
2537
|
+
"onUpdate:modelValue": g[4] || (g[4] = (C) => T.value = C),
|
|
2512
2538
|
disabled: R.value
|
|
2513
|
-
}, null, 10,
|
|
2514
|
-
[qe,
|
|
2539
|
+
}, null, 10, jo), [
|
|
2540
|
+
[qe, T.value]
|
|
2515
2541
|
])
|
|
2516
2542
|
], 2)) : E("", !0),
|
|
2517
|
-
|
|
2543
|
+
Z.value ? (c(), p("p", {
|
|
2518
2544
|
key: 1,
|
|
2519
2545
|
class: e(a.$style.errorText)
|
|
2520
|
-
}, _(
|
|
2546
|
+
}, _(Z.value), 3)) : E("", !0),
|
|
2521
2547
|
t("div", {
|
|
2522
2548
|
class: e(a.$style.actionsRow)
|
|
2523
2549
|
}, [
|
|
@@ -2525,14 +2551,14 @@ const Os = {
|
|
|
2525
2551
|
type: "button",
|
|
2526
2552
|
class: e(a.$style.linkButton),
|
|
2527
2553
|
disabled: R.value,
|
|
2528
|
-
onClick:
|
|
2529
|
-
}, " ← Back ", 10,
|
|
2554
|
+
onClick: g[5] || (g[5] = (C) => d.value = "select")
|
|
2555
|
+
}, " ← Back ", 10, Vo),
|
|
2530
2556
|
t("button", {
|
|
2531
2557
|
type: "button",
|
|
2532
2558
|
class: e(a.$style.primaryButton),
|
|
2533
|
-
disabled: !
|
|
2534
|
-
onClick:
|
|
2535
|
-
}, _(R.value ? "Scheduling…" : "Schedule"), 11,
|
|
2559
|
+
disabled: !ne.value,
|
|
2560
|
+
onClick: y
|
|
2561
|
+
}, _(R.value ? "Scheduling…" : "Schedule"), 11, xo)
|
|
2536
2562
|
], 2),
|
|
2537
2563
|
t("div", {
|
|
2538
2564
|
class: e(a.$style.faqBelowActions)
|
|
@@ -2543,7 +2569,7 @@ const Os = {
|
|
|
2543
2569
|
t("h3", {
|
|
2544
2570
|
class: e(a.$style.faqHeader)
|
|
2545
2571
|
}, "Frequently asked questions", 2),
|
|
2546
|
-
(
|
|
2572
|
+
(c(), p(j, null, Q(Fe, (C) => t("details", {
|
|
2547
2573
|
key: C.title,
|
|
2548
2574
|
class: e(a.$style.faqItem)
|
|
2549
2575
|
}, [
|
|
@@ -2551,7 +2577,7 @@ const Os = {
|
|
|
2551
2577
|
class: e(a.$style.faqQuestion)
|
|
2552
2578
|
}, [
|
|
2553
2579
|
t("span", null, _(C.title), 1),
|
|
2554
|
-
(
|
|
2580
|
+
(c(), p("svg", {
|
|
2555
2581
|
class: e(a.$style.faqChevron),
|
|
2556
2582
|
width: "16",
|
|
2557
2583
|
height: "16",
|
|
@@ -2562,7 +2588,7 @@ const Os = {
|
|
|
2562
2588
|
"stroke-linecap": "round",
|
|
2563
2589
|
"stroke-linejoin": "round",
|
|
2564
2590
|
"aria-hidden": "true"
|
|
2565
|
-
}, [...
|
|
2591
|
+
}, [...g[15] || (g[15] = [
|
|
2566
2592
|
t("path", { d: "M4 6l4 4 4-4" }, null, -1)
|
|
2567
2593
|
])], 2))
|
|
2568
2594
|
], 2),
|
|
@@ -2573,10 +2599,10 @@ const Os = {
|
|
|
2573
2599
|
], 2)
|
|
2574
2600
|
], 2)
|
|
2575
2601
|
], 2)
|
|
2576
|
-
], 6)) : (
|
|
2602
|
+
], 6)) : (c(), p("div", {
|
|
2577
2603
|
key: 4,
|
|
2578
2604
|
class: e(a.$style.root),
|
|
2579
|
-
style: X(
|
|
2605
|
+
style: X(r.value),
|
|
2580
2606
|
"data-testid": "schedule-assessment-flow"
|
|
2581
2607
|
}, [
|
|
2582
2608
|
t("div", {
|
|
@@ -2601,7 +2627,7 @@ const Os = {
|
|
|
2601
2627
|
t("div", {
|
|
2602
2628
|
class: e(a.$style.featuresList)
|
|
2603
2629
|
}, [
|
|
2604
|
-
(
|
|
2630
|
+
(c(), p(j, null, Q(we, (C) => t("div", {
|
|
2605
2631
|
key: C.title,
|
|
2606
2632
|
class: e(a.$style.feature)
|
|
2607
2633
|
}, [
|
|
@@ -2625,126 +2651,126 @@ const Os = {
|
|
|
2625
2651
|
class: e(a.$style.calendarNavButton),
|
|
2626
2652
|
disabled: !Y.value,
|
|
2627
2653
|
"aria-label": "Previous month",
|
|
2628
|
-
onClick:
|
|
2629
|
-
}, " ‹ ", 10,
|
|
2654
|
+
onClick: g[6] || (g[6] = (C) => ie(-1))
|
|
2655
|
+
}, " ‹ ", 10, Uo),
|
|
2630
2656
|
t("span", {
|
|
2631
2657
|
class: e(a.$style.calendarMonthLabel)
|
|
2632
|
-
}, _(
|
|
2658
|
+
}, _(U.value), 3),
|
|
2633
2659
|
t("button", {
|
|
2634
2660
|
type: "button",
|
|
2635
2661
|
class: e(a.$style.calendarNavButton),
|
|
2636
2662
|
disabled: !re.value,
|
|
2637
2663
|
"aria-label": "Next month",
|
|
2638
|
-
onClick:
|
|
2639
|
-
}, " › ", 10,
|
|
2664
|
+
onClick: g[7] || (g[7] = (C) => ie(1))
|
|
2665
|
+
}, " › ", 10, Zo)
|
|
2640
2666
|
], 2),
|
|
2641
2667
|
t("div", {
|
|
2642
2668
|
class: e(a.$style.calendarGrid)
|
|
2643
2669
|
}, [
|
|
2644
|
-
(
|
|
2670
|
+
(c(), p(j, null, Q(_e, (C) => t("div", {
|
|
2645
2671
|
key: C,
|
|
2646
2672
|
class: e(a.$style.calendarDayHeader)
|
|
2647
2673
|
}, _(C), 3)), 64)),
|
|
2648
|
-
(
|
|
2649
|
-
key: C ? C.key : `empty-${
|
|
2674
|
+
(c(!0), p(j, null, Q(D.value, (C, G) => (c(), p("button", {
|
|
2675
|
+
key: C ? C.key : `empty-${U.value}-${G}`,
|
|
2650
2676
|
type: "button",
|
|
2651
2677
|
class: e(
|
|
2652
|
-
C &&
|
|
2678
|
+
C && b.value === C.key ? a.$style.calendarDaySelected : C && N.value.has(C.key) ? a.$style.calendarDayAvailable : a.$style.calendarDayDisabled
|
|
2653
2679
|
),
|
|
2654
2680
|
disabled: !C || !N.value.has(C.key),
|
|
2655
|
-
"aria-pressed": !!(C &&
|
|
2656
|
-
onClick: (
|
|
2657
|
-
}, _(C ? C.day : ""), 11,
|
|
2681
|
+
"aria-pressed": !!(C && b.value === C.key),
|
|
2682
|
+
onClick: (se) => te(C)
|
|
2683
|
+
}, _(C ? C.day : ""), 11, zo))), 128))
|
|
2658
2684
|
], 2),
|
|
2659
|
-
z.value ? (
|
|
2685
|
+
z.value ? (c(), p(j, { key: 0 }, [
|
|
2660
2686
|
t("p", {
|
|
2661
2687
|
class: e(a.$style.timesHeader)
|
|
2662
2688
|
}, " Available times for " + _(z.value), 3),
|
|
2663
2689
|
t("div", {
|
|
2664
2690
|
class: e(a.$style.timeRow)
|
|
2665
2691
|
}, [
|
|
2666
|
-
(
|
|
2692
|
+
(c(!0), p(j, null, Q(J.value, (C) => (c(), p("button", {
|
|
2667
2693
|
key: C,
|
|
2668
2694
|
type: "button",
|
|
2669
2695
|
class: e(
|
|
2670
|
-
C ===
|
|
2696
|
+
C === L.value ? a.$style.timeButtonSelected : a.$style.timeButton
|
|
2671
2697
|
),
|
|
2672
|
-
onClick: (G) =>
|
|
2673
|
-
}, _(pe(new Date(C),
|
|
2698
|
+
onClick: (G) => L.value = C
|
|
2699
|
+
}, _(pe(new Date(C), h.value)), 11, Wo))), 128))
|
|
2674
2700
|
], 2)
|
|
2675
2701
|
], 64)) : E("", !0),
|
|
2676
2702
|
t("button", {
|
|
2677
2703
|
type: "button",
|
|
2678
2704
|
class: e(a.$style.primaryButton),
|
|
2679
|
-
disabled: !
|
|
2680
|
-
onClick:
|
|
2681
|
-
}, " Continue ", 10,
|
|
2705
|
+
disabled: !L.value,
|
|
2706
|
+
onClick: g[8] || (g[8] = (C) => d.value = "confirm")
|
|
2707
|
+
}, " Continue ", 10, Ko)
|
|
2682
2708
|
], 2)
|
|
2683
2709
|
], 2)
|
|
2684
2710
|
], 2)
|
|
2685
2711
|
], 6));
|
|
2686
2712
|
}
|
|
2687
|
-
}),
|
|
2688
|
-
root:
|
|
2689
|
-
card:
|
|
2690
|
-
titleLarge:
|
|
2691
|
-
featuresList:
|
|
2692
|
-
stepLayout:
|
|
2693
|
-
leftColumn:
|
|
2694
|
-
introHeader:
|
|
2695
|
-
schedule:
|
|
2696
|
-
subtitleLeft:
|
|
2697
|
-
feature:
|
|
2698
|
-
featureTitle:
|
|
2699
|
-
featureDescription:
|
|
2700
|
-
title:
|
|
2701
|
-
subtitle:
|
|
2702
|
-
calendarHeader:
|
|
2703
|
-
calendarMonthLabel:
|
|
2704
|
-
calendarNavButton:
|
|
2705
|
-
calendarGrid:
|
|
2706
|
-
calendarDayHeader:
|
|
2707
|
-
calendarDayAvailable:
|
|
2708
|
-
calendarDayDisabled:
|
|
2709
|
-
calendarDaySelected:
|
|
2710
|
-
timesHeader:
|
|
2711
|
-
timeRow: $
|
|
2712
|
-
timeButton:
|
|
2713
|
-
timeButtonSelected:
|
|
2714
|
-
field:
|
|
2715
|
-
fieldLabel:
|
|
2716
|
-
input:
|
|
2717
|
-
fieldset:
|
|
2718
|
-
radioRow:
|
|
2719
|
-
radioOption:
|
|
2720
|
-
faqBelowActions:
|
|
2721
|
-
faq:
|
|
2722
|
-
faqHeader:
|
|
2723
|
-
faqItem:
|
|
2724
|
-
faqQuestion:
|
|
2725
|
-
faqAnswer:
|
|
2726
|
-
faqChevron:
|
|
2727
|
-
errorText:
|
|
2728
|
-
actionsRow:
|
|
2729
|
-
linkButton:
|
|
2730
|
-
primaryButton:
|
|
2731
|
-
successCheckCircle:
|
|
2732
|
-
summaryCard:
|
|
2733
|
-
summaryRow:
|
|
2734
|
-
summaryIcon:
|
|
2735
|
-
},
|
|
2736
|
-
$style:
|
|
2737
|
-
}, tr = /* @__PURE__ */ V(
|
|
2713
|
+
}), Yo = "_root_1lu6h_2", Xo = "_card_1lu6h_13", Jo = "_titleLarge_1lu6h_30", el = "_featuresList_1lu6h_34", tl = "_stepLayout_1lu6h_45", nl = "_leftColumn_1lu6h_52", sl = "_introHeader_1lu6h_58", al = "_schedule_1lu6h_64", ol = "_subtitleLeft_1lu6h_109", ll = "_feature_1lu6h_34", rl = "_featureTitle_1lu6h_128", il = "_featureDescription_1lu6h_135", ul = "_title_1lu6h_30", cl = "_subtitle_1lu6h_109", dl = "_calendarHeader_1lu6h_160", vl = "_calendarMonthLabel_1lu6h_167", yl = "_calendarNavButton_1lu6h_173", fl = "_calendarGrid_1lu6h_193", pl = "_calendarDayHeader_1lu6h_199", hl = "_calendarDayAvailable_1lu6h_208", ml = "_calendarDayDisabled_1lu6h_209", gl = "_calendarDaySelected_1lu6h_210", bl = "_timesHeader_1lu6h_241", $l = "_timeRow_1lu6h_248", Cl = "_timeButton_1lu6h_255", kl = "_timeButtonSelected_1lu6h_256", _l = "_field_1lu6h_279", wl = "_fieldLabel_1lu6h_285", Ll = "_input_1lu6h_291", Il = "_fieldset_1lu6h_312", Sl = "_radioRow_1lu6h_321", Dl = "_radioOption_1lu6h_326", El = "_faqBelowActions_1lu6h_346", ql = "_faq_1lu6h_346", Ml = "_faqHeader_1lu6h_357", Al = "_faqItem_1lu6h_365", Tl = "_faqQuestion_1lu6h_374", Pl = "_faqAnswer_1lu6h_390", Bl = "_faqChevron_1lu6h_397", Fl = "_errorText_1lu6h_407", Rl = "_actionsRow_1lu6h_413", Nl = "_linkButton_1lu6h_421", Gl = "_primaryButton_1lu6h_438", Ol = "_successCheckCircle_1lu6h_471", Hl = "_summaryCard_1lu6h_483", jl = "_summaryRow_1lu6h_493", Vl = "_summaryIcon_1lu6h_501", xl = {
|
|
2714
|
+
root: Yo,
|
|
2715
|
+
card: Xo,
|
|
2716
|
+
titleLarge: Jo,
|
|
2717
|
+
featuresList: el,
|
|
2718
|
+
stepLayout: tl,
|
|
2719
|
+
leftColumn: nl,
|
|
2720
|
+
introHeader: sl,
|
|
2721
|
+
schedule: al,
|
|
2722
|
+
subtitleLeft: ol,
|
|
2723
|
+
feature: ll,
|
|
2724
|
+
featureTitle: rl,
|
|
2725
|
+
featureDescription: il,
|
|
2726
|
+
title: ul,
|
|
2727
|
+
subtitle: cl,
|
|
2728
|
+
calendarHeader: dl,
|
|
2729
|
+
calendarMonthLabel: vl,
|
|
2730
|
+
calendarNavButton: yl,
|
|
2731
|
+
calendarGrid: fl,
|
|
2732
|
+
calendarDayHeader: pl,
|
|
2733
|
+
calendarDayAvailable: hl,
|
|
2734
|
+
calendarDayDisabled: ml,
|
|
2735
|
+
calendarDaySelected: gl,
|
|
2736
|
+
timesHeader: bl,
|
|
2737
|
+
timeRow: $l,
|
|
2738
|
+
timeButton: Cl,
|
|
2739
|
+
timeButtonSelected: kl,
|
|
2740
|
+
field: _l,
|
|
2741
|
+
fieldLabel: wl,
|
|
2742
|
+
input: Ll,
|
|
2743
|
+
fieldset: Il,
|
|
2744
|
+
radioRow: Sl,
|
|
2745
|
+
radioOption: Dl,
|
|
2746
|
+
faqBelowActions: El,
|
|
2747
|
+
faq: ql,
|
|
2748
|
+
faqHeader: Ml,
|
|
2749
|
+
faqItem: Al,
|
|
2750
|
+
faqQuestion: Tl,
|
|
2751
|
+
faqAnswer: Pl,
|
|
2752
|
+
faqChevron: Bl,
|
|
2753
|
+
errorText: Fl,
|
|
2754
|
+
actionsRow: Rl,
|
|
2755
|
+
linkButton: Nl,
|
|
2756
|
+
primaryButton: Gl,
|
|
2757
|
+
successCheckCircle: Ol,
|
|
2758
|
+
summaryCard: Hl,
|
|
2759
|
+
summaryRow: jl,
|
|
2760
|
+
summaryIcon: Vl
|
|
2761
|
+
}, Ul = {
|
|
2762
|
+
$style: xl
|
|
2763
|
+
}, tr = /* @__PURE__ */ V(Qo, [["__cssModules", Ul]]);
|
|
2738
2764
|
export {
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2765
|
+
Yl as AddressEntry,
|
|
2766
|
+
Xl as AddressMap,
|
|
2767
|
+
Jl as AddressUnitConfirmation,
|
|
2742
2768
|
ar as DTC_ONBOARDING_PAGE_IDS,
|
|
2743
2769
|
er as DtcOnboardingFlow,
|
|
2744
|
-
|
|
2745
|
-
|
|
2770
|
+
or as OpendoorClient,
|
|
2771
|
+
Ql as OpendoorProvider,
|
|
2746
2772
|
tr as ScheduleAssessmentFlow,
|
|
2747
|
-
|
|
2773
|
+
lr as THEMES,
|
|
2748
2774
|
rr as resolveAppearance,
|
|
2749
|
-
|
|
2775
|
+
Be as useOpendoorClient
|
|
2750
2776
|
};
|