@rpcbase/ui 0.53.0 → 0.54.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/AddressAutocompleteInput/index.d.ts.map +1 -1
- package/dist/helpers/index.d.ts +1 -0
- package/dist/helpers/index.d.ts.map +1 -1
- package/dist/helpers/useMapsLibrary.d.ts +4 -1
- package/dist/helpers/useMapsLibrary.d.ts.map +1 -1
- package/dist/index.js +464 -458
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,11 +1,88 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import * as _e from "react";
|
|
2
|
+
import xe, { useState as L, useEffect as $, useRef as I, useMemo as ye } from "react";
|
|
3
|
+
import le, { clsx as we } from "clsx";
|
|
4
4
|
import * as N from "@radix-ui/react-dialog";
|
|
5
5
|
import { XIcon as Ee } from "lucide-react";
|
|
6
|
-
import { Link as
|
|
7
|
-
const
|
|
8
|
-
|
|
6
|
+
import { Link as Te } from "react-router";
|
|
7
|
+
const mt = () => typeof navigator > "u" ? !1 : /Android|iPhone|iPad|iPod/i.test(navigator.userAgent);
|
|
8
|
+
function ke(e, t) {
|
|
9
|
+
e.src = t;
|
|
10
|
+
}
|
|
11
|
+
const je = (e) => {
|
|
12
|
+
var t, o, n, a = "The Google Maps JavaScript API", i = "google", u = "importLibrary", p = "__ib__", m = document, x = window, v = x[i] || (x[i] = {}), c = v.maps || (v.maps = {}), d = /* @__PURE__ */ new Set(), T = new URLSearchParams(), w = () => t || (t = new Promise(async (_, k) => {
|
|
13
|
+
await (o = m.createElement("script")), T.set("libraries", [...d] + "");
|
|
14
|
+
for (n in e)
|
|
15
|
+
T.set(n.replace(/[A-Z]/g, (y) => "_" + y[0].toLowerCase()), e[n]);
|
|
16
|
+
T.set("callback", i + ".maps." + p), ke(o, "https://maps.googleapis.com/maps/api/js?" + T), c[p] = _, o.onerror = () => t = k(Error(a + " could not load.")), o.nonce = m.querySelector("script[nonce]")?.nonce || "", m.head.append(o);
|
|
17
|
+
}));
|
|
18
|
+
c[u] ? console.warn(a + " only loads once. Ignoring:", e) : c[u] = (_, ...k) => d.add(_) && w().then(() => c[u](_, ...k));
|
|
19
|
+
}, Pe = (e) => `The setOptions() function should only be called once. The options passed to the additional call (${JSON.stringify(e)}) will be ignored.`, Re = (e) => `The google.maps.importLibrary() function is already defined, and @googlemaps/js-api-loader will use the existing function instead of overwriting it. The options passed to setOptions (${JSON.stringify(e)}) will be ignored.`, Ne = "No options were set before calling importLibrary. Make sure to configure the loader using setOptions().", Ae = "There already is a script loading the Google Maps JavaScript API, and no google.maps.importLibrary function is defined. @googlemaps/js-api-loader will proceed to bootstrap the API with the specified options, but the existing script might cause problems using the API. Make sure to remove the script loading the API.", he = process.env.NODE_ENV !== "production", ce = he ? (e) => {
|
|
20
|
+
console.warn(`[@googlemaps/js-api-loader] ${e}`);
|
|
21
|
+
} : () => {
|
|
22
|
+
}, Se = he ? (e) => {
|
|
23
|
+
console.info(`[@googlemaps/js-api-loader] ${e}`);
|
|
24
|
+
} : () => {
|
|
25
|
+
}, Oe = process.env.NODE_ENV !== "production";
|
|
26
|
+
let ie = !1;
|
|
27
|
+
function Me(e) {
|
|
28
|
+
if (ie) {
|
|
29
|
+
ce(Pe(e));
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
Le(e), ie = !0;
|
|
33
|
+
}
|
|
34
|
+
async function Ie(e) {
|
|
35
|
+
if (ie || ce(Ne), !window?.google?.maps?.importLibrary)
|
|
36
|
+
throw new Error("google.maps.importLibrary is not installed.");
|
|
37
|
+
return await google.maps.importLibrary(e);
|
|
38
|
+
}
|
|
39
|
+
function Le(e) {
|
|
40
|
+
const t = !!window.google?.maps?.importLibrary;
|
|
41
|
+
t ? Se(Re(e)) : Oe && document.querySelector('script[src*="maps.googleapis.com/maps/api/js"]') && ce(Ae), t || je(e);
|
|
42
|
+
}
|
|
43
|
+
let K = null, de = null;
|
|
44
|
+
const oe = /* @__PURE__ */ new Map(), De = (e) => {
|
|
45
|
+
if (!e) {
|
|
46
|
+
const t = new Error("useMapsLibrary: missing Google Maps API key");
|
|
47
|
+
return console.error(t.message), Promise.reject(t);
|
|
48
|
+
}
|
|
49
|
+
return K ? de !== e && console.warn(
|
|
50
|
+
"useMapsLibrary: ignoring attempt to re-initialize Google Maps with a different API key than the one already in use."
|
|
51
|
+
) : (de = e, Me({
|
|
52
|
+
key: e,
|
|
53
|
+
v: "weekly"
|
|
54
|
+
}), K = Ie("core").then(() => {
|
|
55
|
+
}).catch((t) => {
|
|
56
|
+
throw K = null, t;
|
|
57
|
+
})), K;
|
|
58
|
+
}, Ce = (e, t) => {
|
|
59
|
+
const o = String(e), n = oe.get(o);
|
|
60
|
+
if (n)
|
|
61
|
+
return n;
|
|
62
|
+
const a = De(t).then(() => {
|
|
63
|
+
if (typeof window > "u" || !window.google?.maps?.importLibrary)
|
|
64
|
+
throw new Error("useMapsLibrary: google.maps.importLibrary is not available.");
|
|
65
|
+
return window.google.maps.importLibrary(o);
|
|
66
|
+
}).then((i) => i).catch((i) => {
|
|
67
|
+
throw oe.delete(o), i;
|
|
68
|
+
});
|
|
69
|
+
return oe.set(o, a), a;
|
|
70
|
+
}, $e = (e, t) => {
|
|
71
|
+
const [o, n] = L(null);
|
|
72
|
+
return $(() => {
|
|
73
|
+
if (typeof window > "u")
|
|
74
|
+
return;
|
|
75
|
+
let a = !1;
|
|
76
|
+
return Ce(e, t).then((i) => {
|
|
77
|
+
a || n(i);
|
|
78
|
+
}).catch((i) => {
|
|
79
|
+
a || (console.error(`useMapsLibrary: failed to load ${String(e)} library`, i), n(null));
|
|
80
|
+
}), () => {
|
|
81
|
+
a = !0;
|
|
82
|
+
};
|
|
83
|
+
}, [e, t]), o;
|
|
84
|
+
};
|
|
85
|
+
var ee = { exports: {} }, B = {};
|
|
9
86
|
/**
|
|
10
87
|
* @license React
|
|
11
88
|
* react-jsx-runtime.production.js
|
|
@@ -15,29 +92,29 @@ var ee = { exports: {} }, X = {};
|
|
|
15
92
|
* This source code is licensed under the MIT license found in the
|
|
16
93
|
* LICENSE file in the root directory of this source tree.
|
|
17
94
|
*/
|
|
18
|
-
var
|
|
19
|
-
function
|
|
20
|
-
if (
|
|
21
|
-
|
|
22
|
-
var e = Symbol.for("react.transitional.element"),
|
|
23
|
-
function o(n, a,
|
|
24
|
-
var
|
|
25
|
-
if (
|
|
26
|
-
|
|
95
|
+
var fe;
|
|
96
|
+
function ze() {
|
|
97
|
+
if (fe) return B;
|
|
98
|
+
fe = 1;
|
|
99
|
+
var e = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
|
|
100
|
+
function o(n, a, i) {
|
|
101
|
+
var u = null;
|
|
102
|
+
if (i !== void 0 && (u = "" + i), a.key !== void 0 && (u = "" + a.key), "key" in a) {
|
|
103
|
+
i = {};
|
|
27
104
|
for (var p in a)
|
|
28
|
-
p !== "key" && (
|
|
29
|
-
} else
|
|
30
|
-
return a =
|
|
105
|
+
p !== "key" && (i[p] = a[p]);
|
|
106
|
+
} else i = a;
|
|
107
|
+
return a = i.ref, {
|
|
31
108
|
$$typeof: e,
|
|
32
109
|
type: n,
|
|
33
|
-
key:
|
|
110
|
+
key: u,
|
|
34
111
|
ref: a !== void 0 ? a : null,
|
|
35
|
-
props:
|
|
112
|
+
props: i
|
|
36
113
|
};
|
|
37
114
|
}
|
|
38
|
-
return
|
|
115
|
+
return B.Fragment = t, B.jsx = o, B.jsxs = o, B;
|
|
39
116
|
}
|
|
40
|
-
var
|
|
117
|
+
var J = {};
|
|
41
118
|
/**
|
|
42
119
|
* @license React
|
|
43
120
|
* react-jsx-runtime.development.js
|
|
@@ -47,322 +124,261 @@ var H = {};
|
|
|
47
124
|
* This source code is licensed under the MIT license found in the
|
|
48
125
|
* LICENSE file in the root directory of this source tree.
|
|
49
126
|
*/
|
|
50
|
-
var
|
|
51
|
-
function
|
|
52
|
-
return
|
|
53
|
-
function e(
|
|
54
|
-
if (
|
|
55
|
-
if (typeof
|
|
56
|
-
return
|
|
57
|
-
if (typeof
|
|
58
|
-
switch (
|
|
127
|
+
var me;
|
|
128
|
+
function Fe() {
|
|
129
|
+
return me || (me = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
130
|
+
function e(r) {
|
|
131
|
+
if (r == null) return null;
|
|
132
|
+
if (typeof r == "function")
|
|
133
|
+
return r.$$typeof === Z ? null : r.displayName || r.name || null;
|
|
134
|
+
if (typeof r == "string") return r;
|
|
135
|
+
switch (r) {
|
|
59
136
|
case k:
|
|
60
137
|
return "Fragment";
|
|
61
|
-
case
|
|
138
|
+
case M:
|
|
62
139
|
return "Profiler";
|
|
63
140
|
case y:
|
|
64
141
|
return "StrictMode";
|
|
65
|
-
case
|
|
142
|
+
case S:
|
|
66
143
|
return "Suspense";
|
|
67
|
-
case
|
|
144
|
+
case z:
|
|
68
145
|
return "SuspenseList";
|
|
69
|
-
case
|
|
146
|
+
case H:
|
|
70
147
|
return "Activity";
|
|
71
148
|
}
|
|
72
|
-
if (typeof
|
|
73
|
-
switch (typeof
|
|
149
|
+
if (typeof r == "object")
|
|
150
|
+
switch (typeof r.tag == "number" && console.error(
|
|
74
151
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
75
|
-
),
|
|
76
|
-
case
|
|
152
|
+
), r.$$typeof) {
|
|
153
|
+
case _:
|
|
77
154
|
return "Portal";
|
|
78
155
|
case P:
|
|
79
|
-
return
|
|
156
|
+
return r.displayName || "Context";
|
|
80
157
|
case j:
|
|
81
|
-
return (
|
|
158
|
+
return (r._context.displayName || "Context") + ".Consumer";
|
|
82
159
|
case A:
|
|
83
|
-
var
|
|
84
|
-
return
|
|
160
|
+
var l = r.render;
|
|
161
|
+
return r = r.displayName, r || (r = l.displayName || l.name || "", r = r !== "" ? "ForwardRef(" + r + ")" : "ForwardRef"), r;
|
|
85
162
|
case R:
|
|
86
|
-
return
|
|
87
|
-
case
|
|
88
|
-
|
|
163
|
+
return l = r.displayName || null, l !== null ? l : e(r.type) || "Memo";
|
|
164
|
+
case D:
|
|
165
|
+
l = r._payload, r = r._init;
|
|
89
166
|
try {
|
|
90
|
-
return e(
|
|
167
|
+
return e(r(l));
|
|
91
168
|
} catch {
|
|
92
169
|
}
|
|
93
170
|
}
|
|
94
171
|
return null;
|
|
95
172
|
}
|
|
96
|
-
function r
|
|
97
|
-
return "" +
|
|
173
|
+
function t(r) {
|
|
174
|
+
return "" + r;
|
|
98
175
|
}
|
|
99
|
-
function o(
|
|
176
|
+
function o(r) {
|
|
100
177
|
try {
|
|
101
|
-
r
|
|
102
|
-
var
|
|
178
|
+
t(r);
|
|
179
|
+
var l = !1;
|
|
103
180
|
} catch {
|
|
104
|
-
|
|
181
|
+
l = !0;
|
|
105
182
|
}
|
|
106
|
-
if (
|
|
107
|
-
|
|
108
|
-
var
|
|
109
|
-
return
|
|
110
|
-
|
|
183
|
+
if (l) {
|
|
184
|
+
l = console;
|
|
185
|
+
var h = l.error, g = typeof Symbol == "function" && Symbol.toStringTag && r[Symbol.toStringTag] || r.constructor.name || "Object";
|
|
186
|
+
return h.call(
|
|
187
|
+
l,
|
|
111
188
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
112
|
-
|
|
113
|
-
), r
|
|
189
|
+
g
|
|
190
|
+
), t(r);
|
|
114
191
|
}
|
|
115
192
|
}
|
|
116
|
-
function n(
|
|
117
|
-
if (
|
|
118
|
-
if (typeof
|
|
193
|
+
function n(r) {
|
|
194
|
+
if (r === k) return "<>";
|
|
195
|
+
if (typeof r == "object" && r !== null && r.$$typeof === D)
|
|
119
196
|
return "<...>";
|
|
120
197
|
try {
|
|
121
|
-
var
|
|
122
|
-
return
|
|
198
|
+
var l = e(r);
|
|
199
|
+
return l ? "<" + l + ">" : "<...>";
|
|
123
200
|
} catch {
|
|
124
201
|
return "<...>";
|
|
125
202
|
}
|
|
126
203
|
}
|
|
127
204
|
function a() {
|
|
128
|
-
var
|
|
129
|
-
return
|
|
205
|
+
var r = U.A;
|
|
206
|
+
return r === null ? null : r.getOwner();
|
|
130
207
|
}
|
|
131
|
-
function
|
|
208
|
+
function i() {
|
|
132
209
|
return Error("react-stack-top-frame");
|
|
133
210
|
}
|
|
134
|
-
function
|
|
135
|
-
if (
|
|
136
|
-
var
|
|
137
|
-
if (
|
|
211
|
+
function u(r) {
|
|
212
|
+
if (Q.call(r, "key")) {
|
|
213
|
+
var l = Object.getOwnPropertyDescriptor(r, "key").get;
|
|
214
|
+
if (l && l.isReactWarning) return !1;
|
|
138
215
|
}
|
|
139
|
-
return
|
|
216
|
+
return r.key !== void 0;
|
|
140
217
|
}
|
|
141
|
-
function p(
|
|
142
|
-
function
|
|
143
|
-
|
|
218
|
+
function p(r, l) {
|
|
219
|
+
function h() {
|
|
220
|
+
f || (f = !0, console.error(
|
|
144
221
|
"%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://react.dev/link/special-props)",
|
|
145
|
-
|
|
222
|
+
l
|
|
146
223
|
));
|
|
147
224
|
}
|
|
148
|
-
|
|
149
|
-
get:
|
|
225
|
+
h.isReactWarning = !0, Object.defineProperty(r, "key", {
|
|
226
|
+
get: h,
|
|
150
227
|
configurable: !0
|
|
151
228
|
});
|
|
152
229
|
}
|
|
153
230
|
function m() {
|
|
154
|
-
var
|
|
155
|
-
return
|
|
231
|
+
var r = e(this.type);
|
|
232
|
+
return E[r] || (E[r] = !0, console.error(
|
|
156
233
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
157
|
-
)),
|
|
234
|
+
)), r = this.props.ref, r !== void 0 ? r : null;
|
|
158
235
|
}
|
|
159
|
-
function x(
|
|
160
|
-
var
|
|
161
|
-
return
|
|
236
|
+
function x(r, l, h, g, C, V) {
|
|
237
|
+
var b = h.ref;
|
|
238
|
+
return r = {
|
|
162
239
|
$$typeof: w,
|
|
163
|
-
type:
|
|
164
|
-
key:
|
|
165
|
-
props:
|
|
166
|
-
_owner:
|
|
167
|
-
}, (
|
|
240
|
+
type: r,
|
|
241
|
+
key: l,
|
|
242
|
+
props: h,
|
|
243
|
+
_owner: g
|
|
244
|
+
}, (b !== void 0 ? b : null) !== null ? Object.defineProperty(r, "ref", {
|
|
168
245
|
enumerable: !1,
|
|
169
246
|
get: m
|
|
170
|
-
}) : Object.defineProperty(
|
|
247
|
+
}) : Object.defineProperty(r, "ref", { enumerable: !1, value: null }), r._store = {}, Object.defineProperty(r._store, "validated", {
|
|
171
248
|
configurable: !1,
|
|
172
249
|
enumerable: !1,
|
|
173
250
|
writable: !0,
|
|
174
251
|
value: 0
|
|
175
|
-
}), Object.defineProperty(
|
|
252
|
+
}), Object.defineProperty(r, "_debugInfo", {
|
|
176
253
|
configurable: !1,
|
|
177
254
|
enumerable: !1,
|
|
178
255
|
writable: !0,
|
|
179
256
|
value: null
|
|
180
|
-
}), Object.defineProperty(
|
|
257
|
+
}), Object.defineProperty(r, "_debugStack", {
|
|
181
258
|
configurable: !1,
|
|
182
259
|
enumerable: !1,
|
|
183
260
|
writable: !0,
|
|
184
|
-
value:
|
|
185
|
-
}), Object.defineProperty(
|
|
261
|
+
value: C
|
|
262
|
+
}), Object.defineProperty(r, "_debugTask", {
|
|
186
263
|
configurable: !1,
|
|
187
264
|
enumerable: !1,
|
|
188
265
|
writable: !0,
|
|
189
|
-
value:
|
|
190
|
-
}), Object.freeze && (Object.freeze(
|
|
266
|
+
value: V
|
|
267
|
+
}), Object.freeze && (Object.freeze(r.props), Object.freeze(r)), r;
|
|
191
268
|
}
|
|
192
|
-
function
|
|
193
|
-
var
|
|
194
|
-
if (
|
|
195
|
-
if (
|
|
196
|
-
if (te(
|
|
197
|
-
for (
|
|
198
|
-
|
|
199
|
-
Object.freeze && Object.freeze(
|
|
269
|
+
function v(r, l, h, g, C, V) {
|
|
270
|
+
var b = l.children;
|
|
271
|
+
if (b !== void 0)
|
|
272
|
+
if (g)
|
|
273
|
+
if (te(b)) {
|
|
274
|
+
for (g = 0; g < b.length; g++)
|
|
275
|
+
c(b[g]);
|
|
276
|
+
Object.freeze && Object.freeze(b);
|
|
200
277
|
} else
|
|
201
278
|
console.error(
|
|
202
279
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
203
280
|
);
|
|
204
|
-
else
|
|
205
|
-
if (
|
|
206
|
-
|
|
207
|
-
var
|
|
208
|
-
return
|
|
281
|
+
else c(b);
|
|
282
|
+
if (Q.call(l, "key")) {
|
|
283
|
+
b = e(r);
|
|
284
|
+
var Y = Object.keys(l).filter(function(ve) {
|
|
285
|
+
return ve !== "key";
|
|
209
286
|
});
|
|
210
|
-
|
|
287
|
+
g = 0 < Y.length ? "{key: someKey, " + Y.join(": ..., ") + ": ...}" : "{key: someKey}", q[b + g] || (Y = 0 < Y.length ? "{" + Y.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
211
288
|
`A props object containing a "key" prop is being spread into JSX:
|
|
212
289
|
let props = %s;
|
|
213
290
|
<%s {...props} />
|
|
214
291
|
React keys must be passed directly to JSX without using spread:
|
|
215
292
|
let props = %s;
|
|
216
293
|
<%s key={someKey} {...props} />`,
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
),
|
|
294
|
+
g,
|
|
295
|
+
b,
|
|
296
|
+
Y,
|
|
297
|
+
b
|
|
298
|
+
), q[b + g] = !0);
|
|
222
299
|
}
|
|
223
|
-
if (
|
|
224
|
-
|
|
225
|
-
for (var
|
|
226
|
-
|
|
227
|
-
} else
|
|
228
|
-
return
|
|
229
|
-
|
|
230
|
-
typeof
|
|
300
|
+
if (b = null, h !== void 0 && (o(h), b = "" + h), u(l) && (o(l.key), b = "" + l.key), "key" in l) {
|
|
301
|
+
h = {};
|
|
302
|
+
for (var re in l)
|
|
303
|
+
re !== "key" && (h[re] = l[re]);
|
|
304
|
+
} else h = l;
|
|
305
|
+
return b && p(
|
|
306
|
+
h,
|
|
307
|
+
typeof r == "function" ? r.displayName || r.name || "Unknown" : r
|
|
231
308
|
), x(
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
309
|
+
r,
|
|
310
|
+
b,
|
|
311
|
+
h,
|
|
235
312
|
a(),
|
|
236
|
-
|
|
237
|
-
|
|
313
|
+
C,
|
|
314
|
+
V
|
|
238
315
|
);
|
|
239
316
|
}
|
|
240
|
-
function
|
|
241
|
-
|
|
317
|
+
function c(r) {
|
|
318
|
+
d(r) ? r._store && (r._store.validated = 1) : typeof r == "object" && r !== null && r.$$typeof === D && (r._payload.status === "fulfilled" ? d(r._payload.value) && r._payload.value._store && (r._payload.value._store.validated = 1) : r._store && (r._store.validated = 1));
|
|
242
319
|
}
|
|
243
|
-
function
|
|
244
|
-
return typeof
|
|
320
|
+
function d(r) {
|
|
321
|
+
return typeof r == "object" && r !== null && r.$$typeof === w;
|
|
245
322
|
}
|
|
246
|
-
var T =
|
|
323
|
+
var T = xe, w = Symbol.for("react.transitional.element"), _ = Symbol.for("react.portal"), k = Symbol.for("react.fragment"), y = Symbol.for("react.strict_mode"), M = Symbol.for("react.profiler"), j = Symbol.for("react.consumer"), P = Symbol.for("react.context"), A = Symbol.for("react.forward_ref"), S = Symbol.for("react.suspense"), z = Symbol.for("react.suspense_list"), R = Symbol.for("react.memo"), D = Symbol.for("react.lazy"), H = Symbol.for("react.activity"), Z = Symbol.for("react.client.reference"), U = T.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Q = Object.prototype.hasOwnProperty, te = Array.isArray, F = console.createTask ? console.createTask : function() {
|
|
247
324
|
return null;
|
|
248
325
|
};
|
|
249
326
|
T = {
|
|
250
|
-
react_stack_bottom_frame: function(
|
|
251
|
-
return
|
|
327
|
+
react_stack_bottom_frame: function(r) {
|
|
328
|
+
return r();
|
|
252
329
|
}
|
|
253
330
|
};
|
|
254
|
-
var
|
|
331
|
+
var f, E = {}, G = T.react_stack_bottom_frame.bind(
|
|
255
332
|
T,
|
|
256
|
-
|
|
257
|
-
)(),
|
|
258
|
-
|
|
259
|
-
var
|
|
260
|
-
return
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
333
|
+
i
|
|
334
|
+
)(), W = F(n(i)), q = {};
|
|
335
|
+
J.Fragment = k, J.jsx = function(r, l, h) {
|
|
336
|
+
var g = 1e4 > U.recentlyCreatedOwnerStacks++;
|
|
337
|
+
return v(
|
|
338
|
+
r,
|
|
339
|
+
l,
|
|
340
|
+
h,
|
|
264
341
|
!1,
|
|
265
|
-
|
|
266
|
-
|
|
342
|
+
g ? Error("react-stack-top-frame") : G,
|
|
343
|
+
g ? F(n(r)) : W
|
|
267
344
|
);
|
|
268
|
-
},
|
|
269
|
-
var
|
|
270
|
-
return
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
345
|
+
}, J.jsxs = function(r, l, h) {
|
|
346
|
+
var g = 1e4 > U.recentlyCreatedOwnerStacks++;
|
|
347
|
+
return v(
|
|
348
|
+
r,
|
|
349
|
+
l,
|
|
350
|
+
h,
|
|
274
351
|
!0,
|
|
275
|
-
|
|
276
|
-
|
|
352
|
+
g ? Error("react-stack-top-frame") : G,
|
|
353
|
+
g ? F(n(r)) : W
|
|
277
354
|
);
|
|
278
355
|
};
|
|
279
|
-
})()),
|
|
356
|
+
})()), J;
|
|
280
357
|
}
|
|
281
|
-
var
|
|
282
|
-
function
|
|
283
|
-
return
|
|
358
|
+
var pe;
|
|
359
|
+
function Ye() {
|
|
360
|
+
return pe || (pe = 1, process.env.NODE_ENV === "production" ? ee.exports = ze() : ee.exports = Fe()), ee.exports;
|
|
284
361
|
}
|
|
285
|
-
var s =
|
|
286
|
-
function
|
|
287
|
-
e
|
|
362
|
+
var s = Ye();
|
|
363
|
+
function O(...e) {
|
|
364
|
+
return we(e);
|
|
288
365
|
}
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
await (o = m.createElement("script")), T.set("libraries", [...f] + "");
|
|
292
|
-
for (n in e)
|
|
293
|
-
T.set(n.replace(/[A-Z]/g, (y) => "_" + y[0].toLowerCase()), e[n]);
|
|
294
|
-
T.set("callback", c + ".maps." + p), Pe(o, "https://maps.googleapis.com/maps/api/js?" + T), l[p] = v, o.onerror = () => r = k(Error(a + " could not load.")), o.nonce = m.querySelector("script[nonce]")?.nonce || "", m.head.append(o);
|
|
295
|
-
}));
|
|
296
|
-
l[d] ? console.warn(a + " only loads once. Ignoring:", e) : l[d] = (v, ...k) => f.add(v) && w().then(() => l[d](v, ...k));
|
|
297
|
-
}, Ne = (e) => `The setOptions() function should only be called once. The options passed to the additional call (${JSON.stringify(e)}) will be ignored.`, Ae = (e) => `The google.maps.importLibrary() function is already defined, and @googlemaps/js-api-loader will use the existing function instead of overwriting it. The options passed to setOptions (${JSON.stringify(e)}) will be ignored.`, Oe = "No options were set before calling importLibrary. Make sure to configure the loader using setOptions().", Se = "There already is a script loading the Google Maps JavaScript API, and no google.maps.importLibrary function is defined. @googlemaps/js-api-loader will proceed to bootstrap the API with the specified options, but the existing script might cause problems using the API. Make sure to remove the script loading the API.", ge = process.env.NODE_ENV !== "production", le = ge ? (e) => {
|
|
298
|
-
console.warn(`[@googlemaps/js-api-loader] ${e}`);
|
|
299
|
-
} : () => {
|
|
300
|
-
}, Ie = ge ? (e) => {
|
|
301
|
-
console.info(`[@googlemaps/js-api-loader] ${e}`);
|
|
302
|
-
} : () => {
|
|
303
|
-
}, Me = process.env.NODE_ENV !== "production";
|
|
304
|
-
let ae = !1;
|
|
305
|
-
function De(e) {
|
|
306
|
-
if (ae) {
|
|
307
|
-
le(Ne(e));
|
|
308
|
-
return;
|
|
309
|
-
}
|
|
310
|
-
Ce(e), ae = !0;
|
|
311
|
-
}
|
|
312
|
-
async function Le(e) {
|
|
313
|
-
if (ae || le(Oe), !window?.google?.maps?.importLibrary)
|
|
314
|
-
throw new Error("google.maps.importLibrary is not installed.");
|
|
315
|
-
return await google.maps.importLibrary(e);
|
|
316
|
-
}
|
|
317
|
-
function Ce(e) {
|
|
318
|
-
const r = !!window.google?.maps?.importLibrary;
|
|
319
|
-
r ? Ie(Ae(e)) : Me && document.querySelector('script[src*="maps.googleapis.com/maps/api/js"]') && le(Se), r || Re(e);
|
|
320
|
-
}
|
|
321
|
-
let re = null, me = null;
|
|
322
|
-
const $e = (e) => {
|
|
323
|
-
if (!e) {
|
|
324
|
-
const r = new Error("useMapsLibrary: missing Google Maps API key");
|
|
325
|
-
return console.error(r.message), Promise.reject(r);
|
|
326
|
-
}
|
|
327
|
-
return re ? me !== e && console.warn(
|
|
328
|
-
"useMapsLibrary: ignoring attempt to re-initialize Google Maps with a different API key than the one already in use."
|
|
329
|
-
) : (me = e, De({
|
|
330
|
-
key: e,
|
|
331
|
-
v: "weekly"
|
|
332
|
-
}), re = Le("core").then(() => {
|
|
333
|
-
})), re;
|
|
334
|
-
}, ze = (e, r) => {
|
|
335
|
-
const [o, n] = I(!1);
|
|
336
|
-
return $(() => {
|
|
337
|
-
let a = !1;
|
|
338
|
-
return $e(r).then(() => {
|
|
339
|
-
a || n(!0);
|
|
340
|
-
}).catch((c) => {
|
|
341
|
-
console.error("Failed to init Google Maps JS", c);
|
|
342
|
-
}), () => {
|
|
343
|
-
a = !0;
|
|
344
|
-
};
|
|
345
|
-
}, [r]), o ? "loaded" : null;
|
|
346
|
-
};
|
|
347
|
-
function M(...e) {
|
|
348
|
-
return ye(e);
|
|
349
|
-
}
|
|
350
|
-
function he(e) {
|
|
351
|
-
const { className: r, type: o, ...n } = e;
|
|
366
|
+
function be(e) {
|
|
367
|
+
const { className: t, type: o, ...n } = e;
|
|
352
368
|
return /* @__PURE__ */ s.jsx(
|
|
353
369
|
"input",
|
|
354
370
|
{
|
|
355
371
|
type: o,
|
|
356
|
-
className:
|
|
372
|
+
className: O(
|
|
357
373
|
"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
358
|
-
|
|
374
|
+
t
|
|
359
375
|
),
|
|
360
376
|
...n
|
|
361
377
|
}
|
|
362
378
|
);
|
|
363
379
|
}
|
|
364
|
-
|
|
365
|
-
const
|
|
380
|
+
be.displayName = "Input";
|
|
381
|
+
const Ue = /* @__PURE__ */ new Set([
|
|
366
382
|
"street_address",
|
|
367
383
|
"route",
|
|
368
384
|
"premise",
|
|
@@ -392,161 +408,150 @@ const Fe = /* @__PURE__ */ new Set([
|
|
|
392
408
|
"lodging",
|
|
393
409
|
"train_station",
|
|
394
410
|
"transit_station"
|
|
395
|
-
]),
|
|
396
|
-
const
|
|
411
|
+
]), ue = (e) => (e.text?.text ?? "").replace(/, France$/, "").trim(), Ge = ({ prediction: e }) => {
|
|
412
|
+
const t = ue(e), o = e.text?.text ?? "", n = e.text?.matches ?? [], a = t.length < o.length;
|
|
397
413
|
if (n.length === 0)
|
|
398
|
-
return /* @__PURE__ */ s.jsx(s.Fragment, { children:
|
|
399
|
-
const
|
|
400
|
-
let
|
|
414
|
+
return /* @__PURE__ */ s.jsx(s.Fragment, { children: t });
|
|
415
|
+
const i = [];
|
|
416
|
+
let u = 0;
|
|
401
417
|
return n.forEach((p, m) => {
|
|
402
|
-
if (a && p.startOffset >=
|
|
418
|
+
if (a && p.startOffset >= t.length)
|
|
403
419
|
return;
|
|
404
|
-
const x = p.startOffset,
|
|
405
|
-
if (x >
|
|
406
|
-
const
|
|
407
|
-
|
|
420
|
+
const x = p.startOffset, v = Math.min(p.endOffset, t.length);
|
|
421
|
+
if (x > u && i.push(t.substring(u, x)), v > x) {
|
|
422
|
+
const c = t.substring(x, v);
|
|
423
|
+
i.push(/* @__PURE__ */ s.jsx("strong", { children: c }, m));
|
|
408
424
|
}
|
|
409
|
-
|
|
410
|
-
}),
|
|
411
|
-
},
|
|
412
|
-
const
|
|
425
|
+
u = Math.max(u, v);
|
|
426
|
+
}), u < t.length && i.push(t.substring(u)), i.length === 0 ? /* @__PURE__ */ s.jsx(s.Fragment, { children: t }) : /* @__PURE__ */ s.jsx(s.Fragment, { children: i });
|
|
427
|
+
}, We = (e, t) => !e.types || e.types.length === 0 || !t || t.size === 0 ? !0 : e.types.some((o) => t.has(o)), qe = (e, t) => e.placeId || `${e.text?.text ?? "prediction"}-${t}`, Ve = (e) => {
|
|
428
|
+
const t = /* @__PURE__ */ new Map();
|
|
413
429
|
return e.forEach((o) => {
|
|
414
430
|
const n = o.placeId;
|
|
415
|
-
n && (
|
|
416
|
-
}), Array.from(
|
|
417
|
-
},
|
|
418
|
-
const n =
|
|
431
|
+
n && (t.has(n) || t.set(n, o));
|
|
432
|
+
}), Array.from(t.values());
|
|
433
|
+
}, Be = (e, t) => e.filter((o) => We(o, t)), Je = (e) => e.sort((t, o) => {
|
|
434
|
+
const n = t.distanceMeters ?? Number.POSITIVE_INFINITY, a = o.distanceMeters ?? Number.POSITIVE_INFINITY;
|
|
419
435
|
return n - a;
|
|
420
|
-
}),
|
|
436
|
+
}), Xe = (e, t) => Je(Be(Ve(e), t)), He = (e, t) => ue(e).toLowerCase() === t.trim().toLowerCase(), pt = ({
|
|
421
437
|
id: e,
|
|
422
|
-
label:
|
|
438
|
+
label: t,
|
|
423
439
|
placeholder: o,
|
|
424
440
|
value: n,
|
|
425
441
|
onValueChange: a,
|
|
426
|
-
disabled:
|
|
427
|
-
name:
|
|
442
|
+
disabled: i,
|
|
443
|
+
name: u,
|
|
428
444
|
className: p,
|
|
429
445
|
autofillShimName: m,
|
|
430
446
|
googleMapsApiKey: x,
|
|
431
|
-
locationRestriction:
|
|
432
|
-
allowedTypes:
|
|
447
|
+
locationRestriction: v,
|
|
448
|
+
allowedTypes: c
|
|
433
449
|
}) => {
|
|
434
|
-
const [
|
|
435
|
-
if (!
|
|
436
|
-
return
|
|
437
|
-
const
|
|
438
|
-
for (const E of
|
|
439
|
-
|
|
440
|
-
return
|
|
441
|
-
}, [
|
|
450
|
+
const [d, T] = L(n ?? ""), [w, _] = L([]), [k, y] = L(!1), [M, j] = L(-1), P = I(null), A = I(null), S = I(!1), z = I(!1), R = I(null), D = $e("places", x), H = ye(() => {
|
|
451
|
+
if (!c)
|
|
452
|
+
return Ue;
|
|
453
|
+
const f = /* @__PURE__ */ new Set();
|
|
454
|
+
for (const E of c)
|
|
455
|
+
f.add(E);
|
|
456
|
+
return f;
|
|
457
|
+
}, [c]);
|
|
442
458
|
$(() => {
|
|
443
|
-
T(n ?? ""),
|
|
459
|
+
T(n ?? ""), z.current = !1;
|
|
444
460
|
}, [n]), $(() => {
|
|
445
|
-
if (
|
|
446
|
-
|
|
447
|
-
let u = !0;
|
|
448
|
-
return google.maps.importLibrary("places").then((E) => {
|
|
449
|
-
u && Q(E);
|
|
450
|
-
}).catch(() => {
|
|
451
|
-
u && (console.error("AddressAutocompleteInput: failed to load places library"), Q(null));
|
|
452
|
-
}), () => {
|
|
453
|
-
u = !1;
|
|
454
|
-
};
|
|
455
|
-
}, [Y]), $(() => {
|
|
456
|
-
if (O.current) {
|
|
457
|
-
O.current = !1;
|
|
461
|
+
if (S.current) {
|
|
462
|
+
S.current = !1;
|
|
458
463
|
return;
|
|
459
464
|
}
|
|
460
|
-
let
|
|
465
|
+
let f = !0;
|
|
461
466
|
const E = setTimeout(() => {
|
|
462
|
-
if (!
|
|
467
|
+
if (!f)
|
|
463
468
|
return;
|
|
464
|
-
if (
|
|
465
|
-
|
|
469
|
+
if (d.trim() === "") {
|
|
470
|
+
_([]), y(!1), R.current = null, n !== "" && a("");
|
|
466
471
|
return;
|
|
467
472
|
}
|
|
468
|
-
if (!
|
|
469
|
-
const { AutocompleteSuggestion:
|
|
470
|
-
if (!
|
|
471
|
-
console.error("AddressAutocompleteInput: missing AutocompleteSuggestion or AutocompleteSessionToken exports"),
|
|
473
|
+
if (!D) return;
|
|
474
|
+
const { AutocompleteSuggestion: W, AutocompleteSessionToken: q } = D;
|
|
475
|
+
if (!W || !q) {
|
|
476
|
+
console.error("AddressAutocompleteInput: missing AutocompleteSuggestion or AutocompleteSessionToken exports"), _([]), y(!1);
|
|
472
477
|
return;
|
|
473
478
|
}
|
|
474
|
-
R.current || (R.current = new
|
|
475
|
-
const
|
|
476
|
-
input:
|
|
479
|
+
R.current || (R.current = new q());
|
|
480
|
+
const r = {
|
|
481
|
+
input: d,
|
|
477
482
|
sessionToken: R.current ?? void 0,
|
|
478
|
-
locationRestriction:
|
|
483
|
+
locationRestriction: v,
|
|
479
484
|
includedRegionCodes: ["fr"]
|
|
480
485
|
};
|
|
481
|
-
|
|
482
|
-
if (!
|
|
486
|
+
W.fetchAutocompleteSuggestions(r).then((l) => {
|
|
487
|
+
if (!f)
|
|
483
488
|
return;
|
|
484
|
-
const
|
|
485
|
-
if (!
|
|
486
|
-
|
|
489
|
+
const h = l.suggestions.map((b) => b.placePrediction).filter((b) => !!b), g = Xe(h, H), C = g[0], V = C && g.length === 1 && He(C, d);
|
|
490
|
+
if (!z.current && V) {
|
|
491
|
+
_(g), y(!1);
|
|
487
492
|
return;
|
|
488
493
|
}
|
|
489
|
-
|
|
490
|
-
}).catch((
|
|
491
|
-
|
|
494
|
+
g.length > 0 ? (_(g), z.current && y(!0), j(-1)) : (_([]), y(!1));
|
|
495
|
+
}).catch((l) => {
|
|
496
|
+
f && (console.error("AddressAutocompleteInput: suggestion fetch failed", l), _([]), y(!1));
|
|
492
497
|
});
|
|
493
498
|
}, 300);
|
|
494
499
|
return () => {
|
|
495
|
-
|
|
500
|
+
f = !1, clearTimeout(E);
|
|
496
501
|
};
|
|
497
|
-
}, [
|
|
498
|
-
const
|
|
502
|
+
}, [d, D, a, n, v, H]), $(() => {
|
|
503
|
+
const f = (E) => {
|
|
499
504
|
P.current && !P.current.contains(E.target) && A.current && !A.current.contains(E.target) && y(!1);
|
|
500
505
|
};
|
|
501
|
-
return document.addEventListener("mousedown",
|
|
502
|
-
document.removeEventListener("mousedown",
|
|
506
|
+
return document.addEventListener("mousedown", f), () => {
|
|
507
|
+
document.removeEventListener("mousedown", f);
|
|
503
508
|
};
|
|
504
509
|
}, []);
|
|
505
|
-
const
|
|
506
|
-
|
|
507
|
-
const E =
|
|
508
|
-
T(E), a(E),
|
|
509
|
-
},
|
|
510
|
-
|
|
511
|
-
},
|
|
510
|
+
const Z = (f) => {
|
|
511
|
+
S.current = !0;
|
|
512
|
+
const E = ue(f);
|
|
513
|
+
T(E), a(E), _([]), y(!1), R.current = null;
|
|
514
|
+
}, U = (f) => {
|
|
515
|
+
z.current = !0, T(f.target.value);
|
|
516
|
+
}, Q = (f) => {
|
|
512
517
|
if (!k || w.length === 0) {
|
|
513
|
-
|
|
518
|
+
f.key === "Enter" && (f.preventDefault(), a(d), y(!1), R.current = null);
|
|
514
519
|
return;
|
|
515
520
|
}
|
|
516
|
-
|
|
517
|
-
},
|
|
518
|
-
y(!1), n !==
|
|
519
|
-
},
|
|
521
|
+
f.key === "ArrowDown" ? (f.preventDefault(), j((E) => (E + 1) % w.length)) : f.key === "ArrowUp" ? (f.preventDefault(), j((E) => (E - 1 + w.length) % w.length)) : f.key === "Enter" ? (f.preventDefault(), M > -1 && w[M] ? Z(w[M]) : (a(d), y(!1), R.current = null)) : f.key === "Escape" && y(!1);
|
|
522
|
+
}, te = () => {
|
|
523
|
+
y(!1), n !== d && a(d), R.current = null;
|
|
524
|
+
}, F = m ?? (u ? `${u}_shim` : void 0);
|
|
520
525
|
return /* @__PURE__ */ s.jsxs("div", { className: "relative", children: [
|
|
521
|
-
|
|
526
|
+
F && /* @__PURE__ */ s.jsx(
|
|
522
527
|
"input",
|
|
523
528
|
{
|
|
524
529
|
tabIndex: -1,
|
|
525
530
|
autoComplete: "street-address",
|
|
526
|
-
name:
|
|
531
|
+
name: F,
|
|
527
532
|
"aria-hidden": "true",
|
|
528
533
|
className: "pointer-events-none absolute left-0 top-0 h-0 w-0 opacity-0"
|
|
529
534
|
}
|
|
530
535
|
),
|
|
531
|
-
/* @__PURE__ */ s.jsx("label", { htmlFor: e, className: "text-left block text-sm font-medium text-gray-700 mb-1", children:
|
|
536
|
+
/* @__PURE__ */ s.jsx("label", { htmlFor: e, className: "text-left block text-sm font-medium text-gray-700 mb-1", children: t }),
|
|
532
537
|
/* @__PURE__ */ s.jsx(
|
|
533
|
-
|
|
538
|
+
be,
|
|
534
539
|
{
|
|
535
540
|
ref: P,
|
|
536
541
|
id: e,
|
|
537
542
|
type: "text",
|
|
538
543
|
placeholder: o,
|
|
539
|
-
name:
|
|
540
|
-
value:
|
|
541
|
-
onChange:
|
|
542
|
-
onKeyDown:
|
|
544
|
+
name: u ?? `${e}_input`,
|
|
545
|
+
value: d,
|
|
546
|
+
onChange: U,
|
|
547
|
+
onKeyDown: Q,
|
|
543
548
|
onFocus: () => {
|
|
544
|
-
w.length > 0 &&
|
|
549
|
+
w.length > 0 && d && y(!0);
|
|
545
550
|
},
|
|
546
|
-
onBlur:
|
|
547
|
-
disabled:
|
|
551
|
+
onBlur: te,
|
|
552
|
+
disabled: i,
|
|
548
553
|
autoComplete: "off",
|
|
549
|
-
className:
|
|
554
|
+
className: O("w-full", p)
|
|
550
555
|
}
|
|
551
556
|
),
|
|
552
557
|
k && w.length > 0 && /* @__PURE__ */ s.jsx(
|
|
@@ -554,34 +559,34 @@ const Fe = /* @__PURE__ */ new Set([
|
|
|
554
559
|
{
|
|
555
560
|
ref: A,
|
|
556
561
|
className: "absolute z-10 w-full mt-1 bg-white border border-gray-200 rounded-md shadow-lg text-left",
|
|
557
|
-
children: w.map((
|
|
562
|
+
children: w.map((f, E) => /* @__PURE__ */ s.jsx(
|
|
558
563
|
"li",
|
|
559
564
|
{
|
|
560
|
-
className:
|
|
565
|
+
className: le(
|
|
561
566
|
"px-3 py-2 cursor-pointer text-sm text-gray-700 hover:bg-gray-100",
|
|
562
|
-
{ "bg-gray-100":
|
|
567
|
+
{ "bg-gray-100": M === E }
|
|
563
568
|
),
|
|
564
|
-
onMouseDown: (
|
|
565
|
-
|
|
569
|
+
onMouseDown: (G) => {
|
|
570
|
+
G.preventDefault(), Z(f);
|
|
566
571
|
},
|
|
567
|
-
children: /* @__PURE__ */ s.jsx(
|
|
572
|
+
children: /* @__PURE__ */ s.jsx(Ge, { prediction: f })
|
|
568
573
|
},
|
|
569
|
-
|
|
574
|
+
qe(f, E)
|
|
570
575
|
))
|
|
571
576
|
}
|
|
572
577
|
)
|
|
573
578
|
] });
|
|
574
|
-
},
|
|
579
|
+
}, gt = ({
|
|
575
580
|
className: e,
|
|
576
|
-
onClick:
|
|
581
|
+
onClick: t,
|
|
577
582
|
children: o,
|
|
578
583
|
...n
|
|
579
584
|
}) => /* @__PURE__ */ s.jsxs(
|
|
580
585
|
"button",
|
|
581
586
|
{
|
|
582
587
|
type: "button",
|
|
583
|
-
onClick:
|
|
584
|
-
className:
|
|
588
|
+
onClick: t,
|
|
589
|
+
className: le(
|
|
585
590
|
"flex w-full items-center justify-center rounded-md border border-transparent bg-black py-2 text-white hover:bg-gray-800 focus:ring-2 focus:ring-gray-900 focus:ring-offset-2 focus:outline-hidden",
|
|
586
591
|
e
|
|
587
592
|
),
|
|
@@ -591,32 +596,32 @@ const Fe = /* @__PURE__ */ new Set([
|
|
|
591
596
|
/* @__PURE__ */ s.jsx("svg", { fill: "currentColor", viewBox: "0 0 50 20", className: "h-5 w-auto", children: /* @__PURE__ */ s.jsx("path", { d: "M9.536 2.579c-.571.675-1.485 1.208-2.4 1.132-.113-.914.334-1.884.858-2.484C8.565.533 9.564.038 10.374 0c.095.951-.276 1.884-.838 2.579zm.829 1.313c-1.324-.077-2.457.751-3.085.751-.638 0-1.6-.713-2.647-.694-1.362.019-2.628.79-3.323 2.017-1.429 2.455-.372 6.09 1.009 8.087.676.99 1.485 2.075 2.552 2.036 1.009-.038 1.409-.656 2.628-.656 1.228 0 1.58.656 2.647.637 1.104-.019 1.8-.99 2.475-1.979.771-1.122 1.086-2.217 1.105-2.274-.02-.019-2.133-.828-2.152-3.263-.02-2.036 1.666-3.007 1.742-3.064-.952-1.408-2.437-1.56-2.951-1.598zm7.645-2.76v14.834h2.305v-5.072h3.19c2.913 0 4.96-1.998 4.96-4.89 0-2.893-2.01-4.872-4.885-4.872h-5.57zm2.305 1.941h2.656c2 0 3.142 1.066 3.142 2.94 0 1.875-1.142 2.95-3.151 2.95h-2.647v-5.89zM32.673 16.08c1.448 0 2.79-.733 3.4-1.893h.047v1.779h2.133V8.582c0-2.14-1.714-3.52-4.351-3.52-2.447 0-4.256 1.399-4.323 3.32h2.076c.171-.913 1.018-1.512 2.18-1.512 1.41 0 2.2.656 2.2 1.865v.818l-2.876.171c-2.675.162-4.123 1.256-4.123 3.159 0 1.922 1.495 3.197 3.637 3.197zm.62-1.76c-1.229 0-2.01-.59-2.01-1.494 0-.933.752-1.475 2.19-1.56l2.562-.162v.837c0 1.39-1.181 2.379-2.743 2.379zM41.1 20c2.247 0 3.304-.856 4.227-3.454l4.047-11.341h-2.342l-2.714 8.763h-.047l-2.714-8.763h-2.409l3.904 10.799-.21.656c-.352 1.114-.923 1.542-1.942 1.542-.18 0-.533-.02-.676-.038v1.779c.133.038.705.057.876.057z" }) })
|
|
592
597
|
]
|
|
593
598
|
}
|
|
594
|
-
),
|
|
599
|
+
), Ze = {
|
|
595
600
|
red: "checked:border-red-700 checked:bg-red-700 indeterminate:border-red-700 indeterminate:bg-red-700 focus-visible:outline-red-700",
|
|
596
601
|
sky: "checked:border-sky-600 checked:bg-sky-600 indeterminate:border-sky-600 indeterminate:bg-sky-600 focus-visible:outline-sky-600"
|
|
597
|
-
},
|
|
602
|
+
}, ht = ({
|
|
598
603
|
id: e,
|
|
599
|
-
name:
|
|
604
|
+
name: t,
|
|
600
605
|
defaultValue: o,
|
|
601
606
|
defaultChecked: n,
|
|
602
607
|
checked: a,
|
|
603
|
-
onChange:
|
|
604
|
-
color:
|
|
608
|
+
onChange: i,
|
|
609
|
+
color: u = "sky",
|
|
605
610
|
...p
|
|
606
611
|
}) => {
|
|
607
|
-
const m =
|
|
612
|
+
const m = Ze[u];
|
|
608
613
|
return /* @__PURE__ */ s.jsx("div", { className: "flex h-6 shrink-0 items-center", children: /* @__PURE__ */ s.jsxs("div", { className: "group grid size-4 grid-cols-1", children: [
|
|
609
614
|
/* @__PURE__ */ s.jsx(
|
|
610
615
|
"input",
|
|
611
616
|
{
|
|
612
617
|
...p,
|
|
613
618
|
id: e,
|
|
614
|
-
name:
|
|
619
|
+
name: t,
|
|
615
620
|
type: "checkbox",
|
|
616
621
|
defaultValue: o,
|
|
617
622
|
defaultChecked: n,
|
|
618
623
|
checked: a,
|
|
619
|
-
onChange:
|
|
624
|
+
onChange: i,
|
|
620
625
|
className: `col-start-1 row-start-1 appearance-none cursor-pointer rounded-sm border border-gray-300 bg-white focus-visible:outline-2 focus-visible:outline-offset-2 disabled:border-gray-300 disabled:bg-gray-100 disabled:checked:bg-gray-100 forced-colors:appearance-auto ${m}`
|
|
621
626
|
}
|
|
622
627
|
),
|
|
@@ -652,59 +657,59 @@ const Fe = /* @__PURE__ */ new Set([
|
|
|
652
657
|
)
|
|
653
658
|
] }) });
|
|
654
659
|
};
|
|
655
|
-
function
|
|
660
|
+
function bt({
|
|
656
661
|
...e
|
|
657
662
|
}) {
|
|
658
663
|
return /* @__PURE__ */ s.jsx(N.Root, { "data-slot": "dialog", ...e });
|
|
659
664
|
}
|
|
660
|
-
function
|
|
665
|
+
function vt({
|
|
661
666
|
...e
|
|
662
667
|
}) {
|
|
663
668
|
return /* @__PURE__ */ s.jsx(N.Trigger, { "data-slot": "dialog-trigger", ...e });
|
|
664
669
|
}
|
|
665
|
-
function
|
|
670
|
+
function Qe({
|
|
666
671
|
...e
|
|
667
672
|
}) {
|
|
668
673
|
return /* @__PURE__ */ s.jsx(N.Portal, { "data-slot": "dialog-portal", ...e });
|
|
669
674
|
}
|
|
670
|
-
function
|
|
675
|
+
function _t({
|
|
671
676
|
...e
|
|
672
677
|
}) {
|
|
673
678
|
return /* @__PURE__ */ s.jsx(N.Close, { "data-slot": "dialog-close", ...e });
|
|
674
679
|
}
|
|
675
|
-
function
|
|
680
|
+
function Ke({
|
|
676
681
|
className: e,
|
|
677
|
-
...
|
|
682
|
+
...t
|
|
678
683
|
}) {
|
|
679
684
|
return /* @__PURE__ */ s.jsx(
|
|
680
685
|
N.Overlay,
|
|
681
686
|
{
|
|
682
687
|
"data-slot": "dialog-overlay",
|
|
683
|
-
className:
|
|
688
|
+
className: O(
|
|
684
689
|
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
|
|
685
690
|
e
|
|
686
691
|
),
|
|
687
|
-
...
|
|
692
|
+
...t
|
|
688
693
|
}
|
|
689
694
|
);
|
|
690
695
|
}
|
|
691
|
-
const
|
|
696
|
+
const et = _e.forwardRef(({ className: e, children: t, showCloseButton: o = !0, showCloseButtonOutside: n = !1, ...a }, i) => /* @__PURE__ */ s.jsx(Qe, { "data-slot": "dialog-portal", children: /* @__PURE__ */ s.jsx(Ke, { children: /* @__PURE__ */ s.jsxs(
|
|
692
697
|
N.Content,
|
|
693
698
|
{
|
|
694
|
-
ref:
|
|
699
|
+
ref: i,
|
|
695
700
|
"data-slot": "dialog-content",
|
|
696
|
-
className:
|
|
701
|
+
className: O(
|
|
697
702
|
"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
|
|
698
703
|
e
|
|
699
704
|
),
|
|
700
705
|
...a,
|
|
701
706
|
children: [
|
|
702
|
-
|
|
707
|
+
t,
|
|
703
708
|
o && /* @__PURE__ */ s.jsxs(
|
|
704
709
|
N.Close,
|
|
705
710
|
{
|
|
706
711
|
"data-slot": "dialog-close",
|
|
707
|
-
className:
|
|
712
|
+
className: O(
|
|
708
713
|
"absolute ring-offset-background focus:ring-ring transition-opacity focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
709
714
|
n ? "-top-3 -right-3 z-[51] rounded-full border bg-background p-1 opacity-100 hover:bg-accent [&_svg]:size-5" : "top-4 right-4 rounded-xs opacity-70 hover:opacity-100 data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg:not([class*='size-'])]:size-4"
|
|
710
715
|
),
|
|
@@ -717,126 +722,126 @@ const Qe = ve.forwardRef(({ className: e, children: r, showCloseButton: o = !0,
|
|
|
717
722
|
]
|
|
718
723
|
}
|
|
719
724
|
) }) }));
|
|
720
|
-
|
|
721
|
-
function
|
|
725
|
+
et.displayName = N.Content.displayName;
|
|
726
|
+
function xt({ className: e, ...t }) {
|
|
722
727
|
return /* @__PURE__ */ s.jsx(
|
|
723
728
|
"div",
|
|
724
729
|
{
|
|
725
730
|
"data-slot": "dialog-header",
|
|
726
|
-
className:
|
|
727
|
-
...
|
|
731
|
+
className: O("flex flex-col gap-2 text-center sm:text-left", e),
|
|
732
|
+
...t
|
|
728
733
|
}
|
|
729
734
|
);
|
|
730
735
|
}
|
|
731
|
-
function
|
|
736
|
+
function yt({ className: e, ...t }) {
|
|
732
737
|
return /* @__PURE__ */ s.jsx(
|
|
733
738
|
"div",
|
|
734
739
|
{
|
|
735
740
|
"data-slot": "dialog-footer",
|
|
736
|
-
className:
|
|
737
|
-
...
|
|
741
|
+
className: O("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", e),
|
|
742
|
+
...t
|
|
738
743
|
}
|
|
739
744
|
);
|
|
740
745
|
}
|
|
741
|
-
function
|
|
746
|
+
function wt({
|
|
742
747
|
className: e,
|
|
743
|
-
...
|
|
748
|
+
...t
|
|
744
749
|
}) {
|
|
745
750
|
return /* @__PURE__ */ s.jsx(
|
|
746
751
|
N.Title,
|
|
747
752
|
{
|
|
748
753
|
"data-slot": "dialog-title",
|
|
749
|
-
className:
|
|
750
|
-
...
|
|
754
|
+
className: O("text-lg leading-none font-semibold", e),
|
|
755
|
+
...t
|
|
751
756
|
}
|
|
752
757
|
);
|
|
753
758
|
}
|
|
754
|
-
function
|
|
759
|
+
function Et({
|
|
755
760
|
className: e,
|
|
756
|
-
...
|
|
761
|
+
...t
|
|
757
762
|
}) {
|
|
758
763
|
return /* @__PURE__ */ s.jsx(
|
|
759
764
|
N.Description,
|
|
760
765
|
{
|
|
761
766
|
"data-slot": "dialog-description",
|
|
762
|
-
className:
|
|
763
|
-
...
|
|
767
|
+
className: O("text-muted-foreground text-sm", e),
|
|
768
|
+
...t
|
|
764
769
|
}
|
|
765
770
|
);
|
|
766
771
|
}
|
|
767
|
-
var
|
|
768
|
-
let
|
|
772
|
+
var tt = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "#", "$", "%", "*", "+", ",", "-", ".", ":", ";", "=", "?", "@", "[", "]", "^", "_", "{", "|", "}", "~"], X = (e) => {
|
|
773
|
+
let t = 0;
|
|
769
774
|
for (let o = 0; o < e.length; o++) {
|
|
770
|
-
let n = e[o], a =
|
|
771
|
-
|
|
775
|
+
let n = e[o], a = tt.indexOf(n);
|
|
776
|
+
t = t * 83 + a;
|
|
772
777
|
}
|
|
773
|
-
return
|
|
774
|
-
}, oe = (e) => {
|
|
775
|
-
let r = e / 255;
|
|
776
|
-
return r <= 0.04045 ? r / 12.92 : Math.pow((r + 0.055) / 1.055, 2.4);
|
|
778
|
+
return t;
|
|
777
779
|
}, ne = (e) => {
|
|
778
|
-
let
|
|
779
|
-
return
|
|
780
|
-
},
|
|
780
|
+
let t = e / 255;
|
|
781
|
+
return t <= 0.04045 ? t / 12.92 : Math.pow((t + 0.055) / 1.055, 2.4);
|
|
782
|
+
}, se = (e) => {
|
|
783
|
+
let t = Math.max(0, Math.min(1, e));
|
|
784
|
+
return t <= 31308e-7 ? Math.trunc(t * 12.92 * 255 + 0.5) : Math.trunc((1.055 * Math.pow(t, 0.4166666666666667) - 0.055) * 255 + 0.5);
|
|
785
|
+
}, rt = (e) => e < 0 ? -1 : 1, ae = (e, t) => rt(e) * Math.pow(Math.abs(e), t), ge = class extends Error {
|
|
781
786
|
constructor(e) {
|
|
782
787
|
super(e), this.name = "ValidationError", this.message = e;
|
|
783
788
|
}
|
|
784
|
-
},
|
|
785
|
-
if (!e || e.length < 6) throw new
|
|
786
|
-
let
|
|
787
|
-
if (e.length !== 4 + 2 * n * o) throw new
|
|
788
|
-
},
|
|
789
|
-
let
|
|
790
|
-
return [
|
|
791
|
-
},
|
|
789
|
+
}, ot = (e) => {
|
|
790
|
+
if (!e || e.length < 6) throw new ge("The blurhash string must be at least 6 characters");
|
|
791
|
+
let t = X(e[0]), o = Math.floor(t / 9) + 1, n = t % 9 + 1;
|
|
792
|
+
if (e.length !== 4 + 2 * n * o) throw new ge(`blurhash length mismatch: length is ${e.length} but it should be ${4 + 2 * n * o}`);
|
|
793
|
+
}, nt = (e) => {
|
|
794
|
+
let t = e >> 16, o = e >> 8 & 255, n = e & 255;
|
|
795
|
+
return [ne(t), ne(o), ne(n)];
|
|
796
|
+
}, st = (e, t) => {
|
|
792
797
|
let o = Math.floor(e / 361), n = Math.floor(e / 19) % 19, a = e % 19;
|
|
793
|
-
return [
|
|
794
|
-
},
|
|
795
|
-
|
|
796
|
-
let a =
|
|
797
|
-
for (let
|
|
798
|
-
let
|
|
799
|
-
m[
|
|
798
|
+
return [ae((o - 9) / 9, 2) * t, ae((n - 9) / 9, 2) * t, ae((a - 9) / 9, 2) * t];
|
|
799
|
+
}, at = (e, t, o, n) => {
|
|
800
|
+
ot(e), n = n | 1;
|
|
801
|
+
let a = X(e[0]), i = Math.floor(a / 9) + 1, u = a % 9 + 1, p = (X(e[1]) + 1) / 166, m = new Array(u * i);
|
|
802
|
+
for (let c = 0; c < m.length; c++) if (c === 0) {
|
|
803
|
+
let d = X(e.substring(2, 6));
|
|
804
|
+
m[c] = nt(d);
|
|
800
805
|
} else {
|
|
801
|
-
let
|
|
802
|
-
m[
|
|
806
|
+
let d = X(e.substring(4 + c * 2, 6 + c * 2));
|
|
807
|
+
m[c] = st(d, p * n);
|
|
803
808
|
}
|
|
804
|
-
let x =
|
|
805
|
-
for (let
|
|
806
|
-
let T = 0, w = 0,
|
|
807
|
-
for (let j = 0; j <
|
|
808
|
-
let A = Math.cos(Math.PI *
|
|
809
|
-
T +=
|
|
809
|
+
let x = t * 4, v = new Uint8ClampedArray(x * o);
|
|
810
|
+
for (let c = 0; c < o; c++) for (let d = 0; d < t; d++) {
|
|
811
|
+
let T = 0, w = 0, _ = 0;
|
|
812
|
+
for (let j = 0; j < i; j++) for (let P = 0; P < u; P++) {
|
|
813
|
+
let A = Math.cos(Math.PI * d * P / t) * Math.cos(Math.PI * c * j / o), S = m[P + j * u];
|
|
814
|
+
T += S[0] * A, w += S[1] * A, _ += S[2] * A;
|
|
810
815
|
}
|
|
811
|
-
let k =
|
|
812
|
-
|
|
816
|
+
let k = se(T), y = se(w), M = se(_);
|
|
817
|
+
v[4 * d + 0 + c * x] = k, v[4 * d + 1 + c * x] = y, v[4 * d + 2 + c * x] = M, v[4 * d + 3 + c * x] = 255;
|
|
813
818
|
}
|
|
814
|
-
return
|
|
815
|
-
},
|
|
816
|
-
const
|
|
819
|
+
return v;
|
|
820
|
+
}, it = at;
|
|
821
|
+
const Tt = ({
|
|
817
822
|
src: e,
|
|
818
|
-
hash:
|
|
823
|
+
hash: t,
|
|
819
824
|
alt: o = "",
|
|
820
825
|
className: n
|
|
821
826
|
}) => {
|
|
822
|
-
const [a,
|
|
827
|
+
const [a, i] = L(!1), [u, p] = L(null), m = I(null);
|
|
823
828
|
$(() => {
|
|
824
|
-
if (!
|
|
825
|
-
const [
|
|
829
|
+
if (!t) return;
|
|
830
|
+
const [c, d, T] = t, w = it(T, c, d), _ = document.createElement("canvas"), k = _.getContext("2d");
|
|
826
831
|
if (k) {
|
|
827
|
-
|
|
832
|
+
_.width = c, _.height = d;
|
|
828
833
|
const y = new ImageData(
|
|
829
834
|
new Uint8ClampedArray(w),
|
|
830
|
-
|
|
831
|
-
|
|
835
|
+
c,
|
|
836
|
+
d
|
|
832
837
|
);
|
|
833
|
-
k.putImageData(y, 0, 0), p(
|
|
838
|
+
k.putImageData(y, 0, 0), p(_.toDataURL());
|
|
834
839
|
}
|
|
835
|
-
}, [
|
|
836
|
-
m.current && m.current.complete &&
|
|
840
|
+
}, [t]), $(() => {
|
|
841
|
+
m.current && m.current.complete && i(!0);
|
|
837
842
|
}, [e]);
|
|
838
843
|
const x = () => {
|
|
839
|
-
},
|
|
844
|
+
}, v = () => {
|
|
840
845
|
};
|
|
841
846
|
return /* @__PURE__ */ s.jsxs(
|
|
842
847
|
"div",
|
|
@@ -844,12 +849,12 @@ const Et = ({
|
|
|
844
849
|
style: { position: "relative", overflow: "hidden" },
|
|
845
850
|
className: n,
|
|
846
851
|
onMouseEnter: x,
|
|
847
|
-
onMouseLeave:
|
|
852
|
+
onMouseLeave: v,
|
|
848
853
|
children: [
|
|
849
|
-
|
|
854
|
+
u && !a && /* @__PURE__ */ s.jsx(
|
|
850
855
|
"img",
|
|
851
856
|
{
|
|
852
|
-
src:
|
|
857
|
+
src: u,
|
|
853
858
|
style: {
|
|
854
859
|
position: "absolute",
|
|
855
860
|
top: 0,
|
|
@@ -876,25 +881,25 @@ const Et = ({
|
|
|
876
881
|
left: 0
|
|
877
882
|
},
|
|
878
883
|
onLoad: () => {
|
|
879
|
-
|
|
884
|
+
i(!0);
|
|
880
885
|
},
|
|
881
|
-
onError: (
|
|
886
|
+
onError: (c) => console.error("Image failed to load:", e, c)
|
|
882
887
|
}
|
|
883
888
|
)
|
|
884
889
|
]
|
|
885
890
|
}
|
|
886
891
|
);
|
|
887
|
-
},
|
|
892
|
+
}, lt = ({
|
|
888
893
|
href: e,
|
|
889
|
-
labelClassName:
|
|
894
|
+
labelClassName: t,
|
|
890
895
|
labelActiveClassName: o,
|
|
891
896
|
labelElement: n,
|
|
892
897
|
isActive: a,
|
|
893
|
-
children:
|
|
898
|
+
children: i
|
|
894
899
|
}) => {
|
|
895
|
-
const [
|
|
900
|
+
const [u, p] = L(!1), m = I(null), x = I(null), v = () => {
|
|
896
901
|
m.current && clearTimeout(m.current), p(!0);
|
|
897
|
-
},
|
|
902
|
+
}, c = () => {
|
|
898
903
|
m.current = setTimeout(() => {
|
|
899
904
|
p(!1);
|
|
900
905
|
}, 120);
|
|
@@ -906,25 +911,25 @@ const Et = ({
|
|
|
906
911
|
{
|
|
907
912
|
className: "flex",
|
|
908
913
|
ref: x,
|
|
909
|
-
onMouseEnter:
|
|
910
|
-
onMouseLeave:
|
|
914
|
+
onMouseEnter: v,
|
|
915
|
+
onMouseLeave: c,
|
|
911
916
|
children: [
|
|
912
917
|
/* @__PURE__ */ s.jsx("div", { className: "relative flex", children: /* @__PURE__ */ s.jsx(
|
|
913
|
-
|
|
918
|
+
Te,
|
|
914
919
|
{
|
|
915
920
|
to: e,
|
|
916
921
|
onClick: () => {
|
|
917
922
|
p(!1);
|
|
918
923
|
},
|
|
919
|
-
className:
|
|
924
|
+
className: le(
|
|
920
925
|
"relative z-10 -mb-px flex items-center border-b-2 pt-px text-sm font-medium text-gray-700 cursor-pointer transition-colors duration-200 ease-out hover:text-gray-800",
|
|
921
|
-
|
|
922
|
-
|
|
926
|
+
t,
|
|
927
|
+
u || a ? o : "border-transparent"
|
|
923
928
|
),
|
|
924
929
|
children: n
|
|
925
930
|
}
|
|
926
931
|
) }),
|
|
927
|
-
|
|
932
|
+
u && /* @__PURE__ */ s.jsxs(
|
|
928
933
|
"div",
|
|
929
934
|
{
|
|
930
935
|
className: "absolute left-0 right-0 top-full z-20 text-gray-500 sm:text-sm",
|
|
@@ -937,32 +942,33 @@ const Et = ({
|
|
|
937
942
|
className: "absolute inset-0 top-1/2 bg-white shadow-sm"
|
|
938
943
|
}
|
|
939
944
|
),
|
|
940
|
-
/* @__PURE__ */ s.jsx("div", { className: "relative bg-white", children:
|
|
945
|
+
/* @__PURE__ */ s.jsx("div", { className: "relative bg-white", children: i({ setIsOpen: p }) })
|
|
941
946
|
]
|
|
942
947
|
}
|
|
943
948
|
)
|
|
944
949
|
]
|
|
945
950
|
}
|
|
946
951
|
);
|
|
947
|
-
},
|
|
948
|
-
MenuPopover:
|
|
952
|
+
}, kt = {
|
|
953
|
+
MenuPopover: lt
|
|
949
954
|
};
|
|
950
955
|
export {
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
956
|
+
pt as AddressAutocompleteInput,
|
|
957
|
+
gt as ApplePayButton,
|
|
958
|
+
ht as Checkbox,
|
|
959
|
+
bt as Dialog,
|
|
960
|
+
_t as DialogClose,
|
|
961
|
+
et as DialogContent,
|
|
962
|
+
Et as DialogDescription,
|
|
963
|
+
yt as DialogFooter,
|
|
964
|
+
xt as DialogHeader,
|
|
965
|
+
Ke as DialogOverlay,
|
|
966
|
+
Qe as DialogPortal,
|
|
967
|
+
wt as DialogTitle,
|
|
968
|
+
vt as DialogTrigger,
|
|
969
|
+
kt as Header,
|
|
970
|
+
Tt as Image,
|
|
971
|
+
be as Input,
|
|
972
|
+
mt as isMobileDevice,
|
|
973
|
+
$e as useMapsLibrary
|
|
968
974
|
};
|