@opendoor/partner-sdk-client-react 1.3.6-beta.122.1 → 1.3.6-beta.124.1
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/client-react/src/components/DtcOnboardingFlow/DtcProvider.d.ts +1 -0
- package/dist/client-react/src/components/DtcOnboardingFlow/DtcProvider.d.ts.map +1 -1
- package/dist/client-react/src/components/DtcOnboardingFlow/index.d.ts +9 -0
- package/dist/client-react/src/components/DtcOnboardingFlow/index.d.ts.map +1 -1
- package/dist/client-react/src/components/DtcOnboardingFlow/inputs/RadioCardInput.d.ts.map +1 -1
- package/dist/index.js +1305 -1210
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { createPortal as
|
|
3
|
-
var
|
|
1
|
+
import Et, { createContext as ze, useState as S, useEffect as ue, useContext as Re, useRef as Z, useMemo as Pe, useCallback as Te, useLayoutEffect as er } from "react";
|
|
2
|
+
import { createPortal as tr } from "react-dom";
|
|
3
|
+
var Ze = { exports: {} }, Se = {};
|
|
4
4
|
/*
|
|
5
5
|
object-assign
|
|
6
6
|
(c) Sindre Sorhus
|
|
7
7
|
@license MIT
|
|
8
8
|
*/
|
|
9
|
-
var He,
|
|
10
|
-
function
|
|
11
|
-
if (
|
|
12
|
-
|
|
9
|
+
var He, ut;
|
|
10
|
+
function Pt() {
|
|
11
|
+
if (ut) return He;
|
|
12
|
+
ut = 1;
|
|
13
13
|
var e = Object.getOwnPropertySymbols, r = Object.prototype.hasOwnProperty, a = Object.prototype.propertyIsEnumerable;
|
|
14
14
|
function s(i) {
|
|
15
15
|
if (i == null)
|
|
@@ -41,8 +41,8 @@ function It() {
|
|
|
41
41
|
return He = o() ? Object.assign : function(i, f) {
|
|
42
42
|
for (var p, h = s(i), c, l = 1; l < arguments.length; l++) {
|
|
43
43
|
p = Object(arguments[l]);
|
|
44
|
-
for (var
|
|
45
|
-
r.call(p,
|
|
44
|
+
for (var b in p)
|
|
45
|
+
r.call(p, b) && (h[b] = p[b]);
|
|
46
46
|
if (e) {
|
|
47
47
|
c = e(p);
|
|
48
48
|
for (var g = 0; g < c.length; g++)
|
|
@@ -60,26 +60,26 @@ function It() {
|
|
|
60
60
|
* This source code is licensed under the MIT license found in the
|
|
61
61
|
* LICENSE file in the root directory of this source tree.
|
|
62
62
|
*/
|
|
63
|
-
var
|
|
64
|
-
function
|
|
65
|
-
if (
|
|
66
|
-
|
|
67
|
-
var e =
|
|
63
|
+
var ht;
|
|
64
|
+
function rr() {
|
|
65
|
+
if (ht) return Se;
|
|
66
|
+
ht = 1, Pt();
|
|
67
|
+
var e = Et, r = 60103;
|
|
68
68
|
if (Se.Fragment = 60107, typeof Symbol == "function" && Symbol.for) {
|
|
69
69
|
var a = Symbol.for;
|
|
70
70
|
r = a("react.element"), Se.Fragment = a("react.fragment");
|
|
71
71
|
}
|
|
72
72
|
var s = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, o = Object.prototype.hasOwnProperty, i = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
73
73
|
function f(p, h, c) {
|
|
74
|
-
var l,
|
|
75
|
-
c !== void 0 && (g = "" + c), h.key !== void 0 && (g = "" + h.key), h.ref !== void 0 && (
|
|
76
|
-
for (l in h) o.call(h, l) && !i.hasOwnProperty(l) && (
|
|
77
|
-
if (p && p.defaultProps) for (l in h = p.defaultProps, h)
|
|
78
|
-
return { $$typeof: r, type: p, key: g, ref:
|
|
74
|
+
var l, b = {}, g = null, w = null;
|
|
75
|
+
c !== void 0 && (g = "" + c), h.key !== void 0 && (g = "" + h.key), h.ref !== void 0 && (w = h.ref);
|
|
76
|
+
for (l in h) o.call(h, l) && !i.hasOwnProperty(l) && (b[l] = h[l]);
|
|
77
|
+
if (p && p.defaultProps) for (l in h = p.defaultProps, h) b[l] === void 0 && (b[l] = h[l]);
|
|
78
|
+
return { $$typeof: r, type: p, key: g, ref: w, props: b, _owner: s.current };
|
|
79
79
|
}
|
|
80
80
|
return Se.jsx = f, Se.jsxs = f, Se;
|
|
81
81
|
}
|
|
82
|
-
var
|
|
82
|
+
var qe = {};
|
|
83
83
|
/** @license React v17.0.2
|
|
84
84
|
* react-jsx-runtime.development.js
|
|
85
85
|
*
|
|
@@ -88,54 +88,54 @@ var Ve = {};
|
|
|
88
88
|
* This source code is licensed under the MIT license found in the
|
|
89
89
|
* LICENSE file in the root directory of this source tree.
|
|
90
90
|
*/
|
|
91
|
-
var
|
|
92
|
-
function
|
|
93
|
-
return
|
|
91
|
+
var mt;
|
|
92
|
+
function nr() {
|
|
93
|
+
return mt || (mt = 1, function(e) {
|
|
94
94
|
process.env.NODE_ENV !== "production" && function() {
|
|
95
|
-
var r =
|
|
95
|
+
var r = Et, a = Pt(), s = 60103, o = 60106;
|
|
96
96
|
e.Fragment = 60107;
|
|
97
|
-
var i = 60108, f = 60114, p = 60109, h = 60110, c = 60112, l = 60113,
|
|
97
|
+
var i = 60108, f = 60114, p = 60109, h = 60110, c = 60112, l = 60113, b = 60120, g = 60115, w = 60116, E = 60121, I = 60122, O = 60117, L = 60129, U = 60131;
|
|
98
98
|
if (typeof Symbol == "function" && Symbol.for) {
|
|
99
|
-
var
|
|
100
|
-
s =
|
|
99
|
+
var _ = Symbol.for;
|
|
100
|
+
s = _("react.element"), o = _("react.portal"), e.Fragment = _("react.fragment"), i = _("react.strict_mode"), f = _("react.profiler"), p = _("react.provider"), h = _("react.context"), c = _("react.forward_ref"), l = _("react.suspense"), b = _("react.suspense_list"), g = _("react.memo"), w = _("react.lazy"), E = _("react.block"), I = _("react.server.block"), O = _("react.fundamental"), _("react.scope"), _("react.opaque.id"), L = _("react.debug_trace_mode"), _("react.offscreen"), U = _("react.legacy_hidden");
|
|
101
101
|
}
|
|
102
|
-
var
|
|
103
|
-
function
|
|
102
|
+
var _e = typeof Symbol == "function" && Symbol.iterator, W = "@@iterator";
|
|
103
|
+
function ie(n) {
|
|
104
104
|
if (n === null || typeof n != "object")
|
|
105
105
|
return null;
|
|
106
|
-
var d =
|
|
106
|
+
var d = _e && n[_e] || n[W];
|
|
107
107
|
return typeof d == "function" ? d : null;
|
|
108
108
|
}
|
|
109
109
|
var $ = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
110
110
|
function P(n) {
|
|
111
111
|
{
|
|
112
|
-
for (var d = arguments.length,
|
|
113
|
-
|
|
114
|
-
|
|
112
|
+
for (var d = arguments.length, y = new Array(d > 1 ? d - 1 : 0), N = 1; N < d; N++)
|
|
113
|
+
y[N - 1] = arguments[N];
|
|
114
|
+
X("error", n, y);
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function X(n, d, y) {
|
|
118
118
|
{
|
|
119
|
-
var
|
|
120
|
-
|
|
121
|
-
var
|
|
122
|
-
return "" +
|
|
119
|
+
var N = $.ReactDebugCurrentFrame, G = N.getStackAddendum();
|
|
120
|
+
G !== "" && (d += "%s", y = y.concat([G]));
|
|
121
|
+
var q = y.map(function(A) {
|
|
122
|
+
return "" + A;
|
|
123
123
|
});
|
|
124
|
-
|
|
124
|
+
q.unshift("Warning: " + d), Function.prototype.apply.call(console[n], console, q);
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
|
-
var
|
|
128
|
-
function
|
|
129
|
-
return !!(typeof n == "string" || typeof n == "function" || n === e.Fragment || n === f || n ===
|
|
127
|
+
var J = !1;
|
|
128
|
+
function le(n) {
|
|
129
|
+
return !!(typeof n == "string" || typeof n == "function" || n === e.Fragment || n === f || n === L || n === i || n === l || n === b || n === U || J || typeof n == "object" && n !== null && (n.$$typeof === w || n.$$typeof === g || n.$$typeof === p || n.$$typeof === h || n.$$typeof === c || n.$$typeof === O || n.$$typeof === E || n[0] === I));
|
|
130
130
|
}
|
|
131
|
-
function
|
|
132
|
-
var
|
|
133
|
-
return n.displayName || (
|
|
131
|
+
function oe(n, d, y) {
|
|
132
|
+
var N = d.displayName || d.name || "";
|
|
133
|
+
return n.displayName || (N !== "" ? y + "(" + N + ")" : y);
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function F(n) {
|
|
136
136
|
return n.displayName || "Context";
|
|
137
137
|
}
|
|
138
|
-
function
|
|
138
|
+
function V(n) {
|
|
139
139
|
if (n == null)
|
|
140
140
|
return null;
|
|
141
141
|
if (typeof n.tag == "number" && P("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."), typeof n == "function")
|
|
@@ -153,27 +153,27 @@ function Xt() {
|
|
|
153
153
|
return "StrictMode";
|
|
154
154
|
case l:
|
|
155
155
|
return "Suspense";
|
|
156
|
-
case
|
|
156
|
+
case b:
|
|
157
157
|
return "SuspenseList";
|
|
158
158
|
}
|
|
159
159
|
if (typeof n == "object")
|
|
160
160
|
switch (n.$$typeof) {
|
|
161
161
|
case h:
|
|
162
162
|
var d = n;
|
|
163
|
-
return
|
|
163
|
+
return F(d) + ".Consumer";
|
|
164
164
|
case p:
|
|
165
|
-
var
|
|
166
|
-
return
|
|
165
|
+
var y = n;
|
|
166
|
+
return F(y._context) + ".Provider";
|
|
167
167
|
case c:
|
|
168
|
-
return
|
|
168
|
+
return oe(n, n.render, "ForwardRef");
|
|
169
169
|
case g:
|
|
170
|
-
return
|
|
170
|
+
return V(n.type);
|
|
171
171
|
case E:
|
|
172
|
-
return
|
|
173
|
-
case
|
|
174
|
-
var
|
|
172
|
+
return V(n._render);
|
|
173
|
+
case w: {
|
|
174
|
+
var N = n, G = N._payload, q = N._init;
|
|
175
175
|
try {
|
|
176
|
-
return
|
|
176
|
+
return V(q(G));
|
|
177
177
|
} catch {
|
|
178
178
|
return null;
|
|
179
179
|
}
|
|
@@ -181,18 +181,18 @@ function Xt() {
|
|
|
181
181
|
}
|
|
182
182
|
return null;
|
|
183
183
|
}
|
|
184
|
-
var
|
|
185
|
-
function
|
|
184
|
+
var ce = 0, ae, v, j, C, fe, se, K;
|
|
185
|
+
function H() {
|
|
186
186
|
}
|
|
187
|
-
|
|
187
|
+
H.__reactDisabledLog = !0;
|
|
188
188
|
function de() {
|
|
189
189
|
{
|
|
190
|
-
if (
|
|
191
|
-
|
|
190
|
+
if (ce === 0) {
|
|
191
|
+
ae = console.log, v = console.info, j = console.warn, C = console.error, fe = console.group, se = console.groupCollapsed, K = console.groupEnd;
|
|
192
192
|
var n = {
|
|
193
193
|
configurable: !0,
|
|
194
194
|
enumerable: !0,
|
|
195
|
-
value:
|
|
195
|
+
value: H,
|
|
196
196
|
writable: !0
|
|
197
197
|
};
|
|
198
198
|
Object.defineProperties(console, {
|
|
@@ -205,12 +205,12 @@ function Xt() {
|
|
|
205
205
|
groupEnd: n
|
|
206
206
|
});
|
|
207
207
|
}
|
|
208
|
-
|
|
208
|
+
ce++;
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
|
-
function
|
|
211
|
+
function R() {
|
|
212
212
|
{
|
|
213
|
-
if (
|
|
213
|
+
if (ce--, ce === 0) {
|
|
214
214
|
var n = {
|
|
215
215
|
configurable: !0,
|
|
216
216
|
enumerable: !0,
|
|
@@ -218,139 +218,139 @@ function Xt() {
|
|
|
218
218
|
};
|
|
219
219
|
Object.defineProperties(console, {
|
|
220
220
|
log: a({}, n, {
|
|
221
|
-
value:
|
|
221
|
+
value: ae
|
|
222
222
|
}),
|
|
223
223
|
info: a({}, n, {
|
|
224
|
-
value:
|
|
224
|
+
value: v
|
|
225
225
|
}),
|
|
226
226
|
warn: a({}, n, {
|
|
227
|
-
value:
|
|
227
|
+
value: j
|
|
228
228
|
}),
|
|
229
229
|
error: a({}, n, {
|
|
230
|
-
value:
|
|
230
|
+
value: C
|
|
231
231
|
}),
|
|
232
232
|
group: a({}, n, {
|
|
233
|
-
value:
|
|
233
|
+
value: fe
|
|
234
234
|
}),
|
|
235
235
|
groupCollapsed: a({}, n, {
|
|
236
|
-
value:
|
|
236
|
+
value: se
|
|
237
237
|
}),
|
|
238
238
|
groupEnd: a({}, n, {
|
|
239
|
-
value:
|
|
239
|
+
value: K
|
|
240
240
|
})
|
|
241
241
|
});
|
|
242
242
|
}
|
|
243
|
-
|
|
243
|
+
ce < 0 && P("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
|
-
var
|
|
247
|
-
function pe(n, d,
|
|
246
|
+
var ee = $.ReactCurrentDispatcher, ye;
|
|
247
|
+
function pe(n, d, y) {
|
|
248
248
|
{
|
|
249
|
-
if (
|
|
249
|
+
if (ye === void 0)
|
|
250
250
|
try {
|
|
251
251
|
throw Error();
|
|
252
|
-
} catch (
|
|
253
|
-
var
|
|
254
|
-
|
|
252
|
+
} catch (G) {
|
|
253
|
+
var N = G.stack.trim().match(/\n( *(at )?)/);
|
|
254
|
+
ye = N && N[1] || "";
|
|
255
255
|
}
|
|
256
256
|
return `
|
|
257
|
-
` +
|
|
257
|
+
` + ye + n;
|
|
258
258
|
}
|
|
259
259
|
}
|
|
260
|
-
var
|
|
260
|
+
var ve = !1, k;
|
|
261
261
|
{
|
|
262
|
-
var
|
|
263
|
-
|
|
262
|
+
var B = typeof WeakMap == "function" ? WeakMap : Map;
|
|
263
|
+
k = new B();
|
|
264
264
|
}
|
|
265
|
-
function
|
|
266
|
-
if (!n ||
|
|
265
|
+
function M(n, d) {
|
|
266
|
+
if (!n || ve)
|
|
267
267
|
return "";
|
|
268
268
|
{
|
|
269
|
-
var
|
|
270
|
-
if (
|
|
271
|
-
return
|
|
269
|
+
var y = k.get(n);
|
|
270
|
+
if (y !== void 0)
|
|
271
|
+
return y;
|
|
272
272
|
}
|
|
273
|
-
var
|
|
274
|
-
|
|
275
|
-
var
|
|
273
|
+
var N;
|
|
274
|
+
ve = !0;
|
|
275
|
+
var G = Error.prepareStackTrace;
|
|
276
276
|
Error.prepareStackTrace = void 0;
|
|
277
|
-
var
|
|
278
|
-
|
|
277
|
+
var q;
|
|
278
|
+
q = ee.current, ee.current = null, de();
|
|
279
279
|
try {
|
|
280
280
|
if (d) {
|
|
281
|
-
var
|
|
281
|
+
var A = function() {
|
|
282
282
|
throw Error();
|
|
283
283
|
};
|
|
284
|
-
if (Object.defineProperty(
|
|
284
|
+
if (Object.defineProperty(A.prototype, "props", {
|
|
285
285
|
set: function() {
|
|
286
286
|
throw Error();
|
|
287
287
|
}
|
|
288
288
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
289
289
|
try {
|
|
290
|
-
Reflect.construct(
|
|
290
|
+
Reflect.construct(A, []);
|
|
291
291
|
} catch (we) {
|
|
292
|
-
|
|
292
|
+
N = we;
|
|
293
293
|
}
|
|
294
|
-
Reflect.construct(n, [],
|
|
294
|
+
Reflect.construct(n, [], A);
|
|
295
295
|
} else {
|
|
296
296
|
try {
|
|
297
|
-
|
|
297
|
+
A.call();
|
|
298
298
|
} catch (we) {
|
|
299
|
-
|
|
299
|
+
N = we;
|
|
300
300
|
}
|
|
301
|
-
n.call(
|
|
301
|
+
n.call(A.prototype);
|
|
302
302
|
}
|
|
303
303
|
} else {
|
|
304
304
|
try {
|
|
305
305
|
throw Error();
|
|
306
306
|
} catch (we) {
|
|
307
|
-
|
|
307
|
+
N = we;
|
|
308
308
|
}
|
|
309
309
|
n();
|
|
310
310
|
}
|
|
311
311
|
} catch (we) {
|
|
312
|
-
if (we &&
|
|
312
|
+
if (we && N && typeof we.stack == "string") {
|
|
313
313
|
for (var T = we.stack.split(`
|
|
314
|
-
`),
|
|
315
|
-
`),
|
|
314
|
+
`), me = N.stack.split(`
|
|
315
|
+
`), Q = T.length - 1, re = me.length - 1; Q >= 1 && re >= 0 && T[Q] !== me[re]; )
|
|
316
316
|
re--;
|
|
317
|
-
for (;
|
|
318
|
-
if (T[
|
|
319
|
-
if (
|
|
317
|
+
for (; Q >= 1 && re >= 0; Q--, re--)
|
|
318
|
+
if (T[Q] !== me[re]) {
|
|
319
|
+
if (Q !== 1 || re !== 1)
|
|
320
320
|
do
|
|
321
|
-
if (
|
|
321
|
+
if (Q--, re--, re < 0 || T[Q] !== me[re]) {
|
|
322
322
|
var xe = `
|
|
323
|
-
` + T[
|
|
324
|
-
return typeof n == "function" &&
|
|
323
|
+
` + T[Q].replace(" at new ", " at ");
|
|
324
|
+
return typeof n == "function" && k.set(n, xe), xe;
|
|
325
325
|
}
|
|
326
|
-
while (
|
|
326
|
+
while (Q >= 1 && re >= 0);
|
|
327
327
|
break;
|
|
328
328
|
}
|
|
329
329
|
}
|
|
330
330
|
} finally {
|
|
331
|
-
|
|
331
|
+
ve = !1, ee.current = q, R(), Error.prepareStackTrace = G;
|
|
332
332
|
}
|
|
333
|
-
var Ie = n ? n.displayName || n.name : "",
|
|
334
|
-
return typeof n == "function" &&
|
|
333
|
+
var Ie = n ? n.displayName || n.name : "", dt = Ie ? pe(Ie) : "";
|
|
334
|
+
return typeof n == "function" && k.set(n, dt), dt;
|
|
335
335
|
}
|
|
336
|
-
function Y(n, d,
|
|
337
|
-
return
|
|
336
|
+
function Y(n, d, y) {
|
|
337
|
+
return M(n, !1);
|
|
338
338
|
}
|
|
339
|
-
function
|
|
339
|
+
function he(n) {
|
|
340
340
|
var d = n.prototype;
|
|
341
341
|
return !!(d && d.isReactComponent);
|
|
342
342
|
}
|
|
343
|
-
function
|
|
343
|
+
function x(n, d, y) {
|
|
344
344
|
if (n == null)
|
|
345
345
|
return "";
|
|
346
346
|
if (typeof n == "function")
|
|
347
|
-
return
|
|
347
|
+
return M(n, he(n));
|
|
348
348
|
if (typeof n == "string")
|
|
349
349
|
return pe(n);
|
|
350
350
|
switch (n) {
|
|
351
351
|
case l:
|
|
352
352
|
return pe("Suspense");
|
|
353
|
-
case
|
|
353
|
+
case b:
|
|
354
354
|
return pe("SuspenseList");
|
|
355
355
|
}
|
|
356
356
|
if (typeof n == "object")
|
|
@@ -358,104 +358,104 @@ function Xt() {
|
|
|
358
358
|
case c:
|
|
359
359
|
return Y(n.render);
|
|
360
360
|
case g:
|
|
361
|
-
return
|
|
361
|
+
return x(n.type, d, y);
|
|
362
362
|
case E:
|
|
363
363
|
return Y(n._render);
|
|
364
|
-
case
|
|
365
|
-
var
|
|
364
|
+
case w: {
|
|
365
|
+
var N = n, G = N._payload, q = N._init;
|
|
366
366
|
try {
|
|
367
|
-
return
|
|
367
|
+
return x(q(G), d, y);
|
|
368
368
|
} catch {
|
|
369
369
|
}
|
|
370
370
|
}
|
|
371
371
|
}
|
|
372
372
|
return "";
|
|
373
373
|
}
|
|
374
|
-
var
|
|
374
|
+
var z = {}, te = $.ReactDebugCurrentFrame;
|
|
375
375
|
function Ce(n) {
|
|
376
376
|
if (n) {
|
|
377
|
-
var d = n._owner,
|
|
378
|
-
te.setExtraStackFrame(
|
|
377
|
+
var d = n._owner, y = x(n.type, n._source, d ? d.type : null);
|
|
378
|
+
te.setExtraStackFrame(y);
|
|
379
379
|
} else
|
|
380
380
|
te.setExtraStackFrame(null);
|
|
381
381
|
}
|
|
382
|
-
function ke(n, d,
|
|
382
|
+
function ke(n, d, y, N, G) {
|
|
383
383
|
{
|
|
384
|
-
var
|
|
385
|
-
for (var
|
|
386
|
-
if (
|
|
384
|
+
var q = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
385
|
+
for (var A in n)
|
|
386
|
+
if (q(n, A)) {
|
|
387
387
|
var T = void 0;
|
|
388
388
|
try {
|
|
389
|
-
if (typeof n[
|
|
390
|
-
var
|
|
391
|
-
throw
|
|
389
|
+
if (typeof n[A] != "function") {
|
|
390
|
+
var me = Error((N || "React class") + ": " + y + " type `" + A + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof n[A] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
391
|
+
throw me.name = "Invariant Violation", me;
|
|
392
392
|
}
|
|
393
|
-
T = n[
|
|
394
|
-
} catch (
|
|
395
|
-
T =
|
|
393
|
+
T = n[A](d, A, N, y, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
394
|
+
} catch (Q) {
|
|
395
|
+
T = Q;
|
|
396
396
|
}
|
|
397
|
-
T && !(T instanceof Error) && (Ce(
|
|
397
|
+
T && !(T instanceof Error) && (Ce(G), P("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", N || "React class", y, A, typeof T), Ce(null)), T instanceof Error && !(T.message in z) && (z[T.message] = !0, Ce(G), P("Failed %s type: %s", y, T.message), Ce(null));
|
|
398
398
|
}
|
|
399
399
|
}
|
|
400
400
|
}
|
|
401
|
-
var Ee = $.ReactCurrentOwner,
|
|
401
|
+
var Ee = $.ReactCurrentOwner, $e = Object.prototype.hasOwnProperty, $t = {
|
|
402
402
|
key: !0,
|
|
403
403
|
ref: !0,
|
|
404
404
|
__self: !0,
|
|
405
405
|
__source: !0
|
|
406
|
-
},
|
|
407
|
-
function
|
|
408
|
-
if (
|
|
406
|
+
}, rt, nt;
|
|
407
|
+
function Mt(n) {
|
|
408
|
+
if ($e.call(n, "ref")) {
|
|
409
409
|
var d = Object.getOwnPropertyDescriptor(n, "ref").get;
|
|
410
410
|
if (d && d.isReactWarning)
|
|
411
411
|
return !1;
|
|
412
412
|
}
|
|
413
413
|
return n.ref !== void 0;
|
|
414
414
|
}
|
|
415
|
-
function
|
|
416
|
-
if (
|
|
415
|
+
function Ft(n) {
|
|
416
|
+
if ($e.call(n, "key")) {
|
|
417
417
|
var d = Object.getOwnPropertyDescriptor(n, "key").get;
|
|
418
418
|
if (d && d.isReactWarning)
|
|
419
419
|
return !1;
|
|
420
420
|
}
|
|
421
421
|
return n.key !== void 0;
|
|
422
422
|
}
|
|
423
|
-
function
|
|
423
|
+
function Wt(n, d) {
|
|
424
424
|
typeof n.ref == "string" && Ee.current;
|
|
425
425
|
}
|
|
426
|
-
function
|
|
426
|
+
function Ht(n, d) {
|
|
427
427
|
{
|
|
428
|
-
var
|
|
429
|
-
|
|
428
|
+
var y = function() {
|
|
429
|
+
rt || (rt = !0, P("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", d));
|
|
430
430
|
};
|
|
431
|
-
|
|
432
|
-
get:
|
|
431
|
+
y.isReactWarning = !0, Object.defineProperty(n, "key", {
|
|
432
|
+
get: y,
|
|
433
433
|
configurable: !0
|
|
434
434
|
});
|
|
435
435
|
}
|
|
436
436
|
}
|
|
437
|
-
function
|
|
437
|
+
function qt(n, d) {
|
|
438
438
|
{
|
|
439
|
-
var
|
|
440
|
-
|
|
439
|
+
var y = function() {
|
|
440
|
+
nt || (nt = !0, P("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", d));
|
|
441
441
|
};
|
|
442
|
-
|
|
443
|
-
get:
|
|
442
|
+
y.isReactWarning = !0, Object.defineProperty(n, "ref", {
|
|
443
|
+
get: y,
|
|
444
444
|
configurable: !0
|
|
445
445
|
});
|
|
446
446
|
}
|
|
447
447
|
}
|
|
448
|
-
var
|
|
448
|
+
var Vt = function(n, d, y, N, G, q, A) {
|
|
449
449
|
var T = {
|
|
450
450
|
// This tag allows us to uniquely identify this as a React Element
|
|
451
451
|
$$typeof: s,
|
|
452
452
|
// Built-in properties that belong on the element
|
|
453
453
|
type: n,
|
|
454
454
|
key: d,
|
|
455
|
-
ref:
|
|
456
|
-
props:
|
|
455
|
+
ref: y,
|
|
456
|
+
props: A,
|
|
457
457
|
// Record the component responsible for creating this element.
|
|
458
|
-
_owner:
|
|
458
|
+
_owner: q
|
|
459
459
|
};
|
|
460
460
|
return T._store = {}, Object.defineProperty(T._store, "validated", {
|
|
461
461
|
configurable: !1,
|
|
@@ -466,49 +466,49 @@ function Xt() {
|
|
|
466
466
|
configurable: !1,
|
|
467
467
|
enumerable: !1,
|
|
468
468
|
writable: !1,
|
|
469
|
-
value:
|
|
469
|
+
value: N
|
|
470
470
|
}), Object.defineProperty(T, "_source", {
|
|
471
471
|
configurable: !1,
|
|
472
472
|
enumerable: !1,
|
|
473
473
|
writable: !1,
|
|
474
|
-
value:
|
|
474
|
+
value: G
|
|
475
475
|
}), Object.freeze && (Object.freeze(T.props), Object.freeze(T)), T;
|
|
476
476
|
};
|
|
477
|
-
function
|
|
477
|
+
function Gt(n, d, y, N, G) {
|
|
478
478
|
{
|
|
479
|
-
var
|
|
480
|
-
|
|
481
|
-
for (
|
|
482
|
-
|
|
479
|
+
var q, A = {}, T = null, me = null;
|
|
480
|
+
y !== void 0 && (T = "" + y), Ft(d) && (T = "" + d.key), Mt(d) && (me = d.ref, Wt(d, G));
|
|
481
|
+
for (q in d)
|
|
482
|
+
$e.call(d, q) && !$t.hasOwnProperty(q) && (A[q] = d[q]);
|
|
483
483
|
if (n && n.defaultProps) {
|
|
484
|
-
var
|
|
485
|
-
for (
|
|
486
|
-
|
|
484
|
+
var Q = n.defaultProps;
|
|
485
|
+
for (q in Q)
|
|
486
|
+
A[q] === void 0 && (A[q] = Q[q]);
|
|
487
487
|
}
|
|
488
|
-
if (T ||
|
|
488
|
+
if (T || me) {
|
|
489
489
|
var re = typeof n == "function" ? n.displayName || n.name || "Unknown" : n;
|
|
490
|
-
T &&
|
|
490
|
+
T && Ht(A, re), me && qt(A, re);
|
|
491
491
|
}
|
|
492
|
-
return
|
|
492
|
+
return Vt(n, T, me, G, N, Ee.current, A);
|
|
493
493
|
}
|
|
494
494
|
}
|
|
495
|
-
var
|
|
495
|
+
var Me = $.ReactCurrentOwner, at = $.ReactDebugCurrentFrame;
|
|
496
496
|
function Ne(n) {
|
|
497
497
|
if (n) {
|
|
498
|
-
var d = n._owner,
|
|
499
|
-
|
|
498
|
+
var d = n._owner, y = x(n.type, n._source, d ? d.type : null);
|
|
499
|
+
at.setExtraStackFrame(y);
|
|
500
500
|
} else
|
|
501
|
-
|
|
501
|
+
at.setExtraStackFrame(null);
|
|
502
502
|
}
|
|
503
|
-
var
|
|
504
|
-
|
|
503
|
+
var Fe;
|
|
504
|
+
Fe = !1;
|
|
505
505
|
function We(n) {
|
|
506
506
|
return typeof n == "object" && n !== null && n.$$typeof === s;
|
|
507
507
|
}
|
|
508
|
-
function
|
|
508
|
+
function st() {
|
|
509
509
|
{
|
|
510
|
-
if (
|
|
511
|
-
var n =
|
|
510
|
+
if (Me.current) {
|
|
511
|
+
var n = V(Me.current.type);
|
|
512
512
|
if (n)
|
|
513
513
|
return `
|
|
514
514
|
|
|
@@ -517,150 +517,150 @@ Check the render method of \`` + n + "`.";
|
|
|
517
517
|
return "";
|
|
518
518
|
}
|
|
519
519
|
}
|
|
520
|
-
function
|
|
520
|
+
function Ut(n) {
|
|
521
521
|
return "";
|
|
522
522
|
}
|
|
523
|
-
var
|
|
524
|
-
function
|
|
523
|
+
var ot = {};
|
|
524
|
+
function Yt(n) {
|
|
525
525
|
{
|
|
526
|
-
var d =
|
|
526
|
+
var d = st();
|
|
527
527
|
if (!d) {
|
|
528
|
-
var
|
|
529
|
-
|
|
528
|
+
var y = typeof n == "string" ? n : n.displayName || n.name;
|
|
529
|
+
y && (d = `
|
|
530
530
|
|
|
531
|
-
Check the top-level render call using <` +
|
|
531
|
+
Check the top-level render call using <` + y + ">.");
|
|
532
532
|
}
|
|
533
533
|
return d;
|
|
534
534
|
}
|
|
535
535
|
}
|
|
536
|
-
function
|
|
536
|
+
function it(n, d) {
|
|
537
537
|
{
|
|
538
538
|
if (!n._store || n._store.validated || n.key != null)
|
|
539
539
|
return;
|
|
540
540
|
n._store.validated = !0;
|
|
541
|
-
var
|
|
542
|
-
if (
|
|
541
|
+
var y = Yt(d);
|
|
542
|
+
if (ot[y])
|
|
543
543
|
return;
|
|
544
|
-
|
|
545
|
-
var
|
|
546
|
-
n && n._owner && n._owner !==
|
|
544
|
+
ot[y] = !0;
|
|
545
|
+
var N = "";
|
|
546
|
+
n && n._owner && n._owner !== Me.current && (N = " It was passed a child from " + V(n._owner.type) + "."), Ne(n), P('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', y, N), Ne(null);
|
|
547
547
|
}
|
|
548
548
|
}
|
|
549
|
-
function
|
|
549
|
+
function lt(n, d) {
|
|
550
550
|
{
|
|
551
551
|
if (typeof n != "object")
|
|
552
552
|
return;
|
|
553
553
|
if (Array.isArray(n))
|
|
554
|
-
for (var
|
|
555
|
-
var
|
|
556
|
-
We(
|
|
554
|
+
for (var y = 0; y < n.length; y++) {
|
|
555
|
+
var N = n[y];
|
|
556
|
+
We(N) && it(N, d);
|
|
557
557
|
}
|
|
558
558
|
else if (We(n))
|
|
559
559
|
n._store && (n._store.validated = !0);
|
|
560
560
|
else if (n) {
|
|
561
|
-
var
|
|
562
|
-
if (typeof
|
|
563
|
-
for (var
|
|
564
|
-
We(
|
|
561
|
+
var G = ie(n);
|
|
562
|
+
if (typeof G == "function" && G !== n.entries)
|
|
563
|
+
for (var q = G.call(n), A; !(A = q.next()).done; )
|
|
564
|
+
We(A.value) && it(A.value, d);
|
|
565
565
|
}
|
|
566
566
|
}
|
|
567
567
|
}
|
|
568
|
-
function
|
|
568
|
+
function Zt(n) {
|
|
569
569
|
{
|
|
570
570
|
var d = n.type;
|
|
571
571
|
if (d == null || typeof d == "string")
|
|
572
572
|
return;
|
|
573
|
-
var
|
|
573
|
+
var y;
|
|
574
574
|
if (typeof d == "function")
|
|
575
|
-
|
|
575
|
+
y = d.propTypes;
|
|
576
576
|
else if (typeof d == "object" && (d.$$typeof === c || // Note: Memo only checks outer props here.
|
|
577
577
|
// Inner props are checked in the reconciler.
|
|
578
578
|
d.$$typeof === g))
|
|
579
|
-
|
|
579
|
+
y = d.propTypes;
|
|
580
580
|
else
|
|
581
581
|
return;
|
|
582
|
-
if (
|
|
583
|
-
var
|
|
584
|
-
ke(
|
|
585
|
-
} else if (d.PropTypes !== void 0 &&
|
|
586
|
-
|
|
587
|
-
var
|
|
588
|
-
P("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",
|
|
582
|
+
if (y) {
|
|
583
|
+
var N = V(d);
|
|
584
|
+
ke(y, n.props, "prop", N, n);
|
|
585
|
+
} else if (d.PropTypes !== void 0 && !Fe) {
|
|
586
|
+
Fe = !0;
|
|
587
|
+
var G = V(d);
|
|
588
|
+
P("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", G || "Unknown");
|
|
589
589
|
}
|
|
590
590
|
typeof d.getDefaultProps == "function" && !d.getDefaultProps.isReactClassApproved && P("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
591
591
|
}
|
|
592
592
|
}
|
|
593
|
-
function
|
|
593
|
+
function Kt(n) {
|
|
594
594
|
{
|
|
595
|
-
for (var d = Object.keys(n.props),
|
|
596
|
-
var
|
|
597
|
-
if (
|
|
598
|
-
Ne(n), P("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",
|
|
595
|
+
for (var d = Object.keys(n.props), y = 0; y < d.length; y++) {
|
|
596
|
+
var N = d[y];
|
|
597
|
+
if (N !== "children" && N !== "key") {
|
|
598
|
+
Ne(n), P("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", N), Ne(null);
|
|
599
599
|
break;
|
|
600
600
|
}
|
|
601
601
|
}
|
|
602
602
|
n.ref !== null && (Ne(n), P("Invalid attribute `ref` supplied to `React.Fragment`."), Ne(null));
|
|
603
603
|
}
|
|
604
604
|
}
|
|
605
|
-
function
|
|
605
|
+
function ct(n, d, y, N, G, q) {
|
|
606
606
|
{
|
|
607
|
-
var
|
|
608
|
-
if (!
|
|
607
|
+
var A = le(n);
|
|
608
|
+
if (!A) {
|
|
609
609
|
var T = "";
|
|
610
610
|
(n === void 0 || typeof n == "object" && n !== null && Object.keys(n).length === 0) && (T += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
611
|
-
var
|
|
612
|
-
|
|
613
|
-
var
|
|
614
|
-
n === null ?
|
|
611
|
+
var me = Ut();
|
|
612
|
+
me ? T += me : T += st();
|
|
613
|
+
var Q;
|
|
614
|
+
n === null ? Q = "null" : Array.isArray(n) ? Q = "array" : n !== void 0 && n.$$typeof === s ? (Q = "<" + (V(n.type) || "Unknown") + " />", T = " Did you accidentally export a JSX literal instead of a component?") : Q = typeof n, P("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Q, T);
|
|
615
615
|
}
|
|
616
|
-
var re =
|
|
616
|
+
var re = Gt(n, d, y, G, q);
|
|
617
617
|
if (re == null)
|
|
618
618
|
return re;
|
|
619
|
-
if (
|
|
619
|
+
if (A) {
|
|
620
620
|
var xe = d.children;
|
|
621
621
|
if (xe !== void 0)
|
|
622
|
-
if (
|
|
622
|
+
if (N)
|
|
623
623
|
if (Array.isArray(xe)) {
|
|
624
624
|
for (var Ie = 0; Ie < xe.length; Ie++)
|
|
625
|
-
|
|
625
|
+
lt(xe[Ie], n);
|
|
626
626
|
Object.freeze && Object.freeze(xe);
|
|
627
627
|
} else
|
|
628
628
|
P("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
629
629
|
else
|
|
630
|
-
|
|
630
|
+
lt(xe, n);
|
|
631
631
|
}
|
|
632
|
-
return n === e.Fragment ?
|
|
632
|
+
return n === e.Fragment ? Kt(re) : Zt(re), re;
|
|
633
633
|
}
|
|
634
634
|
}
|
|
635
|
-
function
|
|
636
|
-
return
|
|
635
|
+
function zt(n, d, y) {
|
|
636
|
+
return ct(n, d, y, !0);
|
|
637
637
|
}
|
|
638
|
-
function
|
|
639
|
-
return
|
|
638
|
+
function Jt(n, d, y) {
|
|
639
|
+
return ct(n, d, y, !1);
|
|
640
640
|
}
|
|
641
|
-
var
|
|
642
|
-
e.jsx =
|
|
641
|
+
var Xt = Jt, Qt = zt;
|
|
642
|
+
e.jsx = Xt, e.jsxs = Qt;
|
|
643
643
|
}();
|
|
644
|
-
}(
|
|
644
|
+
}(qe)), qe;
|
|
645
645
|
}
|
|
646
|
-
process.env.NODE_ENV === "production" ?
|
|
647
|
-
var t =
|
|
648
|
-
const
|
|
646
|
+
process.env.NODE_ENV === "production" ? Ze.exports = rr() : Ze.exports = nr();
|
|
647
|
+
var t = Ze.exports;
|
|
648
|
+
const ar = {
|
|
649
649
|
production: "https://journey.apps.opendoor.com/_journey/api/v1/events",
|
|
650
650
|
staging: "https://journey.apps-staging.opendoor.com/_journey/api/v1/events"
|
|
651
|
-
},
|
|
652
|
-
function
|
|
651
|
+
}, sr = "partner-sdk", or = "1.0", ir = 5e3, lr = 20, cr = 512, dr = 5, ft = 500, pt = "od_sdk_aid";
|
|
652
|
+
function ur() {
|
|
653
653
|
try {
|
|
654
|
-
const e = localStorage.getItem(
|
|
654
|
+
const e = localStorage.getItem(pt);
|
|
655
655
|
if (e)
|
|
656
656
|
return e;
|
|
657
657
|
const r = crypto.randomUUID();
|
|
658
|
-
return localStorage.setItem(
|
|
658
|
+
return localStorage.setItem(pt, r), r;
|
|
659
659
|
} catch {
|
|
660
660
|
return;
|
|
661
661
|
}
|
|
662
662
|
}
|
|
663
|
-
function
|
|
663
|
+
function hr() {
|
|
664
664
|
return typeof window > "u" ? { url: "", eventOrigin: "CLIENT" } : {
|
|
665
665
|
url: window.location.href,
|
|
666
666
|
userAgent: navigator.userAgent,
|
|
@@ -676,40 +676,40 @@ function ir() {
|
|
|
676
676
|
language: Array.from(navigator.languages ?? [])
|
|
677
677
|
};
|
|
678
678
|
}
|
|
679
|
-
function
|
|
679
|
+
function mr(e) {
|
|
680
680
|
let r = 0;
|
|
681
681
|
for (const a of e)
|
|
682
682
|
r += a.length;
|
|
683
683
|
return r / 1024;
|
|
684
684
|
}
|
|
685
|
-
function
|
|
686
|
-
return
|
|
685
|
+
function fr(e) {
|
|
686
|
+
return mr(e) >= cr - 50;
|
|
687
687
|
}
|
|
688
|
-
async function
|
|
689
|
-
let a =
|
|
688
|
+
async function pr(e, r) {
|
|
689
|
+
let a = dr;
|
|
690
690
|
for (; a > 0; )
|
|
691
691
|
try {
|
|
692
692
|
const s = await fetch(e, r);
|
|
693
693
|
if (s.status === 202)
|
|
694
694
|
return;
|
|
695
695
|
if (s.status >= 500 && a >= 1)
|
|
696
|
-
await new Promise((o) => setTimeout(o,
|
|
696
|
+
await new Promise((o) => setTimeout(o, ft)), a--;
|
|
697
697
|
else
|
|
698
698
|
break;
|
|
699
699
|
} catch {
|
|
700
700
|
if (a >= 1)
|
|
701
|
-
await new Promise((s) => setTimeout(s,
|
|
701
|
+
await new Promise((s) => setTimeout(s, ft)), a--;
|
|
702
702
|
else
|
|
703
703
|
break;
|
|
704
704
|
}
|
|
705
705
|
}
|
|
706
|
-
class
|
|
706
|
+
class gr {
|
|
707
707
|
constructor(r) {
|
|
708
708
|
this.buffer = [], this.destroyed = !1, this.onVisibilityChange = () => {
|
|
709
709
|
document.visibilityState === "hidden" && this.flush(!0);
|
|
710
710
|
}, this.onBeforeUnload = () => {
|
|
711
711
|
this.flush(!0);
|
|
712
|
-
}, this.endpoint =
|
|
712
|
+
}, this.endpoint = ar[r], this.anonymousId = ur(), this.timer = setInterval(() => this.flush(), ir), typeof document < "u" && document.addEventListener("visibilitychange", this.onVisibilityChange), typeof window < "u" && window.addEventListener("beforeunload", this.onBeforeUnload);
|
|
713
713
|
}
|
|
714
714
|
trackPlatform(r) {
|
|
715
715
|
this.enqueue({ platform: r });
|
|
@@ -724,14 +724,14 @@ class ur {
|
|
|
724
724
|
if (this.buffer.length === 0)
|
|
725
725
|
return;
|
|
726
726
|
const a = `{"eventWrappers":[${this.buffer.join(",")}]}`;
|
|
727
|
-
this.buffer = [],
|
|
727
|
+
this.buffer = [], pr(this.endpoint, {
|
|
728
728
|
method: "POST",
|
|
729
729
|
credentials: "omit",
|
|
730
730
|
keepalive: r,
|
|
731
731
|
headers: {
|
|
732
732
|
"Content-Type": "application/json",
|
|
733
|
-
"X-Journey-Client-Name":
|
|
734
|
-
"X-Journey-Client-Version":
|
|
733
|
+
"X-Journey-Client-Name": sr,
|
|
734
|
+
"X-Journey-Client-Version": or
|
|
735
735
|
},
|
|
736
736
|
body: a
|
|
737
737
|
});
|
|
@@ -744,14 +744,14 @@ class ur {
|
|
|
744
744
|
return;
|
|
745
745
|
const a = {
|
|
746
746
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
747
|
-
websiteSource:
|
|
747
|
+
websiteSource: hr(),
|
|
748
748
|
anonymousId: this.anonymousId,
|
|
749
749
|
...r
|
|
750
750
|
};
|
|
751
|
-
this.buffer.push(JSON.stringify(a)), (this.buffer.length >=
|
|
751
|
+
this.buffer.push(JSON.stringify(a)), (this.buffer.length >= lr || fr(this.buffer)) && this.flush();
|
|
752
752
|
}
|
|
753
753
|
}
|
|
754
|
-
const
|
|
754
|
+
const Je = {
|
|
755
755
|
trackPlatform() {
|
|
756
756
|
},
|
|
757
757
|
trackSell() {
|
|
@@ -760,36 +760,36 @@ const ze = {
|
|
|
760
760
|
},
|
|
761
761
|
destroy() {
|
|
762
762
|
}
|
|
763
|
-
},
|
|
763
|
+
}, Xe = ze(null), Lt = ze(Je), qo = ({
|
|
764
764
|
client: e,
|
|
765
765
|
children: r
|
|
766
766
|
}) => {
|
|
767
|
-
const [a, s] =
|
|
768
|
-
return
|
|
769
|
-
const o = new
|
|
767
|
+
const [a, s] = S(Je);
|
|
768
|
+
return ue(() => {
|
|
769
|
+
const o = new gr(e.environment);
|
|
770
770
|
return s(o), () => {
|
|
771
771
|
o.destroy();
|
|
772
772
|
};
|
|
773
|
-
}, [e]), /* @__PURE__ */ t.jsx(
|
|
774
|
-
},
|
|
775
|
-
const e = Re(
|
|
773
|
+
}, [e]), /* @__PURE__ */ t.jsx(Xe.Provider, { value: e, children: /* @__PURE__ */ t.jsx(Lt.Provider, { value: a, children: r }) });
|
|
774
|
+
}, Tt = () => {
|
|
775
|
+
const e = Re(Xe);
|
|
776
776
|
if (!e)
|
|
777
777
|
throw new Error(
|
|
778
778
|
"useOpendoorClient must be used within an <OpendoorProvider>. Wrap your component tree with <OpendoorProvider client={client}>."
|
|
779
779
|
);
|
|
780
780
|
return e;
|
|
781
|
-
},
|
|
782
|
-
function
|
|
783
|
-
const a =
|
|
781
|
+
}, Qe = () => Re(Lt);
|
|
782
|
+
function At(e, r = {}) {
|
|
783
|
+
const a = Qe(), s = Z(a);
|
|
784
784
|
s.current = a;
|
|
785
785
|
const o = Z(null), i = Z(!1);
|
|
786
|
-
return
|
|
786
|
+
return ue(() => {
|
|
787
787
|
const f = o.current;
|
|
788
788
|
if (!f || !e || i.current) return;
|
|
789
789
|
const p = new IntersectionObserver(
|
|
790
790
|
([h]) => {
|
|
791
791
|
if (h.isIntersecting && !i.current) {
|
|
792
|
-
if (s.current ===
|
|
792
|
+
if (s.current === Je) return;
|
|
793
793
|
i.current = !0, s.current.trackPlatform({
|
|
794
794
|
inputViewEvent: { targetName: e }
|
|
795
795
|
}), r.immediate && s.current.flush(), p.disconnect();
|
|
@@ -800,7 +800,7 @@ function Pt(e, r = {}) {
|
|
|
800
800
|
return p.observe(f), () => p.disconnect();
|
|
801
801
|
}, [e, r.immediate]), o;
|
|
802
802
|
}
|
|
803
|
-
const
|
|
803
|
+
const Ve = {
|
|
804
804
|
// Colors
|
|
805
805
|
colorPrimary: "#235ca3",
|
|
806
806
|
colorPrimaryHover: "#1a4a82",
|
|
@@ -845,12 +845,12 @@ const qe = {
|
|
|
845
845
|
colorCardBorder: "#e5e7eb",
|
|
846
846
|
colorCardBorderSelected: "#235ca3",
|
|
847
847
|
colorCardBackgroundSelected: "#f0f5ff"
|
|
848
|
-
},
|
|
848
|
+
}, _r = {
|
|
849
849
|
/** Default theme — pill-shaped inputs, bold borders, Opendoor blue */
|
|
850
|
-
default:
|
|
850
|
+
default: Ve,
|
|
851
851
|
/** Minimal theme — subtle borders, square corners, lighter shadows */
|
|
852
852
|
minimal: {
|
|
853
|
-
...
|
|
853
|
+
...Ve,
|
|
854
854
|
colorBorder: "#d1d5db",
|
|
855
855
|
colorBorderFocus: "#235ca3",
|
|
856
856
|
colorFocusRing: "rgba(35, 92, 163, 0.15)",
|
|
@@ -870,7 +870,7 @@ const qe = {
|
|
|
870
870
|
},
|
|
871
871
|
/** Rounded theme — large radii, soft shadows, spacious */
|
|
872
872
|
rounded: {
|
|
873
|
-
...
|
|
873
|
+
...Ve,
|
|
874
874
|
colorBorder: "#e0e0e0",
|
|
875
875
|
colorBorderFocus: "#235ca3",
|
|
876
876
|
borderRadius: "16px",
|
|
@@ -881,11 +881,11 @@ const qe = {
|
|
|
881
881
|
buttonPaddingX: "32px"
|
|
882
882
|
}
|
|
883
883
|
};
|
|
884
|
-
function
|
|
885
|
-
const r =
|
|
884
|
+
function yr(e) {
|
|
885
|
+
const r = _r[(e == null ? void 0 : e.theme) ?? "default"];
|
|
886
886
|
return e != null && e.variables ? { ...r, ...e.variables } : r;
|
|
887
887
|
}
|
|
888
|
-
const
|
|
888
|
+
const Vo = [
|
|
889
889
|
"confirm-home-details",
|
|
890
890
|
"ownership",
|
|
891
891
|
"sale-timeline",
|
|
@@ -905,17 +905,17 @@ const Fo = [
|
|
|
905
905
|
"contact-info"
|
|
906
906
|
];
|
|
907
907
|
function Ae(e) {
|
|
908
|
-
const r =
|
|
908
|
+
const r = yr(e), a = {};
|
|
909
909
|
for (const [s, o] of Object.entries(r)) {
|
|
910
910
|
const i = s.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
911
911
|
a[`--od-${i}`] = o;
|
|
912
912
|
}
|
|
913
913
|
return a;
|
|
914
914
|
}
|
|
915
|
-
const
|
|
916
|
-
attribution:
|
|
917
|
-
text:
|
|
918
|
-
},
|
|
915
|
+
const br = "_attribution_11y4r_7", vr = "_text_11y4r_16", gt = {
|
|
916
|
+
attribution: br,
|
|
917
|
+
text: vr
|
|
918
|
+
}, xr = () => /* @__PURE__ */ t.jsx(
|
|
919
919
|
"svg",
|
|
920
920
|
{
|
|
921
921
|
width: "75",
|
|
@@ -934,34 +934,34 @@ const fr = "_attribution_11y4r_7", pr = "_text_11y4r_16", ft = {
|
|
|
934
934
|
)
|
|
935
935
|
}
|
|
936
936
|
);
|
|
937
|
-
function
|
|
938
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
939
|
-
/* @__PURE__ */ t.jsx("span", { className:
|
|
940
|
-
/* @__PURE__ */ t.jsx(
|
|
937
|
+
function wr() {
|
|
938
|
+
return /* @__PURE__ */ t.jsxs("div", { className: gt.attribution, "data-testid": "od-attribution", children: [
|
|
939
|
+
/* @__PURE__ */ t.jsx("span", { className: gt.text, children: "Powered by" }),
|
|
940
|
+
/* @__PURE__ */ t.jsx(xr, {})
|
|
941
941
|
] });
|
|
942
942
|
}
|
|
943
|
-
const
|
|
944
|
-
container:
|
|
945
|
-
inputSection:
|
|
946
|
-
inputWrapper:
|
|
947
|
-
input:
|
|
948
|
-
inputIcon:
|
|
949
|
-
button:
|
|
950
|
-
spinner:
|
|
951
|
-
suggestions:
|
|
952
|
-
errorState:
|
|
953
|
-
suggestion:
|
|
954
|
-
error:
|
|
955
|
-
errorIcon:
|
|
956
|
-
errorBorder:
|
|
957
|
-
manualLink:
|
|
958
|
-
manualForm:
|
|
959
|
-
manualFormField:
|
|
960
|
-
manualFormLabel:
|
|
961
|
-
manualFormInput:
|
|
962
|
-
formRow:
|
|
963
|
-
submitButton:
|
|
964
|
-
},
|
|
943
|
+
const Cr = "_container_tu90h_8", kr = "_inputSection_tu90h_16", jr = "_inputWrapper_tu90h_22", Nr = "_input_tu90h_16", Ir = "_inputIcon_tu90h_63", Sr = "_button_tu90h_80", Er = "_spinner_tu90h_121", Pr = "_suggestions_tu90h_136", Lr = "_errorState_tu90h_150", Tr = "_suggestion_tu90h_136", Ar = "_error_tu90h_150", Dr = "_errorIcon_tu90h_199", Or = "_errorBorder_tu90h_213", Rr = "_manualLink_tu90h_223", Br = "_manualForm_tu90h_245", $r = "_manualFormField_tu90h_260", Mr = "_manualFormLabel_tu90h_264", Fr = "_manualFormInput_tu90h_273", Wr = "_formRow_tu90h_294", Hr = "_submitButton_tu90h_302", D = {
|
|
944
|
+
container: Cr,
|
|
945
|
+
inputSection: kr,
|
|
946
|
+
inputWrapper: jr,
|
|
947
|
+
input: Nr,
|
|
948
|
+
inputIcon: Ir,
|
|
949
|
+
button: Sr,
|
|
950
|
+
spinner: Er,
|
|
951
|
+
suggestions: Pr,
|
|
952
|
+
errorState: Lr,
|
|
953
|
+
suggestion: Tr,
|
|
954
|
+
error: Ar,
|
|
955
|
+
errorIcon: Dr,
|
|
956
|
+
errorBorder: Or,
|
|
957
|
+
manualLink: Rr,
|
|
958
|
+
manualForm: Br,
|
|
959
|
+
manualFormField: $r,
|
|
960
|
+
manualFormLabel: Mr,
|
|
961
|
+
manualFormInput: Fr,
|
|
962
|
+
formRow: Wr,
|
|
963
|
+
submitButton: Hr
|
|
964
|
+
}, _t = () => /* @__PURE__ */ t.jsx(
|
|
965
965
|
"svg",
|
|
966
966
|
{
|
|
967
967
|
width: "20",
|
|
@@ -980,7 +980,7 @@ const yr = "_container_tu90h_8", br = "_inputSection_tu90h_16", vr = "_inputWrap
|
|
|
980
980
|
}
|
|
981
981
|
)
|
|
982
982
|
}
|
|
983
|
-
),
|
|
983
|
+
), qr = () => /* @__PURE__ */ t.jsxs(
|
|
984
984
|
"svg",
|
|
985
985
|
{
|
|
986
986
|
width: "20",
|
|
@@ -1002,11 +1002,11 @@ const yr = "_container_tu90h_8", br = "_inputSection_tu90h_16", vr = "_inputWrap
|
|
|
1002
1002
|
]
|
|
1003
1003
|
}
|
|
1004
1004
|
);
|
|
1005
|
-
function
|
|
1005
|
+
function yt(e) {
|
|
1006
1006
|
const r = [e.street1];
|
|
1007
1007
|
return e.street2 && (r[0] += ` ${e.street2}`), r.push(`${e.city}, ${e.state} ${e.postalCode}`), r.join(", ");
|
|
1008
1008
|
}
|
|
1009
|
-
function
|
|
1009
|
+
function Go({
|
|
1010
1010
|
onAddressSelect: e,
|
|
1011
1011
|
enableAddressSuggestions: r = !0,
|
|
1012
1012
|
debounceMs: a = 300,
|
|
@@ -1018,88 +1018,88 @@ function $o({
|
|
|
1018
1018
|
buttonIcon: h,
|
|
1019
1019
|
inputIcon: c,
|
|
1020
1020
|
manualEntryText: l = "Enter address manually instead",
|
|
1021
|
-
appearance:
|
|
1021
|
+
appearance: b,
|
|
1022
1022
|
onReady: g,
|
|
1023
|
-
onChange:
|
|
1023
|
+
onChange: w,
|
|
1024
1024
|
onValidationError: E,
|
|
1025
|
-
onAddressSuggestionsStart:
|
|
1026
|
-
onAddressSuggestionsComplete:
|
|
1027
|
-
onError:
|
|
1025
|
+
onAddressSuggestionsStart: I,
|
|
1026
|
+
onAddressSuggestionsComplete: O,
|
|
1027
|
+
onError: L
|
|
1028
1028
|
}) {
|
|
1029
|
-
const
|
|
1029
|
+
const U = Tt(), _ = Qe(), _e = Ae(b), [W, ie] = S(""), [$, P] = S([]), [X, J] = S(!1), [le, oe] = S(!1), [F, V] = S(null), [ce, ae] = S(!1), [v, j] = S(!1), [C, fe] = S({
|
|
1030
1030
|
street1: "",
|
|
1031
1031
|
street2: "",
|
|
1032
1032
|
city: "",
|
|
1033
1033
|
state: "",
|
|
1034
1034
|
postalCode: ""
|
|
1035
|
-
}),
|
|
1035
|
+
}), se = Z(null), K = At("partner-sdk-address-input", {
|
|
1036
1036
|
immediate: !0
|
|
1037
|
-
}),
|
|
1038
|
-
|
|
1039
|
-
const de = Z(
|
|
1040
|
-
de.current =
|
|
1041
|
-
const
|
|
1042
|
-
|
|
1043
|
-
const
|
|
1044
|
-
|
|
1037
|
+
}), H = Z(L);
|
|
1038
|
+
H.current = L;
|
|
1039
|
+
const de = Z(I);
|
|
1040
|
+
de.current = I;
|
|
1041
|
+
const R = Z(O);
|
|
1042
|
+
R.current = O;
|
|
1043
|
+
const ee = Z(null), ye = X && !le && W.trim().length >= 3 && $.length === 0 && !v;
|
|
1044
|
+
ue(() => {
|
|
1045
1045
|
g == null || g();
|
|
1046
|
-
}, []),
|
|
1047
|
-
if (!r ||
|
|
1048
|
-
|
|
1046
|
+
}, []), ue(() => {
|
|
1047
|
+
if (!r || W.trim().length < 3 || ce) {
|
|
1048
|
+
W.trim().length === 0 && (P([]), J(!1), V(null));
|
|
1049
1049
|
return;
|
|
1050
1050
|
}
|
|
1051
|
-
|
|
1052
|
-
const
|
|
1053
|
-
var
|
|
1054
|
-
(
|
|
1051
|
+
oe(!0), V(null);
|
|
1052
|
+
const x = setTimeout(async () => {
|
|
1053
|
+
var z, te, Ce;
|
|
1054
|
+
(z = de.current) == null || z.call(de, W);
|
|
1055
1055
|
try {
|
|
1056
|
-
const ke = await
|
|
1057
|
-
P(ke.addresses),
|
|
1056
|
+
const ke = await U.getAddressSuggestions(W);
|
|
1057
|
+
P(ke.addresses), J(!0), (te = R.current) == null || te.call(R, ke.addresses);
|
|
1058
1058
|
} catch (ke) {
|
|
1059
1059
|
const Ee = ke instanceof Error ? ke : new Error("Failed to fetch address suggestions");
|
|
1060
|
-
|
|
1060
|
+
V(Ee.message), P([]), J(!0), (Ce = H.current) == null || Ce.call(H, Ee);
|
|
1061
1061
|
} finally {
|
|
1062
|
-
|
|
1062
|
+
oe(!1);
|
|
1063
1063
|
}
|
|
1064
1064
|
}, a);
|
|
1065
|
-
return () => clearTimeout(
|
|
1066
|
-
}, [
|
|
1067
|
-
const
|
|
1068
|
-
|
|
1065
|
+
return () => clearTimeout(x);
|
|
1066
|
+
}, [W, ce, r, a, U]), ue(() => {
|
|
1067
|
+
const x = (z) => {
|
|
1068
|
+
ee.current && !ee.current.contains(z.target) && se.current && !se.current.contains(z.target) && J(!1);
|
|
1069
1069
|
};
|
|
1070
|
-
return document.addEventListener("mousedown",
|
|
1070
|
+
return document.addEventListener("mousedown", x), () => document.removeEventListener("mousedown", x);
|
|
1071
1071
|
}, []);
|
|
1072
|
-
const pe = (
|
|
1073
|
-
const
|
|
1074
|
-
|
|
1075
|
-
},
|
|
1076
|
-
|
|
1072
|
+
const pe = (x) => {
|
|
1073
|
+
const z = x.target.value;
|
|
1074
|
+
ie(z), ae(!1), w == null || w({ street1: z });
|
|
1075
|
+
}, ve = async (x) => {
|
|
1076
|
+
ae(!0), ie(yt(x)), P([]), J(!1), V(null), w == null || w(x), _.trackSell({
|
|
1077
1077
|
addressEntryV2: {
|
|
1078
|
-
street1:
|
|
1079
|
-
city:
|
|
1080
|
-
state:
|
|
1081
|
-
postalCode:
|
|
1082
|
-
unit:
|
|
1078
|
+
street1: x.street1,
|
|
1079
|
+
city: x.city,
|
|
1080
|
+
state: x.state,
|
|
1081
|
+
postalCode: x.postalCode,
|
|
1082
|
+
unit: x.street2,
|
|
1083
1083
|
sourcePage: "partner-sdk"
|
|
1084
1084
|
}
|
|
1085
1085
|
});
|
|
1086
1086
|
try {
|
|
1087
|
-
await e(
|
|
1088
|
-
} catch (
|
|
1089
|
-
const te =
|
|
1090
|
-
|
|
1087
|
+
await e(x);
|
|
1088
|
+
} catch (z) {
|
|
1089
|
+
const te = z instanceof Error ? z : new Error("Failed to process address");
|
|
1090
|
+
V(te.message), L == null || L(te), ie(""), ae(!1);
|
|
1091
1091
|
}
|
|
1092
|
-
},
|
|
1093
|
-
|
|
1092
|
+
}, k = () => {
|
|
1093
|
+
_.trackPlatform({
|
|
1094
1094
|
inputFocusEvent: { targetName: "partner-sdk-address-input" }
|
|
1095
|
-
}), $.length > 0 &&
|
|
1096
|
-
},
|
|
1097
|
-
|
|
1095
|
+
}), $.length > 0 && W.length > 0 && J(!0);
|
|
1096
|
+
}, B = () => {
|
|
1097
|
+
_.trackPlatform({
|
|
1098
1098
|
linkClickEvent: { targetName: "partner-sdk-manual-entry" }
|
|
1099
|
-
}),
|
|
1100
|
-
},
|
|
1101
|
-
const te = { ...
|
|
1102
|
-
|
|
1099
|
+
}), j(!0), J(!1);
|
|
1100
|
+
}, M = (x, z) => {
|
|
1101
|
+
const te = { ...C, [x]: z };
|
|
1102
|
+
fe(te), w == null || w({
|
|
1103
1103
|
street1: te.street1,
|
|
1104
1104
|
...te.street2 ? { street2: te.street2 } : {},
|
|
1105
1105
|
city: te.city,
|
|
@@ -1107,111 +1107,111 @@ function $o({
|
|
|
1107
1107
|
postalCode: te.postalCode
|
|
1108
1108
|
});
|
|
1109
1109
|
}, Y = async () => {
|
|
1110
|
-
if (!
|
|
1111
|
-
const
|
|
1112
|
-
|
|
1110
|
+
if (!C.street1 || !C.city || !C.state || !C.postalCode) {
|
|
1111
|
+
const x = "Please fill in all required fields";
|
|
1112
|
+
V(x), E == null || E(x);
|
|
1113
1113
|
return;
|
|
1114
1114
|
}
|
|
1115
|
-
|
|
1115
|
+
oe(!0), V(null);
|
|
1116
1116
|
try {
|
|
1117
|
-
const
|
|
1118
|
-
street1:
|
|
1119
|
-
...
|
|
1120
|
-
city:
|
|
1121
|
-
state:
|
|
1122
|
-
postalCode:
|
|
1117
|
+
const x = {
|
|
1118
|
+
street1: C.street1,
|
|
1119
|
+
...C.street2 ? { street2: C.street2 } : {},
|
|
1120
|
+
city: C.city,
|
|
1121
|
+
state: C.state,
|
|
1122
|
+
postalCode: C.postalCode
|
|
1123
1123
|
};
|
|
1124
|
-
|
|
1124
|
+
_.trackSell({
|
|
1125
1125
|
addressEntryV2: {
|
|
1126
|
-
street1:
|
|
1127
|
-
city:
|
|
1128
|
-
state:
|
|
1129
|
-
postalCode:
|
|
1130
|
-
unit:
|
|
1126
|
+
street1: x.street1,
|
|
1127
|
+
city: x.city,
|
|
1128
|
+
state: x.state,
|
|
1129
|
+
postalCode: x.postalCode,
|
|
1130
|
+
unit: x.street2,
|
|
1131
1131
|
sourcePage: "partner-sdk"
|
|
1132
1132
|
}
|
|
1133
|
-
}), await e(
|
|
1134
|
-
} catch (
|
|
1135
|
-
const
|
|
1136
|
-
|
|
1133
|
+
}), await e(x);
|
|
1134
|
+
} catch (x) {
|
|
1135
|
+
const z = x instanceof Error ? x : new Error("Failed to submit address");
|
|
1136
|
+
V(z.message), L == null || L(z);
|
|
1137
1137
|
} finally {
|
|
1138
|
-
|
|
1138
|
+
oe(!1);
|
|
1139
1139
|
}
|
|
1140
|
-
},
|
|
1141
|
-
return /* @__PURE__ */ t.jsxs("div", { ref:
|
|
1142
|
-
|
|
1143
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1144
|
-
/* @__PURE__ */ t.jsx("label", { className:
|
|
1140
|
+
}, he = !!F;
|
|
1141
|
+
return /* @__PURE__ */ t.jsxs("div", { ref: K, className: D.container, style: _e, children: [
|
|
1142
|
+
v ? /* @__PURE__ */ t.jsxs("div", { className: D.manualForm, children: [
|
|
1143
|
+
/* @__PURE__ */ t.jsxs("div", { className: D.manualFormField, children: [
|
|
1144
|
+
/* @__PURE__ */ t.jsx("label", { className: D.manualFormLabel, htmlFor: "ae-street1", children: "Street Address *" }),
|
|
1145
1145
|
/* @__PURE__ */ t.jsx(
|
|
1146
1146
|
"input",
|
|
1147
1147
|
{
|
|
1148
1148
|
id: "ae-street1",
|
|
1149
1149
|
type: "text",
|
|
1150
|
-
className:
|
|
1151
|
-
value:
|
|
1152
|
-
onChange: (
|
|
1150
|
+
className: D.manualFormInput,
|
|
1151
|
+
value: C.street1,
|
|
1152
|
+
onChange: (x) => M("street1", x.target.value),
|
|
1153
1153
|
disabled: o,
|
|
1154
1154
|
placeholder: "123 Main St"
|
|
1155
1155
|
}
|
|
1156
1156
|
)
|
|
1157
1157
|
] }),
|
|
1158
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1159
|
-
/* @__PURE__ */ t.jsx("label", { className:
|
|
1158
|
+
/* @__PURE__ */ t.jsxs("div", { className: D.manualFormField, children: [
|
|
1159
|
+
/* @__PURE__ */ t.jsx("label", { className: D.manualFormLabel, htmlFor: "ae-street2", children: "Unit / Apt (optional)" }),
|
|
1160
1160
|
/* @__PURE__ */ t.jsx(
|
|
1161
1161
|
"input",
|
|
1162
1162
|
{
|
|
1163
1163
|
id: "ae-street2",
|
|
1164
1164
|
type: "text",
|
|
1165
|
-
className:
|
|
1166
|
-
value:
|
|
1167
|
-
onChange: (
|
|
1165
|
+
className: D.manualFormInput,
|
|
1166
|
+
value: C.street2,
|
|
1167
|
+
onChange: (x) => M("street2", x.target.value),
|
|
1168
1168
|
disabled: o,
|
|
1169
1169
|
placeholder: "Apt 4B"
|
|
1170
1170
|
}
|
|
1171
1171
|
)
|
|
1172
1172
|
] }),
|
|
1173
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1174
|
-
/* @__PURE__ */ t.jsx("label", { className:
|
|
1173
|
+
/* @__PURE__ */ t.jsxs("div", { className: D.manualFormField, children: [
|
|
1174
|
+
/* @__PURE__ */ t.jsx("label", { className: D.manualFormLabel, htmlFor: "ae-city", children: "City *" }),
|
|
1175
1175
|
/* @__PURE__ */ t.jsx(
|
|
1176
1176
|
"input",
|
|
1177
1177
|
{
|
|
1178
1178
|
id: "ae-city",
|
|
1179
1179
|
type: "text",
|
|
1180
|
-
className:
|
|
1181
|
-
value:
|
|
1182
|
-
onChange: (
|
|
1180
|
+
className: D.manualFormInput,
|
|
1181
|
+
value: C.city,
|
|
1182
|
+
onChange: (x) => M("city", x.target.value),
|
|
1183
1183
|
disabled: o,
|
|
1184
1184
|
placeholder: "Austin"
|
|
1185
1185
|
}
|
|
1186
1186
|
)
|
|
1187
1187
|
] }),
|
|
1188
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1189
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1190
|
-
/* @__PURE__ */ t.jsx("label", { className:
|
|
1188
|
+
/* @__PURE__ */ t.jsxs("div", { className: D.formRow, children: [
|
|
1189
|
+
/* @__PURE__ */ t.jsxs("div", { className: D.manualFormField, children: [
|
|
1190
|
+
/* @__PURE__ */ t.jsx("label", { className: D.manualFormLabel, htmlFor: "ae-state", children: "State *" }),
|
|
1191
1191
|
/* @__PURE__ */ t.jsx(
|
|
1192
1192
|
"input",
|
|
1193
1193
|
{
|
|
1194
1194
|
id: "ae-state",
|
|
1195
1195
|
type: "text",
|
|
1196
|
-
className:
|
|
1197
|
-
value:
|
|
1198
|
-
onChange: (
|
|
1196
|
+
className: D.manualFormInput,
|
|
1197
|
+
value: C.state,
|
|
1198
|
+
onChange: (x) => M("state", x.target.value),
|
|
1199
1199
|
disabled: o,
|
|
1200
1200
|
placeholder: "TX",
|
|
1201
1201
|
maxLength: 2
|
|
1202
1202
|
}
|
|
1203
1203
|
)
|
|
1204
1204
|
] }),
|
|
1205
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1206
|
-
/* @__PURE__ */ t.jsx("label", { className:
|
|
1205
|
+
/* @__PURE__ */ t.jsxs("div", { className: D.manualFormField, children: [
|
|
1206
|
+
/* @__PURE__ */ t.jsx("label", { className: D.manualFormLabel, htmlFor: "ae-postalCode", children: "ZIP Code *" }),
|
|
1207
1207
|
/* @__PURE__ */ t.jsx(
|
|
1208
1208
|
"input",
|
|
1209
1209
|
{
|
|
1210
1210
|
id: "ae-postalCode",
|
|
1211
1211
|
type: "text",
|
|
1212
|
-
className:
|
|
1213
|
-
value:
|
|
1214
|
-
onChange: (
|
|
1212
|
+
className: D.manualFormInput,
|
|
1213
|
+
value: C.postalCode,
|
|
1214
|
+
onChange: (x) => M("postalCode", x.target.value),
|
|
1215
1215
|
disabled: o,
|
|
1216
1216
|
placeholder: "78701",
|
|
1217
1217
|
maxLength: 5
|
|
@@ -1219,57 +1219,57 @@ function $o({
|
|
|
1219
1219
|
)
|
|
1220
1220
|
] })
|
|
1221
1221
|
] }),
|
|
1222
|
-
|
|
1222
|
+
F && /* @__PURE__ */ t.jsx("div", { className: D.error, children: F }),
|
|
1223
1223
|
/* @__PURE__ */ t.jsxs(
|
|
1224
1224
|
"button",
|
|
1225
1225
|
{
|
|
1226
1226
|
type: "button",
|
|
1227
|
-
className:
|
|
1227
|
+
className: D.submitButton,
|
|
1228
1228
|
onClick: Y,
|
|
1229
1229
|
disabled: o,
|
|
1230
1230
|
children: [
|
|
1231
1231
|
/* @__PURE__ */ t.jsx("span", { children: f }),
|
|
1232
|
-
h || /* @__PURE__ */ t.jsx(
|
|
1232
|
+
h || /* @__PURE__ */ t.jsx(_t, {})
|
|
1233
1233
|
]
|
|
1234
1234
|
}
|
|
1235
1235
|
)
|
|
1236
|
-
] }) : /* @__PURE__ */ t.jsxs("div", { className:
|
|
1236
|
+
] }) : /* @__PURE__ */ t.jsxs("div", { className: D.inputSection, children: [
|
|
1237
1237
|
/* @__PURE__ */ t.jsxs(
|
|
1238
1238
|
"div",
|
|
1239
1239
|
{
|
|
1240
|
-
className: `${
|
|
1240
|
+
className: `${D.inputWrapper} ${he ? D.errorBorder : ""}`,
|
|
1241
1241
|
children: [
|
|
1242
1242
|
/* @__PURE__ */ t.jsx(
|
|
1243
1243
|
"input",
|
|
1244
1244
|
{
|
|
1245
|
-
ref:
|
|
1245
|
+
ref: se,
|
|
1246
1246
|
type: "text",
|
|
1247
|
-
value:
|
|
1247
|
+
value: W,
|
|
1248
1248
|
onChange: pe,
|
|
1249
|
-
onFocus:
|
|
1249
|
+
onFocus: k,
|
|
1250
1250
|
placeholder: i,
|
|
1251
|
-
className:
|
|
1251
|
+
className: D.input,
|
|
1252
1252
|
disabled: o,
|
|
1253
1253
|
"aria-label": "Address input",
|
|
1254
1254
|
"aria-autocomplete": "list",
|
|
1255
1255
|
"aria-controls": "address-suggestions",
|
|
1256
|
-
"aria-expanded":
|
|
1256
|
+
"aria-expanded": X
|
|
1257
1257
|
}
|
|
1258
1258
|
),
|
|
1259
|
-
c && /* @__PURE__ */ t.jsx("div", { className:
|
|
1259
|
+
c && /* @__PURE__ */ t.jsx("div", { className: D.inputIcon, children: c }),
|
|
1260
1260
|
p && /* @__PURE__ */ t.jsx(
|
|
1261
1261
|
"button",
|
|
1262
1262
|
{
|
|
1263
|
-
className:
|
|
1263
|
+
className: D.button,
|
|
1264
1264
|
type: "button",
|
|
1265
1265
|
disabled: o,
|
|
1266
1266
|
"aria-label": f,
|
|
1267
|
-
children:
|
|
1267
|
+
children: le ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1268
1268
|
/* @__PURE__ */ t.jsx("span", { children: f }),
|
|
1269
1269
|
/* @__PURE__ */ t.jsxs(
|
|
1270
1270
|
"svg",
|
|
1271
1271
|
{
|
|
1272
|
-
className:
|
|
1272
|
+
className: D.spinner,
|
|
1273
1273
|
width: "20",
|
|
1274
1274
|
height: "20",
|
|
1275
1275
|
viewBox: "0 0 24 24",
|
|
@@ -1301,181 +1301,181 @@ function $o({
|
|
|
1301
1301
|
)
|
|
1302
1302
|
] }) : /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1303
1303
|
/* @__PURE__ */ t.jsx("span", { children: f }),
|
|
1304
|
-
h || /* @__PURE__ */ t.jsx(
|
|
1304
|
+
h || /* @__PURE__ */ t.jsx(_t, {})
|
|
1305
1305
|
] })
|
|
1306
1306
|
}
|
|
1307
1307
|
)
|
|
1308
1308
|
]
|
|
1309
1309
|
}
|
|
1310
1310
|
),
|
|
1311
|
-
(
|
|
1311
|
+
(X || he) && /* @__PURE__ */ t.jsx(
|
|
1312
1312
|
"div",
|
|
1313
1313
|
{
|
|
1314
|
-
ref:
|
|
1315
|
-
className: `${
|
|
1314
|
+
ref: ee,
|
|
1315
|
+
className: `${D.suggestions} ${he ? D.errorState : ""}`,
|
|
1316
1316
|
id: "address-suggestions",
|
|
1317
|
-
role:
|
|
1318
|
-
"aria-live":
|
|
1319
|
-
children:
|
|
1320
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1321
|
-
/* @__PURE__ */ t.jsx("div", { children:
|
|
1322
|
-
] }) : $.length > 0 ? $.map((
|
|
1317
|
+
role: he && !X ? "alert" : "listbox",
|
|
1318
|
+
"aria-live": he && !X ? "polite" : void 0,
|
|
1319
|
+
children: he ? /* @__PURE__ */ t.jsxs("div", { className: D.error, children: [
|
|
1320
|
+
/* @__PURE__ */ t.jsx("div", { className: D.errorIcon, children: /* @__PURE__ */ t.jsx(qr, {}) }),
|
|
1321
|
+
/* @__PURE__ */ t.jsx("div", { children: F })
|
|
1322
|
+
] }) : $.length > 0 ? $.map((x, z) => /* @__PURE__ */ t.jsx(
|
|
1323
1323
|
"div",
|
|
1324
1324
|
{
|
|
1325
|
-
className:
|
|
1326
|
-
onClick: () =>
|
|
1325
|
+
className: D.suggestion,
|
|
1326
|
+
onClick: () => ve(x),
|
|
1327
1327
|
role: "option",
|
|
1328
1328
|
"aria-selected": !1,
|
|
1329
1329
|
tabIndex: 0,
|
|
1330
1330
|
onKeyDown: (te) => {
|
|
1331
|
-
(te.key === "Enter" || te.key === " ") && (te.preventDefault(),
|
|
1331
|
+
(te.key === "Enter" || te.key === " ") && (te.preventDefault(), ve(x));
|
|
1332
1332
|
},
|
|
1333
|
-
children:
|
|
1333
|
+
children: yt(x)
|
|
1334
1334
|
},
|
|
1335
|
-
`${
|
|
1336
|
-
)) :
|
|
1335
|
+
`${x.street1}-${x.city}-${x.postalCode}-${z}`
|
|
1336
|
+
)) : ye && /* @__PURE__ */ t.jsx(
|
|
1337
1337
|
"button",
|
|
1338
1338
|
{
|
|
1339
1339
|
type: "button",
|
|
1340
|
-
className:
|
|
1341
|
-
onClick:
|
|
1340
|
+
className: D.manualLink,
|
|
1341
|
+
onClick: B,
|
|
1342
1342
|
children: l
|
|
1343
1343
|
}
|
|
1344
1344
|
)
|
|
1345
1345
|
}
|
|
1346
1346
|
)
|
|
1347
1347
|
] }),
|
|
1348
|
-
s && /* @__PURE__ */ t.jsx(
|
|
1348
|
+
s && /* @__PURE__ */ t.jsx(wr, {})
|
|
1349
1349
|
] });
|
|
1350
1350
|
}
|
|
1351
|
-
const
|
|
1352
|
-
container:
|
|
1353
|
-
title:
|
|
1354
|
-
addressCard:
|
|
1355
|
-
addressText:
|
|
1356
|
-
editLink:
|
|
1357
|
-
fieldGroup:
|
|
1358
|
-
fieldLabel:
|
|
1359
|
-
input:
|
|
1360
|
-
checkboxRow:
|
|
1361
|
-
checkbox:
|
|
1362
|
-
checkboxLabel:
|
|
1363
|
-
error:
|
|
1364
|
-
actions:
|
|
1365
|
-
confirmButton:
|
|
1351
|
+
const Vr = "_container_rg8mk_3", Gr = "_title_rg8mk_7", Ur = "_addressCard_rg8mk_16", Yr = "_addressText_rg8mk_26", Zr = "_editLink_rg8mk_34", Kr = "_fieldGroup_rg8mk_47", zr = "_fieldLabel_rg8mk_51", Jr = "_input_rg8mk_60", Xr = "_checkboxRow_rg8mk_84", Qr = "_checkbox_rg8mk_84", en = "_checkboxLabel_rg8mk_101", tn = "_error_rg8mk_108", rn = "_actions_rg8mk_115", nn = "_confirmButton_rg8mk_120", ge = {
|
|
1352
|
+
container: Vr,
|
|
1353
|
+
title: Gr,
|
|
1354
|
+
addressCard: Ur,
|
|
1355
|
+
addressText: Yr,
|
|
1356
|
+
editLink: Zr,
|
|
1357
|
+
fieldGroup: Kr,
|
|
1358
|
+
fieldLabel: zr,
|
|
1359
|
+
input: Jr,
|
|
1360
|
+
checkboxRow: Xr,
|
|
1361
|
+
checkbox: Qr,
|
|
1362
|
+
checkboxLabel: en,
|
|
1363
|
+
error: tn,
|
|
1364
|
+
actions: rn,
|
|
1365
|
+
confirmButton: nn
|
|
1366
1366
|
};
|
|
1367
|
-
function
|
|
1367
|
+
function an(e) {
|
|
1368
1368
|
return `${e.street1 + (e.street2 ? ` ${e.street2}` : "")}, ${e.city}, ${e.state} ${e.postalCode}`;
|
|
1369
1369
|
}
|
|
1370
|
-
function
|
|
1370
|
+
function Uo({
|
|
1371
1371
|
address: e,
|
|
1372
1372
|
appearance: r,
|
|
1373
1373
|
onConfirm: a,
|
|
1374
1374
|
onEdit: s
|
|
1375
1375
|
}) {
|
|
1376
|
-
const o =
|
|
1376
|
+
const o = Qe(), f = Ae(r), p = At("partner-sdk-unit-input"), [h, c] = S(""), [l, b] = S(!1), [g, w] = S(null), E = () => {
|
|
1377
1377
|
if (!l && !h.trim()) {
|
|
1378
|
-
|
|
1378
|
+
w("Please enter a unit number or select 'No unit number'");
|
|
1379
1379
|
return;
|
|
1380
1380
|
}
|
|
1381
|
-
|
|
1381
|
+
w(null), o.trackPlatform({
|
|
1382
1382
|
buttonClickEvent: { targetName: "partner-sdk-confirm-unit" }
|
|
1383
1383
|
}), a(l ? { ...e } : { ...e, street2: h.trim() });
|
|
1384
|
-
},
|
|
1384
|
+
}, I = () => {
|
|
1385
1385
|
o.trackPlatform({
|
|
1386
1386
|
checkboxClickEvent: {
|
|
1387
1387
|
targetName: "partner-sdk-no-unit",
|
|
1388
1388
|
optionName: String(!l)
|
|
1389
1389
|
}
|
|
1390
|
-
}),
|
|
1391
|
-
},
|
|
1392
|
-
c(
|
|
1393
|
-
},
|
|
1390
|
+
}), b(!l), l || (c(""), w(null));
|
|
1391
|
+
}, O = (U) => {
|
|
1392
|
+
c(U.target.value), g && w(null);
|
|
1393
|
+
}, L = () => {
|
|
1394
1394
|
o.trackPlatform({
|
|
1395
1395
|
inputFocusEvent: { targetName: "partner-sdk-unit-input" }
|
|
1396
1396
|
});
|
|
1397
1397
|
};
|
|
1398
|
-
return /* @__PURE__ */ t.jsxs("div", { ref: p, style: f, className:
|
|
1399
|
-
/* @__PURE__ */ t.jsx("h2", { className:
|
|
1400
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1401
|
-
/* @__PURE__ */ t.jsx("span", { className:
|
|
1402
|
-
s && /* @__PURE__ */ t.jsx("button", { type: "button", className:
|
|
1398
|
+
return /* @__PURE__ */ t.jsxs("div", { ref: p, style: f, className: ge.container, children: [
|
|
1399
|
+
/* @__PURE__ */ t.jsx("h2", { className: ge.title, children: "Confirm your home address" }),
|
|
1400
|
+
/* @__PURE__ */ t.jsxs("div", { className: ge.addressCard, children: [
|
|
1401
|
+
/* @__PURE__ */ t.jsx("span", { className: ge.addressText, children: an(e) }),
|
|
1402
|
+
s && /* @__PURE__ */ t.jsx("button", { type: "button", className: ge.editLink, onClick: s, children: "Edit" })
|
|
1403
1403
|
] }),
|
|
1404
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1405
|
-
/* @__PURE__ */ t.jsx("label", { className:
|
|
1404
|
+
/* @__PURE__ */ t.jsxs("div", { className: ge.fieldGroup, children: [
|
|
1405
|
+
/* @__PURE__ */ t.jsx("label", { className: ge.fieldLabel, htmlFor: "od-unit-number", children: "Unit number, apt, or floor*" }),
|
|
1406
1406
|
/* @__PURE__ */ t.jsx(
|
|
1407
1407
|
"input",
|
|
1408
1408
|
{
|
|
1409
1409
|
id: "od-unit-number",
|
|
1410
1410
|
type: "text",
|
|
1411
|
-
className:
|
|
1411
|
+
className: ge.input,
|
|
1412
1412
|
placeholder: "#1234",
|
|
1413
1413
|
value: h,
|
|
1414
|
-
onChange:
|
|
1415
|
-
onFocus:
|
|
1414
|
+
onChange: O,
|
|
1415
|
+
onFocus: L,
|
|
1416
1416
|
disabled: l
|
|
1417
1417
|
}
|
|
1418
1418
|
)
|
|
1419
1419
|
] }),
|
|
1420
|
-
/* @__PURE__ */ t.jsxs("label", { className:
|
|
1420
|
+
/* @__PURE__ */ t.jsxs("label", { className: ge.checkboxRow, children: [
|
|
1421
1421
|
/* @__PURE__ */ t.jsx(
|
|
1422
1422
|
"input",
|
|
1423
1423
|
{
|
|
1424
1424
|
type: "checkbox",
|
|
1425
|
-
className:
|
|
1425
|
+
className: ge.checkbox,
|
|
1426
1426
|
checked: l,
|
|
1427
|
-
onChange:
|
|
1427
|
+
onChange: I
|
|
1428
1428
|
}
|
|
1429
1429
|
),
|
|
1430
|
-
/* @__PURE__ */ t.jsx("span", { className:
|
|
1430
|
+
/* @__PURE__ */ t.jsx("span", { className: ge.checkboxLabel, children: "No unit number" })
|
|
1431
1431
|
] }),
|
|
1432
|
-
g && /* @__PURE__ */ t.jsx("p", { className:
|
|
1433
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1432
|
+
g && /* @__PURE__ */ t.jsx("p", { className: ge.error, children: g }),
|
|
1433
|
+
/* @__PURE__ */ t.jsx("div", { className: ge.actions, children: /* @__PURE__ */ t.jsx(
|
|
1434
1434
|
"button",
|
|
1435
1435
|
{
|
|
1436
1436
|
type: "button",
|
|
1437
|
-
className:
|
|
1437
|
+
className: ge.confirmButton,
|
|
1438
1438
|
onClick: E,
|
|
1439
1439
|
children: "Confirm address"
|
|
1440
1440
|
}
|
|
1441
1441
|
) })
|
|
1442
1442
|
] });
|
|
1443
1443
|
}
|
|
1444
|
-
const
|
|
1445
|
-
function
|
|
1444
|
+
const sn = "https://api.mapbox.com/geocoding/v5/mapbox.places", on = "https://api.mapbox.com/styles/v1/mapbox/light-v11/static", ln = "pk.eyJ1Ijoib3BlbmRvb3IiLCJhIjoiWXJ2bTJiRSJ9.lsnjT9yTNyyVzKRIzqxnqg", cn = "https://images.opendoor.com/source/s3/imgdrop-production/2026-02-1771546296495-06570.png?service=partner-sdk", dn = 640, un = 320, hn = 14;
|
|
1445
|
+
function mn(e, r, a) {
|
|
1446
1446
|
return e.startsWith("http://") || e.startsWith("https://") ? `url-${encodeURIComponent(e)}(${r},${a})` : `${e}(${r},${a})`;
|
|
1447
1447
|
}
|
|
1448
|
-
function
|
|
1449
|
-
const a = (r == null ? void 0 : r.mapboxAccessToken) ??
|
|
1450
|
-
return
|
|
1448
|
+
function fn(e, r) {
|
|
1449
|
+
const a = (r == null ? void 0 : r.mapboxAccessToken) ?? ln, s = (r == null ? void 0 : r.mapPinMarker) ?? cn, o = (r == null ? void 0 : r.width) ?? dn, i = (r == null ? void 0 : r.height) ?? un, f = (r == null ? void 0 : r.zoom) ?? hn, [p, h] = S(void 0), [c, l] = S("loading");
|
|
1450
|
+
return ue(() => {
|
|
1451
1451
|
l("loading");
|
|
1452
|
-
const
|
|
1452
|
+
const b = [
|
|
1453
1453
|
e.street1,
|
|
1454
1454
|
e.city,
|
|
1455
1455
|
e.state,
|
|
1456
1456
|
e.postalCode
|
|
1457
1457
|
].join(" ");
|
|
1458
1458
|
let g = !1;
|
|
1459
|
-
async function
|
|
1460
|
-
var E,
|
|
1459
|
+
async function w() {
|
|
1460
|
+
var E, I;
|
|
1461
1461
|
try {
|
|
1462
|
-
const
|
|
1463
|
-
if (!
|
|
1462
|
+
const O = `${sn}/${encodeURIComponent(b)}.json?access_token=${a}&limit=1`, L = await fetch(O);
|
|
1463
|
+
if (!L.ok || g) {
|
|
1464
1464
|
g || l("error");
|
|
1465
1465
|
return;
|
|
1466
1466
|
}
|
|
1467
|
-
const
|
|
1468
|
-
if (!
|
|
1467
|
+
const _ = (I = (E = (await L.json()).features) == null ? void 0 : E[0]) == null ? void 0 : I.center;
|
|
1468
|
+
if (!_ || g) {
|
|
1469
1469
|
g || l("error");
|
|
1470
1470
|
return;
|
|
1471
1471
|
}
|
|
1472
|
-
const [
|
|
1472
|
+
const [_e, W] = _, ie = mn(s, _e, W), $ = `${on}/${ie}/${_e},${W},${f}/${o}x${i}@2x?access_token=${a}&attribution=false&logo=false`;
|
|
1473
1473
|
g || h($);
|
|
1474
1474
|
} catch {
|
|
1475
1475
|
g || l("error");
|
|
1476
1476
|
}
|
|
1477
1477
|
}
|
|
1478
|
-
return
|
|
1478
|
+
return w(), () => {
|
|
1479
1479
|
g = !0;
|
|
1480
1480
|
};
|
|
1481
1481
|
}, [
|
|
@@ -1490,12 +1490,12 @@ function cn(e, r) {
|
|
|
1490
1490
|
f
|
|
1491
1491
|
]), { url: p, status: c };
|
|
1492
1492
|
}
|
|
1493
|
-
const
|
|
1494
|
-
container:
|
|
1495
|
-
mapImage:
|
|
1496
|
-
mapImageLoaded:
|
|
1493
|
+
const pn = "_container_1vap7_3", gn = "_mapImage_1vap7_13", _n = "_mapImageLoaded_1vap7_22", Ge = {
|
|
1494
|
+
container: pn,
|
|
1495
|
+
mapImage: gn,
|
|
1496
|
+
mapImageLoaded: _n
|
|
1497
1497
|
};
|
|
1498
|
-
function
|
|
1498
|
+
function Yo({
|
|
1499
1499
|
address: e,
|
|
1500
1500
|
appearance: r,
|
|
1501
1501
|
mapboxAccessToken: a,
|
|
@@ -1507,51 +1507,51 @@ function Ho({
|
|
|
1507
1507
|
onLoad: h,
|
|
1508
1508
|
onError: c
|
|
1509
1509
|
}) {
|
|
1510
|
-
const l = Ae(r), { url:
|
|
1510
|
+
const l = Ae(r), { url: b, status: g } = fn(e, {
|
|
1511
1511
|
mapboxAccessToken: a,
|
|
1512
1512
|
mapPinMarker: s,
|
|
1513
1513
|
width: o,
|
|
1514
1514
|
height: i,
|
|
1515
1515
|
zoom: f
|
|
1516
|
-
}), [
|
|
1517
|
-
|
|
1518
|
-
const
|
|
1519
|
-
|
|
1520
|
-
var
|
|
1521
|
-
g === "error" && ((
|
|
1516
|
+
}), [w, E] = S(!1), I = Z(h);
|
|
1517
|
+
I.current = h;
|
|
1518
|
+
const O = Z(c);
|
|
1519
|
+
O.current = c, ue(() => {
|
|
1520
|
+
var _;
|
|
1521
|
+
g === "error" && ((_ = O.current) == null || _.call(O, new Error("Failed to load map for address")));
|
|
1522
1522
|
}, [g]);
|
|
1523
|
-
const
|
|
1524
|
-
var
|
|
1525
|
-
E(!0), (
|
|
1526
|
-
},
|
|
1523
|
+
const L = () => {
|
|
1524
|
+
var _;
|
|
1525
|
+
E(!0), (_ = I.current) == null || _.call(I);
|
|
1526
|
+
}, U = {
|
|
1527
1527
|
...l,
|
|
1528
1528
|
...p ? { borderRadius: p } : {}
|
|
1529
1529
|
};
|
|
1530
|
-
return /* @__PURE__ */ t.jsx("div", { className: Ge.container, style:
|
|
1530
|
+
return /* @__PURE__ */ t.jsx("div", { className: Ge.container, style: U, children: b && /* @__PURE__ */ t.jsx(
|
|
1531
1531
|
"img",
|
|
1532
1532
|
{
|
|
1533
|
-
src:
|
|
1533
|
+
src: b,
|
|
1534
1534
|
alt: "Map",
|
|
1535
|
-
className: `${Ge.mapImage} ${
|
|
1536
|
-
onLoad:
|
|
1535
|
+
className: `${Ge.mapImage} ${w ? Ge.mapImageLoaded : ""}`.trim(),
|
|
1536
|
+
onLoad: L
|
|
1537
1537
|
}
|
|
1538
1538
|
) });
|
|
1539
1539
|
}
|
|
1540
|
-
function
|
|
1540
|
+
function yn(e) {
|
|
1541
1541
|
return "field" in e;
|
|
1542
1542
|
}
|
|
1543
|
-
function
|
|
1543
|
+
function bn(e) {
|
|
1544
1544
|
return "and" in e;
|
|
1545
1545
|
}
|
|
1546
|
-
function
|
|
1546
|
+
function vn(e) {
|
|
1547
1547
|
return "or" in e;
|
|
1548
1548
|
}
|
|
1549
1549
|
function Oe(e, r) {
|
|
1550
|
-
if (
|
|
1550
|
+
if (bn(e))
|
|
1551
1551
|
return e.and.every((a) => Oe(a, r));
|
|
1552
|
-
if (
|
|
1552
|
+
if (vn(e))
|
|
1553
1553
|
return e.or.some((a) => Oe(a, r));
|
|
1554
|
-
if (
|
|
1554
|
+
if (yn(e)) {
|
|
1555
1555
|
const a = r(e.field);
|
|
1556
1556
|
switch (e.op) {
|
|
1557
1557
|
case "eq":
|
|
@@ -1574,13 +1574,13 @@ function Oe(e, r) {
|
|
|
1574
1574
|
}
|
|
1575
1575
|
return !1;
|
|
1576
1576
|
}
|
|
1577
|
-
function
|
|
1577
|
+
function Ke(e, r) {
|
|
1578
1578
|
return e.questions.filter((a) => !a.showWhen || Oe(a.showWhen, r));
|
|
1579
1579
|
}
|
|
1580
|
-
function
|
|
1580
|
+
function bt(e, r) {
|
|
1581
1581
|
return e.filter((a) => !a.showWhen || Oe(a.showWhen, r));
|
|
1582
1582
|
}
|
|
1583
|
-
function
|
|
1583
|
+
function xn(e, r) {
|
|
1584
1584
|
const a = typeof r == "string" && r.trim() === "";
|
|
1585
1585
|
if (e.required) {
|
|
1586
1586
|
if (r == null || r === "" || a)
|
|
@@ -1599,10 +1599,10 @@ function gn(e, r) {
|
|
|
1599
1599
|
return e.validate(r);
|
|
1600
1600
|
}
|
|
1601
1601
|
}
|
|
1602
|
-
function
|
|
1603
|
-
const a = {}, s =
|
|
1602
|
+
function vt(e, r) {
|
|
1603
|
+
const a = {}, s = Ke(e, r);
|
|
1604
1604
|
for (const o of s) {
|
|
1605
|
-
const i = r(o.key), f =
|
|
1605
|
+
const i = r(o.key), f = xn(o, i);
|
|
1606
1606
|
f && (a[o.key] = f);
|
|
1607
1607
|
}
|
|
1608
1608
|
return {
|
|
@@ -1610,7 +1610,7 @@ function yt(e, r) {
|
|
|
1610
1610
|
errors: a
|
|
1611
1611
|
};
|
|
1612
1612
|
}
|
|
1613
|
-
class
|
|
1613
|
+
class wn {
|
|
1614
1614
|
constructor(r, a) {
|
|
1615
1615
|
this._validationErrors = {}, this._submitted = !1, this._listeners = /* @__PURE__ */ new Map(), this.getAnswer = (o) => this._answers[o], this._allPages = r, this._answers = a != null && a.initialAnswers ? { ...a.initialAnswers } : {}, this._skipPages = new Set((a == null ? void 0 : a.skipPages) ?? []);
|
|
1616
1616
|
const s = this.visiblePages;
|
|
@@ -1622,7 +1622,7 @@ class _n {
|
|
|
1622
1622
|
* conditions and the partner-supplied `skipPages` allowlist.
|
|
1623
1623
|
*/
|
|
1624
1624
|
get visiblePages() {
|
|
1625
|
-
const r =
|
|
1625
|
+
const r = bt(this._allPages, this.getAnswer);
|
|
1626
1626
|
return this._skipPages.size === 0 ? r : r.filter((a) => !this._skipPages.has(a.id));
|
|
1627
1627
|
}
|
|
1628
1628
|
/** The current page, or undefined if no pages are visible. */
|
|
@@ -1665,7 +1665,7 @@ class _n {
|
|
|
1665
1665
|
* Set an answer value. Clears any validation error for that field.
|
|
1666
1666
|
*/
|
|
1667
1667
|
setAnswer(r, a) {
|
|
1668
|
-
if (this._answers = { ...this._answers, [r]: a }, this._validationErrors[r]) {
|
|
1668
|
+
if (this._submitted && (this._submitted = !1), this._answers = { ...this._answers, [r]: a }, this._validationErrors[r]) {
|
|
1669
1669
|
const { [r]: s, ...o } = this._validationErrors;
|
|
1670
1670
|
this._validationErrors = o;
|
|
1671
1671
|
}
|
|
@@ -1676,7 +1676,7 @@ class _n {
|
|
|
1676
1676
|
* Emits a single answerChange event for the last key.
|
|
1677
1677
|
*/
|
|
1678
1678
|
setAnswers(r) {
|
|
1679
|
-
this._answers = { ...this._answers, ...r };
|
|
1679
|
+
this._submitted && (this._submitted = !1), this._answers = { ...this._answers, ...r };
|
|
1680
1680
|
for (const s of Object.keys(r))
|
|
1681
1681
|
if (this._validationErrors[s]) {
|
|
1682
1682
|
const { [s]: o, ...i } = this._validationErrors;
|
|
@@ -1706,7 +1706,7 @@ class _n {
|
|
|
1706
1706
|
const r = this.currentPage;
|
|
1707
1707
|
if (!r)
|
|
1708
1708
|
return { valid: !1, errors: { _page: "No current page" } };
|
|
1709
|
-
const a =
|
|
1709
|
+
const a = vt(r, this.getAnswer);
|
|
1710
1710
|
if (!a.valid)
|
|
1711
1711
|
return this._validationErrors = a.errors, this.emit({ type: "validationError", errors: a.errors }), a;
|
|
1712
1712
|
if (this._validationErrors = {}, this.isLastPage)
|
|
@@ -1745,14 +1745,14 @@ class _n {
|
|
|
1745
1745
|
*/
|
|
1746
1746
|
validate() {
|
|
1747
1747
|
const r = this.currentPage;
|
|
1748
|
-
return r ?
|
|
1748
|
+
return r ? vt(r, this.getAnswer) : { valid: !1, errors: { _page: "No current page" } };
|
|
1749
1749
|
}
|
|
1750
1750
|
/**
|
|
1751
1751
|
* Get visible questions on the current page (filtered by showWhen).
|
|
1752
1752
|
*/
|
|
1753
1753
|
getVisibleQuestionsForCurrentPage() {
|
|
1754
1754
|
const r = this.currentPage;
|
|
1755
|
-
return r ?
|
|
1755
|
+
return r ? Ke(r, this.getAnswer) : [];
|
|
1756
1756
|
}
|
|
1757
1757
|
// ── Events ────────────────────────────────────────────────────────────────
|
|
1758
1758
|
/**
|
|
@@ -1790,7 +1790,7 @@ class _n {
|
|
|
1790
1790
|
* must not delete those.
|
|
1791
1791
|
*/
|
|
1792
1792
|
pruneAnswersForHiddenQuestions() {
|
|
1793
|
-
const r =
|
|
1793
|
+
const r = bt(this._allPages, this.getAnswer), a = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set();
|
|
1794
1794
|
for (const f of this._allPages) {
|
|
1795
1795
|
for (const c of f.questions)
|
|
1796
1796
|
a.add(c.key);
|
|
@@ -1800,7 +1800,7 @@ class _n {
|
|
|
1800
1800
|
continue;
|
|
1801
1801
|
}
|
|
1802
1802
|
if (r.some((c) => c.id === f.id))
|
|
1803
|
-
for (const c of
|
|
1803
|
+
for (const c of Ke(f, this.getAnswer))
|
|
1804
1804
|
s.add(c.key);
|
|
1805
1805
|
}
|
|
1806
1806
|
let o = !1;
|
|
@@ -1828,18 +1828,18 @@ class _n {
|
|
|
1828
1828
|
});
|
|
1829
1829
|
}
|
|
1830
1830
|
}
|
|
1831
|
-
const
|
|
1832
|
-
function
|
|
1833
|
-
if (typeof e == "string" && !
|
|
1831
|
+
const Cn = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
1832
|
+
function et(e) {
|
|
1833
|
+
if (typeof e == "string" && !Cn.test(e))
|
|
1834
1834
|
return "Please enter a valid email address";
|
|
1835
1835
|
}
|
|
1836
|
-
function
|
|
1836
|
+
function Dt(e) {
|
|
1837
1837
|
if (typeof e != "string")
|
|
1838
1838
|
return;
|
|
1839
1839
|
if (e.replace(/\D/g, "").length < 10)
|
|
1840
1840
|
return "Please enter a valid 10-digit phone number";
|
|
1841
1841
|
}
|
|
1842
|
-
const
|
|
1842
|
+
const kn = {
|
|
1843
1843
|
id: "confirm-home-details",
|
|
1844
1844
|
title: "Confirm your home details",
|
|
1845
1845
|
subtitle: "This info is available to the public. You can edit these details if you've made any updates to your home.",
|
|
@@ -2031,7 +2031,7 @@ const vn = {
|
|
|
2031
2031
|
}
|
|
2032
2032
|
}
|
|
2033
2033
|
]
|
|
2034
|
-
},
|
|
2034
|
+
}, jn = {
|
|
2035
2035
|
id: "ownership",
|
|
2036
2036
|
title: "Are you the owner of this home?",
|
|
2037
2037
|
questions: [
|
|
@@ -2069,7 +2069,7 @@ const vn = {
|
|
|
2069
2069
|
}
|
|
2070
2070
|
}
|
|
2071
2071
|
]
|
|
2072
|
-
},
|
|
2072
|
+
}, Nn = {
|
|
2073
2073
|
id: "sale-timeline",
|
|
2074
2074
|
title: "When do you need to sell your home?",
|
|
2075
2075
|
subtitle: "This won't affect your offer. We're here to help with any timeline.",
|
|
@@ -2090,13 +2090,13 @@ const vn = {
|
|
|
2090
2090
|
]
|
|
2091
2091
|
}
|
|
2092
2092
|
]
|
|
2093
|
-
},
|
|
2093
|
+
}, In = [
|
|
2094
2094
|
"fixer_upper",
|
|
2095
2095
|
"dated",
|
|
2096
2096
|
"standard",
|
|
2097
2097
|
"high_end",
|
|
2098
2098
|
"luxury"
|
|
2099
|
-
],
|
|
2099
|
+
], Sn = {
|
|
2100
2100
|
kitchen: {
|
|
2101
2101
|
fixer_upper: "Kitchen needs significant repairs",
|
|
2102
2102
|
dated: "Kitchen hasn't been updated recently",
|
|
@@ -2125,7 +2125,7 @@ const vn = {
|
|
|
2125
2125
|
high_end: "Exterior has high-quality upgrades",
|
|
2126
2126
|
luxury: "Exterior has elegant, top-tier finishes"
|
|
2127
2127
|
}
|
|
2128
|
-
},
|
|
2128
|
+
}, En = {
|
|
2129
2129
|
fixer_upper: "Fixer upper",
|
|
2130
2130
|
dated: "Dated",
|
|
2131
2131
|
standard: "Standard",
|
|
@@ -2145,17 +2145,17 @@ function Be(e, r, a) {
|
|
|
2145
2145
|
style: "image-card",
|
|
2146
2146
|
required: !0,
|
|
2147
2147
|
autoAdvance: !0,
|
|
2148
|
-
options:
|
|
2149
|
-
label:
|
|
2148
|
+
options: In.map((s) => ({
|
|
2149
|
+
label: En[s],
|
|
2150
2150
|
value: s,
|
|
2151
|
-
description:
|
|
2151
|
+
description: Sn[e][s],
|
|
2152
2152
|
imageId: `${e}-${s}`
|
|
2153
2153
|
}))
|
|
2154
2154
|
}
|
|
2155
2155
|
]
|
|
2156
2156
|
};
|
|
2157
2157
|
}
|
|
2158
|
-
const
|
|
2158
|
+
const Pn = Be("kitchen", "home.kitchen_seller_score", "How would you describe your kitchen?"), Ln = Be("bathroom", "home.bathroom_seller_score", "How would you describe your main bathroom?"), Tn = Be("living-room", "home.living_room_seller_score", "How would you describe your living room?"), An = Be("exterior", "home.exterior_seller_score", "How would you describe your home's exterior?"), Dn = {
|
|
2159
2159
|
id: "hoa",
|
|
2160
2160
|
title: "Is your home part of a homeowners association?",
|
|
2161
2161
|
subtitle: "This is often called an HOA. It's a group that helps maintain your community for a fee.",
|
|
@@ -2173,7 +2173,7 @@ const Nn = Be("kitchen", "home.kitchen_seller_score", "How would you describe yo
|
|
|
2173
2173
|
]
|
|
2174
2174
|
}
|
|
2175
2175
|
]
|
|
2176
|
-
},
|
|
2176
|
+
}, On = {
|
|
2177
2177
|
id: "hoa-type",
|
|
2178
2178
|
title: "Does your home belong to any of these types of communities?",
|
|
2179
2179
|
showWhen: { field: "home.hoa", op: "eq", value: "yes" },
|
|
@@ -2194,7 +2194,7 @@ const Nn = Be("kitchen", "home.kitchen_seller_score", "How would you describe yo
|
|
|
2194
2194
|
]
|
|
2195
2195
|
}
|
|
2196
2196
|
]
|
|
2197
|
-
},
|
|
2197
|
+
}, Rn = {
|
|
2198
2198
|
id: "hoa-guard",
|
|
2199
2199
|
title: "Is there a guard at the entrance?",
|
|
2200
2200
|
showWhen: {
|
|
@@ -2217,7 +2217,7 @@ const Nn = Be("kitchen", "home.kitchen_seller_score", "How would you describe yo
|
|
|
2217
2217
|
]
|
|
2218
2218
|
}
|
|
2219
2219
|
]
|
|
2220
|
-
},
|
|
2220
|
+
}, Bn = {
|
|
2221
2221
|
id: "hoa-fees",
|
|
2222
2222
|
title: "What are your monthly HOA fees?",
|
|
2223
2223
|
subtitle: "(Optional) This helps us better understand your property's monthly expenses.",
|
|
@@ -2232,7 +2232,7 @@ const Nn = Be("kitchen", "home.kitchen_seller_score", "How would you describe yo
|
|
|
2232
2232
|
min: 0
|
|
2233
2233
|
}
|
|
2234
2234
|
]
|
|
2235
|
-
},
|
|
2235
|
+
}, $n = {
|
|
2236
2236
|
id: "eligibility-criteria",
|
|
2237
2237
|
title: "Do any of these apply to your home?",
|
|
2238
2238
|
subtitle: "Select all that apply. We keep an eye out for these things when making an offer.",
|
|
@@ -2287,7 +2287,7 @@ const Nn = Be("kitchen", "home.kitchen_seller_score", "How would you describe yo
|
|
|
2287
2287
|
]
|
|
2288
2288
|
}
|
|
2289
2289
|
]
|
|
2290
|
-
},
|
|
2290
|
+
}, Mn = {
|
|
2291
2291
|
id: "upgrades",
|
|
2292
2292
|
title: "Has your home had any upgrades?",
|
|
2293
2293
|
subtitle: "This includes renovations, remodels, or major improvements.",
|
|
@@ -2305,7 +2305,7 @@ const Nn = Be("kitchen", "home.kitchen_seller_score", "How would you describe yo
|
|
|
2305
2305
|
]
|
|
2306
2306
|
}
|
|
2307
2307
|
]
|
|
2308
|
-
},
|
|
2308
|
+
}, Fn = {
|
|
2309
2309
|
id: "homebuilder",
|
|
2310
2310
|
title: "Are you working with a homebuilder?",
|
|
2311
2311
|
subtitle: "We can work with them to line up your close dates.",
|
|
@@ -2323,7 +2323,7 @@ const Nn = Be("kitchen", "home.kitchen_seller_score", "How would you describe yo
|
|
|
2323
2323
|
]
|
|
2324
2324
|
}
|
|
2325
2325
|
]
|
|
2326
|
-
},
|
|
2326
|
+
}, Wn = {
|
|
2327
2327
|
id: "homebuilder-name",
|
|
2328
2328
|
title: "Which homebuilder are you working with?",
|
|
2329
2329
|
showWhen: {
|
|
@@ -2342,7 +2342,7 @@ const Nn = Be("kitchen", "home.kitchen_seller_score", "How would you describe yo
|
|
|
2342
2342
|
placeholder: "Select or search..."
|
|
2343
2343
|
}
|
|
2344
2344
|
]
|
|
2345
|
-
},
|
|
2345
|
+
}, Hn = {
|
|
2346
2346
|
id: "homebuilder-details",
|
|
2347
2347
|
title: "Please tell us more about your homebuilder",
|
|
2348
2348
|
showWhen: {
|
|
@@ -2358,7 +2358,7 @@ const Nn = Be("kitchen", "home.kitchen_seller_score", "How would you describe yo
|
|
|
2358
2358
|
style: "email",
|
|
2359
2359
|
required: !1,
|
|
2360
2360
|
placeholder: "you@example.com",
|
|
2361
|
-
validate:
|
|
2361
|
+
validate: et
|
|
2362
2362
|
},
|
|
2363
2363
|
{
|
|
2364
2364
|
key: "seller.home_builder_community",
|
|
@@ -2369,54 +2369,111 @@ const Nn = Be("kitchen", "home.kitchen_seller_score", "How would you describe yo
|
|
|
2369
2369
|
placeholder: "Community name"
|
|
2370
2370
|
}
|
|
2371
2371
|
]
|
|
2372
|
-
},
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2372
|
+
}, xt = [
|
|
2373
|
+
{
|
|
2374
|
+
key: "seller.full_name",
|
|
2375
|
+
label: "Full name",
|
|
2376
|
+
type: "string",
|
|
2377
|
+
style: "input",
|
|
2378
|
+
required: !0,
|
|
2379
|
+
placeholder: "Full name"
|
|
2380
|
+
},
|
|
2381
|
+
{
|
|
2382
|
+
key: "seller.email",
|
|
2383
|
+
label: "Email address",
|
|
2384
|
+
type: "string",
|
|
2385
|
+
style: "email",
|
|
2386
|
+
required: !0,
|
|
2387
|
+
placeholder: "you@example.com",
|
|
2388
|
+
validate: et
|
|
2389
|
+
},
|
|
2390
|
+
{
|
|
2391
|
+
key: "seller.phone_number",
|
|
2392
|
+
label: "Phone number",
|
|
2393
|
+
type: "string",
|
|
2394
|
+
style: "phone",
|
|
2395
|
+
required: !0,
|
|
2396
|
+
placeholder: "(555) 555-5555",
|
|
2397
|
+
validate: Dt
|
|
2398
|
+
},
|
|
2399
|
+
{
|
|
2400
|
+
key: "seller.sms_opt_in",
|
|
2401
|
+
label: "I consent to receive marketing calls and texts from Opendoor and its affiliates to the number provided. I understand that I may opt out at any time and consent is not a condition of purchase.",
|
|
2402
|
+
type: "boolean",
|
|
2403
|
+
style: "toggle",
|
|
2404
|
+
required: !1
|
|
2405
|
+
}
|
|
2406
|
+
], Ot = {
|
|
2407
|
+
field: "seller.relation_to_owner",
|
|
2408
|
+
op: "eq",
|
|
2409
|
+
value: "self"
|
|
2410
|
+
}, Ue = {
|
|
2411
|
+
and: [
|
|
2412
|
+
Ot,
|
|
2404
2413
|
{
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
style: "toggle",
|
|
2409
|
-
required: !1
|
|
2414
|
+
field: "seller.signed_listing_agreement",
|
|
2415
|
+
op: "eq",
|
|
2416
|
+
value: "true"
|
|
2410
2417
|
}
|
|
2411
2418
|
]
|
|
2412
|
-
},
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2419
|
+
}, qn = [
|
|
2420
|
+
{
|
|
2421
|
+
key: "seller.signed_listing_agreement",
|
|
2422
|
+
label: "Do you currently have a written agreement with a real estate agent to sell your home?",
|
|
2423
|
+
type: "string",
|
|
2424
|
+
style: "radio-card",
|
|
2425
|
+
required: !0,
|
|
2426
|
+
showLabel: !0,
|
|
2427
|
+
showWhen: Ot,
|
|
2428
|
+
options: [
|
|
2429
|
+
{ label: "Yes", value: "true" },
|
|
2430
|
+
{ label: "No", value: "false" }
|
|
2431
|
+
]
|
|
2432
|
+
},
|
|
2433
|
+
{
|
|
2434
|
+
key: "seller.listing_agent.full_name",
|
|
2435
|
+
label: "Agent full name",
|
|
2436
|
+
description: "Your agent will need to request an offer on your behalf. Don't worry, it's easy.",
|
|
2437
|
+
type: "string",
|
|
2438
|
+
style: "input",
|
|
2439
|
+
required: !0,
|
|
2440
|
+
placeholder: "Enter their first and last name",
|
|
2441
|
+
showWhen: Ue
|
|
2442
|
+
},
|
|
2443
|
+
{
|
|
2444
|
+
key: "seller.listing_agent.email",
|
|
2445
|
+
label: "Agent email address",
|
|
2446
|
+
type: "string",
|
|
2447
|
+
style: "email",
|
|
2448
|
+
required: !0,
|
|
2449
|
+
placeholder: "agent@example.com",
|
|
2450
|
+
validate: et,
|
|
2451
|
+
showWhen: Ue
|
|
2452
|
+
},
|
|
2453
|
+
{
|
|
2454
|
+
key: "seller.listing_agent.phone_number",
|
|
2455
|
+
label: "Agent phone number (Optional)",
|
|
2456
|
+
type: "string",
|
|
2457
|
+
style: "phone",
|
|
2458
|
+
required: !1,
|
|
2459
|
+
placeholder: "(555) 555-5555",
|
|
2460
|
+
validate: Dt,
|
|
2461
|
+
showWhen: Ue
|
|
2462
|
+
}
|
|
2463
|
+
];
|
|
2464
|
+
function Vn(e) {
|
|
2465
|
+
return {
|
|
2466
|
+
id: "contact-info",
|
|
2467
|
+
title: "You're one step from your offer.",
|
|
2468
|
+
subtitle: "Create a free account to see your offer. No commitment to sell — just your number, email, and name.",
|
|
2469
|
+
submitLabel: "See my offer",
|
|
2470
|
+
questions: e ? [...xt, ...qn] : [...xt]
|
|
2471
|
+
};
|
|
2472
|
+
}
|
|
2473
|
+
const Gn = [
|
|
2474
|
+
kn,
|
|
2475
|
+
jn,
|
|
2416
2476
|
Nn,
|
|
2417
|
-
In,
|
|
2418
|
-
Sn,
|
|
2419
|
-
En,
|
|
2420
2477
|
Pn,
|
|
2421
2478
|
Ln,
|
|
2422
2479
|
Tn,
|
|
@@ -2425,152 +2482,184 @@ const Nn = Be("kitchen", "home.kitchen_seller_score", "How would you describe yo
|
|
|
2425
2482
|
On,
|
|
2426
2483
|
Rn,
|
|
2427
2484
|
Bn,
|
|
2485
|
+
$n,
|
|
2428
2486
|
Mn,
|
|
2429
|
-
Fn
|
|
2487
|
+
Fn,
|
|
2488
|
+
Wn,
|
|
2489
|
+
Hn
|
|
2430
2490
|
];
|
|
2431
|
-
function
|
|
2432
|
-
return
|
|
2491
|
+
function Rt(e) {
|
|
2492
|
+
return [
|
|
2493
|
+
...Gn,
|
|
2494
|
+
Vn(e == null ? void 0 : e.checkForAgent)
|
|
2495
|
+
];
|
|
2496
|
+
}
|
|
2497
|
+
Rt();
|
|
2498
|
+
function wt(e) {
|
|
2499
|
+
const r = Rt({
|
|
2500
|
+
checkForAgent: e == null ? void 0 : e.checkForAgent
|
|
2501
|
+
});
|
|
2502
|
+
return new wn(r, e);
|
|
2433
2503
|
}
|
|
2434
|
-
const
|
|
2435
|
-
function
|
|
2436
|
-
const e = Re(
|
|
2504
|
+
const Bt = ze(null);
|
|
2505
|
+
function be() {
|
|
2506
|
+
const e = Re(Bt);
|
|
2437
2507
|
if (!e)
|
|
2438
2508
|
throw new Error(
|
|
2439
2509
|
"useDtc must be used within a <DtcOnboardingFlow> component"
|
|
2440
2510
|
);
|
|
2441
2511
|
return e;
|
|
2442
2512
|
}
|
|
2443
|
-
const
|
|
2513
|
+
const Un = ({
|
|
2444
2514
|
initialAnswers: e,
|
|
2445
2515
|
skipPages: r,
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2516
|
+
checkForAgent: a = !1,
|
|
2517
|
+
smsConsentText: s,
|
|
2518
|
+
contactConsentText: o,
|
|
2519
|
+
submitLabel: i,
|
|
2520
|
+
contactPageTitle: f,
|
|
2521
|
+
contactPageSubtitle: p,
|
|
2522
|
+
onSubmit: h,
|
|
2523
|
+
onPageChange: c,
|
|
2524
|
+
onAnswerChange: l,
|
|
2525
|
+
onReady: b,
|
|
2526
|
+
onError: g,
|
|
2527
|
+
children: w
|
|
2457
2528
|
}) => {
|
|
2458
|
-
var
|
|
2459
|
-
const x = Z(p);
|
|
2460
|
-
x.current = p;
|
|
2529
|
+
var se;
|
|
2461
2530
|
const E = Z(h);
|
|
2462
2531
|
E.current = h;
|
|
2463
|
-
const
|
|
2464
|
-
|
|
2465
|
-
const
|
|
2466
|
-
|
|
2467
|
-
const
|
|
2468
|
-
|
|
2469
|
-
const
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2532
|
+
const I = Z(c);
|
|
2533
|
+
I.current = c;
|
|
2534
|
+
const O = Z(l);
|
|
2535
|
+
O.current = l;
|
|
2536
|
+
const L = Z(b);
|
|
2537
|
+
L.current = b;
|
|
2538
|
+
const U = Z(g);
|
|
2539
|
+
U.current = g;
|
|
2540
|
+
const [_, _e] = S(
|
|
2541
|
+
() => wt({ initialAnswers: e, skipPages: r, checkForAgent: a })
|
|
2542
|
+
), W = `${(r ?? []).join("|")}|${a ? "1" : "0"}`, ie = Z(W);
|
|
2543
|
+
ue(() => {
|
|
2544
|
+
W !== ie.current && (ie.current = W, _e((K) => {
|
|
2545
|
+
var ee;
|
|
2546
|
+
const H = {
|
|
2547
|
+
...e,
|
|
2548
|
+
...K.answers
|
|
2549
|
+
}, de = (ee = K.currentPage) == null ? void 0 : ee.id, R = wt({
|
|
2550
|
+
initialAnswers: H,
|
|
2551
|
+
skipPages: r,
|
|
2552
|
+
checkForAgent: a
|
|
2553
|
+
});
|
|
2554
|
+
if (de) {
|
|
2555
|
+
const ye = R.visiblePages.findIndex(
|
|
2556
|
+
(pe) => pe.id === de
|
|
2557
|
+
);
|
|
2558
|
+
ye >= 0 && R.goToPage(ye);
|
|
2559
|
+
}
|
|
2560
|
+
return R;
|
|
2561
|
+
}));
|
|
2562
|
+
}, [W]);
|
|
2563
|
+
const [$, P] = S(
|
|
2564
|
+
_.answers
|
|
2565
|
+
), [X, J] = S(
|
|
2566
|
+
((se = _.currentPage) == null ? void 0 : se.id) ?? ""
|
|
2567
|
+
), [le, oe] = S({}), [F, V] = S(
|
|
2568
|
+
_.visiblePages
|
|
2481
2569
|
);
|
|
2482
|
-
|
|
2483
|
-
var
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2570
|
+
ue(() => {
|
|
2571
|
+
var H, de;
|
|
2572
|
+
P(_.answers), J(((H = _.currentPage) == null ? void 0 : H.id) ?? ""), V([..._.visiblePages]), oe({});
|
|
2573
|
+
const K = [
|
|
2574
|
+
_.on("answerChange", (R) => {
|
|
2575
|
+
var ee;
|
|
2576
|
+
P(_.answers), V([..._.visiblePages]), R.type === "answerChange" && ((ee = O.current) == null || ee.call(O, R.key, R.value));
|
|
2488
2577
|
}),
|
|
2489
|
-
|
|
2490
|
-
var
|
|
2491
|
-
|
|
2578
|
+
_.on("pageChange", (R) => {
|
|
2579
|
+
var ee;
|
|
2580
|
+
R.type === "pageChange" && (J(R.pageId), V([..._.visiblePages]), oe({}), (ee = I.current) == null || ee.call(I, R.pageIndex, R.pageId));
|
|
2492
2581
|
}),
|
|
2493
|
-
|
|
2494
|
-
|
|
2582
|
+
_.on("validationError", (R) => {
|
|
2583
|
+
R.type === "validationError" && oe(R.errors);
|
|
2495
2584
|
}),
|
|
2496
|
-
|
|
2497
|
-
|
|
2585
|
+
_.on("submit", (R) => {
|
|
2586
|
+
R.type === "submit" && E.current(R.answers);
|
|
2498
2587
|
})
|
|
2499
2588
|
];
|
|
2500
|
-
return (
|
|
2501
|
-
|
|
2589
|
+
return (de = L.current) == null || de.call(L), () => {
|
|
2590
|
+
K.forEach((R) => R()), _.destroy();
|
|
2502
2591
|
};
|
|
2503
|
-
}, [
|
|
2504
|
-
const
|
|
2505
|
-
|
|
2506
|
-
e && e !==
|
|
2507
|
-
}, [e,
|
|
2508
|
-
const
|
|
2509
|
-
const
|
|
2510
|
-
return
|
|
2511
|
-
}, [
|
|
2592
|
+
}, [_]);
|
|
2593
|
+
const ce = Z(e);
|
|
2594
|
+
ue(() => {
|
|
2595
|
+
e && e !== ce.current && (ce.current = e, _.setAnswers(e));
|
|
2596
|
+
}, [e, _]);
|
|
2597
|
+
const ae = Pe(() => {
|
|
2598
|
+
const K = F.findIndex((H) => H.id === X);
|
|
2599
|
+
return K >= 0 ? K : 0;
|
|
2600
|
+
}, [F, X]), v = F[ae], j = Pe(() => X ? _.getVisibleQuestionsForCurrentPage() : [], [_, X, $]), C = Pe(() => F.length <= 1 ? 0 : Math.min(
|
|
2512
2601
|
1,
|
|
2513
|
-
Math.max(0,
|
|
2514
|
-
), [
|
|
2602
|
+
Math.max(0, ae / (F.length - 1))
|
|
2603
|
+
), [ae, F.length]), fe = Pe(
|
|
2515
2604
|
() => ({
|
|
2516
|
-
engine:
|
|
2517
|
-
currentPage:
|
|
2518
|
-
currentPageIndex:
|
|
2519
|
-
visiblePages:
|
|
2520
|
-
visibleQuestions:
|
|
2521
|
-
answers:
|
|
2522
|
-
validationErrors:
|
|
2605
|
+
engine: _,
|
|
2606
|
+
currentPage: v,
|
|
2607
|
+
currentPageIndex: ae,
|
|
2608
|
+
visiblePages: F,
|
|
2609
|
+
visibleQuestions: j,
|
|
2610
|
+
answers: $,
|
|
2611
|
+
validationErrors: le,
|
|
2523
2612
|
progress: C,
|
|
2524
|
-
isFirstPage:
|
|
2525
|
-
contactConsentText:
|
|
2526
|
-
submitLabel:
|
|
2527
|
-
contactPageTitle:
|
|
2528
|
-
contactPageSubtitle:
|
|
2529
|
-
isLastPage:
|
|
2530
|
-
setAnswer: (
|
|
2531
|
-
getAnswer:
|
|
2613
|
+
isFirstPage: ae === 0,
|
|
2614
|
+
contactConsentText: o,
|
|
2615
|
+
submitLabel: i,
|
|
2616
|
+
contactPageTitle: f,
|
|
2617
|
+
contactPageSubtitle: p,
|
|
2618
|
+
isLastPage: F.length > 0 && ae === F.length - 1,
|
|
2619
|
+
setAnswer: (K, H) => _.setAnswer(K, H),
|
|
2620
|
+
getAnswer: _.getAnswer,
|
|
2532
2621
|
goToNext: () => {
|
|
2533
|
-
var
|
|
2534
|
-
const
|
|
2535
|
-
if (!
|
|
2622
|
+
var H;
|
|
2623
|
+
const K = _.goToNext();
|
|
2624
|
+
if (!K.valid)
|
|
2536
2625
|
try {
|
|
2537
|
-
(
|
|
2538
|
-
|
|
2626
|
+
(H = U.current) == null || H.call(
|
|
2627
|
+
U,
|
|
2539
2628
|
new Error(
|
|
2540
|
-
`Validation failed: ${Object.values(
|
|
2629
|
+
`Validation failed: ${Object.values(K.errors).join(", ")}`
|
|
2541
2630
|
)
|
|
2542
2631
|
);
|
|
2543
|
-
} catch (
|
|
2544
|
-
console.error("[DtcOnboardingFlow] onError callback threw:",
|
|
2632
|
+
} catch (de) {
|
|
2633
|
+
console.error("[DtcOnboardingFlow] onError callback threw:", de);
|
|
2545
2634
|
}
|
|
2546
2635
|
},
|
|
2547
|
-
goToPrev: () =>
|
|
2548
|
-
smsConsentText:
|
|
2636
|
+
goToPrev: () => _.goToPrev(),
|
|
2637
|
+
smsConsentText: s
|
|
2549
2638
|
}),
|
|
2550
2639
|
[
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
J,
|
|
2554
|
-
G,
|
|
2555
|
-
b,
|
|
2640
|
+
_,
|
|
2641
|
+
v,
|
|
2556
2642
|
ae,
|
|
2557
|
-
|
|
2643
|
+
F,
|
|
2644
|
+
j,
|
|
2645
|
+
$,
|
|
2646
|
+
le,
|
|
2558
2647
|
C,
|
|
2559
|
-
a,
|
|
2560
2648
|
s,
|
|
2561
2649
|
o,
|
|
2562
2650
|
i,
|
|
2563
|
-
f
|
|
2651
|
+
f,
|
|
2652
|
+
p
|
|
2564
2653
|
]
|
|
2565
2654
|
);
|
|
2566
|
-
return /* @__PURE__ */ t.jsx(
|
|
2567
|
-
},
|
|
2568
|
-
header:
|
|
2569
|
-
headerLogos:
|
|
2570
|
-
partnerLogo:
|
|
2571
|
-
opendoorLogo:
|
|
2572
|
-
closeButton:
|
|
2573
|
-
},
|
|
2655
|
+
return /* @__PURE__ */ t.jsx(Bt.Provider, { value: fe, children: w });
|
|
2656
|
+
}, Yn = "_header_1o9p2_5", Zn = "_headerLogos_1o9p2_15", Kn = "_partnerLogo_1o9p2_21", zn = "_opendoorLogo_1o9p2_27", Jn = "_closeButton_1o9p2_31", Le = {
|
|
2657
|
+
header: Yn,
|
|
2658
|
+
headerLogos: Zn,
|
|
2659
|
+
partnerLogo: Kn,
|
|
2660
|
+
opendoorLogo: zn,
|
|
2661
|
+
closeButton: Jn
|
|
2662
|
+
}, Xn = () => /* @__PURE__ */ t.jsx(
|
|
2574
2663
|
"svg",
|
|
2575
2664
|
{
|
|
2576
2665
|
width: "90",
|
|
@@ -2602,7 +2691,7 @@ const Wn = ({
|
|
|
2602
2691
|
className: Le.partnerLogo
|
|
2603
2692
|
}
|
|
2604
2693
|
),
|
|
2605
|
-
/* @__PURE__ */ t.jsx(
|
|
2694
|
+
/* @__PURE__ */ t.jsx(Xn, {})
|
|
2606
2695
|
] }),
|
|
2607
2696
|
r && /* @__PURE__ */ t.jsx(
|
|
2608
2697
|
"button",
|
|
@@ -2630,72 +2719,72 @@ const Wn = ({
|
|
|
2630
2719
|
)
|
|
2631
2720
|
}
|
|
2632
2721
|
)
|
|
2633
|
-
] }),
|
|
2634
|
-
container:
|
|
2635
|
-
layout:
|
|
2636
|
-
layoutScrollable:
|
|
2637
|
-
addressBar:
|
|
2638
|
-
addressIcon:
|
|
2639
|
-
addressText:
|
|
2640
|
-
contentSplit:
|
|
2641
|
-
contentLeft:
|
|
2642
|
-
contentRight:
|
|
2643
|
-
pageTitle:
|
|
2644
|
-
pageSubtitle:
|
|
2645
|
-
pageContent:
|
|
2646
|
-
navigation:
|
|
2647
|
-
navigationButtons:
|
|
2648
|
-
backButton:
|
|
2649
|
-
nextButton:
|
|
2650
|
-
progressBar:
|
|
2651
|
-
progressBarFill:
|
|
2652
|
-
radioCardGroup:
|
|
2653
|
-
radioCard:
|
|
2654
|
-
radioCardSelected:
|
|
2655
|
-
radioCardLabel:
|
|
2656
|
-
radioCardDescription:
|
|
2657
|
-
imageCardGroup:
|
|
2658
|
-
imageCard:
|
|
2659
|
-
imageCardSelected:
|
|
2660
|
-
imageCardPhoto:
|
|
2661
|
-
imageCardLabel:
|
|
2662
|
-
imageCardDescription:
|
|
2663
|
-
fieldGroup:
|
|
2664
|
-
fieldLabel:
|
|
2665
|
-
fieldDescription:
|
|
2666
|
-
fieldSelect:
|
|
2667
|
-
fieldSelectError:
|
|
2668
|
-
fieldInputWrapper:
|
|
2669
|
-
fieldInput:
|
|
2670
|
-
fieldInputError:
|
|
2671
|
-
fieldSuffix:
|
|
2672
|
-
fieldError:
|
|
2673
|
-
checkboxCardGroup:
|
|
2674
|
-
checkboxCard:
|
|
2675
|
-
checkboxCardSelected:
|
|
2676
|
-
checkboxCardContent:
|
|
2677
|
-
checkboxCardLabel:
|
|
2678
|
-
checkboxCardHelper:
|
|
2679
|
-
checkboxIndicator:
|
|
2680
|
-
checkboxIndicatorChecked:
|
|
2681
|
-
currencyWrapper:
|
|
2682
|
-
currencyPrefix:
|
|
2683
|
-
currencyInput:
|
|
2684
|
-
consentText:
|
|
2685
|
-
consentLink:
|
|
2686
|
-
ctaButton:
|
|
2687
|
-
toggleGroup:
|
|
2688
|
-
toggleLabel:
|
|
2689
|
-
toggleCheckbox:
|
|
2690
|
-
toggleText:
|
|
2691
|
-
searchableDropdown:
|
|
2692
|
-
searchableDropdownToggle:
|
|
2693
|
-
searchableDropdownList:
|
|
2694
|
-
searchableDropdownOption:
|
|
2695
|
-
searchableDropdownOptionSelected:
|
|
2696
|
-
searchableDropdownOptionHighlighted:
|
|
2697
|
-
searchableDropdownEmpty:
|
|
2698
|
-
},
|
|
2722
|
+
] }), Qn = "_container_150ym_7", ea = "_layout_150ym_20", ta = "_layoutScrollable_150ym_27", ra = "_addressBar_150ym_43", na = "_addressIcon_150ym_51", aa = "_addressText_150ym_55", sa = "_contentSplit_150ym_61", oa = "_contentLeft_150ym_75", ia = "_contentRight_150ym_81", la = "_pageTitle_150ym_97", ca = "_pageSubtitle_150ym_105", da = "_pageContent_150ym_114", ua = "_navigation_150ym_122", ha = "_navigationButtons_150ym_136", ma = "_backButton_150ym_142", fa = "_nextButton_150ym_165", pa = "_progressBar_150ym_191", ga = "_progressBarFill_150ym_198", _a = "_radioCardGroup_150ym_206", ya = "_radioCard_150ym_206", ba = "_radioCardSelected_150ym_238", va = "_radioCardLabel_150ym_243", xa = "_radioCardDescription_150ym_249", wa = "_imageCardGroup_150ym_256", Ca = "_imageCard_150ym_256", ka = "_imageCardSelected_150ym_288", ja = "_imageCardPhoto_150ym_293", Na = "_imageCardLabel_150ym_300", Ia = "_imageCardDescription_150ym_307", Sa = "_fieldGroup_150ym_316", Ea = "_fieldLabel_150ym_322", Pa = "_fieldDescription_150ym_329", La = "_fieldSelect_150ym_336", Ta = "_fieldSelectError_150ym_362", Aa = "_fieldInputWrapper_150ym_366", Da = "_fieldInput_150ym_366", Oa = "_fieldInputError_150ym_404", Ra = "_fieldSuffix_150ym_408", Ba = "_fieldError_150ym_419", $a = "_checkboxCardGroup_150ym_428", Ma = "_checkboxCard_150ym_428", Fa = "_checkboxCardSelected_150ym_460", Wa = "_checkboxCardContent_150ym_465", Ha = "_checkboxCardLabel_150ym_472", qa = "_checkboxCardHelper_150ym_478", Va = "_checkboxIndicator_150ym_483", Ga = "_checkboxIndicatorChecked_150ym_495", Ua = "_currencyWrapper_150ym_503", Ya = "_currencyPrefix_150ym_509", Za = "_currencyInput_150ym_518", Ka = "_consentText_150ym_538", za = "_consentLink_150ym_546", Ja = "_ctaButton_150ym_551", Xa = "_toggleGroup_150ym_583", Qa = "_toggleLabel_150ym_587", es = "_toggleCheckbox_150ym_595", ts = "_toggleText_150ym_604", rs = "_searchableDropdown_150ym_612", ns = "_searchableDropdownToggle_150ym_622", as = "_searchableDropdownList_150ym_635", ss = "_searchableDropdownOption_150ym_644", os = "_searchableDropdownOptionSelected_150ym_662", is = "_searchableDropdownOptionHighlighted_150ym_667", ls = "_searchableDropdownEmpty_150ym_671", u = {
|
|
2723
|
+
container: Qn,
|
|
2724
|
+
layout: ea,
|
|
2725
|
+
layoutScrollable: ta,
|
|
2726
|
+
addressBar: ra,
|
|
2727
|
+
addressIcon: na,
|
|
2728
|
+
addressText: aa,
|
|
2729
|
+
contentSplit: sa,
|
|
2730
|
+
contentLeft: oa,
|
|
2731
|
+
contentRight: ia,
|
|
2732
|
+
pageTitle: la,
|
|
2733
|
+
pageSubtitle: ca,
|
|
2734
|
+
pageContent: da,
|
|
2735
|
+
navigation: ua,
|
|
2736
|
+
navigationButtons: ha,
|
|
2737
|
+
backButton: ma,
|
|
2738
|
+
nextButton: fa,
|
|
2739
|
+
progressBar: pa,
|
|
2740
|
+
progressBarFill: ga,
|
|
2741
|
+
radioCardGroup: _a,
|
|
2742
|
+
radioCard: ya,
|
|
2743
|
+
radioCardSelected: ba,
|
|
2744
|
+
radioCardLabel: va,
|
|
2745
|
+
radioCardDescription: xa,
|
|
2746
|
+
imageCardGroup: wa,
|
|
2747
|
+
imageCard: Ca,
|
|
2748
|
+
imageCardSelected: ka,
|
|
2749
|
+
imageCardPhoto: ja,
|
|
2750
|
+
imageCardLabel: Na,
|
|
2751
|
+
imageCardDescription: Ia,
|
|
2752
|
+
fieldGroup: Sa,
|
|
2753
|
+
fieldLabel: Ea,
|
|
2754
|
+
fieldDescription: Pa,
|
|
2755
|
+
fieldSelect: La,
|
|
2756
|
+
fieldSelectError: Ta,
|
|
2757
|
+
fieldInputWrapper: Aa,
|
|
2758
|
+
fieldInput: Da,
|
|
2759
|
+
fieldInputError: Oa,
|
|
2760
|
+
fieldSuffix: Ra,
|
|
2761
|
+
fieldError: Ba,
|
|
2762
|
+
checkboxCardGroup: $a,
|
|
2763
|
+
checkboxCard: Ma,
|
|
2764
|
+
checkboxCardSelected: Fa,
|
|
2765
|
+
checkboxCardContent: Wa,
|
|
2766
|
+
checkboxCardLabel: Ha,
|
|
2767
|
+
checkboxCardHelper: qa,
|
|
2768
|
+
checkboxIndicator: Va,
|
|
2769
|
+
checkboxIndicatorChecked: Ga,
|
|
2770
|
+
currencyWrapper: Ua,
|
|
2771
|
+
currencyPrefix: Ya,
|
|
2772
|
+
currencyInput: Za,
|
|
2773
|
+
consentText: Ka,
|
|
2774
|
+
consentLink: za,
|
|
2775
|
+
ctaButton: Ja,
|
|
2776
|
+
toggleGroup: Xa,
|
|
2777
|
+
toggleLabel: Qa,
|
|
2778
|
+
toggleCheckbox: es,
|
|
2779
|
+
toggleText: ts,
|
|
2780
|
+
searchableDropdown: rs,
|
|
2781
|
+
searchableDropdownToggle: ns,
|
|
2782
|
+
searchableDropdownList: as,
|
|
2783
|
+
searchableDropdownOption: ss,
|
|
2784
|
+
searchableDropdownOptionSelected: os,
|
|
2785
|
+
searchableDropdownOptionHighlighted: is,
|
|
2786
|
+
searchableDropdownEmpty: ls
|
|
2787
|
+
}, cs = ({ progress: e }) => {
|
|
2699
2788
|
const r = Math.min(100, Math.max(0, e * 100));
|
|
2700
2789
|
return /* @__PURE__ */ t.jsx(
|
|
2701
2790
|
"div",
|
|
@@ -2714,12 +2803,12 @@ const Wn = ({
|
|
|
2714
2803
|
)
|
|
2715
2804
|
}
|
|
2716
2805
|
);
|
|
2717
|
-
},
|
|
2718
|
-
const { isFirstPage: e, currentPage: r, progress: a, goToNext: s, goToPrev: o } =
|
|
2806
|
+
}, ds = () => {
|
|
2807
|
+
const { isFirstPage: e, currentPage: r, progress: a, goToNext: s, goToPrev: o } = be();
|
|
2719
2808
|
if ((r == null ? void 0 : r.id) === "contact-info") return null;
|
|
2720
2809
|
const i = (r == null ? void 0 : r.submitLabel) ?? "Next";
|
|
2721
2810
|
return /* @__PURE__ */ t.jsxs("nav", { className: u.navigation, "aria-label": "Page navigation", children: [
|
|
2722
|
-
/* @__PURE__ */ t.jsx(
|
|
2811
|
+
/* @__PURE__ */ t.jsx(cs, { progress: a }),
|
|
2723
2812
|
/* @__PURE__ */ t.jsxs("div", { className: u.navigationButtons, children: [
|
|
2724
2813
|
e ? /* @__PURE__ */ t.jsx("div", {}) : /* @__PURE__ */ t.jsx(
|
|
2725
2814
|
"button",
|
|
@@ -2747,66 +2836,70 @@ const Wn = ({
|
|
|
2747
2836
|
/* @__PURE__ */ t.jsx("button", { type: "button", className: u.nextButton, onClick: s, children: i })
|
|
2748
2837
|
] })
|
|
2749
2838
|
] });
|
|
2750
|
-
},
|
|
2839
|
+
}, us = ({ question: e }) => {
|
|
2751
2840
|
var l;
|
|
2752
|
-
const { getAnswer: r, setAnswer: a, goToNext: s, validationErrors: o } =
|
|
2753
|
-
|
|
2841
|
+
const { getAnswer: r, setAnswer: a, goToNext: s, validationErrors: o } = be(), i = r(e.key), f = o[e.key], p = Z(null);
|
|
2842
|
+
ue(() => () => {
|
|
2754
2843
|
p.current && clearTimeout(p.current);
|
|
2755
2844
|
}, []);
|
|
2756
2845
|
const h = Te(
|
|
2757
|
-
(
|
|
2758
|
-
a(e.key,
|
|
2846
|
+
(b) => {
|
|
2847
|
+
a(e.key, b), e.autoAdvance && (p.current && clearTimeout(p.current), p.current = setTimeout(() => s(), 150));
|
|
2759
2848
|
},
|
|
2760
2849
|
[e.key, e.autoAdvance, a, s]
|
|
2761
2850
|
), c = Te(
|
|
2762
|
-
(
|
|
2763
|
-
var
|
|
2764
|
-
const
|
|
2765
|
-
if (!
|
|
2851
|
+
(b, g) => {
|
|
2852
|
+
var I, O;
|
|
2853
|
+
const w = e.options;
|
|
2854
|
+
if (!w) return;
|
|
2766
2855
|
let E = null;
|
|
2767
|
-
if (
|
|
2768
|
-
const
|
|
2769
|
-
(
|
|
2856
|
+
if (b.key === "ArrowDown" || b.key === "ArrowRight" ? (b.preventDefault(), E = (g + 1) % w.length) : (b.key === "ArrowUp" || b.key === "ArrowLeft") && (b.preventDefault(), E = (g - 1 + w.length) % w.length), E !== null) {
|
|
2857
|
+
const L = (I = b.currentTarget.closest('[role="radiogroup"]')) == null ? void 0 : I.querySelectorAll('[role="radio"]');
|
|
2858
|
+
(O = L == null ? void 0 : L[E]) == null || O.focus(), h(w[E].value);
|
|
2770
2859
|
}
|
|
2771
2860
|
},
|
|
2772
2861
|
[e.options, h]
|
|
2773
2862
|
);
|
|
2774
|
-
return /* @__PURE__ */ t.jsxs(
|
|
2775
|
-
"
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2863
|
+
return /* @__PURE__ */ t.jsxs("div", { className: u.fieldGroup, children: [
|
|
2864
|
+
e.showLabel && /* @__PURE__ */ t.jsx("p", { className: u.fieldLabel, id: `${e.key}-label`, children: e.label }),
|
|
2865
|
+
/* @__PURE__ */ t.jsxs(
|
|
2866
|
+
"div",
|
|
2867
|
+
{
|
|
2868
|
+
className: u.radioCardGroup,
|
|
2869
|
+
role: "radiogroup",
|
|
2870
|
+
"aria-labelledby": e.showLabel ? `${e.key}-label` : void 0,
|
|
2871
|
+
"aria-label": e.showLabel ? void 0 : e.label,
|
|
2872
|
+
children: [
|
|
2873
|
+
(l = e.options) == null ? void 0 : l.map((b, g) => {
|
|
2874
|
+
const w = i === b.value;
|
|
2875
|
+
return /* @__PURE__ */ t.jsxs(
|
|
2876
|
+
"button",
|
|
2877
|
+
{
|
|
2878
|
+
type: "button",
|
|
2879
|
+
role: "radio",
|
|
2880
|
+
"aria-checked": w,
|
|
2881
|
+
tabIndex: w || g === 0 && !i ? 0 : -1,
|
|
2882
|
+
className: `${u.radioCard} ${w ? u.radioCardSelected : ""}`,
|
|
2883
|
+
onClick: () => h(b.value),
|
|
2884
|
+
onKeyDown: (E) => c(E, g),
|
|
2885
|
+
children: [
|
|
2886
|
+
/* @__PURE__ */ t.jsx("span", { className: u.radioCardLabel, children: b.label }),
|
|
2887
|
+
b.description && /* @__PURE__ */ t.jsx("span", { className: u.radioCardDescription, children: b.description })
|
|
2888
|
+
]
|
|
2889
|
+
},
|
|
2890
|
+
String(b.value)
|
|
2891
|
+
);
|
|
2892
|
+
}),
|
|
2893
|
+
f && /* @__PURE__ */ t.jsx("p", { className: u.fieldError, children: f })
|
|
2894
|
+
]
|
|
2895
|
+
}
|
|
2896
|
+
)
|
|
2897
|
+
] });
|
|
2898
|
+
}, hs = "https://images.opendoor.com/source/s3/imgdrop-production", ms = "service=reception-fe&dpr=2&fit=scale-down";
|
|
2806
2899
|
function ne(e, r = "3:2-sm") {
|
|
2807
|
-
return `${
|
|
2900
|
+
return `${hs}/${e}?${ms}&preset=${r}`;
|
|
2808
2901
|
}
|
|
2809
|
-
const
|
|
2902
|
+
const fs = {
|
|
2810
2903
|
// Kitchen
|
|
2811
2904
|
"kitchen-fixer_upper": ne("2023-04-1681772974083-61414.png"),
|
|
2812
2905
|
"kitchen-dated": ne("2023-04-1681772974089-39460.png"),
|
|
@@ -2831,10 +2924,10 @@ const cs = {
|
|
|
2831
2924
|
"exterior-standard": ne("2023-04-1681773220498-64940.png"),
|
|
2832
2925
|
"exterior-high_end": ne("2023-04-1682103085417-24272.jpeg", "3:2-md"),
|
|
2833
2926
|
"exterior-luxury": ne("2023-04-1681773220487-59852.png")
|
|
2834
|
-
},
|
|
2927
|
+
}, ps = ({ question: e }) => {
|
|
2835
2928
|
var c;
|
|
2836
|
-
const { getAnswer: r, setAnswer: a, goToNext: s, validationErrors: o } =
|
|
2837
|
-
|
|
2929
|
+
const { getAnswer: r, setAnswer: a, goToNext: s, validationErrors: o } = be(), i = r(e.key), f = o[e.key], p = Z(null);
|
|
2930
|
+
ue(() => () => {
|
|
2838
2931
|
p.current && clearTimeout(p.current);
|
|
2839
2932
|
}, []);
|
|
2840
2933
|
const h = Te(
|
|
@@ -2851,14 +2944,14 @@ const cs = {
|
|
|
2851
2944
|
"aria-label": e.label,
|
|
2852
2945
|
children: [
|
|
2853
2946
|
(c = e.options) == null ? void 0 : c.map((l) => {
|
|
2854
|
-
const
|
|
2947
|
+
const b = i === l.value, g = l.imageId ? fs[l.imageId] : void 0;
|
|
2855
2948
|
return /* @__PURE__ */ t.jsxs(
|
|
2856
2949
|
"button",
|
|
2857
2950
|
{
|
|
2858
2951
|
type: "button",
|
|
2859
2952
|
role: "radio",
|
|
2860
|
-
"aria-checked":
|
|
2861
|
-
className: `${u.imageCard} ${
|
|
2953
|
+
"aria-checked": b,
|
|
2954
|
+
className: `${u.imageCard} ${b ? u.imageCardSelected : ""}`,
|
|
2862
2955
|
onClick: () => h(l.value),
|
|
2863
2956
|
children: [
|
|
2864
2957
|
g && /* @__PURE__ */ t.jsx(
|
|
@@ -2881,25 +2974,25 @@ const cs = {
|
|
|
2881
2974
|
]
|
|
2882
2975
|
}
|
|
2883
2976
|
);
|
|
2884
|
-
},
|
|
2977
|
+
}, gs = ({
|
|
2885
2978
|
question: e
|
|
2886
2979
|
}) => {
|
|
2887
2980
|
var p;
|
|
2888
|
-
const { getAnswer: r, setAnswer: a, validationErrors: s } =
|
|
2889
|
-
var
|
|
2890
|
-
const c = (
|
|
2981
|
+
const { getAnswer: r, setAnswer: a, validationErrors: s } = be(), o = r(e.key) ?? [], i = s[e.key], f = (h) => {
|
|
2982
|
+
var b;
|
|
2983
|
+
const c = (b = e.options) == null ? void 0 : b.find((g) => g.value === h);
|
|
2891
2984
|
if (c != null && c.exclusive) {
|
|
2892
2985
|
a(e.key, [h]);
|
|
2893
2986
|
return;
|
|
2894
2987
|
}
|
|
2895
2988
|
const l = o.filter(
|
|
2896
2989
|
(g) => {
|
|
2897
|
-
var
|
|
2898
|
-
return !((E = (
|
|
2990
|
+
var w, E;
|
|
2991
|
+
return !((E = (w = e.options) == null ? void 0 : w.find((I) => I.value === g)) != null && E.exclusive);
|
|
2899
2992
|
}
|
|
2900
2993
|
);
|
|
2901
2994
|
if (l.includes(h)) {
|
|
2902
|
-
const g = l.filter((
|
|
2995
|
+
const g = l.filter((w) => w !== h);
|
|
2903
2996
|
a(e.key, g.length > 0 ? g : void 0);
|
|
2904
2997
|
} else
|
|
2905
2998
|
a(e.key, [...l, h]);
|
|
@@ -2951,9 +3044,9 @@ const cs = {
|
|
|
2951
3044
|
]
|
|
2952
3045
|
}
|
|
2953
3046
|
);
|
|
2954
|
-
},
|
|
3047
|
+
}, _s = ({ question: e }) => {
|
|
2955
3048
|
var p;
|
|
2956
|
-
const { getAnswer: r, setAnswer: a, validationErrors: s } =
|
|
3049
|
+
const { getAnswer: r, setAnswer: a, validationErrors: s } = be(), o = r(e.key), i = s[e.key], f = (h) => {
|
|
2957
3050
|
const c = h.target.value;
|
|
2958
3051
|
e.type === "number" && c !== "" ? a(e.key, Number(c)) : a(e.key, c || void 0);
|
|
2959
3052
|
};
|
|
@@ -2975,11 +3068,11 @@ const cs = {
|
|
|
2975
3068
|
),
|
|
2976
3069
|
i && /* @__PURE__ */ t.jsx("p", { className: u.fieldError, children: i })
|
|
2977
3070
|
] });
|
|
2978
|
-
},
|
|
2979
|
-
const { getAnswer: r, setAnswer: a, validationErrors: s } =
|
|
3071
|
+
}, ys = ({ question: e }) => {
|
|
3072
|
+
const { getAnswer: r, setAnswer: a, validationErrors: s } = be(), o = r(e.key), i = s[e.key], f = (h) => {
|
|
2980
3073
|
const c = h.target.value;
|
|
2981
3074
|
if (e.type === "number") {
|
|
2982
|
-
const l = c.replace(/[^0-9.]/g, ""),
|
|
3075
|
+
const l = c.replace(/[^0-9.]/g, ""), b = l === "" ? void 0 : Number(l), g = b !== void 0 && isNaN(b) ? void 0 : b;
|
|
2983
3076
|
a(e.key, g);
|
|
2984
3077
|
} else
|
|
2985
3078
|
a(e.key, c || void 0);
|
|
@@ -3004,8 +3097,8 @@ const cs = {
|
|
|
3004
3097
|
] }),
|
|
3005
3098
|
i && /* @__PURE__ */ t.jsx("p", { className: u.fieldError, children: i })
|
|
3006
3099
|
] });
|
|
3007
|
-
},
|
|
3008
|
-
const { getAnswer: r, setAnswer: a, validationErrors: s } =
|
|
3100
|
+
}, bs = ({ question: e }) => {
|
|
3101
|
+
const { getAnswer: r, setAnswer: a, validationErrors: s } = be(), o = r(e.key), i = s[e.key], f = (h) => {
|
|
3009
3102
|
const c = h.target.value.replace(/[^0-9]/g, ""), l = c === "" ? void 0 : Number(c);
|
|
3010
3103
|
a(e.key, l !== void 0 && isNaN(l) ? void 0 : l);
|
|
3011
3104
|
}, p = o != null ? String(o) : "";
|
|
@@ -3029,12 +3122,12 @@ const cs = {
|
|
|
3029
3122
|
i && /* @__PURE__ */ t.jsx("p", { className: u.fieldError, children: i })
|
|
3030
3123
|
] });
|
|
3031
3124
|
};
|
|
3032
|
-
function
|
|
3125
|
+
function vs(e) {
|
|
3033
3126
|
const r = e.replace(/\D/g, "").slice(0, 10);
|
|
3034
3127
|
return r.length <= 3 ? r : r.length <= 6 ? `(${r.slice(0, 3)}) ${r.slice(3)}` : `(${r.slice(0, 3)}) ${r.slice(3, 6)}-${r.slice(6)}`;
|
|
3035
3128
|
}
|
|
3036
|
-
const
|
|
3037
|
-
const { getAnswer: r, setAnswer: a, validationErrors: s } =
|
|
3129
|
+
const xs = ({ question: e }) => {
|
|
3130
|
+
const { getAnswer: r, setAnswer: a, validationErrors: s } = be(), o = r(e.key) ?? "", i = s[e.key], f = (p) => {
|
|
3038
3131
|
const c = p.target.value.replace(/\D/g, "").slice(0, 10);
|
|
3039
3132
|
a(e.key, c || void 0);
|
|
3040
3133
|
};
|
|
@@ -3046,15 +3139,15 @@ const gs = ({ question: e }) => {
|
|
|
3046
3139
|
id: e.key,
|
|
3047
3140
|
type: "tel",
|
|
3048
3141
|
className: `${u.fieldInput} ${i ? u.fieldInputError : ""}`,
|
|
3049
|
-
value:
|
|
3142
|
+
value: vs(o),
|
|
3050
3143
|
onChange: f,
|
|
3051
3144
|
placeholder: e.placeholder || "(555) 555-5555"
|
|
3052
3145
|
}
|
|
3053
3146
|
),
|
|
3054
3147
|
i && /* @__PURE__ */ t.jsx("p", { className: u.fieldError, children: i })
|
|
3055
3148
|
] });
|
|
3056
|
-
},
|
|
3057
|
-
const { getAnswer: r, setAnswer: a, smsConsentText: s } =
|
|
3149
|
+
}, ws = ({ question: e }) => {
|
|
3150
|
+
const { getAnswer: r, setAnswer: a, smsConsentText: s } = be(), o = r(e.key);
|
|
3058
3151
|
let i = e.label;
|
|
3059
3152
|
return e.key === "seller.sms_opt_in" && s && (i = s), /* @__PURE__ */ t.jsx("div", { className: u.toggleGroup, children: /* @__PURE__ */ t.jsxs("label", { className: u.toggleLabel, children: [
|
|
3060
3153
|
/* @__PURE__ */ t.jsx(
|
|
@@ -3068,8 +3161,8 @@ const gs = ({ question: e }) => {
|
|
|
3068
3161
|
),
|
|
3069
3162
|
/* @__PURE__ */ t.jsx("span", { className: u.toggleText, children: i })
|
|
3070
3163
|
] }) });
|
|
3071
|
-
},
|
|
3072
|
-
function
|
|
3164
|
+
}, Ct = 4, De = 8, Cs = 240, ks = 80;
|
|
3165
|
+
function js(e) {
|
|
3073
3166
|
const r = {};
|
|
3074
3167
|
for (let a = e; a; a = a.parentElement) {
|
|
3075
3168
|
const s = a.style;
|
|
@@ -3080,158 +3173,158 @@ function vs(e) {
|
|
|
3080
3173
|
}
|
|
3081
3174
|
return r;
|
|
3082
3175
|
}
|
|
3083
|
-
const
|
|
3084
|
-
var
|
|
3085
|
-
const { getAnswer: r, setAnswer: a, validationErrors: s } =
|
|
3086
|
-
|
|
3087
|
-
let
|
|
3088
|
-
return e.dataSource === "homebuilders" &&
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
label:
|
|
3092
|
-
value:
|
|
3176
|
+
const Ns = ({ question: e }) => {
|
|
3177
|
+
var ae;
|
|
3178
|
+
const { getAnswer: r, setAnswer: a, validationErrors: s } = be(), o = r(e.key), i = s[e.key], f = `${e.key}-combobox`, [p, h] = S(""), [c, l] = S(!1), [b, g] = S([]), [w, E] = S(!1), I = Z(null), O = Z(null), L = Z(null), [U, _] = S(null), [_e, W] = S({}), ie = Re(Xe);
|
|
3179
|
+
ue(() => {
|
|
3180
|
+
let v = !1;
|
|
3181
|
+
return e.dataSource === "homebuilders" && ie ? (E(!0), ie.getHomebuilders().then((j) => {
|
|
3182
|
+
v || g(
|
|
3183
|
+
j.homebuilders.map((C) => ({
|
|
3184
|
+
label: C.displayName,
|
|
3185
|
+
value: C.identifier
|
|
3093
3186
|
}))
|
|
3094
3187
|
);
|
|
3095
3188
|
}).catch(() => {
|
|
3096
|
-
|
|
3097
|
-
e.options.map((
|
|
3098
|
-
label:
|
|
3099
|
-
value: String(
|
|
3189
|
+
v || (e.options ? g(
|
|
3190
|
+
e.options.map((j) => ({
|
|
3191
|
+
label: j.label,
|
|
3192
|
+
value: String(j.value)
|
|
3100
3193
|
}))
|
|
3101
3194
|
) : g([]));
|
|
3102
3195
|
}).finally(() => {
|
|
3103
|
-
|
|
3196
|
+
v || E(!1);
|
|
3104
3197
|
})) : e.options ? g(
|
|
3105
|
-
e.options.map((
|
|
3106
|
-
label:
|
|
3107
|
-
value: String(
|
|
3198
|
+
e.options.map((j) => ({
|
|
3199
|
+
label: j.label,
|
|
3200
|
+
value: String(j.value)
|
|
3108
3201
|
}))
|
|
3109
3202
|
) : g([]), () => {
|
|
3110
|
-
|
|
3203
|
+
v = !0;
|
|
3111
3204
|
};
|
|
3112
|
-
}, [e.dataSource, e.options,
|
|
3205
|
+
}, [e.dataSource, e.options, ie]);
|
|
3113
3206
|
const $ = Te(() => {
|
|
3114
|
-
const
|
|
3115
|
-
if (!
|
|
3116
|
-
const
|
|
3117
|
-
|
|
3118
|
-
Math.min(
|
|
3119
|
-
),
|
|
3120
|
-
|
|
3121
|
-
top:
|
|
3122
|
-
left:
|
|
3123
|
-
width:
|
|
3124
|
-
maxHeight:
|
|
3207
|
+
const v = O.current;
|
|
3208
|
+
if (!v) return;
|
|
3209
|
+
const j = v.getBoundingClientRect(), C = window.visualViewport, fe = (C == null ? void 0 : C.height) ?? window.innerHeight, se = (C == null ? void 0 : C.width) ?? window.innerWidth, K = (C == null ? void 0 : C.offsetTop) ?? 0, H = (C == null ? void 0 : C.offsetLeft) ?? 0, R = K + fe - j.bottom - Ct - De, ee = Math.max(
|
|
3210
|
+
ks,
|
|
3211
|
+
Math.min(Cs, R)
|
|
3212
|
+
), ye = Math.min(j.width, se - De * 2), pe = H + De, ve = H + se - ye - De, k = Math.max(pe, Math.min(j.left, ve));
|
|
3213
|
+
_({
|
|
3214
|
+
top: j.bottom + window.scrollY + Ct,
|
|
3215
|
+
left: k + window.scrollX,
|
|
3216
|
+
width: ye,
|
|
3217
|
+
maxHeight: ee
|
|
3125
3218
|
});
|
|
3126
3219
|
}, []);
|
|
3127
|
-
|
|
3220
|
+
er(() => {
|
|
3128
3221
|
if (!c) {
|
|
3129
|
-
|
|
3222
|
+
_(null);
|
|
3130
3223
|
return;
|
|
3131
3224
|
}
|
|
3132
|
-
|
|
3133
|
-
const
|
|
3134
|
-
window.addEventListener("scroll",
|
|
3135
|
-
const
|
|
3136
|
-
|
|
3137
|
-
const
|
|
3225
|
+
O.current && W(js(O.current)), $();
|
|
3226
|
+
const v = () => $();
|
|
3227
|
+
window.addEventListener("scroll", v, !0), window.addEventListener("resize", v);
|
|
3228
|
+
const j = window.visualViewport;
|
|
3229
|
+
j == null || j.addEventListener("resize", v), j == null || j.addEventListener("scroll", v);
|
|
3230
|
+
const C = window.setTimeout(v, 300);
|
|
3138
3231
|
return () => {
|
|
3139
|
-
window.removeEventListener("scroll",
|
|
3232
|
+
window.removeEventListener("scroll", v, !0), window.removeEventListener("resize", v), j == null || j.removeEventListener("resize", v), j == null || j.removeEventListener("scroll", v), window.clearTimeout(C);
|
|
3140
3233
|
};
|
|
3141
|
-
}, [c, $]),
|
|
3142
|
-
const
|
|
3143
|
-
var
|
|
3144
|
-
const
|
|
3145
|
-
(
|
|
3234
|
+
}, [c, $]), ue(() => {
|
|
3235
|
+
const v = (j) => {
|
|
3236
|
+
var fe, se;
|
|
3237
|
+
const C = j.target;
|
|
3238
|
+
(fe = I.current) != null && fe.contains(C) || (se = L.current) != null && se.contains(C) || l(!1);
|
|
3146
3239
|
};
|
|
3147
|
-
return document.addEventListener("mousedown",
|
|
3240
|
+
return document.addEventListener("mousedown", v), () => document.removeEventListener("mousedown", v);
|
|
3148
3241
|
}, []);
|
|
3149
|
-
const P = p ?
|
|
3150
|
-
(
|
|
3151
|
-
) :
|
|
3152
|
-
(
|
|
3153
|
-
a(e.key,
|
|
3242
|
+
const P = p ? b.filter(
|
|
3243
|
+
(v) => v.label.toLowerCase().includes(p.toLowerCase())
|
|
3244
|
+
) : b, X = (ae = b.find((v) => v.value === o)) == null ? void 0 : ae.label, [J, le] = S(-1), oe = `${e.key}-listbox`, F = Te(
|
|
3245
|
+
(v) => {
|
|
3246
|
+
a(e.key, v), l(!1), h(""), le(-1);
|
|
3154
3247
|
},
|
|
3155
3248
|
[e.key, a]
|
|
3156
|
-
),
|
|
3249
|
+
), V = (v) => {
|
|
3157
3250
|
if (!c) {
|
|
3158
|
-
(
|
|
3251
|
+
(v.key === "ArrowDown" || v.key === "Enter") && (v.preventDefault(), l(!0));
|
|
3159
3252
|
return;
|
|
3160
3253
|
}
|
|
3161
|
-
switch (
|
|
3254
|
+
switch (v.key) {
|
|
3162
3255
|
case "ArrowDown":
|
|
3163
|
-
|
|
3164
|
-
(
|
|
3256
|
+
v.preventDefault(), P.length > 0 && le(
|
|
3257
|
+
(j) => j < P.length - 1 ? j + 1 : 0
|
|
3165
3258
|
);
|
|
3166
3259
|
break;
|
|
3167
3260
|
case "ArrowUp":
|
|
3168
|
-
|
|
3169
|
-
(
|
|
3261
|
+
v.preventDefault(), P.length > 0 && le(
|
|
3262
|
+
(j) => j > 0 ? j - 1 : P.length - 1
|
|
3170
3263
|
);
|
|
3171
3264
|
break;
|
|
3172
3265
|
case "Enter":
|
|
3173
|
-
|
|
3266
|
+
v.preventDefault(), J >= 0 && J < P.length && F(P[J].value);
|
|
3174
3267
|
break;
|
|
3175
3268
|
case "Escape":
|
|
3176
|
-
|
|
3269
|
+
v.preventDefault(), l(!1), le(-1);
|
|
3177
3270
|
break;
|
|
3178
3271
|
}
|
|
3179
|
-
},
|
|
3272
|
+
}, ce = c && U && typeof document < "u" ? tr(
|
|
3180
3273
|
/* @__PURE__ */ t.jsx(
|
|
3181
3274
|
"div",
|
|
3182
3275
|
{
|
|
3183
|
-
ref:
|
|
3276
|
+
ref: L,
|
|
3184
3277
|
className: u.searchableDropdownList,
|
|
3185
3278
|
role: "listbox",
|
|
3186
|
-
id:
|
|
3279
|
+
id: oe,
|
|
3187
3280
|
style: {
|
|
3188
3281
|
position: "absolute",
|
|
3189
|
-
top:
|
|
3190
|
-
left:
|
|
3282
|
+
top: U.top,
|
|
3283
|
+
left: U.left,
|
|
3191
3284
|
right: "auto",
|
|
3192
|
-
width:
|
|
3193
|
-
maxHeight:
|
|
3194
|
-
...
|
|
3285
|
+
width: U.width,
|
|
3286
|
+
maxHeight: U.maxHeight,
|
|
3287
|
+
..._e
|
|
3195
3288
|
},
|
|
3196
|
-
children:
|
|
3289
|
+
children: w ? /* @__PURE__ */ t.jsx("div", { className: u.searchableDropdownEmpty, children: "Loading..." }) : P.length === 0 ? /* @__PURE__ */ t.jsx("div", { className: u.searchableDropdownEmpty, children: "No results found" }) : P.map((v, j) => /* @__PURE__ */ t.jsx(
|
|
3197
3290
|
"button",
|
|
3198
3291
|
{
|
|
3199
|
-
id: `${
|
|
3292
|
+
id: `${oe}-option-${j}`,
|
|
3200
3293
|
type: "button",
|
|
3201
3294
|
role: "option",
|
|
3202
|
-
"aria-selected":
|
|
3203
|
-
className: `${u.searchableDropdownOption} ${
|
|
3204
|
-
onMouseDown: (
|
|
3205
|
-
onClick: () =>
|
|
3206
|
-
children:
|
|
3295
|
+
"aria-selected": v.value === o,
|
|
3296
|
+
className: `${u.searchableDropdownOption} ${v.value === o ? u.searchableDropdownOptionSelected : ""} ${j === J ? u.searchableDropdownOptionHighlighted : ""}`,
|
|
3297
|
+
onMouseDown: (C) => C.preventDefault(),
|
|
3298
|
+
onClick: () => F(v.value),
|
|
3299
|
+
children: v.label
|
|
3207
3300
|
},
|
|
3208
|
-
|
|
3301
|
+
v.value
|
|
3209
3302
|
))
|
|
3210
3303
|
}
|
|
3211
3304
|
),
|
|
3212
3305
|
document.body
|
|
3213
3306
|
) : null;
|
|
3214
|
-
return /* @__PURE__ */ t.jsxs("div", { ref:
|
|
3215
|
-
/* @__PURE__ */ t.jsxs("div", { ref:
|
|
3307
|
+
return /* @__PURE__ */ t.jsxs("div", { ref: I, className: u.fieldGroup, children: [
|
|
3308
|
+
/* @__PURE__ */ t.jsxs("div", { ref: O, className: u.searchableDropdown, children: [
|
|
3216
3309
|
/* @__PURE__ */ t.jsx(
|
|
3217
3310
|
"input",
|
|
3218
3311
|
{
|
|
3219
3312
|
id: f,
|
|
3220
3313
|
type: "text",
|
|
3221
3314
|
className: u.fieldInput,
|
|
3222
|
-
value: c ? p :
|
|
3223
|
-
onChange: (
|
|
3224
|
-
h(
|
|
3315
|
+
value: c ? p : X ?? "",
|
|
3316
|
+
onChange: (v) => {
|
|
3317
|
+
h(v.target.value), le(-1), c || l(!0);
|
|
3225
3318
|
},
|
|
3226
3319
|
onFocus: () => l(!0),
|
|
3227
|
-
onKeyDown:
|
|
3320
|
+
onKeyDown: V,
|
|
3228
3321
|
placeholder: e.placeholder || "Select or search...",
|
|
3229
3322
|
"aria-label": e.label,
|
|
3230
3323
|
"aria-expanded": c,
|
|
3231
3324
|
role: "combobox",
|
|
3232
3325
|
"aria-haspopup": "listbox",
|
|
3233
|
-
"aria-controls": c ?
|
|
3234
|
-
"aria-activedescendant": c &&
|
|
3326
|
+
"aria-controls": c ? oe : void 0,
|
|
3327
|
+
"aria-activedescendant": c && J >= 0 ? `${oe}-option-${J}` : void 0
|
|
3235
3328
|
}
|
|
3236
3329
|
),
|
|
3237
3330
|
/* @__PURE__ */ t.jsx(
|
|
@@ -3256,35 +3349,35 @@ const xs = ({ question: e }) => {
|
|
|
3256
3349
|
)
|
|
3257
3350
|
] }),
|
|
3258
3351
|
i && /* @__PURE__ */ t.jsx("p", { className: u.fieldError, children: i }),
|
|
3259
|
-
|
|
3352
|
+
ce
|
|
3260
3353
|
] });
|
|
3261
3354
|
};
|
|
3262
|
-
function
|
|
3355
|
+
function Is(e) {
|
|
3263
3356
|
switch (e.style) {
|
|
3264
3357
|
case "radio-card":
|
|
3265
|
-
return /* @__PURE__ */ t.jsx(
|
|
3358
|
+
return /* @__PURE__ */ t.jsx(us, { question: e }, e.key);
|
|
3266
3359
|
case "image-card":
|
|
3267
|
-
return /* @__PURE__ */ t.jsx(
|
|
3360
|
+
return /* @__PURE__ */ t.jsx(ps, { question: e }, e.key);
|
|
3268
3361
|
case "checkbox-card":
|
|
3269
|
-
return /* @__PURE__ */ t.jsx(
|
|
3362
|
+
return /* @__PURE__ */ t.jsx(gs, { question: e }, e.key);
|
|
3270
3363
|
case "dropdown":
|
|
3271
|
-
return /* @__PURE__ */ t.jsx(
|
|
3364
|
+
return /* @__PURE__ */ t.jsx(_s, { question: e }, e.key);
|
|
3272
3365
|
case "input":
|
|
3273
3366
|
case "email":
|
|
3274
|
-
return /* @__PURE__ */ t.jsx(
|
|
3367
|
+
return /* @__PURE__ */ t.jsx(ys, { question: e }, e.key);
|
|
3275
3368
|
case "currency":
|
|
3276
|
-
return /* @__PURE__ */ t.jsx(
|
|
3369
|
+
return /* @__PURE__ */ t.jsx(bs, { question: e }, e.key);
|
|
3277
3370
|
case "phone":
|
|
3278
|
-
return /* @__PURE__ */ t.jsx(
|
|
3371
|
+
return /* @__PURE__ */ t.jsx(xs, { question: e }, e.key);
|
|
3279
3372
|
case "toggle":
|
|
3280
|
-
return /* @__PURE__ */ t.jsx(
|
|
3373
|
+
return /* @__PURE__ */ t.jsx(ws, { question: e }, e.key);
|
|
3281
3374
|
case "searchable-dropdown":
|
|
3282
|
-
return /* @__PURE__ */ t.jsx(
|
|
3375
|
+
return /* @__PURE__ */ t.jsx(Ns, { question: e }, e.key);
|
|
3283
3376
|
default:
|
|
3284
3377
|
return null;
|
|
3285
3378
|
}
|
|
3286
3379
|
}
|
|
3287
|
-
const
|
|
3380
|
+
const Ss = () => {
|
|
3288
3381
|
const {
|
|
3289
3382
|
currentPage: e,
|
|
3290
3383
|
visibleQuestions: r,
|
|
@@ -3292,10 +3385,10 @@ const Cs = () => {
|
|
|
3292
3385
|
contactConsentText: s,
|
|
3293
3386
|
submitLabel: o,
|
|
3294
3387
|
contactPageTitle: i
|
|
3295
|
-
} =
|
|
3296
|
-
if (
|
|
3297
|
-
var l,
|
|
3298
|
-
(
|
|
3388
|
+
} = be(), f = Z(null);
|
|
3389
|
+
if (ue(() => {
|
|
3390
|
+
var l, b, g;
|
|
3391
|
+
(b = (l = f.current) == null ? void 0 : l.scrollTo) == null || b.call(l, { top: 0, behavior: "smooth" }), (g = f.current) == null || g.focus();
|
|
3299
3392
|
}, [e == null ? void 0 : e.id]), !e) return null;
|
|
3300
3393
|
const p = e.id === "contact-info", h = (p ? o : void 0) ?? e.submitLabel ?? "Next", c = p && i !== void 0 ? i : e.title;
|
|
3301
3394
|
return /* @__PURE__ */ t.jsxs(
|
|
@@ -3307,7 +3400,7 @@ const Cs = () => {
|
|
|
3307
3400
|
role: "region",
|
|
3308
3401
|
"aria-label": c,
|
|
3309
3402
|
children: [
|
|
3310
|
-
r.map(
|
|
3403
|
+
r.map(Is),
|
|
3311
3404
|
p && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
3312
3405
|
/* @__PURE__ */ t.jsx("button", { type: "button", className: u.ctaButton, onClick: a, children: h }),
|
|
3313
3406
|
s ?? /* @__PURE__ */ t.jsxs("p", { className: u.consentText, children: [
|
|
@@ -3344,8 +3437,8 @@ const Cs = () => {
|
|
|
3344
3437
|
]
|
|
3345
3438
|
}
|
|
3346
3439
|
);
|
|
3347
|
-
},
|
|
3348
|
-
const { currentPage: r, contactPageTitle: a, contactPageSubtitle: s } =
|
|
3440
|
+
}, Es = ({ address: e }) => {
|
|
3441
|
+
const { currentPage: r, contactPageTitle: a, contactPageSubtitle: s } = be();
|
|
3349
3442
|
if (!r) return null;
|
|
3350
3443
|
const o = r.id === "contact-info", i = o && a !== void 0 ? a : r.title, f = o && s !== void 0 ? s : r.subtitle, p = [
|
|
3351
3444
|
e.street1,
|
|
@@ -3380,109 +3473,111 @@ const Cs = () => {
|
|
|
3380
3473
|
/* @__PURE__ */ t.jsx("h1", { className: u.pageTitle, children: i }),
|
|
3381
3474
|
f && /* @__PURE__ */ t.jsx("p", { className: u.pageSubtitle, children: f })
|
|
3382
3475
|
] }),
|
|
3383
|
-
/* @__PURE__ */ t.jsx("div", { className: u.contentRight, children: /* @__PURE__ */ t.jsx(
|
|
3476
|
+
/* @__PURE__ */ t.jsx("div", { className: u.contentRight, children: /* @__PURE__ */ t.jsx(Ss, {}) })
|
|
3384
3477
|
] })
|
|
3385
3478
|
] }),
|
|
3386
|
-
/* @__PURE__ */ t.jsx(
|
|
3479
|
+
/* @__PURE__ */ t.jsx(ds, {})
|
|
3387
3480
|
] });
|
|
3388
|
-
},
|
|
3481
|
+
}, Zo = ({
|
|
3389
3482
|
address: e,
|
|
3390
3483
|
onSubmit: r,
|
|
3391
3484
|
partnerLogoUrl: a,
|
|
3392
3485
|
appearance: s = { theme: "minimal" },
|
|
3393
3486
|
initialAnswers: o,
|
|
3394
3487
|
skipPages: i,
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3488
|
+
checkForAgent: f,
|
|
3489
|
+
smsConsentText: p,
|
|
3490
|
+
submitLabel: h,
|
|
3491
|
+
contactPageTitle: c,
|
|
3492
|
+
contactPageSubtitle: l,
|
|
3493
|
+
onPageChange: b,
|
|
3494
|
+
onAnswerChange: g,
|
|
3495
|
+
onClose: w,
|
|
3496
|
+
onReady: E,
|
|
3497
|
+
onError: I,
|
|
3498
|
+
contactConsentText: O
|
|
3405
3499
|
}) => {
|
|
3406
|
-
const
|
|
3407
|
-
return /* @__PURE__ */ t.jsx("div", { className: u.container, style:
|
|
3408
|
-
|
|
3500
|
+
const L = Ae(s);
|
|
3501
|
+
return /* @__PURE__ */ t.jsx("div", { className: u.container, style: L, children: /* @__PURE__ */ t.jsxs(
|
|
3502
|
+
Un,
|
|
3409
3503
|
{
|
|
3410
3504
|
initialAnswers: o,
|
|
3411
3505
|
skipPages: i,
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3506
|
+
checkForAgent: f,
|
|
3507
|
+
smsConsentText: p,
|
|
3508
|
+
contactConsentText: O,
|
|
3509
|
+
submitLabel: h,
|
|
3510
|
+
contactPageTitle: c,
|
|
3511
|
+
contactPageSubtitle: l,
|
|
3417
3512
|
onSubmit: r,
|
|
3418
|
-
onPageChange:
|
|
3419
|
-
onAnswerChange:
|
|
3420
|
-
onReady:
|
|
3421
|
-
onError:
|
|
3513
|
+
onPageChange: b,
|
|
3514
|
+
onAnswerChange: g,
|
|
3515
|
+
onReady: E,
|
|
3516
|
+
onError: I,
|
|
3422
3517
|
children: [
|
|
3423
|
-
/* @__PURE__ */ t.jsx(je, { partnerLogoUrl: a, onClose:
|
|
3424
|
-
/* @__PURE__ */ t.jsx(
|
|
3518
|
+
/* @__PURE__ */ t.jsx(je, { partnerLogoUrl: a, onClose: w }),
|
|
3519
|
+
/* @__PURE__ */ t.jsx(Es, { address: e })
|
|
3425
3520
|
]
|
|
3426
3521
|
}
|
|
3427
3522
|
) });
|
|
3428
|
-
},
|
|
3429
|
-
container:
|
|
3430
|
-
root:
|
|
3431
|
-
card:
|
|
3432
|
-
titleLarge:
|
|
3433
|
-
featuresList:
|
|
3434
|
-
stepLayout:
|
|
3435
|
-
leftColumn:
|
|
3436
|
-
introHeader:
|
|
3437
|
-
schedule:
|
|
3438
|
-
subtitleLeft:
|
|
3439
|
-
feature:
|
|
3440
|
-
featureTitle:
|
|
3441
|
-
featureDescription:
|
|
3442
|
-
title:
|
|
3443
|
-
subtitle:
|
|
3444
|
-
calendarHeader:
|
|
3445
|
-
calendarMonthLabel:
|
|
3446
|
-
calendarNavButton:
|
|
3447
|
-
calendarGrid:
|
|
3448
|
-
calendarDayHeader:
|
|
3449
|
-
calendarDayAvailable:
|
|
3450
|
-
calendarDayDisabled:
|
|
3451
|
-
calendarDaySelected:
|
|
3452
|
-
timesHeader:
|
|
3453
|
-
timeRow:
|
|
3454
|
-
timeButton:
|
|
3455
|
-
timeButtonSelected:
|
|
3456
|
-
field:
|
|
3457
|
-
fieldLabel:
|
|
3458
|
-
input:
|
|
3459
|
-
fieldset:
|
|
3460
|
-
radioRow:
|
|
3461
|
-
radioOption:
|
|
3462
|
-
faqBelowActions:
|
|
3463
|
-
faq:
|
|
3464
|
-
faqHeader:
|
|
3465
|
-
faqItem:
|
|
3466
|
-
faqQuestion:
|
|
3467
|
-
faqAnswer:
|
|
3468
|
-
faqChevron:
|
|
3469
|
-
errorText:
|
|
3470
|
-
linkInline:
|
|
3471
|
-
actionsRow:
|
|
3472
|
-
linkButton:
|
|
3473
|
-
primaryButton:
|
|
3474
|
-
successCheckCircle:
|
|
3475
|
-
summaryCard:
|
|
3476
|
-
summaryRow:
|
|
3477
|
-
summaryIcon:
|
|
3478
|
-
},
|
|
3523
|
+
}, Ps = "_container_1qpea_7", Ls = "_root_1qpea_16", Ts = "_card_1qpea_31", As = "_titleLarge_1qpea_49", Ds = "_featuresList_1qpea_53", Os = "_stepLayout_1qpea_68", Rs = "_leftColumn_1qpea_60", Bs = "_introHeader_1qpea_81", $s = "_schedule_1qpea_87", Ms = "_subtitleLeft_1qpea_137", Fs = "_feature_1qpea_53", Ws = "_featureTitle_1qpea_156", Hs = "_featureDescription_1qpea_163", qs = "_title_1qpea_49", Vs = "_subtitle_1qpea_137", Gs = "_calendarHeader_1qpea_188", Us = "_calendarMonthLabel_1qpea_195", Ys = "_calendarNavButton_1qpea_201", Zs = "_calendarGrid_1qpea_221", Ks = "_calendarDayHeader_1qpea_227", zs = "_calendarDayAvailable_1qpea_236", Js = "_calendarDayDisabled_1qpea_237", Xs = "_calendarDaySelected_1qpea_238", Qs = "_timesHeader_1qpea_269", eo = "_timeRow_1qpea_276", to = "_timeButton_1qpea_283", ro = "_timeButtonSelected_1qpea_284", no = "_field_1qpea_307", ao = "_fieldLabel_1qpea_313", so = "_input_1qpea_319", oo = "_fieldset_1qpea_340", io = "_radioRow_1qpea_349", lo = "_radioOption_1qpea_354", co = "_faqBelowActions_1qpea_375", uo = "_faq_1qpea_375", ho = "_faqHeader_1qpea_386", mo = "_faqItem_1qpea_394", fo = "_faqQuestion_1qpea_403", po = "_faqAnswer_1qpea_419", go = "_faqChevron_1qpea_426", _o = "_errorText_1qpea_436", yo = "_linkInline_1qpea_442", bo = "_actionsRow_1qpea_448", vo = "_linkButton_1qpea_456", xo = "_primaryButton_1qpea_473", wo = "_successCheckCircle_1qpea_507", Co = "_summaryCard_1qpea_519", ko = "_summaryRow_1qpea_529", jo = "_summaryIcon_1qpea_537", m = {
|
|
3524
|
+
container: Ps,
|
|
3525
|
+
root: Ls,
|
|
3526
|
+
card: Ts,
|
|
3527
|
+
titleLarge: As,
|
|
3528
|
+
featuresList: Ds,
|
|
3529
|
+
stepLayout: Os,
|
|
3530
|
+
leftColumn: Rs,
|
|
3531
|
+
introHeader: Bs,
|
|
3532
|
+
schedule: $s,
|
|
3533
|
+
subtitleLeft: Ms,
|
|
3534
|
+
feature: Fs,
|
|
3535
|
+
featureTitle: Ws,
|
|
3536
|
+
featureDescription: Hs,
|
|
3537
|
+
title: qs,
|
|
3538
|
+
subtitle: Vs,
|
|
3539
|
+
calendarHeader: Gs,
|
|
3540
|
+
calendarMonthLabel: Us,
|
|
3541
|
+
calendarNavButton: Ys,
|
|
3542
|
+
calendarGrid: Zs,
|
|
3543
|
+
calendarDayHeader: Ks,
|
|
3544
|
+
calendarDayAvailable: zs,
|
|
3545
|
+
calendarDayDisabled: Js,
|
|
3546
|
+
calendarDaySelected: Xs,
|
|
3547
|
+
timesHeader: Qs,
|
|
3548
|
+
timeRow: eo,
|
|
3549
|
+
timeButton: to,
|
|
3550
|
+
timeButtonSelected: ro,
|
|
3551
|
+
field: no,
|
|
3552
|
+
fieldLabel: ao,
|
|
3553
|
+
input: so,
|
|
3554
|
+
fieldset: oo,
|
|
3555
|
+
radioRow: io,
|
|
3556
|
+
radioOption: lo,
|
|
3557
|
+
faqBelowActions: co,
|
|
3558
|
+
faq: uo,
|
|
3559
|
+
faqHeader: ho,
|
|
3560
|
+
faqItem: mo,
|
|
3561
|
+
faqQuestion: fo,
|
|
3562
|
+
faqAnswer: po,
|
|
3563
|
+
faqChevron: go,
|
|
3564
|
+
errorText: _o,
|
|
3565
|
+
linkInline: yo,
|
|
3566
|
+
actionsRow: bo,
|
|
3567
|
+
linkButton: vo,
|
|
3568
|
+
primaryButton: xo,
|
|
3569
|
+
successCheckCircle: wo,
|
|
3570
|
+
summaryCard: Co,
|
|
3571
|
+
summaryRow: ko,
|
|
3572
|
+
summaryIcon: jo
|
|
3573
|
+
}, No = "888-352-7075", Io = {
|
|
3479
3574
|
loading: !0,
|
|
3480
3575
|
error: null,
|
|
3481
3576
|
availableSlots: [],
|
|
3482
3577
|
isSlotBased: !1,
|
|
3483
3578
|
timezone: "UTC"
|
|
3484
3579
|
};
|
|
3485
|
-
function
|
|
3580
|
+
function Ko({
|
|
3486
3581
|
offerId: e,
|
|
3487
3582
|
customerName: r,
|
|
3488
3583
|
customerPhone: a,
|
|
@@ -3494,99 +3589,99 @@ function qo({
|
|
|
3494
3589
|
onDone: h,
|
|
3495
3590
|
onReady: c,
|
|
3496
3591
|
onError: l,
|
|
3497
|
-
supportPhone:
|
|
3592
|
+
supportPhone: b
|
|
3498
3593
|
}) {
|
|
3499
|
-
const g =
|
|
3500
|
-
|
|
3501
|
-
const
|
|
3502
|
-
|
|
3503
|
-
if (
|
|
3594
|
+
const g = Tt(), w = Ae(o), E = b || No, [I, O] = S(Io), [L, U] = S("select"), [_, _e] = S(null), [W, ie] = S(null), [$, P] = S(null), [X, J] = S(r ?? ""), [le, oe] = S(Ye(a ?? "")), [F, V] = S(null), [ce, ae] = S(""), [v, j] = S(!1), [C, fe] = S(null), se = Z(r);
|
|
3595
|
+
se.current = r;
|
|
3596
|
+
const K = Z(a);
|
|
3597
|
+
K.current = a, ue(() => {
|
|
3598
|
+
if (se.current && K.current)
|
|
3504
3599
|
return;
|
|
3505
|
-
let
|
|
3600
|
+
let k = !1;
|
|
3506
3601
|
return (async () => {
|
|
3507
3602
|
try {
|
|
3508
|
-
const
|
|
3603
|
+
const B = await g.getCustomerContact({
|
|
3509
3604
|
opendoorOfferRequestId: e
|
|
3510
3605
|
});
|
|
3511
|
-
if (
|
|
3512
|
-
|
|
3513
|
-
(
|
|
3514
|
-
),
|
|
3515
|
-
(
|
|
3606
|
+
if (k) return;
|
|
3607
|
+
J(
|
|
3608
|
+
(M) => !se.current && !M && B.fullName ? B.fullName : M
|
|
3609
|
+
), oe(
|
|
3610
|
+
(M) => !K.current && !M && B.phoneNumber ? Ye(B.phoneNumber) : M
|
|
3516
3611
|
);
|
|
3517
3612
|
} catch {
|
|
3518
3613
|
}
|
|
3519
3614
|
})(), () => {
|
|
3520
|
-
|
|
3615
|
+
k = !0;
|
|
3521
3616
|
};
|
|
3522
|
-
}, [g, e]),
|
|
3523
|
-
let
|
|
3617
|
+
}, [g, e]), ue(() => {
|
|
3618
|
+
let k = !1;
|
|
3524
3619
|
return (async () => {
|
|
3525
3620
|
try {
|
|
3526
|
-
const
|
|
3527
|
-
if (
|
|
3528
|
-
if (
|
|
3621
|
+
const B = await g.getAssessmentSlots({ offerId: e });
|
|
3622
|
+
if (k) return;
|
|
3623
|
+
if (O({
|
|
3529
3624
|
loading: !1,
|
|
3530
3625
|
error: null,
|
|
3531
|
-
availableSlots:
|
|
3532
|
-
isSlotBased:
|
|
3533
|
-
timezone:
|
|
3534
|
-
}),
|
|
3626
|
+
availableSlots: B.availableSlots,
|
|
3627
|
+
isSlotBased: B.isSlotBased,
|
|
3628
|
+
timezone: B.timezone
|
|
3629
|
+
}), B.availableSlots.length > 0)
|
|
3535
3630
|
P(
|
|
3536
|
-
|
|
3537
|
-
|
|
3631
|
+
Eo(
|
|
3632
|
+
jt(B.availableSlots[0], B.timezone)
|
|
3538
3633
|
)
|
|
3539
3634
|
);
|
|
3540
3635
|
else {
|
|
3541
|
-
const
|
|
3542
|
-
P({ year:
|
|
3636
|
+
const M = /* @__PURE__ */ new Date();
|
|
3637
|
+
P({ year: M.getFullYear(), month: M.getMonth() });
|
|
3543
3638
|
}
|
|
3544
3639
|
c == null || c();
|
|
3545
|
-
} catch (
|
|
3546
|
-
const
|
|
3547
|
-
if (
|
|
3548
|
-
|
|
3640
|
+
} catch (B) {
|
|
3641
|
+
const M = B instanceof Error ? B : new Error(String(B));
|
|
3642
|
+
if (k) return;
|
|
3643
|
+
O((he) => ({ ...he, loading: !1, error: M }));
|
|
3549
3644
|
const Y = /* @__PURE__ */ new Date();
|
|
3550
|
-
P({ year: Y.getFullYear(), month: Y.getMonth() }), l == null || l(
|
|
3645
|
+
P({ year: Y.getFullYear(), month: Y.getMonth() }), l == null || l(M);
|
|
3551
3646
|
}
|
|
3552
3647
|
})(), () => {
|
|
3553
|
-
|
|
3648
|
+
k = !0;
|
|
3554
3649
|
};
|
|
3555
3650
|
}, [g, e]);
|
|
3556
|
-
const
|
|
3557
|
-
const
|
|
3558
|
-
for (const
|
|
3559
|
-
const
|
|
3560
|
-
Y.push(
|
|
3651
|
+
const H = Pe(() => {
|
|
3652
|
+
const k = /* @__PURE__ */ new Map();
|
|
3653
|
+
for (const B of I.availableSlots) {
|
|
3654
|
+
const M = jt(B, I.timezone), Y = k.get(M) ?? [];
|
|
3655
|
+
Y.push(B), k.set(M, Y);
|
|
3561
3656
|
}
|
|
3562
|
-
return
|
|
3563
|
-
}, [
|
|
3564
|
-
if (
|
|
3565
|
-
return /* @__PURE__ */ t.jsxs("div", { className: m.container, style:
|
|
3657
|
+
return k;
|
|
3658
|
+
}, [I.availableSlots, I.timezone]);
|
|
3659
|
+
if (I.loading || !$)
|
|
3660
|
+
return /* @__PURE__ */ t.jsxs("div", { className: m.container, style: w, children: [
|
|
3566
3661
|
/* @__PURE__ */ t.jsx(je, { partnerLogoUrl: i, onClose: f }),
|
|
3567
3662
|
/* @__PURE__ */ t.jsx("div", { className: m.root, "data-testid": "schedule-assessment-loading", children: /* @__PURE__ */ t.jsx("div", { className: m.card, children: /* @__PURE__ */ t.jsx("p", { className: m.subtitle, children: "Loading available times…" }) }) })
|
|
3568
3663
|
] });
|
|
3569
|
-
if (
|
|
3570
|
-
return /* @__PURE__ */ t.jsxs("div", { className: m.container, style:
|
|
3664
|
+
if (I.error)
|
|
3665
|
+
return /* @__PURE__ */ t.jsxs("div", { className: m.container, style: w, children: [
|
|
3571
3666
|
/* @__PURE__ */ t.jsx(je, { partnerLogoUrl: i, onClose: f }),
|
|
3572
3667
|
/* @__PURE__ */ t.jsx("div", { className: m.root, "data-testid": "schedule-assessment-error", children: /* @__PURE__ */ t.jsxs("div", { className: m.card, children: [
|
|
3573
3668
|
/* @__PURE__ */ t.jsx("h2", { className: m.title, children: "We couldn't load available times" }),
|
|
3574
3669
|
/* @__PURE__ */ t.jsx("p", { className: m.subtitle, children: "Please try again in a few minutes." }),
|
|
3575
|
-
/* @__PURE__ */ t.jsx(
|
|
3670
|
+
/* @__PURE__ */ t.jsx(kt, { phone: E })
|
|
3576
3671
|
] }) })
|
|
3577
3672
|
] });
|
|
3578
|
-
if (
|
|
3579
|
-
return /* @__PURE__ */ t.jsxs("div", { className: m.container, style:
|
|
3673
|
+
if (I.availableSlots.length === 0)
|
|
3674
|
+
return /* @__PURE__ */ t.jsxs("div", { className: m.container, style: w, children: [
|
|
3580
3675
|
/* @__PURE__ */ t.jsx(je, { partnerLogoUrl: i, onClose: f }),
|
|
3581
3676
|
/* @__PURE__ */ t.jsx("div", { className: m.root, "data-testid": "schedule-assessment-empty", children: /* @__PURE__ */ t.jsxs("div", { className: m.card, children: [
|
|
3582
3677
|
/* @__PURE__ */ t.jsx("h2", { className: m.title, children: "No available times right now" }),
|
|
3583
3678
|
/* @__PURE__ */ t.jsx("p", { className: m.subtitle, children: "We don't have any assessment times to show for your home yet." }),
|
|
3584
|
-
/* @__PURE__ */ t.jsx(
|
|
3679
|
+
/* @__PURE__ */ t.jsx(kt, { phone: E })
|
|
3585
3680
|
] }) })
|
|
3586
3681
|
] });
|
|
3587
|
-
if (
|
|
3588
|
-
const
|
|
3589
|
-
return /* @__PURE__ */ t.jsxs("div", { className: m.container, style:
|
|
3682
|
+
if (L === "success") {
|
|
3683
|
+
const k = W ? new Date(W) : null;
|
|
3684
|
+
return /* @__PURE__ */ t.jsxs("div", { className: m.container, style: w, children: [
|
|
3590
3685
|
/* @__PURE__ */ t.jsx(je, { partnerLogoUrl: i, onClose: f }),
|
|
3591
3686
|
/* @__PURE__ */ t.jsx("div", { className: m.root, "data-testid": "schedule-assessment-success", children: /* @__PURE__ */ t.jsxs("div", { className: m.card, children: [
|
|
3592
3687
|
/* @__PURE__ */ t.jsx("div", { className: m.successCheckCircle, "aria-hidden": "true", children: /* @__PURE__ */ t.jsx("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", children: /* @__PURE__ */ t.jsx(
|
|
@@ -3599,21 +3694,21 @@ function qo({
|
|
|
3599
3694
|
strokeLinejoin: "round"
|
|
3600
3695
|
}
|
|
3601
3696
|
) }) }),
|
|
3602
|
-
/* @__PURE__ */ t.jsx("h2", { className: m.title, children:
|
|
3697
|
+
/* @__PURE__ */ t.jsx("h2", { className: m.title, children: X ? `${So(X)}, your assessment is scheduled!` : "Your assessment is scheduled!" }),
|
|
3603
3698
|
/* @__PURE__ */ t.jsx("p", { className: m.subtitle, children: "A calendar invite has been sent to your email address." }),
|
|
3604
3699
|
/* @__PURE__ */ t.jsxs("div", { className: m.summaryCard, children: [
|
|
3605
|
-
|
|
3700
|
+
k && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
3606
3701
|
/* @__PURE__ */ t.jsxs("div", { className: m.summaryRow, children: [
|
|
3607
|
-
/* @__PURE__ */ t.jsx(
|
|
3608
|
-
/* @__PURE__ */ t.jsx("span", { children:
|
|
3702
|
+
/* @__PURE__ */ t.jsx(Do, {}),
|
|
3703
|
+
/* @__PURE__ */ t.jsx("span", { children: Nt(k, I.timezone) })
|
|
3609
3704
|
] }),
|
|
3610
3705
|
/* @__PURE__ */ t.jsxs("div", { className: m.summaryRow, children: [
|
|
3611
|
-
/* @__PURE__ */ t.jsx(
|
|
3612
|
-
/* @__PURE__ */ t.jsx("span", { children:
|
|
3706
|
+
/* @__PURE__ */ t.jsx(Oo, {}),
|
|
3707
|
+
/* @__PURE__ */ t.jsx("span", { children: It(k, I.timezone) })
|
|
3613
3708
|
] })
|
|
3614
3709
|
] }),
|
|
3615
3710
|
s && /* @__PURE__ */ t.jsxs("div", { className: m.summaryRow, children: [
|
|
3616
|
-
/* @__PURE__ */ t.jsx(
|
|
3711
|
+
/* @__PURE__ */ t.jsx(Ro, {}),
|
|
3617
3712
|
/* @__PURE__ */ t.jsx("span", { children: s })
|
|
3618
3713
|
] })
|
|
3619
3714
|
] }),
|
|
@@ -3629,33 +3724,33 @@ function qo({
|
|
|
3629
3724
|
] }) })
|
|
3630
3725
|
] });
|
|
3631
3726
|
}
|
|
3632
|
-
if (
|
|
3633
|
-
const
|
|
3634
|
-
if (!(!
|
|
3635
|
-
|
|
3727
|
+
if (L === "confirm") {
|
|
3728
|
+
const k = le.replace(/\D/g, ""), B = !v && X.trim().length > 0 && k.length >= 10 && F !== null && (!F || ce.trim().length > 0), M = async () => {
|
|
3729
|
+
if (!(!B || !W)) {
|
|
3730
|
+
j(!0), fe(null);
|
|
3636
3731
|
try {
|
|
3637
|
-
const Y =
|
|
3732
|
+
const Y = F ? `Customer: ${X.trim()}. Access instructions: ${ce.trim()}` : `Customer: ${X.trim()}. No gate code or entry restrictions.`, he = await g.scheduleAssessment({
|
|
3638
3733
|
offerId: e,
|
|
3639
|
-
selectedInspectionTime:
|
|
3640
|
-
reminderPhone:
|
|
3734
|
+
selectedInspectionTime: W,
|
|
3735
|
+
reminderPhone: le.replace(/\D/g, ""),
|
|
3641
3736
|
notes: Y
|
|
3642
3737
|
});
|
|
3643
|
-
|
|
3738
|
+
U("success");
|
|
3644
3739
|
try {
|
|
3645
|
-
await (p == null ? void 0 : p(
|
|
3646
|
-
} catch (
|
|
3647
|
-
const
|
|
3648
|
-
l == null || l(
|
|
3740
|
+
await (p == null ? void 0 : p(he.visitId));
|
|
3741
|
+
} catch (x) {
|
|
3742
|
+
const z = x instanceof Error ? x : new Error(String(x));
|
|
3743
|
+
l == null || l(z);
|
|
3649
3744
|
}
|
|
3650
3745
|
} catch (Y) {
|
|
3651
|
-
const
|
|
3652
|
-
|
|
3746
|
+
const he = Y instanceof Error ? Y : new Error(String(Y));
|
|
3747
|
+
fe(he.message), l == null || l(he);
|
|
3653
3748
|
} finally {
|
|
3654
|
-
|
|
3749
|
+
j(!1);
|
|
3655
3750
|
}
|
|
3656
3751
|
}
|
|
3657
3752
|
};
|
|
3658
|
-
return /* @__PURE__ */ t.jsxs("div", { className: m.container, style:
|
|
3753
|
+
return /* @__PURE__ */ t.jsxs("div", { className: m.container, style: w, children: [
|
|
3659
3754
|
/* @__PURE__ */ t.jsx(je, { partnerLogoUrl: i, onClose: f }),
|
|
3660
3755
|
/* @__PURE__ */ t.jsx("div", { className: m.root, "data-testid": "schedule-assessment-confirm", children: /* @__PURE__ */ t.jsxs("div", { className: m.card, children: [
|
|
3661
3756
|
/* @__PURE__ */ t.jsx("h2", { className: m.title, children: "Confirm your details" }),
|
|
@@ -3666,9 +3761,9 @@ function qo({
|
|
|
3666
3761
|
{
|
|
3667
3762
|
className: m.input,
|
|
3668
3763
|
type: "text",
|
|
3669
|
-
value:
|
|
3670
|
-
onChange: (Y) =>
|
|
3671
|
-
disabled:
|
|
3764
|
+
value: X,
|
|
3765
|
+
onChange: (Y) => J(Y.target.value),
|
|
3766
|
+
disabled: v
|
|
3672
3767
|
}
|
|
3673
3768
|
)
|
|
3674
3769
|
] }),
|
|
@@ -3682,9 +3777,9 @@ function qo({
|
|
|
3682
3777
|
inputMode: "tel",
|
|
3683
3778
|
autoComplete: "tel",
|
|
3684
3779
|
placeholder: "(555) 555-5555",
|
|
3685
|
-
value:
|
|
3686
|
-
onChange: (Y) =>
|
|
3687
|
-
disabled:
|
|
3780
|
+
value: le,
|
|
3781
|
+
onChange: (Y) => oe(Ye(Y.target.value)),
|
|
3782
|
+
disabled: v
|
|
3688
3783
|
}
|
|
3689
3784
|
)
|
|
3690
3785
|
] }),
|
|
@@ -3697,9 +3792,9 @@ function qo({
|
|
|
3697
3792
|
{
|
|
3698
3793
|
type: "radio",
|
|
3699
3794
|
name: "gate-code",
|
|
3700
|
-
checked:
|
|
3701
|
-
onChange: () =>
|
|
3702
|
-
disabled:
|
|
3795
|
+
checked: F === !0,
|
|
3796
|
+
onChange: () => V(!0),
|
|
3797
|
+
disabled: v
|
|
3703
3798
|
}
|
|
3704
3799
|
),
|
|
3705
3800
|
/* @__PURE__ */ t.jsx("span", { children: "Yes" })
|
|
@@ -3710,16 +3805,16 @@ function qo({
|
|
|
3710
3805
|
{
|
|
3711
3806
|
type: "radio",
|
|
3712
3807
|
name: "gate-code",
|
|
3713
|
-
checked:
|
|
3714
|
-
onChange: () =>
|
|
3715
|
-
disabled:
|
|
3808
|
+
checked: F === !1,
|
|
3809
|
+
onChange: () => V(!1),
|
|
3810
|
+
disabled: v
|
|
3716
3811
|
}
|
|
3717
3812
|
),
|
|
3718
3813
|
/* @__PURE__ */ t.jsx("span", { children: "No" })
|
|
3719
3814
|
] })
|
|
3720
3815
|
] })
|
|
3721
3816
|
] }),
|
|
3722
|
-
|
|
3817
|
+
F && /* @__PURE__ */ t.jsxs("label", { className: m.field, children: [
|
|
3723
3818
|
/* @__PURE__ */ t.jsx("span", { className: m.fieldLabel, children: "Please provide access instructions for your home." }),
|
|
3724
3819
|
/* @__PURE__ */ t.jsx(
|
|
3725
3820
|
"input",
|
|
@@ -3727,21 +3822,21 @@ function qo({
|
|
|
3727
3822
|
className: m.input,
|
|
3728
3823
|
type: "text",
|
|
3729
3824
|
placeholder: "Gate code, directions, etc.",
|
|
3730
|
-
value:
|
|
3731
|
-
onChange: (Y) =>
|
|
3732
|
-
disabled:
|
|
3825
|
+
value: ce,
|
|
3826
|
+
onChange: (Y) => ae(Y.target.value),
|
|
3827
|
+
disabled: v
|
|
3733
3828
|
}
|
|
3734
3829
|
)
|
|
3735
3830
|
] }),
|
|
3736
|
-
|
|
3831
|
+
C && /* @__PURE__ */ t.jsx("p", { className: m.errorText, children: C }),
|
|
3737
3832
|
/* @__PURE__ */ t.jsxs("div", { className: m.actionsRow, children: [
|
|
3738
3833
|
/* @__PURE__ */ t.jsx(
|
|
3739
3834
|
"button",
|
|
3740
3835
|
{
|
|
3741
3836
|
type: "button",
|
|
3742
3837
|
className: m.linkButton,
|
|
3743
|
-
onClick: () =>
|
|
3744
|
-
disabled:
|
|
3838
|
+
onClick: () => U("select"),
|
|
3839
|
+
disabled: v,
|
|
3745
3840
|
children: "← Back"
|
|
3746
3841
|
}
|
|
3747
3842
|
),
|
|
@@ -3750,18 +3845,18 @@ function qo({
|
|
|
3750
3845
|
{
|
|
3751
3846
|
type: "button",
|
|
3752
3847
|
className: m.primaryButton,
|
|
3753
|
-
onClick: () => void
|
|
3754
|
-
disabled: !
|
|
3755
|
-
children:
|
|
3848
|
+
onClick: () => void M(),
|
|
3849
|
+
disabled: !B,
|
|
3850
|
+
children: v ? "Scheduling…" : "Schedule"
|
|
3756
3851
|
}
|
|
3757
3852
|
)
|
|
3758
3853
|
] }),
|
|
3759
|
-
/* @__PURE__ */ t.jsx("div", { className: m.faqBelowActions, children: /* @__PURE__ */ t.jsx(
|
|
3854
|
+
/* @__PURE__ */ t.jsx("div", { className: m.faqBelowActions, children: /* @__PURE__ */ t.jsx(Fo, { items: $o }) })
|
|
3760
3855
|
] }) })
|
|
3761
3856
|
] });
|
|
3762
3857
|
}
|
|
3763
|
-
const de =
|
|
3764
|
-
return /* @__PURE__ */ t.jsxs("div", { className: m.container, style:
|
|
3858
|
+
const de = Po($), R = Lo($), ee = To($, H), ye = Ao($, H), pe = _ ? H.get(_) ?? [] : [], ve = pe[0] ? Nt(new Date(pe[0]), I.timezone) : null;
|
|
3859
|
+
return /* @__PURE__ */ t.jsxs("div", { className: m.container, style: w, children: [
|
|
3765
3860
|
/* @__PURE__ */ t.jsx(je, { partnerLogoUrl: i, onClose: f }),
|
|
3766
3861
|
/* @__PURE__ */ t.jsx("div", { className: m.root, "data-testid": "schedule-assessment-flow", children: /* @__PURE__ */ t.jsx("div", { className: m.card, children: /* @__PURE__ */ t.jsxs("div", { className: m.stepLayout, children: [
|
|
3767
3862
|
/* @__PURE__ */ t.jsxs("div", { className: m.leftColumn, children: [
|
|
@@ -3769,10 +3864,10 @@ function qo({
|
|
|
3769
3864
|
/* @__PURE__ */ t.jsx("h2", { className: m.titleLarge, children: "Schedule your assessment" }),
|
|
3770
3865
|
/* @__PURE__ */ t.jsx("p", { className: m.subtitleLeft, children: "Pick a time that works for you." })
|
|
3771
3866
|
] }),
|
|
3772
|
-
/* @__PURE__ */ t.jsx("div", { className: m.featuresList, children:
|
|
3773
|
-
/* @__PURE__ */ t.jsx("p", { className: m.featureTitle, children:
|
|
3774
|
-
/* @__PURE__ */ t.jsx("p", { className: m.featureDescription, children:
|
|
3775
|
-
] },
|
|
3867
|
+
/* @__PURE__ */ t.jsx("div", { className: m.featuresList, children: Bo.map((k) => /* @__PURE__ */ t.jsxs("div", { className: m.feature, children: [
|
|
3868
|
+
/* @__PURE__ */ t.jsx("p", { className: m.featureTitle, children: k.title }),
|
|
3869
|
+
/* @__PURE__ */ t.jsx("p", { className: m.featureDescription, children: k.description })
|
|
3870
|
+
] }, k.title)) })
|
|
3776
3871
|
] }),
|
|
3777
3872
|
/* @__PURE__ */ t.jsxs("div", { className: m.schedule, children: [
|
|
3778
3873
|
/* @__PURE__ */ t.jsxs("div", { className: m.calendarHeader, children: [
|
|
@@ -3781,61 +3876,61 @@ function qo({
|
|
|
3781
3876
|
{
|
|
3782
3877
|
type: "button",
|
|
3783
3878
|
className: m.calendarNavButton,
|
|
3784
|
-
onClick: () => P(
|
|
3785
|
-
disabled: !
|
|
3879
|
+
onClick: () => P(St($, -1)),
|
|
3880
|
+
disabled: !ee,
|
|
3786
3881
|
"aria-label": "Previous month",
|
|
3787
3882
|
children: "‹"
|
|
3788
3883
|
}
|
|
3789
3884
|
),
|
|
3790
|
-
/* @__PURE__ */ t.jsx("span", { className: m.calendarMonthLabel, children:
|
|
3885
|
+
/* @__PURE__ */ t.jsx("span", { className: m.calendarMonthLabel, children: R }),
|
|
3791
3886
|
/* @__PURE__ */ t.jsx(
|
|
3792
3887
|
"button",
|
|
3793
3888
|
{
|
|
3794
3889
|
type: "button",
|
|
3795
3890
|
className: m.calendarNavButton,
|
|
3796
|
-
onClick: () => P(
|
|
3797
|
-
disabled: !
|
|
3891
|
+
onClick: () => P(St($, 1)),
|
|
3892
|
+
disabled: !ye,
|
|
3798
3893
|
"aria-label": "Next month",
|
|
3799
3894
|
children: "›"
|
|
3800
3895
|
}
|
|
3801
3896
|
)
|
|
3802
3897
|
] }),
|
|
3803
3898
|
/* @__PURE__ */ t.jsxs("div", { className: m.calendarGrid, children: [
|
|
3804
|
-
["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"].map((
|
|
3805
|
-
de.map((
|
|
3806
|
-
const
|
|
3899
|
+
["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"].map((k) => /* @__PURE__ */ t.jsx("div", { className: m.calendarDayHeader, children: k }, k)),
|
|
3900
|
+
de.map((k, B) => {
|
|
3901
|
+
const M = k ? H.has(k.key) : !1, Y = !!k && k.key === _;
|
|
3807
3902
|
return /* @__PURE__ */ t.jsx(
|
|
3808
3903
|
"button",
|
|
3809
3904
|
{
|
|
3810
3905
|
type: "button",
|
|
3811
|
-
className: Y ? m.calendarDaySelected :
|
|
3906
|
+
className: Y ? m.calendarDaySelected : M ? m.calendarDayAvailable : m.calendarDayDisabled,
|
|
3812
3907
|
onClick: () => {
|
|
3813
|
-
|
|
3908
|
+
k && M && (_e(k.key), ie(null));
|
|
3814
3909
|
},
|
|
3815
|
-
disabled: !
|
|
3910
|
+
disabled: !M,
|
|
3816
3911
|
"aria-pressed": !!Y,
|
|
3817
|
-
children:
|
|
3912
|
+
children: k ? k.day : ""
|
|
3818
3913
|
},
|
|
3819
|
-
|
|
3914
|
+
k ? k.key : `empty-${R}-${B}`
|
|
3820
3915
|
);
|
|
3821
3916
|
})
|
|
3822
3917
|
] }),
|
|
3823
|
-
|
|
3918
|
+
ve && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
3824
3919
|
/* @__PURE__ */ t.jsxs("p", { className: m.timesHeader, children: [
|
|
3825
3920
|
"Available times for ",
|
|
3826
|
-
|
|
3921
|
+
ve
|
|
3827
3922
|
] }),
|
|
3828
|
-
/* @__PURE__ */ t.jsx("div", { className: m.timeRow, children: pe.map((
|
|
3829
|
-
const
|
|
3923
|
+
/* @__PURE__ */ t.jsx("div", { className: m.timeRow, children: pe.map((k) => {
|
|
3924
|
+
const B = k === W;
|
|
3830
3925
|
return /* @__PURE__ */ t.jsx(
|
|
3831
3926
|
"button",
|
|
3832
3927
|
{
|
|
3833
3928
|
type: "button",
|
|
3834
|
-
className:
|
|
3835
|
-
onClick: () =>
|
|
3836
|
-
children:
|
|
3929
|
+
className: B ? m.timeButtonSelected : m.timeButton,
|
|
3930
|
+
onClick: () => ie(k),
|
|
3931
|
+
children: It(new Date(k), I.timezone)
|
|
3837
3932
|
},
|
|
3838
|
-
|
|
3933
|
+
k
|
|
3839
3934
|
);
|
|
3840
3935
|
}) })
|
|
3841
3936
|
] }),
|
|
@@ -3844,8 +3939,8 @@ function qo({
|
|
|
3844
3939
|
{
|
|
3845
3940
|
type: "button",
|
|
3846
3941
|
className: m.primaryButton,
|
|
3847
|
-
onClick: () =>
|
|
3848
|
-
disabled: !
|
|
3942
|
+
onClick: () => U("confirm"),
|
|
3943
|
+
disabled: !W,
|
|
3849
3944
|
children: "Continue"
|
|
3850
3945
|
}
|
|
3851
3946
|
)
|
|
@@ -3853,7 +3948,7 @@ function qo({
|
|
|
3853
3948
|
] }) }) })
|
|
3854
3949
|
] });
|
|
3855
3950
|
}
|
|
3856
|
-
function
|
|
3951
|
+
function kt({ phone: e }) {
|
|
3857
3952
|
const r = `tel:${e.replace(/\D/g, "")}`;
|
|
3858
3953
|
return /* @__PURE__ */ t.jsxs("p", { className: m.subtitle, "data-testid": "schedule-assessment-support", children: [
|
|
3859
3954
|
"Call Opendoor at",
|
|
@@ -3863,14 +3958,14 @@ function xt({ phone: e }) {
|
|
|
3863
3958
|
"to schedule."
|
|
3864
3959
|
] });
|
|
3865
3960
|
}
|
|
3866
|
-
function
|
|
3961
|
+
function So(e) {
|
|
3867
3962
|
return e.trim().split(/\s+/)[0] ?? "";
|
|
3868
3963
|
}
|
|
3869
|
-
function
|
|
3964
|
+
function Ye(e) {
|
|
3870
3965
|
const r = e.replace(/\D/g, "").slice(0, 10);
|
|
3871
3966
|
return r.length === 0 ? "" : r.length <= 3 ? `(${r}` : r.length <= 6 ? `(${r.slice(0, 3)}) ${r.slice(3)}` : `(${r.slice(0, 3)}) ${r.slice(3, 6)}-${r.slice(6)}`;
|
|
3872
3967
|
}
|
|
3873
|
-
function
|
|
3968
|
+
function jt(e, r) {
|
|
3874
3969
|
const a = new Date(e);
|
|
3875
3970
|
return new Intl.DateTimeFormat("en-CA", {
|
|
3876
3971
|
timeZone: r,
|
|
@@ -3879,11 +3974,11 @@ function wt(e, r) {
|
|
|
3879
3974
|
day: "2-digit"
|
|
3880
3975
|
}).format(a);
|
|
3881
3976
|
}
|
|
3882
|
-
function
|
|
3977
|
+
function Eo(e) {
|
|
3883
3978
|
const [r, a] = e.split("-").map((s) => parseInt(s, 10));
|
|
3884
3979
|
return { year: r, month: a - 1 };
|
|
3885
3980
|
}
|
|
3886
|
-
function
|
|
3981
|
+
function Nt(e, r) {
|
|
3887
3982
|
return new Intl.DateTimeFormat(void 0, {
|
|
3888
3983
|
timeZone: r,
|
|
3889
3984
|
weekday: "long",
|
|
@@ -3891,7 +3986,7 @@ function Ct(e, r) {
|
|
|
3891
3986
|
day: "numeric"
|
|
3892
3987
|
}).format(e);
|
|
3893
3988
|
}
|
|
3894
|
-
function
|
|
3989
|
+
function It(e, r) {
|
|
3895
3990
|
return new Intl.DateTimeFormat(void 0, {
|
|
3896
3991
|
timeZone: r,
|
|
3897
3992
|
hour: "numeric",
|
|
@@ -3899,11 +3994,11 @@ function kt(e, r) {
|
|
|
3899
3994
|
hour12: !0
|
|
3900
3995
|
}).format(e);
|
|
3901
3996
|
}
|
|
3902
|
-
function
|
|
3997
|
+
function St(e, r) {
|
|
3903
3998
|
const a = e.year * 12 + e.month + r, s = Math.floor(a / 12), o = a - s * 12;
|
|
3904
3999
|
return { year: s, month: o };
|
|
3905
4000
|
}
|
|
3906
|
-
function
|
|
4001
|
+
function Po({ year: e, month: r }) {
|
|
3907
4002
|
const a = new Date(Date.UTC(e, r, 1)).getUTCDay(), s = new Date(Date.UTC(e, r + 1, 0)).getUTCDate(), o = Math.ceil((a + s) / 7) * 7, i = [], f = String(e).padStart(4, "0"), p = String(r + 1).padStart(2, "0");
|
|
3908
4003
|
for (let h = 0; h < o; h++) {
|
|
3909
4004
|
const c = h - a + 1;
|
|
@@ -3914,14 +4009,14 @@ function jo({ year: e, month: r }) {
|
|
|
3914
4009
|
}
|
|
3915
4010
|
return i;
|
|
3916
4011
|
}
|
|
3917
|
-
function
|
|
4012
|
+
function Lo({ year: e, month: r }) {
|
|
3918
4013
|
return new Date(Date.UTC(e, r, 1)).toLocaleString(void 0, {
|
|
3919
4014
|
timeZone: "UTC",
|
|
3920
4015
|
month: "long",
|
|
3921
4016
|
year: "numeric"
|
|
3922
4017
|
});
|
|
3923
4018
|
}
|
|
3924
|
-
function
|
|
4019
|
+
function To(e, r) {
|
|
3925
4020
|
for (const a of r.keys()) {
|
|
3926
4021
|
const [s, o] = a.split("-").map((i) => parseInt(i, 10));
|
|
3927
4022
|
if (s < e.year || s === e.year && o - 1 < e.month)
|
|
@@ -3929,7 +4024,7 @@ function Io(e, r) {
|
|
|
3929
4024
|
}
|
|
3930
4025
|
return !1;
|
|
3931
4026
|
}
|
|
3932
|
-
function
|
|
4027
|
+
function Ao(e, r) {
|
|
3933
4028
|
for (const a of r.keys()) {
|
|
3934
4029
|
const [s, o] = a.split("-").map((i) => parseInt(i, 10));
|
|
3935
4030
|
if (s > e.year || s === e.year && o - 1 > e.month)
|
|
@@ -3937,7 +4032,7 @@ function So(e, r) {
|
|
|
3937
4032
|
}
|
|
3938
4033
|
return !1;
|
|
3939
4034
|
}
|
|
3940
|
-
function
|
|
4035
|
+
function tt() {
|
|
3941
4036
|
return {
|
|
3942
4037
|
width: 16,
|
|
3943
4038
|
height: 16,
|
|
@@ -3951,25 +4046,25 @@ function Qe() {
|
|
|
3951
4046
|
className: m.summaryIcon
|
|
3952
4047
|
};
|
|
3953
4048
|
}
|
|
3954
|
-
function
|
|
3955
|
-
return /* @__PURE__ */ t.jsxs("svg", { ...
|
|
4049
|
+
function Do() {
|
|
4050
|
+
return /* @__PURE__ */ t.jsxs("svg", { ...tt(), children: [
|
|
3956
4051
|
/* @__PURE__ */ t.jsx("rect", { x: "2", y: "3.5", width: "12", height: "11", rx: "1.5" }),
|
|
3957
4052
|
/* @__PURE__ */ t.jsx("path", { d: "M2 6.5h12M5.5 2v3M10.5 2v3" })
|
|
3958
4053
|
] });
|
|
3959
4054
|
}
|
|
3960
|
-
function
|
|
3961
|
-
return /* @__PURE__ */ t.jsxs("svg", { ...
|
|
4055
|
+
function Oo() {
|
|
4056
|
+
return /* @__PURE__ */ t.jsxs("svg", { ...tt(), children: [
|
|
3962
4057
|
/* @__PURE__ */ t.jsx("circle", { cx: "8", cy: "8", r: "6" }),
|
|
3963
4058
|
/* @__PURE__ */ t.jsx("path", { d: "M8 4.5V8l2.5 1.5" })
|
|
3964
4059
|
] });
|
|
3965
4060
|
}
|
|
3966
|
-
function
|
|
3967
|
-
return /* @__PURE__ */ t.jsxs("svg", { ...
|
|
4061
|
+
function Ro() {
|
|
4062
|
+
return /* @__PURE__ */ t.jsxs("svg", { ...tt(), children: [
|
|
3968
4063
|
/* @__PURE__ */ t.jsx("path", { d: "M8 14s-4.5-4-4.5-7.5a4.5 4.5 0 1 1 9 0C12.5 10 8 14 8 14z" }),
|
|
3969
4064
|
/* @__PURE__ */ t.jsx("circle", { cx: "8", cy: "6.5", r: "1.5" })
|
|
3970
4065
|
] });
|
|
3971
4066
|
}
|
|
3972
|
-
const
|
|
4067
|
+
const Bo = [
|
|
3973
4068
|
{
|
|
3974
4069
|
title: "No extra preparation needed",
|
|
3975
4070
|
description: "No need to fix, clean, or stage your home."
|
|
@@ -3982,7 +4077,7 @@ const To = [
|
|
|
3982
4077
|
title: "30 minutes or less",
|
|
3983
4078
|
description: "Examine the home's exterior and take a quick look inside."
|
|
3984
4079
|
}
|
|
3985
|
-
],
|
|
4080
|
+
], $o = [
|
|
3986
4081
|
{
|
|
3987
4082
|
title: "What are you looking for during the assessment?",
|
|
3988
4083
|
body: "We will verify the property's condition matches your contract. We'll check the home's exterior and interior, including major systems, structure, and overall condition. This helps us confirm all details are accurate before closing."
|
|
@@ -3996,7 +4091,7 @@ const To = [
|
|
|
3996
4091
|
body: "Once we're done with the home assessment, it typically takes a few days to email your final offer. You'll be able to see your final offer price along with the service charge, any repair cost, and your estimated closing costs."
|
|
3997
4092
|
}
|
|
3998
4093
|
];
|
|
3999
|
-
function
|
|
4094
|
+
function Mo() {
|
|
4000
4095
|
return /* @__PURE__ */ t.jsx(
|
|
4001
4096
|
"svg",
|
|
4002
4097
|
{
|
|
@@ -4014,7 +4109,7 @@ function Do() {
|
|
|
4014
4109
|
}
|
|
4015
4110
|
);
|
|
4016
4111
|
}
|
|
4017
|
-
function
|
|
4112
|
+
function Fo({
|
|
4018
4113
|
items: e
|
|
4019
4114
|
}) {
|
|
4020
4115
|
return /* @__PURE__ */ t.jsxs("div", { className: m.faq, children: [
|
|
@@ -4022,21 +4117,21 @@ function Oo({
|
|
|
4022
4117
|
e.map((r) => /* @__PURE__ */ t.jsxs("details", { className: m.faqItem, children: [
|
|
4023
4118
|
/* @__PURE__ */ t.jsxs("summary", { className: m.faqQuestion, children: [
|
|
4024
4119
|
/* @__PURE__ */ t.jsx("span", { children: r.title }),
|
|
4025
|
-
/* @__PURE__ */ t.jsx(
|
|
4120
|
+
/* @__PURE__ */ t.jsx(Mo, {})
|
|
4026
4121
|
] }),
|
|
4027
4122
|
/* @__PURE__ */ t.jsx("p", { className: m.faqAnswer, children: r.body })
|
|
4028
4123
|
] }, r.title))
|
|
4029
4124
|
] });
|
|
4030
4125
|
}
|
|
4031
4126
|
export {
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4127
|
+
Go as AddressEntry,
|
|
4128
|
+
Yo as AddressMap,
|
|
4129
|
+
Uo as AddressUnitConfirmation,
|
|
4130
|
+
Vo as DTC_ONBOARDING_PAGE_IDS,
|
|
4131
|
+
Zo as DtcOnboardingFlow,
|
|
4132
|
+
qo as OpendoorProvider,
|
|
4133
|
+
Ko as ScheduleAssessmentFlow,
|
|
4134
|
+
_r as THEMES,
|
|
4135
|
+
yr as resolveAppearance,
|
|
4136
|
+
Tt as useOpendoorClient
|
|
4042
4137
|
};
|