@opendoor/partner-sdk-client-react 1.3.3-beta.111.1 → 1.3.3-beta.112.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/index.js +889 -831
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { createPortal as
|
|
1
|
+
import wt, { createContext as Ye, useState as E, useEffect as se, useContext as De, useRef as G, useMemo as Se, useCallback as Ee, useLayoutEffect as Ut } from "react";
|
|
2
|
+
import { createPortal as Yt } from "react-dom";
|
|
3
3
|
var Ge = { exports: {} }, Ne = {};
|
|
4
4
|
/*
|
|
5
5
|
object-assign
|
|
6
6
|
(c) Sindre Sorhus
|
|
7
7
|
@license MIT
|
|
8
8
|
*/
|
|
9
|
-
var
|
|
10
|
-
function
|
|
11
|
-
if (
|
|
12
|
-
|
|
9
|
+
var $e, it;
|
|
10
|
+
function kt() {
|
|
11
|
+
if (it) return $e;
|
|
12
|
+
it = 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)
|
|
@@ -23,34 +23,34 @@ function Ct() {
|
|
|
23
23
|
var i = new String("abc");
|
|
24
24
|
if (i[5] = "de", Object.getOwnPropertyNames(i)[0] === "5")
|
|
25
25
|
return !1;
|
|
26
|
-
for (var
|
|
27
|
-
|
|
28
|
-
var
|
|
29
|
-
return
|
|
26
|
+
for (var m = {}, f = 0; f < 10; f++)
|
|
27
|
+
m["_" + String.fromCharCode(f)] = f;
|
|
28
|
+
var d = Object.getOwnPropertyNames(m).map(function(h) {
|
|
29
|
+
return m[h];
|
|
30
30
|
});
|
|
31
|
-
if (
|
|
31
|
+
if (d.join("") !== "0123456789")
|
|
32
32
|
return !1;
|
|
33
|
-
var
|
|
34
|
-
return "abcdefghijklmnopqrst".split("").forEach(function(
|
|
35
|
-
h
|
|
36
|
-
}), Object.keys(Object.assign({},
|
|
33
|
+
var u = {};
|
|
34
|
+
return "abcdefghijklmnopqrst".split("").forEach(function(h) {
|
|
35
|
+
u[h] = h;
|
|
36
|
+
}), Object.keys(Object.assign({}, u)).join("") === "abcdefghijklmnopqrst";
|
|
37
37
|
} catch {
|
|
38
38
|
return !1;
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
return
|
|
42
|
-
for (var f,
|
|
43
|
-
f = Object(arguments[
|
|
44
|
-
for (var
|
|
45
|
-
r.call(f,
|
|
41
|
+
return $e = o() ? Object.assign : function(i, m) {
|
|
42
|
+
for (var f, d = s(i), u, h = 1; h < arguments.length; h++) {
|
|
43
|
+
f = Object(arguments[h]);
|
|
44
|
+
for (var p in f)
|
|
45
|
+
r.call(f, p) && (d[p] = f[p]);
|
|
46
46
|
if (e) {
|
|
47
|
-
|
|
48
|
-
for (var
|
|
49
|
-
a.call(f,
|
|
47
|
+
u = e(f);
|
|
48
|
+
for (var _ = 0; _ < u.length; _++)
|
|
49
|
+
a.call(f, u[_]) && (d[u[_]] = f[u[_]]);
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
return
|
|
53
|
-
},
|
|
52
|
+
return d;
|
|
53
|
+
}, $e;
|
|
54
54
|
}
|
|
55
55
|
/** @license React v17.0.2
|
|
56
56
|
* react-jsx-runtime.production.min.js
|
|
@@ -60,24 +60,24 @@ function Ct() {
|
|
|
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 lt;
|
|
64
|
+
function Zt() {
|
|
65
|
+
if (lt) return Ne;
|
|
66
|
+
lt = 1, kt();
|
|
67
|
+
var e = wt, r = 60103;
|
|
68
68
|
if (Ne.Fragment = 60107, typeof Symbol == "function" && Symbol.for) {
|
|
69
69
|
var a = Symbol.for;
|
|
70
70
|
r = a("react.element"), Ne.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
|
-
function
|
|
74
|
-
var
|
|
75
|
-
|
|
76
|
-
for (
|
|
77
|
-
if (f && f.defaultProps) for (
|
|
78
|
-
return { $$typeof: r, type: f, key:
|
|
73
|
+
function m(f, d, u) {
|
|
74
|
+
var h, p = {}, _ = null, C = null;
|
|
75
|
+
u !== void 0 && (_ = "" + u), d.key !== void 0 && (_ = "" + d.key), d.ref !== void 0 && (C = d.ref);
|
|
76
|
+
for (h in d) o.call(d, h) && !i.hasOwnProperty(h) && (p[h] = d[h]);
|
|
77
|
+
if (f && f.defaultProps) for (h in d = f.defaultProps, d) p[h] === void 0 && (p[h] = d[h]);
|
|
78
|
+
return { $$typeof: r, type: f, key: _, ref: C, props: p, _owner: s.current };
|
|
79
79
|
}
|
|
80
|
-
return Ne.jsx =
|
|
80
|
+
return Ne.jsx = m, Ne.jsxs = m, Ne;
|
|
81
81
|
}
|
|
82
82
|
var We = {};
|
|
83
83
|
/** @license React v17.0.2
|
|
@@ -88,45 +88,45 @@ var We = {};
|
|
|
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 ct;
|
|
92
|
+
function Kt() {
|
|
93
|
+
return ct || (ct = 1, function(e) {
|
|
94
94
|
process.env.NODE_ENV !== "production" && function() {
|
|
95
|
-
var r =
|
|
95
|
+
var r = wt, a = kt(), s = 60103, o = 60106;
|
|
96
96
|
e.Fragment = 60107;
|
|
97
|
-
var i = 60108,
|
|
97
|
+
var i = 60108, m = 60114, f = 60109, d = 60110, u = 60112, h = 60113, p = 60120, _ = 60115, C = 60116, S = 60121, k = 60122, H = 60117, P = 60129, Y = 60131;
|
|
98
98
|
if (typeof Symbol == "function" && Symbol.for) {
|
|
99
99
|
var j = Symbol.for;
|
|
100
|
-
s = j("react.element"), o = j("react.portal"), e.Fragment = j("react.fragment"), i = j("react.strict_mode"),
|
|
100
|
+
s = j("react.element"), o = j("react.portal"), e.Fragment = j("react.fragment"), i = j("react.strict_mode"), m = j("react.profiler"), f = j("react.provider"), d = j("react.context"), u = j("react.forward_ref"), h = j("react.suspense"), p = j("react.suspense_list"), _ = j("react.memo"), C = j("react.lazy"), S = j("react.block"), k = j("react.server.block"), H = j("react.fundamental"), j("react.scope"), j("react.opaque.id"), P = j("react.debug_trace_mode"), j("react.offscreen"), Y = j("react.legacy_hidden");
|
|
101
101
|
}
|
|
102
|
-
var ne = typeof Symbol == "function" && Symbol.iterator,
|
|
102
|
+
var ne = typeof Symbol == "function" && Symbol.iterator, F = "@@iterator";
|
|
103
103
|
function oe(n) {
|
|
104
104
|
if (n === null || typeof n != "object")
|
|
105
105
|
return null;
|
|
106
|
-
var c = ne && n[ne] || n[
|
|
106
|
+
var c = ne && n[ne] || n[F];
|
|
107
107
|
return typeof c == "function" ? c : null;
|
|
108
108
|
}
|
|
109
109
|
var U = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
110
|
-
function
|
|
110
|
+
function A(n) {
|
|
111
111
|
{
|
|
112
112
|
for (var c = arguments.length, b = new Array(c > 1 ? c - 1 : 0), I = 1; I < c; I++)
|
|
113
113
|
b[I - 1] = arguments[I];
|
|
114
|
-
|
|
114
|
+
$("error", n, b);
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function $(n, c, b) {
|
|
118
118
|
{
|
|
119
119
|
var I = U.ReactDebugCurrentFrame, V = I.getStackAddendum();
|
|
120
120
|
V !== "" && (c += "%s", b = b.concat([V]));
|
|
121
|
-
var W = b.map(function(
|
|
122
|
-
return "" +
|
|
121
|
+
var W = b.map(function(D) {
|
|
122
|
+
return "" + D;
|
|
123
123
|
});
|
|
124
124
|
W.unshift("Warning: " + c), Function.prototype.apply.call(console[n], console, W);
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
127
|
var Z = !1;
|
|
128
128
|
function ae(n) {
|
|
129
|
-
return !!(typeof n == "string" || typeof n == "function" || n === e.Fragment || n ===
|
|
129
|
+
return !!(typeof n == "string" || typeof n == "function" || n === e.Fragment || n === m || n === P || n === i || n === h || n === p || n === Y || Z || typeof n == "object" && n !== null && (n.$$typeof === C || n.$$typeof === _ || n.$$typeof === f || n.$$typeof === d || n.$$typeof === u || n.$$typeof === H || n.$$typeof === S || n[0] === k));
|
|
130
130
|
}
|
|
131
131
|
function z(n, c, b) {
|
|
132
132
|
var I = c.displayName || c.name || "";
|
|
@@ -138,7 +138,7 @@ function Zt() {
|
|
|
138
138
|
function q(n) {
|
|
139
139
|
if (n == null)
|
|
140
140
|
return null;
|
|
141
|
-
if (typeof n.tag == "number" &&
|
|
141
|
+
if (typeof n.tag == "number" && A("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."), typeof n == "function")
|
|
142
142
|
return n.displayName || n.name || null;
|
|
143
143
|
if (typeof n == "string")
|
|
144
144
|
return n;
|
|
@@ -147,28 +147,28 @@ function Zt() {
|
|
|
147
147
|
return "Fragment";
|
|
148
148
|
case o:
|
|
149
149
|
return "Portal";
|
|
150
|
-
case
|
|
150
|
+
case m:
|
|
151
151
|
return "Profiler";
|
|
152
152
|
case i:
|
|
153
153
|
return "StrictMode";
|
|
154
|
-
case
|
|
154
|
+
case h:
|
|
155
155
|
return "Suspense";
|
|
156
|
-
case
|
|
156
|
+
case p:
|
|
157
157
|
return "SuspenseList";
|
|
158
158
|
}
|
|
159
159
|
if (typeof n == "object")
|
|
160
160
|
switch (n.$$typeof) {
|
|
161
|
-
case
|
|
161
|
+
case d:
|
|
162
162
|
var c = n;
|
|
163
163
|
return K(c) + ".Consumer";
|
|
164
164
|
case f:
|
|
165
165
|
var b = n;
|
|
166
166
|
return K(b._context) + ".Provider";
|
|
167
|
-
case
|
|
167
|
+
case u:
|
|
168
168
|
return z(n, n.render, "ForwardRef");
|
|
169
|
-
case
|
|
169
|
+
case _:
|
|
170
170
|
return q(n.type);
|
|
171
|
-
case
|
|
171
|
+
case S:
|
|
172
172
|
return q(n._render);
|
|
173
173
|
case C: {
|
|
174
174
|
var I = n, V = I._payload, W = I._init;
|
|
@@ -240,7 +240,7 @@ function Zt() {
|
|
|
240
240
|
})
|
|
241
241
|
});
|
|
242
242
|
}
|
|
243
|
-
ie < 0 &&
|
|
243
|
+
ie < 0 && A("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
246
|
var N = U.ReactCurrentDispatcher, L;
|
|
@@ -278,27 +278,27 @@ function Zt() {
|
|
|
278
278
|
W = N.current, N.current = null, me();
|
|
279
279
|
try {
|
|
280
280
|
if (c) {
|
|
281
|
-
var
|
|
281
|
+
var D = function() {
|
|
282
282
|
throw Error();
|
|
283
283
|
};
|
|
284
|
-
if (Object.defineProperty(
|
|
284
|
+
if (Object.defineProperty(D.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(D, []);
|
|
291
291
|
} catch (be) {
|
|
292
292
|
I = be;
|
|
293
293
|
}
|
|
294
|
-
Reflect.construct(n, [],
|
|
294
|
+
Reflect.construct(n, [], D);
|
|
295
295
|
} else {
|
|
296
296
|
try {
|
|
297
|
-
|
|
297
|
+
D.call();
|
|
298
298
|
} catch (be) {
|
|
299
299
|
I = be;
|
|
300
300
|
}
|
|
301
|
-
n.call(
|
|
301
|
+
n.call(D.prototype);
|
|
302
302
|
}
|
|
303
303
|
} else {
|
|
304
304
|
try {
|
|
@@ -330,8 +330,8 @@ function Zt() {
|
|
|
330
330
|
} finally {
|
|
331
331
|
M = !1, N.current = W, pe(), Error.prepareStackTrace = V;
|
|
332
332
|
}
|
|
333
|
-
var je = n ? n.displayName || n.name : "",
|
|
334
|
-
return typeof n == "function" && le.set(n,
|
|
333
|
+
var je = n ? n.displayName || n.name : "", ot = je ? B(je) : "";
|
|
334
|
+
return typeof n == "function" && le.set(n, ot), ot;
|
|
335
335
|
}
|
|
336
336
|
function Le(n, c, b) {
|
|
337
337
|
return ge(n, !1);
|
|
@@ -348,18 +348,18 @@ function Zt() {
|
|
|
348
348
|
if (typeof n == "string")
|
|
349
349
|
return B(n);
|
|
350
350
|
switch (n) {
|
|
351
|
-
case
|
|
351
|
+
case h:
|
|
352
352
|
return B("Suspense");
|
|
353
|
-
case
|
|
353
|
+
case p:
|
|
354
354
|
return B("SuspenseList");
|
|
355
355
|
}
|
|
356
356
|
if (typeof n == "object")
|
|
357
357
|
switch (n.$$typeof) {
|
|
358
|
-
case
|
|
358
|
+
case u:
|
|
359
359
|
return Le(n.render);
|
|
360
|
-
case
|
|
360
|
+
case _:
|
|
361
361
|
return w(n.type, c, b);
|
|
362
|
-
case
|
|
362
|
+
case S:
|
|
363
363
|
return Le(n._render);
|
|
364
364
|
case C: {
|
|
365
365
|
var I = n, V = I._payload, W = I._init;
|
|
@@ -382,29 +382,29 @@ function Zt() {
|
|
|
382
382
|
function we(n, c, b, I, V) {
|
|
383
383
|
{
|
|
384
384
|
var W = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
385
|
-
for (var
|
|
386
|
-
if (W(n,
|
|
385
|
+
for (var D in n)
|
|
386
|
+
if (W(n, D)) {
|
|
387
387
|
var T = void 0;
|
|
388
388
|
try {
|
|
389
|
-
if (typeof n[
|
|
390
|
-
var ce = Error((I || "React class") + ": " + b + " type `" +
|
|
389
|
+
if (typeof n[D] != "function") {
|
|
390
|
+
var ce = Error((I || "React class") + ": " + b + " type `" + D + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof n[D] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
391
391
|
throw ce.name = "Invariant Violation", ce;
|
|
392
392
|
}
|
|
393
|
-
T = n[
|
|
393
|
+
T = n[D](c, D, I, b, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
394
394
|
} catch (Q) {
|
|
395
395
|
T = Q;
|
|
396
396
|
}
|
|
397
|
-
T && !(T instanceof Error) && (Ce(V),
|
|
397
|
+
T && !(T instanceof Error) && (Ce(V), A("%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).", I || "React class", b, D, typeof T), Ce(null)), T instanceof Error && !(T.message in X) && (X[T.message] = !0, Ce(V), A("Failed %s type: %s", b, T.message), Ce(null));
|
|
398
398
|
}
|
|
399
399
|
}
|
|
400
400
|
}
|
|
401
|
-
var Ie = U.ReactCurrentOwner, Re = Object.prototype.hasOwnProperty,
|
|
401
|
+
var Ie = U.ReactCurrentOwner, Re = Object.prototype.hasOwnProperty, Pt = {
|
|
402
402
|
key: !0,
|
|
403
403
|
ref: !0,
|
|
404
404
|
__self: !0,
|
|
405
405
|
__source: !0
|
|
406
|
-
},
|
|
407
|
-
function
|
|
406
|
+
}, Xe, Qe;
|
|
407
|
+
function Lt(n) {
|
|
408
408
|
if (Re.call(n, "ref")) {
|
|
409
409
|
var c = Object.getOwnPropertyDescriptor(n, "ref").get;
|
|
410
410
|
if (c && c.isReactWarning)
|
|
@@ -412,7 +412,7 @@ function Zt() {
|
|
|
412
412
|
}
|
|
413
413
|
return n.ref !== void 0;
|
|
414
414
|
}
|
|
415
|
-
function
|
|
415
|
+
function Tt(n) {
|
|
416
416
|
if (Re.call(n, "key")) {
|
|
417
417
|
var c = Object.getOwnPropertyDescriptor(n, "key").get;
|
|
418
418
|
if (c && c.isReactWarning)
|
|
@@ -420,13 +420,13 @@ function Zt() {
|
|
|
420
420
|
}
|
|
421
421
|
return n.key !== void 0;
|
|
422
422
|
}
|
|
423
|
-
function
|
|
423
|
+
function At(n, c) {
|
|
424
424
|
typeof n.ref == "string" && Ie.current;
|
|
425
425
|
}
|
|
426
426
|
function Dt(n, c) {
|
|
427
427
|
{
|
|
428
428
|
var b = function() {
|
|
429
|
-
|
|
429
|
+
Xe || (Xe = !0, A("%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)", c));
|
|
430
430
|
};
|
|
431
431
|
b.isReactWarning = !0, Object.defineProperty(n, "key", {
|
|
432
432
|
get: b,
|
|
@@ -434,10 +434,10 @@ function Zt() {
|
|
|
434
434
|
});
|
|
435
435
|
}
|
|
436
436
|
}
|
|
437
|
-
function
|
|
437
|
+
function Ot(n, c) {
|
|
438
438
|
{
|
|
439
439
|
var b = function() {
|
|
440
|
-
|
|
440
|
+
Qe || (Qe = !0, A("%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)", c));
|
|
441
441
|
};
|
|
442
442
|
b.isReactWarning = !0, Object.defineProperty(n, "ref", {
|
|
443
443
|
get: b,
|
|
@@ -445,7 +445,7 @@ function Zt() {
|
|
|
445
445
|
});
|
|
446
446
|
}
|
|
447
447
|
}
|
|
448
|
-
var
|
|
448
|
+
var Rt = function(n, c, b, I, V, W, D) {
|
|
449
449
|
var T = {
|
|
450
450
|
// This tag allows us to uniquely identify this as a React Element
|
|
451
451
|
$$typeof: s,
|
|
@@ -453,7 +453,7 @@ function Zt() {
|
|
|
453
453
|
type: n,
|
|
454
454
|
key: c,
|
|
455
455
|
ref: b,
|
|
456
|
-
props:
|
|
456
|
+
props: D,
|
|
457
457
|
// Record the component responsible for creating this element.
|
|
458
458
|
_owner: W
|
|
459
459
|
};
|
|
@@ -474,38 +474,38 @@ function Zt() {
|
|
|
474
474
|
value: V
|
|
475
475
|
}), Object.freeze && (Object.freeze(T.props), Object.freeze(T)), T;
|
|
476
476
|
};
|
|
477
|
-
function
|
|
477
|
+
function Bt(n, c, b, I, V) {
|
|
478
478
|
{
|
|
479
|
-
var W,
|
|
480
|
-
b !== void 0 && (T = "" + b),
|
|
479
|
+
var W, D = {}, T = null, ce = null;
|
|
480
|
+
b !== void 0 && (T = "" + b), Tt(c) && (T = "" + c.key), Lt(c) && (ce = c.ref, At(c, V));
|
|
481
481
|
for (W in c)
|
|
482
|
-
Re.call(c, W) && !
|
|
482
|
+
Re.call(c, W) && !Pt.hasOwnProperty(W) && (D[W] = c[W]);
|
|
483
483
|
if (n && n.defaultProps) {
|
|
484
484
|
var Q = n.defaultProps;
|
|
485
485
|
for (W in Q)
|
|
486
|
-
|
|
486
|
+
D[W] === void 0 && (D[W] = Q[W]);
|
|
487
487
|
}
|
|
488
488
|
if (T || ce) {
|
|
489
489
|
var te = typeof n == "function" ? n.displayName || n.name || "Unknown" : n;
|
|
490
|
-
T && Dt(
|
|
490
|
+
T && Dt(D, te), ce && Ot(D, te);
|
|
491
491
|
}
|
|
492
|
-
return
|
|
492
|
+
return Rt(n, T, ce, V, I, Ie.current, D);
|
|
493
493
|
}
|
|
494
494
|
}
|
|
495
|
-
var Be = U.ReactCurrentOwner,
|
|
495
|
+
var Be = U.ReactCurrentOwner, et = U.ReactDebugCurrentFrame;
|
|
496
496
|
function ke(n) {
|
|
497
497
|
if (n) {
|
|
498
498
|
var c = n._owner, b = w(n.type, n._source, c ? c.type : null);
|
|
499
|
-
|
|
499
|
+
et.setExtraStackFrame(b);
|
|
500
500
|
} else
|
|
501
|
-
|
|
501
|
+
et.setExtraStackFrame(null);
|
|
502
502
|
}
|
|
503
503
|
var Me;
|
|
504
504
|
Me = !1;
|
|
505
|
-
function
|
|
505
|
+
function Fe(n) {
|
|
506
506
|
return typeof n == "object" && n !== null && n.$$typeof === s;
|
|
507
507
|
}
|
|
508
|
-
function
|
|
508
|
+
function tt() {
|
|
509
509
|
{
|
|
510
510
|
if (Be.current) {
|
|
511
511
|
var n = q(Be.current.type);
|
|
@@ -517,13 +517,13 @@ Check the render method of \`` + n + "`.";
|
|
|
517
517
|
return "";
|
|
518
518
|
}
|
|
519
519
|
}
|
|
520
|
-
function
|
|
520
|
+
function Mt(n) {
|
|
521
521
|
return "";
|
|
522
522
|
}
|
|
523
|
-
var
|
|
524
|
-
function
|
|
523
|
+
var rt = {};
|
|
524
|
+
function Ft(n) {
|
|
525
525
|
{
|
|
526
|
-
var c =
|
|
526
|
+
var c = tt();
|
|
527
527
|
if (!c) {
|
|
528
528
|
var b = typeof n == "string" ? n : n.displayName || n.name;
|
|
529
529
|
b && (c = `
|
|
@@ -533,35 +533,35 @@ Check the top-level render call using <` + b + ">.");
|
|
|
533
533
|
return c;
|
|
534
534
|
}
|
|
535
535
|
}
|
|
536
|
-
function
|
|
536
|
+
function nt(n, c) {
|
|
537
537
|
{
|
|
538
538
|
if (!n._store || n._store.validated || n.key != null)
|
|
539
539
|
return;
|
|
540
540
|
n._store.validated = !0;
|
|
541
|
-
var b =
|
|
542
|
-
if (
|
|
541
|
+
var b = Ft(c);
|
|
542
|
+
if (rt[b])
|
|
543
543
|
return;
|
|
544
|
-
|
|
544
|
+
rt[b] = !0;
|
|
545
545
|
var I = "";
|
|
546
|
-
n && n._owner && n._owner !== Be.current && (I = " It was passed a child from " + q(n._owner.type) + "."), ke(n),
|
|
546
|
+
n && n._owner && n._owner !== Be.current && (I = " It was passed a child from " + q(n._owner.type) + "."), ke(n), A('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', b, I), ke(null);
|
|
547
547
|
}
|
|
548
548
|
}
|
|
549
|
-
function
|
|
549
|
+
function at(n, c) {
|
|
550
550
|
{
|
|
551
551
|
if (typeof n != "object")
|
|
552
552
|
return;
|
|
553
553
|
if (Array.isArray(n))
|
|
554
554
|
for (var b = 0; b < n.length; b++) {
|
|
555
555
|
var I = n[b];
|
|
556
|
-
|
|
556
|
+
Fe(I) && nt(I, c);
|
|
557
557
|
}
|
|
558
|
-
else if (
|
|
558
|
+
else if (Fe(n))
|
|
559
559
|
n._store && (n._store.validated = !0);
|
|
560
560
|
else if (n) {
|
|
561
561
|
var V = oe(n);
|
|
562
562
|
if (typeof V == "function" && V !== n.entries)
|
|
563
|
-
for (var W = V.call(n),
|
|
564
|
-
|
|
563
|
+
for (var W = V.call(n), D; !(D = W.next()).done; )
|
|
564
|
+
Fe(D.value) && nt(D.value, c);
|
|
565
565
|
}
|
|
566
566
|
}
|
|
567
567
|
}
|
|
@@ -573,9 +573,9 @@ Check the top-level render call using <` + b + ">.");
|
|
|
573
573
|
var b;
|
|
574
574
|
if (typeof c == "function")
|
|
575
575
|
b = c.propTypes;
|
|
576
|
-
else if (typeof c == "object" && (c.$$typeof ===
|
|
576
|
+
else if (typeof c == "object" && (c.$$typeof === u || // Note: Memo only checks outer props here.
|
|
577
577
|
// Inner props are checked in the reconciler.
|
|
578
|
-
c.$$typeof ===
|
|
578
|
+
c.$$typeof === _))
|
|
579
579
|
b = c.propTypes;
|
|
580
580
|
else
|
|
581
581
|
return;
|
|
@@ -585,82 +585,82 @@ Check the top-level render call using <` + b + ">.");
|
|
|
585
585
|
} else if (c.PropTypes !== void 0 && !Me) {
|
|
586
586
|
Me = !0;
|
|
587
587
|
var V = q(c);
|
|
588
|
-
|
|
588
|
+
A("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", V || "Unknown");
|
|
589
589
|
}
|
|
590
|
-
typeof c.getDefaultProps == "function" && !c.getDefaultProps.isReactClassApproved &&
|
|
590
|
+
typeof c.getDefaultProps == "function" && !c.getDefaultProps.isReactClassApproved && A("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
591
591
|
}
|
|
592
592
|
}
|
|
593
|
-
function
|
|
593
|
+
function Wt(n) {
|
|
594
594
|
{
|
|
595
595
|
for (var c = Object.keys(n.props), b = 0; b < c.length; b++) {
|
|
596
596
|
var I = c[b];
|
|
597
597
|
if (I !== "children" && I !== "key") {
|
|
598
|
-
ke(n),
|
|
598
|
+
ke(n), A("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", I), ke(null);
|
|
599
599
|
break;
|
|
600
600
|
}
|
|
601
601
|
}
|
|
602
|
-
n.ref !== null && (ke(n),
|
|
602
|
+
n.ref !== null && (ke(n), A("Invalid attribute `ref` supplied to `React.Fragment`."), ke(null));
|
|
603
603
|
}
|
|
604
604
|
}
|
|
605
|
-
function
|
|
605
|
+
function st(n, c, b, I, V, W) {
|
|
606
606
|
{
|
|
607
|
-
var
|
|
608
|
-
if (!
|
|
607
|
+
var D = ae(n);
|
|
608
|
+
if (!D) {
|
|
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 ce =
|
|
612
|
-
ce ? T += ce : T +=
|
|
611
|
+
var ce = Mt();
|
|
612
|
+
ce ? T += ce : T += tt();
|
|
613
613
|
var Q;
|
|
614
|
-
n === null ? Q = "null" : Array.isArray(n) ? Q = "array" : n !== void 0 && n.$$typeof === s ? (Q = "<" + (q(n.type) || "Unknown") + " />", T = " Did you accidentally export a JSX literal instead of a component?") : Q = typeof n,
|
|
614
|
+
n === null ? Q = "null" : Array.isArray(n) ? Q = "array" : n !== void 0 && n.$$typeof === s ? (Q = "<" + (q(n.type) || "Unknown") + " />", T = " Did you accidentally export a JSX literal instead of a component?") : Q = typeof n, A("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 te =
|
|
616
|
+
var te = Bt(n, c, b, V, W);
|
|
617
617
|
if (te == null)
|
|
618
618
|
return te;
|
|
619
|
-
if (
|
|
619
|
+
if (D) {
|
|
620
620
|
var _e = c.children;
|
|
621
621
|
if (_e !== void 0)
|
|
622
622
|
if (I)
|
|
623
623
|
if (Array.isArray(_e)) {
|
|
624
624
|
for (var je = 0; je < _e.length; je++)
|
|
625
|
-
|
|
625
|
+
at(_e[je], n);
|
|
626
626
|
Object.freeze && Object.freeze(_e);
|
|
627
627
|
} else
|
|
628
|
-
|
|
628
|
+
A("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
|
+
at(_e, n);
|
|
631
631
|
}
|
|
632
|
-
return n === e.Fragment ?
|
|
632
|
+
return n === e.Fragment ? Wt(te) : $t(te), te;
|
|
633
633
|
}
|
|
634
634
|
}
|
|
635
|
-
function Wt(n, c, b) {
|
|
636
|
-
return at(n, c, b, !0);
|
|
637
|
-
}
|
|
638
635
|
function Ht(n, c, b) {
|
|
639
|
-
return
|
|
636
|
+
return st(n, c, b, !0);
|
|
637
|
+
}
|
|
638
|
+
function Vt(n, c, b) {
|
|
639
|
+
return st(n, c, b, !1);
|
|
640
640
|
}
|
|
641
|
-
var
|
|
642
|
-
e.jsx =
|
|
641
|
+
var qt = Vt, Gt = Ht;
|
|
642
|
+
e.jsx = qt, e.jsxs = Gt;
|
|
643
643
|
}();
|
|
644
644
|
}(We)), We;
|
|
645
645
|
}
|
|
646
|
-
process.env.NODE_ENV === "production" ? Ge.exports =
|
|
646
|
+
process.env.NODE_ENV === "production" ? Ge.exports = Zt() : Ge.exports = Kt();
|
|
647
647
|
var t = Ge.exports;
|
|
648
|
-
const
|
|
648
|
+
const zt = {
|
|
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
|
+
}, Jt = "partner-sdk", Xt = "1.0", Qt = 5e3, er = 20, tr = 512, rr = 5, ut = 500, dt = "od_sdk_aid";
|
|
652
|
+
function nr() {
|
|
653
653
|
try {
|
|
654
|
-
const e = localStorage.getItem(
|
|
654
|
+
const e = localStorage.getItem(dt);
|
|
655
655
|
if (e)
|
|
656
656
|
return e;
|
|
657
657
|
const r = crypto.randomUUID();
|
|
658
|
-
return localStorage.setItem(
|
|
658
|
+
return localStorage.setItem(dt, r), r;
|
|
659
659
|
} catch {
|
|
660
660
|
return;
|
|
661
661
|
}
|
|
662
662
|
}
|
|
663
|
-
function
|
|
663
|
+
function ar() {
|
|
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 nr() {
|
|
|
676
676
|
language: Array.from(navigator.languages ?? [])
|
|
677
677
|
};
|
|
678
678
|
}
|
|
679
|
-
function
|
|
679
|
+
function sr(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 or(e) {
|
|
686
|
+
return sr(e) >= tr - 50;
|
|
687
687
|
}
|
|
688
|
-
async function
|
|
689
|
-
let a =
|
|
688
|
+
async function ir(e, r) {
|
|
689
|
+
let a = rr;
|
|
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, ut)), 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, ut)), a--;
|
|
702
702
|
else
|
|
703
703
|
break;
|
|
704
704
|
}
|
|
705
705
|
}
|
|
706
|
-
class
|
|
706
|
+
class lr {
|
|
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 = zt[r], this.anonymousId = nr(), this.timer = setInterval(() => this.flush(), Qt), 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 ir {
|
|
|
724
724
|
if (this.buffer.length === 0)
|
|
725
725
|
return;
|
|
726
726
|
const a = `{"eventWrappers":[${this.buffer.join(",")}]}`;
|
|
727
|
-
this.buffer = [],
|
|
727
|
+
this.buffer = [], ir(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": Jt,
|
|
734
|
+
"X-Journey-Client-Version": Xt
|
|
735
735
|
},
|
|
736
736
|
body: a
|
|
737
737
|
});
|
|
@@ -744,14 +744,14 @@ class ir {
|
|
|
744
744
|
return;
|
|
745
745
|
const a = {
|
|
746
746
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
747
|
-
websiteSource:
|
|
747
|
+
websiteSource: ar(),
|
|
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 >= er || or(this.buffer)) && this.flush();
|
|
752
752
|
}
|
|
753
753
|
}
|
|
754
|
-
const
|
|
754
|
+
const Ze = {
|
|
755
755
|
trackPlatform() {
|
|
756
756
|
},
|
|
757
757
|
trackSell() {
|
|
@@ -760,36 +760,36 @@ const Ye = {
|
|
|
760
760
|
},
|
|
761
761
|
destroy() {
|
|
762
762
|
}
|
|
763
|
-
},
|
|
763
|
+
}, Ke = Ye(null), jt = Ye(Ze), Do = ({
|
|
764
764
|
client: e,
|
|
765
765
|
children: r
|
|
766
766
|
}) => {
|
|
767
|
-
const [a, s] =
|
|
767
|
+
const [a, s] = E(Ze);
|
|
768
768
|
return se(() => {
|
|
769
|
-
const o = new
|
|
769
|
+
const o = new lr(e.environment);
|
|
770
770
|
return s(o), () => {
|
|
771
771
|
o.destroy();
|
|
772
772
|
};
|
|
773
|
-
}, [e]), /* @__PURE__ */ t.jsx(
|
|
774
|
-
},
|
|
775
|
-
const e =
|
|
773
|
+
}, [e]), /* @__PURE__ */ t.jsx(Ke.Provider, { value: e, children: /* @__PURE__ */ t.jsx(jt.Provider, { value: a, children: r }) });
|
|
774
|
+
}, Nt = () => {
|
|
775
|
+
const e = De(Ke);
|
|
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
|
+
}, ze = () => De(jt);
|
|
782
|
+
function It(e, r = {}) {
|
|
783
|
+
const a = ze(), s = G(a);
|
|
784
784
|
s.current = a;
|
|
785
785
|
const o = G(null), i = G(!1);
|
|
786
786
|
return se(() => {
|
|
787
|
-
const
|
|
788
|
-
if (!
|
|
787
|
+
const m = o.current;
|
|
788
|
+
if (!m || !e || i.current) return;
|
|
789
789
|
const f = new IntersectionObserver(
|
|
790
|
-
([
|
|
791
|
-
if (
|
|
792
|
-
if (s.current ===
|
|
790
|
+
([d]) => {
|
|
791
|
+
if (d.isIntersecting && !i.current) {
|
|
792
|
+
if (s.current === Ze) return;
|
|
793
793
|
i.current = !0, s.current.trackPlatform({
|
|
794
794
|
inputViewEvent: { targetName: e }
|
|
795
795
|
}), r.immediate && s.current.flush(), f.disconnect();
|
|
@@ -797,7 +797,7 @@ function jt(e, r = {}) {
|
|
|
797
797
|
},
|
|
798
798
|
{ threshold: 0.5 }
|
|
799
799
|
);
|
|
800
|
-
return f.observe(
|
|
800
|
+
return f.observe(m), () => f.disconnect();
|
|
801
801
|
}, [e, r.immediate]), o;
|
|
802
802
|
}
|
|
803
803
|
const He = {
|
|
@@ -845,7 +845,7 @@ const He = {
|
|
|
845
845
|
colorCardBorder: "#e5e7eb",
|
|
846
846
|
colorCardBorderSelected: "#235ca3",
|
|
847
847
|
colorCardBackgroundSelected: "#f0f5ff"
|
|
848
|
-
},
|
|
848
|
+
}, cr = {
|
|
849
849
|
/** Default theme — pill-shaped inputs, bold borders, Opendoor blue */
|
|
850
850
|
default: He,
|
|
851
851
|
/** Minimal theme — subtle borders, square corners, lighter shadows */
|
|
@@ -881,13 +881,14 @@ const He = {
|
|
|
881
881
|
buttonPaddingX: "32px"
|
|
882
882
|
}
|
|
883
883
|
};
|
|
884
|
-
function
|
|
885
|
-
const r =
|
|
884
|
+
function ur(e) {
|
|
885
|
+
const r = cr[(e == null ? void 0 : e.theme) ?? "default"];
|
|
886
886
|
return e != null && e.variables ? { ...r, ...e.variables } : r;
|
|
887
887
|
}
|
|
888
|
-
const
|
|
888
|
+
const Oo = [
|
|
889
889
|
"confirm-home-details",
|
|
890
890
|
"ownership",
|
|
891
|
+
"ownership-other",
|
|
891
892
|
"sale-timeline",
|
|
892
893
|
"kitchen-condition",
|
|
893
894
|
"bathroom-condition",
|
|
@@ -905,17 +906,17 @@ const Ao = [
|
|
|
905
906
|
"contact-info"
|
|
906
907
|
];
|
|
907
908
|
function Pe(e) {
|
|
908
|
-
const r =
|
|
909
|
+
const r = ur(e), a = {};
|
|
909
910
|
for (const [s, o] of Object.entries(r)) {
|
|
910
911
|
const i = s.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
911
912
|
a[`--od-${i}`] = o;
|
|
912
913
|
}
|
|
913
914
|
return a;
|
|
914
915
|
}
|
|
915
|
-
const
|
|
916
|
-
attribution:
|
|
917
|
-
text:
|
|
918
|
-
},
|
|
916
|
+
const dr = "_attribution_11y4r_7", hr = "_text_11y4r_16", ht = {
|
|
917
|
+
attribution: dr,
|
|
918
|
+
text: hr
|
|
919
|
+
}, fr = () => /* @__PURE__ */ t.jsx(
|
|
919
920
|
"svg",
|
|
920
921
|
{
|
|
921
922
|
width: "75",
|
|
@@ -934,34 +935,34 @@ const ur = "_attribution_11y4r_7", dr = "_text_11y4r_16", dt = {
|
|
|
934
935
|
)
|
|
935
936
|
}
|
|
936
937
|
);
|
|
937
|
-
function
|
|
938
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
939
|
-
/* @__PURE__ */ t.jsx("span", { className:
|
|
940
|
-
/* @__PURE__ */ t.jsx(
|
|
938
|
+
function mr() {
|
|
939
|
+
return /* @__PURE__ */ t.jsxs("div", { className: ht.attribution, "data-testid": "od-attribution", children: [
|
|
940
|
+
/* @__PURE__ */ t.jsx("span", { className: ht.text, children: "Powered by" }),
|
|
941
|
+
/* @__PURE__ */ t.jsx(fr, {})
|
|
941
942
|
] });
|
|
942
943
|
}
|
|
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:
|
|
944
|
+
const pr = "_container_tu90h_8", gr = "_inputSection_tu90h_16", _r = "_inputWrapper_tu90h_22", br = "_input_tu90h_16", yr = "_inputIcon_tu90h_63", vr = "_button_tu90h_80", xr = "_spinner_tu90h_121", Cr = "_suggestions_tu90h_136", wr = "_errorState_tu90h_150", kr = "_suggestion_tu90h_136", jr = "_error_tu90h_150", Nr = "_errorIcon_tu90h_199", Ir = "_errorBorder_tu90h_213", Sr = "_manualLink_tu90h_223", Er = "_manualForm_tu90h_245", Pr = "_manualFormField_tu90h_260", Lr = "_manualFormLabel_tu90h_264", Tr = "_manualFormInput_tu90h_273", Ar = "_formRow_tu90h_294", Dr = "_submitButton_tu90h_302", O = {
|
|
945
|
+
container: pr,
|
|
946
|
+
inputSection: gr,
|
|
947
|
+
inputWrapper: _r,
|
|
948
|
+
input: br,
|
|
949
|
+
inputIcon: yr,
|
|
950
|
+
button: vr,
|
|
951
|
+
spinner: xr,
|
|
952
|
+
suggestions: Cr,
|
|
953
|
+
errorState: wr,
|
|
954
|
+
suggestion: kr,
|
|
955
|
+
error: jr,
|
|
956
|
+
errorIcon: Nr,
|
|
957
|
+
errorBorder: Ir,
|
|
958
|
+
manualLink: Sr,
|
|
958
959
|
manualForm: Er,
|
|
959
|
-
manualFormField:
|
|
960
|
-
manualFormLabel:
|
|
961
|
-
manualFormInput:
|
|
962
|
-
formRow:
|
|
960
|
+
manualFormField: Pr,
|
|
961
|
+
manualFormLabel: Lr,
|
|
962
|
+
manualFormInput: Tr,
|
|
963
|
+
formRow: Ar,
|
|
963
964
|
submitButton: Dr
|
|
964
|
-
},
|
|
965
|
+
}, ft = () => /* @__PURE__ */ t.jsx(
|
|
965
966
|
"svg",
|
|
966
967
|
{
|
|
967
968
|
width: "20",
|
|
@@ -980,7 +981,7 @@ const mr = "_container_tu90h_8", pr = "_inputSection_tu90h_16", gr = "_inputWrap
|
|
|
980
981
|
}
|
|
981
982
|
)
|
|
982
983
|
}
|
|
983
|
-
),
|
|
984
|
+
), Or = () => /* @__PURE__ */ t.jsxs(
|
|
984
985
|
"svg",
|
|
985
986
|
{
|
|
986
987
|
width: "20",
|
|
@@ -1002,37 +1003,37 @@ const mr = "_container_tu90h_8", pr = "_inputSection_tu90h_16", gr = "_inputWrap
|
|
|
1002
1003
|
]
|
|
1003
1004
|
}
|
|
1004
1005
|
);
|
|
1005
|
-
function
|
|
1006
|
+
function mt(e) {
|
|
1006
1007
|
const r = [e.street1];
|
|
1007
1008
|
return e.street2 && (r[0] += ` ${e.street2}`), r.push(`${e.city}, ${e.state} ${e.postalCode}`), r.join(", ");
|
|
1008
1009
|
}
|
|
1009
|
-
function
|
|
1010
|
+
function Ro({
|
|
1010
1011
|
onAddressSelect: e,
|
|
1011
1012
|
enableAddressSuggestions: r = !0,
|
|
1012
1013
|
debounceMs: a = 300,
|
|
1013
1014
|
showAttribution: s = !1,
|
|
1014
1015
|
disabled: o = !1,
|
|
1015
1016
|
placeholderText: i = "Enter your home address",
|
|
1016
|
-
buttonText:
|
|
1017
|
+
buttonText: m = "Get cash offer",
|
|
1017
1018
|
showButton: f = !0,
|
|
1018
|
-
buttonIcon:
|
|
1019
|
-
inputIcon:
|
|
1020
|
-
manualEntryText:
|
|
1021
|
-
appearance:
|
|
1022
|
-
onReady:
|
|
1019
|
+
buttonIcon: d,
|
|
1020
|
+
inputIcon: u,
|
|
1021
|
+
manualEntryText: h = "Enter address manually instead",
|
|
1022
|
+
appearance: p,
|
|
1023
|
+
onReady: _,
|
|
1023
1024
|
onChange: C,
|
|
1024
|
-
onValidationError:
|
|
1025
|
+
onValidationError: S,
|
|
1025
1026
|
onAddressSuggestionsStart: k,
|
|
1026
1027
|
onAddressSuggestionsComplete: H,
|
|
1027
1028
|
onError: P
|
|
1028
1029
|
}) {
|
|
1029
|
-
const Y =
|
|
1030
|
+
const Y = Nt(), j = ze(), ne = Pe(p), [F, oe] = E(""), [U, A] = E([]), [$, Z] = E(!1), [ae, z] = E(!1), [K, q] = E(null), [ie, ue] = E(!1), [v, x] = E(!1), [y, R] = E({
|
|
1030
1031
|
street1: "",
|
|
1031
1032
|
street2: "",
|
|
1032
1033
|
city: "",
|
|
1033
1034
|
state: "",
|
|
1034
1035
|
postalCode: ""
|
|
1035
|
-
}), J = G(null), ye =
|
|
1036
|
+
}), J = G(null), ye = It("partner-sdk-address-input", {
|
|
1036
1037
|
immediate: !0
|
|
1037
1038
|
}), he = G(P);
|
|
1038
1039
|
he.current = P;
|
|
@@ -1040,30 +1041,30 @@ function Oo({
|
|
|
1040
1041
|
me.current = k;
|
|
1041
1042
|
const pe = G(H);
|
|
1042
1043
|
pe.current = H;
|
|
1043
|
-
const N = G(null), L =
|
|
1044
|
+
const N = G(null), L = $ && !ae && F.trim().length >= 3 && U.length === 0 && !v;
|
|
1044
1045
|
se(() => {
|
|
1045
|
-
|
|
1046
|
+
_ == null || _();
|
|
1046
1047
|
}, []), se(() => {
|
|
1047
|
-
if (!r ||
|
|
1048
|
-
|
|
1048
|
+
if (!r || F.trim().length < 3 || ie) {
|
|
1049
|
+
F.trim().length === 0 && (A([]), Z(!1), q(null));
|
|
1049
1050
|
return;
|
|
1050
1051
|
}
|
|
1051
1052
|
z(!0), q(null);
|
|
1052
1053
|
const w = setTimeout(async () => {
|
|
1053
1054
|
var X, ee, Ce;
|
|
1054
|
-
(X = me.current) == null || X.call(me,
|
|
1055
|
+
(X = me.current) == null || X.call(me, F);
|
|
1055
1056
|
try {
|
|
1056
|
-
const we = await Y.getAddressSuggestions(
|
|
1057
|
-
|
|
1057
|
+
const we = await Y.getAddressSuggestions(F);
|
|
1058
|
+
A(we.addresses), Z(!0), (ee = pe.current) == null || ee.call(pe, we.addresses);
|
|
1058
1059
|
} catch (we) {
|
|
1059
1060
|
const Ie = we instanceof Error ? we : new Error("Failed to fetch address suggestions");
|
|
1060
|
-
q(Ie.message),
|
|
1061
|
+
q(Ie.message), A([]), Z(!0), (Ce = he.current) == null || Ce.call(he, Ie);
|
|
1061
1062
|
} finally {
|
|
1062
1063
|
z(!1);
|
|
1063
1064
|
}
|
|
1064
1065
|
}, a);
|
|
1065
1066
|
return () => clearTimeout(w);
|
|
1066
|
-
}, [
|
|
1067
|
+
}, [F, ie, r, a, Y]), se(() => {
|
|
1067
1068
|
const w = (X) => {
|
|
1068
1069
|
N.current && !N.current.contains(X.target) && J.current && !J.current.contains(X.target) && Z(!1);
|
|
1069
1070
|
};
|
|
@@ -1073,7 +1074,7 @@ function Oo({
|
|
|
1073
1074
|
const X = w.target.value;
|
|
1074
1075
|
oe(X), ue(!1), C == null || C({ street1: X });
|
|
1075
1076
|
}, M = async (w) => {
|
|
1076
|
-
ue(!0), oe(
|
|
1077
|
+
ue(!0), oe(mt(w)), A([]), Z(!1), q(null), C == null || C(w), j.trackSell({
|
|
1077
1078
|
addressEntryV2: {
|
|
1078
1079
|
street1: w.street1,
|
|
1079
1080
|
city: w.city,
|
|
@@ -1092,7 +1093,7 @@ function Oo({
|
|
|
1092
1093
|
}, le = () => {
|
|
1093
1094
|
j.trackPlatform({
|
|
1094
1095
|
inputFocusEvent: { targetName: "partner-sdk-address-input" }
|
|
1095
|
-
}), U.length > 0 &&
|
|
1096
|
+
}), U.length > 0 && F.length > 0 && Z(!0);
|
|
1096
1097
|
}, xe = () => {
|
|
1097
1098
|
j.trackPlatform({
|
|
1098
1099
|
linkClickEvent: { targetName: "partner-sdk-manual-entry" }
|
|
@@ -1109,7 +1110,7 @@ function Oo({
|
|
|
1109
1110
|
}, Le = async () => {
|
|
1110
1111
|
if (!y.street1 || !y.city || !y.state || !y.postalCode) {
|
|
1111
1112
|
const w = "Please fill in all required fields";
|
|
1112
|
-
q(w),
|
|
1113
|
+
q(w), S == null || S(w);
|
|
1113
1114
|
return;
|
|
1114
1115
|
}
|
|
1115
1116
|
z(!0), q(null);
|
|
@@ -1228,8 +1229,8 @@ function Oo({
|
|
|
1228
1229
|
onClick: Le,
|
|
1229
1230
|
disabled: o,
|
|
1230
1231
|
children: [
|
|
1231
|
-
/* @__PURE__ */ t.jsx("span", { children:
|
|
1232
|
-
|
|
1232
|
+
/* @__PURE__ */ t.jsx("span", { children: m }),
|
|
1233
|
+
d || /* @__PURE__ */ t.jsx(ft, {})
|
|
1233
1234
|
]
|
|
1234
1235
|
}
|
|
1235
1236
|
)
|
|
@@ -1244,7 +1245,7 @@ function Oo({
|
|
|
1244
1245
|
{
|
|
1245
1246
|
ref: J,
|
|
1246
1247
|
type: "text",
|
|
1247
|
-
value:
|
|
1248
|
+
value: F,
|
|
1248
1249
|
onChange: B,
|
|
1249
1250
|
onFocus: le,
|
|
1250
1251
|
placeholder: i,
|
|
@@ -1253,19 +1254,19 @@ function Oo({
|
|
|
1253
1254
|
"aria-label": "Address input",
|
|
1254
1255
|
"aria-autocomplete": "list",
|
|
1255
1256
|
"aria-controls": "address-suggestions",
|
|
1256
|
-
"aria-expanded":
|
|
1257
|
+
"aria-expanded": $
|
|
1257
1258
|
}
|
|
1258
1259
|
),
|
|
1259
|
-
|
|
1260
|
+
u && /* @__PURE__ */ t.jsx("div", { className: O.inputIcon, children: u }),
|
|
1260
1261
|
f && /* @__PURE__ */ t.jsx(
|
|
1261
1262
|
"button",
|
|
1262
1263
|
{
|
|
1263
1264
|
className: O.button,
|
|
1264
1265
|
type: "button",
|
|
1265
1266
|
disabled: o,
|
|
1266
|
-
"aria-label":
|
|
1267
|
+
"aria-label": m,
|
|
1267
1268
|
children: ae ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1268
|
-
/* @__PURE__ */ t.jsx("span", { children:
|
|
1269
|
+
/* @__PURE__ */ t.jsx("span", { children: m }),
|
|
1269
1270
|
/* @__PURE__ */ t.jsxs(
|
|
1270
1271
|
"svg",
|
|
1271
1272
|
{
|
|
@@ -1300,24 +1301,24 @@ function Oo({
|
|
|
1300
1301
|
}
|
|
1301
1302
|
)
|
|
1302
1303
|
] }) : /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1303
|
-
/* @__PURE__ */ t.jsx("span", { children:
|
|
1304
|
-
|
|
1304
|
+
/* @__PURE__ */ t.jsx("span", { children: m }),
|
|
1305
|
+
d || /* @__PURE__ */ t.jsx(ft, {})
|
|
1305
1306
|
] })
|
|
1306
1307
|
}
|
|
1307
1308
|
)
|
|
1308
1309
|
]
|
|
1309
1310
|
}
|
|
1310
1311
|
),
|
|
1311
|
-
(
|
|
1312
|
+
($ || ve) && /* @__PURE__ */ t.jsx(
|
|
1312
1313
|
"div",
|
|
1313
1314
|
{
|
|
1314
1315
|
ref: N,
|
|
1315
1316
|
className: `${O.suggestions} ${ve ? O.errorState : ""}`,
|
|
1316
1317
|
id: "address-suggestions",
|
|
1317
|
-
role: ve &&
|
|
1318
|
-
"aria-live": ve &&
|
|
1318
|
+
role: ve && !$ ? "alert" : "listbox",
|
|
1319
|
+
"aria-live": ve && !$ ? "polite" : void 0,
|
|
1319
1320
|
children: ve ? /* @__PURE__ */ t.jsxs("div", { className: O.error, children: [
|
|
1320
|
-
/* @__PURE__ */ t.jsx("div", { className: O.errorIcon, children: /* @__PURE__ */ t.jsx(
|
|
1321
|
+
/* @__PURE__ */ t.jsx("div", { className: O.errorIcon, children: /* @__PURE__ */ t.jsx(Or, {}) }),
|
|
1321
1322
|
/* @__PURE__ */ t.jsx("div", { children: K })
|
|
1322
1323
|
] }) : U.length > 0 ? U.map((w, X) => /* @__PURE__ */ t.jsx(
|
|
1323
1324
|
"div",
|
|
@@ -1330,7 +1331,7 @@ function Oo({
|
|
|
1330
1331
|
onKeyDown: (ee) => {
|
|
1331
1332
|
(ee.key === "Enter" || ee.key === " ") && (ee.preventDefault(), M(w));
|
|
1332
1333
|
},
|
|
1333
|
-
children:
|
|
1334
|
+
children: mt(w)
|
|
1334
1335
|
},
|
|
1335
1336
|
`${w.street1}-${w.city}-${w.postalCode}-${X}`
|
|
1336
1337
|
)) : L && /* @__PURE__ */ t.jsx(
|
|
@@ -1339,66 +1340,66 @@ function Oo({
|
|
|
1339
1340
|
type: "button",
|
|
1340
1341
|
className: O.manualLink,
|
|
1341
1342
|
onClick: xe,
|
|
1342
|
-
children:
|
|
1343
|
+
children: h
|
|
1343
1344
|
}
|
|
1344
1345
|
)
|
|
1345
1346
|
}
|
|
1346
1347
|
)
|
|
1347
1348
|
] }),
|
|
1348
|
-
s && /* @__PURE__ */ t.jsx(
|
|
1349
|
+
s && /* @__PURE__ */ t.jsx(mr, {})
|
|
1349
1350
|
] });
|
|
1350
1351
|
}
|
|
1351
|
-
const
|
|
1352
|
-
container:
|
|
1353
|
-
title:
|
|
1354
|
-
addressCard:
|
|
1355
|
-
addressText:
|
|
1352
|
+
const Rr = "_container_rg8mk_3", Br = "_title_rg8mk_7", Mr = "_addressCard_rg8mk_16", Fr = "_addressText_rg8mk_26", $r = "_editLink_rg8mk_34", Wr = "_fieldGroup_rg8mk_47", Hr = "_fieldLabel_rg8mk_51", Vr = "_input_rg8mk_60", qr = "_checkboxRow_rg8mk_84", Gr = "_checkbox_rg8mk_84", Ur = "_checkboxLabel_rg8mk_101", Yr = "_error_rg8mk_108", Zr = "_actions_rg8mk_115", Kr = "_confirmButton_rg8mk_120", de = {
|
|
1353
|
+
container: Rr,
|
|
1354
|
+
title: Br,
|
|
1355
|
+
addressCard: Mr,
|
|
1356
|
+
addressText: Fr,
|
|
1356
1357
|
editLink: $r,
|
|
1357
|
-
fieldGroup:
|
|
1358
|
-
fieldLabel:
|
|
1359
|
-
input:
|
|
1360
|
-
checkboxRow:
|
|
1361
|
-
checkbox:
|
|
1362
|
-
checkboxLabel:
|
|
1363
|
-
error:
|
|
1364
|
-
actions:
|
|
1365
|
-
confirmButton:
|
|
1358
|
+
fieldGroup: Wr,
|
|
1359
|
+
fieldLabel: Hr,
|
|
1360
|
+
input: Vr,
|
|
1361
|
+
checkboxRow: qr,
|
|
1362
|
+
checkbox: Gr,
|
|
1363
|
+
checkboxLabel: Ur,
|
|
1364
|
+
error: Yr,
|
|
1365
|
+
actions: Zr,
|
|
1366
|
+
confirmButton: Kr
|
|
1366
1367
|
};
|
|
1367
|
-
function
|
|
1368
|
+
function zr(e) {
|
|
1368
1369
|
return `${e.street1 + (e.street2 ? ` ${e.street2}` : "")}, ${e.city}, ${e.state} ${e.postalCode}`;
|
|
1369
1370
|
}
|
|
1370
|
-
function
|
|
1371
|
+
function Bo({
|
|
1371
1372
|
address: e,
|
|
1372
1373
|
appearance: r,
|
|
1373
1374
|
onConfirm: a,
|
|
1374
1375
|
onEdit: s
|
|
1375
1376
|
}) {
|
|
1376
|
-
const o =
|
|
1377
|
-
if (!
|
|
1377
|
+
const o = ze(), m = Pe(r), f = It("partner-sdk-unit-input"), [d, u] = E(""), [h, p] = E(!1), [_, C] = E(null), S = () => {
|
|
1378
|
+
if (!h && !d.trim()) {
|
|
1378
1379
|
C("Please enter a unit number or select 'No unit number'");
|
|
1379
1380
|
return;
|
|
1380
1381
|
}
|
|
1381
1382
|
C(null), o.trackPlatform({
|
|
1382
1383
|
buttonClickEvent: { targetName: "partner-sdk-confirm-unit" }
|
|
1383
|
-
}), a(
|
|
1384
|
+
}), a(h ? { ...e } : { ...e, street2: d.trim() });
|
|
1384
1385
|
}, k = () => {
|
|
1385
1386
|
o.trackPlatform({
|
|
1386
1387
|
checkboxClickEvent: {
|
|
1387
1388
|
targetName: "partner-sdk-no-unit",
|
|
1388
|
-
optionName: String(!
|
|
1389
|
+
optionName: String(!h)
|
|
1389
1390
|
}
|
|
1390
|
-
}),
|
|
1391
|
+
}), p(!h), h || (u(""), C(null));
|
|
1391
1392
|
}, H = (Y) => {
|
|
1392
|
-
|
|
1393
|
+
u(Y.target.value), _ && C(null);
|
|
1393
1394
|
}, P = () => {
|
|
1394
1395
|
o.trackPlatform({
|
|
1395
1396
|
inputFocusEvent: { targetName: "partner-sdk-unit-input" }
|
|
1396
1397
|
});
|
|
1397
1398
|
};
|
|
1398
|
-
return /* @__PURE__ */ t.jsxs("div", { ref: f, style:
|
|
1399
|
+
return /* @__PURE__ */ t.jsxs("div", { ref: f, style: m, className: de.container, children: [
|
|
1399
1400
|
/* @__PURE__ */ t.jsx("h2", { className: de.title, children: "Confirm your home address" }),
|
|
1400
1401
|
/* @__PURE__ */ t.jsxs("div", { className: de.addressCard, children: [
|
|
1401
|
-
/* @__PURE__ */ t.jsx("span", { className: de.addressText, children:
|
|
1402
|
+
/* @__PURE__ */ t.jsx("span", { className: de.addressText, children: zr(e) }),
|
|
1402
1403
|
s && /* @__PURE__ */ t.jsx("button", { type: "button", className: de.editLink, onClick: s, children: "Edit" })
|
|
1403
1404
|
] }),
|
|
1404
1405
|
/* @__PURE__ */ t.jsxs("div", { className: de.fieldGroup, children: [
|
|
@@ -1410,10 +1411,10 @@ function Ro({
|
|
|
1410
1411
|
type: "text",
|
|
1411
1412
|
className: de.input,
|
|
1412
1413
|
placeholder: "#1234",
|
|
1413
|
-
value:
|
|
1414
|
+
value: d,
|
|
1414
1415
|
onChange: H,
|
|
1415
1416
|
onFocus: P,
|
|
1416
|
-
disabled:
|
|
1417
|
+
disabled: h
|
|
1417
1418
|
}
|
|
1418
1419
|
)
|
|
1419
1420
|
] }),
|
|
@@ -1423,60 +1424,60 @@ function Ro({
|
|
|
1423
1424
|
{
|
|
1424
1425
|
type: "checkbox",
|
|
1425
1426
|
className: de.checkbox,
|
|
1426
|
-
checked:
|
|
1427
|
+
checked: h,
|
|
1427
1428
|
onChange: k
|
|
1428
1429
|
}
|
|
1429
1430
|
),
|
|
1430
1431
|
/* @__PURE__ */ t.jsx("span", { className: de.checkboxLabel, children: "No unit number" })
|
|
1431
1432
|
] }),
|
|
1432
|
-
|
|
1433
|
+
_ && /* @__PURE__ */ t.jsx("p", { className: de.error, children: _ }),
|
|
1433
1434
|
/* @__PURE__ */ t.jsx("div", { className: de.actions, children: /* @__PURE__ */ t.jsx(
|
|
1434
1435
|
"button",
|
|
1435
1436
|
{
|
|
1436
1437
|
type: "button",
|
|
1437
1438
|
className: de.confirmButton,
|
|
1438
|
-
onClick:
|
|
1439
|
+
onClick: S,
|
|
1439
1440
|
children: "Confirm address"
|
|
1440
1441
|
}
|
|
1441
1442
|
) })
|
|
1442
1443
|
] });
|
|
1443
1444
|
}
|
|
1444
|
-
const
|
|
1445
|
-
function
|
|
1445
|
+
const Jr = "https://api.mapbox.com/geocoding/v5/mapbox.places", Xr = "https://api.mapbox.com/styles/v1/mapbox/light-v11/static", Qr = "pk.eyJ1Ijoib3BlbmRvb3IiLCJhIjoiWXJ2bTJiRSJ9.lsnjT9yTNyyVzKRIzqxnqg", en = "https://images.opendoor.com/source/s3/imgdrop-production/2026-02-1771546296495-06570.png?service=partner-sdk", tn = 640, rn = 320, nn = 14;
|
|
1446
|
+
function an(e, r, a) {
|
|
1446
1447
|
return e.startsWith("http://") || e.startsWith("https://") ? `url-${encodeURIComponent(e)}(${r},${a})` : `${e}(${r},${a})`;
|
|
1447
1448
|
}
|
|
1448
|
-
function
|
|
1449
|
-
const a = (r == null ? void 0 : r.mapboxAccessToken) ??
|
|
1449
|
+
function sn(e, r) {
|
|
1450
|
+
const a = (r == null ? void 0 : r.mapboxAccessToken) ?? Qr, s = (r == null ? void 0 : r.mapPinMarker) ?? en, o = (r == null ? void 0 : r.width) ?? tn, i = (r == null ? void 0 : r.height) ?? rn, m = (r == null ? void 0 : r.zoom) ?? nn, [f, d] = E(void 0), [u, h] = E("loading");
|
|
1450
1451
|
return se(() => {
|
|
1451
|
-
|
|
1452
|
-
const
|
|
1452
|
+
h("loading");
|
|
1453
|
+
const p = [
|
|
1453
1454
|
e.street1,
|
|
1454
1455
|
e.city,
|
|
1455
1456
|
e.state,
|
|
1456
1457
|
e.postalCode
|
|
1457
1458
|
].join(" ");
|
|
1458
|
-
let
|
|
1459
|
+
let _ = !1;
|
|
1459
1460
|
async function C() {
|
|
1460
|
-
var
|
|
1461
|
+
var S, k;
|
|
1461
1462
|
try {
|
|
1462
|
-
const H = `${
|
|
1463
|
-
if (!P.ok ||
|
|
1464
|
-
|
|
1463
|
+
const H = `${Jr}/${encodeURIComponent(p)}.json?access_token=${a}&limit=1`, P = await fetch(H);
|
|
1464
|
+
if (!P.ok || _) {
|
|
1465
|
+
_ || h("error");
|
|
1465
1466
|
return;
|
|
1466
1467
|
}
|
|
1467
|
-
const j = (k = (
|
|
1468
|
-
if (!j ||
|
|
1469
|
-
|
|
1468
|
+
const j = (k = (S = (await P.json()).features) == null ? void 0 : S[0]) == null ? void 0 : k.center;
|
|
1469
|
+
if (!j || _) {
|
|
1470
|
+
_ || h("error");
|
|
1470
1471
|
return;
|
|
1471
1472
|
}
|
|
1472
|
-
const [ne,
|
|
1473
|
-
|
|
1473
|
+
const [ne, F] = j, oe = an(s, ne, F), U = `${Xr}/${oe}/${ne},${F},${m}/${o}x${i}@2x?access_token=${a}&attribution=false&logo=false`;
|
|
1474
|
+
_ || d(U);
|
|
1474
1475
|
} catch {
|
|
1475
|
-
|
|
1476
|
+
_ || h("error");
|
|
1476
1477
|
}
|
|
1477
1478
|
}
|
|
1478
1479
|
return C(), () => {
|
|
1479
|
-
|
|
1480
|
+
_ = !0;
|
|
1480
1481
|
};
|
|
1481
1482
|
}, [
|
|
1482
1483
|
e.street1,
|
|
@@ -1487,71 +1488,71 @@ function an(e, r) {
|
|
|
1487
1488
|
s,
|
|
1488
1489
|
o,
|
|
1489
1490
|
i,
|
|
1490
|
-
|
|
1491
|
-
]), { url: f, status:
|
|
1491
|
+
m
|
|
1492
|
+
]), { url: f, status: u };
|
|
1492
1493
|
}
|
|
1493
|
-
const
|
|
1494
|
-
container:
|
|
1495
|
-
mapImage:
|
|
1496
|
-
mapImageLoaded:
|
|
1494
|
+
const on = "_container_1vap7_3", ln = "_mapImage_1vap7_13", cn = "_mapImageLoaded_1vap7_22", Ve = {
|
|
1495
|
+
container: on,
|
|
1496
|
+
mapImage: ln,
|
|
1497
|
+
mapImageLoaded: cn
|
|
1497
1498
|
};
|
|
1498
|
-
function
|
|
1499
|
+
function Mo({
|
|
1499
1500
|
address: e,
|
|
1500
1501
|
appearance: r,
|
|
1501
1502
|
mapboxAccessToken: a,
|
|
1502
1503
|
mapPinMarker: s,
|
|
1503
1504
|
width: o,
|
|
1504
1505
|
height: i,
|
|
1505
|
-
zoom:
|
|
1506
|
+
zoom: m,
|
|
1506
1507
|
borderRadius: f,
|
|
1507
|
-
onLoad:
|
|
1508
|
-
onError:
|
|
1508
|
+
onLoad: d,
|
|
1509
|
+
onError: u
|
|
1509
1510
|
}) {
|
|
1510
|
-
const
|
|
1511
|
+
const h = Pe(r), { url: p, status: _ } = sn(e, {
|
|
1511
1512
|
mapboxAccessToken: a,
|
|
1512
1513
|
mapPinMarker: s,
|
|
1513
1514
|
width: o,
|
|
1514
1515
|
height: i,
|
|
1515
|
-
zoom:
|
|
1516
|
-
}), [C,
|
|
1517
|
-
k.current =
|
|
1518
|
-
const H = G(
|
|
1519
|
-
H.current =
|
|
1516
|
+
zoom: m
|
|
1517
|
+
}), [C, S] = E(!1), k = G(d);
|
|
1518
|
+
k.current = d;
|
|
1519
|
+
const H = G(u);
|
|
1520
|
+
H.current = u, se(() => {
|
|
1520
1521
|
var j;
|
|
1521
|
-
|
|
1522
|
-
}, [
|
|
1522
|
+
_ === "error" && ((j = H.current) == null || j.call(H, new Error("Failed to load map for address")));
|
|
1523
|
+
}, [_]);
|
|
1523
1524
|
const P = () => {
|
|
1524
1525
|
var j;
|
|
1525
|
-
|
|
1526
|
+
S(!0), (j = k.current) == null || j.call(k);
|
|
1526
1527
|
}, Y = {
|
|
1527
|
-
...
|
|
1528
|
+
...h,
|
|
1528
1529
|
...f ? { borderRadius: f } : {}
|
|
1529
1530
|
};
|
|
1530
|
-
return /* @__PURE__ */ t.jsx("div", { className: Ve.container, style: Y, children:
|
|
1531
|
+
return /* @__PURE__ */ t.jsx("div", { className: Ve.container, style: Y, children: p && /* @__PURE__ */ t.jsx(
|
|
1531
1532
|
"img",
|
|
1532
1533
|
{
|
|
1533
|
-
src:
|
|
1534
|
+
src: p,
|
|
1534
1535
|
alt: "Map",
|
|
1535
1536
|
className: `${Ve.mapImage} ${C ? Ve.mapImageLoaded : ""}`.trim(),
|
|
1536
1537
|
onLoad: P
|
|
1537
1538
|
}
|
|
1538
1539
|
) });
|
|
1539
1540
|
}
|
|
1540
|
-
function
|
|
1541
|
+
function un(e) {
|
|
1541
1542
|
return "field" in e;
|
|
1542
1543
|
}
|
|
1543
|
-
function
|
|
1544
|
+
function dn(e) {
|
|
1544
1545
|
return "and" in e;
|
|
1545
1546
|
}
|
|
1546
|
-
function
|
|
1547
|
+
function hn(e) {
|
|
1547
1548
|
return "or" in e;
|
|
1548
1549
|
}
|
|
1549
|
-
function
|
|
1550
|
-
if (un(e))
|
|
1551
|
-
return e.and.every((a) => De(a, r));
|
|
1550
|
+
function Ae(e, r) {
|
|
1552
1551
|
if (dn(e))
|
|
1553
|
-
return e.
|
|
1554
|
-
if (
|
|
1552
|
+
return e.and.every((a) => Ae(a, r));
|
|
1553
|
+
if (hn(e))
|
|
1554
|
+
return e.or.some((a) => Ae(a, r));
|
|
1555
|
+
if (un(e)) {
|
|
1555
1556
|
const a = r(e.field);
|
|
1556
1557
|
switch (e.op) {
|
|
1557
1558
|
case "eq":
|
|
@@ -1574,11 +1575,11 @@ function De(e, r) {
|
|
|
1574
1575
|
}
|
|
1575
1576
|
return !1;
|
|
1576
1577
|
}
|
|
1577
|
-
function
|
|
1578
|
-
return e.questions.filter((a) => !a.showWhen ||
|
|
1578
|
+
function Ue(e, r) {
|
|
1579
|
+
return e.questions.filter((a) => !a.showWhen || Ae(a.showWhen, r));
|
|
1579
1580
|
}
|
|
1580
|
-
function
|
|
1581
|
-
return e.filter((a) => !a.showWhen ||
|
|
1581
|
+
function pt(e, r) {
|
|
1582
|
+
return e.filter((a) => !a.showWhen || Ae(a.showWhen, r));
|
|
1582
1583
|
}
|
|
1583
1584
|
function fn(e, r) {
|
|
1584
1585
|
const a = typeof r == "string" && r.trim() === "";
|
|
@@ -1599,11 +1600,11 @@ function fn(e, r) {
|
|
|
1599
1600
|
return e.validate(r);
|
|
1600
1601
|
}
|
|
1601
1602
|
}
|
|
1602
|
-
function
|
|
1603
|
-
const a = {}, s =
|
|
1603
|
+
function gt(e, r) {
|
|
1604
|
+
const a = {}, s = Ue(e, r);
|
|
1604
1605
|
for (const o of s) {
|
|
1605
|
-
const i = r(o.key),
|
|
1606
|
-
|
|
1606
|
+
const i = r(o.key), m = fn(o, i);
|
|
1607
|
+
m && (a[o.key] = m);
|
|
1607
1608
|
}
|
|
1608
1609
|
return {
|
|
1609
1610
|
valid: Object.keys(a).length === 0,
|
|
@@ -1622,7 +1623,7 @@ class mn {
|
|
|
1622
1623
|
* conditions and the partner-supplied `skipPages` allowlist.
|
|
1623
1624
|
*/
|
|
1624
1625
|
get visiblePages() {
|
|
1625
|
-
const r =
|
|
1626
|
+
const r = pt(this._allPages, this.getAnswer);
|
|
1626
1627
|
return this._skipPages.size === 0 ? r : r.filter((a) => !this._skipPages.has(a.id));
|
|
1627
1628
|
}
|
|
1628
1629
|
/** The current page, or undefined if no pages are visible. */
|
|
@@ -1669,7 +1670,7 @@ class mn {
|
|
|
1669
1670
|
const { [r]: s, ...o } = this._validationErrors;
|
|
1670
1671
|
this._validationErrors = o;
|
|
1671
1672
|
}
|
|
1672
|
-
this.emit({ type: "answerChange", key: r, value: a }), this.recoverIfCurrentPageHidden();
|
|
1673
|
+
this.pruneAnswersForHiddenQuestions(), this.emit({ type: "answerChange", key: r, value: a }), this.recoverIfCurrentPageHidden();
|
|
1673
1674
|
}
|
|
1674
1675
|
/**
|
|
1675
1676
|
* Set multiple answers at once (e.g., for initial data prefill).
|
|
@@ -1682,6 +1683,7 @@ class mn {
|
|
|
1682
1683
|
const { [s]: o, ...i } = this._validationErrors;
|
|
1683
1684
|
this._validationErrors = i;
|
|
1684
1685
|
}
|
|
1686
|
+
this.pruneAnswersForHiddenQuestions();
|
|
1685
1687
|
const a = Object.keys(r);
|
|
1686
1688
|
if (a.length > 0) {
|
|
1687
1689
|
const s = a[a.length - 1];
|
|
@@ -1705,7 +1707,7 @@ class mn {
|
|
|
1705
1707
|
const r = this.currentPage;
|
|
1706
1708
|
if (!r)
|
|
1707
1709
|
return { valid: !1, errors: { _page: "No current page" } };
|
|
1708
|
-
const a =
|
|
1710
|
+
const a = gt(r, this.getAnswer);
|
|
1709
1711
|
if (!a.valid)
|
|
1710
1712
|
return this._validationErrors = a.errors, this.emit({ type: "validationError", errors: a.errors }), a;
|
|
1711
1713
|
if (this._validationErrors = {}, this.isLastPage)
|
|
@@ -1744,14 +1746,14 @@ class mn {
|
|
|
1744
1746
|
*/
|
|
1745
1747
|
validate() {
|
|
1746
1748
|
const r = this.currentPage;
|
|
1747
|
-
return r ?
|
|
1749
|
+
return r ? gt(r, this.getAnswer) : { valid: !1, errors: { _page: "No current page" } };
|
|
1748
1750
|
}
|
|
1749
1751
|
/**
|
|
1750
1752
|
* Get visible questions on the current page (filtered by showWhen).
|
|
1751
1753
|
*/
|
|
1752
1754
|
getVisibleQuestionsForCurrentPage() {
|
|
1753
1755
|
const r = this.currentPage;
|
|
1754
|
-
return r ?
|
|
1756
|
+
return r ? Ue(r, this.getAnswer) : [];
|
|
1755
1757
|
}
|
|
1756
1758
|
// ── Events ────────────────────────────────────────────────────────────────
|
|
1757
1759
|
/**
|
|
@@ -1776,6 +1778,38 @@ class mn {
|
|
|
1776
1778
|
for (const s of a)
|
|
1777
1779
|
s(r);
|
|
1778
1780
|
}
|
|
1781
|
+
/**
|
|
1782
|
+
* Delete answers belonging to questions hidden by a `showWhen` condition —
|
|
1783
|
+
* either on the question itself or on its page. Prevents stale follow-up
|
|
1784
|
+
* answers (e.g., the "describe your relationship" text typed before the
|
|
1785
|
+
* seller backtracked from "Other" to "Self") from being submitted alongside
|
|
1786
|
+
* the new answer.
|
|
1787
|
+
*
|
|
1788
|
+
* Answers for pages in the partner-supplied `skipPages` set are preserved
|
|
1789
|
+
* unconditionally — partners use `initialAnswers` together with `skipPages`
|
|
1790
|
+
* to inject answers for questions their UI never shows, and the engine
|
|
1791
|
+
* must not delete those.
|
|
1792
|
+
*/
|
|
1793
|
+
pruneAnswersForHiddenQuestions() {
|
|
1794
|
+
const r = pt(this._allPages, this.getAnswer), a = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set();
|
|
1795
|
+
for (const m of this._allPages) {
|
|
1796
|
+
for (const u of m.questions)
|
|
1797
|
+
a.add(u.key);
|
|
1798
|
+
if (this._skipPages.has(m.id)) {
|
|
1799
|
+
for (const u of m.questions)
|
|
1800
|
+
s.add(u.key);
|
|
1801
|
+
continue;
|
|
1802
|
+
}
|
|
1803
|
+
if (r.some((u) => u.id === m.id))
|
|
1804
|
+
for (const u of Ue(m, this.getAnswer))
|
|
1805
|
+
s.add(u.key);
|
|
1806
|
+
}
|
|
1807
|
+
let o = !1;
|
|
1808
|
+
const i = {};
|
|
1809
|
+
for (const [m, f] of Object.entries(this._answers))
|
|
1810
|
+
!a.has(m) || s.has(m) ? i[m] = f : o = !0;
|
|
1811
|
+
o && (this._answers = i);
|
|
1812
|
+
}
|
|
1779
1813
|
/**
|
|
1780
1814
|
* If the current page became hidden (answer change removed it from visible pages),
|
|
1781
1815
|
* auto-correct to the nearest visible page. Emits pageChange if corrected.
|
|
@@ -1787,7 +1821,7 @@ class mn {
|
|
|
1787
1821
|
const a = this._allPages.findIndex((o) => o.id === this._currentPageId);
|
|
1788
1822
|
let s = r[0];
|
|
1789
1823
|
for (const o of r)
|
|
1790
|
-
this._allPages.findIndex((
|
|
1824
|
+
this._allPages.findIndex((m) => m.id === o.id) <= a && (s = o);
|
|
1791
1825
|
this._currentPageId = s.id, this.emit({
|
|
1792
1826
|
type: "pageChange",
|
|
1793
1827
|
pageIndex: this.currentPageIndex,
|
|
@@ -1796,7 +1830,7 @@ class mn {
|
|
|
1796
1830
|
}
|
|
1797
1831
|
}
|
|
1798
1832
|
const pn = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
1799
|
-
function
|
|
1833
|
+
function St(e) {
|
|
1800
1834
|
if (typeof e == "string" && !pn.test(e))
|
|
1801
1835
|
return "Please enter a valid email address";
|
|
1802
1836
|
}
|
|
@@ -2012,11 +2046,34 @@ const _n = {
|
|
|
2012
2046
|
autoAdvance: !0,
|
|
2013
2047
|
options: [
|
|
2014
2048
|
{ label: "Yes, I own this home", value: "self" },
|
|
2015
|
-
{ label: "No, I'm an agent", value: "agent" }
|
|
2049
|
+
{ label: "No, I'm an agent", value: "agent" },
|
|
2050
|
+
{
|
|
2051
|
+
label: "I'm an agent, and I own this home",
|
|
2052
|
+
value: "agent_and_owner"
|
|
2053
|
+
},
|
|
2054
|
+
{ label: "Other", value: "other" }
|
|
2016
2055
|
]
|
|
2017
2056
|
}
|
|
2018
2057
|
]
|
|
2019
2058
|
}, yn = {
|
|
2059
|
+
id: "ownership-other",
|
|
2060
|
+
title: "Describe your relationship to this home",
|
|
2061
|
+
showWhen: {
|
|
2062
|
+
field: "seller.relation_to_owner",
|
|
2063
|
+
op: "eq",
|
|
2064
|
+
value: "other"
|
|
2065
|
+
},
|
|
2066
|
+
questions: [
|
|
2067
|
+
{
|
|
2068
|
+
key: "seller.relation_to_owner.other",
|
|
2069
|
+
label: "Relationship",
|
|
2070
|
+
type: "string",
|
|
2071
|
+
style: "input",
|
|
2072
|
+
required: !0,
|
|
2073
|
+
placeholder: "e.g., executor of the estate"
|
|
2074
|
+
}
|
|
2075
|
+
]
|
|
2076
|
+
}, vn = {
|
|
2020
2077
|
id: "sale-timeline",
|
|
2021
2078
|
title: "When do you need to sell your home?",
|
|
2022
2079
|
subtitle: "This won't affect your offer. We're here to help with any timeline.",
|
|
@@ -2037,13 +2094,13 @@ const _n = {
|
|
|
2037
2094
|
]
|
|
2038
2095
|
}
|
|
2039
2096
|
]
|
|
2040
|
-
},
|
|
2097
|
+
}, xn = [
|
|
2041
2098
|
"fixer_upper",
|
|
2042
2099
|
"dated",
|
|
2043
2100
|
"standard",
|
|
2044
2101
|
"high_end",
|
|
2045
2102
|
"luxury"
|
|
2046
|
-
],
|
|
2103
|
+
], Cn = {
|
|
2047
2104
|
kitchen: {
|
|
2048
2105
|
fixer_upper: "Kitchen needs significant repairs",
|
|
2049
2106
|
dated: "Kitchen hasn't been updated recently",
|
|
@@ -2072,7 +2129,7 @@ const _n = {
|
|
|
2072
2129
|
high_end: "Exterior has high-quality upgrades",
|
|
2073
2130
|
luxury: "Exterior has elegant, top-tier finishes"
|
|
2074
2131
|
}
|
|
2075
|
-
},
|
|
2132
|
+
}, wn = {
|
|
2076
2133
|
fixer_upper: "Fixer upper",
|
|
2077
2134
|
dated: "Dated",
|
|
2078
2135
|
standard: "Standard",
|
|
@@ -2092,17 +2149,17 @@ function Oe(e, r, a) {
|
|
|
2092
2149
|
style: "image-card",
|
|
2093
2150
|
required: !0,
|
|
2094
2151
|
autoAdvance: !0,
|
|
2095
|
-
options:
|
|
2096
|
-
label:
|
|
2152
|
+
options: xn.map((s) => ({
|
|
2153
|
+
label: wn[s],
|
|
2097
2154
|
value: s,
|
|
2098
|
-
description:
|
|
2155
|
+
description: Cn[e][s],
|
|
2099
2156
|
imageId: `${e}-${s}`
|
|
2100
2157
|
}))
|
|
2101
2158
|
}
|
|
2102
2159
|
]
|
|
2103
2160
|
};
|
|
2104
2161
|
}
|
|
2105
|
-
const
|
|
2162
|
+
const kn = Oe("kitchen", "home.kitchen_seller_score", "How would you describe your kitchen?"), jn = Oe("bathroom", "home.bathroom_seller_score", "How would you describe your main bathroom?"), Nn = Oe("living-room", "home.living_room_seller_score", "How would you describe your living room?"), In = Oe("exterior", "home.exterior_seller_score", "How would you describe your home's exterior?"), Sn = {
|
|
2106
2163
|
id: "hoa",
|
|
2107
2164
|
title: "Is your home part of a homeowners association?",
|
|
2108
2165
|
subtitle: "This is often called an HOA. It's a group that helps maintain your community for a fee.",
|
|
@@ -2141,7 +2198,7 @@ const wn = Oe("kitchen", "home.kitchen_seller_score", "How would you describe yo
|
|
|
2141
2198
|
]
|
|
2142
2199
|
}
|
|
2143
2200
|
]
|
|
2144
|
-
},
|
|
2201
|
+
}, Pn = {
|
|
2145
2202
|
id: "hoa-guard",
|
|
2146
2203
|
title: "Is there a guard at the entrance?",
|
|
2147
2204
|
showWhen: {
|
|
@@ -2164,7 +2221,7 @@ const wn = Oe("kitchen", "home.kitchen_seller_score", "How would you describe yo
|
|
|
2164
2221
|
]
|
|
2165
2222
|
}
|
|
2166
2223
|
]
|
|
2167
|
-
},
|
|
2224
|
+
}, Ln = {
|
|
2168
2225
|
id: "hoa-fees",
|
|
2169
2226
|
title: "What are your monthly HOA fees?",
|
|
2170
2227
|
subtitle: "(Optional) This helps us better understand your property's monthly expenses.",
|
|
@@ -2179,7 +2236,7 @@ const wn = Oe("kitchen", "home.kitchen_seller_score", "How would you describe yo
|
|
|
2179
2236
|
min: 0
|
|
2180
2237
|
}
|
|
2181
2238
|
]
|
|
2182
|
-
},
|
|
2239
|
+
}, Tn = {
|
|
2183
2240
|
id: "eligibility-criteria",
|
|
2184
2241
|
title: "Do any of these apply to your home?",
|
|
2185
2242
|
subtitle: "Select all that apply. We keep an eye out for these things when making an offer.",
|
|
@@ -2234,7 +2291,7 @@ const wn = Oe("kitchen", "home.kitchen_seller_score", "How would you describe yo
|
|
|
2234
2291
|
]
|
|
2235
2292
|
}
|
|
2236
2293
|
]
|
|
2237
|
-
},
|
|
2294
|
+
}, An = {
|
|
2238
2295
|
id: "upgrades",
|
|
2239
2296
|
title: "Has your home had any upgrades?",
|
|
2240
2297
|
subtitle: "This includes renovations, remodels, or major improvements.",
|
|
@@ -2270,7 +2327,7 @@ const wn = Oe("kitchen", "home.kitchen_seller_score", "How would you describe yo
|
|
|
2270
2327
|
]
|
|
2271
2328
|
}
|
|
2272
2329
|
]
|
|
2273
|
-
},
|
|
2330
|
+
}, On = {
|
|
2274
2331
|
id: "homebuilder-name",
|
|
2275
2332
|
title: "Which homebuilder are you working with?",
|
|
2276
2333
|
showWhen: {
|
|
@@ -2289,7 +2346,7 @@ const wn = Oe("kitchen", "home.kitchen_seller_score", "How would you describe yo
|
|
|
2289
2346
|
placeholder: "Select or search..."
|
|
2290
2347
|
}
|
|
2291
2348
|
]
|
|
2292
|
-
},
|
|
2349
|
+
}, Rn = {
|
|
2293
2350
|
id: "homebuilder-details",
|
|
2294
2351
|
title: "Please tell us more about your homebuilder",
|
|
2295
2352
|
showWhen: {
|
|
@@ -2305,7 +2362,7 @@ const wn = Oe("kitchen", "home.kitchen_seller_score", "How would you describe yo
|
|
|
2305
2362
|
style: "email",
|
|
2306
2363
|
required: !1,
|
|
2307
2364
|
placeholder: "you@example.com",
|
|
2308
|
-
validate:
|
|
2365
|
+
validate: St
|
|
2309
2366
|
},
|
|
2310
2367
|
{
|
|
2311
2368
|
key: "seller.home_builder_community",
|
|
@@ -2316,7 +2373,7 @@ const wn = Oe("kitchen", "home.kitchen_seller_score", "How would you describe yo
|
|
|
2316
2373
|
placeholder: "Community name"
|
|
2317
2374
|
}
|
|
2318
2375
|
]
|
|
2319
|
-
},
|
|
2376
|
+
}, Bn = {
|
|
2320
2377
|
id: "contact-info",
|
|
2321
2378
|
title: "You're one step from your offer.",
|
|
2322
2379
|
subtitle: "Create a free account to see your offer. No commitment to sell — just your number, email, and name.",
|
|
@@ -2337,7 +2394,7 @@ const wn = Oe("kitchen", "home.kitchen_seller_score", "How would you describe yo
|
|
|
2337
2394
|
style: "email",
|
|
2338
2395
|
required: !0,
|
|
2339
2396
|
placeholder: "you@example.com",
|
|
2340
|
-
validate:
|
|
2397
|
+
validate: St
|
|
2341
2398
|
},
|
|
2342
2399
|
{
|
|
2343
2400
|
key: "seller.phone_number",
|
|
@@ -2356,71 +2413,72 @@ const wn = Oe("kitchen", "home.kitchen_seller_score", "How would you describe yo
|
|
|
2356
2413
|
required: !1
|
|
2357
2414
|
}
|
|
2358
2415
|
]
|
|
2359
|
-
},
|
|
2416
|
+
}, Mn = [
|
|
2360
2417
|
_n,
|
|
2361
2418
|
bn,
|
|
2362
2419
|
yn,
|
|
2363
|
-
|
|
2420
|
+
vn,
|
|
2364
2421
|
kn,
|
|
2365
2422
|
jn,
|
|
2366
2423
|
Nn,
|
|
2367
2424
|
In,
|
|
2368
|
-
En,
|
|
2369
2425
|
Sn,
|
|
2426
|
+
En,
|
|
2370
2427
|
Pn,
|
|
2371
2428
|
Ln,
|
|
2372
2429
|
Tn,
|
|
2373
|
-
Dn,
|
|
2374
2430
|
An,
|
|
2431
|
+
Dn,
|
|
2375
2432
|
On,
|
|
2376
|
-
Rn
|
|
2433
|
+
Rn,
|
|
2434
|
+
Bn
|
|
2377
2435
|
];
|
|
2378
|
-
function
|
|
2379
|
-
return new mn(
|
|
2436
|
+
function _t(e) {
|
|
2437
|
+
return new mn(Mn, e);
|
|
2380
2438
|
}
|
|
2381
|
-
const Et =
|
|
2439
|
+
const Et = Ye(null);
|
|
2382
2440
|
function fe() {
|
|
2383
|
-
const e =
|
|
2441
|
+
const e = De(Et);
|
|
2384
2442
|
if (!e)
|
|
2385
2443
|
throw new Error(
|
|
2386
2444
|
"useDtc must be used within a <DtcOnboardingFlow> component"
|
|
2387
2445
|
);
|
|
2388
2446
|
return e;
|
|
2389
2447
|
}
|
|
2390
|
-
const
|
|
2448
|
+
const Fn = ({
|
|
2391
2449
|
initialAnswers: e,
|
|
2392
2450
|
skipPages: r,
|
|
2393
2451
|
smsConsentText: a,
|
|
2394
2452
|
contactConsentText: s,
|
|
2395
2453
|
onSubmit: o,
|
|
2396
2454
|
onPageChange: i,
|
|
2397
|
-
onAnswerChange:
|
|
2455
|
+
onAnswerChange: m,
|
|
2398
2456
|
onReady: f,
|
|
2399
|
-
onError:
|
|
2400
|
-
children:
|
|
2457
|
+
onError: d,
|
|
2458
|
+
children: u
|
|
2401
2459
|
}) => {
|
|
2402
2460
|
var v;
|
|
2403
|
-
const
|
|
2404
|
-
|
|
2405
|
-
const
|
|
2406
|
-
|
|
2407
|
-
const
|
|
2408
|
-
|
|
2461
|
+
const h = G(o);
|
|
2462
|
+
h.current = o;
|
|
2463
|
+
const p = G(i);
|
|
2464
|
+
p.current = i;
|
|
2465
|
+
const _ = G(m);
|
|
2466
|
+
_.current = m;
|
|
2409
2467
|
const C = G(f);
|
|
2410
2468
|
C.current = f;
|
|
2411
|
-
const
|
|
2412
|
-
|
|
2413
|
-
const [k, H] =
|
|
2414
|
-
() =>
|
|
2469
|
+
const S = G(d);
|
|
2470
|
+
S.current = d;
|
|
2471
|
+
const [k, H] = E(
|
|
2472
|
+
() => _t({ initialAnswers: e, skipPages: r })
|
|
2415
2473
|
), P = (r ?? []).join("|"), Y = G(P);
|
|
2416
2474
|
se(() => {
|
|
2417
|
-
P !== Y.current && (Y.current = P, H(
|
|
2475
|
+
P !== Y.current && (Y.current = P, H(_t({ initialAnswers: e, skipPages: r })));
|
|
2418
2476
|
}, [P]);
|
|
2419
|
-
const [j, ne] =
|
|
2477
|
+
const [j, ne] = E(
|
|
2420
2478
|
k.answers
|
|
2421
|
-
), [
|
|
2479
|
+
), [F, oe] = E(
|
|
2422
2480
|
((v = k.currentPage) == null ? void 0 : v.id) ?? ""
|
|
2423
|
-
), [U,
|
|
2481
|
+
), [U, A] = E({}), [$, Z] = E(
|
|
2424
2482
|
k.visiblePages
|
|
2425
2483
|
);
|
|
2426
2484
|
se(() => {
|
|
@@ -2428,17 +2486,17 @@ const Mn = ({
|
|
|
2428
2486
|
const x = [
|
|
2429
2487
|
k.on("answerChange", (R) => {
|
|
2430
2488
|
var J;
|
|
2431
|
-
ne(k.answers), Z([...k.visiblePages]), R.type === "answerChange" && ((J =
|
|
2489
|
+
ne(k.answers), Z([...k.visiblePages]), R.type === "answerChange" && ((J = _.current) == null || J.call(_, R.key, R.value));
|
|
2432
2490
|
}),
|
|
2433
2491
|
k.on("pageChange", (R) => {
|
|
2434
2492
|
var J;
|
|
2435
|
-
R.type === "pageChange" && (oe(R.pageId), Z([...k.visiblePages]),
|
|
2493
|
+
R.type === "pageChange" && (oe(R.pageId), Z([...k.visiblePages]), A({}), (J = p.current) == null || J.call(p, R.pageIndex, R.pageId));
|
|
2436
2494
|
}),
|
|
2437
2495
|
k.on("validationError", (R) => {
|
|
2438
|
-
R.type === "validationError" &&
|
|
2496
|
+
R.type === "validationError" && A(R.errors);
|
|
2439
2497
|
}),
|
|
2440
2498
|
k.on("submit", (R) => {
|
|
2441
|
-
R.type === "submit" &&
|
|
2499
|
+
R.type === "submit" && h.current(R.answers);
|
|
2442
2500
|
})
|
|
2443
2501
|
];
|
|
2444
2502
|
return (y = C.current) == null || y.call(C), () => {
|
|
@@ -2449,25 +2507,25 @@ const Mn = ({
|
|
|
2449
2507
|
se(() => {
|
|
2450
2508
|
e && e !== ae.current && (ae.current = e, k.setAnswers(e));
|
|
2451
2509
|
}, [e, k]);
|
|
2452
|
-
const z =
|
|
2453
|
-
const x =
|
|
2510
|
+
const z = Se(() => {
|
|
2511
|
+
const x = $.findIndex((y) => y.id === F);
|
|
2454
2512
|
return x >= 0 ? x : 0;
|
|
2455
|
-
}, [F
|
|
2513
|
+
}, [$, F]), K = $[z], q = Se(() => F ? k.getVisibleQuestionsForCurrentPage() : [], [k, F, j]), ie = Se(() => $.length <= 1 ? 0 : Math.min(
|
|
2456
2514
|
1,
|
|
2457
|
-
Math.max(0, z / (
|
|
2458
|
-
), [z,
|
|
2515
|
+
Math.max(0, z / ($.length - 1))
|
|
2516
|
+
), [z, $.length]), ue = Se(
|
|
2459
2517
|
() => ({
|
|
2460
2518
|
engine: k,
|
|
2461
2519
|
currentPage: K,
|
|
2462
2520
|
currentPageIndex: z,
|
|
2463
|
-
visiblePages:
|
|
2521
|
+
visiblePages: $,
|
|
2464
2522
|
visibleQuestions: q,
|
|
2465
2523
|
answers: j,
|
|
2466
2524
|
validationErrors: U,
|
|
2467
2525
|
progress: ie,
|
|
2468
2526
|
isFirstPage: z === 0,
|
|
2469
2527
|
contactConsentText: s,
|
|
2470
|
-
isLastPage:
|
|
2528
|
+
isLastPage: $.length > 0 && z === $.length - 1,
|
|
2471
2529
|
setAnswer: (x, y) => k.setAnswer(x, y),
|
|
2472
2530
|
getAnswer: k.getAnswer,
|
|
2473
2531
|
goToNext: () => {
|
|
@@ -2475,8 +2533,8 @@ const Mn = ({
|
|
|
2475
2533
|
const x = k.goToNext();
|
|
2476
2534
|
if (!x.valid)
|
|
2477
2535
|
try {
|
|
2478
|
-
(y =
|
|
2479
|
-
|
|
2536
|
+
(y = S.current) == null || y.call(
|
|
2537
|
+
S,
|
|
2480
2538
|
new Error(
|
|
2481
2539
|
`Validation failed: ${Object.values(x.errors).join(", ")}`
|
|
2482
2540
|
)
|
|
@@ -2492,7 +2550,7 @@ const Mn = ({
|
|
|
2492
2550
|
k,
|
|
2493
2551
|
K,
|
|
2494
2552
|
z,
|
|
2495
|
-
|
|
2553
|
+
$,
|
|
2496
2554
|
q,
|
|
2497
2555
|
j,
|
|
2498
2556
|
U,
|
|
@@ -2501,78 +2559,78 @@ const Mn = ({
|
|
|
2501
2559
|
s
|
|
2502
2560
|
]
|
|
2503
2561
|
);
|
|
2504
|
-
return /* @__PURE__ */ t.jsx(Et.Provider, { value: ue, children:
|
|
2505
|
-
}, $n = "_container_uharh_7",
|
|
2562
|
+
return /* @__PURE__ */ t.jsx(Et.Provider, { value: ue, children: u });
|
|
2563
|
+
}, $n = "_container_uharh_7", Wn = "_header_uharh_20", Hn = "_headerLogos_uharh_30", Vn = "_headerPartnerLogo_uharh_36", qn = "_headerOpendoorLogo_uharh_42", Gn = "_headerCloseButton_uharh_46", Un = "_layout_uharh_71", Yn = "_layoutScrollable_uharh_78", Zn = "_addressBar_uharh_94", Kn = "_addressIcon_uharh_102", zn = "_addressText_uharh_106", Jn = "_contentSplit_uharh_112", Xn = "_contentLeft_uharh_126", Qn = "_contentRight_uharh_132", ea = "_pageTitle_uharh_148", ta = "_pageSubtitle_uharh_156", ra = "_pageContent_uharh_165", na = "_navigation_uharh_173", aa = "_navigationButtons_uharh_187", sa = "_backButton_uharh_193", oa = "_nextButton_uharh_216", ia = "_progressBar_uharh_242", la = "_progressBarFill_uharh_249", ca = "_radioCardGroup_uharh_257", ua = "_radioCard_uharh_257", da = "_radioCardSelected_uharh_289", ha = "_radioCardLabel_uharh_294", fa = "_radioCardDescription_uharh_300", ma = "_imageCardGroup_uharh_307", pa = "_imageCard_uharh_307", ga = "_imageCardSelected_uharh_339", _a = "_imageCardPhoto_uharh_344", ba = "_imageCardLabel_uharh_351", ya = "_imageCardDescription_uharh_358", va = "_fieldGroup_uharh_367", xa = "_fieldLabel_uharh_373", Ca = "_fieldDescription_uharh_380", wa = "_fieldSelect_uharh_387", ka = "_fieldSelectError_uharh_413", ja = "_fieldInputWrapper_uharh_417", Na = "_fieldInput_uharh_417", Ia = "_fieldInputError_uharh_455", Sa = "_fieldSuffix_uharh_459", Ea = "_fieldError_uharh_470", Pa = "_checkboxCardGroup_uharh_479", La = "_checkboxCard_uharh_479", Ta = "_checkboxCardSelected_uharh_511", Aa = "_checkboxCardContent_uharh_516", Da = "_checkboxCardLabel_uharh_523", Oa = "_checkboxCardHelper_uharh_529", Ra = "_checkboxIndicator_uharh_534", Ba = "_checkboxIndicatorChecked_uharh_546", Ma = "_currencyWrapper_uharh_554", Fa = "_currencyPrefix_uharh_560", $a = "_currencyInput_uharh_569", Wa = "_consentText_uharh_589", Ha = "_consentLink_uharh_597", Va = "_ctaButton_uharh_602", qa = "_toggleGroup_uharh_634", Ga = "_toggleLabel_uharh_638", Ua = "_toggleCheckbox_uharh_646", Ya = "_toggleText_uharh_655", Za = "_searchableDropdown_uharh_663", Ka = "_searchableDropdownToggle_uharh_673", za = "_searchableDropdownList_uharh_686", Ja = "_searchableDropdownOption_uharh_695", Xa = "_searchableDropdownOptionSelected_uharh_713", Qa = "_searchableDropdownOptionHighlighted_uharh_718", es = "_searchableDropdownEmpty_uharh_722", l = {
|
|
2506
2564
|
container: $n,
|
|
2507
|
-
header:
|
|
2508
|
-
headerLogos:
|
|
2509
|
-
headerPartnerLogo:
|
|
2510
|
-
headerOpendoorLogo:
|
|
2511
|
-
headerCloseButton:
|
|
2512
|
-
layout:
|
|
2513
|
-
layoutScrollable:
|
|
2514
|
-
addressBar:
|
|
2515
|
-
addressIcon:
|
|
2516
|
-
addressText:
|
|
2517
|
-
contentSplit:
|
|
2518
|
-
contentLeft:
|
|
2519
|
-
contentRight:
|
|
2520
|
-
pageTitle:
|
|
2521
|
-
pageSubtitle:
|
|
2522
|
-
pageContent:
|
|
2523
|
-
navigation:
|
|
2524
|
-
navigationButtons:
|
|
2525
|
-
backButton:
|
|
2526
|
-
nextButton:
|
|
2527
|
-
progressBar:
|
|
2528
|
-
progressBarFill:
|
|
2529
|
-
radioCardGroup:
|
|
2530
|
-
radioCard:
|
|
2531
|
-
radioCardSelected:
|
|
2532
|
-
radioCardLabel:
|
|
2533
|
-
radioCardDescription:
|
|
2534
|
-
imageCardGroup:
|
|
2535
|
-
imageCard:
|
|
2536
|
-
imageCardSelected:
|
|
2537
|
-
imageCardPhoto:
|
|
2538
|
-
imageCardLabel:
|
|
2539
|
-
imageCardDescription:
|
|
2540
|
-
fieldGroup:
|
|
2541
|
-
fieldLabel:
|
|
2542
|
-
fieldDescription:
|
|
2543
|
-
fieldSelect:
|
|
2544
|
-
fieldSelectError:
|
|
2545
|
-
fieldInputWrapper:
|
|
2546
|
-
fieldInput:
|
|
2547
|
-
fieldInputError:
|
|
2548
|
-
fieldSuffix:
|
|
2565
|
+
header: Wn,
|
|
2566
|
+
headerLogos: Hn,
|
|
2567
|
+
headerPartnerLogo: Vn,
|
|
2568
|
+
headerOpendoorLogo: qn,
|
|
2569
|
+
headerCloseButton: Gn,
|
|
2570
|
+
layout: Un,
|
|
2571
|
+
layoutScrollable: Yn,
|
|
2572
|
+
addressBar: Zn,
|
|
2573
|
+
addressIcon: Kn,
|
|
2574
|
+
addressText: zn,
|
|
2575
|
+
contentSplit: Jn,
|
|
2576
|
+
contentLeft: Xn,
|
|
2577
|
+
contentRight: Qn,
|
|
2578
|
+
pageTitle: ea,
|
|
2579
|
+
pageSubtitle: ta,
|
|
2580
|
+
pageContent: ra,
|
|
2581
|
+
navigation: na,
|
|
2582
|
+
navigationButtons: aa,
|
|
2583
|
+
backButton: sa,
|
|
2584
|
+
nextButton: oa,
|
|
2585
|
+
progressBar: ia,
|
|
2586
|
+
progressBarFill: la,
|
|
2587
|
+
radioCardGroup: ca,
|
|
2588
|
+
radioCard: ua,
|
|
2589
|
+
radioCardSelected: da,
|
|
2590
|
+
radioCardLabel: ha,
|
|
2591
|
+
radioCardDescription: fa,
|
|
2592
|
+
imageCardGroup: ma,
|
|
2593
|
+
imageCard: pa,
|
|
2594
|
+
imageCardSelected: ga,
|
|
2595
|
+
imageCardPhoto: _a,
|
|
2596
|
+
imageCardLabel: ba,
|
|
2597
|
+
imageCardDescription: ya,
|
|
2598
|
+
fieldGroup: va,
|
|
2599
|
+
fieldLabel: xa,
|
|
2600
|
+
fieldDescription: Ca,
|
|
2601
|
+
fieldSelect: wa,
|
|
2602
|
+
fieldSelectError: ka,
|
|
2603
|
+
fieldInputWrapper: ja,
|
|
2604
|
+
fieldInput: Na,
|
|
2605
|
+
fieldInputError: Ia,
|
|
2606
|
+
fieldSuffix: Sa,
|
|
2549
2607
|
fieldError: Ea,
|
|
2550
|
-
checkboxCardGroup:
|
|
2551
|
-
checkboxCard:
|
|
2552
|
-
checkboxCardSelected:
|
|
2553
|
-
checkboxCardContent:
|
|
2608
|
+
checkboxCardGroup: Pa,
|
|
2609
|
+
checkboxCard: La,
|
|
2610
|
+
checkboxCardSelected: Ta,
|
|
2611
|
+
checkboxCardContent: Aa,
|
|
2554
2612
|
checkboxCardLabel: Da,
|
|
2555
|
-
checkboxCardHelper:
|
|
2556
|
-
checkboxIndicator:
|
|
2557
|
-
checkboxIndicatorChecked:
|
|
2558
|
-
currencyWrapper:
|
|
2559
|
-
currencyPrefix:
|
|
2613
|
+
checkboxCardHelper: Oa,
|
|
2614
|
+
checkboxIndicator: Ra,
|
|
2615
|
+
checkboxIndicatorChecked: Ba,
|
|
2616
|
+
currencyWrapper: Ma,
|
|
2617
|
+
currencyPrefix: Fa,
|
|
2560
2618
|
currencyInput: $a,
|
|
2561
|
-
consentText:
|
|
2562
|
-
consentLink:
|
|
2563
|
-
ctaButton:
|
|
2564
|
-
toggleGroup:
|
|
2565
|
-
toggleLabel:
|
|
2566
|
-
toggleCheckbox:
|
|
2567
|
-
toggleText:
|
|
2568
|
-
searchableDropdown:
|
|
2569
|
-
searchableDropdownToggle:
|
|
2570
|
-
searchableDropdownList:
|
|
2571
|
-
searchableDropdownOption:
|
|
2572
|
-
searchableDropdownOptionSelected:
|
|
2573
|
-
searchableDropdownOptionHighlighted:
|
|
2574
|
-
searchableDropdownEmpty:
|
|
2575
|
-
},
|
|
2619
|
+
consentText: Wa,
|
|
2620
|
+
consentLink: Ha,
|
|
2621
|
+
ctaButton: Va,
|
|
2622
|
+
toggleGroup: qa,
|
|
2623
|
+
toggleLabel: Ga,
|
|
2624
|
+
toggleCheckbox: Ua,
|
|
2625
|
+
toggleText: Ya,
|
|
2626
|
+
searchableDropdown: Za,
|
|
2627
|
+
searchableDropdownToggle: Ka,
|
|
2628
|
+
searchableDropdownList: za,
|
|
2629
|
+
searchableDropdownOption: Ja,
|
|
2630
|
+
searchableDropdownOptionSelected: Xa,
|
|
2631
|
+
searchableDropdownOptionHighlighted: Qa,
|
|
2632
|
+
searchableDropdownEmpty: es
|
|
2633
|
+
}, ts = () => /* @__PURE__ */ t.jsx(
|
|
2576
2634
|
"svg",
|
|
2577
2635
|
{
|
|
2578
2636
|
width: "90",
|
|
@@ -2591,7 +2649,7 @@ const Mn = ({
|
|
|
2591
2649
|
}
|
|
2592
2650
|
)
|
|
2593
2651
|
}
|
|
2594
|
-
),
|
|
2652
|
+
), rs = ({
|
|
2595
2653
|
partnerLogoUrl: e,
|
|
2596
2654
|
onClose: r
|
|
2597
2655
|
}) => /* @__PURE__ */ t.jsxs("header", { className: l.header, children: [
|
|
@@ -2604,7 +2662,7 @@ const Mn = ({
|
|
|
2604
2662
|
className: l.headerPartnerLogo
|
|
2605
2663
|
}
|
|
2606
2664
|
),
|
|
2607
|
-
/* @__PURE__ */ t.jsx(
|
|
2665
|
+
/* @__PURE__ */ t.jsx(ts, {})
|
|
2608
2666
|
] }),
|
|
2609
2667
|
r && /* @__PURE__ */ t.jsx(
|
|
2610
2668
|
"button",
|
|
@@ -2632,7 +2690,7 @@ const Mn = ({
|
|
|
2632
2690
|
)
|
|
2633
2691
|
}
|
|
2634
2692
|
)
|
|
2635
|
-
] }),
|
|
2693
|
+
] }), ns = ({ progress: e }) => {
|
|
2636
2694
|
const r = Math.min(100, Math.max(0, e * 100));
|
|
2637
2695
|
return /* @__PURE__ */ t.jsx(
|
|
2638
2696
|
"div",
|
|
@@ -2651,12 +2709,12 @@ const Mn = ({
|
|
|
2651
2709
|
)
|
|
2652
2710
|
}
|
|
2653
2711
|
);
|
|
2654
|
-
},
|
|
2712
|
+
}, as = () => {
|
|
2655
2713
|
const { isFirstPage: e, currentPage: r, progress: a, goToNext: s, goToPrev: o } = fe();
|
|
2656
2714
|
if ((r == null ? void 0 : r.id) === "contact-info") return null;
|
|
2657
2715
|
const i = (r == null ? void 0 : r.submitLabel) ?? "Next";
|
|
2658
2716
|
return /* @__PURE__ */ t.jsxs("nav", { className: l.navigation, "aria-label": "Page navigation", children: [
|
|
2659
|
-
/* @__PURE__ */ t.jsx(
|
|
2717
|
+
/* @__PURE__ */ t.jsx(ns, { progress: a }),
|
|
2660
2718
|
/* @__PURE__ */ t.jsxs("div", { className: l.navigationButtons, children: [
|
|
2661
2719
|
e ? /* @__PURE__ */ t.jsx("div", {}) : /* @__PURE__ */ t.jsx(
|
|
2662
2720
|
"button",
|
|
@@ -2684,29 +2742,29 @@ const Mn = ({
|
|
|
2684
2742
|
/* @__PURE__ */ t.jsx("button", { type: "button", className: l.nextButton, onClick: s, children: i })
|
|
2685
2743
|
] })
|
|
2686
2744
|
] });
|
|
2687
|
-
},
|
|
2688
|
-
var
|
|
2689
|
-
const { getAnswer: r, setAnswer: a, goToNext: s, validationErrors: o } = fe(), i = r(e.key),
|
|
2745
|
+
}, ss = ({ question: e }) => {
|
|
2746
|
+
var h;
|
|
2747
|
+
const { getAnswer: r, setAnswer: a, goToNext: s, validationErrors: o } = fe(), i = r(e.key), m = o[e.key], f = G(null);
|
|
2690
2748
|
se(() => () => {
|
|
2691
2749
|
f.current && clearTimeout(f.current);
|
|
2692
2750
|
}, []);
|
|
2693
|
-
const
|
|
2694
|
-
(
|
|
2695
|
-
a(e.key,
|
|
2751
|
+
const d = Ee(
|
|
2752
|
+
(p) => {
|
|
2753
|
+
a(e.key, p), e.autoAdvance && (f.current && clearTimeout(f.current), f.current = setTimeout(() => s(), 150));
|
|
2696
2754
|
},
|
|
2697
2755
|
[e.key, e.autoAdvance, a, s]
|
|
2698
|
-
),
|
|
2699
|
-
(
|
|
2756
|
+
), u = Ee(
|
|
2757
|
+
(p, _) => {
|
|
2700
2758
|
var k, H;
|
|
2701
2759
|
const C = e.options;
|
|
2702
2760
|
if (!C) return;
|
|
2703
|
-
let
|
|
2704
|
-
if (
|
|
2705
|
-
const P = (k =
|
|
2706
|
-
(H = P == null ? void 0 : P[
|
|
2761
|
+
let S = null;
|
|
2762
|
+
if (p.key === "ArrowDown" || p.key === "ArrowRight" ? (p.preventDefault(), S = (_ + 1) % C.length) : (p.key === "ArrowUp" || p.key === "ArrowLeft") && (p.preventDefault(), S = (_ - 1 + C.length) % C.length), S !== null) {
|
|
2763
|
+
const P = (k = p.currentTarget.closest('[role="radiogroup"]')) == null ? void 0 : k.querySelectorAll('[role="radio"]');
|
|
2764
|
+
(H = P == null ? void 0 : P[S]) == null || H.focus(), d(C[S].value);
|
|
2707
2765
|
}
|
|
2708
2766
|
},
|
|
2709
|
-
[e.options,
|
|
2767
|
+
[e.options, d]
|
|
2710
2768
|
);
|
|
2711
2769
|
return /* @__PURE__ */ t.jsxs(
|
|
2712
2770
|
"div",
|
|
@@ -2715,35 +2773,35 @@ const Mn = ({
|
|
|
2715
2773
|
role: "radiogroup",
|
|
2716
2774
|
"aria-label": e.label,
|
|
2717
2775
|
children: [
|
|
2718
|
-
(
|
|
2719
|
-
const C = i ===
|
|
2776
|
+
(h = e.options) == null ? void 0 : h.map((p, _) => {
|
|
2777
|
+
const C = i === p.value;
|
|
2720
2778
|
return /* @__PURE__ */ t.jsxs(
|
|
2721
2779
|
"button",
|
|
2722
2780
|
{
|
|
2723
2781
|
type: "button",
|
|
2724
2782
|
role: "radio",
|
|
2725
2783
|
"aria-checked": C,
|
|
2726
|
-
tabIndex: C ||
|
|
2784
|
+
tabIndex: C || _ === 0 && !i ? 0 : -1,
|
|
2727
2785
|
className: `${l.radioCard} ${C ? l.radioCardSelected : ""}`,
|
|
2728
|
-
onClick: () =>
|
|
2729
|
-
onKeyDown: (
|
|
2786
|
+
onClick: () => d(p.value),
|
|
2787
|
+
onKeyDown: (S) => u(S, _),
|
|
2730
2788
|
children: [
|
|
2731
|
-
/* @__PURE__ */ t.jsx("span", { className: l.radioCardLabel, children:
|
|
2732
|
-
|
|
2789
|
+
/* @__PURE__ */ t.jsx("span", { className: l.radioCardLabel, children: p.label }),
|
|
2790
|
+
p.description && /* @__PURE__ */ t.jsx("span", { className: l.radioCardDescription, children: p.description })
|
|
2733
2791
|
]
|
|
2734
2792
|
},
|
|
2735
|
-
String(
|
|
2793
|
+
String(p.value)
|
|
2736
2794
|
);
|
|
2737
2795
|
}),
|
|
2738
|
-
|
|
2796
|
+
m && /* @__PURE__ */ t.jsx("p", { className: l.fieldError, children: m })
|
|
2739
2797
|
]
|
|
2740
2798
|
}
|
|
2741
2799
|
);
|
|
2742
|
-
},
|
|
2800
|
+
}, os = "https://images.opendoor.com/source/s3/imgdrop-production", is = "service=reception-fe&dpr=2&fit=scale-down";
|
|
2743
2801
|
function re(e, r = "3:2-sm") {
|
|
2744
|
-
return `${
|
|
2802
|
+
return `${os}/${e}?${is}&preset=${r}`;
|
|
2745
2803
|
}
|
|
2746
|
-
const
|
|
2804
|
+
const ls = {
|
|
2747
2805
|
// Kitchen
|
|
2748
2806
|
"kitchen-fixer_upper": re("2023-04-1681772974083-61414.png"),
|
|
2749
2807
|
"kitchen-dated": re("2023-04-1681772974089-39460.png"),
|
|
@@ -2768,15 +2826,15 @@ const is = {
|
|
|
2768
2826
|
"exterior-standard": re("2023-04-1681773220498-64940.png"),
|
|
2769
2827
|
"exterior-high_end": re("2023-04-1682103085417-24272.jpeg", "3:2-md"),
|
|
2770
2828
|
"exterior-luxury": re("2023-04-1681773220487-59852.png")
|
|
2771
|
-
},
|
|
2772
|
-
var
|
|
2773
|
-
const { getAnswer: r, setAnswer: a, goToNext: s, validationErrors: o } = fe(), i = r(e.key),
|
|
2829
|
+
}, cs = ({ question: e }) => {
|
|
2830
|
+
var u;
|
|
2831
|
+
const { getAnswer: r, setAnswer: a, goToNext: s, validationErrors: o } = fe(), i = r(e.key), m = o[e.key], f = G(null);
|
|
2774
2832
|
se(() => () => {
|
|
2775
2833
|
f.current && clearTimeout(f.current);
|
|
2776
2834
|
}, []);
|
|
2777
|
-
const
|
|
2778
|
-
(
|
|
2779
|
-
a(e.key,
|
|
2835
|
+
const d = Ee(
|
|
2836
|
+
(h) => {
|
|
2837
|
+
a(e.key, h), e.autoAdvance && (f.current && clearTimeout(f.current), f.current = setTimeout(() => s(), 300));
|
|
2780
2838
|
},
|
|
2781
2839
|
[e.key, e.autoAdvance, a, s]
|
|
2782
2840
|
);
|
|
@@ -2787,59 +2845,59 @@ const is = {
|
|
|
2787
2845
|
role: "radiogroup",
|
|
2788
2846
|
"aria-label": e.label,
|
|
2789
2847
|
children: [
|
|
2790
|
-
(
|
|
2791
|
-
const
|
|
2848
|
+
(u = e.options) == null ? void 0 : u.map((h) => {
|
|
2849
|
+
const p = i === h.value, _ = h.imageId ? ls[h.imageId] : void 0;
|
|
2792
2850
|
return /* @__PURE__ */ t.jsxs(
|
|
2793
2851
|
"button",
|
|
2794
2852
|
{
|
|
2795
2853
|
type: "button",
|
|
2796
2854
|
role: "radio",
|
|
2797
|
-
"aria-checked":
|
|
2798
|
-
className: `${l.imageCard} ${
|
|
2799
|
-
onClick: () =>
|
|
2855
|
+
"aria-checked": p,
|
|
2856
|
+
className: `${l.imageCard} ${p ? l.imageCardSelected : ""}`,
|
|
2857
|
+
onClick: () => d(h.value),
|
|
2800
2858
|
children: [
|
|
2801
|
-
|
|
2859
|
+
_ && /* @__PURE__ */ t.jsx(
|
|
2802
2860
|
"img",
|
|
2803
2861
|
{
|
|
2804
|
-
src:
|
|
2805
|
-
alt:
|
|
2862
|
+
src: _,
|
|
2863
|
+
alt: h.label,
|
|
2806
2864
|
className: l.imageCardPhoto,
|
|
2807
2865
|
loading: "lazy"
|
|
2808
2866
|
}
|
|
2809
2867
|
),
|
|
2810
|
-
/* @__PURE__ */ t.jsx("span", { className: l.imageCardLabel, children:
|
|
2811
|
-
|
|
2868
|
+
/* @__PURE__ */ t.jsx("span", { className: l.imageCardLabel, children: h.label }),
|
|
2869
|
+
h.description && /* @__PURE__ */ t.jsx("span", { className: l.imageCardDescription, children: h.description })
|
|
2812
2870
|
]
|
|
2813
2871
|
},
|
|
2814
|
-
String(
|
|
2872
|
+
String(h.value)
|
|
2815
2873
|
);
|
|
2816
2874
|
}),
|
|
2817
|
-
|
|
2875
|
+
m && /* @__PURE__ */ t.jsx("p", { className: l.fieldError, children: m })
|
|
2818
2876
|
]
|
|
2819
2877
|
}
|
|
2820
2878
|
);
|
|
2821
|
-
},
|
|
2879
|
+
}, us = ({
|
|
2822
2880
|
question: e
|
|
2823
2881
|
}) => {
|
|
2824
2882
|
var f;
|
|
2825
|
-
const { getAnswer: r, setAnswer: a, validationErrors: s } = fe(), o = r(e.key) ?? [], i = s[e.key],
|
|
2826
|
-
var
|
|
2827
|
-
const
|
|
2828
|
-
if (
|
|
2829
|
-
a(e.key, [
|
|
2883
|
+
const { getAnswer: r, setAnswer: a, validationErrors: s } = fe(), o = r(e.key) ?? [], i = s[e.key], m = (d) => {
|
|
2884
|
+
var p;
|
|
2885
|
+
const u = (p = e.options) == null ? void 0 : p.find((_) => _.value === d);
|
|
2886
|
+
if (u != null && u.exclusive) {
|
|
2887
|
+
a(e.key, [d]);
|
|
2830
2888
|
return;
|
|
2831
2889
|
}
|
|
2832
|
-
const
|
|
2833
|
-
(
|
|
2834
|
-
var C,
|
|
2835
|
-
return !((
|
|
2890
|
+
const h = o.filter(
|
|
2891
|
+
(_) => {
|
|
2892
|
+
var C, S;
|
|
2893
|
+
return !((S = (C = e.options) == null ? void 0 : C.find((k) => k.value === _)) != null && S.exclusive);
|
|
2836
2894
|
}
|
|
2837
2895
|
);
|
|
2838
|
-
if (
|
|
2839
|
-
const
|
|
2840
|
-
a(e.key,
|
|
2896
|
+
if (h.includes(d)) {
|
|
2897
|
+
const _ = h.filter((C) => C !== d);
|
|
2898
|
+
a(e.key, _.length > 0 ? _ : void 0);
|
|
2841
2899
|
} else
|
|
2842
|
-
a(e.key, [...
|
|
2900
|
+
a(e.key, [...h, d]);
|
|
2843
2901
|
};
|
|
2844
2902
|
return /* @__PURE__ */ t.jsxs(
|
|
2845
2903
|
"div",
|
|
@@ -2848,26 +2906,26 @@ const is = {
|
|
|
2848
2906
|
role: "group",
|
|
2849
2907
|
"aria-label": e.label,
|
|
2850
2908
|
children: [
|
|
2851
|
-
(f = e.options) == null ? void 0 : f.map((
|
|
2852
|
-
const
|
|
2909
|
+
(f = e.options) == null ? void 0 : f.map((d) => {
|
|
2910
|
+
const u = o.includes(String(d.value));
|
|
2853
2911
|
return /* @__PURE__ */ t.jsxs(
|
|
2854
2912
|
"button",
|
|
2855
2913
|
{
|
|
2856
2914
|
type: "button",
|
|
2857
2915
|
role: "checkbox",
|
|
2858
|
-
"aria-checked":
|
|
2859
|
-
className: `${l.checkboxCard} ${
|
|
2860
|
-
onClick: () =>
|
|
2916
|
+
"aria-checked": u,
|
|
2917
|
+
className: `${l.checkboxCard} ${u ? l.checkboxCardSelected : ""}`,
|
|
2918
|
+
onClick: () => m(String(d.value)),
|
|
2861
2919
|
children: [
|
|
2862
2920
|
/* @__PURE__ */ t.jsxs("span", { className: l.checkboxCardContent, children: [
|
|
2863
|
-
/* @__PURE__ */ t.jsx("span", { className: l.checkboxCardLabel, children:
|
|
2864
|
-
|
|
2921
|
+
/* @__PURE__ */ t.jsx("span", { className: l.checkboxCardLabel, children: d.label }),
|
|
2922
|
+
d.helperText && /* @__PURE__ */ t.jsx("span", { className: l.checkboxCardHelper, children: d.helperText })
|
|
2865
2923
|
] }),
|
|
2866
2924
|
/* @__PURE__ */ t.jsx(
|
|
2867
2925
|
"span",
|
|
2868
2926
|
{
|
|
2869
|
-
className: `${l.checkboxIndicator} ${
|
|
2870
|
-
children:
|
|
2927
|
+
className: `${l.checkboxIndicator} ${u ? l.checkboxIndicatorChecked : ""}`,
|
|
2928
|
+
children: u && /* @__PURE__ */ t.jsx("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ t.jsx(
|
|
2871
2929
|
"path",
|
|
2872
2930
|
{
|
|
2873
2931
|
d: "M2 6l3 3 5-5",
|
|
@@ -2881,18 +2939,18 @@ const is = {
|
|
|
2881
2939
|
)
|
|
2882
2940
|
]
|
|
2883
2941
|
},
|
|
2884
|
-
String(
|
|
2942
|
+
String(d.value)
|
|
2885
2943
|
);
|
|
2886
2944
|
}),
|
|
2887
2945
|
i && /* @__PURE__ */ t.jsx("p", { className: l.fieldError, children: i })
|
|
2888
2946
|
]
|
|
2889
2947
|
}
|
|
2890
2948
|
);
|
|
2891
|
-
},
|
|
2949
|
+
}, ds = ({ question: e }) => {
|
|
2892
2950
|
var f;
|
|
2893
|
-
const { getAnswer: r, setAnswer: a, validationErrors: s } = fe(), o = r(e.key), i = s[e.key],
|
|
2894
|
-
const
|
|
2895
|
-
e.type === "number" &&
|
|
2951
|
+
const { getAnswer: r, setAnswer: a, validationErrors: s } = fe(), o = r(e.key), i = s[e.key], m = (d) => {
|
|
2952
|
+
const u = d.target.value;
|
|
2953
|
+
e.type === "number" && u !== "" ? a(e.key, Number(u)) : a(e.key, u || void 0);
|
|
2896
2954
|
};
|
|
2897
2955
|
return /* @__PURE__ */ t.jsxs("div", { className: l.fieldGroup, children: [
|
|
2898
2956
|
/* @__PURE__ */ t.jsx("label", { className: l.fieldLabel, htmlFor: e.key, children: e.label }),
|
|
@@ -2903,23 +2961,23 @@ const is = {
|
|
|
2903
2961
|
id: e.key,
|
|
2904
2962
|
className: `${l.fieldSelect} ${i ? l.fieldSelectError : ""}`,
|
|
2905
2963
|
value: o !== void 0 ? String(o) : "",
|
|
2906
|
-
onChange:
|
|
2964
|
+
onChange: m,
|
|
2907
2965
|
children: [
|
|
2908
2966
|
/* @__PURE__ */ t.jsx("option", { value: "", children: e.placeholder || "Select..." }),
|
|
2909
|
-
(f = e.options) == null ? void 0 : f.map((
|
|
2967
|
+
(f = e.options) == null ? void 0 : f.map((d) => /* @__PURE__ */ t.jsx("option", { value: String(d.value), children: d.label }, String(d.value)))
|
|
2910
2968
|
]
|
|
2911
2969
|
}
|
|
2912
2970
|
),
|
|
2913
2971
|
i && /* @__PURE__ */ t.jsx("p", { className: l.fieldError, children: i })
|
|
2914
2972
|
] });
|
|
2915
|
-
},
|
|
2916
|
-
const { getAnswer: r, setAnswer: a, validationErrors: s } = fe(), o = r(e.key), i = s[e.key],
|
|
2917
|
-
const
|
|
2973
|
+
}, hs = ({ question: e }) => {
|
|
2974
|
+
const { getAnswer: r, setAnswer: a, validationErrors: s } = fe(), o = r(e.key), i = s[e.key], m = (d) => {
|
|
2975
|
+
const u = d.target.value;
|
|
2918
2976
|
if (e.type === "number") {
|
|
2919
|
-
const
|
|
2920
|
-
a(e.key,
|
|
2977
|
+
const h = u.replace(/[^0-9.]/g, ""), p = h === "" ? void 0 : Number(h), _ = p !== void 0 && isNaN(p) ? void 0 : p;
|
|
2978
|
+
a(e.key, _);
|
|
2921
2979
|
} else
|
|
2922
|
-
a(e.key,
|
|
2980
|
+
a(e.key, u || void 0);
|
|
2923
2981
|
}, f = o != null ? String(o) : "";
|
|
2924
2982
|
return /* @__PURE__ */ t.jsxs("div", { className: l.fieldGroup, children: [
|
|
2925
2983
|
/* @__PURE__ */ t.jsx("label", { className: l.fieldLabel, htmlFor: e.key, children: e.label }),
|
|
@@ -2933,7 +2991,7 @@ const is = {
|
|
|
2933
2991
|
inputMode: e.type === "number" ? "numeric" : void 0,
|
|
2934
2992
|
className: `${l.fieldInput} ${i ? l.fieldInputError : ""}`,
|
|
2935
2993
|
value: f,
|
|
2936
|
-
onChange:
|
|
2994
|
+
onChange: m,
|
|
2937
2995
|
placeholder: e.placeholder
|
|
2938
2996
|
}
|
|
2939
2997
|
),
|
|
@@ -2941,10 +2999,10 @@ const is = {
|
|
|
2941
2999
|
] }),
|
|
2942
3000
|
i && /* @__PURE__ */ t.jsx("p", { className: l.fieldError, children: i })
|
|
2943
3001
|
] });
|
|
2944
|
-
},
|
|
2945
|
-
const { getAnswer: r, setAnswer: a, validationErrors: s } = fe(), o = r(e.key), i = s[e.key],
|
|
2946
|
-
const
|
|
2947
|
-
a(e.key,
|
|
3002
|
+
}, fs = ({ question: e }) => {
|
|
3003
|
+
const { getAnswer: r, setAnswer: a, validationErrors: s } = fe(), o = r(e.key), i = s[e.key], m = (d) => {
|
|
3004
|
+
const u = d.target.value.replace(/[^0-9]/g, ""), h = u === "" ? void 0 : Number(u);
|
|
3005
|
+
a(e.key, h !== void 0 && isNaN(h) ? void 0 : h);
|
|
2948
3006
|
}, f = o != null ? String(o) : "";
|
|
2949
3007
|
return /* @__PURE__ */ t.jsxs("div", { className: l.fieldGroup, children: [
|
|
2950
3008
|
/* @__PURE__ */ t.jsx("label", { className: l.fieldLabel, htmlFor: e.key, children: e.label }),
|
|
@@ -2958,7 +3016,7 @@ const is = {
|
|
|
2958
3016
|
inputMode: "numeric",
|
|
2959
3017
|
className: `${l.currencyInput} ${i ? l.fieldInputError : ""}`,
|
|
2960
3018
|
value: f,
|
|
2961
|
-
onChange:
|
|
3019
|
+
onChange: m,
|
|
2962
3020
|
placeholder: e.placeholder
|
|
2963
3021
|
}
|
|
2964
3022
|
)
|
|
@@ -2966,14 +3024,14 @@ const is = {
|
|
|
2966
3024
|
i && /* @__PURE__ */ t.jsx("p", { className: l.fieldError, children: i })
|
|
2967
3025
|
] });
|
|
2968
3026
|
};
|
|
2969
|
-
function
|
|
3027
|
+
function ms(e) {
|
|
2970
3028
|
const r = e.replace(/\D/g, "").slice(0, 10);
|
|
2971
3029
|
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)}`;
|
|
2972
3030
|
}
|
|
2973
|
-
const
|
|
2974
|
-
const { getAnswer: r, setAnswer: a, validationErrors: s } = fe(), o = r(e.key) ?? "", i = s[e.key],
|
|
2975
|
-
const
|
|
2976
|
-
a(e.key,
|
|
3031
|
+
const ps = ({ question: e }) => {
|
|
3032
|
+
const { getAnswer: r, setAnswer: a, validationErrors: s } = fe(), o = r(e.key) ?? "", i = s[e.key], m = (f) => {
|
|
3033
|
+
const u = f.target.value.replace(/\D/g, "").slice(0, 10);
|
|
3034
|
+
a(e.key, u || void 0);
|
|
2977
3035
|
};
|
|
2978
3036
|
return /* @__PURE__ */ t.jsxs("div", { className: l.fieldGroup, children: [
|
|
2979
3037
|
/* @__PURE__ */ t.jsx("label", { className: l.fieldLabel, htmlFor: e.key, children: e.label }),
|
|
@@ -2983,14 +3041,14 @@ const ms = ({ question: e }) => {
|
|
|
2983
3041
|
id: e.key,
|
|
2984
3042
|
type: "tel",
|
|
2985
3043
|
className: `${l.fieldInput} ${i ? l.fieldInputError : ""}`,
|
|
2986
|
-
value:
|
|
2987
|
-
onChange:
|
|
3044
|
+
value: ms(o),
|
|
3045
|
+
onChange: m,
|
|
2988
3046
|
placeholder: e.placeholder || "(555) 555-5555"
|
|
2989
3047
|
}
|
|
2990
3048
|
),
|
|
2991
3049
|
i && /* @__PURE__ */ t.jsx("p", { className: l.fieldError, children: i })
|
|
2992
3050
|
] });
|
|
2993
|
-
},
|
|
3051
|
+
}, gs = ({ question: e }) => {
|
|
2994
3052
|
const { getAnswer: r, setAnswer: a, smsConsentText: s } = fe(), o = r(e.key);
|
|
2995
3053
|
let i = e.label;
|
|
2996
3054
|
return e.key === "seller.sms_opt_in" && s && (i = s), /* @__PURE__ */ t.jsx("div", { className: l.toggleGroup, children: /* @__PURE__ */ t.jsxs("label", { className: l.toggleLabel, children: [
|
|
@@ -3000,13 +3058,13 @@ const ms = ({ question: e }) => {
|
|
|
3000
3058
|
type: "checkbox",
|
|
3001
3059
|
className: l.toggleCheckbox,
|
|
3002
3060
|
checked: o === !0,
|
|
3003
|
-
onChange: (
|
|
3061
|
+
onChange: (m) => a(e.key, m.target.checked)
|
|
3004
3062
|
}
|
|
3005
3063
|
),
|
|
3006
3064
|
/* @__PURE__ */ t.jsx("span", { className: l.toggleText, children: i })
|
|
3007
3065
|
] }) });
|
|
3008
|
-
},
|
|
3009
|
-
function
|
|
3066
|
+
}, bt = 4, Te = 8, _s = 240, bs = 80;
|
|
3067
|
+
function ys(e) {
|
|
3010
3068
|
const r = {};
|
|
3011
3069
|
for (let a = e; a; a = a.parentElement) {
|
|
3012
3070
|
const s = a.style;
|
|
@@ -3017,56 +3075,56 @@ function bs(e) {
|
|
|
3017
3075
|
}
|
|
3018
3076
|
return r;
|
|
3019
3077
|
}
|
|
3020
|
-
const
|
|
3078
|
+
const vs = ({ question: e }) => {
|
|
3021
3079
|
var ue;
|
|
3022
|
-
const { getAnswer: r, setAnswer: a, validationErrors: s } = fe(), o = r(e.key), i = s[e.key],
|
|
3080
|
+
const { getAnswer: r, setAnswer: a, validationErrors: s } = fe(), o = r(e.key), i = s[e.key], m = `${e.key}-combobox`, [f, d] = E(""), [u, h] = E(!1), [p, _] = E([]), [C, S] = E(!1), k = G(null), H = G(null), P = G(null), [Y, j] = E(null), [ne, F] = E({}), oe = De(Ke);
|
|
3023
3081
|
se(() => {
|
|
3024
3082
|
let v = !1;
|
|
3025
|
-
return e.dataSource === "homebuilders" && oe ? (
|
|
3026
|
-
v ||
|
|
3083
|
+
return e.dataSource === "homebuilders" && oe ? (S(!0), oe.getHomebuilders().then((x) => {
|
|
3084
|
+
v || _(
|
|
3027
3085
|
x.homebuilders.map((y) => ({
|
|
3028
3086
|
label: y.displayName,
|
|
3029
3087
|
value: y.identifier
|
|
3030
3088
|
}))
|
|
3031
3089
|
);
|
|
3032
3090
|
}).catch(() => {
|
|
3033
|
-
v || (e.options ?
|
|
3091
|
+
v || (e.options ? _(
|
|
3034
3092
|
e.options.map((x) => ({
|
|
3035
3093
|
label: x.label,
|
|
3036
3094
|
value: String(x.value)
|
|
3037
3095
|
}))
|
|
3038
|
-
) :
|
|
3096
|
+
) : _([]));
|
|
3039
3097
|
}).finally(() => {
|
|
3040
|
-
v ||
|
|
3041
|
-
})) : e.options ?
|
|
3098
|
+
v || S(!1);
|
|
3099
|
+
})) : e.options ? _(
|
|
3042
3100
|
e.options.map((x) => ({
|
|
3043
3101
|
label: x.label,
|
|
3044
3102
|
value: String(x.value)
|
|
3045
3103
|
}))
|
|
3046
|
-
) :
|
|
3104
|
+
) : _([]), () => {
|
|
3047
3105
|
v = !0;
|
|
3048
3106
|
};
|
|
3049
3107
|
}, [e.dataSource, e.options, oe]);
|
|
3050
|
-
const U =
|
|
3108
|
+
const U = Ee(() => {
|
|
3051
3109
|
const v = H.current;
|
|
3052
3110
|
if (!v) return;
|
|
3053
|
-
const x = v.getBoundingClientRect(), y = window.visualViewport, R = (y == null ? void 0 : y.height) ?? window.innerHeight, J = (y == null ? void 0 : y.width) ?? window.innerWidth, ye = (y == null ? void 0 : y.offsetTop) ?? 0, he = (y == null ? void 0 : y.offsetLeft) ?? 0, pe = ye + R - x.bottom -
|
|
3054
|
-
|
|
3055
|
-
Math.min(
|
|
3111
|
+
const x = v.getBoundingClientRect(), y = window.visualViewport, R = (y == null ? void 0 : y.height) ?? window.innerHeight, J = (y == null ? void 0 : y.width) ?? window.innerWidth, ye = (y == null ? void 0 : y.offsetTop) ?? 0, he = (y == null ? void 0 : y.offsetLeft) ?? 0, pe = ye + R - x.bottom - bt - Te, N = Math.max(
|
|
3112
|
+
bs,
|
|
3113
|
+
Math.min(_s, pe)
|
|
3056
3114
|
), L = Math.min(x.width, J - Te * 2), B = he + Te, M = he + J - L - Te, le = Math.max(B, Math.min(x.left, M));
|
|
3057
3115
|
j({
|
|
3058
|
-
top: x.bottom + window.scrollY +
|
|
3116
|
+
top: x.bottom + window.scrollY + bt,
|
|
3059
3117
|
left: le + window.scrollX,
|
|
3060
3118
|
width: L,
|
|
3061
3119
|
maxHeight: N
|
|
3062
3120
|
});
|
|
3063
3121
|
}, []);
|
|
3064
|
-
|
|
3065
|
-
if (!
|
|
3122
|
+
Ut(() => {
|
|
3123
|
+
if (!u) {
|
|
3066
3124
|
j(null);
|
|
3067
3125
|
return;
|
|
3068
3126
|
}
|
|
3069
|
-
H.current &&
|
|
3127
|
+
H.current && F(ys(H.current)), U();
|
|
3070
3128
|
const v = () => U();
|
|
3071
3129
|
window.addEventListener("scroll", v, !0), window.addEventListener("resize", v);
|
|
3072
3130
|
const x = window.visualViewport;
|
|
@@ -3075,45 +3133,45 @@ const ys = ({ question: e }) => {
|
|
|
3075
3133
|
return () => {
|
|
3076
3134
|
window.removeEventListener("scroll", v, !0), window.removeEventListener("resize", v), x == null || x.removeEventListener("resize", v), x == null || x.removeEventListener("scroll", v), window.clearTimeout(y);
|
|
3077
3135
|
};
|
|
3078
|
-
}, [
|
|
3136
|
+
}, [u, U]), se(() => {
|
|
3079
3137
|
const v = (x) => {
|
|
3080
3138
|
var R, J;
|
|
3081
3139
|
const y = x.target;
|
|
3082
|
-
(R = k.current) != null && R.contains(y) || (J = P.current) != null && J.contains(y) ||
|
|
3140
|
+
(R = k.current) != null && R.contains(y) || (J = P.current) != null && J.contains(y) || h(!1);
|
|
3083
3141
|
};
|
|
3084
3142
|
return document.addEventListener("mousedown", v), () => document.removeEventListener("mousedown", v);
|
|
3085
3143
|
}, []);
|
|
3086
|
-
const
|
|
3144
|
+
const A = f ? p.filter(
|
|
3087
3145
|
(v) => v.label.toLowerCase().includes(f.toLowerCase())
|
|
3088
|
-
) :
|
|
3146
|
+
) : p, $ = (ue = p.find((v) => v.value === o)) == null ? void 0 : ue.label, [Z, ae] = E(-1), z = `${e.key}-listbox`, K = Ee(
|
|
3089
3147
|
(v) => {
|
|
3090
|
-
a(e.key, v),
|
|
3148
|
+
a(e.key, v), h(!1), d(""), ae(-1);
|
|
3091
3149
|
},
|
|
3092
3150
|
[e.key, a]
|
|
3093
3151
|
), q = (v) => {
|
|
3094
|
-
if (!
|
|
3095
|
-
(v.key === "ArrowDown" || v.key === "Enter") && (v.preventDefault(),
|
|
3152
|
+
if (!u) {
|
|
3153
|
+
(v.key === "ArrowDown" || v.key === "Enter") && (v.preventDefault(), h(!0));
|
|
3096
3154
|
return;
|
|
3097
3155
|
}
|
|
3098
3156
|
switch (v.key) {
|
|
3099
3157
|
case "ArrowDown":
|
|
3100
|
-
v.preventDefault(),
|
|
3101
|
-
(x) => x <
|
|
3158
|
+
v.preventDefault(), A.length > 0 && ae(
|
|
3159
|
+
(x) => x < A.length - 1 ? x + 1 : 0
|
|
3102
3160
|
);
|
|
3103
3161
|
break;
|
|
3104
3162
|
case "ArrowUp":
|
|
3105
|
-
v.preventDefault(),
|
|
3106
|
-
(x) => x > 0 ? x - 1 :
|
|
3163
|
+
v.preventDefault(), A.length > 0 && ae(
|
|
3164
|
+
(x) => x > 0 ? x - 1 : A.length - 1
|
|
3107
3165
|
);
|
|
3108
3166
|
break;
|
|
3109
3167
|
case "Enter":
|
|
3110
|
-
v.preventDefault(), Z >= 0 && Z <
|
|
3168
|
+
v.preventDefault(), Z >= 0 && Z < A.length && K(A[Z].value);
|
|
3111
3169
|
break;
|
|
3112
3170
|
case "Escape":
|
|
3113
|
-
v.preventDefault(),
|
|
3171
|
+
v.preventDefault(), h(!1), ae(-1);
|
|
3114
3172
|
break;
|
|
3115
3173
|
}
|
|
3116
|
-
}, ie =
|
|
3174
|
+
}, ie = u && Y && typeof document < "u" ? Yt(
|
|
3117
3175
|
/* @__PURE__ */ t.jsx(
|
|
3118
3176
|
"div",
|
|
3119
3177
|
{
|
|
@@ -3130,7 +3188,7 @@ const ys = ({ question: e }) => {
|
|
|
3130
3188
|
maxHeight: Y.maxHeight,
|
|
3131
3189
|
...ne
|
|
3132
3190
|
},
|
|
3133
|
-
children: C ? /* @__PURE__ */ t.jsx("div", { className: l.searchableDropdownEmpty, children: "Loading..." }) :
|
|
3191
|
+
children: C ? /* @__PURE__ */ t.jsx("div", { className: l.searchableDropdownEmpty, children: "Loading..." }) : A.length === 0 ? /* @__PURE__ */ t.jsx("div", { className: l.searchableDropdownEmpty, children: "No results found" }) : A.map((v, x) => /* @__PURE__ */ t.jsx(
|
|
3134
3192
|
"button",
|
|
3135
3193
|
{
|
|
3136
3194
|
id: `${z}-option-${x}`,
|
|
@@ -3153,22 +3211,22 @@ const ys = ({ question: e }) => {
|
|
|
3153
3211
|
/* @__PURE__ */ t.jsx(
|
|
3154
3212
|
"input",
|
|
3155
3213
|
{
|
|
3156
|
-
id:
|
|
3214
|
+
id: m,
|
|
3157
3215
|
type: "text",
|
|
3158
3216
|
className: l.fieldInput,
|
|
3159
|
-
value:
|
|
3217
|
+
value: u ? f : $ ?? "",
|
|
3160
3218
|
onChange: (v) => {
|
|
3161
|
-
|
|
3219
|
+
d(v.target.value), ae(-1), u || h(!0);
|
|
3162
3220
|
},
|
|
3163
|
-
onFocus: () =>
|
|
3221
|
+
onFocus: () => h(!0),
|
|
3164
3222
|
onKeyDown: q,
|
|
3165
3223
|
placeholder: e.placeholder || "Select or search...",
|
|
3166
3224
|
"aria-label": e.label,
|
|
3167
|
-
"aria-expanded":
|
|
3225
|
+
"aria-expanded": u,
|
|
3168
3226
|
role: "combobox",
|
|
3169
3227
|
"aria-haspopup": "listbox",
|
|
3170
|
-
"aria-controls":
|
|
3171
|
-
"aria-activedescendant":
|
|
3228
|
+
"aria-controls": u ? z : void 0,
|
|
3229
|
+
"aria-activedescendant": u && Z >= 0 ? `${z}-option-${Z}` : void 0
|
|
3172
3230
|
}
|
|
3173
3231
|
),
|
|
3174
3232
|
/* @__PURE__ */ t.jsx(
|
|
@@ -3176,7 +3234,7 @@ const ys = ({ question: e }) => {
|
|
|
3176
3234
|
{
|
|
3177
3235
|
type: "button",
|
|
3178
3236
|
className: l.searchableDropdownToggle,
|
|
3179
|
-
onClick: () =>
|
|
3237
|
+
onClick: () => h(!u),
|
|
3180
3238
|
"aria-label": "Toggle dropdown",
|
|
3181
3239
|
tabIndex: -1,
|
|
3182
3240
|
children: /* @__PURE__ */ t.jsx("svg", { width: "12", height: "8", viewBox: "0 0 12 8", fill: "none", children: /* @__PURE__ */ t.jsx(
|
|
@@ -3196,36 +3254,36 @@ const ys = ({ question: e }) => {
|
|
|
3196
3254
|
ie
|
|
3197
3255
|
] });
|
|
3198
3256
|
};
|
|
3199
|
-
function
|
|
3257
|
+
function xs(e) {
|
|
3200
3258
|
switch (e.style) {
|
|
3201
3259
|
case "radio-card":
|
|
3202
|
-
return /* @__PURE__ */ t.jsx(
|
|
3260
|
+
return /* @__PURE__ */ t.jsx(ss, { question: e }, e.key);
|
|
3203
3261
|
case "image-card":
|
|
3204
|
-
return /* @__PURE__ */ t.jsx(ls, { question: e }, e.key);
|
|
3205
|
-
case "checkbox-card":
|
|
3206
3262
|
return /* @__PURE__ */ t.jsx(cs, { question: e }, e.key);
|
|
3207
|
-
case "
|
|
3263
|
+
case "checkbox-card":
|
|
3208
3264
|
return /* @__PURE__ */ t.jsx(us, { question: e }, e.key);
|
|
3265
|
+
case "dropdown":
|
|
3266
|
+
return /* @__PURE__ */ t.jsx(ds, { question: e }, e.key);
|
|
3209
3267
|
case "input":
|
|
3210
3268
|
case "email":
|
|
3211
|
-
return /* @__PURE__ */ t.jsx(ds, { question: e }, e.key);
|
|
3212
|
-
case "currency":
|
|
3213
3269
|
return /* @__PURE__ */ t.jsx(hs, { question: e }, e.key);
|
|
3270
|
+
case "currency":
|
|
3271
|
+
return /* @__PURE__ */ t.jsx(fs, { question: e }, e.key);
|
|
3214
3272
|
case "phone":
|
|
3215
|
-
return /* @__PURE__ */ t.jsx(ms, { question: e }, e.key);
|
|
3216
|
-
case "toggle":
|
|
3217
3273
|
return /* @__PURE__ */ t.jsx(ps, { question: e }, e.key);
|
|
3274
|
+
case "toggle":
|
|
3275
|
+
return /* @__PURE__ */ t.jsx(gs, { question: e }, e.key);
|
|
3218
3276
|
case "searchable-dropdown":
|
|
3219
|
-
return /* @__PURE__ */ t.jsx(
|
|
3277
|
+
return /* @__PURE__ */ t.jsx(vs, { question: e }, e.key);
|
|
3220
3278
|
default:
|
|
3221
3279
|
return null;
|
|
3222
3280
|
}
|
|
3223
3281
|
}
|
|
3224
|
-
const
|
|
3282
|
+
const Cs = () => {
|
|
3225
3283
|
const { currentPage: e, visibleQuestions: r, goToNext: a, contactConsentText: s } = fe(), o = G(null);
|
|
3226
3284
|
return se(() => {
|
|
3227
|
-
var i,
|
|
3228
|
-
(
|
|
3285
|
+
var i, m, f;
|
|
3286
|
+
(m = (i = o.current) == null ? void 0 : i.scrollTo) == null || m.call(i, { top: 0, behavior: "smooth" }), (f = o.current) == null || f.focus();
|
|
3229
3287
|
}, [e == null ? void 0 : e.id]), e ? /* @__PURE__ */ t.jsxs(
|
|
3230
3288
|
"div",
|
|
3231
3289
|
{
|
|
@@ -3235,7 +3293,7 @@ const xs = () => {
|
|
|
3235
3293
|
role: "region",
|
|
3236
3294
|
"aria-label": e.title,
|
|
3237
3295
|
children: [
|
|
3238
|
-
r.map(
|
|
3296
|
+
r.map(xs),
|
|
3239
3297
|
e.id === "contact-info" && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
3240
3298
|
/* @__PURE__ */ t.jsx("button", { type: "button", className: l.ctaButton, onClick: a, children: e.submitLabel ?? "Next" }),
|
|
3241
3299
|
s ?? /* @__PURE__ */ t.jsxs("p", { className: l.consentText, children: [
|
|
@@ -3272,7 +3330,7 @@ const xs = () => {
|
|
|
3272
3330
|
]
|
|
3273
3331
|
}
|
|
3274
3332
|
) : null;
|
|
3275
|
-
},
|
|
3333
|
+
}, ws = ({ address: e }) => {
|
|
3276
3334
|
const { currentPage: r } = fe();
|
|
3277
3335
|
if (!r) return null;
|
|
3278
3336
|
const a = [
|
|
@@ -3308,94 +3366,94 @@ const xs = () => {
|
|
|
3308
3366
|
/* @__PURE__ */ t.jsx("h1", { className: l.pageTitle, children: r.title }),
|
|
3309
3367
|
r.subtitle && /* @__PURE__ */ t.jsx("p", { className: l.pageSubtitle, children: r.subtitle })
|
|
3310
3368
|
] }),
|
|
3311
|
-
/* @__PURE__ */ t.jsx("div", { className: l.contentRight, children: /* @__PURE__ */ t.jsx(
|
|
3369
|
+
/* @__PURE__ */ t.jsx("div", { className: l.contentRight, children: /* @__PURE__ */ t.jsx(Cs, {}) })
|
|
3312
3370
|
] })
|
|
3313
3371
|
] }),
|
|
3314
|
-
/* @__PURE__ */ t.jsx(
|
|
3372
|
+
/* @__PURE__ */ t.jsx(as, {})
|
|
3315
3373
|
] });
|
|
3316
|
-
},
|
|
3374
|
+
}, Fo = ({
|
|
3317
3375
|
address: e,
|
|
3318
3376
|
onSubmit: r,
|
|
3319
3377
|
partnerLogoUrl: a,
|
|
3320
3378
|
appearance: s = { theme: "minimal" },
|
|
3321
3379
|
initialAnswers: o,
|
|
3322
3380
|
skipPages: i,
|
|
3323
|
-
smsConsentText:
|
|
3381
|
+
smsConsentText: m,
|
|
3324
3382
|
onPageChange: f,
|
|
3325
|
-
onAnswerChange:
|
|
3326
|
-
onClose:
|
|
3327
|
-
onReady:
|
|
3328
|
-
onError:
|
|
3329
|
-
contactConsentText:
|
|
3383
|
+
onAnswerChange: d,
|
|
3384
|
+
onClose: u,
|
|
3385
|
+
onReady: h,
|
|
3386
|
+
onError: p,
|
|
3387
|
+
contactConsentText: _
|
|
3330
3388
|
}) => {
|
|
3331
3389
|
const C = Pe(s);
|
|
3332
3390
|
return /* @__PURE__ */ t.jsx("div", { className: l.container, style: C, children: /* @__PURE__ */ t.jsxs(
|
|
3333
|
-
|
|
3391
|
+
Fn,
|
|
3334
3392
|
{
|
|
3335
3393
|
initialAnswers: o,
|
|
3336
3394
|
skipPages: i,
|
|
3337
|
-
smsConsentText:
|
|
3338
|
-
contactConsentText:
|
|
3395
|
+
smsConsentText: m,
|
|
3396
|
+
contactConsentText: _,
|
|
3339
3397
|
onSubmit: r,
|
|
3340
3398
|
onPageChange: f,
|
|
3341
|
-
onAnswerChange:
|
|
3342
|
-
onReady:
|
|
3343
|
-
onError:
|
|
3399
|
+
onAnswerChange: d,
|
|
3400
|
+
onReady: h,
|
|
3401
|
+
onError: p,
|
|
3344
3402
|
children: [
|
|
3345
|
-
/* @__PURE__ */ t.jsx(
|
|
3346
|
-
/* @__PURE__ */ t.jsx(
|
|
3403
|
+
/* @__PURE__ */ t.jsx(rs, { partnerLogoUrl: a, onClose: u }),
|
|
3404
|
+
/* @__PURE__ */ t.jsx(ws, { address: e })
|
|
3347
3405
|
]
|
|
3348
3406
|
}
|
|
3349
3407
|
) });
|
|
3350
|
-
},
|
|
3351
|
-
root:
|
|
3352
|
-
card:
|
|
3353
|
-
titleLarge:
|
|
3354
|
-
featuresList:
|
|
3355
|
-
stepLayout:
|
|
3408
|
+
}, ks = "_root_1iq32_7", js = "_card_1iq32_18", Ns = "_titleLarge_1iq32_36", Is = "_featuresList_1iq32_40", Ss = "_stepLayout_1iq32_55", Es = "_leftColumn_1iq32_47", Ps = "_introHeader_1iq32_68", Ls = "_schedule_1iq32_74", Ts = "_subtitleLeft_1iq32_124", As = "_feature_1iq32_40", Ds = "_featureTitle_1iq32_143", Os = "_featureDescription_1iq32_150", Rs = "_title_1iq32_36", Bs = "_subtitle_1iq32_124", Ms = "_calendarHeader_1iq32_175", Fs = "_calendarMonthLabel_1iq32_182", $s = "_calendarNavButton_1iq32_188", Ws = "_calendarGrid_1iq32_208", Hs = "_calendarDayHeader_1iq32_214", Vs = "_calendarDayAvailable_1iq32_223", qs = "_calendarDayDisabled_1iq32_224", Gs = "_calendarDaySelected_1iq32_225", Us = "_timesHeader_1iq32_256", Ys = "_timeRow_1iq32_263", Zs = "_timeButton_1iq32_270", Ks = "_timeButtonSelected_1iq32_271", zs = "_field_1iq32_294", Js = "_fieldLabel_1iq32_300", Xs = "_input_1iq32_306", Qs = "_fieldset_1iq32_327", eo = "_radioRow_1iq32_336", to = "_radioOption_1iq32_341", ro = "_faqBelowActions_1iq32_362", no = "_faq_1iq32_362", ao = "_faqHeader_1iq32_373", so = "_faqItem_1iq32_381", oo = "_faqQuestion_1iq32_390", io = "_faqAnswer_1iq32_406", lo = "_faqChevron_1iq32_413", co = "_errorText_1iq32_423", uo = "_actionsRow_1iq32_429", ho = "_linkButton_1iq32_437", fo = "_primaryButton_1iq32_454", mo = "_successCheckCircle_1iq32_488", po = "_summaryCard_1iq32_500", go = "_summaryRow_1iq32_510", _o = "_summaryIcon_1iq32_518", g = {
|
|
3409
|
+
root: ks,
|
|
3410
|
+
card: js,
|
|
3411
|
+
titleLarge: Ns,
|
|
3412
|
+
featuresList: Is,
|
|
3413
|
+
stepLayout: Ss,
|
|
3356
3414
|
leftColumn: Es,
|
|
3357
|
-
introHeader:
|
|
3358
|
-
schedule:
|
|
3359
|
-
subtitleLeft:
|
|
3360
|
-
feature:
|
|
3415
|
+
introHeader: Ps,
|
|
3416
|
+
schedule: Ls,
|
|
3417
|
+
subtitleLeft: Ts,
|
|
3418
|
+
feature: As,
|
|
3361
3419
|
featureTitle: Ds,
|
|
3362
|
-
featureDescription:
|
|
3363
|
-
title:
|
|
3364
|
-
subtitle:
|
|
3365
|
-
calendarHeader:
|
|
3366
|
-
calendarMonthLabel:
|
|
3420
|
+
featureDescription: Os,
|
|
3421
|
+
title: Rs,
|
|
3422
|
+
subtitle: Bs,
|
|
3423
|
+
calendarHeader: Ms,
|
|
3424
|
+
calendarMonthLabel: Fs,
|
|
3367
3425
|
calendarNavButton: $s,
|
|
3368
|
-
calendarGrid:
|
|
3369
|
-
calendarDayHeader:
|
|
3370
|
-
calendarDayAvailable:
|
|
3371
|
-
calendarDayDisabled:
|
|
3372
|
-
calendarDaySelected:
|
|
3373
|
-
timesHeader:
|
|
3374
|
-
timeRow:
|
|
3375
|
-
timeButton:
|
|
3376
|
-
timeButtonSelected:
|
|
3377
|
-
field:
|
|
3378
|
-
fieldLabel:
|
|
3379
|
-
input:
|
|
3380
|
-
fieldset:
|
|
3381
|
-
radioRow:
|
|
3382
|
-
radioOption:
|
|
3383
|
-
faqBelowActions:
|
|
3384
|
-
faq:
|
|
3385
|
-
faqHeader:
|
|
3386
|
-
faqItem:
|
|
3387
|
-
faqQuestion:
|
|
3388
|
-
faqAnswer:
|
|
3389
|
-
faqChevron:
|
|
3390
|
-
errorText:
|
|
3391
|
-
actionsRow:
|
|
3392
|
-
linkButton:
|
|
3393
|
-
primaryButton:
|
|
3394
|
-
successCheckCircle:
|
|
3395
|
-
summaryCard:
|
|
3396
|
-
summaryRow:
|
|
3397
|
-
summaryIcon:
|
|
3398
|
-
},
|
|
3426
|
+
calendarGrid: Ws,
|
|
3427
|
+
calendarDayHeader: Hs,
|
|
3428
|
+
calendarDayAvailable: Vs,
|
|
3429
|
+
calendarDayDisabled: qs,
|
|
3430
|
+
calendarDaySelected: Gs,
|
|
3431
|
+
timesHeader: Us,
|
|
3432
|
+
timeRow: Ys,
|
|
3433
|
+
timeButton: Zs,
|
|
3434
|
+
timeButtonSelected: Ks,
|
|
3435
|
+
field: zs,
|
|
3436
|
+
fieldLabel: Js,
|
|
3437
|
+
input: Xs,
|
|
3438
|
+
fieldset: Qs,
|
|
3439
|
+
radioRow: eo,
|
|
3440
|
+
radioOption: to,
|
|
3441
|
+
faqBelowActions: ro,
|
|
3442
|
+
faq: no,
|
|
3443
|
+
faqHeader: ao,
|
|
3444
|
+
faqItem: so,
|
|
3445
|
+
faqQuestion: oo,
|
|
3446
|
+
faqAnswer: io,
|
|
3447
|
+
faqChevron: lo,
|
|
3448
|
+
errorText: co,
|
|
3449
|
+
actionsRow: uo,
|
|
3450
|
+
linkButton: ho,
|
|
3451
|
+
primaryButton: fo,
|
|
3452
|
+
successCheckCircle: mo,
|
|
3453
|
+
summaryCard: po,
|
|
3454
|
+
summaryRow: go,
|
|
3455
|
+
summaryIcon: _o
|
|
3456
|
+
}, bo = {
|
|
3399
3457
|
loading: !0,
|
|
3400
3458
|
error: null,
|
|
3401
3459
|
availableSlots: [],
|
|
@@ -3409,11 +3467,11 @@ function $o({
|
|
|
3409
3467
|
address: s,
|
|
3410
3468
|
appearance: o,
|
|
3411
3469
|
onScheduled: i,
|
|
3412
|
-
onDone:
|
|
3470
|
+
onDone: m,
|
|
3413
3471
|
onReady: f,
|
|
3414
|
-
onError:
|
|
3472
|
+
onError: d
|
|
3415
3473
|
}) {
|
|
3416
|
-
const
|
|
3474
|
+
const u = Nt(), h = Pe(o), [p, _] = E(bo), [C, S] = E("select"), [k, H] = E(null), [P, Y] = E(null), [j, ne] = E(null), [F, oe] = E(r ?? ""), [U, A] = E(qe(a ?? "")), [$, Z] = E(null), [ae, z] = E(""), [K, q] = E(!1), [ie, ue] = E(null), v = G(r);
|
|
3417
3475
|
v.current = r;
|
|
3418
3476
|
const x = G(a);
|
|
3419
3477
|
x.current = a, se(() => {
|
|
@@ -3422,13 +3480,13 @@ function $o({
|
|
|
3422
3480
|
let N = !1;
|
|
3423
3481
|
return (async () => {
|
|
3424
3482
|
try {
|
|
3425
|
-
const L = await
|
|
3483
|
+
const L = await u.getCustomerContact({
|
|
3426
3484
|
opendoorOfferRequestId: e
|
|
3427
3485
|
});
|
|
3428
3486
|
if (N) return;
|
|
3429
3487
|
oe(
|
|
3430
3488
|
(B) => !v.current && !B && L.fullName ? L.fullName : B
|
|
3431
|
-
),
|
|
3489
|
+
), A(
|
|
3432
3490
|
(B) => !x.current && !B && L.phoneNumber ? qe(L.phoneNumber) : B
|
|
3433
3491
|
);
|
|
3434
3492
|
} catch {
|
|
@@ -3436,13 +3494,13 @@ function $o({
|
|
|
3436
3494
|
})(), () => {
|
|
3437
3495
|
N = !0;
|
|
3438
3496
|
};
|
|
3439
|
-
}, [
|
|
3497
|
+
}, [u, e]), se(() => {
|
|
3440
3498
|
let N = !1;
|
|
3441
3499
|
return (async () => {
|
|
3442
3500
|
try {
|
|
3443
|
-
const L = await
|
|
3501
|
+
const L = await u.getAssessmentSlots({ offerId: e });
|
|
3444
3502
|
if (N) return;
|
|
3445
|
-
if (
|
|
3503
|
+
if (_({
|
|
3446
3504
|
loading: !1,
|
|
3447
3505
|
error: null,
|
|
3448
3506
|
availableSlots: L.availableSlots,
|
|
@@ -3450,8 +3508,8 @@ function $o({
|
|
|
3450
3508
|
timezone: L.timezone
|
|
3451
3509
|
}), L.availableSlots.length > 0)
|
|
3452
3510
|
ne(
|
|
3453
|
-
|
|
3454
|
-
|
|
3511
|
+
vo(
|
|
3512
|
+
yt(L.availableSlots[0], L.timezone)
|
|
3455
3513
|
)
|
|
3456
3514
|
);
|
|
3457
3515
|
else {
|
|
@@ -3462,40 +3520,40 @@ function $o({
|
|
|
3462
3520
|
} catch (L) {
|
|
3463
3521
|
const B = L instanceof Error ? L : new Error(String(L));
|
|
3464
3522
|
if (N) return;
|
|
3465
|
-
|
|
3523
|
+
_((le) => ({ ...le, loading: !1, error: B }));
|
|
3466
3524
|
const M = /* @__PURE__ */ new Date();
|
|
3467
|
-
ne({ year: M.getFullYear(), month: M.getMonth() }),
|
|
3525
|
+
ne({ year: M.getFullYear(), month: M.getMonth() }), d == null || d(B);
|
|
3468
3526
|
}
|
|
3469
3527
|
})(), () => {
|
|
3470
3528
|
N = !0;
|
|
3471
3529
|
};
|
|
3472
|
-
}, [
|
|
3473
|
-
const y =
|
|
3530
|
+
}, [u, e]);
|
|
3531
|
+
const y = Se(() => {
|
|
3474
3532
|
const N = /* @__PURE__ */ new Map();
|
|
3475
|
-
for (const L of
|
|
3476
|
-
const B =
|
|
3533
|
+
for (const L of p.availableSlots) {
|
|
3534
|
+
const B = yt(L, p.timezone), M = N.get(B) ?? [];
|
|
3477
3535
|
M.push(L), N.set(B, M);
|
|
3478
3536
|
}
|
|
3479
3537
|
return N;
|
|
3480
|
-
}, [
|
|
3481
|
-
if (
|
|
3538
|
+
}, [p.availableSlots, p.timezone]);
|
|
3539
|
+
if (p.loading || !j)
|
|
3482
3540
|
return /* @__PURE__ */ t.jsx(
|
|
3483
3541
|
"div",
|
|
3484
3542
|
{
|
|
3485
|
-
className:
|
|
3486
|
-
style:
|
|
3543
|
+
className: g.root,
|
|
3544
|
+
style: h,
|
|
3487
3545
|
"data-testid": "schedule-assessment-loading",
|
|
3488
|
-
children: /* @__PURE__ */ t.jsx("div", { className:
|
|
3546
|
+
children: /* @__PURE__ */ t.jsx("div", { className: g.card, children: /* @__PURE__ */ t.jsx("p", { className: g.subtitle, children: "Loading available times…" }) })
|
|
3489
3547
|
}
|
|
3490
3548
|
);
|
|
3491
|
-
if (
|
|
3549
|
+
if (p.error)
|
|
3492
3550
|
return /* @__PURE__ */ t.jsx(
|
|
3493
3551
|
"div",
|
|
3494
3552
|
{
|
|
3495
|
-
className:
|
|
3496
|
-
style:
|
|
3553
|
+
className: g.root,
|
|
3554
|
+
style: h,
|
|
3497
3555
|
"data-testid": "schedule-assessment-error",
|
|
3498
|
-
children: /* @__PURE__ */ t.jsx("div", { className:
|
|
3556
|
+
children: /* @__PURE__ */ t.jsx("div", { className: g.card, children: /* @__PURE__ */ t.jsx("p", { className: g.subtitle, children: "We couldn't load available times. Please try again in a few minutes." }) })
|
|
3499
3557
|
}
|
|
3500
3558
|
);
|
|
3501
3559
|
if (C === "success") {
|
|
@@ -3503,11 +3561,11 @@ function $o({
|
|
|
3503
3561
|
return /* @__PURE__ */ t.jsx(
|
|
3504
3562
|
"div",
|
|
3505
3563
|
{
|
|
3506
|
-
className:
|
|
3507
|
-
style:
|
|
3564
|
+
className: g.root,
|
|
3565
|
+
style: h,
|
|
3508
3566
|
"data-testid": "schedule-assessment-success",
|
|
3509
|
-
children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
3510
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
3567
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: g.card, children: [
|
|
3568
|
+
/* @__PURE__ */ t.jsx("div", { className: g.successCheckCircle, "aria-hidden": "true", children: /* @__PURE__ */ t.jsx("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", children: /* @__PURE__ */ t.jsx(
|
|
3511
3569
|
"path",
|
|
3512
3570
|
{
|
|
3513
3571
|
d: "M5 10.5l3 3 7-7",
|
|
@@ -3517,21 +3575,21 @@ function $o({
|
|
|
3517
3575
|
strokeLinejoin: "round"
|
|
3518
3576
|
}
|
|
3519
3577
|
) }) }),
|
|
3520
|
-
/* @__PURE__ */ t.jsx("h2", { className:
|
|
3521
|
-
/* @__PURE__ */ t.jsx("p", { className:
|
|
3522
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
3578
|
+
/* @__PURE__ */ t.jsx("h2", { className: g.title, children: F ? `${yo(F)}, your assessment is scheduled!` : "Your assessment is scheduled!" }),
|
|
3579
|
+
/* @__PURE__ */ t.jsx("p", { className: g.subtitle, children: "A calendar invite has been sent to your email address." }),
|
|
3580
|
+
/* @__PURE__ */ t.jsxs("div", { className: g.summaryCard, children: [
|
|
3523
3581
|
N && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
3524
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
3525
|
-
/* @__PURE__ */ t.jsx(ko, {}),
|
|
3526
|
-
/* @__PURE__ */ t.jsx("span", { children: bt(N, m.timezone) })
|
|
3527
|
-
] }),
|
|
3528
|
-
/* @__PURE__ */ t.jsxs("div", { className: p.summaryRow, children: [
|
|
3582
|
+
/* @__PURE__ */ t.jsxs("div", { className: g.summaryRow, children: [
|
|
3529
3583
|
/* @__PURE__ */ t.jsx(jo, {}),
|
|
3530
|
-
/* @__PURE__ */ t.jsx("span", { children:
|
|
3584
|
+
/* @__PURE__ */ t.jsx("span", { children: vt(N, p.timezone) })
|
|
3585
|
+
] }),
|
|
3586
|
+
/* @__PURE__ */ t.jsxs("div", { className: g.summaryRow, children: [
|
|
3587
|
+
/* @__PURE__ */ t.jsx(No, {}),
|
|
3588
|
+
/* @__PURE__ */ t.jsx("span", { children: xt(N, p.timezone) })
|
|
3531
3589
|
] })
|
|
3532
3590
|
] }),
|
|
3533
|
-
s && /* @__PURE__ */ t.jsxs("div", { className:
|
|
3534
|
-
/* @__PURE__ */ t.jsx(
|
|
3591
|
+
s && /* @__PURE__ */ t.jsxs("div", { className: g.summaryRow, children: [
|
|
3592
|
+
/* @__PURE__ */ t.jsx(Io, {}),
|
|
3535
3593
|
/* @__PURE__ */ t.jsx("span", { children: s })
|
|
3536
3594
|
] })
|
|
3537
3595
|
] }),
|
|
@@ -3539,8 +3597,8 @@ function $o({
|
|
|
3539
3597
|
"button",
|
|
3540
3598
|
{
|
|
3541
3599
|
type: "button",
|
|
3542
|
-
className:
|
|
3543
|
-
onClick: () =>
|
|
3600
|
+
className: g.primaryButton,
|
|
3601
|
+
onClick: () => m == null ? void 0 : m(),
|
|
3544
3602
|
children: "Done"
|
|
3545
3603
|
}
|
|
3546
3604
|
)
|
|
@@ -3549,26 +3607,26 @@ function $o({
|
|
|
3549
3607
|
);
|
|
3550
3608
|
}
|
|
3551
3609
|
if (C === "confirm") {
|
|
3552
|
-
const N = U.replace(/\D/g, ""), L = !K &&
|
|
3610
|
+
const N = U.replace(/\D/g, ""), L = !K && F.trim().length > 0 && N.length >= 10 && $ !== null && (!$ || ae.trim().length > 0), B = async () => {
|
|
3553
3611
|
if (!(!L || !P)) {
|
|
3554
3612
|
q(!0), ue(null);
|
|
3555
3613
|
try {
|
|
3556
|
-
const M =
|
|
3614
|
+
const M = $ ? `Customer: ${F.trim()}. Access instructions: ${ae.trim()}` : `Customer: ${F.trim()}. No gate code or entry restrictions.`, le = await u.scheduleAssessment({
|
|
3557
3615
|
offerId: e,
|
|
3558
3616
|
selectedInspectionTime: P,
|
|
3559
3617
|
reminderPhone: U.replace(/\D/g, ""),
|
|
3560
3618
|
notes: M
|
|
3561
3619
|
});
|
|
3562
|
-
|
|
3620
|
+
S("success");
|
|
3563
3621
|
try {
|
|
3564
3622
|
await (i == null ? void 0 : i(le.visitId));
|
|
3565
3623
|
} catch (xe) {
|
|
3566
3624
|
const ge = xe instanceof Error ? xe : new Error(String(xe));
|
|
3567
|
-
|
|
3625
|
+
d == null || d(ge);
|
|
3568
3626
|
}
|
|
3569
3627
|
} catch (M) {
|
|
3570
3628
|
const le = M instanceof Error ? M : new Error(String(M));
|
|
3571
|
-
ue(le.message),
|
|
3629
|
+
ue(le.message), d == null || d(le);
|
|
3572
3630
|
} finally {
|
|
3573
3631
|
q(!1);
|
|
3574
3632
|
}
|
|
@@ -3577,63 +3635,63 @@ function $o({
|
|
|
3577
3635
|
return /* @__PURE__ */ t.jsx(
|
|
3578
3636
|
"div",
|
|
3579
3637
|
{
|
|
3580
|
-
className:
|
|
3581
|
-
style:
|
|
3638
|
+
className: g.root,
|
|
3639
|
+
style: h,
|
|
3582
3640
|
"data-testid": "schedule-assessment-confirm",
|
|
3583
|
-
children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
3584
|
-
/* @__PURE__ */ t.jsx("h2", { className:
|
|
3585
|
-
/* @__PURE__ */ t.jsxs("label", { className:
|
|
3586
|
-
/* @__PURE__ */ t.jsx("span", { className:
|
|
3641
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: g.card, children: [
|
|
3642
|
+
/* @__PURE__ */ t.jsx("h2", { className: g.title, children: "Confirm your details" }),
|
|
3643
|
+
/* @__PURE__ */ t.jsxs("label", { className: g.field, children: [
|
|
3644
|
+
/* @__PURE__ */ t.jsx("span", { className: g.fieldLabel, children: "Customer name" }),
|
|
3587
3645
|
/* @__PURE__ */ t.jsx(
|
|
3588
3646
|
"input",
|
|
3589
3647
|
{
|
|
3590
|
-
className:
|
|
3648
|
+
className: g.input,
|
|
3591
3649
|
type: "text",
|
|
3592
|
-
value:
|
|
3650
|
+
value: F,
|
|
3593
3651
|
onChange: (M) => oe(M.target.value),
|
|
3594
3652
|
disabled: K
|
|
3595
3653
|
}
|
|
3596
3654
|
)
|
|
3597
3655
|
] }),
|
|
3598
|
-
/* @__PURE__ */ t.jsxs("label", { className:
|
|
3599
|
-
/* @__PURE__ */ t.jsx("span", { className:
|
|
3656
|
+
/* @__PURE__ */ t.jsxs("label", { className: g.field, children: [
|
|
3657
|
+
/* @__PURE__ */ t.jsx("span", { className: g.fieldLabel, children: "Phone number" }),
|
|
3600
3658
|
/* @__PURE__ */ t.jsx(
|
|
3601
3659
|
"input",
|
|
3602
3660
|
{
|
|
3603
|
-
className:
|
|
3661
|
+
className: g.input,
|
|
3604
3662
|
type: "tel",
|
|
3605
3663
|
inputMode: "tel",
|
|
3606
3664
|
autoComplete: "tel",
|
|
3607
3665
|
placeholder: "(555) 555-5555",
|
|
3608
3666
|
value: U,
|
|
3609
|
-
onChange: (M) =>
|
|
3667
|
+
onChange: (M) => A(qe(M.target.value)),
|
|
3610
3668
|
disabled: K
|
|
3611
3669
|
}
|
|
3612
3670
|
)
|
|
3613
3671
|
] }),
|
|
3614
|
-
/* @__PURE__ */ t.jsxs("fieldset", { className:
|
|
3615
|
-
/* @__PURE__ */ t.jsx("legend", { className:
|
|
3616
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
3617
|
-
/* @__PURE__ */ t.jsxs("label", { className:
|
|
3672
|
+
/* @__PURE__ */ t.jsxs("fieldset", { className: g.fieldset, children: [
|
|
3673
|
+
/* @__PURE__ */ t.jsx("legend", { className: g.fieldLabel, children: "Are there gate codes or entry restrictions?" }),
|
|
3674
|
+
/* @__PURE__ */ t.jsxs("div", { className: g.radioRow, children: [
|
|
3675
|
+
/* @__PURE__ */ t.jsxs("label", { className: g.radioOption, children: [
|
|
3618
3676
|
/* @__PURE__ */ t.jsx(
|
|
3619
3677
|
"input",
|
|
3620
3678
|
{
|
|
3621
3679
|
type: "radio",
|
|
3622
3680
|
name: "gate-code",
|
|
3623
|
-
checked:
|
|
3681
|
+
checked: $ === !0,
|
|
3624
3682
|
onChange: () => Z(!0),
|
|
3625
3683
|
disabled: K
|
|
3626
3684
|
}
|
|
3627
3685
|
),
|
|
3628
3686
|
/* @__PURE__ */ t.jsx("span", { children: "Yes" })
|
|
3629
3687
|
] }),
|
|
3630
|
-
/* @__PURE__ */ t.jsxs("label", { className:
|
|
3688
|
+
/* @__PURE__ */ t.jsxs("label", { className: g.radioOption, children: [
|
|
3631
3689
|
/* @__PURE__ */ t.jsx(
|
|
3632
3690
|
"input",
|
|
3633
3691
|
{
|
|
3634
3692
|
type: "radio",
|
|
3635
3693
|
name: "gate-code",
|
|
3636
|
-
checked:
|
|
3694
|
+
checked: $ === !1,
|
|
3637
3695
|
onChange: () => Z(!1),
|
|
3638
3696
|
disabled: K
|
|
3639
3697
|
}
|
|
@@ -3642,12 +3700,12 @@ function $o({
|
|
|
3642
3700
|
] })
|
|
3643
3701
|
] })
|
|
3644
3702
|
] }),
|
|
3645
|
-
|
|
3646
|
-
/* @__PURE__ */ t.jsx("span", { className:
|
|
3703
|
+
$ && /* @__PURE__ */ t.jsxs("label", { className: g.field, children: [
|
|
3704
|
+
/* @__PURE__ */ t.jsx("span", { className: g.fieldLabel, children: "Please provide access instructions for your home." }),
|
|
3647
3705
|
/* @__PURE__ */ t.jsx(
|
|
3648
3706
|
"input",
|
|
3649
3707
|
{
|
|
3650
|
-
className:
|
|
3708
|
+
className: g.input,
|
|
3651
3709
|
type: "text",
|
|
3652
3710
|
placeholder: "Gate code, directions, etc.",
|
|
3653
3711
|
value: ae,
|
|
@@ -3656,14 +3714,14 @@ function $o({
|
|
|
3656
3714
|
}
|
|
3657
3715
|
)
|
|
3658
3716
|
] }),
|
|
3659
|
-
ie && /* @__PURE__ */ t.jsx("p", { className:
|
|
3660
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
3717
|
+
ie && /* @__PURE__ */ t.jsx("p", { className: g.errorText, children: ie }),
|
|
3718
|
+
/* @__PURE__ */ t.jsxs("div", { className: g.actionsRow, children: [
|
|
3661
3719
|
/* @__PURE__ */ t.jsx(
|
|
3662
3720
|
"button",
|
|
3663
3721
|
{
|
|
3664
3722
|
type: "button",
|
|
3665
|
-
className:
|
|
3666
|
-
onClick: () =>
|
|
3723
|
+
className: g.linkButton,
|
|
3724
|
+
onClick: () => S("select"),
|
|
3667
3725
|
disabled: K,
|
|
3668
3726
|
children: "← Back"
|
|
3669
3727
|
}
|
|
@@ -3672,71 +3730,71 @@ function $o({
|
|
|
3672
3730
|
"button",
|
|
3673
3731
|
{
|
|
3674
3732
|
type: "button",
|
|
3675
|
-
className:
|
|
3733
|
+
className: g.primaryButton,
|
|
3676
3734
|
onClick: () => void B(),
|
|
3677
3735
|
disabled: !L,
|
|
3678
3736
|
children: K ? "Scheduling…" : "Schedule"
|
|
3679
3737
|
}
|
|
3680
3738
|
)
|
|
3681
3739
|
] }),
|
|
3682
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
3740
|
+
/* @__PURE__ */ t.jsx("div", { className: g.faqBelowActions, children: /* @__PURE__ */ t.jsx(Lo, { items: Eo }) })
|
|
3683
3741
|
] })
|
|
3684
3742
|
}
|
|
3685
3743
|
);
|
|
3686
3744
|
}
|
|
3687
|
-
const R =
|
|
3745
|
+
const R = xo(j), J = Co(j), ye = wo(j, y), he = ko(j, y), me = k ? y.get(k) ?? [] : [], pe = me[0] ? vt(new Date(me[0]), p.timezone) : null;
|
|
3688
3746
|
return /* @__PURE__ */ t.jsx(
|
|
3689
3747
|
"div",
|
|
3690
3748
|
{
|
|
3691
|
-
className:
|
|
3692
|
-
style:
|
|
3749
|
+
className: g.root,
|
|
3750
|
+
style: h,
|
|
3693
3751
|
"data-testid": "schedule-assessment-flow",
|
|
3694
|
-
children: /* @__PURE__ */ t.jsx("div", { className:
|
|
3695
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
3696
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
3697
|
-
/* @__PURE__ */ t.jsx("h2", { className:
|
|
3698
|
-
/* @__PURE__ */ t.jsx("p", { className:
|
|
3752
|
+
children: /* @__PURE__ */ t.jsx("div", { className: g.card, children: /* @__PURE__ */ t.jsxs("div", { className: g.stepLayout, children: [
|
|
3753
|
+
/* @__PURE__ */ t.jsxs("div", { className: g.leftColumn, children: [
|
|
3754
|
+
/* @__PURE__ */ t.jsxs("div", { className: g.introHeader, children: [
|
|
3755
|
+
/* @__PURE__ */ t.jsx("h2", { className: g.titleLarge, children: "Schedule your assessment" }),
|
|
3756
|
+
/* @__PURE__ */ t.jsx("p", { className: g.subtitleLeft, children: "Pick a time that works for you." })
|
|
3699
3757
|
] }),
|
|
3700
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
3701
|
-
/* @__PURE__ */ t.jsx("p", { className:
|
|
3702
|
-
/* @__PURE__ */ t.jsx("p", { className:
|
|
3758
|
+
/* @__PURE__ */ t.jsx("div", { className: g.featuresList, children: So.map((N) => /* @__PURE__ */ t.jsxs("div", { className: g.feature, children: [
|
|
3759
|
+
/* @__PURE__ */ t.jsx("p", { className: g.featureTitle, children: N.title }),
|
|
3760
|
+
/* @__PURE__ */ t.jsx("p", { className: g.featureDescription, children: N.description })
|
|
3703
3761
|
] }, N.title)) })
|
|
3704
3762
|
] }),
|
|
3705
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
3706
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
3763
|
+
/* @__PURE__ */ t.jsxs("div", { className: g.schedule, children: [
|
|
3764
|
+
/* @__PURE__ */ t.jsxs("div", { className: g.calendarHeader, children: [
|
|
3707
3765
|
/* @__PURE__ */ t.jsx(
|
|
3708
3766
|
"button",
|
|
3709
3767
|
{
|
|
3710
3768
|
type: "button",
|
|
3711
|
-
className:
|
|
3712
|
-
onClick: () => ne(
|
|
3769
|
+
className: g.calendarNavButton,
|
|
3770
|
+
onClick: () => ne(Ct(j, -1)),
|
|
3713
3771
|
disabled: !ye,
|
|
3714
3772
|
"aria-label": "Previous month",
|
|
3715
3773
|
children: "‹"
|
|
3716
3774
|
}
|
|
3717
3775
|
),
|
|
3718
|
-
/* @__PURE__ */ t.jsx("span", { className:
|
|
3776
|
+
/* @__PURE__ */ t.jsx("span", { className: g.calendarMonthLabel, children: J }),
|
|
3719
3777
|
/* @__PURE__ */ t.jsx(
|
|
3720
3778
|
"button",
|
|
3721
3779
|
{
|
|
3722
3780
|
type: "button",
|
|
3723
|
-
className:
|
|
3724
|
-
onClick: () => ne(
|
|
3781
|
+
className: g.calendarNavButton,
|
|
3782
|
+
onClick: () => ne(Ct(j, 1)),
|
|
3725
3783
|
disabled: !he,
|
|
3726
3784
|
"aria-label": "Next month",
|
|
3727
3785
|
children: "›"
|
|
3728
3786
|
}
|
|
3729
3787
|
)
|
|
3730
3788
|
] }),
|
|
3731
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
3732
|
-
["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"].map((N) => /* @__PURE__ */ t.jsx("div", { className:
|
|
3789
|
+
/* @__PURE__ */ t.jsxs("div", { className: g.calendarGrid, children: [
|
|
3790
|
+
["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"].map((N) => /* @__PURE__ */ t.jsx("div", { className: g.calendarDayHeader, children: N }, N)),
|
|
3733
3791
|
R.map((N, L) => {
|
|
3734
3792
|
const B = N ? y.has(N.key) : !1, M = !!N && N.key === k;
|
|
3735
3793
|
return /* @__PURE__ */ t.jsx(
|
|
3736
3794
|
"button",
|
|
3737
3795
|
{
|
|
3738
3796
|
type: "button",
|
|
3739
|
-
className: M ?
|
|
3797
|
+
className: M ? g.calendarDaySelected : B ? g.calendarDayAvailable : g.calendarDayDisabled,
|
|
3740
3798
|
onClick: () => {
|
|
3741
3799
|
N && B && (H(N.key), Y(null));
|
|
3742
3800
|
},
|
|
@@ -3749,19 +3807,19 @@ function $o({
|
|
|
3749
3807
|
})
|
|
3750
3808
|
] }),
|
|
3751
3809
|
pe && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
3752
|
-
/* @__PURE__ */ t.jsxs("p", { className:
|
|
3810
|
+
/* @__PURE__ */ t.jsxs("p", { className: g.timesHeader, children: [
|
|
3753
3811
|
"Available times for ",
|
|
3754
3812
|
pe
|
|
3755
3813
|
] }),
|
|
3756
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
3814
|
+
/* @__PURE__ */ t.jsx("div", { className: g.timeRow, children: me.map((N) => {
|
|
3757
3815
|
const L = N === P;
|
|
3758
3816
|
return /* @__PURE__ */ t.jsx(
|
|
3759
3817
|
"button",
|
|
3760
3818
|
{
|
|
3761
3819
|
type: "button",
|
|
3762
|
-
className: L ?
|
|
3820
|
+
className: L ? g.timeButtonSelected : g.timeButton,
|
|
3763
3821
|
onClick: () => Y(N),
|
|
3764
|
-
children:
|
|
3822
|
+
children: xt(new Date(N), p.timezone)
|
|
3765
3823
|
},
|
|
3766
3824
|
N
|
|
3767
3825
|
);
|
|
@@ -3771,8 +3829,8 @@ function $o({
|
|
|
3771
3829
|
"button",
|
|
3772
3830
|
{
|
|
3773
3831
|
type: "button",
|
|
3774
|
-
className:
|
|
3775
|
-
onClick: () =>
|
|
3832
|
+
className: g.primaryButton,
|
|
3833
|
+
onClick: () => S("confirm"),
|
|
3776
3834
|
disabled: !P,
|
|
3777
3835
|
children: "Continue"
|
|
3778
3836
|
}
|
|
@@ -3782,14 +3840,14 @@ function $o({
|
|
|
3782
3840
|
}
|
|
3783
3841
|
);
|
|
3784
3842
|
}
|
|
3785
|
-
function
|
|
3843
|
+
function yo(e) {
|
|
3786
3844
|
return e.trim().split(/\s+/)[0] ?? "";
|
|
3787
3845
|
}
|
|
3788
3846
|
function qe(e) {
|
|
3789
3847
|
const r = e.replace(/\D/g, "").slice(0, 10);
|
|
3790
3848
|
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)}`;
|
|
3791
3849
|
}
|
|
3792
|
-
function
|
|
3850
|
+
function yt(e, r) {
|
|
3793
3851
|
const a = new Date(e);
|
|
3794
3852
|
return new Intl.DateTimeFormat("en-CA", {
|
|
3795
3853
|
timeZone: r,
|
|
@@ -3798,11 +3856,11 @@ function _t(e, r) {
|
|
|
3798
3856
|
day: "2-digit"
|
|
3799
3857
|
}).format(a);
|
|
3800
3858
|
}
|
|
3801
|
-
function
|
|
3859
|
+
function vo(e) {
|
|
3802
3860
|
const [r, a] = e.split("-").map((s) => parseInt(s, 10));
|
|
3803
3861
|
return { year: r, month: a - 1 };
|
|
3804
3862
|
}
|
|
3805
|
-
function
|
|
3863
|
+
function vt(e, r) {
|
|
3806
3864
|
return new Intl.DateTimeFormat(void 0, {
|
|
3807
3865
|
timeZone: r,
|
|
3808
3866
|
weekday: "long",
|
|
@@ -3810,7 +3868,7 @@ function bt(e, r) {
|
|
|
3810
3868
|
day: "numeric"
|
|
3811
3869
|
}).format(e);
|
|
3812
3870
|
}
|
|
3813
|
-
function
|
|
3871
|
+
function xt(e, r) {
|
|
3814
3872
|
return new Intl.DateTimeFormat(void 0, {
|
|
3815
3873
|
timeZone: r,
|
|
3816
3874
|
hour: "numeric",
|
|
@@ -3818,29 +3876,29 @@ function yt(e, r) {
|
|
|
3818
3876
|
hour12: !0
|
|
3819
3877
|
}).format(e);
|
|
3820
3878
|
}
|
|
3821
|
-
function
|
|
3879
|
+
function Ct(e, r) {
|
|
3822
3880
|
const a = e.year * 12 + e.month + r, s = Math.floor(a / 12), o = a - s * 12;
|
|
3823
3881
|
return { year: s, month: o };
|
|
3824
3882
|
}
|
|
3825
|
-
function
|
|
3826
|
-
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 = [],
|
|
3827
|
-
for (let
|
|
3828
|
-
const
|
|
3829
|
-
|
|
3830
|
-
key: `${
|
|
3831
|
-
day:
|
|
3883
|
+
function xo({ year: e, month: r }) {
|
|
3884
|
+
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 = [], m = String(e).padStart(4, "0"), f = String(r + 1).padStart(2, "0");
|
|
3885
|
+
for (let d = 0; d < o; d++) {
|
|
3886
|
+
const u = d - a + 1;
|
|
3887
|
+
u < 1 || u > s ? i.push(null) : i.push({
|
|
3888
|
+
key: `${m}-${f}-${String(u).padStart(2, "0")}`,
|
|
3889
|
+
day: u
|
|
3832
3890
|
});
|
|
3833
3891
|
}
|
|
3834
3892
|
return i;
|
|
3835
3893
|
}
|
|
3836
|
-
function
|
|
3894
|
+
function Co({ year: e, month: r }) {
|
|
3837
3895
|
return new Date(Date.UTC(e, r, 1)).toLocaleString(void 0, {
|
|
3838
3896
|
timeZone: "UTC",
|
|
3839
3897
|
month: "long",
|
|
3840
3898
|
year: "numeric"
|
|
3841
3899
|
});
|
|
3842
3900
|
}
|
|
3843
|
-
function
|
|
3901
|
+
function wo(e, r) {
|
|
3844
3902
|
for (const a of r.keys()) {
|
|
3845
3903
|
const [s, o] = a.split("-").map((i) => parseInt(i, 10));
|
|
3846
3904
|
if (s < e.year || s === e.year && o - 1 < e.month)
|
|
@@ -3848,7 +3906,7 @@ function Co(e, r) {
|
|
|
3848
3906
|
}
|
|
3849
3907
|
return !1;
|
|
3850
3908
|
}
|
|
3851
|
-
function
|
|
3909
|
+
function ko(e, r) {
|
|
3852
3910
|
for (const a of r.keys()) {
|
|
3853
3911
|
const [s, o] = a.split("-").map((i) => parseInt(i, 10));
|
|
3854
3912
|
if (s > e.year || s === e.year && o - 1 > e.month)
|
|
@@ -3856,7 +3914,7 @@ function wo(e, r) {
|
|
|
3856
3914
|
}
|
|
3857
3915
|
return !1;
|
|
3858
3916
|
}
|
|
3859
|
-
function
|
|
3917
|
+
function Je() {
|
|
3860
3918
|
return {
|
|
3861
3919
|
width: 16,
|
|
3862
3920
|
height: 16,
|
|
@@ -3867,28 +3925,28 @@ function ze() {
|
|
|
3867
3925
|
strokeLinecap: "round",
|
|
3868
3926
|
strokeLinejoin: "round",
|
|
3869
3927
|
"aria-hidden": !0,
|
|
3870
|
-
className:
|
|
3928
|
+
className: g.summaryIcon
|
|
3871
3929
|
};
|
|
3872
3930
|
}
|
|
3873
|
-
function
|
|
3874
|
-
return /* @__PURE__ */ t.jsxs("svg", { ...
|
|
3931
|
+
function jo() {
|
|
3932
|
+
return /* @__PURE__ */ t.jsxs("svg", { ...Je(), children: [
|
|
3875
3933
|
/* @__PURE__ */ t.jsx("rect", { x: "2", y: "3.5", width: "12", height: "11", rx: "1.5" }),
|
|
3876
3934
|
/* @__PURE__ */ t.jsx("path", { d: "M2 6.5h12M5.5 2v3M10.5 2v3" })
|
|
3877
3935
|
] });
|
|
3878
3936
|
}
|
|
3879
|
-
function
|
|
3880
|
-
return /* @__PURE__ */ t.jsxs("svg", { ...
|
|
3937
|
+
function No() {
|
|
3938
|
+
return /* @__PURE__ */ t.jsxs("svg", { ...Je(), children: [
|
|
3881
3939
|
/* @__PURE__ */ t.jsx("circle", { cx: "8", cy: "8", r: "6" }),
|
|
3882
3940
|
/* @__PURE__ */ t.jsx("path", { d: "M8 4.5V8l2.5 1.5" })
|
|
3883
3941
|
] });
|
|
3884
3942
|
}
|
|
3885
|
-
function
|
|
3886
|
-
return /* @__PURE__ */ t.jsxs("svg", { ...
|
|
3943
|
+
function Io() {
|
|
3944
|
+
return /* @__PURE__ */ t.jsxs("svg", { ...Je(), children: [
|
|
3887
3945
|
/* @__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" }),
|
|
3888
3946
|
/* @__PURE__ */ t.jsx("circle", { cx: "8", cy: "6.5", r: "1.5" })
|
|
3889
3947
|
] });
|
|
3890
3948
|
}
|
|
3891
|
-
const
|
|
3949
|
+
const So = [
|
|
3892
3950
|
{
|
|
3893
3951
|
title: "No extra preparation needed",
|
|
3894
3952
|
description: "No need to fix, clean, or stage your home."
|
|
@@ -3915,7 +3973,7 @@ const Io = [
|
|
|
3915
3973
|
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."
|
|
3916
3974
|
}
|
|
3917
3975
|
];
|
|
3918
|
-
function
|
|
3976
|
+
function Po() {
|
|
3919
3977
|
return /* @__PURE__ */ t.jsx(
|
|
3920
3978
|
"svg",
|
|
3921
3979
|
{
|
|
@@ -3928,34 +3986,34 @@ function So() {
|
|
|
3928
3986
|
strokeLinecap: "round",
|
|
3929
3987
|
strokeLinejoin: "round",
|
|
3930
3988
|
"aria-hidden": "true",
|
|
3931
|
-
className:
|
|
3989
|
+
className: g.faqChevron,
|
|
3932
3990
|
children: /* @__PURE__ */ t.jsx("path", { d: "M4 6l4 4 4-4" })
|
|
3933
3991
|
}
|
|
3934
3992
|
);
|
|
3935
3993
|
}
|
|
3936
|
-
function
|
|
3994
|
+
function Lo({
|
|
3937
3995
|
items: e
|
|
3938
3996
|
}) {
|
|
3939
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
3940
|
-
/* @__PURE__ */ t.jsx("h3", { className:
|
|
3941
|
-
e.map((r) => /* @__PURE__ */ t.jsxs("details", { className:
|
|
3942
|
-
/* @__PURE__ */ t.jsxs("summary", { className:
|
|
3997
|
+
return /* @__PURE__ */ t.jsxs("div", { className: g.faq, children: [
|
|
3998
|
+
/* @__PURE__ */ t.jsx("h3", { className: g.faqHeader, children: "Frequently asked questions" }),
|
|
3999
|
+
e.map((r) => /* @__PURE__ */ t.jsxs("details", { className: g.faqItem, children: [
|
|
4000
|
+
/* @__PURE__ */ t.jsxs("summary", { className: g.faqQuestion, children: [
|
|
3943
4001
|
/* @__PURE__ */ t.jsx("span", { children: r.title }),
|
|
3944
|
-
/* @__PURE__ */ t.jsx(
|
|
4002
|
+
/* @__PURE__ */ t.jsx(Po, {})
|
|
3945
4003
|
] }),
|
|
3946
|
-
/* @__PURE__ */ t.jsx("p", { className:
|
|
4004
|
+
/* @__PURE__ */ t.jsx("p", { className: g.faqAnswer, children: r.body })
|
|
3947
4005
|
] }, r.title))
|
|
3948
4006
|
] });
|
|
3949
4007
|
}
|
|
3950
4008
|
export {
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
|
|
3955
|
-
|
|
4009
|
+
Ro as AddressEntry,
|
|
4010
|
+
Mo as AddressMap,
|
|
4011
|
+
Bo as AddressUnitConfirmation,
|
|
4012
|
+
Oo as DTC_ONBOARDING_PAGE_IDS,
|
|
4013
|
+
Fo as DtcOnboardingFlow,
|
|
3956
4014
|
Do as OpendoorProvider,
|
|
3957
4015
|
$o as ScheduleAssessmentFlow,
|
|
3958
|
-
|
|
3959
|
-
|
|
3960
|
-
|
|
4016
|
+
cr as THEMES,
|
|
4017
|
+
ur as resolveAppearance,
|
|
4018
|
+
Nt as useOpendoorClient
|
|
3961
4019
|
};
|