@rpcbase/ui 0.52.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/index.js CHANGED
@@ -1,11 +1,88 @@
1
- import * as ve from "react";
2
- import _e, { useState as I, useEffect as $, useRef as C, useMemo as xe } from "react";
3
- import ie, { clsx as ye } from "clsx";
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 we } from "react-router";
7
- const dt = () => typeof navigator > "u" ? !1 : /Android|iPhone|iPad|iPod/i.test(navigator.userAgent);
8
- var ee = { exports: {} }, X = {};
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 ue;
19
- function Te() {
20
- if (ue) return X;
21
- ue = 1;
22
- var e = Symbol.for("react.transitional.element"), r = Symbol.for("react.fragment");
23
- function o(n, a, c) {
24
- var d = null;
25
- if (c !== void 0 && (d = "" + c), a.key !== void 0 && (d = "" + a.key), "key" in a) {
26
- c = {};
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" && (c[p] = a[p]);
29
- } else c = a;
30
- return a = c.ref, {
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: d,
110
+ key: u,
34
111
  ref: a !== void 0 ? a : null,
35
- props: c
112
+ props: i
36
113
  };
37
114
  }
38
- return X.Fragment = r, X.jsx = o, X.jsxs = o, X;
115
+ return B.Fragment = t, B.jsx = o, B.jsxs = o, B;
39
116
  }
