@notificationapi/react 1.8.0 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,122 +1,1519 @@
1
- import * as f from "react";
2
- import { P as n } from "./createTheme.js";
3
- import { a as V, u as W } from "./ButtonBase.js";
4
- import { jsx as k } from "react/jsx-runtime";
5
- import { T as B, r as J, g as v } from "./utils.js";
6
- import { u as M } from "./resolveComponentProps.js";
7
- import { g as Q, e as U } from "./Portal.js";
8
- function h(l) {
9
- return `scale(${l}, ${l ** 2})`;
10
- }
11
- const X = {
1
+ import { u as Tt } from "./index.js";
2
+ import { g as At, P as i } from "./createTheme.js";
3
+ import * as k from "react";
4
+ import { g as jt, a as Dt, s as Ct, u as Mt } from "./DefaultPropsProvider.js";
5
+ import { jsx as ce } from "react/jsx-runtime";
6
+ import { o as Qe, P as Bt, H as we, g as $t, e as St } from "./Portal.js";
7
+ import { c as kt, r as ft, f as Ze, b as Lt, u as Wt } from "./ButtonBase.js";
8
+ import { u as Ce } from "./resolveComponentProps.js";
9
+ import { u as Ht } from "./useSlotProps.js";
10
+ import { T as Nt, a as Vt, g as _e } from "./utils.js";
11
+ var W = "top", U = "bottom", q = "right", H = "left", ke = "auto", de = [W, U, q, H], te = "start", le = "end", Ut = "clippingParents", ct = "viewport", se = "popper", qt = "reference", et = /* @__PURE__ */ de.reduce(function(e, t) {
12
+ return e.concat([t + "-" + te, t + "-" + le]);
13
+ }, []), lt = /* @__PURE__ */ [].concat(de, [ke]).reduce(function(e, t) {
14
+ return e.concat([t, t + "-" + te, t + "-" + le]);
15
+ }, []), Ft = "beforeRead", It = "read", Xt = "afterRead", Yt = "beforeMain", zt = "main", Gt = "afterMain", Kt = "beforeWrite", Jt = "write", Qt = "afterWrite", Zt = [Ft, It, Xt, Yt, zt, Gt, Kt, Jt, Qt];
16
+ function Y(e) {
17
+ return e ? (e.nodeName || "").toLowerCase() : null;
18
+ }
19
+ function N(e) {
20
+ if (e == null)
21
+ return window;
22
+ if (e.toString() !== "[object Window]") {
23
+ var t = e.ownerDocument;
24
+ return t && t.defaultView || window;
25
+ }
26
+ return e;
27
+ }
28
+ function _(e) {
29
+ var t = N(e).Element;
30
+ return e instanceof t || e instanceof Element;
31
+ }
32
+ function V(e) {
33
+ var t = N(e).HTMLElement;
34
+ return e instanceof t || e instanceof HTMLElement;
35
+ }
36
+ function Le(e) {
37
+ if (typeof ShadowRoot > "u")
38
+ return !1;
39
+ var t = N(e).ShadowRoot;
40
+ return e instanceof t || e instanceof ShadowRoot;
41
+ }
42
+ function _t(e) {
43
+ var t = e.state;
44
+ Object.keys(t.elements).forEach(function(r) {
45
+ var n = t.styles[r] || {}, o = t.attributes[r] || {}, s = t.elements[r];
46
+ !V(s) || !Y(s) || (Object.assign(s.style, n), Object.keys(o).forEach(function(c) {
47
+ var a = o[c];
48
+ a === !1 ? s.removeAttribute(c) : s.setAttribute(c, a === !0 ? "" : a);
49
+ }));
50
+ });
51
+ }
52
+ function er(e) {
53
+ var t = e.state, r = {
54
+ popper: {
55
+ position: t.options.strategy,
56
+ left: "0",
57
+ top: "0",
58
+ margin: "0"
59
+ },
60
+ arrow: {
61
+ position: "absolute"
62
+ },
63
+ reference: {}
64
+ };
65
+ return Object.assign(t.elements.popper.style, r.popper), t.styles = r, t.elements.arrow && Object.assign(t.elements.arrow.style, r.arrow), function() {
66
+ Object.keys(t.elements).forEach(function(n) {
67
+ var o = t.elements[n], s = t.attributes[n] || {}, c = Object.keys(t.styles.hasOwnProperty(n) ? t.styles[n] : r[n]), a = c.reduce(function(p, l) {
68
+ return p[l] = "", p;
69
+ }, {});
70
+ !V(o) || !Y(o) || (Object.assign(o.style, a), Object.keys(s).forEach(function(p) {
71
+ o.removeAttribute(p);
72
+ }));
73
+ });
74
+ };
75
+ }
76
+ const tr = {
77
+ name: "applyStyles",
78
+ enabled: !0,
79
+ phase: "write",
80
+ fn: _t,
81
+ effect: er,
82
+ requires: ["computeStyles"]
83
+ };
84
+ function X(e) {
85
+ return e.split("-")[0];
86
+ }
87
+ var Z = Math.max, xe = Math.min, re = Math.round;
88
+ function Me() {
89
+ var e = navigator.userAgentData;
90
+ return e != null && e.brands && Array.isArray(e.brands) ? e.brands.map(function(t) {
91
+ return t.brand + "/" + t.version;
92
+ }).join(" ") : navigator.userAgent;
93
+ }
94
+ function ut() {
95
+ return !/^((?!chrome|android).)*safari/i.test(Me());
96
+ }
97
+ function ne(e, t, r) {
98
+ t === void 0 && (t = !1), r === void 0 && (r = !1);
99
+ var n = e.getBoundingClientRect(), o = 1, s = 1;
100
+ t && V(e) && (o = e.offsetWidth > 0 && re(n.width) / e.offsetWidth || 1, s = e.offsetHeight > 0 && re(n.height) / e.offsetHeight || 1);
101
+ var c = _(e) ? N(e) : window, a = c.visualViewport, p = !ut() && r, l = (n.left + (p && a ? a.offsetLeft : 0)) / o, f = (n.top + (p && a ? a.offsetTop : 0)) / s, g = n.width / o, O = n.height / s;
102
+ return {
103
+ width: g,
104
+ height: O,
105
+ top: f,
106
+ right: l + g,
107
+ bottom: f + O,
108
+ left: l,
109
+ x: l,
110
+ y: f
111
+ };
112
+ }
113
+ function We(e) {
114
+ var t = ne(e), r = e.offsetWidth, n = e.offsetHeight;
115
+ return Math.abs(t.width - r) <= 1 && (r = t.width), Math.abs(t.height - n) <= 1 && (n = t.height), {
116
+ x: e.offsetLeft,
117
+ y: e.offsetTop,
118
+ width: r,
119
+ height: n
120
+ };
121
+ }
122
+ function dt(e, t) {
123
+ var r = t.getRootNode && t.getRootNode();
124
+ if (e.contains(t))
125
+ return !0;
126
+ if (r && Le(r)) {
127
+ var n = t;
128
+ do {
129
+ if (n && e.isSameNode(n))
130
+ return !0;
131
+ n = n.parentNode || n.host;
132
+ } while (n);
133
+ }
134
+ return !1;
135
+ }
136
+ function z(e) {
137
+ return N(e).getComputedStyle(e);
138
+ }
139
+ function rr(e) {
140
+ return ["table", "td", "th"].indexOf(Y(e)) >= 0;
141
+ }
142
+ function K(e) {
143
+ return ((_(e) ? e.ownerDocument : (
144
+ // $FlowFixMe[prop-missing]
145
+ e.document
146
+ )) || window.document).documentElement;
147
+ }
148
+ function Ee(e) {
149
+ return Y(e) === "html" ? e : (
150
+ // this is a quicker (but less type safe) way to save quite some bytes from the bundle
151
+ // $FlowFixMe[incompatible-return]
152
+ // $FlowFixMe[prop-missing]
153
+ e.assignedSlot || // step into the shadow DOM of the parent of a slotted node
154
+ e.parentNode || // DOM Element detected
155
+ (Le(e) ? e.host : null) || // ShadowRoot detected
156
+ // $FlowFixMe[incompatible-call]: HTMLElement is a Node
157
+ K(e)
158
+ );
159
+ }
160
+ function tt(e) {
161
+ return !V(e) || // https://github.com/popperjs/popper-core/issues/837
162
+ z(e).position === "fixed" ? null : e.offsetParent;
163
+ }
164
+ function nr(e) {
165
+ var t = /firefox/i.test(Me()), r = /Trident/i.test(Me());
166
+ if (r && V(e)) {
167
+ var n = z(e);
168
+ if (n.position === "fixed")
169
+ return null;
170
+ }
171
+ var o = Ee(e);
172
+ for (Le(o) && (o = o.host); V(o) && ["html", "body"].indexOf(Y(o)) < 0; ) {
173
+ var s = z(o);
174
+ if (s.transform !== "none" || s.perspective !== "none" || s.contain === "paint" || ["transform", "perspective"].indexOf(s.willChange) !== -1 || t && s.willChange === "filter" || t && s.filter && s.filter !== "none")
175
+ return o;
176
+ o = o.parentNode;
177
+ }
178
+ return null;
179
+ }
180
+ function ve(e) {
181
+ for (var t = N(e), r = tt(e); r && rr(r) && z(r).position === "static"; )
182
+ r = tt(r);
183
+ return r && (Y(r) === "html" || Y(r) === "body" && z(r).position === "static") ? t : r || nr(e) || t;
184
+ }
185
+ function He(e) {
186
+ return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
187
+ }
188
+ function pe(e, t, r) {
189
+ return Z(e, xe(t, r));
190
+ }
191
+ function or(e, t, r) {
192
+ var n = pe(e, t, r);
193
+ return n > r ? r : n;
194
+ }
195
+ function vt() {
196
+ return {
197
+ top: 0,
198
+ right: 0,
199
+ bottom: 0,
200
+ left: 0
201
+ };
202
+ }
203
+ function mt(e) {
204
+ return Object.assign({}, vt(), e);
205
+ }
206
+ function ht(e, t) {
207
+ return t.reduce(function(r, n) {
208
+ return r[n] = e, r;
209
+ }, {});
210
+ }
211
+ var ir = function(t, r) {
212
+ return t = typeof t == "function" ? t(Object.assign({}, r.rects, {
213
+ placement: r.placement
214
+ })) : t, mt(typeof t != "number" ? t : ht(t, de));
215
+ };
216
+ function ar(e) {
217
+ var t, r = e.state, n = e.name, o = e.options, s = r.elements.arrow, c = r.modifiersData.popperOffsets, a = X(r.placement), p = He(a), l = [H, q].indexOf(a) >= 0, f = l ? "height" : "width";
218
+ if (!(!s || !c)) {
219
+ var g = ir(o.padding, r), O = We(s), d = p === "y" ? W : H, w = p === "y" ? U : q, v = r.rects.reference[f] + r.rects.reference[p] - c[p] - r.rects.popper[f], h = c[p] - r.rects.reference[p], E = ve(s), P = E ? p === "y" ? E.clientHeight || 0 : E.clientWidth || 0 : 0, b = v / 2 - h / 2, u = g[d], m = P - O[f] - g[w], y = P / 2 - O[f] / 2 + b, x = pe(u, y, m), C = p;
220
+ r.modifiersData[n] = (t = {}, t[C] = x, t.centerOffset = x - y, t);
221
+ }
222
+ }
223
+ function sr(e) {
224
+ var t = e.state, r = e.options, n = r.element, o = n === void 0 ? "[data-popper-arrow]" : n;
225
+ o != null && (typeof o == "string" && (o = t.elements.popper.querySelector(o), !o) || dt(t.elements.popper, o) && (t.elements.arrow = o));
226
+ }
227
+ const pr = {
228
+ name: "arrow",
229
+ enabled: !0,
230
+ phase: "main",
231
+ fn: ar,
232
+ effect: sr,
233
+ requires: ["popperOffsets"],
234
+ requiresIfExists: ["preventOverflow"]
235
+ };
236
+ function oe(e) {
237
+ return e.split("-")[1];
238
+ }
239
+ var fr = {
240
+ top: "auto",
241
+ right: "auto",
242
+ bottom: "auto",
243
+ left: "auto"
244
+ };
245
+ function cr(e, t) {
246
+ var r = e.x, n = e.y, o = t.devicePixelRatio || 1;
247
+ return {
248
+ x: re(r * o) / o || 0,
249
+ y: re(n * o) / o || 0
250
+ };
251
+ }
252
+ function rt(e) {
253
+ var t, r = e.popper, n = e.popperRect, o = e.placement, s = e.variation, c = e.offsets, a = e.position, p = e.gpuAcceleration, l = e.adaptive, f = e.roundOffsets, g = e.isFixed, O = c.x, d = O === void 0 ? 0 : O, w = c.y, v = w === void 0 ? 0 : w, h = typeof f == "function" ? f({
254
+ x: d,
255
+ y: v
256
+ }) : {
257
+ x: d,
258
+ y: v
259
+ };
260
+ d = h.x, v = h.y;
261
+ var E = c.hasOwnProperty("x"), P = c.hasOwnProperty("y"), b = H, u = W, m = window;
262
+ if (l) {
263
+ var y = ve(r), x = "clientHeight", C = "clientWidth";
264
+ if (y === N(r) && (y = K(r), z(y).position !== "static" && a === "absolute" && (x = "scrollHeight", C = "scrollWidth")), y = y, o === W || (o === H || o === q) && s === le) {
265
+ u = U;
266
+ var R = g && y === m && m.visualViewport ? m.visualViewport.height : (
267
+ // $FlowFixMe[prop-missing]
268
+ y[x]
269
+ );
270
+ v -= R - n.height, v *= p ? 1 : -1;
271
+ }
272
+ if (o === H || (o === W || o === U) && s === le) {
273
+ b = q;
274
+ var A = g && y === m && m.visualViewport ? m.visualViewport.width : (
275
+ // $FlowFixMe[prop-missing]
276
+ y[C]
277
+ );
278
+ d -= A - n.width, d *= p ? 1 : -1;
279
+ }
280
+ }
281
+ var M = Object.assign({
282
+ position: a
283
+ }, l && fr), L = f === !0 ? cr({
284
+ x: d,
285
+ y: v
286
+ }, N(r)) : {
287
+ x: d,
288
+ y: v
289
+ };
290
+ if (d = L.x, v = L.y, p) {
291
+ var B;
292
+ return Object.assign({}, M, (B = {}, B[u] = P ? "0" : "", B[b] = E ? "0" : "", B.transform = (m.devicePixelRatio || 1) <= 1 ? "translate(" + d + "px, " + v + "px)" : "translate3d(" + d + "px, " + v + "px, 0)", B));
293
+ }
294
+ return Object.assign({}, M, (t = {}, t[u] = P ? v + "px" : "", t[b] = E ? d + "px" : "", t.transform = "", t));
295
+ }
296
+ function lr(e) {
297
+ var t = e.state, r = e.options, n = r.gpuAcceleration, o = n === void 0 ? !0 : n, s = r.adaptive, c = s === void 0 ? !0 : s, a = r.roundOffsets, p = a === void 0 ? !0 : a, l = {
298
+ placement: X(t.placement),
299
+ variation: oe(t.placement),
300
+ popper: t.elements.popper,
301
+ popperRect: t.rects.popper,
302
+ gpuAcceleration: o,
303
+ isFixed: t.options.strategy === "fixed"
304
+ };
305
+ t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, rt(Object.assign({}, l, {
306
+ offsets: t.modifiersData.popperOffsets,
307
+ position: t.options.strategy,
308
+ adaptive: c,
309
+ roundOffsets: p
310
+ })))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, rt(Object.assign({}, l, {
311
+ offsets: t.modifiersData.arrow,
312
+ position: "absolute",
313
+ adaptive: !1,
314
+ roundOffsets: p
315
+ })))), t.attributes.popper = Object.assign({}, t.attributes.popper, {
316
+ "data-popper-placement": t.placement
317
+ });
318
+ }
319
+ const ur = {
320
+ name: "computeStyles",
321
+ enabled: !0,
322
+ phase: "beforeWrite",
323
+ fn: lr,
324
+ data: {}
325
+ };
326
+ var ye = {
327
+ passive: !0
328
+ };
329
+ function dr(e) {
330
+ var t = e.state, r = e.instance, n = e.options, o = n.scroll, s = o === void 0 ? !0 : o, c = n.resize, a = c === void 0 ? !0 : c, p = N(t.elements.popper), l = [].concat(t.scrollParents.reference, t.scrollParents.popper);
331
+ return s && l.forEach(function(f) {
332
+ f.addEventListener("scroll", r.update, ye);
333
+ }), a && p.addEventListener("resize", r.update, ye), function() {
334
+ s && l.forEach(function(f) {
335
+ f.removeEventListener("scroll", r.update, ye);
336
+ }), a && p.removeEventListener("resize", r.update, ye);
337
+ };
338
+ }
339
+ const vr = {
340
+ name: "eventListeners",
341
+ enabled: !0,
342
+ phase: "write",
343
+ fn: function() {
344
+ },
345
+ effect: dr,
346
+ data: {}
347
+ };
348
+ var mr = {
349
+ left: "right",
350
+ right: "left",
351
+ bottom: "top",
352
+ top: "bottom"
353
+ };
354
+ function be(e) {
355
+ return e.replace(/left|right|bottom|top/g, function(t) {
356
+ return mr[t];
357
+ });
358
+ }
359
+ var hr = {
360
+ start: "end",
361
+ end: "start"
362
+ };
363
+ function nt(e) {
364
+ return e.replace(/start|end/g, function(t) {
365
+ return hr[t];
366
+ });
367
+ }
368
+ function Ne(e) {
369
+ var t = N(e), r = t.pageXOffset, n = t.pageYOffset;
370
+ return {
371
+ scrollLeft: r,
372
+ scrollTop: n
373
+ };
374
+ }
375
+ function Ve(e) {
376
+ return ne(K(e)).left + Ne(e).scrollLeft;
377
+ }
378
+ function gr(e, t) {
379
+ var r = N(e), n = K(e), o = r.visualViewport, s = n.clientWidth, c = n.clientHeight, a = 0, p = 0;
380
+ if (o) {
381
+ s = o.width, c = o.height;
382
+ var l = ut();
383
+ (l || !l && t === "fixed") && (a = o.offsetLeft, p = o.offsetTop);
384
+ }
385
+ return {
386
+ width: s,
387
+ height: c,
388
+ x: a + Ve(e),
389
+ y: p
390
+ };
391
+ }
392
+ function yr(e) {
393
+ var t, r = K(e), n = Ne(e), o = (t = e.ownerDocument) == null ? void 0 : t.body, s = Z(r.scrollWidth, r.clientWidth, o ? o.scrollWidth : 0, o ? o.clientWidth : 0), c = Z(r.scrollHeight, r.clientHeight, o ? o.scrollHeight : 0, o ? o.clientHeight : 0), a = -n.scrollLeft + Ve(e), p = -n.scrollTop;
394
+ return z(o || r).direction === "rtl" && (a += Z(r.clientWidth, o ? o.clientWidth : 0) - s), {
395
+ width: s,
396
+ height: c,
397
+ x: a,
398
+ y: p
399
+ };
400
+ }
401
+ function Ue(e) {
402
+ var t = z(e), r = t.overflow, n = t.overflowX, o = t.overflowY;
403
+ return /auto|scroll|overlay|hidden/.test(r + o + n);
404
+ }
405
+ function gt(e) {
406
+ return ["html", "body", "#document"].indexOf(Y(e)) >= 0 ? e.ownerDocument.body : V(e) && Ue(e) ? e : gt(Ee(e));
407
+ }
408
+ function fe(e, t) {
409
+ var r;
410
+ t === void 0 && (t = []);
411
+ var n = gt(e), o = n === ((r = e.ownerDocument) == null ? void 0 : r.body), s = N(n), c = o ? [s].concat(s.visualViewport || [], Ue(n) ? n : []) : n, a = t.concat(c);
412
+ return o ? a : (
413
+ // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
414
+ a.concat(fe(Ee(c)))
415
+ );
416
+ }
417
+ function Be(e) {
418
+ return Object.assign({}, e, {
419
+ left: e.x,
420
+ top: e.y,
421
+ right: e.x + e.width,
422
+ bottom: e.y + e.height
423
+ });
424
+ }
425
+ function br(e, t) {
426
+ var r = ne(e, !1, t === "fixed");
427
+ return r.top = r.top + e.clientTop, r.left = r.left + e.clientLeft, r.bottom = r.top + e.clientHeight, r.right = r.left + e.clientWidth, r.width = e.clientWidth, r.height = e.clientHeight, r.x = r.left, r.y = r.top, r;
428
+ }
429
+ function ot(e, t, r) {
430
+ return t === ct ? Be(gr(e, r)) : _(t) ? br(t, r) : Be(yr(K(e)));
431
+ }
432
+ function wr(e) {
433
+ var t = fe(Ee(e)), r = ["absolute", "fixed"].indexOf(z(e).position) >= 0, n = r && V(e) ? ve(e) : e;
434
+ return _(n) ? t.filter(function(o) {
435
+ return _(o) && dt(o, n) && Y(o) !== "body";
436
+ }) : [];
437
+ }
438
+ function xr(e, t, r, n) {
439
+ var o = t === "clippingParents" ? wr(e) : [].concat(t), s = [].concat(o, [r]), c = s[0], a = s.reduce(function(p, l) {
440
+ var f = ot(e, l, n);
441
+ return p.top = Z(f.top, p.top), p.right = xe(f.right, p.right), p.bottom = xe(f.bottom, p.bottom), p.left = Z(f.left, p.left), p;
442
+ }, ot(e, c, n));
443
+ return a.width = a.right - a.left, a.height = a.bottom - a.top, a.x = a.left, a.y = a.top, a;
444
+ }
445
+ function yt(e) {
446
+ var t = e.reference, r = e.element, n = e.placement, o = n ? X(n) : null, s = n ? oe(n) : null, c = t.x + t.width / 2 - r.width / 2, a = t.y + t.height / 2 - r.height / 2, p;
447
+ switch (o) {
448
+ case W:
449
+ p = {
450
+ x: c,
451
+ y: t.y - r.height
452
+ };
453
+ break;
454
+ case U:
455
+ p = {
456
+ x: c,
457
+ y: t.y + t.height
458
+ };
459
+ break;
460
+ case q:
461
+ p = {
462
+ x: t.x + t.width,
463
+ y: a
464
+ };
465
+ break;
466
+ case H:
467
+ p = {
468
+ x: t.x - r.width,
469
+ y: a
470
+ };
471
+ break;
472
+ default:
473
+ p = {
474
+ x: t.x,
475
+ y: t.y
476
+ };
477
+ }
478
+ var l = o ? He(o) : null;
479
+ if (l != null) {
480
+ var f = l === "y" ? "height" : "width";
481
+ switch (s) {
482
+ case te:
483
+ p[l] = p[l] - (t[f] / 2 - r[f] / 2);
484
+ break;
485
+ case le:
486
+ p[l] = p[l] + (t[f] / 2 - r[f] / 2);
487
+ break;
488
+ }
489
+ }
490
+ return p;
491
+ }
492
+ function ue(e, t) {
493
+ t === void 0 && (t = {});
494
+ var r = t, n = r.placement, o = n === void 0 ? e.placement : n, s = r.strategy, c = s === void 0 ? e.strategy : s, a = r.boundary, p = a === void 0 ? Ut : a, l = r.rootBoundary, f = l === void 0 ? ct : l, g = r.elementContext, O = g === void 0 ? se : g, d = r.altBoundary, w = d === void 0 ? !1 : d, v = r.padding, h = v === void 0 ? 0 : v, E = mt(typeof h != "number" ? h : ht(h, de)), P = O === se ? qt : se, b = e.rects.popper, u = e.elements[w ? P : O], m = xr(_(u) ? u : u.contextElement || K(e.elements.popper), p, f, c), y = ne(e.elements.reference), x = yt({
495
+ reference: y,
496
+ element: b,
497
+ strategy: "absolute",
498
+ placement: o
499
+ }), C = Be(Object.assign({}, b, x)), R = O === se ? C : y, A = {
500
+ top: m.top - R.top + E.top,
501
+ bottom: R.bottom - m.bottom + E.bottom,
502
+ left: m.left - R.left + E.left,
503
+ right: R.right - m.right + E.right
504
+ }, M = e.modifiersData.offset;
505
+ if (O === se && M) {
506
+ var L = M[o];
507
+ Object.keys(A).forEach(function(B) {
508
+ var I = [q, U].indexOf(B) >= 0 ? 1 : -1, T = [W, U].indexOf(B) >= 0 ? "y" : "x";
509
+ A[B] += L[T] * I;
510
+ });
511
+ }
512
+ return A;
513
+ }
514
+ function Or(e, t) {
515
+ t === void 0 && (t = {});
516
+ var r = t, n = r.placement, o = r.boundary, s = r.rootBoundary, c = r.padding, a = r.flipVariations, p = r.allowedAutoPlacements, l = p === void 0 ? lt : p, f = oe(n), g = f ? a ? et : et.filter(function(w) {
517
+ return oe(w) === f;
518
+ }) : de, O = g.filter(function(w) {
519
+ return l.indexOf(w) >= 0;
520
+ });
521
+ O.length === 0 && (O = g);
522
+ var d = O.reduce(function(w, v) {
523
+ return w[v] = ue(e, {
524
+ placement: v,
525
+ boundary: o,
526
+ rootBoundary: s,
527
+ padding: c
528
+ })[X(v)], w;
529
+ }, {});
530
+ return Object.keys(d).sort(function(w, v) {
531
+ return d[w] - d[v];
532
+ });
533
+ }
534
+ function Er(e) {
535
+ if (X(e) === ke)
536
+ return [];
537
+ var t = be(e);
538
+ return [nt(e), t, nt(t)];
539
+ }
540
+ function Pr(e) {
541
+ var t = e.state, r = e.options, n = e.name;
542
+ if (!t.modifiersData[n]._skip) {
543
+ for (var o = r.mainAxis, s = o === void 0 ? !0 : o, c = r.altAxis, a = c === void 0 ? !0 : c, p = r.fallbackPlacements, l = r.padding, f = r.boundary, g = r.rootBoundary, O = r.altBoundary, d = r.flipVariations, w = d === void 0 ? !0 : d, v = r.allowedAutoPlacements, h = t.options.placement, E = X(h), P = E === h, b = p || (P || !w ? [be(h)] : Er(h)), u = [h].concat(b).reduce(function(ee, G) {
544
+ return ee.concat(X(G) === ke ? Or(t, {
545
+ placement: G,
546
+ boundary: f,
547
+ rootBoundary: g,
548
+ padding: l,
549
+ flipVariations: w,
550
+ allowedAutoPlacements: v
551
+ }) : G);
552
+ }, []), m = t.rects.reference, y = t.rects.popper, x = /* @__PURE__ */ new Map(), C = !0, R = u[0], A = 0; A < u.length; A++) {
553
+ var M = u[A], L = X(M), B = oe(M) === te, I = [W, U].indexOf(L) >= 0, T = I ? "width" : "height", j = ue(t, {
554
+ placement: M,
555
+ boundary: f,
556
+ rootBoundary: g,
557
+ altBoundary: O,
558
+ padding: l
559
+ }), D = I ? B ? q : H : B ? U : W;
560
+ m[T] > y[T] && (D = be(D));
561
+ var $ = be(D), S = [];
562
+ if (s && S.push(j[L] <= 0), a && S.push(j[D] <= 0, j[$] <= 0), S.every(function(ee) {
563
+ return ee;
564
+ })) {
565
+ R = M, C = !1;
566
+ break;
567
+ }
568
+ x.set(M, S);
569
+ }
570
+ if (C)
571
+ for (var F = w ? 3 : 1, Re = function(G) {
572
+ var ae = u.find(function(he) {
573
+ var J = x.get(he);
574
+ if (J)
575
+ return J.slice(0, G).every(function(Te) {
576
+ return Te;
577
+ });
578
+ });
579
+ if (ae)
580
+ return R = ae, "break";
581
+ }, ie = F; ie > 0; ie--) {
582
+ var me = Re(ie);
583
+ if (me === "break") break;
584
+ }
585
+ t.placement !== R && (t.modifiersData[n]._skip = !0, t.placement = R, t.reset = !0);
586
+ }
587
+ }
588
+ const Rr = {
589
+ name: "flip",
590
+ enabled: !0,
591
+ phase: "main",
592
+ fn: Pr,
593
+ requiresIfExists: ["offset"],
594
+ data: {
595
+ _skip: !1
596
+ }
597
+ };
598
+ function it(e, t, r) {
599
+ return r === void 0 && (r = {
600
+ x: 0,
601
+ y: 0
602
+ }), {
603
+ top: e.top - t.height - r.y,
604
+ right: e.right - t.width + r.x,
605
+ bottom: e.bottom - t.height + r.y,
606
+ left: e.left - t.width - r.x
607
+ };
608
+ }
609
+ function at(e) {
610
+ return [W, q, U, H].some(function(t) {
611
+ return e[t] >= 0;
612
+ });
613
+ }
614
+ function Tr(e) {
615
+ var t = e.state, r = e.name, n = t.rects.reference, o = t.rects.popper, s = t.modifiersData.preventOverflow, c = ue(t, {
616
+ elementContext: "reference"
617
+ }), a = ue(t, {
618
+ altBoundary: !0
619
+ }), p = it(c, n), l = it(a, o, s), f = at(p), g = at(l);
620
+ t.modifiersData[r] = {
621
+ referenceClippingOffsets: p,
622
+ popperEscapeOffsets: l,
623
+ isReferenceHidden: f,
624
+ hasPopperEscaped: g
625
+ }, t.attributes.popper = Object.assign({}, t.attributes.popper, {
626
+ "data-popper-reference-hidden": f,
627
+ "data-popper-escaped": g
628
+ });
629
+ }
630
+ const Ar = {
631
+ name: "hide",
632
+ enabled: !0,
633
+ phase: "main",
634
+ requiresIfExists: ["preventOverflow"],
635
+ fn: Tr
636
+ };
637
+ function jr(e, t, r) {
638
+ var n = X(e), o = [H, W].indexOf(n) >= 0 ? -1 : 1, s = typeof r == "function" ? r(Object.assign({}, t, {
639
+ placement: e
640
+ })) : r, c = s[0], a = s[1];
641
+ return c = c || 0, a = (a || 0) * o, [H, q].indexOf(n) >= 0 ? {
642
+ x: a,
643
+ y: c
644
+ } : {
645
+ x: c,
646
+ y: a
647
+ };
648
+ }
649
+ function Dr(e) {
650
+ var t = e.state, r = e.options, n = e.name, o = r.offset, s = o === void 0 ? [0, 0] : o, c = lt.reduce(function(f, g) {
651
+ return f[g] = jr(g, t.rects, s), f;
652
+ }, {}), a = c[t.placement], p = a.x, l = a.y;
653
+ t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += p, t.modifiersData.popperOffsets.y += l), t.modifiersData[n] = c;
654
+ }
655
+ const Cr = {
656
+ name: "offset",
657
+ enabled: !0,
658
+ phase: "main",
659
+ requires: ["popperOffsets"],
660
+ fn: Dr
661
+ };
662
+ function Mr(e) {
663
+ var t = e.state, r = e.name;
664
+ t.modifiersData[r] = yt({
665
+ reference: t.rects.reference,
666
+ element: t.rects.popper,
667
+ strategy: "absolute",
668
+ placement: t.placement
669
+ });
670
+ }
671
+ const Br = {
672
+ name: "popperOffsets",
673
+ enabled: !0,
674
+ phase: "read",
675
+ fn: Mr,
676
+ data: {}
677
+ };
678
+ function $r(e) {
679
+ return e === "x" ? "y" : "x";
680
+ }
681
+ function Sr(e) {
682
+ var t = e.state, r = e.options, n = e.name, o = r.mainAxis, s = o === void 0 ? !0 : o, c = r.altAxis, a = c === void 0 ? !1 : c, p = r.boundary, l = r.rootBoundary, f = r.altBoundary, g = r.padding, O = r.tether, d = O === void 0 ? !0 : O, w = r.tetherOffset, v = w === void 0 ? 0 : w, h = ue(t, {
683
+ boundary: p,
684
+ rootBoundary: l,
685
+ padding: g,
686
+ altBoundary: f
687
+ }), E = X(t.placement), P = oe(t.placement), b = !P, u = He(E), m = $r(u), y = t.modifiersData.popperOffsets, x = t.rects.reference, C = t.rects.popper, R = typeof v == "function" ? v(Object.assign({}, t.rects, {
688
+ placement: t.placement
689
+ })) : v, A = typeof R == "number" ? {
690
+ mainAxis: R,
691
+ altAxis: R
692
+ } : Object.assign({
693
+ mainAxis: 0,
694
+ altAxis: 0
695
+ }, R), M = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, L = {
696
+ x: 0,
697
+ y: 0
698
+ };
699
+ if (y) {
700
+ if (s) {
701
+ var B, I = u === "y" ? W : H, T = u === "y" ? U : q, j = u === "y" ? "height" : "width", D = y[u], $ = D + h[I], S = D - h[T], F = d ? -C[j] / 2 : 0, Re = P === te ? x[j] : C[j], ie = P === te ? -C[j] : -x[j], me = t.elements.arrow, ee = d && me ? We(me) : {
702
+ width: 0,
703
+ height: 0
704
+ }, G = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : vt(), ae = G[I], he = G[T], J = pe(0, x[j], ee[j]), Te = b ? x[j] / 2 - F - J - ae - A.mainAxis : Re - J - ae - A.mainAxis, wt = b ? -x[j] / 2 + F + J + he + A.mainAxis : ie + J + he + A.mainAxis, Ae = t.elements.arrow && ve(t.elements.arrow), xt = Ae ? u === "y" ? Ae.clientTop || 0 : Ae.clientLeft || 0 : 0, qe = (B = M == null ? void 0 : M[u]) != null ? B : 0, Ot = D + Te - qe - xt, Et = D + wt - qe, Fe = pe(d ? xe($, Ot) : $, D, d ? Z(S, Et) : S);
705
+ y[u] = Fe, L[u] = Fe - D;
706
+ }
707
+ if (a) {
708
+ var Ie, Pt = u === "x" ? W : H, Rt = u === "x" ? U : q, Q = y[m], ge = m === "y" ? "height" : "width", Xe = Q + h[Pt], Ye = Q - h[Rt], je = [W, H].indexOf(E) !== -1, ze = (Ie = M == null ? void 0 : M[m]) != null ? Ie : 0, Ge = je ? Xe : Q - x[ge] - C[ge] - ze + A.altAxis, Ke = je ? Q + x[ge] + C[ge] - ze - A.altAxis : Ye, Je = d && je ? or(Ge, Q, Ke) : pe(d ? Ge : Xe, Q, d ? Ke : Ye);
709
+ y[m] = Je, L[m] = Je - Q;
710
+ }
711
+ t.modifiersData[n] = L;
712
+ }
713
+ }
714
+ const kr = {
715
+ name: "preventOverflow",
716
+ enabled: !0,
717
+ phase: "main",
718
+ fn: Sr,
719
+ requiresIfExists: ["offset"]
720
+ };
721
+ function Lr(e) {
722
+ return {
723
+ scrollLeft: e.scrollLeft,
724
+ scrollTop: e.scrollTop
725
+ };
726
+ }
727
+ function Wr(e) {
728
+ return e === N(e) || !V(e) ? Ne(e) : Lr(e);
729
+ }
730
+ function Hr(e) {
731
+ var t = e.getBoundingClientRect(), r = re(t.width) / e.offsetWidth || 1, n = re(t.height) / e.offsetHeight || 1;
732
+ return r !== 1 || n !== 1;
733
+ }
734
+ function Nr(e, t, r) {
735
+ r === void 0 && (r = !1);
736
+ var n = V(t), o = V(t) && Hr(t), s = K(t), c = ne(e, o, r), a = {
737
+ scrollLeft: 0,
738
+ scrollTop: 0
739
+ }, p = {
740
+ x: 0,
741
+ y: 0
742
+ };
743
+ return (n || !n && !r) && ((Y(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
744
+ Ue(s)) && (a = Wr(t)), V(t) ? (p = ne(t, !0), p.x += t.clientLeft, p.y += t.clientTop) : s && (p.x = Ve(s))), {
745
+ x: c.left + a.scrollLeft - p.x,
746
+ y: c.top + a.scrollTop - p.y,
747
+ width: c.width,
748
+ height: c.height
749
+ };
750
+ }
751
+ function Vr(e) {
752
+ var t = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Set(), n = [];
753
+ e.forEach(function(s) {
754
+ t.set(s.name, s);
755
+ });
756
+ function o(s) {
757
+ r.add(s.name);
758
+ var c = [].concat(s.requires || [], s.requiresIfExists || []);
759
+ c.forEach(function(a) {
760
+ if (!r.has(a)) {
761
+ var p = t.get(a);
762
+ p && o(p);
763
+ }
764
+ }), n.push(s);
765
+ }
766
+ return e.forEach(function(s) {
767
+ r.has(s.name) || o(s);
768
+ }), n;
769
+ }
770
+ function Ur(e) {
771
+ var t = Vr(e);
772
+ return Zt.reduce(function(r, n) {
773
+ return r.concat(t.filter(function(o) {
774
+ return o.phase === n;
775
+ }));
776
+ }, []);
777
+ }
778
+ function qr(e) {
779
+ var t;
780
+ return function() {
781
+ return t || (t = new Promise(function(r) {
782
+ Promise.resolve().then(function() {
783
+ t = void 0, r(e());
784
+ });
785
+ })), t;
786
+ };
787
+ }
788
+ function Fr(e) {
789
+ var t = e.reduce(function(r, n) {
790
+ var o = r[n.name];
791
+ return r[n.name] = o ? Object.assign({}, o, n, {
792
+ options: Object.assign({}, o.options, n.options),
793
+ data: Object.assign({}, o.data, n.data)
794
+ }) : n, r;
795
+ }, {});
796
+ return Object.keys(t).map(function(r) {
797
+ return t[r];
798
+ });
799
+ }
800
+ var st = {
801
+ placement: "bottom",
802
+ modifiers: [],
803
+ strategy: "absolute"
804
+ };
805
+ function pt() {
806
+ for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++)
807
+ t[r] = arguments[r];
808
+ return !t.some(function(n) {
809
+ return !(n && typeof n.getBoundingClientRect == "function");
810
+ });
811
+ }
812
+ function Ir(e) {
813
+ e === void 0 && (e = {});
814
+ var t = e, r = t.defaultModifiers, n = r === void 0 ? [] : r, o = t.defaultOptions, s = o === void 0 ? st : o;
815
+ return function(a, p, l) {
816
+ l === void 0 && (l = s);
817
+ var f = {
818
+ placement: "bottom",
819
+ orderedModifiers: [],
820
+ options: Object.assign({}, st, s),
821
+ modifiersData: {},
822
+ elements: {
823
+ reference: a,
824
+ popper: p
825
+ },
826
+ attributes: {},
827
+ styles: {}
828
+ }, g = [], O = !1, d = {
829
+ state: f,
830
+ setOptions: function(E) {
831
+ var P = typeof E == "function" ? E(f.options) : E;
832
+ v(), f.options = Object.assign({}, s, f.options, P), f.scrollParents = {
833
+ reference: _(a) ? fe(a) : a.contextElement ? fe(a.contextElement) : [],
834
+ popper: fe(p)
835
+ };
836
+ var b = Ur(Fr([].concat(n, f.options.modifiers)));
837
+ return f.orderedModifiers = b.filter(function(u) {
838
+ return u.enabled;
839
+ }), w(), d.update();
840
+ },
841
+ // Sync update – it will always be executed, even if not necessary. This
842
+ // is useful for low frequency updates where sync behavior simplifies the
843
+ // logic.
844
+ // For high frequency updates (e.g. `resize` and `scroll` events), always
845
+ // prefer the async Popper#update method
846
+ forceUpdate: function() {
847
+ if (!O) {
848
+ var E = f.elements, P = E.reference, b = E.popper;
849
+ if (pt(P, b)) {
850
+ f.rects = {
851
+ reference: Nr(P, ve(b), f.options.strategy === "fixed"),
852
+ popper: We(b)
853
+ }, f.reset = !1, f.placement = f.options.placement, f.orderedModifiers.forEach(function(A) {
854
+ return f.modifiersData[A.name] = Object.assign({}, A.data);
855
+ });
856
+ for (var u = 0; u < f.orderedModifiers.length; u++) {
857
+ if (f.reset === !0) {
858
+ f.reset = !1, u = -1;
859
+ continue;
860
+ }
861
+ var m = f.orderedModifiers[u], y = m.fn, x = m.options, C = x === void 0 ? {} : x, R = m.name;
862
+ typeof y == "function" && (f = y({
863
+ state: f,
864
+ options: C,
865
+ name: R,
866
+ instance: d
867
+ }) || f);
868
+ }
869
+ }
870
+ }
871
+ },
872
+ // Async and optimistically optimized update – it will not be executed if
873
+ // not necessary (debounced to run at most once-per-tick)
874
+ update: qr(function() {
875
+ return new Promise(function(h) {
876
+ d.forceUpdate(), h(f);
877
+ });
878
+ }),
879
+ destroy: function() {
880
+ v(), O = !0;
881
+ }
882
+ };
883
+ if (!pt(a, p))
884
+ return d;
885
+ d.setOptions(l).then(function(h) {
886
+ !O && l.onFirstUpdate && l.onFirstUpdate(h);
887
+ });
888
+ function w() {
889
+ f.orderedModifiers.forEach(function(h) {
890
+ var E = h.name, P = h.options, b = P === void 0 ? {} : P, u = h.effect;
891
+ if (typeof u == "function") {
892
+ var m = u({
893
+ state: f,
894
+ name: E,
895
+ instance: d,
896
+ options: b
897
+ }), y = function() {
898
+ };
899
+ g.push(m || y);
900
+ }
901
+ });
902
+ }
903
+ function v() {
904
+ g.forEach(function(h) {
905
+ return h();
906
+ }), g = [];
907
+ }
908
+ return d;
909
+ };
910
+ }
911
+ var Xr = [vr, Br, ur, tr, Cr, Rr, kr, pr, Ar], Yr = /* @__PURE__ */ Ir({
912
+ defaultModifiers: Xr
913
+ });
914
+ function zr(e) {
915
+ return At("MuiPopper", e);
916
+ }
917
+ jt("MuiPopper", ["root"]);
918
+ function Gr(e, t) {
919
+ if (t === "ltr")
920
+ return e;
921
+ switch (e) {
922
+ case "bottom-end":
923
+ return "bottom-start";
924
+ case "bottom-start":
925
+ return "bottom-end";
926
+ case "top-end":
927
+ return "top-start";
928
+ case "top-start":
929
+ return "top-end";
930
+ default:
931
+ return e;
932
+ }
933
+ }
934
+ function Oe(e) {
935
+ return typeof e == "function" ? e() : e;
936
+ }
937
+ function Pe(e) {
938
+ return e.nodeType !== void 0;
939
+ }
940
+ function Kr(e) {
941
+ return !Pe(e);
942
+ }
943
+ const Jr = (e) => {
944
+ const {
945
+ classes: t
946
+ } = e;
947
+ return Dt({
948
+ root: ["root"]
949
+ }, zr, t);
950
+ }, Qr = {}, Zr = /* @__PURE__ */ k.forwardRef(function(t, r) {
951
+ const {
952
+ anchorEl: n,
953
+ children: o,
954
+ direction: s,
955
+ disablePortal: c,
956
+ modifiers: a,
957
+ open: p,
958
+ placement: l,
959
+ popperOptions: f,
960
+ popperRef: g,
961
+ slotProps: O = {},
962
+ slots: d = {},
963
+ TransitionProps: w,
964
+ // @ts-ignore internal logic
965
+ ownerState: v,
966
+ // prevent from spreading to DOM, it can come from the parent component e.g. Select.
967
+ ...h
968
+ } = t, E = k.useRef(null), P = Ce(E, r), b = k.useRef(null), u = Ce(b, g), m = k.useRef(u);
969
+ Ze(() => {
970
+ m.current = u;
971
+ }, [u]), k.useImperativeHandle(g, () => b.current, []);
972
+ const y = Gr(l, s), [x, C] = k.useState(y), [R, A] = k.useState(Oe(n));
973
+ k.useEffect(() => {
974
+ b.current && b.current.forceUpdate();
975
+ }), k.useEffect(() => {
976
+ n && A(Oe(n));
977
+ }, [n]), Ze(() => {
978
+ if (!R || !p)
979
+ return;
980
+ const T = ($) => {
981
+ C($.placement);
982
+ };
983
+ if (process.env.NODE_ENV !== "production" && R && Pe(R) && R.nodeType === 1) {
984
+ const $ = R.getBoundingClientRect();
985
+ process.env.NODE_ENV !== "test" && $.top === 0 && $.left === 0 && $.right === 0 && $.bottom === 0 && console.warn(["MUI: The `anchorEl` prop provided to the component is invalid.", "The anchor element should be part of the document layout.", "Make sure the element is present in the document or that it's not display none."].join(`
986
+ `));
987
+ }
988
+ let j = [{
989
+ name: "preventOverflow",
990
+ options: {
991
+ altBoundary: c
992
+ }
993
+ }, {
994
+ name: "flip",
995
+ options: {
996
+ altBoundary: c
997
+ }
998
+ }, {
999
+ name: "onUpdate",
1000
+ enabled: !0,
1001
+ phase: "afterWrite",
1002
+ fn: ({
1003
+ state: $
1004
+ }) => {
1005
+ T($);
1006
+ }
1007
+ }];
1008
+ a != null && (j = j.concat(a)), f && f.modifiers != null && (j = j.concat(f.modifiers));
1009
+ const D = Yr(R, E.current, {
1010
+ placement: y,
1011
+ ...f,
1012
+ modifiers: j
1013
+ });
1014
+ return m.current(D), () => {
1015
+ D.destroy(), m.current(null);
1016
+ };
1017
+ }, [R, c, a, p, f, y]);
1018
+ const M = {
1019
+ placement: x
1020
+ };
1021
+ w !== null && (M.TransitionProps = w);
1022
+ const L = Jr(t), B = d.root ?? "div", I = Ht({
1023
+ elementType: B,
1024
+ externalSlotProps: O.root,
1025
+ externalForwardedProps: h,
1026
+ additionalProps: {
1027
+ role: "tooltip",
1028
+ ref: P
1029
+ },
1030
+ ownerState: t,
1031
+ className: L.root
1032
+ });
1033
+ return /* @__PURE__ */ ce(B, {
1034
+ ...I,
1035
+ children: typeof o == "function" ? o(M) : o
1036
+ });
1037
+ }), bt = /* @__PURE__ */ k.forwardRef(function(t, r) {
1038
+ const {
1039
+ anchorEl: n,
1040
+ children: o,
1041
+ container: s,
1042
+ direction: c = "ltr",
1043
+ disablePortal: a = !1,
1044
+ keepMounted: p = !1,
1045
+ modifiers: l,
1046
+ open: f,
1047
+ placement: g = "bottom",
1048
+ popperOptions: O = Qr,
1049
+ popperRef: d,
1050
+ style: w,
1051
+ transition: v = !1,
1052
+ slotProps: h = {},
1053
+ slots: E = {},
1054
+ ...P
1055
+ } = t, [b, u] = k.useState(!0), m = () => {
1056
+ u(!1);
1057
+ }, y = () => {
1058
+ u(!0);
1059
+ };
1060
+ if (!p && !f && (!v || b))
1061
+ return null;
1062
+ let x;
1063
+ if (s)
1064
+ x = s;
1065
+ else if (n) {
1066
+ const A = Oe(n);
1067
+ x = A && Pe(A) ? Qe(A).body : Qe(null).body;
1068
+ }
1069
+ const C = !f && p && (!v || b) ? "none" : void 0, R = v ? {
1070
+ in: f,
1071
+ onEnter: m,
1072
+ onExited: y
1073
+ } : void 0;
1074
+ return /* @__PURE__ */ ce(Bt, {
1075
+ disablePortal: a,
1076
+ container: x,
1077
+ children: /* @__PURE__ */ ce(Zr, {
1078
+ anchorEl: n,
1079
+ direction: c,
1080
+ disablePortal: a,
1081
+ modifiers: l,
1082
+ ref: r,
1083
+ open: v ? !b : f,
1084
+ placement: g,
1085
+ popperOptions: O,
1086
+ popperRef: d,
1087
+ slotProps: h,
1088
+ slots: E,
1089
+ ...P,
1090
+ style: {
1091
+ // Prevents scroll issue, waiting for Popper.js to add this style once initiated.
1092
+ position: "fixed",
1093
+ // Fix Popper.js display issue
1094
+ top: 0,
1095
+ left: 0,
1096
+ display: C,
1097
+ ...w
1098
+ },
1099
+ TransitionProps: R,
1100
+ children: o
1101
+ })
1102
+ });
1103
+ });
1104
+ process.env.NODE_ENV !== "production" && (bt.propTypes = {
1105
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
1106
+ // │ These PropTypes are generated from the TypeScript type definitions. │
1107
+ // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
1108
+ // └─────────────────────────────────────────────────────────────────────┘
1109
+ /**
1110
+ * An HTML element, [virtualElement](https://popper.js.org/docs/v2/virtual-elements/),
1111
+ * or a function that returns either.
1112
+ * It's used to set the position of the popper.
1113
+ * The return value will passed as the reference object of the Popper instance.
1114
+ */
1115
+ anchorEl: kt(i.oneOfType([we, i.object, i.func]), (e) => {
1116
+ if (e.open) {
1117
+ const t = Oe(e.anchorEl);
1118
+ if (t && Pe(t) && t.nodeType === 1) {
1119
+ const r = t.getBoundingClientRect();
1120
+ if (process.env.NODE_ENV !== "test" && r.top === 0 && r.left === 0 && r.right === 0 && r.bottom === 0)
1121
+ return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.", "The anchor element should be part of the document layout.", "Make sure the element is present in the document or that it's not display none."].join(`
1122
+ `));
1123
+ } else if (!t || typeof t.getBoundingClientRect != "function" || Kr(t) && t.contextElement != null && t.contextElement.nodeType !== 1)
1124
+ return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.", "It should be an HTML element instance or a virtualElement ", "(https://popper.js.org/docs/v2/virtual-elements/)."].join(`
1125
+ `));
1126
+ }
1127
+ return null;
1128
+ }),
1129
+ /**
1130
+ * Popper render function or node.
1131
+ */
1132
+ children: i.oneOfType([i.node, i.func]),
1133
+ /**
1134
+ * An HTML element or function that returns one.
1135
+ * The `container` will have the portal children appended to it.
1136
+ *
1137
+ * You can also provide a callback, which is called in a React layout effect.
1138
+ * This lets you set the container from a ref, and also makes server-side rendering possible.
1139
+ *
1140
+ * By default, it uses the body of the top-level document object,
1141
+ * so it's simply `document.body` most of the time.
1142
+ */
1143
+ container: i.oneOfType([we, i.func]),
1144
+ /**
1145
+ * Direction of the text.
1146
+ * @default 'ltr'
1147
+ */
1148
+ direction: i.oneOf(["ltr", "rtl"]),
1149
+ /**
1150
+ * The `children` will be under the DOM hierarchy of the parent component.
1151
+ * @default false
1152
+ */
1153
+ disablePortal: i.bool,
1154
+ /**
1155
+ * Always keep the children in the DOM.
1156
+ * This prop can be useful in SEO situation or
1157
+ * when you want to maximize the responsiveness of the Popper.
1158
+ * @default false
1159
+ */
1160
+ keepMounted: i.bool,
1161
+ /**
1162
+ * Popper.js is based on a "plugin-like" architecture,
1163
+ * most of its features are fully encapsulated "modifiers".
1164
+ *
1165
+ * A modifier is a function that is called each time Popper.js needs to
1166
+ * compute the position of the popper.
1167
+ * For this reason, modifiers should be very performant to avoid bottlenecks.
1168
+ * To learn how to create a modifier, [read the modifiers documentation](https://popper.js.org/docs/v2/modifiers/).
1169
+ */
1170
+ modifiers: i.arrayOf(i.shape({
1171
+ data: i.object,
1172
+ effect: i.func,
1173
+ enabled: i.bool,
1174
+ fn: i.func,
1175
+ name: i.any,
1176
+ options: i.object,
1177
+ phase: i.oneOf(["afterMain", "afterRead", "afterWrite", "beforeMain", "beforeRead", "beforeWrite", "main", "read", "write"]),
1178
+ requires: i.arrayOf(i.string),
1179
+ requiresIfExists: i.arrayOf(i.string)
1180
+ })),
1181
+ /**
1182
+ * If `true`, the component is shown.
1183
+ */
1184
+ open: i.bool.isRequired,
1185
+ /**
1186
+ * Popper placement.
1187
+ * @default 'bottom'
1188
+ */
1189
+ placement: i.oneOf(["auto-end", "auto-start", "auto", "bottom-end", "bottom-start", "bottom", "left-end", "left-start", "left", "right-end", "right-start", "right", "top-end", "top-start", "top"]),
1190
+ /**
1191
+ * Options provided to the [`Popper.js`](https://popper.js.org/docs/v2/constructors/#options) instance.
1192
+ * @default {}
1193
+ */
1194
+ popperOptions: i.shape({
1195
+ modifiers: i.array,
1196
+ onFirstUpdate: i.func,
1197
+ placement: i.oneOf(["auto-end", "auto-start", "auto", "bottom-end", "bottom-start", "bottom", "left-end", "left-start", "left", "right-end", "right-start", "right", "top-end", "top-start", "top"]),
1198
+ strategy: i.oneOf(["absolute", "fixed"])
1199
+ }),
1200
+ /**
1201
+ * A ref that points to the used popper instance.
1202
+ */
1203
+ popperRef: ft,
1204
+ /**
1205
+ * The props used for each slot inside the Popper.
1206
+ * @default {}
1207
+ */
1208
+ slotProps: i.shape({
1209
+ root: i.oneOfType([i.func, i.object])
1210
+ }),
1211
+ /**
1212
+ * The components used for each slot inside the Popper.
1213
+ * Either a string to use a HTML element or a component.
1214
+ * @default {}
1215
+ */
1216
+ slots: i.shape({
1217
+ root: i.elementType
1218
+ }),
1219
+ /**
1220
+ * Help supporting a react-transition-group/Transition component.
1221
+ * @default false
1222
+ */
1223
+ transition: i.bool
1224
+ });
1225
+ const _r = Ct(bt, {
1226
+ name: "MuiPopper",
1227
+ slot: "Root",
1228
+ overridesResolver: (e, t) => t.root
1229
+ })({}), en = /* @__PURE__ */ k.forwardRef(function(t, r) {
1230
+ const n = Tt(), o = Mt({
1231
+ props: t,
1232
+ name: "MuiPopper"
1233
+ }), {
1234
+ anchorEl: s,
1235
+ component: c,
1236
+ components: a,
1237
+ componentsProps: p,
1238
+ container: l,
1239
+ disablePortal: f,
1240
+ keepMounted: g,
1241
+ modifiers: O,
1242
+ open: d,
1243
+ placement: w,
1244
+ popperOptions: v,
1245
+ popperRef: h,
1246
+ transition: E,
1247
+ slots: P,
1248
+ slotProps: b,
1249
+ ...u
1250
+ } = o, m = (P == null ? void 0 : P.root) ?? (a == null ? void 0 : a.Root), y = {
1251
+ anchorEl: s,
1252
+ container: l,
1253
+ disablePortal: f,
1254
+ keepMounted: g,
1255
+ modifiers: O,
1256
+ open: d,
1257
+ placement: w,
1258
+ popperOptions: v,
1259
+ popperRef: h,
1260
+ transition: E,
1261
+ ...u
1262
+ };
1263
+ return /* @__PURE__ */ ce(_r, {
1264
+ as: c,
1265
+ direction: n ? "rtl" : "ltr",
1266
+ slots: {
1267
+ root: m
1268
+ },
1269
+ slotProps: b ?? p,
1270
+ ...y,
1271
+ ref: r
1272
+ });
1273
+ });
1274
+ process.env.NODE_ENV !== "production" && (en.propTypes = {
1275
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
1276
+ // │ These PropTypes are generated from the TypeScript type definitions. │
1277
+ // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
1278
+ // └─────────────────────────────────────────────────────────────────────┘
1279
+ /**
1280
+ * An HTML element, [virtualElement](https://popper.js.org/docs/v2/virtual-elements/),
1281
+ * or a function that returns either.
1282
+ * It's used to set the position of the popper.
1283
+ * The return value will passed as the reference object of the Popper instance.
1284
+ */
1285
+ anchorEl: i.oneOfType([we, i.object, i.func]),
1286
+ /**
1287
+ * Popper render function or node.
1288
+ */
1289
+ children: i.oneOfType([i.node, i.func]),
1290
+ /**
1291
+ * The component used for the root node.
1292
+ * Either a string to use a HTML element or a component.
1293
+ */
1294
+ component: i.elementType,
1295
+ /**
1296
+ * The components used for each slot inside the Popper.
1297
+ * Either a string to use a HTML element or a component.
1298
+ *
1299
+ * @deprecated use the `slots` prop instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
1300
+ * @default {}
1301
+ */
1302
+ components: i.shape({
1303
+ Root: i.elementType
1304
+ }),
1305
+ /**
1306
+ * The props used for each slot inside the Popper.
1307
+ *
1308
+ * @deprecated use the `slotProps` prop instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
1309
+ * @default {}
1310
+ */
1311
+ componentsProps: i.shape({
1312
+ root: i.oneOfType([i.func, i.object])
1313
+ }),
1314
+ /**
1315
+ * An HTML element or function that returns one.
1316
+ * The `container` will have the portal children appended to it.
1317
+ *
1318
+ * You can also provide a callback, which is called in a React layout effect.
1319
+ * This lets you set the container from a ref, and also makes server-side rendering possible.
1320
+ *
1321
+ * By default, it uses the body of the top-level document object,
1322
+ * so it's simply `document.body` most of the time.
1323
+ */
1324
+ container: i.oneOfType([we, i.func]),
1325
+ /**
1326
+ * The `children` will be under the DOM hierarchy of the parent component.
1327
+ * @default false
1328
+ */
1329
+ disablePortal: i.bool,
1330
+ /**
1331
+ * Always keep the children in the DOM.
1332
+ * This prop can be useful in SEO situation or
1333
+ * when you want to maximize the responsiveness of the Popper.
1334
+ * @default false
1335
+ */
1336
+ keepMounted: i.bool,
1337
+ /**
1338
+ * Popper.js is based on a "plugin-like" architecture,
1339
+ * most of its features are fully encapsulated "modifiers".
1340
+ *
1341
+ * A modifier is a function that is called each time Popper.js needs to
1342
+ * compute the position of the popper.
1343
+ * For this reason, modifiers should be very performant to avoid bottlenecks.
1344
+ * To learn how to create a modifier, [read the modifiers documentation](https://popper.js.org/docs/v2/modifiers/).
1345
+ */
1346
+ modifiers: i.arrayOf(i.shape({
1347
+ data: i.object,
1348
+ effect: i.func,
1349
+ enabled: i.bool,
1350
+ fn: i.func,
1351
+ name: i.any,
1352
+ options: i.object,
1353
+ phase: i.oneOf(["afterMain", "afterRead", "afterWrite", "beforeMain", "beforeRead", "beforeWrite", "main", "read", "write"]),
1354
+ requires: i.arrayOf(i.string),
1355
+ requiresIfExists: i.arrayOf(i.string)
1356
+ })),
1357
+ /**
1358
+ * If `true`, the component is shown.
1359
+ */
1360
+ open: i.bool.isRequired,
1361
+ /**
1362
+ * Popper placement.
1363
+ * @default 'bottom'
1364
+ */
1365
+ placement: i.oneOf(["auto-end", "auto-start", "auto", "bottom-end", "bottom-start", "bottom", "left-end", "left-start", "left", "right-end", "right-start", "right", "top-end", "top-start", "top"]),
1366
+ /**
1367
+ * Options provided to the [`Popper.js`](https://popper.js.org/docs/v2/constructors/#options) instance.
1368
+ * @default {}
1369
+ */
1370
+ popperOptions: i.shape({
1371
+ modifiers: i.array,
1372
+ onFirstUpdate: i.func,
1373
+ placement: i.oneOf(["auto-end", "auto-start", "auto", "bottom-end", "bottom-start", "bottom", "left-end", "left-start", "left", "right-end", "right-start", "right", "top-end", "top-start", "top"]),
1374
+ strategy: i.oneOf(["absolute", "fixed"])
1375
+ }),
1376
+ /**
1377
+ * A ref that points to the used popper instance.
1378
+ */
1379
+ popperRef: ft,
1380
+ /**
1381
+ * The props used for each slot inside the Popper.
1382
+ * @default {}
1383
+ */
1384
+ slotProps: i.shape({
1385
+ root: i.oneOfType([i.func, i.object])
1386
+ }),
1387
+ /**
1388
+ * The components used for each slot inside the Popper.
1389
+ * Either a string to use a HTML element or a component.
1390
+ * @default {}
1391
+ */
1392
+ slots: i.shape({
1393
+ root: i.elementType
1394
+ }),
1395
+ /**
1396
+ * The system prop that allows defining system overrides as well as additional CSS styles.
1397
+ */
1398
+ sx: i.oneOfType([i.arrayOf(i.oneOfType([i.func, i.object, i.bool])), i.func, i.object]),
1399
+ /**
1400
+ * Help supporting a react-transition-group/Transition component.
1401
+ * @default false
1402
+ */
1403
+ transition: i.bool
1404
+ });
1405
+ function $e(e) {
1406
+ return `scale(${e}, ${e ** 2})`;
1407
+ }
1408
+ const tn = {
12
1409
  entering: {
13
1410
  opacity: 1,
14
- transform: h(1)
1411
+ transform: $e(1)
15
1412
  },
16
1413
  entered: {
17
1414
  opacity: 1,
18
1415
  transform: "none"
19
1416
  }
20
- }, E = typeof navigator < "u" && /^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent) && /(os |version\/)15(.|_)4/i.test(navigator.userAgent), y = /* @__PURE__ */ f.forwardRef(function(w, D) {
1417
+ }, De = typeof navigator < "u" && /^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent) && /(os |version\/)15(.|_)4/i.test(navigator.userAgent), Se = /* @__PURE__ */ k.forwardRef(function(t, r) {
21
1418
  const {
22
- addEndListener: x,
23
- appear: L = !0,
24
- children: m,
25
- easing: T,
26
- in: R,
27
- onEnter: b,
28
- onEntered: j,
29
- onEntering: H,
30
- onExit: A,
1419
+ addEndListener: n,
1420
+ appear: o = !0,
1421
+ children: s,
1422
+ easing: c,
1423
+ in: a,
1424
+ onEnter: p,
1425
+ onEntered: l,
1426
+ onEntering: f,
1427
+ onExit: g,
31
1428
  onExited: O,
32
- onExiting: P,
33
- style: p,
34
- timeout: o = "auto",
1429
+ onExiting: d,
1430
+ style: w,
1431
+ timeout: v = "auto",
35
1432
  // eslint-disable-next-line react/prop-types
36
- TransitionComponent: F = B,
37
- ...G
38
- } = w, S = V(), g = f.useRef(), s = W(), c = f.useRef(null), C = M(c, Q(m), D), a = (t) => (r) => {
39
- if (t) {
40
- const e = c.current;
41
- r === void 0 ? t(e) : t(e, r);
1433
+ TransitionComponent: h = Nt,
1434
+ ...E
1435
+ } = t, P = Lt(), b = k.useRef(), u = Wt(), m = k.useRef(null), y = Ce(m, $t(s), r), x = (T) => (j) => {
1436
+ if (T) {
1437
+ const D = m.current;
1438
+ j === void 0 ? T(D) : T(D, j);
42
1439
  }
43
- }, N = a(H), _ = a((t, r) => {
44
- J(t);
1440
+ }, C = x(f), R = x((T, j) => {
1441
+ Vt(T);
45
1442
  const {
46
- duration: e,
47
- delay: d,
48
- easing: i
49
- } = v({
50
- style: p,
51
- timeout: o,
52
- easing: T
1443
+ duration: D,
1444
+ delay: $,
1445
+ easing: S
1446
+ } = _e({
1447
+ style: w,
1448
+ timeout: v,
1449
+ easing: c
53
1450
  }, {
54
1451
  mode: "enter"
55
1452
  });
56
- let u;
57
- o === "auto" ? (u = s.transitions.getAutoHeightDuration(t.clientHeight), g.current = u) : u = e, t.style.transition = [s.transitions.create("opacity", {
58
- duration: u,
59
- delay: d
60
- }), s.transitions.create("transform", {
61
- duration: E ? u : u * 0.666,
62
- delay: d,
63
- easing: i
64
- })].join(","), b && b(t, r);
65
- }), $ = a(j), q = a(P), z = a((t) => {
1453
+ let F;
1454
+ v === "auto" ? (F = u.transitions.getAutoHeightDuration(T.clientHeight), b.current = F) : F = D, T.style.transition = [u.transitions.create("opacity", {
1455
+ duration: F,
1456
+ delay: $
1457
+ }), u.transitions.create("transform", {
1458
+ duration: De ? F : F * 0.666,
1459
+ delay: $,
1460
+ easing: S
1461
+ })].join(","), p && p(T, j);
1462
+ }), A = x(l), M = x(d), L = x((T) => {
66
1463
  const {
67
- duration: r,
68
- delay: e,
69
- easing: d
70
- } = v({
71
- style: p,
72
- timeout: o,
73
- easing: T
1464
+ duration: j,
1465
+ delay: D,
1466
+ easing: $
1467
+ } = _e({
1468
+ style: w,
1469
+ timeout: v,
1470
+ easing: c
74
1471
  }, {
75
1472
  mode: "exit"
76
1473
  });
77
- let i;
78
- o === "auto" ? (i = s.transitions.getAutoHeightDuration(t.clientHeight), g.current = i) : i = r, t.style.transition = [s.transitions.create("opacity", {
79
- duration: i,
80
- delay: e
81
- }), s.transitions.create("transform", {
82
- duration: E ? i : i * 0.666,
83
- delay: E ? e : e || i * 0.333,
84
- easing: d
85
- })].join(","), t.style.opacity = 0, t.style.transform = h(0.75), A && A(t);
86
- }), K = a(O);
87
- return /* @__PURE__ */ k(F, {
88
- appear: L,
89
- in: R,
90
- nodeRef: c,
91
- onEnter: _,
92
- onEntered: $,
93
- onEntering: N,
94
- onExit: z,
95
- onExited: K,
96
- onExiting: q,
97
- addEndListener: (t) => {
98
- o === "auto" && S.start(g.current || 0, t), x && x(c.current, t);
1474
+ let S;
1475
+ v === "auto" ? (S = u.transitions.getAutoHeightDuration(T.clientHeight), b.current = S) : S = j, T.style.transition = [u.transitions.create("opacity", {
1476
+ duration: S,
1477
+ delay: D
1478
+ }), u.transitions.create("transform", {
1479
+ duration: De ? S : S * 0.666,
1480
+ delay: De ? D : D || S * 0.333,
1481
+ easing: $
1482
+ })].join(","), T.style.opacity = 0, T.style.transform = $e(0.75), g && g(T);
1483
+ }), B = x(O);
1484
+ return /* @__PURE__ */ ce(h, {
1485
+ appear: o,
1486
+ in: a,
1487
+ nodeRef: m,
1488
+ onEnter: R,
1489
+ onEntered: A,
1490
+ onEntering: C,
1491
+ onExit: L,
1492
+ onExited: B,
1493
+ onExiting: M,
1494
+ addEndListener: (T) => {
1495
+ v === "auto" && P.start(b.current || 0, T), n && n(m.current, T);
99
1496
  },
100
- timeout: o === "auto" ? null : o,
101
- ...G,
102
- children: (t, {
103
- ownerState: r,
104
- ...e
105
- }) => /* @__PURE__ */ f.cloneElement(m, {
1497
+ timeout: v === "auto" ? null : v,
1498
+ ...E,
1499
+ children: (T, {
1500
+ ownerState: j,
1501
+ ...D
1502
+ }) => /* @__PURE__ */ k.cloneElement(s, {
106
1503
  style: {
107
1504
  opacity: 0,
108
- transform: h(0.75),
109
- visibility: t === "exited" && !R ? "hidden" : void 0,
110
- ...X[t],
111
- ...p,
112
- ...m.props.style
1505
+ transform: $e(0.75),
1506
+ visibility: T === "exited" && !a ? "hidden" : void 0,
1507
+ ...tn[T],
1508
+ ...w,
1509
+ ...s.props.style
113
1510
  },
114
- ref: C,
115
- ...e
1511
+ ref: y,
1512
+ ...D
116
1513
  })
117
1514
  });
118
1515
  });
119
- process.env.NODE_ENV !== "production" && (y.propTypes = {
1516
+ process.env.NODE_ENV !== "production" && (Se.propTypes = {
120
1517
  // ┌────────────────────────────── Warning ──────────────────────────────┐
121
1518
  // │ These PropTypes are generated from the TypeScript type definitions. │
122
1519
  // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
@@ -126,57 +1523,57 @@ process.env.NODE_ENV !== "production" && (y.propTypes = {
126
1523
  * node and a done callback. Allows for more fine grained transition end
127
1524
  * logic. Note: Timeouts are still used as a fallback if provided.
128
1525
  */
129
- addEndListener: n.func,
1526
+ addEndListener: i.func,
130
1527
  /**
131
1528
  * Perform the enter transition when it first mounts if `in` is also `true`.
132
1529
  * Set this to `false` to disable this behavior.
133
1530
  * @default true
134
1531
  */
135
- appear: n.bool,
1532
+ appear: i.bool,
136
1533
  /**
137
1534
  * A single child content element.
138
1535
  */
139
- children: U.isRequired,
1536
+ children: St.isRequired,
140
1537
  /**
141
1538
  * The transition timing function.
142
1539
  * You may specify a single easing or a object containing enter and exit values.
143
1540
  */
144
- easing: n.oneOfType([n.shape({
145
- enter: n.string,
146
- exit: n.string
147
- }), n.string]),
1541
+ easing: i.oneOfType([i.shape({
1542
+ enter: i.string,
1543
+ exit: i.string
1544
+ }), i.string]),
148
1545
  /**
149
1546
  * If `true`, the component will transition in.
150
1547
  */
151
- in: n.bool,
1548
+ in: i.bool,
152
1549
  /**
153
1550
  * @ignore
154
1551
  */
155
- onEnter: n.func,
1552
+ onEnter: i.func,
156
1553
  /**
157
1554
  * @ignore
158
1555
  */
159
- onEntered: n.func,
1556
+ onEntered: i.func,
160
1557
  /**
161
1558
  * @ignore
162
1559
  */
163
- onEntering: n.func,
1560
+ onEntering: i.func,
164
1561
  /**
165
1562
  * @ignore
166
1563
  */
167
- onExit: n.func,
1564
+ onExit: i.func,
168
1565
  /**
169
1566
  * @ignore
170
1567
  */
171
- onExited: n.func,
1568
+ onExited: i.func,
172
1569
  /**
173
1570
  * @ignore
174
1571
  */
175
- onExiting: n.func,
1572
+ onExiting: i.func,
176
1573
  /**
177
1574
  * @ignore
178
1575
  */
179
- style: n.object,
1576
+ style: i.object,
180
1577
  /**
181
1578
  * The duration for the transition, in milliseconds.
182
1579
  * You may specify a single timeout for all transitions, or individually with an object.
@@ -184,13 +1581,14 @@ process.env.NODE_ENV !== "production" && (y.propTypes = {
184
1581
  * Set to 'auto' to automatically calculate transition time based on height.
185
1582
  * @default 'auto'
186
1583
  */
187
- timeout: n.oneOfType([n.oneOf(["auto"]), n.number, n.shape({
188
- appear: n.number,
189
- enter: n.number,
190
- exit: n.number
1584
+ timeout: i.oneOfType([i.oneOf(["auto"]), i.number, i.shape({
1585
+ appear: i.number,
1586
+ enter: i.number,
1587
+ exit: i.number
191
1588
  })])
192
1589
  });
193
- y && (y.muiSupportAuto = !0);
1590
+ Se && (Se.muiSupportAuto = !0);
194
1591
  export {
195
- y as G
1592
+ Se as G,
1593
+ en as P
196
1594
  };