@opendoor/partner-sdk-client-vue 1.1.4 → 1.1.5
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 +0 -14
- package/dist/index.js +1239 -1238
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { NOOP_TRACKING as
|
|
3
|
-
import { resolveAppearance as
|
|
4
|
-
import { OpendoorClient as
|
|
5
|
-
import { createDtcOnboardingFlow as
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as x, computed as k, provide as re, ref as L, watch as Z, onUnmounted as W, renderSlot as te, inject as F, openBlock as d, createElementBlock as f, normalizeClass as o, createElementVNode as u, onMounted as ve, normalizeStyle as Y, createCommentVNode as w, Fragment as O, toDisplayString as C, renderList as K, withKeys as ce, withModifiers as de, createBlock as G, unref as I, withDirectives as we, vModelText as Le, resolveDynamicComponent as me, createTextVNode as se, Teleport as Ie, createVNode as Q, useSlots as Ee, withCtx as Me } from "vue";
|
|
2
|
+
import { NOOP_TRACKING as ue, TrackingClient as qe } from "@opendoor/partner-sdk-client-js-core/internal/tracking";
|
|
3
|
+
import { resolveAppearance as Se } from "@opendoor/partner-sdk-client-js-core";
|
|
4
|
+
import { OpendoorClient as Gr, THEMES as Or, resolveAppearance as jr } from "@opendoor/partner-sdk-client-js-core";
|
|
5
|
+
import { createDtcOnboardingFlow as fe } from "@opendoor/partner-sdk-client-js-core/internal/questionnaire";
|
|
6
|
+
const Ar = /* @__PURE__ */ x({
|
|
7
7
|
__name: "OpendoorProvider",
|
|
8
8
|
props: {
|
|
9
9
|
client: {}
|
|
10
10
|
},
|
|
11
11
|
setup(e) {
|
|
12
|
-
const t = e,
|
|
13
|
-
|
|
14
|
-
const
|
|
15
|
-
return
|
|
12
|
+
const t = e, a = k(() => t.client);
|
|
13
|
+
re("opendoor-client", a);
|
|
14
|
+
const r = L(ue);
|
|
15
|
+
return re("opendoor-tracking", r), Z(
|
|
16
16
|
() => t.client,
|
|
17
17
|
() => {
|
|
18
|
-
|
|
19
|
-
const
|
|
20
|
-
|
|
18
|
+
r.value !== ue && r.value.destroy();
|
|
19
|
+
const n = new qe(t.client.environment);
|
|
20
|
+
r.value = n;
|
|
21
21
|
},
|
|
22
22
|
{ immediate: !0 }
|
|
23
|
-
),
|
|
24
|
-
|
|
25
|
-
}), (
|
|
23
|
+
), W(() => {
|
|
24
|
+
r.value !== ue && r.value.destroy();
|
|
25
|
+
}), (n, s) => te(n.$slots, "default");
|
|
26
26
|
}
|
|
27
27
|
});
|
|
28
|
-
function
|
|
29
|
-
const e =
|
|
28
|
+
function Ae() {
|
|
29
|
+
const e = F("opendoor-client");
|
|
30
30
|
if (!e)
|
|
31
31
|
throw new Error(
|
|
32
32
|
"useOpendoorClient must be used within an <OpendoorProvider>"
|
|
33
33
|
);
|
|
34
34
|
return e;
|
|
35
35
|
}
|
|
36
|
-
function
|
|
37
|
-
const t =
|
|
38
|
-
for (const [
|
|
39
|
-
const
|
|
40
|
-
|
|
36
|
+
function ae(e) {
|
|
37
|
+
const t = Se(e), a = {};
|
|
38
|
+
for (const [r, n] of Object.entries(t)) {
|
|
39
|
+
const s = r.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
40
|
+
a[`--od-${s}`] = n;
|
|
41
41
|
}
|
|
42
|
-
return
|
|
42
|
+
return a;
|
|
43
43
|
}
|
|
44
|
-
const
|
|
44
|
+
const Te = /* @__PURE__ */ x({
|
|
45
45
|
__name: "PoweredByOpendoor",
|
|
46
46
|
setup(e) {
|
|
47
|
-
return (t,
|
|
48
|
-
class:
|
|
47
|
+
return (t, a) => (d(), f("div", {
|
|
48
|
+
class: o(t.$style.attribution),
|
|
49
49
|
"data-testid": "od-attribution"
|
|
50
50
|
}, [
|
|
51
|
-
|
|
52
|
-
class:
|
|
51
|
+
u("span", {
|
|
52
|
+
class: o(t.$style.text)
|
|
53
53
|
}, "Powered by", 2),
|
|
54
|
-
|
|
54
|
+
a[0] || (a[0] = u("svg", {
|
|
55
55
|
width: "75",
|
|
56
56
|
height: "16",
|
|
57
57
|
viewBox: "0 0 112.574 24.0002",
|
|
@@ -60,24 +60,24 @@ const qe = /* @__PURE__ */ S({
|
|
|
60
60
|
"aria-label": "Opendoor",
|
|
61
61
|
role: "img"
|
|
62
62
|
}, [
|
|
63
|
-
|
|
63
|
+
u("path", {
|
|
64
64
|
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",
|
|
65
65
|
fill: "currentColor"
|
|
66
66
|
})
|
|
67
67
|
], -1))
|
|
68
68
|
], 2));
|
|
69
69
|
}
|
|
70
|
-
}), xe = "_attribution_18rgp_8",
|
|
70
|
+
}), xe = "_attribution_18rgp_8", De = "_text_18rgp_17", Be = {
|
|
71
71
|
attribution: xe,
|
|
72
|
-
text:
|
|
73
|
-
},
|
|
74
|
-
const
|
|
75
|
-
for (const [
|
|
76
|
-
|
|
77
|
-
return
|
|
78
|
-
},
|
|
79
|
-
$style:
|
|
80
|
-
},
|
|
72
|
+
text: De
|
|
73
|
+
}, B = (e, t) => {
|
|
74
|
+
const a = e.__vccOpts || e;
|
|
75
|
+
for (const [r, n] of t)
|
|
76
|
+
a[r] = n;
|
|
77
|
+
return a;
|
|
78
|
+
}, Pe = {
|
|
79
|
+
$style: Be
|
|
80
|
+
}, Fe = /* @__PURE__ */ B(Te, [["__cssModules", Pe]]), Ge = ["value", "placeholder", "disabled", "aria-controls", "aria-expanded"], Oe = ["disabled", "aria-label"], je = ["id", "role", "aria-live"], Ve = ["onClick", "onKeydown"], Re = ["for"], He = ["id", "value", "disabled"], Ne = ["for"], Ze = ["id", "value", "disabled"], Ue = ["for"], ze = ["id", "value", "disabled"], We = ["for"], Ke = ["id", "value", "disabled"], Xe = ["for"], Je = ["id", "value", "disabled"], Qe = ["disabled"], Ye = /* @__PURE__ */ x({
|
|
81
81
|
__name: "AddressEntry",
|
|
82
82
|
props: {
|
|
83
83
|
enableAddressSuggestions: { type: Boolean, default: !0 },
|
|
@@ -92,229 +92,229 @@ const qe = /* @__PURE__ */ S({
|
|
|
92
92
|
},
|
|
93
93
|
emits: ["address-select", "ready", "change", "validation-error", "address-suggestions-start", "address-suggestions-complete", "error"],
|
|
94
94
|
setup(e, { emit: t }) {
|
|
95
|
-
let
|
|
96
|
-
const
|
|
95
|
+
let a = 0;
|
|
96
|
+
const r = e, n = t, s = Ae(), i = `ae-${++a}`, l = L(""), v = L([]), p = L(!1), m = L(!1), h = L(null), y = L(!1), _ = L(!1), P = L(null), E = L(null), R = L(null), T = L({
|
|
97
97
|
street1: "",
|
|
98
98
|
street2: "",
|
|
99
99
|
city: "",
|
|
100
100
|
state: "",
|
|
101
101
|
postalCode: ""
|
|
102
|
-
}),
|
|
103
|
-
() =>
|
|
102
|
+
}), N = k(() => ae(r.appearance)), H = k(
|
|
103
|
+
() => p.value && !m.value && l.value.trim().length >= 3 && v.value.length === 0 && !y.value
|
|
104
104
|
);
|
|
105
|
-
let
|
|
106
|
-
|
|
107
|
-
if (
|
|
108
|
-
if (
|
|
109
|
-
|
|
105
|
+
let M = null, q = 0;
|
|
106
|
+
Z(l, (g) => {
|
|
107
|
+
if (_.value) return;
|
|
108
|
+
if (n("change", { street1: g }), M && clearTimeout(M), !r.enableAddressSuggestions || g.trim().length < 3) {
|
|
109
|
+
q += 1, v.value = [], p.value = !1, h.value = null, m.value = !1;
|
|
110
110
|
return;
|
|
111
111
|
}
|
|
112
|
-
|
|
113
|
-
const
|
|
114
|
-
|
|
115
|
-
|
|
112
|
+
m.value = !0, h.value = null;
|
|
113
|
+
const c = g.trim(), b = ++q;
|
|
114
|
+
M = setTimeout(async () => {
|
|
115
|
+
n("address-suggestions-start", c);
|
|
116
116
|
try {
|
|
117
|
-
const $ = await
|
|
118
|
-
if (
|
|
119
|
-
|
|
117
|
+
const $ = await s.value.getAddressSuggestions(c);
|
|
118
|
+
if (b !== q) return;
|
|
119
|
+
v.value = $.addresses, p.value = !0, n("address-suggestions-complete", $.addresses);
|
|
120
120
|
} catch ($) {
|
|
121
|
-
if (
|
|
122
|
-
const
|
|
123
|
-
|
|
121
|
+
if (b !== q) return;
|
|
122
|
+
const S = $ instanceof Error ? $ : new Error("Failed to fetch address suggestions");
|
|
123
|
+
h.value = S.message, v.value = [], p.value = !0, n("error", S);
|
|
124
124
|
} finally {
|
|
125
|
-
|
|
125
|
+
b === q && (m.value = !1);
|
|
126
126
|
}
|
|
127
|
-
},
|
|
127
|
+
}, r.debounceMs);
|
|
128
128
|
});
|
|
129
|
-
function
|
|
130
|
-
const
|
|
131
|
-
return
|
|
129
|
+
function X(g) {
|
|
130
|
+
const c = [g.street1];
|
|
131
|
+
return g.street2 && (c[0] += ` ${g.street2}`), c.push(`${g.city}, ${g.state} ${g.postalCode}`), c.join(", ");
|
|
132
132
|
}
|
|
133
|
-
async function
|
|
134
|
-
|
|
133
|
+
async function U(g) {
|
|
134
|
+
_.value = !0, l.value = X(g), v.value = [], p.value = !1, h.value = null, n("change", g);
|
|
135
135
|
try {
|
|
136
|
-
|
|
137
|
-
} catch (
|
|
138
|
-
const
|
|
139
|
-
|
|
136
|
+
n("address-select", g);
|
|
137
|
+
} catch (c) {
|
|
138
|
+
const b = c instanceof Error ? c : new Error("Failed to process address");
|
|
139
|
+
h.value = b.message, n("error", b), l.value = "", _.value = !1;
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
|
-
function
|
|
143
|
-
|
|
142
|
+
function ne() {
|
|
143
|
+
y.value = !0, p.value = !1;
|
|
144
144
|
}
|
|
145
|
-
function
|
|
146
|
-
|
|
147
|
-
const
|
|
148
|
-
|
|
149
|
-
street1:
|
|
150
|
-
...
|
|
151
|
-
city:
|
|
152
|
-
state:
|
|
153
|
-
postalCode:
|
|
145
|
+
function z(g, c) {
|
|
146
|
+
T.value[g] = c;
|
|
147
|
+
const b = T.value;
|
|
148
|
+
n("change", {
|
|
149
|
+
street1: b.street1,
|
|
150
|
+
...b.street2 ? { street2: b.street2 } : {},
|
|
151
|
+
city: b.city,
|
|
152
|
+
state: b.state,
|
|
153
|
+
postalCode: b.postalCode
|
|
154
154
|
});
|
|
155
155
|
}
|
|
156
156
|
async function j() {
|
|
157
|
-
const
|
|
158
|
-
if (!
|
|
159
|
-
const
|
|
160
|
-
|
|
157
|
+
const g = T.value.street1.trim(), c = T.value.city.trim(), b = T.value.state.trim(), $ = T.value.postalCode.trim(), S = T.value.street2.trim();
|
|
158
|
+
if (!g || !c || !b || !$) {
|
|
159
|
+
const A = "Please fill in all required fields";
|
|
160
|
+
h.value = A, n("validation-error", A);
|
|
161
161
|
return;
|
|
162
162
|
}
|
|
163
|
-
|
|
163
|
+
m.value = !0, h.value = null;
|
|
164
164
|
try {
|
|
165
|
-
|
|
166
|
-
street1:
|
|
167
|
-
street2:
|
|
168
|
-
city:
|
|
169
|
-
state:
|
|
165
|
+
n("address-select", {
|
|
166
|
+
street1: g,
|
|
167
|
+
street2: S || void 0,
|
|
168
|
+
city: c,
|
|
169
|
+
state: b,
|
|
170
170
|
postalCode: $
|
|
171
171
|
});
|
|
172
|
-
} catch (
|
|
173
|
-
const V =
|
|
174
|
-
|
|
172
|
+
} catch (A) {
|
|
173
|
+
const V = A instanceof Error ? A : new Error("Failed to submit address");
|
|
174
|
+
h.value = V.message, n("error", V);
|
|
175
175
|
} finally {
|
|
176
|
-
|
|
176
|
+
m.value = !1;
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
|
-
function
|
|
180
|
-
|
|
179
|
+
function le() {
|
|
180
|
+
v.value.length > 0 && U(v.value[0]);
|
|
181
181
|
}
|
|
182
|
-
function
|
|
183
|
-
|
|
182
|
+
function J() {
|
|
183
|
+
v.value.length > 0 && l.value.length > 0 && (p.value = !0);
|
|
184
184
|
}
|
|
185
|
-
function
|
|
186
|
-
const
|
|
187
|
-
|
|
185
|
+
function ie(g) {
|
|
186
|
+
const c = g.target.value;
|
|
187
|
+
l.value = c, _.value = !1;
|
|
188
188
|
}
|
|
189
|
-
function
|
|
190
|
-
E.value && !E.value.contains(
|
|
189
|
+
function ee(g) {
|
|
190
|
+
E.value && !E.value.contains(g.target) && R.value && !R.value.contains(g.target) && (p.value = !1);
|
|
191
191
|
}
|
|
192
192
|
return ve(() => {
|
|
193
|
-
document.addEventListener("mousedown",
|
|
194
|
-
}),
|
|
195
|
-
document.removeEventListener("mousedown",
|
|
196
|
-
}), (
|
|
193
|
+
document.addEventListener("mousedown", ee), n("ready");
|
|
194
|
+
}), W(() => {
|
|
195
|
+
document.removeEventListener("mousedown", ee), M && clearTimeout(M), q += 1;
|
|
196
|
+
}), (g, c) => (d(), f("div", {
|
|
197
197
|
ref_key: "containerRef",
|
|
198
198
|
ref: P,
|
|
199
|
-
class:
|
|
200
|
-
style:
|
|
199
|
+
class: o(g.$style.container),
|
|
200
|
+
style: Y(N.value)
|
|
201
201
|
}, [
|
|
202
|
-
|
|
202
|
+
y.value ? (d(), f("div", {
|
|
203
203
|
key: 1,
|
|
204
|
-
class:
|
|
204
|
+
class: o(g.$style.manualForm)
|
|
205
205
|
}, [
|
|
206
|
-
|
|
207
|
-
class:
|
|
206
|
+
u("div", {
|
|
207
|
+
class: o(g.$style.manualFormField)
|
|
208
208
|
}, [
|
|
209
|
-
|
|
210
|
-
class:
|
|
211
|
-
for: `${
|
|
212
|
-
}, "Street Address *", 10,
|
|
213
|
-
|
|
214
|
-
id: `${
|
|
215
|
-
class:
|
|
209
|
+
u("label", {
|
|
210
|
+
class: o(g.$style.manualFormLabel),
|
|
211
|
+
for: `${i}-street1`
|
|
212
|
+
}, "Street Address *", 10, Re),
|
|
213
|
+
u("input", {
|
|
214
|
+
id: `${i}-street1`,
|
|
215
|
+
class: o(g.$style.manualFormInput),
|
|
216
216
|
type: "text",
|
|
217
|
-
value:
|
|
217
|
+
value: T.value.street1,
|
|
218
218
|
disabled: e.disabled,
|
|
219
219
|
placeholder: "123 Main St",
|
|
220
|
-
onInput:
|
|
221
|
-
}, null, 42,
|
|
220
|
+
onInput: c[0] || (c[0] = (b) => z("street1", b.target.value))
|
|
221
|
+
}, null, 42, He)
|
|
222
222
|
], 2),
|
|
223
|
-
|
|
224
|
-
class:
|
|
223
|
+
u("div", {
|
|
224
|
+
class: o(g.$style.manualFormField)
|
|
225
225
|
}, [
|
|
226
|
-
|
|
227
|
-
class:
|
|
228
|
-
for: `${
|
|
229
|
-
}, "Unit / Apt (optional)", 10,
|
|
230
|
-
|
|
231
|
-
id: `${
|
|
232
|
-
class:
|
|
226
|
+
u("label", {
|
|
227
|
+
class: o(g.$style.manualFormLabel),
|
|
228
|
+
for: `${i}-street2`
|
|
229
|
+
}, "Unit / Apt (optional)", 10, Ne),
|
|
230
|
+
u("input", {
|
|
231
|
+
id: `${i}-street2`,
|
|
232
|
+
class: o(g.$style.manualFormInput),
|
|
233
233
|
type: "text",
|
|
234
|
-
value:
|
|
234
|
+
value: T.value.street2,
|
|
235
235
|
disabled: e.disabled,
|
|
236
236
|
placeholder: "Apt 4B",
|
|
237
|
-
onInput:
|
|
238
|
-
}, null, 42,
|
|
237
|
+
onInput: c[1] || (c[1] = (b) => z("street2", b.target.value))
|
|
238
|
+
}, null, 42, Ze)
|
|
239
239
|
], 2),
|
|
240
|
-
|
|
241
|
-
class:
|
|
240
|
+
u("div", {
|
|
241
|
+
class: o(g.$style.manualFormField)
|
|
242
242
|
}, [
|
|
243
|
-
|
|
244
|
-
class:
|
|
245
|
-
for: `${
|
|
246
|
-
}, "City *", 10,
|
|
247
|
-
|
|
248
|
-
id: `${
|
|
249
|
-
class:
|
|
243
|
+
u("label", {
|
|
244
|
+
class: o(g.$style.manualFormLabel),
|
|
245
|
+
for: `${i}-city`
|
|
246
|
+
}, "City *", 10, Ue),
|
|
247
|
+
u("input", {
|
|
248
|
+
id: `${i}-city`,
|
|
249
|
+
class: o(g.$style.manualFormInput),
|
|
250
250
|
type: "text",
|
|
251
|
-
value:
|
|
251
|
+
value: T.value.city,
|
|
252
252
|
disabled: e.disabled,
|
|
253
253
|
placeholder: "Austin",
|
|
254
|
-
onInput:
|
|
255
|
-
}, null, 42,
|
|
254
|
+
onInput: c[2] || (c[2] = (b) => z("city", b.target.value))
|
|
255
|
+
}, null, 42, ze)
|
|
256
256
|
], 2),
|
|
257
|
-
|
|
258
|
-
class:
|
|
257
|
+
u("div", {
|
|
258
|
+
class: o(g.$style.formRow)
|
|
259
259
|
}, [
|
|
260
|
-
|
|
261
|
-
class:
|
|
260
|
+
u("div", {
|
|
261
|
+
class: o(g.$style.manualFormField)
|
|
262
262
|
}, [
|
|
263
|
-
|
|
264
|
-
class:
|
|
265
|
-
for: `${
|
|
266
|
-
}, "State *", 10,
|
|
267
|
-
|
|
268
|
-
id: `${
|
|
269
|
-
class:
|
|
263
|
+
u("label", {
|
|
264
|
+
class: o(g.$style.manualFormLabel),
|
|
265
|
+
for: `${i}-state`
|
|
266
|
+
}, "State *", 10, We),
|
|
267
|
+
u("input", {
|
|
268
|
+
id: `${i}-state`,
|
|
269
|
+
class: o(g.$style.manualFormInput),
|
|
270
270
|
type: "text",
|
|
271
|
-
value:
|
|
271
|
+
value: T.value.state,
|
|
272
272
|
disabled: e.disabled,
|
|
273
273
|
placeholder: "TX",
|
|
274
274
|
maxlength: "2",
|
|
275
|
-
onInput:
|
|
276
|
-
}, null, 42,
|
|
275
|
+
onInput: c[3] || (c[3] = (b) => z("state", b.target.value))
|
|
276
|
+
}, null, 42, Ke)
|
|
277
277
|
], 2),
|
|
278
|
-
|
|
279
|
-
class:
|
|
278
|
+
u("div", {
|
|
279
|
+
class: o(g.$style.manualFormField)
|
|
280
280
|
}, [
|
|
281
|
-
|
|
282
|
-
class:
|
|
283
|
-
for: `${
|
|
284
|
-
}, "ZIP Code *", 10,
|
|
285
|
-
|
|
286
|
-
id: `${
|
|
287
|
-
class:
|
|
281
|
+
u("label", {
|
|
282
|
+
class: o(g.$style.manualFormLabel),
|
|
283
|
+
for: `${i}-postalCode`
|
|
284
|
+
}, "ZIP Code *", 10, Xe),
|
|
285
|
+
u("input", {
|
|
286
|
+
id: `${i}-postalCode`,
|
|
287
|
+
class: o(g.$style.manualFormInput),
|
|
288
288
|
type: "text",
|
|
289
|
-
value:
|
|
289
|
+
value: T.value.postalCode,
|
|
290
290
|
disabled: e.disabled,
|
|
291
291
|
placeholder: "78701",
|
|
292
292
|
maxlength: "5",
|
|
293
|
-
onInput:
|
|
294
|
-
}, null, 42,
|
|
293
|
+
onInput: c[4] || (c[4] = (b) => z("postalCode", b.target.value))
|
|
294
|
+
}, null, 42, Je)
|
|
295
295
|
], 2)
|
|
296
296
|
], 2),
|
|
297
|
-
|
|
297
|
+
h.value ? (d(), f("div", {
|
|
298
298
|
key: 0,
|
|
299
|
-
class:
|
|
299
|
+
class: o(g.$style.error),
|
|
300
300
|
role: "alert"
|
|
301
|
-
}, C(
|
|
302
|
-
|
|
303
|
-
class:
|
|
301
|
+
}, C(h.value), 3)) : w("", !0),
|
|
302
|
+
u("button", {
|
|
303
|
+
class: o(g.$style.submitButton),
|
|
304
304
|
type: "button",
|
|
305
305
|
disabled: e.disabled,
|
|
306
306
|
onClick: j
|
|
307
307
|
}, [
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
308
|
+
u("span", null, C(e.buttonText), 1),
|
|
309
|
+
te(g.$slots, "button-icon", {}, () => [
|
|
310
|
+
c[8] || (c[8] = u("svg", {
|
|
311
311
|
width: "20",
|
|
312
312
|
height: "20",
|
|
313
313
|
viewBox: "0 0 24 24",
|
|
314
314
|
fill: "none",
|
|
315
315
|
xmlns: "http://www.w3.org/2000/svg"
|
|
316
316
|
}, [
|
|
317
|
-
|
|
317
|
+
u("path", {
|
|
318
318
|
d: "M5 12h14m-7-7l7 7-7 7",
|
|
319
319
|
stroke: "currentColor",
|
|
320
320
|
"stroke-width": "2",
|
|
@@ -323,55 +323,55 @@ const qe = /* @__PURE__ */ S({
|
|
|
323
323
|
})
|
|
324
324
|
], -1))
|
|
325
325
|
])
|
|
326
|
-
], 10,
|
|
327
|
-
], 2)) : (
|
|
326
|
+
], 10, Qe)
|
|
327
|
+
], 2)) : (d(), f("div", {
|
|
328
328
|
key: 0,
|
|
329
|
-
class:
|
|
329
|
+
class: o(g.$style.inputSection)
|
|
330
330
|
}, [
|
|
331
|
-
|
|
332
|
-
class:
|
|
331
|
+
u("div", {
|
|
332
|
+
class: o([g.$style.inputWrapper, h.value ? g.$style.errorBorder : ""])
|
|
333
333
|
}, [
|
|
334
|
-
|
|
334
|
+
u("input", {
|
|
335
335
|
ref_key: "inputRef",
|
|
336
|
-
ref:
|
|
337
|
-
value:
|
|
338
|
-
class:
|
|
336
|
+
ref: R,
|
|
337
|
+
value: l.value,
|
|
338
|
+
class: o(g.$style.input),
|
|
339
339
|
placeholder: e.placeholderText,
|
|
340
340
|
disabled: e.disabled,
|
|
341
341
|
type: "text",
|
|
342
342
|
autocomplete: "off",
|
|
343
343
|
"aria-label": "Address input",
|
|
344
344
|
"aria-autocomplete": "list",
|
|
345
|
-
"aria-controls": `${
|
|
346
|
-
"aria-expanded":
|
|
347
|
-
onInput:
|
|
348
|
-
onFocus:
|
|
349
|
-
}, null, 42,
|
|
350
|
-
|
|
345
|
+
"aria-controls": `${i}-suggestions`,
|
|
346
|
+
"aria-expanded": p.value,
|
|
347
|
+
onInput: ie,
|
|
348
|
+
onFocus: J
|
|
349
|
+
}, null, 42, Ge),
|
|
350
|
+
g.$slots["input-icon"] ? (d(), f("div", {
|
|
351
351
|
key: 0,
|
|
352
|
-
class:
|
|
352
|
+
class: o(g.$style.inputIcon)
|
|
353
353
|
}, [
|
|
354
|
-
|
|
355
|
-
], 2)) :
|
|
356
|
-
e.showButton ? (
|
|
354
|
+
te(g.$slots, "input-icon")
|
|
355
|
+
], 2)) : w("", !0),
|
|
356
|
+
e.showButton ? (d(), f("button", {
|
|
357
357
|
key: 1,
|
|
358
|
-
class:
|
|
358
|
+
class: o(g.$style.button),
|
|
359
359
|
disabled: e.disabled,
|
|
360
360
|
"aria-label": e.buttonText,
|
|
361
361
|
type: "button",
|
|
362
|
-
onClick:
|
|
362
|
+
onClick: le
|
|
363
363
|
}, [
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
(
|
|
367
|
-
class:
|
|
364
|
+
m.value ? (d(), f(O, { key: 0 }, [
|
|
365
|
+
u("span", null, C(e.buttonText), 1),
|
|
366
|
+
(d(), f("svg", {
|
|
367
|
+
class: o(g.$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
|
-
}, [...
|
|
374
|
-
|
|
373
|
+
}, [...c[5] || (c[5] = [
|
|
374
|
+
u("circle", {
|
|
375
375
|
cx: "12",
|
|
376
376
|
cy: "12",
|
|
377
377
|
r: "10",
|
|
@@ -379,24 +379,24 @@ const qe = /* @__PURE__ */ S({
|
|
|
379
379
|
"stroke-width": "4",
|
|
380
380
|
"stroke-opacity": "0.25"
|
|
381
381
|
}, null, -1),
|
|
382
|
-
|
|
382
|
+
u("path", {
|
|
383
383
|
d: "M12 2a10 10 0 0 1 10 10",
|
|
384
384
|
stroke: "currentColor",
|
|
385
385
|
"stroke-width": "4",
|
|
386
386
|
"stroke-linecap": "round"
|
|
387
387
|
}, null, -1)
|
|
388
388
|
])], 2))
|
|
389
|
-
], 64)) : (
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
389
|
+
], 64)) : (d(), f(O, { key: 1 }, [
|
|
390
|
+
u("span", null, C(e.buttonText), 1),
|
|
391
|
+
te(g.$slots, "button-icon", {}, () => [
|
|
392
|
+
c[6] || (c[6] = u("svg", {
|
|
393
393
|
width: "20",
|
|
394
394
|
height: "20",
|
|
395
395
|
viewBox: "0 0 24 24",
|
|
396
396
|
fill: "none",
|
|
397
397
|
xmlns: "http://www.w3.org/2000/svg"
|
|
398
398
|
}, [
|
|
399
|
-
|
|
399
|
+
u("path", {
|
|
400
400
|
d: "M5 12h14m-7-7l7 7-7 7",
|
|
401
401
|
stroke: "currentColor",
|
|
402
402
|
"stroke-width": "2",
|
|
@@ -406,38 +406,38 @@ const qe = /* @__PURE__ */ S({
|
|
|
406
406
|
], -1))
|
|
407
407
|
])
|
|
408
408
|
], 64))
|
|
409
|
-
], 10,
|
|
409
|
+
], 10, Oe)) : w("", !0)
|
|
410
410
|
], 2),
|
|
411
|
-
|
|
411
|
+
p.value || h.value ? (d(), f("div", {
|
|
412
412
|
key: 0,
|
|
413
413
|
ref_key: "suggestionsRef",
|
|
414
414
|
ref: E,
|
|
415
|
-
class:
|
|
416
|
-
id: `${
|
|
417
|
-
role:
|
|
418
|
-
"aria-live":
|
|
415
|
+
class: o([g.$style.suggestions, h.value ? g.$style.errorState : ""]),
|
|
416
|
+
id: `${i}-suggestions`,
|
|
417
|
+
role: h.value ? "alert" : "listbox",
|
|
418
|
+
"aria-live": h.value ? "polite" : void 0
|
|
419
419
|
}, [
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
class:
|
|
420
|
+
h.value ? (d(), f(O, { key: 0 }, [
|
|
421
|
+
u("div", {
|
|
422
|
+
class: o(g.$style.error)
|
|
423
423
|
}, [
|
|
424
|
-
|
|
425
|
-
class:
|
|
426
|
-
}, [...
|
|
427
|
-
|
|
424
|
+
u("div", {
|
|
425
|
+
class: o(g.$style.errorIcon)
|
|
426
|
+
}, [...c[7] || (c[7] = [
|
|
427
|
+
u("svg", {
|
|
428
428
|
width: "20",
|
|
429
429
|
height: "20",
|
|
430
430
|
viewBox: "0 0 24 24",
|
|
431
431
|
fill: "none"
|
|
432
432
|
}, [
|
|
433
|
-
|
|
433
|
+
u("circle", {
|
|
434
434
|
cx: "12",
|
|
435
435
|
cy: "12",
|
|
436
436
|
r: "10",
|
|
437
437
|
stroke: "currentColor",
|
|
438
438
|
"stroke-width": "2"
|
|
439
439
|
}),
|
|
440
|
-
|
|
440
|
+
u("path", {
|
|
441
441
|
d: "M12 8v4M12 16h.01",
|
|
442
442
|
stroke: "currentColor",
|
|
443
443
|
"stroke-width": "2",
|
|
@@ -445,69 +445,69 @@ const qe = /* @__PURE__ */ S({
|
|
|
445
445
|
})
|
|
446
446
|
], -1)
|
|
447
447
|
])], 2),
|
|
448
|
-
|
|
448
|
+
u("div", null, C(h.value), 1)
|
|
449
449
|
], 2),
|
|
450
|
-
|
|
450
|
+
y.value ? w("", !0) : (d(), f("button", {
|
|
451
451
|
key: 0,
|
|
452
452
|
type: "button",
|
|
453
|
-
class:
|
|
454
|
-
onClick:
|
|
453
|
+
class: o(g.$style.manualLink),
|
|
454
|
+
onClick: ne
|
|
455
455
|
}, C(e.manualEntryText), 3))
|
|
456
|
-
], 64)) :
|
|
457
|
-
key: `${
|
|
458
|
-
class:
|
|
456
|
+
], 64)) : v.value.length > 0 ? (d(!0), f(O, { key: 1 }, K(v.value, (b, $) => (d(), f("div", {
|
|
457
|
+
key: `${b.street1}-${b.city}-${b.postalCode}-${$}`,
|
|
458
|
+
class: o(g.$style.suggestion),
|
|
459
459
|
role: "option",
|
|
460
460
|
"aria-selected": !1,
|
|
461
461
|
tabindex: "0",
|
|
462
|
-
onClick: (
|
|
462
|
+
onClick: (S) => U(b),
|
|
463
463
|
onKeydown: [
|
|
464
|
-
ce(de((
|
|
465
|
-
ce(de((
|
|
464
|
+
ce(de((S) => U(b), ["prevent"]), ["enter"]),
|
|
465
|
+
ce(de((S) => U(b), ["prevent"]), ["space"])
|
|
466
466
|
]
|
|
467
|
-
}, C(
|
|
467
|
+
}, C(X(b)), 43, Ve))), 128)) : H.value ? (d(), f("button", {
|
|
468
468
|
key: 2,
|
|
469
469
|
type: "button",
|
|
470
|
-
class:
|
|
471
|
-
onClick:
|
|
472
|
-
}, C(e.manualEntryText), 3)) :
|
|
473
|
-
], 10,
|
|
470
|
+
class: o(g.$style.manualLink),
|
|
471
|
+
onClick: ne
|
|
472
|
+
}, C(e.manualEntryText), 3)) : w("", !0)
|
|
473
|
+
], 10, je)) : w("", !0)
|
|
474
474
|
], 2)),
|
|
475
|
-
e.showAttribution ? (
|
|
475
|
+
e.showAttribution ? (d(), G(Fe, { key: 2 })) : w("", !0)
|
|
476
476
|
], 6));
|
|
477
477
|
}
|
|
478
|
-
}),
|
|
479
|
-
container:
|
|
480
|
-
inputSection:
|
|
481
|
-
inputWrapper:
|
|
482
|
-
input:
|
|
483
|
-
inputIcon:
|
|
484
|
-
button:
|
|
485
|
-
spinner:
|
|
486
|
-
spin:
|
|
487
|
-
suggestions:
|
|
488
|
-
errorState:
|
|
489
|
-
suggestion:
|
|
490
|
-
error:
|
|
491
|
-
errorIcon:
|
|
492
|
-
errorBorder:
|
|
493
|
-
manualLink:
|
|
494
|
-
manualForm:
|
|
495
|
-
slideIn:
|
|
496
|
-
manualFormField:
|
|
497
|
-
manualFormLabel:
|
|
498
|
-
manualFormInput:
|
|
499
|
-
formRow:
|
|
500
|
-
submitButton:
|
|
501
|
-
},
|
|
502
|
-
$style:
|
|
503
|
-
},
|
|
504
|
-
function
|
|
505
|
-
return e.startsWith("http://") || e.startsWith("https://") ? `url-${encodeURIComponent(e)}(${t},${
|
|
478
|
+
}), et = "_container_1r0nf_9", tt = "_inputSection_1r0nf_17", nt = "_inputWrapper_1r0nf_23", ot = "_input_1r0nf_17", st = "_inputIcon_1r0nf_64", rt = "_button_1r0nf_81", at = "_spinner_1r0nf_122", lt = "_spin_1r0nf_122", it = "_suggestions_1r0nf_137", ut = "_errorState_1r0nf_151", ct = "_suggestion_1r0nf_137", dt = "_error_1r0nf_151", vt = "_errorIcon_1r0nf_200", pt = "_errorBorder_1r0nf_214", yt = "_manualLink_1r0nf_224", ft = "_manualForm_1r0nf_246", gt = "_slideIn_1r0nf_1", ht = "_manualFormField_1r0nf_261", mt = "_manualFormLabel_1r0nf_265", bt = "_manualFormInput_1r0nf_274", $t = "_formRow_1r0nf_295", Ct = "_submitButton_1r0nf_303", kt = {
|
|
479
|
+
container: et,
|
|
480
|
+
inputSection: tt,
|
|
481
|
+
inputWrapper: nt,
|
|
482
|
+
input: ot,
|
|
483
|
+
inputIcon: st,
|
|
484
|
+
button: rt,
|
|
485
|
+
spinner: at,
|
|
486
|
+
spin: lt,
|
|
487
|
+
suggestions: it,
|
|
488
|
+
errorState: ut,
|
|
489
|
+
suggestion: ct,
|
|
490
|
+
error: dt,
|
|
491
|
+
errorIcon: vt,
|
|
492
|
+
errorBorder: pt,
|
|
493
|
+
manualLink: yt,
|
|
494
|
+
manualForm: ft,
|
|
495
|
+
slideIn: gt,
|
|
496
|
+
manualFormField: ht,
|
|
497
|
+
manualFormLabel: mt,
|
|
498
|
+
manualFormInput: bt,
|
|
499
|
+
formRow: $t,
|
|
500
|
+
submitButton: Ct
|
|
501
|
+
}, _t = {
|
|
502
|
+
$style: kt
|
|
503
|
+
}, Tr = /* @__PURE__ */ B(Ye, [["__cssModules", _t]]), wt = "https://api.mapbox.com/geocoding/v5/mapbox.places", Lt = "https://api.mapbox.com/styles/v1/mapbox/light-v11/static", It = "pk.eyJ1Ijoib3BlbmRvb3IiLCJhIjoiWXJ2bTJiRSJ9.lsnjT9yTNyyVzKRIzqxnqg", Et = "https://images.opendoor.com/source/s3/imgdrop-production/2026-02-1771546296495-06570.png?service=partner-sdk";
|
|
504
|
+
function Mt(e, t, a) {
|
|
505
|
+
return e.startsWith("http://") || e.startsWith("https://") ? `url-${encodeURIComponent(e)}(${t},${a})` : `${e}(${t},${a})`;
|
|
506
506
|
}
|
|
507
|
-
function
|
|
508
|
-
const
|
|
509
|
-
let
|
|
510
|
-
return
|
|
507
|
+
function qt(e, t) {
|
|
508
|
+
const a = (t == null ? void 0 : t.mapboxAccessToken) ?? It, r = (t == null ? void 0 : t.mapPinMarker) ?? Et, n = (t == null ? void 0 : t.width) ?? 640, s = (t == null ? void 0 : t.height) ?? 320, i = (t == null ? void 0 : t.zoom) ?? 14, l = L(void 0), v = L("loading");
|
|
509
|
+
let p = null;
|
|
510
|
+
return Z(
|
|
511
511
|
() => [
|
|
512
512
|
e.value.street1,
|
|
513
513
|
e.value.city,
|
|
@@ -515,42 +515,42 @@ function Et(e, t) {
|
|
|
515
515
|
e.value.postalCode
|
|
516
516
|
],
|
|
517
517
|
async () => {
|
|
518
|
-
var
|
|
519
|
-
|
|
520
|
-
const
|
|
521
|
-
|
|
522
|
-
const
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
518
|
+
var _, P;
|
|
519
|
+
p && p.abort();
|
|
520
|
+
const m = new AbortController();
|
|
521
|
+
p = m, v.value = "loading";
|
|
522
|
+
const h = e.value, y = [
|
|
523
|
+
h.street1,
|
|
524
|
+
h.city,
|
|
525
|
+
h.state,
|
|
526
|
+
h.postalCode
|
|
527
527
|
].join(" ");
|
|
528
528
|
try {
|
|
529
|
-
const E = `${
|
|
530
|
-
if (!
|
|
531
|
-
|
|
529
|
+
const E = `${wt}/${encodeURIComponent(y)}.json?access_token=${a}&limit=1`, R = await fetch(E, { signal: m.signal });
|
|
530
|
+
if (!R.ok) {
|
|
531
|
+
m.signal.aborted || (v.value = "error");
|
|
532
532
|
return;
|
|
533
533
|
}
|
|
534
|
-
const
|
|
535
|
-
if (
|
|
536
|
-
const
|
|
537
|
-
if (!
|
|
538
|
-
|
|
534
|
+
const T = await R.json();
|
|
535
|
+
if (m.signal.aborted) return;
|
|
536
|
+
const N = (P = (_ = T.features) == null ? void 0 : _[0]) == null ? void 0 : P.center;
|
|
537
|
+
if (!N) {
|
|
538
|
+
v.value = "error";
|
|
539
539
|
return;
|
|
540
540
|
}
|
|
541
|
-
const [
|
|
542
|
-
|
|
541
|
+
const [H, M] = N, q = Mt(r, H, M);
|
|
542
|
+
l.value = `${Lt}/${q}/${H},${M},${i}/${n}x${s}@2x?access_token=${a}&attribution=false&logo=false`, v.value = "loaded";
|
|
543
543
|
} catch (E) {
|
|
544
544
|
if (E instanceof DOMException && E.name === "AbortError") return;
|
|
545
|
-
|
|
545
|
+
m.signal.aborted || (v.value = "error");
|
|
546
546
|
}
|
|
547
547
|
},
|
|
548
548
|
{ immediate: !0 }
|
|
549
|
-
),
|
|
550
|
-
|
|
551
|
-
}), { url:
|
|
549
|
+
), W(() => {
|
|
550
|
+
p && p.abort();
|
|
551
|
+
}), { url: l, status: v };
|
|
552
552
|
}
|
|
553
|
-
const
|
|
553
|
+
const St = ["src"], At = /* @__PURE__ */ x({
|
|
554
554
|
__name: "AddressMap",
|
|
555
555
|
props: {
|
|
556
556
|
address: {},
|
|
@@ -564,45 +564,45 @@ const Mt = ["src"], Tt = /* @__PURE__ */ S({
|
|
|
564
564
|
},
|
|
565
565
|
emits: ["load", "error"],
|
|
566
566
|
setup(e, { emit: t }) {
|
|
567
|
-
const
|
|
568
|
-
const
|
|
569
|
-
return
|
|
570
|
-
}), { url:
|
|
571
|
-
k(() =>
|
|
567
|
+
const a = e, r = t, n = k(() => {
|
|
568
|
+
const p = ae(a.appearance);
|
|
569
|
+
return a.borderRadius && (p["border-radius"] = a.borderRadius), p;
|
|
570
|
+
}), { url: s, status: i } = qt(
|
|
571
|
+
k(() => a.address),
|
|
572
572
|
{
|
|
573
|
-
mapboxAccessToken:
|
|
574
|
-
mapPinMarker:
|
|
575
|
-
width:
|
|
576
|
-
height:
|
|
577
|
-
zoom:
|
|
573
|
+
mapboxAccessToken: a.mapboxAccessToken,
|
|
574
|
+
mapPinMarker: a.mapPinMarker,
|
|
575
|
+
width: a.width,
|
|
576
|
+
height: a.height,
|
|
577
|
+
zoom: a.zoom
|
|
578
578
|
}
|
|
579
|
-
),
|
|
580
|
-
|
|
581
|
-
|
|
579
|
+
), l = L(!1);
|
|
580
|
+
Z(i, (p) => {
|
|
581
|
+
p === "loading" && (l.value = !1), p === "error" && r("error", new Error("Failed to load map for address"));
|
|
582
582
|
});
|
|
583
|
-
function
|
|
584
|
-
|
|
583
|
+
function v() {
|
|
584
|
+
l.value = !0, r("load");
|
|
585
585
|
}
|
|
586
|
-
return (
|
|
587
|
-
class:
|
|
588
|
-
style:
|
|
586
|
+
return (p, m) => (d(), f("div", {
|
|
587
|
+
class: o(p.$style.container),
|
|
588
|
+
style: Y(n.value)
|
|
589
589
|
}, [
|
|
590
|
-
I(
|
|
590
|
+
I(s) ? (d(), f("img", {
|
|
591
591
|
key: 0,
|
|
592
|
-
src: I(
|
|
592
|
+
src: I(s),
|
|
593
593
|
alt: "Map",
|
|
594
|
-
class:
|
|
595
|
-
onLoad:
|
|
596
|
-
}, null, 42,
|
|
594
|
+
class: o([p.$style.mapImage, l.value ? p.$style.mapImageLoaded : ""]),
|
|
595
|
+
onLoad: v
|
|
596
|
+
}, null, 42, St)) : w("", !0)
|
|
597
597
|
], 6));
|
|
598
598
|
}
|
|
599
|
-
}),
|
|
600
|
-
container:
|
|
599
|
+
}), Tt = "_container_iumdj_4", xt = "_mapImage_iumdj_14", Dt = "_mapImageLoaded_iumdj_23", Bt = {
|
|
600
|
+
container: Tt,
|
|
601
601
|
mapImage: xt,
|
|
602
|
-
mapImageLoaded:
|
|
603
|
-
},
|
|
604
|
-
$style:
|
|
605
|
-
}, xr = /* @__PURE__ */
|
|
602
|
+
mapImageLoaded: Dt
|
|
603
|
+
}, Pt = {
|
|
604
|
+
$style: Bt
|
|
605
|
+
}, xr = /* @__PURE__ */ B(At, [["__cssModules", Pt]]), Ft = ["disabled", "aria-invalid", "aria-describedby"], Gt = ["checked"], Ot = /* @__PURE__ */ x({
|
|
606
606
|
__name: "AddressUnitConfirmation",
|
|
607
607
|
props: {
|
|
608
608
|
address: {},
|
|
@@ -610,236 +610,232 @@ const Mt = ["src"], Tt = /* @__PURE__ */ S({
|
|
|
610
610
|
},
|
|
611
611
|
emits: ["confirm", "edit", "ready", "error"],
|
|
612
612
|
setup(e, { emit: t }) {
|
|
613
|
-
const
|
|
614
|
-
const
|
|
615
|
-
return `${
|
|
613
|
+
const a = e, r = t, n = L(""), s = L(!1), i = L(null), l = k(() => ae(a.appearance)), v = k(() => {
|
|
614
|
+
const y = a.address;
|
|
615
|
+
return `${y.street1 + (y.street2 ? ` ${y.street2}` : "")}, ${y.city}, ${y.state} ${y.postalCode}`;
|
|
616
616
|
});
|
|
617
|
-
function
|
|
618
|
-
if (!
|
|
619
|
-
const
|
|
620
|
-
|
|
617
|
+
function p() {
|
|
618
|
+
if (!s.value && !n.value.trim()) {
|
|
619
|
+
const y = "Please enter a unit number or select 'No unit number'";
|
|
620
|
+
i.value = y, r("error", new Error(y));
|
|
621
621
|
return;
|
|
622
622
|
}
|
|
623
|
-
if (
|
|
624
|
-
const { street2:
|
|
625
|
-
|
|
623
|
+
if (i.value = null, s.value) {
|
|
624
|
+
const { street2: y, ..._ } = a.address;
|
|
625
|
+
r("confirm", _);
|
|
626
626
|
} else
|
|
627
|
-
|
|
627
|
+
r("confirm", { ...a.address, street2: n.value.trim() });
|
|
628
628
|
}
|
|
629
|
-
function
|
|
630
|
-
|
|
629
|
+
function m() {
|
|
630
|
+
s.value = !s.value, s.value && (n.value = "", i.value = null);
|
|
631
631
|
}
|
|
632
|
-
function
|
|
633
|
-
|
|
632
|
+
function h() {
|
|
633
|
+
i.value && (i.value = null);
|
|
634
634
|
}
|
|
635
635
|
return ve(() => {
|
|
636
|
-
|
|
637
|
-
}), (
|
|
638
|
-
class:
|
|
639
|
-
style:
|
|
636
|
+
r("ready");
|
|
637
|
+
}), (y, _) => (d(), f("div", {
|
|
638
|
+
class: o(y.$style.container),
|
|
639
|
+
style: Y(l.value)
|
|
640
640
|
}, [
|
|
641
|
-
|
|
642
|
-
class:
|
|
641
|
+
u("h2", {
|
|
642
|
+
class: o(y.$style.title)
|
|
643
643
|
}, "Confirm your home address", 2),
|
|
644
|
-
|
|
645
|
-
class:
|
|
644
|
+
u("div", {
|
|
645
|
+
class: o(y.$style.addressCard)
|
|
646
646
|
}, [
|
|
647
|
-
|
|
648
|
-
class:
|
|
649
|
-
}, C(
|
|
650
|
-
|
|
651
|
-
class:
|
|
647
|
+
u("span", {
|
|
648
|
+
class: o(y.$style.addressText)
|
|
649
|
+
}, C(v.value), 3),
|
|
650
|
+
u("button", {
|
|
651
|
+
class: o(y.$style.editLink),
|
|
652
652
|
type: "button",
|
|
653
|
-
onClick:
|
|
653
|
+
onClick: _[0] || (_[0] = (P) => r("edit"))
|
|
654
654
|
}, " Edit ", 2)
|
|
655
655
|
], 2),
|
|
656
|
-
|
|
657
|
-
class:
|
|
656
|
+
u("div", {
|
|
657
|
+
class: o(y.$style.fieldGroup)
|
|
658
658
|
}, [
|
|
659
|
-
|
|
660
|
-
class:
|
|
659
|
+
u("label", {
|
|
660
|
+
class: o(y.$style.fieldLabel),
|
|
661
661
|
for: "od-unit-number"
|
|
662
662
|
}, " Unit number, apt, or floor* ", 2),
|
|
663
|
-
|
|
663
|
+
we(u("input", {
|
|
664
664
|
id: "od-unit-number",
|
|
665
|
-
"onUpdate:modelValue":
|
|
666
|
-
class:
|
|
665
|
+
"onUpdate:modelValue": _[1] || (_[1] = (P) => n.value = P),
|
|
666
|
+
class: o(y.$style.input),
|
|
667
667
|
type: "text",
|
|
668
668
|
placeholder: "#1234",
|
|
669
|
-
disabled:
|
|
670
|
-
"aria-invalid":
|
|
671
|
-
"aria-describedby":
|
|
672
|
-
onInput:
|
|
673
|
-
onKeydown: ce(
|
|
674
|
-
}, null, 42,
|
|
675
|
-
[
|
|
669
|
+
disabled: s.value,
|
|
670
|
+
"aria-invalid": i.value ? !0 : void 0,
|
|
671
|
+
"aria-describedby": i.value ? "od-unit-error" : void 0,
|
|
672
|
+
onInput: h,
|
|
673
|
+
onKeydown: ce(p, ["enter"])
|
|
674
|
+
}, null, 42, Ft), [
|
|
675
|
+
[Le, n.value]
|
|
676
676
|
])
|
|
677
677
|
], 2),
|
|
678
|
-
|
|
679
|
-
class:
|
|
678
|
+
u("label", {
|
|
679
|
+
class: o(y.$style.checkboxRow)
|
|
680
680
|
}, [
|
|
681
|
-
|
|
681
|
+
u("input", {
|
|
682
682
|
type: "checkbox",
|
|
683
|
-
class:
|
|
684
|
-
checked:
|
|
685
|
-
onChange:
|
|
686
|
-
}, null, 42,
|
|
687
|
-
|
|
688
|
-
class:
|
|
683
|
+
class: o(y.$style.checkbox),
|
|
684
|
+
checked: s.value,
|
|
685
|
+
onChange: m
|
|
686
|
+
}, null, 42, Gt),
|
|
687
|
+
u("span", {
|
|
688
|
+
class: o(y.$style.checkboxLabel)
|
|
689
689
|
}, "No unit number", 2)
|
|
690
690
|
], 2),
|
|
691
|
-
|
|
691
|
+
i.value ? (d(), f("p", {
|
|
692
692
|
key: 0,
|
|
693
693
|
id: "od-unit-error",
|
|
694
|
-
class:
|
|
694
|
+
class: o(y.$style.error),
|
|
695
695
|
role: "alert"
|
|
696
|
-
}, C(
|
|
697
|
-
|
|
698
|
-
class:
|
|
696
|
+
}, C(i.value), 3)) : w("", !0),
|
|
697
|
+
u("div", {
|
|
698
|
+
class: o(y.$style.actions)
|
|
699
699
|
}, [
|
|
700
|
-
|
|
701
|
-
class:
|
|
700
|
+
u("button", {
|
|
701
|
+
class: o(y.$style.confirmButton),
|
|
702
702
|
type: "button",
|
|
703
|
-
onClick:
|
|
703
|
+
onClick: p
|
|
704
704
|
}, " Confirm address ", 2)
|
|
705
705
|
], 2)
|
|
706
706
|
], 6));
|
|
707
707
|
}
|
|
708
|
-
}),
|
|
709
|
-
container:
|
|
710
|
-
title:
|
|
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
|
|
727
|
-
const
|
|
728
|
-
e.on("answerChange", (
|
|
729
|
-
var
|
|
730
|
-
t.value = e.answers,
|
|
708
|
+
}), jt = "_container_1hik1_4", Vt = "_title_1hik1_8", Rt = "_addressCard_1hik1_17", Ht = "_addressText_1hik1_27", Nt = "_editLink_1hik1_35", Zt = "_fieldGroup_1hik1_48", Ut = "_fieldLabel_1hik1_52", zt = "_input_1hik1_61", Wt = "_checkboxRow_1hik1_85", Kt = "_checkbox_1hik1_85", Xt = "_checkboxLabel_1hik1_102", Jt = "_error_1hik1_109", Qt = "_actions_1hik1_116", Yt = "_confirmButton_1hik1_121", en = {
|
|
709
|
+
container: jt,
|
|
710
|
+
title: Vt,
|
|
711
|
+
addressCard: Rt,
|
|
712
|
+
addressText: Ht,
|
|
713
|
+
editLink: Nt,
|
|
714
|
+
fieldGroup: Zt,
|
|
715
|
+
fieldLabel: Ut,
|
|
716
|
+
input: zt,
|
|
717
|
+
checkboxRow: Wt,
|
|
718
|
+
checkbox: Kt,
|
|
719
|
+
checkboxLabel: Xt,
|
|
720
|
+
error: Jt,
|
|
721
|
+
actions: Qt,
|
|
722
|
+
confirmButton: Yt
|
|
723
|
+
}, tn = {
|
|
724
|
+
$style: en
|
|
725
|
+
}, Dr = /* @__PURE__ */ B(Ot, [["__cssModules", tn]]);
|
|
726
|
+
function ge(e, t, a, r, n, s) {
|
|
727
|
+
const i = [
|
|
728
|
+
e.on("answerChange", (l) => {
|
|
729
|
+
var v;
|
|
730
|
+
t.value = e.answers, n.value = [...e.visiblePages], l.type === "answerChange" && ((v = s.onAnswerChange) == null || v.call(s, l.key, l.value));
|
|
731
731
|
}),
|
|
732
|
-
e.on("pageChange", (
|
|
733
|
-
var
|
|
734
|
-
|
|
732
|
+
e.on("pageChange", (l) => {
|
|
733
|
+
var v;
|
|
734
|
+
l.type === "pageChange" && (a.value = l.pageId, n.value = [...e.visiblePages], r.value = {}, (v = s.onPageChange) == null || v.call(s, l.pageIndex, l.pageId));
|
|
735
735
|
}),
|
|
736
|
-
e.on("validationError", (
|
|
737
|
-
|
|
736
|
+
e.on("validationError", (l) => {
|
|
737
|
+
l.type === "validationError" && (r.value = l.errors);
|
|
738
738
|
}),
|
|
739
|
-
e.on("submit", (
|
|
740
|
-
|
|
739
|
+
e.on("submit", (l) => {
|
|
740
|
+
l.type === "submit" && s.onSubmit(l.answers);
|
|
741
741
|
})
|
|
742
742
|
];
|
|
743
|
-
return () =>
|
|
743
|
+
return () => i.forEach((l) => l());
|
|
744
744
|
}
|
|
745
|
-
function
|
|
746
|
-
var
|
|
747
|
-
let t =
|
|
745
|
+
function nn(e) {
|
|
746
|
+
var N, H;
|
|
747
|
+
let t = fe({
|
|
748
748
|
market: e.getMarket(),
|
|
749
749
|
initialAnswers: e.getInitialAnswers()
|
|
750
750
|
});
|
|
751
|
-
const
|
|
752
|
-
let
|
|
751
|
+
const a = L(t.answers), r = L(((N = t.currentPage) == null ? void 0 : N.id) ?? ""), n = L({}), s = L(t.visiblePages);
|
|
752
|
+
let i = ge(
|
|
753
753
|
t,
|
|
754
|
-
l,
|
|
755
|
-
o,
|
|
756
|
-
s,
|
|
757
754
|
a,
|
|
755
|
+
r,
|
|
756
|
+
n,
|
|
757
|
+
s,
|
|
758
758
|
e
|
|
759
759
|
);
|
|
760
|
-
(
|
|
761
|
-
var
|
|
762
|
-
|
|
763
|
-
market:
|
|
760
|
+
(H = e.onReady) == null || H.call(e), Z(e.getMarket, (M) => {
|
|
761
|
+
var q;
|
|
762
|
+
i(), t.destroy(), t = fe({
|
|
763
|
+
market: M,
|
|
764
764
|
initialAnswers: e.getInitialAnswers()
|
|
765
|
-
}),
|
|
765
|
+
}), a.value = t.answers, r.value = ((q = t.currentPage) == null ? void 0 : q.id) ?? "", n.value = {}, s.value = t.visiblePages, i = ge(
|
|
766
766
|
t,
|
|
767
|
-
l,
|
|
768
|
-
o,
|
|
769
|
-
s,
|
|
770
767
|
a,
|
|
768
|
+
r,
|
|
769
|
+
n,
|
|
770
|
+
s,
|
|
771
771
|
e
|
|
772
772
|
);
|
|
773
773
|
});
|
|
774
|
-
let
|
|
775
|
-
|
|
776
|
-
|
|
774
|
+
let l = e.getInitialAnswers();
|
|
775
|
+
Z(e.getInitialAnswers, (M) => {
|
|
776
|
+
M && M !== l && (l = M, t.setAnswers(M));
|
|
777
777
|
});
|
|
778
|
-
const
|
|
779
|
-
const
|
|
780
|
-
(
|
|
778
|
+
const v = k(() => {
|
|
779
|
+
const M = s.value.findIndex(
|
|
780
|
+
(q) => q.id === r.value
|
|
781
781
|
);
|
|
782
|
-
return
|
|
783
|
-
}),
|
|
784
|
-
() =>
|
|
785
|
-
),
|
|
782
|
+
return M >= 0 ? M : 0;
|
|
783
|
+
}), p = k(
|
|
784
|
+
() => s.value[v.value]
|
|
785
|
+
), m = k(() => r.value ? (a.value, t.getVisibleQuestionsForCurrentPage()) : []), h = k(() => s.value.length <= 1 ? 0 : Math.min(
|
|
786
786
|
1,
|
|
787
|
-
Math.max(0,
|
|
788
|
-
)),
|
|
789
|
-
() =>
|
|
790
|
-
)
|
|
791
|
-
function
|
|
792
|
-
t.setAnswer(
|
|
787
|
+
Math.max(0, v.value / (s.value.length - 1))
|
|
788
|
+
)), y = k(() => v.value === 0), _ = k(
|
|
789
|
+
() => s.value.length > 0 && v.value === s.value.length - 1
|
|
790
|
+
);
|
|
791
|
+
function P(M, q) {
|
|
792
|
+
t.setAnswer(M, q);
|
|
793
793
|
}
|
|
794
|
-
function
|
|
795
|
-
return
|
|
794
|
+
function E(M) {
|
|
795
|
+
return a.value[M];
|
|
796
796
|
}
|
|
797
|
-
function
|
|
798
|
-
var
|
|
799
|
-
const
|
|
800
|
-
if (!
|
|
797
|
+
function R() {
|
|
798
|
+
var q;
|
|
799
|
+
const M = t.goToNext();
|
|
800
|
+
if (!M.valid)
|
|
801
801
|
try {
|
|
802
|
-
(
|
|
802
|
+
(q = e.onError) == null || q.call(
|
|
803
803
|
e,
|
|
804
804
|
new Error(
|
|
805
|
-
`Validation failed: ${Object.values(
|
|
805
|
+
`Validation failed: ${Object.values(M.errors).join(", ")}`
|
|
806
806
|
)
|
|
807
807
|
);
|
|
808
|
-
} catch (
|
|
809
|
-
console.error("[DtcOnboardingFlow] onError callback threw:",
|
|
808
|
+
} catch (X) {
|
|
809
|
+
console.error("[DtcOnboardingFlow] onError callback threw:", X);
|
|
810
810
|
}
|
|
811
811
|
}
|
|
812
|
-
function
|
|
812
|
+
function T() {
|
|
813
813
|
t.goToPrev();
|
|
814
814
|
}
|
|
815
|
-
return
|
|
816
|
-
|
|
815
|
+
return W(() => {
|
|
816
|
+
i(), t.destroy();
|
|
817
817
|
}), {
|
|
818
818
|
engine: t,
|
|
819
|
-
currentPage:
|
|
820
|
-
currentPageIndex:
|
|
821
|
-
visiblePages:
|
|
822
|
-
visibleQuestions:
|
|
823
|
-
answers:
|
|
824
|
-
validationErrors:
|
|
825
|
-
progress:
|
|
826
|
-
isFirstPage:
|
|
827
|
-
isLastPage:
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
goToNext: U,
|
|
833
|
-
goToPrev: Z
|
|
819
|
+
currentPage: p,
|
|
820
|
+
currentPageIndex: v,
|
|
821
|
+
visiblePages: s,
|
|
822
|
+
visibleQuestions: m,
|
|
823
|
+
answers: a,
|
|
824
|
+
validationErrors: n,
|
|
825
|
+
progress: h,
|
|
826
|
+
isFirstPage: y,
|
|
827
|
+
isLastPage: _,
|
|
828
|
+
setAnswer: P,
|
|
829
|
+
getAnswer: E,
|
|
830
|
+
goToNext: R,
|
|
831
|
+
goToPrev: T
|
|
834
832
|
};
|
|
835
833
|
}
|
|
836
|
-
const
|
|
834
|
+
const on = /* @__PURE__ */ x({
|
|
837
835
|
__name: "DtcProvider",
|
|
838
836
|
props: {
|
|
839
837
|
market: {},
|
|
840
838
|
initialAnswers: {},
|
|
841
|
-
smsConsentText: {},
|
|
842
|
-
contactConsentText: {},
|
|
843
839
|
onSubmit: { type: Function },
|
|
844
840
|
onPageChange: { type: Function },
|
|
845
841
|
onAnswerChange: { type: Function },
|
|
@@ -847,32 +843,30 @@ const tn = /* @__PURE__ */ S({
|
|
|
847
843
|
onError: { type: Function }
|
|
848
844
|
},
|
|
849
845
|
setup(e) {
|
|
850
|
-
const t = e,
|
|
846
|
+
const t = e, a = nn({
|
|
851
847
|
getMarket: () => t.market,
|
|
852
848
|
getInitialAnswers: () => t.initialAnswers,
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
var a;
|
|
858
|
-
return (a = t.onPageChange) == null ? void 0 : a.call(t, o, s);
|
|
849
|
+
onSubmit: (r) => t.onSubmit(r),
|
|
850
|
+
onPageChange: (r, n) => {
|
|
851
|
+
var s;
|
|
852
|
+
return (s = t.onPageChange) == null ? void 0 : s.call(t, r, n);
|
|
859
853
|
},
|
|
860
|
-
onAnswerChange: (
|
|
861
|
-
var
|
|
862
|
-
return (
|
|
854
|
+
onAnswerChange: (r, n) => {
|
|
855
|
+
var s;
|
|
856
|
+
return (s = t.onAnswerChange) == null ? void 0 : s.call(t, r, n);
|
|
863
857
|
},
|
|
864
858
|
onReady: () => {
|
|
865
|
-
var
|
|
866
|
-
return (
|
|
859
|
+
var r;
|
|
860
|
+
return (r = t.onReady) == null ? void 0 : r.call(t);
|
|
867
861
|
},
|
|
868
|
-
onError: (
|
|
869
|
-
var
|
|
870
|
-
return (
|
|
862
|
+
onError: (r) => {
|
|
863
|
+
var n;
|
|
864
|
+
return (n = t.onError) == null ? void 0 : n.call(t, r);
|
|
871
865
|
}
|
|
872
866
|
});
|
|
873
|
-
return
|
|
867
|
+
return re("dtc-onboarding", a), (r, n) => te(r.$slots, "default");
|
|
874
868
|
}
|
|
875
|
-
}),
|
|
869
|
+
}), sn = ["src"], rn = /* @__PURE__ */ x({
|
|
876
870
|
__name: "DtcHeader",
|
|
877
871
|
props: {
|
|
878
872
|
partnerLogoUrl: {},
|
|
@@ -880,20 +874,20 @@ const tn = /* @__PURE__ */ S({
|
|
|
880
874
|
},
|
|
881
875
|
emits: ["close"],
|
|
882
876
|
setup(e, { emit: t }) {
|
|
883
|
-
const
|
|
884
|
-
return (
|
|
885
|
-
class:
|
|
877
|
+
const a = t;
|
|
878
|
+
return (r, n) => (d(), f("header", {
|
|
879
|
+
class: o(r.$style.header)
|
|
886
880
|
}, [
|
|
887
|
-
|
|
888
|
-
class:
|
|
881
|
+
u("div", {
|
|
882
|
+
class: o(r.$style.headerLogos)
|
|
889
883
|
}, [
|
|
890
|
-
e.partnerLogoUrl ? (
|
|
884
|
+
e.partnerLogoUrl ? (d(), f("img", {
|
|
891
885
|
key: 0,
|
|
892
886
|
src: e.partnerLogoUrl,
|
|
893
887
|
alt: "Partner",
|
|
894
|
-
class:
|
|
895
|
-
}, null, 10,
|
|
896
|
-
(
|
|
888
|
+
class: o(r.$style.headerPartnerLogo)
|
|
889
|
+
}, null, 10, sn)) : w("", !0),
|
|
890
|
+
(d(), f("svg", {
|
|
897
891
|
width: "90",
|
|
898
892
|
height: "18",
|
|
899
893
|
viewBox: "0 0 112.574 24.0002",
|
|
@@ -901,22 +895,22 @@ const tn = /* @__PURE__ */ S({
|
|
|
901
895
|
xmlns: "http://www.w3.org/2000/svg",
|
|
902
896
|
"aria-label": "Opendoor",
|
|
903
897
|
role: "img",
|
|
904
|
-
class:
|
|
905
|
-
}, [...
|
|
906
|
-
|
|
898
|
+
class: o(r.$style.headerOpendoorLogo)
|
|
899
|
+
}, [...n[1] || (n[1] = [
|
|
900
|
+
u("path", {
|
|
907
901
|
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
902
|
fill: "#235ca3"
|
|
909
903
|
}, null, -1)
|
|
910
904
|
])], 2))
|
|
911
905
|
], 2),
|
|
912
|
-
e.showCloseButton ? (
|
|
906
|
+
e.showCloseButton ? (d(), f("button", {
|
|
913
907
|
key: 0,
|
|
914
908
|
type: "button",
|
|
915
|
-
class:
|
|
909
|
+
class: o(r.$style.headerCloseButton),
|
|
916
910
|
"aria-label": "Close",
|
|
917
|
-
onClick:
|
|
918
|
-
}, [...
|
|
919
|
-
|
|
911
|
+
onClick: n[0] || (n[0] = (s) => a("close"))
|
|
912
|
+
}, [...n[2] || (n[2] = [
|
|
913
|
+
u("svg", {
|
|
920
914
|
width: "24",
|
|
921
915
|
height: "24",
|
|
922
916
|
viewBox: "0 0 24 24",
|
|
@@ -926,747 +920,756 @@ const tn = /* @__PURE__ */ S({
|
|
|
926
920
|
"stroke-linecap": "round",
|
|
927
921
|
"stroke-linejoin": "round"
|
|
928
922
|
}, [
|
|
929
|
-
|
|
923
|
+
u("line", {
|
|
930
924
|
x1: "18",
|
|
931
925
|
y1: "6",
|
|
932
926
|
x2: "6",
|
|
933
927
|
y2: "18"
|
|
934
928
|
}),
|
|
935
|
-
|
|
929
|
+
u("line", {
|
|
936
930
|
x1: "6",
|
|
937
931
|
y1: "6",
|
|
938
932
|
x2: "18",
|
|
939
933
|
y2: "18"
|
|
940
934
|
})
|
|
941
935
|
], -1)
|
|
942
|
-
])], 2)) :
|
|
936
|
+
])], 2)) : w("", !0)
|
|
943
937
|
], 2));
|
|
944
938
|
}
|
|
945
|
-
}),
|
|
946
|
-
header:
|
|
947
|
-
headerLogos:
|
|
948
|
-
headerPartnerLogo:
|
|
949
|
-
headerOpendoorLogo:
|
|
950
|
-
headerCloseButton:
|
|
951
|
-
},
|
|
952
|
-
$style:
|
|
953
|
-
},
|
|
939
|
+
}), an = "_header_uo1uz_2", ln = "_headerLogos_uo1uz_12", un = "_headerPartnerLogo_uo1uz_18", cn = "_headerOpendoorLogo_uo1uz_24", dn = "_headerCloseButton_uo1uz_28", vn = {
|
|
940
|
+
header: an,
|
|
941
|
+
headerLogos: ln,
|
|
942
|
+
headerPartnerLogo: un,
|
|
943
|
+
headerOpendoorLogo: cn,
|
|
944
|
+
headerCloseButton: dn
|
|
945
|
+
}, pn = {
|
|
946
|
+
$style: vn
|
|
947
|
+
}, yn = /* @__PURE__ */ B(rn, [["__cssModules", pn]]), fn = ["aria-label"], gn = ["aria-checked", "tabindex", "onClick", "onKeydown"], hn = /* @__PURE__ */ x({
|
|
954
948
|
__name: "RadioCardInput",
|
|
955
949
|
props: {
|
|
956
950
|
question: {}
|
|
957
951
|
},
|
|
958
952
|
setup(e) {
|
|
959
|
-
const t =
|
|
960
|
-
let
|
|
961
|
-
|
|
962
|
-
|
|
953
|
+
const t = F("dtc-onboarding");
|
|
954
|
+
let a = null;
|
|
955
|
+
W(() => {
|
|
956
|
+
a && clearTimeout(a);
|
|
963
957
|
});
|
|
964
|
-
function
|
|
965
|
-
t.setAnswer(
|
|
958
|
+
function r(s, i) {
|
|
959
|
+
t.setAnswer(s.key, i), s.autoAdvance && (a && clearTimeout(a), a = setTimeout(() => t.goToNext(), 150));
|
|
966
960
|
}
|
|
967
|
-
function s
|
|
968
|
-
var
|
|
969
|
-
const
|
|
970
|
-
if (!
|
|
971
|
-
let
|
|
972
|
-
if (
|
|
973
|
-
const
|
|
974
|
-
(
|
|
961
|
+
function n(s, i, l) {
|
|
962
|
+
var m, h;
|
|
963
|
+
const v = l.options;
|
|
964
|
+
if (!v) return;
|
|
965
|
+
let p = null;
|
|
966
|
+
if (s.key === "ArrowDown" || s.key === "ArrowRight" ? (s.preventDefault(), p = (i + 1) % v.length) : (s.key === "ArrowUp" || s.key === "ArrowLeft") && (s.preventDefault(), p = (i - 1 + v.length) % v.length), p !== null) {
|
|
967
|
+
const y = (m = s.currentTarget.closest('[role="radiogroup"]')) == null ? void 0 : m.querySelectorAll('[role="radio"]');
|
|
968
|
+
(h = y == null ? void 0 : y[p]) == null || h.focus(), r(l, v[p].value);
|
|
975
969
|
}
|
|
976
970
|
}
|
|
977
|
-
return (
|
|
978
|
-
class:
|
|
971
|
+
return (s, i) => (d(), f("div", {
|
|
972
|
+
class: o(s.$style.radioCardGroup),
|
|
979
973
|
role: "radiogroup",
|
|
980
974
|
"aria-label": e.question.label
|
|
981
975
|
}, [
|
|
982
|
-
(
|
|
983
|
-
key: String(
|
|
976
|
+
(d(!0), f(O, null, K(e.question.options, (l, v) => (d(), f("button", {
|
|
977
|
+
key: String(l.value),
|
|
984
978
|
type: "button",
|
|
985
979
|
role: "radio",
|
|
986
|
-
"aria-checked": I(t).getAnswer(e.question.key) ===
|
|
987
|
-
tabindex: I(t).getAnswer(e.question.key) ===
|
|
988
|
-
class:
|
|
989
|
-
|
|
990
|
-
I(t).getAnswer(e.question.key) ===
|
|
980
|
+
"aria-checked": I(t).getAnswer(e.question.key) === l.value,
|
|
981
|
+
tabindex: I(t).getAnswer(e.question.key) === l.value || v === 0 && I(t).getAnswer(e.question.key) === void 0 ? 0 : -1,
|
|
982
|
+
class: o([
|
|
983
|
+
s.$style.radioCard,
|
|
984
|
+
I(t).getAnswer(e.question.key) === l.value ? s.$style.radioCardSelected : ""
|
|
991
985
|
]),
|
|
992
|
-
onClick: (
|
|
993
|
-
onKeydown: (
|
|
986
|
+
onClick: (p) => r(e.question, l.value),
|
|
987
|
+
onKeydown: (p) => n(p, v, e.question)
|
|
994
988
|
}, [
|
|
995
|
-
|
|
996
|
-
class:
|
|
997
|
-
}, C(
|
|
998
|
-
|
|
989
|
+
u("span", {
|
|
990
|
+
class: o(s.$style.radioCardLabel)
|
|
991
|
+
}, C(l.label), 3),
|
|
992
|
+
l.description ? (d(), f("span", {
|
|
999
993
|
key: 0,
|
|
1000
|
-
class:
|
|
1001
|
-
}, C(
|
|
1002
|
-
], 42,
|
|
1003
|
-
I(t).validationErrors.value[e.question.key] ? (
|
|
994
|
+
class: o(s.$style.radioCardDescription)
|
|
995
|
+
}, C(l.description), 3)) : w("", !0)
|
|
996
|
+
], 42, gn))), 128)),
|
|
997
|
+
I(t).validationErrors.value[e.question.key] ? (d(), f("p", {
|
|
1004
998
|
key: 0,
|
|
1005
|
-
class:
|
|
999
|
+
class: o(s.$style.fieldError),
|
|
1006
1000
|
role: "alert"
|
|
1007
|
-
}, C(I(t).validationErrors.value[e.question.key]), 3)) :
|
|
1008
|
-
], 10,
|
|
1001
|
+
}, C(I(t).validationErrors.value[e.question.key]), 3)) : w("", !0)
|
|
1002
|
+
], 10, fn));
|
|
1009
1003
|
}
|
|
1010
|
-
}),
|
|
1011
|
-
radioCardGroup:
|
|
1012
|
-
radioCard:
|
|
1013
|
-
radioCardSelected:
|
|
1014
|
-
radioCardLabel:
|
|
1015
|
-
radioCardDescription:
|
|
1016
|
-
fieldError:
|
|
1017
|
-
},
|
|
1018
|
-
$style:
|
|
1019
|
-
},
|
|
1020
|
-
function
|
|
1021
|
-
return `${
|
|
1004
|
+
}), mn = "_radioCardGroup_11rwj_2", bn = "_radioCard_11rwj_2", $n = "_radioCardSelected_11rwj_34", Cn = "_radioCardLabel_11rwj_39", kn = "_radioCardDescription_11rwj_45", _n = "_fieldError_11rwj_50", wn = {
|
|
1005
|
+
radioCardGroup: mn,
|
|
1006
|
+
radioCard: bn,
|
|
1007
|
+
radioCardSelected: $n,
|
|
1008
|
+
radioCardLabel: Cn,
|
|
1009
|
+
radioCardDescription: kn,
|
|
1010
|
+
fieldError: _n
|
|
1011
|
+
}, Ln = {
|
|
1012
|
+
$style: wn
|
|
1013
|
+
}, In = /* @__PURE__ */ B(hn, [["__cssModules", Ln]]), En = "https://images.opendoor.com/source/s3/imgdrop-production", Mn = "service=reception-fe&dpr=2&fit=scale-down";
|
|
1014
|
+
function D(e, t = "3:2-sm") {
|
|
1015
|
+
return `${En}/${e}?${Mn}&preset=${t}`;
|
|
1022
1016
|
}
|
|
1023
|
-
const
|
|
1017
|
+
const qn = {
|
|
1024
1018
|
// Kitchen
|
|
1025
|
-
"kitchen-fixer_upper":
|
|
1026
|
-
"kitchen-dated":
|
|
1027
|
-
"kitchen-standard":
|
|
1028
|
-
"kitchen-high_end":
|
|
1029
|
-
"kitchen-luxury":
|
|
1019
|
+
"kitchen-fixer_upper": D("2023-04-1681772974083-61414.png"),
|
|
1020
|
+
"kitchen-dated": D("2023-04-1681772974089-39460.png"),
|
|
1021
|
+
"kitchen-standard": D("2023-04-1681772974093-51260.png"),
|
|
1022
|
+
"kitchen-high_end": D("2023-04-1682444345875-57331.jpeg", "3:2-xl"),
|
|
1023
|
+
"kitchen-luxury": D("2023-04-1682444629335-69661.jpeg", "3:2-xl"),
|
|
1030
1024
|
// Bathroom
|
|
1031
|
-
"bathroom-fixer_upper":
|
|
1032
|
-
"bathroom-dated":
|
|
1033
|
-
"bathroom-standard":
|
|
1034
|
-
"bathroom-high_end":
|
|
1035
|
-
"bathroom-luxury":
|
|
1025
|
+
"bathroom-fixer_upper": D("2023-04-1682103091299-33543.jpeg"),
|
|
1026
|
+
"bathroom-dated": D("2023-04-1681773104207-98555.png"),
|
|
1027
|
+
"bathroom-standard": D("2023-04-1682103088251-79730.jpeg", "3:2-xl"),
|
|
1028
|
+
"bathroom-high_end": D("2023-04-1681773104214-77488.png"),
|
|
1029
|
+
"bathroom-luxury": D("2023-04-1681773104217-27390.png"),
|
|
1036
1030
|
// Living Room
|
|
1037
|
-
"living-room-fixer_upper":
|
|
1038
|
-
"living-room-dated":
|
|
1039
|
-
"living-room-standard":
|
|
1040
|
-
"living-room-high_end":
|
|
1041
|
-
"living-room-luxury":
|
|
1031
|
+
"living-room-fixer_upper": D("2023-04-1681773170815-60328.png"),
|
|
1032
|
+
"living-room-dated": D("2023-04-1681773170823-03451.png"),
|
|
1033
|
+
"living-room-standard": D("2023-04-1681773170826-47471.png"),
|
|
1034
|
+
"living-room-high_end": D("2023-04-1681773170828-76415.png"),
|
|
1035
|
+
"living-room-luxury": D("2023-04-1681773170832-20699.png"),
|
|
1042
1036
|
// Exterior
|
|
1043
|
-
"exterior-fixer_upper":
|
|
1044
|
-
"exterior-dated":
|
|
1045
|
-
"exterior-standard":
|
|
1046
|
-
"exterior-high_end":
|
|
1047
|
-
"exterior-luxury":
|
|
1048
|
-
},
|
|
1037
|
+
"exterior-fixer_upper": D("2023-04-1681773220493-46489.png"),
|
|
1038
|
+
"exterior-dated": D("2023-04-1681773220495-22229.png"),
|
|
1039
|
+
"exterior-standard": D("2023-04-1681773220498-64940.png"),
|
|
1040
|
+
"exterior-high_end": D("2023-04-1682103085417-24272.jpeg", "3:2-md"),
|
|
1041
|
+
"exterior-luxury": D("2023-04-1681773220487-59852.png")
|
|
1042
|
+
}, Sn = ["aria-label"], An = ["aria-checked", "onClick"], Tn = ["src", "alt"], xn = /* @__PURE__ */ x({
|
|
1049
1043
|
__name: "ImageCardInput",
|
|
1050
1044
|
props: {
|
|
1051
1045
|
question: {}
|
|
1052
1046
|
},
|
|
1053
1047
|
setup(e) {
|
|
1054
|
-
const t =
|
|
1055
|
-
let
|
|
1056
|
-
|
|
1057
|
-
|
|
1048
|
+
const t = F("dtc-onboarding");
|
|
1049
|
+
let a = null;
|
|
1050
|
+
W(() => {
|
|
1051
|
+
a && clearTimeout(a);
|
|
1058
1052
|
});
|
|
1059
|
-
function
|
|
1060
|
-
t.setAnswer(
|
|
1053
|
+
function r(s, i) {
|
|
1054
|
+
t.setAnswer(s.key, i), s.autoAdvance && (a && clearTimeout(a), a = setTimeout(() => t.goToNext(), 300));
|
|
1061
1055
|
}
|
|
1062
|
-
function s
|
|
1063
|
-
return
|
|
1056
|
+
function n(s) {
|
|
1057
|
+
return s ? qn[s] : void 0;
|
|
1064
1058
|
}
|
|
1065
|
-
return (
|
|
1066
|
-
class:
|
|
1059
|
+
return (s, i) => (d(), f("div", {
|
|
1060
|
+
class: o(s.$style.imageCardGroup),
|
|
1067
1061
|
role: "radiogroup",
|
|
1068
1062
|
"aria-label": e.question.label
|
|
1069
1063
|
}, [
|
|
1070
|
-
(
|
|
1071
|
-
key: String(
|
|
1064
|
+
(d(!0), f(O, null, K(e.question.options, (l) => (d(), f("button", {
|
|
1065
|
+
key: String(l.value),
|
|
1072
1066
|
type: "button",
|
|
1073
1067
|
role: "radio",
|
|
1074
|
-
"aria-checked": I(t).getAnswer(e.question.key) ===
|
|
1075
|
-
class:
|
|
1076
|
-
|
|
1077
|
-
I(t).getAnswer(e.question.key) ===
|
|
1068
|
+
"aria-checked": I(t).getAnswer(e.question.key) === l.value,
|
|
1069
|
+
class: o([
|
|
1070
|
+
s.$style.imageCard,
|
|
1071
|
+
I(t).getAnswer(e.question.key) === l.value ? s.$style.imageCardSelected : ""
|
|
1078
1072
|
]),
|
|
1079
|
-
onClick: (
|
|
1073
|
+
onClick: (v) => r(e.question, l.value)
|
|
1080
1074
|
}, [
|
|
1081
|
-
|
|
1075
|
+
n(l.imageId) ? (d(), f("img", {
|
|
1082
1076
|
key: 0,
|
|
1083
|
-
src:
|
|
1084
|
-
alt:
|
|
1085
|
-
class:
|
|
1077
|
+
src: n(l.imageId),
|
|
1078
|
+
alt: l.label,
|
|
1079
|
+
class: o(s.$style.imageCardPhoto),
|
|
1086
1080
|
loading: "lazy"
|
|
1087
|
-
}, null, 10,
|
|
1088
|
-
|
|
1089
|
-
class:
|
|
1090
|
-
}, C(
|
|
1091
|
-
|
|
1081
|
+
}, null, 10, Tn)) : w("", !0),
|
|
1082
|
+
u("span", {
|
|
1083
|
+
class: o(s.$style.imageCardLabel)
|
|
1084
|
+
}, C(l.label), 3),
|
|
1085
|
+
l.description ? (d(), f("span", {
|
|
1092
1086
|
key: 1,
|
|
1093
|
-
class:
|
|
1094
|
-
}, C(
|
|
1095
|
-
], 10,
|
|
1096
|
-
I(t).validationErrors.value[e.question.key] ? (
|
|
1087
|
+
class: o(s.$style.imageCardDescription)
|
|
1088
|
+
}, C(l.description), 3)) : w("", !0)
|
|
1089
|
+
], 10, An))), 128)),
|
|
1090
|
+
I(t).validationErrors.value[e.question.key] ? (d(), f("p", {
|
|
1097
1091
|
key: 0,
|
|
1098
|
-
class:
|
|
1092
|
+
class: o(s.$style.fieldError),
|
|
1099
1093
|
role: "alert"
|
|
1100
|
-
}, C(I(t).validationErrors.value[e.question.key]), 3)) :
|
|
1101
|
-
], 10,
|
|
1094
|
+
}, C(I(t).validationErrors.value[e.question.key]), 3)) : w("", !0)
|
|
1095
|
+
], 10, Sn));
|
|
1102
1096
|
}
|
|
1103
|
-
}),
|
|
1104
|
-
imageCardGroup:
|
|
1105
|
-
imageCard:
|
|
1106
|
-
imageCardSelected:
|
|
1107
|
-
imageCardPhoto:
|
|
1108
|
-
imageCardLabel:
|
|
1109
|
-
imageCardDescription:
|
|
1110
|
-
fieldError:
|
|
1111
|
-
},
|
|
1112
|
-
$style:
|
|
1113
|
-
},
|
|
1097
|
+
}), Dn = "_imageCardGroup_1vc6c_2", Bn = "_imageCard_1vc6c_2", Pn = "_imageCardSelected_1vc6c_34", Fn = "_imageCardPhoto_1vc6c_39", Gn = "_imageCardLabel_1vc6c_46", On = "_imageCardDescription_1vc6c_53", jn = "_fieldError_1vc6c_60", Vn = {
|
|
1098
|
+
imageCardGroup: Dn,
|
|
1099
|
+
imageCard: Bn,
|
|
1100
|
+
imageCardSelected: Pn,
|
|
1101
|
+
imageCardPhoto: Fn,
|
|
1102
|
+
imageCardLabel: Gn,
|
|
1103
|
+
imageCardDescription: On,
|
|
1104
|
+
fieldError: jn
|
|
1105
|
+
}, Rn = {
|
|
1106
|
+
$style: Vn
|
|
1107
|
+
}, Hn = /* @__PURE__ */ B(xn, [["__cssModules", Rn]]), Nn = ["aria-label"], Zn = ["aria-checked", "onClick"], Un = {
|
|
1114
1108
|
key: 0,
|
|
1115
1109
|
width: "12",
|
|
1116
1110
|
height: "12",
|
|
1117
1111
|
viewBox: "0 0 12 12",
|
|
1118
1112
|
fill: "none"
|
|
1119
|
-
},
|
|
1113
|
+
}, zn = /* @__PURE__ */ x({
|
|
1120
1114
|
__name: "CheckboxCardInput",
|
|
1121
1115
|
props: {
|
|
1122
1116
|
question: {}
|
|
1123
1117
|
},
|
|
1124
1118
|
setup(e) {
|
|
1125
|
-
const t = e,
|
|
1126
|
-
() =>
|
|
1127
|
-
),
|
|
1128
|
-
() =>
|
|
1119
|
+
const t = e, a = F("dtc-onboarding"), r = k(
|
|
1120
|
+
() => a.getAnswer(t.question.key) ?? []
|
|
1121
|
+
), n = k(
|
|
1122
|
+
() => a.validationErrors.value[t.question.key]
|
|
1129
1123
|
);
|
|
1130
|
-
function
|
|
1131
|
-
var
|
|
1132
|
-
const
|
|
1133
|
-
if (
|
|
1134
|
-
|
|
1124
|
+
function s(i) {
|
|
1125
|
+
var p;
|
|
1126
|
+
const l = (p = t.question.options) == null ? void 0 : p.find((m) => m.value === i);
|
|
1127
|
+
if (l != null && l.exclusive) {
|
|
1128
|
+
a.setAnswer(t.question.key, [i]);
|
|
1135
1129
|
return;
|
|
1136
1130
|
}
|
|
1137
|
-
const
|
|
1138
|
-
(
|
|
1139
|
-
var
|
|
1140
|
-
return !((
|
|
1131
|
+
const v = r.value.filter(
|
|
1132
|
+
(m) => {
|
|
1133
|
+
var h, y;
|
|
1134
|
+
return !((y = (h = t.question.options) == null ? void 0 : h.find((_) => _.value === m)) != null && y.exclusive);
|
|
1141
1135
|
}
|
|
1142
1136
|
);
|
|
1143
|
-
if (
|
|
1144
|
-
const
|
|
1145
|
-
|
|
1137
|
+
if (v.includes(i)) {
|
|
1138
|
+
const m = v.filter((h) => h !== i);
|
|
1139
|
+
a.setAnswer(t.question.key, m.length > 0 ? m : void 0);
|
|
1146
1140
|
} else
|
|
1147
|
-
|
|
1141
|
+
a.setAnswer(t.question.key, [...v, i]);
|
|
1148
1142
|
}
|
|
1149
|
-
return (
|
|
1150
|
-
class:
|
|
1143
|
+
return (i, l) => (d(), f("div", {
|
|
1144
|
+
class: o(i.$style.checkboxCardGroup),
|
|
1151
1145
|
role: "group",
|
|
1152
1146
|
"aria-label": e.question.label
|
|
1153
1147
|
}, [
|
|
1154
|
-
(
|
|
1155
|
-
key: String(
|
|
1148
|
+
(d(!0), f(O, null, K(e.question.options, (v) => (d(), f("button", {
|
|
1149
|
+
key: String(v.value),
|
|
1156
1150
|
type: "button",
|
|
1157
1151
|
role: "checkbox",
|
|
1158
|
-
"aria-checked":
|
|
1159
|
-
class:
|
|
1160
|
-
|
|
1161
|
-
|
|
1152
|
+
"aria-checked": r.value.includes(String(v.value)),
|
|
1153
|
+
class: o([
|
|
1154
|
+
i.$style.checkboxCard,
|
|
1155
|
+
r.value.includes(String(v.value)) ? i.$style.checkboxCardSelected : ""
|
|
1162
1156
|
]),
|
|
1163
|
-
onClick: (
|
|
1157
|
+
onClick: (p) => s(String(v.value))
|
|
1164
1158
|
}, [
|
|
1165
|
-
|
|
1166
|
-
class:
|
|
1159
|
+
u("span", {
|
|
1160
|
+
class: o(i.$style.checkboxCardContent)
|
|
1167
1161
|
}, [
|
|
1168
|
-
|
|
1169
|
-
class:
|
|
1170
|
-
}, C(
|
|
1171
|
-
|
|
1162
|
+
u("span", {
|
|
1163
|
+
class: o(i.$style.checkboxCardLabel)
|
|
1164
|
+
}, C(v.label), 3),
|
|
1165
|
+
v.helperText ? (d(), f("span", {
|
|
1172
1166
|
key: 0,
|
|
1173
|
-
class:
|
|
1174
|
-
}, C(
|
|
1167
|
+
class: o(i.$style.checkboxCardHelper)
|
|
1168
|
+
}, C(v.helperText), 3)) : w("", !0)
|
|
1175
1169
|
], 2),
|
|
1176
|
-
|
|
1177
|
-
class:
|
|
1178
|
-
|
|
1179
|
-
|
|
1170
|
+
u("span", {
|
|
1171
|
+
class: o([
|
|
1172
|
+
i.$style.checkboxIndicator,
|
|
1173
|
+
r.value.includes(String(v.value)) ? i.$style.checkboxIndicatorChecked : ""
|
|
1180
1174
|
])
|
|
1181
1175
|
}, [
|
|
1182
|
-
|
|
1183
|
-
|
|
1176
|
+
r.value.includes(String(v.value)) ? (d(), f("svg", Un, [...l[0] || (l[0] = [
|
|
1177
|
+
u("path", {
|
|
1184
1178
|
d: "M2 6l3 3 5-5",
|
|
1185
1179
|
stroke: "currentColor",
|
|
1186
1180
|
"stroke-width": "2",
|
|
1187
1181
|
"stroke-linecap": "round",
|
|
1188
1182
|
"stroke-linejoin": "round"
|
|
1189
1183
|
}, null, -1)
|
|
1190
|
-
])])) :
|
|
1184
|
+
])])) : w("", !0)
|
|
1191
1185
|
], 2)
|
|
1192
|
-
], 10,
|
|
1193
|
-
|
|
1186
|
+
], 10, Zn))), 128)),
|
|
1187
|
+
n.value ? (d(), f("p", {
|
|
1194
1188
|
key: 0,
|
|
1195
|
-
class:
|
|
1189
|
+
class: o(i.$style.fieldError),
|
|
1196
1190
|
role: "alert"
|
|
1197
|
-
}, C(
|
|
1198
|
-
], 10,
|
|
1191
|
+
}, C(n.value), 3)) : w("", !0)
|
|
1192
|
+
], 10, Nn));
|
|
1199
1193
|
}
|
|
1200
|
-
}),
|
|
1201
|
-
checkboxCardGroup:
|
|
1202
|
-
checkboxCard:
|
|
1203
|
-
checkboxCardSelected:
|
|
1204
|
-
checkboxCardContent:
|
|
1205
|
-
checkboxCardLabel:
|
|
1206
|
-
checkboxCardHelper:
|
|
1207
|
-
checkboxIndicator:
|
|
1208
|
-
checkboxIndicatorChecked:
|
|
1209
|
-
fieldError:
|
|
1210
|
-
},
|
|
1211
|
-
$style:
|
|
1212
|
-
},
|
|
1194
|
+
}), Wn = "_checkboxCardGroup_uqwpe_2", Kn = "_checkboxCard_uqwpe_2", Xn = "_checkboxCardSelected_uqwpe_34", Jn = "_checkboxCardContent_uqwpe_39", Qn = "_checkboxCardLabel_uqwpe_46", Yn = "_checkboxCardHelper_uqwpe_52", eo = "_checkboxIndicator_uqwpe_57", to = "_checkboxIndicatorChecked_uqwpe_69", no = "_fieldError_uqwpe_75", oo = {
|
|
1195
|
+
checkboxCardGroup: Wn,
|
|
1196
|
+
checkboxCard: Kn,
|
|
1197
|
+
checkboxCardSelected: Xn,
|
|
1198
|
+
checkboxCardContent: Jn,
|
|
1199
|
+
checkboxCardLabel: Qn,
|
|
1200
|
+
checkboxCardHelper: Yn,
|
|
1201
|
+
checkboxIndicator: eo,
|
|
1202
|
+
checkboxIndicatorChecked: to,
|
|
1203
|
+
fieldError: no
|
|
1204
|
+
}, so = {
|
|
1205
|
+
$style: oo
|
|
1206
|
+
}, ro = /* @__PURE__ */ B(zn, [["__cssModules", so]]), ao = ["for"], lo = ["id", "value", "aria-invalid", "aria-describedby"], io = { value: "" }, uo = ["value"], co = ["id"], vo = /* @__PURE__ */ x({
|
|
1213
1207
|
__name: "DropdownInput",
|
|
1214
1208
|
props: {
|
|
1215
1209
|
question: {}
|
|
1216
1210
|
},
|
|
1217
1211
|
setup(e) {
|
|
1218
1212
|
let t = 0;
|
|
1219
|
-
const
|
|
1220
|
-
() =>
|
|
1213
|
+
const a = e, r = F("dtc-onboarding"), n = `dd-${++t}`, s = k(() => r.getAnswer(a.question.key)), i = k(
|
|
1214
|
+
() => r.validationErrors.value[a.question.key]
|
|
1221
1215
|
);
|
|
1222
|
-
function
|
|
1223
|
-
const
|
|
1224
|
-
|
|
1216
|
+
function l(v) {
|
|
1217
|
+
const p = v.target.value;
|
|
1218
|
+
a.question.type === "number" && p !== "" ? r.setAnswer(a.question.key, Number(p)) : r.setAnswer(a.question.key, p || void 0);
|
|
1225
1219
|
}
|
|
1226
|
-
return (
|
|
1227
|
-
class:
|
|
1220
|
+
return (v, p) => (d(), f("div", {
|
|
1221
|
+
class: o(v.$style.fieldGroup)
|
|
1228
1222
|
}, [
|
|
1229
|
-
|
|
1230
|
-
class:
|
|
1231
|
-
for: `${
|
|
1232
|
-
}, C(e.question.label), 11,
|
|
1233
|
-
e.question.description ? (
|
|
1223
|
+
u("label", {
|
|
1224
|
+
class: o(v.$style.fieldLabel),
|
|
1225
|
+
for: `${n}-${e.question.key}`
|
|
1226
|
+
}, C(e.question.label), 11, ao),
|
|
1227
|
+
e.question.description ? (d(), f("p", {
|
|
1234
1228
|
key: 0,
|
|
1235
|
-
class:
|
|
1236
|
-
}, C(e.question.description), 3)) :
|
|
1237
|
-
|
|
1238
|
-
id: `${
|
|
1239
|
-
class:
|
|
1240
|
-
value:
|
|
1241
|
-
"aria-invalid":
|
|
1242
|
-
"aria-describedby":
|
|
1243
|
-
onChange:
|
|
1229
|
+
class: o(v.$style.fieldDescription)
|
|
1230
|
+
}, C(e.question.description), 3)) : w("", !0),
|
|
1231
|
+
u("select", {
|
|
1232
|
+
id: `${n}-${e.question.key}`,
|
|
1233
|
+
class: o([v.$style.fieldSelect, i.value ? v.$style.fieldSelectError : ""]),
|
|
1234
|
+
value: s.value !== void 0 ? String(s.value) : "",
|
|
1235
|
+
"aria-invalid": i.value ? "true" : void 0,
|
|
1236
|
+
"aria-describedby": i.value ? `${n}-${e.question.key}-error` : void 0,
|
|
1237
|
+
onChange: l
|
|
1244
1238
|
}, [
|
|
1245
|
-
|
|
1246
|
-
(
|
|
1247
|
-
key: String(
|
|
1248
|
-
value: String(
|
|
1249
|
-
}, C(
|
|
1250
|
-
], 42,
|
|
1251
|
-
|
|
1239
|
+
u("option", io, C(e.question.placeholder || "Select..."), 1),
|
|
1240
|
+
(d(!0), f(O, null, K(e.question.options, (m) => (d(), f("option", {
|
|
1241
|
+
key: String(m.value),
|
|
1242
|
+
value: String(m.value)
|
|
1243
|
+
}, C(m.label), 9, uo))), 128))
|
|
1244
|
+
], 42, lo),
|
|
1245
|
+
i.value ? (d(), f("p", {
|
|
1252
1246
|
key: 1,
|
|
1253
|
-
id: `${
|
|
1254
|
-
class:
|
|
1247
|
+
id: `${n}-${e.question.key}-error`,
|
|
1248
|
+
class: o(v.$style.fieldError),
|
|
1255
1249
|
role: "alert"
|
|
1256
|
-
}, C(
|
|
1250
|
+
}, C(i.value), 11, co)) : w("", !0)
|
|
1257
1251
|
], 2));
|
|
1258
1252
|
}
|
|
1259
|
-
}),
|
|
1260
|
-
fieldGroup:
|
|
1261
|
-
fieldLabel:
|
|
1262
|
-
fieldDescription:
|
|
1263
|
-
fieldSelect:
|
|
1264
|
-
fieldSelectError:
|
|
1265
|
-
fieldError:
|
|
1266
|
-
},
|
|
1267
|
-
$style:
|
|
1268
|
-
},
|
|
1253
|
+
}), po = "_fieldGroup_qcbne_2", yo = "_fieldLabel_qcbne_8", fo = "_fieldDescription_qcbne_15", go = "_fieldSelect_qcbne_22", ho = "_fieldSelectError_qcbne_47", mo = "_fieldError_qcbne_51", bo = {
|
|
1254
|
+
fieldGroup: po,
|
|
1255
|
+
fieldLabel: yo,
|
|
1256
|
+
fieldDescription: fo,
|
|
1257
|
+
fieldSelect: go,
|
|
1258
|
+
fieldSelectError: ho,
|
|
1259
|
+
fieldError: mo
|
|
1260
|
+
}, $o = {
|
|
1261
|
+
$style: bo
|
|
1262
|
+
}, Co = /* @__PURE__ */ B(vo, [["__cssModules", $o]]), ko = ["for"], _o = ["id", "type", "inputmode", "value", "placeholder", "aria-invalid", "aria-describedby"], wo = ["id"], Lo = /* @__PURE__ */ x({
|
|
1269
1263
|
__name: "TextInput",
|
|
1270
1264
|
props: {
|
|
1271
1265
|
question: {}
|
|
1272
1266
|
},
|
|
1273
1267
|
setup(e) {
|
|
1274
1268
|
let t = 0;
|
|
1275
|
-
const
|
|
1276
|
-
() =>
|
|
1277
|
-
),
|
|
1278
|
-
() =>
|
|
1279
|
-
),
|
|
1280
|
-
() =>
|
|
1269
|
+
const a = e, r = F("dtc-onboarding"), n = `ti-${++t}`, s = k(() => r.getAnswer(a.question.key)), i = k(
|
|
1270
|
+
() => r.validationErrors.value[a.question.key]
|
|
1271
|
+
), l = k(
|
|
1272
|
+
() => s.value !== void 0 && s.value !== null ? String(s.value) : ""
|
|
1273
|
+
), v = k(() => a.question.type === "number" ? "text" : a.question.style === "email" ? "email" : "text"), p = k(
|
|
1274
|
+
() => a.question.type === "number" ? "numeric" : void 0
|
|
1281
1275
|
);
|
|
1282
|
-
function
|
|
1283
|
-
const
|
|
1284
|
-
if (
|
|
1285
|
-
const
|
|
1286
|
-
|
|
1276
|
+
function m(h) {
|
|
1277
|
+
const y = h.target.value;
|
|
1278
|
+
if (a.question.type === "number") {
|
|
1279
|
+
const _ = y.replace(/[^0-9.]/g, ""), P = _ === "" ? void 0 : Number(_), E = P !== void 0 && isNaN(P) ? void 0 : P;
|
|
1280
|
+
r.setAnswer(a.question.key, E);
|
|
1287
1281
|
} else
|
|
1288
|
-
|
|
1282
|
+
r.setAnswer(a.question.key, y || void 0);
|
|
1289
1283
|
}
|
|
1290
|
-
return (
|
|
1291
|
-
class:
|
|
1284
|
+
return (h, y) => (d(), f("div", {
|
|
1285
|
+
class: o(h.$style.fieldGroup)
|
|
1292
1286
|
}, [
|
|
1293
|
-
|
|
1294
|
-
class:
|
|
1295
|
-
for: `${
|
|
1296
|
-
}, C(e.question.label), 11,
|
|
1297
|
-
e.question.description ? (
|
|
1287
|
+
u("label", {
|
|
1288
|
+
class: o(h.$style.fieldLabel),
|
|
1289
|
+
for: `${n}-${e.question.key}`
|
|
1290
|
+
}, C(e.question.label), 11, ko),
|
|
1291
|
+
e.question.description ? (d(), f("p", {
|
|
1298
1292
|
key: 0,
|
|
1299
|
-
class:
|
|
1300
|
-
}, C(e.question.description), 3)) :
|
|
1301
|
-
|
|
1302
|
-
class:
|
|
1293
|
+
class: o(h.$style.fieldDescription)
|
|
1294
|
+
}, C(e.question.description), 3)) : w("", !0),
|
|
1295
|
+
u("div", {
|
|
1296
|
+
class: o(h.$style.fieldInputWrapper)
|
|
1303
1297
|
}, [
|
|
1304
|
-
|
|
1305
|
-
id: `${
|
|
1306
|
-
type:
|
|
1307
|
-
inputmode:
|
|
1308
|
-
class:
|
|
1309
|
-
value:
|
|
1298
|
+
u("input", {
|
|
1299
|
+
id: `${n}-${e.question.key}`,
|
|
1300
|
+
type: v.value,
|
|
1301
|
+
inputmode: p.value,
|
|
1302
|
+
class: o([h.$style.fieldInput, i.value ? h.$style.fieldInputError : ""]),
|
|
1303
|
+
value: l.value,
|
|
1310
1304
|
placeholder: e.question.placeholder,
|
|
1311
|
-
"aria-invalid":
|
|
1312
|
-
"aria-describedby":
|
|
1313
|
-
onInput:
|
|
1314
|
-
}, null, 42,
|
|
1315
|
-
e.question.suffix ? (
|
|
1305
|
+
"aria-invalid": i.value ? "true" : void 0,
|
|
1306
|
+
"aria-describedby": i.value ? `${n}-${e.question.key}-error` : void 0,
|
|
1307
|
+
onInput: m
|
|
1308
|
+
}, null, 42, _o),
|
|
1309
|
+
e.question.suffix ? (d(), f("span", {
|
|
1316
1310
|
key: 0,
|
|
1317
|
-
class:
|
|
1318
|
-
}, C(e.question.suffix), 3)) :
|
|
1311
|
+
class: o(h.$style.fieldSuffix)
|
|
1312
|
+
}, C(e.question.suffix), 3)) : w("", !0)
|
|
1319
1313
|
], 2),
|
|
1320
|
-
|
|
1314
|
+
i.value ? (d(), f("p", {
|
|
1321
1315
|
key: 1,
|
|
1322
|
-
id: `${
|
|
1323
|
-
class:
|
|
1316
|
+
id: `${n}-${e.question.key}-error`,
|
|
1317
|
+
class: o(h.$style.fieldError),
|
|
1324
1318
|
role: "alert"
|
|
1325
|
-
}, C(
|
|
1319
|
+
}, C(i.value), 11, wo)) : w("", !0)
|
|
1326
1320
|
], 2));
|
|
1327
1321
|
}
|
|
1328
|
-
}),
|
|
1329
|
-
fieldGroup:
|
|
1330
|
-
fieldLabel:
|
|
1331
|
-
fieldDescription:
|
|
1332
|
-
fieldInputWrapper:
|
|
1333
|
-
fieldInput:
|
|
1334
|
-
fieldInputError:
|
|
1335
|
-
fieldSuffix:
|
|
1322
|
+
}), Io = "_fieldGroup_1jlim_2", Eo = "_fieldLabel_1jlim_8", Mo = "_fieldDescription_1jlim_15", qo = "_fieldInputWrapper_1jlim_22", So = "_fieldInput_1jlim_22", Ao = "_fieldInputError_1jlim_60", To = "_fieldSuffix_1jlim_64", xo = "_fieldError_1jlim_73", Do = {
|
|
1323
|
+
fieldGroup: Io,
|
|
1324
|
+
fieldLabel: Eo,
|
|
1325
|
+
fieldDescription: Mo,
|
|
1326
|
+
fieldInputWrapper: qo,
|
|
1327
|
+
fieldInput: So,
|
|
1328
|
+
fieldInputError: Ao,
|
|
1329
|
+
fieldSuffix: To,
|
|
1336
1330
|
fieldError: xo
|
|
1337
|
-
},
|
|
1338
|
-
$style:
|
|
1339
|
-
},
|
|
1331
|
+
}, Bo = {
|
|
1332
|
+
$style: Do
|
|
1333
|
+
}, Po = /* @__PURE__ */ B(Lo, [["__cssModules", Bo]]), Fo = ["for"], Go = ["id", "value", "placeholder", "aria-invalid", "aria-describedby"], Oo = ["id"], jo = /* @__PURE__ */ x({
|
|
1340
1334
|
__name: "CurrencyInput",
|
|
1341
1335
|
props: {
|
|
1342
1336
|
question: {}
|
|
1343
1337
|
},
|
|
1344
1338
|
setup(e) {
|
|
1345
1339
|
let t = 0;
|
|
1346
|
-
const
|
|
1347
|
-
() =>
|
|
1348
|
-
),
|
|
1349
|
-
() =>
|
|
1340
|
+
const a = e, r = F("dtc-onboarding"), n = `ci-${++t}`, s = k(() => r.getAnswer(a.question.key)), i = k(
|
|
1341
|
+
() => r.validationErrors.value[a.question.key]
|
|
1342
|
+
), l = k(
|
|
1343
|
+
() => s.value !== void 0 && s.value !== null ? String(s.value) : ""
|
|
1350
1344
|
);
|
|
1351
|
-
function p
|
|
1352
|
-
const
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1345
|
+
function v(p) {
|
|
1346
|
+
const m = p.target.value.replace(/[^0-9]/g, ""), h = m === "" ? void 0 : Number(m);
|
|
1347
|
+
r.setAnswer(
|
|
1348
|
+
a.question.key,
|
|
1349
|
+
h !== void 0 && isNaN(h) ? void 0 : h
|
|
1356
1350
|
);
|
|
1357
1351
|
}
|
|
1358
|
-
return (
|
|
1359
|
-
class:
|
|
1352
|
+
return (p, m) => (d(), f("div", {
|
|
1353
|
+
class: o(p.$style.fieldGroup)
|
|
1360
1354
|
}, [
|
|
1361
|
-
|
|
1362
|
-
class:
|
|
1363
|
-
for: `${
|
|
1364
|
-
}, C(e.question.label), 11,
|
|
1365
|
-
|
|
1366
|
-
class:
|
|
1355
|
+
u("label", {
|
|
1356
|
+
class: o(p.$style.fieldLabel),
|
|
1357
|
+
for: `${n}-${e.question.key}`
|
|
1358
|
+
}, C(e.question.label), 11, Fo),
|
|
1359
|
+
u("div", {
|
|
1360
|
+
class: o(p.$style.currencyWrapper)
|
|
1367
1361
|
}, [
|
|
1368
|
-
|
|
1369
|
-
class:
|
|
1362
|
+
u("span", {
|
|
1363
|
+
class: o(p.$style.currencyPrefix)
|
|
1370
1364
|
}, "$", 2),
|
|
1371
|
-
|
|
1372
|
-
id: `${
|
|
1365
|
+
u("input", {
|
|
1366
|
+
id: `${n}-${e.question.key}`,
|
|
1373
1367
|
type: "text",
|
|
1374
1368
|
inputmode: "numeric",
|
|
1375
|
-
class:
|
|
1376
|
-
value:
|
|
1369
|
+
class: o([p.$style.currencyInput, i.value ? p.$style.fieldInputError : ""]),
|
|
1370
|
+
value: l.value,
|
|
1377
1371
|
placeholder: e.question.placeholder,
|
|
1378
|
-
"aria-invalid":
|
|
1379
|
-
"aria-describedby":
|
|
1380
|
-
onInput:
|
|
1381
|
-
}, null, 42,
|
|
1372
|
+
"aria-invalid": i.value ? "true" : void 0,
|
|
1373
|
+
"aria-describedby": i.value ? `${n}-${e.question.key}-error` : void 0,
|
|
1374
|
+
onInput: v
|
|
1375
|
+
}, null, 42, Go)
|
|
1382
1376
|
], 2),
|
|
1383
|
-
|
|
1377
|
+
i.value ? (d(), f("p", {
|
|
1384
1378
|
key: 0,
|
|
1385
|
-
id: `${
|
|
1386
|
-
class:
|
|
1379
|
+
id: `${n}-${e.question.key}-error`,
|
|
1380
|
+
class: o(p.$style.fieldError),
|
|
1387
1381
|
role: "alert"
|
|
1388
|
-
}, C(
|
|
1382
|
+
}, C(i.value), 11, Oo)) : w("", !0)
|
|
1389
1383
|
], 2));
|
|
1390
1384
|
}
|
|
1391
|
-
}),
|
|
1392
|
-
fieldGroup:
|
|
1393
|
-
fieldLabel:
|
|
1394
|
-
currencyWrapper:
|
|
1395
|
-
currencyPrefix:
|
|
1396
|
-
currencyInput:
|
|
1397
|
-
fieldInputError:
|
|
1398
|
-
fieldError:
|
|
1399
|
-
},
|
|
1400
|
-
$style:
|
|
1401
|
-
},
|
|
1385
|
+
}), Vo = "_fieldGroup_10ms9_2", Ro = "_fieldLabel_10ms9_8", Ho = "_currencyWrapper_10ms9_15", No = "_currencyPrefix_10ms9_21", Zo = "_currencyInput_10ms9_30", Uo = "_fieldInputError_10ms9_48", zo = "_fieldError_10ms9_52", Wo = {
|
|
1386
|
+
fieldGroup: Vo,
|
|
1387
|
+
fieldLabel: Ro,
|
|
1388
|
+
currencyWrapper: Ho,
|
|
1389
|
+
currencyPrefix: No,
|
|
1390
|
+
currencyInput: Zo,
|
|
1391
|
+
fieldInputError: Uo,
|
|
1392
|
+
fieldError: zo
|
|
1393
|
+
}, Ko = {
|
|
1394
|
+
$style: Wo
|
|
1395
|
+
}, Xo = /* @__PURE__ */ B(jo, [["__cssModules", Ko]]), Jo = ["for"], Qo = ["id", "value", "placeholder", "aria-invalid", "aria-describedby"], Yo = ["id"], es = /* @__PURE__ */ x({
|
|
1402
1396
|
__name: "PhoneInput",
|
|
1403
1397
|
props: {
|
|
1404
1398
|
question: {}
|
|
1405
1399
|
},
|
|
1406
1400
|
setup(e) {
|
|
1407
1401
|
let t = 0;
|
|
1408
|
-
const
|
|
1409
|
-
() =>
|
|
1410
|
-
),
|
|
1411
|
-
() =>
|
|
1402
|
+
const a = e, r = F("dtc-onboarding"), n = `pi-${++t}`, s = k(
|
|
1403
|
+
() => r.getAnswer(a.question.key) ?? ""
|
|
1404
|
+
), i = k(
|
|
1405
|
+
() => r.validationErrors.value[a.question.key]
|
|
1412
1406
|
);
|
|
1413
|
-
function
|
|
1414
|
-
const
|
|
1415
|
-
return
|
|
1407
|
+
function l(p) {
|
|
1408
|
+
const m = p.replace(/\D/g, "").slice(0, 10);
|
|
1409
|
+
return m.length <= 3 ? m : m.length <= 6 ? `(${m.slice(0, 3)}) ${m.slice(3)}` : `(${m.slice(0, 3)}) ${m.slice(3, 6)}-${m.slice(6)}`;
|
|
1416
1410
|
}
|
|
1417
|
-
function p
|
|
1418
|
-
const
|
|
1419
|
-
|
|
1411
|
+
function v(p) {
|
|
1412
|
+
const h = p.target.value.replace(/\D/g, "").slice(0, 10);
|
|
1413
|
+
r.setAnswer(a.question.key, h || void 0);
|
|
1420
1414
|
}
|
|
1421
|
-
return (
|
|
1422
|
-
class:
|
|
1415
|
+
return (p, m) => (d(), f("div", {
|
|
1416
|
+
class: o(p.$style.fieldGroup)
|
|
1423
1417
|
}, [
|
|
1424
|
-
|
|
1425
|
-
class:
|
|
1426
|
-
for: `${
|
|
1427
|
-
}, C(e.question.label), 11,
|
|
1428
|
-
|
|
1429
|
-
id: `${
|
|
1418
|
+
u("label", {
|
|
1419
|
+
class: o(p.$style.fieldLabel),
|
|
1420
|
+
for: `${n}-${e.question.key}`
|
|
1421
|
+
}, C(e.question.label), 11, Jo),
|
|
1422
|
+
u("input", {
|
|
1423
|
+
id: `${n}-${e.question.key}`,
|
|
1430
1424
|
type: "tel",
|
|
1431
|
-
class:
|
|
1432
|
-
value:
|
|
1425
|
+
class: o([p.$style.fieldInput, i.value ? p.$style.fieldInputError : ""]),
|
|
1426
|
+
value: l(s.value),
|
|
1433
1427
|
placeholder: e.question.placeholder || "(555) 555-5555",
|
|
1434
|
-
"aria-invalid":
|
|
1435
|
-
"aria-describedby":
|
|
1436
|
-
onInput:
|
|
1437
|
-
}, null, 42,
|
|
1438
|
-
|
|
1428
|
+
"aria-invalid": i.value ? "true" : void 0,
|
|
1429
|
+
"aria-describedby": i.value ? `${n}-${e.question.key}-error` : void 0,
|
|
1430
|
+
onInput: v
|
|
1431
|
+
}, null, 42, Qo),
|
|
1432
|
+
i.value ? (d(), f("p", {
|
|
1439
1433
|
key: 0,
|
|
1440
|
-
id: `${
|
|
1441
|
-
class:
|
|
1434
|
+
id: `${n}-${e.question.key}-error`,
|
|
1435
|
+
class: o(p.$style.fieldError),
|
|
1442
1436
|
role: "alert"
|
|
1443
|
-
}, C(
|
|
1437
|
+
}, C(i.value), 11, Yo)) : w("", !0)
|
|
1444
1438
|
], 2));
|
|
1445
1439
|
}
|
|
1446
|
-
}),
|
|
1447
|
-
fieldGroup:
|
|
1448
|
-
fieldLabel:
|
|
1449
|
-
fieldInput:
|
|
1450
|
-
fieldInputError:
|
|
1451
|
-
fieldError:
|
|
1452
|
-
},
|
|
1453
|
-
$style:
|
|
1454
|
-
},
|
|
1440
|
+
}), ts = "_fieldGroup_p6z3v_2", ns = "_fieldLabel_p6z3v_8", os = "_fieldInput_p6z3v_15", ss = "_fieldInputError_p6z3v_37", rs = "_fieldError_p6z3v_41", as = {
|
|
1441
|
+
fieldGroup: ts,
|
|
1442
|
+
fieldLabel: ns,
|
|
1443
|
+
fieldInput: os,
|
|
1444
|
+
fieldInputError: ss,
|
|
1445
|
+
fieldError: rs
|
|
1446
|
+
}, ls = {
|
|
1447
|
+
$style: as
|
|
1448
|
+
}, is = /* @__PURE__ */ B(es, [["__cssModules", ls]]), us = ["checked"], cs = /* @__PURE__ */ x({
|
|
1455
1449
|
__name: "ToggleInput",
|
|
1456
1450
|
props: {
|
|
1457
1451
|
question: {}
|
|
1458
1452
|
},
|
|
1459
1453
|
setup(e) {
|
|
1460
|
-
const t = e,
|
|
1461
|
-
() =>
|
|
1462
|
-
), s = k(() => t.question.
|
|
1463
|
-
|
|
1464
|
-
|
|
1454
|
+
const t = e, a = F("dtc-onboarding"), r = F("dtc-consent-slots", {}), n = k(
|
|
1455
|
+
() => a.getAnswer(t.question.key)
|
|
1456
|
+
), s = k(() => t.question.label), i = k(
|
|
1457
|
+
() => t.question.key === "seller.sms_opt_in" && !!r["sms-consent-text"]
|
|
1458
|
+
);
|
|
1459
|
+
function l(v) {
|
|
1460
|
+
a.setAnswer(
|
|
1465
1461
|
t.question.key,
|
|
1466
|
-
|
|
1462
|
+
v.target.checked
|
|
1467
1463
|
);
|
|
1468
1464
|
}
|
|
1469
|
-
return (
|
|
1470
|
-
class:
|
|
1465
|
+
return (v, p) => (d(), f("div", {
|
|
1466
|
+
class: o(v.$style.toggleGroup)
|
|
1471
1467
|
}, [
|
|
1472
|
-
|
|
1473
|
-
class:
|
|
1468
|
+
u("label", {
|
|
1469
|
+
class: o(v.$style.toggleLabel)
|
|
1474
1470
|
}, [
|
|
1475
|
-
|
|
1471
|
+
u("input", {
|
|
1476
1472
|
type: "checkbox",
|
|
1477
|
-
class:
|
|
1478
|
-
checked:
|
|
1479
|
-
onChange:
|
|
1480
|
-
}, null, 42,
|
|
1481
|
-
|
|
1482
|
-
class:
|
|
1483
|
-
},
|
|
1473
|
+
class: o(v.$style.toggleCheckbox),
|
|
1474
|
+
checked: n.value === !0,
|
|
1475
|
+
onChange: l
|
|
1476
|
+
}, null, 42, us),
|
|
1477
|
+
u("span", {
|
|
1478
|
+
class: o(v.$style.toggleText)
|
|
1479
|
+
}, [
|
|
1480
|
+
i.value ? (d(), G(me(() => {
|
|
1481
|
+
var m, h;
|
|
1482
|
+
return (h = (m = I(r))["sms-consent-text"]) == null ? void 0 : h.call(m);
|
|
1483
|
+
}), { key: 0 })) : (d(), f(O, { key: 1 }, [
|
|
1484
|
+
se(C(s.value), 1)
|
|
1485
|
+
], 64))
|
|
1486
|
+
], 2)
|
|
1484
1487
|
], 2)
|
|
1485
1488
|
], 2));
|
|
1486
1489
|
}
|
|
1487
|
-
}),
|
|
1488
|
-
toggleGroup:
|
|
1489
|
-
toggleLabel:
|
|
1490
|
-
toggleCheckbox:
|
|
1491
|
-
toggleText:
|
|
1492
|
-
},
|
|
1493
|
-
$style:
|
|
1494
|
-
},
|
|
1490
|
+
}), ds = "_toggleGroup_1wi5o_2", vs = "_toggleLabel_1wi5o_6", ps = "_toggleCheckbox_1wi5o_14", ys = "_toggleText_1wi5o_23", fs = {
|
|
1491
|
+
toggleGroup: ds,
|
|
1492
|
+
toggleLabel: vs,
|
|
1493
|
+
toggleCheckbox: ps,
|
|
1494
|
+
toggleText: ys
|
|
1495
|
+
}, gs = {
|
|
1496
|
+
$style: fs
|
|
1497
|
+
}, hs = /* @__PURE__ */ B(cs, [["__cssModules", gs]]), ms = ["value", "placeholder", "aria-label", "aria-expanded", "aria-invalid", "aria-describedby", "aria-controls", "aria-activedescendant"], bs = ["id", "aria-selected", "onClick"], $s = ["id"], he = 4, oe = 8, Cs = 240, ks = 80, _s = /* @__PURE__ */ x({
|
|
1495
1498
|
__name: "SearchableDropdownInput",
|
|
1496
1499
|
props: {
|
|
1497
1500
|
question: {}
|
|
1498
1501
|
},
|
|
1499
1502
|
setup(e) {
|
|
1500
1503
|
let t = 0;
|
|
1501
|
-
function
|
|
1502
|
-
const
|
|
1503
|
-
for (let $ =
|
|
1504
|
-
const
|
|
1505
|
-
for (let
|
|
1506
|
-
const V =
|
|
1507
|
-
V.startsWith("--od-") && !(V in
|
|
1504
|
+
function a(c) {
|
|
1505
|
+
const b = {};
|
|
1506
|
+
for (let $ = c; $; $ = $.parentElement) {
|
|
1507
|
+
const S = $.style;
|
|
1508
|
+
for (let A = 0; A < S.length; A++) {
|
|
1509
|
+
const V = S[A];
|
|
1510
|
+
V.startsWith("--od-") && !(V in b) && (b[V] = S.getPropertyValue(V));
|
|
1508
1511
|
}
|
|
1509
1512
|
}
|
|
1510
|
-
return
|
|
1513
|
+
return b;
|
|
1511
1514
|
}
|
|
1512
|
-
const
|
|
1515
|
+
const r = e, n = F("dtc-onboarding"), s = F(
|
|
1513
1516
|
"opendoor-client",
|
|
1514
1517
|
void 0
|
|
1515
|
-
),
|
|
1516
|
-
() =>
|
|
1517
|
-
),
|
|
1518
|
-
() =>
|
|
1519
|
-
),
|
|
1520
|
-
|
|
1521
|
-
[() =>
|
|
1522
|
-
(
|
|
1523
|
-
let
|
|
1518
|
+
), i = `sd-${++t}`, l = `${i}-${r.question.key}-listbox`, v = `${i}-${r.question.key}-combobox`, p = k(
|
|
1519
|
+
() => n.getAnswer(r.question.key)
|
|
1520
|
+
), m = k(
|
|
1521
|
+
() => n.validationErrors.value[r.question.key]
|
|
1522
|
+
), h = L(""), y = L(!1), _ = L([]), P = L(!1), E = L(-1), R = L(null), T = L(null), N = L(null), H = L(null), M = L({});
|
|
1523
|
+
Z(
|
|
1524
|
+
[() => r.question.dataSource, () => r.question.options, () => s == null ? void 0 : s.value],
|
|
1525
|
+
(c, b, $) => {
|
|
1526
|
+
let S = !1;
|
|
1524
1527
|
$(() => {
|
|
1525
|
-
|
|
1526
|
-
}),
|
|
1527
|
-
|
|
1528
|
+
S = !0;
|
|
1529
|
+
}), r.question.dataSource === "homebuilders" && (s != null && s.value) ? (P.value = !0, s.value.getHomebuilders().then((A) => {
|
|
1530
|
+
S || (_.value = A.homebuilders.map((V) => ({
|
|
1528
1531
|
label: V.displayName,
|
|
1529
1532
|
value: V.identifier
|
|
1530
1533
|
})));
|
|
1531
1534
|
}).catch(() => {
|
|
1532
|
-
|
|
1533
|
-
label:
|
|
1534
|
-
value: String(
|
|
1535
|
-
})) :
|
|
1535
|
+
S || (r.question.options ? _.value = r.question.options.map((A) => ({
|
|
1536
|
+
label: A.label,
|
|
1537
|
+
value: String(A.value)
|
|
1538
|
+
})) : _.value = []);
|
|
1536
1539
|
}).finally(() => {
|
|
1537
|
-
|
|
1538
|
-
})) :
|
|
1539
|
-
label:
|
|
1540
|
-
value: String(
|
|
1541
|
-
})) :
|
|
1540
|
+
S || (P.value = !1);
|
|
1541
|
+
})) : r.question.options ? _.value = r.question.options.map((A) => ({
|
|
1542
|
+
label: A.label,
|
|
1543
|
+
value: String(A.value)
|
|
1544
|
+
})) : _.value = [];
|
|
1542
1545
|
},
|
|
1543
1546
|
{ immediate: !0 }
|
|
1544
1547
|
);
|
|
1545
|
-
const
|
|
1546
|
-
() =>
|
|
1547
|
-
(
|
|
1548
|
-
) :
|
|
1549
|
-
),
|
|
1548
|
+
const q = k(
|
|
1549
|
+
() => h.value ? _.value.filter(
|
|
1550
|
+
(c) => c.label.toLowerCase().includes(h.value.toLowerCase())
|
|
1551
|
+
) : _.value
|
|
1552
|
+
), X = k(
|
|
1550
1553
|
() => {
|
|
1551
|
-
var
|
|
1552
|
-
return (
|
|
1554
|
+
var c;
|
|
1555
|
+
return (c = _.value.find((b) => b.value === p.value)) == null ? void 0 : c.label;
|
|
1553
1556
|
}
|
|
1554
1557
|
);
|
|
1555
|
-
function
|
|
1556
|
-
|
|
1558
|
+
function U(c) {
|
|
1559
|
+
n.setAnswer(r.question.key, c), y.value = !1, h.value = "", E.value = -1;
|
|
1557
1560
|
}
|
|
1558
|
-
function
|
|
1559
|
-
|
|
1561
|
+
function ne(c) {
|
|
1562
|
+
h.value = c.target.value, E.value = -1, y.value || (y.value = !0);
|
|
1560
1563
|
}
|
|
1561
|
-
function
|
|
1562
|
-
if (!
|
|
1563
|
-
(
|
|
1564
|
+
function z(c) {
|
|
1565
|
+
if (!y.value) {
|
|
1566
|
+
(c.key === "ArrowDown" || c.key === "Enter") && (c.preventDefault(), y.value = !0);
|
|
1564
1567
|
return;
|
|
1565
1568
|
}
|
|
1566
|
-
switch (
|
|
1569
|
+
switch (c.key) {
|
|
1567
1570
|
case "ArrowDown":
|
|
1568
|
-
|
|
1571
|
+
c.preventDefault(), q.value.length > 0 && (E.value = E.value < q.value.length - 1 ? E.value + 1 : 0);
|
|
1569
1572
|
break;
|
|
1570
1573
|
case "ArrowUp":
|
|
1571
|
-
|
|
1574
|
+
c.preventDefault(), q.value.length > 0 && (E.value = E.value > 0 ? E.value - 1 : q.value.length - 1);
|
|
1572
1575
|
break;
|
|
1573
1576
|
case "Enter":
|
|
1574
|
-
|
|
1577
|
+
c.preventDefault(), E.value >= 0 && E.value < q.value.length && U(q.value[E.value].value);
|
|
1575
1578
|
break;
|
|
1576
1579
|
case "Escape":
|
|
1577
|
-
|
|
1580
|
+
c.preventDefault(), y.value = !1, E.value = -1;
|
|
1578
1581
|
break;
|
|
1579
1582
|
}
|
|
1580
1583
|
}
|
|
1581
1584
|
function j() {
|
|
1582
|
-
const
|
|
1583
|
-
if (!
|
|
1584
|
-
const
|
|
1585
|
-
|
|
1586
|
-
Math.min(
|
|
1587
|
-
), ye = Math.min(
|
|
1588
|
-
|
|
1589
|
-
top:
|
|
1590
|
-
left:
|
|
1585
|
+
const c = T.value;
|
|
1586
|
+
if (!c) return;
|
|
1587
|
+
const b = c.getBoundingClientRect(), $ = window.visualViewport, S = ($ == null ? void 0 : $.height) ?? window.innerHeight, A = ($ == null ? void 0 : $.width) ?? window.innerWidth, V = ($ == null ? void 0 : $.offsetTop) ?? 0, pe = ($ == null ? void 0 : $.offsetLeft) ?? 0, be = V + S - b.bottom - he - oe, $e = Math.max(
|
|
1588
|
+
ks,
|
|
1589
|
+
Math.min(Cs, be)
|
|
1590
|
+
), ye = Math.min(b.width, A - oe * 2), Ce = pe + oe, ke = pe + A - ye - oe, _e = Math.max(Ce, Math.min(b.left, ke));
|
|
1591
|
+
H.value = {
|
|
1592
|
+
top: b.bottom + window.scrollY + he,
|
|
1593
|
+
left: _e + window.scrollX,
|
|
1591
1594
|
width: ye,
|
|
1592
|
-
maxHeight:
|
|
1595
|
+
maxHeight: $e
|
|
1593
1596
|
};
|
|
1594
1597
|
}
|
|
1595
|
-
const
|
|
1596
|
-
const
|
|
1597
|
-
return
|
|
1598
|
+
const le = k(() => {
|
|
1599
|
+
const c = H.value;
|
|
1600
|
+
return c ? {
|
|
1598
1601
|
position: "absolute",
|
|
1599
|
-
top: `${
|
|
1600
|
-
left: `${
|
|
1602
|
+
top: `${c.top}px`,
|
|
1603
|
+
left: `${c.left}px`,
|
|
1601
1604
|
right: "auto",
|
|
1602
|
-
width: `${
|
|
1603
|
-
maxHeight: `${
|
|
1604
|
-
...
|
|
1605
|
+
width: `${c.width}px`,
|
|
1606
|
+
maxHeight: `${c.maxHeight}px`,
|
|
1607
|
+
...M.value
|
|
1605
1608
|
} : { display: "none" };
|
|
1606
1609
|
});
|
|
1607
|
-
let
|
|
1608
|
-
function
|
|
1609
|
-
const
|
|
1610
|
-
window.addEventListener("scroll", j, !0), window.addEventListener("resize", j),
|
|
1610
|
+
let J = null;
|
|
1611
|
+
function ie() {
|
|
1612
|
+
const c = window.visualViewport;
|
|
1613
|
+
window.addEventListener("scroll", j, !0), window.addEventListener("resize", j), c == null || c.addEventListener("resize", j), c == null || c.addEventListener("scroll", j);
|
|
1611
1614
|
}
|
|
1612
|
-
function
|
|
1613
|
-
const
|
|
1614
|
-
window.removeEventListener("scroll", j, !0), window.removeEventListener("resize", j),
|
|
1615
|
+
function ee() {
|
|
1616
|
+
const c = window.visualViewport;
|
|
1617
|
+
window.removeEventListener("scroll", j, !0), window.removeEventListener("resize", j), c == null || c.removeEventListener("resize", j), c == null || c.removeEventListener("scroll", j), J !== null && (window.clearTimeout(J), J = null);
|
|
1615
1618
|
}
|
|
1616
|
-
|
|
1617
|
-
|
|
1619
|
+
Z(y, (c) => {
|
|
1620
|
+
c ? (T.value && (M.value = a(T.value)), j(), ie(), J = window.setTimeout(j, 300)) : (H.value = null, ee());
|
|
1618
1621
|
});
|
|
1619
|
-
function
|
|
1620
|
-
var $,
|
|
1621
|
-
const
|
|
1622
|
-
($ =
|
|
1622
|
+
function g(c) {
|
|
1623
|
+
var $, S;
|
|
1624
|
+
const b = c.target;
|
|
1625
|
+
($ = R.value) != null && $.contains(b) || (S = N.value) != null && S.contains(b) || (y.value = !1);
|
|
1623
1626
|
}
|
|
1624
1627
|
return ve(() => {
|
|
1625
|
-
document.addEventListener("mousedown",
|
|
1626
|
-
}),
|
|
1627
|
-
document.removeEventListener("mousedown",
|
|
1628
|
-
}), (
|
|
1628
|
+
document.addEventListener("mousedown", g);
|
|
1629
|
+
}), W(() => {
|
|
1630
|
+
document.removeEventListener("mousedown", g), ee();
|
|
1631
|
+
}), (c, b) => (d(), f("div", {
|
|
1629
1632
|
ref_key: "containerRef",
|
|
1630
|
-
ref:
|
|
1631
|
-
class:
|
|
1633
|
+
ref: R,
|
|
1634
|
+
class: o(c.$style.fieldGroup)
|
|
1632
1635
|
}, [
|
|
1633
|
-
|
|
1636
|
+
u("div", {
|
|
1634
1637
|
ref_key: "anchorRef",
|
|
1635
|
-
ref:
|
|
1636
|
-
class:
|
|
1638
|
+
ref: T,
|
|
1639
|
+
class: o(c.$style.searchableDropdown)
|
|
1637
1640
|
}, [
|
|
1638
|
-
|
|
1639
|
-
id:
|
|
1641
|
+
u("input", {
|
|
1642
|
+
id: v,
|
|
1640
1643
|
type: "text",
|
|
1641
|
-
class:
|
|
1642
|
-
value:
|
|
1644
|
+
class: o(c.$style.fieldInput),
|
|
1645
|
+
value: y.value ? h.value : X.value ?? "",
|
|
1643
1646
|
placeholder: e.question.placeholder || "Select or search...",
|
|
1644
1647
|
"aria-label": e.question.label,
|
|
1645
|
-
"aria-expanded":
|
|
1646
|
-
"aria-invalid":
|
|
1647
|
-
"aria-describedby":
|
|
1648
|
+
"aria-expanded": y.value,
|
|
1649
|
+
"aria-invalid": m.value ? "true" : void 0,
|
|
1650
|
+
"aria-describedby": m.value ? `${i}-${e.question.key}-error` : void 0,
|
|
1648
1651
|
role: "combobox",
|
|
1649
1652
|
"aria-haspopup": "listbox",
|
|
1650
|
-
"aria-controls":
|
|
1651
|
-
"aria-activedescendant":
|
|
1652
|
-
onInput:
|
|
1653
|
-
onFocus:
|
|
1654
|
-
onKeydown:
|
|
1655
|
-
}, null, 42,
|
|
1656
|
-
|
|
1653
|
+
"aria-controls": y.value ? l : void 0,
|
|
1654
|
+
"aria-activedescendant": y.value && E.value >= 0 ? `${l}-option-${E.value}` : void 0,
|
|
1655
|
+
onInput: ne,
|
|
1656
|
+
onFocus: b[0] || (b[0] = ($) => y.value = !0),
|
|
1657
|
+
onKeydown: z
|
|
1658
|
+
}, null, 42, ms),
|
|
1659
|
+
u("button", {
|
|
1657
1660
|
type: "button",
|
|
1658
|
-
class:
|
|
1661
|
+
class: o(c.$style.searchableDropdownToggle),
|
|
1659
1662
|
"aria-label": "Toggle dropdown",
|
|
1660
1663
|
tabindex: "-1",
|
|
1661
|
-
onClick:
|
|
1662
|
-
}, [...
|
|
1663
|
-
|
|
1664
|
+
onClick: b[1] || (b[1] = ($) => y.value = !y.value)
|
|
1665
|
+
}, [...b[3] || (b[3] = [
|
|
1666
|
+
u("svg", {
|
|
1664
1667
|
width: "12",
|
|
1665
1668
|
height: "8",
|
|
1666
1669
|
viewBox: "0 0 12 8",
|
|
1667
1670
|
fill: "none"
|
|
1668
1671
|
}, [
|
|
1669
|
-
|
|
1672
|
+
u("path", {
|
|
1670
1673
|
d: "M1 1l5 5 5-5",
|
|
1671
1674
|
stroke: "currentColor",
|
|
1672
1675
|
"stroke-width": "1.5",
|
|
@@ -1676,218 +1679,218 @@ const En = {
|
|
|
1676
1679
|
], -1)
|
|
1677
1680
|
])], 2)
|
|
1678
1681
|
], 2),
|
|
1679
|
-
|
|
1682
|
+
y.value ? (d(), G(Ie, {
|
|
1680
1683
|
key: 0,
|
|
1681
1684
|
to: "body"
|
|
1682
1685
|
}, [
|
|
1683
|
-
|
|
1686
|
+
u("div", {
|
|
1684
1687
|
ref_key: "portalRef",
|
|
1685
|
-
ref:
|
|
1686
|
-
class:
|
|
1688
|
+
ref: N,
|
|
1689
|
+
class: o(c.$style.searchableDropdownList),
|
|
1687
1690
|
role: "listbox",
|
|
1688
|
-
id:
|
|
1689
|
-
style:
|
|
1691
|
+
id: l,
|
|
1692
|
+
style: Y(le.value)
|
|
1690
1693
|
}, [
|
|
1691
|
-
P.value ? (
|
|
1694
|
+
P.value ? (d(), f("div", {
|
|
1692
1695
|
key: 0,
|
|
1693
|
-
class:
|
|
1694
|
-
}, " Loading... ", 2)) :
|
|
1696
|
+
class: o(c.$style.searchableDropdownEmpty)
|
|
1697
|
+
}, " Loading... ", 2)) : q.value.length === 0 ? (d(), f("div", {
|
|
1695
1698
|
key: 1,
|
|
1696
|
-
class:
|
|
1697
|
-
}, " No results found ", 2)) : (
|
|
1699
|
+
class: o(c.$style.searchableDropdownEmpty)
|
|
1700
|
+
}, " No results found ", 2)) : (d(!0), f(O, { key: 2 }, K(q.value, ($, S) => (d(), f("button", {
|
|
1698
1701
|
key: $.value,
|
|
1699
|
-
id: `${
|
|
1702
|
+
id: `${l}-option-${S}`,
|
|
1700
1703
|
type: "button",
|
|
1701
1704
|
role: "option",
|
|
1702
|
-
"aria-selected": $.value ===
|
|
1703
|
-
class:
|
|
1704
|
-
|
|
1705
|
-
$.value ===
|
|
1706
|
-
|
|
1705
|
+
"aria-selected": $.value === p.value,
|
|
1706
|
+
class: o([
|
|
1707
|
+
c.$style.searchableDropdownOption,
|
|
1708
|
+
$.value === p.value ? c.$style.searchableDropdownOptionSelected : "",
|
|
1709
|
+
S === E.value ? c.$style.searchableDropdownOptionHighlighted : ""
|
|
1707
1710
|
]),
|
|
1708
|
-
onMousedown:
|
|
1711
|
+
onMousedown: b[2] || (b[2] = de(() => {
|
|
1709
1712
|
}, ["prevent"])),
|
|
1710
|
-
onClick: (
|
|
1711
|
-
}, C($.label), 43,
|
|
1713
|
+
onClick: (A) => U($.value)
|
|
1714
|
+
}, C($.label), 43, bs))), 128))
|
|
1712
1715
|
], 6)
|
|
1713
|
-
])) :
|
|
1714
|
-
|
|
1716
|
+
])) : w("", !0),
|
|
1717
|
+
m.value ? (d(), f("p", {
|
|
1715
1718
|
key: 1,
|
|
1716
|
-
id: `${
|
|
1717
|
-
class:
|
|
1719
|
+
id: `${i}-${e.question.key}-error`,
|
|
1720
|
+
class: o(c.$style.fieldError),
|
|
1718
1721
|
role: "alert"
|
|
1719
|
-
}, C(
|
|
1722
|
+
}, C(m.value), 11, $s)) : w("", !0)
|
|
1720
1723
|
], 2));
|
|
1721
1724
|
}
|
|
1722
|
-
}),
|
|
1723
|
-
fieldGroup:
|
|
1724
|
-
searchableDropdown:
|
|
1725
|
-
fieldInput:
|
|
1726
|
-
searchableDropdownToggle:
|
|
1727
|
-
searchableDropdownList:
|
|
1728
|
-
searchableDropdownOption:
|
|
1729
|
-
searchableDropdownOptionSelected:
|
|
1730
|
-
searchableDropdownOptionHighlighted:
|
|
1731
|
-
searchableDropdownEmpty:
|
|
1725
|
+
}), ws = "_fieldGroup_1adip_2", Ls = "_searchableDropdown_1adip_8", Is = "_fieldInput_1adip_14", Es = "_searchableDropdownToggle_1adip_40", Ms = "_searchableDropdownList_1adip_53", qs = "_searchableDropdownOption_1adip_62", Ss = "_searchableDropdownOptionSelected_1adip_80", As = "_searchableDropdownOptionHighlighted_1adip_85", Ts = "_searchableDropdownEmpty_1adip_89", xs = "_fieldError_1adip_95", Ds = {
|
|
1726
|
+
fieldGroup: ws,
|
|
1727
|
+
searchableDropdown: Ls,
|
|
1728
|
+
fieldInput: Is,
|
|
1729
|
+
searchableDropdownToggle: Es,
|
|
1730
|
+
searchableDropdownList: Ms,
|
|
1731
|
+
searchableDropdownOption: qs,
|
|
1732
|
+
searchableDropdownOptionSelected: Ss,
|
|
1733
|
+
searchableDropdownOptionHighlighted: As,
|
|
1734
|
+
searchableDropdownEmpty: Ts,
|
|
1732
1735
|
fieldError: xs
|
|
1733
|
-
},
|
|
1734
|
-
$style:
|
|
1735
|
-
},
|
|
1736
|
+
}, Bs = {
|
|
1737
|
+
$style: Ds
|
|
1738
|
+
}, Ps = /* @__PURE__ */ B(_s, [["__cssModules", Bs]]), Fs = ["aria-label"], Gs = /* @__PURE__ */ x({
|
|
1736
1739
|
__name: "DtcPage",
|
|
1737
1740
|
setup(e) {
|
|
1738
|
-
const t =
|
|
1739
|
-
return
|
|
1741
|
+
const t = F("dtc-onboarding"), a = F("dtc-consent-slots", {}), r = L(null);
|
|
1742
|
+
return Z(
|
|
1740
1743
|
() => {
|
|
1741
|
-
var
|
|
1742
|
-
return (
|
|
1744
|
+
var n;
|
|
1745
|
+
return (n = t.currentPage.value) == null ? void 0 : n.id;
|
|
1743
1746
|
},
|
|
1744
1747
|
() => {
|
|
1745
|
-
var
|
|
1746
|
-
(s = (
|
|
1748
|
+
var n, s, i;
|
|
1749
|
+
(s = (n = r.value) == null ? void 0 : n.scrollTo) == null || s.call(n, { top: 0, behavior: "smooth" }), (i = r.value) == null || i.focus();
|
|
1747
1750
|
}
|
|
1748
|
-
), (
|
|
1749
|
-
var
|
|
1750
|
-
return I(t).currentPage.value ? (
|
|
1751
|
+
), (n, s) => {
|
|
1752
|
+
var i;
|
|
1753
|
+
return I(t).currentPage.value ? (d(), f("div", {
|
|
1751
1754
|
key: 0,
|
|
1752
1755
|
ref_key: "containerRef",
|
|
1753
|
-
ref:
|
|
1754
|
-
class: n
|
|
1756
|
+
ref: r,
|
|
1757
|
+
class: o(n.$style.pageContent),
|
|
1755
1758
|
tabindex: "-1",
|
|
1756
1759
|
role: "region",
|
|
1757
1760
|
"aria-label": I(t).currentPage.value.title
|
|
1758
1761
|
}, [
|
|
1759
|
-
(
|
|
1760
|
-
key:
|
|
1762
|
+
(d(!0), f(O, null, K(I(t).visibleQuestions.value, (l) => (d(), f(O, {
|
|
1763
|
+
key: l.key
|
|
1761
1764
|
}, [
|
|
1762
|
-
|
|
1765
|
+
l.style === "radio-card" ? (d(), G(In, {
|
|
1763
1766
|
key: 0,
|
|
1764
|
-
question:
|
|
1765
|
-
}, null, 8, ["question"])) :
|
|
1767
|
+
question: l
|
|
1768
|
+
}, null, 8, ["question"])) : l.style === "image-card" ? (d(), G(Hn, {
|
|
1766
1769
|
key: 1,
|
|
1767
|
-
question:
|
|
1768
|
-
}, null, 8, ["question"])) :
|
|
1770
|
+
question: l
|
|
1771
|
+
}, null, 8, ["question"])) : l.style === "checkbox-card" ? (d(), G(ro, {
|
|
1769
1772
|
key: 2,
|
|
1770
|
-
question:
|
|
1771
|
-
}, null, 8, ["question"])) :
|
|
1773
|
+
question: l
|
|
1774
|
+
}, null, 8, ["question"])) : l.style === "dropdown" ? (d(), G(Co, {
|
|
1772
1775
|
key: 3,
|
|
1773
|
-
question:
|
|
1774
|
-
}, null, 8, ["question"])) :
|
|
1776
|
+
question: l
|
|
1777
|
+
}, null, 8, ["question"])) : l.style === "input" || l.style === "email" ? (d(), G(Po, {
|
|
1775
1778
|
key: 4,
|
|
1776
|
-
question:
|
|
1777
|
-
}, null, 8, ["question"])) :
|
|
1779
|
+
question: l
|
|
1780
|
+
}, null, 8, ["question"])) : l.style === "currency" ? (d(), G(Xo, {
|
|
1778
1781
|
key: 5,
|
|
1779
|
-
question:
|
|
1780
|
-
}, null, 8, ["question"])) :
|
|
1782
|
+
question: l
|
|
1783
|
+
}, null, 8, ["question"])) : l.style === "phone" ? (d(), G(is, {
|
|
1781
1784
|
key: 6,
|
|
1782
|
-
question:
|
|
1783
|
-
}, null, 8, ["question"])) :
|
|
1785
|
+
question: l
|
|
1786
|
+
}, null, 8, ["question"])) : l.style === "toggle" ? (d(), G(hs, {
|
|
1784
1787
|
key: 7,
|
|
1785
|
-
question:
|
|
1786
|
-
}, null, 8, ["question"])) :
|
|
1788
|
+
question: l
|
|
1789
|
+
}, null, 8, ["question"])) : l.style === "searchable-dropdown" ? (d(), G(Ps, {
|
|
1787
1790
|
key: 8,
|
|
1788
|
-
question:
|
|
1789
|
-
}, null, 8, ["question"])) :
|
|
1791
|
+
question: l
|
|
1792
|
+
}, null, 8, ["question"])) : w("", !0)
|
|
1790
1793
|
], 64))), 128)),
|
|
1791
|
-
((
|
|
1792
|
-
|
|
1794
|
+
((i = I(t).currentPage.value) == null ? void 0 : i.id) === "contact-info" ? (d(), f(O, { key: 0 }, [
|
|
1795
|
+
u("button", {
|
|
1793
1796
|
type: "button",
|
|
1794
|
-
class: n
|
|
1795
|
-
onClick: s[0] || (s[0] = (
|
|
1797
|
+
class: o(n.$style.ctaButton),
|
|
1798
|
+
onClick: s[0] || (s[0] = (l) => I(t).goToNext())
|
|
1796
1799
|
}, C(I(t).currentPage.value.submitLabel ?? "Next"), 3),
|
|
1797
|
-
I(
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
}
|
|
1800
|
+
I(a)["contact-consent-text"] ? (d(), G(me(() => {
|
|
1801
|
+
var l, v;
|
|
1802
|
+
return (v = (l = I(a))["contact-consent-text"]) == null ? void 0 : v.call(l);
|
|
1803
|
+
}), { key: 0 })) : (d(), f("p", {
|
|
1801
1804
|
key: 1,
|
|
1802
|
-
class: n
|
|
1805
|
+
class: o(n.$style.consentText)
|
|
1803
1806
|
}, [
|
|
1804
|
-
|
|
1805
|
-
|
|
1807
|
+
se(" By pressing “" + C(I(t).currentPage.value.submitLabel ?? "Next") + ",” I agree to Opendoor’s ", 1),
|
|
1808
|
+
u("a", {
|
|
1806
1809
|
href: "https://www.opendoor.com/terms",
|
|
1807
1810
|
target: "_blank",
|
|
1808
1811
|
rel: "noopener noreferrer",
|
|
1809
|
-
class: n
|
|
1812
|
+
class: o(n.$style.consentLink)
|
|
1810
1813
|
}, "Terms of Service", 2),
|
|
1811
|
-
s[1] || (s[1] =
|
|
1812
|
-
|
|
1814
|
+
s[1] || (s[1] = se(" and ", -1)),
|
|
1815
|
+
u("a", {
|
|
1813
1816
|
href: "https://www.opendoor.com/privacy",
|
|
1814
1817
|
target: "_blank",
|
|
1815
1818
|
rel: "noopener noreferrer",
|
|
1816
|
-
class: n
|
|
1819
|
+
class: o(n.$style.consentLink)
|
|
1817
1820
|
}, "Privacy Policy", 2),
|
|
1818
|
-
s[2] || (s[2] =
|
|
1821
|
+
s[2] || (s[2] = se(". ", -1))
|
|
1819
1822
|
], 2))
|
|
1820
|
-
], 64)) :
|
|
1821
|
-
], 10,
|
|
1823
|
+
], 64)) : w("", !0)
|
|
1824
|
+
], 10, Fs)) : w("", !0);
|
|
1822
1825
|
};
|
|
1823
1826
|
}
|
|
1824
|
-
}),
|
|
1825
|
-
pageContent:
|
|
1826
|
-
consentText:
|
|
1827
|
-
consentLink:
|
|
1828
|
-
ctaButton:
|
|
1829
|
-
},
|
|
1830
|
-
$style:
|
|
1831
|
-
},
|
|
1827
|
+
}), Os = "_pageContent_1jpin_2", js = "_consentText_1jpin_13", Vs = "_consentLink_1jpin_21", Rs = "_ctaButton_1jpin_26", Hs = {
|
|
1828
|
+
pageContent: Os,
|
|
1829
|
+
consentText: js,
|
|
1830
|
+
consentLink: Vs,
|
|
1831
|
+
ctaButton: Rs
|
|
1832
|
+
}, Ns = {
|
|
1833
|
+
$style: Hs
|
|
1834
|
+
}, Zs = /* @__PURE__ */ B(Gs, [["__cssModules", Ns]]), Us = ["aria-valuenow"], zs = /* @__PURE__ */ x({
|
|
1832
1835
|
__name: "DtcProgressBar",
|
|
1833
1836
|
props: {
|
|
1834
1837
|
progress: {}
|
|
1835
1838
|
},
|
|
1836
1839
|
setup(e) {
|
|
1837
|
-
const t = e,
|
|
1840
|
+
const t = e, a = k(
|
|
1838
1841
|
() => Math.min(100, Math.max(0, t.progress * 100))
|
|
1839
1842
|
);
|
|
1840
|
-
return (
|
|
1841
|
-
class:
|
|
1843
|
+
return (r, n) => (d(), f("div", {
|
|
1844
|
+
class: o(r.$style.progressBar),
|
|
1842
1845
|
role: "progressbar",
|
|
1843
|
-
"aria-valuenow":
|
|
1846
|
+
"aria-valuenow": a.value,
|
|
1844
1847
|
"aria-valuemin": 0,
|
|
1845
1848
|
"aria-valuemax": 100
|
|
1846
1849
|
}, [
|
|
1847
|
-
|
|
1848
|
-
class:
|
|
1849
|
-
style:
|
|
1850
|
+
u("div", {
|
|
1851
|
+
class: o(r.$style.progressBarFill),
|
|
1852
|
+
style: Y({ width: `${a.value}%` })
|
|
1850
1853
|
}, null, 6)
|
|
1851
|
-
], 10,
|
|
1854
|
+
], 10, Us));
|
|
1852
1855
|
}
|
|
1853
|
-
}),
|
|
1854
|
-
progressBar:
|
|
1855
|
-
progressBarFill:
|
|
1856
|
-
},
|
|
1857
|
-
$style:
|
|
1858
|
-
},
|
|
1856
|
+
}), Ws = "_progressBar_y1k9k_2", Ks = "_progressBarFill_y1k9k_9", Xs = {
|
|
1857
|
+
progressBar: Ws,
|
|
1858
|
+
progressBarFill: Ks
|
|
1859
|
+
}, Js = {
|
|
1860
|
+
$style: Xs
|
|
1861
|
+
}, Qs = /* @__PURE__ */ B(zs, [["__cssModules", Js]]), Ys = { key: 1 }, er = /* @__PURE__ */ x({
|
|
1859
1862
|
__name: "DtcNavigation",
|
|
1860
1863
|
setup(e) {
|
|
1861
|
-
const t =
|
|
1864
|
+
const t = F("dtc-onboarding"), a = k(
|
|
1862
1865
|
() => {
|
|
1863
|
-
var
|
|
1864
|
-
return ((
|
|
1866
|
+
var n;
|
|
1867
|
+
return ((n = t.currentPage.value) == null ? void 0 : n.submitLabel) ?? "Next";
|
|
1865
1868
|
}
|
|
1866
|
-
),
|
|
1869
|
+
), r = k(
|
|
1867
1870
|
() => {
|
|
1868
|
-
var
|
|
1869
|
-
return ((
|
|
1871
|
+
var n;
|
|
1872
|
+
return ((n = t.currentPage.value) == null ? void 0 : n.id) === "contact-info";
|
|
1870
1873
|
}
|
|
1871
1874
|
);
|
|
1872
|
-
return (
|
|
1875
|
+
return (n, s) => r.value ? w("", !0) : (d(), f("nav", {
|
|
1873
1876
|
key: 0,
|
|
1874
|
-
class: n
|
|
1877
|
+
class: o(n.$style.navigation),
|
|
1875
1878
|
"aria-label": "Page navigation"
|
|
1876
1879
|
}, [
|
|
1877
|
-
|
|
1880
|
+
Q(Qs, {
|
|
1878
1881
|
progress: I(t).progress.value
|
|
1879
1882
|
}, null, 8, ["progress"]),
|
|
1880
|
-
|
|
1881
|
-
class: n
|
|
1883
|
+
u("div", {
|
|
1884
|
+
class: o(n.$style.navigationButtons)
|
|
1882
1885
|
}, [
|
|
1883
|
-
I(t).isFirstPage.value ? (
|
|
1886
|
+
I(t).isFirstPage.value ? (d(), f("div", Ys)) : (d(), f("button", {
|
|
1884
1887
|
key: 0,
|
|
1885
1888
|
type: "button",
|
|
1886
|
-
class: n
|
|
1889
|
+
class: o(n.$style.backButton),
|
|
1887
1890
|
"aria-label": "Go back",
|
|
1888
|
-
onClick:
|
|
1889
|
-
}, [...
|
|
1890
|
-
|
|
1891
|
+
onClick: s[0] || (s[0] = (i) => I(t).goToPrev())
|
|
1892
|
+
}, [...s[2] || (s[2] = [
|
|
1893
|
+
u("svg", {
|
|
1891
1894
|
width: "24",
|
|
1892
1895
|
height: "24",
|
|
1893
1896
|
viewBox: "0 0 24 24",
|
|
@@ -1897,31 +1900,31 @@ const En = {
|
|
|
1897
1900
|
"stroke-linecap": "round",
|
|
1898
1901
|
"stroke-linejoin": "round"
|
|
1899
1902
|
}, [
|
|
1900
|
-
|
|
1903
|
+
u("polyline", { points: "15 18 9 12 15 6" })
|
|
1901
1904
|
], -1)
|
|
1902
1905
|
])], 2)),
|
|
1903
|
-
|
|
1906
|
+
u("button", {
|
|
1904
1907
|
type: "button",
|
|
1905
|
-
class: n
|
|
1906
|
-
onClick:
|
|
1907
|
-
}, C(
|
|
1908
|
+
class: o(n.$style.nextButton),
|
|
1909
|
+
onClick: s[1] || (s[1] = (i) => I(t).goToNext())
|
|
1910
|
+
}, C(a.value), 3)
|
|
1908
1911
|
], 2)
|
|
1909
1912
|
], 2));
|
|
1910
1913
|
}
|
|
1911
|
-
}),
|
|
1912
|
-
navigation:
|
|
1913
|
-
navigationButtons:
|
|
1914
|
-
backButton:
|
|
1915
|
-
nextButton:
|
|
1916
|
-
},
|
|
1917
|
-
$style:
|
|
1918
|
-
},
|
|
1914
|
+
}), tr = "_navigation_14jpi_2", nr = "_navigationButtons_14jpi_16", or = "_backButton_14jpi_22", sr = "_nextButton_14jpi_45", rr = {
|
|
1915
|
+
navigation: tr,
|
|
1916
|
+
navigationButtons: nr,
|
|
1917
|
+
backButton: or,
|
|
1918
|
+
nextButton: sr
|
|
1919
|
+
}, ar = {
|
|
1920
|
+
$style: rr
|
|
1921
|
+
}, lr = /* @__PURE__ */ B(er, [["__cssModules", ar]]), ir = /* @__PURE__ */ x({
|
|
1919
1922
|
__name: "DtcLayout",
|
|
1920
1923
|
props: {
|
|
1921
1924
|
address: {}
|
|
1922
1925
|
},
|
|
1923
1926
|
setup(e) {
|
|
1924
|
-
const t = e,
|
|
1927
|
+
const t = e, a = F("dtc-onboarding"), r = k(
|
|
1925
1928
|
() => [
|
|
1926
1929
|
t.address.street1,
|
|
1927
1930
|
t.address.street2,
|
|
@@ -1930,147 +1933,145 @@ const En = {
|
|
|
1930
1933
|
t.address.postalCode
|
|
1931
1934
|
].filter(Boolean).join(", ")
|
|
1932
1935
|
);
|
|
1933
|
-
return (
|
|
1936
|
+
return (n, s) => I(a).currentPage.value ? (d(), f("div", {
|
|
1934
1937
|
key: 0,
|
|
1935
|
-
class: n
|
|
1938
|
+
class: o(n.$style.layout)
|
|
1936
1939
|
}, [
|
|
1937
|
-
|
|
1938
|
-
class: n
|
|
1940
|
+
u("div", {
|
|
1941
|
+
class: o(n.$style.layoutScrollable)
|
|
1939
1942
|
}, [
|
|
1940
|
-
|
|
1941
|
-
class: n
|
|
1943
|
+
u("div", {
|
|
1944
|
+
class: o(n.$style.addressBar)
|
|
1942
1945
|
}, [
|
|
1943
|
-
(
|
|
1946
|
+
(d(), f("svg", {
|
|
1944
1947
|
width: "16",
|
|
1945
1948
|
height: "16",
|
|
1946
1949
|
viewBox: "0 0 24 24",
|
|
1947
1950
|
fill: "none",
|
|
1948
1951
|
stroke: "currentColor",
|
|
1949
1952
|
"stroke-width": "2",
|
|
1950
|
-
class: n
|
|
1951
|
-
}, [...
|
|
1952
|
-
|
|
1953
|
+
class: o(n.$style.addressIcon)
|
|
1954
|
+
}, [...s[0] || (s[0] = [
|
|
1955
|
+
u("circle", {
|
|
1953
1956
|
cx: "12",
|
|
1954
1957
|
cy: "10",
|
|
1955
1958
|
r: "3"
|
|
1956
1959
|
}, null, -1),
|
|
1957
|
-
|
|
1960
|
+
u("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)
|
|
1958
1961
|
])], 2)),
|
|
1959
|
-
|
|
1960
|
-
class: n
|
|
1961
|
-
}, C(
|
|
1962
|
+
u("span", {
|
|
1963
|
+
class: o(n.$style.addressText)
|
|
1964
|
+
}, C(r.value), 3)
|
|
1962
1965
|
], 2),
|
|
1963
|
-
|
|
1964
|
-
class: n
|
|
1966
|
+
u("div", {
|
|
1967
|
+
class: o(n.$style.contentSplit)
|
|
1965
1968
|
}, [
|
|
1966
|
-
|
|
1967
|
-
class: n
|
|
1969
|
+
u("div", {
|
|
1970
|
+
class: o(n.$style.contentLeft)
|
|
1968
1971
|
}, [
|
|
1969
|
-
|
|
1970
|
-
class: n
|
|
1971
|
-
}, C(I(
|
|
1972
|
-
I(
|
|
1972
|
+
u("h1", {
|
|
1973
|
+
class: o(n.$style.pageTitle)
|
|
1974
|
+
}, C(I(a).currentPage.value.title), 3),
|
|
1975
|
+
I(a).currentPage.value.subtitle ? (d(), f("p", {
|
|
1973
1976
|
key: 0,
|
|
1974
|
-
class: n
|
|
1975
|
-
}, C(I(
|
|
1977
|
+
class: o(n.$style.pageSubtitle)
|
|
1978
|
+
}, C(I(a).currentPage.value.subtitle), 3)) : w("", !0)
|
|
1976
1979
|
], 2),
|
|
1977
|
-
|
|
1978
|
-
class: n
|
|
1980
|
+
u("div", {
|
|
1981
|
+
class: o(n.$style.contentRight)
|
|
1979
1982
|
}, [
|
|
1980
|
-
|
|
1983
|
+
Q(Zs)
|
|
1981
1984
|
], 2)
|
|
1982
1985
|
], 2)
|
|
1983
1986
|
], 2),
|
|
1984
|
-
|
|
1985
|
-
], 2)) :
|
|
1987
|
+
Q(lr)
|
|
1988
|
+
], 2)) : w("", !0);
|
|
1986
1989
|
}
|
|
1987
|
-
}),
|
|
1988
|
-
layout:
|
|
1989
|
-
layoutScrollable:
|
|
1990
|
-
addressBar:
|
|
1991
|
-
addressIcon:
|
|
1992
|
-
addressText:
|
|
1993
|
-
contentSplit:
|
|
1994
|
-
contentLeft:
|
|
1995
|
-
contentRight:
|
|
1996
|
-
pageTitle:
|
|
1997
|
-
pageSubtitle:
|
|
1998
|
-
},
|
|
1999
|
-
$style:
|
|
2000
|
-
},
|
|
1990
|
+
}), ur = "_layout_1as8w_2", cr = "_layoutScrollable_1as8w_9", dr = "_addressBar_1as8w_25", vr = "_addressIcon_1as8w_33", pr = "_addressText_1as8w_37", yr = "_contentSplit_1as8w_43", fr = "_contentLeft_1as8w_57", gr = "_contentRight_1as8w_63", hr = "_pageTitle_1as8w_79", mr = "_pageSubtitle_1as8w_87", br = {
|
|
1991
|
+
layout: ur,
|
|
1992
|
+
layoutScrollable: cr,
|
|
1993
|
+
addressBar: dr,
|
|
1994
|
+
addressIcon: vr,
|
|
1995
|
+
addressText: pr,
|
|
1996
|
+
contentSplit: yr,
|
|
1997
|
+
contentLeft: fr,
|
|
1998
|
+
contentRight: gr,
|
|
1999
|
+
pageTitle: hr,
|
|
2000
|
+
pageSubtitle: mr
|
|
2001
|
+
}, $r = {
|
|
2002
|
+
$style: br
|
|
2003
|
+
}, Cr = /* @__PURE__ */ B(ir, [["__cssModules", $r]]), kr = /* @__PURE__ */ x({
|
|
2001
2004
|
__name: "DtcOnboardingFlow",
|
|
2002
2005
|
props: {
|
|
2003
2006
|
address: {},
|
|
2004
2007
|
partnerLogoUrl: {},
|
|
2005
2008
|
appearance: { default: () => ({ theme: "minimal" }) },
|
|
2006
2009
|
initialAnswers: {},
|
|
2007
|
-
smsConsentText: {},
|
|
2008
2010
|
market: {},
|
|
2009
|
-
contactConsentText: {},
|
|
2010
2011
|
onClose: {}
|
|
2011
2012
|
},
|
|
2012
2013
|
emits: ["submit", "page-change", "answer-change", "ready", "error"],
|
|
2013
2014
|
setup(e, { emit: t }) {
|
|
2014
|
-
const
|
|
2015
|
-
|
|
2016
|
-
|
|
2015
|
+
const a = e, r = Ee();
|
|
2016
|
+
re("dtc-consent-slots", r);
|
|
2017
|
+
const n = t, s = k(() => ae(a.appearance));
|
|
2018
|
+
function i(y) {
|
|
2019
|
+
n("submit", y);
|
|
2017
2020
|
}
|
|
2018
|
-
function
|
|
2019
|
-
|
|
2021
|
+
function l(y, _) {
|
|
2022
|
+
n("page-change", y, _);
|
|
2020
2023
|
}
|
|
2021
|
-
function
|
|
2022
|
-
|
|
2024
|
+
function v(y, _) {
|
|
2025
|
+
n("answer-change", y, _);
|
|
2023
2026
|
}
|
|
2024
2027
|
function p() {
|
|
2025
|
-
|
|
2028
|
+
n("ready");
|
|
2026
2029
|
}
|
|
2027
|
-
function
|
|
2028
|
-
|
|
2030
|
+
function m(y) {
|
|
2031
|
+
n("error", y);
|
|
2029
2032
|
}
|
|
2030
|
-
function
|
|
2031
|
-
var
|
|
2032
|
-
(
|
|
2033
|
+
function h() {
|
|
2034
|
+
var y;
|
|
2035
|
+
(y = a.onClose) == null || y.call(a);
|
|
2033
2036
|
}
|
|
2034
|
-
return (
|
|
2035
|
-
class:
|
|
2036
|
-
style:
|
|
2037
|
+
return (y, _) => (d(), f("div", {
|
|
2038
|
+
class: o(y.$style.container),
|
|
2039
|
+
style: Y(s.value)
|
|
2037
2040
|
}, [
|
|
2038
|
-
|
|
2041
|
+
Q(on, {
|
|
2039
2042
|
market: e.market,
|
|
2040
2043
|
"initial-answers": e.initialAnswers,
|
|
2041
|
-
"
|
|
2042
|
-
"
|
|
2043
|
-
"on-
|
|
2044
|
-
"on-page-change": r,
|
|
2045
|
-
"on-answer-change": d,
|
|
2044
|
+
"on-submit": i,
|
|
2045
|
+
"on-page-change": l,
|
|
2046
|
+
"on-answer-change": v,
|
|
2046
2047
|
"on-ready": p,
|
|
2047
|
-
"on-error":
|
|
2048
|
+
"on-error": m
|
|
2048
2049
|
}, {
|
|
2049
|
-
default:
|
|
2050
|
-
|
|
2050
|
+
default: Me(() => [
|
|
2051
|
+
Q(yn, {
|
|
2051
2052
|
"partner-logo-url": e.partnerLogoUrl,
|
|
2052
2053
|
"show-close-button": !!e.onClose,
|
|
2053
|
-
onClose:
|
|
2054
|
+
onClose: h
|
|
2054
2055
|
}, null, 8, ["partner-logo-url", "show-close-button"]),
|
|
2055
|
-
|
|
2056
|
+
Q(Cr, { address: e.address }, null, 8, ["address"])
|
|
2056
2057
|
]),
|
|
2057
2058
|
_: 1
|
|
2058
|
-
}, 8, ["market", "initial-answers"
|
|
2059
|
+
}, 8, ["market", "initial-answers"])
|
|
2059
2060
|
], 6));
|
|
2060
2061
|
}
|
|
2061
|
-
}),
|
|
2062
|
-
container:
|
|
2063
|
-
},
|
|
2064
|
-
$style:
|
|
2065
|
-
},
|
|
2062
|
+
}), _r = "_container_kjhh7_2", wr = {
|
|
2063
|
+
container: _r
|
|
2064
|
+
}, Lr = {
|
|
2065
|
+
$style: wr
|
|
2066
|
+
}, Br = /* @__PURE__ */ B(kr, [["__cssModules", Lr]]);
|
|
2066
2067
|
export {
|
|
2067
|
-
|
|
2068
|
+
Tr as AddressEntry,
|
|
2068
2069
|
xr as AddressMap,
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2070
|
+
Dr as AddressUnitConfirmation,
|
|
2071
|
+
Br as DtcOnboardingFlow,
|
|
2072
|
+
Gr as OpendoorClient,
|
|
2073
|
+
Ar as OpendoorProvider,
|
|
2074
|
+
Or as THEMES,
|
|
2075
|
+
jr as resolveAppearance,
|
|
2076
|
+
Ae as useOpendoorClient
|
|
2076
2077
|
};
|