@ikonai/sdk-react-ui-radix 0.0.9 → 0.0.11

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/index.js CHANGED
@@ -1,6 +1,9 @@
1
- import ce, { memo as w } from "react";
2
- import { Box as le, Button as de, Heading as fe, Text as pe, TextArea as Re, TextField as me } from "@radix-ui/themes";
3
- var O = { exports: {} }, A = {};
1
+ import * as c from "react";
2
+ import ro, { memo as J, useState as lt, useEffect as Wt, Fragment as ue, useLayoutEffect as oo } from "react";
3
+ import { Box as io, Button as so, Heading as ao, IconButton as co, Text as lo, TextArea as uo, TextField as fo, Theme as po } from "@radix-ui/themes";
4
+ import * as Ln from "react-dom";
5
+ import ho from "react-dom";
6
+ var Ge = { exports: {} }, Le = {};
4
7
  /**
5
8
  * @license React
6
9
  * react-jsx-runtime.production.js
@@ -10,29 +13,29 @@ var O = { exports: {} }, A = {};
10
13
  * This source code is licensed under the MIT license found in the
11
14
  * LICENSE file in the root directory of this source tree.
12
15
  */
13
- var J;
14
- function ve() {
15
- if (J) return A;
16
- J = 1;
17
- var r = Symbol.for("react.transitional.element"), i = Symbol.for("react.fragment");
18
- function o(t, a, u) {
19
- var l = null;
20
- if (u !== void 0 && (l = "" + u), a.key !== void 0 && (l = "" + a.key), "key" in a) {
21
- u = {};
22
- for (var d in a)
23
- d !== "key" && (u[d] = a[d]);
24
- } else u = a;
25
- return a = u.ref, {
26
- $$typeof: r,
27
- type: t,
28
- key: l,
29
- ref: a !== void 0 ? a : null,
30
- props: u
16
+ var un;
17
+ function mo() {
18
+ if (un) return Le;
19
+ un = 1;
20
+ var e = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
21
+ function n(r, o, i) {
22
+ var s = null;
23
+ if (i !== void 0 && (s = "" + i), o.key !== void 0 && (s = "" + o.key), "key" in o) {
24
+ i = {};
25
+ for (var a in o)
26
+ a !== "key" && (i[a] = o[a]);
27
+ } else i = o;
28
+ return o = i.ref, {
29
+ $$typeof: e,
30
+ type: r,
31
+ key: s,
32
+ ref: o !== void 0 ? o : null,
33
+ props: i
31
34
  };
32
35
  }
33
- return A.Fragment = i, A.jsx = o, A.jsxs = o, A;
36
+ return Le.Fragment = t, Le.jsx = n, Le.jsxs = n, Le;
34
37
  }
35
- var S = {};
38
+ var Fe = {};
36
39
  /**
37
40
  * @license React
38
41
  * react-jsx-runtime.development.js
@@ -42,407 +45,4096 @@ var S = {};
42
45
  * This source code is licensed under the MIT license found in the
43
46
  * LICENSE file in the root directory of this source tree.
44
47
  */
45
- var z;
46
- function be() {
47
- return z || (z = 1, process.env.NODE_ENV !== "production" && function() {
48
- function r(e) {
49
- if (e == null) return null;
50
- if (typeof e == "function")
51
- return e.$$typeof === ie ? null : e.displayName || e.name || null;
52
- if (typeof e == "string") return e;
53
- switch (e) {
54
- case v:
48
+ var fn;
49
+ function vo() {
50
+ return fn || (fn = 1, process.env.NODE_ENV !== "production" && function() {
51
+ function e(x) {
52
+ if (x == null) return null;
53
+ if (typeof x == "function")
54
+ return x.$$typeof === D ? null : x.displayName || x.name || null;
55
+ if (typeof x == "string") return x;
56
+ switch (x) {
57
+ case m:
55
58
  return "Fragment";
56
- case Z:
59
+ case w:
57
60
  return "Profiler";
58
- case X:
61
+ case y:
59
62
  return "StrictMode";
60
- case te:
63
+ case E:
61
64
  return "Suspense";
62
- case ne:
65
+ case O:
63
66
  return "SuspenseList";
64
- case ae:
67
+ case _:
65
68
  return "Activity";
66
69
  }
67
- if (typeof e == "object")
68
- switch (typeof e.tag == "number" && console.error(
70
+ if (typeof x == "object")
71
+ switch (typeof x.tag == "number" && console.error(
69
72
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
70
- ), e.$$typeof) {
71
- case y:
73
+ ), x.$$typeof) {
74
+ case v:
72
75
  return "Portal";
73
- case ee:
74
- return (e.displayName || "Context") + ".Provider";
75
- case Q:
76
- return (e._context.displayName || "Context") + ".Consumer";
77
- case re:
78
- var n = e.render;
79
- return e = e.displayName, e || (e = n.displayName || n.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
80
- case oe:
81
- return n = e.displayName || null, n !== null ? n : r(e.type) || "Memo";
82
- case M:
83
- n = e._payload, e = e._init;
76
+ case C:
77
+ return (x.displayName || "Context") + ".Provider";
78
+ case b:
79
+ return (x._context.displayName || "Context") + ".Consumer";
80
+ case R:
81
+ var S = x.render;
82
+ return x = x.displayName, x || (x = S.displayName || S.name || "", x = x !== "" ? "ForwardRef(" + x + ")" : "ForwardRef"), x;
83
+ case P:
84
+ return S = x.displayName || null, S !== null ? S : e(x.type) || "Memo";
85
+ case A:
86
+ S = x._payload, x = x._init;
84
87
  try {
85
- return r(e(n));
88
+ return e(x(S));
86
89
  } catch {
87
90
  }
88
91
  }
89
92
  return null;
90
93
  }
91
- function i(e) {
92
- return "" + e;
94
+ function t(x) {
95
+ return "" + x;
93
96
  }
94
- function o(e) {
97
+ function n(x) {
95
98
  try {
96
- i(e);
97
- var n = !1;
99
+ t(x);
100
+ var S = !1;
98
101
  } catch {
99
- n = !0;
102
+ S = !0;
100
103
  }
101
- if (n) {
102
- n = console;
103
- var c = n.error, p = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
104
- return c.call(
105
- n,
104
+ if (S) {
105
+ S = console;
106
+ var I = S.error, V = typeof Symbol == "function" && Symbol.toStringTag && x[Symbol.toStringTag] || x.constructor.name || "Object";
107
+ return I.call(
108
+ S,
106
109
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
107
- p
108
- ), i(e);
110
+ V
111
+ ), t(x);
109
112
  }
110
113
  }
111
- function t(e) {
112
- if (e === v) return "<>";
113
- if (typeof e == "object" && e !== null && e.$$typeof === M)
114
+ function r(x) {
115
+ if (x === m) return "<>";
116
+ if (typeof x == "object" && x !== null && x.$$typeof === A)
114
117
  return "<...>";
115
118
  try {
116
- var n = r(e);
117
- return n ? "<" + n + ">" : "<...>";
119
+ var S = e(x);
120
+ return S ? "<" + S + ">" : "<...>";
118
121
  } catch {
119
122
  return "<...>";
120
123
  }
121
124
  }
122
- function a() {
123
- var e = C.A;
124
- return e === null ? null : e.getOwner();
125
+ function o() {
126
+ var x = M.A;
127
+ return x === null ? null : x.getOwner();
125
128
  }
126
- function u() {
129
+ function i() {
127
130
  return Error("react-stack-top-frame");
128
131
  }
129
- function l(e) {
130
- if ($.call(e, "key")) {
131
- var n = Object.getOwnPropertyDescriptor(e, "key").get;
132
- if (n && n.isReactWarning) return !1;
132
+ function s(x) {
133
+ if (F.call(x, "key")) {
134
+ var S = Object.getOwnPropertyDescriptor(x, "key").get;
135
+ if (S && S.isReactWarning) return !1;
133
136
  }
134
- return e.key !== void 0;
137
+ return x.key !== void 0;
135
138
  }
136
- function d(e, n) {
137
- function c() {
138
- L || (L = !0, console.error(
139
+ function a(x, S) {
140
+ function I() {
141
+ U || (U = !0, console.error(
139
142
  "%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)",
140
- n
143
+ S
141
144
  ));
142
145
  }
143
- c.isReactWarning = !0, Object.defineProperty(e, "key", {
144
- get: c,
146
+ I.isReactWarning = !0, Object.defineProperty(x, "key", {
147
+ get: I,
145
148
  configurable: !0
146
149
  });
147
150
  }
148
- function f() {
149
- var e = r(this.type);
150
- return U[e] || (U[e] = !0, console.error(
151
+ function l() {
152
+ var x = e(this.type);
153
+ return j[x] || (j[x] = !0, console.error(
151
154
  "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."
152
- )), e = this.props.ref, e !== void 0 ? e : null;
153
- }
154
- function m(e, n, c, p, _, h, V, Y) {
155
- return c = h.ref, e = {
156
- $$typeof: T,
157
- type: e,
158
- key: n,
159
- props: h,
160
- _owner: _
161
- }, (c !== void 0 ? c : null) !== null ? Object.defineProperty(e, "ref", {
155
+ )), x = this.props.ref, x !== void 0 ? x : null;
156
+ }
157
+ function u(x, S, I, V, re, q, Me, le) {
158
+ return I = q.ref, x = {
159
+ $$typeof: h,
160
+ type: x,
161
+ key: S,
162
+ props: q,
163
+ _owner: re
164
+ }, (I !== void 0 ? I : null) !== null ? Object.defineProperty(x, "ref", {
162
165
  enumerable: !1,
163
- get: f
164
- }) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
166
+ get: l
167
+ }) : Object.defineProperty(x, "ref", { enumerable: !1, value: null }), x._store = {}, Object.defineProperty(x._store, "validated", {
165
168
  configurable: !1,
166
169
  enumerable: !1,
167
170
  writable: !0,
168
171
  value: 0
169
- }), Object.defineProperty(e, "_debugInfo", {
172
+ }), Object.defineProperty(x, "_debugInfo", {
170
173
  configurable: !1,
171
174
  enumerable: !1,
172
175
  writable: !0,
173
176
  value: null
174
- }), Object.defineProperty(e, "_debugStack", {
177
+ }), Object.defineProperty(x, "_debugStack", {
175
178
  configurable: !1,
176
179
  enumerable: !1,
177
180
  writable: !0,
178
- value: V
179
- }), Object.defineProperty(e, "_debugTask", {
181
+ value: Me
182
+ }), Object.defineProperty(x, "_debugTask", {
180
183
  configurable: !1,
181
184
  enumerable: !1,
182
185
  writable: !0,
183
- value: Y
184
- }), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
185
- }
186
- function b(e, n, c, p, _, h, V, Y) {
187
- var R = n.children;
188
- if (R !== void 0)
189
- if (p)
190
- if (se(R)) {
191
- for (p = 0; p < R.length; p++)
192
- E(R[p]);
193
- Object.freeze && Object.freeze(R);
186
+ value: le
187
+ }), Object.freeze && (Object.freeze(x.props), Object.freeze(x)), x;
188
+ }
189
+ function f(x, S, I, V, re, q, Me, le) {
190
+ var B = S.children;
191
+ if (B !== void 0)
192
+ if (V)
193
+ if ($(B)) {
194
+ for (V = 0; V < B.length; V++)
195
+ d(B[V]);
196
+ Object.freeze && Object.freeze(B);
194
197
  } else
195
198
  console.error(
196
199
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
197
200
  );
198
- else E(R);
199
- if ($.call(n, "key")) {
200
- R = r(e);
201
- var g = Object.keys(n).filter(function(ue) {
202
- return ue !== "key";
201
+ else d(B);
202
+ if (F.call(S, "key")) {
203
+ B = e(x);
204
+ var pe = Object.keys(S).filter(function(Rt) {
205
+ return Rt !== "key";
203
206
  });
204
- p = 0 < g.length ? "{key: someKey, " + g.join(": ..., ") + ": ...}" : "{key: someKey}", q[R + p] || (g = 0 < g.length ? "{" + g.join(": ..., ") + ": ...}" : "{}", console.error(
207
+ V = 0 < pe.length ? "{key: someKey, " + pe.join(": ..., ") + ": ...}" : "{key: someKey}", W[B + V] || (pe = 0 < pe.length ? "{" + pe.join(": ..., ") + ": ...}" : "{}", console.error(
205
208
  `A props object containing a "key" prop is being spread into JSX:
206
209
  let props = %s;
207
210
  <%s {...props} />
208
211
  React keys must be passed directly to JSX without using spread:
209
212
  let props = %s;
210
213
  <%s key={someKey} {...props} />`,
211
- p,
212
- R,
213
- g,
214
- R
215
- ), q[R + p] = !0);
216
- }
217
- if (R = null, c !== void 0 && (o(c), R = "" + c), l(n) && (o(n.key), R = "" + n.key), "key" in n) {
218
- c = {};
219
- for (var D in n)
220
- D !== "key" && (c[D] = n[D]);
221
- } else c = n;
222
- return R && d(
223
- c,
224
- typeof e == "function" ? e.displayName || e.name || "Unknown" : e
225
- ), m(
226
- e,
227
- R,
228
- h,
229
- _,
230
- a(),
231
- c,
232
- V,
233
- Y
214
+ V,
215
+ B,
216
+ pe,
217
+ B
218
+ ), W[B + V] = !0);
219
+ }
220
+ if (B = null, I !== void 0 && (n(I), B = "" + I), s(S) && (n(S.key), B = "" + S.key), "key" in S) {
221
+ I = {};
222
+ for (var je in S)
223
+ je !== "key" && (I[je] = S[je]);
224
+ } else I = S;
225
+ return B && a(
226
+ I,
227
+ typeof x == "function" ? x.displayName || x.name || "Unknown" : x
228
+ ), u(
229
+ x,
230
+ B,
231
+ q,
232
+ re,
233
+ o(),
234
+ I,
235
+ Me,
236
+ le
234
237
  );
235
238
  }
236
- function E(e) {
237
- typeof e == "object" && e !== null && e.$$typeof === T && e._store && (e._store.validated = 1);
239
+ function d(x) {
240
+ typeof x == "object" && x !== null && x.$$typeof === h && x._store && (x._store.validated = 1);
238
241
  }
239
- var s = ce, T = Symbol.for("react.transitional.element"), y = Symbol.for("react.portal"), v = Symbol.for("react.fragment"), X = Symbol.for("react.strict_mode"), Z = Symbol.for("react.profiler"), Q = Symbol.for("react.consumer"), ee = Symbol.for("react.context"), re = Symbol.for("react.forward_ref"), te = Symbol.for("react.suspense"), ne = Symbol.for("react.suspense_list"), oe = Symbol.for("react.memo"), M = Symbol.for("react.lazy"), ae = Symbol.for("react.activity"), ie = Symbol.for("react.client.reference"), C = s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, $ = Object.prototype.hasOwnProperty, se = Array.isArray, I = console.createTask ? console.createTask : function() {
242
+ var p = ro, h = Symbol.for("react.transitional.element"), v = Symbol.for("react.portal"), m = Symbol.for("react.fragment"), y = Symbol.for("react.strict_mode"), w = Symbol.for("react.profiler"), b = Symbol.for("react.consumer"), C = Symbol.for("react.context"), R = Symbol.for("react.forward_ref"), E = Symbol.for("react.suspense"), O = Symbol.for("react.suspense_list"), P = Symbol.for("react.memo"), A = Symbol.for("react.lazy"), _ = Symbol.for("react.activity"), D = Symbol.for("react.client.reference"), M = p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, F = Object.prototype.hasOwnProperty, $ = Array.isArray, k = console.createTask ? console.createTask : function() {
240
243
  return null;
241
244
  };
242
- s = {
243
- "react-stack-bottom-frame": function(e) {
244
- return e();
245
+ p = {
246
+ "react-stack-bottom-frame": function(x) {
247
+ return x();
245
248
  }
246
249
  };
247
- var L, U = {}, B = s["react-stack-bottom-frame"].bind(
248
- s,
249
- u
250
- )(), W = I(t(u)), q = {};
251
- S.Fragment = v, S.jsx = function(e, n, c, p, _) {
252
- var h = 1e4 > C.recentlyCreatedOwnerStacks++;
253
- return b(
254
- e,
255
- n,
256
- c,
250
+ var U, j = {}, L = p["react-stack-bottom-frame"].bind(
251
+ p,
252
+ i
253
+ )(), T = k(r(i)), W = {};
254
+ Fe.Fragment = m, Fe.jsx = function(x, S, I, V, re) {
255
+ var q = 1e4 > M.recentlyCreatedOwnerStacks++;
256
+ return f(
257
+ x,
258
+ S,
259
+ I,
257
260
  !1,
258
- p,
259
- _,
260
- h ? Error("react-stack-top-frame") : B,
261
- h ? I(t(e)) : W
261
+ V,
262
+ re,
263
+ q ? Error("react-stack-top-frame") : L,
264
+ q ? k(r(x)) : T
262
265
  );
263
- }, S.jsxs = function(e, n, c, p, _) {
264
- var h = 1e4 > C.recentlyCreatedOwnerStacks++;
265
- return b(
266
- e,
267
- n,
268
- c,
266
+ }, Fe.jsxs = function(x, S, I, V, re) {
267
+ var q = 1e4 > M.recentlyCreatedOwnerStacks++;
268
+ return f(
269
+ x,
270
+ S,
271
+ I,
269
272
  !0,
270
- p,
271
- _,
272
- h ? Error("react-stack-top-frame") : B,
273
- h ? I(t(e)) : W
273
+ V,
274
+ re,
275
+ q ? Error("react-stack-top-frame") : L,
276
+ q ? k(r(x)) : T
274
277
  );
275
278
  };
276
- }()), S;
279
+ }()), Fe;
277
280
  }
278
- var K;
279
- function xe() {
280
- return K || (K = 1, process.env.NODE_ENV === "production" ? O.exports = ve() : O.exports = be()), O.exports;
281
+ var dn;
282
+ function go() {
283
+ return dn || (dn = 1, process.env.NODE_ENV === "production" ? Ge.exports = mo() : Ge.exports = vo()), Ge.exports;
281
284
  }
282
- var k = xe();
283
- function x(r) {
284
- if (r != null) {
285
- if (typeof r == "string")
286
- return r;
287
- if (typeof r == "number" || typeof r == "boolean")
288
- return String(r);
285
+ var g = go();
286
+ function N(e) {
287
+ if (e != null) {
288
+ if (typeof e == "string")
289
+ return e;
290
+ if (typeof e == "number" || typeof e == "boolean")
291
+ return String(e);
289
292
  }
290
293
  }
291
- function F(r) {
292
- if (r != null) {
293
- if (typeof r == "boolean")
294
- return r;
295
- if (r === "true") return !0;
296
- if (r === "false") return !1;
294
+ function Z(e) {
295
+ if (e != null) {
296
+ if (typeof e == "boolean")
297
+ return e;
298
+ if (e === "true") return !0;
299
+ if (e === "false") return !1;
297
300
  }
298
301
  }
299
- function he(r) {
300
- if (typeof r == "number")
301
- return r;
302
- if (typeof r == "string") {
303
- const i = Number(r);
304
- return Number.isFinite(i) ? i : void 0;
302
+ function be(e) {
303
+ if (typeof e == "number")
304
+ return e;
305
+ if (typeof e == "string") {
306
+ const t = Number(e);
307
+ return Number.isFinite(t) ? t : void 0;
305
308
  }
306
309
  }
307
- function j(r) {
308
- return x(r)?.trim() ?? void 0;
310
+ function me(e) {
311
+ return N(e)?.trim() ?? void 0;
309
312
  }
310
- function N(...r) {
311
- const i = [];
312
- for (const o of r) {
313
- if (Array.isArray(o)) {
314
- for (const t of o) {
315
- const a = t.trim();
316
- a && i.push(a);
313
+ function z(...e) {
314
+ const t = [];
315
+ for (const n of e) {
316
+ if (Array.isArray(n)) {
317
+ for (const r of n) {
318
+ const o = r.trim();
319
+ o && t.push(o);
317
320
  }
318
321
  continue;
319
322
  }
320
- typeof o == "string" && o.trim() && i.push(o.trim());
323
+ typeof n == "string" && n.trim() && t.push(n.trim());
321
324
  }
322
- return i.length > 0 ? i.join(" ") : void 0;
325
+ return t.length > 0 ? t.join(" ") : void 0;
323
326
  }
324
- function P(r, i = /* @__PURE__ */ new Set()) {
325
- if (!r)
327
+ function Q(e, t = /* @__PURE__ */ new Set()) {
328
+ if (!e)
326
329
  return {};
327
- const o = {};
328
- for (const [t, a] of Object.entries(r))
329
- i.has(t) || a != null && (typeof a == "string" || typeof a == "number" || typeof a == "boolean") && (o[t] = a);
330
- return o;
330
+ const n = {};
331
+ for (const [r, o] of Object.entries(e))
332
+ t.has(r) || o != null && (typeof o == "string" || typeof o == "number" || typeof o == "boolean") && (n[r] = o);
333
+ return n;
331
334
  }
332
- function G(r, i) {
333
- if (r)
335
+ function Bt(e, t) {
336
+ if (e)
334
337
  return () => {
335
- i(r);
338
+ t(e);
339
+ };
340
+ }
341
+ function Fn(e, t) {
342
+ if (e)
343
+ return (n) => t(e, n);
344
+ }
345
+ function Ht(e, t) {
346
+ if (e)
347
+ return (n) => t(e, n ?? null);
348
+ }
349
+ function rt(e) {
350
+ if (Array.isArray(e)) {
351
+ const t = e.filter((n) => typeof n == "string").map((n) => n.trim()).filter(Boolean);
352
+ return t.length > 0 ? t : void 0;
353
+ }
354
+ if (typeof e == "string") {
355
+ const t = e.trim();
356
+ return t.length > 0 ? [t] : void 0;
357
+ }
358
+ }
359
+ function Vt(e) {
360
+ const t = [], n = /* @__PURE__ */ new Map();
361
+ for (const o of e.children ?? []) {
362
+ const i = N(o.props?.slot)?.trim();
363
+ if (i) {
364
+ const s = n.get(i);
365
+ s ? s.push(o) : n.set(i, [o]);
366
+ continue;
367
+ }
368
+ t.push(o);
369
+ }
370
+ const r = /* @__PURE__ */ new Map();
371
+ for (const [o, i] of n.entries())
372
+ r.set(o, i);
373
+ return {
374
+ defaultChildren: t,
375
+ slotChildren: r
376
+ };
377
+ }
378
+ function yo() {
379
+ const e = J(function({ node: n, context: r, className: o }) {
380
+ const i = Q(n.props, /* @__PURE__ */ new Set(["className"])), s = z(o, N(n.props?.className)), a = r.renderChildren(n.children ?? []);
381
+ return /* @__PURE__ */ g.jsx(io, { "data-ikon-element-id": n.id, className: s, ...i, children: a });
382
+ });
383
+ return (t) => {
384
+ if (t.type === "radix-box")
385
+ return e;
386
+ };
387
+ }
388
+ function xo() {
389
+ const e = /* @__PURE__ */ new Set(["label", "disabled", "onInvokeId", "className"]), t = J(function({ node: r, context: o, className: i }) {
390
+ const s = N(r.props?.label), a = Z(r.props?.disabled), u = { ...Q(r.props, e) };
391
+ a === !0 && (u.disabled = !0);
392
+ const f = Bt(me(r.props?.onInvokeId), o.dispatchAction);
393
+ f && (u.onClick = f);
394
+ const d = [];
395
+ s !== void 0 && d.push(s);
396
+ const p = o.renderChildren(r.children ?? []);
397
+ p != null && d.push(p);
398
+ const h = z("radix-button", i, N(r.props?.className));
399
+ h && (u.className = h);
400
+ const v = { "data-ikon-element-id": r.id };
401
+ return /* @__PURE__ */ g.jsx(so, { ...u, ...v, children: d });
402
+ });
403
+ return (n) => {
404
+ if (n.type === "radix-button")
405
+ return t;
406
+ };
407
+ }
408
+ function H(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
409
+ return function(o) {
410
+ if (e?.(o), n === !1 || !o.defaultPrevented)
411
+ return t?.(o);
412
+ };
413
+ }
414
+ function pn(e, t) {
415
+ if (typeof e == "function")
416
+ return e(t);
417
+ e != null && (e.current = t);
418
+ }
419
+ function $n(...e) {
420
+ return (t) => {
421
+ let n = !1;
422
+ const r = e.map((o) => {
423
+ const i = pn(o, t);
424
+ return !n && typeof i == "function" && (n = !0), i;
425
+ });
426
+ if (n)
427
+ return () => {
428
+ for (let o = 0; o < r.length; o++) {
429
+ const i = r[o];
430
+ typeof i == "function" ? i() : pn(e[o], null);
431
+ }
432
+ };
433
+ };
434
+ }
435
+ function K(...e) {
436
+ return c.useCallback($n(...e), e);
437
+ }
438
+ function wo(e, t) {
439
+ const n = c.createContext(t), r = (i) => {
440
+ const { children: s, ...a } = i, l = c.useMemo(() => a, Object.values(a));
441
+ return /* @__PURE__ */ g.jsx(n.Provider, { value: l, children: s });
442
+ };
443
+ r.displayName = e + "Provider";
444
+ function o(i) {
445
+ const s = c.useContext(n);
446
+ if (s) return s;
447
+ if (t !== void 0) return t;
448
+ throw new Error(`\`${i}\` must be used within \`${e}\``);
449
+ }
450
+ return [r, o];
451
+ }
452
+ function ut(e, t = []) {
453
+ let n = [];
454
+ function r(i, s) {
455
+ const a = c.createContext(s), l = n.length;
456
+ n = [...n, s];
457
+ const u = (d) => {
458
+ const { scope: p, children: h, ...v } = d, m = p?.[e]?.[l] || a, y = c.useMemo(() => v, Object.values(v));
459
+ return /* @__PURE__ */ g.jsx(m.Provider, { value: y, children: h });
460
+ };
461
+ u.displayName = i + "Provider";
462
+ function f(d, p) {
463
+ const h = p?.[e]?.[l] || a, v = c.useContext(h);
464
+ if (v) return v;
465
+ if (s !== void 0) return s;
466
+ throw new Error(`\`${d}\` must be used within \`${i}\``);
467
+ }
468
+ return [u, f];
469
+ }
470
+ const o = () => {
471
+ const i = n.map((s) => c.createContext(s));
472
+ return function(a) {
473
+ const l = a?.[e] || i;
474
+ return c.useMemo(
475
+ () => ({ [`__scope${e}`]: { ...a, [e]: l } }),
476
+ [a, l]
477
+ );
478
+ };
479
+ };
480
+ return o.scopeName = e, [r, bo(o, ...t)];
481
+ }
482
+ function bo(...e) {
483
+ const t = e[0];
484
+ if (e.length === 1) return t;
485
+ const n = () => {
486
+ const r = e.map((o) => ({
487
+ useScope: o(),
488
+ scopeName: o.scopeName
489
+ }));
490
+ return function(i) {
491
+ const s = r.reduce((a, { useScope: l, scopeName: u }) => {
492
+ const d = l(i)[`__scope${u}`];
493
+ return { ...a, ...d };
494
+ }, {});
495
+ return c.useMemo(() => ({ [`__scope${t.scopeName}`]: s }), [s]);
496
+ };
497
+ };
498
+ return n.scopeName = t.scopeName, n;
499
+ }
500
+ var ve = globalThis?.document ? c.useLayoutEffect : () => {
501
+ }, Co = c[" useId ".trim().toString()] || (() => {
502
+ }), Ro = 0;
503
+ function $e(e) {
504
+ const [t, n] = c.useState(Co());
505
+ return ve(() => {
506
+ n((r) => r ?? String(Ro++));
507
+ }, [e]), e || (t ? `radix-${t}` : "");
508
+ }
509
+ var Eo = c[" useInsertionEffect ".trim().toString()] || ve;
510
+ function Ut({
511
+ prop: e,
512
+ defaultProp: t,
513
+ onChange: n = () => {
514
+ },
515
+ caller: r
516
+ }) {
517
+ const [o, i, s] = Po({
518
+ defaultProp: t,
519
+ onChange: n
520
+ }), a = e !== void 0, l = a ? e : o;
521
+ {
522
+ const f = c.useRef(e !== void 0);
523
+ c.useEffect(() => {
524
+ const d = f.current;
525
+ d !== a && console.warn(
526
+ `${r} is changing from ${d ? "controlled" : "uncontrolled"} to ${a ? "controlled" : "uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
527
+ ), f.current = a;
528
+ }, [a, r]);
529
+ }
530
+ const u = c.useCallback(
531
+ (f) => {
532
+ if (a) {
533
+ const d = Oo(f) ? f(e) : f;
534
+ d !== e && s.current?.(d);
535
+ } else
536
+ i(f);
537
+ },
538
+ [a, e, i, s]
539
+ );
540
+ return [l, u];
541
+ }
542
+ function Po({
543
+ defaultProp: e,
544
+ onChange: t
545
+ }) {
546
+ const [n, r] = c.useState(e), o = c.useRef(n), i = c.useRef(t);
547
+ return Eo(() => {
548
+ i.current = t;
549
+ }, [t]), c.useEffect(() => {
550
+ o.current !== n && (i.current?.(n), o.current = n);
551
+ }, [n, o]), [n, r, i];
552
+ }
553
+ function Oo(e) {
554
+ return typeof e == "function";
555
+ }
556
+ // @__NO_SIDE_EFFECTS__
557
+ function zt(e) {
558
+ const t = /* @__PURE__ */ So(e), n = c.forwardRef((r, o) => {
559
+ const { children: i, ...s } = r, a = c.Children.toArray(i), l = a.find(To);
560
+ if (l) {
561
+ const u = l.props.children, f = a.map((d) => d === l ? c.Children.count(u) > 1 ? c.Children.only(null) : c.isValidElement(u) ? u.props.children : null : d);
562
+ return /* @__PURE__ */ g.jsx(t, { ...s, ref: o, children: c.isValidElement(u) ? c.cloneElement(u, void 0, f) : null });
563
+ }
564
+ return /* @__PURE__ */ g.jsx(t, { ...s, ref: o, children: i });
565
+ });
566
+ return n.displayName = `${e}.Slot`, n;
567
+ }
568
+ // @__NO_SIDE_EFFECTS__
569
+ function So(e) {
570
+ const t = c.forwardRef((n, r) => {
571
+ const { children: o, ...i } = n;
572
+ if (c.isValidElement(o)) {
573
+ const s = Do(o), a = No(i, o.props);
574
+ return o.type !== c.Fragment && (a.ref = r ? $n(r, s) : s), c.cloneElement(o, a);
575
+ }
576
+ return c.Children.count(o) > 1 ? c.Children.only(null) : null;
577
+ });
578
+ return t.displayName = `${e}.SlotClone`, t;
579
+ }
580
+ var Wn = Symbol("radix.slottable");
581
+ // @__NO_SIDE_EFFECTS__
582
+ function Ao(e) {
583
+ const t = ({ children: n }) => /* @__PURE__ */ g.jsx(g.Fragment, { children: n });
584
+ return t.displayName = `${e}.Slottable`, t.__radixId = Wn, t;
585
+ }
586
+ function To(e) {
587
+ return c.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === Wn;
588
+ }
589
+ function No(e, t) {
590
+ const n = { ...t };
591
+ for (const r in t) {
592
+ const o = e[r], i = t[r];
593
+ /^on[A-Z]/.test(r) ? o && i ? n[r] = (...a) => {
594
+ const l = i(...a);
595
+ return o(...a), l;
596
+ } : o && (n[r] = o) : r === "style" ? n[r] = { ...o, ...i } : r === "className" && (n[r] = [o, i].filter(Boolean).join(" "));
597
+ }
598
+ return { ...e, ...n };
599
+ }
600
+ function Do(e) {
601
+ let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
602
+ return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
603
+ }
604
+ var _o = [
605
+ "a",
606
+ "button",
607
+ "div",
608
+ "form",
609
+ "h2",
610
+ "h3",
611
+ "img",
612
+ "input",
613
+ "label",
614
+ "li",
615
+ "nav",
616
+ "ol",
617
+ "p",
618
+ "select",
619
+ "span",
620
+ "svg",
621
+ "ul"
622
+ ], Y = _o.reduce((e, t) => {
623
+ const n = /* @__PURE__ */ zt(`Primitive.${t}`), r = c.forwardRef((o, i) => {
624
+ const { asChild: s, ...a } = o, l = s ? n : t;
625
+ return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ g.jsx(l, { ...a, ref: i });
626
+ });
627
+ return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
628
+ }, {});
629
+ function ko(e, t) {
630
+ e && Ln.flushSync(() => e.dispatchEvent(t));
631
+ }
632
+ function Te(e) {
633
+ const t = c.useRef(e);
634
+ return c.useEffect(() => {
635
+ t.current = e;
636
+ }), c.useMemo(() => (...n) => t.current?.(...n), []);
637
+ }
638
+ function Io(e, t = globalThis?.document) {
639
+ const n = Te(e);
640
+ c.useEffect(() => {
641
+ const r = (o) => {
642
+ o.key === "Escape" && n(o);
643
+ };
644
+ return t.addEventListener("keydown", r, { capture: !0 }), () => t.removeEventListener("keydown", r, { capture: !0 });
645
+ }, [n, t]);
646
+ }
647
+ var Mo = "DismissableLayer", kt = "dismissableLayer.update", jo = "dismissableLayer.pointerDownOutside", Lo = "dismissableLayer.focusOutside", hn, Bn = c.createContext({
648
+ layers: /* @__PURE__ */ new Set(),
649
+ layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
650
+ branches: /* @__PURE__ */ new Set()
651
+ }), ft = c.forwardRef(
652
+ (e, t) => {
653
+ const {
654
+ disableOutsidePointerEvents: n = !1,
655
+ onEscapeKeyDown: r,
656
+ onPointerDownOutside: o,
657
+ onFocusOutside: i,
658
+ onInteractOutside: s,
659
+ onDismiss: a,
660
+ ...l
661
+ } = e, u = c.useContext(Bn), [f, d] = c.useState(null), p = f?.ownerDocument ?? globalThis?.document, [, h] = c.useState({}), v = K(t, (P) => d(P)), m = Array.from(u.layers), [y] = [...u.layersWithOutsidePointerEventsDisabled].slice(-1), w = m.indexOf(y), b = f ? m.indexOf(f) : -1, C = u.layersWithOutsidePointerEventsDisabled.size > 0, R = b >= w, E = Wo((P) => {
662
+ const A = P.target, _ = [...u.branches].some((D) => D.contains(A));
663
+ !R || _ || (o?.(P), s?.(P), P.defaultPrevented || a?.());
664
+ }, p), O = Bo((P) => {
665
+ const A = P.target;
666
+ [...u.branches].some((D) => D.contains(A)) || (i?.(P), s?.(P), P.defaultPrevented || a?.());
667
+ }, p);
668
+ return Io((P) => {
669
+ b === u.layers.size - 1 && (r?.(P), !P.defaultPrevented && a && (P.preventDefault(), a()));
670
+ }, p), c.useEffect(() => {
671
+ if (f)
672
+ return n && (u.layersWithOutsidePointerEventsDisabled.size === 0 && (hn = p.body.style.pointerEvents, p.body.style.pointerEvents = "none"), u.layersWithOutsidePointerEventsDisabled.add(f)), u.layers.add(f), mn(), () => {
673
+ n && u.layersWithOutsidePointerEventsDisabled.size === 1 && (p.body.style.pointerEvents = hn);
674
+ };
675
+ }, [f, p, n, u]), c.useEffect(() => () => {
676
+ f && (u.layers.delete(f), u.layersWithOutsidePointerEventsDisabled.delete(f), mn());
677
+ }, [f, u]), c.useEffect(() => {
678
+ const P = () => h({});
679
+ return document.addEventListener(kt, P), () => document.removeEventListener(kt, P);
680
+ }, []), /* @__PURE__ */ g.jsx(
681
+ Y.div,
682
+ {
683
+ ...l,
684
+ ref: v,
685
+ style: {
686
+ pointerEvents: C ? R ? "auto" : "none" : void 0,
687
+ ...e.style
688
+ },
689
+ onFocusCapture: H(e.onFocusCapture, O.onFocusCapture),
690
+ onBlurCapture: H(e.onBlurCapture, O.onBlurCapture),
691
+ onPointerDownCapture: H(
692
+ e.onPointerDownCapture,
693
+ E.onPointerDownCapture
694
+ )
695
+ }
696
+ );
697
+ }
698
+ );
699
+ ft.displayName = Mo;
700
+ var Fo = "DismissableLayerBranch", $o = c.forwardRef((e, t) => {
701
+ const n = c.useContext(Bn), r = c.useRef(null), o = K(t, r);
702
+ return c.useEffect(() => {
703
+ const i = r.current;
704
+ if (i)
705
+ return n.branches.add(i), () => {
706
+ n.branches.delete(i);
707
+ };
708
+ }, [n.branches]), /* @__PURE__ */ g.jsx(Y.div, { ...e, ref: o });
709
+ });
710
+ $o.displayName = Fo;
711
+ function Wo(e, t = globalThis?.document) {
712
+ const n = Te(e), r = c.useRef(!1), o = c.useRef(() => {
713
+ });
714
+ return c.useEffect(() => {
715
+ const i = (a) => {
716
+ if (a.target && !r.current) {
717
+ let l = function() {
718
+ Hn(
719
+ jo,
720
+ n,
721
+ u,
722
+ { discrete: !0 }
723
+ );
724
+ };
725
+ const u = { originalEvent: a };
726
+ a.pointerType === "touch" ? (t.removeEventListener("click", o.current), o.current = l, t.addEventListener("click", o.current, { once: !0 })) : l();
727
+ } else
728
+ t.removeEventListener("click", o.current);
729
+ r.current = !1;
730
+ }, s = window.setTimeout(() => {
731
+ t.addEventListener("pointerdown", i);
732
+ }, 0);
733
+ return () => {
734
+ window.clearTimeout(s), t.removeEventListener("pointerdown", i), t.removeEventListener("click", o.current);
735
+ };
736
+ }, [t, n]), {
737
+ // ensures we check React component tree (not just DOM tree)
738
+ onPointerDownCapture: () => r.current = !0
739
+ };
740
+ }
741
+ function Bo(e, t = globalThis?.document) {
742
+ const n = Te(e), r = c.useRef(!1);
743
+ return c.useEffect(() => {
744
+ const o = (i) => {
745
+ i.target && !r.current && Hn(Lo, n, { originalEvent: i }, {
746
+ discrete: !1
747
+ });
748
+ };
749
+ return t.addEventListener("focusin", o), () => t.removeEventListener("focusin", o);
750
+ }, [t, n]), {
751
+ onFocusCapture: () => r.current = !0,
752
+ onBlurCapture: () => r.current = !1
753
+ };
754
+ }
755
+ function mn() {
756
+ const e = new CustomEvent(kt);
757
+ document.dispatchEvent(e);
758
+ }
759
+ function Hn(e, t, n, { discrete: r }) {
760
+ const o = n.originalEvent.target, i = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
761
+ t && o.addEventListener(e, t, { once: !0 }), r ? ko(o, i) : o.dispatchEvent(i);
762
+ }
763
+ var Et = "focusScope.autoFocusOnMount", Pt = "focusScope.autoFocusOnUnmount", vn = { bubbles: !1, cancelable: !0 }, Ho = "FocusScope", Yt = c.forwardRef((e, t) => {
764
+ const {
765
+ loop: n = !1,
766
+ trapped: r = !1,
767
+ onMountAutoFocus: o,
768
+ onUnmountAutoFocus: i,
769
+ ...s
770
+ } = e, [a, l] = c.useState(null), u = Te(o), f = Te(i), d = c.useRef(null), p = K(t, (m) => l(m)), h = c.useRef({
771
+ paused: !1,
772
+ pause() {
773
+ this.paused = !0;
774
+ },
775
+ resume() {
776
+ this.paused = !1;
777
+ }
778
+ }).current;
779
+ c.useEffect(() => {
780
+ if (r) {
781
+ let m = function(C) {
782
+ if (h.paused || !a) return;
783
+ const R = C.target;
784
+ a.contains(R) ? d.current = R : he(d.current, { select: !0 });
785
+ }, y = function(C) {
786
+ if (h.paused || !a) return;
787
+ const R = C.relatedTarget;
788
+ R !== null && (a.contains(R) || he(d.current, { select: !0 }));
789
+ }, w = function(C) {
790
+ if (document.activeElement === document.body)
791
+ for (const E of C)
792
+ E.removedNodes.length > 0 && he(a);
793
+ };
794
+ document.addEventListener("focusin", m), document.addEventListener("focusout", y);
795
+ const b = new MutationObserver(w);
796
+ return a && b.observe(a, { childList: !0, subtree: !0 }), () => {
797
+ document.removeEventListener("focusin", m), document.removeEventListener("focusout", y), b.disconnect();
798
+ };
799
+ }
800
+ }, [r, a, h.paused]), c.useEffect(() => {
801
+ if (a) {
802
+ yn.add(h);
803
+ const m = document.activeElement;
804
+ if (!a.contains(m)) {
805
+ const w = new CustomEvent(Et, vn);
806
+ a.addEventListener(Et, u), a.dispatchEvent(w), w.defaultPrevented || (Vo(Xo(Vn(a)), { select: !0 }), document.activeElement === m && he(a));
807
+ }
808
+ return () => {
809
+ a.removeEventListener(Et, u), setTimeout(() => {
810
+ const w = new CustomEvent(Pt, vn);
811
+ a.addEventListener(Pt, f), a.dispatchEvent(w), w.defaultPrevented || he(m ?? document.body, { select: !0 }), a.removeEventListener(Pt, f), yn.remove(h);
812
+ }, 0);
813
+ };
814
+ }
815
+ }, [a, u, f, h]);
816
+ const v = c.useCallback(
817
+ (m) => {
818
+ if (!n && !r || h.paused) return;
819
+ const y = m.key === "Tab" && !m.altKey && !m.ctrlKey && !m.metaKey, w = document.activeElement;
820
+ if (y && w) {
821
+ const b = m.currentTarget, [C, R] = Uo(b);
822
+ C && R ? !m.shiftKey && w === R ? (m.preventDefault(), n && he(C, { select: !0 })) : m.shiftKey && w === C && (m.preventDefault(), n && he(R, { select: !0 })) : w === b && m.preventDefault();
823
+ }
824
+ },
825
+ [n, r, h.paused]
826
+ );
827
+ return /* @__PURE__ */ g.jsx(Y.div, { tabIndex: -1, ...s, ref: p, onKeyDown: v });
828
+ });
829
+ Yt.displayName = Ho;
830
+ function Vo(e, { select: t = !1 } = {}) {
831
+ const n = document.activeElement;
832
+ for (const r of e)
833
+ if (he(r, { select: t }), document.activeElement !== n) return;
834
+ }
835
+ function Uo(e) {
836
+ const t = Vn(e), n = gn(t, e), r = gn(t.reverse(), e);
837
+ return [n, r];
838
+ }
839
+ function Vn(e) {
840
+ const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
841
+ acceptNode: (r) => {
842
+ const o = r.tagName === "INPUT" && r.type === "hidden";
843
+ return r.disabled || r.hidden || o ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
844
+ }
845
+ });
846
+ for (; n.nextNode(); ) t.push(n.currentNode);
847
+ return t;
848
+ }
849
+ function gn(e, t) {
850
+ for (const n of e)
851
+ if (!zo(n, { upTo: t })) return n;
852
+ }
853
+ function zo(e, { upTo: t }) {
854
+ if (getComputedStyle(e).visibility === "hidden") return !0;
855
+ for (; e; ) {
856
+ if (t !== void 0 && e === t) return !1;
857
+ if (getComputedStyle(e).display === "none") return !0;
858
+ e = e.parentElement;
859
+ }
860
+ return !1;
861
+ }
862
+ function Yo(e) {
863
+ return e instanceof HTMLInputElement && "select" in e;
864
+ }
865
+ function he(e, { select: t = !1 } = {}) {
866
+ if (e && e.focus) {
867
+ const n = document.activeElement;
868
+ e.focus({ preventScroll: !0 }), e !== n && Yo(e) && t && e.select();
869
+ }
870
+ }
871
+ var yn = Go();
872
+ function Go() {
873
+ let e = [];
874
+ return {
875
+ add(t) {
876
+ const n = e[0];
877
+ t !== n && n?.pause(), e = xn(e, t), e.unshift(t);
878
+ },
879
+ remove(t) {
880
+ e = xn(e, t), e[0]?.resume();
881
+ }
882
+ };
883
+ }
884
+ function xn(e, t) {
885
+ const n = [...e], r = n.indexOf(t);
886
+ return r !== -1 && n.splice(r, 1), n;
887
+ }
888
+ function Xo(e) {
889
+ return e.filter((t) => t.tagName !== "A");
890
+ }
891
+ var Ko = "Portal", dt = c.forwardRef((e, t) => {
892
+ const { container: n, ...r } = e, [o, i] = c.useState(!1);
893
+ ve(() => i(!0), []);
894
+ const s = n || o && globalThis?.document?.body;
895
+ return s ? ho.createPortal(/* @__PURE__ */ g.jsx(Y.div, { ...r, ref: t }), s) : null;
896
+ });
897
+ dt.displayName = Ko;
898
+ function qo(e, t) {
899
+ return c.useReducer((n, r) => t[n][r] ?? n, e);
900
+ }
901
+ var xe = (e) => {
902
+ const { present: t, children: n } = e, r = Zo(t), o = typeof n == "function" ? n({ present: r.isPresent }) : c.Children.only(n), i = K(r.ref, Jo(o));
903
+ return typeof n == "function" || r.isPresent ? c.cloneElement(o, { ref: i }) : null;
904
+ };
905
+ xe.displayName = "Presence";
906
+ function Zo(e) {
907
+ const [t, n] = c.useState(), r = c.useRef(null), o = c.useRef(e), i = c.useRef("none"), s = e ? "mounted" : "unmounted", [a, l] = qo(s, {
908
+ mounted: {
909
+ UNMOUNT: "unmounted",
910
+ ANIMATION_OUT: "unmountSuspended"
911
+ },
912
+ unmountSuspended: {
913
+ MOUNT: "mounted",
914
+ ANIMATION_END: "unmounted"
915
+ },
916
+ unmounted: {
917
+ MOUNT: "mounted"
918
+ }
919
+ });
920
+ return c.useEffect(() => {
921
+ const u = Xe(r.current);
922
+ i.current = a === "mounted" ? u : "none";
923
+ }, [a]), ve(() => {
924
+ const u = r.current, f = o.current;
925
+ if (f !== e) {
926
+ const p = i.current, h = Xe(u);
927
+ e ? l("MOUNT") : h === "none" || u?.display === "none" ? l("UNMOUNT") : l(f && p !== h ? "ANIMATION_OUT" : "UNMOUNT"), o.current = e;
928
+ }
929
+ }, [e, l]), ve(() => {
930
+ if (t) {
931
+ let u;
932
+ const f = t.ownerDocument.defaultView ?? window, d = (h) => {
933
+ const m = Xe(r.current).includes(CSS.escape(h.animationName));
934
+ if (h.target === t && m && (l("ANIMATION_END"), !o.current)) {
935
+ const y = t.style.animationFillMode;
936
+ t.style.animationFillMode = "forwards", u = f.setTimeout(() => {
937
+ t.style.animationFillMode === "forwards" && (t.style.animationFillMode = y);
938
+ });
939
+ }
940
+ }, p = (h) => {
941
+ h.target === t && (i.current = Xe(r.current));
942
+ };
943
+ return t.addEventListener("animationstart", p), t.addEventListener("animationcancel", d), t.addEventListener("animationend", d), () => {
944
+ f.clearTimeout(u), t.removeEventListener("animationstart", p), t.removeEventListener("animationcancel", d), t.removeEventListener("animationend", d);
945
+ };
946
+ } else
947
+ l("ANIMATION_END");
948
+ }, [t, l]), {
949
+ isPresent: ["mounted", "unmountSuspended"].includes(a),
950
+ ref: c.useCallback((u) => {
951
+ r.current = u ? getComputedStyle(u) : null, n(u);
952
+ }, [])
953
+ };
954
+ }
955
+ function Xe(e) {
956
+ return e?.animationName || "none";
957
+ }
958
+ function Jo(e) {
959
+ let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
960
+ return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
961
+ }
962
+ var Ot = 0;
963
+ function Un() {
964
+ c.useEffect(() => {
965
+ const e = document.querySelectorAll("[data-radix-focus-guard]");
966
+ return document.body.insertAdjacentElement("afterbegin", e[0] ?? wn()), document.body.insertAdjacentElement("beforeend", e[1] ?? wn()), Ot++, () => {
967
+ Ot === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), Ot--;
968
+ };
969
+ }, []);
970
+ }
971
+ function wn() {
972
+ const e = document.createElement("span");
973
+ return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
974
+ }
975
+ var oe = function() {
976
+ return oe = Object.assign || function(t) {
977
+ for (var n, r = 1, o = arguments.length; r < o; r++) {
978
+ n = arguments[r];
979
+ for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]);
980
+ }
981
+ return t;
982
+ }, oe.apply(this, arguments);
983
+ };
984
+ function zn(e, t) {
985
+ var n = {};
986
+ for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
987
+ if (e != null && typeof Object.getOwnPropertySymbols == "function")
988
+ for (var o = 0, r = Object.getOwnPropertySymbols(e); o < r.length; o++)
989
+ t.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[o]) && (n[r[o]] = e[r[o]]);
990
+ return n;
991
+ }
992
+ function Qo(e, t, n) {
993
+ if (n || arguments.length === 2) for (var r = 0, o = t.length, i; r < o; r++)
994
+ (i || !(r in t)) && (i || (i = Array.prototype.slice.call(t, 0, r)), i[r] = t[r]);
995
+ return e.concat(i || Array.prototype.slice.call(t));
996
+ }
997
+ var et = "right-scroll-bar-position", tt = "width-before-scroll-bar", ei = "with-scroll-bars-hidden", ti = "--removed-body-scroll-bar-size";
998
+ function St(e, t) {
999
+ return typeof e == "function" ? e(t) : e && (e.current = t), e;
1000
+ }
1001
+ function ni(e, t) {
1002
+ var n = lt(function() {
1003
+ return {
1004
+ // value
1005
+ value: e,
1006
+ // last callback
1007
+ callback: t,
1008
+ // "memoized" public interface
1009
+ facade: {
1010
+ get current() {
1011
+ return n.value;
1012
+ },
1013
+ set current(r) {
1014
+ var o = n.value;
1015
+ o !== r && (n.value = r, n.callback(r, o));
1016
+ }
1017
+ }
1018
+ };
1019
+ })[0];
1020
+ return n.callback = t, n.facade;
1021
+ }
1022
+ var ri = typeof window < "u" ? c.useLayoutEffect : c.useEffect, bn = /* @__PURE__ */ new WeakMap();
1023
+ function oi(e, t) {
1024
+ var n = ni(null, function(r) {
1025
+ return e.forEach(function(o) {
1026
+ return St(o, r);
1027
+ });
1028
+ });
1029
+ return ri(function() {
1030
+ var r = bn.get(n);
1031
+ if (r) {
1032
+ var o = new Set(r), i = new Set(e), s = n.current;
1033
+ o.forEach(function(a) {
1034
+ i.has(a) || St(a, null);
1035
+ }), i.forEach(function(a) {
1036
+ o.has(a) || St(a, s);
1037
+ });
1038
+ }
1039
+ bn.set(n, e);
1040
+ }, [e]), n;
1041
+ }
1042
+ function ii(e) {
1043
+ return e;
1044
+ }
1045
+ function si(e, t) {
1046
+ t === void 0 && (t = ii);
1047
+ var n = [], r = !1, o = {
1048
+ read: function() {
1049
+ if (r)
1050
+ throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
1051
+ return n.length ? n[n.length - 1] : e;
1052
+ },
1053
+ useMedium: function(i) {
1054
+ var s = t(i, r);
1055
+ return n.push(s), function() {
1056
+ n = n.filter(function(a) {
1057
+ return a !== s;
1058
+ });
1059
+ };
1060
+ },
1061
+ assignSyncMedium: function(i) {
1062
+ for (r = !0; n.length; ) {
1063
+ var s = n;
1064
+ n = [], s.forEach(i);
1065
+ }
1066
+ n = {
1067
+ push: function(a) {
1068
+ return i(a);
1069
+ },
1070
+ filter: function() {
1071
+ return n;
1072
+ }
1073
+ };
1074
+ },
1075
+ assignMedium: function(i) {
1076
+ r = !0;
1077
+ var s = [];
1078
+ if (n.length) {
1079
+ var a = n;
1080
+ n = [], a.forEach(i), s = n;
1081
+ }
1082
+ var l = function() {
1083
+ var f = s;
1084
+ s = [], f.forEach(i);
1085
+ }, u = function() {
1086
+ return Promise.resolve().then(l);
1087
+ };
1088
+ u(), n = {
1089
+ push: function(f) {
1090
+ s.push(f), u();
1091
+ },
1092
+ filter: function(f) {
1093
+ return s = s.filter(f), n;
1094
+ }
1095
+ };
1096
+ }
1097
+ };
1098
+ return o;
1099
+ }
1100
+ function ai(e) {
1101
+ e === void 0 && (e = {});
1102
+ var t = si(null);
1103
+ return t.options = oe({ async: !0, ssr: !1 }, e), t;
1104
+ }
1105
+ var Yn = function(e) {
1106
+ var t = e.sideCar, n = zn(e, ["sideCar"]);
1107
+ if (!t)
1108
+ throw new Error("Sidecar: please provide `sideCar` property to import the right car");
1109
+ var r = t.read();
1110
+ if (!r)
1111
+ throw new Error("Sidecar medium not found");
1112
+ return c.createElement(r, oe({}, n));
1113
+ };
1114
+ Yn.isSideCarExport = !0;
1115
+ function ci(e, t) {
1116
+ return e.useMedium(t), Yn;
1117
+ }
1118
+ var Gn = ai(), At = function() {
1119
+ }, pt = c.forwardRef(function(e, t) {
1120
+ var n = c.useRef(null), r = c.useState({
1121
+ onScrollCapture: At,
1122
+ onWheelCapture: At,
1123
+ onTouchMoveCapture: At
1124
+ }), o = r[0], i = r[1], s = e.forwardProps, a = e.children, l = e.className, u = e.removeScrollBar, f = e.enabled, d = e.shards, p = e.sideCar, h = e.noRelative, v = e.noIsolation, m = e.inert, y = e.allowPinchZoom, w = e.as, b = w === void 0 ? "div" : w, C = e.gapMode, R = zn(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), E = p, O = oi([n, t]), P = oe(oe({}, R), o);
1125
+ return c.createElement(
1126
+ c.Fragment,
1127
+ null,
1128
+ f && c.createElement(E, { sideCar: Gn, removeScrollBar: u, shards: d, noRelative: h, noIsolation: v, inert: m, setCallbacks: i, allowPinchZoom: !!y, lockRef: n, gapMode: C }),
1129
+ s ? c.cloneElement(c.Children.only(a), oe(oe({}, P), { ref: O })) : c.createElement(b, oe({}, P, { className: l, ref: O }), a)
1130
+ );
1131
+ });
1132
+ pt.defaultProps = {
1133
+ enabled: !0,
1134
+ removeScrollBar: !0,
1135
+ inert: !1
1136
+ };
1137
+ pt.classNames = {
1138
+ fullWidth: tt,
1139
+ zeroRight: et
1140
+ };
1141
+ var li = function() {
1142
+ if (typeof __webpack_nonce__ < "u")
1143
+ return __webpack_nonce__;
1144
+ };
1145
+ function ui() {
1146
+ if (!document)
1147
+ return null;
1148
+ var e = document.createElement("style");
1149
+ e.type = "text/css";
1150
+ var t = li();
1151
+ return t && e.setAttribute("nonce", t), e;
1152
+ }
1153
+ function fi(e, t) {
1154
+ e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
1155
+ }
1156
+ function di(e) {
1157
+ var t = document.head || document.getElementsByTagName("head")[0];
1158
+ t.appendChild(e);
1159
+ }
1160
+ var pi = function() {
1161
+ var e = 0, t = null;
1162
+ return {
1163
+ add: function(n) {
1164
+ e == 0 && (t = ui()) && (fi(t, n), di(t)), e++;
1165
+ },
1166
+ remove: function() {
1167
+ e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
1168
+ }
1169
+ };
1170
+ }, hi = function() {
1171
+ var e = pi();
1172
+ return function(t, n) {
1173
+ c.useEffect(function() {
1174
+ return e.add(t), function() {
1175
+ e.remove();
1176
+ };
1177
+ }, [t && n]);
1178
+ };
1179
+ }, Xn = function() {
1180
+ var e = hi(), t = function(n) {
1181
+ var r = n.styles, o = n.dynamic;
1182
+ return e(r, o), null;
1183
+ };
1184
+ return t;
1185
+ }, mi = {
1186
+ left: 0,
1187
+ top: 0,
1188
+ right: 0,
1189
+ gap: 0
1190
+ }, Tt = function(e) {
1191
+ return parseInt(e || "", 10) || 0;
1192
+ }, vi = function(e) {
1193
+ var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], r = t[e === "padding" ? "paddingTop" : "marginTop"], o = t[e === "padding" ? "paddingRight" : "marginRight"];
1194
+ return [Tt(n), Tt(r), Tt(o)];
1195
+ }, gi = function(e) {
1196
+ if (e === void 0 && (e = "margin"), typeof window > "u")
1197
+ return mi;
1198
+ var t = vi(e), n = document.documentElement.clientWidth, r = window.innerWidth;
1199
+ return {
1200
+ left: t[0],
1201
+ top: t[1],
1202
+ right: t[2],
1203
+ gap: Math.max(0, r - n + t[2] - t[0])
1204
+ };
1205
+ }, yi = Xn(), Se = "data-scroll-locked", xi = function(e, t, n, r) {
1206
+ var o = e.left, i = e.top, s = e.right, a = e.gap;
1207
+ return n === void 0 && (n = "margin"), `
1208
+ .`.concat(ei, ` {
1209
+ overflow: hidden `).concat(r, `;
1210
+ padding-right: `).concat(a, "px ").concat(r, `;
1211
+ }
1212
+ body[`).concat(Se, `] {
1213
+ overflow: hidden `).concat(r, `;
1214
+ overscroll-behavior: contain;
1215
+ `).concat([
1216
+ t && "position: relative ".concat(r, ";"),
1217
+ n === "margin" && `
1218
+ padding-left: `.concat(o, `px;
1219
+ padding-top: `).concat(i, `px;
1220
+ padding-right: `).concat(s, `px;
1221
+ margin-left:0;
1222
+ margin-top:0;
1223
+ margin-right: `).concat(a, "px ").concat(r, `;
1224
+ `),
1225
+ n === "padding" && "padding-right: ".concat(a, "px ").concat(r, ";")
1226
+ ].filter(Boolean).join(""), `
1227
+ }
1228
+
1229
+ .`).concat(et, ` {
1230
+ right: `).concat(a, "px ").concat(r, `;
1231
+ }
1232
+
1233
+ .`).concat(tt, ` {
1234
+ margin-right: `).concat(a, "px ").concat(r, `;
1235
+ }
1236
+
1237
+ .`).concat(et, " .").concat(et, ` {
1238
+ right: 0 `).concat(r, `;
1239
+ }
1240
+
1241
+ .`).concat(tt, " .").concat(tt, ` {
1242
+ margin-right: 0 `).concat(r, `;
1243
+ }
1244
+
1245
+ body[`).concat(Se, `] {
1246
+ `).concat(ti, ": ").concat(a, `px;
1247
+ }
1248
+ `);
1249
+ }, Cn = function() {
1250
+ var e = parseInt(document.body.getAttribute(Se) || "0", 10);
1251
+ return isFinite(e) ? e : 0;
1252
+ }, wi = function() {
1253
+ c.useEffect(function() {
1254
+ return document.body.setAttribute(Se, (Cn() + 1).toString()), function() {
1255
+ var e = Cn() - 1;
1256
+ e <= 0 ? document.body.removeAttribute(Se) : document.body.setAttribute(Se, e.toString());
1257
+ };
1258
+ }, []);
1259
+ }, bi = function(e) {
1260
+ var t = e.noRelative, n = e.noImportant, r = e.gapMode, o = r === void 0 ? "margin" : r;
1261
+ wi();
1262
+ var i = c.useMemo(function() {
1263
+ return gi(o);
1264
+ }, [o]);
1265
+ return c.createElement(yi, { styles: xi(i, !t, o, n ? "" : "!important") });
1266
+ }, It = !1;
1267
+ if (typeof window < "u")
1268
+ try {
1269
+ var Ke = Object.defineProperty({}, "passive", {
1270
+ get: function() {
1271
+ return It = !0, !0;
1272
+ }
1273
+ });
1274
+ window.addEventListener("test", Ke, Ke), window.removeEventListener("test", Ke, Ke);
1275
+ } catch {
1276
+ It = !1;
1277
+ }
1278
+ var Ee = It ? { passive: !1 } : !1, Ci = function(e) {
1279
+ return e.tagName === "TEXTAREA";
1280
+ }, Kn = function(e, t) {
1281
+ if (!(e instanceof Element))
1282
+ return !1;
1283
+ var n = window.getComputedStyle(e);
1284
+ return (
1285
+ // not-not-scrollable
1286
+ n[t] !== "hidden" && // contains scroll inside self
1287
+ !(n.overflowY === n.overflowX && !Ci(e) && n[t] === "visible")
1288
+ );
1289
+ }, Ri = function(e) {
1290
+ return Kn(e, "overflowY");
1291
+ }, Ei = function(e) {
1292
+ return Kn(e, "overflowX");
1293
+ }, Rn = function(e, t) {
1294
+ var n = t.ownerDocument, r = t;
1295
+ do {
1296
+ typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host);
1297
+ var o = qn(e, r);
1298
+ if (o) {
1299
+ var i = Zn(e, r), s = i[1], a = i[2];
1300
+ if (s > a)
1301
+ return !0;
1302
+ }
1303
+ r = r.parentNode;
1304
+ } while (r && r !== n.body);
1305
+ return !1;
1306
+ }, Pi = function(e) {
1307
+ var t = e.scrollTop, n = e.scrollHeight, r = e.clientHeight;
1308
+ return [
1309
+ t,
1310
+ n,
1311
+ r
1312
+ ];
1313
+ }, Oi = function(e) {
1314
+ var t = e.scrollLeft, n = e.scrollWidth, r = e.clientWidth;
1315
+ return [
1316
+ t,
1317
+ n,
1318
+ r
1319
+ ];
1320
+ }, qn = function(e, t) {
1321
+ return e === "v" ? Ri(t) : Ei(t);
1322
+ }, Zn = function(e, t) {
1323
+ return e === "v" ? Pi(t) : Oi(t);
1324
+ }, Si = function(e, t) {
1325
+ return e === "h" && t === "rtl" ? -1 : 1;
1326
+ }, Ai = function(e, t, n, r, o) {
1327
+ var i = Si(e, window.getComputedStyle(t).direction), s = i * r, a = n.target, l = t.contains(a), u = !1, f = s > 0, d = 0, p = 0;
1328
+ do {
1329
+ if (!a)
1330
+ break;
1331
+ var h = Zn(e, a), v = h[0], m = h[1], y = h[2], w = m - y - i * v;
1332
+ (v || w) && qn(e, a) && (d += w, p += v);
1333
+ var b = a.parentNode;
1334
+ a = b && b.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? b.host : b;
1335
+ } while (
1336
+ // portaled content
1337
+ !l && a !== document.body || // self content
1338
+ l && (t.contains(a) || t === a)
1339
+ );
1340
+ return (f && Math.abs(d) < 1 || !f && Math.abs(p) < 1) && (u = !0), u;
1341
+ }, qe = function(e) {
1342
+ return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
1343
+ }, En = function(e) {
1344
+ return [e.deltaX, e.deltaY];
1345
+ }, Pn = function(e) {
1346
+ return e && "current" in e ? e.current : e;
1347
+ }, Ti = function(e, t) {
1348
+ return e[0] === t[0] && e[1] === t[1];
1349
+ }, Ni = function(e) {
1350
+ return `
1351
+ .block-interactivity-`.concat(e, ` {pointer-events: none;}
1352
+ .allow-interactivity-`).concat(e, ` {pointer-events: all;}
1353
+ `);
1354
+ }, Di = 0, Pe = [];
1355
+ function _i(e) {
1356
+ var t = c.useRef([]), n = c.useRef([0, 0]), r = c.useRef(), o = c.useState(Di++)[0], i = c.useState(Xn)[0], s = c.useRef(e);
1357
+ c.useEffect(function() {
1358
+ s.current = e;
1359
+ }, [e]), c.useEffect(function() {
1360
+ if (e.inert) {
1361
+ document.body.classList.add("block-interactivity-".concat(o));
1362
+ var m = Qo([e.lockRef.current], (e.shards || []).map(Pn), !0).filter(Boolean);
1363
+ return m.forEach(function(y) {
1364
+ return y.classList.add("allow-interactivity-".concat(o));
1365
+ }), function() {
1366
+ document.body.classList.remove("block-interactivity-".concat(o)), m.forEach(function(y) {
1367
+ return y.classList.remove("allow-interactivity-".concat(o));
1368
+ });
1369
+ };
1370
+ }
1371
+ }, [e.inert, e.lockRef.current, e.shards]);
1372
+ var a = c.useCallback(function(m, y) {
1373
+ if ("touches" in m && m.touches.length === 2 || m.type === "wheel" && m.ctrlKey)
1374
+ return !s.current.allowPinchZoom;
1375
+ var w = qe(m), b = n.current, C = "deltaX" in m ? m.deltaX : b[0] - w[0], R = "deltaY" in m ? m.deltaY : b[1] - w[1], E, O = m.target, P = Math.abs(C) > Math.abs(R) ? "h" : "v";
1376
+ if ("touches" in m && P === "h" && O.type === "range")
1377
+ return !1;
1378
+ var A = Rn(P, O);
1379
+ if (!A)
1380
+ return !0;
1381
+ if (A ? E = P : (E = P === "v" ? "h" : "v", A = Rn(P, O)), !A)
1382
+ return !1;
1383
+ if (!r.current && "changedTouches" in m && (C || R) && (r.current = E), !E)
1384
+ return !0;
1385
+ var _ = r.current || E;
1386
+ return Ai(_, y, m, _ === "h" ? C : R);
1387
+ }, []), l = c.useCallback(function(m) {
1388
+ var y = m;
1389
+ if (!(!Pe.length || Pe[Pe.length - 1] !== i)) {
1390
+ var w = "deltaY" in y ? En(y) : qe(y), b = t.current.filter(function(E) {
1391
+ return E.name === y.type && (E.target === y.target || y.target === E.shadowParent) && Ti(E.delta, w);
1392
+ })[0];
1393
+ if (b && b.should) {
1394
+ y.cancelable && y.preventDefault();
1395
+ return;
1396
+ }
1397
+ if (!b) {
1398
+ var C = (s.current.shards || []).map(Pn).filter(Boolean).filter(function(E) {
1399
+ return E.contains(y.target);
1400
+ }), R = C.length > 0 ? a(y, C[0]) : !s.current.noIsolation;
1401
+ R && y.cancelable && y.preventDefault();
1402
+ }
1403
+ }
1404
+ }, []), u = c.useCallback(function(m, y, w, b) {
1405
+ var C = { name: m, delta: y, target: w, should: b, shadowParent: ki(w) };
1406
+ t.current.push(C), setTimeout(function() {
1407
+ t.current = t.current.filter(function(R) {
1408
+ return R !== C;
1409
+ });
1410
+ }, 1);
1411
+ }, []), f = c.useCallback(function(m) {
1412
+ n.current = qe(m), r.current = void 0;
1413
+ }, []), d = c.useCallback(function(m) {
1414
+ u(m.type, En(m), m.target, a(m, e.lockRef.current));
1415
+ }, []), p = c.useCallback(function(m) {
1416
+ u(m.type, qe(m), m.target, a(m, e.lockRef.current));
1417
+ }, []);
1418
+ c.useEffect(function() {
1419
+ return Pe.push(i), e.setCallbacks({
1420
+ onScrollCapture: d,
1421
+ onWheelCapture: d,
1422
+ onTouchMoveCapture: p
1423
+ }), document.addEventListener("wheel", l, Ee), document.addEventListener("touchmove", l, Ee), document.addEventListener("touchstart", f, Ee), function() {
1424
+ Pe = Pe.filter(function(m) {
1425
+ return m !== i;
1426
+ }), document.removeEventListener("wheel", l, Ee), document.removeEventListener("touchmove", l, Ee), document.removeEventListener("touchstart", f, Ee);
336
1427
  };
1428
+ }, []);
1429
+ var h = e.removeScrollBar, v = e.inert;
1430
+ return c.createElement(
1431
+ c.Fragment,
1432
+ null,
1433
+ v ? c.createElement(i, { styles: Ni(o) }) : null,
1434
+ h ? c.createElement(bi, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
1435
+ );
337
1436
  }
338
- function H(r, i) {
339
- if (r)
340
- return (o) => i(r, o);
1437
+ function ki(e) {
1438
+ for (var t = null; e !== null; )
1439
+ e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
1440
+ return t;
341
1441
  }
342
- function Ee() {
343
- const r = w(function({ node: o, context: t, className: a }) {
344
- const u = P(o.props), l = t.renderChildren(o.children ?? []);
345
- return /* @__PURE__ */ k.jsx(le, { className: a, ...u, children: l });
1442
+ const Ii = ci(Gn, _i);
1443
+ var Gt = c.forwardRef(function(e, t) {
1444
+ return c.createElement(pt, oe({}, e, { ref: t, sideCar: Ii }));
1445
+ });
1446
+ Gt.classNames = pt.classNames;
1447
+ var Mi = function(e) {
1448
+ if (typeof document > "u")
1449
+ return null;
1450
+ var t = Array.isArray(e) ? e[0] : e;
1451
+ return t.ownerDocument.body;
1452
+ }, Oe = /* @__PURE__ */ new WeakMap(), Ze = /* @__PURE__ */ new WeakMap(), Je = {}, Nt = 0, Jn = function(e) {
1453
+ return e && (e.host || Jn(e.parentNode));
1454
+ }, ji = function(e, t) {
1455
+ return t.map(function(n) {
1456
+ if (e.contains(n))
1457
+ return n;
1458
+ var r = Jn(n);
1459
+ return r && e.contains(r) ? r : (console.error("aria-hidden", n, "in not contained inside", e, ". Doing nothing"), null);
1460
+ }).filter(function(n) {
1461
+ return !!n;
346
1462
  });
347
- return (i) => {
348
- if (i.type === "radix-box")
349
- return r;
350
- };
351
- }
352
- function Te() {
353
- const r = /* @__PURE__ */ new Set(["label", "disabled", "onInvokeId"]), i = w(function({ node: t, context: a, className: u }) {
354
- const l = x(t.props?.label), d = F(t.props?.disabled), m = { ...P(t.props, r) };
355
- d === !0 && (m.disabled = !0);
356
- const b = G(j(t.props?.onInvokeId), a.dispatchAction);
357
- b && (m.onClick = b);
358
- const E = [];
359
- l !== void 0 && E.push(l);
360
- const s = a.renderChildren(t.children ?? []);
361
- return s != null && E.push(s), /* @__PURE__ */ k.jsx(de, { className: N("radix-button", u), ...m, children: E });
1463
+ }, Li = function(e, t, n, r) {
1464
+ var o = ji(t, Array.isArray(e) ? e : [e]);
1465
+ Je[n] || (Je[n] = /* @__PURE__ */ new WeakMap());
1466
+ var i = Je[n], s = [], a = /* @__PURE__ */ new Set(), l = new Set(o), u = function(d) {
1467
+ !d || a.has(d) || (a.add(d), u(d.parentNode));
1468
+ };
1469
+ o.forEach(u);
1470
+ var f = function(d) {
1471
+ !d || l.has(d) || Array.prototype.forEach.call(d.children, function(p) {
1472
+ if (a.has(p))
1473
+ f(p);
1474
+ else
1475
+ try {
1476
+ var h = p.getAttribute(r), v = h !== null && h !== "false", m = (Oe.get(p) || 0) + 1, y = (i.get(p) || 0) + 1;
1477
+ Oe.set(p, m), i.set(p, y), s.push(p), m === 1 && v && Ze.set(p, !0), y === 1 && p.setAttribute(n, "true"), v || p.setAttribute(r, "true");
1478
+ } catch (w) {
1479
+ console.error("aria-hidden: cannot operate on ", p, w);
1480
+ }
1481
+ });
1482
+ };
1483
+ return f(t), a.clear(), Nt++, function() {
1484
+ s.forEach(function(d) {
1485
+ var p = Oe.get(d) - 1, h = i.get(d) - 1;
1486
+ Oe.set(d, p), i.set(d, h), p || (Ze.has(d) || d.removeAttribute(r), Ze.delete(d)), h || d.removeAttribute(n);
1487
+ }), Nt--, Nt || (Oe = /* @__PURE__ */ new WeakMap(), Oe = /* @__PURE__ */ new WeakMap(), Ze = /* @__PURE__ */ new WeakMap(), Je = {});
1488
+ };
1489
+ }, Qn = function(e, t, n) {
1490
+ n === void 0 && (n = "data-aria-hidden");
1491
+ var r = Array.from(Array.isArray(e) ? e : [e]), o = Mi(e);
1492
+ return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live], script"))), Li(r, o, n, "aria-hidden")) : function() {
1493
+ return null;
1494
+ };
1495
+ }, ht = "Dialog", [er] = ut(ht), [Fi, ne] = er(ht), tr = (e) => {
1496
+ const {
1497
+ __scopeDialog: t,
1498
+ children: n,
1499
+ open: r,
1500
+ defaultOpen: o,
1501
+ onOpenChange: i,
1502
+ modal: s = !0
1503
+ } = e, a = c.useRef(null), l = c.useRef(null), [u, f] = Ut({
1504
+ prop: r,
1505
+ defaultProp: o ?? !1,
1506
+ onChange: i,
1507
+ caller: ht
362
1508
  });
363
- return (o) => {
364
- if (o.type === "radix-button")
365
- return i;
1509
+ return /* @__PURE__ */ g.jsx(
1510
+ Fi,
1511
+ {
1512
+ scope: t,
1513
+ triggerRef: a,
1514
+ contentRef: l,
1515
+ contentId: $e(),
1516
+ titleId: $e(),
1517
+ descriptionId: $e(),
1518
+ open: u,
1519
+ onOpenChange: f,
1520
+ onOpenToggle: c.useCallback(() => f((d) => !d), [f]),
1521
+ modal: s,
1522
+ children: n
1523
+ }
1524
+ );
1525
+ };
1526
+ tr.displayName = ht;
1527
+ var nr = "DialogTrigger", rr = c.forwardRef(
1528
+ (e, t) => {
1529
+ const { __scopeDialog: n, ...r } = e, o = ne(nr, n), i = K(t, o.triggerRef);
1530
+ return /* @__PURE__ */ g.jsx(
1531
+ Y.button,
1532
+ {
1533
+ type: "button",
1534
+ "aria-haspopup": "dialog",
1535
+ "aria-expanded": o.open,
1536
+ "aria-controls": o.contentId,
1537
+ "data-state": qt(o.open),
1538
+ ...r,
1539
+ ref: i,
1540
+ onClick: H(e.onClick, o.onOpenToggle)
1541
+ }
1542
+ );
1543
+ }
1544
+ );
1545
+ rr.displayName = nr;
1546
+ var Xt = "DialogPortal", [$i, or] = er(Xt, {
1547
+ forceMount: void 0
1548
+ }), ir = (e) => {
1549
+ const { __scopeDialog: t, forceMount: n, children: r, container: o } = e, i = ne(Xt, t);
1550
+ return /* @__PURE__ */ g.jsx($i, { scope: t, forceMount: n, children: c.Children.map(r, (s) => /* @__PURE__ */ g.jsx(xe, { present: n || i.open, children: /* @__PURE__ */ g.jsx(dt, { asChild: !0, container: o, children: s }) })) });
1551
+ };
1552
+ ir.displayName = Xt;
1553
+ var ot = "DialogOverlay", sr = c.forwardRef(
1554
+ (e, t) => {
1555
+ const n = or(ot, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, i = ne(ot, e.__scopeDialog);
1556
+ return i.modal ? /* @__PURE__ */ g.jsx(xe, { present: r || i.open, children: /* @__PURE__ */ g.jsx(Bi, { ...o, ref: t }) }) : null;
1557
+ }
1558
+ );
1559
+ sr.displayName = ot;
1560
+ var Wi = /* @__PURE__ */ zt("DialogOverlay.RemoveScroll"), Bi = c.forwardRef(
1561
+ (e, t) => {
1562
+ const { __scopeDialog: n, ...r } = e, o = ne(ot, n);
1563
+ return (
1564
+ // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
1565
+ // ie. when `Overlay` and `Content` are siblings
1566
+ /* @__PURE__ */ g.jsx(Gt, { as: Wi, allowPinchZoom: !0, shards: [o.contentRef], children: /* @__PURE__ */ g.jsx(
1567
+ Y.div,
1568
+ {
1569
+ "data-state": qt(o.open),
1570
+ ...r,
1571
+ ref: t,
1572
+ style: { pointerEvents: "auto", ...r.style }
1573
+ }
1574
+ ) })
1575
+ );
1576
+ }
1577
+ ), Ce = "DialogContent", ar = c.forwardRef(
1578
+ (e, t) => {
1579
+ const n = or(Ce, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, i = ne(Ce, e.__scopeDialog);
1580
+ return /* @__PURE__ */ g.jsx(xe, { present: r || i.open, children: i.modal ? /* @__PURE__ */ g.jsx(Hi, { ...o, ref: t }) : /* @__PURE__ */ g.jsx(Vi, { ...o, ref: t }) });
1581
+ }
1582
+ );
1583
+ ar.displayName = Ce;
1584
+ var Hi = c.forwardRef(
1585
+ (e, t) => {
1586
+ const n = ne(Ce, e.__scopeDialog), r = c.useRef(null), o = K(t, n.contentRef, r);
1587
+ return c.useEffect(() => {
1588
+ const i = r.current;
1589
+ if (i) return Qn(i);
1590
+ }, []), /* @__PURE__ */ g.jsx(
1591
+ cr,
1592
+ {
1593
+ ...e,
1594
+ ref: o,
1595
+ trapFocus: n.open,
1596
+ disableOutsidePointerEvents: !0,
1597
+ onCloseAutoFocus: H(e.onCloseAutoFocus, (i) => {
1598
+ i.preventDefault(), n.triggerRef.current?.focus();
1599
+ }),
1600
+ onPointerDownOutside: H(e.onPointerDownOutside, (i) => {
1601
+ const s = i.detail.originalEvent, a = s.button === 0 && s.ctrlKey === !0;
1602
+ (s.button === 2 || a) && i.preventDefault();
1603
+ }),
1604
+ onFocusOutside: H(
1605
+ e.onFocusOutside,
1606
+ (i) => i.preventDefault()
1607
+ )
1608
+ }
1609
+ );
1610
+ }
1611
+ ), Vi = c.forwardRef(
1612
+ (e, t) => {
1613
+ const n = ne(Ce, e.__scopeDialog), r = c.useRef(!1), o = c.useRef(!1);
1614
+ return /* @__PURE__ */ g.jsx(
1615
+ cr,
1616
+ {
1617
+ ...e,
1618
+ ref: t,
1619
+ trapFocus: !1,
1620
+ disableOutsidePointerEvents: !1,
1621
+ onCloseAutoFocus: (i) => {
1622
+ e.onCloseAutoFocus?.(i), i.defaultPrevented || (r.current || n.triggerRef.current?.focus(), i.preventDefault()), r.current = !1, o.current = !1;
1623
+ },
1624
+ onInteractOutside: (i) => {
1625
+ e.onInteractOutside?.(i), i.defaultPrevented || (r.current = !0, i.detail.originalEvent.type === "pointerdown" && (o.current = !0));
1626
+ const s = i.target;
1627
+ n.triggerRef.current?.contains(s) && i.preventDefault(), i.detail.originalEvent.type === "focusin" && o.current && i.preventDefault();
1628
+ }
1629
+ }
1630
+ );
1631
+ }
1632
+ ), cr = c.forwardRef(
1633
+ (e, t) => {
1634
+ const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: i, ...s } = e, a = ne(Ce, n), l = c.useRef(null), u = K(t, l);
1635
+ return Un(), /* @__PURE__ */ g.jsxs(g.Fragment, { children: [
1636
+ /* @__PURE__ */ g.jsx(
1637
+ Yt,
1638
+ {
1639
+ asChild: !0,
1640
+ loop: !0,
1641
+ trapped: r,
1642
+ onMountAutoFocus: o,
1643
+ onUnmountAutoFocus: i,
1644
+ children: /* @__PURE__ */ g.jsx(
1645
+ ft,
1646
+ {
1647
+ role: "dialog",
1648
+ id: a.contentId,
1649
+ "aria-describedby": a.descriptionId,
1650
+ "aria-labelledby": a.titleId,
1651
+ "data-state": qt(a.open),
1652
+ ...s,
1653
+ ref: u,
1654
+ onDismiss: () => a.onOpenChange(!1)
1655
+ }
1656
+ )
1657
+ }
1658
+ ),
1659
+ /* @__PURE__ */ g.jsxs(g.Fragment, { children: [
1660
+ /* @__PURE__ */ g.jsx(Gi, { titleId: a.titleId }),
1661
+ /* @__PURE__ */ g.jsx(Ki, { contentRef: l, descriptionId: a.descriptionId })
1662
+ ] })
1663
+ ] });
1664
+ }
1665
+ ), Kt = "DialogTitle", Ui = c.forwardRef(
1666
+ (e, t) => {
1667
+ const { __scopeDialog: n, ...r } = e, o = ne(Kt, n);
1668
+ return /* @__PURE__ */ g.jsx(Y.h2, { id: o.titleId, ...r, ref: t });
1669
+ }
1670
+ );
1671
+ Ui.displayName = Kt;
1672
+ var lr = "DialogDescription", zi = c.forwardRef(
1673
+ (e, t) => {
1674
+ const { __scopeDialog: n, ...r } = e, o = ne(lr, n);
1675
+ return /* @__PURE__ */ g.jsx(Y.p, { id: o.descriptionId, ...r, ref: t });
1676
+ }
1677
+ );
1678
+ zi.displayName = lr;
1679
+ var ur = "DialogClose", Yi = c.forwardRef(
1680
+ (e, t) => {
1681
+ const { __scopeDialog: n, ...r } = e, o = ne(ur, n);
1682
+ return /* @__PURE__ */ g.jsx(
1683
+ Y.button,
1684
+ {
1685
+ type: "button",
1686
+ ...r,
1687
+ ref: t,
1688
+ onClick: H(e.onClick, () => o.onOpenChange(!1))
1689
+ }
1690
+ );
1691
+ }
1692
+ );
1693
+ Yi.displayName = ur;
1694
+ function qt(e) {
1695
+ return e ? "open" : "closed";
1696
+ }
1697
+ var fr = "DialogTitleWarning", [Ac, dr] = wo(fr, {
1698
+ contentName: Ce,
1699
+ titleName: Kt,
1700
+ docsSlug: "dialog"
1701
+ }), Gi = ({ titleId: e }) => {
1702
+ const t = dr(fr), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
1703
+
1704
+ If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
1705
+
1706
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;
1707
+ return c.useEffect(() => {
1708
+ e && (document.getElementById(e) || console.error(n));
1709
+ }, [n, e]), null;
1710
+ }, Xi = "DialogDescriptionWarning", Ki = ({ contentRef: e, descriptionId: t }) => {
1711
+ const r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${dr(Xi).contentName}}.`;
1712
+ return c.useEffect(() => {
1713
+ const o = e.current?.getAttribute("aria-describedby");
1714
+ t && o && (document.getElementById(t) || console.warn(r));
1715
+ }, [r, e, t]), null;
1716
+ }, qi = tr, Zi = rr, Ji = ir, Qi = sr, es = ar;
1717
+ function ts() {
1718
+ const e = J(function({ node: n, context: r, className: o }) {
1719
+ const i = Z(n.props?.open), s = Z(n.props?.defaultOpen), a = Z(n.props?.modal), [l, u] = lt(s ?? !1), f = i !== void 0, d = f ? !!i : l;
1720
+ Wt(() => {
1721
+ !f && s !== void 0 && u(s);
1722
+ }, [s, f]);
1723
+ const p = Ht(me(n.props?.onOpenChangeId), r.dispatchAction), h = (A) => {
1724
+ f || u(A), p?.(A);
1725
+ }, { defaultChildren: v, slotChildren: m } = Vt(n), y = m.get("trigger") ?? [], w = m.get("content") ?? [], b = y.length > 0 ? r.renderChildren(y) : void 0, C = [];
1726
+ w.length > 0 && C.push(/* @__PURE__ */ g.jsx(ue, { children: r.renderChildren(w) }, "content")), v.length > 0 && C.push(/* @__PURE__ */ g.jsx(ue, { children: r.renderChildren(v) }, "default"));
1727
+ const R = z("radix-dialog", o, N(n.props?.className)), E = z("radix-dialog__overlay", rt(n.props?.overlayStyleIds)), O = z("radix-dialog__content", rt(n.props?.contentStyleIds)), P = Q(
1728
+ n.props,
1729
+ /* @__PURE__ */ new Set(["open", "defaultOpen", "modal", "onOpenChangeId", "overlayStyleIds", "contentStyleIds", "className"])
1730
+ );
1731
+ return /* @__PURE__ */ g.jsx(
1732
+ "div",
1733
+ {
1734
+ ...P,
1735
+ "data-ikon-element-id": n.id,
1736
+ className: R,
1737
+ "data-state": d ? "open" : "closed",
1738
+ children: /* @__PURE__ */ g.jsxs(qi, { open: f ? i : void 0, defaultOpen: s, modal: a !== !1, onOpenChange: h, children: [
1739
+ b ? /* @__PURE__ */ g.jsx(Zi, { asChild: !0, children: /* @__PURE__ */ g.jsx(ue, { children: b }) }) : null,
1740
+ /* @__PURE__ */ g.jsxs(Ji, { children: [
1741
+ /* @__PURE__ */ g.jsx(Qi, { className: E, "data-state": d ? "open" : "closed" }),
1742
+ /* @__PURE__ */ g.jsx(es, { className: O, "data-state": d ? "open" : "closed", children: C })
1743
+ ] })
1744
+ ] })
1745
+ }
1746
+ );
1747
+ });
1748
+ return (t) => {
1749
+ if (t.type === "radix-dialog")
1750
+ return e;
366
1751
  };
367
1752
  }
368
- function _e() {
369
- const r = /* @__PURE__ */ new Set(["content"]), i = w(function({ node: t, context: a, className: u }) {
370
- const l = x(t.props?.content), d = P(t.props, r), f = [];
371
- l !== void 0 && f.push(l);
372
- const m = a.renderChildren(t.children ?? []);
373
- return m != null && f.push(m), /* @__PURE__ */ k.jsx(fe, { className: N("radix-heading", u), ...d, children: f });
1753
+ function ns() {
1754
+ const e = /* @__PURE__ */ new Set(["content", "className"]), t = J(function({ node: r, context: o, className: i }) {
1755
+ const s = N(r.props?.content), a = Q(r.props, e), l = [];
1756
+ s !== void 0 && l.push(s);
1757
+ const u = o.renderChildren(r.children ?? []);
1758
+ u != null && l.push(u), a["data-ikon-element-id"] = r.id;
1759
+ const f = z("radix-heading", i, N(r.props?.className));
1760
+ return f && (a.className = f), /* @__PURE__ */ g.jsx(ao, { ...a, children: l });
374
1761
  });
375
- return (o) => {
376
- if (o.type === "radix-heading")
377
- return i;
1762
+ return (n) => {
1763
+ if (n.type === "radix-heading")
1764
+ return t;
378
1765
  };
379
1766
  }
380
- function ye() {
381
- const r = w(function({ node: o, context: t, className: a }) {
382
- const u = x(o.props?.content), l = P(o.props), d = [];
383
- u !== void 0 && d.push(u);
384
- const f = t.renderChildren(o.children ?? []);
385
- return f != null && d.push(f), /* @__PURE__ */ k.jsx(pe, { className: a, ...l, children: d });
1767
+ function rs() {
1768
+ const e = /* @__PURE__ */ new Set(["name", "className"]), t = J(function({ node: r, context: o, className: i }) {
1769
+ const s = N(r.props?.name), a = Q(r.props, e), { ["aria-hidden"]: l, ...u } = a, f = typeof l == "boolean" || l === "true" || l === "false" ? l : !0, d = z("radix-icon", i, N(r.props?.className)), p = o.renderChildren(r.children ?? []), h = p ?? s ?? null;
1770
+ return /* @__PURE__ */ g.jsx(
1771
+ "span",
1772
+ {
1773
+ ...u,
1774
+ "data-ikon-element-id": r.id,
1775
+ "data-icon-name": s,
1776
+ "aria-hidden": f,
1777
+ className: d,
1778
+ children: h
1779
+ }
1780
+ );
386
1781
  });
387
- return (i) => {
388
- if (i.type === "radix-text")
389
- return r;
390
- };
391
- }
392
- function ge() {
393
- const r = /* @__PURE__ */ new Set(["value", "defaultValue", "placeholder", "disabled", "rows", "onValueChangeId", "onInvokeId"]), i = w(function({ node: t, context: a, className: u }) {
394
- const l = x(t.props?.value), d = x(t.props?.defaultValue), f = x(t.props?.placeholder), m = F(t.props?.disabled), b = he(t.props?.rows), s = { ...P(t.props, r) };
395
- l !== void 0 ? s.value = l : d !== void 0 && (s.defaultValue = d), f && (s.placeholder = f), m !== void 0 && (s.disabled = m), b !== void 0 && (s.rows = b);
396
- const T = H(j(t.props?.onValueChangeId), a.dispatchAction), y = G(j(t.props?.onInvokeId), a.dispatchAction);
397
- return T && (s.onChange = (v) => {
398
- T(v?.target?.value ?? "");
399
- }), y && (s.onKeyDown = (v) => {
400
- v.key !== "Enter" || v.shiftKey || v.altKey || v.metaKey || v.nativeEvent?.isComposing || (v.preventDefault(), y());
401
- }), /* @__PURE__ */ k.jsx(Re, { className: N("radix-text-area", u), ...s });
1782
+ return (n) => {
1783
+ if (n.type === "radix-icon")
1784
+ return t;
1785
+ };
1786
+ }
1787
+ function os() {
1788
+ const e = /* @__PURE__ */ new Set(["label", "disabled", "onInvokeId", "className"]), t = J(function({ node: r, context: o, className: i }) {
1789
+ const s = N(r.props?.label), a = Z(r.props?.disabled), u = { ...Q(r.props, e) };
1790
+ a !== void 0 && (u.disabled = a), s && (u["aria-label"] = s);
1791
+ const f = Bt(me(r.props?.onInvokeId), o.dispatchAction);
1792
+ f && (u.onClick = f);
1793
+ const d = z("radix-icon-button", i, N(r.props?.className));
1794
+ d && (u.className = d);
1795
+ const p = { "data-ikon-element-id": r.id }, h = o.renderChildren(r.children ?? []), v = h ?? null;
1796
+ return /* @__PURE__ */ g.jsx(co, { ...u, ...p, children: v });
402
1797
  });
403
- return (o) => {
404
- if (o.type === "radix-text-area")
405
- return i;
406
- };
407
- }
408
- function we() {
409
- const r = /* @__PURE__ */ new Set(["value", "defaultValue", "placeholder", "disabled", "type", "onValueChangeId"]), i = w(function({ node: t, context: a, className: u }) {
410
- const l = x(t.props?.value), d = x(t.props?.defaultValue), f = x(t.props?.placeholder), m = F(t.props?.disabled), b = x(t.props?.type), s = { ...P(t.props, r) };
411
- l !== void 0 ? s.value = l : d !== void 0 && (s.defaultValue = d), f && (s.placeholder = f), m !== void 0 && (s.disabled = m), b && (s.type = b);
412
- const T = H(j(t.props?.onValueChangeId), a.dispatchAction);
413
- return T && (s.onChange = (y) => {
414
- T(y?.target?.value ?? "");
415
- }), /* @__PURE__ */ k.jsx(me.Root, { className: N("radix-text-field", u), ...s });
1798
+ return (n) => {
1799
+ if (n.type === "radix-icon-button")
1800
+ return t;
1801
+ };
1802
+ }
1803
+ const is = ["top", "right", "bottom", "left"], ge = Math.min, G = Math.max, it = Math.round, Qe = Math.floor, se = (e) => ({
1804
+ x: e,
1805
+ y: e
1806
+ }), ss = {
1807
+ left: "right",
1808
+ right: "left",
1809
+ bottom: "top",
1810
+ top: "bottom"
1811
+ }, as = {
1812
+ start: "end",
1813
+ end: "start"
1814
+ };
1815
+ function Mt(e, t, n) {
1816
+ return G(e, ge(t, n));
1817
+ }
1818
+ function fe(e, t) {
1819
+ return typeof e == "function" ? e(t) : e;
1820
+ }
1821
+ function de(e) {
1822
+ return e.split("-")[0];
1823
+ }
1824
+ function ke(e) {
1825
+ return e.split("-")[1];
1826
+ }
1827
+ function Zt(e) {
1828
+ return e === "x" ? "y" : "x";
1829
+ }
1830
+ function Jt(e) {
1831
+ return e === "y" ? "height" : "width";
1832
+ }
1833
+ const cs = /* @__PURE__ */ new Set(["top", "bottom"]);
1834
+ function ie(e) {
1835
+ return cs.has(de(e)) ? "y" : "x";
1836
+ }
1837
+ function Qt(e) {
1838
+ return Zt(ie(e));
1839
+ }
1840
+ function ls(e, t, n) {
1841
+ n === void 0 && (n = !1);
1842
+ const r = ke(e), o = Qt(e), i = Jt(o);
1843
+ let s = o === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
1844
+ return t.reference[i] > t.floating[i] && (s = st(s)), [s, st(s)];
1845
+ }
1846
+ function us(e) {
1847
+ const t = st(e);
1848
+ return [jt(e), t, jt(t)];
1849
+ }
1850
+ function jt(e) {
1851
+ return e.replace(/start|end/g, (t) => as[t]);
1852
+ }
1853
+ const On = ["left", "right"], Sn = ["right", "left"], fs = ["top", "bottom"], ds = ["bottom", "top"];
1854
+ function ps(e, t, n) {
1855
+ switch (e) {
1856
+ case "top":
1857
+ case "bottom":
1858
+ return n ? t ? Sn : On : t ? On : Sn;
1859
+ case "left":
1860
+ case "right":
1861
+ return t ? fs : ds;
1862
+ default:
1863
+ return [];
1864
+ }
1865
+ }
1866
+ function hs(e, t, n, r) {
1867
+ const o = ke(e);
1868
+ let i = ps(de(e), n === "start", r);
1869
+ return o && (i = i.map((s) => s + "-" + o), t && (i = i.concat(i.map(jt)))), i;
1870
+ }
1871
+ function st(e) {
1872
+ return e.replace(/left|right|bottom|top/g, (t) => ss[t]);
1873
+ }
1874
+ function ms(e) {
1875
+ return {
1876
+ top: 0,
1877
+ right: 0,
1878
+ bottom: 0,
1879
+ left: 0,
1880
+ ...e
1881
+ };
1882
+ }
1883
+ function pr(e) {
1884
+ return typeof e != "number" ? ms(e) : {
1885
+ top: e,
1886
+ right: e,
1887
+ bottom: e,
1888
+ left: e
1889
+ };
1890
+ }
1891
+ function at(e) {
1892
+ const {
1893
+ x: t,
1894
+ y: n,
1895
+ width: r,
1896
+ height: o
1897
+ } = e;
1898
+ return {
1899
+ width: r,
1900
+ height: o,
1901
+ top: n,
1902
+ left: t,
1903
+ right: t + r,
1904
+ bottom: n + o,
1905
+ x: t,
1906
+ y: n
1907
+ };
1908
+ }
1909
+ function An(e, t, n) {
1910
+ let {
1911
+ reference: r,
1912
+ floating: o
1913
+ } = e;
1914
+ const i = ie(t), s = Qt(t), a = Jt(s), l = de(t), u = i === "y", f = r.x + r.width / 2 - o.width / 2, d = r.y + r.height / 2 - o.height / 2, p = r[a] / 2 - o[a] / 2;
1915
+ let h;
1916
+ switch (l) {
1917
+ case "top":
1918
+ h = {
1919
+ x: f,
1920
+ y: r.y - o.height
1921
+ };
1922
+ break;
1923
+ case "bottom":
1924
+ h = {
1925
+ x: f,
1926
+ y: r.y + r.height
1927
+ };
1928
+ break;
1929
+ case "right":
1930
+ h = {
1931
+ x: r.x + r.width,
1932
+ y: d
1933
+ };
1934
+ break;
1935
+ case "left":
1936
+ h = {
1937
+ x: r.x - o.width,
1938
+ y: d
1939
+ };
1940
+ break;
1941
+ default:
1942
+ h = {
1943
+ x: r.x,
1944
+ y: r.y
1945
+ };
1946
+ }
1947
+ switch (ke(t)) {
1948
+ case "start":
1949
+ h[s] -= p * (n && u ? -1 : 1);
1950
+ break;
1951
+ case "end":
1952
+ h[s] += p * (n && u ? -1 : 1);
1953
+ break;
1954
+ }
1955
+ return h;
1956
+ }
1957
+ const vs = async (e, t, n) => {
1958
+ const {
1959
+ placement: r = "bottom",
1960
+ strategy: o = "absolute",
1961
+ middleware: i = [],
1962
+ platform: s
1963
+ } = n, a = i.filter(Boolean), l = await (s.isRTL == null ? void 0 : s.isRTL(t));
1964
+ let u = await s.getElementRects({
1965
+ reference: e,
1966
+ floating: t,
1967
+ strategy: o
1968
+ }), {
1969
+ x: f,
1970
+ y: d
1971
+ } = An(u, r, l), p = r, h = {}, v = 0;
1972
+ for (let m = 0; m < a.length; m++) {
1973
+ const {
1974
+ name: y,
1975
+ fn: w
1976
+ } = a[m], {
1977
+ x: b,
1978
+ y: C,
1979
+ data: R,
1980
+ reset: E
1981
+ } = await w({
1982
+ x: f,
1983
+ y: d,
1984
+ initialPlacement: r,
1985
+ placement: p,
1986
+ strategy: o,
1987
+ middlewareData: h,
1988
+ rects: u,
1989
+ platform: s,
1990
+ elements: {
1991
+ reference: e,
1992
+ floating: t
1993
+ }
1994
+ });
1995
+ f = b ?? f, d = C ?? d, h = {
1996
+ ...h,
1997
+ [y]: {
1998
+ ...h[y],
1999
+ ...R
2000
+ }
2001
+ }, E && v <= 50 && (v++, typeof E == "object" && (E.placement && (p = E.placement), E.rects && (u = E.rects === !0 ? await s.getElementRects({
2002
+ reference: e,
2003
+ floating: t,
2004
+ strategy: o
2005
+ }) : E.rects), {
2006
+ x: f,
2007
+ y: d
2008
+ } = An(u, p, l)), m = -1);
2009
+ }
2010
+ return {
2011
+ x: f,
2012
+ y: d,
2013
+ placement: p,
2014
+ strategy: o,
2015
+ middlewareData: h
2016
+ };
2017
+ };
2018
+ async function We(e, t) {
2019
+ var n;
2020
+ t === void 0 && (t = {});
2021
+ const {
2022
+ x: r,
2023
+ y: o,
2024
+ platform: i,
2025
+ rects: s,
2026
+ elements: a,
2027
+ strategy: l
2028
+ } = e, {
2029
+ boundary: u = "clippingAncestors",
2030
+ rootBoundary: f = "viewport",
2031
+ elementContext: d = "floating",
2032
+ altBoundary: p = !1,
2033
+ padding: h = 0
2034
+ } = fe(t, e), v = pr(h), y = a[p ? d === "floating" ? "reference" : "floating" : d], w = at(await i.getClippingRect({
2035
+ element: (n = await (i.isElement == null ? void 0 : i.isElement(y))) == null || n ? y : y.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(a.floating)),
2036
+ boundary: u,
2037
+ rootBoundary: f,
2038
+ strategy: l
2039
+ })), b = d === "floating" ? {
2040
+ x: r,
2041
+ y: o,
2042
+ width: s.floating.width,
2043
+ height: s.floating.height
2044
+ } : s.reference, C = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(a.floating)), R = await (i.isElement == null ? void 0 : i.isElement(C)) ? await (i.getScale == null ? void 0 : i.getScale(C)) || {
2045
+ x: 1,
2046
+ y: 1
2047
+ } : {
2048
+ x: 1,
2049
+ y: 1
2050
+ }, E = at(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
2051
+ elements: a,
2052
+ rect: b,
2053
+ offsetParent: C,
2054
+ strategy: l
2055
+ }) : b);
2056
+ return {
2057
+ top: (w.top - E.top + v.top) / R.y,
2058
+ bottom: (E.bottom - w.bottom + v.bottom) / R.y,
2059
+ left: (w.left - E.left + v.left) / R.x,
2060
+ right: (E.right - w.right + v.right) / R.x
2061
+ };
2062
+ }
2063
+ const gs = (e) => ({
2064
+ name: "arrow",
2065
+ options: e,
2066
+ async fn(t) {
2067
+ const {
2068
+ x: n,
2069
+ y: r,
2070
+ placement: o,
2071
+ rects: i,
2072
+ platform: s,
2073
+ elements: a,
2074
+ middlewareData: l
2075
+ } = t, {
2076
+ element: u,
2077
+ padding: f = 0
2078
+ } = fe(e, t) || {};
2079
+ if (u == null)
2080
+ return {};
2081
+ const d = pr(f), p = {
2082
+ x: n,
2083
+ y: r
2084
+ }, h = Qt(o), v = Jt(h), m = await s.getDimensions(u), y = h === "y", w = y ? "top" : "left", b = y ? "bottom" : "right", C = y ? "clientHeight" : "clientWidth", R = i.reference[v] + i.reference[h] - p[h] - i.floating[v], E = p[h] - i.reference[h], O = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(u));
2085
+ let P = O ? O[C] : 0;
2086
+ (!P || !await (s.isElement == null ? void 0 : s.isElement(O))) && (P = a.floating[C] || i.floating[v]);
2087
+ const A = R / 2 - E / 2, _ = P / 2 - m[v] / 2 - 1, D = ge(d[w], _), M = ge(d[b], _), F = D, $ = P - m[v] - M, k = P / 2 - m[v] / 2 + A, U = Mt(F, k, $), j = !l.arrow && ke(o) != null && k !== U && i.reference[v] / 2 - (k < F ? D : M) - m[v] / 2 < 0, L = j ? k < F ? k - F : k - $ : 0;
2088
+ return {
2089
+ [h]: p[h] + L,
2090
+ data: {
2091
+ [h]: U,
2092
+ centerOffset: k - U - L,
2093
+ ...j && {
2094
+ alignmentOffset: L
2095
+ }
2096
+ },
2097
+ reset: j
2098
+ };
2099
+ }
2100
+ }), ys = function(e) {
2101
+ return e === void 0 && (e = {}), {
2102
+ name: "flip",
2103
+ options: e,
2104
+ async fn(t) {
2105
+ var n, r;
2106
+ const {
2107
+ placement: o,
2108
+ middlewareData: i,
2109
+ rects: s,
2110
+ initialPlacement: a,
2111
+ platform: l,
2112
+ elements: u
2113
+ } = t, {
2114
+ mainAxis: f = !0,
2115
+ crossAxis: d = !0,
2116
+ fallbackPlacements: p,
2117
+ fallbackStrategy: h = "bestFit",
2118
+ fallbackAxisSideDirection: v = "none",
2119
+ flipAlignment: m = !0,
2120
+ ...y
2121
+ } = fe(e, t);
2122
+ if ((n = i.arrow) != null && n.alignmentOffset)
2123
+ return {};
2124
+ const w = de(o), b = ie(a), C = de(a) === a, R = await (l.isRTL == null ? void 0 : l.isRTL(u.floating)), E = p || (C || !m ? [st(a)] : us(a)), O = v !== "none";
2125
+ !p && O && E.push(...hs(a, m, v, R));
2126
+ const P = [a, ...E], A = await We(t, y), _ = [];
2127
+ let D = ((r = i.flip) == null ? void 0 : r.overflows) || [];
2128
+ if (f && _.push(A[w]), d) {
2129
+ const k = ls(o, s, R);
2130
+ _.push(A[k[0]], A[k[1]]);
2131
+ }
2132
+ if (D = [...D, {
2133
+ placement: o,
2134
+ overflows: _
2135
+ }], !_.every((k) => k <= 0)) {
2136
+ var M, F;
2137
+ const k = (((M = i.flip) == null ? void 0 : M.index) || 0) + 1, U = P[k];
2138
+ if (U && (!(d === "alignment" ? b !== ie(U) : !1) || // We leave the current main axis only if every placement on that axis
2139
+ // overflows the main axis.
2140
+ D.every((T) => ie(T.placement) === b ? T.overflows[0] > 0 : !0)))
2141
+ return {
2142
+ data: {
2143
+ index: k,
2144
+ overflows: D
2145
+ },
2146
+ reset: {
2147
+ placement: U
2148
+ }
2149
+ };
2150
+ let j = (F = D.filter((L) => L.overflows[0] <= 0).sort((L, T) => L.overflows[1] - T.overflows[1])[0]) == null ? void 0 : F.placement;
2151
+ if (!j)
2152
+ switch (h) {
2153
+ case "bestFit": {
2154
+ var $;
2155
+ const L = ($ = D.filter((T) => {
2156
+ if (O) {
2157
+ const W = ie(T.placement);
2158
+ return W === b || // Create a bias to the `y` side axis due to horizontal
2159
+ // reading directions favoring greater width.
2160
+ W === "y";
2161
+ }
2162
+ return !0;
2163
+ }).map((T) => [T.placement, T.overflows.filter((W) => W > 0).reduce((W, x) => W + x, 0)]).sort((T, W) => T[1] - W[1])[0]) == null ? void 0 : $[0];
2164
+ L && (j = L);
2165
+ break;
2166
+ }
2167
+ case "initialPlacement":
2168
+ j = a;
2169
+ break;
2170
+ }
2171
+ if (o !== j)
2172
+ return {
2173
+ reset: {
2174
+ placement: j
2175
+ }
2176
+ };
2177
+ }
2178
+ return {};
2179
+ }
2180
+ };
2181
+ };
2182
+ function Tn(e, t) {
2183
+ return {
2184
+ top: e.top - t.height,
2185
+ right: e.right - t.width,
2186
+ bottom: e.bottom - t.height,
2187
+ left: e.left - t.width
2188
+ };
2189
+ }
2190
+ function Nn(e) {
2191
+ return is.some((t) => e[t] >= 0);
2192
+ }
2193
+ const xs = function(e) {
2194
+ return e === void 0 && (e = {}), {
2195
+ name: "hide",
2196
+ options: e,
2197
+ async fn(t) {
2198
+ const {
2199
+ rects: n
2200
+ } = t, {
2201
+ strategy: r = "referenceHidden",
2202
+ ...o
2203
+ } = fe(e, t);
2204
+ switch (r) {
2205
+ case "referenceHidden": {
2206
+ const i = await We(t, {
2207
+ ...o,
2208
+ elementContext: "reference"
2209
+ }), s = Tn(i, n.reference);
2210
+ return {
2211
+ data: {
2212
+ referenceHiddenOffsets: s,
2213
+ referenceHidden: Nn(s)
2214
+ }
2215
+ };
2216
+ }
2217
+ case "escaped": {
2218
+ const i = await We(t, {
2219
+ ...o,
2220
+ altBoundary: !0
2221
+ }), s = Tn(i, n.floating);
2222
+ return {
2223
+ data: {
2224
+ escapedOffsets: s,
2225
+ escaped: Nn(s)
2226
+ }
2227
+ };
2228
+ }
2229
+ default:
2230
+ return {};
2231
+ }
2232
+ }
2233
+ };
2234
+ }, hr = /* @__PURE__ */ new Set(["left", "top"]);
2235
+ async function ws(e, t) {
2236
+ const {
2237
+ placement: n,
2238
+ platform: r,
2239
+ elements: o
2240
+ } = e, i = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), s = de(n), a = ke(n), l = ie(n) === "y", u = hr.has(s) ? -1 : 1, f = i && l ? -1 : 1, d = fe(t, e);
2241
+ let {
2242
+ mainAxis: p,
2243
+ crossAxis: h,
2244
+ alignmentAxis: v
2245
+ } = typeof d == "number" ? {
2246
+ mainAxis: d,
2247
+ crossAxis: 0,
2248
+ alignmentAxis: null
2249
+ } : {
2250
+ mainAxis: d.mainAxis || 0,
2251
+ crossAxis: d.crossAxis || 0,
2252
+ alignmentAxis: d.alignmentAxis
2253
+ };
2254
+ return a && typeof v == "number" && (h = a === "end" ? v * -1 : v), l ? {
2255
+ x: h * f,
2256
+ y: p * u
2257
+ } : {
2258
+ x: p * u,
2259
+ y: h * f
2260
+ };
2261
+ }
2262
+ const bs = function(e) {
2263
+ return e === void 0 && (e = 0), {
2264
+ name: "offset",
2265
+ options: e,
2266
+ async fn(t) {
2267
+ var n, r;
2268
+ const {
2269
+ x: o,
2270
+ y: i,
2271
+ placement: s,
2272
+ middlewareData: a
2273
+ } = t, l = await ws(t, e);
2274
+ return s === ((n = a.offset) == null ? void 0 : n.placement) && (r = a.arrow) != null && r.alignmentOffset ? {} : {
2275
+ x: o + l.x,
2276
+ y: i + l.y,
2277
+ data: {
2278
+ ...l,
2279
+ placement: s
2280
+ }
2281
+ };
2282
+ }
2283
+ };
2284
+ }, Cs = function(e) {
2285
+ return e === void 0 && (e = {}), {
2286
+ name: "shift",
2287
+ options: e,
2288
+ async fn(t) {
2289
+ const {
2290
+ x: n,
2291
+ y: r,
2292
+ placement: o
2293
+ } = t, {
2294
+ mainAxis: i = !0,
2295
+ crossAxis: s = !1,
2296
+ limiter: a = {
2297
+ fn: (y) => {
2298
+ let {
2299
+ x: w,
2300
+ y: b
2301
+ } = y;
2302
+ return {
2303
+ x: w,
2304
+ y: b
2305
+ };
2306
+ }
2307
+ },
2308
+ ...l
2309
+ } = fe(e, t), u = {
2310
+ x: n,
2311
+ y: r
2312
+ }, f = await We(t, l), d = ie(de(o)), p = Zt(d);
2313
+ let h = u[p], v = u[d];
2314
+ if (i) {
2315
+ const y = p === "y" ? "top" : "left", w = p === "y" ? "bottom" : "right", b = h + f[y], C = h - f[w];
2316
+ h = Mt(b, h, C);
2317
+ }
2318
+ if (s) {
2319
+ const y = d === "y" ? "top" : "left", w = d === "y" ? "bottom" : "right", b = v + f[y], C = v - f[w];
2320
+ v = Mt(b, v, C);
2321
+ }
2322
+ const m = a.fn({
2323
+ ...t,
2324
+ [p]: h,
2325
+ [d]: v
2326
+ });
2327
+ return {
2328
+ ...m,
2329
+ data: {
2330
+ x: m.x - n,
2331
+ y: m.y - r,
2332
+ enabled: {
2333
+ [p]: i,
2334
+ [d]: s
2335
+ }
2336
+ }
2337
+ };
2338
+ }
2339
+ };
2340
+ }, Rs = function(e) {
2341
+ return e === void 0 && (e = {}), {
2342
+ options: e,
2343
+ fn(t) {
2344
+ const {
2345
+ x: n,
2346
+ y: r,
2347
+ placement: o,
2348
+ rects: i,
2349
+ middlewareData: s
2350
+ } = t, {
2351
+ offset: a = 0,
2352
+ mainAxis: l = !0,
2353
+ crossAxis: u = !0
2354
+ } = fe(e, t), f = {
2355
+ x: n,
2356
+ y: r
2357
+ }, d = ie(o), p = Zt(d);
2358
+ let h = f[p], v = f[d];
2359
+ const m = fe(a, t), y = typeof m == "number" ? {
2360
+ mainAxis: m,
2361
+ crossAxis: 0
2362
+ } : {
2363
+ mainAxis: 0,
2364
+ crossAxis: 0,
2365
+ ...m
2366
+ };
2367
+ if (l) {
2368
+ const C = p === "y" ? "height" : "width", R = i.reference[p] - i.floating[C] + y.mainAxis, E = i.reference[p] + i.reference[C] - y.mainAxis;
2369
+ h < R ? h = R : h > E && (h = E);
2370
+ }
2371
+ if (u) {
2372
+ var w, b;
2373
+ const C = p === "y" ? "width" : "height", R = hr.has(de(o)), E = i.reference[d] - i.floating[C] + (R && ((w = s.offset) == null ? void 0 : w[d]) || 0) + (R ? 0 : y.crossAxis), O = i.reference[d] + i.reference[C] + (R ? 0 : ((b = s.offset) == null ? void 0 : b[d]) || 0) - (R ? y.crossAxis : 0);
2374
+ v < E ? v = E : v > O && (v = O);
2375
+ }
2376
+ return {
2377
+ [p]: h,
2378
+ [d]: v
2379
+ };
2380
+ }
2381
+ };
2382
+ }, Es = function(e) {
2383
+ return e === void 0 && (e = {}), {
2384
+ name: "size",
2385
+ options: e,
2386
+ async fn(t) {
2387
+ var n, r;
2388
+ const {
2389
+ placement: o,
2390
+ rects: i,
2391
+ platform: s,
2392
+ elements: a
2393
+ } = t, {
2394
+ apply: l = () => {
2395
+ },
2396
+ ...u
2397
+ } = fe(e, t), f = await We(t, u), d = de(o), p = ke(o), h = ie(o) === "y", {
2398
+ width: v,
2399
+ height: m
2400
+ } = i.floating;
2401
+ let y, w;
2402
+ d === "top" || d === "bottom" ? (y = d, w = p === (await (s.isRTL == null ? void 0 : s.isRTL(a.floating)) ? "start" : "end") ? "left" : "right") : (w = d, y = p === "end" ? "top" : "bottom");
2403
+ const b = m - f.top - f.bottom, C = v - f.left - f.right, R = ge(m - f[y], b), E = ge(v - f[w], C), O = !t.middlewareData.shift;
2404
+ let P = R, A = E;
2405
+ if ((n = t.middlewareData.shift) != null && n.enabled.x && (A = C), (r = t.middlewareData.shift) != null && r.enabled.y && (P = b), O && !p) {
2406
+ const D = G(f.left, 0), M = G(f.right, 0), F = G(f.top, 0), $ = G(f.bottom, 0);
2407
+ h ? A = v - 2 * (D !== 0 || M !== 0 ? D + M : G(f.left, f.right)) : P = m - 2 * (F !== 0 || $ !== 0 ? F + $ : G(f.top, f.bottom));
2408
+ }
2409
+ await l({
2410
+ ...t,
2411
+ availableWidth: A,
2412
+ availableHeight: P
2413
+ });
2414
+ const _ = await s.getDimensions(a.floating);
2415
+ return v !== _.width || m !== _.height ? {
2416
+ reset: {
2417
+ rects: !0
2418
+ }
2419
+ } : {};
2420
+ }
2421
+ };
2422
+ };
2423
+ function mt() {
2424
+ return typeof window < "u";
2425
+ }
2426
+ function Ie(e) {
2427
+ return mr(e) ? (e.nodeName || "").toLowerCase() : "#document";
2428
+ }
2429
+ function X(e) {
2430
+ var t;
2431
+ return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
2432
+ }
2433
+ function ce(e) {
2434
+ var t;
2435
+ return (t = (mr(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
2436
+ }
2437
+ function mr(e) {
2438
+ return mt() ? e instanceof Node || e instanceof X(e).Node : !1;
2439
+ }
2440
+ function ee(e) {
2441
+ return mt() ? e instanceof Element || e instanceof X(e).Element : !1;
2442
+ }
2443
+ function ae(e) {
2444
+ return mt() ? e instanceof HTMLElement || e instanceof X(e).HTMLElement : !1;
2445
+ }
2446
+ function Dn(e) {
2447
+ return !mt() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof X(e).ShadowRoot;
2448
+ }
2449
+ const Ps = /* @__PURE__ */ new Set(["inline", "contents"]);
2450
+ function Ve(e) {
2451
+ const {
2452
+ overflow: t,
2453
+ overflowX: n,
2454
+ overflowY: r,
2455
+ display: o
2456
+ } = te(e);
2457
+ return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !Ps.has(o);
2458
+ }
2459
+ const Os = /* @__PURE__ */ new Set(["table", "td", "th"]);
2460
+ function Ss(e) {
2461
+ return Os.has(Ie(e));
2462
+ }
2463
+ const As = [":popover-open", ":modal"];
2464
+ function vt(e) {
2465
+ return As.some((t) => {
2466
+ try {
2467
+ return e.matches(t);
2468
+ } catch {
2469
+ return !1;
2470
+ }
2471
+ });
2472
+ }
2473
+ const Ts = ["transform", "translate", "scale", "rotate", "perspective"], Ns = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Ds = ["paint", "layout", "strict", "content"];
2474
+ function en(e) {
2475
+ const t = tn(), n = ee(e) ? te(e) : e;
2476
+ return Ts.some((r) => n[r] ? n[r] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || Ns.some((r) => (n.willChange || "").includes(r)) || Ds.some((r) => (n.contain || "").includes(r));
2477
+ }
2478
+ function _s(e) {
2479
+ let t = ye(e);
2480
+ for (; ae(t) && !Ne(t); ) {
2481
+ if (en(t))
2482
+ return t;
2483
+ if (vt(t))
2484
+ return null;
2485
+ t = ye(t);
2486
+ }
2487
+ return null;
2488
+ }
2489
+ function tn() {
2490
+ return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
2491
+ }
2492
+ const ks = /* @__PURE__ */ new Set(["html", "body", "#document"]);
2493
+ function Ne(e) {
2494
+ return ks.has(Ie(e));
2495
+ }
2496
+ function te(e) {
2497
+ return X(e).getComputedStyle(e);
2498
+ }
2499
+ function gt(e) {
2500
+ return ee(e) ? {
2501
+ scrollLeft: e.scrollLeft,
2502
+ scrollTop: e.scrollTop
2503
+ } : {
2504
+ scrollLeft: e.scrollX,
2505
+ scrollTop: e.scrollY
2506
+ };
2507
+ }
2508
+ function ye(e) {
2509
+ if (Ie(e) === "html")
2510
+ return e;
2511
+ const t = (
2512
+ // Step into the shadow DOM of the parent of a slotted node.
2513
+ e.assignedSlot || // DOM Element detected.
2514
+ e.parentNode || // ShadowRoot detected.
2515
+ Dn(e) && e.host || // Fallback.
2516
+ ce(e)
2517
+ );
2518
+ return Dn(t) ? t.host : t;
2519
+ }
2520
+ function vr(e) {
2521
+ const t = ye(e);
2522
+ return Ne(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : ae(t) && Ve(t) ? t : vr(t);
2523
+ }
2524
+ function Be(e, t, n) {
2525
+ var r;
2526
+ t === void 0 && (t = []), n === void 0 && (n = !0);
2527
+ const o = vr(e), i = o === ((r = e.ownerDocument) == null ? void 0 : r.body), s = X(o);
2528
+ if (i) {
2529
+ const a = Lt(s);
2530
+ return t.concat(s, s.visualViewport || [], Ve(o) ? o : [], a && n ? Be(a) : []);
2531
+ }
2532
+ return t.concat(o, Be(o, [], n));
2533
+ }
2534
+ function Lt(e) {
2535
+ return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
2536
+ }
2537
+ function gr(e) {
2538
+ const t = te(e);
2539
+ let n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0;
2540
+ const o = ae(e), i = o ? e.offsetWidth : n, s = o ? e.offsetHeight : r, a = it(n) !== i || it(r) !== s;
2541
+ return a && (n = i, r = s), {
2542
+ width: n,
2543
+ height: r,
2544
+ $: a
2545
+ };
2546
+ }
2547
+ function nn(e) {
2548
+ return ee(e) ? e : e.contextElement;
2549
+ }
2550
+ function Ae(e) {
2551
+ const t = nn(e);
2552
+ if (!ae(t))
2553
+ return se(1);
2554
+ const n = t.getBoundingClientRect(), {
2555
+ width: r,
2556
+ height: o,
2557
+ $: i
2558
+ } = gr(t);
2559
+ let s = (i ? it(n.width) : n.width) / r, a = (i ? it(n.height) : n.height) / o;
2560
+ return (!s || !Number.isFinite(s)) && (s = 1), (!a || !Number.isFinite(a)) && (a = 1), {
2561
+ x: s,
2562
+ y: a
2563
+ };
2564
+ }
2565
+ const Is = /* @__PURE__ */ se(0);
2566
+ function yr(e) {
2567
+ const t = X(e);
2568
+ return !tn() || !t.visualViewport ? Is : {
2569
+ x: t.visualViewport.offsetLeft,
2570
+ y: t.visualViewport.offsetTop
2571
+ };
2572
+ }
2573
+ function Ms(e, t, n) {
2574
+ return t === void 0 && (t = !1), !n || t && n !== X(e) ? !1 : t;
2575
+ }
2576
+ function Re(e, t, n, r) {
2577
+ t === void 0 && (t = !1), n === void 0 && (n = !1);
2578
+ const o = e.getBoundingClientRect(), i = nn(e);
2579
+ let s = se(1);
2580
+ t && (r ? ee(r) && (s = Ae(r)) : s = Ae(e));
2581
+ const a = Ms(i, n, r) ? yr(i) : se(0);
2582
+ let l = (o.left + a.x) / s.x, u = (o.top + a.y) / s.y, f = o.width / s.x, d = o.height / s.y;
2583
+ if (i) {
2584
+ const p = X(i), h = r && ee(r) ? X(r) : r;
2585
+ let v = p, m = Lt(v);
2586
+ for (; m && r && h !== v; ) {
2587
+ const y = Ae(m), w = m.getBoundingClientRect(), b = te(m), C = w.left + (m.clientLeft + parseFloat(b.paddingLeft)) * y.x, R = w.top + (m.clientTop + parseFloat(b.paddingTop)) * y.y;
2588
+ l *= y.x, u *= y.y, f *= y.x, d *= y.y, l += C, u += R, v = X(m), m = Lt(v);
2589
+ }
2590
+ }
2591
+ return at({
2592
+ width: f,
2593
+ height: d,
2594
+ x: l,
2595
+ y: u
2596
+ });
2597
+ }
2598
+ function yt(e, t) {
2599
+ const n = gt(e).scrollLeft;
2600
+ return t ? t.left + n : Re(ce(e)).left + n;
2601
+ }
2602
+ function xr(e, t) {
2603
+ const n = e.getBoundingClientRect(), r = n.left + t.scrollLeft - yt(e, n), o = n.top + t.scrollTop;
2604
+ return {
2605
+ x: r,
2606
+ y: o
2607
+ };
2608
+ }
2609
+ function js(e) {
2610
+ let {
2611
+ elements: t,
2612
+ rect: n,
2613
+ offsetParent: r,
2614
+ strategy: o
2615
+ } = e;
2616
+ const i = o === "fixed", s = ce(r), a = t ? vt(t.floating) : !1;
2617
+ if (r === s || a && i)
2618
+ return n;
2619
+ let l = {
2620
+ scrollLeft: 0,
2621
+ scrollTop: 0
2622
+ }, u = se(1);
2623
+ const f = se(0), d = ae(r);
2624
+ if ((d || !d && !i) && ((Ie(r) !== "body" || Ve(s)) && (l = gt(r)), ae(r))) {
2625
+ const h = Re(r);
2626
+ u = Ae(r), f.x = h.x + r.clientLeft, f.y = h.y + r.clientTop;
2627
+ }
2628
+ const p = s && !d && !i ? xr(s, l) : se(0);
2629
+ return {
2630
+ width: n.width * u.x,
2631
+ height: n.height * u.y,
2632
+ x: n.x * u.x - l.scrollLeft * u.x + f.x + p.x,
2633
+ y: n.y * u.y - l.scrollTop * u.y + f.y + p.y
2634
+ };
2635
+ }
2636
+ function Ls(e) {
2637
+ return Array.from(e.getClientRects());
2638
+ }
2639
+ function Fs(e) {
2640
+ const t = ce(e), n = gt(e), r = e.ownerDocument.body, o = G(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), i = G(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight);
2641
+ let s = -n.scrollLeft + yt(e);
2642
+ const a = -n.scrollTop;
2643
+ return te(r).direction === "rtl" && (s += G(t.clientWidth, r.clientWidth) - o), {
2644
+ width: o,
2645
+ height: i,
2646
+ x: s,
2647
+ y: a
2648
+ };
2649
+ }
2650
+ const _n = 25;
2651
+ function $s(e, t) {
2652
+ const n = X(e), r = ce(e), o = n.visualViewport;
2653
+ let i = r.clientWidth, s = r.clientHeight, a = 0, l = 0;
2654
+ if (o) {
2655
+ i = o.width, s = o.height;
2656
+ const f = tn();
2657
+ (!f || f && t === "fixed") && (a = o.offsetLeft, l = o.offsetTop);
2658
+ }
2659
+ const u = yt(r);
2660
+ if (u <= 0) {
2661
+ const f = r.ownerDocument, d = f.body, p = getComputedStyle(d), h = f.compatMode === "CSS1Compat" && parseFloat(p.marginLeft) + parseFloat(p.marginRight) || 0, v = Math.abs(r.clientWidth - d.clientWidth - h);
2662
+ v <= _n && (i -= v);
2663
+ } else u <= _n && (i += u);
2664
+ return {
2665
+ width: i,
2666
+ height: s,
2667
+ x: a,
2668
+ y: l
2669
+ };
2670
+ }
2671
+ const Ws = /* @__PURE__ */ new Set(["absolute", "fixed"]);
2672
+ function Bs(e, t) {
2673
+ const n = Re(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, i = ae(e) ? Ae(e) : se(1), s = e.clientWidth * i.x, a = e.clientHeight * i.y, l = o * i.x, u = r * i.y;
2674
+ return {
2675
+ width: s,
2676
+ height: a,
2677
+ x: l,
2678
+ y: u
2679
+ };
2680
+ }
2681
+ function kn(e, t, n) {
2682
+ let r;
2683
+ if (t === "viewport")
2684
+ r = $s(e, n);
2685
+ else if (t === "document")
2686
+ r = Fs(ce(e));
2687
+ else if (ee(t))
2688
+ r = Bs(t, n);
2689
+ else {
2690
+ const o = yr(e);
2691
+ r = {
2692
+ x: t.x - o.x,
2693
+ y: t.y - o.y,
2694
+ width: t.width,
2695
+ height: t.height
2696
+ };
2697
+ }
2698
+ return at(r);
2699
+ }
2700
+ function wr(e, t) {
2701
+ const n = ye(e);
2702
+ return n === t || !ee(n) || Ne(n) ? !1 : te(n).position === "fixed" || wr(n, t);
2703
+ }
2704
+ function Hs(e, t) {
2705
+ const n = t.get(e);
2706
+ if (n)
2707
+ return n;
2708
+ let r = Be(e, [], !1).filter((a) => ee(a) && Ie(a) !== "body"), o = null;
2709
+ const i = te(e).position === "fixed";
2710
+ let s = i ? ye(e) : e;
2711
+ for (; ee(s) && !Ne(s); ) {
2712
+ const a = te(s), l = en(s);
2713
+ !l && a.position === "fixed" && (o = null), (i ? !l && !o : !l && a.position === "static" && !!o && Ws.has(o.position) || Ve(s) && !l && wr(e, s)) ? r = r.filter((f) => f !== s) : o = a, s = ye(s);
2714
+ }
2715
+ return t.set(e, r), r;
2716
+ }
2717
+ function Vs(e) {
2718
+ let {
2719
+ element: t,
2720
+ boundary: n,
2721
+ rootBoundary: r,
2722
+ strategy: o
2723
+ } = e;
2724
+ const s = [...n === "clippingAncestors" ? vt(t) ? [] : Hs(t, this._c) : [].concat(n), r], a = s[0], l = s.reduce((u, f) => {
2725
+ const d = kn(t, f, o);
2726
+ return u.top = G(d.top, u.top), u.right = ge(d.right, u.right), u.bottom = ge(d.bottom, u.bottom), u.left = G(d.left, u.left), u;
2727
+ }, kn(t, a, o));
2728
+ return {
2729
+ width: l.right - l.left,
2730
+ height: l.bottom - l.top,
2731
+ x: l.left,
2732
+ y: l.top
2733
+ };
2734
+ }
2735
+ function Us(e) {
2736
+ const {
2737
+ width: t,
2738
+ height: n
2739
+ } = gr(e);
2740
+ return {
2741
+ width: t,
2742
+ height: n
2743
+ };
2744
+ }
2745
+ function zs(e, t, n) {
2746
+ const r = ae(t), o = ce(t), i = n === "fixed", s = Re(e, !0, i, t);
2747
+ let a = {
2748
+ scrollLeft: 0,
2749
+ scrollTop: 0
2750
+ };
2751
+ const l = se(0);
2752
+ function u() {
2753
+ l.x = yt(o);
2754
+ }
2755
+ if (r || !r && !i)
2756
+ if ((Ie(t) !== "body" || Ve(o)) && (a = gt(t)), r) {
2757
+ const h = Re(t, !0, i, t);
2758
+ l.x = h.x + t.clientLeft, l.y = h.y + t.clientTop;
2759
+ } else o && u();
2760
+ i && !r && o && u();
2761
+ const f = o && !r && !i ? xr(o, a) : se(0), d = s.left + a.scrollLeft - l.x - f.x, p = s.top + a.scrollTop - l.y - f.y;
2762
+ return {
2763
+ x: d,
2764
+ y: p,
2765
+ width: s.width,
2766
+ height: s.height
2767
+ };
2768
+ }
2769
+ function Dt(e) {
2770
+ return te(e).position === "static";
2771
+ }
2772
+ function In(e, t) {
2773
+ if (!ae(e) || te(e).position === "fixed")
2774
+ return null;
2775
+ if (t)
2776
+ return t(e);
2777
+ let n = e.offsetParent;
2778
+ return ce(e) === n && (n = n.ownerDocument.body), n;
2779
+ }
2780
+ function br(e, t) {
2781
+ const n = X(e);
2782
+ if (vt(e))
2783
+ return n;
2784
+ if (!ae(e)) {
2785
+ let o = ye(e);
2786
+ for (; o && !Ne(o); ) {
2787
+ if (ee(o) && !Dt(o))
2788
+ return o;
2789
+ o = ye(o);
2790
+ }
2791
+ return n;
2792
+ }
2793
+ let r = In(e, t);
2794
+ for (; r && Ss(r) && Dt(r); )
2795
+ r = In(r, t);
2796
+ return r && Ne(r) && Dt(r) && !en(r) ? n : r || _s(e) || n;
2797
+ }
2798
+ const Ys = async function(e) {
2799
+ const t = this.getOffsetParent || br, n = this.getDimensions, r = await n(e.floating);
2800
+ return {
2801
+ reference: zs(e.reference, await t(e.floating), e.strategy),
2802
+ floating: {
2803
+ x: 0,
2804
+ y: 0,
2805
+ width: r.width,
2806
+ height: r.height
2807
+ }
2808
+ };
2809
+ };
2810
+ function Gs(e) {
2811
+ return te(e).direction === "rtl";
2812
+ }
2813
+ const Xs = {
2814
+ convertOffsetParentRelativeRectToViewportRelativeRect: js,
2815
+ getDocumentElement: ce,
2816
+ getClippingRect: Vs,
2817
+ getOffsetParent: br,
2818
+ getElementRects: Ys,
2819
+ getClientRects: Ls,
2820
+ getDimensions: Us,
2821
+ getScale: Ae,
2822
+ isElement: ee,
2823
+ isRTL: Gs
2824
+ };
2825
+ function Cr(e, t) {
2826
+ return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
2827
+ }
2828
+ function Ks(e, t) {
2829
+ let n = null, r;
2830
+ const o = ce(e);
2831
+ function i() {
2832
+ var a;
2833
+ clearTimeout(r), (a = n) == null || a.disconnect(), n = null;
2834
+ }
2835
+ function s(a, l) {
2836
+ a === void 0 && (a = !1), l === void 0 && (l = 1), i();
2837
+ const u = e.getBoundingClientRect(), {
2838
+ left: f,
2839
+ top: d,
2840
+ width: p,
2841
+ height: h
2842
+ } = u;
2843
+ if (a || t(), !p || !h)
2844
+ return;
2845
+ const v = Qe(d), m = Qe(o.clientWidth - (f + p)), y = Qe(o.clientHeight - (d + h)), w = Qe(f), C = {
2846
+ rootMargin: -v + "px " + -m + "px " + -y + "px " + -w + "px",
2847
+ threshold: G(0, ge(1, l)) || 1
2848
+ };
2849
+ let R = !0;
2850
+ function E(O) {
2851
+ const P = O[0].intersectionRatio;
2852
+ if (P !== l) {
2853
+ if (!R)
2854
+ return s();
2855
+ P ? s(!1, P) : r = setTimeout(() => {
2856
+ s(!1, 1e-7);
2857
+ }, 1e3);
2858
+ }
2859
+ P === 1 && !Cr(u, e.getBoundingClientRect()) && s(), R = !1;
2860
+ }
2861
+ try {
2862
+ n = new IntersectionObserver(E, {
2863
+ ...C,
2864
+ // Handle <iframe>s
2865
+ root: o.ownerDocument
2866
+ });
2867
+ } catch {
2868
+ n = new IntersectionObserver(E, C);
2869
+ }
2870
+ n.observe(e);
2871
+ }
2872
+ return s(!0), i;
2873
+ }
2874
+ function qs(e, t, n, r) {
2875
+ r === void 0 && (r = {});
2876
+ const {
2877
+ ancestorScroll: o = !0,
2878
+ ancestorResize: i = !0,
2879
+ elementResize: s = typeof ResizeObserver == "function",
2880
+ layoutShift: a = typeof IntersectionObserver == "function",
2881
+ animationFrame: l = !1
2882
+ } = r, u = nn(e), f = o || i ? [...u ? Be(u) : [], ...Be(t)] : [];
2883
+ f.forEach((w) => {
2884
+ o && w.addEventListener("scroll", n, {
2885
+ passive: !0
2886
+ }), i && w.addEventListener("resize", n);
2887
+ });
2888
+ const d = u && a ? Ks(u, n) : null;
2889
+ let p = -1, h = null;
2890
+ s && (h = new ResizeObserver((w) => {
2891
+ let [b] = w;
2892
+ b && b.target === u && h && (h.unobserve(t), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
2893
+ var C;
2894
+ (C = h) == null || C.observe(t);
2895
+ })), n();
2896
+ }), u && !l && h.observe(u), h.observe(t));
2897
+ let v, m = l ? Re(e) : null;
2898
+ l && y();
2899
+ function y() {
2900
+ const w = Re(e);
2901
+ m && !Cr(m, w) && n(), m = w, v = requestAnimationFrame(y);
2902
+ }
2903
+ return n(), () => {
2904
+ var w;
2905
+ f.forEach((b) => {
2906
+ o && b.removeEventListener("scroll", n), i && b.removeEventListener("resize", n);
2907
+ }), d?.(), (w = h) == null || w.disconnect(), h = null, l && cancelAnimationFrame(v);
2908
+ };
2909
+ }
2910
+ const Zs = bs, Js = Cs, Qs = ys, ea = Es, ta = xs, Mn = gs, na = Rs, ra = (e, t, n) => {
2911
+ const r = /* @__PURE__ */ new Map(), o = {
2912
+ platform: Xs,
2913
+ ...n
2914
+ }, i = {
2915
+ ...o.platform,
2916
+ _c: r
2917
+ };
2918
+ return vs(e, t, {
2919
+ ...o,
2920
+ platform: i
2921
+ });
2922
+ };
2923
+ var oa = typeof document < "u", ia = function() {
2924
+ }, nt = oa ? oo : ia;
2925
+ function ct(e, t) {
2926
+ if (e === t)
2927
+ return !0;
2928
+ if (typeof e != typeof t)
2929
+ return !1;
2930
+ if (typeof e == "function" && e.toString() === t.toString())
2931
+ return !0;
2932
+ let n, r, o;
2933
+ if (e && t && typeof e == "object") {
2934
+ if (Array.isArray(e)) {
2935
+ if (n = e.length, n !== t.length) return !1;
2936
+ for (r = n; r-- !== 0; )
2937
+ if (!ct(e[r], t[r]))
2938
+ return !1;
2939
+ return !0;
2940
+ }
2941
+ if (o = Object.keys(e), n = o.length, n !== Object.keys(t).length)
2942
+ return !1;
2943
+ for (r = n; r-- !== 0; )
2944
+ if (!{}.hasOwnProperty.call(t, o[r]))
2945
+ return !1;
2946
+ for (r = n; r-- !== 0; ) {
2947
+ const i = o[r];
2948
+ if (!(i === "_owner" && e.$$typeof) && !ct(e[i], t[i]))
2949
+ return !1;
2950
+ }
2951
+ return !0;
2952
+ }
2953
+ return e !== e && t !== t;
2954
+ }
2955
+ function Rr(e) {
2956
+ return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
2957
+ }
2958
+ function jn(e, t) {
2959
+ const n = Rr(e);
2960
+ return Math.round(t * n) / n;
2961
+ }
2962
+ function _t(e) {
2963
+ const t = c.useRef(e);
2964
+ return nt(() => {
2965
+ t.current = e;
2966
+ }), t;
2967
+ }
2968
+ function sa(e) {
2969
+ e === void 0 && (e = {});
2970
+ const {
2971
+ placement: t = "bottom",
2972
+ strategy: n = "absolute",
2973
+ middleware: r = [],
2974
+ platform: o,
2975
+ elements: {
2976
+ reference: i,
2977
+ floating: s
2978
+ } = {},
2979
+ transform: a = !0,
2980
+ whileElementsMounted: l,
2981
+ open: u
2982
+ } = e, [f, d] = c.useState({
2983
+ x: 0,
2984
+ y: 0,
2985
+ strategy: n,
2986
+ placement: t,
2987
+ middlewareData: {},
2988
+ isPositioned: !1
2989
+ }), [p, h] = c.useState(r);
2990
+ ct(p, r) || h(r);
2991
+ const [v, m] = c.useState(null), [y, w] = c.useState(null), b = c.useCallback((T) => {
2992
+ T !== O.current && (O.current = T, m(T));
2993
+ }, []), C = c.useCallback((T) => {
2994
+ T !== P.current && (P.current = T, w(T));
2995
+ }, []), R = i || v, E = s || y, O = c.useRef(null), P = c.useRef(null), A = c.useRef(f), _ = l != null, D = _t(l), M = _t(o), F = _t(u), $ = c.useCallback(() => {
2996
+ if (!O.current || !P.current)
2997
+ return;
2998
+ const T = {
2999
+ placement: t,
3000
+ strategy: n,
3001
+ middleware: p
3002
+ };
3003
+ M.current && (T.platform = M.current), ra(O.current, P.current, T).then((W) => {
3004
+ const x = {
3005
+ ...W,
3006
+ // The floating element's position may be recomputed while it's closed
3007
+ // but still mounted (such as when transitioning out). To ensure
3008
+ // `isPositioned` will be `false` initially on the next open, avoid
3009
+ // setting it to `true` when `open === false` (must be specified).
3010
+ isPositioned: F.current !== !1
3011
+ };
3012
+ k.current && !ct(A.current, x) && (A.current = x, Ln.flushSync(() => {
3013
+ d(x);
3014
+ }));
3015
+ });
3016
+ }, [p, t, n, M, F]);
3017
+ nt(() => {
3018
+ u === !1 && A.current.isPositioned && (A.current.isPositioned = !1, d((T) => ({
3019
+ ...T,
3020
+ isPositioned: !1
3021
+ })));
3022
+ }, [u]);
3023
+ const k = c.useRef(!1);
3024
+ nt(() => (k.current = !0, () => {
3025
+ k.current = !1;
3026
+ }), []), nt(() => {
3027
+ if (R && (O.current = R), E && (P.current = E), R && E) {
3028
+ if (D.current)
3029
+ return D.current(R, E, $);
3030
+ $();
3031
+ }
3032
+ }, [R, E, $, D, _]);
3033
+ const U = c.useMemo(() => ({
3034
+ reference: O,
3035
+ floating: P,
3036
+ setReference: b,
3037
+ setFloating: C
3038
+ }), [b, C]), j = c.useMemo(() => ({
3039
+ reference: R,
3040
+ floating: E
3041
+ }), [R, E]), L = c.useMemo(() => {
3042
+ const T = {
3043
+ position: n,
3044
+ left: 0,
3045
+ top: 0
3046
+ };
3047
+ if (!j.floating)
3048
+ return T;
3049
+ const W = jn(j.floating, f.x), x = jn(j.floating, f.y);
3050
+ return a ? {
3051
+ ...T,
3052
+ transform: "translate(" + W + "px, " + x + "px)",
3053
+ ...Rr(j.floating) >= 1.5 && {
3054
+ willChange: "transform"
3055
+ }
3056
+ } : {
3057
+ position: n,
3058
+ left: W,
3059
+ top: x
3060
+ };
3061
+ }, [n, a, j.floating, f.x, f.y]);
3062
+ return c.useMemo(() => ({
3063
+ ...f,
3064
+ update: $,
3065
+ refs: U,
3066
+ elements: j,
3067
+ floatingStyles: L
3068
+ }), [f, $, U, j, L]);
3069
+ }
3070
+ const aa = (e) => {
3071
+ function t(n) {
3072
+ return {}.hasOwnProperty.call(n, "current");
3073
+ }
3074
+ return {
3075
+ name: "arrow",
3076
+ options: e,
3077
+ fn(n) {
3078
+ const {
3079
+ element: r,
3080
+ padding: o
3081
+ } = typeof e == "function" ? e(n) : e;
3082
+ return r && t(r) ? r.current != null ? Mn({
3083
+ element: r.current,
3084
+ padding: o
3085
+ }).fn(n) : {} : r ? Mn({
3086
+ element: r,
3087
+ padding: o
3088
+ }).fn(n) : {};
3089
+ }
3090
+ };
3091
+ }, ca = (e, t) => ({
3092
+ ...Zs(e),
3093
+ options: [e, t]
3094
+ }), la = (e, t) => ({
3095
+ ...Js(e),
3096
+ options: [e, t]
3097
+ }), ua = (e, t) => ({
3098
+ ...na(e),
3099
+ options: [e, t]
3100
+ }), fa = (e, t) => ({
3101
+ ...Qs(e),
3102
+ options: [e, t]
3103
+ }), da = (e, t) => ({
3104
+ ...ea(e),
3105
+ options: [e, t]
3106
+ }), pa = (e, t) => ({
3107
+ ...ta(e),
3108
+ options: [e, t]
3109
+ }), ha = (e, t) => ({
3110
+ ...aa(e),
3111
+ options: [e, t]
3112
+ });
3113
+ var ma = "Arrow", Er = c.forwardRef((e, t) => {
3114
+ const { children: n, width: r = 10, height: o = 5, ...i } = e;
3115
+ return /* @__PURE__ */ g.jsx(
3116
+ Y.svg,
3117
+ {
3118
+ ...i,
3119
+ ref: t,
3120
+ width: r,
3121
+ height: o,
3122
+ viewBox: "0 0 30 10",
3123
+ preserveAspectRatio: "none",
3124
+ children: e.asChild ? n : /* @__PURE__ */ g.jsx("polygon", { points: "0,0 30,0 15,10" })
3125
+ }
3126
+ );
3127
+ });
3128
+ Er.displayName = ma;
3129
+ var va = Er;
3130
+ function ga(e) {
3131
+ const [t, n] = c.useState(void 0);
3132
+ return ve(() => {
3133
+ if (e) {
3134
+ n({ width: e.offsetWidth, height: e.offsetHeight });
3135
+ const r = new ResizeObserver((o) => {
3136
+ if (!Array.isArray(o) || !o.length)
3137
+ return;
3138
+ const i = o[0];
3139
+ let s, a;
3140
+ if ("borderBoxSize" in i) {
3141
+ const l = i.borderBoxSize, u = Array.isArray(l) ? l[0] : l;
3142
+ s = u.inlineSize, a = u.blockSize;
3143
+ } else
3144
+ s = e.offsetWidth, a = e.offsetHeight;
3145
+ n({ width: s, height: a });
3146
+ });
3147
+ return r.observe(e, { box: "border-box" }), () => r.unobserve(e);
3148
+ } else
3149
+ n(void 0);
3150
+ }, [e]), t;
3151
+ }
3152
+ var rn = "Popper", [Pr, xt] = ut(rn), [ya, Or] = Pr(rn), Sr = (e) => {
3153
+ const { __scopePopper: t, children: n } = e, [r, o] = c.useState(null);
3154
+ return /* @__PURE__ */ g.jsx(ya, { scope: t, anchor: r, onAnchorChange: o, children: n });
3155
+ };
3156
+ Sr.displayName = rn;
3157
+ var Ar = "PopperAnchor", Tr = c.forwardRef(
3158
+ (e, t) => {
3159
+ const { __scopePopper: n, virtualRef: r, ...o } = e, i = Or(Ar, n), s = c.useRef(null), a = K(t, s), l = c.useRef(null);
3160
+ return c.useEffect(() => {
3161
+ const u = l.current;
3162
+ l.current = r?.current || s.current, u !== l.current && i.onAnchorChange(l.current);
3163
+ }), r ? null : /* @__PURE__ */ g.jsx(Y.div, { ...o, ref: a });
3164
+ }
3165
+ );
3166
+ Tr.displayName = Ar;
3167
+ var on = "PopperContent", [xa, wa] = Pr(on), Nr = c.forwardRef(
3168
+ (e, t) => {
3169
+ const {
3170
+ __scopePopper: n,
3171
+ side: r = "bottom",
3172
+ sideOffset: o = 0,
3173
+ align: i = "center",
3174
+ alignOffset: s = 0,
3175
+ arrowPadding: a = 0,
3176
+ avoidCollisions: l = !0,
3177
+ collisionBoundary: u = [],
3178
+ collisionPadding: f = 0,
3179
+ sticky: d = "partial",
3180
+ hideWhenDetached: p = !1,
3181
+ updatePositionStrategy: h = "optimized",
3182
+ onPlaced: v,
3183
+ ...m
3184
+ } = e, y = Or(on, n), [w, b] = c.useState(null), C = K(t, (le) => b(le)), [R, E] = c.useState(null), O = ga(R), P = O?.width ?? 0, A = O?.height ?? 0, _ = r + (i !== "center" ? "-" + i : ""), D = typeof f == "number" ? f : { top: 0, right: 0, bottom: 0, left: 0, ...f }, M = Array.isArray(u) ? u : [u], F = M.length > 0, $ = {
3185
+ padding: D,
3186
+ boundary: M.filter(Ca),
3187
+ // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
3188
+ altBoundary: F
3189
+ }, { refs: k, floatingStyles: U, placement: j, isPositioned: L, middlewareData: T } = sa({
3190
+ // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
3191
+ strategy: "fixed",
3192
+ placement: _,
3193
+ whileElementsMounted: (...le) => qs(...le, {
3194
+ animationFrame: h === "always"
3195
+ }),
3196
+ elements: {
3197
+ reference: y.anchor
3198
+ },
3199
+ middleware: [
3200
+ ca({ mainAxis: o + A, alignmentAxis: s }),
3201
+ l && la({
3202
+ mainAxis: !0,
3203
+ crossAxis: !1,
3204
+ limiter: d === "partial" ? ua() : void 0,
3205
+ ...$
3206
+ }),
3207
+ l && fa({ ...$ }),
3208
+ da({
3209
+ ...$,
3210
+ apply: ({ elements: le, rects: B, availableWidth: pe, availableHeight: je }) => {
3211
+ const { width: Rt, height: no } = B.reference, Ye = le.floating.style;
3212
+ Ye.setProperty("--radix-popper-available-width", `${pe}px`), Ye.setProperty("--radix-popper-available-height", `${je}px`), Ye.setProperty("--radix-popper-anchor-width", `${Rt}px`), Ye.setProperty("--radix-popper-anchor-height", `${no}px`);
3213
+ }
3214
+ }),
3215
+ R && ha({ element: R, padding: a }),
3216
+ Ra({ arrowWidth: P, arrowHeight: A }),
3217
+ p && pa({ strategy: "referenceHidden", ...$ })
3218
+ ]
3219
+ }), [W, x] = kr(j), S = Te(v);
3220
+ ve(() => {
3221
+ L && S?.();
3222
+ }, [L, S]);
3223
+ const I = T.arrow?.x, V = T.arrow?.y, re = T.arrow?.centerOffset !== 0, [q, Me] = c.useState();
3224
+ return ve(() => {
3225
+ w && Me(window.getComputedStyle(w).zIndex);
3226
+ }, [w]), /* @__PURE__ */ g.jsx(
3227
+ "div",
3228
+ {
3229
+ ref: k.setFloating,
3230
+ "data-radix-popper-content-wrapper": "",
3231
+ style: {
3232
+ ...U,
3233
+ transform: L ? U.transform : "translate(0, -200%)",
3234
+ // keep off the page when measuring
3235
+ minWidth: "max-content",
3236
+ zIndex: q,
3237
+ "--radix-popper-transform-origin": [
3238
+ T.transformOrigin?.x,
3239
+ T.transformOrigin?.y
3240
+ ].join(" "),
3241
+ // hide the content if using the hide middleware and should be hidden
3242
+ // set visibility to hidden and disable pointer events so the UI behaves
3243
+ // as if the PopperContent isn't there at all
3244
+ ...T.hide?.referenceHidden && {
3245
+ visibility: "hidden",
3246
+ pointerEvents: "none"
3247
+ }
3248
+ },
3249
+ dir: e.dir,
3250
+ children: /* @__PURE__ */ g.jsx(
3251
+ xa,
3252
+ {
3253
+ scope: n,
3254
+ placedSide: W,
3255
+ onArrowChange: E,
3256
+ arrowX: I,
3257
+ arrowY: V,
3258
+ shouldHideArrow: re,
3259
+ children: /* @__PURE__ */ g.jsx(
3260
+ Y.div,
3261
+ {
3262
+ "data-side": W,
3263
+ "data-align": x,
3264
+ ...m,
3265
+ ref: C,
3266
+ style: {
3267
+ ...m.style,
3268
+ // if the PopperContent hasn't been placed yet (not all measurements done)
3269
+ // we prevent animations so that users's animation don't kick in too early referring wrong sides
3270
+ animation: L ? void 0 : "none"
3271
+ }
3272
+ }
3273
+ )
3274
+ }
3275
+ )
3276
+ }
3277
+ );
3278
+ }
3279
+ );
3280
+ Nr.displayName = on;
3281
+ var Dr = "PopperArrow", ba = {
3282
+ top: "bottom",
3283
+ right: "left",
3284
+ bottom: "top",
3285
+ left: "right"
3286
+ }, _r = c.forwardRef(function(t, n) {
3287
+ const { __scopePopper: r, ...o } = t, i = wa(Dr, r), s = ba[i.placedSide];
3288
+ return (
3289
+ // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
3290
+ // doesn't report size as we'd expect on SVG elements.
3291
+ // it reports their bounding box which is effectively the largest path inside the SVG.
3292
+ /* @__PURE__ */ g.jsx(
3293
+ "span",
3294
+ {
3295
+ ref: i.onArrowChange,
3296
+ style: {
3297
+ position: "absolute",
3298
+ left: i.arrowX,
3299
+ top: i.arrowY,
3300
+ [s]: 0,
3301
+ transformOrigin: {
3302
+ top: "",
3303
+ right: "0 0",
3304
+ bottom: "center 0",
3305
+ left: "100% 0"
3306
+ }[i.placedSide],
3307
+ transform: {
3308
+ top: "translateY(100%)",
3309
+ right: "translateY(50%) rotate(90deg) translateX(-50%)",
3310
+ bottom: "rotate(180deg)",
3311
+ left: "translateY(50%) rotate(-90deg) translateX(50%)"
3312
+ }[i.placedSide],
3313
+ visibility: i.shouldHideArrow ? "hidden" : void 0
3314
+ },
3315
+ children: /* @__PURE__ */ g.jsx(
3316
+ va,
3317
+ {
3318
+ ...o,
3319
+ ref: n,
3320
+ style: {
3321
+ ...o.style,
3322
+ // ensures the element can be measured correctly (mostly for if SVG)
3323
+ display: "block"
3324
+ }
3325
+ }
3326
+ )
3327
+ }
3328
+ )
3329
+ );
3330
+ });
3331
+ _r.displayName = Dr;
3332
+ function Ca(e) {
3333
+ return e !== null;
3334
+ }
3335
+ var Ra = (e) => ({
3336
+ name: "transformOrigin",
3337
+ options: e,
3338
+ fn(t) {
3339
+ const { placement: n, rects: r, middlewareData: o } = t, s = o.arrow?.centerOffset !== 0, a = s ? 0 : e.arrowWidth, l = s ? 0 : e.arrowHeight, [u, f] = kr(n), d = { start: "0%", center: "50%", end: "100%" }[f], p = (o.arrow?.x ?? 0) + a / 2, h = (o.arrow?.y ?? 0) + l / 2;
3340
+ let v = "", m = "";
3341
+ return u === "bottom" ? (v = s ? d : `${p}px`, m = `${-l}px`) : u === "top" ? (v = s ? d : `${p}px`, m = `${r.floating.height + l}px`) : u === "right" ? (v = `${-l}px`, m = s ? d : `${h}px`) : u === "left" && (v = `${r.floating.width + l}px`, m = s ? d : `${h}px`), { data: { x: v, y: m } };
3342
+ }
3343
+ });
3344
+ function kr(e) {
3345
+ const [t, n = "center"] = e.split("-");
3346
+ return [t, n];
3347
+ }
3348
+ var Ir = Sr, sn = Tr, Mr = Nr, jr = _r, wt = "Popover", [Lr] = ut(wt, [
3349
+ xt
3350
+ ]), Ue = xt(), [Ea, we] = Lr(wt), Fr = (e) => {
3351
+ const {
3352
+ __scopePopover: t,
3353
+ children: n,
3354
+ open: r,
3355
+ defaultOpen: o,
3356
+ onOpenChange: i,
3357
+ modal: s = !1
3358
+ } = e, a = Ue(t), l = c.useRef(null), [u, f] = c.useState(!1), [d, p] = Ut({
3359
+ prop: r,
3360
+ defaultProp: o ?? !1,
3361
+ onChange: i,
3362
+ caller: wt
3363
+ });
3364
+ return /* @__PURE__ */ g.jsx(Ir, { ...a, children: /* @__PURE__ */ g.jsx(
3365
+ Ea,
3366
+ {
3367
+ scope: t,
3368
+ contentId: $e(),
3369
+ triggerRef: l,
3370
+ open: d,
3371
+ onOpenChange: p,
3372
+ onOpenToggle: c.useCallback(() => p((h) => !h), [p]),
3373
+ hasCustomAnchor: u,
3374
+ onCustomAnchorAdd: c.useCallback(() => f(!0), []),
3375
+ onCustomAnchorRemove: c.useCallback(() => f(!1), []),
3376
+ modal: s,
3377
+ children: n
3378
+ }
3379
+ ) });
3380
+ };
3381
+ Fr.displayName = wt;
3382
+ var $r = "PopoverAnchor", Pa = c.forwardRef(
3383
+ (e, t) => {
3384
+ const { __scopePopover: n, ...r } = e, o = we($r, n), i = Ue(n), { onCustomAnchorAdd: s, onCustomAnchorRemove: a } = o;
3385
+ return c.useEffect(() => (s(), () => a()), [s, a]), /* @__PURE__ */ g.jsx(sn, { ...i, ...r, ref: t });
3386
+ }
3387
+ );
3388
+ Pa.displayName = $r;
3389
+ var Wr = "PopoverTrigger", Br = c.forwardRef(
3390
+ (e, t) => {
3391
+ const { __scopePopover: n, ...r } = e, o = we(Wr, n), i = Ue(n), s = K(t, o.triggerRef), a = /* @__PURE__ */ g.jsx(
3392
+ Y.button,
3393
+ {
3394
+ type: "button",
3395
+ "aria-haspopup": "dialog",
3396
+ "aria-expanded": o.open,
3397
+ "aria-controls": o.contentId,
3398
+ "data-state": Yr(o.open),
3399
+ ...r,
3400
+ ref: s,
3401
+ onClick: H(e.onClick, o.onOpenToggle)
3402
+ }
3403
+ );
3404
+ return o.hasCustomAnchor ? a : /* @__PURE__ */ g.jsx(sn, { asChild: !0, ...i, children: a });
3405
+ }
3406
+ );
3407
+ Br.displayName = Wr;
3408
+ var an = "PopoverPortal", [Oa, Sa] = Lr(an, {
3409
+ forceMount: void 0
3410
+ }), Hr = (e) => {
3411
+ const { __scopePopover: t, forceMount: n, children: r, container: o } = e, i = we(an, t);
3412
+ return /* @__PURE__ */ g.jsx(Oa, { scope: t, forceMount: n, children: /* @__PURE__ */ g.jsx(xe, { present: n || i.open, children: /* @__PURE__ */ g.jsx(dt, { asChild: !0, container: o, children: r }) }) });
3413
+ };
3414
+ Hr.displayName = an;
3415
+ var De = "PopoverContent", Vr = c.forwardRef(
3416
+ (e, t) => {
3417
+ const n = Sa(De, e.__scopePopover), { forceMount: r = n.forceMount, ...o } = e, i = we(De, e.__scopePopover);
3418
+ return /* @__PURE__ */ g.jsx(xe, { present: r || i.open, children: i.modal ? /* @__PURE__ */ g.jsx(Ta, { ...o, ref: t }) : /* @__PURE__ */ g.jsx(Na, { ...o, ref: t }) });
3419
+ }
3420
+ );
3421
+ Vr.displayName = De;
3422
+ var Aa = /* @__PURE__ */ zt("PopoverContent.RemoveScroll"), Ta = c.forwardRef(
3423
+ (e, t) => {
3424
+ const n = we(De, e.__scopePopover), r = c.useRef(null), o = K(t, r), i = c.useRef(!1);
3425
+ return c.useEffect(() => {
3426
+ const s = r.current;
3427
+ if (s) return Qn(s);
3428
+ }, []), /* @__PURE__ */ g.jsx(Gt, { as: Aa, allowPinchZoom: !0, children: /* @__PURE__ */ g.jsx(
3429
+ Ur,
3430
+ {
3431
+ ...e,
3432
+ ref: o,
3433
+ trapFocus: n.open,
3434
+ disableOutsidePointerEvents: !0,
3435
+ onCloseAutoFocus: H(e.onCloseAutoFocus, (s) => {
3436
+ s.preventDefault(), i.current || n.triggerRef.current?.focus();
3437
+ }),
3438
+ onPointerDownOutside: H(
3439
+ e.onPointerDownOutside,
3440
+ (s) => {
3441
+ const a = s.detail.originalEvent, l = a.button === 0 && a.ctrlKey === !0, u = a.button === 2 || l;
3442
+ i.current = u;
3443
+ },
3444
+ { checkForDefaultPrevented: !1 }
3445
+ ),
3446
+ onFocusOutside: H(
3447
+ e.onFocusOutside,
3448
+ (s) => s.preventDefault(),
3449
+ { checkForDefaultPrevented: !1 }
3450
+ )
3451
+ }
3452
+ ) });
3453
+ }
3454
+ ), Na = c.forwardRef(
3455
+ (e, t) => {
3456
+ const n = we(De, e.__scopePopover), r = c.useRef(!1), o = c.useRef(!1);
3457
+ return /* @__PURE__ */ g.jsx(
3458
+ Ur,
3459
+ {
3460
+ ...e,
3461
+ ref: t,
3462
+ trapFocus: !1,
3463
+ disableOutsidePointerEvents: !1,
3464
+ onCloseAutoFocus: (i) => {
3465
+ e.onCloseAutoFocus?.(i), i.defaultPrevented || (r.current || n.triggerRef.current?.focus(), i.preventDefault()), r.current = !1, o.current = !1;
3466
+ },
3467
+ onInteractOutside: (i) => {
3468
+ e.onInteractOutside?.(i), i.defaultPrevented || (r.current = !0, i.detail.originalEvent.type === "pointerdown" && (o.current = !0));
3469
+ const s = i.target;
3470
+ n.triggerRef.current?.contains(s) && i.preventDefault(), i.detail.originalEvent.type === "focusin" && o.current && i.preventDefault();
3471
+ }
3472
+ }
3473
+ );
3474
+ }
3475
+ ), Ur = c.forwardRef(
3476
+ (e, t) => {
3477
+ const {
3478
+ __scopePopover: n,
3479
+ trapFocus: r,
3480
+ onOpenAutoFocus: o,
3481
+ onCloseAutoFocus: i,
3482
+ disableOutsidePointerEvents: s,
3483
+ onEscapeKeyDown: a,
3484
+ onPointerDownOutside: l,
3485
+ onFocusOutside: u,
3486
+ onInteractOutside: f,
3487
+ ...d
3488
+ } = e, p = we(De, n), h = Ue(n);
3489
+ return Un(), /* @__PURE__ */ g.jsx(
3490
+ Yt,
3491
+ {
3492
+ asChild: !0,
3493
+ loop: !0,
3494
+ trapped: r,
3495
+ onMountAutoFocus: o,
3496
+ onUnmountAutoFocus: i,
3497
+ children: /* @__PURE__ */ g.jsx(
3498
+ ft,
3499
+ {
3500
+ asChild: !0,
3501
+ disableOutsidePointerEvents: s,
3502
+ onInteractOutside: f,
3503
+ onEscapeKeyDown: a,
3504
+ onPointerDownOutside: l,
3505
+ onFocusOutside: u,
3506
+ onDismiss: () => p.onOpenChange(!1),
3507
+ children: /* @__PURE__ */ g.jsx(
3508
+ Mr,
3509
+ {
3510
+ "data-state": Yr(p.open),
3511
+ role: "dialog",
3512
+ id: p.contentId,
3513
+ ...h,
3514
+ ...d,
3515
+ ref: t,
3516
+ style: {
3517
+ ...d.style,
3518
+ "--radix-popover-content-transform-origin": "var(--radix-popper-transform-origin)",
3519
+ "--radix-popover-content-available-width": "var(--radix-popper-available-width)",
3520
+ "--radix-popover-content-available-height": "var(--radix-popper-available-height)",
3521
+ "--radix-popover-trigger-width": "var(--radix-popper-anchor-width)",
3522
+ "--radix-popover-trigger-height": "var(--radix-popper-anchor-height)"
3523
+ }
3524
+ }
3525
+ )
3526
+ }
3527
+ )
3528
+ }
3529
+ );
3530
+ }
3531
+ ), zr = "PopoverClose", Da = c.forwardRef(
3532
+ (e, t) => {
3533
+ const { __scopePopover: n, ...r } = e, o = we(zr, n);
3534
+ return /* @__PURE__ */ g.jsx(
3535
+ Y.button,
3536
+ {
3537
+ type: "button",
3538
+ ...r,
3539
+ ref: t,
3540
+ onClick: H(e.onClick, () => o.onOpenChange(!1))
3541
+ }
3542
+ );
3543
+ }
3544
+ );
3545
+ Da.displayName = zr;
3546
+ var _a = "PopoverArrow", ka = c.forwardRef(
3547
+ (e, t) => {
3548
+ const { __scopePopover: n, ...r } = e, o = Ue(n);
3549
+ return /* @__PURE__ */ g.jsx(jr, { ...o, ...r, ref: t });
3550
+ }
3551
+ );
3552
+ ka.displayName = _a;
3553
+ function Yr(e) {
3554
+ return e ? "open" : "closed";
3555
+ }
3556
+ var Ia = Fr, Ma = Br, ja = Hr, La = Vr;
3557
+ const Fa = ["top", "right", "bottom", "left"], $a = ["start", "center", "end"];
3558
+ function Wa(e) {
3559
+ const t = N(e)?.toLowerCase();
3560
+ return t && Fa.includes(t) ? t : void 0;
3561
+ }
3562
+ function Ba(e) {
3563
+ const t = N(e)?.toLowerCase();
3564
+ return t && $a.includes(t) ? t : void 0;
3565
+ }
3566
+ function Ha() {
3567
+ const e = J(function({ node: n, context: r, className: o }) {
3568
+ const i = Z(n.props?.open), s = Z(n.props?.defaultOpen), a = Z(n.props?.modal), l = Wa(n.props?.side), u = Ba(n.props?.align), f = be(n.props?.sideOffset), d = be(n.props?.alignOffset), [p, h] = lt(s ?? !1), v = i !== void 0, m = v ? !!i : p;
3569
+ Wt(() => {
3570
+ !v && s !== void 0 && h(s);
3571
+ }, [s, v]);
3572
+ const y = Ht(me(n.props?.onOpenChangeId), r.dispatchAction), w = (M) => {
3573
+ v || h(M), y?.(M);
3574
+ }, { defaultChildren: b, slotChildren: C } = Vt(n), R = C.get("trigger") ?? [], E = C.get("content") ?? [], O = R.length > 0 ? r.renderChildren(R) : void 0, P = [];
3575
+ E.length > 0 && P.push(/* @__PURE__ */ g.jsx(ue, { children: r.renderChildren(E) }, "content")), b.length > 0 && P.push(/* @__PURE__ */ g.jsx(ue, { children: r.renderChildren(b) }, "default"));
3576
+ const A = z("radix-popover", o, N(n.props?.className)), _ = z("radix-popover__content", rt(n.props?.contentStyleIds)), D = Q(
3577
+ n.props,
3578
+ /* @__PURE__ */ new Set([
3579
+ "open",
3580
+ "defaultOpen",
3581
+ "modal",
3582
+ "onOpenChangeId",
3583
+ "side",
3584
+ "align",
3585
+ "sideOffset",
3586
+ "alignOffset",
3587
+ "contentStyleIds",
3588
+ "className"
3589
+ ])
3590
+ );
3591
+ return /* @__PURE__ */ g.jsx(
3592
+ "div",
3593
+ {
3594
+ ...D,
3595
+ "data-ikon-element-id": n.id,
3596
+ className: A,
3597
+ "data-state": m ? "open" : "closed",
3598
+ children: /* @__PURE__ */ g.jsxs(
3599
+ Ia,
3600
+ {
3601
+ open: v ? i : void 0,
3602
+ defaultOpen: s,
3603
+ modal: a !== !1,
3604
+ onOpenChange: w,
3605
+ children: [
3606
+ O ? /* @__PURE__ */ g.jsx(Ma, { asChild: !0, children: /* @__PURE__ */ g.jsx(ue, { children: O }) }) : null,
3607
+ /* @__PURE__ */ g.jsx(ja, { children: /* @__PURE__ */ g.jsx(
3608
+ La,
3609
+ {
3610
+ className: _,
3611
+ "data-state": m ? "open" : "closed",
3612
+ side: l,
3613
+ align: u,
3614
+ sideOffset: f,
3615
+ alignOffset: d,
3616
+ children: P
3617
+ }
3618
+ ) })
3619
+ ]
3620
+ }
3621
+ )
3622
+ }
3623
+ );
3624
+ });
3625
+ return (t) => {
3626
+ if (t.type === "radix-popover")
3627
+ return e;
3628
+ };
3629
+ }
3630
+ function Va() {
3631
+ const e = J(function({ node: n, context: r, className: o }) {
3632
+ const i = N(n.props?.content), s = Q(n.props, /* @__PURE__ */ new Set(["className"])), a = [];
3633
+ i !== void 0 && a.push(i);
3634
+ const l = r.renderChildren(n.children ?? []);
3635
+ l != null && a.push(l), s["data-ikon-element-id"] = n.id;
3636
+ const u = z(o, N(n.props?.className));
3637
+ return u && (s.className = u), /* @__PURE__ */ g.jsx(lo, { ...s, children: a });
3638
+ });
3639
+ return (t) => {
3640
+ if (t.type === "radix-text")
3641
+ return e;
3642
+ };
3643
+ }
3644
+ function Ua() {
3645
+ const e = /* @__PURE__ */ new Set(["value", "defaultValue", "placeholder", "disabled", "rows", "onValueChangeId", "onInvokeId", "className"]), t = J(function({ node: r, context: o, className: i }) {
3646
+ const s = N(r.props?.value), a = N(r.props?.defaultValue), l = N(r.props?.placeholder), u = Z(r.props?.disabled), f = be(r.props?.rows), p = { ...Q(r.props, e) };
3647
+ s !== void 0 ? p.value = s : a !== void 0 && (p.defaultValue = a), l && (p.placeholder = l), u !== void 0 && (p.disabled = u), f !== void 0 && (p.rows = f);
3648
+ const h = Fn(me(r.props?.onValueChangeId), o.dispatchAction), v = Bt(me(r.props?.onInvokeId), o.dispatchAction);
3649
+ h && (p.onChange = (y) => {
3650
+ h(y?.target?.value ?? "");
3651
+ }), v && (p.onKeyDown = (y) => {
3652
+ y.key !== "Enter" || y.shiftKey || y.altKey || y.metaKey || y.nativeEvent.isComposing || (y.preventDefault(), v());
3653
+ }), p["data-ikon-element-id"] = r.id;
3654
+ const m = z("radix-text-area", i, N(r.props?.className));
3655
+ return m && (p.className = m), /* @__PURE__ */ g.jsx(uo, { ...p });
3656
+ });
3657
+ return (n) => {
3658
+ if (n.type === "radix-text-area")
3659
+ return t;
3660
+ };
3661
+ }
3662
+ function za() {
3663
+ const e = /* @__PURE__ */ new Set(["value", "defaultValue", "placeholder", "disabled", "type", "onValueChangeId", "className"]), t = J(function({ node: r, context: o, className: i }) {
3664
+ const s = N(r.props?.value), a = N(r.props?.defaultValue), l = N(r.props?.placeholder), u = Z(r.props?.disabled), f = N(r.props?.type), p = { ...Q(r.props, e) };
3665
+ s !== void 0 ? p.value = s : a !== void 0 && (p.defaultValue = a), l && (p.placeholder = l), u !== void 0 && (p.disabled = u), f && (p.type = f);
3666
+ const h = Fn(me(r.props?.onValueChangeId), o.dispatchAction);
3667
+ h && (p.onChange = (m) => {
3668
+ h(m?.target?.value ?? "");
3669
+ }), p["data-ikon-element-id"] = r.id;
3670
+ const v = z("radix-text-field", i, N(r.props?.className));
3671
+ return v && (p.className = v), /* @__PURE__ */ g.jsx(fo.Root, { ...p });
3672
+ });
3673
+ return (n) => {
3674
+ if (n.type === "radix-text-field")
3675
+ return t;
3676
+ };
3677
+ }
3678
+ function Ya() {
3679
+ const e = J(function({ node: n, context: r, className: o }) {
3680
+ const i = N(n.props?.appearance), s = N(n.props?.accentColor), a = N(n.props?.grayColor), l = N(n.props?.radius), u = N(n.props?.scaling), f = N(n.props?.panelBackground), d = {};
3681
+ i && (d.appearance = i), s && (d.accentColor = s), a && (d.grayColor = a), l && (d.radius = l), u && (d.scaling = u), f && (d.panelBackground = f);
3682
+ const p = r.renderChildren(n.children ?? []), h = z("radix-theme", o, N(n.props?.className)), v = {
3683
+ ...Q(n.props, /* @__PURE__ */ new Set(["appearance", "accentColor", "grayColor", "radius", "scaling", "panelBackground", "className"])),
3684
+ "data-ikon-element-id": n.id,
3685
+ ...h ? { className: h } : {}
3686
+ };
3687
+ return /* @__PURE__ */ g.jsx("div", { ...v, children: /* @__PURE__ */ g.jsx(po, { ...d, children: p }) });
3688
+ });
3689
+ return (t) => {
3690
+ if (t.type === "radix-theme")
3691
+ return e;
3692
+ };
3693
+ }
3694
+ var Ga = Object.freeze({
3695
+ // See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
3696
+ position: "absolute",
3697
+ border: 0,
3698
+ width: 1,
3699
+ height: 1,
3700
+ padding: 0,
3701
+ margin: -1,
3702
+ overflow: "hidden",
3703
+ clip: "rect(0, 0, 0, 0)",
3704
+ whiteSpace: "nowrap",
3705
+ wordWrap: "normal"
3706
+ }), Xa = "VisuallyHidden", Gr = c.forwardRef(
3707
+ (e, t) => /* @__PURE__ */ g.jsx(
3708
+ Y.span,
3709
+ {
3710
+ ...e,
3711
+ ref: t,
3712
+ style: { ...Ga, ...e.style }
3713
+ }
3714
+ )
3715
+ );
3716
+ Gr.displayName = Xa;
3717
+ var Ka = Gr, [bt] = ut("Tooltip", [
3718
+ xt
3719
+ ]), Ct = xt(), Xr = "TooltipProvider", qa = 700, Ft = "tooltip.open", [Za, cn] = bt(Xr), Kr = (e) => {
3720
+ const {
3721
+ __scopeTooltip: t,
3722
+ delayDuration: n = qa,
3723
+ skipDelayDuration: r = 300,
3724
+ disableHoverableContent: o = !1,
3725
+ children: i
3726
+ } = e, s = c.useRef(!0), a = c.useRef(!1), l = c.useRef(0);
3727
+ return c.useEffect(() => {
3728
+ const u = l.current;
3729
+ return () => window.clearTimeout(u);
3730
+ }, []), /* @__PURE__ */ g.jsx(
3731
+ Za,
3732
+ {
3733
+ scope: t,
3734
+ isOpenDelayedRef: s,
3735
+ delayDuration: n,
3736
+ onOpen: c.useCallback(() => {
3737
+ window.clearTimeout(l.current), s.current = !1;
3738
+ }, []),
3739
+ onClose: c.useCallback(() => {
3740
+ window.clearTimeout(l.current), l.current = window.setTimeout(
3741
+ () => s.current = !0,
3742
+ r
3743
+ );
3744
+ }, [r]),
3745
+ isPointerInTransitRef: a,
3746
+ onPointerInTransitChange: c.useCallback((u) => {
3747
+ a.current = u;
3748
+ }, []),
3749
+ disableHoverableContent: o,
3750
+ children: i
3751
+ }
3752
+ );
3753
+ };
3754
+ Kr.displayName = Xr;
3755
+ var He = "Tooltip", [Ja, ze] = bt(He), qr = (e) => {
3756
+ const {
3757
+ __scopeTooltip: t,
3758
+ children: n,
3759
+ open: r,
3760
+ defaultOpen: o,
3761
+ onOpenChange: i,
3762
+ disableHoverableContent: s,
3763
+ delayDuration: a
3764
+ } = e, l = cn(He, e.__scopeTooltip), u = Ct(t), [f, d] = c.useState(null), p = $e(), h = c.useRef(0), v = s ?? l.disableHoverableContent, m = a ?? l.delayDuration, y = c.useRef(!1), [w, b] = Ut({
3765
+ prop: r,
3766
+ defaultProp: o ?? !1,
3767
+ onChange: (P) => {
3768
+ P ? (l.onOpen(), document.dispatchEvent(new CustomEvent(Ft))) : l.onClose(), i?.(P);
3769
+ },
3770
+ caller: He
3771
+ }), C = c.useMemo(() => w ? y.current ? "delayed-open" : "instant-open" : "closed", [w]), R = c.useCallback(() => {
3772
+ window.clearTimeout(h.current), h.current = 0, y.current = !1, b(!0);
3773
+ }, [b]), E = c.useCallback(() => {
3774
+ window.clearTimeout(h.current), h.current = 0, b(!1);
3775
+ }, [b]), O = c.useCallback(() => {
3776
+ window.clearTimeout(h.current), h.current = window.setTimeout(() => {
3777
+ y.current = !0, b(!0), h.current = 0;
3778
+ }, m);
3779
+ }, [m, b]);
3780
+ return c.useEffect(() => () => {
3781
+ h.current && (window.clearTimeout(h.current), h.current = 0);
3782
+ }, []), /* @__PURE__ */ g.jsx(Ir, { ...u, children: /* @__PURE__ */ g.jsx(
3783
+ Ja,
3784
+ {
3785
+ scope: t,
3786
+ contentId: p,
3787
+ open: w,
3788
+ stateAttribute: C,
3789
+ trigger: f,
3790
+ onTriggerChange: d,
3791
+ onTriggerEnter: c.useCallback(() => {
3792
+ l.isOpenDelayedRef.current ? O() : R();
3793
+ }, [l.isOpenDelayedRef, O, R]),
3794
+ onTriggerLeave: c.useCallback(() => {
3795
+ v ? E() : (window.clearTimeout(h.current), h.current = 0);
3796
+ }, [E, v]),
3797
+ onOpen: R,
3798
+ onClose: E,
3799
+ disableHoverableContent: v,
3800
+ children: n
3801
+ }
3802
+ ) });
3803
+ };
3804
+ qr.displayName = He;
3805
+ var $t = "TooltipTrigger", Zr = c.forwardRef(
3806
+ (e, t) => {
3807
+ const { __scopeTooltip: n, ...r } = e, o = ze($t, n), i = cn($t, n), s = Ct(n), a = c.useRef(null), l = K(t, a, o.onTriggerChange), u = c.useRef(!1), f = c.useRef(!1), d = c.useCallback(() => u.current = !1, []);
3808
+ return c.useEffect(() => () => document.removeEventListener("pointerup", d), [d]), /* @__PURE__ */ g.jsx(sn, { asChild: !0, ...s, children: /* @__PURE__ */ g.jsx(
3809
+ Y.button,
3810
+ {
3811
+ "aria-describedby": o.open ? o.contentId : void 0,
3812
+ "data-state": o.stateAttribute,
3813
+ ...r,
3814
+ ref: l,
3815
+ onPointerMove: H(e.onPointerMove, (p) => {
3816
+ p.pointerType !== "touch" && !f.current && !i.isPointerInTransitRef.current && (o.onTriggerEnter(), f.current = !0);
3817
+ }),
3818
+ onPointerLeave: H(e.onPointerLeave, () => {
3819
+ o.onTriggerLeave(), f.current = !1;
3820
+ }),
3821
+ onPointerDown: H(e.onPointerDown, () => {
3822
+ o.open && o.onClose(), u.current = !0, document.addEventListener("pointerup", d, { once: !0 });
3823
+ }),
3824
+ onFocus: H(e.onFocus, () => {
3825
+ u.current || o.onOpen();
3826
+ }),
3827
+ onBlur: H(e.onBlur, o.onClose),
3828
+ onClick: H(e.onClick, o.onClose)
3829
+ }
3830
+ ) });
3831
+ }
3832
+ );
3833
+ Zr.displayName = $t;
3834
+ var ln = "TooltipPortal", [Qa, ec] = bt(ln, {
3835
+ forceMount: void 0
3836
+ }), Jr = (e) => {
3837
+ const { __scopeTooltip: t, forceMount: n, children: r, container: o } = e, i = ze(ln, t);
3838
+ return /* @__PURE__ */ g.jsx(Qa, { scope: t, forceMount: n, children: /* @__PURE__ */ g.jsx(xe, { present: n || i.open, children: /* @__PURE__ */ g.jsx(dt, { asChild: !0, container: o, children: r }) }) });
3839
+ };
3840
+ Jr.displayName = ln;
3841
+ var _e = "TooltipContent", Qr = c.forwardRef(
3842
+ (e, t) => {
3843
+ const n = ec(_e, e.__scopeTooltip), { forceMount: r = n.forceMount, side: o = "top", ...i } = e, s = ze(_e, e.__scopeTooltip);
3844
+ return /* @__PURE__ */ g.jsx(xe, { present: r || s.open, children: s.disableHoverableContent ? /* @__PURE__ */ g.jsx(eo, { side: o, ...i, ref: t }) : /* @__PURE__ */ g.jsx(tc, { side: o, ...i, ref: t }) });
3845
+ }
3846
+ ), tc = c.forwardRef((e, t) => {
3847
+ const n = ze(_e, e.__scopeTooltip), r = cn(_e, e.__scopeTooltip), o = c.useRef(null), i = K(t, o), [s, a] = c.useState(null), { trigger: l, onClose: u } = n, f = o.current, { onPointerInTransitChange: d } = r, p = c.useCallback(() => {
3848
+ a(null), d(!1);
3849
+ }, [d]), h = c.useCallback(
3850
+ (v, m) => {
3851
+ const y = v.currentTarget, w = { x: v.clientX, y: v.clientY }, b = sc(w, y.getBoundingClientRect()), C = ac(w, b), R = cc(m.getBoundingClientRect()), E = uc([...C, ...R]);
3852
+ a(E), d(!0);
3853
+ },
3854
+ [d]
3855
+ );
3856
+ return c.useEffect(() => () => p(), [p]), c.useEffect(() => {
3857
+ if (l && f) {
3858
+ const v = (y) => h(y, f), m = (y) => h(y, l);
3859
+ return l.addEventListener("pointerleave", v), f.addEventListener("pointerleave", m), () => {
3860
+ l.removeEventListener("pointerleave", v), f.removeEventListener("pointerleave", m);
3861
+ };
3862
+ }
3863
+ }, [l, f, h, p]), c.useEffect(() => {
3864
+ if (s) {
3865
+ const v = (m) => {
3866
+ const y = m.target, w = { x: m.clientX, y: m.clientY }, b = l?.contains(y) || f?.contains(y), C = !lc(w, s);
3867
+ b ? p() : C && (p(), u());
3868
+ };
3869
+ return document.addEventListener("pointermove", v), () => document.removeEventListener("pointermove", v);
3870
+ }
3871
+ }, [l, f, s, u, p]), /* @__PURE__ */ g.jsx(eo, { ...e, ref: i });
3872
+ }), [nc, rc] = bt(He, { isInside: !1 }), oc = /* @__PURE__ */ Ao("TooltipContent"), eo = c.forwardRef(
3873
+ (e, t) => {
3874
+ const {
3875
+ __scopeTooltip: n,
3876
+ children: r,
3877
+ "aria-label": o,
3878
+ onEscapeKeyDown: i,
3879
+ onPointerDownOutside: s,
3880
+ ...a
3881
+ } = e, l = ze(_e, n), u = Ct(n), { onClose: f } = l;
3882
+ return c.useEffect(() => (document.addEventListener(Ft, f), () => document.removeEventListener(Ft, f)), [f]), c.useEffect(() => {
3883
+ if (l.trigger) {
3884
+ const d = (p) => {
3885
+ p.target?.contains(l.trigger) && f();
3886
+ };
3887
+ return window.addEventListener("scroll", d, { capture: !0 }), () => window.removeEventListener("scroll", d, { capture: !0 });
3888
+ }
3889
+ }, [l.trigger, f]), /* @__PURE__ */ g.jsx(
3890
+ ft,
3891
+ {
3892
+ asChild: !0,
3893
+ disableOutsidePointerEvents: !1,
3894
+ onEscapeKeyDown: i,
3895
+ onPointerDownOutside: s,
3896
+ onFocusOutside: (d) => d.preventDefault(),
3897
+ onDismiss: f,
3898
+ children: /* @__PURE__ */ g.jsxs(
3899
+ Mr,
3900
+ {
3901
+ "data-state": l.stateAttribute,
3902
+ ...u,
3903
+ ...a,
3904
+ ref: t,
3905
+ style: {
3906
+ ...a.style,
3907
+ "--radix-tooltip-content-transform-origin": "var(--radix-popper-transform-origin)",
3908
+ "--radix-tooltip-content-available-width": "var(--radix-popper-available-width)",
3909
+ "--radix-tooltip-content-available-height": "var(--radix-popper-available-height)",
3910
+ "--radix-tooltip-trigger-width": "var(--radix-popper-anchor-width)",
3911
+ "--radix-tooltip-trigger-height": "var(--radix-popper-anchor-height)"
3912
+ },
3913
+ children: [
3914
+ /* @__PURE__ */ g.jsx(oc, { children: r }),
3915
+ /* @__PURE__ */ g.jsx(nc, { scope: n, isInside: !0, children: /* @__PURE__ */ g.jsx(Ka, { id: l.contentId, role: "tooltip", children: o || r }) })
3916
+ ]
3917
+ }
3918
+ )
3919
+ }
3920
+ );
3921
+ }
3922
+ );
3923
+ Qr.displayName = _e;
3924
+ var to = "TooltipArrow", ic = c.forwardRef(
3925
+ (e, t) => {
3926
+ const { __scopeTooltip: n, ...r } = e, o = Ct(n);
3927
+ return rc(
3928
+ to,
3929
+ n
3930
+ ).isInside ? null : /* @__PURE__ */ g.jsx(jr, { ...o, ...r, ref: t });
3931
+ }
3932
+ );
3933
+ ic.displayName = to;
3934
+ function sc(e, t) {
3935
+ const n = Math.abs(t.top - e.y), r = Math.abs(t.bottom - e.y), o = Math.abs(t.right - e.x), i = Math.abs(t.left - e.x);
3936
+ switch (Math.min(n, r, o, i)) {
3937
+ case i:
3938
+ return "left";
3939
+ case o:
3940
+ return "right";
3941
+ case n:
3942
+ return "top";
3943
+ case r:
3944
+ return "bottom";
3945
+ default:
3946
+ throw new Error("unreachable");
3947
+ }
3948
+ }
3949
+ function ac(e, t, n = 5) {
3950
+ const r = [];
3951
+ switch (t) {
3952
+ case "top":
3953
+ r.push(
3954
+ { x: e.x - n, y: e.y + n },
3955
+ { x: e.x + n, y: e.y + n }
3956
+ );
3957
+ break;
3958
+ case "bottom":
3959
+ r.push(
3960
+ { x: e.x - n, y: e.y - n },
3961
+ { x: e.x + n, y: e.y - n }
3962
+ );
3963
+ break;
3964
+ case "left":
3965
+ r.push(
3966
+ { x: e.x + n, y: e.y - n },
3967
+ { x: e.x + n, y: e.y + n }
3968
+ );
3969
+ break;
3970
+ case "right":
3971
+ r.push(
3972
+ { x: e.x - n, y: e.y - n },
3973
+ { x: e.x - n, y: e.y + n }
3974
+ );
3975
+ break;
3976
+ }
3977
+ return r;
3978
+ }
3979
+ function cc(e) {
3980
+ const { top: t, right: n, bottom: r, left: o } = e;
3981
+ return [
3982
+ { x: o, y: t },
3983
+ { x: n, y: t },
3984
+ { x: n, y: r },
3985
+ { x: o, y: r }
3986
+ ];
3987
+ }
3988
+ function lc(e, t) {
3989
+ const { x: n, y: r } = e;
3990
+ let o = !1;
3991
+ for (let i = 0, s = t.length - 1; i < t.length; s = i++) {
3992
+ const a = t[i], l = t[s], u = a.x, f = a.y, d = l.x, p = l.y;
3993
+ f > r != p > r && n < (d - u) * (r - f) / (p - f) + u && (o = !o);
3994
+ }
3995
+ return o;
3996
+ }
3997
+ function uc(e) {
3998
+ const t = e.slice();
3999
+ return t.sort((n, r) => n.x < r.x ? -1 : n.x > r.x ? 1 : n.y < r.y ? -1 : n.y > r.y ? 1 : 0), fc(t);
4000
+ }
4001
+ function fc(e) {
4002
+ if (e.length <= 1) return e.slice();
4003
+ const t = [];
4004
+ for (let r = 0; r < e.length; r++) {
4005
+ const o = e[r];
4006
+ for (; t.length >= 2; ) {
4007
+ const i = t[t.length - 1], s = t[t.length - 2];
4008
+ if ((i.x - s.x) * (o.y - s.y) >= (i.y - s.y) * (o.x - s.x)) t.pop();
4009
+ else break;
4010
+ }
4011
+ t.push(o);
4012
+ }
4013
+ t.pop();
4014
+ const n = [];
4015
+ for (let r = e.length - 1; r >= 0; r--) {
4016
+ const o = e[r];
4017
+ for (; n.length >= 2; ) {
4018
+ const i = n[n.length - 1], s = n[n.length - 2];
4019
+ if ((i.x - s.x) * (o.y - s.y) >= (i.y - s.y) * (o.x - s.x)) n.pop();
4020
+ else break;
4021
+ }
4022
+ n.push(o);
4023
+ }
4024
+ return n.pop(), t.length === 1 && n.length === 1 && t[0].x === n[0].x && t[0].y === n[0].y ? t : t.concat(n);
4025
+ }
4026
+ var dc = Kr, pc = qr, hc = Zr, mc = Jr, vc = Qr;
4027
+ const gc = ["top", "right", "bottom", "left"], yc = ["start", "center", "end"];
4028
+ function xc(e) {
4029
+ const t = N(e)?.toLowerCase();
4030
+ return t && gc.includes(t) ? t : void 0;
4031
+ }
4032
+ function wc(e) {
4033
+ const t = N(e)?.toLowerCase();
4034
+ return t && yc.includes(t) ? t : void 0;
4035
+ }
4036
+ function bc() {
4037
+ const e = J(function({ node: n, context: r, className: o }) {
4038
+ const i = Z(n.props?.open), s = Z(n.props?.defaultOpen), a = be(n.props?.delayDuration), l = be(n.props?.skipDelayDuration), u = xc(n.props?.side), f = wc(n.props?.align), d = be(n.props?.sideOffset), p = be(n.props?.alignOffset), [h, v] = lt(s ?? !1), m = i !== void 0, y = m ? !!i : h;
4039
+ Wt(() => {
4040
+ !m && s !== void 0 && v(s);
4041
+ }, [s, m]);
4042
+ const w = Ht(me(n.props?.onOpenChangeId), r.dispatchAction), b = (F) => {
4043
+ m || v(F), w?.(F);
4044
+ }, { defaultChildren: C, slotChildren: R } = Vt(n), E = R.get("trigger") ?? [], O = R.get("content") ?? [], P = E.length > 0 ? r.renderChildren(E) : void 0, A = [];
4045
+ if (O.length > 0 && A.push(/* @__PURE__ */ g.jsx(ue, { children: r.renderChildren(O) }, "content")), C.length > 0 && A.push(/* @__PURE__ */ g.jsx(ue, { children: r.renderChildren(C) }, "default")), !P)
4046
+ return null;
4047
+ const _ = z("radix-tooltip__content", rt(n.props?.contentStyleIds)), D = z("radix-tooltip", o, N(n.props?.className)), M = Q(
4048
+ n.props,
4049
+ /* @__PURE__ */ new Set([
4050
+ "open",
4051
+ "defaultOpen",
4052
+ "delayDuration",
4053
+ "skipDelayDuration",
4054
+ "onOpenChangeId",
4055
+ "contentStyleIds",
4056
+ "className",
4057
+ "side",
4058
+ "align",
4059
+ "sideOffset",
4060
+ "alignOffset"
4061
+ ])
4062
+ );
4063
+ return /* @__PURE__ */ g.jsx(
4064
+ "span",
4065
+ {
4066
+ ...M,
4067
+ "data-ikon-element-id": n.id,
4068
+ className: D,
4069
+ "data-state": y ? "open" : "closed",
4070
+ children: /* @__PURE__ */ g.jsx(dc, { delayDuration: a, skipDelayDuration: l, children: /* @__PURE__ */ g.jsxs(pc, { open: m ? i : void 0, defaultOpen: s, onOpenChange: b, children: [
4071
+ /* @__PURE__ */ g.jsx(hc, { asChild: !0, children: /* @__PURE__ */ g.jsx(ue, { children: P }) }),
4072
+ /* @__PURE__ */ g.jsx(mc, { children: /* @__PURE__ */ g.jsx(
4073
+ vc,
4074
+ {
4075
+ className: _,
4076
+ side: u,
4077
+ align: f,
4078
+ sideOffset: d,
4079
+ alignOffset: p,
4080
+ children: A
4081
+ }
4082
+ ) })
4083
+ ] }) })
4084
+ }
4085
+ );
416
4086
  });
417
- return (o) => {
418
- if (o.type === "radix-text-field")
419
- return i;
4087
+ return (t) => {
4088
+ if (t.type === "radix-tooltip")
4089
+ return e;
420
4090
  };
421
4091
  }
422
- const ke = "radix", Pe = () => Ae();
423
- function je(r) {
424
- r.registerModule(ke, Pe);
4092
+ const Cc = "radix", Rc = () => Ec();
4093
+ function Tc(e) {
4094
+ e.registerModule(Cc, Rc);
425
4095
  }
426
- function Ae() {
427
- return [Ee(), Te(), _e(), ge(), we(), ye()];
4096
+ function Ec() {
4097
+ return [
4098
+ yo(),
4099
+ xo(),
4100
+ ts(),
4101
+ ns(),
4102
+ rs(),
4103
+ os(),
4104
+ Ha(),
4105
+ Ua(),
4106
+ za(),
4107
+ Va(),
4108
+ Ya(),
4109
+ bc()
4110
+ ];
428
4111
  }
429
4112
  export {
430
- ke as IKON_UI_RADIX_MODULE,
431
- N as combineClassNames,
432
- Ee as createRadixBoxResolver,
433
- Te as createRadixButtonResolver,
434
- _e as createRadixHeadingResolver,
435
- Ae as createRadixResolvers,
436
- ge as createRadixTextAreaResolver,
437
- we as createRadixTextFieldResolver,
438
- ye as createRadixTextResolver,
439
- H as createStringDispatcher,
440
- G as createVoidDispatcher,
441
- Pe as loadRadixModule,
442
- P as pickPrimitiveProps,
443
- je as registerRadixModule,
444
- j as toActionId,
445
- F as toBooleanValue,
446
- he as toNumberValue,
447
- x as toStringValue
4113
+ Cc as IKON_UI_RADIX_MODULE,
4114
+ Vt as collectSlotChildren,
4115
+ z as combineClassNames,
4116
+ Ht as createNullableBooleanDispatcher,
4117
+ yo as createRadixBoxResolver,
4118
+ xo as createRadixButtonResolver,
4119
+ ts as createRadixDialogResolver,
4120
+ ns as createRadixHeadingResolver,
4121
+ os as createRadixIconButtonResolver,
4122
+ rs as createRadixIconResolver,
4123
+ Ha as createRadixPopoverResolver,
4124
+ Ec as createRadixResolvers,
4125
+ Ua as createRadixTextAreaResolver,
4126
+ za as createRadixTextFieldResolver,
4127
+ Va as createRadixTextResolver,
4128
+ Ya as createRadixThemeResolver,
4129
+ bc as createRadixTooltipResolver,
4130
+ Fn as createStringDispatcher,
4131
+ Bt as createVoidDispatcher,
4132
+ Rc as loadRadixModule,
4133
+ Q as pickPrimitiveProps,
4134
+ Tc as registerRadixModule,
4135
+ me as toActionId,
4136
+ Z as toBooleanValue,
4137
+ be as toNumberValue,
4138
+ N as toStringValue,
4139
+ rt as toStyleIdList
448
4140
  };