40
- var H = {};
117
+ var J = {};
41
118
  /**
42
119
  * @license React
43
120
  * react-jsx-runtime.development.js
@@ -47,327 +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 de;
51
- function ke() {
52
- return de || (de = 1, process.env.NODE_ENV !== "production" && (function() {
53
- function e(t) {
54
- if (t == null) return null;
55
- if (typeof t == "function")
56
- return t.$$typeof === Q ? null : t.displayName || t.name || null;
57
- if (typeof t == "string") return t;
58
- switch (t) {
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 D:
138
+ case M:
62
139
  return "Profiler";
63
140
  case y:
64
141
  return "StrictMode";
65
- case O:
142
+ case S:
66
143
  return "Suspense";
67
- case F:
144
+ case z:
68
145
  return "SuspenseList";
69
- case W:
146
+ case H:
70
147
  return "Activity";
71
148
  }
72
- if (typeof t == "object")
73
- switch (typeof t.tag == "number" && console.error(
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
- ), t.$$typeof) {
76
- case v:
152
+ ), r.$$typeof) {
153
+ case _:
77
154
  return "Portal";
78
- case R:
79
- return t.displayName || "Context";
155
+ case P:
156
+ return r.displayName || "Context";
80
157
  case j:
81
- return (t._context.displayName || "Context") + ".Consumer";
158
+ return (r._context.displayName || "Context") + ".Consumer";
82
159
  case A:
83
- var i = t.render;
84
- return t = t.displayName, t || (t = i.displayName || i.name || "", t = t !== "" ? "ForwardRef(" + t + ")" : "ForwardRef"), t;
85
- case P:
86
- return i = t.displayName || null, i !== null ? i : e(t.type) || "Memo";
87
- case Y:
88
- i = t._payload, t = t._init;
160
+ var l = r.render;
161
+ return r = r.displayName, r || (r = l.displayName || l.name || "", r = r !== "" ? "ForwardRef(" + r + ")" : "ForwardRef"), r;
162
+ case R:
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(t(i));
167
+ return e(r(l));
91
168
  } catch {
92
169
  }
93
170
  }
94
171
  return null;
95
172
  }
96
- function r(t) {
97
- return "" + t;
173
+ function t(r) {
174
+ return "" + r;
98
175
  }
99
- function o(t) {
176
+ function o(r) {
100
177
  try {
101
- r(t);
102
- var i = !1;
178
+ t(r);
179
+ var l = !1;
103
180
  } catch {
104
- i = !0;
181
+ l = !0;
105
182
  }
106
- if (i) {
107
- i = console;
108
- var g = i.error, h = typeof Symbol == "function" && Symbol.toStringTag && t[Symbol.toStringTag] || t.constructor.name || "Object";
109
- return g.call(
110
- i,
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
- h
113
- ), r(t);
189
+ g
190
+ ), t(r);
114
191
  }
115
192
  }
116
- function n(t) {
117
- if (t === k) return "<>";
118
- if (typeof t == "object" && t !== null && t.$$typeof === Y)
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 i = e(t);
122
- return i ? "<" + i + ">" : "<...>";
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 t = U.A;
129
- return t === null ? null : t.getOwner();
205
+ var r = U.A;
206
+ return r === null ? null : r.getOwner();
130
207
  }
131
- function c() {
208
+ function i() {
132
209
  return Error("react-stack-top-frame");
133
210
  }
134
- function d(t) {
135
- if (q.call(t, "key")) {
136
- var i = Object.getOwnPropertyDescriptor(t, "key").get;
137
- if (i && i.isReactWarning) return !1;
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 t.key !== void 0;
216
+ return r.key !== void 0;
140
217
  }
141
- function p(t, i) {
142
- function g() {
143
- K || (K = !0, console.error(
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
- i
222
+ l
146
223
  ));
147
224
  }
148
- g.isReactWarning = !0, Object.defineProperty(t, "key", {
149
- get: g,
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 t = e(this.type);
155
- return V[t] || (V[t] = !0, console.error(
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
- )), t = this.props.ref, t !== void 0 ? t : null;
234
+ )), r = this.props.ref, r !== void 0 ? r : null;
158
235
  }
159
- function x(t, i, g, h, G, S) {
160
- var _ = g.ref;
161
- return t = {
236
+ function x(r, l, h, g, C, V) {
237
+ var b = h.ref;
238
+ return r = {
162
239
  $$typeof: w,
163
- type: t,
164
- key: i,
165
- props: g,
166
- _owner: h
167
- }, (_ !== void 0 ? _ : null) !== null ? Object.defineProperty(t, "ref", {
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(t, "ref", { enumerable: !1, value: null }), t._store = {}, Object.defineProperty(t._store, "validated", {
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(t, "_debugInfo", {
252
+ }), Object.defineProperty(r, "_debugInfo", {
176
253
  configurable: !1,
177
254
  enumerable: !1,
178
255
  writable: !0,
179
256
  value: null
180
- }), Object.defineProperty(t, "_debugStack", {
257
+ }), Object.defineProperty(r, "_debugStack", {
181
258
  configurable: !1,
182
259
  enumerable: !1,
183
260
  writable: !0,
184
- value: G
185
- }), Object.defineProperty(t, "_debugTask", {
261
+ value: C
262
+ }), Object.defineProperty(r, "_debugTask", {
186
263
  configurable: !1,
187
264
  enumerable: !1,
188
265
  writable: !0,
189
- value: S
190
- }), Object.freeze && (Object.freeze(t.props), Object.freeze(t)), t;
266
+ value: V
267
+ }), Object.freeze && (Object.freeze(r.props), Object.freeze(r)), r;
191
268
  }
192
- function b(t, i, g, h, G, S) {
193
- var _ = i.children;
194
- if (_ !== void 0)
195
- if (h)
196
- if (te(_)) {
197
- for (h = 0; h < _.length; h++)
198
- l(_[h]);
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 l(_);
205
- if (q.call(i, "key")) {
206
- _ = e(t);
207
- var L = Object.keys(i).filter(function(be) {
208
- return be !== "key";
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
- h = 0 < L.length ? "{key: someKey, " + L.join(": ..., ") + ": ...}" : "{key: someKey}", J[_ + h] || (L = 0 < L.length ? "{" + L.join(": ..., ") + ": ...}" : "{}", console.error(
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
- h,
218
- _,
219
- L,
220
- _
221
- ), J[_ + h] = !0);
294
+ g,
295
+ b,
296
+ Y,
297
+ b
298
+ ), q[b + g] = !0);
222
299
  }
223
- if (_ = null, g !== void 0 && (o(g), _ = "" + g), d(i) && (o(i.key), _ = "" + i.key), "key" in i) {
224
- g = {};
225
- for (var z in i)
226
- z !== "key" && (g[z] = i[z]);
227
- } else g = i;
228
- return _ && p(
229
- g,
230
- typeof t == "function" ? t.displayName || t.name || "Unknown" : t
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
- t,
233
- _,
234
- g,
309
+ r,
310
+ b,
311
+ h,
235
312
  a(),
236
- G,
237
- S
313
+ C,
314
+ V
238
315
  );
239
316
  }
240
- function l(t) {
241
- f(t) ? t._store && (t._store.validated = 1) : typeof t == "object" && t !== null && t.$$typeof === Y && (t._payload.status === "fulfilled" ? f(t._payload.value) && t._payload.value._store && (t._payload.value._store.validated = 1) : t._store && (t._store.validated = 1));
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 f(t) {
244
- return typeof t == "object" && t !== null && t.$$typeof === w;
320
+ function d(r) {
321
+ return typeof r == "object" && r !== null && r.$$typeof === w;
245
322
  }
246
- var T = _e, w = Symbol.for("react.transitional.element"), v = Symbol.for("react.portal"), k = Symbol.for("react.fragment"), y = Symbol.for("react.strict_mode"), D = Symbol.for("react.profiler"), j = Symbol.for("react.consumer"), R = Symbol.for("react.context"), A = Symbol.for("react.forward_ref"), O = Symbol.for("react.suspense"), F = Symbol.for("react.suspense_list"), P = Symbol.for("react.memo"), Y = Symbol.for("react.lazy"), W = Symbol.for("react.activity"), Q = 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, B = console.createTask ? console.createTask : function() {
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(t) {
251
- return t();
327
+ react_stack_bottom_frame: function(r) {
328
+ return r();
252
329
  }
253
330
  };
254
- var K, V = {}, u = T.react_stack_bottom_frame.bind(
331
+ var f, E = {}, G = T.react_stack_bottom_frame.bind(
255
332
  T,
256
- c
257
- )(), E = B(n(c)), J = {};
258
- H.Fragment = k, H.jsx = function(t, i, g) {
259
- var h = 1e4 > U.recentlyCreatedOwnerStacks++;
260
- return b(
261
- t,
262
- i,
263
- g,
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
- h ? Error("react-stack-top-frame") : u,
266
- h ? B(n(t)) : E
342
+ g ? Error("react-stack-top-frame") : G,
343
+ g ? F(n(r)) : W
267
344
  );
268
- }, H.jsxs = function(t, i, g) {
269
- var h = 1e4 > U.recentlyCreatedOwnerStacks++;
270
- return b(
271
- t,
272
- i,
273
- g,
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
- h ? Error("react-stack-top-frame") : u,
276
- h ? B(n(t)) : E
352
+ g ? Error("react-stack-top-frame") : G,
353
+ g ? F(n(r)) : W
277
354
  );
278
355
  };
279
- })()), H;
356
+ })()), J;
280
357
  }
281
- var fe;
282
- function je() {
283
- return fe || (fe = 1, process.env.NODE_ENV === "production" ? ee.exports = Te() : ee.exports = ke()), ee.exports;
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 = je();
286
- function Re(e, r) {
287
- e.src = r;
362
+ var s = Ye();
363
+ function O(...e) {
364
+ return we(e);
288
365
  }
289
- const Pe = (e) => {
290
- var r, o, n, a = "The Google Maps JavaScript API", c = "google", d = "importLibrary", p = "__ib__", m = document, x = window, b = x[c] || (x[c] = {}), l = b.maps || (b.maps = {}), f = /* @__PURE__ */ new Set(), T = new URLSearchParams(), w = () => r || (r = new Promise(async (v, k) => {
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), Re(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 || Pe(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: M(
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
- r
374
+ t
359
375
  ),
360
376
  ...n
361
377
  }
362
378
  );
363
379
  }
364
- he.displayName = "Input";
365
- const ft = {
366
- north: 48.17277,
367
- south: 46.948101,
368
- east: 2.580919,
369
- west: -2.216823
370
- }, Fe = /* @__PURE__ */ new Set([
380
+ be.displayName = "Input";
381
+ const Ue = /* @__PURE__ */ new Set([
371
382
  "street_address",
372
383
  "route",
373
384
  "premise",
@@ -397,161 +408,150 @@ const ft = {
397
408
  "lodging",
398
409
  "train_station",
399
410
  "transit_station"
400
- ]), ce = (e) => (e.text?.text ?? "").replace(/, France$/, "").trim(), Ye = ({ prediction: e }) => {
401
- const r = ce(e), o = e.text?.text ?? "", n = e.text?.matches ?? [], a = r.length < o.length;
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;
402
413
  if (n.length === 0)
403
- return /* @__PURE__ */ s.jsx(s.Fragment, { children: r });
404
- const c = [];
405
- let d = 0;
414
+ return /* @__PURE__ */ s.jsx(s.Fragment, { children: t });
415
+ const i = [];
416
+ let u = 0;
406
417
  return n.forEach((p, m) => {
407
- if (a && p.startOffset >= r.length)
418
+ if (a && p.startOffset >= t.length)
408
419
  return;
409
- const x = p.startOffset, b = Math.min(p.endOffset, r.length);
410
- if (x > d && c.push(r.substring(d, x)), b > x) {
411
- const l = r.substring(x, b);
412
- c.push(/* @__PURE__ */ s.jsx("strong", { children: l }, m));
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));
413
424
  }
414
- d = Math.max(d, b);
415
- }), d < r.length && c.push(r.substring(d)), c.length === 0 ? /* @__PURE__ */ s.jsx(s.Fragment, { children: r }) : /* @__PURE__ */ s.jsx(s.Fragment, { children: c });
416
- }, Ue = (e, r) => !e.types || e.types.length === 0 || !r || r.size === 0 ? !0 : e.types.some((o) => r.has(o)), Ge = (e, r) => e.placeId || `${e.text?.text ?? "prediction"}-${r}`, We = (e) => {
417
- const r = /* @__PURE__ */ new Map();
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();
418
429
  return e.forEach((o) => {
419
430
  const n = o.placeId;
420
- n && (r.has(n) || r.set(n, o));
421
- }), Array.from(r.values());
422
- }, qe = (e, r) => e.filter((o) => Ue(o, r)), Be = (e) => e.sort((r, o) => {
423
- const n = r.distanceMeters ?? Number.POSITIVE_INFINITY, a = o.distanceMeters ?? Number.POSITIVE_INFINITY;
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;
424
435
  return n - a;
425
- }), Ve = (e, r) => Be(qe(We(e), r)), Je = (e, r) => ce(e).toLowerCase() === r.trim().toLowerCase(), mt = ({
436
+ }), Xe = (e, t) => Je(Be(Ve(e), t)), He = (e, t) => ue(e).toLowerCase() === t.trim().toLowerCase(), pt = ({
426
437
  id: e,
427
- label: r,
438
+ label: t,
428
439
  placeholder: o,
429
440
  value: n,
430
441
  onValueChange: a,
431
- disabled: c,
432
- name: d,
442
+ disabled: i,
443
+ name: u,
433
444
  className: p,
434
445
  autofillShimName: m,
435
446
  googleMapsApiKey: x,
436
- boundingBox: b,
437
- allowedTypes: l
447
+ locationRestriction: v,
448
+ allowedTypes: c
438
449
  }) => {
439
- const [f, T] = I(n ?? ""), [w, v] = I([]), [k, y] = I(!1), [D, j] = I(-1), R = C(null), A = C(null), O = C(!1), F = C(!1), P = C(null), Y = ze("places", x), [W, Q] = I(null), U = xe(() => {
440
- if (!l)
441
- return Fe;
442
- const u = /* @__PURE__ */ new Set();
443
- for (const E of l)
444
- u.add(E);
445
- return u;
446
- }, [l]);
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]);
447
458
  $(() => {
448
- T(n ?? ""), F.current = !1;
459
+ T(n ?? ""), z.current = !1;
449
460
  }, [n]), $(() => {
450
- if (!Y || typeof google > "u" || !google.maps?.importLibrary)
451
- return;
452
- let u = !0;
453
- return google.maps.importLibrary("places").then((E) => {
454
- u && Q(E);
455
- }).catch(() => {
456
- u && (console.error("AddressAutocompleteInput: failed to load places library"), Q(null));
457
- }), () => {
458
- u = !1;
459
- };
460
- }, [Y]), $(() => {
461
- if (O.current) {
462
- O.current = !1;
461
+ if (S.current) {
462
+ S.current = !1;
463
463
  return;
464
464
  }
465
- let u = !0;
465
+ let f = !0;
466
466
  const E = setTimeout(() => {
467
- if (!u)
467
+ if (!f)
468
468
  return;
469
- if (f.trim() === "") {
470
- v([]), y(!1), P.current = null, n !== "" && a("");
469
+ if (d.trim() === "") {
470
+ _([]), y(!1), R.current = null, n !== "" && a("");
471
471
  return;
472
472
  }
473
- if (!W) return;
474
- const { AutocompleteSuggestion: t, AutocompleteSessionToken: i } = W;
475
- if (!t || !i) {
476
- console.error("AddressAutocompleteInput: missing AutocompleteSuggestion or AutocompleteSessionToken exports"), v([]), y(!1);
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);
477
477
  return;
478
478
  }
479
- P.current || (P.current = new i());
480
- const g = {
481
- input: f,
482
- sessionToken: P.current ?? void 0,
483
- locationRestriction: b,
479
+ R.current || (R.current = new q());
480
+ const r = {
481
+ input: d,
482
+ sessionToken: R.current ?? void 0,
483
+ locationRestriction: v,
484
484
  includedRegionCodes: ["fr"]
485
485
  };
486
- t.fetchAutocompleteSuggestions(g).then((h) => {
487
- if (!u)
486
+ W.fetchAutocompleteSuggestions(r).then((l) => {
487
+ if (!f)
488
488
  return;
489
- const G = h.suggestions.map((z) => z.placePrediction).filter((z) => !!z), S = Ve(G, U), _ = S[0], L = _ && S.length === 1 && Je(_, f);
490
- if (!F.current && L) {
491
- v(S), y(!1);
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);
492
492
  return;
493
493
  }
494
- S.length > 0 ? (v(S), F.current && y(!0), j(-1)) : (v([]), y(!1));
495
- }).catch((h) => {
496
- u && (console.error("AddressAutocompleteInput: suggestion fetch failed", h), v([]), y(!1));
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));
497
497
  });
498
498
  }, 300);
499
499
  return () => {
500
- u = !1, clearTimeout(E);
500
+ f = !1, clearTimeout(E);
501
501
  };
502
- }, [f, W, a, n, b, U]), $(() => {
503
- const u = (E) => {
504
- R.current && !R.current.contains(E.target) && A.current && !A.current.contains(E.target) && y(!1);
502
+ }, [d, D, a, n, v, H]), $(() => {
503
+ const f = (E) => {
504
+ P.current && !P.current.contains(E.target) && A.current && !A.current.contains(E.target) && y(!1);
505
505
  };
506
- return document.addEventListener("mousedown", u), () => {
507
- document.removeEventListener("mousedown", u);
506
+ return document.addEventListener("mousedown", f), () => {
507
+ document.removeEventListener("mousedown", f);
508
508
  };
509
509
  }, []);
510
- const q = (u) => {
511
- O.current = !0;
512
- const E = ce(u);
513
- T(E), a(E), v([]), y(!1), P.current = null;
514
- }, te = (u) => {
515
- F.current = !0, T(u.target.value);
516
- }, B = (u) => {
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) => {
517
517
  if (!k || w.length === 0) {
518
- u.key === "Enter" && (u.preventDefault(), a(f), y(!1), P.current = null);
518
+ f.key === "Enter" && (f.preventDefault(), a(d), y(!1), R.current = null);
519
519
  return;
520
520
  }
521
- u.key === "ArrowDown" ? (u.preventDefault(), j((E) => (E + 1) % w.length)) : u.key === "ArrowUp" ? (u.preventDefault(), j((E) => (E - 1 + w.length) % w.length)) : u.key === "Enter" ? (u.preventDefault(), D > -1 && w[D] ? q(w[D]) : (a(f), y(!1), P.current = null)) : u.key === "Escape" && y(!1);
522
- }, K = () => {
523
- y(!1), n !== f && a(f), P.current = null;
524
- }, V = m ?? (d ? `${d}_shim` : void 0);
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);
525
525
  return /* @__PURE__ */ s.jsxs("div", { className: "relative", children: [
526
- V && /* @__PURE__ */ s.jsx(
526
+ F && /* @__PURE__ */ s.jsx(
527
527
  "input",
528
528
  {
529
529
  tabIndex: -1,
530
530
  autoComplete: "street-address",
531
- name: V,
531
+ name: F,
532
532
  "aria-hidden": "true",
533
533
  className: "pointer-events-none absolute left-0 top-0 h-0 w-0 opacity-0"
534
534
  }
535
535
  ),
536
- /* @__PURE__ */ s.jsx("label", { htmlFor: e, className: "text-left block text-sm font-medium text-gray-700 mb-1", children: r }),
536
+ /* @__PURE__ */ s.jsx("label", { htmlFor: e, className: "text-left block text-sm font-medium text-gray-700 mb-1", children: t }),
537
537
  /* @__PURE__ */ s.jsx(
538
- he,
538
+ be,
539
539
  {
540
- ref: R,
540
+ ref: P,
541
541
  id: e,
542
542
  type: "text",
543
543
  placeholder: o,
544
- name: d ?? `${e}_input`,
545
- value: f,
546
- onChange: te,
547
- onKeyDown: B,
544
+ name: u ?? `${e}_input`,
545
+ value: d,
546
+ onChange: U,
547
+ onKeyDown: Q,
548
548
  onFocus: () => {
549
- w.length > 0 && f && y(!0);
549
+ w.length > 0 && d && y(!0);
550
550
  },
551
- onBlur: K,
552
- disabled: c,
551
+ onBlur: te,
552
+ disabled: i,
553
553
  autoComplete: "off",
554
- className: M("w-full", p)
554
+ className: O("w-full", p)
555
555
  }
556
556
  ),
557
557
  k && w.length > 0 && /* @__PURE__ */ s.jsx(
@@ -559,34 +559,34 @@ const ft = {
559
559
  {
560
560
  ref: A,
561
561
  className: "absolute z-10 w-full mt-1 bg-white border border-gray-200 rounded-md shadow-lg text-left",
562
- children: w.map((u, E) => /* @__PURE__ */ s.jsx(
562
+ children: w.map((f, E) => /* @__PURE__ */ s.jsx(
563
563
  "li",
564
564
  {
565
- className: ie(
565
+ className: le(
566
566
  "px-3 py-2 cursor-pointer text-sm text-gray-700 hover:bg-gray-100",
567
- { "bg-gray-100": D === E }
567
+ { "bg-gray-100": M === E }
568
568
  ),
569
- onMouseDown: (J) => {
570
- J.preventDefault(), q(u);
569
+ onMouseDown: (G) => {
570
+ G.preventDefault(), Z(f);
571
571
  },
572
- children: /* @__PURE__ */ s.jsx(Ye, { prediction: u })
572
+ children: /* @__PURE__ */ s.jsx(Ge, { prediction: f })
573
573
  },
574
- Ge(u, E)
574
+ qe(f, E)
575
575
  ))
576
576
  }
577
577
  )
578
578
  ] });
579
- }, pt = ({
579
+ }, gt = ({
580
580
  className: e,
581
- onClick: r,
581
+ onClick: t,
582
582
  children: o,
583
583
  ...n
584
584
  }) => /* @__PURE__ */ s.jsxs(
585
585
  "button",
586
586
  {
587
587
  type: "button",
588
- onClick: r,
589
- className: ie(
588
+ onClick: t,
589
+ className: le(
590
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",
591
591
  e
592
592
  ),
@@ -596,32 +596,32 @@ const ft = {
596
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" }) })
597
597
  ]
598
598
  }
599
- ), Xe = {
599
+ ), Ze = {
600
600
  red: "checked:border-red-700 checked:bg-red-700 indeterminate:border-red-700 indeterminate:bg-red-700 focus-visible:outline-red-700",
601
601
  sky: "checked:border-sky-600 checked:bg-sky-600 indeterminate:border-sky-600 indeterminate:bg-sky-600 focus-visible:outline-sky-600"
602
- }, gt = ({
602
+ }, ht = ({
603
603
  id: e,
604
- name: r,
604
+ name: t,
605
605
  defaultValue: o,
606
606
  defaultChecked: n,
607
607
  checked: a,
608
- onChange: c,
609
- color: d = "sky",
608
+ onChange: i,
609
+ color: u = "sky",
610
610
  ...p
611
611
  }) => {
612
- const m = Xe[d];
612
+ const m = Ze[u];
613
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: [
614
614
  /* @__PURE__ */ s.jsx(
615
615
  "input",
616
616
  {
617
617
  ...p,
618
618
  id: e,
619
- name: r,
619
+ name: t,
620
620
  type: "checkbox",
621
621
  defaultValue: o,
622
622
  defaultChecked: n,
623
623
  checked: a,
624
- onChange: c,
624
+ onChange: i,
625
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}`
626
626
  }
627
627
  ),
@@ -657,59 +657,59 @@ const ft = {
657
657
  )
658
658
  ] }) });
659
659
  };
660
- function ht({
660
+ function bt({
661
661
  ...e
662
662
  }) {
663
663
  return /* @__PURE__ */ s.jsx(N.Root, { "data-slot": "dialog", ...e });
664
664
  }
665
- function bt({
665
+ function vt({
666
666
  ...e
667
667
  }) {
668
668
  return /* @__PURE__ */ s.jsx(N.Trigger, { "data-slot": "dialog-trigger", ...e });
669
669
  }
670
- function He({
670
+ function Qe({
671
671
  ...e
672
672
  }) {
673
673
  return /* @__PURE__ */ s.jsx(N.Portal, { "data-slot": "dialog-portal", ...e });
674
674
  }
675
- function vt({
675
+ function _t({
676
676
  ...e
677
677
  }) {
678
678
  return /* @__PURE__ */ s.jsx(N.Close, { "data-slot": "dialog-close", ...e });
679
679
  }
680
- function Ze({
680
+ function Ke({
681
681
  className: e,
682
- ...r
682
+ ...t
683
683
  }) {
684
684
  return /* @__PURE__ */ s.jsx(
685
685
  N.Overlay,
686
686
  {
687
687
  "data-slot": "dialog-overlay",
688
- className: M(
688
+ className: O(
689
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",
690
690
  e
691
691
  ),
692
- ...r
692
+ ...t
693
693
  }
694
694
  );
695
695
  }
696
- const Qe = ve.forwardRef(({ className: e, children: r, showCloseButton: o = !0, showCloseButtonOutside: n = !1, ...a }, c) => /* @__PURE__ */ s.jsx(He, { "data-slot": "dialog-portal", children: /* @__PURE__ */ s.jsx(Ze, { children: /* @__PURE__ */ s.jsxs(
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(
697
697
  N.Content,
698
698
  {
699
- ref: c,
699
+ ref: i,
700
700
  "data-slot": "dialog-content",
701
- className: M(
701
+ className: O(
702
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",
703
703
  e
704
704
  ),
705
705
  ...a,
706
706
  children: [
707
- r,
707
+ t,
708
708
  o && /* @__PURE__ */ s.jsxs(
709
709
  N.Close,
710
710
  {
711
711
  "data-slot": "dialog-close",
712
- className: M(
712
+ className: O(
713
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",
714
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"
715
715
  ),
@@ -722,126 +722,126 @@ const Qe = ve.forwardRef(({ className: e, children: r, showCloseButton: o = !0,
722
722
  ]
723
723
  }
724
724
  ) }) }));
725
- Qe.displayName = N.Content.displayName;
726
- function _t({ className: e, ...r }) {
725
+ et.displayName = N.Content.displayName;
726
+ function xt({ className: e, ...t }) {
727
727
  return /* @__PURE__ */ s.jsx(
728
728
  "div",
729
729
  {
730
730
  "data-slot": "dialog-header",
731
- className: M("flex flex-col gap-2 text-center sm:text-left", e),
732
- ...r
731
+ className: O("flex flex-col gap-2 text-center sm:text-left", e),
732
+ ...t
733
733
  }
734
734
  );
735
735
  }
736
- function xt({ className: e, ...r }) {
736
+ function yt({ className: e, ...t }) {
737
737
  return /* @__PURE__ */ s.jsx(
738
738
  "div",
739
739
  {
740
740
  "data-slot": "dialog-footer",
741
- className: M("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", e),
742
- ...r
741
+ className: O("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", e),
742
+ ...t
743
743
  }
744
744
  );
745
745
  }
746
- function yt({
746
+ function wt({
747
747
  className: e,
748
- ...r
748
+ ...t
749
749
  }) {
750
750
  return /* @__PURE__ */ s.jsx(
751
751
  N.Title,
752
752
  {
753
753
  "data-slot": "dialog-title",
754
- className: M("text-lg leading-none font-semibold", e),
755
- ...r
754
+ className: O("text-lg leading-none font-semibold", e),
755
+ ...t
756
756
  }
757
757
  );
758
758
  }
759
759
  function Et({
760
760
  className: e,
761
- ...r
761
+ ...t
762
762
  }) {
763
763
  return /* @__PURE__ */ s.jsx(
764
764
  N.Description,
765
765
  {
766
766
  "data-slot": "dialog-description",
767
- className: M("text-muted-foreground text-sm", e),
768
- ...r
767
+ className: O("text-muted-foreground text-sm", e),
768
+ ...t
769
769
  }
770
770
  );
771
771
  }
772
- var Ke = ["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", "#", "$", "%", "*", "+", ",", "-", ".", ":", ";", "=", "?", "@", "[", "]", "^", "_", "{", "|", "}", "~"], Z = (e) => {
773
- let r = 0;
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;
774
774
  for (let o = 0; o < e.length; o++) {
775
- let n = e[o], a = Ke.indexOf(n);
776
- r = r * 83 + a;
775
+ let n = e[o], a = tt.indexOf(n);
776
+ t = t * 83 + a;
777
777
  }
778
- return r;
779
- }, oe = (e) => {
780
- let r = e / 255;
781
- return r <= 0.04045 ? r / 12.92 : Math.pow((r + 0.055) / 1.055, 2.4);
778
+ return t;
782
779
  }, ne = (e) => {
783
- let r = Math.max(0, Math.min(1, e));
784
- return r <= 31308e-7 ? Math.trunc(r * 12.92 * 255 + 0.5) : Math.trunc((1.055 * Math.pow(r, 0.4166666666666667) - 0.055) * 255 + 0.5);
785
- }, et = (e) => e < 0 ? -1 : 1, se = (e, r) => et(e) * Math.pow(Math.abs(e), r), pe = class extends Error {
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 {
786
786
  constructor(e) {
787
787
  super(e), this.name = "ValidationError", this.message = e;
788
788
  }
789
- }, tt = (e) => {
790
- if (!e || e.length < 6) throw new pe("The blurhash string must be at least 6 characters");
791
- let r = Z(e[0]), o = Math.floor(r / 9) + 1, n = r % 9 + 1;
792
- if (e.length !== 4 + 2 * n * o) throw new pe(`blurhash length mismatch: length is ${e.length} but it should be ${4 + 2 * n * o}`);
793
- }, rt = (e) => {
794
- let r = e >> 16, o = e >> 8 & 255, n = e & 255;
795
- return [oe(r), oe(o), oe(n)];
796
- }, ot = (e, r) => {
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) => {
797
797
  let o = Math.floor(e / 361), n = Math.floor(e / 19) % 19, a = e % 19;
798
- return [se((o - 9) / 9, 2) * r, se((n - 9) / 9, 2) * r, se((a - 9) / 9, 2) * r];
799
- }, nt = (e, r, o, n) => {
800
- tt(e), n = n | 1;
801
- let a = Z(e[0]), c = Math.floor(a / 9) + 1, d = a % 9 + 1, p = (Z(e[1]) + 1) / 166, m = new Array(d * c);
802
- for (let l = 0; l < m.length; l++) if (l === 0) {
803
- let f = Z(e.substring(2, 6));
804
- m[l] = rt(f);
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);
805
805
  } else {
806
- let f = Z(e.substring(4 + l * 2, 6 + l * 2));
807
- m[l] = ot(f, p * n);
806
+ let d = X(e.substring(4 + c * 2, 6 + c * 2));
807
+ m[c] = st(d, p * n);
808
808
  }
809
- let x = r * 4, b = new Uint8ClampedArray(x * o);
810
- for (let l = 0; l < o; l++) for (let f = 0; f < r; f++) {
811
- let T = 0, w = 0, v = 0;
812
- for (let j = 0; j < c; j++) for (let R = 0; R < d; R++) {
813
- let A = Math.cos(Math.PI * f * R / r) * Math.cos(Math.PI * l * j / o), O = m[R + j * d];
814
- T += O[0] * A, w += O[1] * A, v += O[2] * A;
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;
815
815
  }
816
- let k = ne(T), y = ne(w), D = ne(v);
817
- b[4 * f + 0 + l * x] = k, b[4 * f + 1 + l * x] = y, b[4 * f + 2 + l * x] = D, b[4 * f + 3 + l * x] = 255;
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;
818
818
  }
819
- return b;
820
- }, st = nt;
821
- const wt = ({
819
+ return v;
820
+ }, it = at;
821
+ const Tt = ({
822
822
  src: e,
823
- hash: r,
823
+ hash: t,
824
824
  alt: o = "",
825
825
  className: n
826
826
  }) => {
827
- const [a, c] = I(!1), [d, p] = I(null), m = C(null);
827
+ const [a, i] = L(!1), [u, p] = L(null), m = I(null);
828
828
  $(() => {
829
- if (!r) return;
830
- const [l, f, T] = r, w = st(T, l, f), v = document.createElement("canvas"), k = v.getContext("2d");
829
+ if (!t) return;
830
+ const [c, d, T] = t, w = it(T, c, d), _ = document.createElement("canvas"), k = _.getContext("2d");
831
831
  if (k) {
832
- v.width = l, v.height = f;
832
+ _.width = c, _.height = d;
833
833
  const y = new ImageData(
834
834
  new Uint8ClampedArray(w),
835
- l,
836
- f
835
+ c,
836
+ d
837
837
  );
838
- k.putImageData(y, 0, 0), p(v.toDataURL());
838
+ k.putImageData(y, 0, 0), p(_.toDataURL());
839
839
  }
840
- }, [r]), $(() => {
841
- m.current && m.current.complete && c(!0);
840
+ }, [t]), $(() => {
841
+ m.current && m.current.complete && i(!0);
842
842
  }, [e]);
843
843
  const x = () => {
844
- }, b = () => {
844
+ }, v = () => {
845
845
  };
846
846
  return /* @__PURE__ */ s.jsxs(
847
847
  "div",
@@ -849,12 +849,12 @@ const wt = ({
849
849
  style: { position: "relative", overflow: "hidden" },
850
850
  className: n,
851
851
  onMouseEnter: x,
852
- onMouseLeave: b,
852
+ onMouseLeave: v,
853
853
  children: [
854
- d && !a && /* @__PURE__ */ s.jsx(
854
+ u && !a && /* @__PURE__ */ s.jsx(
855
855
  "img",
856
856
  {
857
- src: d,
857
+ src: u,
858
858
  style: {
859
859
  position: "absolute",
860
860
  top: 0,
@@ -881,25 +881,25 @@ const wt = ({
881
881
  left: 0
882
882
  },
883
883
  onLoad: () => {
884
- c(!0);
884
+ i(!0);
885
885
  },
886
- onError: (l) => console.error("Image failed to load:", e, l)
886
+ onError: (c) => console.error("Image failed to load:", e, c)
887
887
  }
888
888
  )
889
889
  ]
890
890
  }
891
891
  );
892
- }, at = ({
892
+ }, lt = ({
893
893
  href: e,
894
- labelClassName: r,
894
+ labelClassName: t,
895
895
  labelActiveClassName: o,
896
896
  labelElement: n,
897
897
  isActive: a,
898
- children: c
898
+ children: i
899
899
  }) => {
900
- const [d, p] = I(!1), m = C(null), x = C(null), b = () => {
900
+ const [u, p] = L(!1), m = I(null), x = I(null), v = () => {
901
901
  m.current && clearTimeout(m.current), p(!0);
902
- }, l = () => {
902
+ }, c = () => {
903
903
  m.current = setTimeout(() => {
904
904
  p(!1);
905
905
  }, 120);
@@ -911,25 +911,25 @@ const wt = ({
911
911
  {
912
912
  className: "flex",
913
913
  ref: x,
914
- onMouseEnter: b,
915
- onMouseLeave: l,
914
+ onMouseEnter: v,
915
+ onMouseLeave: c,
916
916
  children: [
917
917
  /* @__PURE__ */ s.jsx("div", { className: "relative flex", children: /* @__PURE__ */ s.jsx(
918
- we,
918
+ Te,
919
919
  {
920
920
  to: e,
921
921
  onClick: () => {
922
922
  p(!1);
923
923
  },
924
- className: ie(
924
+ className: le(
925
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",
926
- r,
927
- d || a ? o : "border-transparent"
926
+ t,
927
+ u || a ? o : "border-transparent"
928
928
  ),
929
929
  children: n
930
930
  }
931
931
  ) }),
932
- d && /* @__PURE__ */ s.jsxs(
932
+ u && /* @__PURE__ */ s.jsxs(
933
933
  "div",
934
934
  {
935
935
  className: "absolute left-0 right-0 top-full z-20 text-gray-500 sm:text-sm",
@@ -942,33 +942,33 @@ const wt = ({
942
942
  className: "absolute inset-0 top-1/2 bg-white shadow-sm"
943
943
  }
944
944
  ),
945
- /* @__PURE__ */ s.jsx("div", { className: "relative bg-white", children: c({ setIsOpen: p }) })
945
+ /* @__PURE__ */ s.jsx("div", { className: "relative bg-white", children: i({ setIsOpen: p }) })
946
946
  ]
947
947
  }
948
948
  )
949
949
  ]
950
950
  }
951
951
  );
952
- }, Tt = {
953
- MenuPopover: at
952
+ }, kt = {
953
+ MenuPopover: lt
954
954
  };
955
955
  export {
956
- mt as AddressAutocompleteInput,
957
- pt as ApplePayButton,
958
- gt as Checkbox,
959
- ft as DEFAULT_ADDRESS_BOUNDING_BOX,
960
- ht as Dialog,
961
- vt as DialogClose,
962
- Qe as DialogContent,
956
+ pt as AddressAutocompleteInput,
957
+ gt as ApplePayButton,
958
+ ht as Checkbox,
959
+ bt as Dialog,
960
+ _t as DialogClose,
961
+ et as DialogContent,
963
962
  Et as DialogDescription,
964
- xt as DialogFooter,
965
- _t as DialogHeader,
966
- Ze as DialogOverlay,
967
- He as DialogPortal,
968
- yt as DialogTitle,
969
- bt as DialogTrigger,
970
- Tt as Header,
971
- wt as Image,
972
- he as Input,
973
- dt as isMobileDevice
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
974
974
  };